@solostylist/ui-kit 1.0.114 → 1.0.116
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/{Box-BVty_s6i.js → Box-DqmXop3Z.js} +5 -5
- package/dist/{ButtonBase-mQcNFFZT.js → ButtonBase-DVlCHVDw.js} +6 -5
- package/dist/{ChevronRight-DHNkZLlo.js → ChevronRight-DQD188LX.js} +2 -2
- package/dist/{Close-NkxvAwQr.js → Close-DlTC3goO.js} +2 -2
- package/dist/{ExpandMore-DpFPV8W9.js → ExpandMore-D5dA_4ky.js} +2 -2
- package/dist/{Favorite-DpJ7EDHh.js → Favorite-DkdOa-QT.js} +2 -2
- package/dist/{Menu-CcW81QRb.js → Menu-CgxtGUFu.js} +313 -304
- package/dist/{MenuItem-DGNNylSd.js → MenuItem-FlDSyi1I.js} +6 -6
- package/dist/{Paper-BUFfm5KI.js → Paper-DTI6p5rh.js} +10 -10
- package/dist/{Select-CWgjtbUU.js → Select-awnAAkKz.js} +393 -376
- package/dist/{Stack-CQ7zBwkJ.js → Stack-CO3ed3qL.js} +6 -6
- package/dist/{TransitionGroup-Buyx2ey4.js → TransitionGroup-BK0MDPKM.js} +3 -3
- package/dist/{Typography-fMf8hWqG.js → Typography-y4bVBfDI.js} +5 -5
- package/dist/assets/stripe-input.css +1 -1
- package/dist/{chunk-5P46WS5M-OG9gpzOE.js → chunk-6WTWBXEJ-CEca0jKr.js} +963 -922
- package/dist/{createSvgIcon-PpKM6urg.js → createSvgIcon-By5UWB4_.js} +130 -104
- package/dist/{createTheme-ubqb7_yU.js → createTheme-3Wd3hHrj.js} +4 -5
- package/dist/defaultTheme-fEi1x1Gb.js +5 -0
- package/dist/{extendSxProp-5t2om437.js → extendSxProp-BKWjdW12.js} +1 -1
- package/dist/{index-B6k9mhKf.js → index--x2dvtup.js} +1 -1
- package/dist/index-VB-2NIdQ.js +95 -0
- package/dist/{jsx-runtime-DywqP_6a.js → jsx-runtime-OVHDjVDe.js} +2 -2
- package/dist/main.d.ts +3 -3
- package/dist/main.js +72 -74
- package/dist/{mergeSlotProps-DKFm7I5M.js → mergeSlotProps-C7ui6BxO.js} +1 -1
- package/dist/s-accordion/s-accordion.js +10 -10
- package/dist/s-action-overlay/s-action-overlay.js +1 -1
- package/dist/s-autocomplete/s-autocomplete.js +1 -1
- package/dist/s-avatar/s-avatar.js +1 -1
- package/dist/s-blur-text/s-blur-text.js +1 -1
- package/dist/s-button/s-button.js +1 -1
- package/dist/s-button-link/s-button-link.js +1 -1
- package/dist/s-carousel/s-carousel.js +46 -46
- package/dist/s-category-card/s-category-card.js +1 -1
- package/dist/s-chat-input/s-chat-input.js +3 -3
- package/dist/s-chat-message/s-chat-message.js +2 -2
- package/dist/s-checkbox/s-checkbox.js +1 -1
- package/dist/s-chip/s-chip.js +1 -1
- package/dist/s-chips/s-chips.js +1 -1
- package/dist/s-comment-message/s-comment-message.js +4 -4
- package/dist/s-copilot-kit-provider/s-copilot-kit-provider.js +2 -2
- package/dist/s-copyable-text/s-copyable-text.js +2 -2
- package/dist/s-countdown/s-count-down.js +1 -1
- package/dist/s-data-table/s-data-table.js +7 -7
- package/dist/s-date-picker/s-date-picker.js +49 -46
- package/dist/s-datetime-picker/s-datetime-picker.js +651 -650
- package/dist/s-dialog/s-dialog.js +2 -2
- package/dist/s-dialog-confirm/s-dialog-confirm.js +3 -3
- package/dist/s-dialog-message/s-dialog-message.js +3 -3
- package/dist/s-empty/s-empty.js +1 -1
- package/dist/s-error/s-error.js +1 -1
- package/dist/s-file-dropzone/s-file-dropzone.js +5 -5
- package/dist/s-file-icon/s-file-icon.js +2 -2
- package/dist/s-flex-box/s-flex-box.js +2 -2
- package/dist/s-form/s-form.js +1 -1
- package/dist/s-glow-button/s-glow-button.js +1 -1
- package/dist/s-gradient-icon/s-gradient-icon.js +1 -1
- package/dist/s-i18n-provider/s-i18n-provider.js +1 -1
- package/dist/s-icon-button/s-icon-button.js +1 -1
- package/dist/s-image-comparison/s-image-comparison.js +2 -2
- package/dist/s-image-modal/s-image-modal.js +3 -3
- package/dist/s-interactive-gallery/s-interactive-gallery.js +1 -1
- package/dist/s-label/s-label.js +2 -2
- package/dist/s-lazy-image/s-lazy-image.js +1 -1
- package/dist/s-localization-provider/s-localization-provider.js +378 -293
- package/dist/s-moving-border/s-moving-border.js +1 -1
- package/dist/s-multi-select/s-multi-select.js +4 -4
- package/dist/s-no-ssr/s-no-ssr.js +1 -1
- package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +2 -2
- package/dist/s-pagination/s-pagination.js +1 -1
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +1 -1
- package/dist/s-rating/s-rating.js +1 -1
- package/dist/s-review/s-review.js +2 -2
- package/dist/s-scroll-reveal/s-scroll-reveal.js +1 -1
- package/dist/s-select/s-select.js +1 -1
- package/dist/s-skeleton/s-skeleton.js +1 -1
- package/dist/s-smart-text-field/s-smart-text-field.js +84 -84
- package/dist/s-snackbar-message/s-snackbar-message.js +1 -1
- package/dist/s-spotlight-cursor/s-spotlight-cursor.js +1 -1
- package/dist/s-stripe/s-stripe.js +1 -1
- package/dist/s-stripe/stripe-input.js +1 -1
- package/dist/s-tabs/s-tab-panel.js +1 -1
- package/dist/s-tabs/s-tab.js +1 -1
- package/dist/s-tabs/s-tabs.js +1 -1
- package/dist/s-text-editor/s-text-editor-toolbar.js +5 -5
- package/dist/s-text-editor/s-text-editor.js +2 -2
- package/dist/s-text-field/s-text-field.js +2 -2
- package/dist/s-text-shimmer/s-text-shimmer.js +2 -2
- package/dist/s-text-truncation/s-text-truncation.js +1 -1
- package/dist/s-theme-demo/s-theme-demo.js +3 -3
- package/dist/s-theme-provider/index.d.ts +0 -2
- package/dist/s-theme-provider/index.js +2 -5
- package/dist/s-theme-provider/s-theme-provider.js +1 -1
- package/dist/s-theme-switch/index.d.ts +1 -1
- package/dist/s-theme-switch/s-theme-switch.d.ts +4 -1
- package/dist/s-theme-switch/s-theme-switch.js +22 -24
- package/dist/s-tip/s-tip.js +4 -4
- package/dist/s-typewriter-text/s-typewriter-text.js +1 -1
- package/dist/{styled-C9vD3j80.js → styled-BD_erj7E.js} +3 -3
- package/dist/theme/components/avatar.js +2 -2
- package/dist/theme/components/chip.js +2 -2
- package/dist/theme/customizations/inputs.js +2 -2
- package/dist/theme/customizations/navigation.js +2 -2
- package/dist/theme/theme-primitives.js +1 -1
- package/dist/{useControlled-nm4pBabJ.js → useControlled-D1L5tREc.js} +11 -11
- package/dist/{useMobilePicker-kwoV49Bq.js → useMobilePicker-BV-ABj4C.js} +4023 -3979
- package/dist/{useTheme-BRW1H8JQ.js → useTheme-B5czKfC4.js} +1 -1
- package/dist/{useThemeProps-DEztVr97.js → useThemeProps-DqA5BinV.js} +1 -1
- package/dist/utils/dayjs.js +14 -14
- package/dist/{warning-Dcl59VWg.js → warning-BCwEnWrE.js} +4 -4
- package/package.json +6 -6
- package/dist/DefaultPropsProvider-B--diaQ3.js +0 -56
- package/dist/GlobalStyles-OdaYqxTO.js +0 -59
- package/dist/defaultTheme-CtLmY7I4.js +0 -5
- package/dist/index-N6ZbgVEG.js +0 -33
- package/dist/index-h98nw21y.js +0 -44
- package/dist/s-theme-provider/use-theme.d.ts +0 -51
- package/dist/s-theme-provider/use-theme.js +0 -670
- package/dist/useId-CK6Kn3Tn.js +0 -21
package/dist/utils/dayjs.js
CHANGED
|
@@ -3,27 +3,27 @@ import { default as X } from "dayjs";
|
|
|
3
3
|
import { g as E } from "../_commonjsHelpers-B4e78b8K.js";
|
|
4
4
|
var v = { exports: {} }, N = v.exports, j;
|
|
5
5
|
function U() {
|
|
6
|
-
return j || (j = 1, function(u, d) {
|
|
6
|
+
return j || (j = 1, (function(u, d) {
|
|
7
7
|
(function(o, r) {
|
|
8
8
|
u.exports = r();
|
|
9
|
-
})(N, function() {
|
|
9
|
+
})(N, (function() {
|
|
10
10
|
return function(o, r, n) {
|
|
11
11
|
r.prototype.isToday = function() {
|
|
12
12
|
var t = "YYYY-MM-DD", a = n();
|
|
13
13
|
return this.format(t) === a.format(t);
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
});
|
|
17
|
-
}(v)), v.exports;
|
|
16
|
+
}));
|
|
17
|
+
})(v)), v.exports;
|
|
18
18
|
}
|
|
19
19
|
var C = U();
|
|
20
20
|
const F = /* @__PURE__ */ E(C);
|
|
21
21
|
var x = { exports: {} }, O = x.exports, Y;
|
|
22
22
|
function P() {
|
|
23
|
-
return Y || (Y = 1, function(u, d) {
|
|
23
|
+
return Y || (Y = 1, (function(u, d) {
|
|
24
24
|
(function(o, r) {
|
|
25
25
|
u.exports = r();
|
|
26
|
-
})(O, function() {
|
|
26
|
+
})(O, (function() {
|
|
27
27
|
return function(o, r, n) {
|
|
28
28
|
o = o || {};
|
|
29
29
|
var t = r.prototype, a = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
|
|
@@ -59,27 +59,27 @@ function P() {
|
|
|
59
59
|
return this.from(m(this), e);
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
|
-
});
|
|
63
|
-
}(x)), x.exports;
|
|
62
|
+
}));
|
|
63
|
+
})(x)), x.exports;
|
|
64
64
|
}
|
|
65
65
|
var z = P();
|
|
66
66
|
const B = /* @__PURE__ */ E(z);
|
|
67
67
|
var T = { exports: {} }, A = T.exports, b;
|
|
68
68
|
function G() {
|
|
69
|
-
return b || (b = 1, function(u, d) {
|
|
69
|
+
return b || (b = 1, (function(u, d) {
|
|
70
70
|
(function(o, r) {
|
|
71
71
|
u.exports = r();
|
|
72
|
-
})(A, function() {
|
|
72
|
+
})(A, (function() {
|
|
73
73
|
return function(o, r, n) {
|
|
74
74
|
n.updateLocale = function(t, a) {
|
|
75
75
|
var f = n.Ls[t];
|
|
76
|
-
if (f) return (a ? Object.keys(a) : []).forEach(function(m) {
|
|
76
|
+
if (f) return (a ? Object.keys(a) : []).forEach((function(m) {
|
|
77
77
|
f[m] = a[m];
|
|
78
|
-
}), f;
|
|
78
|
+
})), f;
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
|
-
});
|
|
82
|
-
}(T)), T.exports;
|
|
81
|
+
}));
|
|
82
|
+
})(T)), T.exports;
|
|
83
83
|
}
|
|
84
84
|
var H = G();
|
|
85
85
|
const J = /* @__PURE__ */ E(H);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { _ as L, a as P } from "./objectWithoutPropertiesLoose-DiWPeE4c.js";
|
|
2
2
|
import * as n from "react";
|
|
3
|
-
import { P as e } from "./createTheme-
|
|
4
|
-
import { j as E } from "./jsx-runtime-
|
|
5
|
-
import { d as M } from "./defaultTheme-
|
|
3
|
+
import { P as e } from "./createTheme-3Wd3hHrj.js";
|
|
4
|
+
import { j as E } from "./jsx-runtime-OVHDjVDe.js";
|
|
5
|
+
import { d as M } from "./defaultTheme-fEi1x1Gb.js";
|
|
6
6
|
import { T as j } from "./identifier-BKLqN993.js";
|
|
7
|
-
import { u as v } from "./useThemeProps-
|
|
7
|
+
import { u as v } from "./useThemeProps-DqA5BinV.js";
|
|
8
8
|
function w({
|
|
9
9
|
props: o,
|
|
10
10
|
name: a
|
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.116",
|
|
7
7
|
"description": "advanced ui kit for solostylist",
|
|
8
8
|
"private": false,
|
|
9
9
|
"type": "module",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"@emotion/react": "^11.14.0",
|
|
34
34
|
"@emotion/styled": "^11.14.0",
|
|
35
35
|
"@fontsource/outfit": "^5.2.6",
|
|
36
|
-
"@mui/icons-material": "
|
|
37
|
-
"@mui/lab": "7.0.0-beta.
|
|
38
|
-
"@mui/material": "
|
|
39
|
-
"@mui/utils": "
|
|
40
|
-
"@mui/x-date-pickers": "
|
|
36
|
+
"@mui/icons-material": "7.3.2",
|
|
37
|
+
"@mui/lab": "7.0.0-beta.17",
|
|
38
|
+
"@mui/material": "7.3.2",
|
|
39
|
+
"@mui/utils": "7.3.2",
|
|
40
|
+
"@mui/x-date-pickers": "8.12.0",
|
|
41
41
|
"@stripe/react-stripe-js": "^3.7.0",
|
|
42
42
|
"@stripe/stripe-js": "^7.3.1",
|
|
43
43
|
"@tiptap/extension-link": "^2.11.9",
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import * as m from "react";
|
|
2
|
-
import { P as s } from "./createTheme-ubqb7_yU.js";
|
|
3
|
-
import { j as a } from "./jsx-runtime-DywqP_6a.js";
|
|
4
|
-
import { r as p } from "./resolveProps-61uUKnlS.js";
|
|
5
|
-
const c = /* @__PURE__ */ m.createContext(void 0);
|
|
6
|
-
function i({
|
|
7
|
-
value: o,
|
|
8
|
-
children: e
|
|
9
|
-
}) {
|
|
10
|
-
return /* @__PURE__ */ a.jsx(c.Provider, {
|
|
11
|
-
value: o,
|
|
12
|
-
children: e
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
process.env.NODE_ENV !== "production" && (i.propTypes = {
|
|
16
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
17
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
18
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
19
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
20
|
-
/**
|
|
21
|
-
* @ignore
|
|
22
|
-
*/
|
|
23
|
-
children: s.node,
|
|
24
|
-
/**
|
|
25
|
-
* @ignore
|
|
26
|
-
*/
|
|
27
|
-
value: s.object
|
|
28
|
-
});
|
|
29
|
-
function u(o) {
|
|
30
|
-
const {
|
|
31
|
-
theme: e,
|
|
32
|
-
name: t,
|
|
33
|
-
props: n
|
|
34
|
-
} = o;
|
|
35
|
-
if (!e || !e.components || !e.components[t])
|
|
36
|
-
return n;
|
|
37
|
-
const r = e.components[t];
|
|
38
|
-
return r.defaultProps ? p(r.defaultProps, n, e.components.mergeClassNameAndStyle) : !r.styleOverrides && !r.variants ? p(r, n, e.components.mergeClassNameAndStyle) : n;
|
|
39
|
-
}
|
|
40
|
-
function P({
|
|
41
|
-
props: o,
|
|
42
|
-
name: e
|
|
43
|
-
}) {
|
|
44
|
-
const t = m.useContext(c);
|
|
45
|
-
return u({
|
|
46
|
-
props: o,
|
|
47
|
-
name: e,
|
|
48
|
-
theme: {
|
|
49
|
-
components: t
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
export {
|
|
54
|
-
i as D,
|
|
55
|
-
P as u
|
|
56
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import { P as e } from "./createTheme-ubqb7_yU.js";
|
|
3
|
-
import { i as u } from "./index-B6k9mhKf.js";
|
|
4
|
-
import { j as p } from "./jsx-runtime-DywqP_6a.js";
|
|
5
|
-
import { u as y } from "./useTheme-BRW1H8JQ.js";
|
|
6
|
-
import { Global as c } from "@emotion/react";
|
|
7
|
-
function m(r) {
|
|
8
|
-
return r == null || Object.keys(r).length === 0;
|
|
9
|
-
}
|
|
10
|
-
function f(r) {
|
|
11
|
-
const {
|
|
12
|
-
styles: t,
|
|
13
|
-
defaultTheme: l = {}
|
|
14
|
-
} = r, n = typeof t == "function" ? (o) => t(m(o) ? l : o) : t;
|
|
15
|
-
return /* @__PURE__ */ p.jsx(c, {
|
|
16
|
-
styles: n
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
process.env.NODE_ENV !== "production" && (f.propTypes = {
|
|
20
|
-
defaultTheme: e.object,
|
|
21
|
-
styles: e.oneOfType([e.array, e.string, e.object, e.func])
|
|
22
|
-
});
|
|
23
|
-
function a(r) {
|
|
24
|
-
const t = u(r);
|
|
25
|
-
return r !== t && t.styles ? (t.styles.match(/^@layer\s+[^{]*$/) || (t.styles = `@layer global{${t.styles}}`), t) : r;
|
|
26
|
-
}
|
|
27
|
-
function b({
|
|
28
|
-
styles: r,
|
|
29
|
-
themeId: t,
|
|
30
|
-
defaultTheme: l = {}
|
|
31
|
-
}) {
|
|
32
|
-
const n = y(l), o = t && n[t] || n;
|
|
33
|
-
let s = typeof r == "function" ? r(o) : r;
|
|
34
|
-
return o.modularCssLayers && (Array.isArray(s) ? s = s.map((i) => a(typeof i == "function" ? i(o) : i)) : s = a(s)), /* @__PURE__ */ p.jsx(f, {
|
|
35
|
-
styles: s
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
process.env.NODE_ENV !== "production" && (b.propTypes = {
|
|
39
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
40
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
41
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
42
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
43
|
-
/**
|
|
44
|
-
* @ignore
|
|
45
|
-
*/
|
|
46
|
-
defaultTheme: e.object,
|
|
47
|
-
/**
|
|
48
|
-
* @ignore
|
|
49
|
-
*/
|
|
50
|
-
styles: e.oneOfType([e.array, e.func, e.number, e.object, e.string, e.bool]),
|
|
51
|
-
/**
|
|
52
|
-
* @ignore
|
|
53
|
-
*/
|
|
54
|
-
themeId: e.string
|
|
55
|
-
});
|
|
56
|
-
export {
|
|
57
|
-
b as G,
|
|
58
|
-
f as a
|
|
59
|
-
};
|
package/dist/index-N6ZbgVEG.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as s from "react";
|
|
2
|
-
import { P as n } from "./createTheme-ubqb7_yU.js";
|
|
3
|
-
import { j as p } from "./jsx-runtime-DywqP_6a.js";
|
|
4
|
-
const a = "exact-prop: ";
|
|
5
|
-
function f(e) {
|
|
6
|
-
return process.env.NODE_ENV === "production" ? e : {
|
|
7
|
-
...e,
|
|
8
|
-
[a]: (r) => {
|
|
9
|
-
const t = Object.keys(r).filter((o) => !e.hasOwnProperty(o));
|
|
10
|
-
return t.length > 0 ? new Error(`The following props are not supported: ${t.map((o) => `\`${o}\``).join(", ")}. Please remove them.`) : null;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
const u = /* @__PURE__ */ s.createContext();
|
|
15
|
-
function c({
|
|
16
|
-
value: e,
|
|
17
|
-
...r
|
|
18
|
-
}) {
|
|
19
|
-
return /* @__PURE__ */ p.jsx(u.Provider, {
|
|
20
|
-
value: e ?? !0,
|
|
21
|
-
...r
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
process.env.NODE_ENV !== "production" && (c.propTypes = {
|
|
25
|
-
children: n.node,
|
|
26
|
-
value: n.bool
|
|
27
|
-
});
|
|
28
|
-
const m = () => s.useContext(u) ?? !1;
|
|
29
|
-
export {
|
|
30
|
-
c as R,
|
|
31
|
-
f as e,
|
|
32
|
-
m as u
|
|
33
|
-
};
|
package/dist/index-h98nw21y.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import { j as e } from "./jsx-runtime-DywqP_6a.js";
|
|
3
|
-
import { e as s } from "./extendSxProp-5t2om437.js";
|
|
4
|
-
import { P as o } from "./createTheme-ubqb7_yU.js";
|
|
5
|
-
import { d as a } from "./defaultTheme-CtLmY7I4.js";
|
|
6
|
-
import { T as i } from "./identifier-BKLqN993.js";
|
|
7
|
-
import { G as m } from "./GlobalStyles-OdaYqxTO.js";
|
|
8
|
-
function t(r) {
|
|
9
|
-
return /* @__PURE__ */ e.jsx(m, {
|
|
10
|
-
...r,
|
|
11
|
-
defaultTheme: a,
|
|
12
|
-
themeId: i
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
process.env.NODE_ENV !== "production" && (t.propTypes = {
|
|
16
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
17
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
18
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
19
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
20
|
-
/**
|
|
21
|
-
* The styles you want to apply globally.
|
|
22
|
-
*/
|
|
23
|
-
styles: o.oneOfType([o.array, o.func, o.number, o.object, o.string, o.bool])
|
|
24
|
-
});
|
|
25
|
-
function T(r) {
|
|
26
|
-
return function(n) {
|
|
27
|
-
return (
|
|
28
|
-
// Pigment CSS `globalCss` support callback with theme inside an object but `GlobalStyles` support theme as a callback value.
|
|
29
|
-
/* @__PURE__ */ e.jsx(t, {
|
|
30
|
-
styles: typeof r == "function" ? (p) => r({
|
|
31
|
-
theme: p,
|
|
32
|
-
...n
|
|
33
|
-
}) : r
|
|
34
|
-
})
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
function E() {
|
|
39
|
-
return s;
|
|
40
|
-
}
|
|
41
|
-
export {
|
|
42
|
-
T as g,
|
|
43
|
-
E as i
|
|
44
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type definition for theme modes
|
|
3
|
-
*/
|
|
4
|
-
export type SThemeMode = 'light' | 'dark' | 'system';
|
|
5
|
-
/**
|
|
6
|
-
* Custom hook for theme management in SoloStylist UI Kit
|
|
7
|
-
*
|
|
8
|
-
* This hook provides easy access to the current theme mode and methods
|
|
9
|
-
* to change the theme throughout the entire application.
|
|
10
|
-
*
|
|
11
|
-
* @returns Object containing theme mode, setter, and utility methods
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* import { useSTheme } from '@solostylist/ui-kit/s-theme-provider';
|
|
16
|
-
*
|
|
17
|
-
* function MyComponent() {
|
|
18
|
-
* const { mode, setMode, isDark, isLight, toggleMode } = useSTheme();
|
|
19
|
-
*
|
|
20
|
-
* return (
|
|
21
|
-
* <div>
|
|
22
|
-
* <p>Current mode: {mode}</p>
|
|
23
|
-
* <button onClick={() => setMode('dark')}>Dark Mode</button>
|
|
24
|
-
* <button onClick={() => setMode('light')}>Light Mode</button>
|
|
25
|
-
* <button onClick={toggleMode}>Toggle Theme</button>
|
|
26
|
-
* </div>
|
|
27
|
-
* );
|
|
28
|
-
* }
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
export declare const useSTheme: () => {
|
|
32
|
-
/** Current theme mode (includes 'system') */
|
|
33
|
-
mode: SThemeMode;
|
|
34
|
-
/** Resolved theme mode (system resolves to light/dark) */
|
|
35
|
-
resolvedMode: "light" | "dark";
|
|
36
|
-
/** System preference mode */
|
|
37
|
-
systemMode: "light" | "dark";
|
|
38
|
-
/** Set theme mode */
|
|
39
|
-
setMode: (newMode: SThemeMode) => void;
|
|
40
|
-
/** Is current theme dark? */
|
|
41
|
-
isDark: boolean;
|
|
42
|
-
/** Is current theme light? */
|
|
43
|
-
isLight: boolean;
|
|
44
|
-
/** Is using system preference? */
|
|
45
|
-
isSystem: boolean;
|
|
46
|
-
/** Toggle between light and dark (skips system) */
|
|
47
|
-
toggleMode: () => void;
|
|
48
|
-
/** Cycle through all modes: light → dark → system → light */
|
|
49
|
-
cycleMode: () => void;
|
|
50
|
-
};
|
|
51
|
-
export default useSTheme;
|