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,8 +1,8 @@
|
|
|
1
1
|
import { mapOptions } from './chunk-7JBNLEJ7.js';
|
|
2
2
|
import { OptionRow } from './chunk-D7EE5GWU.js';
|
|
3
|
-
import { useFieldValidity, FieldGroupFrame } from './chunk-
|
|
3
|
+
import { useFieldValidity, FieldGroupFrame } from './chunk-HB6UA6EF.js';
|
|
4
4
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
5
|
-
import { warnNeedsName } from './chunk-
|
|
5
|
+
import { warnNeedsName } from './chunk-SF3HCW4G.js';
|
|
6
6
|
import { Radio } from '@base-ui/react/radio';
|
|
7
7
|
import { RadioGroup as RadioGroup$1 } from '@base-ui/react/radio-group';
|
|
8
8
|
import * as React from 'react';
|
|
@@ -159,5 +159,5 @@ RadioGroupRoot.displayName = "RadioGroup";
|
|
|
159
159
|
var RadioGroup = RadioGroupRoot;
|
|
160
160
|
|
|
161
161
|
export { RadioGroup };
|
|
162
|
-
//# sourceMappingURL=chunk-
|
|
163
|
-
//# sourceMappingURL=chunk-
|
|
162
|
+
//# sourceMappingURL=chunk-G7B2QUQP.js.map
|
|
163
|
+
//# sourceMappingURL=chunk-G7B2QUQP.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useControlScrollFade } from './chunk-7EUAMHMU.js';
|
|
2
|
-
import { FieldShell } from './chunk-
|
|
3
|
-
import { useFieldValidity, FieldFrame } from './chunk-
|
|
2
|
+
import { FieldShell } from './chunk-A36W77MQ.js';
|
|
3
|
+
import { useFieldValidity, FieldFrame } from './chunk-HB6UA6EF.js';
|
|
4
4
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
5
|
-
import { useLabels } from './chunk-
|
|
6
|
-
import { warnPositiveInt } from './chunk-
|
|
5
|
+
import { useLabels } from './chunk-ZIEGUI25.js';
|
|
6
|
+
import { warnPositiveInt } from './chunk-SF3HCW4G.js';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { Field } from '@base-ui/react/field';
|
|
9
9
|
import * as React from 'react';
|
|
@@ -390,5 +390,5 @@ function PaymentInput(props) {
|
|
|
390
390
|
}
|
|
391
391
|
|
|
392
392
|
export { CARD_ICON, DEFAULT_MAX_DIGITS, PaymentInput, applyCardNumberEdit, detectCardType, formatCardNumber, hasChecksumError, isCompleteCardNumber, isLengthSettled, luhnValid, onlyDigits };
|
|
393
|
-
//# sourceMappingURL=chunk-
|
|
394
|
-
//# sourceMappingURL=chunk-
|
|
393
|
+
//# sourceMappingURL=chunk-GHRZC5LS.js.map
|
|
394
|
+
//# sourceMappingURL=chunk-GHRZC5LS.js.map
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { useAutoScroll, useDrag, snapToStep } from './chunk-
|
|
4
|
-
import {
|
|
1
|
+
import { Card } from './chunk-6FGLABYH.js';
|
|
2
|
+
import { DEFAULT_WEEK_START, resolveTimeZone, startOfDayIn, dayKey, formatIn, displayYear, monthOf, differenceInDaysIn, startOfMonthIn, startOfLastDayOfMonthIn, toWireDate, toWireInstant, addDaysIn, startOfWeekIn, addMonthsIn, minutesFromMidnight, earlierOf, laterOf } from './chunk-4Y32RIC7.js';
|
|
3
|
+
import { useAutoScroll, useDrag, snapToStep } from './chunk-BH32X25C.js';
|
|
4
|
+
import { useControllable } from './chunk-WJB5GWAZ.js';
|
|
5
|
+
import { Popover } from './chunk-XNXBO44X.js';
|
|
5
6
|
import { ScrollView } from './chunk-SKJC2KYD.js';
|
|
6
7
|
import { useLocaleConfig } from './chunk-YIHKQ63K.js';
|
|
7
|
-
import { ACCENT, SUBTLE } from './chunk-
|
|
8
|
+
import { ACCENT, SUBTLE } from './chunk-6T3QAO5K.js';
|
|
8
9
|
import { useIsomorphicLayoutEffect } from './chunk-EDSK6FEH.js';
|
|
9
10
|
import { Slot } from './chunk-52IFGFTL.js';
|
|
10
|
-
import { ChevronLeftIcon, ChevronRightIcon } from './chunk-
|
|
11
|
+
import { ChevronLeftIcon, ChevronRightIcon } from './chunk-KBI442IB.js';
|
|
11
12
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
12
|
-
import { useLabels, usePublishedLabels, LabelsContext } from './chunk-
|
|
13
|
-
import { devWarn, warnStickyNoScrollport } from './chunk-
|
|
13
|
+
import { useLabels, usePublishedLabels, LabelsContext } from './chunk-ZIEGUI25.js';
|
|
14
|
+
import { devWarn, warnStickyNoScrollport } from './chunk-SF3HCW4G.js';
|
|
14
15
|
import { enUS } from 'date-fns/locale';
|
|
15
16
|
import * as React from 'react';
|
|
16
17
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1346,5 +1347,5 @@ function Calendar(props) {
|
|
|
1346
1347
|
Calendar.displayName = "Calendar";
|
|
1347
1348
|
|
|
1348
1349
|
export { Calendar, isWireDate, parseEvent, serializeEvent, useCalendar };
|
|
1349
|
-
//# sourceMappingURL=chunk-
|
|
1350
|
-
//# sourceMappingURL=chunk-
|
|
1350
|
+
//# sourceMappingURL=chunk-GIC6T647.js.map
|
|
1351
|
+
//# sourceMappingURL=chunk-GIC6T647.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
2
|
-
import { devWarn } from './chunk-
|
|
2
|
+
import { devWarn } from './chunk-SF3HCW4G.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
|
|
5
5
|
var SEAMLESS_COLOR = "bg-current/10 text-inherit ring-1 ring-inset ring-current/20";
|
|
@@ -48,5 +48,5 @@ function warnSeamlessFieldChrome(component, chrome) {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export { SEAMLESS_BOX, SEAMLESS_CHIP, SEAMLESS_CHIP_NUM, SEAMLESS_CHIP_PX, SEAMLESS_COLOR, SEAMLESS_CONTROL, SEAMLESS_DOT, SEAMLESS_FILL_COUPLED_FG, SEAMLESS_INHERIT_FG, SeamlessProvider, addonSlotClasses, useSeamlessSlot, warnSeamlessFieldChrome };
|
|
51
|
-
//# sourceMappingURL=chunk-
|
|
52
|
-
//# sourceMappingURL=chunk-
|
|
51
|
+
//# sourceMappingURL=chunk-GPHGPY6T.js.map
|
|
52
|
+
//# sourceMappingURL=chunk-GPHGPY6T.js.map
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { useControllable } from './chunk-WJB5GWAZ.js';
|
|
2
|
+
import { COLOR_PICKER_LABELS, normalizeSwatch, emitPick, useResolvedColors, useColorState, swatchPaint, SwatchRow, ValueRow, useTrackDrag, SwatchDot, HUE_PAINT, THUMB, alphaPaint, TRACK, useRovingIndex, SWATCH_SELECTED, swatchMeta, trackKeyStep } from './chunk-4P3JA653.js';
|
|
3
|
+
import { COLOR_FORMATS, parseColor, BLACK, toHex, readableOn, hueColor, sameColor } from './chunk-UHSGD4CD.js';
|
|
4
|
+
import { Button } from './chunk-3ZZZPT5G.js';
|
|
5
|
+
import { PlusIcon } from './chunk-KBI442IB.js';
|
|
6
|
+
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
7
|
+
import { useLabels } from './chunk-ZIEGUI25.js';
|
|
8
|
+
import { devWarn } from './chunk-SF3HCW4G.js';
|
|
9
|
+
import * as React3 from 'react';
|
|
10
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
11
|
+
|
|
12
|
+
var READOUT = {
|
|
13
|
+
light: "text-fg-white",
|
|
14
|
+
dark: "text-primary"
|
|
15
|
+
};
|
|
16
|
+
function ColorSwatchPicker({
|
|
17
|
+
swatches,
|
|
18
|
+
value: valueProp,
|
|
19
|
+
defaultValue,
|
|
20
|
+
onValueChange,
|
|
21
|
+
formats = COLOR_FORMATS,
|
|
22
|
+
alpha = true,
|
|
23
|
+
preview = true,
|
|
24
|
+
swatchSize = "md",
|
|
25
|
+
labels,
|
|
26
|
+
className
|
|
27
|
+
}) {
|
|
28
|
+
const t = useLabels("colorPicker", COLOR_PICKER_LABELS, labels);
|
|
29
|
+
const root = React3.useRef(null);
|
|
30
|
+
const [format, setFormat] = React3.useState(() => formats[0] ?? "hex");
|
|
31
|
+
const items = React3.useMemo(() => swatches.map((s) => normalizeSwatch(s)), [swatches]);
|
|
32
|
+
const seed = defaultValue ?? items[0]?.color ?? "#000000";
|
|
33
|
+
const [color, setColor] = useControllable(valueProp, seed, void 0);
|
|
34
|
+
const emit = React3.useCallback(
|
|
35
|
+
(next, meta) => {
|
|
36
|
+
setColor(next);
|
|
37
|
+
emitPick(onValueChange, next, meta);
|
|
38
|
+
},
|
|
39
|
+
[onValueChange, setColor]
|
|
40
|
+
);
|
|
41
|
+
const { lookup, resolveNow } = useResolvedColors(
|
|
42
|
+
React3.useMemo(() => [...items.map((s) => s.color), color], [items, color]),
|
|
43
|
+
root
|
|
44
|
+
);
|
|
45
|
+
const view = lookup(color) ?? color;
|
|
46
|
+
const state = useColorState({ color: view, format, alpha, onColorChange: emit });
|
|
47
|
+
const rgba = parseColor(state.text, { quiet: true }) ?? BLACK;
|
|
48
|
+
const css = toHex(rgba);
|
|
49
|
+
const pick = (swatch) => {
|
|
50
|
+
const hex = swatch.literal ?? resolveNow(swatch.color);
|
|
51
|
+
if (hex === null) return;
|
|
52
|
+
state.setText(hex, swatchMeta(swatch));
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ jsxs("div", { ref: root, className: cn("flex flex-col", className), children: [
|
|
55
|
+
preview ? /* @__PURE__ */ jsx("div", { className: "px-1 pt-1", children: /* @__PURE__ */ jsx("div", { className: "flex h-32 w-full items-center justify-center rounded-xl ring-1 ring-on-color ring-inset", style: { background: swatchPaint(css) }, children: /* @__PURE__ */ jsxs("p", { className: cn("flex items-center gap-1 text-lg font-semibold", READOUT[readableOn(rgba)]), children: [
|
|
56
|
+
/* @__PURE__ */ jsx("span", { className: "opacity-50", children: "#" }),
|
|
57
|
+
css.slice(1)
|
|
58
|
+
] }) }) }) : null,
|
|
59
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 p-4", children: [
|
|
60
|
+
/* @__PURE__ */ jsx(
|
|
61
|
+
SwatchRow,
|
|
62
|
+
{
|
|
63
|
+
swatches: items,
|
|
64
|
+
resolve: lookup,
|
|
65
|
+
value: css,
|
|
66
|
+
size: swatchSize,
|
|
67
|
+
listLabel: t.swatches,
|
|
68
|
+
optionLabel: (c) => t.swatch({ color: c }),
|
|
69
|
+
onSelect: pick
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ jsx(
|
|
73
|
+
ValueRow,
|
|
74
|
+
{
|
|
75
|
+
t,
|
|
76
|
+
text: state.text,
|
|
77
|
+
onCommit: state.setText,
|
|
78
|
+
format,
|
|
79
|
+
onFormatChange: setFormat,
|
|
80
|
+
formats,
|
|
81
|
+
color: css,
|
|
82
|
+
alpha: alpha ? state.hsva.a : null,
|
|
83
|
+
onAlphaChange: (a) => state.setChannels({ a })
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
] })
|
|
87
|
+
] });
|
|
88
|
+
}
|
|
89
|
+
ColorSwatchPicker.displayName = "ColorSwatchPicker";
|
|
90
|
+
var CHANNEL = {
|
|
91
|
+
hue: {
|
|
92
|
+
max: 360,
|
|
93
|
+
step: 1 / 360,
|
|
94
|
+
largeStep: 10 / 360,
|
|
95
|
+
/** `w-9` fits `360°`, the widest string the channel can print. */
|
|
96
|
+
readoutWidth: "w-9"
|
|
97
|
+
},
|
|
98
|
+
alpha: {
|
|
99
|
+
max: 1,
|
|
100
|
+
step: 0.01,
|
|
101
|
+
largeStep: 0.1,
|
|
102
|
+
/** `w-10` fits `100%`. */
|
|
103
|
+
readoutWidth: "w-10"
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
var clamp01 = (n) => n < 0 ? 0 : Math.min(n, 1);
|
|
107
|
+
function ColorSlider({
|
|
108
|
+
channel,
|
|
109
|
+
value: valueProp,
|
|
110
|
+
defaultValue,
|
|
111
|
+
onValueChange,
|
|
112
|
+
baseColor,
|
|
113
|
+
swatch = true,
|
|
114
|
+
readout = true,
|
|
115
|
+
disabled = false,
|
|
116
|
+
labels,
|
|
117
|
+
className
|
|
118
|
+
}) {
|
|
119
|
+
const t = useLabels("colorPicker", COLOR_PICKER_LABELS, labels);
|
|
120
|
+
const cfg = CHANNEL[channel];
|
|
121
|
+
const [raw, setValue] = useControllable(valueProp, defaultValue ?? (channel === "alpha" ? 1 : 0), onValueChange);
|
|
122
|
+
const value = clamp01(raw / cfg.max) * cfg.max;
|
|
123
|
+
const base = React3.useMemo(() => {
|
|
124
|
+
if (channel !== "alpha") return BLACK;
|
|
125
|
+
if (baseColor === void 0) {
|
|
126
|
+
devWarn('ColorSlider: channel="alpha" needs a `baseColor` to fade \u2014 falling back to black.');
|
|
127
|
+
return BLACK;
|
|
128
|
+
}
|
|
129
|
+
return parseColor(baseColor) ?? BLACK;
|
|
130
|
+
}, [baseColor, channel]);
|
|
131
|
+
const setFraction = React3.useCallback(
|
|
132
|
+
(f) => setValue(Number((clamp01(f) * cfg.max).toFixed(channel === "hue" ? 0 : 2))),
|
|
133
|
+
[cfg.max, channel, setValue]
|
|
134
|
+
);
|
|
135
|
+
const { trackProps, dragging } = useTrackDrag({
|
|
136
|
+
disabled,
|
|
137
|
+
onDrag: (pt) => setFraction(pt.x)
|
|
138
|
+
});
|
|
139
|
+
const fraction = value / cfg.max;
|
|
140
|
+
const onKeyDown = (e) => {
|
|
141
|
+
if (disabled) return;
|
|
142
|
+
const move = trackKeyStep(e.key, { axis: "x", step: cfg.step, largeStep: cfg.largeStep });
|
|
143
|
+
if (move === null) return;
|
|
144
|
+
e.preventDefault();
|
|
145
|
+
setFraction("absolute" in move ? move.absolute === "min" ? 0 : 1 : fraction + move.dx);
|
|
146
|
+
};
|
|
147
|
+
const name = channel === "hue" ? t.hue : t.alpha;
|
|
148
|
+
const percent = `${Math.round(fraction * 100)}%`;
|
|
149
|
+
const degrees = String(Math.round(value));
|
|
150
|
+
const readoutText = channel === "hue" ? `${degrees}\xB0` : percent;
|
|
151
|
+
const chip = channel === "hue" ? hueColor(value) : toHex({ ...base, a: value });
|
|
152
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-3", className), children: [
|
|
153
|
+
swatch ? /* @__PURE__ */ jsx(SwatchDot, { color: chip }) : null,
|
|
154
|
+
/* @__PURE__ */ jsx(
|
|
155
|
+
"div",
|
|
156
|
+
{
|
|
157
|
+
...trackProps,
|
|
158
|
+
role: "group",
|
|
159
|
+
"aria-label": name,
|
|
160
|
+
className: cn(TRACK, trackProps.className, "flex-1", disabled && "pointer-events-none cursor-not-allowed opacity-50"),
|
|
161
|
+
style: { background: channel === "hue" ? HUE_PAINT : alphaPaint(base) },
|
|
162
|
+
children: /* @__PURE__ */ jsx(
|
|
163
|
+
"div",
|
|
164
|
+
{
|
|
165
|
+
role: "slider",
|
|
166
|
+
tabIndex: disabled ? -1 : 0,
|
|
167
|
+
"aria-label": name,
|
|
168
|
+
"aria-orientation": "horizontal",
|
|
169
|
+
"aria-valuemin": 0,
|
|
170
|
+
"aria-valuemax": cfg.max,
|
|
171
|
+
"aria-valuenow": channel === "hue" ? Math.round(value) : Math.round(value * 100),
|
|
172
|
+
"aria-valuetext": channel === "hue" ? t.hueValue({ degrees }) : t.alphaValue({ percent }),
|
|
173
|
+
"aria-disabled": disabled || void 0,
|
|
174
|
+
"data-dragging": dragging || void 0,
|
|
175
|
+
onKeyDown,
|
|
176
|
+
className: cn(THUMB, "top-1/2"),
|
|
177
|
+
style: { left: `${fraction * 100}%`, backgroundColor: chip }
|
|
178
|
+
}
|
|
179
|
+
)
|
|
180
|
+
}
|
|
181
|
+
),
|
|
182
|
+
readout ? /* @__PURE__ */ jsx("span", { className: cn("shrink-0 text-right text-sm text-primary tabular-nums", cfg.readoutWidth), children: readoutText }) : null
|
|
183
|
+
] });
|
|
184
|
+
}
|
|
185
|
+
ColorSlider.displayName = "ColorSlider";
|
|
186
|
+
function ColorPalettePicker({
|
|
187
|
+
palette = [],
|
|
188
|
+
value: valueProp,
|
|
189
|
+
defaultValue,
|
|
190
|
+
onValueChange,
|
|
191
|
+
formats = COLOR_FORMATS,
|
|
192
|
+
alpha = true,
|
|
193
|
+
swatches,
|
|
194
|
+
onAddSwatch,
|
|
195
|
+
addingSwatch = false,
|
|
196
|
+
labels,
|
|
197
|
+
className
|
|
198
|
+
}) {
|
|
199
|
+
const t = useLabels("colorPicker", COLOR_PICKER_LABELS, labels);
|
|
200
|
+
const root = React3.useRef(null);
|
|
201
|
+
const [format, setFormat] = React3.useState(() => formats[0] ?? "hex");
|
|
202
|
+
const [color, setColor] = useControllable(valueProp, defaultValue ?? "#000000", void 0);
|
|
203
|
+
const emit = React3.useCallback(
|
|
204
|
+
(next, meta) => {
|
|
205
|
+
setColor(next);
|
|
206
|
+
emitPick(onValueChange, next, meta);
|
|
207
|
+
},
|
|
208
|
+
[onValueChange, setColor]
|
|
209
|
+
);
|
|
210
|
+
const saved = React3.useMemo(() => (swatches ?? []).map((s) => normalizeSwatch(s)), [swatches]);
|
|
211
|
+
const { lookup, resolveNow } = useResolvedColors(
|
|
212
|
+
React3.useMemo(() => saved.map((s) => s.color), [saved]),
|
|
213
|
+
root
|
|
214
|
+
);
|
|
215
|
+
const state = useColorState({ color, format, alpha, onColorChange: emit });
|
|
216
|
+
const rgba = parseColor(state.text, { quiet: true }) ?? BLACK;
|
|
217
|
+
const css = toHex(rgba);
|
|
218
|
+
const columns = palette[0]?.length ?? 0;
|
|
219
|
+
const cells = React3.useMemo(() => palette.flatMap((row) => [...row]), [palette]);
|
|
220
|
+
const ragged = palette.findIndex((row) => row.length !== columns);
|
|
221
|
+
React3.useEffect(() => {
|
|
222
|
+
if (ragged !== -1) {
|
|
223
|
+
devWarn(
|
|
224
|
+
`<ColorPalettePicker> row ${ragged} has ${palette[ragged]?.length ?? 0} colors but row 0 has ${columns}. The grid is laid out against row 0, so a short row leaves holes. Make every row the same length.`
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
}, [ragged, columns, palette]);
|
|
228
|
+
const { itemProps } = useRovingIndex(cells.length, columns);
|
|
229
|
+
return /* @__PURE__ */ jsxs("div", { ref: root, className: cn("flex flex-col gap-4 p-4", className), children: [
|
|
230
|
+
cells.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-sm text-tertiary", children: t.emptyPalette }) : /* @__PURE__ */ jsx(
|
|
231
|
+
"div",
|
|
232
|
+
{
|
|
233
|
+
role: "listbox",
|
|
234
|
+
"aria-label": t.swatches,
|
|
235
|
+
className: "grid overflow-hidden rounded-lg ring-1 ring-on-color ring-inset",
|
|
236
|
+
style: { gridTemplateColumns: `repeat(${columns}, 1fr)` },
|
|
237
|
+
children: cells.map((cell, index) => {
|
|
238
|
+
const selected = sameColor(cell, css);
|
|
239
|
+
return /* @__PURE__ */ jsx(
|
|
240
|
+
"button",
|
|
241
|
+
{
|
|
242
|
+
type: "button",
|
|
243
|
+
role: "option",
|
|
244
|
+
"aria-selected": selected,
|
|
245
|
+
"aria-label": t.swatch({ color: cell }),
|
|
246
|
+
className: cn("relative aspect-square outline-none", selected && cn(SWATCH_SELECTED, "z-1")),
|
|
247
|
+
style: { "--swatch-color": cell },
|
|
248
|
+
onClick: () => state.setText(cell),
|
|
249
|
+
...itemProps(index),
|
|
250
|
+
children: /* @__PURE__ */ jsx("span", { className: "block size-full", style: { background: swatchPaint(cell) } })
|
|
251
|
+
},
|
|
252
|
+
`${cell}-${index}`
|
|
253
|
+
);
|
|
254
|
+
})
|
|
255
|
+
}
|
|
256
|
+
),
|
|
257
|
+
alpha ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
258
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-secondary", children: t.opacity }),
|
|
259
|
+
/* @__PURE__ */ jsx(
|
|
260
|
+
ColorSlider,
|
|
261
|
+
{
|
|
262
|
+
channel: "alpha",
|
|
263
|
+
baseColor: toHex({ ...rgba, a: 1 }),
|
|
264
|
+
value: state.hsva.a,
|
|
265
|
+
onValueChange: (a) => state.setChannels({ a }),
|
|
266
|
+
swatch: false,
|
|
267
|
+
readout: false,
|
|
268
|
+
labels
|
|
269
|
+
}
|
|
270
|
+
)
|
|
271
|
+
] }) : null,
|
|
272
|
+
/* @__PURE__ */ jsx(
|
|
273
|
+
ValueRow,
|
|
274
|
+
{
|
|
275
|
+
t,
|
|
276
|
+
text: state.text,
|
|
277
|
+
onCommit: state.setText,
|
|
278
|
+
format,
|
|
279
|
+
onFormatChange: setFormat,
|
|
280
|
+
formats,
|
|
281
|
+
color: css,
|
|
282
|
+
alpha: alpha ? state.hsva.a : null,
|
|
283
|
+
onAlphaChange: (a) => state.setChannels({ a })
|
|
284
|
+
}
|
|
285
|
+
),
|
|
286
|
+
swatches === void 0 ? null : /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
287
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
288
|
+
/* @__PURE__ */ jsx("p", { className: "flex-1 text-sm font-semibold text-secondary", children: t.saved }),
|
|
289
|
+
onAddSwatch === void 0 ? null : /* @__PURE__ */ jsx(
|
|
290
|
+
Button,
|
|
291
|
+
{
|
|
292
|
+
variant: "link",
|
|
293
|
+
color: "neutral",
|
|
294
|
+
size: "sm",
|
|
295
|
+
leading: /* @__PURE__ */ jsx(PlusIcon, {}),
|
|
296
|
+
loading: addingSwatch,
|
|
297
|
+
showTextWhileLoading: true,
|
|
298
|
+
"aria-label": t.addSwatch({ color: css }),
|
|
299
|
+
onClick: () => onAddSwatch(css),
|
|
300
|
+
children: t.add
|
|
301
|
+
}
|
|
302
|
+
)
|
|
303
|
+
] }),
|
|
304
|
+
swatches.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-sm text-tertiary", children: t.emptyPalette }) : /* @__PURE__ */ jsx(
|
|
305
|
+
SwatchRow,
|
|
306
|
+
{
|
|
307
|
+
swatches: saved,
|
|
308
|
+
resolve: lookup,
|
|
309
|
+
value: css,
|
|
310
|
+
listLabel: t.saved,
|
|
311
|
+
optionLabel: (c) => t.swatch({ color: c }),
|
|
312
|
+
onSelect: (swatch) => {
|
|
313
|
+
const hex = swatch.literal ?? resolveNow(swatch.color);
|
|
314
|
+
if (hex !== null) state.setText(hex, swatchMeta(swatch));
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
)
|
|
318
|
+
] })
|
|
319
|
+
] });
|
|
320
|
+
}
|
|
321
|
+
ColorPalettePicker.displayName = "ColorPalettePicker";
|
|
322
|
+
|
|
323
|
+
export { ColorPalettePicker, ColorSlider, ColorSwatchPicker };
|
|
324
|
+
//# sourceMappingURL=chunk-GV2KTRRP.js.map
|
|
325
|
+
//# sourceMappingURL=chunk-GV2KTRRP.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CONTROL_ICON } from './chunk-
|
|
1
|
+
import { CONTROL_ICON } from './chunk-HB6UA6EF.js';
|
|
2
2
|
import { Slot } from './chunk-52IFGFTL.js';
|
|
3
3
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
4
4
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
@@ -28,5 +28,5 @@ function MultiValueCount({ count, supportingText }) {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export { ListboxFooter, MultiValueCount };
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-GYL4KOPT.js.map
|
|
32
|
+
//# sourceMappingURL=chunk-GYL4KOPT.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TooltipExport } from './chunk-
|
|
2
|
-
import { CircleHelpIcon } from './chunk-
|
|
1
|
+
import { TooltipExport } from './chunk-KTWTYK5U.js';
|
|
2
|
+
import { CircleHelpIcon } from './chunk-KBI442IB.js';
|
|
3
3
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
4
|
-
import { useLabels } from './chunk-
|
|
4
|
+
import { useLabels } from './chunk-ZIEGUI25.js';
|
|
5
5
|
import { Field } from '@base-ui/react/field';
|
|
6
6
|
import 'react';
|
|
7
7
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -156,5 +156,5 @@ function FieldGroupFrame(props) {
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
export { BAR_SIZE, CONTROL_ICON, CONTROL_RADIUS, CONTROL_TEXT, FIELD_LABEL_CLASS, FieldFrame, FieldGroupFrame, LISTBOX_PX_SM, SHELL_SIZE, SLOT_ICON, useFieldValidity };
|
|
159
|
-
//# sourceMappingURL=chunk-
|
|
160
|
-
//# sourceMappingURL=chunk-
|
|
159
|
+
//# sourceMappingURL=chunk-HB6UA6EF.js.map
|
|
160
|
+
//# sourceMappingURL=chunk-HB6UA6EF.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { ruleEdge } from './chunk-EVINS473.js';
|
|
1
2
|
import { ScrollView } from './chunk-SKJC2KYD.js';
|
|
2
3
|
import { SURFACE_PADDING } from './chunk-45Y2ZGNK.js';
|
|
3
|
-
import { ruleEdge } from './chunk-LCG34A5T.js';
|
|
4
4
|
import { Slot } from './chunk-52IFGFTL.js';
|
|
5
5
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
6
6
|
import { mergeProps } from '@base-ui/react/merge-props';
|
|
@@ -109,5 +109,5 @@ function PanelChrome(props) {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
export { PanelChrome };
|
|
112
|
-
//# sourceMappingURL=chunk-
|
|
113
|
-
//# sourceMappingURL=chunk-
|
|
112
|
+
//# sourceMappingURL=chunk-HNNNJP3A.js.map
|
|
113
|
+
//# sourceMappingURL=chunk-HNNNJP3A.js.map
|