@solostylist/ui-kit 1.0.198 → 1.0.200
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/entries/core.d.ts +2 -2
- package/dist/entries/core.js +28 -30
- package/dist/main.js +92 -94
- package/dist/s-blur-text/s-blur-text.js +25 -24
- package/dist/s-chat-message/s-chat-message.js +1 -1
- package/dist/s-comment-message/s-comment-message.js +1 -1
- package/dist/s-countdown/s-count-box.js +40 -37
- package/dist/s-countdown/s-count-down.js +73 -101
- package/dist/s-dialog-confirm/index.d.ts +1 -1
- package/dist/s-dialog-confirm/s-dialog-confirm.d.ts +1 -1
- package/dist/s-dialog-message/index.d.ts +1 -1
- package/dist/s-dialog-message/s-dialog-message.d.ts +1 -1
- package/dist/s-file-dropzone/s-file-dropzone.js +13 -13
- package/dist/s-pixel-reveal/s-pixel-reveal.js +28 -28
- package/dist/s-review/s-review.js +1 -1
- package/dist/s-snackbar-message/s-snackbar-message.js +18 -18
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +7 -9
- package/dist/{utils-CHdpkEZx.js → utils-D1UMIV0b.js} +13 -6
- package/package.json +10 -5
- package/dist/s-accordion/package.json +0 -5
- package/dist/s-action-overlay/package.json +0 -5
- package/dist/s-ai-tool-bar/package.json +0 -5
- package/dist/s-autocomplete/package.json +0 -5
- package/dist/s-avatar/package.json +0 -5
- package/dist/s-blur-text/package.json +0 -5
- package/dist/s-breadcrumbs/package.json +0 -5
- package/dist/s-button/package.json +0 -5
- package/dist/s-button-link/package.json +0 -5
- package/dist/s-carousel/package.json +0 -5
- package/dist/s-category-card/package.json +0 -5
- package/dist/s-chat-input/package.json +0 -5
- package/dist/s-chat-message/package.json +0 -5
- package/dist/s-checkbox/package.json +0 -5
- package/dist/s-chip/package.json +0 -5
- package/dist/s-chips/package.json +0 -5
- package/dist/s-code-block/package.json +0 -5
- package/dist/s-comment-message/package.json +0 -5
- package/dist/s-copyable-text/package.json +0 -5
- package/dist/s-countdown/package.json +0 -5
- package/dist/s-data-table/package.json +0 -5
- package/dist/s-date-picker/package.json +0 -5
- package/dist/s-datetime-picker/package.json +0 -5
- package/dist/s-dialog/package.json +0 -5
- package/dist/s-dialog-confirm/package.json +0 -5
- package/dist/s-dialog-message/package.json +0 -5
- package/dist/s-empty/package.json +0 -5
- package/dist/s-error/package.json +0 -5
- package/dist/s-error-layout/package.json +0 -5
- package/dist/s-file-dropzone/package.json +0 -5
- package/dist/s-file-icon/package.json +0 -5
- package/dist/s-flex-box/package.json +0 -5
- package/dist/s-form/package.json +0 -5
- package/dist/s-gallery/package.json +0 -5
- package/dist/s-glow-button/package.json +0 -5
- package/dist/s-gradient-icon/package.json +0 -5
- package/dist/s-i18n-provider/package.json +0 -5
- package/dist/s-icon-button/package.json +0 -5
- package/dist/s-image-comparison/package.json +0 -5
- package/dist/s-image-modal/package.json +0 -5
- package/dist/s-item-not-found/package.json +0 -5
- package/dist/s-label/package.json +0 -5
- package/dist/s-language-switcher/package.json +0 -5
- package/dist/s-lazy-image/package.json +0 -5
- package/dist/s-localization-provider/package.json +0 -5
- package/dist/s-moving-border/package.json +0 -5
- package/dist/s-multi-select/package.json +0 -5
- package/dist/s-no-ssr/package.json +0 -5
- package/dist/s-overlay-scrollbar/package.json +0 -5
- package/dist/s-pagination/package.json +0 -5
- package/dist/s-pixel-reveal/package.json +0 -5
- package/dist/s-radial-pulse-animate/package.json +0 -5
- package/dist/s-rating/package.json +0 -5
- package/dist/s-review/package.json +0 -5
- package/dist/s-scroll-reveal/package.json +0 -6
- package/dist/s-scroll-to-top/package.json +0 -5
- package/dist/s-scroll-velocity/package.json +0 -5
- package/dist/s-select/package.json +0 -5
- package/dist/s-select-list/package.json +0 -5
- package/dist/s-skeleton/package.json +0 -5
- package/dist/s-snackbar-message/package.json +0 -5
- package/dist/s-spotlight-cursor/package.json +0 -5
- package/dist/s-stripe/package.json +0 -5
- package/dist/s-tabs/package.json +0 -4
- package/dist/s-text-editor/package.json +0 -5
- package/dist/s-text-field/package.json +0 -5
- package/dist/s-text-shimmer/package.json +0 -5
- package/dist/s-text-truncation/package.json +0 -5
- package/dist/s-theme-demo/package.json +0 -5
- package/dist/s-theme-provider/package.json +0 -5
- package/dist/s-theme-switch/package.json +0 -5
- package/dist/s-tip/package.json +0 -5
- package/dist/s-two-pane-layout/package.json +0 -5
- package/dist/s-typewriter-text/package.json +0 -6
- package/dist/s-zoom-image/package.json +0 -5
- package/dist/utils/bytes-to-size.d.ts +0 -1
- package/dist/utils/bytes-to-size.js +0 -9
package/dist/utils/index.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { formatDatePosted as r } from "./dayjs.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { default as L } from "dayjs";
|
|
2
|
+
import { LogLevel as g, Logger as a, createLogger as f, logger as m } from "./logger.js";
|
|
3
|
+
import { default as d } from "dayjs";
|
|
5
4
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
L as dayjs,
|
|
5
|
+
g as LogLevel,
|
|
6
|
+
a as Logger,
|
|
7
|
+
f as createLogger,
|
|
8
|
+
d as dayjs,
|
|
11
9
|
r as formatDatePosted,
|
|
12
|
-
|
|
10
|
+
m as logger
|
|
13
11
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const c = (o) => (typeof o == "string" ? new Date(o) : o).toLocaleTimeString("en-US", {
|
|
2
2
|
hour: "2-digit",
|
|
3
3
|
minute: "2-digit",
|
|
4
4
|
hour12: !0
|
|
@@ -7,7 +7,7 @@ const m = (o) => (typeof o == "string" ? new Date(o) : o).toLocaleTimeString("en
|
|
|
7
7
|
return "";
|
|
8
8
|
const t = ["Bytes", "KB", "MB", "GB"], i = Math.floor(Math.log(o) / Math.log(1024));
|
|
9
9
|
return Math.round(o / Math.pow(1024, i) * 100) / 100 + " " + t[i];
|
|
10
|
-
},
|
|
10
|
+
}, m = (o) => {
|
|
11
11
|
const t = /* @__PURE__ */ new Date(), i = typeof o == "string" ? new Date(o) : o, a = Math.floor((t.getTime() - i.getTime()) / 1e3);
|
|
12
12
|
if (a < 60)
|
|
13
13
|
return "just now";
|
|
@@ -18,16 +18,23 @@ const m = (o) => (typeof o == "string" ? new Date(o) : o).toLocaleTimeString("en
|
|
|
18
18
|
{ limit: 2592e3, divisor: 604800, singular: "1 week ago", plural: "weeks ago" },
|
|
19
19
|
{ limit: 31536e3, divisor: 2592e3, singular: "1 month ago", plural: "months ago" }
|
|
20
20
|
];
|
|
21
|
-
for (const { limit: s, divisor: l, singular:
|
|
21
|
+
for (const { limit: s, divisor: l, singular: u, plural: g } of n)
|
|
22
22
|
if (a < s) {
|
|
23
23
|
const e = Math.floor(a / l);
|
|
24
|
-
return e === 1 ?
|
|
24
|
+
return e === 1 ? u : `${e} ${g}`;
|
|
25
25
|
}
|
|
26
26
|
const r = Math.floor(a / 31536e3);
|
|
27
27
|
return r === 1 ? "1 year ago" : `${r} years ago`;
|
|
28
28
|
};
|
|
29
|
+
function h(o, t = 2) {
|
|
30
|
+
if (o === 0)
|
|
31
|
+
return "0 Bytes";
|
|
32
|
+
const i = 1024, a = t < 0 ? 0 : t, n = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], r = Math.floor(Math.log(o) / Math.log(i));
|
|
33
|
+
return `${parseFloat((o / Math.pow(i, r)).toFixed(a))} ${n[r]}`;
|
|
34
|
+
}
|
|
29
35
|
export {
|
|
30
|
-
|
|
36
|
+
c as a,
|
|
37
|
+
h as b,
|
|
31
38
|
f,
|
|
32
|
-
|
|
39
|
+
m as g
|
|
33
40
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"registry": "https://registry.npmjs.org"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.200",
|
|
7
7
|
"description": "advanced ui kit for solostylist",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "dist/main.js",
|
|
@@ -65,7 +65,10 @@
|
|
|
65
65
|
"types": "./dist/entries/i18n.d.ts",
|
|
66
66
|
"import": "./dist/entries/i18n.js"
|
|
67
67
|
},
|
|
68
|
-
"./*":
|
|
68
|
+
"./*": {
|
|
69
|
+
"types": "./dist/*/index.d.ts",
|
|
70
|
+
"import": "./dist/*/index.js"
|
|
71
|
+
}
|
|
69
72
|
},
|
|
70
73
|
"typesVersions": {
|
|
71
74
|
"*": {
|
|
@@ -104,6 +107,9 @@
|
|
|
104
107
|
],
|
|
105
108
|
"i18n": [
|
|
106
109
|
"./dist/entries/i18n.d.ts"
|
|
110
|
+
],
|
|
111
|
+
"*": [
|
|
112
|
+
"./dist/*/index.d.ts"
|
|
107
113
|
]
|
|
108
114
|
}
|
|
109
115
|
},
|
|
@@ -216,8 +222,7 @@
|
|
|
216
222
|
"uuid": "^13.0.0",
|
|
217
223
|
"vite": "^7.3.1",
|
|
218
224
|
"vite-plugin-dts": "^4.5.4",
|
|
219
|
-
"vite-plugin-lib-inject-css": "^2.2.2"
|
|
220
|
-
"vite-plugin-static-copy": "^3.2.0"
|
|
225
|
+
"vite-plugin-lib-inject-css": "^2.2.2"
|
|
221
226
|
},
|
|
222
227
|
"lint-staged": {
|
|
223
228
|
"*.{js,jsx,ts,tsx}": [
|
|
@@ -239,6 +244,6 @@
|
|
|
239
244
|
"author": "Lê Đặng Trường Đạt",
|
|
240
245
|
"license": "ISC",
|
|
241
246
|
"dependencies": {
|
|
242
|
-
"@solostylist/core": "^1.0.
|
|
247
|
+
"@solostylist/core": "^1.0.3"
|
|
243
248
|
}
|
|
244
249
|
}
|
package/dist/s-chip/package.json
DELETED
package/dist/s-form/package.json
DELETED
package/dist/s-tabs/package.json
DELETED
package/dist/s-tip/package.json
DELETED