ssovee-os-web-ui 0.1.47 → 0.1.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -185,9 +185,9 @@ var Input = React22__namespace.default.forwardRef(
185
185
  }, ref) => {
186
186
  const baseClasses = "transition-all duration-200 focus:outline-none placeholder:text-neutral-300 rounded-[6px]";
187
187
  const variantClasses = {
188
- default: "bg-primary text-neutral-500 border border-surface-1 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50",
188
+ default: "bg-primary text-neutral-500 border border-surface-1 placeholder:text-neutral-300 dark:placeholder:text-[#d7e1ef] focus:border-brand-color focus:ring-1 focus:ring-brand-color/50",
189
189
  filled: "bg-surface-4 text-neutral-500 border border-surface-4 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50",
190
- outline: "bg-transparent text-neutral-500 border border-surface-1 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50"
190
+ outline: "bg-transparent text-neutral-500 border border-surface-1 placeholder:text-neutral-300 dark:placeholder:text-[#d7e1ef] focus:border-brand-color focus:ring-1 focus:ring-brand-color/50"
191
191
  };
192
192
  const sizeClasses = {
193
193
  sm: "h-8 px-2 text-sm",
@@ -204,7 +204,7 @@ var Input = React22__namespace.default.forwardRef(
204
204
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col", fullWidth && "w-full"), children: [
205
205
  label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium text-neutral-500 mb-1", children: label }),
206
206
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
207
- leftIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-neutral-400", children: leftIcon }),
207
+ leftIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-neutral-400 dark:text-[#d7e1ef]", children: leftIcon }),
208
208
  /* @__PURE__ */ jsxRuntime.jsx(
209
209
  "input",
210
210
  {
@@ -223,14 +223,14 @@ var Input = React22__namespace.default.forwardRef(
223
223
  ...props
224
224
  }
225
225
  ),
226
- rightIcon && !showSubmitButton && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2 text-neutral-400", children: rightIcon }),
226
+ rightIcon && !showSubmitButton && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2 text-neutral-400 dark:text-[#d7e1ef]", children: rightIcon }),
227
227
  showSubmitButton && /* @__PURE__ */ jsxRuntime.jsx(
228
228
  "button",
229
229
  {
230
230
  type: "button",
231
231
  onClick: onSubmit,
232
232
  disabled: props.disabled || props.readOnly || !onSubmit,
233
- className: "absolute right-3 top-1/2 -translate-y-1/2 text-neutral-300 transition-colors hover:text-neutral-400 disabled:cursor-not-allowed disabled:opacity-50",
233
+ className: "absolute right-3 top-1/2 -translate-y-1/2 text-neutral-300 transition-colors hover:text-neutral-400 dark:text-[#d7e1ef] dark:hover:text-[#d7e1ef] disabled:cursor-not-allowed disabled:opacity-50",
234
234
  "aria-label": "Submit input",
235
235
  children: /* @__PURE__ */ jsxRuntime.jsx(react.ArrowCircleRightIcon, { size: 20 })
236
236
  }
@@ -259,9 +259,9 @@ var TextArea = React22__namespace.default.forwardRef(
259
259
  }, ref) => {
260
260
  const baseClasses = "transition-all duration-200 focus:outline-none placeholder:text-neutral-300 rounded-[6px]";
261
261
  const variantClasses = {
262
- default: "bg-primary text-neutral-500 border border-surface-1 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50",
262
+ default: "bg-primary text-neutral-500 border border-surface-1 placeholder:text-neutral-300 dark:placeholder:text-[#d7e1ef] focus:border-brand-color focus:ring-1 focus:ring-brand-color/50",
263
263
  filled: "bg-surface-4 text-neutral-500 border border-surface-4 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50",
264
- outline: "bg-transparent text-neutral-500 border border-surface-1 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50"
264
+ outline: "bg-transparent text-neutral-500 border border-surface-1 placeholder:text-neutral-300 dark:placeholder:text-[#d7e1ef] focus:border-brand-color focus:ring-1 focus:ring-brand-color/50"
265
265
  };
266
266
  const sizeClasses = {
267
267
  sm: "px-2 py-1 text-sm",
@@ -329,6 +329,7 @@ var Select = React22__namespace.default.forwardRef(
329
329
  lg: "h-12 px-4 text-lg"
330
330
  };
331
331
  const widthClasses = fullWidth ? "w-full" : "";
332
+ const isPlaceholderSelected = Boolean(placeholder) && (value === "" || value === void 0 || value === null);
332
333
  const handleChange = (e) => {
333
334
  onChange?.(e.target.value);
334
335
  };
@@ -342,6 +343,9 @@ var Select = React22__namespace.default.forwardRef(
342
343
  className: cn(
343
344
  baseClasses,
344
345
  variantClasses[variant],
346
+ isPlaceholderSelected && "text-neutral-300",
347
+ isPlaceholderSelected && variant !== "filled" && "dark:text-[#d7e1ef]",
348
+ !isPlaceholderSelected && "text-neutral-500",
345
349
  sizeClasses[size],
346
350
  widthClasses,
347
351
  "pr-10",
@@ -369,7 +373,10 @@ var Select = React22__namespace.default.forwardRef(
369
373
  react.CaretDownIcon,
370
374
  {
371
375
  size: 16,
372
- className: "absolute right-3 top-1/2 transform -translate-y-1/2 text-neutral-400 pointer-events-none"
376
+ className: cn(
377
+ "absolute right-3 top-1/2 transform -translate-y-1/2 text-neutral-400 pointer-events-none",
378
+ variant !== "filled" && "dark:text-[#d7e1ef]"
379
+ )
373
380
  }
374
381
  )
375
382
  ] }),
@@ -622,13 +629,14 @@ var Dropdown = ({
622
629
  className
623
630
  ),
624
631
  children: [
625
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: selectedOption ? "text-neutral-500" : "text-neutral-300", children: selectedOption ? selectedOption.label : placeholder }),
632
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: selectedOption ? "text-neutral-500" : cn("text-neutral-300", variant !== "filled" && "dark:text-[#d7e1ef]"), children: selectedOption ? selectedOption.label : placeholder }),
626
633
  /* @__PURE__ */ jsxRuntime.jsx(
627
634
  react.CaretDownIcon,
628
635
  {
629
636
  size: 16,
630
637
  className: cn(
631
638
  "text-neutral-400 transition-transform duration-200",
639
+ variant !== "filled" && "dark:text-[#d7e1ef]",
632
640
  isOpen && "rotate-180"
633
641
  )
634
642
  }
@@ -1660,11 +1668,11 @@ var SearchInput = React22__namespace.default.forwardRef(
1660
1668
  };
1661
1669
  }, [enableKeyboardShortcuts, isActive, handleClear, addShortcutListener, removeShortcutListener]);
1662
1670
  const displayPlaceholder = enableKeyboardShortcuts ? `${placeholder} (${formatKeys(getShortcutByCommand("focus_search"))})` : placeholder;
1663
- const baseClasses = "transition-all duration-200 focus:outline-none placeholder:text-neutral-300 rounded-[6px]";
1671
+ const baseClasses = "transition-all duration-200 focus:outline-none rounded-[6px]";
1664
1672
  const variantClasses = {
1665
- default: "bg-primary text-neutral-500 border border-surface-1 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50",
1673
+ default: "bg-primary text-neutral-500 border border-surface-1 placeholder:text-neutral-300 dark:placeholder:text-[#d7e1ef] focus:border-brand-color focus:ring-1 focus:ring-brand-color/50",
1666
1674
  filled: "bg-surface-4 text-neutral-500 border border-surface-4 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50",
1667
- outline: "bg-transparent text-neutral-500 border border-surface-1 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50"
1675
+ outline: "bg-transparent text-neutral-500 border border-surface-1 placeholder:text-neutral-300 dark:placeholder:text-[#d7e1ef] focus:border-brand-color focus:ring-1 focus:ring-brand-color/50"
1668
1676
  };
1669
1677
  const sizeClasses = {
1670
1678
  sm: "h-8 text-sm leading-tight",
@@ -1696,7 +1704,7 @@ var SearchInput = React22__namespace.default.forwardRef(
1696
1704
  "div",
1697
1705
  {
1698
1706
  className: cn(
1699
- "pointer-events-none absolute top-1/2 z-10 -translate-y-1/2 text-neutral-400",
1707
+ "pointer-events-none absolute top-1/2 z-10 -translate-y-1/2 text-neutral-400 dark:text-[#d7e1ef]",
1700
1708
  iconPositionClasses[size]
1701
1709
  ),
1702
1710
  children: /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1748,7 +1756,7 @@ var SearchInput = React22__namespace.default.forwardRef(
1748
1756
  "button",
1749
1757
  {
1750
1758
  onClick: handleClear,
1751
- className: "absolute right-3 top-1/2 -translate-y-1/2 text-neutral-400 hover:text-neutral-600 transition-colors",
1759
+ className: "absolute right-3 top-1/2 -translate-y-1/2 text-neutral-400 hover:text-neutral-600 transition-colors dark:text-[#d7e1ef] dark:hover:text-[#d7e1ef]",
1752
1760
  "aria-label": "Clear search",
1753
1761
  type: "button",
1754
1762
  children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: iconSizeClasses[size], fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
@@ -1822,10 +1830,11 @@ var FileUpload = ({
1822
1830
  md: "h-24 px-4 text-base",
1823
1831
  lg: "h-32 px-6 text-lg"
1824
1832
  };
1833
+ const darkPlaceholderTone = variant !== "filled" ? "dark:text-[#d7e1ef]" : "";
1825
1834
  const defaultContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center h-full text-center", children: [
1826
- /* @__PURE__ */ jsxRuntime.jsx(react.UploadIcon, { size: 24, className: "text-neutral-400 mb-2" }),
1827
- /* @__PURE__ */ jsxRuntime.jsx(Typography_default, { variant: "p", className: "text-sm text-neutral-400", children: dragAndDrop ? "Drag and drop files here" : "Click to upload files" }),
1828
- accept && /* @__PURE__ */ jsxRuntime.jsxs(Typography_default, { variant: "p", className: "text-xs text-neutral-300 mt-1", children: [
1835
+ /* @__PURE__ */ jsxRuntime.jsx(react.UploadIcon, { size: 24, className: cn("text-neutral-400 mb-2", darkPlaceholderTone) }),
1836
+ /* @__PURE__ */ jsxRuntime.jsx(Typography_default, { variant: "p", className: cn("text-sm text-neutral-400", darkPlaceholderTone), children: dragAndDrop ? "Drag and drop files here" : "Click to upload files" }),
1837
+ accept && /* @__PURE__ */ jsxRuntime.jsxs(Typography_default, { variant: "p", className: cn("text-xs text-neutral-300 mt-1", darkPlaceholderTone), children: [
1829
1838
  "Accepted: ",
1830
1839
  accept
1831
1840
  ] })
@@ -1987,7 +1996,7 @@ var Pagination = ({
1987
1996
  className: cn(
1988
1997
  "flex items-center justify-center",
1989
1998
  sizeClasses[size],
1990
- "text-neutral-400"
1999
+ "text-neutral-400 dark:text-[#d7e1ef]"
1991
2000
  ),
1992
2001
  children: "..."
1993
2002
  },
@@ -2003,8 +2012,8 @@ var Pagination = ({
2003
2012
  "flex items-center justify-center font-medium transition-all duration-200 rounded-[6px]",
2004
2013
  sizeClasses[size],
2005
2014
  variantClasses[variant],
2006
- isActive ? activeClasses[variant] : "text-neutral-400",
2007
- !isActive && "hover:text-neutral-500"
2015
+ isActive ? activeClasses[variant] : "text-neutral-400 dark:text-[#d7e1ef]",
2016
+ !isActive && "hover:text-neutral-500 dark:hover:text-[#d7e1ef]"
2008
2017
  ),
2009
2018
  children: page
2010
2019
  },
@@ -2020,7 +2029,7 @@ var Pagination = ({
2020
2029
  "flex items-center justify-center font-medium transition-all duration-200 rounded-[6px]",
2021
2030
  sizeClasses[size],
2022
2031
  variantClasses[variant],
2023
- "text-neutral-400 hover:text-neutral-500"
2032
+ "text-neutral-400 hover:text-neutral-500 dark:text-[#d7e1ef] dark:hover:text-[#d7e1ef]"
2024
2033
  ),
2025
2034
  children: "First"
2026
2035
  }
@@ -2033,7 +2042,7 @@ var Pagination = ({
2033
2042
  "flex items-center justify-center font-medium transition-all duration-200 rounded-[6px]",
2034
2043
  sizeClasses[size],
2035
2044
  variantClasses[variant],
2036
- "text-neutral-400 hover:text-neutral-500"
2045
+ "text-neutral-400 hover:text-neutral-500 dark:text-[#d7e1ef] dark:hover:text-[#d7e1ef]"
2037
2046
  ),
2038
2047
  children: /* @__PURE__ */ jsxRuntime.jsx(react.CaretLeftIcon, { size: 16 })
2039
2048
  }
@@ -2047,7 +2056,7 @@ var Pagination = ({
2047
2056
  "flex items-center justify-center font-medium transition-all duration-200 rounded-[6px]",
2048
2057
  sizeClasses[size],
2049
2058
  variantClasses[variant],
2050
- "text-neutral-400 hover:text-neutral-500"
2059
+ "text-neutral-400 hover:text-neutral-500 dark:text-[#d7e1ef] dark:hover:text-[#d7e1ef]"
2051
2060
  ),
2052
2061
  children: /* @__PURE__ */ jsxRuntime.jsx(react.CaretRightIcon, { size: 16 })
2053
2062
  }
@@ -2060,7 +2069,7 @@ var Pagination = ({
2060
2069
  "flex items-center justify-center font-medium transition-all duration-200 rounded-[6px]",
2061
2070
  sizeClasses[size],
2062
2071
  variantClasses[variant],
2063
- "text-neutral-400 hover:text-neutral-500"
2072
+ "text-neutral-400 hover:text-neutral-500 dark:text-[#d7e1ef] dark:hover:text-[#d7e1ef]"
2064
2073
  ),
2065
2074
  children: "Last"
2066
2075
  }
@@ -3131,13 +3140,13 @@ var Table = React22__namespace.forwardRef(({ className, ...props }, ref) => /* @
3131
3140
  }
3132
3141
  ) }));
3133
3142
  Table.displayName = "Table";
3134
- var TableHeader = React22__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b text-neutral-400 bg-surface-2", className), ...props }));
3143
+ var TableHeader = React22__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b text-neutral-400 dark:text-[#d7e1ef] bg-surface-2", className), ...props }));
3135
3144
  TableHeader.displayName = "TableHeader";
3136
3145
  var TableBody = React22__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3137
3146
  "tbody",
3138
3147
  {
3139
3148
  ref,
3140
- className: cn("[&_tr:last-child]:border-0 text-neutral-300", className),
3149
+ className: cn("[&_tr:last-child]:border-0 text-neutral-300 dark:text-[#d7e1ef]", className),
3141
3150
  ...props
3142
3151
  }
3143
3152
  ));
@@ -3206,27 +3215,12 @@ var useGridClasses = (windowSize, gridRules) => {
3206
3215
  if (windowSize.width <= 640) return "mobile";
3207
3216
  if (windowSize.width <= 1024) return "tablet";
3208
3217
  return "desktop";
3209
- }, [windowSize.width]);
3218
+ }, [windowSize]);
3210
3219
  const gridClasses = React22.useMemo(() => {
3211
3220
  const classes = {};
3212
- const resolveSpan = (spanRules) => {
3213
- const fallbackByDevice = {
3214
- mobile: ["mobile", "tablet", "desktop"],
3215
- tablet: ["tablet", "desktop", "mobile"],
3216
- desktop: ["desktop", "tablet", "mobile"]
3217
- };
3218
- const orderedDevices = fallbackByDevice[deviceType];
3219
- for (const device of orderedDevices) {
3220
- const candidate = spanRules?.[device];
3221
- if (candidate) {
3222
- return candidate;
3223
- }
3224
- }
3225
- return "12";
3226
- };
3227
3221
  for (const element in gridRules) {
3228
3222
  const classRules = gridRules[element];
3229
- const colSpan = resolveSpan(classRules["col-span"]);
3223
+ const colSpan = classRules["col-span"][deviceType];
3230
3224
  classes[element] = `col-span-${deviceType}-${colSpan}`;
3231
3225
  }
3232
3226
  return classes;