@fluentui/react-badge 9.0.16 → 9.0.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. package/CHANGELOG.json +57 -1
  2. package/CHANGELOG.md +22 -2
  3. package/lib/components/Badge/Badge.js +0 -1
  4. package/lib/components/Badge/Badge.js.map +1 -1
  5. package/lib/components/Badge/renderBadge.js +6 -3
  6. package/lib/components/Badge/renderBadge.js.map +1 -1
  7. package/lib/components/Badge/useBadge.js +0 -1
  8. package/lib/components/Badge/useBadge.js.map +1 -1
  9. package/lib/components/Badge/useBadgeStyles.js +242 -250
  10. package/lib/components/Badge/useBadgeStyles.js.map +1 -1
  11. package/lib/components/CounterBadge/CounterBadge.js +0 -1
  12. package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
  13. package/lib/components/CounterBadge/useCounterBadge.js +2 -4
  14. package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
  15. package/lib/components/CounterBadge/useCounterBadgeStyles.js +11 -16
  16. package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  17. package/lib/components/PresenceBadge/PresenceBadge.js +0 -1
  18. package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -1
  19. package/lib/components/PresenceBadge/presenceIcons.js.map +1 -1
  20. package/lib/components/PresenceBadge/usePresenceBadge.js +2 -10
  21. package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  22. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +49 -56
  23. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  24. package/lib/index.js.map +1 -1
  25. package/lib-commonjs/Badge.js +0 -2
  26. package/lib-commonjs/Badge.js.map +1 -1
  27. package/lib-commonjs/CounterBadge.js +0 -2
  28. package/lib-commonjs/CounterBadge.js.map +1 -1
  29. package/lib-commonjs/PresenceBadge.js +0 -2
  30. package/lib-commonjs/PresenceBadge.js.map +1 -1
  31. package/lib-commonjs/components/Badge/Badge.js +0 -6
  32. package/lib-commonjs/components/Badge/Badge.js.map +1 -1
  33. package/lib-commonjs/components/Badge/Badge.types.js.map +1 -1
  34. package/lib-commonjs/components/Badge/index.js +0 -5
  35. package/lib-commonjs/components/Badge/index.js.map +1 -1
  36. package/lib-commonjs/components/Badge/renderBadge.js +6 -7
  37. package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
  38. package/lib-commonjs/components/Badge/useBadge.js +0 -4
  39. package/lib-commonjs/components/Badge/useBadge.js.map +1 -1
  40. package/lib-commonjs/components/Badge/useBadgeStyles.js +242 -254
  41. package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
  42. package/lib-commonjs/components/CounterBadge/CounterBadge.js +0 -6
  43. package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
  44. package/lib-commonjs/components/CounterBadge/CounterBadge.types.js.map +1 -1
  45. package/lib-commonjs/components/CounterBadge/index.js +0 -5
  46. package/lib-commonjs/components/CounterBadge/index.js.map +1 -1
  47. package/lib-commonjs/components/CounterBadge/useCounterBadge.js +2 -7
  48. package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
  49. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +11 -20
  50. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  51. package/lib-commonjs/components/PresenceBadge/PresenceBadge.js +0 -6
  52. package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -1
  53. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
  54. package/lib-commonjs/components/PresenceBadge/index.js +0 -5
  55. package/lib-commonjs/components/PresenceBadge/index.js.map +1 -1
  56. package/lib-commonjs/components/PresenceBadge/presenceIcons.js +0 -2
  57. package/lib-commonjs/components/PresenceBadge/presenceIcons.js.map +1 -1
  58. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +2 -15
  59. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  60. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +49 -60
  61. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  62. package/lib-commonjs/index.js +0 -6
  63. package/lib-commonjs/index.js.map +1 -1
  64. package/package.json +5 -5
package/CHANGELOG.json CHANGED
@@ -2,7 +2,63 @@
2
2
  "name": "@fluentui/react-badge",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 21 Dec 2022 10:17:16 GMT",
5
+ "date": "Mon, 09 Jan 2023 14:31:49 GMT",
6
+ "tag": "@fluentui/react-badge_v9.0.18",
7
+ "version": "9.0.18",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui/react-badge",
13
+ "comment": "Bump @fluentui/react-utilities to v9.4.0",
14
+ "commit": "26f0364b3837056ee8e0df42a7932c298c68290e"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Wed, 04 Jan 2023 01:40:52 GMT",
21
+ "tag": "@fluentui/react-badge_v9.0.17",
22
+ "version": "9.0.17",
23
+ "comments": {
24
+ "none": [
25
+ {
26
+ "author": "martinhochel@microsoft.com",
27
+ "package": "@fluentui/react-badge",
28
+ "commit": "4ec2b998b294d6d9c3196d3d82893bdd97d0c105",
29
+ "comment": "chore(scripts): move index.ts to to follow sub-folder domain packaging"
30
+ },
31
+ {
32
+ "author": "martinhochel@microsoft.com",
33
+ "package": "@fluentui/react-badge",
34
+ "commit": "194b0cf0cc27c1c1233aa945f09b3ad29778d8ca",
35
+ "comment": "chore(scripts): use for @fluentui/scripts version within all package.json"
36
+ }
37
+ ],
38
+ "patch": [
39
+ {
40
+ "author": "olfedias@microsoft.com",
41
+ "package": "@fluentui/react-badge",
42
+ "commit": "2c38f1e4ae07b2b60df596efe11015a68f166dbf",
43
+ "comment": "chore: Update Griffel to latest version"
44
+ },
45
+ {
46
+ "author": "beachball",
47
+ "package": "@fluentui/react-badge",
48
+ "comment": "Bump @fluentui/react-utilities to v9.3.1",
49
+ "commit": "3e322d15529451be153e97298873253e21af4082"
50
+ },
51
+ {
52
+ "author": "beachball",
53
+ "package": "@fluentui/react-badge",
54
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.19",
55
+ "commit": "3e322d15529451be153e97298873253e21af4082"
56
+ }
57
+ ]
58
+ }
59
+ },
60
+ {
61
+ "date": "Wed, 21 Dec 2022 10:20:33 GMT",
6
62
  "tag": "@fluentui/react-badge_v9.0.16",
7
63
  "version": "9.0.16",
8
64
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,32 @@
1
1
  # Change Log - @fluentui/react-badge
2
2
 
3
- This log was last generated on Wed, 21 Dec 2022 10:17:16 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 09 Jan 2023 14:31:49 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.0.18)
8
+
9
+ Mon, 09 Jan 2023 14:31:49 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.0.17..@fluentui/react-badge_v9.0.18)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-utilities to v9.4.0 ([PR #26257](https://github.com/microsoft/fluentui/pull/26257) by beachball)
15
+
16
+ ## [9.0.17](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.0.17)
17
+
18
+ Wed, 04 Jan 2023 01:40:52 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.0.16..@fluentui/react-badge_v9.0.17)
20
+
21
+ ### Patches
22
+
23
+ - chore: Update Griffel to latest version ([PR #26045](https://github.com/microsoft/fluentui/pull/26045) by olfedias@microsoft.com)
24
+ - Bump @fluentui/react-utilities to v9.3.1 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
25
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.19 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
26
+
7
27
  ## [9.0.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.0.16)
8
28
 
9
- Wed, 21 Dec 2022 10:17:16 GMT
29
+ Wed, 21 Dec 2022 10:20:33 GMT
10
30
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.0.15..@fluentui/react-badge_v9.0.16)
11
31
 
12
32
  ### Patches
@@ -5,7 +5,6 @@ import { renderBadge_unstable } from './renderBadge';
5
5
  /**
6
6
  * Define a styled Badge, using the `useBadge_unstable` hook.
7
7
  */
8
-
9
8
  export const Badge = /*#__PURE__*/React.forwardRef((props, ref) => {
10
9
  const state = useBadge_unstable(props, ref);
11
10
  useBadgeStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-badge/src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,iBAAT,QAAkC,YAAlC;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,oBAAT,QAAqC,eAArC;AAIA;;AAEG;;AACH,OAAO,MAAM,KAAK,gBAAoC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACpF,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAD,EAAQ,GAAR,CAA/B;EACA,uBAAuB,CAAC,KAAD,CAAvB;EAEA,OAAO,oBAAoB,CAAC,KAAD,CAA3B;AACD,CALqD,CAA/C;AAOP,KAAK,CAAC,WAAN,GAAoB,OAApB","sourcesContent":["import * as React from 'react';\nimport { useBadge_unstable } from './useBadge';\nimport { useBadgeStyles_unstable } from './useBadgeStyles';\nimport { renderBadge_unstable } from './renderBadge';\nimport type { BadgeProps } from './Badge.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled Badge, using the `useBadge_unstable` hook.\n */\nexport const Badge: ForwardRefComponent<BadgeProps> = React.forwardRef((props, ref) => {\n const state = useBadge_unstable(props, ref);\n useBadgeStyles_unstable(state);\n\n return renderBadge_unstable(state);\n});\n\nBadge.displayName = 'Badge';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,uBAAuB,QAAQ,kBAAkB;AAC1D,SAASC,oBAAoB,QAAQ,eAAe;AAIpD;;;AAGA,OAAO,MAAMC,KAAK,gBAAoCJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpF,MAAMC,KAAK,GAAGP,iBAAiB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAC3CL,uBAAuB,CAACM,KAAK,CAAC;EAE9B,OAAOL,oBAAoB,CAACK,KAAK,CAAC;AACpC,CAAC,CAAC;AAEFJ,KAAK,CAACK,WAAW,GAAG,OAAO","names":["React","useBadge_unstable","useBadgeStyles_unstable","renderBadge_unstable","Badge","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-badge/src/components/Badge/Badge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useBadge_unstable } from './useBadge';\nimport { useBadgeStyles_unstable } from './useBadgeStyles';\nimport { renderBadge_unstable } from './renderBadge';\nimport type { BadgeProps } from './Badge.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled Badge, using the `useBadge_unstable` hook.\n */\nexport const Badge: ForwardRefComponent<BadgeProps> = React.forwardRef((props, ref) => {\n const state = useBadge_unstable(props, ref);\n useBadgeStyles_unstable(state);\n\n return renderBadge_unstable(state);\n});\n\nBadge.displayName = 'Badge';\n"]}
@@ -5,9 +5,12 @@ export const renderBadge_unstable = state => {
5
5
  slots,
6
6
  slotProps
7
7
  } = getSlots(state);
8
- return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
9
- }, state.iconPosition === 'before' && slots.icon && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
10
- }), state.root.children, state.iconPosition === 'after' && slots.icon && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
8
+ return /*#__PURE__*/React.createElement(slots.root, {
9
+ ...slotProps.root
10
+ }, state.iconPosition === 'before' && slots.icon && /*#__PURE__*/React.createElement(slots.icon, {
11
+ ...slotProps.icon
12
+ }), state.root.children, state.iconPosition === 'after' && slots.icon && /*#__PURE__*/React.createElement(slots.icon, {
13
+ ...slotProps.icon
11
14
  }));
12
15
  };
13
16
  //# sourceMappingURL=renderBadge.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-badge/src/components/Badge/renderBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA,OAAO,MAAM,oBAAoB,GAAI,KAAD,IAAsB;EACxD,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAa,KAAb,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,KAAK,CAAC,YAAN,KAAuB,QAAvB,IAAmC,KAAK,CAAC,IAAzC,iBAAiD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CADpD,EAEG,KAAK,CAAC,IAAN,CAAW,QAFd,EAGG,KAAK,CAAC,YAAN,KAAuB,OAAvB,IAAkC,KAAK,CAAC,IAAxC,iBAAgD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAHnD,CADF;AAOD,CAVM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { BadgeState, BadgeSlots } from './Badge.types';\n\nexport const renderBadge_unstable = (state: BadgeState) => {\n const { slots, slotProps } = getSlots<BadgeSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.iconPosition === 'before' && slots.icon && <slots.icon {...slotProps.icon} />}\n {state.root.children}\n {state.iconPosition === 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD,OAAO,MAAMC,oBAAoB,GAAIC,KAAiB,IAAI;EACxD,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAaE,KAAK,CAAC;EAExD,oBACEH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,GAC3BH,KAAK,CAACI,YAAY,KAAK,QAAQ,IAAIH,KAAK,CAACI,IAAI,iBAAIR,oBAACI,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI,EACnFL,KAAK,CAACG,IAAI,CAACG,QAAQ,EACnBN,KAAK,CAACI,YAAY,KAAK,OAAO,IAAIH,KAAK,CAACI,IAAI,iBAAIR,oBAACI,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI,CACxE;AAEjB,CAAC","names":["React","getSlots","renderBadge_unstable","state","slots","slotProps","root","iconPosition","icon","children"],"sourceRoot":"../src/","sources":["packages/react-components/react-badge/src/components/Badge/renderBadge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { BadgeState, BadgeSlots } from './Badge.types';\n\nexport const renderBadge_unstable = (state: BadgeState) => {\n const { slots, slotProps } = getSlots<BadgeSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.iconPosition === 'before' && slots.icon && <slots.icon {...slotProps.icon} />}\n {state.root.children}\n {state.iconPosition === 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n </slots.root>\n );\n};\n"]}
@@ -2,7 +2,6 @@ import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utiliti
2
2
  /**
3
3
  * Returns the props and state required to render the component
4
4
  */
5
-
6
5
  export const useBadge_unstable = (props, ref) => {
7
6
  const {
8
7
  shape = 'circular',
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-badge/src/components/Badge/useBadge.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;AAEG;;AACH,OAAO,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAAoB,GAApB,KAA+D;EAC9F,MAAM;IACJ,KAAK,GAAG,UADJ;IAEJ,IAAI,GAAG,QAFH;IAGJ,YAAY,GAAG,QAHX;IAIJ,UAAU,GAAG,QAJT;IAKJ,KAAK,GAAG;EALJ,IAMF,KANJ;EAQA,MAAM,KAAK,GAAe;IACxB,KADwB;IAExB,IAFwB;IAGxB,YAHwB;IAIxB,UAJwB;IAKxB,KALwB;IAMxB,UAAU,EAAE;MACV,IAAI,EAAE,KADI;MAEV,IAAI,EAAE;IAFI,CANY;IAUxB,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;MACjC,GADiC;MAEjC,GAAG;IAF8B,CAAR,CAVH;IAcxB,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,IAAP;EAdE,CAA1B;EAiBA,OAAO,KAAP;AACD,CA3BM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { BadgeProps, BadgeState } from './Badge.types';\n\n/**\n * Returns the props and state required to render the component\n */\nexport const useBadge_unstable = (props: BadgeProps, ref: React.Ref<HTMLElement>): BadgeState => {\n const {\n shape = 'circular',\n size = 'medium',\n iconPosition = 'before',\n appearance = 'filled',\n color = 'brand',\n } = props;\n\n const state: BadgeState = {\n shape,\n size,\n iconPosition,\n appearance,\n color,\n components: {\n root: 'div',\n icon: 'span',\n },\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n icon: resolveShorthand(props.icon),\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AACA,SAASA,qBAAqB,EAAEC,gBAAgB,QAAQ,2BAA2B;AAGnF;;;AAGA,OAAO,MAAMC,iBAAiB,GAAG,CAACC,KAAiB,EAAEC,GAA2B,KAAgB;EAC9F,MAAM;IACJC,KAAK,GAAG,UAAU;IAClBC,IAAI,GAAG,QAAQ;IACfC,YAAY,GAAG,QAAQ;IACvBC,UAAU,GAAG,QAAQ;IACrBC,KAAK,GAAG;EAAO,CAChB,GAAGN,KAAK;EAET,MAAMO,KAAK,GAAe;IACxBL,KAAK;IACLC,IAAI;IACJC,YAAY;IACZC,UAAU;IACVC,KAAK;IACLE,UAAU,EAAE;MACVC,IAAI,EAAE,KAAK;MACXC,IAAI,EAAE;KACP;IACDD,IAAI,EAAEZ,qBAAqB,CAAC,KAAK,EAAE;MACjCI,GAAG;MACH,GAAGD;KACJ,CAAC;IACFU,IAAI,EAAEZ,gBAAgB,CAACE,KAAK,CAACU,IAAI;GAClC;EAED,OAAOH,KAAK;AACd,CAAC","names":["getNativeElementProps","resolveShorthand","useBadge_unstable","props","ref","shape","size","iconPosition","appearance","color","state","components","root","icon"],"sourceRoot":"../src/","sources":["packages/react-components/react-badge/src/components/Badge/useBadge.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { BadgeProps, BadgeState } from './Badge.types';\n\n/**\n * Returns the props and state required to render the component\n */\nexport const useBadge_unstable = (props: BadgeProps, ref: React.Ref<HTMLElement>): BadgeState => {\n const {\n shape = 'circular',\n size = 'medium',\n iconPosition = 'before',\n appearance = 'filled',\n color = 'brand',\n } = props;\n\n const state: BadgeState = {\n shape,\n size,\n iconPosition,\n appearance,\n color,\n components: {\n root: 'div',\n icon: 'span',\n },\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n icon: resolveShorthand(props.icon),\n };\n\n return state;\n};\n"]}