infinity-ui-elements 1.9.12 → 1.9.15
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/components/Button/Button.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +0 -14
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/TabItem/TabItem.d.ts +2 -2
- package/dist/components/TabItem/TabItem.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -4
- package/dist/components/Tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/index.css +2 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +34 -249
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +33 -250
- package/dist/index.js.map +1 -1
- package/package.json +4 -5
- package/dist/components/Chip/Chip.d.ts +0 -40
- package/dist/components/Chip/Chip.d.ts.map +0 -1
- package/dist/components/Chip/Chip.stories.d.ts +0 -12
- package/dist/components/Chip/Chip.stories.d.ts.map +0 -1
- package/dist/components/Chip/index.d.ts +0 -3
- package/dist/components/Chip/index.d.ts.map +0 -1
- package/dist/components/Table/DetailPanel.d.ts +0 -10
- package/dist/components/Table/DetailPanel.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -219,10 +219,10 @@ const buttonVariants = classVarianceAuthority.cva("items-center gap-3 justify-ce
|
|
|
219
219
|
white: "",
|
|
220
220
|
},
|
|
221
221
|
size: {
|
|
222
|
-
xsmall: "
|
|
223
|
-
small: "
|
|
224
|
-
medium: "
|
|
225
|
-
large: "
|
|
222
|
+
xsmall: "h-[28px] px-3 rounded-medium text-body-small-medium",
|
|
223
|
+
small: "h-[32px] px-4 rounded-medium text-body-small-medium",
|
|
224
|
+
medium: "h-[36px] px-5 py-2 rounded-large text-body-medium-medium",
|
|
225
|
+
large: "h-[44px] px-6 rounded-large text-body-large-medium",
|
|
226
226
|
},
|
|
227
227
|
isIconOnly: {
|
|
228
228
|
true: "aspect-square p-0",
|
|
@@ -519,7 +519,7 @@ const Button = React__namespace.forwardRef(({ className, variant = "primary", co
|
|
|
519
519
|
}
|
|
520
520
|
return `var(--color-action-ink-${color}-normal)`;
|
|
521
521
|
};
|
|
522
|
-
const buttonContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isLoading && !isIconOnly && (jsxRuntime.jsx(reactSpinners.PulseLoader, { color: getLoaderColor(), size: 10 })), isLoading && isIconOnly && (jsxRuntime.jsx(reactSpinners.ClipLoader, { color: getLoaderColor(), size: 20 })), !isLoading && leadingIcon && jsxRuntime.jsx("span", { children: leadingIcon }), !isIconOnly && !isLoading && children, isIconOnly && !isLoading && children, !isLoading && trailingIcon && jsxRuntime.jsx("span", { children: trailingIcon })] }));
|
|
522
|
+
const buttonContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isLoading && !isIconOnly && (jsxRuntime.jsx(reactSpinners.PulseLoader, { color: getLoaderColor(), size: 10 })), isLoading && isIconOnly && (jsxRuntime.jsx(reactSpinners.ClipLoader, { color: getLoaderColor(), size: 20 })), !isLoading && leadingIcon && (jsxRuntime.jsx("span", { className: "mr-2", children: leadingIcon })), !isIconOnly && !isLoading && children, isIconOnly && !isLoading && children, !isLoading && trailingIcon && jsxRuntime.jsx("span", { children: trailingIcon })] }));
|
|
523
523
|
return (jsxRuntime.jsx(Comp, { className: cn(buttonVariants({
|
|
524
524
|
variant,
|
|
525
525
|
color,
|
|
@@ -1676,175 +1676,6 @@ const Checkbox = React__namespace.forwardRef(({ label, errorText, size = "medium
|
|
|
1676
1676
|
});
|
|
1677
1677
|
Checkbox.displayName = "Checkbox";
|
|
1678
1678
|
|
|
1679
|
-
const chipVariants = classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-full border transition-colors focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none", {
|
|
1680
|
-
variants: {
|
|
1681
|
-
intent: {
|
|
1682
|
-
primary: "",
|
|
1683
|
-
positive: "",
|
|
1684
|
-
negative: "",
|
|
1685
|
-
},
|
|
1686
|
-
selection: {
|
|
1687
|
-
default: "",
|
|
1688
|
-
light: "",
|
|
1689
|
-
intense: "",
|
|
1690
|
-
},
|
|
1691
|
-
size: {
|
|
1692
|
-
xsmall: "h-[24px] px-3 gap-2 text-body-small-medium",
|
|
1693
|
-
small: "h-[28px] px-4 gap-2 text-body-medium-medium",
|
|
1694
|
-
medium: "h-[36px] px-5 gap-3 text-body-large-medium",
|
|
1695
|
-
large: "h-[44px] px-6 gap-3 text-heading-medium-medium",
|
|
1696
|
-
},
|
|
1697
|
-
isDisabled: {
|
|
1698
|
-
true: "cursor-not-allowed",
|
|
1699
|
-
false: "cursor-pointer",
|
|
1700
|
-
},
|
|
1701
|
-
},
|
|
1702
|
-
compoundVariants: [
|
|
1703
|
-
// Selection: default (neutral chip, intent influences focus ring/border)
|
|
1704
|
-
{
|
|
1705
|
-
selection: "default",
|
|
1706
|
-
class: `
|
|
1707
|
-
bg-surface-fill-neutral-intense
|
|
1708
|
-
text-action-ink-neutral-normal
|
|
1709
|
-
border-action-outline-neutral-faded
|
|
1710
|
-
hover:bg-action-fill-neutral-faded-hover
|
|
1711
|
-
hover:border-action-outline-neutral-faded-hover
|
|
1712
|
-
active:bg-action-fill-neutral-faded-activated
|
|
1713
|
-
active:border-action-outline-neutral-faded-activated
|
|
1714
|
-
disabled:bg-surface-fill-neutral-moderate
|
|
1715
|
-
disabled:text-surface-ink-neutral-disabled
|
|
1716
|
-
disabled:border-action-outline-neutral-disabled
|
|
1717
|
-
`,
|
|
1718
|
-
},
|
|
1719
|
-
{
|
|
1720
|
-
selection: "default",
|
|
1721
|
-
intent: "primary",
|
|
1722
|
-
class: "focus-visible:ring-action-outline-primary-faded-hover focus-visible:border-action-outline-primary-faded-hover",
|
|
1723
|
-
},
|
|
1724
|
-
{
|
|
1725
|
-
selection: "default",
|
|
1726
|
-
intent: "positive",
|
|
1727
|
-
class: "focus-visible:ring-action-outline-positive-faded-hover focus-visible:border-action-outline-positive-faded-hover",
|
|
1728
|
-
},
|
|
1729
|
-
{
|
|
1730
|
-
selection: "default",
|
|
1731
|
-
intent: "negative",
|
|
1732
|
-
class: "focus-visible:ring-action-outline-negative-faded-hover focus-visible:border-action-outline-negative-faded-hover",
|
|
1733
|
-
},
|
|
1734
|
-
// Selection: light
|
|
1735
|
-
{
|
|
1736
|
-
selection: "light",
|
|
1737
|
-
intent: "primary",
|
|
1738
|
-
class: `
|
|
1739
|
-
bg-action-fill-primary-faded
|
|
1740
|
-
text-action-ink-primary-normal
|
|
1741
|
-
border-action-outline-primary-faded
|
|
1742
|
-
hover:bg-action-fill-primary-faded-hover
|
|
1743
|
-
hover:border-action-outline-primary-faded-hover
|
|
1744
|
-
active:bg-action-fill-primary-faded-activated
|
|
1745
|
-
active:border-action-outline-primary-faded-activated
|
|
1746
|
-
focus-visible:ring-action-outline-primary-faded-hover
|
|
1747
|
-
disabled:bg-action-fill-primary-disabled
|
|
1748
|
-
disabled:text-action-ink-primary-disabled
|
|
1749
|
-
disabled:border-action-outline-primary-disabled
|
|
1750
|
-
`,
|
|
1751
|
-
},
|
|
1752
|
-
{
|
|
1753
|
-
selection: "light",
|
|
1754
|
-
intent: "positive",
|
|
1755
|
-
class: `
|
|
1756
|
-
bg-action-fill-positive-faded
|
|
1757
|
-
text-action-ink-positive-normal
|
|
1758
|
-
border-action-outline-positive-faded
|
|
1759
|
-
hover:bg-action-fill-positive-faded-hover
|
|
1760
|
-
hover:border-action-outline-positive-faded-hover
|
|
1761
|
-
active:bg-action-fill-positive-faded-activated
|
|
1762
|
-
active:border-action-outline-positive-faded-activated
|
|
1763
|
-
focus-visible:ring-action-outline-positive-faded-hover
|
|
1764
|
-
disabled:bg-action-fill-positive-disabled
|
|
1765
|
-
disabled:text-action-ink-positive-disabled
|
|
1766
|
-
disabled:border-action-outline-positive-disabled
|
|
1767
|
-
`,
|
|
1768
|
-
},
|
|
1769
|
-
{
|
|
1770
|
-
selection: "light",
|
|
1771
|
-
intent: "negative",
|
|
1772
|
-
class: `
|
|
1773
|
-
bg-action-fill-negative-faded
|
|
1774
|
-
text-action-ink-negative-normal
|
|
1775
|
-
border-action-outline-negative-faded
|
|
1776
|
-
hover:bg-action-fill-negative-faded-hover
|
|
1777
|
-
hover:border-action-outline-negative-faded-hover
|
|
1778
|
-
active:bg-action-fill-negative-faded-activated
|
|
1779
|
-
active:border-action-outline-negative-faded-activated
|
|
1780
|
-
focus-visible:ring-action-outline-negative-faded-hover
|
|
1781
|
-
disabled:bg-action-fill-negative-disabled
|
|
1782
|
-
disabled:text-action-ink-negative-disabled
|
|
1783
|
-
disabled:border-action-outline-negative-disabled
|
|
1784
|
-
`,
|
|
1785
|
-
},
|
|
1786
|
-
// Selection: intense
|
|
1787
|
-
{
|
|
1788
|
-
selection: "intense",
|
|
1789
|
-
intent: "primary",
|
|
1790
|
-
class: `
|
|
1791
|
-
bg-action-fill-primary-default
|
|
1792
|
-
text-action-ink-on-primary-normal
|
|
1793
|
-
border-transparent
|
|
1794
|
-
hover:bg-action-fill-primary-hover
|
|
1795
|
-
active:bg-action-fill-primary-activated
|
|
1796
|
-
focus-visible:ring-action-outline-primary-faded-hover
|
|
1797
|
-
disabled:bg-action-fill-primary-disabled
|
|
1798
|
-
disabled:text-action-ink-primary-disabled
|
|
1799
|
-
`,
|
|
1800
|
-
},
|
|
1801
|
-
{
|
|
1802
|
-
selection: "intense",
|
|
1803
|
-
intent: "positive",
|
|
1804
|
-
class: `
|
|
1805
|
-
bg-action-fill-positive-default
|
|
1806
|
-
text-action-ink-on-primary-normal
|
|
1807
|
-
border-transparent
|
|
1808
|
-
hover:bg-action-fill-positive-hover
|
|
1809
|
-
active:bg-action-fill-positive-activated
|
|
1810
|
-
focus-visible:ring-action-outline-positive-faded-hover
|
|
1811
|
-
disabled:bg-action-fill-positive-disabled
|
|
1812
|
-
disabled:text-action-ink-positive-disabled
|
|
1813
|
-
`,
|
|
1814
|
-
},
|
|
1815
|
-
{
|
|
1816
|
-
selection: "intense",
|
|
1817
|
-
intent: "negative",
|
|
1818
|
-
class: `
|
|
1819
|
-
bg-action-fill-negative-default
|
|
1820
|
-
text-action-ink-on-primary-normal
|
|
1821
|
-
border-transparent
|
|
1822
|
-
hover:bg-action-fill-negative-hover
|
|
1823
|
-
active:bg-action-fill-negative-activated
|
|
1824
|
-
focus-visible:ring-action-outline-negative-faded-hover
|
|
1825
|
-
disabled:bg-action-fill-negative-disabled
|
|
1826
|
-
disabled:text-action-ink-negative-disabled
|
|
1827
|
-
`,
|
|
1828
|
-
},
|
|
1829
|
-
],
|
|
1830
|
-
defaultVariants: {
|
|
1831
|
-
intent: "primary",
|
|
1832
|
-
selection: "default",
|
|
1833
|
-
size: "medium",
|
|
1834
|
-
isDisabled: false,
|
|
1835
|
-
},
|
|
1836
|
-
});
|
|
1837
|
-
const Chip = React__namespace.forwardRef(({ className, intent = "primary", selection = "default", size = "medium", isDisabled = false, leadingComponent, trailingComponent, disabled, children, type, ...props }, ref) => {
|
|
1838
|
-
const finalDisabled = Boolean(disabled || isDisabled);
|
|
1839
|
-
return (jsxRuntime.jsxs("button", { ref: ref, type: type ?? "button", disabled: finalDisabled, className: cn(chipVariants({
|
|
1840
|
-
intent,
|
|
1841
|
-
selection,
|
|
1842
|
-
size,
|
|
1843
|
-
isDisabled: finalDisabled,
|
|
1844
|
-
}), className), ...props, children: [leadingComponent && (jsxRuntime.jsx("span", { className: "inline-flex items-center", children: leadingComponent })), jsxRuntime.jsx("span", { className: "inline-flex items-center", children: children }), trailingComponent && (jsxRuntime.jsx("span", { className: "inline-flex items-center", children: trailingComponent }))] }));
|
|
1845
|
-
});
|
|
1846
|
-
Chip.displayName = "Chip";
|
|
1847
|
-
|
|
1848
1679
|
const counterVariants = classVarianceAuthority.cva("inline-flex items-center justify-center transition-colors", {
|
|
1849
1680
|
variants: {
|
|
1850
1681
|
size: {
|
|
@@ -2634,7 +2465,7 @@ const DatePicker = React__namespace.forwardRef(({ className, value: controlledVa
|
|
|
2634
2465
|
});
|
|
2635
2466
|
DatePicker.displayName = "DatePicker";
|
|
2636
2467
|
|
|
2637
|
-
const listItemVariants = classVarianceAuthority.cva("flex
|
|
2468
|
+
const listItemVariants = classVarianceAuthority.cva("flex items-start gap-3 p-3 rounded-medium transition-colors cursor-pointer", {
|
|
2638
2469
|
variants: {
|
|
2639
2470
|
variant: {
|
|
2640
2471
|
default: `hover:bg-action-fill-neutral-faded
|
|
@@ -2700,7 +2531,7 @@ const ListItem = React__namespace.forwardRef(({ className, type = "single", lead
|
|
|
2700
2531
|
variant,
|
|
2701
2532
|
isDisabled,
|
|
2702
2533
|
isSelected: type === "multiple" ? internalSelected : false,
|
|
2703
|
-
}),
|
|
2534
|
+
}), containerClassName), onClick: handleClick, role: type === "multiple" ? "checkbox" : "button", "aria-checked": type === "multiple" ? internalSelected : undefined, "aria-disabled": isDisabled, tabIndex: isDisabled ? -1 : 0, ...props, children: [type === "multiple" && (jsxRuntime.jsx(Checkbox, { checked: internalSelected, onChange: handleCheckboxChange, isDisabled: isDisabled, size: checkboxSize, className: "shrink-0 mt-0.5" })), leadingIcon && (jsxRuntime.jsx("div", { className: cn(`shrink-0 flex items-center justify-center mt-0.5`, variant === "primary"
|
|
2704
2535
|
? "text-action-ink-primary-normal"
|
|
2705
2536
|
: variant === "negative"
|
|
2706
2537
|
? "text-action-ink-negative-normal"
|
|
@@ -2835,7 +2666,7 @@ const formatMonthYear = (date) => {
|
|
|
2835
2666
|
year: "numeric",
|
|
2836
2667
|
});
|
|
2837
2668
|
};
|
|
2838
|
-
const DateRangePicker = React__namespace.forwardRef(({ className, value: controlledValue, defaultValue, onChange, placeholder = "Select date range", isDisabled = false, size = "medium",
|
|
2669
|
+
const DateRangePicker = React__namespace.forwardRef(({ className, value: controlledValue, defaultValue, onChange, placeholder = "Select date range", isDisabled = false, size = "medium", triggerClassName, calendarClassName, minDate, maxDate, formatDate = formatDateDefault, presets = defaultPresets, showPresets = true, selectedPresetLabel, ...props }, ref) => {
|
|
2839
2670
|
const [uncontrolledValue, setUncontrolledValue] = React__namespace.useState(defaultValue || { startDate: null, endDate: null });
|
|
2840
2671
|
const [tempValue, setTempValue] = React__namespace.useState(defaultValue || { startDate: null, endDate: null });
|
|
2841
2672
|
const [isOpen, setIsOpen] = React__namespace.useState(false);
|
|
@@ -3058,19 +2889,14 @@ const DateRangePicker = React__namespace.forwardRef(({ className, value: control
|
|
|
3058
2889
|
}
|
|
3059
2890
|
return placeholder;
|
|
3060
2891
|
};
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
? "text-surface-ink-neutral-disabled"
|
|
3070
|
-
: "text-surface-ink-neutral-muted") }), jsxRuntime.jsx("span", { className: cn("flex-1 text-left truncate", !hasValue && "text-surface-ink-neutral-muted", isDisabled && "text-surface-ink-neutral-disabled"), children: displayText }), jsxRuntime.jsx(Icon, { name: "chevronDown", size: 16, className: cn("shrink-0 transition-transform", isDisabled
|
|
3071
|
-
? "text-surface-ink-neutral-disabled"
|
|
3072
|
-
: "text-surface-ink-neutral-muted", isOpen && "rotate-180") })] }));
|
|
3073
|
-
return (jsxRuntime.jsxs("div", { ref: datePickerRef, className: cn("relative w-fit", className), children: [triggerElement, typeof document !== "undefined" &&
|
|
2892
|
+
return (jsxRuntime.jsxs("div", { ref: datePickerRef, className: cn("relative w-fit", className), children: [jsxRuntime.jsxs("div", { className: cn(dateRangePickerVariants({
|
|
2893
|
+
size,
|
|
2894
|
+
isDisabled,
|
|
2895
|
+
}), "cursor-pointer", triggerClassName), onClick: !isDisabled ? toggleOpen : undefined, role: "button", "aria-haspopup": "dialog", "aria-expanded": isOpen, "aria-disabled": isDisabled, ...props, children: [jsxRuntime.jsx(lucideReact.Calendar, { className: cn("shrink-0 w-4 h-4", isDisabled
|
|
2896
|
+
? "text-surface-ink-neutral-disabled"
|
|
2897
|
+
: "text-surface-ink-neutral-muted") }), jsxRuntime.jsx("span", { className: cn("flex-1 text-left truncate", !hasValue && "text-surface-ink-neutral-muted", isDisabled && "text-surface-ink-neutral-disabled"), children: getDisplayText() }), jsxRuntime.jsx(Icon, { name: "chevronDown", size: 16, className: cn("shrink-0 transition-transform", isDisabled
|
|
2898
|
+
? "text-surface-ink-neutral-disabled"
|
|
2899
|
+
: "text-surface-ink-neutral-muted", isOpen && "rotate-180") })] }), typeof document !== "undefined" &&
|
|
3074
2900
|
isOpen &&
|
|
3075
2901
|
!isDisabled &&
|
|
3076
2902
|
(() => {
|
|
@@ -3089,7 +2915,7 @@ const DateRangePicker = React__namespace.forwardRef(({ className, value: control
|
|
|
3089
2915
|
? `${window.innerHeight - position.bottom - gap - 10}px`
|
|
3090
2916
|
: `${position.top - gap - 10}px`,
|
|
3091
2917
|
overflowY: "auto",
|
|
3092
|
-
}, className: cn("bg-surface-fill-neutral-intense rounded-large shadow-lg border
|
|
2918
|
+
}, className: cn("bg-surface-fill-neutral-intense rounded-large shadow-lg border border-surface-outline-neutral-subtle", calendarClassName), onClick: (e) => e.stopPropagation(), children: jsxRuntime.jsxs("div", { className: "flex", children: [showPresets && presets.length > 0 && (jsxRuntime.jsx("div", { className: "w-48 border-r border-surface-outline-neutral-subtle p-4 flex flex-col", children: presets.map((preset) => (jsxRuntime.jsx(ListItem, { title: preset.label, type: "single", showChevron: false, isSelected: selectedPreset === preset.value, onClick: () => handlePresetClick(preset), containerClassName: "mb-1 last:mb-0" }, preset.value))) })), jsxRuntime.jsxs("div", { className: "p-4", children: [jsxRuntime.jsxs("div", { className: "flex gap-6", children: [jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [jsxRuntime.jsx("div", { className: "flex flex-col px-3", children: jsxRuntime.jsx("p", { className: "text-body-small-medium", children: "Start Date" }) }), jsxRuntime.jsxs("div", { className: "flex flex-col p-5 rounded-[8px] bg-surface-fill-neutral-moderate", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-3 px-3", children: [jsxRuntime.jsx("h3", { className: "text-body-small-medium font-medium text-surface-ink-neutral-normal", children: formatMonthYear(startMonth) }), jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("button", { onClick: handlePrevStartMonth, className: "p-1 hover:bg-surface-fill-neutral-faded rounded transition-colors", "aria-label": "Previous month", children: jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "w-4 h-4 text-surface-ink-neutral-normal" }) }), jsxRuntime.jsx("button", { onClick: handleNextStartMonth, className: "p-1 hover:bg-surface-fill-neutral-faded rounded transition-colors", "aria-label": "Next month", children: jsxRuntime.jsx(lucideReact.ChevronRight, { className: "w-4 h-4 text-surface-ink-neutral-normal" }) })] })] }), jsxRuntime.jsx("div", { className: "date-range-calendar-wrapper", children: jsxRuntime.jsx(Calendar, { onChange: handleStartDateChange, value: tempValue.startDate, minDate: minDateParsed ?? undefined, maxDate: tempValue.endDate
|
|
3093
2919
|
? tempValue.endDate
|
|
3094
2920
|
: maxDateParsed ?? undefined, activeStartDate: startMonth, onActiveStartDateChange: ({ activeStartDate, }) => {
|
|
3095
2921
|
if (activeStartDate)
|
|
@@ -3121,15 +2947,15 @@ const DateRangePicker = React__namespace.forwardRef(({ className, value: control
|
|
|
3121
2947
|
"SAT",
|
|
3122
2948
|
];
|
|
3123
2949
|
return weekdayNames[date.getDay()];
|
|
3124
|
-
} }) })] })] })] })
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
2950
|
+
} }) })] })] })] }), jsxRuntime.jsxs("div", { className: "mt-4 pt-4 border-t border-surface-outline-neutral-subtle flex items-center justify-between", children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("div", { className: "w-2 h-2 rounded-full bg-action-fill-primary-default" }), jsxRuntime.jsx("span", { className: "text-sm text-surface-ink-neutral-normal", children: tempValue.startDate && tempValue.endDate
|
|
2951
|
+
? isSameDay(tempValue.startDate, tempValue.endDate)
|
|
2952
|
+
? "Today"
|
|
2953
|
+
: `${formatDate(tempValue.startDate)} - ${formatDate(tempValue.endDate)}`
|
|
2954
|
+
: tempValue.startDate
|
|
2955
|
+
? `From ${formatDate(tempValue.startDate)}`
|
|
2956
|
+
: tempValue.endDate
|
|
2957
|
+
? `Until ${formatDate(tempValue.endDate)}`
|
|
2958
|
+
: "No selection" })] }), jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx(Button, { variant: "secondary", color: "neutral", size: "small", onClick: handleCancel, children: "Cancel" }), jsxRuntime.jsx(Button, { variant: "primary", color: "primary", size: "small", onClick: handleApply, children: "Apply date range" })] })] })] })] }) }));
|
|
3133
2959
|
return reactDom.createPortal(calendarPopup, document.body);
|
|
3134
2960
|
})()] }));
|
|
3135
2961
|
});
|
|
@@ -3450,7 +3276,7 @@ const Modal = React__namespace.forwardRef(({ isOpen, onClose, title, description
|
|
|
3450
3276
|
if (!isOpen)
|
|
3451
3277
|
return null;
|
|
3452
3278
|
const hasHeader = title || description;
|
|
3453
|
-
return (jsxRuntime.jsxs("div", { className: cn("fixed inset-0 z-9999 flex items-center justify-center p-4", className), role: "dialog", "aria-modal": "true", "aria-label": ariaLabel || title, "aria-describedby": ariaDescribedBy, children: [jsxRuntime.jsx("div", { className: cn("absolute inset-0 z-0 bg-black/50 backdrop-blur-sm transition-opacity", overlayClassName), onClick: handleOverlayClick, "aria-hidden": "true" }), jsxRuntime.jsxs("div", { ref: contentRef, className: cn("relative transition-all z-10", "flex flex-col max-h-[90vh]", variant === "default" && "w-full bg-white rounded-large shadow-xl", variant === "default" && sizeConfig[size], contentClassName), children: [hasHeader && (jsxRuntime.jsxs("div", { className: cn("flex items-start justify-between gap-4 px-6 pt-6", !description && "pb-4", description && "pb-2", headerClassName), children: [jsxRuntime.jsxs("div", { className: "flex-1", children: [title && (jsxRuntime.jsx(Text, { as: "h2", variant: "body", size: "large", weight: "semibold", color: "default", children: title })), description && (jsxRuntime.jsx(Text, { as: "p", variant: "body", size: "small", weight: "regular", color: "subtle", className: "mt-1", children: description }))] }), showCloseButton && onClose && (jsxRuntime.jsx(IconButton, { icon: "close", onClick: onClose, color: "neutral", size: "small", "aria-label": "Close modal", className: "shrink-0" }))] })), !hasHeader && showCloseButton && onClose && (jsxRuntime.jsx("div", { className: "absolute top-4 right-4
|
|
3279
|
+
return (jsxRuntime.jsxs("div", { className: cn("fixed inset-0 z-9999 flex items-center justify-center p-4", className), role: "dialog", "aria-modal": "true", "aria-label": ariaLabel || title, "aria-describedby": ariaDescribedBy, children: [jsxRuntime.jsx("div", { className: cn("absolute inset-0 z-0 bg-black/50 backdrop-blur-sm transition-opacity", overlayClassName), onClick: handleOverlayClick, "aria-hidden": "true" }), jsxRuntime.jsxs("div", { ref: contentRef, className: cn("relative transition-all z-10", "flex flex-col max-h-[90vh]", variant === "default" && "w-full bg-white rounded-large shadow-xl", variant === "default" && sizeConfig[size], contentClassName), children: [hasHeader && (jsxRuntime.jsxs("div", { className: cn("flex items-start justify-between gap-4", variant === "default" && "px-6 pt-6", variant === "default" && !description && "pb-4", variant === "default" && description && "pb-2", headerClassName), children: [jsxRuntime.jsxs("div", { className: "flex-1", children: [title && (jsxRuntime.jsx(Text, { as: "h2", variant: "body", size: "large", weight: "semibold", color: "default", children: title })), description && (jsxRuntime.jsx(Text, { as: "p", variant: "body", size: "small", weight: "regular", color: "subtle", className: "mt-1", children: description }))] }), showCloseButton && onClose && (jsxRuntime.jsx(IconButton, { icon: "close", onClick: onClose, color: "neutral", size: "small", "aria-label": "Close modal", className: "shrink-0" }))] })), !hasHeader && showCloseButton && onClose && (jsxRuntime.jsx("div", { className: cn("absolute z-10", variant === "default" && "top-4 right-4"), children: jsxRuntime.jsx(IconButton, { icon: "close", onClick: onClose, color: "neutral", size: "small", "aria-label": "Close modal" }) })), jsxRuntime.jsx("div", { className: cn("flex-1 overflow-y-auto", variant === "default" && "px-6", variant === "default" && hasHeader && "py-4", variant === "default" && !hasHeader && "pt-6 pb-4", variant === "default" && !footer && "pb-6", bodyClassName), children: children }), footer && (jsxRuntime.jsxs("div", { className: "flex flex-col", children: [variant === "default" && (jsxRuntime.jsx(Divider, { thickness: "thin", variant: "muted" })), jsxRuntime.jsx("div", { className: cn("flex items-center justify-end gap-3", variant === "default" && "px-6 py-4", footerClassName), children: footer })] }))] })] }));
|
|
3454
3280
|
});
|
|
3455
3281
|
Modal.displayName = "Modal";
|
|
3456
3282
|
|
|
@@ -4809,7 +4635,7 @@ const switchVariants = classVarianceAuthority.cva("relative inline-flex items-ce
|
|
|
4809
4635
|
false: "",
|
|
4810
4636
|
},
|
|
4811
4637
|
isDisabled: {
|
|
4812
|
-
true: "cursor-not-allowed
|
|
4638
|
+
true: "cursor-not-allowed opacity-60",
|
|
4813
4639
|
false: "",
|
|
4814
4640
|
},
|
|
4815
4641
|
isFocused: {
|
|
@@ -5245,12 +5071,11 @@ function AvatarCell({ name, initials, avatar, subtitle, color = "a1", className,
|
|
|
5245
5071
|
return (jsxRuntime.jsxs("div", { className: cn("flex items-center gap-3", className), children: [avatar ? (jsxRuntime.jsx("img", { src: avatar, alt: name, className: "w-10 h-10 rounded-full object-cover" })) : (jsxRuntime.jsx("div", { className: cn("w-10 h-10 rounded-full flex items-center justify-center text-body-medium-medium", `bg-${color}`), children: initials || name.charAt(0).toUpperCase() })), jsxRuntime.jsxs("div", { className: "flex flex-col", children: [jsxRuntime.jsx("div", { className: "text-body-medium-medium text-surface-ink-neutral-normal", children: name }), subtitle && (jsxRuntime.jsx("div", { className: "text-body-small-regular text-surface-ink-neutral-muted", children: subtitle }))] })] }));
|
|
5246
5072
|
}
|
|
5247
5073
|
|
|
5248
|
-
const tabItemVariants = classVarianceAuthority.cva(`inline-flex items-center justify-center gap-3 whitespace-nowrap transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 relative cursor-pointer`, {
|
|
5074
|
+
const tabItemVariants = classVarianceAuthority.cva(`inline-flex items-center justify-center gap-3 whitespace-nowrap transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 relative cursor-pointer -mb-[1.5px]`, {
|
|
5249
5075
|
variants: {
|
|
5250
5076
|
variant: {
|
|
5251
|
-
bordered: "border-b-[1.5px]
|
|
5252
|
-
borderless: "border-b-[1.5px]
|
|
5253
|
-
segmented: "rounded-lg",
|
|
5077
|
+
bordered: "border-b-[1.5px]",
|
|
5078
|
+
borderless: "border-b-[1.5px]",
|
|
5254
5079
|
},
|
|
5255
5080
|
size: {
|
|
5256
5081
|
small: "px-2 py-3 h-9",
|
|
@@ -5323,44 +5148,6 @@ const tabItemVariants = classVarianceAuthority.cva(`inline-flex items-center jus
|
|
|
5323
5148
|
isDisabled: true,
|
|
5324
5149
|
class: "text-text-body-disabled border-b-transparent",
|
|
5325
5150
|
},
|
|
5326
|
-
// Segmented variant - not selected
|
|
5327
|
-
{
|
|
5328
|
-
variant: "segmented",
|
|
5329
|
-
isSelected: false,
|
|
5330
|
-
isDisabled: false,
|
|
5331
|
-
class: `text-action-ink-neutral-muted
|
|
5332
|
-
hover:text-action-ink-neutral-subtle
|
|
5333
|
-
hover:bg-action-fill-neutral-faded-hover`,
|
|
5334
|
-
},
|
|
5335
|
-
// Segmented variant - selected
|
|
5336
|
-
{
|
|
5337
|
-
variant: "segmented",
|
|
5338
|
-
isSelected: true,
|
|
5339
|
-
isDisabled: false,
|
|
5340
|
-
class: "bg-action-fill-primary-faded text-action-ink-primary-subtle hover:text-action-ink-primary-normal",
|
|
5341
|
-
},
|
|
5342
|
-
// Segmented variant - disabled
|
|
5343
|
-
{
|
|
5344
|
-
variant: "segmented",
|
|
5345
|
-
isDisabled: true,
|
|
5346
|
-
class: "text-text-body-disabled bg-transparent",
|
|
5347
|
-
},
|
|
5348
|
-
// Segmented variant - size overrides (more compact)
|
|
5349
|
-
{
|
|
5350
|
-
variant: "segmented",
|
|
5351
|
-
size: "small",
|
|
5352
|
-
class: "px-3 py-1.5 h-8",
|
|
5353
|
-
},
|
|
5354
|
-
{
|
|
5355
|
-
variant: "segmented",
|
|
5356
|
-
size: "medium",
|
|
5357
|
-
class: "px-4 py-2 h-9",
|
|
5358
|
-
},
|
|
5359
|
-
{
|
|
5360
|
-
variant: "segmented",
|
|
5361
|
-
size: "large",
|
|
5362
|
-
class: "px-4 py-2.5 h-10",
|
|
5363
|
-
},
|
|
5364
5151
|
],
|
|
5365
5152
|
defaultVariants: {
|
|
5366
5153
|
variant: "bordered",
|
|
@@ -5396,11 +5183,9 @@ const Tabs = React__namespace.forwardRef(({ tabs, selectedTabId, defaultSelected
|
|
|
5396
5183
|
};
|
|
5397
5184
|
// Get the active tab content
|
|
5398
5185
|
const activeTab = tabs.find((tab) => tab.id === activeTabId);
|
|
5399
|
-
return (jsxRuntime.jsxs("div", { ref: ref, className: cn("w-full", className), ...props, children: [jsxRuntime.jsx("div", { role: "tablist", className: cn("inline-flex items-center", {
|
|
5186
|
+
return (jsxRuntime.jsxs("div", { ref: ref, className: cn("w-full", className), ...props, children: [jsxRuntime.jsx("div", { role: "tablist", className: cn("inline-flex items-center gap-4", {
|
|
5400
5187
|
"w-full": isFullWidth,
|
|
5401
|
-
"
|
|
5402
|
-
"border-b-[1.5px] border-surface-outline-neutral-muted": variant === "bordered",
|
|
5403
|
-
"gap-1 p-1 rounded-xl bg-surface-background-neutral-faded-default": variant === "segmented",
|
|
5188
|
+
"border-b border-b-[1.5px] border-surface-outline-neutral-muted": variant === "bordered",
|
|
5404
5189
|
}, tabListClassName), children: tabs.map((tab) => (jsxRuntime.jsx(TabItem, { id: String(tab.id), leadingComponent: tab.leadingComponent, title: tab.title, trailingComponent: tab.trailingComponent, isSelected: tab.id === activeTabId, isDisabled: tab.isDisabled, variant: variant, size: size, isFullWidth: isFullWidth, onClick: () => !tab.isDisabled && handleTabClick(tab.id) }, tab.id))) }), renderContent && activeTab?.content && (jsxRuntime.jsx("div", { role: "tabpanel", className: cn("mt-4", contentClassName), "aria-labelledby": String(activeTabId), children: activeTab.content }))] }));
|
|
5405
5190
|
});
|
|
5406
5191
|
Tabs.displayName = "Tabs";
|
|
@@ -6192,7 +5977,6 @@ exports.Badge = Badge;
|
|
|
6192
5977
|
exports.Button = Button;
|
|
6193
5978
|
exports.ButtonGroup = ButtonGroup;
|
|
6194
5979
|
exports.Checkbox = Checkbox;
|
|
6195
|
-
exports.Chip = Chip;
|
|
6196
5980
|
exports.Counter = Counter;
|
|
6197
5981
|
exports.DatePicker = DatePicker;
|
|
6198
5982
|
exports.DateRangePicker = DateRangePicker;
|
|
@@ -6236,7 +6020,6 @@ exports.badgeVariants = badgeVariants;
|
|
|
6236
6020
|
exports.buttonGroupVariants = buttonGroupVariants;
|
|
6237
6021
|
exports.buttonVariants = buttonVariants;
|
|
6238
6022
|
exports.checkboxVariants = checkboxVariants;
|
|
6239
|
-
exports.chipVariants = chipVariants;
|
|
6240
6023
|
exports.cn = cn;
|
|
6241
6024
|
exports.counterVariants = counterVariants;
|
|
6242
6025
|
exports.datePickerVariants = datePickerVariants;
|