@fluentui/react-migration-v0-v9 9.2.0 → 9.2.2

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 (132) hide show
  1. package/CHANGELOG.md +27 -2
  2. package/lib/components/Attachment/Attachment.js.map +1 -1
  3. package/lib/components/Attachment/AttachmentAction.js.map +1 -1
  4. package/lib/components/Attachment/AttachmentBody.js.map +1 -1
  5. package/lib/components/Attachment/AttachmentDescription.js.map +1 -1
  6. package/lib/components/Attachment/AttachmentHeader.js.map +1 -1
  7. package/lib/components/Attachment/AttachmentIcon.js.map +1 -1
  8. package/lib/components/Attachment/index.js.map +1 -1
  9. package/lib/components/Button/ButtonMigration.mixins.js.map +1 -1
  10. package/lib/components/Button/index.js.map +1 -1
  11. package/lib/components/Flex/Flex.js.map +1 -1
  12. package/lib/components/Flex/FlexItem.mixins.js.map +1 -1
  13. package/lib/components/Flex/index.js.map +1 -1
  14. package/lib/components/FormField/FormFieldShim.js.map +1 -1
  15. package/lib/components/FormField/index.js.map +1 -1
  16. package/lib/components/Grid/Grid.mixins.js.map +1 -1
  17. package/lib/components/Grid/GridShim.js.map +1 -1
  18. package/lib/components/Grid/index.js.map +1 -1
  19. package/lib/components/Input/Input.mixins.js.map +1 -1
  20. package/lib/components/Input/index.js.map +1 -1
  21. package/lib/components/ItemLayout/ItemLayout.js.map +1 -1
  22. package/lib/components/ItemLayout/index.js.map +1 -1
  23. package/lib/components/List/List/List.js.map +1 -1
  24. package/lib/components/List/List/List.types.js.map +1 -1
  25. package/lib/components/List/List/index.js.map +1 -1
  26. package/lib/components/List/List/listContext.js.map +1 -1
  27. package/lib/components/List/List/renderList.js.map +1 -1
  28. package/lib/components/List/List/useList.js.map +1 -1
  29. package/lib/components/List/List/useListContextValues.js.map +1 -1
  30. package/lib/components/List/ListItem/ListItem.js.map +1 -1
  31. package/lib/components/List/ListItem/ListItem.types.js.map +1 -1
  32. package/lib/components/List/ListItem/index.js.map +1 -1
  33. package/lib/components/List/ListItem/renderListItem.js.map +1 -1
  34. package/lib/components/List/ListItem/useListItem.js +10 -4
  35. package/lib/components/List/ListItem/useListItem.js.map +1 -1
  36. package/lib/components/List/hooks/index.js.map +1 -1
  37. package/lib/components/List/hooks/types.js.map +1 -1
  38. package/lib/components/List/hooks/useListSelection.js.map +1 -1
  39. package/lib/components/List/index.js.map +1 -1
  40. package/lib/components/Primitive/Primitive.js.map +1 -1
  41. package/lib/components/Primitive/index.js.map +1 -1
  42. package/lib/components/Segment/Segment.js.map +1 -1
  43. package/lib/components/Segment/index.js.map +1 -1
  44. package/lib/components/Slider/Slider.mixins.js.map +1 -1
  45. package/lib/components/Slider/index.js.map +1 -1
  46. package/lib/components/Spinner/SpinnerMigration.mixins.js.map +1 -1
  47. package/lib/components/Spinner/index.js.map +1 -1
  48. package/lib/components/StyledText/StyledText.js.map +1 -1
  49. package/lib/components/StyledText/index.js.map +1 -1
  50. package/lib/index.js.map +1 -1
  51. package/lib-commonjs/components/Attachment/Attachment.js +5 -5
  52. package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
  53. package/lib-commonjs/components/Attachment/Attachment.styles.js.map +1 -1
  54. package/lib-commonjs/components/Attachment/AttachmentAction.js +3 -3
  55. package/lib-commonjs/components/Attachment/AttachmentAction.js.map +1 -1
  56. package/lib-commonjs/components/Attachment/AttachmentAction.styles.js.map +1 -1
  57. package/lib-commonjs/components/Attachment/AttachmentBody.js +3 -3
  58. package/lib-commonjs/components/Attachment/AttachmentBody.js.map +1 -1
  59. package/lib-commonjs/components/Attachment/AttachmentBody.styles.js.map +1 -1
  60. package/lib-commonjs/components/Attachment/AttachmentDescription.js +3 -3
  61. package/lib-commonjs/components/Attachment/AttachmentDescription.js.map +1 -1
  62. package/lib-commonjs/components/Attachment/AttachmentDescription.styles.js.map +1 -1
  63. package/lib-commonjs/components/Attachment/AttachmentHeader.js +3 -3
  64. package/lib-commonjs/components/Attachment/AttachmentHeader.js.map +1 -1
  65. package/lib-commonjs/components/Attachment/AttachmentHeader.styles.js.map +1 -1
  66. package/lib-commonjs/components/Attachment/AttachmentIcon.js +3 -3
  67. package/lib-commonjs/components/Attachment/AttachmentIcon.js.map +1 -1
  68. package/lib-commonjs/components/Attachment/AttachmentIcon.styles.js.map +1 -1
  69. package/lib-commonjs/components/Attachment/index.js.map +1 -1
  70. package/lib-commonjs/components/Button/ButtonMigration.mixins.js +8 -8
  71. package/lib-commonjs/components/Button/ButtonMigration.mixins.js.map +1 -1
  72. package/lib-commonjs/components/Button/index.js.map +1 -1
  73. package/lib-commonjs/components/Flex/Flex.js +3 -3
  74. package/lib-commonjs/components/Flex/Flex.js.map +1 -1
  75. package/lib-commonjs/components/Flex/Flex.styles.js.map +1 -1
  76. package/lib-commonjs/components/Flex/FlexItem.mixins.js.map +1 -1
  77. package/lib-commonjs/components/Flex/index.js +3 -3
  78. package/lib-commonjs/components/Flex/index.js.map +1 -1
  79. package/lib-commonjs/components/FormField/FormFieldShim.js.map +1 -1
  80. package/lib-commonjs/components/FormField/index.js.map +1 -1
  81. package/lib-commonjs/components/Grid/Grid.mixins.js.map +1 -1
  82. package/lib-commonjs/components/Grid/Grid.styles.js.map +1 -1
  83. package/lib-commonjs/components/Grid/GridShim.js +3 -3
  84. package/lib-commonjs/components/Grid/GridShim.js.map +1 -1
  85. package/lib-commonjs/components/Grid/index.js +3 -3
  86. package/lib-commonjs/components/Grid/index.js.map +1 -1
  87. package/lib-commonjs/components/Input/Input.mixins.js.map +1 -1
  88. package/lib-commonjs/components/Input/index.js.map +1 -1
  89. package/lib-commonjs/components/ItemLayout/ItemLayout.js +3 -3
  90. package/lib-commonjs/components/ItemLayout/ItemLayout.js.map +1 -1
  91. package/lib-commonjs/components/ItemLayout/ItemLayout.styles.js.map +1 -1
  92. package/lib-commonjs/components/ItemLayout/index.js.map +1 -1
  93. package/lib-commonjs/components/List/List/List.js.map +1 -1
  94. package/lib-commonjs/components/List/List/List.types.js.map +1 -1
  95. package/lib-commonjs/components/List/List/index.js.map +1 -1
  96. package/lib-commonjs/components/List/List/listContext.js +3 -3
  97. package/lib-commonjs/components/List/List/listContext.js.map +1 -1
  98. package/lib-commonjs/components/List/List/renderList.js.map +1 -1
  99. package/lib-commonjs/components/List/List/useList.js.map +1 -1
  100. package/lib-commonjs/components/List/List/useListContextValues.js.map +1 -1
  101. package/lib-commonjs/components/List/List/useListStyles.styles.js.map +1 -1
  102. package/lib-commonjs/components/List/ListItem/ListItem.js.map +1 -1
  103. package/lib-commonjs/components/List/ListItem/ListItem.types.js.map +1 -1
  104. package/lib-commonjs/components/List/ListItem/index.js.map +1 -1
  105. package/lib-commonjs/components/List/ListItem/renderListItem.js.map +1 -1
  106. package/lib-commonjs/components/List/ListItem/useListItem.js +10 -4
  107. package/lib-commonjs/components/List/ListItem/useListItem.js.map +1 -1
  108. package/lib-commonjs/components/List/ListItem/useListItemStyles.styles.js.map +1 -1
  109. package/lib-commonjs/components/List/hooks/index.js.map +1 -1
  110. package/lib-commonjs/components/List/hooks/types.js.map +1 -1
  111. package/lib-commonjs/components/List/hooks/useListSelection.js.map +1 -1
  112. package/lib-commonjs/components/List/index.js +12 -12
  113. package/lib-commonjs/components/List/index.js.map +1 -1
  114. package/lib-commonjs/components/Primitive/Primitive.js +3 -3
  115. package/lib-commonjs/components/Primitive/Primitive.js.map +1 -1
  116. package/lib-commonjs/components/Primitive/index.js.map +1 -1
  117. package/lib-commonjs/components/Segment/Segment.js +3 -3
  118. package/lib-commonjs/components/Segment/Segment.js.map +1 -1
  119. package/lib-commonjs/components/Segment/Segment.styles.js.map +1 -1
  120. package/lib-commonjs/components/Segment/index.js.map +1 -1
  121. package/lib-commonjs/components/Slider/Slider.mixins.js.map +1 -1
  122. package/lib-commonjs/components/Slider/index.js.map +1 -1
  123. package/lib-commonjs/components/Spinner/SpinnerMigration.mixins.js.map +1 -1
  124. package/lib-commonjs/components/Spinner/index.js.map +1 -1
  125. package/lib-commonjs/components/StyledText/StyledText.js +3 -3
  126. package/lib-commonjs/components/StyledText/StyledText.js.map +1 -1
  127. package/lib-commonjs/components/StyledText/StyledText.styles.js +3 -3
  128. package/lib-commonjs/components/StyledText/StyledText.styles.js.map +1 -1
  129. package/lib-commonjs/components/StyledText/index.js.map +1 -1
  130. package/lib-commonjs/index.js +85 -85
  131. package/lib-commonjs/index.js.map +1 -1
  132. package/package.json +8 -8
@@ -59,12 +59,18 @@ const useListItem_unstable = (props, ref)=>{
59
59
  }
60
60
  toggleItem === null || toggleItem === void 0 ? void 0 : toggleItem(e, value);
61
61
  });
62
- // This will give us the onKeyDown and onKeyUp props for Enter and Space
63
- const buttonProps = (0, _reactaria.useARIAButtonProps)('div', {
64
- onClick: handleClick,
62
+ // avoid passing empty onClick to prevent items unnecessary being narrated as clickable
63
+ // see https://github.com/microsoft/fluentui/issues/20658
64
+ const passClickHandler = !!onClick || isSelectionEnabled;
65
+ const clickHandlerProps = {
66
+ onClick: passClickHandler ? handleClick : undefined,
65
67
  onKeyDown: onKeyDown,
66
68
  onKeyUp: onKeyUp
67
- });
69
+ };
70
+ // This will give us the onKeyDown and onKeyUp props for Enter and Space
71
+ const ariaButtonProps = (0, _reactaria.useARIAButtonProps)('div', clickHandlerProps);
72
+ // v0 ListItem adds keyboard handling only for navigable or selectable items
73
+ const buttonProps = navigable || isSelectionEnabled ? ariaButtonProps : clickHandlerProps;
68
74
  const root = _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)(DEFAULT_ROOT_EL_TYPE, {
69
75
  ref: ref,
70
76
  tabIndex: navigable || isSelectionEnabled ? 0 : undefined,
@@ -1 +1 @@
1
- {"version":3,"sources":["useListItem.js"],"sourcesContent":["import { useARIAButtonProps } from '@fluentui/react-aria';\nimport { getIntrinsicElementProps, slot, useEventCallback, useId } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useListContext_unstable } from '../List/listContext';\nconst DEFAULT_ROOT_EL_TYPE = 'li';\nfunction validateProperElementTypes(parentRenderedAs, renderedAs) {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n if (renderedAs === 'div' && parentRenderedAs !== 'div') {\n throw new Error('ListItem cannot be rendered as a div when its parent is not a div.');\n }\n if (renderedAs === 'li' && parentRenderedAs === 'div') {\n throw new Error('ListItem cannot be rendered as a li when its parent is a div.');\n }\n}\nfunction validateNavigableWhenOnClickPresent(navigable, onClick) {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n if (onClick && !navigable) {\n throw new Error('ListItem must be navigable when onClick is present. Set navigable={true} on the List.');\n }\n}\n/**\n * Create the state required to render ListItem.\n *\n * The returned state can be modified with hooks such as useListItemStyles_unstable,\n * before being passed to renderListItem_unstable.\n *\n * @param props - props from this instance of ListItem\n * @param ref - reference to root HTMLLIElement | HTMLDivElementof ListItem\n */ export const useListItem_unstable = (props, ref)=>{\n const id = useId('listItem');\n const { value = id, truncateHeader, truncateContent, onClick, onKeyDown, onKeyUp } = props;\n const navigable = useListContext_unstable((ctx)=>ctx.navigable);\n const toggleItem = useListContext_unstable((ctx)=>{\n var _ctx_selection;\n return (_ctx_selection = ctx.selection) === null || _ctx_selection === void 0 ? void 0 : _ctx_selection.toggleItem;\n });\n const isSelectionEnabled = useListContext_unstable((ctx)=>!!ctx.selection);\n const isSelected = useListContext_unstable((ctx)=>{\n var _ctx_selection;\n return (_ctx_selection = ctx.selection) === null || _ctx_selection === void 0 ? void 0 : _ctx_selection.isSelected(value);\n });\n const truncateHeaderOnList = useListContext_unstable((ctx)=>ctx.truncateHeader);\n const truncateContentOnList = useListContext_unstable((ctx)=>ctx.truncateContent);\n const parentRenderedAs = useListContext_unstable((ctx)=>ctx.as);\n const renderedAs = props.as || DEFAULT_ROOT_EL_TYPE;\n validateProperElementTypes(parentRenderedAs, renderedAs);\n validateNavigableWhenOnClickPresent(navigable, onClick);\n const handleClick = useEventCallback((e)=>{\n onClick === null || onClick === void 0 ? void 0 : onClick(e);\n if (!isSelectionEnabled || e.defaultPrevented) {\n return;\n }\n toggleItem === null || toggleItem === void 0 ? void 0 : toggleItem(e, value);\n });\n // This will give us the onKeyDown and onKeyUp props for Enter and Space\n const buttonProps = useARIAButtonProps('div', {\n onClick: handleClick,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp\n });\n const root = slot.always(getIntrinsicElementProps(DEFAULT_ROOT_EL_TYPE, {\n ref: ref,\n tabIndex: navigable || isSelectionEnabled ? 0 : undefined,\n role: navigable ? 'menuitem' : 'listitem',\n id: String(value),\n ...isSelectionEnabled && {\n role: 'option',\n 'aria-selected': isSelected\n },\n ...props,\n onKeyDown: buttonProps.onKeyDown,\n onKeyUp: buttonProps.onKeyUp,\n onClick: buttonProps.onClick\n }), {\n elementType: DEFAULT_ROOT_EL_TYPE\n });\n const state = {\n components: {\n root: DEFAULT_ROOT_EL_TYPE,\n media: 'div',\n header: 'div',\n contentWrapper: 'div',\n headerMedia: 'div',\n contentMedia: 'div',\n endMedia: 'div'\n },\n root,\n navigable,\n selectable: isSelectionEnabled,\n selected: isSelected,\n media: slot.optional(props.media, {\n elementType: 'div'\n }),\n header: slot.optional(props.header, {\n elementType: 'div'\n }),\n contentWrapper: slot.optional(props.contentWrapper, {\n elementType: 'div',\n renderByDefault: true\n }),\n headerMedia: slot.optional(props.headerMedia, {\n elementType: 'div'\n }),\n contentMedia: slot.optional(props.contentMedia, {\n elementType: 'div'\n }),\n endMedia: slot.optional(props.endMedia, {\n elementType: 'div'\n }),\n truncateHeader: truncateHeader !== null && truncateHeader !== void 0 ? truncateHeader : truncateHeaderOnList,\n truncateContent: truncateContent !== null && truncateContent !== void 0 ? truncateContent : truncateContentOnList\n };\n return state;\n};\n"],"names":["useListItem_unstable","DEFAULT_ROOT_EL_TYPE","validateProperElementTypes","parentRenderedAs","renderedAs","process","env","NODE_ENV","Error","validateNavigableWhenOnClickPresent","navigable","onClick","props","ref","id","useId","value","truncateHeader","truncateContent","onKeyDown","onKeyUp","useListContext_unstable","ctx","toggleItem","_ctx_selection","selection","isSelectionEnabled","isSelected","truncateHeaderOnList","truncateContentOnList","as","handleClick","useEventCallback","e","defaultPrevented","buttonProps","useARIAButtonProps","root","slot","always","getIntrinsicElementProps","tabIndex","undefined","role","String","elementType","state","components","media","header","contentWrapper","headerMedia","contentMedia","endMedia","selectable","selected","optional","renderByDefault"],"mappings":";;;;+BAgCiBA;;;eAAAA;;;;2BAhCkB;gCACqC;iEACjD;6BACiB;AACxC,MAAMC,uBAAuB;AAC7B,SAASC,2BAA2BC,gBAAgB,EAAEC,UAAU;IAC5D,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACvC;IACJ;IACA,IAAIH,eAAe,SAASD,qBAAqB,OAAO;QACpD,MAAM,IAAIK,MAAM;IACpB;IACA,IAAIJ,eAAe,QAAQD,qBAAqB,OAAO;QACnD,MAAM,IAAIK,MAAM;IACpB;AACJ;AACA,SAASC,oCAAoCC,SAAS,EAAEC,OAAO;IAC3D,IAAIN,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACvC;IACJ;IACA,IAAII,WAAW,CAACD,WAAW;QACvB,MAAM,IAAIF,MAAM;IACpB;AACJ;AASW,MAAMR,uBAAuB,CAACY,OAAOC;IAC5C,MAAMC,KAAKC,IAAAA,qBAAK,EAAC;IACjB,MAAM,EAAEC,QAAQF,EAAE,EAAEG,cAAc,EAAEC,eAAe,EAAEP,OAAO,EAAEQ,SAAS,EAAEC,OAAO,EAAE,GAAGR;IACrF,MAAMF,YAAYW,IAAAA,oCAAuB,EAAC,CAACC,MAAMA,IAAIZ,SAAS;IAC9D,MAAMa,aAAaF,IAAAA,oCAAuB,EAAC,CAACC;QACxC,IAAIE;QACJ,OAAO,AAACA,CAAAA,iBAAiBF,IAAIG,SAAS,AAAD,MAAO,QAAQD,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeD,UAAU;IACtH;IACA,MAAMG,qBAAqBL,IAAAA,oCAAuB,EAAC,CAACC,MAAM,CAAC,CAACA,IAAIG,SAAS;IACzE,MAAME,aAAaN,IAAAA,oCAAuB,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QACVC,YAAY;YACRV,MAAMpC;YACN+C,OAAO;YACPC,QAAQ;YACRC,gBAAgB;YAChBC,aAAa;YACbC,cAAc;YACdC,UAAU;QACd;QACAhB;QACA3B;QACA4C,YAAY5B;QACZ6B,UAAU5B;QACVqB,OAAOV,oBAAI,CAACkB,QAAQ,CAAC5C,MAAMoC,KAAK,EAAE;YAC9BH,aAAa;QACjB;QACAI,QAAQX,oBAAI,CAACkB,QAAQ,CAAC5C,MAAMqC,MAAM,EAAE;YAChCJ,aAAa;QACjB;QACAK,gBAAgBZ,oBAAI,CAACkB,QAAQ,CAAC5C,MAAMsC,cAAc,EAAE;YAChDL,aAAa;YACbY,iBAAiB;QACrB;QACAN,aAAab,oBAAI,CAACkB,QAAQ,CAAC5C,MAAMuC,WAAW,EAAE;YAC1CN,aAAa;QACjB;QACAO,cAAcd,oBAAI,CAACkB,QAAQ,CAAC5C,MAAMwC,YAAY,EAAE;YAC5CP,aAAa;QACjB;QACAQ,UAAUf,oBAAI,CAACkB,QAAQ,CAAC5C,MAAMyC,QAAQ,EAAE;YACpCR,aAAa;QACjB;QACA5B,gBAAgBA,mBAAmB,QAAQA,mBAAmB,KAAK,IAAIA,iBAAiBW;QACxFV,iBAAiBA,oBAAoB,QAAQA,oBAAoB,KAAK,IAAIA,kBAAkBW;IAChG;IACA,OAAOiB;AACX"}
1
+ {"version":3,"sources":["useListItem.tsx"],"sourcesContent":["import { useARIAButtonProps } from '@fluentui/react-aria';\nimport { getIntrinsicElementProps, slot, useEventCallback, useId } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useListContext_unstable } from '../List/listContext';\nimport type { ListItemProps, ListItemState } from './ListItem.types';\n\nconst DEFAULT_ROOT_EL_TYPE = 'li';\n\nfunction validateProperElementTypes(parentRenderedAs?: 'div' | 'ul' | 'ol', renderedAs?: 'div' | 'li') {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n\n if (renderedAs === 'div' && parentRenderedAs !== 'div') {\n throw new Error('ListItem cannot be rendered as a div when its parent is not a div.');\n }\n if (renderedAs === 'li' && parentRenderedAs === 'div') {\n throw new Error('ListItem cannot be rendered as a li when its parent is a div.');\n }\n}\n\nfunction validateNavigableWhenOnClickPresent(navigable: boolean, onClick?: React.MouseEventHandler) {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n\n if (onClick && !navigable) {\n throw new Error('ListItem must be navigable when onClick is present. Set navigable={true} on the List.');\n }\n}\n\n/**\n * Create the state required to render ListItem.\n *\n * The returned state can be modified with hooks such as useListItemStyles_unstable,\n * before being passed to renderListItem_unstable.\n *\n * @param props - props from this instance of ListItem\n * @param ref - reference to root HTMLLIElement | HTMLDivElementof ListItem\n */\nexport const useListItem_unstable = (\n props: ListItemProps,\n ref: React.Ref<HTMLLIElement | HTMLDivElement>,\n): ListItemState => {\n const id = useId('listItem');\n const { value = id, truncateHeader, truncateContent, onClick, onKeyDown, onKeyUp } = props;\n\n const navigable = useListContext_unstable(ctx => ctx.navigable);\n const toggleItem = useListContext_unstable(ctx => ctx.selection?.toggleItem);\n const isSelectionEnabled = useListContext_unstable(ctx => !!ctx.selection);\n const isSelected = useListContext_unstable(ctx => ctx.selection?.isSelected(value));\n\n const truncateHeaderOnList = useListContext_unstable(ctx => ctx.truncateHeader);\n const truncateContentOnList = useListContext_unstable(ctx => ctx.truncateContent);\n\n const parentRenderedAs = useListContext_unstable(ctx => ctx.as);\n const renderedAs = props.as || DEFAULT_ROOT_EL_TYPE;\n\n validateProperElementTypes(parentRenderedAs, renderedAs);\n\n validateNavigableWhenOnClickPresent(navigable, onClick);\n\n const handleClick: React.MouseEventHandler<HTMLLIElement & HTMLDivElement> = useEventCallback(e => {\n onClick?.(e);\n\n if (!isSelectionEnabled || e.defaultPrevented) {\n return;\n }\n\n toggleItem?.(e, value);\n });\n\n // avoid passing empty onClick to prevent items unnecessary being narrated as clickable\n // see https://github.com/microsoft/fluentui/issues/20658\n const passClickHandler = !!onClick || isSelectionEnabled;\n\n const clickHandlerProps = {\n onClick: passClickHandler ? handleClick : undefined,\n onKeyDown: onKeyDown as React.KeyboardEventHandler<HTMLLIElement & HTMLDivElement>,\n onKeyUp: onKeyUp as React.KeyboardEventHandler<HTMLLIElement & HTMLDivElement>,\n };\n\n // This will give us the onKeyDown and onKeyUp props for Enter and Space\n const ariaButtonProps = useARIAButtonProps('div', clickHandlerProps);\n\n // v0 ListItem adds keyboard handling only for navigable or selectable items\n const buttonProps = navigable || isSelectionEnabled ? ariaButtonProps : clickHandlerProps;\n\n const root = slot.always(\n getIntrinsicElementProps(DEFAULT_ROOT_EL_TYPE, {\n ref: ref as React.Ref<HTMLLIElement & HTMLDivElement>,\n tabIndex: navigable || isSelectionEnabled ? 0 : undefined,\n role: navigable ? 'menuitem' : 'listitem',\n id: String(value),\n ...(isSelectionEnabled && {\n role: 'option',\n 'aria-selected': isSelected,\n }),\n ...props,\n onKeyDown: buttonProps.onKeyDown as React.KeyboardEventHandler<HTMLLIElement & HTMLDivElement>,\n onKeyUp: buttonProps.onKeyUp as React.KeyboardEventHandler<HTMLLIElement & HTMLDivElement>,\n onClick: buttonProps.onClick as React.MouseEventHandler<HTMLLIElement & HTMLDivElement>,\n }),\n { elementType: DEFAULT_ROOT_EL_TYPE },\n );\n\n const state: ListItemState = {\n components: {\n root: DEFAULT_ROOT_EL_TYPE,\n media: 'div',\n header: 'div',\n contentWrapper: 'div',\n headerMedia: 'div',\n contentMedia: 'div',\n endMedia: 'div',\n },\n root,\n navigable,\n selectable: isSelectionEnabled,\n selected: isSelected,\n media: slot.optional(props.media, { elementType: 'div' }),\n header: slot.optional(props.header, { elementType: 'div' }),\n contentWrapper: slot.optional(props.contentWrapper, { elementType: 'div', renderByDefault: true }),\n headerMedia: slot.optional(props.headerMedia, { elementType: 'div' }),\n contentMedia: slot.optional(props.contentMedia, { elementType: 'div' }),\n endMedia: slot.optional(props.endMedia, { elementType: 'div' }),\n truncateHeader: truncateHeader ?? truncateHeaderOnList,\n truncateContent: truncateContent ?? truncateContentOnList,\n };\n\n return state;\n};\n"],"names":["useListItem_unstable","DEFAULT_ROOT_EL_TYPE","validateProperElementTypes","parentRenderedAs","renderedAs","process","env","NODE_ENV","Error","validateNavigableWhenOnClickPresent","navigable","onClick","props","ref","id","useId","value","truncateHeader","truncateContent","onKeyDown","onKeyUp","useListContext_unstable","ctx","toggleItem","selection","isSelectionEnabled","isSelected","truncateHeaderOnList","truncateContentOnList","as","handleClick","useEventCallback","e","defaultPrevented","passClickHandler","clickHandlerProps","undefined","ariaButtonProps","useARIAButtonProps","buttonProps","root","slot","always","getIntrinsicElementProps","tabIndex","role","String","elementType","state","components","media","header","contentWrapper","headerMedia","contentMedia","endMedia","selectable","selected","optional","renderByDefault"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAwCaA;;;eAAAA;;;;2BAxCsB;gCACqC;iEACjD;6BACiB;AAGxC,MAAMC,uBAAuB;AAE7B,SAASC,2BAA2BC,gBAAsC,EAAEC,UAAyB;IACnG,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC;IACF;IAEA,IAAIH,eAAe,SAASD,qBAAqB,OAAO;QACtD,MAAM,IAAIK,MAAM;IAClB;IACA,IAAIJ,eAAe,QAAQD,qBAAqB,OAAO;QACrD,MAAM,IAAIK,MAAM;IAClB;AACF;AAEA,SAASC,oCAAoCC,SAAkB,EAAEC,OAAiC;IAChG,IAAIN,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC;IACF;IAEA,IAAII,WAAW,CAACD,WAAW;QACzB,MAAM,IAAIF,MAAM;IAClB;AACF;AAWO,MAAMR,uBAAuB,CAClCY,OACAC;IAEA,MAAMC,KAAKC,IAAAA,qBAAAA,EAAM;IACjB,MAAM,EAAEC,QAAQF,EAAE,EAAEG,cAA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;YAAEP,aAAa;QAAM;QACrEQ,UAAUd,oBAAAA,CAAKiB,QAAQ,CAAC9C,MAAM2C,QAAQ,EAAE;YAAER,aAAa;QAAM;QAC7D9B,gBAAgBA,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,iBAAkBU;QAClCT,iBAAiBA,oBAAAA,QAAAA,oBAAAA,KAAAA,IAAAA,kBAAmBU;IACtC;IAEA,OAAOoB;AACT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useListItemStyles.styles.js"],"sourcesContent":["import { __styles, __resetStyles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nexport const listItemClassNames = {\n root: 'fui-ListItem',\n media: 'fui-ListItem__media',\n header: 'fui-ListItem__header',\n contentWrapper: 'fui-ListItem__contentWrapper',\n headerMedia: 'fui-ListItem__headerMedia',\n contentMedia: 'fui-ListItem__contentMedia',\n endMedia: 'fui-ListItem__endMedia'\n};\nconst useRootBaseStyles = /*#__PURE__*/__resetStyles(\"rn7e01x\", null, [\".rn7e01x{padding:0 10px;margin:0;text-indent:0;list-style-type:none;}\", \".rn7e01x[data-fui-focus-visible]{outline:var(--strokeWidthThick) solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);}\"]);\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n contentWrapper: {\n Be2twd7: \"fy9rknc\"\n },\n contentWrapperWithoutMedia: {\n Bw0ie65: \"fsyjsko\"\n },\n truncate: {\n B68tc82: 0,\n Bmxbyg5: 0,\n Bpg54ce: \"f1a3p1vp\",\n j4b8c3: \"fv6wr3j\",\n ygn44y: \"f1cmbuwj\"\n },\n rootSelected: {\n De3pzq: \"f1nfm20t\"\n },\n rootClickable: {\n Bceei9c: \"f1k6fduh\",\n Jwef8y: \"f1knas48\"\n }\n}, {\n d: [\".fy9rknc{font-size:var(--fontSizeBase200);}\", \".fsyjsko{grid-column-end:4;}\", [\".f1a3p1vp{overflow:hidden;}\", {\n p: -1\n }], \".fv6wr3j{text-wrap:nowrap;}\", \".f1cmbuwj{text-overflow:ellipsis;}\", \".f1nfm20t{background-color:var(--colorNeutralBackground1Selected);}\", \".f1k6fduh{cursor:pointer;}\"],\n h: [\".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}\"]\n});\n/**\n * Apply styling to the ListItem slots based on the state\n */\nexport const useListItemStyles_unstable = state => {\n 'use no memo';\n\n const rootBaseStyles = useRootBaseStyles();\n const styles = useStyles();\n state.root.className = mergeClasses(listItemClassNames.root, rootBaseStyles, (state.selectable || state.navigable) && styles.rootClickable, state.selected && styles.rootSelected, state.root.className);\n if (state.header) {\n var _state_header;\n state.header.className = mergeClasses(state.truncateHeader && styles.truncate, (_state_header = state.header) === null || _state_header === void 0 ? void 0 : _state_header.className);\n }\n if (state.contentWrapper) {\n var _state_contentWrapper;\n state.contentWrapper.className = mergeClasses(styles.contentWrapper, state.truncateContent && styles.truncate, !state.contentMedia && styles.contentWrapperWithoutMedia, (_state_contentWrapper = state.contentWrapper) === null || _state_contentWrapper === void 0 ? void 0 : _state_contentWrapper.className);\n }\n return state;\n};\n//# sourceMappingURL=useListItemStyles.styles.js.map"],"names":["listItemClassNames","useListItemStyles_unstable","root","media","header","contentWrapper","headerMedia","contentMedia","endMedia","useRootBaseStyles","__resetStyles","useStyles","__styles","Be2twd7","contentWrapperWithoutMedia","Bw0ie65","truncate","B68tc82","Bmxbyg5","Bpg54ce","j4b8c3","ygn44y","rootSelected","De3pzq","rootClickable","Bceei9c","Jwef8y","d","p","h","state","rootBaseStyles","styles","className","mergeClasses","selectable","navigable","selected","_state_header","truncateHeader","_state_contentWrapper","truncateContent"],"mappings":";;;;;;;;;;;IAGaA,kBAAkB;eAAlBA;;IA2CAC,0BAA0B;eAA1BA;;;uBA9CyC;AAG/C,MAAMD,qBAAqB;IAChCE,MAAM;IACNC,OAAO;IACPC,QAAQ;IACRC,gBAAgB;IAChBC,aA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AAC4B,SAAS,GAAGC,IAAAA,mBAAY,EAACF,OAAO3B,cAAc,EAAEyB,MAAMW,eAAe,IAAIT,OAAOhB,QAAQ,EAAE,CAACc,MAAMvB,YAAY,IAAIyB,OAAOlB,0BAA0B,EAAE,AAAC0B,CAAAA,wBAAwBV,MAAMzB,cAAc,AAAD,MAAO,QAAQmC,0BAA0B,KAAK,IAAI,KAAK,IAAIA,sBAAsBP,SAAS;IACjT;IACA,OAAOH;AACT,GACA,oDAAoD"}
1
+ {"version":3,"sources":["useListItemStyles.styles.js"],"sourcesContent":["import { makeStyles, makeResetStyles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nexport const listItemClassNames = {\n root: 'fui-ListItem',\n media: 'fui-ListItem__media',\n header: 'fui-ListItem__header',\n contentWrapper: 'fui-ListItem__contentWrapper',\n headerMedia: 'fui-ListItem__headerMedia',\n contentMedia: 'fui-ListItem__contentMedia',\n endMedia: 'fui-ListItem__endMedia'\n};\nconst useRootBaseStyles = makeResetStyles({\n padding: '0 10px',\n margin: 0,\n textIndent: 0,\n listStyleType: 'none',\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,\n borderRadius: tokens.borderRadiusMedium\n }, {\n selector: 'focus'\n })\n});\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n contentWrapper: {\n fontSize: tokens.fontSizeBase200\n },\n // The content should go all the way to the end if the content media is not present\n contentWrapperWithoutMedia: {\n gridColumnEnd: 4\n },\n truncate: {\n overflow: 'hidden',\n textWrap: 'nowrap',\n textOverflow: 'ellipsis'\n },\n rootSelected: {\n backgroundColor: tokens.colorNeutralBackground1Selected\n },\n rootClickable: {\n cursor: 'pointer',\n '&:hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover\n }\n }\n});\n/**\n * Apply styling to the ListItem slots based on the state\n */ export const useListItemStyles_unstable = (state)=>{\n 'use no memo';\n const rootBaseStyles = useRootBaseStyles();\n const styles = useStyles();\n state.root.className = mergeClasses(listItemClassNames.root, rootBaseStyles, (state.selectable || state.navigable) && styles.rootClickable, state.selected && styles.rootSelected, state.root.className);\n if (state.header) {\n var _state_header;\n state.header.className = mergeClasses(state.truncateHeader && styles.truncate, (_state_header = state.header) === null || _state_header === void 0 ? void 0 : _state_header.className);\n }\n if (state.contentWrapper) {\n var _state_contentWrapper;\n state.contentWrapper.className = mergeClasses(styles.contentWrapper, state.truncateContent && styles.truncate, !state.contentMedia && styles.contentWrapperWithoutMedia, (_state_contentWrapper = state.contentWrapper) === null || _state_contentWrapper === void 0 ? void 0 : _state_contentWrapper.className);\n }\n return state;\n};\n"],"names":["listItemClassNames","useListItemStyles_unstable","root","media","header","contentWrapper","headerMedia","contentMedia","endMedia","useRootBaseStyles","__resetStyles","useStyles","__styles","Be2twd7","contentWrapperWithoutMedia","Bw0ie65","truncate","B68tc82","Bmxbyg5","Bpg54ce","j4b8c3","ygn44y","rootSelected","De3pzq","rootClickable","Bceei9c","Jwef8y","d","p","h","state","rootBaseStyles","styles","className","mergeClasses","selectable","navigable","selected","_state_header","truncateHeader","_state_contentWrapper","truncateContent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAGaA,kBAAkB;eAAlBA;;IAgDIC,0BAA0B;eAA1BA;;;uBAnDyC;AAGnD,MAAMD,qBAAqB;IAC9BE,MAAM;IACNC,OAAO;IACPC,QAAQ;IACRC,gBAAgB;IAChBC,aAAa;IACbC,cAAc;IACdC,UAAU;AACd;AACA,MAAMC,oBAAiB,WAAA,GAAGC,IAAAA,oBAAA,EAAA,WAAA,MAAA;IAAA;IAAA;CAWzB;AACD;;CAEA,GAAI,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAP,gBAAA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c,AAAdA,MAAoB,QAAQmC,0BAA0B,KAAK,IAAI,KAAK,IAAIA,sBAAsBP,SAAS;IACnT;IACA,OAAOH;AACX"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './useListSelection';\n"],"names":[],"mappings":";;;;;uBAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './useListSelection';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
@@ -1 +1 @@
1
- {"version":3,"sources":["types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;iEAAuB"}
1
+ {"version":3,"sources":["types.ts"],"sourcesContent":["import { SelectionItemId } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nexport type ListSelectionState = {\n isSelected: (item: string | number) => boolean;\n toggleItem: (e: React.SyntheticEvent, id: string | number) => void;\n deselectItem: (e: React.SyntheticEvent, id: string | number) => void;\n selectItem: (e: React.SyntheticEvent, id: string | number) => void;\n clearSelection: (e: React.SyntheticEvent) => void;\n toggleAllItems: (e: React.SyntheticEvent, itemIds: string[] | number[]) => void;\n setSelectedItems: React.Dispatch<React.SetStateAction<Iterable<SelectionItemId>>>;\n selectedItems: SelectionItemId[];\n};\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEACuB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useListSelection.js"],"sourcesContent":["import { useControllableState, useEventCallback, useSelection } from '@fluentui/react-utilities';\nimport * as React from 'react';\nexport function useListSelection(options = {\n selectionMode: 'multiselect'\n}) {\n const { selectionMode, defaultSelectedItems, onSelectionChange } = options;\n const [selectedItems, setSelectedItems] = useControllableState({\n state: options.selectedItems,\n defaultState: defaultSelectedItems,\n initialState: []\n });\n const [selected, selectionMethods] = useSelection({\n selectionMode,\n defaultSelectedItems,\n selectedItems,\n onSelectionChange: (e, data)=>{\n setSelectedItems(data.selectedItems);\n onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(e, data);\n }\n });\n const toggleItem = useEventCallback((e, itemId)=>selectionMethods.toggleItem(e, itemId));\n const toggleAllItems = useEventCallback((e, itemIds)=>{\n selectionMethods.toggleAllItems(e, itemIds);\n });\n const deselectItem = useEventCallback((e, itemId)=>selectionMethods.deselectItem(e, itemId));\n const selectItem = useEventCallback((e, itemId)=>selectionMethods.selectItem(e, itemId));\n const clearSelection = useEventCallback((e)=>selectionMethods.clearItems(e));\n const selectedArray = React.useMemo(()=>Array.from(selected), [\n selected\n ]);\n return {\n selectedItems: selectedArray,\n toggleItem,\n toggleAllItems,\n deselectItem,\n selectItem,\n setSelectedItems,\n isSelected: (id)=>selectionMethods.isSelected(id),\n clearSelection\n };\n}\n"],"names":["useListSelection","options","selectionMode","defaultSelectedItems","onSelectionChange","selectedItems","setSelectedItems","useControllableState","state","defaultState","initialState","selected","selectionMethods","useSelection","e","data","toggleItem","useEventCallback","itemId","toggleAllItems","itemIds","deselectItem","selectItem","clearSelection","clearItems","selectedArray","React","useMemo","Array","from","isSelected","id"],"mappings":";;;;+BAEgBA;;;eAAAA;;;;gCAFqD;iEAC9C;AAChB,SAASA,iBAAiBC,UAAU;IACvCC,eAAe;AACnB,CAAC;IACG,MAAM,EAAEA,aAAa,EAAEC,oBAAoB,EAAEC,iBAAiB,EAAE,GAAGH;IACnE,MAAM,CAACI,eAAeC,iBAAiB,GAAGC,IAAAA,oCAAoB,EAAC;QAC3DC,OAAOP,QAAQI,aAAa;QAC5BI,cAAcN;QACdO,cAAc,EAAE;IACpB;IACA,MAAM,CAACC,UAAUC,iBAAiB,GAAGC,IAAAA,4BAAY,EAAC;QAC9CX;QACAC;QACAE;QACAD,mBAAmB,CAACU,GAAGC;YACnBT,iBAAiBS,KAAKV,aAAa;YACnCD,sBAAsB,QAAQA,sBAAsB,KAAK,IAAI,KAAK,IAAIA,kBAAkBU,GAAGC;QAC/F;IACJ;IACA,MAAMC,aAAaC,IAAAA,gCAAgB,EAAC,CAACH,GAAGI,SAASN,iBAAiBI,UAAU,CAACF,GAAGI;IAChF,MAAMC,iBAAiBF,IAAAA,gCAAgB,EAAC,CAACH,GAAGM;QACxCR,iBAAiBO,cAAc,CAACL,GAAGM;IACvC;IACA,MAAMC,eAAeJ,IAAAA,gCAAgB,EAAC,CAACH,GAAGI,SAASN,iBAAiBS,YAAY,CAACP,GAAGI;IACpF,MAAMI,aAAaL,IAAAA,gCAAgB,EAAC,CAACH,GAAGI,SAASN,iBAAiBU,UAAU,CAACR,GAAGI;IAChF,MAAMK,iBAAiBN,IAAAA,gCAAgB,EAAC,CAACH,IAAIF,iBAAiBY,UAAU,CAACV;IACzE,MAAMW,gBAAgBC,OAAMC,OAAO,CAAC,IAAIC,MAAMC,IAAI,CAAClB,WAAW;QAC1DA;KACH;IACD,OAAO;QACHN,eAAeoB;QACfT;QACAG;QACAE;QACAC;QACAhB;QACAwB,YAAY,CAACC,KAAKnB,iBAAiBkB,UAAU,CAACC;QAC9CR;IACJ;AACJ"}
1
+ {"version":3,"sources":["useListSelection.tsx"],"sourcesContent":["import { SelectionHookParams, useControllableState, useEventCallback, useSelection } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport type { ListSelectionState } from './types';\n\nexport function useListSelection(options: SelectionHookParams = { selectionMode: 'multiselect' }): ListSelectionState {\n const { selectionMode, defaultSelectedItems, onSelectionChange } = options;\n\n const [selectedItems, setSelectedItems] = useControllableState({\n state: options.selectedItems,\n defaultState: defaultSelectedItems,\n initialState: [],\n });\n\n const [selected, selectionMethods] = useSelection({\n selectionMode,\n defaultSelectedItems,\n selectedItems,\n onSelectionChange: (e, data) => {\n setSelectedItems(data.selectedItems);\n onSelectionChange?.(e, data);\n },\n });\n\n const toggleItem: ListSelectionState['toggleItem'] = useEventCallback((e, itemId) =>\n selectionMethods.toggleItem(e, itemId),\n );\n\n const toggleAllItems: ListSelectionState['toggleAllItems'] = useEventCallback((e, itemIds) => {\n selectionMethods.toggleAllItems(e, itemIds);\n });\n\n const deselectItem: ListSelectionState['deselectItem'] = useEventCallback((e, itemId: string | number) =>\n selectionMethods.deselectItem(e, itemId),\n );\n\n const selectItem: ListSelectionState['selectItem'] = useEventCallback((e, itemId: string | number) =>\n selectionMethods.selectItem(e, itemId),\n );\n\n const clearSelection: ListSelectionState['clearSelection'] = useEventCallback(e => selectionMethods.clearItems(e));\n\n const selectedArray = React.useMemo(() => Array.from(selected), [selected]);\n\n return {\n selectedItems: selectedArray,\n toggleItem,\n toggleAllItems,\n deselectItem,\n selectItem,\n setSelectedItems,\n isSelected: (id: string | number) => selectionMethods.isSelected(id),\n clearSelection,\n };\n}\n"],"names":["useListSelection","options","selectionMode","defaultSelectedItems","onSelectionChange","selectedItems","setSelectedItems","useControllableState","state","defaultState","initialState","selected","selectionMethods","useSelection","e","data","toggleItem","useEventCallback","itemId","toggleAllItems","itemIds","deselectItem","selectItem","clearSelection","clearItems","selectedArray","React","useMemo","Array","from","isSelected","id"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAIgBA;;;eAAAA;;;;gCAJ0E;iEACnE;AAGhB,SAASA,iBAAiBC,UAA+B;IAAEC,eAAe;AAAc,CAAC;IAC9F,MAAM,EAAEA,aAAa,EAAEC,oBAAoB,EAAEC,iBAAiB,EAAE,GAAGH;IAEnE,MAAM,CAACI,eAAeC,iBAAiB,GAAGC,IAAAA,oCAAAA,EAAqB;QAC7DC,OAAOP,QAAQI,aAAa;QAC5BI,cAAcN;QACdO,cAAc,EAAE;IAClB;IAEA,MAAM,CAACC,UAAUC,iBAAiB,GAAGC,IAAAA,4BAAAA,EAAa;QAChDX;QACAC;QACAE;QACAD,mBAAmB,CAACU,GAAGC;YACrBT,iBAAiBS,KAAKV,aAAa;YACnCD,sBAAAA,QAAAA,sBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,kBAAoBU,GAAGC;QACzB;IACF;IAEA,MAAMC,aAA+CC,IAAAA,gCAAAA,EAAiB,CAACH,GAAGI,SACxEN,iBAAiBI,UAAU,CAACF,GAAGI;IAGjC,MAAMC,iBAAuDF,IAAAA,gCAAAA,EAAiB,CAACH,GAAGM;QAChFR,iBAAiBO,cAAc,CAACL,GAAGM;IACrC;IAEA,MAAMC,eAAmDJ,IAAAA,gCAAAA,EAAiB,CAACH,GAAGI,SAC5EN,iBAAiBS,YAAY,CAACP,GAAGI;IAGnC,MAAMI,aAA+CL,IAAAA,gCAAAA,EAAiB,CAACH,GAAGI,SACxEN,iBAAiBU,UAAU,CAACR,GAAGI;IAGjC,MAAMK,iBAAuDN,IAAAA,gCAAAA,EAAiBH,CAAAA,IAAKF,iBAAiBY,UAAU,CAACV;IAE/G,MAAMW,gBAAgBC,OAAMC,OAAO,CAAC,IAAMC,MAAMC,IAAI,CAAClB,WAAW;QAACA;KAAS;IAE1E,OAAO;QACLN,eAAeoB;QACfT;QACAG;QACAE;QACAC;QACAhB;QACAwB,YAAY,CAACC,KAAwBnB,iBAAiBkB,UAAU,CAACC;QACjER;IACF;AACF"}
@@ -12,27 +12,21 @@ _export(exports, {
12
12
  List: function() {
13
13
  return _List.List;
14
14
  },
15
- listClassNames: function() {
16
- return _List.listClassNames;
17
- },
18
- renderList_unstable: function() {
19
- return _List.renderList_unstable;
20
- },
21
- useListStyles_unstable: function() {
22
- return _List.useListStyles_unstable;
23
- },
24
- useList_unstable: function() {
25
- return _List.useList_unstable;
26
- },
27
15
  ListItem: function() {
28
16
  return _ListItem.ListItem;
29
17
  },
18
+ listClassNames: function() {
19
+ return _List.listClassNames;
20
+ },
30
21
  listItemClassNames: function() {
31
22
  return _ListItem.listItemClassNames;
32
23
  },
33
24
  renderListItem_unstable: function() {
34
25
  return _ListItem.renderListItem_unstable;
35
26
  },
27
+ renderList_unstable: function() {
28
+ return _List.renderList_unstable;
29
+ },
36
30
  useListItemStyles_unstable: function() {
37
31
  return _ListItem.useListItemStyles_unstable;
38
32
  },
@@ -41,6 +35,12 @@ _export(exports, {
41
35
  },
42
36
  useListSelection: function() {
43
37
  return _hooks.useListSelection;
38
+ },
39
+ useListStyles_unstable: function() {
40
+ return _List.useListStyles_unstable;
41
+ },
42
+ useList_unstable: function() {
43
+ return _List.useList_unstable;
44
44
  }
45
45
  });
46
46
  const _List = require("./List");
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export { List, listClassNames, renderList_unstable, useListStyles_unstable, useList_unstable } from './List';\nexport { ListItem, listItemClassNames, renderListItem_unstable, useListItemStyles_unstable, useListItem_unstable } from './ListItem';\nexport { useListSelection } from './hooks';\n"],"names":["List","listClassNames","renderList_unstable","useListStyles_unstable","useList_unstable","ListItem","listItemClassNames","renderListItem_unstable","useListItemStyles_unstable","useListItem_unstable","useListSelection"],"mappings":";;;;;;;;;;;IAASA,IAAI;eAAJA,UAAI;;IAAEC,cAAc;eAAdA,oBAAc;;IAAEC,mBAAmB;eAAnBA,yBAAmB;;IAAEC,sBAAsB;eAAtBA,4BAAsB;;IAAEC,gBAAgB;eAAhBA,sBAAgB;;IACnFC,QAAQ;eAARA,kBAAQ;;IAAEC,kBAAkB;eAAlBA,4BAAkB;;IAAEC,uBAAuB;eAAvBA,iCAAuB;;IAAEC,0BAA0B;eAA1BA,oCAA0B;;IAAEC,oBAAoB;eAApBA,8BAAoB;;IACvGC,gBAAgB;eAAhBA,uBAAgB;;;sBAF2E;0BACoB;uBACvF"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { List, listClassNames, renderList_unstable, useListStyles_unstable, useList_unstable } from './List';\nexport type { ListProps, ListSlots, ListState } from './List';\n\nexport {\n ListItem,\n listItemClassNames,\n renderListItem_unstable,\n useListItemStyles_unstable,\n useListItem_unstable,\n} from './ListItem';\nexport type { ListItemProps, ListItemSlots, ListItemState } from './ListItem';\n\nexport { useListSelection } from './hooks';\n"],"names":["List","ListItem","listClassNames","listItemClassNames","renderListItem_unstable","renderList_unstable","useListItemStyles_unstable","useListItem_unstable","useListSelection","useListStyles_unstable","useList_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,IAAI;eAAJA,UAAI;;IAIXC,QAAQ;eAARA,kBAAQ;;IAJKC,cAAc;eAAdA,oBAAc;;IAK3BC,kBAAkB;eAAlBA,4BAAkB;;IAClBC,uBAAuB;eAAvBA,iCAAuB;;IANMC,mBAAmB;eAAnBA,yBAAmB;;IAOhDC,0BAA0B;eAA1BA,oCAA0B;;IAC1BC,oBAAoB;eAApBA,8BAAoB;;IAIbC,gBAAgB;eAAhBA,uBAAgB;;IAZ2BC,sBAAsB;eAAtBA,4BAAsB;;IAAEC,gBAAgB;eAAhBA,sBAAgB;;;sBAAQ;0BAS7F;uBAG0B"}
@@ -9,11 +9,11 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- primitiveClassName: function() {
13
- return primitiveClassName;
14
- },
15
12
  Primitive: function() {
16
13
  return Primitive;
14
+ },
15
+ primitiveClassName: function() {
16
+ return primitiveClassName;
17
17
  }
18
18
  });
19
19
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
@@ -1 +1 @@
1
- {"version":3,"sources":["Primitive.js"],"sourcesContent":["import * as React from 'react';\nimport { mergeClasses } from '@fluentui/react-components';\nexport const primitiveClassName = 'fui-Primitive';\nexport const Primitive = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const { as: Component = 'div', ...rest } = props;\n const dir = typeof props.children === 'string' ? 'auto' : undefined;\n const className = mergeClasses(primitiveClassName, props.className);\n return /*#__PURE__*/ React.createElement(Component, {\n dir: dir,\n ...rest,\n className: className,\n ref: ref\n });\n});\nPrimitive.displayName = 'Primitive';\n"],"names":["primitiveClassName","Primitive","React","forwardRef","props","ref","as","Component","rest","dir","children","undefined","className","mergeClasses","createElement","displayName"],"mappings":";;;;;;;;;;;IAEaA,kBAAkB;eAAlBA;;IACAC,SAAS;eAATA;;;;iEAHU;iCACM;AACtB,MAAMD,qBAAqB;AAC3B,MAAMC,YAAY,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC5D,MAAM,EAAEC,IAAIC,YAAY,KAAK,EAAE,GAAGC,MAAM,GAAGJ;IAC3C,MAAMK,MAAM,OAAOL,MAAMM,QAAQ,KAAK,WAAW,SAASC;IAC1D,MAAMC,YAAYC,IAAAA,6BAAY,EAACb,oBAAoBI,MAAMQ,SAAS;IAClE,OAAO,WAAW,GAAGV,OAAMY,aAAa,CAACP,WAAW;QAChDE,KAAKA;QACL,GAAGD,IAAI;QACPI,WAAWA;QACXP,KAAKA;IACT;AACJ;AACAJ,UAAUc,WAAW,GAAG"}
1
+ {"version":3,"sources":["Primitive.tsx"],"sourcesContent":["import * as React from 'react';\nimport { mergeClasses } from '@fluentui/react-components';\n\n// Simplified version from https://github.com/reach/reach-ui/blob/55d28eda39afc4c667e97f5f62a48d1de034b93f/packages/utils/src/polymorphic.ts\ninterface PrimitiveComponent {\n /**\n * Infers props from JSX.IntrinsicElements based on \"as\" value. Explicitly avoids `React.ElementType` and manually\n * narrow the prop types so that events are typed when using JSX.IntrinsicElements.\n */\n <As extends keyof JSX.IntrinsicElements>(props: { as?: As } & JSX.IntrinsicElements[As]): React.ReactElement | null;\n\n displayName: string;\n}\n\nexport const primitiveClassName = 'fui-Primitive';\n\nexport const Primitive = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLElement> & { as: 'div' }>(\n (props, ref) => {\n const { as: Component = 'div', ...rest } = props;\n\n const dir = typeof props.children === 'string' ? 'auto' : undefined;\n\n const className = mergeClasses(primitiveClassName, props.className);\n\n return <Component dir={dir} {...rest} className={className} ref={ref} />;\n },\n) as PrimitiveComponent;\n\nPrimitive.displayName = 'Primitive';\n"],"names":["Primitive","primitiveClassName","React","forwardRef","props","ref","as","Component","rest","dir","children","undefined","className","mergeClasses","createElement","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAgBaA,SAAAA;eAAAA;;IAFAC,kBAAAA;eAAAA;;;;iEAdU;iCACM;AAatB,MAAMA,qBAAqB;AAE3B,MAAMD,YAAAA,WAAAA,GAAYE,OAAMC,UAAU,CACvC,CAACC,OAAOC;IACN,MAAM,EAAEC,IAAIC,YAAY,KAAK,EAAE,GAAGC,MAAM,GAAGJ;IAE3C,MAAMK,MAAM,OAAOL,MAAMM,QAAQ,KAAK,WAAW,SAASC;IAE1D,MAAMC,YAAYC,IAAAA,6BAAAA,EAAaZ,oBAAoBG,MAAMQ,SAAS;IAElE,OAAA,WAAA,GAAOV,OAAAY,aAAA,CAACP,WAAAA;QAAUE,KAAKA;QAAM,GAAGD,IAAI;QAAEI,WAAWA;QAAWP,KAAKA;;AACnE;AAGFL,UAAUe,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './Primitive';\n"],"names":[],"mappings":";;;;;uBAAc"}
1
+ {"version":3,"sources":["index.tsx"],"sourcesContent":["export * from './Primitive';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
@@ -9,11 +9,11 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- segmentClassName: function() {
13
- return segmentClassName;
14
- },
15
12
  Segment: function() {
16
13
  return Segment;
14
+ },
15
+ segmentClassName: function() {
16
+ return segmentClassName;
17
17
  }
18
18
  });
19
19
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
@@ -1 +1 @@
1
- {"version":3,"sources":["Segment.js"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\nimport { useSegmentStyles } from './Segment.styles';\nexport const segmentClassName = 'fui-Segment';\nexport const Segment = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const { children, className, ...rest } = props;\n const classes = useSegmentStyles();\n const segmentClasses = mergeClasses(segmentClassName, classes.segment, className);\n return /*#__PURE__*/ React.createElement(\"div\", {\n ref: ref,\n className: segmentClasses,\n ...rest\n }, children);\n});\nSegment.displayName = 'Segment';\n"],"names":["segmentClassName","Segment","React","forwardRef","props","ref","children","className","rest","classes","useSegmentStyles","segmentClasses","mergeClasses","segment","createElement","displayName"],"mappings":";;;;;;;;;;;IAGaA,gBAAgB;eAAhBA;;IACAC,OAAO;eAAPA;;;;iCAJgB;iEACN;+BACU;AAC1B,MAAMD,mBAAmB;AACzB,MAAMC,UAAU,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC1D,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGC,MAAM,GAAGJ;IACzC,MAAMK,UAAUC,IAAAA,+BAAgB;IAChC,MAAMC,iBAAiBC,IAAAA,6BAAY,EAACZ,kBAAkBS,QAAQI,OAAO,EAAEN;IACvE,OAAO,WAAW,GAAGL,OAAMY,aAAa,CAAC,OAAO;QAC5CT,KAAKA;QACLE,WAAWI;QACX,GAAGH,IAAI;IACX,GAAGF;AACP;AACAL,QAAQc,WAAW,GAAG"}
1
+ {"version":3,"sources":["Segment.tsx"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\n\nimport { useSegmentStyles } from './Segment.styles';\n\nexport const segmentClassName = 'fui-Segment';\n\nexport const Segment = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLElement>>((props, ref) => {\n const { children, className, ...rest } = props;\n const classes = useSegmentStyles();\n\n const segmentClasses = mergeClasses(segmentClassName, classes.segment, className);\n\n return (\n <div ref={ref} className={segmentClasses} {...rest}>\n {children}\n </div>\n );\n});\n\nSegment.displayName = 'Segment';\n"],"names":["Segment","segmentClassName","React","forwardRef","props","ref","children","className","rest","classes","useSegmentStyles","segmentClasses","mergeClasses","segment","createElement","div","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAOaA,OAAAA;eAAAA;;IAFAC,gBAAAA;eAAAA;;;;iCALgB;iEACN;+BAEU;AAE1B,MAAMA,mBAAmB;AAEzB,MAAMD,UAAAA,WAAAA,GAAUE,OAAMC,UAAU,CAAoD,CAACC,OAAOC;IACjG,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGC,MAAM,GAAGJ;IACzC,MAAMK,UAAUC,IAAAA,+BAAAA;IAEhB,MAAMC,iBAAiBC,IAAAA,6BAAAA,EAAaX,kBAAkBQ,QAAQI,OAAO,EAAEN;IAEvE,OAAA,WAAA,GACEL,OAAAY,aAAA,CAACC,OAAAA;QAAIV,KAAKA;QAAKE,WAAWI;QAAiB,GAAGH,IAAI;OAC/CF;AAGP;AAEAN,QAAQgB,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Segment.styles.js"],"sourcesContent":["import { __styles, shorthands, tokens } from '@fluentui/react-components';\nexport const useSegmentStyles = /*#__PURE__*/__styles({\n segment: {\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"f8cpqjf\",\n B4j52fo: \"ftac7j7\",\n Bekrc4i: [\"f1358rze\", \"f1rvrf73\"],\n Bn0qgzm: \"fqdk4by\",\n ibv6hh: [\"f1rvrf73\", \"f1358rze\"],\n g2u3we: \"f1p3nwhy\",\n h3c5rm: [\"f11589ue\", \"f1pdflbu\"],\n B9xav0g: \"f1q5o8ev\",\n zhjwy3: [\"f1pdflbu\", \"f11589ue\"],\n icvyot: \"fzkkow9\",\n vrafjx: [\"fcdblym\", \"fjik90z\"],\n oivjwe: \"fg706s2\",\n wvpqe5: [\"fjik90z\", \"fcdblym\"],\n De3pzq: \"fxugw4r\",\n E5pizo: \"f16uyjdj\"\n }\n}, {\n d: [[\".f8cpqjf{padding:1em;}\", {\n p: -1\n }], \".ftac7j7{border-top-width:2px;}\", \".f1358rze{border-right-width:0;}\", \".f1rvrf73{border-left-width:0;}\", \".fqdk4by{border-bottom-width:0;}\", \".f1p3nwhy{border-top-color:transparent;}\", \".f11589ue{border-right-color:transparent;}\", \".f1pdflbu{border-left-color:transparent;}\", \".f1q5o8ev{border-bottom-color:transparent;}\", \".fzkkow9{border-top-style:solid;}\", \".fcdblym{border-right-style:solid;}\", \".fjik90z{border-left-style:solid;}\", \".fg706s2{border-bottom-style:solid;}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".f16uyjdj{box-shadow:0 1px 1px 1px var(--colorNeutralShadowKey);}\"]\n});\n//# sourceMappingURL=Segment.styles.js.map"],"names":["useSegmentStyles","__styles","segment","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","g2u3we","h3c5rm","B9xav0g","zhjwy3","icvyot","vrafjx","oivjwe","wvpqe5","De3pzq","E5pizo","d","p"],"mappings":";;;;+BACaA;;;eAAAA;;;iCADgC;AACtC,MAAMA,mBAAmB,WAAW,GAAEC,IAAAA,yBAAQ,EAAC;IACpDC,SAAS;QACPC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAW;QACjCC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAW;QAChCC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAW;QAChCC,QAAQ;QACRC,QAAQ;YAAC;YAAW;SAAU;QAC9BC,QAAQ;QACRC,QAAQ;YAAC;YAAW;SAAU;QAC9BC,QAAQ;QACRC,QAAQ;IACV;AACF,GAAG;IACDC,GAAG;QAAC;YAAC;YAA0B;gBAC7BC,GAAG,CAAC;YACN;SAAE;QAAE;QAAmC;QAAoC;QAAmC;QAAoC;QAA4C;QAA8C;QAA6C;QAA+C;QAAqC;QAAuC;QAAsC;QAAwC;QAA8D;KAAoE;AACtmB,IACA,0CAA0C"}
1
+ {"version":3,"sources":["Segment.styles.js"],"sourcesContent":["import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\nexport const useSegmentStyles = makeStyles({\n segment: {\n padding: '1em',\n ...shorthands.borderWidth('2px', 0, 0),\n ...shorthands.borderColor('transparent'),\n ...shorthands.borderStyle('solid'),\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: `0 1px 1px 1px ${tokens.colorNeutralShadowKey}`\n }\n});\n"],"names":["useSegmentStyles","__styles","segment","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","g2u3we","h3c5rm","B9xav0g","zhjwy3","icvyot","vrafjx","oivjwe","wvpqe5","De3pzq","E5pizo","d","p"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BACaA;;;eAAAA;;;iCADkC;AACxC,MAAMA,mBAAgB,WAAA,GAAGC,IAAAA,yBAAA,EAAA;IAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;YAAA;YAAA;SAAA;QAAAC,SAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,QAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,SAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,QAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,QAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,QAAA;QAAAC,QAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;YAAA;YAAA;gBAAAC,GAAA,CAAA;YAAA;SAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './Segment';\n"],"names":[],"mappings":";;;;;uBAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Segment';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Slider.mixins.js"],"sourcesContent":["const fluid = ()=>({\n width: '100%'\n });\nexport const slider = {\n fluid\n};\n"],"names":["slider","fluid","width"],"mappings":";;;;+BAGaA;;;eAAAA;;;AAHb,MAAMC,QAAQ,IAAK,CAAA;QACXC,OAAO;IACX,CAAA;AACG,MAAMF,SAAS;IAClBC;AACJ"}
1
+ {"version":3,"sources":["Slider.mixins.ts"],"sourcesContent":["import { GriffelStyle } from '@fluentui/react-components';\n\nconst fluid = (): GriffelStyle => ({ width: '100%' });\n\nexport const slider = {\n fluid,\n};\n"],"names":["slider","fluid","width"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":";;;;+BAIaA;;;eAAAA;;;AAFb,MAAMC,QAAQ,IAAqB,CAAA;QAAEC,OAAO;IAAO,CAAA;AAE5C,MAAMF,SAAS;IACpBC;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export { slider } from './Slider.mixins';\n"],"names":["slider"],"mappings":";;;;+BAASA;;;eAAAA,oBAAM;;;8BAAQ"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { slider } from './Slider.mixins';\n"],"names":["slider"],"rangeMappings":";;;;;;;;;;","mappings":";;;;+BAASA;;;eAAAA,oBAAM;;;8BAAQ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["SpinnerMigration.mixins.js"],"sourcesContent":["import { tokens, labelClassNames } from '@fluentui/react-components';\nconst v0Inline = ()=>({\n display: 'inline-flex'\n });\nconst v0SpinnerLabelStyle = ()=>({\n [`& .${labelClassNames.root}`]: {\n fontSize: '14px',\n fontWeight: tokens.fontWeightMedium\n }\n });\nexport const spinner = {\n v0Inline,\n v0SpinnerLabelStyle\n};\n"],"names":["spinner","v0Inline","display","v0SpinnerLabelStyle","labelClassNames","root","fontSize","fontWeight","tokens","fontWeightMedium"],"mappings":";;;;+BAUaA;;;eAAAA;;;iCAV2B;AACxC,MAAMC,WAAW,IAAK,CAAA;QACdC,SAAS;IACb,CAAA;AACJ,MAAMC,sBAAsB,IAAK,CAAA;QACzB,CAAC,CAAC,GAAG,EAAEC,gCAAe,CAACC,IAAI,CAAC,CAAC,CAAC,EAAE;YAC5BC,UAAU;YACVC,YAAYC,uBAAM,CAACC,gBAAgB;QACvC;IACJ,CAAA;AACG,MAAMT,UAAU;IACnBC;IACAE;AACJ"}
1
+ {"version":3,"sources":["SpinnerMigration.mixins.ts"],"sourcesContent":["import { GriffelStyle, tokens, labelClassNames } from '@fluentui/react-components';\n\nconst v0Inline = (): GriffelStyle => ({ display: 'inline-flex' });\n\nconst v0SpinnerLabelStyle = (): GriffelStyle => ({\n [`& .${labelClassNames.root}`]: {\n fontSize: '14px',\n fontWeight: tokens.fontWeightMedium,\n },\n});\n\nexport const spinner = {\n v0Inline,\n v0SpinnerLabelStyle,\n};\n"],"names":["spinner","v0Inline","display","v0SpinnerLabelStyle","labelClassNames","root","fontSize","fontWeight","tokens","fontWeightMedium"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;iCAXyC;AAEtD,MAAMC,WAAW,IAAqB,CAAA;QAAEC,SAAS;IAAc,CAAA;AAE/D,MAAMC,sBAAsB,IAAqB,CAAA;QAC/C,CAAC,CAAC,GAAG,EAAEC,gCAAAA,CAAgBC,IAAI,CAAC,CAAC,CAAC,EAAE;YAC9BC,UAAU;YACVC,YAAYC,uBAAAA,CAAOC,gBAAgB;QACrC;IACF,CAAA;AAEO,MAAMT,UAAU;IACrBC;IACAE;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export { spinner } from './SpinnerMigration.mixins';\n"],"names":["spinner"],"mappings":";;;;+BAASA;;;eAAAA,+BAAO;;;wCAAQ"}
1
+ {"version":3,"sources":["index.tsx"],"sourcesContent":["export { spinner } from './SpinnerMigration.mixins';\n"],"names":["spinner"],"rangeMappings":";;;;;;;;;;","mappings":";;;;+BAASA;;;eAAAA,+BAAO;;;wCAAQ"}
@@ -9,11 +9,11 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- styledTextClassName: function() {
13
- return styledTextClassName;
14
- },
15
12
  StyledText: function() {
16
13
  return StyledText;
14
+ },
15
+ styledTextClassName: function() {
16
+ return styledTextClassName;
17
17
  }
18
18
  });
19
19
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
@@ -1 +1 @@
1
- {"version":3,"sources":["StyledText.js"],"sourcesContent":[" import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport * as React from 'react';\nimport { getIntrinsicElementProps, mergeClasses, slot } from '@fluentui/react-components';\nimport { useSizeStyles, useStyles, useWeightStyles } from './StyledText.styles';\nexport const styledTextClassName = 'fui-StyledText';\nconst sizeMap = {\n '100': 'base100',\n '200': 'base200',\n '300': 'base300',\n '400': 'base400',\n '500': 'base500',\n '600': 'base600',\n '700': 'hero700',\n smaller: 'base100',\n small: 'base200',\n medium: 'base300',\n large: 'base400',\n large500: 'base500',\n larger: 'base600',\n largest: 'hero700'\n};\nexport const StyledText = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const { align, atMention, disabled, error, important, success, temporary, timestamp, truncate, weight, wrap = true } = props;\n const dir = typeof props.children === 'string' ? 'auto' : undefined;\n const sizeStyles = useSizeStyles();\n const weightStyles = useWeightStyles();\n const styles = useStyles();\n const size = props.size ? sizeMap[props.size] : props.size;\n const RootSlot = slot.always(getIntrinsicElementProps('span', {\n ref,\n ...props,\n dir,\n className: mergeClasses(styledTextClassName, size && sizeStyles[size], weight && weightStyles[weight], wrap === false && styles.nowrap, truncate && styles.truncate, align === 'center' && styles.alignCenter, align === 'end' && styles.alignEnd, align === 'justify' && styles.alignJustify, atMention && styles.mention, atMention === 'me' && styles.mentionMe, disabled && styles.disabled, error && styles.error, important && styles.important, success && styles.success, temporary && styles.temporary, timestamp && styles.timestamp, props.className)\n }), {\n elementType: 'span'\n });\n return /*#__PURE__*/ _jsx(RootSlot, {});\n});\nStyledText.displayName = 'StyledText';\n"],"names":["styledTextClassName","StyledText","sizeMap","smaller","small","medium","large","large500","larger","largest","React","forwardRef","props","ref","align","atMention","disabled","error","important","success","temporary","timestamp","truncate","weight","wrap","dir","children","undefined","sizeStyles","useSizeStyles","weightStyles","useWeightStyles","styles","useStyles","size","RootSlot","slot","always","getIntrinsicElementProps","className","mergeClasses","nowrap","alignCenter","alignEnd","alignJustify","mention","mentionMe","elementType","_jsx","displayName"],"mappings":";;;;;;;;;;;IAIaA,mBAAmB;eAAnBA;;IAiBAC,UAAU;eAAVA;;;;4BArBiB;iEACP;iCACsC;kCACH;AACnD,MAAMD,sBAAsB;AACnC,MAAME,UAAU;IACZ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACPC,SAAS;IACTC,OAAO;IACPC,QAAQ;IACRC,OAAO;IACPC,UAAU;IACVC,QAAQ;IACRC,SAAS;AACb;AACO,MAAMR,aAAa,WAAW,GAAGS,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7D,MAAM,EAAEC,KAAK,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,SAAS,EAAEC,OAAO,EAAEC,SAAS,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,OAAO,IAAI,EAAE,GAAGZ;IACvH,MAAMa,MAAM,OAAOb,MAAMc,QAAQ,KAAK,WAAW,SAASC;IAC1D,MAAMC,aAAaC,IAAAA,+BAAa;IAChC,MAAMC,eAAeC,IAAAA,iCAAe;IACpC,MAAMC,SAASC,IAAAA,2BAAS;IACxB,MAAMC,OAAOtB,MAAMsB,IAAI,GAAGhC,OAAO,CAACU,MAAMsB,IAAI,CAAC,GAAGtB,MAAMsB,IAAI;IAC1D,MAAMC,WAAWC,qBAAI,CAACC,MAAM,CAACC,IAAAA,yCAAwB,EAAC,QAAQ;QAC1DzB;QACA,GAAGD,KAAK;QACRa;QACAc,WAAWC,IAAAA,6BAAY,EAACxC,qBAAqBkC,QAAQN,UAAU,CAACM,KAAK,EAAEX,UAAUO,YAAY,CAACP,OAAO,EAAEC,SAAS,SAASQ,OAAOS,MAAM,EAAEnB,YAAYU,OAAOV,QAAQ,EAAER,UAAU,YAAYkB,OAAOU,WAAW,EAAE5B,UAAU,SAASkB,OAAOW,QAAQ,EAAE7B,UAAU,aAAakB,OAAOY,YAAY,EAAE7B,aAAaiB,OAAOa,OAAO,EAAE9B,cAAc,QAAQiB,OAAOc,SAAS,EAAE9B,YAAYgB,OAAOhB,QAAQ,EAAEC,SAASe,OAAOf,KAAK,EAAEC,aAAac,OAAOd,SAAS,EAAEC,WAAWa,OAAOb,OAAO,EAAEC,aAAaY,OAAOZ,SAAS,EAAEC,aAAaW,OAAOX,SAAS,EAAET,MAAM2B,SAAS;IACniB,IAAI;QACAQ,aAAa;IACjB;IACA,OAAO,WAAW,GAAGC,IAAAA,eAAI,EAACb,UAAU,CAAC;AACzC;AACAlC,WAAWgD,WAAW,GAAG"}
1
+ {"version":3,"sources":["StyledText.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, mergeClasses, Slot, ComponentProps, slot } from '@fluentui/react-components';\nimport { useSizeStyles, useStyles, useWeightStyles } from './StyledText.styles';\n\nexport type StyledTextSlots = {\n root: Slot<'span', 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'pre' | 'time'>;\n};\n\nexport type StyledTextProps = ComponentProps<StyledTextSlots> & {\n /**\n * Aligns text based on the parent container.\n */\n align?: 'start' | 'center' | 'end' | 'justify';\n\n /**\n * At mentions can be formatted to draw users' attention.\n * Mentions for \"me\" can be formatted to appear differently.\n */\n atMention?: 'me' | boolean;\n\n /**\n * Set as disabled StyledText component\n */\n disabled?: boolean;\n\n /**\n * Set as error StyledText component\n */\n error?: boolean;\n\n /**\n * The StyledText can appear more important and draw user's attention\n */\n important?: boolean;\n\n /**\n * Applies font size and line height based on the theme tokens.\n */\n size?:\n | 'smaller'\n | 'small'\n | 'medium'\n | 'large'\n | 'large500'\n | 'larger'\n | 'largest'\n | 100\n | 200\n | 300\n | 400\n | 500\n | 600\n | 700;\n\n /**\n * Set as success StyledText component\n */\n success?: boolean;\n\n /**\n * The text can signify a temporary state\n */\n temporary?: boolean;\n\n /**\n * Set as timestamp StyledText component\n */\n timestamp?: boolean;\n\n /**\n * Truncate overflowing text for block displays.\n */\n truncate?: boolean;\n\n /**\n * Applies font weight to the content.\n */\n weight?: 'light' | 'semilight' | 'regular' | 'medium' | 'semibold' | 'bold';\n\n /**\n * Wraps the text content on white spaces.\n *\n * @default true\n */\n wrap?: boolean;\n};\n\nexport const styledTextClassName = 'fui-StyledText';\n\nconst sizeMap: Record<string, 'base100' | 'base200' | 'base300' | 'base400' | 'base500' | 'base600' | 'hero700'> = {\n '100': 'base100',\n '200': 'base200',\n '300': 'base300',\n '400': 'base400',\n '500': 'base500',\n '600': 'base600',\n '700': 'hero700',\n smaller: 'base100',\n small: 'base200',\n medium: 'base300',\n large: 'base400',\n large500: 'base500',\n larger: 'base600',\n largest: 'hero700',\n};\n\nexport const StyledText = React.forwardRef<HTMLSpanElement, StyledTextProps>((props, ref) => {\n const {\n align,\n atMention,\n disabled,\n error,\n important,\n success,\n temporary,\n timestamp,\n truncate,\n weight,\n wrap = true,\n } = props;\n\n const dir = typeof props.children === 'string' ? 'auto' : undefined;\n\n const sizeStyles = useSizeStyles();\n const weightStyles = useWeightStyles();\n const styles = useStyles();\n\n const size = props.size ? sizeMap[props.size] : props.size;\n\n const RootSlot = slot.always(\n getIntrinsicElementProps('span', {\n ref,\n ...props,\n dir,\n className: mergeClasses(\n styledTextClassName,\n size && sizeStyles[size],\n weight && weightStyles[weight],\n wrap === false && styles.nowrap,\n truncate && styles.truncate,\n align === 'center' && styles.alignCenter,\n align === 'end' && styles.alignEnd,\n align === 'justify' && styles.alignJustify,\n\n atMention && styles.mention,\n atMention === 'me' && styles.mentionMe,\n disabled && styles.disabled,\n error && styles.error,\n important && styles.important,\n success && styles.success,\n temporary && styles.temporary,\n timestamp && styles.timestamp,\n props.className,\n ),\n }),\n { elementType: 'span' },\n );\n\n return <RootSlot />;\n});\n\nStyledText.displayName = 'StyledText';\n"],"names":["StyledText","styledTextClassName","sizeMap","smaller","small","medium","large","large500","larger","largest","React","forwardRef","props","ref","align","atMention","disabled","error","important","success","temporary","timestamp","truncate","weight","wrap","dir","children","undefined","sizeStyles","useSizeStyles","weightStyles","useWeightStyles","styles","useStyles","size","RootSlot","slot","always","getIntrinsicElementProps","className","mergeClasses","nowrap","alignCenter","alignEnd","alignJustify","mention","mentionMe","elementType","_jsx","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IA6GaA,UAAAA;eAAAA;;IAnBAC,mBAAAA;eAAAA;;;;4BAzFb;iEAEuB;iCAC4D;kCACzB;AAqFnD,MAAMA,sBAAsB;AAEnC,MAAMC,UAA6G;IACjH,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACPC,SAAS;IACTC,OAAO;IACPC,QAAQ;IACRC,OAAO;IACPC,UAAU;IACVC,QAAQ;IACRC,SAAS;AACX;AAEO,MAAMT,aAAAA,WAAAA,GAAaU,OAAMC,UAAU,CAAmC,CAACC,OAAOC;IACnF,MAAM,EACJC,KAAK,EACLC,SAAS,EACTC,QAAQ,EACRC,KAAK,EACLC,SAAS,EACTC,OAAO,EACPC,SAAS,EACTC,SAAS,EACTC,QAAQ,EACRC,MAAM,EACNC,OAAO,IAAI,EACZ,GAAGZ;IAEJ,MAAMa,MAAM,OAAOb,MAAMc,QAAQ,KAAK,WAAW,SAASC;IAE1D,MAAMC,aAAaC,IAAAA,+BAAAA;IACnB,MAAMC,eAAeC,IAAAA,iCAAAA;IACrB,MAAMC,SAASC,IAAAA,2BAAAA;IAEf,MAAMC,OAAOtB,MAAMsB,IAAI,GAAGhC,OAAO,CAACU,MAAMsB,IAAI,CAAC,GAAGtB,MAAMsB,IAAI;IAE1D,MAAMC,WAAWC,qBAAAA,CAAKC,MAAM,CAC1BC,IAAAA,yCAAAA,EAAyB,QAAQ;QAC/BzB;QACA,GAAGD,KAAK;QACRa;QACAc,WAAWC,IAAAA,6BAAAA,EACTvC,qBACAiC,QAAQN,UAAU,CAACM,KAAK,EACxBX,UAAUO,YAAY,CAACP,OAAO,EAC9BC,SAAS,SAASQ,OAAOS,MAAM,EAC/BnB,YAAYU,OAAOV,QAAQ,EAC3BR,UAAU,YAAYkB,OAAOU,WAAW,EACxC5B,UAAU,SAASkB,OAAOW,QAAQ,EAClC7B,UAAU,aAAakB,OAAOY,YAAY,EAE1C7B,aAAaiB,OAAOa,OAAO,EAC3B9B,cAAc,QAAQiB,OAAOc,SAAS,EACtC9B,YAAYgB,OAAOhB,QAAQ,EAC3BC,SAASe,OAAOf,KAAK,EACrBC,aAAac,OAAOd,SAAS,EAC7BC,WAAWa,OAAOb,OAAO,EACzBC,aAAaY,OAAOZ,SAAS,EAC7BC,aAAaW,OAAOX,SAAS,EAC7BT,MAAM2B,SAAS;IAEnB,IACA;QAAEQ,aAAa;IAAO;IAGxB,OAAA,WAAA,GAAOC,IAAAA,eAAA,EAACb,UAAAA,CAAAA;AACV;AAEAnC,WAAWiD,WAAW,GAAG"}
@@ -12,11 +12,11 @@ _export(exports, {
12
12
  useSizeStyles: function() {
13
13
  return useSizeStyles;
14
14
  },
15
- useWeightStyles: function() {
16
- return useWeightStyles;
17
- },
18
15
  useStyles: function() {
19
16
  return useStyles;
17
+ },
18
+ useWeightStyles: function() {
19
+ return useWeightStyles;
20
20
  }
21
21
  });
22
22
  const _reactcomponents = require("@fluentui/react-components");
@@ -1 +1 @@
1
- {"version":3,"sources":["StyledText.styles.js"],"sourcesContent":["import { __styles, tokens } from '@fluentui/react-components';\nexport const useSizeStyles = /*#__PURE__*/__styles({\n base100: {\n Be2twd7: \"f13mqy1h\",\n Bg96gwp: \"fcpl73t\"\n },\n base200: {\n Be2twd7: \"fy9rknc\",\n Bg96gwp: \"fwrc4pm\"\n },\n base300: {\n Be2twd7: \"fkhj508\",\n Bg96gwp: \"f1i3iumi\"\n },\n base400: {\n Be2twd7: \"fod5ikn\",\n Bg96gwp: \"faaz57k\"\n },\n base500: {\n Be2twd7: \"f1pp30po\",\n Bg96gwp: \"f106mvju\"\n },\n base600: {\n Be2twd7: \"f1x0m3f5\",\n Bg96gwp: \"fb86gi6\"\n },\n hero700: {\n Be2twd7: \"fojgt09\",\n Bg96gwp: \"fcen8rp\"\n }\n}, {\n d: [\".f13mqy1h{font-size:var(--fontSizeBase100);}\", \".fcpl73t{line-height:var(--lineHeightBase100);}\", \".fy9rknc{font-size:var(--fontSizeBase200);}\", \".fwrc4pm{line-height:var(--lineHeightBase200);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\", \".fod5ikn{font-size:var(--fontSizeBase400);}\", \".faaz57k{line-height:var(--lineHeightBase400);}\", \".f1pp30po{font-size:var(--fontSizeBase500);}\", \".f106mvju{line-height:var(--lineHeightBase500);}\", \".f1x0m3f5{font-size:var(--fontSizeBase600);}\", \".fb86gi6{line-height:var(--lineHeightBase600);}\", \".fojgt09{font-size:var(--fontSizeHero700);}\", \".fcen8rp{line-height:var(--lineHeightHero700);}\"]\n});\nexport const useWeightStyles = /*#__PURE__*/__styles({\n light: {\n Bhrd7zp: \"f3wt7jm\"\n },\n semilight: {\n Bhrd7zp: \"f13vlhzf\"\n },\n regular: {\n Bhrd7zp: \"f71fsbu\"\n },\n medium: {\n Bhrd7zp: \"f1hd9hm2\"\n },\n semibold: {\n Bhrd7zp: \"fhuq1gn\"\n },\n bold: {\n Bhrd7zp: \"f1leeax8\"\n }\n}, {\n d: [\".f3wt7jm{font-weight:200;}\", \".f13vlhzf{font-weight:300;}\", \".f71fsbu{font-weight:400;}\", \".f1hd9hm2{font-weight:500;}\", \".fhuq1gn{font-weight:600;}\", \".f1leeax8{font-weight:700;}\"]\n});\nexport const useStyles = /*#__PURE__*/__styles({\n mention: {\n sj55zd: \"fyind8e\"\n },\n mentionMe: {\n sj55zd: \"f1ouce03\",\n Bhrd7zp: \"f1leeax8\"\n },\n disabled: {\n sj55zd: \"f1s2aq7o\"\n },\n error: {\n sj55zd: \"f1whyuy6\"\n },\n important: {\n sj55zd: \"f1l8vj45\",\n Bhrd7zp: \"f1leeax8\"\n },\n success: {\n sj55zd: \"f1m7fhi8\"\n },\n temporary: {\n B80ckks: \"f1j4dglz\"\n },\n timestamp: {\n sj55zd: \"f11d4kpn\"\n },\n nowrap: {\n Huce71: \"fz5stix\",\n B68tc82: 0,\n Bmxbyg5: 0,\n Bpg54ce: \"f1a3p1vp\"\n },\n truncate: {\n ygn44y: \"f1cmbuwj\"\n },\n alignCenter: {\n fsow6f: \"f17mccla\"\n },\n alignEnd: {\n fsow6f: \"f12ymhq5\"\n },\n alignJustify: {\n fsow6f: \"f1j59e10\"\n }\n}, {\n d: [\".fyind8e{color:var(--colorBrandForegroundLink);}\", \".f1ouce03{color:var(--colorPalettePumpkinBorderActive);}\", \".f1leeax8{font-weight:700;}\", \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".f1whyuy6{color:var(--colorPaletteRedForeground3);}\", \".f1l8vj45{color:var(--colorPaletteDarkOrangeForeground3);}\", \".f1m7fhi8{color:var(--colorPaletteGreenForeground3);}\", \".f1j4dglz{font-style:italic;}\", \".f11d4kpn{color:var(--colorNeutralForeground3);}\", \".fz5stix{white-space:nowrap;}\", [\".f1a3p1vp{overflow:hidden;}\", {\n p: -1\n }], \".f1cmbuwj{text-overflow:ellipsis;}\", \".f17mccla{text-align:center;}\", \".f12ymhq5{text-align:end;}\", \".f1j59e10{text-align:justify;}\"]\n});\n//# sourceMappingURL=StyledText.styles.js.map"],"names":["useSizeStyles","useWeightStyles","useStyles","__styles","base100","Be2twd7","Bg96gwp","base200","base300","base400","base500","base600","hero700","d","light","Bhrd7zp","semilight","regular","medium","semibold","bold","mention","sj55zd","mentionMe","disabled","error","important","success","temporary","B80ckks","timestamp","nowrap","Huce71","B68tc82","Bmxbyg5","Bpg54ce","truncate","ygn44y","alignCenter","fsow6f","alignEnd","alignJustify","p"],"mappings":";;;;;;;;;;;IACaA,aAAa;eAAbA;;IAgCAC,eAAe;eAAfA;;IAsBAC,SAAS;eAATA;;;iCAvDoB;AAC1B,MAAMF,gBAAgB,WAAW,GAAEG,IAAAA,yBAAQ,EAAC;IACjDC,SAAS;QACPC,SAAS;QACTC,SAAS;IACX;IACAC,SAAS;QACPF,SAAS;QACTC,SAAS;IACX;IACAE,SAAS;QACPH,SAAS;QACTC,SAAS;IACX;IACAG,SAAS;QACPJ,SAAS;QACTC,SAAS;IACX;IACAI,SAAS;QACPL,SAAS;QACTC,SAAS;IACX;IACAK,SAAS;QACPN,SAAS;QACTC,SAAS;IACX;IACAM,SAAS;QACPP,SAAS;QACTC,SAAS;IACX;AACF,GAAG;IACDO,GAAG;QAAC;QAAgD;QAAmD;QAA+C;QAAmD;QAA+C;QAAoD;QAA+C;QAAmD;QAAgD;QAAoD;QAAgD;QAAmD;QAA+C;KAAkD;AACxrB;AACO,MAAMZ,kBAAkB,WAAW,GAAEE,IAAAA,yBAAQ,EAAC;IACnDW,OAAO;QACLC,SAAS;IACX;IACAC,WAAW;QACTD,SAAS;IACX;IACAE,SAAS;QACPF,SAAS;IACX;IACAG,QAAQ;QACNH,SAAS;IACX;IACAI,UAAU;QACRJ,SAAS;IACX;IACAK,MAAM;QACJL,SAAS;IACX;AACF,GAAG;IACDF,GAAG;QAAC;QAA8B;QAA+B;QAA8B;QAA+B;QAA8B;KAA8B;AAC5L;AACO,MAAMX,YAAY,WAAW,GAAEC,IAAAA,yBAAQ,EAAC;IAC7CkB,SAAS;QACPC,QAAQ;IACV;IACAC,WAAW;QACTD,QAAQ;QACRP,SAAS;IACX;IACAS,UAAU;QACRF,QAAQ;IACV;IACAG,OAAO;QACLH,QAAQ;IACV;IACAI,WAAW;QACTJ,QAAQ;QACRP,SAAS;IACX;IACAY,SAAS;QACPL,QAAQ;IACV;IACAM,WAAW;QACTC,SAAS;IACX;IACAC,WAAW;QACTR,QAAQ;IACV;IACAS,QAAQ;QACNC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,SAAS;IACX;IACAC,UAAU;QACRC,QAAQ;IACV;IACAC,aAAa;QACXC,QAAQ;IACV;IACAC,UAAU;QACRD,QAAQ;IACV;IACAE,cAAc;QACZF,QAAQ;IACV;AACF,GAAG;IACD1B,GAAG;QAAC;QAAoD;QAA4D;QAA+B;QAA2D;QAAuD;QAA8D;QAAyD;QAAiC;QAAoD;QAAiC;YAAC;YAA+B;gBAChhB6B,GAAG,CAAC;YACN;SAAE;QAAE;QAAsC;QAAiC;QAA8B;KAAiC;AAC5I,IACA,6CAA6C"}
1
+ {"version":3,"sources":["StyledText.styles.js"],"sourcesContent":["import { makeStyles, tokens } from '@fluentui/react-components';\nexport const useSizeStyles = makeStyles({\n base100: {\n fontSize: tokens.fontSizeBase100,\n lineHeight: tokens.lineHeightBase100\n },\n base200: {\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200\n },\n base300: {\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300\n },\n base400: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400\n },\n base500: {\n fontSize: tokens.fontSizeBase500,\n lineHeight: tokens.lineHeightBase500\n },\n base600: {\n fontSize: tokens.fontSizeBase600,\n lineHeight: tokens.lineHeightBase600\n },\n hero700: {\n fontSize: tokens.fontSizeHero700,\n lineHeight: tokens.lineHeightHero700\n }\n});\nexport const useWeightStyles = makeStyles({\n light: {\n fontWeight: 200\n },\n semilight: {\n fontWeight: 300\n },\n regular: {\n fontWeight: 400\n },\n medium: {\n fontWeight: 500\n },\n semibold: {\n fontWeight: 600\n },\n bold: {\n fontWeight: 700\n }\n});\nexport const useStyles = makeStyles({\n mention: {\n color: tokens.colorBrandForegroundLink\n },\n mentionMe: {\n color: tokens.colorPalettePumpkinBorderActive,\n fontWeight: 700\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled\n },\n error: {\n color: tokens.colorPaletteRedForeground3\n },\n important: {\n color: tokens.colorPaletteDarkOrangeForeground3,\n fontWeight: 700\n },\n success: {\n color: tokens.colorPaletteGreenForeground3\n },\n temporary: {\n fontStyle: 'italic'\n },\n timestamp: {\n color: tokens.colorNeutralForeground3\n },\n nowrap: {\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n },\n truncate: {\n textOverflow: 'ellipsis'\n },\n alignCenter: {\n textAlign: 'center'\n },\n alignEnd: {\n textAlign: 'end'\n },\n alignJustify: {\n textAlign: 'justify'\n }\n});\n"],"names":["useSizeStyles","useStyles","useWeightStyles","__styles","base100","Be2twd7","Bg96gwp","base200","base300","base400","base500","base600","hero700","d","light","Bhrd7zp","semilight","regular","medium","semibold","bold","mention","sj55zd","mentionMe","disabled","error","important","success","temporary","B80ckks","timestamp","nowrap","Huce71","B68tc82","Bmxbyg5","Bpg54ce","truncate","ygn44y","alignCenter","fsow6f","alignEnd","alignJustify","p"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACaA,aAAa;eAAbA;;IAkDAC,SAAS;eAATA;;IApBAC,eAAe;eAAfA;;;iCA/BsB;AAC5B,MAAMF,g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,UAAA;QAAAC,QAAA;IAAA;IAAAC,aAAA;QAAAC,QAAA;IAAA;IAAAC,UAAA;QAAAD,QAAA;IAAA;IAAAE,cAAA;QAAAF,QAAA;IAAA;AAAA,GAAA;IAAA1B,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAA6B,GAAA,CAAA;YAAA;SAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './StyledText';\nexport * from './StyledText.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA"}
1
+ {"version":3,"sources":["index.tsx"],"sourcesContent":["export * from './StyledText';\nexport * from './StyledText.styles';\n"],"names":[],"rangeMappings":";;;;;;","mappings":";;;;;uBAAc;uBACA"}