@fluentui/react-card 9.0.0-beta.11 → 9.0.0-beta.14

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 (69) hide show
  1. package/CHANGELOG.json +132 -7
  2. package/CHANGELOG.md +84 -45
  3. package/Spec.md +20 -16
  4. package/dist/{react-card.d.ts → index.d.ts} +21 -0
  5. package/{lib → dist}/tsdoc-metadata.json +0 -0
  6. package/lib/components/Card/Card.types.js.map +1 -1
  7. package/lib/components/Card/useCard.js +13 -4
  8. package/lib/components/Card/useCard.js.map +1 -1
  9. package/lib-commonjs/components/Card/useCard.js +13 -4
  10. package/lib-commonjs/components/Card/useCard.js.map +1 -1
  11. package/package.json +11 -10
  12. package/lib/Card.d.ts +0 -1
  13. package/lib/CardFooter.d.ts +0 -1
  14. package/lib/CardHeader.d.ts +0 -1
  15. package/lib/CardPreview.d.ts +0 -1
  16. package/lib/components/Card/Card.d.ts +0 -6
  17. package/lib/components/Card/Card.types.d.ts +0 -15
  18. package/lib/components/Card/index.d.ts +0 -5
  19. package/lib/components/Card/renderCard.d.ts +0 -5
  20. package/lib/components/Card/useCard.d.ts +0 -12
  21. package/lib/components/Card/useCardStyles.d.ts +0 -11
  22. package/lib/components/CardFooter/CardFooter.d.ts +0 -6
  23. package/lib/components/CardFooter/CardFooter.types.d.ts +0 -13
  24. package/lib/components/CardFooter/index.d.ts +0 -5
  25. package/lib/components/CardFooter/renderCardFooter.d.ts +0 -5
  26. package/lib/components/CardFooter/useCardFooter.d.ts +0 -12
  27. package/lib/components/CardFooter/useCardFooterStyles.d.ts +0 -11
  28. package/lib/components/CardHeader/CardHeader.d.ts +0 -6
  29. package/lib/components/CardHeader/CardHeader.types.d.ts +0 -17
  30. package/lib/components/CardHeader/index.d.ts +0 -5
  31. package/lib/components/CardHeader/renderCardHeader.d.ts +0 -5
  32. package/lib/components/CardHeader/useCardHeader.d.ts +0 -12
  33. package/lib/components/CardHeader/useCardHeaderStyles.d.ts +0 -11
  34. package/lib/components/CardPreview/CardPreview.d.ts +0 -6
  35. package/lib/components/CardPreview/CardPreview.types.d.ts +0 -13
  36. package/lib/components/CardPreview/index.d.ts +0 -5
  37. package/lib/components/CardPreview/renderCardPreview.d.ts +0 -5
  38. package/lib/components/CardPreview/useCardPreview.d.ts +0 -12
  39. package/lib/components/CardPreview/useCardPreviewStyles.d.ts +0 -11
  40. package/lib/index.d.ts +0 -8
  41. package/lib-commonjs/Card.d.ts +0 -1
  42. package/lib-commonjs/CardFooter.d.ts +0 -1
  43. package/lib-commonjs/CardHeader.d.ts +0 -1
  44. package/lib-commonjs/CardPreview.d.ts +0 -1
  45. package/lib-commonjs/components/Card/Card.d.ts +0 -6
  46. package/lib-commonjs/components/Card/Card.types.d.ts +0 -15
  47. package/lib-commonjs/components/Card/index.d.ts +0 -5
  48. package/lib-commonjs/components/Card/renderCard.d.ts +0 -5
  49. package/lib-commonjs/components/Card/useCard.d.ts +0 -12
  50. package/lib-commonjs/components/Card/useCardStyles.d.ts +0 -11
  51. package/lib-commonjs/components/CardFooter/CardFooter.d.ts +0 -6
  52. package/lib-commonjs/components/CardFooter/CardFooter.types.d.ts +0 -13
  53. package/lib-commonjs/components/CardFooter/index.d.ts +0 -5
  54. package/lib-commonjs/components/CardFooter/renderCardFooter.d.ts +0 -5
  55. package/lib-commonjs/components/CardFooter/useCardFooter.d.ts +0 -12
  56. package/lib-commonjs/components/CardFooter/useCardFooterStyles.d.ts +0 -11
  57. package/lib-commonjs/components/CardHeader/CardHeader.d.ts +0 -6
  58. package/lib-commonjs/components/CardHeader/CardHeader.types.d.ts +0 -17
  59. package/lib-commonjs/components/CardHeader/index.d.ts +0 -5
  60. package/lib-commonjs/components/CardHeader/renderCardHeader.d.ts +0 -5
  61. package/lib-commonjs/components/CardHeader/useCardHeader.d.ts +0 -12
  62. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.d.ts +0 -11
  63. package/lib-commonjs/components/CardPreview/CardPreview.d.ts +0 -6
  64. package/lib-commonjs/components/CardPreview/CardPreview.types.d.ts +0 -13
  65. package/lib-commonjs/components/CardPreview/index.d.ts +0 -5
  66. package/lib-commonjs/components/CardPreview/renderCardPreview.d.ts +0 -5
  67. package/lib-commonjs/components/CardPreview/useCardPreview.d.ts +0 -12
  68. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.d.ts +0 -11
  69. package/lib-commonjs/index.d.ts +0 -8
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"Card.types.js","sourceRoot":"../src/","sources":["components/Card/Card.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type CardSlots = {\n root: Slot<'div'>;\n};\n\nexport type CardCommons = {\n appearance: 'filled' | 'filled-alternative' | 'outline' | 'subtle';\n};\n\n/**\n * Card Props\n */\nexport type CardProps = ComponentProps<CardSlots> & Partial<CardCommons>;\n\n/**\n * State used in rendering Card\n */\nexport type CardState = ComponentState<CardSlots> & CardCommons;\n"]}
1
+ {"version":3,"file":"Card.types.js","sourceRoot":"../src/","sources":["components/Card/Card.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type CardSlots = {\n root: Slot<'div'>;\n};\n\nexport type CardCommons = {\n appearance: 'filled' | 'filled-alternative' | 'outline' | 'subtle';\n\n /**\n * Sets the focus behavior for the card. If `true`, the card will use the `noTab` focus behavior.\n *\n * `off`\n * The card will not focusable.\n *\n * `no-tab`\n * This behaviour traps the focus inside of the Card when pressing the Enter key and will only release focus when\n * pressing the Escape key.\n *\n * `tab-exit`\n * This behaviour traps the focus inside of the Card when pressing the Enter key but will release focus when pressing\n * the Tab key on the last inner element.\n *\n * `tab-only`\n * This behaviour will cycle through all elements inside of the Card when pressing the Tab key and then release focus\n * after the last inner element.\n *\n * @defaultvalue off\n */\n focusMode: 'off' | 'no-tab' | 'tab-exit' | 'tab-only';\n};\n\n/**\n * Card Props\n */\nexport type CardProps = ComponentProps<CardSlots> & Partial<CardCommons>;\n\n/**\n * State used in rendering Card\n */\nexport type CardState = ComponentState<CardSlots> & CardCommons;\n"]}
@@ -11,20 +11,29 @@ import { useFocusableGroup } from '@fluentui/react-tabster';
11
11
  */
12
12
 
13
13
  export const useCard_unstable = (props, ref) => {
14
- const groupperAttrs = useFocusableGroup({
15
- tabBehavior: 'limitedTrapFocus'
16
- });
17
14
  const {
18
- appearance = 'filled'
15
+ appearance = 'filled',
16
+ focusMode = 'off'
19
17
  } = props;
18
+ const focusMap = {
19
+ off: undefined,
20
+ 'no-tab': 'limitedTrapFocus',
21
+ 'tab-exit': 'limited',
22
+ 'tab-only': 'unlimited'
23
+ };
24
+ const groupperAttrs = useFocusableGroup({
25
+ tabBehavior: focusMap[focusMode]
26
+ });
20
27
  return {
21
28
  appearance,
29
+ focusMode,
22
30
  components: {
23
31
  root: 'div'
24
32
  },
25
33
  root: getNativeElementProps(props.as || 'div', {
26
34
  ref,
27
35
  role: 'group',
36
+ tabIndex: focusMode !== 'off' ? 0 : undefined,
28
37
  ...groupperAttrs,
29
38
  ...props
30
39
  })
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Card/useCard.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA,SAAS,iBAAT,QAAkC,yBAAlC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,gBAAgB,GAAG,CAAC,KAAD,EAAmB,GAAnB,KAA6D;AAC3F,QAAM,aAAa,GAAG,iBAAiB,CAAC;AACtC,IAAA,WAAW,EAAE;AADyB,GAAD,CAAvC;AAIA,QAAM;AAAE,IAAA,UAAU,GAAG;AAAf,MAA4B,KAAlC;AACA,SAAO;AACL,IAAA,UADK;AAGL,IAAA,UAAU,EAAE;AAAE,MAAA,IAAI,EAAE;AAAR,KAHP;AAIL,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAK,CAAC,EAAN,IAAY,KAAb,EAAoB;AAC7C,MAAA,GAD6C;AAE7C,MAAA,IAAI,EAAE,OAFuC;AAG7C,SAAG,aAH0C;AAI7C,SAAG;AAJ0C,KAApB;AAJtB,GAAP;AAWD,CAjBM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { CardProps, CardState } from './Card.types';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render Card.\n *\n * The returned state can be modified with hooks such as useCardStyles_unstable,\n * before being passed to renderCard_unstable.\n *\n * @param props - props from this instance of Card\n * @param ref - reference to root HTMLElement of Card\n */\nexport const useCard_unstable = (props: CardProps, ref: React.Ref<HTMLElement>): CardState => {\n const groupperAttrs = useFocusableGroup({\n tabBehavior: 'limitedTrapFocus',\n });\n\n const { appearance = 'filled' } = props;\n return {\n appearance,\n\n components: { root: 'div' },\n root: getNativeElementProps(props.as || 'div', {\n ref,\n role: 'group',\n ...groupperAttrs,\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Card/useCard.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA,SAAS,iBAAT,QAAkC,yBAAlC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,gBAAgB,GAAG,CAAC,KAAD,EAAmB,GAAnB,KAA6D;AAC3F,QAAM;AAAE,IAAA,UAAU,GAAG,QAAf;AAAyB,IAAA,SAAS,GAAG;AAArC,MAA+C,KAArD;AAEA,QAAM,QAAQ,GAAG;AACf,IAAA,GAAG,EAAE,SADU;AAEf,cAAU,kBAFK;AAGf,gBAAY,SAHG;AAIf,gBAAY;AAJG,GAAjB;AAOA,QAAM,aAAa,GAAG,iBAAiB,CAAC;AACtC,IAAA,WAAW,EAAE,QAAQ,CAAC,SAAD;AADiB,GAAD,CAAvC;AAIA,SAAO;AACL,IAAA,UADK;AAEL,IAAA,SAFK;AAIL,IAAA,UAAU,EAAE;AAAE,MAAA,IAAI,EAAE;AAAR,KAJP;AAKL,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAK,CAAC,EAAN,IAAY,KAAb,EAAoB;AAC7C,MAAA,GAD6C;AAE7C,MAAA,IAAI,EAAE,OAFuC;AAG7C,MAAA,QAAQ,EAAE,SAAS,KAAK,KAAd,GAAsB,CAAtB,GAA0B,SAHS;AAI7C,SAAG,aAJ0C;AAK7C,SAAG;AAL0C,KAApB;AALtB,GAAP;AAaD,CA3BM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { CardProps, CardState } from './Card.types';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render Card.\n *\n * The returned state can be modified with hooks such as useCardStyles_unstable,\n * before being passed to renderCard_unstable.\n *\n * @param props - props from this instance of Card\n * @param ref - reference to root HTMLElement of Card\n */\nexport const useCard_unstable = (props: CardProps, ref: React.Ref<HTMLElement>): CardState => {\n const { appearance = 'filled', focusMode = 'off' } = props;\n\n const focusMap = {\n off: undefined,\n 'no-tab': 'limitedTrapFocus',\n 'tab-exit': 'limited',\n 'tab-only': 'unlimited',\n } as const;\n\n const groupperAttrs = useFocusableGroup({\n tabBehavior: focusMap[focusMode],\n });\n\n return {\n appearance,\n focusMode,\n\n components: { root: 'div' },\n root: getNativeElementProps(props.as || 'div', {\n ref,\n role: 'group',\n tabIndex: focusMode !== 'off' ? 0 : undefined,\n ...groupperAttrs,\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
@@ -20,20 +20,29 @@ const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
20
20
 
21
21
 
22
22
  const useCard_unstable = (props, ref) => {
23
- const groupperAttrs = react_tabster_1.useFocusableGroup({
24
- tabBehavior: 'limitedTrapFocus'
25
- });
26
23
  const {
27
- appearance = 'filled'
24
+ appearance = 'filled',
25
+ focusMode = 'off'
28
26
  } = props;
27
+ const focusMap = {
28
+ off: undefined,
29
+ 'no-tab': 'limitedTrapFocus',
30
+ 'tab-exit': 'limited',
31
+ 'tab-only': 'unlimited'
32
+ };
33
+ const groupperAttrs = react_tabster_1.useFocusableGroup({
34
+ tabBehavior: focusMap[focusMode]
35
+ });
29
36
  return {
30
37
  appearance,
38
+ focusMode,
31
39
  components: {
32
40
  root: 'div'
33
41
  },
34
42
  root: react_utilities_1.getNativeElementProps(props.as || 'div', {
35
43
  ref,
36
44
  role: 'group',
45
+ tabIndex: focusMode !== 'off' ? 0 : undefined,
37
46
  ...groupperAttrs,
38
47
  ...props
39
48
  })
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Card/useCard.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,gBAAgB,GAAG,CAAC,KAAD,EAAmB,GAAnB,KAA6D;AAC3F,QAAM,aAAa,GAAG,eAAA,CAAA,iBAAA,CAAkB;AACtC,IAAA,WAAW,EAAE;AADyB,GAAlB,CAAtB;AAIA,QAAM;AAAE,IAAA,UAAU,GAAG;AAAf,MAA4B,KAAlC;AACA,SAAO;AACL,IAAA,UADK;AAGL,IAAA,UAAU,EAAE;AAAE,MAAA,IAAI,EAAE;AAAR,KAHP;AAIL,IAAA,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAK,CAAC,EAAN,IAAY,KAAlC,EAAyC;AAC7C,MAAA,GAD6C;AAE7C,MAAA,IAAI,EAAE,OAFuC;AAG7C,SAAG,aAH0C;AAI7C,SAAG;AAJ0C,KAAzC;AAJD,GAAP;AAWD,CAjBM;;AAAM,OAAA,CAAA,gBAAA,GAAgB,gBAAhB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { CardProps, CardState } from './Card.types';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render Card.\n *\n * The returned state can be modified with hooks such as useCardStyles_unstable,\n * before being passed to renderCard_unstable.\n *\n * @param props - props from this instance of Card\n * @param ref - reference to root HTMLElement of Card\n */\nexport const useCard_unstable = (props: CardProps, ref: React.Ref<HTMLElement>): CardState => {\n const groupperAttrs = useFocusableGroup({\n tabBehavior: 'limitedTrapFocus',\n });\n\n const { appearance = 'filled' } = props;\n return {\n appearance,\n\n components: { root: 'div' },\n root: getNativeElementProps(props.as || 'div', {\n ref,\n role: 'group',\n ...groupperAttrs,\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Card/useCard.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,gBAAgB,GAAG,CAAC,KAAD,EAAmB,GAAnB,KAA6D;AAC3F,QAAM;AAAE,IAAA,UAAU,GAAG,QAAf;AAAyB,IAAA,SAAS,GAAG;AAArC,MAA+C,KAArD;AAEA,QAAM,QAAQ,GAAG;AACf,IAAA,GAAG,EAAE,SADU;AAEf,cAAU,kBAFK;AAGf,gBAAY,SAHG;AAIf,gBAAY;AAJG,GAAjB;AAOA,QAAM,aAAa,GAAG,eAAA,CAAA,iBAAA,CAAkB;AACtC,IAAA,WAAW,EAAE,QAAQ,CAAC,SAAD;AADiB,GAAlB,CAAtB;AAIA,SAAO;AACL,IAAA,UADK;AAEL,IAAA,SAFK;AAIL,IAAA,UAAU,EAAE;AAAE,MAAA,IAAI,EAAE;AAAR,KAJP;AAKL,IAAA,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAK,CAAC,EAAN,IAAY,KAAlC,EAAyC;AAC7C,MAAA,GAD6C;AAE7C,MAAA,IAAI,EAAE,OAFuC;AAG7C,MAAA,QAAQ,EAAE,SAAS,KAAK,KAAd,GAAsB,CAAtB,GAA0B,SAHS;AAI7C,SAAG,aAJ0C;AAK7C,SAAG;AAL0C,KAAzC;AALD,GAAP;AAaD,CA3BM;;AAAM,OAAA,CAAA,gBAAA,GAAgB,gBAAhB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { CardProps, CardState } from './Card.types';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render Card.\n *\n * The returned state can be modified with hooks such as useCardStyles_unstable,\n * before being passed to renderCard_unstable.\n *\n * @param props - props from this instance of Card\n * @param ref - reference to root HTMLElement of Card\n */\nexport const useCard_unstable = (props: CardProps, ref: React.Ref<HTMLElement>): CardState => {\n const { appearance = 'filled', focusMode = 'off' } = props;\n\n const focusMap = {\n off: undefined,\n 'no-tab': 'limitedTrapFocus',\n 'tab-exit': 'limited',\n 'tab-only': 'unlimited',\n } as const;\n\n const groupperAttrs = useFocusableGroup({\n tabBehavior: focusMap[focusMode],\n });\n\n return {\n appearance,\n focusMode,\n\n components: { root: 'div' },\n root: getNativeElementProps(props.as || 'div', {\n ref,\n role: 'group',\n tabIndex: focusMode !== 'off' ? 0 : undefined,\n ...groupperAttrs,\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@fluentui/react-card",
3
- "version": "9.0.0-beta.11",
3
+ "version": "9.0.0-beta.14",
4
4
  "private": false,
5
5
  "description": "Card container components for Fluent UI React.",
6
6
  "main": "lib-commonjs/index.js",
7
7
  "module": "lib/index.js",
8
- "typings": "lib/index.d.ts",
8
+ "typings": "dist/index.d.ts",
9
9
  "sideEffects": false,
10
10
  "repository": {
11
11
  "type": "git",
@@ -17,28 +17,29 @@
17
17
  "bundle-size": "bundle-size measure",
18
18
  "clean": "just-scripts clean",
19
19
  "code-style": "just-scripts code-style",
20
+ "e2e": "e2e",
20
21
  "just": "just-scripts",
21
22
  "lint": "just-scripts lint",
22
23
  "start": "yarn storybook",
23
24
  "test": "jest --passWithNoTests",
24
25
  "docs": "api-extractor run --config=config/api-extractor.local.json --local",
25
- "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-card/src && yarn docs",
26
- "storybook": "node ../../scripts/storybook/runner",
26
+ "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/packages/react-components/react-card/src && yarn docs",
27
+ "storybook": "node ../../../scripts/storybook/runner",
27
28
  "type-check": "tsc -b tsconfig.json"
28
29
  },
29
30
  "devDependencies": {
30
31
  "@fluentui/eslint-plugin": "*",
31
32
  "@fluentui/react-conformance": "*",
32
- "@fluentui/react-conformance-griffel": "9.0.0-beta.4",
33
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.5",
33
34
  "@fluentui/scripts": "^1.0.0",
34
- "@fluentui/react-text": "9.0.0-rc.6",
35
- "@fluentui/react-button": "9.0.0-rc.6"
35
+ "@fluentui/react-text": "9.0.0-rc.8",
36
+ "@fluentui/react-button": "9.0.0-rc.9"
36
37
  },
37
38
  "dependencies": {
38
39
  "@griffel/react": "1.0.3",
39
- "@fluentui/react-utilities": "9.0.0-rc.6",
40
- "@fluentui/react-tabster": "9.0.0-rc.6",
41
- "@fluentui/react-theme": "9.0.0-rc.5",
40
+ "@fluentui/react-utilities": "9.0.0-rc.8",
41
+ "@fluentui/react-tabster": "9.0.0-rc.9",
42
+ "@fluentui/react-theme": "9.0.0-rc.7",
42
43
  "tslib": "^2.1.0"
43
44
  },
44
45
  "peerDependencies": {
package/lib/Card.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './components/Card/index';
@@ -1 +0,0 @@
1
- export * from './components/CardFooter/index';
@@ -1 +0,0 @@
1
- export * from './components/CardHeader/index';
@@ -1 +0,0 @@
1
- export * from './components/CardPreview/index';
@@ -1,6 +0,0 @@
1
- import type { CardProps } from './Card.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * A card provides scaffolding for hosting actions and content for a single topic.
5
- */
6
- export declare const Card: ForwardRefComponent<CardProps>;
@@ -1,15 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- export declare type CardSlots = {
3
- root: Slot<'div'>;
4
- };
5
- export declare type CardCommons = {
6
- appearance: 'filled' | 'filled-alternative' | 'outline' | 'subtle';
7
- };
8
- /**
9
- * Card Props
10
- */
11
- export declare type CardProps = ComponentProps<CardSlots> & Partial<CardCommons>;
12
- /**
13
- * State used in rendering Card
14
- */
15
- export declare type CardState = ComponentState<CardSlots> & CardCommons;
@@ -1,5 +0,0 @@
1
- export * from './Card';
2
- export * from './Card.types';
3
- export * from './renderCard';
4
- export * from './useCard';
5
- export * from './useCardStyles';
@@ -1,5 +0,0 @@
1
- import type { CardState } from './Card.types';
2
- /**
3
- * Render the final JSX of Card
4
- */
5
- export declare const renderCard_unstable: (state: CardState) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { CardProps, CardState } from './Card.types';
3
- /**
4
- * Create the state required to render Card.
5
- *
6
- * The returned state can be modified with hooks such as useCardStyles_unstable,
7
- * before being passed to renderCard_unstable.
8
- *
9
- * @param props - props from this instance of Card
10
- * @param ref - reference to root HTMLElement of Card
11
- */
12
- export declare const useCard_unstable: (props: CardProps, ref: React.Ref<HTMLElement>) => CardState;
@@ -1,11 +0,0 @@
1
- import type { CardSlots, CardState } from './Card.types';
2
- import type { SlotClassNames } from '@fluentui/react-utilities';
3
- /**
4
- * @deprecated Use `cardClassNames.root` instead.
5
- */
6
- export declare const cardClassName = "fui-Card";
7
- export declare const cardClassNames: SlotClassNames<CardSlots>;
8
- /**
9
- * Apply styling to the Card slots based on the state
10
- */
11
- export declare const useCardStyles_unstable: (state: CardState) => CardState;
@@ -1,6 +0,0 @@
1
- import type { CardFooterProps } from './CardFooter.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Component to render Button actions in a Card component.
5
- */
6
- export declare const CardFooter: ForwardRefComponent<CardFooterProps>;
@@ -1,13 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- export declare type CardFooterSlots = {
3
- root: Slot<'div'>;
4
- action?: Slot<'div'>;
5
- };
6
- /**
7
- * CardFooter props
8
- */
9
- export declare type CardFooterProps = ComponentProps<CardFooterSlots>;
10
- /**
11
- * State used in rendering CardFooter
12
- */
13
- export declare type CardFooterState = ComponentState<CardFooterSlots>;
@@ -1,5 +0,0 @@
1
- export * from './CardFooter';
2
- export * from './CardFooter.types';
3
- export * from './renderCardFooter';
4
- export * from './useCardFooter';
5
- export * from './useCardFooterStyles';
@@ -1,5 +0,0 @@
1
- import type { CardFooterState } from './CardFooter.types';
2
- /**
3
- * Render the final JSX of CardFooter
4
- */
5
- export declare const renderCardFooter_unstable: (state: CardFooterState) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { CardFooterProps, CardFooterState } from './CardFooter.types';
3
- /**
4
- * Create the state required to render CardFooter.
5
- *
6
- * The returned state can be modified with hooks such as useCardFooterStyles_unstable,
7
- * before being passed to renderCardFooter_unstable.
8
- *
9
- * @param props - props from this instance of CardFooter
10
- * @param ref - reference to root HTMLElement of CardFooter
11
- */
12
- export declare const useCardFooter_unstable: (props: CardFooterProps, ref: React.Ref<HTMLElement>) => CardFooterState;
@@ -1,11 +0,0 @@
1
- import type { SlotClassNames } from '@fluentui/react-utilities';
2
- import type { CardFooterSlots, CardFooterState } from './CardFooter.types';
3
- /**
4
- * @deprecated Use `cardFooterClassNames.root` instead.
5
- */
6
- export declare const cardFooterClassName = "fui-CardFooter";
7
- export declare const cardFooterClassNames: SlotClassNames<CardFooterSlots>;
8
- /**
9
- * Apply styling to the CardFooter slots based on the state
10
- */
11
- export declare const useCardFooterStyles_unstable: (state: CardFooterState) => CardFooterState;
@@ -1,6 +0,0 @@
1
- import type { CardHeaderProps } from './CardHeader.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Component to render an image, text and an action in a Card component.
5
- */
6
- export declare const CardHeader: ForwardRefComponent<CardHeaderProps>;
@@ -1,17 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- export declare type CardHeaderSlots = {
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
- };
10
- /**
11
- * CardHeader props
12
- */
13
- export declare type CardHeaderProps = ComponentProps<Partial<CardHeaderSlots>>;
14
- /**
15
- * State used in rendering CardHeader
16
- */
17
- export declare type CardHeaderState = ComponentState<CardHeaderSlots>;
@@ -1,5 +0,0 @@
1
- export * from './CardHeader';
2
- export * from './CardHeader.types';
3
- export * from './renderCardHeader';
4
- export * from './useCardHeader';
5
- export * from './useCardHeaderStyles';
@@ -1,5 +0,0 @@
1
- import type { CardHeaderState } from './CardHeader.types';
2
- /**
3
- * Render the final JSX of CardHeader
4
- */
5
- export declare const renderCardHeader_unstable: (state: CardHeaderState) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { CardHeaderProps, CardHeaderState } from './CardHeader.types';
3
- /**
4
- * Create the state required to render CardHeader.
5
- *
6
- * The returned state can be modified with hooks such as useCardHeaderStyles_unstable,
7
- * before being passed to renderCardHeader_unstable.
8
- *
9
- * @param props - props from this instance of CardHeader
10
- * @param ref - reference to root HTMLElement of CardHeader
11
- */
12
- export declare const useCardHeader_unstable: (props: CardHeaderProps, ref: React.Ref<HTMLElement>) => CardHeaderState;
@@ -1,11 +0,0 @@
1
- import type { SlotClassNames } from '@fluentui/react-utilities';
2
- import type { CardHeaderSlots, CardHeaderState } from './CardHeader.types';
3
- /**
4
- * @deprecated Use `cardHeaderClassNames.root` instead.
5
- */
6
- export declare const cardHeaderClassName = "fui-CardHeader";
7
- export declare const cardHeaderClassNames: SlotClassNames<CardHeaderSlots>;
8
- /**
9
- * Apply styling to the CardHeader slots based on the state
10
- */
11
- export declare const useCardHeaderStyles_unstable: (state: CardHeaderState) => CardHeaderState;
@@ -1,6 +0,0 @@
1
- import type { CardPreviewProps } from './CardPreview.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Component to render image previews of documents or articles in a Card component.
5
- */
6
- export declare const CardPreview: ForwardRefComponent<CardPreviewProps>;
@@ -1,13 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- export declare type CardPreviewSlots = {
3
- root: Slot<'div'>;
4
- logo?: Slot<'div'>;
5
- };
6
- /**
7
- * CardPreview props
8
- */
9
- export declare type CardPreviewProps = ComponentProps<CardPreviewSlots>;
10
- /**
11
- * State used in rendering CardPreview
12
- */
13
- export declare type CardPreviewState = ComponentState<CardPreviewSlots>;
@@ -1,5 +0,0 @@
1
- export * from './CardPreview';
2
- export * from './CardPreview.types';
3
- export * from './renderCardPreview';
4
- export * from './useCardPreview';
5
- export * from './useCardPreviewStyles';
@@ -1,5 +0,0 @@
1
- import type { CardPreviewState } from './CardPreview.types';
2
- /**
3
- * Render the final JSX of CardPreview
4
- */
5
- export declare const renderCardPreview_unstable: (state: CardPreviewState) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { CardPreviewProps, CardPreviewState } from './CardPreview.types';
3
- /**
4
- * Create the state required to render CardPreview.
5
- *
6
- * The returned state can be modified with hooks such as useCardPreviewStyles_unstable,
7
- * before being passed to renderCardPreview_unstable.
8
- *
9
- * @param props - props from this instance of CardPreview
10
- * @param ref - reference to root HTMLElement of CardPreview
11
- */
12
- export declare const useCardPreview_unstable: (props: CardPreviewProps, ref: React.Ref<HTMLElement>) => CardPreviewState;
@@ -1,11 +0,0 @@
1
- import type { SlotClassNames } from '@fluentui/react-utilities';
2
- import type { CardPreviewSlots, CardPreviewState } from './CardPreview.types';
3
- /**
4
- * @deprecated Use `cardPreviewClassNames.root` instead.
5
- */
6
- export declare const cardPreviewClassName = "fui-CardPreview";
7
- export declare const cardPreviewClassNames: SlotClassNames<CardPreviewSlots>;
8
- /**
9
- * Apply styling to the CardPreview slots based on the state
10
- */
11
- export declare const useCardPreviewStyles_unstable: (state: CardPreviewState) => CardPreviewState;
package/lib/index.d.ts DELETED
@@ -1,8 +0,0 @@
1
- export { Card, cardClassName, cardClassNames, renderCard_unstable, useCardStyles_unstable, useCard_unstable, } from './Card';
2
- export type { CardCommons, CardProps, CardSlots, CardState } from './Card';
3
- export { CardFooter, cardFooterClassName, cardFooterClassNames, renderCardFooter_unstable, useCardFooterStyles_unstable, useCardFooter_unstable, } from './CardFooter';
4
- export type { CardFooterProps, CardFooterSlots, CardFooterState } from './CardFooter';
5
- export { CardHeader, cardHeaderClassName, cardHeaderClassNames, renderCardHeader_unstable, useCardHeaderStyles_unstable, useCardHeader_unstable, } from './CardHeader';
6
- export type { CardHeaderProps, CardHeaderSlots, CardHeaderState } from './CardHeader';
7
- export { CardPreview, cardPreviewClassName, cardPreviewClassNames, renderCardPreview_unstable, useCardPreviewStyles_unstable, useCardPreview_unstable, } from './CardPreview';
8
- export type { CardPreviewProps, CardPreviewSlots, CardPreviewState } from './CardPreview';
@@ -1 +0,0 @@
1
- export * from './components/Card/index';
@@ -1 +0,0 @@
1
- export * from './components/CardFooter/index';
@@ -1 +0,0 @@
1
- export * from './components/CardHeader/index';
@@ -1 +0,0 @@
1
- export * from './components/CardPreview/index';
@@ -1,6 +0,0 @@
1
- import type { CardProps } from './Card.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * A card provides scaffolding for hosting actions and content for a single topic.
5
- */
6
- export declare const Card: ForwardRefComponent<CardProps>;
@@ -1,15 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- export declare type CardSlots = {
3
- root: Slot<'div'>;
4
- };
5
- export declare type CardCommons = {
6
- appearance: 'filled' | 'filled-alternative' | 'outline' | 'subtle';
7
- };
8
- /**
9
- * Card Props
10
- */
11
- export declare type CardProps = ComponentProps<CardSlots> & Partial<CardCommons>;
12
- /**
13
- * State used in rendering Card
14
- */
15
- export declare type CardState = ComponentState<CardSlots> & CardCommons;
@@ -1,5 +0,0 @@
1
- export * from './Card';
2
- export * from './Card.types';
3
- export * from './renderCard';
4
- export * from './useCard';
5
- export * from './useCardStyles';
@@ -1,5 +0,0 @@
1
- import type { CardState } from './Card.types';
2
- /**
3
- * Render the final JSX of Card
4
- */
5
- export declare const renderCard_unstable: (state: CardState) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { CardProps, CardState } from './Card.types';
3
- /**
4
- * Create the state required to render Card.
5
- *
6
- * The returned state can be modified with hooks such as useCardStyles_unstable,
7
- * before being passed to renderCard_unstable.
8
- *
9
- * @param props - props from this instance of Card
10
- * @param ref - reference to root HTMLElement of Card
11
- */
12
- export declare const useCard_unstable: (props: CardProps, ref: React.Ref<HTMLElement>) => CardState;
@@ -1,11 +0,0 @@
1
- import type { CardSlots, CardState } from './Card.types';
2
- import type { SlotClassNames } from '@fluentui/react-utilities';
3
- /**
4
- * @deprecated Use `cardClassNames.root` instead.
5
- */
6
- export declare const cardClassName = "fui-Card";
7
- export declare const cardClassNames: SlotClassNames<CardSlots>;
8
- /**
9
- * Apply styling to the Card slots based on the state
10
- */
11
- export declare const useCardStyles_unstable: (state: CardState) => CardState;
@@ -1,6 +0,0 @@
1
- import type { CardFooterProps } from './CardFooter.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Component to render Button actions in a Card component.
5
- */
6
- export declare const CardFooter: ForwardRefComponent<CardFooterProps>;
@@ -1,13 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- export declare type CardFooterSlots = {
3
- root: Slot<'div'>;
4
- action?: Slot<'div'>;
5
- };
6
- /**
7
- * CardFooter props
8
- */
9
- export declare type CardFooterProps = ComponentProps<CardFooterSlots>;
10
- /**
11
- * State used in rendering CardFooter
12
- */
13
- export declare type CardFooterState = ComponentState<CardFooterSlots>;
@@ -1,5 +0,0 @@
1
- export * from './CardFooter';
2
- export * from './CardFooter.types';
3
- export * from './renderCardFooter';
4
- export * from './useCardFooter';
5
- export * from './useCardFooterStyles';
@@ -1,5 +0,0 @@
1
- import type { CardFooterState } from './CardFooter.types';
2
- /**
3
- * Render the final JSX of CardFooter
4
- */
5
- export declare const renderCardFooter_unstable: (state: CardFooterState) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { CardFooterProps, CardFooterState } from './CardFooter.types';
3
- /**
4
- * Create the state required to render CardFooter.
5
- *
6
- * The returned state can be modified with hooks such as useCardFooterStyles_unstable,
7
- * before being passed to renderCardFooter_unstable.
8
- *
9
- * @param props - props from this instance of CardFooter
10
- * @param ref - reference to root HTMLElement of CardFooter
11
- */
12
- export declare const useCardFooter_unstable: (props: CardFooterProps, ref: React.Ref<HTMLElement>) => CardFooterState;
@@ -1,11 +0,0 @@
1
- import type { SlotClassNames } from '@fluentui/react-utilities';
2
- import type { CardFooterSlots, CardFooterState } from './CardFooter.types';
3
- /**
4
- * @deprecated Use `cardFooterClassNames.root` instead.
5
- */
6
- export declare const cardFooterClassName = "fui-CardFooter";
7
- export declare const cardFooterClassNames: SlotClassNames<CardFooterSlots>;
8
- /**
9
- * Apply styling to the CardFooter slots based on the state
10
- */
11
- export declare const useCardFooterStyles_unstable: (state: CardFooterState) => CardFooterState;
@@ -1,6 +0,0 @@
1
- import type { CardHeaderProps } from './CardHeader.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Component to render an image, text and an action in a Card component.
5
- */
6
- export declare const CardHeader: ForwardRefComponent<CardHeaderProps>;
@@ -1,17 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- export declare type CardHeaderSlots = {
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
- };
10
- /**
11
- * CardHeader props
12
- */
13
- export declare type CardHeaderProps = ComponentProps<Partial<CardHeaderSlots>>;
14
- /**
15
- * State used in rendering CardHeader
16
- */
17
- export declare type CardHeaderState = ComponentState<CardHeaderSlots>;
@@ -1,5 +0,0 @@
1
- export * from './CardHeader';
2
- export * from './CardHeader.types';
3
- export * from './renderCardHeader';
4
- export * from './useCardHeader';
5
- export * from './useCardHeaderStyles';