@fluentui/react-spinbutton 9.2.4 → 9.2.6
Sign up to get free protection for your applications and to get access to all the features.
- package/.swcrc +30 -0
- package/CHANGELOG.json +97 -1
- package/CHANGELOG.md +31 -2
- package/lib/SpinButton.js.map +1 -1
- package/lib/SpinButtonField.js.map +1 -1
- package/lib/components/SpinButton/SpinButton.js.map +1 -1
- package/lib/components/SpinButton/SpinButton.types.js +1 -1
- package/lib/components/SpinButton/SpinButton.types.js.map +1 -1
- package/lib/components/SpinButton/index.js.map +1 -1
- package/lib/components/SpinButton/renderSpinButton.js +1 -9
- package/lib/components/SpinButton/renderSpinButton.js.map +1 -1
- package/lib/components/SpinButton/useSpinButton.js +4 -3
- package/lib/components/SpinButton/useSpinButton.js.map +1 -1
- package/lib/components/SpinButton/useSpinButtonStyles.js.map +1 -1
- package/lib/components/SpinButtonField/SpinButtonField.js +1 -2
- package/lib/components/SpinButtonField/SpinButtonField.js.map +1 -1
- package/lib/components/SpinButtonField/index.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/clamp.js.map +1 -1
- package/lib/utils/getBound.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/precision.js +6 -7
- package/lib/utils/precision.js.map +1 -1
- package/lib-commonjs/SpinButton.js +5 -4
- package/lib-commonjs/SpinButton.js.map +1 -1
- package/lib-commonjs/SpinButtonField.js +5 -4
- package/lib-commonjs/SpinButtonField.js.map +1 -1
- package/lib-commonjs/components/SpinButton/SpinButton.js +19 -20
- package/lib-commonjs/components/SpinButton/SpinButton.js.map +1 -1
- package/lib-commonjs/components/SpinButton/SpinButton.types.js +5 -2
- package/lib-commonjs/components/SpinButton/SpinButton.types.js.map +1 -1
- package/lib-commonjs/components/SpinButton/index.js +9 -8
- package/lib-commonjs/components/SpinButton/index.js.map +1 -1
- package/lib-commonjs/components/SpinButton/renderSpinButton.js +13 -24
- package/lib-commonjs/components/SpinButton/renderSpinButton.js.map +1 -1
- package/lib-commonjs/components/SpinButton/useSpinButton.js +248 -259
- package/lib-commonjs/components/SpinButton/useSpinButton.js.map +1 -1
- package/lib-commonjs/components/SpinButton/useSpinButtonStyles.js +506 -246
- package/lib-commonjs/components/SpinButton/useSpinButtonStyles.js.map +1 -1
- package/lib-commonjs/components/SpinButtonField/SpinButtonField.js +17 -11
- package/lib-commonjs/components/SpinButtonField/SpinButtonField.js.map +1 -1
- package/lib-commonjs/components/SpinButtonField/index.js +5 -4
- package/lib-commonjs/components/SpinButtonField/index.js.map +1 -1
- package/lib-commonjs/index.js +21 -49
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/clamp.js +28 -21
- package/lib-commonjs/utils/clamp.js.map +1 -1
- package/lib-commonjs/utils/getBound.js +16 -14
- package/lib-commonjs/utils/getBound.js.map +1 -1
- package/lib-commonjs/utils/index.js +7 -6
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/precision.js +33 -33
- package/lib-commonjs/utils/precision.js.map +1 -1
- package/package.json +12 -11
- package/lib-amd/SpinButton.js +0 -6
- package/lib-amd/SpinButton.js.map +0 -1
- package/lib-amd/SpinButtonField.js +0 -6
- package/lib-amd/SpinButtonField.js.map +0 -1
- package/lib-amd/components/SpinButton/SpinButton.js +0 -17
- package/lib-amd/components/SpinButton/SpinButton.js.map +0 -1
- package/lib-amd/components/SpinButton/SpinButton.types.js +0 -5
- package/lib-amd/components/SpinButton/SpinButton.types.js.map +0 -1
- package/lib-amd/components/SpinButton/index.js +0 -10
- package/lib-amd/components/SpinButton/index.js.map +0 -1
- package/lib-amd/components/SpinButton/renderSpinButton.js +0 -17
- package/lib-amd/components/SpinButton/renderSpinButton.js.map +0 -1
- package/lib-amd/components/SpinButton/useSpinButton.js +0 -253
- package/lib-amd/components/SpinButton/useSpinButton.js.map +0 -1
- package/lib-amd/components/SpinButton/useSpinButtonStyles.js +0 -420
- package/lib-amd/components/SpinButton/useSpinButtonStyles.js.map +0 -1
- package/lib-amd/components/SpinButtonField/SpinButtonField.js +0 -10
- package/lib-amd/components/SpinButtonField/SpinButtonField.js.map +0 -1
- package/lib-amd/components/SpinButtonField/index.js +0 -6
- package/lib-amd/components/SpinButtonField/index.js.map +0 -1
- package/lib-amd/index.js +0 -13
- package/lib-amd/index.js.map +0 -1
- package/lib-amd/utils/clamp.js +0 -30
- package/lib-amd/utils/clamp.js.map +0 -1
- package/lib-amd/utils/getBound.js +0 -19
- package/lib-amd/utils/getBound.js.map +0 -1
- package/lib-amd/utils/index.js +0 -8
- package/lib-amd/utils/index.js.map +0 -1
- package/lib-amd/utils/precision.js +0 -44
- package/lib-amd/utils/precision.js.map +0 -1
@@ -1,265 +1,525 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
spinButtonClassNames: ()=>spinButtonClassNames,
|
13
|
+
useSpinButtonStyles_unstable: ()=>useSpinButtonStyles_unstable
|
5
14
|
});
|
6
|
-
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
incrementButton: 'fui-SpinButton__incrementButton',
|
13
|
-
decrementButton: 'fui-SpinButton__decrementButton'
|
15
|
+
const _react = require("@griffel/react");
|
16
|
+
const spinButtonClassNames = {
|
17
|
+
root: 'fui-SpinButton',
|
18
|
+
input: 'fui-SpinButton__input',
|
19
|
+
incrementButton: 'fui-SpinButton__incrementButton',
|
20
|
+
decrementButton: 'fui-SpinButton__decrementButton'
|
14
21
|
};
|
15
22
|
const spinButtonExtraClassNames = {
|
16
|
-
|
23
|
+
buttonActive: 'fui-SpinButton__button_active'
|
17
24
|
};
|
18
25
|
const fieldHeights = {
|
19
|
-
|
20
|
-
|
26
|
+
small: '24px',
|
27
|
+
medium: '32px'
|
21
28
|
};
|
22
|
-
const useRootClassName = /*#__PURE__*/
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
29
|
+
const useRootClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("rkqmps4", "r1trw52p", [
|
30
|
+
".rkqmps4{display:inline-grid;grid-template-columns:1fr 24px;grid-template-rows:1fr 1fr;-webkit-column-gap:var(--spacingHorizontalXS);column-gap:var(--spacingHorizontalXS);row-gap:0;position:relative;isolation:isolate;background-color:var(--colorNeutralBackground1);min-height:32px;padding:0 0 0 var(--spacingHorizontalMNudge);border-radius:var(--borderRadiusMedium);}",
|
31
|
+
".rkqmps4::before{content:\"\";box-sizing:border-box;position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:10;border:1px solid var(--colorNeutralStroke1);border-bottom-color:var(--colorNeutralStrokeAccessible);border-radius:var(--borderRadiusMedium);}",
|
32
|
+
".rkqmps4::after{box-sizing:border-box;content:\"\";position:absolute;right:0;bottom:0;left:0;z-index:20;height:max(2px, var(--borderRadiusMedium));border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-bottom:2px solid var(--colorCompoundBrandStroke);-webkit-clip-path:inset(calc(100% - 2px) 0 0 0);clip-path:inset(calc(100% - 2px) 0 0 0);-webkit-transform:scaleX(0);-moz-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);transition-property:transform;transition-duration:var(--durationUltraFast);transition-delay:var(--curveAccelerateMid);}",
|
33
|
+
"@media screen and (prefers-reduced-motion: reduce){.rkqmps4::after{transition-duration:0.01ms;transition-delay:0.01ms;}}",
|
34
|
+
".rkqmps4:focus-within::after{-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);transition-property:transform;transition-duration:var(--durationNormal);transition-delay:var(--curveDecelerateMid);}",
|
35
|
+
"@media screen and (prefers-reduced-motion: reduce){.rkqmps4:focus-within::after{transition-duration:0.01ms;transition-delay:0.01ms;}}",
|
36
|
+
".rkqmps4:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}",
|
37
|
+
".rkqmps4:focus-within{outline:2px solid transparent;}",
|
38
|
+
".r1trw52p{display:inline-grid;grid-template-columns:1fr 24px;grid-template-rows:1fr 1fr;-webkit-column-gap:var(--spacingHorizontalXS);column-gap:var(--spacingHorizontalXS);row-gap:0;position:relative;isolation:isolate;background-color:var(--colorNeutralBackground1);min-height:32px;padding:0 var(--spacingHorizontalMNudge) 0 0;border-radius:var(--borderRadiusMedium);}",
|
39
|
+
".r1trw52p::before{content:\"\";box-sizing:border-box;position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none;z-index:10;border:1px solid var(--colorNeutralStroke1);border-bottom-color:var(--colorNeutralStrokeAccessible);border-radius:var(--borderRadiusMedium);}",
|
40
|
+
".r1trw52p::after{box-sizing:border-box;content:\"\";position:absolute;left:0;bottom:0;right:0;z-index:20;height:max(2px, var(--borderRadiusMedium));border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-bottom:2px solid var(--colorCompoundBrandStroke);-webkit-clip-path:inset(calc(100% - 2px) 0 0 0);clip-path:inset(calc(100% - 2px) 0 0 0);-webkit-transform:scaleX(0);-moz-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);transition-property:transform;transition-duration:var(--durationUltraFast);transition-delay:var(--curveAccelerateMid);}",
|
41
|
+
"@media screen and (prefers-reduced-motion: reduce){.r1trw52p::after{transition-duration:0.01ms;transition-delay:0.01ms;}}",
|
42
|
+
".r1trw52p:focus-within::after{-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);transition-property:transform;transition-duration:var(--durationNormal);transition-delay:var(--curveDecelerateMid);}",
|
43
|
+
"@media screen and (prefers-reduced-motion: reduce){.r1trw52p:focus-within::after{transition-duration:0.01ms;transition-delay:0.01ms;}}",
|
44
|
+
".r1trw52p:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}",
|
45
|
+
".r1trw52p:focus-within{outline:2px solid transparent;}"
|
46
|
+
]);
|
47
|
+
const useRootStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
48
|
+
small: {
|
49
|
+
sshi5w: "f1pha7fy",
|
50
|
+
Bahqtrf: "fk6fouc",
|
51
|
+
Be2twd7: "fy9rknc",
|
52
|
+
Bhrd7zp: "figsok6",
|
53
|
+
Bg96gwp: "fwrc4pm",
|
54
|
+
uwmqm3: [
|
55
|
+
"f1f5gg8d",
|
56
|
+
"f1vdfbxk"
|
57
|
+
]
|
58
|
+
},
|
59
|
+
medium: {},
|
60
|
+
outline: {},
|
61
|
+
outlineInteractive: {
|
62
|
+
Bo3r8zu: "f1w2y1rc",
|
63
|
+
Hpvxnh: [
|
64
|
+
"f1gofhvl",
|
65
|
+
"f18htlvq"
|
66
|
+
],
|
67
|
+
Bx11ytk: "ffcnd28",
|
68
|
+
B1rg0w0: [
|
69
|
+
"f18htlvq",
|
70
|
+
"f1gofhvl"
|
71
|
+
],
|
72
|
+
Bsg1tlv: "f6lmxco",
|
73
|
+
Brjw370: [
|
74
|
+
"fcoc0mf",
|
75
|
+
"f15r4wkl"
|
76
|
+
],
|
77
|
+
xcfy85: "f1ipdth8",
|
78
|
+
Bcc6kan: [
|
79
|
+
"f15r4wkl",
|
80
|
+
"fcoc0mf"
|
81
|
+
]
|
82
|
+
},
|
83
|
+
underline: {
|
84
|
+
B0qfbqy: "f1o236ok",
|
85
|
+
B4f6apu: [
|
86
|
+
"faeg28l",
|
87
|
+
"f64aojp"
|
88
|
+
],
|
89
|
+
y0oebl: "fdw6hkg",
|
90
|
+
uvfttm: [
|
91
|
+
"f64aojp",
|
92
|
+
"faeg28l"
|
93
|
+
],
|
94
|
+
Budzafs: [
|
95
|
+
"f1vk4jnx",
|
96
|
+
"f1v3v894"
|
97
|
+
],
|
98
|
+
r59vdv: [
|
99
|
+
"f1v3v894",
|
100
|
+
"f1vk4jnx"
|
101
|
+
],
|
102
|
+
n07z76: [
|
103
|
+
"fzi2j54",
|
104
|
+
"f1un0uoc"
|
105
|
+
],
|
106
|
+
ck0cow: [
|
107
|
+
"f1un0uoc",
|
108
|
+
"fzi2j54"
|
109
|
+
]
|
110
|
+
},
|
111
|
+
underlineInteractive: {
|
112
|
+
Bx11ytk: "ffcnd28",
|
113
|
+
xcfy85: "f1ipdth8",
|
114
|
+
B3778ie: [
|
115
|
+
"f9pmbr4",
|
116
|
+
"ffh3ws5"
|
117
|
+
],
|
118
|
+
d9w3h3: [
|
119
|
+
"ffh3ws5",
|
120
|
+
"f9pmbr4"
|
121
|
+
],
|
122
|
+
Bl18szs: [
|
123
|
+
"f19438ov",
|
124
|
+
"f1i9y5j"
|
125
|
+
],
|
126
|
+
B4j8arr: [
|
127
|
+
"f1i9y5j",
|
128
|
+
"f19438ov"
|
129
|
+
]
|
130
|
+
},
|
131
|
+
filled: {
|
132
|
+
B0qfbqy: "f1fjh9ub",
|
133
|
+
B4f6apu: [
|
134
|
+
"ff9c942",
|
135
|
+
"f6rdg5o"
|
136
|
+
],
|
137
|
+
y0oebl: "fdw6hkg",
|
138
|
+
uvfttm: [
|
139
|
+
"f6rdg5o",
|
140
|
+
"ff9c942"
|
141
|
+
],
|
142
|
+
Bdkvgpv: "f163fonl",
|
143
|
+
m598lv: [
|
144
|
+
"f1yq6w5o",
|
145
|
+
"f1jpmc5p"
|
146
|
+
],
|
147
|
+
qa3bma: "f11yjt3y",
|
148
|
+
Bbv0w2i: [
|
149
|
+
"f1jpmc5p",
|
150
|
+
"f1yq6w5o"
|
151
|
+
],
|
152
|
+
Bq4z7u6: "f7dgwnz",
|
153
|
+
Bk5zm6e: [
|
154
|
+
"f1edeodt",
|
155
|
+
"fszsv3f"
|
156
|
+
],
|
157
|
+
Bqjgrrk: "f1172wan",
|
158
|
+
Bm6vgfq: [
|
159
|
+
"fszsv3f",
|
160
|
+
"f1edeodt"
|
161
|
+
]
|
162
|
+
},
|
163
|
+
"filled-darker": {
|
164
|
+
De3pzq: "f16xq7d1"
|
165
|
+
},
|
166
|
+
"filled-lighter": {
|
167
|
+
De3pzq: "fxugw4r"
|
168
|
+
},
|
169
|
+
filledInteractive: {
|
170
|
+
B05mzqr: "f1xqt08",
|
171
|
+
tb9y6h: [
|
172
|
+
"fzt5lgo",
|
173
|
+
"f8tv3r9"
|
174
|
+
],
|
175
|
+
jcehpj: "fyhrops",
|
176
|
+
B23o0hn: [
|
177
|
+
"f8tv3r9",
|
178
|
+
"fzt5lgo"
|
179
|
+
]
|
180
|
+
},
|
181
|
+
invalid: {
|
182
|
+
emecyz: "fl48pg9",
|
183
|
+
lz0pba: [
|
184
|
+
"f1a168p3",
|
185
|
+
"f1pvdymy"
|
186
|
+
],
|
187
|
+
Bo1k74p: "f11knvgl",
|
188
|
+
Ba322q7: [
|
189
|
+
"f1pvdymy",
|
190
|
+
"f1a168p3"
|
191
|
+
]
|
192
|
+
},
|
193
|
+
disabled: {
|
194
|
+
Bceei9c: "fdrzuqr",
|
195
|
+
De3pzq: "f1c21dwh",
|
196
|
+
Bq4z7u6: "f1a0lfh7",
|
197
|
+
Bk5zm6e: [
|
198
|
+
"f1p2ejm6",
|
199
|
+
"fmzytvz"
|
200
|
+
],
|
201
|
+
Bqjgrrk: "fas2e61",
|
202
|
+
Bm6vgfq: [
|
203
|
+
"fmzytvz",
|
204
|
+
"f1p2ejm6"
|
205
|
+
],
|
206
|
+
Cffpyd: "flb8es4",
|
207
|
+
hxi8he: [
|
208
|
+
"f1lclws",
|
209
|
+
"frjp63v"
|
210
|
+
],
|
211
|
+
Bcuq369: "f1yv9wnt",
|
212
|
+
Imo2if: [
|
213
|
+
"frjp63v",
|
214
|
+
"f1lclws"
|
215
|
+
]
|
216
|
+
}
|
106
217
|
}, {
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
218
|
+
d: [
|
219
|
+
".f1pha7fy{min-height:24px;}",
|
220
|
+
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
221
|
+
".fy9rknc{font-size:var(--fontSizeBase200);}",
|
222
|
+
".figsok6{font-weight:var(--fontWeightRegular);}",
|
223
|
+
".fwrc4pm{line-height:var(--lineHeightBase200);}",
|
224
|
+
".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",
|
225
|
+
".f1vdfbxk{padding-right:var(--spacingHorizontalS);}",
|
226
|
+
".f1o236ok::before{border-top-width:0;}",
|
227
|
+
".faeg28l::before{border-right-width:0;}",
|
228
|
+
".f64aojp::before{border-left-width:0;}",
|
229
|
+
".fdw6hkg::before{border-bottom-width:1px;}",
|
230
|
+
".f1vk4jnx::before{border-bottom-right-radius:var(--borderRadiusNone);}",
|
231
|
+
".f1v3v894::before{border-bottom-left-radius:var(--borderRadiusNone);}",
|
232
|
+
".fzi2j54::before{border-top-right-radius:var(--borderRadiusNone);}",
|
233
|
+
".f1un0uoc::before{border-top-left-radius:var(--borderRadiusNone);}",
|
234
|
+
".f9pmbr4::after{border-bottom-right-radius:var(--borderRadiusNone);}",
|
235
|
+
".ffh3ws5::after{border-bottom-left-radius:var(--borderRadiusNone);}",
|
236
|
+
".f19438ov::after{border-top-right-radius:var(--borderRadiusNone);}",
|
237
|
+
".f1i9y5j::after{border-top-left-radius:var(--borderRadiusNone);}",
|
238
|
+
".f1fjh9ub::before{border-top-width:1px;}",
|
239
|
+
".ff9c942::before{border-right-width:1px;}",
|
240
|
+
".f6rdg5o::before{border-left-width:1px;}",
|
241
|
+
".f163fonl::before{border-top-style:solid;}",
|
242
|
+
".f1yq6w5o::before{border-right-style:solid;}",
|
243
|
+
".f1jpmc5p::before{border-left-style:solid;}",
|
244
|
+
".f11yjt3y::before{border-bottom-style:solid;}",
|
245
|
+
".f7dgwnz::before{border-top-color:var(--colorTransparentStroke);}",
|
246
|
+
".f1edeodt::before{border-right-color:var(--colorTransparentStroke);}",
|
247
|
+
".fszsv3f::before{border-left-color:var(--colorTransparentStroke);}",
|
248
|
+
".f1172wan::before{border-bottom-color:var(--colorTransparentStroke);}",
|
249
|
+
".f16xq7d1{background-color:var(--colorNeutralBackground3);}",
|
250
|
+
".fxugw4r{background-color:var(--colorNeutralBackground1);}",
|
251
|
+
".fl48pg9:not(:focus-within)::before,.fl48pg9:hover:not(:focus-within)::before{border-top-color:var(--colorPaletteRedBorder2);}",
|
252
|
+
".f1a168p3:not(:focus-within)::before,.f1a168p3:hover:not(:focus-within)::before{border-right-color:var(--colorPaletteRedBorder2);}",
|
253
|
+
".f1pvdymy:not(:focus-within)::before,.f1pvdymy:hover:not(:focus-within)::before{border-left-color:var(--colorPaletteRedBorder2);}",
|
254
|
+
".f11knvgl:not(:focus-within)::before,.f11knvgl:hover:not(:focus-within)::before{border-bottom-color:var(--colorPaletteRedBorder2);}",
|
255
|
+
".fdrzuqr{cursor:not-allowed;}",
|
256
|
+
".f1c21dwh{background-color:var(--colorTransparentBackground);}",
|
257
|
+
".f1a0lfh7::before{border-top-color:var(--colorNeutralStrokeDisabled);}",
|
258
|
+
".f1p2ejm6::before{border-right-color:var(--colorNeutralStrokeDisabled);}",
|
259
|
+
".fmzytvz::before{border-left-color:var(--colorNeutralStrokeDisabled);}",
|
260
|
+
".fas2e61::before{border-bottom-color:var(--colorNeutralStrokeDisabled);}"
|
261
|
+
],
|
262
|
+
h: [
|
263
|
+
".f1w2y1rc:hover::before{border-top-color:var(--colorNeutralStroke1Hover);}",
|
264
|
+
".f1gofhvl:hover::before{border-right-color:var(--colorNeutralStroke1Hover);}",
|
265
|
+
".f18htlvq:hover::before{border-left-color:var(--colorNeutralStroke1Hover);}",
|
266
|
+
".ffcnd28:hover::before{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}",
|
267
|
+
".f1xqt08:hover::before,.f1xqt08:focus-within::before{border-top-color:var(--colorTransparentStrokeInteractive);}",
|
268
|
+
".fzt5lgo:hover::before,.fzt5lgo:focus-within::before{border-right-color:var(--colorTransparentStrokeInteractive);}",
|
269
|
+
".f8tv3r9:hover::before,.f8tv3r9:focus-within::before{border-left-color:var(--colorTransparentStrokeInteractive);}",
|
270
|
+
".fyhrops:hover::before,.fyhrops:focus-within::before{border-bottom-color:var(--colorTransparentStrokeInteractive);}"
|
271
|
+
],
|
272
|
+
a: [
|
273
|
+
".f6lmxco:active::before,.f6lmxco:focus-within::before{border-top-color:var(--colorNeutralStroke1Pressed);}",
|
274
|
+
".fcoc0mf:active::before,.fcoc0mf:focus-within::before{border-right-color:var(--colorNeutralStroke1Pressed);}",
|
275
|
+
".f15r4wkl:active::before,.f15r4wkl:focus-within::before{border-left-color:var(--colorNeutralStroke1Pressed);}",
|
276
|
+
".f1ipdth8:active::before,.f1ipdth8:focus-within::before{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}"
|
277
|
+
],
|
278
|
+
m: [
|
279
|
+
[
|
280
|
+
"@media (forced-colors: active){.flb8es4::before{border-top-color:GrayText;}}",
|
281
|
+
{
|
282
|
+
m: "(forced-colors: active)"
|
283
|
+
}
|
284
|
+
],
|
285
|
+
[
|
286
|
+
"@media (forced-colors: active){.f1lclws::before{border-right-color:GrayText;}.frjp63v::before{border-left-color:GrayText;}}",
|
287
|
+
{
|
288
|
+
m: "(forced-colors: active)"
|
289
|
+
}
|
290
|
+
],
|
291
|
+
[
|
292
|
+
"@media (forced-colors: active){.f1yv9wnt::before{border-bottom-color:GrayText;}}",
|
293
|
+
{
|
294
|
+
m: "(forced-colors: active)"
|
295
|
+
}
|
296
|
+
],
|
297
|
+
[
|
298
|
+
"@media (forced-colors: active){.frjp63v::before{border-left-color:GrayText;}.f1lclws::before{border-right-color:GrayText;}}",
|
299
|
+
{
|
300
|
+
m: "(forced-colors: active)"
|
301
|
+
}
|
302
|
+
]
|
303
|
+
]
|
119
304
|
});
|
120
|
-
const useInputClassName = /*#__PURE__*/
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
305
|
+
const useInputClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("rekhnij", null, [
|
306
|
+
".rekhnij{grid-column-start:1;grid-column-end:2;grid-row-start:1;grid-row-end:3;outline-style:none;border:0;padding:0;color:var(--colorNeutralForeground1);background-color:transparent;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;}",
|
307
|
+
".rekhnij::-webkit-input-placeholder{color:var(--colorNeutralForeground4);opacity:1;}",
|
308
|
+
".rekhnij::-moz-placeholder{color:var(--colorNeutralForeground4);opacity:1;}",
|
309
|
+
".rekhnij:-ms-input-placeholder{color:var(--colorNeutralForeground4);opacity:1;}",
|
310
|
+
".rekhnij::placeholder{color:var(--colorNeutralForeground4);opacity:1;}"
|
311
|
+
]);
|
312
|
+
const useInputStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
313
|
+
disabled: {
|
314
|
+
sj55zd: "f1s2aq7o",
|
315
|
+
Bceei9c: "fdrzuqr",
|
316
|
+
De3pzq: "f1c21dwh",
|
317
|
+
yvdlaj: "fahhnxm"
|
318
|
+
}
|
128
319
|
}, {
|
129
|
-
|
320
|
+
d: [
|
321
|
+
".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",
|
322
|
+
".fdrzuqr{cursor:not-allowed;}",
|
323
|
+
".f1c21dwh{background-color:var(--colorTransparentBackground);}",
|
324
|
+
".fahhnxm::-webkit-input-placeholder{color:var(--colorNeutralForegroundDisabled);}",
|
325
|
+
".fahhnxm::-moz-placeholder{color:var(--colorNeutralForegroundDisabled);}"
|
326
|
+
]
|
130
327
|
});
|
131
|
-
const useBaseButtonClassName = /*#__PURE__*/
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
328
|
+
const useBaseButtonClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("r1g4chgs", null, [
|
329
|
+
".r1g4chgs{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:24px;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;border:0;position:absolute;outline-style:none;height:16px;background-color:transparent;color:var(--colorNeutralForeground3);grid-column-start:2;border-radius:0;padding:0 5px 0 5px;}",
|
330
|
+
".r1g4chgs:active{outline-style:none;}",
|
331
|
+
".r1g4chgs:enabled:hover{cursor:pointer;color:var(--colorNeutralForeground3Hover);background-color:var(--colorSubtleBackgroundHover);}",
|
332
|
+
".r1g4chgs:enabled:active{color:var(--colorNeutralForeground3Pressed);background-color:var(--colorSubtleBackgroundPressed);}",
|
333
|
+
".r1g4chgs:enabled.fui-SpinButton__button_active{color:var(--colorNeutralForeground3Pressed);background-color:var(--colorSubtleBackgroundPressed);}",
|
334
|
+
".r1g4chgs:disabled{cursor:not-allowed;color:var(--colorNeutralForegroundDisabled);}"
|
335
|
+
]);
|
336
|
+
const useButtonStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
337
|
+
increment: {
|
338
|
+
Ijaq50: "f16hsg94",
|
339
|
+
B7oj6ja: [
|
340
|
+
"f1jar5jt",
|
341
|
+
"fyu767a"
|
342
|
+
],
|
343
|
+
z8tnut: "f10ra9hq",
|
344
|
+
Byoj8tv: "f1brlhvm"
|
345
|
+
},
|
346
|
+
decrement: {
|
347
|
+
Ijaq50: "faunodf",
|
348
|
+
Bbmb7ep: [
|
349
|
+
"f1aa9q02",
|
350
|
+
"f16jpd5f"
|
351
|
+
],
|
352
|
+
z8tnut: "f1sl3k7w",
|
353
|
+
Byoj8tv: "f1y2xyjm"
|
354
|
+
},
|
355
|
+
incrementButtonSmall: {
|
356
|
+
z8tnut: "f1khb0e9",
|
357
|
+
z189sj: [
|
358
|
+
"f1sgzk6v",
|
359
|
+
"f1bg5zqg"
|
360
|
+
],
|
361
|
+
Byoj8tv: "f1ov4xf1",
|
362
|
+
uwmqm3: [
|
363
|
+
"fycuoez",
|
364
|
+
"f8wuabp"
|
365
|
+
],
|
366
|
+
Bqenvij: "fvblgha"
|
367
|
+
},
|
368
|
+
decrementButtonSmall: {
|
369
|
+
z8tnut: "f1nbblvp",
|
370
|
+
z189sj: [
|
371
|
+
"f1sgzk6v",
|
372
|
+
"f1bg5zqg"
|
373
|
+
],
|
374
|
+
Byoj8tv: "f1jnq6q7",
|
375
|
+
uwmqm3: [
|
376
|
+
"fycuoez",
|
377
|
+
"f8wuabp"
|
378
|
+
],
|
379
|
+
Bqenvij: "fvblgha"
|
380
|
+
},
|
381
|
+
outline: {},
|
382
|
+
underline: {
|
383
|
+
De3pzq: "f3rmtva",
|
384
|
+
sj55zd: "f11d4kpn",
|
385
|
+
r4wkhp: "f1no7wuu",
|
386
|
+
B95qlz1: "f1bifk9c",
|
387
|
+
p743kt: "fp1zg4s",
|
388
|
+
B7xitij: "fo6hitd",
|
389
|
+
B6siaa6: "f1wiab75",
|
390
|
+
Ba9qmo4: "fj9zm5z",
|
391
|
+
Dyrjrp: "f1cqwcg4"
|
392
|
+
},
|
393
|
+
"filled-darker": {
|
394
|
+
De3pzq: "f3rmtva",
|
395
|
+
sj55zd: "f11d4kpn",
|
396
|
+
r4wkhp: "f1no7wuu",
|
397
|
+
B95qlz1: "fwwxidx",
|
398
|
+
p743kt: "fp1zg4s",
|
399
|
+
B7xitij: "f14i52sd",
|
400
|
+
B6siaa6: "f1wiab75",
|
401
|
+
Ba9qmo4: "fwry2ka",
|
402
|
+
Dyrjrp: "f1cqwcg4"
|
403
|
+
},
|
404
|
+
"filled-lighter": {
|
405
|
+
De3pzq: "f3rmtva",
|
406
|
+
sj55zd: "f11d4kpn",
|
407
|
+
r4wkhp: "f1no7wuu",
|
408
|
+
B95qlz1: "f1yywxnv",
|
409
|
+
drw0cw: "fzaa11h",
|
410
|
+
idzz8t: "f4fpmm9",
|
411
|
+
Dyrjrp: "f1cqwcg4"
|
412
|
+
}
|
191
413
|
}, {
|
192
|
-
|
414
|
+
d: [
|
415
|
+
".f16hsg94{grid-row-start:1;}",
|
416
|
+
".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",
|
417
|
+
".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",
|
418
|
+
".f10ra9hq{padding-top:4px;}",
|
419
|
+
".f1brlhvm{padding-bottom:1px;}",
|
420
|
+
".faunodf{grid-row-start:2;}",
|
421
|
+
".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",
|
422
|
+
".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",
|
423
|
+
".f1sl3k7w{padding-top:1px;}",
|
424
|
+
".f1y2xyjm{padding-bottom:4px;}",
|
425
|
+
".f1khb0e9{padding-top:3px;}",
|
426
|
+
".f1sgzk6v{padding-right:6px;}",
|
427
|
+
".f1bg5zqg{padding-left:6px;}",
|
428
|
+
".f1ov4xf1{padding-bottom:0px;}",
|
429
|
+
".fycuoez{padding-left:4px;}",
|
430
|
+
".f8wuabp{padding-right:4px;}",
|
431
|
+
".fvblgha{height:12px;}",
|
432
|
+
".f1nbblvp{padding-top:0px;}",
|
433
|
+
".f1jnq6q7{padding-bottom:3px;}",
|
434
|
+
".f3rmtva{background-color:transparent;}",
|
435
|
+
".f11d4kpn{color:var(--colorNeutralForeground3);}",
|
436
|
+
".f1no7wuu:enabled:hover{color:var(--colorNeutralForeground3Hover);}",
|
437
|
+
".f1bifk9c:enabled:hover{background-color:var(--colorSubtleBackgroundHover);}",
|
438
|
+
".fp1zg4s:enabled:active{color:var(--colorNeutralForeground3Pressed);}",
|
439
|
+
".fo6hitd:enabled:active{background-color:var(--colorSubtleBackgroundPressed);}",
|
440
|
+
".f1wiab75:enabled.fui-SpinButton__button_active{color:var(--colorNeutralForeground3Pressed);}",
|
441
|
+
".fj9zm5z:enabled.fui-SpinButton__button_active{background-color:var(--colorSubtleBackgroundPressed);}",
|
442
|
+
".f1cqwcg4:disabled{color:var(--colorNeutralForegroundDisabled);}",
|
443
|
+
".fwwxidx:enabled:hover{background-color:var(--colorNeutralBackground3Hover);}",
|
444
|
+
".f14i52sd:enabled:active{background-color:var(--colorNeutralBackground3Pressed);}",
|
445
|
+
".fwry2ka:enabled.fui-SpinButton__button_active{background-color:var(--colorNeutralBackground3Pressed);}",
|
446
|
+
".f1yywxnv:enabled:hover{background-color:var(--colorNeutralBackground1Hover);}",
|
447
|
+
".fzaa11h:enabled:active,.fzaa11h:enabled.fui-SpinButton__button_active{color:var(--colorNeutralForeground3Pressed);}",
|
448
|
+
".f4fpmm9:enabled:active,.f4fpmm9:enabled.fui-SpinButton__button_active{background-color:var(--colorNeutralBackground1Pressed);}"
|
449
|
+
]
|
193
450
|
});
|
194
451
|
// Cannot just disable button as they need to remain
|
195
452
|
// exposed to ATs like screen readers.
|
196
|
-
const useButtonDisabledStyles = /*#__PURE__*/
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
453
|
+
const useButtonDisabledStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
454
|
+
base: {
|
455
|
+
Bceei9c: "fdrzuqr",
|
456
|
+
eoavqd: "fphbwmw"
|
457
|
+
},
|
458
|
+
outline: {
|
459
|
+
sj55zd: "f1s2aq7o",
|
460
|
+
r4wkhp: "few7wvn",
|
461
|
+
B95qlz1: "f110wuh6",
|
462
|
+
p743kt: "f9s4mys",
|
463
|
+
B7xitij: "f10404rc",
|
464
|
+
B6siaa6: "fwzu9cz",
|
465
|
+
Ba9qmo4: "f1snwkb6"
|
466
|
+
},
|
467
|
+
underline: {
|
468
|
+
sj55zd: "f1s2aq7o",
|
469
|
+
r4wkhp: "few7wvn",
|
470
|
+
B95qlz1: "f110wuh6",
|
471
|
+
p743kt: "f9s4mys",
|
472
|
+
B7xitij: "f10404rc",
|
473
|
+
B6siaa6: "fwzu9cz",
|
474
|
+
Ba9qmo4: "f1snwkb6"
|
475
|
+
},
|
476
|
+
"filled-darker": {
|
477
|
+
sj55zd: "f1s2aq7o",
|
478
|
+
r4wkhp: "few7wvn",
|
479
|
+
B95qlz1: "f110wuh6",
|
480
|
+
p743kt: "f9s4mys",
|
481
|
+
B7xitij: "f10404rc",
|
482
|
+
B6siaa6: "fwzu9cz",
|
483
|
+
Ba9qmo4: "f1snwkb6"
|
484
|
+
},
|
485
|
+
"filled-lighter": {
|
486
|
+
sj55zd: "f1s2aq7o",
|
487
|
+
r4wkhp: "few7wvn",
|
488
|
+
B95qlz1: "f110wuh6",
|
489
|
+
p743kt: "f9s4mys",
|
490
|
+
B7xitij: "f10404rc",
|
491
|
+
B6siaa6: "fwzu9cz",
|
492
|
+
Ba9qmo4: "f1snwkb6"
|
493
|
+
}
|
237
494
|
}, {
|
238
|
-
|
239
|
-
|
495
|
+
d: [
|
496
|
+
".fdrzuqr{cursor:not-allowed;}",
|
497
|
+
".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",
|
498
|
+
".few7wvn:enabled:hover{color:var(--colorNeutralForegroundDisabled);}",
|
499
|
+
".f110wuh6:enabled:hover{background-color:transparent;}",
|
500
|
+
".f9s4mys:enabled:active{color:var(--colorNeutralForegroundDisabled);}",
|
501
|
+
".f10404rc:enabled:active{background-color:transparent;}",
|
502
|
+
".fwzu9cz:enabled.fui-SpinButton__button_active{color:var(--colorNeutralForegroundDisabled);}",
|
503
|
+
".f1snwkb6:enabled.fui-SpinButton__button_active{background-color:transparent;}"
|
504
|
+
],
|
505
|
+
h: [
|
506
|
+
".fphbwmw:hover{cursor:not-allowed;}"
|
507
|
+
]
|
240
508
|
});
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
const
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
const inputStyles = useInputStyles();
|
258
|
-
state.root.className = react_1.mergeClasses(exports.spinButtonClassNames.root, useRootClassName(), rootStyles[size], rootStyles[appearance], filled && rootStyles.filled, !disabled && appearance === 'outline' && rootStyles.outlineInteractive, !disabled && appearance === 'underline' && rootStyles.underlineInteractive, !disabled && filled && rootStyles.filledInteractive, !disabled && invalid && rootStyles.invalid, disabled && rootStyles.disabled, state.root.className);
|
259
|
-
state.incrementButton.className = react_1.mergeClasses(exports.spinButtonClassNames.incrementButton, spinState === 'up' && `${spinButtonExtraClassNames.buttonActive}`, useBaseButtonClassName(), buttonStyles.increment, buttonStyles[appearance], size === 'small' && buttonStyles.incrementButtonSmall, (atBound === 'max' || atBound === 'both') && buttonDisabledStyles.base, (atBound === 'max' || atBound === 'both') && buttonDisabledStyles[appearance], state.incrementButton.className);
|
260
|
-
state.decrementButton.className = react_1.mergeClasses(exports.spinButtonClassNames.decrementButton, spinState === 'down' && `${spinButtonExtraClassNames.buttonActive}`, useBaseButtonClassName(), buttonStyles.decrement, buttonStyles[appearance], size === 'small' && buttonStyles.decrementButtonSmall, (atBound === 'min' || atBound === 'both') && buttonDisabledStyles.base, (atBound === 'min' || atBound === 'both') && buttonDisabledStyles[appearance], state.decrementButton.className);
|
261
|
-
state.input.className = react_1.mergeClasses(exports.spinButtonClassNames.input, useInputClassName(), disabled && inputStyles.disabled, state.input.className);
|
262
|
-
return state;
|
263
|
-
};
|
264
|
-
exports.useSpinButtonStyles_unstable = useSpinButtonStyles_unstable;
|
509
|
+
const useSpinButtonStyles_unstable = (state)=>{
|
510
|
+
const { appearance , atBound , spinState , size } = state;
|
511
|
+
const disabled = state.input.disabled;
|
512
|
+
const invalid = `${state.input['aria-invalid']}` === 'true';
|
513
|
+
const filled = appearance.startsWith('filled');
|
514
|
+
const rootStyles = useRootStyles();
|
515
|
+
const buttonStyles = useButtonStyles();
|
516
|
+
const buttonDisabledStyles = useButtonDisabledStyles();
|
517
|
+
const inputStyles = useInputStyles();
|
518
|
+
state.root.className = (0, _react.mergeClasses)(spinButtonClassNames.root, useRootClassName(), rootStyles[size], rootStyles[appearance], filled && rootStyles.filled, !disabled && appearance === 'outline' && rootStyles.outlineInteractive, !disabled && appearance === 'underline' && rootStyles.underlineInteractive, !disabled && filled && rootStyles.filledInteractive, !disabled && invalid && rootStyles.invalid, disabled && rootStyles.disabled, state.root.className);
|
519
|
+
state.incrementButton.className = (0, _react.mergeClasses)(spinButtonClassNames.incrementButton, spinState === 'up' && `${spinButtonExtraClassNames.buttonActive}`, useBaseButtonClassName(), buttonStyles.increment, buttonStyles[appearance], size === 'small' && buttonStyles.incrementButtonSmall, (atBound === 'max' || atBound === 'both') && buttonDisabledStyles.base, (atBound === 'max' || atBound === 'both') && buttonDisabledStyles[appearance], state.incrementButton.className);
|
520
|
+
state.decrementButton.className = (0, _react.mergeClasses)(spinButtonClassNames.decrementButton, spinState === 'down' && `${spinButtonExtraClassNames.buttonActive}`, useBaseButtonClassName(), buttonStyles.decrement, buttonStyles[appearance], size === 'small' && buttonStyles.decrementButtonSmall, (atBound === 'min' || atBound === 'both') && buttonDisabledStyles.base, (atBound === 'min' || atBound === 'both') && buttonDisabledStyles[appearance], state.decrementButton.className);
|
521
|
+
state.input.className = (0, _react.mergeClasses)(spinButtonClassNames.input, useInputClassName(), disabled && inputStyles.disabled, state.input.className);
|
522
|
+
return state;
|
523
|
+
}; //# sourceMappingURL=useSpinButtonStyles.js.map
|
524
|
+
|
265
525
|
//# sourceMappingURL=useSpinButtonStyles.js.map
|