@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.
- package/CHANGELOG.md +27 -2
- package/lib/components/Attachment/Attachment.js.map +1 -1
- package/lib/components/Attachment/AttachmentAction.js.map +1 -1
- package/lib/components/Attachment/AttachmentBody.js.map +1 -1
- package/lib/components/Attachment/AttachmentDescription.js.map +1 -1
- package/lib/components/Attachment/AttachmentHeader.js.map +1 -1
- package/lib/components/Attachment/AttachmentIcon.js.map +1 -1
- package/lib/components/Attachment/index.js.map +1 -1
- package/lib/components/Button/ButtonMigration.mixins.js.map +1 -1
- package/lib/components/Button/index.js.map +1 -1
- package/lib/components/Flex/Flex.js.map +1 -1
- package/lib/components/Flex/FlexItem.mixins.js.map +1 -1
- package/lib/components/Flex/index.js.map +1 -1
- package/lib/components/FormField/FormFieldShim.js.map +1 -1
- package/lib/components/FormField/index.js.map +1 -1
- package/lib/components/Grid/Grid.mixins.js.map +1 -1
- package/lib/components/Grid/GridShim.js.map +1 -1
- package/lib/components/Grid/index.js.map +1 -1
- package/lib/components/Input/Input.mixins.js.map +1 -1
- package/lib/components/Input/index.js.map +1 -1
- package/lib/components/ItemLayout/ItemLayout.js.map +1 -1
- package/lib/components/ItemLayout/index.js.map +1 -1
- package/lib/components/List/List/List.js.map +1 -1
- package/lib/components/List/List/List.types.js.map +1 -1
- package/lib/components/List/List/index.js.map +1 -1
- package/lib/components/List/List/listContext.js.map +1 -1
- package/lib/components/List/List/renderList.js.map +1 -1
- package/lib/components/List/List/useList.js.map +1 -1
- package/lib/components/List/List/useListContextValues.js.map +1 -1
- package/lib/components/List/ListItem/ListItem.js.map +1 -1
- package/lib/components/List/ListItem/ListItem.types.js.map +1 -1
- package/lib/components/List/ListItem/index.js.map +1 -1
- package/lib/components/List/ListItem/renderListItem.js.map +1 -1
- package/lib/components/List/ListItem/useListItem.js +10 -4
- package/lib/components/List/ListItem/useListItem.js.map +1 -1
- package/lib/components/List/hooks/index.js.map +1 -1
- package/lib/components/List/hooks/types.js.map +1 -1
- package/lib/components/List/hooks/useListSelection.js.map +1 -1
- package/lib/components/List/index.js.map +1 -1
- package/lib/components/Primitive/Primitive.js.map +1 -1
- package/lib/components/Primitive/index.js.map +1 -1
- package/lib/components/Segment/Segment.js.map +1 -1
- package/lib/components/Segment/index.js.map +1 -1
- package/lib/components/Slider/Slider.mixins.js.map +1 -1
- package/lib/components/Slider/index.js.map +1 -1
- package/lib/components/Spinner/SpinnerMigration.mixins.js.map +1 -1
- package/lib/components/Spinner/index.js.map +1 -1
- package/lib/components/StyledText/StyledText.js.map +1 -1
- package/lib/components/StyledText/index.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/components/Attachment/Attachment.js +5 -5
- package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/Attachment.styles.js.map +1 -1
- package/lib-commonjs/components/Attachment/AttachmentAction.js +3 -3
- package/lib-commonjs/components/Attachment/AttachmentAction.js.map +1 -1
- package/lib-commonjs/components/Attachment/AttachmentAction.styles.js.map +1 -1
- package/lib-commonjs/components/Attachment/AttachmentBody.js +3 -3
- package/lib-commonjs/components/Attachment/AttachmentBody.js.map +1 -1
- package/lib-commonjs/components/Attachment/AttachmentBody.styles.js.map +1 -1
- package/lib-commonjs/components/Attachment/AttachmentDescription.js +3 -3
- package/lib-commonjs/components/Attachment/AttachmentDescription.js.map +1 -1
- package/lib-commonjs/components/Attachment/AttachmentDescription.styles.js.map +1 -1
- package/lib-commonjs/components/Attachment/AttachmentHeader.js +3 -3
- package/lib-commonjs/components/Attachment/AttachmentHeader.js.map +1 -1
- package/lib-commonjs/components/Attachment/AttachmentHeader.styles.js.map +1 -1
- package/lib-commonjs/components/Attachment/AttachmentIcon.js +3 -3
- package/lib-commonjs/components/Attachment/AttachmentIcon.js.map +1 -1
- package/lib-commonjs/components/Attachment/AttachmentIcon.styles.js.map +1 -1
- package/lib-commonjs/components/Attachment/index.js.map +1 -1
- package/lib-commonjs/components/Button/ButtonMigration.mixins.js +8 -8
- package/lib-commonjs/components/Button/ButtonMigration.mixins.js.map +1 -1
- package/lib-commonjs/components/Button/index.js.map +1 -1
- package/lib-commonjs/components/Flex/Flex.js +3 -3
- package/lib-commonjs/components/Flex/Flex.js.map +1 -1
- package/lib-commonjs/components/Flex/Flex.styles.js.map +1 -1
- package/lib-commonjs/components/Flex/FlexItem.mixins.js.map +1 -1
- package/lib-commonjs/components/Flex/index.js +3 -3
- package/lib-commonjs/components/Flex/index.js.map +1 -1
- package/lib-commonjs/components/FormField/FormFieldShim.js.map +1 -1
- package/lib-commonjs/components/FormField/index.js.map +1 -1
- package/lib-commonjs/components/Grid/Grid.mixins.js.map +1 -1
- package/lib-commonjs/components/Grid/Grid.styles.js.map +1 -1
- package/lib-commonjs/components/Grid/GridShim.js +3 -3
- package/lib-commonjs/components/Grid/GridShim.js.map +1 -1
- package/lib-commonjs/components/Grid/index.js +3 -3
- package/lib-commonjs/components/Grid/index.js.map +1 -1
- package/lib-commonjs/components/Input/Input.mixins.js.map +1 -1
- package/lib-commonjs/components/Input/index.js.map +1 -1
- package/lib-commonjs/components/ItemLayout/ItemLayout.js +3 -3
- package/lib-commonjs/components/ItemLayout/ItemLayout.js.map +1 -1
- package/lib-commonjs/components/ItemLayout/ItemLayout.styles.js.map +1 -1
- package/lib-commonjs/components/ItemLayout/index.js.map +1 -1
- package/lib-commonjs/components/List/List/List.js.map +1 -1
- package/lib-commonjs/components/List/List/List.types.js.map +1 -1
- package/lib-commonjs/components/List/List/index.js.map +1 -1
- package/lib-commonjs/components/List/List/listContext.js +3 -3
- package/lib-commonjs/components/List/List/listContext.js.map +1 -1
- package/lib-commonjs/components/List/List/renderList.js.map +1 -1
- package/lib-commonjs/components/List/List/useList.js.map +1 -1
- package/lib-commonjs/components/List/List/useListContextValues.js.map +1 -1
- package/lib-commonjs/components/List/List/useListStyles.styles.js.map +1 -1
- package/lib-commonjs/components/List/ListItem/ListItem.js.map +1 -1
- package/lib-commonjs/components/List/ListItem/ListItem.types.js.map +1 -1
- package/lib-commonjs/components/List/ListItem/index.js.map +1 -1
- package/lib-commonjs/components/List/ListItem/renderListItem.js.map +1 -1
- package/lib-commonjs/components/List/ListItem/useListItem.js +10 -4
- package/lib-commonjs/components/List/ListItem/useListItem.js.map +1 -1
- package/lib-commonjs/components/List/ListItem/useListItemStyles.styles.js.map +1 -1
- package/lib-commonjs/components/List/hooks/index.js.map +1 -1
- package/lib-commonjs/components/List/hooks/types.js.map +1 -1
- package/lib-commonjs/components/List/hooks/useListSelection.js.map +1 -1
- package/lib-commonjs/components/List/index.js +12 -12
- package/lib-commonjs/components/List/index.js.map +1 -1
- package/lib-commonjs/components/Primitive/Primitive.js +3 -3
- package/lib-commonjs/components/Primitive/Primitive.js.map +1 -1
- package/lib-commonjs/components/Primitive/index.js.map +1 -1
- package/lib-commonjs/components/Segment/Segment.js +3 -3
- package/lib-commonjs/components/Segment/Segment.js.map +1 -1
- package/lib-commonjs/components/Segment/Segment.styles.js.map +1 -1
- package/lib-commonjs/components/Segment/index.js.map +1 -1
- package/lib-commonjs/components/Slider/Slider.mixins.js.map +1 -1
- package/lib-commonjs/components/Slider/index.js.map +1 -1
- package/lib-commonjs/components/Spinner/SpinnerMigration.mixins.js.map +1 -1
- package/lib-commonjs/components/Spinner/index.js.map +1 -1
- package/lib-commonjs/components/StyledText/StyledText.js +3 -3
- package/lib-commonjs/components/StyledText/StyledText.js.map +1 -1
- package/lib-commonjs/components/StyledText/StyledText.styles.js +3 -3
- package/lib-commonjs/components/StyledText/StyledText.styles.js.map +1 -1
- package/lib-commonjs/components/StyledText/index.js.map +1 -1
- package/lib-commonjs/index.js +85 -85
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Flex.
|
|
1
|
+
{"version":3,"sources":["Flex.tsx"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\n\nimport { useFlexStyles } from './Flex.styles';\n\nexport interface FlexProps {\n /** Defines if container should be inline element. */\n inline?: boolean;\n\n /** Sets vertical flow direction. */\n column?: boolean;\n\n /** Allows overflow items to wrap on the next container's line. */\n wrap?: boolean;\n\n /** Controls items alignment in horizontal direction. */\n hAlign?: 'start' | 'center' | 'end' | 'stretch';\n\n /** Controls items alignment in vertical direction. */\n vAlign?: 'start' | 'center' | 'end' | 'stretch';\n\n /** Defines strategy for distributing remaining space between items. */\n space?: 'around' | 'between' | 'evenly';\n\n /** Defines gap between each two adjacent child items. */\n gap?: 'gap.smaller' | 'gap.small' | 'gap.medium' | 'gap.large';\n\n /** Defines container's padding. */\n padding?: 'padding.medium';\n\n /** Orders container to fill all parent's space available. */\n fill?: boolean;\n}\n\nexport const flexClassName = 'fui-Flex';\n\nexport const Flex = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLElement> & FlexProps>((props, ref) => {\n const { children, column, fill, gap, hAlign, inline, padding, space, vAlign, wrap, className, ...rest } = props;\n const classes = useFlexStyles();\n\n const classMaps = React.useMemo(\n () => ({\n alignItems: {\n start: classes.alignItemsFlexStart,\n center: classes.alignItemsCenter,\n end: classes.alignItemsFlexEnd,\n stretch: classes.alignItemsCenter,\n },\n justifyContent: {\n start: classes.justifyContentFlexStart,\n center: classes.justifyContentCenter,\n end: classes.justifyContentFlexEnd,\n stretch: classes.justifyContentStretch,\n },\n justifyContentSpace: {\n around: classes.justifyContentSpaceAround,\n between: classes.justifyContentSpaceBetween,\n evenly: classes.justifyContentSpaceEvenly,\n },\n gapForColumnFlex: {\n 'gap.smaller': classes.gapForColumnFlexSmaller,\n 'gap.small': classes.gapForColumnFlexSmall,\n 'gap.medium': classes.gapForColumnFlexMedium,\n 'gap.large': classes.gapForColumnFlexLarge,\n },\n gapRow: {\n 'gap.smaller': classes.gapForRowFlexSmaller,\n 'gap.small': classes.gapForRowFlexSmall,\n 'gap.medium': classes.gapForRowFlexMedium,\n 'gap.large': classes.gapForRowFlexLarge,\n },\n paddings: {\n 'padding.medium': classes.paddingMedium,\n },\n }),\n [classes],\n );\n\n const flexClasses = mergeClasses(\n flexClassName,\n classes.flex,\n inline && classes.inline,\n column && classes.column,\n hAlign && (column ? classMaps.alignItems[hAlign] : classMaps.justifyContent[hAlign]),\n vAlign && (column ? classMaps.justifyContent[vAlign] : classMaps.alignItems[vAlign]),\n space && classMaps.justifyContentSpace[space],\n wrap && classes.wrap,\n fill && classes.fill,\n gap && (column ? classMaps.gapForColumnFlex[gap] : classMaps.gapRow[gap]),\n padding && classMaps.paddings[padding],\n className,\n );\n\n const content = React.Children.map(children, child => {\n // @ts-expect-error __isFlexItem is added to the React type property by N*\n const isFlexItemElement: boolean = child?.type?.__isFlexItem;\n\n return isFlexItemElement\n ? React.cloneElement(child as React.ReactElement, {\n flexDirection: column ? 'column' : 'row',\n })\n : child;\n });\n\n return (\n <div ref={ref} className={flexClasses} {...rest}>\n {content}\n </div>\n );\n});\n\nFlex.displayName = 'Flex';\n"],"names":["Flex","flexClassName","React","forwardRef","props","ref","children","column","fill","gap","hAlign","inline","padding","space","vAlign","wrap","className","rest","classes","useFlexStyles","classMaps","useMemo","alignItems","start","alignItemsFlexStart","center","alignItemsCenter","end","alignItemsFlexEnd","stretch","justifyContent","justifyContentFlexStart","justifyContentCenter","justifyContentFlexEnd","justifyContentStretch","justifyContentSpace","around","justifyContentSpaceAround","between","justifyContentSpaceBetween","evenly","justifyContentSpaceEvenly","gapForColumnFlex","gapForColumnFlexSmaller","gapForColumnFlexSmall","gapForColumnFlexMedium","gapForColumnFlexLarge","gapRow","gapForRowFlexSmaller","gapForRowFlexSmall","gapForRowFlexMedium","gapForRowFlexLarge","paddings","paddingMedium","flexClasses","mergeClasses","flex","content","Children","map","child","isFlexItemElement","type","__isFlexItem","cloneElement","flexDirection","createElement","div","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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.styles.js"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["Flex.styles.js"],"sourcesContent":["import { makeStyles } from '@fluentui/react-components';\nconst gapValues = {\n smaller: '8px',\n small: '10px',\n medium: '15px',\n large: '30px'\n};\nconst paddingValues = {\n medium: '10px'\n};\nexport const useFlexStyles = makeStyles({\n flex: {\n display: 'flex'\n },\n inline: {\n display: 'inline-flex'\n },\n column: {\n flexDirection: 'column'\n },\n alignItemsFlexStart: {\n alignItems: 'flex-start'\n },\n alignItemsCenter: {\n alignItems: 'center'\n },\n alignItemsFlexEnd: {\n alignItems: 'flex-end'\n },\n alignItemsStretch: {\n alignItems: 'stretch'\n },\n justifyContentFlexStart: {\n justifyContent: 'flex-start'\n },\n justifyContentCenter: {\n justifyContent: 'center'\n },\n justifyContentFlexEnd: {\n justifyContent: 'flex-end'\n },\n justifyContentStretch: {\n justifyContent: 'stretch'\n },\n justifyContentSpaceAround: {\n justifyContent: 'space-around'\n },\n justifyContentSpaceBetween: {\n justifyContent: 'space-between'\n },\n justifyContentSpaceEvenly: {\n justifyContent: 'space-evenly'\n },\n wrap: {\n flexWrap: 'wrap'\n },\n fill: {\n width: '100%',\n height: '100%'\n },\n gapForColumnFlexSmall: {\n rowGap: gapValues.small\n },\n gapForColumnFlexSmaller: {\n rowGap: gapValues.smaller\n },\n gapForColumnFlexMedium: {\n rowGap: gapValues.medium\n },\n gapForColumnFlexLarge: {\n rowGap: gapValues.large\n },\n gapForRowFlexSmall: {\n columnGap: gapValues.small\n },\n gapForRowFlexSmaller: {\n columnGap: gapValues.smaller\n },\n gapForRowFlexMedium: {\n columnGap: gapValues.medium\n },\n gapForRowFlexLarge: {\n columnGap: gapValues.large\n },\n paddingMedium: {\n padding: paddingValues.medium\n }\n});\n"],"names":["useFlexStyles","gapValues","smaller","small","medium","large","paddingValues","__styles","flex","mc9l5x","inline","column","Beiy3e4","alignItemsFlexStart","Bt984gj","alignItemsCenter","alignItemsFlexEnd","alignItemsStretch","justifyContentFlexStart","Brf1p80","justifyContentCenter","justifyContentFlexEnd","justifyContentStretch","justifyContentSpaceAround","justifyContentSpaceBetween","justifyContentSpaceEvenly","wrap","Eh141a","fill","a9b677","Bqenvij","gapForColumnFlexSmall","Belr9w4","gapForColumnFlexSmaller","gapForColumnFlexMedium","gapForColumnFlexLarge","gapForRowFlexSmall","i8kkvl","gapForRowFlexSmaller","gapForRowFlexMedium","gapForRowFlexLarge","paddingMedium","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","d","p"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUaA;;;eAAAA;;;iCAVc;AAC3B,MAAMC,YAAY;IACdC,SAAS;IACTC,OAAO;IACPC,QAAQ;IACRC,OAAO;AACX;AACA,MAAMC,gBAAgB;IAClBF,QAAQ;AACZ;AACO,MAAMJ,gBAAa,WAAA,GAAGO,IAAAA,yBAAA,EAAA;IAAAC,MAAA;QAAAC,QAAA;IAAA;IAAAC,QAAA;QAAAD,QAAA;IAAA;IAAAE,QAAA;QAAAC,SAAA;IAAA;IAAAC,qBAAA;QAAAC,SAAA;IAAA;IAAAC,kBAAA;QAAAD,SAAA;IAAA;IAAAE,mBAAA;QAAAF,SAAA;IAAA;IAAAG,mBAAA;QAAAH,SAAA;IAAA;IAAAI,yBAAA;QAAAC,SAAA;IAAA;IAAAC,sBAAA;QAAAD,SAAA;IAAA;IAAAE,uBAAA;QAAAF,SAAA;IAAA;IAAAG,uBAAA;QAAAH,SAAA;IAAA;IAAAI,2BAAA;QAAAJ,SAAA;IAAA;IAAAK,4BAAA;QAAAL,SAAA;IAAA;IAAAM,2BAAA;QAAAN,SAAA;IAAA;IAAAO,MAAA;QAAAC,QAAA;IAAA;IAAAC,MAAA;QAAAC,QAAA;QAAAC,SAAA;IAAA;IAAAC,uBAAA;QAAAC,SAAA;IAAA;IAAAC,yBAAA;QAAAD,SAAA;IAAA;IAAAE,wBAAA;QAAAF,SAAA;IAAA;IAAAG,uBAAA;QAAAH,SAAA;IAAA;IAAAI,oBAAA;QAAAC,QAAA;IAAA;IAAAC,sBAAA;QAAAD,QAAA;IAAA;IAAAE,qBAAA;QAAAF,QAAA;IAAA;IAAAG,oBAAA;QAAAH,QAAA;IAAA;IAAAI,eAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,GAAA,CAAA;YAAA;SAAA;KAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FlexItem.mixins.
|
|
1
|
+
{"version":3,"sources":["FlexItem.mixins.ts"],"sourcesContent":["import { GriffelStyle } from '@fluentui/react-components';\n\nconst ALIGN = {\n auto: { alignSelf: 'auto' },\n start: { alignSelf: 'flex-start' },\n end: { alignSelf: 'flex-end' },\n center: { alignSelf: 'center' },\n baseline: { alignSelf: 'baseline' },\n stretch: { alignSelf: 'stretch' },\n};\n\nconst SIZE = {\n half: { flexBasis: '50%' },\n quarter: { flexBasis: '25%' },\n small: { flexBasis: '150px' },\n medium: { flexBasis: '200px' },\n large: { flexBasis: '300px' },\n};\n\nconst align = (value: 'auto' | 'start' | 'end' | 'center' | 'baseline' | 'stretch'): GriffelStyle => ALIGN[value];\n\nconst size = (value: 'half' | 'quarter' | 'small' | 'medium' | 'large'): GriffelStyle => SIZE[value];\n\nconst grow = (flexGrow: boolean | number): GriffelStyle | undefined => {\n if (flexGrow === true) {\n return { flexGrow: 1 };\n } else if (flexGrow) {\n return { flexGrow };\n } else {\n return undefined;\n }\n};\n\nconst shrink = (flexShrink: boolean | number): GriffelStyle | undefined => {\n if (typeof flexShrink === 'number') {\n return { flexShrink };\n } else if (flexShrink === false) {\n return { flexShrink: 0 };\n } else {\n return undefined;\n }\n};\n\nconst pushRow = (): GriffelStyle => ({ marginLeft: 'auto' });\nconst pushColumn = (): GriffelStyle => ({ marginTop: 'auto' });\n\nexport const flexItem = {\n align,\n size,\n grow,\n shrink,\n pushRow,\n pushColumn,\n};\n"],"names":["flexItem","ALIGN","auto","alignSelf","start","end","center","baseline","stretch","SIZE","half","flexBasis","quarter","small","medium","large","align","value","size","grow","flexGrow","undefined","shrink","flexShrink","pushRow","marginLeft","pushColumn","marginTop"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA8CaA;;;eAAAA;;;AA5Cb,MAAMC,QAAQ;IACZC,MAAM;QAAEC,WAAW;IAAO;IAC1BC,OAAO;QAAED,WAAW;IAAa;IACjCE,KAAK;QAAEF,WAAW;IAAW;IAC7BG,QAAQ;QAAEH,WAAW;IAAS;IAC9BI,UAAU;QAAEJ,WAAW;IAAW;IAClCK,SAAS;QAAEL,WAAW;IAAU;AAClC;AAEA,MAAMM,OAAO;IACXC,MAAM;QAAEC,WAAW;IAAM;IACzBC,SAAS;QAAED,WAAW;IAAM;IAC5BE,OAAO;QAAEF,WAAW;IAAQ;IAC5BG,QAAQ;QAAEH,WAAW;IAAQ;IAC7BI,OAAO;QAAEJ,WAAW;IAAQ;AAC9B;AAEA,MAAMK,QAAQ,CAACC,QAAsFhB,KAAK,CAACgB,MAAM;AAEjH,MAAMC,OAAO,CAACD,QAA2ER,IAAI,CAACQ,MAAM;AAEpG,MAAME,OAAO,CAACC;IACZ,IAAIA,aAAa,MAAM;QACrB,OAAO;YAAEA,UAAU;QAAE;IACvB,OAAO,IAAIA,UAAU;QACnB,OAAO;YAAEA;QAAS;IACpB,OAAO;QACL,OAAOC;IACT;AACF;AAEA,MAAMC,SAAS,CAACC;IACd,IAAI,OAAOA,eAAe,UAAU;QAClC,OAAO;YAAEA;QAAW;IACtB,OAAO,IAAIA,eAAe,OAAO;QAC/B,OAAO;YAAEA,YAAY;QAAE;IACzB,OAAO;QACL,OAAOF;IACT;AACF;AAEA,MAAMG,UAAU,IAAqB,CAAA;QAAEC,YAAY;IAAO,CAAA;AAC1D,MAAMC,aAAa,IAAqB,CAAA;QAAEC,WAAW;IAAO,CAAA;AAErD,MAAM3B,WAAW;IACtBgB;IACAE;IACAC;IACAG;IACAE;IACAE;AACF"}
|
|
@@ -15,11 +15,11 @@ _export(exports, {
|
|
|
15
15
|
flexClassName: function() {
|
|
16
16
|
return _Flex.flexClassName;
|
|
17
17
|
},
|
|
18
|
-
useFlexStyles: function() {
|
|
19
|
-
return _Flexstyles.useFlexStyles;
|
|
20
|
-
},
|
|
21
18
|
flexItem: function() {
|
|
22
19
|
return _FlexItemmixins.flexItem;
|
|
20
|
+
},
|
|
21
|
+
useFlexStyles: function() {
|
|
22
|
+
return _Flexstyles.useFlexStyles;
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
const _Flex = require("./Flex");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { Flex, flexClassName } from './Flex';\nexport type { FlexProps } from './Flex';\nexport { useFlexStyles } from './Flex.styles';\nexport { flexItem } from './FlexItem.mixins';\n"],"names":["Flex","flexClassName","flexItem","useFlexStyles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,IAAI;eAAJA,UAAI;;IAAEC,aAAa;eAAbA,mBAAa;;IAGnBC,QAAQ;eAARA,wBAAQ;;IADRC,aAAa;eAAbA,yBAAa;;;sBAFc;4BAEN;gCACL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FormFieldShim.
|
|
1
|
+
{"version":3,"sources":["FormFieldShim.tsx"],"sourcesContent":["import {\n FieldProps,\n renderField_unstable,\n useFieldContextValues_unstable,\n useFieldStyles_unstable,\n useField_unstable,\n} from '@fluentui/react-components';\nimport type { ObjectShorthandValue } from '@fluentui/react-northstar';\n\nimport * as React from 'react';\n\ntype WithContent = ObjectShorthandValue<React.HTMLAttributes<HTMLDivElement>> | string;\n\n/**\n *\n */\ntype CustomInputFieldProps = React.PropsWithChildren<{\n /**\n * Message to be shown when error state is true\n */\n errorMessage?: WithContent;\n /**\n * Whether the field label should be marked as required.\n */\n required?: boolean;\n /**\n * Control to be rendered\n */\n control?: ObjectShorthandValue<{\n /**\n * Control content\n */\n content?: React.ReactNode;\n }> & {\n /**\n * Error state\n */\n error?: 'true' | 'false';\n };\n /**\n * Label to be rendered\n */\n label?: WithContent;\n}>;\n\nexport const FormFieldShim = React.forwardRef<HTMLInputElement, CustomInputFieldProps>((props, ref) => {\n const { errorMessage, required, control, label } = props;\n const fieldProps: FieldProps = { required };\n\n if (errorMessage && control?.error === 'true') {\n fieldProps.validationState = 'error';\n if (typeof errorMessage === 'object') {\n fieldProps.validationMessage = errorMessage.content;\n }\n if (typeof errorMessage === 'string') {\n fieldProps.validationMessage = errorMessage;\n }\n }\n\n if (label) {\n if (typeof label === 'object') {\n fieldProps.label = label.content;\n } else {\n fieldProps.label = label;\n }\n }\n\n const children: FieldProps['children'] = props.children || control?.content;\n\n if (React.isValidElement(children)) {\n const child: React.ReactElement = children;\n\n // Use the Field's child render function to pass the field control props to the child\n fieldProps.children = fieldControlProps => React.cloneElement(child, { ...fieldControlProps, ...child.props });\n } else {\n fieldProps.children = children;\n }\n\n const state = useField_unstable(fieldProps, ref);\n useFieldStyles_unstable(state);\n const context = useFieldContextValues_unstable(state);\n return renderField_unstable(state, context);\n});\n\nFormFieldShim.displayName = 'FormFieldShim';\n"],"names":["FormFieldShim","React","forwardRef","props","ref","errorMessage","required","control","label","fieldProps","error","validationState","validationMessage","content","children","isValidElement","child","fieldControlProps","cloneElement","state","useField_unstable","useFieldStyles_unstable","context","useFieldContextValues_unstable","renderField_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA6CaA;;;eAAAA;;;;iCAvCN;iEAGgB;AAoChB,MAAMA,gBAAAA,WAAAA,GAAgBC,OAAMC,UAAU,CAA0C,CAACC,OAAOC;IAC7F,MAAM,EAAEC,YAAY,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,KAAK,EAAE,GAAGL;IACnD,MAAMM,aAAyB;QAAEH;IAAS;IAE1C,IAAID,gBAAgBE,CAAAA,YAAAA,QAAAA,YAAAA,KAAAA,IAAAA,KAAAA,IAAAA,QAASG,KAAK,AAALA,MAAU,QAAQ;QAC7CD,WAAWE,eAAe,GAAG;QAC7B,IAAI,OAAON,iBAAiB,UAAU;YACpCI,WAAWG,iBAAiB,GAAGP,aAAaQ,OAAO;QACrD;QACA,IAAI,OAAOR,iBAAiB,UAAU;YACpCI,WAAWG,iBAAiB,GAAGP;QACjC;IACF;IAEA,IAAIG,OAAO;QACT,IAAI,OAAOA,UAAU,UAAU;YAC7BC,WAAWD,KAAK,GAAGA,MAAMK,OAAO;QAClC,OAAO;YACLJ,WAAWD,KAAK,GAAGA;QACrB;IACF;IAEA,MAAMM,WAAmCX,MAAMW,QAAQ,IAAIP,CAAAA,YAAAA,QAAAA,YAAAA,KAAAA,IAAAA,KAAAA,IAAAA,QAASM,OAAO,AAAPA;IAEpE,IAAA,WAAA,GAAIZ,OAAMc,cAAc,CAACD,WAAW;QAClC,MAAME,QAA4BF;QAElC,qFAAqF;QACrFL,WAAWK,QAAQ,GAAGG,CAAAA,oBAAAA,WAAAA,GAAqBhB,OAAMiB,YAAY,CAACF,OAAO;gBAAE,GAAGC,iBAAiB;gBAAE,GAAGD,MAAMb,KAAK;YAAC;IAC9G,OAAO;QACLM,WAAWK,QAAQ,GAAGA;IACxB;IAEA,MAAMK,QAAQC,IAAAA,kCAAAA,EAAkBX,YAAYL;IAC5CiB,IAAAA,wCAAAA,EAAwBF;IACxB,MAAMG,UAAUC,IAAAA,+CAAAA,EAA+BJ;IAC/C,OAAOK,IAAAA,qCAAAA,EAAqBL,OAAOG;AACrC;AAEAtB,cAAcyB,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './FormFieldShim';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Grid.mixins.
|
|
1
|
+
{"version":3,"sources":["Grid.mixins.ts"],"sourcesContent":["import { GriffelStyle } from '@fluentui/react-components';\n\nconst getCSSTemplateValue = (template: string | number): string => {\n const templateAsNumber = Number(template);\n\n return !isNaN(templateAsNumber) && templateAsNumber > 0 ? `repeat(${template}, 1fr)` : String(template);\n};\n\nconst columns = (template: string): GriffelStyle => ({\n gridTemplateColumns: getCSSTemplateValue(template),\n});\n\nconst rows = (template: string): GriffelStyle => ({\n gridTemplateRows: getCSSTemplateValue(template),\n});\n\nexport const grid = {\n columns,\n rows,\n};\n"],"names":["grid","getCSSTemplateValue","template","templateAsNumber","Number","isNaN","String","columns","gridTemplateColumns","rows","gridTemplateRows"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBaA;;;eAAAA;;;AAdb,MAAMC,sBAAsB,CAACC;IAC3B,MAAMC,mBAAmBC,OAAOF;IAEhC,OAAO,CAACG,MAAMF,qBAAqBA,mBAAmB,IAAI,CAAC,OAAO,EAAED,SAAS,MAAM,CAAC,GAAGI,OAAOJ;AAChG;AAEA,MAAMK,UAAU,CAACL,WAAoC,CAAA;QACnDM,qBAAqBP,oBAAoBC;IAC3C,CAAA;AAEA,MAAMO,OAAO,CAACP,WAAoC,CAAA;QAChDQ,kBAAkBT,oBAAoBC;IACxC,CAAA;AAEO,MAAMF,OAAO;IAClBO;IACAE;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Grid.styles.js"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["Grid.styles.js"],"sourcesContent":["import { makeStyles } from '@fluentui/react-components';\nexport const useGridStyles = makeStyles({\n grid: {\n display: 'grid',\n justifyContent: 'space-evenly'\n },\n onlyRows: {\n gridAutoFlow: 'column'\n },\n rows1: {\n gridTemplateRows: 'repeat(1, 1fr)'\n },\n rows2: {\n gridTemplateRows: 'repeat(2, 1fr)'\n },\n rows3: {\n gridTemplateRows: 'repeat(3, 1fr)'\n },\n columns1: {\n gridTemplateColumns: 'repeat(1, 1fr)'\n },\n columns2: {\n gridTemplateColumns: 'repeat(2, 1fr)'\n },\n columns3: {\n gridTemplateColumns: 'repeat(3, 1fr)'\n },\n columnsDefault: {\n gridTemplateColumns: 'repeat(5, 1fr)'\n }\n});\n"],"names":["useGridStyles","__styles","grid","mc9l5x","Brf1p80","onlyRows","Bxotwcr","rows1","wkccdc","rows2","rows3","columns1","Budl1dq","columns2","columns3","columnsDefault","d"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BACaA;;;eAAAA;;;iCADc;AACpB,MAAMA,gBAAa,WAAA,GAAGC,IAAAA,yBAAA,EAAA;IAAAC,MAAA;QAAAC,QAAA;QAAAC,SAAA;IAAA;IAAAC,UAAA;QAAAC,SAAA;IAAA;IAAAC,OAAA;QAAAC,QAAA;IAAA;IAAAC,OAAA;QAAAD,QAAA;IAAA;IAAAE,OAAA;QAAAF,QAAA;IAAA;IAAAG,UAAA;QAAAC,SAAA;IAAA;IAAAC,UAAA;QAAAD,SAAA;IAAA;IAAAE,UAAA;QAAAF,SAAA;IAAA;IAAAG,gBAAA;QAAAH,SAAA;IAAA;AAAA,GAAA;IAAAI,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA"}
|
|
@@ -9,11 +9,11 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
gridShimClassName: function() {
|
|
13
|
-
return gridShimClassName;
|
|
14
|
-
},
|
|
15
12
|
GridShim: function() {
|
|
16
13
|
return GridShim;
|
|
14
|
+
},
|
|
15
|
+
gridShimClassName: function() {
|
|
16
|
+
return gridShimClassName;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["GridShim.
|
|
1
|
+
{"version":3,"sources":["GridShim.tsx"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\nimport { useGridStyles } from './Grid.styles';\n\nexport interface GridShimProps {\n /**\n * The columns of the grid with a space-separated list of values.\n * The values represent the track size, and the space between them represents the grid line.\n */\n columns?: 1 | 2 | 3;\n\n /**\n * The rows of the grid with a space-separated list of values.\n * The values represent the track size, and the space between them represents the grid line.\n */\n rows?: 1 | 2 | 3;\n}\n\nexport const gridShimClassName = 'fui-Grid';\n\nexport const GridShim = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLElement> & GridShimProps>(\n (props, ref) => {\n const { rows, columns, className, ...rest } = props;\n const classes = useGridStyles();\n\n const classMaps = React.useMemo(\n () => ({\n rowsClasses: {\n 1: classes.rows1,\n 2: classes.rows2,\n 3: classes.rows3,\n },\n columnsClasses: {\n 1: classes.columns1,\n 2: classes.columns2,\n 3: classes.columns3,\n },\n }),\n [classes],\n );\n\n const gridClasses = mergeClasses(\n gridShimClassName,\n classes.grid,\n !rows && !columns && classes.columnsDefault,\n rows && !columns && classes.onlyRows,\n rows && classMaps.rowsClasses[rows],\n columns && classMaps.columnsClasses[columns],\n className,\n );\n return <div ref={ref} className={gridClasses} {...rest} />;\n },\n);\n\nGridShim.displayName = 'GridShim';\n"],"names":["GridShim","gridShimClassName","React","forwardRef","props","ref","rows","columns","className","rest","classes","useGridStyles","classMaps","useMemo","rowsClasses","rows1","rows2","rows3","columnsClasses","columns1","columns2","columns3","gridClasses","mergeClasses","grid","columnsDefault","onlyRows","createElement","div","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAoBaA,QAAAA;eAAAA;;IAFAC,iBAAAA;eAAAA;;;;iCAlBgB;iEACN;4BACO;AAgBvB,MAAMA,oBAAoB;AAE1B,MAAMD,WAAAA,WAAAA,GAAWE,OAAMC,UAAU,CACtC,CAACC,OAAOC;IACN,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGC,MAAM,GAAGL;IAC9C,MAAMM,UAAUC,IAAAA,yBAAAA;IAEhB,MAAMC,YAAYV,OAAMW,OAAO,CAC7B,IAAO,CAAA;YACLC,aAAa;gBACX,GAAGJ,QAAQK,KAAK;gBAChB,GAAGL,QAAQM,KAAK;gBAChB,GAAGN,QAAQO,KAAK;YAClB;YACAC,gBAAgB;gBACd,GAAGR,QAAQS,QAAQ;gBACnB,GAAGT,QAAQU,QAAQ;gBACnB,GAAGV,QAAQW,QAAQ;YACrB;QACF,CAAA,GACA;QAACX;KAAQ;IAGX,MAAMY,cAAcC,IAAAA,6BAAAA,EAClBtB,mBACAS,QAAQc,IAAI,EACZ,CAAClB,QAAQ,CAACC,WAAWG,QAAQe,cAAc,EAC3CnB,QAAQ,CAACC,WAAWG,QAAQgB,QAAQ,EACpCpB,QAAQM,UAAUE,WAAW,CAACR,KAAK,EACnCC,WAAWK,UAAUM,cAAc,CAACX,QAAQ,EAC5CC;IAEF,OAAA,WAAA,GAAON,OAAAyB,aAAA,CAACC,OAAAA;QAAIvB,KAAKA;QAAKG,WAAWc;QAAc,GAAGb,IAAI;;AACxD;AAGFT,SAAS6B,WAAW,GAAG"}
|
|
@@ -12,14 +12,14 @@ _export(exports, {
|
|
|
12
12
|
GridShim: function() {
|
|
13
13
|
return _GridShim.GridShim;
|
|
14
14
|
},
|
|
15
|
+
grid: function() {
|
|
16
|
+
return _Gridmixins.grid;
|
|
17
|
+
},
|
|
15
18
|
gridClassName: function() {
|
|
16
19
|
return _GridShim.gridShimClassName;
|
|
17
20
|
},
|
|
18
21
|
useGridStyles: function() {
|
|
19
22
|
return _Gridstyles.useGridStyles;
|
|
20
|
-
},
|
|
21
|
-
grid: function() {
|
|
22
|
-
return _Gridmixins.grid;
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
const _GridShim = require("./GridShim");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { GridShim, gridShimClassName as gridClassName } from './GridShim';\nexport type { GridShimProps } from './GridShim';\nexport { useGridStyles } from './Grid.styles';\nexport { grid } from './Grid.mixins';\n"],"names":["GridShim","grid","gridClassName","gridShimClassName","useGridStyles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,QAAQ;eAARA,kBAAQ;;IAGRC,IAAI;eAAJA,gBAAI;;IAH2BC,aAAa;eAAlCC,2BAAAA;;IAEVC,aAAa;eAAbA,yBAAa;;;0BAFuC;4BAE/B;4BACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Input.mixins.
|
|
1
|
+
{"version":3,"sources":["Input.mixins.ts"],"sourcesContent":["import { GriffelStyle, tokens } from '@fluentui/react-components';\n\nconst fluid = (): GriffelStyle => ({ width: '100%' });\n\nconst error = (): GriffelStyle => ({ border: `1px solid ${tokens.colorPaletteRedBorderActive}` });\n\nconst errorIndicator = (): GriffelStyle => ({\n color: tokens.colorPaletteRedBorderActive,\n});\n\nconst successIndicator = (): GriffelStyle => ({\n color: tokens.colorPaletteGreenForeground1,\n});\n\nexport const input = {\n error,\n errorIndicator,\n fluid,\n successIndicator,\n};\n"],"names":["input","fluid","width","error","border","tokens","colorPaletteRedBorderActive","errorIndicator","color","successIndicator","colorPaletteGreenForeground1"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcaA;;;eAAAA;;;iCAdwB;AAErC,MAAMC,QAAQ,IAAqB,CAAA;QAAEC,OAAO;IAAO,CAAA;AAEnD,MAAMC,QAAQ,IAAqB,CAAA;QAAEC,QAAQ,CAAC,UAAU,EAAEC,uBAAAA,CAAOC,2BAA2B,CAAC,CAAC;IAAC,CAAA;AAE/F,MAAMC,iBAAiB,IAAqB,CAAA;QAC1CC,OAAOH,uBAAAA,CAAOC,2BAA2B;IAC3C,CAAA;AAEA,MAAMG,mBAAmB,IAAqB,CAAA;QAC5CD,OAAOH,uBAAAA,CAAOK,4BAA4B;IAC5C,CAAA;AAEO,MAAMV,QAAQ;IACnBG;IACAI;IACAN;IACAQ;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { input } from './Input.mixins';\n"],"names":["input"],"rangeMappings":";;;;;;;;;;","mappings":";;;;+BAASA;;;eAAAA,kBAAK;;;6BAAQ"}
|
|
@@ -9,11 +9,11 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
itemLayoutClassName: function() {
|
|
13
|
-
return itemLayoutClassName;
|
|
14
|
-
},
|
|
15
12
|
ItemLayout: function() {
|
|
16
13
|
return ItemLayout;
|
|
14
|
+
},
|
|
15
|
+
itemLayoutClassName: function() {
|
|
16
|
+
return itemLayoutClassName;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ItemLayout.
|
|
1
|
+
{"version":3,"sources":["ItemLayout.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport * as React from 'react';\nimport { mergeClasses } from '@fluentui/react-components';\nimport {\n ComponentProps,\n ComponentState,\n getIntrinsicElementProps,\n Slot,\n slot,\n assertSlots,\n} from '@fluentui/react-utilities';\n\nimport { useItemLayoutStyles } from './ItemLayout.styles';\n\ntype ItemLayoutSlots = {\n root: Slot<'div'>;\n\n contentMedia?: Slot<'div'>;\n contentWrapper?: Slot<'div'>;\n\n header?: Slot<'div'>;\n headerMedia?: Slot<'div'>;\n\n startMedia?: Slot<'div'>;\n endMedia?: Slot<'div'>;\n};\n\ntype ItemLayoutProps = ComponentProps<ItemLayoutSlots>;\n\ntype ItemLayoutState = ComponentState<ItemLayoutSlots>;\n\nexport const itemLayoutClassName = 'fui-ItemLayout';\n\nexport const ItemLayout = React.forwardRef<HTMLDivElement, ItemLayoutProps>((props, ref) => {\n const state: ItemLayoutState = {\n components: {\n root: 'div',\n contentWrapper: 'div',\n contentMedia: 'div',\n header: 'div',\n headerMedia: 'div',\n startMedia: 'div',\n endMedia: 'div',\n },\n root: slot.always(getIntrinsicElementProps('div', { ...props, ref }), { elementType: 'div' }),\n contentMedia: slot.optional(props.contentMedia, { elementType: 'div' }),\n contentWrapper: slot.optional(props.contentWrapper, { renderByDefault: true, elementType: 'div' }),\n header: slot.optional(props.header, { elementType: 'div' }),\n headerMedia: slot.optional(props.headerMedia, { elementType: 'div' }),\n startMedia: slot.optional(props.startMedia, { elementType: 'div' }),\n endMedia: slot.optional(props.endMedia, { elementType: 'div' }),\n };\n const styles = useItemLayoutStyles();\n\n state.root.className = mergeClasses(itemLayoutClassName, styles.root, state.root.className);\n if (state.contentWrapper) {\n state.contentWrapper.className = mergeClasses(styles.contentWrapper, state.contentWrapper.className);\n }\n\n if (state.contentMedia) {\n state.contentMedia.className = mergeClasses(styles.contentMedia, state.contentMedia.className);\n }\n\n if (state.header) {\n state.header.className = mergeClasses(styles.header, state.header.className);\n }\n\n if (state.headerMedia) {\n state.headerMedia.className = mergeClasses(styles.headerMedia, state.headerMedia.className);\n }\n\n if (state.startMedia) {\n state.startMedia.className = mergeClasses(styles.startMedia, state.startMedia.className);\n }\n\n if (state.endMedia) {\n state.endMedia.className = mergeClasses(styles.endMedia, state.endMedia.className);\n }\n\n assertSlots<ItemLayoutSlots>(state);\n\n return (\n <state.root>\n {state.startMedia && <state.startMedia />}\n {state.header && <state.header />}\n {state.headerMedia && <state.headerMedia />}\n {state.contentWrapper && <state.contentWrapper>{state.root.children}</state.contentWrapper>}\n {state.contentMedia && <state.contentMedia />}\n {state.endMedia && <state.endMedia />}\n </state.root>\n );\n});\n\nItemLayout.displayName = 'ItemLayout';\n"],"names":["ItemLayout","itemLayoutClassName","React","forwardRef","props","ref","state","components","root","contentWrapper","contentMedia","header","headerMedia","startMedia","endMedia","slot","always","getIntrinsicElementProps","elementType","optional","renderByDefault","styles","useItemLayoutStyles","className","mergeClasses","assertSlots","createElement","children","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,wBAAwB,GACxB,uBAAuB;;;;;;;;;;;IAmCVA,UAAAA;eAAAA;;IAFAC,mBAAAA;eAAAA;;;;iCA/BiB;iEACP;iCACM;gCAQtB;kCAE6B;AAmB7B,MAAMA,sBAAsB;AAE5B,MAAMD,aAAAA,WAAAA,GAAaE,OAAMC,UAAU,CAAkC,CAACC,OAAOC;IAClF,MAAMC,QAAyB;QAC7BC,YAAY;YACVC,MAAM;YACNC,gBAAgB;YAChBC,cAAc;YACdC,QAAQ;YACRC,aAAa;YACbC,YAAY;YACZC,UAAU;QACZ;Q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],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["ItemLayout.styles.js"],"sourcesContent":["import { makeStyles } from '@fluentui/react-components';\nexport const useItemLayoutStyles = makeStyles({\n root: {\n display: 'grid',\n gridTemplateColumns: 'auto 1fr auto auto',\n minHeight: '48px'\n },\n contentMedia: {\n alignSelf: 'start',\n gridColumnStart: 3,\n gridColumnEnd: 4,\n gridRowStart: 2,\n gridRowEnd: 3,\n fontSize: '12px',\n lineHeight: 1.3333\n },\n contentWrapper: {\n alignSelf: 'start',\n gridColumnStart: 2,\n gridColumnEnd: 3,\n gridRowStart: 2,\n gridRowEnd: 3,\n marginRight: '8px',\n fontSize: '12px',\n lineHeight: 1.3333\n },\n header: {\n alignSelf: 'end',\n gridColumnStart: 2,\n gridColumnEnd: 3,\n gridRowStart: 1,\n gridRowEnd: 2,\n fontSize: '14px',\n marginRight: '8px'\n },\n headerMedia: {\n alignSelf: 'end',\n gridColumnStart: 3,\n gridColumnEnd: 4,\n gridRowStart: 1,\n gridRowEnd: 2,\n fontSize: '12px',\n lineHeight: 1.3333\n },\n startMedia: {\n alignSelf: 'center',\n gridColumnStart: 1,\n gridColumnEnd: 2,\n gridRowStart: 1,\n gridRowEnd: 3,\n marginRight: '8px'\n },\n endMedia: {\n alignSelf: 'center',\n gridColumnStart: 4,\n gridColumnEnd: 5,\n gridRowStart: 1,\n gridRowEnd: 3\n }\n});\n"],"names":["useItemLayoutStyles","__styles","root","mc9l5x","Budl1dq","sshi5w","contentMedia","qb2dma","Br312pm","Bw0ie65","Ijaq50","nk6f5a","Be2twd7","Bg96gwp","contentWrapper","t21cq0","header","headerMedia","startMedia","endMedia","d"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BACaA;;;eAAAA;;;iCADc;AACpB,MAAMA,sBAAmB,WAAA,GAAGC,IAAAA,yBAAA,EAAA;IAAAC,MAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,QAAA;IAAA;IAAAC,cAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;IAAA;IAAAC,gBAAA;QAAAP,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAI,QAAA;YAAA;YAAA;SAAA;QAAAH,SAAA;QAAAC,SAAA;IAAA;IAAAG,QAAA;QAAAT,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAG,QAAA;YAAA;YAAA;SAAA;IAAA;IAAAE,aAAA;QAAAV,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;IAAA;IAAAK,YAAA;QAAAX,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAI,QAAA;YAAA;YAAA;SAAA;IAAA;IAAAI,UAAA;QAAAZ,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;IAAA;AAAA,GAAA;IAAAS,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"sourcesContent":["export * from './ItemLayout';\nexport * from './ItemLayout.styles';\n"],"names":[],"rangeMappings":";;;;;;","mappings":";;;;;uBAAc;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["List.
|
|
1
|
+
{"version":3,"sources":["List.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useList_unstable } from './useList';\nimport { renderList_unstable } from './renderList';\nimport { useListStyles_unstable } from './useListStyles.styles';\nimport type { ListProps } from './List.types';\nimport { useListContextValues_unstable } from './useListContextValues';\n\nexport const List: ForwardRefComponent<ListProps> = React.forwardRef((props, ref) => {\n const state = useList_unstable(props, ref);\n const contextValues = useListContextValues_unstable(state);\n\n useListStyles_unstable(state);\n useCustomStyleHook_unstable('useListStyles_unstable')(state);\n\n return renderList_unstable(state, contextValues);\n});\n\nList.displayName = 'List';\n"],"names":["List","React","forwardRef","props","ref","state","useList_unstable","contextValues","useListContextValues_unstable","useListStyles_unstable","useCustomStyleHook_unstable","renderList_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;;iEATU;qCAEqB;yBACX;4BACG;qCACG;sCAEO;AAEvC,MAAMA,OAAAA,WAAAA,GAAuCC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC3E,MAAMC,QAAQC,IAAAA,yBAAAA,EAAiBH,OAAOC;IACtC,MAAMG,gBAAgBC,IAAAA,mDAAAA,EAA8BH;IAEpDI,IAAAA,2CAAAA,EAAuBJ;IACvBK,IAAAA,gDAAAA,EAA4B,0BAA0BL;IAEtD,OAAOM,IAAAA,+BAAAA,EAAoBN,OAAOE;AACpC;AAEAP,KAAKY,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["List.types.
|
|
1
|
+
{"version":3,"sources":["List.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot, SelectionMode, SelectionItemId } from '@fluentui/react-utilities';\nimport type { ListSelectionState } from '../hooks/types';\n\ntype ListLayout = 'horizontal' | 'vertical' | 'grid';\n\nexport type ListSlots = {\n root: NonNullable<Slot<'ul', 'div' | 'ol'>>;\n};\n\n/**\n * List Props\n */\nexport type ListProps = ComponentProps<ListSlots> & {\n /**\n * Defines the layout orientation.\n *\n * @default vertical\n */\n layout?: ListLayout;\n\n /**\n * Defines if the list should be navigable. Set this to true when adding an `onClick` handler.\n *\n * @default false\n */\n navigable?: boolean;\n\n /**\n * Defines if the List items should be selectable.\n *\n * @default false\n */\n selectable?: boolean;\n\n /**\n * Defines selection mode for the List.\n *\n * @default single\n */\n selectionMode?: SelectionMode;\n\n /**\n * For controlled selection - defines selected items\n */\n selectedItems?: SelectionItemId[];\n\n /**\n * For uncontrolled selection - defines default selected items\n */\n defaultSelectedItems?: SelectionItemId[];\n\n /**\n * Callback for selection change events, used for both controlled and uncontrolled (as notification)\n */\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onSelectionChange?: (event: React.SyntheticEvent, data: { selectedItems: SelectionItemId[] }) => void;\n\n /**\n * Truncates header\n *\n * @default false\n */\n truncateHeader?: boolean;\n\n /**\n * Truncates content\n *\n * @default false\n */\n truncateContent?: boolean;\n};\n\nexport type ListContextValue = {\n navigable: boolean;\n selection?: ListSelectionState;\n as?: 'div' | 'ol' | 'ul';\n truncateHeader?: ListProps['truncateHeader'];\n truncateContent?: ListProps['truncateContent'];\n};\n\nexport type ListContextValues = {\n listContext: ListContextValue;\n};\n\n/**\n * State used in rendering List\n */\nexport type ListState = ComponentState<ListSlots> & Required<Pick<ListProps, 'layout'>> & ListContextValue;\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './List';\nexport * from './List.types';\nexport * from './renderList';\nexport * from './useList';\nexport * from './useListStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -9,12 +9,12 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
listContextDefaultValue: function() {
|
|
13
|
-
return listContextDefaultValue;
|
|
14
|
-
},
|
|
15
12
|
ListContextProvider: function() {
|
|
16
13
|
return ListContextProvider;
|
|
17
14
|
},
|
|
15
|
+
listContextDefaultValue: function() {
|
|
16
|
+
return listContextDefaultValue;
|
|
17
|
+
},
|
|
18
18
|
useListContext_unstable: function() {
|
|
19
19
|
return useListContext_unstable;
|
|
20
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["listContext.
|
|
1
|
+
{"version":3,"sources":["listContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector } from '@fluentui/react-context-selector';\nimport { ListContextValue } from './List.types';\n\nexport const listContextDefaultValue: ListContextValue = {\n navigable: false,\n selection: undefined,\n as: undefined,\n};\n\nconst listContext = createContext<ListContextValue | undefined>(undefined);\n\nexport const ListContextProvider = listContext.Provider;\n\nexport const useListContext_unstable = <T>(selector: ContextSelector<ListContextValue, T>): T =>\n useContextSelector(listContext, (ctx = listContextDefaultValue) => selector(ctx));\n"],"names":["ListContextProvider","listContextDefaultValue","useListContext_unstable","navigable","selection","undefined","as","listContext","createContext","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAYaA,mBAAAA;eAAAA;;IARAC,uBAAAA;eAAAA;;IAUAC,uBAAAA;eAAAA;;;sCAdqC;AAI3C,MAAMD,0BAA4C;IACvDE,WAAW;IACXC,WAAWC;IACXC,IAAID;AACN;AAEA,MAAME,cAAcC,IAAAA,mCAAAA,EAA4CH;AAEzD,MAAML,sBAAsBO,YAAYE,QAAQ;AAEhD,MAAMP,0BAA0B,CAAIQ,WACzCC,IAAAA,wCAAAA,EAAmBJ,aAAa,CAACK,MAAMX,uBAAuB,GAAKS,SAASE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderList.
|
|
1
|
+
{"version":3,"sources":["renderList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { ListState, ListSlots, ListContextValues } from './List.types';\nimport { ListContextProvider } from './listContext';\n\n/**\n * Render the final JSX of List\n */\nexport const renderList_unstable = (state: ListState, contextValues: ListContextValues) => {\n assertSlots<ListSlots>(state);\n\n return (\n <ListContextProvider value={contextValues.listContext}>\n <state.root />\n </ListContextProvider>\n );\n};\n"],"names":["renderList_unstable","state","contextValues","assertSlots","_jsx","ListContextProvider","value","listContext","root"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUaA;;;eAAAA;;;4BATb;gCAE4B;6BAEQ;AAK7B,MAAMA,sBAAsB,CAACC,OAAkBC;IACpDC,IAAAA,2BAAAA,EAAuBF;IAEvB,OAAA,WAAA,GACEG,IAAAA,eAAA,EAACC,gCAAAA,EAAAA;QAAoBC,OAAOJ,cAAcK,WAAW;kBACnD,WAAA,GAAAH,IAAAA,eAAA,EAACH,MAAMO,IAAI,EAAA,CAAA;;AAGjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useList.
|
|
1
|
+
{"version":3,"sources":["useList.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n OnSelectionChangeData,\n slot,\n useControllableState,\n useEventCallback,\n} from '@fluentui/react-utilities';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { ListProps, ListState } from './List.types';\nimport { useListSelection } from '../hooks/useListSelection';\n\nconst DEFAULT_ROOT_EL_TYPE = 'ul';\n\n/**\n * Create the state required to render List.\n *\n * The returned state can be modified with hooks such as useListStyles_unstable,\n * before being passed to renderList_unstable.\n *\n * @param props - props from this instance of List\n * @param ref - reference to root HTMLElement of List\n */\nexport const useList_unstable = (props: ListProps, ref: React.Ref<HTMLDivElement | HTMLUListElement>): ListState => {\n const {\n layout = 'vertical',\n navigable = false,\n selectable = false,\n selectionMode = 'single',\n selectedItems,\n defaultSelectedItems,\n as,\n onSelectionChange,\n truncateContent = false,\n truncateHeader = false,\n } = props;\n\n const arrowNavigationAttributes = useArrowNavigationGroup({\n axis: layout === 'grid' ? 'grid-linear' : 'both',\n memorizeCurrent: true,\n });\n\n const [selectionState, setSelectionState] = useControllableState({\n state: selectedItems,\n defaultState: defaultSelectedItems,\n initialState: [],\n });\n\n const onChange = useEventCallback((e: React.SyntheticEvent, data: OnSelectionChangeData) => {\n const selectedItemsAsArray = Array.from(data.selectedItems);\n setSelectionState(selectedItemsAsArray);\n onSelectionChange?.(e, { selectedItems: selectedItemsAsArray });\n });\n\n const selection = useListSelection({\n onSelectionChange: onChange,\n selectionMode,\n selectedItems: selectionState,\n defaultSelectedItems,\n });\n\n return {\n components: {\n root: DEFAULT_ROOT_EL_TYPE,\n },\n root: slot.always(\n getIntrinsicElementProps(DEFAULT_ROOT_EL_TYPE, {\n ref,\n ...(navigable && { role: 'menu' }),\n ...(selectable && {\n role: 'listbox',\n 'aria-multiselectable': selectionMode === 'multiselect' ? true : undefined,\n }),\n ...arrowNavigationAttributes,\n ...props,\n }),\n { elementType: DEFAULT_ROOT_EL_TYPE },\n ),\n layout,\n // context:\n navigable,\n as: as || DEFAULT_ROOT_EL_TYPE,\n truncateContent,\n truncateHeader,\n // only pass down selection state if its handled internally, otherwise just report the events\n selection: selectable ? selection : undefined,\n };\n};\n"],"names":["useList_unstable","DEFAULT_ROOT_EL_TYPE","props","ref","layout","navigable","selectable","selectionMode","selectedItems","defaultSelectedItems","as","onSelectionChange","truncateContent","truncateHeader","arrowNavigationAttributes","useArrowNavigationGroup","axis","memorizeCurrent","selectionState","setSelectionState","useControllableState","state","defaultState","initialState","onChange","useEventCallback","e","data","selectedItemsAsArray","Array","from","selection","useListSelection","components","root","slot","always","getIntrinsicElementProps","role","undefined","elementType"],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YACnE,CAAC;YACD,GAAGzB,yBAAyB;YAC5B,GAAGZ,KAAK;QACV,IACA;YAAEsC,aAAavC;QAAqB;QAEtCG;QACA,WAAW;QACXC;QACAK,IAAIA,MAAMT;QACVW;QACAC;QACA,6FAA6F;QAC7FkB,WAAWzB,aAAayB,YAAYQ;IACtC;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useListContextValues.
|
|
1
|
+
{"version":3,"sources":["useListContextValues.ts"],"sourcesContent":["import { ListContextValues, ListState } from './List.types';\n\nexport function useListContextValues_unstable(state: ListState): ListContextValues {\n const { navigable, selection, as, truncateContent, truncateHeader } = state;\n\n const listContext = {\n navigable,\n selection,\n as,\n truncateContent,\n truncateHeader,\n };\n\n return {\n listContext,\n };\n}\n"],"names":["useListContextValues_unstable","state","navigable","selection","as","truncateContent","truncateHeader","listContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAEgBA;;;eAAAA;;;AAAT,SAASA,8BAA8BC,KAAgB;IAC5D,MAAM,EAAEC,SAAS,EAAEC,SAAS,EAAEC,EAAE,EAAEC,eAAe,EAAEC,cAAc,EAAE,GAAGL;IAEtE,MAAMM,cAAc;QAClBL;QACAC;QACAC;QACAC;QACAC;IACF;IAEA,OAAO;QACLC;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useListStyles.styles.js"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["useListStyles.styles.js"],"sourcesContent":["import { makeStyles, makeResetStyles, mergeClasses } from '@griffel/react';\nexport const listClassNames = {\n root: 'fui-List'\n};\nconst useRootBaseStyles = makeResetStyles({\n padding: 0,\n margin: 0,\n textIndent: 0,\n listStyleType: 'none'\n});\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n rootHorizontal: {\n display: 'flex'\n },\n rootGrid: {\n display: 'grid'\n }\n});\n/**\n * Apply styling to the List slots based on the state\n */ export const useListStyles_unstable = (state)=>{\n 'use no memo';\n const rootStyles = useRootBaseStyles();\n const styles = useStyles();\n const layoutToStyles = {\n ['horizontal']: styles.rootHorizontal,\n ['grid']: styles.rootGrid,\n ['vertical']: undefined\n };\n state.root.className = mergeClasses(listClassNames.root, rootStyles, layoutToStyles[state.layout], state.root.className);\n return state;\n};\n"],"names":["listClassNames","useListStyles_unstable","root","useRootBaseStyles","__resetStyles","useStyles","__styles","rootHorizontal","mc9l5x","rootGrid","d","state","rootStyles","styles","layoutToStyles","undefined","className","mergeClasses","layout"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACaA,cAAc;eAAdA;;IAqBIC,sBAAsB;eAAtBA;;;uBAtByC;AACnD,MAAMD,iBAAiB;IAC1BE,MAAM;AACV;AACA,MAAMC,oBAAiB,WAAA,GAAGC,IAAAA,oBAAA,EAAA,YAAA,MAAA;IAAA;CAKzB;AACD;;CAEA,GAAI,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAC,gBAAA;QAAAC,QAAA;IAAA;IAAAC,UAAA;QAAAD,QAAA;IAAA;AAAA,GAAA;IAAAE,GAAA;QAAA;QAAA;KAAA;AAAA;AAUX,MAAMT,yBAA0BU,CAAAA;IACvC;IACA,MAAMC,aAAaT;IACnB,MAAMU,SAASR;IACf,MAAMS,iBAAiB;QACnB,CAAC,aAAY,EAAGD,OAAON,cAAc;QACrC,CAAC,OAAM,EAAGM,OAAOJ,QAAQ;QACzB,CAAC,WAAU,EAAGM;IAClB;IACAJ,MAAMT,IAAI,CAACc,SAAS,GAAGC,IAAAA,mBAAY,EAACjB,eAAeE,IAAI,EAAEU,YAAYE,cAAc,CAACH,MAAMO,MAAM,CAAC,EAAEP,MAAMT,IAAI,CAACc,SAAS;IACvH,OAAOL;AACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ListItem.
|
|
1
|
+
{"version":3,"sources":["ListItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useListItem_unstable } from './useListItem';\nimport { renderListItem_unstable } from './renderListItem';\nimport { useListItemStyles_unstable } from './useListItemStyles.styles';\nimport type { ListItemProps } from './ListItem.types';\n\nexport const ListItem: ForwardRefComponent<ListItemProps> = React.forwardRef<HTMLLIElement | HTMLDivElement>(\n (props, ref) => {\n const state = useListItem_unstable(props, ref);\n\n useListItemStyles_unstable(state);\n useCustomStyleHook_unstable('useListItemStyles_unstable')(state);\n return renderListItem_unstable(state);\n },\n);\n\nListItem.displayName = 'ListItem';\n"],"names":["ListItem","React","forwardRef","props","ref","state","useListItem_unstable","useListItemStyles_unstable","useCustomStyleHook_unstable","renderListItem_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;qCAEqB;6BACP;gCACG;yCACG;AAGpC,MAAMA,WAAAA,WAAAA,GAA+CC,OAAMC,UAAU,CAC1E,CAACC,OAAOC;IACN,MAAMC,QAAQC,IAAAA,iCAAAA,EAAqBH,OAAOC;IAE1CG,IAAAA,mDAAAA,EAA2BF;IAC3BG,IAAAA,gDAAAA,EAA4B,8BAA8BH;IAC1D,OAAOI,IAAAA,uCAAAA,EAAwBJ;AACjC;AAGFL,SAASU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ListItem.types.
|
|
1
|
+
{"version":3,"sources":["ListItem.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { ItemLayout } from '../../ItemLayout';\n\nexport type ListItemSlots = {\n root: NonNullable<Slot<'li', 'div'>>;\n media?: React.ComponentProps<typeof ItemLayout>['startMedia'];\n header?: React.ComponentProps<typeof ItemLayout>['header'];\n contentWrapper?: React.ComponentProps<typeof ItemLayout>['contentWrapper'];\n headerMedia?: React.ComponentProps<typeof ItemLayout>['headerMedia'];\n contentMedia?: React.ComponentProps<typeof ItemLayout>['contentMedia'];\n endMedia?: React.ComponentProps<typeof ItemLayout>['endMedia'];\n};\n\n/**\n * ListItem Props\n */\nexport type ListItemProps = ComponentProps<ListItemSlots> & {\n value?: string | number;\n truncateHeader?: boolean;\n truncateContent?: boolean;\n};\n\n/**\n * State used in rendering ListItem\n */\nexport type ListItemState = ComponentState<ListItemSlots> & {\n selectable?: boolean;\n selected?: boolean;\n navigable?: boolean;\n truncateHeader?: boolean;\n truncateContent?: boolean;\n};\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './ListItem';\nexport * from './ListItem.types';\nexport * from './renderListItem';\nexport * from './useListItem';\nexport * from './useListItemStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderListItem.
|
|
1
|
+
{"version":3,"sources":["renderListItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { ItemLayout } from '../../ItemLayout';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { ListItemSlots, ListItemState } from './ListItem.types';\n/**\n * Render the final JSX of ListItem\n */\nexport const renderListItem_unstable = (state: ListItemState) => {\n assertSlots<ListItemSlots>(state);\n\n return (\n <state.root>\n <ItemLayout\n startMedia={state.media}\n header={state.header}\n headerMedia={state.headerMedia}\n contentWrapper={state.contentWrapper}\n contentMedia={state.contentMedia}\n endMedia={state.endMedia}\n >\n {state.root.children}\n </ItemLayout>\n </state.root>\n );\n};\n"],"names":["renderListItem_unstable","state","assertSlots","_jsx","root","ItemLayout","startMedia","media","header","headerMedia","contentWrapper","contentMedia","endMedia","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;4BAE2B;gCACC;AAKrB,MAAMA,0BAA0B,CAACC;IACtCC,IAAAA,2BAAAA,EAA2BD;IAE3B,OAAA,WAAA,GACEE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA;kBACT,WAAA,GAAAD,IAAAA,eAAA,EAACE,sBAAAA,EAAAA;YACCC,YAAYL,MAAMM,KAAK;YACvBC,QAAQP,MAAMO,MAAM;YACpBC,aAAaR,MAAMQ,WAAW;YAC9BC,gBAAgBT,MAAMS,cAAc;YACpCC,cAAcV,MAAMU,YAAY;YAChCC,UAAUX,MAAMW,QAAQ;sBAEvBX,MAAMG,IAAI,CAACS,QAAQ;;;AAI5B"}
|