@assure-one/design-system 0.17.0 → 1.0.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.d.ts +9 -3
- package/dist/index.js +23 -15
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -289,11 +289,17 @@ interface CommandPaletteProps {
|
|
|
289
289
|
declare function CommandPalette({ items, open: controlledOpen, onOpenChange, placeholder, }: CommandPaletteProps): react_jsx_runtime.JSX.Element;
|
|
290
290
|
|
|
291
291
|
interface ConfirmActionButtonProps {
|
|
292
|
-
/** Element rendered as the dialog trigger via `<AlertDialogTrigger asChild>`.
|
|
293
|
-
|
|
292
|
+
/** Element rendered as the dialog trigger via `<AlertDialogTrigger asChild>`.
|
|
293
|
+
* Optional: omit it when the dialog is driven entirely by `open` /
|
|
294
|
+
* `onOpenChange` (e.g. a menu item hoists the dialog out of a closing
|
|
295
|
+
* DropdownMenu). With no trigger, nothing renders until `open` is set. */
|
|
296
|
+
trigger?: React$1.ReactNode;
|
|
294
297
|
title: React$1.ReactNode;
|
|
295
298
|
description?: React$1.ReactNode;
|
|
296
299
|
confirmLabel?: React$1.ReactNode;
|
|
300
|
+
/** Shown on the confirm button while `onConfirm` is awaiting. Falls back to
|
|
301
|
+
* `confirmLabel` when omitted, so existing callers are unaffected. */
|
|
302
|
+
pendingLabel?: React$1.ReactNode;
|
|
297
303
|
cancelLabel?: React$1.ReactNode;
|
|
298
304
|
/** Awaited; dialog closes after resolve, stays open on reject. */
|
|
299
305
|
onConfirm: () => void | Promise<void>;
|
|
@@ -309,7 +315,7 @@ interface ConfirmActionButtonProps {
|
|
|
309
315
|
/** Called when the dialog requests an open-state change. */
|
|
310
316
|
onOpenChange?: (open: boolean) => void;
|
|
311
317
|
}
|
|
312
|
-
declare function ConfirmActionButton({ trigger, title, description, confirmLabel, cancelLabel, onConfirm, destructive, contentClassName, open, defaultOpen, onOpenChange, }: ConfirmActionButtonProps): react_jsx_runtime.JSX.Element;
|
|
318
|
+
declare function ConfirmActionButton({ trigger, title, description, confirmLabel, pendingLabel, cancelLabel, onConfirm, destructive, contentClassName, open, defaultOpen, onOpenChange, }: ConfirmActionButtonProps): react_jsx_runtime.JSX.Element;
|
|
313
319
|
|
|
314
320
|
declare const ContextMenu: React$1.FC<ContextMenuPrimitive.ContextMenuProps>;
|
|
315
321
|
declare const ContextMenuTrigger: React$1.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React$1.RefAttributes<HTMLSpanElement>>;
|
package/dist/index.js
CHANGED
|
@@ -3053,7 +3053,7 @@ var Checkbox = React36.forwardRef(function Checkbox2({
|
|
|
3053
3053
|
shape === "circle" ? "rounded-full" : "rounded-[4px]",
|
|
3054
3054
|
"transition-[color,background-color,border-color,box-shadow] duration-[var(--duration-fast)]",
|
|
3055
3055
|
"hover:border-fg-4",
|
|
3056
|
-
"focus-visible:border-
|
|
3056
|
+
"focus-visible:[border-color:var(--focus-ring-border)] focus-visible:[box-shadow:var(--shadow-focus-ring)] focus-visible:outline-none",
|
|
3057
3057
|
"data-[state=checked]:border-pro-fg data-[state=checked]:bg-pro-bg",
|
|
3058
3058
|
"data-[state=indeterminate]:border-pro-fg data-[state=indeterminate]:bg-pro-bg",
|
|
3059
3059
|
"disabled:bg-bg-disabled disabled:border-rule disabled:text-fg-disabled disabled:cursor-not-allowed",
|
|
@@ -3087,7 +3087,7 @@ var SelectTrigger = React36.forwardRef(({ className, children, ...props }, ref)
|
|
|
3087
3087
|
"transition-[color,background-color,border-color,box-shadow] duration-[var(--duration-fast)] ease-[var(--ease-out-quart)]",
|
|
3088
3088
|
"motion-reduce:transition-none",
|
|
3089
3089
|
"placeholder:text-fg-4",
|
|
3090
|
-
"focus-visible:border-
|
|
3090
|
+
"focus-visible:[border-color:var(--focus-ring-border)] focus-visible:[box-shadow:var(--shadow-focus-ring)] focus-visible:outline-none",
|
|
3091
3091
|
"disabled:bg-bg-disabled disabled:text-fg-disabled disabled:cursor-not-allowed",
|
|
3092
3092
|
"data-[placeholder]:text-fg-4",
|
|
3093
3093
|
"aria-[invalid=true]:border-danger-line aria-[invalid=true]:focus-visible:border-danger-fg",
|
|
@@ -3651,6 +3651,7 @@ function ConfirmActionButton({
|
|
|
3651
3651
|
title,
|
|
3652
3652
|
description,
|
|
3653
3653
|
confirmLabel = "Confirm",
|
|
3654
|
+
pendingLabel,
|
|
3654
3655
|
cancelLabel = "Cancel",
|
|
3655
3656
|
onConfirm,
|
|
3656
3657
|
destructive = true,
|
|
@@ -3691,7 +3692,7 @@ function ConfirmActionButton({
|
|
|
3691
3692
|
setDialogOpen(next);
|
|
3692
3693
|
},
|
|
3693
3694
|
children: [
|
|
3694
|
-
/* @__PURE__ */ jsx(AlertDialogTrigger, { asChild: true, children: trigger }),
|
|
3695
|
+
trigger != null && /* @__PURE__ */ jsx(AlertDialogTrigger, { asChild: true, children: trigger }),
|
|
3695
3696
|
/* @__PURE__ */ jsxs(AlertDialogContent, { className: contentClassName, children: [
|
|
3696
3697
|
/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [
|
|
3697
3698
|
/* @__PURE__ */ jsx(AlertDialogTitle, { children: title }),
|
|
@@ -3707,7 +3708,7 @@ function ConfirmActionButton({
|
|
|
3707
3708
|
className: cn(
|
|
3708
3709
|
!destructive && "bg-pro-fg text-fg-on-pro hover:bg-pro-hover active:bg-pro-active"
|
|
3709
3710
|
),
|
|
3710
|
-
children: confirmLabel
|
|
3711
|
+
children: pending && pendingLabel != null ? pendingLabel : confirmLabel
|
|
3711
3712
|
}
|
|
3712
3713
|
)
|
|
3713
3714
|
] })
|
|
@@ -4188,7 +4189,7 @@ var DatePicker = forwardRef(function DatePicker2({
|
|
|
4188
4189
|
"transition-[color,background-color,border-color,box-shadow] duration-[var(--duration-fast)] ease-[var(--ease-out-quart)]",
|
|
4189
4190
|
"motion-reduce:transition-none",
|
|
4190
4191
|
"placeholder:font-body placeholder:text-fg-4",
|
|
4191
|
-
"focus-visible:border-
|
|
4192
|
+
"focus-visible:[border-color:var(--focus-ring-border)] focus-visible:outline-none",
|
|
4192
4193
|
"focus-visible:[box-shadow:var(--shadow-focus-ring)]",
|
|
4193
4194
|
"disabled:bg-bg-disabled disabled:text-fg-disabled disabled:cursor-not-allowed",
|
|
4194
4195
|
"aria-[invalid=true]:border-danger-line aria-[invalid=true]:focus-visible:border-danger-fg",
|
|
@@ -4370,7 +4371,7 @@ var DateRangePicker = forwardRef(
|
|
|
4370
4371
|
"transition-[color,background-color,border-color,box-shadow] duration-[var(--duration-fast)] ease-[var(--ease-out-quart)]",
|
|
4371
4372
|
"motion-reduce:transition-none",
|
|
4372
4373
|
"hover:bg-bg-2",
|
|
4373
|
-
"focus-visible:border-
|
|
4374
|
+
"focus-visible:[border-color:var(--focus-ring-border)] focus-visible:outline-none",
|
|
4374
4375
|
"focus-visible:[box-shadow:var(--shadow-focus-ring)]",
|
|
4375
4376
|
"disabled:bg-bg-disabled disabled:text-fg-disabled disabled:cursor-not-allowed disabled:hover:bg-bg-disabled",
|
|
4376
4377
|
"data-[invalid=true]:border-danger-line data-[invalid=true]:focus-visible:border-danger-fg",
|
|
@@ -4886,7 +4887,7 @@ var inputVariants = cva(
|
|
|
4886
4887
|
"flex w-full rounded-input border bg-surface font-body text-fg",
|
|
4887
4888
|
"transition-[color,background-color,border-color,box-shadow] duration-[var(--duration-fast)]",
|
|
4888
4889
|
"placeholder:text-fg-4",
|
|
4889
|
-
"focus-visible:outline-none focus-visible:border-
|
|
4890
|
+
"focus-visible:outline-none focus-visible:[border-color:var(--focus-ring-border)]",
|
|
4890
4891
|
"focus-visible:[box-shadow:var(--shadow-focus-ring)]",
|
|
4891
4892
|
"disabled:cursor-not-allowed disabled:bg-bg-disabled disabled:text-fg-disabled",
|
|
4892
4893
|
"aria-[invalid=true]:border-danger-line aria-[invalid=true]:focus-visible:border-danger-fg",
|
|
@@ -5497,7 +5498,7 @@ function OTPSlot({ isActive, char, hasFakeCaret, hasError }) {
|
|
|
5497
5498
|
"transition-[color,background-color,border-color,box-shadow] duration-[var(--duration-fast)]",
|
|
5498
5499
|
"sm:h-14 sm:w-12 sm:text-xl",
|
|
5499
5500
|
"border-rule-strong",
|
|
5500
|
-
isActive && "border-
|
|
5501
|
+
isActive && "[border-color:var(--focus-ring-border)] z-10 [box-shadow:var(--shadow-focus-ring)]",
|
|
5501
5502
|
hasError && "border-danger-line",
|
|
5502
5503
|
hasError && isActive && "border-danger-fg [box-shadow:0_0_0_2px_var(--color-danger-bg)]"
|
|
5503
5504
|
),
|
|
@@ -5886,7 +5887,7 @@ var RadioGroupItem = React36.forwardRef(function RadioGroupItem2({ className, la
|
|
|
5886
5887
|
"peer border-rule-strong bg-surface text-pro-fg aspect-square size-4 shrink-0 rounded-full border",
|
|
5887
5888
|
"transition-[color,background-color,border-color,box-shadow] duration-[var(--duration-fast)]",
|
|
5888
5889
|
"hover:border-fg-4",
|
|
5889
|
-
"focus-visible:border-
|
|
5890
|
+
"focus-visible:[border-color:var(--focus-ring-border)] focus-visible:[box-shadow:var(--shadow-focus-ring)] focus-visible:outline-none",
|
|
5890
5891
|
"data-[state=checked]:border-pro-fg",
|
|
5891
5892
|
"disabled:bg-bg-disabled disabled:border-rule disabled:cursor-not-allowed",
|
|
5892
5893
|
"aria-[invalid=true]:border-danger-line",
|
|
@@ -5975,7 +5976,7 @@ var searchInputVariants = cva(
|
|
|
5975
5976
|
"transition-[color,background-color,border-color,box-shadow] duration-[var(--duration-fast)] ease-[var(--ease-out-quart)]",
|
|
5976
5977
|
"motion-reduce:transition-none",
|
|
5977
5978
|
"placeholder:text-fg-4",
|
|
5978
|
-
"focus-visible:outline-none focus-visible:border-
|
|
5979
|
+
"focus-visible:outline-none focus-visible:[border-color:var(--focus-ring-border)]",
|
|
5979
5980
|
"focus-visible:[box-shadow:var(--shadow-focus-ring)]",
|
|
5980
5981
|
"disabled:cursor-not-allowed disabled:bg-bg-disabled disabled:text-fg-disabled",
|
|
5981
5982
|
// Hide the native search-cancel button — we render our own clear button.
|
|
@@ -7540,7 +7541,7 @@ var textareaVariants = cva(
|
|
|
7540
7541
|
"flex w-full rounded-input border bg-surface font-body text-fg",
|
|
7541
7542
|
"transition-[color,background-color,border-color,box-shadow] duration-[var(--duration-fast)]",
|
|
7542
7543
|
"placeholder:text-fg-4",
|
|
7543
|
-
"focus-visible:outline-none focus-visible:border-
|
|
7544
|
+
"focus-visible:outline-none focus-visible:[border-color:var(--focus-ring-border)]",
|
|
7544
7545
|
"focus-visible:[box-shadow:var(--shadow-focus-ring)]",
|
|
7545
7546
|
"disabled:cursor-not-allowed disabled:bg-bg-disabled disabled:text-fg-disabled",
|
|
7546
7547
|
"aria-[invalid=true]:border-danger-line aria-[invalid=true]:focus-visible:border-danger-fg",
|
|
@@ -10844,10 +10845,17 @@ function BulkActionBar({
|
|
|
10844
10845
|
}
|
|
10845
10846
|
);
|
|
10846
10847
|
}
|
|
10847
|
-
return /* @__PURE__ */ jsxs(
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10848
|
+
return /* @__PURE__ */ jsxs(
|
|
10849
|
+
"div",
|
|
10850
|
+
{
|
|
10851
|
+
className: cn("sticky bottom-4 z-[var(--z-sticky)] mt-3 flex justify-center", className),
|
|
10852
|
+
...props,
|
|
10853
|
+
children: [
|
|
10854
|
+
/* @__PURE__ */ jsx("div", { className: "border-rule bg-surface flex w-fit max-w-full items-center gap-3 overflow-x-auto rounded-card border px-4 py-2 shadow-card", children: content }),
|
|
10855
|
+
footer
|
|
10856
|
+
]
|
|
10857
|
+
}
|
|
10858
|
+
);
|
|
10851
10859
|
}
|
|
10852
10860
|
var PrimaryAction = forwardRef(
|
|
10853
10861
|
function PrimaryAction2({ arrow, iconRight, children, className, ...props }, ref) {
|