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
|
@@ -61,13 +61,33 @@ function warnExclusive(component, slot, set) {
|
|
|
61
61
|
if (!isDev()) return;
|
|
62
62
|
const on = set.filter(([, present]) => present).map(([name]) => name);
|
|
63
63
|
if (on.length > 1) {
|
|
64
|
-
devWarn(`<${component}> got ${on.map((
|
|
64
|
+
devWarn(`<${component}> got ${on.map((n2) => `\`${n2}\``).join(" + ")} but has one ${slot} \u2014 \`${on[0]}\` wins and the rest are ignored.`);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
function warnNeedsName(component, has, props = "`label`, `aria-label`, or `aria-labelledby`") {
|
|
68
68
|
if (has || !isDev()) return;
|
|
69
69
|
devWarn(`<${component}> needs an accessible name \u2014 pass ${props}.`);
|
|
70
70
|
}
|
|
71
|
+
var ASPECT_TOLERANCE = 0.15;
|
|
72
|
+
function warnAspectOverflow(component, prop, declared, el) {
|
|
73
|
+
if (!el || !isDev()) return;
|
|
74
|
+
const { width, height } = el.getBoundingClientRect();
|
|
75
|
+
if (width === 0 || height === 0) return;
|
|
76
|
+
const actual = width / height;
|
|
77
|
+
if (actual <= declared * (1 + ASPECT_TOLERANCE)) return;
|
|
78
|
+
devWarn(
|
|
79
|
+
`<${component}> \`${prop}\` is ${declared}, but the mark renders at ${actual.toFixed(2)} \u2014 wider than the box that ratio cleared. The mark is scaled down to fit rather than allowed to spill, so nothing breaks; what it costs is size, because the hole was punched the wrong shape and the height goes unused. Set \`${prop}={${Number(actual.toFixed(2))}}\`.`
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
function warnHostPadded(component, el) {
|
|
83
|
+
if (!el?.parentElement || !isDev()) return;
|
|
84
|
+
const cs = getComputedStyle(el.parentElement);
|
|
85
|
+
const padded = [cs.paddingTop, cs.paddingRight, cs.paddingBottom, cs.paddingLeft].some((v) => Number(v.replace("px", "")) > 0);
|
|
86
|
+
if (!padded) return;
|
|
87
|
+
devWarn(
|
|
88
|
+
`<${component}> draws its own row padding and expects an UNPADDED host, but its parent is padded (${cs.padding}) \u2014 so every row is inset twice and the full-bleed rule stops short of both edges. Pass \`padding="none"\` to the enclosing \`Popover\` or \`Card\`.`
|
|
89
|
+
);
|
|
90
|
+
}
|
|
71
91
|
function warnStickyNoScrollport(component, prop, el) {
|
|
72
92
|
if (!el || !isDev()) return;
|
|
73
93
|
const port = nearestScrollport(el);
|
|
@@ -76,7 +96,28 @@ function warnStickyNoScrollport(component, prop, el) {
|
|
|
76
96
|
`<${component}> \`${prop}\` has no scrollable ancestor \u2014 the nearest one is \`overflow-y: ${port.overflowY}\`, which clips its content instead of scrolling it, so the reader can never scroll it into a pinned state. Make that box \`overflow-y: auto\` (or drop the clip).`
|
|
77
97
|
);
|
|
78
98
|
}
|
|
99
|
+
var STEPS_PER_PIXEL_BUDGET = 10;
|
|
100
|
+
var n = (value) => value.toLocaleString("en-US");
|
|
101
|
+
function niceStep(raw) {
|
|
102
|
+
const magnitude = 10 ** Math.floor(Math.log10(raw));
|
|
103
|
+
const normalized = raw / magnitude;
|
|
104
|
+
return (normalized <= 1 ? 1 : normalized <= 2 ? 2 : normalized <= 5 ? 5 : 10) * magnitude;
|
|
105
|
+
}
|
|
106
|
+
function warnStepFinerThanTrack(component, prop, el, scale, axis, span) {
|
|
107
|
+
if (!el || !isDev()) return;
|
|
108
|
+
const { min, max, step } = scale;
|
|
109
|
+
if (!Number.isFinite(step) || step <= 0 || !Number.isFinite(max - min) || max <= min) return;
|
|
110
|
+
const travel = el.getBoundingClientRect()[axis] * (span?.portion ?? 1);
|
|
111
|
+
if (travel === 0) return;
|
|
112
|
+
const steps = (max - min) / step;
|
|
113
|
+
if (steps <= travel * STEPS_PER_PIXEL_BUDGET) return;
|
|
114
|
+
const px = Math.round(travel);
|
|
115
|
+
const perPixel = steps / travel;
|
|
116
|
+
devWarn(
|
|
117
|
+
`<${component}> \`${prop}\`${span ? ` in the ${span.band} band` : ""} is ${n(step)} across ${n(min)}\u2026${n(max)} \u2014 ${n(Math.round(steps))} steps along ${n(px)}px of travel, so one pixel is ${n(Math.round(perPixel))} steps and a drag can only ever land on about ${n(px)} of them. The grid is still honoured (arrow keys and a typed readout hit every value); what it is not is reachable by pointer, and the readout prints numbers a drag cannot reproduce. Use a coarser \`${prop}\` (\u2248${n(niceStep((max - min) / travel))} here) with \`format\`, or \`stops\` if the stops are a named set.`
|
|
118
|
+
);
|
|
119
|
+
}
|
|
79
120
|
|
|
80
|
-
export { devWarn, nearestScrollableOn, nearestScrollport, scrollportScrolls, warnExclusive, warnNeedsName, warnNonNegativeInt, warnPositiveInt, warnPositiveNumber, warnRange, warnStickyNoScrollport };
|
|
81
|
-
//# sourceMappingURL=chunk-
|
|
82
|
-
//# sourceMappingURL=chunk-
|
|
121
|
+
export { devWarn, nearestScrollableOn, nearestScrollport, scrollportScrolls, warnAspectOverflow, warnExclusive, warnHostPadded, warnNeedsName, warnNonNegativeInt, warnPositiveInt, warnPositiveNumber, warnRange, warnStepFinerThanTrack, warnStickyNoScrollport };
|
|
122
|
+
//# sourceMappingURL=chunk-SF3HCW4G.js.map
|
|
123
|
+
//# sourceMappingURL=chunk-SF3HCW4G.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Input } from './chunk-
|
|
4
|
-
import { TooltipExport } from './chunk-
|
|
5
|
-
import { ChevronsLeftIcon, ChevronLeftIcon, ChevronRightIcon, ChevronsRightIcon } from './chunk-
|
|
1
|
+
import { Separator } from './chunk-7OFGPDYJ.js';
|
|
2
|
+
import { NativeSelect } from './chunk-YKRE5NIH.js';
|
|
3
|
+
import { Input } from './chunk-7RD5RTHU.js';
|
|
4
|
+
import { TooltipExport } from './chunk-KTWTYK5U.js';
|
|
5
|
+
import { ChevronsLeftIcon, ChevronLeftIcon, ChevronRightIcon, ChevronsRightIcon } from './chunk-KBI442IB.js';
|
|
6
6
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
7
|
-
import { useLabels } from './chunk-
|
|
8
|
-
import { warnPositiveInt, warnNonNegativeInt } from './chunk-
|
|
7
|
+
import { useLabels } from './chunk-ZIEGUI25.js';
|
|
8
|
+
import { warnPositiveInt, warnNonNegativeInt } from './chunk-SF3HCW4G.js';
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
11
11
|
|
|
@@ -285,5 +285,5 @@ function Pagination({
|
|
|
285
285
|
Pagination.displayName = "Pagination";
|
|
286
286
|
|
|
287
287
|
export { Pagination, pageWindow };
|
|
288
|
-
//# sourceMappingURL=chunk-
|
|
289
|
-
//# sourceMappingURL=chunk-
|
|
288
|
+
//# sourceMappingURL=chunk-TDKKZA63.js.map
|
|
289
|
+
//# sourceMappingURL=chunk-TDKKZA63.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Progress } from './chunk-
|
|
2
|
-
import { Separator } from './chunk-7VLYQR4D.js';
|
|
1
|
+
import { Progress } from './chunk-DCKVNHV5.js';
|
|
3
2
|
import { FileTrigger } from './chunk-DJSXIAFH.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { Separator } from './chunk-7OFGPDYJ.js';
|
|
4
|
+
import { Button } from './chunk-3ZZZPT5G.js';
|
|
5
|
+
import { ButtonUtility } from './chunk-MVF7FA4D.js';
|
|
6
|
+
import { SOLID } from './chunk-6T3QAO5K.js';
|
|
7
|
+
import { useFieldValidity, FieldFrame } from './chunk-HB6UA6EF.js';
|
|
8
|
+
import { UploadCloudIcon, FileIcon, CircleXIcon, CircleCheckIcon, Trash2Icon, XIcon } from './chunk-KBI442IB.js';
|
|
9
9
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
10
|
-
import { useLabels } from './chunk-
|
|
11
|
-
import { warnNonNegativeInt, devWarn, warnRange } from './chunk-
|
|
10
|
+
import { useLabels } from './chunk-ZIEGUI25.js';
|
|
11
|
+
import { warnNonNegativeInt, devWarn, warnRange } from './chunk-SF3HCW4G.js';
|
|
12
12
|
import { mergeProps } from '@base-ui/react/merge-props';
|
|
13
13
|
import { useRender } from '@base-ui/react/use-render';
|
|
14
14
|
import * as React from 'react';
|
|
@@ -521,5 +521,5 @@ function FileList(props) {
|
|
|
521
521
|
}
|
|
522
522
|
|
|
523
523
|
export { Dropzone, FILE_TONE, FILE_TONE_BUCKETS, FileList, FileTypeGlyph, GLYPH_BOX, bucketFiles, extensionTone, fileExtension, fileGlyphSource, fileTone, formatFileSize, invalidAcceptEntries, isFileTypeAccepted, toUploadFile };
|
|
524
|
-
//# sourceMappingURL=chunk-
|
|
525
|
-
//# sourceMappingURL=chunk-
|
|
524
|
+
//# sourceMappingURL=chunk-TDXHBS2C.js.map
|
|
525
|
+
//# sourceMappingURL=chunk-TDXHBS2C.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useControllableOpen, DialogSurface } from './chunk-
|
|
1
|
+
import { useControllableOpen, DialogSurface } from './chunk-INYUL4DX.js';
|
|
2
2
|
import { AlertDialog as AlertDialog$1 } from '@base-ui/react/alert-dialog';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -55,5 +55,5 @@ function AlertDialog(props) {
|
|
|
55
55
|
AlertDialog.displayName = "AlertDialog";
|
|
56
56
|
|
|
57
57
|
export { AlertDialog };
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
59
|
-
//# sourceMappingURL=chunk-
|
|
58
|
+
//# sourceMappingURL=chunk-THGGU64E.js.map
|
|
59
|
+
//# sourceMappingURL=chunk-THGGU64E.js.map
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { devWarn } from './chunk-SF3HCW4G.js';
|
|
2
|
+
|
|
3
|
+
// src/lib/color-value.ts
|
|
4
|
+
var COLOR_FORMATS = ["hex", "rgb", "css", "hsl", "hsb"];
|
|
5
|
+
var BLACK = { r: 0, g: 0, b: 0, a: 1 };
|
|
6
|
+
var clamp = (n, lo, hi) => n < lo ? lo : Math.min(n, hi);
|
|
7
|
+
var ALPHA_STEPS = 100;
|
|
8
|
+
var clampAlpha = (a) => Number.isFinite(a) ? Math.round(clamp(a, 0, 1) * ALPHA_STEPS) / ALPHA_STEPS : 1;
|
|
9
|
+
var byte = (n) => clamp(Math.round(n), 0, 255);
|
|
10
|
+
var wrapHue = (h) => Number.isFinite(h) ? (h % 360 + 360) % 360 : 0;
|
|
11
|
+
var HEX_RE = /^#([0-9a-f]+)$/i;
|
|
12
|
+
var FN_RE = /^([a-z]+)\(([^()]*)\)$/i;
|
|
13
|
+
var POLAR_FNS = /* @__PURE__ */ new Set(["hsl", "hsla", "hsb", "hsba", "hsv", "hsva"]);
|
|
14
|
+
var expand = (digits) => digits.length <= 4 ? [...digits].map((d) => d + d).join("") : digits;
|
|
15
|
+
function parseHex(digits) {
|
|
16
|
+
if (digits.length !== 3 && digits.length !== 4 && digits.length !== 6 && digits.length !== 8) return null;
|
|
17
|
+
const full = expand(digits);
|
|
18
|
+
const at = (i) => Number.parseInt(full.slice(i, i + 2), 16);
|
|
19
|
+
return {
|
|
20
|
+
r: at(0),
|
|
21
|
+
g: at(2),
|
|
22
|
+
b: at(4),
|
|
23
|
+
a: full.length === 8 ? clampAlpha(at(6) / 255) : 1
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function splitArgs(body) {
|
|
27
|
+
const slash = body.split("/");
|
|
28
|
+
if (slash.length > 2) return null;
|
|
29
|
+
const head = (slash[0] ?? "").trim();
|
|
30
|
+
const parts = head === "" ? [] : head.split(/[\s,]+/);
|
|
31
|
+
if (slash.length === 2) {
|
|
32
|
+
const tail = (slash[1] ?? "").trim();
|
|
33
|
+
if (tail === "") return null;
|
|
34
|
+
parts.push(tail);
|
|
35
|
+
}
|
|
36
|
+
return parts;
|
|
37
|
+
}
|
|
38
|
+
function arg(token, scale) {
|
|
39
|
+
if (token === void 0) return null;
|
|
40
|
+
const t = token.trim();
|
|
41
|
+
if (t === "none") return 0;
|
|
42
|
+
const pct = t.endsWith("%");
|
|
43
|
+
const body = pct ? t.slice(0, -1) : t.replace(/deg$/i, "");
|
|
44
|
+
const raw = body.trim() === "" ? NaN : Number(body);
|
|
45
|
+
if (!Number.isFinite(raw)) return null;
|
|
46
|
+
return pct ? raw / 100 * scale : raw;
|
|
47
|
+
}
|
|
48
|
+
function parseColor(css, opts) {
|
|
49
|
+
const warn = (message) => {
|
|
50
|
+
if (opts?.quiet !== true) devWarn(message);
|
|
51
|
+
};
|
|
52
|
+
const s = css.trim().toLowerCase();
|
|
53
|
+
if (s === "") return null;
|
|
54
|
+
if (s === "transparent") return { r: 0, g: 0, b: 0, a: 0 };
|
|
55
|
+
const hex = HEX_RE.exec(s);
|
|
56
|
+
if (hex) {
|
|
57
|
+
const parsed = parseHex(hex[1] ?? "");
|
|
58
|
+
if (parsed === null) warn(`parseColor: "${css}" is not a 3-, 4-, 6- or 8-digit hex colour.`);
|
|
59
|
+
return parsed;
|
|
60
|
+
}
|
|
61
|
+
const fn = FN_RE.exec(s);
|
|
62
|
+
if (fn) {
|
|
63
|
+
const name = fn[1] ?? "";
|
|
64
|
+
const parts = splitArgs(fn[2] ?? "");
|
|
65
|
+
if (parts !== null && (parts.length === 3 || parts.length === 4)) {
|
|
66
|
+
const alpha = parts.length === 4 ? arg(parts[3], 1) : 1;
|
|
67
|
+
if (alpha !== null) {
|
|
68
|
+
const a = clampAlpha(alpha);
|
|
69
|
+
if (name === "rgb" || name === "rgba") {
|
|
70
|
+
const r = arg(parts[0], 255);
|
|
71
|
+
const g = arg(parts[1], 255);
|
|
72
|
+
const b = arg(parts[2], 255);
|
|
73
|
+
if (r !== null && g !== null && b !== null) return { r: byte(r), g: byte(g), b: byte(b), a };
|
|
74
|
+
} else if (POLAR_FNS.has(name)) {
|
|
75
|
+
const h = arg(parts[0], 360);
|
|
76
|
+
const x = arg(parts[1], 1);
|
|
77
|
+
const y = arg(parts[2], 1);
|
|
78
|
+
if (h !== null && x !== null && y !== null) {
|
|
79
|
+
const hue = wrapHue(h);
|
|
80
|
+
const sat = clamp(x, 0, 1);
|
|
81
|
+
const third = clamp(y, 0, 1);
|
|
82
|
+
return name.startsWith("hsl") ? hslaToRgba(hue, sat, third, a) : hsvaToRgba({ h: hue, s: sat, v: third, a });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
warn(
|
|
89
|
+
`parseColor: cannot parse "${css}". Supported: #hex, rgb()/rgba(), hsl()/hsla(), hsb()/hsv(), transparent. Named colours are not supported \u2014 pass a hex value.`
|
|
90
|
+
);
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
function rawRgbaToHsva({ r, g, b, a }) {
|
|
94
|
+
const max = Math.max(r, g, b);
|
|
95
|
+
const min = Math.min(r, g, b);
|
|
96
|
+
const d = max - min;
|
|
97
|
+
let h = 0;
|
|
98
|
+
if (d !== 0) {
|
|
99
|
+
if (max === r) h = 60 * ((g - b) / d % 6);
|
|
100
|
+
else if (max === g) h = 60 * ((b - r) / d + 2);
|
|
101
|
+
else h = 60 * ((r - g) / d + 4);
|
|
102
|
+
}
|
|
103
|
+
return { h: wrapHue(h), s: max === 0 ? 0 : d / max, v: max / 255, a };
|
|
104
|
+
}
|
|
105
|
+
function rgbaToHsva(rgba, prev) {
|
|
106
|
+
const hsva = rawRgbaToHsva(rgba);
|
|
107
|
+
if (prev === void 0) return hsva;
|
|
108
|
+
if (hsva.s === 0) hsva.h = prev.h;
|
|
109
|
+
if (hsva.v === 0) {
|
|
110
|
+
hsva.h = prev.h;
|
|
111
|
+
hsva.s = prev.s;
|
|
112
|
+
}
|
|
113
|
+
return hsva;
|
|
114
|
+
}
|
|
115
|
+
function hsvaToRgba({ h, s, v, a }) {
|
|
116
|
+
const hue = wrapHue(h) / 60;
|
|
117
|
+
const c = clamp(v, 0, 1) * clamp(s, 0, 1);
|
|
118
|
+
const x = c * (1 - Math.abs(hue % 2 - 1));
|
|
119
|
+
const m = clamp(v, 0, 1) - c;
|
|
120
|
+
const i = Math.floor(hue) % 6;
|
|
121
|
+
const rgb = i === 0 ? [c, x, 0] : i === 1 ? [x, c, 0] : i === 2 ? [0, c, x] : i === 3 ? [0, x, c] : i === 4 ? [x, 0, c] : [c, 0, x];
|
|
122
|
+
return { r: byte((rgb[0] + m) * 255), g: byte((rgb[1] + m) * 255), b: byte((rgb[2] + m) * 255), a: clampAlpha(a) };
|
|
123
|
+
}
|
|
124
|
+
function hslaToRgba(h, s, l, a) {
|
|
125
|
+
const c = (1 - Math.abs(2 * l - 1)) * s;
|
|
126
|
+
const hue = wrapHue(h) / 60;
|
|
127
|
+
const x = c * (1 - Math.abs(hue % 2 - 1));
|
|
128
|
+
const m = l - c / 2;
|
|
129
|
+
const i = Math.floor(hue) % 6;
|
|
130
|
+
const rgb = i === 0 ? [c, x, 0] : i === 1 ? [x, c, 0] : i === 2 ? [0, c, x] : i === 3 ? [0, x, c] : i === 4 ? [x, 0, c] : [c, 0, x];
|
|
131
|
+
return { r: byte((rgb[0] + m) * 255), g: byte((rgb[1] + m) * 255), b: byte((rgb[2] + m) * 255), a: clampAlpha(a) };
|
|
132
|
+
}
|
|
133
|
+
function rgbaToHsl({ r, g, b }) {
|
|
134
|
+
const { h, v, s: sv } = rawRgbaToHsva({ r, g, b, a: 1 });
|
|
135
|
+
const l = v * (1 - sv / 2);
|
|
136
|
+
const s = l === 0 || l === 1 ? 0 : (v - l) / Math.min(l, 1 - l);
|
|
137
|
+
return { h, s, l };
|
|
138
|
+
}
|
|
139
|
+
var hex2 = (n) => byte(n).toString(16).padStart(2, "0");
|
|
140
|
+
function toHex({ r, g, b, a }) {
|
|
141
|
+
const rgb = `#${hex2(r)}${hex2(g)}${hex2(b)}`;
|
|
142
|
+
return a < 1 ? `${rgb}${hex2(clampAlpha(a) * 255)}` : rgb;
|
|
143
|
+
}
|
|
144
|
+
var trim = (n) => String(Number(n.toFixed(2)));
|
|
145
|
+
function formatColor(rgba, format) {
|
|
146
|
+
const { r, g, b, a } = rgba;
|
|
147
|
+
const alpha = clampAlpha(a);
|
|
148
|
+
switch (format) {
|
|
149
|
+
case "hex": {
|
|
150
|
+
return toHex(rgba);
|
|
151
|
+
}
|
|
152
|
+
case "rgb": {
|
|
153
|
+
return alpha < 1 ? `rgba(${r}, ${g}, ${b}, ${trim(alpha)})` : `rgb(${r}, ${g}, ${b})`;
|
|
154
|
+
}
|
|
155
|
+
case "css": {
|
|
156
|
+
return alpha < 1 ? `rgb(${r} ${g} ${b} / ${trim(alpha)})` : `rgb(${r} ${g} ${b})`;
|
|
157
|
+
}
|
|
158
|
+
case "hsl": {
|
|
159
|
+
const { h, s, l } = rgbaToHsl(rgba);
|
|
160
|
+
const head = `${Math.round(h)}, ${Math.round(s * 100)}%, ${Math.round(l * 100)}%`;
|
|
161
|
+
return alpha < 1 ? `hsla(${head}, ${trim(alpha)})` : `hsl(${head})`;
|
|
162
|
+
}
|
|
163
|
+
case "hsb": {
|
|
164
|
+
const { h, s, v } = rawRgbaToHsva(rgba);
|
|
165
|
+
const head = `${Math.round(h)}, ${Math.round(s * 100)}%, ${Math.round(v * 100)}%`;
|
|
166
|
+
return alpha < 1 ? `hsb(${head}, ${trim(alpha)})` : `hsb(${head})`;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
function sameColor(a, b) {
|
|
171
|
+
const x = parseColor(a);
|
|
172
|
+
const y = parseColor(b);
|
|
173
|
+
if (x === null || y === null) return false;
|
|
174
|
+
return x.r === y.r && x.g === y.g && x.b === y.b && x.a === y.a;
|
|
175
|
+
}
|
|
176
|
+
function hueColor(h) {
|
|
177
|
+
return toHex(hsvaToRgba({ h, s: 1, v: 1, a: 1 }));
|
|
178
|
+
}
|
|
179
|
+
function toLinear(v) {
|
|
180
|
+
const s = v / 255;
|
|
181
|
+
return s <= 0.04045 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
|
|
182
|
+
}
|
|
183
|
+
function relativeLuminance({ r, g, b }) {
|
|
184
|
+
return 0.2126 * toLinear(r) + 0.7152 * toLinear(g) + 0.0722 * toLinear(b);
|
|
185
|
+
}
|
|
186
|
+
function readableOn(rgba) {
|
|
187
|
+
return relativeLuminance(rgba) > 0.1791 ? "dark" : "light";
|
|
188
|
+
}
|
|
189
|
+
function sortStops(stops) {
|
|
190
|
+
return [...stops].sort((a, b) => a.offset - b.offset);
|
|
191
|
+
}
|
|
192
|
+
function sampleStops(stops, offset) {
|
|
193
|
+
const sorted = sortStops(stops);
|
|
194
|
+
const first = sorted[0];
|
|
195
|
+
const last = sorted.at(-1);
|
|
196
|
+
if (first === void 0 || last === void 0) return "#000000";
|
|
197
|
+
const at = clamp(offset, 0, 1);
|
|
198
|
+
if (at <= first.offset) return first.color;
|
|
199
|
+
if (at >= last.offset) return last.color;
|
|
200
|
+
let lo = first;
|
|
201
|
+
let hi = last;
|
|
202
|
+
for (let i = 0; i < sorted.length - 1; i++) {
|
|
203
|
+
const a = sorted[i];
|
|
204
|
+
const b = sorted[i + 1];
|
|
205
|
+
if (at >= a.offset && at <= b.offset) {
|
|
206
|
+
lo = a;
|
|
207
|
+
hi = b;
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
const span = hi.offset - lo.offset;
|
|
212
|
+
const t = span === 0 ? 0 : (at - lo.offset) / span;
|
|
213
|
+
const A = parseColor(lo.color, { quiet: true }) ?? BLACK;
|
|
214
|
+
const B = parseColor(hi.color, { quiet: true }) ?? BLACK;
|
|
215
|
+
return toHex({
|
|
216
|
+
r: byte(A.r + (B.r - A.r) * t),
|
|
217
|
+
g: byte(A.g + (B.g - A.g) * t),
|
|
218
|
+
b: byte(A.b + (B.b - A.b) * t),
|
|
219
|
+
a: clampAlpha(A.a + (B.a - A.a) * t)
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
function reverseStops(stops) {
|
|
223
|
+
return sortStops(stops.map((s) => ({ color: s.color, offset: clamp(1 - s.offset, 0, 1) })));
|
|
224
|
+
}
|
|
225
|
+
var GRADIENT_FN = {
|
|
226
|
+
linear: "linear-gradient",
|
|
227
|
+
radial: "radial-gradient",
|
|
228
|
+
angular: "conic-gradient",
|
|
229
|
+
// `diamond` has NO CSS primitive. A `closest-side` radial is the standard approximation and the
|
|
230
|
+
// shape a design tool exports it as; record it rather than pretend the mapping is exact.
|
|
231
|
+
diamond: "radial-gradient"
|
|
232
|
+
};
|
|
233
|
+
var SEED_HUE_TURN = 60;
|
|
234
|
+
var SEED_VALUE_STEP = 0.42;
|
|
235
|
+
function seedSecondStop(color) {
|
|
236
|
+
const hsva = rgbaToHsva(parseColor(color, { quiet: true }) ?? BLACK);
|
|
237
|
+
const flat = hsva.s < 0.08 || hsva.v < 0.2;
|
|
238
|
+
const v = flat ? hsva.v <= 0.5 ? hsva.v + SEED_VALUE_STEP : hsva.v - SEED_VALUE_STEP : hsva.v;
|
|
239
|
+
return toHex(hsvaToRgba({ ...hsva, h: hsva.h + SEED_HUE_TURN, v }));
|
|
240
|
+
}
|
|
241
|
+
function convertKind(value, to) {
|
|
242
|
+
if (value.kind === to) return value;
|
|
243
|
+
if (to === "solid") {
|
|
244
|
+
return { kind: "solid", color: value.kind === "gradient" ? value.stops[0]?.color ?? "#000000" : "#000000" };
|
|
245
|
+
}
|
|
246
|
+
const color = value.kind === "solid" ? value.color : "#000000";
|
|
247
|
+
return {
|
|
248
|
+
kind: "gradient",
|
|
249
|
+
type: "linear",
|
|
250
|
+
angle: 90,
|
|
251
|
+
stops: [
|
|
252
|
+
{ color, offset: 0 },
|
|
253
|
+
// The far stop is the SAME colour one hue step round, so the first paint reads as a gradient
|
|
254
|
+
// OF the colour the user had — two ends, both opaque, neither one they have to go and fix.
|
|
255
|
+
{ color: seedSecondStop(color), offset: 1 }
|
|
256
|
+
]
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
function toCss(value) {
|
|
260
|
+
if (value.kind === "solid") return value.color;
|
|
261
|
+
const stops = value.stops.map((s) => `${s.color} ${Math.round(clamp(s.offset, 0, 1) * 100)}%`).join(", ");
|
|
262
|
+
const deg = Math.round(wrapHue(value.angle));
|
|
263
|
+
if (value.type === "linear") return `linear-gradient(${deg}deg, ${stops})`;
|
|
264
|
+
if (value.type === "angular") return `conic-gradient(from ${deg}deg, ${stops})`;
|
|
265
|
+
return `${GRADIENT_FN[value.type]}(${value.type === "diamond" ? "closest-side, " : ""}${stops})`;
|
|
266
|
+
}
|
|
267
|
+
function splitTopLevel(body) {
|
|
268
|
+
const out = [];
|
|
269
|
+
let depth = 0;
|
|
270
|
+
let start = 0;
|
|
271
|
+
for (let i = 0; i < body.length; i++) {
|
|
272
|
+
const ch = body[i];
|
|
273
|
+
if (ch === "(") depth++;
|
|
274
|
+
else if (ch === ")") depth--;
|
|
275
|
+
else if (ch === "," && depth === 0) {
|
|
276
|
+
out.push(body.slice(start, i));
|
|
277
|
+
start = i + 1;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
out.push(body.slice(start));
|
|
281
|
+
return out.map((x) => x.trim()).filter((x) => x !== "");
|
|
282
|
+
}
|
|
283
|
+
function parseStop(token, fallback) {
|
|
284
|
+
const m = /^(.*?)\s+(-?[\d.]+)%$/.exec(token);
|
|
285
|
+
const colorText = (m ? m[1] : token) ?? "";
|
|
286
|
+
const rgba = parseColor(colorText, { quiet: true });
|
|
287
|
+
if (rgba === null) return null;
|
|
288
|
+
const pct = m ? Number(m[2]) : fallback * 100;
|
|
289
|
+
if (!Number.isFinite(pct)) return null;
|
|
290
|
+
return { color: toHex(rgba), offset: clamp(pct / 100, 0, 1) };
|
|
291
|
+
}
|
|
292
|
+
function unsupportedGradient(fn, head) {
|
|
293
|
+
if (/^(to|at)\b/i.test(head)) return "a keyword direction (`to bottom right`) \u2014 pass an angle in degrees";
|
|
294
|
+
if (/\bin\s+(oklab|oklch|lab|lch|srgb|hsl)\b/i.test(head)) return "an interpolation hint (`in oklab`) \u2014 the colour space is not part of the value";
|
|
295
|
+
if (fn === "radial-gradient" && /\b(circle|ellipse|farthest|closest-corner)\b|\bat\b/i.test(head)) {
|
|
296
|
+
return "a radial shape or position (`circle at 30% 40%`) \u2014 only the bare form and `closest-side` are held";
|
|
297
|
+
}
|
|
298
|
+
return null;
|
|
299
|
+
}
|
|
300
|
+
function parseCss(css) {
|
|
301
|
+
const s = css.trim();
|
|
302
|
+
const grad = /^([a-z-]*gradient)\s*\((.*)\)$/is.exec(s);
|
|
303
|
+
if (grad) {
|
|
304
|
+
const fn = (grad[1] ?? "").toLowerCase();
|
|
305
|
+
const parts = splitTopLevel(grad[2] ?? "");
|
|
306
|
+
const warn = (why) => {
|
|
307
|
+
devWarn(`parseCss: cannot parse "${s.slice(0, 48)}\u2026" \u2014 it carries ${why}.`);
|
|
308
|
+
return null;
|
|
309
|
+
};
|
|
310
|
+
const head = parts[0] ?? "";
|
|
311
|
+
const refused = unsupportedGradient(fn, head);
|
|
312
|
+
if (refused !== null) return warn(refused);
|
|
313
|
+
let type = null;
|
|
314
|
+
let angle = 0;
|
|
315
|
+
let rest = parts;
|
|
316
|
+
switch (fn) {
|
|
317
|
+
case "linear-gradient": {
|
|
318
|
+
type = "linear";
|
|
319
|
+
const deg = /^(-?[\d.]+)deg$/i.exec(head);
|
|
320
|
+
if (deg) {
|
|
321
|
+
angle = Number(deg[1]);
|
|
322
|
+
rest = parts.slice(1);
|
|
323
|
+
}
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
case "conic-gradient": {
|
|
327
|
+
type = "angular";
|
|
328
|
+
const from = /^from\s+(-?[\d.]+)deg$/i.exec(head);
|
|
329
|
+
if (from) {
|
|
330
|
+
angle = Number(from[1]);
|
|
331
|
+
rest = parts.slice(1);
|
|
332
|
+
}
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
case "radial-gradient": {
|
|
336
|
+
if (/^closest-side$/i.test(head)) {
|
|
337
|
+
type = "diamond";
|
|
338
|
+
rest = parts.slice(1);
|
|
339
|
+
} else {
|
|
340
|
+
type = "radial";
|
|
341
|
+
}
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
default: {
|
|
345
|
+
return warn(`an unsupported gradient function (\`${fn}\`)`);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
const stops = [];
|
|
349
|
+
for (const [i, token] of rest.entries()) {
|
|
350
|
+
if (/^-?[\d.]+%$/.test(token)) return warn("a bare-percentage interpolation hint between two stops");
|
|
351
|
+
const stop = parseStop(token, rest.length === 1 ? 0 : i / (rest.length - 1));
|
|
352
|
+
if (stop === null) return warn(`a stop this parser cannot read (\`${token.slice(0, 24)}\`)`);
|
|
353
|
+
stops.push(stop);
|
|
354
|
+
}
|
|
355
|
+
if (stops.length < 2) return warn("fewer than two stops");
|
|
356
|
+
return { kind: "gradient", type: type ?? "linear", angle: wrapHue(angle), stops };
|
|
357
|
+
}
|
|
358
|
+
const rgba = parseColor(s);
|
|
359
|
+
return rgba === null ? null : { kind: "solid", color: toHex(rgba) };
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export { BLACK, COLOR_FORMATS, clampAlpha, convertKind, formatColor, hsvaToRgba, hueColor, parseColor, parseCss, readableOn, relativeLuminance, reverseStops, rgbaToHsva, sameColor, sampleStops, sortStops, toCss, toHex };
|
|
363
|
+
//# sourceMappingURL=chunk-UHSGD4CD.js.map
|
|
364
|
+
//# sourceMappingURL=chunk-UHSGD4CD.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useDebouncedCallback } from './chunk-F6NLE6XJ.js';
|
|
2
|
-
import { ListboxFooter, MultiValueCount } from './chunk-
|
|
3
|
-
import { useTagRow } from './chunk-IEAWNA3V.js';
|
|
4
|
-
import { tagSlotClass, tagContentClass, tagCloseClass, tagRootClass } from './chunk-4P2NBLBW.js';
|
|
2
|
+
import { ListboxFooter, MultiValueCount } from './chunk-GYL4KOPT.js';
|
|
5
3
|
import { ScrollView } from './chunk-SKJC2KYD.js';
|
|
4
|
+
import { useTagRow } from './chunk-VDFWWWLL.js';
|
|
5
|
+
import { tagSlotClass, tagContentClass, tagCloseClass, tagRootClass } from './chunk-4P2NBLBW.js';
|
|
6
6
|
import { mapOptions, isOptionGroup, buildOptionMap } from './chunk-7JBNLEJ7.js';
|
|
7
7
|
import { useControlScrollFade } from './chunk-7EUAMHMU.js';
|
|
8
|
-
import { FieldShell } from './chunk-
|
|
9
|
-
import { useFieldValidity, FieldFrame, LISTBOX_PX_SM, CONTROL_ICON, SLOT_ICON } from './chunk-
|
|
8
|
+
import { FieldShell } from './chunk-A36W77MQ.js';
|
|
9
|
+
import { useFieldValidity, FieldFrame, LISTBOX_PX_SM, CONTROL_ICON, SLOT_ICON } from './chunk-HB6UA6EF.js';
|
|
10
10
|
import { Slot } from './chunk-52IFGFTL.js';
|
|
11
11
|
import { POPUP_MOTION } from './chunk-O4GRKO3I.js';
|
|
12
|
-
import { PlusIcon, XIcon, ChevronDownIcon, LoaderCircleIcon, CheckIcon } from './chunk-
|
|
12
|
+
import { PlusIcon, XIcon, ChevronDownIcon, LoaderCircleIcon, CheckIcon } from './chunk-KBI442IB.js';
|
|
13
13
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
14
|
-
import { useLabels, usePublishedLabels, LabelsContext } from './chunk-
|
|
15
|
-
import { warnNonNegativeInt } from './chunk-
|
|
14
|
+
import { useLabels, usePublishedLabels, LabelsContext } from './chunk-ZIEGUI25.js';
|
|
15
|
+
import { warnNonNegativeInt } from './chunk-SF3HCW4G.js';
|
|
16
16
|
import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
|
|
17
17
|
import * as React from 'react';
|
|
18
18
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -571,5 +571,5 @@ ComboboxLoading.displayName = "ComboboxLoading";
|
|
|
571
571
|
var Combobox = ComboboxFlat;
|
|
572
572
|
|
|
573
573
|
export { Combobox };
|
|
574
|
-
//# sourceMappingURL=chunk-
|
|
575
|
-
//# sourceMappingURL=chunk-
|
|
574
|
+
//# sourceMappingURL=chunk-URAURI6G.js.map
|
|
575
|
+
//# sourceMappingURL=chunk-URAURI6G.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { INTRINSIC_CELL, INTRINSIC_STACK, IntrinsicWidth } from './chunk-7S2TBALK.js';
|
|
2
1
|
import { PopupScrollViewport } from './chunk-GWYDOZGQ.js';
|
|
3
|
-
import { Tag } from './chunk-LYXPJERB.js';
|
|
4
2
|
import { NO_RETURN_FOCUS } from './chunk-S7NNXWIN.js';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { Tag } from './chunk-YDD46AX2.js';
|
|
4
|
+
import { ListboxFooter, MultiValueCount } from './chunk-GYL4KOPT.js';
|
|
5
|
+
import { useTagRow } from './chunk-VDFWWWLL.js';
|
|
7
6
|
import { buildOptionMap, mapOptions } from './chunk-7JBNLEJ7.js';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { INTRINSIC_CELL, INTRINSIC_STACK, IntrinsicWidth } from './chunk-7S2TBALK.js';
|
|
8
|
+
import { FieldShell } from './chunk-A36W77MQ.js';
|
|
9
|
+
import { useFieldValidity, FieldFrame, SHELL_SIZE, BAR_SIZE, LISTBOX_PX_SM, CONTROL_ICON, SLOT_ICON } from './chunk-HB6UA6EF.js';
|
|
10
|
+
import { warnSeamlessFieldChrome, useSeamlessSlot, SEAMLESS_CONTROL } from './chunk-GPHGPY6T.js';
|
|
11
11
|
import { Slot } from './chunk-52IFGFTL.js';
|
|
12
12
|
import { POPUP_MOTION } from './chunk-O4GRKO3I.js';
|
|
13
|
-
import { ChevronDownIcon, CheckIcon } from './chunk-
|
|
13
|
+
import { ChevronDownIcon, CheckIcon } from './chunk-KBI442IB.js';
|
|
14
14
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
15
|
-
import { useLabels } from './chunk-
|
|
15
|
+
import { useLabels } from './chunk-ZIEGUI25.js';
|
|
16
16
|
import { Select as Select$1 } from '@base-ui/react/select';
|
|
17
17
|
import * as React from 'react';
|
|
18
18
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -85,6 +85,16 @@ function SelectRoot(props) {
|
|
|
85
85
|
// `rest` would be silently dropped. It belongs on the Field column like every other Field
|
|
86
86
|
// control (AGENTS §4/§6) — one class hook, no second `triggerClassName`.
|
|
87
87
|
className,
|
|
88
|
+
// Same trap, same reason, and it had actually bitten: an accessible NAME left in `rest` reaches
|
|
89
|
+
// `Select.Root`, which renders no DOM node, and vanishes. So `<Select seamless aria-label="…">` —
|
|
90
|
+
// the exact spelling the `seamless` prop's own TSDoc prescribes, because a seamless select has no
|
|
91
|
+
// `label` chrome to be named by — produced a trigger with NO accessible name at all. Its computed
|
|
92
|
+
// name fell back to its VALUE ("Heading 2"), so it announced its state instead of its purpose, and
|
|
93
|
+
// axe did not flag it: a combobox whose content is its value HAS a name, just the wrong one.
|
|
94
|
+
// Found in the browser on RichTextEditor's block-type select, which is a seamless Select in a
|
|
95
|
+
// toolbar and therefore the first caller to depend on this path.
|
|
96
|
+
"aria-label": ariaLabel,
|
|
97
|
+
"aria-labelledby": ariaLabelledBy,
|
|
88
98
|
...rest
|
|
89
99
|
} = props;
|
|
90
100
|
const { isInvalid, showError } = useFieldValidity(invalid, error);
|
|
@@ -102,6 +112,8 @@ function SelectRoot(props) {
|
|
|
102
112
|
size,
|
|
103
113
|
invalid: isInvalid,
|
|
104
114
|
labelId,
|
|
115
|
+
ariaLabel,
|
|
116
|
+
ariaLabelledBy,
|
|
105
117
|
multiple: isMulti,
|
|
106
118
|
indicator,
|
|
107
119
|
indicatorAlign: selectionIndicatorAlign,
|
|
@@ -111,7 +123,7 @@ function SelectRoot(props) {
|
|
|
111
123
|
anchorRef,
|
|
112
124
|
closeReasonRef
|
|
113
125
|
}),
|
|
114
|
-
[size, isInvalid, labelId, isMulti, indicator, selectionIndicatorAlign, optionMap, seamless, fullWidth]
|
|
126
|
+
[size, isInvalid, labelId, ariaLabel, ariaLabelledBy, isMulti, indicator, selectionIndicatorAlign, optionMap, seamless, fullWidth]
|
|
115
127
|
);
|
|
116
128
|
const tree = /* @__PURE__ */ jsx(
|
|
117
129
|
Select$1.Root,
|
|
@@ -202,7 +214,7 @@ function SelectTrigger(props) {
|
|
|
202
214
|
trailingAddon,
|
|
203
215
|
...rest
|
|
204
216
|
} = props;
|
|
205
|
-
const { size, invalid, labelId, multiple, optionMap, seamless, fullWidth, anchorRef } = useSelectContext();
|
|
217
|
+
const { size, invalid, labelId, ariaLabel, ariaLabelledBy, multiple, optionMap, seamless, fullWidth, anchorRef } = useSelectContext();
|
|
206
218
|
const slot = useSeamlessSlot();
|
|
207
219
|
const useRenderFn = multiple || optionMap.size > 0;
|
|
208
220
|
const sizingCandidates = React.useMemo(() => {
|
|
@@ -243,13 +255,23 @@ function SelectTrigger(props) {
|
|
|
243
255
|
// stays 400 (`text-placeholder`).
|
|
244
256
|
/* @__PURE__ */ jsx(Select$1.Value, { className: cn(valueFill, "truncate text-left font-medium group-data-[placeholder]:font-normal"), placeholder })
|
|
245
257
|
);
|
|
246
|
-
const trigger = /* @__PURE__ */ jsxs(
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
258
|
+
const trigger = /* @__PURE__ */ jsxs(
|
|
259
|
+
Select$1.Trigger,
|
|
260
|
+
{
|
|
261
|
+
"aria-invalid": invalid || void 0,
|
|
262
|
+
"aria-label": ariaLabel,
|
|
263
|
+
"aria-labelledby": ariaLabelledBy ?? labelId,
|
|
264
|
+
className: triggerClass,
|
|
265
|
+
...rest,
|
|
266
|
+
children: [
|
|
267
|
+
sized ? /* @__PURE__ */ jsxs("span", { className: INTRINSIC_STACK, children: [
|
|
268
|
+
value,
|
|
269
|
+
/* @__PURE__ */ jsx(IntrinsicWidth, { candidates: sizingCandidates, className: "font-medium" })
|
|
270
|
+
] }) : value,
|
|
271
|
+
/* @__PURE__ */ jsx(Select$1.Icon, { className: cn("ml-2 inline-flex shrink-0 text-fg-quaternary", CHEVRON[size]), children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
);
|
|
253
275
|
if (seamless) return trigger;
|
|
254
276
|
return /* @__PURE__ */ jsx(
|
|
255
277
|
FieldShell,
|
|
@@ -451,5 +473,5 @@ SelectGroupLabel.displayName = "SelectGroupLabel";
|
|
|
451
473
|
var Select = SelectFlat;
|
|
452
474
|
|
|
453
475
|
export { Select };
|
|
454
|
-
//# sourceMappingURL=chunk-
|
|
455
|
-
//# sourceMappingURL=chunk-
|
|
476
|
+
//# sourceMappingURL=chunk-UU6KUS5O.js.map
|
|
477
|
+
//# sourceMappingURL=chunk-UU6KUS5O.js.map
|