jenosize-ui 0.2.0 → 0.2.2
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 +2 -2
- package/dist/{PaymentInput-CKPIPNWH.d.ts → PaymentInput-Dn5WVQVy.d.ts} +4 -0
- package/dist/{Select-CVbEQ2Ep.d.ts → Select-Dt5ARIH8.d.ts} +4 -0
- package/dist/{TagInput-CTJYOB4J.d.ts → TagInput-BaBeve6L.d.ts} +4 -0
- package/dist/area-chart.d.ts +3 -2
- package/dist/area-chart.js +6 -5
- package/dist/avatar.d.ts +5 -0
- package/dist/avatar.js +10 -9
- package/dist/badge.d.ts +4 -0
- package/dist/badge.js +5 -4
- package/dist/bar-chart.d.ts +3 -2
- package/dist/bar-chart.js +6 -5
- package/dist/breadcrumb.d.ts +4 -0
- package/dist/breadcrumb.js +4 -2
- package/dist/button.d.ts +6 -1
- package/dist/button.js +9 -8
- package/dist/calendar.d.ts +5 -0
- package/dist/calendar.js +16 -14
- package/dist/callout.d.ts +6 -6
- package/dist/callout.js +11 -9
- package/dist/card-D56VxyAe.d.ts +123 -0
- package/dist/card.d.ts +3 -51
- package/dist/card.js +5 -5
- package/dist/checkbox.js +8 -7
- package/dist/{chunk-75M43ELV.js → chunk-22M75A3N.js} +75 -45
- package/dist/{chunk-X2X7Q7NW.js → chunk-2R3QWWOT.js} +3 -3
- package/dist/{chunk-A46ED5JQ.js → chunk-33TOK7ES.js} +7 -5
- package/dist/{chunk-BNIWT6CW.js → chunk-3HOHLQVP.js} +7 -6
- package/dist/{chunk-DJYWPJZ3.js → chunk-3QXLIZIX.js} +3 -12
- package/dist/chunk-3ZEEGXYF.js +8 -0
- package/dist/chunk-45Y2ZGNK.js +34 -0
- package/dist/{chunk-ILICYNK7.js → chunk-4RBIWI2Q.js} +3 -3
- package/dist/{chunk-EX374YWB.js → chunk-54SIZR63.js} +15 -7
- package/dist/chunk-5AZKP4KZ.js +49 -0
- package/dist/{chunk-NA35YZRD.js → chunk-5DP7W5HX.js} +13 -11
- package/dist/{chunk-QKDEQFOQ.js → chunk-5KSD4WKN.js} +13 -4
- package/dist/{chunk-RIXEUAPY.js → chunk-5XPMY2LF.js} +5 -5
- package/dist/{chunk-L53Y7KUV.js → chunk-5YWH2ANQ.js} +62 -29
- package/dist/{chunk-6UBYHSBX.js → chunk-5ZEUTSCV.js} +5 -5
- package/dist/{chunk-JAVNGTOE.js → chunk-6MMBQVRO.js} +58 -43
- package/dist/{chunk-RNXRZGXN.js → chunk-74AIU53R.js} +5 -3
- package/dist/{chunk-JMWYCT63.js → chunk-7GUPNTAH.js} +14 -6
- package/dist/{chunk-DCGTB7P7.js → chunk-7QXOGAN6.js} +111 -39
- package/dist/{chunk-TBN644IN.js → chunk-7ZM7SNCZ.js} +3 -3
- package/dist/{chunk-AC6ZWKRN.js → chunk-AFYXSZGW.js} +2 -2
- package/dist/chunk-AIARANKE.js +33 -0
- package/dist/{chunk-54S5CUY6.js → chunk-AIGYMTCU.js} +5 -4
- package/dist/{chunk-C6OTOTKI.js → chunk-AZ7DKRBY.js} +5 -5
- package/dist/{chunk-QBHQOX23.js → chunk-BBKE4W3B.js} +18 -10
- package/dist/{chunk-FFTRB2UU.js → chunk-CFFWYXDW.js} +18 -6
- package/dist/{chunk-42FCPC77.js → chunk-CGHYXWTT.js} +10 -4
- package/dist/{chunk-FZBZGA3P.js → chunk-CGZXQ7PA.js} +4 -4
- package/dist/{chunk-GAFGIT4Q.js → chunk-D6XO4JVM.js} +30 -10
- package/dist/{chunk-GTHJWR3Q.js → chunk-D7EE5GWU.js} +21 -22
- package/dist/{chunk-USL3TDZM.js → chunk-DD5KJVFV.js} +321 -105
- package/dist/{chunk-NMERLWT7.js → chunk-E2YZ7IMT.js} +23 -7
- package/dist/{chunk-5JRM3OES.js → chunk-FNQJJO63.js} +3 -3
- package/dist/{chunk-MD4AR43X.js → chunk-FWRHBMWT.js} +3 -3
- package/dist/{chunk-4K6V6NNK.js → chunk-GLKFFA7N.js} +10 -8
- package/dist/{chunk-EDOUI2BG.js → chunk-GQRSABRN.js} +4 -4
- package/dist/{chunk-PO2TYK3C.js → chunk-GWYDOZGQ.js} +3 -3
- package/dist/{chunk-HSVBTIP2.js → chunk-HHYEAFCL.js} +70 -27
- package/dist/{chunk-DTMYD63D.js → chunk-HV2W6HUR.js} +47 -27
- package/dist/{chunk-P7DH62UY.js → chunk-I6WMNXC7.js} +5 -5
- package/dist/{chunk-6HJA7NPL.js → chunk-IEAWNA3V.js} +9 -4
- package/dist/{chunk-34J5AANZ.js → chunk-IQNVSQRK.js} +3 -3
- package/dist/{chunk-MCUASLZH.js → chunk-KHGW72BM.js} +3 -3
- package/dist/{chunk-FIGBJGH2.js → chunk-KJ5JUS53.js} +115 -79
- package/dist/{chunk-4R7WDDCW.js → chunk-KZP6B6B3.js} +4 -4
- package/dist/{chunk-4W6AYGLR.js → chunk-LE44X5GS.js} +55 -39
- package/dist/{chunk-7HV6EIGZ.js → chunk-LLPWQDF7.js} +3 -3
- package/dist/{chunk-JXHZHUB3.js → chunk-LQURV7HQ.js} +9 -7
- package/dist/{chunk-EDT5J5WK.js → chunk-LYXPJERB.js} +14 -4
- package/dist/{chunk-6IUTVDNI.js → chunk-MCQG4H6T.js} +35 -3
- package/dist/{chunk-4BRMM3I5.js → chunk-MFFA5MXY.js} +7 -6
- package/dist/{chunk-PXEJ5RKO.js → chunk-N3RVMBPX.js} +6 -9
- package/dist/{chunk-VH35QHD4.js → chunk-NC63TYNW.js} +16 -8
- package/dist/{chunk-VWGAMOSE.js → chunk-NKG4N6HA.js} +3 -3
- package/dist/{chunk-A5WQLN4B.js → chunk-OACWA4TC.js} +14 -52
- package/dist/{chunk-LBYCCLVI.js → chunk-OLLD2BZN.js} +9 -9
- package/dist/{chunk-T2WAD4QP.js → chunk-POQTE7JI.js} +55 -16
- package/dist/{chunk-74HPBSVY.js → chunk-QDKETK7D.js} +4 -4
- package/dist/{chunk-VEOYCAJP.js → chunk-QNIKRB62.js} +27 -7
- package/dist/{chunk-JYBGO6GY.js → chunk-R4Z7BINC.js} +11 -8
- package/dist/chunk-RJTVCA62.js +42 -0
- package/dist/{chunk-3GT43XPK.js → chunk-SB3DG572.js} +15 -8
- package/dist/{chunk-FKVPAEJ6.js → chunk-SKJC2KYD.js} +4 -3
- package/dist/{chunk-NKDW6C7K.js → chunk-SKRR3ZMP.js} +3 -3
- package/dist/{chunk-CTENRS34.js → chunk-T4ZFZTY6.js} +8 -6
- package/dist/{chunk-YLEHYDXC.js → chunk-T5574MXM.js} +33 -45
- package/dist/{chunk-4HKDD3PR.js → chunk-TX57TNJS.js} +92 -58
- package/dist/{chunk-CWMFEF6R.js → chunk-UGBNYSBN.js} +81 -29
- package/dist/{chunk-M5TVCASC.js → chunk-ULGCGKOE.js} +8 -6
- package/dist/{chunk-JUWDRRD6.js → chunk-X2VMIBK5.js} +4 -4
- package/dist/{chunk-763VS2FY.js → chunk-YHBI52P2.js} +3 -3
- package/dist/chunk-YIHKQ63K.js +13 -0
- package/dist/{chunk-3Z3SDKIA.js → chunk-YPNL2NBD.js} +5 -5
- package/dist/{chunk-MYQ3FD4Y.js → chunk-ZD3MOLIB.js} +8 -5
- package/dist/{chunk-BD5YKFRA.js → chunk-ZR6HNKSN.js} +5 -3
- package/dist/{chunk-WKWAUU64.js → chunk-ZZSNTCCL.js} +6 -5
- package/dist/combobox.d.ts +5 -0
- package/dist/combobox.js +13 -12
- package/dist/date-input.d.ts +4 -0
- package/dist/date-input.js +11 -9
- package/dist/date-picker.d.ts +6 -0
- package/dist/date-picker.js +24 -22
- package/dist/dialog.d.ts +21 -1
- package/dist/dialog.js +11 -9
- package/dist/drawer.d.ts +11 -1
- package/dist/drawer.js +10 -8
- package/dist/dropdown-menu.d.ts +12 -0
- package/dist/dropdown-menu.js +7 -6
- package/dist/dropzone.d.ts +3 -2
- package/dist/dropzone.js +13 -12
- package/dist/form.d.ts +5 -4
- package/dist/form.js +61 -45
- package/dist/header-navigation.d.ts +5 -1
- package/dist/header-navigation.js +21 -19
- package/dist/helper.d.ts +36 -0
- package/dist/helper.js +3 -0
- package/dist/index.d.ts +13 -11
- package/dist/index.js +83 -78
- package/dist/indicator.js +4 -4
- package/dist/input.d.ts +4 -0
- package/dist/input.js +9 -8
- package/dist/kanban-board.d.ts +21 -81
- package/dist/kanban-board.js +15 -13
- package/dist/labels-DPrh0se9.d.ts +627 -0
- package/dist/line-chart.d.ts +3 -2
- package/dist/line-chart.js +6 -5
- package/dist/{nav-DcCyt00p.d.ts → nav-CKKqjBs6.d.ts} +10 -0
- package/dist/number-input.d.ts +4 -0
- package/dist/number-input.js +9 -8
- package/dist/pagination.d.ts +7 -1
- package/dist/pagination.js +11 -10
- package/dist/payment-input.d.ts +3 -2
- package/dist/payment-input.js +9 -8
- package/dist/pie-chart.d.ts +7 -3
- package/dist/pie-chart.js +6 -5
- package/dist/popover.js +10 -8
- package/dist/progress-steps.js +2 -2
- package/dist/progress.d.ts +21 -1
- package/dist/progress.js +3 -2
- package/dist/provider.d.ts +212 -0
- package/dist/provider.js +7 -0
- package/dist/radar-chart.d.ts +7 -3
- package/dist/radar-chart.js +6 -5
- package/dist/radial-chart.d.ts +7 -3
- package/dist/radial-chart.js +6 -5
- package/dist/radio.js +8 -7
- package/dist/scroll-area.js +2 -2
- package/dist/select.d.ts +2 -1
- package/dist/select.js +15 -14
- package/dist/shared-CxAedkiy.d.ts +68 -0
- package/dist/sidebar-navigation.d.ts +36 -7
- package/dist/sidebar-navigation.js +15 -13
- package/dist/skeleton.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/switch.js +4 -4
- package/dist/table.d.ts +56 -6
- package/dist/table.js +37 -35
- package/dist/tabs.d.ts +22 -0
- package/dist/tabs.js +3 -3
- package/dist/tag-input.d.ts +3 -2
- package/dist/tag-input.js +12 -11
- package/dist/tag.d.ts +4 -0
- package/dist/tag.js +3 -2
- package/dist/textarea.js +6 -5
- package/dist/theme.css +69 -6
- package/dist/theme.js +10 -9
- package/dist/toast.d.ts +11 -2
- package/dist/toast.js +11 -9
- package/dist/{tooltip-surface-Dmvb8v5K.d.ts → tooltip-surface-C2I9o2QM.d.ts} +1 -1
- package/dist/tooltip.d.ts +2 -2
- package/dist/tooltip.js +3 -3
- package/dist/tree.d.ts +5 -0
- package/dist/tree.js +5 -4
- package/dist/{types-6kvYwtRH.d.ts → types-DR9rAEy1.d.ts} +45 -13
- package/dist/{use-uploads-ButS4dGe.d.ts → use-uploads-KaPqDklo.d.ts} +9 -0
- package/dist/verification-code-input.js +8 -7
- package/package.json +12 -1
- package/dist/chunk-MFJP5FA7.js +0 -20
- package/dist/shared-BNXAdgh2.d.ts +0 -9
- package/dist/surface-DFyDnrTJ.d.ts +0 -34
|
@@ -1,12 +1,24 @@
|
|
|
1
|
-
import { DEFAULT_FORMAT, parseFormat, fromISO, toISO, dispBounds,
|
|
1
|
+
import { DEFAULT_FORMAT, parseFormat, fromISO, toISO, dispBounds, segValueText, getDisp, parsePastedDate, applyPastedDate, clamp, pad, displaySeg, setDisp, wrap } from './chunk-3QXLIZIX.js';
|
|
2
|
+
import { useLocaleConfig } from './chunk-YIHKQ63K.js';
|
|
2
3
|
import { useControlScrollFade } from './chunk-7EUAMHMU.js';
|
|
3
|
-
import { FieldShell } from './chunk-
|
|
4
|
-
import { useFieldValidity, FieldFrame } from './chunk-
|
|
4
|
+
import { FieldShell } from './chunk-X2VMIBK5.js';
|
|
5
|
+
import { useFieldValidity, FieldFrame } from './chunk-5KSD4WKN.js';
|
|
5
6
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
7
|
+
import { useLabels } from './chunk-RJTVCA62.js';
|
|
6
8
|
import { Field } from '@base-ui/react/field';
|
|
7
9
|
import * as React from 'react';
|
|
8
10
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
11
|
|
|
12
|
+
// src/components/date-input/labels.ts
|
|
13
|
+
var DATE_INPUT_LABELS = {
|
|
14
|
+
month: "Month",
|
|
15
|
+
day: "Day",
|
|
16
|
+
year: "Year",
|
|
17
|
+
hour: "Hour",
|
|
18
|
+
minute: "Minute",
|
|
19
|
+
second: "Second",
|
|
20
|
+
dayPeriod: "AM/PM"
|
|
21
|
+
};
|
|
10
22
|
var SEG_BASE = (
|
|
11
23
|
// UUI DateSegment: the focused (brand-boxed) segment bumps to `font-medium` (500).
|
|
12
24
|
"rounded-sm px-0.5 tabular-nums caret-transparent outline-none cursor-default select-none focus:bg-brand-solid focus:font-medium focus:text-fg-white"
|
|
@@ -20,7 +32,8 @@ function DateInput(props) {
|
|
|
20
32
|
min,
|
|
21
33
|
max,
|
|
22
34
|
format = DEFAULT_FORMAT,
|
|
23
|
-
era
|
|
35
|
+
era: eraProp,
|
|
36
|
+
labels,
|
|
24
37
|
leading,
|
|
25
38
|
trailing,
|
|
26
39
|
leadingAddon,
|
|
@@ -39,6 +52,9 @@ function DateInput(props) {
|
|
|
39
52
|
id,
|
|
40
53
|
className
|
|
41
54
|
} = props;
|
|
55
|
+
const t = useLabels("dateInput", DATE_INPUT_LABELS, labels);
|
|
56
|
+
const app = useLocaleConfig();
|
|
57
|
+
const era = eraProp ?? app.era ?? "ce";
|
|
42
58
|
const { ref: fadeRef, style: fadeStyle } = useControlScrollFade(true);
|
|
43
59
|
const parsed = React.useMemo(() => parseFormat(format), [format]);
|
|
44
60
|
const cfg = {
|
|
@@ -269,7 +285,7 @@ function DateInput(props) {
|
|
|
269
285
|
role: "spinbutton",
|
|
270
286
|
"data-segment": seg,
|
|
271
287
|
tabIndex: disabled ? -1 : 0,
|
|
272
|
-
"aria-label":
|
|
288
|
+
"aria-label": t[seg],
|
|
273
289
|
"aria-describedby": describedBy,
|
|
274
290
|
"aria-valuenow": getDisp(seg, parts, cfg) ?? void 0,
|
|
275
291
|
"aria-valuemin": lo,
|
|
@@ -293,5 +309,5 @@ function DateInput(props) {
|
|
|
293
309
|
}
|
|
294
310
|
|
|
295
311
|
export { DateInput };
|
|
296
|
-
//# sourceMappingURL=chunk-
|
|
297
|
-
//# sourceMappingURL=chunk-
|
|
312
|
+
//# sourceMappingURL=chunk-E2YZ7IMT.js.map
|
|
313
|
+
//# sourceMappingURL=chunk-E2YZ7IMT.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button } from './chunk-
|
|
1
|
+
import { Button } from './chunk-OACWA4TC.js';
|
|
2
2
|
import { MoonIcon, SunIcon } from './chunk-BLIZ3CL3.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -132,5 +132,5 @@ function ThemeToggle({ size = "sm", className }) {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
export { ThemeProvider, ThemeScript, ThemeToggle, buildThemeScript, useTheme };
|
|
135
|
-
//# sourceMappingURL=chunk-
|
|
136
|
-
//# sourceMappingURL=chunk-
|
|
135
|
+
//# sourceMappingURL=chunk-FNQJJO63.js.map
|
|
136
|
+
//# sourceMappingURL=chunk-FNQJJO63.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BE_OFFSET } from './chunk-
|
|
1
|
+
import { BE_OFFSET } from './chunk-3QXLIZIX.js';
|
|
2
2
|
import { devWarn } from './chunk-QDYE5LVT.js';
|
|
3
3
|
import { TZDate } from '@date-fns/tz';
|
|
4
4
|
import { format, startOfDay, startOfWeek, startOfMonth, endOfMonth, addDays, addMonths, differenceInCalendarDays } from 'date-fns';
|
|
@@ -102,5 +102,5 @@ function useControllable(controlled, uncontrolledInitial, onChange) {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
export { DEFAULT_WEEK_START, DEFAULT_WEEK_START_INDEX, addDaysIn, addMonthsIn, dayKey, differenceInDaysIn, displayYear, earlierOf, formatIn, laterOf, minutesFromMidnight, monthOf, resolveTimeZone, startOfDayIn, startOfLastDayOfMonthIn, startOfMonthIn, startOfWeekIn, toWireDate, toWireInstant, useControllable, weekStartIndex };
|
|
105
|
-
//# sourceMappingURL=chunk-
|
|
106
|
-
//# sourceMappingURL=chunk-
|
|
105
|
+
//# sourceMappingURL=chunk-FWRHBMWT.js.map
|
|
106
|
+
//# sourceMappingURL=chunk-FWRHBMWT.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveMax } from './chunk-
|
|
2
|
-
import { useCartesianColors, POLAR_RADIUS_RINGS_DEFAULT, ChartDataTable, formatNumber, ChartFrame, RadarChart, POLAR_ROOT, MARGIN, PolarGrid, GRID, PolarAngleAxis, PolarRadiusAxis, Tooltip, TOOLTIP_CURSOR, NO_ANIMATION, ChartTooltipContent, Radar, ACTIVE_DOT, ChartLegendContent, POLAR_ANGLE_TICK_LIFT, Text, POLAR_ANGLE_TICK, POLAR_RADIUS_PILL_HEIGHT, POLAR_RADIUS_PILL_PAD_X, POLAR_RADIUS_PILL, POLAR_RADIUS_PILL_BASELINE } from './chunk-
|
|
1
|
+
import { resolveMax } from './chunk-OLLD2BZN.js';
|
|
2
|
+
import { useCartesianColors, DEFAULT_PALETTE, POLAR_RADIUS_RINGS_DEFAULT, ChartDataTable, formatNumber, ChartFrame, RadarChart, POLAR_ROOT, MARGIN, PolarGrid, GRID, PolarAngleAxis, PolarRadiusAxis, Tooltip, TOOLTIP_CURSOR, NO_ANIMATION, ChartTooltipContent, Radar, ACTIVE_DOT, ChartLegendContent, POLAR_ANGLE_TICK_LIFT, Text, POLAR_ANGLE_TICK, POLAR_RADIUS_PILL_HEIGHT, POLAR_RADIUS_PILL_PAD_X, POLAR_RADIUS_PILL, POLAR_RADIUS_PILL_BASELINE } from './chunk-22M75A3N.js';
|
|
3
3
|
import { devWarn } from './chunk-QDYE5LVT.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -42,7 +42,7 @@ function RadarChart2({
|
|
|
42
42
|
data,
|
|
43
43
|
angle,
|
|
44
44
|
series,
|
|
45
|
-
palette =
|
|
45
|
+
palette = DEFAULT_PALETTE,
|
|
46
46
|
max = "auto",
|
|
47
47
|
gridRings = POLAR_RADIUS_RINGS_DEFAULT,
|
|
48
48
|
height = 320,
|
|
@@ -50,7 +50,8 @@ function RadarChart2({
|
|
|
50
50
|
formatValue = formatNumber,
|
|
51
51
|
tooltip = true,
|
|
52
52
|
tooltipTone = "surface",
|
|
53
|
-
emptyMessage
|
|
53
|
+
emptyMessage,
|
|
54
|
+
labels,
|
|
54
55
|
className,
|
|
55
56
|
"aria-label": ariaLabel
|
|
56
57
|
}) {
|
|
@@ -67,7 +68,7 @@ function RadarChart2({
|
|
|
67
68
|
}
|
|
68
69
|
return { colorMap: colorMap2, labelMap: labelMap2 };
|
|
69
70
|
}, [series, colors]);
|
|
70
|
-
const legendItems = React.useMemo(() => series.map((s, i) => ({ label: s.label,
|
|
71
|
+
const legendItems = React.useMemo(() => series.map((s, i) => ({ label: s.label, color: colors[i] ?? "" })), [series, colors]);
|
|
71
72
|
const domainMax = React.useMemo(() => {
|
|
72
73
|
const values = [];
|
|
73
74
|
for (const row of data) {
|
|
@@ -102,6 +103,7 @@ function RadarChart2({
|
|
|
102
103
|
height,
|
|
103
104
|
isEmpty: data.length === 0,
|
|
104
105
|
emptyMessage,
|
|
106
|
+
labels,
|
|
105
107
|
className,
|
|
106
108
|
table,
|
|
107
109
|
legendPlacement: legend === "none" ? void 0 : legend,
|
|
@@ -144,7 +146,7 @@ function RadarChart2({
|
|
|
144
146
|
Radar,
|
|
145
147
|
{
|
|
146
148
|
...NO_ANIMATION,
|
|
147
|
-
|
|
149
|
+
style: { color },
|
|
148
150
|
dataKey: key,
|
|
149
151
|
name: s.label,
|
|
150
152
|
stroke: "currentColor",
|
|
@@ -165,5 +167,5 @@ function RadarChart2({
|
|
|
165
167
|
}
|
|
166
168
|
|
|
167
169
|
export { RadarChart2 as RadarChart };
|
|
168
|
-
//# sourceMappingURL=chunk-
|
|
169
|
-
//# sourceMappingURL=chunk-
|
|
170
|
+
//# sourceMappingURL=chunk-GLKFFA7N.js.map
|
|
171
|
+
//# sourceMappingURL=chunk-GLKFFA7N.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useControlScrollFade } from './chunk-7EUAMHMU.js';
|
|
2
2
|
import { useIsomorphicLayoutEffect } from './chunk-EDSK6FEH.js';
|
|
3
|
-
import { CONTROL_TEXT, CONTROL_RADIUS, useFieldValidity, FieldFrame } from './chunk-
|
|
4
|
-
import { warnNeedsName, warnPositiveInt, devWarn } from './chunk-QDYE5LVT.js';
|
|
3
|
+
import { CONTROL_TEXT, CONTROL_RADIUS, useFieldValidity, FieldFrame } from './chunk-5KSD4WKN.js';
|
|
5
4
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
5
|
+
import { warnNeedsName, warnPositiveInt, devWarn } from './chunk-QDYE5LVT.js';
|
|
6
6
|
import { Field } from '@base-ui/react/field';
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -169,5 +169,5 @@ function Textarea(props) {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
export { Textarea };
|
|
172
|
-
//# sourceMappingURL=chunk-
|
|
173
|
-
//# sourceMappingURL=chunk-
|
|
172
|
+
//# sourceMappingURL=chunk-GQRSABRN.js.map
|
|
173
|
+
//# sourceMappingURL=chunk-GQRSABRN.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ScrollView } from './chunk-
|
|
1
|
+
import { ScrollView } from './chunk-SKJC2KYD.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
@@ -13,5 +13,5 @@ function PopupScrollViewport({ axis = "vertical", max, className, children }) {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export { PopupScrollViewport };
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-GWYDOZGQ.js.map
|
|
17
|
+
//# sourceMappingURL=chunk-GWYDOZGQ.js.map
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { Progress } from './chunk-
|
|
1
|
+
import { Progress } from './chunk-33TOK7ES.js';
|
|
2
2
|
import { Separator } from './chunk-7VLYQR4D.js';
|
|
3
3
|
import { FileTrigger } from './chunk-DJSXIAFH.js';
|
|
4
|
-
import { Button } from './chunk-
|
|
5
|
-
import { ButtonUtility } from './chunk-
|
|
6
|
-
import { SOLID } from './chunk-
|
|
7
|
-
import { useFieldValidity, FieldFrame } from './chunk-
|
|
4
|
+
import { Button } from './chunk-OACWA4TC.js';
|
|
5
|
+
import { ButtonUtility } from './chunk-AZ7DKRBY.js';
|
|
6
|
+
import { SOLID } from './chunk-MCQG4H6T.js';
|
|
7
|
+
import { useFieldValidity, FieldFrame } from './chunk-5KSD4WKN.js';
|
|
8
8
|
import { UploadCloudIcon, FileIcon, CircleXIcon, CircleCheckIcon, Trash2Icon, XIcon } from './chunk-BLIZ3CL3.js';
|
|
9
|
-
import { warnNonNegativeInt, devWarn, warnRange } from './chunk-QDYE5LVT.js';
|
|
10
9
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
10
|
+
import { useLabels } from './chunk-RJTVCA62.js';
|
|
11
|
+
import { warnNonNegativeInt, devWarn, warnRange } from './chunk-QDYE5LVT.js';
|
|
11
12
|
import { mergeProps } from '@base-ui/react/merge-props';
|
|
12
13
|
import { useRender } from '@base-ui/react/use-render';
|
|
13
14
|
import * as React from 'react';
|
|
@@ -213,6 +214,42 @@ async function readDropContents(dt, recursive, readEntry = readEntryFromItem) {
|
|
|
213
214
|
}
|
|
214
215
|
return { files, directories };
|
|
215
216
|
}
|
|
217
|
+
|
|
218
|
+
// src/components/dropzone/labels.ts
|
|
219
|
+
var DROPZONE_LABELS = {
|
|
220
|
+
/** The bright half of the prompt — a real `<button>`, which is why it is its own key. */
|
|
221
|
+
clickToUpload: "Click to upload",
|
|
222
|
+
/**
|
|
223
|
+
* The muted remainder of the same sentence.
|
|
224
|
+
*
|
|
225
|
+
* The two halves are ONE sentence split across an element boundary for styling, and the styled
|
|
226
|
+
* action always comes first. A language that cannot keep that order sets `clickToUpload` to the
|
|
227
|
+
* whole phrase and `dragAndDrop` to `""` (or the reverse) — deliberately a documented workaround
|
|
228
|
+
* rather than a third "whole sentence" key, because interpolating a styled NODE would mean a ctx
|
|
229
|
+
* carrying markup, which this layer does not do.
|
|
230
|
+
*/
|
|
231
|
+
dragAndDrop: "or drag and drop",
|
|
232
|
+
/** Appended to the zone's accessible name when the field is required. */
|
|
233
|
+
required: ", required"
|
|
234
|
+
};
|
|
235
|
+
var FILE_LIST_LABELS = {
|
|
236
|
+
/** The three status words, visible beside each row's glyph. */
|
|
237
|
+
statusUploading: "Uploading\u2026",
|
|
238
|
+
statusComplete: "Complete",
|
|
239
|
+
statusFailed: "Failed",
|
|
240
|
+
/** The row affordance's verb, which also composes into its accessible name. */
|
|
241
|
+
cancel: "Cancel",
|
|
242
|
+
remove: "Remove",
|
|
243
|
+
/** The retry link under a failed row. */
|
|
244
|
+
retry: "Try again",
|
|
245
|
+
/** The fallback failure line, when the upload reported no error of its own. */
|
|
246
|
+
uploadFailed: "Upload failed",
|
|
247
|
+
/** A bare "Remove" makes a five-row list announce five identical buttons, so the file's name is
|
|
248
|
+
* part of the name. */
|
|
249
|
+
actionForFile: (ctx) => `${ctx.verb} ${ctx.name}`,
|
|
250
|
+
/** The progress bar's name while a row uploads. */
|
|
251
|
+
uploading: (ctx) => `Uploading ${ctx.name}`
|
|
252
|
+
};
|
|
216
253
|
var SURFACE = "group flex w-full cursor-pointer flex-col items-center gap-3 rounded-xl bg-primary px-6 py-4 text-center ring-1 ring-secondary ring-inset transition duration-100 ease-linear outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2";
|
|
217
254
|
var SURFACE_IDLE = "hover:bg-secondary";
|
|
218
255
|
var SURFACE_DRAGGING = "bg-brand-primary ring-2 ring-brand";
|
|
@@ -239,11 +276,13 @@ function Dropzone(props) {
|
|
|
239
276
|
error,
|
|
240
277
|
disabled = false,
|
|
241
278
|
fullWidth = true,
|
|
279
|
+
labels,
|
|
242
280
|
className,
|
|
243
281
|
render,
|
|
244
282
|
_readEntry,
|
|
245
283
|
...rest
|
|
246
284
|
} = props;
|
|
285
|
+
const t = useLabels("dropzone", DROPZONE_LABELS, labels);
|
|
247
286
|
const { isInvalid, showError } = useFieldValidity(invalid, error);
|
|
248
287
|
const [dragging, setDragging] = React.useState(false);
|
|
249
288
|
const labelId = React.useId();
|
|
@@ -349,10 +388,11 @@ function Dropzone(props) {
|
|
|
349
388
|
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: cn(GLYPH_BOX, HERO_TILE, disabled && "opacity-50"), children: /* @__PURE__ */ jsx(UploadCloudIcon, { className: "size-5 text-fg-secondary" }) }),
|
|
350
389
|
/* @__PURE__ */ jsxs("span", { id: textId, className: cn("flex flex-col gap-1", disabled && "opacity-50"), children: [
|
|
351
390
|
/* @__PURE__ */ jsxs("span", { className: "text-sm text-tertiary", children: [
|
|
352
|
-
/* @__PURE__ */ jsx("span", { className: "font-semibold text-brand-secondary group-hover:underline", children:
|
|
353
|
-
"
|
|
391
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold text-brand-secondary group-hover:underline", children: t.clickToUpload }),
|
|
392
|
+
" ",
|
|
393
|
+
t.dragAndDrop
|
|
354
394
|
] }),
|
|
355
|
-
required ? /* @__PURE__ */ jsx("span", { className: "sr-only", children:
|
|
395
|
+
required ? /* @__PURE__ */ jsx("span", { className: "sr-only", children: t.required }) : null
|
|
356
396
|
] })
|
|
357
397
|
] })
|
|
358
398
|
},
|
|
@@ -388,17 +428,19 @@ var META_TEXT = "text-sm text-tertiary";
|
|
|
388
428
|
var SIZE_TEXT = `${META_TEXT} truncate whitespace-nowrap`;
|
|
389
429
|
var ERROR_TEXT = `${META_TEXT} break-words`;
|
|
390
430
|
var STATUS = {
|
|
391
|
-
uploading: {
|
|
392
|
-
complete: {
|
|
393
|
-
failed: {
|
|
431
|
+
uploading: { key: "statusUploading", glyph: UploadCloudIcon, glyphClass: "text-fg-quaternary", wordClass: "text-quaternary", action: "cancel" },
|
|
432
|
+
complete: { key: "statusComplete", glyph: CircleCheckIcon, glyphClass: "text-fg-success-primary", wordClass: "text-success-primary", action: "remove" },
|
|
433
|
+
failed: { key: "statusFailed", glyph: CircleXIcon, glyphClass: "text-fg-error-primary", wordClass: "text-error-primary", action: "remove" }
|
|
394
434
|
};
|
|
395
435
|
var ACTION = {
|
|
396
|
-
cancel: {
|
|
397
|
-
remove: {
|
|
436
|
+
cancel: { key: "cancel", glyph: XIcon },
|
|
437
|
+
remove: { key: "remove", glyph: Trash2Icon }
|
|
398
438
|
};
|
|
399
|
-
function Row({ file, treatment, onRemove, onCancel, onRetry, fileIcon }) {
|
|
439
|
+
function Row({ file, treatment, onRemove, onCancel, onRetry, fileIcon, t }) {
|
|
400
440
|
const status = STATUS[file.status];
|
|
401
441
|
const action = ACTION[status.action];
|
|
442
|
+
const statusWord = t[status.key];
|
|
443
|
+
const actionVerb = t[action.key];
|
|
402
444
|
const StatusGlyph = status.glyph;
|
|
403
445
|
const ActionGlyph = action.glyph;
|
|
404
446
|
const handler = status.action === "cancel" ? onCancel : onRemove;
|
|
@@ -412,24 +454,24 @@ function Row({ file, treatment, onRemove, onCancel, onRetry, fileIcon }) {
|
|
|
412
454
|
variant: "tertiary",
|
|
413
455
|
size: "xs",
|
|
414
456
|
icon: /* @__PURE__ */ jsx(ActionGlyph, {}),
|
|
415
|
-
tooltip:
|
|
416
|
-
"aria-label":
|
|
457
|
+
tooltip: actionVerb,
|
|
458
|
+
"aria-label": t.actionForFile({ verb: actionVerb, name: file.name }),
|
|
417
459
|
className: "-mt-2 -mr-2 self-start",
|
|
418
460
|
onClick: () => handler(file)
|
|
419
461
|
}
|
|
420
462
|
) : null;
|
|
421
|
-
const retry = failed && onRetry ? /* @__PURE__ */ jsx(Button, { variant: "link", color: "error", size: "sm", className: "mt-1.5", onClick: () => onRetry(file), children:
|
|
463
|
+
const retry = failed && onRetry ? /* @__PURE__ */ jsx(Button, { variant: "link", color: "error", size: "sm", className: "mt-1.5", onClick: () => onRetry(file), children: t.retry }) : null;
|
|
422
464
|
const glyph = fileIcon ? fileIcon(file) : /* @__PURE__ */ jsx(FileTypeGlyph, { extension: fileExtension(fileGlyphSource(file)) });
|
|
423
465
|
const meta = /* @__PURE__ */ jsxs("div", { className: META_ROW, children: [
|
|
424
|
-
/* @__PURE__ */ jsx("p", { className: failed ? ERROR_TEXT : SIZE_TEXT, children: failed ? file.error ??
|
|
466
|
+
/* @__PURE__ */ jsx("p", { className: failed ? ERROR_TEXT : SIZE_TEXT, children: failed ? file.error ?? t.uploadFailed : formatFileSize(file.size) }),
|
|
425
467
|
fill && failed ? null : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
426
468
|
/* @__PURE__ */ jsx(Separator, { orientation: "vertical", length: "sm", tone: "strong", decorative: true }),
|
|
427
469
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
428
470
|
/* @__PURE__ */ jsx(StatusGlyph, { "aria-hidden": "true", className: cn("size-4", status.glyphClass) }),
|
|
429
471
|
fill ? (
|
|
430
472
|
// No `<Progress>` in this treatment, so the readout is the wash's only number.
|
|
431
|
-
/* @__PURE__ */ jsx("p", { className: cn("text-sm tabular-nums", failed ? status.wordClass : "text-tertiary"), children: failed ?
|
|
432
|
-
) : /* @__PURE__ */ jsx("p", { className: cn("text-sm font-medium", status.wordClass), children:
|
|
473
|
+
/* @__PURE__ */ jsx("p", { className: cn("text-sm tabular-nums", failed ? status.wordClass : "text-tertiary"), children: failed ? statusWord : `${progress}%` })
|
|
474
|
+
) : /* @__PURE__ */ jsx("p", { className: cn("text-sm font-medium", status.wordClass), children: statusWord })
|
|
433
475
|
] })
|
|
434
476
|
] })
|
|
435
477
|
] });
|
|
@@ -441,7 +483,7 @@ function Row({ file, treatment, onRemove, onCancel, onRetry, fileIcon }) {
|
|
|
441
483
|
] }),
|
|
442
484
|
affordance
|
|
443
485
|
] }),
|
|
444
|
-
!fill && file.status === "uploading" ? /* @__PURE__ */ jsx("div", { className: "mt-1 w-full", children: /* @__PURE__ */ jsx(Progress, { value: progress, valuePosition: "right", "aria-label":
|
|
486
|
+
!fill && file.status === "uploading" ? /* @__PURE__ */ jsx("div", { className: "mt-1 w-full", children: /* @__PURE__ */ jsx(Progress, { value: progress, valuePosition: "right", "aria-label": t.uploading({ name: file.name }) }) }) : null,
|
|
445
487
|
retry
|
|
446
488
|
] });
|
|
447
489
|
if (!fill) {
|
|
@@ -458,7 +500,7 @@ function Row({ file, treatment, onRemove, onCancel, onRetry, fileIcon }) {
|
|
|
458
500
|
"aria-valuenow": progress,
|
|
459
501
|
"aria-valuemin": 0,
|
|
460
502
|
"aria-valuemax": 100,
|
|
461
|
-
"aria-label":
|
|
503
|
+
"aria-label": t.uploading({ name: file.name }),
|
|
462
504
|
style: { transform: `translateX(-${100 - progress}%)` },
|
|
463
505
|
className: cn(FILL_WASH, file.status === "complete" && "opacity-0")
|
|
464
506
|
}
|
|
@@ -469,14 +511,15 @@ function Row({ file, treatment, onRemove, onCancel, onRetry, fileIcon }) {
|
|
|
469
511
|
] });
|
|
470
512
|
}
|
|
471
513
|
function FileList(props) {
|
|
472
|
-
const { files, treatment = "bar", onRemove, onCancel, onRetry, fileIcon, className, ...rest } = props;
|
|
514
|
+
const { files, treatment = "bar", onRemove, onCancel, onRetry, fileIcon, labels, className, ...rest } = props;
|
|
515
|
+
const t = useLabels("fileList", FILE_LIST_LABELS, labels);
|
|
473
516
|
if (files.length === 0) return null;
|
|
474
517
|
return /* @__PURE__ */ jsx("ul", { ...rest, className: cn(LIST, className), children: files.map((file) => (
|
|
475
518
|
// Keyed on `id`, never the index — reordering must move a row, not remount it.
|
|
476
|
-
/* @__PURE__ */ jsx(Row, { file, treatment, onRemove, onCancel, onRetry, fileIcon }, file.id)
|
|
519
|
+
/* @__PURE__ */ jsx(Row, { file, treatment, onRemove, onCancel, onRetry, fileIcon, t }, file.id)
|
|
477
520
|
)) });
|
|
478
521
|
}
|
|
479
522
|
|
|
480
523
|
export { Dropzone, FILE_TONE, FILE_TONE_BUCKETS, FileList, FileTypeGlyph, GLYPH_BOX, bucketFiles, extensionTone, fileExtension, fileGlyphSource, fileTone, formatFileSize, invalidAcceptEntries, isFileTypeAccepted, toUploadFile };
|
|
481
|
-
//# sourceMappingURL=chunk-
|
|
482
|
-
//# sourceMappingURL=chunk-
|
|
524
|
+
//# sourceMappingURL=chunk-HHYEAFCL.js.map
|
|
525
|
+
//# sourceMappingURL=chunk-HHYEAFCL.js.map
|
|
@@ -1,21 +1,37 @@
|
|
|
1
1
|
import { useDebouncedCallback } from './chunk-F6NLE6XJ.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useTagRow } from './chunk-6HJA7NPL.js';
|
|
2
|
+
import { ListboxFooter, MultiValueCount } from './chunk-4RBIWI2Q.js';
|
|
3
|
+
import { useTagRow } from './chunk-IEAWNA3V.js';
|
|
5
4
|
import { tagSlotClass, tagContentClass, tagCloseClass, tagRootClass } from './chunk-4P2NBLBW.js';
|
|
6
|
-
import { ScrollView } from './chunk-
|
|
5
|
+
import { ScrollView } from './chunk-SKJC2KYD.js';
|
|
7
6
|
import { mapOptions, isOptionGroup, buildOptionMap } from './chunk-7JBNLEJ7.js';
|
|
8
|
-
import {
|
|
7
|
+
import { useControlScrollFade } from './chunk-7EUAMHMU.js';
|
|
8
|
+
import { FieldShell } from './chunk-X2VMIBK5.js';
|
|
9
|
+
import { useFieldValidity, FieldFrame, LISTBOX_PX_SM, CONTROL_ICON, SLOT_ICON } from './chunk-5KSD4WKN.js';
|
|
9
10
|
import { Slot } from './chunk-52IFGFTL.js';
|
|
10
|
-
import { useFieldValidity, FieldFrame, LISTBOX_PX_SM, CONTROL_ICON, SLOT_ICON } from './chunk-QKDEQFOQ.js';
|
|
11
11
|
import { POPUP_MOTION } from './chunk-O4GRKO3I.js';
|
|
12
12
|
import { PlusIcon, XIcon, ChevronDownIcon, LoaderCircleIcon, CheckIcon } from './chunk-BLIZ3CL3.js';
|
|
13
|
-
import { warnNonNegativeInt } from './chunk-QDYE5LVT.js';
|
|
14
13
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
14
|
+
import { useLabels, usePublishedLabels, LabelsContext } from './chunk-RJTVCA62.js';
|
|
15
|
+
import { warnNonNegativeInt } from './chunk-QDYE5LVT.js';
|
|
15
16
|
import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
|
|
16
17
|
import * as React from 'react';
|
|
17
|
-
import {
|
|
18
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
18
19
|
|
|
20
|
+
// src/components/combobox/labels.ts
|
|
21
|
+
var COMBOBOX_LABELS = {
|
|
22
|
+
/** The trigger that opens the list without typing. */
|
|
23
|
+
showOptions: "Show options",
|
|
24
|
+
/** The ✕ that empties the input. */
|
|
25
|
+
clear: "Clear",
|
|
26
|
+
/** A multi-value chip's remove button, named after the value it drops. */
|
|
27
|
+
removeValue: (ctx) => `Remove ${ctx.label}`,
|
|
28
|
+
/** The free-text creation row. */
|
|
29
|
+
create: (ctx) => `Create \u201C${ctx.query}\u201D`,
|
|
30
|
+
/** Defaults behind the `placeholder`, `emptyMessage` and loading props — each prop still wins. */
|
|
31
|
+
placeholder: "Search\u2026",
|
|
32
|
+
emptyMessage: "No results found.",
|
|
33
|
+
loading: "Loading\u2026"
|
|
34
|
+
};
|
|
19
35
|
var ComboboxContext = React.createContext({
|
|
20
36
|
size: "md",
|
|
21
37
|
multiple: false,
|
|
@@ -141,7 +157,7 @@ function ghostRemainder(optionMap, query) {
|
|
|
141
157
|
return completion;
|
|
142
158
|
}
|
|
143
159
|
function ComboboxInput({
|
|
144
|
-
placeholder
|
|
160
|
+
placeholder,
|
|
145
161
|
leading,
|
|
146
162
|
trailing,
|
|
147
163
|
leadingAddon,
|
|
@@ -156,13 +172,14 @@ function ComboboxInput({
|
|
|
156
172
|
className
|
|
157
173
|
}) {
|
|
158
174
|
const { size, multiple, labelId, optionMap, query, anchorRef } = useComboboxContext();
|
|
175
|
+
const t = useLabels("combobox", COMBOBOX_LABELS, void 0);
|
|
159
176
|
const chips = multiple && display === "tags";
|
|
160
177
|
const { ref: fadeRef, style: fadeStyle } = useControlScrollFade(scrollFade && !multiple);
|
|
161
178
|
const ghost = !multiple && optionMap.size > 0;
|
|
162
179
|
const remainder = ghost ? ghostRemainder(optionMap, query) : "";
|
|
163
180
|
const chipRow = useTagRow({ size, maxRows, count: selectedCount, hasPills: chips && selectedCount > 0, scrollbar: "none" });
|
|
164
181
|
const showCount = multiple && !chips && selectedCount > 0;
|
|
165
|
-
const inputPlaceholder = showCount ? void 0 : placeholder;
|
|
182
|
+
const inputPlaceholder = showCount ? void 0 : placeholder ?? t.placeholder;
|
|
166
183
|
return /* @__PURE__ */ jsxs(
|
|
167
184
|
FieldShell,
|
|
168
185
|
{
|
|
@@ -216,7 +233,7 @@ function ComboboxInput({
|
|
|
216
233
|
/* @__PURE__ */ jsx(
|
|
217
234
|
Combobox$1.ChipRemove,
|
|
218
235
|
{
|
|
219
|
-
"aria-label":
|
|
236
|
+
"aria-label": t.removeValue({ label: typeof chip.label === "string" ? chip.label : String(value) }),
|
|
220
237
|
className: tagCloseClass(CHIP_SIZE[size]),
|
|
221
238
|
children: /* @__PURE__ */ jsx(XIcon, {})
|
|
222
239
|
}
|
|
@@ -227,7 +244,7 @@ function ComboboxInput({
|
|
|
227
244
|
);
|
|
228
245
|
});
|
|
229
246
|
} }),
|
|
230
|
-
/* @__PURE__ */ jsx(Combobox$1.Input, { "aria-labelledby": labelId, placeholder, className: cn(INNER_INPUT, "min-w-[4rem]") })
|
|
247
|
+
/* @__PURE__ */ jsx(Combobox$1.Input, { "aria-labelledby": labelId, placeholder: placeholder ?? t.placeholder, className: cn(INNER_INPUT, "min-w-[4rem]") })
|
|
231
248
|
] }) : (
|
|
232
249
|
// ONE structure for the ghost-text and plain inputs — the input's position and element type
|
|
233
250
|
// are identical whether or not there is a ghost remainder.
|
|
@@ -272,15 +289,17 @@ function ComboboxInput({
|
|
|
272
289
|
}
|
|
273
290
|
var TRAILING_BTN = "inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md text-fg-quaternary outline-none transition-colors hover:text-fg-quaternary_hover focus-visible:text-fg-quaternary_hover data-[disabled]:cursor-not-allowed";
|
|
274
291
|
function ComboboxTrigger({ className }) {
|
|
292
|
+
const t = useLabels("combobox", COMBOBOX_LABELS, void 0);
|
|
275
293
|
const { size } = useComboboxContext();
|
|
276
|
-
return /* @__PURE__ */ jsx(Combobox$1.Trigger, { "aria-label":
|
|
294
|
+
return /* @__PURE__ */ jsx(Combobox$1.Trigger, { "aria-label": t.showOptions, className: cn(TRAILING_BTN, CONTROL_ICON[size], className), children: /* @__PURE__ */ jsx(Combobox$1.Icon, { className: "inline-flex transition-transform duration-200 group-data-[popup-open]:rotate-180", children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) }) });
|
|
277
295
|
}
|
|
278
296
|
function ComboboxClear({ className }) {
|
|
297
|
+
const t = useLabels("combobox", COMBOBOX_LABELS, void 0);
|
|
279
298
|
const { clearable, size } = useComboboxContext();
|
|
280
299
|
if (!clearable) {
|
|
281
300
|
return null;
|
|
282
301
|
}
|
|
283
|
-
return /* @__PURE__ */ jsx(Combobox$1.Clear, { "aria-label":
|
|
302
|
+
return /* @__PURE__ */ jsx(Combobox$1.Clear, { "aria-label": t.clear, className: cn(TRAILING_BTN, CONTROL_ICON[size], className), children: /* @__PURE__ */ jsx(XIcon, {}) });
|
|
284
303
|
}
|
|
285
304
|
var POPUP = cn("w-full rounded-lg bg-primary p-1 text-primary shadow-lg ring-1 ring-secondary_alt outline-none ring-inset", POPUP_MOTION);
|
|
286
305
|
var LIST_MAX_H = {
|
|
@@ -377,10 +396,11 @@ function ComboboxGroupLabel({ children, className }) {
|
|
|
377
396
|
function ComboboxEmpty({ children, className }) {
|
|
378
397
|
return /* @__PURE__ */ jsx(Combobox$1.Empty, { className: cn("px-3 py-6 text-center text-sm text-tertiary", className), children });
|
|
379
398
|
}
|
|
380
|
-
function ComboboxLoading({ children
|
|
399
|
+
function ComboboxLoading({ children, className }) {
|
|
400
|
+
const t = useLabels("combobox", COMBOBOX_LABELS, void 0);
|
|
381
401
|
return /* @__PURE__ */ jsxs(Combobox$1.Status, { className: cn("flex items-center justify-center gap-2 px-3 py-6 text-sm text-tertiary [&_svg]:size-4", className), children: [
|
|
382
402
|
/* @__PURE__ */ jsx(LoaderCircleIcon, { className: "animate-spin" }),
|
|
383
|
-
/* @__PURE__ */ jsx("span", { children })
|
|
403
|
+
/* @__PURE__ */ jsx("span", { children: children ?? t.loading })
|
|
384
404
|
] });
|
|
385
405
|
}
|
|
386
406
|
function optionLabelText(option) {
|
|
@@ -393,9 +413,6 @@ function asStringList(v) {
|
|
|
393
413
|
if (Array.isArray(v)) return v.filter((entry) => typeof entry === "string");
|
|
394
414
|
return typeof v === "string" ? [v] : [];
|
|
395
415
|
}
|
|
396
|
-
function defaultCreateLabel(query) {
|
|
397
|
-
return `Create \u201C${query}\u201D`;
|
|
398
|
-
}
|
|
399
416
|
function defaultContains(option, query) {
|
|
400
417
|
return optionLabelText(option).toLowerCase().includes(query.trim().toLowerCase());
|
|
401
418
|
}
|
|
@@ -425,7 +442,7 @@ function ComboboxFlat(props) {
|
|
|
425
442
|
filter,
|
|
426
443
|
loading = false,
|
|
427
444
|
loadingMessage,
|
|
428
|
-
emptyMessage
|
|
445
|
+
emptyMessage,
|
|
429
446
|
placeholder,
|
|
430
447
|
leading,
|
|
431
448
|
trailing,
|
|
@@ -440,15 +457,18 @@ function ComboboxFlat(props) {
|
|
|
440
457
|
meta,
|
|
441
458
|
creatable = false,
|
|
442
459
|
onCreate,
|
|
443
|
-
createLabel
|
|
460
|
+
createLabel,
|
|
444
461
|
validateCreate,
|
|
445
462
|
multiple,
|
|
446
463
|
autoHighlight,
|
|
447
464
|
onInputChange,
|
|
448
465
|
searchDebounce = 0,
|
|
449
466
|
onValueChange,
|
|
467
|
+
labels,
|
|
450
468
|
...rootProps
|
|
451
469
|
} = props;
|
|
470
|
+
const t = useLabels("combobox", COMBOBOX_LABELS, labels);
|
|
471
|
+
const publishedLabels = usePublishedLabels("combobox", labels);
|
|
452
472
|
const size = props.size ?? "md";
|
|
453
473
|
const [query, setQuery] = React.useState("");
|
|
454
474
|
const [selectedSingle, setSelectedSingle] = React.useState(() => asString(props.value ?? props.defaultValue));
|
|
@@ -490,7 +510,7 @@ function ComboboxFlat(props) {
|
|
|
490
510
|
const knownAlready = createQuery === "" || flattenOptions(options).some((o) => o.value.toLowerCase() === trimmed || optionLabelText(o).toLowerCase() === trimmed) || selectedValues.some((v) => v.toLowerCase() === trimmed);
|
|
491
511
|
const showCreate = creatable && !loading && !knownAlready && (validateCreate?.(createQuery) ?? true);
|
|
492
512
|
const isEmpty = !loading && !showCreate && flattenOptions(rows).length === 0;
|
|
493
|
-
return /* @__PURE__ */ jsxs(
|
|
513
|
+
return /* @__PURE__ */ jsx(LabelsContext.Provider, { value: publishedLabels, children: /* @__PURE__ */ jsxs(
|
|
494
514
|
ComboboxRoot,
|
|
495
515
|
{
|
|
496
516
|
options,
|
|
@@ -523,7 +543,7 @@ function ComboboxFlat(props) {
|
|
|
523
543
|
),
|
|
524
544
|
/* @__PURE__ */ jsxs(ComboboxContent, { footer: /* @__PURE__ */ jsx(ListboxFooter, { meta, actions, size }), children: [
|
|
525
545
|
loading ? /* @__PURE__ */ jsx(ComboboxLoading, { children: loadingMessage }) : null,
|
|
526
|
-
isEmpty ? /* @__PURE__ */ jsx(ComboboxEmpty, { children: emptyMessage }) : null,
|
|
546
|
+
isEmpty ? /* @__PURE__ */ jsx(ComboboxEmpty, { children: emptyMessage ?? t.emptyMessage }) : null,
|
|
527
547
|
loading ? null : mapOptions(rows, {
|
|
528
548
|
item: (opt) => /* @__PURE__ */ jsx(ComboboxItem, { value: opt.value, disabled: opt.disabled, children: opt.label ?? opt.value }, opt.value),
|
|
529
549
|
group: (label, groupChildren) => /* @__PURE__ */ jsxs(ComboboxGroup, { children: [
|
|
@@ -531,11 +551,11 @@ function ComboboxFlat(props) {
|
|
|
531
551
|
groupChildren
|
|
532
552
|
] }, label)
|
|
533
553
|
}),
|
|
534
|
-
showCreate ? /* @__PURE__ */ jsx(ComboboxItem, { value: createQuery, leading: /* @__PURE__ */ jsx(PlusIcon, {}), hideIndicator: true, children: createLabel(createQuery) }) : null
|
|
554
|
+
showCreate ? /* @__PURE__ */ jsx(ComboboxItem, { value: createQuery, leading: /* @__PURE__ */ jsx(PlusIcon, {}), hideIndicator: true, children: createLabel ? createLabel(createQuery) : t.create({ query: createQuery }) }) : null
|
|
535
555
|
] })
|
|
536
556
|
]
|
|
537
557
|
}
|
|
538
|
-
);
|
|
558
|
+
) });
|
|
539
559
|
}
|
|
540
560
|
ComboboxFlat.displayName = "Combobox";
|
|
541
561
|
ComboboxRoot.displayName = "ComboboxRoot";
|
|
@@ -551,5 +571,5 @@ ComboboxLoading.displayName = "ComboboxLoading";
|
|
|
551
571
|
var Combobox = ComboboxFlat;
|
|
552
572
|
|
|
553
573
|
export { Combobox };
|
|
554
|
-
//# sourceMappingURL=chunk-
|
|
555
|
-
//# sourceMappingURL=chunk-
|
|
574
|
+
//# sourceMappingURL=chunk-HV2W6HUR.js.map
|
|
575
|
+
//# sourceMappingURL=chunk-HV2W6HUR.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FieldShell } from './chunk-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { FieldShell } from './chunk-X2VMIBK5.js';
|
|
2
|
+
import { useFieldValidity, FieldFrame } from './chunk-5KSD4WKN.js';
|
|
3
|
+
import { useSeamlessSlot, warnSeamlessFieldChrome, SEAMLESS_BOX } from './chunk-7ZM7SNCZ.js';
|
|
4
4
|
import { ChevronDownIcon } from './chunk-BLIZ3CL3.js';
|
|
5
5
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
6
6
|
import { Field } from '@base-ui/react/field';
|
|
@@ -134,5 +134,5 @@ function NativeSelect(props) {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
export { NativeSelect };
|
|
137
|
-
//# sourceMappingURL=chunk-
|
|
138
|
-
//# sourceMappingURL=chunk-
|
|
137
|
+
//# sourceMappingURL=chunk-I6WMNXC7.js.map
|
|
138
|
+
//# sourceMappingURL=chunk-I6WMNXC7.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useScrollFade } from './chunk-O2LG3PNI.js';
|
|
2
2
|
import { useIsomorphicLayoutEffect } from './chunk-EDSK6FEH.js';
|
|
3
|
-
import { warnPositiveInt } from './chunk-QDYE5LVT.js';
|
|
4
3
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
4
|
+
import { warnPositiveInt } from './chunk-QDYE5LVT.js';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
|
|
7
7
|
function tagShellPy(size, hasPills) {
|
|
@@ -63,7 +63,12 @@ function useTagRow(opts) {
|
|
|
63
63
|
// `overflow-x-auto`. The two scrollbar utilities are mutually exclusive here (tailwind-merge
|
|
64
64
|
// can't know they conflict — they are ours).
|
|
65
65
|
"overflow-x-auto overscroll-x-contain",
|
|
66
|
-
|
|
66
|
+
// `overscroll-y-contain` only while the cap is ACTUALLY overflowing. `contain` on an axis with
|
|
67
|
+
// nothing to scroll swallows the wheel rather than chaining it, so a capped row that happens to
|
|
68
|
+
// fit froze the page under the pointer — the same fault `src/lib/scroll-area.tsx` documents. The
|
|
69
|
+
// X axis above stays ungated: sideways overflow is possible in every mode here, and a 40px
|
|
70
|
+
// control strip has no vertical page scroll to hand back.
|
|
71
|
+
capped ? cn(scrollbar === "thin" ? "scrollbar-thin" : "scrollbar-none", "overflow-y-auto", scrollable && "overscroll-y-contain") : "scrollbar-none",
|
|
67
72
|
// Once the cap engages, pack the rows to the top instead of centring the clipped block.
|
|
68
73
|
capped && scrollable && "items-start"
|
|
69
74
|
);
|
|
@@ -71,5 +76,5 @@ function useTagRow(opts) {
|
|
|
71
76
|
}
|
|
72
77
|
|
|
73
78
|
export { useTagRow };
|
|
74
|
-
//# sourceMappingURL=chunk-
|
|
75
|
-
//# sourceMappingURL=chunk-
|
|
79
|
+
//# sourceMappingURL=chunk-IEAWNA3V.js.map
|
|
80
|
+
//# sourceMappingURL=chunk-IEAWNA3V.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RULE_TONE, RULE_PAINT, RULE_TEXTURE } from './chunk-LCG34A5T.js';
|
|
2
|
-
import { SOLID, SOLID_BOX, SOLID_GLOSS, BOXED_BOX, BOX_RING } from './chunk-
|
|
2
|
+
import { SOLID, SOLID_BOX, SOLID_GLOSS, BOXED_BOX, BOX_RING } from './chunk-MCQG4H6T.js';
|
|
3
3
|
import { overflowClasses } from './chunk-DWKILXHE.js';
|
|
4
4
|
import { CheckIcon, XIcon, MinusIcon } from './chunk-BLIZ3CL3.js';
|
|
5
5
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
@@ -601,5 +601,5 @@ function useSteps(options) {
|
|
|
601
601
|
}
|
|
602
602
|
|
|
603
603
|
export { ProgressSteps, StepPanel, buildStepMap, firstEnabledStep, resolveStepStatus, useSteps };
|
|
604
|
-
//# sourceMappingURL=chunk-
|
|
605
|
-
//# sourceMappingURL=chunk-
|
|
604
|
+
//# sourceMappingURL=chunk-IQNVSQRK.js.map
|
|
605
|
+
//# sourceMappingURL=chunk-IQNVSQRK.js.map
|