jenosize-ui 0.2.2 → 0.3.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/README.md +183 -63
- package/THIRD-PARTY-NOTICES.md +95 -0
- package/dist/GradientPicker-Bv3V3vL_.d.ts +144 -0
- package/dist/{PaymentInput-Dn5WVQVy.d.ts → PaymentInput-s7_s3UDi.d.ts} +1 -1
- package/dist/{Select-Dt5ARIH8.d.ts → Select-r233iMaU.d.ts} +15 -1
- package/dist/{TagInput-BaBeve6L.d.ts → TagInput-w_l9Fp5i.d.ts} +1 -1
- package/dist/area-chart.d.ts +2 -2
- package/dist/area-chart.js +8 -6
- package/dist/at-least-one-BZ2dsck-.d.ts +18 -0
- package/dist/avatar.d.ts +1 -1
- package/dist/avatar.js +12 -10
- package/dist/badge.d.ts +1 -1
- package/dist/badge.js +7 -6
- package/dist/bar-chart.d.ts +2 -2
- package/dist/bar-chart.js +8 -6
- package/dist/breadcrumb.d.ts +1 -1
- package/dist/breadcrumb.js +5 -4
- package/dist/button.d.ts +1 -1
- package/dist/button.js +12 -10
- package/dist/calendar.d.ts +1 -1
- package/dist/calendar.js +16 -14
- package/dist/callout.d.ts +4 -2
- package/dist/callout.js +13 -11
- package/dist/card.d.ts +59 -3
- package/dist/card.js +4 -3
- package/dist/carousel.d.ts +169 -0
- package/dist/carousel.js +10 -0
- package/dist/catalog.json +11976 -0
- package/dist/checkbox.js +9 -7
- package/dist/{chunk-AIARANKE.js → chunk-2EUVBRKG.js} +4 -4
- package/dist/{chunk-5ZEUTSCV.js → chunk-2RRPWOKT.js} +6 -6
- package/dist/{chunk-DD5KJVFV.js → chunk-3JFSKCVU.js} +19 -19
- package/dist/{chunk-OACWA4TC.js → chunk-3ZZZPT5G.js} +6 -6
- package/dist/{chunk-LQURV7HQ.js → chunk-47EOHGXM.js} +4 -4
- package/dist/{chunk-CGHYXWTT.js → chunk-4KRCT3Q2.js} +4 -4
- package/dist/chunk-4P3JA653.js +1129 -0
- package/dist/{chunk-FWRHBMWT.js → chunk-4Y32RIC7.js} +5 -19
- package/dist/{chunk-BBKE4W3B.js → chunk-5Z26DU23.js} +7 -7
- package/dist/{chunk-7QXOGAN6.js → chunk-6CJYVYVN.js} +87 -538
- package/dist/{chunk-3HOHLQVP.js → chunk-6FGLABYH.js} +3 -3
- package/dist/{chunk-GQRSABRN.js → chunk-6Q4VVBFO.js} +4 -4
- package/dist/{chunk-MCQG4H6T.js → chunk-6T3QAO5K.js} +12 -4
- package/dist/chunk-7JOW3LEH.js +4852 -0
- package/dist/{chunk-AFYXSZGW.js → chunk-7LSUUEAF.js} +7 -5
- package/dist/{chunk-7VLYQR4D.js → chunk-7OFGPDYJ.js} +3 -3
- package/dist/{chunk-7GUPNTAH.js → chunk-7RD5RTHU.js} +7 -7
- package/dist/{chunk-X2VMIBK5.js → chunk-A36W77MQ.js} +4 -4
- package/dist/chunk-AZFHRLYF.js +67 -0
- package/dist/{chunk-CFFWYXDW.js → chunk-B6LYO33Y.js} +5 -5
- package/dist/{chunk-P6CON2R2.js → chunk-BH32X25C.js} +3 -3
- package/dist/{chunk-KHGW72BM.js → chunk-CH2XMCWX.js} +3 -3
- package/dist/{chunk-FNQJJO63.js → chunk-D46OKHTH.js} +4 -4
- package/dist/{chunk-LE44X5GS.js → chunk-D4YGYNNY.js} +9 -9
- package/dist/{chunk-T5574MXM.js → chunk-D7WD4SUC.js} +8 -8
- package/dist/{chunk-33TOK7ES.js → chunk-DCKVNHV5.js} +5 -5
- package/dist/chunk-EBZNUQ6E.js +525 -0
- package/dist/{chunk-22M75A3N.js → chunk-ED5UCYAV.js} +14 -11
- package/dist/{chunk-IQNVSQRK.js → chunk-EDVYLO2N.js} +5 -5
- package/dist/{chunk-N3RVMBPX.js → chunk-EJKQGUUM.js} +4 -4
- package/dist/{chunk-POQTE7JI.js → chunk-EKQLIUV5.js} +7 -7
- package/dist/{chunk-ULGCGKOE.js → chunk-EKV3CVTY.js} +4 -4
- package/dist/{chunk-LCG34A5T.js → chunk-EVINS473.js} +5 -3
- package/dist/{chunk-ZZSNTCCL.js → chunk-G7B2QUQP.js} +4 -4
- package/dist/{chunk-SB3DG572.js → chunk-GHRZC5LS.js} +6 -6
- package/dist/{chunk-5YWH2ANQ.js → chunk-GIC6T647.js} +11 -10
- package/dist/{chunk-7ZM7SNCZ.js → chunk-GPHGPY6T.js} +3 -3
- package/dist/chunk-GV2KTRRP.js +325 -0
- package/dist/{chunk-4RBIWI2Q.js → chunk-GYL4KOPT.js} +3 -3
- package/dist/{chunk-5KSD4WKN.js → chunk-HB6UA6EF.js} +5 -5
- package/dist/{chunk-CGZXQ7PA.js → chunk-HNNNJP3A.js} +3 -3
- package/dist/chunk-HTWGTTSF.js +1011 -0
- package/dist/chunk-IH2F5UNQ.js +109 -0
- package/dist/{chunk-QNIKRB62.js → chunk-INYUL4DX.js} +4 -4
- package/dist/{chunk-SKRR3ZMP.js → chunk-IUB5TSSH.js} +3 -3
- package/dist/chunk-JGGSRKHW.js +344 -0
- package/dist/{chunk-ZR6HNKSN.js → chunk-JHHJNIW2.js} +3 -3
- package/dist/chunk-KBI442IB.js +113 -0
- package/dist/chunk-KBQJIVUB.js +33 -0
- package/dist/{chunk-3QXLIZIX.js → chunk-KNGJ3CSB.js} +3 -3
- package/dist/chunk-KNKR5TUM.js +183 -0
- package/dist/{chunk-KZP6B6B3.js → chunk-KTWTYK5U.js} +16 -5
- package/dist/{chunk-5XPMY2LF.js → chunk-LKUAVDWP.js} +5 -5
- package/dist/{chunk-YHBI52P2.js → chunk-LPWSP523.js} +3 -3
- package/dist/{chunk-GLKFFA7N.js → chunk-LY7IJOUF.js} +5 -5
- package/dist/{chunk-R4Z7BINC.js → chunk-LYWQD5KL.js} +8 -8
- package/dist/{chunk-LLPWQDF7.js → chunk-MTOTPAYZ.js} +3 -3
- package/dist/{chunk-AZ7DKRBY.js → chunk-MVF7FA4D.js} +5 -5
- package/dist/{chunk-AIGYMTCU.js → chunk-MVUNB43J.js} +3 -3
- package/dist/{chunk-T4ZFZTY6.js → chunk-N7DLNDER.js} +4 -4
- package/dist/{chunk-E2YZ7IMT.js → chunk-NDRQETOQ.js} +15 -11
- package/dist/{chunk-ZD3MOLIB.js → chunk-O7CPRU67.js} +4 -4
- package/dist/{chunk-OLLD2BZN.js → chunk-OEYKTHG7.js} +3 -3
- package/dist/{chunk-TX57TNJS.js → chunk-OG3H3RP2.js} +9 -9
- package/dist/{chunk-UGBNYSBN.js → chunk-PFKPKE6O.js} +20 -34
- package/dist/chunk-PRWPFBA5.js +619 -0
- package/dist/{chunk-QDKETK7D.js → chunk-S55JKMG7.js} +5 -5
- package/dist/{chunk-QDYE5LVT.js → chunk-SF3HCW4G.js} +45 -4
- package/dist/{chunk-6MMBQVRO.js → chunk-TDKKZA63.js} +9 -9
- package/dist/{chunk-HHYEAFCL.js → chunk-TDXHBS2C.js} +11 -11
- package/dist/{chunk-74AIU53R.js → chunk-THGGU64E.js} +3 -3
- package/dist/chunk-UHSGD4CD.js +364 -0
- package/dist/{chunk-HV2W6HUR.js → chunk-URAURI6G.js} +10 -10
- package/dist/{chunk-D6XO4JVM.js → chunk-UU6KUS5O.js} +42 -20
- package/dist/{chunk-NKG4N6HA.js → chunk-V7KEEDSF.js} +5 -4
- package/dist/{chunk-IEAWNA3V.js → chunk-VDFWWWLL.js} +3 -3
- package/dist/chunk-VHAA22YE.js +11 -0
- package/dist/chunk-WJB5GWAZ.js +20 -0
- package/dist/{chunk-KJ5JUS53.js → chunk-WM6DGNIA.js} +9 -9
- package/dist/{chunk-MFFA5MXY.js → chunk-WUXMLJEC.js} +5 -5
- package/dist/{chunk-YPNL2NBD.js → chunk-XNXBO44X.js} +33 -11
- package/dist/chunk-XPY3XT7L.js +5671 -0
- package/dist/{chunk-54SIZR63.js → chunk-XVFRDKZJ.js} +7 -7
- package/dist/{chunk-LYXPJERB.js → chunk-YDD46AX2.js} +5 -5
- package/dist/{chunk-NC63TYNW.js → chunk-YHQJGNXD.js} +7 -7
- package/dist/{chunk-I6WMNXC7.js → chunk-YKRE5NIH.js} +6 -6
- package/dist/{chunk-RJTVCA62.js → chunk-ZIEGUI25.js} +3 -3
- package/dist/{chunk-5DP7W5HX.js → chunk-ZLDWYTDA.js} +3 -3
- package/dist/color-input.d.ts +93 -0
- package/dist/color-input.js +36 -0
- package/dist/color-picker.d.ts +268 -0
- package/dist/color-picker.js +29 -0
- package/dist/color-value-DYzChVOW.d.ts +129 -0
- package/dist/combobox.d.ts +1 -1
- package/dist/combobox.js +14 -12
- package/dist/data-map.d.ts +1673 -0
- package/dist/data-map.js +36 -0
- package/dist/date-calendar.d.ts +49 -0
- package/dist/date-calendar.js +13 -0
- package/dist/date-input.d.ts +1 -1
- package/dist/date-input.js +12 -10
- package/dist/date-picker.d.ts +15 -131
- package/dist/date-picker.js +26 -21
- package/dist/date-types-CLZek3W2.d.ts +100 -0
- package/dist/dialog.d.ts +1 -1
- package/dist/dialog.js +10 -9
- package/dist/drawer.d.ts +1 -1
- package/dist/drawer.js +9 -8
- package/dist/dropdown-menu.d.ts +1 -1
- package/dist/dropdown-menu.js +5 -4
- package/dist/dropzone.d.ts +3 -3
- package/dist/dropzone.js +18 -16
- package/dist/file-trigger.js +1 -0
- package/dist/form.d.ts +15 -5
- package/dist/form.js +75 -35
- package/dist/header-navigation.d.ts +2 -2
- package/dist/header-navigation.js +20 -18
- package/dist/helper.d.ts +1 -1
- package/dist/helper.js +1 -0
- package/dist/illustration.js +1 -0
- package/dist/index.d.ts +26 -11
- package/dist/index.js +92 -77
- package/dist/indicator.js +5 -4
- package/dist/inline-banner.d.ts +68 -0
- package/dist/inline-banner.js +21 -0
- package/dist/input.d.ts +1 -1
- package/dist/input.js +11 -9
- package/dist/kanban-board.d.ts +2 -2
- package/dist/kanban-board.js +15 -13
- package/dist/labels-CuSlirP_.d.ts +1381 -0
- package/dist/line-chart.d.ts +2 -2
- package/dist/line-chart.js +8 -6
- package/dist/mcp.js +231 -0
- package/dist/number-input.d.ts +1 -1
- package/dist/number-input.js +11 -9
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.js +15 -13
- package/dist/{card-D56VxyAe.d.ts → panel-CUGm_Mxy.d.ts} +9 -57
- package/dist/payment-input.d.ts +3 -3
- package/dist/payment-input.js +11 -9
- package/dist/picker-draft-BPV3MUPY.d.ts +9 -0
- package/dist/pie-chart.d.ts +2 -2
- package/dist/pie-chart.js +8 -6
- package/dist/popover.d.ts +65 -4
- package/dist/popover.js +9 -8
- package/dist/progress-steps.js +5 -4
- package/dist/progress.js +4 -3
- package/dist/provider.d.ts +1 -1
- package/dist/provider.js +4 -3
- package/dist/qr-code.d.ts +227 -0
- package/dist/qr-code.js +20 -0
- package/dist/radar-chart.d.ts +2 -2
- package/dist/radar-chart.js +8 -6
- package/dist/radial-chart.d.ts +2 -2
- package/dist/radial-chart.js +8 -6
- package/dist/radio.js +9 -7
- package/dist/rich-text-editor.d.ts +624 -0
- package/dist/rich-text-editor.js +52 -0
- package/dist/rich-text-highlight.d.ts +11 -0
- package/dist/rich-text-highlight.js +65 -0
- package/dist/rich-text-sanitize.d.ts +17 -0
- package/dist/rich-text-sanitize.js +176 -0
- package/dist/scroll-area.js +1 -0
- package/dist/select.d.ts +2 -2
- package/dist/select.js +17 -15
- package/dist/separator.js +3 -2
- package/dist/shared-CGf2D8ZX.d.ts +20 -0
- package/dist/sidebar-navigation.d.ts +73 -32
- package/dist/sidebar-navigation.js +15 -13
- package/dist/sidebar-state.d.ts +76 -0
- package/dist/sidebar-state.js +27 -0
- package/dist/skeleton.js +3 -2
- package/dist/slider.d.ts +321 -0
- package/dist/slider.js +14 -0
- package/dist/styles.css +1 -1
- package/dist/switch.d.ts +1 -1
- package/dist/switch.js +3 -2
- package/dist/table.d.ts +3 -19
- package/dist/table.js +34 -32
- package/dist/tabs.js +3 -2
- package/dist/tag-input.d.ts +3 -3
- package/dist/tag-input.js +14 -12
- package/dist/tag.d.ts +1 -1
- package/dist/tag.js +5 -4
- package/dist/textarea.js +9 -7
- package/dist/theme.css +965 -0
- package/dist/theme.js +13 -11
- package/dist/toast.d.ts +1 -1
- package/dist/toast.js +13 -11
- package/dist/tooltip.js +5 -3
- package/dist/tree.d.ts +1 -1
- package/dist/tree.js +7 -6
- package/dist/{types-DR9rAEy1.d.ts → types-BoZ6XeLB.d.ts} +1 -1
- package/dist/{use-uploads-KaPqDklo.d.ts → use-uploads-cHo2p7Gn.d.ts} +1 -1
- package/dist/verification-code-input.js +11 -9
- package/package.json +105 -8
- package/dist/chunk-BLIZ3CL3.js +0 -49
- package/dist/labels-DPrh0se9.d.ts +0 -627
- package/dist/panel-El4oI68p.d.ts +0 -9
- package/dist/shared-BYXJPnsN.d.ts +0 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toUploadFile } from './chunk-
|
|
2
|
-
import { warnPositiveInt, devWarn } from './chunk-
|
|
1
|
+
import { toUploadFile } from './chunk-TDXHBS2C.js';
|
|
2
|
+
import { warnRange, warnPositiveInt, devWarn } from './chunk-SF3HCW4G.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
|
|
5
5
|
function reduceUpload(rows, id, event) {
|
|
@@ -15,6 +15,7 @@ function reduceUpload(rows, id, event) {
|
|
|
15
15
|
function applyEvent(row, event) {
|
|
16
16
|
switch (event.type) {
|
|
17
17
|
case "progress": {
|
|
18
|
+
warnRange("Dropzone", "onUploadProgress percent", event.percent, 0, 100);
|
|
18
19
|
const percent = Math.max(0, Math.min(100, Math.round(event.percent)));
|
|
19
20
|
if (row.progress === percent && row.status === "uploading") return row;
|
|
20
21
|
return row.status === "uploading" ? { ...row, progress: percent } : row;
|
|
@@ -184,5 +185,5 @@ function useUploads({ transport, batchSize = 1, concurrency = 3 }) {
|
|
|
184
185
|
}
|
|
185
186
|
|
|
186
187
|
export { reduceUpload, splitBatchProgress, useUploads };
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
188
|
-
//# sourceMappingURL=chunk-
|
|
188
|
+
//# sourceMappingURL=chunk-V7KEEDSF.js.map
|
|
189
|
+
//# sourceMappingURL=chunk-V7KEEDSF.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useScrollFade } from './chunk-O2LG3PNI.js';
|
|
2
2
|
import { useIsomorphicLayoutEffect } from './chunk-EDSK6FEH.js';
|
|
3
3
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
4
|
-
import { warnPositiveInt } from './chunk-
|
|
4
|
+
import { warnPositiveInt } from './chunk-SF3HCW4G.js';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
|
|
7
7
|
function tagShellPy(size, hasPills) {
|
|
@@ -76,5 +76,5 @@ function useTagRow(opts) {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export { useTagRow };
|
|
79
|
-
//# sourceMappingURL=chunk-
|
|
80
|
-
//# sourceMappingURL=chunk-
|
|
79
|
+
//# sourceMappingURL=chunk-VDFWWWLL.js.map
|
|
80
|
+
//# sourceMappingURL=chunk-VDFWWWLL.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var __typeError = (msg) => {
|
|
2
|
+
throw TypeError(msg);
|
|
3
|
+
};
|
|
4
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
5
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
6
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
7
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
8
|
+
|
|
9
|
+
export { __privateAdd, __privateGet, __privateSet };
|
|
10
|
+
//# sourceMappingURL=chunk-VHAA22YE.js.map
|
|
11
|
+
//# sourceMappingURL=chunk-VHAA22YE.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
// src/lib/use-controllable.ts
|
|
4
|
+
function useControllable(controlled, uncontrolledInitial, onChange) {
|
|
5
|
+
const [uncontrolled, setUncontrolled] = React.useState(uncontrolledInitial);
|
|
6
|
+
const isControlled = controlled !== void 0;
|
|
7
|
+
const value = isControlled ? controlled : uncontrolled;
|
|
8
|
+
const set = React.useCallback(
|
|
9
|
+
(next) => {
|
|
10
|
+
if (!isControlled) setUncontrolled(next);
|
|
11
|
+
onChange?.(next);
|
|
12
|
+
},
|
|
13
|
+
[isControlled, onChange]
|
|
14
|
+
);
|
|
15
|
+
return [value, set];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { useControllable };
|
|
19
|
+
//# sourceMappingURL=chunk-WJB5GWAZ.js.map
|
|
20
|
+
//# sourceMappingURL=chunk-WJB5GWAZ.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { DRAG_GHOST, DROP_LINE, DROP_LINE_Y, DROP_LINE_X, dragGhostProps, ghostPosition } from './chunk-5ZPUAGOP.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { Skeleton } from './chunk-MTOTPAYZ.js';
|
|
3
|
+
import { useAutoScroll, useDrag } from './chunk-BH32X25C.js';
|
|
4
|
+
import { DropdownMenu } from './chunk-O7CPRU67.js';
|
|
5
5
|
import { surfaceBox } from './chunk-45Y2ZGNK.js';
|
|
6
|
-
import { ButtonUtility } from './chunk-
|
|
6
|
+
import { ButtonUtility } from './chunk-MVF7FA4D.js';
|
|
7
7
|
import { Slot } from './chunk-52IFGFTL.js';
|
|
8
|
-
import { ChevronsRightIcon, ChevronRightIcon, ChevronDownIcon, GripVerticalIcon, ChevronsLeftIcon, EllipsisIcon, PlusIcon, LoaderCircleIcon, RotateCwIcon } from './chunk-
|
|
8
|
+
import { ChevronsRightIcon, ChevronRightIcon, ChevronDownIcon, GripVerticalIcon, ChevronsLeftIcon, EllipsisIcon, PlusIcon, LoaderCircleIcon, RotateCwIcon } from './chunk-KBI442IB.js';
|
|
9
9
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
10
|
-
import { useLabels, usePublishedLabels, LabelsContext } from './chunk-
|
|
11
|
-
import { warnNeedsName, devWarn } from './chunk-
|
|
10
|
+
import { useLabels, usePublishedLabels, LabelsContext } from './chunk-ZIEGUI25.js';
|
|
11
|
+
import { warnNeedsName, devWarn } from './chunk-SF3HCW4G.js';
|
|
12
12
|
import * as React from 'react';
|
|
13
13
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
14
14
|
|
|
@@ -1506,5 +1506,5 @@ function useKanban(options) {
|
|
|
1506
1506
|
}
|
|
1507
1507
|
|
|
1508
1508
|
export { KanbanBoard, cellKey, useKanban };
|
|
1509
|
-
//# sourceMappingURL=chunk-
|
|
1510
|
-
//# sourceMappingURL=chunk-
|
|
1509
|
+
//# sourceMappingURL=chunk-WM6DGNIA.js.map
|
|
1510
|
+
//# sourceMappingURL=chunk-WM6DGNIA.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useControllableOpen, BACKDROP_TREATMENT } from './chunk-
|
|
2
|
-
import { PanelChrome } from './chunk-
|
|
1
|
+
import { useControllableOpen, BACKDROP_TREATMENT } from './chunk-INYUL4DX.js';
|
|
2
|
+
import { PanelChrome } from './chunk-HNNNJP3A.js';
|
|
3
3
|
import { EXPLICIT_CLOSE } from './chunk-S7NNXWIN.js';
|
|
4
|
-
import { CloseButton } from './chunk-
|
|
4
|
+
import { CloseButton } from './chunk-4KRCT3Q2.js';
|
|
5
5
|
import { DRAWER_BACKDROP_MOTION, DRAWER_POPUP_MOTION, DRAWER_SLIDE } from './chunk-O4GRKO3I.js';
|
|
6
6
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
7
7
|
import { Drawer as Drawer$1 } from '@base-ui/react/drawer';
|
|
@@ -128,5 +128,5 @@ function Drawer(props) {
|
|
|
128
128
|
Drawer.displayName = "Drawer";
|
|
129
129
|
|
|
130
130
|
export { Drawer };
|
|
131
|
-
//# sourceMappingURL=chunk-
|
|
132
|
-
//# sourceMappingURL=chunk-
|
|
131
|
+
//# sourceMappingURL=chunk-WUXMLJEC.js.map
|
|
132
|
+
//# sourceMappingURL=chunk-WUXMLJEC.js.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { useControllableOpen } from './chunk-
|
|
2
|
-
import { PanelChrome } from './chunk-
|
|
1
|
+
import { useControllableOpen } from './chunk-INYUL4DX.js';
|
|
2
|
+
import { PanelChrome } from './chunk-HNNNJP3A.js';
|
|
3
3
|
import { EXPLICIT_CLOSE, NO_RETURN_FOCUS } from './chunk-S7NNXWIN.js';
|
|
4
|
-
import { CloseButton } from './chunk-
|
|
4
|
+
import { CloseButton } from './chunk-4KRCT3Q2.js';
|
|
5
5
|
import { POPUP_MOTION } from './chunk-O4GRKO3I.js';
|
|
6
6
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
7
|
+
import { devWarn } from './chunk-SF3HCW4G.js';
|
|
7
8
|
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
8
9
|
import * as React2 from 'react';
|
|
9
10
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -11,17 +12,26 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
11
12
|
var POPOVER_SIZE = {
|
|
12
13
|
sm: "max-w-64",
|
|
13
14
|
md: "max-w-80",
|
|
14
|
-
lg: "max-w-96"
|
|
15
|
+
lg: "max-w-96",
|
|
16
|
+
panel: "max-w-[var(--available-width)]"
|
|
15
17
|
};
|
|
16
18
|
var POPUP_SURFACE = cn("rounded-lg bg-primary shadow-lg ring-1 ring-secondary_alt ring-inset", "text-primary");
|
|
17
|
-
var POPUP_MAX_H =
|
|
19
|
+
var POPUP_MAX_H = {
|
|
20
|
+
sm: "max-h-[min(var(--available-height),24rem)]",
|
|
21
|
+
md: "max-h-[min(var(--available-height),24rem)]",
|
|
22
|
+
lg: "max-h-[min(var(--available-height),24rem)]",
|
|
23
|
+
panel: "max-h-[var(--available-height)]"
|
|
24
|
+
};
|
|
18
25
|
function PopoverSurface(props) {
|
|
19
26
|
const {
|
|
20
27
|
size,
|
|
21
28
|
side,
|
|
22
29
|
align,
|
|
30
|
+
anchor,
|
|
23
31
|
sideOffset,
|
|
24
32
|
alignOffset,
|
|
33
|
+
padding,
|
|
34
|
+
autoFocus,
|
|
25
35
|
showClose,
|
|
26
36
|
dividers,
|
|
27
37
|
keepMounted,
|
|
@@ -36,18 +46,19 @@ function PopoverSurface(props) {
|
|
|
36
46
|
closeReasonRef
|
|
37
47
|
} = props;
|
|
38
48
|
const ariaLabel = props["aria-label"];
|
|
39
|
-
return /* @__PURE__ */ jsx(Popover$1.Portal, { keepMounted, children: /* @__PURE__ */ jsx(Popover$1.Positioner, { side, align, sideOffset, alignOffset, className: "z-50 outline-none", children: /* @__PURE__ */ jsx(
|
|
49
|
+
return /* @__PURE__ */ jsx(Popover$1.Portal, { keepMounted, children: /* @__PURE__ */ jsx(Popover$1.Positioner, { anchor, side, align, sideOffset, alignOffset, className: "z-50 outline-none", children: /* @__PURE__ */ jsx(
|
|
40
50
|
PanelChrome,
|
|
41
51
|
{
|
|
42
52
|
render: /* @__PURE__ */ jsx(
|
|
43
53
|
Popover$1.Popup,
|
|
44
54
|
{
|
|
45
55
|
"aria-label": ariaLabel,
|
|
46
|
-
|
|
56
|
+
initialFocus: autoFocus ? void 0 : false,
|
|
57
|
+
finalFocus: () => autoFocus && !NO_RETURN_FOCUS.has(closeReasonRef.current ?? "none")
|
|
47
58
|
}
|
|
48
59
|
),
|
|
49
|
-
className: cn("relative w-max outline-none", POPUP_MAX_H, POPUP_SURFACE, POPUP_MOTION, POPOVER_SIZE[size], className),
|
|
50
|
-
padding
|
|
60
|
+
className: cn("relative w-max outline-none", POPUP_MAX_H[size], POPUP_SURFACE, POPUP_MOTION, POPOVER_SIZE[size], className),
|
|
61
|
+
padding,
|
|
51
62
|
titleScale: "md",
|
|
52
63
|
footerAlign: "end",
|
|
53
64
|
scrollBody: true,
|
|
@@ -70,16 +81,19 @@ function Popover(props) {
|
|
|
70
81
|
open,
|
|
71
82
|
defaultOpen = false,
|
|
72
83
|
onOpenChange,
|
|
84
|
+
anchor,
|
|
73
85
|
side = "bottom",
|
|
74
86
|
align = "center",
|
|
75
87
|
sideOffset = 8,
|
|
76
88
|
alignOffset = 0,
|
|
77
89
|
size = "md",
|
|
90
|
+
padding = "md",
|
|
78
91
|
showClose = false,
|
|
79
92
|
dividers = "none",
|
|
80
93
|
modal = false,
|
|
81
94
|
keepMounted = false,
|
|
82
95
|
dismissible = true,
|
|
96
|
+
autoFocus = true,
|
|
83
97
|
title,
|
|
84
98
|
description,
|
|
85
99
|
leading,
|
|
@@ -92,6 +106,11 @@ function Popover(props) {
|
|
|
92
106
|
const [value, setOpen] = useControllableOpen(open, defaultOpen, onOpenChange);
|
|
93
107
|
const close = React2.useCallback(() => setOpen(false), [setOpen]);
|
|
94
108
|
const closeReasonRef = React2.useRef(void 0);
|
|
109
|
+
if (padding === "none" && showClose) {
|
|
110
|
+
devWarn(
|
|
111
|
+
'<Popover> has `padding="none"` and `showClose`, which puts the \u2715 hard against the corner with no inset \u2014 `padding="none"` hands ALL spacing to the caller, that one included. Draw your own close control in a padded row, or use a padded surface.'
|
|
112
|
+
);
|
|
113
|
+
}
|
|
95
114
|
return /* @__PURE__ */ jsxs(
|
|
96
115
|
Popover$1.Root,
|
|
97
116
|
{
|
|
@@ -111,8 +130,11 @@ function Popover(props) {
|
|
|
111
130
|
PopoverSurface,
|
|
112
131
|
{
|
|
113
132
|
size,
|
|
133
|
+
padding,
|
|
134
|
+
autoFocus,
|
|
114
135
|
side,
|
|
115
136
|
align,
|
|
137
|
+
anchor: trigger ? void 0 : anchor,
|
|
116
138
|
sideOffset,
|
|
117
139
|
alignOffset,
|
|
118
140
|
showClose,
|
|
@@ -137,5 +159,5 @@ function Popover(props) {
|
|
|
137
159
|
Popover.displayName = "Popover";
|
|
138
160
|
|
|
139
161
|
export { Popover };
|
|
140
|
-
//# sourceMappingURL=chunk-
|
|
141
|
-
//# sourceMappingURL=chunk-
|
|
162
|
+
//# sourceMappingURL=chunk-XNXBO44X.js.map
|
|
163
|
+
//# sourceMappingURL=chunk-XNXBO44X.js.map
|