sangam-ui 1.0.3 → 1.0.4
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 +28 -28
- package/dist/index.js +193 -167
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
61
61
|
*/
|
|
62
62
|
label?: React.ReactNode;
|
|
63
63
|
/**
|
|
64
|
-
* Interaction state (Figma: **state**
|
|
64
|
+
* Interaction state (Figma: **state** — Enabled / Disabled).
|
|
65
65
|
* @default "enabled"
|
|
66
66
|
*/
|
|
67
67
|
state?: "enabled" | "disabled";
|
|
@@ -101,7 +101,7 @@ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAtt
|
|
|
101
101
|
*
|
|
102
102
|
* Production-grade toggle following Figma design specs:
|
|
103
103
|
* - Colors: semantic-colors (background, border, text) where available
|
|
104
|
-
* - Sizes: Big (56
|
|
104
|
+
* - Sizes: Big (56×28px), Small (44×24px)
|
|
105
105
|
* - States: Default, Hover, Disabled
|
|
106
106
|
* - Smooth transitions: 200ms ease-out
|
|
107
107
|
*
|
|
@@ -193,13 +193,13 @@ declare const Toggle: React.ForwardRefExoticComponent<ToggleProps & React.RefAtt
|
|
|
193
193
|
*
|
|
194
194
|
* Production-grade checkbox following Figma design specs:
|
|
195
195
|
* - Colors: semantic-colors (border, background, text) where available
|
|
196
|
-
* - Sizes: Big (24
|
|
196
|
+
* - Sizes: Big (24×24px), Small (20×20px)
|
|
197
197
|
* - States: Default, Hover, Disabled
|
|
198
198
|
* - Smooth transitions: 200ms ease-out
|
|
199
199
|
*
|
|
200
200
|
* Built on Radix UI Checkbox for accessibility
|
|
201
201
|
*/
|
|
202
|
-
/** Outer container: hit area only. Big 24
|
|
202
|
+
/** Outer container: hit area only. Big 24×24, small 20×20. No border/bg here. */
|
|
203
203
|
declare const checkboxRootVariants: (props?: ({
|
|
204
204
|
size?: "big" | "small" | null | undefined;
|
|
205
205
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
@@ -252,7 +252,7 @@ interface CheckboxProps extends Omit<React.ComponentPropsWithoutRef<typeof Check
|
|
|
252
252
|
subtextText?: string;
|
|
253
253
|
}
|
|
254
254
|
/**
|
|
255
|
-
* Sangam Checkbox
|
|
255
|
+
* Sangam Checkbox — Radix Checkbox + CVA + Sangam tokens.
|
|
256
256
|
*/
|
|
257
257
|
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
258
258
|
|
|
@@ -261,7 +261,7 @@ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.Re
|
|
|
261
261
|
*
|
|
262
262
|
* Production-grade radio button following Figma design specs:
|
|
263
263
|
* - Colors: semantic-colors (background, border, text) where available
|
|
264
|
-
* - Sizes: Big (24
|
|
264
|
+
* - Sizes: Big (24×24px), Small (20×20px)
|
|
265
265
|
* - States: Default, Hover, Disabled
|
|
266
266
|
* - Smooth transitions: 200ms ease-out
|
|
267
267
|
* - Circular shape (rounded-full)
|
|
@@ -600,7 +600,7 @@ interface DropdownProps extends Omit<React.ComponentPropsWithoutRef<typeof Selec
|
|
|
600
600
|
selectAllLabel?: string;
|
|
601
601
|
}
|
|
602
602
|
/**
|
|
603
|
-
* Dropdown (single select)
|
|
603
|
+
* Dropdown (single select) — Input-style trigger with chevron, Radix Select content.
|
|
604
604
|
*/
|
|
605
605
|
declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLButtonElement>>;
|
|
606
606
|
/** Multi-select dropdown: trigger bg white, border neutral-400; menu border neutral-200, divider neutral-200; padding 8, gap 8 */
|
|
@@ -652,8 +652,8 @@ declare const DropdownMulti: React.ForwardRefExoticComponent<DropdownMultiProps
|
|
|
652
652
|
* - Border radius: 8px
|
|
653
653
|
* - Padding: 4px 12px
|
|
654
654
|
* - Gap: 8px
|
|
655
|
-
* - Icon size: 16
|
|
656
|
-
* - Close icon: 16
|
|
655
|
+
* - Icon size: 16×16px
|
|
656
|
+
* - Close icon: 16×16px (same as search icon)
|
|
657
657
|
* - Smooth transitions: 200ms ease-out
|
|
658
658
|
*/
|
|
659
659
|
declare const searchFieldVariants: (props?: ({} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
@@ -852,7 +852,7 @@ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.Re
|
|
|
852
852
|
* - Padding: 16px
|
|
853
853
|
* - Gap: 4px
|
|
854
854
|
* - Title: 12px, 500 weight, 16px line-height
|
|
855
|
-
* - Arrow: 12
|
|
855
|
+
* - Arrow: 12×8px (all directions)
|
|
856
856
|
*
|
|
857
857
|
* Uses rem for dimensions to respect user font size preferences (accessibility)
|
|
858
858
|
*
|
|
@@ -946,7 +946,7 @@ declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProp
|
|
|
946
946
|
|
|
947
947
|
interface ProgressBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
948
948
|
/**
|
|
949
|
-
* Current progress value (0
|
|
949
|
+
* Current progress value (0–100).
|
|
950
950
|
*/
|
|
951
951
|
value: number;
|
|
952
952
|
/**
|
|
@@ -1000,7 +1000,7 @@ interface LoaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "childr
|
|
|
1000
1000
|
"aria-label"?: string;
|
|
1001
1001
|
/**
|
|
1002
1002
|
* Gradient color (e.g. #FFFFFF for white on dark backgrounds).
|
|
1003
|
-
* @default semantic background.
|
|
1003
|
+
* @default semantic background.primary.default
|
|
1004
1004
|
*/
|
|
1005
1005
|
color?: string;
|
|
1006
1006
|
/**
|
|
@@ -1050,7 +1050,7 @@ declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.Re
|
|
|
1050
1050
|
* States: Default, Hover, Selected, Disabled.
|
|
1051
1051
|
* Colors: semantic-colors (background, border, text) where available.
|
|
1052
1052
|
* Typography: 14px, weight 500, line-height 24px.
|
|
1053
|
-
* Spec: Container selected box 178
|
|
1053
|
+
* Spec: Container selected box 178×32, shadow 0 2px 6px; Underline selected 2px info; Icon only 24×24 box, radius 4, padding 4, gap 8.
|
|
1054
1054
|
*/
|
|
1055
1055
|
declare const tabsListVariants: (props?: ({
|
|
1056
1056
|
type?: "underline" | "iconOnly" | "container" | null | undefined;
|
|
@@ -1336,8 +1336,8 @@ declare function PopupTrigger({ title, subtext, showSubtext, cancelText, ctaText
|
|
|
1336
1336
|
* Border radius: rounded variant uses 8px (tokens radius.sm = 0.5rem).
|
|
1337
1337
|
*
|
|
1338
1338
|
* Sizes:
|
|
1339
|
-
* - Big: Rounded/Pill 48
|
|
1340
|
-
* - Small: Rounded/Pill 48
|
|
1339
|
+
* - Big: Rounded/Pill 48×24px; Number 24×24px (circular)
|
|
1340
|
+
* - Small: Rounded/Pill 48×20px; Number 20×20px (circular)
|
|
1341
1341
|
*
|
|
1342
1342
|
* Label typography (both sizes): weight 500, size 12px, line-height 16px.
|
|
1343
1343
|
* Padding (rounded/pill): Big top=4 bottom=4 left=8 right=8; Small top=2 bottom=2 left=8 right=8.
|
|
@@ -1462,15 +1462,15 @@ declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttribu
|
|
|
1462
1462
|
*
|
|
1463
1463
|
* Structural variants: 1) Only label, 2) Label + close icon, 3) Tick icon + label + close icon.
|
|
1464
1464
|
* Token-based chip: Default, Hover, Selected, Disabled, Focused.
|
|
1465
|
-
* Sizes: Large (75
|
|
1465
|
+
* Sizes: Large (75×32, close 16×16), Small (67×24, close 12×12).
|
|
1466
1466
|
* Radius 999 (pill). Colors from @esds-sangam/tokens.
|
|
1467
1467
|
*
|
|
1468
1468
|
* States (semantic-colors):
|
|
1469
|
-
* - Default:
|
|
1470
|
-
* - Hover:
|
|
1471
|
-
* - Selected:
|
|
1472
|
-
* - Disabled:
|
|
1473
|
-
* - Focused:
|
|
1469
|
+
* - Default: chips.background.default, chips.text.default, chips.border.default
|
|
1470
|
+
* - Hover: chips.background.hover, chips.text.hover
|
|
1471
|
+
* - Selected: chips.background.selected, chips.text.selected
|
|
1472
|
+
* - Disabled: chips.background.disabled, chips.text.disabled
|
|
1473
|
+
* - Focused: chips.border.focused
|
|
1474
1474
|
*/
|
|
1475
1475
|
declare const chipVariants: (props?: ({
|
|
1476
1476
|
size?: "small" | "large" | null | undefined;
|
|
@@ -1483,7 +1483,7 @@ interface ChipProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children
|
|
|
1483
1483
|
*/
|
|
1484
1484
|
children?: React.ReactNode;
|
|
1485
1485
|
/**
|
|
1486
|
-
* Size: large (75
|
|
1486
|
+
* Size: large (75×32, close 16×16) or small (67×24, close 12×12).
|
|
1487
1487
|
*/
|
|
1488
1488
|
size?: "large" | "small";
|
|
1489
1489
|
/**
|
|
@@ -1534,7 +1534,7 @@ interface PaginationProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1534
1534
|
totalPages: number;
|
|
1535
1535
|
/** Called when page changes */
|
|
1536
1536
|
onPageChange?: (page: number) => void;
|
|
1537
|
-
/** Total records (optional; not shown in the bar
|
|
1537
|
+
/** Total records (optional; not shown in the bar — use in parent for range copy if needed) */
|
|
1538
1538
|
totalRecords?: number;
|
|
1539
1539
|
/** Current page-size value for the entries selector */
|
|
1540
1540
|
pageSize?: number;
|
|
@@ -1975,7 +1975,7 @@ interface SideMenuItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonEl
|
|
|
1975
1975
|
declare const SideMenuItem: React.ForwardRefExoticComponent<SideMenuItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
1976
1976
|
|
|
1977
1977
|
/**
|
|
1978
|
-
* Upload Pattern
|
|
1978
|
+
* Upload Pattern – Stage 1: File uploader
|
|
1979
1979
|
*
|
|
1980
1980
|
* Token-based, accessible file uploader pattern with:
|
|
1981
1981
|
* - Label (12px, weight 500, line-height 16)
|
|
@@ -2019,7 +2019,7 @@ interface UploadFileItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
2019
2019
|
fileName: string;
|
|
2020
2020
|
/** File size or status line (e.g. "5.5MB"). 12px, weight 400, line-height 16, neutral-600. When failed, show "Upload failed" in red-800. */
|
|
2021
2021
|
fileSize?: string;
|
|
2022
|
-
/** Current progress 0
|
|
2022
|
+
/** Current progress 0–100 (for uploading/complete). Hidden when status is "failed". */
|
|
2023
2023
|
process?: number;
|
|
2024
2024
|
/** @deprecated Use `process`. */
|
|
2025
2025
|
progress?: number;
|
|
@@ -2031,9 +2031,9 @@ interface UploadFileItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
2031
2031
|
onDelete?: () => void;
|
|
2032
2032
|
}
|
|
2033
2033
|
/**
|
|
2034
|
-
* UploadFileItem
|
|
2035
|
-
* Box: 536
|
|
2036
|
-
* Left: DocumentPdf 24
|
|
2034
|
+
* UploadFileItem – single file row in the upload pattern.
|
|
2035
|
+
* Box: 536×100 (min), border neutral-300 (red-800 when failed), radius 12px (tokens rounded-md), padding 16, gap 8.
|
|
2036
|
+
* Left: DocumentPdf 24×24, fileName (14/500/24 neutral-1100), fileSize or "Upload failed" (12/400/16).
|
|
2037
2037
|
* Right: uploading = Close + %; complete = tickmarkFilled + Delete + 100%; failed = Retry + Delete.
|
|
2038
2038
|
* Progress bar below when not failed (ProgressBar primitive, 10% / 50% / 100%).
|
|
2039
2039
|
*/
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { cn } from "@esds-sangam/utils";
|
|
|
12
12
|
import { semanticColorsResolved } from "@esds-sangam/tokens";
|
|
13
13
|
import { jsx } from "react/jsx-runtime";
|
|
14
14
|
var resolvedBg = semanticColorsResolved;
|
|
15
|
-
var LOADER_COLOR = resolvedBg?.background?.neutralInverse?.primary ?? "#
|
|
15
|
+
var LOADER_COLOR = resolvedBg?.background?.primary?.default ?? resolvedBg?.background?.["neutral-inverse"]?.primary ?? resolvedBg?.background?.neutralInverse?.primary ?? "#007AE2";
|
|
16
16
|
var LOADER_COLOR_TRANSPARENT = `${LOADER_COLOR}00`;
|
|
17
17
|
var loaderVariants = cva(
|
|
18
18
|
[
|
|
@@ -78,35 +78,35 @@ var buttonVariants = cva2(
|
|
|
78
78
|
variants: {
|
|
79
79
|
// Variant: Visual style per Figma design
|
|
80
80
|
variant: {
|
|
81
|
-
// Primary: semantic
|
|
81
|
+
// Primary: semantic button tokens (blue default/hover)
|
|
82
82
|
primary: [
|
|
83
|
-
"bg-semantic-background-
|
|
84
|
-
"hover:bg-semantic-background-
|
|
83
|
+
"bg-semantic-buttons-background-primary-default text-semantic-buttons-text-primary-default",
|
|
84
|
+
"hover:bg-semantic-buttons-background-primary-hover",
|
|
85
85
|
"focus-visible:ring-semantic-border-neutral-primary focus-visible:ring-offset-0",
|
|
86
|
-
"disabled:bg-semantic-background-
|
|
87
|
-
"data-[loading=true]:!bg-semantic-background-
|
|
86
|
+
"disabled:bg-semantic-buttons-background-primary-disabled disabled:text-semantic-buttons-text-primary-disabled disabled:pointer-events-none",
|
|
87
|
+
"data-[loading=true]:!bg-semantic-buttons-background-primary-default data-[loading=true]:!text-semantic-buttons-text-primary-default"
|
|
88
88
|
],
|
|
89
|
-
// Secondary:
|
|
89
|
+
// Secondary: outlined blue, subtle blue hover
|
|
90
90
|
secondary: [
|
|
91
|
-
"bg-semantic-background-neutral-primary border border-semantic-
|
|
92
|
-
"hover:border-transparent hover:bg-semantic-background-
|
|
93
|
-
"focus-visible:border-2 focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:border-semantic-
|
|
94
|
-
"disabled:bg-semantic-background-
|
|
91
|
+
"bg-semantic-background-neutral-primary border border-semantic-buttons-background-secondary-default text-semantic-buttons-text-secondary-default",
|
|
92
|
+
"hover:border-transparent hover:bg-semantic-buttons-background-secondary-hover",
|
|
93
|
+
"focus-visible:border-2 focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:border-semantic-buttons-background-secondary-default focus-visible:-m-px",
|
|
94
|
+
"disabled:bg-semantic-buttons-background-secondary-disabled disabled:text-semantic-buttons-text-secondary-disabled disabled:border-semantic-border-neutral-disabled disabled:pointer-events-none"
|
|
95
95
|
],
|
|
96
96
|
// Danger: semantic error default/hover
|
|
97
97
|
danger: [
|
|
98
|
-
"bg-semantic-background-
|
|
99
|
-
"hover:bg-semantic-background-
|
|
100
|
-
"focus-visible:ring-semantic-border-
|
|
101
|
-
"disabled:bg-semantic-background-
|
|
102
|
-
"data-[loading=true]:!bg-semantic-background-
|
|
98
|
+
"bg-semantic-buttons-background-danger-default text-semantic-buttons-text-danger-default",
|
|
99
|
+
"hover:bg-semantic-buttons-background-danger-hover",
|
|
100
|
+
"focus-visible:ring-semantic-border-error-default",
|
|
101
|
+
"disabled:bg-semantic-buttons-background-danger-disabled disabled:text-semantic-buttons-text-danger-disabled disabled:pointer-events-none",
|
|
102
|
+
"data-[loading=true]:!bg-semantic-buttons-background-danger-default data-[loading=true]:!text-semantic-buttons-text-danger-default"
|
|
103
103
|
],
|
|
104
104
|
// Tertiary (low-emphasis / link style): semantic info default text
|
|
105
105
|
tertiary: [
|
|
106
|
-
"bg-transparent text-semantic-
|
|
106
|
+
"bg-transparent text-semantic-buttons-text-link-default underline-offset-4",
|
|
107
107
|
"hover:underline",
|
|
108
|
-
"focus-visible:ring-semantic-border-
|
|
109
|
-
"disabled:text-semantic-text-
|
|
108
|
+
"focus-visible:ring-semantic-border-primary-default",
|
|
109
|
+
"disabled:text-semantic-buttons-text-link-disabled disabled:pointer-events-none"
|
|
110
110
|
]
|
|
111
111
|
},
|
|
112
112
|
// Size: Height, padding, font size (from Figma specs)
|
|
@@ -135,8 +135,8 @@ var buttonVariants = cva2(
|
|
|
135
135
|
* - When true, button becomes fully rounded.
|
|
136
136
|
* - Height is still driven by `size` (small/big).
|
|
137
137
|
* - Width is applied via compoundVariants below:
|
|
138
|
-
* - size="small"
|
|
139
|
-
* - size="big"
|
|
138
|
+
* - size="small" → w-8 (32px)
|
|
139
|
+
* - size="big" → w-10 (40px)
|
|
140
140
|
*/
|
|
141
141
|
iconOnly: {
|
|
142
142
|
false: "",
|
|
@@ -161,12 +161,12 @@ var buttonVariants = cva2(
|
|
|
161
161
|
]
|
|
162
162
|
}
|
|
163
163
|
);
|
|
164
|
-
var BUTTON_LOADER_COLOR = semanticColorsResolved2.text.neutralInverse
|
|
164
|
+
var BUTTON_LOADER_COLOR = semanticColorsResolved2.text["neutral-inverse"]?.primary ?? semanticColorsResolved2.text.neutralInverse?.primary ?? "#FFFFFF";
|
|
165
165
|
var BUTTON_LOADER_COLOR_TRANSPARENT = `${BUTTON_LOADER_COLOR}00`;
|
|
166
166
|
var hoverPreviewClassByVariant = {
|
|
167
|
-
primary: "!bg-semantic-background-
|
|
168
|
-
secondary: "!border-transparent !bg-semantic-background-
|
|
169
|
-
danger: "!bg-semantic-background-
|
|
167
|
+
primary: "!bg-semantic-buttons-background-primary-hover",
|
|
168
|
+
secondary: "!border-transparent !bg-semantic-buttons-background-secondary-hover",
|
|
169
|
+
danger: "!bg-semantic-buttons-background-danger-hover",
|
|
170
170
|
tertiary: "underline"
|
|
171
171
|
};
|
|
172
172
|
function normalizeButtonType(value) {
|
|
@@ -266,17 +266,17 @@ var toggleVariants = cva3(
|
|
|
266
266
|
[
|
|
267
267
|
"peer inline-flex shrink-0 cursor-pointer items-center rounded-full",
|
|
268
268
|
"transition-all duration-200 ease-out",
|
|
269
|
-
// focus ring: no semantic token for neutral-800 in semantic-colors.json
|
|
269
|
+
// focus ring: no semantic token for neutral-800 in semantic-colors.json — left as-is
|
|
270
270
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-800 focus-visible:ring-offset-2",
|
|
271
271
|
"disabled:cursor-not-allowed disabled:opacity-semantic-full",
|
|
272
272
|
// Default unchecked state
|
|
273
|
-
"bg-semantic-background-
|
|
273
|
+
"bg-semantic-background-neutral-inverse-tertiary",
|
|
274
274
|
// Hover effect for unchecked state (border appears on hover)
|
|
275
|
-
"border-1 border-semantic-border-transparent hover:border-semantic-border-
|
|
275
|
+
"border-1 border-semantic-border-transparent hover:border-semantic-border-neutral-inverse-primary",
|
|
276
276
|
// Checked state
|
|
277
|
-
"data-[state=checked]:bg-semantic-background-
|
|
277
|
+
"data-[state=checked]:bg-semantic-controls-background-checked",
|
|
278
278
|
// Remove hover border when checked
|
|
279
|
-
"data-[state=checked]:hover:border-1 data-[state=checked]:hover:border-semantic-
|
|
279
|
+
"data-[state=checked]:hover:border-1 data-[state=checked]:hover:border-semantic-controls-background-checked",
|
|
280
280
|
// Disabled states - MUST come after checked to override
|
|
281
281
|
"disabled:bg-semantic-background-neutral-tertiary",
|
|
282
282
|
"disabled:hover:border-1 disabled:hover:border-semantic-border-neutral-tertiary",
|
|
@@ -302,7 +302,7 @@ var toggleThumbVariants = cva3(
|
|
|
302
302
|
[
|
|
303
303
|
"pointer-events-none block rounded-full bg-semantic-background-neutral-primary shadow-sm",
|
|
304
304
|
"transition-transform duration-200 ease-out",
|
|
305
|
-
// Disabled state: no semantic background for neutral.500
|
|
305
|
+
// Disabled state: no semantic background for neutral.500 — left as-is
|
|
306
306
|
"data-[disabled]:bg-neutral-500"
|
|
307
307
|
],
|
|
308
308
|
{
|
|
@@ -399,14 +399,14 @@ var checkboxRootVariants = cva4(
|
|
|
399
399
|
var checkboxInnerVariants = cva4(
|
|
400
400
|
[
|
|
401
401
|
"flex shrink-0 items-center justify-center rounded-xs border transition-all duration-200 ease-out",
|
|
402
|
-
"border-semantic-border-
|
|
403
|
-
"group-hover:border-semantic-border-
|
|
404
|
-
"group-data-[preview-hover=true]:border-semantic-border-
|
|
405
|
-
"group-data-[state=checked]:bg-semantic-background-
|
|
406
|
-
"group-data-[state=checked]:group-hover:border-semantic-
|
|
407
|
-
"group-data-[state=checked]:group-data-[preview-hover=true]:border-semantic-
|
|
408
|
-
"group-disabled:border-semantic-border-
|
|
409
|
-
"group-disabled:group-data-[state=checked]:bg-semantic-background-
|
|
402
|
+
"border-semantic-controls-border-default bg-transparent",
|
|
403
|
+
"group-hover:border-semantic-controls-border-hover",
|
|
404
|
+
"group-data-[preview-hover=true]:border-semantic-controls-border-hover",
|
|
405
|
+
"group-data-[state=checked]:bg-semantic-controls-background-checked group-data-[state=checked]:border-semantic-controls-background-checked",
|
|
406
|
+
"group-data-[state=checked]:group-hover:border-semantic-controls-background-checked",
|
|
407
|
+
"group-data-[state=checked]:group-data-[preview-hover=true]:border-semantic-controls-background-checked",
|
|
408
|
+
"group-disabled:border-semantic-controls-border-disabled group-disabled:group-hover:border-semantic-controls-border-disabled",
|
|
409
|
+
"group-disabled:group-data-[state=checked]:bg-semantic-controls-background-disabled group-disabled:group-data-[state=checked]:border-semantic-controls-border-disabled"
|
|
410
410
|
],
|
|
411
411
|
{
|
|
412
412
|
variants: {
|
|
@@ -480,8 +480,8 @@ var Checkbox = React4.forwardRef(
|
|
|
480
480
|
{
|
|
481
481
|
className: cn4(
|
|
482
482
|
size === "big" ? "h-4 w-4" : "h-3 w-3",
|
|
483
|
-
"text-semantic-
|
|
484
|
-
resolvedDisabled && "text-semantic-
|
|
483
|
+
"text-semantic-controls-icon-checked",
|
|
484
|
+
resolvedDisabled && "text-semantic-controls-icon-disabled"
|
|
485
485
|
),
|
|
486
486
|
strokeWidth: 3
|
|
487
487
|
}
|
|
@@ -509,17 +509,17 @@ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
|
509
509
|
var radioVariants = cva5(
|
|
510
510
|
[
|
|
511
511
|
"aspect-square shrink-0 rounded-full border transition-all duration-200 ease-out flex items-center justify-center",
|
|
512
|
-
// focus ring: no semantic token for neutral-800 in semantic-colors.json
|
|
512
|
+
// focus ring: no semantic token for neutral-800 in semantic-colors.json — left as-is
|
|
513
513
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-800 focus-visible:ring-offset-2",
|
|
514
514
|
"disabled:cursor-not-allowed",
|
|
515
515
|
// Default unchecked state (not selected)
|
|
516
516
|
"border-semantic-border-neutral-primary bg-semantic-background-transparent",
|
|
517
517
|
// Hover effect for unchecked state
|
|
518
|
-
"hover:border-semantic-border-
|
|
518
|
+
"hover:border-semantic-border-neutral-inverse-primary",
|
|
519
519
|
// Checked state (selected)
|
|
520
|
-
"data-[state=checked]:border-semantic-
|
|
520
|
+
"data-[state=checked]:border-semantic-controls-background-checked",
|
|
521
521
|
// No border change on hover when checked
|
|
522
|
-
"data-[state=checked]:hover:border-semantic-
|
|
522
|
+
"data-[state=checked]:hover:border-semantic-controls-background-checked",
|
|
523
523
|
// Disabled states
|
|
524
524
|
"disabled:border-semantic-border-neutral-tertiary",
|
|
525
525
|
"disabled:hover:border-semantic-border-neutral-tertiary",
|
|
@@ -556,8 +556,8 @@ var radioIndicatorVariants = cva5(["flex items-center justify-center"], {
|
|
|
556
556
|
var radioDotVariants = cva5(
|
|
557
557
|
[
|
|
558
558
|
"rounded-full transition-colors duration-200 ease-out flex items-center justify-center",
|
|
559
|
-
// Default selected state -
|
|
560
|
-
"bg-semantic-background-
|
|
559
|
+
// Default selected state - controls checked (blue.600)
|
|
560
|
+
"bg-semantic-controls-background-checked"
|
|
561
561
|
],
|
|
562
562
|
{
|
|
563
563
|
variants: {
|
|
@@ -570,7 +570,7 @@ var radioDotVariants = cva5(
|
|
|
570
570
|
disabled: {
|
|
571
571
|
true: "bg-neutral-500",
|
|
572
572
|
// Gray dot when disabled (no semantic background token for neutral.500)
|
|
573
|
-
false: "bg-semantic-background-
|
|
573
|
+
false: "bg-semantic-controls-background-checked"
|
|
574
574
|
}
|
|
575
575
|
},
|
|
576
576
|
defaultVariants: {
|
|
@@ -630,9 +630,9 @@ var inputVariants = cva6(
|
|
|
630
630
|
"placeholder:leading-6",
|
|
631
631
|
// 24px line-height
|
|
632
632
|
// Hover state
|
|
633
|
-
"hover:border-semantic-border-
|
|
633
|
+
"hover:border-semantic-input-border-hover",
|
|
634
634
|
// Focus (Active/Typing) state
|
|
635
|
-
"focus:border-semantic-border-
|
|
635
|
+
"focus:border-semantic-input-border-active focus:text-semantic-text-neutral-primary",
|
|
636
636
|
// Caret (cursor) color
|
|
637
637
|
"caret-semantic-text-neutral-primary",
|
|
638
638
|
// Disabled state
|
|
@@ -646,11 +646,11 @@ var inputVariants = cva6(
|
|
|
646
646
|
variant: {
|
|
647
647
|
default: "",
|
|
648
648
|
error: [
|
|
649
|
-
"border-semantic-border-
|
|
649
|
+
"border-semantic-border-error-subtle focus:border-semantic-border-error-subtle",
|
|
650
650
|
"text-semantic-text-neutral-primary focus:text-semantic-text-neutral-primary"
|
|
651
651
|
],
|
|
652
652
|
success: [
|
|
653
|
-
"border-semantic-border-
|
|
653
|
+
"border-semantic-border-success-subtle focus:border-semantic-border-success-subtle",
|
|
654
654
|
"text-semantic-text-neutral-primary focus:text-semantic-text-neutral-primary"
|
|
655
655
|
]
|
|
656
656
|
},
|
|
@@ -724,7 +724,7 @@ var Input = React6.forwardRef(
|
|
|
724
724
|
const ctaText = typeof cta === "string" && cta.length > 0 ? cta : typeof ctaLabel === "string" && ctaLabel.length > 0 ? ctaLabel : "Button";
|
|
725
725
|
const hasCtaToggle = Boolean(cta);
|
|
726
726
|
const helperTextId = shouldShowSupportingText && resolvedSupportText ? `${inputId}-helper` : void 0;
|
|
727
|
-
const helperTextColor = error ? "text-semantic-text-
|
|
727
|
+
const helperTextColor = error ? "text-semantic-text-error-subtle" : success ? "text-semantic-text-success-subtle" : "text-semantic-text-neutral-tertiary";
|
|
728
728
|
const HelperIcon = error ? WarningFilled : success ? TickmarkFilled : resolvedSupportIcon ? Info : null;
|
|
729
729
|
const hasTrailing = Boolean(trailingIcon);
|
|
730
730
|
const hasCta = hasCtaToggle;
|
|
@@ -764,10 +764,10 @@ var Input = React6.forwardRef(
|
|
|
764
764
|
className: cn6(
|
|
765
765
|
"flex items-center w-full overflow-hidden rounded-sm border transition-all duration-200 ease-out",
|
|
766
766
|
"bg-semantic-background-neutral-primary font-sans text-sm leading-6 font-normal",
|
|
767
|
-
"border-semantic-border-neutral-primary hover:border-semantic-border-
|
|
768
|
-
"focus-within:border-semantic-border-
|
|
769
|
-
error && "border-semantic-border-
|
|
770
|
-
success && "border-semantic-border-
|
|
767
|
+
"border-semantic-border-neutral-primary hover:border-semantic-input-border-hover",
|
|
768
|
+
"focus-within:border-semantic-input-border-active",
|
|
769
|
+
error && "border-semantic-border-error-subtle hover:border-semantic-border-error-subtle focus-within:border-semantic-border-error-subtle",
|
|
770
|
+
success && "border-semantic-border-success-subtle hover:border-semantic-border-success-subtle focus-within:border-semantic-border-success-subtle",
|
|
771
771
|
disabled && "bg-semantic-background-neutral-tertiary border-semantic-border-neutral-tertiary",
|
|
772
772
|
className
|
|
773
773
|
),
|
|
@@ -793,10 +793,10 @@ var Input = React6.forwardRef(
|
|
|
793
793
|
className: cn6(
|
|
794
794
|
"flex items-center w-full overflow-hidden rounded-sm border transition-all duration-200 ease-out",
|
|
795
795
|
"bg-semantic-background-neutral-primary font-sans text-sm leading-6 font-normal",
|
|
796
|
-
"border-semantic-border-neutral-primary hover:border-semantic-border-
|
|
797
|
-
"focus-within:border-semantic-border-
|
|
798
|
-
error && "border-semantic-border-
|
|
799
|
-
success && "border-semantic-border-
|
|
796
|
+
"border-semantic-border-neutral-primary hover:border-semantic-input-border-hover",
|
|
797
|
+
"focus-within:border-semantic-input-border-active",
|
|
798
|
+
error && "border-semantic-border-error-subtle hover:border-semantic-border-error-subtle focus-within:border-semantic-border-error-subtle",
|
|
799
|
+
success && "border-semantic-border-success-subtle hover:border-semantic-border-success-subtle focus-within:border-semantic-border-success-subtle",
|
|
800
800
|
disabled && "bg-semantic-background-neutral-tertiary border-semantic-border-neutral-tertiary",
|
|
801
801
|
className
|
|
802
802
|
),
|
|
@@ -831,7 +831,7 @@ var Input = React6.forwardRef(
|
|
|
831
831
|
{
|
|
832
832
|
size: 16,
|
|
833
833
|
className: cn6(
|
|
834
|
-
error ? "text-semantic-text-
|
|
834
|
+
error ? "text-semantic-text-error-subtle" : success ? "text-semantic-text-success-subtle" : "text-semantic-text-neutral-tertiary"
|
|
835
835
|
),
|
|
836
836
|
"aria-hidden": "true"
|
|
837
837
|
}
|
|
@@ -869,17 +869,17 @@ var dropdownTriggerVariants = cva7(
|
|
|
869
869
|
"font-sans text-sm leading-6 font-normal",
|
|
870
870
|
"px-3 py-1 min-h-[32px] h-8",
|
|
871
871
|
"bg-semantic-background-neutral-primary border-semantic-border-neutral-primary text-semantic-text-neutral-primary",
|
|
872
|
-
"hover:border-semantic-border-
|
|
873
|
-
"focus:border-semantic-border-
|
|
872
|
+
"hover:border-semantic-input-border-hover",
|
|
873
|
+
"focus:border-semantic-input-border-active",
|
|
874
874
|
"data-[placeholder]:text-semantic-text-neutral-tertiary",
|
|
875
|
-
"data-[state=open]:border-semantic-border-
|
|
875
|
+
"data-[state=open]:border-semantic-input-border-active data-[state=open]:text-semantic-text-neutral-tertiary",
|
|
876
876
|
"disabled:bg-semantic-background-neutral-tertiary disabled:border-semantic-border-neutral-tertiary disabled:text-semantic-text-neutral-disabled disabled:cursor-not-allowed",
|
|
877
877
|
"focus-visible:outline-none"
|
|
878
878
|
],
|
|
879
879
|
{
|
|
880
880
|
variants: {
|
|
881
881
|
error: {
|
|
882
|
-
true: "border-semantic-border-
|
|
882
|
+
true: "border-semantic-border-error-default hover:border-semantic-border-error-default focus:border-semantic-border-error-default data-[state=open]:border-semantic-border-error-default",
|
|
883
883
|
false: ""
|
|
884
884
|
}
|
|
885
885
|
},
|
|
@@ -931,7 +931,7 @@ var Dropdown = React7.forwardRef(
|
|
|
931
931
|
const shouldShowSupportingText = supportingText ?? Boolean(resolvedSupportText);
|
|
932
932
|
const resolvedSupportIcon = supportIcon ?? showHelperIcon ?? false;
|
|
933
933
|
const helperTextId = shouldShowSupportingText && resolvedSupportText ? `${triggerId}-helper` : void 0;
|
|
934
|
-
const helperTextColor = error ? "text-semantic-text-
|
|
934
|
+
const helperTextColor = error ? "text-semantic-text-error-subtle" : "text-semantic-text-neutral-disabled";
|
|
935
935
|
const HelperIcon = error ? WarningFilled2 : resolvedSupportIcon ? Info2 : null;
|
|
936
936
|
return /* @__PURE__ */ jsxs6("div", { className: "w-full flex flex-col gap-2", children: [
|
|
937
937
|
label && /* @__PURE__ */ jsx7(
|
|
@@ -1003,7 +1003,7 @@ var Dropdown = React7.forwardRef(
|
|
|
1003
1003
|
HelperIcon,
|
|
1004
1004
|
{
|
|
1005
1005
|
size: 16,
|
|
1006
|
-
className: cn7(error ? "text-semantic-text-
|
|
1006
|
+
className: cn7(error ? "text-semantic-text-error-subtle" : "text-semantic-text-neutral-primary", "shrink-0"),
|
|
1007
1007
|
"aria-hidden": "true"
|
|
1008
1008
|
}
|
|
1009
1009
|
),
|
|
@@ -1030,7 +1030,7 @@ var multiSelectCheckboxItemVariants = cva7([
|
|
|
1030
1030
|
"data-[highlighted]:bg-semantic-background-neutral-tertiary",
|
|
1031
1031
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-semantic-disabled"
|
|
1032
1032
|
]);
|
|
1033
|
-
var multiSelectCheckboxBox = "flex h-4 w-4 shrink-0 p-[3px] items-center justify-center rounded-[4px] border border-semantic-border-neutral-primary group-data-[state=checked]:border-semantic-
|
|
1033
|
+
var multiSelectCheckboxBox = "flex h-4 w-4 shrink-0 p-[3px] items-center justify-center rounded-[4px] border border-semantic-border-neutral-primary group-data-[state=checked]:border-semantic-controls-background-checked group-data-[state=checked]:bg-semantic-controls-background-checked";
|
|
1034
1034
|
var DropdownMulti = React7.forwardRef(
|
|
1035
1035
|
({
|
|
1036
1036
|
label,
|
|
@@ -1060,7 +1060,7 @@ var DropdownMulti = React7.forwardRef(
|
|
|
1060
1060
|
const shouldShowSupportingText = supportingText ?? Boolean(resolvedSupportText);
|
|
1061
1061
|
const resolvedSupportIcon = supportIcon ?? showHelperIcon ?? false;
|
|
1062
1062
|
const helperTextId = shouldShowSupportingText && resolvedSupportText ? `${triggerId}-helper` : void 0;
|
|
1063
|
-
const helperTextColor = error ? "text-semantic-text-
|
|
1063
|
+
const helperTextColor = error ? "text-semantic-text-error-subtle" : "text-semantic-text-neutral-tertiary";
|
|
1064
1064
|
const HelperIcon = error ? InfoFilled2 : resolvedSupportIcon ? Info2 : null;
|
|
1065
1065
|
const allSelected = options.length > 0 && value.length === options.length;
|
|
1066
1066
|
const handleCheckedChange = (optValue, checked) => {
|
|
@@ -1105,7 +1105,7 @@ var DropdownMulti = React7.forwardRef(
|
|
|
1105
1105
|
"data-state": open ? "open" : "closed",
|
|
1106
1106
|
className: cn7(
|
|
1107
1107
|
"group flex min-h-8 h-8 w-full flex-wrap items-center gap-1 rounded-sm bg-semantic-background-neutral-primary px-3 py-1 text-left font-sans text-sm leading-6 font-normal outline-none transition-all duration-200 ease-out",
|
|
1108
|
-
error ? "border border-semantic-border-
|
|
1108
|
+
error ? "border border-semantic-border-error-default hover:border-semantic-border-error-default focus:border-semantic-border-error-default" : "border border-semantic-border-neutral-primary hover:border-semantic-input-border-hover focus:border-semantic-input-border-active",
|
|
1109
1109
|
"focus-visible:outline-none",
|
|
1110
1110
|
"disabled:cursor-not-allowed disabled:bg-semantic-background-neutral-tertiary disabled:border-semantic-border-neutral-tertiary disabled:text-semantic-text-neutral-disabled"
|
|
1111
1111
|
),
|
|
@@ -1175,7 +1175,7 @@ var DropdownMulti = React7.forwardRef(
|
|
|
1175
1175
|
Tickmark,
|
|
1176
1176
|
{
|
|
1177
1177
|
size: 12,
|
|
1178
|
-
className: "opacity-semantic-hidden !text-semantic-text-
|
|
1178
|
+
className: "opacity-semantic-hidden !text-semantic-text-neutral-inverse-primary group-data-[state=checked]:opacity-semantic-full"
|
|
1179
1179
|
}
|
|
1180
1180
|
) }),
|
|
1181
1181
|
selectAllLabel
|
|
@@ -1197,7 +1197,7 @@ var DropdownMulti = React7.forwardRef(
|
|
|
1197
1197
|
Tickmark,
|
|
1198
1198
|
{
|
|
1199
1199
|
size: 12,
|
|
1200
|
-
className: "opacity-semantic-hidden !text-semantic-text-
|
|
1200
|
+
className: "opacity-semantic-hidden !text-semantic-text-neutral-inverse-primary group-data-[state=checked]:opacity-semantic-full"
|
|
1201
1201
|
}
|
|
1202
1202
|
) }),
|
|
1203
1203
|
opt.label
|
|
@@ -1222,7 +1222,7 @@ var DropdownMulti = React7.forwardRef(
|
|
|
1222
1222
|
HelperIcon,
|
|
1223
1223
|
{
|
|
1224
1224
|
size: 16,
|
|
1225
|
-
className: cn7(error ? "text-semantic-text-
|
|
1225
|
+
className: cn7(error ? "text-semantic-text-error-subtle" : "text-semantic-text-neutral-primary", "shrink-0"),
|
|
1226
1226
|
"aria-hidden": "true"
|
|
1227
1227
|
}
|
|
1228
1228
|
),
|
|
@@ -1251,12 +1251,12 @@ var searchFieldVariants = cva8(
|
|
|
1251
1251
|
// 14px font, 24px line-height
|
|
1252
1252
|
"px-3 py-1",
|
|
1253
1253
|
// 12px horizontal, 4px vertical
|
|
1254
|
-
// Default state
|
|
1254
|
+
// Default state — semantic background, border
|
|
1255
1255
|
"bg-semantic-background-neutral-primary border-semantic-border-neutral-primary",
|
|
1256
1256
|
// Hover state
|
|
1257
|
-
"hover:border-semantic-border-
|
|
1257
|
+
"hover:border-semantic-input-border-hover",
|
|
1258
1258
|
// Focus-within (Active/Typing) state
|
|
1259
|
-
"focus-within:border-semantic-border-
|
|
1259
|
+
"focus-within:border-semantic-border-neutral-inverse-primary",
|
|
1260
1260
|
// Disabled state
|
|
1261
1261
|
"has-[:disabled]:bg-semantic-background-neutral-tertiary has-[:disabled]:border-semantic-border-neutral-tertiary",
|
|
1262
1262
|
"has-[:disabled]:cursor-not-allowed",
|
|
@@ -1268,7 +1268,7 @@ var searchFieldVariants = cva8(
|
|
|
1268
1268
|
}
|
|
1269
1269
|
);
|
|
1270
1270
|
var searchInputVariants = cva8([
|
|
1271
|
-
// Base input styles
|
|
1271
|
+
// Base input styles — semantic background, text
|
|
1272
1272
|
"flex-1 bg-semantic-background-transparent border-none outline-none",
|
|
1273
1273
|
"text-semantic-text-neutral-primary placeholder:text-semantic-text-neutral-tertiary",
|
|
1274
1274
|
"focus:text-semantic-text-neutral-primary",
|
|
@@ -1334,7 +1334,7 @@ var SearchField = React8.forwardRef(
|
|
|
1334
1334
|
onClick: handleClear,
|
|
1335
1335
|
className: cn8(
|
|
1336
1336
|
"shrink-0 flex items-center justify-center",
|
|
1337
|
-
// clear button default: neutral-900 has no semantic token
|
|
1337
|
+
// clear button default: neutral-900 has no semantic token — left as-is
|
|
1338
1338
|
"text-neutral-900 hover:text-semantic-text-neutral-primary",
|
|
1339
1339
|
"transition-colors duration-200 ease-out",
|
|
1340
1340
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-neutral-800 focus-visible:ring-offset-2 rounded-sm"
|
|
@@ -1365,12 +1365,12 @@ var textareaVariants = cva9(
|
|
|
1365
1365
|
// 12px horizontal, 4px vertical
|
|
1366
1366
|
"outline-none resize-none",
|
|
1367
1367
|
// Fixed height, no resize
|
|
1368
|
-
// Default state
|
|
1368
|
+
// Default state — semantic background, border, text
|
|
1369
1369
|
"bg-semantic-background-neutral-primary border-semantic-border-neutral-primary text-semantic-text-neutral-tertiary placeholder:text-semantic-text-neutral-tertiary",
|
|
1370
1370
|
// Hover state
|
|
1371
|
-
"hover:border-semantic-border-
|
|
1371
|
+
"hover:border-semantic-input-border-hover",
|
|
1372
1372
|
// Focus (Active/Typing) state
|
|
1373
|
-
"focus:border-semantic-border-
|
|
1373
|
+
"focus:border-semantic-input-border-hover focus:text-semantic-text-neutral-primary",
|
|
1374
1374
|
// Caret (cursor) color
|
|
1375
1375
|
"caret-semantic-text-neutral-primary",
|
|
1376
1376
|
// Disabled state
|
|
@@ -1384,11 +1384,11 @@ var textareaVariants = cva9(
|
|
|
1384
1384
|
variant: {
|
|
1385
1385
|
default: "",
|
|
1386
1386
|
error: [
|
|
1387
|
-
"border-semantic-border-
|
|
1387
|
+
"border-semantic-border-error-subtle focus:border-semantic-border-error-subtle",
|
|
1388
1388
|
"text-semantic-text-neutral-primary focus:text-semantic-text-neutral-primary"
|
|
1389
1389
|
],
|
|
1390
1390
|
success: [
|
|
1391
|
-
"border-semantic-border-
|
|
1391
|
+
"border-semantic-border-success-subtle focus:border-semantic-border-success-subtle",
|
|
1392
1392
|
"text-semantic-text-neutral-primary focus:text-semantic-text-neutral-primary"
|
|
1393
1393
|
]
|
|
1394
1394
|
},
|
|
@@ -1455,7 +1455,7 @@ var Textarea = React9.forwardRef(
|
|
|
1455
1455
|
const helperTextId = shouldShowSupportingText && resolvedSupportText ? `${textareaId}-helper` : void 0;
|
|
1456
1456
|
const shouldShowCharacterCount = characterCount ?? showCounter;
|
|
1457
1457
|
const countText = count ?? `${currentLength}/${maxLength}`;
|
|
1458
|
-
const helperTextColor = error ? "text-semantic-text-
|
|
1458
|
+
const helperTextColor = error ? "text-semantic-text-error-subtle" : success ? "text-semantic-text-success-subtle" : "text-semantic-text-neutral-tertiary";
|
|
1459
1459
|
const HelperIcon = error ? InfoFilled3 : success ? TickmarkFilled2 : resolvedSupportIcon ? Info3 : null;
|
|
1460
1460
|
return /* @__PURE__ */ jsxs8("div", { className: "w-full", children: [
|
|
1461
1461
|
label && /* @__PURE__ */ jsx9(
|
|
@@ -1499,7 +1499,7 @@ var Textarea = React9.forwardRef(
|
|
|
1499
1499
|
{
|
|
1500
1500
|
size: 16,
|
|
1501
1501
|
className: cn9(
|
|
1502
|
-
error ? "text-semantic-text-
|
|
1502
|
+
error ? "text-semantic-text-error-subtle" : success ? "text-semantic-text-success-subtle" : "text-semantic-text-neutral-primary"
|
|
1503
1503
|
),
|
|
1504
1504
|
"aria-hidden": "true"
|
|
1505
1505
|
}
|
|
@@ -1541,7 +1541,7 @@ var tooltipContentVariants = cva10(
|
|
|
1541
1541
|
// Base styles
|
|
1542
1542
|
"z-50 rounded-sm",
|
|
1543
1543
|
// Removed overflow-hidden to allow arrows to show
|
|
1544
|
-
"bg-semantic-background-
|
|
1544
|
+
"bg-semantic-background-neutral-inverse-primary text-semantic-text-neutral-inverse-primary",
|
|
1545
1545
|
"px-4 py-1",
|
|
1546
1546
|
// 16px horizontal, 4px vertical
|
|
1547
1547
|
"text-xs font-medium leading-4",
|
|
@@ -1646,13 +1646,13 @@ var TooltipContent = React10.forwardRef(
|
|
|
1646
1646
|
...props,
|
|
1647
1647
|
children: [
|
|
1648
1648
|
/* @__PURE__ */ jsxs9("div", { className: "w-full relative", children: [
|
|
1649
|
-
/* @__PURE__ */ jsx10("div", { className: "text-xs font-medium leading-4 text-semantic-text-
|
|
1650
|
-
resolvedDescription && /* @__PURE__ */ jsx10("div", { className: "text-xs font-normal leading-4 text-semantic-text-
|
|
1649
|
+
/* @__PURE__ */ jsx10("div", { className: "text-xs font-medium leading-4 text-semantic-text-neutral-inverse-primary", children: title }),
|
|
1650
|
+
resolvedDescription && /* @__PURE__ */ jsx10("div", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-inverse-primary opacity-semantic-description mt-1", children: resolvedDescription }),
|
|
1651
1651
|
resolvedCloseIcon && /* @__PURE__ */ jsx10(
|
|
1652
1652
|
"button",
|
|
1653
1653
|
{
|
|
1654
1654
|
onClick: onClose,
|
|
1655
|
-
className: "absolute top-0 right-0 text-semantic-text-
|
|
1655
|
+
className: "absolute top-0 right-0 text-semantic-text-neutral-inverse-primary hover:opacity-semantic-hover transition-opacity",
|
|
1656
1656
|
"aria-label": "Close tooltip",
|
|
1657
1657
|
type: "button",
|
|
1658
1658
|
children: /* @__PURE__ */ jsx10(Close3, { size: 16 })
|
|
@@ -1707,7 +1707,7 @@ var ProgressBar = React11.forwardRef(
|
|
|
1707
1707
|
"div",
|
|
1708
1708
|
{
|
|
1709
1709
|
className: cn11(
|
|
1710
|
-
"rounded-full overflow-hidden bg-semantic-background-
|
|
1710
|
+
"rounded-full overflow-hidden bg-semantic-background-primary-subtle transition-colors shrink-0",
|
|
1711
1711
|
fluid && "w-full"
|
|
1712
1712
|
),
|
|
1713
1713
|
style: trackStyle,
|
|
@@ -1716,7 +1716,7 @@ var ProgressBar = React11.forwardRef(
|
|
|
1716
1716
|
{
|
|
1717
1717
|
className: cn11(
|
|
1718
1718
|
"h-full rounded-full transition-all duration-200 ease-out",
|
|
1719
|
-
percentage === 100 ? "bg-semantic-background-
|
|
1719
|
+
percentage === 100 ? "bg-semantic-background-success-default" : "bg-semantic-background-primary-default"
|
|
1720
1720
|
),
|
|
1721
1721
|
style: {
|
|
1722
1722
|
width: `${percentage}%`,
|
|
@@ -1821,7 +1821,7 @@ var tabsTriggerVariants = cva12(
|
|
|
1821
1821
|
underline: [
|
|
1822
1822
|
"px-3 py-1 border-b-2 -mb-[1px] border-semantic-border-transparent",
|
|
1823
1823
|
"text-semantic-text-neutral-tertiary hover:text-semantic-text-neutral-primary",
|
|
1824
|
-
"data-[state=active]:text-semantic-text-neutral-primary data-[state=active]:border-semantic-border-
|
|
1824
|
+
"data-[state=active]:text-semantic-text-neutral-primary data-[state=active]:border-semantic-input-border-active data-[state=active]:border-b-2",
|
|
1825
1825
|
"disabled:text-semantic-text-neutral-disabled"
|
|
1826
1826
|
],
|
|
1827
1827
|
iconOnly: [
|
|
@@ -1977,7 +1977,7 @@ var MenuTrigger = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1977
1977
|
className: cn15(
|
|
1978
1978
|
"inline-flex items-center justify-center rounded-sm",
|
|
1979
1979
|
"text-semantic-text-neutral-primary",
|
|
1980
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-
|
|
1980
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-neutral-inverse-primary focus-visible:ring-offset-0",
|
|
1981
1981
|
"hover:bg-semantic-background-neutral-tertiary",
|
|
1982
1982
|
className
|
|
1983
1983
|
),
|
|
@@ -2132,7 +2132,7 @@ var DrawerTitle = ({ children, className, ...props }) => /* @__PURE__ */ jsx16(
|
|
|
2132
2132
|
"h2",
|
|
2133
2133
|
{
|
|
2134
2134
|
className: cn16(
|
|
2135
|
-
// Figma: 20px / 600 / 28px
|
|
2135
|
+
// Figma: 20px / 600 / 28px — fontSize.xl + lineHeight.lg from tokens
|
|
2136
2136
|
"text-xl font-semibold leading-lg text-semantic-text-neutral-primary break-words",
|
|
2137
2137
|
className
|
|
2138
2138
|
),
|
|
@@ -2148,7 +2148,7 @@ var DrawerDescription = ({
|
|
|
2148
2148
|
"p",
|
|
2149
2149
|
{
|
|
2150
2150
|
className: cn16(
|
|
2151
|
-
// Figma: 14px / 400 / 24px, Text
|
|
2151
|
+
// Figma: 14px / 400 / 24px, Text–Neutral–Tertiary (#7C7C7C)
|
|
2152
2152
|
"text-sm font-normal leading-6 text-semantic-text-neutral-tertiary break-words",
|
|
2153
2153
|
className
|
|
2154
2154
|
),
|
|
@@ -2183,9 +2183,9 @@ var DrawerContent = React16.forwardRef(
|
|
|
2183
2183
|
DialogPrimitive.Overlay,
|
|
2184
2184
|
{
|
|
2185
2185
|
className: cn16(
|
|
2186
|
-
"fixed inset-0 z-50 bg-semantic-background-
|
|
2186
|
+
"fixed inset-0 z-50 bg-semantic-background-neutral-inverse-primary opacity-semantic-disabled",
|
|
2187
2187
|
// tailwindcss-animate: `.animate-in` bakes in animationDuration DEFAULT (~150ms),
|
|
2188
|
-
// which overrides plain `duration-*` in the cascade
|
|
2188
|
+
// which overrides plain `duration-*` in the cascade — `!duration-*` fixes it.
|
|
2189
2189
|
"!duration-700 ease-in-out",
|
|
2190
2190
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
2191
2191
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
@@ -2379,7 +2379,7 @@ function PopupContent({
|
|
|
2379
2379
|
{
|
|
2380
2380
|
className: cn18(
|
|
2381
2381
|
"w-full rounded-sm px-4 py-3",
|
|
2382
|
-
showBodyBox ? "bg-semantic-background-
|
|
2382
|
+
showBodyBox ? "bg-semantic-background-info-subtle" : "bg-transparent"
|
|
2383
2383
|
),
|
|
2384
2384
|
children
|
|
2385
2385
|
}
|
|
@@ -2435,7 +2435,7 @@ function Popup({
|
|
|
2435
2435
|
const resolvedCtaText = showCTA ? ctaText : void 0;
|
|
2436
2436
|
const resolvedCancelText = showCTA ? cancelText : void 0;
|
|
2437
2437
|
return /* @__PURE__ */ jsx18(DialogPrimitive2.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs13(DialogPrimitive2.Portal, { children: [
|
|
2438
|
-
showOverlay && /* @__PURE__ */ jsx18(DialogPrimitive2.Overlay, { className: "fixed inset-0 z-50 bg-semantic-background-
|
|
2438
|
+
showOverlay && /* @__PURE__ */ jsx18(DialogPrimitive2.Overlay, { className: "fixed inset-0 z-50 bg-semantic-background-neutral-inverse-primary opacity-semantic-disabled" }),
|
|
2439
2439
|
/* @__PURE__ */ jsx18(
|
|
2440
2440
|
DialogPrimitive2.Content,
|
|
2441
2441
|
{
|
|
@@ -2560,86 +2560,86 @@ var badgeVariants = cva14(
|
|
|
2560
2560
|
}
|
|
2561
2561
|
},
|
|
2562
2562
|
compoundVariants: [
|
|
2563
|
-
// Big: rounded/pill 48
|
|
2563
|
+
// Big: rounded/pill 48×24, number/notification 24×24
|
|
2564
2564
|
{ size: "big", variant: "rounded", class: "h-6 min-w-12 py-1 px-2" },
|
|
2565
2565
|
{ size: "big", variant: "pill", class: "h-6 min-w-12 py-1 px-2" },
|
|
2566
2566
|
{ size: "big", variant: "number", class: "h-6 w-6 p-0" },
|
|
2567
2567
|
{ size: "big", variant: "notification", class: "h-6 w-6 p-0" },
|
|
2568
|
-
// Small: rounded/pill 48
|
|
2568
|
+
// Small: rounded/pill 48×20, number/notification 20×20; padding top=2 bottom=2 left=8 right=8
|
|
2569
2569
|
{ size: "small", variant: "rounded", class: "h-5 min-w-12 py-0.5 px-2" },
|
|
2570
2570
|
{ size: "small", variant: "pill", class: "h-5 min-w-12 py-0.5 px-2" },
|
|
2571
2571
|
{ size: "small", variant: "number", class: "h-5 w-5 p-0" },
|
|
2572
2572
|
{ size: "small", variant: "notification", class: "h-5 w-5 p-0" },
|
|
2573
|
-
// Info (
|
|
2573
|
+
// Info (badge-specific semantic tokens)
|
|
2574
2574
|
{
|
|
2575
2575
|
state: "info",
|
|
2576
2576
|
appearance: "outlined",
|
|
2577
|
-
class: "bg-semantic-background-
|
|
2577
|
+
class: "bg-semantic-badge-background-subtle-info border-semantic-badge-border-info text-semantic-badge-text-black"
|
|
2578
2578
|
},
|
|
2579
2579
|
{
|
|
2580
2580
|
state: "info",
|
|
2581
2581
|
appearance: "solid",
|
|
2582
|
-
class: "bg-semantic-background-
|
|
2582
|
+
class: "bg-semantic-badge-background-solid-info text-semantic-badge-text-white"
|
|
2583
2583
|
},
|
|
2584
2584
|
// Success
|
|
2585
2585
|
{
|
|
2586
2586
|
state: "success",
|
|
2587
2587
|
appearance: "outlined",
|
|
2588
|
-
class: "bg-semantic-background-
|
|
2588
|
+
class: "bg-semantic-badge-background-subtle-success border-semantic-badge-border-success text-semantic-badge-text-black"
|
|
2589
2589
|
},
|
|
2590
2590
|
{
|
|
2591
2591
|
state: "success",
|
|
2592
2592
|
appearance: "solid",
|
|
2593
|
-
class: "bg-semantic-background-
|
|
2593
|
+
class: "bg-semantic-badge-background-solid-success text-semantic-badge-text-white"
|
|
2594
2594
|
},
|
|
2595
2595
|
// Warning
|
|
2596
2596
|
{
|
|
2597
2597
|
state: "warning",
|
|
2598
2598
|
appearance: "outlined",
|
|
2599
|
-
class: "bg-semantic-background-
|
|
2599
|
+
class: "bg-semantic-badge-background-subtle-warning border-semantic-badge-border-warning text-semantic-badge-text-black"
|
|
2600
2600
|
},
|
|
2601
2601
|
{
|
|
2602
2602
|
state: "warning",
|
|
2603
2603
|
appearance: "solid",
|
|
2604
|
-
class: "bg-semantic-background-
|
|
2604
|
+
class: "bg-semantic-badge-background-solid-warning text-semantic-badge-text-black"
|
|
2605
2605
|
},
|
|
2606
2606
|
// Error
|
|
2607
2607
|
{
|
|
2608
2608
|
state: "error",
|
|
2609
2609
|
appearance: "outlined",
|
|
2610
|
-
class: "bg-semantic-background-
|
|
2610
|
+
class: "bg-semantic-badge-background-subtle-error border-semantic-badge-border-error text-semantic-badge-text-black"
|
|
2611
2611
|
},
|
|
2612
2612
|
{
|
|
2613
2613
|
state: "error",
|
|
2614
2614
|
appearance: "solid",
|
|
2615
|
-
class: "bg-semantic-background-
|
|
2615
|
+
class: "bg-semantic-badge-background-solid-error text-semantic-badge-text-white"
|
|
2616
2616
|
},
|
|
2617
2617
|
// Neutral
|
|
2618
2618
|
{
|
|
2619
2619
|
state: "neutral",
|
|
2620
2620
|
appearance: "outlined",
|
|
2621
|
-
class: "bg-semantic-background-neutral
|
|
2621
|
+
class: "bg-semantic-badge-background-subtle-neutral border-semantic-badge-border-neutral text-semantic-badge-text-black"
|
|
2622
2622
|
},
|
|
2623
2623
|
{
|
|
2624
2624
|
state: "neutral",
|
|
2625
2625
|
appearance: "solid",
|
|
2626
|
-
class: "bg-neutral
|
|
2626
|
+
class: "bg-semantic-badge-background-solid-neutral text-semantic-badge-text-black"
|
|
2627
2627
|
},
|
|
2628
|
-
// Process
|
|
2628
|
+
// Process
|
|
2629
2629
|
{
|
|
2630
2630
|
state: "process",
|
|
2631
2631
|
appearance: "outlined",
|
|
2632
|
-
class: "bg-
|
|
2632
|
+
class: "bg-semantic-badge-background-subtle-process border-semantic-badge-border-process text-semantic-badge-text-black"
|
|
2633
2633
|
},
|
|
2634
2634
|
{
|
|
2635
2635
|
state: "process",
|
|
2636
2636
|
appearance: "solid",
|
|
2637
|
-
class: "bg-
|
|
2637
|
+
class: "bg-semantic-badge-background-solid-process text-semantic-badge-text-white"
|
|
2638
2638
|
},
|
|
2639
2639
|
{
|
|
2640
2640
|
state: "action",
|
|
2641
2641
|
appearance: "outlined",
|
|
2642
|
-
class: "bg-semantic-background-
|
|
2642
|
+
class: "bg-semantic-badge-background-subtle-action border-semantic-badge-border-action text-semantic-badge-text-black"
|
|
2643
2643
|
}
|
|
2644
2644
|
],
|
|
2645
2645
|
defaultVariants: {
|
|
@@ -2660,13 +2660,13 @@ var leadingIconMap = {
|
|
|
2660
2660
|
action: InfoFilled4
|
|
2661
2661
|
};
|
|
2662
2662
|
var leadingIconOutlinedColorClass = {
|
|
2663
|
-
info: "!text-
|
|
2664
|
-
success: "!text-
|
|
2665
|
-
warning: "!text-
|
|
2666
|
-
error: "!text-
|
|
2667
|
-
neutral: "!text-neutral
|
|
2668
|
-
process: "!text-
|
|
2669
|
-
action: "!text-
|
|
2663
|
+
info: "!text-semantic-badge-icon-subtle-info",
|
|
2664
|
+
success: "!text-semantic-badge-icon-subtle-success",
|
|
2665
|
+
warning: "!text-semantic-badge-icon-subtle-warning",
|
|
2666
|
+
error: "!text-semantic-badge-icon-subtle-error",
|
|
2667
|
+
neutral: "!text-semantic-badge-icon-subtle-neutral",
|
|
2668
|
+
process: "!text-semantic-badge-border-process",
|
|
2669
|
+
action: "!text-semantic-badge-border-action"
|
|
2670
2670
|
};
|
|
2671
2671
|
var Badge = React19.forwardRef(
|
|
2672
2672
|
({
|
|
@@ -2720,7 +2720,7 @@ var Badge = React19.forwardRef(
|
|
|
2720
2720
|
size: leadingIconSize,
|
|
2721
2721
|
className: cn19(
|
|
2722
2722
|
"shrink-0",
|
|
2723
|
-
resolvedAppearance === "solid" ? "text-neutral-50" : leadingIconOutlinedColorClass[resolvedState]
|
|
2723
|
+
resolvedAppearance === "solid" ? resolvedState === "info" ? "!text-semantic-badge-icon-solid-info" : "text-neutral-50" : leadingIconOutlinedColorClass[resolvedState]
|
|
2724
2724
|
),
|
|
2725
2725
|
"aria-hidden": "true"
|
|
2726
2726
|
}
|
|
@@ -2839,11 +2839,11 @@ var chipVariants = cva16(
|
|
|
2839
2839
|
"inline-flex items-center justify-center gap-1.5 rounded-full border transition-colors duration-200 ease-out",
|
|
2840
2840
|
"font-sans font-normal leading-5",
|
|
2841
2841
|
// Default: 1px border
|
|
2842
|
-
"bg-semantic-background-
|
|
2842
|
+
"bg-semantic-chips-background-default border border-semantic-chips-border-default text-semantic-chips-text-default",
|
|
2843
2843
|
// Hover
|
|
2844
|
-
"hover:bg-semantic-background-
|
|
2844
|
+
"hover:bg-semantic-chips-background-hover hover:text-semantic-chips-text-hover hover:border-transparent",
|
|
2845
2845
|
// Focused: 2px border neutralInverse primary so clearly distinct from default
|
|
2846
|
-
"focus-within:border-2 focus-within:border-semantic-border-
|
|
2846
|
+
"focus-within:border-2 focus-within:border-semantic-chips-border-focused focus-within:bg-semantic-chips-background-default focus-within:text-semantic-chips-text-default",
|
|
2847
2847
|
"focus-within:outline-none"
|
|
2848
2848
|
],
|
|
2849
2849
|
{
|
|
@@ -2853,20 +2853,20 @@ var chipVariants = cva16(
|
|
|
2853
2853
|
small: "h-6 min-w-[67px] py-1 px-3 gap-1 text-xs"
|
|
2854
2854
|
},
|
|
2855
2855
|
selected: {
|
|
2856
|
-
true: "bg-semantic-background-
|
|
2856
|
+
true: "bg-semantic-chips-background-selected text-semantic-chips-text-selected border-semantic-border-transparent hover:bg-semantic-chips-background-selected hover:text-semantic-chips-text-selected",
|
|
2857
2857
|
false: ""
|
|
2858
2858
|
},
|
|
2859
2859
|
disabled: {
|
|
2860
|
-
true: "bg-semantic-background-
|
|
2860
|
+
true: "bg-semantic-chips-background-disabled text-semantic-chips-text-disabled border-semantic-border-transparent hover:bg-semantic-chips-background-disabled hover:text-semantic-chips-text-disabled cursor-not-allowed pointer-events-none",
|
|
2861
2861
|
false: ""
|
|
2862
2862
|
}
|
|
2863
2863
|
},
|
|
2864
2864
|
compoundVariants: [
|
|
2865
|
-
{ selected: true, disabled: true, class: "bg-semantic-background-
|
|
2865
|
+
{ selected: true, disabled: true, class: "bg-semantic-chips-background-disabled text-semantic-chips-text-disabled" },
|
|
2866
2866
|
{
|
|
2867
2867
|
selected: true,
|
|
2868
2868
|
disabled: false,
|
|
2869
|
-
class: "focus-within:border-2 focus-within:bg-semantic-background-
|
|
2869
|
+
class: "focus-within:border-2 focus-within:bg-semantic-chips-background-selected focus-within:text-semantic-chips-text-selected focus-within:border-semantic-chips-border-focused"
|
|
2870
2870
|
}
|
|
2871
2871
|
],
|
|
2872
2872
|
defaultVariants: {
|
|
@@ -3087,7 +3087,7 @@ var Pagination = React22.forwardRef(
|
|
|
3087
3087
|
{
|
|
3088
3088
|
className: "inline-flex h-7 min-w-8 shrink-0 items-center justify-center px-2xs text-sm text-semantic-text-neutral-tertiary",
|
|
3089
3089
|
"aria-hidden": true,
|
|
3090
|
-
children: "
|
|
3090
|
+
children: "..."
|
|
3091
3091
|
},
|
|
3092
3092
|
`ellipsis-${index}`
|
|
3093
3093
|
) : /* @__PURE__ */ jsx22(
|
|
@@ -3099,7 +3099,7 @@ var Pagination = React22.forwardRef(
|
|
|
3099
3099
|
onClick: () => goToPage(item),
|
|
3100
3100
|
className: cn22(
|
|
3101
3101
|
"inline-flex h-7 min-w-8 shrink-0 items-center justify-center rounded-sm px-2 text-sm tabular-nums",
|
|
3102
|
-
item === page ? "bg-semantic-background-
|
|
3102
|
+
item === page ? "bg-semantic-chips-background-selected text-semantic-chips-text-selected" : "bg-semantic-background-neutral-primary text-semantic-text-neutral-tertiary hover:bg-semantic-chips-background-hover hover:text-semantic-chips-text-hover"
|
|
3103
3103
|
),
|
|
3104
3104
|
children: item
|
|
3105
3105
|
},
|
|
@@ -3142,15 +3142,15 @@ function getCircleClasses(states) {
|
|
|
3142
3142
|
return cn23(
|
|
3143
3143
|
circleBase,
|
|
3144
3144
|
"bg-semantic-background-neutral-primary",
|
|
3145
|
-
"border-semantic-border-
|
|
3145
|
+
"border-semantic-border-neutral-inverse-tertiary",
|
|
3146
3146
|
"text-semantic-text-neutral-primary"
|
|
3147
3147
|
);
|
|
3148
3148
|
case "complete":
|
|
3149
3149
|
return cn23(
|
|
3150
3150
|
circleBase,
|
|
3151
|
-
"bg-semantic-background-
|
|
3152
|
-
"border-semantic-border-
|
|
3153
|
-
"text-semantic-text-
|
|
3151
|
+
"bg-semantic-background-success-subtle",
|
|
3152
|
+
"border-semantic-border-success-subtle",
|
|
3153
|
+
"text-semantic-text-success-subtle"
|
|
3154
3154
|
);
|
|
3155
3155
|
case "default":
|
|
3156
3156
|
default:
|
|
@@ -3187,7 +3187,7 @@ function getTextClasses(states) {
|
|
|
3187
3187
|
}
|
|
3188
3188
|
}
|
|
3189
3189
|
function getLineColor(states) {
|
|
3190
|
-
return states === "complete" ? "bg-semantic-background-
|
|
3190
|
+
return states === "complete" ? "bg-semantic-background-success-default" : "bg-semantic-background-neutral-tertiary";
|
|
3191
3191
|
}
|
|
3192
3192
|
var Stepper = React23.forwardRef(
|
|
3193
3193
|
({
|
|
@@ -3232,7 +3232,7 @@ var Stepper = React23.forwardRef(
|
|
|
3232
3232
|
"aria-labelledby": titleId,
|
|
3233
3233
|
"aria-current": stepState === "inProgress" ? "step" : void 0,
|
|
3234
3234
|
className: circleClasses,
|
|
3235
|
-
children: stepState === "complete" ? /* @__PURE__ */ jsx23(Tickmark3, { size: 16, className: "text-semantic-icon-
|
|
3235
|
+
children: stepState === "complete" ? /* @__PURE__ */ jsx23(Tickmark3, { size: 16, className: "text-semantic-icon-success-subtle", "aria-hidden": true }) : step.stepNumber ?? index + 1
|
|
3236
3236
|
}
|
|
3237
3237
|
),
|
|
3238
3238
|
shouldShowLine ? /* @__PURE__ */ jsx23("div", { className: cn23("w-[2px] min-h-0 flex-1 rounded-full", getLineColor(stepState)), "aria-hidden": true }) : null
|
|
@@ -3352,10 +3352,10 @@ var toastVariants = cva17(
|
|
|
3352
3352
|
{
|
|
3353
3353
|
variants: {
|
|
3354
3354
|
variant: {
|
|
3355
|
-
info: "border-l-semantic-border-
|
|
3356
|
-
success: "border-l-semantic-border-
|
|
3357
|
-
warning: "border-l-semantic-border-
|
|
3358
|
-
error: "border-l-semantic-border-
|
|
3355
|
+
info: "border-l-semantic-toast-border-info bg-semantic-toast-background-info",
|
|
3356
|
+
success: "border-l-semantic-border-success-subtle bg-semantic-background-success-subtle",
|
|
3357
|
+
warning: "border-l-semantic-border-warning-subtle bg-semantic-background-warning-subtle",
|
|
3358
|
+
error: "border-l-semantic-border-error-subtle bg-semantic-background-error-subtle"
|
|
3359
3359
|
},
|
|
3360
3360
|
layout: {
|
|
3361
3361
|
default: "h-14 items-center",
|
|
@@ -3399,10 +3399,10 @@ var Toast = React24.forwardRef(
|
|
|
3399
3399
|
error: WarningFilled4
|
|
3400
3400
|
}[resolvedTypes];
|
|
3401
3401
|
const iconClassName = {
|
|
3402
|
-
info: "!text-semantic-icon-
|
|
3403
|
-
success: "!text-semantic-icon-
|
|
3404
|
-
warning: "!text-semantic-icon-
|
|
3405
|
-
error: "!text-semantic-icon-
|
|
3402
|
+
info: "!text-semantic-icon-info-subtle",
|
|
3403
|
+
success: "!text-semantic-icon-success-subtle",
|
|
3404
|
+
warning: "!text-semantic-icon-warning-subtle",
|
|
3405
|
+
error: "!text-semantic-icon-error-subtle"
|
|
3406
3406
|
}[resolvedTypes];
|
|
3407
3407
|
return /* @__PURE__ */ jsxs19(
|
|
3408
3408
|
"div",
|
|
@@ -3412,7 +3412,14 @@ var Toast = React24.forwardRef(
|
|
|
3412
3412
|
className: cn24(toastVariants({ variant: resolvedTypes, layout }), className),
|
|
3413
3413
|
...props,
|
|
3414
3414
|
children: [
|
|
3415
|
-
/* @__PURE__ */ jsx24("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx24(
|
|
3415
|
+
/* @__PURE__ */ jsx24("div", { className: "flex-shrink-0 mt-0.5", children: resolvedTypes === "info" ? /* @__PURE__ */ jsx24(
|
|
3416
|
+
"span",
|
|
3417
|
+
{
|
|
3418
|
+
className: "inline-flex h-5 w-5 items-center justify-center rounded-full bg-semantic-toast-border-info text-semantic-text-neutral-inverse-primary text-xs font-semibold leading-none",
|
|
3419
|
+
"aria-hidden": "true",
|
|
3420
|
+
children: "i"
|
|
3421
|
+
}
|
|
3422
|
+
) : /* @__PURE__ */ jsx24(IconComponent, { size: 20, className: iconClassName, "aria-hidden": "true" }) }),
|
|
3416
3423
|
/* @__PURE__ */ jsxs19("div", { className: "flex-1 min-w-0 flex flex-col gap-4", children: [
|
|
3417
3424
|
/* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-2", children: [
|
|
3418
3425
|
/* @__PURE__ */ jsx24("p", { className: "text-base font-medium leading-6 text-semantic-text-neutral-primary", children: title }),
|
|
@@ -3500,8 +3507,11 @@ var PageHeader = React25.forwardRef(
|
|
|
3500
3507
|
breadcrumbs,
|
|
3501
3508
|
...props
|
|
3502
3509
|
}, ref) => {
|
|
3503
|
-
const
|
|
3504
|
-
const
|
|
3510
|
+
const firstTabValue = tabs[0]?.value;
|
|
3511
|
+
const hasValidControlledTab = tab !== void 0 && tab !== "" && tabs.some((t) => t.value === tab);
|
|
3512
|
+
const hasValidDefaultTab = defaultTab !== void 0 && defaultTab !== "" && tabs.some((t) => t.value === defaultTab);
|
|
3513
|
+
const resolvedTabValue = hasValidControlledTab ? tab : hasValidDefaultTab ? defaultTab : firstTabValue;
|
|
3514
|
+
const isControlled = hasValidControlledTab;
|
|
3505
3515
|
const hasTabs = tabs.length > 0;
|
|
3506
3516
|
const derivedTertiaryAction = ctas && firstCta ? { label: firstCtaLabel, variant: "primary", icon: null } : void 0;
|
|
3507
3517
|
const derivedSecondaryAction = ctas && secondCta ? { label: secondCtaLabel, variant: "secondary", icon: null } : void 0;
|
|
@@ -3593,13 +3603,21 @@ var PageHeader = React25.forwardRef(
|
|
|
3593
3603
|
Tabs,
|
|
3594
3604
|
{
|
|
3595
3605
|
type: "underline",
|
|
3596
|
-
...isControlled ? { value:
|
|
3597
|
-
defaultValue:
|
|
3606
|
+
...isControlled ? { value: resolvedTabValue, onValueChange: onTabChange } : {
|
|
3607
|
+
defaultValue: resolvedTabValue,
|
|
3598
3608
|
onValueChange: onTabChange
|
|
3599
3609
|
},
|
|
3600
3610
|
className: "flex-1 pt-5",
|
|
3601
3611
|
children: [
|
|
3602
|
-
/* @__PURE__ */ jsx25(Tabs.List, { children: tabs.map((t) => /* @__PURE__ */ jsx25(
|
|
3612
|
+
/* @__PURE__ */ jsx25(Tabs.List, { children: tabs.map((t) => /* @__PURE__ */ jsx25(
|
|
3613
|
+
Tabs.Trigger,
|
|
3614
|
+
{
|
|
3615
|
+
value: t.value,
|
|
3616
|
+
className: "data-[state=active]:border-semantic-input-border-active",
|
|
3617
|
+
children: t.label
|
|
3618
|
+
},
|
|
3619
|
+
t.value
|
|
3620
|
+
)) }),
|
|
3603
3621
|
tabs.map((t) => /* @__PURE__ */ jsx25(Tabs.Content, { value: t.value, className: "hidden" }, t.value))
|
|
3604
3622
|
]
|
|
3605
3623
|
}
|
|
@@ -3609,13 +3627,21 @@ var PageHeader = React25.forwardRef(
|
|
|
3609
3627
|
Tabs,
|
|
3610
3628
|
{
|
|
3611
3629
|
type: "underline",
|
|
3612
|
-
...isControlled ? { value:
|
|
3613
|
-
defaultValue:
|
|
3630
|
+
...isControlled ? { value: resolvedTabValue, onValueChange: onTabChange } : {
|
|
3631
|
+
defaultValue: resolvedTabValue,
|
|
3614
3632
|
onValueChange: onTabChange
|
|
3615
3633
|
},
|
|
3616
3634
|
className: "-mb-px mt-0 px-5",
|
|
3617
3635
|
children: [
|
|
3618
|
-
/* @__PURE__ */ jsx25(Tabs.List, { className: "mt-0", children: tabs.map((t) => /* @__PURE__ */ jsx25(
|
|
3636
|
+
/* @__PURE__ */ jsx25(Tabs.List, { className: "mt-0", children: tabs.map((t) => /* @__PURE__ */ jsx25(
|
|
3637
|
+
Tabs.Trigger,
|
|
3638
|
+
{
|
|
3639
|
+
value: t.value,
|
|
3640
|
+
className: "data-[state=active]:border-semantic-input-border-active",
|
|
3641
|
+
children: t.label
|
|
3642
|
+
},
|
|
3643
|
+
t.value
|
|
3644
|
+
)) }),
|
|
3619
3645
|
tabs.map((t) => /* @__PURE__ */ jsx25(Tabs.Content, { value: t.value, className: "hidden" }, t.value))
|
|
3620
3646
|
]
|
|
3621
3647
|
}
|
|
@@ -4042,7 +4068,7 @@ import { CloudUpload, DocumentPdf, Close as Close11, Delete, Retry, TickmarkFill
|
|
|
4042
4068
|
import { Fragment as Fragment6, jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4043
4069
|
var uploadBoxVariants = cva20([
|
|
4044
4070
|
"relative flex flex-col items-center justify-center w-full",
|
|
4045
|
-
"rounded-sm border border-dashed border-semantic-border-neutral-primary hover:border-semantic-border-
|
|
4071
|
+
"rounded-sm border border-dashed border-semantic-border-neutral-primary hover:border-semantic-input-border-hover",
|
|
4046
4072
|
"bg-semantic-background-neutral-primary",
|
|
4047
4073
|
"transition-colors duration-200 ease-out",
|
|
4048
4074
|
"cursor-pointer",
|
|
@@ -4148,7 +4174,7 @@ var Upload = React30.forwardRef(
|
|
|
4148
4174
|
children: [
|
|
4149
4175
|
/* @__PURE__ */ jsxs24("label", { className: "text-xs font-medium leading-4 text-semantic-text-neutral-primary", children: [
|
|
4150
4176
|
label,
|
|
4151
|
-
(asterisk ?? required) && /* @__PURE__ */ jsx30("span", { className: "text-semantic-text-
|
|
4177
|
+
(asterisk ?? required) && /* @__PURE__ */ jsx30("span", { className: "text-semantic-text-error-subtle ml-0.5", children: "*" })
|
|
4152
4178
|
] }),
|
|
4153
4179
|
/* @__PURE__ */ jsxs24(
|
|
4154
4180
|
"div",
|
|
@@ -4184,7 +4210,7 @@ var Upload = React30.forwardRef(
|
|
|
4184
4210
|
}
|
|
4185
4211
|
),
|
|
4186
4212
|
/* @__PURE__ */ jsxs24("div", { className: "relative z-0 flex flex-col items-center gap-2 text-center pointer-events-none", children: [
|
|
4187
|
-
/* @__PURE__ */ jsx30("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-semantic-background-
|
|
4213
|
+
/* @__PURE__ */ jsx30("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-semantic-background-info-subtle text-semantic-icon-info-subtle", children: /* @__PURE__ */ jsx30(CloudUpload, { size: 20, color: colors.blue["600"], "aria-hidden": "true" }) }),
|
|
4188
4214
|
/* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-1", children: [
|
|
4189
4215
|
/* @__PURE__ */ jsxs24("p", { className: "text-sm leading-6 text-semantic-text-neutral-primary", children: [
|
|
4190
4216
|
/* @__PURE__ */ jsx30("span", { className: "font-normal", children: "Drop your files here or " }),
|
|
@@ -4239,7 +4265,7 @@ var uploadFileItemBoxVariants = cva20(
|
|
|
4239
4265
|
status: {
|
|
4240
4266
|
uploading: "border-semantic-border-neutral-secondary",
|
|
4241
4267
|
complete: "border-semantic-border-neutral-secondary",
|
|
4242
|
-
failed: "border-semantic-border-
|
|
4268
|
+
failed: "border-semantic-border-error-subtle"
|
|
4243
4269
|
}
|
|
4244
4270
|
},
|
|
4245
4271
|
defaultVariants: {
|
|
@@ -4275,7 +4301,7 @@ var UploadFileItem = React30.forwardRef(
|
|
|
4275
4301
|
/* @__PURE__ */ jsx30(DocumentPdf, { size: 24, className: "shrink-0 text-semantic-text-neutral-primary", "aria-hidden": true }),
|
|
4276
4302
|
/* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
4277
4303
|
/* @__PURE__ */ jsx30("p", { className: "truncate text-sm font-medium leading-6 text-semantic-text-neutral-primary", children: fileName }),
|
|
4278
|
-
status === "failed" ? /* @__PURE__ */ jsx30("p", { className: "text-xs font-normal leading-4 text-semantic-text-
|
|
4304
|
+
status === "failed" ? /* @__PURE__ */ jsx30("p", { className: "text-xs font-normal leading-4 text-semantic-text-error-subtle", children: "Upload failed" }) : fileSize ? /* @__PURE__ */ jsx30("p", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary", children: fileSize }) : null
|
|
4279
4305
|
] })
|
|
4280
4306
|
] }),
|
|
4281
4307
|
/* @__PURE__ */ jsxs24("div", { className: "flex shrink-0 flex-col items-end justify-center", children: [
|
|
@@ -4284,19 +4310,19 @@ var UploadFileItem = React30.forwardRef(
|
|
|
4284
4310
|
{
|
|
4285
4311
|
type: "button",
|
|
4286
4312
|
onClick: onCancel,
|
|
4287
|
-
className: "inline-flex items-center justify-center rounded p-0 text-semantic-text-neutral-primary hover:opacity-semantic-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-
|
|
4313
|
+
className: "inline-flex items-center justify-center rounded p-0 text-semantic-text-neutral-primary hover:opacity-semantic-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-neutral-inverse-primary focus-visible:ring-offset-1",
|
|
4288
4314
|
"aria-label": "Cancel upload",
|
|
4289
4315
|
children: /* @__PURE__ */ jsx30(Close11, { size: 20, "aria-hidden": true })
|
|
4290
4316
|
}
|
|
4291
4317
|
),
|
|
4292
4318
|
status === "complete" && /* @__PURE__ */ jsx30(Fragment6, { children: /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-4", children: [
|
|
4293
|
-
/* @__PURE__ */ jsx30(TickmarkFilled6, { size: 20, className: "!text-semantic-icon-
|
|
4319
|
+
/* @__PURE__ */ jsx30(TickmarkFilled6, { size: 20, className: "!text-semantic-icon-success-subtle shrink-0", "aria-hidden": true }),
|
|
4294
4320
|
/* @__PURE__ */ jsx30(
|
|
4295
4321
|
"button",
|
|
4296
4322
|
{
|
|
4297
4323
|
type: "button",
|
|
4298
4324
|
onClick: onDelete,
|
|
4299
|
-
className: "inline-flex items-center justify-center rounded p-0 text-semantic-text-neutral-primary hover:opacity-semantic-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-
|
|
4325
|
+
className: "inline-flex items-center justify-center rounded p-0 text-semantic-text-neutral-primary hover:opacity-semantic-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-neutral-inverse-primary focus-visible:ring-offset-1",
|
|
4300
4326
|
"aria-label": "Delete file",
|
|
4301
4327
|
children: /* @__PURE__ */ jsx30(Delete, { size: 20, "aria-hidden": true })
|
|
4302
4328
|
}
|
|
@@ -4308,7 +4334,7 @@ var UploadFileItem = React30.forwardRef(
|
|
|
4308
4334
|
{
|
|
4309
4335
|
type: "button",
|
|
4310
4336
|
onClick: onRetry,
|
|
4311
|
-
className: "inline-flex items-center justify-center rounded p-0 text-semantic-text-neutral-primary hover:opacity-semantic-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-
|
|
4337
|
+
className: "inline-flex items-center justify-center rounded p-0 text-semantic-text-neutral-primary hover:opacity-semantic-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-neutral-inverse-primary focus-visible:ring-offset-1",
|
|
4312
4338
|
"aria-label": "Retry upload",
|
|
4313
4339
|
children: /* @__PURE__ */ jsx30(Retry, { size: 20, "aria-hidden": true })
|
|
4314
4340
|
}
|
|
@@ -4318,7 +4344,7 @@ var UploadFileItem = React30.forwardRef(
|
|
|
4318
4344
|
{
|
|
4319
4345
|
type: "button",
|
|
4320
4346
|
onClick: onDelete,
|
|
4321
|
-
className: "inline-flex items-center justify-center rounded p-0 text-semantic-text-neutral-primary hover:opacity-semantic-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-
|
|
4347
|
+
className: "inline-flex items-center justify-center rounded p-0 text-semantic-text-neutral-primary hover:opacity-semantic-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-neutral-inverse-primary focus-visible:ring-offset-1",
|
|
4322
4348
|
"aria-label": "Delete file",
|
|
4323
4349
|
children: /* @__PURE__ */ jsx30(Delete, { size: 20, "aria-hidden": true })
|
|
4324
4350
|
}
|