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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.json +311 -1
  2. package/CHANGELOG.md +73 -2
  3. package/Spec.md +25 -115
  4. package/dist/react-checkbox.d.ts +37 -46
  5. package/lib/Checkbox.js.map +1 -1
  6. package/lib/components/Checkbox/Checkbox.d.ts +2 -1
  7. package/lib/components/Checkbox/Checkbox.js +10 -8
  8. package/lib/components/Checkbox/Checkbox.js.map +1 -1
  9. package/lib/components/Checkbox/Checkbox.types.d.ts +29 -34
  10. package/lib/components/Checkbox/Checkbox.types.js.map +1 -1
  11. package/lib/components/Checkbox/index.js.map +1 -1
  12. package/lib/components/Checkbox/renderCheckbox.d.ts +1 -1
  13. package/lib/components/Checkbox/renderCheckbox.js +11 -10
  14. package/lib/components/Checkbox/renderCheckbox.js.map +1 -1
  15. package/lib/components/Checkbox/useCheckbox.d.ts +5 -9
  16. package/lib/components/Checkbox/useCheckbox.js +99 -68
  17. package/lib/components/Checkbox/useCheckbox.js.map +1 -1
  18. package/lib/components/Checkbox/useCheckboxStyles.d.ts +2 -1
  19. package/lib/components/Checkbox/useCheckboxStyles.js +216 -159
  20. package/lib/components/Checkbox/useCheckboxStyles.js.map +1 -1
  21. package/lib/index.js.map +1 -1
  22. package/lib-commonjs/Checkbox.js +7 -2
  23. package/lib-commonjs/Checkbox.js.map +1 -1
  24. package/lib-commonjs/components/Checkbox/Checkbox.d.ts +2 -1
  25. package/lib-commonjs/components/Checkbox/Checkbox.js +20 -10
  26. package/lib-commonjs/components/Checkbox/Checkbox.js.map +1 -1
  27. package/lib-commonjs/components/Checkbox/Checkbox.types.d.ts +29 -34
  28. package/lib-commonjs/components/Checkbox/Checkbox.types.js +4 -1
  29. package/lib-commonjs/components/Checkbox/Checkbox.types.js.map +1 -1
  30. package/lib-commonjs/components/Checkbox/index.js +11 -2
  31. package/lib-commonjs/components/Checkbox/index.js.map +1 -1
  32. package/lib-commonjs/components/Checkbox/renderCheckbox.d.ts +1 -1
  33. package/lib-commonjs/components/Checkbox/renderCheckbox.js +23 -15
  34. package/lib-commonjs/components/Checkbox/renderCheckbox.js.map +1 -1
  35. package/lib-commonjs/components/Checkbox/useCheckbox.d.ts +5 -9
  36. package/lib-commonjs/components/Checkbox/useCheckbox.js +113 -73
  37. package/lib-commonjs/components/Checkbox/useCheckbox.js.map +1 -1
  38. package/lib-commonjs/components/Checkbox/useCheckboxStyles.d.ts +2 -1
  39. package/lib-commonjs/components/Checkbox/useCheckboxStyles.js +228 -163
  40. package/lib-commonjs/components/Checkbox/useCheckboxStyles.js.map +1 -1
  41. package/lib-commonjs/index.js +7 -2
  42. package/lib-commonjs/index.js.map +1 -1
  43. package/package.json +11 -11
  44. package/lib/common/isConformant.d.ts +0 -4
  45. package/lib/common/isConformant.js +0 -12
  46. package/lib/common/isConformant.js.map +0 -1
  47. package/lib/components/Checkbox/DefaultIcons.d.ts +0 -4
  48. package/lib/components/Checkbox/DefaultIcons.js +0 -10
  49. package/lib/components/Checkbox/DefaultIcons.js.map +0 -1
  50. package/lib-commonjs/common/isConformant.d.ts +0 -4
  51. package/lib-commonjs/common/isConformant.js +0 -16
  52. package/lib-commonjs/common/isConformant.js.map +0 -1
  53. package/lib-commonjs/components/Checkbox/DefaultIcons.d.ts +0 -4
  54. package/lib-commonjs/components/Checkbox/DefaultIcons.js +0 -17
  55. package/lib-commonjs/components/Checkbox/DefaultIcons.js.map +0 -1
@@ -1,176 +1,241 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useCheckboxStyles = void 0;
4
- var react_make_styles_1 = require("@fluentui/react-make-styles");
5
- var react_tabster_1 = require("@fluentui/react-tabster");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useCheckboxStyles_unstable = exports.checkboxClassName = void 0;
7
+
8
+ const react_1 = /*#__PURE__*/require("@griffel/react");
9
+
10
+ const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
11
+
12
+ const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
13
+
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
16
+
17
+ const spacingHorizontalS = '8px';
18
+ const spacingHorizontalM = '12px'; // The indicator size is used by the indicator and label styles
19
+
20
+ const indicatorSizeMedium = '16px';
21
+ const indicatorSizeLarge = '20px';
6
22
  /**
7
23
  * Styles for the root slot
8
24
  */
9
- var useStyles = react_make_styles_1.makeStyles({
10
- root: function (theme) { return ({
11
- display: 'inline-flex',
12
- position: 'relative',
13
- alignSelf: 'flex-start',
14
- alignItems: 'center',
15
- padding: '4px',
16
- userSelect: 'none',
17
- cursor: 'pointer',
18
- }); },
19
- disabled: function (theme) { return ({
20
- color: theme.colorNeutralForegroundDisabled,
21
- cursor: 'default',
22
- '& .ms-checkbox-indicator': {
23
- borderColor: theme.colorNeutralStrokeDisabled,
24
- color: theme.colorNeutralForegroundDisabled,
25
- backgroundColor: theme.colorNeutralBackground1,
26
- },
27
- ':hover': {
28
- '& .ms-checkbox-indicator': {
29
- borderColor: theme.colorNeutralStrokeDisabled,
30
- color: theme.colorNeutralForegroundDisabled,
31
- backgroundColor: theme.colorNeutralBackground1,
32
- },
33
- },
34
- ':active': {
35
- '& .ms-checkbox-indicator': {
36
- borderColor: theme.colorNeutralStrokeDisabled,
37
- color: theme.colorNeutralForegroundDisabled,
38
- backgroundColor: theme.colorNeutralBackground1,
39
- },
40
- },
41
- }); },
42
- unchecked: function (theme) { return ({
43
- color: theme.colorNeutralForeground3,
44
- '& .ms-checkbox-indicator': {
45
- borderColor: theme.colorNeutralStrokeAccessible,
46
- '& > *': {
47
- opacity: 0,
48
- },
49
- },
50
- ':hover': {
51
- color: theme.colorNeutralForeground2,
52
- '& .ms-checkbox-indicator': {
53
- borderColor: theme.colorNeutralStrokeAccessibleHover,
54
- },
55
- },
56
- ':active': {
57
- color: theme.colorNeutralForeground1,
58
- '& .ms-checkbox-indicator': {
59
- borderColor: theme.colorNeutralStrokeAccessiblePressed,
60
- },
61
- },
62
- }); },
63
- checked: function (theme) { return ({
64
- color: theme.colorNeutralForeground1,
65
- // TODO: neutralForegroundInverted change to NeutralForegroundOnBrand once it's added
66
- '& .ms-checkbox-indicator': {
67
- backgroundColor: theme.colorCompoundBrandBackground,
68
- color: theme.colorNeutralForegroundInverted,
69
- borderColor: theme.colorBrandBackground,
70
- },
71
- ':active': {
72
- '& .ms-checkbox-indicator': {
73
- backgroundColor: theme.colorCompoundBrandBackgroundPressed,
74
- },
75
- },
76
- ':hover': {
77
- '& .ms-checkbox-indicator': {
78
- backgroundColor: theme.colorCompoundBrandBackgroundHover,
79
- },
80
- },
81
- }); },
82
- mixed: function (theme) { return ({
83
- color: theme.colorNeutralForeground1,
84
- '& .ms-checkbox-indicator': {
85
- borderColor: theme.colorCompoundBrandStroke,
86
- color: theme.colorCompoundBrandForeground1,
87
- },
88
- ':active': {
89
- '& .ms-checkbox-indicator': {
90
- borderColor: theme.colorCompoundBrandStrokePressed,
91
- color: theme.colorCompoundBrandForeground1Pressed,
92
- },
93
- },
94
- ':hover': {
95
- '& .ms-checkbox-indicator': {
96
- borderColor: theme.colorCompoundBrandStrokeHover,
97
- color: theme.colorCompoundBrandForeground1Hover,
98
- },
99
- },
100
- }); },
101
- focusIndicator: function (theme) {
102
- return react_tabster_1.createFocusOutlineStyle(theme, { style: { outlineOffset: '2px' }, selector: 'focus-within' });
103
- },
25
+
26
+ const useRootStyles = /*#__PURE__*/react_1.__styles({
27
+ "base": {
28
+ "qhf8xq": "f10pi13n",
29
+ "mc9l5x": "ftuwxu6",
30
+ "Beiy3e4": "f1063pyq",
31
+ "Bceei9c": "f1k6fduh",
32
+ "i8kkvl": "f4akndk",
33
+ "z8tnut": "fp9bwmr",
34
+ "z189sj": ["f19lj068", "f177v4lu"],
35
+ "Byoj8tv": "f150uoa4",
36
+ "uwmqm3": ["f177v4lu", "f19lj068"]
37
+ },
38
+ "disabled": {
39
+ "Bceei9c": "f158kwzp"
40
+ },
41
+ "focusIndicator": {
42
+ "B486eqv": "f2hkw1w",
43
+ "c2y4jd": "fsofd9k",
44
+ "B8vm7ur": "f12sql3b",
45
+ "f4hv8x": "f1i4q40k",
46
+ "Gpan81": "fcrbge9",
47
+ "z7afg": "ft464mn",
48
+ "rsjj6t": "fskqmiq",
49
+ "Bqsd8kq": "f2gy8jn",
50
+ "sfhsbh": "f1pke3uf",
51
+ "Bugh3ej": "f18xdlq9",
52
+ "hpanx6": "f1114nks",
53
+ "Bjkpy09": "f1unftzx",
54
+ "Jxg1p8": "f8rjbh6",
55
+ "Bc94xmo": ["fxfgh6q", "f8l10fm"],
56
+ "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
+ }
120
+ }, {
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);}"]
104
125
  });
105
- var useContainerStyles = react_make_styles_1.makeStyles({
106
- container: {
107
- position: 'relative',
108
- display: 'flex',
109
- alignItems: 'center',
110
- justifyContent: 'center',
111
- },
112
- medium: {
113
- width: '16px',
114
- height: '16px',
115
- },
116
- large: {
117
- width: '20px',
118
- height: '20px',
119
- },
120
- // TODO: change marginLeft to Spacing horizontal M once it's added
121
- before: function (theme) { return ({
122
- marginLeft: '12px',
123
- }); },
124
- // TODO: change marginRight to Spacing horizontal M once it's added
125
- after: function (theme) { return ({
126
- marginRight: '12px',
127
- }); },
126
+
127
+ const useInputStyles = /*#__PURE__*/react_1.__styles({
128
+ "base": {
129
+ "qhf8xq": "f1euv43f",
130
+ "oyh7mz": ["f1vgc2s3", "f1e31b4d"],
131
+ "Bhzewxz": "f15twtuk",
132
+ "a9b677": "fly5x3f",
133
+ "Bqenvij": "f1l02sjl",
134
+ "B7ck84d": "f1ewtqcl",
135
+ "B6of3ja": "f1hu3pq6",
136
+ "t21cq0": ["f11qmguv", "f1tyq0we"],
137
+ "jrapky": "f19f4twv",
138
+ "Frg6f3": ["f1tyq0we", "f11qmguv"],
139
+ "abs64n": "fk73vx1",
140
+ "Bceei9c": "fpo1scq"
141
+ }
142
+ }, {
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;}"]
128
144
  });
129
- var useInputStyles = react_make_styles_1.makeStyles({
130
- input: {
131
- opacity: 0,
132
- position: 'absolute',
133
- margin: 0,
134
- padding: 0,
135
- cursor: 'pointer',
136
- },
137
- disabled: {
138
- cursor: 'not-allowed',
139
- },
145
+
146
+ const useIndicatorStyles = /*#__PURE__*/react_1.__styles({
147
+ "base": {
148
+ "qb2dma": "fjgzulp",
149
+ "B7ck84d": "f1ewtqcl",
150
+ "Bnnss6s": "fi64zpg",
151
+ "mc9l5x": "f22iagw",
152
+ "Bt984gj": "f122n59",
153
+ "Brf1p80": "f4d9j23",
154
+ "B68tc82": "f1p9o1ba",
155
+ "Bmxbyg5": "f1sil6mw",
156
+ "B4j52fo": "f192inf7",
157
+ "Bekrc4i": ["f5tn483", "f1ojsxk5"],
158
+ "Bn0qgzm": "f1vxd6vx",
159
+ "ibv6hh": ["f1ojsxk5", "f5tn483"],
160
+ "icvyot": "fzkkow9",
161
+ "vrafjx": ["fcdblym", "fjik90z"],
162
+ "oivjwe": "fg706s2",
163
+ "wvpqe5": ["fjik90z", "fcdblym"],
164
+ "Bbmb7ep": ["f1g3puop", "fi2rrw2"],
165
+ "Beyfa6y": ["fi2rrw2", "f1g3puop"],
166
+ "B7oj6ja": ["f1rstyi9", "f1s4nn1u"],
167
+ "Btl43ni": ["f1s4nn1u", "f1rstyi9"],
168
+ "Bkfmm31": "f1w9h62z",
169
+ "Bceei9c": "fpo1scq"
170
+ },
171
+ "medium": {
172
+ "a9b677": "fjw5fx7",
173
+ "Bqenvij": "fd461yt"
174
+ },
175
+ "large": {
176
+ "a9b677": "f64fuq3",
177
+ "Bqenvij": "fjamq6b"
178
+ },
179
+ "circular": {
180
+ "Bbmb7ep": ["f8fbkgy", "f1nfllo7"],
181
+ "Beyfa6y": ["f1nfllo7", "f8fbkgy"],
182
+ "B7oj6ja": ["f1djnp8u", "f1s8kh49"],
183
+ "Btl43ni": ["f1s8kh49", "f1djnp8u"]
184
+ },
185
+ "unchecked": {
186
+ "Bm7m4lb": "f1byn578"
187
+ }
188
+ }, {
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;}"]
140
190
  });
141
- var useIndicatorStyles = react_make_styles_1.makeStyles({
142
- box: function (theme) { return ({
143
- width: '100%',
144
- height: '100%',
145
- fill: 'currentColor',
146
- overflow: 'hidden',
147
- display: 'flex',
148
- alignItems: 'center',
149
- justifyContent: 'center',
150
- position: 'absolute',
151
- boxSizing: 'border-box',
152
- borderStyle: 'solid',
153
- borderRadius: theme.borderRadiusSmall,
154
- borderWidth: theme.strokeWidthThin,
155
- }); },
156
- circular: function (theme) { return ({
157
- borderRadius: theme.borderRadiusCircular,
158
- }); },
191
+
192
+ const useLabelStyles = /*#__PURE__*/react_1.__styles({
193
+ "base": {
194
+ "qb2dma": "f7nlbp4",
195
+ "famaaq": "f1xqy1su",
196
+ "Bceei9c": "fpo1scq",
197
+ "sj55zd": "f1ym3bx4"
198
+ },
199
+ "medium": {
200
+ "B6of3ja": "fjzwpt6",
201
+ "t21cq0": ["f11qmguv", "f1tyq0we"],
202
+ "jrapky": "fh6j2fo",
203
+ "Frg6f3": ["f1tyq0we", "f11qmguv"]
204
+ },
205
+ "large": {
206
+ "B6of3ja": "f1xlvstr",
207
+ "t21cq0": ["f11qmguv", "f1tyq0we"],
208
+ "jrapky": "f49ad5g",
209
+ "Frg6f3": ["f1tyq0we", "f11qmguv"]
210
+ }
211
+ }, {
212
+ "d": [".f7nlbp4{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;}", ".f1xqy1su{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}", ".fpo1scq{cursor:inherit;}", ".f1ym3bx4{color:inherit;}", ".fjzwpt6{margin-top:calc((16px - var(--lineHeightBase300)) / 2);}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".fh6j2fo{margin-bottom:calc((16px - var(--lineHeightBase300)) / 2);}", ".f1xlvstr{margin-top:calc((20px - var(--lineHeightBase300)) / 2);}", ".f49ad5g{margin-bottom:calc((20px - var(--lineHeightBase300)) / 2);}"]
159
213
  });
160
214
  /**
161
215
  * Apply styling to the Checkbox slots based on the state
162
216
  */
163
- var useCheckboxStyles = function (state) {
164
- var checkedState = state.checked === 'mixed' ? 'mixed' : state.checked ? 'checked' : 'unchecked';
165
- var indicatorStyles = useIndicatorStyles();
166
- var inputStyles = useInputStyles();
167
- var containerStyles = useContainerStyles();
168
- var styles = useStyles();
169
- state.root.className = react_make_styles_1.mergeClasses(styles.root, styles.focusIndicator, styles[checkedState], state.input.disabled && styles.disabled, state.root.className);
170
- state.input.className = react_make_styles_1.mergeClasses(containerStyles[state.size], inputStyles.input, state.input.disabled && inputStyles.disabled, state.input.className);
171
- state.containerClassName = react_make_styles_1.mergeClasses(containerStyles.container, containerStyles[state.size], !!state.root.children && containerStyles[state.labelPosition]);
172
- state.indicator.className = react_make_styles_1.mergeClasses(indicatorStyles.box, containerStyles[state.size], state.circular && indicatorStyles.circular, 'ms-checkbox-indicator', state.indicator.className);
173
- return state;
217
+
218
+
219
+ const useCheckboxStyles_unstable = state => {
220
+ 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);
223
+ const inputStyles = useInputStyles();
224
+ state.input.className = react_1.mergeClasses(inputStyles.base, state.input.className);
225
+ const indicatorStyles = useIndicatorStyles();
226
+
227
+ 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);
229
+ }
230
+
231
+ const labelStyles = useLabelStyles();
232
+
233
+ if (state.label) {
234
+ state.label.className = react_1.mergeClasses(labelStyles.base, labelStyles[state.size], state.label.className);
235
+ }
236
+
237
+ return state;
174
238
  };
175
- exports.useCheckboxStyles = useCheckboxStyles;
239
+
240
+ exports.useCheckboxStyles_unstable = useCheckboxStyles_unstable;
176
241
  //# sourceMappingURL=useCheckboxStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCheckboxStyles.js","sourceRoot":"","sources":["../../../src/components/Checkbox/useCheckboxStyles.ts"],"names":[],"mappings":";;;AAAA,iEAAuE;AACvE,yDAAkE;AAGlE;;GAEG;AACH,IAAM,SAAS,GAAG,8BAAU,CAAC;IAC3B,IAAI,EAAE,UAAA,KAAK,IAAI,OAAA,CAAC;QACd,OAAO,EAAE,aAAa;QACtB,QAAQ,EAAE,UAAU;QACpB,SAAS,EAAE,YAAY;QACvB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,MAAM;QAClB,MAAM,EAAE,SAAS;KAClB,CAAC,EARa,CAQb;IAEF,QAAQ,EAAE,UAAA,KAAK,IAAI,OAAA,CAAC;QAClB,KAAK,EAAE,KAAK,CAAC,8BAA8B;QAC3C,MAAM,EAAE,SAAS;QAEjB,0BAA0B,EAAE;YAC1B,WAAW,EAAE,KAAK,CAAC,0BAA0B;YAC7C,KAAK,EAAE,KAAK,CAAC,8BAA8B;YAC3C,eAAe,EAAE,KAAK,CAAC,uBAAuB;SAC/C;QAED,QAAQ,EAAE;YACR,0BAA0B,EAAE;gBAC1B,WAAW,EAAE,KAAK,CAAC,0BAA0B;gBAC7C,KAAK,EAAE,KAAK,CAAC,8BAA8B;gBAC3C,eAAe,EAAE,KAAK,CAAC,uBAAuB;aAC/C;SACF;QAED,SAAS,EAAE;YACT,0BAA0B,EAAE;gBAC1B,WAAW,EAAE,KAAK,CAAC,0BAA0B;gBAC7C,KAAK,EAAE,KAAK,CAAC,8BAA8B;gBAC3C,eAAe,EAAE,KAAK,CAAC,uBAAuB;aAC/C;SACF;KACF,CAAC,EAzBiB,CAyBjB;IAEF,SAAS,EAAE,UAAA,KAAK,IAAI,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AvCM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","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,5 +1,10 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
4
9
  tslib_1.__exportStar(require("./Checkbox"), exports);
5
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B"}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Checkbox';\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.3",
3
+ "version": "9.0.0-beta.8",
4
4
  "description": "Fluent UI checkbox component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -18,16 +18,16 @@
18
18
  "just": "just-scripts",
19
19
  "lint": "just-scripts lint",
20
20
  "start": "yarn storybook",
21
- "test": "jest",
21
+ "test": "jest --passWithNoTests",
22
22
  "docs": "api-extractor run --config=config/api-extractor.local.json --local",
23
- "build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-checkbox/src && yarn docs",
24
- "storybook": "start-storybook"
23
+ "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-checkbox/src && yarn docs",
24
+ "storybook": "node ../../scripts/storybook/runner",
25
+ "type-check": "tsc -b tsconfig.json"
25
26
  },
26
27
  "devDependencies": {
27
28
  "@fluentui/eslint-plugin": "*",
28
- "@fluentui/jest-serializer-make-styles": "9.0.0-beta.2",
29
29
  "@fluentui/react-conformance": "*",
30
- "@fluentui/react-conformance-make-styles": "9.0.0-beta.2",
30
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.3",
31
31
  "@fluentui/scripts": "^1.0.0",
32
32
  "@types/enzyme": "3.10.3",
33
33
  "@types/enzyme-adapter-react-16": "1.0.3",
@@ -41,10 +41,11 @@
41
41
  "react-test-renderer": "^16.3.0"
42
42
  },
43
43
  "dependencies": {
44
- "@fluentui/react-make-styles": "9.0.0-beta.2",
45
- "@fluentui/react-utilities": "9.0.0-beta.2",
46
- "@fluentui/react-label": "9.0.0-beta.2",
47
- "@fluentui/react-tabster": "9.0.0-beta.3",
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",
48
+ "@griffel/react": "1.0.0",
48
49
  "tslib": "^2.1.0"
49
50
  },
50
51
  "peerDependencies": {
@@ -54,7 +55,6 @@
54
55
  "react-dom": ">=16.8.0 <18.0.0"
55
56
  },
56
57
  "beachball": {
57
- "tag": "beta",
58
58
  "disallowedChangeTypes": [
59
59
  "major",
60
60
  "minor",
@@ -1,4 +0,0 @@
1
- import { IsConformantOptions } from '@fluentui/react-conformance';
2
- export declare function isConformant<TProps = {}>(testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & {
3
- componentPath?: string;
4
- }): void;
@@ -1,12 +0,0 @@
1
- import { isConformant as baseIsConformant } from '@fluentui/react-conformance';
2
- import makeStylesTests from '@fluentui/react-conformance-make-styles';
3
- export function isConformant(testInfo) {
4
- var defaultOptions = {
5
- asPropHandlesRef: true,
6
- componentPath: module.parent.filename.replace('.test', ''),
7
- extraTests: makeStylesTests,
8
- skipAsPropTests: true,
9
- };
10
- baseIsConformant(defaultOptions, testInfo);
11
- }
12
- //# sourceMappingURL=isConformant.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isConformant.js","sourceRoot":"","sources":["../../src/common/isConformant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAmC,MAAM,6BAA6B,CAAC;AAChH,OAAO,eAAe,MAAM,yCAAyC,CAAC;AAEtE,MAAM,UAAU,YAAY,CAC1B,QAAyF;IAEzF,IAAM,cAAc,GAAyC;QAC3D,gBAAgB,EAAE,IAAI;QACtB,aAAa,EAAE,MAAO,CAAC,MAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;QAC5D,UAAU,EAAE,eAAqC;QACjD,eAAe,EAAE,IAAI;KACtB,CAAC;IAEF,gBAAgB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;AAC7C,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const Mixed12Regular: () => JSX.Element;
2
- export declare const Mixed16Regular: () => JSX.Element;
3
- export declare const Checkmark12Regular: () => JSX.Element;
4
- export declare const Checkmark16Regular: () => JSX.Element;
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
- export var Mixed12Regular = function () { return (React.createElement("svg", { width: "12", height: "12", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg", focusable: "false" },
3
- React.createElement("rect", { width: "8", height: "8", x: "2", y: "2" }))); };
4
- export var Mixed16Regular = function () { return (React.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", focusable: "false" },
5
- React.createElement("rect", { width: "10", height: "10", x: "3", y: "3" }))); };
6
- export var Checkmark12Regular = function () { return (React.createElement("svg", { width: "12", height: "12", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg" },
7
- React.createElement("path", { d: "M9.85355 3.14645C10.0488 3.34171 10.0488 3.65829 9.85355 3.85355L5.35355 8.35355C5.15829 8.54882 4.84171 8.54882 4.64645 8.35355L2.64645 6.35355C2.45118 6.15829 2.45118 5.84171 2.64645 5.64645C2.84171 5.45118 3.15829 5.45118 3.35355 5.64645L5 7.29289L9.14645 3.14645C9.34171 2.95118 9.65829 2.95118 9.85355 3.14645Z" }))); };
8
- export var Checkmark16Regular = function () { return (React.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg" },
9
- React.createElement("path", { d: "M13.8639 3.65609C14.0533 3.85704 14.0439 4.17348 13.8429 4.36288L5.91309 11.8368C5.67573 12.0605 5.30311 12.0536 5.07417 11.8213L2.39384 9.10093C2.20003 8.90422 2.20237 8.58765 2.39907 8.39384C2.59578 8.20003 2.91235 8.20237 3.10616 8.39908L5.51192 10.8407L13.1571 3.63517C13.358 3.44577 13.6745 3.45513 13.8639 3.65609Z" }))); };
10
- //# sourceMappingURL=DefaultIcons.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DefaultIcons.js","sourceRoot":"","sources":["../../../src/components/Checkbox/DefaultIcons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,CAAC,IAAM,cAAc,GAAG,cAAM,OAAA,CAClC,6BAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B,EAAC,SAAS,EAAC,OAAO;IAClG,8BAAM,KAAK,EAAC,GAAG,EAAC,MAAM,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,GAAG,CACrC,CACP,EAJmC,CAInC,CAAC;AAEF,MAAM,CAAC,IAAM,cAAc,GAAG,cAAM,OAAA,CAClC,6BAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B,EAAC,SAAS,EAAC,OAAO;IAClG,8BAAM,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,GAAG,CACvC,CACP,EAJmC,CAInC,CAAC;AAEF,MAAM,CAAC,IAAM,kBAAkB,GAAG,cAAM,OAAA,CACtC,6BAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B;IAChF,8BAAM,CAAC,EAAC,6TAA6T,GAAG,CACpU,CACP,EAJuC,CAIvC,CAAC;AAEF,MAAM,CAAC,IAAM,kBAAkB,GAAG,cAAM,OAAA,CACtC,6BAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B;IAChF,8BAAM,CAAC,EAAC,kUAAkU,GAAG,CACzU,CACP,EAJuC,CAIvC,CAAC"}
@@ -1,4 +0,0 @@
1
- import { IsConformantOptions } from '@fluentui/react-conformance';
2
- export declare function isConformant<TProps = {}>(testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & {
3
- componentPath?: string;
4
- }): void;