@fluentui/react-card 0.0.0-nightly-20230223-0420.1 → 0.0.0-nightly-20230223-2115.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/.swcrc +33 -0
  2. package/CHANGELOG.json +15 -15
  3. package/CHANGELOG.md +10 -10
  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 +3 -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 +3 -8
  15. package/lib/components/Card/renderCard.js.map +1 -1
  16. package/lib/components/Card/useCard.js +5 -4
  17. package/lib/components/Card/useCard.js.map +1 -1
  18. package/lib/components/Card/useCardContextValue.js +4 -3
  19. package/lib/components/Card/useCardContextValue.js.map +1 -1
  20. package/lib/components/Card/useCardSelectable.js +6 -5
  21. package/lib/components/Card/useCardSelectable.js.map +1 -1
  22. package/lib/components/Card/useCardStyles.js.map +1 -1
  23. package/lib/components/CardFooter/CardFooter.js.map +1 -1
  24. package/lib/components/CardFooter/CardFooter.types.js.map +1 -1
  25. package/lib/components/CardFooter/index.js.map +1 -1
  26. package/lib/components/CardFooter/renderCardFooter.js +2 -5
  27. package/lib/components/CardFooter/renderCardFooter.js.map +1 -1
  28. package/lib/components/CardFooter/useCardFooter.js +1 -0
  29. package/lib/components/CardFooter/useCardFooter.js.map +1 -1
  30. package/lib/components/CardFooter/useCardFooterStyles.js.map +1 -1
  31. package/lib/components/CardHeader/CardHeader.js.map +1 -1
  32. package/lib/components/CardHeader/CardHeader.types.js.map +1 -1
  33. package/lib/components/CardHeader/index.js.map +1 -1
  34. package/lib/components/CardHeader/renderCardHeader.js +2 -11
  35. package/lib/components/CardHeader/renderCardHeader.js.map +1 -1
  36. package/lib/components/CardHeader/useCardHeader.js.map +1 -1
  37. package/lib/components/CardHeader/useCardHeaderStyles.js.map +1 -1
  38. package/lib/components/CardPreview/CardPreview.js.map +1 -1
  39. package/lib/components/CardPreview/CardPreview.types.js.map +1 -1
  40. package/lib/components/CardPreview/index.js.map +1 -1
  41. package/lib/components/CardPreview/renderCardPreview.js +2 -5
  42. package/lib/components/CardPreview/renderCardPreview.js.map +1 -1
  43. package/lib/components/CardPreview/useCardPreview.js.map +1 -1
  44. package/lib/components/CardPreview/useCardPreviewStyles.js.map +1 -1
  45. package/lib/index.js.map +1 -1
  46. package/lib-commonjs/Card.js +5 -4
  47. package/lib-commonjs/Card.js.map +1 -1
  48. package/lib-commonjs/CardFooter.js +5 -4
  49. package/lib-commonjs/CardFooter.js.map +1 -1
  50. package/lib-commonjs/CardHeader.js +5 -4
  51. package/lib-commonjs/CardHeader.js.map +1 -1
  52. package/lib-commonjs/CardPreview.js +5 -4
  53. package/lib-commonjs/CardPreview.js.map +1 -1
  54. package/lib-commonjs/components/Card/Card.js +18 -17
  55. package/lib-commonjs/components/Card/Card.js.map +1 -1
  56. package/lib-commonjs/components/Card/Card.types.js +5 -2
  57. package/lib-commonjs/components/Card/Card.types.js.map +1 -1
  58. package/lib-commonjs/components/Card/CardContext.js +26 -30
  59. package/lib-commonjs/components/Card/CardContext.js.map +1 -1
  60. package/lib-commonjs/components/Card/index.js +10 -9
  61. package/lib-commonjs/components/Card/index.js.map +1 -1
  62. package/lib-commonjs/components/Card/renderCard.js +18 -25
  63. package/lib-commonjs/components/Card/renderCard.js.map +1 -1
  64. package/lib-commonjs/components/Card/useCard.js +82 -94
  65. package/lib-commonjs/components/Card/useCard.js.map +1 -1
  66. package/lib-commonjs/components/Card/useCardContextValue.js +12 -11
  67. package/lib-commonjs/components/Card/useCardContextValue.js.map +1 -1
  68. package/lib-commonjs/components/Card/useCardSelectable.js +131 -117
  69. package/lib-commonjs/components/Card/useCardSelectable.js.map +1 -1
  70. package/lib-commonjs/components/Card/useCardStyles.js +738 -336
  71. package/lib-commonjs/components/Card/useCardStyles.js.map +1 -1
  72. package/lib-commonjs/components/CardFooter/CardFooter.js +16 -15
  73. package/lib-commonjs/components/CardFooter/CardFooter.js.map +1 -1
  74. package/lib-commonjs/components/CardFooter/CardFooter.types.js +3 -2
  75. package/lib-commonjs/components/CardFooter/CardFooter.types.js.map +1 -1
  76. package/lib-commonjs/components/CardFooter/index.js +9 -8
  77. package/lib-commonjs/components/CardFooter/index.js.map +1 -1
  78. package/lib-commonjs/components/CardFooter/renderCardFooter.js +15 -20
  79. package/lib-commonjs/components/CardFooter/renderCardFooter.js.map +1 -1
  80. package/lib-commonjs/components/CardFooter/useCardFooter.js +23 -30
  81. package/lib-commonjs/components/CardFooter/useCardFooter.js.map +1 -1
  82. package/lib-commonjs/components/CardFooter/useCardFooterStyles.js +45 -33
  83. package/lib-commonjs/components/CardFooter/useCardFooterStyles.js.map +1 -1
  84. package/lib-commonjs/components/CardHeader/CardHeader.js +16 -15
  85. package/lib-commonjs/components/CardHeader/CardHeader.js.map +1 -1
  86. package/lib-commonjs/components/CardHeader/CardHeader.types.js +3 -2
  87. package/lib-commonjs/components/CardHeader/CardHeader.types.js.map +1 -1
  88. package/lib-commonjs/components/CardHeader/index.js +9 -8
  89. package/lib-commonjs/components/CardHeader/index.js.map +1 -1
  90. package/lib-commonjs/components/CardHeader/renderCardHeader.js +15 -26
  91. package/lib-commonjs/components/CardHeader/renderCardHeader.js.map +1 -1
  92. package/lib-commonjs/components/CardHeader/useCardHeader.js +50 -64
  93. package/lib-commonjs/components/CardHeader/useCardHeader.js.map +1 -1
  94. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js +88 -67
  95. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js.map +1 -1
  96. package/lib-commonjs/components/CardPreview/CardPreview.js +16 -15
  97. package/lib-commonjs/components/CardPreview/CardPreview.js.map +1 -1
  98. package/lib-commonjs/components/CardPreview/CardPreview.types.js +3 -2
  99. package/lib-commonjs/components/CardPreview/CardPreview.types.js.map +1 -1
  100. package/lib-commonjs/components/CardPreview/index.js +9 -8
  101. package/lib-commonjs/components/CardPreview/index.js.map +1 -1
  102. package/lib-commonjs/components/CardPreview/renderCardPreview.js +15 -20
  103. package/lib-commonjs/components/CardPreview/renderCardPreview.js.map +1 -1
  104. package/lib-commonjs/components/CardPreview/useCardPreview.js +51 -60
  105. package/lib-commonjs/components/CardPreview/useCardPreview.js.map +1 -1
  106. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js +53 -37
  107. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js.map +1 -1
  108. package/lib-commonjs/index.js +40 -153
  109. package/lib-commonjs/index.js.map +1 -1
  110. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"mappings":"AACA,SAASA,qBAAqB,EAAEC,gBAAgB,QAAQ,2BAA2B;AAGnF;;;;;;;;;AASA,OAAO,MAAMC,sBAAsB,GAAG,CAACC,KAAsB,EAAEC,GAA2B,KAAqB;EAC7G,MAAM;IAAEC;EAAM,CAAE,GAAGF,KAAK;EAExB,OAAO;IACLG,UAAU,EAAE;MACVC,IAAI,EAAE,KAAK;MACXF,MAAM,EAAE;KACT;IAEDE,IAAI,EAAEP,qBAAqB,CAAC,KAAK,EAAE;MACjCI,GAAG;MACH,GAAGD;KACJ,CAAC;IACFE,MAAM,EAAEJ,gBAAgB,CAACI,MAAM;GAChC;AACH,CAAC","names":["getNativeElementProps","resolveShorthand","useCardFooter_unstable","props","ref","action","components","root"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-card/src/components/CardFooter/useCardFooter.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { CardFooterProps, CardFooterState } from './CardFooter.types';\n\n/**\n * Create the state required to render CardFooter.\n *\n * The returned state can be modified with hooks such as useCardFooterStyles_unstable,\n * before being passed to renderCardFooter_unstable.\n *\n * @param props - props from this instance of CardFooter\n * @param ref - reference to root HTMLElement of CardFooter\n */\nexport const useCardFooter_unstable = (props: CardFooterProps, ref: React.Ref<HTMLElement>): CardFooterState => {\n const { action } = props;\n\n return {\n components: {\n root: 'div',\n action: 'div',\n },\n\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n action: resolveShorthand(action),\n };\n};\n"]}
1
+ {"version":3,"mappings":"AAAA,YAAYA,WAAW;AACvB,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ;AAGxD;;;;;;;;;AASA,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC,QAAiD;EAC9G,MAAM;IAAEC;EAAM,CAAE,GAAGF;EAEnB,OAAO;IACLG,YAAY;MACVC,MAAM;MACNF,QAAQ;IACV;IAEAE,MAAMP,sBAAsB,OAAO;MACjCI;MACA,GAAGD;IACL;IACAE,QAAQJ,iBAAiBI;EAC3B;AACF","names":["React","getNativeElementProps","resolveShorthand","useCardFooter_unstable","props","ref","action","components","root"],"sources":["../../../src/components/CardFooter/useCardFooter.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { CardFooterProps, CardFooterState } from './CardFooter.types';\n\n/**\n * Create the state required to render CardFooter.\n *\n * The returned state can be modified with hooks such as useCardFooterStyles_unstable,\n * before being passed to renderCardFooter_unstable.\n *\n * @param props - props from this instance of CardFooter\n * @param ref - reference to root HTMLElement of CardFooter\n */\nexport const useCardFooter_unstable = (props: CardFooterProps, ref: React.Ref<HTMLElement>): CardFooterState => {\n const { action } = props;\n\n return {\n components: {\n root: 'div',\n action: 'div',\n },\n\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n action: resolveShorthand(action),\n };\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"mappings":"AACA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AAGrE;;;AAGA,OAAO,MAAMC,oBAAoB,GAAoC;EACnEC,IAAI,EAAE,gBAAgB;EACtBC,MAAM,EAAE;CACT;AAED,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAShB;AAEF;;;AAGA,OAAO,MAAMC,4BAA4B,GAAIC,KAAsB,IAAqB;EACtF,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1BE,KAAK,CAACJ,IAAI,CAACM,SAAS,GAAGT,YAAY,CAACE,oBAAoB,CAACC,IAAI,EAAEK,MAAM,CAACL,IAAI,EAAEI,KAAK,CAACJ,IAAI,CAACM,SAAS,CAAC;EAEjG,IAAIF,KAAK,CAACH,MAAM,EAAE;IAChBG,KAAK,CAACH,MAAM,CAACK,SAAS,GAAGT,YAAY,CAACE,oBAAoB,CAACE,MAAM,EAAEI,MAAM,CAACJ,MAAM,EAAEG,KAAK,CAACH,MAAM,CAACK,SAAS,CAAC;;EAG3G,OAAOF,KAAK;AACd,CAAC","names":["mergeClasses","shorthands","cardFooterClassNames","root","action","useStyles","useCardFooterStyles_unstable","state","styles","className"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-card/src/components/CardFooter/useCardFooterStyles.ts"],"sourcesContent":["import 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 ...shorthands.gap('12px'),\n },\n action: {\n marginLeft: 'auto',\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 state.root.className = mergeClasses(cardFooterClassNames.root, styles.root, state.root.className);\n\n if (state.action) {\n state.action.className = mergeClasses(cardFooterClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"]}
1
+ {"version":3,"mappings":"AACA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ;AAGrD;;;AAGA,OAAO,MAAMC,uBAAwD;EACnEC,MAAM;EACNC,QAAQ;AACV;AAEA,MAAMC,yBAAYC;EAAAA;IAAAA;IAAAA;IAAAA;IAAAA;EAAAA;EAAAA;IAAAA;EAAAA;AAAAA;EAAAA;AAAAA,EASlB;AAEA;;;AAGA,OAAO,MAAMC,+BAAgCC,SAA4C;EACvF,MAAMC,SAASJ;EACfG,MAAML,IAAI,CAACO,SAAS,GAAGV,aAAaE,qBAAqBC,IAAI,EAAEM,OAAON,IAAI,EAAEK,MAAML,IAAI,CAACO,SAAS;EAEhG,IAAIF,MAAMJ,MAAM,EAAE;IAChBI,MAAMJ,MAAM,CAACM,SAAS,GAAGV,aAAaE,qBAAqBE,MAAM,EAAEK,OAAOL,MAAM,EAAEI,MAAMJ,MAAM,CAACM,SAAS;EAC1G;EAEA,OAAOF;AACT","names":["mergeClasses","shorthands","cardFooterClassNames","root","action","useStyles","makeStyles","useCardFooterStyles_unstable","state","styles","className"],"sources":["../../../src/components/CardFooter/useCardFooterStyles.ts"],"sourcesContent":["import 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 ...shorthands.gap('12px'),\n },\n action: {\n marginLeft: 'auto',\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 state.root.className = mergeClasses(cardFooterClassNames.root, styles.root, state.root.className);\n\n if (state.action) {\n state.action.className = mergeClasses(cardFooterClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"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","names":["React","useCardHeader_unstable","renderCardHeader_unstable","useCardHeaderStyles_unstable","CardHeader","forwardRef","props","ref","state","displayName"],"sourceRoot":"","sources":["../../../../../../../../../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"]}
1
+ {"version":3,"mappings":"AAAA,YAAYA,WAAW;AACvB,SAASC,sBAAsB,QAAQ;AACvC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,4BAA4B,QAAQ;AAI7C;;;AAGA,OAAO,MAAMC,0BAAmDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC,QAAQ;EAC/F,MAAMC,QAAQP,uBAAuBK,OAAOC;EAE5CJ,6BAA6BK;EAC7B,OAAON,0BAA0BM;AACnC;AAEAJ,WAAWK,WAAW,GAAG","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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CardHeader.types.js","sourceRoot":"","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,"mappings":"AAAA","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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","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,"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","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"]}
@@ -1,3 +1,4 @@
1
+ import _extends from "@swc/helpers/src/_extends.mjs";
1
2
  import * as React from 'react';
2
3
  import { getSlots } from '@fluentui/react-utilities';
3
4
  /**
@@ -8,16 +9,6 @@ export const renderCardHeader_unstable = state => {
8
9
  slots,
9
10
  slotProps
10
11
  } = 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
- }));
12
+ return /*#__PURE__*/React.createElement(slots.root, _extends({}, slotProps.root), slots.image && /*#__PURE__*/React.createElement(slots.image, _extends({}, slotProps.image)), /*#__PURE__*/React.createElement(slots.header, _extends({}, slotProps.header)), slots.description && /*#__PURE__*/React.createElement(slots.description, _extends({}, slotProps.description)), slots.action && /*#__PURE__*/React.createElement(slots.action, _extends({}, slotProps.action)));
22
13
  };
23
14
  //# sourceMappingURL=renderCardHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"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,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,GAC3BF,KAAK,CAACG,KAAK,iBAAIP,oBAACI,KAAK,CAACG,KAAK;IAAA,GAAKF,SAAS,CAACE;EAAK,EAAI,eACpDP,oBAACI,KAAK,CAACI,MAAM;IAAA,GAAKH,SAAS,CAACG;EAAM,EAAI,EACrCJ,KAAK,CAACK,WAAW,iBAAIT,oBAACI,KAAK,CAACK,WAAW;IAAA,GAAKJ,SAAS,CAACI;EAAW,EAAI,EACrEL,KAAK,CAACM,MAAM,iBAAIV,oBAACI,KAAK,CAACM,MAAM;IAAA,GAAKL,SAAS,CAACK;EAAM,EAAI,CAC5C;AAEjB,CAAC","names":["React","getSlots","renderCardHeader_unstable","state","slots","slotProps","root","image","header","description","action"],"sourceRoot":"","sources":["../../../../../../../../../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"]}
1
+ {"version":3,"mappings":";AAAA,YAAYA,WAAW;AACvB,SAASC,QAAQ,QAAQ;AAGzB;;;AAGA,OAAO,MAAMC,4BAA6BC,SAA2B;EACnE,MAAM;IAAEC;IAAOC;EAAS,CAAE,GAAGJ,SAA0BE;EAEvD,oBACEH,oBAACI,MAAME,IAAI,eAAKD,UAAUC,IAAI,GAC3BF,MAAMG,KAAK,iBAAIP,oBAACI,MAAMG,KAAK,eAAKF,UAAUE,KAAK,iBAChDP,oBAACI,MAAMI,MAAM,eAAKH,UAAUG,MAAM,IACjCJ,MAAMK,WAAW,iBAAIT,oBAACI,MAAMK,WAAW,eAAKJ,UAAUI,WAAW,IACjEL,MAAMM,MAAM,iBAAIV,oBAACI,MAAMM,MAAM,eAAKL,UAAUK,MAAM;AAGzD","names":["React","getSlots","renderCardHeader_unstable","state","slots","slotProps","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"]}
@@ -1 +1 @@
1
- {"version":3,"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,GAAG,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","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"],"sourceRoot":"","sources":["../../../../../../../../../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"]}
1
+ {"version":3,"mappings":"AAAA,YAAYA,WAAW;AACvB,SAASC,qBAAqB,EAAEC,gBAAgB,EAAEC,KAAK,QAAQ;AAE/D,SAASC,uBAAuB,QAAQ;AACxC,SAASC,oBAAoB,QAAQ;AAErC;;;;;;;;;AASA,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC,QAAiD;EAC9G,MAAM;IAAEC;IAAOC;IAAQC;IAAaC;EAAM,CAAE,GAAGL;EAE/C,MAAM;IACJM,qBAAqB;MAAEC;MAAaC;IAAc;EAAE,CACrD,GAAGX;EACJ,MAAMY,YAAYhB,MAAMiB,MAAM,CAAiB,IAAI;EAEnD,MAAMC,cAAcf,MAAME,qBAAqBK,MAAM,EAAEI;EAEvDd,MAAMmB,SAAS,CAAC,MAAM;IACpB,IAAIT,UAAUM,UAAUI,OAAO,EAAE;MAC/B,MAAM;QAAEC;MAAE,CAAE,GAAGL,UAAUI,OAAO;MAEhCL,eAAeM,KAAKA,KAAKH,WAAW;IACtC;EACF,GAAG,CAACR,QAAQK,gBAAgBG,YAAY;EAExC,OAAO;IACLI,YAAY;MACVC,MAAM;MACNd,OAAO;MACPC,QAAQ;MACRC,aAAa;MACbC,QAAQ;IACV;IAEAW,MAAMtB,sBAAsB,OAAO;MACjCO;MACA,GAAGD;IACL;IACAE,OAAOP,iBAAiBO;IACxBC,QAAQR,iBAAiBQ,QAAQ;MAC/Bc,UAAU,IAAI;MACdC,cAAc;QACZjB,KAAKQ;QACLK,IAAIP;MACN;IACF;IACAH,aAAaT,iBAAiBS;IAC9BC,QAAQV,iBAAiBU;EAC3B;AACF","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"]}
@@ -1 +1 @@
1
- {"version":3,"mappings":"AACA,mBAAqBA,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,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EA2BhB;AAEF;;;AAGA,OAAO,MAAMC,4BAA4B,GAAIC,KAAsB,IAAqB;EACtF,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1BE,KAAK,CAACT,IAAI,CAACW,SAAS,GAAGb,YAAY,CAACC,oBAAoB,CAACC,IAAI,EAAEU,MAAM,CAACV,IAAI,EAAES,KAAK,CAACT,IAAI,CAACW,SAAS,CAAC;EAEjG,IAAIF,KAAK,CAACR,KAAK,EAAE;IACfQ,KAAK,CAACR,KAAK,CAACU,SAAS,GAAGb,YAAY,CAACC,oBAAoB,CAACE,KAAK,EAAES,MAAM,CAACT,KAAK,EAAEQ,KAAK,CAACR,KAAK,CAACU,SAAS,CAAC;;EAGvG,IAAIF,KAAK,CAACP,MAAM,EAAE;IAChBO,KAAK,CAACP,MAAM,CAACS,SAAS,GAAGb,YAAY,CAACC,oBAAoB,CAACG,MAAM,EAAEQ,MAAM,CAACR,MAAM,EAAEO,KAAK,CAACP,MAAM,CAACS,SAAS,CAAC;;EAG3G,IAAIF,KAAK,CAACN,WAAW,EAAE;IACrBM,KAAK,CAACN,WAAW,CAACQ,SAAS,GAAGb,YAAY,CACxCC,oBAAoB,CAACI,WAAW,EAChCO,MAAM,CAACP,WAAW,EAClBM,KAAK,CAACN,WAAW,CAACQ,SAAS,CAC5B;;EAGH,IAAIF,KAAK,CAACL,MAAM,EAAE;IAChBK,KAAK,CAACL,MAAM,CAACO,SAAS,GAAGb,YAAY,CAACC,oBAAoB,CAACK,MAAM,EAAEM,MAAM,CAACN,MAAM,EAAEK,KAAK,CAACL,MAAM,CAACO,SAAS,CAAC;;EAG3G,OAAOF,KAAK;AACd,CAAC","names":["mergeClasses","cardHeaderClassNames","root","image","header","description","action","cardHeaderCSSVars","cardHeaderGapVar","useStyles","useCardHeaderStyles_unstable","state","styles","className"],"sourceRoot":"","sources":["../../../../../../../../../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"]}
1
+ {"version":3,"mappings":"AACA,mBAAqBA,YAAY,QAAQ;AAGzC;;;AAGA,OAAO,MAAMC,uBAAwD;EACnEC,MAAM;EACNC,OAAO;EACPC,QAAQ;EACRC,aAAa;EACbC,QAAQ;AACV;AAEA;;;AAGA,OAAO,MAAMC,oBAAoB;EAC/BC,kBAAkB;AACpB;AAEA,MAAMC,yBAAYC;EAAAA;IAAAA;IAAAA;IAAAA;IAAAA;IAAAA;EAAAA;EAAAA;IAAAA;IAAAA;IAAAA;IAAAA;EAAAA;EAAAA;IAAAA;IAAAA;EAAAA;EAAAA;IAAAA;IAAAA;EAAAA;EAAAA;IAAAA;IAAAA;IAAAA;EAAAA;AAAAA;EAAAA;AAAAA,EA2BlB;AAEA;;;AAGA,OAAO,MAAMC,+BAAgCC,SAA4C;EACvF,MAAMC,SAASJ;EACfG,MAAMV,IAAI,CAACY,SAAS,GAAGd,aAAaC,qBAAqBC,IAAI,EAAEW,OAAOX,IAAI,EAAEU,MAAMV,IAAI,CAACY,SAAS;EAEhG,IAAIF,MAAMT,KAAK,EAAE;IACfS,MAAMT,KAAK,CAACW,SAAS,GAAGd,aAAaC,qBAAqBE,KAAK,EAAEU,OAAOV,KAAK,EAAES,MAAMT,KAAK,CAACW,SAAS;EACtG;EAEA,IAAIF,MAAMR,MAAM,EAAE;IAChBQ,MAAMR,MAAM,CAACU,SAAS,GAAGd,aAAaC,qBAAqBG,MAAM,EAAES,OAAOT,MAAM,EAAEQ,MAAMR,MAAM,CAACU,SAAS;EAC1G;EAEA,IAAIF,MAAMP,WAAW,EAAE;IACrBO,MAAMP,WAAW,CAACS,SAAS,GAAGd,aAC5BC,qBAAqBI,WAAW,EAChCQ,OAAOR,WAAW,EAClBO,MAAMP,WAAW,CAACS,SAAS;EAE/B;EAEA,IAAIF,MAAMN,MAAM,EAAE;IAChBM,MAAMN,MAAM,CAACQ,SAAS,GAAGd,aAAaC,qBAAqBK,MAAM,EAAEO,OAAOP,MAAM,EAAEM,MAAMN,MAAM,CAACQ,SAAS;EAC1G;EAEA,OAAOF;AACT","names":["mergeClasses","cardHeaderClassNames","root","image","header","description","action","cardHeaderCSSVars","cardHeaderGapVar","useStyles","makeStyles","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"]}
@@ -1 +1 @@
1
- {"version":3,"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","names":["React","useCardPreview_unstable","renderCardPreview_unstable","useCardPreviewStyles_unstable","CardPreview","forwardRef","props","ref","state","displayName"],"sourceRoot":"","sources":["../../../../../../../../../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"]}
1
+ {"version":3,"mappings":"AAAA,YAAYA,WAAW;AACvB,SAASC,uBAAuB,QAAQ;AACxC,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,6BAA6B,QAAQ;AAI9C;;;AAGA,OAAO,MAAMC,2BAAqDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC,QAAQ;EACjG,MAAMC,QAAQP,wBAAwBK,OAAOC;EAE7CJ,8BAA8BK;EAC9B,OAAON,2BAA2BM;AACpC;AAEAJ,YAAYK,WAAW,GAAG","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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CardPreview.types.js","sourceRoot":"","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,"mappings":"AAAA","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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","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,"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","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"]}
@@ -1,3 +1,4 @@
1
+ import _extends from "@swc/helpers/src/_extends.mjs";
1
2
  import * as React from 'react';
2
3
  import { getSlots } from '@fluentui/react-utilities';
3
4
  /**
@@ -8,10 +9,6 @@ export const renderCardPreview_unstable = state => {
8
9
  slots,
9
10
  slotProps
10
11
  } = 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
- }));
12
+ return /*#__PURE__*/React.createElement(slots.root, _extends({}, slotProps.root), slotProps.root.children, slots.logo && /*#__PURE__*/React.createElement(slots.logo, _extends({}, slotProps.logo)));
16
13
  };
17
14
  //# sourceMappingURL=renderCardPreview.js.map
@@ -1 +1 @@
1
- {"version":3,"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,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,GAC3BD,SAAS,CAACC,IAAI,CAACC,QAAQ,EACvBH,KAAK,CAACI,IAAI,iBAAIR,oBAACI,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI,CACtC;AAEjB,CAAC","names":["React","getSlots","renderCardPreview_unstable","state","slots","slotProps","root","children","logo"],"sourceRoot":"","sources":["../../../../../../../../../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"]}
1
+ {"version":3,"mappings":";AAAA,YAAYA,WAAW;AACvB,SAASC,QAAQ,QAAQ;AAGzB;;;AAGA,OAAO,MAAMC,6BAA8BC,SAA4B;EACrE,MAAM;IAAEC;IAAOC;EAAS,CAAE,GAAGJ,SAA2BE;EAExD,oBACEH,oBAACI,MAAME,IAAI,eAAKD,UAAUC,IAAI,GAC3BD,UAAUC,IAAI,CAACC,QAAQ,EACvBH,MAAMI,IAAI,iBAAIR,oBAACI,MAAMI,IAAI,eAAKH,UAAUG,IAAI;AAGnD","names":["React","getSlots","renderCardPreview_unstable","state","slots","slotProps","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"]}
@@ -1 +1 @@
1
- {"version":3,"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,GAAG,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","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"],"sourceRoot":"","sources":["../../../../../../../../../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"]}
1
+ {"version":3,"mappings":"AAAA,YAAYA,WAAW;AACvB,SAASC,qBAAqB,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ;AAEvE,SAASC,uBAAuB,QAAQ;AACxC,SAASC,qBAAqB,QAAQ;AAEtC;;;;;;;;;AASA,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC,QAAkD;EACjH,MAAM;IAAEC;EAAI,CAAE,GAAGF;EAEjB,MAAM;IACJG,qBAAqB;MAAEC;MAAgBC;MAAaC;MAAmBC;IAAc;EAAE,CACxF,GAAGV;EACJ,MAAMW,aAAaZ,cAAcK,KAAKR,MAAMgB,MAAM,CAAiB,IAAI;EAEvEhB,MAAMiB,SAAS,CAAC,MAAM;IACpB,IAAIN,kBAAkBC,aAAa;MACjC;IACF;IAEA,IAAIG,WAAWG,OAAO,IAAIH,WAAWG,OAAO,CAACC,UAAU,EAAE;MACvD,MAAMC,MAAML,WAAWG,OAAO,CAACC,UAAU,CAACE,aAAa,CAAoB,IAAGhB,sBAAsBiB,IAAK,QAAO;MAEhH,IAAIF,KAAK;QACP,MAAMG,YAAYH,IAAII,YAAY,CAAC;QACnC,MAAMC,kBAAkBL,IAAII,YAAY,CAAC;QAEzC,IAAIC,iBAAiB;UACnBX,eAAeW;QACjB,OAAO,IAAIL,IAAIM,GAAG,EAAE;UAClBb,kBAAkBO,IAAIM,GAAG;QAC3B,OAAO,IAAIH,WAAW;UACpBV,kBAAkBU;QACpB;MACF;IACF;EACF,GAAG,CAACV,mBAAmBF,gBAAgBI,YAAYH,aAAaE,eAAe;EAE/E,OAAO;IACLa,YAAY;MACVL,MAAM;MACNb,MAAM;IACR;IAEAa,MAAMrB,sBAAsB,OAAO;MACjCO,KAAKO;MACL,GAAGR;IACL;IACAE,MAAMP,iBAAiBO;EACzB;AACF","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"]}
@@ -1 +1 @@
1
- {"version":3,"mappings":"AACA,mBAAqBA,YAAY,QAAQ,gBAAgB;AAGzD;;;AAGA,OAAO,MAAMC,qBAAqB,GAAqC;EACrEC,IAAI,EAAE,iBAAiB;EACvBC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAkBhB;AAEF;;;AAGA,OAAO,MAAMC,6BAA6B,GAAIC,KAAuB,IAAsB;EACzF,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1BE,KAAK,CAACJ,IAAI,CAACM,SAAS,GAAGR,YAAY,CAACC,qBAAqB,CAACC,IAAI,EAAEK,MAAM,CAACL,IAAI,EAAEI,KAAK,CAACJ,IAAI,CAACM,SAAS,CAAC;EAElG,IAAIF,KAAK,CAACH,IAAI,EAAE;IACdG,KAAK,CAACH,IAAI,CAACK,SAAS,GAAGR,YAAY,CAACC,qBAAqB,CAACE,IAAI,EAAEI,MAAM,CAACJ,IAAI,EAAEG,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;;EAGpG,OAAOF,KAAK;AACd,CAAC","names":["mergeClasses","cardPreviewClassNames","root","logo","useStyles","useCardPreviewStyles_unstable","state","styles","className"],"sourceRoot":"","sources":["../../../../../../../../../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"]}
1
+ {"version":3,"mappings":"AACA,mBAAqBA,YAAY,QAAQ;AAGzC;;;AAGA,OAAO,MAAMC,wBAA0D;EACrEC,MAAM;EACNC,MAAM;AACR;AAEA,MAAMC,yBAAYC;EAAAA;IAAAA;IAAAA;IAAAA;IAAAA;EAAAA;EAAAA;IAAAA;IAAAA;IAAAA;IAAAA;IAAAA;EAAAA;AAAAA;EAAAA;AAAAA,EAkBlB;AAEA;;;AAGA,OAAO,MAAMC,gCAAiCC,SAA8C;EAC1F,MAAMC,SAASJ;EACfG,MAAML,IAAI,CAACO,SAAS,GAAGT,aAAaC,sBAAsBC,IAAI,EAAEM,OAAON,IAAI,EAAEK,MAAML,IAAI,CAACO,SAAS;EAEjG,IAAIF,MAAMJ,IAAI,EAAE;IACdI,MAAMJ,IAAI,CAACM,SAAS,GAAGT,aAAaC,sBAAsBE,IAAI,EAAEK,OAAOL,IAAI,EAAEI,MAAMJ,IAAI,CAACM,SAAS;EACnG;EAEA,OAAOF;AACT","names":["mergeClasses","cardPreviewClassNames","root","logo","useStyles","makeStyles","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"]}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"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","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"],"sourceRoot":"","sources":["../../../../../../../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"]}
1
+ {"version":3,"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","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"]}
@@ -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,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-card/src/Card.ts"],"sourcesContent":["export * from './components/Card/index';\n"]}
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,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-card/src/CardFooter.ts"],"sourcesContent":["export * from './components/CardFooter/index';\n"]}
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,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-card/src/CardHeader.ts"],"sourcesContent":["export * from './components/CardHeader/index';\n"]}
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,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-card/src/CardPreview.ts"],"sourcesContent":["export * from './components/CardPreview/index';\n"]}
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,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAGA;AAEA;;;AAGaA,YAAI,gBAAmCC,KAAK,CAACC,UAAU,CAAiB,CAACC,KAAK,EAAEC,GAAG,KAAI;EAClG,MAAMC,KAAK,GAAGC,0BAAgB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAC1C,MAAMG,gBAAgB,GAAGC,yCAAmB,CAACH,KAAK,CAAC;EAEnDI,sCAAsB,CAACJ,KAAK,CAAC;EAC7B,OAAOK,gCAAmB,CAACL,KAAK,EAAEE,gBAAgB,CAAC;AACrD,CAAC,CAAC;AAEFP,YAAI,CAACW,WAAW,GAAG,MAAM","names":["exports","React","forwardRef","props","ref","state","useCard_1","cardContextValue","useCardContextValue_1","useCardStyles_1","renderCard_1","displayName"],"sourceRoot":"","sources":["../../../../../../../../../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"]}
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,"mappings":"","names":[],"sourceRoot":"","sources":[],"sourcesContent":[]}
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,32 @@
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
+ const useCardContext_unstable = ()=>_react.useContext(cardContext) ?? cardContextDefaultValue; //# sourceMappingURL=CardContext.js.map
31
+
36
32
  //# sourceMappingURL=CardContext.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AAGA,MAAMA,WAAW,gBAAGC,KAAK,CAACC,aAAa,CAA+BC,SAAS,CAAC;AAEhF;;;AAGaC,+BAAuB,GAAqB;EACvDC,mBAAmB,EAAE;IACnBC,WAAW,EAAEH,SAAS;IACtBI,cAAc;MACZ;IAAA,CACD;IACDC,cAAc,EAAEL,SAAS;IACzBM,iBAAiB;MACf;IAAA;;CAGL;AAED;;;AAGaL,oBAAY,GAAGJ,WAAW,CAACU,QAAQ;AAEhD;;;AAGO,MAAMC,uBAAuB,GAAG,MAAK;EAAA;EAAC,kBAAK,CAACC,UAAU,CAACZ,WAAW,CAAC,mCAAII,+BAAuB;AAAA;AAAxFA,+BAAuB","names":["cardContext","React","createContext","undefined","exports","selectableA11yProps","referenceId","setReferenceId","referenceLabel","setReferenceLabel","Provider","useCardContext_unstable","useContext"],"sourceRoot":"","sources":["../../../../../../../../../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"]}
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;\n/**\n * @internal\n */\nexport const useCardContext_unstable = () => React.useContext(cardContext) ?? cardContextDefaultValue;\n//# sourceMappingURL=CardContext.js.map"],"names":["cardContextDefaultValue","CardProvider","useCardContext_unstable","cardContext","React","createContext","undefined","selectableA11yProps","referenceId","setReferenceId","referenceLabel","setReferenceLabel","Provider","useContext"],"mappings":";;;;;;;;;;;IAKaA,uBAAuB,MAAvBA;IAaAC,YAAY,MAAZA;IAIAC,uBAAuB,MAAvBA;;;6DAtBU;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;AAIzC,MAAMV,0BAA0B,IAAME,OAAMS,UAAU,CAACV,gBAAgBH,yBAC9E,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,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"","sources":["../../../../../../../../../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"]}
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,22 @@
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 _interopRequireDefault = require("@swc/helpers/lib/_interop_require_default.js").default;
10
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
11
+ const _extends = require("@swc/helpers/lib/_extends.js").default;
12
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
13
+ const _reactUtilities = require("@fluentui/react-utilities");
14
+ const _cardContext = require("./CardContext");
15
+ const renderCard_unstable = (state, cardContextValue)=>{
16
+ const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
17
+ return /*#__PURE__*/ _react.createElement(slots.root, _extends({}, slotProps.root), /*#__PURE__*/ _react.createElement(_cardContext.CardProvider, {
18
+ value: cardContextValue
19
+ }, slots.checkbox ? /*#__PURE__*/ _react.createElement(slots.checkbox, _extends({}, slotProps.checkbox)) : null, slots.floatingAction ? /*#__PURE__*/ _react.createElement(slots.floatingAction, _extends({}, slotProps.floatingAction)) : null, slotProps.root.children));
20
+ }; //# sourceMappingURL=renderCard.js.map
21
+
29
22
  //# sourceMappingURL=renderCard.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AACA;AAEA;AAEA;;;AAGO,MAAMA,mBAAmB,GAAG,CAACC,KAAgB,EAAEC,gBAAkC,KAAI;EAC1F,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAYJ,KAAK,CAAC;EAEvD,OACEK,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,GAC5BD,oBAACE,0BAAY;IAACC,KAAK,EAAEP;EAAgB,GAClCC,KAAK,CAACO,QAAQ,GAAGJ,oBAACH,KAAK,CAACO,QAAQ;IAAA,GAAKN,SAAS,CAACM;EAAQ,EAAI,GAAG,IAAI,EAClEP,KAAK,CAACQ,cAAc,GAAGL,oBAACH,KAAK,CAACQ,cAAc;IAAA,GAAKP,SAAS,CAACO;EAAc,EAAI,GAAG,IAAI,EACpFP,SAAS,CAACG,IAAI,CAACK,QAAQ,CACX,CACJ;AAEjB,CAAC;AAZYC,2BAAmB","names":["renderCard_unstable","state","cardContextValue","slots","slotProps","react_utilities_1","React","root","CardContext_1","value","checkbox","floatingAction","children","exports"],"sourceRoot":"","sources":["../../../../../../../../../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"]}
1
+ {"version":3,"sources":["../../../lib/components/Card/renderCard.js"],"sourcesContent":["import _extends from \"@swc/helpers/src/_extends.mjs\";\nimport * 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, _extends({}, slotProps.root), /*#__PURE__*/React.createElement(CardProvider, {\n value: cardContextValue\n }, slots.checkbox ? /*#__PURE__*/React.createElement(slots.checkbox, _extends({}, slotProps.checkbox)) : null, slots.floatingAction ? /*#__PURE__*/React.createElement(slots.floatingAction, _extends({}, slotProps.floatingAction)) : null, slotProps.root.children));\n};\n//# sourceMappingURL=renderCard.js.map"],"names":["renderCard_unstable","state","cardContextValue","slots","slotProps","getSlots","React","createElement","root","_extends","CardProvider","value","checkbox","floatingAction","children"],"mappings":";;;;+BAOaA;;aAAAA;;;;yBAPQ;6DACE;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,EAAEC,SAAS,CAAC,GAAGL,UAAUI,IAAI,GAAG,WAAW,GAAEF,OAAMC,aAAa,CAACG,yBAAY,EAAE;QAC/HC,OAAOT;IACT,GAAGC,MAAMS,QAAQ,GAAG,WAAW,GAAEN,OAAMC,aAAa,CAACJ,MAAMS,QAAQ,EAAEH,SAAS,CAAC,GAAGL,UAAUQ,QAAQ,KAAK,IAAI,EAAET,MAAMU,cAAc,GAAG,WAAW,GAAEP,OAAMC,aAAa,CAACJ,MAAMU,cAAc,EAAEJ,SAAS,CAAC,GAAGL,UAAUS,cAAc,KAAK,IAAI,EAAET,UAAUI,IAAI,CAACM,QAAQ;AACtQ,GACA,sCAAsC"}