gridsmith-ui 0.2.19 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-GYVBRUO2.js +30 -0
- package/dist/chunk-GYVBRUO2.js.map +1 -0
- package/dist/chunk-WVB3SRXW.js +82 -0
- package/dist/chunk-WVB3SRXW.js.map +1 -0
- package/dist/feather-N37QZ7LA.js +72 -0
- package/dist/feather-N37QZ7LA.js.map +1 -0
- package/dist/heroicons-HJTKMLIJ.js +72 -0
- package/dist/heroicons-HJTKMLIJ.js.map +1 -0
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.js +128 -86
- package/dist/index.js.map +1 -1
- package/dist/lucide-6TGT4G26.js +67 -0
- package/dist/lucide-6TGT4G26.js.map +1 -0
- package/dist/phosphor-BWDP4PU7.js +72 -0
- package/dist/phosphor-BWDP4PU7.js.map +1 -0
- package/dist/roots.css +6 -0
- package/dist/tabler-6TPNTLFV.js +72 -0
- package/dist/tabler-6TPNTLFV.js.map +1 -0
- package/package.json +1 -4
- package/dist/chunk-H2XI6OUB.js +0 -396
- package/dist/chunk-H2XI6OUB.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn, GLASS_BACKDROP, GLASS_DROPDOWN, lockBodyScroll, unlockBodyScroll, GLASS_OVERLAY, GLASS_SURFACE } from './chunk-5XIPPVH7.js';
|
|
2
|
-
import { Icon } from './chunk-
|
|
2
|
+
import { Icon } from './chunk-WVB3SRXW.js';
|
|
3
3
|
import { __commonJS, __toESM } from './chunk-5WRI5ZAA.js';
|
|
4
4
|
import * as React6 from 'react';
|
|
5
5
|
import React6__default, { createContext, forwardRef, useState, useCallback, useRef, useContext, useId, useMemo, useEffect, useLayoutEffect, isValidElement, cloneElement, createElement, Fragment as Fragment$1, useDebugValue, memo, useReducer, useSyncExternalStore as useSyncExternalStore$1, useImperativeHandle } from 'react';
|
|
@@ -1545,6 +1545,17 @@ var require_core = __commonJS({
|
|
|
1545
1545
|
highlight.default = highlight;
|
|
1546
1546
|
}
|
|
1547
1547
|
});
|
|
1548
|
+
function mergeRefs(...refs) {
|
|
1549
|
+
const filtered = refs.filter(Boolean);
|
|
1550
|
+
if (filtered.length === 0) return void 0;
|
|
1551
|
+
if (filtered.length === 1) return filtered[0];
|
|
1552
|
+
return (node) => {
|
|
1553
|
+
for (const ref of filtered) {
|
|
1554
|
+
if (typeof ref === "function") ref(node);
|
|
1555
|
+
else if (ref && typeof ref === "object") ref.current = node;
|
|
1556
|
+
}
|
|
1557
|
+
};
|
|
1558
|
+
}
|
|
1548
1559
|
function Slot({ children, ref, ...slotProps }) {
|
|
1549
1560
|
if (!isValidElement(children)) {
|
|
1550
1561
|
console.warn("Slot: expected a single React element child.");
|
|
@@ -1570,7 +1581,8 @@ function Slot({ children, ref, ...slotProps }) {
|
|
|
1570
1581
|
}
|
|
1571
1582
|
}
|
|
1572
1583
|
if (ref) {
|
|
1573
|
-
|
|
1584
|
+
const childRef = children.ref ?? childProps.ref;
|
|
1585
|
+
mergedProps.ref = mergeRefs(ref, childRef);
|
|
1574
1586
|
}
|
|
1575
1587
|
return cloneElement(children, mergedProps);
|
|
1576
1588
|
}
|
|
@@ -1719,7 +1731,7 @@ function Spinner({ size = "md", color = "default", label = "Loading", className
|
|
|
1719
1731
|
);
|
|
1720
1732
|
}
|
|
1721
1733
|
var variantStyles = {
|
|
1722
|
-
default: "bg-[var(--ds-accent-primary)] [background-image:var(--ds-gradient)] text-[var(--ds-text-on-primary)] border-transparent hover:bg-[var(--ds-accent-primary-hover)] hover:brightness-110",
|
|
1734
|
+
default: "bg-[var(--ds-accent-primary)] [background-image:var(--ds-gradient)] [background-origin:border-box] text-[var(--ds-text-on-primary)] border-transparent hover:bg-[var(--ds-accent-primary-hover)] hover:brightness-110",
|
|
1723
1735
|
secondary: "bg-[var(--ds-bg-surface)] text-[var(--ds-text-primary)] border-[var(--ds-border-default)] hover:bg-[var(--ds-bg-muted)]",
|
|
1724
1736
|
tertiary: "bg-[var(--ds-bg-muted)] text-[var(--ds-text-primary)] border-transparent hover:brightness-95",
|
|
1725
1737
|
outline: "bg-[var(--ds-input-bg)] text-[var(--ds-text-primary)] border-[var(--ds-border-default)] hover:bg-[var(--ds-bg-muted)]",
|
|
@@ -2081,51 +2093,64 @@ function Label({ className, children, ...props }) {
|
|
|
2081
2093
|
}
|
|
2082
2094
|
);
|
|
2083
2095
|
}
|
|
2084
|
-
function Toggle({ checked, onChange, label, disabled, error = false, "aria-labelledby": ariaLabelledBy, ...rest }) {
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
"
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
height: 16,
|
|
2122
|
-
transform: checked ? "translateX(calc(25px - var(--ds-border-width)))" : "translateX(calc(1px + var(--ds-border-width)))"
|
|
2123
|
-
}
|
|
2096
|
+
function Toggle({ checked, onChange, label, disabled, error = false, layout = "full", "aria-labelledby": ariaLabelledBy, ...rest }) {
|
|
2097
|
+
const switchButton = /* @__PURE__ */ jsx(
|
|
2098
|
+
"button",
|
|
2099
|
+
{
|
|
2100
|
+
role: "switch",
|
|
2101
|
+
"aria-checked": checked,
|
|
2102
|
+
"aria-label": !label && !ariaLabelledBy ? "Toggle" : void 0,
|
|
2103
|
+
"aria-labelledby": ariaLabelledBy,
|
|
2104
|
+
"aria-invalid": error || void 0,
|
|
2105
|
+
disabled,
|
|
2106
|
+
onClick: () => !disabled && onChange(!checked),
|
|
2107
|
+
...rest,
|
|
2108
|
+
className: cn(
|
|
2109
|
+
"relative inline-flex shrink-0 items-center overflow-hidden",
|
|
2110
|
+
"border-[length:var(--ds-border-width)]",
|
|
2111
|
+
"rounded-[var(--ds-radius-full)]",
|
|
2112
|
+
"transition-colors duration-[var(--ds-transition-speed)]",
|
|
2113
|
+
"focus-visible:outline-none focus-visible:shadow-[var(--ds-shadow-focus)]",
|
|
2114
|
+
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
2115
|
+
checked ? "bg-[var(--ds-accent-primary)]" : "bg-[var(--ds-bg-muted)]",
|
|
2116
|
+
error ? "border-[var(--ds-status-error)]" : checked ? "border-transparent" : "border-[var(--ds-border-default)]"
|
|
2117
|
+
),
|
|
2118
|
+
style: { width: 44, height: 24 },
|
|
2119
|
+
children: /* @__PURE__ */ jsx(
|
|
2120
|
+
"span",
|
|
2121
|
+
{
|
|
2122
|
+
className: cn(
|
|
2123
|
+
"pointer-events-none inline-block shrink-0",
|
|
2124
|
+
"bg-[var(--ds-bg-surface)]",
|
|
2125
|
+
"border-[length:var(--ds-border-width)] border-transparent",
|
|
2126
|
+
"rounded-[var(--ds-radius-full)]",
|
|
2127
|
+
"transition-transform"
|
|
2128
|
+
),
|
|
2129
|
+
style: {
|
|
2130
|
+
width: 16,
|
|
2131
|
+
height: 16,
|
|
2132
|
+
transform: checked ? "translateX(calc(25px - var(--ds-border-width)))" : "translateX(calc(1px + var(--ds-border-width)))"
|
|
2124
2133
|
}
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2134
|
+
}
|
|
2135
|
+
)
|
|
2136
|
+
}
|
|
2137
|
+
);
|
|
2138
|
+
if (!label) {
|
|
2139
|
+
return /* @__PURE__ */ jsx("div", { className: cn(disabled && "opacity-disabled"), children: switchButton });
|
|
2140
|
+
}
|
|
2141
|
+
return /* @__PURE__ */ jsxs(
|
|
2142
|
+
"label",
|
|
2143
|
+
{
|
|
2144
|
+
className: cn(
|
|
2145
|
+
layout === "full" ? "flex items-center justify-between gap-ds-4" : "inline-flex items-center gap-ds-3",
|
|
2146
|
+
disabled ? "cursor-not-allowed opacity-disabled" : "cursor-pointer"
|
|
2147
|
+
),
|
|
2148
|
+
children: [
|
|
2149
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-[var(--ds-text-primary)]", children: label }),
|
|
2150
|
+
switchButton
|
|
2151
|
+
]
|
|
2152
|
+
}
|
|
2153
|
+
);
|
|
2129
2154
|
}
|
|
2130
2155
|
function Dropdown({
|
|
2131
2156
|
options,
|
|
@@ -2144,6 +2169,7 @@ function Dropdown({
|
|
|
2144
2169
|
}) {
|
|
2145
2170
|
const [open, setOpen] = useState(false);
|
|
2146
2171
|
const [search, setSearch] = useState("");
|
|
2172
|
+
const [positioned, setPositioned] = useState(false);
|
|
2147
2173
|
const triggerRef = useRef(null);
|
|
2148
2174
|
const menuRef = useRef(null);
|
|
2149
2175
|
const searchRef = useRef(null);
|
|
@@ -2169,12 +2195,16 @@ function Dropdown({
|
|
|
2169
2195
|
setPos({ top, left, width });
|
|
2170
2196
|
}, []);
|
|
2171
2197
|
useEffect(() => {
|
|
2172
|
-
if (!open)
|
|
2198
|
+
if (!open) {
|
|
2199
|
+
setPositioned(false);
|
|
2200
|
+
return;
|
|
2201
|
+
}
|
|
2173
2202
|
updatePos();
|
|
2174
2203
|
setSearch("");
|
|
2175
2204
|
requestAnimationFrame(() => {
|
|
2176
2205
|
searchRef.current?.focus();
|
|
2177
2206
|
updatePos();
|
|
2207
|
+
setPositioned(true);
|
|
2178
2208
|
});
|
|
2179
2209
|
const onScroll = () => updatePos();
|
|
2180
2210
|
window.addEventListener("scroll", onScroll, true);
|
|
@@ -2230,7 +2260,7 @@ function Dropdown({
|
|
|
2230
2260
|
"rounded-[var(--ds-radius-md)]",
|
|
2231
2261
|
"shadow-[var(--ds-input-shadow)]",
|
|
2232
2262
|
"transition-colors",
|
|
2233
|
-
!error && !disabled && "hover:border-[var(--ds-input-border-hover)]",
|
|
2263
|
+
!error && !disabled && !open && "hover:border-[var(--ds-input-border-hover)]",
|
|
2234
2264
|
open && !error && "border-[var(--ds-input-focus-ring)] ring-2 ring-[var(--ds-input-focus-ring)]",
|
|
2235
2265
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ds-input-focus-ring)] focus-visible:border-[var(--ds-input-focus-ring)]",
|
|
2236
2266
|
"cursor-pointer disabled:cursor-not-allowed disabled:opacity-disabled",
|
|
@@ -2255,7 +2285,7 @@ function Dropdown({
|
|
|
2255
2285
|
"rounded-[var(--ds-radius-md)] overflow-hidden",
|
|
2256
2286
|
"shadow-[var(--ds-shadow-dropdown),var(--ds-glass-inset)]"
|
|
2257
2287
|
),
|
|
2258
|
-
style: { top: pos.top, left: pos.left, minWidth: pos.width, width: "max-content", maxWidth: "calc(100vw - 16px)" },
|
|
2288
|
+
style: { top: pos.top, left: pos.left, minWidth: pos.width, width: "max-content", maxWidth: "calc(100vw - 16px)", visibility: positioned ? "visible" : "hidden" },
|
|
2259
2289
|
children: [
|
|
2260
2290
|
searchable && /* @__PURE__ */ jsx("div", { className: "border-b-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]", style: { padding: "var(--ds-space-2)" }, children: /* @__PURE__ */ jsx(
|
|
2261
2291
|
"input",
|
|
@@ -2569,7 +2599,7 @@ function Checkbox({ checked, onChange, label, disabled = false, indeterminate =
|
|
|
2569
2599
|
"border-[2px]",
|
|
2570
2600
|
"transition-all",
|
|
2571
2601
|
"peer-focus-visible:shadow-[var(--ds-shadow-focus)]",
|
|
2572
|
-
filled ? "bg-[var(--ds-check-bg)] border-[var(--ds-check-border)]" : "bg-[var(--ds-input-bg)] border-[var(--ds-input-border)]",
|
|
2602
|
+
filled ? "bg-[var(--ds-check-bg)] [background-image:var(--ds-gradient)] border-[var(--ds-check-border)]" : "bg-[var(--ds-input-bg)] border-[var(--ds-input-border)]",
|
|
2573
2603
|
disabled && "pointer-events-none"
|
|
2574
2604
|
),
|
|
2575
2605
|
children: /* @__PURE__ */ jsx(
|
|
@@ -2683,7 +2713,7 @@ function RadioGroup({ value, onChange, options, orientation = "vertical", classN
|
|
|
2683
2713
|
selected && "border-[var(--ds-check-border)]",
|
|
2684
2714
|
"focus-visible:shadow-[var(--ds-shadow-focus)]"
|
|
2685
2715
|
),
|
|
2686
|
-
children: selected && /* @__PURE__ */ jsx("span", { className: "h-2.5 w-2.5 rounded-full bg-[var(--ds-accent-primary)]" })
|
|
2716
|
+
children: selected && /* @__PURE__ */ jsx("span", { className: "h-2.5 w-2.5 rounded-full bg-[var(--ds-accent-primary)] [background-image:var(--ds-gradient)]" })
|
|
2687
2717
|
}
|
|
2688
2718
|
),
|
|
2689
2719
|
/* @__PURE__ */ jsx("span", { className: "text-sm text-[var(--ds-text-primary)]", children: option.label })
|
|
@@ -2781,7 +2811,7 @@ function DatePicker({ value, onChange, placeholder = "Pick a date", disabled, cl
|
|
|
2781
2811
|
"shadow-[var(--ds-input-shadow)]",
|
|
2782
2812
|
"transition-colors cursor-pointer",
|
|
2783
2813
|
"px-ds-3 py-ds-2",
|
|
2784
|
-
!error && !disabled && "hover:border-[var(--ds-input-border-hover)]",
|
|
2814
|
+
!error && !disabled && !open && "hover:border-[var(--ds-input-border-hover)]",
|
|
2785
2815
|
open && "border-[var(--ds-accent-primary)] ring-2 ring-[var(--ds-input-focus-ring)]",
|
|
2786
2816
|
disabled && "opacity-disabled cursor-not-allowed",
|
|
2787
2817
|
value ? "text-[var(--ds-text-primary)]" : "text-[var(--ds-text-muted)]"
|
|
@@ -2997,14 +3027,17 @@ function FileUpload({ onFiles, accept, multiple = true, maxSize, className, erro
|
|
|
2997
3027
|
onClick: () => inputRef.current?.click(),
|
|
2998
3028
|
"aria-invalid": error || void 0,
|
|
2999
3029
|
className: cn(
|
|
3000
|
-
"flex flex-col items-center justify-center gap-ds-2 cursor-pointer",
|
|
3030
|
+
"flex flex-col items-center justify-center gap-ds-2 cursor-pointer group",
|
|
3001
3031
|
"border-2 border-dashed rounded-[var(--ds-radius-md)]",
|
|
3002
3032
|
"transition-colors",
|
|
3003
|
-
error ? "border-[var(--ds-status-error)]" : dragOver ? "border-[var(--ds-accent-primary)] bg-[var(--ds-accent-primary)]/5" : "border-[var(--ds-border-default)] hover:border-[var(--ds-
|
|
3033
|
+
error ? "border-[var(--ds-status-error)]" : dragOver ? "border-[var(--ds-accent-primary)] bg-[var(--ds-accent-primary)]/5" : "border-[var(--ds-border-default)] hover:border-[var(--ds-accent-primary)] hover:bg-[var(--ds-accent-primary)]/5"
|
|
3004
3034
|
),
|
|
3005
3035
|
style: { padding: "var(--ds-space-8) var(--ds-space-4)" },
|
|
3006
3036
|
children: [
|
|
3007
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
3037
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
3038
|
+
"flex items-center justify-center w-10 h-10 rounded-[var(--ds-radius-full)] transition-colors",
|
|
3039
|
+
"bg-[var(--ds-bg-muted)] group-hover:bg-[var(--ds-accent-primary)]/10"
|
|
3040
|
+
), children: /* @__PURE__ */ jsx(Icon, { name: "plus", size: 20, className: "text-[var(--ds-text-muted)] group-hover:text-[var(--ds-accent-primary)] transition-colors" }) }),
|
|
3008
3041
|
/* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
3009
3042
|
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-[var(--ds-text-primary)]", children: "Drop files here or click to browse" }),
|
|
3010
3043
|
/* @__PURE__ */ jsxs("p", { className: "text-xs text-[var(--ds-text-muted)] mt-ds-1", children: [
|
|
@@ -3116,7 +3149,7 @@ function SliderRange({
|
|
|
3116
3149
|
/* @__PURE__ */ jsx(
|
|
3117
3150
|
"div",
|
|
3118
3151
|
{
|
|
3119
|
-
className: "absolute h-1.5 rounded-[var(--ds-radius-full)] bg-[var(--ds-accent-primary)]",
|
|
3152
|
+
className: "absolute h-1.5 rounded-[var(--ds-radius-full)] bg-[var(--ds-accent-primary)] [background-image:var(--ds-gradient)]",
|
|
3120
3153
|
style: {
|
|
3121
3154
|
left: `${isRange ? pct(low) : 0}%`,
|
|
3122
3155
|
width: `${isRange ? pct(high) - pct(low) : pct(low)}%`
|
|
@@ -3134,15 +3167,15 @@ function SliderRange({
|
|
|
3134
3167
|
"aria-invalid": error || void 0,
|
|
3135
3168
|
onPointerDown: handlePointerDown("low"),
|
|
3136
3169
|
className: cn(
|
|
3137
|
-
"absolute w-ds-4 h-ds-4 rounded-[var(--ds-radius-full)]",
|
|
3170
|
+
"absolute w-ds-4 h-ds-4 -translate-x-1/2 rounded-[var(--ds-radius-full)]",
|
|
3138
3171
|
"bg-[var(--ds-bg-surface)] border-2",
|
|
3139
3172
|
error ? "border-[var(--ds-status-error)]" : "border-[var(--ds-accent-primary)]",
|
|
3140
3173
|
"shadow-[var(--ds-shadow-sm)]",
|
|
3141
|
-
"transition-shadow",
|
|
3174
|
+
"transition-[shadow,transform] duration-200 ease-out",
|
|
3142
3175
|
"focus-visible:shadow-[var(--ds-shadow-focus)]",
|
|
3143
|
-
!disabled && "cursor-grab active:cursor-grabbing"
|
|
3176
|
+
!disabled && "cursor-grab active:cursor-grabbing hover:scale-125 active:scale-150"
|
|
3144
3177
|
),
|
|
3145
|
-
style: { left: `${pct(low)}
|
|
3178
|
+
style: { left: `${pct(low)}%` }
|
|
3146
3179
|
}
|
|
3147
3180
|
),
|
|
3148
3181
|
/* @__PURE__ */ jsx(
|
|
@@ -3156,15 +3189,15 @@ function SliderRange({
|
|
|
3156
3189
|
"aria-invalid": error || void 0,
|
|
3157
3190
|
onPointerDown: handlePointerDown("high"),
|
|
3158
3191
|
className: cn(
|
|
3159
|
-
"absolute w-ds-4 h-ds-4 rounded-[var(--ds-radius-full)]",
|
|
3192
|
+
"absolute w-ds-4 h-ds-4 -translate-x-1/2 rounded-[var(--ds-radius-full)]",
|
|
3160
3193
|
"bg-[var(--ds-bg-surface)] border-2",
|
|
3161
3194
|
error ? "border-[var(--ds-status-error)]" : "border-[var(--ds-accent-primary)]",
|
|
3162
3195
|
"shadow-[var(--ds-shadow-sm)]",
|
|
3163
|
-
"transition-shadow",
|
|
3196
|
+
"transition-[shadow,transform] duration-200 ease-out",
|
|
3164
3197
|
"focus-visible:shadow-[var(--ds-shadow-focus)]",
|
|
3165
|
-
!disabled && "cursor-grab active:cursor-grabbing"
|
|
3198
|
+
!disabled && "cursor-grab active:cursor-grabbing hover:scale-125 active:scale-150"
|
|
3166
3199
|
),
|
|
3167
|
-
style: { left: `${pct(high)}
|
|
3200
|
+
style: { left: `${pct(high)}%` }
|
|
3168
3201
|
}
|
|
3169
3202
|
)
|
|
3170
3203
|
]
|
|
@@ -3259,7 +3292,7 @@ function TimePicker({
|
|
|
3259
3292
|
"shadow-[var(--ds-input-shadow)]",
|
|
3260
3293
|
"transition-colors cursor-pointer",
|
|
3261
3294
|
"px-ds-3 py-ds-2",
|
|
3262
|
-
!error && !disabled && "hover:border-[var(--ds-input-border-hover)]",
|
|
3295
|
+
!error && !disabled && !open && "hover:border-[var(--ds-input-border-hover)]",
|
|
3263
3296
|
open && "border-[var(--ds-accent-primary)] ring-2 ring-[var(--ds-input-focus-ring)]",
|
|
3264
3297
|
disabled && "opacity-disabled cursor-not-allowed",
|
|
3265
3298
|
value ? "text-[var(--ds-text-primary)]" : "text-[var(--ds-text-muted)]"
|
|
@@ -3357,6 +3390,7 @@ function NumberInput({
|
|
|
3357
3390
|
}) {
|
|
3358
3391
|
const intervalRef = useRef(void 0);
|
|
3359
3392
|
const timeoutRef = useRef(void 0);
|
|
3393
|
+
const inputRef = useRef(null);
|
|
3360
3394
|
const clamp = useCallback(
|
|
3361
3395
|
(v) => Math.min(max2, Math.max(min2, v)),
|
|
3362
3396
|
[min2, max2]
|
|
@@ -3413,7 +3447,7 @@ function NumberInput({
|
|
|
3413
3447
|
"bg-[var(--ds-input-bg)]",
|
|
3414
3448
|
"transition-colors duration-[var(--ds-transition-speed)]",
|
|
3415
3449
|
!error && !disabled && "hover:border-[var(--ds-input-border-hover)]",
|
|
3416
|
-
"
|
|
3450
|
+
"focus-within:ring-2 focus-within:ring-[var(--ds-input-focus-ring)] focus-within:border-[var(--ds-input-focus-ring)] focus-within:hover:border-[var(--ds-input-focus-ring)]",
|
|
3417
3451
|
disabled && "opacity-disabled cursor-not-allowed",
|
|
3418
3452
|
className
|
|
3419
3453
|
),
|
|
@@ -3424,7 +3458,11 @@ function NumberInput({
|
|
|
3424
3458
|
type: "button",
|
|
3425
3459
|
tabIndex: -1,
|
|
3426
3460
|
disabled: disabled || atMin,
|
|
3427
|
-
onMouseDown: () =>
|
|
3461
|
+
onMouseDown: (e) => {
|
|
3462
|
+
e.preventDefault();
|
|
3463
|
+
inputRef.current?.focus();
|
|
3464
|
+
!disabled && !atMin && startRepeat(decrement);
|
|
3465
|
+
},
|
|
3428
3466
|
onMouseUp: stopRepeat,
|
|
3429
3467
|
onMouseLeave: stopRepeat,
|
|
3430
3468
|
className: cn(
|
|
@@ -3446,6 +3484,7 @@ function NumberInput({
|
|
|
3446
3484
|
/* @__PURE__ */ jsx(
|
|
3447
3485
|
"input",
|
|
3448
3486
|
{
|
|
3487
|
+
ref: inputRef,
|
|
3449
3488
|
id,
|
|
3450
3489
|
type: "text",
|
|
3451
3490
|
inputMode: "decimal",
|
|
@@ -3473,7 +3512,11 @@ function NumberInput({
|
|
|
3473
3512
|
type: "button",
|
|
3474
3513
|
tabIndex: -1,
|
|
3475
3514
|
disabled: disabled || atMax,
|
|
3476
|
-
onMouseDown: () =>
|
|
3515
|
+
onMouseDown: (e) => {
|
|
3516
|
+
e.preventDefault();
|
|
3517
|
+
inputRef.current?.focus();
|
|
3518
|
+
!disabled && !atMax && startRepeat(increment);
|
|
3519
|
+
},
|
|
3477
3520
|
onMouseUp: stopRepeat,
|
|
3478
3521
|
onMouseLeave: stopRepeat,
|
|
3479
3522
|
className: cn(
|
|
@@ -22881,7 +22924,7 @@ function createCustomEqual(options = {}) {
|
|
|
22881
22924
|
const equals2 = createCustomInternalComparator ? createCustomInternalComparator(comparator) : createInternalEqualityComparator(comparator);
|
|
22882
22925
|
return createIsEqual({ circular, comparator, createState, equals: equals2, strict });
|
|
22883
22926
|
}
|
|
22884
|
-
var
|
|
22927
|
+
var mergeRefs2 = (...refs) => {
|
|
22885
22928
|
return (node) => {
|
|
22886
22929
|
refs.forEach((ref) => {
|
|
22887
22930
|
if (typeof ref === "function") {
|
|
@@ -22997,7 +23040,7 @@ var PureEditorContent = class extends React6__default.Component {
|
|
|
22997
23040
|
render() {
|
|
22998
23041
|
const { editor, innerRef, ...rest } = this.props;
|
|
22999
23042
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23000
|
-
/* @__PURE__ */ jsx("div", { ref:
|
|
23043
|
+
/* @__PURE__ */ jsx("div", { ref: mergeRefs2(innerRef, this.editorContentRef), ...rest }),
|
|
23001
23044
|
(editor == null ? void 0 : editor.contentComponent) && /* @__PURE__ */ jsx(Portals, { contentComponent: editor.contentComponent })
|
|
23002
23045
|
] });
|
|
23003
23046
|
}
|
|
@@ -82438,7 +82481,7 @@ function Table2({
|
|
|
82438
82481
|
className
|
|
82439
82482
|
),
|
|
82440
82483
|
children: /* @__PURE__ */ jsxs("table", { className: "w-full text-sm", children: [
|
|
82441
|
-
/* @__PURE__ */ jsx("thead", { className: cn(stickyHeader && "sticky top-0 z-10
|
|
82484
|
+
/* @__PURE__ */ jsx("thead", { className: cn("bg-[var(--ds-bg-muted)]", stickyHeader && "sticky top-0 z-10"), children: /* @__PURE__ */ jsxs("tr", { className: "border-b-[length:var(--ds-divider-width)] border-[var(--ds-border-subtle)]", children: [
|
|
82442
82485
|
selectable && /* @__PURE__ */ jsx("th", { className: cn("w-10", density === "compact" ? "px-ds-2 py-ds-2" : "px-ds-3 py-ds-3"), children: /* @__PURE__ */ jsx(
|
|
82443
82486
|
Checkbox,
|
|
82444
82487
|
{
|
|
@@ -83115,7 +83158,7 @@ function MonthView({
|
|
|
83115
83158
|
{
|
|
83116
83159
|
className: cn(
|
|
83117
83160
|
"text-xs w-6 h-6 flex items-center justify-center rounded-full",
|
|
83118
|
-
today ? "bg-[var(--ds-accent-primary)] text-[var(--ds-text-on-primary)] font-bold" : "text-[var(--ds-text-secondary)]"
|
|
83161
|
+
today ? "bg-[var(--ds-accent-primary)] [background-image:var(--ds-gradient)] text-[var(--ds-text-on-primary)] font-bold" : "text-[var(--ds-text-secondary)]"
|
|
83119
83162
|
),
|
|
83120
83163
|
children: day.getDate()
|
|
83121
83164
|
}
|
|
@@ -84089,10 +84132,10 @@ function EmptyState({ icon, title, description, action, variant = "empty", class
|
|
|
84089
84132
|
);
|
|
84090
84133
|
}
|
|
84091
84134
|
var dotVariant = {
|
|
84092
|
-
default: "bg-[var(--ds-accent-primary)]",
|
|
84093
|
-
success: "bg-[var(--ds-status-success)]",
|
|
84094
|
-
warning: "bg-[var(--ds-status-warning)]",
|
|
84095
|
-
error: "bg-[var(--ds-status-error)]"
|
|
84135
|
+
default: "bg-[var(--ds-accent-primary)] shadow-[0_0_0_3px_var(--ds-accent-primary)]/20",
|
|
84136
|
+
success: "bg-[var(--ds-status-success)] shadow-[0_0_0_3px_var(--ds-status-success)]/20",
|
|
84137
|
+
warning: "bg-[var(--ds-status-warning)] shadow-[0_0_0_3px_var(--ds-status-warning)]/20",
|
|
84138
|
+
error: "bg-[var(--ds-status-error)] shadow-[0_0_0_3px_var(--ds-status-error)]/20"
|
|
84096
84139
|
};
|
|
84097
84140
|
function Timeline({ items, orientation = "vertical", className, ref }) {
|
|
84098
84141
|
if (orientation === "horizontal") {
|
|
@@ -84474,7 +84517,7 @@ function TreeNodeRow({
|
|
|
84474
84517
|
className: cn(
|
|
84475
84518
|
"flex items-center gap-ds-2 py-ds-1.5 px-ds-2 rounded-[var(--ds-radius-md)] cursor-pointer transition-colors",
|
|
84476
84519
|
"focus-visible:outline-none focus-visible:shadow-[var(--ds-shadow-focus)]",
|
|
84477
|
-
isSelected ? "bg-[var(--ds-
|
|
84520
|
+
isSelected ? "bg-[var(--ds-tab-active-bg)] text-[var(--ds-accent-primary)] font-medium border-l-2 border-[var(--ds-accent-primary)]" : "text-[var(--ds-text-primary)] hover:bg-[var(--ds-tab-hover-bg)] hover:text-[var(--ds-text-primary)]",
|
|
84478
84521
|
node.disabled && "opacity-disabled pointer-events-none"
|
|
84479
84522
|
),
|
|
84480
84523
|
style: { paddingLeft: `calc(var(--ds-space-5) * ${depth} + var(--ds-space-2))` },
|
|
@@ -84668,7 +84711,7 @@ function Carousel({
|
|
|
84668
84711
|
disabled: !canPrev,
|
|
84669
84712
|
"aria-label": "Previous slide",
|
|
84670
84713
|
className: cn(
|
|
84671
|
-
"absolute left-
|
|
84714
|
+
"absolute left-4 top-1/2 -translate-y-1/2 z-10",
|
|
84672
84715
|
"flex items-center justify-center w-8 h-8",
|
|
84673
84716
|
"rounded-[var(--ds-radius-full)]",
|
|
84674
84717
|
"bg-[var(--ds-bg-surface-elevated)] border-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]",
|
|
@@ -84687,7 +84730,7 @@ function Carousel({
|
|
|
84687
84730
|
disabled: !canNext,
|
|
84688
84731
|
"aria-label": "Next slide",
|
|
84689
84732
|
className: cn(
|
|
84690
|
-
"absolute right-
|
|
84733
|
+
"absolute right-4 top-1/2 -translate-y-1/2 z-10",
|
|
84691
84734
|
"flex items-center justify-center w-8 h-8",
|
|
84692
84735
|
"rounded-[var(--ds-radius-full)]",
|
|
84693
84736
|
"bg-[var(--ds-bg-surface-elevated)] border-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]",
|
|
@@ -87638,7 +87681,7 @@ function DataGrid({
|
|
|
87638
87681
|
"bg-[var(--ds-bg-surface)]"
|
|
87639
87682
|
),
|
|
87640
87683
|
children: /* @__PURE__ */ jsxs("table", { className: "w-full text-sm", children: [
|
|
87641
|
-
/* @__PURE__ */ jsx("thead", { children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ jsx("tr", { className: "border-b-[length:var(--ds-divider-width)] border-[var(--ds-border-subtle)]", children: hg.headers.map((header) => {
|
|
87684
|
+
/* @__PURE__ */ jsx("thead", { className: "bg-[var(--ds-bg-muted)]", children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ jsx("tr", { className: "border-b-[length:var(--ds-divider-width)] border-[var(--ds-border-subtle)]", children: hg.headers.map((header) => {
|
|
87642
87685
|
const canSort = header.column.getCanSort();
|
|
87643
87686
|
const sorted = header.column.getIsSorted();
|
|
87644
87687
|
return /* @__PURE__ */ jsx(
|
|
@@ -93784,7 +93827,7 @@ function Pagination({ currentPage, totalPages, onPageChange, pageSize, pageSizeO
|
|
|
93784
93827
|
"rounded-[var(--ds-radius-md)]",
|
|
93785
93828
|
"border-[length:var(--ds-border-width)]",
|
|
93786
93829
|
"transition-colors duration-[var(--ds-transition-speed)]",
|
|
93787
|
-
p === currentPage ? "bg-[var(--ds-accent-primary)] text-[var(--ds-text-on-primary)] border-[var(--ds-accent-primary)]" : "bg-[var(--ds-bg-surface)] text-[var(--ds-text-secondary)] border-[var(--ds-border-default)] hover:bg-[var(--ds-bg-muted)] hover:text-[var(--ds-text-primary)]"
|
|
93830
|
+
p === currentPage ? "bg-[var(--ds-accent-primary)] [background-image:var(--ds-gradient)] text-[var(--ds-text-on-primary)] border-[var(--ds-accent-primary)]" : "bg-[var(--ds-bg-surface)] text-[var(--ds-text-secondary)] border-[var(--ds-border-default)] hover:bg-[var(--ds-bg-muted)] hover:text-[var(--ds-text-primary)]"
|
|
93788
93831
|
),
|
|
93789
93832
|
children: p
|
|
93790
93833
|
},
|
|
@@ -93918,7 +93961,7 @@ function StepCircle({ status, index, onClick, clickable }) {
|
|
|
93918
93961
|
"focus-visible:outline-none focus-visible:shadow-[var(--ds-shadow-focus)]",
|
|
93919
93962
|
clickable && "cursor-pointer",
|
|
93920
93963
|
!clickable && "cursor-default",
|
|
93921
|
-
status === "complete" && "bg-[var(--ds-accent-primary)] text-[var(--ds-text-on-primary)]",
|
|
93964
|
+
status === "complete" && "bg-[var(--ds-accent-primary)] [background-image:var(--ds-gradient)] text-[var(--ds-text-on-primary)]",
|
|
93922
93965
|
status === "current" && "border-2 border-[var(--ds-accent-primary)] text-[var(--ds-accent-primary)] bg-[var(--ds-bg-surface)]",
|
|
93923
93966
|
status === "error" && "bg-[var(--ds-status-error)] text-[var(--ds-text-on-primary)]",
|
|
93924
93967
|
status === "loading" && "border-2 border-[var(--ds-accent-primary)] text-[var(--ds-accent-primary)] bg-[var(--ds-bg-surface)] animate-pulse",
|
|
@@ -94768,7 +94811,6 @@ function PageHeader({
|
|
|
94768
94811
|
onBack,
|
|
94769
94812
|
actions,
|
|
94770
94813
|
avatar,
|
|
94771
|
-
stats,
|
|
94772
94814
|
filters,
|
|
94773
94815
|
bannerImage,
|
|
94774
94816
|
as: Heading2 = "h1",
|
|
@@ -94850,7 +94892,6 @@ function PageHeader({
|
|
|
94850
94892
|
] }),
|
|
94851
94893
|
actions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-ds-2 shrink-0", children: actions })
|
|
94852
94894
|
] }),
|
|
94853
|
-
stats && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-ds-6 mt-ds-3", children: stats }),
|
|
94854
94895
|
filters && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-ds-3 mt-ds-4", children: filters })
|
|
94855
94896
|
] })
|
|
94856
94897
|
]
|
|
@@ -96879,7 +96920,7 @@ var positionClasses = {
|
|
|
96879
96920
|
"top-center": "top-ds-4 left-1/2 -translate-x-1/2",
|
|
96880
96921
|
"bottom-center": "bottom-ds-4 left-1/2 -translate-x-1/2"
|
|
96881
96922
|
};
|
|
96882
|
-
function Toast({ variant = "default", message, visible, onDismiss, duration = 3e3, pauseOnHover = false, action, position = "bottom-right", container }) {
|
|
96923
|
+
function Toast({ variant = "default", message, visible, onDismiss, duration = 3e3, pauseOnHover = false, action, position = "bottom-right", mode, container }) {
|
|
96883
96924
|
const isMobile = useBreakpoint("sm");
|
|
96884
96925
|
const isCentered = position === "top-center" || position === "bottom-center";
|
|
96885
96926
|
const timerRef = useRef(void 0);
|
|
@@ -96921,6 +96962,7 @@ function Toast({ variant = "default", message, visible, onDismiss, duration = 3e
|
|
|
96921
96962
|
{
|
|
96922
96963
|
role: "status",
|
|
96923
96964
|
"aria-live": "polite",
|
|
96965
|
+
"data-mode": mode,
|
|
96924
96966
|
onMouseEnter: handleMouseEnter,
|
|
96925
96967
|
onMouseLeave: handleMouseLeave2,
|
|
96926
96968
|
className: cn(
|