ssovee-os-web-ui 0.1.57 → 0.1.59
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 +60 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +31 -18
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +61 -25
- package/dist/index.js.map +1 -1
- package/dist/sdk.cjs +14 -0
- package/dist/sdk.cjs.map +1 -1
- package/dist/sdk.d.cts +3 -1
- package/dist/sdk.d.ts +3 -1
- package/dist/sdk.js +14 -1
- package/dist/sdk.js.map +1 -1
- package/package.json +1 -1
- package/tailwind.config.js +1 -0
package/dist/index.cjs
CHANGED
|
@@ -183,11 +183,11 @@ var Input = React22__namespace.default.forwardRef(
|
|
|
183
183
|
onKeyUp,
|
|
184
184
|
...props
|
|
185
185
|
}, ref) => {
|
|
186
|
-
const baseClasses = "transition-all duration-200 focus:outline-none
|
|
186
|
+
const baseClasses = "transition-all duration-200 focus:outline-none rounded-[6px]";
|
|
187
187
|
const variantClasses = {
|
|
188
|
-
default: "bg-primary text-
|
|
189
|
-
filled: "bg-surface-4 text-
|
|
190
|
-
outline: "bg-transparent text-
|
|
188
|
+
default: "bg-primary input-text-default border border-surface-1 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50 placeholder-light placeholder-default",
|
|
189
|
+
filled: "bg-surface-4 input-text-filled border border-surface-4 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50 placeholder-light placeholder-filled",
|
|
190
|
+
outline: "bg-transparent input-text-outline border border-surface-1 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50 placeholder-light placeholder-outline"
|
|
191
191
|
};
|
|
192
192
|
const sizeClasses = {
|
|
193
193
|
sm: "h-8 px-2 text-sm",
|
|
@@ -257,11 +257,11 @@ var TextArea = React22__namespace.default.forwardRef(
|
|
|
257
257
|
resize = "vertical",
|
|
258
258
|
...props
|
|
259
259
|
}, ref) => {
|
|
260
|
-
const baseClasses = "transition-all duration-200 focus:outline-none
|
|
260
|
+
const baseClasses = "transition-all duration-200 focus:outline-none rounded-[6px]";
|
|
261
261
|
const variantClasses = {
|
|
262
|
-
default: "bg-primary text-
|
|
263
|
-
filled: "bg-surface-4 text-
|
|
264
|
-
outline: "bg-transparent text-
|
|
262
|
+
default: "bg-primary input-text-default border border-surface-1 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50 placeholder-light placeholder-default",
|
|
263
|
+
filled: "bg-surface-4 input-text-filled border border-surface-4 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50 placeholder-light placeholder-filled",
|
|
264
|
+
outline: "bg-transparent input-text-outline border border-surface-1 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50 placeholder-light placeholder-outline"
|
|
265
265
|
};
|
|
266
266
|
const sizeClasses = {
|
|
267
267
|
sm: "px-2 py-1 text-sm",
|
|
@@ -794,7 +794,7 @@ var Loading = ({
|
|
|
794
794
|
return content;
|
|
795
795
|
};
|
|
796
796
|
var Loading_default = Loading;
|
|
797
|
-
var basePulseClasses = "
|
|
797
|
+
var basePulseClasses = "skeleton-bg rounded-md overflow-hidden";
|
|
798
798
|
var lineWidths = ["w-full", "w-11/12", "w-4/5", "w-3/5"];
|
|
799
799
|
var Skeleton = ({
|
|
800
800
|
variant = "text",
|
|
@@ -944,7 +944,7 @@ var Toast = ({
|
|
|
944
944
|
case "success":
|
|
945
945
|
return "border-l-green-500 bg-green-50";
|
|
946
946
|
case "warning":
|
|
947
|
-
return "border-l-yellow-500 bg-yellow-50";
|
|
947
|
+
return "border-l-yellow-500 bg-yellow-50 dark:text-[#121316]";
|
|
948
948
|
case "info":
|
|
949
949
|
return "border-l-blue-500 bg-blue-50";
|
|
950
950
|
default:
|
|
@@ -992,8 +992,28 @@ var Toast = ({
|
|
|
992
992
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
993
993
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 mt-0.5", children: getIcon() }),
|
|
994
994
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
995
|
-
heading && /* @__PURE__ */ jsxRuntime.jsx(
|
|
996
|
-
|
|
995
|
+
heading && /* @__PURE__ */ jsxRuntime.jsx(
|
|
996
|
+
Typography_default,
|
|
997
|
+
{
|
|
998
|
+
variant: "h4",
|
|
999
|
+
className: cn(
|
|
1000
|
+
"text-sm font-medium mb-1",
|
|
1001
|
+
type === "warning" ? "text-neutral-700 dark:text-[#121316]" : "text-neutral-700"
|
|
1002
|
+
),
|
|
1003
|
+
children: heading
|
|
1004
|
+
}
|
|
1005
|
+
),
|
|
1006
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1007
|
+
Typography_default,
|
|
1008
|
+
{
|
|
1009
|
+
variant: "p",
|
|
1010
|
+
className: cn(
|
|
1011
|
+
"text-sm leading-relaxed",
|
|
1012
|
+
type === "warning" ? "text-neutral-600 dark:text-[#121316]" : "text-neutral-600"
|
|
1013
|
+
),
|
|
1014
|
+
children: message
|
|
1015
|
+
}
|
|
1016
|
+
)
|
|
997
1017
|
] }),
|
|
998
1018
|
showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
999
1019
|
"button",
|
|
@@ -1225,7 +1245,7 @@ var Badge = React22__namespace.default.forwardRef(
|
|
|
1225
1245
|
}, ref) => {
|
|
1226
1246
|
const variantClasses = {
|
|
1227
1247
|
default: "bg-surface-3 text-neutral-400",
|
|
1228
|
-
primary: "bg-brand-color text-neutral-500",
|
|
1248
|
+
primary: "bg-brand-color text-neutral-500 dark:text-white",
|
|
1229
1249
|
success: "bg-green-500 text-white",
|
|
1230
1250
|
warning: "bg-yellow-500 text-white",
|
|
1231
1251
|
danger: "bg-red-500 text-white",
|
|
@@ -1400,7 +1420,7 @@ var Tooltip = ({
|
|
|
1400
1420
|
"div",
|
|
1401
1421
|
{
|
|
1402
1422
|
className: cn(
|
|
1403
|
-
"absolute z-50 px-2 py-1 text-xs text
|
|
1423
|
+
"absolute z-50 px-2 py-1 text-xs tooltip-text bg-surface-1 rounded shadow-lg whitespace-nowrap",
|
|
1404
1424
|
positionClasses[position],
|
|
1405
1425
|
className
|
|
1406
1426
|
),
|
|
@@ -1660,11 +1680,11 @@ var SearchInput = React22__namespace.default.forwardRef(
|
|
|
1660
1680
|
};
|
|
1661
1681
|
}, [enableKeyboardShortcuts, isActive, handleClear, addShortcutListener, removeShortcutListener]);
|
|
1662
1682
|
const displayPlaceholder = enableKeyboardShortcuts ? `${placeholder} (${formatKeys(getShortcutByCommand("focus_search"))})` : placeholder;
|
|
1663
|
-
const baseClasses = "transition-all duration-200 focus:outline-none
|
|
1683
|
+
const baseClasses = "transition-all duration-200 focus:outline-none rounded-[6px]";
|
|
1664
1684
|
const variantClasses = {
|
|
1665
|
-
default: "bg-primary text-
|
|
1666
|
-
filled: "bg-surface-4 text-
|
|
1667
|
-
outline: "bg-transparent text-
|
|
1685
|
+
default: "bg-primary input-text-default border border-surface-1 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50 placeholder-light placeholder-default",
|
|
1686
|
+
filled: "bg-surface-4 input-text-filled border border-surface-4 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50 placeholder-light placeholder-filled",
|
|
1687
|
+
outline: "bg-transparent input-text-outline border border-surface-1 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50 placeholder-light placeholder-outline"
|
|
1668
1688
|
};
|
|
1669
1689
|
const sizeClasses = {
|
|
1670
1690
|
sm: "h-8 text-sm leading-tight",
|
|
@@ -1822,10 +1842,12 @@ var FileUpload = ({
|
|
|
1822
1842
|
md: "h-24 px-4 text-base",
|
|
1823
1843
|
lg: "h-32 px-6 text-lg"
|
|
1824
1844
|
};
|
|
1845
|
+
const defaultTextClasses = variant === "default" || variant === "outline" ? "text-neutral-600" : "text-neutral-600";
|
|
1846
|
+
const acceptTextClasses = variant === "default" || variant === "outline" ? "text-xs text-neutral-600" : "text-xs text-neutral-600";
|
|
1825
1847
|
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: "
|
|
1827
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography_default, { variant: "p", className: "text-sm
|
|
1828
|
-
accept && /* @__PURE__ */ jsxRuntime.jsxs(Typography_default, { variant: "p", className: "
|
|
1848
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.UploadIcon, { size: 24, className: cn("mb-2", defaultTextClasses) }),
|
|
1849
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography_default, { variant: "p", className: cn("text-sm", defaultTextClasses), children: dragAndDrop ? "Drag and drop files here" : "Click to upload files" }),
|
|
1850
|
+
accept && /* @__PURE__ */ jsxRuntime.jsxs(Typography_default, { variant: "p", className: cn(acceptTextClasses, "mt-1"), children: [
|
|
1829
1851
|
"Accepted: ",
|
|
1830
1852
|
accept
|
|
1831
1853
|
] })
|
|
@@ -2082,7 +2104,7 @@ var Radio = React22__namespace.default.forwardRef(
|
|
|
2082
2104
|
const baseClasses = "transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 cursor-pointer rounded-[6px]";
|
|
2083
2105
|
const variantClasses = {
|
|
2084
2106
|
default: "bg-primary border border-surface-1 focus:border-brand-color focus:ring-brand-color/50 checked:bg-brand-color checked:border-brand-color",
|
|
2085
|
-
filled: "bg-surface-4 border border-surface-
|
|
2107
|
+
filled: "bg-surface-4 border border-surface-1 focus:border-brand-color focus:ring-brand-color/50 checked:bg-brand-color checked:border-brand-color"
|
|
2086
2108
|
};
|
|
2087
2109
|
const sizeClasses = {
|
|
2088
2110
|
sm: "w-4 h-4",
|
|
@@ -2098,6 +2120,7 @@ var Radio = React22__namespace.default.forwardRef(
|
|
|
2098
2120
|
ref,
|
|
2099
2121
|
type: "radio",
|
|
2100
2122
|
className: cn(
|
|
2123
|
+
"peer",
|
|
2101
2124
|
baseClasses,
|
|
2102
2125
|
variantClasses[variant],
|
|
2103
2126
|
sizeClasses[size],
|
|
@@ -2109,7 +2132,7 @@ var Radio = React22__namespace.default.forwardRef(
|
|
|
2109
2132
|
...props
|
|
2110
2133
|
}
|
|
2111
2134
|
),
|
|
2112
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-1/2 h-1/2 bg-white rounded-full opacity-0 checked:opacity-100" }) })
|
|
2135
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-1/2 h-1/2 bg-white rounded-full opacity-0 peer-checked:opacity-100" }) })
|
|
2113
2136
|
] }),
|
|
2114
2137
|
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2115
2138
|
"label",
|
|
@@ -3382,6 +3405,19 @@ var useSound = () => {
|
|
|
3382
3405
|
};
|
|
3383
3406
|
};
|
|
3384
3407
|
|
|
3408
|
+
// src/hooks/getFormattedDate.ts
|
|
3409
|
+
var getFormattedDate = (dateInput) => {
|
|
3410
|
+
const timestamp = Number(dateInput);
|
|
3411
|
+
if (isNaN(timestamp)) return "Invalid date";
|
|
3412
|
+
const date = new Date(timestamp);
|
|
3413
|
+
const formatter = new Intl.DateTimeFormat("en-GB", {
|
|
3414
|
+
day: "2-digit",
|
|
3415
|
+
month: "short",
|
|
3416
|
+
year: "numeric"
|
|
3417
|
+
});
|
|
3418
|
+
return formatter.format(date);
|
|
3419
|
+
};
|
|
3420
|
+
|
|
3385
3421
|
exports.Accordion = Accordion_default;
|
|
3386
3422
|
exports.Alert = Alert_default;
|
|
3387
3423
|
exports.Avatar = Avatar_default;
|
|
@@ -3419,6 +3455,7 @@ exports.Tooltip = Tooltip_default;
|
|
|
3419
3455
|
exports.Typography = Typography_default;
|
|
3420
3456
|
exports.WindowWithSideMenu = WindowWithSideMenu_default;
|
|
3421
3457
|
exports.WindowWithoutSideMenu = WindowWithoutSideMenu_default;
|
|
3458
|
+
exports.getFormattedDate = getFormattedDate;
|
|
3422
3459
|
exports.useDeviceSupport = useDeviceSupport;
|
|
3423
3460
|
exports.useGridClasses = useGridClasses_default;
|
|
3424
3461
|
exports.useShortcutFormatter = useShortcutFormatter_default;
|