@fluentui/react-card 9.7.0 → 9.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/CHANGELOG.md +31 -2
  2. package/dist/index.d.cts +485 -0
  3. package/lib/Card.js +1 -1
  4. package/lib/Card.js.map +1 -1
  5. package/lib/CardFooter.js +1 -1
  6. package/lib/CardFooter.js.map +1 -1
  7. package/lib/CardHeader.js +1 -1
  8. package/lib/CardHeader.js.map +1 -1
  9. package/lib/CardPreview.js +1 -1
  10. package/lib/CardPreview.js.map +1 -1
  11. package/lib/components/Card/Card.js +6 -6
  12. package/lib/components/Card/Card.js.map +1 -1
  13. package/lib/components/Card/CardContext.js +1 -1
  14. package/lib/components/Card/index.js +5 -5
  15. package/lib/components/Card/index.js.map +1 -1
  16. package/lib/components/Card/renderCard.js +2 -2
  17. package/lib/components/Card/renderCard.js.map +1 -1
  18. package/lib/components/Card/useCard.js +5 -5
  19. package/lib/components/Card/useCard.js.map +1 -1
  20. package/lib/components/Card/useCardSelectable.js +3 -3
  21. package/lib/components/Card/useCardStyles.styles.js +8 -10
  22. package/lib/components/Card/useCardStyles.styles.js.map +1 -1
  23. package/lib/components/Card/useCardStyles.styles.raw.js +8 -9
  24. package/lib/components/Card/useCardStyles.styles.raw.js.map +1 -1
  25. package/lib/components/CardFooter/CardFooter.js +5 -5
  26. package/lib/components/CardFooter/CardFooter.js.map +1 -1
  27. package/lib/components/CardFooter/index.js +4 -4
  28. package/lib/components/CardFooter/index.js.map +1 -1
  29. package/lib/components/CardFooter/renderCardFooter.js +1 -1
  30. package/lib/components/CardFooter/useCardFooter.js +1 -1
  31. package/lib/components/CardFooter/useCardFooterStyles.styles.js +1 -3
  32. package/lib/components/CardFooter/useCardFooterStyles.styles.js.map +1 -1
  33. package/lib/components/CardFooter/useCardFooterStyles.styles.raw.js +1 -2
  34. package/lib/components/CardFooter/useCardFooterStyles.styles.raw.js.map +1 -1
  35. package/lib/components/CardHeader/CardHeader.js +5 -5
  36. package/lib/components/CardHeader/CardHeader.js.map +1 -1
  37. package/lib/components/CardHeader/index.js +4 -4
  38. package/lib/components/CardHeader/index.js.map +1 -1
  39. package/lib/components/CardHeader/renderCardHeader.js +1 -1
  40. package/lib/components/CardHeader/useCardHeader.js +3 -3
  41. package/lib/components/CardHeader/useCardHeader.js.map +1 -1
  42. package/lib/components/CardHeader/useCardHeaderStyles.styles.js +1 -3
  43. package/lib/components/CardHeader/useCardHeaderStyles.styles.js.map +1 -1
  44. package/lib/components/CardHeader/useCardHeaderStyles.styles.raw.js +1 -2
  45. package/lib/components/CardHeader/useCardHeaderStyles.styles.raw.js.map +1 -1
  46. package/lib/components/CardPreview/CardPreview.js +5 -5
  47. package/lib/components/CardPreview/CardPreview.js.map +1 -1
  48. package/lib/components/CardPreview/index.js +4 -4
  49. package/lib/components/CardPreview/index.js.map +1 -1
  50. package/lib/components/CardPreview/renderCardPreview.js +1 -1
  51. package/lib/components/CardPreview/useCardPreview.js +3 -3
  52. package/lib/components/CardPreview/useCardPreview.js.map +1 -1
  53. package/lib/components/CardPreview/useCardPreviewStyles.styles.js +1 -3
  54. package/lib/components/CardPreview/useCardPreviewStyles.styles.js.map +1 -1
  55. package/lib/components/CardPreview/useCardPreviewStyles.styles.raw.js +1 -2
  56. package/lib/components/CardPreview/useCardPreviewStyles.styles.raw.js.map +1 -1
  57. package/lib/index.js +5 -5
  58. package/lib/index.js.map +1 -1
  59. package/lib-commonjs/{Card.js → Card.cjs} +1 -1
  60. package/lib-commonjs/{Card.js.map → Card.cjs.map} +1 -1
  61. package/lib-commonjs/{CardFooter.js → CardFooter.cjs} +1 -1
  62. package/lib-commonjs/{CardFooter.js.map → CardFooter.cjs.map} +1 -1
  63. package/lib-commonjs/{CardHeader.js → CardHeader.cjs} +1 -1
  64. package/lib-commonjs/{CardHeader.js.map → CardHeader.cjs.map} +1 -1
  65. package/lib-commonjs/{CardPreview.js → CardPreview.cjs} +1 -1
  66. package/lib-commonjs/{CardPreview.js.map → CardPreview.cjs.map} +1 -1
  67. package/lib-commonjs/components/Card/{Card.js → Card.cjs} +4 -4
  68. package/lib-commonjs/components/Card/{Card.js.map → Card.cjs.map} +1 -1
  69. package/lib-commonjs/components/Card/{index.js → index.cjs} +5 -5
  70. package/lib-commonjs/components/Card/{index.js.map → index.cjs.map} +1 -1
  71. package/lib-commonjs/components/Card/{renderCard.js → renderCard.cjs} +1 -1
  72. package/lib-commonjs/components/Card/{renderCard.js.map → renderCard.cjs.map} +1 -1
  73. package/lib-commonjs/components/Card/{useCard.js → useCard.cjs} +2 -2
  74. package/lib-commonjs/components/Card/{useCard.js.map → useCard.cjs.map} +1 -1
  75. package/lib-commonjs/components/Card/{useCardStyles.styles.js → useCardStyles.styles.cjs} +0 -1
  76. package/lib-commonjs/components/Card/useCardStyles.styles.cjs.map +1 -0
  77. package/lib-commonjs/components/Card/{useCardStyles.styles.raw.js → useCardStyles.styles.raw.cjs} +3 -4
  78. package/lib-commonjs/components/Card/useCardStyles.styles.raw.cjs.map +1 -0
  79. package/lib-commonjs/components/CardFooter/{CardFooter.js → CardFooter.cjs} +3 -3
  80. package/lib-commonjs/components/CardFooter/{CardFooter.js.map → CardFooter.cjs.map} +1 -1
  81. package/lib-commonjs/components/CardFooter/{index.js → index.cjs} +4 -4
  82. package/lib-commonjs/components/CardFooter/{index.js.map → index.cjs.map} +1 -1
  83. package/lib-commonjs/components/CardFooter/{useCardFooterStyles.styles.js → useCardFooterStyles.styles.cjs} +0 -1
  84. package/lib-commonjs/components/CardFooter/useCardFooterStyles.styles.cjs.map +1 -0
  85. package/lib-commonjs/components/CardFooter/{useCardFooterStyles.styles.raw.js → useCardFooterStyles.styles.raw.cjs} +0 -1
  86. package/lib-commonjs/components/CardFooter/useCardFooterStyles.styles.raw.cjs.map +1 -0
  87. package/lib-commonjs/components/CardHeader/{CardHeader.js → CardHeader.cjs} +3 -3
  88. package/lib-commonjs/components/CardHeader/{CardHeader.js.map → CardHeader.cjs.map} +1 -1
  89. package/lib-commonjs/components/CardHeader/{index.js → index.cjs} +4 -4
  90. package/lib-commonjs/components/CardHeader/{index.js.map → index.cjs.map} +1 -1
  91. package/lib-commonjs/components/CardHeader/{useCardHeader.js → useCardHeader.cjs} +1 -1
  92. package/lib-commonjs/components/CardHeader/{useCardHeader.js.map → useCardHeader.cjs.map} +1 -1
  93. package/lib-commonjs/components/CardHeader/{useCardHeaderStyles.styles.js → useCardHeaderStyles.styles.cjs} +0 -1
  94. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.styles.cjs.map +1 -0
  95. package/lib-commonjs/components/CardHeader/{useCardHeaderStyles.styles.raw.js → useCardHeaderStyles.styles.raw.cjs} +0 -1
  96. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.styles.raw.cjs.map +1 -0
  97. package/lib-commonjs/components/CardPreview/{CardPreview.js → CardPreview.cjs} +3 -3
  98. package/lib-commonjs/components/CardPreview/{CardPreview.js.map → CardPreview.cjs.map} +1 -1
  99. package/lib-commonjs/components/CardPreview/{index.js → index.cjs} +4 -4
  100. package/lib-commonjs/components/CardPreview/{index.js.map → index.cjs.map} +1 -1
  101. package/lib-commonjs/components/CardPreview/{useCardPreview.js → useCardPreview.cjs} +1 -1
  102. package/lib-commonjs/components/CardPreview/{useCardPreview.js.map → useCardPreview.cjs.map} +1 -1
  103. package/lib-commonjs/components/CardPreview/{useCardPreviewStyles.styles.js → useCardPreviewStyles.styles.cjs} +0 -1
  104. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.styles.cjs.map +1 -0
  105. package/lib-commonjs/components/CardPreview/{useCardPreviewStyles.styles.raw.js → useCardPreviewStyles.styles.raw.cjs} +0 -1
  106. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.styles.raw.cjs.map +1 -0
  107. package/lib-commonjs/{index.js → index.cjs} +4 -4
  108. package/lib-commonjs/{index.js.map → index.cjs.map} +1 -1
  109. package/package.json +20 -15
  110. package/lib-commonjs/components/Card/useCardStyles.styles.js.map +0 -1
  111. package/lib-commonjs/components/Card/useCardStyles.styles.raw.js.map +0 -1
  112. package/lib-commonjs/components/CardFooter/useCardFooterStyles.styles.js.map +0 -1
  113. package/lib-commonjs/components/CardFooter/useCardFooterStyles.styles.raw.js.map +0 -1
  114. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.styles.js.map +0 -1
  115. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.styles.raw.js.map +0 -1
  116. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.styles.js.map +0 -1
  117. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.styles.raw.js.map +0 -1
  118. /package/lib-commonjs/components/Card/{Card.types.js → Card.types.cjs} +0 -0
  119. /package/lib-commonjs/components/Card/{Card.types.js.map → Card.types.cjs.map} +0 -0
  120. /package/lib-commonjs/components/Card/{CardContext.js → CardContext.cjs} +0 -0
  121. /package/lib-commonjs/components/Card/{CardContext.js.map → CardContext.cjs.map} +0 -0
  122. /package/lib-commonjs/components/Card/{useCardContextValue.js → useCardContextValue.cjs} +0 -0
  123. /package/lib-commonjs/components/Card/{useCardContextValue.js.map → useCardContextValue.cjs.map} +0 -0
  124. /package/lib-commonjs/components/Card/{useCardSelectable.js → useCardSelectable.cjs} +0 -0
  125. /package/lib-commonjs/components/Card/{useCardSelectable.js.map → useCardSelectable.cjs.map} +0 -0
  126. /package/lib-commonjs/components/CardFooter/{CardFooter.types.js → CardFooter.types.cjs} +0 -0
  127. /package/lib-commonjs/components/CardFooter/{CardFooter.types.js.map → CardFooter.types.cjs.map} +0 -0
  128. /package/lib-commonjs/components/CardFooter/{renderCardFooter.js → renderCardFooter.cjs} +0 -0
  129. /package/lib-commonjs/components/CardFooter/{renderCardFooter.js.map → renderCardFooter.cjs.map} +0 -0
  130. /package/lib-commonjs/components/CardFooter/{useCardFooter.js → useCardFooter.cjs} +0 -0
  131. /package/lib-commonjs/components/CardFooter/{useCardFooter.js.map → useCardFooter.cjs.map} +0 -0
  132. /package/lib-commonjs/components/CardHeader/{CardHeader.types.js → CardHeader.types.cjs} +0 -0
  133. /package/lib-commonjs/components/CardHeader/{CardHeader.types.js.map → CardHeader.types.cjs.map} +0 -0
  134. /package/lib-commonjs/components/CardHeader/{renderCardHeader.js → renderCardHeader.cjs} +0 -0
  135. /package/lib-commonjs/components/CardHeader/{renderCardHeader.js.map → renderCardHeader.cjs.map} +0 -0
  136. /package/lib-commonjs/components/CardPreview/{CardPreview.types.js → CardPreview.types.cjs} +0 -0
  137. /package/lib-commonjs/components/CardPreview/{CardPreview.types.js.map → CardPreview.types.cjs.map} +0 -0
  138. /package/lib-commonjs/components/CardPreview/{renderCardPreview.js → renderCardPreview.cjs} +0 -0
  139. /package/lib-commonjs/components/CardPreview/{renderCardPreview.js.map → renderCardPreview.cjs.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Card/useCard.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusableGroup, useFocusFinders, useFocusWithin } from '@fluentui/react-tabster';\n\nimport type { CardBaseProps, CardBaseState, CardOnSelectionChangeEvent, 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\nconst interactiveEventProps = [\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\n/**\n * Compute whether a Card is interactive based on the presence of pointer/mouse\n * event props and the disabled flag. This intentionally does not depend on\n * focus management utilities so it can be used from headless contexts.\n */\nconst computeInteractive = (props: CardProps): boolean => {\n if (props.disabled) {\n return false;\n }\n\n return interactiveEventProps.some(prop => props[prop] !== undefined);\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', ...cardProps } = props;\n const { disabled = false, focusMode: focusModeProp } = props;\n\n // Focus-within ref drives the styled focus outline; merged with the user ref\n // before being passed down so the base hook does not depend on react-tabster.\n const focusWithinRef = useFocusWithin<HTMLDivElement>();\n const cardRef = useMergedRefs(focusWithinRef, ref);\n\n // Focus-aware predicate that prevents toggling the selection when the user\n // interacts with an inner focusable element.\n const { findAllFocusable } = useFocusFinders();\n const shouldRestrictTriggerAction = React.useCallback(\n (event: CardOnSelectionChangeEvent) => {\n if (!focusWithinRef.current) {\n return false;\n }\n\n const focusableElements = findAllFocusable(focusWithinRef.current);\n const target = event.target as HTMLElement;\n\n return focusableElements.some(element => element.contains(target));\n },\n [findAllFocusable, focusWithinRef],\n );\n\n const interactive = computeInteractive(props);\n const focusMode = focusModeProp ?? (interactive ? 'no-tab' : 'off');\n const groupperAttrs = useFocusableGroup({\n tabBehavior: focusMap[focusMode],\n });\n\n const state = useCardBase_unstable(\n {\n shouldRestrictTriggerAction,\n ...cardProps,\n },\n cardRef,\n );\n\n // Apply focusable-group attributes only when the card is not selectable, not\n // disabled and the focus mode is enabled.\n const shouldApplyFocusAttributes = !disabled && !state.selectable && focusMode !== 'off';\n if (shouldApplyFocusAttributes) {\n Object.assign(state.root, groupperAttrs, { tabIndex: 0 });\n }\n\n return {\n ...state,\n appearance,\n orientation,\n size,\n };\n};\n\n/**\n * Base hook for Card component, which manages state related to interactivity, selection,\n * ARIA attributes, and slot structure without design props or focus management.\n *\n * This hook is intentionally free of `@fluentui/react-tabster` so that it can be\n * consumed by headless component packages. Focus management (focusable group\n * attributes, focus-within, focus-restriction predicate) is layered on top in\n * `useCard_unstable`.\n *\n * @param props - props from this instance of Card\n * @param ref - reference to the root element of Card\n * @param options - optional behavior overrides such as a focus-aware restriction predicate\n */\nexport const useCardBase_unstable = (props: CardBaseProps, ref: React.Ref<HTMLDivElement>): CardBaseState => {\n const { disabled = false, ...restProps } = props;\n\n const [referenceId, setReferenceId] = React.useState(cardContextDefaultValue.selectableA11yProps.referenceId);\n const [referenceLabel, setReferenceLabel] = React.useState(cardContextDefaultValue.selectableA11yProps.referenceId);\n\n const { selectable, selected, selectableCardProps, selectFocused, checkboxSlot, floatingActionSlot } =\n useCardSelectable(props, { referenceId, referenceLabel });\n\n const interactive = computeInteractive(props);\n\n let cardRootProps = {\n ...restProps,\n ...selectableCardProps,\n };\n\n if (disabled) {\n cardRootProps = {\n ...restProps,\n 'aria-disabled': true,\n onClick: undefined,\n };\n }\n\n return {\n interactive,\n selectable,\n selectFocused,\n selected,\n disabled,\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,\n role: 'group',\n ...cardRootProps,\n }),\n { elementType: 'div' },\n ),\n\n floatingAction: floatingActionSlot,\n checkbox: checkboxSlot,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","slot","useFocusableGroup","useFocusFinders","useFocusWithin","useCardSelectable","cardContextDefaultValue","focusMap","off","undefined","interactiveEventProps","computeInteractive","props","disabled","some","prop","useCard_unstable","ref","appearance","orientation","size","cardProps","focusMode","focusModeProp","focusWithinRef","cardRef","findAllFocusable","shouldRestrictTriggerAction","useCallback","event","current","focusableElements","target","element","contains","interactive","groupperAttrs","tabBehavior","state","useCardBase_unstable","shouldApplyFocusAttributes","selectable","Object","assign","root","tabIndex","restProps","referenceId","setReferenceId","useState","selectableA11yProps","referenceLabel","setReferenceLabel","selected","selectableCardProps","selectFocused","checkboxSlot","floatingActionSlot","cardRootProps","onClick","components","floatingAction","checkbox","always","role","elementType"],"mappings":"AAAA;;;;;;;;;;;;IAwHayC,oBAAAA;;;oBApEAvB;eAAAA;;;;iEAlDU,QAAQ;gCAC+B,4BAA4B;8BACvB,0BAA0B;mCAG3D,sBAAsB;6BAChB,gBAAgB;AAExD,MAAMT,WAAW;IACfC,KAAKC;IACL,UAAU;IACV,YAAY;IACZ,YAAY;AACd;AAEA,MAAMC,wBAAwB;IAC5B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED;;;;CAIC,GACD,MAAMC,qBAAqB,CAACC;IAC1B,IAAIA,MAAMC,QAAQ,EAAE;QAClB,OAAO;IACT;IAEA,OAAOH,sBAAsBI,IAAI,CAACC,CAAAA,OAAQH,KAAK,CAACG,KAAK,KAAKN;AAC5D;AAWO,yBAAyB,CAACG,OAAkBK;IACjD,MAAM,EAAEC,aAAa,QAAQ,EAAEC,cAAc,UAAU,EAAEC,OAAO,QAAQ,EAAE,GAAGC,WAAW,GAAGT;IAC3F,MAAM,EAAEC,WAAW,KAAK,EAAES,WAAWC,aAAa,EAAE,GAAGX;IAEvD,6EAA6E;IAC7E,8EAA8E;IAC9E,MAAMY,qBAAiBpB,4BAAAA;IACvB,MAAMqB,cAAUzB,6BAAAA,EAAcwB,gBAAgBP;IAE9C,2EAA2E;IAC3E,6CAA6C;IAC7C,MAAM,EAAES,gBAAgB,EAAE,OAAGvB,6BAAAA;IAC7B,MAAMwB,8BAA8B7B,OAAM8B,WAAW,CACnD,CAACC;QACC,IAAI,CAACL,eAAeM,OAAO,EAAE;YAC3B,OAAO;QACT;QAEA,MAAMC,oBAAoBL,iBAAiBF,eAAeM,OAAO;QACjE,MAAME,SAASH,MAAMG,MAAM;QAE3B,OAAOD,kBAAkBjB,IAAI,CAACmB,CAAAA,UAAWA,QAAQC,QAAQ,CAACF;IAC5D,GACA;QAACN;QAAkBF;KAAe;IAGpC,MAAMW,c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;YACnBF;YACAD;YACAI;YACAC;QACF;QAEAQ,YAAY;YACVhB,MAAM;YACNiB,gBAAgB;YAChBC,UAAU;QACZ;QAEAlB,MAAM3C,oBAAAA,CAAK8D,MAAM,KACfhE,wCAAAA,EAAyB,OAAO;YAC9BkB;YACA+C,MAAM;YACN,GAAGN,aAAa;QAClB,IACA;YAAEO,aAAa;QAAM;QAGvBJ,gBAAgBJ;QAChBK,UAAUN;IACZ;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/Card/useCard.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusableGroup, useFocusFinders, useFocusWithin } from '@fluentui/react-tabster';\n\nimport type { CardBaseProps, CardBaseState, CardOnSelectionChangeEvent, 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\nconst interactiveEventProps = [\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\n/**\n * Compute whether a Card is interactive based on the presence of pointer/mouse\n * event props and the disabled flag. This intentionally does not depend on\n * focus management utilities so it can be used from headless contexts.\n */\nconst computeInteractive = (props: CardProps): boolean => {\n if (props.disabled) {\n return false;\n }\n\n return interactiveEventProps.some(prop => props[prop] !== undefined);\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', ...cardProps } = props;\n const { disabled = false, focusMode: focusModeProp } = props;\n\n // Focus-within ref drives the styled focus outline; merged with the user ref\n // before being passed down so the base hook does not depend on react-tabster.\n const focusWithinRef = useFocusWithin<HTMLDivElement>();\n const cardRef = useMergedRefs(focusWithinRef, ref);\n\n // Focus-aware predicate that prevents toggling the selection when the user\n // interacts with an inner focusable element.\n const { findAllFocusable } = useFocusFinders();\n const shouldRestrictTriggerAction = React.useCallback(\n (event: CardOnSelectionChangeEvent) => {\n if (!focusWithinRef.current) {\n return false;\n }\n\n const focusableElements = findAllFocusable(focusWithinRef.current);\n const target = event.target as HTMLElement;\n\n return focusableElements.some(element => element.contains(target));\n },\n [findAllFocusable, focusWithinRef],\n );\n\n const interactive = computeInteractive(props);\n const focusMode = focusModeProp ?? (interactive ? 'no-tab' : 'off');\n const groupperAttrs = useFocusableGroup({\n tabBehavior: focusMap[focusMode],\n });\n\n const state = useCardBase_unstable(\n {\n shouldRestrictTriggerAction,\n ...cardProps,\n },\n cardRef,\n );\n\n // Apply focusable-group attributes only when the card is not selectable, not\n // disabled and the focus mode is enabled.\n const shouldApplyFocusAttributes = !disabled && !state.selectable && focusMode !== 'off';\n if (shouldApplyFocusAttributes) {\n Object.assign(state.root, groupperAttrs, { tabIndex: 0 });\n }\n\n return {\n ...state,\n appearance,\n orientation,\n size,\n };\n};\n\n/**\n * Base hook for Card component, which manages state related to interactivity, selection,\n * ARIA attributes, and slot structure without design props or focus management.\n *\n * This hook is intentionally free of `@fluentui/react-tabster` so that it can be\n * consumed by headless component packages. Focus management (focusable group\n * attributes, focus-within, focus-restriction predicate) is layered on top in\n * `useCard_unstable`.\n *\n * @param props - props from this instance of Card\n * @param ref - reference to the root element of Card\n * @param options - optional behavior overrides such as a focus-aware restriction predicate\n */\nexport const useCardBase_unstable = (props: CardBaseProps, ref: React.Ref<HTMLDivElement>): CardBaseState => {\n const { disabled = false, ...restProps } = props;\n\n const [referenceId, setReferenceId] = React.useState(cardContextDefaultValue.selectableA11yProps.referenceId);\n const [referenceLabel, setReferenceLabel] = React.useState(cardContextDefaultValue.selectableA11yProps.referenceId);\n\n const { selectable, selected, selectableCardProps, selectFocused, checkboxSlot, floatingActionSlot } =\n useCardSelectable(props, { referenceId, referenceLabel });\n\n const interactive = computeInteractive(props);\n\n let cardRootProps = {\n ...restProps,\n ...selectableCardProps,\n };\n\n if (disabled) {\n cardRootProps = {\n ...restProps,\n 'aria-disabled': true,\n onClick: undefined,\n };\n }\n\n return {\n interactive,\n selectable,\n selectFocused,\n selected,\n disabled,\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,\n role: 'group',\n ...cardRootProps,\n }),\n { elementType: 'div' },\n ),\n\n floatingAction: floatingActionSlot,\n checkbox: checkboxSlot,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","slot","useFocusableGroup","useFocusFinders","useFocusWithin","useCardSelectable","cardContextDefaultValue","focusMap","off","undefined","interactiveEventProps","computeInteractive","props","disabled","some","prop","useCard_unstable","ref","appearance","orientation","size","cardProps","focusMode","focusModeProp","focusWithinRef","cardRef","findAllFocusable","shouldRestrictTriggerAction","useCallback","event","current","focusableElements","target","element","contains","interactive","groupperAttrs","tabBehavior","state","useCardBase_unstable","shouldApplyFocusAttributes","selectable","Object","assign","root","tabIndex","restProps","referenceId","setReferenceId","useState","selectableA11yProps","referenceLabel","setReferenceLabel","selected","selectableCardProps","selectFocused","checkboxSlot","floatingActionSlot","cardRootProps","onClick","components","floatingAction","checkbox","always","role","elementType"],"mappings":"AAAA;;;;;;;;;;;;IAwHayC,oBAAAA;;;oBApEAvB;eAAAA;;;;iEAlDU,QAAQ;gCAC+B,4BAA4B;8BACvB,0BAA0B;mCAG3D,yBAAsB;6BAChB,mBAAgB;AAExD,MAAM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;QAAM;QAGvBJ,gBAAgBJ;QAChBK,UAAUN;IACZ;AACF,EAAE"}
@@ -883,7 +883,6 @@ const useCardStyles = /*#__PURE__*/ (0, _react1.__styles)({
883
883
  ]
884
884
  });
885
885
  const useCardStyles_unstable = (state)=>{
886
- 'use no memo';
887
886
  const resetStyles = useCardResetStyles();
888
887
  const styles = useCardStyles();
889
888
  const orientationMap = {
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useCardStyles.styles.js"],"sourcesContent":["'use client';\nimport * 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.js\";\nimport { cardHeaderClassNames } from \"../CardHeader/useCardHeaderStyles.styles.js\";\nimport { cardFooterClassNames } from \"../CardFooter/useCardFooterStyles.styles.js\";\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 disabledStyles = {\n cursor: 'not-allowed',\n userSelect: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n boxShadow: tokens.shadow2,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n '::before': {\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n zIndex: `calc(${tokens.zIndexContent} + 1)`\n },\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled)\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 outlineDisabled: {\n backgroundColor: tokens.colorTransparentBackground,\n boxShadow: 'none',\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n '&:hover, &:active': {\n backgroundColor: tokens.colorTransparentBackground,\n boxShadow: 'none'\n },\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled)\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: tokens.zIndexContent\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 disabled: {\n ...disabledStyles,\n '&:hover, &:active': disabledStyles\n }\n});\n/**\n * Apply styling to the Card slots based on the state.\n */ export const useCardStyles_unstable = (state)=>{\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.disabled && (state.interactive || state.selectable);\n const focusedClassName = React.useMemo(()=>{\n if (state.disabled) {\n return '';\n }\n if (state.selectable) {\n if (state.selectFocused) {\n return styles.selectableFocused;\n }\n return '';\n }\n return styles.focused;\n }, [\n state.disabled,\n state.selectFocused,\n state.selectable,\n styles.focused,\n styles.selectableFocused\n ]);\n // eslint-disable-next-line react-hooks/immutability\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.disabled && styles.disabled, state.disabled && state.appearance === 'outline' && styles.outlineDisabled, state.root.className);\n if (state.floatingAction) {\n // eslint-disable-next-line react-hooks/immutability\n state.floatingAction.className = mergeClasses(cardClassNames.floatingAction, styles.select, state.floatingAction.className);\n }\n if (state.checkbox) {\n // eslint-disable-next-line react-hooks/immutability\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","disabledStyles","cursor","userSelect","color","colorNeutralForegroundDisabled","backgroundColor","colorNeutralBackgroundDisabled","boxShadow","shadow2","borderColor","colorNeutralStrokeDisabled","content","position","inset","zIndex","zIndexContent","useCardStyles","focused","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bqhya38","Bwxa6fj","Bdhvstf","B7zbvrb","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","h6p2u","I6qiy5","yzno9d","By0wis0","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","outlineDisabled","g2u3we","h3c5rm","B9xav0g","zhjwy3","ezxybo","wc7uws","subtle","subtleInteractive","subtleInteractiveSelected","highContrastSelected","B8gzw0y","By8wz76","B7iucu3","Boo9lyk","sga51p","qj1yg9","B8acmzm","Gezqo6","highContrastInteractive","waf3gn","B96h8j5","Bpd3jnq","uhbujs","select","qhf8xq","Bhzewxz","j35jbq","Bj3rh1h","hiddenCheckbox","B68tc82","Bmxbyg5","Bpg54ce","a9b677","Bqenvij","Bh84pgu","Bgl5zvf","Huce71","disabled","famaaq","sj55zd","Ftih45","Brfgrao","lawp4y","Fbdkly","mdwyqc","Bciustq","gc50h5","Ehzi8l","Bikrtoi","G8qf51","Brxh4y7","gp3uxg","Fohawp","Bxulg6k","vcjq4m","Bsqkqe9","fskg1g","iwiei9","Effecx","Bkt1b9m","jfmxvr","orauir","B2yd9ot","Fn9tzk","Bv0wker","Bp2dl5b","pzn0iz","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":"AAAA,YAAY;;;;;;;;;;;;IAkBKe,WAAW;;;IAPXJ,cAAc;;;IA8Ud0O,sBAAsB;;;;;iEAxVhB,OAAO;wBACwC,gBAAgB;4BAC/D,uBAAuB;AAQnC,uBAAuB;IAC9BzO,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,MAAMC,kBAAkB,GAAA,WAAA,OAAGnB,qBAAA,EAAA,WAAA,WAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;CA0B1B,CAAC;AACF,MAAMoB,cAAc,GAAG;IACnBC,MAAM,EAAE,aAAa;IACrBC,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAEtB,kBAAM,CAACuB,8BAA8B;IAC5CC,eAAe,EAAExB,kBAAM,CAACyB,8BAA8B;IACtDC,S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QAAQ,IAAIsC,KAAK,CAACqB,UAAU,KAAK,SAAS,IAAInB,MAAM,CAAC9E,eAAe,EAAE4E,KAAK,CAAC1O,IAAI,CAAC4P,SAAS,CAAC;IAClkB,IAAIlB,KAAK,CAACzO,cAAc,EAAE;QACtB,oDAAA;QACAyO,KAAK,CAACzO,cAAc,CAAC2P,SAAS,OAAGrQ,oBAAY,EAACQ,cAAc,CAACE,cAAc,EAAE2O,MAAM,CAACtD,MAAM,EAAEoD,KAAK,CAACzO,cAAc,CAAC2P,SAAS,CAAC;IAC/H;IACA,IAAIlB,KAAK,CAACxO,QAAQ,EAAE;QAChB,oDAAA;QACAwO,KAAK,CAACxO,QAAQ,CAAC0P,SAAS,OAAGrQ,oBAAY,EAACQ,cAAc,CAACG,QAAQ,EAAE0O,MAAM,CAACjD,cAAc,EAAE+C,KAAK,CAACxO,QAAQ,CAAC0P,SAAS,CAAC;IACrH;IACA,OAAOlB,KAAK;AAChB,CAAC"}
@@ -26,9 +26,9 @@ const _react1 = require("@griffel/react");
26
26
  const _reacttheme = require("@fluentui/react-theme");
27
27
  const _reacttext = require("@fluentui/react-text");
28
28
  const _reacttabster = require("@fluentui/react-tabster");
29
- const _useCardPreviewStylesstyles = require("../CardPreview/useCardPreviewStyles.styles");
30
- const _useCardHeaderStylesstyles = require("../CardHeader/useCardHeaderStyles.styles");
31
- const _useCardFooterStylesstyles = require("../CardFooter/useCardFooterStyles.styles");
29
+ const _useCardPreviewStylesstyles = require("../CardPreview/useCardPreviewStyles.styles.cjs");
30
+ const _useCardHeaderStylesstyles = require("../CardHeader/useCardHeaderStyles.styles.cjs");
31
+ const _useCardFooterStylesstyles = require("../CardFooter/useCardFooterStyles.styles.cjs");
32
32
  const cardClassNames = {
33
33
  root: 'fui-Card',
34
34
  floatingAction: 'fui-Card__floatingAction',
@@ -360,7 +360,6 @@ const useCardStyles = (0, _react1.makeStyles)({
360
360
  }
361
361
  });
362
362
  const useCardStyles_unstable = (state)=>{
363
- 'use no memo';
364
363
  const resetStyles = useCardResetStyles();
365
364
  const styles = useCardStyles();
366
365
  const orientationMap = {
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Card/useCardStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { GriffelStyle } from '@griffel/react';\nimport { shorthands, makeStyles, mergeClasses, makeResetStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { textClassNames } from '@fluentui/react-text';\nimport type { FocusOutlineStyleOptions } from '@fluentui/react-tabster';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\n\nimport { cardPreviewClassNames } from '../CardPreview/useCardPreviewStyles.styles';\nimport { cardHeaderClassNames } from '../CardHeader/useCardHeaderStyles.styles';\nimport { cardFooterClassNames } from '../CardFooter/useCardFooterStyles.styles';\nimport type { CardSlots, CardState } from './Card.types';\n\n/**\n * Static CSS class names used internally for the component slots.\n */\nexport const cardClassNames: SlotClassNames<CardSlots> = {\n root: 'fui-Card',\n floatingAction: 'fui-Card__floatingAction',\n checkbox: 'fui-Card__checkbox',\n};\n\n/**\n * CSS variable names used internally for uniform styling in Card.\n */\nexport const cardCSSVars = {\n cardSizeVar: '--fui-Card--size',\n cardBorderRadiusVar: '--fui-Card--border-radius',\n};\n\nconst focusOutlineStyle: Partial<FocusOutlineStyleOptions> = {\n outlineRadius: `var(${cardCSSVars.cardBorderRadiusVar})`,\n outlineWidth: tokens.strokeWidthThick,\n outlineOffset: '-2px', // FIXME: tokens.strokeWidthThick causes some weird bugs\n};\n\nconst useCardResetStyles = makeResetStyles({\n overflow: 'hidden',\n borderRadius: `var(${cardCSSVars.cardBorderRadiusVar})`,\n padding: `var(${cardCSSVars.cardSizeVar})`,\n gap: `var(${cardCSSVars.cardSizeVar})`,\n\n display: 'flex',\n position: 'relative',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n\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\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth(tokens.strokeWidthThin),\n borderRadius: `var(${cardCSSVars.cardBorderRadiusVar})`,\n },\n\n // Prevents CardHeader and CardFooter from shrinking.\n [`> .${cardHeaderClassNames.root}, > .${cardFooterClassNames.root}`]: {\n flexShrink: 0,\n },\n});\n\nconst disabledStyles: GriffelStyle = {\n cursor: 'not-allowed',\n userSelect: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n boxShadow: tokens.shadow2,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n\n '::before': {\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n zIndex: `calc(${tokens.zIndexContent} + 1)`,\n },\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n },\n};\n\nconst useCardStyles = makeStyles({\n focused: {\n ...createFocusOutlineStyle({\n style: focusOutlineStyle,\n selector: 'focus',\n }),\n },\n\n selectableFocused: createFocusOutlineStyle({\n style: focusOutlineStyle,\n selector: 'focus-within',\n }),\n\n orientationHorizontal: {\n flexDirection: 'row',\n alignItems: 'center',\n\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\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\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\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\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\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\n interactive: {\n [`& .${textClassNames.root}`]: {\n color: 'currentColor',\n },\n },\n\n filled: {\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: tokens.shadow4,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n },\n filledInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: tokens.shadow4,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\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\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected),\n },\n\n ':hover': {\n color: tokens.colorNeutralForeground1Selected,\n backgroundColor: tokens.colorNeutralBackground1Selected,\n },\n },\n\n filledAlternative: {\n backgroundColor: tokens.colorNeutralBackground2,\n boxShadow: tokens.shadow4,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n },\n filledAlternativeInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground2,\n boxShadow: tokens.shadow4,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\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\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected),\n },\n\n ':hover': {\n color: tokens.colorNeutralForeground2Selected,\n backgroundColor: tokens.colorNeutralBackground2Selected,\n },\n },\n\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n boxShadow: 'none',\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n },\n },\n outlineInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorTransparentBackground,\n boxShadow: 'none',\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n },\n\n ':hover': {\n color: tokens.colorNeutralForeground1Hover,\n backgroundColor: tokens.colorTransparentBackgroundHover,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n },\n },\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n },\n },\n },\n outlineInteractiveSelected: {\n backgroundColor: tokens.colorTransparentBackgroundSelected,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected),\n },\n\n ':hover': {\n color: tokens.colorNeutralForeground1Selected,\n backgroundColor: tokens.colorTransparentBackgroundSelected,\n },\n },\n outlineDisabled: {\n backgroundColor: tokens.colorTransparentBackground,\n boxShadow: 'none',\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n\n '&:hover, &:active': {\n backgroundColor: tokens.colorTransparentBackground,\n boxShadow: 'none',\n },\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n },\n },\n\n subtle: {\n backgroundColor: tokens.colorSubtleBackground,\n boxShadow: 'none',\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n },\n subtleInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorSubtleBackground,\n boxShadow: 'none',\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\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\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected),\n },\n\n ':hover': {\n color: tokens.colorNeutralForeground1Selected,\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n },\n },\n\n highContrastSelected: {\n '@media (forced-colors: active)': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n\n [`& .${cardPreviewClassNames.root}, & .${cardFooterClassNames.root}`]: {\n forcedColorAdjust: 'auto',\n },\n\n '::after': {\n ...shorthands.borderColor('Highlight'),\n },\n },\n },\n\n highContrastInteractive: {\n '@media (forced-colors: active)': {\n ':hover, :active': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n\n [`& .${cardPreviewClassNames.root}, & .${cardFooterClassNames.root}`]: {\n forcedColorAdjust: 'auto',\n },\n },\n\n '::after': {\n ...shorthands.borderColor('Highlight'),\n },\n },\n },\n\n select: {\n position: 'absolute',\n top: '4px',\n right: '4px',\n zIndex: tokens.zIndexContent,\n },\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 disabled: {\n ...disabledStyles,\n '&:hover, &:active': disabledStyles,\n },\n});\n\n/**\n * Apply styling to the Card slots based on the state.\n */\nexport const useCardStyles_unstable = (state: CardState): CardState => {\n const resetStyles = useCardResetStyles();\n const styles = useCardStyles();\n\n const orientationMap = {\n horizontal: styles.orientationHorizontal,\n vertical: styles.orientationVertical,\n };\n\n const sizeMap = {\n small: styles.sizeSmall,\n medium: styles.sizeMedium,\n large: styles.sizeLarge,\n };\n\n const appearanceMap = {\n filled: styles.filled,\n 'filled-alternative': styles.filledAlternative,\n outline: styles.outline,\n subtle: styles.subtle,\n };\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\n const isSelectableOrInteractive = !state.disabled && (state.interactive || state.selectable);\n\n const focusedClassName = React.useMemo(() => {\n if (state.disabled) {\n return '';\n }\n\n if (state.selectable) {\n if (state.selectFocused) {\n return styles.selectableFocused;\n }\n\n return '';\n }\n\n return styles.focused;\n }, [state.disabled, state.selectFocused, state.selectable, styles.focused, styles.selectableFocused]);\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n cardClassNames.root,\n resetStyles,\n orientationMap[state.orientation],\n sizeMap[state.size],\n appearanceMap[state.appearance],\n isSelectableOrInteractive && styles.interactive,\n isSelectableOrInteractive && interactiveMap[state.appearance],\n state.selected && selectedMap[state.appearance],\n focusedClassName,\n isSelectableOrInteractive && styles.highContrastInteractive,\n state.selected && styles.highContrastSelected,\n state.disabled && styles.disabled,\n state.disabled && state.appearance === 'outline' && styles.outlineDisabled,\n state.root.className,\n );\n\n if (state.floatingAction) {\n // eslint-disable-next-line react-hooks/immutability\n state.floatingAction.className = mergeClasses(\n cardClassNames.floatingAction,\n styles.select,\n state.floatingAction.className,\n );\n }\n\n if (state.checkbox) {\n // eslint-disable-next-line react-hooks/immutability\n state.checkbox.className = mergeClasses(cardClassNames.checkbox, styles.hiddenCheckbox, state.checkbox.className);\n }\n\n return state;\n};\n"],"names":["React","shorthands","makeStyles","mergeClasses","makeResetStyles","tokens","textClassNames","createFocusOutlineStyle","cardPreviewClassNames","cardHeaderClassNames","cardFooterClassNames","cardClassNames","root","floatingAction","checkbox","cardCSSVars","cardSizeVar","cardBorderRadiusVar","focusOutlineStyle","outlineRadius","outlineWidth","strokeWidthThick","outlineOffset","useCardResetStyles","overflow","borderRadius","padding","gap","display","position","boxSizing","color","colorNeutralForeground1","top","left","right","bottom","content","pointerEvents","borderStyle","borderWidth","strokeWidthThin","flexShrink","disabledStyles","cursor","userSelect","colorNeutralForegroundDisabled","backgroundColor","colorNeutralBackgroundDisabled","boxShadow","shadow2","borderColor","colorNeutralStrokeDisabled","inset","zIndex","zIndexContent","useCardStyles","focused","style","selector","selectableFocused","orientationHorizontal","flexDirection","alignItems","marginTop","marginBottom","marginLeft","marginRight","flexGrow","orientationVertical","sizeSmall","borderRadiusSmall","sizeMedium","borderRadiusMedium","sizeLarge","borderRadiusLarge","interactive","filled","colorNeutralBackground1","shadow4","colorTransparentStroke","filledInteractive","colorNeutralForeground1Hover","colorNeutralBackground1Hover","shadow8","colorNeutralBackground1Pressed","filledInteractiveSelected","colorNeutralBackground1Selected","colorNeutralStroke1Selected","colorNeutralForeground1Selected","filledAlternative","colorNeutralBackground2","filledAlternativeInteractive","colorNeutralForeground2Hover","colorNeutralBackground2Hover","colorNeutralBackground2Pressed","filledAlternativeInteractiveSelected","colorNeutralBackground2Selected","colorNeutralForeground2Selected","outline","colorTransparentBackground","colorNeutralStroke1","outlineInteractive","colorTransparentBackgroundHover","colorNeutralStroke1Hover","colorTransparentBackgroundPressed","colorNeutralStroke1Pressed","outlineInteractiveSelected","colorTransparentBackgroundSelected","outlineDisabled","subtle","colorSubtleBackground","subtleInteractive","colorSubtleBackgroundHover","colorSubtleBackgroundPressed","subtleInteractiveSelected","colorSubtleBackgroundSelected","highContrastSelected","forcedColorAdjust","highContrastInteractive","select","hiddenCheckbox","width","height","clip","clipPath","whiteSpace","disabled","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":"AAAA;;;;;;;;;;;;IA4Bae,WAAAA;;;IATAJ,cAAAA;;;IA0YAqH,sBAAAA;;;;;iEA3ZU,QAAQ;wBA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const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _useCardFooter = require("./useCardFooter");
15
- const _renderCardFooter = require("./renderCardFooter");
16
- const _useCardFooterStylesstyles = require("./useCardFooterStyles.styles");
14
+ const _useCardFooter = require("./useCardFooter.cjs");
15
+ const _renderCardFooter = require("./renderCardFooter.cjs");
16
+ const _useCardFooterStylesstyles = require("./useCardFooterStyles.styles.cjs");
17
17
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
18
18
  const CardFooter = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
19
19
  const state = (0, _useCardFooter.useCardFooter_unstable)(props, ref);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CardFooter/CardFooter.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useCardFooter_unstable } from './useCardFooter';\nimport { renderCardFooter_unstable } from './renderCardFooter';\nimport { useCardFooterStyles_unstable } from './useCardFooterStyles.styles';\nimport type { CardFooterProps } from './CardFooter.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Component to render Button actions in a Card component.\n */\nexport const CardFooter: ForwardRefComponent<CardFooterProps> = React.forwardRef((props, ref) => {\n const state = useCardFooter_unstable(props, ref);\n\n useCardFooterStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCardFooterStyles_unstable')(state);\n\n return renderCardFooter_unstable(state);\n});\n\nCardFooter.displayName = 'CardFooter';\n"],"names":["React","useCardFooter_unstable","renderCardFooter_unstable","useCardFooterStyles_unstable","useCustomStyleHook_unstable","CardFooter","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;+BACQ,kBAAkB;kCACf,qBAAqB;2CAClB,+BAA+B;qCAGhC,kCAAkC;AAKvE,MAAMK,aAAAA,WAAAA,GAAmDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,YAAQR,qCAAAA,EAAuBM,OAAOC;QAE5CL,uDAAAA,EAA6BM;QAE7BL,gDAAAA,EAA4B,gCAAgCK;IAE5D,WAAOP,2CAAAA,EAA0BO;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/CardFooter/CardFooter.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useCardFooter_unstable } from './useCardFooter';\nimport { renderCardFooter_unstable } from './renderCardFooter';\nimport { useCardFooterStyles_unstable } from './useCardFooterStyles.styles';\nimport type { CardFooterProps } from './CardFooter.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Component to render Button actions in a Card component.\n */\nexport const CardFooter: ForwardRefComponent<CardFooterProps> = React.forwardRef((props, ref) => {\n const state = useCardFooter_unstable(props, ref);\n\n useCardFooterStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCardFooterStyles_unstable')(state);\n\n return renderCardFooter_unstable(state);\n});\n\nCardFooter.displayName = 'CardFooter';\n"],"names":["React","useCardFooter_unstable","renderCardFooter_unstable","useCardFooterStyles_unstable","useCustomStyleHook_unstable","CardFooter","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;+BACQ,qBAAkB;kCACf,wBAAqB;2CAClB,kCAA+B;qCAGhC,kCAAkC;AAKvE,MAAMK,aAAAA,WAAAA,GAAmDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,YAAQR,qCAAAA,EAAuBM,OAAOC;QAE5CL,uDAAAA,EAA6BM;QAE7BL,gDAAAA,EAA4B,gCAAgCK;IAE5D,WAAOP,2CAAAA,EAA0BO;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
@@ -28,7 +28,7 @@ _export(exports, {
28
28
  return _useCardFooter.useCardFooter_unstable;
29
29
  }
30
30
  });
31
- const _CardFooter = require("./CardFooter");
32
- const _renderCardFooter = require("./renderCardFooter");
33
- const _useCardFooter = require("./useCardFooter");
34
- const _useCardFooterStylesstyles = require("./useCardFooterStyles.styles");
31
+ const _CardFooter = require("./CardFooter.cjs");
32
+ const _renderCardFooter = require("./renderCardFooter.cjs");
33
+ const _useCardFooter = require("./useCardFooter.cjs");
34
+ const _useCardFooterStylesstyles = require("./useCardFooterStyles.styles.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CardFooter/index.ts"],"sourcesContent":["export { CardFooter } from './CardFooter';\nexport type {\n CardFooterBaseProps,\n CardFooterBaseState,\n CardFooterProps,\n CardFooterSlots,\n CardFooterState,\n} from './CardFooter.types';\nexport { renderCardFooter_unstable } from './renderCardFooter';\nexport { useCardFooter_unstable, useCardFooterBase_unstable } from './useCardFooter';\nexport { cardFooterClassNames, useCardFooterStyles_unstable } from './useCardFooterStyles.styles';\n"],"names":["CardFooter","renderCardFooter_unstable","useCardFooter_unstable","useCardFooterBase_unstable","cardFooterClassNames","useCardFooterStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,sBAAU;;;eAUVI,+CAAoB;;;eAFpBH,2CAAyB;;;eACDE,yCAA0B;;;eAC5BE,uDAA4B;;;eADlDH,qCAAsB;;;4BATJ,eAAe;kCAQA,qBAAqB;+BACI,kBAAkB;2CAClB,+BAA+B"}
1
+ {"version":3,"sources":["../src/components/CardFooter/index.ts"],"sourcesContent":["export { CardFooter } from './CardFooter';\nexport type {\n CardFooterBaseProps,\n CardFooterBaseState,\n CardFooterProps,\n CardFooterSlots,\n CardFooterState,\n} from './CardFooter.types';\nexport { renderCardFooter_unstable } from './renderCardFooter';\nexport { useCardFooter_unstable, useCardFooterBase_unstable } from './useCardFooter';\nexport { cardFooterClassNames, useCardFooterStyles_unstable } from './useCardFooterStyles.styles';\n"],"names":["CardFooter","renderCardFooter_unstable","useCardFooter_unstable","useCardFooterBase_unstable","cardFooterClassNames","useCardFooterStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,sBAAU;;;eAUVI,+CAAoB;;;eAFpBH,2CAAyB;;;eACDE,yCAA0B;;;eAC5BE,uDAA4B;;;eADlDH,qCAAsB;;;4BATJ,kBAAe;kCAQA,wBAAqB;+BACI,qBAAkB;2CAClB,kCAA+B"}
@@ -95,7 +95,6 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
95
95
  ]
96
96
  });
97
97
  const useCardFooterStyles_unstable = (state)=>{
98
- 'use no memo';
99
98
  const styles = useStyles();
100
99
  // eslint-disable-next-line react-hooks/immutability
101
100
  state.root.className = (0, _react.mergeClasses)(cardFooterClassNames.root, styles.root, state.root.className);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useCardFooterStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses, shorthands } from \"@griffel/react\";\n/**\n * Static CSS class names used internally for the component slots.\n */ export const cardFooterClassNames = {\n root: 'fui-CardFooter',\n action: 'fui-CardFooter__action'\n};\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n gap: '12px'\n },\n action: {\n marginLeft: 'auto',\n // when the card is selected or hovered, it has custom high contrast color and background styles\n // setting this ensures action buttons adopt those colors and are still visible in forced-colors mode\n '@media (forced-colors: active)': {\n '& .fui-Button, & .fui-Link': {\n ...shorthands.borderColor('currentColor'),\n color: 'currentColor',\n outlineColor: 'currentColor'\n }\n }\n }\n});\n/**\n * Apply styling to the CardFooter slots based on the state.\n */ export const useCardFooterStyles_unstable = (state)=>{\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(cardFooterClassNames.root, styles.root, state.root.className);\n if (state.action) {\n // eslint-disable-next-line react-hooks/immutability\n state.action.className = mergeClasses(cardFooterClassNames.action, styles.action, state.action.className);\n }\n return state;\n};\n"],"names":["__styles","mergeClasses","shorthands","cardFooterClassNames","root","action","useStyles","mc9l5x","Beiy3e4","i8kkvl","Belr9w4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C,IAAI,EAAEoB,MAAM,CAACpB,IAAI,EAAEmB,KAAK,CAACnB,IAAI,CAACqB,SAAS,CAAC;IACjG,IAAIF,KAAK,CAAClB,MAAM,EAAE;QACd,oDAAA;QACAkB,KAAK,CAAClB,MAAM,CAACoB,SAAS,OAAGxB,mBAAY,EAACE,oBAAoB,CAACE,MAAM,EAAEmB,MAAM,CAACnB,MAAM,EAAEkB,KAAK,CAAClB,MAAM,CAACoB,SAAS,CAAC;IAC7G;IACA,OAAOF,KAAK;AAChB,CAAC"}
@@ -42,7 +42,6 @@ const useStyles = (0, _react.makeStyles)({
42
42
  }
43
43
  });
44
44
  const useCardFooterStyles_unstable = (state)=>{
45
- 'use no memo';
46
45
  const styles = useStyles();
47
46
  // eslint-disable-next-line react-hooks/immutability
48
47
  state.root.className = (0, _react.mergeClasses)(cardFooterClassNames.root, styles.root, state.root.className);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/CardFooter/useCardFooterStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { CardFooterSlots, CardFooterState } from './CardFooter.types';\n\n/**\n * Static CSS class names used internally for the component slots.\n */\nexport const cardFooterClassNames: SlotClassNames<CardFooterSlots> = {\n root: 'fui-CardFooter',\n action: 'fui-CardFooter__action',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n gap: '12px',\n },\n action: {\n marginLeft: 'auto',\n\n // when the card is selected or hovered, it has custom high contrast color and background styles\n // setting this ensures action buttons adopt those colors and are still visible in forced-colors mode\n '@media (forced-colors: active)': {\n '& .fui-Button, & .fui-Link': {\n ...shorthands.borderColor('currentColor'),\n color: 'currentColor',\n outlineColor: 'currentColor',\n },\n },\n },\n});\n\n/**\n * Apply styling to the CardFooter slots based on the state.\n */\nexport const useCardFooterStyles_unstable = (state: CardFooterState): CardFooterState => {\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(cardFooterClassNames.root, styles.root, state.root.className);\n\n if (state.action) {\n // eslint-disable-next-line react-hooks/immutability\n state.action.className = mergeClasses(cardFooterClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","cardFooterClassNames","root","action","useStyles","display","flexDirection","gap","marginLeft","borderColor","color","outlineColor","useCardFooterStyles_unstable","state","styles","className"],"mappings":"AAAA;;;;;;;;;;;;IASaG,oBAAAA;;;gCA6BAW;eAAAA;;;uBAnCwC,iBAAiB;AAM/D,6BAA8D;IACnEV,MAAM;IACNC,QAAQ;AACV,EAAE;AAEF,MAAMC,gBAAYN,iBAAAA,EAAW;IAC3BI,MAAM;QACJG,SAAS;QACTC,eAAe;QACfC,KAAK;IACP;IACAJ,QAAQ;QACNK,YAAY;QAEZ,gGAAgG;QAChG,qGAAqG;QACrG,kCAAkC;YAChC,8BAA8B;gBAC5B,GAAGR,iBAAAA,CAAWS,WAAW,CAAC,eAAe;gBACzCC,OAAO;gBACPC,cAAc;YAChB;QACF;IACF;AACF;AAKO,qCAAqC,CAACE;IAC3C,MAAMC,SAASV;IACf,oDAAoD;IACpDS,MAAMX,IAAI,CAACa,SAAS,OAAGhB,mBAAAA,EAAaE,qBAAqBC,IAAI,EAAEY,OAAOZ,IAAI,EAAEW,MAAMX,IAAI,CAACa,SAAS;IAEhG,IAAIF,MAAMV,MAAM,EAAE;QAChB,oDAAoD;QACpDU,MAAMV,MAAM,CAACY,SAAS,OAAGhB,mBAAAA,EAAaE,qBAAqBE,MAAM,EAAEW,OAAOX,MAAM,EAAEU,MAAMV,MAAM,CAACY,SAAS;IAC1G;IAEA,OAAOF;AACT,EAAE"}
@@ -11,9 +11,9 @@ Object.defineProperty(exports, "CardHeader", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _useCardHeader = require("./useCardHeader");
15
- const _renderCardHeader = require("./renderCardHeader");
16
- const _useCardHeaderStylesstyles = require("./useCardHeaderStyles.styles");
14
+ const _useCardHeader = require("./useCardHeader.cjs");
15
+ const _renderCardHeader = require("./renderCardHeader.cjs");
16
+ const _useCardHeaderStylesstyles = require("./useCardHeaderStyles.styles.cjs");
17
17
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
18
18
  const CardHeader = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
19
19
  const state = (0, _useCardHeader.useCardHeader_unstable)(props, ref);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CardHeader/CardHeader.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useCardHeader_unstable } from './useCardHeader';\nimport { renderCardHeader_unstable } from './renderCardHeader';\nimport { useCardHeaderStyles_unstable } from './useCardHeaderStyles.styles';\nimport type { CardHeaderProps } from './CardHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Component to render an image, text and an action in a Card component.\n */\nexport const CardHeader: ForwardRefComponent<CardHeaderProps> = React.forwardRef((props, ref) => {\n const state = useCardHeader_unstable(props, ref);\n\n useCardHeaderStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCardHeaderStyles_unstable')(state);\n\n return renderCardHeader_unstable(state);\n});\n\nCardHeader.displayName = 'CardHeader';\n"],"names":["React","useCardHeader_unstable","renderCardHeader_unstable","useCardHeaderStyles_unstable","useCustomStyleHook_unstable","CardHeader","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;+BACQ,kBAAkB;kCACf,qBAAqB;2CAClB,+BAA+B;qCAGhC,kCAAkC;AAKvE,MAAMK,aAAAA,WAAAA,GAAmDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,YAAQR,qCAAAA,EAAuBM,OAAOC;QAE5CL,uDAAAA,EAA6BM;QAE7BL,gDAAAA,EAA4B,gCAAgCK;IAE5D,WAAOP,2CAAAA,EAA0BO;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/CardHeader/CardHeader.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useCardHeader_unstable } from './useCardHeader';\nimport { renderCardHeader_unstable } from './renderCardHeader';\nimport { useCardHeaderStyles_unstable } from './useCardHeaderStyles.styles';\nimport type { CardHeaderProps } from './CardHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Component to render an image, text and an action in a Card component.\n */\nexport const CardHeader: ForwardRefComponent<CardHeaderProps> = React.forwardRef((props, ref) => {\n const state = useCardHeader_unstable(props, ref);\n\n useCardHeaderStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCardHeaderStyles_unstable')(state);\n\n return renderCardHeader_unstable(state);\n});\n\nCardHeader.displayName = 'CardHeader';\n"],"names":["React","useCardHeader_unstable","renderCardHeader_unstable","useCardHeaderStyles_unstable","useCustomStyleHook_unstable","CardHeader","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;+BACQ,qBAAkB;kCACf,wBAAqB;2CAClB,kCAA+B;qCAGhC,kCAAkC;AAKvE,MAAMK,aAAAA,WAAAA,GAAmDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,YAAQR,qCAAAA,EAAuBM,OAAOC;QAE5CL,uDAAAA,EAA6BM;QAE7BL,gDAAAA,EAA4B,gCAAgCK;IAE5D,WAAOP,2CAAAA,EAA0BO;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
@@ -31,7 +31,7 @@ _export(exports, {
31
31
  return _useCardHeader.useCardHeader_unstable;
32
32
  }
33
33
  });
34
- const _CardHeader = require("./CardHeader");
35
- const _renderCardHeader = require("./renderCardHeader");
36
- const _useCardHeader = require("./useCardHeader");
37
- const _useCardHeaderStylesstyles = require("./useCardHeaderStyles.styles");
34
+ const _CardHeader = require("./CardHeader.cjs");
35
+ const _renderCardHeader = require("./renderCardHeader.cjs");
36
+ const _useCardHeader = require("./useCardHeader.cjs");
37
+ const _useCardHeaderStylesstyles = require("./useCardHeaderStyles.styles.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CardHeader/index.ts"],"sourcesContent":["export { CardHeader } from './CardHeader';\nexport type {\n CardHeaderBaseProps,\n CardHeaderBaseState,\n CardHeaderProps,\n CardHeaderSlots,\n CardHeaderState,\n} from './CardHeader.types';\nexport { renderCardHeader_unstable } from './renderCardHeader';\nexport { useCardHeader_unstable, useCardHeaderBase_unstable } from './useCardHeader';\nexport { cardHeaderCSSVars, cardHeaderClassNames, useCardHeaderStyles_unstable } from './useCardHeaderStyles.styles';\n"],"names":["CardHeader","renderCardHeader_unstable","useCardHeader_unstable","useCardHeaderBase_unstable","cardHeaderCSSVars","cardHeaderClassNames","useCardHeaderStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,sBAAU;;;eAUVI,4CAAiB;;;eAAEC,+CAAoB;;;eAFvCJ,2CAAyB;;;eACDE,yCAA0B;;;eACTG,uDAA4B;;;eADrEJ,qCAAsB;;;4BATJ,eAAe;kCAQA,qBAAqB;+BACI,kBAAkB;2CACC,+BAA+B"}
1
+ {"version":3,"sources":["../src/components/CardHeader/index.ts"],"sourcesContent":["export { CardHeader } from './CardHeader';\nexport type {\n CardHeaderBaseProps,\n CardHeaderBaseState,\n CardHeaderProps,\n CardHeaderSlots,\n CardHeaderState,\n} from './CardHeader.types';\nexport { renderCardHeader_unstable } from './renderCardHeader';\nexport { useCardHeader_unstable, useCardHeaderBase_unstable } from './useCardHeader';\nexport { cardHeaderCSSVars, cardHeaderClassNames, useCardHeaderStyles_unstable } from './useCardHeaderStyles.styles';\n"],"names":["CardHeader","renderCardHeader_unstable","useCardHeader_unstable","useCardHeaderBase_unstable","cardHeaderCSSVars","cardHeaderClassNames","useCardHeaderStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,sBAAU;;;eAUVI,4CAAiB;;;eAAEC,+CAAoB;;;eAFvCJ,2CAAyB;;;eACDE,yCAA0B;;;eACTG,uDAA4B;;;eADrEJ,qCAAsB;;;4BATJ,kBAAe;kCAQA,wBAAqB;+BACI,qBAAkB;2CACC,kCAA+B"}
@@ -20,7 +20,7 @@ _export(exports, {
20
20
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
21
21
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
22
22
  const _reactutilities = require("@fluentui/react-utilities");
23
- const _CardContext = require("../Card/CardContext");
23
+ const _CardContext = require("../Card/CardContext.cjs");
24
24
  /**
25
25
  * Finds the first child of CardHeader with an id prop.
26
26
  *
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CardHeader/useCardHeader.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';\nimport type { CardHeaderBaseProps, CardHeaderBaseState, CardHeaderProps, CardHeaderState } from './CardHeader.types';\nimport { useCardContext_unstable } from '../Card/CardContext';\n\n/**\n * Finds the first child of CardHeader with an id prop.\n *\n * @param header - the header prop of CardHeader\n */\nfunction getChildWithId(header: React.ReactNode) {\n function isReactElementWithIdProp(element: React.ReactNode): element is React.ReactElement<{ id: string }> {\n return React.isValidElement<{ id?: string }>(element) && Boolean(element.props.id);\n }\n\n return React.Children.toArray(header).find(isReactElementWithIdProp);\n}\n\n/**\n * Returns the id to use for the CardHeader root element.\n *\n * @param headerId - the id prop of the CardHeader component\n * @param childWithId - the first child of the CardHeader component with an id prop\n * @param generatedId - a generated id\n *\n * @returns the id to use for the CardHeader root element\n */\nfunction getReferenceId(\n headerId: string | undefined,\n childWithId: React.ReactElement<{ id?: string }> | undefined,\n generatedId: string,\n): string {\n if (headerId) {\n return headerId;\n }\n\n if (childWithId?.props.id) {\n return childWithId.props.id;\n }\n\n return generatedId;\n}\n\n/**\n * Create the state required to render CardHeader.\n *\n * The returned state can be modified with hooks such as useCardHeaderStyles_unstable,\n * before being passed to renderCardHeader_unstable.\n *\n * @param props - props from this instance of CardHeader\n * @param ref - reference to root HTMLElement of CardHeader\n */\nexport const useCardHeader_unstable = (props: CardHeaderProps, ref: React.Ref<HTMLElement>): CardHeaderState => {\n return useCardHeaderBase_unstable(props, ref);\n};\n\n/**\n * Base hook for CardHeader component, which manages state related to slots structure\n * and the card's selectable accessibility properties.\n * Note: CardHeader has no design props, so this is equivalent to useCardHeader_unstable.\n *\n * @param props - props from this instance of CardHeader\n * @param ref - reference to root HTMLElement of CardHeader\n */\nexport const useCardHeaderBase_unstable = (\n props: CardHeaderBaseProps,\n ref: React.Ref<HTMLElement>,\n): CardHeaderBaseState => {\n const { image, header, description, action } = props;\n\n const {\n selectableA11yProps: { referenceId, setReferenceId },\n } = useCardContext_unstable();\n const headerRef = React.useRef<HTMLDivElement>(null);\n\n const hasChildId = React.useRef(false);\n const generatedId = useId('fui-CardHeader__header', referenceId);\n\n // eslint-disable-next-line react-hooks/refs\n const headerSlot = slot.optional(header, {\n renderByDefault: true,\n defaultProps: {\n ref: headerRef,\n // eslint-disable-next-line react-hooks/refs\n id: !hasChildId.current ? referenceId : undefined,\n },\n elementType: 'div',\n });\n React.useEffect(() => {\n const headerId = !hasChildId.current ? headerRef.current?.id : undefined;\n const childWithId = getChildWithId(headerSlot?.children);\n hasChildId.current = Boolean(childWithId);\n setReferenceId(getReferenceId(headerId, childWithId, generatedId));\n }, [generatedId, header, headerSlot, setReferenceId]);\n return {\n components: { root: 'div', image: 'div', header: 'div', description: 'div', action: 'div' },\n\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n image: slot.optional(image, { elementType: 'div' }),\n header: headerSlot,\n description: slot.optional(description, { elementType: 'div' }),\n action: slot.optional(action, { elementType: 'div' }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","useId","slot","useCardContext_unstable","getChildWithId","header","isReactElementWithIdProp","element","isValidElement","Boolean","props","id","Children","toArray","find","getReferenceId","headerId","childWithId","generatedId","useCardHeader_unstable","ref","useCardHeaderBase_unstable","image","description","action","selectableA11yProps","referenceId","setReferenceId","headerRef","useRef","hasChildId","headerSlot","optional","renderByDefault","defaultProps","current","undefined","elementType","useEffect","children","components","root","always"],"mappings":"AAAA;;;;;;;;;;;;8BAkEasB;eAAAA;;IAZAF,sBAAAA;;;;;iEApDU,QAAQ;gCACuB,4BAA4B;6BAE1C,sBAAsB;AAE9D;;;;CAIC,GACD,SAASf,eAAeC,MAAuB;IAC7C,SAASC,yBAAyBC,OAAwB;QACxD,qBAAOR,OAAMS,cAAc,CAAkBD,YAAYE,QAAQF,QAAQG,KAAK,CAACC,EAAE;IACnF;IAEA,OAAOZ,OAAMa,QAAQ,CAACC,OAAO,CAACR,QAAQS,IAAI,CAACR;AAC7C;AAEA;;;;;;;;CAQC,GACD,SAASS,eACPC,QAA4B,EAC5BC,WAA4D,EAC5DC,WAAmB;IAEnB,IAAIF,UAAU;QACZ,OAAOA;IACT;IAEA,IAAIC,gBAAAA,QAAAA,gBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,YAAaP,KAAK,CAACC,EAAE,EAAE;QACzB,OAAOM,YAAYP,KAAK,CAACC,EAAE;IAC7B;IAEA,OAAOO;AACT;AAWO,+BAA+B,CAACR,OAAwBU;IAC7D,OAAOC,2BAA2BX,OAAOU;AAC3C,EAAE;AAUK,mCAAmC,CACxCV,OACAU;IAEA,MAAM,EAAEE,KAAK,EAAEjB,MAAM,EAAEkB,WAAW,EAAEC,MAAM,EAAE,GAAGd;IAE/C,MAAM,EACJe,qBAAqB,EAAEC,WAA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,aAAa;QAAM;QAC7Db,QAAQtB,oBAAAA,CAAK8B,QAAQ,CAACR,QAAQ;YAAEa,aAAa;QAAM;IACrD;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/CardHeader/useCardHeader.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';\nimport type { CardHeaderBaseProps, CardHeaderBaseState, CardHeaderProps, CardHeaderState } from './CardHeader.types';\nimport { useCardContext_unstable } from '../Card/CardContext';\n\n/**\n * Finds the first child of CardHeader with an id prop.\n *\n * @param header - the header prop of CardHeader\n */\nfunction getChildWithId(header: React.ReactNode) {\n function isReactElementWithIdProp(element: React.ReactNode): element is React.ReactElement<{ id: string }> {\n return React.isValidElement<{ id?: string }>(element) && Boolean(element.props.id);\n }\n\n return React.Children.toArray(header).find(isReactElementWithIdProp);\n}\n\n/**\n * Returns the id to use for the CardHeader root element.\n *\n * @param headerId - the id prop of the CardHeader component\n * @param childWithId - the first child of the CardHeader component with an id prop\n * @param generatedId - a generated id\n *\n * @returns the id to use for the CardHeader root element\n */\nfunction getReferenceId(\n headerId: string | undefined,\n childWithId: React.ReactElement<{ id?: string }> | undefined,\n generatedId: string,\n): string {\n if (headerId) {\n return headerId;\n }\n\n if (childWithId?.props.id) {\n return childWithId.props.id;\n }\n\n return generatedId;\n}\n\n/**\n * Create the state required to render CardHeader.\n *\n * The returned state can be modified with hooks such as useCardHeaderStyles_unstable,\n * before being passed to renderCardHeader_unstable.\n *\n * @param props - props from this instance of CardHeader\n * @param ref - reference to root HTMLElement of CardHeader\n */\nexport const useCardHeader_unstable = (props: CardHeaderProps, ref: React.Ref<HTMLElement>): CardHeaderState => {\n return useCardHeaderBase_unstable(props, ref);\n};\n\n/**\n * Base hook for CardHeader component, which manages state related to slots structure\n * and the card's selectable accessibility properties.\n * Note: CardHeader has no design props, so this is equivalent to useCardHeader_unstable.\n *\n * @param props - props from this instance of CardHeader\n * @param ref - reference to root HTMLElement of CardHeader\n */\nexport const useCardHeaderBase_unstable = (\n props: CardHeaderBaseProps,\n ref: React.Ref<HTMLElement>,\n): CardHeaderBaseState => {\n const { image, header, description, action } = props;\n\n const {\n selectableA11yProps: { referenceId, setReferenceId },\n } = useCardContext_unstable();\n const headerRef = React.useRef<HTMLDivElement>(null);\n\n const hasChildId = React.useRef(false);\n const generatedId = useId('fui-CardHeader__header', referenceId);\n\n // eslint-disable-next-line react-hooks/refs\n const headerSlot = slot.optional(header, {\n renderByDefault: true,\n defaultProps: {\n ref: headerRef,\n // eslint-disable-next-line react-hooks/refs\n id: !hasChildId.current ? referenceId : undefined,\n },\n elementType: 'div',\n });\n React.useEffect(() => {\n const headerId = !hasChildId.current ? headerRef.current?.id : undefined;\n const childWithId = getChildWithId(headerSlot?.children);\n hasChildId.current = Boolean(childWithId);\n setReferenceId(getReferenceId(headerId, childWithId, generatedId));\n }, [generatedId, header, headerSlot, setReferenceId]);\n return {\n components: { root: 'div', image: 'div', header: 'div', description: 'div', action: 'div' },\n\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n image: slot.optional(image, { elementType: 'div' }),\n header: headerSlot,\n description: slot.optional(description, { elementType: 'div' }),\n action: slot.optional(action, { elementType: 'div' }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","useId","slot","useCardContext_unstable","getChildWithId","header","isReactElementWithIdProp","element","isValidElement","Boolean","props","id","Children","toArray","find","getReferenceId","headerId","childWithId","generatedId","useCardHeader_unstable","ref","useCardHeaderBase_unstable","image","description","action","selectableA11yProps","referenceId","setReferenceId","headerRef","useRef","hasChildId","headerSlot","optional","renderByDefault","defaultProps","current","undefined","elementType","useEffect","children","components","root","always"],"mappings":"AAAA;;;;;;;;;;;;8BAkEasB;eAAAA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,WAAW,CAACc,WAAWK,OAAO,GAAA,CAAGP,qBAAAA,UAAUO,OAAAA,AAAO,MAAA,QAAjBP,uBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,mBAAmBjB,EAAE,GAAGyB;QAC/D,MAAMnB,cAAcb,eAAe2B,eAAAA,QAAAA,eAAAA,KAAAA,IAAAA,KAAAA,IAAAA,WAAYQ,QAAQ;QACvDT,WAAWK,OAAO,GAAG1B,QAAQQ;QAC7BU,eAAeZ,eAAeC,UAAUC,aAAaC;IACvD,GAAG;QAACA;QAAab;QAAQ0B;QAAYJ;KAAe;IACpD,OAAO;QACLa,YAAY;YAAEC,MAAM;YAAOnB,OAAO;YAAOjB,QAAQ;YAAOkB,aAAa;YAAOC,QAAQ;QAAM;QAE1FiB,MAAMvC,oBAAAA,CAAKwC,MAAM,KACf1C,wCAAAA,EAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FoB,KAAKA;YACL,GAAGV,KAAK;QACV,IACA;YAAE2B,aAAa;QAAM;QAEvBf,OAAOpB,oBAAAA,CAAK8B,QAAQ,CAACV,OAAO;YAAEe,aAAa;QAAM;QACjDhC,QAAQ0B;QACRR,aAAarB,oBAAAA,CAAK8B,QAAQ,CAACT,aAAa;YAAEc,aAAa;QAAM;QAC7Db,QAAQtB,oBAAAA,CAAK8B,QAAQ,CAACR,QAAQ;YAAEa,aAAa;QAAM;IACrD;AACF,EAAE"}
@@ -159,7 +159,6 @@ const useStylesFlex = /*#__PURE__*/ (0, _react.__styles)({
159
159
  ]
160
160
  });
161
161
  const useCardHeaderStyles_unstable = (state)=>{
162
- 'use no memo';
163
162
  const styles = useStyles();
164
163
  const stylesGrid = useStylesGrid();
165
164
  const stylesFlex = useStylesFlex();
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useCardHeaderStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses, shorthands } from \"@griffel/react\";\n/**\n * Static CSS class names used internally for the component slots.\n */ export const cardHeaderClassNames = {\n root: 'fui-CardHeader',\n image: 'fui-CardHeader__image',\n header: 'fui-CardHeader__header',\n description: 'fui-CardHeader__description',\n action: 'fui-CardHeader__action'\n};\n/**\n * CSS variable names used internally for uniform styling in CardHeader.\n */ export const cardHeaderCSSVars = {\n cardHeaderGapVar: '--fui-CardHeader--gap'\n};\nconst useStyles = makeStyles({\n root: {\n [cardHeaderCSSVars.cardHeaderGapVar]: '12px',\n alignItems: 'center'\n },\n image: {\n display: 'inline-flex',\n marginRight: `var(${cardHeaderCSSVars.cardHeaderGapVar})`\n },\n header: {\n display: 'flex'\n },\n description: {\n display: 'flex'\n },\n action: {\n marginLeft: `var(${cardHeaderCSSVars.cardHeaderGapVar})`,\n // when the card is selected or hovered, it has custom high contrast color and background styles\n // setting this ensures action buttons adopt those colors and are still visible in forced-colors mode\n '@media (forced-colors: active)': {\n '& .fui-Button, & .fui-Link': {\n ...shorthands.borderColor('currentColor'),\n color: 'currentColor',\n outlineColor: 'currentColor'\n }\n }\n }\n});\nconst useStylesGrid = makeStyles({\n root: {\n display: 'grid',\n gridAutoColumns: 'min-content 1fr min-content'\n },\n image: {\n gridColumnStart: '1',\n gridRowStart: 'span 2'\n },\n header: {\n gridColumnStart: '2',\n gridRowStart: '1'\n },\n description: {\n gridColumnStart: '2',\n gridRowStart: '2'\n },\n action: {\n gridColumnStart: '3',\n gridRowStart: 'span 2'\n }\n});\nconst useStylesFlex = makeStyles({\n root: {\n display: 'flex'\n },\n header: {\n flexGrow: 1\n },\n image: {},\n description: {},\n action: {}\n});\n/**\n * Apply styling to the CardHeader slots based on the state.\n */ export const useCardHeaderStyles_unstable = (state)=>{\n const styles = useStyles();\n const stylesGrid = useStylesGrid();\n const stylesFlex = useStylesFlex();\n const boxModelStyles = state.description ? stylesGrid : stylesFlex;\n const getSlotStyles = (slotName)=>{\n var _state_slotName;\n return mergeClasses(cardHeaderClassNames[slotName], styles[slotName], boxModelStyles[slotName], (_state_slotName = state[slotName]) === null || _state_slotName === void 0 ? void 0 : _state_slotName.className);\n };\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = getSlotStyles('root');\n if (state.image) {\n // eslint-disable-next-line react-hooks/immutability\n state.image.className = getSlotStyles('image');\n }\n if (state.header) {\n // eslint-disable-next-line react-hooks/immutability\n state.header.className = getSlotStyles('header');\n }\n if (state.description) {\n // eslint-disable-next-line react-hooks/immutability\n state.description.className = getSlotStyles('description');\n }\n if (state.action) {\n // eslint-disable-next-line react-hooks/immutability\n state.action.className = getSlotStyles('action');\n }\n return state;\n};\n"],"names":["__styles","mergeClasses","shorthands","cardHeaderClassNames","root","image","header","description","action","cardHeaderCSSVars","cardHeaderGapVar","useStyles","Bkc6ea2","Bt984gj","mc9l5x","t21cq0","Frg6f3","rjrqlh","Boue1pl","Bhz1vi0","etxrgc","Bdua9ef","cbfxhg","d","m","useStylesGrid","t4k1zu","Br312pm","Ijaq50","useStylesFlex","Bh6795r","useCardHeaderStyles_unstable","state","styles","stylesGrid","stylesFlex","boxModelStyles","getSlotStyles","slotName","_state_slotName","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAaKS,iBAAiB;;;wBATG;;;gCA2EQ;eAA5BsB;;;uBA9EoC,gBAAgB;AAG1D,MAAM5B,uBAAuB;IACpCC,IAAI,EAAE,gBAAgB;IACtBC,KAAK,EAAE,uBAAuB;IAC9BC,MAAM,EAAE,wBAAwB;IAChCC,WAAW,EAAE,6BAA6B;IAC1CC,MAAM,EAAE;AACZ,CAAC;AAGU,0BAA0B;IACjCE,gBAAgB,EAAE;AACtB,CAAC;AACD,MAAMC,SAAS,GAAA,WAAA,OAAGX,eAAA,EAAA;IAAAI,IAAA,EAAA;QAAAQ,OAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAR,KAAA,EAAA;QAAAS,MAAA,EAAA;QAAAC,MAAA,EAAA;YAAA;YAAA;SAAA;IAAA;IAAAT,MAAA,EAAA;QAAAQ,MAAA,EAAA;IAAA;IAAAP,WAA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AM,EAAE;QACd,oDAAA;QACAwB,KAAK,CAACxB,MAAM,CAACgC,SAAS,GAAGH,aAAa,CAAC,QAAQ,CAAC;IACpD;IACA,OAAOL,KAAK;AAChB,CAAC"}
@@ -93,7 +93,6 @@ const useStylesFlex = (0, _react.makeStyles)({
93
93
  action: {}
94
94
  });
95
95
  const useCardHeaderStyles_unstable = (state)=>{
96
- 'use no memo';
97
96
  const styles = useStyles();
98
97
  const stylesGrid = useStylesGrid();
99
98
  const stylesFlex = useStylesFlex();
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/CardHeader/useCardHeaderStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { CardHeaderSlots, CardHeaderState } from './CardHeader.types';\n\n/**\n * Static CSS class names used internally for the component slots.\n */\nexport const cardHeaderClassNames: SlotClassNames<CardHeaderSlots> = {\n root: 'fui-CardHeader',\n image: 'fui-CardHeader__image',\n header: 'fui-CardHeader__header',\n description: 'fui-CardHeader__description',\n action: 'fui-CardHeader__action',\n};\n\n/**\n * CSS variable names used internally for uniform styling in CardHeader.\n */\nexport const cardHeaderCSSVars = {\n cardHeaderGapVar: '--fui-CardHeader--gap',\n};\n\nconst useStyles = makeStyles<keyof CardHeaderSlots>({\n root: {\n [cardHeaderCSSVars.cardHeaderGapVar]: '12px',\n alignItems: 'center',\n },\n image: {\n display: 'inline-flex',\n marginRight: `var(${cardHeaderCSSVars.cardHeaderGapVar})`,\n },\n header: {\n display: 'flex',\n },\n description: {\n display: 'flex',\n },\n action: {\n marginLeft: `var(${cardHeaderCSSVars.cardHeaderGapVar})`,\n\n // when the card is selected or hovered, it has custom high contrast color and background styles\n // setting this ensures action buttons adopt those colors and are still visible in forced-colors mode\n '@media (forced-colors: active)': {\n '& .fui-Button, & .fui-Link': {\n ...shorthands.borderColor('currentColor'),\n color: 'currentColor',\n outlineColor: 'currentColor',\n },\n },\n },\n});\n\nconst useStylesGrid = makeStyles<keyof CardHeaderSlots>({\n root: {\n display: 'grid',\n gridAutoColumns: 'min-content 1fr min-content',\n },\n\n image: {\n gridColumnStart: '1',\n gridRowStart: 'span 2',\n },\n\n header: {\n gridColumnStart: '2',\n gridRowStart: '1',\n },\n\n description: {\n gridColumnStart: '2',\n gridRowStart: '2',\n },\n\n action: {\n gridColumnStart: '3',\n gridRowStart: 'span 2',\n },\n});\n\nconst useStylesFlex = makeStyles<keyof CardHeaderSlots>({\n root: {\n display: 'flex',\n },\n\n header: {\n flexGrow: 1,\n },\n\n image: {},\n description: {},\n action: {},\n});\n\n/**\n * Apply styling to the CardHeader slots based on the state.\n */\nexport const useCardHeaderStyles_unstable = (state: CardHeaderState): CardHeaderState => {\n const styles = useStyles();\n const stylesGrid = useStylesGrid();\n const stylesFlex = useStylesFlex();\n\n const boxModelStyles = state.description ? stylesGrid : stylesFlex;\n\n const getSlotStyles = (slotName: keyof CardHeaderSlots): string => {\n return mergeClasses(\n cardHeaderClassNames[slotName],\n styles[slotName],\n boxModelStyles[slotName],\n state[slotName]?.className,\n );\n };\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = getSlotStyles('root');\n\n if (state.image) {\n // eslint-disable-next-line react-hooks/immutability\n state.image.className = getSlotStyles('image');\n }\n\n if (state.header) {\n // eslint-disable-next-line react-hooks/immutability\n state.header.className = getSlotStyles('header');\n }\n\n if (state.description) {\n // eslint-disable-next-line react-hooks/immutability\n state.description.className = getSlotStyles('description');\n }\n\n if (state.action) {\n // eslint-disable-next-line react-hooks/immutability\n state.action.className = getSlotStyles('action');\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","cardHeaderClassNames","root","image","header","description","action","cardHeaderCSSVars","cardHeaderGapVar","useStyles","alignItems","display","marginRight","marginLeft","borderColor","color","outlineColor","useStylesGrid","gridAutoColumns","gridColumnStart","gridRowStart","useStylesFlex","flexGrow","useCardHeaderStyles_unstable","state","styles","stylesGrid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KO,qCAAqC,CAACkB;IAC3C,MAAMC,SAAShB;IACf,MAAMiB,aAAaT;IACnB,MAAMU,aAAaN;IAEnB,MAAMO,iBAAiBJ,MAAMnB,WAAW,GAAGqB,aAAaC;IAExD,MAAME,gBAAgB,CAACC;YAKnBN;QAJF,WAAOzB,mBAAAA,EACLE,oBAAoB,CAAC6B,SAAS,EAC9BL,MAAM,CAACK,SAAS,EAChBF,cAAc,CAACE,SAAS,EAAA,CACxBN,kBAAAA,KAAK,CAACM,SAAAA,AAAS,MAAA,QAAfN,oBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,gBAAiBO,SAAS;IAE9B;IAEA,oDAAoD;IACpDP,MAAMtB,IAAI,CAAC6B,SAAS,GAAGF,cAAc;IAErC,IAAIL,MAAMrB,KAAK,EAAE;QACf,oDAAoD;QACpDqB,MAAMrB,KAAK,CAAC4B,SAAS,GAAGF,cAAc;IACxC;IAEA,IAAIL,MAAMpB,MAAM,EAAE;QAChB,oDAAoD;QACpDoB,MAAMpB,MAAM,CAAC2B,SAAS,GAAGF,cAAc;IACzC;IAEA,IAAIL,MAAMnB,WAAW,EAAE;QACrB,oDAAoD;QACpDmB,MAAMnB,WAAW,CAAC0B,SAAS,GAAGF,cAAc;IAC9C;IAEA,IAAIL,MAAMlB,MAAM,EAAE;QAChB,oDAAoD;QACpDkB,MAAMlB,MAAM,CAACyB,SAAS,GAAGF,cAAc;IACzC;IAEA,OAAOL;AACT,EAAE"}
@@ -11,9 +11,9 @@ Object.defineProperty(exports, "CardPreview", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _useCardPreview = require("./useCardPreview");
15
- const _renderCardPreview = require("./renderCardPreview");
16
- const _useCardPreviewStylesstyles = require("./useCardPreviewStyles.styles");
14
+ const _useCardPreview = require("./useCardPreview.cjs");
15
+ const _renderCardPreview = require("./renderCardPreview.cjs");
16
+ const _useCardPreviewStylesstyles = require("./useCardPreviewStyles.styles.cjs");
17
17
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
18
18
  const CardPreview = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
19
19
  const state = (0, _useCardPreview.useCardPreview_unstable)(props, ref);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CardPreview/CardPreview.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useCardPreview_unstable } from './useCardPreview';\nimport { renderCardPreview_unstable } from './renderCardPreview';\nimport { useCardPreviewStyles_unstable } from './useCardPreviewStyles.styles';\nimport type { CardPreviewProps } from './CardPreview.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Component to render image previews of documents or articles in a Card component.\n */\nexport const CardPreview: ForwardRefComponent<CardPreviewProps> = React.forwardRef((props, ref) => {\n const state = useCardPreview_unstable(props, ref);\n\n useCardPreviewStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCardPreviewStyles_unstable')(state);\n\n return renderCardPreview_unstable(state);\n});\n\nCardPreview.displayName = 'CardPreview';\n"],"names":["React","useCardPreview_unstable","renderCardPreview_unstable","useCardPreviewStyles_unstable","useCustomStyleHook_unstable","CardPreview","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;gCACS,mBAAmB;mCAChB,sBAAsB;4CACnB,gCAAgC;qCAGlC,kCAAkC;AAKvE,MAAMK,cAAAA,WAAAA,GAAqDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,YAAQR,uCAAAA,EAAwBM,OAAOC;QAE7CL,yDAAAA,EAA8BM;QAE9BL,gDAAAA,EAA4B,iCAAiCK;IAE7D,WAAOP,6CAAAA,EAA2BO;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/CardPreview/CardPreview.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useCardPreview_unstable } from './useCardPreview';\nimport { renderCardPreview_unstable } from './renderCardPreview';\nimport { useCardPreviewStyles_unstable } from './useCardPreviewStyles.styles';\nimport type { CardPreviewProps } from './CardPreview.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Component to render image previews of documents or articles in a Card component.\n */\nexport const CardPreview: ForwardRefComponent<CardPreviewProps> = React.forwardRef((props, ref) => {\n const state = useCardPreview_unstable(props, ref);\n\n useCardPreviewStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCardPreviewStyles_unstable')(state);\n\n return renderCardPreview_unstable(state);\n});\n\nCardPreview.displayName = 'CardPreview';\n"],"names":["React","useCardPreview_unstable","renderCardPreview_unstable","useCardPreviewStyles_unstable","useCustomStyleHook_unstable","CardPreview","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;gCACS,sBAAmB;mCAChB,yBAAsB;4CACnB,mCAAgC;qCAGlC,kCAAkC;AAKvE,MAAMK,cAAAA,WAAAA,GAAqDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,YAAQR,uCAAAA,EAAwBM,OAAOC;QAE7CL,yDAAAA,EAA8BM;QAE9BL,gDAAAA,EAA4B,iCAAiCK;IAE7D,WAAOP,6CAAAA,EAA2BO;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}
@@ -28,7 +28,7 @@ _export(exports, {
28
28
  return _useCardPreview.useCardPreview_unstable;
29
29
  }
30
30
  });
31
- const _CardPreview = require("./CardPreview");
32
- const _renderCardPreview = require("./renderCardPreview");
33
- const _useCardPreview = require("./useCardPreview");
34
- const _useCardPreviewStylesstyles = require("./useCardPreviewStyles.styles");
31
+ const _CardPreview = require("./CardPreview.cjs");
32
+ const _renderCardPreview = require("./renderCardPreview.cjs");
33
+ const _useCardPreview = require("./useCardPreview.cjs");
34
+ const _useCardPreviewStylesstyles = require("./useCardPreviewStyles.styles.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CardPreview/index.ts"],"sourcesContent":["export { CardPreview } from './CardPreview';\nexport type {\n CardPreviewBaseProps,\n CardPreviewBaseState,\n CardPreviewProps,\n CardPreviewSlots,\n CardPreviewState,\n} from './CardPreview.types';\nexport { renderCardPreview_unstable } from './renderCardPreview';\nexport { useCardPreview_unstable, useCardPreviewBase_unstable } from './useCardPreview';\nexport { cardPreviewClassNames, useCardPreviewStyles_unstable } from './useCardPreviewStyles.styles';\n"],"names":["CardPreview","renderCardPreview_unstable","useCardPreview_unstable","useCardPreviewBase_unstable","cardPreviewClassNames","useCardPreviewStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,wBAAW;;;eAUXI,iDAAqB;;;eAFrBH,6CAA0B;;;eACDE,2CAA2B;;;eAC7BE,yDAA6B;;;eADpDH,uCAAuB;;;6BATJ,gBAAgB;mCAQD,sBAAsB;gCACI,mBAAmB;4CACnB,gCAAgC"}
1
+ {"version":3,"sources":["../src/components/CardPreview/index.ts"],"sourcesContent":["export { CardPreview } from './CardPreview';\nexport type {\n CardPreviewBaseProps,\n CardPreviewBaseState,\n CardPreviewProps,\n CardPreviewSlots,\n CardPreviewState,\n} from './CardPreview.types';\nexport { renderCardPreview_unstable } from './renderCardPreview';\nexport { useCardPreview_unstable, useCardPreviewBase_unstable } from './useCardPreview';\nexport { cardPreviewClassNames, useCardPreviewStyles_unstable } from './useCardPreviewStyles.styles';\n"],"names":["CardPreview","renderCardPreview_unstable","useCardPreview_unstable","useCardPreviewBase_unstable","cardPreviewClassNames","useCardPreviewStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,wBAAW;;;eAUXI,iDAAqB;;;eAFrBH,6CAA0B;;;eACDE,2CAA2B;;;eAC7BE,yDAA6B;;;eADpDH,uCAAuB;;;6BATJ,mBAAgB;mCAQD,yBAAsB;gCACI,sBAAmB;4CACnB,mCAAgC"}
@@ -20,7 +20,7 @@ _export(exports, {
20
20
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
21
21
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
22
22
  const _reactutilities = require("@fluentui/react-utilities");
23
- const _CardContext = require("../Card/CardContext");
23
+ const _CardContext = require("../Card/CardContext.cjs");
24
24
  const useCardPreview_unstable = (props, ref)=>{
25
25
  return useCardPreviewBase_unstable(props, ref);
26
26
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CardPreview/useCardPreview.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport type {\n CardPreviewBaseProps,\n CardPreviewBaseState,\n CardPreviewProps,\n CardPreviewState,\n} from './CardPreview.types';\nimport { useCardContext_unstable } from '../Card/CardContext';\n\n/**\n * Create the state required to render CardPreview.\n *\n * The returned state can be modified with hooks such as useCardPreviewStyles_unstable,\n * before being passed to renderCardPreview_unstable.\n *\n * @param props - props from this instance of CardPreview\n * @param ref - reference to root HTMLElement of CardPreview\n */\nexport const useCardPreview_unstable = (props: CardPreviewProps, ref: React.Ref<HTMLElement>): CardPreviewState => {\n return useCardPreviewBase_unstable(props, ref);\n};\n\n/**\n * Base hook for CardPreview component, which manages state related to slots structure\n * and the card's selectable accessibility label.\n * Note: CardPreview has no design props, so this is equivalent to useCardPreview_unstable.\n *\n * @param props - props from this instance of CardPreview\n * @param ref - reference to root HTMLElement of CardPreview\n */\nexport const useCardPreviewBase_unstable = (\n props: CardPreviewBaseProps,\n ref: React.Ref<HTMLElement>,\n): CardPreviewBaseState => {\n const { logo } = props;\n\n const {\n selectableA11yProps: { referenceLabel, referenceId, setReferenceLabel, setReferenceId },\n } = useCardContext_unstable();\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n const previewRef = useMergedRefs(ref as React.Ref<HTMLDivElement>, React.useRef<HTMLDivElement>(null));\n\n React.useEffect(() => {\n if (referenceLabel && referenceId) {\n return;\n }\n\n if (previewRef.current && previewRef.current.parentNode) {\n const img = previewRef.current.parentNode.querySelector<HTMLImageElement>(`.fui-CardPreview > img`);\n\n if (img) {\n const ariaLabel = img.getAttribute('aria-label');\n const ariaDescribedby = img.getAttribute('aria-describedby');\n\n if (ariaDescribedby) {\n setReferenceId(ariaDescribedby);\n } else if (img.alt) {\n setReferenceLabel(img.alt);\n } else if (ariaLabel) {\n setReferenceLabel(ariaLabel);\n }\n }\n }\n }, [setReferenceLabel, referenceLabel, previewRef, referenceId, setReferenceId]);\n\n return {\n components: {\n root: 'div',\n logo: 'div',\n },\n\n root: slot.always(\n // eslint-disable-next-line react-hooks/refs\n getIntrinsicElementProps('div', {\n ref: previewRef,\n ...props,\n }),\n { elementType: 'div' },\n ),\n logo: slot.optional(logo, { elementType: 'div' }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","slot","useCardContext_unstable","useCardPreview_unstable","props","ref","useCardPreviewBase_unstable","logo","selectableA11yProps","referenceLabel","referenceId","setReferenceLabel","setReferenceId","previewRef","useRef","useEffect","current","parentNode","img","querySelector","ariaLabel","getAttribute","ariaDescribedby","alt","components","root","always","elementType","optional"],"mappings":"AAAA;;;;;;;;;;;;IAiCaQ,2BAAAA;;;2BAZAH;;;;;iEAnBU,QAAQ;gCAC+B,4BAA4B;6BAOlD,sBAAsB;AAWvD,MAAMA,0BAA0B,CAACC,OAAyBC;IAC/D,OAAOC,4BAA4BF,OAAOC;AAC5C,EAAE;AAUK,oCAAoC,CACzCD,OACAC;IAEA,MAAM,EAAEE,IAAI,EAAE,GAAGH;IAEjB,MAAM,EACJI,qBAAqB,EAAEC,cAAc,EAAEC,WAAW,EAAEC,iBAAiB,EAAEC,cAAc,EAAE,EACxF,OAAGV,oCAAAA;IACJ,SAAS;IACT,4EAA4E;IAC5E,4FAA4F;IAC5F,MAAMW,iBAAab,6BAAAA,EAAcK,KAAkCP,OAAMgB,MAAM,CAAiB;IAEhGhB,OAAMiB,SAAS,CAAC;QACd,IAAIN,kBAAkBC,aAAa;YACjC;QACF;QAEA,IAAIG,WAAWG,OAAO,IAAIH,WAAWG,OAAO,CAACC,UAAU,EAAE;YACvD,MAAMC,MAAML,WAAWG,OAAO,CAACC,UAAU,CAACE,aAAa,CAAmB,CAAC,sBAAsB,CAAC;YAElG,IAAID,KAAK;gBACP,MAAME,YAAYF,IAAIG,YAAY,CAAC;gBACnC,MAAMC,kBAAkBJ,IAAIG,YAAY,CAAC;gBAEzC,IAAIC,iBAAiB;oBACnBV,eAAeU;gBACjB,OAAO,IAAIJ,IAAIK,GAAG,EAAE;oBAClBZ,kBAAkBO,IAAIK,GAAG;gBAC3B,OAAO,IAAIH,WAAW;oBACpBT,kBAAkBS;gBACpB;YACF;QACF;IACF,GAAG;QAACT;QAAmBF;QAAgBI;QAAYH;QAAaE;KAAe;IAE/E,OAAO;QACLY,YAAY;YACVC,MAAM;YACNlB,MAAM;QACR;QAEAkB,MAAMxB,oBAAAA,CAAKyB,MAAM,CACf,IACA3B,wCAD4C,AAC5CA,EAAyB,OAAO;YAC9BM,KAAKQ;YACL,GAAGT,KAAK;QACV,IACA;YAAEuB,aAAa;QAAM;QAEvBpB,MAAMN,oBAAAA,CAAK2B,QAAQ,CAACrB,MAAM;YAAEoB,aAAa;QAAM;IACjD;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/CardPreview/useCardPreview.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport type {\n CardPreviewBaseProps,\n CardPreviewBaseState,\n CardPreviewProps,\n CardPreviewState,\n} from './CardPreview.types';\nimport { useCardContext_unstable } from '../Card/CardContext';\n\n/**\n * Create the state required to render CardPreview.\n *\n * The returned state can be modified with hooks such as useCardPreviewStyles_unstable,\n * before being passed to renderCardPreview_unstable.\n *\n * @param props - props from this instance of CardPreview\n * @param ref - reference to root HTMLElement of CardPreview\n */\nexport const useCardPreview_unstable = (props: CardPreviewProps, ref: React.Ref<HTMLElement>): CardPreviewState => {\n return useCardPreviewBase_unstable(props, ref);\n};\n\n/**\n * Base hook for CardPreview component, which manages state related to slots structure\n * and the card's selectable accessibility label.\n * Note: CardPreview has no design props, so this is equivalent to useCardPreview_unstable.\n *\n * @param props - props from this instance of CardPreview\n * @param ref - reference to root HTMLElement of CardPreview\n */\nexport const useCardPreviewBase_unstable = (\n props: CardPreviewBaseProps,\n ref: React.Ref<HTMLElement>,\n): CardPreviewBaseState => {\n const { logo } = props;\n\n const {\n selectableA11yProps: { referenceLabel, referenceId, setReferenceLabel, setReferenceId },\n } = useCardContext_unstable();\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n const previewRef = useMergedRefs(ref as React.Ref<HTMLDivElement>, React.useRef<HTMLDivElement>(null));\n\n React.useEffect(() => {\n if (referenceLabel && referenceId) {\n return;\n }\n\n if (previewRef.current && previewRef.current.parentNode) {\n const img = previewRef.current.parentNode.querySelector<HTMLImageElement>(`.fui-CardPreview > img`);\n\n if (img) {\n const ariaLabel = img.getAttribute('aria-label');\n const ariaDescribedby = img.getAttribute('aria-describedby');\n\n if (ariaDescribedby) {\n setReferenceId(ariaDescribedby);\n } else if (img.alt) {\n setReferenceLabel(img.alt);\n } else if (ariaLabel) {\n setReferenceLabel(ariaLabel);\n }\n }\n }\n }, [setReferenceLabel, referenceLabel, previewRef, referenceId, setReferenceId]);\n\n return {\n components: {\n root: 'div',\n logo: 'div',\n },\n\n root: slot.always(\n // eslint-disable-next-line react-hooks/refs\n getIntrinsicElementProps('div', {\n ref: previewRef,\n ...props,\n }),\n { elementType: 'div' },\n ),\n logo: slot.optional(logo, { elementType: 'div' }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","slot","useCardContext_unstable","useCardPreview_unstable","props","ref","useCardPreviewBase_unstable","logo","selectableA11yProps","referenceLabel","referenceId","setReferenceLabel","setReferenceId","previewRef","useRef","useEffect","current","parentNode","img","querySelector","ariaLabel","getAttribute","ariaDescribedby","alt","components","root","always","elementType","optional"],"mappings":"AAAA;;;;;;;;;;;;IAiCaQ,2BAAAA;;;2BAZAH;;;;;iEAnBU,QAAQ;gCAC+B,4BAA4B;6BAOlD,yBAAsB;AAWvD,MAAMA,0BAA0B,CAACC,OAAyBC;IAC/D,OAAOC,4BAA4BF,OAAOC;AAC5C,EAAE;AAUK,oCAAoC,CACzCD,OACAC;IAEA,MAAM,EAAEE,IAAI,EAAE,GAAGH;IAEjB,MAAM,EACJI,qBAAqB,EAAEC,cAAc,EAAEC,WAAW,EAAEC,iBAAiB,EAAEC,cAAc,EAAE,EACxF,OAAGV,oCAAAA;IACJ,SAAS;IACT,4EAA4E;IAC5E,4FAA4F;IAC5F,MAAMW,iBAAab,6BAAAA,EAAcK,KAAkCP,OAAMgB,MAAM,CAAiB;IAEhGhB,OAAMiB,SAAS,CAAC;QACd,IAAIN,kBAAkBC,aAAa;YACjC;QACF;QAEA,IAAIG,WAAWG,OAAO,IAAIH,WAAWG,OAAO,CAACC,UAAU,EAAE;YACvD,MAAMC,MAAML,WAAWG,OAAO,CAACC,UAAU,CAACE,aAAa,CAAmB,CAAC,sBAAsB,CAAC;YAElG,IAAID,KAAK;gBACP,MAAME,YAAYF,IAAIG,YAAY,CAAC;gBACnC,MAAMC,kBAAkBJ,IAAIG,YAAY,CAAC;gBAEzC,IAAIC,iBAAiB;oBACnBV,eAAeU;gBACjB,OAAO,IAAIJ,IAAIK,GAAG,EAAE;oBAClBZ,kBAAkBO,IAAIK,GAAG;gBAC3B,OAAO,IAAIH,WAAW;oBACpBT,kBAAkBS;gBACpB;YACF;QACF;IACF,GAAG;QAACT;QAAmBF;QAAgBI;QAAYH;QAAaE;KAAe;IAE/E,OAAO;QACLY,YAAY;YACVC,MAAM;YACNlB,MAAM;QACR;QAEAkB,MAAMxB,oBAAAA,CAAKyB,MAAM,CACf,IACA3B,wCAD4C,AAC5CA,EAAyB,OAAO;YAC9BM,KAAKQ;YACL,GAAGT,KAAK;QACV,IACA;YAAEuB,aAAa;QAAM;QAEvBpB,MAAMN,oBAAAA,CAAK2B,QAAQ,CAACrB,MAAM;YAAEoB,aAAa;QAAM;IACjD;AACF,EAAE"}
@@ -54,7 +54,6 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
54
54
  ]
55
55
  });
56
56
  const useCardPreviewStyles_unstable = (state)=>{
57
- 'use no memo';
58
57
  const styles = useStyles();
59
58
  // eslint-disable-next-line react-hooks/immutability
60
59
  state.root.className = (0, _react.mergeClasses)(cardPreviewClassNames.root, styles.root, state.root.className);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useCardPreviewStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\n/**\n * Static CSS class names used internally for the component slots.\n */ export const cardPreviewClassNames = {\n root: 'fui-CardPreview',\n logo: 'fui-CardPreview__logo'\n};\nconst useStyles = makeStyles({\n root: {\n position: 'relative',\n [`> :not(.${cardPreviewClassNames.logo})`]: {\n display: 'block',\n height: '100%',\n width: '100%'\n }\n },\n logo: {\n position: 'absolute',\n bottom: '12px',\n left: '12px',\n width: '32px',\n height: '32px'\n }\n});\n/**\n * Apply styling to the CardPreview slots based on the state.\n */ export const useCardPreviewStyles_unstable = (state)=>{\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(cardPreviewClassNames.root, styles.root, state.root.className);\n if (state.logo) {\n // eslint-disable-next-line react-hooks/immutability\n state.logo.className = mergeClasses(cardPreviewClassNames.logo, styles.logo, state.logo.className);\n }\n return state;\n};\n"],"names":["__styles","mergeClasses","cardPreviewClassNames","root","logo","useStyles","qhf8xq","Byfpedg","Btj6oj6","B1m4t4s","B5kzvoi","oyh7mz","a9b677","Bqenvij","d","useCardPreviewStyles_unstable","state","styles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAIKE,qBAAqB;;;iCAuBQ;;;;uBA1BL,gBAAgB;AAG9C,8BAA8B;IACrCC,IAAI,EAAE,iBAAiB;IACvBC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,SAAS,GAAA,WAAA,OAAGL,eAAA,EAAA;IAAAG,IAAA,EAAA;QAAAG,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAL,IAAA,EAAA;QAAAE,MAAA,EAAA;QAAAI,OAAA,EAAA;QAAAC,MAAA,EAAA;YAAA;YAAA;SAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CAgBjB,CAAC;AAGS,MAAMC,iCAAiCC,KAAK,IAAG;IACtD,MAAMC,MAAM,GAAGZ,SAAS,CAAC,CAAC;IAC1B,oDAAA;IACAW,KAAK,CAACb,IAAI,CAACe,SAAS,OAAGjB,mBAAY,EAACC,qBAAqB,CAACC,IAAI,EAAEc,MAAM,CAACd,IAAI,EAAEa,KAAK,CAACb,IAAI,CAACe,SAAS,CAAC;IAClG,IAAIF,KAAK,CAACZ,IAAI,EAAE;QACZ,oDAAA;QACAY,KAAK,CAACZ,IAAI,CAACc,SAAS,OAAGjB,mBAAY,EAACC,qBAAqB,CAACE,IAAI,EAAEa,MAAM,CAACb,IAAI,EAAEY,KAAK,CAACZ,IAAI,CAACc,SAAS,CAAC;IACtG;IACA,OAAOF,KAAK;AAChB,CAAC"}