@lindle/linoardo 1.0.20 → 1.0.21
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/button.cjs +30 -15
- package/dist/button.cjs.map +1 -1
- package/dist/button.d.cts +17 -7
- package/dist/button.d.ts +17 -7
- package/dist/button.js +1 -1
- package/dist/card.cjs +2 -2
- package/dist/card.cjs.map +1 -1
- package/dist/card.js +1 -1
- package/dist/chip.cjs +8 -9
- package/dist/chip.cjs.map +1 -1
- package/dist/chip.d.cts +4 -4
- package/dist/chip.d.ts +4 -4
- package/dist/chip.js +1 -1
- package/dist/{chunk-B5FW33K3.js → chunk-2UL3S6KC.js} +4 -4
- package/dist/chunk-2UL3S6KC.js.map +1 -0
- package/dist/{chunk-5PBPURGP.js → chunk-DSZ3EOQB.js} +10 -11
- package/dist/chunk-DSZ3EOQB.js.map +1 -0
- package/dist/{chunk-MFLH36XK.js → chunk-JGEXEDKS.js} +3 -3
- package/dist/{chunk-MFLH36XK.js.map → chunk-JGEXEDKS.js.map} +1 -1
- package/dist/chunk-QRBJFDV5.js +170 -0
- package/dist/chunk-QRBJFDV5.js.map +1 -0
- package/dist/{chunk-SZU6OYLS.js → chunk-RFPNVLAD.js} +31 -17
- package/dist/chunk-RFPNVLAD.js.map +1 -0
- package/dist/{chunk-36T6I3XH.js → chunk-SAGQYMS3.js} +14 -14
- package/dist/chunk-SAGQYMS3.js.map +1 -0
- package/dist/chunk-VPF7M2PB.js +141 -0
- package/dist/chunk-VPF7M2PB.js.map +1 -0
- package/dist/hero.cjs +143 -0
- package/dist/hero.cjs.map +1 -0
- package/dist/hero.d.cts +34 -0
- package/dist/hero.d.ts +34 -0
- package/dist/hero.js +3 -0
- package/dist/hero.js.map +1 -0
- package/dist/index.cjs +88 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -59
- package/dist/index.d.ts +4 -59
- package/dist/index.js +7 -286
- package/dist/index.js.map +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.cjs.map +1 -1
- package/dist/input.js +1 -1
- package/dist/profileCard.cjs +391 -0
- package/dist/profileCard.cjs.map +1 -0
- package/dist/profileCard.d.cts +29 -0
- package/dist/profileCard.d.ts +29 -0
- package/dist/profileCard.js +5 -0
- package/dist/profileCard.js.map +1 -0
- package/dist/select.cjs +12 -12
- package/dist/select.cjs.map +1 -1
- package/dist/select.js +1 -1
- package/dist/styles.css +108 -9
- package/dist/switch.d.cts +1 -1
- package/dist/switch.d.ts +1 -1
- package/package.json +2 -1
- package/dist/chunk-36T6I3XH.js.map +0 -1
- package/dist/chunk-5PBPURGP.js.map +0 -1
- package/dist/chunk-B5FW33K3.js.map +0 -1
- package/dist/chunk-SZU6OYLS.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -30,17 +30,18 @@ var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
|
|
|
30
30
|
var iconBaseClasses = {
|
|
31
31
|
mdi: ["mdi"]
|
|
32
32
|
};
|
|
33
|
+
|
|
34
|
+
// src/Containment/Button/states.button.ts
|
|
33
35
|
var base = "btn-base focus-visible:outline-none focus-visible:ring-2 rounded-lg transition-colors duration-200 font-medium disabled:opacity-50 disabled:cursor-not-allowed";
|
|
34
|
-
var blackAndWhiteVariantClass = "bg-white text-black border border-black focus-visible:ring-black/40 focus-visible:ring-offset-white";
|
|
35
36
|
var blackAndWhitePaletteClasses = {
|
|
36
|
-
solid:
|
|
37
|
-
outline:
|
|
38
|
-
ghost: "bg-neutral-300
|
|
39
|
-
text:
|
|
40
|
-
filled: "bg-black text-
|
|
41
|
-
underlined:
|
|
42
|
-
rounded:
|
|
43
|
-
sharp: "bg-black text-white rounded-none"
|
|
37
|
+
solid: "bg-black text-white hover:bg-black/90 focus-visible:ring-black/40 focus-visible:ring-offset-white",
|
|
38
|
+
outline: "border-2 border-black text-black bg-white hover:bg-black hover:text-white focus-visible:ring-black/40 focus-visible:ring-offset-white",
|
|
39
|
+
ghost: "text-black bg-neutral-200 hover:bg-neutral-300 focus-visible:ring-black/20 border border-transparent",
|
|
40
|
+
text: "bg-transparent text-black hover:bg-neutral-200 focus-visible:ring-black/20 underline-offset-2 border border-transparent",
|
|
41
|
+
filled: "bg-black/10 text-black border border-black/30 hover:bg-black/20 focus-visible:ring-black/20",
|
|
42
|
+
underlined: "bg-transparent text-black border border-transparent underline decoration-2 underline-offset-4 hover:bg-neutral-200 focus-visible:ring-black/20",
|
|
43
|
+
rounded: "rounded-full border-2 border-black bg-white text-black hover:bg-black hover:text-white focus-visible:ring-black/40 focus-visible:ring-offset-white",
|
|
44
|
+
sharp: "bg-black text-white rounded-none hover:bg-black/90 focus-visible:ring-black/40"
|
|
44
45
|
};
|
|
45
46
|
var paletteVariantClasses = {
|
|
46
47
|
primary: {
|
|
@@ -136,7 +137,9 @@ var resolveIconClassName = (icon) => {
|
|
|
136
137
|
}
|
|
137
138
|
const [library, providedName] = icon;
|
|
138
139
|
const normalizedLibrary = library.trim();
|
|
139
|
-
const baseClasses = iconBaseClasses[normalizedLibrary] ?? [
|
|
140
|
+
const baseClasses = iconBaseClasses[normalizedLibrary] ?? [
|
|
141
|
+
normalizedLibrary
|
|
142
|
+
];
|
|
140
143
|
const iconName = providedName.trim();
|
|
141
144
|
if (!iconName) {
|
|
142
145
|
return baseClasses.join(" ");
|
|
@@ -152,12 +155,19 @@ var sizeClasses = {
|
|
|
152
155
|
"x-large": "px-7 py-3.5 text-xl"
|
|
153
156
|
};
|
|
154
157
|
var iconOnlySizeClasses = {
|
|
155
|
-
"x-small": "p-
|
|
158
|
+
"x-small": "p-0 text-xs aspect-square",
|
|
156
159
|
small: "p-2.5 text-sm aspect-square",
|
|
157
160
|
medium: "p-3 text-base aspect-square",
|
|
158
161
|
large: "p-3.5 text-lg aspect-square",
|
|
159
162
|
"x-large": "p-4 text-xl aspect-square"
|
|
160
163
|
};
|
|
164
|
+
var iconOnlyIconSizeClasses = {
|
|
165
|
+
"x-small": "text-sm",
|
|
166
|
+
small: "text-base",
|
|
167
|
+
medium: "text-lg",
|
|
168
|
+
large: "text-xl",
|
|
169
|
+
"x-large": "text-2xl"
|
|
170
|
+
};
|
|
161
171
|
var Button = React3__namespace.forwardRef(
|
|
162
172
|
({
|
|
163
173
|
variant = "solid",
|
|
@@ -172,11 +182,15 @@ var Button = React3__namespace.forwardRef(
|
|
|
172
182
|
children,
|
|
173
183
|
disabled,
|
|
174
184
|
onClick,
|
|
185
|
+
as,
|
|
175
186
|
...rest
|
|
176
187
|
}, ref) => {
|
|
188
|
+
const Component = as ?? "button";
|
|
177
189
|
const variantClass = resolveVariantClass(variant, color);
|
|
178
190
|
const sizeClass = iconOnly ? iconOnlySizeClasses[size] ?? iconOnlySizeClasses.medium : sizeClasses[size] ?? sizeClasses.medium;
|
|
191
|
+
const iconSizeClass = iconOnly ? iconOnlyIconSizeClasses[size] ?? iconOnlyIconSizeClasses.medium : void 0;
|
|
179
192
|
const blockClass = block ? "w-full" : null;
|
|
193
|
+
const isNativeButton = Component === "button";
|
|
180
194
|
const isDisabled = disabled || loading;
|
|
181
195
|
const cursor = onClick && !isDisabled ? "cursor-pointer" : "cursor-default";
|
|
182
196
|
const resolvedIconClass = resolveIconClassName(icon);
|
|
@@ -185,15 +199,16 @@ var Button = React3__namespace.forwardRef(
|
|
|
185
199
|
const content = iconOnly ? null : loading && isLoadingTextProvided ? loadingText : children;
|
|
186
200
|
const hasDecorators = (loading || shouldRenderIcon) && Boolean(content);
|
|
187
201
|
const gapClass = hasDecorators ? "gap-2" : void 0;
|
|
188
|
-
const loadingIconClass = loading ? tailwindMerge.twMerge("mdi mdi-loading mdi-spin", "leading-none") : void 0;
|
|
189
|
-
const iconClassName = shouldRenderIcon ? tailwindMerge.twMerge("leading-none", resolvedIconClass) : void 0;
|
|
202
|
+
const loadingIconClass = loading ? tailwindMerge.twMerge("mdi mdi-loading mdi-spin", "leading-none", iconSizeClass) : void 0;
|
|
203
|
+
const iconClassName = shouldRenderIcon ? tailwindMerge.twMerge("leading-none", iconSizeClass, resolvedIconClass) : void 0;
|
|
190
204
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
191
|
-
|
|
205
|
+
Component,
|
|
192
206
|
{
|
|
193
207
|
...rest,
|
|
194
208
|
ref,
|
|
195
209
|
onClick,
|
|
196
|
-
disabled: isDisabled,
|
|
210
|
+
disabled: isNativeButton ? isDisabled : void 0,
|
|
211
|
+
"aria-disabled": !isNativeButton ? isDisabled : void 0,
|
|
197
212
|
className: tailwindMerge.twMerge(base, cursor, variantClass, sizeClass, blockClass, gapClass, className),
|
|
198
213
|
"data-loading": loading || void 0,
|
|
199
214
|
"aria-busy": loading || void 0,
|
|
@@ -217,16 +232,15 @@ var chipSizeClasses = {
|
|
|
217
232
|
large: "text-base px-5 py-2 min-h-[2.5rem]"
|
|
218
233
|
};
|
|
219
234
|
var closeButtonClasses = "ml-1 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border border-transparent text-current/70 transition-colors duration-200 hover:bg-current/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-current/30 focus-visible:ring-offset-2";
|
|
220
|
-
var blackAndWhiteChipVariantClass = "bg-white text-black border border-black hover:bg-white focus-visible:ring-black/40 focus-visible:ring-offset-white";
|
|
221
235
|
var blackAndWhitePaletteClasses2 = {
|
|
222
|
-
solid:
|
|
223
|
-
outline:
|
|
224
|
-
ghost:
|
|
225
|
-
text:
|
|
226
|
-
filled:
|
|
227
|
-
underlined:
|
|
228
|
-
rounded:
|
|
229
|
-
sharp:
|
|
236
|
+
solid: "bg-black text-white border border-black hover:bg-black/90 focus-visible:ring-black/40 focus-visible:ring-offset-white",
|
|
237
|
+
outline: "bg-white text-black border-2 border-black hover:bg-black hover:text-white focus-visible:ring-black/40 focus-visible:ring-offset-white",
|
|
238
|
+
ghost: "bg-neutral-200 text-black border border-transparent hover:bg-neutral-300 focus-visible:ring-black/20",
|
|
239
|
+
text: "bg-transparent text-black border border-transparent hover:bg-neutral-200 focus-visible:ring-black/20",
|
|
240
|
+
filled: "bg-black/10 text-black border border-black/30 hover:bg-black/20 focus-visible:ring-black/20",
|
|
241
|
+
underlined: "bg-transparent text-black border-0 border-b-2 border-black px-0 rounded-none hover:text-black/80 focus-visible:ring-black/20",
|
|
242
|
+
rounded: "rounded-full bg-white text-black border-2 border-black hover:bg-black hover:text-white focus-visible:ring-black/40 focus-visible:ring-offset-white",
|
|
243
|
+
sharp: "rounded-none bg-black text-white border border-black hover:bg-black/90 focus-visible:ring-black/40 focus-visible:ring-offset-white"
|
|
230
244
|
};
|
|
231
245
|
var paletteVariantClasses2 = {
|
|
232
246
|
primary: {
|
|
@@ -1421,7 +1435,7 @@ var paddingClasses = {
|
|
|
1421
1435
|
var cardBase = "card-base relative w-full overflow-hidden bg-white text-gray-900 transition-colors dark:bg-slate-900 dark:text-slate-100";
|
|
1422
1436
|
var variantClasses = {
|
|
1423
1437
|
solid: "rounded-2xl border border-gray-200 bg-white shadow-lg shadow-gray-200/55 dark:border-slate-800 dark:bg-slate-900 dark:shadow-black/30",
|
|
1424
|
-
outline: "rounded-2xl border border-
|
|
1438
|
+
outline: "rounded-2xl border-2 border-black bg-white shadow-none dark:border-black dark:bg-slate-900",
|
|
1425
1439
|
text: "rounded-2xl border border-transparent bg-transparent shadow-none dark:border-transparent dark:bg-transparent",
|
|
1426
1440
|
ghost: "rounded-2xl border border-transparent bg-gray-50 shadow-none dark:border-transparent dark:bg-slate-800",
|
|
1427
1441
|
filled: "rounded-2xl border border-gray-200 bg-gray-50 shadow-sm dark:border-slate-800 dark:bg-slate-800 dark:shadow-black/20",
|
|
@@ -1778,7 +1792,17 @@ var variantMap = {
|
|
|
1778
1792
|
rounded: "bg-white text-gray-900 border border-gray-200 rounded-3xl shadow-md",
|
|
1779
1793
|
sharp: "bg-white text-gray-900 border border-gray-200 rounded-none shadow"
|
|
1780
1794
|
};
|
|
1781
|
-
var
|
|
1795
|
+
var cardRadiusMap = {
|
|
1796
|
+
solid: "rounded-2xl",
|
|
1797
|
+
outline: "rounded-2xl",
|
|
1798
|
+
text: "rounded-2xl",
|
|
1799
|
+
ghost: "rounded-2xl",
|
|
1800
|
+
filled: "rounded-3xl",
|
|
1801
|
+
underlined: "rounded-t-2xl",
|
|
1802
|
+
rounded: "rounded-3xl",
|
|
1803
|
+
sharp: "rounded-none"
|
|
1804
|
+
};
|
|
1805
|
+
var avatarRadiusMap = {
|
|
1782
1806
|
solid: "rounded-2xl",
|
|
1783
1807
|
outline: "rounded-2xl",
|
|
1784
1808
|
text: "rounded-2xl",
|
|
@@ -1789,13 +1813,26 @@ var radiusMap = {
|
|
|
1789
1813
|
sharp: "rounded-none"
|
|
1790
1814
|
};
|
|
1791
1815
|
var isDarkVariant = (variant) => variant === "filled";
|
|
1792
|
-
var SocialIcons = ({
|
|
1816
|
+
var SocialIcons = ({
|
|
1817
|
+
socials = [],
|
|
1818
|
+
dark
|
|
1819
|
+
}) => {
|
|
1793
1820
|
if (socials.length === 0) return null;
|
|
1794
|
-
|
|
1821
|
+
tailwindMerge.twMerge(
|
|
1795
1822
|
"flex h-10 w-10 items-center justify-center rounded-full border text-lg transition",
|
|
1796
1823
|
dark ? "border-white/30 text-white hover:bg-white/10" : "border-gray-200 text-gray-600 hover:border-primary/50 hover:text-primary"
|
|
1797
1824
|
);
|
|
1798
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: socials.map((link) =>
|
|
1825
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: socials.map((link) => (
|
|
1826
|
+
// <a
|
|
1827
|
+
// key={link.href}
|
|
1828
|
+
// href={link.href}
|
|
1829
|
+
// aria-label={link.label ?? link.icon}
|
|
1830
|
+
// className={iconBase}
|
|
1831
|
+
// >
|
|
1832
|
+
// <i className={twMerge('mdi', link.icon)} aria-hidden />
|
|
1833
|
+
// </a>
|
|
1834
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button_default, { iconOnly: true, icon: link.icon, variant: "rounded", size: "x-small" })
|
|
1835
|
+
)) });
|
|
1799
1836
|
};
|
|
1800
1837
|
var Badges = ({ badges = [], dark }) => {
|
|
1801
1838
|
if (badges.length === 0) return null;
|
|
@@ -1805,19 +1842,14 @@ var Badges = ({ badges = [], dark }) => {
|
|
|
1805
1842
|
);
|
|
1806
1843
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: badges.map((badge) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: badgeBase, children: badge.label }, badge.label)) });
|
|
1807
1844
|
};
|
|
1808
|
-
var AvatarFrame = ({
|
|
1809
|
-
avatar,
|
|
1810
|
-
size = "md",
|
|
1811
|
-
ring,
|
|
1812
|
-
radius
|
|
1813
|
-
}) => {
|
|
1845
|
+
var AvatarFrame = ({ avatar, size = "md", ring, radius }) => {
|
|
1814
1846
|
const dimension = size === "lg" ? "h-28 w-28" : "h-20 w-20";
|
|
1815
1847
|
const ringClass = ring ? "ring-4 ring-white/80 ring-offset-4 ring-offset-transparent" : "";
|
|
1816
1848
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1817
1849
|
"div",
|
|
1818
1850
|
{
|
|
1819
1851
|
className: tailwindMerge.twMerge(
|
|
1820
|
-
"overflow-hidden bg-
|
|
1852
|
+
"overflow-hidden bg-linear-to-br from-primary/10 to-primary/30",
|
|
1821
1853
|
radius,
|
|
1822
1854
|
dimension,
|
|
1823
1855
|
ringClass
|
|
@@ -1847,14 +1879,15 @@ var ProfileCard = ({
|
|
|
1847
1879
|
...rest
|
|
1848
1880
|
}) => {
|
|
1849
1881
|
const baseVariant = variantMap[variant] ?? variantMap.solid;
|
|
1850
|
-
const
|
|
1882
|
+
const cardRadius = cardRadiusMap[variant] ?? "rounded-2xl";
|
|
1883
|
+
const avatarRadius = avatarRadiusMap[variant] ?? "rounded-2xl";
|
|
1851
1884
|
const dark = isDarkVariant(variant);
|
|
1852
1885
|
const muted = dark ? "text-white/70" : "text-gray-600";
|
|
1853
1886
|
const accent = dark ? "text-white" : "text-gray-900";
|
|
1854
1887
|
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1855
1888
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
1856
1889
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1857
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarFrame, { avatar, radius }),
|
|
1890
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarFrame, { avatar, radius: avatarRadius }),
|
|
1858
1891
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1859
1892
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: tailwindMerge.twMerge("text-xl font-semibold", accent), children: name }),
|
|
1860
1893
|
role && /* @__PURE__ */ jsxRuntime.jsx("p", { className: tailwindMerge.twMerge("text-sm font-medium", muted), children: role })
|
|
@@ -1866,9 +1899,9 @@ var ProfileCard = ({
|
|
|
1866
1899
|
/* @__PURE__ */ jsxRuntime.jsx(SocialIcons, { socials, dark })
|
|
1867
1900
|
] });
|
|
1868
1901
|
const spotlightContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative overflow-hidden", children: [
|
|
1869
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-
|
|
1902
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-linear-to-br from-primary/10 via-transparent to-primary/20 blur-3xl" }),
|
|
1870
1903
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-col gap-6 md:flex-row md:items-center", children: [
|
|
1871
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarFrame, { avatar, size: "lg", ring: true, radius }),
|
|
1904
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarFrame, { avatar, size: "lg", ring: true, radius: avatarRadius }),
|
|
1872
1905
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
1873
1906
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: tailwindMerge.twMerge("text-2xl font-semibold", accent), children: name }),
|
|
1874
1907
|
role && /* @__PURE__ */ jsxRuntime.jsx("p", { className: tailwindMerge.twMerge("text-sm font-medium uppercase tracking-wide", muted), children: role }),
|
|
@@ -1879,7 +1912,7 @@ var ProfileCard = ({
|
|
|
1879
1912
|
] })
|
|
1880
1913
|
] });
|
|
1881
1914
|
const splitContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-6 md:grid-cols-[auto,1fr] md:items-center", children: [
|
|
1882
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarFrame, { avatar, size: "lg", ring: true, radius }),
|
|
1915
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarFrame, { avatar, size: "lg", ring: true, radius: avatarRadius }),
|
|
1883
1916
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
1884
1917
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1885
1918
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: tailwindMerge.twMerge("text-2xl font-semibold", accent), children: name }),
|
|
@@ -1902,7 +1935,7 @@ var ProfileCard = ({
|
|
|
1902
1935
|
className: tailwindMerge.twMerge(
|
|
1903
1936
|
"profile-card relative overflow-hidden p-6 transition duration-200 hover:-translate-y-0.5 hover:shadow-xl",
|
|
1904
1937
|
baseVariant,
|
|
1905
|
-
|
|
1938
|
+
cardRadius,
|
|
1906
1939
|
className
|
|
1907
1940
|
),
|
|
1908
1941
|
children: layoutMap[layout] ?? layoutMap.classic
|
|
@@ -1960,7 +1993,7 @@ var Input = ({
|
|
|
1960
1993
|
const variantClasses3 = {
|
|
1961
1994
|
solid: "rounded border border-gray-400 bg-white shadow-sm focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/30 dark:border-gray-600 dark:bg-slate-900 dark:shadow-black/20 dark:focus-visible:border-primary/70 dark:focus-visible:ring-primary/40",
|
|
1962
1995
|
sharp: "rounded-none border border-gray-400 bg-white shadow-sm focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/30 dark:border-gray-600 dark:bg-slate-900 dark:shadow-black/20 dark:focus-visible:border-primary/70 dark:focus-visible:ring-primary/40",
|
|
1963
|
-
outline: "rounded border border-
|
|
1996
|
+
outline: "rounded border-2 border-black bg-white focus-visible:border-black focus-visible:ring-2 focus-visible:ring-black/30 dark:border-black dark:bg-transparent dark:focus-visible:border-black dark:focus-visible:ring-black/40",
|
|
1964
1997
|
text: "rounded-none border-0 border-b border-transparent 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",
|
|
1965
1998
|
ghost: "rounded border border-transparent bg-gray-50 text-gray-900 focus-visible:bg-white focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/15 dark:bg-slate-800 dark:text-gray-100 dark:focus-visible:bg-slate-700 dark:focus-visible:border-primary/60 dark:focus-visible:ring-primary/25",
|
|
1966
1999
|
filled: "rounded border border-gray-200 bg-gray-100 focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/25 dark:border-gray-700 dark:bg-slate-800 dark:focus-visible:border-primary/60 dark:focus-visible:ring-primary/30",
|
|
@@ -2082,16 +2115,16 @@ function generateString(length = 5) {
|
|
|
2082
2115
|
}
|
|
2083
2116
|
return result;
|
|
2084
2117
|
}
|
|
2085
|
-
var baseClass = "select-base w-full appearance-none focus-visible:outline-none focus-visible:ring-primary transition-colors duration-200 disabled:opacity-50 disabled:cursor-not-allowed bg-white text-gray-900";
|
|
2118
|
+
var baseClass = "select-base w-full appearance-none focus-visible:outline-none focus-visible:ring-primary transition-colors duration-200 disabled:opacity-50 disabled:cursor-not-allowed bg-white text-gray-900 placeholder:text-gray-500 dark:bg-slate-900 dark:text-gray-100 dark:placeholder:text-gray-400";
|
|
2086
2119
|
var variantClasses2 = {
|
|
2087
|
-
solid: "rounded border border-gray-400 bg-white shadow-sm focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/30",
|
|
2088
|
-
sharp: "rounded-none border border-gray-400 bg-white shadow-sm focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/30",
|
|
2089
|
-
outline: "rounded border border-
|
|
2090
|
-
text: "rounded-none border-0 border-b border-transparent pl-0 pr-10 bg-transparent focus-visible:border-primary focus-visible:ring-0 focus-visible:ring-transparent",
|
|
2091
|
-
ghost: "rounded border border-transparent bg-gray-50 text-gray-900 focus-visible:bg-white focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/15",
|
|
2092
|
-
filled: "rounded border border-gray-200 bg-gray-100 focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/25",
|
|
2093
|
-
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",
|
|
2094
|
-
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"
|
|
2120
|
+
solid: "rounded border border-gray-400 bg-white shadow-sm focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/30 dark:border-gray-600 dark:bg-slate-900 dark:shadow-black/20 dark:focus-visible:border-primary/70 dark:focus-visible:ring-primary/40",
|
|
2121
|
+
sharp: "rounded-none border border-gray-400 bg-white shadow-sm focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/30 dark:border-gray-600 dark:bg-slate-900 dark:shadow-black/20 dark:focus-visible:border-primary/70 dark:focus-visible:ring-primary/40",
|
|
2122
|
+
outline: "rounded border-2 border-black bg-white focus-visible:border-black focus-visible:ring-2 focus-visible:ring-black/30 dark:border-black dark:bg-transparent dark:focus-visible:border-black dark:focus-visible:ring-black/40",
|
|
2123
|
+
text: "rounded-none border-0 border-b border-transparent pl-0 pr-10 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",
|
|
2124
|
+
ghost: "rounded border border-transparent bg-gray-50 text-gray-900 focus-visible:bg-white focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/15 dark:bg-slate-800 dark:text-gray-100 dark:focus-visible:bg-slate-700 dark:focus-visible:border-primary/60 dark:focus-visible:ring-primary/25",
|
|
2125
|
+
filled: "rounded border border-gray-200 bg-gray-100 focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/25 dark:border-gray-700 dark:bg-slate-800 dark:focus-visible:border-primary/60 dark:focus-visible:ring-primary/30",
|
|
2126
|
+
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-600 dark:focus-visible:border-primary/70",
|
|
2127
|
+
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"
|
|
2095
2128
|
};
|
|
2096
2129
|
var sizeClasses2 = {
|
|
2097
2130
|
"x-small": { padding: "pl-2 pr-8 py-2", text: "text-xs" },
|
|
@@ -2173,7 +2206,7 @@ var Select = ({
|
|
|
2173
2206
|
const shouldRenderPlaceholder = !multiple && placeholderText !== void 0;
|
|
2174
2207
|
const labelShouldFloat = hasValue || isFocused;
|
|
2175
2208
|
const labelLeftClass = "left-3";
|
|
2176
|
-
const labelBgDefault = ["outline", "text", "underlined"].includes(variant) ? "bg-transparent" : "bg-white/90";
|
|
2209
|
+
const labelBgDefault = ["outline", "text", "underlined"].includes(variant) ? "bg-transparent" : "bg-white/90 dark:bg-slate-900";
|
|
2177
2210
|
const handleFocus = (event) => {
|
|
2178
2211
|
if (hidePlaceholderUntilFocus) setIsFocused(true);
|
|
2179
2212
|
onFocus?.(event);
|
|
@@ -2209,13 +2242,13 @@ var Select = ({
|
|
|
2209
2242
|
]
|
|
2210
2243
|
}
|
|
2211
2244
|
),
|
|
2212
|
-
!multiple && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute inset-y-0 right-3 flex items-center text-gray-500", children: /* @__PURE__ */ jsxRuntime.jsx("i", { className: "mdi mdi-chevron-down text-base leading-none", "aria-hidden": true }) }),
|
|
2245
|
+
!multiple && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute inset-y-0 right-3 flex items-center text-gray-500 dark:text-gray-300", children: /* @__PURE__ */ jsxRuntime.jsx("i", { className: "mdi mdi-chevron-down text-base leading-none", "aria-hidden": true }) }),
|
|
2213
2246
|
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2214
2247
|
"label",
|
|
2215
2248
|
{
|
|
2216
2249
|
htmlFor: selectId,
|
|
2217
2250
|
className: tailwindMerge.twMerge(
|
|
2218
|
-
"absolute transition-all duration-150 pointer-events-none text-gray-700",
|
|
2251
|
+
"absolute transition-all duration-150 pointer-events-none text-gray-700 dark:text-gray-200",
|
|
2219
2252
|
labelLeftClass,
|
|
2220
2253
|
labelShouldFloat ? [
|
|
2221
2254
|
"top-0 text-xs px-1",
|