@fluentui/react-checkbox 9.0.0-beta.8 → 9.0.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,52 @@
2
2
  "name": "@fluentui/react-checkbox",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 18 Feb 2022 13:33:45 GMT",
5
+ "date": "Tue, 01 Mar 2022 02:16:09 GMT",
6
+ "tag": "@fluentui/react-checkbox_v9.0.0-beta.9",
7
+ "version": "9.0.0-beta.9",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "olfedias@microsoft.com",
12
+ "package": "@fluentui/react-checkbox",
13
+ "commit": "084d7408855f3e52b67cbca172da1acef9dcb98f",
14
+ "comment": "fix: Add react-theme as dependency"
15
+ },
16
+ {
17
+ "author": "behowell@microsoft.com",
18
+ "package": "@fluentui/react-checkbox",
19
+ "commit": "17618b2b24ce013569c74a505b2212eba18caf54",
20
+ "comment": "Refactor Checkbox styles to use CSS pseudo-classes"
21
+ },
22
+ {
23
+ "author": "behowell@microsoft.com",
24
+ "package": "@fluentui/react-checkbox",
25
+ "commit": "2170ed575f77bc6852cfe5a2fe4974c7f9a64a9e",
26
+ "comment": "Rename `circular` prop to `shape`"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-checkbox",
31
+ "comment": "Bump @fluentui/react-label to v9.0.0-beta.8",
32
+ "commit": "0bc1e755543ed69443d5d03e1976c630583242f7"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-checkbox",
37
+ "comment": "Bump @fluentui/react-tabster to v9.0.0-rc.4",
38
+ "commit": "0bc1e755543ed69443d5d03e1976c630583242f7"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-checkbox",
43
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.4",
44
+ "commit": "0bc1e755543ed69443d5d03e1976c630583242f7"
45
+ }
46
+ ]
47
+ }
48
+ },
49
+ {
50
+ "date": "Fri, 18 Feb 2022 13:35:30 GMT",
6
51
  "tag": "@fluentui/react-checkbox_v9.0.0-beta.8",
7
52
  "version": "9.0.0-beta.8",
8
53
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,26 @@
1
1
  # Change Log - @fluentui/react-checkbox
2
2
 
3
- This log was last generated on Fri, 18 Feb 2022 13:33:45 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 01 Mar 2022 02:16:09 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-beta.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-checkbox_v9.0.0-beta.9)
8
+
9
+ Tue, 01 Mar 2022 02:16:09 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-checkbox_v9.0.0-beta.8..@fluentui/react-checkbox_v9.0.0-beta.9)
11
+
12
+ ### Changes
13
+
14
+ - fix: Add react-theme as dependency ([PR #21825](https://github.com/microsoft/fluentui/pull/21825) by olfedias@microsoft.com)
15
+ - Refactor Checkbox styles to use CSS pseudo-classes ([PR #21837](https://github.com/microsoft/fluentui/pull/21837) by behowell@microsoft.com)
16
+ - Rename `circular` prop to `shape` ([PR #21834](https://github.com/microsoft/fluentui/pull/21834) by behowell@microsoft.com)
17
+ - Bump @fluentui/react-label to v9.0.0-beta.8 ([PR #21884](https://github.com/microsoft/fluentui/pull/21884) by beachball)
18
+ - Bump @fluentui/react-tabster to v9.0.0-rc.4 ([PR #21884](https://github.com/microsoft/fluentui/pull/21884) by beachball)
19
+ - Bump @fluentui/react-utilities to v9.0.0-rc.4 ([PR #21884](https://github.com/microsoft/fluentui/pull/21884) by beachball)
20
+
7
21
  ## [9.0.0-beta.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-checkbox_v9.0.0-beta.8)
8
22
 
9
- Fri, 18 Feb 2022 13:33:45 GMT
23
+ Fri, 18 Feb 2022 13:35:30 GMT
10
24
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-checkbox_v9.0.0-beta.6..@fluentui/react-checkbox_v9.0.0-beta.8)
11
25
 
12
26
  ### Changes
@@ -15,24 +15,29 @@ export declare const checkboxClassName = "fui-Checkbox";
15
15
 
16
16
  declare interface CheckboxCommons {
17
17
  /**
18
- * Whether to render the checkbox in a circular shape instead of square.
19
- * This variant is only recommended to be used in a tasks-style UI (checklist),
18
+ * The shape of the checkbox indicator.
19
+ *
20
+ * The `circular` variant is only recommended to be used in a tasks-style UI (checklist),
20
21
  * since it otherwise could be confused for a `RadioItem`.
21
- * @defaultvalue false
22
+ *
23
+ * @defaultvalue square
22
24
  */
23
- circular: boolean;
25
+ shape: 'square' | 'circular';
24
26
  /**
25
- * A checkbox's state can be controlled.
27
+ * The controlled value for the checkbox.
28
+ *
26
29
  * @defaultvalue false
27
30
  */
28
31
  checked: 'mixed' | boolean;
29
32
  /**
30
- * Checkbox supports two different checkbox sizes.
33
+ * The size of the checkbox indicator.
34
+ *
31
35
  * @defaultvalue medium
32
36
  */
33
37
  size: 'medium' | 'large';
34
38
  /**
35
- * Determines whether the label should be positioned before or after the checkbox.
39
+ * The position of the label relative to the checkbox indicator.
40
+ *
36
41
  * @defaultvalue after
37
42
  */
38
43
  labelPosition: 'before' | 'after';
@@ -83,7 +88,7 @@ export declare type CheckboxSlots = {
83
88
  */
84
89
  input: NonNullable<Slot<'input'>>;
85
90
  /**
86
- * Renders the checkbox, with the checkmark icon as its child when checked.
91
+ * The checkbox, with the checkmark icon as its child when checked.
87
92
  */
88
93
  indicator: Slot<'div'>;
89
94
  };
@@ -3,24 +3,29 @@ import { Label } from '@fluentui/react-label';
3
3
  import { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
4
4
  interface CheckboxCommons {
5
5
  /**
6
- * Whether to render the checkbox in a circular shape instead of square.
7
- * This variant is only recommended to be used in a tasks-style UI (checklist),
6
+ * The shape of the checkbox indicator.
7
+ *
8
+ * The `circular` variant is only recommended to be used in a tasks-style UI (checklist),
8
9
  * since it otherwise could be confused for a `RadioItem`.
9
- * @defaultvalue false
10
+ *
11
+ * @defaultvalue square
10
12
  */
11
- circular: boolean;
13
+ shape: 'square' | 'circular';
12
14
  /**
13
- * A checkbox's state can be controlled.
15
+ * The controlled value for the checkbox.
16
+ *
14
17
  * @defaultvalue false
15
18
  */
16
19
  checked: 'mixed' | boolean;
17
20
  /**
18
- * Checkbox supports two different checkbox sizes.
21
+ * The size of the checkbox indicator.
22
+ *
19
23
  * @defaultvalue medium
20
24
  */
21
25
  size: 'medium' | 'large';
22
26
  /**
23
- * Determines whether the label should be positioned before or after the checkbox.
27
+ * The position of the label relative to the checkbox indicator.
28
+ *
24
29
  * @defaultvalue after
25
30
  */
26
31
  labelPosition: 'before' | 'after';
@@ -51,7 +56,7 @@ export declare type CheckboxSlots = {
51
56
  */
52
57
  input: NonNullable<Slot<'input'>>;
53
58
  /**
54
- * Renders the checkbox, with the checkmark icon as its child when checked.
59
+ * The checkbox, with the checkmark icon as its child when checked.
55
60
  */
56
61
  indicator: Slot<'div'>;
57
62
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.types.js","sourceRoot":"../src/","sources":["components/Checkbox/Checkbox.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { Label } from '@fluentui/react-label';\nimport { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\ninterface CheckboxCommons {\n /**\n * Whether to render the checkbox in a circular shape instead of square.\n * This variant is only recommended to be used in a tasks-style UI (checklist),\n * since it otherwise could be confused for a `RadioItem`.\n * @defaultvalue false\n */\n circular: boolean;\n\n /**\n * A checkbox's state can be controlled.\n * @defaultvalue false\n */\n checked: 'mixed' | boolean;\n\n /**\n * Checkbox supports two different checkbox sizes.\n * @defaultvalue medium\n */\n size: 'medium' | 'large';\n\n /**\n * Determines whether the label should be positioned before or after the checkbox.\n * @defaultvalue after\n */\n labelPosition: 'before' | 'after';\n}\n\n/**\n * Data for the onChange event for checkbox.\n */\nexport interface CheckboxOnChangeData {\n checked: 'mixed' | boolean;\n}\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 * Renders 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 'size' | 'checked' | 'defaultChecked' | 'onChange'\n> &\n Partial<CheckboxCommons> & {\n /**\n * Checkboxes don't support children. To add a label, use the `label` prop.\n */\n children?: never;\n\n /**\n * Callback to be called when the checked state value changes.\n */\n onChange?: (ev: React.FormEvent<HTMLInputElement>, data: CheckboxOnChangeData) => void;\n\n /**\n * Whether the checkbox should be rendered as checked by default.\n */\n defaultChecked?: 'mixed' | boolean;\n };\n\n/**\n * State used in rendering Checkbox\n */\nexport type CheckboxState = ComponentState<CheckboxSlots> & CheckboxCommons;\n"]}
1
+ {"version":3,"file":"Checkbox.types.js","sourceRoot":"../src/","sources":["components/Checkbox/Checkbox.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { Label } from '@fluentui/react-label';\nimport { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\ninterface CheckboxCommons {\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 * @defaultvalue square\n */\n shape: 'square' | 'circular';\n\n /**\n * The controlled value for the checkbox.\n *\n * @defaultvalue false\n */\n checked: 'mixed' | boolean;\n\n /**\n * The size of the checkbox indicator.\n *\n * @defaultvalue medium\n */\n size: 'medium' | 'large';\n\n /**\n * The position of the label relative to the checkbox indicator.\n *\n * @defaultvalue after\n */\n labelPosition: 'before' | 'after';\n}\n\n/**\n * Data for the onChange event for checkbox.\n */\nexport interface CheckboxOnChangeData {\n checked: 'mixed' | boolean;\n}\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 'size' | 'checked' | 'defaultChecked' | 'onChange'\n> &\n Partial<CheckboxCommons> & {\n /**\n * Checkboxes don't support children. To add a label, use the `label` prop.\n */\n children?: never;\n\n /**\n * Callback to be called when the checked state value changes.\n */\n onChange?: (ev: React.FormEvent<HTMLInputElement>, data: CheckboxOnChangeData) => void;\n\n /**\n * Whether the checkbox should be rendered as checked by default.\n */\n defaultChecked?: 'mixed' | boolean;\n };\n\n/**\n * State used in rendering Checkbox\n */\nexport type CheckboxState = ComponentState<CheckboxSlots> & CheckboxCommons;\n"]}
@@ -6,9 +6,9 @@ export const renderCheckbox_unstable = state => {
6
6
  slotProps
7
7
  } = getSlots(state);
8
8
  return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
9
- }, state.labelPosition === 'before' && slots.label && /*#__PURE__*/React.createElement(slots.label, { ...slotProps.label
9
+ }, /*#__PURE__*/React.createElement(slots.input, { ...slotProps.input
10
+ }), state.labelPosition === 'before' && slots.label && /*#__PURE__*/React.createElement(slots.label, { ...slotProps.label
10
11
  }), /*#__PURE__*/React.createElement(slots.indicator, { ...slotProps.indicator
11
- }), /*#__PURE__*/React.createElement(slots.input, { ...slotProps.input
12
12
  }), state.labelPosition === 'after' && slots.label && /*#__PURE__*/React.createElement(slots.label, { ...slotProps.label
13
13
  }));
14
14
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Checkbox/renderCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA,OAAO,MAAM,uBAAuB,GAAI,KAAD,IAAyB;AAC9D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAgB,KAAhB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,KAAK,CAAC,aAAN,KAAwB,QAAxB,IAAoC,KAAK,CAAC,KAA1C,iBAAmD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CADtD,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAhB,CAFF,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CAHF,EAIG,KAAK,CAAC,aAAN,KAAwB,OAAxB,IAAmC,KAAK,CAAC,KAAzC,iBAAkD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CAJrD,CADF;AAQD,CAXM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { CheckboxState, CheckboxSlots } from './Checkbox.types';\n\nexport const renderCheckbox_unstable = (state: CheckboxState) => {\n const { slots, slotProps } = getSlots<CheckboxSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.labelPosition === 'before' && slots.label && <slots.label {...slotProps.label} />}\n <slots.indicator {...slotProps.indicator} />\n <slots.input {...slotProps.input} />\n {state.labelPosition === 'after' && slots.label && <slots.label {...slotProps.label} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Checkbox/renderCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA,OAAO,MAAM,uBAAuB,GAAI,KAAD,IAAyB;AAC9D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAgB,KAAhB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CADF,EAEG,KAAK,CAAC,aAAN,KAAwB,QAAxB,IAAoC,KAAK,CAAC,KAA1C,iBAAmD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CAFtD,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAhB,CAHF,EAIG,KAAK,CAAC,aAAN,KAAwB,OAAxB,IAAmC,KAAK,CAAC,KAAzC,iBAAkD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CAJrD,CADF;AAQD,CAXM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { CheckboxState, CheckboxSlots } from './Checkbox.types';\n\nexport const renderCheckbox_unstable = (state: CheckboxState) => {\n const { slots, slotProps } = getSlots<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"],"sourceRoot":"../src/"}
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { getPartitionedNativeProps, resolveShorthand, useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect, useMergedRefs } from '@fluentui/react-utilities';
3
- import { Checkmark12Filled, Checkmark16Filled, Square12Filled, Square16Filled, Circle12Filled, Circle16Filled } from '@fluentui/react-icons';
3
+ import { Checkmark12Filled, Checkmark16Filled, Square12Filled, Square16Filled, CircleFilled } from '@fluentui/react-icons';
4
4
  import { Label } from '@fluentui/react-label';
5
5
  /**
6
6
  * Create the state required to render Checkbox.
@@ -16,7 +16,7 @@ export const useCheckbox_unstable = (props, ref) => {
16
16
  const {
17
17
  disabled,
18
18
  required,
19
- circular = false,
19
+ shape = 'square',
20
20
  size = 'medium',
21
21
  labelPosition = 'after',
22
22
  onChange
@@ -36,8 +36,8 @@ export const useCheckbox_unstable = (props, ref) => {
36
36
  let checkmarkIcon;
37
37
 
38
38
  if (mixed) {
39
- if (circular) {
40
- checkmarkIcon = size === 'large' ? /*#__PURE__*/React.createElement(Circle16Filled, null) : /*#__PURE__*/React.createElement(Circle12Filled, null);
39
+ if (shape === 'circular') {
40
+ checkmarkIcon = /*#__PURE__*/React.createElement(CircleFilled, null);
41
41
  } else {
42
42
  checkmarkIcon = size === 'large' ? /*#__PURE__*/React.createElement(Square16Filled, null) : /*#__PURE__*/React.createElement(Square12Filled, null);
43
43
  }
@@ -46,7 +46,7 @@ export const useCheckbox_unstable = (props, ref) => {
46
46
  }
47
47
 
48
48
  const state = {
49
- circular,
49
+ shape,
50
50
  checked,
51
51
  size,
52
52
  labelPosition,
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Checkbox/useCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SACE,yBADF,EAEE,gBAFF,EAGE,oBAHF,EAIE,gBAJF,EAKE,KALF,EAME,yBANF,EAOE,aAPF,QAQO,2BARP;AAUA,SACE,iBADF,EAEE,iBAFF,EAGE,cAHF,EAIE,cAJF,EAKE,cALF,EAME,cANF,QAOO,uBAPP;AAQA,SAAS,KAAT,QAAsB,uBAAtB;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,oBAAoB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAA0E;AAC5G,QAAM;AAAE,IAAA,QAAF;AAAY,IAAA,QAAZ;AAAsB,IAAA,QAAQ,GAAG,KAAjC;AAAwC,IAAA,IAAI,GAAG,QAA/C;AAAyD,IAAA,aAAa,GAAG,OAAzE;AAAkF,IAAA;AAAlF,MAA+F,KAArG;AAEA,QAAM,CAAC,OAAD,EAAU,UAAV,IAAwB,oBAAoB,CAAC;AACjD,IAAA,YAAY,EAAE,KAAK,CAAC,cAD6B;AAEjD,IAAA,KAAK,EAAE,KAAK,CAAC,OAFoC;AAGjD,IAAA,YAAY,EAAE;AAHmC,GAAD,CAAlD;AAMA,QAAM,WAAW,GAAG,yBAAyB,CAAC;AAC5C,IAAA,KAD4C;AAE5C,IAAA,kBAAkB,EAAE,OAFwB;AAG5C,IAAA,iBAAiB,EAAE,CAAC,SAAD,EAAY,gBAAZ,EAA8B,MAA9B,EAAsC,UAAtC;AAHyB,GAAD,CAA7C;AAMA,QAAM,KAAK,GAAG,OAAO,KAAK,OAA1B;AACA,QAAM,EAAE,GAAG,KAAK,CAAC,WAAD,EAAc,WAAW,CAAC,OAAZ,C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ACF,GAJwB,EAItB,CAAC,QAAD,EAAW,KAAX,CAJsB,CAAzB;AAMA,SAAO,KAAP;AACD,CA5FM","sourcesContent":["import * as React from 'react';\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 Circle12Filled,\n Circle16Filled,\n} from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\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 const { disabled, required, circular = false, 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 (circular) {\n checkmarkIcon = size === 'large' ? <Circle16Filled /> : <Circle12Filled />;\n } else {\n checkmarkIcon = size === 'large' ? <Square16Filled /> : <Square12Filled />;\n }\n } else {\n checkmarkIcon = size === 'large' ? <Checkmark16Filled /> : <Checkmark12Filled />;\n }\n\n const state: CheckboxState = {\n circular,\n checked,\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: nativeProps.root,\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"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Checkbox/useCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SACE,yBADF,EAEE,gBAFF,EAGE,oBAHF,EAIE,gBAJF,EAKE,KALF,EAME,yBANF,EAOE,aAPF,QAQO,2BARP;AAUA,SACE,iBADF,EAEE,iBAFF,EAGE,cAHF,EAIE,cAJF,EAKE,YALF,QAMO,uBANP;AAOA,SAAS,KAAT,QAAsB,uBAAtB;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,oBAAoB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAA0E;AAC5G,QAAM;AAAE,IAAA,QAAF;AAAY,IAAA,QAAZ;AAAsB,IAAA,KAAK,GAAG,QAA9B;AAAwC,IAAA,IAAI,GAAG,QAA/C;AAAyD,IAAA,aAAa,GAAG,OAAzE;AAAkF,I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,KAAA,CAAR,GAAA,QAAQ,CAAG,EAAH,EAAO;AAAE,MAAA,OAAO,EAAE;AAAX,KAAP,CAAR;AACA,IAAA,UAAU,CAAC,GAAD,CAAV;AACD,GAJsC,CAAvC,CAxE4G,CA8E5G;AACA;;AACA,QAAM,QAAQ,GAAG,aAAa,CAAC,KAAK,CAAC,KAAN,CAAY,GAAb,CAA9B;AACA,EAAA,KAAK,CAAC,KAAN,CAAY,GAAZ,GAAkB,QAAlB,CAjF4G,CAmF5G;AACA;;AACA,EAAA,yBAAyB,CAAC,MAAK;AAC7B,QAAI,QAAQ,CAAC,OAAb,EAAsB;AACpB,MAAA,QAAQ,CAAC,OAAT,CAAiB,aAAjB,GAAiC,KAAjC;AACD;AACF,GAJwB,EAItB,CAAC,QAAD,EAAW,KAAX,CAJsB,CAAzB;AAMA,SAAO,KAAP;AACD,CA5FM","sourcesContent":["import * as React from 'react';\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';\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 const { disabled, 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 {\n checkmarkIcon = size === 'large' ? <Checkmark16Filled /> : <Checkmark12Filled />;\n }\n\n const state: CheckboxState = {\n shape,\n checked,\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: nativeProps.root,\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"],"sourceRoot":"../src/"}
@@ -2,33 +2,24 @@ import { shorthands, __styles, mergeClasses } from '@griffel/react';
2
2
  import { createFocusOutlineStyle } from '@fluentui/react-tabster';
3
3
  import { tokens } from '@fluentui/react-theme';
4
4
  export const checkboxClassName = 'fui-Checkbox';
5
- const indicatorClassName = 'fui-Checkbox-indicator'; // TODO replace these spacing constants with theme values once they're on the theme
5
+ const indicatorClassName = 'fui-Checkbox__indicator';
6
+ const labelClassName = 'fui-Checkbox__label'; // TODO replace these spacing constants with theme values once they're on the theme
6
7
 
7
8
  const spacingHorizontalS = '8px';
8
9
  const spacingHorizontalM = '12px'; // The indicator size is used by the indicator and label styles
9
10
 
10
11
  const indicatorSizeMedium = '16px';
11
12
  const indicatorSizeLarge = '20px';
12
- /**
13
- * Styles for the root slot
14
- */
15
13
 
16
14
  const useRootStyles = /*#__PURE__*/__styles({
17
15
  "base": {
18
16
  "qhf8xq": "f10pi13n",
19
17
  "mc9l5x": "ftuwxu6",
20
- "Beiy3e4": "f1063pyq",
21
- "Bceei9c": "f1k6fduh",
22
18
  "i8kkvl": "f4akndk",
23
19
  "z8tnut": "fp9bwmr",
24
20
  "z189sj": ["f19lj068", "f177v4lu"],
25
21
  "Byoj8tv": "f150uoa4",
26
- "uwmqm3": ["f177v4lu", "f19lj068"]
27
- },
28
- "disabled": {
29
- "Bceei9c": "f158kwzp"
30
- },
31
- "focusIndicator": {
22
+ "uwmqm3": ["f177v4lu", "f19lj068"],
32
23
  "B486eqv": "f2hkw1w",
33
24
  "c2y4jd": "fsofd9k",
34
25
  "B8vm7ur": "f12sql3b",
@@ -44,74 +35,10 @@ const useRootStyles = /*#__PURE__*/__styles({
44
35
  "Jxg1p8": "f8rjbh6",
45
36
  "Bc94xmo": ["fxfgh6q", "f8l10fm"],
46
37
  "Bj23z95": ["f8l10fm", "fxfgh6q"]
47
- },
48
- "uncheckedColors": {
49
- "sj55zd": "f11d4kpn",
50
- "B2uuno9": "fwkyayc",
51
- "qasus0": ["f7aqmyg", "ft2adke"],
52
- "joesme": "f1w1qo1y",
53
- "qcmoe7": ["ft2adke", "f7aqmyg"],
54
- "Bi91k9c": "f3p8bqa",
55
- "vpay66": "fft1thc",
56
- "fgdpeo": ["f1w8do5y", "fepve6s"],
57
- "ooapsn": "fdf0l0r",
58
- "ev9ftv": ["fepve6s", "f1w8do5y"],
59
- "Bfw6nra": "fesph6q",
60
- "Brbcl2": "f1mhtrce",
61
- "E16u1b": ["f17v52hn", "fg62ii9"],
62
- "c4amgi": "f1r1cpih",
63
- "Bepp5ky": ["fg62ii9", "f17v52hn"]
64
- },
65
- "checkedColors": {
66
- "sj55zd": "f19n0e5",
67
- "mrtg77": "f1nckptt",
68
- "bxuuxi": "f19uhq4u",
69
- "B2uuno9": "ffzu9nk",
70
- "qasus0": ["f1g19ujf", "fvb8adx"],
71
- "joesme": "f1emw82k",
72
- "qcmoe7": ["fvb8adx", "f1g19ujf"],
73
- "Bqcm5gq": "fc90h92",
74
- "vpay66": "f1gd0goh",
75
- "fgdpeo": ["f926psx", "f1pjby8k"],
76
- "ooapsn": "f1b2jcp4",
77
- "ev9ftv": ["f1pjby8k", "f926psx"],
78
- "Bn43wis": "f8zpi21",
79
- "Brbcl2": "f1irvqu2",
80
- "E16u1b": ["f5uvb4g", "f1vydb2"],
81
- "c4amgi": "fgkonep",
82
- "Bepp5ky": ["f1vydb2", "f5uvb4g"]
83
- },
84
- "mixedColors": {
85
- "sj55zd": "f19n0e5",
86
- "B2uuno9": "fkebysb",
87
- "qasus0": ["f1k0bg1", "f4oydaf"],
88
- "joesme": "fi1mkuk",
89
- "qcmoe7": ["f4oydaf", "f1k0bg1"],
90
- "bxuuxi": "f1n04o3z",
91
- "vpay66": "fdfakjf",
92
- "fgdpeo": ["fvqbddr", "f1babrrv"],
93
- "ooapsn": "f1jbek0d",
94
- "ev9ftv": ["f1babrrv", "fvqbddr"],
95
- "Iwvt79": "f1mps0ds",
96
- "Brbcl2": "f1tallx",
97
- "E16u1b": ["f9cmnyc", "f1skyj24"],
98
- "c4amgi": "f12y7q7q",
99
- "Bepp5ky": ["f1skyj24", "f9cmnyc"],
100
- "Ewzbd8": "f135b915"
101
- },
102
- "disabledColors": {
103
- "sj55zd": "f1s2aq7o",
104
- "B2uuno9": "f1bezmwk",
105
- "qasus0": ["fb9vlya", "f1ubioqa"],
106
- "joesme": "fu4x4v",
107
- "qcmoe7": ["f1ubioqa", "fb9vlya"],
108
- "bxuuxi": "fpjy2vv"
109
38
  }
110
39
  }, {
111
- "d": [".f10pi13n{position:relative;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".f1k6fduh{cursor:pointer;}", ".f4akndk{-webkit-column-gap:12px;column-gap:12px;}", ".fp9bwmr{padding-top:8px;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f150uoa4{padding-bottom:8px;}", ".f158kwzp{cursor:default;}", "[data-keyboard-nav] .fsofd9k:focus-within{border-color:transparent;}", "[data-keyboard-nav] .f12sql3b:focus-within:after{content:\"\";}", "[data-keyboard-nav] .f1i4q40k:focus-within:after{position:absolute;}", "[data-keyboard-nav] .fcrbge9:focus-within:after{pointer-events:none;}", "[data-keyboard-nav] .ft464mn:focus-within:after{box-sizing:outline-box;}", "[data-keyboard-nav] .fskqmiq:focus-within:after{z-index:1;}", "[data-keyboard-nav] .f2gy8jn:focus-within:after{border-style:solid;}", "[data-keyboard-nav] .f1pke3uf:focus-within:after{border-width:2px;}", "[data-keyboard-nav] .f18xdlq9:focus-within:after{border-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f1114nks:focus-within:after{border-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1unftzx:focus-within:after{top:-2px;}", "[data-keyboard-nav] .f8rjbh6:focus-within:after{bottom:-2px;}", "[data-keyboard-nav] .fxfgh6q:focus-within:after{left:-2px;}", "[data-keyboard-nav] .f8l10fm:focus-within:after{right:-2px;}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".fwkyayc .fui-Checkbox-indicator{border-top-color:var(--colorNeutralStrokeAccessible);}", ".f7aqmyg .fui-Checkbox-indicator{border-right-color:var(--colorNeutralStrokeAccessible);}", ".ft2adke .fui-Checkbox-indicator{border-left-color:var(--colorNeutralStrokeAccessible);}", ".f1w1qo1y .fui-Checkbox-indicator{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f1nckptt .fui-Checkbox-indicator{background-color:var(--colorCompoundBrandBackground);}", ".f19uhq4u .fui-Checkbox-indicator{color:var(--colorNeutralForegroundOnBrand);}", ".ffzu9nk .fui-Checkbox-indicator{border-top-color:var(--colorCompoundBrandBackground);}", ".f1g19ujf .fui-Checkbox-indicator{border-right-color:var(--colorCompoundBrandBackground);}", ".fvb8adx .fui-Checkbox-indicator{border-left-color:var(--colorCompoundBrandBackground);}", ".f1emw82k .fui-Checkbox-indicator{border-bottom-color:var(--colorCompoundBrandBackground);}", ".fkebysb .fui-Checkbox-indicator{border-top-color:var(--colorCompoundBrandStroke);}", ".f1k0bg1 .fui-Checkbox-indicator{border-right-color:var(--colorCompoundBrandStroke);}", ".f4oydaf .fui-Checkbox-indicator{border-left-color:var(--colorCompoundBrandStroke);}", ".fi1mkuk .fui-Checkbox-indicator{border-bottom-color:var(--colorCompoundBrandStroke);}", ".f1n04o3z .fui-Checkbox-indicator{color:var(--colorCompoundBrandForeground1);}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".f1bezmwk .fui-Checkbox-indicator{border-top-color:var(--colorNeutralStrokeDisabled);}", ".fb9vlya .fui-Checkbox-indicator{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f1ubioqa .fui-Checkbox-indicator{border-left-color:var(--colorNeutralStrokeDisabled);}", ".fu4x4v .fui-Checkbox-indicator{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".fpjy2vv .fui-Checkbox-indicator{color:var(--colorNeutralForegroundDisabled);}"],
112
- "i": [".f2hkw1w:focus-visible{outline-style:none;}"],
113
- "h": [".f3p8bqa:hover{color:var(--colorNeutralForeground2);}", ".fft1thc:hover .fui-Checkbox-indicator{border-top-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1w8do5y:hover .fui-Checkbox-indicator{border-right-color:var(--colorNeutralStrokeAccessibleHover);}", ".fepve6s:hover .fui-Checkbox-indicator{border-left-color:var(--colorNeutralStrokeAccessibleHover);}", ".fdf0l0r:hover .fui-Checkbox-indicator{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".fc90h92:hover .fui-Checkbox-indicator{background-color:var(--colorCompoundBrandBackgroundHover);}", ".f1gd0goh:hover .fui-Checkbox-indicator{border-top-color:var(--colorCompoundBrandBackgroundHover);}", ".f926psx:hover .fui-Checkbox-indicator{border-right-color:var(--colorCompoundBrandBackgroundHover);}", ".f1pjby8k:hover .fui-Checkbox-indicator{border-left-color:var(--colorCompoundBrandBackgroundHover);}", ".f1b2jcp4:hover .fui-Checkbox-indicator{border-bottom-color:var(--colorCompoundBrandBackgroundHover);}", ".fdfakjf:hover .fui-Checkbox-indicator{border-top-color:var(--colorCompoundBrandStrokeHover);}", ".fvqbddr:hover .fui-Checkbox-indicator{border-right-color:var(--colorCompoundBrandStrokeHover);}", ".f1babrrv:hover .fui-Checkbox-indicator{border-left-color:var(--colorCompoundBrandStrokeHover);}", ".f1jbek0d:hover .fui-Checkbox-indicator{border-bottom-color:var(--colorCompoundBrandStrokeHover);}", ".f1mps0ds:hover .fui-Checkbox-indicator{color:var(--colorCompoundBrandForeground1Hover);}"],
114
- "a": [".fesph6q:active:hover{color:var(--colorNeutralForeground1);}", ".f1mhtrce:active:hover .fui-Checkbox-indicator{border-top-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f17v52hn:active:hover .fui-Checkbox-indicator{border-right-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fg62ii9:active:hover .fui-Checkbox-indicator{border-left-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1r1cpih:active:hover .fui-Checkbox-indicator{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f8zpi21:active:hover .fui-Checkbox-indicator{background-color:var(--colorCompoundBrandBackgroundPressed);}", ".f1irvqu2:active:hover .fui-Checkbox-indicator{border-top-color:var(--colorCompoundBrandBackgroundPressed);}", ".f5uvb4g:active:hover .fui-Checkbox-indicator{border-right-color:var(--colorCompoundBrandBackgroundPressed);}", ".f1vydb2:active:hover .fui-Checkbox-indicator{border-left-color:var(--colorCompoundBrandBackgroundPressed);}", ".fgkonep:active:hover .fui-Checkbox-indicator{border-bottom-color:var(--colorCompoundBrandBackgroundPressed);}", ".f1tallx:active:hover .fui-Checkbox-indicator{border-top-color:var(--colorCompoundBrandStrokePressed);}", ".f9cmnyc:active:hover .fui-Checkbox-indicator{border-right-color:var(--colorCompoundBrandStrokePressed);}", ".f1skyj24:active:hover .fui-Checkbox-indicator{border-left-color:var(--colorCompoundBrandStrokePressed);}", ".f12y7q7q:active:hover .fui-Checkbox-indicator{border-bottom-color:var(--colorCompoundBrandStrokePressed);}", ".f135b915:active:hover .fui-Checkbox-indicator{color:var(--colorCompoundBrandForeground1Pressed);}"]
40
+ "d": [".f10pi13n{position:relative;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f4akndk{-webkit-column-gap:12px;column-gap:12px;}", ".fp9bwmr{padding-top:8px;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f150uoa4{padding-bottom:8px;}", "[data-keyboard-nav] .fsofd9k:focus-within{border-color:transparent;}", "[data-keyboard-nav] .f12sql3b:focus-within:after{content:\"\";}", "[data-keyboard-nav] .f1i4q40k:focus-within:after{position:absolute;}", "[data-keyboard-nav] .fcrbge9:focus-within:after{pointer-events:none;}", "[data-keyboard-nav] .ft464mn:focus-within:after{box-sizing:outline-box;}", "[data-keyboard-nav] .fskqmiq:focus-within:after{z-index:1;}", "[data-keyboard-nav] .f2gy8jn:focus-within:after{border-style:solid;}", "[data-keyboard-nav] .f1pke3uf:focus-within:after{border-width:2px;}", "[data-keyboard-nav] .f18xdlq9:focus-within:after{border-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f1114nks:focus-within:after{border-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1unftzx:focus-within:after{top:-2px;}", "[data-keyboard-nav] .f8rjbh6:focus-within:after{bottom:-2px;}", "[data-keyboard-nav] .fxfgh6q:focus-within:after{left:-2px;}", "[data-keyboard-nav] .f8l10fm:focus-within:after{right:-2px;}"],
41
+ "i": [".f2hkw1w:focus-visible{outline-style:none;}"]
115
42
  });
116
43
 
117
44
  const useInputStyles = /*#__PURE__*/__styles({
@@ -127,10 +54,66 @@ const useInputStyles = /*#__PURE__*/__styles({
127
54
  "jrapky": "f19f4twv",
128
55
  "Frg6f3": ["f1tyq0we", "f11qmguv"],
129
56
  "abs64n": "fk73vx1",
130
- "Bceei9c": "fpo1scq"
57
+ "Bceei9c": "f1k6fduh",
58
+ "B26k0as": "f1yrrd5t",
59
+ "k0xvi9": "fvfr0er",
60
+ "Bqb28oy": "fcwiijr",
61
+ "Fszymg": ["f11s8ldy", "f37mzfx"],
62
+ "s5xoki": "forfpyi",
63
+ "cfw8t2": ["f37mzfx", "f11s8ldy"],
64
+ "b9fajx": "f1vd61pd",
65
+ "pff03s": "f1mzgjal",
66
+ "Bk0s23q": ["f1iwu0i3", "f6umev3"],
67
+ "Bfc5gcl": "femu9zt",
68
+ "a4vgqw": ["f6umev3", "f1iwu0i3"],
69
+ "Fum7gy": "f1s8s9qo",
70
+ "B5tev9i": "fuvx3by",
71
+ "ecjak0": ["fuqx993", "f1akce7s"],
72
+ "B006ete": "feccz1o",
73
+ "Bxlzfhf": ["f1akce7s", "fuqx993"],
74
+ "qzqrip": "fqgvcms",
75
+ "xmoia3": "f1wvbx6q",
76
+ "i1phtq": "fcsc0bc",
77
+ "Bi8r3f5": "fkf9h0q",
78
+ "yvncz7": ["faeo8p5", "f4rpdul"],
79
+ "D2mvea": "fsk3itm",
80
+ "Bjmkmyo": ["f4rpdul", "faeo8p5"],
81
+ "B525uqd": "f4wqdms",
82
+ "B5z3g6i": "ftufdon",
83
+ "Bwnzx1a": ["f1ni78ii", "f1pe82pw"],
84
+ "w3j1jp": "fxl8eb7",
85
+ "n2zbqb": ["f1pe82pw", "f1ni78ii"],
86
+ "Bek439x": "f12pgwe7",
87
+ "Bgt4g9q": "f1c5u0pt",
88
+ "Bkzkukt": ["fyfn4nz", "f1aaeu2t"],
89
+ "wg1kw8": "ffzx9q8",
90
+ "Bh7u92y": ["f1aaeu2t", "fyfn4nz"],
91
+ "B40413r": "f1rm0htn",
92
+ "B9f5amx": "fpb7n6l",
93
+ "gbnyp0": ["f1uwkm0d", "fakdbj6"],
94
+ "ilwfws": "f180qsza",
95
+ "Fk4w3x": ["fakdbj6", "f1uwkm0d"],
96
+ "tfmijd": "f3nyagc",
97
+ "Bketd8w": "f1eh922j",
98
+ "s1clob": ["f1f3l6lh", "faa1us6"],
99
+ "B8s8lrk": "f1g6jlfz",
100
+ "Bp3qae9": ["faa1us6", "f1f3l6lh"],
101
+ "c4h28b": "f1d2ycii",
102
+ "Bvff7ki": "f18ruat1",
103
+ "B0usqpl": ["f18b6ltw", "fd6ao2z"],
104
+ "ckdfsi": "fdz9k82",
105
+ "B2hfjzz": ["fd6ao2z", "f18b6ltw"],
106
+ "B0rx68v": "f8c3d4w",
107
+ "ezr58z": "fvxnmui",
108
+ "Bdfu378": "f1ceq7vh",
109
+ "fvfg5q": "f4ohyq5",
110
+ "Bbnnodr": ["f1kakd2g", "f3ulah5"],
111
+ "B7y28oj": "f5fda5m",
112
+ "Dpxclb": ["f3ulah5", "f1kakd2g"],
113
+ "E1kcat": "f1c3drxw"
131
114
  }
132
115
  }, {
133
- "d": [".f1euv43f{position:absolute;}", ".f1vgc2s3{left:0;}", ".f1e31b4d{right:0;}", ".f15twtuk{top:0;}", ".fly5x3f{width:100%;}", ".f1l02sjl{height:100%;}", ".f1ewtqcl{box-sizing:border-box;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".fk73vx1{opacity:0;}", ".fpo1scq{cursor:inherit;}"]
116
+ "d": [".f1euv43f{position:absolute;}", ".f1vgc2s3{left:0;}", ".f1e31b4d{right:0;}", ".f15twtuk{top:0;}", ".fly5x3f{width:100%;}", ".f1l02sjl{height:100%;}", ".f1ewtqcl{box-sizing:border-box;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".fk73vx1{opacity:0;}", ".f1k6fduh{cursor:pointer;}", ".f1yrrd5t:not(:checked):not(:indeterminate)~.fui-Checkbox__indicator>*{opacity:0;}", ".fvfr0er:enabled:not(:checked):not(:indeterminate)~.fui-Checkbox__label{color:var(--colorNeutralForeground3);}", ".fcwiijr:enabled:not(:checked):not(:indeterminate)~.fui-Checkbox__indicator{border-top-color:var(--colorNeutralStrokeAccessible);}", ".f11s8ldy:enabled:not(:checked):not(:indeterminate)~.fui-Checkbox__indicator{border-right-color:var(--colorNeutralStrokeAccessible);}", ".f37mzfx:enabled:not(:checked):not(:indeterminate)~.fui-Checkbox__indicator{border-left-color:var(--colorNeutralStrokeAccessible);}", ".forfpyi:enabled:not(:checked):not(:indeterminate)~.fui-Checkbox__indicator{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".f1vd61pd:enabled:not(:checked):not(:indeterminate):hover~.fui-Checkbox__label{color:var(--colorNeutralForeground2);}", ".f1mzgjal:enabled:not(:checked):not(:indeterminate):hover~.fui-Checkbox__indicator{border-top-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1iwu0i3:enabled:not(:checked):not(:indeterminate):hover~.fui-Checkbox__indicator{border-right-color:var(--colorNeutralStrokeAccessibleHover);}", ".f6umev3:enabled:not(:checked):not(:indeterminate):hover~.fui-Checkbox__indicator{border-left-color:var(--colorNeutralStrokeAccessibleHover);}", ".femu9zt:enabled:not(:checked):not(:indeterminate):hover~.fui-Checkbox__indicator{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1s8s9qo:enabled:not(:checked):not(:indeterminate):active:hover~.fui-Checkbox__label{color:var(--colorNeutralForeground1);}", ".fuvx3by:enabled:not(:checked):not(:indeterminate):active:hover~.fui-Checkbox__indicator{border-top-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fuqx993:enabled:not(:checked):not(:indeterminate):active:hover~.fui-Checkbox__indicator{border-right-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1akce7s:enabled:not(:checked):not(:indeterminate):active:hover~.fui-Checkbox__indicator{border-left-color:var(--colorNeutralStrokeAccessiblePressed);}", ".feccz1o:enabled:not(:checked):not(:indeterminate):active:hover~.fui-Checkbox__indicator{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fqgvcms:enabled:checked:not(:indeterminate)~.fui-Checkbox__label{color:var(--colorNeutralForeground1);}", ".f1wvbx6q:enabled:checked:not(:indeterminate)~.fui-Checkbox__indicator{background-color:var(--colorCompoundBrandBackground);}", ".fcsc0bc:enabled:checked:not(:indeterminate)~.fui-Checkbox__indicator{color:var(--colorNeutralForegroundOnBrand);}", ".fkf9h0q:enabled:checked:not(:indeterminate)~.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandBackground);}", ".faeo8p5:enabled:checked:not(:indeterminate)~.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandBackground);}", ".f4rpdul:enabled:checked:not(:indeterminate)~.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandBackground);}", ".fsk3itm:enabled:checked:not(:indeterminate)~.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandBackground);}", ".f4wqdms:enabled:checked:not(:indeterminate):hover~.fui-Checkbox__indicator{background-color:var(--colorCompoundBrandBackgroundHover);}", ".ftufdon:enabled:checked:not(:indeterminate):hover~.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandBackgroundHover);}", ".f1ni78ii:enabled:checked:not(:indeterminate):hover~.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandBackgroundHover);}", ".f1pe82pw:enabled:checked:not(:indeterminate):hover~.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandBackgroundHover);}", ".fxl8eb7:enabled:checked:not(:indeterminate):hover~.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandBackgroundHover);}", ".f12pgwe7:enabled:checked:not(:indeterminate):active:hover~.fui-Checkbox__indicator{background-color:var(--colorCompoundBrandBackgroundPressed);}", ".f1c5u0pt:enabled:checked:not(:indeterminate):active:hover~.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandBackgroundPressed);}", ".fyfn4nz:enabled:checked:not(:indeterminate):active:hover~.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandBackgroundPressed);}", ".f1aaeu2t:enabled:checked:not(:indeterminate):active:hover~.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandBackgroundPressed);}", ".ffzx9q8:enabled:checked:not(:indeterminate):active:hover~.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandBackgroundPressed);}", ".f1rm0htn:enabled:indeterminate~.fui-Checkbox__label{color:var(--colorNeutralForeground1);}", ".fpb7n6l:enabled:indeterminate~.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandStroke);}", ".f1uwkm0d:enabled:indeterminate~.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandStroke);}", ".fakdbj6:enabled:indeterminate~.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandStroke);}", ".f180qsza:enabled:indeterminate~.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandStroke);}", ".f3nyagc:enabled:indeterminate~.fui-Checkbox__indicator{color:var(--colorCompoundBrandForeground1);}", ".f1eh922j:enabled:indeterminate:hover~.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandStrokeHover);}", ".f1f3l6lh:enabled:indeterminate:hover~.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandStrokeHover);}", ".faa1us6:enabled:indeterminate:hover~.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandStrokeHover);}", ".f1g6jlfz:enabled:indeterminate:hover~.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandStrokeHover);}", ".f1d2ycii:enabled:indeterminate:hover~.fui-Checkbox__indicator{color:var(--colorCompoundBrandForeground1Hover);}", ".f18ruat1:enabled:indeterminate:active:hover~.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandStrokePressed);}", ".f18b6ltw:enabled:indeterminate:active:hover~.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandStrokePressed);}", ".fd6ao2z:enabled:indeterminate:active:hover~.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandStrokePressed);}", ".fdz9k82:enabled:indeterminate:active:hover~.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandStrokePressed);}", ".f8c3d4w:enabled:indeterminate:active:hover~.fui-Checkbox__indicator{color:var(--colorCompoundBrandForeground1Pressed);}", ".fvxnmui:disabled{cursor:default;}", ".f1ceq7vh:disabled~.fui-Checkbox__label{color:var(--colorNeutralForegroundDisabled);}", ".f4ohyq5:disabled~.fui-Checkbox__indicator{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f1kakd2g:disabled~.fui-Checkbox__indicator{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f3ulah5:disabled~.fui-Checkbox__indicator{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f5fda5m:disabled~.fui-Checkbox__indicator{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".f1c3drxw:disabled~.fui-Checkbox__indicator{color:var(--colorNeutralForegroundDisabled);}"]
134
117
  });
135
118
 
136
119
  const useIndicatorStyles = /*#__PURE__*/__styles({
@@ -156,27 +139,26 @@ const useIndicatorStyles = /*#__PURE__*/__styles({
156
139
  "B7oj6ja": ["f1rstyi9", "f1s4nn1u"],
157
140
  "Btl43ni": ["f1s4nn1u", "f1rstyi9"],
158
141
  "Bkfmm31": "f1w9h62z",
159
- "Bceei9c": "fpo1scq"
142
+ "Bkecrkj": "f1aehjj5"
160
143
  },
161
144
  "medium": {
162
145
  "a9b677": "fjw5fx7",
163
- "Bqenvij": "fd461yt"
146
+ "Bqenvij": "fd461yt",
147
+ "Be2twd7": "f1ugzwwg"
164
148
  },
165
149
  "large": {
166
150
  "a9b677": "f64fuq3",
167
- "Bqenvij": "fjamq6b"
151
+ "Bqenvij": "fjamq6b",
152
+ "Be2twd7": "f4ybsrx"
168
153
  },
169
154
  "circular": {
170
155
  "Bbmb7ep": ["f8fbkgy", "f1nfllo7"],
171
156
  "Beyfa6y": ["f1nfllo7", "f8fbkgy"],
172
157
  "B7oj6ja": ["f1djnp8u", "f1s8kh49"],
173
158
  "Btl43ni": ["f1s8kh49", "f1djnp8u"]
174
- },
175
- "unchecked": {
176
- "Bm7m4lb": "f1byn578"
177
159
  }
178
160
  }, {
179
- "d": [".fjgzulp{-webkit-align-self:flex-start;-ms-flex-item-align:flex-start;align-self:flex-start;}", ".f1ewtqcl{box-sizing:border-box;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f1g3puop{border-bottom-right-radius:var(--borderRadiusSmall);}", ".fi2rrw2{border-bottom-left-radius:var(--borderRadiusSmall);}", ".f1rstyi9{border-top-right-radius:var(--borderRadiusSmall);}", ".f1s4nn1u{border-top-left-radius:var(--borderRadiusSmall);}", ".f1w9h62z{fill:currentColor;}", ".fpo1scq{cursor:inherit;}", ".fjw5fx7{width:16px;}", ".fd461yt{height:16px;}", ".f64fuq3{width:20px;}", ".fjamq6b{height: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);}", ".f1byn578>*{opacity:0;}"]
161
+ "d": [".fjgzulp{-webkit-align-self:flex-start;-ms-flex-item-align:flex-start;align-self:flex-start;}", ".f1ewtqcl{box-sizing:border-box;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f1g3puop{border-bottom-right-radius:var(--borderRadiusSmall);}", ".fi2rrw2{border-bottom-left-radius:var(--borderRadiusSmall);}", ".f1rstyi9{border-top-right-radius:var(--borderRadiusSmall);}", ".f1s4nn1u{border-top-left-radius:var(--borderRadiusSmall);}", ".f1w9h62z{fill:currentColor;}", ".f1aehjj5{pointer-events:none;}", ".fjw5fx7{width:16px;}", ".fd461yt{height:16px;}", ".f1ugzwwg{font-size:12px;}", ".f64fuq3{width:20px;}", ".fjamq6b{height:20px;}", ".f4ybsrx{font-size:16px;}", ".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);}"]
180
162
  });
181
163
 
182
164
  const useLabelStyles = /*#__PURE__*/__styles({
@@ -208,20 +190,19 @@ const useLabelStyles = /*#__PURE__*/__styles({
208
190
 
209
191
  export const useCheckboxStyles_unstable = state => {
210
192
  const rootStyles = useRootStyles();
211
- state.root.className = mergeClasses(checkboxClassName, rootStyles.base, rootStyles.focusIndicator, state.input.disabled && rootStyles.disabled, // Pick exactly one of the color classes, based on `disabled` and `checked`
212
- state.input.disabled ? rootStyles.disabledColors : state.checked === 'mixed' ? rootStyles.mixedColors : state.checked ? rootStyles.checkedColors : rootStyles.uncheckedColors, state.root.className);
193
+ state.root.className = mergeClasses(checkboxClassName, rootStyles.base, state.root.className);
213
194
  const inputStyles = useInputStyles();
214
195
  state.input.className = mergeClasses(inputStyles.base, state.input.className);
215
196
  const indicatorStyles = useIndicatorStyles();
216
197
 
217
198
  if (state.indicator) {
218
- state.indicator.className = mergeClasses(indicatorClassName, indicatorStyles.base, indicatorStyles[state.size], state.circular && indicatorStyles.circular, !state.checked && indicatorStyles.unchecked, state.indicator.className);
199
+ state.indicator.className = mergeClasses(indicatorClassName, indicatorStyles.base, indicatorStyles[state.size], state.shape === 'circular' && indicatorStyles.circular, state.indicator.className);
219
200
  }
220
201
 
221
202
  const labelStyles = useLabelStyles();
222
203
 
223
204
  if (state.label) {
224
- state.label.className = mergeClasses(labelStyles.base, labelStyles[state.size], state.label.className);
205
+ state.label.className = mergeClasses(labelClassName, labelStyles.base, labelStyles[state.size], state.label.className);
225
206
  }
226
207
 
227
208
  return state;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Checkbox/useCheckboxStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,YAAiC,YAAjC,QAAqD,gBAArD;AACA,SAAS,uBAAT,QAAwC,yBAAxC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,iBAAiB,GAAG,cAA1B;AACP,MAAM,kBAAkB,GAAG,wBAA3B,C,CAEA;;AACA,MAAM,kBAAkB,GAAG,KAA3B;AACA,MAAM,kBAAkB,GAAG,MAA3B,C,CAEA;;AACA,MAAM,mBAAmB,GAAG,MAA5B;AACA,MAAM,kBAAkB,GAAG,MAA3B;AAEA;;AAEG;;AACH,MAAM,aAAa,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAtB;;AA4FA,MAAM,cAAc,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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I,KAAK,CAAC,SAAV,EAAqB;AACnB,IAAA,KAAK,CAAC,SAAN,CAAgB,SAAhB,GAA4B,YAAY,CACtC,kBADsC,EAEtC,eAAe,CAAC,IAFsB,EAGtC,eAAe,CAAC,KAAK,CAAC,IAAP,CAHuB,EAItC,KAAK,CAAC,QAAN,IAAkB,eAAe,CAAC,QAJI,EAKtC,CAAC,KAAK,CAAC,OAAP,IAAkB,eAAe,CAAC,SALI,EAMtC,KAAK,CAAC,SAAN,CAAgB,SANsB,CAAxC;AAQD;;AAED,QAAM,WAAW,GAAG,cAAc,EAAlC;;AACA,MAAI,KAAK,CAAC,KAAV,EAAiB;AACf,IAAA,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,YAAY,CAAC,WAAW,CAAC,IAAb,EAAmB,WAAW,CAAC,KAAK,CAAC,IAAP,CAA9B,EAA4C,KAAK,CAAC,KAAN,CAAY,SAAxD,CAApC;AACD;;AAED,SAAO,KAAP;AACD,CAvCM","sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { CheckboxState } from './Checkbox.types';\n\nexport const checkboxClassName = 'fui-Checkbox';\nconst indicatorClassName = 'fui-Checkbox-indicator';\n\n// TODO replace these spacing constants with theme values once they're on the theme\nconst spacingHorizontalS = '8px';\nconst spacingHorizontalM = '12px';\n\n// The indicator size is used by the indicator and label styles\nconst indicatorSizeMedium = '16px';\nconst indicatorSizeLarge = '20px';\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n base: {\n position: 'relative',\n display: 'inline-flex',\n flexDirection: 'row',\n cursor: 'pointer',\n columnGap: spacingHorizontalM,\n ...shorthands.padding(spacingHorizontalS),\n },\n\n disabled: {\n cursor: 'default',\n },\n\n focusIndicator: createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n\n // These `__Colors` styles are mutually exclusive: exactly one should be applied at any time\n uncheckedColors: {\n color: tokens.colorNeutralForeground3,\n [`& .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessible),\n },\n\n ':hover': {\n color: tokens.colorNeutralForeground2,\n [`& .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessibleHover),\n },\n },\n\n ':active:hover': {\n color: tokens.colorNeutralForeground1,\n [`& .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessiblePressed),\n },\n },\n },\n\n checkedColors: {\n color: tokens.colorNeutralForeground1,\n [`& .${indicatorClassName}`]: {\n backgroundColor: tokens.colorCompoundBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackground),\n },\n\n ':hover': {\n [`& .${indicatorClassName}`]: {\n backgroundColor: tokens.colorCompoundBrandBackgroundHover,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackgroundHover),\n },\n },\n\n ':active:hover': {\n [`& .${indicatorClassName}`]: {\n backgroundColor: tokens.colorCompoundBrandBackgroundPressed,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackgroundPressed),\n },\n },\n },\n\n mixedColors: {\n color: tokens.colorNeutralForeground1,\n [`& .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStroke),\n color: tokens.colorCompoundBrandForeground1,\n },\n\n ':hover': {\n [`& .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokeHover),\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n },\n\n ':active:hover': {\n [`& .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokePressed),\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n },\n },\n\n disabledColors: {\n color: tokens.colorNeutralForegroundDisabled,\n [`& .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\nconst useInputStyles = makeStyles({\n base: {\n position: 'absolute',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n boxSizing: 'border-box',\n ...shorthands.margin(0),\n opacity: 0,\n cursor: 'inherit',\n },\n});\n\nconst useIndicatorStyles = makeStyles({\n base: {\n alignSelf: 'flex-start',\n boxSizing: 'border-box',\n flexShrink: 0,\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n ...shorthands.overflow('hidden'),\n\n ...shorthands.border(tokens.strokeWidthThin, 'solid'),\n ...shorthands.borderRadius(tokens.borderRadiusSmall),\n fill: 'currentColor',\n cursor: 'inherit',\n },\n\n medium: {\n width: indicatorSizeMedium,\n height: indicatorSizeMedium,\n },\n\n large: {\n width: indicatorSizeLarge,\n height: indicatorSizeLarge,\n },\n\n circular: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n\n unchecked: {\n '& > *': {\n opacity: '0',\n },\n },\n});\n\nconst useLabelStyles = makeStyles({\n base: {\n alignSelf: 'center',\n userSelect: 'none',\n cursor: 'inherit',\n color: 'inherit',\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 ...shorthands.margin(`calc((${indicatorSizeMedium} - ${tokens.lineHeightBase300}) / 2)`, 0),\n },\n large: {\n ...shorthands.margin(`calc((${indicatorSizeLarge} - ${tokens.lineHeightBase300}) / 2)`, 0),\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 rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n checkboxClassName,\n rootStyles.base,\n rootStyles.focusIndicator,\n state.input.disabled && rootStyles.disabled,\n // Pick exactly one of the color classes, based on `disabled` and `checked`\n state.input.disabled\n ? rootStyles.disabledColors\n : state.checked === 'mixed'\n ? rootStyles.mixedColors\n : state.checked\n ? rootStyles.checkedColors\n : rootStyles.uncheckedColors,\n state.root.className,\n );\n\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(inputStyles.base, state.input.className);\n\n const indicatorStyles = useIndicatorStyles();\n if (state.indicator) {\n state.indicator.className = mergeClasses(\n indicatorClassName,\n indicatorStyles.base,\n indicatorStyles[state.size],\n state.circular && indicatorStyles.circular,\n !state.checked && indicatorStyles.unchecked,\n state.indicator.className,\n );\n }\n\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(labelStyles.base, labelStyles[state.size], state.label.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Checkbox/useCheckboxStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,YAAiC,YAAjC,QAAqD,gBAArD;AACA,SAAS,uBAAT,QAAwC,yBAAxC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,iBAAiB,GAAG,cAA1B;AACP,MAAM,kBAAkB,GAAG,yBAA3B;AACA,MAAM,cAAc,GAAG,qBAAvB,C,CAEA;;AACA,MAAM,kBAAkB,GAAG,KAA3B;AACA,MAAM,kBAAkB,GAAG,MAA3B,C,CAEA;;AACA,MAAM,mBAAmB,GAAG,MAA5B;AACA,MAAM,kBAAkB,GAAG,MAA3B;;AAEA,MAAM,aAAa,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAtB;;AAUA,MAAM,cAAc,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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EtC,eAAe,CAAC,IAFsB,EAGtC,eAAe,CAAC,KAAK,CAAC,IAAP,CAHuB,EAItC,KAAK,CAAC,KAAN,KAAgB,UAAhB,IAA8B,eAAe,CAAC,QAJR,EAKtC,KAAK,CAAC,SAAN,CAAgB,SALsB,CAAxC;AAOD;;AAED,QAAM,WAAW,GAAG,cAAc,EAAlC;;AACA,MAAI,KAAK,CAAC,KAAV,EAAiB;AACf,IAAA,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,YAAY,CAClC,cADkC,EAElC,WAAW,CAAC,IAFsB,EAGlC,WAAW,CAAC,KAAK,CAAC,IAAP,CAHuB,EAIlC,KAAK,CAAC,KAAN,CAAY,SAJsB,CAApC;AAMD;;AAED,SAAO,KAAP;AACD,CA7BM","sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { CheckboxState } from './Checkbox.types';\n\nexport const checkboxClassName = 'fui-Checkbox';\nconst indicatorClassName = 'fui-Checkbox__indicator';\nconst labelClassName = 'fui-Checkbox__label';\n\n// TODO replace these spacing constants with theme values once they're on the theme\nconst spacingHorizontalS = '8px';\nconst spacingHorizontalM = '12px';\n\n// The indicator size is used by the indicator and label styles\nconst indicatorSizeMedium = '16px';\nconst indicatorSizeLarge = '20px';\n\nconst useRootStyles = makeStyles({\n base: {\n position: 'relative',\n display: 'inline-flex',\n columnGap: spacingHorizontalM,\n ...shorthands.padding(spacingHorizontalS),\n ...createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n },\n});\n\nconst useInputStyles = makeStyles({\n base: {\n position: 'absolute',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n boxSizing: 'border-box',\n ...shorthands.margin(0),\n opacity: 0,\n cursor: 'pointer',\n\n // When unchecked, hide the the checkmark icon (child of the indicator slot)\n [`:not(:checked):not(:indeterminate) ~ .${indicatorClassName} > *`]: {\n opacity: 0,\n },\n\n // Colors for the unchecked state\n ':enabled:not(:checked):not(:indeterminate)': {\n [`& ~ .${labelClassName}`]: {\n color: tokens.colorNeutralForeground3,\n },\n [`& ~ .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessible),\n },\n\n ':hover': {\n [`& ~ .${labelClassName}`]: {\n color: tokens.colorNeutralForeground2,\n },\n [`& ~ .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessibleHover),\n },\n },\n\n ':active:hover': {\n [`& ~ .${labelClassName}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessiblePressed),\n },\n },\n },\n\n // Colors for the checked state\n ':enabled:checked:not(:indeterminate)': {\n [`& ~ .${labelClassName}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${indicatorClassName}`]: {\n backgroundColor: tokens.colorCompoundBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackground),\n },\n\n ':hover': {\n [`& ~ .${indicatorClassName}`]: {\n backgroundColor: tokens.colorCompoundBrandBackgroundHover,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackgroundHover),\n },\n },\n\n ':active:hover': {\n [`& ~ .${indicatorClassName}`]: {\n backgroundColor: tokens.colorCompoundBrandBackgroundPressed,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackgroundPressed),\n },\n },\n },\n\n // Colors for the mixed state\n ':enabled:indeterminate': {\n [`& ~ .${labelClassName}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStroke),\n color: tokens.colorCompoundBrandForeground1,\n },\n\n ':hover': {\n [`& ~ .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokeHover),\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n },\n\n ':active:hover': {\n [`& ~ .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokePressed),\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n },\n },\n\n ':disabled': {\n cursor: 'default',\n\n [`& ~ .${labelClassName}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n [`& ~ .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n },\n});\n\nconst useIndicatorStyles = makeStyles({\n base: {\n alignSelf: 'flex-start',\n boxSizing: 'border-box',\n flexShrink: 0,\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n ...shorthands.overflow('hidden'),\n\n ...shorthands.border(tokens.strokeWidthThin, 'solid'),\n ...shorthands.borderRadius(tokens.borderRadiusSmall),\n fill: 'currentColor',\n pointerEvents: 'none',\n },\n\n medium: {\n width: indicatorSizeMedium,\n height: indicatorSizeMedium,\n fontSize: '12px',\n },\n\n large: {\n width: indicatorSizeLarge,\n height: indicatorSizeLarge,\n fontSize: '16px',\n },\n\n circular: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n});\n\nconst useLabelStyles = makeStyles({\n base: {\n alignSelf: 'center',\n userSelect: 'none',\n cursor: 'inherit',\n color: 'inherit',\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 ...shorthands.margin(`calc((${indicatorSizeMedium} - ${tokens.lineHeightBase300}) / 2)`, 0),\n },\n large: {\n ...shorthands.margin(`calc((${indicatorSizeLarge} - ${tokens.lineHeightBase300}) / 2)`, 0),\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 rootStyles = useRootStyles();\n state.root.className = mergeClasses(checkboxClassName, rootStyles.base, state.root.className);\n\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(inputStyles.base, state.input.className);\n\n const indicatorStyles = useIndicatorStyles();\n if (state.indicator) {\n state.indicator.className = mergeClasses(\n indicatorClassName,\n indicatorStyles.base,\n indicatorStyles[state.size],\n state.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 labelClassName,\n labelStyles.base,\n labelStyles[state.size],\n state.label.className,\n );\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -3,24 +3,29 @@ import { Label } from '@fluentui/react-label';
3
3
  import { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
4
4
  interface CheckboxCommons {
5
5
  /**
6
- * Whether to render the checkbox in a circular shape instead of square.
7
- * This variant is only recommended to be used in a tasks-style UI (checklist),
6
+ * The shape of the checkbox indicator.
7
+ *
8
+ * The `circular` variant is only recommended to be used in a tasks-style UI (checklist),
8
9
  * since it otherwise could be confused for a `RadioItem`.
9
- * @defaultvalue false
10
+ *
11
+ * @defaultvalue square
10
12
  */
11
- circular: boolean;
13
+ shape: 'square' | 'circular';
12
14
  /**
13
- * A checkbox's state can be controlled.
15
+ * The controlled value for the checkbox.
16
+ *
14
17
  * @defaultvalue false
15
18
  */
16
19
  checked: 'mixed' | boolean;
17
20
  /**
18
- * Checkbox supports two different checkbox sizes.
21
+ * The size of the checkbox indicator.
22
+ *
19
23
  * @defaultvalue medium
20
24
  */
21
25
  size: 'medium' | 'large';
22
26
  /**
23
- * Determines whether the label should be positioned before or after the checkbox.
27
+ * The position of the label relative to the checkbox indicator.
28
+ *
24
29
  * @defaultvalue after
25
30
  */
26
31
  labelPosition: 'before' | 'after';
@@ -51,7 +56,7 @@ export declare type CheckboxSlots = {
51
56
  */
52
57
  input: NonNullable<Slot<'input'>>;
53
58
  /**
54
- * Renders the checkbox, with the checkmark icon as its child when checked.
59
+ * The checkbox, with the checkmark icon as its child when checked.
55
60
  */
56
61
  indicator: Slot<'div'>;
57
62
  };
@@ -15,9 +15,9 @@ const renderCheckbox_unstable = state => {
15
15
  slotProps
16
16
  } = react_utilities_1.getSlots(state);
17
17
  return React.createElement(slots.root, { ...slotProps.root
18
- }, state.labelPosition === 'before' && slots.label && React.createElement(slots.label, { ...slotProps.label
18
+ }, React.createElement(slots.input, { ...slotProps.input
19
+ }), state.labelPosition === 'before' && slots.label && React.createElement(slots.label, { ...slotProps.label
19
20
  }), React.createElement(slots.indicator, { ...slotProps.indicator
20
- }), React.createElement(slots.input, { ...slotProps.input
21
21
  }), state.labelPosition === 'after' && slots.label && React.createElement(slots.label, { ...slotProps.label
22
22
  }));
23
23
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Checkbox/renderCheckbox.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGO,MAAM,uBAAuB,GAAI,KAAD,IAAyB;AAC9D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAwB,KAAxB,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,KAAK,CAAC,aAAN,KAAwB,QAAxB,IAAoC,KAAK,CAAC,KAA1C,IAAmD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CADtD,EAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAhB,CAFF,EAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CAHF,EAIG,KAAK,CAAC,aAAN,KAAwB,OAAxB,IAAmC,KAAK,CAAC,KAAzC,IAAkD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CAJrD,CADF;AAQD,CAXM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { CheckboxState, CheckboxSlots } from './Checkbox.types';\n\nexport const renderCheckbox_unstable = (state: CheckboxState) => {\n const { slots, slotProps } = getSlots<CheckboxSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.labelPosition === 'before' && slots.label && <slots.label {...slotProps.label} />}\n <slots.indicator {...slotProps.indicator} />\n <slots.input {...slotProps.input} />\n {state.labelPosition === 'after' && slots.label && <slots.label {...slotProps.label} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Checkbox/renderCheckbox.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGO,MAAM,uBAAuB,GAAI,KAAD,IAAyB;AAC9D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAwB,KAAxB,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CADF,EAEG,KAAK,CAAC,aAAN,KAAwB,QAAxB,IAAoC,KAAK,CAAC,KAA1C,IAAmD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CAFtD,EAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAhB,CAHF,EAIG,KAAK,CAAC,aAAN,KAAwB,OAAxB,IAAmC,KAAK,CAAC,KAAzC,IAAkD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CAJrD,CADF;AAQD,CAXM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { CheckboxState, CheckboxSlots } from './Checkbox.types';\n\nexport const renderCheckbox_unstable = (state: CheckboxState) => {\n const { slots, slotProps } = getSlots<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"],"sourceRoot":"../src/"}
@@ -27,7 +27,7 @@ const useCheckbox_unstable = (props, ref) => {
27
27
  const {
28
28
  disabled,
29
29
  required,
30
- circular = false,
30
+ shape = 'square',
31
31
  size = 'medium',
32
32
  labelPosition = 'after',
33
33
  onChange
@@ -47,8 +47,8 @@ const useCheckbox_unstable = (props, ref) => {
47
47
  let checkmarkIcon;
48
48
 
49
49
  if (mixed) {
50
- if (circular) {
51
- checkmarkIcon = size === 'large' ? React.createElement(react_icons_1.Circle16Filled, null) : React.createElement(react_icons_1.Circle12Filled, null);
50
+ if (shape === 'circular') {
51
+ checkmarkIcon = React.createElement(react_icons_1.CircleFilled, null);
52
52
  } else {
53
53
  checkmarkIcon = size === 'large' ? React.createElement(react_icons_1.Square16Filled, null) : React.createElement(react_icons_1.Square12Filled, null);
54
54
  }
@@ -57,7 +57,7 @@ const useCheckbox_unstable = (props, ref) => {
57
57
  }
58
58
 
59
59
  const state = {
60
- circular,
60
+ shape,
61
61
  checked,
62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B,MAAA,QAAQ,CAAC,OAAT,CAAiB,aAAjB,GAAiC,KAAjC;AACD;AACF,GAJD,EAIG,CAAC,QAAD,EAAW,KAAX,CAJH;AAMA,SAAO,KAAP;AACD,CA5FM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourcesContent":["import * as React from 'react';\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 Circle12Filled,\n Circle16Filled,\n} from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\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 const { disabled, required, circular = false, 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 (circular) {\n checkmarkIcon = size === 'large' ? <Circle16Filled /> : <Circle12Filled />;\n } else {\n checkmarkIcon = size === 'large' ? <Square16Filled /> : <Square12Filled />;\n }\n } else {\n checkmarkIcon = size === 'large' ? <Checkmark16Filled /> : <Checkmark12Filled />;\n }\n\n const state: CheckboxState = {\n circular,\n checked,\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: nativeProps.root,\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"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Checkbox/useCheckbox.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAUA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAOA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,oBAAoB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAA0E;AAC5G,QAAM;AAAE,IAAA,QAAF;AAAY,IAAA,QAAZ;AAAsB,IAAA,KAAK,GAAG,QAA9B;AAAwC,IAAA,IAAI,GAAG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AAY,QAAZ,GAAuB,iBAAA,CAAA,gBAAA,CAAiB,EAAE,IAAG;AAC3C,UAAM,GAAG,GAAG,EAAE,CAAC,aAAH,CAAiB,aAAjB,GAAiC,OAAjC,GAA2C,EAAE,CAAC,aAAH,CAAiB,OAAxE;AACA,IAAA,QAAQ,KAAA,IAAR,IAAA,QAAQ,KAAA,KAAA,CAAR,GAAQ,KAAA,CAAR,GAAA,QAAQ,CAAG,EAAH,EAAO;AAAE,MAAA,OAAO,EAAE;AAAX,KAAP,CAAR;AACA,IAAA,UAAU,CAAC,GAAD,CAAV;AACD,GAJsB,CAAvB,CAxE4G,CA8E5G;AACA;;AACA,QAAM,QAAQ,GAAG,iBAAA,CAAA,aAAA,CAAc,KAAK,CAAC,KAAN,CAAY,GAA1B,CAAjB;AACA,EAAA,KAAK,CAAC,KAAN,CAAY,GAAZ,GAAkB,QAAlB,CAjF4G,CAmF5G;AACA;;AACA,EAAA,iBAAA,CAAA,yBAAA,CAA0B,MAAK;AAC7B,QAAI,QAAQ,CAAC,OAAb,EAAsB;AACpB,MAAA,QAAQ,CAAC,OAAT,CAAiB,aAAjB,GAAiC,KAAjC;AACD;AACF,GAJD,EAIG,CAAC,QAAD,EAAW,KAAX,CAJH;AAMA,SAAO,KAAP;AACD,CA5FM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourcesContent":["import * as React from 'react';\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';\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 const { disabled, 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 {\n checkmarkIcon = size === 'large' ? <Checkmark16Filled /> : <Checkmark12Filled />;\n }\n\n const state: CheckboxState = {\n shape,\n checked,\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: nativeProps.root,\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"],"sourceRoot":"../src/"}
@@ -12,33 +12,24 @@ const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
12
12
  const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
13
13
 
14
14
  exports.checkboxClassName = 'fui-Checkbox';
15
- const indicatorClassName = 'fui-Checkbox-indicator'; // TODO replace these spacing constants with theme values once they're on the theme
15
+ const indicatorClassName = 'fui-Checkbox__indicator';
16
+ const labelClassName = 'fui-Checkbox__label'; // TODO replace these spacing constants with theme values once they're on the theme
16
17
 
17
18
  const spacingHorizontalS = '8px';
18
19
  const spacingHorizontalM = '12px'; // The indicator size is used by the indicator and label styles
19
20
 
20
21
  const indicatorSizeMedium = '16px';
21
22
  const indicatorSizeLarge = '20px';
22
- /**
23
- * Styles for the root slot
24
- */
25
23
 
26
24
  const useRootStyles = /*#__PURE__*/react_1.__styles({
27
25
  "base": {
28
26
  "qhf8xq": "f10pi13n",
29
27
  "mc9l5x": "ftuwxu6",
30
- "Beiy3e4": "f1063pyq",
31
- "Bceei9c": "f1k6fduh",
32
28
  "i8kkvl": "f4akndk",
33
29
  "z8tnut": "fp9bwmr",
34
30
  "z189sj": ["f19lj068", "f177v4lu"],
35
31
  "Byoj8tv": "f150uoa4",
36
- "uwmqm3": ["f177v4lu", "f19lj068"]
37
- },
38
- "disabled": {
39
- "Bceei9c": "f158kwzp"
40
- },
41
- "focusIndicator": {
32
+ "uwmqm3": ["f177v4lu", "f19lj068"],
42
33
  "B486eqv": "f2hkw1w",
43
34
  "c2y4jd": "fsofd9k",
44
35
  "B8vm7ur": "f12sql3b",
@@ -54,74 +45,10 @@ const useRootStyles = /*#__PURE__*/react_1.__styles({
54
45
  "Jxg1p8": "f8rjbh6",
55
46
  "Bc94xmo": ["fxfgh6q", "f8l10fm"],
56
47
  "Bj23z95": ["f8l10fm", "fxfgh6q"]
57
- },
58
- "uncheckedColors": {
59
- "sj55zd": "f11d4kpn",
60
- "B2uuno9": "fwkyayc",
61
- "qasus0": ["f7aqmyg", "ft2adke"],
62
- "joesme": "f1w1qo1y",
63
- "qcmoe7": ["ft2adke", "f7aqmyg"],
64
- "Bi91k9c": "f3p8bqa",
65
- "vpay66": "fft1thc",
66
- "fgdpeo": ["f1w8do5y", "fepve6s"],
67
- "ooapsn": "fdf0l0r",
68
- "ev9ftv": ["fepve6s", "f1w8do5y"],
69
- "Bfw6nra": "fesph6q",
70
- "Brbcl2": "f1mhtrce",
71
- "E16u1b": ["f17v52hn", "fg62ii9"],
72
- "c4amgi": "f1r1cpih",
73
- "Bepp5ky": ["fg62ii9", "f17v52hn"]
74
- },
75
- "checkedColors": {
76
- "sj55zd": "f19n0e5",
77
- "mrtg77": "f1nckptt",
78
- "bxuuxi": "f19uhq4u",
79
- "B2uuno9": "ffzu9nk",
80
- "qasus0": ["f1g19ujf", "fvb8adx"],
81
- "joesme": "f1emw82k",
82
- "qcmoe7": ["fvb8adx", "f1g19ujf"],
83
- "Bqcm5gq": "fc90h92",
84
- "vpay66": "f1gd0goh",
85
- "fgdpeo": ["f926psx", "f1pjby8k"],
86
- "ooapsn": "f1b2jcp4",
87
- "ev9ftv": ["f1pjby8k", "f926psx"],
88
- "Bn43wis": "f8zpi21",
89
- "Brbcl2": "f1irvqu2",
90
- "E16u1b": ["f5uvb4g", "f1vydb2"],
91
- "c4amgi": "fgkonep",
92
- "Bepp5ky": ["f1vydb2", "f5uvb4g"]
93
- },
94
- "mixedColors": {
95
- "sj55zd": "f19n0e5",
96
- "B2uuno9": "fkebysb",
97
- "qasus0": ["f1k0bg1", "f4oydaf"],
98
- "joesme": "fi1mkuk",
99
- "qcmoe7": ["f4oydaf", "f1k0bg1"],
100
- "bxuuxi": "f1n04o3z",
101
- "vpay66": "fdfakjf",
102
- "fgdpeo": ["fvqbddr", "f1babrrv"],
103
- "ooapsn": "f1jbek0d",
104
- "ev9ftv": ["f1babrrv", "fvqbddr"],
105
- "Iwvt79": "f1mps0ds",
106
- "Brbcl2": "f1tallx",
107
- "E16u1b": ["f9cmnyc", "f1skyj24"],
108
- "c4amgi": "f12y7q7q",
109
- "Bepp5ky": ["f1skyj24", "f9cmnyc"],
110
- "Ewzbd8": "f135b915"
111
- },
112
- "disabledColors": {
113
- "sj55zd": "f1s2aq7o",
114
- "B2uuno9": "f1bezmwk",
115
- "qasus0": ["fb9vlya", "f1ubioqa"],
116
- "joesme": "fu4x4v",
117
- "qcmoe7": ["f1ubioqa", "fb9vlya"],
118
- "bxuuxi": "fpjy2vv"
119
48
  }
120
49
  }, {
121
- "d": [".f10pi13n{position:relative;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".f1k6fduh{cursor:pointer;}", ".f4akndk{-webkit-column-gap:12px;column-gap:12px;}", ".fp9bwmr{padding-top:8px;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f150uoa4{padding-bottom:8px;}", ".f158kwzp{cursor:default;}", "[data-keyboard-nav] .fsofd9k:focus-within{border-color:transparent;}", "[data-keyboard-nav] .f12sql3b:focus-within:after{content:\"\";}", "[data-keyboard-nav] .f1i4q40k:focus-within:after{position:absolute;}", "[data-keyboard-nav] .fcrbge9:focus-within:after{pointer-events:none;}", "[data-keyboard-nav] .ft464mn:focus-within:after{box-sizing:outline-box;}", "[data-keyboard-nav] .fskqmiq:focus-within:after{z-index:1;}", "[data-keyboard-nav] .f2gy8jn:focus-within:after{border-style:solid;}", "[data-keyboard-nav] .f1pke3uf:focus-within:after{border-width:2px;}", "[data-keyboard-nav] .f18xdlq9:focus-within:after{border-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f1114nks:focus-within:after{border-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1unftzx:focus-within:after{top:-2px;}", "[data-keyboard-nav] .f8rjbh6:focus-within:after{bottom:-2px;}", "[data-keyboard-nav] .fxfgh6q:focus-within:after{left:-2px;}", "[data-keyboard-nav] .f8l10fm:focus-within:after{right:-2px;}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".fwkyayc .fui-Checkbox-indicator{border-top-color:var(--colorNeutralStrokeAccessible);}", ".f7aqmyg .fui-Checkbox-indicator{border-right-color:var(--colorNeutralStrokeAccessible);}", ".ft2adke .fui-Checkbox-indicator{border-left-color:var(--colorNeutralStrokeAccessible);}", ".f1w1qo1y .fui-Checkbox-indicator{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f1nckptt .fui-Checkbox-indicator{background-color:var(--colorCompoundBrandBackground);}", ".f19uhq4u .fui-Checkbox-indicator{color:var(--colorNeutralForegroundOnBrand);}", ".ffzu9nk .fui-Checkbox-indicator{border-top-color:var(--colorCompoundBrandBackground);}", ".f1g19ujf .fui-Checkbox-indicator{border-right-color:var(--colorCompoundBrandBackground);}", ".fvb8adx .fui-Checkbox-indicator{border-left-color:var(--colorCompoundBrandBackground);}", ".f1emw82k .fui-Checkbox-indicator{border-bottom-color:var(--colorCompoundBrandBackground);}", ".fkebysb .fui-Checkbox-indicator{border-top-color:var(--colorCompoundBrandStroke);}", ".f1k0bg1 .fui-Checkbox-indicator{border-right-color:var(--colorCompoundBrandStroke);}", ".f4oydaf .fui-Checkbox-indicator{border-left-color:var(--colorCompoundBrandStroke);}", ".fi1mkuk .fui-Checkbox-indicator{border-bottom-color:var(--colorCompoundBrandStroke);}", ".f1n04o3z .fui-Checkbox-indicator{color:var(--colorCompoundBrandForeground1);}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".f1bezmwk .fui-Checkbox-indicator{border-top-color:var(--colorNeutralStrokeDisabled);}", ".fb9vlya .fui-Checkbox-indicator{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f1ubioqa .fui-Checkbox-indicator{border-left-color:var(--colorNeutralStrokeDisabled);}", ".fu4x4v .fui-Checkbox-indicator{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".fpjy2vv .fui-Checkbox-indicator{color:var(--colorNeutralForegroundDisabled);}"],
122
- "i": [".f2hkw1w:focus-visible{outline-style:none;}"],
123
- "h": [".f3p8bqa:hover{color:var(--colorNeutralForeground2);}", ".fft1thc:hover .fui-Checkbox-indicator{border-top-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1w8do5y:hover .fui-Checkbox-indicator{border-right-color:var(--colorNeutralStrokeAccessibleHover);}", ".fepve6s:hover .fui-Checkbox-indicator{border-left-color:var(--colorNeutralStrokeAccessibleHover);}", ".fdf0l0r:hover .fui-Checkbox-indicator{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".fc90h92:hover .fui-Checkbox-indicator{background-color:var(--colorCompoundBrandBackgroundHover);}", ".f1gd0goh:hover .fui-Checkbox-indicator{border-top-color:var(--colorCompoundBrandBackgroundHover);}", ".f926psx:hover .fui-Checkbox-indicator{border-right-color:var(--colorCompoundBrandBackgroundHover);}", ".f1pjby8k:hover .fui-Checkbox-indicator{border-left-color:var(--colorCompoundBrandBackgroundHover);}", ".f1b2jcp4:hover .fui-Checkbox-indicator{border-bottom-color:var(--colorCompoundBrandBackgroundHover);}", ".fdfakjf:hover .fui-Checkbox-indicator{border-top-color:var(--colorCompoundBrandStrokeHover);}", ".fvqbddr:hover .fui-Checkbox-indicator{border-right-color:var(--colorCompoundBrandStrokeHover);}", ".f1babrrv:hover .fui-Checkbox-indicator{border-left-color:var(--colorCompoundBrandStrokeHover);}", ".f1jbek0d:hover .fui-Checkbox-indicator{border-bottom-color:var(--colorCompoundBrandStrokeHover);}", ".f1mps0ds:hover .fui-Checkbox-indicator{color:var(--colorCompoundBrandForeground1Hover);}"],
124
- "a": [".fesph6q:active:hover{color:var(--colorNeutralForeground1);}", ".f1mhtrce:active:hover .fui-Checkbox-indicator{border-top-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f17v52hn:active:hover .fui-Checkbox-indicator{border-right-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fg62ii9:active:hover .fui-Checkbox-indicator{border-left-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1r1cpih:active:hover .fui-Checkbox-indicator{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f8zpi21:active:hover .fui-Checkbox-indicator{background-color:var(--colorCompoundBrandBackgroundPressed);}", ".f1irvqu2:active:hover .fui-Checkbox-indicator{border-top-color:var(--colorCompoundBrandBackgroundPressed);}", ".f5uvb4g:active:hover .fui-Checkbox-indicator{border-right-color:var(--colorCompoundBrandBackgroundPressed);}", ".f1vydb2:active:hover .fui-Checkbox-indicator{border-left-color:var(--colorCompoundBrandBackgroundPressed);}", ".fgkonep:active:hover .fui-Checkbox-indicator{border-bottom-color:var(--colorCompoundBrandBackgroundPressed);}", ".f1tallx:active:hover .fui-Checkbox-indicator{border-top-color:var(--colorCompoundBrandStrokePressed);}", ".f9cmnyc:active:hover .fui-Checkbox-indicator{border-right-color:var(--colorCompoundBrandStrokePressed);}", ".f1skyj24:active:hover .fui-Checkbox-indicator{border-left-color:var(--colorCompoundBrandStrokePressed);}", ".f12y7q7q:active:hover .fui-Checkbox-indicator{border-bottom-color:var(--colorCompoundBrandStrokePressed);}", ".f135b915:active:hover .fui-Checkbox-indicator{color:var(--colorCompoundBrandForeground1Pressed);}"]
50
+ "d": [".f10pi13n{position:relative;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f4akndk{-webkit-column-gap:12px;column-gap:12px;}", ".fp9bwmr{padding-top:8px;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f150uoa4{padding-bottom:8px;}", "[data-keyboard-nav] .fsofd9k:focus-within{border-color:transparent;}", "[data-keyboard-nav] .f12sql3b:focus-within:after{content:\"\";}", "[data-keyboard-nav] .f1i4q40k:focus-within:after{position:absolute;}", "[data-keyboard-nav] .fcrbge9:focus-within:after{pointer-events:none;}", "[data-keyboard-nav] .ft464mn:focus-within:after{box-sizing:outline-box;}", "[data-keyboard-nav] .fskqmiq:focus-within:after{z-index:1;}", "[data-keyboard-nav] .f2gy8jn:focus-within:after{border-style:solid;}", "[data-keyboard-nav] .f1pke3uf:focus-within:after{border-width:2px;}", "[data-keyboard-nav] .f18xdlq9:focus-within:after{border-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f1114nks:focus-within:after{border-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1unftzx:focus-within:after{top:-2px;}", "[data-keyboard-nav] .f8rjbh6:focus-within:after{bottom:-2px;}", "[data-keyboard-nav] .fxfgh6q:focus-within:after{left:-2px;}", "[data-keyboard-nav] .f8l10fm:focus-within:after{right:-2px;}"],
51
+ "i": [".f2hkw1w:focus-visible{outline-style:none;}"]
125
52
  });
126
53
 
127
54
  const useInputStyles = /*#__PURE__*/react_1.__styles({
@@ -137,10 +64,66 @@ const useInputStyles = /*#__PURE__*/react_1.__styles({
137
64
  "jrapky": "f19f4twv",
138
65
  "Frg6f3": ["f1tyq0we", "f11qmguv"],
139
66
  "abs64n": "fk73vx1",
140
- "Bceei9c": "fpo1scq"
67
+ "Bceei9c": "f1k6fduh",
68
+ "B26k0as": "f1yrrd5t",
69
+ "k0xvi9": "fvfr0er",
70
+ "Bqb28oy": "fcwiijr",
71
+ "Fszymg": ["f11s8ldy", "f37mzfx"],
72
+ "s5xoki": "forfpyi",
73
+ "cfw8t2": ["f37mzfx", "f11s8ldy"],
74
+ "b9fajx": "f1vd61pd",
75
+ "pff03s": "f1mzgjal",
76
+ "Bk0s23q": ["f1iwu0i3", "f6umev3"],
77
+ "Bfc5gcl": "femu9zt",
78
+ "a4vgqw": ["f6umev3", "f1iwu0i3"],
79
+ "Fum7gy": "f1s8s9qo",
80
+ "B5tev9i": "fuvx3by",
81
+ "ecjak0": ["fuqx993", "f1akce7s"],
82
+ "B006ete": "feccz1o",
83
+ "Bxlzfhf": ["f1akce7s", "fuqx993"],
84
+ "qzqrip": "fqgvcms",
85
+ "xmoia3": "f1wvbx6q",
86
+ "i1phtq": "fcsc0bc",
87
+ "Bi8r3f5": "fkf9h0q",
88
+ "yvncz7": ["faeo8p5", "f4rpdul"],
89
+ "D2mvea": "fsk3itm",
90
+ "Bjmkmyo": ["f4rpdul", "faeo8p5"],
91
+ "B525uqd": "f4wqdms",
92
+ "B5z3g6i": "ftufdon",
93
+ "Bwnzx1a": ["f1ni78ii", "f1pe82pw"],
94
+ "w3j1jp": "fxl8eb7",
95
+ "n2zbqb": ["f1pe82pw", "f1ni78ii"],
96
+ "Bek439x": "f12pgwe7",
97
+ "Bgt4g9q": "f1c5u0pt",
98
+ "Bkzkukt": ["fyfn4nz", "f1aaeu2t"],
99
+ "wg1kw8": "ffzx9q8",
100
+ "Bh7u92y": ["f1aaeu2t", "fyfn4nz"],
101
+ "B40413r": "f1rm0htn",
102
+ "B9f5amx": "fpb7n6l",
103
+ "gbnyp0": ["f1uwkm0d", "fakdbj6"],
104
+ "ilwfws": "f180qsza",
105
+ "Fk4w3x": ["fakdbj6", "f1uwkm0d"],
106
+ "tfmijd": "f3nyagc",
107
+ "Bketd8w": "f1eh922j",
108
+ "s1clob": ["f1f3l6lh", "faa1us6"],
109
+ "B8s8lrk": "f1g6jlfz",
110
+ "Bp3qae9": ["faa1us6", "f1f3l6lh"],
111
+ "c4h28b": "f1d2ycii",
112
+ "Bvff7ki": "f18ruat1",
113
+ "B0usqpl": ["f18b6ltw", "fd6ao2z"],
114
+ "ckdfsi": "fdz9k82",
115
+ "B2hfjzz": ["fd6ao2z", "f18b6ltw"],
116
+ "B0rx68v": "f8c3d4w",
117
+ "ezr58z": "fvxnmui",
118
+ "Bdfu378": "f1ceq7vh",
119
+ "fvfg5q": "f4ohyq5",
120
+ "Bbnnodr": ["f1kakd2g", "f3ulah5"],
121
+ "B7y28oj": "f5fda5m",
122
+ "Dpxclb": ["f3ulah5", "f1kakd2g"],
123
+ "E1kcat": "f1c3drxw"
141
124
  }
142
125
  }, {
143
- "d": [".f1euv43f{position:absolute;}", ".f1vgc2s3{left:0;}", ".f1e31b4d{right:0;}", ".f15twtuk{top:0;}", ".fly5x3f{width:100%;}", ".f1l02sjl{height:100%;}", ".f1ewtqcl{box-sizing:border-box;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".fk73vx1{opacity:0;}", ".fpo1scq{cursor:inherit;}"]
126
+ "d": [".f1euv43f{position:absolute;}", ".f1vgc2s3{left:0;}", ".f1e31b4d{right:0;}", ".f15twtuk{top:0;}", ".fly5x3f{width:100%;}", ".f1l02sjl{height:100%;}", ".f1ewtqcl{box-sizing:border-box;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".fk73vx1{opacity:0;}", ".f1k6fduh{cursor:pointer;}", ".f1yrrd5t:not(:checked):not(:indeterminate)~.fui-Checkbox__indicator>*{opacity:0;}", ".fvfr0er:enabled:not(:checked):not(:indeterminate)~.fui-Checkbox__label{color:var(--colorNeutralForeground3);}", ".fcwiijr:enabled:not(:checked):not(:indeterminate)~.fui-Checkbox__indicator{border-top-color:var(--colorNeutralStrokeAccessible);}", ".f11s8ldy:enabled:not(:checked):not(:indeterminate)~.fui-Checkbox__indicator{border-right-color:var(--colorNeutralStrokeAccessible);}", ".f37mzfx:enabled:not(:checked):not(:indeterminate)~.fui-Checkbox__indicator{border-left-color:var(--colorNeutralStrokeAccessible);}", ".forfpyi:enabled:not(:checked):not(:indeterminate)~.fui-Checkbox__indicator{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".f1vd61pd:enabled:not(:checked):not(:indeterminate):hover~.fui-Checkbox__label{color:var(--colorNeutralForeground2);}", ".f1mzgjal:enabled:not(:checked):not(:indeterminate):hover~.fui-Checkbox__indicator{border-top-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1iwu0i3:enabled:not(:checked):not(:indeterminate):hover~.fui-Checkbox__indicator{border-right-color:var(--colorNeutralStrokeAccessibleHover);}", ".f6umev3:enabled:not(:checked):not(:indeterminate):hover~.fui-Checkbox__indicator{border-left-color:var(--colorNeutralStrokeAccessibleHover);}", ".femu9zt:enabled:not(:checked):not(:indeterminate):hover~.fui-Checkbox__indicator{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1s8s9qo:enabled:not(:checked):not(:indeterminate):active:hover~.fui-Checkbox__label{color:var(--colorNeutralForeground1);}", ".fuvx3by:enabled:not(:checked):not(:indeterminate):active:hover~.fui-Checkbox__indicator{border-top-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fuqx993:enabled:not(:checked):not(:indeterminate):active:hover~.fui-Checkbox__indicator{border-right-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1akce7s:enabled:not(:checked):not(:indeterminate):active:hover~.fui-Checkbox__indicator{border-left-color:var(--colorNeutralStrokeAccessiblePressed);}", ".feccz1o:enabled:not(:checked):not(:indeterminate):active:hover~.fui-Checkbox__indicator{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fqgvcms:enabled:checked:not(:indeterminate)~.fui-Checkbox__label{color:var(--colorNeutralForeground1);}", ".f1wvbx6q:enabled:checked:not(:indeterminate)~.fui-Checkbox__indicator{background-color:var(--colorCompoundBrandBackground);}", ".fcsc0bc:enabled:checked:not(:indeterminate)~.fui-Checkbox__indicator{color:var(--colorNeutralForegroundOnBrand);}", ".fkf9h0q:enabled:checked:not(:indeterminate)~.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandBackground);}", ".faeo8p5:enabled:checked:not(:indeterminate)~.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandBackground);}", ".f4rpdul:enabled:checked:not(:indeterminate)~.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandBackground);}", ".fsk3itm:enabled:checked:not(:indeterminate)~.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandBackground);}", ".f4wqdms:enabled:checked:not(:indeterminate):hover~.fui-Checkbox__indicator{background-color:var(--colorCompoundBrandBackgroundHover);}", ".ftufdon:enabled:checked:not(:indeterminate):hover~.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandBackgroundHover);}", ".f1ni78ii:enabled:checked:not(:indeterminate):hover~.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandBackgroundHover);}", ".f1pe82pw:enabled:checked:not(:indeterminate):hover~.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandBackgroundHover);}", ".fxl8eb7:enabled:checked:not(:indeterminate):hover~.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandBackgroundHover);}", ".f12pgwe7:enabled:checked:not(:indeterminate):active:hover~.fui-Checkbox__indicator{background-color:var(--colorCompoundBrandBackgroundPressed);}", ".f1c5u0pt:enabled:checked:not(:indeterminate):active:hover~.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandBackgroundPressed);}", ".fyfn4nz:enabled:checked:not(:indeterminate):active:hover~.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandBackgroundPressed);}", ".f1aaeu2t:enabled:checked:not(:indeterminate):active:hover~.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandBackgroundPressed);}", ".ffzx9q8:enabled:checked:not(:indeterminate):active:hover~.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandBackgroundPressed);}", ".f1rm0htn:enabled:indeterminate~.fui-Checkbox__label{color:var(--colorNeutralForeground1);}", ".fpb7n6l:enabled:indeterminate~.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandStroke);}", ".f1uwkm0d:enabled:indeterminate~.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandStroke);}", ".fakdbj6:enabled:indeterminate~.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandStroke);}", ".f180qsza:enabled:indeterminate~.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandStroke);}", ".f3nyagc:enabled:indeterminate~.fui-Checkbox__indicator{color:var(--colorCompoundBrandForeground1);}", ".f1eh922j:enabled:indeterminate:hover~.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandStrokeHover);}", ".f1f3l6lh:enabled:indeterminate:hover~.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandStrokeHover);}", ".faa1us6:enabled:indeterminate:hover~.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandStrokeHover);}", ".f1g6jlfz:enabled:indeterminate:hover~.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandStrokeHover);}", ".f1d2ycii:enabled:indeterminate:hover~.fui-Checkbox__indicator{color:var(--colorCompoundBrandForeground1Hover);}", ".f18ruat1:enabled:indeterminate:active:hover~.fui-Checkbox__indicator{border-top-color:var(--colorCompoundBrandStrokePressed);}", ".f18b6ltw:enabled:indeterminate:active:hover~.fui-Checkbox__indicator{border-right-color:var(--colorCompoundBrandStrokePressed);}", ".fd6ao2z:enabled:indeterminate:active:hover~.fui-Checkbox__indicator{border-left-color:var(--colorCompoundBrandStrokePressed);}", ".fdz9k82:enabled:indeterminate:active:hover~.fui-Checkbox__indicator{border-bottom-color:var(--colorCompoundBrandStrokePressed);}", ".f8c3d4w:enabled:indeterminate:active:hover~.fui-Checkbox__indicator{color:var(--colorCompoundBrandForeground1Pressed);}", ".fvxnmui:disabled{cursor:default;}", ".f1ceq7vh:disabled~.fui-Checkbox__label{color:var(--colorNeutralForegroundDisabled);}", ".f4ohyq5:disabled~.fui-Checkbox__indicator{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f1kakd2g:disabled~.fui-Checkbox__indicator{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f3ulah5:disabled~.fui-Checkbox__indicator{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f5fda5m:disabled~.fui-Checkbox__indicator{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".f1c3drxw:disabled~.fui-Checkbox__indicator{color:var(--colorNeutralForegroundDisabled);}"]
144
127
  });
145
128
 
146
129
  const useIndicatorStyles = /*#__PURE__*/react_1.__styles({
@@ -166,27 +149,26 @@ const useIndicatorStyles = /*#__PURE__*/react_1.__styles({
166
149
  "B7oj6ja": ["f1rstyi9", "f1s4nn1u"],
167
150
  "Btl43ni": ["f1s4nn1u", "f1rstyi9"],
168
151
  "Bkfmm31": "f1w9h62z",
169
- "Bceei9c": "fpo1scq"
152
+ "Bkecrkj": "f1aehjj5"
170
153
  },
171
154
  "medium": {
172
155
  "a9b677": "fjw5fx7",
173
- "Bqenvij": "fd461yt"
156
+ "Bqenvij": "fd461yt",
157
+ "Be2twd7": "f1ugzwwg"
174
158
  },
175
159
  "large": {
176
160
  "a9b677": "f64fuq3",
177
- "Bqenvij": "fjamq6b"
161
+ "Bqenvij": "fjamq6b",
162
+ "Be2twd7": "f4ybsrx"
178
163
  },
179
164
  "circular": {
180
165
  "Bbmb7ep": ["f8fbkgy", "f1nfllo7"],
181
166
  "Beyfa6y": ["f1nfllo7", "f8fbkgy"],
182
167
  "B7oj6ja": ["f1djnp8u", "f1s8kh49"],
183
168
  "Btl43ni": ["f1s8kh49", "f1djnp8u"]
184
- },
185
- "unchecked": {
186
- "Bm7m4lb": "f1byn578"
187
169
  }
188
170
  }, {
189
- "d": [".fjgzulp{-webkit-align-self:flex-start;-ms-flex-item-align:flex-start;align-self:flex-start;}", ".f1ewtqcl{box-sizing:border-box;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f1g3puop{border-bottom-right-radius:var(--borderRadiusSmall);}", ".fi2rrw2{border-bottom-left-radius:var(--borderRadiusSmall);}", ".f1rstyi9{border-top-right-radius:var(--borderRadiusSmall);}", ".f1s4nn1u{border-top-left-radius:var(--borderRadiusSmall);}", ".f1w9h62z{fill:currentColor;}", ".fpo1scq{cursor:inherit;}", ".fjw5fx7{width:16px;}", ".fd461yt{height:16px;}", ".f64fuq3{width:20px;}", ".fjamq6b{height: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);}", ".f1byn578>*{opacity:0;}"]
171
+ "d": [".fjgzulp{-webkit-align-self:flex-start;-ms-flex-item-align:flex-start;align-self:flex-start;}", ".f1ewtqcl{box-sizing:border-box;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f1g3puop{border-bottom-right-radius:var(--borderRadiusSmall);}", ".fi2rrw2{border-bottom-left-radius:var(--borderRadiusSmall);}", ".f1rstyi9{border-top-right-radius:var(--borderRadiusSmall);}", ".f1s4nn1u{border-top-left-radius:var(--borderRadiusSmall);}", ".f1w9h62z{fill:currentColor;}", ".f1aehjj5{pointer-events:none;}", ".fjw5fx7{width:16px;}", ".fd461yt{height:16px;}", ".f1ugzwwg{font-size:12px;}", ".f64fuq3{width:20px;}", ".fjamq6b{height:20px;}", ".f4ybsrx{font-size:16px;}", ".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);}"]
190
172
  });
191
173
 
192
174
  const useLabelStyles = /*#__PURE__*/react_1.__styles({
@@ -218,20 +200,19 @@ const useLabelStyles = /*#__PURE__*/react_1.__styles({
218
200
 
219
201
  const useCheckboxStyles_unstable = state => {
220
202
  const rootStyles = useRootStyles();
221
- state.root.className = react_1.mergeClasses(exports.checkboxClassName, rootStyles.base, rootStyles.focusIndicator, state.input.disabled && rootStyles.disabled, // Pick exactly one of the color classes, based on `disabled` and `checked`
222
- state.input.disabled ? rootStyles.disabledColors : state.checked === 'mixed' ? rootStyles.mixedColors : state.checked ? rootStyles.checkedColors : rootStyles.uncheckedColors, state.root.className);
203
+ state.root.className = react_1.mergeClasses(exports.checkboxClassName, rootStyles.base, state.root.className);
223
204
  const inputStyles = useInputStyles();
224
205
  state.input.className = react_1.mergeClasses(inputStyles.base, state.input.className);
225
206
  const indicatorStyles = useIndicatorStyles();
226
207
 
227
208
  if (state.indicator) {
228
- state.indicator.className = react_1.mergeClasses(indicatorClassName, indicatorStyles.base, indicatorStyles[state.size], state.circular && indicatorStyles.circular, !state.checked && indicatorStyles.unchecked, state.indicator.className);
209
+ state.indicator.className = react_1.mergeClasses(indicatorClassName, indicatorStyles.base, indicatorStyles[state.size], state.shape === 'circular' && indicatorStyles.circular, state.indicator.className);
229
210
  }
230
211
 
231
212
  const labelStyles = useLabelStyles();
232
213
 
233
214
  if (state.label) {
234
- state.label.className = react_1.mergeClasses(labelStyles.base, labelStyles[state.size], state.label.className);
215
+ state.label.className = react_1.mergeClasses(labelClassName, labelStyles.base, labelStyles[state.size], state.label.className);
235
216
  }
236
217
 
237
218
  return state;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Checkbox/useCheckboxStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAGa,OAAA,CAAA,iBAAA,GAAoB,cAApB;AACb,MAAM,kBAAkB,GAAG,wBAA3B,C,CAEA;;AACA,MAAM,kBAAkB,GAAG,KAA3B;AACA,MAAM,kBAAkB,GAAG,MAA3B,C,CAEA;;AACA,MAAM,mBAAmB,GAAG,MAA5B;AACA,MAAM,kBAAkB,GAAG,MAA3B;AAEA;;AAEG;;AACH,MAAM,aAAa,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { CheckboxState } from './Checkbox.types';\n\nexport const checkboxClassName = 'fui-Checkbox';\nconst indicatorClassName = 'fui-Checkbox-indicator';\n\n// TODO replace these spacing constants with theme values once they're on the theme\nconst spacingHorizontalS = '8px';\nconst spacingHorizontalM = '12px';\n\n// The indicator size is used by the indicator and label styles\nconst indicatorSizeMedium = '16px';\nconst indicatorSizeLarge = '20px';\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n base: {\n position: 'relative',\n display: 'inline-flex',\n flexDirection: 'row',\n cursor: 'pointer',\n columnGap: spacingHorizontalM,\n ...shorthands.padding(spacingHorizontalS),\n },\n\n disabled: {\n cursor: 'default',\n },\n\n focusIndicator: createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n\n // These `__Colors` styles are mutually exclusive: exactly one should be applied at any time\n uncheckedColors: {\n color: tokens.colorNeutralForeground3,\n [`& .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessible),\n },\n\n ':hover': {\n color: tokens.colorNeutralForeground2,\n [`& .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessibleHover),\n },\n },\n\n ':active:hover': {\n color: tokens.colorNeutralForeground1,\n [`& .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessiblePressed),\n },\n },\n },\n\n checkedColors: {\n color: tokens.colorNeutralForeground1,\n [`& .${indicatorClassName}`]: {\n backgroundColor: tokens.colorCompoundBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackground),\n },\n\n ':hover': {\n [`& .${indicatorClassName}`]: {\n backgroundColor: tokens.colorCompoundBrandBackgroundHover,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackgroundHover),\n },\n },\n\n ':active:hover': {\n [`& .${indicatorClassName}`]: {\n backgroundColor: tokens.colorCompoundBrandBackgroundPressed,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackgroundPressed),\n },\n },\n },\n\n mixedColors: {\n color: tokens.colorNeutralForeground1,\n [`& .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStroke),\n color: tokens.colorCompoundBrandForeground1,\n },\n\n ':hover': {\n [`& .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokeHover),\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n },\n\n ':active:hover': {\n [`& .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokePressed),\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n },\n },\n\n disabledColors: {\n color: tokens.colorNeutralForegroundDisabled,\n [`& .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\nconst useInputStyles = makeStyles({\n base: {\n position: 'absolute',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n boxSizing: 'border-box',\n ...shorthands.margin(0),\n opacity: 0,\n cursor: 'inherit',\n },\n});\n\nconst useIndicatorStyles = makeStyles({\n base: {\n alignSelf: 'flex-start',\n boxSizing: 'border-box',\n flexShrink: 0,\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n ...shorthands.overflow('hidden'),\n\n ...shorthands.border(tokens.strokeWidthThin, 'solid'),\n ...shorthands.borderRadius(tokens.borderRadiusSmall),\n fill: 'currentColor',\n cursor: 'inherit',\n },\n\n medium: {\n width: indicatorSizeMedium,\n height: indicatorSizeMedium,\n },\n\n large: {\n width: indicatorSizeLarge,\n height: indicatorSizeLarge,\n },\n\n circular: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n\n unchecked: {\n '& > *': {\n opacity: '0',\n },\n },\n});\n\nconst useLabelStyles = makeStyles({\n base: {\n alignSelf: 'center',\n userSelect: 'none',\n cursor: 'inherit',\n color: 'inherit',\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 ...shorthands.margin(`calc((${indicatorSizeMedium} - ${tokens.lineHeightBase300}) / 2)`, 0),\n },\n large: {\n ...shorthands.margin(`calc((${indicatorSizeLarge} - ${tokens.lineHeightBase300}) / 2)`, 0),\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 rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n checkboxClassName,\n rootStyles.base,\n rootStyles.focusIndicator,\n state.input.disabled && rootStyles.disabled,\n // Pick exactly one of the color classes, based on `disabled` and `checked`\n state.input.disabled\n ? rootStyles.disabledColors\n : state.checked === 'mixed'\n ? rootStyles.mixedColors\n : state.checked\n ? rootStyles.checkedColors\n : rootStyles.uncheckedColors,\n state.root.className,\n );\n\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(inputStyles.base, state.input.className);\n\n const indicatorStyles = useIndicatorStyles();\n if (state.indicator) {\n state.indicator.className = mergeClasses(\n indicatorClassName,\n indicatorStyles.base,\n indicatorStyles[state.size],\n state.circular && indicatorStyles.circular,\n !state.checked && indicatorStyles.unchecked,\n state.indicator.className,\n );\n }\n\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(labelStyles.base, labelStyles[state.size], state.label.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Checkbox/useCheckboxStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAGa,OAAA,CAAA,iBAAA,GAAoB,cAApB;AACb,MAAM,kBAAkB,GAAG,yBAA3B;AACA,MAAM,cAAc,GAAG,qBAAvB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import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { CheckboxState } from './Checkbox.types';\n\nexport const checkboxClassName = 'fui-Checkbox';\nconst indicatorClassName = 'fui-Checkbox__indicator';\nconst labelClassName = 'fui-Checkbox__label';\n\n// TODO replace these spacing constants with theme values once they're on the theme\nconst spacingHorizontalS = '8px';\nconst spacingHorizontalM = '12px';\n\n// The indicator size is used by the indicator and label styles\nconst indicatorSizeMedium = '16px';\nconst indicatorSizeLarge = '20px';\n\nconst useRootStyles = makeStyles({\n base: {\n position: 'relative',\n display: 'inline-flex',\n columnGap: spacingHorizontalM,\n ...shorthands.padding(spacingHorizontalS),\n ...createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n },\n});\n\nconst useInputStyles = makeStyles({\n base: {\n position: 'absolute',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n boxSizing: 'border-box',\n ...shorthands.margin(0),\n opacity: 0,\n cursor: 'pointer',\n\n // When unchecked, hide the the checkmark icon (child of the indicator slot)\n [`:not(:checked):not(:indeterminate) ~ .${indicatorClassName} > *`]: {\n opacity: 0,\n },\n\n // Colors for the unchecked state\n ':enabled:not(:checked):not(:indeterminate)': {\n [`& ~ .${labelClassName}`]: {\n color: tokens.colorNeutralForeground3,\n },\n [`& ~ .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessible),\n },\n\n ':hover': {\n [`& ~ .${labelClassName}`]: {\n color: tokens.colorNeutralForeground2,\n },\n [`& ~ .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessibleHover),\n },\n },\n\n ':active:hover': {\n [`& ~ .${labelClassName}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessiblePressed),\n },\n },\n },\n\n // Colors for the checked state\n ':enabled:checked:not(:indeterminate)': {\n [`& ~ .${labelClassName}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${indicatorClassName}`]: {\n backgroundColor: tokens.colorCompoundBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackground),\n },\n\n ':hover': {\n [`& ~ .${indicatorClassName}`]: {\n backgroundColor: tokens.colorCompoundBrandBackgroundHover,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackgroundHover),\n },\n },\n\n ':active:hover': {\n [`& ~ .${indicatorClassName}`]: {\n backgroundColor: tokens.colorCompoundBrandBackgroundPressed,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackgroundPressed),\n },\n },\n },\n\n // Colors for the mixed state\n ':enabled:indeterminate': {\n [`& ~ .${labelClassName}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStroke),\n color: tokens.colorCompoundBrandForeground1,\n },\n\n ':hover': {\n [`& ~ .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokeHover),\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n },\n\n ':active:hover': {\n [`& ~ .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokePressed),\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n },\n },\n\n ':disabled': {\n cursor: 'default',\n\n [`& ~ .${labelClassName}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n [`& ~ .${indicatorClassName}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n },\n});\n\nconst useIndicatorStyles = makeStyles({\n base: {\n alignSelf: 'flex-start',\n boxSizing: 'border-box',\n flexShrink: 0,\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n ...shorthands.overflow('hidden'),\n\n ...shorthands.border(tokens.strokeWidthThin, 'solid'),\n ...shorthands.borderRadius(tokens.borderRadiusSmall),\n fill: 'currentColor',\n pointerEvents: 'none',\n },\n\n medium: {\n width: indicatorSizeMedium,\n height: indicatorSizeMedium,\n fontSize: '12px',\n },\n\n large: {\n width: indicatorSizeLarge,\n height: indicatorSizeLarge,\n fontSize: '16px',\n },\n\n circular: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n});\n\nconst useLabelStyles = makeStyles({\n base: {\n alignSelf: 'center',\n userSelect: 'none',\n cursor: 'inherit',\n color: 'inherit',\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 ...shorthands.margin(`calc((${indicatorSizeMedium} - ${tokens.lineHeightBase300}) / 2)`, 0),\n },\n large: {\n ...shorthands.margin(`calc((${indicatorSizeLarge} - ${tokens.lineHeightBase300}) / 2)`, 0),\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 rootStyles = useRootStyles();\n state.root.className = mergeClasses(checkboxClassName, rootStyles.base, state.root.className);\n\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(inputStyles.base, state.input.className);\n\n const indicatorStyles = useIndicatorStyles();\n if (state.indicator) {\n state.indicator.className = mergeClasses(\n indicatorClassName,\n indicatorStyles.base,\n indicatorStyles[state.size],\n state.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 labelClassName,\n labelStyles.base,\n labelStyles[state.size],\n state.label.className,\n );\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-checkbox",
3
- "version": "9.0.0-beta.8",
3
+ "version": "9.0.0-beta.9",
4
4
  "description": "Fluent UI checkbox component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -42,9 +42,10 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@fluentui/react-icons": "^2.0.159-beta.10",
45
- "@fluentui/react-label": "9.0.0-beta.7",
46
- "@fluentui/react-tabster": "9.0.0-rc.3",
47
- "@fluentui/react-utilities": "9.0.0-rc.3",
45
+ "@fluentui/react-label": "9.0.0-beta.8",
46
+ "@fluentui/react-tabster": "9.0.0-rc.4",
47
+ "@fluentui/react-theme": "9.0.0-rc.3",
48
+ "@fluentui/react-utilities": "9.0.0-rc.4",
48
49
  "@griffel/react": "1.0.0",
49
50
  "tslib": "^2.1.0"
50
51
  },