@platned/ui 0.5.1 → 0.6.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.
- package/dist/index.cjs +1119 -831
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +92 -1
- package/dist/index.d.ts +92 -1
- package/dist/index.js +809 -528
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2929,11 +2929,104 @@ function RoleComboBox({
|
|
|
2929
2929
|
);
|
|
2930
2930
|
}
|
|
2931
2931
|
|
|
2932
|
+
// src/components/forms/country-select.tsx
|
|
2933
|
+
import { useMemo as useMemo3 } from "react";
|
|
2934
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
2935
|
+
var ISO_3166_ALPHA_2 = "AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW";
|
|
2936
|
+
var COUNTRY_CODES = ISO_3166_ALPHA_2.split(" ");
|
|
2937
|
+
function countryOptions(codes = COUNTRY_CODES, locale) {
|
|
2938
|
+
let names = null;
|
|
2939
|
+
try {
|
|
2940
|
+
names = new Intl.DisplayNames(locale ? [locale] : void 0, { type: "region" });
|
|
2941
|
+
} catch {
|
|
2942
|
+
}
|
|
2943
|
+
return codes.map((code) => ({ value: code, label: names?.of(code) ?? code, description: code })).sort((a, b) => a.label.localeCompare(b.label, locale));
|
|
2944
|
+
}
|
|
2945
|
+
function CountrySelect({
|
|
2946
|
+
countries,
|
|
2947
|
+
locale,
|
|
2948
|
+
placeholder = "Select a country\u2026",
|
|
2949
|
+
emptyMessage = "No countries match",
|
|
2950
|
+
...props
|
|
2951
|
+
}) {
|
|
2952
|
+
const options = useMemo3(() => countryOptions(countries, locale), [countries, locale]);
|
|
2953
|
+
return /* @__PURE__ */ jsx24(
|
|
2954
|
+
Combobox,
|
|
2955
|
+
{
|
|
2956
|
+
...props,
|
|
2957
|
+
options,
|
|
2958
|
+
placeholder,
|
|
2959
|
+
emptyMessage,
|
|
2960
|
+
filter: (option, query) => {
|
|
2961
|
+
const q = query.trim().toLowerCase();
|
|
2962
|
+
return option.label.toLowerCase().includes(q) || option.value.toLowerCase() === q;
|
|
2963
|
+
}
|
|
2964
|
+
}
|
|
2965
|
+
);
|
|
2966
|
+
}
|
|
2967
|
+
|
|
2968
|
+
// src/components/forms/time-zone-select.tsx
|
|
2969
|
+
import { useMemo as useMemo4 } from "react";
|
|
2970
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2971
|
+
function supportedTimeZones() {
|
|
2972
|
+
const intl = Intl;
|
|
2973
|
+
try {
|
|
2974
|
+
const zones = intl.supportedValuesOf?.("timeZone");
|
|
2975
|
+
if (zones && zones.length > 0) return zones;
|
|
2976
|
+
} catch {
|
|
2977
|
+
}
|
|
2978
|
+
return ["UTC"];
|
|
2979
|
+
}
|
|
2980
|
+
function timeZoneOffset(timeZone, at = /* @__PURE__ */ new Date()) {
|
|
2981
|
+
try {
|
|
2982
|
+
const part = new Intl.DateTimeFormat("en-US", { timeZone, timeZoneName: "longOffset" }).formatToParts(at).find((p) => p.type === "timeZoneName")?.value;
|
|
2983
|
+
const match = part?.match(/GMT([+-])(\d{2}):(\d{2})/);
|
|
2984
|
+
if (!match) return { label: "+00:00", minutes: 0 };
|
|
2985
|
+
const [, sign, hh, mm] = match;
|
|
2986
|
+
const minutes = (Number(hh) * 60 + Number(mm)) * (sign === "-" ? -1 : 1);
|
|
2987
|
+
return { label: `${sign}${hh}:${mm}`, minutes };
|
|
2988
|
+
} catch {
|
|
2989
|
+
return { label: "+00:00", minutes: 0 };
|
|
2990
|
+
}
|
|
2991
|
+
}
|
|
2992
|
+
function timeZoneOptions(zones = supportedTimeZones(), at = /* @__PURE__ */ new Date()) {
|
|
2993
|
+
return zones.map((zone) => ({ zone, offset: timeZoneOffset(zone, at) })).sort((a, b) => a.offset.minutes - b.offset.minutes || a.zone.localeCompare(b.zone)).map(({ zone, offset: offset2 }) => ({
|
|
2994
|
+
value: zone,
|
|
2995
|
+
label: `(UTC${offset2.label}) ${zone.replace(/_/g, " ")}`
|
|
2996
|
+
}));
|
|
2997
|
+
}
|
|
2998
|
+
function TimeZoneSelect({
|
|
2999
|
+
timeZones,
|
|
3000
|
+
at,
|
|
3001
|
+
placeholder = "Select a time zone\u2026",
|
|
3002
|
+
emptyMessage = "No time zones match",
|
|
3003
|
+
...props
|
|
3004
|
+
}) {
|
|
3005
|
+
const atTime = at?.getTime();
|
|
3006
|
+
const options = useMemo4(
|
|
3007
|
+
() => timeZoneOptions(timeZones, atTime === void 0 ? void 0 : new Date(atTime)),
|
|
3008
|
+
[timeZones, atTime]
|
|
3009
|
+
);
|
|
3010
|
+
return /* @__PURE__ */ jsx25(
|
|
3011
|
+
Combobox,
|
|
3012
|
+
{
|
|
3013
|
+
...props,
|
|
3014
|
+
options,
|
|
3015
|
+
placeholder,
|
|
3016
|
+
emptyMessage,
|
|
3017
|
+
filter: (option, query) => {
|
|
3018
|
+
const q = query.trim().toLowerCase();
|
|
3019
|
+
return option.label.toLowerCase().includes(q) || option.value.toLowerCase().includes(q);
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
);
|
|
3023
|
+
}
|
|
3024
|
+
|
|
2932
3025
|
// src/components/forms/command.tsx
|
|
2933
|
-
import { useEffect as useEffect7, useId as useId6, useMemo as
|
|
3026
|
+
import { useEffect as useEffect7, useId as useId6, useMemo as useMemo5, useRef as useRef11, useState as useState9 } from "react";
|
|
2934
3027
|
import clsx26 from "clsx";
|
|
2935
3028
|
import { LuSearch } from "react-icons/lu";
|
|
2936
|
-
import { jsx as
|
|
3029
|
+
import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2937
3030
|
function Command({
|
|
2938
3031
|
items,
|
|
2939
3032
|
label = "Command palette",
|
|
@@ -2949,7 +3042,7 @@ function Command({
|
|
|
2949
3042
|
const listboxId = `${baseId}-listbox`;
|
|
2950
3043
|
const optionId = (index) => `${baseId}-option-${index}`;
|
|
2951
3044
|
const listRef = useRef11(null);
|
|
2952
|
-
const matches =
|
|
3045
|
+
const matches = useMemo5(() => {
|
|
2953
3046
|
if (!query) return items;
|
|
2954
3047
|
const q = query.toLowerCase();
|
|
2955
3048
|
return items.filter((item) => {
|
|
@@ -2986,8 +3079,8 @@ function Command({
|
|
|
2986
3079
|
let renderedGroup;
|
|
2987
3080
|
return /* @__PURE__ */ jsxs18("div", { className: clsx26("flex w-full flex-col", className), children: [
|
|
2988
3081
|
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2 border-b border-default px-3.5 py-3", children: [
|
|
2989
|
-
/* @__PURE__ */
|
|
2990
|
-
/* @__PURE__ */
|
|
3082
|
+
/* @__PURE__ */ jsx26(LuSearch, { "aria-hidden": true, className: "size-4 shrink-0 text-icon-default-secondary" }),
|
|
3083
|
+
/* @__PURE__ */ jsx26(
|
|
2991
3084
|
"input",
|
|
2992
3085
|
{
|
|
2993
3086
|
role: "combobox",
|
|
@@ -3043,13 +3136,13 @@ function Command({
|
|
|
3043
3136
|
"aria-label": label,
|
|
3044
3137
|
className: clsx26("max-h-80 overflow-y-auto p-1.5", SCROLLBAR_CLASSES),
|
|
3045
3138
|
children: [
|
|
3046
|
-
matches.length === 0 && /* @__PURE__ */
|
|
3139
|
+
matches.length === 0 && /* @__PURE__ */ jsx26("p", { className: "px-2.5 py-6 text-center text-body-sm text-default-secondary", children: emptyMessage }),
|
|
3047
3140
|
matches.map((item, index) => {
|
|
3048
3141
|
const isActive = index === activeIndex;
|
|
3049
3142
|
const groupHeading = item.group !== renderedGroup ? item.group : void 0;
|
|
3050
3143
|
renderedGroup = item.group;
|
|
3051
3144
|
return /* @__PURE__ */ jsxs18("div", { children: [
|
|
3052
|
-
groupHeading && /* @__PURE__ */
|
|
3145
|
+
groupHeading && /* @__PURE__ */ jsx26(
|
|
3053
3146
|
"div",
|
|
3054
3147
|
{
|
|
3055
3148
|
role: "presentation",
|
|
@@ -3074,12 +3167,12 @@ function Command({
|
|
|
3074
3167
|
item.disabled ? "cursor-not-allowed text-disabled" : isActive ? clsx26(OVERLAY_ITEM_ACTIVE, "text-default") : "text-default"
|
|
3075
3168
|
),
|
|
3076
3169
|
children: [
|
|
3077
|
-
item.icon && /* @__PURE__ */
|
|
3170
|
+
item.icon && /* @__PURE__ */ jsx26("span", { "aria-hidden": true, className: "flex size-4 shrink-0 items-center justify-center", children: item.icon }),
|
|
3078
3171
|
/* @__PURE__ */ jsxs18("span", { className: "min-w-0 flex-1", children: [
|
|
3079
|
-
/* @__PURE__ */
|
|
3080
|
-
item.description && /* @__PURE__ */
|
|
3172
|
+
/* @__PURE__ */ jsx26("span", { className: "block truncate", children: item.label }),
|
|
3173
|
+
item.description && /* @__PURE__ */ jsx26("span", { className: "block truncate text-body-tiny text-default-secondary", children: item.description })
|
|
3081
3174
|
] }),
|
|
3082
|
-
item.shortcut && /* @__PURE__ */
|
|
3175
|
+
item.shortcut && /* @__PURE__ */ jsx26("span", { className: "ml-auto flex shrink-0 items-center gap-1", children: item.shortcut })
|
|
3083
3176
|
]
|
|
3084
3177
|
}
|
|
3085
3178
|
)
|
|
@@ -3088,13 +3181,13 @@ function Command({
|
|
|
3088
3181
|
]
|
|
3089
3182
|
}
|
|
3090
3183
|
),
|
|
3091
|
-
/* @__PURE__ */
|
|
3184
|
+
/* @__PURE__ */ jsx26("span", { "aria-live": "polite", className: "sr-only", children: `${matches.length} ${matches.length === 1 ? "result" : "results"}` })
|
|
3092
3185
|
] });
|
|
3093
3186
|
}
|
|
3094
3187
|
|
|
3095
3188
|
// src/components/status/status-badge.tsx
|
|
3096
3189
|
import clsx27 from "clsx";
|
|
3097
|
-
import { jsx as
|
|
3190
|
+
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3098
3191
|
var TONE_STYLES2 = {
|
|
3099
3192
|
neutral: "bg-status-neutral text-status-neutral",
|
|
3100
3193
|
info: "bg-status-info text-status-info",
|
|
@@ -3135,7 +3228,7 @@ function StatusBadge({
|
|
|
3135
3228
|
className
|
|
3136
3229
|
),
|
|
3137
3230
|
children: [
|
|
3138
|
-
icon ? /* @__PURE__ */
|
|
3231
|
+
icon ? /* @__PURE__ */ jsx27("span", { className: "shrink-0", children: icon }) : dot && /* @__PURE__ */ jsx27("span", { className: clsx27("size-1.5 shrink-0 rounded-full", DOT_STYLES[tone]) }),
|
|
3139
3232
|
label
|
|
3140
3233
|
]
|
|
3141
3234
|
}
|
|
@@ -3144,7 +3237,7 @@ function StatusBadge({
|
|
|
3144
3237
|
|
|
3145
3238
|
// src/components/status/status-dot.tsx
|
|
3146
3239
|
import clsx28 from "clsx";
|
|
3147
|
-
import { jsx as
|
|
3240
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
3148
3241
|
var dotTones = {
|
|
3149
3242
|
brand: "bg-brand",
|
|
3150
3243
|
positive: "bg-positive",
|
|
@@ -3154,7 +3247,7 @@ var dotTones = {
|
|
|
3154
3247
|
default: "bg-default-tertiary"
|
|
3155
3248
|
};
|
|
3156
3249
|
function StatusDot({ tone = "default", color, className }) {
|
|
3157
|
-
return /* @__PURE__ */
|
|
3250
|
+
return /* @__PURE__ */ jsx28(
|
|
3158
3251
|
"span",
|
|
3159
3252
|
{
|
|
3160
3253
|
className: clsx28("inline-block size-1.5 shrink-0 rounded-full", !color && dotTones[tone], className),
|
|
@@ -3165,7 +3258,7 @@ function StatusDot({ tone = "default", color, className }) {
|
|
|
3165
3258
|
|
|
3166
3259
|
// src/components/status/status-chip.tsx
|
|
3167
3260
|
import clsx29 from "clsx";
|
|
3168
|
-
import { jsx as
|
|
3261
|
+
import { jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3169
3262
|
function StatusChip({ label, count, tone = "default", dotColor, bg, className }) {
|
|
3170
3263
|
return /* @__PURE__ */ jsxs20(
|
|
3171
3264
|
"span",
|
|
@@ -3177,9 +3270,9 @@ function StatusChip({ label, count, tone = "default", dotColor, bg, className })
|
|
|
3177
3270
|
),
|
|
3178
3271
|
style: bg ? { backgroundColor: bg } : void 0,
|
|
3179
3272
|
children: [
|
|
3180
|
-
/* @__PURE__ */
|
|
3181
|
-
/* @__PURE__ */
|
|
3182
|
-
/* @__PURE__ */
|
|
3273
|
+
/* @__PURE__ */ jsx29(StatusDot, { tone, color: dotColor }),
|
|
3274
|
+
/* @__PURE__ */ jsx29("span", { className: "text-body-xs font-medium text-default", children: count }),
|
|
3275
|
+
/* @__PURE__ */ jsx29("span", { className: "text-body-xs text-default-secondary", children: label })
|
|
3183
3276
|
]
|
|
3184
3277
|
}
|
|
3185
3278
|
);
|
|
@@ -3187,7 +3280,7 @@ function StatusChip({ label, count, tone = "default", dotColor, bg, className })
|
|
|
3187
3280
|
|
|
3188
3281
|
// src/components/status/count-badge.tsx
|
|
3189
3282
|
import clsx30 from "clsx";
|
|
3190
|
-
import { jsx as
|
|
3283
|
+
import { jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3191
3284
|
function CountBadge({ count, label, tone = "positive", className }) {
|
|
3192
3285
|
return /* @__PURE__ */ jsxs21(
|
|
3193
3286
|
"span",
|
|
@@ -3197,9 +3290,9 @@ function CountBadge({ count, label, tone = "positive", className }) {
|
|
|
3197
3290
|
className
|
|
3198
3291
|
),
|
|
3199
3292
|
children: [
|
|
3200
|
-
/* @__PURE__ */
|
|
3293
|
+
/* @__PURE__ */ jsx30(StatusDot, { tone }),
|
|
3201
3294
|
count,
|
|
3202
|
-
label && /* @__PURE__ */
|
|
3295
|
+
label && /* @__PURE__ */ jsx30("span", { className: "text-default-secondary", children: label })
|
|
3203
3296
|
]
|
|
3204
3297
|
}
|
|
3205
3298
|
);
|
|
@@ -3207,7 +3300,7 @@ function CountBadge({ count, label, tone = "positive", className }) {
|
|
|
3207
3300
|
|
|
3208
3301
|
// src/components/status/tag-pill.tsx
|
|
3209
3302
|
import clsx31 from "clsx";
|
|
3210
|
-
import { jsx as
|
|
3303
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
3211
3304
|
var toneStyles = {
|
|
3212
3305
|
default: "bg-default-secondary text-default-secondary",
|
|
3213
3306
|
brand: "bg-brand-tertiary text-brand",
|
|
@@ -3216,7 +3309,7 @@ var toneStyles = {
|
|
|
3216
3309
|
danger: "bg-danger-tertiary text-danger"
|
|
3217
3310
|
};
|
|
3218
3311
|
function TagPill({ label, tone = "default", bg, color, className }) {
|
|
3219
|
-
return /* @__PURE__ */
|
|
3312
|
+
return /* @__PURE__ */ jsx31(
|
|
3220
3313
|
"span",
|
|
3221
3314
|
{
|
|
3222
3315
|
className: clsx31(
|
|
@@ -3235,7 +3328,7 @@ function TagPill({ label, tone = "default", bg, color, className }) {
|
|
|
3235
3328
|
|
|
3236
3329
|
// src/components/status/trail-chip.tsx
|
|
3237
3330
|
import clsx32 from "clsx";
|
|
3238
|
-
import { jsx as
|
|
3331
|
+
import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3239
3332
|
var DOT = {
|
|
3240
3333
|
neutral: "bg-status-dot-neutral",
|
|
3241
3334
|
info: "bg-status-dot-info",
|
|
@@ -3254,22 +3347,22 @@ function TrailChip({ label, value, tone = "info", dotColor, className }) {
|
|
|
3254
3347
|
className
|
|
3255
3348
|
),
|
|
3256
3349
|
children: [
|
|
3257
|
-
/* @__PURE__ */
|
|
3350
|
+
/* @__PURE__ */ jsx32(
|
|
3258
3351
|
"span",
|
|
3259
3352
|
{
|
|
3260
3353
|
className: clsx32("size-1.5 shrink-0 rounded-full", !dotColor && DOT[tone]),
|
|
3261
3354
|
style: dotColor ? { backgroundColor: dotColor } : void 0
|
|
3262
3355
|
}
|
|
3263
3356
|
),
|
|
3264
|
-
/* @__PURE__ */
|
|
3265
|
-
/* @__PURE__ */
|
|
3357
|
+
/* @__PURE__ */ jsx32("span", { className: "text-body-tiny font-semibold uppercase tracking-wide text-default-secondary", children: label }),
|
|
3358
|
+
/* @__PURE__ */ jsx32("span", { className: "text-body-xs font-medium text-default", children: value })
|
|
3266
3359
|
]
|
|
3267
3360
|
}
|
|
3268
3361
|
);
|
|
3269
3362
|
}
|
|
3270
3363
|
|
|
3271
3364
|
// src/components/status/user-status-pill.tsx
|
|
3272
|
-
import { jsx as
|
|
3365
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
3273
3366
|
var STATUS_META = {
|
|
3274
3367
|
active: { label: "Active", tone: "positive" },
|
|
3275
3368
|
// `caution` (pale yellow), not `warning` (orange) — Pending is one step below a
|
|
@@ -3279,13 +3372,13 @@ var STATUS_META = {
|
|
|
3279
3372
|
};
|
|
3280
3373
|
function UserStatusPill({ status }) {
|
|
3281
3374
|
const { label, tone } = STATUS_META[status];
|
|
3282
|
-
return /* @__PURE__ */
|
|
3375
|
+
return /* @__PURE__ */ jsx33(StatusBadge, { label, tone });
|
|
3283
3376
|
}
|
|
3284
3377
|
|
|
3285
3378
|
// src/components/status/check-indicator.tsx
|
|
3286
3379
|
import clsx33 from "clsx";
|
|
3287
3380
|
import { LuCheck as LuCheck5, LuCircleAlert, LuLoaderCircle, LuMinus, LuX as LuX2 } from "react-icons/lu";
|
|
3288
|
-
import { jsx as
|
|
3381
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
3289
3382
|
var STATUS_STYLES = {
|
|
3290
3383
|
passed: "bg-status-check-passed border-status-check-passed text-status-check-passed",
|
|
3291
3384
|
in_progress: "bg-status-check-progress border-status-check-progress text-status-check-progress",
|
|
@@ -3297,21 +3390,21 @@ var STATUS_STYLES = {
|
|
|
3297
3390
|
function StatusGlyph({ status }) {
|
|
3298
3391
|
switch (status) {
|
|
3299
3392
|
case "passed":
|
|
3300
|
-
return /* @__PURE__ */
|
|
3393
|
+
return /* @__PURE__ */ jsx34(LuCheck5, { className: "size-3", strokeWidth: 3, "aria-hidden": true });
|
|
3301
3394
|
case "failed":
|
|
3302
|
-
return /* @__PURE__ */
|
|
3395
|
+
return /* @__PURE__ */ jsx34(LuX2, { className: "size-3", strokeWidth: 3, "aria-hidden": true });
|
|
3303
3396
|
case "waived":
|
|
3304
|
-
return /* @__PURE__ */
|
|
3397
|
+
return /* @__PURE__ */ jsx34(LuMinus, { className: "size-3", strokeWidth: 3, "aria-hidden": true });
|
|
3305
3398
|
case "in_progress":
|
|
3306
|
-
return /* @__PURE__ */
|
|
3399
|
+
return /* @__PURE__ */ jsx34(LuLoaderCircle, { className: "size-3", strokeWidth: 3, "aria-hidden": true });
|
|
3307
3400
|
case "action_required":
|
|
3308
|
-
return /* @__PURE__ */
|
|
3401
|
+
return /* @__PURE__ */ jsx34(LuCircleAlert, { className: "size-3.5", strokeWidth: 2.5, "aria-hidden": true });
|
|
3309
3402
|
case "pending":
|
|
3310
3403
|
return null;
|
|
3311
3404
|
}
|
|
3312
3405
|
}
|
|
3313
3406
|
function CheckIndicator({ status, label, className }) {
|
|
3314
|
-
return /* @__PURE__ */
|
|
3407
|
+
return /* @__PURE__ */ jsx34(
|
|
3315
3408
|
"div",
|
|
3316
3409
|
{
|
|
3317
3410
|
className: clsx33(
|
|
@@ -3322,14 +3415,14 @@ function CheckIndicator({ status, label, className }) {
|
|
|
3322
3415
|
role: label ? "img" : void 0,
|
|
3323
3416
|
"aria-label": label,
|
|
3324
3417
|
"aria-hidden": label ? void 0 : true,
|
|
3325
|
-
children: /* @__PURE__ */
|
|
3418
|
+
children: /* @__PURE__ */ jsx34(StatusGlyph, { status })
|
|
3326
3419
|
}
|
|
3327
3420
|
);
|
|
3328
3421
|
}
|
|
3329
3422
|
|
|
3330
3423
|
// src/components/status/entity-icon-badge.tsx
|
|
3331
3424
|
import clsx34 from "clsx";
|
|
3332
|
-
import { jsx as
|
|
3425
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
3333
3426
|
var sizeStyles4 = {
|
|
3334
3427
|
sm: "size-8",
|
|
3335
3428
|
md: "size-10"
|
|
@@ -3347,7 +3440,7 @@ var toneStyles2 = {
|
|
|
3347
3440
|
neutral: "bg-neutral-tertiary text-icon-neutral"
|
|
3348
3441
|
};
|
|
3349
3442
|
function EntityIconBadge({ size: size2 = "sm", tone = "default", shape = "square", bg, iconColor, children, className }) {
|
|
3350
|
-
return /* @__PURE__ */
|
|
3443
|
+
return /* @__PURE__ */ jsx35(
|
|
3351
3444
|
"span",
|
|
3352
3445
|
{
|
|
3353
3446
|
className: clsx34(
|
|
@@ -3373,7 +3466,7 @@ import clsx36 from "clsx";
|
|
|
3373
3466
|
// src/components/forms/check-control.tsx
|
|
3374
3467
|
import clsx35 from "clsx";
|
|
3375
3468
|
import { LuCheck as LuCheck6, LuMinus as LuMinus2 } from "react-icons/lu";
|
|
3376
|
-
import { jsx as
|
|
3469
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3377
3470
|
var CHECK_SIZE = {
|
|
3378
3471
|
sm: { box: "size-4", glyph: "size-2.5", dot: "size-1.5" },
|
|
3379
3472
|
md: { box: "size-[18px]", glyph: "size-3", dot: "size-2" }
|
|
@@ -3388,7 +3481,7 @@ function CheckControl({
|
|
|
3388
3481
|
}) {
|
|
3389
3482
|
const s = CHECK_SIZE[size2];
|
|
3390
3483
|
const on = checked || indeterminate;
|
|
3391
|
-
return /* @__PURE__ */
|
|
3484
|
+
return /* @__PURE__ */ jsx36(
|
|
3392
3485
|
"span",
|
|
3393
3486
|
{
|
|
3394
3487
|
"aria-hidden": true,
|
|
@@ -3401,13 +3494,13 @@ function CheckControl({
|
|
|
3401
3494
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-brand peer-focus-visible:ring-offset-1 peer-focus-visible:ring-offset-default",
|
|
3402
3495
|
disabled ? on ? "border-disabled bg-disabled text-disabled-on-disabled" : "border-disabled bg-disabled" : on ? "border-brand-emphasis bg-brand text-brand-on-brand" : invalid ? "border-danger bg-default" : "border-default-secondary bg-default"
|
|
3403
3496
|
),
|
|
3404
|
-
children: type === "checkbox" ? indeterminate ? /* @__PURE__ */
|
|
3497
|
+
children: type === "checkbox" ? indeterminate ? /* @__PURE__ */ jsx36(LuMinus2, { className: s.glyph, strokeWidth: 3 }) : checked ? /* @__PURE__ */ jsx36(LuCheck6, { className: s.glyph, strokeWidth: 3 }) : null : checked ? /* @__PURE__ */ jsx36("span", { className: clsx35("rounded-full bg-current", s.dot) }) : null
|
|
3405
3498
|
}
|
|
3406
3499
|
);
|
|
3407
3500
|
}
|
|
3408
3501
|
|
|
3409
3502
|
// src/components/forms/checkbox.tsx
|
|
3410
|
-
import { jsx as
|
|
3503
|
+
import { jsx as jsx37, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3411
3504
|
var LABEL_TEXT2 = {
|
|
3412
3505
|
sm: "text-body-tiny",
|
|
3413
3506
|
md: "text-body-xs"
|
|
@@ -3448,7 +3541,7 @@ var Checkbox = forwardRef12(function Checkbox2({
|
|
|
3448
3541
|
disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"
|
|
3449
3542
|
),
|
|
3450
3543
|
children: [
|
|
3451
|
-
/* @__PURE__ */
|
|
3544
|
+
/* @__PURE__ */ jsx37(
|
|
3452
3545
|
"input",
|
|
3453
3546
|
{
|
|
3454
3547
|
ref: composeRefs(inputRef, ref),
|
|
@@ -3463,7 +3556,7 @@ var Checkbox = forwardRef12(function Checkbox2({
|
|
|
3463
3556
|
...props
|
|
3464
3557
|
}
|
|
3465
3558
|
),
|
|
3466
|
-
/* @__PURE__ */
|
|
3559
|
+
/* @__PURE__ */ jsx37(
|
|
3467
3560
|
CheckControl,
|
|
3468
3561
|
{
|
|
3469
3562
|
type: "checkbox",
|
|
@@ -3474,11 +3567,11 @@ var Checkbox = forwardRef12(function Checkbox2({
|
|
|
3474
3567
|
size: size2
|
|
3475
3568
|
}
|
|
3476
3569
|
),
|
|
3477
|
-
label && /* @__PURE__ */
|
|
3570
|
+
label && /* @__PURE__ */ jsx37("span", { className: clsx36(LABEL_TEXT2[size2], "text-default"), children: label })
|
|
3478
3571
|
]
|
|
3479
3572
|
}
|
|
3480
3573
|
),
|
|
3481
|
-
description && /* @__PURE__ */
|
|
3574
|
+
description && /* @__PURE__ */ jsx37(
|
|
3482
3575
|
"span",
|
|
3483
3576
|
{
|
|
3484
3577
|
id: descriptionId,
|
|
@@ -3501,7 +3594,7 @@ import {
|
|
|
3501
3594
|
useId as useId8
|
|
3502
3595
|
} from "react";
|
|
3503
3596
|
import clsx37 from "clsx";
|
|
3504
|
-
import { jsx as
|
|
3597
|
+
import { jsx as jsx38, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3505
3598
|
var RadioGroupContext = createContext4(null);
|
|
3506
3599
|
var RadioGroup = forwardRef13(function RadioGroup2({
|
|
3507
3600
|
children,
|
|
@@ -3524,7 +3617,7 @@ var RadioGroup = forwardRef13(function RadioGroup2({
|
|
|
3524
3617
|
defaultValue,
|
|
3525
3618
|
onChange: onValueChange
|
|
3526
3619
|
});
|
|
3527
|
-
return /* @__PURE__ */
|
|
3620
|
+
return /* @__PURE__ */ jsx38(
|
|
3528
3621
|
RadioGroupContext.Provider,
|
|
3529
3622
|
{
|
|
3530
3623
|
value: {
|
|
@@ -3535,7 +3628,7 @@ var RadioGroup = forwardRef13(function RadioGroup2({
|
|
|
3535
3628
|
disabled,
|
|
3536
3629
|
invalid
|
|
3537
3630
|
},
|
|
3538
|
-
children: /* @__PURE__ */
|
|
3631
|
+
children: /* @__PURE__ */ jsx38(
|
|
3539
3632
|
"div",
|
|
3540
3633
|
{
|
|
3541
3634
|
ref,
|
|
@@ -3579,7 +3672,7 @@ var Radio = forwardRef13(function Radio2({ value, label, description, disabled,
|
|
|
3579
3672
|
isDisabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"
|
|
3580
3673
|
),
|
|
3581
3674
|
children: [
|
|
3582
|
-
/* @__PURE__ */
|
|
3675
|
+
/* @__PURE__ */ jsx38(
|
|
3583
3676
|
"input",
|
|
3584
3677
|
{
|
|
3585
3678
|
ref,
|
|
@@ -3595,7 +3688,7 @@ var Radio = forwardRef13(function Radio2({ value, label, description, disabled,
|
|
|
3595
3688
|
...props
|
|
3596
3689
|
}
|
|
3597
3690
|
),
|
|
3598
|
-
/* @__PURE__ */
|
|
3691
|
+
/* @__PURE__ */ jsx38(
|
|
3599
3692
|
CheckControl,
|
|
3600
3693
|
{
|
|
3601
3694
|
type: "radio",
|
|
@@ -3605,11 +3698,11 @@ var Radio = forwardRef13(function Radio2({ value, label, description, disabled,
|
|
|
3605
3698
|
size: group.size
|
|
3606
3699
|
}
|
|
3607
3700
|
),
|
|
3608
|
-
label && /* @__PURE__ */
|
|
3701
|
+
label && /* @__PURE__ */ jsx38("span", { className: clsx37(LABEL_TEXT3[group.size], "text-default"), children: label })
|
|
3609
3702
|
]
|
|
3610
3703
|
}
|
|
3611
3704
|
),
|
|
3612
|
-
description && /* @__PURE__ */
|
|
3705
|
+
description && /* @__PURE__ */ jsx38(
|
|
3613
3706
|
"span",
|
|
3614
3707
|
{
|
|
3615
3708
|
id: descriptionId,
|
|
@@ -3626,7 +3719,7 @@ var Radio = forwardRef13(function Radio2({ value, label, description, disabled,
|
|
|
3626
3719
|
|
|
3627
3720
|
// src/components/forms/segmented-control.tsx
|
|
3628
3721
|
import clsx38 from "clsx";
|
|
3629
|
-
import { jsx as
|
|
3722
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
3630
3723
|
function SegmentedControl({
|
|
3631
3724
|
options,
|
|
3632
3725
|
value: valueProp,
|
|
@@ -3649,7 +3742,7 @@ function SegmentedControl({
|
|
|
3649
3742
|
loop: true,
|
|
3650
3743
|
defaultIndex: selectedIndex
|
|
3651
3744
|
});
|
|
3652
|
-
return /* @__PURE__ */
|
|
3745
|
+
return /* @__PURE__ */ jsx39(
|
|
3653
3746
|
"div",
|
|
3654
3747
|
{
|
|
3655
3748
|
role: "radiogroup",
|
|
@@ -3665,7 +3758,7 @@ function SegmentedControl({
|
|
|
3665
3758
|
disabled: option.disabled,
|
|
3666
3759
|
label: option.label
|
|
3667
3760
|
});
|
|
3668
|
-
return /* @__PURE__ */
|
|
3761
|
+
return /* @__PURE__ */ jsx39(
|
|
3669
3762
|
"button",
|
|
3670
3763
|
{
|
|
3671
3764
|
type: "button",
|
|
@@ -3697,7 +3790,7 @@ function SegmentedControl({
|
|
|
3697
3790
|
// src/components/forms/slider.tsx
|
|
3698
3791
|
import { forwardRef as forwardRef14, useId as useId9 } from "react";
|
|
3699
3792
|
import clsx39 from "clsx";
|
|
3700
|
-
import { jsx as
|
|
3793
|
+
import { jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3701
3794
|
var Slider = forwardRef14(function Slider2({
|
|
3702
3795
|
value,
|
|
3703
3796
|
defaultValue,
|
|
@@ -3721,7 +3814,7 @@ var Slider = forwardRef14(function Slider2({
|
|
|
3721
3814
|
const display = formatValue ? formatValue(current) : String(current);
|
|
3722
3815
|
return /* @__PURE__ */ jsxs25("div", { className: clsx39("flex w-full flex-col gap-1.5", className), children: [
|
|
3723
3816
|
(label || showValue) && /* @__PURE__ */ jsxs25("div", { className: "flex items-baseline justify-between gap-2", children: [
|
|
3724
|
-
label && /* @__PURE__ */
|
|
3817
|
+
label && /* @__PURE__ */ jsx40(
|
|
3725
3818
|
"label",
|
|
3726
3819
|
{
|
|
3727
3820
|
htmlFor: controlId,
|
|
@@ -3729,9 +3822,9 @@ var Slider = forwardRef14(function Slider2({
|
|
|
3729
3822
|
children: label
|
|
3730
3823
|
}
|
|
3731
3824
|
),
|
|
3732
|
-
showValue && /* @__PURE__ */
|
|
3825
|
+
showValue && /* @__PURE__ */ jsx40("span", { className: "text-body-sm font-medium tabular-nums text-default", children: display })
|
|
3733
3826
|
] }),
|
|
3734
|
-
description && /* @__PURE__ */
|
|
3827
|
+
description && /* @__PURE__ */ jsx40(
|
|
3735
3828
|
"p",
|
|
3736
3829
|
{
|
|
3737
3830
|
id: descriptionId,
|
|
@@ -3739,7 +3832,7 @@ var Slider = forwardRef14(function Slider2({
|
|
|
3739
3832
|
children: description
|
|
3740
3833
|
}
|
|
3741
3834
|
),
|
|
3742
|
-
/* @__PURE__ */
|
|
3835
|
+
/* @__PURE__ */ jsx40(
|
|
3743
3836
|
"input",
|
|
3744
3837
|
{
|
|
3745
3838
|
ref,
|
|
@@ -3780,7 +3873,7 @@ var Slider = forwardRef14(function Slider2({
|
|
|
3780
3873
|
// src/components/forms/label.tsx
|
|
3781
3874
|
import { forwardRef as forwardRef15 } from "react";
|
|
3782
3875
|
import clsx40 from "clsx";
|
|
3783
|
-
import { jsx as
|
|
3876
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
3784
3877
|
var SIZE6 = {
|
|
3785
3878
|
lg: "text-body",
|
|
3786
3879
|
md: "text-body-sm",
|
|
@@ -3789,7 +3882,7 @@ var SIZE6 = {
|
|
|
3789
3882
|
var Label = forwardRef15(function Label2({ children, size: size2, className, htmlFor, ...rest }, ref) {
|
|
3790
3883
|
const field = useFieldContext();
|
|
3791
3884
|
const resolvedSize = size2 ?? field?.size ?? "md";
|
|
3792
|
-
return /* @__PURE__ */
|
|
3885
|
+
return /* @__PURE__ */ jsx41(
|
|
3793
3886
|
"label",
|
|
3794
3887
|
{
|
|
3795
3888
|
ref,
|
|
@@ -3812,13 +3905,13 @@ import {
|
|
|
3812
3905
|
useCallback as useCallback4,
|
|
3813
3906
|
useEffect as useEffect9,
|
|
3814
3907
|
useId as useId10,
|
|
3815
|
-
useMemo as
|
|
3908
|
+
useMemo as useMemo6,
|
|
3816
3909
|
useRef as useRef13,
|
|
3817
3910
|
useState as useState10
|
|
3818
3911
|
} from "react";
|
|
3819
3912
|
import clsx41 from "clsx";
|
|
3820
3913
|
import { LuChevronLeft, LuChevronRight as LuChevronRight2 } from "react-icons/lu";
|
|
3821
|
-
import { jsx as
|
|
3914
|
+
import { jsx as jsx42, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3822
3915
|
var startOfDay = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
3823
3916
|
var sameDay = (a, b) => !!a && !!b && a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
3824
3917
|
var addDays = (d, n) => new Date(d.getFullYear(), d.getMonth(), d.getDate() + n);
|
|
@@ -3848,7 +3941,7 @@ function Calendar({
|
|
|
3848
3941
|
className,
|
|
3849
3942
|
...rest
|
|
3850
3943
|
}) {
|
|
3851
|
-
const today =
|
|
3944
|
+
const today = useMemo6(() => startOfDay(/* @__PURE__ */ new Date()), []);
|
|
3852
3945
|
const gridId = useId10();
|
|
3853
3946
|
const [month, setMonth] = useState10(
|
|
3854
3947
|
() => defaultMonth ?? value ?? range?.from ?? today
|
|
@@ -3857,15 +3950,15 @@ function Calendar({
|
|
|
3857
3950
|
() => value ?? range?.from ?? today
|
|
3858
3951
|
);
|
|
3859
3952
|
const cellRefs = useRef13(/* @__PURE__ */ new Map());
|
|
3860
|
-
const monthFormatter =
|
|
3953
|
+
const monthFormatter = useMemo6(
|
|
3861
3954
|
() => new Intl.DateTimeFormat(locale, { month: "long", year: "numeric" }),
|
|
3862
3955
|
[locale]
|
|
3863
3956
|
);
|
|
3864
|
-
const dayNameFormatter =
|
|
3957
|
+
const dayNameFormatter = useMemo6(
|
|
3865
3958
|
() => new Intl.DateTimeFormat(locale, { weekday: "short" }),
|
|
3866
3959
|
[locale]
|
|
3867
3960
|
);
|
|
3868
|
-
const fullDateFormatter =
|
|
3961
|
+
const fullDateFormatter = useMemo6(
|
|
3869
3962
|
() => new Intl.DateTimeFormat(locale, { weekday: "long", day: "numeric", month: "long", year: "numeric" }),
|
|
3870
3963
|
[locale]
|
|
3871
3964
|
);
|
|
@@ -3935,7 +4028,7 @@ function Calendar({
|
|
|
3935
4028
|
...rest,
|
|
3936
4029
|
children: [
|
|
3937
4030
|
/* @__PURE__ */ jsxs26("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
|
|
3938
|
-
/* @__PURE__ */
|
|
4031
|
+
/* @__PURE__ */ jsx42(
|
|
3939
4032
|
IconButton,
|
|
3940
4033
|
{
|
|
3941
4034
|
variant: "subtle",
|
|
@@ -3943,11 +4036,11 @@ function Calendar({
|
|
|
3943
4036
|
"aria-label": "Previous month",
|
|
3944
4037
|
disabled: !!min && isBefore(addMonths(month, -1), new Date(min.getFullYear(), min.getMonth(), 1)),
|
|
3945
4038
|
onClick: () => setMonth(addMonths(month, -1)),
|
|
3946
|
-
children: /* @__PURE__ */
|
|
4039
|
+
children: /* @__PURE__ */ jsx42(LuChevronLeft, { "aria-hidden": true, size: 16 })
|
|
3947
4040
|
}
|
|
3948
4041
|
),
|
|
3949
|
-
/* @__PURE__ */
|
|
3950
|
-
/* @__PURE__ */
|
|
4042
|
+
/* @__PURE__ */ jsx42("span", { "aria-live": "polite", className: "text-body-sm font-semibold text-default", children: monthFormatter.format(month) }),
|
|
4043
|
+
/* @__PURE__ */ jsx42(
|
|
3951
4044
|
IconButton,
|
|
3952
4045
|
{
|
|
3953
4046
|
variant: "subtle",
|
|
@@ -3955,7 +4048,7 @@ function Calendar({
|
|
|
3955
4048
|
"aria-label": "Next month",
|
|
3956
4049
|
disabled: !!max && isAfter(addMonths(month, 1), new Date(max.getFullYear(), max.getMonth(), 1)),
|
|
3957
4050
|
onClick: () => setMonth(addMonths(month, 1)),
|
|
3958
|
-
children: /* @__PURE__ */
|
|
4051
|
+
children: /* @__PURE__ */ jsx42(LuChevronRight2, { "aria-hidden": true, size: 16 })
|
|
3959
4052
|
}
|
|
3960
4053
|
)
|
|
3961
4054
|
] }),
|
|
@@ -3968,7 +4061,7 @@ function Calendar({
|
|
|
3968
4061
|
tabIndex: -1,
|
|
3969
4062
|
onKeyDown,
|
|
3970
4063
|
children: [
|
|
3971
|
-
/* @__PURE__ */
|
|
4064
|
+
/* @__PURE__ */ jsx42("div", { role: "row", className: "mb-1 grid grid-cols-7", children: weekdayNames.map((name) => /* @__PURE__ */ jsx42(
|
|
3972
4065
|
"div",
|
|
3973
4066
|
{
|
|
3974
4067
|
role: "columnheader",
|
|
@@ -3977,13 +4070,13 @@ function Calendar({
|
|
|
3977
4070
|
},
|
|
3978
4071
|
name
|
|
3979
4072
|
)) }),
|
|
3980
|
-
Array.from({ length: 6 }, (_, week) => /* @__PURE__ */
|
|
4073
|
+
Array.from({ length: 6 }, (_, week) => /* @__PURE__ */ jsx42("div", { role: "row", className: "grid grid-cols-7", children: days.slice(week * 7, week * 7 + 7).map((date) => {
|
|
3981
4074
|
const outside = date.getMonth() !== month.getMonth();
|
|
3982
4075
|
const isDisabled = disabled(date);
|
|
3983
4076
|
const selected = mode === "single" ? sameDay(date, value) : sameDay(date, range?.from) || sameDay(date, range?.to);
|
|
3984
4077
|
const between = mode === "range" && range?.from && range?.to ? inRange(date, range.from, range.to) : false;
|
|
3985
4078
|
const isFocused = sameDay(date, focusedDate);
|
|
3986
|
-
return /* @__PURE__ */
|
|
4079
|
+
return /* @__PURE__ */ jsx42("div", { role: "gridcell", "aria-selected": selected || void 0, children: /* @__PURE__ */ jsx42(
|
|
3987
4080
|
"button",
|
|
3988
4081
|
{
|
|
3989
4082
|
ref: (node) => {
|
|
@@ -4022,7 +4115,7 @@ function Calendar({
|
|
|
4022
4115
|
import { forwardRef as forwardRef16 } from "react";
|
|
4023
4116
|
import clsx42 from "clsx";
|
|
4024
4117
|
import { LuSearch as LuSearch2, LuX as LuX3 } from "react-icons/lu";
|
|
4025
|
-
import { jsx as
|
|
4118
|
+
import { jsx as jsx43, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4026
4119
|
var HEIGHT2 = {
|
|
4027
4120
|
lg: "h-12 text-body",
|
|
4028
4121
|
md: "h-9 text-body-sm",
|
|
@@ -4035,7 +4128,7 @@ var PAD = {
|
|
|
4035
4128
|
};
|
|
4036
4129
|
var InputGroup = forwardRef16(function InputGroup2({ children, size: sizeProp, invalid = false, disabled = false, className, ...rest }, ref) {
|
|
4037
4130
|
const size2 = useControlSize(sizeProp);
|
|
4038
|
-
return /* @__PURE__ */
|
|
4131
|
+
return /* @__PURE__ */ jsx43(
|
|
4039
4132
|
"div",
|
|
4040
4133
|
{
|
|
4041
4134
|
ref,
|
|
@@ -4060,7 +4153,7 @@ var InputGroup = forwardRef16(function InputGroup2({ children, size: sizeProp, i
|
|
|
4060
4153
|
var InputGroupInput = forwardRef16(
|
|
4061
4154
|
function InputGroupInput2({ className, ...props }, ref) {
|
|
4062
4155
|
const field = useFieldControl();
|
|
4063
|
-
return /* @__PURE__ */
|
|
4156
|
+
return /* @__PURE__ */ jsx43(
|
|
4064
4157
|
"input",
|
|
4065
4158
|
{
|
|
4066
4159
|
ref,
|
|
@@ -4078,7 +4171,7 @@ var InputGroupInput = forwardRef16(
|
|
|
4078
4171
|
);
|
|
4079
4172
|
var InputGroupAddon = forwardRef16(
|
|
4080
4173
|
function InputGroupAddon2({ children, align = "inline-start", decorative = true, className, ...rest }, ref) {
|
|
4081
|
-
return /* @__PURE__ */
|
|
4174
|
+
return /* @__PURE__ */ jsx43(
|
|
4082
4175
|
"span",
|
|
4083
4176
|
{
|
|
4084
4177
|
ref,
|
|
@@ -4099,7 +4192,7 @@ var InputGroupAddon = forwardRef16(
|
|
|
4099
4192
|
);
|
|
4100
4193
|
var InputGroupText = forwardRef16(
|
|
4101
4194
|
function InputGroupText2({ children, className, ...rest }, ref) {
|
|
4102
|
-
return /* @__PURE__ */
|
|
4195
|
+
return /* @__PURE__ */ jsx43(
|
|
4103
4196
|
"span",
|
|
4104
4197
|
{
|
|
4105
4198
|
ref,
|
|
@@ -4114,8 +4207,8 @@ var SearchInput = forwardRef16(function SearchInput2({ size: sizeProp, onClear,
|
|
|
4114
4207
|
const size2 = useControlSize(sizeProp);
|
|
4115
4208
|
const hasValue = value !== void 0 && value !== "";
|
|
4116
4209
|
return /* @__PURE__ */ jsxs27(InputGroup, { size: size2, disabled, className, children: [
|
|
4117
|
-
/* @__PURE__ */
|
|
4118
|
-
/* @__PURE__ */
|
|
4210
|
+
/* @__PURE__ */ jsx43(InputGroupAddon, { children: /* @__PURE__ */ jsx43(LuSearch2, { className: size2 === "sm" ? "size-3" : "size-4" }) }),
|
|
4211
|
+
/* @__PURE__ */ jsx43(
|
|
4119
4212
|
InputGroupInput,
|
|
4120
4213
|
{
|
|
4121
4214
|
ref,
|
|
@@ -4127,7 +4220,7 @@ var SearchInput = forwardRef16(function SearchInput2({ size: sizeProp, onClear,
|
|
|
4127
4220
|
...props
|
|
4128
4221
|
}
|
|
4129
4222
|
),
|
|
4130
|
-
onClear && hasValue && /* @__PURE__ */
|
|
4223
|
+
onClear && hasValue && /* @__PURE__ */ jsx43(InputGroupAddon, { align: "inline-end", decorative: false, children: /* @__PURE__ */ jsx43(
|
|
4131
4224
|
"button",
|
|
4132
4225
|
{
|
|
4133
4226
|
type: "button",
|
|
@@ -4135,7 +4228,7 @@ var SearchInput = forwardRef16(function SearchInput2({ size: sizeProp, onClear,
|
|
|
4135
4228
|
onClick: onClear,
|
|
4136
4229
|
disabled,
|
|
4137
4230
|
className: "flex items-center justify-center rounded transition-colors hover:text-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand",
|
|
4138
|
-
children: /* @__PURE__ */
|
|
4231
|
+
children: /* @__PURE__ */ jsx43(LuX3, { "aria-hidden": true, className: size2 === "sm" ? "size-3" : "size-4" })
|
|
4139
4232
|
}
|
|
4140
4233
|
) })
|
|
4141
4234
|
] });
|
|
@@ -4151,7 +4244,7 @@ import {
|
|
|
4151
4244
|
useState as useState11
|
|
4152
4245
|
} from "react";
|
|
4153
4246
|
import { LuCircleCheckBig, LuInfo, LuOctagonAlert, LuTriangleAlert, LuX as LuX4 } from "react-icons/lu";
|
|
4154
|
-
import { jsx as
|
|
4247
|
+
import { jsx as jsx44, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4155
4248
|
var SIZE7 = {
|
|
4156
4249
|
sm: "sm:max-w-[420px]",
|
|
4157
4250
|
md: "sm:max-w-[540px]",
|
|
@@ -4159,10 +4252,10 @@ var SIZE7 = {
|
|
|
4159
4252
|
xl: "sm:max-w-[800px]"
|
|
4160
4253
|
};
|
|
4161
4254
|
var TONE_ICON = {
|
|
4162
|
-
info: /* @__PURE__ */
|
|
4163
|
-
positive: /* @__PURE__ */
|
|
4164
|
-
warning: /* @__PURE__ */
|
|
4165
|
-
danger: /* @__PURE__ */
|
|
4255
|
+
info: /* @__PURE__ */ jsx44(LuInfo, { "aria-hidden": true, className: "size-5" }),
|
|
4256
|
+
positive: /* @__PURE__ */ jsx44(LuCircleCheckBig, { "aria-hidden": true, className: "size-5" }),
|
|
4257
|
+
warning: /* @__PURE__ */ jsx44(LuTriangleAlert, { "aria-hidden": true, className: "size-5" }),
|
|
4258
|
+
danger: /* @__PURE__ */ jsx44(LuOctagonAlert, { "aria-hidden": true, className: "size-5" })
|
|
4166
4259
|
};
|
|
4167
4260
|
var TONE_BADGE = {
|
|
4168
4261
|
info: "brand",
|
|
@@ -4178,7 +4271,7 @@ var FOOTER_ALIGN = {
|
|
|
4178
4271
|
var ModalNaming = createContext5(null);
|
|
4179
4272
|
function Modal(props) {
|
|
4180
4273
|
if (!props.open) return null;
|
|
4181
|
-
return /* @__PURE__ */
|
|
4274
|
+
return /* @__PURE__ */ jsx44(Portal, { children: /* @__PURE__ */ jsx44(ModalShell, { ...props }) });
|
|
4182
4275
|
}
|
|
4183
4276
|
function ModalShell({
|
|
4184
4277
|
onOpenChange,
|
|
@@ -4205,7 +4298,7 @@ function ModalShell({
|
|
|
4205
4298
|
onEscapeKeyDown,
|
|
4206
4299
|
onInteractOutside
|
|
4207
4300
|
});
|
|
4208
|
-
return /* @__PURE__ */
|
|
4301
|
+
return /* @__PURE__ */ jsx44(
|
|
4209
4302
|
"div",
|
|
4210
4303
|
{
|
|
4211
4304
|
className: cn(
|
|
@@ -4232,7 +4325,7 @@ function ModalShell({
|
|
|
4232
4325
|
className
|
|
4233
4326
|
),
|
|
4234
4327
|
children: [
|
|
4235
|
-
showClose && /* @__PURE__ */
|
|
4328
|
+
showClose && /* @__PURE__ */ jsx44(
|
|
4236
4329
|
IconButton,
|
|
4237
4330
|
{
|
|
4238
4331
|
variant: "subtle",
|
|
@@ -4240,10 +4333,10 @@ function ModalShell({
|
|
|
4240
4333
|
"aria-label": "Close dialog",
|
|
4241
4334
|
onClick: () => onOpenChange(false),
|
|
4242
4335
|
className: "absolute right-6 top-5 z-raised",
|
|
4243
|
-
children: /* @__PURE__ */
|
|
4336
|
+
children: /* @__PURE__ */ jsx44(LuX4, { size: 16, "aria-hidden": true })
|
|
4244
4337
|
}
|
|
4245
4338
|
),
|
|
4246
|
-
/* @__PURE__ */
|
|
4339
|
+
/* @__PURE__ */ jsx44(
|
|
4247
4340
|
ModalNaming.Provider,
|
|
4248
4341
|
{
|
|
4249
4342
|
value: {
|
|
@@ -4280,8 +4373,8 @@ function ModalHeader({
|
|
|
4280
4373
|
),
|
|
4281
4374
|
...rest,
|
|
4282
4375
|
children: [
|
|
4283
|
-
tone !== "default" && /* @__PURE__ */
|
|
4284
|
-
/* @__PURE__ */
|
|
4376
|
+
tone !== "default" && /* @__PURE__ */ jsx44(EntityIconBadge, { size: "md", shape: "circle", tone: TONE_BADGE[tone], children: TONE_ICON[tone] }),
|
|
4377
|
+
/* @__PURE__ */ jsx44("div", { className: "min-w-0 flex-1", children })
|
|
4285
4378
|
]
|
|
4286
4379
|
}
|
|
4287
4380
|
);
|
|
@@ -4292,7 +4385,7 @@ function ModalTitle({ children, className, id, ...rest }) {
|
|
|
4292
4385
|
naming?.registerTitle(true);
|
|
4293
4386
|
return () => naming?.registerTitle(false);
|
|
4294
4387
|
}, [naming]);
|
|
4295
|
-
return /* @__PURE__ */
|
|
4388
|
+
return /* @__PURE__ */ jsx44(
|
|
4296
4389
|
"h2",
|
|
4297
4390
|
{
|
|
4298
4391
|
id: id ?? naming?.titleId,
|
|
@@ -4308,7 +4401,7 @@ function ModalDescription({ children, className, id, ...rest }) {
|
|
|
4308
4401
|
naming?.registerDescription(true);
|
|
4309
4402
|
return () => naming?.registerDescription(false);
|
|
4310
4403
|
}, [naming]);
|
|
4311
|
-
return /* @__PURE__ */
|
|
4404
|
+
return /* @__PURE__ */ jsx44(
|
|
4312
4405
|
"p",
|
|
4313
4406
|
{
|
|
4314
4407
|
id: id ?? naming?.descriptionId,
|
|
@@ -4319,7 +4412,7 @@ function ModalDescription({ children, className, id, ...rest }) {
|
|
|
4319
4412
|
);
|
|
4320
4413
|
}
|
|
4321
4414
|
function ModalBody({ children, className, ...rest }) {
|
|
4322
|
-
return /* @__PURE__ */
|
|
4415
|
+
return /* @__PURE__ */ jsx44("div", { className: cn("px-6 py-5", className), ...rest, children });
|
|
4323
4416
|
}
|
|
4324
4417
|
function ModalFooter({
|
|
4325
4418
|
children,
|
|
@@ -4328,7 +4421,7 @@ function ModalFooter({
|
|
|
4328
4421
|
className,
|
|
4329
4422
|
...rest
|
|
4330
4423
|
}) {
|
|
4331
|
-
return /* @__PURE__ */
|
|
4424
|
+
return /* @__PURE__ */ jsx44(
|
|
4332
4425
|
"div",
|
|
4333
4426
|
{
|
|
4334
4427
|
className: cn(
|
|
@@ -4354,7 +4447,7 @@ import {
|
|
|
4354
4447
|
useState as useState12
|
|
4355
4448
|
} from "react";
|
|
4356
4449
|
import clsx43 from "clsx";
|
|
4357
|
-
import { Fragment as Fragment6, jsx as
|
|
4450
|
+
import { Fragment as Fragment6, jsx as jsx45, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4358
4451
|
function Tooltip({
|
|
4359
4452
|
children,
|
|
4360
4453
|
title,
|
|
@@ -4446,7 +4539,7 @@ function Tooltip({
|
|
|
4446
4539
|
});
|
|
4447
4540
|
return /* @__PURE__ */ jsxs29(Fragment6, { children: [
|
|
4448
4541
|
trigger,
|
|
4449
|
-
(open || association === "labelledby") && /* @__PURE__ */
|
|
4542
|
+
(open || association === "labelledby") && /* @__PURE__ */ jsx45(Portal, { children: /* @__PURE__ */ jsxs29(
|
|
4450
4543
|
"div",
|
|
4451
4544
|
{
|
|
4452
4545
|
ref: refs.setFloating,
|
|
@@ -4460,8 +4553,8 @@ function Tooltip({
|
|
|
4460
4553
|
className
|
|
4461
4554
|
),
|
|
4462
4555
|
children: [
|
|
4463
|
-
title && /* @__PURE__ */
|
|
4464
|
-
body && /* @__PURE__ */
|
|
4556
|
+
title && /* @__PURE__ */ jsx45("p", { className: "font-semibold", children: title }),
|
|
4557
|
+
body && /* @__PURE__ */ jsx45("p", { className: clsx43(title && "mt-0.5 opacity-80"), children: body })
|
|
4465
4558
|
]
|
|
4466
4559
|
}
|
|
4467
4560
|
) })
|
|
@@ -4474,12 +4567,12 @@ import {
|
|
|
4474
4567
|
useContext as useContext6,
|
|
4475
4568
|
useEffect as useEffect12,
|
|
4476
4569
|
useId as useId13,
|
|
4477
|
-
useMemo as
|
|
4570
|
+
useMemo as useMemo7,
|
|
4478
4571
|
useRef as useRef16,
|
|
4479
4572
|
useState as useState13
|
|
4480
4573
|
} from "react";
|
|
4481
4574
|
import clsx44 from "clsx";
|
|
4482
|
-
import { jsx as
|
|
4575
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
4483
4576
|
var PopoverContext = createContext6(null);
|
|
4484
4577
|
function usePopover(part) {
|
|
4485
4578
|
const value = useContext6(PopoverContext);
|
|
@@ -4500,7 +4593,7 @@ function Popover({
|
|
|
4500
4593
|
});
|
|
4501
4594
|
const baseId = useId13();
|
|
4502
4595
|
const [triggerNode, setTriggerNode] = useState13(null);
|
|
4503
|
-
const context =
|
|
4596
|
+
const context = useMemo7(
|
|
4504
4597
|
() => ({
|
|
4505
4598
|
open,
|
|
4506
4599
|
setOpen,
|
|
@@ -4512,7 +4605,7 @@ function Popover({
|
|
|
4512
4605
|
}),
|
|
4513
4606
|
[open, setOpen, baseId, triggerNode, modal]
|
|
4514
4607
|
);
|
|
4515
|
-
return /* @__PURE__ */
|
|
4608
|
+
return /* @__PURE__ */ jsx46(PopoverContext.Provider, { value: context, children });
|
|
4516
4609
|
}
|
|
4517
4610
|
function PopoverTrigger({
|
|
4518
4611
|
children,
|
|
@@ -4532,9 +4625,9 @@ function PopoverTrigger({
|
|
|
4532
4625
|
...rest
|
|
4533
4626
|
};
|
|
4534
4627
|
if (asChild) {
|
|
4535
|
-
return /* @__PURE__ */
|
|
4628
|
+
return /* @__PURE__ */ jsx46(Slot, { ref: composeRefs(popover.setTriggerNode), ...triggerProps, children });
|
|
4536
4629
|
}
|
|
4537
|
-
return /* @__PURE__ */
|
|
4630
|
+
return /* @__PURE__ */ jsx46(
|
|
4538
4631
|
"button",
|
|
4539
4632
|
{
|
|
4540
4633
|
ref: composeRefs(popover.setTriggerNode),
|
|
@@ -4576,7 +4669,7 @@ function PopoverContent({
|
|
|
4576
4669
|
inertBackground: popover.modal
|
|
4577
4670
|
});
|
|
4578
4671
|
if (!popover.open) return null;
|
|
4579
|
-
return /* @__PURE__ */
|
|
4672
|
+
return /* @__PURE__ */ jsx46(Portal, { children: /* @__PURE__ */ jsx46(
|
|
4580
4673
|
"div",
|
|
4581
4674
|
{
|
|
4582
4675
|
ref: composeRefs(panelRef, refs.setFloating),
|
|
@@ -4607,7 +4700,7 @@ import {
|
|
|
4607
4700
|
useState as useState14
|
|
4608
4701
|
} from "react";
|
|
4609
4702
|
import clsx45 from "clsx";
|
|
4610
|
-
import { Fragment as Fragment7, jsx as
|
|
4703
|
+
import { Fragment as Fragment7, jsx as jsx47, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4611
4704
|
function HoverCard({
|
|
4612
4705
|
children,
|
|
4613
4706
|
content,
|
|
@@ -4692,7 +4785,7 @@ function HoverCard({
|
|
|
4692
4785
|
});
|
|
4693
4786
|
return /* @__PURE__ */ jsxs30(Fragment7, { children: [
|
|
4694
4787
|
trigger,
|
|
4695
|
-
open && /* @__PURE__ */
|
|
4788
|
+
open && /* @__PURE__ */ jsx47(Portal, { children: /* @__PURE__ */ jsx47(
|
|
4696
4789
|
"div",
|
|
4697
4790
|
{
|
|
4698
4791
|
ref: refs.setFloating,
|
|
@@ -4717,7 +4810,7 @@ import {
|
|
|
4717
4810
|
createContext as createContext8,
|
|
4718
4811
|
useContext as useContext8,
|
|
4719
4812
|
useEffect as useEffect14,
|
|
4720
|
-
useMemo as
|
|
4813
|
+
useMemo as useMemo9,
|
|
4721
4814
|
useRef as useRef19,
|
|
4722
4815
|
useState as useState15
|
|
4723
4816
|
} from "react";
|
|
@@ -4729,12 +4822,12 @@ import {
|
|
|
4729
4822
|
useCallback as useCallback7,
|
|
4730
4823
|
useContext as useContext7,
|
|
4731
4824
|
useId as useId15,
|
|
4732
|
-
useMemo as
|
|
4825
|
+
useMemo as useMemo8,
|
|
4733
4826
|
useRef as useRef18
|
|
4734
4827
|
} from "react";
|
|
4735
4828
|
import clsx46 from "clsx";
|
|
4736
4829
|
import { LuCheck as LuCheck7 } from "react-icons/lu";
|
|
4737
|
-
import { jsx as
|
|
4830
|
+
import { jsx as jsx48, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4738
4831
|
var MenuContext = createContext7(null);
|
|
4739
4832
|
function useMenu(part) {
|
|
4740
4833
|
const context = useContext7(MenuContext);
|
|
@@ -4757,7 +4850,7 @@ function useMenuState({ open, setOpen }) {
|
|
|
4757
4850
|
const resetIndices = useCallback7(() => {
|
|
4758
4851
|
cursor.current = 0;
|
|
4759
4852
|
}, []);
|
|
4760
|
-
return
|
|
4853
|
+
return useMemo8(
|
|
4761
4854
|
() => ({
|
|
4762
4855
|
open,
|
|
4763
4856
|
setOpen,
|
|
@@ -4817,12 +4910,12 @@ function MenuItem({
|
|
|
4817
4910
|
},
|
|
4818
4911
|
...rest,
|
|
4819
4912
|
children: [
|
|
4820
|
-
icon && /* @__PURE__ */
|
|
4913
|
+
icon && /* @__PURE__ */ jsx48("span", { "aria-hidden": true, className: "mt-0.5 flex size-4 shrink-0 items-center justify-center", children: icon }),
|
|
4821
4914
|
/* @__PURE__ */ jsxs31("span", { className: "min-w-0 flex-1", children: [
|
|
4822
|
-
/* @__PURE__ */
|
|
4823
|
-
description && /* @__PURE__ */
|
|
4915
|
+
/* @__PURE__ */ jsx48("span", { className: "block truncate", children }),
|
|
4916
|
+
description && /* @__PURE__ */ jsx48("span", { id: descriptionId, className: "mt-0.5 block text-body-tiny text-default-secondary", children: description })
|
|
4824
4917
|
] }),
|
|
4825
|
-
shortcut && /* @__PURE__ */
|
|
4918
|
+
shortcut && /* @__PURE__ */ jsx48("span", { className: "ml-auto shrink-0 pl-4 text-body-tiny text-default-tertiary", children: shortcut })
|
|
4826
4919
|
]
|
|
4827
4920
|
}
|
|
4828
4921
|
);
|
|
@@ -4867,17 +4960,17 @@ function MenuCheckboxItem({
|
|
|
4867
4960
|
},
|
|
4868
4961
|
...rest,
|
|
4869
4962
|
children: [
|
|
4870
|
-
/* @__PURE__ */
|
|
4871
|
-
/* @__PURE__ */
|
|
4872
|
-
shortcut && /* @__PURE__ */
|
|
4963
|
+
/* @__PURE__ */ jsx48("span", { "aria-hidden": true, className: "flex size-4 shrink-0 items-center justify-center", children: checked && /* @__PURE__ */ jsx48(LuCheck7, { className: "size-3.5", strokeWidth: 3 }) }),
|
|
4964
|
+
/* @__PURE__ */ jsx48("span", { className: "min-w-0 flex-1 truncate", children }),
|
|
4965
|
+
shortcut && /* @__PURE__ */ jsx48("span", { className: "ml-auto shrink-0 pl-4 text-body-tiny text-default-tertiary", children: shortcut })
|
|
4873
4966
|
]
|
|
4874
4967
|
}
|
|
4875
4968
|
);
|
|
4876
4969
|
}
|
|
4877
4970
|
var MenuRadioContext = createContext7(null);
|
|
4878
4971
|
function MenuRadioGroup({ children, value, onValueChange }) {
|
|
4879
|
-
const context =
|
|
4880
|
-
return /* @__PURE__ */
|
|
4972
|
+
const context = useMemo8(() => ({ value, onValueChange }), [value, onValueChange]);
|
|
4973
|
+
return /* @__PURE__ */ jsx48(MenuRadioContext.Provider, { value: context, children: /* @__PURE__ */ jsx48("div", { role: "group", children }) });
|
|
4881
4974
|
}
|
|
4882
4975
|
function MenuRadioItem({
|
|
4883
4976
|
children,
|
|
@@ -4920,8 +5013,8 @@ function MenuRadioItem({
|
|
|
4920
5013
|
},
|
|
4921
5014
|
...rest,
|
|
4922
5015
|
children: [
|
|
4923
|
-
/* @__PURE__ */
|
|
4924
|
-
/* @__PURE__ */
|
|
5016
|
+
/* @__PURE__ */ jsx48("span", { "aria-hidden": true, className: "flex size-4 shrink-0 items-center justify-center", children: checked && /* @__PURE__ */ jsx48("span", { className: "size-1.5 rounded-full bg-current" }) }),
|
|
5017
|
+
/* @__PURE__ */ jsx48("span", { className: "min-w-0 flex-1 truncate", children })
|
|
4925
5018
|
]
|
|
4926
5019
|
}
|
|
4927
5020
|
);
|
|
@@ -4930,15 +5023,15 @@ var HEADING_CLASSES = OVERLAY_HEADING;
|
|
|
4930
5023
|
function MenuGroup({ children, label, className, ...rest }) {
|
|
4931
5024
|
const labelId = useId15();
|
|
4932
5025
|
return /* @__PURE__ */ jsxs31("div", { role: "group", "aria-labelledby": label ? labelId : void 0, className, ...rest, children: [
|
|
4933
|
-
label && /* @__PURE__ */
|
|
5026
|
+
label && /* @__PURE__ */ jsx48("div", { id: labelId, className: HEADING_CLASSES, children: label }),
|
|
4934
5027
|
children
|
|
4935
5028
|
] });
|
|
4936
5029
|
}
|
|
4937
5030
|
function MenuLabel({ children, className, ...rest }) {
|
|
4938
|
-
return /* @__PURE__ */
|
|
5031
|
+
return /* @__PURE__ */ jsx48("div", { className: clsx46(HEADING_CLASSES, className), ...rest, children });
|
|
4939
5032
|
}
|
|
4940
5033
|
function MenuSeparator({ className, ...rest }) {
|
|
4941
|
-
return /* @__PURE__ */
|
|
5034
|
+
return /* @__PURE__ */ jsx48(
|
|
4942
5035
|
"div",
|
|
4943
5036
|
{
|
|
4944
5037
|
role: "separator",
|
|
@@ -4949,7 +5042,7 @@ function MenuSeparator({ className, ...rest }) {
|
|
|
4949
5042
|
);
|
|
4950
5043
|
}
|
|
4951
5044
|
function MenuShortcut({ children, className, ...rest }) {
|
|
4952
|
-
return /* @__PURE__ */
|
|
5045
|
+
return /* @__PURE__ */ jsx48(
|
|
4953
5046
|
"span",
|
|
4954
5047
|
{
|
|
4955
5048
|
className: clsx46("ml-auto pl-4 text-body-tiny text-default-tertiary", className),
|
|
@@ -4960,7 +5053,7 @@ function MenuShortcut({ children, className, ...rest }) {
|
|
|
4960
5053
|
}
|
|
4961
5054
|
|
|
4962
5055
|
// src/components/overlays/context-menu.tsx
|
|
4963
|
-
import { jsx as
|
|
5056
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
4964
5057
|
var PositionContext = createContext8(null);
|
|
4965
5058
|
function usePosition() {
|
|
4966
5059
|
const value = useContext8(PositionContext);
|
|
@@ -4980,8 +5073,8 @@ function ContextMenu({
|
|
|
4980
5073
|
});
|
|
4981
5074
|
const menu = useMenuState({ open, setOpen });
|
|
4982
5075
|
const [point, setPoint] = useState15(null);
|
|
4983
|
-
const position =
|
|
4984
|
-
return /* @__PURE__ */
|
|
5076
|
+
const position = useMemo9(() => ({ point, setPoint }), [point]);
|
|
5077
|
+
return /* @__PURE__ */ jsx49(MenuContext.Provider, { value: menu, children: /* @__PURE__ */ jsx49(PositionContext.Provider, { value: position, children }) });
|
|
4985
5078
|
}
|
|
4986
5079
|
function ContextMenuTrigger({
|
|
4987
5080
|
children,
|
|
@@ -5003,7 +5096,7 @@ function ContextMenuTrigger({
|
|
|
5003
5096
|
// (see the note on `ContextMenu`), and a tab stop here would put an unexplained one in
|
|
5004
5097
|
// the middle of a table row.
|
|
5005
5098
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
5006
|
-
/* @__PURE__ */
|
|
5099
|
+
/* @__PURE__ */ jsx49(
|
|
5007
5100
|
"div",
|
|
5008
5101
|
{
|
|
5009
5102
|
"data-slot": "context-menu-trigger",
|
|
@@ -5065,7 +5158,7 @@ function ContextMenuContent({
|
|
|
5065
5158
|
});
|
|
5066
5159
|
}, [panelNode, position.point, collisionPadding]);
|
|
5067
5160
|
if (!menu.open || !position.point) return null;
|
|
5068
|
-
return /* @__PURE__ */
|
|
5161
|
+
return /* @__PURE__ */ jsx49(Portal, { children: /* @__PURE__ */ jsx49(
|
|
5069
5162
|
"div",
|
|
5070
5163
|
{
|
|
5071
5164
|
ref: composeRefs(panelRef, (node) => setPanelNode(node)),
|
|
@@ -5096,12 +5189,12 @@ import {
|
|
|
5096
5189
|
useContext as useContext9,
|
|
5097
5190
|
useEffect as useEffect15,
|
|
5098
5191
|
useId as useId16,
|
|
5099
|
-
useMemo as
|
|
5192
|
+
useMemo as useMemo10,
|
|
5100
5193
|
useRef as useRef20,
|
|
5101
5194
|
useState as useState16
|
|
5102
5195
|
} from "react";
|
|
5103
5196
|
import clsx48 from "clsx";
|
|
5104
|
-
import { jsx as
|
|
5197
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
5105
5198
|
var MenubarContext = createContext9(null);
|
|
5106
5199
|
function useMenubar(part) {
|
|
5107
5200
|
const value = useContext9(MenubarContext);
|
|
@@ -5117,7 +5210,7 @@ function Menubar({ children, label, className, ...rest }) {
|
|
|
5117
5210
|
loop: true,
|
|
5118
5211
|
onEscape: () => setOpenValue(null)
|
|
5119
5212
|
});
|
|
5120
|
-
const context =
|
|
5213
|
+
const context = useMemo10(
|
|
5121
5214
|
() => ({
|
|
5122
5215
|
openValue,
|
|
5123
5216
|
setOpenValue,
|
|
@@ -5131,7 +5224,7 @@ function Menubar({ children, label, className, ...rest }) {
|
|
|
5131
5224
|
[openValue, barRoving, baseId]
|
|
5132
5225
|
);
|
|
5133
5226
|
context.resetMenuIndices();
|
|
5134
|
-
return /* @__PURE__ */
|
|
5227
|
+
return /* @__PURE__ */ jsx50(MenubarContext.Provider, { value: context, children: /* @__PURE__ */ jsx50(
|
|
5135
5228
|
"div",
|
|
5136
5229
|
{
|
|
5137
5230
|
role: "menubar",
|
|
@@ -5153,8 +5246,8 @@ function MenubarMenu({ children, value }) {
|
|
|
5153
5246
|
open,
|
|
5154
5247
|
setOpen: (next) => bar.setOpenValue(next ? value : null)
|
|
5155
5248
|
});
|
|
5156
|
-
const scope =
|
|
5157
|
-
return /* @__PURE__ */
|
|
5249
|
+
const scope = useMemo10(() => ({ value, index }), [value, index]);
|
|
5250
|
+
return /* @__PURE__ */ jsx50(MenuContext.Provider, { value: menu, children: /* @__PURE__ */ jsx50(MenubarMenuScope.Provider, { value: scope, children }) });
|
|
5158
5251
|
}
|
|
5159
5252
|
var MenubarMenuScope = createContext9(null);
|
|
5160
5253
|
function useMenubarMenu(part) {
|
|
@@ -5176,7 +5269,7 @@ function MenubarTrigger({ children, className, ...rest }) {
|
|
|
5176
5269
|
triggerNodes.delete(scope.value);
|
|
5177
5270
|
};
|
|
5178
5271
|
}, [scope.value, node]);
|
|
5179
|
-
return /* @__PURE__ */
|
|
5272
|
+
return /* @__PURE__ */ jsx50(
|
|
5180
5273
|
"button",
|
|
5181
5274
|
{
|
|
5182
5275
|
ref: composeRefs(setNode, rovingRef),
|
|
@@ -5256,7 +5349,7 @@ function MenubarContent({ children, className, ...rest }) {
|
|
|
5256
5349
|
if (!menu.open) wasOpen.current = false;
|
|
5257
5350
|
}, [menu.open, panelNode, menu.roving, menu.pendingEdge]);
|
|
5258
5351
|
if (!menu.open) return null;
|
|
5259
|
-
return /* @__PURE__ */
|
|
5352
|
+
return /* @__PURE__ */ jsx50(Portal, { children: /* @__PURE__ */ jsx50(
|
|
5260
5353
|
"div",
|
|
5261
5354
|
{
|
|
5262
5355
|
ref: composeRefs(panelRef, (node) => setPanelNode(node), refs.setFloating),
|
|
@@ -5294,7 +5387,7 @@ import { LuX as LuX5 } from "react-icons/lu";
|
|
|
5294
5387
|
// src/components/cards/scroll-area.tsx
|
|
5295
5388
|
import { forwardRef as forwardRef17, useEffect as useEffect16, useRef as useRef21, useState as useState17 } from "react";
|
|
5296
5389
|
import clsx49 from "clsx";
|
|
5297
|
-
import { jsx as
|
|
5390
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
5298
5391
|
var OVERFLOW = {
|
|
5299
5392
|
vertical: "overflow-y-auto overflow-x-hidden",
|
|
5300
5393
|
horizontal: "overflow-x-auto overflow-y-hidden",
|
|
@@ -5320,7 +5413,7 @@ var ScrollArea = forwardRef17(function ScrollArea2({ children, axis = "vertical"
|
|
|
5320
5413
|
if (node.firstElementChild) observer.observe(node.firstElementChild);
|
|
5321
5414
|
return () => observer.disconnect();
|
|
5322
5415
|
}, [axis, children]);
|
|
5323
|
-
return /* @__PURE__ */
|
|
5416
|
+
return /* @__PURE__ */ jsx51(
|
|
5324
5417
|
"div",
|
|
5325
5418
|
{
|
|
5326
5419
|
ref: composeRefs(localRef, ref),
|
|
@@ -5341,10 +5434,10 @@ var ScrollArea = forwardRef17(function ScrollArea2({ children, axis = "vertical"
|
|
|
5341
5434
|
});
|
|
5342
5435
|
|
|
5343
5436
|
// src/components/overlays/drawer.tsx
|
|
5344
|
-
import { jsx as
|
|
5437
|
+
import { jsx as jsx52, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5345
5438
|
function Drawer(props) {
|
|
5346
5439
|
if (!props.open) return null;
|
|
5347
|
-
return /* @__PURE__ */
|
|
5440
|
+
return /* @__PURE__ */ jsx52(Portal, { children: /* @__PURE__ */ jsx52(DrawerShell, { ...props }) });
|
|
5348
5441
|
}
|
|
5349
5442
|
function DrawerShell({
|
|
5350
5443
|
onOpenChange,
|
|
@@ -5368,7 +5461,7 @@ function DrawerShell({
|
|
|
5368
5461
|
onEscapeKeyDown,
|
|
5369
5462
|
onInteractOutside
|
|
5370
5463
|
});
|
|
5371
|
-
return /* @__PURE__ */
|
|
5464
|
+
return /* @__PURE__ */ jsx52(
|
|
5372
5465
|
"div",
|
|
5373
5466
|
{
|
|
5374
5467
|
className: clsx50(
|
|
@@ -5386,20 +5479,20 @@ function DrawerShell({
|
|
|
5386
5479
|
className: clsx50("relative flex h-full flex-col bg-default shadow-500", width, className),
|
|
5387
5480
|
children: [
|
|
5388
5481
|
/* @__PURE__ */ jsxs32("div", { className: "flex items-start justify-between gap-3 border-b border-default p-6", children: [
|
|
5389
|
-
/* @__PURE__ */
|
|
5390
|
-
/* @__PURE__ */
|
|
5482
|
+
/* @__PURE__ */ jsx52("div", { className: "min-w-0", children: header }),
|
|
5483
|
+
/* @__PURE__ */ jsx52(
|
|
5391
5484
|
IconButton,
|
|
5392
5485
|
{
|
|
5393
5486
|
variant: "subtle",
|
|
5394
5487
|
size: "sm",
|
|
5395
5488
|
"aria-label": "Close",
|
|
5396
5489
|
onClick: () => onOpenChange(false),
|
|
5397
|
-
children: /* @__PURE__ */
|
|
5490
|
+
children: /* @__PURE__ */ jsx52(LuX5, { size: 18, "aria-hidden": true })
|
|
5398
5491
|
}
|
|
5399
5492
|
)
|
|
5400
5493
|
] }),
|
|
5401
|
-
/* @__PURE__ */
|
|
5402
|
-
footer && /* @__PURE__ */
|
|
5494
|
+
/* @__PURE__ */ jsx52(ScrollArea, { axis: "vertical", label, className: "min-h-0 flex-1", children: /* @__PURE__ */ jsx52("div", { className: "space-y-6 p-6", children }) }),
|
|
5495
|
+
footer && /* @__PURE__ */ jsx52(
|
|
5403
5496
|
"div",
|
|
5404
5497
|
{
|
|
5405
5498
|
className: clsx50(
|
|
@@ -5417,7 +5510,7 @@ function DrawerShell({
|
|
|
5417
5510
|
}
|
|
5418
5511
|
|
|
5419
5512
|
// src/components/overlays/confirm-dialog.tsx
|
|
5420
|
-
import { jsx as
|
|
5513
|
+
import { jsx as jsx53, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
5421
5514
|
function ConfirmDialog({
|
|
5422
5515
|
open,
|
|
5423
5516
|
title,
|
|
@@ -5448,13 +5541,13 @@ function ConfirmDialog({
|
|
|
5448
5541
|
className,
|
|
5449
5542
|
children: [
|
|
5450
5543
|
/* @__PURE__ */ jsxs33(ModalHeader, { tone, divider: Boolean(children), children: [
|
|
5451
|
-
/* @__PURE__ */
|
|
5452
|
-
subtitle && /* @__PURE__ */
|
|
5544
|
+
/* @__PURE__ */ jsx53(ModalTitle, { children: title }),
|
|
5545
|
+
subtitle && /* @__PURE__ */ jsx53(ModalDescription, { children: subtitle })
|
|
5453
5546
|
] }),
|
|
5454
|
-
children && /* @__PURE__ */
|
|
5547
|
+
children && /* @__PURE__ */ jsx53(ModalBody, { children }),
|
|
5455
5548
|
/* @__PURE__ */ jsxs33(ModalFooter, { children: [
|
|
5456
|
-
/* @__PURE__ */
|
|
5457
|
-
/* @__PURE__ */
|
|
5549
|
+
/* @__PURE__ */ jsx53(Button, { variant: "neutral", size: "md", onClick: () => onOpenChange(false), children: cancelLabel }),
|
|
5550
|
+
/* @__PURE__ */ jsx53(Button, { variant: confirmVariant, size: "md", disabled: isConfirming, onClick: onConfirm, children: isConfirming ? confirmingLabel : confirmLabel })
|
|
5458
5551
|
] })
|
|
5459
5552
|
]
|
|
5460
5553
|
}
|
|
@@ -5464,10 +5557,10 @@ function ConfirmDialog({
|
|
|
5464
5557
|
|
|
5465
5558
|
// src/components/overlays/note-confirm-modal.tsx
|
|
5466
5559
|
import { useState as useState18 } from "react";
|
|
5467
|
-
import { jsx as
|
|
5560
|
+
import { jsx as jsx54, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5468
5561
|
function NoteConfirmModal({ open, ...rest }) {
|
|
5469
5562
|
if (!open) return null;
|
|
5470
|
-
return /* @__PURE__ */
|
|
5563
|
+
return /* @__PURE__ */ jsx54(NoteConfirmModalShell, { ...rest });
|
|
5471
5564
|
}
|
|
5472
5565
|
function NoteConfirmModalShell({
|
|
5473
5566
|
title,
|
|
@@ -5504,10 +5597,10 @@ function NoteConfirmModalShell({
|
|
|
5504
5597
|
onInteractOutside: guardDiscard,
|
|
5505
5598
|
children: [
|
|
5506
5599
|
/* @__PURE__ */ jsxs34(ModalHeader, { tone, children: [
|
|
5507
|
-
/* @__PURE__ */
|
|
5508
|
-
subtitle && /* @__PURE__ */
|
|
5600
|
+
/* @__PURE__ */ jsx54(ModalTitle, { children: title }),
|
|
5601
|
+
subtitle && /* @__PURE__ */ jsx54(ModalDescription, { children: subtitle })
|
|
5509
5602
|
] }),
|
|
5510
|
-
/* @__PURE__ */
|
|
5603
|
+
/* @__PURE__ */ jsx54(ModalBody, { children: /* @__PURE__ */ jsx54(
|
|
5511
5604
|
Textarea,
|
|
5512
5605
|
{
|
|
5513
5606
|
value: note,
|
|
@@ -5517,8 +5610,8 @@ function NoteConfirmModalShell({
|
|
|
5517
5610
|
}
|
|
5518
5611
|
) }),
|
|
5519
5612
|
/* @__PURE__ */ jsxs34(ModalFooter, { children: [
|
|
5520
|
-
/* @__PURE__ */
|
|
5521
|
-
/* @__PURE__ */
|
|
5613
|
+
/* @__PURE__ */ jsx54(Button, { variant: "neutral", size: "md", onClick: () => onOpenChange(false), children: cancelLabel }),
|
|
5614
|
+
/* @__PURE__ */ jsx54(Button, { variant: confirmVariant, size: "md", disabled, onClick: () => onConfirm(note.trim()), children: isSubmitting ? submittingLabel : confirmLabel })
|
|
5522
5615
|
] })
|
|
5523
5616
|
]
|
|
5524
5617
|
}
|
|
@@ -5530,13 +5623,13 @@ import {
|
|
|
5530
5623
|
createContext as createContext10,
|
|
5531
5624
|
useContext as useContext10,
|
|
5532
5625
|
useEffect as useEffect17,
|
|
5533
|
-
useMemo as
|
|
5626
|
+
useMemo as useMemo11,
|
|
5534
5627
|
useRef as useRef23,
|
|
5535
5628
|
useState as useState19
|
|
5536
5629
|
} from "react";
|
|
5537
5630
|
import clsx51 from "clsx";
|
|
5538
5631
|
import { LuEllipsis } from "react-icons/lu";
|
|
5539
|
-
import { jsx as
|
|
5632
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
5540
5633
|
var TriggerNodeContext = createContext10(null);
|
|
5541
5634
|
function useTriggerNode() {
|
|
5542
5635
|
const value = useContext10(TriggerNodeContext);
|
|
@@ -5556,8 +5649,8 @@ function DropdownMenu({
|
|
|
5556
5649
|
});
|
|
5557
5650
|
const menu = useMenuState({ open, setOpen });
|
|
5558
5651
|
const [triggerNode, setTriggerNode] = useState19(null);
|
|
5559
|
-
const anchor =
|
|
5560
|
-
return /* @__PURE__ */
|
|
5652
|
+
const anchor = useMemo11(() => ({ triggerNode, setTriggerNode }), [triggerNode]);
|
|
5653
|
+
return /* @__PURE__ */ jsx55(MenuContext.Provider, { value: menu, children: /* @__PURE__ */ jsx55(TriggerNodeContext.Provider, { value: anchor, children }) });
|
|
5561
5654
|
}
|
|
5562
5655
|
function DropdownMenuTrigger({
|
|
5563
5656
|
children,
|
|
@@ -5589,9 +5682,9 @@ function DropdownMenuTrigger({
|
|
|
5589
5682
|
...rest
|
|
5590
5683
|
};
|
|
5591
5684
|
if (asChild) {
|
|
5592
|
-
return /* @__PURE__ */
|
|
5685
|
+
return /* @__PURE__ */ jsx55(Slot, { ref: composeRefs(anchor.setTriggerNode), ...triggerProps, children });
|
|
5593
5686
|
}
|
|
5594
|
-
return /* @__PURE__ */
|
|
5687
|
+
return /* @__PURE__ */ jsx55(
|
|
5595
5688
|
IconButton,
|
|
5596
5689
|
{
|
|
5597
5690
|
ref: composeRefs(anchor.setTriggerNode),
|
|
@@ -5599,7 +5692,7 @@ function DropdownMenuTrigger({
|
|
|
5599
5692
|
size: "sm",
|
|
5600
5693
|
"aria-label": label,
|
|
5601
5694
|
...triggerProps,
|
|
5602
|
-
children: children ?? /* @__PURE__ */
|
|
5695
|
+
children: children ?? /* @__PURE__ */ jsx55(LuEllipsis, { className: "size-4", "aria-hidden": true })
|
|
5603
5696
|
}
|
|
5604
5697
|
);
|
|
5605
5698
|
}
|
|
@@ -5649,7 +5742,7 @@ function DropdownMenuContent({
|
|
|
5649
5742
|
if (!menu.open) wasOpen.current = false;
|
|
5650
5743
|
}, [menu.open, panelNode, menu.roving, menu.pendingEdge]);
|
|
5651
5744
|
if (!menu.open) return null;
|
|
5652
|
-
return /* @__PURE__ */
|
|
5745
|
+
return /* @__PURE__ */ jsx55(Portal, { children: /* @__PURE__ */ jsx55(
|
|
5653
5746
|
"div",
|
|
5654
5747
|
{
|
|
5655
5748
|
ref: composeRefs(
|
|
@@ -5677,7 +5770,7 @@ function DropdownMenuContent({
|
|
|
5677
5770
|
|
|
5678
5771
|
// src/components/cards/card.tsx
|
|
5679
5772
|
import { createContext as createContext11, useContext as useContext11 } from "react";
|
|
5680
|
-
import { jsx as
|
|
5773
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
5681
5774
|
var RADIUS = {
|
|
5682
5775
|
lg: "rounded-lg",
|
|
5683
5776
|
xl: "rounded-xl",
|
|
@@ -5720,7 +5813,7 @@ var FOOTER_ALIGN2 = {
|
|
|
5720
5813
|
};
|
|
5721
5814
|
var CardHeaderContext = createContext11("md");
|
|
5722
5815
|
function Card({ children, radius = "2xl", tone = "default", className, ...rest }) {
|
|
5723
|
-
return /* @__PURE__ */
|
|
5816
|
+
return /* @__PURE__ */ jsx56(
|
|
5724
5817
|
"div",
|
|
5725
5818
|
{
|
|
5726
5819
|
"data-slot": "card",
|
|
@@ -5737,7 +5830,7 @@ function CardHeader({
|
|
|
5737
5830
|
className,
|
|
5738
5831
|
...rest
|
|
5739
5832
|
}) {
|
|
5740
|
-
return /* @__PURE__ */
|
|
5833
|
+
return /* @__PURE__ */ jsx56(CardHeaderContext.Provider, { value: size2, children: /* @__PURE__ */ jsx56(
|
|
5741
5834
|
"div",
|
|
5742
5835
|
{
|
|
5743
5836
|
"data-slot": "card-header",
|
|
@@ -5754,7 +5847,7 @@ function CardHeader({
|
|
|
5754
5847
|
) });
|
|
5755
5848
|
}
|
|
5756
5849
|
function CardTitle({ children, size: size2 = "md", as: Tag = "p", className, ...rest }) {
|
|
5757
|
-
return /* @__PURE__ */
|
|
5850
|
+
return /* @__PURE__ */ jsx56(
|
|
5758
5851
|
Tag,
|
|
5759
5852
|
{
|
|
5760
5853
|
"data-slot": "card-title",
|
|
@@ -5766,7 +5859,7 @@ function CardTitle({ children, size: size2 = "md", as: Tag = "p", className, ...
|
|
|
5766
5859
|
}
|
|
5767
5860
|
function CardDescription({ children, size: size2, className, ...rest }) {
|
|
5768
5861
|
const inherited = useContext11(CardHeaderContext);
|
|
5769
|
-
return /* @__PURE__ */
|
|
5862
|
+
return /* @__PURE__ */ jsx56(
|
|
5770
5863
|
"p",
|
|
5771
5864
|
{
|
|
5772
5865
|
"data-slot": "card-description",
|
|
@@ -5781,7 +5874,7 @@ function CardDescription({ children, size: size2, className, ...rest }) {
|
|
|
5781
5874
|
);
|
|
5782
5875
|
}
|
|
5783
5876
|
function CardAction({ children, className, ...rest }) {
|
|
5784
|
-
return /* @__PURE__ */
|
|
5877
|
+
return /* @__PURE__ */ jsx56(
|
|
5785
5878
|
"div",
|
|
5786
5879
|
{
|
|
5787
5880
|
"data-slot": "card-action",
|
|
@@ -5792,7 +5885,7 @@ function CardAction({ children, className, ...rest }) {
|
|
|
5792
5885
|
);
|
|
5793
5886
|
}
|
|
5794
5887
|
function CardBody({ children, size: size2 = "md", className, ...rest }) {
|
|
5795
|
-
return /* @__PURE__ */
|
|
5888
|
+
return /* @__PURE__ */ jsx56("div", { "data-slot": "card-body", className: cn("flex flex-col", BODY_BOX[size2], className), ...rest, children });
|
|
5796
5889
|
}
|
|
5797
5890
|
function CardFooter({
|
|
5798
5891
|
children,
|
|
@@ -5802,7 +5895,7 @@ function CardFooter({
|
|
|
5802
5895
|
className,
|
|
5803
5896
|
...rest
|
|
5804
5897
|
}) {
|
|
5805
|
-
return /* @__PURE__ */
|
|
5898
|
+
return /* @__PURE__ */ jsx56(
|
|
5806
5899
|
"div",
|
|
5807
5900
|
{
|
|
5808
5901
|
"data-slot": "card-footer",
|
|
@@ -5825,12 +5918,12 @@ import {
|
|
|
5825
5918
|
useCallback as useCallback8,
|
|
5826
5919
|
useContext as useContext12,
|
|
5827
5920
|
useId as useId17,
|
|
5828
|
-
useMemo as
|
|
5921
|
+
useMemo as useMemo12,
|
|
5829
5922
|
useRef as useRef24
|
|
5830
5923
|
} from "react";
|
|
5831
5924
|
import clsx52 from "clsx";
|
|
5832
5925
|
import { LuChevronDown as LuChevronDown3 } from "react-icons/lu";
|
|
5833
|
-
import { jsx as
|
|
5926
|
+
import { jsx as jsx57, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
5834
5927
|
var AccordionContext = createContext12(null);
|
|
5835
5928
|
var AccordionItemContext = createContext12(null);
|
|
5836
5929
|
function useAccordion(part) {
|
|
@@ -5875,11 +5968,11 @@ function Accordion({
|
|
|
5875
5968
|
const roving = useRovingFocus({ orientation: "vertical", loop: true });
|
|
5876
5969
|
cursor.current = 0;
|
|
5877
5970
|
const claimIndex = useCallback8(() => cursor.current++, []);
|
|
5878
|
-
const context =
|
|
5971
|
+
const context = useMemo12(
|
|
5879
5972
|
() => ({ isOpen, toggle, baseId, claimIndex, roving, headingLevel }),
|
|
5880
5973
|
[isOpen, toggle, baseId, claimIndex, roving, headingLevel]
|
|
5881
5974
|
);
|
|
5882
|
-
return /* @__PURE__ */
|
|
5975
|
+
return /* @__PURE__ */ jsx57(AccordionContext.Provider, { value: context, children: /* @__PURE__ */ jsx57(
|
|
5883
5976
|
"div",
|
|
5884
5977
|
{
|
|
5885
5978
|
"data-slot": "accordion",
|
|
@@ -5898,8 +5991,8 @@ function AccordionItem({
|
|
|
5898
5991
|
...rest
|
|
5899
5992
|
}) {
|
|
5900
5993
|
const ctx = useAccordion("AccordionItem");
|
|
5901
|
-
const itemContext =
|
|
5902
|
-
return /* @__PURE__ */
|
|
5994
|
+
const itemContext = useMemo12(() => ({ value, disabled }), [value, disabled]);
|
|
5995
|
+
return /* @__PURE__ */ jsx57(AccordionItemContext.Provider, { value: itemContext, children: /* @__PURE__ */ jsx57(
|
|
5903
5996
|
"div",
|
|
5904
5997
|
{
|
|
5905
5998
|
"data-slot": "accordion-item",
|
|
@@ -5929,7 +6022,7 @@ function AccordionTrigger({
|
|
|
5929
6022
|
return (
|
|
5930
6023
|
// The heading carries no styling of its own — it exists so the accordion shows up in
|
|
5931
6024
|
// the document outline, which is how screen reader users navigate between sections.
|
|
5932
|
-
/* @__PURE__ */
|
|
6025
|
+
/* @__PURE__ */ jsx57(Heading2, { className: "m-0", children: /* @__PURE__ */ jsxs35(
|
|
5933
6026
|
"button",
|
|
5934
6027
|
{
|
|
5935
6028
|
type: "button",
|
|
@@ -5950,8 +6043,8 @@ function AccordionTrigger({
|
|
|
5950
6043
|
),
|
|
5951
6044
|
...rest,
|
|
5952
6045
|
children: [
|
|
5953
|
-
/* @__PURE__ */
|
|
5954
|
-
!hideIndicator && /* @__PURE__ */
|
|
6046
|
+
/* @__PURE__ */ jsx57("span", { className: "min-w-0 flex-1", children }),
|
|
6047
|
+
!hideIndicator && /* @__PURE__ */ jsx57(
|
|
5955
6048
|
LuChevronDown3,
|
|
5956
6049
|
{
|
|
5957
6050
|
"aria-hidden": true,
|
|
@@ -5971,7 +6064,7 @@ function AccordionContent({ children, className, ...rest }) {
|
|
|
5971
6064
|
const item = useContext12(AccordionItemContext);
|
|
5972
6065
|
if (!item) throw new Error("<AccordionContent> must be used inside <AccordionItem>");
|
|
5973
6066
|
if (!ctx.isOpen(item.value)) return null;
|
|
5974
|
-
return /* @__PURE__ */
|
|
6067
|
+
return /* @__PURE__ */ jsx57(
|
|
5975
6068
|
"div",
|
|
5976
6069
|
{
|
|
5977
6070
|
id: `${ctx.baseId}-content-${item.value}`,
|
|
@@ -5991,7 +6084,7 @@ import {
|
|
|
5991
6084
|
useContext as useContext13,
|
|
5992
6085
|
useId as useId18
|
|
5993
6086
|
} from "react";
|
|
5994
|
-
import { jsx as
|
|
6087
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
5995
6088
|
var CollapsibleContext = createContext13(null);
|
|
5996
6089
|
function useCollapsible(part) {
|
|
5997
6090
|
const context = useContext13(CollapsibleContext);
|
|
@@ -6013,7 +6106,7 @@ function Collapsible({
|
|
|
6013
6106
|
onChange: onOpenChange
|
|
6014
6107
|
});
|
|
6015
6108
|
const baseId = useId18();
|
|
6016
|
-
return /* @__PURE__ */
|
|
6109
|
+
return /* @__PURE__ */ jsx58(
|
|
6017
6110
|
CollapsibleContext.Provider,
|
|
6018
6111
|
{
|
|
6019
6112
|
value: {
|
|
@@ -6023,7 +6116,7 @@ function Collapsible({
|
|
|
6023
6116
|
contentId: `${baseId}-content`,
|
|
6024
6117
|
disabled
|
|
6025
6118
|
},
|
|
6026
|
-
children: /* @__PURE__ */
|
|
6119
|
+
children: /* @__PURE__ */ jsx58("div", { "data-slot": "collapsible", "data-state": open ? "open" : "closed", className, ...rest, children })
|
|
6027
6120
|
}
|
|
6028
6121
|
);
|
|
6029
6122
|
}
|
|
@@ -6044,9 +6137,9 @@ function CollapsibleTrigger({
|
|
|
6044
6137
|
...rest
|
|
6045
6138
|
};
|
|
6046
6139
|
if (asChild) {
|
|
6047
|
-
return /* @__PURE__ */
|
|
6140
|
+
return /* @__PURE__ */ jsx58(Slot, { "aria-disabled": ctx.disabled || void 0, ...triggerProps, children });
|
|
6048
6141
|
}
|
|
6049
|
-
return /* @__PURE__ */
|
|
6142
|
+
return /* @__PURE__ */ jsx58("button", { type: "button", disabled: ctx.disabled, ...triggerProps, children });
|
|
6050
6143
|
}
|
|
6051
6144
|
function CollapsibleContent({
|
|
6052
6145
|
children,
|
|
@@ -6056,7 +6149,7 @@ function CollapsibleContent({
|
|
|
6056
6149
|
}) {
|
|
6057
6150
|
const ctx = useCollapsible("CollapsibleContent");
|
|
6058
6151
|
if (!ctx.open && !keepMounted) return null;
|
|
6059
|
-
return /* @__PURE__ */
|
|
6152
|
+
return /* @__PURE__ */ jsx58(
|
|
6060
6153
|
"div",
|
|
6061
6154
|
{
|
|
6062
6155
|
id: ctx.contentId,
|
|
@@ -6074,9 +6167,9 @@ function CollapsibleContent({
|
|
|
6074
6167
|
// src/components/cards/aspect-ratio.tsx
|
|
6075
6168
|
import { forwardRef as forwardRef18 } from "react";
|
|
6076
6169
|
import clsx53 from "clsx";
|
|
6077
|
-
import { jsx as
|
|
6170
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
6078
6171
|
var AspectRatio = forwardRef18(function AspectRatio2({ children, ratio = 1, className, style, ...rest }, ref) {
|
|
6079
|
-
return /* @__PURE__ */
|
|
6172
|
+
return /* @__PURE__ */ jsx59(
|
|
6080
6173
|
"div",
|
|
6081
6174
|
{
|
|
6082
6175
|
ref,
|
|
@@ -6096,13 +6189,13 @@ import {
|
|
|
6096
6189
|
useContext as useContext14,
|
|
6097
6190
|
useEffect as useEffect18,
|
|
6098
6191
|
useId as useId19,
|
|
6099
|
-
useMemo as
|
|
6192
|
+
useMemo as useMemo13,
|
|
6100
6193
|
useRef as useRef25,
|
|
6101
6194
|
useState as useState20
|
|
6102
6195
|
} from "react";
|
|
6103
6196
|
import clsx54 from "clsx";
|
|
6104
6197
|
import { LuChevronLeft as LuChevronLeft2, LuChevronRight as LuChevronRight3 } from "react-icons/lu";
|
|
6105
|
-
import { jsx as
|
|
6198
|
+
import { jsx as jsx60, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6106
6199
|
var CarouselContext = createContext14(null);
|
|
6107
6200
|
function useCarousel(part) {
|
|
6108
6201
|
const value = useContext14(CarouselContext);
|
|
@@ -6131,7 +6224,7 @@ function Carousel({
|
|
|
6131
6224
|
const [paused, setPaused] = useState20(false);
|
|
6132
6225
|
const [userTookControl, setUserTookControl] = useState20(false);
|
|
6133
6226
|
const hasAutoplay = autoplayInterval !== void 0 && autoplayInterval > 0;
|
|
6134
|
-
const context =
|
|
6227
|
+
const context = useMemo13(
|
|
6135
6228
|
() => ({
|
|
6136
6229
|
index,
|
|
6137
6230
|
setIndex: (next) => {
|
|
@@ -6160,7 +6253,7 @@ function Carousel({
|
|
|
6160
6253
|
}, autoplayInterval);
|
|
6161
6254
|
return () => clearInterval(timer);
|
|
6162
6255
|
}, [hasAutoplay, paused, userTookControl, autoplayInterval, index, count, loop, setIndex]);
|
|
6163
|
-
return /* @__PURE__ */
|
|
6256
|
+
return /* @__PURE__ */ jsx60(CarouselContext.Provider, { value: context, children: /* @__PURE__ */ jsx60(
|
|
6164
6257
|
"div",
|
|
6165
6258
|
{
|
|
6166
6259
|
role: "region",
|
|
@@ -6193,7 +6286,7 @@ function Carousel({
|
|
|
6193
6286
|
}
|
|
6194
6287
|
function CarouselViewport({ children, className, ...rest }) {
|
|
6195
6288
|
const carousel = useCarousel("CarouselViewport");
|
|
6196
|
-
return /* @__PURE__ */
|
|
6289
|
+
return /* @__PURE__ */ jsx60(
|
|
6197
6290
|
"div",
|
|
6198
6291
|
{
|
|
6199
6292
|
id: `${carousel.baseId}-viewport`,
|
|
@@ -6208,7 +6301,7 @@ function CarouselSlide({ children, className, ...rest }) {
|
|
|
6208
6301
|
const carousel = useCarousel("CarouselSlide");
|
|
6209
6302
|
const slideIndex = carousel.registerSlide();
|
|
6210
6303
|
const active = slideIndex === carousel.index;
|
|
6211
|
-
return /* @__PURE__ */
|
|
6304
|
+
return /* @__PURE__ */ jsx60(
|
|
6212
6305
|
"div",
|
|
6213
6306
|
{
|
|
6214
6307
|
role: "group",
|
|
@@ -6238,7 +6331,7 @@ function CarouselControls({ showDots = true, className, ...rest }) {
|
|
|
6238
6331
|
className: clsx54("mt-3 flex items-center justify-between gap-3", className),
|
|
6239
6332
|
...rest,
|
|
6240
6333
|
children: [
|
|
6241
|
-
/* @__PURE__ */
|
|
6334
|
+
/* @__PURE__ */ jsx60(
|
|
6242
6335
|
IconButton,
|
|
6243
6336
|
{
|
|
6244
6337
|
variant: "neutral",
|
|
@@ -6247,10 +6340,10 @@ function CarouselControls({ showDots = true, className, ...rest }) {
|
|
|
6247
6340
|
"aria-controls": `${carousel.baseId}-viewport`,
|
|
6248
6341
|
disabled: !loop && index === 0,
|
|
6249
6342
|
onClick: () => go(index - 1),
|
|
6250
|
-
children: /* @__PURE__ */
|
|
6343
|
+
children: /* @__PURE__ */ jsx60(LuChevronLeft2, { "aria-hidden": true, size: 16 })
|
|
6251
6344
|
}
|
|
6252
6345
|
),
|
|
6253
|
-
showDots && /* @__PURE__ */
|
|
6346
|
+
showDots && /* @__PURE__ */ jsx60("div", { role: "group", "aria-label": `Slide ${index + 1} of ${count}`, className: "flex items-center gap-2", children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx60(
|
|
6254
6347
|
"button",
|
|
6255
6348
|
{
|
|
6256
6349
|
type: "button",
|
|
@@ -6266,17 +6359,17 @@ function CarouselControls({ showDots = true, className, ...rest }) {
|
|
|
6266
6359
|
i
|
|
6267
6360
|
)) }),
|
|
6268
6361
|
/* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-1.5", children: [
|
|
6269
|
-
carousel.hasAutoplay && /* @__PURE__ */
|
|
6362
|
+
carousel.hasAutoplay && /* @__PURE__ */ jsx60(
|
|
6270
6363
|
IconButton,
|
|
6271
6364
|
{
|
|
6272
6365
|
variant: "neutral",
|
|
6273
6366
|
size: "sm",
|
|
6274
6367
|
"aria-label": carousel.paused ? "Start automatic slide show" : "Stop automatic slide show",
|
|
6275
6368
|
onClick: () => carousel.setPaused(!carousel.paused),
|
|
6276
|
-
children: /* @__PURE__ */
|
|
6369
|
+
children: /* @__PURE__ */ jsx60("span", { "aria-hidden": true, className: "text-body-tiny font-semibold", children: carousel.paused ? "\u25B6" : "\u275A\u275A" })
|
|
6277
6370
|
}
|
|
6278
6371
|
),
|
|
6279
|
-
/* @__PURE__ */
|
|
6372
|
+
/* @__PURE__ */ jsx60(
|
|
6280
6373
|
IconButton,
|
|
6281
6374
|
{
|
|
6282
6375
|
variant: "neutral",
|
|
@@ -6285,7 +6378,7 @@ function CarouselControls({ showDots = true, className, ...rest }) {
|
|
|
6285
6378
|
"aria-controls": `${carousel.baseId}-viewport`,
|
|
6286
6379
|
disabled: !loop && index === count - 1,
|
|
6287
6380
|
onClick: () => go(index + 1),
|
|
6288
|
-
children: /* @__PURE__ */
|
|
6381
|
+
children: /* @__PURE__ */ jsx60(LuChevronRight3, { "aria-hidden": true, size: 16 })
|
|
6289
6382
|
}
|
|
6290
6383
|
)
|
|
6291
6384
|
] })
|
|
@@ -6301,12 +6394,12 @@ import {
|
|
|
6301
6394
|
useContext as useContext15,
|
|
6302
6395
|
useEffect as useEffect19,
|
|
6303
6396
|
useId as useId20,
|
|
6304
|
-
useMemo as
|
|
6397
|
+
useMemo as useMemo14,
|
|
6305
6398
|
useRef as useRef26,
|
|
6306
6399
|
useState as useState21
|
|
6307
6400
|
} from "react";
|
|
6308
6401
|
import clsx55 from "clsx";
|
|
6309
|
-
import { jsx as
|
|
6402
|
+
import { jsx as jsx61, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6310
6403
|
var ResizableContext = createContext15(null);
|
|
6311
6404
|
function useResizable(part) {
|
|
6312
6405
|
const value = useContext15(ResizableContext);
|
|
@@ -6332,7 +6425,7 @@ function Resizable({
|
|
|
6332
6425
|
const containerRef = useRef26(null);
|
|
6333
6426
|
const baseId = useId20();
|
|
6334
6427
|
const [dragging, setDragging] = useState21(false);
|
|
6335
|
-
const context =
|
|
6428
|
+
const context = useMemo14(
|
|
6336
6429
|
() => ({
|
|
6337
6430
|
direction,
|
|
6338
6431
|
size: size2,
|
|
@@ -6346,7 +6439,7 @@ function Resizable({
|
|
|
6346
6439
|
}),
|
|
6347
6440
|
[direction, size2, setSize, min, max, baseId, dragging]
|
|
6348
6441
|
);
|
|
6349
|
-
return /* @__PURE__ */
|
|
6442
|
+
return /* @__PURE__ */ jsx61(ResizableContext.Provider, { value: context, children: /* @__PURE__ */ jsx61(
|
|
6350
6443
|
"div",
|
|
6351
6444
|
{
|
|
6352
6445
|
ref: containerRef,
|
|
@@ -6370,7 +6463,7 @@ function ResizablePanel({ children, which, className, ...rest }) {
|
|
|
6370
6463
|
return (
|
|
6371
6464
|
// A panel holds arbitrary content, which may be entirely static — so it needs the tab
|
|
6372
6465
|
// stop `ScrollArea` adds while overflowing, not just the scrollbar styling.
|
|
6373
|
-
/* @__PURE__ */
|
|
6466
|
+
/* @__PURE__ */ jsx61(
|
|
6374
6467
|
ScrollArea,
|
|
6375
6468
|
{
|
|
6376
6469
|
axis: "both",
|
|
@@ -6474,14 +6567,14 @@ function ResizableHandle({
|
|
|
6474
6567
|
),
|
|
6475
6568
|
...rest,
|
|
6476
6569
|
children: [
|
|
6477
|
-
/* @__PURE__ */
|
|
6570
|
+
/* @__PURE__ */ jsx61(
|
|
6478
6571
|
"span",
|
|
6479
6572
|
{
|
|
6480
6573
|
"aria-hidden": true,
|
|
6481
6574
|
className: clsx55("absolute", horizontal ? "inset-y-0 -inset-x-1.5" : "-inset-y-1.5 inset-x-0")
|
|
6482
6575
|
}
|
|
6483
6576
|
),
|
|
6484
|
-
withGrip && /* @__PURE__ */
|
|
6577
|
+
withGrip && /* @__PURE__ */ jsx61(
|
|
6485
6578
|
"span",
|
|
6486
6579
|
{
|
|
6487
6580
|
"aria-hidden": true,
|
|
@@ -6490,7 +6583,7 @@ function ResizableHandle({
|
|
|
6490
6583
|
"opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",
|
|
6491
6584
|
horizontal ? "h-6 w-2.5" : "h-2.5 w-6"
|
|
6492
6585
|
),
|
|
6493
|
-
children: /* @__PURE__ */
|
|
6586
|
+
children: /* @__PURE__ */ jsx61("span", { className: clsx55("rounded-full bg-default-tertiary", horizontal ? "h-2.5 w-px" : "h-px w-2.5") })
|
|
6494
6587
|
}
|
|
6495
6588
|
)
|
|
6496
6589
|
]
|
|
@@ -6501,7 +6594,7 @@ function ResizableHandle({
|
|
|
6501
6594
|
|
|
6502
6595
|
// src/components/chrome/page-heading.tsx
|
|
6503
6596
|
import clsx56 from "clsx";
|
|
6504
|
-
import { jsx as
|
|
6597
|
+
import { jsx as jsx62, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
6505
6598
|
var TITLE = {
|
|
6506
6599
|
// `text-2xl` was stock Tailwind rather than the design tokens. Same 24px, now on-token.
|
|
6507
6600
|
page: "text-heading font-semibold text-default",
|
|
@@ -6527,25 +6620,25 @@ function PageHeading({
|
|
|
6527
6620
|
}) {
|
|
6528
6621
|
const Tag = as ?? (size2 === "section" ? "h2" : "h1");
|
|
6529
6622
|
const heading = /* @__PURE__ */ jsxs38("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
6530
|
-
/* @__PURE__ */
|
|
6531
|
-
subtitle && /* @__PURE__ */
|
|
6623
|
+
/* @__PURE__ */ jsx62(Tag, { className: clsx56(TITLE[size2], truncateTitle && "truncate"), children: title }),
|
|
6624
|
+
subtitle && /* @__PURE__ */ jsx62("p", { className: SUBTITLE[size2], children: subtitle })
|
|
6532
6625
|
] });
|
|
6533
|
-
if (!actions) return className ? /* @__PURE__ */
|
|
6626
|
+
if (!actions) return className ? /* @__PURE__ */ jsx62("div", { className, children: heading }) : heading;
|
|
6534
6627
|
return /* @__PURE__ */ jsxs38("div", { className: clsx56("flex items-start justify-between gap-4", className), children: [
|
|
6535
6628
|
heading,
|
|
6536
|
-
/* @__PURE__ */
|
|
6629
|
+
/* @__PURE__ */ jsx62("div", { className: "flex shrink-0 items-center gap-2", children: actions })
|
|
6537
6630
|
] });
|
|
6538
6631
|
}
|
|
6539
6632
|
|
|
6540
6633
|
// src/components/chrome/page-toolbar.tsx
|
|
6541
6634
|
import clsx57 from "clsx";
|
|
6542
|
-
import { jsx as
|
|
6635
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
6543
6636
|
var SIZE8 = {
|
|
6544
6637
|
sm: "min-h-[56px] px-4 py-3 md:px-7",
|
|
6545
6638
|
md: "min-h-[72px] px-4 py-4 md:px-7"
|
|
6546
6639
|
};
|
|
6547
6640
|
function PageToolbar({ children, wrap, size: size2 = "md", className }) {
|
|
6548
|
-
return /* @__PURE__ */
|
|
6641
|
+
return /* @__PURE__ */ jsx63(
|
|
6549
6642
|
"div",
|
|
6550
6643
|
{
|
|
6551
6644
|
className: clsx57(
|
|
@@ -6561,22 +6654,22 @@ function PageToolbar({ children, wrap, size: size2 = "md", className }) {
|
|
|
6561
6654
|
|
|
6562
6655
|
// src/components/chrome/filter-bar.tsx
|
|
6563
6656
|
import clsx58 from "clsx";
|
|
6564
|
-
import { jsx as
|
|
6657
|
+
import { jsx as jsx64, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
6565
6658
|
var GAP2 = {
|
|
6566
6659
|
sm: "gap-2",
|
|
6567
6660
|
md: "gap-3"
|
|
6568
6661
|
};
|
|
6569
6662
|
function FilterBar({ children, trailing, size: size2 = "md", className }) {
|
|
6570
|
-
return /* @__PURE__ */
|
|
6663
|
+
return /* @__PURE__ */ jsx64(ControlSizeProvider, { size: size2, children: /* @__PURE__ */ jsxs39("div", { className: clsx58("flex flex-wrap items-center", GAP2[size2], className), children: [
|
|
6571
6664
|
children,
|
|
6572
|
-
trailing && /* @__PURE__ */
|
|
6665
|
+
trailing && /* @__PURE__ */ jsx64("div", { className: clsx58("ml-auto flex items-center", GAP2[size2]), children: trailing })
|
|
6573
6666
|
] }) });
|
|
6574
6667
|
}
|
|
6575
6668
|
|
|
6576
6669
|
// src/components/chrome/tabs.tsx
|
|
6577
6670
|
import { useId as useId21 } from "react";
|
|
6578
6671
|
import clsx59 from "clsx";
|
|
6579
|
-
import { jsx as
|
|
6672
|
+
import { jsx as jsx65, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
6580
6673
|
var SIZE9 = {
|
|
6581
6674
|
underline: {
|
|
6582
6675
|
sm: { strip: "gap-4", tab: "px-0.5 py-1.5 text-body-xs" },
|
|
@@ -6620,7 +6713,7 @@ function Tabs({
|
|
|
6620
6713
|
loop: true,
|
|
6621
6714
|
defaultIndex: selectedIndex
|
|
6622
6715
|
});
|
|
6623
|
-
return /* @__PURE__ */
|
|
6716
|
+
return /* @__PURE__ */ jsx65(
|
|
6624
6717
|
"div",
|
|
6625
6718
|
{
|
|
6626
6719
|
role: "tablist",
|
|
@@ -6675,7 +6768,7 @@ function Tabs({
|
|
|
6675
6768
|
),
|
|
6676
6769
|
children: [
|
|
6677
6770
|
tab.label,
|
|
6678
|
-
tab.count !== void 0 && /* @__PURE__ */
|
|
6771
|
+
tab.count !== void 0 && /* @__PURE__ */ jsx65(
|
|
6679
6772
|
"span",
|
|
6680
6773
|
{
|
|
6681
6774
|
className: clsx59(
|
|
@@ -6703,7 +6796,7 @@ function TabsPanel({
|
|
|
6703
6796
|
...rest
|
|
6704
6797
|
}) {
|
|
6705
6798
|
if (!active && !keepMounted) return null;
|
|
6706
|
-
return /* @__PURE__ */
|
|
6799
|
+
return /* @__PURE__ */ jsx65(
|
|
6707
6800
|
"div",
|
|
6708
6801
|
{
|
|
6709
6802
|
role: "tabpanel",
|
|
@@ -6720,7 +6813,7 @@ function TabsPanel({
|
|
|
6720
6813
|
|
|
6721
6814
|
// src/components/chrome/nav-item.tsx
|
|
6722
6815
|
import clsx60 from "clsx";
|
|
6723
|
-
import { Fragment as Fragment8, jsx as
|
|
6816
|
+
import { Fragment as Fragment8, jsx as jsx66, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
6724
6817
|
var SIZE10 = {
|
|
6725
6818
|
sm: { box: "h-9 gap-2 rounded-lg px-3 py-1.5", label: "text-body-xs", square: "w-9" },
|
|
6726
6819
|
md: { box: "h-11 gap-3 rounded-xl px-3.5 py-2.5", label: "text-body-sm", square: "w-11" }
|
|
@@ -6799,13 +6892,13 @@ function NavItem({
|
|
|
6799
6892
|
...rest
|
|
6800
6893
|
};
|
|
6801
6894
|
const content = /* @__PURE__ */ jsxs41(Fragment8, { children: [
|
|
6802
|
-
icon != null ? /* @__PURE__ */
|
|
6895
|
+
icon != null ? /* @__PURE__ */ jsx66("span", { "aria-hidden": true, className: "shrink-0 [&_svg]:size-4", children: icon }) : (
|
|
6803
6896
|
// Icons are optional, but the collapsed rail hides the label — so a row with neither
|
|
6804
6897
|
// renders as an empty box. Through 0.5.0 that is exactly what a nav without icons
|
|
6805
6898
|
// collapsed to, the docs site's own 36-row sidebar included. The monogram is
|
|
6806
6899
|
// decorative in the same way the icon is: the `sr-only` label below still names the
|
|
6807
6900
|
// row.
|
|
6808
|
-
collapsed && /* @__PURE__ */
|
|
6901
|
+
collapsed && /* @__PURE__ */ jsx66(
|
|
6809
6902
|
"span",
|
|
6810
6903
|
{
|
|
6811
6904
|
"aria-hidden": true,
|
|
@@ -6814,7 +6907,7 @@ function NavItem({
|
|
|
6814
6907
|
}
|
|
6815
6908
|
)
|
|
6816
6909
|
),
|
|
6817
|
-
/* @__PURE__ */
|
|
6910
|
+
/* @__PURE__ */ jsx66(
|
|
6818
6911
|
"span",
|
|
6819
6912
|
{
|
|
6820
6913
|
className: clsx60(
|
|
@@ -6825,7 +6918,7 @@ function NavItem({
|
|
|
6825
6918
|
children: label
|
|
6826
6919
|
}
|
|
6827
6920
|
),
|
|
6828
|
-
indicator && /* @__PURE__ */
|
|
6921
|
+
indicator && /* @__PURE__ */ jsx66(
|
|
6829
6922
|
"span",
|
|
6830
6923
|
{
|
|
6831
6924
|
role: "status",
|
|
@@ -6835,16 +6928,16 @@ function NavItem({
|
|
|
6835
6928
|
)
|
|
6836
6929
|
] });
|
|
6837
6930
|
if (asChild) {
|
|
6838
|
-
return /* @__PURE__ */
|
|
6931
|
+
return /* @__PURE__ */ jsx66(Slot, { wrapChildren: () => content, ...rootProps, children });
|
|
6839
6932
|
}
|
|
6840
|
-
return /* @__PURE__ */
|
|
6933
|
+
return /* @__PURE__ */ jsx66("span", { ...rootProps, children: content });
|
|
6841
6934
|
}
|
|
6842
6935
|
|
|
6843
6936
|
// src/components/chrome/eyebrow-label.tsx
|
|
6844
6937
|
import clsx61 from "clsx";
|
|
6845
|
-
import { jsx as
|
|
6938
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
6846
6939
|
function EyebrowLabel({ children, variant = "uppercase", className }) {
|
|
6847
|
-
return /* @__PURE__ */
|
|
6940
|
+
return /* @__PURE__ */ jsx67(
|
|
6848
6941
|
"p",
|
|
6849
6942
|
{
|
|
6850
6943
|
className: clsx61(
|
|
@@ -6860,9 +6953,9 @@ function EyebrowLabel({ children, variant = "uppercase", className }) {
|
|
|
6860
6953
|
// src/components/chrome/separator.tsx
|
|
6861
6954
|
import { forwardRef as forwardRef19 } from "react";
|
|
6862
6955
|
import clsx62 from "clsx";
|
|
6863
|
-
import { jsx as
|
|
6956
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
6864
6957
|
var Separator = forwardRef19(function Separator2({ orientation = "horizontal", decorative = true, className, ...rest }, ref) {
|
|
6865
|
-
return /* @__PURE__ */
|
|
6958
|
+
return /* @__PURE__ */ jsx68(
|
|
6866
6959
|
"div",
|
|
6867
6960
|
{
|
|
6868
6961
|
ref,
|
|
@@ -6882,13 +6975,13 @@ var Separator = forwardRef19(function Separator2({ orientation = "horizontal", d
|
|
|
6882
6975
|
// src/components/chrome/kbd.tsx
|
|
6883
6976
|
import { forwardRef as forwardRef20 } from "react";
|
|
6884
6977
|
import clsx63 from "clsx";
|
|
6885
|
-
import { jsx as
|
|
6978
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
6886
6979
|
var SIZE11 = {
|
|
6887
6980
|
sm: "h-4 min-w-4 px-1 text-body-tiny",
|
|
6888
6981
|
md: "h-5 min-w-5 px-1.5 text-body-xs"
|
|
6889
6982
|
};
|
|
6890
6983
|
var Kbd = forwardRef20(function Kbd2({ children, size: size2 = "md", className, ...rest }, ref) {
|
|
6891
|
-
return /* @__PURE__ */
|
|
6984
|
+
return /* @__PURE__ */ jsx69(
|
|
6892
6985
|
"kbd",
|
|
6893
6986
|
{
|
|
6894
6987
|
ref,
|
|
@@ -6909,15 +7002,15 @@ var Kbd = forwardRef20(function Kbd2({ children, size: size2 = "md", className,
|
|
|
6909
7002
|
import { forwardRef as forwardRef21 } from "react";
|
|
6910
7003
|
import clsx64 from "clsx";
|
|
6911
7004
|
import { LuChevronRight as LuChevronRight4 } from "react-icons/lu";
|
|
6912
|
-
import { jsx as
|
|
7005
|
+
import { jsx as jsx70, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
6913
7006
|
var Breadcrumb = forwardRef21(function Breadcrumb2({ children, label = "Breadcrumb", className, ...rest }, ref) {
|
|
6914
|
-
return /* @__PURE__ */
|
|
7007
|
+
return /* @__PURE__ */ jsx70("nav", { ref, "aria-label": label, "data-slot": "breadcrumb", ...rest, children: /* @__PURE__ */ jsx70("ol", { className: clsx64("flex flex-wrap items-center gap-1.5 p-0 text-body-xs", className), children }) });
|
|
6915
7008
|
});
|
|
6916
7009
|
var BreadcrumbItem = forwardRef21(
|
|
6917
7010
|
function BreadcrumbItem2({ children, current = false, asChild = false, first = false, className, ...rest }, ref) {
|
|
6918
7011
|
return /* @__PURE__ */ jsxs42("li", { className: "flex items-center gap-1.5", children: [
|
|
6919
|
-
!first && /* @__PURE__ */
|
|
6920
|
-
current ? /* @__PURE__ */
|
|
7012
|
+
!first && /* @__PURE__ */ jsx70(LuChevronRight4, { "aria-hidden": true, className: "size-3.5 shrink-0 text-icon-default-tertiary" }),
|
|
7013
|
+
current ? /* @__PURE__ */ jsx70("span", { "aria-current": "page", className: clsx64("font-medium text-default", className), children }) : asChild ? /* @__PURE__ */ jsx70(
|
|
6921
7014
|
Slot,
|
|
6922
7015
|
{
|
|
6923
7016
|
className: clsx64(
|
|
@@ -6928,7 +7021,7 @@ var BreadcrumbItem = forwardRef21(
|
|
|
6928
7021
|
...rest,
|
|
6929
7022
|
children
|
|
6930
7023
|
}
|
|
6931
|
-
) : /* @__PURE__ */
|
|
7024
|
+
) : /* @__PURE__ */ jsx70(
|
|
6932
7025
|
"a",
|
|
6933
7026
|
{
|
|
6934
7027
|
ref,
|
|
@@ -6947,8 +7040,8 @@ var BreadcrumbItem = forwardRef21(
|
|
|
6947
7040
|
var BreadcrumbEllipsis = forwardRef21(
|
|
6948
7041
|
function BreadcrumbEllipsis2({ className, ...rest }, ref) {
|
|
6949
7042
|
return /* @__PURE__ */ jsxs42("li", { className: "flex items-center gap-1.5", children: [
|
|
6950
|
-
/* @__PURE__ */
|
|
6951
|
-
/* @__PURE__ */
|
|
7043
|
+
/* @__PURE__ */ jsx70(LuChevronRight4, { "aria-hidden": true, className: "size-3.5 shrink-0 text-icon-default-tertiary" }),
|
|
7044
|
+
/* @__PURE__ */ jsx70(
|
|
6952
7045
|
"span",
|
|
6953
7046
|
{
|
|
6954
7047
|
ref,
|
|
@@ -6966,7 +7059,7 @@ var BreadcrumbEllipsis = forwardRef21(
|
|
|
6966
7059
|
import { forwardRef as forwardRef22 } from "react";
|
|
6967
7060
|
import clsx65 from "clsx";
|
|
6968
7061
|
import { LuChevronLeft as LuChevronLeft3, LuChevronRight as LuChevronRight5 } from "react-icons/lu";
|
|
6969
|
-
import { jsx as
|
|
7062
|
+
import { jsx as jsx71, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
6970
7063
|
var GAP3 = "\u2026";
|
|
6971
7064
|
function paginationRange(page, pageCount, siblingCount = 1) {
|
|
6972
7065
|
const totalSlots = siblingCount * 2 + 5;
|
|
@@ -7023,7 +7116,7 @@ var Pagination = forwardRef22(function Pagination2({
|
|
|
7023
7116
|
className: clsx65("flex items-center gap-1.5", className),
|
|
7024
7117
|
...rest,
|
|
7025
7118
|
children: [
|
|
7026
|
-
/* @__PURE__ */
|
|
7119
|
+
/* @__PURE__ */ jsx71(
|
|
7027
7120
|
"button",
|
|
7028
7121
|
{
|
|
7029
7122
|
type: "button",
|
|
@@ -7031,19 +7124,19 @@ var Pagination = forwardRef22(function Pagination2({
|
|
|
7031
7124
|
disabled: page <= 1,
|
|
7032
7125
|
onClick: () => go(page - 1),
|
|
7033
7126
|
className: ARROW_BASE,
|
|
7034
|
-
children: /* @__PURE__ */
|
|
7127
|
+
children: /* @__PURE__ */ jsx71(LuChevronLeft3, { "aria-hidden": true, className: "size-4" })
|
|
7035
7128
|
}
|
|
7036
7129
|
),
|
|
7037
7130
|
type === "dots" ? (
|
|
7038
7131
|
// The dots form has no room for numbers, so the list itself is the only place the
|
|
7039
7132
|
// position can be stated — hence the live-region-free but explicitly named group.
|
|
7040
|
-
/* @__PURE__ */
|
|
7133
|
+
/* @__PURE__ */ jsx71(
|
|
7041
7134
|
"span",
|
|
7042
7135
|
{
|
|
7043
7136
|
role: "group",
|
|
7044
7137
|
"aria-label": `Page ${page} of ${pageCount}`,
|
|
7045
7138
|
className: "flex items-center gap-2 px-2",
|
|
7046
|
-
children: Array.from({ length: pageCount }, (_, i) => i + 1).map((n) => /* @__PURE__ */
|
|
7139
|
+
children: Array.from({ length: pageCount }, (_, i) => i + 1).map((n) => /* @__PURE__ */ jsx71(
|
|
7047
7140
|
"button",
|
|
7048
7141
|
{
|
|
7049
7142
|
type: "button",
|
|
@@ -7061,7 +7154,7 @@ var Pagination = forwardRef22(function Pagination2({
|
|
|
7061
7154
|
}
|
|
7062
7155
|
)
|
|
7063
7156
|
) : paginationRange(page, pageCount, siblingCount).map(
|
|
7064
|
-
(entry, index) => entry === GAP3 ? /* @__PURE__ */
|
|
7157
|
+
(entry, index) => entry === GAP3 ? /* @__PURE__ */ jsx71(
|
|
7065
7158
|
"span",
|
|
7066
7159
|
{
|
|
7067
7160
|
"aria-hidden": true,
|
|
@@ -7069,7 +7162,7 @@ var Pagination = forwardRef22(function Pagination2({
|
|
|
7069
7162
|
children: GAP3
|
|
7070
7163
|
},
|
|
7071
7164
|
`gap-${index}`
|
|
7072
|
-
) : /* @__PURE__ */
|
|
7165
|
+
) : /* @__PURE__ */ jsx71(
|
|
7073
7166
|
"button",
|
|
7074
7167
|
{
|
|
7075
7168
|
type: "button",
|
|
@@ -7086,7 +7179,7 @@ var Pagination = forwardRef22(function Pagination2({
|
|
|
7086
7179
|
entry
|
|
7087
7180
|
)
|
|
7088
7181
|
),
|
|
7089
|
-
/* @__PURE__ */
|
|
7182
|
+
/* @__PURE__ */ jsx71(
|
|
7090
7183
|
"button",
|
|
7091
7184
|
{
|
|
7092
7185
|
type: "button",
|
|
@@ -7094,7 +7187,7 @@ var Pagination = forwardRef22(function Pagination2({
|
|
|
7094
7187
|
disabled: page >= pageCount,
|
|
7095
7188
|
onClick: () => go(page + 1),
|
|
7096
7189
|
className: ARROW_BASE,
|
|
7097
|
-
children: /* @__PURE__ */
|
|
7190
|
+
children: /* @__PURE__ */ jsx71(LuChevronRight5, { "aria-hidden": true, className: "size-4" })
|
|
7098
7191
|
}
|
|
7099
7192
|
)
|
|
7100
7193
|
]
|
|
@@ -7105,10 +7198,10 @@ var Pagination = forwardRef22(function Pagination2({
|
|
|
7105
7198
|
// src/components/chrome/navigation-menu.tsx
|
|
7106
7199
|
import { forwardRef as forwardRef23 } from "react";
|
|
7107
7200
|
import clsx66 from "clsx";
|
|
7108
|
-
import { Fragment as Fragment9, jsx as
|
|
7201
|
+
import { Fragment as Fragment9, jsx as jsx72, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
7109
7202
|
var NavigationMenu = forwardRef23(
|
|
7110
7203
|
function NavigationMenu2({ children, orientation = "horizontal", label, className, ...rest }, ref) {
|
|
7111
|
-
return /* @__PURE__ */
|
|
7204
|
+
return /* @__PURE__ */ jsx72("nav", { ref, "aria-label": label, "data-slot": "navigation-menu", ...rest, children: /* @__PURE__ */ jsx72(
|
|
7112
7205
|
"ul",
|
|
7113
7206
|
{
|
|
7114
7207
|
className: clsx66(
|
|
@@ -7124,8 +7217,8 @@ var NavigationMenu = forwardRef23(
|
|
|
7124
7217
|
var NavigationMenuItem = forwardRef23(
|
|
7125
7218
|
function NavigationMenuItem2({ children, active = false, variant = "pill", asChild = false, icon, className, ...rest }, ref) {
|
|
7126
7219
|
const content = /* @__PURE__ */ jsxs44(Fragment9, { children: [
|
|
7127
|
-
icon && /* @__PURE__ */
|
|
7128
|
-
/* @__PURE__ */
|
|
7220
|
+
icon && /* @__PURE__ */ jsx72("span", { "aria-hidden": true, className: "shrink-0 [&_svg]:size-4", children: icon }),
|
|
7221
|
+
/* @__PURE__ */ jsx72("span", { className: "min-w-0 truncate", children })
|
|
7129
7222
|
] });
|
|
7130
7223
|
const linkProps = {
|
|
7131
7224
|
"aria-current": active ? "page" : void 0,
|
|
@@ -7143,18 +7236,18 @@ var NavigationMenuItem = forwardRef23(
|
|
|
7143
7236
|
),
|
|
7144
7237
|
...rest
|
|
7145
7238
|
};
|
|
7146
|
-
return /* @__PURE__ */
|
|
7239
|
+
return /* @__PURE__ */ jsx72("li", { children: asChild ? /* @__PURE__ */ jsx72(Slot, { wrapChildren: () => content, ...linkProps, children }) : /* @__PURE__ */ jsx72("a", { ref, ...linkProps, children: content }) });
|
|
7147
7240
|
}
|
|
7148
7241
|
);
|
|
7149
7242
|
|
|
7150
7243
|
// src/components/chrome/typography.tsx
|
|
7151
7244
|
import { forwardRef as forwardRef24 } from "react";
|
|
7152
7245
|
import clsx67 from "clsx";
|
|
7153
|
-
import { jsx as
|
|
7246
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
7154
7247
|
function textComponent(displayName, defaultElement, classes) {
|
|
7155
7248
|
const Component = forwardRef24(function TextComponent({ children, asChild = false, className, ...rest }, ref) {
|
|
7156
7249
|
const Root = asChild ? Slot : defaultElement;
|
|
7157
|
-
return /* @__PURE__ */
|
|
7250
|
+
return /* @__PURE__ */ jsx73(Root, { ref, className: clsx67(classes, className), ...rest, children });
|
|
7158
7251
|
});
|
|
7159
7252
|
Component.displayName = displayName;
|
|
7160
7253
|
return Component;
|
|
@@ -7176,7 +7269,7 @@ var Heading = textComponent("Heading", "h2", "text-heading font-semibold text-de
|
|
|
7176
7269
|
var Subheading = textComponent("Subheading", "h3", "text-subheading text-default");
|
|
7177
7270
|
var TextLink = forwardRef24(function TextLink2({ children, asChild = false, className, ...rest }, ref) {
|
|
7178
7271
|
const Root = asChild ? Slot : "a";
|
|
7179
|
-
return /* @__PURE__ */
|
|
7272
|
+
return /* @__PURE__ */ jsx73(
|
|
7180
7273
|
Root,
|
|
7181
7274
|
{
|
|
7182
7275
|
ref,
|
|
@@ -7198,7 +7291,7 @@ var LIST_MARKER = {
|
|
|
7198
7291
|
};
|
|
7199
7292
|
var TextList = forwardRef24(function TextList2({ children, variant = "bulleted", density = "default", className, ...rest }, ref) {
|
|
7200
7293
|
const Root = variant === "numbered" ? "ol" : "ul";
|
|
7201
|
-
return /* @__PURE__ */
|
|
7294
|
+
return /* @__PURE__ */ jsx73(
|
|
7202
7295
|
Root,
|
|
7203
7296
|
{
|
|
7204
7297
|
ref,
|
|
@@ -7214,7 +7307,7 @@ var TextList = forwardRef24(function TextList2({ children, variant = "bulleted",
|
|
|
7214
7307
|
);
|
|
7215
7308
|
});
|
|
7216
7309
|
var TextListItem = forwardRef24(function TextListItem2({ children, className, ...rest }, ref) {
|
|
7217
|
-
return /* @__PURE__ */
|
|
7310
|
+
return /* @__PURE__ */ jsx73("li", { ref, className: clsx67("text-body text-default", className), ...rest, children });
|
|
7218
7311
|
});
|
|
7219
7312
|
|
|
7220
7313
|
// src/components/widgets/widget-header.tsx
|
|
@@ -7222,7 +7315,7 @@ import clsx69 from "clsx";
|
|
|
7222
7315
|
|
|
7223
7316
|
// src/components/widgets/widget-title.tsx
|
|
7224
7317
|
import clsx68 from "clsx";
|
|
7225
|
-
import { jsx as
|
|
7318
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
7226
7319
|
var sizeStyles5 = {
|
|
7227
7320
|
sm: "text-subheading-sm font-semibold leading-none",
|
|
7228
7321
|
// Was `text-[18px]`, which had no step on the type scale (Scale 04 = 16, Scale 05 = 20).
|
|
@@ -7232,11 +7325,11 @@ var sizeStyles5 = {
|
|
|
7232
7325
|
lg: "text-subheading font-semibold leading-[1.2]"
|
|
7233
7326
|
};
|
|
7234
7327
|
function WidgetTitle({ children, size: size2 = "sm", className }) {
|
|
7235
|
-
return /* @__PURE__ */
|
|
7328
|
+
return /* @__PURE__ */ jsx74("h3", { className: clsx68(sizeStyles5[size2], "text-default", className), children });
|
|
7236
7329
|
}
|
|
7237
7330
|
|
|
7238
7331
|
// src/components/widgets/widget-header.tsx
|
|
7239
|
-
import { jsx as
|
|
7332
|
+
import { jsx as jsx75, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
7240
7333
|
var eyebrowStyles = {
|
|
7241
7334
|
uppercase: "text-body-tiny font-medium uppercase tracking-[0.66px] text-default-secondary",
|
|
7242
7335
|
plain: "text-body-xs leading-[1.4] text-default-secondary"
|
|
@@ -7253,9 +7346,9 @@ function WidgetHeader({
|
|
|
7253
7346
|
}) {
|
|
7254
7347
|
return /* @__PURE__ */ jsxs45("div", { className: clsx69("flex items-start justify-between gap-2", className), children: [
|
|
7255
7348
|
/* @__PURE__ */ jsxs45("div", { className: "min-w-0 flex-1", children: [
|
|
7256
|
-
eyebrow && /* @__PURE__ */
|
|
7257
|
-
/* @__PURE__ */
|
|
7258
|
-
subtitle && /* @__PURE__ */
|
|
7349
|
+
eyebrow && /* @__PURE__ */ jsx75("p", { className: eyebrowStyles[eyebrowVariant], children: eyebrow }),
|
|
7350
|
+
/* @__PURE__ */ jsx75(WidgetTitle, { size: titleSize, children: title }),
|
|
7351
|
+
subtitle && /* @__PURE__ */ jsx75("p", { className: "mt-1 text-body-xs text-default-secondary leading-snug", children: subtitle })
|
|
7259
7352
|
] }),
|
|
7260
7353
|
/* @__PURE__ */ jsxs45("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
7261
7354
|
badge,
|
|
@@ -7266,23 +7359,23 @@ function WidgetHeader({
|
|
|
7266
7359
|
|
|
7267
7360
|
// src/components/widgets/widget-footer.tsx
|
|
7268
7361
|
import clsx70 from "clsx";
|
|
7269
|
-
import { jsx as
|
|
7362
|
+
import { jsx as jsx76, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
7270
7363
|
function WidgetFooter({ caption, subcaption, action, className }) {
|
|
7271
7364
|
return /* @__PURE__ */ jsxs46("div", { className: clsx70("flex items-center gap-3", className), children: [
|
|
7272
7365
|
caption && /* @__PURE__ */ jsxs46("div", { className: "flex items-stretch gap-3 flex-1 min-w-0", children: [
|
|
7273
|
-
/* @__PURE__ */
|
|
7366
|
+
/* @__PURE__ */ jsx76("div", { className: "w-0.5 shrink-0 self-stretch rounded-full bg-brand" }),
|
|
7274
7367
|
/* @__PURE__ */ jsxs46("div", { className: "min-w-0", children: [
|
|
7275
|
-
/* @__PURE__ */
|
|
7276
|
-
subcaption && /* @__PURE__ */
|
|
7368
|
+
/* @__PURE__ */ jsx76("p", { className: "text-body-sm font-medium text-default leading-snug", children: caption }),
|
|
7369
|
+
subcaption && /* @__PURE__ */ jsx76("p", { className: "mt-0.5 text-body-xs text-default-secondary", children: subcaption })
|
|
7277
7370
|
] })
|
|
7278
7371
|
] }),
|
|
7279
|
-
action && /* @__PURE__ */
|
|
7372
|
+
action && /* @__PURE__ */ jsx76("div", { className: "ml-auto shrink-0", children: action })
|
|
7280
7373
|
] });
|
|
7281
7374
|
}
|
|
7282
7375
|
|
|
7283
7376
|
// src/components/stats/stat-tile.tsx
|
|
7284
7377
|
import clsx71 from "clsx";
|
|
7285
|
-
import { jsx as
|
|
7378
|
+
import { jsx as jsx77, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
7286
7379
|
var DOT_TONE = {
|
|
7287
7380
|
neutral: "bg-status-dot-neutral",
|
|
7288
7381
|
info: "bg-status-dot-info",
|
|
@@ -7303,16 +7396,16 @@ function StatTile({ label, value, tone, dotColor, className }) {
|
|
|
7303
7396
|
),
|
|
7304
7397
|
children: [
|
|
7305
7398
|
/* @__PURE__ */ jsxs47("div", { className: "flex items-center gap-1.5", children: [
|
|
7306
|
-
showDot && /* @__PURE__ */
|
|
7399
|
+
showDot && /* @__PURE__ */ jsx77(
|
|
7307
7400
|
"span",
|
|
7308
7401
|
{
|
|
7309
7402
|
className: clsx71("size-2 shrink-0 rounded-full", tone && DOT_TONE[tone]),
|
|
7310
7403
|
style: tone ? void 0 : { backgroundColor: dotColor }
|
|
7311
7404
|
}
|
|
7312
7405
|
),
|
|
7313
|
-
/* @__PURE__ */
|
|
7406
|
+
/* @__PURE__ */ jsx77("span", { className: "text-body-xs font-medium text-default-secondary whitespace-nowrap", children: label })
|
|
7314
7407
|
] }),
|
|
7315
|
-
/* @__PURE__ */
|
|
7408
|
+
/* @__PURE__ */ jsx77("span", { className: "text-heading font-semibold text-default leading-none", children: value })
|
|
7316
7409
|
]
|
|
7317
7410
|
}
|
|
7318
7411
|
);
|
|
@@ -7320,7 +7413,7 @@ function StatTile({ label, value, tone, dotColor, className }) {
|
|
|
7320
7413
|
|
|
7321
7414
|
// src/components/stats/stat-number.tsx
|
|
7322
7415
|
import clsx72 from "clsx";
|
|
7323
|
-
import { jsx as
|
|
7416
|
+
import { jsx as jsx78, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
7324
7417
|
var sizeStyles6 = {
|
|
7325
7418
|
sm: "text-subtitle",
|
|
7326
7419
|
md: "text-subtitle-lg",
|
|
@@ -7338,7 +7431,7 @@ function StatNumber({ value, unit, size: size2 = "md", weight = "bold", color, c
|
|
|
7338
7431
|
style: color ? { color } : void 0,
|
|
7339
7432
|
children: [
|
|
7340
7433
|
value,
|
|
7341
|
-
unit && /* @__PURE__ */
|
|
7434
|
+
unit && /* @__PURE__ */ jsx78("span", { className: "ml-1 text-subheading font-medium text-default-secondary", children: unit })
|
|
7342
7435
|
]
|
|
7343
7436
|
}
|
|
7344
7437
|
);
|
|
@@ -7346,7 +7439,7 @@ function StatNumber({ value, unit, size: size2 = "md", weight = "bold", color, c
|
|
|
7346
7439
|
|
|
7347
7440
|
// src/components/stats/score-value.tsx
|
|
7348
7441
|
import clsx73 from "clsx";
|
|
7349
|
-
import { jsx as
|
|
7442
|
+
import { jsx as jsx79, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
7350
7443
|
var DEFAULT_SCORE_THRESHOLDS = { danger: 80, warning: 65, neutral: 50 };
|
|
7351
7444
|
function getScoreTone(score, {
|
|
7352
7445
|
direction = "higher-is-worse",
|
|
@@ -7391,14 +7484,14 @@ function ScoreValue({
|
|
|
7391
7484
|
const numeric = typeof value === "number" ? value : Number(value);
|
|
7392
7485
|
const resolved = tone === "auto" ? Number.isFinite(numeric) ? getScoreTone(numeric, { direction, thresholds }) : "default" : tone;
|
|
7393
7486
|
return /* @__PURE__ */ jsxs49("span", { className: clsx73("inline-flex items-baseline gap-1", className), children: [
|
|
7394
|
-
/* @__PURE__ */
|
|
7395
|
-
label && /* @__PURE__ */
|
|
7487
|
+
/* @__PURE__ */ jsx79("span", { className: clsx73(SIZE12[size2], WEIGHT[weight], TONE2[resolved]), children: value }),
|
|
7488
|
+
label && /* @__PURE__ */ jsx79("span", { className: "text-body-xs text-default-secondary whitespace-nowrap", children: label })
|
|
7396
7489
|
] });
|
|
7397
7490
|
}
|
|
7398
7491
|
|
|
7399
7492
|
// src/components/stats/tile-grid.tsx
|
|
7400
7493
|
import clsx74 from "clsx";
|
|
7401
|
-
import { jsx as
|
|
7494
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
7402
7495
|
var COLUMNS = {
|
|
7403
7496
|
sm: {
|
|
7404
7497
|
2: "grid-cols-2",
|
|
@@ -7428,7 +7521,7 @@ function TileGrid({
|
|
|
7428
7521
|
at = "lg",
|
|
7429
7522
|
className
|
|
7430
7523
|
}) {
|
|
7431
|
-
return /* @__PURE__ */
|
|
7524
|
+
return /* @__PURE__ */ jsx80("div", { className: clsx74("grid gap-3", COLUMNS[at][columns], className), children });
|
|
7432
7525
|
}
|
|
7433
7526
|
|
|
7434
7527
|
// src/components/charts/chart-tone.ts
|
|
@@ -7450,7 +7543,7 @@ function resolveChartColor(color, tone, index = 0) {
|
|
|
7450
7543
|
|
|
7451
7544
|
// src/components/charts/bar-chart.tsx
|
|
7452
7545
|
import clsx75 from "clsx";
|
|
7453
|
-
import { jsx as
|
|
7546
|
+
import { jsx as jsx81, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
7454
7547
|
var SIZE13 = {
|
|
7455
7548
|
sm: { band: 14, gap: 6, label: "text-body-tiny" },
|
|
7456
7549
|
md: { band: 20, gap: 8, label: "text-body-xs" },
|
|
@@ -7477,7 +7570,7 @@ function BarChart({
|
|
|
7477
7570
|
);
|
|
7478
7571
|
const max = Math.max(...categoryTotals, 1);
|
|
7479
7572
|
const horizontal = orientation === "horizontal";
|
|
7480
|
-
return /* @__PURE__ */
|
|
7573
|
+
return /* @__PURE__ */ jsx81(
|
|
7481
7574
|
"div",
|
|
7482
7575
|
{
|
|
7483
7576
|
className: clsx75("flex w-full min-w-0", horizontal ? "flex-col gap-2" : "flex-row items-end gap-3", className),
|
|
@@ -7496,14 +7589,14 @@ function BarChart({
|
|
|
7496
7589
|
className: clsx75("flex min-w-0", horizontal ? "flex-col gap-1" : "h-full flex-col justify-end gap-1.5"),
|
|
7497
7590
|
style: horizontal ? void 0 : { width: perCategory },
|
|
7498
7591
|
children: [
|
|
7499
|
-
showLabels && horizontal && /* @__PURE__ */
|
|
7592
|
+
showLabels && horizontal && /* @__PURE__ */ jsx81("span", { className: clsx75("truncate text-default-secondary", labelClass2), children: category }),
|
|
7500
7593
|
/* @__PURE__ */ jsxs50(
|
|
7501
7594
|
"div",
|
|
7502
7595
|
{
|
|
7503
7596
|
className: clsx75("flex", horizontal ? "items-center gap-2" : "w-full flex-1 items-end justify-center"),
|
|
7504
7597
|
style: horizontal ? void 0 : { height: length },
|
|
7505
7598
|
children: [
|
|
7506
|
-
/* @__PURE__ */
|
|
7599
|
+
/* @__PURE__ */ jsx81(
|
|
7507
7600
|
"div",
|
|
7508
7601
|
{
|
|
7509
7602
|
className: clsx75("flex min-w-0", stacked ? "gap-0" : ""),
|
|
@@ -7516,7 +7609,7 @@ function BarChart({
|
|
|
7516
7609
|
},
|
|
7517
7610
|
children: bars.map((bar) => {
|
|
7518
7611
|
const extent = `${bar.value / max * 100}%`;
|
|
7519
|
-
return /* @__PURE__ */
|
|
7612
|
+
return /* @__PURE__ */ jsx81(
|
|
7520
7613
|
"div",
|
|
7521
7614
|
{
|
|
7522
7615
|
title: `${category} \xB7 ${bar.key}: ${bar.value}`,
|
|
@@ -7532,11 +7625,11 @@ function BarChart({
|
|
|
7532
7625
|
})
|
|
7533
7626
|
}
|
|
7534
7627
|
),
|
|
7535
|
-
showValues && horizontal && /* @__PURE__ */
|
|
7628
|
+
showValues && horizontal && /* @__PURE__ */ jsx81("span", { className: clsx75("shrink-0 tabular-nums text-default-secondary", labelClass2), children: categoryTotals[ci] })
|
|
7536
7629
|
]
|
|
7537
7630
|
}
|
|
7538
7631
|
),
|
|
7539
|
-
showLabels && !horizontal && /* @__PURE__ */
|
|
7632
|
+
showLabels && !horizontal && /* @__PURE__ */ jsx81("span", { className: clsx75("truncate text-center text-default-secondary", labelClass2), children: category })
|
|
7540
7633
|
]
|
|
7541
7634
|
},
|
|
7542
7635
|
category
|
|
@@ -7548,7 +7641,7 @@ function BarChart({
|
|
|
7548
7641
|
|
|
7549
7642
|
// src/components/charts/donut-chart.tsx
|
|
7550
7643
|
import clsx76 from "clsx";
|
|
7551
|
-
import { jsx as
|
|
7644
|
+
import { jsx as jsx82, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
7552
7645
|
var SIZE14 = {
|
|
7553
7646
|
sm: { box: 88, thickness: 10 },
|
|
7554
7647
|
md: { box: 128, thickness: 14 },
|
|
@@ -7584,7 +7677,7 @@ function DonutChart({
|
|
|
7584
7677
|
"aria-hidden": label ? void 0 : true,
|
|
7585
7678
|
className: "block -rotate-90",
|
|
7586
7679
|
children: [
|
|
7587
|
-
/* @__PURE__ */
|
|
7680
|
+
/* @__PURE__ */ jsx82("circle", { cx: box / 2, cy: box / 2, r: radius, fill: "none", stroke: CHART_TRACK, strokeWidth: ring }),
|
|
7588
7681
|
total > 0 && segments.map((segment, i) => {
|
|
7589
7682
|
const fraction = Math.max(0, segment.value) / total;
|
|
7590
7683
|
const length = Math.max(0, fraction * circumference - gapLength);
|
|
@@ -7592,7 +7685,7 @@ function DonutChart({
|
|
|
7592
7685
|
const thisOffset = offset2;
|
|
7593
7686
|
offset2 += fraction * circumference;
|
|
7594
7687
|
if (segment.value <= 0) return null;
|
|
7595
|
-
return /* @__PURE__ */
|
|
7688
|
+
return /* @__PURE__ */ jsx82(
|
|
7596
7689
|
"circle",
|
|
7597
7690
|
{
|
|
7598
7691
|
cx: box / 2,
|
|
@@ -7612,15 +7705,15 @@ function DonutChart({
|
|
|
7612
7705
|
}
|
|
7613
7706
|
),
|
|
7614
7707
|
(centerValue != null || centerLabel != null) && /* @__PURE__ */ jsxs51("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center", children: [
|
|
7615
|
-
centerValue != null && /* @__PURE__ */
|
|
7616
|
-
centerLabel != null && /* @__PURE__ */
|
|
7708
|
+
centerValue != null && /* @__PURE__ */ jsx82("span", { className: "text-subheading-sm font-bold leading-none text-default", children: centerValue }),
|
|
7709
|
+
centerLabel != null && /* @__PURE__ */ jsx82("span", { className: "mt-0.5 text-body-tiny text-default-secondary", children: centerLabel })
|
|
7617
7710
|
] })
|
|
7618
7711
|
] });
|
|
7619
7712
|
}
|
|
7620
7713
|
|
|
7621
7714
|
// src/components/charts/radial-gauge.tsx
|
|
7622
7715
|
import clsx77 from "clsx";
|
|
7623
|
-
import { jsx as
|
|
7716
|
+
import { jsx as jsx83, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
7624
7717
|
var SIZE15 = {
|
|
7625
7718
|
sm: { box: 72, thickness: 8, value: "text-body-sm" },
|
|
7626
7719
|
md: { box: 104, thickness: 11, value: "text-subheading-sm" },
|
|
@@ -7662,7 +7755,7 @@ function RadialGauge({
|
|
|
7662
7755
|
className: "block",
|
|
7663
7756
|
style: { transform: `rotate(${rotation}deg)` },
|
|
7664
7757
|
children: [
|
|
7665
|
-
/* @__PURE__ */
|
|
7758
|
+
/* @__PURE__ */ jsx83(
|
|
7666
7759
|
"circle",
|
|
7667
7760
|
{
|
|
7668
7761
|
cx: box / 2,
|
|
@@ -7675,7 +7768,7 @@ function RadialGauge({
|
|
|
7675
7768
|
strokeLinecap: "round"
|
|
7676
7769
|
}
|
|
7677
7770
|
),
|
|
7678
|
-
/* @__PURE__ */
|
|
7771
|
+
/* @__PURE__ */ jsx83(
|
|
7679
7772
|
"circle",
|
|
7680
7773
|
{
|
|
7681
7774
|
cx: box / 2,
|
|
@@ -7693,8 +7786,8 @@ function RadialGauge({
|
|
|
7693
7786
|
}
|
|
7694
7787
|
),
|
|
7695
7788
|
/* @__PURE__ */ jsxs52("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center", children: [
|
|
7696
|
-
children === void 0 ? /* @__PURE__ */
|
|
7697
|
-
centerLabel != null && /* @__PURE__ */
|
|
7789
|
+
children === void 0 ? /* @__PURE__ */ jsx83("span", { className: clsx77("font-bold leading-none text-default", preset.value), children: value }) : children,
|
|
7790
|
+
centerLabel != null && /* @__PURE__ */ jsx83("span", { className: "mt-0.5 text-body-tiny text-default-secondary", children: centerLabel })
|
|
7698
7791
|
] })
|
|
7699
7792
|
] });
|
|
7700
7793
|
}
|
|
@@ -7702,7 +7795,7 @@ function RadialGauge({
|
|
|
7702
7795
|
// src/components/charts/sparkline.tsx
|
|
7703
7796
|
import { useId as useId22 } from "react";
|
|
7704
7797
|
import clsx78 from "clsx";
|
|
7705
|
-
import { Fragment as Fragment10, jsx as
|
|
7798
|
+
import { Fragment as Fragment10, jsx as jsx84, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
7706
7799
|
var SIZE16 = {
|
|
7707
7800
|
sm: { width: 80, height: 24 },
|
|
7708
7801
|
md: { width: 120, height: 36 },
|
|
@@ -7754,13 +7847,13 @@ function Sparkline({
|
|
|
7754
7847
|
className: clsx78("block", stretch ? "h-full w-full" : "shrink-0", className),
|
|
7755
7848
|
children: [
|
|
7756
7849
|
variant === "area" && /* @__PURE__ */ jsxs53(Fragment10, { children: [
|
|
7757
|
-
/* @__PURE__ */
|
|
7758
|
-
/* @__PURE__ */
|
|
7759
|
-
/* @__PURE__ */
|
|
7850
|
+
/* @__PURE__ */ jsx84("defs", { children: /* @__PURE__ */ jsxs53("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
7851
|
+
/* @__PURE__ */ jsx84("stop", { offset: "0%", stopColor: stroke, stopOpacity: 0.24 }),
|
|
7852
|
+
/* @__PURE__ */ jsx84("stop", { offset: "100%", stopColor: stroke, stopOpacity: 0 })
|
|
7760
7853
|
] }) }),
|
|
7761
|
-
/* @__PURE__ */
|
|
7854
|
+
/* @__PURE__ */ jsx84("path", { d: areaPath, fill: `url(#${gradientId})` })
|
|
7762
7855
|
] }),
|
|
7763
|
-
/* @__PURE__ */
|
|
7856
|
+
/* @__PURE__ */ jsx84(
|
|
7764
7857
|
"polyline",
|
|
7765
7858
|
{
|
|
7766
7859
|
points,
|
|
@@ -7772,7 +7865,7 @@ function Sparkline({
|
|
|
7772
7865
|
fill: "none"
|
|
7773
7866
|
}
|
|
7774
7867
|
),
|
|
7775
|
-
showEndDot && /* @__PURE__ */
|
|
7868
|
+
showEndDot && /* @__PURE__ */ jsx84(
|
|
7776
7869
|
"circle",
|
|
7777
7870
|
{
|
|
7778
7871
|
cx: last.x,
|
|
@@ -7790,7 +7883,7 @@ function Sparkline({
|
|
|
7790
7883
|
|
|
7791
7884
|
// src/components/charts/mini-bar-chart.tsx
|
|
7792
7885
|
import clsx79 from "clsx";
|
|
7793
|
-
import { jsx as
|
|
7886
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
7794
7887
|
var SIZE17 = {
|
|
7795
7888
|
sm: { width: 80, height: 32, gap: 2 },
|
|
7796
7889
|
md: { width: 120, height: 48, gap: 3 },
|
|
@@ -7826,7 +7919,7 @@ function MiniBarChart({
|
|
|
7826
7919
|
const span = vertical ? w : h;
|
|
7827
7920
|
const extent = vertical ? h : w;
|
|
7828
7921
|
const barThickness = (span - g * (bars.length - 1)) / bars.length;
|
|
7829
|
-
return /* @__PURE__ */
|
|
7922
|
+
return /* @__PURE__ */ jsx85(
|
|
7830
7923
|
"svg",
|
|
7831
7924
|
{
|
|
7832
7925
|
width: stretch ? void 0 : w,
|
|
@@ -7841,7 +7934,7 @@ function MiniBarChart({
|
|
|
7841
7934
|
children: bars.map((v, i) => {
|
|
7842
7935
|
const magnitude = Math.max(2, v / max * extent);
|
|
7843
7936
|
const offset2 = i * (barThickness + g);
|
|
7844
|
-
return /* @__PURE__ */
|
|
7937
|
+
return /* @__PURE__ */ jsx85(
|
|
7845
7938
|
"rect",
|
|
7846
7939
|
{
|
|
7847
7940
|
x: (vertical ? offset2 : 0).toFixed(2),
|
|
@@ -7863,14 +7956,14 @@ import clsx81 from "clsx";
|
|
|
7863
7956
|
|
|
7864
7957
|
// src/components/charts/legend-dot.tsx
|
|
7865
7958
|
import clsx80 from "clsx";
|
|
7866
|
-
import { jsx as
|
|
7959
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
7867
7960
|
var SHAPE = {
|
|
7868
7961
|
dot: { sm: "size-1.5 rounded-full", md: "size-2 rounded-full" },
|
|
7869
7962
|
square: { sm: "size-1.5 rounded-[2px]", md: "size-2 rounded-[3px]" },
|
|
7870
7963
|
line: { sm: "h-0.5 w-3 rounded-full", md: "h-0.5 w-4 rounded-full" }
|
|
7871
7964
|
};
|
|
7872
7965
|
function LegendDot({ tone, color, size: size2 = "md", shape = "dot", className }) {
|
|
7873
|
-
return /* @__PURE__ */
|
|
7966
|
+
return /* @__PURE__ */ jsx86(
|
|
7874
7967
|
"span",
|
|
7875
7968
|
{
|
|
7876
7969
|
className: clsx80("inline-block shrink-0", SHAPE[shape][size2], className),
|
|
@@ -7881,7 +7974,7 @@ function LegendDot({ tone, color, size: size2 = "md", shape = "dot", className }
|
|
|
7881
7974
|
}
|
|
7882
7975
|
|
|
7883
7976
|
// src/components/charts/chart-legend.tsx
|
|
7884
|
-
import { jsx as
|
|
7977
|
+
import { jsx as jsx87, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
7885
7978
|
function ChartLegend({
|
|
7886
7979
|
items,
|
|
7887
7980
|
orientation = "vertical",
|
|
@@ -7890,7 +7983,7 @@ function ChartLegend({
|
|
|
7890
7983
|
className
|
|
7891
7984
|
}) {
|
|
7892
7985
|
const horizontal = orientation === "horizontal";
|
|
7893
|
-
return /* @__PURE__ */
|
|
7986
|
+
return /* @__PURE__ */ jsx87(
|
|
7894
7987
|
"div",
|
|
7895
7988
|
{
|
|
7896
7989
|
className: clsx81(
|
|
@@ -7903,10 +7996,10 @@ function ChartLegend({
|
|
|
7903
7996
|
className: clsx81("flex items-center gap-2", horizontal ? "min-w-0" : "justify-between"),
|
|
7904
7997
|
children: [
|
|
7905
7998
|
/* @__PURE__ */ jsxs54("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
7906
|
-
/* @__PURE__ */
|
|
7907
|
-
/* @__PURE__ */
|
|
7999
|
+
/* @__PURE__ */ jsx87(LegendDot, { color: resolveChartColor(item.color, item.tone, i), size: size2, shape }),
|
|
8000
|
+
/* @__PURE__ */ jsx87("span", { className: "truncate text-body-xs text-default-secondary", children: item.label })
|
|
7908
8001
|
] }),
|
|
7909
|
-
item.count != null && /* @__PURE__ */
|
|
8002
|
+
item.count != null && /* @__PURE__ */ jsx87("span", { className: "shrink-0 text-body-xs font-semibold tabular-nums text-default", children: item.count })
|
|
7910
8003
|
]
|
|
7911
8004
|
},
|
|
7912
8005
|
item.label
|
|
@@ -7918,7 +8011,7 @@ function ChartLegend({
|
|
|
7918
8011
|
// src/components/charts/trend-label.tsx
|
|
7919
8012
|
import clsx82 from "clsx";
|
|
7920
8013
|
import { LuTrendingDown, LuTrendingUp } from "react-icons/lu";
|
|
7921
|
-
import { jsx as
|
|
8014
|
+
import { jsx as jsx88, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
7922
8015
|
var SIZE18 = {
|
|
7923
8016
|
sm: "text-body-xs",
|
|
7924
8017
|
md: "text-body-sm",
|
|
@@ -7964,7 +8057,7 @@ function TrendLabel({
|
|
|
7964
8057
|
),
|
|
7965
8058
|
style: color ? { color } : void 0,
|
|
7966
8059
|
children: [
|
|
7967
|
-
showArrow && !flat && /* @__PURE__ */
|
|
8060
|
+
showArrow && !flat && /* @__PURE__ */ jsx88(Arrow, { className: clsx82("shrink-0", ICON_SIZE[size2]), "aria-hidden": true }),
|
|
7968
8061
|
rising ? "+" : "",
|
|
7969
8062
|
value,
|
|
7970
8063
|
suffix
|
|
@@ -7975,7 +8068,7 @@ function TrendLabel({
|
|
|
7975
8068
|
|
|
7976
8069
|
// src/components/lists/list-row.tsx
|
|
7977
8070
|
import clsx83 from "clsx";
|
|
7978
|
-
import { jsx as
|
|
8071
|
+
import { jsx as jsx89, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
7979
8072
|
var DENSITY = {
|
|
7980
8073
|
default: {
|
|
7981
8074
|
pad: "py-4",
|
|
@@ -8037,19 +8130,19 @@ function ListRow({
|
|
|
8037
8130
|
hasTitleLine && /* @__PURE__ */ jsxs56("div", { className: "flex items-center justify-between gap-2", children: [
|
|
8038
8131
|
/* @__PURE__ */ jsxs56("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
8039
8132
|
leading,
|
|
8040
|
-
title != null && /* @__PURE__ */
|
|
8041
|
-
titleMeta && /* @__PURE__ */
|
|
8133
|
+
title != null && /* @__PURE__ */ jsx89("span", { className: clsx83("truncate", d.title), children: title }),
|
|
8134
|
+
titleMeta && /* @__PURE__ */ jsx89("span", { className: "shrink-0", children: titleMeta })
|
|
8042
8135
|
] }),
|
|
8043
|
-
meta && /* @__PURE__ */
|
|
8136
|
+
meta && /* @__PURE__ */ jsx89("span", { className: "shrink-0", children: meta })
|
|
8044
8137
|
] }),
|
|
8045
|
-
description && /* @__PURE__ */
|
|
8138
|
+
description && /* @__PURE__ */ jsx89("p", { className: d.description, children: description }),
|
|
8046
8139
|
footer && // These two wrappers are propagation barriers, not controls — they add no
|
|
8047
8140
|
// behaviour of their own and must not be focusable or take a role.
|
|
8048
8141
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
8049
|
-
/* @__PURE__ */
|
|
8142
|
+
/* @__PURE__ */ jsx89("div", { onClick: stopIfInteractive, onKeyDown: stopIfInteractive, children: footer })
|
|
8050
8143
|
] }),
|
|
8051
8144
|
trailing && // eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
8052
|
-
/* @__PURE__ */
|
|
8145
|
+
/* @__PURE__ */ jsx89(
|
|
8053
8146
|
"div",
|
|
8054
8147
|
{
|
|
8055
8148
|
className: "ml-3 flex shrink-0 items-center self-center",
|
|
@@ -8068,9 +8161,9 @@ function stopIfInteractive(event) {
|
|
|
8068
8161
|
|
|
8069
8162
|
// src/components/lists/file-row.tsx
|
|
8070
8163
|
import clsx84 from "clsx";
|
|
8071
|
-
import { jsx as
|
|
8164
|
+
import { jsx as jsx90, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
8072
8165
|
function FileTypeBadge({ type }) {
|
|
8073
|
-
return /* @__PURE__ */
|
|
8166
|
+
return /* @__PURE__ */ jsx90("span", { className: "flex size-[34px] shrink-0 items-center justify-center rounded-md bg-brand-tertiary text-body-tiny font-semibold text-brand", children: type });
|
|
8074
8167
|
}
|
|
8075
8168
|
function FileRow({
|
|
8076
8169
|
name,
|
|
@@ -8082,7 +8175,7 @@ function FileRow({
|
|
|
8082
8175
|
actions,
|
|
8083
8176
|
className
|
|
8084
8177
|
}) {
|
|
8085
|
-
const lead = leading ?? (fileType ? /* @__PURE__ */
|
|
8178
|
+
const lead = leading ?? (fileType ? /* @__PURE__ */ jsx90(FileTypeBadge, { type: fileType }) : null);
|
|
8086
8179
|
return /* @__PURE__ */ jsxs57(
|
|
8087
8180
|
"div",
|
|
8088
8181
|
{
|
|
@@ -8093,11 +8186,11 @@ function FileRow({
|
|
|
8093
8186
|
children: [
|
|
8094
8187
|
lead,
|
|
8095
8188
|
/* @__PURE__ */ jsxs57("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
8096
|
-
/* @__PURE__ */
|
|
8097
|
-
detail && /* @__PURE__ */
|
|
8189
|
+
/* @__PURE__ */ jsx90("span", { className: "truncate text-body-sm font-medium text-default", children: name }),
|
|
8190
|
+
detail && /* @__PURE__ */ jsx90("span", { className: "text-body-xs text-default-secondary", children: detail })
|
|
8098
8191
|
] }),
|
|
8099
8192
|
(onDownload || actions) && /* @__PURE__ */ jsxs57("div", { className: "flex shrink-0 items-center gap-3", children: [
|
|
8100
|
-
onDownload && /* @__PURE__ */
|
|
8193
|
+
onDownload && /* @__PURE__ */ jsx90(
|
|
8101
8194
|
"button",
|
|
8102
8195
|
{
|
|
8103
8196
|
type: "button",
|
|
@@ -8115,7 +8208,7 @@ function FileRow({
|
|
|
8115
8208
|
|
|
8116
8209
|
// src/components/lists/scored-row.tsx
|
|
8117
8210
|
import clsx85 from "clsx";
|
|
8118
|
-
import { jsx as
|
|
8211
|
+
import { jsx as jsx91, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
8119
8212
|
var GAP4 = {
|
|
8120
8213
|
sm: "gap-2",
|
|
8121
8214
|
md: "gap-3",
|
|
@@ -8156,13 +8249,13 @@ function ScoredRow({
|
|
|
8156
8249
|
children: [
|
|
8157
8250
|
leading,
|
|
8158
8251
|
/* @__PURE__ */ jsxs58("div", { className: "min-w-0 flex-1", children: [
|
|
8159
|
-
/* @__PURE__ */
|
|
8160
|
-
subtitle && /* @__PURE__ */
|
|
8252
|
+
/* @__PURE__ */ jsx91("p", { className: "truncate text-body-sm font-medium leading-none text-default", children: title }),
|
|
8253
|
+
subtitle && /* @__PURE__ */ jsx91("p", { className: "mt-0.5 truncate text-body-xs text-default-secondary", children: subtitle })
|
|
8161
8254
|
] })
|
|
8162
8255
|
]
|
|
8163
8256
|
}
|
|
8164
8257
|
),
|
|
8165
|
-
aside && /* @__PURE__ */
|
|
8258
|
+
aside && /* @__PURE__ */ jsx91(
|
|
8166
8259
|
"div",
|
|
8167
8260
|
{
|
|
8168
8261
|
className: clsx85("min-w-0", asideWidth ? "shrink-0" : "flex-1"),
|
|
@@ -8170,7 +8263,7 @@ function ScoredRow({
|
|
|
8170
8263
|
children: aside
|
|
8171
8264
|
}
|
|
8172
8265
|
),
|
|
8173
|
-
meter && /* @__PURE__ */
|
|
8266
|
+
meter && /* @__PURE__ */ jsx91(
|
|
8174
8267
|
"div",
|
|
8175
8268
|
{
|
|
8176
8269
|
className: clsx85("min-w-0", meterWidth ? "shrink-0" : "flex-1"),
|
|
@@ -8178,7 +8271,7 @@ function ScoredRow({
|
|
|
8178
8271
|
children: meter
|
|
8179
8272
|
}
|
|
8180
8273
|
),
|
|
8181
|
-
trailing && /* @__PURE__ */
|
|
8274
|
+
trailing && /* @__PURE__ */ jsx91("div", { className: "shrink-0 text-right", style: trailingWidth ? { width: trailingWidth } : void 0, children: trailing })
|
|
8182
8275
|
] });
|
|
8183
8276
|
}
|
|
8184
8277
|
|
|
@@ -8187,7 +8280,7 @@ import clsx86 from "clsx";
|
|
|
8187
8280
|
|
|
8188
8281
|
// src/components/feedback/progress-bar.tsx
|
|
8189
8282
|
import { useId as useId23 } from "react";
|
|
8190
|
-
import { jsx as
|
|
8283
|
+
import { jsx as jsx92, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
8191
8284
|
var SIZE19 = {
|
|
8192
8285
|
xs: "h-1",
|
|
8193
8286
|
sm: "h-1.5",
|
|
@@ -8214,7 +8307,7 @@ function ProgressBar({
|
|
|
8214
8307
|
const clamped = Math.min(100, Math.max(0, value));
|
|
8215
8308
|
const rounded = radius ? void 0 : "rounded-full";
|
|
8216
8309
|
const labelId = useId23();
|
|
8217
|
-
const track = /* @__PURE__ */
|
|
8310
|
+
const track = /* @__PURE__ */ jsx92(
|
|
8218
8311
|
"div",
|
|
8219
8312
|
{
|
|
8220
8313
|
role: "progressbar",
|
|
@@ -8225,7 +8318,7 @@ function ProgressBar({
|
|
|
8225
8318
|
"aria-label": label ? void 0 : ariaLabel,
|
|
8226
8319
|
className: cn("w-full overflow-hidden bg-default-tertiary", SIZE19[size2], rounded, className),
|
|
8227
8320
|
style: radius ? { borderRadius: radius } : void 0,
|
|
8228
|
-
children: /* @__PURE__ */
|
|
8321
|
+
children: /* @__PURE__ */ jsx92(
|
|
8229
8322
|
"div",
|
|
8230
8323
|
{
|
|
8231
8324
|
className: cn("h-full transition-all", rounded, FILL[tone]),
|
|
@@ -8237,7 +8330,7 @@ function ProgressBar({
|
|
|
8237
8330
|
if (!label && !showValue) return track;
|
|
8238
8331
|
return /* @__PURE__ */ jsxs59("div", { children: [
|
|
8239
8332
|
/* @__PURE__ */ jsxs59("div", { className: "mb-1.5 flex items-center justify-between gap-2", children: [
|
|
8240
|
-
label && /* @__PURE__ */
|
|
8333
|
+
label && /* @__PURE__ */ jsx92("span", { id: labelId, className: "text-body-xs text-default-secondary", children: label }),
|
|
8241
8334
|
showValue && /* @__PURE__ */ jsxs59("span", { className: "ml-auto text-body-xs font-medium tabular-nums text-default", children: [
|
|
8242
8335
|
Math.round(clamped),
|
|
8243
8336
|
"%"
|
|
@@ -8248,7 +8341,7 @@ function ProgressBar({
|
|
|
8248
8341
|
}
|
|
8249
8342
|
|
|
8250
8343
|
// src/components/lists/numbered-list.tsx
|
|
8251
|
-
import { jsx as
|
|
8344
|
+
import { jsx as jsx93, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
8252
8345
|
var GAP5 = {
|
|
8253
8346
|
sm: "gap-2",
|
|
8254
8347
|
md: "gap-3"
|
|
@@ -8262,18 +8355,18 @@ function NumberedList({
|
|
|
8262
8355
|
gap = "md",
|
|
8263
8356
|
className
|
|
8264
8357
|
}) {
|
|
8265
|
-
return /* @__PURE__ */
|
|
8358
|
+
return /* @__PURE__ */ jsx93("ol", { className: clsx86("flex list-none flex-col p-0", GAP5[gap], className), children: items.map((item, index) => {
|
|
8266
8359
|
const tone = !item.tone || item.tone === "auto" ? getScoreTone(item.score, { direction }) : item.tone;
|
|
8267
8360
|
return /* @__PURE__ */ jsxs60("li", { className: "flex w-full shrink-0 flex-col gap-1.5", children: [
|
|
8268
8361
|
/* @__PURE__ */ jsxs60("div", { className: "flex w-full items-center justify-between", children: [
|
|
8269
8362
|
/* @__PURE__ */ jsxs60("div", { className: "flex min-w-0 items-center gap-2.5", children: [
|
|
8270
|
-
/* @__PURE__ */
|
|
8363
|
+
/* @__PURE__ */ jsx93("span", { className: "w-[14px] shrink-0 text-body-xs font-bold text-default-secondary", children: startAt + index }),
|
|
8271
8364
|
/* @__PURE__ */ jsxs60("div", { className: "flex min-w-0 flex-col gap-px", children: [
|
|
8272
|
-
/* @__PURE__ */
|
|
8273
|
-
item.subtitle && /* @__PURE__ */
|
|
8365
|
+
/* @__PURE__ */ jsx93("span", { className: "truncate text-body-sm font-medium leading-none text-default", children: item.title }),
|
|
8366
|
+
item.subtitle && /* @__PURE__ */ jsx93("span", { className: "text-body-tiny text-default-tertiary", children: item.subtitle })
|
|
8274
8367
|
] })
|
|
8275
8368
|
] }),
|
|
8276
|
-
/* @__PURE__ */
|
|
8369
|
+
/* @__PURE__ */ jsx93(
|
|
8277
8370
|
ScoreValue,
|
|
8278
8371
|
{
|
|
8279
8372
|
value: item.score,
|
|
@@ -8284,20 +8377,20 @@ function NumberedList({
|
|
|
8284
8377
|
}
|
|
8285
8378
|
)
|
|
8286
8379
|
] }),
|
|
8287
|
-
/* @__PURE__ */
|
|
8380
|
+
/* @__PURE__ */ jsx93(ProgressBar, { value: item.score, tone, "aria-label": `${item.title} score` })
|
|
8288
8381
|
] }, `${item.title}-${index}`);
|
|
8289
8382
|
}) });
|
|
8290
8383
|
}
|
|
8291
8384
|
|
|
8292
8385
|
// src/components/lists/icon-text-row.tsx
|
|
8293
8386
|
import clsx87 from "clsx";
|
|
8294
|
-
import { jsx as
|
|
8387
|
+
import { jsx as jsx94, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
8295
8388
|
function IconTextRow({ icon, title, detail, className }) {
|
|
8296
8389
|
return /* @__PURE__ */ jsxs61("div", { className: clsx87("flex items-start gap-3", className), children: [
|
|
8297
|
-
/* @__PURE__ */
|
|
8390
|
+
/* @__PURE__ */ jsx94("span", { className: "flex size-9 shrink-0 items-center justify-center rounded-full bg-brand-tertiary text-brand", children: icon }),
|
|
8298
8391
|
/* @__PURE__ */ jsxs61("div", { className: "min-w-0", children: [
|
|
8299
|
-
/* @__PURE__ */
|
|
8300
|
-
/* @__PURE__ */
|
|
8392
|
+
/* @__PURE__ */ jsx94("p", { className: "text-body-sm font-semibold text-default", children: title }),
|
|
8393
|
+
/* @__PURE__ */ jsx94("p", { className: "mt-0.5 text-body-xs text-default-secondary", children: detail })
|
|
8301
8394
|
] })
|
|
8302
8395
|
] });
|
|
8303
8396
|
}
|
|
@@ -8305,10 +8398,10 @@ function IconTextRow({ icon, title, detail, className }) {
|
|
|
8305
8398
|
// src/components/lists/checklist-row.tsx
|
|
8306
8399
|
import clsx88 from "clsx";
|
|
8307
8400
|
import { LuCheck as LuCheck8 } from "react-icons/lu";
|
|
8308
|
-
import { jsx as
|
|
8401
|
+
import { jsx as jsx95, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
8309
8402
|
function ChecklistRow({ label, state, className }) {
|
|
8310
8403
|
return /* @__PURE__ */ jsxs62("li", { className: clsx88("flex items-center gap-3", className), children: [
|
|
8311
|
-
/* @__PURE__ */
|
|
8404
|
+
/* @__PURE__ */ jsx95("span", { className: "flex size-5 shrink-0 items-center justify-center", children: state === "done" ? /* @__PURE__ */ jsx95(LuCheck8, { className: "size-4 text-positive", strokeWidth: 2.5, "aria-hidden": true }) : /* @__PURE__ */ jsx95(
|
|
8312
8405
|
"span",
|
|
8313
8406
|
{
|
|
8314
8407
|
className: clsx88(
|
|
@@ -8317,7 +8410,7 @@ function ChecklistRow({ label, state, className }) {
|
|
|
8317
8410
|
)
|
|
8318
8411
|
}
|
|
8319
8412
|
) }),
|
|
8320
|
-
/* @__PURE__ */
|
|
8413
|
+
/* @__PURE__ */ jsx95(
|
|
8321
8414
|
"span",
|
|
8322
8415
|
{
|
|
8323
8416
|
className: clsx88(
|
|
@@ -8332,13 +8425,13 @@ function ChecklistRow({ label, state, className }) {
|
|
|
8332
8425
|
|
|
8333
8426
|
// src/components/lists/steps-list.tsx
|
|
8334
8427
|
import clsx89 from "clsx";
|
|
8335
|
-
import { jsx as
|
|
8428
|
+
import { jsx as jsx96, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
8336
8429
|
function StepsList({ steps, className }) {
|
|
8337
|
-
return /* @__PURE__ */
|
|
8430
|
+
return /* @__PURE__ */ jsx96("ol", { className: clsx89("flex flex-col gap-1.5", className), children: steps.map((step, i) => (
|
|
8338
8431
|
// `text-[12px]` was off the type scale; 12 sits midway between Scale 01 (11) and
|
|
8339
8432
|
// Scale 02 (13), so it rounds up to 13 like every other snap in this pass.
|
|
8340
8433
|
/* @__PURE__ */ jsxs63("li", { className: "flex items-start gap-2 text-body-xs text-default", children: [
|
|
8341
|
-
/* @__PURE__ */
|
|
8434
|
+
/* @__PURE__ */ jsx96("span", { className: "mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full bg-brand-tertiary text-[9px] font-bold text-brand", children: i + 1 }),
|
|
8342
8435
|
step
|
|
8343
8436
|
] }, i)
|
|
8344
8437
|
)) });
|
|
@@ -8346,7 +8439,7 @@ function StepsList({ steps, className }) {
|
|
|
8346
8439
|
|
|
8347
8440
|
// src/components/lists/detail-item.tsx
|
|
8348
8441
|
import clsx90 from "clsx";
|
|
8349
|
-
import { jsx as
|
|
8442
|
+
import { jsx as jsx97, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
8350
8443
|
var SPAN = {
|
|
8351
8444
|
1: "",
|
|
8352
8445
|
2: "sm:col-span-2",
|
|
@@ -8364,17 +8457,17 @@ function DetailItem({
|
|
|
8364
8457
|
const shown = value === null || value === void 0 || value === "" ? "\u2014" : value;
|
|
8365
8458
|
if (layout === "inline") {
|
|
8366
8459
|
return /* @__PURE__ */ jsxs64("div", { className: clsx90("flex gap-3 text-body-xs", SPAN[span], className), children: [
|
|
8367
|
-
/* @__PURE__ */
|
|
8460
|
+
/* @__PURE__ */ jsx97("span", { className: clsx90("shrink-0 text-default-secondary", labelWidth), children: label }),
|
|
8368
8461
|
/* @__PURE__ */ jsxs64("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
8369
|
-
/* @__PURE__ */
|
|
8370
|
-
detail && /* @__PURE__ */
|
|
8462
|
+
/* @__PURE__ */ jsx97("span", { className: "text-default", children: shown }),
|
|
8463
|
+
detail && /* @__PURE__ */ jsx97("span", { className: "text-default-secondary", children: detail })
|
|
8371
8464
|
] })
|
|
8372
8465
|
] });
|
|
8373
8466
|
}
|
|
8374
8467
|
return /* @__PURE__ */ jsxs64("div", { className: clsx90("flex min-w-0 flex-col gap-0.5", SPAN[span], className), children: [
|
|
8375
|
-
/* @__PURE__ */
|
|
8376
|
-
/* @__PURE__ */
|
|
8377
|
-
detail && /* @__PURE__ */
|
|
8468
|
+
/* @__PURE__ */ jsx97("p", { className: "text-body-tiny font-medium text-default-secondary", children: label }),
|
|
8469
|
+
/* @__PURE__ */ jsx97("p", { className: "text-body-sm font-medium text-default", children: shown }),
|
|
8470
|
+
detail && /* @__PURE__ */ jsx97("p", { className: "text-body-xs text-default-secondary", children: detail })
|
|
8378
8471
|
] });
|
|
8379
8472
|
}
|
|
8380
8473
|
var COLUMNS2 = {
|
|
@@ -8385,13 +8478,13 @@ var COLUMNS2 = {
|
|
|
8385
8478
|
4: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4"
|
|
8386
8479
|
};
|
|
8387
8480
|
function DetailGrid({ children, columns = "auto", className }) {
|
|
8388
|
-
return /* @__PURE__ */
|
|
8481
|
+
return /* @__PURE__ */ jsx97("div", { className: clsx90("grid gap-x-4 gap-y-4", COLUMNS2[columns], className), children });
|
|
8389
8482
|
}
|
|
8390
8483
|
|
|
8391
8484
|
// src/components/lists/checked-group-list.tsx
|
|
8392
8485
|
import clsx91 from "clsx";
|
|
8393
8486
|
import { LuCheck as LuCheck9 } from "react-icons/lu";
|
|
8394
|
-
import { jsx as
|
|
8487
|
+
import { jsx as jsx98, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
8395
8488
|
var COLUMNS3 = {
|
|
8396
8489
|
1: "columns-1",
|
|
8397
8490
|
2: "columns-2",
|
|
@@ -8405,23 +8498,204 @@ function CheckedGroupList({
|
|
|
8405
8498
|
className
|
|
8406
8499
|
}) {
|
|
8407
8500
|
if (groups.length === 0) {
|
|
8408
|
-
return /* @__PURE__ */
|
|
8501
|
+
return /* @__PURE__ */ jsx98("p", { className: clsx91("text-body-xs text-default-secondary", className), children: emptyLabel });
|
|
8409
8502
|
}
|
|
8410
|
-
const glyph = icon === void 0 ? /* @__PURE__ */
|
|
8411
|
-
return /* @__PURE__ */
|
|
8412
|
-
/* @__PURE__ */
|
|
8413
|
-
/* @__PURE__ */
|
|
8414
|
-
glyph && /* @__PURE__ */
|
|
8503
|
+
const glyph = icon === void 0 ? /* @__PURE__ */ jsx98(LuCheck9, { className: "size-3.5", strokeWidth: 2.5, "aria-hidden": true }) : icon;
|
|
8504
|
+
return /* @__PURE__ */ jsx98("div", { className: clsx91(COLUMNS3[columns], "gap-x-6", className), children: groups.map((group) => /* @__PURE__ */ jsxs65("div", { className: "mb-5 break-inside-avoid last:mb-0", children: [
|
|
8505
|
+
/* @__PURE__ */ jsx98("p", { className: "mb-2 text-body-tiny font-semibold uppercase tracking-wide text-default-secondary", children: group.label }),
|
|
8506
|
+
/* @__PURE__ */ jsx98("ul", { className: "space-y-1.5", children: group.items.map((item) => /* @__PURE__ */ jsxs65("li", { className: "flex items-center gap-2 text-body-xs text-default", children: [
|
|
8507
|
+
glyph && /* @__PURE__ */ jsx98("span", { className: "shrink-0", children: glyph }),
|
|
8415
8508
|
item
|
|
8416
8509
|
] }, item)) })
|
|
8417
8510
|
] }, group.label)) });
|
|
8418
8511
|
}
|
|
8419
8512
|
|
|
8513
|
+
// src/components/lists/tree-view.tsx
|
|
8514
|
+
import { useMemo as useMemo15, useRef as useRef27, useState as useState22 } from "react";
|
|
8515
|
+
import clsx92 from "clsx";
|
|
8516
|
+
import { LuChevronRight as LuChevronRight6 } from "react-icons/lu";
|
|
8517
|
+
import { jsx as jsx99, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
8518
|
+
var ROW = {
|
|
8519
|
+
sm: "min-h-8 py-1 text-body-xs",
|
|
8520
|
+
md: "min-h-10 py-2 text-body-sm"
|
|
8521
|
+
};
|
|
8522
|
+
var INDENT = 18;
|
|
8523
|
+
function TreeView({
|
|
8524
|
+
items,
|
|
8525
|
+
getId,
|
|
8526
|
+
getChildren,
|
|
8527
|
+
renderItem,
|
|
8528
|
+
label,
|
|
8529
|
+
expanded: expandedProp,
|
|
8530
|
+
defaultExpanded = [],
|
|
8531
|
+
onExpandedChange,
|
|
8532
|
+
selected: selectedProp,
|
|
8533
|
+
defaultSelected = null,
|
|
8534
|
+
onSelect,
|
|
8535
|
+
size: size2 = "md",
|
|
8536
|
+
className
|
|
8537
|
+
}) {
|
|
8538
|
+
const [expanded, setExpanded] = useControllableState({
|
|
8539
|
+
value: expandedProp,
|
|
8540
|
+
defaultValue: defaultExpanded,
|
|
8541
|
+
onChange: onExpandedChange
|
|
8542
|
+
});
|
|
8543
|
+
const [selected, setSelected] = useControllableState({
|
|
8544
|
+
value: selectedProp,
|
|
8545
|
+
defaultValue: defaultSelected
|
|
8546
|
+
});
|
|
8547
|
+
const [focusedId, setFocusedId] = useState22(null);
|
|
8548
|
+
const rowRefs = useRef27(/* @__PURE__ */ new Map());
|
|
8549
|
+
const expandedSet = useMemo15(() => new Set(expanded), [expanded]);
|
|
8550
|
+
const visible = useMemo15(() => {
|
|
8551
|
+
const out = [];
|
|
8552
|
+
const walk = (nodes, level, parentId) => {
|
|
8553
|
+
for (const item of nodes) {
|
|
8554
|
+
const id = getId(item);
|
|
8555
|
+
const children = getChildren?.(item) ?? [];
|
|
8556
|
+
const isOpen = children.length > 0 && expandedSet.has(id);
|
|
8557
|
+
out.push({ id, item, level, parentId, hasChildren: children.length > 0, expanded: isOpen });
|
|
8558
|
+
if (isOpen) walk(children, level + 1, id);
|
|
8559
|
+
}
|
|
8560
|
+
};
|
|
8561
|
+
walk(items, 1, null);
|
|
8562
|
+
return out;
|
|
8563
|
+
}, [items, getId, getChildren, expandedSet]);
|
|
8564
|
+
const tabStop = visible.find((n) => n.id === focusedId)?.id ?? visible.find((n) => n.id === selected)?.id ?? visible[0]?.id;
|
|
8565
|
+
const focus = (id) => {
|
|
8566
|
+
if (!id) return;
|
|
8567
|
+
setFocusedId(id);
|
|
8568
|
+
rowRefs.current.get(id)?.focus();
|
|
8569
|
+
};
|
|
8570
|
+
const toggle = (id, open) => {
|
|
8571
|
+
setExpanded((prev) => open ? [...prev.filter((x) => x !== id), id] : prev.filter((x) => x !== id));
|
|
8572
|
+
};
|
|
8573
|
+
const choose = (node) => {
|
|
8574
|
+
setSelected(node.id);
|
|
8575
|
+
onSelect?.(node.id, node.item);
|
|
8576
|
+
};
|
|
8577
|
+
const onKeyDown = (event, node) => {
|
|
8578
|
+
const index = visible.findIndex((n) => n.id === node.id);
|
|
8579
|
+
switch (event.key) {
|
|
8580
|
+
case "ArrowDown":
|
|
8581
|
+
event.preventDefault();
|
|
8582
|
+
focus(visible[index + 1]?.id);
|
|
8583
|
+
break;
|
|
8584
|
+
case "ArrowUp":
|
|
8585
|
+
event.preventDefault();
|
|
8586
|
+
focus(visible[index - 1]?.id);
|
|
8587
|
+
break;
|
|
8588
|
+
case "ArrowRight":
|
|
8589
|
+
event.preventDefault();
|
|
8590
|
+
if (node.hasChildren && !node.expanded) toggle(node.id, true);
|
|
8591
|
+
else if (node.expanded) focus(visible[index + 1]?.id);
|
|
8592
|
+
break;
|
|
8593
|
+
case "ArrowLeft":
|
|
8594
|
+
event.preventDefault();
|
|
8595
|
+
if (node.expanded) toggle(node.id, false);
|
|
8596
|
+
else if (node.parentId) focus(node.parentId);
|
|
8597
|
+
break;
|
|
8598
|
+
case "Home":
|
|
8599
|
+
event.preventDefault();
|
|
8600
|
+
focus(visible[0]?.id);
|
|
8601
|
+
break;
|
|
8602
|
+
case "End":
|
|
8603
|
+
event.preventDefault();
|
|
8604
|
+
focus(visible[visible.length - 1]?.id);
|
|
8605
|
+
break;
|
|
8606
|
+
case "Enter":
|
|
8607
|
+
case " ":
|
|
8608
|
+
event.preventDefault();
|
|
8609
|
+
choose(node);
|
|
8610
|
+
break;
|
|
8611
|
+
default:
|
|
8612
|
+
break;
|
|
8613
|
+
}
|
|
8614
|
+
};
|
|
8615
|
+
const renderLevel = (nodes, level) => nodes.map((item, i) => {
|
|
8616
|
+
const id = getId(item);
|
|
8617
|
+
const node = visible.find((n) => n.id === id);
|
|
8618
|
+
if (!node) return null;
|
|
8619
|
+
const children = getChildren?.(item) ?? [];
|
|
8620
|
+
const isSelected = selected === id;
|
|
8621
|
+
return /* @__PURE__ */ jsxs66(
|
|
8622
|
+
"li",
|
|
8623
|
+
{
|
|
8624
|
+
role: "treeitem",
|
|
8625
|
+
"aria-level": level,
|
|
8626
|
+
"aria-setsize": nodes.length,
|
|
8627
|
+
"aria-posinset": i + 1,
|
|
8628
|
+
"aria-expanded": node.hasChildren ? node.expanded : void 0,
|
|
8629
|
+
"aria-selected": isSelected,
|
|
8630
|
+
tabIndex: tabStop === id ? 0 : -1,
|
|
8631
|
+
ref: (el) => {
|
|
8632
|
+
if (el) rowRefs.current.set(id, el);
|
|
8633
|
+
else rowRefs.current.delete(id);
|
|
8634
|
+
},
|
|
8635
|
+
onFocus: (event) => {
|
|
8636
|
+
if (event.target === event.currentTarget) setFocusedId(id);
|
|
8637
|
+
},
|
|
8638
|
+
onKeyDown: (event) => {
|
|
8639
|
+
if (event.target === event.currentTarget) onKeyDown(event, node);
|
|
8640
|
+
},
|
|
8641
|
+
className: "outline-none [&:focus-visible>div]:ring-2 [&:focus-visible>div]:ring-inset [&:focus-visible>div]:ring-brand",
|
|
8642
|
+
children: [
|
|
8643
|
+
/* @__PURE__ */ jsxs66(
|
|
8644
|
+
"div",
|
|
8645
|
+
{
|
|
8646
|
+
onClick: () => {
|
|
8647
|
+
focus(id);
|
|
8648
|
+
choose(node);
|
|
8649
|
+
},
|
|
8650
|
+
style: { paddingLeft: 8 + (level - 1) * INDENT },
|
|
8651
|
+
className: clsx92(
|
|
8652
|
+
"flex w-full cursor-pointer items-center gap-1.5 rounded-md pr-2 transition-colors",
|
|
8653
|
+
ROW[size2],
|
|
8654
|
+
isSelected ? "bg-brand-secondary text-default" : "text-default hover:bg-default-secondary"
|
|
8655
|
+
),
|
|
8656
|
+
children: [
|
|
8657
|
+
node.hasChildren ? (
|
|
8658
|
+
// Not a button: the treeitem is the one tab stop, and Left/Right already toggle.
|
|
8659
|
+
// A pointer user still needs a target that toggles without selecting.
|
|
8660
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
8661
|
+
/* @__PURE__ */ jsx99(
|
|
8662
|
+
"span",
|
|
8663
|
+
{
|
|
8664
|
+
"aria-hidden": true,
|
|
8665
|
+
"data-tree-toggle": "",
|
|
8666
|
+
onClick: (event) => {
|
|
8667
|
+
event.stopPropagation();
|
|
8668
|
+
toggle(id, !node.expanded);
|
|
8669
|
+
focus(id);
|
|
8670
|
+
},
|
|
8671
|
+
className: "flex size-5 shrink-0 items-center justify-center rounded text-icon-default-secondary hover:bg-default-tertiary",
|
|
8672
|
+
children: /* @__PURE__ */ jsx99(LuChevronRight6, { className: clsx92("size-3.5 transition-transform", node.expanded && "rotate-90") })
|
|
8673
|
+
}
|
|
8674
|
+
)
|
|
8675
|
+
) : /* @__PURE__ */ jsx99("span", { "aria-hidden": true, className: "size-5 shrink-0" }),
|
|
8676
|
+
/* @__PURE__ */ jsx99("div", { className: "min-w-0 flex-1", children: renderItem(item, {
|
|
8677
|
+
level,
|
|
8678
|
+
hasChildren: node.hasChildren,
|
|
8679
|
+
expanded: node.expanded,
|
|
8680
|
+
selected: isSelected
|
|
8681
|
+
}) })
|
|
8682
|
+
]
|
|
8683
|
+
}
|
|
8684
|
+
),
|
|
8685
|
+
node.expanded && /* @__PURE__ */ jsx99("ul", { role: "group", className: "m-0 list-none p-0", children: renderLevel(children, level + 1) })
|
|
8686
|
+
]
|
|
8687
|
+
},
|
|
8688
|
+
id
|
|
8689
|
+
);
|
|
8690
|
+
});
|
|
8691
|
+
return /* @__PURE__ */ jsx99("ul", { role: "tree", "aria-label": label, className: clsx92("m-0 flex list-none flex-col p-0", className), children: renderLevel(items, 1) });
|
|
8692
|
+
}
|
|
8693
|
+
|
|
8420
8694
|
// src/components/lists/table.tsx
|
|
8421
8695
|
import { forwardRef as forwardRef25 } from "react";
|
|
8422
|
-
import
|
|
8696
|
+
import clsx93 from "clsx";
|
|
8423
8697
|
import { LuChevronDown as LuChevronDown4, LuChevronsUpDown, LuChevronUp } from "react-icons/lu";
|
|
8424
|
-
import { jsx as
|
|
8698
|
+
import { jsx as jsx100, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
8425
8699
|
var Table = forwardRef25(function Table2({ label, density = "default", fixed = false, className, children, ...rest }, ref) {
|
|
8426
8700
|
return (
|
|
8427
8701
|
// The scroll container is separate from the table so the header stays inside the
|
|
@@ -8429,7 +8703,7 @@ var Table = forwardRef25(function Table2({ label, density = "default", fixed = f
|
|
|
8429
8703
|
// header.
|
|
8430
8704
|
// The scroll wrapper is required for a <table>, which cannot itself scroll, so this
|
|
8431
8705
|
// takes the scrollbar styling rather than ScrollArea.
|
|
8432
|
-
/* @__PURE__ */
|
|
8706
|
+
/* @__PURE__ */ jsx100("div", { className: clsx93("w-full overflow-x-auto", SCROLLBAR_CLASSES), children: /* @__PURE__ */ jsx100(
|
|
8433
8707
|
"table",
|
|
8434
8708
|
{
|
|
8435
8709
|
ref,
|
|
@@ -8445,7 +8719,7 @@ var Table = forwardRef25(function Table2({ label, density = "default", fixed = f
|
|
|
8445
8719
|
});
|
|
8446
8720
|
var TableCaption = forwardRef25(
|
|
8447
8721
|
function TableCaption2({ className, ...rest }, ref) {
|
|
8448
|
-
return /* @__PURE__ */
|
|
8722
|
+
return /* @__PURE__ */ jsx100(
|
|
8449
8723
|
"caption",
|
|
8450
8724
|
{
|
|
8451
8725
|
ref,
|
|
@@ -8457,17 +8731,17 @@ var TableCaption = forwardRef25(
|
|
|
8457
8731
|
);
|
|
8458
8732
|
var TableHeader = forwardRef25(
|
|
8459
8733
|
function TableHeader2({ className, ...rest }, ref) {
|
|
8460
|
-
return /* @__PURE__ */
|
|
8734
|
+
return /* @__PURE__ */ jsx100("thead", { ref, className: cn("border-b border-default", className), ...rest });
|
|
8461
8735
|
}
|
|
8462
8736
|
);
|
|
8463
8737
|
var TableBody = forwardRef25(
|
|
8464
8738
|
function TableBody2({ className, ...rest }, ref) {
|
|
8465
|
-
return /* @__PURE__ */
|
|
8739
|
+
return /* @__PURE__ */ jsx100("tbody", { ref, className, ...rest });
|
|
8466
8740
|
}
|
|
8467
8741
|
);
|
|
8468
8742
|
var TableFooter = forwardRef25(
|
|
8469
8743
|
function TableFooter2({ className, ...rest }, ref) {
|
|
8470
|
-
return /* @__PURE__ */
|
|
8744
|
+
return /* @__PURE__ */ jsx100(
|
|
8471
8745
|
"tfoot",
|
|
8472
8746
|
{
|
|
8473
8747
|
ref,
|
|
@@ -8478,7 +8752,7 @@ var TableFooter = forwardRef25(
|
|
|
8478
8752
|
}
|
|
8479
8753
|
);
|
|
8480
8754
|
var TableRow = forwardRef25(function TableRow2({ selected, className, ...rest }, ref) {
|
|
8481
|
-
return /* @__PURE__ */
|
|
8755
|
+
return /* @__PURE__ */ jsx100(
|
|
8482
8756
|
"tr",
|
|
8483
8757
|
{
|
|
8484
8758
|
ref,
|
|
@@ -8496,7 +8770,7 @@ var TableRow = forwardRef25(function TableRow2({ selected, className, ...rest },
|
|
|
8496
8770
|
var ALIGN2 = { left: "text-left", center: "text-center", right: "text-right" };
|
|
8497
8771
|
var TableHead = forwardRef25(function TableHead2({ sort, onSort, align = "left", sticky = false, className, children, ...rest }, ref) {
|
|
8498
8772
|
const sortable = sort !== void 0 && onSort !== void 0;
|
|
8499
|
-
return /* @__PURE__ */
|
|
8773
|
+
return /* @__PURE__ */ jsx100(
|
|
8500
8774
|
"th",
|
|
8501
8775
|
{
|
|
8502
8776
|
ref,
|
|
@@ -8509,18 +8783,18 @@ var TableHead = forwardRef25(function TableHead2({ sort, onSort, align = "left",
|
|
|
8509
8783
|
className
|
|
8510
8784
|
),
|
|
8511
8785
|
...rest,
|
|
8512
|
-
children: sortable ? /* @__PURE__ */
|
|
8786
|
+
children: sortable ? /* @__PURE__ */ jsxs67(
|
|
8513
8787
|
"button",
|
|
8514
8788
|
{
|
|
8515
8789
|
type: "button",
|
|
8516
8790
|
onClick: onSort,
|
|
8517
|
-
className:
|
|
8791
|
+
className: clsx93(
|
|
8518
8792
|
"inline-flex items-center gap-1.5 rounded transition-colors hover:text-default",
|
|
8519
8793
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default"
|
|
8520
8794
|
),
|
|
8521
8795
|
children: [
|
|
8522
8796
|
children,
|
|
8523
|
-
sort === false ? /* @__PURE__ */
|
|
8797
|
+
sort === false ? /* @__PURE__ */ jsx100(LuChevronsUpDown, { "aria-hidden": true, className: "size-3.5 opacity-50" }) : sort === "ascending" ? /* @__PURE__ */ jsx100(LuChevronUp, { "aria-hidden": true, className: "size-3.5" }) : /* @__PURE__ */ jsx100(LuChevronDown4, { "aria-hidden": true, className: "size-3.5" })
|
|
8524
8798
|
]
|
|
8525
8799
|
}
|
|
8526
8800
|
) : children
|
|
@@ -8529,7 +8803,7 @@ var TableHead = forwardRef25(function TableHead2({ sort, onSort, align = "left",
|
|
|
8529
8803
|
});
|
|
8530
8804
|
var TableCell = forwardRef25(function TableCell2({ align = "left", density = "default", header = false, className, ...rest }, ref) {
|
|
8531
8805
|
const Tag = header ? "th" : "td";
|
|
8532
|
-
return /* @__PURE__ */
|
|
8806
|
+
return /* @__PURE__ */ jsx100(
|
|
8533
8807
|
Tag,
|
|
8534
8808
|
{
|
|
8535
8809
|
ref,
|
|
@@ -8547,8 +8821,8 @@ var TableCell = forwardRef25(function TableCell2({ align = "left", density = "de
|
|
|
8547
8821
|
});
|
|
8548
8822
|
|
|
8549
8823
|
// src/components/lists/data-table.tsx
|
|
8550
|
-
import
|
|
8551
|
-
import { jsx as
|
|
8824
|
+
import clsx94 from "clsx";
|
|
8825
|
+
import { jsx as jsx101, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
8552
8826
|
var DENSITY2 = {
|
|
8553
8827
|
default: {
|
|
8554
8828
|
headerCell: "px-4 py-3",
|
|
@@ -8577,29 +8851,29 @@ function DataTable({
|
|
|
8577
8851
|
}) {
|
|
8578
8852
|
const d = DENSITY2[density];
|
|
8579
8853
|
const minWidth = columns.length ? `calc(${columns.map((c) => c.width).join(" + ")})` : void 0;
|
|
8580
|
-
return /* @__PURE__ */
|
|
8854
|
+
return /* @__PURE__ */ jsx101("div", { className: clsx94(
|
|
8581
8855
|
// A wrapper element here is load-bearing for the table layout, and the rows are
|
|
8582
8856
|
// focusable when clickable, so this takes the scrollbar styling rather than ScrollArea.
|
|
8583
|
-
|
|
8857
|
+
clsx94("overflow-x-auto rounded-xl border border-default bg-default", SCROLLBAR_CLASSES),
|
|
8584
8858
|
className
|
|
8585
|
-
), children: /* @__PURE__ */
|
|
8586
|
-
/* @__PURE__ */
|
|
8859
|
+
), children: /* @__PURE__ */ jsxs68("table", { className: "w-full table-fixed border-collapse text-left", style: { minWidth }, children: [
|
|
8860
|
+
/* @__PURE__ */ jsx101("colgroup", { children: columns.map((col) => (
|
|
8587
8861
|
// A grow column gets no width, so table-fixed hands it the leftover space.
|
|
8588
8862
|
// Its floor is already counted in the table's min-width.
|
|
8589
|
-
/* @__PURE__ */
|
|
8863
|
+
/* @__PURE__ */ jsx101("col", { style: col.grow ? void 0 : { width: col.width } }, col.key)
|
|
8590
8864
|
)) }),
|
|
8591
|
-
/* @__PURE__ */
|
|
8592
|
-
/* @__PURE__ */
|
|
8865
|
+
/* @__PURE__ */ jsx101("thead", { children: /* @__PURE__ */ jsx101("tr", { className: "bg-default-secondary", children: columns.map((col) => /* @__PURE__ */ jsx101("th", { scope: "col", className: clsx94("overflow-hidden", d.headerCell, d.headerText), children: col.header }, col.key)) }) }),
|
|
8866
|
+
/* @__PURE__ */ jsx101("tbody", { children: rows.length === 0 ? emptyLabel && /* @__PURE__ */ jsx101("tr", { children: /* @__PURE__ */ jsx101(
|
|
8593
8867
|
"td",
|
|
8594
8868
|
{
|
|
8595
8869
|
colSpan: columns.length,
|
|
8596
|
-
className:
|
|
8870
|
+
className: clsx94(d.bodyCell, "text-center text-body-sm text-default-secondary"),
|
|
8597
8871
|
children: emptyLabel
|
|
8598
8872
|
}
|
|
8599
|
-
) }) : rows.map((row, i) => /* @__PURE__ */
|
|
8873
|
+
) }) : rows.map((row, i) => /* @__PURE__ */ jsx101(
|
|
8600
8874
|
"tr",
|
|
8601
8875
|
{
|
|
8602
|
-
className:
|
|
8876
|
+
className: clsx94(
|
|
8603
8877
|
"transition-colors hover:bg-default-secondary/50",
|
|
8604
8878
|
i > 0 && "border-t border-default",
|
|
8605
8879
|
// outline, not ring: `ring-*` compiles to box-shadow, which browsers
|
|
@@ -8614,28 +8888,28 @@ function DataTable({
|
|
|
8614
8888
|
onRowClick(row);
|
|
8615
8889
|
}
|
|
8616
8890
|
} : void 0,
|
|
8617
|
-
children: columns.map((col) => /* @__PURE__ */
|
|
8891
|
+
children: columns.map((col) => /* @__PURE__ */ jsx101("td", { className: clsx94("overflow-hidden", d.bodyCell, ALIGN3[align]), children: col.render(row) }, col.key))
|
|
8618
8892
|
},
|
|
8619
8893
|
getRowKey(row, i)
|
|
8620
8894
|
)) })
|
|
8621
8895
|
] }) });
|
|
8622
8896
|
}
|
|
8623
8897
|
function TableCellLeadText({ primary, secondary, size: size2 = "md", className }) {
|
|
8624
|
-
return /* @__PURE__ */
|
|
8625
|
-
/* @__PURE__ */
|
|
8898
|
+
return /* @__PURE__ */ jsxs68("div", { className: clsx94("flex flex-col gap-0.5", className), children: [
|
|
8899
|
+
/* @__PURE__ */ jsx101(
|
|
8626
8900
|
"span",
|
|
8627
8901
|
{
|
|
8628
|
-
className:
|
|
8902
|
+
className: clsx94(
|
|
8629
8903
|
"font-medium leading-snug text-default",
|
|
8630
8904
|
size2 === "sm" ? "text-body-xs" : "text-body-sm"
|
|
8631
8905
|
),
|
|
8632
8906
|
children: primary
|
|
8633
8907
|
}
|
|
8634
8908
|
),
|
|
8635
|
-
secondary && /* @__PURE__ */
|
|
8909
|
+
secondary && /* @__PURE__ */ jsx101(
|
|
8636
8910
|
"span",
|
|
8637
8911
|
{
|
|
8638
|
-
className:
|
|
8912
|
+
className: clsx94(
|
|
8639
8913
|
"font-normal leading-tight text-default-secondary",
|
|
8640
8914
|
size2 === "sm" ? "text-body-tiny" : "text-body-xs"
|
|
8641
8915
|
),
|
|
@@ -8651,10 +8925,10 @@ function TableCellText({
|
|
|
8651
8925
|
truncate = false,
|
|
8652
8926
|
className
|
|
8653
8927
|
}) {
|
|
8654
|
-
return /* @__PURE__ */
|
|
8928
|
+
return /* @__PURE__ */ jsx101(
|
|
8655
8929
|
"span",
|
|
8656
8930
|
{
|
|
8657
|
-
className:
|
|
8931
|
+
className: clsx94(
|
|
8658
8932
|
"font-normal leading-snug",
|
|
8659
8933
|
size2 === "sm" ? "text-body-tiny" : "text-body-xs",
|
|
8660
8934
|
truncate ? "block truncate" : "whitespace-nowrap",
|
|
@@ -8666,10 +8940,10 @@ function TableCellText({
|
|
|
8666
8940
|
);
|
|
8667
8941
|
}
|
|
8668
8942
|
function TableCellBadge({ label, className }) {
|
|
8669
|
-
return /* @__PURE__ */
|
|
8943
|
+
return /* @__PURE__ */ jsx101(
|
|
8670
8944
|
"span",
|
|
8671
8945
|
{
|
|
8672
|
-
className:
|
|
8946
|
+
className: clsx94(
|
|
8673
8947
|
"inline-flex items-center rounded-md border border-default bg-default-secondary px-2 py-0.5 text-body-tiny font-medium text-default-secondary whitespace-nowrap",
|
|
8674
8948
|
className
|
|
8675
8949
|
),
|
|
@@ -8684,8 +8958,8 @@ function TableCellProgress({
|
|
|
8684
8958
|
className
|
|
8685
8959
|
}) {
|
|
8686
8960
|
const clamped = Math.min(100, Math.max(0, percent));
|
|
8687
|
-
return /* @__PURE__ */
|
|
8688
|
-
/* @__PURE__ */
|
|
8961
|
+
return /* @__PURE__ */ jsxs68("div", { className: clsx94("flex flex-col gap-1", className), children: [
|
|
8962
|
+
/* @__PURE__ */ jsx101(
|
|
8689
8963
|
ProgressBar,
|
|
8690
8964
|
{
|
|
8691
8965
|
value: clamped,
|
|
@@ -8695,7 +8969,7 @@ function TableCellProgress({
|
|
|
8695
8969
|
"aria-label": `${clamped}%`
|
|
8696
8970
|
}
|
|
8697
8971
|
),
|
|
8698
|
-
/* @__PURE__ */
|
|
8972
|
+
/* @__PURE__ */ jsxs68("span", { className: "text-body-tiny leading-none text-default-secondary", children: [
|
|
8699
8973
|
percent,
|
|
8700
8974
|
"%"
|
|
8701
8975
|
] })
|
|
@@ -8703,9 +8977,9 @@ function TableCellProgress({
|
|
|
8703
8977
|
}
|
|
8704
8978
|
|
|
8705
8979
|
// src/components/feedback/inline-alert.tsx
|
|
8706
|
-
import
|
|
8980
|
+
import clsx95 from "clsx";
|
|
8707
8981
|
import { LuCircleCheckBig as LuCircleCheckBig2, LuInfo as LuInfo2, LuTriangleAlert as LuTriangleAlert2 } from "react-icons/lu";
|
|
8708
|
-
import { jsx as
|
|
8982
|
+
import { jsx as jsx102, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
8709
8983
|
var toneStyles3 = {
|
|
8710
8984
|
info: "border-brand-tertiary bg-brand-tertiary text-brand",
|
|
8711
8985
|
warning: "border-warning-tertiary bg-warning-tertiary text-warning",
|
|
@@ -8713,33 +8987,33 @@ var toneStyles3 = {
|
|
|
8713
8987
|
positive: "border-positive-tertiary bg-positive-tertiary text-positive"
|
|
8714
8988
|
};
|
|
8715
8989
|
var toneIcons = {
|
|
8716
|
-
info: /* @__PURE__ */
|
|
8717
|
-
warning: /* @__PURE__ */
|
|
8718
|
-
danger: /* @__PURE__ */
|
|
8719
|
-
positive: /* @__PURE__ */
|
|
8990
|
+
info: /* @__PURE__ */ jsx102(LuInfo2, { className: "size-4" }),
|
|
8991
|
+
warning: /* @__PURE__ */ jsx102(LuTriangleAlert2, { className: "size-4" }),
|
|
8992
|
+
danger: /* @__PURE__ */ jsx102(LuTriangleAlert2, { className: "size-4" }),
|
|
8993
|
+
positive: /* @__PURE__ */ jsx102(LuCircleCheckBig2, { className: "size-4" })
|
|
8720
8994
|
};
|
|
8721
8995
|
function InlineAlert({ tone, children, icon, className }) {
|
|
8722
8996
|
const glyph = icon === void 0 ? toneIcons[tone] : icon;
|
|
8723
|
-
return /* @__PURE__ */
|
|
8997
|
+
return /* @__PURE__ */ jsxs69(
|
|
8724
8998
|
"div",
|
|
8725
8999
|
{
|
|
8726
9000
|
role: tone === "danger" ? "alert" : "status",
|
|
8727
|
-
className:
|
|
9001
|
+
className: clsx95(
|
|
8728
9002
|
"flex items-start gap-3 rounded-xl border p-4 text-body-xs",
|
|
8729
9003
|
toneStyles3[tone],
|
|
8730
9004
|
className
|
|
8731
9005
|
),
|
|
8732
9006
|
children: [
|
|
8733
|
-
glyph && /* @__PURE__ */
|
|
8734
|
-
/* @__PURE__ */
|
|
9007
|
+
glyph && /* @__PURE__ */ jsx102("span", { "aria-hidden": true, className: "mt-px shrink-0", children: glyph }),
|
|
9008
|
+
/* @__PURE__ */ jsx102("div", { className: "min-w-0", children })
|
|
8735
9009
|
]
|
|
8736
9010
|
}
|
|
8737
9011
|
);
|
|
8738
9012
|
}
|
|
8739
9013
|
|
|
8740
9014
|
// src/components/feedback/empty-state.tsx
|
|
8741
|
-
import
|
|
8742
|
-
import { jsx as
|
|
9015
|
+
import clsx96 from "clsx";
|
|
9016
|
+
import { jsx as jsx103, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
8743
9017
|
var SIZES = {
|
|
8744
9018
|
sm: "py-8",
|
|
8745
9019
|
md: "py-12",
|
|
@@ -8758,10 +9032,10 @@ function EmptyState({
|
|
|
8758
9032
|
action,
|
|
8759
9033
|
className
|
|
8760
9034
|
}) {
|
|
8761
|
-
return /* @__PURE__ */
|
|
9035
|
+
return /* @__PURE__ */ jsxs70(
|
|
8762
9036
|
"div",
|
|
8763
9037
|
{
|
|
8764
|
-
className:
|
|
9038
|
+
className: clsx96(
|
|
8765
9039
|
"flex flex-col items-center justify-center gap-2 px-4 text-center text-body-sm",
|
|
8766
9040
|
SIZES[size2],
|
|
8767
9041
|
TONES[variant],
|
|
@@ -8769,8 +9043,8 @@ function EmptyState({
|
|
|
8769
9043
|
),
|
|
8770
9044
|
"aria-live": variant === "empty" ? void 0 : "polite",
|
|
8771
9045
|
children: [
|
|
8772
|
-
icon && /* @__PURE__ */
|
|
8773
|
-
/* @__PURE__ */
|
|
9046
|
+
icon && /* @__PURE__ */ jsx103("span", { className: "text-default-tertiary", children: icon }),
|
|
9047
|
+
/* @__PURE__ */ jsx103("p", { children: message }),
|
|
8774
9048
|
action
|
|
8775
9049
|
]
|
|
8776
9050
|
}
|
|
@@ -8779,8 +9053,8 @@ function EmptyState({
|
|
|
8779
9053
|
|
|
8780
9054
|
// src/components/feedback/skeleton.tsx
|
|
8781
9055
|
import { forwardRef as forwardRef26 } from "react";
|
|
8782
|
-
import
|
|
8783
|
-
import { jsx as
|
|
9056
|
+
import clsx97 from "clsx";
|
|
9057
|
+
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
8784
9058
|
var SHAPE2 = {
|
|
8785
9059
|
line: "h-4 rounded",
|
|
8786
9060
|
block: "h-full w-full rounded-lg",
|
|
@@ -8788,10 +9062,10 @@ var SHAPE2 = {
|
|
|
8788
9062
|
};
|
|
8789
9063
|
var Skeleton = forwardRef26(function Skeleton2({ shape = "line", lines = 1, className, ...rest }, ref) {
|
|
8790
9064
|
if (shape === "line" && lines > 1) {
|
|
8791
|
-
return /* @__PURE__ */
|
|
9065
|
+
return /* @__PURE__ */ jsx104("div", { ref, "aria-hidden": true, "data-slot": "skeleton-group", className: "flex flex-col gap-2", ...rest, children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ jsx104(
|
|
8792
9066
|
"div",
|
|
8793
9067
|
{
|
|
8794
|
-
className:
|
|
9068
|
+
className: clsx97(
|
|
8795
9069
|
"animate-pulse bg-default-tertiary",
|
|
8796
9070
|
SHAPE2.line,
|
|
8797
9071
|
// A ragged last line reads as a paragraph rather than a solid slab.
|
|
@@ -8802,13 +9076,13 @@ var Skeleton = forwardRef26(function Skeleton2({ shape = "line", lines = 1, clas
|
|
|
8802
9076
|
index
|
|
8803
9077
|
)) });
|
|
8804
9078
|
}
|
|
8805
|
-
return /* @__PURE__ */
|
|
9079
|
+
return /* @__PURE__ */ jsx104(
|
|
8806
9080
|
"div",
|
|
8807
9081
|
{
|
|
8808
9082
|
ref,
|
|
8809
9083
|
"aria-hidden": true,
|
|
8810
9084
|
"data-slot": "skeleton",
|
|
8811
|
-
className:
|
|
9085
|
+
className: clsx97("animate-pulse bg-default-tertiary", SHAPE2[shape], className),
|
|
8812
9086
|
...rest
|
|
8813
9087
|
}
|
|
8814
9088
|
);
|
|
@@ -8816,9 +9090,9 @@ var Skeleton = forwardRef26(function Skeleton2({ shape = "line", lines = 1, clas
|
|
|
8816
9090
|
|
|
8817
9091
|
// src/components/feedback/banner.tsx
|
|
8818
9092
|
import { forwardRef as forwardRef27, useId as useId24 } from "react";
|
|
8819
|
-
import
|
|
9093
|
+
import clsx98 from "clsx";
|
|
8820
9094
|
import { LuCircleCheckBig as LuCircleCheckBig3, LuInfo as LuInfo3, LuTriangleAlert as LuTriangleAlert3, LuX as LuX6 } from "react-icons/lu";
|
|
8821
|
-
import { jsx as
|
|
9095
|
+
import { jsx as jsx105, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
8822
9096
|
var TONE_STYLES3 = {
|
|
8823
9097
|
info: "border-brand-tertiary bg-brand-tertiary text-default",
|
|
8824
9098
|
positive: "border-positive-tertiary bg-positive-tertiary text-default",
|
|
@@ -8832,10 +9106,10 @@ var TONE_ICON_COLOR = {
|
|
|
8832
9106
|
danger: "text-icon-danger"
|
|
8833
9107
|
};
|
|
8834
9108
|
var TONE_ICON2 = {
|
|
8835
|
-
info: /* @__PURE__ */
|
|
8836
|
-
positive: /* @__PURE__ */
|
|
8837
|
-
warning: /* @__PURE__ */
|
|
8838
|
-
danger: /* @__PURE__ */
|
|
9109
|
+
info: /* @__PURE__ */ jsx105(LuInfo3, { "aria-hidden": true, className: "size-5" }),
|
|
9110
|
+
positive: /* @__PURE__ */ jsx105(LuCircleCheckBig3, { "aria-hidden": true, className: "size-5" }),
|
|
9111
|
+
warning: /* @__PURE__ */ jsx105(LuTriangleAlert3, { "aria-hidden": true, className: "size-5" }),
|
|
9112
|
+
danger: /* @__PURE__ */ jsx105(LuTriangleAlert3, { "aria-hidden": true, className: "size-5" })
|
|
8839
9113
|
};
|
|
8840
9114
|
var Banner = forwardRef27(function Banner2({
|
|
8841
9115
|
title,
|
|
@@ -8850,27 +9124,27 @@ var Banner = forwardRef27(function Banner2({
|
|
|
8850
9124
|
}, ref) {
|
|
8851
9125
|
const titleId = useId24();
|
|
8852
9126
|
const glyph = icon === void 0 ? TONE_ICON2[tone] : icon;
|
|
8853
|
-
return /* @__PURE__ */
|
|
9127
|
+
return /* @__PURE__ */ jsxs71(
|
|
8854
9128
|
"div",
|
|
8855
9129
|
{
|
|
8856
9130
|
ref,
|
|
8857
9131
|
role: variant === "alert" ? "alert" : "status",
|
|
8858
9132
|
"aria-labelledby": titleId,
|
|
8859
9133
|
"data-slot": "banner",
|
|
8860
|
-
className:
|
|
9134
|
+
className: clsx98(
|
|
8861
9135
|
"flex w-full items-start gap-3 rounded-xl border p-4",
|
|
8862
9136
|
TONE_STYLES3[tone],
|
|
8863
9137
|
className
|
|
8864
9138
|
),
|
|
8865
9139
|
...rest,
|
|
8866
9140
|
children: [
|
|
8867
|
-
glyph && /* @__PURE__ */
|
|
8868
|
-
/* @__PURE__ */
|
|
8869
|
-
/* @__PURE__ */
|
|
8870
|
-
children && /* @__PURE__ */
|
|
8871
|
-
action && /* @__PURE__ */
|
|
9141
|
+
glyph && /* @__PURE__ */ jsx105("span", { "aria-hidden": true, className: clsx98("mt-px shrink-0", TONE_ICON_COLOR[tone]), children: glyph }),
|
|
9142
|
+
/* @__PURE__ */ jsxs71("div", { className: "min-w-0 flex-1", children: [
|
|
9143
|
+
/* @__PURE__ */ jsx105("p", { id: titleId, className: "text-body-sm font-semibold text-default", children: title }),
|
|
9144
|
+
children && /* @__PURE__ */ jsx105("div", { className: "mt-1 text-body-xs text-default-secondary", children }),
|
|
9145
|
+
action && /* @__PURE__ */ jsx105("div", { className: "mt-3 flex items-center gap-2", children: action })
|
|
8872
9146
|
] }),
|
|
8873
|
-
onDismiss && /* @__PURE__ */
|
|
9147
|
+
onDismiss && /* @__PURE__ */ jsx105(
|
|
8874
9148
|
IconButton,
|
|
8875
9149
|
{
|
|
8876
9150
|
variant: "subtle",
|
|
@@ -8878,7 +9152,7 @@ var Banner = forwardRef27(function Banner2({
|
|
|
8878
9152
|
"aria-label": typeof title === "string" ? `Dismiss: ${title}` : "Dismiss",
|
|
8879
9153
|
onClick: onDismiss,
|
|
8880
9154
|
className: "-mr-1 -mt-1 shrink-0",
|
|
8881
|
-
children: /* @__PURE__ */
|
|
9155
|
+
children: /* @__PURE__ */ jsx105(LuX6, { "aria-hidden": true, size: 16 })
|
|
8882
9156
|
}
|
|
8883
9157
|
)
|
|
8884
9158
|
]
|
|
@@ -8892,13 +9166,13 @@ import {
|
|
|
8892
9166
|
useCallback as useCallback11,
|
|
8893
9167
|
useContext as useContext16,
|
|
8894
9168
|
useEffect as useEffect20,
|
|
8895
|
-
useMemo as
|
|
8896
|
-
useRef as
|
|
8897
|
-
useState as
|
|
9169
|
+
useMemo as useMemo16,
|
|
9170
|
+
useRef as useRef28,
|
|
9171
|
+
useState as useState23
|
|
8898
9172
|
} from "react";
|
|
8899
|
-
import
|
|
9173
|
+
import clsx99 from "clsx";
|
|
8900
9174
|
import { LuCircleCheckBig as LuCircleCheckBig4, LuInfo as LuInfo4, LuTriangleAlert as LuTriangleAlert4, LuX as LuX7 } from "react-icons/lu";
|
|
8901
|
-
import { jsx as
|
|
9175
|
+
import { jsx as jsx106, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
8902
9176
|
var ToastContext = createContext16(null);
|
|
8903
9177
|
function useToast() {
|
|
8904
9178
|
const context = useContext16(ToastContext);
|
|
@@ -8906,10 +9180,10 @@ function useToast() {
|
|
|
8906
9180
|
return context;
|
|
8907
9181
|
}
|
|
8908
9182
|
var TONE_ICON3 = {
|
|
8909
|
-
info: /* @__PURE__ */
|
|
8910
|
-
positive: /* @__PURE__ */
|
|
8911
|
-
warning: /* @__PURE__ */
|
|
8912
|
-
danger: /* @__PURE__ */
|
|
9183
|
+
info: /* @__PURE__ */ jsx106(LuInfo4, { "aria-hidden": true, className: "size-4" }),
|
|
9184
|
+
positive: /* @__PURE__ */ jsx106(LuCircleCheckBig4, { "aria-hidden": true, className: "size-4" }),
|
|
9185
|
+
warning: /* @__PURE__ */ jsx106(LuTriangleAlert4, { "aria-hidden": true, className: "size-4" }),
|
|
9186
|
+
danger: /* @__PURE__ */ jsx106(LuTriangleAlert4, { "aria-hidden": true, className: "size-4" })
|
|
8913
9187
|
};
|
|
8914
9188
|
var TONE_ICON_COLOR2 = {
|
|
8915
9189
|
info: "text-icon-brand",
|
|
@@ -8931,9 +9205,9 @@ function Toaster({
|
|
|
8931
9205
|
max = 4,
|
|
8932
9206
|
duration = 5e3
|
|
8933
9207
|
}) {
|
|
8934
|
-
const [toasts, setToasts] =
|
|
8935
|
-
const timers =
|
|
8936
|
-
const counter =
|
|
9208
|
+
const [toasts, setToasts] = useState23([]);
|
|
9209
|
+
const timers = useRef28(/* @__PURE__ */ new Map());
|
|
9210
|
+
const counter = useRef28(0);
|
|
8937
9211
|
const dismiss = useCallback11((id) => {
|
|
8938
9212
|
const timer = timers.current.get(id);
|
|
8939
9213
|
if (timer) {
|
|
@@ -8970,41 +9244,41 @@ function Toaster({
|
|
|
8970
9244
|
map.clear();
|
|
8971
9245
|
};
|
|
8972
9246
|
}, []);
|
|
8973
|
-
const context =
|
|
8974
|
-
return /* @__PURE__ */
|
|
9247
|
+
const context = useMemo16(() => ({ toast, dismiss, dismissAll }), [toast, dismiss, dismissAll]);
|
|
9248
|
+
return /* @__PURE__ */ jsxs72(ToastContext.Provider, { value: context, children: [
|
|
8975
9249
|
children,
|
|
8976
|
-
/* @__PURE__ */
|
|
9250
|
+
/* @__PURE__ */ jsx106(Portal, { children: /* @__PURE__ */ jsx106(
|
|
8977
9251
|
"div",
|
|
8978
9252
|
{
|
|
8979
9253
|
"aria-live": "polite",
|
|
8980
9254
|
"aria-atomic": "false",
|
|
8981
|
-
className:
|
|
9255
|
+
className: clsx99(
|
|
8982
9256
|
"pointer-events-none fixed z-toast flex w-full max-w-[380px] flex-col gap-2",
|
|
8983
9257
|
POSITION[position]
|
|
8984
9258
|
),
|
|
8985
|
-
children: toasts.map((entry) => /* @__PURE__ */
|
|
9259
|
+
children: toasts.map((entry) => /* @__PURE__ */ jsx106(ToastItem, { toast: entry, onDismiss: () => dismiss(entry.id) }, entry.id))
|
|
8986
9260
|
}
|
|
8987
9261
|
) })
|
|
8988
9262
|
] });
|
|
8989
9263
|
}
|
|
8990
9264
|
function ToastItem({ toast, onDismiss }) {
|
|
8991
9265
|
const tone = toast.tone ?? "info";
|
|
8992
|
-
return /* @__PURE__ */
|
|
9266
|
+
return /* @__PURE__ */ jsxs72(
|
|
8993
9267
|
"div",
|
|
8994
9268
|
{
|
|
8995
9269
|
role: tone === "danger" ? "alert" : "status",
|
|
8996
|
-
className:
|
|
9270
|
+
className: clsx99(
|
|
8997
9271
|
"pointer-events-auto flex w-full items-start gap-3 rounded-xl border border-default",
|
|
8998
9272
|
"bg-default p-4 shadow-400"
|
|
8999
9273
|
),
|
|
9000
9274
|
children: [
|
|
9001
|
-
/* @__PURE__ */
|
|
9002
|
-
/* @__PURE__ */
|
|
9003
|
-
/* @__PURE__ */
|
|
9004
|
-
toast.description && /* @__PURE__ */
|
|
9005
|
-
toast.action && /* @__PURE__ */
|
|
9275
|
+
/* @__PURE__ */ jsx106("span", { "aria-hidden": true, className: clsx99("mt-px shrink-0", TONE_ICON_COLOR2[tone]), children: TONE_ICON3[tone] }),
|
|
9276
|
+
/* @__PURE__ */ jsxs72("div", { className: "min-w-0 flex-1", children: [
|
|
9277
|
+
/* @__PURE__ */ jsx106("p", { className: "text-body-sm font-semibold text-default", children: toast.title }),
|
|
9278
|
+
toast.description && /* @__PURE__ */ jsx106("p", { className: "mt-0.5 text-body-xs text-default-secondary", children: toast.description }),
|
|
9279
|
+
toast.action && /* @__PURE__ */ jsx106("div", { className: "mt-2 flex items-center gap-2", children: toast.action })
|
|
9006
9280
|
] }),
|
|
9007
|
-
/* @__PURE__ */
|
|
9281
|
+
/* @__PURE__ */ jsx106(
|
|
9008
9282
|
IconButton,
|
|
9009
9283
|
{
|
|
9010
9284
|
variant: "subtle",
|
|
@@ -9012,7 +9286,7 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
9012
9286
|
"aria-label": typeof toast.title === "string" ? `Dismiss: ${toast.title}` : "Dismiss",
|
|
9013
9287
|
onClick: onDismiss,
|
|
9014
9288
|
className: "-mr-1 -mt-1 shrink-0",
|
|
9015
|
-
children: /* @__PURE__ */
|
|
9289
|
+
children: /* @__PURE__ */ jsx106(LuX7, { "aria-hidden": true, size: 14 })
|
|
9016
9290
|
}
|
|
9017
9291
|
)
|
|
9018
9292
|
]
|
|
@@ -9021,25 +9295,25 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
9021
9295
|
}
|
|
9022
9296
|
|
|
9023
9297
|
// src/components/forms/password-input.tsx
|
|
9024
|
-
import { forwardRef as forwardRef28, useState as
|
|
9298
|
+
import { forwardRef as forwardRef28, useState as useState24 } from "react";
|
|
9025
9299
|
import { LuEye, LuEyeOff } from "react-icons/lu";
|
|
9026
|
-
import { jsx as
|
|
9300
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
9027
9301
|
var PasswordInput = forwardRef28(function PasswordInput2(props, ref) {
|
|
9028
|
-
const [visible, setVisible] =
|
|
9029
|
-
return /* @__PURE__ */
|
|
9302
|
+
const [visible, setVisible] = useState24(false);
|
|
9303
|
+
return /* @__PURE__ */ jsx107(
|
|
9030
9304
|
Input,
|
|
9031
9305
|
{
|
|
9032
9306
|
ref,
|
|
9033
9307
|
...props,
|
|
9034
9308
|
type: visible ? "text" : "password",
|
|
9035
|
-
trailingAction: /* @__PURE__ */
|
|
9309
|
+
trailingAction: /* @__PURE__ */ jsx107(
|
|
9036
9310
|
"button",
|
|
9037
9311
|
{
|
|
9038
9312
|
type: "button",
|
|
9039
9313
|
"aria-label": visible ? "Hide password" : "Show password",
|
|
9040
9314
|
onClick: () => setVisible((v) => !v),
|
|
9041
9315
|
className: "flex items-center justify-center rounded transition-colors hover:text-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand",
|
|
9042
|
-
children: visible ? /* @__PURE__ */
|
|
9316
|
+
children: visible ? /* @__PURE__ */ jsx107(LuEyeOff, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ jsx107(LuEye, { "aria-hidden": true, className: "size-4" })
|
|
9043
9317
|
}
|
|
9044
9318
|
)
|
|
9045
9319
|
}
|
|
@@ -9047,31 +9321,31 @@ var PasswordInput = forwardRef28(function PasswordInput2(props, ref) {
|
|
|
9047
9321
|
});
|
|
9048
9322
|
|
|
9049
9323
|
// src/components/ai/ai-chat-bar.tsx
|
|
9050
|
-
import
|
|
9324
|
+
import clsx100 from "clsx";
|
|
9051
9325
|
import { LuArrowRight as LuArrowRight2, LuSearch as LuSearch3 } from "react-icons/lu";
|
|
9052
|
-
import { jsx as
|
|
9326
|
+
import { jsx as jsx108, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
9053
9327
|
function AIChatBar({
|
|
9054
9328
|
placeholder = "Ask Intelligence about any entity, supplier, or risk\u2026",
|
|
9055
9329
|
className
|
|
9056
9330
|
}) {
|
|
9057
|
-
return /* @__PURE__ */
|
|
9331
|
+
return /* @__PURE__ */ jsxs73(
|
|
9058
9332
|
"div",
|
|
9059
9333
|
{
|
|
9060
|
-
className:
|
|
9334
|
+
className: clsx100(
|
|
9061
9335
|
"flex h-16 items-center gap-3 rounded-2xl border border-default bg-default px-6 shadow-panel",
|
|
9062
9336
|
className
|
|
9063
9337
|
),
|
|
9064
9338
|
children: [
|
|
9065
|
-
/* @__PURE__ */
|
|
9066
|
-
/* @__PURE__ */
|
|
9067
|
-
/* @__PURE__ */
|
|
9339
|
+
/* @__PURE__ */ jsx108("span", { "aria-hidden": true, className: "shrink-0 text-icon-default-secondary", children: /* @__PURE__ */ jsx108(LuSearch3, { className: "size-4" }) }),
|
|
9340
|
+
/* @__PURE__ */ jsx108("p", { className: "flex-1 text-body-sm text-default-tertiary truncate", children: placeholder }),
|
|
9341
|
+
/* @__PURE__ */ jsxs73(
|
|
9068
9342
|
"button",
|
|
9069
9343
|
{
|
|
9070
9344
|
type: "button",
|
|
9071
9345
|
className: "inline-flex shrink-0 items-center gap-2 rounded-xl bg-brand px-4 py-3 text-body-sm font-semibold text-brand-on-brand hover:bg-brand-hover transition-colors",
|
|
9072
9346
|
children: [
|
|
9073
9347
|
"Ask",
|
|
9074
|
-
/* @__PURE__ */
|
|
9348
|
+
/* @__PURE__ */ jsx108(LuArrowRight2, { "aria-hidden": true, className: "size-4" })
|
|
9075
9349
|
]
|
|
9076
9350
|
}
|
|
9077
9351
|
)
|
|
@@ -9081,42 +9355,42 @@ function AIChatBar({
|
|
|
9081
9355
|
}
|
|
9082
9356
|
|
|
9083
9357
|
// src/components/ai/ai-suggestion-chip.tsx
|
|
9084
|
-
import
|
|
9358
|
+
import clsx101 from "clsx";
|
|
9085
9359
|
import { LuArrowRight as LuArrowRight3, LuCpu } from "react-icons/lu";
|
|
9086
|
-
import { jsx as
|
|
9360
|
+
import { jsx as jsx109, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
9087
9361
|
function AISuggestionChip({ prompt, onClick, className }) {
|
|
9088
|
-
return /* @__PURE__ */
|
|
9362
|
+
return /* @__PURE__ */ jsxs74(
|
|
9089
9363
|
"button",
|
|
9090
9364
|
{
|
|
9091
9365
|
type: "button",
|
|
9092
9366
|
onClick,
|
|
9093
|
-
className:
|
|
9367
|
+
className: clsx101(
|
|
9094
9368
|
"flex h-12 w-full items-center gap-3 rounded-xl border border-default bg-default px-3 text-left hover:bg-default-hover transition-colors",
|
|
9095
9369
|
className
|
|
9096
9370
|
),
|
|
9097
9371
|
children: [
|
|
9098
|
-
/* @__PURE__ */
|
|
9099
|
-
/* @__PURE__ */
|
|
9100
|
-
/* @__PURE__ */
|
|
9372
|
+
/* @__PURE__ */ jsx109("span", { "aria-hidden": true, className: "shrink-0 text-icon-brand", children: /* @__PURE__ */ jsx109(LuCpu, { className: "size-4" }) }),
|
|
9373
|
+
/* @__PURE__ */ jsx109("span", { className: "flex-1 text-body-sm text-default truncate", children: prompt }),
|
|
9374
|
+
/* @__PURE__ */ jsx109("span", { "aria-hidden": true, className: "shrink-0 text-icon-default-secondary", children: /* @__PURE__ */ jsx109(LuArrowRight3, { className: "size-3.5", strokeWidth: 2.5 }) })
|
|
9101
9375
|
]
|
|
9102
9376
|
}
|
|
9103
9377
|
);
|
|
9104
9378
|
}
|
|
9105
9379
|
|
|
9106
9380
|
// src/components/ai/quick-actions-bar.tsx
|
|
9107
|
-
import
|
|
9108
|
-
import { jsx as
|
|
9381
|
+
import clsx102 from "clsx";
|
|
9382
|
+
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
9109
9383
|
function QuickActionsBar({ actions, active, onSelect, className }) {
|
|
9110
|
-
return /* @__PURE__ */
|
|
9384
|
+
return /* @__PURE__ */ jsx110("div", { className: clsx102("flex flex-wrap items-center gap-3", className), children: actions.map((action) => {
|
|
9111
9385
|
const isActive = active === action.value;
|
|
9112
|
-
return /* @__PURE__ */
|
|
9386
|
+
return /* @__PURE__ */ jsx110(
|
|
9113
9387
|
"button",
|
|
9114
9388
|
{
|
|
9115
9389
|
type: "button",
|
|
9116
9390
|
"aria-pressed": isActive,
|
|
9117
9391
|
onClick: () => onSelect?.(action.value),
|
|
9118
9392
|
className: "rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default",
|
|
9119
|
-
children: /* @__PURE__ */
|
|
9393
|
+
children: /* @__PURE__ */ jsx110(TagPill, { label: action.label, tone: isActive ? "brand" : "default" })
|
|
9120
9394
|
},
|
|
9121
9395
|
action.value
|
|
9122
9396
|
);
|
|
@@ -9124,14 +9398,14 @@ function QuickActionsBar({ actions, active, onSelect, className }) {
|
|
|
9124
9398
|
}
|
|
9125
9399
|
|
|
9126
9400
|
// src/components/decorative/aurora-backdrop.tsx
|
|
9127
|
-
import { jsx as
|
|
9401
|
+
import { jsx as jsx111, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
9128
9402
|
function AuroraBackdrop() {
|
|
9129
|
-
return /* @__PURE__ */
|
|
9130
|
-
/* @__PURE__ */
|
|
9131
|
-
/* @__PURE__ */
|
|
9132
|
-
/* @__PURE__ */
|
|
9133
|
-
/* @__PURE__ */
|
|
9134
|
-
/* @__PURE__ */
|
|
9403
|
+
return /* @__PURE__ */ jsxs75("div", { className: "pointer-events-none absolute inset-0", "aria-hidden": true, children: [
|
|
9404
|
+
/* @__PURE__ */ jsx111("div", { className: "absolute -left-24 -top-28", style: { width: 380, height: 380, background: "radial-gradient(ellipse, rgba(249,133,133,0.45) 0%, transparent 70%)" } }),
|
|
9405
|
+
/* @__PURE__ */ jsx111("div", { className: "absolute -top-24 right-[-4%]", style: { width: 320, height: 320, background: "radial-gradient(ellipse, rgba(254,160,160,0.4) 0%, transparent 70%)" } }),
|
|
9406
|
+
/* @__PURE__ */ jsx111("div", { className: "absolute bottom-[-10%] right-[14%]", style: { width: 420, height: 420, background: "radial-gradient(ellipse, rgba(196,181,253,0.3) 0%, transparent 70%)" } }),
|
|
9407
|
+
/* @__PURE__ */ jsx111("div", { className: "absolute bottom-[-6%] left-[4%]", style: { width: 280, height: 280, background: "radial-gradient(ellipse, rgba(147,197,253,0.25) 0%, transparent 70%)" } }),
|
|
9408
|
+
/* @__PURE__ */ jsx111("div", { className: "absolute left-[20%] top-[30%]", style: { width: 240, height: 240, background: "radial-gradient(ellipse, rgba(173,216,255,0.18) 0%, transparent 70%)" } })
|
|
9135
9409
|
] });
|
|
9136
9410
|
}
|
|
9137
9411
|
export {
|
|
@@ -9157,6 +9431,7 @@ export {
|
|
|
9157
9431
|
CHART_SEQUENCE,
|
|
9158
9432
|
CHART_TONE,
|
|
9159
9433
|
CHART_TRACK,
|
|
9434
|
+
COUNTRY_CODES,
|
|
9160
9435
|
Calendar,
|
|
9161
9436
|
Card,
|
|
9162
9437
|
CardAction,
|
|
@@ -9193,6 +9468,7 @@ export {
|
|
|
9193
9468
|
ContextMenuTrigger,
|
|
9194
9469
|
ControlSizeProvider,
|
|
9195
9470
|
CountBadge,
|
|
9471
|
+
CountrySelect,
|
|
9196
9472
|
DEFAULT_SCORE_THRESHOLDS,
|
|
9197
9473
|
DataTable,
|
|
9198
9474
|
DatePicker,
|
|
@@ -9340,6 +9616,7 @@ export {
|
|
|
9340
9616
|
Textarea,
|
|
9341
9617
|
TextareaControl,
|
|
9342
9618
|
TileGrid,
|
|
9619
|
+
TimeZoneSelect,
|
|
9343
9620
|
TitleHero,
|
|
9344
9621
|
TitlePage,
|
|
9345
9622
|
Toaster,
|
|
@@ -9348,17 +9625,21 @@ export {
|
|
|
9348
9625
|
ToggleGroupItem,
|
|
9349
9626
|
Tooltip,
|
|
9350
9627
|
TrailChip,
|
|
9628
|
+
TreeView,
|
|
9351
9629
|
TrendLabel,
|
|
9352
9630
|
UserStatusPill,
|
|
9353
9631
|
WidgetFooter,
|
|
9354
9632
|
WidgetHeader,
|
|
9355
9633
|
WidgetTitle,
|
|
9356
9634
|
cn,
|
|
9635
|
+
countryOptions,
|
|
9357
9636
|
getScoreTone,
|
|
9358
9637
|
paginationRange,
|
|
9359
9638
|
resolveChartColor,
|
|
9360
9639
|
tabId,
|
|
9361
9640
|
tabPanelId,
|
|
9641
|
+
timeZoneOffset,
|
|
9642
|
+
timeZoneOptions,
|
|
9362
9643
|
useControlSize,
|
|
9363
9644
|
useFieldContext,
|
|
9364
9645
|
useFieldControl,
|