@cerberus-design/react 0.25.1-rc.1 → 0.25.2-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/primitives.cjs +2 -2
- package/dist/components/accordion/primitives.js +2 -2
- package/dist/components/admonition/primitives.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/button/primitives.js +1 -1
- package/dist/components/carousel/parts.js +1 -1
- package/dist/components/carousel/primitives.cjs +3 -3
- package/dist/components/carousel/primitives.js +3 -3
- package/dist/components/circular-progress/primitives.cjs +4 -4
- package/dist/components/circular-progress/primitives.js +5 -5
- package/dist/components/clipboard/primitives.cjs +4 -4
- package/dist/components/clipboard/primitives.js +4 -4
- package/dist/components/collapsible/index.cjs +1 -0
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/collapsible/parts.cjs +1 -0
- package/dist/components/collapsible/parts.d.cts +4 -0
- package/dist/components/collapsible/parts.d.ts +4 -0
- package/dist/components/collapsible/parts.js +2 -1
- package/dist/components/collapsible/primitives.cjs +3 -0
- package/dist/components/collapsible/primitives.d.cts +6 -1
- package/dist/components/collapsible/primitives.d.ts +6 -1
- package/dist/components/collapsible/primitives.js +3 -1
- package/dist/components/combobox/combobox.cjs +1 -2
- package/dist/components/combobox/combobox.d.cts +0 -5
- package/dist/components/combobox/combobox.d.ts +0 -5
- package/dist/components/combobox/combobox.js +1 -2
- package/dist/components/combobox/primitives.cjs +7 -7
- package/dist/components/combobox/primitives.js +7 -7
- package/dist/components/date-picker/calendar.cjs +1 -1
- package/dist/components/date-picker/calendar.d.cts +0 -5
- package/dist/components/date-picker/calendar.d.ts +0 -5
- package/dist/components/date-picker/calendar.js +1 -1
- package/dist/components/date-picker/index.cjs +4 -4
- package/dist/components/date-picker/index.js +2 -2
- package/dist/components/date-picker/primitives.cjs +7 -7
- package/dist/components/date-picker/primitives.js +7 -7
- package/dist/components/deprecated/Legend.js +1 -1
- package/dist/components/deprecated/NavMenuLink.js +1 -1
- package/dist/components/dialog/primitives.cjs +2 -2
- package/dist/components/dialog/primitives.js +2 -2
- package/dist/components/field/primitives.cjs +2 -2
- package/dist/components/field/primitives.js +2 -2
- package/dist/components/file-upload/file-status.js +1 -1
- package/dist/components/file-upload/file-uploader.cjs +1 -1
- package/dist/components/file-upload/file-uploader.js +1 -1
- package/dist/components/file-upload/index.cjs +1 -0
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/file-upload/parts.cjs +1 -0
- package/dist/components/file-upload/parts.d.cts +4 -0
- package/dist/components/file-upload/parts.d.ts +4 -0
- package/dist/components/file-upload/parts.js +2 -1
- package/dist/components/file-upload/primitives.cjs +11 -9
- package/dist/components/file-upload/primitives.d.cts +2 -0
- package/dist/components/file-upload/primitives.d.ts +2 -0
- package/dist/components/file-upload/primitives.js +11 -10
- package/dist/components/file-upload/utils.cjs +1 -1
- package/dist/components/file-upload/utils.js +1 -1
- package/dist/components/menu/menu.js +1 -1
- package/dist/components/notifications/index.cjs +4 -4
- package/dist/components/notifications/index.js +1 -1
- package/dist/components/number-input/primitives.cjs +3 -3
- package/dist/components/number-input/primitives.js +3 -3
- package/dist/components/pin-input/primitives.cjs +1 -1
- package/dist/components/pin-input/primitives.js +1 -1
- package/dist/components/progress/primitives.js +1 -1
- package/dist/components/radio/primitives.cjs +3 -3
- package/dist/components/radio/primitives.js +3 -3
- package/dist/components/rating/primitives.cjs +2 -2
- package/dist/components/rating/primitives.js +2 -2
- package/dist/components/select/primitives.cjs +8 -8
- package/dist/components/select/primitives.js +8 -8
- package/dist/components/select/select.d.cts +0 -5
- package/dist/components/select/select.d.ts +0 -5
- package/dist/components/switch/primitives.cjs +2 -2
- package/dist/components/switch/primitives.js +2 -2
- package/dist/components/table/primitives.js +1 -1
- package/dist/components/tabs/parts.js +1 -1
- package/dist/components/tabs/primitives.cjs +2 -2
- package/dist/components/tabs/primitives.js +2 -2
- package/dist/components/tooltip/primitives.cjs +4 -4
- package/dist/components/tooltip/primitives.js +4 -4
- package/dist/context/cerberus.js +1 -1
- package/dist/context/confirm-modal.js +1 -1
- package/dist/context/feature-flags.js +1 -1
- package/dist/context/navMenu.js +1 -1
- package/dist/context/prompt-modal.js +1 -1
- package/dist/context/theme.js +1 -1
- package/dist/index.cjs +266 -256
- package/dist/index.client.d.cts +1 -1
- package/dist/index.client.d.ts +1 -1
- package/dist/index.js +9 -9
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-root-provider.cjs +21 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-root-provider.js +17 -0
- package/dist/node_modules/.pnpm/{@floating-ui_core@1.7.3 → @floating-ui_core@1.7.4}/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +79 -73
- package/dist/node_modules/.pnpm/{@floating-ui_core@1.7.3 → @floating-ui_core@1.7.4}/node_modules/@floating-ui/core/dist/floating-ui.core.js +80 -74
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +2 -2
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.0/node_modules/@internationalized/date/src/queries.js +1 -1
- package/dist/node_modules/.pnpm/@zag-js_accordion@1.31.1/node_modules/@zag-js/accordion/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@zag-js_avatar@1.31.1/node_modules/@zag-js/avatar/dist/index.cjs +5 -5
- package/dist/node_modules/.pnpm/@zag-js_carousel@1.31.1/node_modules/@zag-js/carousel/dist/index.cjs +16 -16
- package/dist/node_modules/.pnpm/@zag-js_carousel@1.31.1/node_modules/@zag-js/carousel/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@zag-js_clipboard@1.31.1/node_modules/@zag-js/clipboard/dist/index.cjs +4 -4
- package/dist/node_modules/.pnpm/@zag-js_clipboard@1.31.1/node_modules/@zag-js/clipboard/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@zag-js_collapsible@1.31.1/node_modules/@zag-js/collapsible/dist/index.cjs +11 -11
- package/dist/node_modules/.pnpm/@zag-js_collapsible@1.31.1/node_modules/@zag-js/collapsible/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@zag-js_combobox@1.31.1/node_modules/@zag-js/combobox/dist/index.cjs +84 -84
- package/dist/node_modules/.pnpm/@zag-js_combobox@1.31.1/node_modules/@zag-js/combobox/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@zag-js_date-picker@1.31.1_@internationalized_date@3.10.0/node_modules/@zag-js/date-picker/dist/index.cjs +154 -154
- package/dist/node_modules/.pnpm/@zag-js_date-picker@1.31.1_@internationalized_date@3.10.0/node_modules/@zag-js/date-picker/dist/index.js +4 -4
- package/dist/node_modules/.pnpm/@zag-js_date-utils@1.31.1_@internationalized_date@3.10.0/node_modules/@zag-js/date-utils/dist/index.cjs +1 -1
- package/dist/node_modules/.pnpm/@zag-js_date-utils@1.31.1_@internationalized_date@3.10.0/node_modules/@zag-js/date-utils/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@zag-js_dialog@1.31.1/node_modules/@zag-js/dialog/dist/index.cjs +14 -14
- package/dist/node_modules/.pnpm/@zag-js_file-upload@1.31.1/node_modules/@zag-js/file-upload/dist/index.cjs +47 -47
- package/dist/node_modules/.pnpm/@zag-js_file-upload@1.31.1/node_modules/@zag-js/file-upload/dist/index.js +3 -3
- package/dist/node_modules/.pnpm/@zag-js_number-input@1.31.1/node_modules/@zag-js/number-input/dist/index.cjs +53 -53
- package/dist/node_modules/.pnpm/@zag-js_number-input@1.31.1/node_modules/@zag-js/number-input/dist/index.js +3 -3
- package/dist/node_modules/.pnpm/@zag-js_pin-input@1.31.1/node_modules/@zag-js/pin-input/dist/index.cjs +44 -44
- package/dist/node_modules/.pnpm/@zag-js_pin-input@1.31.1/node_modules/@zag-js/pin-input/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@zag-js_progress@1.31.1/node_modules/@zag-js/progress/dist/index.cjs +6 -6
- package/dist/node_modules/.pnpm/@zag-js_rating-group@1.31.1/node_modules/@zag-js/rating-group/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@zag-js_react@1.31.1_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@zag-js/react/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@zag-js_remove-scroll@1.31.1/node_modules/@zag-js/remove-scroll/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@zag-js_select@1.31.1/node_modules/@zag-js/select/dist/index.cjs +5 -5
- package/dist/node_modules/.pnpm/@zag-js_tabs@1.31.1/node_modules/@zag-js/tabs/dist/index.cjs +37 -37
- package/dist/node_modules/.pnpm/@zag-js_tabs@1.31.1/node_modules/@zag-js/tabs/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@zag-js_toast@1.31.1/node_modules/@zag-js/toast/dist/index.cjs +33 -33
- package/dist/node_modules/.pnpm/@zag-js_toast@1.31.1/node_modules/@zag-js/toast/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@zag-js_tooltip@1.31.1/node_modules/@zag-js/tooltip/dist/index.cjs +9 -9
- package/dist/node_modules/.pnpm/@zag-js_tooltip@1.31.1/node_modules/@zag-js/tooltip/dist/index.js +1 -1
- package/package.json +3 -3
- package/src/components/collapsible/parts.ts +6 -0
- package/src/components/collapsible/primitives.tsx +6 -0
- package/src/components/combobox/combobox.tsx +0 -6
- package/src/components/date-picker/calendar.tsx +1 -6
- package/src/components/file-upload/file-uploader.tsx +2 -2
- package/src/components/file-upload/parts.tsx +6 -0
- package/src/components/file-upload/primitives.ts +5 -0
- package/src/components/file-upload/utils.ts +1 -1
- package/src/components/select/select.tsx +0 -5
- package/src/index.client.ts +2 -0
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const index$3 = require('../../../../../@zag-js_anatomy@1.31.1/node_modules/@zag-js/anatomy/dist/index.cjs');
|
|
6
|
-
const index
|
|
6
|
+
const index = require('../../../../../@zag-js_dom-query@1.31.1/node_modules/@zag-js/dom-query/dist/index.cjs');
|
|
7
7
|
const index$1 = require('../../../../../@zag-js_utils@1.31.1/node_modules/@zag-js/utils/dist/index.cjs');
|
|
8
|
-
const index = require('../../../../../@zag-js_core@1.31.1/node_modules/@zag-js/core/dist/index.cjs');
|
|
8
|
+
const index$2 = require('../../../../../@zag-js_core@1.31.1/node_modules/@zag-js/core/dist/index.cjs');
|
|
9
9
|
const index$4 = require('../../../../../@zag-js_types@1.31.1/node_modules/@zag-js/types/dist/index.cjs');
|
|
10
10
|
const NumberParser = require('../../../../../@internationalized_number@3.6.5/node_modules/@internationalized/number/src/NumberParser.cjs');
|
|
11
11
|
|
|
@@ -43,7 +43,7 @@ var getPressedTriggerEl = (ctx, hint) => {
|
|
|
43
43
|
return btnEl;
|
|
44
44
|
};
|
|
45
45
|
var setupVirtualCursor = (ctx, point) => {
|
|
46
|
-
if (index
|
|
46
|
+
if (index.isSafari()) return;
|
|
47
47
|
createVirtualCursor(ctx, point);
|
|
48
48
|
return () => {
|
|
49
49
|
getCursorEl(ctx)?.remove();
|
|
@@ -94,7 +94,7 @@ var createVirtualCursor = (ctx, point) => {
|
|
|
94
94
|
pointerEvents: "none",
|
|
95
95
|
left: "0px",
|
|
96
96
|
top: "0px",
|
|
97
|
-
zIndex: index
|
|
97
|
+
zIndex: index.MAX_Z_INDEX,
|
|
98
98
|
transform: point ? `translate3d(${point.x}px, ${point.y}px, 0px)` : void 0,
|
|
99
99
|
willChange: "transform"
|
|
100
100
|
});
|
|
@@ -230,21 +230,21 @@ function connect(service, normalize) {
|
|
|
230
230
|
id: getRootId(scope),
|
|
231
231
|
...parts.root.attrs,
|
|
232
232
|
dir: prop("dir"),
|
|
233
|
-
"data-disabled": index
|
|
234
|
-
"data-focus": index
|
|
235
|
-
"data-invalid": index
|
|
236
|
-
"data-scrubbing": index
|
|
233
|
+
"data-disabled": index.dataAttr(disabled),
|
|
234
|
+
"data-focus": index.dataAttr(focused),
|
|
235
|
+
"data-invalid": index.dataAttr(invalid),
|
|
236
|
+
"data-scrubbing": index.dataAttr(scrubbing)
|
|
237
237
|
});
|
|
238
238
|
},
|
|
239
239
|
getLabelProps() {
|
|
240
240
|
return normalize.label({
|
|
241
241
|
...parts.label.attrs,
|
|
242
242
|
dir: prop("dir"),
|
|
243
|
-
"data-disabled": index
|
|
244
|
-
"data-focus": index
|
|
245
|
-
"data-invalid": index
|
|
246
|
-
"data-required": index
|
|
247
|
-
"data-scrubbing": index
|
|
243
|
+
"data-disabled": index.dataAttr(disabled),
|
|
244
|
+
"data-focus": index.dataAttr(focused),
|
|
245
|
+
"data-invalid": index.dataAttr(invalid),
|
|
246
|
+
"data-required": index.dataAttr(required),
|
|
247
|
+
"data-scrubbing": index.dataAttr(scrubbing),
|
|
248
248
|
id: getLabelId(scope),
|
|
249
249
|
htmlFor: getInputId(scope)
|
|
250
250
|
});
|
|
@@ -255,21 +255,21 @@ function connect(service, normalize) {
|
|
|
255
255
|
dir: prop("dir"),
|
|
256
256
|
role: "group",
|
|
257
257
|
"aria-disabled": disabled,
|
|
258
|
-
"data-focus": index
|
|
259
|
-
"data-disabled": index
|
|
260
|
-
"data-invalid": index
|
|
261
|
-
"data-scrubbing": index
|
|
262
|
-
"aria-invalid": index
|
|
258
|
+
"data-focus": index.dataAttr(focused),
|
|
259
|
+
"data-disabled": index.dataAttr(disabled),
|
|
260
|
+
"data-invalid": index.dataAttr(invalid),
|
|
261
|
+
"data-scrubbing": index.dataAttr(scrubbing),
|
|
262
|
+
"aria-invalid": index.ariaAttr(invalid)
|
|
263
263
|
});
|
|
264
264
|
},
|
|
265
265
|
getValueTextProps() {
|
|
266
266
|
return normalize.element({
|
|
267
267
|
...parts.valueText.attrs,
|
|
268
268
|
dir: prop("dir"),
|
|
269
|
-
"data-disabled": index
|
|
270
|
-
"data-invalid": index
|
|
271
|
-
"data-focus": index
|
|
272
|
-
"data-scrubbing": index
|
|
269
|
+
"data-disabled": index.dataAttr(disabled),
|
|
270
|
+
"data-invalid": index.dataAttr(invalid),
|
|
271
|
+
"data-focus": index.dataAttr(focused),
|
|
272
|
+
"data-scrubbing": index.dataAttr(scrubbing)
|
|
273
273
|
});
|
|
274
274
|
},
|
|
275
275
|
getInputProps() {
|
|
@@ -283,10 +283,10 @@ function connect(service, normalize) {
|
|
|
283
283
|
defaultValue: computed("formattedValue"),
|
|
284
284
|
pattern: prop("formatOptions") ? void 0 : prop("pattern"),
|
|
285
285
|
inputMode: prop("inputMode"),
|
|
286
|
-
"aria-invalid": index
|
|
287
|
-
"data-invalid": index
|
|
286
|
+
"aria-invalid": index.ariaAttr(invalid),
|
|
287
|
+
"data-invalid": index.dataAttr(invalid),
|
|
288
288
|
disabled,
|
|
289
|
-
"data-disabled": index
|
|
289
|
+
"data-disabled": index.dataAttr(disabled),
|
|
290
290
|
readOnly,
|
|
291
291
|
required: prop("required"),
|
|
292
292
|
autoComplete: "off",
|
|
@@ -298,7 +298,7 @@ function connect(service, normalize) {
|
|
|
298
298
|
"aria-valuemax": prop("max"),
|
|
299
299
|
"aria-valuenow": Number.isNaN(computed("valueAsNumber")) ? void 0 : computed("valueAsNumber"),
|
|
300
300
|
"aria-valuetext": computed("valueText"),
|
|
301
|
-
"data-scrubbing": index
|
|
301
|
+
"data-scrubbing": index.dataAttr(scrubbing),
|
|
302
302
|
onFocus() {
|
|
303
303
|
send({ type: "INPUT.FOCUS" });
|
|
304
304
|
},
|
|
@@ -323,8 +323,8 @@ function connect(service, normalize) {
|
|
|
323
323
|
onKeyDown(event) {
|
|
324
324
|
if (event.defaultPrevented) return;
|
|
325
325
|
if (readOnly) return;
|
|
326
|
-
if (index
|
|
327
|
-
const step = index
|
|
326
|
+
if (index.isComposingEvent(event)) return;
|
|
327
|
+
const step = index.getEventStep(event) * prop("step");
|
|
328
328
|
const keyMap = {
|
|
329
329
|
ArrowUp() {
|
|
330
330
|
send({ type: "INPUT.ARROW_UP", step });
|
|
@@ -335,12 +335,12 @@ function connect(service, normalize) {
|
|
|
335
335
|
event.preventDefault();
|
|
336
336
|
},
|
|
337
337
|
Home() {
|
|
338
|
-
if (index
|
|
338
|
+
if (index.isModifierKey(event)) return;
|
|
339
339
|
send({ type: "INPUT.HOME" });
|
|
340
340
|
event.preventDefault();
|
|
341
341
|
},
|
|
342
342
|
End() {
|
|
343
|
-
if (index
|
|
343
|
+
if (index.isModifierKey(event)) return;
|
|
344
344
|
send({ type: "INPUT.END" });
|
|
345
345
|
event.preventDefault();
|
|
346
346
|
},
|
|
@@ -360,15 +360,15 @@ function connect(service, normalize) {
|
|
|
360
360
|
dir: prop("dir"),
|
|
361
361
|
id: getDecrementTriggerId(scope),
|
|
362
362
|
disabled: isDecrementDisabled,
|
|
363
|
-
"data-disabled": index
|
|
363
|
+
"data-disabled": index.dataAttr(isDecrementDisabled),
|
|
364
364
|
"aria-label": translations.decrementLabel,
|
|
365
365
|
type: "button",
|
|
366
366
|
tabIndex: -1,
|
|
367
367
|
"aria-controls": getInputId(scope),
|
|
368
|
-
"data-scrubbing": index
|
|
368
|
+
"data-scrubbing": index.dataAttr(scrubbing),
|
|
369
369
|
onPointerDown(event) {
|
|
370
370
|
if (isDecrementDisabled) return;
|
|
371
|
-
if (!index
|
|
371
|
+
if (!index.isLeftClick(event)) return;
|
|
372
372
|
send({ type: "TRIGGER.PRESS_DOWN", hint: "decrement", pointerType: event.pointerType });
|
|
373
373
|
if (event.pointerType === "mouse") {
|
|
374
374
|
event.preventDefault();
|
|
@@ -392,14 +392,14 @@ function connect(service, normalize) {
|
|
|
392
392
|
dir: prop("dir"),
|
|
393
393
|
id: getIncrementTriggerId(scope),
|
|
394
394
|
disabled: isIncrementDisabled,
|
|
395
|
-
"data-disabled": index
|
|
395
|
+
"data-disabled": index.dataAttr(isIncrementDisabled),
|
|
396
396
|
"aria-label": translations.incrementLabel,
|
|
397
397
|
type: "button",
|
|
398
398
|
tabIndex: -1,
|
|
399
399
|
"aria-controls": getInputId(scope),
|
|
400
|
-
"data-scrubbing": index
|
|
400
|
+
"data-scrubbing": index.dataAttr(scrubbing),
|
|
401
401
|
onPointerDown(event) {
|
|
402
|
-
if (isIncrementDisabled || !index
|
|
402
|
+
if (isIncrementDisabled || !index.isLeftClick(event)) return;
|
|
403
403
|
send({ type: "TRIGGER.PRESS_DOWN", hint: "increment", pointerType: event.pointerType });
|
|
404
404
|
if (event.pointerType === "mouse") {
|
|
405
405
|
event.preventDefault();
|
|
@@ -420,15 +420,15 @@ function connect(service, normalize) {
|
|
|
420
420
|
return normalize.element({
|
|
421
421
|
...parts.scrubber.attrs,
|
|
422
422
|
dir: prop("dir"),
|
|
423
|
-
"data-disabled": index
|
|
423
|
+
"data-disabled": index.dataAttr(disabled),
|
|
424
424
|
id: getScrubberId(scope),
|
|
425
425
|
role: "presentation",
|
|
426
|
-
"data-scrubbing": index
|
|
426
|
+
"data-scrubbing": index.dataAttr(scrubbing),
|
|
427
427
|
onMouseDown(event) {
|
|
428
428
|
if (disabled) return;
|
|
429
|
-
if (!index
|
|
430
|
-
const point = index
|
|
431
|
-
const win = index
|
|
429
|
+
if (!index.isLeftClick(event)) return;
|
|
430
|
+
const point = index.getEventPoint(event);
|
|
431
|
+
const win = index.getWindow(event.currentTarget);
|
|
432
432
|
const dpr = win.devicePixelRatio;
|
|
433
433
|
point.x = point.x - index$1.roundToDpr(7.5, dpr);
|
|
434
434
|
point.y = point.y - index$1.roundToDpr(7.5, dpr);
|
|
@@ -469,7 +469,7 @@ var getDefaultStep = (step, formatOptions) => {
|
|
|
469
469
|
};
|
|
470
470
|
|
|
471
471
|
// src/number-input.machine.ts
|
|
472
|
-
var { choose, guards, createMachine } = index.setup();
|
|
472
|
+
var { choose, guards, createMachine } = index$2.setup();
|
|
473
473
|
var { not, and } = guards;
|
|
474
474
|
var machine = createMachine({
|
|
475
475
|
props({ props: props2 }) {
|
|
@@ -531,11 +531,11 @@ var machine = createMachine({
|
|
|
531
531
|
canIncrement: ({ prop, computed }) => prop("allowOverflow") || !computed("isAtMax"),
|
|
532
532
|
canDecrement: ({ prop, computed }) => prop("allowOverflow") || !computed("isAtMin"),
|
|
533
533
|
valueText: ({ prop, context }) => prop("translations").valueText?.(context.get("value")),
|
|
534
|
-
formatter: index.memo(
|
|
534
|
+
formatter: index$2.memo(
|
|
535
535
|
({ prop }) => [prop("locale"), prop("formatOptions")],
|
|
536
536
|
([locale, formatOptions]) => createFormatter(locale, formatOptions)
|
|
537
537
|
),
|
|
538
|
-
parser: index.memo(
|
|
538
|
+
parser: index$2.memo(
|
|
539
539
|
({ prop }) => [prop("locale"), prop("formatOptions")],
|
|
540
540
|
([locale, formatOptions]) => createParser(locale, formatOptions)
|
|
541
541
|
)
|
|
@@ -717,7 +717,7 @@ var machine = createMachine({
|
|
|
717
717
|
},
|
|
718
718
|
trackFormControl({ context, scope }) {
|
|
719
719
|
const inputEl = getInputEl(scope);
|
|
720
|
-
return index
|
|
720
|
+
return index.trackFormControl(inputEl, {
|
|
721
721
|
onFieldsetDisabledChange(disabled) {
|
|
722
722
|
context.set("fieldsetDisabled", disabled);
|
|
723
723
|
},
|
|
@@ -736,7 +736,7 @@ var machine = createMachine({
|
|
|
736
736
|
trackButtonDisabled({ context, scope, send }) {
|
|
737
737
|
const hint = context.get("hint");
|
|
738
738
|
const btn = getPressedTriggerEl(scope, hint);
|
|
739
|
-
return index
|
|
739
|
+
return index.observeAttributes(btn, {
|
|
740
740
|
attributes: ["disabled"],
|
|
741
741
|
callback() {
|
|
742
742
|
send({ type: "TRIGGER.PRESS_UP", src: "attr" });
|
|
@@ -755,11 +755,11 @@ var machine = createMachine({
|
|
|
755
755
|
send({ type: "VALUE.DECREMENT" });
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
|
-
return index
|
|
758
|
+
return index.addDomEvent(inputEl, "wheel", onWheel, { passive: false });
|
|
759
759
|
},
|
|
760
760
|
activatePointerLock({ scope }) {
|
|
761
|
-
if (index
|
|
762
|
-
return index
|
|
761
|
+
if (index.isSafari()) return;
|
|
762
|
+
return index.requestPointerLock(scope.getDoc());
|
|
763
763
|
},
|
|
764
764
|
trackMousemove({ scope, send, context, computed }) {
|
|
765
765
|
const doc = scope.getDoc();
|
|
@@ -777,7 +777,7 @@ var machine = createMachine({
|
|
|
777
777
|
function onMouseup() {
|
|
778
778
|
send({ type: "SCRUBBER.POINTER_UP" });
|
|
779
779
|
}
|
|
780
|
-
return index$1.callAll(index
|
|
780
|
+
return index$1.callAll(index.addDomEvent(doc, "mousemove", onMousemove, false), index.addDomEvent(doc, "mouseup", onMouseup, false));
|
|
781
781
|
}
|
|
782
782
|
},
|
|
783
783
|
actions: {
|
|
@@ -785,7 +785,7 @@ var machine = createMachine({
|
|
|
785
785
|
if (!prop("focusInputOnChange")) return;
|
|
786
786
|
const inputEl = getInputEl(scope);
|
|
787
787
|
if (scope.isActiveElement(inputEl)) return;
|
|
788
|
-
index
|
|
788
|
+
index.raf(() => inputEl?.focus({ preventScroll: true }));
|
|
789
789
|
},
|
|
790
790
|
increment({ context, event, prop, computed }) {
|
|
791
791
|
let nextValue = index$1.incrementValue(computed("valueAsNumber"), event.step ?? prop("step"));
|
|
@@ -860,8 +860,8 @@ var machine = createMachine({
|
|
|
860
860
|
const value = event.type.endsWith("CHANGE") ? context.get("value") : computed("formattedValue");
|
|
861
861
|
const inputEl = getInputEl(scope);
|
|
862
862
|
const sel = event.selection ?? recordCursor(inputEl, scope);
|
|
863
|
-
index
|
|
864
|
-
index
|
|
863
|
+
index.raf(() => {
|
|
864
|
+
index.setElementValue(inputEl, value);
|
|
865
865
|
restoreCursor(inputEl, sel, scope);
|
|
866
866
|
});
|
|
867
867
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createAnatomy } from '../../../../../@zag-js_anatomy@1.31.1/node_modules/@zag-js/anatomy/dist/index.js';
|
|
2
|
-
import { raf,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { raf, addDomEvent, isSafari, requestPointerLock, observeAttributes, trackFormControl, isLeftClick, getEventPoint, getWindow, dataAttr, isComposingEvent, getEventStep, ariaAttr, isModifierKey, MAX_Z_INDEX, setElementValue } from '../../../../../@zag-js_dom-query@1.31.1/node_modules/@zag-js/dom-query/dist/index.js';
|
|
3
|
+
import { clampValue, decrementValue, incrementValue, callAll, isValueWithinRange, isValueAtMax, isValueAtMin, roundToDpr, wrap } from '../../../../../@zag-js_utils@1.31.1/node_modules/@zag-js/utils/dist/index.js';
|
|
4
|
+
import { memo, setup } from '../../../../../@zag-js_core@1.31.1/node_modules/@zag-js/core/dist/index.js';
|
|
5
5
|
import { createProps } from '../../../../../@zag-js_types@1.31.1/node_modules/@zag-js/types/dist/index.js';
|
|
6
6
|
import { NumberParser } from '../../../../../@internationalized_number@3.6.5/node_modules/@internationalized/number/src/NumberParser.js';
|
|
7
7
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const index$3 = require('../../../../../@zag-js_anatomy@1.31.1/node_modules/@zag-js/anatomy/dist/index.cjs');
|
|
6
|
-
const index
|
|
7
|
-
const index$
|
|
8
|
-
const index = require('../../../../../@zag-js_core@1.31.1/node_modules/@zag-js/core/dist/index.cjs');
|
|
6
|
+
const index = require('../../../../../@zag-js_dom-query@1.31.1/node_modules/@zag-js/dom-query/dist/index.cjs');
|
|
7
|
+
const index$1 = require('../../../../../@zag-js_utils@1.31.1/node_modules/@zag-js/utils/dist/index.cjs');
|
|
8
|
+
const index$2 = require('../../../../../@zag-js_core@1.31.1/node_modules/@zag-js/core/dist/index.cjs');
|
|
9
9
|
const index$4 = require('../../../../../@zag-js_types@1.31.1/node_modules/@zag-js/types/dist/index.cjs');
|
|
10
10
|
|
|
11
11
|
// src/pin-input.anatomy.ts
|
|
@@ -20,7 +20,7 @@ var getRootEl = (ctx) => ctx.getById(getRootId(ctx));
|
|
|
20
20
|
var getInputEls = (ctx) => {
|
|
21
21
|
const ownerId = CSS.escape(getRootId(ctx));
|
|
22
22
|
const selector = `input[data-ownedby=${ownerId}]`;
|
|
23
|
-
return index
|
|
23
|
+
return index.queryAll(getRootEl(ctx), selector);
|
|
24
24
|
};
|
|
25
25
|
var getInputElAtIndex = (ctx, index) => getInputEls(ctx)[index];
|
|
26
26
|
var getFirstInputEl = (ctx) => getInputEls(ctx)[0];
|
|
@@ -68,7 +68,7 @@ function connect(service, normalize) {
|
|
|
68
68
|
complete,
|
|
69
69
|
setValue(value) {
|
|
70
70
|
if (!Array.isArray(value)) {
|
|
71
|
-
index$
|
|
71
|
+
index$1.invariant("[pin-input/setValue] value must be an array");
|
|
72
72
|
}
|
|
73
73
|
send({ type: "VALUE.SET", value });
|
|
74
74
|
},
|
|
@@ -83,10 +83,10 @@ function connect(service, normalize) {
|
|
|
83
83
|
dir: prop("dir"),
|
|
84
84
|
...parts.root.attrs,
|
|
85
85
|
id: getRootId(scope),
|
|
86
|
-
"data-invalid": index
|
|
87
|
-
"data-disabled": index
|
|
88
|
-
"data-complete": index
|
|
89
|
-
"data-readonly": index
|
|
86
|
+
"data-invalid": index.dataAttr(invalid),
|
|
87
|
+
"data-disabled": index.dataAttr(disabled),
|
|
88
|
+
"data-complete": index.dataAttr(complete),
|
|
89
|
+
"data-readonly": index.dataAttr(readOnly)
|
|
90
90
|
});
|
|
91
91
|
},
|
|
92
92
|
getLabelProps() {
|
|
@@ -95,11 +95,11 @@ function connect(service, normalize) {
|
|
|
95
95
|
dir: prop("dir"),
|
|
96
96
|
htmlFor: getHiddenInputId(scope),
|
|
97
97
|
id: getLabelId(scope),
|
|
98
|
-
"data-invalid": index
|
|
99
|
-
"data-disabled": index
|
|
100
|
-
"data-complete": index
|
|
101
|
-
"data-required": index
|
|
102
|
-
"data-readonly": index
|
|
98
|
+
"data-invalid": index.dataAttr(invalid),
|
|
99
|
+
"data-disabled": index.dataAttr(disabled),
|
|
100
|
+
"data-complete": index.dataAttr(complete),
|
|
101
|
+
"data-required": index.dataAttr(required),
|
|
102
|
+
"data-readonly": index.dataAttr(readOnly),
|
|
103
103
|
onClick(event) {
|
|
104
104
|
event.preventDefault();
|
|
105
105
|
focus();
|
|
@@ -117,7 +117,7 @@ function connect(service, normalize) {
|
|
|
117
117
|
required,
|
|
118
118
|
name: prop("name"),
|
|
119
119
|
form: prop("form"),
|
|
120
|
-
style: index
|
|
120
|
+
style: index.visuallyHiddenStyle,
|
|
121
121
|
maxLength: computed("valueLength"),
|
|
122
122
|
defaultValue: computed("valueAsString")
|
|
123
123
|
});
|
|
@@ -130,30 +130,30 @@ function connect(service, normalize) {
|
|
|
130
130
|
});
|
|
131
131
|
},
|
|
132
132
|
getInputProps(props2) {
|
|
133
|
-
const { index } = props2;
|
|
133
|
+
const { index: index$1 } = props2;
|
|
134
134
|
const inputType = prop("type") === "numeric" ? "tel" : "text";
|
|
135
135
|
return normalize.input({
|
|
136
136
|
...parts.input.attrs,
|
|
137
137
|
dir: prop("dir"),
|
|
138
138
|
disabled,
|
|
139
|
-
"data-disabled": index
|
|
140
|
-
"data-complete": index
|
|
141
|
-
id: getInputId(scope, index.toString()),
|
|
142
|
-
"data-index": index,
|
|
139
|
+
"data-disabled": index.dataAttr(disabled),
|
|
140
|
+
"data-complete": index.dataAttr(complete),
|
|
141
|
+
id: getInputId(scope, index$1.toString()),
|
|
142
|
+
"data-index": index$1,
|
|
143
143
|
"data-ownedby": getRootId(scope),
|
|
144
|
-
"aria-label": translations?.inputLabel?.(index, computed("valueLength")),
|
|
144
|
+
"aria-label": translations?.inputLabel?.(index$1, computed("valueLength")),
|
|
145
145
|
inputMode: prop("otp") || prop("type") === "numeric" ? "numeric" : "text",
|
|
146
|
-
"aria-invalid": index
|
|
147
|
-
"data-invalid": index
|
|
146
|
+
"aria-invalid": index.ariaAttr(invalid),
|
|
147
|
+
"data-invalid": index.dataAttr(invalid),
|
|
148
148
|
type: prop("mask") ? "password" : inputType,
|
|
149
|
-
defaultValue: context.get("value")[index] || "",
|
|
149
|
+
defaultValue: context.get("value")[index$1] || "",
|
|
150
150
|
readOnly,
|
|
151
151
|
autoCapitalize: "none",
|
|
152
152
|
autoComplete: prop("otp") ? "one-time-code" : "off",
|
|
153
|
-
placeholder: focusedIndex === index ? "" : prop("placeholder"),
|
|
153
|
+
placeholder: focusedIndex === index$1 ? "" : prop("placeholder"),
|
|
154
154
|
onBeforeInput(event) {
|
|
155
155
|
try {
|
|
156
|
-
const value = index
|
|
156
|
+
const value = index.getBeforeInputValue(event);
|
|
157
157
|
const isValid = isValidValue(value, prop("type"), prop("pattern"));
|
|
158
158
|
if (!isValid) {
|
|
159
159
|
send({ type: "VALUE.INVALID", value });
|
|
@@ -166,7 +166,7 @@ function connect(service, normalize) {
|
|
|
166
166
|
}
|
|
167
167
|
},
|
|
168
168
|
onChange(event) {
|
|
169
|
-
const evt = index
|
|
169
|
+
const evt = index.getNativeEvent(event);
|
|
170
170
|
const { value } = event.currentTarget;
|
|
171
171
|
if (evt.inputType === "insertFromPaste" || value.length > 2) {
|
|
172
172
|
send({ type: "INPUT.PASTE", value });
|
|
@@ -178,12 +178,12 @@ function connect(service, normalize) {
|
|
|
178
178
|
send({ type: "INPUT.BACKSPACE" });
|
|
179
179
|
return;
|
|
180
180
|
}
|
|
181
|
-
send({ type: "INPUT.CHANGE", value, index });
|
|
181
|
+
send({ type: "INPUT.CHANGE", value, index: index$1 });
|
|
182
182
|
},
|
|
183
183
|
onKeyDown(event) {
|
|
184
184
|
if (event.defaultPrevented) return;
|
|
185
|
-
if (index
|
|
186
|
-
if (index
|
|
185
|
+
if (index.isComposingEvent(event)) return;
|
|
186
|
+
if (index.isModifierKey(event)) return;
|
|
187
187
|
const keyMap = {
|
|
188
188
|
Backspace() {
|
|
189
189
|
send({ type: "INPUT.BACKSPACE" });
|
|
@@ -201,7 +201,7 @@ function connect(service, normalize) {
|
|
|
201
201
|
send({ type: "INPUT.ENTER" });
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
|
-
const exec = keyMap[index
|
|
204
|
+
const exec = keyMap[index.getEventKey(event, {
|
|
205
205
|
dir: prop("dir"),
|
|
206
206
|
orientation: "horizontal"
|
|
207
207
|
})];
|
|
@@ -211,18 +211,18 @@ function connect(service, normalize) {
|
|
|
211
211
|
}
|
|
212
212
|
},
|
|
213
213
|
onFocus() {
|
|
214
|
-
send({ type: "INPUT.FOCUS", index });
|
|
214
|
+
send({ type: "INPUT.FOCUS", index: index$1 });
|
|
215
215
|
},
|
|
216
216
|
onBlur(event) {
|
|
217
217
|
const target = event.relatedTarget;
|
|
218
|
-
if (index
|
|
219
|
-
send({ type: "INPUT.BLUR", index });
|
|
218
|
+
if (index.isHTMLElement(target) && target.dataset.ownedby === getRootId(scope)) return;
|
|
219
|
+
send({ type: "INPUT.BLUR", index: index$1 });
|
|
220
220
|
}
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
var { choose, createMachine } = index.setup();
|
|
225
|
+
var { choose, createMachine } = index$2.setup();
|
|
226
226
|
var machine = createMachine({
|
|
227
227
|
props({ props: props2 }) {
|
|
228
228
|
return {
|
|
@@ -245,7 +245,7 @@ var machine = createMachine({
|
|
|
245
245
|
value: bindable(() => ({
|
|
246
246
|
value: prop("value"),
|
|
247
247
|
defaultValue: prop("defaultValue"),
|
|
248
|
-
isEqual: index$
|
|
248
|
+
isEqual: index$1.isEqual,
|
|
249
249
|
onChange(value) {
|
|
250
250
|
prop("onValueChange")?.({ value, valueAsString: value.join("") });
|
|
251
251
|
}
|
|
@@ -361,7 +361,7 @@ var machine = createMachine({
|
|
|
361
361
|
actions: {
|
|
362
362
|
dispatchInputEvent({ computed, scope }) {
|
|
363
363
|
const inputEl = getHiddenInputEl(scope);
|
|
364
|
-
index
|
|
364
|
+
index.dispatchInputValueEvent(inputEl, { value: computed("valueAsString") });
|
|
365
365
|
},
|
|
366
366
|
setInputCount({ scope, context, prop }) {
|
|
367
367
|
if (prop("count")) return;
|
|
@@ -376,7 +376,7 @@ var machine = createMachine({
|
|
|
376
376
|
selectInputIfNeeded({ context, prop, scope }) {
|
|
377
377
|
const focusedIndex = context.get("focusedIndex");
|
|
378
378
|
if (!prop("selectOnFocus") || focusedIndex === -1) return;
|
|
379
|
-
index
|
|
379
|
+
index.raf(() => {
|
|
380
380
|
getInputElAtIndex(scope, focusedIndex)?.select();
|
|
381
381
|
});
|
|
382
382
|
},
|
|
@@ -408,7 +408,7 @@ var machine = createMachine({
|
|
|
408
408
|
const focusedIndex = context.get("focusedIndex");
|
|
409
409
|
const value = getNextValue(focusedValue, event.value);
|
|
410
410
|
flush(() => {
|
|
411
|
-
context.set("value", index$
|
|
411
|
+
context.set("value", index$1.setValueAtIndex(computed("_value"), focusedIndex, value));
|
|
412
412
|
});
|
|
413
413
|
},
|
|
414
414
|
revertInputValue({ context, computed, scope }) {
|
|
@@ -428,7 +428,7 @@ var machine = createMachine({
|
|
|
428
428
|
});
|
|
429
429
|
},
|
|
430
430
|
setPastedValue({ context, event, computed, flush }) {
|
|
431
|
-
index
|
|
431
|
+
index.raf(() => {
|
|
432
432
|
const valueAsString = computed("valueAsString");
|
|
433
433
|
const focusedIndex = context.get("focusedIndex");
|
|
434
434
|
const valueLength = computed("valueLength");
|
|
@@ -444,7 +444,7 @@ var machine = createMachine({
|
|
|
444
444
|
},
|
|
445
445
|
setValueAtIndex({ context, event, computed }) {
|
|
446
446
|
const nextValue = getNextValue(computed("focusedValue"), event.value);
|
|
447
|
-
context.set("value", index$
|
|
447
|
+
context.set("value", index$1.setValueAtIndex(computed("_value"), event.index, nextValue));
|
|
448
448
|
},
|
|
449
449
|
clearValue({ context }) {
|
|
450
450
|
const nextValue = Array.from({ length: context.get("count") }).fill("");
|
|
@@ -455,7 +455,7 @@ var machine = createMachine({
|
|
|
455
455
|
clearFocusedValue({ context, computed }) {
|
|
456
456
|
const focusedIndex = context.get("focusedIndex");
|
|
457
457
|
if (focusedIndex === -1) return;
|
|
458
|
-
context.set("value", index$
|
|
458
|
+
context.set("value", index$1.setValueAtIndex(computed("_value"), focusedIndex, ""));
|
|
459
459
|
},
|
|
460
460
|
setFocusIndexToFirst({ context }) {
|
|
461
461
|
context.set("focusedIndex", 0);
|
|
@@ -467,13 +467,13 @@ var machine = createMachine({
|
|
|
467
467
|
context.set("focusedIndex", Math.max(context.get("focusedIndex") - 1, 0));
|
|
468
468
|
},
|
|
469
469
|
setLastValueFocusIndex({ context, computed }) {
|
|
470
|
-
index
|
|
470
|
+
index.raf(() => {
|
|
471
471
|
context.set("focusedIndex", Math.min(computed("filledValueLength"), computed("valueLength") - 1));
|
|
472
472
|
});
|
|
473
473
|
},
|
|
474
474
|
blurFocusedInputIfNeeded({ context, prop, scope }) {
|
|
475
475
|
if (!prop("blurOnComplete")) return;
|
|
476
|
-
index
|
|
476
|
+
index.raf(() => {
|
|
477
477
|
getInputElAtIndex(scope, context.get("focusedIndex"))?.blur();
|
|
478
478
|
});
|
|
479
479
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createAnatomy } from '../../../../../@zag-js_anatomy@1.31.1/node_modules/@zag-js/anatomy/dist/index.js';
|
|
2
|
-
import { raf, dispatchInputValueEvent,
|
|
2
|
+
import { raf, dispatchInputValueEvent, isHTMLElement, isComposingEvent, isModifierKey, getEventKey, getNativeEvent, getBeforeInputValue, dataAttr, ariaAttr, visuallyHiddenStyle, queryAll } from '../../../../../@zag-js_dom-query@1.31.1/node_modules/@zag-js/dom-query/dist/index.js';
|
|
3
3
|
import { setValueAtIndex, isEqual, invariant } from '../../../../../@zag-js_utils@1.31.1/node_modules/@zag-js/utils/dist/index.js';
|
|
4
4
|
import { setup } from '../../../../../@zag-js_core@1.31.1/node_modules/@zag-js/core/dist/index.js';
|
|
5
5
|
import { createProps } from '../../../../../@zag-js_types@1.31.1/node_modules/@zag-js/types/dist/index.js';
|
package/dist/node_modules/.pnpm/@zag-js_progress@1.31.1/node_modules/@zag-js/progress/dist/index.cjs
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const index$
|
|
5
|
+
const index$1 = require('../../../../../@zag-js_anatomy@1.31.1/node_modules/@zag-js/anatomy/dist/index.cjs');
|
|
6
6
|
const index = require('../../../../../@zag-js_core@1.31.1/node_modules/@zag-js/core/dist/index.cjs');
|
|
7
|
-
const index$
|
|
7
|
+
const index$2 = require('../../../../../@zag-js_utils@1.31.1/node_modules/@zag-js/utils/dist/index.cjs');
|
|
8
8
|
const index$3 = require('../../../../../@zag-js_types@1.31.1/node_modules/@zag-js/types/dist/index.cjs');
|
|
9
9
|
|
|
10
10
|
// src/progress.anatomy.ts
|
|
11
|
-
var anatomy = index$
|
|
11
|
+
var anatomy = index$1.createAnatomy("progress").parts(
|
|
12
12
|
"root",
|
|
13
13
|
"label",
|
|
14
14
|
"track",
|
|
@@ -237,8 +237,8 @@ var machine = index.createMachine({
|
|
|
237
237
|
isIndeterminate: ({ context }) => context.get("value") === null,
|
|
238
238
|
percent({ context, prop }) {
|
|
239
239
|
const value = context.get("value");
|
|
240
|
-
if (!index$
|
|
241
|
-
return index$
|
|
240
|
+
if (!index$2.isNumber(value)) return -1;
|
|
241
|
+
return index$2.getValuePercent(value, prop("min"), prop("max")) * 100;
|
|
242
242
|
},
|
|
243
243
|
formatter: index.memo(
|
|
244
244
|
({ prop }) => [prop("locale"), prop("formatOptions")],
|
|
@@ -279,7 +279,7 @@ var machine = index.createMachine({
|
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
});
|
|
282
|
-
var isValidNumber = (max) => index$
|
|
282
|
+
var isValidNumber = (max) => index$2.isNumber(max) && !isNaN(max);
|
|
283
283
|
var isValidMax = (value, max) => isValidNumber(value) && value <= max;
|
|
284
284
|
var isValidMin = (value, min) => isValidNumber(value) && value >= min;
|
|
285
285
|
var midValue = (min, max) => min + (max - min) / 2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createAnatomy } from '../../../../../@zag-js_anatomy@1.31.1/node_modules/@zag-js/anatomy/dist/index.js';
|
|
2
|
-
import { raf, trackFormControl,
|
|
2
|
+
import { raf, trackFormControl, getEventKey, getEventPoint, getRelativePoint, isLeftClick, dataAttr, ariaAttr, dispatchInputValueEvent, query } from '../../../../../@zag-js_dom-query@1.31.1/node_modules/@zag-js/dom-query/dist/index.js';
|
|
3
3
|
import { createMachine } from '../../../../../@zag-js_core@1.31.1/node_modules/@zag-js/core/dist/index.js';
|
|
4
4
|
import { createProps } from '../../../../../@zag-js_types@1.31.1/node_modules/@zag-js/types/dist/index.js';
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createScope, MachineStatus, INIT_STATE } from '../../../../../@zag-js_core@1.31.1/node_modules/@zag-js/core/dist/index.js';
|
|
2
2
|
export { mergeProps } from '../../../../../@zag-js_core@1.31.1/node_modules/@zag-js/core/dist/index.js';
|
|
3
3
|
import { compact, ensure, identity, isFunction, warn, toArray, isString } from '../../../../../@zag-js_utils@1.31.1/node_modules/@zag-js/utils/dist/index.js';
|
|
4
|
-
import { useMemo, useRef, useLayoutEffect, useEffect
|
|
4
|
+
import { useMemo, useRef, useState, useLayoutEffect, useEffect } from 'react';
|
|
5
5
|
import { flushSync } from 'react-dom';
|
|
6
6
|
import { createNormalizer } from '../../../../../@zag-js_types@1.31.1/node_modules/@zag-js/types/dist/index.js';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isIos, getComputedStyle, setStyleProperty, setStyle } from '../../../../../@zag-js_dom-query@1.31.1/node_modules/@zag-js/dom-query/dist/index.js';
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
4
|
var LOCK_CLASSNAME = "data-scroll-lock";
|
package/dist/node_modules/.pnpm/@zag-js_select@1.31.1/node_modules/@zag-js/select/dist/index.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const index$
|
|
6
|
-
const index$
|
|
5
|
+
const index$6 = require('../../../../../@zag-js_anatomy@1.31.1/node_modules/@zag-js/anatomy/dist/index.cjs');
|
|
6
|
+
const index$5 = require('../../../../../@zag-js_collection@1.31.1/node_modules/@zag-js/collection/dist/index.cjs');
|
|
7
7
|
const index$2 = require('../../../../../@zag-js_dom-query@1.31.1/node_modules/@zag-js/dom-query/dist/index.cjs');
|
|
8
8
|
const index$3 = require('../../../../../@zag-js_popper@1.31.1/node_modules/@zag-js/popper/dist/index.cjs');
|
|
9
9
|
const index$1 = require('../../../../../@zag-js_utils@1.31.1/node_modules/@zag-js/utils/dist/index.cjs');
|
|
@@ -12,7 +12,7 @@ const index$4 = require('../../../../../@zag-js_dismissable@1.31.1/node_modules/
|
|
|
12
12
|
const index$7 = require('../../../../../@zag-js_types@1.31.1/node_modules/@zag-js/types/dist/index.cjs');
|
|
13
13
|
|
|
14
14
|
// src/select.anatomy.ts
|
|
15
|
-
var anatomy = index$
|
|
15
|
+
var anatomy = index$6.createAnatomy("select").parts(
|
|
16
16
|
"label",
|
|
17
17
|
"positioner",
|
|
18
18
|
"trigger",
|
|
@@ -31,10 +31,10 @@ var anatomy = index$5.createAnatomy("select").parts(
|
|
|
31
31
|
);
|
|
32
32
|
var parts = anatomy.build();
|
|
33
33
|
var collection = (options) => {
|
|
34
|
-
return new index$
|
|
34
|
+
return new index$5.ListCollection(options);
|
|
35
35
|
};
|
|
36
36
|
collection.empty = () => {
|
|
37
|
-
return new index$
|
|
37
|
+
return new index$5.ListCollection({ items: [] });
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
// src/select.dom.ts
|