@fluentui/react-dialog 9.5.1 → 9.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.json +90 -6
  2. package/CHANGELOG.md +34 -7
  3. package/dist/index.d.ts +5 -3
  4. package/lib/components/Dialog/renderDialog.js +3 -3
  5. package/lib/components/Dialog/renderDialog.js.map +1 -1
  6. package/lib/components/Dialog/useDialog.js +11 -1
  7. package/lib/components/Dialog/useDialog.js.map +1 -1
  8. package/lib/components/Dialog/useDialogContextValues.js +5 -1
  9. package/lib/components/Dialog/useDialogContextValues.js.map +1 -1
  10. package/lib/components/DialogActions/renderDialogActions.js +4 -4
  11. package/lib/components/DialogActions/renderDialogActions.js.map +1 -1
  12. package/lib/components/DialogBody/renderDialogBody.js +4 -4
  13. package/lib/components/DialogBody/renderDialogBody.js.map +1 -1
  14. package/lib/components/DialogContent/renderDialogContent.js +4 -4
  15. package/lib/components/DialogContent/renderDialogContent.js.map +1 -1
  16. package/lib/components/DialogSurface/renderDialogSurface.js +5 -5
  17. package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -1
  18. package/lib/components/DialogSurface/useDialogSurface.js +1 -8
  19. package/lib/components/DialogSurface/useDialogSurface.js.map +1 -1
  20. package/lib/components/DialogTitle/DialogTitle.types.js.map +1 -1
  21. package/lib/components/DialogTitle/renderDialogTitle.js +4 -4
  22. package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -1
  23. package/lib/components/DialogTitle/useDialogTitle.js +2 -2
  24. package/lib/components/DialogTitle/useDialogTitle.js.map +1 -1
  25. package/lib/components/DialogTitle/useDialogTitleStyles.js +6 -2
  26. package/lib/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
  27. package/lib/components/DialogTrigger/useDialogTrigger.js +1 -4
  28. package/lib/components/DialogTrigger/useDialogTrigger.js.map +1 -1
  29. package/lib/contexts/dialogContext.js.map +1 -1
  30. package/lib-commonjs/components/Dialog/renderDialog.js +4 -5
  31. package/lib-commonjs/components/Dialog/renderDialog.js.map +1 -1
  32. package/lib-commonjs/components/Dialog/useDialog.js +8 -1
  33. package/lib-commonjs/components/Dialog/useDialog.js.map +1 -1
  34. package/lib-commonjs/components/Dialog/useDialogContextValues.js +3 -1
  35. package/lib-commonjs/components/Dialog/useDialogContextValues.js.map +1 -1
  36. package/lib-commonjs/components/DialogActions/renderDialogActions.js +4 -5
  37. package/lib-commonjs/components/DialogActions/renderDialogActions.js.map +1 -1
  38. package/lib-commonjs/components/DialogBody/renderDialogBody.js +4 -5
  39. package/lib-commonjs/components/DialogBody/renderDialogBody.js.map +1 -1
  40. package/lib-commonjs/components/DialogContent/renderDialogContent.js +4 -5
  41. package/lib-commonjs/components/DialogContent/renderDialogContent.js.map +1 -1
  42. package/lib-commonjs/components/DialogSurface/renderDialogSurface.js +5 -6
  43. package/lib-commonjs/components/DialogSurface/renderDialogSurface.js.map +1 -1
  44. package/lib-commonjs/components/DialogSurface/useDialogSurface.js +1 -6
  45. package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -1
  46. package/lib-commonjs/components/DialogTitle/renderDialogTitle.js +4 -5
  47. package/lib-commonjs/components/DialogTitle/renderDialogTitle.js.map +1 -1
  48. package/lib-commonjs/components/DialogTitle/useDialogTitle.js +2 -2
  49. package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -1
  50. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js +15 -1
  51. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
  52. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js +1 -2
  53. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js.map +1 -1
  54. package/package.json +7 -6
@@ -18,7 +18,11 @@ const useStyles = /*#__PURE__*/__styles({
18
18
  Ijaq50: "faq1aip",
19
19
  Br312pm: "f1m489tg",
20
20
  nk6f5a: "fv2srd9",
21
- Bw0ie65: "f1tz6hh8"
21
+ Bw0ie65: "f1tz6hh8",
22
+ B6of3ja: "f1hu3pq6",
23
+ t21cq0: ["f11qmguv", "f1tyq0we"],
24
+ jrapky: "f19f4twv",
25
+ Frg6f3: ["f1tyq0we", "f11qmguv"]
22
26
  },
23
27
  rootWithoutCloseButton: {
24
28
  Ijaq50: "faq1aip",
@@ -33,7 +37,7 @@ const useStyles = /*#__PURE__*/__styles({
33
37
  Bw0ie65: "f98d4vj"
34
38
  }
35
39
  }, {
36
- d: [".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1pp30po{font-size:var(--fontSizeBase500);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f106mvju{line-height:var(--lineHeightBase500);}", ".faq1aip{grid-row-start:title;}", ".f1m489tg{grid-column-start:title;}", ".fv2srd9{grid-row-end:title;}", ".f1tz6hh8{grid-column-end:title;}", ".f11nczdl{grid-row-end:close-button;}", ".f98d4vj{grid-column-end:close-button;}", ".f1hysmiz{grid-row-start:close-button;}", ".f1379kmu{grid-column-start:close-button;}"]
40
+ d: [".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1pp30po{font-size:var(--fontSizeBase500);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f106mvju{line-height:var(--lineHeightBase500);}", ".faq1aip{grid-row-start:title;}", ".f1m489tg{grid-column-start:title;}", ".fv2srd9{grid-row-end:title;}", ".f1tz6hh8{grid-column-end:title;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".f11nczdl{grid-row-end:close-button;}", ".f98d4vj{grid-column-end:close-button;}", ".f1hysmiz{grid-row-start:close-button;}", ".f1379kmu{grid-column-start:close-button;}"]
37
41
  });
38
42
  /**
39
43
  * Styles to be applied on internal elements used by default action on non-modal Dialog
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","shorthands","typographyStyles","TITLE_ACTION_GRID_AREA","TITLE_GRID_AREA","createFocusOutlineStyle","dialogTitleClassNames","root","action","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","Ijaq50","Br312pm","nk6f5a","Bw0ie65","rootWithoutCloseButton","d","useDialogTitleInternalStyles","button","qhf8xq","B7ck84d","De3pzq","sj55zd","Bceei9c","B68tc82","Bmxbyg5","z8tnut","z189sj","Byoj8tv","uwmqm3","icvyot","vrafjx","oivjwe","wvpqe5","Bv0vk6g","fsow6f","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","Bf4ptjt","kclons","Bhdgwq3","Blkhhs4","Bqtpl0w","clg4pj","hgwjuy","Bonggc9","B1tsrr9","Dah5zi","Bkh64rk","qqdqy8","B6dhp37","i03rao","Boxcth7","Bsom6fd","J0r882","Bjwuhne","Ghsupd","Bule8hv","f","i","useDialogTitleStyles_unstable","state","styles","className"],"sources":["../../../src/components/DialogTitle/useDialogTitleStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogTitleSlots, DialogTitleState } from './DialogTitle.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { typographyStyles } from '@fluentui/react-theme';\nimport { TITLE_ACTION_GRID_AREA, TITLE_GRID_AREA } from '../../contexts/constants';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\n\nexport const dialogTitleClassNames: SlotClassNames<DialogTitleSlots> = {\n root: 'fui-DialogTitle',\n action: 'fui-DialogTitle__action',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n ...typographyStyles.subtitle1,\n ...shorthands.gridArea(TITLE_GRID_AREA),\n },\n rootWithoutCloseButton: {\n ...shorthands.gridArea(TITLE_GRID_AREA, TITLE_GRID_AREA, TITLE_ACTION_GRID_AREA, TITLE_ACTION_GRID_AREA),\n },\n action: {\n ...shorthands.gridArea(TITLE_ACTION_GRID_AREA),\n },\n});\n\n/**\n * Styles to be applied on internal elements used by default action on non-modal Dialog\n * @internal\n */\nexport const useDialogTitleInternalStyles = makeStyles({\n button: {\n position: 'relative',\n boxSizing: 'content-box',\n backgroundColor: 'inherit',\n color: 'inherit',\n fontFamily: 'inherit',\n fontSize: 'inherit',\n cursor: 'pointer',\n lineHeight: 0,\n ...shorthands.overflow('visible'),\n ...shorthands.padding(0),\n ...shorthands.borderStyle('none'),\n WebkitAppearance: 'button',\n textAlign: 'unset',\n ...createFocusOutlineStyle(),\n },\n});\n\n/**\n * Apply styling to the DialogTitle slots based on the state\n */\nexport const useDialogTitleStyles_unstable = (state: DialogTitleState): DialogTitleState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n dialogTitleClassNames.root,\n styles.root,\n !state.action && styles.rootWithoutCloseButton,\n state.root.className,\n );\n if (state.action) {\n state.action.className = mergeClasses(dialogTitleClassNames.action, styles.action, state.action.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AAGrD,SAASC,gBAAgB,QAAQ;AACjC,SAASC,sBAAsB,EAAEC,eAAe,QAAQ;AACxD,SAASC,uBAAuB,QAAQ;AAExC,OAAO,MAAMC,qBAAA,GAA0D;EACrEC,IAAA,EAAM;EACNC,MAAA,EAAQ;AACV;AAEA;;;AAGA,MAAMC,SAAA,gBAAYV,QAAA;EAAAQ,IAAA;IAAAG,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,sBAAA;IAAAJ,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAT,MAAA;IAAAM,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAE,CAAA;AAAA,EAWlB;AAEA;;;;AAIA,OAAO,MAAMC,4BAAA,gBAA+BrB,QAAA;EAAAsB,MAAA;IAAAC,MAAA;IAAA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,OAAOF,KAAA;AACT"}
1
+ {"version":3,"names":["__styles","mergeClasses","shorthands","typographyStyles","TITLE_ACTION_GRID_AREA","TITLE_GRID_AREA","createFocusOutlineStyle","dialogTitleClassNames","root","action","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","Ijaq50","Br312pm","nk6f5a","Bw0ie65","B6of3ja","t21cq0","jrapky","Frg6f3","rootWithoutCloseButton","d","useDialogTitleInternalStyles","button","qhf8xq","B7ck84d","De3pzq","sj55zd","Bceei9c","B68tc82","Bmxbyg5","z8tnut","z189sj","Byoj8tv","uwmqm3","icvyot","vrafjx","oivjwe","wvpqe5","Bv0vk6g","fsow6f","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","Bf4ptjt","kclons","Bhdgwq3","Blkhhs4","Bqtpl0w","clg4pj","hgwjuy","Bonggc9","B1tsrr9","Dah5zi","Bkh64rk","qqdqy8","B6dhp37","i03rao","Boxcth7","Bsom6fd","J0r882","Bjwuhne","Ghsupd","Bule8hv","f","i","useDialogTitleStyles_unstable","state","styles","className"],"sources":["../../../src/components/DialogTitle/useDialogTitleStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogTitleSlots, DialogTitleState } from './DialogTitle.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { typographyStyles } from '@fluentui/react-theme';\nimport { TITLE_ACTION_GRID_AREA, TITLE_GRID_AREA } from '../../contexts/constants';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\n\nexport const dialogTitleClassNames: SlotClassNames<DialogTitleSlots> = {\n root: 'fui-DialogTitle',\n action: 'fui-DialogTitle__action',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n ...typographyStyles.subtitle1,\n ...shorthands.gridArea(TITLE_GRID_AREA),\n ...shorthands.margin(0),\n },\n rootWithoutCloseButton: {\n ...shorthands.gridArea(TITLE_GRID_AREA, TITLE_GRID_AREA, TITLE_ACTION_GRID_AREA, TITLE_ACTION_GRID_AREA),\n },\n action: {\n ...shorthands.gridArea(TITLE_ACTION_GRID_AREA),\n },\n});\n\n/**\n * Styles to be applied on internal elements used by default action on non-modal Dialog\n * @internal\n */\nexport const useDialogTitleInternalStyles = makeStyles({\n button: {\n position: 'relative',\n boxSizing: 'content-box',\n backgroundColor: 'inherit',\n color: 'inherit',\n fontFamily: 'inherit',\n fontSize: 'inherit',\n cursor: 'pointer',\n lineHeight: 0,\n ...shorthands.overflow('visible'),\n ...shorthands.padding(0),\n ...shorthands.borderStyle('none'),\n WebkitAppearance: 'button',\n textAlign: 'unset',\n ...createFocusOutlineStyle(),\n },\n});\n\n/**\n * Apply styling to the DialogTitle slots based on the state\n */\nexport const useDialogTitleStyles_unstable = (state: DialogTitleState): DialogTitleState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n dialogTitleClassNames.root,\n styles.root,\n !state.action && styles.rootWithoutCloseButton,\n state.root.className,\n );\n if (state.action) {\n state.action.className = mergeClasses(dialogTitleClassNames.action, styles.action, state.action.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AAGrD,SAASC,gBAAgB,QAAQ;AACjC,SAASC,sBAAsB,EAAEC,eAAe,QAAQ;AACxD,SAASC,uBAAuB,QAAQ;AAExC,OAAO,MAAMC,qBAAA,GAA0D;EACrEC,IAAA,EAAM;EACNC,MAAA,EAAQ;AACV;AAEA;;;AAGA,MAAMC,SAAA,gBAAYV,QAAA;EAAAQ,IAAA;IAAAG,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,sBAAA;IAAAR,MAAA;IAAAC,OAAA;IAAAC,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AACuE,SAAS;EAEtB,IAAIF,KAAA,CAAMpE,MAAM,EAAE;IAChBoE,KAAA,CAAMpE,MAAM,CAACsE,SAAS,GAAG9E,YAAA,CAAaM,qBAAA,CAAsBE,MAAM,EAAEqE,MAAA,CAAOrE,MAAM,EAAEoE,KAAA,CAAMpE,MAAM,CAACsE,SAAS;EAC3G;EACA,OAAOF,KAAA;AACT"}
@@ -1,5 +1,4 @@
1
1
  import * as React from 'react';
2
- import { useModalAttributes } from '@fluentui/react-tabster';
3
2
  import { applyTriggerPropsToChildren, getTriggerChild, useEventCallback } from '@fluentui/react-utilities';
4
3
  import { useDialogContext_unstable, useDialogSurfaceContext_unstable } from '../../contexts';
5
4
  import { useARIAButtonProps } from '@fluentui/react-aria';
@@ -18,9 +17,7 @@ export const useDialogTrigger_unstable = props => {
18
17
  } = props;
19
18
  const child = getTriggerChild(children);
20
19
  const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);
21
- const {
22
- triggerAttributes
23
- } = useModalAttributes();
20
+ const triggerAttributes = useDialogContext_unstable(ctx => ctx.triggerAttributes);
24
21
  const handleClick = useEventCallback(event => {
25
22
  var _child_props, _child_props_onClick;
26
23
  (_child_props_onClick = (_child_props = child === null || child === void 0 ? void 0 : child.props).onClick) === null || _child_props_onClick === void 0 ? void 0 : _child_props_onClick.call(_child_props, event);
@@ -1 +1 @@
1
- {"version":3,"names":["React","useModalAttributes","applyTriggerPropsToChildren","getTriggerChild","useEventCallback","useDialogContext_unstable","useDialogSurfaceContext_unstable","useARIAButtonProps","useDialogTrigger_unstable","props","isInsideSurfaceDialog","children","disableButtonEnhancement","action","child","requestOpenChange","ctx","triggerAttributes","handleClick","event","_child_props","_child_props_onClick","onClick","call","isDefaultPrevented","type","open","triggerChildProps","ref","ariaButtonTriggerChildProps"],"sources":["../../../src/components/DialogTrigger/useDialogTrigger.ts"],"sourcesContent":["import * as React from 'react';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { applyTriggerPropsToChildren, getTriggerChild, useEventCallback } from '@fluentui/react-utilities';\nimport type { DialogTriggerProps, DialogTriggerState } from './DialogTrigger.types';\nimport { useDialogContext_unstable, useDialogSurfaceContext_unstable } from '../../contexts';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\n\n/**\n * Create the state required to render DialogTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup Dialog\n *\n * @param props - props from this instance of DialogTrigger\n */\nexport const useDialogTrigger_unstable = (props: DialogTriggerProps): DialogTriggerState => {\n const isInsideSurfaceDialog = useDialogSurfaceContext_unstable();\n\n const { children, disableButtonEnhancement = false, action = isInsideSurfaceDialog ? 'close' : 'open' } = props;\n\n const child = getTriggerChild(children);\n\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n\n const { triggerAttributes } = useModalAttributes();\n\n const handleClick = useEventCallback(\n (event: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n child?.props.onClick?.(event);\n if (!event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n type: 'triggerClick',\n open: action === 'open',\n });\n }\n },\n );\n\n const triggerChildProps = {\n ...child?.props,\n ref: child?.ref,\n onClick: handleClick,\n ...triggerAttributes,\n } as const;\n\n const ariaButtonTriggerChildProps = useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n {\n ...triggerChildProps,\n type: 'button',\n },\n );\n\n return {\n children: applyTriggerPropsToChildren(\n children,\n disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps,\n ),\n };\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,kBAAkB,QAAQ;AACnC,SAASC,2BAA2B,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ;AAE/E,SAASC,yBAAyB,EAAEC,gCAAgC,QAAQ;AAC5E,SAASC,kBAAkB,QAAQ;AAEnC;;;;;;AAMA,OAAO,MAAMC,yBAAA,GAA6BC,KAAA,IAAkD;EAC1F,MAAMC,qBAAA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AAA,GAA2Be,iBAAA,GAAoBE,2BAA2B;EAE9E;AACF"}
1
+ {"version":3,"names":["React","applyTriggerPropsToChildren","getTriggerChild","useEventCallback","useDialogContext_unstable","useDialogSurfaceContext_unstable","useARIAButtonProps","useDialogTrigger_unstable","props","isInsideSurfaceDialog","children","disableButtonEnhancement","action","child","requestOpenChange","ctx","triggerAttributes","handleClick","event","_child_props","_child_props_onClick","onClick","call","isDefaultPrevented","type","open","triggerChildProps","ref","ariaButtonTriggerChildProps"],"sources":["../../../src/components/DialogTrigger/useDialogTrigger.ts"],"sourcesContent":["import * as React from 'react';\nimport { applyTriggerPropsToChildren, getTriggerChild, useEventCallback } from '@fluentui/react-utilities';\nimport type { DialogTriggerProps, DialogTriggerState } from './DialogTrigger.types';\nimport { useDialogContext_unstable, useDialogSurfaceContext_unstable } from '../../contexts';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\n\n/**\n * Create the state required to render DialogTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup Dialog\n *\n * @param props - props from this instance of DialogTrigger\n */\nexport const useDialogTrigger_unstable = (props: DialogTriggerProps): DialogTriggerState => {\n const isInsideSurfaceDialog = useDialogSurfaceContext_unstable();\n\n const { children, disableButtonEnhancement = false, action = isInsideSurfaceDialog ? 'close' : 'open' } = props;\n\n const child = getTriggerChild(children);\n\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const triggerAttributes = useDialogContext_unstable(ctx => ctx.triggerAttributes);\n\n const handleClick = useEventCallback(\n (event: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n child?.props.onClick?.(event);\n if (!event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n type: 'triggerClick',\n open: action === 'open',\n });\n }\n },\n );\n\n const triggerChildProps = {\n ...child?.props,\n ref: child?.ref,\n onClick: handleClick,\n ...triggerAttributes,\n } as const;\n\n const ariaButtonTriggerChildProps = useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n {\n ...triggerChildProps,\n type: 'button',\n },\n );\n\n return {\n children: applyTriggerPropsToChildren(\n children,\n disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps,\n ),\n };\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,2BAA2B,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ;AAE/E,SAASC,yBAAyB,EAAEC,gCAAgC,QAAQ;AAC5E,SAASC,kBAAkB,QAAQ;AAEnC;;;;;;AAMA,OAAO,MAAMC,yBAAA,GAA6BC,KAAA,IAAkD;EAC1F,MAAMC,qBAAA,GAAwBJ,gCAAA;EAE9B,MAAM;IAAEK,QAAA;IAAUC,wBAAA,GAA2B,KAAK;IAAEC,MAAA,GAASH,qBAAA,GAAwB,UAAU;EAAM,CAAE,GAAGD,KAAA;EAE1G,MAAMK,KAAA,GAAQX,eAAA,CAAgBQ,QAAA;EAE9B,MAAMI,iBAAA,GAAoBV,yBAAA,CAA0BW,GAAA,IAAOA,GAAA,CAAID,iBAAiB;EAChF,MAAME,iBAAA,GAAoBZ,yBAAA,CAA0BW,GAAA,IAAOA,GAAA,CAAIC,iBAAiB;EAEhF,MAAMC,WAAA,GAAcd,gBAAA,CACjBe,KAAA,IAAoF;QACnFC,YAAA,EAAAC,oBAAA;IAAA,CAAAA,oBAAA,IAAAD,YAAA,GAAAN,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOL,KAAK,EAACa,OAAO,cAApBD,oBAAA,uBAAAA,oBAAA,CAAAE,IAAA,CAAAH,YAAA,EAAuBD,KAAA;IACvB,IAAI,CAACA,KAAA,CAAMK,kBAAkB,IAAI;MAC/BT,iBAAA,CAAkB;QAChBI,KAAA;QACAM,IAAA,EAAM;QACNC,IAAA,EAAMb,MAAA,KAAW;MACnB;IACF;EACF;EAGF,MAAMc,iBAAA,GAAoB;IACxB,IAAGb,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOL,KAAK;IACfmB,GAAA,EAAKd,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOc,GAAG;IACfN,OAAA,EAASJ,WAAA;IACT,GAAGD;EACL;EAEA,MAAMY,2BAAA,GAA8BtB,kBAAA,CAClC,CAAAO,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOW,IAAI,MAAK,YAAY,CAAAX,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOW,IAAI,MAAK,MAAMX,KAAA,CAAMW,IAAI,GAAG,KAAK,EACpE;IACE,GAAGE,iBAAiB;IACpBF,IAAA,EAAM;EACR;EAGF,OAAO;IACLd,QAAA,EAAUT,2BAAA,CACRS,QAAA,EACAC,wBAAA,GAA2Be,iBAAA,GAAoBE,2BAA2B;EAE9E;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","createContext","useContextSelector","defaultContextValue","open","inertTrapFocus","modalType","isNestedDialog","dialogRef","current","requestOpenChange","DialogContext","undefined","DialogProvider","Provider","useDialogContext_unstable","selector","ctx"],"sources":["../../src/contexts/dialogContext.ts"],"sourcesContent":["import * as React from 'react';\nimport { createContext, ContextSelector, useContextSelector } from '@fluentui/react-context-selector';\nimport { DialogSurfaceElement } from '../DialogSurface';\nimport type { Context } from '@fluentui/react-context-selector';\nimport type { DialogModalType, DialogOpenChangeData } from '../Dialog';\n\nexport type DialogContextValue = {\n open: boolean;\n inertTrapFocus: boolean;\n dialogTitleId?: string;\n isNestedDialog: boolean;\n dialogRef: React.Ref<DialogSurfaceElement>;\n modalType: DialogModalType;\n /**\n * Requests dialog main component to update it's internal open state\n */\n requestOpenChange: (data: DialogOpenChangeData) => void;\n};\n\nconst defaultContextValue: DialogContextValue = {\n open: false,\n inertTrapFocus: false,\n modalType: 'modal',\n isNestedDialog: false,\n dialogRef: { current: null },\n requestOpenChange() {\n /* noop */\n },\n};\n\n// Contexts should default to undefined\nexport const DialogContext: Context<DialogContextValue | undefined> = createContext<DialogContextValue | undefined>(\n undefined,\n);\n\nexport const DialogProvider = DialogContext.Provider;\nexport const useDialogContext_unstable = <T>(selector: ContextSelector<DialogContextValue, T>): T =>\n useContextSelector(DialogContext, (ctx = defaultContextValue) => selector(ctx));\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,aAAa,EAAmBC,kBAAkB,QAAQ;AAkBnE,MAAMC,mBAAA,GAA0C;EAC9CC,IAAA,EAAM,KAAK;EACXC,cAAA,EAAgB,KAAK;EACrBC,SAAA,EAAW;EACXC,cAAA,EAAgB,KAAK;EACrBC,SAAA,EAAW;IAAEC,OAAA,EAAS;EAAK;EAC3BC,kBAAA,EAAoB;IAClB;AAEJ;AAEA;AACA,OAAO,MAAMC,aAAA,gBAAyDV,aAAA,CACpEW,SAAA;AAGF,OAAO,MAAMC,cAAA,GAAiBF,aAAA,CAAcG,QAAQ;AACpD,OAAO,MAAMC,yBAAA,GAAgCC,QAAA,IAC3Cd,kBAAA,CAAmBS,aAAA,EAAe,CAACM,GAAA,GAAMd,mBAAmB,KAAKa,QAAA,CAASC,GAAA"}
1
+ {"version":3,"names":["React","createContext","useContextSelector","defaultContextValue","open","inertTrapFocus","modalType","isNestedDialog","dialogRef","current","requestOpenChange","DialogContext","undefined","DialogProvider","Provider","useDialogContext_unstable","selector","ctx"],"sources":["../../src/contexts/dialogContext.ts"],"sourcesContent":["import * as React from 'react';\nimport { createContext, ContextSelector, useContextSelector } from '@fluentui/react-context-selector';\nimport { DialogSurfaceElement } from '../DialogSurface';\nimport type { Context } from '@fluentui/react-context-selector';\nimport type { DialogModalType, DialogOpenChangeData } from '../Dialog';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n\nexport type DialogContextValue = {\n open: boolean;\n inertTrapFocus: boolean;\n dialogTitleId?: string;\n isNestedDialog: boolean;\n dialogRef: React.Ref<DialogSurfaceElement>;\n modalType: DialogModalType;\n /**\n * Requests dialog main component to update it's internal open state\n */\n requestOpenChange: (data: DialogOpenChangeData) => void;\n} & Partial<ReturnType<typeof useModalAttributes>>;\n\nconst defaultContextValue: DialogContextValue = {\n open: false,\n inertTrapFocus: false,\n modalType: 'modal',\n isNestedDialog: false,\n dialogRef: { current: null },\n requestOpenChange() {\n /* noop */\n },\n};\n\n// Contexts should default to undefined\nexport const DialogContext: Context<DialogContextValue | undefined> = createContext<DialogContextValue | undefined>(\n undefined,\n);\n\nexport const DialogProvider = DialogContext.Provider;\nexport const useDialogContext_unstable = <T>(selector: ContextSelector<DialogContextValue, T>): T =>\n useContextSelector(DialogContext, (ctx = defaultContextValue) => selector(ctx));\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,aAAa,EAAmBC,kBAAkB,QAAQ;AAmBnE,MAAMC,mBAAA,GAA0C;EAC9CC,IAAA,EAAM,KAAK;EACXC,cAAA,EAAgB,KAAK;EACrBC,SAAA,EAAW;EACXC,cAAA,EAAgB,KAAK;EACrBC,SAAA,EAAW;IAAEC,OAAA,EAAS;EAAK;EAC3BC,kBAAA,EAAoB;IAClB;AAEJ;AAEA;AACA,OAAO,MAAMC,aAAA,gBAAyDV,aAAA,CACpEW,SAAA;AAGF,OAAO,MAAMC,cAAA,GAAiBF,aAAA,CAAcG,QAAQ;AACpD,OAAO,MAAMC,yBAAA,GAAgCC,QAAA,IAC3Cd,kBAAA,CAAmBS,aAAA,EAAe,CAACM,GAAA,GAAMd,mBAAmB,KAAKa,QAAA,CAASC,GAAA"}
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ /** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
@@ -6,14 +6,13 @@ Object.defineProperty(exports, "renderDialog_unstable", {
6
6
  enumerable: true,
7
7
  get: ()=>renderDialog_unstable
8
8
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
9
+ const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
11
10
  const _contexts = require("../../contexts");
12
11
  const renderDialog_unstable = (state, contextValues)=>{
13
12
  const { content , trigger } = state;
14
- return /*#__PURE__*/ _react.createElement(_contexts.DialogProvider, {
13
+ return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_contexts.DialogProvider, {
15
14
  value: contextValues.dialog
16
- }, /*#__PURE__*/ _react.createElement(_contexts.DialogSurfaceProvider, {
15
+ }, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_contexts.DialogSurfaceProvider, {
17
16
  value: contextValues.dialogSurface
18
17
  }, trigger, content));
19
18
  }; //# sourceMappingURL=renderDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Dialog/renderDialog.js"],"sourcesContent":["import * as React from 'react';\nimport { DialogProvider, DialogSurfaceProvider } from '../../contexts';\n/**\n * Render the final JSX of Dialog\n */\nexport const renderDialog_unstable = (state, contextValues) => {\n const {\n content,\n trigger\n } = state;\n return /*#__PURE__*/React.createElement(DialogProvider, {\n value: contextValues.dialog\n }, /*#__PURE__*/React.createElement(DialogSurfaceProvider, {\n value: contextValues.dialogSurface\n }, trigger, content));\n};\n//# sourceMappingURL=renderDialog.js.map"],"names":["renderDialog_unstable","state","contextValues","content","trigger","React","createElement","DialogProvider","value","dialog","DialogSurfaceProvider","dialogSurface"],"mappings":";;;;+BAKaA;;aAAAA;;;6DALU;0BAC+B;AAI/C,MAAMA,wBAAwB,CAACC,OAAOC,gBAAkB;IAC7D,MAAM,EACJC,QAAO,EACPC,QAAO,EACR,GAAGH;IACJ,OAAO,WAAW,GAAEI,OAAMC,aAAa,CAACC,wBAAc,EAAE;QACtDC,OAAON,cAAcO,MAAM;IAC7B,GAAG,WAAW,GAAEJ,OAAMC,aAAa,CAACI,+BAAqB,EAAE;QACzDF,OAAON,cAAcS,aAAa;IACpC,GAAGP,SAASD;AACd,GACA,wCAAwC"}
1
+ {"version":3,"sources":["../../../lib/components/Dialog/renderDialog.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { DialogProvider, DialogSurfaceProvider } from '../../contexts';\n/**\n * Render the final JSX of Dialog\n */\nexport const renderDialog_unstable = (state, contextValues) => {\n const {\n content,\n trigger\n } = state;\n return /*#__PURE__*/createElement(DialogProvider, {\n value: contextValues.dialog\n }, /*#__PURE__*/createElement(DialogSurfaceProvider, {\n value: contextValues.dialogSurface\n }, trigger, content));\n};\n//# sourceMappingURL=renderDialog.js.map"],"names":["renderDialog_unstable","state","contextValues","content","trigger","createElement","DialogProvider","value","dialog","DialogSurfaceProvider","dialogSurface"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKrCA;;aAAAA;;iCALqE;0BAC5B;AAI/C,MAAMA,wBAAwB,CAACC,OAAOC,gBAAkB;IAC7D,MAAM,EACJC,QAAO,EACPC,QAAO,EACR,GAAGH;IACJ,OAAO,WAAW,GAAEI,IAAAA,8BAAa,EAACC,wBAAc,EAAE;QAChDC,OAAOL,cAAcM,MAAM;IAC7B,GAAG,WAAW,GAAEH,IAAAA,8BAAa,EAACI,+BAAqB,EAAE;QACnDF,OAAOL,cAAcQ,aAAa;IACpC,GAAGN,SAASD;AACd,GACA,wCAAwC"}
@@ -12,6 +12,7 @@ const _reactUtilities = require("@fluentui/react-utilities");
12
12
  const _reactContextSelector = require("@fluentui/react-context-selector");
13
13
  const _utils = require("../../utils");
14
14
  const _contexts = require("../../contexts");
15
+ const _reactTabster = require("@fluentui/react-tabster");
15
16
  const useDialog_unstable = (props)=>{
16
17
  const { children , modalType ='modal' , onOpenChange , inertTrapFocus =false } = props;
17
18
  const [trigger, content] = childrenToTriggerAndContent(children);
@@ -39,6 +40,10 @@ const useDialog_unstable = (props)=>{
39
40
  disableBodyScroll,
40
41
  isBodyScrollLocked
41
42
  ]);
43
+ const { modalAttributes , triggerAttributes } = (0, _reactTabster.useModalAttributes)({
44
+ trapFocus: modalType !== 'non-modal',
45
+ legacyTrapFocus: !inertTrapFocus
46
+ });
42
47
  return {
43
48
  components: {
44
49
  backdrop: 'div'
@@ -51,7 +56,9 @@ const useDialog_unstable = (props)=>{
51
56
  requestOpenChange,
52
57
  dialogTitleId: (0, _reactUtilities.useId)('dialog-title-'),
53
58
  isNestedDialog: (0, _reactContextSelector.useHasParentContext)(_contexts.DialogContext),
54
- dialogRef: focusRef
59
+ dialogRef: focusRef,
60
+ modalAttributes: modalType !== 'non-modal' ? modalAttributes : undefined,
61
+ triggerAttributes
55
62
  };
56
63
  };
57
64
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Dialog/useDialog.js"],"sourcesContent":["import * as React from 'react';\nimport { useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useDisableBodyScroll, useFocusFirstElement } from '../../utils';\nimport { DialogContext } from '../../contexts';\n/**\n * Create the state required to render Dialog.\n *\n * The returned state can be modified with hooks such as useDialogStyles_unstable,\n * before being passed to renderDialog_unstable.\n *\n * @param props - props from this instance of Dialog\n */\nexport const useDialog_unstable = props => {\n const {\n children,\n modalType = 'modal',\n onOpenChange,\n inertTrapFocus = false\n } = props;\n const [trigger, content] = childrenToTriggerAndContent(children);\n const [open, setOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false\n });\n const requestOpenChange = useEventCallback(data => {\n onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(data.event, data);\n // if user prevents default then do not change state value\n // otherwise updates state value and trigger reference to the element that caused the opening\n if (!data.event.isDefaultPrevented()) {\n setOpen(data.open);\n }\n });\n const focusRef = useFocusFirstElement(open, modalType);\n const disableBodyScroll = useDisableBodyScroll();\n const isBodyScrollLocked = Boolean(open && modalType !== 'non-modal');\n useIsomorphicLayoutEffect(() => {\n if (isBodyScrollLocked) {\n return disableBodyScroll();\n }\n }, [disableBodyScroll, isBodyScrollLocked]);\n return {\n components: {\n backdrop: 'div'\n },\n inertTrapFocus,\n open,\n modalType,\n content: open ? content : null,\n trigger,\n requestOpenChange,\n dialogTitleId: useId('dialog-title-'),\n isNestedDialog: useHasParentContext(DialogContext),\n dialogRef: focusRef\n };\n};\n/**\n * Extracts trigger and content from children\n */\nfunction childrenToTriggerAndContent(children) {\n const childrenArray = React.Children.toArray(children);\n if (process.env.NODE_ENV !== 'production') {\n if (childrenArray.length !== 1 && childrenArray.length !== 2) {\n // eslint-disable-next-line no-console\n console.warn('Dialog must contain at least one child <DialogSurface/>,\\n' + 'and at most two children <DialogTrigger/> <DialogSurface/> (in this order)');\n }\n }\n switch (childrenArray.length) {\n // case where there's a trigger followed by content\n case 2:\n return childrenArray;\n // case where there's only content\n case 1:\n return [undefined, childrenArray[0]];\n // unknown case\n default:\n return [undefined, undefined];\n }\n}\n//# sourceMappingURL=useDialog.js.map"],"names":["useDialog_unstable","props","children","modalType","onOpenChange","inertTrapFocus","trigger","content","childrenToTriggerAndContent","open","setOpen","useControllableState","state","defaultState","defaultOpen","initialState","requestOpenChange","useEventCallback","data","event","isDefaultPrevented","focusRef","useFocusFirstElement","disableBodyScroll","useDisableBodyScroll","isBodyScrollLocked","Boolean","useIsomorphicLayoutEffect","components","backdrop","dialogTitleId","useId","isNestedDialog","useHasParentContext","DialogContext","dialogRef","childrenArray","React","Children","toArray","process","env","NODE_ENV","length","console","warn","undefined"],"mappings":";;;;+BAaaA;;aAAAA;;;6DAbU;gCACkE;sCACrD;uBACuB;0BAC7B;AASvB,MAAMA,qBAAqBC,CAAAA,QAAS;IACzC,MAAM,EACJC,SAAQ,EACRC,WAAY,QAAO,EACnBC,aAAY,EACZC,gBAAiB,KAAK,CAAA,EACvB,GAAGJ;IACJ,MAAM,CAACK,SAASC,QAAQ,GAAGC,4BAA4BN;IACvD,MAAM,CAACO,MAAMC,QAAQ,GAAGC,IAAAA,oCAAoB,EAAC;QAC3CC,OAAOX,MAAMQ,IAAI;QACjBI,cAAcZ,MAAMa,WAAW;QAC/BC,cAAc,KAAK;IACrB;IACA,MAA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F,EACA,qCAAqC"}
1
+ {"version":3,"sources":["../../../lib/components/Dialog/useDialog.js"],"sourcesContent":["import * as React from 'react';\nimport { useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useDisableBodyScroll, useFocusFirstElement } from '../../utils';\nimport { DialogContext } from '../../contexts';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n/**\n * Create the state required to render Dialog.\n *\n * The returned state can be modified with hooks such as useDialogStyles_unstable,\n * before being passed to renderDialog_unstable.\n *\n * @param props - props from this instance of Dialog\n */\nexport const useDialog_unstable = props => {\n const {\n children,\n modalType = 'modal',\n onOpenChange,\n inertTrapFocus = false\n } = props;\n const [trigger, content] = childrenToTriggerAndContent(children);\n const [open, setOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false\n });\n const requestOpenChange = useEventCallback(data => {\n onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(data.event, data);\n // if user prevents default then do not change state value\n // otherwise updates state value and trigger reference to the element that caused the opening\n if (!data.event.isDefaultPrevented()) {\n setOpen(data.open);\n }\n });\n const focusRef = useFocusFirstElement(open, modalType);\n const disableBodyScroll = useDisableBodyScroll();\n const isBodyScrollLocked = Boolean(open && modalType !== 'non-modal');\n useIsomorphicLayoutEffect(() => {\n if (isBodyScrollLocked) {\n return disableBodyScroll();\n }\n }, [disableBodyScroll, isBodyScrollLocked]);\n const {\n modalAttributes,\n triggerAttributes\n } = useModalAttributes({\n trapFocus: modalType !== 'non-modal',\n legacyTrapFocus: !inertTrapFocus\n });\n return {\n components: {\n backdrop: 'div'\n },\n inertTrapFocus,\n open,\n modalType,\n content: open ? content : null,\n trigger,\n requestOpenChange,\n dialogTitleId: useId('dialog-title-'),\n isNestedDialog: useHasParentContext(DialogContext),\n dialogRef: focusRef,\n modalAttributes: modalType !== 'non-modal' ? modalAttributes : undefined,\n triggerAttributes\n };\n};\n/**\n * Extracts trigger and content from children\n */\nfunction childrenToTriggerAndContent(children) {\n const childrenArray = React.Children.toArray(children);\n if (process.env.NODE_ENV !== 'production') {\n if (childrenArray.length !== 1 && childrenArray.length !== 2) {\n // eslint-disable-next-line no-console\n console.warn('Dialog must contain at least one child <DialogSurface/>,\\n' + 'and at most two children <DialogTrigger/> <DialogSurface/> (in this order)');\n }\n }\n switch (childrenArray.length) {\n // case where there's a trigger followed by content\n case 2:\n return childrenArray;\n // case where there's only content\n case 1:\n return [undefined, childrenArray[0]];\n // unknown case\n default:\n return [undefined, undefined];\n }\n}\n//# sourceMappingURL=useDialog.js.map"],"names":["useDialog_unstable","props","children","modalType","onOpenChange","inertTrapFocus","trigger","content","childrenToTriggerAndContent","open","setOpen","useControllableState","state","defaultState","defaultOpen","initialState","requestOpenChange","useEventCallback","data","event","isDefaultPrevented","focusRef","useFocusFirstElement","disableBodyScroll","useDisableBodyScroll","isBodyScrollLocked","Boolean","useIsomorphicLayoutEffect","modalAttributes","triggerAttributes","useModalAttributes","trapFocus","legacyTrapFocus","components","backdrop","dialogTitleId","useId","isNestedDialog","useHasParentContext","DialogContext","dialogRef","undefined","childrenArray","React","Children","toArray","process","env","NODE_ENV","length","console","warn"],"mappings":";;;;+BAcaA;;aAAAA;;;6DAdU;gCACkE;sCACrD;uBACuB;0BAC7B;8BACK;AAS5B,MAAMA,qBAAqBC,CAAAA,QAAS;IACzC,MAAM,EACJC,SAAQ,EACRC,WAAY,QAAO,EACnBC,aAAY,EACZC,gBAAiB,KAAK,CAAA,EACvB,GAAGJ;IACJ,MAAM,CAACK,SAASC,QAAQ,GAAGC,4BAA4BN;IACvD,MAAM,CAACO,MAAMC,QAAQ,GAAGC,IAAAA,oCAAoB,EAAC;QAC3CC,OAAOX,MAAMQ,IAAI;QACjBI,cAAcZ,MAAMa,WAAW;QAC/BC,cAAc,KAAK;IACrB;IACA,MAAMC,oBAAoBC,IAAAA,gCAAgB,EAACC,CAAAA,OAAQ;QACjDd,iBAAiB,IAA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AClC,KAAK;YACH,OAAO;gBAACD;gBAAWC,aAAa,CAAC,EAAE;aAAC;QACtC,eAAe;QACf;YACE,OAAO;gBAACD;gBAAWA;aAAU;IACjC;AACF,EACA,qCAAqC"}
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "useDialogContextValues_unstable", {
7
7
  get: ()=>useDialogContextValues_unstable
8
8
  });
9
9
  function useDialogContextValues_unstable(state) {
10
- const { modalType , open , dialogRef , dialogTitleId , isNestedDialog , inertTrapFocus , requestOpenChange } = state;
10
+ const { modalType , open , dialogRef , dialogTitleId , isNestedDialog , inertTrapFocus , requestOpenChange , modalAttributes , triggerAttributes } = state;
11
11
  /**
12
12
  * This context is created with "@fluentui/react-context-selector",
13
13
  * there is no sense to memoize it
@@ -18,6 +18,8 @@ function useDialogContextValues_unstable(state) {
18
18
  dialogTitleId,
19
19
  isNestedDialog,
20
20
  inertTrapFocus,
21
+ modalAttributes,
22
+ triggerAttributes,
21
23
  requestOpenChange
22
24
  };
23
25
  const dialogSurface = false;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Dialog/useDialogContextValues.js"],"sourcesContent":["export function useDialogContextValues_unstable(state) {\n const {\n modalType,\n open,\n dialogRef,\n dialogTitleId,\n isNestedDialog,\n inertTrapFocus,\n requestOpenChange\n } = state;\n /**\n * This context is created with \"@fluentui/react-context-selector\",\n * there is no sense to memoize it\n */\n const dialog = {\n open,\n modalType,\n dialogRef,\n dialogTitleId,\n isNestedDialog,\n inertTrapFocus,\n requestOpenChange\n };\n const dialogSurface = false;\n return {\n dialog,\n dialogSurface\n };\n}\n//# sourceMappingURL=useDialogContextValues.js.map"],"names":["useDialogContextValues_unstable","state","modalType","open","dialogRef","dialogTitleId","isNestedDialog","inertTrapFocus","requestOpenChange","dialog","dialogSurface"],"mappings":";;;;+BAAgBA;;aAAAA;;AAAT,SAASA,gCAAgCC,KAAK,EAAE;IACrD,MAAM,EACJC,UAAS,EACTC,KAAI,EACJC,UAAS,EACTC,cAAa,EACbC,eAAc,EACdC,eAAc,EACdC,kBAAiB,EAClB,GAAGP;IACJ;;;EAGA,GACA,MAAMQ,SAAS;QACbN;QACAD;QACAE;QACAC;QACAC;QACAC;QACAC;IACF;IACA,MAAME,gBAAgB,KAAK;IAC3B,OAAO;QACLD;QACAC;IACF;AACF,EACA,kDAAkD"}
1
+ {"version":3,"sources":["../../../lib/components/Dialog/useDialogContextValues.js"],"sourcesContent":["export function useDialogContextValues_unstable(state) {\n const {\n modalType,\n open,\n dialogRef,\n dialogTitleId,\n isNestedDialog,\n inertTrapFocus,\n requestOpenChange,\n modalAttributes,\n triggerAttributes\n } = state;\n /**\n * This context is created with \"@fluentui/react-context-selector\",\n * there is no sense to memoize it\n */\n const dialog = {\n open,\n modalType,\n dialogRef,\n dialogTitleId,\n isNestedDialog,\n inertTrapFocus,\n modalAttributes,\n triggerAttributes,\n requestOpenChange\n };\n const dialogSurface = false;\n return {\n dialog,\n dialogSurface\n };\n}\n//# sourceMappingURL=useDialogContextValues.js.map"],"names":["useDialogContextValues_unstable","state","modalType","open","dialogRef","dialogTitleId","isNestedDialog","inertTrapFocus","requestOpenChange","modalAttributes","triggerAttributes","dialog","dialogSurface"],"mappings":";;;;+BAAgBA;;aAAAA;;AAAT,SAASA,gCAAgCC,KAAK,EAAE;IACrD,MAAM,EACJC,UAAS,EACTC,KAAI,EACJC,UAAS,EACTC,cAAa,EACbC,eAAc,EACdC,eAAc,EACdC,kBAAiB,EACjBC,gBAAe,EACfC,kBAAiB,EAClB,GAAGT;IACJ;;;EAGA,GACA,MAAMU,SAAS;QACbR;QACAD;QACAE;QACAC;QACAC;QACAC;QACAE;QACAC;QACAF;IACF;IACA,MAAMI,gBAAgB,KAAK;IAC3B,OAAO;QACLD;QACAC;IACF;AACF,EACA,kDAAkD"}
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ /** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
@@ -6,13 +6,12 @@ Object.defineProperty(exports, "renderDialogActions_unstable", {
6
6
  enumerable: true,
7
7
  get: ()=>renderDialogActions_unstable
8
8
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
9
+ const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
11
10
  const _reactUtilities = require("@fluentui/react-utilities");
12
11
  const renderDialogActions_unstable = (state)=>{
13
- const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
12
+ const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
14
13
  // TODO Add additional slots in the appropriate place
15
- return /*#__PURE__*/ _react.createElement(slots.root, slotProps.root);
14
+ return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root);
16
15
  }; //# sourceMappingURL=renderDialogActions.js.map
17
16
 
18
17
  //# sourceMappingURL=renderDialogActions.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/DialogActions/renderDialogActions.js"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DialogActions\n */\nexport const renderDialogActions_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlots(state);\n // TODO Add additional slots in the appropriate place\n return /*#__PURE__*/React.createElement(slots.root, slotProps.root);\n};\n//# sourceMappingURL=renderDialogActions.js.map"],"names":["renderDialogActions_unstable","state","slots","slotProps","getSlots","React","createElement","root"],"mappings":";;;;+BAKaA;;aAAAA;;;6DALU;gCACE;AAIlB,MAAMA,+BAA+BC,CAAAA,QAAS;IACnD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,wBAAQ,EAACH;IACb,qDAAqD;IACrD,OAAO,WAAW,GAAEI,OAAMC,aAAa,CAACJ,MAAMK,IAAI,EAAEJ,UAAUI,IAAI;AACpE,GACA,+CAA+C"}
1
+ {"version":3,"sources":["../../../lib/components/DialogActions/renderDialogActions.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DialogActions\n */\nexport const renderDialogActions_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n // TODO Add additional slots in the appropriate place\n return /*#__PURE__*/createElement(slots.root, slotProps.root);\n};\n//# sourceMappingURL=renderDialogActions.js.map"],"names":["renderDialogActions_unstable","state","slots","slotProps","getSlotsNext","createElement","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKrCA;;aAAAA;;iCALqE;gCACrD;AAItB,MAAMA,+BAA+BC,CAAAA,QAAS;IACnD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACH;IACjB,qDAAqD;IACrD,OAAO,WAAW,GAAEI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI;AAC9D,GACA,+CAA+C"}
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ /** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
@@ -6,13 +6,12 @@ Object.defineProperty(exports, "renderDialogBody_unstable", {
6
6
  enumerable: true,
7
7
  get: ()=>renderDialogBody_unstable
8
8
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
9
+ const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
11
10
  const _reactUtilities = require("@fluentui/react-utilities");
12
11
  const renderDialogBody_unstable = (state)=>{
13
- const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
12
+ const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
14
13
  // TODO Add additional slots in the appropriate place
15
- return /*#__PURE__*/ _react.createElement(slots.root, slotProps.root);
14
+ return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root);
16
15
  }; //# sourceMappingURL=renderDialogBody.js.map
17
16
 
18
17
  //# sourceMappingURL=renderDialogBody.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/DialogBody/renderDialogBody.js"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DialogBody\n */\nexport const renderDialogBody_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlots(state);\n // TODO Add additional slots in the appropriate place\n return /*#__PURE__*/React.createElement(slots.root, slotProps.root);\n};\n//# sourceMappingURL=renderDialogBody.js.map"],"names":["renderDialogBody_unstable","state","slots","slotProps","getSlots","React","createElement","root"],"mappings":";;;;+BAKaA;;aAAAA;;;6DALU;gCACE;AAIlB,MAAMA,4BAA4BC,CAAAA,QAAS;IAChD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,wBAAQ,EAACH;IACb,qDAAqD;IACrD,OAAO,WAAW,GAAEI,OAAMC,aAAa,CAACJ,MAAMK,IAAI,EAAEJ,UAAUI,IAAI;AACpE,GACA,4CAA4C"}
1
+ {"version":3,"sources":["../../../lib/components/DialogBody/renderDialogBody.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DialogBody\n */\nexport const renderDialogBody_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n // TODO Add additional slots in the appropriate place\n return /*#__PURE__*/createElement(slots.root, slotProps.root);\n};\n//# sourceMappingURL=renderDialogBody.js.map"],"names":["renderDialogBody_unstable","state","slots","slotProps","getSlotsNext","createElement","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKrCA;;aAAAA;;iCALqE;gCACrD;AAItB,MAAMA,4BAA4BC,CAAAA,QAAS;IAChD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACH;IACjB,qDAAqD;IACrD,OAAO,WAAW,GAAEI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI;AAC9D,GACA,4CAA4C"}
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ /** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "renderDialogContent_unstable", {
6
6
  enumerable: true,
7
7
  get: ()=>renderDialogContent_unstable
8
8
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
9
+ const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
11
10
  const _reactUtilities = require("@fluentui/react-utilities");
12
11
  const renderDialogContent_unstable = (state)=>{
13
- const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
14
- return /*#__PURE__*/ _react.createElement(slots.root, slotProps.root);
12
+ const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
13
+ return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root);
15
14
  }; //# sourceMappingURL=renderDialogContent.js.map
16
15
 
17
16
  //# sourceMappingURL=renderDialogContent.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/DialogContent/renderDialogContent.js"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DialogContent\n */\nexport const renderDialogContent_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlots(state);\n return /*#__PURE__*/React.createElement(slots.root, slotProps.root);\n};\n//# sourceMappingURL=renderDialogContent.js.map"],"names":["renderDialogContent_unstable","state","slots","slotProps","getSlots","React","createElement","root"],"mappings":";;;;+BAKaA;;aAAAA;;;6DALU;gCACE;AAIlB,MAAMA,+BAA+BC,CAAAA,QAAS;IACnD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,wBAAQ,EAACH;IACb,OAAO,WAAW,GAAEI,OAAMC,aAAa,CAACJ,MAAMK,IAAI,EAAEJ,UAAUI,IAAI;AACpE,GACA,+CAA+C"}
1
+ {"version":3,"sources":["../../../lib/components/DialogContent/renderDialogContent.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DialogContent\n */\nexport const renderDialogContent_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n return /*#__PURE__*/createElement(slots.root, slotProps.root);\n};\n//# sourceMappingURL=renderDialogContent.js.map"],"names":["renderDialogContent_unstable","state","slots","slotProps","getSlotsNext","createElement","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKrCA;;aAAAA;;iCALqE;gCACrD;AAItB,MAAMA,+BAA+BC,CAAAA,QAAS;IACnD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACH;IACjB,OAAO,WAAW,GAAEI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI;AAC9D,GACA,+CAA+C"}
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ /** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
@@ -6,16 +6,15 @@ Object.defineProperty(exports, "renderDialogSurface_unstable", {
6
6
  enumerable: true,
7
7
  get: ()=>renderDialogSurface_unstable
8
8
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
9
+ const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
11
10
  const _reactUtilities = require("@fluentui/react-utilities");
12
11
  const _contexts = require("../../contexts");
13
12
  const _reactPortal = require("@fluentui/react-portal");
14
13
  const renderDialogSurface_unstable = (state, contextValues)=>{
15
- const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
16
- return /*#__PURE__*/ _react.createElement(_reactPortal.Portal, null, slots.backdrop && /*#__PURE__*/ _react.createElement(slots.backdrop, slotProps.backdrop), /*#__PURE__*/ _react.createElement(_contexts.DialogSurfaceProvider, {
14
+ const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
15
+ return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_reactPortal.Portal, null, slots.backdrop && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.backdrop, slotProps.backdrop), /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_contexts.DialogSurfaceProvider, {
17
16
  value: contextValues.dialogSurface
18
- }, /*#__PURE__*/ _react.createElement(slots.root, slotProps.root)));
17
+ }, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root)));
19
18
  }; //# sourceMappingURL=renderDialogSurface.js.map
20
19
 
21
20
  //# sourceMappingURL=renderDialogSurface.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/DialogSurface/renderDialogSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { DialogSurfaceProvider } from '../../contexts';\nimport { Portal } from '@fluentui/react-portal';\n/**\n * Render the final JSX of DialogSurface\n */\nexport const renderDialogSurface_unstable = (state, contextValues) => {\n const {\n slots,\n slotProps\n } = getSlots(state);\n return /*#__PURE__*/React.createElement(Portal, null, slots.backdrop && /*#__PURE__*/React.createElement(slots.backdrop, slotProps.backdrop), /*#__PURE__*/React.createElement(DialogSurfaceProvider, {\n value: contextValues.dialogSurface\n }, /*#__PURE__*/React.createElement(slots.root, slotProps.root)));\n};\n//# sourceMappingURL=renderDialogSurface.js.map"],"names":["renderDialogSurface_unstable","state","contextValues","slots","slotProps","getSlots","React","createElement","Portal","backdrop","DialogSurfaceProvider","value","dialogSurface","root"],"mappings":";;;;+BAOaA;;aAAAA;;;6DAPU;gCACE;0BACa;6BACf;AAIhB,MAAMA,+BAA+B,CAACC,OAAOC,gBAAkB;IACpE,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,wBAAQ,EAACJ;IACb,OAAO,WAAW,GAAEK,OAAMC,aAAa,CAACC,mBAAM,EAAE,IAAI,EAAEL,MAAMM,QAAQ,IAAI,WAAW,GAAEH,OAAMC,aAAa,CAACJ,MAAMM,QAAQ,EAAEL,UAAUK,QAAQ,GAAG,WAAW,GAAEH,OAAMC,aAAa,CAACG,+BAAqB,EAAE;QACpMC,OAAOT,cAAcU,aAAa;IACpC,GAAG,WAAW,GAAEN,OAAMC,aAAa,CAACJ,MAAMU,IAAI,EAAET,UAAUS,IAAI;AAChE,GACA,+CAA+C"}
1
+ {"version":3,"sources":["../../../lib/components/DialogSurface/renderDialogSurface.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport { DialogSurfaceProvider } from '../../contexts';\nimport { Portal } from '@fluentui/react-portal';\n/**\n * Render the final JSX of DialogSurface\n */\nexport const renderDialogSurface_unstable = (state, contextValues) => {\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n return /*#__PURE__*/createElement(Portal, null, slots.backdrop && /*#__PURE__*/createElement(slots.backdrop, slotProps.backdrop), /*#__PURE__*/createElement(DialogSurfaceProvider, {\n value: contextValues.dialogSurface\n }, /*#__PURE__*/createElement(slots.root, slotProps.root)));\n};\n//# sourceMappingURL=renderDialogSurface.js.map"],"names":["renderDialogSurface_unstable","state","contextValues","slots","slotProps","getSlotsNext","createElement","Portal","backdrop","DialogSurfaceProvider","value","dialogSurface","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAOrCA;;aAAAA;;iCAPqE;gCACrD;0BACS;6BACf;AAIhB,MAAMA,+BAA+B,CAACC,OAAOC,gBAAkB;IACpE,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACJ;IACjB,OAAO,WAAW,GAAEK,IAAAA,8BAAa,EAACC,mBAAM,EAAE,IAAI,EAAEJ,MAAMK,QAAQ,IAAI,WAAW,GAAEF,IAAAA,8BAAa,EAACH,MAAMK,QAAQ,EAAEJ,UAAUI,QAAQ,GAAG,WAAW,GAAEF,IAAAA,8BAAa,EAACG,+BAAqB,EAAE;QAClLC,OAAOR,cAAcS,aAAa;IACpC,GAAG,WAAW,GAAEL,IAAAA,8BAAa,EAACH,MAAMS,IAAI,EAAER,UAAUQ,IAAI;AAC1D,GACA,+CAA+C"}
@@ -11,11 +11,10 @@ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
11
  const _reactUtilities = require("@fluentui/react-utilities");
12
12
  const _contexts = require("../../contexts");
13
13
  const _utils = require("../../utils");
14
- const _reactTabster = require("@fluentui/react-tabster");
15
14
  const useDialogSurface_unstable = (props, ref)=>{
16
15
  const { backdrop , as } = props;
17
16
  const modalType = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.modalType);
18
- const inertTrapFocus = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.inertTrapFocus);
17
+ const modalAttributes = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.modalAttributes);
19
18
  const dialogRef = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.dialogRef);
20
19
  const open = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.open);
21
20
  const requestOpenChange = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.requestOpenChange);
@@ -47,10 +46,6 @@ const useDialogSurface_unstable = (props, ref)=>{
47
46
  event.stopPropagation();
48
47
  }
49
48
  });
50
- const { modalAttributes } = (0, _reactTabster.useModalAttributes)({
51
- trapFocus: modalType !== 'non-modal',
52
- legacyTrapFocus: !inertTrapFocus
53
- });
54
49
  return {
55
50
  components: {
56
51
  backdrop: 'div',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/DialogSurface/useDialogSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useEventCallback, useMergedRefs, isResolvedShorthand } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable } from '../../contexts';\nimport { isEscapeKeyDismiss } from '../../utils';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n/**\n * Create the state required to render DialogSurface.\n *\n * The returned state can be modified with hooks such as useDialogSurfaceStyles_unstable,\n * before being passed to renderDialogSurface_unstable.\n *\n * @param props - props from this instance of DialogSurface\n * @param ref - reference to root HTMLElement of DialogSurface\n */\nexport const useDialogSurface_unstable = (props, ref) => {\n const {\n backdrop,\n as\n } = props;\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const inertTrapFocus = useDialogContext_unstable(ctx => ctx.inertTrapFocus);\n const dialogRef = useDialogContext_unstable(ctx => ctx.dialogRef);\n const open = useDialogContext_unstable(ctx => ctx.open);\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const dialogTitleID = useDialogContext_unstable(ctx => ctx.dialogTitleId);\n const handledBackdropClick = useEventCallback(event => {\n if (isResolvedShorthand(props.backdrop)) {\n var _props_backdrop, _props_backdrop_onClick;\n (_props_backdrop_onClick = (_props_backdrop = props.backdrop).onClick) === null || _props_backdrop_onClick === void 0 ? void 0 : _props_backdrop_onClick.call(_props_backdrop, event);\n }\n if (modalType === 'modal' && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'backdropClick'\n });\n }\n });\n const handleKeyDown = useEventCallback(event => {\n var _props_onKeyDown;\n (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, event);\n if (isEscapeKeyDismiss(event, modalType)) {\n requestOpenChange({\n event,\n open: false,\n type: 'escapeKeyDown'\n });\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: nested Dialog, Popover, Menu and Tooltip\n event.stopPropagation();\n }\n });\n const {\n modalAttributes\n } = useModalAttributes({\n trapFocus: modalType !== 'non-modal',\n legacyTrapFocus: !inertTrapFocus\n });\n return {\n components: {\n backdrop: 'div',\n root: 'div'\n },\n backdrop: resolveShorthand(backdrop, {\n required: open && modalType !== 'non-modal',\n defaultProps: {\n 'aria-hidden': 'true',\n onClick: handledBackdropClick\n }\n }),\n root: getNativeElementProps(as !== null && as !== void 0 ? as : 'div', {\n tabIndex: -1,\n 'aria-modal': modalType !== 'non-modal',\n role: modalType === 'alert' ? 'alertdialog' : 'dialog',\n 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,\n ...props,\n ...modalAttributes,\n onKeyDown: handleKeyDown,\n ref: useMergedRefs(ref, dialogRef)\n })\n };\n};\n//# sourceMappingURL=useDialogSurface.js.map"],"names":["useDialogSurface_unstable","props","ref","backdrop","as","modalType","useDialogContext_unstable","ctx","inertTrapFocus","dialogRef","open","requestOpenChange","dialogTitleID","dialogTitleId","handledBackdropClick","useEventCallback","event","isResolvedShorthand","_props_backdrop","_props_backdrop_onClick","onClick","call","isDefaultPrevented","type","handleKeyDown","_props_onKeyDown","onKeyDown","isEscapeKeyDismiss","stopPropagation","modalAttributes","useModalAttributes","trapFocus","legacyTrapFocus","components","root","resolveShorthand","required","defaultProps","getNativeElementProps","tabIndex","role","undefined","useMergedRefs"],"mappings":";;;;+BAcaA;;aAAAA;;;6DAdU;gCACuF;0BACpE;uBACP;8BACA;AAU5B,MAAMA,4BAA4B,CAACC,OAAOC,MAAQ;IACvD,MAAM,EACJC,SAAQ,EACRC,GAAE,EACH,GAAGH;IACJ,MAAMI,YAAYC,IAAAA,mCAAyB,EAACC,CAAAA,MAAOA,IAAIF,SAAS;IAChE,MAAMG,iBAAiBF,IAAAA,mCAAyB,EAACC,CAAAA,MAAOA,IAAIC,cAAc;IAC1E,MAAMC,YAAYH,IAAAA,mCAAyB,EAACC,CAAAA,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ACR;QACA/B,UAAUgC,IAAAA,gCAAgB,EAAChC,UAAU;YACnCiC,UAAU1B,QAAQL,cAAc;YAChCgC,cAAc;gBACZ,eAAe;gBACfjB,SAASN;YACX;QACF;QACAoB,MAAMI,IAAAA,qCAAqB,EAAClC,OAAO,IAAI,IAAIA,OAAO,KAAK,IAAIA,KAAK,KAAK,EAAE;YACrEmC,UAAU,CAAC;YACX,cAAclC,cAAc;YAC5BmC,MAAMnC,cAAc,UAAU,gBAAgB,QAAQ;YACtD,mBAAmBJ,KAAK,CAAC,aAAa,GAAGwC,YAAY7B,aAAa;YAClE,GAAGX,KAAK;YACR,GAAG4B,eAAe;YAClBH,WAAWF;YACXtB,KAAKwC,IAAAA,6BAAa,EAACxC,KAAKO;QAC1B;IACF;AACF,GACA,4CAA4C"}
1
+ {"version":3,"sources":["../../../lib/components/DialogSurface/useDialogSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useEventCallback, useMergedRefs, isResolvedShorthand } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable } from '../../contexts';\nimport { isEscapeKeyDismiss } from '../../utils';\n/**\n * Create the state required to render DialogSurface.\n *\n * The returned state can be modified with hooks such as useDialogSurfaceStyles_unstable,\n * before being passed to renderDialogSurface_unstable.\n *\n * @param props - props from this instance of DialogSurface\n * @param ref - reference to root HTMLElement of DialogSurface\n */\nexport const useDialogSurface_unstable = (props, ref) => {\n const {\n backdrop,\n as\n } = props;\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const modalAttributes = useDialogContext_unstable(ctx => ctx.modalAttributes);\n const dialogRef = useDialogContext_unstable(ctx => ctx.dialogRef);\n const open = useDialogContext_unstable(ctx => ctx.open);\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const dialogTitleID = useDialogContext_unstable(ctx => ctx.dialogTitleId);\n const handledBackdropClick = useEventCallback(event => {\n if (isResolvedShorthand(props.backdrop)) {\n var _props_backdrop, _props_backdrop_onClick;\n (_props_backdrop_onClick = (_props_backdrop = props.backdrop).onClick) === null || _props_backdrop_onClick === void 0 ? void 0 : _props_backdrop_onClick.call(_props_backdrop, event);\n }\n if (modalType === 'modal' && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'backdropClick'\n });\n }\n });\n const handleKeyDown = useEventCallback(event => {\n var _props_onKeyDown;\n (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, event);\n if (isEscapeKeyDismiss(event, modalType)) {\n requestOpenChange({\n event,\n open: false,\n type: 'escapeKeyDown'\n });\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: nested Dialog, Popover, Menu and Tooltip\n event.stopPropagation();\n }\n });\n return {\n components: {\n backdrop: 'div',\n root: 'div'\n },\n backdrop: resolveShorthand(backdrop, {\n required: open && modalType !== 'non-modal',\n defaultProps: {\n 'aria-hidden': 'true',\n onClick: handledBackdropClick\n }\n }),\n root: getNativeElementProps(as !== null && as !== void 0 ? as : 'div', {\n tabIndex: -1,\n 'aria-modal': modalType !== 'non-modal',\n role: modalType === 'alert' ? 'alertdialog' : 'dialog',\n 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,\n ...props,\n ...modalAttributes,\n onKeyDown: handleKeyDown,\n ref: useMergedRefs(ref, dialogRef)\n })\n };\n};\n//# sourceMappingURL=useDialogSurface.js.map"],"names":["useDialogSurface_unstable","props","ref","backdrop","as","modalType","useDialogContext_unstable","ctx","modalAttributes","dialogRef","open","requestOpenChange","dialogTitleID","dialogTitleId","handledBackdropClick","useEventCallback","event","isResolvedShorthand","_props_backdrop","_props_backdrop_onClick","onClick","call","isDefaultPrevented","type","handleKeyDown","_props_onKeyDown","onKeyDown","isEscapeKeyDismiss","stopPropagation","components","root","resolveShorthand","required","defaultProps","getNativeElementProps","tabIndex","role","undefined","useMergedRefs"],"mappings":";;;;+BAaaA;;aAAAA;;;6DAbU;gCACuF;0BACpE;uBACP;A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M,kBAAkB;gBAChBK;gBACAN,MAAM,KAAK;gBACXa,MAAM;YACR;YACA,qFAAqF;YACrF,gDAAgD;YAChDP,MAAMY,eAAe;QACvB,CAAC;IACH;IACA,OAAO;QACLC,YAAY;YACV1B,UAAU;YACV2B,MAAM;QACR;QACA3B,UAAU4B,IAAAA,gCAAgB,EAAC5B,UAAU;YACnC6B,UAAUtB,QAAQL,cAAc;YAChC4B,cAAc;gBACZ,eAAe;gBACfb,SAASN;YACX;QACF;QACAgB,MAAMI,IAAAA,qCAAqB,EAAC9B,OAAO,IAAI,IAAIA,OAAO,KAAK,IAAIA,KAAK,KAAK,EAAE;YACrE+B,UAAU,CAAC;YACX,cAAc9B,cAAc;YAC5B+B,MAAM/B,cAAc,UAAU,gBAAgB,QAAQ;YACtD,mBAAmBJ,KAAK,CAAC,aAAa,GAAGoC,YAAYzB,aAAa;YAClE,GAAGX,KAAK;YACR,GAAGO,eAAe;YAClBkB,WAAWF;YACXtB,KAAKoC,IAAAA,6BAAa,EAACpC,KAAKO;QAC1B;IACF;AACF,GACA,4CAA4C"}
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ /** @jsxRuntime classic */ /** @jsxFrag Fragment */ /** @jsx createElement */ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "renderDialogTitle_unstable", {
6
6
  enumerable: true,
7
7
  get: ()=>renderDialogTitle_unstable
8
8
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
9
+ const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
11
10
  const _reactUtilities = require("@fluentui/react-utilities");
12
11
  const renderDialogTitle_unstable = (state)=>{
13
- const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
14
- return /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement(slots.root, slotProps.root, slotProps.root.children), slots.action && /*#__PURE__*/ _react.createElement(slots.action, slotProps.action));
12
+ const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
13
+ return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_reactJsxRuntime.Fragment, null, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root, slotProps.root.children), slots.action && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.action, slotProps.action));
15
14
  }; //# sourceMappingURL=renderDialogTitle.js.map
16
15
 
17
16
  //# sourceMappingURL=renderDialogTitle.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/DialogTitle/renderDialogTitle.js"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DialogTitle\n */\nexport const renderDialogTitle_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlots(state);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(slots.root, slotProps.root, slotProps.root.children), slots.action && /*#__PURE__*/React.createElement(slots.action, slotProps.action));\n};\n//# sourceMappingURL=renderDialogTitle.js.map"],"names":["renderDialogTitle_unstable","state","slots","slotProps","getSlots","React","createElement","Fragment","root","children","action"],"mappings":";;;;+BAKaA;;aAAAA;;;6DALU;gCACE;AAIlB,MAAMA,6BAA6BC,CAAAA,QAAS;IACjD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,wBAAQ,EAACH;IACb,OAAO,WAAW,GAAEI,OAAMC,aAAa,CAACD,OAAME,QAAQ,EAAE,IAAI,EAAE,WAAW,GAAEF,OAAMC,aAAa,CAACJ,MAAMM,IAAI,EAAEL,UAAUK,IAAI,EAAEL,UAAUK,IAAI,CAACC,QAAQ,GAAGP,MAAMQ,MAAM,IAAI,WAAW,GAAEL,OAAMC,aAAa,CAACJ,MAAMQ,MAAM,EAAEP,UAAUO,MAAM;AACtO,GACA,6CAA6C"}
1
+ {"version":3,"sources":["../../../lib/components/DialogTitle/renderDialogTitle.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsxFrag Fragment */ /** @jsx createElement */import { createElement, Fragment } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DialogTitle\n */\nexport const renderDialogTitle_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(slots.root, slotProps.root, slotProps.root.children), slots.action && /*#__PURE__*/createElement(slots.action, slotProps.action));\n};\n//# sourceMappingURL=renderDialogTitle.js.map"],"names":["renderDialogTitle_unstable","state","slots","slotProps","getSlotsNext","createElement","Fragment","root","children","action"],"mappings":"AAAA,wBAAwB,GAAG,sBAAsB,GAAG,uBAAuB;;;;+BAK9DA;;aAAAA;;iCALwG;gCACxF;AAItB,MAAMA,6BAA6BC,CAAAA,QAAS;IACjD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACH;IACjB,OAAO,WAAW,GAAEI,IAAAA,8BAAa,EAACC,yBAAQ,EAAE,IAAI,EAAE,WAAW,GAAED,IAAAA,8BAAa,EAACH,MAAMK,IAAI,EAAEJ,UAAUI,IAAI,EAAEJ,UAAUI,IAAI,CAACC,QAAQ,GAAGN,MAAMO,MAAM,IAAI,WAAW,GAAEJ,IAAAA,8BAAa,EAACH,MAAMO,MAAM,EAAEN,UAAUM,MAAM;AAC9M,GACA,6CAA6C"}
@@ -19,10 +19,10 @@ const useDialogTitle_unstable = (props, ref)=>{
19
19
  const internalStyles = (0, _useDialogTitleStyles.useDialogTitleInternalStyles)();
20
20
  return {
21
21
  components: {
22
- root: 'div',
22
+ root: 'h2',
23
23
  action: 'div'
24
24
  },
25
- root: (0, _reactUtilities.getNativeElementProps)(as !== null && as !== void 0 ? as : 'div', {
25
+ root: (0, _reactUtilities.getNativeElementProps)(as !== null && as !== void 0 ? as : 'h2', {
26
26
  ref,
27
27
  id: (0, _dialogContext.useDialogContext_unstable)((ctx)=>ctx.dialogTitleId),
28
28
  ...props
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/DialogTitle/useDialogTitle.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable } from '../../contexts/dialogContext';\nimport { Dismiss24Regular } from '@fluentui/react-icons';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { DialogTrigger } from '../DialogTrigger/DialogTrigger';\nimport { useDialogTitleInternalStyles } from './useDialogTitleStyles';\n/**\n * Create the state required to render DialogTitle.\n *\n * The returned state can be modified with hooks such as useDialogTitleStyles_unstable,\n * before being passed to renderDialogTitle_unstable.\n *\n * @param props - props from this instance of DialogTitle\n * @param ref - reference to root HTMLElement of DialogTitle\n */\nexport const useDialogTitle_unstable = (props, ref) => {\n const {\n as,\n action\n } = props;\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const internalStyles = useDialogTitleInternalStyles();\n return {\n components: {\n root: 'div',\n action: 'div'\n },\n root: getNativeElementProps(as !== null && as !== void 0 ? as : 'div', {\n ref,\n id: useDialogContext_unstable(ctx => ctx.dialogTitleId),\n ...props\n }),\n action: resolveShorthand(action, {\n required: modalType === 'non-modal',\n defaultProps: {\n children: /*#__PURE__*/React.createElement(DialogTrigger, {\n disableButtonEnhancement: true,\n action: \"close\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: internalStyles.button,\n // TODO: find a better way to add internal labels\n \"aria-label\": \"close\"\n }, /*#__PURE__*/React.createElement(Dismiss24Regular, null)))\n }\n })\n };\n};\n//# sourceMappingURL=useDialogTitle.js.map"],"names":["useDialogTitle_unstable","props","ref","as","action","modalType","useDialogContext_unstable","ctx","internalStyles","useDialogTitleInternalStyles","components","root","getNativeElementProps","id","dialogTitleId","resolveShorthand","required","defaultProps","children","React","createElement","DialogTrigger","disableButtonEnhancement","type","className","button","Dismiss24Regular"],"mappings":";;;;+BAgBaA;;aAAAA;;;6DAhBU;gCACe;+BACI;4BACT;+BAEH;sCACe;AAUtC,MAAMA,0BAA0B,CAACC,OAAOC,MAAQ;IACrD,MAAM,EACJC,GAAE,EACFC,OAAM,EACP,GAAGH;IACJ,MAAMI,YAAYC,IAAAA,wCAAyB,EAACC,CAAAA,MAAOA,IAAIF,SAAS;IAChE,MAAMG,iBAAiBC,IAAAA,kDAA4B;IACnD,OAAO;QACLC,YAAY;YACVC,MAAM;YACNP,QAAQ;QACV;QACAO,MAAMC,IAAAA,qCAAqB,EAACT,OAAO,IAAI,IAAIA,OAAO,KAAK,IAAIA,KAAK,KAAK,EAAE;YACrED;YACAW,IAAIP,IAAAA,wCAAyB,EAACC,CAAAA,MAAOA,IAAIO,aAAa;YACtD,GAAGb,KAAK;QACV;QACAG,QAAQW,IAAAA,gCAAgB,EAACX,QAAQ;YAC/BY,UAAUX,cAAc;YACxBY,cAAc;gBACZC,UAAU,WAAW,GAAEC,OAAMC,aAAa,CAACC,4BAAa,EAAE;oBACxDC,0BAA0B,IAAI;oBAC9BlB,QAAQ;gBACV,GAAG,WAAW,GAAEe,OAAMC,aAAa,CAAC,UAAU;oBAC5CG,MAAM;oBACNC,WAAWhB,eAAeiB,MAAM;oBAChC,iDAAiD;oBACjD,cAAc;gBAChB,GAAG,WAAW,GAAEN,OAAMC,aAAa,CAACM,4BAAgB,EAAE,IAAI;YAC5D;QACF;IACF;AACF,GACA,0CAA0C"}
1
+ {"version":3,"sources":["../../../lib/components/DialogTitle/useDialogTitle.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable } from '../../contexts/dialogContext';\nimport { Dismiss24Regular } from '@fluentui/react-icons';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { DialogTrigger } from '../DialogTrigger/DialogTrigger';\nimport { useDialogTitleInternalStyles } from './useDialogTitleStyles';\n/**\n * Create the state required to render DialogTitle.\n *\n * The returned state can be modified with hooks such as useDialogTitleStyles_unstable,\n * before being passed to renderDialogTitle_unstable.\n *\n * @param props - props from this instance of DialogTitle\n * @param ref - reference to root HTMLElement of DialogTitle\n */\nexport const useDialogTitle_unstable = (props, ref) => {\n const {\n as,\n action\n } = props;\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const internalStyles = useDialogTitleInternalStyles();\n return {\n components: {\n root: 'h2',\n action: 'div'\n },\n root: getNativeElementProps(as !== null && as !== void 0 ? as : 'h2', {\n ref,\n id: useDialogContext_unstable(ctx => ctx.dialogTitleId),\n ...props\n }),\n action: resolveShorthand(action, {\n required: modalType === 'non-modal',\n defaultProps: {\n children: /*#__PURE__*/React.createElement(DialogTrigger, {\n disableButtonEnhancement: true,\n action: \"close\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: internalStyles.button,\n // TODO: find a better way to add internal labels\n \"aria-label\": \"close\"\n }, /*#__PURE__*/React.createElement(Dismiss24Regular, null)))\n }\n })\n };\n};\n//# sourceMappingURL=useDialogTitle.js.map"],"names":["useDialogTitle_unstable","props","ref","as","action","modalType","useDialogContext_unstable","ctx","internalStyles","useDialogTitleInternalStyles","components","root","getNativeElementProps","id","dialogTitleId","resolveShorthand","required","defaultProps","children","React","createElement","DialogTrigger","disableButtonEnhancement","type","className","button","Dismiss24Regular"],"mappings":";;;;+BAgBaA;;aAAAA;;;6DAhBU;gCACe;+BACI;4BACT;+BAEH;sCACe;AAUtC,MAAMA,0BAA0B,CAACC,OAAOC,MAAQ;IACrD,MAAM,EACJC,GAAE,EACFC,OAAM,EACP,GAAGH;IACJ,MAAMI,YAAYC,IAAAA,wCAAyB,EAACC,CAAAA,MAAOA,IAAIF,SAAS;IAChE,MAAMG,iBAAiBC,IAAAA,kDAA4B;IACnD,OAAO;QACLC,YAAY;YACVC,MAAM;YACNP,QAAQ;QACV;QACAO,MAAMC,IAAAA,qCAAqB,EAACT,OAAO,IAAI,IAAIA,OAAO,KAAK,IAAIA,KAAK,IAAI,EAAE;YACpED;YACAW,IAAIP,IAAAA,wCAAyB,EAACC,CAAAA,MAAOA,IAAIO,aAAa;YACtD,GAAGb,KAAK;QACV;QACAG,QAAQW,IAAAA,gCAAgB,EAACX,QAAQ;YAC/BY,UAAUX,cAAc;YACxBY,cAAc;gBACZC,UAAU,WAAW,GAAEC,OAAMC,aAAa,CAACC,4BAAa,EAAE;oBACxDC,0BAA0B,IAAI;oBAC9BlB,QAAQ;gBACV,GAAG,WAAW,GAAEe,OAAMC,aAAa,CAAC,UAAU;oBAC5CG,MAAM;oBACNC,WAAWhB,eAAeiB,MAAM;oBAChC,iDAAiD;oBACjD,cAAc;gBAChB,GAAG,WAAW,GAAEN,OAAMC,aAAa,CAACM,4BAAgB,EAAE,IAAI;YAC5D;QACF;IACF;AACF,GACA,0CAA0C"}
@@ -29,7 +29,17 @@ const dialogTitleClassNames = {
29
29
  Ijaq50: "faq1aip",
30
30
  Br312pm: "f1m489tg",
31
31
  nk6f5a: "fv2srd9",
32
- Bw0ie65: "f1tz6hh8"
32
+ Bw0ie65: "f1tz6hh8",
33
+ B6of3ja: "f1hu3pq6",
34
+ t21cq0: [
35
+ "f11qmguv",
36
+ "f1tyq0we"
37
+ ],
38
+ jrapky: "f19f4twv",
39
+ Frg6f3: [
40
+ "f1tyq0we",
41
+ "f11qmguv"
42
+ ]
33
43
  },
34
44
  rootWithoutCloseButton: {
35
45
  Ijaq50: "faq1aip",
@@ -53,6 +63,10 @@ const dialogTitleClassNames = {
53
63
  ".f1m489tg{grid-column-start:title;}",
54
64
  ".fv2srd9{grid-row-end:title;}",
55
65
  ".f1tz6hh8{grid-column-end:title;}",
66
+ ".f1hu3pq6{margin-top:0;}",
67
+ ".f11qmguv{margin-right:0;}",
68
+ ".f1tyq0we{margin-left:0;}",
69
+ ".f19f4twv{margin-bottom:0;}",
56
70
  ".f11nczdl{grid-row-end:close-button;}",
57
71
  ".f98d4vj{grid-column-end:close-button;}",
58
72
  ".f1hysmiz{grid-row-start:close-button;}",