@fluentui/react-card 9.0.0-beta.5 → 9.0.0-beta.9

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 (147) hide show
  1. package/CHANGELOG.json +248 -9
  2. package/CHANGELOG.md +62 -10
  3. package/README.md +3 -1
  4. package/Spec.md +523 -0
  5. package/assets/Card.png +0 -0
  6. package/assets/CardHeader.png +0 -0
  7. package/assets/CardPreview.png +0 -0
  8. package/assets/context-interaction-keyboard.png +0 -0
  9. package/assets/context-interaction-mouse.png +0 -0
  10. package/assets/context-narrator.png +0 -0
  11. package/assets/disabled-narrator.png +0 -0
  12. package/assets/disabled.png +0 -0
  13. package/assets/interactive-interaction-keyboard.png +0 -0
  14. package/assets/interactive-interaction-mouse.png +0 -0
  15. package/assets/interactive-narrator.png +0 -0
  16. package/assets/non-interactive-interaction-keyboard.png +0 -0
  17. package/assets/non-interactive-interaction-mouse.png +0 -0
  18. package/assets/non-interactive-narrator.png +0 -0
  19. package/assets/non-interactive-selectable-interaction-keyboard.png +0 -0
  20. package/assets/non-interactive-selectable-interaction-mouse.png +0 -0
  21. package/assets/selectable-interaction-keyboard.png +0 -0
  22. package/assets/selectable-interaction-mouse.png +0 -0
  23. package/assets/selectable-narrator.png +0 -0
  24. package/dist/react-card.d.ts +36 -46
  25. package/lib/Card.js.map +1 -1
  26. package/lib/CardFooter.js.map +1 -1
  27. package/lib/CardHeader.js.map +1 -1
  28. package/lib/CardPreview.js.map +1 -1
  29. package/lib/components/Card/Card.js +6 -6
  30. package/lib/components/Card/Card.js.map +1 -1
  31. package/lib/components/Card/Card.types.d.ts +5 -3
  32. package/lib/components/Card/Card.types.js.map +1 -1
  33. package/lib/components/Card/index.js.map +1 -1
  34. package/lib/components/Card/renderCard.d.ts +1 -1
  35. package/lib/components/Card/renderCard.js +3 -2
  36. package/lib/components/Card/renderCard.js.map +1 -1
  37. package/lib/components/Card/useCard.d.ts +3 -3
  38. package/lib/components/Card/useCard.js +7 -3
  39. package/lib/components/Card/useCard.js.map +1 -1
  40. package/lib/components/Card/useCardStyles.d.ts +1 -1
  41. package/lib/components/Card/useCardStyles.js +127 -23
  42. package/lib/components/Card/useCardStyles.js.map +1 -1
  43. package/lib/components/CardFooter/CardFooter.js +6 -6
  44. package/lib/components/CardFooter/CardFooter.js.map +1 -1
  45. package/lib/components/CardFooter/CardFooter.types.d.ts +3 -3
  46. package/lib/components/CardFooter/CardFooter.types.js.map +1 -1
  47. package/lib/components/CardFooter/index.js.map +1 -1
  48. package/lib/components/CardFooter/renderCardFooter.d.ts +1 -1
  49. package/lib/components/CardFooter/renderCardFooter.js +5 -4
  50. package/lib/components/CardFooter/renderCardFooter.js.map +1 -1
  51. package/lib/components/CardFooter/useCardFooter.d.ts +4 -8
  52. package/lib/components/CardFooter/useCardFooter.js +3 -8
  53. package/lib/components/CardFooter/useCardFooter.js.map +1 -1
  54. package/lib/components/CardFooter/useCardFooterStyles.d.ts +1 -1
  55. package/lib/components/CardFooter/useCardFooterStyles.js +5 -4
  56. package/lib/components/CardFooter/useCardFooterStyles.js.map +1 -1
  57. package/lib/components/CardHeader/CardHeader.js +6 -6
  58. package/lib/components/CardHeader/CardHeader.js.map +1 -1
  59. package/lib/components/CardHeader/CardHeader.types.d.ts +8 -8
  60. package/lib/components/CardHeader/CardHeader.types.js.map +1 -1
  61. package/lib/components/CardHeader/index.js.map +1 -1
  62. package/lib/components/CardHeader/renderCardHeader.d.ts +1 -1
  63. package/lib/components/CardHeader/renderCardHeader.js +9 -4
  64. package/lib/components/CardHeader/renderCardHeader.js.map +1 -1
  65. package/lib/components/CardHeader/useCardHeader.d.ts +4 -5
  66. package/lib/components/CardHeader/useCardHeader.js +3 -4
  67. package/lib/components/CardHeader/useCardHeader.js.map +1 -1
  68. package/lib/components/CardHeader/useCardHeaderStyles.d.ts +1 -1
  69. package/lib/components/CardHeader/useCardHeaderStyles.js +5 -4
  70. package/lib/components/CardHeader/useCardHeaderStyles.js.map +1 -1
  71. package/lib/components/CardPreview/CardPreview.js +6 -6
  72. package/lib/components/CardPreview/CardPreview.js.map +1 -1
  73. package/lib/components/CardPreview/CardPreview.types.d.ts +3 -3
  74. package/lib/components/CardPreview/CardPreview.types.js.map +1 -1
  75. package/lib/components/CardPreview/index.js.map +1 -1
  76. package/lib/components/CardPreview/renderCardPreview.d.ts +1 -1
  77. package/lib/components/CardPreview/renderCardPreview.js +5 -4
  78. package/lib/components/CardPreview/renderCardPreview.js.map +1 -1
  79. package/lib/components/CardPreview/useCardPreview.d.ts +4 -8
  80. package/lib/components/CardPreview/useCardPreview.js +3 -8
  81. package/lib/components/CardPreview/useCardPreview.js.map +1 -1
  82. package/lib/components/CardPreview/useCardPreviewStyles.d.ts +1 -1
  83. package/lib/components/CardPreview/useCardPreviewStyles.js +3 -7
  84. package/lib/components/CardPreview/useCardPreviewStyles.js.map +1 -1
  85. package/lib/index.js.map +1 -1
  86. package/lib-commonjs/Card.js.map +1 -1
  87. package/lib-commonjs/CardFooter.js.map +1 -1
  88. package/lib-commonjs/CardHeader.js.map +1 -1
  89. package/lib-commonjs/CardPreview.js.map +1 -1
  90. package/lib-commonjs/components/Card/Card.js +3 -3
  91. package/lib-commonjs/components/Card/Card.js.map +1 -1
  92. package/lib-commonjs/components/Card/Card.types.d.ts +5 -3
  93. package/lib-commonjs/components/Card/Card.types.js.map +1 -1
  94. package/lib-commonjs/components/Card/index.js.map +1 -1
  95. package/lib-commonjs/components/Card/renderCard.d.ts +1 -1
  96. package/lib-commonjs/components/Card/renderCard.js +5 -4
  97. package/lib-commonjs/components/Card/renderCard.js.map +1 -1
  98. package/lib-commonjs/components/Card/useCard.d.ts +3 -3
  99. package/lib-commonjs/components/Card/useCard.js +9 -5
  100. package/lib-commonjs/components/Card/useCard.js.map +1 -1
  101. package/lib-commonjs/components/Card/useCardStyles.d.ts +1 -1
  102. package/lib-commonjs/components/Card/useCardStyles.js +131 -26
  103. package/lib-commonjs/components/Card/useCardStyles.js.map +1 -1
  104. package/lib-commonjs/components/CardFooter/CardFooter.js +3 -3
  105. package/lib-commonjs/components/CardFooter/CardFooter.js.map +1 -1
  106. package/lib-commonjs/components/CardFooter/CardFooter.types.d.ts +3 -3
  107. package/lib-commonjs/components/CardFooter/CardFooter.types.js.map +1 -1
  108. package/lib-commonjs/components/CardFooter/index.js.map +1 -1
  109. package/lib-commonjs/components/CardFooter/renderCardFooter.d.ts +1 -1
  110. package/lib-commonjs/components/CardFooter/renderCardFooter.js +7 -7
  111. package/lib-commonjs/components/CardFooter/renderCardFooter.js.map +1 -1
  112. package/lib-commonjs/components/CardFooter/useCardFooter.d.ts +4 -8
  113. package/lib-commonjs/components/CardFooter/useCardFooter.js +6 -11
  114. package/lib-commonjs/components/CardFooter/useCardFooter.js.map +1 -1
  115. package/lib-commonjs/components/CardFooter/useCardFooterStyles.d.ts +1 -1
  116. package/lib-commonjs/components/CardFooter/useCardFooterStyles.js +10 -9
  117. package/lib-commonjs/components/CardFooter/useCardFooterStyles.js.map +1 -1
  118. package/lib-commonjs/components/CardHeader/CardHeader.js +3 -3
  119. package/lib-commonjs/components/CardHeader/CardHeader.js.map +1 -1
  120. package/lib-commonjs/components/CardHeader/CardHeader.types.d.ts +8 -8
  121. package/lib-commonjs/components/CardHeader/CardHeader.types.js.map +1 -1
  122. package/lib-commonjs/components/CardHeader/index.js.map +1 -1
  123. package/lib-commonjs/components/CardHeader/renderCardHeader.d.ts +1 -1
  124. package/lib-commonjs/components/CardHeader/renderCardHeader.js +11 -7
  125. package/lib-commonjs/components/CardHeader/renderCardHeader.js.map +1 -1
  126. package/lib-commonjs/components/CardHeader/useCardHeader.d.ts +4 -5
  127. package/lib-commonjs/components/CardHeader/useCardHeader.js +6 -7
  128. package/lib-commonjs/components/CardHeader/useCardHeader.js.map +1 -1
  129. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.d.ts +1 -1
  130. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js +11 -10
  131. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js.map +1 -1
  132. package/lib-commonjs/components/CardPreview/CardPreview.js +3 -3
  133. package/lib-commonjs/components/CardPreview/CardPreview.js.map +1 -1
  134. package/lib-commonjs/components/CardPreview/CardPreview.types.d.ts +3 -3
  135. package/lib-commonjs/components/CardPreview/CardPreview.types.js.map +1 -1
  136. package/lib-commonjs/components/CardPreview/index.js.map +1 -1
  137. package/lib-commonjs/components/CardPreview/renderCardPreview.d.ts +1 -1
  138. package/lib-commonjs/components/CardPreview/renderCardPreview.js +7 -7
  139. package/lib-commonjs/components/CardPreview/renderCardPreview.js.map +1 -1
  140. package/lib-commonjs/components/CardPreview/useCardPreview.d.ts +4 -8
  141. package/lib-commonjs/components/CardPreview/useCardPreview.js +6 -11
  142. package/lib-commonjs/components/CardPreview/useCardPreview.js.map +1 -1
  143. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.d.ts +1 -1
  144. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js +8 -12
  145. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js.map +1 -1
  146. package/lib-commonjs/index.js.map +1 -1
  147. package/package.json +10 -11
@@ -1,15 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import { getSlots } from '@fluentui/react-utilities';
3
- import { cardFooterShorthandProps } from './useCardFooter';
4
3
  /**
5
4
  * Render the final JSX of CardFooter
6
5
  */
7
6
 
8
- export const renderCardFooter = state => {
7
+ export const renderCardFooter_unstable = state => {
9
8
  const {
10
9
  slots,
11
10
  slotProps
12
- } = getSlots(state, cardFooterShorthandProps);
13
- return /*#__PURE__*/React.createElement(slots.root, Object.assign({}, slotProps.root), slotProps.root.children, /*#__PURE__*/React.createElement(slots.action, Object.assign({}, slotProps.action)));
11
+ } = getSlots(state);
12
+ return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
13
+ }, slotProps.root.children, slots.action && /*#__PURE__*/React.createElement(slots.action, { ...slotProps.action
14
+ }));
14
15
  };
15
16
  //# sourceMappingURL=renderCardFooter.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CardFooter/renderCardFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,wBAAT,QAAyC,iBAAzC;AAGA;;AAEG;;AACH,OAAO,MAAM,gBAAgB,GAAI,KAAD,IAA2B;AACzD,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAkB,KAAlB,EAAyB,wBAAzB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,SAAS,CAAC,IAAV,CAAe,QADlB,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,MAAf,CAAb,CAFF,CADF;AAMD,CATM","sourceRoot":""}
1
+ {"version":3,"sources":["components/CardFooter/renderCardFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,yBAAyB,GAAI,KAAD,IAA2B;AAClE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAkB,KAAlB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,SAAS,CAAC,IAAV,CAAe,QADlB,EAEG,KAAK,CAAC,MAAN,iBAAgB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,EAAA,GAAK,SAAS,CAAC;AAAf,GAAb,CAFnB,CADF;AAMD,CATM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CardFooterSlots, CardFooterState } from './CardFooter.types';\n\n/**\n * Render the final JSX of CardFooter\n */\nexport const renderCardFooter_unstable = (state: CardFooterState) => {\n const { slots, slotProps } = getSlots<CardFooterSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slotProps.root.children}\n {slots.action && <slots.action {...slotProps.action} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -1,16 +1,12 @@
1
1
  import * as React from 'react';
2
- import type { CardFooterProps, CardFooterSlots, CardFooterState } from './CardFooter.types';
3
- /**
4
- * Array of all shorthand properties listed in CardFooterShorthandProps
5
- */
6
- export declare const cardFooterShorthandProps: Array<keyof CardFooterSlots>;
2
+ import type { CardFooterProps, CardFooterState } from './CardFooter.types';
7
3
  /**
8
4
  * Create the state required to render CardFooter.
9
5
  *
10
- * The returned state can be modified with hooks such as useCardFooterStyles,
11
- * before being passed to renderCardFooter.
6
+ * The returned state can be modified with hooks such as useCardFooterStyles_unstable,
7
+ * before being passed to renderCardFooter_unstable.
12
8
  *
13
9
  * @param props - props from this instance of CardFooter
14
10
  * @param ref - reference to root HTMLElement of CardFooter
15
11
  */
16
- export declare const useCardFooter: (props: CardFooterProps, ref: React.Ref<HTMLElement>) => CardFooterState;
12
+ export declare const useCardFooter_unstable: (props: CardFooterProps, ref: React.Ref<HTMLElement>) => CardFooterState;
@@ -1,20 +1,15 @@
1
1
  import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
2
- /**
3
- * Array of all shorthand properties listed in CardFooterShorthandProps
4
- */
5
-
6
- export const cardFooterShorthandProps = ['root', 'action'];
7
2
  /**
8
3
  * Create the state required to render CardFooter.
9
4
  *
10
- * The returned state can be modified with hooks such as useCardFooterStyles,
11
- * before being passed to renderCardFooter.
5
+ * The returned state can be modified with hooks such as useCardFooterStyles_unstable,
6
+ * before being passed to renderCardFooter_unstable.
12
7
  *
13
8
  * @param props - props from this instance of CardFooter
14
9
  * @param ref - reference to root HTMLElement of CardFooter
15
10
  */
16
11
 
17
- export const useCardFooter = (props, ref) => {
12
+ export const useCardFooter_unstable = (props, ref) => {
18
13
  const {
19
14
  action
20
15
  } = props;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CardFooter/useCardFooter.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;AAEG;;AACH,OAAO,MAAM,wBAAwB,GAAiC,CAAC,MAAD,EAAS,QAAT,CAA/D;AAEP;;;;;;;;AAQG;;AACH,OAAO,MAAM,aAAa,GAAG,CAAC,KAAD,EAAyB,GAAzB,KAAyE;AACpG,QAAM;AAAE,IAAA;AAAF,MAAa,KAAnB;AAEA,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,MAAM,EAAE;AAFE,KADP;AAML,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,GADiC;AAEjC,SAAG;AAF8B,KAAR,CANtB;AAUL,IAAA,MAAM,EAAE,gBAAgB,CAAC,MAAD;AAVnB,GAAP;AAYD,CAfM","sourceRoot":""}
1
+ {"version":3,"sources":["components/CardFooter/useCardFooter.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,sBAAsB,GAAG,CAAC,KAAD,EAAyB,GAAzB,KAAyE;AAC7G,QAAM;AAAE,IAAA;AAAF,MAAa,KAAnB;AAEA,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,MAAM,EAAE;AAFE,KADP;AAML,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,GADiC;AAEjC,SAAG;AAF8B,KAAR,CANtB;AAUL,IAAA,MAAM,EAAE,gBAAgB,CAAC,MAAD;AAVnB,GAAP;AAYD,CAfM","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"],"sourceRoot":"../src/"}
@@ -3,4 +3,4 @@ export declare const cardFooterClassName = "fui-CardFooter";
3
3
  /**
4
4
  * Apply styling to the CardFooter slots based on the state
5
5
  */
6
- export declare const useCardFooterStyles: (state: CardFooterState) => CardFooterState;
6
+ export declare const useCardFooterStyles_unstable: (state: CardFooterState) => CardFooterState;
@@ -1,4 +1,4 @@
1
- import { __styles, mergeClasses } from '@fluentui/react-make-styles';
1
+ import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
2
  export const cardFooterClassName = 'fui-CardFooter';
3
3
  /**
4
4
  * Styles for the root slot
@@ -8,20 +8,21 @@ const useStyles = /*#__PURE__*/__styles({
8
8
  "root": {
9
9
  "mc9l5x": "f22iagw",
10
10
  "Beiy3e4": "f1063pyq",
11
- "rmohyg": "fsbu5mz"
11
+ "i8kkvl": "f4akndk",
12
+ "Belr9w4": "fe5j3v"
12
13
  },
13
14
  "action": {
14
15
  "Frg6f3": ["fcgxt0o", "f1ujusj6"]
15
16
  }
16
17
  }, {
17
- "d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".fsbu5mz{gap:12px;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}"]
18
+ "d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".f4akndk{-webkit-column-gap:12px;column-gap:12px;}", ".fe5j3v{row-gap:12px;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}"]
18
19
  });
19
20
  /**
20
21
  * Apply styling to the CardFooter slots based on the state
21
22
  */
22
23
 
23
24
 
24
- export const useCardFooterStyles = state => {
25
+ export const useCardFooterStyles_unstable = state => {
25
26
  const styles = useStyles();
26
27
  state.root.className = mergeClasses(cardFooterClassName, styles.root, state.root.className);
27
28
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CardFooter/useCardFooterStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,6BAAzC;AAGA,OAAO,MAAM,mBAAmB,GAAG,gBAA5B;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAWA;;AAEG;;;AACH,OAAO,MAAM,mBAAmB,GAAI,KAAD,IAA4C;AAC7E,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,mBAAD,EAAsB,MAAM,CAAC,IAA7B,EAAmC,KAAK,CAAC,IAAN,CAAW,SAA9C,CAAnC;;AAEA,MAAI,KAAK,CAAC,MAAV,EAAkB;AAChB,IAAA,KAAK,CAAC,MAAN,CAAa,SAAb,GAAyB,YAAY,CAAC,MAAM,CAAC,MAAR,EAAgB,KAAK,CAAC,MAAN,CAAa,SAA7B,CAArC;AACD;;AAED,SAAO,KAAP;AACD,CATM","sourceRoot":""}
1
+ {"version":3,"sources":["components/CardFooter/useCardFooterStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AAGA,OAAO,MAAM,mBAAmB,GAAG,gBAA5B;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAWA;;AAEG;;;AACH,OAAO,MAAM,4BAA4B,GAAI,KAAD,IAA4C;AACtF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,mBAAD,EAAsB,MAAM,CAAC,IAA7B,EAAmC,KAAK,CAAC,IAAN,CAAW,SAA9C,CAAnC;;AAEA,MAAI,KAAK,CAAC,MAAV,EAAkB;AAChB,IAAA,KAAK,CAAC,MAAN,CAAa,SAAb,GAAyB,YAAY,CAAC,MAAM,CAAC,MAAR,EAAgB,KAAK,CAAC,MAAN,CAAa,SAA7B,CAArC;AACD;;AAED,SAAO,KAAP;AACD,CATM","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { CardFooterState } from './CardFooter.types';\n\nexport const cardFooterClassName = 'fui-CardFooter';\n\n/**\n * Styles for the root slot\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(cardFooterClassName, styles.root, state.root.className);\n\n if (state.action) {\n state.action.className = mergeClasses(styles.action, state.action.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { useCardHeader } from './useCardHeader';
3
- import { renderCardHeader } from './renderCardHeader';
4
- import { useCardHeaderStyles } from './useCardHeaderStyles';
2
+ import { useCardHeader_unstable } from './useCardHeader';
3
+ import { renderCardHeader_unstable } from './renderCardHeader';
4
+ import { useCardHeaderStyles_unstable } from './useCardHeaderStyles';
5
5
  /**
6
6
  * Component to render an image, text and an action in a Card component.
7
7
  */
8
8
 
9
9
  export const CardHeader = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useCardHeader(props, ref);
11
- useCardHeaderStyles(state);
12
- return renderCardHeader(state);
10
+ const state = useCardHeader_unstable(props, ref);
11
+ useCardHeaderStyles_unstable(state);
12
+ return renderCardHeader_unstable(state);
13
13
  });
14
14
  CardHeader.displayName = 'CardHeader';
15
15
  //# sourceMappingURL=CardHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CardHeader/CardHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,aAAT,QAA8B,iBAA9B;AACA,SAAS,gBAAT,QAAiC,oBAAjC;AACA,SAAS,mBAAT,QAAoC,uBAApC;AAIA;;AAEG;;AACH,OAAO,MAAM,UAAU,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC9F,QAAM,KAAK,GAAG,aAAa,CAAC,KAAD,EAAQ,GAAR,CAA3B;AAEA,EAAA,mBAAmB,CAAC,KAAD,CAAnB;AACA,SAAO,gBAAgB,CAAC,KAAD,CAAvB;AACD,CAL+D,CAAzD;AAOP,UAAU,CAAC,WAAX,GAAyB,YAAzB","sourceRoot":""}
1
+ {"version":3,"sources":["components/CardHeader/CardHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AACA,SAAS,yBAAT,QAA0C,oBAA1C;AACA,SAAS,4BAAT,QAA6C,uBAA7C;AAIA;;AAEG;;AACH,OAAO,MAAM,UAAU,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC9F,QAAM,KAAK,GAAG,sBAAsB,CAAC,KAAD,EAAQ,GAAR,CAApC;AAEA,EAAA,4BAA4B,CAAC,KAAD,CAA5B;AACA,SAAO,yBAAyB,CAAC,KAAD,CAAhC;AACD,CAL+D,CAAzD;AAOP,UAAU,CAAC,WAAX,GAAyB,YAAzB","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"],"sourceRoot":"../src/"}
@@ -1,16 +1,16 @@
1
- import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
1
+ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
2
  export declare type CardHeaderSlots = {
3
- root: IntrinsicShorthandProps<'div'>;
4
- image: IntrinsicShorthandProps<'div'>;
5
- content?: IntrinsicShorthandProps<'div'>;
6
- header: IntrinsicShorthandProps<'span'>;
7
- description: IntrinsicShorthandProps<'span'>;
8
- action?: IntrinsicShorthandProps<'div'>;
3
+ root: Slot<'div'>;
4
+ image: Slot<'div'>;
5
+ content?: Slot<'div'>;
6
+ header: Slot<'span'>;
7
+ description: Slot<'span'>;
8
+ action?: Slot<'div'>;
9
9
  };
10
10
  /**
11
11
  * CardHeader props
12
12
  */
13
- export declare type CardHeaderProps = ComponentProps<CardHeaderSlots>;
13
+ export declare type CardHeaderProps = ComponentProps<Partial<CardHeaderSlots>>;
14
14
  /**
15
15
  * State used in rendering CardHeader
16
16
  */
@@ -1 +1 @@
1
- {"version":3,"file":"CardHeader.types.js","sourceRoot":"","sources":["../../../src/components/CardHeader/CardHeader.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"CardHeader.types.js","sourceRoot":"../src/","sources":["components/CardHeader/CardHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type CardHeaderSlots = {\n root: Slot<'div'>;\n image: Slot<'div'>;\n content?: Slot<'div'>;\n header: Slot<'span'>;\n description: Slot<'span'>;\n action?: Slot<'div'>;\n};\n\n/**\n * CardHeader 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":["../../../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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["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"]}
@@ -2,4 +2,4 @@ import type { CardHeaderState } from './CardHeader.types';
2
2
  /**
3
3
  * Render the final JSX of CardHeader
4
4
  */
5
- export declare const renderCardHeader: (state: CardHeaderState) => JSX.Element;
5
+ export declare const renderCardHeader_unstable: (state: CardHeaderState) => JSX.Element;
@@ -1,15 +1,20 @@
1
1
  import * as React from 'react';
2
2
  import { getSlots } from '@fluentui/react-utilities';
3
- import { cardHeaderShorthandProps } from './useCardHeader';
4
3
  /**
5
4
  * Render the final JSX of CardHeader
6
5
  */
7
6
 
8
- export const renderCardHeader = state => {
7
+ export const renderCardHeader_unstable = state => {
9
8
  const {
10
9
  slots,
11
10
  slotProps
12
- } = getSlots(state, cardHeaderShorthandProps);
13
- return /*#__PURE__*/React.createElement(slots.root, Object.assign({}, slotProps.root), /*#__PURE__*/React.createElement(slots.image, Object.assign({}, slotProps.image)), /*#__PURE__*/React.createElement(slots.content, Object.assign({}, slotProps.content), /*#__PURE__*/React.createElement(slots.header, Object.assign({}, slotProps.header)), /*#__PURE__*/React.createElement(slots.description, Object.assign({}, slotProps.description))), /*#__PURE__*/React.createElement(slots.action, Object.assign({}, slotProps.action)));
11
+ } = getSlots(state);
12
+ return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
13
+ }, /*#__PURE__*/React.createElement(slots.image, { ...slotProps.image
14
+ }), slots.content && /*#__PURE__*/React.createElement(slots.content, { ...slotProps.content
15
+ }, /*#__PURE__*/React.createElement(slots.header, { ...slotProps.header
16
+ }), /*#__PURE__*/React.createElement(slots.description, { ...slotProps.description
17
+ })), slots.action && /*#__PURE__*/React.createElement(slots.action, { ...slotProps.action
18
+ }));
14
19
  };
15
20
  //# sourceMappingURL=renderCardHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CardHeader/renderCardHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAEA,SAAS,wBAAT,QAAyC,iBAAzC;AAEA;;AAEG;;AACH,OAAO,MAAM,gBAAgB,GAAI,KAAD,IAA2B;AACzD,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAkB,KAAlB,EAAyB,wBAAzB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,KAAf,CAAZ,CADF,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,OAAf,CAAd,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,MAAf,CAAb,CADF,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,WAAP,EAAkB,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,WAAf,CAAlB,CAFF,CAFF,eAME,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,MAAf,CAAb,CANF,CADF;AAUD,CAbM","sourceRoot":""}
1
+ {"version":3,"sources":["components/CardHeader/renderCardHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,yBAAyB,GAAI,KAAD,IAA2B;AAClE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAkB,KAAlB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CADF,EAEG,KAAK,CAAC,OAAN,iBACC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;AAAf,GAAd,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,EAAA,GAAK,SAAS,CAAC;AAAf,GAAb,CADF,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,WAAP,EAAkB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAlB,CAFF,CAHJ,EAQG,KAAK,CAAC,MAAN,iBAAgB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,EAAA,GAAK,SAAS,CAAC;AAAf,GAAb,CARnB,CADF;AAYD,CAfM","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 {...slotProps.image} />\n {slots.content && (\n <slots.content {...slotProps.content}>\n <slots.header {...slotProps.header} />\n <slots.description {...slotProps.description} />\n </slots.content>\n )}\n {slots.action && <slots.action {...slotProps.action} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -1,13 +1,12 @@
1
1
  import * as React from 'react';
2
- import type { CardHeaderProps, CardHeaderSlots, CardHeaderState } from './CardHeader.types';
3
- export declare const cardHeaderShorthandProps: Array<keyof CardHeaderSlots>;
2
+ import type { CardHeaderProps, CardHeaderState } from './CardHeader.types';
4
3
  /**
5
4
  * Create the state required to render CardHeader.
6
5
  *
7
- * The returned state can be modified with hooks such as useCardHeaderStyles,
8
- * before being passed to renderCardHeader.
6
+ * The returned state can be modified with hooks such as useCardHeaderStyles_unstable,
7
+ * before being passed to renderCardHeader_unstable.
9
8
  *
10
9
  * @param props - props from this instance of CardHeader
11
10
  * @param ref - reference to root HTMLElement of CardHeader
12
11
  */
13
- export declare const useCardHeader: (props: CardHeaderProps, ref: React.Ref<HTMLElement>) => CardHeaderState;
12
+ export declare const useCardHeader_unstable: (props: CardHeaderProps, ref: React.Ref<HTMLElement>) => CardHeaderState;
@@ -1,17 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
3
- export const cardHeaderShorthandProps = ['root', 'image', 'content', 'header', 'description', 'action'];
4
3
  /**
5
4
  * Create the state required to render CardHeader.
6
5
  *
7
- * The returned state can be modified with hooks such as useCardHeaderStyles,
8
- * before being passed to renderCardHeader.
6
+ * The returned state can be modified with hooks such as useCardHeaderStyles_unstable,
7
+ * before being passed to renderCardHeader_unstable.
9
8
  *
10
9
  * @param props - props from this instance of CardHeader
11
10
  * @param ref - reference to root HTMLElement of CardHeader
12
11
  */
13
12
 
14
- export const useCardHeader = (props, ref) => {
13
+ export const useCardHeader_unstable = (props, ref) => {
15
14
  const {
16
15
  image,
17
16
  content,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CardHeader/useCardHeader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA,OAAO,MAAM,wBAAwB,GAAiC,CACpE,MADoE,EAEpE,OAFoE,EAGpE,SAHoE,EAIpE,QAJoE,EAKpE,aALoE,EAMpE,QANoE,CAA/D;AASP;;;;;;;;AAQG;;AACH,OAAO,MAAM,aAAa,GAAG,CAAC,KAAD,EAAyB,GAAzB,KAAyE;AACpG,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA,OAAT;AAAkB,IAAA,MAAlB;AAA0B,IAAA,WAA1B;AAAuC,IAAA;AAAvC,MAAkD,KAAxD;AAEA,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,KAAK,EAAE,KAFG;AAGV,MAAA,OAAO,EAAE,KAHC;AAIV,MAAA,MAAM,EAAE,KAAK,CAAC,QAJJ;AAKV,MAAA,WAAW,EAAE,KAAK,CAAC,QALT;AAMV,MAAA,MAAM,EAAE;AANE,KADP;AAUL,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,GADiC;AAEjC,SAAG;AAF8B,KAAR,CAVtB;AAcL,IAAA,KAAK,EAAE,gBAAgB,CAAC,KAAD,EAAQ;AAC7B,MAAA,QAAQ,EAAE;AADmB,KAAR,CAdlB;AAiBL,IAAA,OAAO,EAAE,gBAAgB,CAAC,OAAO,IAAI,EAAZ,CAjBpB;AAkBL,IAAA,MAAM,EAAE,gBAAgB,CAAC,MAAD,EAAS;AAC/B,MAAA,QAAQ,EAAE;AADqB,KAAT,CAlBnB;AAqBL,IAAA,WAAW,EAAE,gBAAgB,CAAC,WAAD,EAAc;AACzC,MAAA,QAAQ,EAAE;AAD+B,KAAd,CArBxB;AAwBL,IAAA,MAAM,EAAE,gBAAgB,CAAC,MAAD;AAxBnB,GAAP;AA0BD,CA7BM","sourceRoot":""}
1
+ {"version":3,"sources":["components/CardHeader/useCardHeader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,sBAAsB,GAAG,CAAC,KAAD,EAAyB,GAAzB,KAAyE;AAC7G,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA,OAAT;AAAkB,IAAA,MAAlB;AAA0B,IAAA,WAA1B;AAAuC,IAAA;AAAvC,MAAkD,KAAxD;AAEA,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,KAAK,EAAE,KAFG;AAGV,MAAA,OAAO,EAAE,KAHC;AAIV,MAAA,MAAM,EAAE,KAAK,CAAC,QAJJ;AAKV,MAAA,WAAW,EAAE,KAAK,CAAC,QALT;AAMV,MAAA,MAAM,EAAE;AANE,KADP;AAUL,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,GADiC;AAEjC,SAAG;AAF8B,KAAR,CAVtB;AAcL,IAAA,KAAK,EAAE,gBAAgB,CAAC,KAAD,EAAQ;AAC7B,MAAA,QAAQ,EAAE;AADmB,KAAR,CAdlB;AAiBL,IAAA,OAAO,EAAE,gBAAgB,CAAC,OAAO,IAAI,EAAZ,CAjBpB;AAkBL,IAAA,MAAM,EAAE,gBAAgB,CAAC,MAAD,EAAS;AAC/B,MAAA,QAAQ,EAAE;AADqB,KAAT,CAlBnB;AAqBL,IAAA,WAAW,EAAE,gBAAgB,CAAC,WAAD,EAAc;AACzC,MAAA,QAAQ,EAAE;AAD+B,KAAd,CArBxB;AAwBL,IAAA,MAAM,EAAE,gBAAgB,CAAC,MAAD;AAxBnB,GAAP;AA0BD,CA7BM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { CardHeaderProps, CardHeaderState } from './CardHeader.types';\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, content, header, description, action } = props;\n\n return {\n components: {\n root: 'div',\n image: 'div',\n content: 'div',\n header: React.Fragment,\n description: React.Fragment,\n action: 'div',\n },\n\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n image: resolveShorthand(image, {\n required: true,\n }),\n content: resolveShorthand(content || {}),\n header: resolveShorthand(header, {\n required: true,\n }),\n description: resolveShorthand(description, {\n required: true,\n }),\n action: resolveShorthand(action),\n };\n};\n"],"sourceRoot":"../src/"}
@@ -3,4 +3,4 @@ export declare const cardHeaderClassName = "fui-CardHeader";
3
3
  /**
4
4
  * Apply styling to the CardHeader slots based on the state
5
5
  */
6
- export declare const useCardHeaderStyles: (state: CardHeaderState) => CardHeaderState;
6
+ export declare const useCardHeaderStyles_unstable: (state: CardHeaderState) => CardHeaderState;
@@ -1,4 +1,4 @@
1
- import { __styles, mergeClasses } from '@fluentui/react-make-styles';
1
+ import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
2
  export const cardHeaderClassName = 'fui-CardHeader';
3
3
  /**
4
4
  * Styles for the root slot
@@ -9,7 +9,8 @@ const useStyles = /*#__PURE__*/__styles({
9
9
  "mc9l5x": "f22iagw",
10
10
  "Beiy3e4": "f1063pyq",
11
11
  "Bt984gj": "f122n59",
12
- "rmohyg": "fsbu5mz",
12
+ "i8kkvl": "f4akndk",
13
+ "Belr9w4": "fe5j3v",
13
14
  "Bqenvij": "f1d2rq10"
14
15
  },
15
16
  "image": {
@@ -32,14 +33,14 @@ const useStyles = /*#__PURE__*/__styles({
32
33
  "Bn3e79g": "f1con4nn"
33
34
  }
34
35
  }, {
35
- "d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fsbu5mz{gap:12px;}", ".f1d2rq10{height:32px;}", ".f17fgpbq{min-width:24px;}", ".f1pha7fy{min-height:24px;}", ".f44c6la{max-width:32px;}", ".f17bzqcb{max-height:32px;}", ".fgn7ydb>*{min-width:inherit;}", ".f1jevvm1>*{min-height:inherit;}", ".fqihwjc>*{max-width:100%;}", ".f6x1sus>*{max-height:100%;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".fwk23hs{height:inherit;}", ".f1con4nn>*{height:50%;}"]
36
+ "d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4akndk{-webkit-column-gap:12px;column-gap:12px;}", ".fe5j3v{row-gap:12px;}", ".f1d2rq10{height:32px;}", ".f17fgpbq{min-width:24px;}", ".f1pha7fy{min-height:24px;}", ".f44c6la{max-width:32px;}", ".f17bzqcb{max-height:32px;}", ".fgn7ydb>*{min-width:inherit;}", ".f1jevvm1>*{min-height:inherit;}", ".fqihwjc>*{max-width:100%;}", ".f6x1sus>*{max-height:100%;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".fwk23hs{height:inherit;}", ".f1con4nn>*{height:50%;}"]
36
37
  });
37
38
  /**
38
39
  * Apply styling to the CardHeader slots based on the state
39
40
  */
40
41
 
41
42
 
42
- export const useCardHeaderStyles = state => {
43
+ export const useCardHeaderStyles_unstable = state => {
43
44
  const styles = useStyles();
44
45
  state.root.className = mergeClasses(cardHeaderClassName, styles.root, state.root.className);
45
46
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CardHeader/useCardHeaderStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,6BAAzC;AAGA,OAAO,MAAM,mBAAmB,GAAG,gBAA5B;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAqCA;;AAEG;;;AACH,OAAO,MAAM,mBAAmB,GAAI,KAAD,IAA4C;AAC7E,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,mBAAD,EAAsB,MAAM,CAAC,IAA7B,EAAmC,KAAK,CAAC,IAAN,CAAW,SAA9C,CAAnC;;AAEA,MAAI,KAAK,CAAC,KAAV,EAAiB;AACf,IAAA,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,YAAY,CAAC,MAAM,CAAC,KAAR,EAAe,KAAK,CAAC,KAAN,CAAY,SAA3B,CAApC;AACD;;AAED,MAAI,KAAK,CAAC,OAAV,EAAmB;AACjB,IAAA,KAAK,CAAC,OAAN,CAAc,SAAd,GAA0B,YAAY,CAAC,MAAM,CAAC,aAAR,EAAuB,KAAK,CAAC,OAAN,CAAc,SAArC,CAAtC;AACD;;AAED,SAAO,KAAP;AACD,CAbM","sourceRoot":""}
1
+ {"version":3,"sources":["components/CardHeader/useCardHeaderStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AAGA,OAAO,MAAM,mBAAmB,GAAG,gBAA5B;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAqCA;;AAEG;;;AACH,OAAO,MAAM,4BAA4B,GAAI,KAAD,IAA4C;AACtF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,mBAAD,EAAsB,MAAM,CAAC,IAA7B,EAAmC,KAAK,CAAC,IAAN,CAAW,SAA9C,CAAnC;;AAEA,MAAI,KAAK,CAAC,KAAV,EAAiB;AACf,IAAA,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,YAAY,CAAC,MAAM,CAAC,KAAR,EAAe,KAAK,CAAC,KAAN,CAAY,SAA3B,CAApC;AACD;;AAED,MAAI,KAAK,CAAC,OAAV,EAAmB;AACjB,IAAA,KAAK,CAAC,OAAN,CAAc,SAAd,GAA0B,YAAY,CAAC,MAAM,CAAC,aAAR,EAAuB,KAAK,CAAC,OAAN,CAAc,SAArC,CAAtC;AACD;;AAED,SAAO,KAAP;AACD,CAbM","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { CardHeaderState } from './CardHeader.types';\n\nexport const cardHeaderClassName = 'fui-CardHeader';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n ...shorthands.gap('12px'),\n height: '32px',\n },\n image: {\n minWidth: '24px',\n minHeight: '24px',\n maxWidth: '32px',\n maxHeight: '32px',\n\n display: 'flex',\n alignItems: 'center',\n\n '> *': {\n minWidth: 'inherit',\n minHeight: 'inherit',\n maxWidth: '100%',\n maxHeight: '100%',\n },\n },\n\n textContainer: {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n height: 'inherit',\n\n '> *': {\n height: '50%',\n },\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(cardHeaderClassName, styles.root, state.root.className);\n\n if (state.image) {\n state.image.className = mergeClasses(styles.image, state.image.className);\n }\n\n if (state.content) {\n state.content.className = mergeClasses(styles.textContainer, state.content.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { useCardPreview } from './useCardPreview';
3
- import { renderCardPreview } from './renderCardPreview';
4
- import { useCardPreviewStyles } from './useCardPreviewStyles';
2
+ import { useCardPreview_unstable } from './useCardPreview';
3
+ import { renderCardPreview_unstable } from './renderCardPreview';
4
+ import { useCardPreviewStyles_unstable } from './useCardPreviewStyles';
5
5
  /**
6
6
  * Component to render image previews of documents or articles in a Card component.
7
7
  */
8
8
 
9
9
  export const CardPreview = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useCardPreview(props, ref);
11
- useCardPreviewStyles(state);
12
- return renderCardPreview(state);
10
+ const state = useCardPreview_unstable(props, ref);
11
+ useCardPreviewStyles_unstable(state);
12
+ return renderCardPreview_unstable(state);
13
13
  });
14
14
  CardPreview.displayName = 'CardPreview';
15
15
  //# sourceMappingURL=CardPreview.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CardPreview/CardPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,QAA+B,kBAA/B;AACA,SAAS,iBAAT,QAAkC,qBAAlC;AACA,SAAS,oBAAT,QAAqC,wBAArC;AAIA;;AAEG;;AACH,OAAO,MAAM,WAAW,gBAA0C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAChG,QAAM,KAAK,GAAG,cAAc,CAAC,KAAD,EAAQ,GAAR,CAA5B;AAEA,EAAA,oBAAoB,CAAC,KAAD,CAApB;AACA,SAAO,iBAAiB,CAAC,KAAD,CAAxB;AACD,CALiE,CAA3D;AAOP,WAAW,CAAC,WAAZ,GAA0B,aAA1B","sourceRoot":""}
1
+ {"version":3,"sources":["components/CardPreview/CardPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AAIA;;AAEG;;AACH,OAAO,MAAM,WAAW,gBAA0C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAChG,QAAM,KAAK,GAAG,uBAAuB,CAAC,KAAD,EAAQ,GAAR,CAArC;AAEA,EAAA,6BAA6B,CAAC,KAAD,CAA7B;AACA,SAAO,0BAA0B,CAAC,KAAD,CAAjC;AACD,CALiE,CAA3D;AAOP,WAAW,CAAC,WAAZ,GAA0B,aAA1B","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"],"sourceRoot":"../src/"}
@@ -1,7 +1,7 @@
1
- import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
1
+ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
2
  export declare type CardPreviewSlots = {
3
- root: IntrinsicShorthandProps<'div'>;
4
- logo?: IntrinsicShorthandProps<'div'>;
3
+ root: Slot<'div'>;
4
+ logo?: Slot<'div'>;
5
5
  };
6
6
  /**
7
7
  * CardPreview props
@@ -1 +1 @@
1
- {"version":3,"file":"CardPreview.types.js","sourceRoot":"","sources":["../../../src/components/CardPreview/CardPreview.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"CardPreview.types.js","sourceRoot":"../src/","sources":["components/CardPreview/CardPreview.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type CardPreviewSlots = {\n root: Slot<'div'>;\n logo?: Slot<'div'>;\n};\n\n/**\n * CardPreview 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":["../../../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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["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"]}
@@ -2,4 +2,4 @@ import type { CardPreviewState } from './CardPreview.types';
2
2
  /**
3
3
  * Render the final JSX of CardPreview
4
4
  */
5
- export declare const renderCardPreview: (state: CardPreviewState) => JSX.Element;
5
+ export declare const renderCardPreview_unstable: (state: CardPreviewState) => JSX.Element;
@@ -1,15 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import { getSlots } from '@fluentui/react-utilities';
3
- import { cardPreviewShorthandProps } from './useCardPreview';
4
3
  /**
5
4
  * Render the final JSX of CardPreview
6
5
  */
7
6
 
8
- export const renderCardPreview = state => {
7
+ export const renderCardPreview_unstable = state => {
9
8
  const {
10
9
  slots,
11
10
  slotProps
12
- } = getSlots(state, cardPreviewShorthandProps);
13
- return /*#__PURE__*/React.createElement(slots.root, Object.assign({}, slotProps.root), slotProps.root.children, /*#__PURE__*/React.createElement(slots.logo, Object.assign({}, slotProps.logo)));
11
+ } = getSlots(state);
12
+ return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
13
+ }, slotProps.root.children, slots.logo && /*#__PURE__*/React.createElement(slots.logo, { ...slotProps.logo
14
+ }));
14
15
  };
15
16
  //# sourceMappingURL=renderCardPreview.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CardPreview/renderCardPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,yBAAT,QAA0C,kBAA1C;AAGA;;AAEG;;AACH,OAAO,MAAM,iBAAiB,GAAI,KAAD,IAA4B;AAC3D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAmB,KAAnB,EAA0B,yBAA1B,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,SAAS,CAAC,IAAV,CAAe,QADlB,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAFF,CADF;AAMD,CATM","sourceRoot":""}
1
+ {"version":3,"sources":["components/CardPreview/renderCardPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAA4B;AACpE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAmB,KAAnB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,SAAS,CAAC,IAAV,CAAe,QADlB,EAEG,KAAK,CAAC,IAAN,iBAAc,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAFjB,CADF;AAMD,CATM","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"],"sourceRoot":"../src/"}
@@ -1,16 +1,12 @@
1
1
  import * as React from 'react';
2
- import type { CardPreviewProps, CardPreviewSlots, CardPreviewState } from './CardPreview.types';
3
- /**
4
- * Array of all shorthand properties listed in CardPreviewShorthandProps
5
- */
6
- export declare const cardPreviewShorthandProps: Array<keyof CardPreviewSlots>;
2
+ import type { CardPreviewProps, CardPreviewState } from './CardPreview.types';
7
3
  /**
8
4
  * Create the state required to render CardPreview.
9
5
  *
10
- * The returned state can be modified with hooks such as useCardPreviewStyles,
11
- * before being passed to renderCardPreview.
6
+ * The returned state can be modified with hooks such as useCardPreviewStyles_unstable,
7
+ * before being passed to renderCardPreview_unstable.
12
8
  *
13
9
  * @param props - props from this instance of CardPreview
14
10
  * @param ref - reference to root HTMLElement of CardPreview
15
11
  */
16
- export declare const useCardPreview: (props: CardPreviewProps, ref: React.Ref<HTMLElement>) => CardPreviewState;
12
+ export declare const useCardPreview_unstable: (props: CardPreviewProps, ref: React.Ref<HTMLElement>) => CardPreviewState;
@@ -1,20 +1,15 @@
1
1
  import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
2
- /**
3
- * Array of all shorthand properties listed in CardPreviewShorthandProps
4
- */
5
-
6
- export const cardPreviewShorthandProps = ['root', 'logo'];
7
2
  /**
8
3
  * Create the state required to render CardPreview.
9
4
  *
10
- * The returned state can be modified with hooks such as useCardPreviewStyles,
11
- * before being passed to renderCardPreview.
5
+ * The returned state can be modified with hooks such as useCardPreviewStyles_unstable,
6
+ * before being passed to renderCardPreview_unstable.
12
7
  *
13
8
  * @param props - props from this instance of CardPreview
14
9
  * @param ref - reference to root HTMLElement of CardPreview
15
10
  */
16
11
 
17
- export const useCardPreview = (props, ref) => {
12
+ export const useCardPreview_unstable = (props, ref) => {
18
13
  const {
19
14
  logo
20
15
  } = props;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CardPreview/useCardPreview.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;AAEG;;AACH,OAAO,MAAM,yBAAyB,GAAkC,CAAC,MAAD,EAAS,MAAT,CAAjE;AAEP;;;;;;;;AAQG;;AACH,OAAO,MAAM,cAAc,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;AACvG,QAAM;AAAE,IAAA;AAAF,MAAW,KAAjB;AACA,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,IAAI,EAAE;AAFI,KADP;AAML,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,GADiC;AAEjC,SAAG;AAF8B,KAAR,CANtB;AAUL,IAAA,IAAI,EAAE,gBAAgB,CAAC,IAAD;AAVjB,GAAP;AAYD,CAdM","sourceRoot":""}
1
+ {"version":3,"sources":["components/CardPreview/useCardPreview.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;AAChH,QAAM;AAAE,IAAA;AAAF,MAAW,KAAjB;AACA,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,IAAI,EAAE;AAFI,KADP;AAML,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,GADiC;AAEjC,SAAG;AAF8B,KAAR,CANtB;AAUL,IAAA,IAAI,EAAE,gBAAgB,CAAC,IAAD;AAVjB,GAAP;AAYD,CAdM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { CardPreviewProps, CardPreviewState } from './CardPreview.types';\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 return {\n components: {\n root: 'div',\n logo: 'div',\n },\n\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n logo: resolveShorthand(logo),\n };\n};\n"],"sourceRoot":"../src/"}
@@ -3,4 +3,4 @@ export declare const cardPreviewClassName = "fui-CardPreview";
3
3
  /**
4
4
  * Apply styling to the CardPreview slots based on the state
5
5
  */
6
- export declare const useCardPreviewStyles: (state: CardPreviewState) => CardPreviewState;
6
+ export declare const useCardPreviewStyles_unstable: (state: CardPreviewState) => CardPreviewState;
@@ -1,4 +1,4 @@
1
- import { __styles, mergeClasses } from '@fluentui/react-make-styles';
1
+ import { __styles, mergeClasses } from '@griffel/react';
2
2
  export const cardPreviewClassName = 'fui-CardPreview';
3
3
  /**
4
4
  * Styles for the root slot
@@ -7,10 +7,6 @@ export const cardPreviewClassName = 'fui-CardPreview';
7
7
  const useStyles = /*#__PURE__*/__styles({
8
8
  "root": {
9
9
  "qhf8xq": "f10pi13n",
10
- "B6of3ja": "f1hu3pq6",
11
- "t21cq0": ["f8nhgx1", "f16yxz7i"],
12
- "jrapky": "f19f4twv",
13
- "Frg6f3": ["f16yxz7i", "f8nhgx1"],
14
10
  "Bb0eobv": "floiv14",
15
11
  "m1g0b5": "f1r7p6p5"
16
12
  },
@@ -22,14 +18,14 @@ const useStyles = /*#__PURE__*/__styles({
22
18
  "Bqenvij": "f1d2rq10"
23
19
  }
24
20
  }, {
25
- "d": [".f10pi13n{position:relative;}", ".f1hu3pq6{margin-top:0;}", ".f8nhgx1{margin-right:-12px;}", ".f16yxz7i{margin-left:-12px;}", ".f19f4twv{margin-bottom:0;}", ".floiv14>*{display:block;}", ".f1r7p6p5>*{width:100%;}", ".f1euv43f{position:absolute;}", ".f1gcvs1y{bottom:12px;}", ".f1t6tvco{left:12px;}", ".ffrfxm3{right:12px;}", ".f1szoe96{width:32px;}", ".f1d2rq10{height:32px;}"]
21
+ "d": [".f10pi13n{position:relative;}", ".floiv14>*{display:block;}", ".f1r7p6p5>*{width:100%;}", ".f1euv43f{position:absolute;}", ".f1gcvs1y{bottom:12px;}", ".f1t6tvco{left:12px;}", ".ffrfxm3{right:12px;}", ".f1szoe96{width:32px;}", ".f1d2rq10{height:32px;}"]
26
22
  });
27
23
  /**
28
24
  * Apply styling to the CardPreview slots based on the state
29
25
  */
30
26
 
31
27
 
32
- export const useCardPreviewStyles = state => {
28
+ export const useCardPreviewStyles_unstable = state => {
33
29
  const styles = useStyles();
34
30
  state.root.className = mergeClasses(cardPreviewClassName, styles.root, state.root.className);
35
31
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CardPreview/useCardPreviewStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,6BAAzC;AAGA,OAAO,MAAM,oBAAoB,GAAG,iBAA7B;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAqBA;;AAEG;;;AACH,OAAO,MAAM,oBAAoB,GAAI,KAAD,IAA8C;AAChF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,oBAAD,EAAuB,MAAM,CAAC,IAA9B,EAAoC,KAAK,CAAC,IAAN,CAAW,SAA/C,CAAnC;;AAEA,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,MAAM,CAAC,IAAR,EAAc,KAAK,CAAC,IAAN,CAAW,SAAzB,CAAnC;AACD;;AAED,SAAO,KAAP;AACD,CATM","sourceRoot":""}
1
+ {"version":3,"sources":["components/CardPreview/useCardPreviewStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,gBAAzC;AAGA,OAAO,MAAM,oBAAoB,GAAG,iBAA7B;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAmBA;;AAEG;;;AACH,OAAO,MAAM,6BAA6B,GAAI,KAAD,IAA8C;AACzF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,oBAAD,EAAuB,MAAM,CAAC,IAA9B,EAAoC,KAAK,CAAC,IAAN,CAAW,SAA/C,CAAnC;;AAEA,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,MAAM,CAAC,IAAR,EAAc,KAAK,CAAC,IAAN,CAAW,SAAzB,CAAnC;AACD;;AAED,SAAO,KAAP;AACD,CATM","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport type { CardPreviewState } from './CardPreview.types';\n\nexport const cardPreviewClassName = 'fui-CardPreview';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n position: 'relative',\n\n '> *': {\n display: 'block',\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(cardPreviewClassName, styles.root, state.root.className);\n\n if (state.logo) {\n state.logo.className = mergeClasses(styles.logo, state.logo.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC","sourcesContent":["export * from './Card';\nexport * from './CardFooter';\nexport * from './CardHeader';\nexport * from './CardPreview';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Card.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["Card.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Card/index';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/CardFooter.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,+BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["CardFooter.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,+BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/CardFooter/index';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/CardHeader.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,+BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["CardHeader.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,+BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/CardHeader/index';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/CardPreview.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gCAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["CardPreview.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/CardPreview/index';\n"],"sourceRoot":"../src/"}
@@ -18,9 +18,9 @@ const useCardStyles_1 = /*#__PURE__*/require("./useCardStyles");
18
18
 
19
19
 
20
20
  exports.Card = /*#__PURE__*/React.forwardRef((props, ref) => {
21
- const state = useCard_1.useCard(props, ref);
22
- useCardStyles_1.useCardStyles(state);
23
- return renderCard_1.renderCard(state);
21
+ const state = useCard_1.useCard_unstable(props, ref);
22
+ useCardStyles_1.useCardStyles_unstable(state);
23
+ return renderCard_1.renderCard_unstable(state);
24
24
  });
25
25
  exports.Card.displayName = 'Card';
26
26
  //# sourceMappingURL=Card.js.map