@cerberus-design/react 0.25.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
package/dist/node_modules/.pnpm/@zag-js_carousel@1.31.1/node_modules/@zag-js/carousel/dist/index.cjs
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const index$
|
|
5
|
+
const index$3 = require('../../../../../@zag-js_anatomy@1.31.1/node_modules/@zag-js/anatomy/dist/index.cjs');
|
|
6
6
|
const index$1 = require('../../../../../@zag-js_dom-query@1.31.1/node_modules/@zag-js/dom-query/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 = require('../../../../../@zag-js_core@1.31.1/node_modules/@zag-js/core/dist/index.cjs');
|
|
9
|
-
const index$
|
|
9
|
+
const index$4 = require('../../../../../@zag-js_scroll-snap@1.31.1/node_modules/@zag-js/scroll-snap/dist/index.cjs');
|
|
10
10
|
const index$5 = require('../../../../../@zag-js_types@1.31.1/node_modules/@zag-js/types/dist/index.cjs');
|
|
11
11
|
|
|
12
12
|
// src/carousel.anatomy.ts
|
|
13
|
-
var anatomy = index$
|
|
13
|
+
var anatomy = index$3.createAnatomy("carousel").parts(
|
|
14
14
|
"root",
|
|
15
15
|
"itemGroup",
|
|
16
16
|
"item",
|
|
@@ -132,7 +132,7 @@ function connect(service, normalize) {
|
|
|
132
132
|
event.preventDefault();
|
|
133
133
|
send({ type: "DRAGGING.START" });
|
|
134
134
|
},
|
|
135
|
-
onWheel: index$
|
|
135
|
+
onWheel: index$2.throttle((event) => {
|
|
136
136
|
const axis = prop("orientation") === "horizontal" ? "deltaX" : "deltaY";
|
|
137
137
|
const isScrollingLeft = event[axis] < 0;
|
|
138
138
|
if (isScrollingLeft && !computed("canScrollPrev")) return;
|
|
@@ -309,7 +309,7 @@ function connect(service, normalize) {
|
|
|
309
309
|
}
|
|
310
310
|
var machine = index.createMachine({
|
|
311
311
|
props({ props: props2 }) {
|
|
312
|
-
index$
|
|
312
|
+
index$2.ensureProps(props2, ["slideCount"], "carousel");
|
|
313
313
|
return {
|
|
314
314
|
dir: "ltr",
|
|
315
315
|
defaultPage: 0,
|
|
@@ -372,7 +372,7 @@ var machine = index.createMachine({
|
|
|
372
372
|
canScrollPrev: ({ prop, context }) => prop("loop") || context.get("page") > 0,
|
|
373
373
|
autoplayInterval: ({ prop }) => {
|
|
374
374
|
const autoplay = prop("autoplay");
|
|
375
|
-
return index$
|
|
375
|
+
return index$2.isObject(autoplay) ? autoplay.delay : 4e3;
|
|
376
376
|
}
|
|
377
377
|
},
|
|
378
378
|
watch({ track, action, context, prop, send }) {
|
|
@@ -552,7 +552,7 @@ var machine = index.createMachine({
|
|
|
552
552
|
const itemEls = getItemEls(scope);
|
|
553
553
|
itemEls.forEach(exec);
|
|
554
554
|
const cleanups = itemEls.map((el2) => index$1.resizeObserverBorderBox.observe(el2, exec));
|
|
555
|
-
return index$
|
|
555
|
+
return index$2.callAll(...cleanups);
|
|
556
556
|
},
|
|
557
557
|
trackSlideIntersections({ scope, prop, context }) {
|
|
558
558
|
const el = getItemGroupEl(scope);
|
|
@@ -563,9 +563,9 @@ var machine = index.createMachine({
|
|
|
563
563
|
const target = entry.target;
|
|
564
564
|
const index = Number(target.dataset.index ?? "-1");
|
|
565
565
|
if (index == null || Number.isNaN(index) || index === -1) return acc;
|
|
566
|
-
return entry.isIntersecting ? index$
|
|
566
|
+
return entry.isIntersecting ? index$2.add(acc, index) : index$2.remove(acc, index);
|
|
567
567
|
}, context.get("slidesInView"));
|
|
568
|
-
context.set("slidesInView", index$
|
|
568
|
+
context.set("slidesInView", index$2.uniq(slidesInView));
|
|
569
569
|
},
|
|
570
570
|
{
|
|
571
571
|
root: el,
|
|
@@ -641,7 +641,7 @@ var machine = index.createMachine({
|
|
|
641
641
|
},
|
|
642
642
|
scrollToPage({ context, event, scope, computed, flush }) {
|
|
643
643
|
const behavior = event.instant ? "instant" : "smooth";
|
|
644
|
-
const index = index$
|
|
644
|
+
const index = index$2.clampValue(event.index ?? context.get("page"), 0, context.get("pageSnapPoints").length - 1);
|
|
645
645
|
const el = getItemGroupEl(scope);
|
|
646
646
|
if (!el) return;
|
|
647
647
|
const axis = computed("isHorizontal") ? "left" : "top";
|
|
@@ -659,18 +659,18 @@ var machine = index.createMachine({
|
|
|
659
659
|
},
|
|
660
660
|
setNextPage({ context, prop, state }) {
|
|
661
661
|
const loop = state.matches("autoplay") || prop("loop");
|
|
662
|
-
const page = index$
|
|
662
|
+
const page = index$2.nextIndex(context.get("pageSnapPoints"), context.get("page"), { loop });
|
|
663
663
|
context.set("page", page);
|
|
664
664
|
},
|
|
665
665
|
setPrevPage({ context, prop, state }) {
|
|
666
666
|
const loop = state.matches("autoplay") || prop("loop");
|
|
667
|
-
const page = index$
|
|
667
|
+
const page = index$2.prevIndex(context.get("pageSnapPoints"), context.get("page"), { loop });
|
|
668
668
|
context.set("page", page);
|
|
669
669
|
},
|
|
670
670
|
setMatchingPage({ context, event, computed, scope }) {
|
|
671
671
|
const el = getItemGroupEl(scope);
|
|
672
672
|
if (!el) return;
|
|
673
|
-
const snapPoint = index$
|
|
673
|
+
const snapPoint = index$4.findSnapPoint(
|
|
674
674
|
el,
|
|
675
675
|
computed("isHorizontal") ? "x" : "y",
|
|
676
676
|
(node) => node.dataset.index === event.index.toString()
|
|
@@ -684,13 +684,13 @@ var machine = index.createMachine({
|
|
|
684
684
|
context.set("page", page);
|
|
685
685
|
},
|
|
686
686
|
clampPage({ context }) {
|
|
687
|
-
const index = index$
|
|
687
|
+
const index = index$2.clampValue(context.get("page"), 0, context.get("pageSnapPoints").length - 1);
|
|
688
688
|
context.set("page", index);
|
|
689
689
|
},
|
|
690
690
|
setSnapPoints({ context, computed, scope }) {
|
|
691
691
|
const el = getItemGroupEl(scope);
|
|
692
692
|
if (!el) return;
|
|
693
|
-
const scrollSnapPoints = index$
|
|
693
|
+
const scrollSnapPoints = index$4.getScrollSnapPositions(el);
|
|
694
694
|
context.set("pageSnapPoints", computed("isHorizontal") ? scrollSnapPoints.x : scrollSnapPoints.y);
|
|
695
695
|
},
|
|
696
696
|
disableScrollSnap({ scope }) {
|
package/dist/node_modules/.pnpm/@zag-js_carousel@1.31.1/node_modules/@zag-js/carousel/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAnatomy } from '../../../../../@zag-js_anatomy@1.31.1/node_modules/@zag-js/anatomy/dist/index.js';
|
|
2
|
-
import {
|
|
3
|
-
import { clampValue, prevIndex, nextIndex, add, remove, uniq, callAll, isObject, ensureProps
|
|
2
|
+
import { dataAttr, getEventKey, ariaAttr, isLeftClick, getEventTarget, isFocusable, contains, raf, addDomEvent, trackPointerMove, resizeObserverBorderBox, queryAll, getTabbables } from '../../../../../@zag-js_dom-query@1.31.1/node_modules/@zag-js/dom-query/dist/index.js';
|
|
3
|
+
import { throttle, clampValue, prevIndex, nextIndex, add, remove, uniq, callAll, isObject, ensureProps } from '../../../../../@zag-js_utils@1.31.1/node_modules/@zag-js/utils/dist/index.js';
|
|
4
4
|
import { createMachine } from '../../../../../@zag-js_core@1.31.1/node_modules/@zag-js/core/dist/index.js';
|
|
5
5
|
import { getScrollSnapPositions, findSnapPoint } from '../../../../../@zag-js_scroll-snap@1.31.1/node_modules/@zag-js/scroll-snap/dist/index.js';
|
|
6
6
|
import { createProps } from '../../../../../@zag-js_types@1.31.1/node_modules/@zag-js/types/dist/index.js';
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const index$
|
|
5
|
+
const index$2 = require('../../../../../@zag-js_anatomy@1.31.1/node_modules/@zag-js/anatomy/dist/index.cjs');
|
|
6
6
|
const index$1 = require('../../../../../@zag-js_dom-query@1.31.1/node_modules/@zag-js/dom-query/dist/index.cjs');
|
|
7
7
|
const index = require('../../../../../@zag-js_core@1.31.1/node_modules/@zag-js/core/dist/index.cjs');
|
|
8
|
-
const index$
|
|
8
|
+
const index$3 = require('../../../../../@zag-js_utils@1.31.1/node_modules/@zag-js/utils/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/clipboard.anatomy.ts
|
|
12
|
-
var anatomy = index$
|
|
12
|
+
var anatomy = index$2.createAnatomy("clipboard").parts("root", "control", "trigger", "indicator", "input", "label");
|
|
13
13
|
var parts = anatomy.build();
|
|
14
14
|
var getRootId = (ctx) => ctx.ids?.root ?? `clip:${ctx.id}`;
|
|
15
15
|
var getInputId = (ctx) => ctx.ids?.input ?? `clip:${ctx.id}:input`;
|
|
@@ -190,7 +190,7 @@ var machine = index.createMachine({
|
|
|
190
190
|
implementations: {
|
|
191
191
|
effects: {
|
|
192
192
|
waitForTimeout({ prop, send }) {
|
|
193
|
-
return index$
|
|
193
|
+
return index$3.setRafTimeout(() => {
|
|
194
194
|
send({ type: "COPY.DONE" });
|
|
195
195
|
}, prop("timeout"));
|
|
196
196
|
}
|
|
@@ -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 {
|
|
2
|
+
import { dataAttr, setElementValue, getWindow } 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 { setRafTimeout } from '../../../../../@zag-js_utils@1.31.1/node_modules/@zag-js/utils/dist/index.js';
|
|
5
5
|
import { createProps } from '../../../../../@zag-js_types@1.31.1/node_modules/@zag-js/types/dist/index.js';
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const index$
|
|
5
|
+
const index$3 = require('../../../../../@zag-js_anatomy@1.31.1/node_modules/@zag-js/anatomy/dist/index.cjs');
|
|
6
6
|
const index$1 = require('../../../../../@zag-js_dom-query@1.31.1/node_modules/@zag-js/dom-query/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 = 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/collapsible.anatomy.ts
|
|
12
|
-
var anatomy = index$
|
|
12
|
+
var anatomy = index$3.createAnatomy("collapsible").parts("root", "trigger", "content", "indicator");
|
|
13
13
|
var parts = anatomy.build();
|
|
14
14
|
|
|
15
15
|
// src/collapsible.dom.ts
|
|
@@ -61,19 +61,19 @@ function connect(service, normalize) {
|
|
|
61
61
|
hidden: !visible && !hasCollapsedSize,
|
|
62
62
|
dir: prop("dir"),
|
|
63
63
|
style: {
|
|
64
|
-
"--height": index$
|
|
65
|
-
"--width": index$
|
|
66
|
-
"--collapsed-height": index$
|
|
67
|
-
"--collapsed-width": index$
|
|
64
|
+
"--height": index$2.toPx(height),
|
|
65
|
+
"--width": index$2.toPx(width),
|
|
66
|
+
"--collapsed-height": index$2.toPx(collapsedHeight),
|
|
67
|
+
"--collapsed-width": index$2.toPx(collapsedWidth),
|
|
68
68
|
...closed && hasCollapsedHeight && {
|
|
69
69
|
overflow: "hidden",
|
|
70
|
-
minHeight: index$
|
|
71
|
-
maxHeight: index$
|
|
70
|
+
minHeight: index$2.toPx(collapsedHeight),
|
|
71
|
+
maxHeight: index$2.toPx(collapsedHeight)
|
|
72
72
|
},
|
|
73
73
|
...closed && hasCollapsedWidth && {
|
|
74
74
|
overflow: "hidden",
|
|
75
|
-
minWidth: index$
|
|
76
|
-
maxWidth: index$
|
|
75
|
+
minWidth: index$2.toPx(collapsedWidth),
|
|
76
|
+
maxWidth: index$2.toPx(collapsedWidth)
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
});
|
|
@@ -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, observeChildren,
|
|
2
|
+
import { dataAttr, raf, observeChildren, getComputedStyle, setStyle, getEventTarget, getTabbables, setAttribute, nextTick } from '../../../../../@zag-js_dom-query@1.31.1/node_modules/@zag-js/dom-query/dist/index.js';
|
|
3
3
|
import { toPx } from '../../../../../@zag-js_utils@1.31.1/node_modules/@zag-js/utils/dist/index.js';
|
|
4
4
|
import { createMachine } 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';
|