@fluentui/react-checkbox 9.1.15 → 9.1.17

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 (35) hide show
  1. package/CHANGELOG.json +91 -1
  2. package/CHANGELOG.md +30 -2
  3. package/lib/Checkbox.js +0 -1
  4. package/lib/Checkbox.js.map +1 -1
  5. package/lib/components/Checkbox/Checkbox.js +5 -7
  6. package/lib/components/Checkbox/Checkbox.js.map +1 -1
  7. package/lib/components/Checkbox/Checkbox.types.js +0 -1
  8. package/lib/components/Checkbox/Checkbox.types.js.map +1 -1
  9. package/lib/components/Checkbox/index.js +0 -1
  10. package/lib/components/Checkbox/index.js.map +1 -1
  11. package/lib/components/Checkbox/renderCheckbox.js +4 -8
  12. package/lib/components/Checkbox/renderCheckbox.js.map +1 -1
  13. package/lib/components/Checkbox/useCheckbox.js +99 -100
  14. package/lib/components/Checkbox/useCheckbox.js.map +1 -1
  15. package/lib/components/Checkbox/useCheckboxStyles.styles.js +1 -1
  16. package/lib/components/Checkbox/useCheckboxStyles.styles.js.map +1 -1
  17. package/lib/index.js +0 -1
  18. package/lib/index.js.map +1 -1
  19. package/lib-commonjs/Checkbox.js +0 -3
  20. package/lib-commonjs/Checkbox.js.map +1 -1
  21. package/lib-commonjs/components/Checkbox/Checkbox.js +1 -3
  22. package/lib-commonjs/components/Checkbox/Checkbox.js.map +1 -1
  23. package/lib-commonjs/components/Checkbox/Checkbox.types.js +0 -3
  24. package/lib-commonjs/components/Checkbox/Checkbox.types.js.map +1 -1
  25. package/lib-commonjs/components/Checkbox/index.js +0 -3
  26. package/lib-commonjs/components/Checkbox/index.js.map +1 -1
  27. package/lib-commonjs/components/Checkbox/renderCheckbox.js +1 -3
  28. package/lib-commonjs/components/Checkbox/renderCheckbox.js.map +1 -1
  29. package/lib-commonjs/components/Checkbox/useCheckbox.js +1 -3
  30. package/lib-commonjs/components/Checkbox/useCheckbox.js.map +1 -1
  31. package/lib-commonjs/components/Checkbox/useCheckboxStyles.styles.js +11 -13
  32. package/lib-commonjs/components/Checkbox/useCheckboxStyles.styles.js.map +1 -1
  33. package/lib-commonjs/index.js +0 -3
  34. package/lib-commonjs/index.js.map +1 -1
  35. package/package.json +8 -8
package/CHANGELOG.json CHANGED
@@ -2,7 +2,97 @@
2
2
  "name": "@fluentui/react-checkbox",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 24 May 2023 20:42:36 GMT",
5
+ "date": "Wed, 31 May 2023 06:42:53 GMT",
6
+ "tag": "@fluentui/react-checkbox_v9.1.17",
7
+ "version": "9.1.17",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "seanmonahan@microsoft.com",
12
+ "package": "@fluentui/react-checkbox",
13
+ "commit": "d640b972d7ac86bfb76ae6c6329f12cdd33b3b7c",
14
+ "comment": "chore: Update Griffel to v1.5.7."
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-checkbox",
19
+ "comment": "Bump @fluentui/react-field to v9.1.6",
20
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-checkbox",
25
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.6",
26
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-checkbox",
31
+ "comment": "Bump @fluentui/react-label to v9.1.15",
32
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-checkbox",
37
+ "comment": "Bump @fluentui/react-tabster to v9.7.5",
38
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-checkbox",
43
+ "comment": "Bump @fluentui/react-utilities to v9.9.2",
44
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui/react-checkbox",
49
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.22",
50
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "date": "Thu, 25 May 2023 10:00:48 GMT",
57
+ "tag": "@fluentui/react-checkbox_v9.1.16",
58
+ "version": "9.1.16",
59
+ "comments": {
60
+ "patch": [
61
+ {
62
+ "author": "beachball",
63
+ "package": "@fluentui/react-checkbox",
64
+ "comment": "Bump @fluentui/react-field to v9.1.5",
65
+ "commit": "8f7c1b7591b3e665ae39e1b22ab0f0b28fb795c4"
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui/react-checkbox",
70
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.5",
71
+ "commit": "8f7c1b7591b3e665ae39e1b22ab0f0b28fb795c4"
72
+ },
73
+ {
74
+ "author": "beachball",
75
+ "package": "@fluentui/react-checkbox",
76
+ "comment": "Bump @fluentui/react-label to v9.1.14",
77
+ "commit": "8f7c1b7591b3e665ae39e1b22ab0f0b28fb795c4"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui/react-checkbox",
82
+ "comment": "Bump @fluentui/react-tabster to v9.7.4",
83
+ "commit": "8f7c1b7591b3e665ae39e1b22ab0f0b28fb795c4"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@fluentui/react-checkbox",
88
+ "comment": "Bump @fluentui/react-utilities to v9.9.1",
89
+ "commit": "8f7c1b7591b3e665ae39e1b22ab0f0b28fb795c4"
90
+ }
91
+ ]
92
+ }
93
+ },
94
+ {
95
+ "date": "Wed, 24 May 2023 20:45:24 GMT",
6
96
  "tag": "@fluentui/react-checkbox_v9.1.15",
7
97
  "version": "9.1.15",
8
98
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,40 @@
1
1
  # Change Log - @fluentui/react-checkbox
2
2
 
3
- This log was last generated on Wed, 24 May 2023 20:42:36 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 31 May 2023 06:42:53 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.1.17](https://github.com/microsoft/fluentui/tree/@fluentui/react-checkbox_v9.1.17)
8
+
9
+ Wed, 31 May 2023 06:42:53 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-checkbox_v9.1.16..@fluentui/react-checkbox_v9.1.17)
11
+
12
+ ### Patches
13
+
14
+ - chore: Update Griffel to v1.5.7. ([PR #27925](https://github.com/microsoft/fluentui/pull/27925) by seanmonahan@microsoft.com)
15
+ - Bump @fluentui/react-field to v9.1.6 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.6 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
17
+ - Bump @fluentui/react-label to v9.1.15 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
18
+ - Bump @fluentui/react-tabster to v9.7.5 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
19
+ - Bump @fluentui/react-utilities to v9.9.2 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
20
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.22 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
21
+
22
+ ## [9.1.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-checkbox_v9.1.16)
23
+
24
+ Thu, 25 May 2023 10:00:48 GMT
25
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-checkbox_v9.1.15..@fluentui/react-checkbox_v9.1.16)
26
+
27
+ ### Patches
28
+
29
+ - Bump @fluentui/react-field to v9.1.5 ([PR #27988](https://github.com/microsoft/fluentui/pull/27988) by beachball)
30
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.5 ([PR #27988](https://github.com/microsoft/fluentui/pull/27988) by beachball)
31
+ - Bump @fluentui/react-label to v9.1.14 ([PR #27988](https://github.com/microsoft/fluentui/pull/27988) by beachball)
32
+ - Bump @fluentui/react-tabster to v9.7.4 ([PR #27988](https://github.com/microsoft/fluentui/pull/27988) by beachball)
33
+ - Bump @fluentui/react-utilities to v9.9.1 ([PR #27988](https://github.com/microsoft/fluentui/pull/27988) by beachball)
34
+
7
35
  ## [9.1.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-checkbox_v9.1.15)
8
36
 
9
- Wed, 24 May 2023 20:42:36 GMT
37
+ Wed, 24 May 2023 20:45:24 GMT
10
38
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-checkbox_v9.1.14..@fluentui/react-checkbox_v9.1.15)
11
39
 
12
40
  ### Patches
package/lib/Checkbox.js CHANGED
@@ -1,2 +1 @@
1
1
  export * from './components/Checkbox/index';
2
- //# sourceMappingURL=Checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/Checkbox.ts"],"sourcesContent":["export * from './components/Checkbox/index';\n"],"mappings":"AAAA,cAAc"}
1
+ {"version":3,"sources":["Checkbox.ts"],"sourcesContent":["export * from './components/Checkbox/index';\n"],"names":[],"mappings":"AAAA,cAAc,8BAA8B"}
@@ -6,12 +6,10 @@ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * Checkboxes give people a way to select one or more items from a group,
8
8
  * or switch between two mutually exclusive options (checked or unchecked).
9
- */
10
- export const Checkbox = /*#__PURE__*/React.forwardRef((props, ref) => {
11
- const state = useCheckbox_unstable(props, ref);
12
- useCheckboxStyles_unstable(state);
13
- useCustomStyleHook_unstable('useCheckboxStyles_unstable')(state);
14
- return renderCheckbox_unstable(state);
9
+ */ export const Checkbox = /*#__PURE__*/ React.forwardRef((props, ref)=>{
10
+ const state = useCheckbox_unstable(props, ref);
11
+ useCheckboxStyles_unstable(state);
12
+ useCustomStyleHook_unstable('useCheckboxStyles_unstable')(state);
13
+ return renderCheckbox_unstable(state);
15
14
  });
16
15
  Checkbox.displayName = 'Checkbox';
17
- //# sourceMappingURL=Checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCheckbox_unstable","renderCheckbox_unstable","useCheckboxStyles_unstable","useCustomStyleHook_unstable","Checkbox","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCheckbox_unstable } from './useCheckbox';\nimport { renderCheckbox_unstable } from './renderCheckbox';\nimport { useCheckboxStyles_unstable } from './useCheckboxStyles.styles';\nimport type { CheckboxProps } from './Checkbox.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Checkboxes give people a way to select one or more items from a group,\n * or switch between two mutually exclusive options (checked or unchecked).\n */\nexport const Checkbox: ForwardRefComponent<CheckboxProps> = React.forwardRef((props, ref) => {\n const state = useCheckbox_unstable(props, ref);\n\n useCheckboxStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCheckboxStyles_unstable')(state);\n\n return renderCheckbox_unstable(state);\n});\n\nCheckbox.displayName = 'Checkbox';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,oBAAoB,QAAQ;AACrC,SAASC,uBAAuB,QAAQ;AACxC,SAASC,0BAA0B,QAAQ;AAG3C,SAASC,2BAA2B,QAAQ;AAE5C;;;;AAIA,OAAO,MAAMC,QAAA,gBAA+CL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EAC3F,MAAMC,KAAA,GAAQR,oBAAA,CAAqBM,KAAA,EAAOC,GAAA;EAE1CL,0BAAA,CAA2BM,KAAA;EAE3BL,2BAAA,CAA4B,8BAA8BK,KAAA;EAE1D,OAAOP,uBAAA,CAAwBO,KAAA;AACjC;AAEAJ,QAAA,CAASK,WAAW,GAAG"}
1
+ {"version":3,"sources":["Checkbox.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCheckbox_unstable } from './useCheckbox';\nimport { renderCheckbox_unstable } from './renderCheckbox';\nimport { useCheckboxStyles_unstable } from './useCheckboxStyles.styles';\nimport type { CheckboxProps } from './Checkbox.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Checkboxes give people a way to select one or more items from a group,\n * or switch between two mutually exclusive options (checked or unchecked).\n */\nexport const Checkbox: ForwardRefComponent<CheckboxProps> = React.forwardRef((props, ref) => {\n const state = useCheckbox_unstable(props, ref);\n\n useCheckboxStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCheckboxStyles_unstable')(state);\n\n return renderCheckbox_unstable(state);\n});\n\nCheckbox.displayName = 'Checkbox';\n"],"names":["React","useCheckbox_unstable","renderCheckbox_unstable","useCheckboxStyles_unstable","useCustomStyleHook_unstable","Checkbox","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,6BAA6B;AAGxE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,yBAA+CL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC3F,MAAMC,QAAQR,qBAAqBM,OAAOC;IAE1CL,2BAA2BM;IAE3BL,4BAA4B,8BAA8BK;IAE1D,OAAOP,wBAAwBO;AACjC,GAAG;AAEHJ,SAASK,WAAW,GAAG"}
@@ -1,2 +1 @@
1
1
  import * as React from 'react';
2
- //# sourceMappingURL=Checkbox.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React"],"sources":["../../../src/components/Checkbox/Checkbox.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { Label } from '@fluentui/react-label';\nimport { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type CheckboxSlots = {\n /**\n * The root element of the Checkbox.\n *\n * The root slot receives the `className` and `style` specified directly on the `<Checkbox>`.\n * All other native props will be applied to the primary slot: `input`\n */\n root: NonNullable<Slot<'span'>>;\n\n /**\n * The Checkbox's label.\n */\n label?: Slot<typeof Label>;\n\n /**\n * Hidden input that handles the checkbox's functionality.\n *\n * This is the PRIMARY slot: all native properties specified directly on `<Checkbox>` will be applied to this slot,\n * except `className` and `style`, which remain on the root slot.\n */\n input: NonNullable<Slot<'input'>>;\n\n /**\n * The checkbox, with the checkmark icon as its child when checked.\n */\n indicator: Slot<'div'>;\n};\n\n/**\n * Checkbox Props\n */\nexport type CheckboxProps = Omit<\n ComponentProps<Partial<CheckboxSlots>, 'input'>,\n 'checked' | 'defaultChecked' | 'onChange' | 'size'\n> & {\n /**\n * The controlled value for the checkbox.\n *\n * @default false\n */\n checked?: 'mixed' | boolean;\n\n /**\n * Checkboxes don't support children. To add a label, use the `label` prop.\n */\n children?: never;\n\n /**\n * Whether the checkbox should be rendered as checked by default.\n */\n defaultChecked?: 'mixed' | boolean;\n\n /**\n * The position of the label relative to the checkbox indicator.\n *\n * @default after\n */\n labelPosition?: 'before' | 'after';\n\n /**\n * Callback to be called when the checked state value changes.\n */\n onChange?: (ev: React.ChangeEvent<HTMLInputElement>, data: CheckboxOnChangeData) => void;\n\n /**\n * The shape of the checkbox indicator.\n *\n * The `circular` variant is only recommended to be used in a tasks-style UI (checklist),\n * since it otherwise could be confused for a `RadioItem`.\n *\n * @default square\n */\n shape?: 'square' | 'circular';\n\n /**\n * The size of the checkbox indicator.\n *\n * @default medium\n */\n size?: 'medium' | 'large';\n};\n\n/**\n * Data for the onChange event for checkbox.\n */\nexport interface CheckboxOnChangeData {\n checked: 'mixed' | boolean;\n}\n\n/**\n * State used in rendering Checkbox\n */\nexport type CheckboxState = ComponentState<CheckboxSlots> &\n Required<Pick<CheckboxProps, 'checked' | 'disabled' | 'labelPosition' | 'shape' | 'size'>>;\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW"}
1
+ {"version":3,"sources":["Checkbox.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { Label } from '@fluentui/react-label';\nimport { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type CheckboxSlots = {\n /**\n * The root element of the Checkbox.\n *\n * The root slot receives the `className` and `style` specified directly on the `<Checkbox>`.\n * All other native props will be applied to the primary slot: `input`\n */\n root: NonNullable<Slot<'span'>>;\n\n /**\n * The Checkbox's label.\n */\n label?: Slot<typeof Label>;\n\n /**\n * Hidden input that handles the checkbox's functionality.\n *\n * This is the PRIMARY slot: all native properties specified directly on `<Checkbox>` will be applied to this slot,\n * except `className` and `style`, which remain on the root slot.\n */\n input: NonNullable<Slot<'input'>>;\n\n /**\n * The checkbox, with the checkmark icon as its child when checked.\n */\n indicator: Slot<'div'>;\n};\n\n/**\n * Checkbox Props\n */\nexport type CheckboxProps = Omit<\n ComponentProps<Partial<CheckboxSlots>, 'input'>,\n 'checked' | 'defaultChecked' | 'onChange' | 'size'\n> & {\n /**\n * The controlled value for the checkbox.\n *\n * @default false\n */\n checked?: 'mixed' | boolean;\n\n /**\n * Checkboxes don't support children. To add a label, use the `label` prop.\n */\n children?: never;\n\n /**\n * Whether the checkbox should be rendered as checked by default.\n */\n defaultChecked?: 'mixed' | boolean;\n\n /**\n * The position of the label relative to the checkbox indicator.\n *\n * @default after\n */\n labelPosition?: 'before' | 'after';\n\n /**\n * Callback to be called when the checked state value changes.\n */\n onChange?: (ev: React.ChangeEvent<HTMLInputElement>, data: CheckboxOnChangeData) => void;\n\n /**\n * The shape of the checkbox indicator.\n *\n * The `circular` variant is only recommended to be used in a tasks-style UI (checklist),\n * since it otherwise could be confused for a `RadioItem`.\n *\n * @default square\n */\n shape?: 'square' | 'circular';\n\n /**\n * The size of the checkbox indicator.\n *\n * @default medium\n */\n size?: 'medium' | 'large';\n};\n\n/**\n * Data for the onChange event for checkbox.\n */\nexport interface CheckboxOnChangeData {\n checked: 'mixed' | boolean;\n}\n\n/**\n * State used in rendering Checkbox\n */\nexport type CheckboxState = ComponentState<CheckboxSlots> &\n Required<Pick<CheckboxProps, 'checked' | 'disabled' | 'labelPosition' | 'shape' | 'size'>>;\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
@@ -3,4 +3,3 @@ export * from './Checkbox.types';
3
3
  export * from './renderCheckbox';
4
4
  export * from './useCheckbox';
5
5
  export * from './useCheckboxStyles.styles';
6
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/Checkbox/index.ts"],"sourcesContent":["export * from './Checkbox';\nexport * from './Checkbox.types';\nexport * from './renderCheckbox';\nexport * from './useCheckbox';\nexport * from './useCheckboxStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Checkbox';\nexport * from './Checkbox.types';\nexport * from './renderCheckbox';\nexport * from './useCheckbox';\nexport * from './useCheckboxStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC,cAAc,gBAAgB;AAC9B,cAAc,6BAA6B"}
@@ -1,10 +1,6 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
1
+ /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
2
  import { getSlotsNext } from '@fluentui/react-utilities';
3
- export const renderCheckbox_unstable = state => {
4
- const {
5
- slots,
6
- slotProps
7
- } = getSlotsNext(state);
8
- return /*#__PURE__*/createElement(slots.root, slotProps.root, /*#__PURE__*/createElement(slots.input, slotProps.input), state.labelPosition === 'before' && slots.label && /*#__PURE__*/createElement(slots.label, slotProps.label), /*#__PURE__*/createElement(slots.indicator, slotProps.indicator), state.labelPosition === 'after' && slots.label && /*#__PURE__*/createElement(slots.label, slotProps.label));
3
+ export const renderCheckbox_unstable = (state)=>{
4
+ const { slots , slotProps } = getSlotsNext(state);
5
+ return /*#__PURE__*/ createElement(slots.root, slotProps.root, /*#__PURE__*/ createElement(slots.input, slotProps.input), state.labelPosition === 'before' && slots.label && /*#__PURE__*/ createElement(slots.label, slotProps.label), /*#__PURE__*/ createElement(slots.indicator, slotProps.indicator), state.labelPosition === 'after' && slots.label && /*#__PURE__*/ createElement(slots.label, slotProps.label));
9
6
  };
10
- //# sourceMappingURL=renderCheckbox.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createElement","getSlotsNext","renderCheckbox_unstable","state","slots","slotProps","root","input","labelPosition","label","indicator"],"sources":["../../../src/components/Checkbox/renderCheckbox.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport { CheckboxState, CheckboxSlots } from './Checkbox.types';\n\nexport const renderCheckbox_unstable = (state: CheckboxState) => {\n const { slots, slotProps } = getSlotsNext<CheckboxSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.input {...slotProps.input} />\n {state.labelPosition === 'before' && slots.label && <slots.label {...slotProps.label} />}\n <slots.indicator {...slotProps.indicator} />\n {state.labelPosition === 'after' && slots.label && <slots.label {...slotProps.label} />}\n </slots.root>\n );\n};\n"],"mappings":"AAAA,2BACA,yBAEA,SAASA,aAAa,QAAQ;AAE9B,SAASC,YAAY,QAAQ;AAG7B,OAAO,MAAMC,uBAAA,GAA2BC,KAAA,IAAyB;EAC/D,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGJ,YAAA,CAA4BE,KAAA;EAEzD,oBACEH,aAXJ,CAWKI,KAAA,CAAME,IAAI,EAAKD,SAAA,CAAUC,IAAI,eAC5BN,aAZN,CAYOI,KAAA,CAAMG,KAAK,EAAKF,SAAA,CAAUE,KAAK,GAC/BJ,KAAA,CAAMK,aAAa,KAAK,YAAYJ,KAAA,CAAMK,KAAK,iBAAIT,aAb1D,CAa2DI,KAAA,CAAMK,KAAK,EAAKJ,SAAA,CAAUI,KAAK,gBACpFT,aAdN,CAcOI,KAAA,CAAMM,SAAS,EAAKL,SAAA,CAAUK,SAAS,GACvCP,KAAA,CAAMK,aAAa,KAAK,WAAWJ,KAAA,CAAMK,KAAK,iBAAIT,aAfzD,CAe0DI,KAAA,CAAMK,KAAK,EAAKJ,SAAA,CAAUI,KAAK;AAGzF"}
1
+ {"version":3,"sources":["renderCheckbox.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport { CheckboxState, CheckboxSlots } from './Checkbox.types';\n\nexport const renderCheckbox_unstable = (state: CheckboxState) => {\n const { slots, slotProps } = getSlotsNext<CheckboxSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.input {...slotProps.input} />\n {state.labelPosition === 'before' && slots.label && <slots.label {...slotProps.label} />}\n <slots.indicator {...slotProps.indicator} />\n {state.labelPosition === 'after' && slots.label && <slots.label {...slotProps.label} />}\n </slots.root>\n );\n};\n"],"names":["createElement","getSlotsNext","renderCheckbox_unstable","state","slots","slotProps","root","input","labelPosition","label","indicator"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,YAAY,QAAQ,4BAA4B;AAGzD,OAAO,MAAMC,0BAA0B,CAACC,QAAyB;IAC/D,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAA4BE;IAEzD,qBACE,AAXJ,cAWKC,MAAME,IAAI,EAAKD,UAAUC,IAAI,gBAC5B,AAZN,cAYOF,MAAMG,KAAK,EAAKF,UAAUE,KAAK,GAC/BJ,MAAMK,aAAa,KAAK,YAAYJ,MAAMK,KAAK,kBAAI,AAb1D,cAa2DL,MAAMK,KAAK,EAAKJ,UAAUI,KAAK,iBACpF,AAdN,cAcOL,MAAMM,SAAS,EAAKL,UAAUK,SAAS,GACvCP,MAAMK,aAAa,KAAK,WAAWJ,MAAMK,KAAK,kBAAI,AAfzD,cAe0DL,MAAMK,KAAK,EAAKJ,UAAUI,KAAK;AAGzF,EAAE"}
@@ -12,107 +12,106 @@ import { useFocusWithin } from '@fluentui/react-tabster';
12
12
  *
13
13
  * @param props - props from this instance of Checkbox
14
14
  * @param ref - reference to `<input>` element of Checkbox
15
- */
16
- export const useCheckbox_unstable = (props, ref) => {
17
- // Merge props from surrounding <Field>, if any
18
- props = useFieldControlProps_unstable(props, {
19
- supportsLabelFor: true,
20
- supportsRequired: true
21
- });
22
- const {
23
- disabled = false,
24
- required,
25
- shape = 'square',
26
- size = 'medium',
27
- labelPosition = 'after',
28
- onChange
29
- } = props;
30
- const [checked, setChecked] = useControllableState({
31
- defaultState: props.defaultChecked,
32
- state: props.checked,
33
- initialState: false
34
- });
35
- const nativeProps = getPartitionedNativeProps({
36
- props,
37
- primarySlotTagName: 'input',
38
- excludedPropNames: ['checked', 'defaultChecked', 'size', 'onChange']
39
- });
40
- const mixed = checked === 'mixed';
41
- const id = useId('checkbox-', nativeProps.primary.id);
42
- let checkmarkIcon;
43
- if (mixed) {
44
- if (shape === 'circular') {
45
- checkmarkIcon = /*#__PURE__*/React.createElement(CircleFilled, null);
46
- } else {
47
- checkmarkIcon = size === 'large' ? /*#__PURE__*/React.createElement(Square16Filled, null) : /*#__PURE__*/React.createElement(Square12Filled, null);
15
+ */ export const useCheckbox_unstable = (props, ref)=>{
16
+ // Merge props from surrounding <Field>, if any
17
+ props = useFieldControlProps_unstable(props, {
18
+ supportsLabelFor: true,
19
+ supportsRequired: true
20
+ });
21
+ const { disabled =false , required , shape ='square' , size ='medium' , labelPosition ='after' , onChange } = props;
22
+ const [checked, setChecked] = useControllableState({
23
+ defaultState: props.defaultChecked,
24
+ state: props.checked,
25
+ initialState: false
26
+ });
27
+ const nativeProps = getPartitionedNativeProps({
28
+ props,
29
+ primarySlotTagName: 'input',
30
+ excludedPropNames: [
31
+ 'checked',
32
+ 'defaultChecked',
33
+ 'size',
34
+ 'onChange'
35
+ ]
36
+ });
37
+ const mixed = checked === 'mixed';
38
+ const id = useId('checkbox-', nativeProps.primary.id);
39
+ let checkmarkIcon;
40
+ if (mixed) {
41
+ if (shape === 'circular') {
42
+ checkmarkIcon = /*#__PURE__*/ React.createElement(CircleFilled, null);
43
+ } else {
44
+ checkmarkIcon = size === 'large' ? /*#__PURE__*/ React.createElement(Square16Filled, null) : /*#__PURE__*/ React.createElement(Square12Filled, null);
45
+ }
46
+ } else if (checked) {
47
+ checkmarkIcon = size === 'large' ? /*#__PURE__*/ React.createElement(Checkmark16Filled, null) : /*#__PURE__*/ React.createElement(Checkmark12Filled, null);
48
48
  }
49
- } else if (checked) {
50
- checkmarkIcon = size === 'large' ? /*#__PURE__*/React.createElement(Checkmark16Filled, null) : /*#__PURE__*/React.createElement(Checkmark12Filled, null);
51
- }
52
- const state = {
53
- shape,
54
- checked,
55
- disabled,
56
- size,
57
- labelPosition,
58
- components: {
59
- root: 'span',
60
- input: 'input',
61
- indicator: 'div',
62
- label: Label
63
- },
64
- root: resolveShorthand(props.root, {
65
- required: true,
66
- defaultProps: {
67
- ref: useFocusWithin(),
68
- ...nativeProps.root
69
- }
70
- }),
71
- input: resolveShorthand(props.input, {
72
- required: true,
73
- defaultProps: {
74
- type: 'checkbox',
75
- id,
76
- ref,
77
- checked: checked === true,
78
- ...nativeProps.primary
79
- }
80
- }),
81
- label: resolveShorthand(props.label, {
82
- required: false,
83
- defaultProps: {
84
- htmlFor: id,
49
+ const state = {
50
+ shape,
51
+ checked,
85
52
  disabled,
86
- required,
87
- size: 'medium'
88
- }
89
- }),
90
- indicator: resolveShorthand(props.indicator, {
91
- required: true,
92
- defaultProps: {
93
- 'aria-hidden': true,
94
- children: checkmarkIcon
95
- }
96
- })
97
- };
98
- state.input.onChange = useEventCallback(ev => {
99
- const val = ev.currentTarget.indeterminate ? 'mixed' : ev.currentTarget.checked;
100
- onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
101
- checked: val
53
+ size,
54
+ labelPosition,
55
+ components: {
56
+ root: 'span',
57
+ input: 'input',
58
+ indicator: 'div',
59
+ label: Label
60
+ },
61
+ root: resolveShorthand(props.root, {
62
+ required: true,
63
+ defaultProps: {
64
+ ref: useFocusWithin(),
65
+ ...nativeProps.root
66
+ }
67
+ }),
68
+ input: resolveShorthand(props.input, {
69
+ required: true,
70
+ defaultProps: {
71
+ type: 'checkbox',
72
+ id,
73
+ ref,
74
+ checked: checked === true,
75
+ ...nativeProps.primary
76
+ }
77
+ }),
78
+ label: resolveShorthand(props.label, {
79
+ required: false,
80
+ defaultProps: {
81
+ htmlFor: id,
82
+ disabled,
83
+ required,
84
+ size: 'medium'
85
+ }
86
+ }),
87
+ indicator: resolveShorthand(props.indicator, {
88
+ required: true,
89
+ defaultProps: {
90
+ 'aria-hidden': true,
91
+ children: checkmarkIcon
92
+ }
93
+ })
94
+ };
95
+ state.input.onChange = useEventCallback((ev)=>{
96
+ const val = ev.currentTarget.indeterminate ? 'mixed' : ev.currentTarget.checked;
97
+ onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
98
+ checked: val
99
+ });
100
+ setChecked(val);
102
101
  });
103
- setChecked(val);
104
- });
105
- // Create a ref object for the input element so we can use it to set the indeterminate prop.
106
- // Use useMergedRefs, since the ref might be undefined or a function-ref (no .current)
107
- const inputRef = useMergedRefs(state.input.ref);
108
- state.input.ref = inputRef;
109
- // Set the <input> element's checked and indeterminate properties based on our tri-state property.
110
- // Since indeterminate can only be set via javascript, it has to be done in a layout effect.
111
- useIsomorphicLayoutEffect(() => {
112
- if (inputRef.current) {
113
- inputRef.current.indeterminate = mixed;
114
- }
115
- }, [inputRef, mixed]);
116
- return state;
102
+ // Create a ref object for the input element so we can use it to set the indeterminate prop.
103
+ // Use useMergedRefs, since the ref might be undefined or a function-ref (no .current)
104
+ const inputRef = useMergedRefs(state.input.ref);
105
+ state.input.ref = inputRef;
106
+ // Set the <input> element's checked and indeterminate properties based on our tri-state property.
107
+ // Since indeterminate can only be set via javascript, it has to be done in a layout effect.
108
+ useIsomorphicLayoutEffect(()=>{
109
+ if (inputRef.current) {
110
+ inputRef.current.indeterminate = mixed;
111
+ }
112
+ }, [
113
+ inputRef,
114
+ mixed
115
+ ]);
116
+ return state;
117
117
  };
118
- //# sourceMappingURL=useCheckbox.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useFieldControlProps_unstable","getPartitionedNativeProps","resolveShorthand","useControllableState","useEventCallback","useId","useIsomorphicLayoutEffect","useMergedRefs","Checkmark12Filled","Checkmark16Filled","Square12Filled","Square16Filled","CircleFilled","Label","useFocusWithin","useCheckbox_unstable","props","ref","supportsLabelFor","supportsRequired","disabled","required","shape","size","labelPosition","onChange","checked","setChecked","defaultState","defaultChecked","state","initialState","nativeProps","primarySlotTagName","excludedPropNames","mixed","id","primary","checkmarkIcon","createElement","components","root","input","indicator","label","defaultProps","type","htmlFor","children","ev","val","currentTarget","indeterminate","inputRef","current"],"sources":["../../../src/components/Checkbox/useCheckbox.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport {\n getPartitionedNativeProps,\n resolveShorthand,\n useControllableState,\n useEventCallback,\n useId,\n useIsomorphicLayoutEffect,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { CheckboxProps, CheckboxState } from './Checkbox.types';\nimport {\n Checkmark12Filled,\n Checkmark16Filled,\n Square12Filled,\n Square16Filled,\n CircleFilled,\n} from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { useFocusWithin } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render Checkbox.\n *\n * The returned state can be modified with hooks such as useCheckboxStyles_unstable,\n * before being passed to renderCheckbox_unstable.\n *\n * @param props - props from this instance of Checkbox\n * @param ref - reference to `<input>` element of Checkbox\n */\nexport const useCheckbox_unstable = (props: CheckboxProps, ref: React.Ref<HTMLInputElement>): CheckboxState => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, { supportsLabelFor: true, supportsRequired: true });\n\n const { disabled = false, required, shape = 'square', size = 'medium', labelPosition = 'after', onChange } = props;\n\n const [checked, setChecked] = useControllableState({\n defaultState: props.defaultChecked,\n state: props.checked,\n initialState: false,\n });\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['checked', 'defaultChecked', 'size', 'onChange'],\n });\n\n const mixed = checked === 'mixed';\n const id = useId('checkbox-', nativeProps.primary.id);\n\n let checkmarkIcon;\n if (mixed) {\n if (shape === 'circular') {\n checkmarkIcon = <CircleFilled />;\n } else {\n checkmarkIcon = size === 'large' ? <Square16Filled /> : <Square12Filled />;\n }\n } else if (checked) {\n checkmarkIcon = size === 'large' ? <Checkmark16Filled /> : <Checkmark12Filled />;\n }\n\n const state: CheckboxState = {\n shape,\n checked,\n disabled,\n size,\n labelPosition,\n components: {\n root: 'span',\n input: 'input',\n indicator: 'div',\n label: Label,\n },\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: {\n ref: useFocusWithin<HTMLSpanElement>(),\n ...nativeProps.root,\n },\n }),\n input: resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n type: 'checkbox',\n id,\n ref,\n checked: checked === true,\n ...nativeProps.primary,\n },\n }),\n label: resolveShorthand(props.label, {\n required: false,\n defaultProps: {\n htmlFor: id,\n disabled,\n required,\n size: 'medium', // Even if the checkbox itself is large\n },\n }),\n indicator: resolveShorthand(props.indicator, {\n required: true,\n defaultProps: {\n 'aria-hidden': true,\n children: checkmarkIcon,\n },\n }),\n };\n\n state.input.onChange = useEventCallback(ev => {\n const val = ev.currentTarget.indeterminate ? 'mixed' : ev.currentTarget.checked;\n onChange?.(ev, { checked: val });\n setChecked(val);\n });\n\n // Create a ref object for the input element so we can use it to set the indeterminate prop.\n // Use useMergedRefs, since the ref might be undefined or a function-ref (no .current)\n const inputRef = useMergedRefs(state.input.ref);\n state.input.ref = inputRef;\n\n // Set the <input> element's checked and indeterminate properties based on our tri-state property.\n // Since indeterminate can only be set via javascript, it has to be done in a layout effect.\n useIsomorphicLayoutEffect(() => {\n if (inputRef.current) {\n inputRef.current.indeterminate = mixed;\n }\n }, [inputRef, mixed]);\n\n return state;\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,6BAA6B,QAAQ;AAC9C,SACEC,yBAAyB,EACzBC,gBAAgB,EAChBC,oBAAoB,EACpBC,gBAAgB,EAChBC,KAAK,EACLC,yBAAyB,EACzBC,aAAa,QACR;AAEP,SACEC,iBAAiB,EACjBC,iBAAiB,EACjBC,cAAc,EACdC,cAAc,EACdC,YAAY,QACP;AACP,SAASC,KAAK,QAAQ;AACtB,SAASC,cAAc,QAAQ;AAE/B;;;;;;;;;AASA,OAAO,MAAMC,oBAAA,GAAuBA,CAACC,KAAA,EAAsBC,GAAA,KAAoD;EAC7G;EACAD,KAAA,GAAQhB,6BAAA,CAA8BgB,KAAA,EAAO;IAAEE,gBAAA,EAAkB,IAAI;IAAEC,gBAAA,EAAkB;EAAK;EAE9F,MAAM;IAAEC,QAAA,GAAW,KAAK;IAAEC,QAAA;IAAUC,KAAA,GAAQ;IAAUC,IAAA,GAAO;IAAUC,aAAA,GAAgB;IAASC;EAAQ,CAAE,GAAGT,KAAA;EAE7G,MAAM,CAACU,OAAA,EAASC,UAAA,CAAW,GAAGxB,oBAAA,CAAqB;IACjDyB,YAAA,EAAcZ,KAAA,CAAMa,cAAc;IAClCC,KAAA,EAAOd,KAAA,CAAMU,OAAO;IACpBK,YAAA,EAAc;EAChB;EAEA,MAAMC,WAAA,GAAc/B,yBAAA,CAA0B;IAC5Ce,KAAA;IACA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;IACF;IACAO,KAAA,EAAO1C,gBAAA,CAAiBc,KAAA,CAAM4B,KAAK,EAAE;MACnCvB,QAAA,EAAU,KAAK;MACfwB,YAAA,EAAc;QACZE,OAAA,EAASX,EAAA;QACThB,QAAA;QACAC,QAAA;QACAE,IAAA,EAAM;MACR;IACF;IACAoB,SAAA,EAAWzC,gBAAA,CAAiBc,KAAA,CAAM2B,SAAS,EAAE;MAC3CtB,QAAA,EAAU,IAAI;MACdwB,YAAA,EAAc;QACZ,eAAe,IAAI;QACnBG,QAAA,EAAUV;MACZ;IACF;EACF;EAEAR,KAAA,CAAMY,KAAK,CAACjB,QAAQ,GAAGrB,gBAAA,CAAiB6C,EAAA,IAAM;IAC5C,MAAMC,GAAA,GAAMD,EAAA,CAAGE,aAAa,CAACC,aAAa,GAAG,UAAUH,EAAA,CAAGE,aAAa,CAACzB,OAAO;IAC/ED,QAAA,aAAAA,QAAA,uBAAAA,QAAA,CAAWwB,EAAA,EAAI;MAAEvB,OAAA,EAASwB;IAAI;IAC9BvB,UAAA,CAAWuB,GAAA;EACb;EAEA;EACA;EACA,MAAMG,QAAA,GAAW9C,aAAA,CAAcuB,KAAA,CAAMY,KAAK,CAACzB,GAAG;EAC9Ca,KAAA,CAAMY,KAAK,CAACzB,GAAG,GAAGoC,QAAA;EAElB;EACA;EACA/C,yBAAA,CAA0B,MAAM;IAC9B,IAAI+C,QAAA,CAASC,OAAO,EAAE;MACpBD,QAAA,CAASC,OAAO,CAACF,aAAa,GAAGjB,KAAA;IACnC;EACF,GAAG,CAACkB,QAAA,EAAUlB,KAAA,CAAM;EAEpB,OAAOL,KAAA;AACT"}
1
+ {"version":3,"sources":["useCheckbox.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport {\n getPartitionedNativeProps,\n resolveShorthand,\n useControllableState,\n useEventCallback,\n useId,\n useIsomorphicLayoutEffect,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { CheckboxProps, CheckboxState } from './Checkbox.types';\nimport {\n Checkmark12Filled,\n Checkmark16Filled,\n Square12Filled,\n Square16Filled,\n CircleFilled,\n} from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { useFocusWithin } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render Checkbox.\n *\n * The returned state can be modified with hooks such as useCheckboxStyles_unstable,\n * before being passed to renderCheckbox_unstable.\n *\n * @param props - props from this instance of Checkbox\n * @param ref - reference to `<input>` element of Checkbox\n */\nexport const useCheckbox_unstable = (props: CheckboxProps, ref: React.Ref<HTMLInputElement>): CheckboxState => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, { supportsLabelFor: true, supportsRequired: true });\n\n const { disabled = false, required, shape = 'square', size = 'medium', labelPosition = 'after', onChange } = props;\n\n const [checked, setChecked] = useControllableState({\n defaultState: props.defaultChecked,\n state: props.checked,\n initialState: false,\n });\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['checked', 'defaultChecked', 'size', 'onChange'],\n });\n\n const mixed = checked === 'mixed';\n const id = useId('checkbox-', nativeProps.primary.id);\n\n let checkmarkIcon;\n if (mixed) {\n if (shape === 'circular') {\n checkmarkIcon = <CircleFilled />;\n } else {\n checkmarkIcon = size === 'large' ? <Square16Filled /> : <Square12Filled />;\n }\n } else if (checked) {\n checkmarkIcon = size === 'large' ? <Checkmark16Filled /> : <Checkmark12Filled />;\n }\n\n const state: CheckboxState = {\n shape,\n checked,\n disabled,\n size,\n labelPosition,\n components: {\n root: 'span',\n input: 'input',\n indicator: 'div',\n label: Label,\n },\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: {\n ref: useFocusWithin<HTMLSpanElement>(),\n ...nativeProps.root,\n },\n }),\n input: resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n type: 'checkbox',\n id,\n ref,\n checked: checked === true,\n ...nativeProps.primary,\n },\n }),\n label: resolveShorthand(props.label, {\n required: false,\n defaultProps: {\n htmlFor: id,\n disabled,\n required,\n size: 'medium', // Even if the checkbox itself is large\n },\n }),\n indicator: resolveShorthand(props.indicator, {\n required: true,\n defaultProps: {\n 'aria-hidden': true,\n children: checkmarkIcon,\n },\n }),\n };\n\n state.input.onChange = useEventCallback(ev => {\n const val = ev.currentTarget.indeterminate ? 'mixed' : ev.currentTarget.checked;\n onChange?.(ev, { checked: val });\n setChecked(val);\n });\n\n // Create a ref object for the input element so we can use it to set the indeterminate prop.\n // Use useMergedRefs, since the ref might be undefined or a function-ref (no .current)\n const inputRef = useMergedRefs(state.input.ref);\n state.input.ref = inputRef;\n\n // Set the <input> element's checked and indeterminate properties based on our tri-state property.\n // Since indeterminate can only be set via javascript, it has to be done in a layout effect.\n useIsomorphicLayoutEffect(() => {\n if (inputRef.current) {\n inputRef.current.indeterminate = mixed;\n }\n }, [inputRef, mixed]);\n\n return state;\n};\n"],"names":["React","useFieldControlProps_unstable","getPartitionedNativeProps","resolveShorthand","useControllableState","useEventCallback","useId","useIsomorphicLayoutEffect","useMergedRefs","Checkmark12Filled","Checkmark16Filled","Square12Filled","Square16Filled","CircleFilled","Label","useFocusWithin","useCheckbox_unstable","props","ref","supportsLabelFor","supportsRequired","disabled","required","shape","size","labelPosition","onChange","checked","setChecked","defaultState","defaultChecked","state","initialState","nativeProps","primarySlotTagName","excludedPropNames","mixed","id","primary","checkmarkIcon","components","root","input","indicator","label","defaultProps","type","htmlFor","children","ev","val","currentTarget","indeterminate","inputRef","current"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SACEC,yBAAyB,EACzBC,gBAAgB,EAChBC,oBAAoB,EACpBC,gBAAgB,EAChBC,KAAK,EACLC,yBAAyB,EACzBC,aAAa,QACR,4BAA4B;AAEnC,SACEC,iBAAiB,EACjBC,iBAAiB,EACjBC,cAAc,EACdC,cAAc,EACdC,YAAY,QACP,wBAAwB;AAC/B,SAASC,KAAK,QAAQ,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c,MAAMyB,KAAK,EAAE;YACnCpB,UAAU,IAAI;YACduB,cAAc;gBACZC,MAAM;gBACNT;gBACAnB;gBACAS,SAASA,YAAY,IAAI;gBACzB,GAAGM,YAAYK,OAAO;YACxB;QACF;QACAM,OAAOzC,iBAAiBc,MAAM2B,KAAK,EAAE;YACnCtB,UAAU,KAAK;YACfuB,cAAc;gBACZE,SAASV;gBACThB;gBACAC;gBACAE,MAAM;YACR;QACF;QACAmB,WAAWxC,iBAAiBc,MAAM0B,SAAS,EAAE;YAC3CrB,UAAU,IAAI;YACduB,cAAc;gBACZ,eAAe,IAAI;gBACnBG,UAAUT;YACZ;QACF;IACF;IAEAR,MAAMW,KAAK,CAAChB,QAAQ,GAAGrB,iBAAiB4C,CAAAA,KAAM;QAC5C,MAAMC,MAAMD,GAAGE,aAAa,CAACC,aAAa,GAAG,UAAUH,GAAGE,aAAa,CAACxB,OAAO;QAC/ED,qBAAAA,sBAAAA,KAAAA,IAAAA,SAAWuB,IAAI;YAAEtB,SAASuB;QAAI;QAC9BtB,WAAWsB;IACb;IAEA,4FAA4F;IAC5F,sFAAsF;IACtF,MAAMG,WAAW7C,cAAcuB,MAAMW,KAAK,CAACxB,GAAG;IAC9Ca,MAAMW,KAAK,CAACxB,GAAG,GAAGmC;IAElB,kGAAkG;IAClG,4FAA4F;IAC5F9C,0BAA0B,IAAM;QAC9B,IAAI8C,SAASC,OAAO,EAAE;YACpBD,SAASC,OAAO,CAACF,aAAa,GAAGhB;QACnC,CAAC;IACH,GAAG;QAACiB;QAAUjB;KAAM;IAEpB,OAAOL;AACT,EAAE"}
@@ -10,7 +10,7 @@ export const checkboxClassNames = {
10
10
  // The indicator size is used by the indicator and label styles
11
11
  const indicatorSizeMedium = '16px';
12
12
  const indicatorSizeLarge = '20px';
13
- const useRootBaseClassName = /*#__PURE__*/__resetStyles("r113b80b", "r1qhrryh", [".r113b80b{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;vertical-align:middle;color:var(--colorNeutralForeground3);}", ".r113b80b:focus{outline-style:none;}", ".r113b80b:focus-visible{outline-style:none;}", ".r113b80b[data-fui-focus-within]:focus-within{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}", ".r113b80b[data-fui-focus-within]:focus-within::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);top:-2px;bottom:-2px;left:-2px;right:-2px;}", ".r1qhrryh{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;vertical-align:middle;color:var(--colorNeutralForeground3);}", ".r1qhrryh:focus{outline-style:none;}", ".r1qhrryh:focus-visible{outline-style:none;}", ".r1qhrryh[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}", ".r1qhrryh[data-fui-focus-within]:focus-within::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:-2px;bottom:-2px;right:-2px;left:-2px;}"]);
13
+ const useRootBaseClassName = /*#__PURE__*/__resetStyles("r1qaeuiq", "rm0k3vm", [".r1qaeuiq{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;vertical-align:middle;color:var(--colorNeutralForeground3);}", ".r1qaeuiq:focus{outline-style:none;}", ".r1qaeuiq:focus-visible{outline-style:none;}", ".r1qaeuiq[data-fui-focus-within]:focus-within{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}", ".r1qaeuiq[data-fui-focus-within]:focus-within::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}", ".rm0k3vm{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;vertical-align:middle;color:var(--colorNeutralForeground3);}", ".rm0k3vm:focus{outline-style:none;}", ".rm0k3vm:focus-visible{outline-style:none;}", ".rm0k3vm[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}", ".rm0k3vm[data-fui-focus-within]:focus-within::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}"]);
14
14
  const useRootStyles = /*#__PURE__*/__styles({
15
15
  unchecked: {
16
16
  Bi91k9c: "f3p8bqa",
@@ -1 +1 @@
1
- {"version":3,"names":["__resetStyles","__styles","mergeClasses","shorthands","createFocusOutlineStyle","tokens","checkboxClassNames","root","label","input","indicator","indicatorSizeMedium","indicatorSizeLarge","useRootBaseClassName","useRootStyles","unchecked","Bi91k9c","ns3gzv","n5iecx","Bq2lx2j","Bv7p3up","lj723h","B6u2zzw","Be5wueo","Cgwcxn","Btnvhkj","checked","sj55zd","Bvs3sgl","opw9sb","C5wppx","B32epof","Bphahg7","Jctw66","Bq0zqd5","Bgesukf","mixed","cc1l3s","km5s60","disabled","Bceei9c","Bbusuzp","B7bxudy","h","a","d","m","useInputBaseClassName","useInputStyles","before","j35jbq","after","oyh7mz","large","a9b677","useIndicatorBaseClassName","useIndicatorStyles","Be2twd7","Bqenvij","circular","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","useLabelStyles","base","qb2dma","z8tnut","z189sj","Byoj8tv","uwmqm3","medium","B6of3ja","jrapky","useCheckboxStyles_unstable","state","labelPosition","shape","size","rootBaseClassName","rootStyles","className","inputBaseClassName","inputStyles","indicatorBaseClassName","indicatorStyles","labelStyles"],"sources":["../../../src/components/Checkbox/useCheckboxStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { CheckboxSlots, CheckboxState } from './Checkbox.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const checkboxClassNames: SlotClassNames<CheckboxSlots> = {\n root: 'fui-Checkbox',\n label: 'fui-Checkbox__label',\n input: 'fui-Checkbox__input',\n indicator: 'fui-Checkbox__indicator',\n};\n\n// The indicator size is used by the indicator and label styles\nconst indicatorSizeMedium = '16px';\nconst indicatorSizeLarge = '20px';\n\nconst useRootBaseClassName = makeResetStyles({\n position: 'relative',\n display: 'inline-flex',\n cursor: 'pointer',\n verticalAlign: 'middle',\n color: tokens.colorNeutralForeground3,\n ...createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n});\n\nconst useRootStyles = makeStyles({\n unchecked: {\n ':hover': {\n color: tokens.colorNeutralForeground2,\n [`> .${checkboxClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessibleHover),\n },\n },\n\n ':active': {\n color: tokens.colorNeutralForeground1,\n [`> .${checkboxClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessiblePressed),\n },\n },\n },\n\n checked: {\n color: tokens.colorNeutralForeground1,\n\n [`> .${checkboxClassNames.indicator}`]: {\n backgroundColor: tokens.colorCompoundBrandBackground,\n color: tokens.colorNeutralForegroundInverted,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackground),\n },\n\n ':hover': {\n [`> .${checkboxClassNames.indicator}`]: {\n backgroundColor: tokens.colorCompoundBrandBackgroundHover,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackgroundHover),\n },\n },\n\n ':active': {\n [`> .${checkboxClassNames.indicator}`]: {\n backgroundColor: tokens.colorCompoundBrandBackgroundPressed,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackgroundPressed),\n },\n },\n },\n\n mixed: {\n color: tokens.colorNeutralForeground1,\n\n [`> .${checkboxClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStroke),\n color: tokens.colorCompoundBrandForeground1,\n },\n\n ':hover': {\n [`> .${checkboxClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokeHover),\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n },\n\n ':active': {\n [`> .${checkboxClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokePressed),\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n },\n },\n\n disabled: {\n cursor: 'default',\n\n color: tokens.colorNeutralForegroundDisabled,\n\n [`> .${checkboxClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n [`> .${checkboxClassNames.indicator}`]: {\n color: 'GrayText',\n },\n },\n },\n});\n\nconst useInputBaseClassName = makeResetStyles({\n boxSizing: 'border-box',\n cursor: 'inherit',\n height: '100%',\n margin: 0,\n opacity: 0,\n position: 'absolute',\n top: 0,\n // Calculate the width of the hidden input by taking into account the size of the indicator + the padding around it.\n // This is done so that clicking on that \"empty space\" still toggles the checkbox.\n width: `calc(${indicatorSizeMedium} + 2 * ${tokens.spacingHorizontalS})`,\n});\n\nconst useInputStyles = makeStyles({\n before: {\n right: 0,\n },\n after: {\n left: 0,\n },\n\n large: {\n width: `calc(${indicatorSizeLarge} + 2 * ${tokens.spacingHorizontalS})`,\n },\n});\n\nconst useIndicatorBaseClassName = makeResetStyles({\n alignSelf: 'flex-start',\n boxSizing: 'border-box',\n flexShrink: 0,\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'hidden',\n\n border: tokens.strokeWidthThin + ' solid ' + tokens.colorNeutralStrokeAccessible,\n borderRadius: tokens.borderRadiusSmall,\n margin: tokens.spacingVerticalS + ' ' + tokens.spacingHorizontalS,\n fill: 'currentColor',\n pointerEvents: 'none',\n\n fontSize: '12px',\n height: indicatorSizeMedium,\n width: indicatorSizeMedium,\n});\n\nconst useIndicatorStyles = makeStyles({\n large: {\n fontSize: '16px',\n height: indicatorSizeLarge,\n width: indicatorSizeLarge,\n },\n\n circular: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n});\n\n// Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.\nconst useLabelStyles = makeStyles({\n base: {\n alignSelf: 'center',\n color: 'inherit',\n cursor: 'inherit',\n ...shorthands.padding(tokens.spacingVerticalS, tokens.spacingHorizontalS),\n },\n\n before: {\n paddingRight: tokens.spacingHorizontalXS,\n },\n after: {\n paddingLeft: tokens.spacingHorizontalXS,\n },\n\n // Use a (negative) margin to account for the difference between the indicator's height and the label's line height.\n // This prevents the label from expanding the height of the checkbox, but preserves line height if the label wraps.\n medium: {\n marginTop: `calc((${indicatorSizeMedium} - ${tokens.lineHeightBase300}) / 2)`,\n marginBottom: `calc((${indicatorSizeMedium} - ${tokens.lineHeightBase300}) / 2)`,\n },\n large: {\n marginTop: `calc((${indicatorSizeLarge} - ${tokens.lineHeightBase300}) / 2)`,\n marginBottom: `calc((${indicatorSizeLarge} - ${tokens.lineHeightBase300}) / 2)`,\n },\n});\n\n/**\n * Apply styling to the Checkbox slots based on the state\n */\nexport const useCheckboxStyles_unstable = (state: CheckboxState): CheckboxState => {\n const { checked, disabled, labelPosition, shape, size } = state;\n\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n checkboxClassNames.root,\n rootBaseClassName,\n disabled\n ? rootStyles.disabled\n : checked === 'mixed'\n ? rootStyles.mixed\n : checked\n ? rootStyles.checked\n : rootStyles.unchecked,\n state.root.className,\n );\n\n const inputBaseClassName = useInputBaseClassName();\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(\n checkboxClassNames.input,\n inputBaseClassName,\n size === 'large' && inputStyles.large,\n inputStyles[labelPosition],\n state.input.className,\n );\n\n const indicatorBaseClassName = useIndicatorBaseClassName();\n const indicatorStyles = useIndicatorStyles();\n if (state.indicator) {\n state.indicator.className = mergeClasses(\n checkboxClassNames.indicator,\n indicatorBaseClassName,\n size === 'large' && indicatorStyles.large,\n shape === 'circular' && indicatorStyles.circular,\n state.indicator.className,\n );\n }\n\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(\n checkboxClassNames.label,\n labelStyles.base,\n labelStyles[size],\n labelStyles[labelPosition],\n state.label.className,\n );\n }\n\n return state;\n};\n"],"mappings":"AAAA,SAAAA,aAAA,EAAAC,QAAA,EAAsCC,YAAY,EAAEC,UAAU,QAAQ;AACtE,SAASC,uBAAuB,QAAQ;AACxC,SAASC,MAAM,QAAQ;AAIvB,OAAO,MAAMC,kBAAA,GAAoD;EAC/DC,IAAA,EAAM;EACNC,KAAA,EAAO;EACPC,KAAA,EAAO;EACPC,SAAA,EAAW;AACb;AAEA;AACA,MAAMC,mBAAA,GAAsB;AAC5B,MAAMC,kBAAA,GAAqB;AAE3B,MAAMC,oBAAA,gBAAuBb,aAAA,o3EAO7B;AAEA,MAAMc,aAAA,gBAAgBb,QAAA;EAAAc,SAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAjB,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAe,OAAA;IAAAb,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAW,KAAA;IAAAT,MAAA;IAAAG,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAJ,MAAA;IAAAZ,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAiB,MAAA;IAAAf,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAa,MAAA;EAAA;EAAAC,QAAA;IAAAC,OAAA;IAAAb,MAAA;IAAAG,MAAA;IAAAC,OAAA;IAAAC,OA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nE,KAAK,CAACyE,SAAS;EAEzB;EAEA,OAAON,KAAA;AACT"}
1
+ {"version":3,"names":["__resetStyles","__styles","mergeClasses","shorthands","createFocusOutlineStyle","tokens","checkboxClassNames","root","label","input","indicator","indicatorSizeMedium","indicatorSizeLarge","useRootBaseClassName","useRootStyles","unchecked","Bi91k9c","ns3gzv","n5iecx","Bq2lx2j","Bv7p3up","lj723h","B6u2zzw","Be5wueo","Cgwcxn","Btnvhkj","checked","sj55zd","Bvs3sgl","opw9sb","C5wppx","B32epof","Bphahg7","Jctw66","Bq0zqd5","Bgesukf","mixed","cc1l3s","km5s60","disabled","Bceei9c","Bbusuzp","B7bxudy","h","a","d","m","useInputBaseClassName","useInputStyles","before","j35jbq","after","oyh7mz","large","a9b677","useIndicatorBaseClassName","useIndicatorStyles","Be2twd7","Bqenvij","circular","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","useLabelStyles","base","qb2dma","z8tnut","z189sj","Byoj8tv","uwmqm3","medium","B6of3ja","jrapky","useCheckboxStyles_unstable","state","labelPosition","shape","size","rootBaseClassName","rootStyles","className","inputBaseClassName","inputStyles","indicatorBaseClassName","indicatorStyles","labelStyles"],"sources":["useCheckboxStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nexport const checkboxClassNames = {\n root: 'fui-Checkbox',\n label: 'fui-Checkbox__label',\n input: 'fui-Checkbox__input',\n indicator: 'fui-Checkbox__indicator'\n};\n// The indicator size is used by the indicator and label styles\nconst indicatorSizeMedium = '16px';\nconst indicatorSizeLarge = '20px';\nconst useRootBaseClassName = makeResetStyles({\n position: 'relative',\n display: 'inline-flex',\n cursor: 'pointer',\n verticalAlign: 'middle',\n color: tokens.colorNeutralForeground3,\n ...createFocusOutlineStyle({\n style: {},\n selector: 'focus-within'\n })\n});\nconst useRootStyles = makeStyles({\n unchecked: {\n ':hover': {\n color: tokens.colorNeutralForeground2,\n [`> .${checkboxClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessibleHover)\n }\n },\n ':active': {\n color: tokens.colorNeutralForeground1,\n [`> .${checkboxClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessiblePressed)\n }\n }\n },\n checked: {\n color: tokens.colorNeutralForeground1,\n [`> .${checkboxClassNames.indicator}`]: {\n backgroundColor: tokens.colorCompoundBrandBackground,\n color: tokens.colorNeutralForegroundInverted,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackground)\n },\n ':hover': {\n [`> .${checkboxClassNames.indicator}`]: {\n backgroundColor: tokens.colorCompoundBrandBackgroundHover,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackgroundHover)\n }\n },\n ':active': {\n [`> .${checkboxClassNames.indicator}`]: {\n backgroundColor: tokens.colorCompoundBrandBackgroundPressed,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackgroundPressed)\n }\n }\n },\n mixed: {\n color: tokens.colorNeutralForeground1,\n [`> .${checkboxClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStroke),\n color: tokens.colorCompoundBrandForeground1\n },\n ':hover': {\n [`> .${checkboxClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokeHover),\n color: tokens.colorCompoundBrandForeground1Hover\n }\n },\n ':active': {\n [`> .${checkboxClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokePressed),\n color: tokens.colorCompoundBrandForeground1Pressed\n }\n }\n },\n disabled: {\n cursor: 'default',\n color: tokens.colorNeutralForegroundDisabled,\n [`> .${checkboxClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled\n },\n '@media (forced-colors: active)': {\n color: 'GrayText',\n [`> .${checkboxClassNames.indicator}`]: {\n color: 'GrayText'\n }\n }\n }\n});\nconst useInputBaseClassName = makeResetStyles({\n boxSizing: 'border-box',\n cursor: 'inherit',\n height: '100%',\n margin: 0,\n opacity: 0,\n position: 'absolute',\n top: 0,\n // Calculate the width of the hidden input by taking into account the size of the indicator + the padding around it.\n // This is done so that clicking on that \"empty space\" still toggles the checkbox.\n width: `calc(${indicatorSizeMedium} + 2 * ${tokens.spacingHorizontalS})`\n});\nconst useInputStyles = makeStyles({\n before: {\n right: 0\n },\n after: {\n left: 0\n },\n large: {\n width: `calc(${indicatorSizeLarge} + 2 * ${tokens.spacingHorizontalS})`\n }\n});\nconst useIndicatorBaseClassName = makeResetStyles({\n alignSelf: 'flex-start',\n boxSizing: 'border-box',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'hidden',\n border: tokens.strokeWidthThin + ' solid ' + tokens.colorNeutralStrokeAccessible,\n borderRadius: tokens.borderRadiusSmall,\n margin: tokens.spacingVerticalS + ' ' + tokens.spacingHorizontalS,\n fill: 'currentColor',\n pointerEvents: 'none',\n fontSize: '12px',\n height: indicatorSizeMedium,\n width: indicatorSizeMedium\n});\nconst useIndicatorStyles = makeStyles({\n large: {\n fontSize: '16px',\n height: indicatorSizeLarge,\n width: indicatorSizeLarge\n },\n circular: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular)\n }\n});\n// Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.\nconst useLabelStyles = makeStyles({\n base: {\n alignSelf: 'center',\n color: 'inherit',\n cursor: 'inherit',\n ...shorthands.padding(tokens.spacingVerticalS, tokens.spacingHorizontalS)\n },\n before: {\n paddingRight: tokens.spacingHorizontalXS\n },\n after: {\n paddingLeft: tokens.spacingHorizontalXS\n },\n // Use a (negative) margin to account for the difference between the indicator's height and the label's line height.\n // This prevents the label from expanding the height of the checkbox, but preserves line height if the label wraps.\n medium: {\n marginTop: `calc((${indicatorSizeMedium} - ${tokens.lineHeightBase300}) / 2)`,\n marginBottom: `calc((${indicatorSizeMedium} - ${tokens.lineHeightBase300}) / 2)`\n },\n large: {\n marginTop: `calc((${indicatorSizeLarge} - ${tokens.lineHeightBase300}) / 2)`,\n marginBottom: `calc((${indicatorSizeLarge} - ${tokens.lineHeightBase300}) / 2)`\n }\n});\n/**\n * Apply styling to the Checkbox slots based on the state\n */ export const useCheckboxStyles_unstable = (state)=>{\n const { checked , disabled , labelPosition , shape , size } = state;\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(checkboxClassNames.root, rootBaseClassName, disabled ? rootStyles.disabled : checked === 'mixed' ? rootStyles.mixed : checked ? rootStyles.checked : rootStyles.unchecked, state.root.className);\n const inputBaseClassName = useInputBaseClassName();\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(checkboxClassNames.input, inputBaseClassName, size === 'large' && inputStyles.large, inputStyles[labelPosition], state.input.className);\n const indicatorBaseClassName = useIndicatorBaseClassName();\n const indicatorStyles = useIndicatorStyles();\n if (state.indicator) {\n state.indicator.className = mergeClasses(checkboxClassNames.indicator, indicatorBaseClassName, size === 'large' && indicatorStyles.large, shape === 'circular' && indicatorStyles.circular, state.indicator.className);\n }\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(checkboxClassNames.label, labelStyles.base, labelStyles[size], labelStyles[labelPosition], state.label.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,aAAA,EAAAC,QAAA,EAAsCC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACtF,SAASC,uBAAuB,QAAQ,yBAAyB;AACjE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,kBAAkB,GAAG;EAC9BC,IAAI,EAAE,cAAc;EACpBC,KAAK,EAAE,qBAAqB;EAC5BC,KAAK,EAAE,qBAAqB;EAC5BC,SAAS,EAAE;AACf,CAAC;AACD;AACA,MAAMC,mBAAmB,GAAG,MAAM;AAClC,MAAMC,kBAAkB,GAAG,MAAM;AACjC,MAAMC,oBAAoB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C;EACpC2B,KAAK,CAAClE,KAAK,CAACwE,SAAS,GAAG/E,YAAY,CAACI,kBAAkB,CAACG,KAAK,EAAEyE,kBAAkB,EAAEJ,IAAI,KAAK,OAAO,IAAIK,WAAW,CAAC9B,KAAK,EAAE8B,WAAW,CAACP,aAAa,CAAC,EAAED,KAAK,CAAClE,KAAK,CAACwE,SAAS,CAAC;EAC5K,MAAMG,sBAAsB,GAAG7B,yBAAyB,CAAC,CAAC;EAC1D,MAAM8B,eAAe,GAAG7B,kBAAkB,CAAC,CAAC;EAC5C,IAAImB,KAAK,CAACjE,SAAS,EAAE;IACjBiE,KAAK,CAACjE,SAAS,CAACuE,SAAS,GAAG/E,YAAY,CAACI,kBAAkB,CAACI,SAAS,EAAE0E,sBAAsB,EAAEN,IAAI,KAAK,OAAO,IAAIO,eAAe,CAAChC,KAAK,EAAEwB,KAAK,KAAK,UAAU,IAAIQ,eAAe,CAAC1B,QAAQ,EAAEgB,KAAK,CAACjE,SAAS,CAACuE,SAAS,CAAC;EAC1N;EACA,MAAMK,WAAW,GAAGtB,cAAc,CAAC,CAAC;EACpC,IAAIW,KAAK,CAACnE,KAAK,EAAE;IACbmE,KAAK,CAACnE,KAAK,CAACyE,SAAS,GAAG/E,YAAY,CAACI,kBAAkB,CAACE,KAAK,EAAE8E,WAAW,CAACrB,IAAI,EAAEqB,WAAW,CAACR,IAAI,CAAC,EAAEQ,WAAW,CAACV,aAAa,CAAC,EAAED,KAAK,CAACnE,KAAK,CAACyE,SAAS,CAAC;EAC1J;EACA,OAAON,KAAK;AAChB,CAAC"}
package/lib/index.js CHANGED
@@ -1,2 +1 @@
1
1
  export { Checkbox, checkboxClassNames, renderCheckbox_unstable, useCheckboxStyles_unstable, useCheckbox_unstable } from './Checkbox';
2
- //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["Checkbox","checkboxClassNames","renderCheckbox_unstable","useCheckboxStyles_unstable","useCheckbox_unstable"],"sources":["../src/index.ts"],"sourcesContent":["export {\n Checkbox,\n checkboxClassNames,\n renderCheckbox_unstable,\n useCheckboxStyles_unstable,\n useCheckbox_unstable,\n} from './Checkbox';\nexport type { CheckboxOnChangeData, CheckboxProps, CheckboxSlots, CheckboxState } from './Checkbox';\n"],"mappings":"AAAA,SACEA,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,oBAAoB,QACf"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export {\n Checkbox,\n checkboxClassNames,\n renderCheckbox_unstable,\n useCheckboxStyles_unstable,\n useCheckbox_unstable,\n} from './Checkbox';\nexport type { CheckboxOnChangeData, CheckboxProps, CheckboxSlots, CheckboxState } from './Checkbox';\n"],"names":["Checkbox","checkboxClassNames","renderCheckbox_unstable","useCheckboxStyles_unstable","useCheckbox_unstable"],"mappings":"AAAA,SACEA,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,oBAAoB,QACf,aAAa"}
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
6
  _exportStar(require("./components/Checkbox/index"), exports);
7
- //# sourceMappingURL=Checkbox.js.map
8
-
9
- //# sourceMappingURL=Checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/Checkbox.js"],"sourcesContent":["export * from './components/Checkbox/index';\n//# sourceMappingURL=Checkbox.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,oCAAoC"}
1
+ {"version":3,"sources":["Checkbox.js"],"sourcesContent":["export * from './components/Checkbox/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
@@ -18,6 +18,4 @@ const Checkbox = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
18
18
  (0, _reactSharedContexts.useCustomStyleHook_unstable)('useCheckboxStyles_unstable')(state);
19
19
  return (0, _renderCheckbox.renderCheckbox_unstable)(state);
20
20
  });
21
- Checkbox.displayName = 'Checkbox'; //# sourceMappingURL=Checkbox.js.map
22
-
23
- //# sourceMappingURL=Checkbox.js.map
21
+ Checkbox.displayName = 'Checkbox';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Checkbox/Checkbox.js"],"sourcesContent":["import * as React from 'react';\nimport { useCheckbox_unstable } from './useCheckbox';\nimport { renderCheckbox_unstable } from './renderCheckbox';\nimport { useCheckboxStyles_unstable } from './useCheckboxStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Checkboxes give people a way to select one or more items from a group,\n * or switch between two mutually exclusive options (checked or unchecked).\n */\nexport const Checkbox = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useCheckbox_unstable(props, ref);\n useCheckboxStyles_unstable(state);\n useCustomStyleHook_unstable('useCheckboxStyles_unstable')(state);\n return renderCheckbox_unstable(state);\n});\nCheckbox.displayName = 'Checkbox';\n//# sourceMappingURL=Checkbox.js.map"],"names":["Checkbox","React","forwardRef","props","ref","state","useCheckbox_unstable","useCheckboxStyles_unstable","useCustomStyleHook_unstable","renderCheckbox_unstable","displayName"],"mappings":";;;;+BASaA;;aAAAA;;;6DATU;6BACc;gCACG;yCACG;qCACC;AAKrC,MAAMA,WAAW,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACpE,MAAMC,QAAQC,IAAAA,iCAAoB,EAACH,OAAOC;IAC1CG,IAAAA,mDAA0B,EAACF;IAC3BG,IAAAA,gDAA2B,EAAC,8BAA8BH;IAC1D,OAAOI,IAAAA,uCAAuB,EAACJ;AACjC;AACAL,SAASU,WAAW,GAAG,YACvB,oCAAoC"}
1
+ {"version":3,"sources":["Checkbox.js"],"sourcesContent":["import * as React from 'react';\nimport { useCheckbox_unstable } from './useCheckbox';\nimport { renderCheckbox_unstable } from './renderCheckbox';\nimport { useCheckboxStyles_unstable } from './useCheckboxStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Checkboxes give people a way to select one or more items from a group,\n * or switch between two mutually exclusive options (checked or unchecked).\n */ export const Checkbox = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useCheckbox_unstable(props, ref);\n useCheckboxStyles_unstable(state);\n useCustomStyleHook_unstable('useCheckboxStyles_unstable')(state);\n return renderCheckbox_unstable(state);\n});\nCheckbox.displayName = 'Checkbox';\n"],"names":["Checkbox","React","forwardRef","props","ref","state","useCheckbox_unstable","useCheckboxStyles_unstable","useCustomStyleHook_unstable","renderCheckbox_unstable","displayName"],"mappings":";;;;+BAQiBA;;aAAAA;;;6DARM;6BACc;gCACG;yCACG;qCACC;AAIjC,MAAMA,WAAW,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IACrE,MAAMC,QAAQC,IAAAA,iCAAoB,EAACH,OAAOC;IAC1CG,IAAAA,mDAA0B,EAACF;IAC3BG,IAAAA,gDAA2B,EAAC,8BAA8BH;IAC1D,OAAOI,IAAAA,uCAAuB,EAACJ;AACnC;AACAL,SAASU,WAAW,GAAG"}
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
6
6
  const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
7
- //# sourceMappingURL=Checkbox.types.js.map
8
-
9
- //# sourceMappingURL=Checkbox.types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Checkbox/Checkbox.types.js"],"sourcesContent":["import * as React from 'react';\n//# sourceMappingURL=Checkbox.types.js.map"],"names":[],"mappings":";;;;;6DAAuB;CACvB,0CAA0C"}
1
+ {"version":3,"sources":["Checkbox.types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;6DAAuB"}
@@ -8,6 +8,3 @@ _exportStar(require("./Checkbox.types"), exports);
8
8
  _exportStar(require("./renderCheckbox"), exports);
9
9
  _exportStar(require("./useCheckbox"), exports);
10
10
  _exportStar(require("./useCheckboxStyles.styles"), exports);
11
- //# sourceMappingURL=index.js.map
12
-
13
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Checkbox/index.js"],"sourcesContent":["export * from './Checkbox';\nexport * from './Checkbox.types';\nexport * from './renderCheckbox';\nexport * from './useCheckbox';\nexport * from './useCheckboxStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './Checkbox';\nexport * from './Checkbox.types';\nexport * from './renderCheckbox';\nexport * from './useCheckbox';\nexport * from './useCheckboxStyles.styles';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA"}
@@ -11,6 +11,4 @@ const _reactUtilities = require("@fluentui/react-utilities");
11
11
  const renderCheckbox_unstable = (state)=>{
12
12
  const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
13
13
  return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.input, slotProps.input), state.labelPosition === 'before' && slots.label && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.label, slotProps.label), /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.indicator, slotProps.indicator), state.labelPosition === 'after' && slots.label && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.label, slotProps.label));
14
- }; //# sourceMappingURL=renderCheckbox.js.map
15
-
16
- //# sourceMappingURL=renderCheckbox.js.map
14
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Checkbox/renderCheckbox.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nexport const renderCheckbox_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n return /*#__PURE__*/createElement(slots.root, slotProps.root, /*#__PURE__*/createElement(slots.input, slotProps.input), state.labelPosition === 'before' && slots.label && /*#__PURE__*/createElement(slots.label, slotProps.label), /*#__PURE__*/createElement(slots.indicator, slotProps.indicator), state.labelPosition === 'after' && slots.label && /*#__PURE__*/createElement(slots.label, slotProps.label));\n};\n//# sourceMappingURL=renderCheckbox.js.map"],"names":["renderCheckbox_unstable","state","slots","slotProps","getSlotsNext","createElement","root","input","labelPosition","label","indicator"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAErCA;;aAAAA;;iCAFqE;gCACrD;AACtB,MAAMA,0BAA0BC,CAAAA,QAAS;IAC9C,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACH;IACjB,OAAO,WAAW,GAAEI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI,EAAE,WAAW,GAAED,IAAAA,8BAAa,EAACH,MAAMK,KAAK,EAAEJ,UAAUI,KAAK,GAAGN,MAAMO,aAAa,KAAK,YAAYN,MAAMO,KAAK,IAAI,WAAW,GAAEJ,IAAAA,8BAAa,EAACH,MAAMO,KAAK,EAAEN,UAAUM,KAAK,GAAG,WAAW,GAAEJ,IAAAA,8BAAa,EAACH,MAAMQ,SAAS,EAAEP,UAAUO,SAAS,GAAGT,MAAMO,aAAa,KAAK,WAAWN,MAAMO,KAAK,IAAI,WAAW,GAAEJ,IAAAA,8BAAa,EAACH,MAAMO,KAAK,EAAEN,UAAUM,KAAK;AAClZ,GACA,0CAA0C"}
1
+ {"version":3,"sources":["renderCheckbox.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nexport const renderCheckbox_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n return /*#__PURE__*/ createElement(slots.root, slotProps.root, /*#__PURE__*/ createElement(slots.input, slotProps.input), state.labelPosition === 'before' && slots.label && /*#__PURE__*/ createElement(slots.label, slotProps.label), /*#__PURE__*/ createElement(slots.indicator, slotProps.indicator), state.labelPosition === 'after' && slots.label && /*#__PURE__*/ createElement(slots.label, slotProps.label));\n};\n"],"names":["renderCheckbox_unstable","state","slots","slotProps","getSlotsNext","createElement","root","input","labelPosition","label","indicator"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAErCA;;aAAAA;;iCAFsE;gCACtD;AACtB,MAAMA,0BAA0B,CAACC,QAAQ;IAC5C,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,OAAO,WAAW,GAAGI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI,EAAE,WAAW,GAAGD,IAAAA,8BAAa,EAACH,MAAMK,KAAK,EAAEJ,UAAUI,KAAK,GAAGN,MAAMO,aAAa,KAAK,YAAYN,MAAMO,KAAK,IAAI,WAAW,GAAGJ,IAAAA,8BAAa,EAACH,MAAMO,KAAK,EAAEN,UAAUM,KAAK,GAAG,WAAW,GAAGJ,IAAAA,8BAAa,EAACH,MAAMQ,SAAS,EAAEP,UAAUO,SAAS,GAAGT,MAAMO,aAAa,KAAK,WAAWN,MAAMO,KAAK,IAAI,WAAW,GAAGJ,IAAAA,8BAAa,EAACH,MAAMO,KAAK,EAAEN,UAAUM,KAAK;AACzZ"}
@@ -115,6 +115,4 @@ const useCheckbox_unstable = (props, ref)=>{
115
115
  mixed
116
116
  ]);
117
117
  return state;
118
- }; //# sourceMappingURL=useCheckbox.js.map
119
-
120
- //# sourceMappingURL=useCheckbox.js.map
118
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Checkbox/useCheckbox.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, resolveShorthand, useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect, useMergedRefs } from '@fluentui/react-utilities';\nimport { Checkmark12Filled, Checkmark16Filled, Square12Filled, Square16Filled, CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { useFocusWithin } from '@fluentui/react-tabster';\n/**\n * Create the state required to render Checkbox.\n *\n * The returned state can be modified with hooks such as useCheckboxStyles_unstable,\n * before being passed to renderCheckbox_unstable.\n *\n * @param props - props from this instance of Checkbox\n * @param ref - reference to `<input>` element of Checkbox\n */\nexport const useCheckbox_unstable = (props, ref) => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, {\n supportsLabelFor: true,\n supportsRequired: true\n });\n const {\n disabled = false,\n required,\n shape = 'square',\n size = 'medium',\n labelPosition = 'after',\n onChange\n } = props;\n const [checked, setChecked] = useControllableState({\n defaultState: props.defaultChecked,\n state: props.checked,\n initialState: false\n });\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['checked', 'defaultChecked', 'size', 'onChange']\n });\n const mixed = checked === 'mixed';\n const id = useId('checkbox-', nativeProps.primary.id);\n let checkmarkIcon;\n if (mixed) {\n if (shape === 'circular') {\n checkmarkIcon = /*#__PURE__*/React.createElement(CircleFilled, null);\n } else {\n checkmarkIcon = size === 'large' ? /*#__PURE__*/React.createElement(Square16Filled, null) : /*#__PURE__*/React.createElement(Square12Filled, null);\n }\n } else if (checked) {\n checkmarkIcon = size === 'large' ? /*#__PURE__*/React.createElement(Checkmark16Filled, null) : /*#__PURE__*/React.createElement(Checkmark12Filled, null);\n }\n const state = {\n shape,\n checked,\n disabled,\n size,\n labelPosition,\n components: {\n root: 'span',\n input: 'input',\n indicator: 'div',\n label: Label\n },\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: {\n ref: useFocusWithin(),\n ...nativeProps.root\n }\n }),\n input: resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n type: 'checkbox',\n id,\n ref,\n checked: checked === true,\n ...nativeProps.primary\n }\n }),\n label: resolveShorthand(props.label, {\n required: false,\n defaultProps: {\n htmlFor: id,\n disabled,\n required,\n size: 'medium'\n }\n }),\n indicator: resolveShorthand(props.indicator, {\n required: true,\n defaultProps: {\n 'aria-hidden': true,\n children: checkmarkIcon\n }\n })\n };\n state.input.onChange = useEventCallback(ev => {\n const val = ev.currentTarget.indeterminate ? 'mixed' : ev.currentTarget.checked;\n onChange === null || onChange === void 0 ? void 0 : onChange(ev, {\n checked: val\n });\n setChecked(val);\n });\n // Create a ref object for the input element so we can use it to set the indeterminate prop.\n // Use useMergedRefs, since the ref might be undefined or a function-ref (no .current)\n const inputRef = useMergedRefs(state.input.ref);\n state.input.ref = inputRef;\n // Set the <input> element's checked and indeterminate properties based on our tri-state property.\n // Since indeterminate can only be set via javascript, it has to be done in a layout effect.\n useIsomorphicLayoutEffect(() => {\n if (inputRef.current) {\n inputRef.current.indeterminate = mixed;\n }\n }, [inputRef, mixed]);\n return state;\n};\n//# sourceMappingURL=useCheckbox.js.map"],"names":["useCheckbox_unstable","props","ref","useFieldControlProps_unstable","supportsLabelFor","supportsRequired","disabled","required","shape","size","labelPosition","onChange","checked","setChecked","useControllableState","defaultState","defaultChecked","state","initialState","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","mixed","id","useId","primary","checkmarkIcon","React","createElement","CircleFilled","Square16Filled","Square12Filled","Checkmark16Filled","Checkmark12Filled","components","root","input","indicator","label","Label","resolveShorthand","defaultProps","useFocusWithin","type","htmlFor","children","useEventCallback","ev","val","currentTarget","indeterminate","inputRef","useMergedRefs","useIsomorphicLayoutEffect","current"],"mappings":";;;;+BAeaA;;aAAAA;;;6DAfU;4BACuB;gCACuG;4BAClD;4BAC7E;8BACS;AAUxB,MAAMA,uBAAuB,CAACC,OAAOC,MAAQ;IAClD,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAA6B,EAACF,OAAO;QAC3CG,kBAAkB,IAAI;QACtBC,kB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,IAAAA,4BAAc;gBACnB,GAAGxB,YAAYiB,IAAI;YACrB;QACF;QACAC,OAAOI,IAAAA,gCAAgB,EAACxC,MAAMoC,KAAK,EAAE;YACnC9B,UAAU,IAAI;YACdmC,cAAc;gBACZE,MAAM;gBACNpB;gBACAtB;gBACAU,SAASA,YAAY,IAAI;gBACzB,GAAGO,YAAYO,OAAO;YACxB;QACF;QACAa,OAAOE,IAAAA,gCAAgB,EAACxC,MAAMsC,KAAK,EAAE;YACnChC,UAAU,KAAK;YACfmC,cAAc;gBACZG,SAASrB;gBACTlB;gBACAC;gBACAE,MAAM;YACR;QACF;QACA6B,WAAWG,IAAAA,gCAAgB,EAACxC,MAAMqC,SAAS,EAAE;YAC3C/B,UAAU,IAAI;YACdmC,cAAc;gBACZ,eAAe,IAAI;gBACnBI,UAAUnB;YACZ;QACF;IACF;IACAV,MAAMoB,KAAK,CAAC1B,QAAQ,GAAGoC,IAAAA,gCAAgB,EAACC,CAAAA,KAAM;QAC5C,MAAMC,MAAMD,GAAGE,aAAa,CAACC,aAAa,GAAG,UAAUH,GAAGE,aAAa,CAACtC,OAAO;QAC/ED,aAAa,IAAI,IAAIA,aAAa,KAAK,IAAI,KAAK,IAAIA,SAASqC,IAAI;YAC/DpC,SAASqC;QACX,EAAE;QACFpC,WAAWoC;IACb;IACA,4FAA4F;IAC5F,sFAAsF;IACtF,MAAMG,WAAWC,IAAAA,6BAAa,EAACpC,MAAMoB,KAAK,CAACnC,GAAG;IAC9Ce,MAAMoB,KAAK,CAACnC,GAAG,GAAGkD;IAClB,kGAAkG;IAClG,4FAA4F;IAC5FE,IAAAA,yCAAyB,EAAC,IAAM;QAC9B,IAAIF,SAASG,OAAO,EAAE;YACpBH,SAASG,OAAO,CAACJ,aAAa,GAAG5B;QACnC,CAAC;IACH,GAAG;QAAC6B;QAAU7B;KAAM;IACpB,OAAON;AACT,GACA,uCAAuC"}
1
+ {"version":3,"sources":["useCheckbox.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, resolveShorthand, useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect, useMergedRefs } from '@fluentui/react-utilities';\nimport { Checkmark12Filled, Checkmark16Filled, Square12Filled, Square16Filled, CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { useFocusWithin } from '@fluentui/react-tabster';\n/**\n * Create the state required to render Checkbox.\n *\n * The returned state can be modified with hooks such as useCheckboxStyles_unstable,\n * before being passed to renderCheckbox_unstable.\n *\n * @param props - props from this instance of Checkbox\n * @param ref - reference to `<input>` element of Checkbox\n */ export const useCheckbox_unstable = (props, ref)=>{\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, {\n supportsLabelFor: true,\n supportsRequired: true\n });\n const { disabled =false , required , shape ='square' , size ='medium' , labelPosition ='after' , onChange } = props;\n const [checked, setChecked] = useControllableState({\n defaultState: props.defaultChecked,\n state: props.checked,\n initialState: false\n });\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: [\n 'checked',\n 'defaultChecked',\n 'size',\n 'onChange'\n ]\n });\n const mixed = checked === 'mixed';\n const id = useId('checkbox-', nativeProps.primary.id);\n let checkmarkIcon;\n if (mixed) {\n if (shape === 'circular') {\n checkmarkIcon = /*#__PURE__*/ React.createElement(CircleFilled, null);\n } else {\n checkmarkIcon = size === 'large' ? /*#__PURE__*/ React.createElement(Square16Filled, null) : /*#__PURE__*/ React.createElement(Square12Filled, null);\n }\n } else if (checked) {\n checkmarkIcon = size === 'large' ? /*#__PURE__*/ React.createElement(Checkmark16Filled, null) : /*#__PURE__*/ React.createElement(Checkmark12Filled, null);\n }\n const state = {\n shape,\n checked,\n disabled,\n size,\n labelPosition,\n components: {\n root: 'span',\n input: 'input',\n indicator: 'div',\n label: Label\n },\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: {\n ref: useFocusWithin(),\n ...nativeProps.root\n }\n }),\n input: resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n type: 'checkbox',\n id,\n ref,\n checked: checked === true,\n ...nativeProps.primary\n }\n }),\n label: resolveShorthand(props.label, {\n required: false,\n defaultProps: {\n htmlFor: id,\n disabled,\n required,\n size: 'medium'\n }\n }),\n indicator: resolveShorthand(props.indicator, {\n required: true,\n defaultProps: {\n 'aria-hidden': true,\n children: checkmarkIcon\n }\n })\n };\n state.input.onChange = useEventCallback((ev)=>{\n const val = ev.currentTarget.indeterminate ? 'mixed' : ev.currentTarget.checked;\n onChange === null || onChange === void 0 ? void 0 : onChange(ev, {\n checked: val\n });\n setChecked(val);\n });\n // Create a ref object for the input element so we can use it to set the indeterminate prop.\n // Use useMergedRefs, since the ref might be undefined or a function-ref (no .current)\n const inputRef = useMergedRefs(state.input.ref);\n state.input.ref = inputRef;\n // Set the <input> element's checked and indeterminate properties based on our tri-state property.\n // Since indeterminate can only be set via javascript, it has to be done in a layout effect.\n useIsomorphicLayoutEffect(()=>{\n if (inputRef.current) {\n inputRef.current.indeterminate = mixed;\n }\n }, [\n inputRef,\n mixed\n ]);\n return state;\n};\n"],"names":["useCheckbox_unstable","props","ref","useFieldControlProps_unstable","supportsLabelFor","supportsRequired","disabled","required","shape","size","labelPosition","onChange","checked","setChecked","useControllableState","defaultState","defaultChecked","state","initialState","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","mixed","id","useId","primary","checkmarkIcon","React","createElement","CircleFilled","Square16Filled","Square12Filled","Checkmark16Filled","Checkmark12Filled","components","root","input","indicator","label","Label","resolveShorthand","defaultProps","useFocusWithin","type","htmlFor","children","useEventCallback","ev","val","currentTarget","indeterminate","inputRef","useMergedRefs","useIsomorphicLayoutEffect","current"],"mappings":";;;;+BAciBA;;aAAAA;;;6DAdM;4BACuB;gCACuG;4BAClD;4BAC7E;8BACS;AASpB,MAAMA,uBAAuB,CAACC,OAAOC,MAAM;IAClD,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAA6B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= {
22
22
  // The indicator size is used by the indicator and label styles
23
23
  const indicatorSizeMedium = '16px';
24
24
  const indicatorSizeLarge = '20px';
25
- const useRootBaseClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("r113b80b", "r1qhrryh", [
26
- ".r113b80b{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;vertical-align:middle;color:var(--colorNeutralForeground3);}",
27
- ".r113b80b:focus{outline-style:none;}",
28
- ".r113b80b:focus-visible{outline-style:none;}",
29
- ".r113b80b[data-fui-focus-within]:focus-within{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}",
30
- ".r113b80b[data-fui-focus-within]:focus-within::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);top:-2px;bottom:-2px;left:-2px;right:-2px;}",
31
- ".r1qhrryh{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;vertical-align:middle;color:var(--colorNeutralForeground3);}",
32
- ".r1qhrryh:focus{outline-style:none;}",
33
- ".r1qhrryh:focus-visible{outline-style:none;}",
34
- ".r1qhrryh[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",
35
- ".r1qhrryh[data-fui-focus-within]:focus-within::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:-2px;bottom:-2px;right:-2px;left:-2px;}"
25
+ const useRootBaseClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("r1qaeuiq", "rm0k3vm", [
26
+ ".r1qaeuiq{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;vertical-align:middle;color:var(--colorNeutralForeground3);}",
27
+ ".r1qaeuiq:focus{outline-style:none;}",
28
+ ".r1qaeuiq:focus-visible{outline-style:none;}",
29
+ ".r1qaeuiq[data-fui-focus-within]:focus-within{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}",
30
+ ".r1qaeuiq[data-fui-focus-within]:focus-within::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}",
31
+ ".rm0k3vm{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;vertical-align:middle;color:var(--colorNeutralForeground3);}",
32
+ ".rm0k3vm:focus{outline-style:none;}",
33
+ ".rm0k3vm:focus-visible{outline-style:none;}",
34
+ ".rm0k3vm[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",
35
+ ".rm0k3vm[data-fui-focus-within]:focus-within::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}"
36
36
  ]);
37
37
  const useRootStyles = /*#__PURE__*/ (0, _react["__styles"])({
38
38
  unchecked: {
@@ -357,5 +357,3 @@ const useCheckboxStyles_unstable = (state)=>{
357
357
  }
358
358
  return state;
359
359
  }; //# sourceMappingURL=useCheckboxStyles.styles.js.map
360
-
361
- //# sourceMappingURL=useCheckboxStyles.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Checkbox/useCheckboxStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nexport const checkboxClassNames = {\n root: 'fui-Checkbox',\n label: 'fui-Checkbox__label',\n input: 'fui-Checkbox__input',\n indicator: 'fui-Checkbox__indicator'\n};\n// The indicator size is used by the indicator and label styles\nconst indicatorSizeMedium = '16px';\nconst indicatorSizeLarge = '20px';\nconst useRootBaseClassName = /*#__PURE__*/__resetStyles(\"r113b80b\", \"r1qhrryh\", [\".r113b80b{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;vertical-align:middle;color:var(--colorNeutralForeground3);}\", \".r113b80b:focus{outline-style:none;}\", \".r113b80b:focus-visible{outline-style:none;}\", \".r113b80b[data-fui-focus-within]:focus-within{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}\", \".r113b80b[data-fui-focus-within]:focus-within::after{content:\\\"\\\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);top:-2px;bottom:-2px;left:-2px;right:-2px;}\", \".r1qhrryh{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;vertical-align:middle;color:var(--colorNeutralForeground3);}\", \".r1qhrryh:focus{outline-style:none;}\", \".r1qhrryh:focus-visible{outline-style:none;}\", \".r1qhrryh[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}\", \".r1qhrryh[data-fui-focus-within]:focus-within::after{content:\\\"\\\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:-2px;bottom:-2px;right:-2px;left:-2px;}\"]);\nconst useRootStyles = /*#__PURE__*/__styles({\n unchecked: {\n Bi91k9c: \"f3p8bqa\",\n ns3gzv: \"ffqb913\",\n n5iecx: [\"f42z0vd\", \"f1j37kh1\"],\n Bq2lx2j: \"f10v6cc1\",\n Bv7p3up: [\"f1j37kh1\", \"f42z0vd\"],\n lj723h: \"f1r2dosr\",\n B6u2zzw: \"f1oarbgq\",\n Be5wueo: [\"fo8gord\", \"f18ci1af\"],\n Cgwcxn: \"fviagcr\",\n Btnvhkj: [\"f18ci1af\", \"fo8gord\"]\n },\n checked: {\n sj55zd: \"f19n0e5\",\n Bvs3sgl: \"f5opsb9\",\n opw9sb: \"fpaw01r\",\n C5wppx: \"f1gqj827\",\n B32epof: [\"fub94a2\", \"f13mj44e\"],\n Bphahg7: \"f1qq5vh1\",\n Jctw66: [\"f13mj44e\", \"fub94a2\"],\n Bq0zqd5: \"f5x9vvn\",\n ns3gzv: \"fub8hyy\",\n n5iecx: [\"fffzknn\", \"f172bh4s\"],\n Bq2lx2j: \"f6tipb1\",\n Bv7p3up: [\"f172bh4s\", \"fffzknn\"],\n Bgesukf: \"f8adco2\",\n B6u2zzw: \"f1lepnt8\",\n Be5wueo: [\"f80ygm0\", \"frrkusm\"],\n Cgwcxn: \"f1gg953z\",\n Btnvhkj: [\"frrkusm\", \"f80ygm0\"]\n },\n mixed: {\n sj55zd: \"f19n0e5\",\n C5wppx: \"f12fgbth\",\n B32epof: [\"f171e6fm\", \"fttsnhr\"],\n Bphahg7: \"f1fyk1ks\",\n Jctw66: [\"fttsnhr\", \"f171e6fm\"],\n opw9sb: \"fvvg2h8\",\n ns3gzv: \"f1nlwys0\",\n n5iecx: [\"f1bhstg2\", \"f6tsdgz\"],\n Bq2lx2j: \"fqxbw9v\",\n Bv7p3up: [\"f6tsdgz\", \"f1bhstg2\"],\n cc1l3s: \"f1r38qqt\",\n B6u2zzw: \"f12q3i2l\",\n Be5wueo: [\"f9g1hxu\", \"f1o4ic5t\"],\n Cgwcxn: \"f1c3thm1\",\n Btnvhkj: [\"f1o4ic5t\", \"f9g1hxu\"],\n km5s60: \"ffd07pq\"\n },\n disabled: {\n Bceei9c: \"f158kwzp\",\n sj55zd: \"f1s2aq7o\",\n C5wppx: \"fgiuqeu\",\n B32epof: [\"f1q4sfkt\", \"f71co73\"],\n Bphahg7: \"f1u7lsiy\",\n Jctw66: [\"f71co73\", \"f1q4sfkt\"],\n opw9sb: \"f3vxa14\",\n Bbusuzp: \"f1dcs8yz\",\n B7bxudy: \"f1lmtjkn\"\n }\n}, {\n h: [\".f3p8bqa:hover{color:var(--colorNeutralForeground2);}\", \".ffqb913:hover>.fui-Checkbox__indicator{border-top-color:var(--colorNeutralStrokeAccessibleHover);}\", \".f42z0vd:hover>.fui-Checkbox__indicator{border-right-color:var(--colorNeutralStrokeAccessibleHover);}\", \".f1j37kh1:hover>.fui-Checkbox__indicator{border-left-color:var(--colorNeutralStrokeAccessibleHover);}\", \".f10v6cc1:hover>.fui-Checkbox__indicator{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}\", \".f5x9vvn:hover>.fui-Checkbox__indicator{background-color:var(--colorCompoundBrandBackgroundHover);}\", \".fub8hyy:hover>.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandBackgroundHover);}\", \".fffzknn:hover>.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandBackgroundHover);}\", \".f172bh4s:hover>.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandBackgroundHover);}\", \".f6tipb1:hover>.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandBackgroundHover);}\", \".f1nlwys0:hover>.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandStrokeHover);}\", \".f1bhstg2:hover>.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandStrokeHover);}\", \".f6tsdgz:hover>.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandStrokeHover);}\", \".fqxbw9v:hover>.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandStrokeHover);}\", \".f1r38qqt:hover>.fui-Checkbox__indicator{color:var(--colorCompoundBrandForeground1Hover);}\"],\n a: [\".f1r2dosr:active{color:var(--colorNeutralForeground1);}\", \".f1oarbgq:active>.fui-Checkbox__indicator{border-top-color:var(--colorNeutralStrokeAccessiblePressed);}\", \".fo8gord:active>.fui-Checkbox__indicator{border-right-color:var(--colorNeutralStrokeAccessiblePressed);}\", \".f18ci1af:active>.fui-Checkbox__indicator{border-left-color:var(--colorNeutralStrokeAccessiblePressed);}\", \".fviagcr:active>.fui-Checkbox__indicator{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}\", \".f8adco2:active>.fui-Checkbox__indicator{background-color:var(--colorCompoundBrandBackgroundPressed);}\", \".f1lepnt8:active>.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandBackgroundPressed);}\", \".f80ygm0:active>.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandBackgroundPressed);}\", \".frrkusm:active>.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandBackgroundPressed);}\", \".f1gg953z:active>.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandBackgroundPressed);}\", \".f12q3i2l:active>.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandStrokePressed);}\", \".f9g1hxu:active>.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandStrokePressed);}\", \".f1o4ic5t:active>.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandStrokePressed);}\", \".f1c3thm1:active>.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandStrokePressed);}\", \".ffd07pq:active>.fui-Checkbox__indicator{color:var(--colorCompoundBrandForeground1Pressed);}\"],\n d: [\".f19n0e5{color:var(--colorNeutralForeground1);}\", \".f5opsb9>.fui-Checkbox__indicator{background-color:var(--colorCompoundBrandBackground);}\", \".fpaw01r>.fui-Checkbox__indicator{color:var(--colorNeutralForegroundInverted);}\", \".f1gqj827>.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandBackground);}\", \".fub94a2>.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandBackground);}\", \".f13mj44e>.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandBackground);}\", \".f1qq5vh1>.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandBackground);}\", \".f12fgbth>.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandStroke);}\", \".f171e6fm>.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandStroke);}\", \".fttsnhr>.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandStroke);}\", \".f1fyk1ks>.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandStroke);}\", \".fvvg2h8>.fui-Checkbox__indicator{color:var(--colorCompoundBrandForeground1);}\", \".f158kwzp{cursor:default;}\", \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".fgiuqeu>.fui-Checkbox__indicator{border-top-color:var(--colorNeutralStrokeDisabled);}\", \".f1q4sfkt>.fui-Checkbox__indicator{border-right-color:var(--colorNeutralStrokeDisabled);}\", \".f71co73>.fui-Checkbox__indicator{border-left-color:var(--colorNeutralStrokeDisabled);}\", \".f1u7lsiy>.fui-Checkbox__indicator{border-bottom-color:var(--colorNeutralStrokeDisabled);}\", \".f3vxa14>.fui-Checkbox__indicator{color:var(--colorNeutralForegroundDisabled);}\"],\n m: [[\"@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1lmtjkn>.fui-Checkbox__indicator{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }]]\n});\nconst useInputBaseClassName = /*#__PURE__*/__resetStyles(\"ruo9svu\", null, [\".ruo9svu{box-sizing:border-box;cursor:inherit;height:100%;margin:0;opacity:0;position:absolute;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));}\"]);\nconst useInputStyles = /*#__PURE__*/__styles({\n before: {\n j35jbq: [\"f1e31b4d\", \"f1vgc2s3\"]\n },\n after: {\n oyh7mz: [\"f1vgc2s3\", \"f1e31b4d\"]\n },\n large: {\n a9b677: \"f1mq5jt6\"\n }\n}, {\n d: [\".f1e31b4d{right:0;}\", \".f1vgc2s3{left:0;}\", \".f1mq5jt6{width:calc(20px + 2 * var(--spacingHorizontalS));}\"]\n});\nconst useIndicatorBaseClassName = /*#__PURE__*/__resetStyles(\"rrh91wr\", null, [\".rrh91wr{-webkit-align-self:flex-start;-ms-flex-item-align:flex-start;align-self:flex-start;box-sizing:border-box;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;overflow:hidden;border:var(--strokeWidthThin) solid var(--colorNeutralStrokeAccessible);border-radius:var(--borderRadiusSmall);margin:var(--spacingVerticalS) var(--spacingHorizontalS);fill:currentColor;pointer-events:none;font-size:12px;height:16px;width:16px;}\"]);\nconst useIndicatorStyles = /*#__PURE__*/__styles({\n large: {\n Be2twd7: \"f4ybsrx\",\n Bqenvij: \"fjamq6b\",\n a9b677: \"f64fuq3\"\n },\n circular: {\n Bbmb7ep: [\"f8fbkgy\", \"f1nfllo7\"],\n Beyfa6y: [\"f1nfllo7\", \"f8fbkgy\"],\n B7oj6ja: [\"f1djnp8u\", \"f1s8kh49\"],\n Btl43ni: [\"f1s8kh49\", \"f1djnp8u\"]\n }\n}, {\n d: [\".f4ybsrx{font-size:16px;}\", \".fjamq6b{height:20px;}\", \".f64fuq3{width:20px;}\", \".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}\", \".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}\", \".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}\", \".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}\"]\n});\n// Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.\nconst useLabelStyles = /*#__PURE__*/__styles({\n base: {\n qb2dma: \"f7nlbp4\",\n sj55zd: \"f1ym3bx4\",\n Bceei9c: \"fpo1scq\",\n z8tnut: \"f1kwiid1\",\n z189sj: [\"f1vdfbxk\", \"f1f5gg8d\"],\n Byoj8tv: \"f5b47ha\",\n uwmqm3: [\"f1f5gg8d\", \"f1vdfbxk\"]\n },\n before: {\n z189sj: [\"f7x41pl\", \"fruq291\"]\n },\n after: {\n uwmqm3: [\"fruq291\", \"f7x41pl\"]\n },\n medium: {\n B6of3ja: \"fjzwpt6\",\n jrapky: \"fh6j2fo\"\n },\n large: {\n B6of3ja: \"f1xlvstr\",\n jrapky: \"f49ad5g\"\n }\n}, {\n d: [\".f7nlbp4{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;}\", \".f1ym3bx4{color:inherit;}\", \".fpo1scq{cursor:inherit;}\", \".f1kwiid1{padding-top:var(--spacingVerticalS);}\", \".f1vdfbxk{padding-right:var(--spacingHorizontalS);}\", \".f1f5gg8d{padding-left:var(--spacingHorizontalS);}\", \".f5b47ha{padding-bottom:var(--spacingVerticalS);}\", \".f7x41pl{padding-right:var(--spacingHorizontalXS);}\", \".fruq291{padding-left:var(--spacingHorizontalXS);}\", \".fjzwpt6{margin-top:calc((16px - var(--lineHeightBase300)) / 2);}\", \".fh6j2fo{margin-bottom:calc((16px - var(--lineHeightBase300)) / 2);}\", \".f1xlvstr{margin-top:calc((20px - var(--lineHeightBase300)) / 2);}\", \".f49ad5g{margin-bottom:calc((20px - var(--lineHeightBase300)) / 2);}\"]\n});\n/**\n * Apply styling to the Checkbox slots based on the state\n */\nexport const useCheckboxStyles_unstable = state => {\n const {\n checked,\n disabled,\n labelPosition,\n shape,\n size\n } = state;\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(checkboxClassNames.root, rootBaseClassName, disabled ? rootStyles.disabled : checked === 'mixed' ? rootStyles.mixed : checked ? rootStyles.checked : rootStyles.unchecked, state.root.className);\n const inputBaseClassName = useInputBaseClassName();\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(checkboxClassNames.input, inputBaseClassName, size === 'large' && inputStyles.large, inputStyles[labelPosition], state.input.className);\n const indicatorBaseClassName = useIndicatorBaseClassName();\n const indicatorStyles = useIndicatorStyles();\n if (state.indicator) {\n state.indicator.className = mergeClasses(checkboxClassNames.indicator, indicatorBaseClassName, size === 'large' && indicatorStyles.large, shape === 'circular' && indicatorStyles.circular, state.indicator.className);\n }\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(checkboxClassNames.label, labelStyles.base, labelStyles[size], labelStyles[labelPosition], state.label.className);\n }\n return state;\n};\n//# sourceMappingURL=useCheckboxStyles.styles.js.map"],"names":["checkboxClassNames","useCheckboxStyles_unstable","root","label","input","indicator","indicatorSizeMedium","indicatorSizeLarge","useRootBaseClassName","__resetStyles","useRootStyles","__styles","unchecked","Bi91k9c","ns3gzv","n5iecx","Bq2lx2j","Bv7p3up","lj723h","B6u2zzw","Be5wueo","Cgwcxn","Btnvhkj","checked","sj55zd","Bvs3sgl","opw9sb","C5wppx","B32epof","Bphahg7","Jctw66","Bq0zqd5","Bgesukf","mixed","cc1l3s","km5s60","disabled","Bceei9c","Bbusuzp","B7bxudy","h","a","d","m","useInputBaseClassName","useInputStyles","before","j35jbq","after","oyh7mz","large","a9b677","useIndicatorBaseClassName","useIndicatorStyles","Be2twd7","Bqenvij","circular","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","useLabelStyles","base","qb2dma","z8tnut","z189sj","Byoj8tv","uwmqm3","medium","B6of3ja","jrapky","state","labelPosition","shape","size","rootBaseClassName","rootStyles","className","mergeClasses","inputBaseClassName","inputStyles","indicatorBaseClassName","indicatorStyles","labelStyles"],"mappings":";;;;;;;;;;;IAGaA,kBAAkB,MAAlBA;IA8IAC,0BAA0B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,MAAMrE,IAAI,CAAC2E,SAAS;IACnO,MAAME,qBAAqBnC;IAC3B,MAAMoC,cAAcnC;IACpB0B,MAAMnE,KAAK,CAACyE,SAAS,GAAGC,IAAAA,mBAAY,EAAC9E,mBAAmBI,KAAK,EAAE2E,oBAAoBL,SAAS,WAAWM,YAAY9B,KAAK,EAAE8B,WAAW,CAACR,cAAc,EAAED,MAAMnE,KAAK,CAACyE,SAAS;IAC3K,MAAMI,yBAAyB7B;IAC/B,MAAM8B,kBAAkB7B;IACxB,IAAIkB,MAAMlE,SAAS,EAAE;QACnBkE,MAAMlE,SAAS,CAACwE,SAAS,GAAGC,IAAAA,mBAAY,EAAC9E,mBAAmBK,SAAS,EAAE4E,wBAAwBP,SAAS,WAAWQ,gBAAgBhC,KAAK,EAAEuB,UAAU,cAAcS,gBAAgB1B,QAAQ,EAAEe,MAAMlE,SAAS,CAACwE,SAAS;IACvN,CAAC;IACD,MAAMM,cAActB;IACpB,IAAIU,MAAMpE,KAAK,EAAE;QACfoE,MAAMpE,KAAK,CAAC0E,SAAS,GAAGC,IAAAA,mBAAY,EAAC9E,mBAAmBG,KAAK,EAAEgF,YAAYrB,IAAI,EAAEqB,WAAW,CAACT,KAAK,EAAES,WAAW,CAACX,cAAc,EAAED,MAAMpE,KAAK,CAAC0E,SAAS;IACvJ,CAAC;IACD,OAAON;AACT,GACA,oDAAoD"}
1
+ {"version":3,"sources":["useCheckboxStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nexport const checkboxClassNames = {\n root: 'fui-Checkbox',\n label: 'fui-Checkbox__label',\n input: 'fui-Checkbox__input',\n indicator: 'fui-Checkbox__indicator'\n};\n// The indicator size is used by the indicator and label styles\nconst indicatorSizeMedium = '16px';\nconst indicatorSizeLarge = '20px';\nconst useRootBaseClassName = /*#__PURE__*/__resetStyles(\"r1qaeuiq\", \"rm0k3vm\", [\".r1qaeuiq{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;vertical-align:middle;color:var(--colorNeutralForeground3);}\", \".r1qaeuiq:focus{outline-style:none;}\", \".r1qaeuiq:focus-visible{outline-style:none;}\", \".r1qaeuiq[data-fui-focus-within]:focus-within{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}\", \".r1qaeuiq[data-fui-focus-within]:focus-within::after{content:\\\"\\\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}\", \".rm0k3vm{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;vertical-align:middle;color:var(--colorNeutralForeground3);}\", \".rm0k3vm:focus{outline-style:none;}\", \".rm0k3vm:focus-visible{outline-style:none;}\", \".rm0k3vm[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}\", \".rm0k3vm[data-fui-focus-within]:focus-within::after{content:\\\"\\\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}\"]);\nconst useRootStyles = /*#__PURE__*/__styles({\n unchecked: {\n Bi91k9c: \"f3p8bqa\",\n ns3gzv: \"ffqb913\",\n n5iecx: [\"f42z0vd\", \"f1j37kh1\"],\n Bq2lx2j: \"f10v6cc1\",\n Bv7p3up: [\"f1j37kh1\", \"f42z0vd\"],\n lj723h: \"f1r2dosr\",\n B6u2zzw: \"f1oarbgq\",\n Be5wueo: [\"fo8gord\", \"f18ci1af\"],\n Cgwcxn: \"fviagcr\",\n Btnvhkj: [\"f18ci1af\", \"fo8gord\"]\n },\n checked: {\n sj55zd: \"f19n0e5\",\n Bvs3sgl: \"f5opsb9\",\n opw9sb: \"fpaw01r\",\n C5wppx: \"f1gqj827\",\n B32epof: [\"fub94a2\", \"f13mj44e\"],\n Bphahg7: \"f1qq5vh1\",\n Jctw66: [\"f13mj44e\", \"fub94a2\"],\n Bq0zqd5: \"f5x9vvn\",\n ns3gzv: \"fub8hyy\",\n n5iecx: [\"fffzknn\", \"f172bh4s\"],\n Bq2lx2j: \"f6tipb1\",\n Bv7p3up: [\"f172bh4s\", \"fffzknn\"],\n Bgesukf: \"f8adco2\",\n B6u2zzw: \"f1lepnt8\",\n Be5wueo: [\"f80ygm0\", \"frrkusm\"],\n Cgwcxn: \"f1gg953z\",\n Btnvhkj: [\"frrkusm\", \"f80ygm0\"]\n },\n mixed: {\n sj55zd: \"f19n0e5\",\n C5wppx: \"f12fgbth\",\n B32epof: [\"f171e6fm\", \"fttsnhr\"],\n Bphahg7: \"f1fyk1ks\",\n Jctw66: [\"fttsnhr\", \"f171e6fm\"],\n opw9sb: \"fvvg2h8\",\n ns3gzv: \"f1nlwys0\",\n n5iecx: [\"f1bhstg2\", \"f6tsdgz\"],\n Bq2lx2j: \"fqxbw9v\",\n Bv7p3up: [\"f6tsdgz\", \"f1bhstg2\"],\n cc1l3s: \"f1r38qqt\",\n B6u2zzw: \"f12q3i2l\",\n Be5wueo: [\"f9g1hxu\", \"f1o4ic5t\"],\n Cgwcxn: \"f1c3thm1\",\n Btnvhkj: [\"f1o4ic5t\", \"f9g1hxu\"],\n km5s60: \"ffd07pq\"\n },\n disabled: {\n Bceei9c: \"f158kwzp\",\n sj55zd: \"f1s2aq7o\",\n C5wppx: \"fgiuqeu\",\n B32epof: [\"f1q4sfkt\", \"f71co73\"],\n Bphahg7: \"f1u7lsiy\",\n Jctw66: [\"f71co73\", \"f1q4sfkt\"],\n opw9sb: \"f3vxa14\",\n Bbusuzp: \"f1dcs8yz\",\n B7bxudy: \"f1lmtjkn\"\n }\n}, {\n h: [\".f3p8bqa:hover{color:var(--colorNeutralForeground2);}\", \".ffqb913:hover>.fui-Checkbox__indicator{border-top-color:var(--colorNeutralStrokeAccessibleHover);}\", \".f42z0vd:hover>.fui-Checkbox__indicator{border-right-color:var(--colorNeutralStrokeAccessibleHover);}\", \".f1j37kh1:hover>.fui-Checkbox__indicator{border-left-color:var(--colorNeutralStrokeAccessibleHover);}\", \".f10v6cc1:hover>.fui-Checkbox__indicator{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}\", \".f5x9vvn:hover>.fui-Checkbox__indicator{background-color:var(--colorCompoundBrandBackgroundHover);}\", \".fub8hyy:hover>.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandBackgroundHover);}\", \".fffzknn:hover>.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandBackgroundHover);}\", \".f172bh4s:hover>.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandBackgroundHover);}\", \".f6tipb1:hover>.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandBackgroundHover);}\", \".f1nlwys0:hover>.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandStrokeHover);}\", \".f1bhstg2:hover>.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandStrokeHover);}\", \".f6tsdgz:hover>.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandStrokeHover);}\", \".fqxbw9v:hover>.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandStrokeHover);}\", \".f1r38qqt:hover>.fui-Checkbox__indicator{color:var(--colorCompoundBrandForeground1Hover);}\"],\n a: [\".f1r2dosr:active{color:var(--colorNeutralForeground1);}\", \".f1oarbgq:active>.fui-Checkbox__indicator{border-top-color:var(--colorNeutralStrokeAccessiblePressed);}\", \".fo8gord:active>.fui-Checkbox__indicator{border-right-color:var(--colorNeutralStrokeAccessiblePressed);}\", \".f18ci1af:active>.fui-Checkbox__indicator{border-left-color:var(--colorNeutralStrokeAccessiblePressed);}\", \".fviagcr:active>.fui-Checkbox__indicator{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}\", \".f8adco2:active>.fui-Checkbox__indicator{background-color:var(--colorCompoundBrandBackgroundPressed);}\", \".f1lepnt8:active>.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandBackgroundPressed);}\", \".f80ygm0:active>.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandBackgroundPressed);}\", \".frrkusm:active>.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandBackgroundPressed);}\", \".f1gg953z:active>.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandBackgroundPressed);}\", \".f12q3i2l:active>.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandStrokePressed);}\", \".f9g1hxu:active>.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandStrokePressed);}\", \".f1o4ic5t:active>.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandStrokePressed);}\", \".f1c3thm1:active>.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandStrokePressed);}\", \".ffd07pq:active>.fui-Checkbox__indicator{color:var(--colorCompoundBrandForeground1Pressed);}\"],\n d: [\".f19n0e5{color:var(--colorNeutralForeground1);}\", \".f5opsb9>.fui-Checkbox__indicator{background-color:var(--colorCompoundBrandBackground);}\", \".fpaw01r>.fui-Checkbox__indicator{color:var(--colorNeutralForegroundInverted);}\", \".f1gqj827>.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandBackground);}\", \".fub94a2>.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandBackground);}\", \".f13mj44e>.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandBackground);}\", \".f1qq5vh1>.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandBackground);}\", \".f12fgbth>.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandStroke);}\", \".f171e6fm>.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandStroke);}\", \".fttsnhr>.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandStroke);}\", \".f1fyk1ks>.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandStroke);}\", \".fvvg2h8>.fui-Checkbox__indicator{color:var(--colorCompoundBrandForeground1);}\", \".f158kwzp{cursor:default;}\", \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".fgiuqeu>.fui-Checkbox__indicator{border-top-color:var(--colorNeutralStrokeDisabled);}\", \".f1q4sfkt>.fui-Checkbox__indicator{border-right-color:var(--colorNeutralStrokeDisabled);}\", \".f71co73>.fui-Checkbox__indicator{border-left-color:var(--colorNeutralStrokeDisabled);}\", \".f1u7lsiy>.fui-Checkbox__indicator{border-bottom-color:var(--colorNeutralStrokeDisabled);}\", \".f3vxa14>.fui-Checkbox__indicator{color:var(--colorNeutralForegroundDisabled);}\"],\n m: [[\"@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1lmtjkn>.fui-Checkbox__indicator{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }]]\n});\nconst useInputBaseClassName = /*#__PURE__*/__resetStyles(\"ruo9svu\", null, [\".ruo9svu{box-sizing:border-box;cursor:inherit;height:100%;margin:0;opacity:0;position:absolute;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));}\"]);\nconst useInputStyles = /*#__PURE__*/__styles({\n before: {\n j35jbq: [\"f1e31b4d\", \"f1vgc2s3\"]\n },\n after: {\n oyh7mz: [\"f1vgc2s3\", \"f1e31b4d\"]\n },\n large: {\n a9b677: \"f1mq5jt6\"\n }\n}, {\n d: [\".f1e31b4d{right:0;}\", \".f1vgc2s3{left:0;}\", \".f1mq5jt6{width:calc(20px + 2 * var(--spacingHorizontalS));}\"]\n});\nconst useIndicatorBaseClassName = /*#__PURE__*/__resetStyles(\"rrh91wr\", null, [\".rrh91wr{-webkit-align-self:flex-start;-ms-flex-item-align:flex-start;align-self:flex-start;box-sizing:border-box;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;overflow:hidden;border:var(--strokeWidthThin) solid var(--colorNeutralStrokeAccessible);border-radius:var(--borderRadiusSmall);margin:var(--spacingVerticalS) var(--spacingHorizontalS);fill:currentColor;pointer-events:none;font-size:12px;height:16px;width:16px;}\"]);\nconst useIndicatorStyles = /*#__PURE__*/__styles({\n large: {\n Be2twd7: \"f4ybsrx\",\n Bqenvij: \"fjamq6b\",\n a9b677: \"f64fuq3\"\n },\n circular: {\n Bbmb7ep: [\"f8fbkgy\", \"f1nfllo7\"],\n Beyfa6y: [\"f1nfllo7\", \"f8fbkgy\"],\n B7oj6ja: [\"f1djnp8u\", \"f1s8kh49\"],\n Btl43ni: [\"f1s8kh49\", \"f1djnp8u\"]\n }\n}, {\n d: [\".f4ybsrx{font-size:16px;}\", \".fjamq6b{height:20px;}\", \".f64fuq3{width:20px;}\", \".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}\", \".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}\", \".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}\", \".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}\"]\n});\n// Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.\nconst useLabelStyles = /*#__PURE__*/__styles({\n base: {\n qb2dma: \"f7nlbp4\",\n sj55zd: \"f1ym3bx4\",\n Bceei9c: \"fpo1scq\",\n z8tnut: \"f1kwiid1\",\n z189sj: [\"f1vdfbxk\", \"f1f5gg8d\"],\n Byoj8tv: \"f5b47ha\",\n uwmqm3: [\"f1f5gg8d\", \"f1vdfbxk\"]\n },\n before: {\n z189sj: [\"f7x41pl\", \"fruq291\"]\n },\n after: {\n uwmqm3: [\"fruq291\", \"f7x41pl\"]\n },\n medium: {\n B6of3ja: \"fjzwpt6\",\n jrapky: \"fh6j2fo\"\n },\n large: {\n B6of3ja: \"f1xlvstr\",\n jrapky: \"f49ad5g\"\n }\n}, {\n d: [\".f7nlbp4{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;}\", \".f1ym3bx4{color:inherit;}\", \".fpo1scq{cursor:inherit;}\", \".f1kwiid1{padding-top:var(--spacingVerticalS);}\", \".f1vdfbxk{padding-right:var(--spacingHorizontalS);}\", \".f1f5gg8d{padding-left:var(--spacingHorizontalS);}\", \".f5b47ha{padding-bottom:var(--spacingVerticalS);}\", \".f7x41pl{padding-right:var(--spacingHorizontalXS);}\", \".fruq291{padding-left:var(--spacingHorizontalXS);}\", \".fjzwpt6{margin-top:calc((16px - var(--lineHeightBase300)) / 2);}\", \".fh6j2fo{margin-bottom:calc((16px - var(--lineHeightBase300)) / 2);}\", \".f1xlvstr{margin-top:calc((20px - var(--lineHeightBase300)) / 2);}\", \".f49ad5g{margin-bottom:calc((20px - var(--lineHeightBase300)) / 2);}\"]\n});\n/**\n * Apply styling to the Checkbox slots based on the state\n */\nexport const useCheckboxStyles_unstable = state => {\n const {\n checked,\n disabled,\n labelPosition,\n shape,\n size\n } = state;\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(checkboxClassNames.root, rootBaseClassName, disabled ? rootStyles.disabled : checked === 'mixed' ? rootStyles.mixed : checked ? rootStyles.checked : rootStyles.unchecked, state.root.className);\n const inputBaseClassName = useInputBaseClassName();\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(checkboxClassNames.input, inputBaseClassName, size === 'large' && inputStyles.large, inputStyles[labelPosition], state.input.className);\n const indicatorBaseClassName = useIndicatorBaseClassName();\n const indicatorStyles = useIndicatorStyles();\n if (state.indicator) {\n state.indicator.className = mergeClasses(checkboxClassNames.indicator, indicatorBaseClassName, size === 'large' && indicatorStyles.large, shape === 'circular' && indicatorStyles.circular, state.indicator.className);\n }\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(checkboxClassNames.label, labelStyles.base, labelStyles[size], labelStyles[labelPosition], state.label.className);\n }\n return state;\n};\n//# sourceMappingURL=useCheckboxStyles.styles.js.map"],"names":["checkboxClassNames","useCheckboxStyles_unstable","root","label","input","indicator","indicatorSizeMedium","indicatorSizeLarge","useRootBaseClassName","__resetStyles","useRootStyles","__styles","unchecked","Bi91k9c","ns3gzv","n5iecx","Bq2lx2j","Bv7p3up","lj723h","B6u2zzw","Be5wueo","Cgwcxn","Btnvhkj","checked","sj55zd","Bvs3sgl","opw9sb","C5wppx","B32epof","Bphahg7","Jctw66","Bq0zqd5","Bgesukf","mixed","cc1l3s","km5s60","disabled","Bceei9c","Bbusuzp","B7bxudy","h","a","d","m","useInputBaseClassName","useInputStyles","before","j35jbq","after","oyh7mz","large","a9b677","useIndicatorBaseClassName","useIndicatorStyles","Be2twd7","Bqenvij","circular","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","useLabelStyles","base","qb2dma","z8tnut","z189sj","Byoj8tv","uwmqm3","medium","B6of3ja","jrapky","state","labelPosition","shape","size","rootBaseClassName","rootStyles","className","mergeClasses","inputBaseClassName","inputStyles","indicatorBaseClassName","indicatorStyles","labelStyles"],"mappings":";;;;;;;;;;;IAGaA,kBAAkB,MAAlBA;IA8IAC,0BAA0B,MAA1BA;;uBAjJqD;AAG3D,MAAMD,qBAAqB;IAChCE,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,WAAW;AACb;AACA,+DAA+D;AAC/D,MAAMC,sBAAsB;AAC5B,MAAMC,qBAAqB;AAC3B,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,uBAAa,EAAC,YAAY,WAAW;IAAC;IAAiN;IAAwC;IAAgD;IAA6K;IAA+vB;IAAgN;IAAuC;IAA+C;IAA4K;CAA6vB;AACp/E,MAAMC,gBAAgB,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IAC1CC,WAAW;QACTC,SAAS;QACTC,QAAQ;QACRC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAU;QAChCC,QAAQ;QACRC,SAAS;QACTC,SAAS;YAAC;YAAW;SAAW;QAChCC,QAAQ;QACRC,SAAS;YAAC;YAAY;SAAU;IAClC;IACAC,SAAS;QACPC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,SAAS;YAAC;YAAW;SAAW;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,SAAS;QACTjB,QAAQ;QACRC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAU;QAChCe,SAAS;QACTb,SAAS;QACTC,SAAS;YAAC;YAAW;SAAU;QAC/BC,QAAQ;QACRC,SAAS;YAAC;YAAW;SAAU;IACjC;IACAW,OAAO;QACLT,QAAQ;QACRG,QAAQ;QACRC,SAAS;YAAC;YAAY;SAAU;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAW;QAC/BJ,QAAQ;QACRZ,QAAQ;QACRC,QAAQ;YA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AAEyE,mBAAmBvC,WAAWwC,WAAWxC,QAAQ,GAAGb,YAAY,UAAUqD,WAAW3C,KAAK,GAAGV,UAAUqD,WAAWrD,OAAO,GAAGqD,WAAWhE,SAAS,EAAE2D,MAAMrE,IAAI,CAAC2E,SAAS;IACnO,MAAME,qBAAqBnC;IAC3B,MAAMoC,cAAcnC;IACpB0B,MAAMnE,KAAK,CAACyE,SAAS,GAAGC,IAAAA,mBAAY,EAAC9E,mBAAmBI,KAAK,EAAE2E,oBAAoBL,SAAS,WAAWM,YAAY9B,KAAK,EAAE8B,WAAW,CAACR,cAAc,EAAED,MAAMnE,KAAK,CAACyE,SAAS;IAC3K,MAAMI,yBAAyB7B;IAC/B,MAAM8B,kBAAkB7B;IACxB,IAAIkB,MAAMlE,SAAS,EAAE;QACnBkE,MAAMlE,SAAS,CAACwE,SAAS,GAAGC,IAAAA,mBAAY,EAAC9E,mBAAmBK,SAAS,EAAE4E,wBAAwBP,SAAS,WAAWQ,gBAAgBhC,KAAK,EAAEuB,UAAU,cAAcS,gBAAgB1B,QAAQ,EAAEe,MAAMlE,SAAS,CAACwE,SAAS;IACvN,CAAC;IACD,MAAMM,cAActB;IACpB,IAAIU,MAAMpE,KAAK,EAAE;QACfoE,MAAMpE,KAAK,CAAC0E,SAAS,GAAGC,IAAAA,mBAAY,EAAC9E,mBAAmBG,KAAK,EAAEgF,YAAYrB,IAAI,EAAEqB,WAAW,CAACT,KAAK,EAAES,WAAW,CAACX,cAAc,EAAED,MAAMpE,KAAK,CAAC0E,SAAS;IACvJ,CAAC;IACD,OAAON;AACT,GACA,oDAAoD"}
@@ -16,6 +16,3 @@ _export(exports, {
16
16
  useCheckbox_unstable: ()=>_checkbox.useCheckbox_unstable
17
17
  });
18
18
  const _checkbox = require("./Checkbox");
19
- //# sourceMappingURL=index.js.map
20
-
21
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { Checkbox, checkboxClassNames, renderCheckbox_unstable, useCheckboxStyles_unstable, useCheckbox_unstable } from './Checkbox';\n//# sourceMappingURL=index.js.map"],"names":["Checkbox","checkboxClassNames","renderCheckbox_unstable","useCheckboxStyles_unstable","useCheckbox_unstable"],"mappings":";;;;;;;;;;;IAASA,QAAQ,MAARA,kBAAQ;IAAEC,kBAAkB,MAAlBA,4BAAkB;IAAEC,uBAAuB,MAAvBA,iCAAuB;IAAEC,0BAA0B,MAA1BA,oCAA0B;IAAEC,oBAAoB,MAApBA,8BAAoB;;0BAAQ;CACxH,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export { Checkbox, checkboxClassNames, renderCheckbox_unstable, useCheckboxStyles_unstable, useCheckbox_unstable } from './Checkbox';\n"],"names":["Checkbox","checkboxClassNames","renderCheckbox_unstable","useCheckboxStyles_unstable","useCheckbox_unstable"],"mappings":";;;;;;;;;;;IAASA,QAAQ,MAARA,kBAAQ;IAAEC,kBAAkB,MAAlBA,4BAAkB;IAAEC,uBAAuB,MAAvBA,iCAAuB;IAAEC,0BAA0B,MAA1BA,oCAA0B;IAAEC,oBAAoB,MAApBA,8BAAoB;;0BAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-checkbox",
3
- "version": "9.1.15",
3
+ "version": "9.1.17",
4
4
  "description": "Fluent UI checkbox component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -28,20 +28,20 @@
28
28
  "devDependencies": {
29
29
  "@fluentui/eslint-plugin": "*",
30
30
  "@fluentui/react-conformance": "*",
31
- "@fluentui/react-conformance-griffel": "9.0.0-beta.21",
31
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.22",
32
32
  "@fluentui/scripts-api-extractor": "*",
33
33
  "@fluentui/scripts-tasks": "*"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/react-field": "^9.1.4",
36
+ "@fluentui/react-field": "^9.1.6",
37
37
  "@fluentui/react-icons": "^2.0.196",
38
- "@fluentui/react-jsx-runtime": "9.0.0-alpha.4",
39
- "@fluentui/react-label": "^9.1.13",
38
+ "@fluentui/react-jsx-runtime": "9.0.0-alpha.6",
39
+ "@fluentui/react-label": "^9.1.15",
40
40
  "@fluentui/react-shared-contexts": "^9.5.0",
41
- "@fluentui/react-tabster": "^9.7.3",
41
+ "@fluentui/react-tabster": "^9.7.5",
42
42
  "@fluentui/react-theme": "^9.1.8",
43
- "@fluentui/react-utilities": "^9.9.0",
44
- "@griffel/react": "^1.5.2",
43
+ "@fluentui/react-utilities": "^9.9.2",
44
+ "@griffel/react": "^1.5.7",
45
45
  "@swc/helpers": "^0.4.14"
46
46
  },
47
47
  "peerDependencies": {