jenosize-ui 0.1.0

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.
Files changed (182) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +100 -0
  3. package/THIRD-PARTY-NOTICES.md +163 -0
  4. package/dist/Button-Bt7pzM4R.d.ts +82 -0
  5. package/dist/PaymentInput-CKPIPNWH.d.ts +141 -0
  6. package/dist/Select-CVbEQ2Ep.d.ts +118 -0
  7. package/dist/TagInput-CTJYOB4J.d.ts +90 -0
  8. package/dist/avatar.d.ts +161 -0
  9. package/dist/avatar.js +11 -0
  10. package/dist/badge.d.ts +109 -0
  11. package/dist/badge.js +10 -0
  12. package/dist/breadcrumb.d.ts +58 -0
  13. package/dist/breadcrumb.js +7 -0
  14. package/dist/button.d.ts +54 -0
  15. package/dist/button.js +14 -0
  16. package/dist/calendar.d.ts +368 -0
  17. package/dist/calendar.js +21 -0
  18. package/dist/callout.d.ts +70 -0
  19. package/dist/callout.js +16 -0
  20. package/dist/card-nWicloNi.d.ts +80 -0
  21. package/dist/card.d.ts +2 -0
  22. package/dist/card.js +7 -0
  23. package/dist/checkbox.d.ts +133 -0
  24. package/dist/checkbox.js +11 -0
  25. package/dist/chunk-24TO7E32.js +42 -0
  26. package/dist/chunk-3Y5X7B5C.js +146 -0
  27. package/dist/chunk-4OLULPQG.js +202 -0
  28. package/dist/chunk-4P2NBLBW.js +103 -0
  29. package/dist/chunk-52IFGFTL.js +11 -0
  30. package/dist/chunk-5FATN5YD.js +115 -0
  31. package/dist/chunk-5NOBSXJN.js +297 -0
  32. package/dist/chunk-5RAPA22E.js +106 -0
  33. package/dist/chunk-7EUAMHMU.js +16 -0
  34. package/dist/chunk-7EWQKTNQ.js +1336 -0
  35. package/dist/chunk-7HOIZ3UO.js +110 -0
  36. package/dist/chunk-7IU5TMFL.js +452 -0
  37. package/dist/chunk-7JBNLEJ7.js +29 -0
  38. package/dist/chunk-7S2TBALK.js +23 -0
  39. package/dist/chunk-BJUZVYQC.js +188 -0
  40. package/dist/chunk-BVJWBYIG.js +66 -0
  41. package/dist/chunk-CME4DIML.js +65 -0
  42. package/dist/chunk-CYPPEUX5.js +73 -0
  43. package/dist/chunk-D5BTFSL7.js +71 -0
  44. package/dist/chunk-D6TPWNRK.js +387 -0
  45. package/dist/chunk-DJSXIAFH.js +66 -0
  46. package/dist/chunk-DRZCJCBO.js +46 -0
  47. package/dist/chunk-DWKILXHE.js +17 -0
  48. package/dist/chunk-E7ZSWBAK.js +70 -0
  49. package/dist/chunk-EDSK6FEH.js +8 -0
  50. package/dist/chunk-F2K7VJUV.js +114 -0
  51. package/dist/chunk-F6NLE6XJ.js +40 -0
  52. package/dist/chunk-FHHAPGCR.js +32 -0
  53. package/dist/chunk-FXIBGTS5.js +14 -0
  54. package/dist/chunk-GCVA3OIV.js +72 -0
  55. package/dist/chunk-GFOAJVW5.js +336 -0
  56. package/dist/chunk-GRLSUQQE.js +136 -0
  57. package/dist/chunk-GTHJWR3Q.js +77 -0
  58. package/dist/chunk-HMUZE6EK.js +67 -0
  59. package/dist/chunk-I7WU4GTY.js +503 -0
  60. package/dist/chunk-J2BCKBHC.js +151 -0
  61. package/dist/chunk-J36M3KRX.js +1315 -0
  62. package/dist/chunk-J7ZQQFPT.js +113 -0
  63. package/dist/chunk-JP26LPCY.js +234 -0
  64. package/dist/chunk-JTNFJLIY.js +1046 -0
  65. package/dist/chunk-JVJRHBTD.js +50 -0
  66. package/dist/chunk-JYGR44ZC.js +133 -0
  67. package/dist/chunk-KDLPXXD2.js +173 -0
  68. package/dist/chunk-KMSYEE23.js +224 -0
  69. package/dist/chunk-KNYKWUYX.js +52 -0
  70. package/dist/chunk-LME57Z6J.js +138 -0
  71. package/dist/chunk-MFJP5FA7.js +20 -0
  72. package/dist/chunk-MKC5HNA7.js +1692 -0
  73. package/dist/chunk-MQGD2OUF.js +39 -0
  74. package/dist/chunk-MUFHLP4S.js +566 -0
  75. package/dist/chunk-O2LG3PNI.js +74 -0
  76. package/dist/chunk-O4GRKO3I.js +66 -0
  77. package/dist/chunk-OHUFNYGN.js +791 -0
  78. package/dist/chunk-PWKWNDBS.js +243 -0
  79. package/dist/chunk-QA74ITR4.js +103 -0
  80. package/dist/chunk-R6RGJF4L.js +170 -0
  81. package/dist/chunk-S7NNXWIN.js +7 -0
  82. package/dist/chunk-SV56BSUQ.js +162 -0
  83. package/dist/chunk-T7FCG7XV.js +435 -0
  84. package/dist/chunk-THC2ISYP.js +57 -0
  85. package/dist/chunk-VWC72TR3.js +115 -0
  86. package/dist/chunk-W46K56XU.js +216 -0
  87. package/dist/chunk-W5GGOUUI.js +75 -0
  88. package/dist/chunk-WEUJYDCV.js +269 -0
  89. package/dist/chunk-WFY7DKQD.js +279 -0
  90. package/dist/chunk-WZQFC7ZN.js +448 -0
  91. package/dist/chunk-Z3ETJN5G.js +136 -0
  92. package/dist/chunk-ZOOX3TUB.js +192 -0
  93. package/dist/chunk-ZSNJ6UA3.js +42 -0
  94. package/dist/chunk-ZZA2LUTL.js +130 -0
  95. package/dist/chunk-ZZT2E5VT.js +24 -0
  96. package/dist/color-CtSxc1Rh.d.ts +6 -0
  97. package/dist/combobox.d.ts +184 -0
  98. package/dist/combobox.js +21 -0
  99. package/dist/date-input.d.ts +83 -0
  100. package/dist/date-input.js +16 -0
  101. package/dist/date-picker.d.ts +249 -0
  102. package/dist/date-picker.js +29 -0
  103. package/dist/date-utils-7hTFTXNK.d.ts +34 -0
  104. package/dist/date-vMJBKAFK.d.ts +22 -0
  105. package/dist/dialog.d.ts +86 -0
  106. package/dist/dialog.js +15 -0
  107. package/dist/drawer.d.ts +77 -0
  108. package/dist/drawer.js +14 -0
  109. package/dist/dropdown-menu.d.ts +218 -0
  110. package/dist/dropdown-menu.js +10 -0
  111. package/dist/file-trigger.d.ts +42 -0
  112. package/dist/file-trigger.js +3 -0
  113. package/dist/form.d.ts +487 -0
  114. package/dist/form.js +1179 -0
  115. package/dist/header-navigation.d.ts +74 -0
  116. package/dist/header-navigation.js +23 -0
  117. package/dist/icons/app.d.ts +48 -0
  118. package/dist/icons/app.js +282 -0
  119. package/dist/icons/flag.d.ts +817 -0
  120. package/dist/icons/flag.js +58336 -0
  121. package/dist/icons/integration.d.ts +36 -0
  122. package/dist/icons/integration.js +531 -0
  123. package/dist/icons/payment.d.ts +116 -0
  124. package/dist/icons/payment.js +2418 -0
  125. package/dist/icons.d.ts +2013 -0
  126. package/dist/icons.js +2012 -0
  127. package/dist/illustration.d.ts +48 -0
  128. package/dist/illustration.js +4 -0
  129. package/dist/index.d.ts +68 -0
  130. package/dist/index.js +73 -0
  131. package/dist/indicator.d.ts +51 -0
  132. package/dist/indicator.js +7 -0
  133. package/dist/input.d.ts +66 -0
  134. package/dist/input.js +15 -0
  135. package/dist/multi-value-CJb_tnvi.d.ts +8 -0
  136. package/dist/nav-Bla0o_-1.d.ts +98 -0
  137. package/dist/number-input.d.ts +80 -0
  138. package/dist/number-input.js +15 -0
  139. package/dist/options-CPEIgjtd.d.ts +68 -0
  140. package/dist/overflow-Df0h42Oi.d.ts +29 -0
  141. package/dist/pagination.d.ts +77 -0
  142. package/dist/pagination.js +17 -0
  143. package/dist/payment-input.d.ts +7 -0
  144. package/dist/payment-input.js +15 -0
  145. package/dist/popover.d.ts +60 -0
  146. package/dist/popover.js +14 -0
  147. package/dist/progress.d.ts +87 -0
  148. package/dist/progress.js +5 -0
  149. package/dist/radio.d.ts +77 -0
  150. package/dist/radio.js +12 -0
  151. package/dist/select.d.ts +68 -0
  152. package/dist/select.js +24 -0
  153. package/dist/shared-BNXAdgh2.d.ts +9 -0
  154. package/dist/shared-BYXJPnsN.d.ts +11 -0
  155. package/dist/shared-Dc-GgA16.d.ts +42 -0
  156. package/dist/sidebar-navigation.d.ts +129 -0
  157. package/dist/sidebar-navigation.js +15 -0
  158. package/dist/styles.css +2 -0
  159. package/dist/switch.d.ts +23 -0
  160. package/dist/switch.js +7 -0
  161. package/dist/table.d.ts +692 -0
  162. package/dist/table.js +44 -0
  163. package/dist/tabs.d.ts +111 -0
  164. package/dist/tabs.js +8 -0
  165. package/dist/tag-input.d.ts +12 -0
  166. package/dist/tag-input.js +19 -0
  167. package/dist/tag.d.ts +98 -0
  168. package/dist/tag.js +9 -0
  169. package/dist/textarea.d.ts +40 -0
  170. package/dist/textarea.js +12 -0
  171. package/dist/theme-script.d.ts +29 -0
  172. package/dist/theme-script.js +15 -0
  173. package/dist/theme.css +929 -0
  174. package/dist/theme.d.ts +71 -0
  175. package/dist/theme.js +15 -0
  176. package/dist/toast.d.ts +242 -0
  177. package/dist/toast.js +15 -0
  178. package/dist/tooltip.d.ts +70 -0
  179. package/dist/tooltip.js +6 -0
  180. package/dist/tree.d.ts +308 -0
  181. package/dist/tree.js +11 -0
  182. package/package.json +352 -0
@@ -0,0 +1,188 @@
1
+ import { Tabs } from './chunk-4OLULPQG.js';
2
+ import { Drawer } from './chunk-Z3ETJN5G.js';
3
+ import { resolveActive, SidebarNavigation, linkMatches } from './chunk-7IU5TMFL.js';
4
+ import { ButtonUtility } from './chunk-JVJRHBTD.js';
5
+ import { Slot } from './chunk-52IFGFTL.js';
6
+ import { MenuIcon } from './chunk-24TO7E32.js';
7
+ import { cn } from './chunk-ZSNJ6UA3.js';
8
+ import 'react';
9
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
10
+
11
+ var HEADER_BASE = "w-full bg-primary";
12
+ var TIER = "flex w-full items-center gap-4 px-4 md:px-6";
13
+ var TIER_1 = cn(TIER, "h-16");
14
+ var TIER_2 = cn(TIER, "h-16 border-t border-secondary");
15
+ var TIER_2_TABS = "w-full px-4 md:px-6";
16
+ var DIVIDER = "border-b border-secondary";
17
+ var STICKY = "sticky top-0 z-20";
18
+ var ROW_BASE = "flex cursor-pointer items-center gap-1.5 rounded-lg px-2 py-1.5 text-sm whitespace-nowrap outline-focus-ring transition-colors duration-100 ease-linear select-none focus-visible:z-10 focus-visible:outline-2 focus-visible:outline-offset-2";
19
+ var ROW_IDLE = "font-medium text-secondary hover:bg-ghost-hover hover:text-secondary_hover";
20
+ var ROW_CURRENT = "bg-brand-primary font-semibold text-brand-secondary hover:bg-utility-brand-100";
21
+ var ROW_DISABLED = "cursor-not-allowed opacity-50";
22
+ var ROW_SLOT = "[&>svg]:size-5";
23
+ function NavRow({
24
+ link,
25
+ current,
26
+ onNavigate
27
+ }) {
28
+ const className = cn(ROW_BASE, current ? ROW_CURRENT : ROW_IDLE, link.disabled && ROW_DISABLED, link.className);
29
+ const onClick = (event) => {
30
+ if (link.disabled) {
31
+ event.preventDefault();
32
+ return;
33
+ }
34
+ onNavigate?.(link, event);
35
+ link.onClick?.(event);
36
+ };
37
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
38
+ link.leading != null ? /* @__PURE__ */ jsx(Slot, { className: ROW_SLOT, children: link.leading }) : null,
39
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: link.label }),
40
+ link.trailing != null ? /* @__PURE__ */ jsx(Slot, { className: ROW_SLOT, children: link.trailing }) : null
41
+ ] });
42
+ if (link.href && !link.disabled) {
43
+ return /* @__PURE__ */ jsx("a", { href: link.href, "aria-current": current ? "page" : void 0, onClick, className, children: content });
44
+ }
45
+ return /* @__PURE__ */ jsx("button", { type: "button", disabled: link.disabled, "aria-current": current ? "page" : void 0, onClick, className, children: content });
46
+ }
47
+ function NavRowList({
48
+ links,
49
+ activeHref,
50
+ currentHref,
51
+ onNavigate,
52
+ ariaLabel,
53
+ className
54
+ }) {
55
+ return /* @__PURE__ */ jsx("nav", { "aria-label": ariaLabel, className, children: /* @__PURE__ */ jsx("ul", { className: "scrollbar-none flex items-center gap-0.5 overflow-x-auto", children: links.map((link) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
56
+ NavRow,
57
+ {
58
+ link,
59
+ current: link.href != null && (link.href === currentHref || activeHref != null && linkMatches(activeHref, link)),
60
+ onNavigate
61
+ }
62
+ ) }, link.label)) }) });
63
+ }
64
+ function HeaderNavigation(props) {
65
+ const {
66
+ items,
67
+ activeHref,
68
+ onNavigate,
69
+ logo,
70
+ logoHref,
71
+ actions,
72
+ secondary = "buttons",
73
+ subItems,
74
+ secondaryActions,
75
+ align = "start",
76
+ divider = true,
77
+ sticky = false,
78
+ mobile = "sheet",
79
+ className
80
+ } = props;
81
+ const ariaLabel = props["aria-label"] ?? "Main";
82
+ const { current, trail } = resolveActive(items, activeHref);
83
+ const activeTop = current && items.includes(current) ? current : items.find((item) => trail.has(item)) ?? null;
84
+ const tier2 = subItems ?? activeTop?.items ?? [];
85
+ const showTier2 = secondary !== "none" && tier2.length > 0;
86
+ const tier2Label = subItems ? "Secondary" : activeTop?.label ?? "Secondary";
87
+ const currentHref = current?.href ?? null;
88
+ const tabItems = tier2.map((link) => ({
89
+ value: link.href ?? link.label,
90
+ label: link.label,
91
+ leading: link.leading,
92
+ trailing: link.trailing,
93
+ disabled: link.disabled
94
+ }));
95
+ const activeTabValue = tabItems.find((tab) => tab.value === currentHref)?.value;
96
+ return /* @__PURE__ */ jsxs(
97
+ "header",
98
+ {
99
+ className: cn(
100
+ HEADER_BASE,
101
+ divider && DIVIDER,
102
+ sticky && STICKY,
103
+ // Tier 1's height, handed to a pinned `Tabs` strip so it docks BELOW the bar instead of at
104
+ // the viewport's top edge. Set here because only the header knows its own height — which
105
+ // is the whole reason that var exists rather than a prop.
106
+ sticky && showTier2 && secondary === "tabs" && "[--tabs-sticky-top:4rem]",
107
+ className
108
+ ),
109
+ children: [
110
+ /* @__PURE__ */ jsxs("div", { className: TIER_1, children: [
111
+ mobile === "sheet" ? (
112
+ // Below `lg` the chip row cannot fit, so the same items go into a sheet. Drawer owns the
113
+ // open state through its `trigger`; this component adds none of its own.
114
+ /* @__PURE__ */ jsx("div", { className: "lg:hidden", children: /* @__PURE__ */ jsx(
115
+ Drawer,
116
+ {
117
+ side: "left",
118
+ size: "sm",
119
+ "aria-label": ariaLabel,
120
+ trigger: /* @__PURE__ */ jsx(ButtonUtility, { variant: "tertiary", size: "sm", icon: /* @__PURE__ */ jsx(MenuIcon, {}), tooltip: "Open navigation", tooltipSide: "bottom" }),
121
+ children: /* @__PURE__ */ jsx(SidebarNavigation, { items, activeHref, onNavigate, "aria-label": ariaLabel })
122
+ }
123
+ ) })
124
+ ) : null,
125
+ logo != null ? /* @__PURE__ */ jsx("div", { className: cn("flex shrink-0 items-center", align === "center" && "flex-1"), children: logoHref ? /* @__PURE__ */ jsx(
126
+ "a",
127
+ {
128
+ href: logoHref,
129
+ "aria-label": "Go to homepage",
130
+ className: "flex items-center rounded-md outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2",
131
+ children: logo
132
+ }
133
+ ) : logo }) : null,
134
+ /* @__PURE__ */ jsx(
135
+ NavRowList,
136
+ {
137
+ links: items,
138
+ activeHref,
139
+ currentHref,
140
+ onNavigate,
141
+ ariaLabel,
142
+ className: cn("hidden min-w-0 lg:block", align === "center" && "lg:flex lg:justify-center")
143
+ }
144
+ ),
145
+ actions != null ? /* @__PURE__ */ jsx("div", { className: cn("flex shrink-0 items-center gap-2", align === "center" ? "flex-1 justify-end" : "ml-auto"), children: actions }) : align === "center" ? (
146
+ // Keeps a centered nav centred when there are no actions to balance the logo.
147
+ /* @__PURE__ */ jsx("div", { className: "flex-1" })
148
+ ) : null
149
+ ] }),
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: TIER_2, children: [
167
+ /* @__PURE__ */ jsx(
168
+ NavRowList,
169
+ {
170
+ links: tier2,
171
+ activeHref,
172
+ currentHref,
173
+ onNavigate,
174
+ ariaLabel: tier2Label,
175
+ className: "hidden min-w-0 lg:block"
176
+ }
177
+ ),
178
+ secondaryActions != null ? /* @__PURE__ */ jsx("div", { className: "ml-auto hidden shrink-0 items-center gap-2 lg:flex", children: secondaryActions }) : null
179
+ ] }) : null
180
+ ]
181
+ }
182
+ );
183
+ }
184
+ HeaderNavigation.displayName = "HeaderNavigation";
185
+
186
+ export { HeaderNavigation };
187
+ //# sourceMappingURL=chunk-BJUZVYQC.js.map
188
+ //# sourceMappingURL=chunk-BJUZVYQC.js.map
@@ -0,0 +1,66 @@
1
+ import { Illustration } from './chunk-OHUFNYGN.js';
2
+ import { Button } from './chunk-W46K56XU.js';
3
+ import { FG } from './chunk-CME4DIML.js';
4
+ import { cn } from './chunk-ZSNJ6UA3.js';
5
+ import 'react';
6
+ import { jsxs, jsx } from 'react/jsx-runtime';
7
+
8
+ var ROOT_SIZE = {
9
+ sm: "gap-3 px-6 py-10",
10
+ md: "gap-4 px-8 py-16",
11
+ lg: "gap-5 px-8 py-20"
12
+ };
13
+ var ICON_BOX = {
14
+ sm: "size-10 [&>svg]:size-5",
15
+ md: "size-12 [&>svg]:size-6",
16
+ lg: "size-14 [&>svg]:size-7"
17
+ };
18
+ var RAISED_BOX = "bg-primary_alt shadow-skeuomorphic ring-1 ring-inset ring-primary";
19
+ var RADIUS = {
20
+ sm: "rounded-lg",
21
+ md: "rounded-[10px]",
22
+ lg: "rounded-xl"
23
+ };
24
+ var GLYPH = { ...FG, neutral: "text-secondary" };
25
+ var ACTION_SIZE = { sm: "sm", md: "md", lg: "lg" };
26
+ var TITLE_SIZE = {
27
+ sm: "text-sm",
28
+ md: "text-md",
29
+ lg: "text-lg"
30
+ };
31
+ var DESC_SIZE = {
32
+ sm: "text-xs",
33
+ md: "text-sm",
34
+ lg: "text-md"
35
+ };
36
+ function Callout({ title, description, icon, illustration, tone = "neutral", size = "md", actions, className }) {
37
+ 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
+ illustration ? /* @__PURE__ */ jsx(Illustration, { type: illustration, size }) : null,
39
+ icon ? (
40
+ // The glyph is the component's own chrome, not a caller slot, so it is aria-hidden and
41
+ // 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[tone]), children: icon })
43
+ ) : null,
44
+ /* @__PURE__ */ jsxs("div", { className: "flex max-w-88 flex-col gap-1", children: [
45
+ /* @__PURE__ */ jsx("p", { className: cn("font-semibold text-primary", TITLE_SIZE[size]), children: title }),
46
+ description ? /* @__PURE__ */ jsx("p", { className: cn("text-tertiary", DESC_SIZE[size]), children: description }) : null
47
+ ] }),
48
+ actions && actions.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center justify-center gap-3", children: actions.map((action) => /* @__PURE__ */ jsx(
49
+ Button,
50
+ {
51
+ size: ACTION_SIZE[size],
52
+ variant: action.variant === "primary" ? "primary" : "secondary",
53
+ leading: action.leading,
54
+ onClick: action.onClick,
55
+ ...action.href ? { render: /* @__PURE__ */ jsx("a", { href: action.href }) } : null,
56
+ children: action.label
57
+ },
58
+ action.label
59
+ )) }) : null
60
+ ] });
61
+ }
62
+ Callout.displayName = "Callout";
63
+
64
+ export { Callout };
65
+ //# sourceMappingURL=chunk-BVJWBYIG.js.map
66
+ //# sourceMappingURL=chunk-BVJWBYIG.js.map
@@ -0,0 +1,65 @@
1
+ // src/lib/color.ts
2
+ var SEMANTIC_COLORS = ["neutral", "brand", "success", "warning", "error", "info"];
3
+ function isSemanticColor(x) {
4
+ return typeof x === "string" && SEMANTIC_COLORS.includes(x);
5
+ }
6
+ var SOLID = {
7
+ neutral: "bg-secondary-solid text-fg-white",
8
+ brand: "bg-brand-solid text-fg-white",
9
+ success: "bg-success-solid text-fg-white",
10
+ warning: "bg-warning-solid text-fg-white",
11
+ error: "bg-error-solid text-fg-white",
12
+ info: "bg-utility-blue-600 text-fg-white"
13
+ };
14
+ var SOLID_HOVER = {
15
+ neutral: "hover:bg-secondary-solid_hover data-[loading]:bg-secondary-solid_hover",
16
+ brand: "hover:bg-brand-solid_hover data-[loading]:bg-brand-solid_hover",
17
+ success: "hover:bg-success-solid_hover data-[loading]:bg-success-solid_hover",
18
+ warning: "hover:bg-warning-solid_hover data-[loading]:bg-warning-solid_hover",
19
+ error: "hover:bg-error-solid_hover data-[loading]:bg-error-solid_hover",
20
+ info: "hover:bg-utility-blue-700 data-[loading]:bg-utility-blue-700"
21
+ };
22
+ var SUBTLE = {
23
+ neutral: "bg-utility-neutral-50 text-utility-neutral-700 ring-1 ring-inset ring-utility-neutral-200",
24
+ brand: "bg-utility-brand-50 text-utility-brand-700 ring-1 ring-inset ring-utility-brand-200",
25
+ success: "bg-utility-green-50 text-utility-green-700 ring-1 ring-inset ring-utility-green-200",
26
+ warning: "bg-utility-amber-50 text-utility-amber-700 ring-1 ring-inset ring-utility-amber-200",
27
+ error: "bg-utility-red-50 text-utility-red-700 ring-1 ring-inset ring-utility-red-200",
28
+ info: "bg-utility-blue-50 text-utility-blue-700 ring-1 ring-inset ring-utility-blue-200"
29
+ };
30
+ var OUTLINE = {
31
+ neutral: "bg-primary text-secondary ring-1 ring-inset ring-primary",
32
+ brand: "bg-primary text-utility-brand-700 ring-1 ring-inset ring-utility-brand-200",
33
+ success: "bg-primary text-utility-green-700 ring-1 ring-inset ring-utility-green-200",
34
+ warning: "bg-primary text-utility-amber-700 ring-1 ring-inset ring-utility-amber-200",
35
+ error: "bg-primary text-utility-red-700 ring-1 ring-inset ring-utility-red-200",
36
+ info: "bg-primary text-utility-blue-700 ring-1 ring-inset ring-utility-blue-200"
37
+ };
38
+ var FG = {
39
+ neutral: "text-tertiary",
40
+ brand: "text-brand-secondary",
41
+ success: "text-success-primary",
42
+ warning: "text-warning-primary",
43
+ error: "text-error-primary",
44
+ info: "text-utility-blue-600"
45
+ };
46
+ var ACCENT = {
47
+ neutral: "text-utility-neutral-500",
48
+ brand: "text-utility-brand-500",
49
+ success: "text-utility-green-500",
50
+ warning: "text-utility-amber-500",
51
+ error: "text-utility-red-500",
52
+ info: "text-utility-blue-500"
53
+ };
54
+ var DISMISS = {
55
+ neutral: "text-utility-neutral-600 hover:text-utility-neutral-700 hover:bg-utility-neutral-100",
56
+ brand: "text-utility-brand-600 hover:text-utility-brand-700 hover:bg-utility-brand-100",
57
+ success: "text-utility-green-600 hover:text-utility-green-700 hover:bg-utility-green-100",
58
+ warning: "text-utility-amber-600 hover:text-utility-amber-700 hover:bg-utility-amber-100",
59
+ error: "text-utility-red-600 hover:text-utility-red-700 hover:bg-utility-red-100",
60
+ info: "text-utility-blue-600 hover:text-utility-blue-700 hover:bg-utility-blue-100"
61
+ };
62
+
63
+ export { ACCENT, DISMISS, FG, OUTLINE, SEMANTIC_COLORS, SOLID, SOLID_HOVER, SUBTLE, isSemanticColor };
64
+ //# sourceMappingURL=chunk-CME4DIML.js.map
65
+ //# sourceMappingURL=chunk-CME4DIML.js.map
@@ -0,0 +1,73 @@
1
+ import { PanelChrome } from './chunk-J7ZQQFPT.js';
2
+ import { CloseButton } from './chunk-MQGD2OUF.js';
3
+ import { useScrollFade } from './chunk-O2LG3PNI.js';
4
+ import { BACKDROP_MOTION, DIALOG_POPUP_MOTION } from './chunk-O4GRKO3I.js';
5
+ import { cn } from './chunk-ZSNJ6UA3.js';
6
+ import { Dialog } from '@base-ui/react/dialog';
7
+ import * as React from 'react';
8
+ import { jsxs, jsx } from 'react/jsx-runtime';
9
+
10
+ var DIALOG_SIZE = {
11
+ sm: "max-w-sm",
12
+ md: "max-w-lg",
13
+ lg: "max-w-2xl"
14
+ };
15
+ function useControllableOpen(open, defaultOpen, onOpenChange) {
16
+ const [uncontrolled, setUncontrolled] = React.useState(defaultOpen);
17
+ const isControlled = open !== void 0;
18
+ const value = isControlled ? open : uncontrolled;
19
+ const setOpen = React.useCallback(
20
+ (next) => {
21
+ if (!isControlled) setUncontrolled(next);
22
+ onOpenChange?.(next);
23
+ },
24
+ [isControlled, onOpenChange]
25
+ );
26
+ return [value, setOpen];
27
+ }
28
+ function DialogSurface(props) {
29
+ const { size = "md", showClose, dividers, keepMounted, title, description, leading, trailing, footer, className, children, close } = props;
30
+ const ariaLabel = props["aria-label"];
31
+ const bodyRef = React.useRef(null);
32
+ const { maskImage } = useScrollFade(bodyRef, { axis: "vertical" });
33
+ return /* @__PURE__ */ jsxs(Dialog.Portal, { keepMounted, children: [
34
+ /* @__PURE__ */ jsx(Dialog.Backdrop, { className: cn("fixed inset-0 z-50 bg-overlay", BACKDROP_MOTION) }),
35
+ /* @__PURE__ */ jsx("div", { className: "pointer-events-none fixed inset-0 z-50 flex items-center justify-center p-4", children: /* @__PURE__ */ jsx(
36
+ PanelChrome,
37
+ {
38
+ render: /* @__PURE__ */ jsx(Dialog.Popup, { "aria-label": ariaLabel }),
39
+ className: cn(
40
+ "pointer-events-auto relative w-full outline-none",
41
+ "max-h-[calc(100dvh-2rem)]",
42
+ // Floating-surface edge: inset alpha ring (border-alt), not a layout
43
+ // border — the locked recipe shared with the Select/Combobox popups.
44
+ "rounded-2xl bg-primary shadow-xl ring-1 ring-secondary_alt ring-inset",
45
+ "text-primary",
46
+ DIALOG_POPUP_MOTION,
47
+ DIALOG_SIZE[size],
48
+ className
49
+ ),
50
+ padding: "lg",
51
+ titleScale: "lg",
52
+ footerAlign: "end",
53
+ scrollBody: true,
54
+ bodyRef,
55
+ bodyMask: maskImage,
56
+ dividers,
57
+ title,
58
+ description,
59
+ leading,
60
+ trailing,
61
+ footer: footer != null ? typeof footer === "function" ? footer(close) : footer : null,
62
+ renderTitle: (p) => /* @__PURE__ */ jsx(Dialog.Title, { ...p }),
63
+ renderDescription: (p) => /* @__PURE__ */ jsx(Dialog.Description, { ...p }),
64
+ closeSlot: showClose ? (cls) => /* @__PURE__ */ jsx(Dialog.Close, { render: /* @__PURE__ */ jsx(CloseButton, { size: "sm" }), className: cls }) : void 0,
65
+ children
66
+ }
67
+ ) })
68
+ ] });
69
+ }
70
+
71
+ export { DialogSurface, useControllableOpen };
72
+ //# sourceMappingURL=chunk-CYPPEUX5.js.map
73
+ //# sourceMappingURL=chunk-CYPPEUX5.js.map
@@ -0,0 +1,71 @@
1
+ import { warnNeedsName, warnRange, devWarn } from './chunk-GCVA3OIV.js';
2
+ import { cn } from './chunk-ZSNJ6UA3.js';
3
+ import 'react';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+
6
+ var TRACK = "relative w-full overflow-hidden rounded-full bg-tertiary";
7
+ var TRACK_SIZE = { sm: "h-1.5", md: "h-2" };
8
+ var FILL = "size-full rounded-full bg-brand-solid transition-transform duration-75 ease-linear";
9
+ var NOTCH = "absolute inset-y-0 w-1 -translate-x-1/2 bg-primary transition-[left] duration-75 ease-linear";
10
+ var VALUE_TEXT = "shrink-0 text-sm font-medium text-tertiary tabular-nums";
11
+ var BUBBLE = "absolute rounded-[10px] bg-primary_alt px-3 py-2 shadow-lg ring-1 ring-secondary_alt ring-inset";
12
+ var BUBBLE_TEXT = "text-xs font-semibold text-tertiary tabular-nums";
13
+ var POSITION = {
14
+ right: { wrap: "flex items-center gap-3" },
15
+ bottom: { wrap: "flex flex-col items-end gap-2" },
16
+ "top-floating": { wrap: "relative flex flex-col items-end gap-2", bubble: "-top-2 -translate-x-1/2 -translate-y-full" },
17
+ "bottom-floating": { wrap: "relative flex flex-col items-end gap-2", bubble: "-bottom-2 -translate-x-1/2 translate-y-full" }
18
+ };
19
+ var DEFAULT_FORMAT_VALUE = (_value, percent) => `${Math.round(percent)}%`;
20
+ function Progress(props) {
21
+ const {
22
+ value,
23
+ min = 0,
24
+ max = 100,
25
+ overage = false,
26
+ valuePosition = "none",
27
+ formatValue,
28
+ size = "md",
29
+ "aria-label": ariaLabel,
30
+ "aria-labelledby": ariaLabelledBy,
31
+ className
32
+ } = props;
33
+ warnNeedsName("Progress", Boolean(ariaLabel || ariaLabelledBy), "`aria-label` or `aria-labelledby`");
34
+ warnRange("Progress", "value", value, min, overage ? null : max);
35
+ if (max <= min) devWarn(`<Progress> \`max\` (${max}) must be greater than \`min\` (${min}).`);
36
+ const span = max - min;
37
+ const rawPercent = span > 0 ? (value - min) * 100 / span : 0;
38
+ const overflowing = overage && Number.isFinite(rawPercent) && rawPercent > 100;
39
+ const paintPercent = Math.min(100, Math.max(0, rawPercent));
40
+ const readoutPercent = overflowing ? rawPercent : paintPercent;
41
+ const notchPercent = overflowing ? 1e4 / rawPercent : null;
42
+ const text = (formatValue ?? DEFAULT_FORMAT_VALUE)(value, readoutPercent);
43
+ const track = /* @__PURE__ */ jsxs(
44
+ "div",
45
+ {
46
+ role: "progressbar",
47
+ "aria-valuenow": value,
48
+ "aria-valuemin": min,
49
+ "aria-valuemax": max,
50
+ "aria-valuetext": formatValue || overflowing ? text : void 0,
51
+ "aria-label": ariaLabel,
52
+ "aria-labelledby": ariaLabelledBy,
53
+ className: cn(TRACK, TRACK_SIZE[size], valuePosition === "none" && className),
54
+ children: [
55
+ /* @__PURE__ */ jsx("div", { className: FILL, style: { transform: `translateX(-${100 - paintPercent}%)` } }),
56
+ notchPercent !== null && /* @__PURE__ */ jsx("div", { "aria-hidden": true, className: NOTCH, style: { left: `${notchPercent}%` } })
57
+ ]
58
+ }
59
+ );
60
+ if (valuePosition === "none") return track;
61
+ const position = POSITION[valuePosition];
62
+ const floating = position.bubble;
63
+ return /* @__PURE__ */ jsxs("div", { className: cn(position.wrap, className), children: [
64
+ track,
65
+ floating ? /* @__PURE__ */ jsx("div", { className: cn(BUBBLE, floating), style: { left: `${paintPercent}%` }, children: /* @__PURE__ */ jsx("div", { className: BUBBLE_TEXT, children: text }) }) : /* @__PURE__ */ jsx("span", { className: VALUE_TEXT, children: text })
66
+ ] });
67
+ }
68
+
69
+ export { Progress };
70
+ //# sourceMappingURL=chunk-D5BTFSL7.js.map
71
+ //# sourceMappingURL=chunk-D5BTFSL7.js.map