@fluentui/react-card 9.0.2 → 9.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +58 -1
  3. package/CHANGELOG.md +18 -2
  4. package/lib/Card.js.map +1 -1
  5. package/lib/CardFooter.js.map +1 -1
  6. package/lib/CardHeader.js.map +1 -1
  7. package/lib/CardPreview.js.map +1 -1
  8. package/lib/components/Card/Card.js.map +1 -1
  9. package/lib/components/Card/Card.types.js +1 -1
  10. package/lib/components/Card/Card.types.js.map +1 -1
  11. package/lib/components/Card/CardContext.js +4 -8
  12. package/lib/components/Card/CardContext.js.map +1 -1
  13. package/lib/components/Card/index.js.map +1 -1
  14. package/lib/components/Card/renderCard.js +2 -8
  15. package/lib/components/Card/renderCard.js.map +1 -1
  16. package/lib/components/Card/useCard.js.map +1 -1
  17. package/lib/components/Card/useCardContextValue.js.map +1 -1
  18. package/lib/components/Card/useCardSelectable.js.map +1 -1
  19. package/lib/components/Card/useCardStyles.js.map +1 -1
  20. package/lib/components/CardFooter/CardFooter.js.map +1 -1
  21. package/lib/components/CardFooter/CardFooter.types.js.map +1 -1
  22. package/lib/components/CardFooter/index.js.map +1 -1
  23. package/lib/components/CardFooter/renderCardFooter.js +1 -5
  24. package/lib/components/CardFooter/renderCardFooter.js.map +1 -1
  25. package/lib/components/CardFooter/useCardFooter.js +1 -0
  26. package/lib/components/CardFooter/useCardFooter.js.map +1 -1
  27. package/lib/components/CardFooter/useCardFooterStyles.js.map +1 -1
  28. package/lib/components/CardHeader/CardHeader.js.map +1 -1
  29. package/lib/components/CardHeader/CardHeader.types.js.map +1 -1
  30. package/lib/components/CardHeader/index.js.map +1 -1
  31. package/lib/components/CardHeader/renderCardHeader.js +1 -11
  32. package/lib/components/CardHeader/renderCardHeader.js.map +1 -1
  33. package/lib/components/CardHeader/useCardHeader.js.map +1 -1
  34. package/lib/components/CardHeader/useCardHeaderStyles.js.map +1 -1
  35. package/lib/components/CardPreview/CardPreview.js.map +1 -1
  36. package/lib/components/CardPreview/CardPreview.types.js.map +1 -1
  37. package/lib/components/CardPreview/index.js.map +1 -1
  38. package/lib/components/CardPreview/renderCardPreview.js +1 -5
  39. package/lib/components/CardPreview/renderCardPreview.js.map +1 -1
  40. package/lib/components/CardPreview/useCardPreview.js.map +1 -1
  41. package/lib/components/CardPreview/useCardPreviewStyles.js.map +1 -1
  42. package/lib/index.js.map +1 -1
  43. package/lib-commonjs/Card.js +5 -4
  44. package/lib-commonjs/Card.js.map +1 -1
  45. package/lib-commonjs/CardFooter.js +5 -4
  46. package/lib-commonjs/CardFooter.js.map +1 -1
  47. package/lib-commonjs/CardHeader.js +5 -4
  48. package/lib-commonjs/CardHeader.js.map +1 -1
  49. package/lib-commonjs/CardPreview.js +5 -4
  50. package/lib-commonjs/CardPreview.js.map +1 -1
  51. package/lib-commonjs/components/Card/Card.js +18 -17
  52. package/lib-commonjs/components/Card/Card.js.map +1 -1
  53. package/lib-commonjs/components/Card/Card.types.js +5 -2
  54. package/lib-commonjs/components/Card/Card.types.js.map +1 -1
  55. package/lib-commonjs/components/Card/CardContext.js +27 -30
  56. package/lib-commonjs/components/Card/CardContext.js.map +1 -1
  57. package/lib-commonjs/components/Card/index.js +10 -9
  58. package/lib-commonjs/components/Card/index.js.map +1 -1
  59. package/lib-commonjs/components/Card/renderCard.js +16 -25
  60. package/lib-commonjs/components/Card/renderCard.js.map +1 -1
  61. package/lib-commonjs/components/Card/useCard.js +81 -94
  62. package/lib-commonjs/components/Card/useCard.js.map +1 -1
  63. package/lib-commonjs/components/Card/useCardContextValue.js +11 -11
  64. package/lib-commonjs/components/Card/useCardContextValue.js.map +1 -1
  65. package/lib-commonjs/components/Card/useCardSelectable.js +130 -117
  66. package/lib-commonjs/components/Card/useCardSelectable.js.map +1 -1
  67. package/lib-commonjs/components/Card/useCardStyles.js +738 -336
  68. package/lib-commonjs/components/Card/useCardStyles.js.map +1 -1
  69. package/lib-commonjs/components/CardFooter/CardFooter.js +16 -15
  70. package/lib-commonjs/components/CardFooter/CardFooter.js.map +1 -1
  71. package/lib-commonjs/components/CardFooter/CardFooter.types.js +3 -2
  72. package/lib-commonjs/components/CardFooter/CardFooter.types.js.map +1 -1
  73. package/lib-commonjs/components/CardFooter/index.js +9 -8
  74. package/lib-commonjs/components/CardFooter/index.js.map +1 -1
  75. package/lib-commonjs/components/CardFooter/renderCardFooter.js +13 -20
  76. package/lib-commonjs/components/CardFooter/renderCardFooter.js.map +1 -1
  77. package/lib-commonjs/components/CardFooter/useCardFooter.js +23 -30
  78. package/lib-commonjs/components/CardFooter/useCardFooter.js.map +1 -1
  79. package/lib-commonjs/components/CardFooter/useCardFooterStyles.js +45 -33
  80. package/lib-commonjs/components/CardFooter/useCardFooterStyles.js.map +1 -1
  81. package/lib-commonjs/components/CardHeader/CardHeader.js +16 -15
  82. package/lib-commonjs/components/CardHeader/CardHeader.js.map +1 -1
  83. package/lib-commonjs/components/CardHeader/CardHeader.types.js +3 -2
  84. package/lib-commonjs/components/CardHeader/CardHeader.types.js.map +1 -1
  85. package/lib-commonjs/components/CardHeader/index.js +9 -8
  86. package/lib-commonjs/components/CardHeader/index.js.map +1 -1
  87. package/lib-commonjs/components/CardHeader/renderCardHeader.js +13 -26
  88. package/lib-commonjs/components/CardHeader/renderCardHeader.js.map +1 -1
  89. package/lib-commonjs/components/CardHeader/useCardHeader.js +50 -64
  90. package/lib-commonjs/components/CardHeader/useCardHeader.js.map +1 -1
  91. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js +88 -67
  92. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js.map +1 -1
  93. package/lib-commonjs/components/CardPreview/CardPreview.js +16 -15
  94. package/lib-commonjs/components/CardPreview/CardPreview.js.map +1 -1
  95. package/lib-commonjs/components/CardPreview/CardPreview.types.js +3 -2
  96. package/lib-commonjs/components/CardPreview/CardPreview.types.js.map +1 -1
  97. package/lib-commonjs/components/CardPreview/index.js +9 -8
  98. package/lib-commonjs/components/CardPreview/index.js.map +1 -1
  99. package/lib-commonjs/components/CardPreview/renderCardPreview.js +13 -20
  100. package/lib-commonjs/components/CardPreview/renderCardPreview.js.map +1 -1
  101. package/lib-commonjs/components/CardPreview/useCardPreview.js +51 -60
  102. package/lib-commonjs/components/CardPreview/useCardPreview.js.map +1 -1
  103. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js +53 -37
  104. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js.map +1 -1
  105. package/lib-commonjs/index.js +40 -153
  106. package/lib-commonjs/index.js.map +1 -1
  107. package/package.json +10 -9
  108. package/lib-amd/Card.js +0 -6
  109. package/lib-amd/Card.js.map +0 -1
  110. package/lib-amd/CardFooter.js +0 -6
  111. package/lib-amd/CardFooter.js.map +0 -1
  112. package/lib-amd/CardHeader.js +0 -6
  113. package/lib-amd/CardHeader.js.map +0 -1
  114. package/lib-amd/CardPreview.js +0 -6
  115. package/lib-amd/CardPreview.js.map +0 -1
  116. package/lib-amd/components/Card/Card.js +0 -16
  117. package/lib-amd/components/Card/Card.js.map +0 -1
  118. package/lib-amd/components/Card/Card.types.js +0 -5
  119. package/lib-amd/components/Card/Card.types.js.map +0 -1
  120. package/lib-amd/components/Card/CardContext.js +0 -31
  121. package/lib-amd/components/Card/CardContext.js.map +0 -1
  122. package/lib-amd/components/Card/index.js +0 -11
  123. package/lib-amd/components/Card/index.js.map +0 -1
  124. package/lib-amd/components/Card/renderCard.js +0 -18
  125. package/lib-amd/components/Card/renderCard.js.map +0 -1
  126. package/lib-amd/components/Card/useCard.js +0 -85
  127. package/lib-amd/components/Card/useCard.js.map +0 -1
  128. package/lib-amd/components/Card/useCardContextValue.js +0 -11
  129. package/lib-amd/components/Card/useCardContextValue.js.map +0 -1
  130. package/lib-amd/components/Card/useCardSelectable.js +0 -97
  131. package/lib-amd/components/Card/useCardSelectable.js.map +0 -1
  132. package/lib-amd/components/Card/useCardStyles.js +0 -253
  133. package/lib-amd/components/Card/useCardStyles.js.map +0 -1
  134. package/lib-amd/components/CardFooter/CardFooter.js +0 -15
  135. package/lib-amd/components/CardFooter/CardFooter.js.map +0 -1
  136. package/lib-amd/components/CardFooter/CardFooter.types.js +0 -5
  137. package/lib-amd/components/CardFooter/CardFooter.types.js.map +0 -1
  138. package/lib-amd/components/CardFooter/index.js +0 -10
  139. package/lib-amd/components/CardFooter/index.js.map +0 -1
  140. package/lib-amd/components/CardFooter/renderCardFooter.js +0 -16
  141. package/lib-amd/components/CardFooter/renderCardFooter.js.map +0 -1
  142. package/lib-amd/components/CardFooter/useCardFooter.js +0 -27
  143. package/lib-amd/components/CardFooter/useCardFooter.js.map +0 -1
  144. package/lib-amd/components/CardFooter/useCardFooterStyles.js +0 -31
  145. package/lib-amd/components/CardFooter/useCardFooterStyles.js.map +0 -1
  146. package/lib-amd/components/CardHeader/CardHeader.js +0 -15
  147. package/lib-amd/components/CardHeader/CardHeader.js.map +0 -1
  148. package/lib-amd/components/CardHeader/CardHeader.types.js +0 -5
  149. package/lib-amd/components/CardHeader/CardHeader.types.js.map +0 -1
  150. package/lib-amd/components/CardHeader/index.js +0 -10
  151. package/lib-amd/components/CardHeader/index.js.map +0 -1
  152. package/lib-amd/components/CardHeader/renderCardHeader.js +0 -18
  153. package/lib-amd/components/CardHeader/renderCardHeader.js.map +0 -1
  154. package/lib-amd/components/CardHeader/useCardHeader.js +0 -48
  155. package/lib-amd/components/CardHeader/useCardHeader.js.map +0 -1
  156. package/lib-amd/components/CardHeader/useCardHeaderStyles.js +0 -72
  157. package/lib-amd/components/CardHeader/useCardHeaderStyles.js.map +0 -1
  158. package/lib-amd/components/CardPreview/CardPreview.js +0 -15
  159. package/lib-amd/components/CardPreview/CardPreview.js.map +0 -1
  160. package/lib-amd/components/CardPreview/CardPreview.types.js +0 -5
  161. package/lib-amd/components/CardPreview/CardPreview.types.js.map +0 -1
  162. package/lib-amd/components/CardPreview/index.js +0 -10
  163. package/lib-amd/components/CardPreview/index.js.map +0 -1
  164. package/lib-amd/components/CardPreview/renderCardPreview.js +0 -16
  165. package/lib-amd/components/CardPreview/renderCardPreview.js.map +0 -1
  166. package/lib-amd/components/CardPreview/useCardPreview.js +0 -50
  167. package/lib-amd/components/CardPreview/useCardPreview.js.map +0 -1
  168. package/lib-amd/components/CardPreview/useCardPreviewStyles.js +0 -44
  169. package/lib-amd/components/CardPreview/useCardPreviewStyles.js.map +0 -1
  170. package/lib-amd/index.js +0 -30
  171. package/lib-amd/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCardHeader_unstable","renderCardHeader_unstable","useCardHeaderStyles_unstable","CardHeader","forwardRef","props","ref","state","displayName"],"sources":["../src/packages/react-components/react-card/src/components/CardHeader/CardHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCardHeader_unstable } from './useCardHeader';\nimport { renderCardHeader_unstable } from './renderCardHeader';\nimport { useCardHeaderStyles_unstable } from './useCardHeaderStyles';\nimport type { CardHeaderProps } from './CardHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\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 return renderCardHeader_unstable(state);\n});\n\nCardHeader.displayName = 'CardHeader';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,yBAAyB,QAAQ,oBAAoB;AAC9D,SAASC,4BAA4B,QAAQ,uBAAuB;AAIpE;;;AAGA,OAAO,MAAMC,UAAU,gBAAyCJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC9F,MAAMC,KAAK,GAAGP,sBAAsB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAEhDJ,4BAA4B,CAACK,KAAK,CAAC;EACnC,OAAON,yBAAyB,CAACM,KAAK,CAAC;AACzC,CAAC,CAAC;AAEFJ,UAAU,CAACK,WAAW,GAAG,YAAY"}
1
+ {"version":3,"names":["React","useCardHeader_unstable","renderCardHeader_unstable","useCardHeaderStyles_unstable","CardHeader","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/CardHeader/CardHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCardHeader_unstable } from './useCardHeader';\nimport { renderCardHeader_unstable } from './renderCardHeader';\nimport { useCardHeaderStyles_unstable } from './useCardHeaderStyles';\nimport type { CardHeaderProps } from './CardHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\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 return renderCardHeader_unstable(state);\n});\n\nCardHeader.displayName = 'CardHeader';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,sBAAsB,QAAQ;AACvC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,4BAA4B,QAAQ;AAI7C;;;AAGA,OAAO,MAAMC,UAAA,gBAAmDJ,KAAA,CAAMK,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EAC/F,MAAMC,KAAA,GAAQP,sBAAA,CAAuBK,KAAA,EAAOC,GAAA;EAE5CJ,4BAAA,CAA6BK,KAAA;EAC7B,OAAON,yBAAA,CAA0BM,KAAA;AACnC;AAEAJ,UAAA,CAAWK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"CardHeader.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-card/src/components/CardHeader/CardHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Slots available in the CardHeader component.\n */\nexport type CardHeaderSlots = {\n /**\n * Root element of the component.\n */\n root: Slot<'div'>;\n\n /**\n * Element used to render an image or avatar related to the card.\n */\n image: Slot<'div', 'img'>;\n\n /**\n * Element used to render the main header title.\n */\n header: Slot<'div'>;\n\n /**\n * Element used to render short descriptions related to the title.\n */\n description: Slot<'div'>;\n\n /**\n * Container that renders on the far end of the footer, used for action buttons.\n */\n action?: Slot<'div'>;\n};\n\n/**\n * CardHeader component props.\n */\nexport type CardHeaderProps = ComponentProps<Partial<CardHeaderSlots>>;\n\n/**\n * State used in rendering CardHeader.\n */\nexport type CardHeaderState = ComponentState<CardHeaderSlots>;\n"]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/CardHeader/CardHeader.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Slots available in the CardHeader component.\n */\nexport type CardHeaderSlots = {\n /**\n * Root element of the component.\n */\n root: Slot<'div'>;\n\n /**\n * Element used to render an image or avatar related to the card.\n */\n image: Slot<'div', 'img'>;\n\n /**\n * Element used to render the main header title.\n */\n header: Slot<'div'>;\n\n /**\n * Element used to render short descriptions related to the title.\n */\n description: Slot<'div'>;\n\n /**\n * Container that renders on the far end of the footer, used for action buttons.\n */\n action?: Slot<'div'>;\n};\n\n/**\n * CardHeader component props.\n */\nexport type CardHeaderProps = ComponentProps<Partial<CardHeaderSlots>>;\n\n/**\n * State used in rendering CardHeader.\n */\nexport type CardHeaderState = ComponentState<CardHeaderSlots>;\n"],"mappings":"AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-card/src/components/CardHeader/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './CardHeader';\nexport * from './CardHeader.types';\nexport * from './renderCardHeader';\nexport * from './useCardHeader';\nexport * from './useCardHeaderStyles';\n"]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/CardHeader/index.ts"],"sourcesContent":["export * from './CardHeader';\nexport * from './CardHeader.types';\nexport * from './renderCardHeader';\nexport * from './useCardHeader';\nexport * from './useCardHeaderStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
@@ -8,16 +8,6 @@ export const renderCardHeader_unstable = state => {
8
8
  slots,
9
9
  slotProps
10
10
  } = getSlots(state);
11
- return /*#__PURE__*/React.createElement(slots.root, {
12
- ...slotProps.root
13
- }, slots.image && /*#__PURE__*/React.createElement(slots.image, {
14
- ...slotProps.image
15
- }), /*#__PURE__*/React.createElement(slots.header, {
16
- ...slotProps.header
17
- }), slots.description && /*#__PURE__*/React.createElement(slots.description, {
18
- ...slotProps.description
19
- }), slots.action && /*#__PURE__*/React.createElement(slots.action, {
20
- ...slotProps.action
21
- }));
11
+ return /*#__PURE__*/React.createElement(slots.root, slotProps.root, slots.image && /*#__PURE__*/React.createElement(slots.image, slotProps.image), /*#__PURE__*/React.createElement(slots.header, slotProps.header), slots.description && /*#__PURE__*/React.createElement(slots.description, slotProps.description), slots.action && /*#__PURE__*/React.createElement(slots.action, slotProps.action));
22
12
  };
23
13
  //# sourceMappingURL=renderCardHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","getSlots","renderCardHeader_unstable","state","slots","slotProps","createElement","root","image","header","description","action"],"sources":["../src/packages/react-components/react-card/src/components/CardHeader/renderCardHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CardHeaderSlots, CardHeaderState } from './CardHeader.types';\n\n/**\n * Render the final JSX of CardHeader.\n */\nexport const renderCardHeader_unstable = (state: CardHeaderState) => {\n const { slots, slotProps } = getSlots<CardHeaderSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.image && <slots.image {...slotProps.image} />}\n <slots.header {...slotProps.header} />\n {slots.description && <slots.description {...slotProps.description} />}\n {slots.action && <slots.action {...slotProps.action} />}\n </slots.root>\n );\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,yBAAyB,GAAIC,KAAsB,IAAI;EAClE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAkBE,KAAK,CAAC;EAE7D,oBACEH,KAAA,CAAAM,aAAA,CAACF,KAAK,CAACG,IAAI;IAAA,GAAKF,SAAS,CAACE;EAAI,GAC3BH,KAAK,CAACI,KAAK,iBAAIR,KAAA,CAAAM,aAAA,CAACF,KAAK,CAACI,KAAK;IAAA,GAAKH,SAAS,CAACG;EAAK,EAAI,eACpDR,KAAA,CAAAM,aAAA,CAACF,KAAK,CAACK,MAAM;IAAA,GAAKJ,SAAS,CAACI;EAAM,EAAI,EACrCL,KAAK,CAACM,WAAW,iBAAIV,KAAA,CAAAM,aAAA,CAACF,KAAK,CAACM,WAAW;IAAA,GAAKL,SAAS,CAACK;EAAW,EAAI,EACrEN,KAAK,CAACO,MAAM,iBAAIX,KAAA,CAAAM,aAAA,CAACF,KAAK,CAACO,MAAM;IAAA,GAAKN,SAAS,CAACM;EAAM,EAAI,CAC5C;AAEjB,CAAC"}
1
+ {"version":3,"names":["React","getSlots","renderCardHeader_unstable","state","slots","slotProps","createElement","root","image","header","description","action"],"sources":["../../../src/components/CardHeader/renderCardHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CardHeaderSlots, CardHeaderState } from './CardHeader.types';\n\n/**\n * Render the final JSX of CardHeader.\n */\nexport const renderCardHeader_unstable = (state: CardHeaderState) => {\n const { slots, slotProps } = getSlots<CardHeaderSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.image && <slots.image {...slotProps.image} />}\n <slots.header {...slotProps.header} />\n {slots.description && <slots.description {...slotProps.description} />}\n {slots.action && <slots.action {...slotProps.action} />}\n </slots.root>\n );\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,QAAQ,QAAQ;AAGzB;;;AAGA,OAAO,MAAMC,yBAAA,GAA6BC,KAAA,IAA2B;EACnE,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGJ,QAAA,CAA0BE,KAAA;EAEvD,oBACEH,KAAA,CAAAM,aAAA,CAACF,KAAA,CAAMG,IAAI,EAAKF,SAAA,CAAUE,IAAI,EAC3BH,KAAA,CAAMI,KAAK,iBAAIR,KAAA,CAAAM,aAAA,CAACF,KAAA,CAAMI,KAAK,EAAKH,SAAA,CAAUG,KAAK,gBAChDR,KAAA,CAAAM,aAAA,CAACF,KAAA,CAAMK,MAAM,EAAKJ,SAAA,CAAUI,MAAM,GACjCL,KAAA,CAAMM,WAAW,iBAAIV,KAAA,CAAAM,aAAA,CAACF,KAAA,CAAMM,WAAW,EAAKL,SAAA,CAAUK,WAAW,GACjEN,KAAA,CAAMO,MAAM,iBAAIX,KAAA,CAAAM,aAAA,CAACF,KAAA,CAAMO,MAAM,EAAKN,SAAA,CAAUM,MAAM;AAGzD"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","getNativeElementProps","resolveShorthand","useId","useCardContext_unstable","cardHeaderClassNames","useCardHeader_unstable","props","ref","image","header","description","action","selectableA11yProps","referenceId","setReferenceId","headerRef","useRef","generatedId","useEffect","current","id","components","root","required","defaultProps"],"sources":["../src/packages/react-components/react-card/src/components/CardHeader/useCardHeader.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport type { CardHeaderProps, CardHeaderState } from './CardHeader.types';\nimport { useCardContext_unstable } from '../Card/CardContext';\nimport { cardHeaderClassNames } from './useCardHeaderStyles';\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 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 generatedId = useId(cardHeaderClassNames.header, referenceId);\n\n React.useEffect(() => {\n if (header && headerRef.current) {\n const { id } = headerRef.current;\n\n setReferenceId(id ? id : generatedId);\n }\n }, [header, setReferenceId, generatedId]);\n\n return {\n components: {\n root: 'div',\n image: 'div',\n header: 'div',\n description: 'div',\n action: 'div',\n },\n\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n image: resolveShorthand(image),\n header: resolveShorthand(header, {\n required: true,\n defaultProps: {\n ref: headerRef,\n id: referenceId,\n },\n }),\n description: resolveShorthand(description),\n action: resolveShorthand(action),\n };\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,qBAAqB,EAAEC,gBAAgB,EAAEC,KAAK,QAAQ,2BAA2B;AAE1F,SAASC,uBAAuB,QAAQ,qBAAqB;AAC7D,SAASC,oBAAoB,QAAQ,uBAAuB;AAE5D;;;;;;;;;AASA,OAAO,MAAMC,sBAAsB,GAAGA,CAACC,KAAsB,EAAEC,GAA2B,KAAqB;EAC7G,MAAM;IAAEC,KAAK;IAAEC,MAAM;IAAEC,WAAW;IAAEC;EAAM,CAAE,GAAGL,KAAK;EAEpD,MAAM;IACJM,mBAAmB,EAAE;MAAEC,WAAW;MAAEC;IAAc;EAAE,CACrD,GAAGX,uBAAuB,EAAE;EAC7B,MAAMY,SAAS,GAAGhB,KAAK,CAACiB,MAAM,CAAiB,IAAI,CAAC;EAEpD,MAAMC,WAAW,GAAGf,KAAK,CAACE,oBAAoB,CAACK,MAAM,EAAEI,WAAW,CAAC;EAEnEd,KAAK,CAACmB,SAAS,CAAC,MAAK;IACnB,IAAIT,MAAM,IAAIM,SAAS,CAACI,OAAO,EAAE;MAC/B,MAAM;QAAEC;MAAE,CAAE,GAAGL,SAAS,CAACI,OAAO;MAEhCL,cAAc,CAACM,EAAE,GAAGA,EAAE,GAAGH,WAAW,CAAC;;EAEzC,CAAC,EAAE,CAACR,MAAM,EAAEK,cAAc,EAAEG,WAAW,CAAC,CAAC;EAEzC,OAAO;IACLI,UAAU,EAAE;MACVC,IAAI,EAAE,KAAK;MACXd,KAAK,EAAE,KAAK;MACZC,MAAM,EAAE,KAAK;MACbC,WAAW,EAAE,KAAK;MAClBC,MAAM,EAAE;KACT;IAEDW,IAAI,EAAEtB,qBAAqB,CAAC,KAAK,EAAE;MACjCO,GAAG;MACH,GAAGD;KACJ,CAAC;IACFE,KAAK,EAAEP,gBAAgB,CAACO,KAAK,CAAC;IAC9BC,MAAM,EAAER,gBAAgB,CAACQ,MAAM,EAAE;MAC/Bc,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZjB,GAAG,EAAEQ,SAAS;QACdK,EAAE,EAAEP;;KAEP,CAAC;IACFH,WAAW,EAAET,gBAAgB,CAACS,WAAW,CAAC;IAC1CC,MAAM,EAAEV,gBAAgB,CAACU,MAAM;GAChC;AACH,CAAC"}
1
+ {"version":3,"names":["React","getNativeElementProps","resolveShorthand","useId","useCardContext_unstable","cardHeaderClassNames","useCardHeader_unstable","props","ref","image","header","description","action","selectableA11yProps","referenceId","setReferenceId","headerRef","useRef","generatedId","useEffect","current","id","components","root","required","defaultProps"],"sources":["../../../src/components/CardHeader/useCardHeader.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport type { CardHeaderProps, CardHeaderState } from './CardHeader.types';\nimport { useCardContext_unstable } from '../Card/CardContext';\nimport { cardHeaderClassNames } from './useCardHeaderStyles';\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 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 generatedId = useId(cardHeaderClassNames.header, referenceId);\n\n React.useEffect(() => {\n if (header && headerRef.current) {\n const { id } = headerRef.current;\n\n setReferenceId(id ? id : generatedId);\n }\n }, [header, setReferenceId, generatedId]);\n\n return {\n components: {\n root: 'div',\n image: 'div',\n header: 'div',\n description: 'div',\n action: 'div',\n },\n\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n image: resolveShorthand(image),\n header: resolveShorthand(header, {\n required: true,\n defaultProps: {\n ref: headerRef,\n id: referenceId,\n },\n }),\n description: resolveShorthand(description),\n action: resolveShorthand(action),\n };\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,qBAAqB,EAAEC,gBAAgB,EAAEC,KAAK,QAAQ;AAE/D,SAASC,uBAAuB,QAAQ;AACxC,SAASC,oBAAoB,QAAQ;AAErC;;;;;;;;;AASA,OAAO,MAAMC,sBAAA,GAAyBA,CAACC,KAAA,EAAwBC,GAAA,KAAiD;EAC9G,MAAM;IAAEC,KAAA;IAAOC,MAAA;IAAQC,WAAA;IAAaC;EAAM,CAAE,GAAGL,KAAA;EAE/C,MAAM;IACJM,mBAAA,EAAqB;MAAEC,WAAA;MAAaC;IAAc;EAAE,CACrD,GAAGX,uBAAA;EACJ,MAAMY,SAAA,GAAYhB,KAAA,CAAMiB,MAAM,CAAiB,IAAI;EAEnD,MAAMC,WAAA,GAAcf,KAAA,CAAME,oBAAA,CAAqBK,MAAM,EAAEI,WAAA;EAEvDd,KAAA,CAAMmB,SAAS,CAAC,MAAM;IACpB,IAAIT,MAAA,IAAUM,SAAA,CAAUI,OAAO,EAAE;MAC/B,MAAM;QAAEC;MAAE,CAAE,GAAGL,SAAA,CAAUI,OAAO;MAEhCL,cAAA,CAAeM,EAAA,GAAKA,EAAA,GAAKH,WAAW;IACtC;EACF,GAAG,CAACR,MAAA,EAAQK,cAAA,EAAgBG,WAAA,CAAY;EAExC,OAAO;IACLI,UAAA,EAAY;MACVC,IAAA,EAAM;MACNd,KAAA,EAAO;MACPC,MAAA,EAAQ;MACRC,WAAA,EAAa;MACbC,MAAA,EAAQ;IACV;IAEAW,IAAA,EAAMtB,qBAAA,CAAsB,OAAO;MACjCO,GAAA;MACA,GAAGD;IACL;IACAE,KAAA,EAAOP,gBAAA,CAAiBO,KAAA;IACxBC,MAAA,EAAQR,gBAAA,CAAiBQ,MAAA,EAAQ;MAC/Bc,QAAA,EAAU,IAAI;MACdC,YAAA,EAAc;QACZjB,GAAA,EAAKQ,SAAA;QACLK,EAAA,EAAIP;MACN;IACF;IACAH,WAAA,EAAaT,gBAAA,CAAiBS,WAAA;IAC9BC,MAAA,EAAQV,gBAAA,CAAiBU,MAAA;EAC3B;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","cardHeaderClassNames","root","image","header","description","action","cardHeaderCSSVars","cardHeaderGapVar","useStyles","Bkc6ea2","mc9l5x","t4k1zu","v29qe6","Bt984gj","t21cq0","Br312pm","Ijaq50","Frg6f3","d","useCardHeaderStyles_unstable","state","styles","className"],"sources":["../src/packages/react-components/react-card/src/components/CardHeader/useCardHeaderStyles.ts"],"sourcesContent":["import type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses } 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({\n root: {\n [cardHeaderCSSVars.cardHeaderGapVar]: '12px',\n display: 'grid',\n gridAutoColumns: 'min-content 1fr min-content',\n gridAutoRows: '1fr min-content',\n alignItems: 'center',\n },\n image: {\n display: 'inline-flex',\n marginRight: `var(${cardHeaderCSSVars.cardHeaderGapVar})`,\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 marginLeft: `var(${cardHeaderCSSVars.cardHeaderGapVar})`,\n gridColumnStart: '3',\n gridRowStart: 'span 2',\n },\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 state.root.className = mergeClasses(cardHeaderClassNames.root, styles.root, state.root.className);\n\n if (state.image) {\n state.image.className = mergeClasses(cardHeaderClassNames.image, styles.image, state.image.className);\n }\n\n if (state.header) {\n state.header.className = mergeClasses(cardHeaderClassNames.header, styles.header, state.header.className);\n }\n\n if (state.description) {\n state.description.className = mergeClasses(\n cardHeaderClassNames.description,\n styles.description,\n state.description.className,\n );\n }\n\n if (state.action) {\n state.action.className = mergeClasses(cardHeaderClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"],"mappings":"AACA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AAGzD;;;AAGA,OAAO,MAAMC,oBAAoB,GAAoC;EACnEC,IAAI,EAAE,gBAAgB;EACtBC,KAAK,EAAE,uBAAuB;EAC9BC,MAAM,EAAE,wBAAwB;EAChCC,WAAW,EAAE,6BAA6B;EAC1CC,MAAM,EAAE;CACT;AAED;;;AAGA,OAAO,MAAMC,iBAAiB,GAAG;EAC/BC,gBAAgB,EAAE;CACnB;AAED,MAAMC,SAAS,gBAAGV,QAAA;EAAAG,IAAA;IAAAQ,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAX,KAAA;IAAAQ,MAAA;IAAAI,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAb,MAAA;IAAAY,OAAA;IAAAC,MAAA;EAAA;EAAAZ,WAAA;IAAAW,OAAA;IAAAC,MAAA;EAAA;EAAAX,MAAA;IAAAY,MAAA;IAAAF,OAAA;IAAAC,MAAA;EAAA;AAAA;EAAAE,CAAA;AAAA,EA2BhB;AAEF;;;AAGA,OAAO,MAAMC,4BAA4B,GAAIC,KAAsB,IAAqB;EACtF,MAAMC,MAAM,GAAGb,SAAS,EAAE;EAC1BY,KAAK,CAACnB,IAAI,CAACqB,SAAS,GAAGvB,YAAY,CAACC,oBAAoB,CAACC,IAAI,EAAEoB,MAAM,CAACpB,IAAI,EAAEmB,KAAK,CAACnB,IAAI,CAACqB,SAAS,CAAC;EAEjG,IAAIF,KAAK,CAAClB,KAAK,EAAE;IACfkB,KAAK,CAAClB,KAAK,CAACoB,SAAS,GAAGvB,YAAY,CAACC,oBAAoB,CAACE,KAAK,EAAEmB,MAAM,CAACnB,KAAK,EAAEkB,KAAK,CAAClB,KAAK,CAACoB,SAAS,CAAC;;EAGvG,IAAIF,KAAK,CAACjB,MAAM,EAAE;IAChBiB,KAAK,CAACjB,MAAM,CAACmB,SAAS,GAAGvB,YAAY,CAACC,oBAAoB,CAACG,MAAM,EAAEkB,MAAM,CAAClB,MAAM,EAAEiB,KAAK,CAACjB,MAAM,CAACmB,SAAS,CAAC;;EAG3G,IAAIF,KAAK,CAAChB,WAAW,EAAE;IACrBgB,KAAK,CAAChB,WAAW,CAACkB,SAAS,GAAGvB,YAAY,CACxCC,oBAAoB,CAACI,WAAW,EAChCiB,MAAM,CAACjB,WAAW,EAClBgB,KAAK,CAAChB,WAAW,CAACkB,SAAS,CAC5B;;EAGH,IAAIF,KAAK,CAACf,MAAM,EAAE;IAChBe,KAAK,CAACf,MAAM,CAACiB,SAAS,GAAGvB,YAAY,CAACC,oBAAoB,CAACK,MAAM,EAAEgB,MAAM,CAAChB,MAAM,EAAEe,KAAK,CAACf,MAAM,CAACiB,SAAS,CAAC;;EAG3G,OAAOF,KAAK;AACd,CAAC"}
1
+ {"version":3,"names":["__styles","mergeClasses","cardHeaderClassNames","root","image","header","description","action","cardHeaderCSSVars","cardHeaderGapVar","useStyles","Bkc6ea2","mc9l5x","t4k1zu","v29qe6","Bt984gj","t21cq0","Br312pm","Ijaq50","Frg6f3","d","useCardHeaderStyles_unstable","state","styles","className"],"sources":["../../../src/components/CardHeader/useCardHeaderStyles.ts"],"sourcesContent":["import type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses } 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({\n root: {\n [cardHeaderCSSVars.cardHeaderGapVar]: '12px',\n display: 'grid',\n gridAutoColumns: 'min-content 1fr min-content',\n gridAutoRows: '1fr min-content',\n alignItems: 'center',\n },\n image: {\n display: 'inline-flex',\n marginRight: `var(${cardHeaderCSSVars.cardHeaderGapVar})`,\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 marginLeft: `var(${cardHeaderCSSVars.cardHeaderGapVar})`,\n gridColumnStart: '3',\n gridRowStart: 'span 2',\n },\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 state.root.className = mergeClasses(cardHeaderClassNames.root, styles.root, state.root.className);\n\n if (state.image) {\n state.image.className = mergeClasses(cardHeaderClassNames.image, styles.image, state.image.className);\n }\n\n if (state.header) {\n state.header.className = mergeClasses(cardHeaderClassNames.header, styles.header, state.header.className);\n }\n\n if (state.description) {\n state.description.className = mergeClasses(\n cardHeaderClassNames.description,\n styles.description,\n state.description.className,\n );\n }\n\n if (state.action) {\n state.action.className = mergeClasses(cardHeaderClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"],"mappings":"AACA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ;AAGzC;;;AAGA,OAAO,MAAMC,oBAAA,GAAwD;EACnEC,IAAA,EAAM;EACNC,KAAA,EAAO;EACPC,MAAA,EAAQ;EACRC,WAAA,EAAa;EACbC,MAAA,EAAQ;AACV;AAEA;;;AAGA,OAAO,MAAMC,iBAAA,GAAoB;EAC/BC,gBAAA,EAAkB;AACpB;AAEA,MAAMC,SAAA,gBAAYV,QAAA;EAAAG,IAAA;IAAAQ,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAX,KAAA;IAAAQ,MAAA;IAAAI,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAb,MAAA;IAAAY,OAAA;IAAAC,MAAA;EAAA;EAAAZ,WAAA;IAAAW,OAAA;IAAAC,MAAA;EAAA;EAAAX,MAAA;IAAAY,MAAA;IAAAF,OAAA;IAAAC,MAAA;EAAA;AAAA;EAAAE,CAAA;AAAA,EA2BlB;AAEA;;;AAGA,OAAO,MAAMC,4BAAA,GAAgCC,KAAA,IAA4C;EACvF,MAAMC,MAAA,GAASb,SAAA;EACfY,KAAA,CAAMnB,IAAI,CAACqB,SAAS,GAAGvB,YAAA,CAAaC,oBAAA,CAAqBC,IAAI,EAAEoB,MAAA,CAAOpB,IAAI,EAAEmB,KAAA,CAAMnB,IAAI,CAACqB,SAAS;EAEhG,IAAIF,KAAA,CAAMlB,KAAK,EAAE;IACfkB,KAAA,CAAMlB,KAAK,CAACoB,SAAS,GAAGvB,YAAA,CAAaC,oBAAA,CAAqBE,KAAK,EAAEmB,MAAA,CAAOnB,KAAK,EAAEkB,KAAA,CAAMlB,KAAK,CAACoB,SAAS;EACtG;EAEA,IAAIF,KAAA,CAAMjB,MAAM,EAAE;IAChBiB,KAAA,CAAMjB,MAAM,CAACmB,SAAS,GAAGvB,YAAA,CAAaC,oBAAA,CAAqBG,MAAM,EAAEkB,MAAA,CAAOlB,MAAM,EAAEiB,KAAA,CAAMjB,MAAM,CAACmB,SAAS;EAC1G;EAEA,IAAIF,KAAA,CAAMhB,WAAW,EAAE;IACrBgB,KAAA,CAAMhB,WAAW,CAACkB,SAAS,GAAGvB,YAAA,CAC5BC,oBAAA,CAAqBI,WAAW,EAChCiB,MAAA,CAAOjB,WAAW,EAClBgB,KAAA,CAAMhB,WAAW,CAACkB,SAAS;EAE/B;EAEA,IAAIF,KAAA,CAAMf,MAAM,EAAE;IAChBe,KAAA,CAAMf,MAAM,CAACiB,SAAS,GAAGvB,YAAA,CAAaC,oBAAA,CAAqBK,MAAM,EAAEgB,MAAA,CAAOhB,MAAM,EAAEe,KAAA,CAAMf,MAAM,CAACiB,SAAS;EAC1G;EAEA,OAAOF,KAAA;AACT"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCardPreview_unstable","renderCardPreview_unstable","useCardPreviewStyles_unstable","CardPreview","forwardRef","props","ref","state","displayName"],"sources":["../src/packages/react-components/react-card/src/components/CardPreview/CardPreview.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCardPreview_unstable } from './useCardPreview';\nimport { renderCardPreview_unstable } from './renderCardPreview';\nimport { useCardPreviewStyles_unstable } from './useCardPreviewStyles';\nimport type { CardPreviewProps } from './CardPreview.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\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 return renderCardPreview_unstable(state);\n});\n\nCardPreview.displayName = 'CardPreview';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,uBAAuB,QAAQ,kBAAkB;AAC1D,SAASC,0BAA0B,QAAQ,qBAAqB;AAChE,SAASC,6BAA6B,QAAQ,wBAAwB;AAItE;;;AAGA,OAAO,MAAMC,WAAW,gBAA0CJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAChG,MAAMC,KAAK,GAAGP,uBAAuB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAEjDJ,6BAA6B,CAACK,KAAK,CAAC;EACpC,OAAON,0BAA0B,CAACM,KAAK,CAAC;AAC1C,CAAC,CAAC;AAEFJ,WAAW,CAACK,WAAW,GAAG,aAAa"}
1
+ {"version":3,"names":["React","useCardPreview_unstable","renderCardPreview_unstable","useCardPreviewStyles_unstable","CardPreview","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/CardPreview/CardPreview.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCardPreview_unstable } from './useCardPreview';\nimport { renderCardPreview_unstable } from './renderCardPreview';\nimport { useCardPreviewStyles_unstable } from './useCardPreviewStyles';\nimport type { CardPreviewProps } from './CardPreview.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\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 return renderCardPreview_unstable(state);\n});\n\nCardPreview.displayName = 'CardPreview';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,uBAAuB,QAAQ;AACxC,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,6BAA6B,QAAQ;AAI9C;;;AAGA,OAAO,MAAMC,WAAA,gBAAqDJ,KAAA,CAAMK,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACjG,MAAMC,KAAA,GAAQP,uBAAA,CAAwBK,KAAA,EAAOC,GAAA;EAE7CJ,6BAAA,CAA8BK,KAAA;EAC9B,OAAON,0BAAA,CAA2BM,KAAA;AACpC;AAEAJ,WAAA,CAAYK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"CardPreview.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-card/src/components/CardPreview/CardPreview.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Slots available in the Card component.\n */\nexport type CardPreviewSlots = {\n /**\n * Root element of the component.\n */\n root: Slot<'div'>;\n\n /**\n * Container that holds a logo related to the image preview provided.\n */\n logo?: Slot<'div', 'img'>;\n};\n\n/**\n * CardPreview component props.\n */\nexport type CardPreviewProps = ComponentProps<CardPreviewSlots>;\n\n/**\n * State used in rendering CardPreview.\n */\nexport type CardPreviewState = ComponentState<CardPreviewSlots>;\n"]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/CardPreview/CardPreview.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Slots available in the Card component.\n */\nexport type CardPreviewSlots = {\n /**\n * Root element of the component.\n */\n root: Slot<'div'>;\n\n /**\n * Container that holds a logo related to the image preview provided.\n */\n logo?: Slot<'div', 'img'>;\n};\n\n/**\n * CardPreview component props.\n */\nexport type CardPreviewProps = ComponentProps<CardPreviewSlots>;\n\n/**\n * State used in rendering CardPreview.\n */\nexport type CardPreviewState = ComponentState<CardPreviewSlots>;\n"],"mappings":"AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-card/src/components/CardPreview/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC","sourcesContent":["export * from './CardPreview';\nexport * from './CardPreview.types';\nexport * from './renderCardPreview';\nexport * from './useCardPreview';\nexport * from './useCardPreviewStyles';\n"]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/CardPreview/index.ts"],"sourcesContent":["export * from './CardPreview';\nexport * from './CardPreview.types';\nexport * from './renderCardPreview';\nexport * from './useCardPreview';\nexport * from './useCardPreviewStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
@@ -8,10 +8,6 @@ export const renderCardPreview_unstable = state => {
8
8
  slots,
9
9
  slotProps
10
10
  } = getSlots(state);
11
- return /*#__PURE__*/React.createElement(slots.root, {
12
- ...slotProps.root
13
- }, slotProps.root.children, slots.logo && /*#__PURE__*/React.createElement(slots.logo, {
14
- ...slotProps.logo
15
- }));
11
+ return /*#__PURE__*/React.createElement(slots.root, slotProps.root, slotProps.root.children, slots.logo && /*#__PURE__*/React.createElement(slots.logo, slotProps.logo));
16
12
  };
17
13
  //# sourceMappingURL=renderCardPreview.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","getSlots","renderCardPreview_unstable","state","slots","slotProps","createElement","root","children","logo"],"sources":["../src/packages/react-components/react-card/src/components/CardPreview/renderCardPreview.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CardPreviewSlots, CardPreviewState } from './CardPreview.types';\n\n/**\n * Render the final JSX of CardPreview.\n */\nexport const renderCardPreview_unstable = (state: CardPreviewState) => {\n const { slots, slotProps } = getSlots<CardPreviewSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slotProps.root.children}\n {slots.logo && <slots.logo {...slotProps.logo} />}\n </slots.root>\n );\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,0BAA0B,GAAIC,KAAuB,IAAI;EACpE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAmBE,KAAK,CAAC;EAE9D,oBACEH,KAAA,CAAAM,aAAA,CAACF,KAAK,CAACG,IAAI;IAAA,GAAKF,SAAS,CAACE;EAAI,GAC3BF,SAAS,CAACE,IAAI,CAACC,QAAQ,EACvBJ,KAAK,CAACK,IAAI,iBAAIT,KAAA,CAAAM,aAAA,CAACF,KAAK,CAACK,IAAI;IAAA,GAAKJ,SAAS,CAACI;EAAI,EAAI,CACtC;AAEjB,CAAC"}
1
+ {"version":3,"names":["React","getSlots","renderCardPreview_unstable","state","slots","slotProps","createElement","root","children","logo"],"sources":["../../../src/components/CardPreview/renderCardPreview.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CardPreviewSlots, CardPreviewState } from './CardPreview.types';\n\n/**\n * Render the final JSX of CardPreview.\n */\nexport const renderCardPreview_unstable = (state: CardPreviewState) => {\n const { slots, slotProps } = getSlots<CardPreviewSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slotProps.root.children}\n {slots.logo && <slots.logo {...slotProps.logo} />}\n </slots.root>\n );\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,QAAQ,QAAQ;AAGzB;;;AAGA,OAAO,MAAMC,0BAAA,GAA8BC,KAAA,IAA4B;EACrE,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGJ,QAAA,CAA2BE,KAAA;EAExD,oBACEH,KAAA,CAAAM,aAAA,CAACF,KAAA,CAAMG,IAAI,EAAKF,SAAA,CAAUE,IAAI,EAC3BF,SAAA,CAAUE,IAAI,CAACC,QAAQ,EACvBJ,KAAA,CAAMK,IAAI,iBAAIT,KAAA,CAAAM,aAAA,CAACF,KAAA,CAAMK,IAAI,EAAKJ,SAAA,CAAUI,IAAI;AAGnD"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","getNativeElementProps","resolveShorthand","useMergedRefs","useCardContext_unstable","cardPreviewClassNames","useCardPreview_unstable","props","ref","logo","selectableA11yProps","referenceLabel","referenceId","setReferenceLabel","setReferenceId","previewRef","useRef","useEffect","current","parentNode","img","querySelector","root","ariaLabel","getAttribute","ariaDescribedby","alt","components"],"sources":["../src/packages/react-components/react-card/src/components/CardPreview/useCardPreview.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useMergedRefs } from '@fluentui/react-utilities';\nimport type { CardPreviewProps, CardPreviewState } from './CardPreview.types';\nimport { useCardContext_unstable } from '../Card/CardContext';\nimport { cardPreviewClassNames } from './useCardPreviewStyles';\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 const { logo } = props;\n\n const {\n selectableA11yProps: { referenceLabel, referenceId, setReferenceLabel, setReferenceId },\n } = useCardContext_unstable();\n const previewRef = useMergedRefs(ref, 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>(`.${cardPreviewClassNames.root} > 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: getNativeElementProps('div', {\n ref: previewRef,\n ...props,\n }),\n logo: resolveShorthand(logo),\n };\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,qBAAqB,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,2BAA2B;AAElG,SAASC,uBAAuB,QAAQ,qBAAqB;AAC7D,SAASC,qBAAqB,QAAQ,wBAAwB;AAE9D;;;;;;;;;AASA,OAAO,MAAMC,uBAAuB,GAAGA,CAACC,KAAuB,EAAEC,GAA2B,KAAsB;EAChH,MAAM;IAAEC;EAAI,CAAE,GAAGF,KAAK;EAEtB,MAAM;IACJG,mBAAmB,EAAE;MAAEC,cAAc;MAAEC,WAAW;MAAEC,iBAAiB;MAAEC;IAAc;EAAE,CACxF,GAAGV,uBAAuB,EAAE;EAC7B,MAAMW,UAAU,GAAGZ,aAAa,CAACK,GAAG,EAAER,KAAK,CAACgB,MAAM,CAAiB,IAAI,CAAC,CAAC;EAEzEhB,KAAK,CAACiB,SAAS,CAAC,MAAK;IACnB,IAAIN,cAAc,IAAIC,WAAW,EAAE;MACjC;;IAGF,IAAIG,UAAU,CAACG,OAAO,IAAIH,UAAU,CAACG,OAAO,CAACC,UAAU,EAAE;MACvD,MAAMC,GAAG,GAAGL,UAAU,CAACG,OAAO,CAACC,UAAU,CAACE,aAAa,CAAmB,IAAIhB,qBAAqB,CAACiB,IAAI,QAAQ,CAAC;MAEjH,IAAIF,GAAG,EAAE;QACP,MAAMG,SAAS,GAAGH,GAAG,CAACI,YAAY,CAAC,YAAY,CAAC;QAChD,MAAMC,eAAe,GAAGL,GAAG,CAACI,YAAY,CAAC,kBAAkB,CAAC;QAE5D,IAAIC,eAAe,EAAE;UACnBX,cAAc,CAACW,eAAe,CAAC;SAChC,MAAM,IAAIL,GAAG,CAACM,GAAG,EAAE;UAClBb,iBAAiB,CAACO,GAAG,CAACM,GAAG,CAAC;SAC3B,MAAM,IAAIH,SAAS,EAAE;UACpBV,iBAAiB,CAACU,SAAS,CAAC;;;;EAIpC,CAAC,EAAE,CAACV,iBAAiB,EAAEF,cAAc,EAAEI,UAAU,EAAEH,WAAW,EAAEE,cAAc,CAAC,CAAC;EAEhF,OAAO;IACLa,UAAU,EAAE;MACVL,IAAI,EAAE,KAAK;MACXb,IAAI,EAAE;KACP;IAEDa,IAAI,EAAErB,qBAAqB,CAAC,KAAK,EAAE;MACjCO,GAAG,EAAEO,UAAU;MACf,GAAGR;KACJ,CAAC;IACFE,IAAI,EAAEP,gBAAgB,CAACO,IAAI;GAC5B;AACH,CAAC"}
1
+ {"version":3,"names":["React","getNativeElementProps","resolveShorthand","useMergedRefs","useCardContext_unstable","cardPreviewClassNames","useCardPreview_unstable","props","ref","logo","selectableA11yProps","referenceLabel","referenceId","setReferenceLabel","setReferenceId","previewRef","useRef","useEffect","current","parentNode","img","querySelector","root","ariaLabel","getAttribute","ariaDescribedby","alt","components"],"sources":["../../../src/components/CardPreview/useCardPreview.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useMergedRefs } from '@fluentui/react-utilities';\nimport type { CardPreviewProps, CardPreviewState } from './CardPreview.types';\nimport { useCardContext_unstable } from '../Card/CardContext';\nimport { cardPreviewClassNames } from './useCardPreviewStyles';\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 const { logo } = props;\n\n const {\n selectableA11yProps: { referenceLabel, referenceId, setReferenceLabel, setReferenceId },\n } = useCardContext_unstable();\n const previewRef = useMergedRefs(ref, 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>(`.${cardPreviewClassNames.root} > 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: getNativeElementProps('div', {\n ref: previewRef,\n ...props,\n }),\n logo: resolveShorthand(logo),\n };\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,qBAAqB,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ;AAEvE,SAASC,uBAAuB,QAAQ;AACxC,SAASC,qBAAqB,QAAQ;AAEtC;;;;;;;;;AASA,OAAO,MAAMC,uBAAA,GAA0BA,CAACC,KAAA,EAAyBC,GAAA,KAAkD;EACjH,MAAM;IAAEC;EAAI,CAAE,GAAGF,KAAA;EAEjB,MAAM;IACJG,mBAAA,EAAqB;MAAEC,cAAA;MAAgBC,WAAA;MAAaC,iBAAA;MAAmBC;IAAc;EAAE,CACxF,GAAGV,uBAAA;EACJ,MAAMW,UAAA,GAAaZ,aAAA,CAAcK,GAAA,EAAKR,KAAA,CAAMgB,MAAM,CAAiB,IAAI;EAEvEhB,KAAA,CAAMiB,SAAS,CAAC,MAAM;IACpB,IAAIN,cAAA,IAAkBC,WAAA,EAAa;MACjC;IACF;IAEA,IAAIG,UAAA,CAAWG,OAAO,IAAIH,UAAA,CAAWG,OAAO,CAACC,UAAU,EAAE;MACvD,MAAMC,GAAA,GAAML,UAAA,CAAWG,OAAO,CAACC,UAAU,CAACE,aAAa,CAAoB,IAAGhB,qBAAA,CAAsBiB,IAAK,QAAO;MAEhH,IAAIF,GAAA,EAAK;QACP,MAAMG,SAAA,GAAYH,GAAA,CAAII,YAAY,CAAC;QACnC,MAAMC,eAAA,GAAkBL,GAAA,CAAII,YAAY,CAAC;QAEzC,IAAIC,eAAA,EAAiB;UACnBX,cAAA,CAAeW,eAAA;QACjB,OAAO,IAAIL,GAAA,CAAIM,GAAG,EAAE;UAClBb,iBAAA,CAAkBO,GAAA,CAAIM,GAAG;QAC3B,OAAO,IAAIH,SAAA,EAAW;UACpBV,iBAAA,CAAkBU,SAAA;QACpB;MACF;IACF;EACF,GAAG,CAACV,iBAAA,EAAmBF,cAAA,EAAgBI,UAAA,EAAYH,WAAA,EAAaE,cAAA,CAAe;EAE/E,OAAO;IACLa,UAAA,EAAY;MACVL,IAAA,EAAM;MACNb,IAAA,EAAM;IACR;IAEAa,IAAA,EAAMrB,qBAAA,CAAsB,OAAO;MACjCO,GAAA,EAAKO,UAAA;MACL,GAAGR;IACL;IACAE,IAAA,EAAMP,gBAAA,CAAiBO,IAAA;EACzB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","cardPreviewClassNames","root","logo","useStyles","qhf8xq","pnb5jt","Elg2ur","B184ckt","B5kzvoi","oyh7mz","a9b677","Bqenvij","d","useCardPreviewStyles_unstable","state","styles","className"],"sources":["../src/packages/react-components/react-card/src/components/CardPreview/useCardPreviewStyles.ts"],"sourcesContent":["import type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { CardPreviewSlots, CardPreviewState } from './CardPreview.types';\n\n/**\n * Static CSS class names used internally for the component slots.\n */\nexport const cardPreviewClassNames: SlotClassNames<CardPreviewSlots> = {\n root: 'fui-CardPreview',\n logo: 'fui-CardPreview__logo',\n};\n\nconst useStyles = makeStyles({\n root: {\n position: 'relative',\n\n [`> :not(.${cardPreviewClassNames.logo})`]: {\n display: 'block',\n height: '100%',\n width: '100%',\n },\n },\n\n logo: {\n position: 'absolute',\n bottom: '12px',\n left: '12px',\n width: '32px',\n height: '32px',\n },\n});\n\n/**\n * Apply styling to the CardPreview slots based on the state.\n */\nexport const useCardPreviewStyles_unstable = (state: CardPreviewState): CardPreviewState => {\n const styles = useStyles();\n state.root.className = mergeClasses(cardPreviewClassNames.root, styles.root, state.root.className);\n\n if (state.logo) {\n state.logo.className = mergeClasses(cardPreviewClassNames.logo, styles.logo, state.logo.className);\n }\n\n return state;\n};\n"],"mappings":"AACA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AAGzD;;;AAGA,OAAO,MAAMC,qBAAqB,GAAqC;EACrEC,IAAI,EAAE,iBAAiB;EACvBC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,gBAAGL,QAAA;EAAAG,IAAA;IAAAG,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAL,IAAA;IAAAE,MAAA;IAAAI,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAkBhB;AAEF;;;AAGA,OAAO,MAAMC,6BAA6B,GAAIC,KAAuB,IAAsB;EACzF,MAAMC,MAAM,GAAGZ,SAAS,EAAE;EAC1BW,KAAK,CAACb,IAAI,CAACe,SAAS,GAAGjB,YAAY,CAACC,qBAAqB,CAACC,IAAI,EAAEc,MAAM,CAACd,IAAI,EAAEa,KAAK,CAACb,IAAI,CAACe,SAAS,CAAC;EAElG,IAAIF,KAAK,CAACZ,IAAI,EAAE;IACdY,KAAK,CAACZ,IAAI,CAACc,SAAS,GAAGjB,YAAY,CAACC,qBAAqB,CAACE,IAAI,EAAEa,MAAM,CAACb,IAAI,EAAEY,KAAK,CAACZ,IAAI,CAACc,SAAS,CAAC;;EAGpG,OAAOF,KAAK;AACd,CAAC"}
1
+ {"version":3,"names":["__styles","mergeClasses","cardPreviewClassNames","root","logo","useStyles","qhf8xq","pnb5jt","Elg2ur","B184ckt","B5kzvoi","oyh7mz","a9b677","Bqenvij","d","useCardPreviewStyles_unstable","state","styles","className"],"sources":["../../../src/components/CardPreview/useCardPreviewStyles.ts"],"sourcesContent":["import type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { CardPreviewSlots, CardPreviewState } from './CardPreview.types';\n\n/**\n * Static CSS class names used internally for the component slots.\n */\nexport const cardPreviewClassNames: SlotClassNames<CardPreviewSlots> = {\n root: 'fui-CardPreview',\n logo: 'fui-CardPreview__logo',\n};\n\nconst useStyles = makeStyles({\n root: {\n position: 'relative',\n\n [`> :not(.${cardPreviewClassNames.logo})`]: {\n display: 'block',\n height: '100%',\n width: '100%',\n },\n },\n\n logo: {\n position: 'absolute',\n bottom: '12px',\n left: '12px',\n width: '32px',\n height: '32px',\n },\n});\n\n/**\n * Apply styling to the CardPreview slots based on the state.\n */\nexport const useCardPreviewStyles_unstable = (state: CardPreviewState): CardPreviewState => {\n const styles = useStyles();\n state.root.className = mergeClasses(cardPreviewClassNames.root, styles.root, state.root.className);\n\n if (state.logo) {\n state.logo.className = mergeClasses(cardPreviewClassNames.logo, styles.logo, state.logo.className);\n }\n\n return state;\n};\n"],"mappings":"AACA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ;AAGzC;;;AAGA,OAAO,MAAMC,qBAAA,GAA0D;EACrEC,IAAA,EAAM;EACNC,IAAA,EAAM;AACR;AAEA,MAAMC,SAAA,gBAAYL,QAAA;EAAAG,IAAA;IAAAG,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAL,IAAA;IAAAE,MAAA;IAAAI,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAkBlB;AAEA;;;AAGA,OAAO,MAAMC,6BAAA,GAAiCC,KAAA,IAA8C;EAC1F,MAAMC,MAAA,GAASZ,SAAA;EACfW,KAAA,CAAMb,IAAI,CAACe,SAAS,GAAGjB,YAAA,CAAaC,qBAAA,CAAsBC,IAAI,EAAEc,MAAA,CAAOd,IAAI,EAAEa,KAAA,CAAMb,IAAI,CAACe,SAAS;EAEjG,IAAIF,KAAA,CAAMZ,IAAI,EAAE;IACdY,KAAA,CAAMZ,IAAI,CAACc,SAAS,GAAGjB,YAAA,CAAaC,qBAAA,CAAsBE,IAAI,EAAEa,MAAA,CAAOb,IAAI,EAAEY,KAAA,CAAMZ,IAAI,CAACc,SAAS;EACnG;EAEA,OAAOF,KAAA;AACT"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["Card","cardClassNames","cardCSSVars","renderCard_unstable","useCardStyles_unstable","useCard_unstable","CardFooter","cardFooterClassNames","renderCardFooter_unstable","useCardFooterStyles_unstable","useCardFooter_unstable","CardHeader","cardHeaderClassNames","cardHeaderCSSVars","renderCardHeader_unstable","useCardHeaderStyles_unstable","useCardHeader_unstable","CardPreview","cardPreviewClassNames","renderCardPreview_unstable","useCardPreviewStyles_unstable","useCardPreview_unstable","CardProvider","useCardContext_unstable"],"sources":["../src/packages/react-components/react-card/src/index.ts"],"sourcesContent":["export {\n Card,\n cardClassNames,\n cardCSSVars,\n renderCard_unstable,\n useCardStyles_unstable,\n useCard_unstable,\n} from './Card';\nexport type { CardProps, CardSlots, CardState, CardOnSelectionChangeEvent } from './Card';\nexport {\n CardFooter,\n cardFooterClassNames,\n renderCardFooter_unstable,\n useCardFooterStyles_unstable,\n useCardFooter_unstable,\n} from './CardFooter';\nexport type { CardFooterProps, CardFooterSlots, CardFooterState } from './CardFooter';\nexport {\n CardHeader,\n cardHeaderClassNames,\n cardHeaderCSSVars,\n renderCardHeader_unstable,\n useCardHeaderStyles_unstable,\n useCardHeader_unstable,\n} from './CardHeader';\nexport type { CardHeaderProps, CardHeaderSlots, CardHeaderState } from './CardHeader';\nexport {\n CardPreview,\n cardPreviewClassNames,\n renderCardPreview_unstable,\n useCardPreviewStyles_unstable,\n useCardPreview_unstable,\n} from './CardPreview';\nexport type { CardPreviewProps, CardPreviewSlots, CardPreviewState } from './CardPreview';\nexport { CardProvider, useCardContext_unstable } from './Card';\nexport type { CardContextValue } from './Card';\n"],"mappings":"AAAA,SACEA,IAAI,EACJC,cAAc,EACdC,WAAW,EACXC,mBAAmB,EACnBC,sBAAsB,EACtBC,gBAAgB,QACX,QAAQ;AAEf,SACEC,UAAU,EACVC,oBAAoB,EACpBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,QACjB,cAAc;AAErB,SACEC,UAAU,EACVC,oBAAoB,EACpBC,iBAAiB,EACjBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,QACjB,cAAc;AAErB,SACEC,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,QAClB,eAAe;AAEtB,SAASC,YAAY,EAAEC,uBAAuB,QAAQ,QAAQ"}
1
+ {"version":3,"names":["Card","cardClassNames","cardCSSVars","renderCard_unstable","useCardStyles_unstable","useCard_unstable","CardFooter","cardFooterClassNames","renderCardFooter_unstable","useCardFooterStyles_unstable","useCardFooter_unstable","CardHeader","cardHeaderClassNames","cardHeaderCSSVars","renderCardHeader_unstable","useCardHeaderStyles_unstable","useCardHeader_unstable","CardPreview","cardPreviewClassNames","renderCardPreview_unstable","useCardPreviewStyles_unstable","useCardPreview_unstable","CardProvider","useCardContext_unstable"],"sources":["../src/index.ts"],"sourcesContent":["export {\n Card,\n cardClassNames,\n cardCSSVars,\n renderCard_unstable,\n useCardStyles_unstable,\n useCard_unstable,\n} from './Card';\nexport type { CardProps, CardSlots, CardState, CardOnSelectionChangeEvent } from './Card';\nexport {\n CardFooter,\n cardFooterClassNames,\n renderCardFooter_unstable,\n useCardFooterStyles_unstable,\n useCardFooter_unstable,\n} from './CardFooter';\nexport type { CardFooterProps, CardFooterSlots, CardFooterState } from './CardFooter';\nexport {\n CardHeader,\n cardHeaderClassNames,\n cardHeaderCSSVars,\n renderCardHeader_unstable,\n useCardHeaderStyles_unstable,\n useCardHeader_unstable,\n} from './CardHeader';\nexport type { CardHeaderProps, CardHeaderSlots, CardHeaderState } from './CardHeader';\nexport {\n CardPreview,\n cardPreviewClassNames,\n renderCardPreview_unstable,\n useCardPreviewStyles_unstable,\n useCardPreview_unstable,\n} from './CardPreview';\nexport type { CardPreviewProps, CardPreviewSlots, CardPreviewState } from './CardPreview';\nexport { CardProvider, useCardContext_unstable } from './Card';\nexport type { CardContextValue } from './Card';\n"],"mappings":"AAAA,SACEA,IAAI,EACJC,cAAc,EACdC,WAAW,EACXC,mBAAmB,EACnBC,sBAAsB,EACtBC,gBAAgB,QACX;AAEP,SACEC,UAAU,EACVC,oBAAoB,EACpBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,QACjB;AAEP,SACEC,UAAU,EACVC,oBAAoB,EACpBC,iBAAiB,EACjBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,QACjB;AAEP,SACEC,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,QAClB;AAEP,SAASC,YAAY,EAAEC,uBAAuB,QAAQ"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./components/Card/index"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./components/Card/index"), exports);
7
+ //# sourceMappingURL=Card.js.map
8
+
8
9
  //# sourceMappingURL=Card.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-card/src/Card.ts"],"sourcesContent":["export * from './components/Card/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,6BAAAC,OAAA"}
1
+ {"version":3,"sources":["../lib/Card.js"],"sourcesContent":["export * from './components/Card/index';\n//# sourceMappingURL=Card.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,gCAAgC"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./components/CardFooter/index"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./components/CardFooter/index"), exports);
7
+ //# sourceMappingURL=CardFooter.js.map
8
+
8
9
  //# sourceMappingURL=CardFooter.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-card/src/CardFooter.ts"],"sourcesContent":["export * from './components/CardFooter/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,mCAAAC,OAAA"}
1
+ {"version":3,"sources":["../lib/CardFooter.js"],"sourcesContent":["export * from './components/CardFooter/index';\n//# sourceMappingURL=CardFooter.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,sCAAsC"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./components/CardHeader/index"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./components/CardHeader/index"), exports);
7
+ //# sourceMappingURL=CardHeader.js.map
8
+
8
9
  //# sourceMappingURL=CardHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-card/src/CardHeader.ts"],"sourcesContent":["export * from './components/CardHeader/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,mCAAAC,OAAA"}
1
+ {"version":3,"sources":["../lib/CardHeader.js"],"sourcesContent":["export * from './components/CardHeader/index';\n//# sourceMappingURL=CardHeader.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,sCAAsC"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./components/CardPreview/index"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./components/CardPreview/index"), exports);
7
+ //# sourceMappingURL=CardPreview.js.map
8
+
8
9
  //# sourceMappingURL=CardPreview.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-card/src/CardPreview.ts"],"sourcesContent":["export * from './components/CardPreview/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,oCAAAC,OAAA"}
1
+ {"version":3,"sources":["../lib/CardPreview.js"],"sourcesContent":["export * from './components/CardPreview/index';\n//# sourceMappingURL=CardPreview.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,uCAAuC"}
@@ -1,22 +1,23 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Card", {
6
+ enumerable: true,
7
+ get: ()=>Card
5
8
  });
6
- exports.Card = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const useCard_1 = /*#__PURE__*/require("./useCard");
9
- const renderCard_1 = /*#__PURE__*/require("./renderCard");
10
- const useCardStyles_1 = /*#__PURE__*/require("./useCardStyles");
11
- const useCardContextValue_1 = /*#__PURE__*/require("./useCardContextValue");
12
- /**
13
- * A card provides scaffolding for hosting actions and content for a single topic.
14
- */
15
- exports.Card = /*#__PURE__*/React.forwardRef((props, ref) => {
16
- const state = useCard_1.useCard_unstable(props, ref);
17
- const cardContextValue = useCardContextValue_1.useCardContextValue(state);
18
- useCardStyles_1.useCardStyles_unstable(state);
19
- return renderCard_1.renderCard_unstable(state, cardContextValue);
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _useCard = require("./useCard");
12
+ const _renderCard = require("./renderCard");
13
+ const _useCardStyles = require("./useCardStyles");
14
+ const _useCardContextValue = require("./useCardContextValue");
15
+ const Card = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
16
+ const state = (0, _useCard.useCard_unstable)(props, ref);
17
+ const cardContextValue = (0, _useCardContextValue.useCardContextValue)(state);
18
+ (0, _useCardStyles.useCardStyles_unstable)(state);
19
+ return (0, _renderCard.renderCard_unstable)(state, cardContextValue);
20
20
  });
21
- exports.Card.displayName = 'Card';
21
+ Card.displayName = 'Card'; //# sourceMappingURL=Card.js.map
22
+
22
23
  //# sourceMappingURL=Card.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","useCard_1","renderCard_1","useCardStyles_1","useCardContextValue_1","exports","Card","forwardRef","props","ref","state","useCard_unstable","cardContextValue","useCardContextValue","useCardStyles_unstable","renderCard_unstable","displayName"],"sources":["../src/packages/react-components/react-card/src/components/Card/Card.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCard_unstable } from './useCard';\nimport { renderCard_unstable } from './renderCard';\nimport { useCardStyles_unstable } from './useCardStyles';\nimport type { CardProps } from './Card.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCardContextValue } from './useCardContextValue';\n\n/**\n * A card provides scaffolding for hosting actions and content for a single topic.\n */\nexport const Card: ForwardRefComponent<CardProps> = React.forwardRef<HTMLDivElement>((props, ref) => {\n const state = useCard_unstable(props, ref);\n const cardContextValue = useCardContextValue(state);\n\n useCardStyles_unstable(state);\n return renderCard_unstable(state, cardContextValue);\n});\n\nCard.displayName = 'Card';\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,SAAA,gBAAAD,OAAA;AACA,MAAAE,YAAA,gBAAAF,OAAA;AACA,MAAAG,eAAA,gBAAAH,OAAA;AAGA,MAAAI,qBAAA,gBAAAJ,OAAA;AAEA;;;AAGaK,OAAA,CAAAC,IAAI,gBAAmCP,KAAK,CAACQ,UAAU,CAAiB,CAACC,KAAK,EAAEC,GAAG,KAAI;EAClG,MAAMC,KAAK,GAAGT,SAAA,CAAAU,gBAAgB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAC1C,MAAMG,gBAAgB,GAAGR,qBAAA,CAAAS,mBAAmB,CAACH,KAAK,CAAC;EAEnDP,eAAA,CAAAW,sBAAsB,CAACJ,KAAK,CAAC;EAC7B,OAAOR,YAAA,CAAAa,mBAAmB,CAACL,KAAK,EAAEE,gBAAgB,CAAC;AACrD,CAAC,CAAC;AAEFP,OAAA,CAAAC,IAAI,CAACU,WAAW,GAAG,MAAM"}
1
+ {"version":3,"sources":["../../../lib/components/Card/Card.js"],"sourcesContent":["import * as React from 'react';\nimport { useCard_unstable } from './useCard';\nimport { renderCard_unstable } from './renderCard';\nimport { useCardStyles_unstable } from './useCardStyles';\nimport { useCardContextValue } from './useCardContextValue';\n/**\n * A card provides scaffolding for hosting actions and content for a single topic.\n */\nexport const Card = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useCard_unstable(props, ref);\n const cardContextValue = useCardContextValue(state);\n useCardStyles_unstable(state);\n return renderCard_unstable(state, cardContextValue);\n});\nCard.displayName = 'Card';\n//# sourceMappingURL=Card.js.map"],"names":["Card","React","forwardRef","props","ref","state","useCard_unstable","cardContextValue","useCardContextValue","useCardStyles_unstable","renderCard_unstable","displayName"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;yBACU;4BACG;+BACG;qCACH;AAI7B,MAAMA,OAAO,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAChE,MAAMC,QAAQC,IAAAA,yBAAgB,EAACH,OAAOC;IACtC,MAAMG,mBAAmBC,IAAAA,wCAAmB,EAACH;IAC7CI,IAAAA,qCAAsB,EAACJ;IACvB,OAAOK,IAAAA,+BAAmB,EAACL,OAAOE;AACpC;AACAP,KAAKW,WAAW,GAAG,QACnB,gCAAgC"}
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
5
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
6
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
7
+ //# sourceMappingURL=Card.types.js.map
8
+
6
9
  //# sourceMappingURL=Card.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/packages/react-components/react-card/src/components/Card/Card.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Card selected event type\n *\n * This event is fired when a selectable card changes its selection state.\n */\nexport type CardOnSelectionChangeEvent = React.MouseEvent | React.KeyboardEvent | React.ChangeEvent;\n\n/**\n * Data sent from the selection events on a selectable card.\n */\nexport type CardOnSelectData = {\n selected: boolean;\n};\n\n/**\n * Data shared between card components\n */\nexport interface CardContextValue {\n selectableA11yProps: {\n referenceId?: string;\n setReferenceId: (referenceId: string) => void;\n referenceLabel?: string;\n setReferenceLabel: (referenceLabel: string) => void;\n };\n}\n\n/**\n * Slots available in the Card component.\n */\nexport type CardSlots = {\n /**\n * Root element of the component.\n */\n root: Slot<'div'>;\n\n /**\n * Floating action that can be rendered on the top-right of a card. Often used together with\n * `selected`, `defaultSelected`, and `onSelectionChange` props\n */\n floatingAction?: Slot<'div'>;\n\n /**\n * The internal checkbox element that renders when the card is selectable.\n */\n checkbox?: Slot<'input'>;\n};\n\n/**\n * Card component props.\n */\nexport type CardProps = ComponentProps<CardSlots> & {\n /**\n * Sets the appearance of the card.\n *\n * `filled`\n * The card will have a shadow, border and background color.\n *\n * `filled-alternative`\n * This appearance is similar to `filled`, but the background color will be a little darker.\n *\n * `outline`\n * This appearance is similar to `filled`, but the background color will be transparent and no shadow applied.\n *\n * `subtle`\n * This appearance is similar to `filled-alternative`, but no border is applied.\n *\n * @default 'filled'\n */\n appearance?: 'filled' | 'filled-alternative' | 'outline' | 'subtle';\n\n /**\n * Sets the focus behavior for the card.\n *\n * `off`\n * The card will not focusable.\n *\n * `no-tab`\n * This behaviour traps the focus inside of the Card when pressing the Enter key and will only release focus when\n * pressing the Escape key.\n *\n * `tab-exit`\n * This behaviour traps the focus inside of the Card when pressing the Enter key but will release focus when pressing\n * the Tab key on the last inner element.\n *\n * `tab-only`\n * This behaviour will cycle through all elements inside of the Card when pressing the Tab key and then release focus\n * after the last inner element.\n *\n * @default 'off'\n */\n focusMode?: 'off' | 'no-tab' | 'tab-exit' | 'tab-only';\n\n /**\n * Defines the orientation of the card.\n *\n * @default 'vertical'\n */\n orientation?: 'horizontal' | 'vertical';\n\n /**\n * Controls the card's border radius and padding between inner elements.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * Defines the controlled selected state of the card.\n *\n * @default false\n */\n selected?: boolean;\n\n /**\n * Defines whether the card is initially in a selected state when rendered.\n *\n * @default false\n */\n defaultSelected?: boolean;\n\n /**\n * Callback to be called when the selected state value changes.\n */\n onSelectionChange?: (event: CardOnSelectionChangeEvent, data: CardOnSelectData) => void;\n};\n\n/**\n * State used in rendering Card.\n */\nexport type CardState = ComponentState<CardSlots> &\n CardContextValue &\n Required<\n Pick<CardProps, 'appearance' | 'orientation' | 'size'> & {\n /**\n * Represents a card that contains interactive events (MouseEvents) or is a button/a tag.\n *\n * @default false\n */\n interactive: boolean;\n\n /**\n * Represents a selectable card.\n *\n * @default false\n */\n selectable: boolean;\n\n /**\n * Defines whether the card is currently selected.\n *\n * @default false\n */\n selected: boolean;\n\n /**\n * Defines whether the card internal checkbox is currently focused.\n *\n * @default false\n */\n selectFocused: boolean;\n }\n >;\n"],"mappings":""}
1
+ {"version":3,"sources":["../../../lib/components/Card/Card.types.js"],"sourcesContent":["import * as React from 'react';\n//# sourceMappingURL=Card.types.js.map"],"names":[],"mappings":";;;;;6DAAuB;CACvB,sCAAsC"}
@@ -1,36 +1,33 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ cardContextDefaultValue: ()=>cardContextDefaultValue,
13
+ CardProvider: ()=>CardProvider,
14
+ useCardContext_unstable: ()=>useCardContext_unstable
5
15
  });
6
- exports.useCardContext_unstable = exports.CardProvider = exports.cardContextDefaultValue = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const cardContext = /*#__PURE__*/React.createContext(undefined);
9
- /**
10
- * @internal
11
- */
12
- exports.cardContextDefaultValue = {
13
- selectableA11yProps: {
14
- referenceId: undefined,
15
- setReferenceId() {
16
- /* Noop */
17
- },
18
- referenceLabel: undefined,
19
- setReferenceLabel() {
20
- /* Noop */
16
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
17
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
18
+ const cardContext = /*#__PURE__*/ _react.createContext(undefined);
19
+ const cardContextDefaultValue = {
20
+ selectableA11yProps: {
21
+ referenceId: undefined,
22
+ setReferenceId () {
23
+ /* Noop */ },
24
+ referenceLabel: undefined,
25
+ setReferenceLabel () {
26
+ /* Noop */ }
21
27
  }
22
- }
23
28
  };
24
- /**
25
- * @internal
26
- */
27
- exports.CardProvider = cardContext.Provider;
28
- /**
29
- * @internal
30
- */
31
- const useCardContext_unstable = () => {
32
- var _a;
33
- return (_a = React.useContext(cardContext)) !== null && _a !== void 0 ? _a : exports.cardContextDefaultValue;
34
- };
35
- exports.useCardContext_unstable = useCardContext_unstable;
29
+ const CardProvider = cardContext.Provider;
30
+ var _React_useContext;
31
+ const useCardContext_unstable = ()=>(_React_useContext = _react.useContext(cardContext)) !== null && _React_useContext !== void 0 ? _React_useContext : cardContextDefaultValue; //# sourceMappingURL=CardContext.js.map
32
+
36
33
  //# sourceMappingURL=CardContext.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","cardContext","createContext","undefined","exports","cardContextDefaultValue","selectableA11yProps","referenceId","setReferenceId","referenceLabel","setReferenceLabel","CardProvider","Provider","useCardContext_unstable","_a","useContext"],"sources":["../src/packages/react-components/react-card/src/components/Card/CardContext.ts"],"sourcesContent":["import * as React from 'react';\nimport { CardContextValue } from './Card.types';\n\nconst cardContext = React.createContext<CardContextValue | undefined>(undefined);\n\n/**\n * @internal\n */\nexport const cardContextDefaultValue: CardContextValue = {\n selectableA11yProps: {\n referenceId: undefined,\n setReferenceId() {\n /* Noop */\n },\n referenceLabel: undefined,\n setReferenceLabel() {\n /* Noop */\n },\n },\n};\n\n/**\n * @internal\n */\nexport const CardProvider = cardContext.Provider;\n\n/**\n * @internal\n */\nexport const useCardContext_unstable = () => React.useContext(cardContext) ?? cardContextDefaultValue;\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AAGA,MAAMC,WAAW,gBAAGF,KAAK,CAACG,aAAa,CAA+BC,SAAS,CAAC;AAEhF;;;AAGaC,OAAA,CAAAC,uBAAuB,GAAqB;EACvDC,mBAAmB,EAAE;IACnBC,WAAW,EAAEJ,SAAS;IACtBK,cAAcA,CAAA;MACZ;IAAA,CACD;IACDC,cAAc,EAAEN,SAAS;IACzBO,iBAAiBA,CAAA;MACf;IAAA;;CAGL;AAED;;;AAGaN,OAAA,CAAAO,YAAY,GAAGV,WAAW,CAACW,QAAQ;AAEhD;;;AAGO,MAAMC,uBAAuB,GAAGA,CAAA,KAAK;EAAA,IAAAC,EAAA;EAAC,QAAAA,EAAA,GAAAf,KAAK,CAACgB,UAAU,CAACd,WAAW,CAAC,cAAAa,EAAA,cAAAA,EAAA,GAAIV,OAAA,CAAAC,uBAAuB;AAAA;AAAxFD,OAAA,CAAAS,uBAAuB,GAAAA,uBAAA"}
1
+ {"version":3,"sources":["../../../lib/components/Card/CardContext.js"],"sourcesContent":["import * as React from 'react';\nconst cardContext = /*#__PURE__*/React.createContext(undefined);\n/**\n * @internal\n */\nexport const cardContextDefaultValue = {\n selectableA11yProps: {\n referenceId: undefined,\n setReferenceId() {\n /* Noop */},\n referenceLabel: undefined,\n setReferenceLabel() {\n /* Noop */}\n }\n};\n/**\n * @internal\n */\nexport const CardProvider = cardContext.Provider;\nvar _React_useContext;\n/**\n * @internal\n */\nexport const useCardContext_unstable = () => (_React_useContext = React.useContext(cardContext)) !== null && _React_useContext !== void 0 ? _React_useContext : cardContextDefaultValue;\n//# sourceMappingURL=CardContext.js.map"],"names":["cardContextDefaultValue","CardProvider","useCardContext_unstable","cardContext","React","createContext","undefined","selectableA11yProps","referenceId","setReferenceId","referenceLabel","setReferenceLabel","Provider","_React_useContext","useContext"],"mappings":";;;;;;;;;;;IAKaA,uBAAuB,MAAvBA;IAaAC,YAAY,MAAZA;IAKAC,uBAAuB,MAAvBA;;;6DAvBU;AACvB,MAAMC,cAAc,WAAW,GAAEC,OAAMC,aAAa,CAACC;AAI9C,MAAMN,0BAA0B;IACrCO,qBAAqB;QACnBC,aAAaF;QACbG,kBAAiB;QACf,QAAQ,GAAE;QACZC,gBAAgBJ;QAChBK,qBAAoB;QAClB,QAAQ,GAAE;IACd;AACF;AAIO,MAAMV,eAAeE,YAAYS,QAAQ;AAChD,IAAIC;AAIG,MAAMX,0BAA0B,IAAM,AAACW,CAAAA,oBAAoBT,OAAMU,UAAU,CAACX,YAAW,MAAO,IAAI,IAAIU,sBAAsB,KAAK,IAAIA,oBAAoBb,uBAAuB,EACvL,uCAAuC"}
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./Card"), exports);
8
- tslib_1.__exportStar(require("./Card.types"), exports);
9
- tslib_1.__exportStar(require("./CardContext"), exports);
10
- tslib_1.__exportStar(require("./renderCard"), exports);
11
- tslib_1.__exportStar(require("./useCard"), exports);
12
- tslib_1.__exportStar(require("./useCardStyles"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./Card"), exports);
7
+ _exportStar(require("./Card.types"), exports);
8
+ _exportStar(require("./CardContext"), exports);
9
+ _exportStar(require("./renderCard"), exports);
10
+ _exportStar(require("./useCard"), exports);
11
+ _exportStar(require("./useCardStyles"), exports);
12
+ //# sourceMappingURL=index.js.map
13
+
13
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-card/src/components/Card/index.ts"],"sourcesContent":["export * from './Card';\nexport * from './Card.types';\nexport * from './CardContext';\nexport * from './renderCard';\nexport * from './useCard';\nexport * from './useCardStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,YAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,kBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,mBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,kBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,eAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA"}
1
+ {"version":3,"sources":["../../../lib/components/Card/index.js"],"sourcesContent":["export * from './Card';\nexport * from './Card.types';\nexport * from './CardContext';\nexport * from './renderCard';\nexport * from './useCard';\nexport * from './useCardStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
@@ -1,29 +1,20 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderCard_unstable", {
6
+ enumerable: true,
7
+ get: ()=>renderCard_unstable
5
8
  });
6
- exports.renderCard_unstable = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
- const CardContext_1 = /*#__PURE__*/require("./CardContext");
10
- /**
11
- * Render the final JSX of Card.
12
- */
13
- const renderCard_unstable = (state, cardContextValue) => {
14
- const {
15
- slots,
16
- slotProps
17
- } = react_utilities_1.getSlots(state);
18
- return React.createElement(slots.root, {
19
- ...slotProps.root
20
- }, React.createElement(CardContext_1.CardProvider, {
21
- value: cardContextValue
22
- }, slots.checkbox ? React.createElement(slots.checkbox, {
23
- ...slotProps.checkbox
24
- }) : null, slots.floatingAction ? React.createElement(slots.floatingAction, {
25
- ...slotProps.floatingAction
26
- }) : null, slotProps.root.children));
27
- };
28
- exports.renderCard_unstable = renderCard_unstable;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const _cardContext = require("./CardContext");
13
+ const renderCard_unstable = (state, cardContextValue)=>{
14
+ const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
15
+ return /*#__PURE__*/ _react.createElement(slots.root, slotProps.root, /*#__PURE__*/ _react.createElement(_cardContext.CardProvider, {
16
+ value: cardContextValue
17
+ }, slots.checkbox ? /*#__PURE__*/ _react.createElement(slots.checkbox, slotProps.checkbox) : null, slots.floatingAction ? /*#__PURE__*/ _react.createElement(slots.floatingAction, slotProps.floatingAction) : null, slotProps.root.children));
18
+ }; //# sourceMappingURL=renderCard.js.map
19
+
29
20
  //# sourceMappingURL=renderCard.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","react_utilities_1","CardContext_1","renderCard_unstable","state","cardContextValue","slots","slotProps","getSlots","createElement","root","CardProvider","value","checkbox","floatingAction","children","exports"],"sources":["../src/packages/react-components/react-card/src/components/Card/renderCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CardContextValue, CardSlots, CardState } from './Card.types';\nimport { CardProvider } from './CardContext';\n\n/**\n * Render the final JSX of Card.\n */\nexport const renderCard_unstable = (state: CardState, cardContextValue: CardContextValue) => {\n const { slots, slotProps } = getSlots<CardSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <CardProvider value={cardContextValue}>\n {slots.checkbox ? <slots.checkbox {...slotProps.checkbox} /> : null}\n {slots.floatingAction ? <slots.floatingAction {...slotProps.floatingAction} /> : null}\n {slotProps.root.children}\n </CardProvider>\n </slots.root>\n );\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAEA,MAAAE,aAAA,gBAAAF,OAAA;AAEA;;;AAGO,MAAMG,mBAAmB,GAAGA,CAACC,KAAgB,EAAEC,gBAAkC,KAAI;EAC1F,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGN,iBAAA,CAAAO,QAAQ,CAAYJ,KAAK,CAAC;EAEvD,OACEL,KAAA,CAAAU,aAAA,CAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,GAC5BX,KAAA,CAAAU,aAAA,CAACP,aAAA,CAAAS,YAAY;IAACC,KAAK,EAAEP;EAAgB,GAClCC,KAAK,CAACO,QAAQ,GAAGd,KAAA,CAAAU,aAAA,CAACH,KAAK,CAACO,QAAQ;IAAA,GAAKN,SAAS,CAACM;EAAQ,EAAI,GAAG,IAAI,EAClEP,KAAK,CAACQ,cAAc,GAAGf,KAAA,CAAAU,aAAA,CAACH,KAAK,CAACQ,cAAc;IAAA,GAAKP,SAAS,CAACO;EAAc,EAAI,GAAG,IAAI,EACpFP,SAAS,CAACG,IAAI,CAACK,QAAQ,CACX,CACJ;AAEjB,CAAC;AAZYC,OAAA,CAAAb,mBAAmB,GAAAA,mBAAA"}
1
+ {"version":3,"sources":["../../../lib/components/Card/renderCard.js"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { CardProvider } from './CardContext';\n/**\n * Render the final JSX of Card.\n */\nexport const renderCard_unstable = (state, cardContextValue) => {\n const {\n slots,\n slotProps\n } = getSlots(state);\n return /*#__PURE__*/React.createElement(slots.root, slotProps.root, /*#__PURE__*/React.createElement(CardProvider, {\n value: cardContextValue\n }, slots.checkbox ? /*#__PURE__*/React.createElement(slots.checkbox, slotProps.checkbox) : null, slots.floatingAction ? /*#__PURE__*/React.createElement(slots.floatingAction, slotProps.floatingAction) : null, slotProps.root.children));\n};\n//# sourceMappingURL=renderCard.js.map"],"names":["renderCard_unstable","state","cardContextValue","slots","slotProps","getSlots","React","createElement","root","CardProvider","value","checkbox","floatingAction","children"],"mappings":";;;;+BAMaA;;aAAAA;;;6DANU;gCACE;6BACI;AAItB,MAAMA,sBAAsB,CAACC,OAAOC,mBAAqB;IAC9D,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,wBAAQ,EAACJ;IACb,OAAO,WAAW,GAAEK,OAAMC,aAAa,CAACJ,MAAMK,IAAI,EAAEJ,UAAUI,IAAI,EAAE,WAAW,GAAEF,OAAMC,aAAa,CAACE,yBAAY,EAAE;QACjHC,OAAOR;IACT,GAAGC,MAAMQ,QAAQ,GAAG,WAAW,GAAEL,OAAMC,aAAa,CAACJ,MAAMQ,QAAQ,EAAEP,UAAUO,QAAQ,IAAI,IAAI,EAAER,MAAMS,cAAc,GAAG,WAAW,GAAEN,OAAMC,aAAa,CAACJ,MAAMS,cAAc,EAAER,UAAUQ,cAAc,IAAI,IAAI,EAAER,UAAUI,IAAI,CAACK,QAAQ;AAC1O,GACA,sCAAsC"}