@fluentui/react-spinbutton 9.2.31 → 9.2.33
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +85 -1
- package/CHANGELOG.md +29 -2
- package/lib/components/SpinButton/SpinButton.js.map +1 -1
- package/lib/components/SpinButton/renderSpinButton.js +8 -2
- package/lib/components/SpinButton/renderSpinButton.js.map +1 -1
- package/lib/components/SpinButton/useSpinButton.js +3 -2
- package/lib/components/SpinButton/useSpinButton.js.map +1 -1
- package/lib/components/SpinButton/useSpinButtonStyles.styles.js.map +1 -1
- package/lib/utils/clamp.js.map +1 -1
- package/lib/utils/getBound.js.map +1 -1
- package/lib/utils/precision.js.map +1 -1
- package/lib-commonjs/SpinButton.js +2 -2
- package/lib-commonjs/SpinButton.js.map +1 -1
- package/lib-commonjs/components/SpinButton/SpinButton.js +9 -7
- package/lib-commonjs/components/SpinButton/SpinButton.js.map +1 -1
- package/lib-commonjs/components/SpinButton/SpinButton.types.js +2 -2
- package/lib-commonjs/components/SpinButton/SpinButton.types.js.map +1 -1
- package/lib-commonjs/components/SpinButton/index.js +6 -6
- package/lib-commonjs/components/SpinButton/index.js.map +1 -1
- package/lib-commonjs/components/SpinButton/renderSpinButton.js +14 -6
- package/lib-commonjs/components/SpinButton/renderSpinButton.js.map +1 -1
- package/lib-commonjs/components/SpinButton/useSpinButton.js +42 -39
- package/lib-commonjs/components/SpinButton/useSpinButton.js.map +1 -1
- package/lib-commonjs/components/SpinButton/useSpinButtonStyles.styles.js +14 -10
- package/lib-commonjs/components/SpinButton/useSpinButtonStyles.styles.js.map +1 -1
- package/lib-commonjs/index.js +16 -6
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/clamp.js +3 -1
- package/lib-commonjs/utils/clamp.js.map +1 -1
- package/lib-commonjs/utils/getBound.js +3 -1
- package/lib-commonjs/utils/getBound.js.map +1 -1
- package/lib-commonjs/utils/index.js +4 -4
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/precision.js +6 -2
- package/lib-commonjs/utils/precision.js.map +1 -1
- package/package.json +12 -12
@@ -4,16 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "useSpinButton_unstable", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return useSpinButton_unstable;
|
9
|
+
}
|
8
10
|
});
|
9
|
-
const
|
10
|
-
const _react = /*#__PURE__*/
|
11
|
-
const
|
12
|
-
const
|
13
|
-
const
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
13
|
+
const _reactfield = require("@fluentui/react-field");
|
14
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
15
|
+
const _keyboardkeys = require("@fluentui/keyboard-keys");
|
14
16
|
const _index = require("../../utils/index");
|
15
|
-
const
|
16
|
-
const
|
17
|
+
const _reacticons = require("@fluentui/react-icons");
|
18
|
+
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
17
19
|
const DEFAULT_SPIN_DELAY_MS = 150;
|
18
20
|
const MIN_SPIN_DELAY_MS = 80;
|
19
21
|
const MAX_SPIN_TIME_MS = 1000;
|
@@ -23,11 +25,11 @@ const MAX_SPIN_TIME_MS = 1000;
|
|
23
25
|
const lerp = (start, end, percent)=>start + (end - start) * percent;
|
24
26
|
const useSpinButton_unstable = (props, ref)=>{
|
25
27
|
// Merge props from surrounding <Field>, if any
|
26
|
-
props = (0,
|
28
|
+
props = (0, _reactfield.useFieldControlProps_unstable)(props, {
|
27
29
|
supportsLabelFor: true,
|
28
30
|
supportsRequired: true
|
29
31
|
});
|
30
|
-
const nativeProps = (0,
|
32
|
+
const nativeProps = (0, _reactutilities.getPartitionedNativeProps)({
|
31
33
|
props,
|
32
34
|
primarySlotTagName: 'input',
|
33
35
|
excludedPropNames: [
|
@@ -39,16 +41,16 @@ const useSpinButton_unstable = (props, ref)=>{
|
|
39
41
|
'value'
|
40
42
|
]
|
41
43
|
});
|
42
|
-
const overrides = (0,
|
44
|
+
const overrides = (0, _reactsharedcontexts.useOverrides_unstable)();
|
43
45
|
var _overrides_inputDefaultAppearance;
|
44
|
-
const { value
|
46
|
+
const { value, displayValue, defaultValue, min, max, step = 1, stepPage = 1, precision: precisionFromProps, onChange, size = 'medium', appearance = (_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline', root, input, incrementButton, decrementButton } = props;
|
45
47
|
const precision = _react.useMemo(()=>{
|
46
48
|
return precisionFromProps !== null && precisionFromProps !== void 0 ? precisionFromProps : Math.max((0, _index.calculatePrecision)(step), 0);
|
47
49
|
}, [
|
48
50
|
precisionFromProps,
|
49
51
|
step
|
50
52
|
]);
|
51
|
-
const [currentValue, setCurrentValue] = (0,
|
53
|
+
const [currentValue, setCurrentValue] = (0, _reactutilities.useControllableState)({
|
52
54
|
state: value,
|
53
55
|
defaultState: defaultValue,
|
54
56
|
initialState: 0
|
@@ -63,7 +65,7 @@ const useSpinButton_unstable = (props, ref)=>{
|
|
63
65
|
spinDelay: DEFAULT_SPIN_DELAY_MS,
|
64
66
|
atBound: currentValue !== null ? (0, _index.getBound)((0, _index.precisionRound)(currentValue, precision), min, max) : 'none'
|
65
67
|
});
|
66
|
-
const [setStepTimeout, clearStepTimeout] = (0,
|
68
|
+
const [setStepTimeout, clearStepTimeout] = (0, _reactutilities.useTimeout)();
|
67
69
|
const stepValue = (e, direction, startFrom)=>{
|
68
70
|
let startValue = internalState.current.value;
|
69
71
|
if (startFrom) {
|
@@ -122,30 +124,30 @@ const useSpinButton_unstable = (props, ref)=>{
|
|
122
124
|
};
|
123
125
|
const handleKeyDown = (e)=>{
|
124
126
|
let nextKeyboardSpinState = 'rest';
|
125
|
-
if (e.key ===
|
127
|
+
if (e.key === _keyboardkeys.ArrowUp) {
|
126
128
|
stepValue(e, 'up', textValue);
|
127
129
|
nextKeyboardSpinState = 'up';
|
128
|
-
} else if (e.key ===
|
130
|
+
} else if (e.key === _keyboardkeys.ArrowDown) {
|
129
131
|
stepValue(e, 'down', textValue);
|
130
132
|
nextKeyboardSpinState = 'down';
|
131
|
-
} else if (e.key ===
|
133
|
+
} else if (e.key === _keyboardkeys.PageUp) {
|
132
134
|
e.preventDefault();
|
133
135
|
stepValue(e, 'upPage', textValue);
|
134
136
|
nextKeyboardSpinState = 'up';
|
135
|
-
} else if (e.key ===
|
137
|
+
} else if (e.key === _keyboardkeys.PageDown) {
|
136
138
|
e.preventDefault();
|
137
139
|
stepValue(e, 'downPage', textValue);
|
138
140
|
nextKeyboardSpinState = 'down';
|
139
|
-
} else if (!e.shiftKey && e.key ===
|
141
|
+
} else if (!e.shiftKey && e.key === _keyboardkeys.Home && min !== undefined) {
|
140
142
|
commit(e, min);
|
141
143
|
nextKeyboardSpinState = 'down';
|
142
|
-
} else if (!e.shiftKey && e.key ===
|
144
|
+
} else if (!e.shiftKey && e.key === _keyboardkeys.End && max !== undefined) {
|
143
145
|
commit(e, max);
|
144
146
|
nextKeyboardSpinState = 'up';
|
145
|
-
} else if (e.key ===
|
147
|
+
} else if (e.key === _keyboardkeys.Enter) {
|
146
148
|
commit(e, currentValue, textValue);
|
147
149
|
internalState.current.previousTextValue = undefined;
|
148
|
-
} else if (e.key ===
|
150
|
+
} else if (e.key === _keyboardkeys.Escape) {
|
149
151
|
if (internalState.current.previousTextValue) {
|
150
152
|
setTextValue(undefined);
|
151
153
|
internalState.current.previousTextValue = undefined;
|
@@ -175,7 +177,8 @@ const useSpinButton_unstable = (props, ref)=>{
|
|
175
177
|
}
|
176
178
|
}
|
177
179
|
if (valueChanged || displayValueChanged) {
|
178
|
-
|
180
|
+
var _onChange;
|
181
|
+
(_onChange = onChange) === null || _onChange === void 0 ? void 0 : _onChange(e, {
|
179
182
|
value: roundedValue,
|
180
183
|
displayValue: newDisplayValue
|
181
184
|
});
|
@@ -193,11 +196,11 @@ const useSpinButton_unstable = (props, ref)=>{
|
|
193
196
|
incrementButton: 'button',
|
194
197
|
decrementButton: 'button'
|
195
198
|
},
|
196
|
-
root:
|
199
|
+
root: _reactutilities.slot.always(root, {
|
197
200
|
defaultProps: nativeProps.root,
|
198
201
|
elementType: 'span'
|
199
202
|
}),
|
200
|
-
input:
|
203
|
+
input: _reactutilities.slot.always(input, {
|
201
204
|
defaultProps: {
|
202
205
|
ref,
|
203
206
|
autoComplete: 'off',
|
@@ -208,20 +211,20 @@ const useSpinButton_unstable = (props, ref)=>{
|
|
208
211
|
},
|
209
212
|
elementType: 'input'
|
210
213
|
}),
|
211
|
-
incrementButton:
|
214
|
+
incrementButton: _reactutilities.slot.always(incrementButton, {
|
212
215
|
defaultProps: {
|
213
216
|
tabIndex: -1,
|
214
|
-
children: /*#__PURE__*/ _react.createElement(
|
217
|
+
children: /*#__PURE__*/ _react.createElement(_reacticons.ChevronUp16Regular, null),
|
215
218
|
disabled: nativeProps.primary.disabled,
|
216
219
|
'aria-label': 'Increment value',
|
217
220
|
type: 'button'
|
218
221
|
},
|
219
222
|
elementType: 'button'
|
220
223
|
}),
|
221
|
-
decrementButton:
|
224
|
+
decrementButton: _reactutilities.slot.always(decrementButton, {
|
222
225
|
defaultProps: {
|
223
226
|
tabIndex: -1,
|
224
|
-
children: /*#__PURE__*/ _react.createElement(
|
227
|
+
children: /*#__PURE__*/ _react.createElement(_reacticons.ChevronDown16Regular, null),
|
225
228
|
disabled: nativeProps.primary.disabled,
|
226
229
|
'aria-label': 'Decrement value',
|
227
230
|
type: 'button'
|
@@ -252,15 +255,15 @@ const useSpinButton_unstable = (props, ref)=>{
|
|
252
255
|
state.input['aria-valuenow'] = currentValue !== null && currentValue !== void 0 ? currentValue : undefined;
|
253
256
|
var _state_input_ariavaluetext;
|
254
257
|
state.input['aria-valuetext'] = (_state_input_ariavaluetext = state.input['aria-valuetext']) !== null && _state_input_ariavaluetext !== void 0 ? _state_input_ariavaluetext : value !== undefined && displayValue || undefined;
|
255
|
-
state.input.onChange = (0,
|
256
|
-
state.input.onBlur = (0,
|
257
|
-
state.input.onKeyDown = (0,
|
258
|
-
state.input.onKeyUp = (0,
|
259
|
-
state.incrementButton.onMouseDown = (0,
|
260
|
-
state.incrementButton.onMouseUp = (0,
|
261
|
-
state.incrementButton.onMouseLeave = (0,
|
262
|
-
state.decrementButton.onMouseDown = (0,
|
263
|
-
state.decrementButton.onMouseUp = (0,
|
264
|
-
state.decrementButton.onMouseLeave = (0,
|
258
|
+
state.input.onChange = (0, _reactutilities.mergeCallbacks)(state.input.onChange, handleInputChange);
|
259
|
+
state.input.onBlur = (0, _reactutilities.mergeCallbacks)(state.input.onBlur, handleBlur);
|
260
|
+
state.input.onKeyDown = (0, _reactutilities.mergeCallbacks)(state.input.onKeyDown, handleKeyDown);
|
261
|
+
state.input.onKeyUp = (0, _reactutilities.mergeCallbacks)(state.input.onKeyUp, handleKeyUp);
|
262
|
+
state.incrementButton.onMouseDown = (0, _reactutilities.mergeCallbacks)(handleIncrementMouseDown, state.incrementButton.onMouseDown);
|
263
|
+
state.incrementButton.onMouseUp = (0, _reactutilities.mergeCallbacks)(state.incrementButton.onMouseUp, handleStepMouseUpOrLeave);
|
264
|
+
state.incrementButton.onMouseLeave = (0, _reactutilities.mergeCallbacks)(state.incrementButton.onMouseLeave, handleStepMouseUpOrLeave);
|
265
|
+
state.decrementButton.onMouseDown = (0, _reactutilities.mergeCallbacks)(handleDecrementMouseDown, state.decrementButton.onMouseDown);
|
266
|
+
state.decrementButton.onMouseUp = (0, _reactutilities.mergeCallbacks)(state.decrementButton.onMouseUp, handleStepMouseUpOrLeave);
|
267
|
+
state.decrementButton.onMouseLeave = (0, _reactutilities.mergeCallbacks)(state.decrementButton.onMouseLeave, handleStepMouseUpOrLeave);
|
265
268
|
return state;
|
266
269
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useSpinButton.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, mergeCallbacks, useControllableState, useTimeout, slot } from '@fluentui/react-utilities';\nimport { ArrowUp, ArrowDown, End, Enter, Escape, Home, PageDown, PageUp } from '@fluentui/keyboard-keys';\nimport { calculatePrecision, precisionRound, getBound, clamp } from '../../utils/index';\nimport { ChevronUp16Regular, ChevronDown16Regular } from '@fluentui/react-icons';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\nconst DEFAULT_SPIN_DELAY_MS = 150;\nconst MIN_SPIN_DELAY_MS = 80;\nconst MAX_SPIN_TIME_MS = 1000;\n// This is here to give an ease for the mouse held down case.\n// Exact easing it to be defined. Once it is we'll likely\n// pull this out into a util function in the SpinButton package.\nconst lerp = (start, end, percent)=>start + (end - start) * percent;\n/**\n * Create the state required to render SpinButton.\n *\n * The returned state can be modified with hooks such as useSpinButtonStyles_unstable,\n * before being passed to renderSpinButton_unstable.\n *\n * @param props - props from this instance of SpinButton\n * @param ref - reference to root HTMLElement of SpinButton\n */ export const useSpinButton_unstable = (props, ref)=>{\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, {\n supportsLabelFor: true,\n supportsRequired: true\n });\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: [\n 'defaultValue',\n 'max',\n 'min',\n 'onChange',\n 'size',\n 'value'\n ]\n });\n const overrides = useOverrides();\n var _overrides_inputDefaultAppearance;\n const { value , displayValue , defaultValue , min , max , step =1 , stepPage =1 , precision: precisionFromProps , onChange , size ='medium' , appearance =(_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline' , root , input , incrementButton , decrementButton } = props;\n const precision = React.useMemo(()=>{\n return precisionFromProps !== null && precisionFromProps !== void 0 ? precisionFromProps : Math.max(calculatePrecision(step), 0);\n }, [\n precisionFromProps,\n step\n ]);\n const [currentValue, setCurrentValue] = useControllableState({\n state: value,\n defaultState: defaultValue,\n initialState: 0\n });\n const isControlled = value !== undefined;\n const [textValue, setTextValue] = React.useState(undefined);\n const [keyboardSpinState, setKeyboardSpinState] = React.useState('rest');\n const internalState = React.useRef({\n value: currentValue,\n spinState: 'rest',\n spinTime: 0,\n spinDelay: DEFAULT_SPIN_DELAY_MS,\n atBound: currentValue !== null ? getBound(precisionRound(currentValue, precision), min, max) : 'none'\n });\n const [setStepTimeout, clearStepTimeout] = useTimeout();\n const stepValue = (e, direction, startFrom)=>{\n let startValue = internalState.current.value;\n if (startFrom) {\n const num = parseFloat(startFrom);\n if (!isNaN(num)) {\n startValue = num;\n }\n }\n const val = startValue;\n const dir = direction === 'up' || direction === 'upPage' ? 1 : -1;\n const stepSize = direction === 'upPage' || direction === 'downPage' ? stepPage : step;\n if (val === null) {\n const stepStart = min === undefined ? 0 : min;\n const nullStep = clamp(stepStart + stepSize * dir, min, max);\n commit(e, nullStep);\n return;\n }\n let newValue = val + stepSize * dir;\n if (!Number.isNaN(newValue)) {\n newValue = clamp(newValue, min, max);\n }\n commit(e, newValue);\n if (internalState.current.spinState !== 'rest') {\n setStepTimeout(()=>{\n // Ease the step speed a bit\n internalState.current.spinTime += internalState.current.spinDelay;\n internalState.current.spinDelay = lerp(DEFAULT_SPIN_DELAY_MS, MIN_SPIN_DELAY_MS, internalState.current.spinTime / MAX_SPIN_TIME_MS);\n stepValue(e, direction);\n }, internalState.current.spinDelay);\n }\n };\n const handleInputChange = (e)=>{\n if (!internalState.current.previousTextValue) {\n internalState.current.previousTextValue = textValue !== null && textValue !== void 0 ? textValue : String(currentValue);\n }\n const newValue = e.target.value;\n setTextValue(newValue);\n };\n const handleIncrementMouseDown = (e)=>{\n internalState.current.spinState = 'up';\n stepValue(e, 'up');\n };\n const handleDecrementMouseDown = (e)=>{\n internalState.current.spinState = 'down';\n stepValue(e, 'down');\n };\n const handleStepMouseUpOrLeave = (e)=>{\n clearStepTimeout();\n internalState.current.spinState = 'rest';\n internalState.current.spinDelay = DEFAULT_SPIN_DELAY_MS;\n internalState.current.spinTime = 0;\n };\n const handleBlur = (e)=>{\n commit(e, currentValue, textValue);\n internalState.current.previousTextValue = undefined;\n };\n const handleKeyDown = (e)=>{\n let nextKeyboardSpinState = 'rest';\n if (e.key === ArrowUp) {\n stepValue(e, 'up', textValue);\n nextKeyboardSpinState = 'up';\n } else if (e.key === ArrowDown) {\n stepValue(e, 'down', textValue);\n nextKeyboardSpinState = 'down';\n } else if (e.key === PageUp) {\n e.preventDefault();\n stepValue(e, 'upPage', textValue);\n nextKeyboardSpinState = 'up';\n } else if (e.key === PageDown) {\n e.preventDefault();\n stepValue(e, 'downPage', textValue);\n nextKeyboardSpinState = 'down';\n } else if (!e.shiftKey && e.key === Home && min !== undefined) {\n commit(e, min);\n nextKeyboardSpinState = 'down';\n } else if (!e.shiftKey && e.key === End && max !== undefined) {\n commit(e, max);\n nextKeyboardSpinState = 'up';\n } else if (e.key === Enter) {\n commit(e, currentValue, textValue);\n internalState.current.previousTextValue = undefined;\n } else if (e.key === Escape) {\n if (internalState.current.previousTextValue) {\n setTextValue(undefined);\n internalState.current.previousTextValue = undefined;\n }\n }\n if (keyboardSpinState !== nextKeyboardSpinState) {\n setKeyboardSpinState(nextKeyboardSpinState);\n }\n };\n const handleKeyUp = (e)=>{\n if (keyboardSpinState !== 'rest') {\n setKeyboardSpinState('rest');\n internalState.current.spinState = 'rest';\n }\n };\n const commit = (e, newValue, newDisplayValue)=>{\n const valueChanged = newValue !== undefined && currentValue !== newValue;\n const displayValueChanged = newDisplayValue !== undefined && internalState.current.previousTextValue !== undefined && internalState.current.previousTextValue !== newDisplayValue;\n let roundedValue;\n if (valueChanged) {\n roundedValue = precisionRound(newValue, precision);\n setCurrentValue(roundedValue);\n } else if (displayValueChanged && !isControlled) {\n const nextValue = parseFloat(newDisplayValue);\n if (!isNaN(nextValue)) {\n setCurrentValue(precisionRound(nextValue, precision));\n }\n }\n if (valueChanged || displayValueChanged) {\n onChange === null || onChange === void 0 ? void 0 : onChange(e, {\n value: roundedValue,\n displayValue: newDisplayValue\n });\n }\n setTextValue(undefined);\n };\n const state = {\n size,\n appearance,\n spinState: keyboardSpinState,\n atBound: internalState.current.atBound,\n components: {\n root: 'span',\n input: 'input',\n incrementButton: 'button',\n decrementButton: 'button'\n },\n root: slot.always(root, {\n defaultProps: nativeProps.root,\n elementType: 'span'\n }),\n input: slot.always(input, {\n defaultProps: {\n ref,\n autoComplete: 'off',\n role: 'spinbutton',\n appearance,\n type: 'text',\n ...nativeProps.primary\n },\n elementType: 'input'\n }),\n incrementButton: slot.always(incrementButton, {\n defaultProps: {\n tabIndex: -1,\n children: /*#__PURE__*/ React.createElement(ChevronUp16Regular, null),\n disabled: nativeProps.primary.disabled,\n 'aria-label': 'Increment value',\n type: 'button'\n },\n elementType: 'button'\n }),\n decrementButton: slot.always(decrementButton, {\n defaultProps: {\n tabIndex: -1,\n children: /*#__PURE__*/ React.createElement(ChevronDown16Regular, null),\n disabled: nativeProps.primary.disabled,\n 'aria-label': 'Decrement value',\n type: 'button'\n },\n elementType: 'button'\n })\n };\n let valueToDisplay;\n if (textValue !== undefined) {\n valueToDisplay = textValue;\n } else if (value === null || currentValue === null) {\n valueToDisplay = displayValue !== null && displayValue !== void 0 ? displayValue : '';\n internalState.current.value = null;\n internalState.current.atBound = 'none';\n } else {\n const roundedValue = precisionRound(currentValue, precision);\n internalState.current.value = roundedValue;\n internalState.current.atBound = getBound(roundedValue, min, max);\n if (isControlled) {\n valueToDisplay = displayValue !== null && displayValue !== void 0 ? displayValue : String(roundedValue);\n } else {\n valueToDisplay = String(roundedValue);\n }\n }\n state.input.value = valueToDisplay;\n state.input['aria-valuemin'] = min;\n state.input['aria-valuemax'] = max;\n state.input['aria-valuenow'] = currentValue !== null && currentValue !== void 0 ? currentValue : undefined;\n var _state_input_ariavaluetext;\n state.input['aria-valuetext'] = (_state_input_ariavaluetext = state.input['aria-valuetext']) !== null && _state_input_ariavaluetext !== void 0 ? _state_input_ariavaluetext : value !== undefined && displayValue || undefined;\n state.input.onChange = mergeCallbacks(state.input.onChange, handleInputChange);\n state.input.onBlur = mergeCallbacks(state.input.onBlur, handleBlur);\n state.input.onKeyDown = mergeCallbacks(state.input.onKeyDown, handleKeyDown);\n state.input.onKeyUp = mergeCallbacks(state.input.onKeyUp, handleKeyUp);\n state.incrementButton.onMouseDown = mergeCallbacks(handleIncrementMouseDown, state.incrementButton.onMouseDown);\n state.incrementButton.onMouseUp = mergeCallbacks(state.incrementButton.onMouseUp, handleStepMouseUpOrLeave);\n state.incrementButton.onMouseLeave = mergeCallbacks(state.incrementButton.onMouseLeave, handleStepMouseUpOrLeave);\n state.decrementButton.onMouseDown = mergeCallbacks(handleDecrementMouseDown, state.decrementButton.onMouseDown);\n state.decrementButton.onMouseUp = mergeCallbacks(state.decrementButton.onMouseUp, handleStepMouseUpOrLeave);\n state.decrementButton.onMouseLeave = mergeCallbacks(state.decrementButton.onMouseLeave, handleStepMouseUpOrLeave);\n return state;\n};\n"],"names":["useSpinButton_unstable","DEFAULT_SPIN_DELAY_MS","MIN_SPIN_DELAY_MS","MAX_SPIN_TIME_MS","lerp","start","end","percent","props","ref","useFieldControlProps_unstable","supportsLabelFor","supportsRequired","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","overrides","useOverrides","_overrides_inputDefaultAppearance","value","displayValue","defaultValue","min","max","step","stepPage","precision","precisionFromProps","onChange","size","appearance","inputDefaultAppearance","root","input","incrementButton","decrementButton","React","useMemo","Math","calculatePrecision","currentValue","setCurrentValue","useControllableState","state","defaultState","initialState","isControlled","undefined","textValue","setTextValue","useState","keyboardSpinState","setKeyboardSpinState","internalState","useRef","spinState","spinTime","spinDelay","atBound","getBound","precisionRound","setStepTimeout","clearStepTimeout","useTimeout","stepValue","e","direction","startFrom","startValue","current","num","parseFloat","isNaN","val","dir","stepSize","stepStart","nullStep","clamp","commit","newValue","Number","handleInputChange","previousTextValue","String","target","handleIncrementMouseDown","handleDecrementMouseDown","handleStepMouseUpOrLeave","handleBlur","handleKeyDown","nextKeyboardSpinState","key","ArrowUp","ArrowDown","PageUp","preventDefault","PageDown","shiftKey","Home","End","Enter","Escape","handleKeyUp","newDisplayValue","valueChanged","displayValueChanged","roundedValue","nextValue","components","slot","always","defaultProps","elementType","autoComplete","role","type","primary","tabIndex","children","createElement","ChevronUp16Regular","disabled","ChevronDown16Regular","valueToDisplay","_state_input_ariavaluetext","mergeCallbacks","onBlur","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onMouseLeave"],"mappings":";;;;+BAsBiBA;;aAAAA;;;6DAtBM;4BACuB;gCACoD;8BACnB;uBACX;4BACX;qCACH;AACtD,MAAMC,wBAAwB;AAC9B,MAAMC,oBAAoB;AAC1B,MAAMC,mBAAmB;AACzB,6DAA6D;AAC7D,yDAAyD;AACzD,gEAAgE;AAChE,MAAMC,OAAO,CAACC,OAAOC,KAAKC,UAAUF,QAAQ,AAACC,CAAAA,MAAMD,KAAI,IAAKE;AASjD,MAAMP,yBAAyB,CAACQ,OAAOC,MAAM;IACpD,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAA6B,EAACF,OAAO;QACzCG,kBAAkB,IAAI;QACtBC,kBAAkB,IAAI;IAC1B;IACA,MAAMC,cAAcC,IAAAA,yCAAyB,EAAC;QAC1CN;QACAO,oBAAoB;QACpBC,mBAAmB;YACf;YACA;YACA;YACA;YACA;YACA;SACH;IACL;IACA,MAAMC,YAAYC,IAAAA,0CAAY;IAC9B,IAAIC;IACJ,MAAM,EAAEC,MAAK,EAAGC,aAAY,EAAGC,aAAY,EAAGC,IAAG,EAAGC,IAAG,EAAGC,MAAM,EAAC,EAAGC,UAAU,EAAC,EAAGC,WAAWC,mBAAkB,EAAGC,SAAQ,EAAGC,MAAM,SAAQ,EAAGC,YAAY,AAACZ,CAAAA,oCAAoCF,UAAUe,sBAAsB,AAAD,MAAO,IAAI,IAAIb,sCAAsC,KAAK,IAAIA,oCAAoC,SAAS,CA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F7C,MAAMR,eAAe,CAAC+F,WAAW,GAAGJ,IAAAA,8BAAc,EAACvC,0BAA0B5C,MAAMR,eAAe,CAAC+F,WAAW;IAC9GvF,MAAMR,eAAe,CAACgG,SAAS,GAAGL,IAAAA,8BAAc,EAACnF,MAAMR,eAAe,CAACgG,SAAS,EAAE3C;IAClF7C,MAAMR,eAAe,CAACiG,YAAY,GAAGN,IAAAA,8BAAc,EAACnF,MAAMR,eAAe,CAACiG,YAAY,EAAE5C;IACxF,OAAO7C;AACX"}
|
1
|
+
{"version":3,"sources":["useSpinButton.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, mergeCallbacks, useControllableState, useTimeout, slot } from '@fluentui/react-utilities';\nimport { ArrowUp, ArrowDown, End, Enter, Escape, Home, PageDown, PageUp } from '@fluentui/keyboard-keys';\nimport { calculatePrecision, precisionRound, getBound, clamp } from '../../utils/index';\nimport { ChevronUp16Regular, ChevronDown16Regular } from '@fluentui/react-icons';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\nconst DEFAULT_SPIN_DELAY_MS = 150;\nconst MIN_SPIN_DELAY_MS = 80;\nconst MAX_SPIN_TIME_MS = 1000;\n// This is here to give an ease for the mouse held down case.\n// Exact easing it to be defined. Once it is we'll likely\n// pull this out into a util function in the SpinButton package.\nconst lerp = (start, end, percent)=>start + (end - start) * percent;\n/**\n * Create the state required to render SpinButton.\n *\n * The returned state can be modified with hooks such as useSpinButtonStyles_unstable,\n * before being passed to renderSpinButton_unstable.\n *\n * @param props - props from this instance of SpinButton\n * @param ref - reference to root HTMLElement of SpinButton\n */ export const useSpinButton_unstable = (props, ref)=>{\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, {\n supportsLabelFor: true,\n supportsRequired: true\n });\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: [\n 'defaultValue',\n 'max',\n 'min',\n 'onChange',\n 'size',\n 'value'\n ]\n });\n const overrides = useOverrides();\n var _overrides_inputDefaultAppearance;\n const { value, displayValue, defaultValue, min, max, step = 1, stepPage = 1, precision: precisionFromProps, onChange, size = 'medium', appearance = (_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline', root, input, incrementButton, decrementButton } = props;\n const precision = React.useMemo(()=>{\n return precisionFromProps !== null && precisionFromProps !== void 0 ? precisionFromProps : Math.max(calculatePrecision(step), 0);\n }, [\n precisionFromProps,\n step\n ]);\n const [currentValue, setCurrentValue] = useControllableState({\n state: value,\n defaultState: defaultValue,\n initialState: 0\n });\n const isControlled = value !== undefined;\n const [textValue, setTextValue] = React.useState(undefined);\n const [keyboardSpinState, setKeyboardSpinState] = React.useState('rest');\n const internalState = React.useRef({\n value: currentValue,\n spinState: 'rest',\n spinTime: 0,\n spinDelay: DEFAULT_SPIN_DELAY_MS,\n atBound: currentValue !== null ? getBound(precisionRound(currentValue, precision), min, max) : 'none'\n });\n const [setStepTimeout, clearStepTimeout] = useTimeout();\n const stepValue = (e, direction, startFrom)=>{\n let startValue = internalState.current.value;\n if (startFrom) {\n const num = parseFloat(startFrom);\n if (!isNaN(num)) {\n startValue = num;\n }\n }\n const val = startValue;\n const dir = direction === 'up' || direction === 'upPage' ? 1 : -1;\n const stepSize = direction === 'upPage' || direction === 'downPage' ? stepPage : step;\n if (val === null) {\n const stepStart = min === undefined ? 0 : min;\n const nullStep = clamp(stepStart + stepSize * dir, min, max);\n commit(e, nullStep);\n return;\n }\n let newValue = val + stepSize * dir;\n if (!Number.isNaN(newValue)) {\n newValue = clamp(newValue, min, max);\n }\n commit(e, newValue);\n if (internalState.current.spinState !== 'rest') {\n setStepTimeout(()=>{\n // Ease the step speed a bit\n internalState.current.spinTime += internalState.current.spinDelay;\n internalState.current.spinDelay = lerp(DEFAULT_SPIN_DELAY_MS, MIN_SPIN_DELAY_MS, internalState.current.spinTime / MAX_SPIN_TIME_MS);\n stepValue(e, direction);\n }, internalState.current.spinDelay);\n }\n };\n const handleInputChange = (e)=>{\n if (!internalState.current.previousTextValue) {\n internalState.current.previousTextValue = textValue !== null && textValue !== void 0 ? textValue : String(currentValue);\n }\n const newValue = e.target.value;\n setTextValue(newValue);\n };\n const handleIncrementMouseDown = (e)=>{\n internalState.current.spinState = 'up';\n stepValue(e, 'up');\n };\n const handleDecrementMouseDown = (e)=>{\n internalState.current.spinState = 'down';\n stepValue(e, 'down');\n };\n const handleStepMouseUpOrLeave = (e)=>{\n clearStepTimeout();\n internalState.current.spinState = 'rest';\n internalState.current.spinDelay = DEFAULT_SPIN_DELAY_MS;\n internalState.current.spinTime = 0;\n };\n const handleBlur = (e)=>{\n commit(e, currentValue, textValue);\n internalState.current.previousTextValue = undefined;\n };\n const handleKeyDown = (e)=>{\n let nextKeyboardSpinState = 'rest';\n if (e.key === ArrowUp) {\n stepValue(e, 'up', textValue);\n nextKeyboardSpinState = 'up';\n } else if (e.key === ArrowDown) {\n stepValue(e, 'down', textValue);\n nextKeyboardSpinState = 'down';\n } else if (e.key === PageUp) {\n e.preventDefault();\n stepValue(e, 'upPage', textValue);\n nextKeyboardSpinState = 'up';\n } else if (e.key === PageDown) {\n e.preventDefault();\n stepValue(e, 'downPage', textValue);\n nextKeyboardSpinState = 'down';\n } else if (!e.shiftKey && e.key === Home && min !== undefined) {\n commit(e, min);\n nextKeyboardSpinState = 'down';\n } else if (!e.shiftKey && e.key === End && max !== undefined) {\n commit(e, max);\n nextKeyboardSpinState = 'up';\n } else if (e.key === Enter) {\n commit(e, currentValue, textValue);\n internalState.current.previousTextValue = undefined;\n } else if (e.key === Escape) {\n if (internalState.current.previousTextValue) {\n setTextValue(undefined);\n internalState.current.previousTextValue = undefined;\n }\n }\n if (keyboardSpinState !== nextKeyboardSpinState) {\n setKeyboardSpinState(nextKeyboardSpinState);\n }\n };\n const handleKeyUp = (e)=>{\n if (keyboardSpinState !== 'rest') {\n setKeyboardSpinState('rest');\n internalState.current.spinState = 'rest';\n }\n };\n const commit = (e, newValue, newDisplayValue)=>{\n const valueChanged = newValue !== undefined && currentValue !== newValue;\n const displayValueChanged = newDisplayValue !== undefined && internalState.current.previousTextValue !== undefined && internalState.current.previousTextValue !== newDisplayValue;\n let roundedValue;\n if (valueChanged) {\n roundedValue = precisionRound(newValue, precision);\n setCurrentValue(roundedValue);\n } else if (displayValueChanged && !isControlled) {\n const nextValue = parseFloat(newDisplayValue);\n if (!isNaN(nextValue)) {\n setCurrentValue(precisionRound(nextValue, precision));\n }\n }\n if (valueChanged || displayValueChanged) {\n var _onChange;\n (_onChange = onChange) === null || _onChange === void 0 ? void 0 : _onChange(e, {\n value: roundedValue,\n displayValue: newDisplayValue\n });\n }\n setTextValue(undefined);\n };\n const state = {\n size,\n appearance,\n spinState: keyboardSpinState,\n atBound: internalState.current.atBound,\n components: {\n root: 'span',\n input: 'input',\n incrementButton: 'button',\n decrementButton: 'button'\n },\n root: slot.always(root, {\n defaultProps: nativeProps.root,\n elementType: 'span'\n }),\n input: slot.always(input, {\n defaultProps: {\n ref,\n autoComplete: 'off',\n role: 'spinbutton',\n appearance,\n type: 'text',\n ...nativeProps.primary\n },\n elementType: 'input'\n }),\n incrementButton: slot.always(incrementButton, {\n defaultProps: {\n tabIndex: -1,\n children: /*#__PURE__*/ React.createElement(ChevronUp16Regular, null),\n disabled: nativeProps.primary.disabled,\n 'aria-label': 'Increment value',\n type: 'button'\n },\n elementType: 'button'\n }),\n decrementButton: slot.always(decrementButton, {\n defaultProps: {\n tabIndex: -1,\n children: /*#__PURE__*/ React.createElement(ChevronDown16Regular, null),\n disabled: nativeProps.primary.disabled,\n 'aria-label': 'Decrement value',\n type: 'button'\n },\n elementType: 'button'\n })\n };\n let valueToDisplay;\n if (textValue !== undefined) {\n valueToDisplay = textValue;\n } else if (value === null || currentValue === null) {\n valueToDisplay = displayValue !== null && displayValue !== void 0 ? displayValue : '';\n internalState.current.value = null;\n internalState.current.atBound = 'none';\n } else {\n const roundedValue = precisionRound(currentValue, precision);\n internalState.current.value = roundedValue;\n internalState.current.atBound = getBound(roundedValue, min, max);\n if (isControlled) {\n valueToDisplay = displayValue !== null && displayValue !== void 0 ? displayValue : String(roundedValue);\n } else {\n valueToDisplay = String(roundedValue);\n }\n }\n state.input.value = valueToDisplay;\n state.input['aria-valuemin'] = min;\n state.input['aria-valuemax'] = max;\n state.input['aria-valuenow'] = currentValue !== null && currentValue !== void 0 ? currentValue : undefined;\n var _state_input_ariavaluetext;\n state.input['aria-valuetext'] = (_state_input_ariavaluetext = state.input['aria-valuetext']) !== null && _state_input_ariavaluetext !== void 0 ? _state_input_ariavaluetext : value !== undefined && displayValue || undefined;\n state.input.onChange = mergeCallbacks(state.input.onChange, handleInputChange);\n state.input.onBlur = mergeCallbacks(state.input.onBlur, handleBlur);\n state.input.onKeyDown = mergeCallbacks(state.input.onKeyDown, handleKeyDown);\n state.input.onKeyUp = mergeCallbacks(state.input.onKeyUp, handleKeyUp);\n state.incrementButton.onMouseDown = mergeCallbacks(handleIncrementMouseDown, state.incrementButton.onMouseDown);\n state.incrementButton.onMouseUp = mergeCallbacks(state.incrementButton.onMouseUp, handleStepMouseUpOrLeave);\n state.incrementButton.onMouseLeave = mergeCallbacks(state.incrementButton.onMouseLeave, handleStepMouseUpOrLeave);\n state.decrementButton.onMouseDown = mergeCallbacks(handleDecrementMouseDown, state.decrementButton.onMouseDown);\n state.decrementButton.onMouseUp = mergeCallbacks(state.decrementButton.onMouseUp, handleStepMouseUpOrLeave);\n state.decrementButton.onMouseLeave = mergeCallbacks(state.decrementButton.onMouseLeave, handleStepMouseUpOrLeave);\n return state;\n};\n"],"names":["useSpinButton_unstable","DEFAULT_SPIN_DELAY_MS","MIN_SPIN_DELAY_MS","MAX_SPIN_TIME_MS","lerp","start","end","percent","props","ref","useFieldControlProps_unstable","supportsLabelFor","supportsRequired","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","overrides","useOverrides","_overrides_inputDefaultAppearance","value","displayValue","defaultValue","min","max","step","stepPage","precision","precisionFromProps","onChange","size","appearance","inputDefaultAppearance","root","input","incrementButton","decrementButton","React","useMemo","Math","calculatePrecision","currentValue","setCurrentValue","useControllableState","state","defaultState","initialState","isControlled","undefined","textValue","setTextValue","useState","keyboardSpinState","setKeyboardSpinState","internalState","useRef","spinState","spinTime","spinDelay","atBound","getBound","precisionRound","setStepTimeout","clearStepTimeout","useTimeout","stepValue","e","direction","startFrom","startValue","current","num","parseFloat","isNaN","val","dir","stepSize","stepStart","nullStep","clamp","commit","newValue","Number","handleInputChange","previousTextValue","String","target","handleIncrementMouseDown","handleDecrementMouseDown","handleStepMouseUpOrLeave","handleBlur","handleKeyDown","nextKeyboardSpinState","key","ArrowUp","ArrowDown","PageUp","preventDefault","PageDown","shiftKey","Home","End","Enter","Escape","handleKeyUp","newDisplayValue","valueChanged","displayValueChanged","roundedValue","nextValue","_onChange","components","slot","always","defaultProps","elementType","autoComplete","role","type","primary","tabIndex","children","createElement","ChevronUp16Regular","disabled","ChevronDown16Regular","valueToDisplay","_state_input_ariavaluetext","mergeCallbacks","onBlur","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onMouseLeave"],"mappings":";;;;+BAsBiBA;;;eAAAA;;;;iEAtBM;4BACuB;gCACoD;8BACnB;uBACX;4BACX;qCACH;AACtD,MAAMC,wBAAwB;AAC9B,MAAMC,oBAAoB;AAC1B,MAAMC,mBAAmB;AACzB,6DAA6D;AAC7D,yDAAyD;AACzD,gEAAgE;AAChE,MAAMC,OAAO,CAACC,OAAOC,KAAKC,UAAUF,QAAQ,AAACC,CAAAA,MAAMD,KAAI,IAAKE;AASjD,MAAMP,yBAAyB,CAACQ,OAAOC;IAC9C,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAA6B,EAACF,OAAO;QACzCG,kBAAkB;QAClBC,kBAAkB;IACtB;IACA,MAAMC,cAAcC,IAAAA,yCAAyB,EAAC;QAC1CN;QACA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,CAACkG,SAAS,EAAE5C;IAClF7C,MAAMT,eAAe,CAACmG,YAAY,GAAGN,IAAAA,8BAAc,EAACpF,MAAMT,eAAe,CAACmG,YAAY,EAAE7C;IACxF7C,MAAMR,eAAe,CAACgG,WAAW,GAAGJ,IAAAA,8BAAc,EAACxC,0BAA0B5C,MAAMR,eAAe,CAACgG,WAAW;IAC9GxF,MAAMR,eAAe,CAACiG,SAAS,GAAGL,IAAAA,8BAAc,EAACpF,MAAMR,eAAe,CAACiG,SAAS,EAAE5C;IAClF7C,MAAMR,eAAe,CAACkG,YAAY,GAAGN,IAAAA,8BAAc,EAACpF,MAAMR,eAAe,CAACkG,YAAY,EAAE7C;IACxF,OAAO7C;AACX"}
|
@@ -9,8 +9,12 @@ function _export(target, all) {
|
|
9
9
|
});
|
10
10
|
}
|
11
11
|
_export(exports, {
|
12
|
-
spinButtonClassNames: ()
|
13
|
-
|
12
|
+
spinButtonClassNames: function() {
|
13
|
+
return spinButtonClassNames;
|
14
|
+
},
|
15
|
+
useSpinButtonStyles_unstable: function() {
|
16
|
+
return useSpinButtonStyles_unstable;
|
17
|
+
}
|
14
18
|
});
|
15
19
|
const _react = require("@griffel/react");
|
16
20
|
const spinButtonClassNames = {
|
@@ -26,7 +30,7 @@ const fieldHeights = {
|
|
26
30
|
small: '24px',
|
27
31
|
medium: '32px'
|
28
32
|
};
|
29
|
-
const useRootClassName = /*#__PURE__*/ (0, _react
|
33
|
+
const useRootClassName = /*#__PURE__*/ (0, _react.__resetStyles)("rkqmps4", "r1trw52p", {
|
30
34
|
r: [
|
31
35
|
".rkqmps4{display:inline-grid;grid-template-columns:1fr 24px;grid-template-rows:1fr 1fr;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);}",
|
32
36
|
".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);}",
|
@@ -48,7 +52,7 @@ const useRootClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("rkqmps4", "
|
|
48
52
|
"@media screen and (prefers-reduced-motion: reduce){.r1trw52p:focus-within::after{transition-duration:0.01ms;transition-delay:0.01ms;}}"
|
49
53
|
]
|
50
54
|
});
|
51
|
-
const useRootStyles = /*#__PURE__*/ (0, _react
|
55
|
+
const useRootStyles = /*#__PURE__*/ (0, _react.__styles)({
|
52
56
|
small: {
|
53
57
|
sshi5w: "f1pha7fy",
|
54
58
|
Bahqtrf: "fk6fouc",
|
@@ -300,14 +304,14 @@ const useRootStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
|
300
304
|
]
|
301
305
|
]
|
302
306
|
});
|
303
|
-
const useInputClassName = /*#__PURE__*/ (0, _react
|
307
|
+
const useInputClassName = /*#__PURE__*/ (0, _react.__resetStyles)("r1ljrqje", null, [
|
304
308
|
".r1ljrqje{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;width:100%;}",
|
305
309
|
".r1ljrqje::-webkit-input-placeholder{color:var(--colorNeutralForeground4);opacity:1;}",
|
306
310
|
".r1ljrqje::-moz-placeholder{color:var(--colorNeutralForeground4);opacity:1;}",
|
307
311
|
".r1ljrqje:-ms-input-placeholder{color:var(--colorNeutralForeground4);opacity:1;}",
|
308
312
|
".r1ljrqje::placeholder{color:var(--colorNeutralForeground4);opacity:1;}"
|
309
313
|
]);
|
310
|
-
const useInputStyles = /*#__PURE__*/ (0, _react
|
314
|
+
const useInputStyles = /*#__PURE__*/ (0, _react.__styles)({
|
311
315
|
disabled: {
|
312
316
|
sj55zd: "f1s2aq7o",
|
313
317
|
Bceei9c: "fdrzuqr",
|
@@ -323,7 +327,7 @@ const useInputStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
|
323
327
|
".fahhnxm::-moz-placeholder{color:var(--colorNeutralForegroundDisabled);}"
|
324
328
|
]
|
325
329
|
});
|
326
|
-
const useBaseButtonClassName = /*#__PURE__*/ (0, _react
|
330
|
+
const useBaseButtonClassName = /*#__PURE__*/ (0, _react.__resetStyles)("r1g4chgs", null, [
|
327
331
|
".r1g4chgs{display:inline-flex;width:24px;align-items: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;}",
|
328
332
|
".r1g4chgs:active{outline-style:none;}",
|
329
333
|
".r1g4chgs:enabled:hover{cursor:pointer;color:var(--colorNeutralForeground3Hover);background-color:var(--colorSubtleBackgroundHover);}",
|
@@ -331,7 +335,7 @@ const useBaseButtonClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("r1g4c
|
|
331
335
|
".r1g4chgs:enabled.fui-SpinButton__button_active{color:var(--colorNeutralForeground3Pressed);background-color:var(--colorSubtleBackgroundPressed);}",
|
332
336
|
".r1g4chgs:disabled{cursor:not-allowed;color:var(--colorNeutralForegroundDisabled);}"
|
333
337
|
]);
|
334
|
-
const useButtonStyles = /*#__PURE__*/ (0, _react
|
338
|
+
const useButtonStyles = /*#__PURE__*/ (0, _react.__styles)({
|
335
339
|
increment: {
|
336
340
|
Ijaq50: "f16hsg94",
|
337
341
|
B7oj6ja: [
|
@@ -448,7 +452,7 @@ const useButtonStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
|
448
452
|
});
|
449
453
|
// Cannot just disable button as they need to remain
|
450
454
|
// exposed to ATs like screen readers.
|
451
|
-
const useButtonDisabledStyles = /*#__PURE__*/ (0, _react
|
455
|
+
const useButtonDisabledStyles = /*#__PURE__*/ (0, _react.__styles)({
|
452
456
|
base: {
|
453
457
|
Bceei9c: "fdrzuqr",
|
454
458
|
eoavqd: "fphbwmw"
|
@@ -505,7 +509,7 @@ const useButtonDisabledStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
|
505
509
|
]
|
506
510
|
});
|
507
511
|
const useSpinButtonStyles_unstable = (state)=>{
|
508
|
-
const { appearance
|
512
|
+
const { appearance, atBound, spinState, size } = state;
|
509
513
|
const disabled = state.input.disabled;
|
510
514
|
const invalid = `${state.input['aria-invalid']}` === 'true';
|
511
515
|
const filled = appearance.startsWith('filled');
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useSpinButtonStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const spinButtonClassNames = {\n root: 'fui-SpinButton',\n input: 'fui-SpinButton__input',\n incrementButton: 'fui-SpinButton__incrementButton',\n decrementButton: 'fui-SpinButton__decrementButton'\n};\nconst spinButtonExtraClassNames = {\n buttonActive: 'fui-SpinButton__button_active'\n};\nconst fieldHeights = {\n small: '24px',\n medium: '32px'\n};\nconst useRootClassName = /*#__PURE__*/__resetStyles(\"rkqmps4\", \"r1trw52p\", {\n r: [\".rkqmps4{display:inline-grid;grid-template-columns:1fr 24px;grid-template-rows:1fr 1fr;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);}\", \".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);}\", \".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);clip-path:inset(calc(100% - 2px) 0 0 0);transform:scaleX(0);transition-property:transform;transition-duration:var(--durationUltraFast);transition-delay:var(--curveAccelerateMid);}\", \".rkqmps4:focus-within::after{transform:scaleX(1);transition-property:transform;transition-duration:var(--durationNormal);transition-delay:var(--curveDecelerateMid);}\", \".rkqmps4:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}\", \".rkqmps4:focus-within{outline:2px solid transparent;}\", \".r1trw52p{display:inline-grid;grid-template-columns:1fr 24px;grid-template-rows:1fr 1fr;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);}\", \".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);}\", \".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);clip-path:inset(calc(100% - 2px) 0 0 0);transform:scaleX(0);transition-property:transform;transition-duration:var(--durationUltraFast);transition-delay:var(--curveAccelerateMid);}\", \".r1trw52p:focus-within::after{transform:scaleX(1);transition-property:transform;transition-duration:var(--durationNormal);transition-delay:var(--curveDecelerateMid);}\", \".r1trw52p:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}\", \".r1trw52p:focus-within{outline:2px solid transparent;}\"],\n s: [\"@media screen and (prefers-reduced-motion: reduce){.rkqmps4::after{transition-duration:0.01ms;transition-delay:0.01ms;}}\", \"@media screen and (prefers-reduced-motion: reduce){.rkqmps4:focus-within::after{transition-duration:0.01ms;transition-delay:0.01ms;}}\", \"@media screen and (prefers-reduced-motion: reduce){.r1trw52p::after{transition-duration:0.01ms;transition-delay:0.01ms;}}\", \"@media screen and (prefers-reduced-motion: reduce){.r1trw52p:focus-within::after{transition-duration:0.01ms;transition-delay:0.01ms;}}\"]\n});\nconst useRootStyles = /*#__PURE__*/__styles({\n small: {\n sshi5w: \"f1pha7fy\",\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fy9rknc\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"fwrc4pm\",\n uwmqm3: [\"f1f5gg8d\", \"f1vdfbxk\"]\n },\n medium: {},\n outline: {},\n outlineInteractive: {\n Bo3r8zu: \"f1w2y1rc\",\n Hpvxnh: [\"f1gofhvl\", \"f18htlvq\"],\n Bx11ytk: \"ffcnd28\",\n B1rg0w0: [\"f18htlvq\", \"f1gofhvl\"],\n Bsg1tlv: \"f6lmxco\",\n Brjw370: [\"fcoc0mf\", \"f15r4wkl\"],\n xcfy85: \"f1ipdth8\",\n Bcc6kan: [\"f15r4wkl\", \"fcoc0mf\"]\n },\n underline: {\n B0qfbqy: \"f1o236ok\",\n B4f6apu: [\"faeg28l\", \"f64aojp\"],\n y0oebl: \"fdw6hkg\",\n uvfttm: [\"f64aojp\", \"faeg28l\"],\n Budzafs: [\"f1vk4jnx\", \"f1v3v894\"],\n r59vdv: [\"f1v3v894\", \"f1vk4jnx\"],\n n07z76: [\"fzi2j54\", \"f1un0uoc\"],\n ck0cow: [\"f1un0uoc\", \"fzi2j54\"]\n },\n underlineInteractive: {\n Bx11ytk: \"ffcnd28\",\n xcfy85: \"f1ipdth8\",\n B3778ie: [\"f9pmbr4\", \"ffh3ws5\"],\n d9w3h3: [\"ffh3ws5\", \"f9pmbr4\"],\n Bl18szs: [\"f19438ov\", \"f1i9y5j\"],\n B4j8arr: [\"f1i9y5j\", \"f19438ov\"]\n },\n filled: {\n B0qfbqy: \"f1fjh9ub\",\n B4f6apu: [\"ff9c942\", \"f6rdg5o\"],\n y0oebl: \"fdw6hkg\",\n uvfttm: [\"f6rdg5o\", \"ff9c942\"],\n Bdkvgpv: \"f163fonl\",\n m598lv: [\"f1yq6w5o\", \"f1jpmc5p\"],\n qa3bma: \"f11yjt3y\",\n Bbv0w2i: [\"f1jpmc5p\", \"f1yq6w5o\"],\n Bq4z7u6: \"f7dgwnz\",\n Bk5zm6e: [\"f1edeodt\", \"fszsv3f\"],\n Bqjgrrk: \"f1172wan\",\n Bm6vgfq: [\"fszsv3f\", \"f1edeodt\"]\n },\n \"filled-darker\": {\n De3pzq: \"f16xq7d1\"\n },\n \"filled-lighter\": {\n De3pzq: \"fxugw4r\"\n },\n filledInteractive: {\n B05mzqr: \"f1xqt08\",\n tb9y6h: [\"fzt5lgo\", \"f8tv3r9\"],\n jcehpj: \"fyhrops\",\n B23o0hn: [\"f8tv3r9\", \"fzt5lgo\"]\n },\n invalid: {\n emecyz: \"fl48pg9\",\n lz0pba: [\"f1a168p3\", \"f1pvdymy\"],\n Bo1k74p: \"f11knvgl\",\n Ba322q7: [\"f1pvdymy\", \"f1a168p3\"]\n },\n disabled: {\n Bceei9c: \"fdrzuqr\",\n De3pzq: \"f1c21dwh\",\n Bq4z7u6: \"f1a0lfh7\",\n Bk5zm6e: [\"f1p2ejm6\", \"fmzytvz\"],\n Bqjgrrk: \"fas2e61\",\n Bm6vgfq: [\"fmzytvz\", \"f1p2ejm6\"],\n Cffpyd: \"flb8es4\",\n hxi8he: [\"f1lclws\", \"frjp63v\"],\n Bcuq369: \"f1yv9wnt\",\n Imo2if: [\"frjp63v\", \"f1lclws\"]\n }\n}, {\n d: [\".f1pha7fy{min-height:24px;}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fy9rknc{font-size:var(--fontSizeBase200);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".fwrc4pm{line-height:var(--lineHeightBase200);}\", \".f1f5gg8d{padding-left:var(--spacingHorizontalS);}\", \".f1vdfbxk{padding-right:var(--spacingHorizontalS);}\", \".f1o236ok::before{border-top-width:0;}\", \".faeg28l::before{border-right-width:0;}\", \".f64aojp::before{border-left-width:0;}\", \".fdw6hkg::before{border-bottom-width:1px;}\", \".f1vk4jnx::before{border-bottom-right-radius:var(--borderRadiusNone);}\", \".f1v3v894::before{border-bottom-left-radius:var(--borderRadiusNone);}\", \".fzi2j54::before{border-top-right-radius:var(--borderRadiusNone);}\", \".f1un0uoc::before{border-top-left-radius:var(--borderRadiusNone);}\", \".f9pmbr4::after{border-bottom-right-radius:var(--borderRadiusNone);}\", \".ffh3ws5::after{border-bottom-left-radius:var(--borderRadiusNone);}\", \".f19438ov::after{border-top-right-radius:var(--borderRadiusNone);}\", \".f1i9y5j::after{border-top-left-radius:var(--borderRadiusNone);}\", \".f1fjh9ub::before{border-top-width:1px;}\", \".ff9c942::before{border-right-width:1px;}\", \".f6rdg5o::before{border-left-width:1px;}\", \".f163fonl::before{border-top-style:solid;}\", \".f1yq6w5o::before{border-right-style:solid;}\", \".f1jpmc5p::before{border-left-style:solid;}\", \".f11yjt3y::before{border-bottom-style:solid;}\", \".f7dgwnz::before{border-top-color:var(--colorTransparentStroke);}\", \".f1edeodt::before{border-right-color:var(--colorTransparentStroke);}\", \".fszsv3f::before{border-left-color:var(--colorTransparentStroke);}\", \".f1172wan::before{border-bottom-color:var(--colorTransparentStroke);}\", \".f16xq7d1{background-color:var(--colorNeutralBackground3);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".fl48pg9:not(:focus-within)::before,.fl48pg9:hover:not(:focus-within)::before{border-top-color:var(--colorPaletteRedBorder2);}\", \".f1a168p3:not(:focus-within)::before,.f1a168p3:hover:not(:focus-within)::before{border-right-color:var(--colorPaletteRedBorder2);}\", \".f1pvdymy:not(:focus-within)::before,.f1pvdymy:hover:not(:focus-within)::before{border-left-color:var(--colorPaletteRedBorder2);}\", \".f11knvgl:not(:focus-within)::before,.f11knvgl:hover:not(:focus-within)::before{border-bottom-color:var(--colorPaletteRedBorder2);}\", \".fdrzuqr{cursor:not-allowed;}\", \".f1c21dwh{background-color:var(--colorTransparentBackground);}\", \".f1a0lfh7::before{border-top-color:var(--colorNeutralStrokeDisabled);}\", \".f1p2ejm6::before{border-right-color:var(--colorNeutralStrokeDisabled);}\", \".fmzytvz::before{border-left-color:var(--colorNeutralStrokeDisabled);}\", \".fas2e61::before{border-bottom-color:var(--colorNeutralStrokeDisabled);}\"],\n h: [\".f1w2y1rc:hover::before{border-top-color:var(--colorNeutralStroke1Hover);}\", \".f1gofhvl:hover::before{border-right-color:var(--colorNeutralStroke1Hover);}\", \".f18htlvq:hover::before{border-left-color:var(--colorNeutralStroke1Hover);}\", \".ffcnd28:hover::before{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}\", \".f1xqt08:hover::before,.f1xqt08:focus-within::before{border-top-color:var(--colorTransparentStrokeInteractive);}\", \".fzt5lgo:hover::before,.fzt5lgo:focus-within::before{border-right-color:var(--colorTransparentStrokeInteractive);}\", \".f8tv3r9:hover::before,.f8tv3r9:focus-within::before{border-left-color:var(--colorTransparentStrokeInteractive);}\", \".fyhrops:hover::before,.fyhrops:focus-within::before{border-bottom-color:var(--colorTransparentStrokeInteractive);}\"],\n a: [\".f6lmxco:active::before,.f6lmxco:focus-within::before{border-top-color:var(--colorNeutralStroke1Pressed);}\", \".fcoc0mf:active::before,.fcoc0mf:focus-within::before{border-right-color:var(--colorNeutralStroke1Pressed);}\", \".f15r4wkl:active::before,.f15r4wkl:focus-within::before{border-left-color:var(--colorNeutralStroke1Pressed);}\", \".f1ipdth8:active::before,.f1ipdth8:focus-within::before{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}\"],\n m: [[\"@media (forced-colors: active){.flb8es4::before{border-top-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1lclws::before{border-right-color:GrayText;}.frjp63v::before{border-left-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1yv9wnt::before{border-bottom-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }]]\n});\nconst useInputClassName = /*#__PURE__*/__resetStyles(\"r1ljrqje\", null, [\".r1ljrqje{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;width:100%;}\", \".r1ljrqje::-webkit-input-placeholder{color:var(--colorNeutralForeground4);opacity:1;}\", \".r1ljrqje::-moz-placeholder{color:var(--colorNeutralForeground4);opacity:1;}\", \".r1ljrqje:-ms-input-placeholder{color:var(--colorNeutralForeground4);opacity:1;}\", \".r1ljrqje::placeholder{color:var(--colorNeutralForeground4);opacity:1;}\"]);\nconst useInputStyles = /*#__PURE__*/__styles({\n disabled: {\n sj55zd: \"f1s2aq7o\",\n Bceei9c: \"fdrzuqr\",\n De3pzq: \"f1c21dwh\",\n yvdlaj: \"fahhnxm\"\n }\n}, {\n d: [\".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".fdrzuqr{cursor:not-allowed;}\", \".f1c21dwh{background-color:var(--colorTransparentBackground);}\", \".fahhnxm::-webkit-input-placeholder{color:var(--colorNeutralForegroundDisabled);}\", \".fahhnxm::-moz-placeholder{color:var(--colorNeutralForegroundDisabled);}\"]\n});\nconst useBaseButtonClassName = /*#__PURE__*/__resetStyles(\"r1g4chgs\", null, [\".r1g4chgs{display:inline-flex;width:24px;align-items: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;}\", \".r1g4chgs:active{outline-style:none;}\", \".r1g4chgs:enabled:hover{cursor:pointer;color:var(--colorNeutralForeground3Hover);background-color:var(--colorSubtleBackgroundHover);}\", \".r1g4chgs:enabled:active{color:var(--colorNeutralForeground3Pressed);background-color:var(--colorSubtleBackgroundPressed);}\", \".r1g4chgs:enabled.fui-SpinButton__button_active{color:var(--colorNeutralForeground3Pressed);background-color:var(--colorSubtleBackgroundPressed);}\", \".r1g4chgs:disabled{cursor:not-allowed;color:var(--colorNeutralForegroundDisabled);}\"]);\nconst useButtonStyles = /*#__PURE__*/__styles({\n increment: {\n Ijaq50: \"f16hsg94\",\n B7oj6ja: [\"f1jar5jt\", \"fyu767a\"],\n z8tnut: \"f10ra9hq\",\n Byoj8tv: \"f1brlhvm\"\n },\n decrement: {\n Ijaq50: \"faunodf\",\n Bbmb7ep: [\"f1aa9q02\", \"f16jpd5f\"],\n z8tnut: \"f1sl3k7w\",\n Byoj8tv: \"f1y2xyjm\"\n },\n incrementButtonSmall: {\n z8tnut: \"f1khb0e9\",\n z189sj: [\"f1sgzk6v\", \"f1bg5zqg\"],\n Byoj8tv: \"f1ov4xf1\",\n uwmqm3: [\"fycuoez\", \"f8wuabp\"],\n Bqenvij: \"fvblgha\"\n },\n decrementButtonSmall: {\n z8tnut: \"f1nbblvp\",\n z189sj: [\"f1sgzk6v\", \"f1bg5zqg\"],\n Byoj8tv: \"f1jnq6q7\",\n uwmqm3: [\"fycuoez\", \"f8wuabp\"],\n Bqenvij: \"fvblgha\"\n },\n outline: {},\n underline: {\n De3pzq: \"f3rmtva\",\n sj55zd: \"f11d4kpn\",\n r4wkhp: \"f1no7wuu\",\n B95qlz1: \"f1bifk9c\",\n p743kt: \"fp1zg4s\",\n B7xitij: \"fo6hitd\",\n B6siaa6: \"f1wiab75\",\n Ba9qmo4: \"fj9zm5z\",\n Dyrjrp: \"f1cqwcg4\"\n },\n \"filled-darker\": {\n De3pzq: \"f3rmtva\",\n sj55zd: \"f11d4kpn\",\n r4wkhp: \"f1no7wuu\",\n B95qlz1: \"fwwxidx\",\n p743kt: \"fp1zg4s\",\n B7xitij: \"f14i52sd\",\n B6siaa6: \"f1wiab75\",\n Ba9qmo4: \"fwry2ka\",\n Dyrjrp: \"f1cqwcg4\"\n },\n \"filled-lighter\": {\n De3pzq: \"f3rmtva\",\n sj55zd: \"f11d4kpn\",\n r4wkhp: \"f1no7wuu\",\n B95qlz1: \"f1yywxnv\",\n drw0cw: \"fzaa11h\",\n idzz8t: \"f4fpmm9\",\n Dyrjrp: \"f1cqwcg4\"\n }\n}, {\n d: [\".f16hsg94{grid-row-start:1;}\", \".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}\", \".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}\", \".f10ra9hq{padding-top:4px;}\", \".f1brlhvm{padding-bottom:1px;}\", \".faunodf{grid-row-start:2;}\", \".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f1sl3k7w{padding-top:1px;}\", \".f1y2xyjm{padding-bottom:4px;}\", \".f1khb0e9{padding-top:3px;}\", \".f1sgzk6v{padding-right:6px;}\", \".f1bg5zqg{padding-left:6px;}\", \".f1ov4xf1{padding-bottom:0px;}\", \".fycuoez{padding-left:4px;}\", \".f8wuabp{padding-right:4px;}\", \".fvblgha{height:12px;}\", \".f1nbblvp{padding-top:0px;}\", \".f1jnq6q7{padding-bottom:3px;}\", \".f3rmtva{background-color:transparent;}\", \".f11d4kpn{color:var(--colorNeutralForeground3);}\", \".f1no7wuu:enabled:hover{color:var(--colorNeutralForeground3Hover);}\", \".f1bifk9c:enabled:hover{background-color:var(--colorSubtleBackgroundHover);}\", \".fp1zg4s:enabled:active{color:var(--colorNeutralForeground3Pressed);}\", \".fo6hitd:enabled:active{background-color:var(--colorSubtleBackgroundPressed);}\", \".f1wiab75:enabled.fui-SpinButton__button_active{color:var(--colorNeutralForeground3Pressed);}\", \".fj9zm5z:enabled.fui-SpinButton__button_active{background-color:var(--colorSubtleBackgroundPressed);}\", \".f1cqwcg4:disabled{color:var(--colorNeutralForegroundDisabled);}\", \".fwwxidx:enabled:hover{background-color:var(--colorNeutralBackground3Hover);}\", \".f14i52sd:enabled:active{background-color:var(--colorNeutralBackground3Pressed);}\", \".fwry2ka:enabled.fui-SpinButton__button_active{background-color:var(--colorNeutralBackground3Pressed);}\", \".f1yywxnv:enabled:hover{background-color:var(--colorNeutralBackground1Hover);}\", \".fzaa11h:enabled:active,.fzaa11h:enabled.fui-SpinButton__button_active{color:var(--colorNeutralForeground3Pressed);}\", \".f4fpmm9:enabled:active,.f4fpmm9:enabled.fui-SpinButton__button_active{background-color:var(--colorNeutralBackground1Pressed);}\"]\n});\n// Cannot just disable button as they need to remain\n// exposed to ATs like screen readers.\nconst useButtonDisabledStyles = /*#__PURE__*/__styles({\n base: {\n Bceei9c: \"fdrzuqr\",\n eoavqd: \"fphbwmw\"\n },\n outline: {\n sj55zd: \"f1s2aq7o\",\n r4wkhp: \"few7wvn\",\n B95qlz1: \"f110wuh6\",\n p743kt: \"f9s4mys\",\n B7xitij: \"f10404rc\",\n B6siaa6: \"fwzu9cz\",\n Ba9qmo4: \"f1snwkb6\"\n },\n underline: {\n sj55zd: \"f1s2aq7o\",\n r4wkhp: \"few7wvn\",\n B95qlz1: \"f110wuh6\",\n p743kt: \"f9s4mys\",\n B7xitij: \"f10404rc\",\n B6siaa6: \"fwzu9cz\",\n Ba9qmo4: \"f1snwkb6\"\n },\n \"filled-darker\": {\n sj55zd: \"f1s2aq7o\",\n r4wkhp: \"few7wvn\",\n B95qlz1: \"f110wuh6\",\n p743kt: \"f9s4mys\",\n B7xitij: \"f10404rc\",\n B6siaa6: \"fwzu9cz\",\n Ba9qmo4: \"f1snwkb6\"\n },\n \"filled-lighter\": {\n sj55zd: \"f1s2aq7o\",\n r4wkhp: \"few7wvn\",\n B95qlz1: \"f110wuh6\",\n p743kt: \"f9s4mys\",\n B7xitij: \"f10404rc\",\n B6siaa6: \"fwzu9cz\",\n Ba9qmo4: \"f1snwkb6\"\n }\n}, {\n d: [\".fdrzuqr{cursor:not-allowed;}\", \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".few7wvn:enabled:hover{color:var(--colorNeutralForegroundDisabled);}\", \".f110wuh6:enabled:hover{background-color:transparent;}\", \".f9s4mys:enabled:active{color:var(--colorNeutralForegroundDisabled);}\", \".f10404rc:enabled:active{background-color:transparent;}\", \".fwzu9cz:enabled.fui-SpinButton__button_active{color:var(--colorNeutralForegroundDisabled);}\", \".f1snwkb6:enabled.fui-SpinButton__button_active{background-color:transparent;}\"],\n h: [\".fphbwmw:hover{cursor:not-allowed;}\"]\n});\n/**\n * Apply styling to the SpinButton slots based on the state\n */\nexport const useSpinButtonStyles_unstable = state => {\n const {\n appearance,\n atBound,\n spinState,\n size\n } = state;\n const disabled = state.input.disabled;\n const invalid = `${state.input['aria-invalid']}` === 'true';\n const filled = appearance.startsWith('filled');\n const rootStyles = useRootStyles();\n const buttonStyles = useButtonStyles();\n const buttonDisabledStyles = useButtonDisabledStyles();\n const inputStyles = useInputStyles();\n state.root.className = 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);\n state.incrementButton.className = 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);\n state.decrementButton.className = 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);\n state.input.className = mergeClasses(spinButtonClassNames.input, useInputClassName(), disabled && inputStyles.disabled, state.input.className);\n return state;\n};\n//# sourceMappingURL=useSpinButtonStyles.styles.js.map"],"names":["spinButtonClassNames","useSpinButtonStyles_unstable","root","input","incrementButton","decrementButton","spinButtonExtraClassNames","buttonActive","fieldHeights","small","medium","useRootClassName","__resetStyles","r","s","useRootStyles","__styles","sshi5w","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","uwmqm3","outline","outlineInteractive","Bo3r8zu","Hpvxnh","Bx11ytk","B1rg0w0","Bsg1tlv","Brjw370","xcfy85","Bcc6kan","underline","B0qfbqy","B4f6apu","y0oebl","uvfttm","Budzafs","r59vdv","n07z76","ck0cow","underlineInteractive","B3778ie","d9w3h3","Bl18szs","B4j8arr","filled","Bdkvgpv","m598lv","qa3bma","Bbv0w2i","Bq4z7u6","Bk5zm6e","Bqjgrrk","Bm6vgfq","De3pzq","filledInteractive","B05mzqr","tb9y6h","jcehpj","B23o0hn","invalid","emecyz","lz0pba","Bo1k74p","Ba322q7","disabled","Bceei9c","Cffpyd","hxi8he","Bcuq369","Imo2if","d","h","a","m","useInputClassName","useInputStyles","sj55zd","yvdlaj","useBaseButtonClassName","useButtonStyles","increment","Ijaq50","B7oj6ja","z8tnut","Byoj8tv","decrement","Bbmb7ep","incrementButtonSmall","z189sj","Bqenvij","decrementButtonSmall","r4wkhp","B95qlz1","p743kt","B7xitij","B6siaa6","Ba9qmo4","Dyrjrp","drw0cw","idzz8t","useButtonDisabledStyles","base","eoavqd","state","appearance","atBound","spinState","size","startsWith","rootStyles","buttonStyles","buttonDisabledStyles","inputStyles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,oBAAoB,MAApBA;IA4OAC,4BAA4B,MAA5BA;;uBA9OqD;AAE3D,MAAMD,uBAAuB;IAClCE,MAAM;IACNC,OAAO;IACPC,iBAAiB;IACjBC,iBAAiB;AACnB;AACA,MAAMC,4BAA4B;IAChCC,cAAc;AAChB;AACA,MAAMC,eAAe;IACn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BAA0BgC,aAAazB,SAAS,EAAEyB,YAAY,CAACN,WAAW,EAAEG,SAAS,WAAWG,aAAapB,oBAAoB,EAAE,AAACe,CAAAA,YAAY,SAASA,YAAY,MAAK,KAAMM,qBAAqBV,IAAI,EAAE,AAACI,CAAAA,YAAY,SAASA,YAAY,MAAK,KAAMM,oBAAoB,CAACP,WAAW,EAAED,MAAMrG,eAAe,CAAC+G,SAAS;IACndV,MAAMvG,KAAK,CAACiH,SAAS,GAAGC,IAAAA,mBAAY,EAACrH,qBAAqBG,KAAK,EAAE0E,qBAAqBV,YAAYgD,YAAYhD,QAAQ,EAAEuC,MAAMvG,KAAK,CAACiH,SAAS;IAC7I,OAAOV;AACT,GACA,sDAAsD"}
|
1
|
+
{"version":3,"sources":["useSpinButtonStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const spinButtonClassNames = {\n root: 'fui-SpinButton',\n input: 'fui-SpinButton__input',\n incrementButton: 'fui-SpinButton__incrementButton',\n decrementButton: 'fui-SpinButton__decrementButton'\n};\nconst spinButtonExtraClassNames = {\n buttonActive: 'fui-SpinButton__button_active'\n};\nconst fieldHeights = {\n small: '24px',\n medium: '32px'\n};\nconst useRootClassName = /*#__PURE__*/__resetStyles(\"rkqmps4\", \"r1trw52p\", {\n r: [\".rkqmps4{display:inline-grid;grid-template-columns:1fr 24px;grid-template-rows:1fr 1fr;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);}\", \".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);}\", \".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);clip-path:inset(calc(100% - 2px) 0 0 0);transform:scaleX(0);transition-property:transform;transition-duration:var(--durationUltraFast);transition-delay:var(--curveAccelerateMid);}\", \".rkqmps4:focus-within::after{transform:scaleX(1);transition-property:transform;transition-duration:var(--durationNormal);transition-delay:var(--curveDecelerateMid);}\", \".rkqmps4:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}\", \".rkqmps4:focus-within{outline:2px solid transparent;}\", \".r1trw52p{display:inline-grid;grid-template-columns:1fr 24px;grid-template-rows:1fr 1fr;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);}\", \".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);}\", \".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);clip-path:inset(calc(100% - 2px) 0 0 0);transform:scaleX(0);transition-property:transform;transition-duration:var(--durationUltraFast);transition-delay:var(--curveAccelerateMid);}\", \".r1trw52p:focus-within::after{transform:scaleX(1);transition-property:transform;transition-duration:var(--durationNormal);transition-delay:var(--curveDecelerateMid);}\", \".r1trw52p:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}\", \".r1trw52p:focus-within{outline:2px solid transparent;}\"],\n s: [\"@media screen and (prefers-reduced-motion: reduce){.rkqmps4::after{transition-duration:0.01ms;transition-delay:0.01ms;}}\", \"@media screen and (prefers-reduced-motion: reduce){.rkqmps4:focus-within::after{transition-duration:0.01ms;transition-delay:0.01ms;}}\", \"@media screen and (prefers-reduced-motion: reduce){.r1trw52p::after{transition-duration:0.01ms;transition-delay:0.01ms;}}\", \"@media screen and (prefers-reduced-motion: reduce){.r1trw52p:focus-within::after{transition-duration:0.01ms;transition-delay:0.01ms;}}\"]\n});\nconst useRootStyles = /*#__PURE__*/__styles({\n small: {\n sshi5w: \"f1pha7fy\",\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fy9rknc\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"fwrc4pm\",\n uwmqm3: [\"f1f5gg8d\", \"f1vdfbxk\"]\n },\n medium: {},\n outline: {},\n outlineInteractive: {\n Bo3r8zu: \"f1w2y1rc\",\n Hpvxnh: [\"f1gofhvl\", \"f18htlvq\"],\n Bx11ytk: \"ffcnd28\",\n B1rg0w0: [\"f18htlvq\", \"f1gofhvl\"],\n Bsg1tlv: \"f6lmxco\",\n Brjw370: [\"fcoc0mf\", \"f15r4wkl\"],\n xcfy85: \"f1ipdth8\",\n Bcc6kan: [\"f15r4wkl\", \"fcoc0mf\"]\n },\n underline: {\n B0qfbqy: \"f1o236ok\",\n B4f6apu: [\"faeg28l\", \"f64aojp\"],\n y0oebl: \"fdw6hkg\",\n uvfttm: [\"f64aojp\", \"faeg28l\"],\n Budzafs: [\"f1vk4jnx\", \"f1v3v894\"],\n r59vdv: [\"f1v3v894\", \"f1vk4jnx\"],\n n07z76: [\"fzi2j54\", \"f1un0uoc\"],\n ck0cow: [\"f1un0uoc\", \"fzi2j54\"]\n },\n underlineInteractive: {\n Bx11ytk: \"ffcnd28\",\n xcfy85: \"f1ipdth8\",\n B3778ie: [\"f9pmbr4\", \"ffh3ws5\"],\n d9w3h3: [\"ffh3ws5\", \"f9pmbr4\"],\n Bl18szs: [\"f19438ov\", \"f1i9y5j\"],\n B4j8arr: [\"f1i9y5j\", \"f19438ov\"]\n },\n filled: {\n B0qfbqy: \"f1fjh9ub\",\n B4f6apu: [\"ff9c942\", \"f6rdg5o\"],\n y0oebl: \"fdw6hkg\",\n uvfttm: [\"f6rdg5o\", \"ff9c942\"],\n Bdkvgpv: \"f163fonl\",\n m598lv: [\"f1yq6w5o\", \"f1jpmc5p\"],\n qa3bma: \"f11yjt3y\",\n Bbv0w2i: [\"f1jpmc5p\", \"f1yq6w5o\"],\n Bq4z7u6: \"f7dgwnz\",\n Bk5zm6e: [\"f1edeodt\", \"fszsv3f\"],\n Bqjgrrk: \"f1172wan\",\n Bm6vgfq: [\"fszsv3f\", \"f1edeodt\"]\n },\n \"filled-darker\": {\n De3pzq: \"f16xq7d1\"\n },\n \"filled-lighter\": {\n De3pzq: \"fxugw4r\"\n },\n filledInteractive: {\n B05mzqr: \"f1xqt08\",\n tb9y6h: [\"fzt5lgo\", \"f8tv3r9\"],\n jcehpj: \"fyhrops\",\n B23o0hn: [\"f8tv3r9\", \"fzt5lgo\"]\n },\n invalid: {\n emecyz: \"fl48pg9\",\n lz0pba: [\"f1a168p3\", \"f1pvdymy\"],\n Bo1k74p: \"f11knvgl\",\n Ba322q7: [\"f1pvdymy\", \"f1a168p3\"]\n },\n disabled: {\n Bceei9c: \"fdrzuqr\",\n De3pzq: \"f1c21dwh\",\n Bq4z7u6: \"f1a0lfh7\",\n Bk5zm6e: [\"f1p2ejm6\", \"fmzytvz\"],\n Bqjgrrk: \"fas2e61\",\n Bm6vgfq: [\"fmzytvz\", \"f1p2ejm6\"],\n Cffpyd: \"flb8es4\",\n hxi8he: [\"f1lclws\", \"frjp63v\"],\n Bcuq369: \"f1yv9wnt\",\n Imo2if: [\"frjp63v\", \"f1lclws\"]\n }\n}, {\n d: [\".f1pha7fy{min-height:24px;}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fy9rknc{font-size:var(--fontSizeBase200);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".fwrc4pm{line-height:var(--lineHeightBase200);}\", \".f1f5gg8d{padding-left:var(--spacingHorizontalS);}\", \".f1vdfbxk{padding-right:var(--spacingHorizontalS);}\", \".f1o236ok::before{border-top-width:0;}\", \".faeg28l::before{border-right-width:0;}\", \".f64aojp::before{border-left-width:0;}\", \".fdw6hkg::before{border-bottom-width:1px;}\", \".f1vk4jnx::before{border-bottom-right-radius:var(--borderRadiusNone);}\", \".f1v3v894::before{border-bottom-left-radius:var(--borderRadiusNone);}\", \".fzi2j54::before{border-top-right-radius:var(--borderRadiusNone);}\", \".f1un0uoc::before{border-top-left-radius:var(--borderRadiusNone);}\", \".f9pmbr4::after{border-bottom-right-radius:var(--borderRadiusNone);}\", \".ffh3ws5::after{border-bottom-left-radius:var(--borderRadiusNone);}\", \".f19438ov::after{border-top-right-radius:var(--borderRadiusNone);}\", \".f1i9y5j::after{border-top-left-radius:var(--borderRadiusNone);}\", \".f1fjh9ub::before{border-top-width:1px;}\", \".ff9c942::before{border-right-width:1px;}\", \".f6rdg5o::before{border-left-width:1px;}\", \".f163fonl::before{border-top-style:solid;}\", \".f1yq6w5o::before{border-right-style:solid;}\", \".f1jpmc5p::before{border-left-style:solid;}\", \".f11yjt3y::before{border-bottom-style:solid;}\", \".f7dgwnz::before{border-top-color:var(--colorTransparentStroke);}\", \".f1edeodt::before{border-right-color:var(--colorTransparentStroke);}\", \".fszsv3f::before{border-left-color:var(--colorTransparentStroke);}\", \".f1172wan::before{border-bottom-color:var(--colorTransparentStroke);}\", \".f16xq7d1{background-color:var(--colorNeutralBackground3);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".fl48pg9:not(:focus-within)::before,.fl48pg9:hover:not(:focus-within)::before{border-top-color:var(--colorPaletteRedBorder2);}\", \".f1a168p3:not(:focus-within)::before,.f1a168p3:hover:not(:focus-within)::before{border-right-color:var(--colorPaletteRedBorder2);}\", \".f1pvdymy:not(:focus-within)::before,.f1pvdymy:hover:not(:focus-within)::before{border-left-color:var(--colorPaletteRedBorder2);}\", \".f11knvgl:not(:focus-within)::before,.f11knvgl:hover:not(:focus-within)::before{border-bottom-color:var(--colorPaletteRedBorder2);}\", \".fdrzuqr{cursor:not-allowed;}\", \".f1c21dwh{background-color:var(--colorTransparentBackground);}\", \".f1a0lfh7::before{border-top-color:var(--colorNeutralStrokeDisabled);}\", \".f1p2ejm6::before{border-right-color:var(--colorNeutralStrokeDisabled);}\", \".fmzytvz::before{border-left-color:var(--colorNeutralStrokeDisabled);}\", \".fas2e61::before{border-bottom-color:var(--colorNeutralStrokeDisabled);}\"],\n h: [\".f1w2y1rc:hover::before{border-top-color:var(--colorNeutralStroke1Hover);}\", \".f1gofhvl:hover::before{border-right-color:var(--colorNeutralStroke1Hover);}\", \".f18htlvq:hover::before{border-left-color:var(--colorNeutralStroke1Hover);}\", \".ffcnd28:hover::before{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}\", \".f1xqt08:hover::before,.f1xqt08:focus-within::before{border-top-color:var(--colorTransparentStrokeInteractive);}\", \".fzt5lgo:hover::before,.fzt5lgo:focus-within::before{border-right-color:var(--colorTransparentStrokeInteractive);}\", \".f8tv3r9:hover::before,.f8tv3r9:focus-within::before{border-left-color:var(--colorTransparentStrokeInteractive);}\", \".fyhrops:hover::before,.fyhrops:focus-within::before{border-bottom-color:var(--colorTransparentStrokeInteractive);}\"],\n a: [\".f6lmxco:active::before,.f6lmxco:focus-within::before{border-top-color:var(--colorNeutralStroke1Pressed);}\", \".fcoc0mf:active::before,.fcoc0mf:focus-within::before{border-right-color:var(--colorNeutralStroke1Pressed);}\", \".f15r4wkl:active::before,.f15r4wkl:focus-within::before{border-left-color:var(--colorNeutralStroke1Pressed);}\", \".f1ipdth8:active::before,.f1ipdth8:focus-within::before{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}\"],\n m: [[\"@media (forced-colors: active){.flb8es4::before{border-top-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1lclws::before{border-right-color:GrayText;}.frjp63v::before{border-left-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1yv9wnt::before{border-bottom-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }]]\n});\nconst useInputClassName = /*#__PURE__*/__resetStyles(\"r1ljrqje\", null, [\".r1ljrqje{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;width:100%;}\", \".r1ljrqje::-webkit-input-placeholder{color:var(--colorNeutralForeground4);opacity:1;}\", \".r1ljrqje::-moz-placeholder{color:var(--colorNeutralForeground4);opacity:1;}\", \".r1ljrqje:-ms-input-placeholder{color:var(--colorNeutralForeground4);opacity:1;}\", \".r1ljrqje::placeholder{color:var(--colorNeutralForeground4);opacity:1;}\"]);\nconst useInputStyles = /*#__PURE__*/__styles({\n disabled: {\n sj55zd: \"f1s2aq7o\",\n Bceei9c: \"fdrzuqr\",\n De3pzq: \"f1c21dwh\",\n yvdlaj: \"fahhnxm\"\n }\n}, {\n d: [\".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".fdrzuqr{cursor:not-allowed;}\", \".f1c21dwh{background-color:var(--colorTransparentBackground);}\", \".fahhnxm::-webkit-input-placeholder{color:var(--colorNeutralForegroundDisabled);}\", \".fahhnxm::-moz-placeholder{color:var(--colorNeutralForegroundDisabled);}\"]\n});\nconst useBaseButtonClassName = /*#__PURE__*/__resetStyles(\"r1g4chgs\", null, [\".r1g4chgs{display:inline-flex;width:24px;align-items: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;}\", \".r1g4chgs:active{outline-style:none;}\", \".r1g4chgs:enabled:hover{cursor:pointer;color:var(--colorNeutralForeground3Hover);background-color:var(--colorSubtleBackgroundHover);}\", \".r1g4chgs:enabled:active{color:var(--colorNeutralForeground3Pressed);background-color:var(--colorSubtleBackgroundPressed);}\", \".r1g4chgs:enabled.fui-SpinButton__button_active{color:var(--colorNeutralForeground3Pressed);background-color:var(--colorSubtleBackgroundPressed);}\", \".r1g4chgs:disabled{cursor:not-allowed;color:var(--colorNeutralForegroundDisabled);}\"]);\nconst useButtonStyles = /*#__PURE__*/__styles({\n increment: {\n Ijaq50: \"f16hsg94\",\n B7oj6ja: [\"f1jar5jt\", \"fyu767a\"],\n z8tnut: \"f10ra9hq\",\n Byoj8tv: \"f1brlhvm\"\n },\n decrement: {\n Ijaq50: \"faunodf\",\n Bbmb7ep: [\"f1aa9q02\", \"f16jpd5f\"],\n z8tnut: \"f1sl3k7w\",\n Byoj8tv: \"f1y2xyjm\"\n },\n incrementButtonSmall: {\n z8tnut: \"f1khb0e9\",\n z189sj: [\"f1sgzk6v\", \"f1bg5zqg\"],\n Byoj8tv: \"f1ov4xf1\",\n uwmqm3: [\"fycuoez\", \"f8wuabp\"],\n Bqenvij: \"fvblgha\"\n },\n decrementButtonSmall: {\n z8tnut: \"f1nbblvp\",\n z189sj: [\"f1sgzk6v\", \"f1bg5zqg\"],\n Byoj8tv: \"f1jnq6q7\",\n uwmqm3: [\"fycuoez\", \"f8wuabp\"],\n Bqenvij: \"fvblgha\"\n },\n outline: {},\n underline: {\n De3pzq: \"f3rmtva\",\n sj55zd: \"f11d4kpn\",\n r4wkhp: \"f1no7wuu\",\n B95qlz1: \"f1bifk9c\",\n p743kt: \"fp1zg4s\",\n B7xitij: \"fo6hitd\",\n B6siaa6: \"f1wiab75\",\n Ba9qmo4: \"fj9zm5z\",\n Dyrjrp: \"f1cqwcg4\"\n },\n \"filled-darker\": {\n De3pzq: \"f3rmtva\",\n sj55zd: \"f11d4kpn\",\n r4wkhp: \"f1no7wuu\",\n B95qlz1: \"fwwxidx\",\n p743kt: \"fp1zg4s\",\n B7xitij: \"f14i52sd\",\n B6siaa6: \"f1wiab75\",\n Ba9qmo4: \"fwry2ka\",\n Dyrjrp: \"f1cqwcg4\"\n },\n \"filled-lighter\": {\n De3pzq: \"f3rmtva\",\n sj55zd: \"f11d4kpn\",\n r4wkhp: \"f1no7wuu\",\n B95qlz1: \"f1yywxnv\",\n drw0cw: \"fzaa11h\",\n idzz8t: \"f4fpmm9\",\n Dyrjrp: \"f1cqwcg4\"\n }\n}, {\n d: [\".f16hsg94{grid-row-start:1;}\", \".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}\", \".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}\", \".f10ra9hq{padding-top:4px;}\", \".f1brlhvm{padding-bottom:1px;}\", \".faunodf{grid-row-start:2;}\", \".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f1sl3k7w{padding-top:1px;}\", \".f1y2xyjm{padding-bottom:4px;}\", \".f1khb0e9{padding-top:3px;}\", \".f1sgzk6v{padding-right:6px;}\", \".f1bg5zqg{padding-left:6px;}\", \".f1ov4xf1{padding-bottom:0px;}\", \".fycuoez{padding-left:4px;}\", \".f8wuabp{padding-right:4px;}\", \".fvblgha{height:12px;}\", \".f1nbblvp{padding-top:0px;}\", \".f1jnq6q7{padding-bottom:3px;}\", \".f3rmtva{background-color:transparent;}\", \".f11d4kpn{color:var(--colorNeutralForeground3);}\", \".f1no7wuu:enabled:hover{color:var(--colorNeutralForeground3Hover);}\", \".f1bifk9c:enabled:hover{background-color:var(--colorSubtleBackgroundHover);}\", \".fp1zg4s:enabled:active{color:var(--colorNeutralForeground3Pressed);}\", \".fo6hitd:enabled:active{background-color:var(--colorSubtleBackgroundPressed);}\", \".f1wiab75:enabled.fui-SpinButton__button_active{color:var(--colorNeutralForeground3Pressed);}\", \".fj9zm5z:enabled.fui-SpinButton__button_active{background-color:var(--colorSubtleBackgroundPressed);}\", \".f1cqwcg4:disabled{color:var(--colorNeutralForegroundDisabled);}\", \".fwwxidx:enabled:hover{background-color:var(--colorNeutralBackground3Hover);}\", \".f14i52sd:enabled:active{background-color:var(--colorNeutralBackground3Pressed);}\", \".fwry2ka:enabled.fui-SpinButton__button_active{background-color:var(--colorNeutralBackground3Pressed);}\", \".f1yywxnv:enabled:hover{background-color:var(--colorNeutralBackground1Hover);}\", \".fzaa11h:enabled:active,.fzaa11h:enabled.fui-SpinButton__button_active{color:var(--colorNeutralForeground3Pressed);}\", \".f4fpmm9:enabled:active,.f4fpmm9:enabled.fui-SpinButton__button_active{background-color:var(--colorNeutralBackground1Pressed);}\"]\n});\n// Cannot just disable button as they need to remain\n// exposed to ATs like screen readers.\nconst useButtonDisabledStyles = /*#__PURE__*/__styles({\n base: {\n Bceei9c: \"fdrzuqr\",\n eoavqd: \"fphbwmw\"\n },\n outline: {\n sj55zd: \"f1s2aq7o\",\n r4wkhp: \"few7wvn\",\n B95qlz1: \"f110wuh6\",\n p743kt: \"f9s4mys\",\n B7xitij: \"f10404rc\",\n B6siaa6: \"fwzu9cz\",\n Ba9qmo4: \"f1snwkb6\"\n },\n underline: {\n sj55zd: \"f1s2aq7o\",\n r4wkhp: \"few7wvn\",\n B95qlz1: \"f110wuh6\",\n p743kt: \"f9s4mys\",\n B7xitij: \"f10404rc\",\n B6siaa6: \"fwzu9cz\",\n Ba9qmo4: \"f1snwkb6\"\n },\n \"filled-darker\": {\n sj55zd: \"f1s2aq7o\",\n r4wkhp: \"few7wvn\",\n B95qlz1: \"f110wuh6\",\n p743kt: \"f9s4mys\",\n B7xitij: \"f10404rc\",\n B6siaa6: \"fwzu9cz\",\n Ba9qmo4: \"f1snwkb6\"\n },\n \"filled-lighter\": {\n sj55zd: \"f1s2aq7o\",\n r4wkhp: \"few7wvn\",\n B95qlz1: \"f110wuh6\",\n p743kt: \"f9s4mys\",\n B7xitij: \"f10404rc\",\n B6siaa6: \"fwzu9cz\",\n Ba9qmo4: \"f1snwkb6\"\n }\n}, {\n d: [\".fdrzuqr{cursor:not-allowed;}\", \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".few7wvn:enabled:hover{color:var(--colorNeutralForegroundDisabled);}\", \".f110wuh6:enabled:hover{background-color:transparent;}\", \".f9s4mys:enabled:active{color:var(--colorNeutralForegroundDisabled);}\", \".f10404rc:enabled:active{background-color:transparent;}\", \".fwzu9cz:enabled.fui-SpinButton__button_active{color:var(--colorNeutralForegroundDisabled);}\", \".f1snwkb6:enabled.fui-SpinButton__button_active{background-color:transparent;}\"],\n h: [\".fphbwmw:hover{cursor:not-allowed;}\"]\n});\n/**\n * Apply styling to the SpinButton slots based on the state\n */\nexport const useSpinButtonStyles_unstable = state => {\n const {\n appearance,\n atBound,\n spinState,\n size\n } = state;\n const disabled = state.input.disabled;\n const invalid = `${state.input['aria-invalid']}` === 'true';\n const filled = appearance.startsWith('filled');\n const rootStyles = useRootStyles();\n const buttonStyles = useButtonStyles();\n const buttonDisabledStyles = useButtonDisabledStyles();\n const inputStyles = useInputStyles();\n state.root.className = 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);\n state.incrementButton.className = 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);\n state.decrementButton.className = 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);\n state.input.className = mergeClasses(spinButtonClassNames.input, useInputClassName(), disabled && inputStyles.disabled, state.input.className);\n return state;\n};\n//# sourceMappingURL=useSpinButtonStyles.styles.js.map"],"names":["spinButtonClassNames","useSpinButtonStyles_unstable","root","input","incrementButton","decrementButton","spinButtonExtraClassNames","buttonActive","fieldHeights","small","medium","useRootClassName","__resetStyles","r","s","useRootStyles","__styles","sshi5w","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","uwmqm3","outline","outlineInteractive","Bo3r8zu","Hpvxnh","Bx11ytk","B1rg0w0","Bsg1tlv","Brjw370","xcfy85","Bcc6kan","underline","B0qfbqy","B4f6apu","y0oebl","uvfttm","Budzafs","r59vdv","n07z76","ck0cow","underlineInteractive","B3778ie","d9w3h3","Bl18szs","B4j8arr","filled","Bdkvgpv","m598lv","qa3bma","Bbv0w2i","Bq4z7u6","Bk5zm6e","Bqjgrrk","Bm6vgfq","De3pzq","filledInteractive","B05mzqr","tb9y6h","jcehpj","B23o0hn","invalid","emecyz","lz0pba","Bo1k74p","Ba322q7","disabled","Bceei9c","Cffpyd","hxi8he","Bcuq369","Imo2if","d","h","a","m","useInputClassName","useInputStyles","sj55zd","yvdlaj","useBaseButtonClassName","useButtonStyles","increment","Ijaq50","B7oj6ja","z8tnut","Byoj8tv","decrement","Bbmb7ep","incrementButtonSmall","z189sj","Bqenvij","decrementButtonSmall","r4wkhp","B95qlz1","p743kt","B7xitij","B6siaa6","Ba9qmo4","Dyrjrp","drw0cw","idzz8t","useButtonDisabledStyles","base","eoavqd","state","appearance","atBound","spinState","size","startsWith","rootStyles","buttonStyles","buttonDisabledStyles","inputStyles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,oBAAoB;eAApBA;;IA4OAC,4BAA4B;eAA5BA;;;uBA9OqD;A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SAAS,GAAGC,IAAAA,mBAAY,EAACrH,qBAAqBK,eAAe,EAAEwG,cAAc,UAAU,CAAC,EAAEvG,0BAA0BC,YAAY,CAAC,CAAC,EAAE0E,0BAA0BgC,aAAazB,SAAS,EAAEyB,YAAY,CAACN,WAAW,EAAEG,SAAS,WAAWG,aAAapB,oBAAoB,EAAE,AAACe,CAAAA,YAAY,SAASA,YAAY,MAAK,KAAMM,qBAAqBV,IAAI,EAAE,AAACI,CAAAA,YAAY,SAASA,YAAY,MAAK,KAAMM,oBAAoB,CAACP,WAAW,EAAED,MAAMrG,eAAe,CAAC+G,SAAS;IACndV,MAAMvG,KAAK,CAACiH,SAAS,GAAGC,IAAAA,mBAAY,EAACrH,qBAAqBG,KAAK,EAAE0E,qBAAqBV,YAAYgD,YAAYhD,QAAQ,EAAEuC,MAAMvG,KAAK,CAACiH,SAAS;IAC7I,OAAOV;AACT,GACA,sDAAsD"}
|
package/lib-commonjs/index.js
CHANGED
@@ -9,10 +9,20 @@ function _export(target, all) {
|
|
9
9
|
});
|
10
10
|
}
|
11
11
|
_export(exports, {
|
12
|
-
SpinButton: ()
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
SpinButton: function() {
|
13
|
+
return _SpinButton.SpinButton;
|
14
|
+
},
|
15
|
+
renderSpinButton_unstable: function() {
|
16
|
+
return _SpinButton.renderSpinButton_unstable;
|
17
|
+
},
|
18
|
+
spinButtonClassNames: function() {
|
19
|
+
return _SpinButton.spinButtonClassNames;
|
20
|
+
},
|
21
|
+
useSpinButtonStyles_unstable: function() {
|
22
|
+
return _SpinButton.useSpinButtonStyles_unstable;
|
23
|
+
},
|
24
|
+
useSpinButton_unstable: function() {
|
25
|
+
return _SpinButton.useSpinButton_unstable;
|
26
|
+
}
|
17
27
|
});
|
18
|
-
const
|
28
|
+
const _SpinButton = require("./SpinButton");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.js"],"sourcesContent":["export { SpinButton, renderSpinButton_unstable, spinButtonClassNames, useSpinButtonStyles_unstable, useSpinButton_unstable } from './SpinButton';\n"],"names":["SpinButton","renderSpinButton_unstable","spinButtonClassNames","useSpinButtonStyles_unstable","useSpinButton_unstable"],"mappings":";;;;;;;;;;;IAASA,UAAU,
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export { SpinButton, renderSpinButton_unstable, spinButtonClassNames, useSpinButtonStyles_unstable, useSpinButton_unstable } from './SpinButton';\n"],"names":["SpinButton","renderSpinButton_unstable","spinButtonClassNames","useSpinButtonStyles_unstable","useSpinButton_unstable"],"mappings":";;;;;;;;;;;IAASA,UAAU;eAAVA,sBAAU;;IAAEC,yBAAyB;eAAzBA,qCAAyB;;IAAEC,oBAAoB;eAApBA,gCAAoB;;IAAEC,4BAA4B;eAA5BA,wCAA4B;;IAAEC,sBAAsB;eAAtBA,kCAAsB;;;4BAAQ"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["clamp.js"],"sourcesContent":["export const clamp = (value, min, max)=>{\n let nextValue = value;\n if (min !== undefined) {\n if (max !== undefined && min > max) {\n const error = new Error();\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error([\n `\"min\" value \"${min}\" is greater than \"max\" value \"${max}\".`,\n '\"min\" must be less than or equal to \"max\".',\n `Returning value \"${value}\".`,\n error.stack\n ].join());\n }\n return value;\n }\n nextValue = Math.max(min, nextValue);\n }\n if (max !== undefined) {\n nextValue = Math.min(max, nextValue);\n }\n return nextValue;\n};\n"],"names":["clamp","value","min","max","nextValue","undefined","error","Error","process","env","NODE_ENV","console","stack","join","Math"],"mappings":";;;;+BAAaA
|
1
|
+
{"version":3,"sources":["clamp.js"],"sourcesContent":["export const clamp = (value, min, max)=>{\n let nextValue = value;\n if (min !== undefined) {\n if (max !== undefined && min > max) {\n const error = new Error();\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error([\n `\"min\" value \"${min}\" is greater than \"max\" value \"${max}\".`,\n '\"min\" must be less than or equal to \"max\".',\n `Returning value \"${value}\".`,\n error.stack\n ].join());\n }\n return value;\n }\n nextValue = Math.max(min, nextValue);\n }\n if (max !== undefined) {\n nextValue = Math.min(max, nextValue);\n }\n return nextValue;\n};\n"],"names":["clamp","value","min","max","nextValue","undefined","error","Error","process","env","NODE_ENV","console","stack","join","Math"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,QAAQ,CAACC,OAAOC,KAAKC;IAC9B,IAAIC,YAAYH;IAChB,IAAIC,QAAQG,WAAW;QACnB,IAAIF,QAAQE,aAAaH,MAAMC,KAAK;YAChC,MAAMG,QAAQ,IAAIC;YAClB,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;gBACvC,sCAAsC;gBACtCC,QAAQL,KAAK,CAAC;oBACV,CAAC,aAAa,EAAEJ,IAAI,+BAA+B,EAAEC,IAAI,EAAE,CAAC;oBAC5D;oBACA,CAAC,iBAAiB,EAAEF,MAAM,EAAE,CAAC;oBAC7BK,MAAMM,KAAK;iBACd,CAACC,IAAI;YACV;YACA,OAAOZ;QACX;QACAG,YAAYU,KAAKX,GAAG,CAACD,KAAKE;IAC9B;IACA,IAAID,QAAQE,WAAW;QACnBD,YAAYU,KAAKZ,GAAG,CAACC,KAAKC;IAC9B;IACA,OAAOA;AACX"}
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "getBound", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return getBound;
|
9
|
+
}
|
8
10
|
});
|
9
11
|
const getBound = (value, min, max)=>{
|
10
12
|
if (min !== undefined && value === min) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["getBound.js"],"sourcesContent":["export const getBound = (value, min, max)=>{\n if (min !== undefined && value === min) {\n if (max === min) {\n return 'both';\n }\n return 'min';\n } else if (max !== undefined && value === max) {\n return 'max';\n }\n return 'none';\n};\n"],"names":["getBound","value","min","max","undefined"],"mappings":";;;;+BAAaA
|
1
|
+
{"version":3,"sources":["getBound.js"],"sourcesContent":["export const getBound = (value, min, max)=>{\n if (min !== undefined && value === min) {\n if (max === min) {\n return 'both';\n }\n return 'min';\n } else if (max !== undefined && value === max) {\n return 'max';\n }\n return 'none';\n};\n"],"names":["getBound","value","min","max","undefined"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,WAAW,CAACC,OAAOC,KAAKC;IACjC,IAAID,QAAQE,aAAaH,UAAUC,KAAK;QACpC,IAAIC,QAAQD,KAAK;YACb,OAAO;QACX;QACA,OAAO;IACX,OAAO,IAAIC,QAAQC,aAAaH,UAAUE,KAAK;QAC3C,OAAO;IACX;IACA,OAAO;AACX"}
|