Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DialogActions", {
enumerable: true,
get: function() {
return DialogActions;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useDialogActions = require("./useDialogActions");
const _renderDialogActions = require("./renderDialogActions");
const _useDialogActionsStylesstyles = require("./useDialogActionsStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const DialogActions = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useDialogActions.useDialogActions_unstable)(props, ref);
(0, _useDialogActionsStylesstyles.useDialogActionsStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useDialogActionsStyles_unstable')(state);
return (0, _renderDialogActions.renderDialogActions_unstable)(state);
});
DialogActions.displayName = 'DialogActions';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogActions/DialogActions.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogActions_unstable } from './useDialogActions';\nimport { renderDialogActions_unstable } from './renderDialogActions';\nimport { useDialogActionsStyles_unstable } from './useDialogActionsStyles.styles';\nimport type { DialogActionsProps } from './DialogActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * `DialogActions` is a container for the actions of the dialog.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogActions: ForwardRefComponent<DialogActionsProps> = React.forwardRef((props, ref) => {\n const state = useDialogActions_unstable(props, ref);\n\n useDialogActionsStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDialogActionsStyles_unstable')(state);\n\n return renderDialogActions_unstable(state);\n});\n\nDialogActions.displayName = 'DialogActions';\n"],"names":["DialogActions","React","forwardRef","props","ref","state","useDialogActions_unstable","useDialogActionsStyles_unstable","useCustomStyleHook_unstable","renderDialogActions_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;kCACmB;qCACG;8CACG;qCAGJ;AAMrC,MAAMA,gBAAAA,WAAAA,GAAyDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BH,OAAOC;IAE/CG,IAAAA,6DAAAA,EAAgCF;IAEhCG,IAAAA,gDAAAA,EAA4B,mCAAmCH;IAE/D,OAAOI,IAAAA,iDAAAA,EAA6BJ;AACtC;AAEAL,cAAcU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
/**
* State used in rendering DialogActions
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogActions/DialogActions.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogActionsSlots = {\n root: Slot<'div'>;\n};\n\nexport type DialogActionsPosition = 'start' | 'end';\n\n/**\n * DialogActions Props\n */\nexport type DialogActionsProps = ComponentProps<DialogActionsSlots> & {\n /**\n * defines the position on the dialog grid of the actions\n * @default 'end'\n */\n position?: DialogActionsPosition;\n\n /**\n * Makes the actions expand the entire width of the DialogBody\n * @default false\n */\n fluid?: boolean;\n};\n\n/**\n * State used in rendering DialogActions\n */\nexport type DialogActionsState = ComponentState<DialogActionsSlots> &\n Pick<Required<DialogActionsProps>, 'position' | 'fluid'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAyBA;;CAEC"}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DialogActions: function() {
return _DialogActions.DialogActions;
},
dialogActionsClassNames: function() {
return _useDialogActionsStylesstyles.dialogActionsClassNames;
},
renderDialogActions_unstable: function() {
return _renderDialogActions.renderDialogActions_unstable;
},
useDialogActionsStyles_unstable: function() {
return _useDialogActionsStylesstyles.useDialogActionsStyles_unstable;
},
useDialogActions_unstable: function() {
return _useDialogActions.useDialogActions_unstable;
}
});
const _DialogActions = require("./DialogActions");
const _renderDialogActions = require("./renderDialogActions");
const _useDialogActions = require("./useDialogActions");
const _useDialogActionsStylesstyles = require("./useDialogActionsStyles.styles");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogActions/index.ts"],"sourcesContent":["export { DialogActions } from './DialogActions';\nexport type {\n DialogActionsPosition,\n DialogActionsProps,\n DialogActionsSlots,\n DialogActionsState,\n} from './DialogActions.types';\nexport { renderDialogActions_unstable } from './renderDialogActions';\nexport { useDialogActions_unstable } from './useDialogActions';\nexport { dialogActionsClassNames, useDialogActionsStyles_unstable } from './useDialogActionsStyles.styles';\n"],"names":["DialogActions","dialogActionsClassNames","renderDialogActions_unstable","useDialogActionsStyles_unstable","useDialogActions_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IASbC,uBAAuB;eAAvBA,qDAAuB;;IAFvBC,4BAA4B;eAA5BA,iDAA4B;;IAEHC,+BAA+B;eAA/BA,6DAA+B;;IADxDC,yBAAyB;eAAzBA,2CAAyB;;;+BARJ;qCAOe;kCACH;8CAC+B"}
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderDialogActions_unstable", {
enumerable: true,
get: function() {
return renderDialogActions_unstable;
}
});
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
const _reactutilities = require("@fluentui/react-utilities");
const renderDialogActions_unstable = (state)=>{
(0, _reactutilities.assertSlots)(state);
// TODO Add additional slots in the appropriate place
return /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {});
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogActions/renderDialogActions.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DialogActionsState, DialogActionsSlots } from './DialogActions.types';\n\n/**\n * Render the final JSX of DialogActions\n */\nexport const renderDialogActions_unstable = (state: DialogActionsState) => {\n assertSlots<DialogActionsSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <state.root />;\n};\n"],"names":["renderDialogActions_unstable","state","assertSlots","_jsx","root"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAE4B;AAMrB,MAAMA,+BAA+B,CAACC;IAC3CC,IAAAA,2BAAAA,EAAgCD;IAEhC,qDAAqD;IACrD,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA,CAAA;AACpB"}
@@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDialogActions_unstable", {
enumerable: true,
get: function() {
return useDialogActions_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactutilities = require("@fluentui/react-utilities");
const useDialogActions_unstable = (props, ref)=>{
const { position = 'end', fluid = false } = props;
return {
components: {
root: 'div'
},
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
// FIXME:
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
ref: ref,
...props
}), {
elementType: 'div'
}),
position,
fluid
};
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogActions/useDialogActions.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { DialogActionsProps, DialogActionsState } from './DialogActions.types';\n\n/**\n * Create the state required to render DialogActions.\n *\n * The returned state can be modified with hooks such as useDialogActionsStyles_unstable,\n * before being passed to renderDialogActions_unstable.\n *\n * @param props - props from this instance of DialogActions\n * @param ref - reference to root HTMLElement of DialogActions\n */\nexport const useDialogActions_unstable = (\n props: DialogActionsProps,\n ref: React.Ref<HTMLElement>,\n): DialogActionsState => {\n const { position = 'end', fluid = false } = props;\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n position,\n fluid,\n };\n};\n"],"names":["useDialogActions_unstable","props","ref","position","fluid","components","root","slot","always","getIntrinsicElementProps","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;gCACwB;AAYxC,MAAMA,4BAA4B,CACvCC,OACAC;IAEA,MAAM,EAAEC,WAAW,KAAK,EAAEC,QAAQ,KAAK,EAAE,GAAGH;IAC5C,OAAO;QACLI,YAAY;YACVC,MAAM;QACR;QACAA,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FP,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAES,aAAa;QAAM;QAEvBP;QACAC;IACF;AACF"}
@@ -0,0 +1,104 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
dialogActionsClassNames: function() {
return dialogActionsClassNames;
},
useDialogActionsStyles_unstable: function() {
return useDialogActionsStyles_unstable;
}
});
const _react = require("@griffel/react");
const dialogActionsClassNames = {
root: 'fui-DialogActions'
};
/**
* Styles for the root slot
*/ const useResetStyles = /*#__PURE__*/ (0, _react.__resetStyles)("rhfpeu0", null, {
r: [
".rhfpeu0{gap:8px;height:fit-content;box-sizing:border-box;display:flex;grid-row-start:3;grid-row-end:3;}"
],
s: [
"@media screen and (max-width: 480px){.rhfpeu0{flex-direction:column;justify-self:stretch;}}"
]
});
const useStyles = /*#__PURE__*/ (0, _react.__styles)({
gridPositionEnd: {
Bdqf98w: "f1a7i8kp",
Br312pm: "fd46tj4",
Bw0ie65: "fsyjsko",
B6n781s: "f1f41i0t",
Bv5d0be: "f1jaqex3",
v4ugfu: "f2ao6jk"
},
gridPositionStart: {
Bdqf98w: "fsxvdwy",
Br312pm: "fwpfdsa",
Bw0ie65: "f1e2fz10",
Bojbm9c: "f11ihkml",
Bv5d0be: "fce5bvx",
v4ugfu: "f2ao6jk"
},
fluidStart: {
Bw0ie65: "fsyjsko"
},
fluidEnd: {
Br312pm: "fwpfdsa"
}
}, {
d: [
".f1a7i8kp{justify-self:end;}",
".fd46tj4{grid-column-start:2;}",
".fsyjsko{grid-column-end:4;}",
".fsxvdwy{justify-self:start;}",
".fwpfdsa{grid-column-start:1;}",
".f1e2fz10{grid-column-end:2;}"
],
m: [
[
"@media screen and (max-width: 480px){.f1f41i0t{grid-column-start:1;}}",
{
m: "screen and (max-width: 480px)"
}
],
[
"@media screen and (max-width: 480px){.f1jaqex3{grid-row-start:4;}}",
{
m: "screen and (max-width: 480px)"
}
],
[
"@media screen and (max-width: 480px){.f2ao6jk{grid-row-end:auto;}}",
{
m: "screen and (max-width: 480px)"
}
],
[
"@media screen and (max-width: 480px){.f11ihkml{grid-column-end:4;}}",
{
m: "screen and (max-width: 480px)"
}
],
[
"@media screen and (max-width: 480px){.fce5bvx{grid-row-start:3;}}",
{
m: "screen and (max-width: 480px)"
}
]
]
});
const useDialogActionsStyles_unstable = (state)=>{
'use no memo';
const resetStyles = useResetStyles();
const styles = useStyles();
state.root.className = (0, _react.mergeClasses)(dialogActionsClassNames.root, resetStyles, state.position === 'start' && styles.gridPositionStart, state.position === 'end' && styles.gridPositionEnd, state.fluid && state.position === 'start' && styles.fluidStart, state.fluid && state.position === 'end' && styles.fluidEnd, state.root.className);
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["useDialogActionsStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { DIALOG_GAP, MEDIA_QUERY_BREAKPOINT_SELECTOR } from '../../contexts/constants';\nexport const dialogActionsClassNames = {\n root: 'fui-DialogActions'\n};\n/**\n * Styles for the root slot\n */ const useResetStyles = makeResetStyles({\n gap: DIALOG_GAP,\n height: 'fit-content',\n boxSizing: 'border-box',\n display: 'flex',\n gridRowStart: 3,\n gridRowEnd: 3,\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n flexDirection: 'column',\n justifySelf: 'stretch'\n }\n});\nconst useStyles = makeStyles({\n gridPositionEnd: {\n justifySelf: 'end',\n gridColumnStart: 2,\n gridColumnEnd: 4,\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n gridColumnStart: 1,\n gridRowStart: 4,\n gridRowEnd: 'auto'\n }\n },\n gridPositionStart: {\n justifySelf: 'start',\n gridColumnStart: 1,\n gridColumnEnd: 2,\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n gridColumnEnd: 4,\n gridRowStart: 3,\n gridRowEnd: 'auto'\n }\n },\n fluidStart: {\n gridColumnEnd: 4\n },\n fluidEnd: {\n gridColumnStart: 1\n }\n});\n/**\n * Apply styling to the DialogActions slots based on the state\n */ export const useDialogActionsStyles_unstable = (state)=>{\n 'use no memo';\n const resetStyles = useResetStyles();\n const styles = useStyles();\n state.root.className = mergeClasses(dialogActionsClassNames.root, resetStyles, state.position === 'start' && styles.gridPositionStart, state.position === 'end' && styles.gridPositionEnd, state.fluid && state.position === 'start' && styles.fluidStart, state.fluid && state.position === 'end' && styles.fluidEnd, state.root.className);\n return state;\n};\n"],"names":["dialogActionsClassNames","useDialogActionsStyles_unstable","root","useResetStyles","__resetStyles","r","s","useStyles","__styles","gridPositionEnd","Bdqf98w","Br312pm","Bw0ie65","B6n781s","Bv5d0be","v4ugfu","gridPositionStart","Bojbm9c","fluidStart","fluidEnd","d","m","state","resetStyles","styles","className","mergeClasses","position","fluid"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,uBAAuB;eAAvBA;;IA+CIC,+BAA+B;eAA/BA;;;uBAjDyC;AAEnD,MAAMD,0BAA0B;IACnCE,MAAM;AACV;AACA;;CAEA,GAAI,MAAMC,iBAAc,WAAA,GAAGC,IAAAA,oBAAA,EAAA,WAAA,MAAA;IAAAC,GAAA;QAAA;KAAA;IAAAC,GAAA;QAAA;KAAA;AAAA;AAY3B,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAC,iBAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;IAAA;IAAAC,mBAAA;QAAAN,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAK,SAAA;QAAAH,SAAA;QAAAC,QAAA;IAAA;IAAAG,YAAA;QAAAN,SAAA;IAAA;IAAAO,UAAA;QAAAR,SAAA;IAAA;AAAA,GAAA;IAAAS,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;IAAAC,GAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA;YAAA;SAAA;KAAA;AAAA;AA8BP,MAAMpB,kCAAmCqB,CAAAA;IAChD;IACA,MAAMC,cAAcpB;IACpB,MAAMqB,SAASjB;IACfe,MAAMpB,IAAI,CAACuB,SAAS,GAAGC,IAAAA,mBAAY,EAAC1B,wBAAwBE,IAAI,EAAEqB,aAAaD,MAAMK,QAAQ,KAAK,WAAWH,OAAOR,iBAAiB,EAAEM,MAAMK,QAAQ,KAAK,SAASH,OAAOf,eAAe,EAAEa,MAAMM,KAAK,IAAIN,MAAMK,QAAQ,KAAK,WAAWH,OAAON,UAAU,EAAEI,MAAMM,KAAK,IAAIN,MAAMK,QAAQ,KAAK,SAASH,OAAOL,QAAQ,EAAEG,MAAMpB,IAAI,CAACuB,SAAS;IAC3U,OAAOH;AACX"}