@cytario/design 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +9 -5
- package/dist/index.js +34 -34
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,14 +7,15 @@ import React__default, { ReactNode } from 'react';
|
|
|
7
7
|
import { TreeApi } from 'react-arborist';
|
|
8
8
|
export { TreeApi } from 'react-arborist';
|
|
9
9
|
|
|
10
|
+
type Size = "sm" | "md" | "lg";
|
|
10
11
|
type ButtonVariant = "primary" | "secondary" | "ghost" | "destructive" | "default" | "success" | "info" | "neutral";
|
|
11
|
-
type ButtonSize = "sm" | "md" | "lg";
|
|
12
12
|
|
|
13
|
+
type ButtonSize$1 = Size;
|
|
13
14
|
interface ButtonProps extends ButtonProps$1 {
|
|
14
15
|
/** Visual style variant */
|
|
15
16
|
variant?: ButtonVariant;
|
|
16
17
|
/** Size preset */
|
|
17
|
-
size?: ButtonSize;
|
|
18
|
+
size?: ButtonSize$1;
|
|
18
19
|
/** Shows a spinner and disables interaction */
|
|
19
20
|
isLoading?: boolean;
|
|
20
21
|
/** Lucide icon rendered before children */
|
|
@@ -94,7 +95,7 @@ interface InputProps extends Omit<TextFieldProps, "children" | "className"> {
|
|
|
94
95
|
/** HTML input type */
|
|
95
96
|
type?: "text" | "email" | "password" | "number";
|
|
96
97
|
/** Controls padding and font size */
|
|
97
|
-
size?:
|
|
98
|
+
size?: Size;
|
|
98
99
|
/** Text prefix shown inside the input on the left (e.g., "$", "https://") */
|
|
99
100
|
prefix?: string;
|
|
100
101
|
/** Text alignment within the input */
|
|
@@ -113,11 +114,13 @@ interface SelectProps extends Omit<SelectProps$1<SelectItem>, "children"> {
|
|
|
113
114
|
label?: string;
|
|
114
115
|
placeholder?: string;
|
|
115
116
|
errorMessage?: string;
|
|
117
|
+
/** Controls padding and font size */
|
|
118
|
+
size?: Size;
|
|
116
119
|
/** Custom visual renderer for items in the dropdown and trigger.
|
|
117
120
|
* `item.name` remains the accessible label (used for typeahead and screen readers). */
|
|
118
121
|
renderItem?: (item: SelectItem) => React__default.ReactNode;
|
|
119
122
|
}
|
|
120
|
-
declare function Select({ label, items, placeholder, errorMessage, isDisabled, isRequired, className, renderItem, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
123
|
+
declare function Select({ label, items, placeholder, errorMessage, size, isDisabled, isRequired, className, renderItem, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
121
124
|
|
|
122
125
|
type TableSize = "compact" | "comfortable";
|
|
123
126
|
interface DataTableProps extends TableProps {
|
|
@@ -303,6 +306,7 @@ interface BreadcrumbsProps {
|
|
|
303
306
|
}
|
|
304
307
|
declare function Breadcrumbs({ items, className }: BreadcrumbsProps): react_jsx_runtime.JSX.Element;
|
|
305
308
|
|
|
309
|
+
type ButtonSize = Size;
|
|
306
310
|
interface ButtonLinkProps extends Omit<LinkProps$1, "className"> {
|
|
307
311
|
/** Visual style variant */
|
|
308
312
|
variant?: ButtonVariant;
|
|
@@ -1022,4 +1026,4 @@ declare const LineHeightTight = 1.25;
|
|
|
1022
1026
|
declare const LineHeightNormal = 1.5;
|
|
1023
1027
|
declare const LineHeightRelaxed = 1.625;
|
|
1024
1028
|
|
|
1025
|
-
export { Badge, type BadgeProps, type BadgeSize, type BadgeVariant, Banner, type BannerProps, type BannerVariant, BorderRadiusFull, BorderRadiusLg, BorderRadiusMd, BorderRadiusNone, BorderRadiusSm, BorderRadiusXl, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardPadding, type CardProps, Cell, Checkbox, type CheckboxProps, ColorActionDanger, ColorActionDangerHover, ColorActionDefault, ColorActionDefaultHover, ColorActionInfo, ColorActionInfoHover, ColorActionPrimary, ColorActionPrimaryActive, ColorActionPrimaryHover, ColorActionSecondary, ColorActionSecondaryHover, ColorActionSuccess, ColorActionSuccessHover, ColorAmber100, ColorAmber200, ColorAmber300, ColorAmber400, ColorAmber50, ColorAmber500, ColorAmber600, ColorAmber700, ColorAmber800, ColorAmber900, ColorBadgeAmberBg, ColorBadgeAmberText, ColorBadgeGreenBg, ColorBadgeGreenText, ColorBadgeNeutralBg, ColorBadgeNeutralText, ColorBadgePurpleBg, ColorBadgePurpleText, ColorBadgeRoseBg, ColorBadgeRoseText, ColorBadgeSlateBg, ColorBadgeSlateText, ColorBadgeTealBg, ColorBadgeTealText, ColorBannerDangerBg, ColorBannerDangerBorder, ColorBannerDangerIcon, ColorBannerDangerText, ColorBannerInfoBg, ColorBannerInfoBorder, ColorBannerInfoIcon, ColorBannerInfoText, ColorBannerSuccessBg, ColorBannerSuccessBorder, ColorBannerSuccessIcon, ColorBannerSuccessText, ColorBannerWarningBg, ColorBannerWarningBorder, ColorBannerWarningIcon, ColorBannerWarningText, ColorBorderAccent, ColorBorderBrand, ColorBorderDanger, ColorBorderDefault, ColorBorderFocus, ColorBorderInfo, ColorBorderStrong, ColorBorderSuccess, ColorBorderWarning, ColorBrandAccent, ColorBrandPrimary, ColorDeltaDecreaseBg, ColorDeltaDecreaseIcon, ColorDeltaDecreaseText, ColorDeltaFlatBg, ColorDeltaFlatIcon, ColorDeltaFlatText, ColorDeltaIncreaseBg, ColorDeltaIncreaseIcon, ColorDeltaIncreaseText, ColorGreen100, ColorGreen200, ColorGreen300, ColorGreen400, ColorGreen50, ColorGreen500, ColorGreen600, ColorGreen700, ColorGreen800, ColorGreen900, ColorNeutral0, ColorNeutral100, ColorNeutral1000, ColorNeutral200, ColorNeutral300, ColorNeutral400, ColorNeutral50, ColorNeutral500, ColorNeutral600, ColorNeutral700, ColorNeutral800, ColorNeutral900, ColorNeutral950, ColorOverlayBackdrop, ColorProgressFill, ColorProgressFillDanger, ColorProgressFillSuccess, ColorProgressFillWarning, ColorProgressTrack, ColorPurple100, ColorPurple200, ColorPurple300, ColorPurple400, ColorPurple50, ColorPurple500, ColorPurple600, ColorPurple700, ColorPurple800, ColorPurple900, ColorRose100, ColorRose200, ColorRose300, ColorRose400, ColorRose50, ColorRose500, ColorRose600, ColorRose700, ColorRose800, ColorRose900, ColorSlate100, ColorSlate200, ColorSlate300, ColorSlate400, ColorSlate50, ColorSlate500, ColorSlate600, ColorSlate700, ColorSlate800, ColorSlate900, ColorStatusDanger, ColorStatusInfo, ColorStatusSuccess, ColorStatusWarning, ColorSurfaceAccent, ColorSurfaceBrand, ColorSurfaceDanger, ColorSurfaceDefault, ColorSurfaceHover, ColorSurfaceInfo, ColorSurfaceMuted, ColorSurfaceOverlay, ColorSurfacePressed, ColorSurfaceSelected, ColorSurfaceSelectedHover, ColorSurfaceSubtle, ColorSurfaceSuccess, ColorSurfaceWarning, ColorTeal100, ColorTeal200, ColorTeal300, ColorTeal400, ColorTeal50, ColorTeal500, ColorTeal600, ColorTeal700, ColorTeal800, ColorTeal900, ColorTextAccent, ColorTextBrand, ColorTextDanger, ColorTextInfo, ColorTextInverse, ColorTextPrimary, ColorTextSecondary, ColorTextSuccess, ColorTextTertiary, ColorTextWarning, Column, type DataTableProps, type DeltaFormat, DeltaIndicator, type DeltaIndicatorProps, type DeltaMode, Dialog, type DialogProps, EmptyState, type EmptyStateProps, Field, type FieldProps, Fieldset, type FieldsetProps, FileCard, type FileCardProps, FontSize2xl, FontSize3xl, FontSize4xl, FontSize5xl, FontSizeBase, FontSizeLg, FontSizeSm, FontSizeXl, FontSizeXs, FontWeightBold, FontWeightExtrabold, FontWeightLight, FontWeightMedium, FontWeightRegular, FontWeightSemibold, FormWizard, type FormWizardContextValue, FormWizardNav, type FormWizardNavProps, FormWizardProgress, type FormWizardProgressProps, type FormWizardProps, type GroupPosition, H1, H2, H3, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, IconButtonLink, type IconButtonLinkProps, type IconButtonProps, type IconProps, Input, InputAddon, type InputAddonProps, InputGroup, InputGroupContext, type InputGroupProps, type InputProps, Label, type LabelProps, LineHeightNormal, LineHeightRelaxed, LineHeightTight, Link, type LinkProps, type LinkVariant, Menu, MenuCheckboxItem, type MenuCheckboxItemProps, MenuHeader, type MenuHeaderProps, MenuItem, type MenuItemData, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, type MenuSeparatorProps, MetricCard, type MetricCardProps, type MetricCardSize, PathPill, type PathPillProps, Pill, type PillColor, type PillProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, type ProgressBarVariant, Radio, RadioButton, type RadioButtonProps, RadioGroup, type RadioGroupProps, type RadioProps, Row, SectionHeader, type SectionHeaderProps, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, type SegmentedControlSelectionMode, type SegmentedControlSize, Select, type SelectItem, type SelectProps, Spacing1, Spacing12, Spacing16, Spacing2, Spacing3, Spacing4, Spacing6, Spacing8, Spinner, type SpinnerProps, StorageConnectionCard, type StorageConnectionCardProps, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, TableHeader, type TableSize, Tabs, type TabsProps, type TabsSize, type TabsVariant, type ToastBridge, type ToastContextValue, type ToastData, type ToastPlacement, ToastProvider, type ToastProviderProps, type ToastVariant, ToggleButton, ToggleButtonGroup, ToggleButtonGroupItem, type ToggleButtonGroupItemProps, type ToggleButtonGroupProps, type ToggleButtonGroupSize, type ToggleButtonProps, type ToggleButtonSize, type ToggleButtonVariant, Tooltip, type TooltipProps, Tree, type TreeNode, type TreeProps, createToastBridge, pillColorFromName, useFormWizard, useInputGroup, useToast };
|
|
1029
|
+
export { Badge, type BadgeProps, type BadgeSize, type BadgeVariant, Banner, type BannerProps, type BannerVariant, BorderRadiusFull, BorderRadiusLg, BorderRadiusMd, BorderRadiusNone, BorderRadiusSm, BorderRadiusXl, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize$1 as ButtonSize, type ButtonVariant, Card, type CardPadding, type CardProps, Cell, Checkbox, type CheckboxProps, ColorActionDanger, ColorActionDangerHover, ColorActionDefault, ColorActionDefaultHover, ColorActionInfo, ColorActionInfoHover, ColorActionPrimary, ColorActionPrimaryActive, ColorActionPrimaryHover, ColorActionSecondary, ColorActionSecondaryHover, ColorActionSuccess, ColorActionSuccessHover, ColorAmber100, ColorAmber200, ColorAmber300, ColorAmber400, ColorAmber50, ColorAmber500, ColorAmber600, ColorAmber700, ColorAmber800, ColorAmber900, ColorBadgeAmberBg, ColorBadgeAmberText, ColorBadgeGreenBg, ColorBadgeGreenText, ColorBadgeNeutralBg, ColorBadgeNeutralText, ColorBadgePurpleBg, ColorBadgePurpleText, ColorBadgeRoseBg, ColorBadgeRoseText, ColorBadgeSlateBg, ColorBadgeSlateText, ColorBadgeTealBg, ColorBadgeTealText, ColorBannerDangerBg, ColorBannerDangerBorder, ColorBannerDangerIcon, ColorBannerDangerText, ColorBannerInfoBg, ColorBannerInfoBorder, ColorBannerInfoIcon, ColorBannerInfoText, ColorBannerSuccessBg, ColorBannerSuccessBorder, ColorBannerSuccessIcon, ColorBannerSuccessText, ColorBannerWarningBg, ColorBannerWarningBorder, ColorBannerWarningIcon, ColorBannerWarningText, ColorBorderAccent, ColorBorderBrand, ColorBorderDanger, ColorBorderDefault, ColorBorderFocus, ColorBorderInfo, ColorBorderStrong, ColorBorderSuccess, ColorBorderWarning, ColorBrandAccent, ColorBrandPrimary, ColorDeltaDecreaseBg, ColorDeltaDecreaseIcon, ColorDeltaDecreaseText, ColorDeltaFlatBg, ColorDeltaFlatIcon, ColorDeltaFlatText, ColorDeltaIncreaseBg, ColorDeltaIncreaseIcon, ColorDeltaIncreaseText, ColorGreen100, ColorGreen200, ColorGreen300, ColorGreen400, ColorGreen50, ColorGreen500, ColorGreen600, ColorGreen700, ColorGreen800, ColorGreen900, ColorNeutral0, ColorNeutral100, ColorNeutral1000, ColorNeutral200, ColorNeutral300, ColorNeutral400, ColorNeutral50, ColorNeutral500, ColorNeutral600, ColorNeutral700, ColorNeutral800, ColorNeutral900, ColorNeutral950, ColorOverlayBackdrop, ColorProgressFill, ColorProgressFillDanger, ColorProgressFillSuccess, ColorProgressFillWarning, ColorProgressTrack, ColorPurple100, ColorPurple200, ColorPurple300, ColorPurple400, ColorPurple50, ColorPurple500, ColorPurple600, ColorPurple700, ColorPurple800, ColorPurple900, ColorRose100, ColorRose200, ColorRose300, ColorRose400, ColorRose50, ColorRose500, ColorRose600, ColorRose700, ColorRose800, ColorRose900, ColorSlate100, ColorSlate200, ColorSlate300, ColorSlate400, ColorSlate50, ColorSlate500, ColorSlate600, ColorSlate700, ColorSlate800, ColorSlate900, ColorStatusDanger, ColorStatusInfo, ColorStatusSuccess, ColorStatusWarning, ColorSurfaceAccent, ColorSurfaceBrand, ColorSurfaceDanger, ColorSurfaceDefault, ColorSurfaceHover, ColorSurfaceInfo, ColorSurfaceMuted, ColorSurfaceOverlay, ColorSurfacePressed, ColorSurfaceSelected, ColorSurfaceSelectedHover, ColorSurfaceSubtle, ColorSurfaceSuccess, ColorSurfaceWarning, ColorTeal100, ColorTeal200, ColorTeal300, ColorTeal400, ColorTeal50, ColorTeal500, ColorTeal600, ColorTeal700, ColorTeal800, ColorTeal900, ColorTextAccent, ColorTextBrand, ColorTextDanger, ColorTextInfo, ColorTextInverse, ColorTextPrimary, ColorTextSecondary, ColorTextSuccess, ColorTextTertiary, ColorTextWarning, Column, type DataTableProps, type DeltaFormat, DeltaIndicator, type DeltaIndicatorProps, type DeltaMode, Dialog, type DialogProps, EmptyState, type EmptyStateProps, Field, type FieldProps, Fieldset, type FieldsetProps, FileCard, type FileCardProps, FontSize2xl, FontSize3xl, FontSize4xl, FontSize5xl, FontSizeBase, FontSizeLg, FontSizeSm, FontSizeXl, FontSizeXs, FontWeightBold, FontWeightExtrabold, FontWeightLight, FontWeightMedium, FontWeightRegular, FontWeightSemibold, FormWizard, type FormWizardContextValue, FormWizardNav, type FormWizardNavProps, FormWizardProgress, type FormWizardProgressProps, type FormWizardProps, type GroupPosition, H1, H2, H3, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, IconButtonLink, type IconButtonLinkProps, type IconButtonProps, type IconProps, Input, InputAddon, type InputAddonProps, InputGroup, InputGroupContext, type InputGroupProps, type InputProps, Label, type LabelProps, LineHeightNormal, LineHeightRelaxed, LineHeightTight, Link, type LinkProps, type LinkVariant, Menu, MenuCheckboxItem, type MenuCheckboxItemProps, MenuHeader, type MenuHeaderProps, MenuItem, type MenuItemData, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, type MenuSeparatorProps, MetricCard, type MetricCardProps, type MetricCardSize, PathPill, type PathPillProps, Pill, type PillColor, type PillProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, type ProgressBarVariant, Radio, RadioButton, type RadioButtonProps, RadioGroup, type RadioGroupProps, type RadioProps, Row, SectionHeader, type SectionHeaderProps, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, type SegmentedControlSelectionMode, type SegmentedControlSize, Select, type SelectItem, type SelectProps, Spacing1, Spacing12, Spacing16, Spacing2, Spacing3, Spacing4, Spacing6, Spacing8, Spinner, type SpinnerProps, StorageConnectionCard, type StorageConnectionCardProps, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, TableHeader, type TableSize, Tabs, type TabsProps, type TabsSize, type TabsVariant, type ToastBridge, type ToastContextValue, type ToastData, type ToastPlacement, ToastProvider, type ToastProviderProps, type ToastVariant, ToggleButton, ToggleButtonGroup, ToggleButtonGroupItem, type ToggleButtonGroupItemProps, type ToggleButtonGroupProps, type ToggleButtonGroupSize, type ToggleButtonProps, type ToggleButtonSize, type ToggleButtonVariant, Tooltip, type TooltipProps, Tree, type TreeNode, type TreeProps, createToastBridge, pillColorFromName, useFormWizard, useInputGroup, useToast };
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,11 @@ import {
|
|
|
10
10
|
import { twMerge } from "tailwind-merge";
|
|
11
11
|
|
|
12
12
|
// src/components/_shared/styles.ts
|
|
13
|
+
var sizeStyles = {
|
|
14
|
+
sm: "px-3 py-1.5 text-sm",
|
|
15
|
+
md: "px-4 py-2 text-base",
|
|
16
|
+
lg: "px-6 py-3 text-lg"
|
|
17
|
+
};
|
|
13
18
|
var variantStyles = {
|
|
14
19
|
primary: [
|
|
15
20
|
"bg-(--color-action-primary) text-(--color-text-inverse)",
|
|
@@ -54,11 +59,6 @@ var variantStyles = {
|
|
|
54
59
|
"pressed:bg-(--color-surface-muted)"
|
|
55
60
|
].join(" ")
|
|
56
61
|
};
|
|
57
|
-
var sizeStyles = {
|
|
58
|
-
sm: "px-3 py-1.5 text-sm",
|
|
59
|
-
md: "px-4 py-2 text-base",
|
|
60
|
-
lg: "px-6 py-3 text-lg"
|
|
61
|
-
};
|
|
62
62
|
|
|
63
63
|
// src/components/Icon/Icon.tsx
|
|
64
64
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -333,16 +333,6 @@ import {
|
|
|
333
333
|
Text
|
|
334
334
|
} from "react-aria-components";
|
|
335
335
|
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
336
|
-
var sizeClasses = {
|
|
337
|
-
sm: "px-3 py-1.5 text-sm",
|
|
338
|
-
md: "px-4 py-2 text-base",
|
|
339
|
-
lg: "px-4 py-3 text-lg"
|
|
340
|
-
};
|
|
341
|
-
var prefixSizeClasses = {
|
|
342
|
-
sm: "px-3 text-sm",
|
|
343
|
-
md: "px-3 text-base",
|
|
344
|
-
lg: "px-4 text-lg"
|
|
345
|
-
};
|
|
346
336
|
var alignClasses = {
|
|
347
337
|
left: "text-left",
|
|
348
338
|
center: "text-center",
|
|
@@ -438,7 +428,7 @@ function Input({
|
|
|
438
428
|
"bg-(--color-surface-subtle)",
|
|
439
429
|
"border-r border-r-(--color-border-default)",
|
|
440
430
|
"text-(--color-text-secondary)",
|
|
441
|
-
|
|
431
|
+
sizeStyles[size]
|
|
442
432
|
].join(" "),
|
|
443
433
|
children: prefix
|
|
444
434
|
}
|
|
@@ -449,7 +439,7 @@ function Input({
|
|
|
449
439
|
placeholder,
|
|
450
440
|
className: [
|
|
451
441
|
"w-full bg-transparent",
|
|
452
|
-
|
|
442
|
+
sizeStyles[size],
|
|
453
443
|
alignClasses[align],
|
|
454
444
|
"text-(--color-text-primary)",
|
|
455
445
|
"placeholder:text-(--color-text-tertiary)",
|
|
@@ -465,7 +455,7 @@ function Input({
|
|
|
465
455
|
placeholder,
|
|
466
456
|
className: [
|
|
467
457
|
"w-full",
|
|
468
|
-
|
|
458
|
+
sizeStyles[size],
|
|
469
459
|
alignClasses[align],
|
|
470
460
|
radiusClass,
|
|
471
461
|
"border",
|
|
@@ -519,6 +509,7 @@ function Select({
|
|
|
519
509
|
items,
|
|
520
510
|
placeholder = "Select an option",
|
|
521
511
|
errorMessage,
|
|
512
|
+
size = "md",
|
|
522
513
|
isDisabled,
|
|
523
514
|
isRequired,
|
|
524
515
|
className,
|
|
@@ -550,14 +541,17 @@ function Select({
|
|
|
550
541
|
Button2,
|
|
551
542
|
{
|
|
552
543
|
className: twMerge2(
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
544
|
+
`
|
|
545
|
+
inline-flex items-center justify-between
|
|
546
|
+
w-full rounded-md
|
|
547
|
+
text-left
|
|
548
|
+
border outline-none transition-colors
|
|
549
|
+
focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2
|
|
550
|
+
cursor-pointer disabled:opacity-50 disabled:pointer-events-none
|
|
551
|
+
bg-(--color-surface-default)
|
|
552
|
+
`,
|
|
553
|
+
sizeStyles[size],
|
|
554
|
+
hasError ? "border-(--color-border-danger)" : "border-(--color-border-default)"
|
|
561
555
|
),
|
|
562
556
|
children: [
|
|
563
557
|
/* @__PURE__ */ jsx7(
|
|
@@ -578,7 +572,10 @@ function Select({
|
|
|
578
572
|
ChevronDown,
|
|
579
573
|
{
|
|
580
574
|
"aria-hidden": true,
|
|
581
|
-
className:
|
|
575
|
+
className: twMerge2(
|
|
576
|
+
"shrink-0 text-(--color-text-secondary)",
|
|
577
|
+
size === "sm" ? "h-3.5 w-3.5" : "h-4 w-4"
|
|
578
|
+
)
|
|
582
579
|
}
|
|
583
580
|
)
|
|
584
581
|
]
|
|
@@ -604,13 +601,16 @@ function Select({
|
|
|
604
601
|
id: item.id,
|
|
605
602
|
textValue: item.name,
|
|
606
603
|
className: twMerge2(
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
604
|
+
`
|
|
605
|
+
flex items-center justify-between gap-2
|
|
606
|
+
rounded-sm
|
|
607
|
+
text-(--color-text-primary)
|
|
608
|
+
cursor-pointer outline-none
|
|
609
|
+
hover:bg-(--color-surface-muted)
|
|
610
|
+
focus-visible:bg-(--color-surface-muted)
|
|
611
|
+
selected:text-(--color-action-primary) selected:font-medium
|
|
612
|
+
`,
|
|
613
|
+
sizeStyles[size]
|
|
614
614
|
),
|
|
615
615
|
children: ({ isSelected }) => /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
616
616
|
/* @__PURE__ */ jsx7("span", { className: "truncate", children: renderItem ? renderItem(item) : item.name }),
|