@fluentui/react-card 9.3.3 → 9.4.1

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 (78) hide show
  1. package/CHANGELOG.md +25 -2
  2. package/lib/Card.js.map +1 -1
  3. package/lib/CardFooter.js.map +1 -1
  4. package/lib/CardHeader.js.map +1 -1
  5. package/lib/CardPreview.js.map +1 -1
  6. package/lib/components/Card/Card.js.map +1 -1
  7. package/lib/components/Card/Card.types.js.map +1 -1
  8. package/lib/components/Card/CardContext.js.map +1 -1
  9. package/lib/components/Card/index.js.map +1 -1
  10. package/lib/components/Card/renderCard.js.map +1 -1
  11. package/lib/components/Card/useCard.js.map +1 -1
  12. package/lib/components/Card/useCardContextValue.js.map +1 -1
  13. package/lib/components/Card/useCardSelectable.js.map +1 -1
  14. package/lib/components/Card/useCardStyles.styles.raw.js +366 -0
  15. package/lib/components/Card/useCardStyles.styles.raw.js.map +1 -0
  16. package/lib/components/CardFooter/CardFooter.js.map +1 -1
  17. package/lib/components/CardFooter/CardFooter.types.js.map +1 -1
  18. package/lib/components/CardFooter/index.js.map +1 -1
  19. package/lib/components/CardFooter/renderCardFooter.js.map +1 -1
  20. package/lib/components/CardFooter/useCardFooter.js.map +1 -1
  21. package/lib/components/CardFooter/useCardFooterStyles.styles.raw.js +37 -0
  22. package/lib/components/CardFooter/useCardFooterStyles.styles.raw.js.map +1 -0
  23. package/lib/components/CardHeader/CardHeader.js.map +1 -1
  24. package/lib/components/CardHeader/CardHeader.types.js.map +1 -1
  25. package/lib/components/CardHeader/index.js.map +1 -1
  26. package/lib/components/CardHeader/renderCardHeader.js.map +1 -1
  27. package/lib/components/CardHeader/useCardHeader.js.map +1 -1
  28. package/lib/components/CardHeader/useCardHeaderStyles.styles.raw.js +103 -0
  29. package/lib/components/CardHeader/useCardHeaderStyles.styles.raw.js.map +1 -0
  30. package/lib/components/CardPreview/CardPreview.js.map +1 -1
  31. package/lib/components/CardPreview/CardPreview.types.js.map +1 -1
  32. package/lib/components/CardPreview/index.js.map +1 -1
  33. package/lib/components/CardPreview/renderCardPreview.js.map +1 -1
  34. package/lib/components/CardPreview/useCardPreview.js.map +1 -1
  35. package/lib/components/CardPreview/useCardPreviewStyles.styles.raw.js +35 -0
  36. package/lib/components/CardPreview/useCardPreviewStyles.styles.raw.js.map +1 -0
  37. package/lib/index.js.map +1 -1
  38. package/lib-commonjs/Card.js.map +1 -1
  39. package/lib-commonjs/CardFooter.js.map +1 -1
  40. package/lib-commonjs/CardHeader.js.map +1 -1
  41. package/lib-commonjs/CardPreview.js.map +1 -1
  42. package/lib-commonjs/components/Card/Card.js.map +1 -1
  43. package/lib-commonjs/components/Card/Card.types.js.map +1 -1
  44. package/lib-commonjs/components/Card/CardContext.js.map +1 -1
  45. package/lib-commonjs/components/Card/index.js.map +1 -1
  46. package/lib-commonjs/components/Card/renderCard.js.map +1 -1
  47. package/lib-commonjs/components/Card/useCard.js.map +1 -1
  48. package/lib-commonjs/components/Card/useCardContextValue.js.map +1 -1
  49. package/lib-commonjs/components/Card/useCardSelectable.js.map +1 -1
  50. package/lib-commonjs/components/Card/useCardStyles.styles.js.map +1 -1
  51. package/lib-commonjs/components/Card/useCardStyles.styles.raw.js +382 -0
  52. package/lib-commonjs/components/Card/useCardStyles.styles.raw.js.map +1 -0
  53. package/lib-commonjs/components/CardFooter/CardFooter.js.map +1 -1
  54. package/lib-commonjs/components/CardFooter/CardFooter.types.js.map +1 -1
  55. package/lib-commonjs/components/CardFooter/index.js.map +1 -1
  56. package/lib-commonjs/components/CardFooter/renderCardFooter.js.map +1 -1
  57. package/lib-commonjs/components/CardFooter/useCardFooter.js.map +1 -1
  58. package/lib-commonjs/components/CardFooter/useCardFooterStyles.styles.js.map +1 -1
  59. package/lib-commonjs/components/CardFooter/useCardFooterStyles.styles.raw.js +51 -0
  60. package/lib-commonjs/components/CardFooter/useCardFooterStyles.styles.raw.js.map +1 -0
  61. package/lib-commonjs/components/CardHeader/CardHeader.js.map +1 -1
  62. package/lib-commonjs/components/CardHeader/CardHeader.types.js.map +1 -1
  63. package/lib-commonjs/components/CardHeader/index.js.map +1 -1
  64. package/lib-commonjs/components/CardHeader/renderCardHeader.js.map +1 -1
  65. package/lib-commonjs/components/CardHeader/useCardHeader.js.map +1 -1
  66. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.styles.js.map +1 -1
  67. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.styles.raw.js +118 -0
  68. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.styles.raw.js.map +1 -0
  69. package/lib-commonjs/components/CardPreview/CardPreview.js.map +1 -1
  70. package/lib-commonjs/components/CardPreview/CardPreview.types.js.map +1 -1
  71. package/lib-commonjs/components/CardPreview/index.js.map +1 -1
  72. package/lib-commonjs/components/CardPreview/renderCardPreview.js.map +1 -1
  73. package/lib-commonjs/components/CardPreview/useCardPreview.js.map +1 -1
  74. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.styles.js.map +1 -1
  75. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.styles.raw.js +49 -0
  76. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.styles.raw.js.map +1 -0
  77. package/lib-commonjs/index.js.map +1 -1
  78. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Card/useCard.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusableGroup, useFocusWithin } from '@fluentui/react-tabster';\n\nimport type { CardProps, CardState } from './Card.types';\nimport { useCardSelectable } from './useCardSelectable';\nimport { cardContextDefaultValue } from './CardContext';\n\nconst focusMap = {\n off: undefined,\n 'no-tab': 'limited-trap-focus',\n 'tab-exit': 'limited',\n 'tab-only': 'unlimited',\n} as const;\n\n/**\n * Create the state for interactive cards.\n *\n * This internal hook defines if the card is interactive\n * and control focus properties based on that.\n *\n * @param props - props from this instance of Card\n */\nconst useCardInteractive = ({ focusMode: initialFocusMode, ...props }: CardProps) => {\n const interactive = (\n [\n 'onClick',\n 'onDoubleClick',\n 'onMouseUp',\n 'onMouseDown',\n 'onPointerUp',\n 'onPointerDown',\n 'onTouchStart',\n 'onTouchEnd',\n 'onDragStart',\n 'onDragEnd',\n ] as (keyof React.HTMLAttributes<HTMLElement>)[]\n ).some(prop => props[prop]);\n\n // default focusMode to tab-only when interactive, and off when not\n const focusMode = initialFocusMode ?? (interactive ? 'no-tab' : 'off');\n\n const groupperAttrs = useFocusableGroup({\n tabBehavior: focusMap[focusMode],\n });\n\n const interactiveFocusAttributes = {\n ...groupperAttrs,\n tabIndex: 0,\n };\n\n return {\n interactive,\n focusAttributes: focusMode === 'off' ? null : interactiveFocusAttributes,\n };\n};\n\n/**\n * Create the state required to render Card.\n *\n * The returned state can be modified with hooks such as useCardStyles_unstable,\n * before being passed to renderCard_unstable.\n *\n * @param props - props from this instance of Card\n * @param ref - reference to the root element of Card\n */\nexport const useCard_unstable = (props: CardProps, ref: React.Ref<HTMLDivElement>): CardState => {\n const { appearance = 'filled', orientation = 'vertical', size = 'medium' } = props;\n\n const [referenceId, setReferenceId] = React.useState(cardContextDefaultValue.selectableA11yProps.referenceId);\n const [referenceLabel, setReferenceLabel] = React.useState(cardContextDefaultValue.selectableA11yProps.referenceId);\n\n const cardBaseRef = useFocusWithin<HTMLDivElement>();\n const { selectable, selected, selectableCardProps, selectFocused, checkboxSlot, floatingActionSlot } =\n useCardSelectable(props, { referenceId, referenceLabel }, cardBaseRef);\n\n const cardRef = useMergedRefs(cardBaseRef, ref);\n\n const { interactive, focusAttributes } = useCardInteractive(props);\n\n return {\n appearance,\n orientation,\n size,\n interactive,\n selectable,\n selectFocused,\n selected,\n selectableA11yProps: {\n setReferenceId,\n referenceId,\n referenceLabel,\n setReferenceLabel,\n },\n\n components: {\n root: 'div',\n floatingAction: 'div',\n checkbox: 'input',\n },\n\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: cardRef,\n role: 'group',\n ...(!selectable ? focusAttributes : null),\n ...props,\n ...selectableCardProps,\n }),\n { elementType: 'div' },\n ),\n\n floatingAction: floatingActionSlot,\n checkbox: checkboxSlot,\n };\n};\n"],"names":["useCard_unstable","focusMap","off","undefined","useCardInteractive","focusMode","initialFocusMode","props","interactive","some","prop","groupperAttrs","useFocusableGroup","tabBehavior","interactiveFocusAttributes","tabIndex","focusAttributes","ref","appearance","orientation","size","referenceId","setReferenceId","React","useState","cardContextDefaultValue","selectableA11yProps","referenceLabel","setReferenceLabel","cardBaseRef","useFocusWithin","selectable","selected","selectableCardProps","selectFocused","checkboxSlot","floatingActionSlot","useCardSelectable","cardRef","useMergedRefs","components","root","floatingAction","checkbox","slot","always","getIntrinsicElementProps","role","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAkEaA;;;eAAAA;;;;iEAlEU;gCACuC;8BACZ;mCAGhB;6BACM;AAExC,MAAMC,WAAW;IACfC,KAAKC;IACL,UAAU;IACV,YAAY;IACZ,YAAY;AACd;AAEA;;;;;;;CAOC,GACD,MAAMC,qBAAqB,CAAC,EAAEC,WAAWC,gBAAgB,EAAE,GAAGC,OAAkB;IAC9E,MAAMC,cAAc;QAEhB;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD,CACDC,IAAI,CAACC,CAAAA,OAAQH,KAAK,CAACG,KAAK;IAE1B,mEAAmE;IACnE,MAAML,YAAYC,qBAAAA,QAAAA,qBAAAA,KAAAA,IAAAA,mBAAqBE,cAAc,WAAW;IAEhE,MAAMG,gBAAgBC,IAAAA,+BAAAA,EAAkB;QACtCC,aAAaZ,QAAQ,CAACI,UAAU;IAClC;IAEA,MAAMS,6BAA6B;QACjC,GAAGH,aAAa;QAChBI,UAAU;IACZ;IAEA,OAAO;QACLP;QACAQ,iBAAiBX,cAAc,QAAQ,OAAOS;IAChD;AACF;AAWO,MAAMd,mBAAmB,CAACO,OAAkBU;IACjD,MAAM,EAAEC,aAAa,QAAQ,EAAEC,cAAc,UAAU,EAAEC,OAAO,QAAQ,EAAE,GAAGb;IAE7E,MAAM,CAACc,aAAaC,eAAe,GAAGC,OAAMC,QAAQ,CAACC,oCAAAA,CAAwBC,mBAAmB,CAACL,WAAW;IAC5G,MAAM,CAACM,gBAAgBC,kBAAkB,GAAGL,OAAMC,QAAQ,CAACC,oCAAAA,CAAwBC,mBAAmB,CAACL,WAAW;IAElH,MAAMQ,cAAcC,IAAAA,4BAAAA;IACpB,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,mBAAmB,EAAEC,aAAa,EAAEC,YAAY,EAAEC,kBAAkB,EAAE,GAClGC,IAAAA,oCAAAA,EAAkB9B,OAAO;QAAEc;QAAaM;IAAe,GAAGE;IAE5D,MAAMS,UAAUC,IAAAA,6BAAAA,EAAcV,aAAaZ;IAE3C,MAAM,EAAET,WAAW,EAAEQ,eAAe,EAAE,GAAGZ,mBAAmBG;IAE5D,OAAO;QACLW;QACAC;QACAC;QACAZ;QACAuB;QACAG;QACAF;QACAN,qBAAqB;YACnBJ;YACAD;YACAM;YACAC;QACF;QAEAY,YAAY;YACVC,MAAM;YACNC,gBAAgB;YAChBC,UAAU;QACZ;QAEAF,MAAMG,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyB,OAAO;YAC9B7B,KAAKqB;YACLS,MAAM;YACN,GAAI,CAAChB,aAAaf,kBAAkB,IAAI;YACxC,GAAGT,KAAK;YACR,GAAG0B,mBAAmB;QACxB,IACA;YAAEe,aAAa;QAAM;QAGvBN,gBAAgBN;QAChBO,UAAUR;IACZ;AACF"}
1
+ {"version":3,"sources":["../src/components/Card/useCard.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusableGroup, useFocusWithin } from '@fluentui/react-tabster';\n\nimport type { CardProps, CardState } from './Card.types';\nimport { useCardSelectable } from './useCardSelectable';\nimport { cardContextDefaultValue } from './CardContext';\n\nconst focusMap = {\n off: undefined,\n 'no-tab': 'limited-trap-focus',\n 'tab-exit': 'limited',\n 'tab-only': 'unlimited',\n} as const;\n\n/**\n * Create the state for interactive cards.\n *\n * This internal hook defines if the card is interactive\n * and control focus properties based on that.\n *\n * @param props - props from this instance of Card\n */\nconst useCardInteractive = ({ focusMode: initialFocusMode, ...props }: CardProps) => {\n const interactive = (\n [\n 'onClick',\n 'onDoubleClick',\n 'onMouseUp',\n 'onMouseDown',\n 'onPointerUp',\n 'onPointerDown',\n 'onTouchStart',\n 'onTouchEnd',\n 'onDragStart',\n 'onDragEnd',\n ] as (keyof React.HTMLAttributes<HTMLElement>)[]\n ).some(prop => props[prop]);\n\n // default focusMode to tab-only when interactive, and off when not\n const focusMode = initialFocusMode ?? (interactive ? 'no-tab' : 'off');\n\n const groupperAttrs = useFocusableGroup({\n tabBehavior: focusMap[focusMode],\n });\n\n const interactiveFocusAttributes = {\n ...groupperAttrs,\n tabIndex: 0,\n };\n\n return {\n interactive,\n focusAttributes: focusMode === 'off' ? null : interactiveFocusAttributes,\n };\n};\n\n/**\n * Create the state required to render Card.\n *\n * The returned state can be modified with hooks such as useCardStyles_unstable,\n * before being passed to renderCard_unstable.\n *\n * @param props - props from this instance of Card\n * @param ref - reference to the root element of Card\n */\nexport const useCard_unstable = (props: CardProps, ref: React.Ref<HTMLDivElement>): CardState => {\n const { appearance = 'filled', orientation = 'vertical', size = 'medium' } = props;\n\n const [referenceId, setReferenceId] = React.useState(cardContextDefaultValue.selectableA11yProps.referenceId);\n const [referenceLabel, setReferenceLabel] = React.useState(cardContextDefaultValue.selectableA11yProps.referenceId);\n\n const cardBaseRef = useFocusWithin<HTMLDivElement>();\n const { selectable, selected, selectableCardProps, selectFocused, checkboxSlot, floatingActionSlot } =\n useCardSelectable(props, { referenceId, referenceLabel }, cardBaseRef);\n\n const cardRef = useMergedRefs(cardBaseRef, ref);\n\n const { interactive, focusAttributes } = useCardInteractive(props);\n\n return {\n appearance,\n orientation,\n size,\n interactive,\n selectable,\n selectFocused,\n selected,\n selectableA11yProps: {\n setReferenceId,\n referenceId,\n referenceLabel,\n setReferenceLabel,\n },\n\n components: {\n root: 'div',\n floatingAction: 'div',\n checkbox: 'input',\n },\n\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: cardRef,\n role: 'group',\n ...(!selectable ? focusAttributes : null),\n ...props,\n ...selectableCardProps,\n }),\n { elementType: 'div' },\n ),\n\n floatingAction: floatingActionSlot,\n checkbox: checkboxSlot,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","slot","useFocusableGroup","useFocusWithin","useCardSelectable","cardContextDefaultValue","focusMap","off","undefined","useCardInteractive","focusMode","initialFocusMode","props","interactive","some","prop","groupperAttrs","tabBehavior","interactiveFocusAttributes","tabIndex","focusAttributes","useCard_unstable","ref","appearance","orientation","size","referenceId","setReferenceId","useState","selectableA11yProps","referenceLabel","setReferenceLabel","cardBaseRef","selectable","selected","selectableCardProps","selectFocused","checkboxSlot","floatingActionSlot","cardRef","components","root","floatingAction","checkbox","always","role","elementType"],"mappings":";;;;+BAkEauB;;;;;;;iEAlEU,QAAQ;gCAC+B,4BAA4B;8BACxC,0BAA0B;mCAG1C,sBAAsB;6BAChB,gBAAgB;AAExD,MAAMf,WAAW;IACfC,KAAKC;IACL,UAAU;IACV,YAAY;IACZ,YAAY;AACd;AAEA;;;;;;;CAOC,GACD,MAAMC,qBAAqB,CAAC,EAAEC,WAAWC,gBAAgB,EAAE,GAAGC,OAAkB;IAC9E,MAAMC,cACJ;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD,CACDC,IAAI,CAACC,CAAAA,OAAQH,KAAK,CAACG,KAAK;IAE1B,mEAAmE;IACnE,MAAML,YAAYC,qBAAAA,QAAAA,qBAAAA,KAAAA,IAAAA,mBAAqBE,cAA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QAChBK,UAAUN;IACZ;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Card/useCardContextValue.ts"],"sourcesContent":["import type { CardContextValue, CardState } from './Card.types';\n\nexport function useCardContextValue({ selectableA11yProps }: CardState): CardContextValue {\n return { selectableA11yProps };\n}\n"],"names":["useCardContextValue","selectableA11yProps"],"rangeMappings":";;;;;;;;;;;;;;","mappings":";;;;+BAEgBA;;;eAAAA;;;AAAT,SAASA,oBAAoB,EAAEC,mBAAmB,EAAa;IACpE,OAAO;QAAEA;IAAoB;AAC/B"}
1
+ {"version":3,"sources":["../src/components/Card/useCardContextValue.ts"],"sourcesContent":["import type { CardContextValue, CardState } from './Card.types';\n\nexport function useCardContextValue({ selectableA11yProps }: CardState): CardContextValue {\n return { selectableA11yProps };\n}\n"],"names":["useCardContextValue","selectableA11yProps"],"mappings":";;;;;;;;;;AAEO,SAASA,oBAAoB,EAAEC,mBAAmB,EAAa;IACpE,OAAO;QAAEA;IAAoB;AAC/B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Card/useCardSelectable.ts"],"sourcesContent":["import * as React from 'react';\nimport { mergeCallbacks, slot, useControllableState } from '@fluentui/react-utilities';\nimport { Enter } from '@fluentui/keyboard-keys';\nimport { useFocusFinders } from '@fluentui/react-tabster';\n\nimport type { CardContextValue, CardOnSelectionChangeEvent, CardProps, CardSlots } from './Card.types';\n\ntype SelectableA11yProps = Pick<CardContextValue['selectableA11yProps'], 'referenceId' | 'referenceLabel'>;\n\n/**\n * @internal\n *\n * Create the state related to selectable cards.\n *\n * This internal hook controls all the logic for selectable cards and is\n * intended to be used alongside with useCard_unstable.\n *\n * @param props - props from this instance of Card\n * @param a11yProps - accessibility props shared between elements of the card\n * @param cardRef - reference to the root element of Card\n */\nexport const useCardSelectable = (\n props: CardProps,\n { referenceLabel, referenceId }: SelectableA11yProps,\n cardRef: React.RefObject<HTMLDivElement>,\n) => {\n const { checkbox = {}, onSelectionChange, floatingAction, onClick, onKeyDown } = props;\n\n const { findAllFocusable } = useFocusFinders();\n const checkboxRef = React.useRef<HTMLInputElement>(null);\n\n const [selected, setSelected] = useControllableState({\n state: props.selected,\n defaultState: props.defaultSelected,\n initialState: false,\n });\n const selectable = [props.selected, props.defaultSelected, onSelectionChange].some(\n prop => typeof prop !== 'undefined',\n );\n\n const [selectFocused, setSelectFocused] = React.useState(false);\n\n const shouldRestrictTriggerAction = React.useCallback(\n (event: CardOnSelectionChangeEvent) => {\n if (!cardRef.current) {\n return false;\n }\n\n const focusableElements = findAllFocusable(cardRef.current);\n const target = event.target as HTMLElement;\n const isElementInFocusableGroup = focusableElements.some(element => element.contains(target));\n const isCheckboxSlot = checkboxRef?.current === target;\n\n return isElementInFocusableGroup && !isCheckboxSlot;\n },\n [cardRef, findAllFocusable],\n );\n\n const onChangeHandler = React.useCallback(\n (event: CardOnSelectionChangeEvent) => {\n if (shouldRestrictTriggerAction(event)) {\n return;\n }\n\n const newCheckedValue = !selected;\n\n setSelected(newCheckedValue);\n\n if (onSelectionChange) {\n onSelectionChange(event, { selected: newCheckedValue });\n }\n },\n [onSelectionChange, selected, setSelected, shouldRestrictTriggerAction],\n );\n\n const onKeyDownHandler = React.useCallback(\n (event: React.KeyboardEvent<HTMLElement>) => {\n if ([Enter].includes(event.key)) {\n event.preventDefault();\n onChangeHandler(event);\n }\n },\n [onChangeHandler],\n );\n\n const checkboxSlot = React.useMemo(() => {\n if (!selectable || floatingAction) {\n return;\n }\n\n const selectableCheckboxProps: CardSlots['checkbox'] = {};\n\n if (referenceId) {\n selectableCheckboxProps['aria-labelledby'] = referenceId;\n } else if (referenceLabel) {\n selectableCheckboxProps['aria-label'] = referenceLabel;\n }\n\n return slot.optional(checkbox, {\n defaultProps: {\n ref: checkboxRef,\n type: 'checkbox',\n checked: selected,\n onChange: (event: React.ChangeEvent<HTMLInputElement>) => onChangeHandler(event),\n onFocus: () => setSelectFocused(true),\n onBlur: () => setSelectFocused(false),\n ...selectableCheckboxProps,\n },\n elementType: 'input',\n });\n }, [checkbox, floatingAction, selected, selectable, onChangeHandler, referenceId, referenceLabel]);\n\n const floatingActionSlot = React.useMemo(() => {\n if (!floatingAction) {\n return;\n }\n\n return slot.optional(floatingAction, {\n defaultProps: {\n ref: checkboxRef,\n },\n elementType: 'div',\n });\n }, [floatingAction]);\n\n const selectableCardProps = React.useMemo(() => {\n if (!selectable) {\n return null;\n }\n\n return {\n onClick: mergeCallbacks(onClick, onChangeHandler),\n onKeyDown: mergeCallbacks(onKeyDown, onKeyDownHandler),\n };\n }, [selectable, onChangeHandler, onClick, onKeyDown, onKeyDownHandler]);\n\n return {\n selected,\n selectable,\n selectFocused,\n selectableCardProps,\n checkboxSlot,\n floatingActionSlot,\n };\n};\n"],"names":["useCardSelectable","props","referenceLabel","referenceId","cardRef","checkbox","onSelectionChange","floatingAction","onClick","onKeyDown","findAllFocusable","useFocusFinders","checkboxRef","React","useRef","selected","setSelected","useControllableState","state","defaultState","defaultSelected","initialState","selectable","some","prop","selectFocused","setSelectFocused","useState","shouldRestrictTriggerAction","useCallback","event","current","focusableElements","target","isElementInFocusableGroup","element","contains","isCheckboxSlot","onChangeHandler","newCheckedValue","onKeyDownHandler","Enter","includes","key","preventDefault","checkboxSlot","useMemo","selectableCheckboxProps","slot","optional","defaultProps","ref","type","checked","onChange","onFocus","onBlur","elementType","floatingActionSlot","selectableCardProps","mergeCallbacks"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAqBaA;;;eAAAA;;;;iEArBU;gCACoC;8BACrC;8BACU;AAkBzB,MAAMA,oBAAoB,CAC/BC,OACA,EAAEC,cAAc,EAAEC,WAAW,EAAuB,EACpDC;IAEA,MAAM,EAAEC,WAAW,CAAC,CAAC,EAAEC,iBAA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B;QACAO;QACAG;QACAkC;QACAd;QACAa;IACF;AACF"}
1
+ {"version":3,"sources":["../src/components/Card/useCardSelectable.ts"],"sourcesContent":["import * as React from 'react';\nimport { mergeCallbacks, slot, useControllableState } from '@fluentui/react-utilities';\nimport { Enter } from '@fluentui/keyboard-keys';\nimport { useFocusFinders } from '@fluentui/react-tabster';\n\nimport type { CardContextValue, CardOnSelectionChangeEvent, CardProps, CardSlots } from './Card.types';\n\ntype SelectableA11yProps = Pick<CardContextValue['selectableA11yProps'], 'referenceId' | 'referenceLabel'>;\n\n/**\n * @internal\n *\n * Create the state related to selectable cards.\n *\n * This internal hook controls all the logic for selectable cards and is\n * intended to be used alongside with useCard_unstable.\n *\n * @param props - props from this instance of Card\n * @param a11yProps - accessibility props shared between elements of the card\n * @param cardRef - reference to the root element of Card\n */\nexport const useCardSelectable = (\n props: CardProps,\n { referenceLabel, referenceId }: SelectableA11yProps,\n cardRef: React.RefObject<HTMLDivElement>,\n) => {\n const { checkbox = {}, onSelectionChange, floatingAction, onClick, onKeyDown } = props;\n\n const { findAllFocusable } = useFocusFinders();\n const checkboxRef = React.useRef<HTMLInputElement>(null);\n\n const [selected, setSelected] = useControllableState({\n state: props.selected,\n defaultState: props.defaultSelected,\n initialState: false,\n });\n const selectable = [props.selected, props.defaultSelected, onSelectionChange].some(\n prop => typeof prop !== 'undefined',\n );\n\n const [selectFocused, setSelectFocused] = React.useState(false);\n\n const shouldRestrictTriggerAction = React.useCallback(\n (event: CardOnSelectionChangeEvent) => {\n if (!cardRef.current) {\n return false;\n }\n\n const focusableElements = findAllFocusable(cardRef.current);\n const target = event.target as HTMLElement;\n const isElementInFocusableGroup = focusableElements.some(element => element.contains(target));\n const isCheckboxSlot = checkboxRef?.current === target;\n\n return isElementInFocusableGroup && !isCheckboxSlot;\n },\n [cardRef, findAllFocusable],\n );\n\n const onChangeHandler = React.useCallback(\n (event: CardOnSelectionChangeEvent) => {\n if (shouldRestrictTriggerAction(event)) {\n return;\n }\n\n const newCheckedValue = !selected;\n\n setSelected(newCheckedValue);\n\n if (onSelectionChange) {\n onSelectionChange(event, { selected: newCheckedValue });\n }\n },\n [onSelectionChange, selected, setSelected, shouldRestrictTriggerAction],\n );\n\n const onKeyDownHandler = React.useCallback(\n (event: React.KeyboardEvent<HTMLElement>) => {\n if ([Enter].includes(event.key)) {\n event.preventDefault();\n onChangeHandler(event);\n }\n },\n [onChangeHandler],\n );\n\n const checkboxSlot = React.useMemo(() => {\n if (!selectable || floatingAction) {\n return;\n }\n\n const selectableCheckboxProps: CardSlots['checkbox'] = {};\n\n if (referenceId) {\n selectableCheckboxProps['aria-labelledby'] = referenceId;\n } else if (referenceLabel) {\n selectableCheckboxProps['aria-label'] = referenceLabel;\n }\n\n return slot.optional(checkbox, {\n defaultProps: {\n ref: checkboxRef,\n type: 'checkbox',\n checked: selected,\n onChange: (event: React.ChangeEvent<HTMLInputElement>) => onChangeHandler(event),\n onFocus: () => setSelectFocused(true),\n onBlur: () => setSelectFocused(false),\n ...selectableCheckboxProps,\n },\n elementType: 'input',\n });\n }, [checkbox, floatingAction, selected, selectable, onChangeHandler, referenceId, referenceLabel]);\n\n const floatingActionSlot = React.useMemo(() => {\n if (!floatingAction) {\n return;\n }\n\n return slot.optional(floatingAction, {\n defaultProps: {\n ref: checkboxRef,\n },\n elementType: 'div',\n });\n }, [floatingAction]);\n\n const selectableCardProps = React.useMemo(() => {\n if (!selectable) {\n return null;\n }\n\n return {\n onClick: mergeCallbacks(onClick, onChangeHandler),\n onKeyDown: mergeCallbacks(onKeyDown, onKeyDownHandler),\n };\n }, [selectable, onChangeHandler, onClick, onKeyDown, onKeyDownHandler]);\n\n return {\n selected,\n selectable,\n selectFocused,\n selectableCardProps,\n checkboxSlot,\n floatingActionSlot,\n };\n};\n"],"names":["React","mergeCallbacks","slot","useControllableState","Enter","useFocusFinders","useCardSelectable","props","referenceLabel","referenceId","cardRef","checkbox","onSelectionChange","floatingAction","onClick","onKeyDown","findAllFocusable","checkboxRef","useRef","selected","setSelected","state","defaultState","defaultSelected","initialState","selectable","some","prop","selectFocused","setSelectFocused","useState","shouldRestrictTriggerAction","useCallback","event","current","focusableElements","target","isElementInFocusableGroup","element","contains","isCheckboxSlot","onChangeHandler","newCheckedValue","onKeyDownHandler","includes","key","preventDefault","checkboxSlot","useMemo","selectableCheckboxProps","optional","defaultProps","ref","type","checked","onChange","onFocus","onBlur","elementType","floatingActionSlot","selectableCardProps"],"mappings":";;;;+BAqBaM;;;;;;;iEArBU,QAAQ;gCAC4B,4BAA4B;8BACjE,0BAA0B;8BAChB,0BAA0B;AAkBnD,0BAA0B,CAC/BC,OACA,EAAEC,cAAc,EAAEC,WAAW,EAAuB,EACpDC;IAEA,MAAM,EAAEC,WAAW,CAAC,CAAC,EAAEC,iBAAiB,EAAEC,cAAc,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGR;IAEjF,MAAM,EAAES,gBAAgB,EAAE,OAAGX,6BAAAA;IAC7B,MAAMY,cAAcjB,OAAMkB,MAAM,CAAmB;IAEnD,MAAM,CAACC,UAAUC,YAAY,OAAGjB,oCAAAA,EAAqB;QACnDkB,OAAOd,MAAMY,QAAQ;QACrBG,cAAcf,MAAMgB,eAAe;QACnCC,cAAc;IAChB;IACA,MAAMC,aAAa;QAAClB,MAAMY,QAAQ;QAAEZ,MAAMgB,eAAe;QAAEX;KAAkB,CAACc,IAAI,CAChFC,CAAAA,OAAQ,OAAOA,SAAS;IAG1B,MAAM,CAACC,eAAeC,iBAAiB,GAAG7B,OAAM8B,QAAQ,CAAC;IAEzD,MAAMC,8BAA8B/B,OAAMgC,WAAW,CACnD,CAACC;QACC,IAAI,CAACvB,QAAQwB,OAAO,EAAE;YACpB,OAAO;QACT;QAEA,MAAMC,oBAAoBnB,iBAAiBN,QAAQwB,OAAO;QAC1D,MAAME,SAASH,MAAMG,MAAM;QAC3B,MAAMC,4BAA4BF,kBAAkBT,IAAI,CAACY,CAAAA,UAAWA,QAAQC,QAAQ,CAACH;QACrF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,qBAAqB3D,OAAMgD,OAAO,CAAC;QACvC,IAAI,CAACnC,gBAAgB;YACnB;QACF;QAEA,OAAOX,oBAAAA,CAAKgD,QAAQ,CAACrC,gBAAgB;YACnCsC,cAAc;gBACZC,KAAKnC;YACP;YACAyC,aAAa;QACf;IACF,GAAG;QAAC7C;KAAe;IAEnB,MAAM+C,sBAAsB5D,OAAMgD,OAAO,CAAC;QACxC,IAAI,CAACvB,YAAY;YACf,OAAO;QACT;QAEA,OAAO;YACLX,aAASb,8BAAAA,EAAea,SAAS2B;YACjC1B,eAAWd,8BAAAA,EAAec,WAAW4B;QACvC;IACF,GAAG;QAAClB;QAAYgB;QAAiB3B;QAASC;QAAW4B;KAAiB;IAEtE,OAAO;QACLxB;QACAM;QACAG;QACAgC;QACAb;QACAY;IACF;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useCardStyles.styles.js"],"sourcesContent":["import * as React from 'react';\nimport { shorthands, makeStyles, mergeClasses, makeResetStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { textClassNames } from '@fluentui/react-text';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { cardPreviewClassNames } from '../CardPreview/useCardPreviewStyles.styles';\nimport { cardHeaderClassNames } from '../CardHeader/useCardHeaderStyles.styles';\nimport { cardFooterClassNames } from '../CardFooter/useCardFooterStyles.styles';\n/**\n * Static CSS class names used internally for the component slots.\n */ export const cardClassNames = {\n root: 'fui-Card',\n floatingAction: 'fui-Card__floatingAction',\n checkbox: 'fui-Card__checkbox'\n};\n/**\n * CSS variable names used internally for uniform styling in Card.\n */ export const cardCSSVars = {\n cardSizeVar: '--fui-Card--size',\n cardBorderRadiusVar: '--fui-Card--border-radius'\n};\nconst focusOutlineStyle = {\n outlineRadius: `var(${cardCSSVars.cardBorderRadiusVar})`,\n outlineWidth: tokens.strokeWidthThick,\n outlineOffset: '-2px'\n};\nconst useCardResetStyles = makeResetStyles({\n overflow: 'hidden',\n borderRadius: `var(${cardCSSVars.cardBorderRadiusVar})`,\n padding: `var(${cardCSSVars.cardSizeVar})`,\n gap: `var(${cardCSSVars.cardSizeVar})`,\n display: 'flex',\n position: 'relative',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n // Border setting using after pseudo element to allow CardPreview to render behind it.\n '::after': {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n content: '\"\"',\n pointerEvents: 'none',\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth(tokens.strokeWidthThin),\n borderRadius: `var(${cardCSSVars.cardBorderRadiusVar})`\n },\n // Prevents CardHeader and CardFooter from shrinking.\n [`> .${cardHeaderClassNames.root}, > .${cardFooterClassNames.root}`]: {\n flexShrink: 0\n }\n});\nconst useCardStyles = makeStyles({\n focused: {\n ...createFocusOutlineStyle({\n style: focusOutlineStyle,\n selector: 'focus'\n })\n },\n selectableFocused: createFocusOutlineStyle({\n style: focusOutlineStyle,\n selector: 'focus-within'\n }),\n orientationHorizontal: {\n flexDirection: 'row',\n alignItems: 'center',\n // Remove vertical padding to keep CardPreview content flush with Card's borders.\n [`> .${cardPreviewClassNames.root}`]: {\n marginTop: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n marginBottom: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`\n },\n // Due to Tabster's \"Groupper\" focus functionality, hidden elements are injected before and after Card's content.\n // As such, the code below targets a CardPreview, when it's the first element.\n // Since this is on horizontal cards, the left padding is removed to keep the content flush with the border.\n [`> :not([aria-hidden=\"true\"]).${cardPreviewClassNames.root}:first-of-type`]: {\n marginLeft: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`\n },\n // Due to Tabster's \"Groupper\" focus functionality, hidden elements are injected before and after Card's content.\n // As such, the code below targets a CardPreview, when it's the last element.\n // Since this is on horizontal cards, the right padding is removed to keep the content flush with the border.\n [`> :not([aria-hidden=\"true\"]).${cardPreviewClassNames.root}:last-of-type`]: {\n marginRight: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`\n },\n // If the last child is a CardHeader or CardFooter, allow it to grow to fill the available space.\n [`> .${cardHeaderClassNames.root}:last-of-type, > .${cardFooterClassNames.root}:last-of-type`]: {\n flexGrow: 1\n }\n },\n orientationVertical: {\n flexDirection: 'column',\n // Remove lateral padding to keep CardPreview content flush with Card's borders.\n [`> .${cardPreviewClassNames.root}`]: {\n marginLeft: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n marginRight: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`\n },\n // Due to Tabster's \"Groupper\" focus functionality, hidden elements are injected before and after Card's content.\n // As such, the code below targets a CardPreview, when it's the first element.\n // Since this is on vertical cards, the top padding is removed to keep the content flush with the border.\n [`> :not([aria-hidden=\"true\"]).${cardPreviewClassNames.root}:first-of-type`]: {\n marginTop: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`\n },\n [`> .${cardClassNames.floatingAction} + .${cardPreviewClassNames.root}`]: {\n marginTop: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`\n },\n // Due to Tabster's \"Groupper\" focus functionality, hidden elements are injected before and after Card's content.\n // As such, the code below targets a CardPreview, when it's the first element.\n // Since this is on vertical cards, the bottom padding is removed to keep the content flush with the border.\n [`> :not([aria-hidden=\"true\"]).${cardPreviewClassNames.root}:last-of-type`]: {\n marginBottom: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`\n }\n },\n sizeSmall: {\n [cardCSSVars.cardSizeVar]: '8px',\n [cardCSSVars.cardBorderRadiusVar]: tokens.borderRadiusSmall\n },\n sizeMedium: {\n [cardCSSVars.cardSizeVar]: '12px',\n [cardCSSVars.cardBorderRadiusVar]: tokens.borderRadiusMedium\n },\n sizeLarge: {\n [cardCSSVars.cardSizeVar]: '16px',\n [cardCSSVars.cardBorderRadiusVar]: tokens.borderRadiusLarge\n },\n interactive: {\n [`& .${textClassNames.root}`]: {\n color: 'currentColor'\n }\n },\n filled: {\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: tokens.shadow4,\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke)\n }\n },\n filledInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: tokens.shadow4,\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke)\n },\n ':hover': {\n color: tokens.colorNeutralForeground1Hover,\n backgroundColor: tokens.colorNeutralBackground1Hover,\n boxShadow: tokens.shadow8\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed\n }\n },\n filledInteractiveSelected: {\n backgroundColor: tokens.colorNeutralBackground1Selected,\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected)\n },\n ':hover': {\n color: tokens.colorNeutralForeground1Selected,\n backgroundColor: tokens.colorNeutralBackground1Selected\n }\n },\n filledAlternative: {\n backgroundColor: tokens.colorNeutralBackground2,\n boxShadow: tokens.shadow4,\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke)\n }\n },\n filledAlternativeInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground2,\n boxShadow: tokens.shadow4,\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke)\n },\n ':hover': {\n color: tokens.colorNeutralForeground2Hover,\n backgroundColor: tokens.colorNeutralBackground2Hover,\n boxShadow: tokens.shadow8\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground2Pressed\n }\n },\n filledAlternativeInteractiveSelected: {\n backgroundColor: tokens.colorNeutralBackground2Selected,\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected)\n },\n ':hover': {\n color: tokens.colorNeutralForeground2Selected,\n backgroundColor: tokens.colorNeutralBackground2Selected\n }\n },\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n boxShadow: 'none',\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1)\n }\n },\n outlineInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorTransparentBackground,\n boxShadow: 'none',\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1)\n },\n ':hover': {\n color: tokens.colorNeutralForeground1Hover,\n backgroundColor: tokens.colorTransparentBackgroundHover,\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover)\n }\n },\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed)\n }\n }\n },\n outlineInteractiveSelected: {\n backgroundColor: tokens.colorTransparentBackgroundSelected,\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected)\n },\n ':hover': {\n color: tokens.colorNeutralForeground1Selected,\n backgroundColor: tokens.colorTransparentBackgroundSelected\n }\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackground,\n boxShadow: 'none',\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke)\n }\n },\n subtleInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorSubtleBackground,\n boxShadow: 'none',\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke)\n },\n ':hover': {\n color: tokens.colorNeutralForeground1Hover,\n backgroundColor: tokens.colorSubtleBackgroundHover\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed\n }\n },\n subtleInteractiveSelected: {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected)\n },\n ':hover': {\n color: tokens.colorNeutralForeground1Selected,\n backgroundColor: tokens.colorSubtleBackgroundSelected\n }\n },\n highContrastSelected: {\n '@media (forced-colors: active)': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n [`& .${cardPreviewClassNames.root}, & .${cardFooterClassNames.root}`]: {\n forcedColorAdjust: 'auto'\n },\n '::after': {\n ...shorthands.borderColor('Highlight')\n }\n }\n },\n highContrastInteractive: {\n '@media (forced-colors: active)': {\n ':hover, :active': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n [`& .${cardPreviewClassNames.root}, & .${cardFooterClassNames.root}`]: {\n forcedColorAdjust: 'auto'\n }\n },\n '::after': {\n ...shorthands.borderColor('Highlight')\n }\n }\n },\n select: {\n position: 'absolute',\n top: '4px',\n right: '4px',\n zIndex: 1\n },\n hiddenCheckbox: {\n overflow: 'hidden',\n width: '1px',\n height: '1px',\n position: 'absolute',\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(50%)',\n whiteSpace: 'nowrap'\n }\n});\n/**\n * Apply styling to the Card slots based on the state.\n */ export const useCardStyles_unstable = (state)=>{\n 'use no memo';\n const resetStyles = useCardResetStyles();\n const styles = useCardStyles();\n const orientationMap = {\n horizontal: styles.orientationHorizontal,\n vertical: styles.orientationVertical\n };\n const sizeMap = {\n small: styles.sizeSmall,\n medium: styles.sizeMedium,\n large: styles.sizeLarge\n };\n const appearanceMap = {\n filled: styles.filled,\n 'filled-alternative': styles.filledAlternative,\n outline: styles.outline,\n subtle: styles.subtle\n };\n const selectedMap = {\n filled: styles.filledInteractiveSelected,\n 'filled-alternative': styles.filledAlternativeInteractiveSelected,\n outline: styles.outlineInteractiveSelected,\n subtle: styles.subtleInteractiveSelected\n };\n const interactiveMap = {\n filled: styles.filledInteractive,\n 'filled-alternative': styles.filledAlternativeInteractive,\n outline: styles.outlineInteractive,\n subtle: styles.subtleInteractive\n };\n const isSelectableOrInteractive = state.interactive || state.selectable;\n const focusedClassName = React.useMemo(()=>{\n if (state.selectable) {\n if (state.selectFocused) {\n return styles.selectableFocused;\n }\n return '';\n }\n return styles.focused;\n }, [\n state.selectFocused,\n state.selectable,\n styles.focused,\n styles.selectableFocused\n ]);\n state.root.className = mergeClasses(cardClassNames.root, resetStyles, orientationMap[state.orientation], sizeMap[state.size], appearanceMap[state.appearance], isSelectableOrInteractive && styles.interactive, isSelectableOrInteractive && interactiveMap[state.appearance], state.selected && selectedMap[state.appearance], focusedClassName, isSelectableOrInteractive && styles.highContrastInteractive, state.selected && styles.highContrastSelected, state.root.className);\n if (state.floatingAction) {\n state.floatingAction.className = mergeClasses(cardClassNames.floatingAction, styles.select, state.floatingAction.className);\n }\n if (state.checkbox) {\n state.checkbox.className = mergeClasses(cardClassNames.checkbox, styles.hiddenCheckbox, state.checkbox.className);\n }\n return state;\n};\n"],"names":["cardCSSVars","cardClassNames","useCardStyles_unstable","root","floatingAction","checkbox","cardSizeVar","cardBorderRadiusVar","focusOutlineStyle","outlineRadius","outlineWidth","tokens","strokeWidthThick","outlineOffset","useCardResetStyles","__resetStyles","useCardStyles","__styles","focused","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bb7d1vk","zhwhgb","dhy2o1","Gfyso","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","f6g5ot","Boxcth7","Bhdgwq3","hgwjuy","Bshpdp8","Bsom6fd","Blkhhs4","Bonggc9","Ddfuxk","i03rao","kclons","clg4pj","Bpqj9nj","B6dhp37","Bf4ptjt","Bqtpl0w","i4rwgc","Dah5zi","B1tsrr9","qqdqy8","Bkh64rk","e3fwne","J0r882","Bule8hv","Bjwuhne","Ghsupd","selectableFocused","Bssx7fj","uh7if5","clntm0","Dlk2r6","Bm3wd5j","Bbrhkcr","f1oku","aywvf2","B2j2mmj","wigs8","pbfy6t","B0v4ure","Byrf0fs","Bsiemmq","Bwckmig","skfxo0","Iidy0u","B98u21t","Bvwlmkc","jo1ztg","Ba1iezr","Blmvk6g","B24cy0v","Bil7v7r","Br3gin4","nr063g","ghq09","Bbgo44z","Bseh09z","az1dzo","Ba3ybja","B6352mv","vppk2z","Biaj6j7","B2pnrqr","B29w5g4","Bhhzhcn","Bec0n69","orientationHorizontal","Beiy3e4","Bt984gj","Binpb3b","qrt8p2","k6ws3r","Btcwela","Fer9m8","orientationVertical","B5nvv7i","Baxg94k","tn21ii","B0ud6bj","Bgdo4j","sizeSmall","B7balbw","B1h88n7","sizeMedium","sizeLarge","interactive","rhjd8f","filled","De3pzq","E5pizo","B0n5ga8","s924m2","B1q35kw","Gp14am","filledInteractive","Bceei9c","Bi91k9c","Jwef8y","Bvxd0ez","ecr2s2","filledInteractiveSelected","filledAlternative","filledAlternativeInteractive","filledAlternativeInteractiveSelected","outline","outlineInteractive","Be0v6ae","B5kxglz","B3pwyw6","Bymgtzf","dmfk","B4ofi8","jgq6uv","Baxewws","outlineInteractiveSelected","subtle","subtleInteractive","subtleInteractiveSelected","highContrastSelected","ycbfsm","Bsw6fvg","Bbusuzp","xgfqdd","Bmmdzwq","zkpvhj","B20bydw","Bwwwggl","highContrastInteractive","h1vhog","kslmdy","Baaf6ca","x9zz3d","select","qhf8xq","Bhzewxz","j35jbq","Bj3rh1h","hiddenCheckbox","B68tc82","Bmxbyg5","Bpg54ce","a9b677","Bqenvij","Bh84pgu","Bgl5zvf","Huce71","f","i","d","p","m","h","a","state","resetStyles","styles","orientationMap","horizontal","vertical","sizeMap","small","medium","large","appearanceMap","selectedMap","interactiveMap","isSelectableOrInteractive","selectable","focusedClassName","React","useMemo","selectFocused","className","mergeClasses","orientation","size","appearance","selected"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,UAAU,CAAC,EAAER,kBAAkBF,6BAA6BX,OAAO5B,uBAAuB,EAAE0B,MAAMwB,QAAQ,IAAItB,OAAOrC,oBAAoB,EAAEmC,MAAMtL,IAAI,CAACyM,SAAS;IACld,IAAInB,MAAMrL,cAAc,EAAE;QACtBqL,MAAMrL,cAAc,CAACwM,SAAS,GAAGC,IAAAA,oBAAY,EAAC5M,eAAeG,cAAc,EAAEuL,OAAOvB,MAAM,EAAEqB,MAAMrL,cAAc,CAACwM,SAAS;IAC9H;IACA,IAAInB,MAAMpL,QAAQ,EAAE;QAChBoL,MAAMpL,QAAQ,CAACuM,SAAS,GAAGC,IAAAA,oBAAY,EAAC5M,eAAeI,QAAQ,EAAEsL,OAAOlB,cAAc,EAAEgB,MAAMpL,QAAQ,CAACuM,SAAS;IACpH;IACA,OAAOnB;AACX"}
1
+ {"version":3,"sources":["useCardStyles.styles.js"],"sourcesContent":["import * as React from 'react';\nimport { shorthands, makeStyles, mergeClasses, makeResetStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { textClassNames } from '@fluentui/react-text';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { cardPreviewClassNames } from '../CardPreview/useCardPreviewStyles.styles';\nimport { cardHeaderClassNames } from '../CardHeader/useCardHeaderStyles.styles';\nimport { cardFooterClassNames } from '../CardFooter/useCardFooterStyles.styles';\n/**\n * Static CSS class names used internally for the component slots.\n */ export const cardClassNames = {\n root: 'fui-Card',\n floatingAction: 'fui-Card__floatingAction',\n checkbox: 'fui-Card__checkbox'\n};\n/**\n * CSS variable names used internally for uniform styling in Card.\n */ export const cardCSSVars = {\n cardSizeVar: '--fui-Card--size',\n cardBorderRadiusVar: '--fui-Card--border-radius'\n};\nconst focusOutlineStyle = {\n outlineRadius: `var(${cardCSSVars.cardBorderRadiusVar})`,\n outlineWidth: tokens.strokeWidthThick,\n outlineOffset: '-2px'\n};\nconst useCardResetStyles = makeResetStyles({\n overflow: 'hidden',\n borderRadius: `var(${cardCSSVars.cardBorderRadiusVar})`,\n padding: `var(${cardCSSVars.cardSizeVar})`,\n gap: `var(${cardCSSVars.cardSizeVar})`,\n display: 'flex',\n position: 'relative',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n // Border setting using after pseudo element to allow CardPreview to render behind it.\n '::after': {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n content: '\"\"',\n pointerEvents: 'none',\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth(tokens.strokeWidthThin),\n borderRadius: `var(${cardCSSVars.cardBorderRadiusVar})`\n },\n // Prevents CardHeader and CardFooter from shrinking.\n [`> .${cardHeaderClassNames.root}, > .${cardFooterClassNames.root}`]: {\n flexShrink: 0\n }\n});\nconst useCardStyles = makeStyles({\n focused: {\n ...createFocusOutlineStyle({\n style: focusOutlineStyle,\n selector: 'focus'\n })\n },\n selectableFocused: createFocusOutlineStyle({\n style: focusOutlineStyle,\n selector: 'focus-within'\n }),\n orientationHorizontal: {\n flexDirection: 'row',\n alignItems: 'center',\n // Remove vertical padding to keep CardPreview content flush with Card's borders.\n [`> .${cardPreviewClassNames.root}`]: {\n marginTop: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n marginBottom: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`\n },\n // Due to Tabster's \"Groupper\" focus functionality, hidden elements are injected before and after Card's content.\n // As such, the code below targets a CardPreview, when it's the first element.\n // Since this is on horizontal cards, the left padding is removed to keep the content flush with the border.\n [`> :not([aria-hidden=\"true\"]).${cardPreviewClassNames.root}:first-of-type`]: {\n marginLeft: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`\n },\n // Due to Tabster's \"Groupper\" focus functionality, hidden elements are injected before and after Card's content.\n // As such, the code below targets a CardPreview, when it's the last element.\n // Since this is on horizontal cards, the right padding is removed to keep the content flush with the border.\n [`> :not([aria-hidden=\"true\"]).${cardPreviewClassNames.root}:last-of-type`]: {\n marginRight: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`\n },\n // If the last child is a CardHeader or CardFooter, allow it to grow to fill the available space.\n [`> .${cardHeaderClassNames.root}:last-of-type, > .${cardFooterClassNames.root}:last-of-type`]: {\n flexGrow: 1\n }\n },\n orientationVertical: {\n flexDirection: 'column',\n // Remove lateral padding to keep CardPreview content flush with Card's borders.\n [`> .${cardPreviewClassNames.root}`]: {\n marginLeft: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n marginRight: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`\n },\n // Due to Tabster's \"Groupper\" focus functionality, hidden elements are injected before and after Card's content.\n // As such, the code below targets a CardPreview, when it's the first element.\n // Since this is on vertical cards, the top padding is removed to keep the content flush with the border.\n [`> :not([aria-hidden=\"true\"]).${cardPreviewClassNames.root}:first-of-type`]: {\n marginTop: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`\n },\n [`> .${cardClassNames.floatingAction} + .${cardPreviewClassNames.root}`]: {\n marginTop: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`\n },\n // Due to Tabster's \"Groupper\" focus functionality, hidden elements are injected before and after Card's content.\n // As such, the code below targets a CardPreview, when it's the first element.\n // Since this is on vertical cards, the bottom padding is removed to keep the content flush with the border.\n [`> :not([aria-hidden=\"true\"]).${cardPreviewClassNames.root}:last-of-type`]: {\n marginBottom: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`\n }\n },\n sizeSmall: {\n [cardCSSVars.cardSizeVar]: '8px',\n [cardCSSVars.cardBorderRadiusVar]: tokens.borderRadiusSmall\n },\n sizeMedium: {\n [cardCSSVars.cardSizeVar]: '12px',\n [cardCSSVars.cardBorderRadiusVar]: tokens.borderRadiusMedium\n },\n sizeLarge: {\n [cardCSSVars.cardSizeVar]: '16px',\n [cardCSSVars.cardBorderRadiusVar]: tokens.borderRadiusLarge\n },\n interactive: {\n [`& .${textClassNames.root}`]: {\n color: 'currentColor'\n }\n },\n filled: {\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: tokens.shadow4,\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke)\n }\n },\n filledInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: tokens.shadow4,\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke)\n },\n ':hover': {\n color: tokens.colorNeutralForeground1Hover,\n backgroundColor: tokens.colorNeutralBackground1Hover,\n boxShadow: tokens.shadow8\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed\n }\n },\n filledInteractiveSelected: {\n backgroundColor: tokens.colorNeutralBackground1Selected,\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected)\n },\n ':hover': {\n color: tokens.colorNeutralForeground1Selected,\n backgroundColor: tokens.colorNeutralBackground1Selected\n }\n },\n filledAlternative: {\n backgroundColor: tokens.colorNeutralBackground2,\n boxShadow: tokens.shadow4,\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke)\n }\n },\n filledAlternativeInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground2,\n boxShadow: tokens.shadow4,\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke)\n },\n ':hover': {\n color: tokens.colorNeutralForeground2Hover,\n backgroundColor: tokens.colorNeutralBackground2Hover,\n boxShadow: tokens.shadow8\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground2Pressed\n }\n },\n filledAlternativeInteractiveSelected: {\n backgroundColor: tokens.colorNeutralBackground2Selected,\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected)\n },\n ':hover': {\n color: tokens.colorNeutralForeground2Selected,\n backgroundColor: tokens.colorNeutralBackground2Selected\n }\n },\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n boxShadow: 'none',\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1)\n }\n },\n outlineInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorTransparentBackground,\n boxShadow: 'none',\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1)\n },\n ':hover': {\n color: tokens.colorNeutralForeground1Hover,\n backgroundColor: tokens.colorTransparentBackgroundHover,\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover)\n }\n },\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed)\n }\n }\n },\n outlineInteractiveSelected: {\n backgroundColor: tokens.colorTransparentBackgroundSelected,\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected)\n },\n ':hover': {\n color: tokens.colorNeutralForeground1Selected,\n backgroundColor: tokens.colorTransparentBackgroundSelected\n }\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackground,\n boxShadow: 'none',\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke)\n }\n },\n subtleInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorSubtleBackground,\n boxShadow: 'none',\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke)\n },\n ':hover': {\n color: tokens.colorNeutralForeground1Hover,\n backgroundColor: tokens.colorSubtleBackgroundHover\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed\n }\n },\n subtleInteractiveSelected: {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected)\n },\n ':hover': {\n color: tokens.colorNeutralForeground1Selected,\n backgroundColor: tokens.colorSubtleBackgroundSelected\n }\n },\n highContrastSelected: {\n '@media (forced-colors: active)': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n [`& .${cardPreviewClassNames.root}, & .${cardFooterClassNames.root}`]: {\n forcedColorAdjust: 'auto'\n },\n '::after': {\n ...shorthands.borderColor('Highlight')\n }\n }\n },\n highContrastInteractive: {\n '@media (forced-colors: active)': {\n ':hover, :active': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n [`& .${cardPreviewClassNames.root}, & .${cardFooterClassNames.root}`]: {\n forcedColorAdjust: 'auto'\n }\n },\n '::after': {\n ...shorthands.borderColor('Highlight')\n }\n }\n },\n select: {\n position: 'absolute',\n top: '4px',\n right: '4px',\n zIndex: 1\n },\n hiddenCheckbox: {\n overflow: 'hidden',\n width: '1px',\n height: '1px',\n position: 'absolute',\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(50%)',\n whiteSpace: 'nowrap'\n }\n});\n/**\n * Apply styling to the Card slots based on the state.\n */ export const useCardStyles_unstable = (state)=>{\n 'use no memo';\n const resetStyles = useCardResetStyles();\n const styles = useCardStyles();\n const orientationMap = {\n horizontal: styles.orientationHorizontal,\n vertical: styles.orientationVertical\n };\n const sizeMap = {\n small: styles.sizeSmall,\n medium: styles.sizeMedium,\n large: styles.sizeLarge\n };\n const appearanceMap = {\n filled: styles.filled,\n 'filled-alternative': styles.filledAlternative,\n outline: styles.outline,\n subtle: styles.subtle\n };\n const selectedMap = {\n filled: styles.filledInteractiveSelected,\n 'filled-alternative': styles.filledAlternativeInteractiveSelected,\n outline: styles.outlineInteractiveSelected,\n subtle: styles.subtleInteractiveSelected\n };\n const interactiveMap = {\n filled: styles.filledInteractive,\n 'filled-alternative': styles.filledAlternativeInteractive,\n outline: styles.outlineInteractive,\n subtle: styles.subtleInteractive\n };\n const isSelectableOrInteractive = state.interactive || state.selectable;\n const focusedClassName = React.useMemo(()=>{\n if (state.selectable) {\n if (state.selectFocused) {\n return styles.selectableFocused;\n }\n return '';\n }\n return styles.focused;\n }, [\n state.selectFocused,\n state.selectable,\n styles.focused,\n styles.selectableFocused\n ]);\n state.root.className = mergeClasses(cardClassNames.root, resetStyles, orientationMap[state.orientation], sizeMap[state.size], appearanceMap[state.appearance], isSelectableOrInteractive && styles.interactive, isSelectableOrInteractive && interactiveMap[state.appearance], state.selected && selectedMap[state.appearance], focusedClassName, isSelectableOrInteractive && styles.highContrastInteractive, state.selected && styles.highContrastSelected, state.root.className);\n if (state.floatingAction) {\n state.floatingAction.className = mergeClasses(cardClassNames.floatingAction, styles.select, state.floatingAction.className);\n }\n if (state.checkbox) {\n state.checkbox.className = mergeClasses(cardClassNames.checkbox, styles.hiddenCheckbox, state.checkbox.className);\n }\n return state;\n};\n"],"names":["React","shorthands","__styles","mergeClasses","__resetStyles","tokens","textClassNames","createFocusOutlineStyle","cardPreviewClassNames","cardHeaderClassNames","cardFooterClassNames","cardClassNames","root","floatingAction","checkbox","cardCSSVars","cardSizeVar","cardBorderRadiusVar","focusOutlineStyle","outlineRadius","outlineWidth","strokeWidthThick","outlineOffset","useCardResetStyles","useCardStyles","focused","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bb7d1vk","zhwhgb","dhy2o1","Gfyso","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","f6g5ot","Boxcth7","Bhdgwq3","hgwjuy","Bshpdp8","Bsom6fd","Blkhhs4","Bonggc9","Ddfuxk","i03rao","kclons","clg4pj","Bpqj9nj","B6dhp37","Bf4ptjt","Bqtpl0w","i4rwgc","Dah5zi","B1tsrr9","qqdqy8","Bkh64rk","e3fwne","J0r882","Bule8hv","Bjwuhne","Ghsupd","selectableFocused","Bssx7fj","uh7if5","clntm0","Dlk2r6","Bm3wd5j","Bbrhkcr","f1oku","aywvf2","B2j2mmj","wigs8","pbfy6t","B0v4ure","Byrf0fs","Bsiemmq","Bwckmig","skfxo0","Iidy0u","B98u21t","Bvwlmkc","jo1ztg","Ba1iezr","Blmvk6g","B24cy0v","Bil7v7r","Br3gin4","nr063g","ghq09","Bbgo44z","Bseh09z","az1dzo","Ba3ybja","B6352mv","vppk2z","Biaj6j7","B2pnrqr","B29w5g4","Bhhzhcn","Bec0n69","orientationHorizontal","Beiy3e4","Bt984gj","Binpb3b","qrt8p2","k6ws3r","Btcwela","Fer9m8","orientationVertical","B5nvv7i","Baxg94k","tn21ii","B0ud6bj","Bgdo4j","sizeSmall","B7balbw","B1h88n7","sizeMedium","sizeLarge","interactive","rhjd8f","filled","De3pzq","E5pizo","B0n5ga8","s924m2","B1q35kw","Gp14am","filledInteractive","Bceei9c","Bi91k9c","Jwef8y","Bvxd0ez","ecr2s2","filledInteractiveSelected","filledAlternative","filledAlternativeInteractive","filledAlternativeInteractiveSelected","outline","outlineInteractive","Be0v6ae","B5kxglz","B3pwyw6","Bymgtzf","dmfk","B4ofi8","jgq6uv","Baxewws","outlineInteractiveSelected","subtle","subtleInteractive","subtleInteractiveSelected","highContrastSelected","ycbfsm","Bsw6fvg","Bbusuzp","xgfqdd","Bmmdzwq","zkpvhj","B20bydw","Bwwwggl","highContrastInteractive","h1vhog","kslmdy","Baaf6ca","x9zz3d","select","qhf8xq","Bhzewxz","j35jbq","Bj3rh1h","hiddenCheckbox","B68tc82","Bmxbyg5","Bpg54ce","a9b677","Bqenvij","Bh84pgu","Bgl5zvf","Huce71","f","i","d","p","m","h","a","useCardStyles_unstable","state","resetStyles","styles","orientationMap","horizontal","vertical","sizeMap","small","medium","large","appearanceMap","selectedMap","interactiveMap","isSelectableOrInteractive","selectable","focusedClassName","useMemo","selectFocused","className","orientation","size","appearance","selected"],"mappings":";;;;;;;;;;;IAiBiBe,WAAW;;;IAPXJ,cAAc;;;0BA6SQ;;;;;iEAvThB,OAAO;wBACwC,gBAAgB;4BAC/D,uBAAuB;AAQnC,uBAAuB;IAC9BC,IAAI,EAAE,UAAU;IAChBC,cAAc,EAAE,0BAA0B;IAC1CC,QAAQ,EAAE;AACd,CAAC;AAGU,oBAAoB;IAC3BE,WAAW,EAAE,kBAAkB;IAC/BC,mBAAmB,EAAE;AACzB,CAAC;AACD,MAAMC,iBAAiB,GAAG;IACtBC,aAAa,EAAE,CAAA,IAAA,EAAOJ,WAAW,CAACE,mBAAmB,CAAA,CAAA,CAAG;IACxDG,YAAY,EAAEf,kBAAM,CAACgB,gBAAgB;IACrCC,aAAa,EAAE;AACnB,CAAC;AACD,MAA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IAAIX,MAAM,CAACvE,WAAW,EAAEkF,yBAAyB,IAAID,cAAc,CAACZ,KAAK,CAACqB,UAAU,CAAC,EAAErB,KAAK,CAACsB,QAAQ,IAAIX,WAAW,CAACX,KAAK,CAACqB,UAAU,CAAC,EAAEN,gBAAgB,EAAEF,yBAAyB,IAAIX,MAAM,CAAC7B,uBAAuB,EAAE2B,KAAK,CAACsB,QAAQ,IAAIpB,MAAM,CAACtC,oBAAoB,EAAEoC,KAAK,CAACrL,IAAI,CAACuM,SAAS,CAAC;IACnd,IAAIlB,KAAK,CAACpL,cAAc,EAAE;QACtBoL,KAAK,CAACpL,cAAc,CAACsM,SAAS,OAAGhN,oBAAY,EAACQ,cAAc,CAACE,cAAc,EAAEsL,MAAM,CAACxB,MAAM,EAAEsB,KAAK,CAACpL,cAAc,CAACsM,SAAS,CAAC;IAC/H;IACA,IAAIlB,KAAK,CAACnL,QAAQ,EAAE;QAChBmL,KAAK,CAACnL,QAAQ,CAACqM,SAAS,OAAGhN,oBAAY,EAACQ,cAAc,CAACG,QAAQ,EAAEqL,MAAM,CAACnB,cAAc,EAAEiB,KAAK,CAACnL,QAAQ,CAACqM,SAAS,CAAC;IACrH;IACA,OAAOlB,KAAK;AAChB,CAAC"}
@@ -0,0 +1,382 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ cardCSSVars: function() {
13
+ return cardCSSVars;
14
+ },
15
+ cardClassNames: function() {
16
+ return cardClassNames;
17
+ },
18
+ useCardStyles_unstable: function() {
19
+ return useCardStyles_unstable;
20
+ }
21
+ });
22
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
23
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
24
+ const _react1 = require("@griffel/react");
25
+ const _reacttheme = require("@fluentui/react-theme");
26
+ const _reacttext = require("@fluentui/react-text");
27
+ const _reacttabster = require("@fluentui/react-tabster");
28
+ const _useCardPreviewStylesstyles = require("../CardPreview/useCardPreviewStyles.styles");
29
+ const _useCardHeaderStylesstyles = require("../CardHeader/useCardHeaderStyles.styles");
30
+ const _useCardFooterStylesstyles = require("../CardFooter/useCardFooterStyles.styles");
31
+ const cardClassNames = {
32
+ root: 'fui-Card',
33
+ floatingAction: 'fui-Card__floatingAction',
34
+ checkbox: 'fui-Card__checkbox'
35
+ };
36
+ const cardCSSVars = {
37
+ cardSizeVar: '--fui-Card--size',
38
+ cardBorderRadiusVar: '--fui-Card--border-radius'
39
+ };
40
+ const focusOutlineStyle = {
41
+ outlineRadius: `var(${cardCSSVars.cardBorderRadiusVar})`,
42
+ outlineWidth: _reacttheme.tokens.strokeWidthThick,
43
+ outlineOffset: '-2px'
44
+ };
45
+ const useCardResetStyles = (0, _react1.makeResetStyles)({
46
+ overflow: 'hidden',
47
+ borderRadius: `var(${cardCSSVars.cardBorderRadiusVar})`,
48
+ padding: `var(${cardCSSVars.cardSizeVar})`,
49
+ gap: `var(${cardCSSVars.cardSizeVar})`,
50
+ display: 'flex',
51
+ position: 'relative',
52
+ boxSizing: 'border-box',
53
+ color: _reacttheme.tokens.colorNeutralForeground1,
54
+ // Border setting using after pseudo element to allow CardPreview to render behind it.
55
+ '::after': {
56
+ position: 'absolute',
57
+ top: 0,
58
+ left: 0,
59
+ right: 0,
60
+ bottom: 0,
61
+ content: '""',
62
+ pointerEvents: 'none',
63
+ ..._react1.shorthands.borderStyle('solid'),
64
+ ..._react1.shorthands.borderWidth(_reacttheme.tokens.strokeWidthThin),
65
+ borderRadius: `var(${cardCSSVars.cardBorderRadiusVar})`
66
+ },
67
+ // Prevents CardHeader and CardFooter from shrinking.
68
+ [`> .${_useCardHeaderStylesstyles.cardHeaderClassNames.root}, > .${_useCardFooterStylesstyles.cardFooterClassNames.root}`]: {
69
+ flexShrink: 0
70
+ }
71
+ });
72
+ const useCardStyles = (0, _react1.makeStyles)({
73
+ focused: {
74
+ ...(0, _reacttabster.createFocusOutlineStyle)({
75
+ style: focusOutlineStyle,
76
+ selector: 'focus'
77
+ })
78
+ },
79
+ selectableFocused: (0, _reacttabster.createFocusOutlineStyle)({
80
+ style: focusOutlineStyle,
81
+ selector: 'focus-within'
82
+ }),
83
+ orientationHorizontal: {
84
+ flexDirection: 'row',
85
+ alignItems: 'center',
86
+ // Remove vertical padding to keep CardPreview content flush with Card's borders.
87
+ [`> .${_useCardPreviewStylesstyles.cardPreviewClassNames.root}`]: {
88
+ marginTop: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,
89
+ marginBottom: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`
90
+ },
91
+ // Due to Tabster's "Groupper" focus functionality, hidden elements are injected before and after Card's content.
92
+ // As such, the code below targets a CardPreview, when it's the first element.
93
+ // Since this is on horizontal cards, the left padding is removed to keep the content flush with the border.
94
+ [`> :not([aria-hidden="true"]).${_useCardPreviewStylesstyles.cardPreviewClassNames.root}:first-of-type`]: {
95
+ marginLeft: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`
96
+ },
97
+ // Due to Tabster's "Groupper" focus functionality, hidden elements are injected before and after Card's content.
98
+ // As such, the code below targets a CardPreview, when it's the last element.
99
+ // Since this is on horizontal cards, the right padding is removed to keep the content flush with the border.
100
+ [`> :not([aria-hidden="true"]).${_useCardPreviewStylesstyles.cardPreviewClassNames.root}:last-of-type`]: {
101
+ marginRight: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`
102
+ },
103
+ // If the last child is a CardHeader or CardFooter, allow it to grow to fill the available space.
104
+ [`> .${_useCardHeaderStylesstyles.cardHeaderClassNames.root}:last-of-type, > .${_useCardFooterStylesstyles.cardFooterClassNames.root}:last-of-type`]: {
105
+ flexGrow: 1
106
+ }
107
+ },
108
+ orientationVertical: {
109
+ flexDirection: 'column',
110
+ // Remove lateral padding to keep CardPreview content flush with Card's borders.
111
+ [`> .${_useCardPreviewStylesstyles.cardPreviewClassNames.root}`]: {
112
+ marginLeft: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,
113
+ marginRight: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`
114
+ },
115
+ // Due to Tabster's "Groupper" focus functionality, hidden elements are injected before and after Card's content.
116
+ // As such, the code below targets a CardPreview, when it's the first element.
117
+ // Since this is on vertical cards, the top padding is removed to keep the content flush with the border.
118
+ [`> :not([aria-hidden="true"]).${_useCardPreviewStylesstyles.cardPreviewClassNames.root}:first-of-type`]: {
119
+ marginTop: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`
120
+ },
121
+ [`> .${cardClassNames.floatingAction} + .${_useCardPreviewStylesstyles.cardPreviewClassNames.root}`]: {
122
+ marginTop: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`
123
+ },
124
+ // Due to Tabster's "Groupper" focus functionality, hidden elements are injected before and after Card's content.
125
+ // As such, the code below targets a CardPreview, when it's the first element.
126
+ // Since this is on vertical cards, the bottom padding is removed to keep the content flush with the border.
127
+ [`> :not([aria-hidden="true"]).${_useCardPreviewStylesstyles.cardPreviewClassNames.root}:last-of-type`]: {
128
+ marginBottom: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`
129
+ }
130
+ },
131
+ sizeSmall: {
132
+ [cardCSSVars.cardSizeVar]: '8px',
133
+ [cardCSSVars.cardBorderRadiusVar]: _reacttheme.tokens.borderRadiusSmall
134
+ },
135
+ sizeMedium: {
136
+ [cardCSSVars.cardSizeVar]: '12px',
137
+ [cardCSSVars.cardBorderRadiusVar]: _reacttheme.tokens.borderRadiusMedium
138
+ },
139
+ sizeLarge: {
140
+ [cardCSSVars.cardSizeVar]: '16px',
141
+ [cardCSSVars.cardBorderRadiusVar]: _reacttheme.tokens.borderRadiusLarge
142
+ },
143
+ interactive: {
144
+ [`& .${_reacttext.textClassNames.root}`]: {
145
+ color: 'currentColor'
146
+ }
147
+ },
148
+ filled: {
149
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground1,
150
+ boxShadow: _reacttheme.tokens.shadow4,
151
+ '::after': {
152
+ ..._react1.shorthands.borderColor(_reacttheme.tokens.colorTransparentStroke)
153
+ }
154
+ },
155
+ filledInteractive: {
156
+ cursor: 'pointer',
157
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground1,
158
+ boxShadow: _reacttheme.tokens.shadow4,
159
+ '::after': {
160
+ ..._react1.shorthands.borderColor(_reacttheme.tokens.colorTransparentStroke)
161
+ },
162
+ ':hover': {
163
+ color: _reacttheme.tokens.colorNeutralForeground1Hover,
164
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground1Hover,
165
+ boxShadow: _reacttheme.tokens.shadow8
166
+ },
167
+ ':active': {
168
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground1Pressed
169
+ }
170
+ },
171
+ filledInteractiveSelected: {
172
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground1Selected,
173
+ '::after': {
174
+ ..._react1.shorthands.borderColor(_reacttheme.tokens.colorNeutralStroke1Selected)
175
+ },
176
+ ':hover': {
177
+ color: _reacttheme.tokens.colorNeutralForeground1Selected,
178
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground1Selected
179
+ }
180
+ },
181
+ filledAlternative: {
182
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground2,
183
+ boxShadow: _reacttheme.tokens.shadow4,
184
+ '::after': {
185
+ ..._react1.shorthands.borderColor(_reacttheme.tokens.colorTransparentStroke)
186
+ }
187
+ },
188
+ filledAlternativeInteractive: {
189
+ cursor: 'pointer',
190
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground2,
191
+ boxShadow: _reacttheme.tokens.shadow4,
192
+ '::after': {
193
+ ..._react1.shorthands.borderColor(_reacttheme.tokens.colorTransparentStroke)
194
+ },
195
+ ':hover': {
196
+ color: _reacttheme.tokens.colorNeutralForeground2Hover,
197
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground2Hover,
198
+ boxShadow: _reacttheme.tokens.shadow8
199
+ },
200
+ ':active': {
201
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground2Pressed
202
+ }
203
+ },
204
+ filledAlternativeInteractiveSelected: {
205
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground2Selected,
206
+ '::after': {
207
+ ..._react1.shorthands.borderColor(_reacttheme.tokens.colorNeutralStroke1Selected)
208
+ },
209
+ ':hover': {
210
+ color: _reacttheme.tokens.colorNeutralForeground2Selected,
211
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground2Selected
212
+ }
213
+ },
214
+ outline: {
215
+ backgroundColor: _reacttheme.tokens.colorTransparentBackground,
216
+ boxShadow: 'none',
217
+ '::after': {
218
+ ..._react1.shorthands.borderColor(_reacttheme.tokens.colorNeutralStroke1)
219
+ }
220
+ },
221
+ outlineInteractive: {
222
+ cursor: 'pointer',
223
+ backgroundColor: _reacttheme.tokens.colorTransparentBackground,
224
+ boxShadow: 'none',
225
+ '::after': {
226
+ ..._react1.shorthands.borderColor(_reacttheme.tokens.colorNeutralStroke1)
227
+ },
228
+ ':hover': {
229
+ color: _reacttheme.tokens.colorNeutralForeground1Hover,
230
+ backgroundColor: _reacttheme.tokens.colorTransparentBackgroundHover,
231
+ '::after': {
232
+ ..._react1.shorthands.borderColor(_reacttheme.tokens.colorNeutralStroke1Hover)
233
+ }
234
+ },
235
+ ':active': {
236
+ backgroundColor: _reacttheme.tokens.colorTransparentBackgroundPressed,
237
+ '::after': {
238
+ ..._react1.shorthands.borderColor(_reacttheme.tokens.colorNeutralStroke1Pressed)
239
+ }
240
+ }
241
+ },
242
+ outlineInteractiveSelected: {
243
+ backgroundColor: _reacttheme.tokens.colorTransparentBackgroundSelected,
244
+ '::after': {
245
+ ..._react1.shorthands.borderColor(_reacttheme.tokens.colorNeutralStroke1Selected)
246
+ },
247
+ ':hover': {
248
+ color: _reacttheme.tokens.colorNeutralForeground1Selected,
249
+ backgroundColor: _reacttheme.tokens.colorTransparentBackgroundSelected
250
+ }
251
+ },
252
+ subtle: {
253
+ backgroundColor: _reacttheme.tokens.colorSubtleBackground,
254
+ boxShadow: 'none',
255
+ '::after': {
256
+ ..._react1.shorthands.borderColor(_reacttheme.tokens.colorTransparentStroke)
257
+ }
258
+ },
259
+ subtleInteractive: {
260
+ cursor: 'pointer',
261
+ backgroundColor: _reacttheme.tokens.colorSubtleBackground,
262
+ boxShadow: 'none',
263
+ '::after': {
264
+ ..._react1.shorthands.borderColor(_reacttheme.tokens.colorTransparentStroke)
265
+ },
266
+ ':hover': {
267
+ color: _reacttheme.tokens.colorNeutralForeground1Hover,
268
+ backgroundColor: _reacttheme.tokens.colorSubtleBackgroundHover
269
+ },
270
+ ':active': {
271
+ backgroundColor: _reacttheme.tokens.colorSubtleBackgroundPressed
272
+ }
273
+ },
274
+ subtleInteractiveSelected: {
275
+ backgroundColor: _reacttheme.tokens.colorSubtleBackgroundSelected,
276
+ '::after': {
277
+ ..._react1.shorthands.borderColor(_reacttheme.tokens.colorNeutralStroke1Selected)
278
+ },
279
+ ':hover': {
280
+ color: _reacttheme.tokens.colorNeutralForeground1Selected,
281
+ backgroundColor: _reacttheme.tokens.colorSubtleBackgroundSelected
282
+ }
283
+ },
284
+ highContrastSelected: {
285
+ '@media (forced-colors: active)': {
286
+ forcedColorAdjust: 'none',
287
+ backgroundColor: 'Highlight',
288
+ color: 'HighlightText',
289
+ [`& .${_useCardPreviewStylesstyles.cardPreviewClassNames.root}, & .${_useCardFooterStylesstyles.cardFooterClassNames.root}`]: {
290
+ forcedColorAdjust: 'auto'
291
+ },
292
+ '::after': {
293
+ ..._react1.shorthands.borderColor('Highlight')
294
+ }
295
+ }
296
+ },
297
+ highContrastInteractive: {
298
+ '@media (forced-colors: active)': {
299
+ ':hover, :active': {
300
+ forcedColorAdjust: 'none',
301
+ backgroundColor: 'Highlight',
302
+ color: 'HighlightText',
303
+ [`& .${_useCardPreviewStylesstyles.cardPreviewClassNames.root}, & .${_useCardFooterStylesstyles.cardFooterClassNames.root}`]: {
304
+ forcedColorAdjust: 'auto'
305
+ }
306
+ },
307
+ '::after': {
308
+ ..._react1.shorthands.borderColor('Highlight')
309
+ }
310
+ }
311
+ },
312
+ select: {
313
+ position: 'absolute',
314
+ top: '4px',
315
+ right: '4px',
316
+ zIndex: 1
317
+ },
318
+ hiddenCheckbox: {
319
+ overflow: 'hidden',
320
+ width: '1px',
321
+ height: '1px',
322
+ position: 'absolute',
323
+ clip: 'rect(0 0 0 0)',
324
+ clipPath: 'inset(50%)',
325
+ whiteSpace: 'nowrap'
326
+ }
327
+ });
328
+ const useCardStyles_unstable = (state)=>{
329
+ 'use no memo';
330
+ const resetStyles = useCardResetStyles();
331
+ const styles = useCardStyles();
332
+ const orientationMap = {
333
+ horizontal: styles.orientationHorizontal,
334
+ vertical: styles.orientationVertical
335
+ };
336
+ const sizeMap = {
337
+ small: styles.sizeSmall,
338
+ medium: styles.sizeMedium,
339
+ large: styles.sizeLarge
340
+ };
341
+ const appearanceMap = {
342
+ filled: styles.filled,
343
+ 'filled-alternative': styles.filledAlternative,
344
+ outline: styles.outline,
345
+ subtle: styles.subtle
346
+ };
347
+ const selectedMap = {
348
+ filled: styles.filledInteractiveSelected,
349
+ 'filled-alternative': styles.filledAlternativeInteractiveSelected,
350
+ outline: styles.outlineInteractiveSelected,
351
+ subtle: styles.subtleInteractiveSelected
352
+ };
353
+ const interactiveMap = {
354
+ filled: styles.filledInteractive,
355
+ 'filled-alternative': styles.filledAlternativeInteractive,
356
+ outline: styles.outlineInteractive,
357
+ subtle: styles.subtleInteractive
358
+ };
359
+ const isSelectableOrInteractive = state.interactive || state.selectable;
360
+ const focusedClassName = _react.useMemo(()=>{
361
+ if (state.selectable) {
362
+ if (state.selectFocused) {
363
+ return styles.selectableFocused;
364
+ }
365
+ return '';
366
+ }
367
+ return styles.focused;
368
+ }, [
369
+ state.selectFocused,
370
+ state.selectable,
371
+ styles.focused,
372
+ styles.selectableFocused
373
+ ]);
374
+ state.root.className = (0, _react1.mergeClasses)(cardClassNames.root, resetStyles, orientationMap[state.orientation], sizeMap[state.size], appearanceMap[state.appearance], isSelectableOrInteractive && styles.interactive, isSelectableOrInteractive && interactiveMap[state.appearance], state.selected && selectedMap[state.appearance], focusedClassName, isSelectableOrInteractive && styles.highContrastInteractive, state.selected && styles.highContrastSelected, state.root.className);
375
+ if (state.floatingAction) {
376
+ state.floatingAction.className = (0, _react1.mergeClasses)(cardClassNames.floatingAction, styles.select, state.floatingAction.className);
377
+ }
378
+ if (state.checkbox) {
379
+ state.checkbox.className = (0, _react1.mergeClasses)(cardClassNames.checkbox, styles.hiddenCheckbox, state.checkbox.className);
380
+ }
381
+ return state;
382
+ };