jenosize-ui 0.1.0 → 0.2.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 +13 -10
- package/dist/Cartesian-ZIKPEYWP.d.ts +26 -0
- 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 +54 -0
- package/dist/area-chart.js +9 -0
- package/dist/avatar.d.ts +24 -0
- package/dist/avatar.js +13 -7
- package/dist/badge.d.ts +4 -0
- package/dist/badge.js +6 -5
- package/dist/bar-chart.d.ts +32 -0
- package/dist/bar-chart.js +9 -0
- package/dist/breadcrumb.d.ts +4 -0
- package/dist/breadcrumb.js +5 -3
- package/dist/button.d.ts +16 -1
- package/dist/button.js +10 -8
- package/dist/calendar.d.ts +5 -0
- package/dist/calendar.js +18 -14
- package/dist/callout.d.ts +6 -6
- package/dist/callout.js +12 -9
- package/dist/card-D56VxyAe.d.ts +123 -0
- package/dist/card.d.ts +3 -1
- package/dist/card.js +7 -3
- package/dist/checkbox.js +9 -7
- package/dist/chunk-22M75A3N.js +396 -0
- package/dist/{chunk-D5BTFSL7.js → chunk-33TOK7ES.js} +7 -5
- package/dist/{chunk-THC2ISYP.js → chunk-3H444OJA.js} +6 -4
- package/dist/{chunk-GFOAJVW5.js → chunk-3QXLIZIX.js} +4 -13
- package/dist/chunk-3ZEEGXYF.js +8 -0
- package/dist/chunk-45Y2ZGNK.js +34 -0
- package/dist/{chunk-FHHAPGCR.js → chunk-4RBIWI2Q.js} +3 -3
- package/dist/chunk-4VGEJG4M.js +1510 -0
- package/dist/{chunk-PWKWNDBS.js → chunk-54SIZR63.js} +16 -8
- package/dist/chunk-5AZKP4KZ.js +49 -0
- package/dist/chunk-5DP7W5HX.js +254 -0
- package/dist/{chunk-J2BCKBHC.js → chunk-5KSD4WKN.js} +14 -5
- package/dist/{chunk-ZOOX3TUB.js → chunk-5XPMY2LF.js} +6 -6
- package/dist/chunk-5ZEUTSCV.js +147 -0
- package/dist/chunk-5ZPUAGOP.js +19 -0
- package/dist/{chunk-JTNFJLIY.js → chunk-667ZHY3T.js} +114 -42
- package/dist/{chunk-JP26LPCY.js → chunk-6B6BWTXC.js} +30 -13
- package/dist/{chunk-W5GGOUUI.js → chunk-6H4LNWQ7.js} +3 -3
- package/dist/{chunk-WFY7DKQD.js → chunk-6MMBQVRO.js} +61 -51
- package/dist/{chunk-7HOIZ3UO.js → chunk-7GUPNTAH.js} +15 -7
- package/dist/chunk-7VLYQR4D.js +44 -0
- package/dist/{chunk-KNYKWUYX.js → chunk-7ZM7SNCZ.js} +3 -3
- package/dist/{chunk-E7ZSWBAK.js → chunk-A323V6AI.js} +6 -4
- package/dist/chunk-AFYXSZGW.js +23 -0
- package/dist/chunk-AIARANKE.js +33 -0
- package/dist/{chunk-4OLULPQG.js → chunk-AIGYMTCU.js} +10 -6
- package/dist/{chunk-JVJRHBTD.js → chunk-AZ7DKRBY.js} +21 -8
- package/dist/{chunk-JYGR44ZC.js → chunk-BBKE4W3B.js} +19 -11
- package/dist/{chunk-Z3ETJN5G.js → chunk-BFVJHH7S.js} +8 -12
- package/dist/chunk-BLIZ3CL3.js +49 -0
- package/dist/{chunk-F2K7VJUV.js → chunk-CFFWYXDW.js} +19 -7
- package/dist/{chunk-MQGD2OUF.js → chunk-CGHYXWTT.js} +11 -5
- package/dist/{chunk-CYPPEUX5.js → chunk-CKMWBVRR.js} +27 -12
- package/dist/{chunk-GTHJWR3Q.js → chunk-D7EE5GWU.js} +21 -22
- package/dist/{chunk-5NOBSXJN.js → chunk-E2YZ7IMT.js} +24 -8
- package/dist/{chunk-T7FCG7XV.js → chunk-FFMTYQXE.js} +31 -11
- package/dist/{chunk-J36M3KRX.js → chunk-FH7Z7SGQ.js} +67 -32
- package/dist/chunk-FKVPAEJ6.js +57 -0
- package/dist/{chunk-GRLSUQQE.js → chunk-FNQJJO63.js} +4 -4
- package/dist/{chunk-5RAPA22E.js → chunk-FWRHBMWT.js} +4 -4
- package/dist/chunk-GLKFFA7N.js +171 -0
- package/dist/{chunk-KDLPXXD2.js → chunk-GQRSABRN.js} +4 -4
- package/dist/{chunk-DRZCJCBO.js → chunk-GZMDZF2V.js} +8 -7
- package/dist/chunk-HHYEAFCL.js +525 -0
- package/dist/{chunk-LME57Z6J.js → chunk-I6WMNXC7.js} +6 -6
- package/dist/chunk-IQNVSQRK.js +605 -0
- package/dist/chunk-KHGW72BM.js +10 -0
- package/dist/{chunk-ZZA2LUTL.js → chunk-KZP6B6B3.js} +41 -16
- package/dist/chunk-LCG34A5T.js +98 -0
- package/dist/chunk-LLPWQDF7.js +26 -0
- package/dist/{chunk-J7ZQQFPT.js → chunk-LO22VQL5.js} +18 -18
- package/dist/{chunk-BVJWBYIG.js → chunk-LQURV7HQ.js} +9 -7
- package/dist/{chunk-R6RGJF4L.js → chunk-LYXPJERB.js} +15 -5
- package/dist/{chunk-CME4DIML.js → chunk-MCQG4H6T.js} +54 -3
- package/dist/{chunk-VWC72TR3.js → chunk-MVG5MABV.js} +11 -8
- package/dist/{chunk-5FATN5YD.js → chunk-N3RVMBPX.js} +6 -9
- package/dist/chunk-NKG4N6HA.js +188 -0
- package/dist/{chunk-W46K56XU.js → chunk-OACWA4TC.js} +15 -69
- package/dist/chunk-OLLD2BZN.js +33 -0
- package/dist/{chunk-KMSYEE23.js → chunk-P6CON2R2.js} +25 -11
- package/dist/chunk-PO2TYK3C.js +17 -0
- package/dist/{chunk-7EWQKTNQ.js → chunk-POQTE7JI.js} +66 -25
- package/dist/{chunk-HMUZE6EK.js → chunk-QDKETK7D.js} +4 -4
- package/dist/{chunk-GCVA3OIV.js → chunk-QDYE5LVT.js} +13 -3
- package/dist/{chunk-WEUJYDCV.js → chunk-QHH6AUR3.js} +16 -8
- package/dist/chunk-RJTVCA62.js +42 -0
- package/dist/{chunk-MUFHLP4S.js → chunk-S5TEWPWW.js} +50 -41
- package/dist/{chunk-D6TPWNRK.js → chunk-SB3DG572.js} +15 -8
- package/dist/chunk-SKRR3ZMP.js +10 -0
- package/dist/chunk-T4ZFZTY6.js +62 -0
- package/dist/{chunk-I7WU4GTY.js → chunk-T5574MXM.js} +34 -46
- package/dist/{chunk-MKC5HNA7.js → chunk-U4WSJAYK.js} +374 -147
- package/dist/{chunk-BJUZVYQC.js → chunk-UGKELBNC.js} +60 -44
- package/dist/chunk-ULGCGKOE.js +77 -0
- package/dist/{chunk-QA74ITR4.js → chunk-X2VMIBK5.js} +45 -17
- package/dist/chunk-X2X7Q7NW.js +17 -0
- package/dist/chunk-YHBI52P2.js +10 -0
- package/dist/chunk-YIHKQ63K.js +13 -0
- package/dist/{chunk-3Y5X7B5C.js → chunk-YQYVGWIC.js} +6 -11
- package/dist/{chunk-WZQFC7ZN.js → chunk-ZHAT2XZ4.js} +139 -66
- package/dist/{chunk-7IU5TMFL.js → chunk-ZMFY7WAY.js} +124 -40
- package/dist/{chunk-SV56BSUQ.js → chunk-ZZSNTCCL.js} +6 -5
- package/dist/combobox.d.ts +5 -0
- package/dist/combobox.js +15 -12
- package/dist/control-size-CaxQhkKh.d.ts +3 -0
- package/dist/date-input.d.ts +4 -0
- package/dist/date-input.js +12 -9
- package/dist/date-picker.d.ts +6 -0
- package/dist/date-picker.js +25 -20
- package/dist/dialog.d.ts +37 -5
- package/dist/dialog.js +12 -8
- package/dist/drawer.d.ts +20 -3
- package/dist/drawer.js +11 -7
- package/dist/dropdown-menu.d.ts +26 -2
- package/dist/dropdown-menu.js +9 -4
- package/dist/dropzone.d.ts +35 -0
- package/dist/dropzone.js +23 -0
- package/dist/form.d.ts +82 -3
- package/dist/form.js +205 -45
- package/dist/header-navigation.d.ts +19 -4
- package/dist/header-navigation.js +23 -16
- package/dist/helper.d.ts +36 -0
- package/dist/helper.js +3 -0
- package/dist/index.d.ts +32 -8
- package/dist/index.js +87 -62
- package/dist/indicator.js +4 -4
- package/dist/input.d.ts +4 -0
- package/dist/input.js +10 -8
- package/dist/kanban-board.d.ts +489 -0
- package/dist/kanban-board.js +25 -0
- package/dist/labels-DPrh0se9.d.ts +627 -0
- package/dist/line-chart.d.ts +36 -0
- package/dist/line-chart.js +9 -0
- package/dist/{nav-Bla0o_-1.d.ts → nav-CKKqjBs6.d.ts} +18 -11
- package/dist/number-input.d.ts +4 -0
- package/dist/number-input.js +10 -8
- package/dist/pagination.d.ts +7 -1
- package/dist/pagination.js +14 -10
- package/dist/panel-El4oI68p.d.ts +9 -0
- package/dist/payment-input.d.ts +3 -2
- package/dist/payment-input.js +10 -8
- package/dist/pie-chart.d.ts +64 -0
- package/dist/pie-chart.js +9 -0
- package/dist/popover.d.ts +9 -3
- package/dist/popover.js +11 -7
- package/dist/progress-steps.d.ts +275 -0
- package/dist/progress-steps.js +8 -0
- 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 +77 -0
- package/dist/radar-chart.js +9 -0
- package/dist/radial-chart.d.ts +73 -0
- package/dist/radial-chart.js +9 -0
- package/dist/radio.js +9 -7
- package/dist/rule-BqzaIwJy.d.ts +80 -0
- package/dist/scroll-area.d.ts +62 -0
- package/dist/scroll-area.js +7 -0
- package/dist/select.d.ts +3 -3
- package/dist/select.js +17 -14
- package/dist/separator.d.ts +114 -0
- package/dist/separator.js +5 -0
- package/dist/shared-CxAedkiy.d.ts +68 -0
- package/dist/sidebar-navigation.d.ts +80 -12
- package/dist/sidebar-navigation.js +18 -9
- package/dist/skeleton.d.ts +61 -0
- package/dist/skeleton.js +5 -0
- package/dist/styles.css +1 -1
- package/dist/switch.js +4 -4
- package/dist/table.d.ts +148 -42
- package/dist/table.js +39 -33
- 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 +13 -11
- package/dist/tag.d.ts +4 -0
- package/dist/tag.js +4 -3
- package/dist/textarea.js +7 -5
- package/dist/theme.css +151 -6
- package/dist/theme.js +11 -9
- package/dist/toast.d.ts +11 -2
- package/dist/toast.js +12 -9
- package/dist/tooltip-surface-C2I9o2QM.d.ts +35 -0
- package/dist/tooltip.d.ts +15 -1
- package/dist/tooltip.js +3 -2
- package/dist/tree.d.ts +5 -0
- package/dist/tree.js +8 -6
- package/dist/types-DR9rAEy1.d.ts +188 -0
- package/dist/use-uploads-KaPqDklo.d.ts +482 -0
- package/dist/verification-code-input.d.ts +84 -0
- package/dist/verification-code-input.js +14 -0
- package/package.json +70 -9
- package/dist/card-nWicloNi.d.ts +0 -80
- package/dist/chunk-24TO7E32.js +0 -42
- package/dist/chunk-FXIBGTS5.js +0 -14
- package/dist/chunk-MFJP5FA7.js +0 -20
- package/dist/chunk-ZZT2E5VT.js +0 -24
- package/dist/shared-BNXAdgh2.d.ts +0 -9
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { useControlScrollFade } from './chunk-7EUAMHMU.js';
|
|
2
|
-
import { FieldShell } from './chunk-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { EyeOffIcon, EyeIcon } from './chunk-
|
|
2
|
+
import { FieldShell } from './chunk-X2VMIBK5.js';
|
|
3
|
+
import { useFieldValidity, FieldFrame } from './chunk-5KSD4WKN.js';
|
|
4
|
+
import { useSeamlessSlot } from './chunk-7ZM7SNCZ.js';
|
|
5
|
+
import { EyeOffIcon, EyeIcon } from './chunk-BLIZ3CL3.js';
|
|
6
6
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
7
|
+
import { useLabels } from './chunk-RJTVCA62.js';
|
|
7
8
|
import { Field } from '@base-ui/react/field';
|
|
8
9
|
import * as React from 'react';
|
|
9
10
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
10
11
|
|
|
12
|
+
// src/components/input/labels.ts
|
|
13
|
+
var INPUT_LABELS = {
|
|
14
|
+
showPassword: "Show password",
|
|
15
|
+
hidePassword: "Hide password"
|
|
16
|
+
};
|
|
11
17
|
function InputAddon({ size: sizeProp, children, className }) {
|
|
12
18
|
const slot = useSeamlessSlot();
|
|
13
19
|
const size = sizeProp ?? slot?.size ?? "md";
|
|
@@ -35,8 +41,10 @@ function Input(props) {
|
|
|
35
41
|
name,
|
|
36
42
|
id,
|
|
37
43
|
className,
|
|
44
|
+
labels,
|
|
38
45
|
...rest
|
|
39
46
|
} = props;
|
|
47
|
+
const t = useLabels("input", INPUT_LABELS, labels);
|
|
40
48
|
const [revealed, setRevealed] = React.useState(false);
|
|
41
49
|
const isPassword = type === "password";
|
|
42
50
|
const controlType = isPassword ? revealed ? "text" : "password" : type;
|
|
@@ -75,7 +83,7 @@ function Input(props) {
|
|
|
75
83
|
type: "button",
|
|
76
84
|
disabled,
|
|
77
85
|
onClick: () => setRevealed((v) => !v),
|
|
78
|
-
"aria-label": revealed ?
|
|
86
|
+
"aria-label": revealed ? t.hidePassword : t.showPassword,
|
|
79
87
|
className: cn(
|
|
80
88
|
"inline-flex shrink-0 cursor-pointer text-fg-quaternary transition duration-100 ease-linear outline-none disabled:cursor-not-allowed",
|
|
81
89
|
"hover:text-fg-quaternary_hover focus-visible:text-fg-quaternary_hover",
|
|
@@ -106,5 +114,5 @@ function Input(props) {
|
|
|
106
114
|
}
|
|
107
115
|
|
|
108
116
|
export { Input, InputAddon };
|
|
109
|
-
//# sourceMappingURL=chunk-
|
|
110
|
-
//# sourceMappingURL=chunk-
|
|
117
|
+
//# sourceMappingURL=chunk-7GUPNTAH.js.map
|
|
118
|
+
//# sourceMappingURL=chunk-7GUPNTAH.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ruleBox, rulePaint } from './chunk-LCG34A5T.js';
|
|
2
|
+
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
3
|
+
import { Separator as Separator$1 } from '@base-ui/react/separator';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var VERTICAL_LENGTH = {
|
|
7
|
+
sm: "h-3",
|
|
8
|
+
md: "h-5",
|
|
9
|
+
full: "self-stretch"
|
|
10
|
+
};
|
|
11
|
+
var BASE = "shrink-0 border-none";
|
|
12
|
+
function Separator(props) {
|
|
13
|
+
const {
|
|
14
|
+
orientation = "horizontal",
|
|
15
|
+
texture = "line",
|
|
16
|
+
tone = "default",
|
|
17
|
+
length = "md",
|
|
18
|
+
weight = "hairline",
|
|
19
|
+
decorative = false,
|
|
20
|
+
className,
|
|
21
|
+
render
|
|
22
|
+
} = props;
|
|
23
|
+
const axis = orientation === "horizontal" ? "y" : "x";
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
Separator$1,
|
|
26
|
+
{
|
|
27
|
+
orientation,
|
|
28
|
+
render,
|
|
29
|
+
"aria-hidden": decorative || void 0,
|
|
30
|
+
className: cn(
|
|
31
|
+
BASE,
|
|
32
|
+
orientation === "horizontal" ? "w-full" : VERTICAL_LENGTH[length],
|
|
33
|
+
ruleBox(texture, axis, weight),
|
|
34
|
+
rulePaint({ texture, axis, tone, weight }),
|
|
35
|
+
className
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
Separator.displayName = "Separator";
|
|
41
|
+
|
|
42
|
+
export { Separator };
|
|
43
|
+
//# sourceMappingURL=chunk-7VLYQR4D.js.map
|
|
44
|
+
//# sourceMappingURL=chunk-7VLYQR4D.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { devWarn } from './chunk-GCVA3OIV.js';
|
|
2
1
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
2
|
+
import { devWarn } from './chunk-QDYE5LVT.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-7ZM7SNCZ.js.map
|
|
52
|
+
//# sourceMappingURL=chunk-7ZM7SNCZ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useControllableOpen, DialogSurface } from './chunk-
|
|
1
|
+
import { useControllableOpen, DialogSurface } from './chunk-CKMWBVRR.js';
|
|
2
2
|
import { EXPLICIT_CLOSE } from './chunk-S7NNXWIN.js';
|
|
3
3
|
import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
|
|
4
4
|
import * as React from 'react';
|
|
@@ -11,8 +11,9 @@ function Dialog(props) {
|
|
|
11
11
|
defaultOpen = false,
|
|
12
12
|
onOpenChange,
|
|
13
13
|
size = "md",
|
|
14
|
+
backdrop = "scrim",
|
|
14
15
|
showClose = true,
|
|
15
|
-
dividers =
|
|
16
|
+
dividers = "line",
|
|
16
17
|
keepMounted = false,
|
|
17
18
|
dismissible = true,
|
|
18
19
|
title,
|
|
@@ -45,6 +46,7 @@ function Dialog(props) {
|
|
|
45
46
|
DialogSurface,
|
|
46
47
|
{
|
|
47
48
|
size,
|
|
49
|
+
backdrop,
|
|
48
50
|
showClose,
|
|
49
51
|
dividers,
|
|
50
52
|
keepMounted,
|
|
@@ -66,5 +68,5 @@ function Dialog(props) {
|
|
|
66
68
|
Dialog.displayName = "Dialog";
|
|
67
69
|
|
|
68
70
|
export { Dialog };
|
|
69
|
-
//# sourceMappingURL=chunk-
|
|
70
|
-
//# sourceMappingURL=chunk-
|
|
71
|
+
//# sourceMappingURL=chunk-A323V6AI.js.map
|
|
72
|
+
//# sourceMappingURL=chunk-A323V6AI.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/lib/tooltip-surface.ts
|
|
2
|
+
var TOOLTIP_SWATCH = "block size-1.5 shrink-0 rounded-full bg-current";
|
|
3
|
+
var TOOLTIP_BOX = "rounded-lg shadow-lg";
|
|
4
|
+
var TOOLTIP_TONE = {
|
|
5
|
+
surface: {
|
|
6
|
+
surface: `${TOOLTIP_BOX} bg-primary_alt ring-1 ring-inset ring-secondary_alt`,
|
|
7
|
+
title: "text-xs font-semibold text-primary",
|
|
8
|
+
supporting: "text-xs font-medium text-tertiary",
|
|
9
|
+
arrowFill: "var(--color-bg-primary_alt)",
|
|
10
|
+
arrowStroke: "var(--color-border-secondary_alt)"
|
|
11
|
+
},
|
|
12
|
+
inverse: {
|
|
13
|
+
surface: `${TOOLTIP_BOX} bg-primary-solid`,
|
|
14
|
+
title: "text-xs font-semibold text-fg-white",
|
|
15
|
+
supporting: "text-xs font-medium text-tooltip-supporting-text",
|
|
16
|
+
arrowFill: "var(--color-bg-primary-solid)",
|
|
17
|
+
arrowStroke: null
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { TOOLTIP_SWATCH, TOOLTIP_TONE };
|
|
22
|
+
//# sourceMappingURL=chunk-AFYXSZGW.js.map
|
|
23
|
+
//# sourceMappingURL=chunk-AFYXSZGW.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { LinkContext } from './chunk-5AZKP4KZ.js';
|
|
2
|
+
import { LocaleContext } from './chunk-YIHKQ63K.js';
|
|
3
|
+
import { LabelsContext, mergeLabels } from './chunk-RJTVCA62.js';
|
|
4
|
+
import { devWarn } from './chunk-QDYE5LVT.js';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function JenosizeUIProvider(props) {
|
|
9
|
+
const { link, labels, locale, timeZone, era, weekStartsOn, children } = props;
|
|
10
|
+
const outer = React.useContext(LabelsContext);
|
|
11
|
+
const mergedLabels = React.useMemo(() => mergeLabels(outer, labels), [outer, labels]);
|
|
12
|
+
const outerLocale = React.useContext(LocaleContext);
|
|
13
|
+
const localeConfig = React.useMemo(() => {
|
|
14
|
+
const own = { locale, timeZone, era, weekStartsOn };
|
|
15
|
+
const declared = Object.fromEntries(Object.entries(own).filter(([, v]) => v !== void 0));
|
|
16
|
+
if (Object.keys(declared).length === 0) return outerLocale;
|
|
17
|
+
return { ...outerLocale, ...declared };
|
|
18
|
+
}, [outerLocale, locale, timeZone, era, weekStartsOn]);
|
|
19
|
+
const outerLink = React.useContext(LinkContext);
|
|
20
|
+
const previousLink = React.useRef(link);
|
|
21
|
+
if (link != null && previousLink.current != null && link !== previousLink.current) {
|
|
22
|
+
devWarn(
|
|
23
|
+
"`JenosizeUIProvider link` changed identity between renders, which REMOUNTS every link in the app (losing keyboard focus and router prefetch state). Hoist the wrapper to module scope \u2014 `const AppLink = ({ href, ...rest }) => <Link to={href} {...rest} />` \u2014 or wrap it in `useCallback`."
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
previousLink.current = link;
|
|
27
|
+
return /* @__PURE__ */ jsx(LinkContext.Provider, { value: link ?? outerLink, children: /* @__PURE__ */ jsx(LabelsContext.Provider, { value: mergedLabels, children: /* @__PURE__ */ jsx(LocaleContext.Provider, { value: localeConfig, children }) }) });
|
|
28
|
+
}
|
|
29
|
+
JenosizeUIProvider.displayName = "JenosizeUIProvider";
|
|
30
|
+
|
|
31
|
+
export { JenosizeUIProvider };
|
|
32
|
+
//# sourceMappingURL=chunk-AIARANKE.js.map
|
|
33
|
+
//# sourceMappingURL=chunk-AIARANKE.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Slot } from './chunk-52IFGFTL.js';
|
|
2
1
|
import { useScrollFade } from './chunk-O2LG3PNI.js';
|
|
3
2
|
import { useIsomorphicLayoutEffect } from './chunk-EDSK6FEH.js';
|
|
4
|
-
import {
|
|
3
|
+
import { Slot } from './chunk-52IFGFTL.js';
|
|
5
4
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
5
|
+
import { warnStickyNoScrollport, nearestScrollport, warnNeedsName } from './chunk-QDYE5LVT.js';
|
|
6
6
|
import { Tabs as Tabs$1 } from '@base-ui/react/tabs';
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -35,7 +35,6 @@ var LIST_INNER = {
|
|
|
35
35
|
vertical: "relative flex min-h-0 flex-col gap-1"
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
var NO_SCROLLBAR = "[scrollbar-width:none] [&::-webkit-scrollbar]:hidden";
|
|
39
38
|
var STICKY_WRAP = {
|
|
40
39
|
horizontal: "sticky top-[var(--tabs-sticky-top,0px)] z-4 flex flex-col bg-[var(--tabs-sticky-bg,var(--color-bg-primary))]",
|
|
41
40
|
// No fill: a vertical rail sits BESIDE the panel, so nothing ever scrolls under it — and an
|
|
@@ -150,7 +149,11 @@ function Tabs(props) {
|
|
|
150
149
|
// Clip (and thus scroll) ONLY when overflowing — otherwise overflow stays visible so the
|
|
151
150
|
// pill shadow + a tab's outset focus outline aren't sheared by the scroll box. See above.
|
|
152
151
|
scrollable && (horizontal ? "overflow-x-auto" : "overflow-y-auto"),
|
|
153
|
-
|
|
152
|
+
// The shared `scrollbar-none` utility (`theme.css`), not a hand-rolled pair of arbitrary
|
|
153
|
+
// variants: the edge fade is the sole overflow affordance here, which is the documented
|
|
154
|
+
// reason that utility exists. A strip 36-44px tall cannot host a bar without eating its
|
|
155
|
+
// own content, so this is one of the four places deliberately NOT converted to `ScrollView`.
|
|
156
|
+
"scrollbar-none"
|
|
154
157
|
),
|
|
155
158
|
children: [
|
|
156
159
|
items.map((it) => /* @__PURE__ */ jsxs(
|
|
@@ -159,6 +162,7 @@ function Tabs(props) {
|
|
|
159
162
|
value: it.value,
|
|
160
163
|
disabled: it.disabled,
|
|
161
164
|
"aria-label": it.ariaLabel,
|
|
165
|
+
render: it.render,
|
|
162
166
|
className: cn(TAB_BASE, TAB_SIZE[size], TAB_VARIANT[variant], fitted && (horizontal ? "min-w-0 flex-1" : "flex-1"), it.className),
|
|
163
167
|
children: [
|
|
164
168
|
it.leading != null ? /* @__PURE__ */ jsx(Slot, { className: TAB_SLOT_ICON[size], children: it.leading }) : null,
|
|
@@ -198,5 +202,5 @@ function Tabs(props) {
|
|
|
198
202
|
Tabs.displayName = "Tabs";
|
|
199
203
|
|
|
200
204
|
export { Tabs };
|
|
201
|
-
//# sourceMappingURL=chunk-
|
|
202
|
-
//# sourceMappingURL=chunk-
|
|
205
|
+
//# sourceMappingURL=chunk-AIGYMTCU.js.map
|
|
206
|
+
//# sourceMappingURL=chunk-AIGYMTCU.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { GLYPH } from './chunk-MCQG4H6T.js';
|
|
2
|
+
import { TooltipExport } from './chunk-KZP6B6B3.js';
|
|
3
3
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
4
|
+
import { warnNeedsName } from './chunk-QDYE5LVT.js';
|
|
4
5
|
import { mergeProps } from '@base-ui/react/merge-props';
|
|
5
6
|
import { useRender } from '@base-ui/react/use-render';
|
|
6
7
|
import 'react';
|
|
@@ -8,7 +9,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
8
9
|
|
|
9
10
|
var BASE = "group relative inline-flex h-max cursor-pointer items-center justify-center rounded-md p-1.5 outline-focus-ring transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:transition-colors [&_svg]:duration-100 [&_svg]:ease-linear";
|
|
10
11
|
var VARIANT = {
|
|
11
|
-
secondary: "bg-primary
|
|
12
|
+
secondary: "bg-primary shadow-skeuomorphic ring-1 ring-inset ring-primary hover:bg-secondary disabled:shadow-xs",
|
|
12
13
|
// A TRANSLUCENT wash, not a ramp stop — the one role in the token layer that has to be, because
|
|
13
14
|
// a ghost rests with no fill and its hover must read as one step above whatever it sits ON.
|
|
14
15
|
// Chasing that with fixed stops does not converge: `bg-subtle` (gray-50) matched the hover fill
|
|
@@ -18,14 +19,26 @@ var VARIANT = {
|
|
|
18
19
|
// again. `bg-ghost-hover` composites instead of replacing, so it steps relative to all of them,
|
|
19
20
|
// and on a selected row it deepens the brand wash instead of painting gray over it. Over a
|
|
20
21
|
// resting surface it lands on gray-100, i.e. exactly where this used to be.
|
|
21
|
-
tertiary: "
|
|
22
|
+
tertiary: "hover:bg-ghost-hover"
|
|
22
23
|
};
|
|
23
24
|
var SIZE = {
|
|
24
25
|
xs: "[&_svg]:size-4",
|
|
25
26
|
sm: "[&_svg]:size-5"
|
|
26
27
|
};
|
|
27
28
|
function ButtonUtility(props) {
|
|
28
|
-
const {
|
|
29
|
+
const {
|
|
30
|
+
render,
|
|
31
|
+
variant = "secondary",
|
|
32
|
+
color = "neutral",
|
|
33
|
+
size = "sm",
|
|
34
|
+
icon,
|
|
35
|
+
tooltip,
|
|
36
|
+
tooltipSide = "top",
|
|
37
|
+
disabled = false,
|
|
38
|
+
type = "button",
|
|
39
|
+
className,
|
|
40
|
+
...rest
|
|
41
|
+
} = props;
|
|
29
42
|
warnNeedsName("ButtonUtility", Boolean(tooltip) || "aria-label" in rest || "aria-labelledby" in rest, "a `tooltip`, `aria-label`, or `aria-labelledby`");
|
|
30
43
|
const element = useRender({
|
|
31
44
|
defaultTagName: "button",
|
|
@@ -33,7 +46,7 @@ function ButtonUtility(props) {
|
|
|
33
46
|
props: mergeProps(
|
|
34
47
|
{
|
|
35
48
|
type,
|
|
36
|
-
className: cn(BASE, VARIANT[variant], SIZE[size], className),
|
|
49
|
+
className: cn(BASE, VARIANT[variant], GLYPH[color], SIZE[size], className),
|
|
37
50
|
children: icon,
|
|
38
51
|
disabled,
|
|
39
52
|
"aria-label": tooltip
|
|
@@ -46,5 +59,5 @@ function ButtonUtility(props) {
|
|
|
46
59
|
}
|
|
47
60
|
|
|
48
61
|
export { ButtonUtility };
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
62
|
+
//# sourceMappingURL=chunk-AZ7DKRBY.js.map
|
|
63
|
+
//# sourceMappingURL=chunk-AZ7DKRBY.js.map
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { useControlScrollFade } from './chunk-7EUAMHMU.js';
|
|
2
|
-
import { FieldShell } from './chunk-
|
|
3
|
-
import { useFieldValidity, FieldFrame } from './chunk-
|
|
4
|
-
import { PlusIcon, ChevronUpIcon, ChevronDownIcon, MinusIcon } from './chunk-
|
|
5
|
-
import { warnPositiveNumber } from './chunk-GCVA3OIV.js';
|
|
2
|
+
import { FieldShell } from './chunk-X2VMIBK5.js';
|
|
3
|
+
import { useFieldValidity, FieldFrame } from './chunk-5KSD4WKN.js';
|
|
4
|
+
import { PlusIcon, ChevronUpIcon, ChevronDownIcon, MinusIcon } from './chunk-BLIZ3CL3.js';
|
|
6
5
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
6
|
+
import { useLabels } from './chunk-RJTVCA62.js';
|
|
7
|
+
import { warnPositiveNumber } from './chunk-QDYE5LVT.js';
|
|
7
8
|
import { NumberField } from '@base-ui/react/number-field';
|
|
8
9
|
import 'react';
|
|
9
10
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
11
|
|
|
12
|
+
// src/components/number-input/labels.ts
|
|
13
|
+
var NUMBER_INPUT_LABELS = {
|
|
14
|
+
decrease: "Decrease",
|
|
15
|
+
increase: "Increase"
|
|
16
|
+
};
|
|
11
17
|
var STEP_GAP = { sm: "gap-3", md: "gap-3", lg: "gap-3.5" };
|
|
12
18
|
var STEP_BTN = "inline-flex shrink-0 cursor-pointer items-center justify-center self-stretch text-tertiary outline-none transition-colors duration-100 ease-linear enabled:hover:bg-secondary enabled:hover:text-secondary disabled:cursor-not-allowed disabled:[&_svg]:opacity-50 [&_svg]:size-5";
|
|
13
19
|
var STEP_PX = { sm: "px-2", md: "px-2.5", lg: "px-3" };
|
|
@@ -50,8 +56,10 @@ function NumberInput(props) {
|
|
|
50
56
|
format,
|
|
51
57
|
onValueChange,
|
|
52
58
|
className,
|
|
53
|
-
"aria-label": ariaLabel
|
|
59
|
+
"aria-label": ariaLabel,
|
|
60
|
+
labels
|
|
54
61
|
} = props;
|
|
62
|
+
const t = useLabels("numberInput", NUMBER_INPUT_LABELS, labels);
|
|
55
63
|
warnPositiveNumber("NumberInput", "step", step === "any" ? void 0 : step);
|
|
56
64
|
warnPositiveNumber("NumberInput", "smallStep", smallStep);
|
|
57
65
|
warnPositiveNumber("NumberInput", "largeStep", largeStep);
|
|
@@ -103,10 +111,10 @@ function NumberInput(props) {
|
|
|
103
111
|
leadingAddon,
|
|
104
112
|
trailingAddon,
|
|
105
113
|
segmentDivider: variant !== "horizontal",
|
|
106
|
-
segmentLeading: variant === "horizontal" ? /* @__PURE__ */ jsx(NumberField.Decrement, { "aria-label":
|
|
107
|
-
segmentTrailing: variant === "horizontal" ? /* @__PURE__ */ jsx(NumberField.Increment, { "aria-label":
|
|
108
|
-
/* @__PURE__ */ jsx(NumberField.Increment, { "aria-label":
|
|
109
|
-
/* @__PURE__ */ jsx(NumberField.Decrement, { "aria-label":
|
|
114
|
+
segmentLeading: variant === "horizontal" ? /* @__PURE__ */ jsx(NumberField.Decrement, { "aria-label": t.decrease, className: cn(STEP_BTN, STEP_PX[size]), children: /* @__PURE__ */ jsx(MinusIcon, {}) }) : null,
|
|
115
|
+
segmentTrailing: variant === "horizontal" ? /* @__PURE__ */ jsx(NumberField.Increment, { "aria-label": t.increase, className: cn(STEP_BTN, STEP_PX[size]), children: /* @__PURE__ */ jsx(PlusIcon, {}) }) : /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col self-stretch", size === "lg" ? "w-7.5" : "w-7"), children: [
|
|
116
|
+
/* @__PURE__ */ jsx(NumberField.Increment, { "aria-label": t.increase, className: cn(CHEVRON_BTN, CHEVRON_ICON[size]), children: /* @__PURE__ */ jsx(ChevronUpIcon, {}) }),
|
|
117
|
+
/* @__PURE__ */ jsx(NumberField.Decrement, { "aria-label": t.decrease, className: cn(CHEVRON_BTN, "border-t border-primary", CHEVRON_ICON[size]), children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })
|
|
110
118
|
] }),
|
|
111
119
|
className: STEP_GAP[size],
|
|
112
120
|
children: /* @__PURE__ */ jsx(
|
|
@@ -129,5 +137,5 @@ function NumberInput(props) {
|
|
|
129
137
|
}
|
|
130
138
|
|
|
131
139
|
export { NumberInput };
|
|
132
|
-
//# sourceMappingURL=chunk-
|
|
133
|
-
//# sourceMappingURL=chunk-
|
|
140
|
+
//# sourceMappingURL=chunk-BBKE4W3B.js.map
|
|
141
|
+
//# sourceMappingURL=chunk-BBKE4W3B.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { useControllableOpen } from './chunk-
|
|
2
|
-
import { PanelChrome } from './chunk-
|
|
3
|
-
import { CloseButton } from './chunk-MQGD2OUF.js';
|
|
1
|
+
import { useControllableOpen, BACKDROP_TREATMENT } from './chunk-CKMWBVRR.js';
|
|
2
|
+
import { PanelChrome } from './chunk-LO22VQL5.js';
|
|
4
3
|
import { EXPLICIT_CLOSE } from './chunk-S7NNXWIN.js';
|
|
5
|
-
import {
|
|
4
|
+
import { CloseButton } from './chunk-CGHYXWTT.js';
|
|
6
5
|
import { DRAWER_BACKDROP_MOTION, DRAWER_POPUP_MOTION, DRAWER_SLIDE } from './chunk-O4GRKO3I.js';
|
|
7
6
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
8
7
|
import { Drawer as Drawer$1 } from '@base-ui/react/drawer';
|
|
@@ -48,8 +47,9 @@ function Drawer(props) {
|
|
|
48
47
|
onOpenChange,
|
|
49
48
|
side = "right",
|
|
50
49
|
size = "md",
|
|
50
|
+
backdrop = "scrim",
|
|
51
51
|
showClose = true,
|
|
52
|
-
dividers =
|
|
52
|
+
dividers = "line",
|
|
53
53
|
keepMounted = false,
|
|
54
54
|
dismissible = true,
|
|
55
55
|
container,
|
|
@@ -64,8 +64,6 @@ function Drawer(props) {
|
|
|
64
64
|
const ariaLabel = props["aria-label"];
|
|
65
65
|
const [value, setOpen] = useControllableOpen(open, defaultOpen, onOpenChange);
|
|
66
66
|
const close = React.useCallback(() => setOpen(false), [setOpen]);
|
|
67
|
-
const bodyRef = React.useRef(null);
|
|
68
|
-
const { maskImage } = useScrollFade(bodyRef, { axis: "vertical" });
|
|
69
67
|
const horizontal = isHorizontal(side);
|
|
70
68
|
const contained = container != null;
|
|
71
69
|
const anchor = contained ? "absolute" : "fixed";
|
|
@@ -86,7 +84,7 @@ function Drawer(props) {
|
|
|
86
84
|
children: [
|
|
87
85
|
trigger ? /* @__PURE__ */ jsx(Drawer$1.Trigger, { render: trigger }) : null,
|
|
88
86
|
/* @__PURE__ */ jsxs(Drawer$1.Portal, { keepMounted, container, children: [
|
|
89
|
-
/* @__PURE__ */ jsx(Drawer$1.Backdrop, { className: cn(anchor, "inset-0 z-50
|
|
87
|
+
/* @__PURE__ */ jsx(Drawer$1.Backdrop, { className: cn(anchor, "inset-0 z-50", BACKDROP_TREATMENT[backdrop], DRAWER_BACKDROP_MOTION) }),
|
|
90
88
|
/* @__PURE__ */ jsx(Drawer$1.Viewport, { className: cn("pointer-events-none z-50", anchor, "inset-0"), children: /* @__PURE__ */ jsx(
|
|
91
89
|
PanelChrome,
|
|
92
90
|
{
|
|
@@ -110,8 +108,6 @@ function Drawer(props) {
|
|
|
110
108
|
titleScale: "lg",
|
|
111
109
|
footerAlign: "end",
|
|
112
110
|
scrollBody: true,
|
|
113
|
-
bodyRef,
|
|
114
|
-
bodyMask: maskImage,
|
|
115
111
|
dividers,
|
|
116
112
|
title,
|
|
117
113
|
description,
|
|
@@ -132,5 +128,5 @@ function Drawer(props) {
|
|
|
132
128
|
Drawer.displayName = "Drawer";
|
|
133
129
|
|
|
134
130
|
export { Drawer };
|
|
135
|
-
//# sourceMappingURL=chunk-
|
|
136
|
-
//# sourceMappingURL=chunk-
|
|
131
|
+
//# sourceMappingURL=chunk-BFVJHH7S.js.map
|
|
132
|
+
//# sourceMappingURL=chunk-BFVJHH7S.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ArrowDown, ArrowRight, Asterisk, Bell, Calendar, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsLeft, ChevronsRight, ChevronsUpDown, CircleAlert, CircleCheck, CircleHelp, Circle, CircleX, Columns3, Ellipsis, EllipsisVertical, Eye, EyeOff, File, GripVertical, Inbox, Info, LoaderCircle, Menu, Minus, Moon, PanelLeft, Plus, RotateCw, Search, Slash, Sun, Trash2, TriangleAlert, UploadCloud, User, X } from 'lucide-react';
|
|
2
|
+
|
|
3
|
+
// src/components/icons/core/index.ts
|
|
4
|
+
var ArrowDownIcon = ArrowDown;
|
|
5
|
+
var ArrowRightIcon = ArrowRight;
|
|
6
|
+
var AsteriskIcon = Asterisk;
|
|
7
|
+
var BellIcon = Bell;
|
|
8
|
+
var CalendarIcon = Calendar;
|
|
9
|
+
var CheckIcon = Check;
|
|
10
|
+
var ChevronDownIcon = ChevronDown;
|
|
11
|
+
var ChevronLeftIcon = ChevronLeft;
|
|
12
|
+
var ChevronRightIcon = ChevronRight;
|
|
13
|
+
var ChevronsLeftIcon = ChevronsLeft;
|
|
14
|
+
var ChevronsRightIcon = ChevronsRight;
|
|
15
|
+
var ChevronsUpDownIcon = ChevronsUpDown;
|
|
16
|
+
var ChevronUpIcon = ChevronUp;
|
|
17
|
+
var CircleIcon = Circle;
|
|
18
|
+
var CircleAlertIcon = CircleAlert;
|
|
19
|
+
var CircleCheckIcon = CircleCheck;
|
|
20
|
+
var CircleHelpIcon = CircleHelp;
|
|
21
|
+
var CircleXIcon = CircleX;
|
|
22
|
+
var Columns3Icon = Columns3;
|
|
23
|
+
var EllipsisIcon = Ellipsis;
|
|
24
|
+
var EllipsisVerticalIcon = EllipsisVertical;
|
|
25
|
+
var EyeIcon = Eye;
|
|
26
|
+
var EyeOffIcon = EyeOff;
|
|
27
|
+
var FileIcon = File;
|
|
28
|
+
var GripVerticalIcon = GripVertical;
|
|
29
|
+
var InboxIcon = Inbox;
|
|
30
|
+
var InfoIcon = Info;
|
|
31
|
+
var LoaderCircleIcon = LoaderCircle;
|
|
32
|
+
var MenuIcon = Menu;
|
|
33
|
+
var MinusIcon = Minus;
|
|
34
|
+
var MoonIcon = Moon;
|
|
35
|
+
var PanelLeftIcon = PanelLeft;
|
|
36
|
+
var PlusIcon = Plus;
|
|
37
|
+
var RotateCwIcon = RotateCw;
|
|
38
|
+
var SearchIcon = Search;
|
|
39
|
+
var SlashIcon = Slash;
|
|
40
|
+
var SunIcon = Sun;
|
|
41
|
+
var Trash2Icon = Trash2;
|
|
42
|
+
var TriangleAlertIcon = TriangleAlert;
|
|
43
|
+
var UploadCloudIcon = UploadCloud;
|
|
44
|
+
var UserIcon = User;
|
|
45
|
+
var XIcon = X;
|
|
46
|
+
|
|
47
|
+
export { ArrowDownIcon, ArrowRightIcon, AsteriskIcon, BellIcon, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpDownIcon, CircleAlertIcon, CircleCheckIcon, CircleHelpIcon, CircleIcon, CircleXIcon, Columns3Icon, EllipsisIcon, EllipsisVerticalIcon, EyeIcon, EyeOffIcon, FileIcon, GripVerticalIcon, InboxIcon, InfoIcon, LoaderCircleIcon, MenuIcon, MinusIcon, MoonIcon, PanelLeftIcon, PlusIcon, RotateCwIcon, SearchIcon, SlashIcon, SunIcon, Trash2Icon, TriangleAlertIcon, UploadCloudIcon, UserIcon, XIcon };
|
|
48
|
+
//# sourceMappingURL=chunk-BLIZ3CL3.js.map
|
|
49
|
+
//# sourceMappingURL=chunk-BLIZ3CL3.js.map
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
+
import { useLinkElement } from './chunk-5AZKP4KZ.js';
|
|
1
2
|
import { Slot } from './chunk-52IFGFTL.js';
|
|
2
|
-
import { ChevronRightIcon, SlashIcon } from './chunk-
|
|
3
|
-
import { warnPositiveInt, devWarn } from './chunk-GCVA3OIV.js';
|
|
3
|
+
import { ChevronRightIcon, SlashIcon } from './chunk-BLIZ3CL3.js';
|
|
4
4
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
5
|
+
import { useLabels } from './chunk-RJTVCA62.js';
|
|
6
|
+
import { warnPositiveInt, devWarn } from './chunk-QDYE5LVT.js';
|
|
5
7
|
import { useRender } from '@base-ui/react/use-render';
|
|
6
8
|
import * as React from 'react';
|
|
7
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
10
|
|
|
11
|
+
// src/components/breadcrumb/labels.ts
|
|
12
|
+
var BREADCRUMB_LABELS = {
|
|
13
|
+
/** The "…" trigger. The English default owns its own `count === 1` branch — a language with a
|
|
14
|
+
* different plural rule owns the whole function, which is why this is not a string. */
|
|
15
|
+
showHidden: (ctx) => `Show ${ctx.count} hidden breadcrumb${ctx.count === 1 ? "" : "s"}`
|
|
16
|
+
};
|
|
9
17
|
var NAV = "min-w-0";
|
|
10
18
|
var OL_BASE = "flex items-center";
|
|
11
19
|
var OL_GAP = {
|
|
@@ -44,9 +52,12 @@ function CrumbContent({ item, truncate }) {
|
|
|
44
52
|
}
|
|
45
53
|
function Crumb({ item, variant }) {
|
|
46
54
|
const { href, render, onClick, ariaLabel, className } = item;
|
|
55
|
+
const link = useLinkElement(href);
|
|
47
56
|
return useRender({
|
|
48
57
|
defaultTagName: "button",
|
|
49
|
-
|
|
58
|
+
// The item's own `render` still wins — it is the more specific statement than the provider's
|
|
59
|
+
// app-wide `link`, which is what `useLinkElement` reads.
|
|
60
|
+
render: render ?? link,
|
|
50
61
|
// A crumb takes no `...rest` (its whole API is the item fields), so there is nothing to
|
|
51
62
|
// merge — unlike Button, which merges its computed props over the caller's spread.
|
|
52
63
|
props: {
|
|
@@ -69,7 +80,8 @@ function collapse(items, maxItems) {
|
|
|
69
80
|
return { lead: rest.slice(0, keep), hidden: rest.slice(keep), current };
|
|
70
81
|
}
|
|
71
82
|
function Breadcrumb(props) {
|
|
72
|
-
const { items, variant = "text", divider = "chevron", bordered = false, maxItems, className } = props;
|
|
83
|
+
const { items, variant = "text", divider = "chevron", bordered = false, maxItems, labels, className } = props;
|
|
84
|
+
const t = useLabels("breadcrumb", BREADCRUMB_LABELS, labels);
|
|
73
85
|
const ariaLabel = props["aria-label"] ?? "Breadcrumb";
|
|
74
86
|
const [expanded, setExpanded] = React.useState(false);
|
|
75
87
|
warnPositiveInt("Breadcrumb", "maxItems", maxItems);
|
|
@@ -81,7 +93,7 @@ function Breadcrumb(props) {
|
|
|
81
93
|
if (current.href != null || current.render != null) {
|
|
82
94
|
devWarn("<Breadcrumb> the last item is the current page and never renders as a link \u2014 its `href`/`render` are ignored.");
|
|
83
95
|
}
|
|
84
|
-
const overflowLabel =
|
|
96
|
+
const overflowLabel = t.showHidden({ count: hidden.length });
|
|
85
97
|
return /* @__PURE__ */ jsx("nav", { "aria-label": ariaLabel, className: cn(NAV, className), children: /* @__PURE__ */ jsxs("ol", { className: cn(OL_BASE, OL_GAP[variant], bordered && OL_BORDERED), children: [
|
|
86
98
|
lead.map((item, i) => /* @__PURE__ */ jsxs("li", { className: cn(LI_BASE, OL_GAP[variant]), children: [
|
|
87
99
|
/* @__PURE__ */ jsx(Crumb, { item, variant }),
|
|
@@ -110,5 +122,5 @@ function Breadcrumb(props) {
|
|
|
110
122
|
Breadcrumb.displayName = "Breadcrumb";
|
|
111
123
|
|
|
112
124
|
export { Breadcrumb };
|
|
113
|
-
//# sourceMappingURL=chunk-
|
|
114
|
-
//# sourceMappingURL=chunk-
|
|
125
|
+
//# sourceMappingURL=chunk-CFFWYXDW.js.map
|
|
126
|
+
//# sourceMappingURL=chunk-CFFWYXDW.js.map
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { XIcon } from './chunk-
|
|
1
|
+
import { XIcon } from './chunk-BLIZ3CL3.js';
|
|
2
2
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
3
|
+
import { useLabels } from './chunk-RJTVCA62.js';
|
|
3
4
|
import { mergeProps } from '@base-ui/react/merge-props';
|
|
4
5
|
import { useRender } from '@base-ui/react/use-render';
|
|
5
6
|
import 'react';
|
|
6
7
|
import { jsx } from 'react/jsx-runtime';
|
|
7
8
|
|
|
9
|
+
// src/components/button/labels.ts
|
|
10
|
+
var CLOSE_BUTTON_LABELS = {
|
|
11
|
+
close: "Close"
|
|
12
|
+
};
|
|
8
13
|
var BASE = "flex cursor-pointer items-center justify-center rounded-lg p-2 outline-focus-ring transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:shrink-0 [&_svg]:transition-colors [&_svg]:duration-100 [&_svg]:ease-linear";
|
|
9
14
|
var SIZE = {
|
|
10
15
|
xs: "size-7 [&_svg]:size-4",
|
|
@@ -17,7 +22,8 @@ var THEME = {
|
|
|
17
22
|
dark: "text-white/70 hover:bg-white/20 hover:text-white"
|
|
18
23
|
};
|
|
19
24
|
function CloseButton(props) {
|
|
20
|
-
const { render, size = "sm", theme = "light", label
|
|
25
|
+
const { render, size = "sm", theme = "light", label, labels, disabled = false, type = "button", className, ...rest } = props;
|
|
26
|
+
const t = useLabels("closeButton", CLOSE_BUTTON_LABELS, labels);
|
|
21
27
|
return useRender({
|
|
22
28
|
defaultTagName: "button",
|
|
23
29
|
render,
|
|
@@ -27,7 +33,7 @@ function CloseButton(props) {
|
|
|
27
33
|
className: cn(BASE, SIZE[size], THEME[theme], className),
|
|
28
34
|
children: /* @__PURE__ */ jsx(XIcon, {}),
|
|
29
35
|
disabled,
|
|
30
|
-
"aria-label": label
|
|
36
|
+
"aria-label": label ?? t.close
|
|
31
37
|
},
|
|
32
38
|
rest
|
|
33
39
|
)
|
|
@@ -35,5 +41,5 @@ function CloseButton(props) {
|
|
|
35
41
|
}
|
|
36
42
|
|
|
37
43
|
export { CloseButton };
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
44
|
+
//# sourceMappingURL=chunk-CGHYXWTT.js.map
|
|
45
|
+
//# sourceMappingURL=chunk-CGHYXWTT.js.map
|