@solostylist/ui-kit 1.0.44 → 1.0.45
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/main.d.ts +2 -0
- package/dist/main.js +53 -48
- package/dist/s-smart-text-field/index.d.ts +2 -2
- package/dist/s-smart-text-field/index.js +1 -1
- package/dist/s-smart-text-field/{s-text-field.d.ts → s-smart-text-field.d.ts} +3 -1
- package/dist/s-smart-text-field/{s-text-field.js → s-smart-text-field.js} +5 -4
- package/dist/s-stripe/index.d.ts +2 -0
- package/dist/s-stripe/index.js +7 -0
- package/dist/s-stripe/package.json +5 -0
- package/dist/s-stripe/s-stripe.d.ts +13 -0
- package/dist/s-stripe/s-stripe.js +325 -0
- package/dist/s-stripe/stripe-input.d.ts +4 -0
- package/dist/s-stripe/stripe-input.js +31 -0
- package/dist/s-theme-provider/s-theme-provider.d.ts +5 -4
- package/dist/s-theme-provider/s-theme-provider.js +33 -28
- package/dist/theme/customizations/inputs.js +11 -7
- package/dist/theme/customizations/surfaces.js +1 -1
- package/dist/theme/theme-primitives.js +111 -101
- package/package.json +4 -2
package/dist/main.d.ts
CHANGED
|
@@ -52,6 +52,8 @@ export { default as SForm } from './s-form/index';
|
|
|
52
52
|
export type { SFormProps } from './s-form/index';
|
|
53
53
|
export { default as SSmartTextField } from './s-smart-text-field/index';
|
|
54
54
|
export type { SSmartTextFieldProps } from './s-smart-text-field/index';
|
|
55
|
+
export { SStripeNumber, SStripeExpiry, SStripeCVC, StripeTextField } from './s-stripe/index';
|
|
56
|
+
export type { StripeTextFieldProps, StripeElement } from './s-stripe/index';
|
|
55
57
|
export { default as SThemeProvider } from './s-theme-provider/index';
|
|
56
58
|
export type { SThemeProviderProps } from './s-theme-provider/index';
|
|
57
59
|
export * from './hooks';
|
package/dist/main.js
CHANGED
|
@@ -1,81 +1,86 @@
|
|
|
1
1
|
import { default as r } from "./s-autocomplete/s-autocomplete.js";
|
|
2
|
-
import { default as
|
|
2
|
+
import { default as a } from "./s-button-link/s-button-link.js";
|
|
3
3
|
import { default as l } from "./s-text-editor/s-text-editor.js";
|
|
4
4
|
import { default as m } from "./s-checkbox/s-checkbox.js";
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
5
|
+
import { default as S } from "./s-chips/s-chips.js";
|
|
6
|
+
import { default as d } from "./s-data-table/s-data-table.js";
|
|
7
7
|
import { DialogConfirmProvider as i, default as g, useDialogConfirm as n } from "./s-dialog-confirm/s-dialog-confirm.js";
|
|
8
|
-
import { DialogMessageProvider as D, default as T, useDialogMessage as
|
|
8
|
+
import { DialogMessageProvider as D, default as T, useDialogMessage as b } from "./s-dialog-message/s-dialog-message.js";
|
|
9
9
|
import { default as v } from "./s-error/s-error.js";
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
10
|
+
import { default as M } from "./s-empty/s-empty.js";
|
|
11
|
+
import { default as F } from "./s-dialog/s-dialog.js";
|
|
12
12
|
import { default as y } from "./s-file-dropzone/s-file-dropzone.js";
|
|
13
|
-
import { default as
|
|
13
|
+
import { default as I } from "./s-file-icon/s-file-icon.js";
|
|
14
14
|
import { default as z } from "./s-i18n-provider/s-i18n-provider.js";
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
15
|
+
import { default as N } from "./s-icon-button/s-icon-button.js";
|
|
16
|
+
import { default as A } from "./s-label/s-label.js";
|
|
17
|
+
import { default as V } from "./s-multi-select/s-multi-select.js";
|
|
18
|
+
import { default as w } from "./s-no-ssr/s-no-ssr.js";
|
|
19
|
+
import { default as J } from "./s-text-field/s-text-field.js";
|
|
20
|
+
import { default as O } from "./s-pagination/s-pagination.js";
|
|
21
|
+
import { default as R } from "./s-select/s-select.js";
|
|
22
22
|
import { default as W } from "./s-skeleton/s-skeleton.js";
|
|
23
23
|
import { default as Y } from "./s-tip/s-tip.js";
|
|
24
24
|
import { default as _ } from "./s-text-truncation/s-text-truncation.js";
|
|
25
25
|
import { default as ee, SnackbarMessageProvider as oe, useSnackbarMessage as re } from "./s-snackbar-message/s-snackbar-message.js";
|
|
26
|
-
import { default as
|
|
26
|
+
import { default as ae } from "./s-image-gallery/s-image-gallery.js";
|
|
27
27
|
import { default as le } from "./s-form/s-form.js";
|
|
28
|
-
import { SSmartTextField as me } from "./s-smart-text-field/s-text-field.js";
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
28
|
+
import { SSmartTextField as me } from "./s-smart-text-field/s-smart-text-field.js";
|
|
29
|
+
import { SStripeCVC as Se, SStripeExpiry as xe, SStripeNumber as de, StripeTextField as ue } from "./s-stripe/s-stripe.js";
|
|
30
|
+
import { default as ge } from "./s-theme-provider/s-theme-provider.js";
|
|
31
|
+
import { useDialog as ce } from "./hooks/use-dialog.js";
|
|
32
|
+
import { usePopover as Te } from "./hooks/use-popover.js";
|
|
33
|
+
import { formatDatePosted as Pe } from "./utils/dayjs.js";
|
|
34
|
+
import { bytesToSize as Ce } from "./utils/bytes-to-size.js";
|
|
35
|
+
import { LogLevel as ke, Logger as Fe, createLogger as Le, logger as ye } from "./utils/logger.js";
|
|
36
|
+
import { default as Ie } from "dayjs";
|
|
36
37
|
export {
|
|
37
38
|
i as DialogConfirmProvider,
|
|
38
39
|
D as DialogMessageProvider,
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
ke as LogLevel,
|
|
41
|
+
Fe as Logger,
|
|
41
42
|
r as SAutocomplete,
|
|
42
|
-
|
|
43
|
+
a as SButtonLink,
|
|
43
44
|
m as SCheckbox,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
S as SChips,
|
|
46
|
+
d as SDataTable,
|
|
47
|
+
F as SDialog,
|
|
47
48
|
g as SDialogConfirm,
|
|
48
49
|
T as SDialogMessage,
|
|
49
|
-
|
|
50
|
+
M as SEmpty,
|
|
50
51
|
v as SError,
|
|
51
52
|
y as SFileDropzone,
|
|
52
|
-
|
|
53
|
+
I as SFileIcon,
|
|
53
54
|
le as SForm,
|
|
54
55
|
z as SI18nProvider,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
N as SIconButton,
|
|
57
|
+
ae as SImageGallery,
|
|
58
|
+
A as SLabel,
|
|
59
|
+
V as SMultiSelect,
|
|
60
|
+
w as SNoSsr,
|
|
61
|
+
O as SPagination,
|
|
62
|
+
R as SSelect,
|
|
62
63
|
W as SSkeleton,
|
|
63
64
|
me as SSmartTextField,
|
|
64
65
|
ee as SSnackbarMessage,
|
|
66
|
+
Se as SStripeCVC,
|
|
67
|
+
xe as SStripeExpiry,
|
|
68
|
+
de as SStripeNumber,
|
|
65
69
|
l as STextEditor,
|
|
66
|
-
|
|
70
|
+
J as STextField,
|
|
67
71
|
_ as STextTruncation,
|
|
68
|
-
|
|
72
|
+
ge as SThemeProvider,
|
|
69
73
|
Y as STip,
|
|
70
74
|
oe as SnackbarMessageProvider,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
Le as
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
ue as StripeTextField,
|
|
76
|
+
Ce as bytesToSize,
|
|
77
|
+
Le as createLogger,
|
|
78
|
+
Ie as dayjs,
|
|
79
|
+
Pe as formatDatePosted,
|
|
80
|
+
ye as logger,
|
|
81
|
+
ce as useDialog,
|
|
77
82
|
n as useDialogConfirm,
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
b as useDialogMessage,
|
|
84
|
+
Te as usePopover,
|
|
80
85
|
re as useSnackbarMessage
|
|
81
86
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './s-text-field';
|
|
2
|
-
export type { SSmartTextFieldProps } from './s-text-field';
|
|
1
|
+
export { default } from './s-smart-text-field';
|
|
2
|
+
export type { SSmartTextFieldProps } from './s-smart-text-field';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CopilotKitProps } from '@copilotkit/react-core';
|
|
1
2
|
import { AutosuggestionsConfigUserSpecified, CopilotTextarea } from '@copilotkit/react-textarea';
|
|
2
3
|
export type SSmartTextFieldProps = Omit<React.ComponentProps<typeof CopilotTextarea>, 'autosuggestionsConfig'> & {
|
|
3
4
|
autosuggestionsConfig?: AutosuggestionsConfigUserSpecified;
|
|
@@ -6,6 +7,7 @@ export type SSmartTextFieldProps = Omit<React.ComponentProps<typeof CopilotTexta
|
|
|
6
7
|
error?: string;
|
|
7
8
|
required?: boolean;
|
|
8
9
|
htmlFor?: string;
|
|
10
|
+
copilotKitProps: Omit<CopilotKitProps, 'children'>;
|
|
9
11
|
};
|
|
10
|
-
export declare function SSmartTextField({ autosuggestionsConfig, label, hint, error, required, htmlFor, ...props }: SSmartTextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function SSmartTextField({ autosuggestionsConfig, label, hint, error, required, htmlFor, copilotKitProps, ...props }: SSmartTextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
11
13
|
export default SSmartTextField;
|
|
@@ -27124,10 +27124,10 @@ const $N = Vv(RN)(({ theme: e }) => ({
|
|
|
27124
27124
|
}
|
|
27125
27125
|
]
|
|
27126
27126
|
})), MN = {
|
|
27127
|
-
textareaPurpose: "
|
|
27127
|
+
textareaPurpose: "",
|
|
27128
27128
|
chatApiConfigs: {
|
|
27129
27129
|
suggestionsApiConfig: {
|
|
27130
|
-
maxTokens:
|
|
27130
|
+
maxTokens: 512,
|
|
27131
27131
|
stop: [".", "?", "!"]
|
|
27132
27132
|
}
|
|
27133
27133
|
}
|
|
@@ -27139,9 +27139,10 @@ function ZN({
|
|
|
27139
27139
|
error: r,
|
|
27140
27140
|
required: i = !1,
|
|
27141
27141
|
htmlFor: a,
|
|
27142
|
-
|
|
27142
|
+
copilotKitProps: o,
|
|
27143
|
+
...s
|
|
27143
27144
|
}) {
|
|
27144
|
-
return /* @__PURE__ */ V.jsx(Wv, { label: t, hint: n, error: r, required: i, htmlFor: a, children: /* @__PURE__ */ V.jsx(RD, {
|
|
27145
|
+
return /* @__PURE__ */ V.jsx(Wv, { label: t, hint: n, error: r, required: i, htmlFor: a, children: /* @__PURE__ */ V.jsx(RD, { ...o, children: /* @__PURE__ */ V.jsx($N, { disableBranding: !0, autosuggestionsConfig: e, ...s }) }) });
|
|
27145
27146
|
}
|
|
27146
27147
|
export {
|
|
27147
27148
|
ZN as SSmartTextField,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AuBankAccountElement, CardCvcElement, CardExpiryElement, CardNumberElement, FpxBankElement, IbanElement, IdealBankElement } from '@stripe/react-stripe-js';
|
|
2
|
+
import { STextFieldProps } from '../s-text-field';
|
|
3
|
+
export type StripeElement = typeof AuBankAccountElement | typeof CardCvcElement | typeof CardExpiryElement | typeof CardNumberElement | typeof FpxBankElement | typeof IbanElement | typeof IdealBankElement;
|
|
4
|
+
export interface StripeTextFieldProps<T extends StripeElement> extends Omit<STextFieldProps, 'onChange' | 'inputComponent' | 'inputProps'> {
|
|
5
|
+
inputProps?: React.ComponentProps<T>;
|
|
6
|
+
labelErrorMessage?: string;
|
|
7
|
+
onChange?: React.ComponentProps<T>['onChange'];
|
|
8
|
+
stripeElement?: T;
|
|
9
|
+
}
|
|
10
|
+
export declare const StripeTextField: <T extends StripeElement>(props: StripeTextFieldProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function SStripeNumber(props: StripeTextFieldProps<typeof CardNumberElement>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function SStripeExpiry(props: StripeTextFieldProps<typeof CardExpiryElement>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function SStripeCVC(props: StripeTextFieldProps<typeof CardCvcElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { j as w } from "../jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import l from "react";
|
|
3
|
+
import { P as u } from "../createTheme-CyFSna1a.js";
|
|
4
|
+
import ne from "../s-text-field/s-text-field.js";
|
|
5
|
+
import oe from "./stripe-input.js";
|
|
6
|
+
function M(r, e) {
|
|
7
|
+
var t = Object.keys(r);
|
|
8
|
+
if (Object.getOwnPropertySymbols) {
|
|
9
|
+
var n = Object.getOwnPropertySymbols(r);
|
|
10
|
+
e && (n = n.filter(function(a) {
|
|
11
|
+
return Object.getOwnPropertyDescriptor(r, a).enumerable;
|
|
12
|
+
})), t.push.apply(t, n);
|
|
13
|
+
}
|
|
14
|
+
return t;
|
|
15
|
+
}
|
|
16
|
+
function W(r) {
|
|
17
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
18
|
+
var t = arguments[e] != null ? arguments[e] : {};
|
|
19
|
+
e % 2 ? M(Object(t), !0).forEach(function(n) {
|
|
20
|
+
K(r, n, t[n]);
|
|
21
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : M(Object(t)).forEach(function(n) {
|
|
22
|
+
Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n));
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return r;
|
|
26
|
+
}
|
|
27
|
+
function j(r) {
|
|
28
|
+
"@babel/helpers - typeof";
|
|
29
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? j = function(e) {
|
|
30
|
+
return typeof e;
|
|
31
|
+
} : j = function(e) {
|
|
32
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
33
|
+
}, j(r);
|
|
34
|
+
}
|
|
35
|
+
function K(r, e, t) {
|
|
36
|
+
return e in r ? Object.defineProperty(r, e, {
|
|
37
|
+
value: t,
|
|
38
|
+
enumerable: !0,
|
|
39
|
+
configurable: !0,
|
|
40
|
+
writable: !0
|
|
41
|
+
}) : r[e] = t, r;
|
|
42
|
+
}
|
|
43
|
+
function ae(r, e) {
|
|
44
|
+
if (r == null) return {};
|
|
45
|
+
var t = {}, n = Object.keys(r), a, o;
|
|
46
|
+
for (o = 0; o < n.length; o++)
|
|
47
|
+
a = n[o], !(e.indexOf(a) >= 0) && (t[a] = r[a]);
|
|
48
|
+
return t;
|
|
49
|
+
}
|
|
50
|
+
function ie(r, e) {
|
|
51
|
+
if (r == null) return {};
|
|
52
|
+
var t = ae(r, e), n, a;
|
|
53
|
+
if (Object.getOwnPropertySymbols) {
|
|
54
|
+
var o = Object.getOwnPropertySymbols(r);
|
|
55
|
+
for (a = 0; a < o.length; a++)
|
|
56
|
+
n = o[a], !(e.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(r, n) && (t[n] = r[n]);
|
|
57
|
+
}
|
|
58
|
+
return t;
|
|
59
|
+
}
|
|
60
|
+
function ue(r, e) {
|
|
61
|
+
return ce(r) || se(r, e) || le(r, e) || pe();
|
|
62
|
+
}
|
|
63
|
+
function ce(r) {
|
|
64
|
+
if (Array.isArray(r)) return r;
|
|
65
|
+
}
|
|
66
|
+
function se(r, e) {
|
|
67
|
+
var t = r && (typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"]);
|
|
68
|
+
if (t != null) {
|
|
69
|
+
var n = [], a = !0, o = !1, p, h;
|
|
70
|
+
try {
|
|
71
|
+
for (t = t.call(r); !(a = (p = t.next()).done) && (n.push(p.value), !(e && n.length === e)); a = !0)
|
|
72
|
+
;
|
|
73
|
+
} catch (i) {
|
|
74
|
+
o = !0, h = i;
|
|
75
|
+
} finally {
|
|
76
|
+
try {
|
|
77
|
+
!a && t.return != null && t.return();
|
|
78
|
+
} finally {
|
|
79
|
+
if (o) throw h;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return n;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function le(r, e) {
|
|
86
|
+
if (r) {
|
|
87
|
+
if (typeof r == "string") return D(r, e);
|
|
88
|
+
var t = Object.prototype.toString.call(r).slice(8, -1);
|
|
89
|
+
if (t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set") return Array.from(r);
|
|
90
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return D(r, e);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function D(r, e) {
|
|
94
|
+
(e == null || e > r.length) && (e = r.length);
|
|
95
|
+
for (var t = 0, n = new Array(e); t < e; t++) n[t] = r[t];
|
|
96
|
+
return n;
|
|
97
|
+
}
|
|
98
|
+
function pe() {
|
|
99
|
+
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
100
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
101
|
+
}
|
|
102
|
+
var y = function(e, t, n) {
|
|
103
|
+
var a = !!n, o = l.useRef(n);
|
|
104
|
+
l.useEffect(function() {
|
|
105
|
+
o.current = n;
|
|
106
|
+
}, [n]), l.useEffect(function() {
|
|
107
|
+
if (!a || !e)
|
|
108
|
+
return function() {
|
|
109
|
+
};
|
|
110
|
+
var p = function() {
|
|
111
|
+
o.current && o.current.apply(o, arguments);
|
|
112
|
+
};
|
|
113
|
+
return e.on(t, p), function() {
|
|
114
|
+
e.off(t, p);
|
|
115
|
+
};
|
|
116
|
+
}, [a, t, e, o]);
|
|
117
|
+
}, fe = function(e) {
|
|
118
|
+
var t = l.useRef(e);
|
|
119
|
+
return l.useEffect(function() {
|
|
120
|
+
t.current = e;
|
|
121
|
+
}, [e]), t.current;
|
|
122
|
+
}, A = function(e) {
|
|
123
|
+
return e !== null && j(e) === "object";
|
|
124
|
+
}, F = "[object Object]", de = function r(e, t) {
|
|
125
|
+
if (!A(e) || !A(t))
|
|
126
|
+
return e === t;
|
|
127
|
+
var n = Array.isArray(e), a = Array.isArray(t);
|
|
128
|
+
if (n !== a) return !1;
|
|
129
|
+
var o = Object.prototype.toString.call(e) === F, p = Object.prototype.toString.call(t) === F;
|
|
130
|
+
if (o !== p) return !1;
|
|
131
|
+
if (!o && !n) return e === t;
|
|
132
|
+
var h = Object.keys(e), i = Object.keys(t);
|
|
133
|
+
if (h.length !== i.length) return !1;
|
|
134
|
+
for (var b = {}, g = 0; g < h.length; g += 1)
|
|
135
|
+
b[h[g]] = !0;
|
|
136
|
+
for (var E = 0; E < i.length; E += 1)
|
|
137
|
+
b[i[E]] = !0;
|
|
138
|
+
var m = Object.keys(b);
|
|
139
|
+
if (m.length !== h.length)
|
|
140
|
+
return !1;
|
|
141
|
+
var P = e, R = t, k = function(S) {
|
|
142
|
+
return r(P[S], R[S]);
|
|
143
|
+
};
|
|
144
|
+
return m.every(k);
|
|
145
|
+
}, me = function(e, t, n) {
|
|
146
|
+
return A(e) ? Object.keys(e).reduce(function(a, o) {
|
|
147
|
+
var p = !A(t) || !de(e[o], t[o]);
|
|
148
|
+
return n.includes(o) ? (p && console.warn("Unsupported prop change: options.".concat(o, " is not a mutable property.")), a) : p ? W(W({}, a || {}), {}, K({}, o, e[o])) : a;
|
|
149
|
+
}, null) : null;
|
|
150
|
+
}, $ = /* @__PURE__ */ l.createContext(null);
|
|
151
|
+
$.displayName = "ElementsContext";
|
|
152
|
+
var ye = function(e, t) {
|
|
153
|
+
if (!e)
|
|
154
|
+
throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t, " in an <Elements> provider."));
|
|
155
|
+
return e;
|
|
156
|
+
};
|
|
157
|
+
u.any, u.object;
|
|
158
|
+
u.func.isRequired;
|
|
159
|
+
var z = /* @__PURE__ */ l.createContext(null);
|
|
160
|
+
z.displayName = "CheckoutSdkContext";
|
|
161
|
+
var he = function(e, t) {
|
|
162
|
+
if (!e)
|
|
163
|
+
throw new Error("Could not find CheckoutProvider context; You need to wrap the part of your app that ".concat(t, " in an <CheckoutProvider> provider."));
|
|
164
|
+
return e;
|
|
165
|
+
}, ve = /* @__PURE__ */ l.createContext(null);
|
|
166
|
+
ve.displayName = "CheckoutContext";
|
|
167
|
+
u.any, u.shape({
|
|
168
|
+
fetchClientSecret: u.func.isRequired,
|
|
169
|
+
elementsOptions: u.object
|
|
170
|
+
}).isRequired;
|
|
171
|
+
var Y = function(e) {
|
|
172
|
+
var t = l.useContext(z), n = l.useContext($);
|
|
173
|
+
if (t && n)
|
|
174
|
+
throw new Error("You cannot wrap the part of your app that ".concat(e, " in both <CheckoutProvider> and <Elements> providers."));
|
|
175
|
+
return t ? he(t, e) : ye(n, e);
|
|
176
|
+
}, Ce = ["mode"], be = function(e) {
|
|
177
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
178
|
+
}, c = function(e, t) {
|
|
179
|
+
var n = "".concat(be(e), "Element"), a = function(i) {
|
|
180
|
+
var b = i.id, g = i.className, E = i.options, m = E === void 0 ? {} : E, P = i.onBlur, R = i.onFocus, k = i.onReady, B = i.onChange, S = i.onEscape, V = i.onClick, H = i.onLoadError, J = i.onLoaderStart, G = i.onNetworksChange, Q = i.onConfirm, X = i.onCancel, Z = i.onShippingAddressChange, ee = i.onShippingRateChange, x = Y("mounts <".concat(n, ">")), O = "elements" in x ? x.elements : null, C = "checkoutSdk" in x ? x.checkoutSdk : null, te = l.useState(null), I = ue(te, 2), d = I[0], re = I[1], v = l.useRef(null), N = l.useRef(null);
|
|
181
|
+
y(d, "blur", P), y(d, "focus", R), y(d, "escape", S), y(d, "click", V), y(d, "loaderror", H), y(d, "loaderstart", J), y(d, "networkschange", G), y(d, "confirm", Q), y(d, "cancel", X), y(d, "shippingaddresschange", Z), y(d, "shippingratechange", ee), y(d, "change", B);
|
|
182
|
+
var T;
|
|
183
|
+
k && (e === "expressCheckout" ? T = k : T = function() {
|
|
184
|
+
k(d);
|
|
185
|
+
}), y(d, "ready", T), l.useLayoutEffect(function() {
|
|
186
|
+
if (v.current === null && N.current !== null && (O || C)) {
|
|
187
|
+
var f = null;
|
|
188
|
+
if (C)
|
|
189
|
+
switch (e) {
|
|
190
|
+
case "payment":
|
|
191
|
+
f = C.createPaymentElement(m);
|
|
192
|
+
break;
|
|
193
|
+
case "address":
|
|
194
|
+
if ("mode" in m) {
|
|
195
|
+
var _ = m.mode, q = ie(m, Ce);
|
|
196
|
+
if (_ === "shipping")
|
|
197
|
+
f = C.createShippingAddressElement(q);
|
|
198
|
+
else if (_ === "billing")
|
|
199
|
+
f = C.createBillingAddressElement(q);
|
|
200
|
+
else
|
|
201
|
+
throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.");
|
|
202
|
+
} else
|
|
203
|
+
throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");
|
|
204
|
+
break;
|
|
205
|
+
case "expressCheckout":
|
|
206
|
+
f = C.createExpressCheckoutElement(m);
|
|
207
|
+
break;
|
|
208
|
+
case "currencySelector":
|
|
209
|
+
f = C.createCurrencySelectorElement();
|
|
210
|
+
break;
|
|
211
|
+
default:
|
|
212
|
+
throw new Error("Invalid Element type ".concat(n, ". You must use either the <PaymentElement />, <AddressElement options={{mode: 'shipping'}} />, <AddressElement options={{mode: 'billing'}} />, or <ExpressCheckoutElement />."));
|
|
213
|
+
}
|
|
214
|
+
else O && (f = O.create(e, m));
|
|
215
|
+
v.current = f, re(f), f && f.mount(N.current);
|
|
216
|
+
}
|
|
217
|
+
}, [O, C, m]);
|
|
218
|
+
var U = fe(m);
|
|
219
|
+
return l.useEffect(function() {
|
|
220
|
+
if (v.current) {
|
|
221
|
+
var f = me(m, U, ["paymentRequest"]);
|
|
222
|
+
f && "update" in v.current && v.current.update(f);
|
|
223
|
+
}
|
|
224
|
+
}, [m, U]), l.useLayoutEffect(function() {
|
|
225
|
+
return function() {
|
|
226
|
+
if (v.current && typeof v.current.destroy == "function")
|
|
227
|
+
try {
|
|
228
|
+
v.current.destroy(), v.current = null;
|
|
229
|
+
} catch {
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
}, []), /* @__PURE__ */ l.createElement("div", {
|
|
233
|
+
id: b,
|
|
234
|
+
className: g,
|
|
235
|
+
ref: N
|
|
236
|
+
});
|
|
237
|
+
}, o = function(i) {
|
|
238
|
+
Y("mounts <".concat(n, ">"));
|
|
239
|
+
var b = i.id, g = i.className;
|
|
240
|
+
return /* @__PURE__ */ l.createElement("div", {
|
|
241
|
+
id: b,
|
|
242
|
+
className: g
|
|
243
|
+
});
|
|
244
|
+
}, p = t ? o : a;
|
|
245
|
+
return p.propTypes = {
|
|
246
|
+
id: u.string,
|
|
247
|
+
className: u.string,
|
|
248
|
+
onChange: u.func,
|
|
249
|
+
onBlur: u.func,
|
|
250
|
+
onFocus: u.func,
|
|
251
|
+
onReady: u.func,
|
|
252
|
+
onEscape: u.func,
|
|
253
|
+
onClick: u.func,
|
|
254
|
+
onLoadError: u.func,
|
|
255
|
+
onLoaderStart: u.func,
|
|
256
|
+
onNetworksChange: u.func,
|
|
257
|
+
onConfirm: u.func,
|
|
258
|
+
onCancel: u.func,
|
|
259
|
+
onShippingAddressChange: u.func,
|
|
260
|
+
onShippingRateChange: u.func,
|
|
261
|
+
options: u.object
|
|
262
|
+
}, p.displayName = n, p.__elementType = e, p;
|
|
263
|
+
}, s = typeof window > "u", ge = /* @__PURE__ */ l.createContext(null);
|
|
264
|
+
ge.displayName = "EmbeddedCheckoutProviderContext";
|
|
265
|
+
c("auBankAccount", s);
|
|
266
|
+
c("card", s);
|
|
267
|
+
var Ee = c("cardNumber", s), ke = c("cardExpiry", s), Se = c("cardCvc", s);
|
|
268
|
+
c("fpxBank", s);
|
|
269
|
+
c("iban", s);
|
|
270
|
+
c("idealBank", s);
|
|
271
|
+
c("p24Bank", s);
|
|
272
|
+
c("epsBank", s);
|
|
273
|
+
c("payment", s);
|
|
274
|
+
c("expressCheckout", s);
|
|
275
|
+
c("currencySelector", s);
|
|
276
|
+
c("paymentRequestButton", s);
|
|
277
|
+
c("linkAuthentication", s);
|
|
278
|
+
c("address", s);
|
|
279
|
+
c("shippingAddress", s);
|
|
280
|
+
c("paymentMethodMessaging", s);
|
|
281
|
+
c("affirmMessage", s);
|
|
282
|
+
c("afterpayClearpayMessage", s);
|
|
283
|
+
const L = (r) => {
|
|
284
|
+
var i;
|
|
285
|
+
const { helperText: e, slotProps: t, inputProps: n, error: a, labelErrorMessage: o, stripeElement: p, ...h } = r;
|
|
286
|
+
return /* @__PURE__ */ w.jsx(
|
|
287
|
+
ne,
|
|
288
|
+
{
|
|
289
|
+
fullWidth: !0,
|
|
290
|
+
slotProps: {
|
|
291
|
+
inputLabel: {
|
|
292
|
+
...t == null ? void 0 : t.inputLabel,
|
|
293
|
+
shrink: !0
|
|
294
|
+
},
|
|
295
|
+
input: {
|
|
296
|
+
...t == null ? void 0 : t.input,
|
|
297
|
+
inputProps: {
|
|
298
|
+
...n,
|
|
299
|
+
...(i = t == null ? void 0 : t.input) == null ? void 0 : i.inputProps,
|
|
300
|
+
component: p
|
|
301
|
+
},
|
|
302
|
+
inputComponent: oe
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
error: a,
|
|
306
|
+
helperText: a ? o : e,
|
|
307
|
+
...h
|
|
308
|
+
}
|
|
309
|
+
);
|
|
310
|
+
};
|
|
311
|
+
function Pe(r) {
|
|
312
|
+
return /* @__PURE__ */ w.jsx(L, { label: "Card Number", stripeElement: Ee, ...r });
|
|
313
|
+
}
|
|
314
|
+
function Re(r) {
|
|
315
|
+
return /* @__PURE__ */ w.jsx(L, { label: "Expiration", stripeElement: ke, ...r });
|
|
316
|
+
}
|
|
317
|
+
function Ne(r) {
|
|
318
|
+
return /* @__PURE__ */ w.jsx(L, { label: "CVC", stripeElement: Se, ...r });
|
|
319
|
+
}
|
|
320
|
+
export {
|
|
321
|
+
Ne as SStripeCVC,
|
|
322
|
+
Re as SStripeExpiry,
|
|
323
|
+
Pe as SStripeNumber,
|
|
324
|
+
L as StripeTextField
|
|
325
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { j as u } from "../jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { useTheme as i } from "@mui/material";
|
|
4
|
+
import { gray as c } from "../theme/theme-primitives.js";
|
|
5
|
+
const R = o.forwardRef(function(e, r) {
|
|
6
|
+
const { component: n, options: s, ...m } = e, [t, p] = o.useState(null), a = i();
|
|
7
|
+
return o.useImperativeHandle(
|
|
8
|
+
r,
|
|
9
|
+
() => ({
|
|
10
|
+
focus: () => t.focus()
|
|
11
|
+
}),
|
|
12
|
+
[t]
|
|
13
|
+
), /* @__PURE__ */ u.jsx(
|
|
14
|
+
n,
|
|
15
|
+
{
|
|
16
|
+
onReady: p,
|
|
17
|
+
options: {
|
|
18
|
+
...s,
|
|
19
|
+
style: {
|
|
20
|
+
base: {
|
|
21
|
+
color: a.palette.mode === "dark" ? "rgb(255, 255, 255)" : c[800]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
...m
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
});
|
|
29
|
+
export {
|
|
30
|
+
R as default
|
|
31
|
+
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { ThemeOptions, ThemeProviderProps } from '@mui/material';
|
|
1
|
+
import { Theme, ThemeOptions, ThemeProviderProps } from '@mui/material';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export interface SThemeProviderProps {
|
|
3
|
+
export interface SThemeProviderProps extends Omit<ThemeProviderProps, 'defaultMode' | 'theme'> {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
/**
|
|
6
6
|
* This is for the docs site. You can ignore it or remove it.
|
|
7
7
|
*/
|
|
8
8
|
disableCustomTheme?: boolean;
|
|
9
9
|
themeComponents?: ThemeOptions['components'];
|
|
10
|
-
|
|
10
|
+
defaultMode?: 'light' | 'dark' | 'system' | undefined;
|
|
11
|
+
theme?: Theme;
|
|
11
12
|
}
|
|
12
|
-
declare const SThemeProvider: ({ children, disableCustomTheme, themeComponents,
|
|
13
|
+
declare const SThemeProvider: ({ children, disableCustomTheme, themeComponents, defaultMode, theme, ...themeProviderProps }: SThemeProviderProps) => React.JSX.Element;
|
|
13
14
|
export default SThemeProvider;
|
|
@@ -1,51 +1,56 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import * as
|
|
3
|
-
import { createTheme as
|
|
4
|
-
import { components as
|
|
5
|
-
import { dataDisplayCustomizations as
|
|
6
|
-
import { feedbackCustomizations as
|
|
7
|
-
import { inputsCustomizations as
|
|
1
|
+
import { j as e } from "../jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import * as m from "react";
|
|
3
|
+
import { createTheme as p, ThemeProvider as c } from "@mui/material";
|
|
4
|
+
import { components as f } from "../theme/components/components.js";
|
|
5
|
+
import { dataDisplayCustomizations as u } from "../theme/customizations/data-display.js";
|
|
6
|
+
import { feedbackCustomizations as d } from "../theme/customizations/feedback.js";
|
|
7
|
+
import { inputsCustomizations as h } from "../theme/customizations/inputs.js";
|
|
8
8
|
import { navigationCustomizations as l } from "../theme/customizations/navigation.js";
|
|
9
9
|
import { surfacesCustomizations as x } from "../theme/customizations/surfaces.js";
|
|
10
|
-
import { shape as z, shadows as g, typography as
|
|
11
|
-
const
|
|
12
|
-
children:
|
|
13
|
-
disableCustomTheme:
|
|
14
|
-
themeComponents:
|
|
15
|
-
|
|
10
|
+
import { shape as z, shadows as g, typography as j, colorSchemes as S } from "../theme/theme-primitives.js";
|
|
11
|
+
const w = ({
|
|
12
|
+
children: r,
|
|
13
|
+
disableCustomTheme: o,
|
|
14
|
+
themeComponents: t,
|
|
15
|
+
defaultMode: s = "dark",
|
|
16
|
+
theme: a,
|
|
17
|
+
...i
|
|
16
18
|
}) => {
|
|
17
|
-
const
|
|
19
|
+
const n = m.useMemo(() => o ? {} : p({
|
|
18
20
|
// For more details about CSS variables configuration, see https://mui.com/material-ui/customization/css-theme-variables/configuration/
|
|
19
21
|
cssVariables: {
|
|
20
22
|
colorSchemeSelector: "data-mui-color-scheme",
|
|
21
23
|
cssVarPrefix: "s"
|
|
22
24
|
},
|
|
23
|
-
|
|
25
|
+
palette: {
|
|
26
|
+
mode: "dark"
|
|
27
|
+
},
|
|
28
|
+
colorSchemes: S,
|
|
24
29
|
// Recently added in v6 for building light & dark mode app, see https://mui.com/material-ui/customization/palette/#color-schemes
|
|
25
|
-
typography:
|
|
30
|
+
typography: j,
|
|
26
31
|
shadows: g,
|
|
27
32
|
shape: z,
|
|
28
33
|
components: {
|
|
29
|
-
...
|
|
30
|
-
...f,
|
|
34
|
+
...h,
|
|
31
35
|
...u,
|
|
36
|
+
...d,
|
|
32
37
|
...l,
|
|
33
38
|
...x,
|
|
34
|
-
...
|
|
35
|
-
...
|
|
39
|
+
...f,
|
|
40
|
+
...t
|
|
36
41
|
}
|
|
37
|
-
}), [
|
|
38
|
-
return
|
|
39
|
-
|
|
42
|
+
}), [o, t]);
|
|
43
|
+
return o ? /* @__PURE__ */ e.jsx(m.Fragment, { children: r }) : /* @__PURE__ */ e.jsx(
|
|
44
|
+
c,
|
|
40
45
|
{
|
|
41
46
|
disableTransitionOnChange: !0,
|
|
42
|
-
|
|
43
|
-
...
|
|
44
|
-
|
|
45
|
-
children:
|
|
47
|
+
...i,
|
|
48
|
+
theme: { ...n, ...a },
|
|
49
|
+
defaultMode: s,
|
|
50
|
+
children: r
|
|
46
51
|
}
|
|
47
52
|
);
|
|
48
53
|
};
|
|
49
54
|
export {
|
|
50
|
-
|
|
55
|
+
w as default
|
|
51
56
|
};
|
|
@@ -18,14 +18,18 @@ const c = l(/* @__PURE__ */ a.jsx("path", {
|
|
|
18
18
|
disableRipple: !0
|
|
19
19
|
},
|
|
20
20
|
styleOverrides: {
|
|
21
|
-
root: ({ theme
|
|
21
|
+
// root: ({ theme }) => ({
|
|
22
|
+
// boxSizing: 'border-box',
|
|
23
|
+
// transition: 'all 100ms ease-in',
|
|
24
|
+
// '&:focus-visible': {
|
|
25
|
+
// outline: `3px solid ${alpha(theme.palette.primary.main, 0.5)}`,
|
|
26
|
+
// outlineOffset: '2px',
|
|
27
|
+
// },
|
|
28
|
+
// }),
|
|
29
|
+
root: {
|
|
22
30
|
boxSizing: "border-box",
|
|
23
|
-
transition: "all 100ms ease-in"
|
|
24
|
-
|
|
25
|
-
outline: `3px solid ${t(o.palette.primary.main, 0.5)}`,
|
|
26
|
-
outlineOffset: "2px"
|
|
27
|
-
}
|
|
28
|
-
})
|
|
31
|
+
transition: "all 100ms ease-in"
|
|
32
|
+
}
|
|
29
33
|
}
|
|
30
34
|
},
|
|
31
35
|
MuiButton: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as
|
|
2
|
-
const
|
|
1
|
+
import { b as s, a as r } from "../createTheme-CyFSna1a.js";
|
|
2
|
+
const a = s(), n = [...a.shadows], t = {
|
|
3
3
|
50: "hsl(210, 100%, 95%)",
|
|
4
4
|
100: "hsl(210, 100%, 92%)",
|
|
5
5
|
200: "hsl(210, 100%, 80%)",
|
|
@@ -10,18 +10,28 @@ const e = n(), p = [...e.shadows], t = {
|
|
|
10
10
|
700: "hsl(210, 100%, 35%)",
|
|
11
11
|
800: "hsl(210, 100%, 16%)",
|
|
12
12
|
900: "hsl(210, 100%, 21%)"
|
|
13
|
-
},
|
|
14
|
-
50: "
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
}, e = {
|
|
14
|
+
50: "rgb(243, 246, 250)",
|
|
15
|
+
// hsl(220, 35%, 97%)
|
|
16
|
+
100: "rgb(235, 238, 244)",
|
|
17
|
+
// hsl(220, 30%, 94%)
|
|
18
|
+
200: "rgb(218, 222, 231)",
|
|
19
|
+
// hsl(220, 20%, 88%)
|
|
20
|
+
300: "rgb(194, 201, 214)",
|
|
21
|
+
// hsl(220, 20%, 80%)
|
|
22
|
+
400: "rgb(148, 160, 184)",
|
|
23
|
+
// hsl(220, 20%, 65%)
|
|
24
|
+
500: "rgb(86, 100, 129)",
|
|
25
|
+
// hsl(220, 20%, 42%)
|
|
26
|
+
600: "rgb(71, 83, 107)",
|
|
27
|
+
// hsl(220, 20%, 35%)
|
|
28
|
+
700: "rgb(51, 60, 77)",
|
|
29
|
+
// hsl(220, 20%, 25%)
|
|
30
|
+
800: "rgb(11, 14, 20)",
|
|
31
|
+
// hsl(220, 30%, 6%)
|
|
32
|
+
900: "rgb(5, 7, 10)"
|
|
33
|
+
// hsl(220, 35%, 3%)
|
|
34
|
+
}, o = {
|
|
25
35
|
50: "hsl(120, 80%, 98%)",
|
|
26
36
|
100: "hsl(120, 75%, 94%)",
|
|
27
37
|
200: "hsl(120, 75%, 87%)",
|
|
@@ -32,7 +42,7 @@ const e = n(), p = [...e.shadows], t = {
|
|
|
32
42
|
700: "hsl(120, 75%, 16%)",
|
|
33
43
|
800: "hsl(120, 84%, 10%)",
|
|
34
44
|
900: "hsl(120, 87%, 6%)"
|
|
35
|
-
},
|
|
45
|
+
}, h = {
|
|
36
46
|
50: "hsl(45, 100%, 97%)",
|
|
37
47
|
100: "hsl(45, 92%, 90%)",
|
|
38
48
|
200: "hsl(45, 94%, 80%)",
|
|
@@ -54,15 +64,15 @@ const e = n(), p = [...e.shadows], t = {
|
|
|
54
64
|
700: "hsl(0, 94%, 18%)",
|
|
55
65
|
800: "hsl(0, 95%, 12%)",
|
|
56
66
|
900: "hsl(0, 93%, 6%)"
|
|
57
|
-
}, y = (
|
|
67
|
+
}, y = (p) => (n[1] = p === "dark" ? "hsla(220, 30%, 5%, 0.7) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.8) 0px 8px 16px -5px" : "hsla(220, 30%, 5%, 0.07) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.07) 0px 8px 16px -5px", {
|
|
58
68
|
palette: {
|
|
59
|
-
mode:
|
|
69
|
+
mode: p,
|
|
60
70
|
primary: {
|
|
61
71
|
light: t[200],
|
|
62
72
|
main: t[400],
|
|
63
73
|
dark: t[700],
|
|
64
74
|
contrastText: t[50],
|
|
65
|
-
...
|
|
75
|
+
...p === "dark" && {
|
|
66
76
|
contrastText: t[50],
|
|
67
77
|
light: t[300],
|
|
68
78
|
main: t[400],
|
|
@@ -73,8 +83,8 @@ const e = n(), p = [...e.shadows], t = {
|
|
|
73
83
|
light: t[100],
|
|
74
84
|
main: t[300],
|
|
75
85
|
dark: t[600],
|
|
76
|
-
contrastText:
|
|
77
|
-
...
|
|
86
|
+
contrastText: e[50],
|
|
87
|
+
...p === "dark" && {
|
|
78
88
|
contrastText: t[300],
|
|
79
89
|
light: t[500],
|
|
80
90
|
main: t[700],
|
|
@@ -82,112 +92,112 @@ const e = n(), p = [...e.shadows], t = {
|
|
|
82
92
|
}
|
|
83
93
|
},
|
|
84
94
|
warning: {
|
|
85
|
-
light:
|
|
86
|
-
main:
|
|
87
|
-
dark:
|
|
88
|
-
...
|
|
89
|
-
light:
|
|
90
|
-
main:
|
|
91
|
-
dark:
|
|
95
|
+
light: h[300],
|
|
96
|
+
main: h[400],
|
|
97
|
+
dark: h[800],
|
|
98
|
+
...p === "dark" && {
|
|
99
|
+
light: h[400],
|
|
100
|
+
main: h[500],
|
|
101
|
+
dark: h[700]
|
|
92
102
|
}
|
|
93
103
|
},
|
|
94
104
|
error: {
|
|
95
105
|
light: i[300],
|
|
96
106
|
main: i[400],
|
|
97
107
|
dark: i[800],
|
|
98
|
-
...
|
|
108
|
+
...p === "dark" && {
|
|
99
109
|
light: i[400],
|
|
100
110
|
main: i[500],
|
|
101
111
|
dark: i[700]
|
|
102
112
|
}
|
|
103
113
|
},
|
|
104
114
|
success: {
|
|
105
|
-
light:
|
|
106
|
-
main:
|
|
107
|
-
dark:
|
|
108
|
-
...
|
|
109
|
-
light:
|
|
110
|
-
main:
|
|
111
|
-
dark:
|
|
115
|
+
light: o[300],
|
|
116
|
+
main: o[400],
|
|
117
|
+
dark: o[800],
|
|
118
|
+
...p === "dark" && {
|
|
119
|
+
light: o[400],
|
|
120
|
+
main: o[500],
|
|
121
|
+
dark: o[700]
|
|
112
122
|
}
|
|
113
123
|
},
|
|
114
124
|
grey: {
|
|
115
|
-
...
|
|
125
|
+
...e
|
|
116
126
|
},
|
|
117
|
-
divider:
|
|
127
|
+
divider: p === "dark" ? r(e[700], 0.6) : r(e[300], 0.4),
|
|
118
128
|
background: {
|
|
119
129
|
default: "hsl(0, 0%, 99%)",
|
|
120
130
|
paper: "hsl(220, 35%, 97%)",
|
|
121
|
-
...
|
|
131
|
+
...p === "dark" && { default: e[900], paper: "hsl(220, 30%, 7%)" }
|
|
122
132
|
},
|
|
123
133
|
text: {
|
|
124
|
-
primary:
|
|
125
|
-
secondary:
|
|
126
|
-
warning:
|
|
127
|
-
...
|
|
134
|
+
primary: e[800],
|
|
135
|
+
secondary: e[600],
|
|
136
|
+
warning: h[400],
|
|
137
|
+
...p === "dark" && { primary: "rgb(255, 255, 255)", secondary: e[400] }
|
|
128
138
|
},
|
|
129
139
|
action: {
|
|
130
|
-
hover:
|
|
131
|
-
selected: `${
|
|
132
|
-
...
|
|
133
|
-
hover:
|
|
134
|
-
selected:
|
|
140
|
+
hover: r(e[200], 0.2),
|
|
141
|
+
selected: `${r(e[200], 0.3)}`,
|
|
142
|
+
...p === "dark" && {
|
|
143
|
+
hover: r(e[600], 0.2),
|
|
144
|
+
selected: r(e[600], 0.3)
|
|
135
145
|
}
|
|
136
146
|
}
|
|
137
147
|
},
|
|
138
148
|
typography: {
|
|
139
149
|
fontFamily: "Inter, sans-serif",
|
|
140
150
|
h1: {
|
|
141
|
-
fontSize:
|
|
151
|
+
fontSize: a.typography.pxToRem(48),
|
|
142
152
|
fontWeight: 600,
|
|
143
153
|
lineHeight: 1.2,
|
|
144
154
|
letterSpacing: -0.5
|
|
145
155
|
},
|
|
146
156
|
h2: {
|
|
147
|
-
fontSize:
|
|
157
|
+
fontSize: a.typography.pxToRem(36),
|
|
148
158
|
fontWeight: 600,
|
|
149
159
|
lineHeight: 1.2
|
|
150
160
|
},
|
|
151
161
|
h3: {
|
|
152
|
-
fontSize:
|
|
162
|
+
fontSize: a.typography.pxToRem(30),
|
|
153
163
|
lineHeight: 1.2
|
|
154
164
|
},
|
|
155
165
|
h4: {
|
|
156
|
-
fontSize:
|
|
166
|
+
fontSize: a.typography.pxToRem(24),
|
|
157
167
|
fontWeight: 600,
|
|
158
168
|
lineHeight: 1.5
|
|
159
169
|
},
|
|
160
170
|
h5: {
|
|
161
|
-
fontSize:
|
|
171
|
+
fontSize: a.typography.pxToRem(20),
|
|
162
172
|
fontWeight: 600
|
|
163
173
|
},
|
|
164
174
|
h6: {
|
|
165
|
-
fontSize:
|
|
175
|
+
fontSize: a.typography.pxToRem(18),
|
|
166
176
|
fontWeight: 600
|
|
167
177
|
},
|
|
168
178
|
subtitle1: {
|
|
169
|
-
fontSize:
|
|
179
|
+
fontSize: a.typography.pxToRem(18)
|
|
170
180
|
},
|
|
171
181
|
subtitle2: {
|
|
172
|
-
fontSize:
|
|
182
|
+
fontSize: a.typography.pxToRem(14),
|
|
173
183
|
fontWeight: 500
|
|
174
184
|
},
|
|
175
185
|
body1: {
|
|
176
|
-
fontSize:
|
|
186
|
+
fontSize: a.typography.pxToRem(14)
|
|
177
187
|
},
|
|
178
188
|
body2: {
|
|
179
|
-
fontSize:
|
|
189
|
+
fontSize: a.typography.pxToRem(14),
|
|
180
190
|
fontWeight: 400
|
|
181
191
|
},
|
|
182
192
|
caption: {
|
|
183
|
-
fontSize:
|
|
193
|
+
fontSize: a.typography.pxToRem(12),
|
|
184
194
|
fontWeight: 400
|
|
185
195
|
}
|
|
186
196
|
},
|
|
187
197
|
shape: {
|
|
188
198
|
borderRadius: 8
|
|
189
199
|
},
|
|
190
|
-
shadows:
|
|
200
|
+
shadows: n
|
|
191
201
|
}), x = {
|
|
192
202
|
light: {
|
|
193
203
|
palette: {
|
|
@@ -201,12 +211,12 @@ const e = n(), p = [...e.shadows], t = {
|
|
|
201
211
|
light: t[100],
|
|
202
212
|
main: t[300],
|
|
203
213
|
dark: t[600],
|
|
204
|
-
contrastText:
|
|
214
|
+
contrastText: e[50]
|
|
205
215
|
},
|
|
206
216
|
warning: {
|
|
207
|
-
light:
|
|
208
|
-
main:
|
|
209
|
-
dark:
|
|
217
|
+
light: h[300],
|
|
218
|
+
main: h[400],
|
|
219
|
+
dark: h[800]
|
|
210
220
|
},
|
|
211
221
|
error: {
|
|
212
222
|
light: i[300],
|
|
@@ -214,26 +224,26 @@ const e = n(), p = [...e.shadows], t = {
|
|
|
214
224
|
dark: i[800]
|
|
215
225
|
},
|
|
216
226
|
success: {
|
|
217
|
-
light:
|
|
218
|
-
main:
|
|
219
|
-
dark:
|
|
227
|
+
light: o[300],
|
|
228
|
+
main: o[400],
|
|
229
|
+
dark: o[800]
|
|
220
230
|
},
|
|
221
231
|
grey: {
|
|
222
|
-
...
|
|
232
|
+
...e
|
|
223
233
|
},
|
|
224
|
-
divider:
|
|
234
|
+
divider: r(e[300], 0.4),
|
|
225
235
|
background: {
|
|
226
236
|
default: "hsl(0, 0%, 99%)",
|
|
227
237
|
paper: "hsl(220, 35%, 97%)"
|
|
228
238
|
},
|
|
229
239
|
text: {
|
|
230
|
-
primary:
|
|
231
|
-
secondary:
|
|
232
|
-
warning:
|
|
240
|
+
primary: e[800],
|
|
241
|
+
secondary: e[600],
|
|
242
|
+
warning: h[400]
|
|
233
243
|
},
|
|
234
244
|
action: {
|
|
235
|
-
hover:
|
|
236
|
-
selected: `${
|
|
245
|
+
hover: r(e[200], 0.2),
|
|
246
|
+
selected: `${r(e[200], 0.3)}`
|
|
237
247
|
},
|
|
238
248
|
baseShadow: "hsla(220, 30%, 5%, 0.07) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.07) 0px 8px 16px -5px"
|
|
239
249
|
}
|
|
@@ -253,9 +263,9 @@ const e = n(), p = [...e.shadows], t = {
|
|
|
253
263
|
dark: t[900]
|
|
254
264
|
},
|
|
255
265
|
warning: {
|
|
256
|
-
light:
|
|
257
|
-
main:
|
|
258
|
-
dark:
|
|
266
|
+
light: h[400],
|
|
267
|
+
main: h[500],
|
|
268
|
+
dark: h[700]
|
|
259
269
|
},
|
|
260
270
|
error: {
|
|
261
271
|
light: i[400],
|
|
@@ -263,25 +273,25 @@ const e = n(), p = [...e.shadows], t = {
|
|
|
263
273
|
dark: i[700]
|
|
264
274
|
},
|
|
265
275
|
success: {
|
|
266
|
-
light:
|
|
267
|
-
main:
|
|
268
|
-
dark:
|
|
276
|
+
light: o[400],
|
|
277
|
+
main: o[500],
|
|
278
|
+
dark: o[700]
|
|
269
279
|
},
|
|
270
280
|
grey: {
|
|
271
|
-
...
|
|
281
|
+
...e
|
|
272
282
|
},
|
|
273
|
-
divider:
|
|
283
|
+
divider: r(e[700], 0.6),
|
|
274
284
|
background: {
|
|
275
|
-
default:
|
|
285
|
+
default: e[900],
|
|
276
286
|
paper: "hsl(220, 30%, 7%)"
|
|
277
287
|
},
|
|
278
288
|
text: {
|
|
279
|
-
primary: "
|
|
280
|
-
secondary:
|
|
289
|
+
primary: "rgb(255, 255, 255)",
|
|
290
|
+
secondary: e[400]
|
|
281
291
|
},
|
|
282
292
|
action: {
|
|
283
|
-
hover:
|
|
284
|
-
selected:
|
|
293
|
+
hover: r(e[600], 0.2),
|
|
294
|
+
selected: r(e[600], 0.3)
|
|
285
295
|
},
|
|
286
296
|
baseShadow: "hsla(220, 30%, 5%, 0.7) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.8) 0px 8px 16px -5px"
|
|
287
297
|
}
|
|
@@ -289,61 +299,61 @@ const e = n(), p = [...e.shadows], t = {
|
|
|
289
299
|
}, d = {
|
|
290
300
|
fontFamily: "Inter, sans-serif",
|
|
291
301
|
h1: {
|
|
292
|
-
fontSize:
|
|
302
|
+
fontSize: a.typography.pxToRem(48),
|
|
293
303
|
fontWeight: 600,
|
|
294
304
|
lineHeight: 1.2,
|
|
295
305
|
letterSpacing: -0.5
|
|
296
306
|
},
|
|
297
307
|
h2: {
|
|
298
|
-
fontSize:
|
|
308
|
+
fontSize: a.typography.pxToRem(36),
|
|
299
309
|
fontWeight: 600,
|
|
300
310
|
lineHeight: 1.2
|
|
301
311
|
},
|
|
302
312
|
h3: {
|
|
303
|
-
fontSize:
|
|
313
|
+
fontSize: a.typography.pxToRem(30),
|
|
304
314
|
lineHeight: 1.2
|
|
305
315
|
},
|
|
306
316
|
h4: {
|
|
307
|
-
fontSize:
|
|
317
|
+
fontSize: a.typography.pxToRem(24),
|
|
308
318
|
fontWeight: 600,
|
|
309
319
|
lineHeight: 1.5
|
|
310
320
|
},
|
|
311
321
|
h5: {
|
|
312
|
-
fontSize:
|
|
322
|
+
fontSize: a.typography.pxToRem(20),
|
|
313
323
|
fontWeight: 600
|
|
314
324
|
},
|
|
315
325
|
h6: {
|
|
316
|
-
fontSize:
|
|
326
|
+
fontSize: a.typography.pxToRem(18),
|
|
317
327
|
fontWeight: 600
|
|
318
328
|
},
|
|
319
329
|
subtitle1: {
|
|
320
|
-
fontSize:
|
|
330
|
+
fontSize: a.typography.pxToRem(18)
|
|
321
331
|
},
|
|
322
332
|
subtitle2: {
|
|
323
|
-
fontSize:
|
|
333
|
+
fontSize: a.typography.pxToRem(14),
|
|
324
334
|
fontWeight: 500
|
|
325
335
|
},
|
|
326
336
|
body1: {
|
|
327
|
-
fontSize:
|
|
337
|
+
fontSize: a.typography.pxToRem(14)
|
|
328
338
|
},
|
|
329
339
|
body2: {
|
|
330
|
-
fontSize:
|
|
340
|
+
fontSize: a.typography.pxToRem(14),
|
|
331
341
|
fontWeight: 400
|
|
332
342
|
},
|
|
333
343
|
caption: {
|
|
334
|
-
fontSize:
|
|
344
|
+
fontSize: a.typography.pxToRem(12),
|
|
335
345
|
fontWeight: 400
|
|
336
346
|
}
|
|
337
347
|
}, f = {
|
|
338
348
|
borderRadius: 8
|
|
339
|
-
}, l = ["none", "var(--s-palette-baseShadow)", ...
|
|
349
|
+
}, l = ["none", "var(--s-palette-baseShadow)", ...a.shadows.slice(2)], c = l;
|
|
340
350
|
export {
|
|
341
351
|
t as brand,
|
|
342
352
|
x as colorSchemes,
|
|
343
353
|
y as getDesignTokens,
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
354
|
+
e as gray,
|
|
355
|
+
o as green,
|
|
356
|
+
h as orange,
|
|
347
357
|
i as red,
|
|
348
358
|
c as shadows,
|
|
349
359
|
f as shape,
|
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.45",
|
|
7
7
|
"description": "advanced ui kit for solostylist",
|
|
8
8
|
"private": false,
|
|
9
9
|
"type": "module",
|
|
@@ -47,7 +47,9 @@
|
|
|
47
47
|
"react-dropzone": "^14.3.8",
|
|
48
48
|
"react-i18next": "^15.5.1",
|
|
49
49
|
"react-image-gallery": "^1.4.0",
|
|
50
|
-
"uuid": "^11.1.0"
|
|
50
|
+
"uuid": "^11.1.0",
|
|
51
|
+
"@stripe/react-stripe-js": "^3.7.0",
|
|
52
|
+
"@stripe/stripe-js": "^7.3.1"
|
|
51
53
|
},
|
|
52
54
|
"devDependencies": {
|
|
53
55
|
"@ianvs/prettier-plugin-sort-imports": "^4.4.2",
|