@lindle/linoardo 1.0.39 → 1.0.41
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/{ExpansionPanelItem-CFm8a8R_.d.ts → ExpansionPanelItem-C4-2nlhq.d.ts} +1 -1
- package/dist/{ExpansionPanelItem-ufS2RIZf.d.cts → ExpansionPanelItem-CEhDj2Uw.d.cts} +1 -1
- package/dist/badge.d.cts +1 -1
- package/dist/badge.d.ts +1 -1
- package/dist/block.d.cts +1 -1
- package/dist/block.d.ts +1 -1
- package/dist/button.d.cts +1 -1
- package/dist/button.d.ts +1 -1
- package/dist/card.d.cts +1 -1
- package/dist/card.d.ts +1 -1
- package/dist/chip.d.cts +12 -12
- package/dist/chip.d.ts +12 -12
- package/dist/chip.js +2 -1
- package/dist/chunk-4J3SRVOS.js +217 -0
- package/dist/chunk-4J3SRVOS.js.map +1 -0
- package/dist/chunk-HT5XBHWN.js +119 -0
- package/dist/chunk-HT5XBHWN.js.map +1 -0
- package/dist/{chunk-BDN4EDJQ.js → chunk-LULQOD2K.js} +12 -6
- package/dist/chunk-LULQOD2K.js.map +1 -0
- package/dist/{chunk-P3ESW6KM.js → chunk-OBGYXMZ3.js} +74 -28
- package/dist/chunk-OBGYXMZ3.js.map +1 -0
- package/dist/{chunk-HJFHZNOV.js → chunk-PSMGRUU5.js} +3 -116
- package/dist/chunk-PSMGRUU5.js.map +1 -0
- package/dist/expansion-panel/item.d.cts +2 -2
- package/dist/expansion-panel/item.d.ts +2 -2
- package/dist/expansion-panel.d.cts +3 -3
- package/dist/expansion-panel.d.ts +3 -3
- package/dist/{global.types-D-o85tuX.d.cts → global.types-gx9A7mUe.d.cts} +1 -1
- package/dist/{global.types-D-o85tuX.d.ts → global.types-gx9A7mUe.d.ts} +1 -1
- package/dist/hero.d.cts +1 -1
- package/dist/hero.d.ts +1 -1
- package/dist/icon.d.cts +1 -1
- package/dist/icon.d.ts +1 -1
- package/dist/{index-B7xZzSwm.d.cts → index-BDrBOeFI.d.cts} +1 -1
- package/dist/{index-BhfThlf0.d.ts → index-CNwl6vmH.d.ts} +1 -1
- package/dist/index.cjs +700 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +61 -6
- package/dist/index.d.ts +61 -6
- package/dist/index.js +409 -5
- package/dist/index.js.map +1 -1
- package/dist/input.cjs +71 -25
- package/dist/input.cjs.map +1 -1
- package/dist/input.d.cts +4 -2
- package/dist/input.d.ts +4 -2
- package/dist/input.js +1 -1
- package/dist/list/item.d.cts +2 -2
- package/dist/list/item.d.ts +2 -2
- package/dist/list.d.cts +3 -3
- package/dist/list.d.ts +3 -3
- package/dist/notification.d.cts +1 -1
- package/dist/notification.d.ts +1 -1
- package/dist/profileCard.d.cts +1 -1
- package/dist/profileCard.d.ts +1 -1
- package/dist/select.cjs +14 -4
- package/dist/select.cjs.map +1 -1
- package/dist/select.d.cts +5 -4
- package/dist/select.d.ts +5 -4
- package/dist/select.js +1 -1
- package/dist/slider.d.cts +1 -1
- package/dist/slider.d.ts +1 -1
- package/dist/styles.css +166 -5
- package/dist/switch.d.cts +1 -1
- package/dist/switch.d.ts +1 -1
- package/dist/timeline.cjs +274 -0
- package/dist/timeline.cjs.map +1 -0
- package/dist/timeline.d.cts +54 -0
- package/dist/timeline.d.ts +54 -0
- package/dist/timeline.js +5 -0
- package/dist/timeline.js.map +1 -0
- package/dist/{types-DqPSePni.d.cts → types-CJ0zqPXF.d.cts} +1 -1
- package/dist/{types-CbQEphC3.d.ts → types-DaTHYIPO.d.ts} +1 -1
- package/package.json +13 -1
- package/dist/chunk-BDN4EDJQ.js.map +0 -1
- package/dist/chunk-HJFHZNOV.js.map +0 -1
- package/dist/chunk-P3ESW6KM.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1843,6 +1843,405 @@ function resolveItemContent(item, index, renderItem) {
|
|
|
1843
1843
|
}
|
|
1844
1844
|
return item;
|
|
1845
1845
|
}
|
|
1846
|
+
var TABS_TAB_MARKER = "__isTabsTab";
|
|
1847
|
+
var hasMarker2 = (type) => {
|
|
1848
|
+
if (!type || typeof type !== "function" && typeof type !== "object") {
|
|
1849
|
+
return false;
|
|
1850
|
+
}
|
|
1851
|
+
if (type[TABS_TAB_MARKER]) {
|
|
1852
|
+
return true;
|
|
1853
|
+
}
|
|
1854
|
+
const innerType = type.type;
|
|
1855
|
+
if (innerType && innerType !== type) {
|
|
1856
|
+
return hasMarker2(innerType);
|
|
1857
|
+
}
|
|
1858
|
+
return false;
|
|
1859
|
+
};
|
|
1860
|
+
var isTabsTabElement = (element) => {
|
|
1861
|
+
if (!React4.isValidElement(element)) {
|
|
1862
|
+
return false;
|
|
1863
|
+
}
|
|
1864
|
+
return hasMarker2(element.type);
|
|
1865
|
+
};
|
|
1866
|
+
var markTabsTab = (component) => {
|
|
1867
|
+
if (typeof component !== "function" && (typeof component !== "object" || component === null)) {
|
|
1868
|
+
return;
|
|
1869
|
+
}
|
|
1870
|
+
component[TABS_TAB_MARKER] = true;
|
|
1871
|
+
};
|
|
1872
|
+
var sizeClasses2 = {
|
|
1873
|
+
"x-small": { tab: "h-7 px-2 text-xs", icon: "text-sm" },
|
|
1874
|
+
small: { tab: "h-8 px-2.5 text-sm", icon: "text-base" },
|
|
1875
|
+
medium: { tab: "h-9 px-3 text-sm", icon: "text-base" },
|
|
1876
|
+
large: { tab: "h-10 px-3.5 text-base", icon: "text-lg" },
|
|
1877
|
+
"x-large": { tab: "h-11 px-4 text-base", icon: "text-lg" }
|
|
1878
|
+
};
|
|
1879
|
+
var variantListClasses = {
|
|
1880
|
+
line: "border-b border-gray-200",
|
|
1881
|
+
card: "rounded-xl bg-gray-100 p-1",
|
|
1882
|
+
pill: "rounded-full bg-gray-100/80 p-1"
|
|
1883
|
+
};
|
|
1884
|
+
var variantTabBaseClasses = {
|
|
1885
|
+
line: "border-b-2 border-transparent -mb-px",
|
|
1886
|
+
card: "rounded-lg border border-transparent bg-white/70",
|
|
1887
|
+
pill: "rounded-full"
|
|
1888
|
+
};
|
|
1889
|
+
var paletteClasses = {
|
|
1890
|
+
primary: {
|
|
1891
|
+
text: "text-primary",
|
|
1892
|
+
border: "border-primary",
|
|
1893
|
+
bg: "bg-primary/10",
|
|
1894
|
+
ring: "ring-primary/30",
|
|
1895
|
+
ink: "bg-primary"
|
|
1896
|
+
},
|
|
1897
|
+
neutral: {
|
|
1898
|
+
text: "text-gray-900",
|
|
1899
|
+
border: "border-gray-900",
|
|
1900
|
+
bg: "bg-gray-100",
|
|
1901
|
+
ring: "ring-gray-900/20",
|
|
1902
|
+
ink: "bg-gray-900"
|
|
1903
|
+
},
|
|
1904
|
+
info: {
|
|
1905
|
+
text: "text-sky-600",
|
|
1906
|
+
border: "border-sky-500",
|
|
1907
|
+
bg: "bg-sky-50",
|
|
1908
|
+
ring: "ring-sky-500/20",
|
|
1909
|
+
ink: "bg-sky-500"
|
|
1910
|
+
},
|
|
1911
|
+
success: {
|
|
1912
|
+
text: "text-emerald-600",
|
|
1913
|
+
border: "border-emerald-500",
|
|
1914
|
+
bg: "bg-emerald-50",
|
|
1915
|
+
ring: "ring-emerald-500/20",
|
|
1916
|
+
ink: "bg-emerald-500"
|
|
1917
|
+
},
|
|
1918
|
+
warning: {
|
|
1919
|
+
text: "text-amber-600",
|
|
1920
|
+
border: "border-amber-500",
|
|
1921
|
+
bg: "bg-amber-50",
|
|
1922
|
+
ring: "ring-amber-500/20",
|
|
1923
|
+
ink: "bg-amber-500"
|
|
1924
|
+
},
|
|
1925
|
+
danger: {
|
|
1926
|
+
text: "text-red-600",
|
|
1927
|
+
border: "border-red-500",
|
|
1928
|
+
bg: "bg-red-50",
|
|
1929
|
+
ring: "ring-red-500/20",
|
|
1930
|
+
ink: "bg-red-500"
|
|
1931
|
+
},
|
|
1932
|
+
surface: {
|
|
1933
|
+
text: "text-gray-900",
|
|
1934
|
+
border: "border-gray-300",
|
|
1935
|
+
bg: "bg-white",
|
|
1936
|
+
ring: "ring-gray-300/30",
|
|
1937
|
+
ink: "bg-gray-400"
|
|
1938
|
+
},
|
|
1939
|
+
bw: {
|
|
1940
|
+
text: "text-black",
|
|
1941
|
+
border: "border-black",
|
|
1942
|
+
bg: "bg-black/10",
|
|
1943
|
+
ring: "ring-black/20",
|
|
1944
|
+
ink: "bg-black"
|
|
1945
|
+
}
|
|
1946
|
+
};
|
|
1947
|
+
var panelVariantClasses = {
|
|
1948
|
+
line: "pt-4",
|
|
1949
|
+
card: "mt-3 rounded-xl border border-gray-200 bg-white p-4 shadow-sm",
|
|
1950
|
+
pill: "mt-3 rounded-2xl border border-gray-200 bg-white/90 p-4"
|
|
1951
|
+
};
|
|
1952
|
+
var isExtraContentObject = (value) => {
|
|
1953
|
+
return !!value && typeof value === "object" && !React4__namespace.isValidElement(value) && ("left" in value || "right" in value);
|
|
1954
|
+
};
|
|
1955
|
+
var resolveFirstEnabledTab = (tabs) => tabs.find((tab) => !tab.disabled)?.value;
|
|
1956
|
+
var clampActive = (value, tabs) => {
|
|
1957
|
+
if (value === void 0) {
|
|
1958
|
+
return resolveFirstEnabledTab(tabs);
|
|
1959
|
+
}
|
|
1960
|
+
const match = tabs.find((tab) => tab.value === value);
|
|
1961
|
+
if (!match || match.disabled) {
|
|
1962
|
+
return resolveFirstEnabledTab(tabs);
|
|
1963
|
+
}
|
|
1964
|
+
return value;
|
|
1965
|
+
};
|
|
1966
|
+
var resolveIconNode = (icon, size) => {
|
|
1967
|
+
if (!icon) return null;
|
|
1968
|
+
const iconClass = resolveIconClassName2(icon);
|
|
1969
|
+
return iconClass ? /* @__PURE__ */ jsxRuntime.jsx("i", { className: tailwindMerge.twMerge(iconClass, size ? sizeClasses2[size].icon : void 0), "aria-hidden": true }) : null;
|
|
1970
|
+
};
|
|
1971
|
+
var collectTabs = (children, tabsId) => {
|
|
1972
|
+
const tabs = [];
|
|
1973
|
+
let index = 0;
|
|
1974
|
+
const walk = (node) => {
|
|
1975
|
+
if (Array.isArray(node)) {
|
|
1976
|
+
node.forEach(walk);
|
|
1977
|
+
return;
|
|
1978
|
+
}
|
|
1979
|
+
if (!isTabsTabElement(node)) {
|
|
1980
|
+
if (React4__namespace.isValidElement(node)) {
|
|
1981
|
+
const props = node.props;
|
|
1982
|
+
if (props && Object.prototype.hasOwnProperty.call(props, "children")) {
|
|
1983
|
+
walk(props.children);
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
return;
|
|
1987
|
+
}
|
|
1988
|
+
const tabIndex = index++;
|
|
1989
|
+
const value = node.props.value ?? tabIndex;
|
|
1990
|
+
const tabId = `${tabsId}-tab-${tabIndex}`;
|
|
1991
|
+
const panelId = `${tabsId}-panel-${tabIndex}`;
|
|
1992
|
+
tabs.push({
|
|
1993
|
+
element: node,
|
|
1994
|
+
index: tabIndex,
|
|
1995
|
+
value,
|
|
1996
|
+
label: node.props.label,
|
|
1997
|
+
disabled: node.props.disabled,
|
|
1998
|
+
icon: node.props.icon,
|
|
1999
|
+
badge: node.props.badge,
|
|
2000
|
+
tabClassName: node.props.tabClassName,
|
|
2001
|
+
panelClassName: node.props.panelClassName,
|
|
2002
|
+
tabId,
|
|
2003
|
+
panelId,
|
|
2004
|
+
forceRender: node.props.forceRender
|
|
2005
|
+
});
|
|
2006
|
+
};
|
|
2007
|
+
walk(children);
|
|
2008
|
+
return tabs;
|
|
2009
|
+
};
|
|
2010
|
+
var injectTabs = (children, context, tabs) => {
|
|
2011
|
+
let index = 0;
|
|
2012
|
+
const walk = (node) => {
|
|
2013
|
+
if (Array.isArray(node)) {
|
|
2014
|
+
let changed = false;
|
|
2015
|
+
const next = node.map((child) => {
|
|
2016
|
+
const mapped = walk(child);
|
|
2017
|
+
if (mapped !== child) {
|
|
2018
|
+
changed = true;
|
|
2019
|
+
}
|
|
2020
|
+
return mapped;
|
|
2021
|
+
});
|
|
2022
|
+
return changed ? next : node;
|
|
2023
|
+
}
|
|
2024
|
+
if (!React4__namespace.isValidElement(node)) {
|
|
2025
|
+
return node;
|
|
2026
|
+
}
|
|
2027
|
+
if (isTabsTabElement(node)) {
|
|
2028
|
+
const tab = tabs[index++];
|
|
2029
|
+
if (!tab) {
|
|
2030
|
+
return node;
|
|
2031
|
+
}
|
|
2032
|
+
const injectedProps = {
|
|
2033
|
+
value: tab.value,
|
|
2034
|
+
__tabsContext: context,
|
|
2035
|
+
__tabsValue: tab.value,
|
|
2036
|
+
__tabsIndex: tab.index,
|
|
2037
|
+
__tabsTabId: tab.tabId,
|
|
2038
|
+
__tabsPanelId: tab.panelId
|
|
2039
|
+
};
|
|
2040
|
+
return React4__namespace.cloneElement(node, injectedProps);
|
|
2041
|
+
}
|
|
2042
|
+
if (node.props) {
|
|
2043
|
+
const props = node.props;
|
|
2044
|
+
if (props && Object.prototype.hasOwnProperty.call(props, "children")) {
|
|
2045
|
+
const mappedChildren = walk(props.children);
|
|
2046
|
+
if (mappedChildren !== props.children) {
|
|
2047
|
+
return React4__namespace.cloneElement(node, void 0, mappedChildren);
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
}
|
|
2051
|
+
return node;
|
|
2052
|
+
};
|
|
2053
|
+
return walk(children);
|
|
2054
|
+
};
|
|
2055
|
+
var handleTabListKeyDown = (event) => {
|
|
2056
|
+
const { key } = event;
|
|
2057
|
+
if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(key)) {
|
|
2058
|
+
return;
|
|
2059
|
+
}
|
|
2060
|
+
const tabs = Array.from(event.currentTarget.querySelectorAll('[role="tab"]')).filter((tab) => !tab.disabled);
|
|
2061
|
+
if (!tabs.length) {
|
|
2062
|
+
return;
|
|
2063
|
+
}
|
|
2064
|
+
const currentIndex = tabs.findIndex((tab) => tab === document.activeElement);
|
|
2065
|
+
let nextIndex = currentIndex;
|
|
2066
|
+
if (key === "ArrowRight") {
|
|
2067
|
+
nextIndex = currentIndex === -1 ? 0 : (currentIndex + 1) % tabs.length;
|
|
2068
|
+
}
|
|
2069
|
+
if (key === "ArrowLeft") {
|
|
2070
|
+
nextIndex = currentIndex === -1 ? tabs.length - 1 : (currentIndex - 1 + tabs.length) % tabs.length;
|
|
2071
|
+
}
|
|
2072
|
+
if (key === "Home") {
|
|
2073
|
+
nextIndex = 0;
|
|
2074
|
+
}
|
|
2075
|
+
if (key === "End") {
|
|
2076
|
+
nextIndex = tabs.length - 1;
|
|
2077
|
+
}
|
|
2078
|
+
tabs[nextIndex]?.focus();
|
|
2079
|
+
event.preventDefault();
|
|
2080
|
+
};
|
|
2081
|
+
var Tabs = React4__namespace.forwardRef((props, ref) => {
|
|
2082
|
+
const {
|
|
2083
|
+
activeKey,
|
|
2084
|
+
defaultActiveKey,
|
|
2085
|
+
onChange,
|
|
2086
|
+
variant = "line",
|
|
2087
|
+
size = "medium",
|
|
2088
|
+
color = "primary",
|
|
2089
|
+
align = "start",
|
|
2090
|
+
tabBarGutter = 8,
|
|
2091
|
+
tabBarExtraContent,
|
|
2092
|
+
tabBarClassName,
|
|
2093
|
+
destroyInactiveTabPane = false,
|
|
2094
|
+
keepMounted = false,
|
|
2095
|
+
className,
|
|
2096
|
+
children,
|
|
2097
|
+
id,
|
|
2098
|
+
...rest
|
|
2099
|
+
} = props;
|
|
2100
|
+
const tabsId = typeof id === "string" && id.trim().length ? id : "tabs";
|
|
2101
|
+
const tabs = collectTabs(children, tabsId);
|
|
2102
|
+
const resolvedActive = clampActive(activeKey ?? defaultActiveKey, tabs);
|
|
2103
|
+
const handleActivate = (value) => {
|
|
2104
|
+
onChange?.(value);
|
|
2105
|
+
};
|
|
2106
|
+
const extraContent = tabBarExtraContent;
|
|
2107
|
+
const extraLeft = isExtraContentObject(extraContent) ? extraContent.left : null;
|
|
2108
|
+
const extraRight = isExtraContentObject(extraContent) ? extraContent.right : extraContent;
|
|
2109
|
+
const palette = paletteClasses[color] ?? paletteClasses.primary;
|
|
2110
|
+
const context = {
|
|
2111
|
+
activeKey: resolvedActive,
|
|
2112
|
+
onChange: handleActivate,
|
|
2113
|
+
variant,
|
|
2114
|
+
size,
|
|
2115
|
+
color,
|
|
2116
|
+
destroyInactiveTabPane,
|
|
2117
|
+
keepMounted
|
|
2118
|
+
};
|
|
2119
|
+
const enhancedChildren = injectTabs(children, context, tabs);
|
|
2120
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2121
|
+
"div",
|
|
2122
|
+
{
|
|
2123
|
+
...rest,
|
|
2124
|
+
id,
|
|
2125
|
+
ref,
|
|
2126
|
+
className: tailwindMerge.twMerge("tabs flex w-full flex-col text-gray-900", className),
|
|
2127
|
+
children: [
|
|
2128
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
2129
|
+
extraLeft ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center", children: extraLeft }) : null,
|
|
2130
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2131
|
+
"div",
|
|
2132
|
+
{
|
|
2133
|
+
role: "tablist",
|
|
2134
|
+
"aria-orientation": "horizontal",
|
|
2135
|
+
onKeyDown: handleTabListKeyDown,
|
|
2136
|
+
className: tailwindMerge.twMerge(
|
|
2137
|
+
"flex min-w-0 flex-1 items-center gap-2 overflow-x-auto",
|
|
2138
|
+
align === "center" ? "justify-center" : align === "end" ? "justify-end" : void 0,
|
|
2139
|
+
variantListClasses[variant],
|
|
2140
|
+
tabBarClassName
|
|
2141
|
+
),
|
|
2142
|
+
style: { gap: tabBarGutter },
|
|
2143
|
+
children: tabs.map((tab) => {
|
|
2144
|
+
const isActive = tab.value === resolvedActive;
|
|
2145
|
+
const sizeClass = sizeClasses2[size] ?? sizeClasses2.medium;
|
|
2146
|
+
const iconNode = resolveIconNode(tab.icon, size);
|
|
2147
|
+
const badgeNode = tab.badge ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-gray-200 px-1.5 py-0.5 text-[0.6rem] font-semibold text-gray-700", children: tab.badge }) : null;
|
|
2148
|
+
const activeText = isActive ? palette.text : "text-gray-600";
|
|
2149
|
+
const activeBorder = isActive ? palette.border : "border-transparent";
|
|
2150
|
+
const activeBg = isActive ? palette.bg : void 0;
|
|
2151
|
+
const activeRing = isActive ? palette.ring : void 0;
|
|
2152
|
+
const variantClasses5 = {
|
|
2153
|
+
line: tailwindMerge.twMerge(activeText, activeBorder),
|
|
2154
|
+
card: tailwindMerge.twMerge(activeText, activeBg, activeBorder, isActive ? "shadow-sm" : void 0),
|
|
2155
|
+
pill: tailwindMerge.twMerge(activeText, activeBg)
|
|
2156
|
+
};
|
|
2157
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2158
|
+
"button",
|
|
2159
|
+
{
|
|
2160
|
+
type: "button",
|
|
2161
|
+
role: "tab",
|
|
2162
|
+
id: tab.tabId,
|
|
2163
|
+
"aria-selected": isActive,
|
|
2164
|
+
"aria-controls": tab.panelId,
|
|
2165
|
+
"aria-disabled": tab.disabled || void 0,
|
|
2166
|
+
disabled: tab.disabled,
|
|
2167
|
+
tabIndex: isActive ? 0 : -1,
|
|
2168
|
+
onClick: () => {
|
|
2169
|
+
if (!tab.disabled) {
|
|
2170
|
+
handleActivate(tab.value);
|
|
2171
|
+
}
|
|
2172
|
+
},
|
|
2173
|
+
className: tailwindMerge.twMerge(
|
|
2174
|
+
"inline-flex items-center gap-2 whitespace-nowrap font-medium transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2",
|
|
2175
|
+
sizeClass.tab,
|
|
2176
|
+
variantTabBaseClasses[variant],
|
|
2177
|
+
variantClasses5[variant],
|
|
2178
|
+
activeRing ? `ring-1 ${activeRing}` : void 0,
|
|
2179
|
+
tab.disabled ? "cursor-not-allowed text-gray-400 opacity-60" : "hover:text-gray-900",
|
|
2180
|
+
tab.tabClassName
|
|
2181
|
+
),
|
|
2182
|
+
"data-state": isActive ? "active" : "inactive",
|
|
2183
|
+
children: [
|
|
2184
|
+
iconNode,
|
|
2185
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: tab.label }),
|
|
2186
|
+
badgeNode
|
|
2187
|
+
]
|
|
2188
|
+
},
|
|
2189
|
+
tab.value
|
|
2190
|
+
);
|
|
2191
|
+
})
|
|
2192
|
+
}
|
|
2193
|
+
),
|
|
2194
|
+
extraRight ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center", children: extraRight }) : null
|
|
2195
|
+
] }),
|
|
2196
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("min-h-0", panelVariantClasses[variant]), children: enhancedChildren })
|
|
2197
|
+
]
|
|
2198
|
+
}
|
|
2199
|
+
);
|
|
2200
|
+
});
|
|
2201
|
+
Tabs.displayName = "Tabs";
|
|
2202
|
+
var Tab = React4__namespace.forwardRef((props, ref) => {
|
|
2203
|
+
const {
|
|
2204
|
+
label: _label,
|
|
2205
|
+
value,
|
|
2206
|
+
disabled,
|
|
2207
|
+
forceRender,
|
|
2208
|
+
tabClassName: _tabClassName,
|
|
2209
|
+
panelClassName,
|
|
2210
|
+
className,
|
|
2211
|
+
children,
|
|
2212
|
+
__tabsContext,
|
|
2213
|
+
__tabsValue,
|
|
2214
|
+
__tabsTabId,
|
|
2215
|
+
__tabsPanelId,
|
|
2216
|
+
...rest
|
|
2217
|
+
} = props;
|
|
2218
|
+
const context = __tabsContext;
|
|
2219
|
+
const resolvedValue = value ?? __tabsValue;
|
|
2220
|
+
const isActive = context ? context.activeKey === resolvedValue : true;
|
|
2221
|
+
const shouldRender = !context || isActive || context.keepMounted || !context.destroyInactiveTabPane || forceRender;
|
|
2222
|
+
if (!shouldRender) {
|
|
2223
|
+
return null;
|
|
2224
|
+
}
|
|
2225
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2226
|
+
"div",
|
|
2227
|
+
{
|
|
2228
|
+
...rest,
|
|
2229
|
+
ref,
|
|
2230
|
+
role: "tabpanel",
|
|
2231
|
+
id: __tabsPanelId,
|
|
2232
|
+
"aria-labelledby": __tabsTabId,
|
|
2233
|
+
"aria-hidden": context ? !isActive : void 0,
|
|
2234
|
+
hidden: context ? !isActive : void 0,
|
|
2235
|
+
className: tailwindMerge.twMerge("tabs-panel text-gray-900", className, panelClassName),
|
|
2236
|
+
"data-state": isActive ? "active" : "inactive",
|
|
2237
|
+
"data-disabled": disabled || void 0,
|
|
2238
|
+
children
|
|
2239
|
+
}
|
|
2240
|
+
);
|
|
2241
|
+
});
|
|
2242
|
+
Tab.displayName = "Tab";
|
|
2243
|
+
markTabsTab(Tab);
|
|
2244
|
+
var Tabs_default = Tabs;
|
|
1846
2245
|
var positionClasses = {
|
|
1847
2246
|
fixed: "fixed inset-x-0 top-0",
|
|
1848
2247
|
absolute: "absolute inset-x-0 top-0",
|
|
@@ -2299,6 +2698,8 @@ var Input = React4__namespace.default.forwardRef(
|
|
|
2299
2698
|
className,
|
|
2300
2699
|
wrapperClassName,
|
|
2301
2700
|
label,
|
|
2701
|
+
prefix,
|
|
2702
|
+
suffix,
|
|
2302
2703
|
...props
|
|
2303
2704
|
}, ref) => {
|
|
2304
2705
|
const { placeholder, onFocus, onBlur, ...inputProps } = props;
|
|
@@ -2318,20 +2719,52 @@ var Input = React4__namespace.default.forwardRef(
|
|
|
2318
2719
|
underlined: "rounded-none border-0 border-b border-gray-300 px-0 bg-transparent focus-visible:border-primary focus-visible:ring-0 focus-visible:ring-transparent dark:border-b-gray-600 dark:focus-visible:border-primary/70",
|
|
2319
2720
|
rounded: "rounded-full px-4 border border-gray-300 bg-white focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/20 shadow-sm dark:border-gray-600 dark:bg-slate-900 dark:focus-visible:border-primary/70 dark:focus-visible:ring-primary/30 dark:shadow-black/20"
|
|
2320
2721
|
};
|
|
2321
|
-
const
|
|
2322
|
-
"x-small": {
|
|
2722
|
+
const sizeClasses5 = {
|
|
2723
|
+
"x-small": {
|
|
2724
|
+
paddingY: "py-2",
|
|
2725
|
+
paddingLeft: "pl-2",
|
|
2726
|
+
paddingRight: "pr-2",
|
|
2727
|
+
paddingLeftLeading: "pl-8",
|
|
2728
|
+
paddingLeftLeadingDouble: "pl-12",
|
|
2729
|
+
paddingRightTrailing: "pr-8",
|
|
2730
|
+
text: "text-xs"
|
|
2731
|
+
},
|
|
2323
2732
|
small: {
|
|
2324
|
-
|
|
2325
|
-
|
|
2733
|
+
paddingY: "py-2.5",
|
|
2734
|
+
paddingLeft: "pl-2.5",
|
|
2735
|
+
paddingRight: "pr-2.5",
|
|
2736
|
+
paddingLeftLeading: "pl-9",
|
|
2737
|
+
paddingLeftLeadingDouble: "pl-12",
|
|
2738
|
+
paddingRightTrailing: "pr-9",
|
|
2326
2739
|
text: "text-sm"
|
|
2327
2740
|
},
|
|
2328
|
-
medium: {
|
|
2741
|
+
medium: {
|
|
2742
|
+
paddingY: "py-3",
|
|
2743
|
+
paddingLeft: "pl-3",
|
|
2744
|
+
paddingRight: "pr-3",
|
|
2745
|
+
paddingLeftLeading: "pl-10",
|
|
2746
|
+
paddingLeftLeadingDouble: "pl-14",
|
|
2747
|
+
paddingRightTrailing: "pr-10",
|
|
2748
|
+
text: "text-base"
|
|
2749
|
+
},
|
|
2329
2750
|
large: {
|
|
2330
|
-
|
|
2331
|
-
|
|
2751
|
+
paddingY: "py-3.5",
|
|
2752
|
+
paddingLeft: "pl-3.5",
|
|
2753
|
+
paddingRight: "pr-3.5",
|
|
2754
|
+
paddingLeftLeading: "pl-11",
|
|
2755
|
+
paddingLeftLeadingDouble: "pl-14",
|
|
2756
|
+
paddingRightTrailing: "pr-11",
|
|
2332
2757
|
text: "text-lg"
|
|
2333
2758
|
},
|
|
2334
|
-
"x-large": {
|
|
2759
|
+
"x-large": {
|
|
2760
|
+
paddingY: "py-4",
|
|
2761
|
+
paddingLeft: "pl-4",
|
|
2762
|
+
paddingRight: "pr-4",
|
|
2763
|
+
paddingLeftLeading: "pl-12",
|
|
2764
|
+
paddingLeftLeadingDouble: "pl-16",
|
|
2765
|
+
paddingRightTrailing: "pr-12",
|
|
2766
|
+
text: "text-xl"
|
|
2767
|
+
}
|
|
2335
2768
|
};
|
|
2336
2769
|
const status = error ? { tone: "error", message: error } : warn ? { tone: "warn", message: warn } : success ? { tone: "success", message: success } : void 0;
|
|
2337
2770
|
const statusClasses = {
|
|
@@ -2347,16 +2780,23 @@ var Input = React4__namespace.default.forwardRef(
|
|
|
2347
2780
|
const variantClass = variantClasses5[variant] ?? variantClasses5.outline;
|
|
2348
2781
|
const toneClass = status ? statusClasses[status.tone] : void 0;
|
|
2349
2782
|
let prependIconClass = resolveIconClassName4(icon);
|
|
2350
|
-
const
|
|
2351
|
-
const
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2783
|
+
const hasPrefix = typeof prefix === "string" ? prefix.trim().length > 0 : Boolean(prefix);
|
|
2784
|
+
const hasSuffix = typeof suffix === "string" ? suffix.trim().length > 0 : Boolean(suffix);
|
|
2785
|
+
const hasLeadingIcon = Boolean(prependIconClass);
|
|
2786
|
+
const hasLeadingAdornment = hasLeadingIcon || hasPrefix;
|
|
2787
|
+
const hasTrailingAdornment = hasSuffix;
|
|
2788
|
+
const sizeConfig = sizeClasses5[size] ?? sizeClasses5.medium;
|
|
2789
|
+
const leftPaddingClass = hasPrefix ? sizeConfig.paddingLeftLeadingDouble : hasLeadingAdornment ? sizeConfig.paddingLeftLeading : sizeConfig.paddingLeft;
|
|
2790
|
+
const rightPaddingClass = hasTrailingAdornment ? sizeConfig.paddingRightTrailing : sizeConfig.paddingRight;
|
|
2791
|
+
const sizeClass = [sizeConfig.paddingY, leftPaddingClass, rightPaddingClass, sizeConfig.text].join(" ");
|
|
2355
2792
|
const inputName = inputProps.name || reactId;
|
|
2356
2793
|
const basePlaceholder = placeholder ?? (hasLabel ? " " : void 0);
|
|
2357
2794
|
const placeholderValue = hidePlaceholderUntilFocus ? isFocused ? placeholder : " " : basePlaceholder;
|
|
2358
2795
|
const placeholderClass = hidePlaceholderUntilFocus ? "placeholder-transparent focus:placeholder-gray-500 focus:dark:placeholder-gray-400" : void 0;
|
|
2359
|
-
const labelLeftClass =
|
|
2796
|
+
const labelLeftClass = hasLeadingAdornment ? "left-10" : "left-3";
|
|
2797
|
+
const labelFocusLeftClass = hasLeadingAdornment ? "peer-focus:left-10" : "peer-focus:left-3";
|
|
2798
|
+
const renderPrefix = hasPrefix ? typeof prefix === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("text-gray-500 dark:text-gray-400", sizeConfig.text), children: prefix }) : prefix : null;
|
|
2799
|
+
const renderSuffix = hasSuffix ? typeof suffix === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("text-gray-500 dark:text-gray-400", sizeConfig.text), children: suffix }) : suffix : null;
|
|
2360
2800
|
const labelBgDefault = ["outline", "text", "underlined"].includes(variant) ? "bg-transparent" : "bg-white/90 dark:bg-slate-900";
|
|
2361
2801
|
const handleFocus = (event) => {
|
|
2362
2802
|
if (hidePlaceholderUntilFocus) setIsFocused(true);
|
|
@@ -2368,17 +2808,20 @@ var Input = React4__namespace.default.forwardRef(
|
|
|
2368
2808
|
};
|
|
2369
2809
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tailwindMerge.twMerge("flex flex-col gap-1", wrapperClassName), children: [
|
|
2370
2810
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center", children: [
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2811
|
+
hasLeadingAdornment && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "absolute left-3 inset-y-0 flex items-center gap-2", children: [
|
|
2812
|
+
prependIconClass && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2813
|
+
"i",
|
|
2814
|
+
{
|
|
2815
|
+
className: tailwindMerge.twMerge(
|
|
2816
|
+
"text-gray-500 dark:text-gray-400",
|
|
2817
|
+
status?.tone && statusMessageClasses[status?.tone] || "",
|
|
2818
|
+
prependIconClass
|
|
2819
|
+
),
|
|
2820
|
+
"aria-hidden": true
|
|
2821
|
+
}
|
|
2822
|
+
),
|
|
2823
|
+
renderPrefix
|
|
2824
|
+
] }),
|
|
2382
2825
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2383
2826
|
"input",
|
|
2384
2827
|
{
|
|
@@ -2408,16 +2851,18 @@ var Input = React4__namespace.default.forwardRef(
|
|
|
2408
2851
|
"absolute transition-all duration-150 pointer-events-none text-gray-700 rounded dark:text-gray-200",
|
|
2409
2852
|
labelLeftClass,
|
|
2410
2853
|
// Floated state: center label's vertical middle on the top border line
|
|
2411
|
-
"-top-1.5
|
|
2854
|
+
"-top-1.5 -translate-y-2/3 text-xs px-1",
|
|
2412
2855
|
labelBgDefault,
|
|
2413
2856
|
// focus state mirrors floated state (keeps center on border)
|
|
2857
|
+
labelFocusLeftClass,
|
|
2414
2858
|
"peer-focus:top-0 peer-focus:-translate-y-1/2 peer-focus:text-xs peer-focus:px-1 peer-focus:bg-white peer-focus:text-gray-600 dark:peer-focus:bg-slate-900 dark:peer-focus:text-gray-300",
|
|
2415
2859
|
// when input is empty (placeholder shown) -> center label inside input
|
|
2416
2860
|
"peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:text-sm peer-placeholder-shown:bg-transparent peer-placeholder-shown:text-gray-500 dark:peer-placeholder-shown:text-gray-400"
|
|
2417
2861
|
),
|
|
2418
2862
|
children: label
|
|
2419
2863
|
}
|
|
2420
|
-
)
|
|
2864
|
+
),
|
|
2865
|
+
hasTrailingAdornment && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-3 inset-y-0 flex items-center", children: renderSuffix })
|
|
2421
2866
|
] }),
|
|
2422
2867
|
status?.message && /* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("text-sm", statusMessageClasses[status.tone]), children: status.message })
|
|
2423
2868
|
] });
|
|
@@ -2903,7 +3348,7 @@ var variantClasses4 = {
|
|
|
2903
3348
|
underlined: "rounded-none border-0 border-b border-gray-300 pl-0 pr-10 bg-transparent focus-visible:border-primary focus-visible:ring-0 focus-visible:ring-transparent dark:border-b-gray-300 dark:focus-visible:border-primary/70",
|
|
2904
3349
|
rounded: "rounded-full pl-4 pr-10 border border-gray-300 bg-white focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/20 shadow-sm dark:border-gray-600 dark:bg-slate-900 dark:focus-visible:border-primary/70 dark:focus-visible:ring-primary/30 dark:shadow-black/20"
|
|
2905
3350
|
};
|
|
2906
|
-
var
|
|
3351
|
+
var sizeClasses3 = {
|
|
2907
3352
|
"x-small": { padding: "pl-2 pr-8 py-2", text: "text-xs" },
|
|
2908
3353
|
small: { padding: "pl-2.5 pr-9 py-2.5", text: "text-sm" },
|
|
2909
3354
|
medium: { padding: "pl-3 pr-10 py-3", text: "text-base" },
|
|
@@ -2945,7 +3390,7 @@ var resolveIconClassName5 = (icon) => {
|
|
|
2945
3390
|
const classes = [...baseClasses, normalizedName];
|
|
2946
3391
|
return Array.from(new Set(classes)).join(" ");
|
|
2947
3392
|
};
|
|
2948
|
-
var Select = ({
|
|
3393
|
+
var Select = React4__namespace.default.forwardRef(({
|
|
2949
3394
|
options,
|
|
2950
3395
|
label,
|
|
2951
3396
|
placeholder,
|
|
@@ -2963,11 +3408,13 @@ var Select = ({
|
|
|
2963
3408
|
disabled,
|
|
2964
3409
|
required,
|
|
2965
3410
|
onChange,
|
|
3411
|
+
onBlur,
|
|
2966
3412
|
...props
|
|
2967
|
-
}) => {
|
|
3413
|
+
}, ref) => {
|
|
2968
3414
|
const selectId = id || name || generateString();
|
|
3415
|
+
const inputName = name || selectId;
|
|
2969
3416
|
const variantClass = variantClasses4[variant] ?? variantClasses4.outline;
|
|
2970
|
-
const sizeConfig =
|
|
3417
|
+
const sizeConfig = sizeClasses3[size] ?? sizeClasses3.medium;
|
|
2971
3418
|
const sizeClass = `${sizeConfig.padding} ${sizeConfig.text}`;
|
|
2972
3419
|
const normalizedOptions = options.map(normalizeOption);
|
|
2973
3420
|
const selectedValueList = value !== void 0 ? (Array.isArray(value) ? value : [value]).map(String) : defaultValue !== void 0 ? (Array.isArray(defaultValue) ? defaultValue : [defaultValue]).map(String) : [];
|
|
@@ -3023,12 +3470,14 @@ var Select = ({
|
|
|
3023
3470
|
{
|
|
3024
3471
|
type: multiple ? "checkbox" : "radio",
|
|
3025
3472
|
id: inputId,
|
|
3026
|
-
name:
|
|
3473
|
+
name: inputName,
|
|
3027
3474
|
value: option.value,
|
|
3028
3475
|
disabled: option.disabled || disabled,
|
|
3029
3476
|
checked: value !== void 0 ? isSelected : void 0,
|
|
3030
3477
|
defaultChecked: defaultValue !== void 0 ? isDefaultSelected : void 0,
|
|
3031
3478
|
onChange: handleOptionChange,
|
|
3479
|
+
onBlur,
|
|
3480
|
+
ref,
|
|
3032
3481
|
required: required && !multiple,
|
|
3033
3482
|
className: "peer sr-only"
|
|
3034
3483
|
}
|
|
@@ -3052,7 +3501,8 @@ var Select = ({
|
|
|
3052
3501
|
] }),
|
|
3053
3502
|
helperText && /* @__PURE__ */ jsxRuntime.jsx("p", { className: tailwindMerge.twMerge("mt-1 text-xs text-gray-500", error && "text-red-500"), children: helperText })
|
|
3054
3503
|
] });
|
|
3055
|
-
};
|
|
3504
|
+
});
|
|
3505
|
+
Select.displayName = "Select";
|
|
3056
3506
|
var Select_default = Select;
|
|
3057
3507
|
var paletteValues = {
|
|
3058
3508
|
primary: {
|
|
@@ -3325,7 +3775,7 @@ var Switch = React4.forwardRef(
|
|
|
3325
3775
|
);
|
|
3326
3776
|
Switch.displayName = "Switch";
|
|
3327
3777
|
var Switch_default = Switch;
|
|
3328
|
-
var
|
|
3778
|
+
var sizeClasses4 = {
|
|
3329
3779
|
"x-small": "text-xs",
|
|
3330
3780
|
small: "text-sm",
|
|
3331
3781
|
medium: "text-base",
|
|
@@ -3363,7 +3813,7 @@ var Icon = ({ className, icon, size, color, ...rest }) => {
|
|
|
3363
3813
|
}
|
|
3364
3814
|
}
|
|
3365
3815
|
const classBase = "mdi";
|
|
3366
|
-
const sizeClass = size ?
|
|
3816
|
+
const sizeClass = size ? sizeClasses4[size] ?? sizeClasses4.medium : void 0;
|
|
3367
3817
|
const colorClass = color ? colorClasses2[color] ?? colorClasses2.primary : void 0;
|
|
3368
3818
|
return /* @__PURE__ */ jsxRuntime.jsx("i", { ...rest, className: tailwindMerge.twMerge(classBase, iconValue, sizeClass, colorClass, className) });
|
|
3369
3819
|
};
|
|
@@ -3486,7 +3936,7 @@ var resolveIconClassName6 = (icon) => {
|
|
|
3486
3936
|
const normalized = iconName?.startsWith("mdi-") ? iconName : `mdi-${iconName}`;
|
|
3487
3937
|
return `mdi ${library} ${normalized}`.trim();
|
|
3488
3938
|
};
|
|
3489
|
-
var
|
|
3939
|
+
var resolveIconNode2 = (icon, fallbackClassName) => {
|
|
3490
3940
|
if (React4__namespace.isValidElement(icon)) return icon;
|
|
3491
3941
|
const iconClassName = resolveIconClassName6(icon) ?? fallbackClassName;
|
|
3492
3942
|
if (!iconClassName) return null;
|
|
@@ -3517,8 +3967,8 @@ var NotificationCard = ({ item }) => {
|
|
|
3517
3967
|
const hasDescription = description !== void 0 && description !== null;
|
|
3518
3968
|
const hasContent = hasMessage || hasDescription;
|
|
3519
3969
|
const accentClass = type ? typeAccentMap[type] : void 0;
|
|
3520
|
-
const iconNode =
|
|
3521
|
-
const closeIconNode =
|
|
3970
|
+
const iconNode = resolveIconNode2(icon, type ? `mdi ${typeIconMap[type]}` : void 0);
|
|
3971
|
+
const closeIconNode = resolveIconNode2(closeIcon, "mdi mdi-close");
|
|
3522
3972
|
const variantClass = resolveVariantClass3(variant, type);
|
|
3523
3973
|
const toneIconBg = type ? typeTone[type]?.iconBg : void 0;
|
|
3524
3974
|
const toneIconText = type ? typeTone[type]?.iconText : void 0;
|
|
@@ -3943,6 +4393,214 @@ var Progress = (props) => {
|
|
|
3943
4393
|
);
|
|
3944
4394
|
};
|
|
3945
4395
|
var Progress_default = Progress;
|
|
4396
|
+
var densityGapClasses = {
|
|
4397
|
+
default: "gap-6",
|
|
4398
|
+
compact: "gap-4"
|
|
4399
|
+
};
|
|
4400
|
+
var alignClasses = {
|
|
4401
|
+
start: "items-start",
|
|
4402
|
+
center: "items-center",
|
|
4403
|
+
end: "items-end"
|
|
4404
|
+
};
|
|
4405
|
+
var dotSizeClasses = {
|
|
4406
|
+
sm: "h-6 w-6 text-xs",
|
|
4407
|
+
md: "h-8 w-8 text-sm",
|
|
4408
|
+
lg: "h-10 w-10 text-base"
|
|
4409
|
+
};
|
|
4410
|
+
var paletteDotClasses = {
|
|
4411
|
+
primary: {
|
|
4412
|
+
filled: { dot: "bg-primary text-white border border-primary", ring: "ring-primary/30" },
|
|
4413
|
+
outlined: { dot: "bg-white text-primary border border-primary", ring: "ring-primary/20" },
|
|
4414
|
+
tonal: { dot: "bg-primary/15 text-primary border border-primary/20", ring: "ring-primary/20" }
|
|
4415
|
+
},
|
|
4416
|
+
neutral: {
|
|
4417
|
+
filled: { dot: "bg-gray-900 text-white border border-gray-900", ring: "ring-gray-900/20" },
|
|
4418
|
+
outlined: { dot: "bg-white text-gray-900 border border-gray-900", ring: "ring-gray-900/15" },
|
|
4419
|
+
tonal: { dot: "bg-gray-100 text-gray-800 border border-gray-200", ring: "ring-gray-900/10" }
|
|
4420
|
+
},
|
|
4421
|
+
info: {
|
|
4422
|
+
filled: { dot: "bg-sky-500 text-white border border-sky-500", ring: "ring-sky-500/30" },
|
|
4423
|
+
outlined: { dot: "bg-white text-sky-600 border border-sky-500", ring: "ring-sky-500/20" },
|
|
4424
|
+
tonal: { dot: "bg-sky-100 text-sky-700 border border-sky-200", ring: "ring-sky-500/20" }
|
|
4425
|
+
},
|
|
4426
|
+
success: {
|
|
4427
|
+
filled: { dot: "bg-emerald-500 text-white border border-emerald-500", ring: "ring-emerald-500/30" },
|
|
4428
|
+
outlined: { dot: "bg-white text-emerald-600 border border-emerald-500", ring: "ring-emerald-500/20" },
|
|
4429
|
+
tonal: { dot: "bg-emerald-100 text-emerald-700 border border-emerald-200", ring: "ring-emerald-500/20" }
|
|
4430
|
+
},
|
|
4431
|
+
warning: {
|
|
4432
|
+
filled: { dot: "bg-amber-500 text-white border border-amber-500", ring: "ring-amber-500/30" },
|
|
4433
|
+
outlined: { dot: "bg-white text-amber-700 border border-amber-500", ring: "ring-amber-500/20" },
|
|
4434
|
+
tonal: { dot: "bg-amber-100 text-amber-800 border border-amber-200", ring: "ring-amber-500/20" }
|
|
4435
|
+
},
|
|
4436
|
+
danger: {
|
|
4437
|
+
filled: { dot: "bg-red-500 text-white border border-red-500", ring: "ring-red-500/30" },
|
|
4438
|
+
outlined: { dot: "bg-white text-red-600 border border-red-500", ring: "ring-red-500/20" },
|
|
4439
|
+
tonal: { dot: "bg-red-100 text-red-700 border border-red-200", ring: "ring-red-500/20" }
|
|
4440
|
+
},
|
|
4441
|
+
surface: {
|
|
4442
|
+
filled: { dot: "bg-white text-gray-900 border border-gray-200", ring: "ring-gray-300/30" },
|
|
4443
|
+
outlined: { dot: "bg-white text-gray-900 border border-gray-300", ring: "ring-gray-300/20" },
|
|
4444
|
+
tonal: { dot: "bg-gray-50 text-gray-800 border border-gray-200", ring: "ring-gray-300/20" }
|
|
4445
|
+
},
|
|
4446
|
+
bw: {
|
|
4447
|
+
filled: { dot: "bg-black text-white border border-black", ring: "ring-black/30" },
|
|
4448
|
+
outlined: { dot: "bg-white text-black border border-black", ring: "ring-black/20" },
|
|
4449
|
+
tonal: { dot: "bg-black/10 text-black border border-black/20", ring: "ring-black/20" }
|
|
4450
|
+
}
|
|
4451
|
+
};
|
|
4452
|
+
var resolveDotPalette = (color, variant) => {
|
|
4453
|
+
const palette = paletteDotClasses[color] ?? paletteDotClasses.primary;
|
|
4454
|
+
return palette[variant] ?? palette.filled;
|
|
4455
|
+
};
|
|
4456
|
+
var resolveSide = (side, index) => {
|
|
4457
|
+
if (side === "alternate") {
|
|
4458
|
+
return index % 2 === 0 ? "left" : "right";
|
|
4459
|
+
}
|
|
4460
|
+
return side;
|
|
4461
|
+
};
|
|
4462
|
+
var resolveIconNode3 = (icon) => {
|
|
4463
|
+
if (!icon) return null;
|
|
4464
|
+
const iconClass = resolveIconClassName2(icon);
|
|
4465
|
+
return iconClass ? /* @__PURE__ */ jsxRuntime.jsx("i", { className: iconClass, "aria-hidden": true }) : null;
|
|
4466
|
+
};
|
|
4467
|
+
var TimeLineItem = React4__namespace.forwardRef((props, ref) => {
|
|
4468
|
+
const {
|
|
4469
|
+
title,
|
|
4470
|
+
subtitle,
|
|
4471
|
+
opposite,
|
|
4472
|
+
icon,
|
|
4473
|
+
dot,
|
|
4474
|
+
color,
|
|
4475
|
+
variant = "filled",
|
|
4476
|
+
side,
|
|
4477
|
+
align,
|
|
4478
|
+
hideLine,
|
|
4479
|
+
dotClassName,
|
|
4480
|
+
contentClassName,
|
|
4481
|
+
oppositeClassName,
|
|
4482
|
+
lineClassName,
|
|
4483
|
+
className,
|
|
4484
|
+
children,
|
|
4485
|
+
__timelineSide = "right",
|
|
4486
|
+
__timelineAlign = "center",
|
|
4487
|
+
__timelineDensity = "default",
|
|
4488
|
+
__timelineColor = "primary",
|
|
4489
|
+
__timelineDotSize = "md",
|
|
4490
|
+
__timelineLineColor,
|
|
4491
|
+
__timelineLineWidth = 2,
|
|
4492
|
+
__timelineIndex = 0,
|
|
4493
|
+
__timelineCount = 1,
|
|
4494
|
+
...rest
|
|
4495
|
+
} = props;
|
|
4496
|
+
const resolvedAlign = align ?? __timelineAlign;
|
|
4497
|
+
const resolvedSide = resolveSide(side ?? __timelineSide, __timelineIndex);
|
|
4498
|
+
const resolvedColor = color ?? __timelineColor;
|
|
4499
|
+
const dotSizeClass = dotSizeClasses[__timelineDotSize] ?? dotSizeClasses.md;
|
|
4500
|
+
const dotPalette = resolveDotPalette(resolvedColor, variant);
|
|
4501
|
+
const iconNode = resolveIconNode3(icon);
|
|
4502
|
+
const isLast = __timelineIndex >= __timelineCount - 1;
|
|
4503
|
+
const showLine = !hideLine && !isLast;
|
|
4504
|
+
const lineStyle = {
|
|
4505
|
+
width: __timelineLineWidth,
|
|
4506
|
+
backgroundColor: __timelineLineColor
|
|
4507
|
+
};
|
|
4508
|
+
const baseItemClass = tailwindMerge.twMerge(
|
|
4509
|
+
"timeline-item grid grid-cols-[1fr_auto_1fr] gap-4",
|
|
4510
|
+
alignClasses[resolvedAlign] ?? alignClasses.center,
|
|
4511
|
+
className
|
|
4512
|
+
);
|
|
4513
|
+
const contentNode = children ?? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
4514
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-semibold text-gray-900", children: title }),
|
|
4515
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-gray-500", children: subtitle })
|
|
4516
|
+
] });
|
|
4517
|
+
const leftContent = resolvedSide === "left" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("flex flex-col text-right", contentClassName), children: contentNode }) : opposite ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("flex flex-col text-right text-sm text-gray-500", oppositeClassName), children: opposite }) : /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
4518
|
+
const rightContent = resolvedSide === "right" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("flex flex-col text-left", contentClassName), children: contentNode }) : opposite ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("flex flex-col text-left text-sm text-gray-500", oppositeClassName), children: opposite }) : /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
4519
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, ref, className: baseItemClass, children: [
|
|
4520
|
+
leftContent,
|
|
4521
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex h-full flex-col items-center", children: [
|
|
4522
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4523
|
+
"span",
|
|
4524
|
+
{
|
|
4525
|
+
className: tailwindMerge.twMerge(
|
|
4526
|
+
"flex items-center justify-center rounded-full ring-4 ring-white",
|
|
4527
|
+
dotSizeClass,
|
|
4528
|
+
dotPalette.dot,
|
|
4529
|
+
dotPalette.ring,
|
|
4530
|
+
dotClassName
|
|
4531
|
+
),
|
|
4532
|
+
children: dot ?? iconNode
|
|
4533
|
+
}
|
|
4534
|
+
),
|
|
4535
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4536
|
+
"span",
|
|
4537
|
+
{
|
|
4538
|
+
className: tailwindMerge.twMerge(
|
|
4539
|
+
"mt-3 flex-1 bg-gray-200 dark:bg-gray-700",
|
|
4540
|
+
showLine ? void 0 : "invisible",
|
|
4541
|
+
lineClassName
|
|
4542
|
+
),
|
|
4543
|
+
style: lineStyle,
|
|
4544
|
+
"aria-hidden": true
|
|
4545
|
+
}
|
|
4546
|
+
)
|
|
4547
|
+
] }),
|
|
4548
|
+
rightContent
|
|
4549
|
+
] });
|
|
4550
|
+
});
|
|
4551
|
+
TimeLineItem.displayName = "TimeLine.Item";
|
|
4552
|
+
var isTimeLineItem = (child) => {
|
|
4553
|
+
if (!React4__namespace.isValidElement(child)) {
|
|
4554
|
+
return false;
|
|
4555
|
+
}
|
|
4556
|
+
const elementType = child.type;
|
|
4557
|
+
return child.type === TimeLineItem || elementType.displayName === TimeLineItem.displayName;
|
|
4558
|
+
};
|
|
4559
|
+
var TimeLine = React4__namespace.forwardRef((props, ref) => {
|
|
4560
|
+
const {
|
|
4561
|
+
side = "right",
|
|
4562
|
+
align = "center",
|
|
4563
|
+
density = "default",
|
|
4564
|
+
color = "primary",
|
|
4565
|
+
lineColor,
|
|
4566
|
+
lineWidth = 2,
|
|
4567
|
+
dotSize = "md",
|
|
4568
|
+
className,
|
|
4569
|
+
children,
|
|
4570
|
+
...rest
|
|
4571
|
+
} = props;
|
|
4572
|
+
const resolvedGap = densityGapClasses[density] ?? densityGapClasses.default;
|
|
4573
|
+
const childArray = React4__namespace.Children.toArray(children);
|
|
4574
|
+
const resolvedChildren = childArray.map((child, index) => {
|
|
4575
|
+
if (!isTimeLineItem(child)) {
|
|
4576
|
+
return child;
|
|
4577
|
+
}
|
|
4578
|
+
return React4__namespace.cloneElement(child, {
|
|
4579
|
+
__timelineSide: side,
|
|
4580
|
+
__timelineAlign: align,
|
|
4581
|
+
__timelineDensity: density,
|
|
4582
|
+
__timelineColor: color,
|
|
4583
|
+
__timelineDotSize: dotSize,
|
|
4584
|
+
__timelineLineColor: lineColor,
|
|
4585
|
+
__timelineLineWidth: lineWidth,
|
|
4586
|
+
__timelineIndex: index,
|
|
4587
|
+
__timelineCount: childArray.length
|
|
4588
|
+
});
|
|
4589
|
+
});
|
|
4590
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4591
|
+
"div",
|
|
4592
|
+
{
|
|
4593
|
+
...rest,
|
|
4594
|
+
ref,
|
|
4595
|
+
className: tailwindMerge.twMerge("timeline flex flex-col", resolvedGap, className),
|
|
4596
|
+
children: resolvedChildren
|
|
4597
|
+
}
|
|
4598
|
+
);
|
|
4599
|
+
});
|
|
4600
|
+
TimeLine.displayName = "TimeLine";
|
|
4601
|
+
var TimeLineWithItem = TimeLine;
|
|
4602
|
+
TimeLineWithItem.Item = TimeLineItem;
|
|
4603
|
+
var TimeLine_default = TimeLineWithItem;
|
|
3946
4604
|
|
|
3947
4605
|
exports.Alert = Alert_default;
|
|
3948
4606
|
exports.AppBar = AppBar_default;
|
|
@@ -3967,7 +4625,11 @@ exports.Progress = Progress_default;
|
|
|
3967
4625
|
exports.Select = Select_default;
|
|
3968
4626
|
exports.Slider = Slider_default;
|
|
3969
4627
|
exports.Switch = Switch_default;
|
|
4628
|
+
exports.Tab = Tab;
|
|
4629
|
+
exports.Tabs = Tabs_default;
|
|
3970
4630
|
exports.TextArea = TextArea_default;
|
|
4631
|
+
exports.TimeLine = TimeLine_default;
|
|
4632
|
+
exports.TimeLineItem = TimeLineItem;
|
|
3971
4633
|
exports.ToolTip = ToolTip_default;
|
|
3972
4634
|
exports.useNotification = useNotification_default;
|
|
3973
4635
|
//# sourceMappingURL=index.cjs.map
|