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.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export * from "./components/Badge";
|
|
|
5
5
|
export * from "./components/Button";
|
|
6
6
|
export * from "./components/ButtonGroup";
|
|
7
7
|
export * from "./components/Checkbox";
|
|
8
|
-
export * from "./components/Chip";
|
|
9
8
|
export * from "./components/Counter";
|
|
10
9
|
export * from "./components/DatePicker";
|
|
11
10
|
export * from "./components/DateRangePicker";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AAGvC,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,IAAI,EACJ,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,gBAAgB,GACtB,MAAM,aAAa,CAAC"}
|
package/dist/index.esm.js
CHANGED
|
@@ -198,10 +198,10 @@ const buttonVariants = cva("items-center gap-3 justify-center whitespace-nowrap
|
|
|
198
198
|
white: "",
|
|
199
199
|
},
|
|
200
200
|
size: {
|
|
201
|
-
xsmall: "
|
|
202
|
-
small: "
|
|
203
|
-
medium: "
|
|
204
|
-
large: "
|
|
201
|
+
xsmall: "h-[28px] px-3 rounded-medium text-body-small-medium",
|
|
202
|
+
small: "h-[32px] px-4 rounded-medium text-body-small-medium",
|
|
203
|
+
medium: "h-[36px] px-5 py-2 rounded-large text-body-medium-medium",
|
|
204
|
+
large: "h-[44px] px-6 rounded-large text-body-large-medium",
|
|
205
205
|
},
|
|
206
206
|
isIconOnly: {
|
|
207
207
|
true: "aspect-square p-0",
|
|
@@ -498,7 +498,7 @@ const Button = React.forwardRef(({ className, variant = "primary", color = "prim
|
|
|
498
498
|
}
|
|
499
499
|
return `var(--color-action-ink-${color}-normal)`;
|
|
500
500
|
};
|
|
501
|
-
const buttonContent = (jsxs(Fragment, { children: [isLoading && !isIconOnly && (jsx(PulseLoader, { color: getLoaderColor(), size: 10 })), isLoading && isIconOnly && (jsx(ClipLoader, { color: getLoaderColor(), size: 20 })), !isLoading && leadingIcon && jsx("span", { children: leadingIcon }), !isIconOnly && !isLoading && children, isIconOnly && !isLoading && children, !isLoading && trailingIcon && jsx("span", { children: trailingIcon })] }));
|
|
501
|
+
const buttonContent = (jsxs(Fragment, { children: [isLoading && !isIconOnly && (jsx(PulseLoader, { color: getLoaderColor(), size: 10 })), isLoading && isIconOnly && (jsx(ClipLoader, { color: getLoaderColor(), size: 20 })), !isLoading && leadingIcon && (jsx("span", { className: "mr-2", children: leadingIcon })), !isIconOnly && !isLoading && children, isIconOnly && !isLoading && children, !isLoading && trailingIcon && jsx("span", { children: trailingIcon })] }));
|
|
502
502
|
return (jsx(Comp, { className: cn(buttonVariants({
|
|
503
503
|
variant,
|
|
504
504
|
color,
|
|
@@ -1655,175 +1655,6 @@ const Checkbox = React.forwardRef(({ label, errorText, size = "medium", validati
|
|
|
1655
1655
|
});
|
|
1656
1656
|
Checkbox.displayName = "Checkbox";
|
|
1657
1657
|
|
|
1658
|
-
const chipVariants = 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", {
|
|
1659
|
-
variants: {
|
|
1660
|
-
intent: {
|
|
1661
|
-
primary: "",
|
|
1662
|
-
positive: "",
|
|
1663
|
-
negative: "",
|
|
1664
|
-
},
|
|
1665
|
-
selection: {
|
|
1666
|
-
default: "",
|
|
1667
|
-
light: "",
|
|
1668
|
-
intense: "",
|
|
1669
|
-
},
|
|
1670
|
-
size: {
|
|
1671
|
-
xsmall: "h-[24px] px-3 gap-2 text-body-small-medium",
|
|
1672
|
-
small: "h-[28px] px-4 gap-2 text-body-medium-medium",
|
|
1673
|
-
medium: "h-[36px] px-5 gap-3 text-body-large-medium",
|
|
1674
|
-
large: "h-[44px] px-6 gap-3 text-heading-medium-medium",
|
|
1675
|
-
},
|
|
1676
|
-
isDisabled: {
|
|
1677
|
-
true: "cursor-not-allowed",
|
|
1678
|
-
false: "cursor-pointer",
|
|
1679
|
-
},
|
|
1680
|
-
},
|
|
1681
|
-
compoundVariants: [
|
|
1682
|
-
// Selection: default (neutral chip, intent influences focus ring/border)
|
|
1683
|
-
{
|
|
1684
|
-
selection: "default",
|
|
1685
|
-
class: `
|
|
1686
|
-
bg-surface-fill-neutral-intense
|
|
1687
|
-
text-action-ink-neutral-normal
|
|
1688
|
-
border-action-outline-neutral-faded
|
|
1689
|
-
hover:bg-action-fill-neutral-faded-hover
|
|
1690
|
-
hover:border-action-outline-neutral-faded-hover
|
|
1691
|
-
active:bg-action-fill-neutral-faded-activated
|
|
1692
|
-
active:border-action-outline-neutral-faded-activated
|
|
1693
|
-
disabled:bg-surface-fill-neutral-moderate
|
|
1694
|
-
disabled:text-surface-ink-neutral-disabled
|
|
1695
|
-
disabled:border-action-outline-neutral-disabled
|
|
1696
|
-
`,
|
|
1697
|
-
},
|
|
1698
|
-
{
|
|
1699
|
-
selection: "default",
|
|
1700
|
-
intent: "primary",
|
|
1701
|
-
class: "focus-visible:ring-action-outline-primary-faded-hover focus-visible:border-action-outline-primary-faded-hover",
|
|
1702
|
-
},
|
|
1703
|
-
{
|
|
1704
|
-
selection: "default",
|
|
1705
|
-
intent: "positive",
|
|
1706
|
-
class: "focus-visible:ring-action-outline-positive-faded-hover focus-visible:border-action-outline-positive-faded-hover",
|
|
1707
|
-
},
|
|
1708
|
-
{
|
|
1709
|
-
selection: "default",
|
|
1710
|
-
intent: "negative",
|
|
1711
|
-
class: "focus-visible:ring-action-outline-negative-faded-hover focus-visible:border-action-outline-negative-faded-hover",
|
|
1712
|
-
},
|
|
1713
|
-
// Selection: light
|
|
1714
|
-
{
|
|
1715
|
-
selection: "light",
|
|
1716
|
-
intent: "primary",
|
|
1717
|
-
class: `
|
|
1718
|
-
bg-action-fill-primary-faded
|
|
1719
|
-
text-action-ink-primary-normal
|
|
1720
|
-
border-action-outline-primary-faded
|
|
1721
|
-
hover:bg-action-fill-primary-faded-hover
|
|
1722
|
-
hover:border-action-outline-primary-faded-hover
|
|
1723
|
-
active:bg-action-fill-primary-faded-activated
|
|
1724
|
-
active:border-action-outline-primary-faded-activated
|
|
1725
|
-
focus-visible:ring-action-outline-primary-faded-hover
|
|
1726
|
-
disabled:bg-action-fill-primary-disabled
|
|
1727
|
-
disabled:text-action-ink-primary-disabled
|
|
1728
|
-
disabled:border-action-outline-primary-disabled
|
|
1729
|
-
`,
|
|
1730
|
-
},
|
|
1731
|
-
{
|
|
1732
|
-
selection: "light",
|
|
1733
|
-
intent: "positive",
|
|
1734
|
-
class: `
|
|
1735
|
-
bg-action-fill-positive-faded
|
|
1736
|
-
text-action-ink-positive-normal
|
|
1737
|
-
border-action-outline-positive-faded
|
|
1738
|
-
hover:bg-action-fill-positive-faded-hover
|
|
1739
|
-
hover:border-action-outline-positive-faded-hover
|
|
1740
|
-
active:bg-action-fill-positive-faded-activated
|
|
1741
|
-
active:border-action-outline-positive-faded-activated
|
|
1742
|
-
focus-visible:ring-action-outline-positive-faded-hover
|
|
1743
|
-
disabled:bg-action-fill-positive-disabled
|
|
1744
|
-
disabled:text-action-ink-positive-disabled
|
|
1745
|
-
disabled:border-action-outline-positive-disabled
|
|
1746
|
-
`,
|
|
1747
|
-
},
|
|
1748
|
-
{
|
|
1749
|
-
selection: "light",
|
|
1750
|
-
intent: "negative",
|
|
1751
|
-
class: `
|
|
1752
|
-
bg-action-fill-negative-faded
|
|
1753
|
-
text-action-ink-negative-normal
|
|
1754
|
-
border-action-outline-negative-faded
|
|
1755
|
-
hover:bg-action-fill-negative-faded-hover
|
|
1756
|
-
hover:border-action-outline-negative-faded-hover
|
|
1757
|
-
active:bg-action-fill-negative-faded-activated
|
|
1758
|
-
active:border-action-outline-negative-faded-activated
|
|
1759
|
-
focus-visible:ring-action-outline-negative-faded-hover
|
|
1760
|
-
disabled:bg-action-fill-negative-disabled
|
|
1761
|
-
disabled:text-action-ink-negative-disabled
|
|
1762
|
-
disabled:border-action-outline-negative-disabled
|
|
1763
|
-
`,
|
|
1764
|
-
},
|
|
1765
|
-
// Selection: intense
|
|
1766
|
-
{
|
|
1767
|
-
selection: "intense",
|
|
1768
|
-
intent: "primary",
|
|
1769
|
-
class: `
|
|
1770
|
-
bg-action-fill-primary-default
|
|
1771
|
-
text-action-ink-on-primary-normal
|
|
1772
|
-
border-transparent
|
|
1773
|
-
hover:bg-action-fill-primary-hover
|
|
1774
|
-
active:bg-action-fill-primary-activated
|
|
1775
|
-
focus-visible:ring-action-outline-primary-faded-hover
|
|
1776
|
-
disabled:bg-action-fill-primary-disabled
|
|
1777
|
-
disabled:text-action-ink-primary-disabled
|
|
1778
|
-
`,
|
|
1779
|
-
},
|
|
1780
|
-
{
|
|
1781
|
-
selection: "intense",
|
|
1782
|
-
intent: "positive",
|
|
1783
|
-
class: `
|
|
1784
|
-
bg-action-fill-positive-default
|
|
1785
|
-
text-action-ink-on-primary-normal
|
|
1786
|
-
border-transparent
|
|
1787
|
-
hover:bg-action-fill-positive-hover
|
|
1788
|
-
active:bg-action-fill-positive-activated
|
|
1789
|
-
focus-visible:ring-action-outline-positive-faded-hover
|
|
1790
|
-
disabled:bg-action-fill-positive-disabled
|
|
1791
|
-
disabled:text-action-ink-positive-disabled
|
|
1792
|
-
`,
|
|
1793
|
-
},
|
|
1794
|
-
{
|
|
1795
|
-
selection: "intense",
|
|
1796
|
-
intent: "negative",
|
|
1797
|
-
class: `
|
|
1798
|
-
bg-action-fill-negative-default
|
|
1799
|
-
text-action-ink-on-primary-normal
|
|
1800
|
-
border-transparent
|
|
1801
|
-
hover:bg-action-fill-negative-hover
|
|
1802
|
-
active:bg-action-fill-negative-activated
|
|
1803
|
-
focus-visible:ring-action-outline-negative-faded-hover
|
|
1804
|
-
disabled:bg-action-fill-negative-disabled
|
|
1805
|
-
disabled:text-action-ink-negative-disabled
|
|
1806
|
-
`,
|
|
1807
|
-
},
|
|
1808
|
-
],
|
|
1809
|
-
defaultVariants: {
|
|
1810
|
-
intent: "primary",
|
|
1811
|
-
selection: "default",
|
|
1812
|
-
size: "medium",
|
|
1813
|
-
isDisabled: false,
|
|
1814
|
-
},
|
|
1815
|
-
});
|
|
1816
|
-
const Chip = React.forwardRef(({ className, intent = "primary", selection = "default", size = "medium", isDisabled = false, leadingComponent, trailingComponent, disabled, children, type, ...props }, ref) => {
|
|
1817
|
-
const finalDisabled = Boolean(disabled || isDisabled);
|
|
1818
|
-
return (jsxs("button", { ref: ref, type: type ?? "button", disabled: finalDisabled, className: cn(chipVariants({
|
|
1819
|
-
intent,
|
|
1820
|
-
selection,
|
|
1821
|
-
size,
|
|
1822
|
-
isDisabled: finalDisabled,
|
|
1823
|
-
}), className), ...props, children: [leadingComponent && (jsx("span", { className: "inline-flex items-center", children: leadingComponent })), jsx("span", { className: "inline-flex items-center", children: children }), trailingComponent && (jsx("span", { className: "inline-flex items-center", children: trailingComponent }))] }));
|
|
1824
|
-
});
|
|
1825
|
-
Chip.displayName = "Chip";
|
|
1826
|
-
|
|
1827
1658
|
const counterVariants = cva("inline-flex items-center justify-center transition-colors", {
|
|
1828
1659
|
variants: {
|
|
1829
1660
|
size: {
|
|
@@ -2613,7 +2444,7 @@ const DatePicker = React.forwardRef(({ className, value: controlledValue, defaul
|
|
|
2613
2444
|
});
|
|
2614
2445
|
DatePicker.displayName = "DatePicker";
|
|
2615
2446
|
|
|
2616
|
-
const listItemVariants = cva("flex
|
|
2447
|
+
const listItemVariants = cva("flex items-start gap-3 p-3 rounded-medium transition-colors cursor-pointer", {
|
|
2617
2448
|
variants: {
|
|
2618
2449
|
variant: {
|
|
2619
2450
|
default: `hover:bg-action-fill-neutral-faded
|
|
@@ -2679,7 +2510,7 @@ const ListItem = React.forwardRef(({ className, type = "single", leadingIcon, ti
|
|
|
2679
2510
|
variant,
|
|
2680
2511
|
isDisabled,
|
|
2681
2512
|
isSelected: type === "multiple" ? internalSelected : false,
|
|
2682
|
-
}),
|
|
2513
|
+
}), 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" && (jsx(Checkbox, { checked: internalSelected, onChange: handleCheckboxChange, isDisabled: isDisabled, size: checkboxSize, className: "shrink-0 mt-0.5" })), leadingIcon && (jsx("div", { className: cn(`shrink-0 flex items-center justify-center mt-0.5`, variant === "primary"
|
|
2683
2514
|
? "text-action-ink-primary-normal"
|
|
2684
2515
|
: variant === "negative"
|
|
2685
2516
|
? "text-action-ink-negative-normal"
|
|
@@ -2814,7 +2645,7 @@ const formatMonthYear = (date) => {
|
|
|
2814
2645
|
year: "numeric",
|
|
2815
2646
|
});
|
|
2816
2647
|
};
|
|
2817
|
-
const DateRangePicker = React.forwardRef(({ className, value: controlledValue, defaultValue, onChange, placeholder = "Select date range", isDisabled = false, size = "medium",
|
|
2648
|
+
const DateRangePicker = React.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) => {
|
|
2818
2649
|
const [uncontrolledValue, setUncontrolledValue] = React.useState(defaultValue || { startDate: null, endDate: null });
|
|
2819
2650
|
const [tempValue, setTempValue] = React.useState(defaultValue || { startDate: null, endDate: null });
|
|
2820
2651
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
@@ -3037,19 +2868,14 @@ const DateRangePicker = React.forwardRef(({ className, value: controlledValue, d
|
|
|
3037
2868
|
}
|
|
3038
2869
|
return placeholder;
|
|
3039
2870
|
};
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
? "text-surface-ink-neutral-disabled"
|
|
3049
|
-
: "text-surface-ink-neutral-muted") }), jsx("span", { className: cn("flex-1 text-left truncate", !hasValue && "text-surface-ink-neutral-muted", isDisabled && "text-surface-ink-neutral-disabled"), children: displayText }), jsx(Icon, { name: "chevronDown", size: 16, className: cn("shrink-0 transition-transform", isDisabled
|
|
3050
|
-
? "text-surface-ink-neutral-disabled"
|
|
3051
|
-
: "text-surface-ink-neutral-muted", isOpen && "rotate-180") })] }));
|
|
3052
|
-
return (jsxs("div", { ref: datePickerRef, className: cn("relative w-fit", className), children: [triggerElement, typeof document !== "undefined" &&
|
|
2871
|
+
return (jsxs("div", { ref: datePickerRef, className: cn("relative w-fit", className), children: [jsxs("div", { className: cn(dateRangePickerVariants({
|
|
2872
|
+
size,
|
|
2873
|
+
isDisabled,
|
|
2874
|
+
}), "cursor-pointer", triggerClassName), onClick: !isDisabled ? toggleOpen : undefined, role: "button", "aria-haspopup": "dialog", "aria-expanded": isOpen, "aria-disabled": isDisabled, ...props, children: [jsx(Calendar, { className: cn("shrink-0 w-4 h-4", isDisabled
|
|
2875
|
+
? "text-surface-ink-neutral-disabled"
|
|
2876
|
+
: "text-surface-ink-neutral-muted") }), jsx("span", { className: cn("flex-1 text-left truncate", !hasValue && "text-surface-ink-neutral-muted", isDisabled && "text-surface-ink-neutral-disabled"), children: getDisplayText() }), jsx(Icon, { name: "chevronDown", size: 16, className: cn("shrink-0 transition-transform", isDisabled
|
|
2877
|
+
? "text-surface-ink-neutral-disabled"
|
|
2878
|
+
: "text-surface-ink-neutral-muted", isOpen && "rotate-180") })] }), typeof document !== "undefined" &&
|
|
3053
2879
|
isOpen &&
|
|
3054
2880
|
!isDisabled &&
|
|
3055
2881
|
(() => {
|
|
@@ -3068,7 +2894,7 @@ const DateRangePicker = React.forwardRef(({ className, value: controlledValue, d
|
|
|
3068
2894
|
? `${window.innerHeight - position.bottom - gap - 10}px`
|
|
3069
2895
|
: `${position.top - gap - 10}px`,
|
|
3070
2896
|
overflowY: "auto",
|
|
3071
|
-
}, className: cn("bg-surface-fill-neutral-intense rounded-large shadow-lg border
|
|
2897
|
+
}, className: cn("bg-surface-fill-neutral-intense rounded-large shadow-lg border border-surface-outline-neutral-subtle", calendarClassName), onClick: (e) => e.stopPropagation(), children: jsxs("div", { className: "flex", children: [showPresets && presets.length > 0 && (jsx("div", { className: "w-48 border-r border-surface-outline-neutral-subtle p-4 flex flex-col", children: presets.map((preset) => (jsx(ListItem, { title: preset.label, type: "single", showChevron: false, isSelected: selectedPreset === preset.value, onClick: () => handlePresetClick(preset), containerClassName: "mb-1 last:mb-0" }, preset.value))) })), jsxs("div", { className: "p-4", children: [jsxs("div", { className: "flex gap-6", children: [jsxs("div", { className: "flex flex-col gap-3", children: [jsx("div", { className: "flex flex-col px-3", children: jsx("p", { className: "text-body-small-medium", children: "Start Date" }) }), jsxs("div", { className: "flex flex-col p-5 rounded-[8px] bg-surface-fill-neutral-moderate", children: [jsxs("div", { className: "flex items-center justify-between mb-3 px-3", children: [jsx("h3", { className: "text-body-small-medium font-medium text-surface-ink-neutral-normal", children: formatMonthYear(startMonth) }), jsxs("div", { className: "flex items-center gap-2", children: [jsx("button", { onClick: handlePrevStartMonth, className: "p-1 hover:bg-surface-fill-neutral-faded rounded transition-colors", "aria-label": "Previous month", children: jsx(ChevronLeft, { className: "w-4 h-4 text-surface-ink-neutral-normal" }) }), jsx("button", { onClick: handleNextStartMonth, className: "p-1 hover:bg-surface-fill-neutral-faded rounded transition-colors", "aria-label": "Next month", children: jsx(ChevronRight, { className: "w-4 h-4 text-surface-ink-neutral-normal" }) })] })] }), jsx("div", { className: "date-range-calendar-wrapper", children: jsx(Calendar$1, { onChange: handleStartDateChange, value: tempValue.startDate, minDate: minDateParsed ?? undefined, maxDate: tempValue.endDate
|
|
3072
2898
|
? tempValue.endDate
|
|
3073
2899
|
: maxDateParsed ?? undefined, activeStartDate: startMonth, onActiveStartDateChange: ({ activeStartDate, }) => {
|
|
3074
2900
|
if (activeStartDate)
|
|
@@ -3100,15 +2926,15 @@ const DateRangePicker = React.forwardRef(({ className, value: controlledValue, d
|
|
|
3100
2926
|
"SAT",
|
|
3101
2927
|
];
|
|
3102
2928
|
return weekdayNames[date.getDay()];
|
|
3103
|
-
} }) })] })] })] })
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
2929
|
+
} }) })] })] })] }), jsxs("div", { className: "mt-4 pt-4 border-t border-surface-outline-neutral-subtle flex items-center justify-between", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("div", { className: "w-2 h-2 rounded-full bg-action-fill-primary-default" }), jsx("span", { className: "text-sm text-surface-ink-neutral-normal", children: tempValue.startDate && tempValue.endDate
|
|
2930
|
+
? isSameDay(tempValue.startDate, tempValue.endDate)
|
|
2931
|
+
? "Today"
|
|
2932
|
+
: `${formatDate(tempValue.startDate)} - ${formatDate(tempValue.endDate)}`
|
|
2933
|
+
: tempValue.startDate
|
|
2934
|
+
? `From ${formatDate(tempValue.startDate)}`
|
|
2935
|
+
: tempValue.endDate
|
|
2936
|
+
? `Until ${formatDate(tempValue.endDate)}`
|
|
2937
|
+
: "No selection" })] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(Button, { variant: "secondary", color: "neutral", size: "small", onClick: handleCancel, children: "Cancel" }), jsx(Button, { variant: "primary", color: "primary", size: "small", onClick: handleApply, children: "Apply date range" })] })] })] })] }) }));
|
|
3112
2938
|
return createPortal(calendarPopup, document.body);
|
|
3113
2939
|
})()] }));
|
|
3114
2940
|
});
|
|
@@ -3429,7 +3255,7 @@ const Modal = React.forwardRef(({ isOpen, onClose, title, description, footer, c
|
|
|
3429
3255
|
if (!isOpen)
|
|
3430
3256
|
return null;
|
|
3431
3257
|
const hasHeader = title || description;
|
|
3432
|
-
return (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: [jsx("div", { className: cn("absolute inset-0 z-0 bg-black/50 backdrop-blur-sm transition-opacity", overlayClassName), onClick: handleOverlayClick, "aria-hidden": "true" }), 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 && (jsxs("div", { className: cn("flex items-start justify-between gap-4 px-6 pt-6", !description && "pb-4", description && "pb-2", headerClassName), children: [jsxs("div", { className: "flex-1", children: [title && (jsx(Text, { as: "h2", variant: "body", size: "large", weight: "semibold", color: "default", children: title })), description && (jsx(Text, { as: "p", variant: "body", size: "small", weight: "regular", color: "subtle", className: "mt-1", children: description }))] }), showCloseButton && onClose && (jsx(IconButton, { icon: "close", onClick: onClose, color: "neutral", size: "small", "aria-label": "Close modal", className: "shrink-0" }))] })), !hasHeader && showCloseButton && onClose && (jsx("div", { className: "absolute top-4 right-4
|
|
3258
|
+
return (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: [jsx("div", { className: cn("absolute inset-0 z-0 bg-black/50 backdrop-blur-sm transition-opacity", overlayClassName), onClick: handleOverlayClick, "aria-hidden": "true" }), 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 && (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: [jsxs("div", { className: "flex-1", children: [title && (jsx(Text, { as: "h2", variant: "body", size: "large", weight: "semibold", color: "default", children: title })), description && (jsx(Text, { as: "p", variant: "body", size: "small", weight: "regular", color: "subtle", className: "mt-1", children: description }))] }), showCloseButton && onClose && (jsx(IconButton, { icon: "close", onClick: onClose, color: "neutral", size: "small", "aria-label": "Close modal", className: "shrink-0" }))] })), !hasHeader && showCloseButton && onClose && (jsx("div", { className: cn("absolute z-10", variant === "default" && "top-4 right-4"), children: jsx(IconButton, { icon: "close", onClick: onClose, color: "neutral", size: "small", "aria-label": "Close modal" }) })), 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 && (jsxs("div", { className: "flex flex-col", children: [variant === "default" && (jsx(Divider, { thickness: "thin", variant: "muted" })), jsx("div", { className: cn("flex items-center justify-end gap-3", variant === "default" && "px-6 py-4", footerClassName), children: footer })] }))] })] }));
|
|
3433
3259
|
});
|
|
3434
3260
|
Modal.displayName = "Modal";
|
|
3435
3261
|
|
|
@@ -4788,7 +4614,7 @@ const switchVariants = cva("relative inline-flex items-center shrink-0 cursor-po
|
|
|
4788
4614
|
false: "",
|
|
4789
4615
|
},
|
|
4790
4616
|
isDisabled: {
|
|
4791
|
-
true: "cursor-not-allowed
|
|
4617
|
+
true: "cursor-not-allowed opacity-60",
|
|
4792
4618
|
false: "",
|
|
4793
4619
|
},
|
|
4794
4620
|
isFocused: {
|
|
@@ -5224,12 +5050,11 @@ function AvatarCell({ name, initials, avatar, subtitle, color = "a1", className,
|
|
|
5224
5050
|
return (jsxs("div", { className: cn("flex items-center gap-3", className), children: [avatar ? (jsx("img", { src: avatar, alt: name, className: "w-10 h-10 rounded-full object-cover" })) : (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() })), jsxs("div", { className: "flex flex-col", children: [jsx("div", { className: "text-body-medium-medium text-surface-ink-neutral-normal", children: name }), subtitle && (jsx("div", { className: "text-body-small-regular text-surface-ink-neutral-muted", children: subtitle }))] })] }));
|
|
5225
5051
|
}
|
|
5226
5052
|
|
|
5227
|
-
const tabItemVariants = 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`, {
|
|
5053
|
+
const tabItemVariants = 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]`, {
|
|
5228
5054
|
variants: {
|
|
5229
5055
|
variant: {
|
|
5230
|
-
bordered: "border-b-[1.5px]
|
|
5231
|
-
borderless: "border-b-[1.5px]
|
|
5232
|
-
segmented: "rounded-lg",
|
|
5056
|
+
bordered: "border-b-[1.5px]",
|
|
5057
|
+
borderless: "border-b-[1.5px]",
|
|
5233
5058
|
},
|
|
5234
5059
|
size: {
|
|
5235
5060
|
small: "px-2 py-3 h-9",
|
|
@@ -5302,44 +5127,6 @@ const tabItemVariants = cva(`inline-flex items-center justify-center gap-3 white
|
|
|
5302
5127
|
isDisabled: true,
|
|
5303
5128
|
class: "text-text-body-disabled border-b-transparent",
|
|
5304
5129
|
},
|
|
5305
|
-
// Segmented variant - not selected
|
|
5306
|
-
{
|
|
5307
|
-
variant: "segmented",
|
|
5308
|
-
isSelected: false,
|
|
5309
|
-
isDisabled: false,
|
|
5310
|
-
class: `text-action-ink-neutral-muted
|
|
5311
|
-
hover:text-action-ink-neutral-subtle
|
|
5312
|
-
hover:bg-action-fill-neutral-faded-hover`,
|
|
5313
|
-
},
|
|
5314
|
-
// Segmented variant - selected
|
|
5315
|
-
{
|
|
5316
|
-
variant: "segmented",
|
|
5317
|
-
isSelected: true,
|
|
5318
|
-
isDisabled: false,
|
|
5319
|
-
class: "bg-action-fill-primary-faded text-action-ink-primary-subtle hover:text-action-ink-primary-normal",
|
|
5320
|
-
},
|
|
5321
|
-
// Segmented variant - disabled
|
|
5322
|
-
{
|
|
5323
|
-
variant: "segmented",
|
|
5324
|
-
isDisabled: true,
|
|
5325
|
-
class: "text-text-body-disabled bg-transparent",
|
|
5326
|
-
},
|
|
5327
|
-
// Segmented variant - size overrides (more compact)
|
|
5328
|
-
{
|
|
5329
|
-
variant: "segmented",
|
|
5330
|
-
size: "small",
|
|
5331
|
-
class: "px-3 py-1.5 h-8",
|
|
5332
|
-
},
|
|
5333
|
-
{
|
|
5334
|
-
variant: "segmented",
|
|
5335
|
-
size: "medium",
|
|
5336
|
-
class: "px-4 py-2 h-9",
|
|
5337
|
-
},
|
|
5338
|
-
{
|
|
5339
|
-
variant: "segmented",
|
|
5340
|
-
size: "large",
|
|
5341
|
-
class: "px-4 py-2.5 h-10",
|
|
5342
|
-
},
|
|
5343
5130
|
],
|
|
5344
5131
|
defaultVariants: {
|
|
5345
5132
|
variant: "bordered",
|
|
@@ -5375,11 +5162,9 @@ const Tabs = React.forwardRef(({ tabs, selectedTabId, defaultSelectedTabId, onTa
|
|
|
5375
5162
|
};
|
|
5376
5163
|
// Get the active tab content
|
|
5377
5164
|
const activeTab = tabs.find((tab) => tab.id === activeTabId);
|
|
5378
|
-
return (jsxs("div", { ref: ref, className: cn("w-full", className), ...props, children: [jsx("div", { role: "tablist", className: cn("inline-flex items-center", {
|
|
5165
|
+
return (jsxs("div", { ref: ref, className: cn("w-full", className), ...props, children: [jsx("div", { role: "tablist", className: cn("inline-flex items-center gap-4", {
|
|
5379
5166
|
"w-full": isFullWidth,
|
|
5380
|
-
"
|
|
5381
|
-
"border-b-[1.5px] border-surface-outline-neutral-muted": variant === "bordered",
|
|
5382
|
-
"gap-1 p-1 rounded-xl bg-surface-background-neutral-faded-default": variant === "segmented",
|
|
5167
|
+
"border-b border-b-[1.5px] border-surface-outline-neutral-muted": variant === "bordered",
|
|
5383
5168
|
}, tabListClassName), children: tabs.map((tab) => (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 && (jsx("div", { role: "tabpanel", className: cn("mt-4", contentClassName), "aria-labelledby": String(activeTabId), children: activeTab.content }))] }));
|
|
5384
5169
|
});
|
|
5385
5170
|
Tabs.displayName = "Tabs";
|
|
@@ -6163,5 +5948,5 @@ const UploadBox = React.forwardRef(({ label, helperText, errorText, successText,
|
|
|
6163
5948
|
});
|
|
6164
5949
|
UploadBox.displayName = "UploadBox";
|
|
6165
5950
|
|
|
6166
|
-
export { Alert, Amount, Avatar, AvatarCell, Badge, Button, ButtonGroup, Checkbox,
|
|
5951
|
+
export { Alert, Amount, Avatar, AvatarCell, Badge, Button, ButtonGroup, Checkbox, Counter, DatePicker, DateRangePicker, Divider, Dropdown, DropdownMenu, FormFooter, FormHeader, Icon, IconButton, IconCell, Link, ListItem, Modal, NumberCell, Pagination, Radio, RadioGroup, SearchableDropdown, Select, SelectTextField, SidePanel, Skeleton, SlotCell, SpacerCell, Switch, TabItem, Table, TableDetailPanel, Tabs, Text, TextArea, TextField, Toast, ToastProvider, Tooltip, UploadBox, alertVariants, avatarVariants, badgeVariants, buttonGroupVariants, buttonVariants, checkboxVariants, cn, counterVariants, datePickerVariants, dateRangePickerVariants, dropdownVariants, getAvailableIcons, hasIcon, iconButtonVariants, iconRegistry, linkVariants, listItemVariants, paginationVariants, radioVariants, selectTriggerVariants, switchVariants, tableCellVariants, tableHeaderVariants, tableVariants, textAreaVariants, textFieldVariants, tooltipVariants, uploadBoxVariants, useToast };
|
|
6167
5952
|
//# sourceMappingURL=index.esm.js.map
|