jenosize-ui 0.2.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 +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 +9 -8
- 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 +15 -13
- 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-A46ED5JQ.js → chunk-33TOK7ES.js} +7 -5
- package/dist/{chunk-RNXRZGXN.js → chunk-3H444OJA.js} +5 -3
- 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-FIGBJGH2.js → chunk-4VGEJG4M.js} +115 -79
- 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-6UBYHSBX.js → chunk-5ZEUTSCV.js} +5 -5
- package/dist/{chunk-DCGTB7P7.js → chunk-667ZHY3T.js} +111 -39
- package/dist/{chunk-MYQ3FD4Y.js → chunk-6B6BWTXC.js} +8 -5
- package/dist/{chunk-6HJA7NPL.js → chunk-6H4LNWQ7.js} +3 -3
- package/dist/{chunk-JAVNGTOE.js → chunk-6MMBQVRO.js} +58 -43
- package/dist/{chunk-JMWYCT63.js → chunk-7GUPNTAH.js} +14 -6
- package/dist/{chunk-TBN644IN.js → chunk-7ZM7SNCZ.js} +3 -3
- package/dist/{chunk-BD5YKFRA.js → chunk-A323V6AI.js} +5 -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-4BRMM3I5.js → chunk-BFVJHH7S.js} +7 -6
- package/dist/{chunk-FFTRB2UU.js → chunk-CFFWYXDW.js} +18 -6
- package/dist/{chunk-42FCPC77.js → chunk-CGHYXWTT.js} +10 -4
- package/dist/{chunk-VEOYCAJP.js → chunk-CKMWBVRR.js} +27 -7
- package/dist/{chunk-GTHJWR3Q.js → chunk-D7EE5GWU.js} +21 -22
- package/dist/{chunk-NMERLWT7.js → chunk-E2YZ7IMT.js} +23 -7
- package/dist/{chunk-GAFGIT4Q.js → chunk-FFMTYQXE.js} +30 -10
- package/dist/{chunk-L53Y7KUV.js → chunk-FH7Z7SGQ.js} +61 -28
- 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-BNIWT6CW.js → chunk-GZMDZF2V.js} +7 -6
- package/dist/{chunk-HSVBTIP2.js → chunk-HHYEAFCL.js} +70 -27
- package/dist/{chunk-P7DH62UY.js → chunk-I6WMNXC7.js} +5 -5
- package/dist/{chunk-34J5AANZ.js → chunk-IQNVSQRK.js} +3 -3
- package/dist/{chunk-MCUASLZH.js → chunk-KHGW72BM.js} +3 -3
- package/dist/{chunk-4R7WDDCW.js → chunk-KZP6B6B3.js} +4 -4
- package/dist/{chunk-7HV6EIGZ.js → chunk-LLPWQDF7.js} +3 -3
- package/dist/{chunk-FZBZGA3P.js → chunk-LO22VQL5.js} +4 -4
- 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-JYBGO6GY.js → chunk-MVG5MABV.js} +11 -8
- package/dist/{chunk-PXEJ5RKO.js → chunk-N3RVMBPX.js} +6 -9
- 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-VH35QHD4.js → chunk-QHH6AUR3.js} +16 -8
- package/dist/chunk-RJTVCA62.js +42 -0
- package/dist/{chunk-DTMYD63D.js → chunk-S5TEWPWW.js} +46 -26
- package/dist/{chunk-3GT43XPK.js → chunk-SB3DG572.js} +15 -8
- 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-USL3TDZM.js → chunk-U4WSJAYK.js} +321 -105
- package/dist/{chunk-4W6AYGLR.js → chunk-UGKELBNC.js} +55 -39
- 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-YQYVGWIC.js} +5 -5
- package/dist/{chunk-4HKDD3PR.js → chunk-ZHAT2XZ4.js} +91 -57
- package/dist/{chunk-CWMFEF6R.js → chunk-ZMFY7WAY.js} +60 -24
- package/dist/{chunk-WKWAUU64.js → chunk-ZZSNTCCL.js} +6 -5
- package/dist/combobox.d.ts +5 -0
- package/dist/combobox.js +12 -11
- 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 +23 -21
- package/dist/dialog.d.ts +21 -1
- package/dist/dialog.js +10 -8
- package/dist/drawer.d.ts +11 -1
- package/dist/drawer.js +9 -7
- package/dist/dropdown-menu.d.ts +12 -0
- package/dist/dropdown-menu.js +6 -5
- package/dist/dropzone.d.ts +3 -2
- package/dist/dropzone.js +13 -12
- package/dist/form.d.ts +5 -4
- package/dist/form.js +60 -44
- 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 +81 -76
- 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 +14 -12
- 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 +9 -7
- 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/select.d.ts +2 -1
- package/dist/select.js +14 -13
- package/dist/shared-CxAedkiy.d.ts +68 -0
- package/dist/sidebar-navigation.d.ts +28 -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 +36 -34
- 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,14 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { resolveActive, SidebarNavigation, linkMatches } from './chunk-ZMFY7WAY.js';
|
|
2
|
+
import { Tabs } from './chunk-AIGYMTCU.js';
|
|
3
|
+
import { Drawer } from './chunk-BFVJHH7S.js';
|
|
4
4
|
import { ruleEdge } from './chunk-LCG34A5T.js';
|
|
5
|
-
import {
|
|
5
|
+
import { useLinkElement, useLinkResolver, LinkOrButton } from './chunk-5AZKP4KZ.js';
|
|
6
|
+
import { ButtonUtility } from './chunk-AZ7DKRBY.js';
|
|
6
7
|
import { Slot } from './chunk-52IFGFTL.js';
|
|
7
8
|
import { MenuIcon } from './chunk-BLIZ3CL3.js';
|
|
8
9
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
9
|
-
import '
|
|
10
|
-
import
|
|
10
|
+
import { useLabels } from './chunk-RJTVCA62.js';
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
11
13
|
|
|
14
|
+
// src/components/header-navigation/labels.ts
|
|
15
|
+
var HEADER_NAVIGATION_LABELS = {
|
|
16
|
+
/** The mobile drawer trigger's tooltip, which is also its accessible name. */
|
|
17
|
+
openNavigation: "Open navigation",
|
|
18
|
+
/** The brand lockup, which is a link with a logo inside and therefore no text of its own. */
|
|
19
|
+
homepage: "Go to homepage"
|
|
20
|
+
};
|
|
12
21
|
var HEADER_BASE = "w-full bg-primary";
|
|
13
22
|
var TIER = "flex w-full items-center gap-4 px-4 md:px-6";
|
|
14
23
|
var TIER_1 = cn(TIER, "h-16");
|
|
@@ -26,6 +35,7 @@ function NavRow({
|
|
|
26
35
|
onNavigate
|
|
27
36
|
}) {
|
|
28
37
|
const className = cn(ROW_BASE, current ? ROW_CURRENT : ROW_IDLE, link.disabled && ROW_DISABLED, link.className);
|
|
38
|
+
const navLink = useLinkElement(link.href);
|
|
29
39
|
const onClick = (event) => {
|
|
30
40
|
if (link.disabled) {
|
|
31
41
|
event.preventDefault();
|
|
@@ -39,10 +49,10 @@ function NavRow({
|
|
|
39
49
|
/* @__PURE__ */ jsx("span", { className: "truncate", children: link.label }),
|
|
40
50
|
link.trailing != null ? /* @__PURE__ */ jsx(Slot, { className: ROW_SLOT, children: link.trailing }) : null
|
|
41
51
|
] });
|
|
42
|
-
if (link.
|
|
43
|
-
return /* @__PURE__ */ jsx("
|
|
52
|
+
if (link.disabled) {
|
|
53
|
+
return /* @__PURE__ */ jsx("button", { type: "button", disabled: true, "aria-current": current ? "page" : void 0, onClick, className, children: content });
|
|
44
54
|
}
|
|
45
|
-
return /* @__PURE__ */ jsx(
|
|
55
|
+
return /* @__PURE__ */ jsx(LinkOrButton, { render: link.render ?? navLink, className, ariaCurrent: current, onClick, children: content });
|
|
46
56
|
}
|
|
47
57
|
function NavRowList({
|
|
48
58
|
links,
|
|
@@ -76,22 +86,44 @@ function HeaderNavigation(props) {
|
|
|
76
86
|
dividers = "line",
|
|
77
87
|
sticky = false,
|
|
78
88
|
mobile = "sheet",
|
|
89
|
+
labels,
|
|
79
90
|
className
|
|
80
91
|
} = props;
|
|
81
92
|
const ariaLabel = props["aria-label"] ?? "Main";
|
|
93
|
+
const t = useLabels("headerNavigation", HEADER_NAVIGATION_LABELS, labels);
|
|
94
|
+
const brandLink = useLinkElement(logoHref);
|
|
82
95
|
const { current, trail } = resolveActive(items, activeHref);
|
|
83
96
|
const activeTop = current && items.includes(current) ? current : items.find((item) => trail.has(item)) ?? null;
|
|
84
97
|
const tier2 = subItems ?? activeTop?.items ?? [];
|
|
85
98
|
const showTier2 = secondary !== "none" && tier2.length > 0;
|
|
86
99
|
const tier2Label = subItems ? "Secondary" : activeTop?.label ?? "Secondary";
|
|
87
100
|
const currentHref = current?.href ?? null;
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
101
|
+
const resolveTabLink = useLinkResolver();
|
|
102
|
+
const tabItems = tier2.map((link) => {
|
|
103
|
+
const element = link.disabled ? void 0 : link.render ?? resolveTabLink(link.href) ?? /* @__PURE__ */ jsx("button", { type: "button" });
|
|
104
|
+
return {
|
|
105
|
+
value: link.href ?? link.label,
|
|
106
|
+
label: link.label,
|
|
107
|
+
leading: link.leading,
|
|
108
|
+
trailing: link.trailing,
|
|
109
|
+
disabled: link.disabled,
|
|
110
|
+
render: element == null ? void 0 : React.cloneElement(element, {
|
|
111
|
+
/* `aria-selected` says which tab is SHOWING; only `aria-current` says "this is the page
|
|
112
|
+
* you are on". A route-backed strip owes both, and colour alone says neither. */
|
|
113
|
+
"aria-current": link.href != null && link.href === currentHref ? "page" : void 0,
|
|
114
|
+
/* The REAL event, from the element the user actually pressed. `onValueChange` hands
|
|
115
|
+
* back a native `Event`, which is why the old call site faked a
|
|
116
|
+
* `{} as React.MouseEvent` — so a caller following the documented interception
|
|
117
|
+
* pattern got `TypeError: event.preventDefault is not a function`. And nothing here
|
|
118
|
+
* needs to re-check `defaultPrevented`: the navigation IS the anchor's default action,
|
|
119
|
+
* so `preventDefault()` stops it by definition. */
|
|
120
|
+
onClick: (event) => {
|
|
121
|
+
onNavigate?.(link, event);
|
|
122
|
+
link.onClick?.(event);
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
};
|
|
126
|
+
});
|
|
95
127
|
const activeTabValue = tabItems.find((tab) => tab.value === currentHref)?.value;
|
|
96
128
|
return /* @__PURE__ */ jsxs(
|
|
97
129
|
"header",
|
|
@@ -117,16 +149,16 @@ function HeaderNavigation(props) {
|
|
|
117
149
|
side: "left",
|
|
118
150
|
size: "sm",
|
|
119
151
|
"aria-label": ariaLabel,
|
|
120
|
-
trigger: /* @__PURE__ */ jsx(ButtonUtility, { variant: "tertiary", size: "sm", icon: /* @__PURE__ */ jsx(MenuIcon, {}), tooltip:
|
|
152
|
+
trigger: /* @__PURE__ */ jsx(ButtonUtility, { variant: "tertiary", size: "sm", icon: /* @__PURE__ */ jsx(MenuIcon, {}), tooltip: t.openNavigation, tooltipSide: "bottom" }),
|
|
121
153
|
children: /* @__PURE__ */ jsx(SidebarNavigation, { items, activeHref, onNavigate, "aria-label": ariaLabel })
|
|
122
154
|
}
|
|
123
155
|
) })
|
|
124
156
|
) : null,
|
|
125
157
|
logo != null ? /* @__PURE__ */ jsx("div", { className: cn("flex shrink-0 items-center", align === "center" && "flex-1"), children: logoHref ? /* @__PURE__ */ jsx(
|
|
126
|
-
|
|
158
|
+
LinkOrButton,
|
|
127
159
|
{
|
|
128
|
-
|
|
129
|
-
|
|
160
|
+
render: brandLink,
|
|
161
|
+
ariaLabel: t.homepage,
|
|
130
162
|
className: "flex items-center rounded-md outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
131
163
|
children: logo
|
|
132
164
|
}
|
|
@@ -147,23 +179,7 @@ function HeaderNavigation(props) {
|
|
|
147
179
|
/* @__PURE__ */ jsx("div", { className: "flex-1" })
|
|
148
180
|
) : null
|
|
149
181
|
] }),
|
|
150
|
-
showTier2 ? secondary === "tabs" ? /* @__PURE__ */ jsx("div", { className: TIER_2_TABS, children: /* @__PURE__ */ jsx(
|
|
151
|
-
Tabs,
|
|
152
|
-
{
|
|
153
|
-
"aria-label": tier2Label,
|
|
154
|
-
size: "sm",
|
|
155
|
-
sticky,
|
|
156
|
-
items: tabItems,
|
|
157
|
-
value: activeTabValue,
|
|
158
|
-
onValueChange: (value) => {
|
|
159
|
-
const link = tier2.find((item) => (item.href ?? item.label) === value);
|
|
160
|
-
if (!link || link.disabled) return;
|
|
161
|
-
onNavigate?.(link, {});
|
|
162
|
-
if (link.href) globalThis.location.assign(link.href);
|
|
163
|
-
},
|
|
164
|
-
className: "w-full"
|
|
165
|
-
}
|
|
166
|
-
) }) : /* @__PURE__ */ jsxs("div", { className: cn(TIER_2, ruleEdge(dividers, "top")), children: [
|
|
182
|
+
showTier2 ? secondary === "tabs" ? /* @__PURE__ */ jsx("div", { className: TIER_2_TABS, children: /* @__PURE__ */ jsx(Tabs, { "aria-label": tier2Label, size: "sm", sticky, items: tabItems, value: activeTabValue, className: "w-full" }) }) : /* @__PURE__ */ jsxs("div", { className: cn(TIER_2, ruleEdge(dividers, "top")), children: [
|
|
167
183
|
/* @__PURE__ */ jsx(
|
|
168
184
|
NavRowList,
|
|
169
185
|
{
|
|
@@ -184,5 +200,5 @@ function HeaderNavigation(props) {
|
|
|
184
200
|
HeaderNavigation.displayName = "HeaderNavigation";
|
|
185
201
|
|
|
186
202
|
export { HeaderNavigation };
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
188
|
-
//# sourceMappingURL=chunk-
|
|
203
|
+
//# sourceMappingURL=chunk-UGKELBNC.js.map
|
|
204
|
+
//# sourceMappingURL=chunk-UGKELBNC.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { usePolarData, resolveMax } from './chunk-
|
|
2
|
-
import { RADIAL_SIZE, ChartDataTable, formatNumber, ChartFrame, RadialBarChart, MARGIN, PolarAngleAxis, Tooltip, NO_ANIMATION, ChartTooltipContent, RadialBar, RADIAL_TRACK, POLAR_ROOT, POLAR_HOVER, ChartLegendContent } from './chunk-
|
|
1
|
+
import { usePolarData, resolveMax } from './chunk-OLLD2BZN.js';
|
|
2
|
+
import { DEFAULT_PALETTE, RADIAL_SIZE, ChartDataTable, formatNumber, ChartFrame, RadialBarChart, MARGIN, PolarAngleAxis, Tooltip, NO_ANIMATION, ChartTooltipContent, RadialBar, RADIAL_TRACK, POLAR_ROOT, POLAR_HOVER, ChartLegendContent } from './chunk-22M75A3N.js';
|
|
3
3
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
4
4
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
function RadialChart({
|
|
7
7
|
data,
|
|
8
8
|
size = "md",
|
|
9
|
-
palette =
|
|
9
|
+
palette = DEFAULT_PALETTE,
|
|
10
10
|
label,
|
|
11
11
|
description,
|
|
12
12
|
max = "auto",
|
|
@@ -15,7 +15,8 @@ function RadialChart({
|
|
|
15
15
|
formatValue = formatNumber,
|
|
16
16
|
tooltip = true,
|
|
17
17
|
tooltipTone = "surface",
|
|
18
|
-
emptyMessage
|
|
18
|
+
emptyMessage,
|
|
19
|
+
labels,
|
|
19
20
|
className,
|
|
20
21
|
"aria-label": ariaLabel
|
|
21
22
|
}) {
|
|
@@ -34,6 +35,7 @@ function RadialChart({
|
|
|
34
35
|
height: geometry.height,
|
|
35
36
|
isEmpty: data.length === 0,
|
|
36
37
|
emptyMessage,
|
|
38
|
+
labels,
|
|
37
39
|
className,
|
|
38
40
|
table,
|
|
39
41
|
legendPlacement: legend === "none" ? void 0 : legend,
|
|
@@ -71,5 +73,5 @@ function RadialChart({
|
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
export { RadialChart };
|
|
74
|
-
//# sourceMappingURL=chunk-
|
|
75
|
-
//# sourceMappingURL=chunk-
|
|
76
|
+
//# sourceMappingURL=chunk-ULGCGKOE.js.map
|
|
77
|
+
//# sourceMappingURL=chunk-ULGCGKOE.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CONTROL_RADIUS, CONTROL_TEXT, SHELL_SIZE, BAR_SIZE, SLOT_ICON } from './chunk-5KSD4WKN.js';
|
|
2
|
+
import { SeamlessProvider, addonSlotClasses } from './chunk-7ZM7SNCZ.js';
|
|
2
3
|
import { Slot } from './chunk-52IFGFTL.js';
|
|
3
|
-
import { CONTROL_RADIUS, CONTROL_TEXT, SHELL_SIZE, BAR_SIZE, SLOT_ICON } from './chunk-QKDEQFOQ.js';
|
|
4
4
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
5
5
|
import { mergeProps } from '@base-ui/react/merge-props';
|
|
6
6
|
import { useRender } from '@base-ui/react/use-render';
|
|
@@ -127,5 +127,5 @@ function FieldShell(props) {
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
export { FieldShell, controlBoxClasses };
|
|
130
|
-
//# sourceMappingURL=chunk-
|
|
131
|
-
//# sourceMappingURL=chunk-
|
|
130
|
+
//# sourceMappingURL=chunk-X2VMIBK5.js.map
|
|
131
|
+
//# sourceMappingURL=chunk-X2VMIBK5.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cartesian } from './chunk-
|
|
1
|
+
import { Cartesian } from './chunk-5DP7W5HX.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
function LineChart({ curve = "monotone", dashed = false, dots = false, ...rest }) {
|
|
@@ -6,5 +6,5 @@ function LineChart({ curve = "monotone", dashed = false, dots = false, ...rest }
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export { LineChart };
|
|
9
|
-
//# sourceMappingURL=chunk-
|
|
10
|
-
//# sourceMappingURL=chunk-
|
|
9
|
+
//# sourceMappingURL=chunk-YHBI52P2.js.map
|
|
10
|
+
//# sourceMappingURL=chunk-YHBI52P2.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
// src/lib/locale.ts
|
|
4
|
+
var LocaleContext = React.createContext(void 0);
|
|
5
|
+
if (process.env.NODE_ENV !== "production") LocaleContext.displayName = "JenosizeUILocaleContext";
|
|
6
|
+
function useLocaleConfig() {
|
|
7
|
+
return React.useContext(LocaleContext) ?? EMPTY;
|
|
8
|
+
}
|
|
9
|
+
var EMPTY = Object.freeze({});
|
|
10
|
+
|
|
11
|
+
export { LocaleContext, useLocaleConfig };
|
|
12
|
+
//# sourceMappingURL=chunk-YIHKQ63K.js.map
|
|
13
|
+
//# sourceMappingURL=chunk-YIHKQ63K.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useControllableOpen } from './chunk-
|
|
2
|
-
import { PanelChrome } from './chunk-
|
|
3
|
-
import { CloseButton } from './chunk-42FCPC77.js';
|
|
1
|
+
import { useControllableOpen } from './chunk-CKMWBVRR.js';
|
|
2
|
+
import { PanelChrome } from './chunk-LO22VQL5.js';
|
|
4
3
|
import { EXPLICIT_CLOSE, NO_RETURN_FOCUS } from './chunk-S7NNXWIN.js';
|
|
4
|
+
import { CloseButton } from './chunk-CGHYXWTT.js';
|
|
5
5
|
import { POPUP_MOTION } from './chunk-O4GRKO3I.js';
|
|
6
6
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
7
7
|
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
@@ -137,5 +137,5 @@ function Popover(props) {
|
|
|
137
137
|
Popover.displayName = "Popover";
|
|
138
138
|
|
|
139
139
|
export { Popover };
|
|
140
|
-
//# sourceMappingURL=chunk-
|
|
141
|
-
//# sourceMappingURL=chunk-
|
|
140
|
+
//# sourceMappingURL=chunk-YQYVGWIC.js.map
|
|
141
|
+
//# sourceMappingURL=chunk-YQYVGWIC.js.map
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { Indicator } from './chunk-
|
|
2
|
-
import { Skeleton } from './chunk-
|
|
1
|
+
import { Indicator } from './chunk-N3RVMBPX.js';
|
|
2
|
+
import { Skeleton } from './chunk-LLPWQDF7.js';
|
|
3
3
|
import { ScrollView } from './chunk-FKVPAEJ6.js';
|
|
4
|
-
import { TooltipExport } from './chunk-
|
|
4
|
+
import { TooltipExport } from './chunk-KZP6B6B3.js';
|
|
5
5
|
import { POPUP_MOTION } from './chunk-O4GRKO3I.js';
|
|
6
6
|
import { PlusIcon, UserIcon, CheckIcon } from './chunk-BLIZ3CL3.js';
|
|
7
|
-
import { warnExclusive, devWarn } from './chunk-QDYE5LVT.js';
|
|
8
7
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
8
|
+
import { useLabels } from './chunk-RJTVCA62.js';
|
|
9
|
+
import { warnExclusive, devWarn } from './chunk-QDYE5LVT.js';
|
|
9
10
|
import * as React4 from 'react';
|
|
10
11
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
11
12
|
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
|
|
@@ -40,6 +41,72 @@ function AvatarAddButton(props) {
|
|
|
40
41
|
) });
|
|
41
42
|
}
|
|
42
43
|
|
|
44
|
+
// src/components/avatar/labels.ts
|
|
45
|
+
var AVATAR_LABELS = {
|
|
46
|
+
/** The verified indicator's accessible name — the one Avatar marker that carries meaning. */
|
|
47
|
+
verified: "Verified",
|
|
48
|
+
/** The `+N` tile's trigger, when the group's overflow opens a list. */
|
|
49
|
+
showMore: (ctx) => `Show ${ctx.count} more`,
|
|
50
|
+
/** The `+N` tile itself, which is a `role="img"` and needs a name of its own. */
|
|
51
|
+
overflowCount: (ctx) => `${ctx.count} more`,
|
|
52
|
+
/** The overflow list with nothing in it. */
|
|
53
|
+
empty: "No one to show",
|
|
54
|
+
/** A revealed avatar that carries no `name`. */
|
|
55
|
+
unknownName: "Unknown",
|
|
56
|
+
/** The presence dot's two states — the marker is a dot, so its name is all it says. */
|
|
57
|
+
online: "Online",
|
|
58
|
+
offline: "Offline"
|
|
59
|
+
};
|
|
60
|
+
var GLOSS_MASK = "linear-gradient(to bottom, black 0%, transparent 25%, transparent 75%, black 100%)";
|
|
61
|
+
function ContrastBorder({
|
|
62
|
+
radius,
|
|
63
|
+
gloss = false,
|
|
64
|
+
hairline = "0.5",
|
|
65
|
+
glossWidth = "1"
|
|
66
|
+
}) {
|
|
67
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
68
|
+
/* @__PURE__ */ jsx(
|
|
69
|
+
"span",
|
|
70
|
+
{
|
|
71
|
+
"aria-hidden": "true",
|
|
72
|
+
className: cn(
|
|
73
|
+
"pointer-events-none absolute inset-0 outline outline-black/16",
|
|
74
|
+
hairline === "0.75" ? "outline-[0.75px] -outline-offset-[0.75px]" : "outline-[0.5px] -outline-offset-[0.5px]",
|
|
75
|
+
radius
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
gloss ? /* @__PURE__ */ jsx(
|
|
80
|
+
"span",
|
|
81
|
+
{
|
|
82
|
+
"aria-hidden": "true",
|
|
83
|
+
style: { maskImage: GLOSS_MASK, WebkitMaskImage: GLOSS_MASK },
|
|
84
|
+
className: cn("pointer-events-none absolute inset-0 border-white/32", glossWidth === "1.5" ? "border-[1.5px]" : "border", radius)
|
|
85
|
+
}
|
|
86
|
+
) : null
|
|
87
|
+
] });
|
|
88
|
+
}
|
|
89
|
+
function AvatarIndicator({ badge, verified, status, count, boxClass, dotClass, positionClass = "right-0 bottom-0" }) {
|
|
90
|
+
const pos = cn("absolute", positionClass);
|
|
91
|
+
const t = useLabels("avatar", AVATAR_LABELS, void 0);
|
|
92
|
+
if (badge != null) return /* @__PURE__ */ jsx(Indicator, { icon: badge, color: "brand", bordered: true, className: cn(pos, boxClass) });
|
|
93
|
+
if (verified) return /* @__PURE__ */ jsx(Indicator, { shape: "scalloped", color: "info", icon: /* @__PURE__ */ jsx(CheckIcon, {}), label: t.verified, className: cn(pos, boxClass) });
|
|
94
|
+
if (status != null) {
|
|
95
|
+
return /* @__PURE__ */ jsx(
|
|
96
|
+
Indicator,
|
|
97
|
+
{
|
|
98
|
+
raised: true,
|
|
99
|
+
bordered: true,
|
|
100
|
+
color: status === "online" ? "success" : "neutral",
|
|
101
|
+
label: status === "online" ? t.online : t.offline,
|
|
102
|
+
className: cn(pos, dotClass)
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
if (count != null) return /* @__PURE__ */ jsx(Indicator, { count, bordered: true, className: cn(pos, boxClass) });
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
|
|
43
110
|
// src/components/avatar/shared.ts
|
|
44
111
|
var AVATAR_SIZE = {
|
|
45
112
|
xxs: { box: "size-4", text: "text-xs", icon: "size-2.5", dot: "size-1" },
|
|
@@ -64,13 +131,6 @@ var BORDER_PAD = {
|
|
|
64
131
|
xl: "p-0.5",
|
|
65
132
|
"2xl": "p-0.5"
|
|
66
133
|
};
|
|
67
|
-
var STATUS = {
|
|
68
|
-
// Untitled UI online dot = success-500 (the dedicated --color-fg-success-secondary role,
|
|
69
|
-
// one step brighter than the success-600 solid fill).
|
|
70
|
-
online: { dot: "bg-fg-success-secondary", label: "Online" },
|
|
71
|
-
// Light neutral dot (≈ gray-300) — a touch lighter than `fg-subtle`/gray-500.
|
|
72
|
-
offline: { dot: "bg-border-primary", label: "Offline" }
|
|
73
|
-
};
|
|
74
134
|
var INDICATOR_BOX = {
|
|
75
135
|
xxs: "size-2",
|
|
76
136
|
xs: "size-2.5",
|
|
@@ -86,45 +146,6 @@ function getInitials(name) {
|
|
|
86
146
|
if (parts.length === 1) return parts[0].charAt(0).toUpperCase();
|
|
87
147
|
return (parts[0].charAt(0) + parts.at(-1).charAt(0)).toUpperCase();
|
|
88
148
|
}
|
|
89
|
-
var GLOSS_MASK = "linear-gradient(to bottom, black 0%, transparent 25%, transparent 75%, black 100%)";
|
|
90
|
-
function ContrastBorder({
|
|
91
|
-
radius,
|
|
92
|
-
gloss = false,
|
|
93
|
-
hairline = "0.5",
|
|
94
|
-
glossWidth = "1"
|
|
95
|
-
}) {
|
|
96
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
97
|
-
/* @__PURE__ */ jsx(
|
|
98
|
-
"span",
|
|
99
|
-
{
|
|
100
|
-
"aria-hidden": "true",
|
|
101
|
-
className: cn(
|
|
102
|
-
"pointer-events-none absolute inset-0 outline outline-black/16",
|
|
103
|
-
hairline === "0.75" ? "outline-[0.75px] -outline-offset-[0.75px]" : "outline-[0.5px] -outline-offset-[0.5px]",
|
|
104
|
-
radius
|
|
105
|
-
)
|
|
106
|
-
}
|
|
107
|
-
),
|
|
108
|
-
gloss ? /* @__PURE__ */ jsx(
|
|
109
|
-
"span",
|
|
110
|
-
{
|
|
111
|
-
"aria-hidden": "true",
|
|
112
|
-
style: { maskImage: GLOSS_MASK, WebkitMaskImage: GLOSS_MASK },
|
|
113
|
-
className: cn("pointer-events-none absolute inset-0 border-white/32", glossWidth === "1.5" ? "border-[1.5px]" : "border", radius)
|
|
114
|
-
}
|
|
115
|
-
) : null
|
|
116
|
-
] });
|
|
117
|
-
}
|
|
118
|
-
function AvatarIndicator({ badge, verified, status, count, boxClass, dotClass, positionClass = "right-0 bottom-0" }) {
|
|
119
|
-
const pos = cn("absolute", positionClass);
|
|
120
|
-
if (badge != null) return /* @__PURE__ */ jsx(Indicator, { icon: badge, color: "brand", bordered: true, className: cn(pos, boxClass) });
|
|
121
|
-
if (verified) return /* @__PURE__ */ jsx(Indicator, { shape: "scalloped", color: "info", icon: /* @__PURE__ */ jsx(CheckIcon, {}), label: "Verified", className: cn(pos, boxClass) });
|
|
122
|
-
if (status != null) {
|
|
123
|
-
return /* @__PURE__ */ jsx(Indicator, { raised: true, bordered: true, color: status === "online" ? "success" : "neutral", label: STATUS[status].label, className: cn(pos, dotClass) });
|
|
124
|
-
}
|
|
125
|
-
if (count != null) return /* @__PURE__ */ jsx(Indicator, { count, bordered: true, className: cn(pos, boxClass) });
|
|
126
|
-
return null;
|
|
127
|
-
}
|
|
128
149
|
var FALLBACK_DELAY = 600;
|
|
129
150
|
function Avatar(props) {
|
|
130
151
|
const {
|
|
@@ -222,7 +243,20 @@ var OVERLAP = {
|
|
|
222
243
|
"2xl": { normal: "-ml-4", tight: "-ml-7" }
|
|
223
244
|
};
|
|
224
245
|
function AvatarGroup(props) {
|
|
225
|
-
const {
|
|
246
|
+
const {
|
|
247
|
+
max,
|
|
248
|
+
total,
|
|
249
|
+
size = "md",
|
|
250
|
+
shape = "circle",
|
|
251
|
+
spacing = "normal",
|
|
252
|
+
"aria-label": ariaLabel,
|
|
253
|
+
onReveal,
|
|
254
|
+
revealing = false,
|
|
255
|
+
labels,
|
|
256
|
+
children,
|
|
257
|
+
className
|
|
258
|
+
} = props;
|
|
259
|
+
const t = useLabels("avatar", AVATAR_LABELS, labels);
|
|
226
260
|
if (!ariaLabel) devWarn("<AvatarGroup> should have an `aria-label` to name the list of avatars.");
|
|
227
261
|
const items = React4.Children.toArray(children).filter(React4.isValidElement);
|
|
228
262
|
const limit = max != null ? Math.max(0, max) : items.length;
|
|
@@ -259,7 +293,7 @@ function AvatarGroup(props) {
|
|
|
259
293
|
/* @__PURE__ */ jsxs(
|
|
260
294
|
Popover.Trigger,
|
|
261
295
|
{
|
|
262
|
-
"aria-label":
|
|
296
|
+
"aria-label": t.showMore({ count: overflow }),
|
|
263
297
|
className: cn(
|
|
264
298
|
tile,
|
|
265
299
|
"cursor-pointer transition-colors duration-100 ease-linear outline-none hover:bg-quaternary focus-visible:ring-2 focus-visible:ring-focus-ring"
|
|
@@ -279,11 +313,11 @@ function AvatarGroup(props) {
|
|
|
279
313
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-24" })
|
|
280
314
|
] }, i)) : hidden.length > 0 ? hidden.map((child, i) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-2 rounded-md px-2 py-1.5", children: [
|
|
281
315
|
React4.cloneElement(child, { size: "sm", shape }),
|
|
282
|
-
/* @__PURE__ */ jsx("span", { className: "truncate text-secondary", children: child.props.name ??
|
|
283
|
-
] }, i)) : /* @__PURE__ */ jsx("li", { className: "px-2 py-1.5 text-tertiary", children:
|
|
316
|
+
/* @__PURE__ */ jsx("span", { className: "truncate text-secondary", children: child.props.name ?? t.unknownName })
|
|
317
|
+
] }, i)) : /* @__PURE__ */ jsx("li", { className: "px-2 py-1.5 text-tertiary", children: t.empty }) }) })
|
|
284
318
|
}
|
|
285
319
|
) }) })
|
|
286
|
-
] }) : /* @__PURE__ */ jsxs("span", { role: "img", "aria-label":
|
|
320
|
+
] }) : /* @__PURE__ */ jsxs("span", { role: "img", "aria-label": t.overflowCount({ count: overflow }), className: tile, children: [
|
|
287
321
|
"+",
|
|
288
322
|
overflow
|
|
289
323
|
] }) }) : null
|
|
@@ -483,5 +517,5 @@ function AvatarProfilePhoto(props) {
|
|
|
483
517
|
}
|
|
484
518
|
|
|
485
519
|
export { Avatar, AvatarAddButton, AvatarGroup, AvatarLabelGroup, AvatarProfilePhoto };
|
|
486
|
-
//# sourceMappingURL=chunk-
|
|
487
|
-
//# sourceMappingURL=chunk-
|
|
520
|
+
//# sourceMappingURL=chunk-ZHAT2XZ4.js.map
|
|
521
|
+
//# sourceMappingURL=chunk-ZHAT2XZ4.js.map
|