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,14 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { resolveActive, SidebarNavigation, linkMatches } from './chunk-UGBNYSBN.js';
|
|
2
|
+
import { Tabs } from './chunk-AIGYMTCU.js';
|
|
3
|
+
import { Drawer } from './chunk-MFFA5MXY.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-LE44X5GS.js.map
|
|
204
|
+
//# sourceMappingURL=chunk-LE44X5GS.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { warnPositiveInt } from './chunk-QDYE5LVT.js';
|
|
2
1
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
2
|
+
import { warnPositiveInt } from './chunk-QDYE5LVT.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -22,5 +22,5 @@ function SkeletonText({ lines = 3, size = "md", className }) {
|
|
|
22
22
|
SkeletonText.displayName = "SkeletonText";
|
|
23
23
|
|
|
24
24
|
export { SKELETON_WIDTHS, Skeleton, SkeletonText, skeletonWidth };
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-LLPWQDF7.js.map
|
|
26
|
+
//# sourceMappingURL=chunk-LLPWQDF7.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Illustration } from './chunk-OHUFNYGN.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useLinkResolver } from './chunk-5AZKP4KZ.js';
|
|
3
|
+
import { Button } from './chunk-OACWA4TC.js';
|
|
4
|
+
import { FG } from './chunk-MCQG4H6T.js';
|
|
4
5
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
5
6
|
import 'react';
|
|
6
7
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -33,13 +34,14 @@ var DESC_SIZE = {
|
|
|
33
34
|
md: "text-sm",
|
|
34
35
|
lg: "text-md"
|
|
35
36
|
};
|
|
36
|
-
function Callout({ title, description, icon, illustration,
|
|
37
|
+
function Callout({ title, description, icon, illustration, color = "neutral", size = "md", actions, className }) {
|
|
38
|
+
const resolveLink = useLinkResolver();
|
|
37
39
|
return /* @__PURE__ */ jsxs("div", { className: cn("mx-auto flex w-full max-w-md flex-col items-center justify-center text-center", ROOT_SIZE[size], className), children: [
|
|
38
40
|
illustration ? /* @__PURE__ */ jsx(Illustration, { type: illustration, size }) : null,
|
|
39
41
|
icon ? (
|
|
40
42
|
// The glyph is the component's own chrome, not a caller slot, so it is aria-hidden and
|
|
41
43
|
// does NOT go through <Slot>: the title already carries the accessible message.
|
|
42
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: cn("flex shrink-0 items-center justify-center", ICON_BOX[size], RAISED_BOX, RADIUS[size], GLYPH[
|
|
44
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: cn("flex shrink-0 items-center justify-center", ICON_BOX[size], RAISED_BOX, RADIUS[size], GLYPH[color]), children: icon })
|
|
43
45
|
) : null,
|
|
44
46
|
/* @__PURE__ */ jsxs("div", { className: "flex max-w-88 flex-col gap-1", children: [
|
|
45
47
|
/* @__PURE__ */ jsx("p", { className: cn("font-semibold text-primary", TITLE_SIZE[size]), children: title }),
|
|
@@ -52,7 +54,7 @@ function Callout({ title, description, icon, illustration, tone = "neutral", siz
|
|
|
52
54
|
variant: action.variant === "primary" ? "primary" : "secondary",
|
|
53
55
|
leading: action.leading,
|
|
54
56
|
onClick: action.onClick,
|
|
55
|
-
...action.href ? { render:
|
|
57
|
+
...action.href ? { render: resolveLink(action.href) } : null,
|
|
56
58
|
children: action.label
|
|
57
59
|
},
|
|
58
60
|
action.label
|
|
@@ -62,5 +64,5 @@ function Callout({ title, description, icon, illustration, tone = "neutral", siz
|
|
|
62
64
|
Callout.displayName = "Callout";
|
|
63
65
|
|
|
64
66
|
export { Callout };
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
66
|
-
//# sourceMappingURL=chunk-
|
|
67
|
+
//# sourceMappingURL=chunk-LQURV7HQ.js.map
|
|
68
|
+
//# sourceMappingURL=chunk-LQURV7HQ.js.map
|
|
@@ -2,13 +2,21 @@ import { tagSlotClass, tagLabelClass, tagContentClass, tagCloseClass, tagRootCla
|
|
|
2
2
|
import { overflowBounded } from './chunk-DWKILXHE.js';
|
|
3
3
|
import { Slot } from './chunk-52IFGFTL.js';
|
|
4
4
|
import { XIcon, CheckIcon } from './chunk-BLIZ3CL3.js';
|
|
5
|
-
import { warnNeedsName } from './chunk-QDYE5LVT.js';
|
|
6
5
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
6
|
+
import { useLabels } from './chunk-RJTVCA62.js';
|
|
7
|
+
import { warnNeedsName } from './chunk-QDYE5LVT.js';
|
|
7
8
|
import { Toggle } from '@base-ui/react/toggle';
|
|
8
9
|
import { ToggleGroup } from '@base-ui/react/toggle-group';
|
|
9
10
|
import * as React from 'react';
|
|
10
11
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
11
12
|
|
|
13
|
+
// src/components/tag/labels.ts
|
|
14
|
+
var TAG_LABELS = {
|
|
15
|
+
/** Names the remove button after the tag it removes, so a row of five is five distinct names. */
|
|
16
|
+
remove: (ctx) => `Remove ${ctx.label}`,
|
|
17
|
+
/** The fallback when the tag's children are a node, which has no text to name it with. */
|
|
18
|
+
removeGeneric: "Remove tag"
|
|
19
|
+
};
|
|
12
20
|
function TagCheckbox({ size }) {
|
|
13
21
|
return /* @__PURE__ */ jsx("span", { "aria-hidden": "true", "data-tag-checkbox": true, className: tagCheckboxBoxClass(size), children: /* @__PURE__ */ jsx(CheckIcon, { className: tagCheckboxGlyphClass(size) }) });
|
|
14
22
|
}
|
|
@@ -20,13 +28,15 @@ function Tag(props) {
|
|
|
20
28
|
trailing,
|
|
21
29
|
onRemove,
|
|
22
30
|
removeLabel,
|
|
31
|
+
labels,
|
|
23
32
|
removeExcludeFromTabOrder = false,
|
|
24
33
|
disabled = false,
|
|
25
34
|
overflow = "visible",
|
|
26
35
|
className,
|
|
27
36
|
...rest
|
|
28
37
|
} = props;
|
|
29
|
-
const
|
|
38
|
+
const t = useLabels("tag", TAG_LABELS, labels);
|
|
39
|
+
const label = removeLabel ?? (typeof children === "string" ? t.remove({ label: children }) : t.removeGeneric);
|
|
30
40
|
const bounded = overflowBounded(overflow);
|
|
31
41
|
return /* @__PURE__ */ jsxs(
|
|
32
42
|
"span",
|
|
@@ -166,5 +176,5 @@ TagGroupItem.displayName = "TagGroupItem";
|
|
|
166
176
|
var TagGroup = TagGroupRoot;
|
|
167
177
|
|
|
168
178
|
export { Tag, TagGroup };
|
|
169
|
-
//# sourceMappingURL=chunk-
|
|
170
|
-
//# sourceMappingURL=chunk-
|
|
179
|
+
//# sourceMappingURL=chunk-LYXPJERB.js.map
|
|
180
|
+
//# sourceMappingURL=chunk-LYXPJERB.js.map
|
|
@@ -38,6 +38,22 @@ var SUBTLE = {
|
|
|
38
38
|
error: "bg-utility-red-50 text-utility-red-700 ring-1 ring-inset ring-utility-red-200",
|
|
39
39
|
info: "bg-utility-blue-50 text-utility-blue-700 ring-1 ring-inset ring-utility-blue-200"
|
|
40
40
|
};
|
|
41
|
+
var FILL = {
|
|
42
|
+
neutral: "bg-secondary-solid",
|
|
43
|
+
brand: "bg-brand-solid",
|
|
44
|
+
success: "bg-success-solid",
|
|
45
|
+
warning: "bg-warning-solid",
|
|
46
|
+
error: "bg-error-solid",
|
|
47
|
+
info: "bg-utility-blue-500"
|
|
48
|
+
};
|
|
49
|
+
var WASH = {
|
|
50
|
+
neutral: "bg-secondary text-tertiary ring-1 ring-secondary ring-inset",
|
|
51
|
+
brand: "bg-brand-primary text-brand-secondary",
|
|
52
|
+
success: "bg-success-primary text-success-primary",
|
|
53
|
+
warning: "bg-warning-primary text-warning-primary",
|
|
54
|
+
error: "bg-error-primary text-utility-red-700",
|
|
55
|
+
info: "bg-utility-blue-50 text-utility-blue-600"
|
|
56
|
+
};
|
|
41
57
|
var OUTLINE = {
|
|
42
58
|
neutral: "bg-primary text-secondary ring-1 ring-inset ring-primary",
|
|
43
59
|
brand: "bg-primary text-utility-brand-700 ring-1 ring-inset ring-utility-brand-200",
|
|
@@ -54,6 +70,22 @@ var FG = {
|
|
|
54
70
|
error: "text-error-primary",
|
|
55
71
|
info: "text-utility-blue-600"
|
|
56
72
|
};
|
|
73
|
+
var FG_HOVER = {
|
|
74
|
+
neutral: "text-tertiary hover:text-secondary",
|
|
75
|
+
brand: "text-brand-secondary hover:text-brand-secondary_hover",
|
|
76
|
+
success: "text-success-primary hover:text-utility-green-700",
|
|
77
|
+
warning: "text-warning-primary hover:text-utility-amber-700",
|
|
78
|
+
error: "text-error-primary hover:text-utility-red-700",
|
|
79
|
+
info: "text-utility-blue-600 hover:text-utility-blue-700"
|
|
80
|
+
};
|
|
81
|
+
var WASH_HOVER = {
|
|
82
|
+
neutral: "hover:bg-secondary data-[loading]:bg-secondary",
|
|
83
|
+
brand: "hover:bg-brand-primary data-[loading]:bg-brand-primary",
|
|
84
|
+
success: "hover:bg-success-primary data-[loading]:bg-success-primary",
|
|
85
|
+
warning: "hover:bg-warning-primary data-[loading]:bg-warning-primary",
|
|
86
|
+
error: "hover:bg-error-primary data-[loading]:bg-error-primary",
|
|
87
|
+
info: "hover:bg-utility-blue-50 data-[loading]:bg-utility-blue-50"
|
|
88
|
+
};
|
|
57
89
|
var ACCENT = {
|
|
58
90
|
neutral: "text-utility-neutral-500",
|
|
59
91
|
brand: "text-utility-brand-500",
|
|
@@ -79,6 +111,6 @@ var DISMISS = {
|
|
|
79
111
|
info: "text-utility-blue-600 hover:text-utility-blue-700 hover:bg-utility-blue-100"
|
|
80
112
|
};
|
|
81
113
|
|
|
82
|
-
export { ACCENT, BOXED_BOX, BOX_RING, DISMISS, FG, GLYPH, OUTLINE, SEMANTIC_COLORS, SOLID, SOLID_BOX, SOLID_GLOSS, SOLID_HOVER, SUBTLE, isSemanticColor };
|
|
83
|
-
//# sourceMappingURL=chunk-
|
|
84
|
-
//# sourceMappingURL=chunk-
|
|
114
|
+
export { ACCENT, BOXED_BOX, BOX_RING, DISMISS, FG, FG_HOVER, FILL, GLYPH, OUTLINE, SEMANTIC_COLORS, SOLID, SOLID_BOX, SOLID_GLOSS, SOLID_HOVER, SUBTLE, WASH, WASH_HOVER, isSemanticColor };
|
|
115
|
+
//# sourceMappingURL=chunk-MCQG4H6T.js.map
|
|
116
|
+
//# sourceMappingURL=chunk-MCQG4H6T.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, BACKDROP_TREATMENT } from './chunk-QNIKRB62.js';
|
|
2
|
+
import { PanelChrome } from './chunk-CGZXQ7PA.js';
|
|
4
3
|
import { EXPLICIT_CLOSE } from './chunk-S7NNXWIN.js';
|
|
4
|
+
import { CloseButton } from './chunk-CGHYXWTT.js';
|
|
5
5
|
import { DRAWER_BACKDROP_MOTION, DRAWER_POPUP_MOTION, DRAWER_SLIDE } from './chunk-O4GRKO3I.js';
|
|
6
6
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
7
7
|
import { Drawer as Drawer$1 } from '@base-ui/react/drawer';
|
|
@@ -47,6 +47,7 @@ function Drawer(props) {
|
|
|
47
47
|
onOpenChange,
|
|
48
48
|
side = "right",
|
|
49
49
|
size = "md",
|
|
50
|
+
backdrop = "scrim",
|
|
50
51
|
showClose = true,
|
|
51
52
|
dividers = "line",
|
|
52
53
|
keepMounted = false,
|
|
@@ -83,7 +84,7 @@ function Drawer(props) {
|
|
|
83
84
|
children: [
|
|
84
85
|
trigger ? /* @__PURE__ */ jsx(Drawer$1.Trigger, { render: trigger }) : null,
|
|
85
86
|
/* @__PURE__ */ jsxs(Drawer$1.Portal, { keepMounted, container, children: [
|
|
86
|
-
/* @__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) }),
|
|
87
88
|
/* @__PURE__ */ jsx(Drawer$1.Viewport, { className: cn("pointer-events-none z-50", anchor, "inset-0"), children: /* @__PURE__ */ jsx(
|
|
88
89
|
PanelChrome,
|
|
89
90
|
{
|
|
@@ -127,5 +128,5 @@ function Drawer(props) {
|
|
|
127
128
|
Drawer.displayName = "Drawer";
|
|
128
129
|
|
|
129
130
|
export { Drawer };
|
|
130
|
-
//# sourceMappingURL=chunk-
|
|
131
|
-
//# sourceMappingURL=chunk-
|
|
131
|
+
//# sourceMappingURL=chunk-MFFA5MXY.js.map
|
|
132
|
+
//# sourceMappingURL=chunk-MFFA5MXY.js.map
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { SOLID } from './chunk-
|
|
2
|
-
import { SEAMLESS_DOT } from './chunk-
|
|
1
|
+
import { FILL, SOLID } from './chunk-MCQG4H6T.js';
|
|
2
|
+
import { SEAMLESS_DOT } from './chunk-7ZM7SNCZ.js';
|
|
3
3
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
var DOT_FILL = {
|
|
8
|
+
...FILL,
|
|
8
9
|
neutral: "bg-border-primary",
|
|
9
|
-
|
|
10
|
-
success: "bg-fg-success-secondary",
|
|
11
|
-
warning: "bg-warning-solid",
|
|
12
|
-
error: "bg-error-solid",
|
|
13
|
-
info: "bg-utility-blue-500"
|
|
10
|
+
success: "bg-fg-success-secondary"
|
|
14
11
|
};
|
|
15
12
|
var DOT_SIZE = { sm: "size-2", md: "size-2.5", lg: "size-3" };
|
|
16
13
|
var BOX_SIZE = { sm: "size-3.5", md: "size-4", lg: "size-5" };
|
|
@@ -111,5 +108,5 @@ function Indicator(props) {
|
|
|
111
108
|
Indicator.displayName = "Indicator";
|
|
112
109
|
|
|
113
110
|
export { Indicator };
|
|
114
|
-
//# sourceMappingURL=chunk-
|
|
115
|
-
//# sourceMappingURL=chunk-
|
|
111
|
+
//# sourceMappingURL=chunk-N3RVMBPX.js.map
|
|
112
|
+
//# sourceMappingURL=chunk-N3RVMBPX.js.map
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import { Tag } from './chunk-
|
|
2
|
-
import { useTagRow } from './chunk-
|
|
3
|
-
import { FieldShell } from './chunk-
|
|
1
|
+
import { Tag } from './chunk-LYXPJERB.js';
|
|
2
|
+
import { useTagRow } from './chunk-IEAWNA3V.js';
|
|
3
|
+
import { FieldShell } from './chunk-X2VMIBK5.js';
|
|
4
4
|
import { useIsomorphicLayoutEffect } from './chunk-EDSK6FEH.js';
|
|
5
|
-
import { CONTROL_TEXT, CONTROL_RADIUS, useFieldValidity, FieldFrame } from './chunk-
|
|
5
|
+
import { CONTROL_TEXT, CONTROL_RADIUS, useFieldValidity, FieldFrame } from './chunk-5KSD4WKN.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 { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
10
11
|
|
|
12
|
+
// src/components/tag-input/labels.ts
|
|
13
|
+
var TAG_INPUT_LABELS = {
|
|
14
|
+
/** Default behind the `placeholder` prop — the caller's own prop still wins. */
|
|
15
|
+
placeholder: "Add tag\u2026"
|
|
16
|
+
};
|
|
11
17
|
var SEPARATOR = {
|
|
12
18
|
enter: { key: "Enter", paste: "\n" },
|
|
13
19
|
comma: { key: ",", paste: "," },
|
|
@@ -166,9 +172,11 @@ function useTagInput(opts) {
|
|
|
166
172
|
}
|
|
167
173
|
var PILL_SIZE = { sm: "sm", md: "md", lg: "md" };
|
|
168
174
|
function TagInput(props) {
|
|
175
|
+
const t = useLabels("tagInput", TAG_INPUT_LABELS, props.labels);
|
|
169
176
|
const {
|
|
170
177
|
size = "md",
|
|
171
|
-
placeholder =
|
|
178
|
+
placeholder = t.placeholder,
|
|
179
|
+
labels: _labels,
|
|
172
180
|
label,
|
|
173
181
|
tooltip,
|
|
174
182
|
tooltipDescription,
|
|
@@ -264,6 +272,6 @@ function TagInput(props) {
|
|
|
264
272
|
);
|
|
265
273
|
}
|
|
266
274
|
|
|
267
|
-
export { TAG_PILL_FOCUS_RING, TagInput, useTagInput };
|
|
268
|
-
//# sourceMappingURL=chunk-
|
|
269
|
-
//# sourceMappingURL=chunk-
|
|
275
|
+
export { TAG_INPUT_LABELS, TAG_PILL_FOCUS_RING, TagInput, useTagInput };
|
|
276
|
+
//# sourceMappingURL=chunk-NC63TYNW.js.map
|
|
277
|
+
//# sourceMappingURL=chunk-NC63TYNW.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toUploadFile } from './chunk-
|
|
1
|
+
import { toUploadFile } from './chunk-HHYEAFCL.js';
|
|
2
2
|
import { warnPositiveInt, devWarn } from './chunk-QDYE5LVT.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
|
|
@@ -184,5 +184,5 @@ function useUploads({ transport, batchSize = 1, concurrency = 3 }) {
|
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
export { reduceUpload, splitBatchProgress, useUploads };
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
188
|
-
//# sourceMappingURL=chunk-
|
|
187
|
+
//# sourceMappingURL=chunk-NKG4N6HA.js.map
|
|
188
|
+
//# sourceMappingURL=chunk-NKG4N6HA.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { BOXED_BOX, BOX_RING, SOLID, SOLID_HOVER, SOLID_BOX, SOLID_GLOSS } from './chunk-
|
|
1
|
+
import { FG_HOVER, WASH_HOVER, BOXED_BOX, BOX_RING, SOLID, SOLID_HOVER, SOLID_BOX, SOLID_GLOSS } from './chunk-MCQG4H6T.js';
|
|
2
2
|
import { overflowClasses } from './chunk-DWKILXHE.js';
|
|
3
|
-
import { useSeamlessSlot, SEAMLESS_CONTROL, SEAMLESS_INHERIT_FG, SEAMLESS_FILL_COUPLED_FG } from './chunk-
|
|
3
|
+
import { useSeamlessSlot, SEAMLESS_CONTROL, SEAMLESS_INHERIT_FG, SEAMLESS_FILL_COUPLED_FG } from './chunk-7ZM7SNCZ.js';
|
|
4
4
|
import { Slot } from './chunk-52IFGFTL.js';
|
|
5
5
|
import { LoaderCircleIcon } from './chunk-BLIZ3CL3.js';
|
|
6
|
-
import { warnNeedsName } from './chunk-QDYE5LVT.js';
|
|
7
6
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
7
|
+
import { warnNeedsName } from './chunk-QDYE5LVT.js';
|
|
8
8
|
import { mergeProps } from '@base-ui/react/merge-props';
|
|
9
9
|
import { useRender } from '@base-ui/react/use-render';
|
|
10
10
|
import 'react';
|
|
@@ -13,40 +13,10 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
13
13
|
var BASE_CORE = "relative inline-flex items-center justify-center font-semibold cursor-pointer transition duration-100 ease-linear [&_svg]:shrink-0 [&_svg]:transition-colors [&_svg]:duration-100 [&_svg]:ease-linear";
|
|
14
14
|
var FOCUS_OUTSET = "outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2";
|
|
15
15
|
var FOCUS_INSET = "outline-focus-ring focus-visible:outline-2 focus-visible:-outline-offset-2";
|
|
16
|
-
var ICON_SOLID = "[&_svg]:text-fg-white/60 hover:[&_svg]:text-fg-white/70";
|
|
17
|
-
var BOX_ICON = {
|
|
18
|
-
neutral: "[&_svg]:text-fg-quaternary hover:[&_svg]:text-fg-quaternary_hover",
|
|
19
|
-
brand: "[&_svg]:text-fg-brand-secondary hover:[&_svg]:text-fg-brand-secondary_hover",
|
|
20
|
-
success: "[&_svg]:text-utility-green-500 hover:[&_svg]:text-utility-green-700",
|
|
21
|
-
warning: "[&_svg]:text-utility-amber-500 hover:[&_svg]:text-utility-amber-700",
|
|
22
|
-
error: "[&_svg]:text-fg-error-secondary hover:[&_svg]:text-error-primary",
|
|
23
|
-
info: "[&_svg]:text-utility-blue-500 hover:[&_svg]:text-utility-blue-700"
|
|
24
|
-
};
|
|
25
16
|
var FOCUS_TONE = { error: "outline-focus-ring-error" };
|
|
26
|
-
var SECONDARY_TEXT = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
success: "text-success-primary hover:text-utility-green-700",
|
|
30
|
-
warning: "text-warning-primary hover:text-utility-amber-700",
|
|
31
|
-
error: "text-error-primary hover:text-utility-red-700",
|
|
32
|
-
info: "text-utility-blue-600 hover:text-utility-blue-700"
|
|
33
|
-
};
|
|
34
|
-
var GHOST_TEXT = {
|
|
35
|
-
neutral: "text-tertiary hover:text-secondary",
|
|
36
|
-
brand: "text-brand-secondary hover:text-brand-secondary_hover",
|
|
37
|
-
success: "text-success-primary hover:text-utility-green-700",
|
|
38
|
-
warning: "text-warning-primary hover:text-utility-amber-700",
|
|
39
|
-
error: "text-error-primary hover:text-utility-red-700",
|
|
40
|
-
info: "text-utility-blue-600 hover:text-utility-blue-700"
|
|
41
|
-
};
|
|
42
|
-
var SOFT_WASH = {
|
|
43
|
-
neutral: "hover:bg-secondary data-[loading]:bg-secondary",
|
|
44
|
-
brand: "hover:bg-brand-primary data-[loading]:bg-brand-primary",
|
|
45
|
-
success: "hover:bg-success-primary data-[loading]:bg-success-primary",
|
|
46
|
-
warning: "hover:bg-warning-primary data-[loading]:bg-warning-primary",
|
|
47
|
-
error: "hover:bg-error-primary data-[loading]:bg-error-primary",
|
|
48
|
-
info: "hover:bg-utility-blue-50 data-[loading]:bg-utility-blue-50"
|
|
49
|
-
};
|
|
17
|
+
var SECONDARY_TEXT = { ...FG_HOVER, neutral: "text-secondary hover:text-secondary_hover" };
|
|
18
|
+
var GHOST_TEXT = FG_HOVER;
|
|
19
|
+
var SOFT_WASH = WASH_HOVER;
|
|
50
20
|
var LINK_BASE = "group justify-normal rounded-sm";
|
|
51
21
|
var DEFAULT_COLOR = {
|
|
52
22
|
primary: "brand",
|
|
@@ -57,28 +27,20 @@ var DEFAULT_COLOR = {
|
|
|
57
27
|
function variantClasses(variant, color) {
|
|
58
28
|
switch (variant) {
|
|
59
29
|
case "primary": {
|
|
60
|
-
return cn(SOLID[color], SOLID_HOVER[color], SOLID_BOX, FOCUS_TONE[color],
|
|
30
|
+
return cn(SOLID[color], SOLID_HOVER[color], SOLID_BOX, FOCUS_TONE[color], SOLID_GLOSS);
|
|
61
31
|
}
|
|
62
32
|
case "secondary": {
|
|
63
|
-
return cn(BOXED_BOX, BOX_RING[color], SECONDARY_TEXT[color], SOFT_WASH[color], FOCUS_TONE[color]
|
|
33
|
+
return cn(BOXED_BOX, BOX_RING[color], SECONDARY_TEXT[color], SOFT_WASH[color], FOCUS_TONE[color]);
|
|
64
34
|
}
|
|
65
35
|
case "tertiary": {
|
|
66
|
-
return cn(GHOST_TEXT[color], SOFT_WASH[color], FOCUS_TONE[color]
|
|
36
|
+
return cn(GHOST_TEXT[color], SOFT_WASH[color], FOCUS_TONE[color]);
|
|
67
37
|
}
|
|
68
38
|
case "link": {
|
|
69
|
-
return cn(LINK_BASE, GHOST_TEXT[color], FOCUS_TONE[color]
|
|
39
|
+
return cn(LINK_BASE, GHOST_TEXT[color], FOCUS_TONE[color]);
|
|
70
40
|
}
|
|
71
41
|
}
|
|
72
42
|
}
|
|
73
|
-
var
|
|
74
|
-
var LINK_LABEL = {
|
|
75
|
-
neutral: cn(LINK_LABEL_BASE, "group-hover:decoration-fg-quaternary"),
|
|
76
|
-
brand: cn(LINK_LABEL_BASE, "group-hover:decoration-fg-brand-secondary"),
|
|
77
|
-
success: cn(LINK_LABEL_BASE, "underline-offset-2 group-hover:decoration-current"),
|
|
78
|
-
warning: cn(LINK_LABEL_BASE, "underline-offset-2 group-hover:decoration-current"),
|
|
79
|
-
error: cn(LINK_LABEL_BASE, "underline-offset-2 group-hover:decoration-current"),
|
|
80
|
-
info: cn(LINK_LABEL_BASE, "underline-offset-2 group-hover:decoration-current")
|
|
81
|
-
};
|
|
43
|
+
var LINK_LABEL = cn("underline decoration-transparent transition-colors duration-100 ease-linear", "underline-offset-2 group-hover:decoration-current");
|
|
82
44
|
var XS_ICON = "[&>svg]:size-4 [&>svg]:[stroke-width:2.25px]";
|
|
83
45
|
var SLOT_ICON = {
|
|
84
46
|
xs: "[&>svg]:size-4 [&>svg]:[stroke-width:2.25px]",
|
|
@@ -169,7 +131,7 @@ function Button(props) {
|
|
|
169
131
|
fullWidth && "w-full",
|
|
170
132
|
className
|
|
171
133
|
);
|
|
172
|
-
const label = iconOnly ? /* @__PURE__ */ jsx("span", { className: "sr-only", children }) : isLinkType ? /* @__PURE__ */ jsx("span", { className: cn(LINK_LABEL
|
|
134
|
+
const label = iconOnly ? /* @__PURE__ */ jsx("span", { className: "sr-only", children }) : isLinkType ? /* @__PURE__ */ jsx("span", { className: cn(LINK_LABEL, ovf.label, hideContent && "invisible"), children }) : /* @__PURE__ */ jsx("span", { className: cn(!noTextPadding && "px-0.5", ovf.label, hideContent && "invisible"), children });
|
|
173
135
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
174
136
|
inlineSpinner ? /* @__PURE__ */ jsx(Glyph, { children: /* @__PURE__ */ jsx(LoaderCircleIcon, { className: cn(SPINNER_SIZE[effSize], "animate-spin") }) }) : leading ? /* @__PURE__ */ jsx(Slot, { className: cn(SLOT_ICON[effSize], hideContent && "invisible"), children: leading }) : null,
|
|
175
137
|
hideContent ? /* @__PURE__ */ jsx(LoaderCircleIcon, { className: cn(SPINNER_SIZE[effSize], "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 animate-spin") }) : null,
|
|
@@ -196,5 +158,5 @@ function Button(props) {
|
|
|
196
158
|
}
|
|
197
159
|
|
|
198
160
|
export { Button };
|
|
199
|
-
//# sourceMappingURL=chunk-
|
|
200
|
-
//# sourceMappingURL=chunk-
|
|
161
|
+
//# sourceMappingURL=chunk-OACWA4TC.js.map
|
|
162
|
+
//# sourceMappingURL=chunk-OACWA4TC.js.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { seriesColor, useSeriesColors, paletteLength } from './chunk-22M75A3N.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
function usePolarData(component, data, palette) {
|
|
5
|
-
const resolve = React.useCallback((i) =>
|
|
6
|
-
const colors = useSeriesColors(component, data.length, resolve);
|
|
5
|
+
const resolve = React.useCallback((i) => seriesColor(data[i]?.color, i, palette), [data, palette]);
|
|
6
|
+
const colors = useSeriesColors(component, data.length, resolve, paletteLength(palette));
|
|
7
7
|
return React.useMemo(() => {
|
|
8
8
|
const rows = [];
|
|
9
9
|
const legendItems = [];
|
|
10
10
|
const colorMap = {};
|
|
11
11
|
const labelMap = {};
|
|
12
12
|
for (const [i, datum] of data.entries()) {
|
|
13
|
-
const
|
|
14
|
-
rows.push({ name: datum.label, value: datum.value,
|
|
15
|
-
legendItems.push({ label: datum.label,
|
|
16
|
-
colorMap[datum.label] =
|
|
13
|
+
const color = colors[i] ?? "";
|
|
14
|
+
rows.push({ name: datum.label, value: datum.value, style: { color } });
|
|
15
|
+
legendItems.push({ label: datum.label, color });
|
|
16
|
+
colorMap[datum.label] = color;
|
|
17
17
|
labelMap[datum.label] = datum.label;
|
|
18
18
|
}
|
|
19
19
|
return { rows, legendItems, colorMap, labelMap };
|
|
@@ -29,5 +29,5 @@ function resolveMax(max, values) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export { resolveMax, usePolarData };
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
33
|
-
//# sourceMappingURL=chunk-
|
|
32
|
+
//# sourceMappingURL=chunk-OLLD2BZN.js.map
|
|
33
|
+
//# sourceMappingURL=chunk-OLLD2BZN.js.map
|