@shoplflow/base 0.0.4 → 0.1.0
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/emotion.d.cjs.map +1 -1
- package/dist/emotion.d.d.cts +0 -107
- package/dist/emotion.d.d.ts +0 -107
- package/dist/emotion.d.js.map +1 -1
- package/dist/index.cjs +183 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +322 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +223 -3
- package/dist/index.d.ts +223 -3
- package/dist/index.js +184 -1
- package/dist/index.js.map +1 -1
- package/package.json +28 -26
package/dist/emotion.d.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/emotion.d.ts"],"sourcesContent":["import '@emotion/react';\nimport React from 'react';\
|
|
1
|
+
{"version":3,"sources":["../src/emotion.d.ts"],"sourcesContent":["import '@emotion/react';\nimport type React from 'react';\ndeclare module '*.svg' {\n export const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;\n}\n"],"mappings":";;;AAAA,mBAAO;","names":[]}
|
package/dist/emotion.d.d.cts
CHANGED
|
@@ -1,111 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import * as _emotion_utils from '@emotion/utils';
|
|
3
|
-
|
|
4
|
-
declare const hadaTheme: {
|
|
5
|
-
borderRadius: {
|
|
6
|
-
borderRadius04: string;
|
|
7
|
-
borderRadius02: string;
|
|
8
|
-
borderRadius06: string;
|
|
9
|
-
borderRadius08: string;
|
|
10
|
-
borderRadius12: string;
|
|
11
|
-
borderRadius16: string;
|
|
12
|
-
};
|
|
13
|
-
fontWeights: {
|
|
14
|
-
regular: string;
|
|
15
|
-
medium: string;
|
|
16
|
-
bold: string;
|
|
17
|
-
};
|
|
18
|
-
colors: {
|
|
19
|
-
coolgray300: string;
|
|
20
|
-
coolgray200: string;
|
|
21
|
-
coolgray100: string;
|
|
22
|
-
coolgray50: string;
|
|
23
|
-
navy400: string;
|
|
24
|
-
navy300: string;
|
|
25
|
-
neutral0: string;
|
|
26
|
-
neutral100: string;
|
|
27
|
-
neutral150: string;
|
|
28
|
-
neutral200: string;
|
|
29
|
-
neutral300: string;
|
|
30
|
-
neutral350: string;
|
|
31
|
-
neutral400: string;
|
|
32
|
-
neutral500: string;
|
|
33
|
-
neutral600: string;
|
|
34
|
-
neutral700: string;
|
|
35
|
-
neutral400_5: string;
|
|
36
|
-
red300: string;
|
|
37
|
-
red200: string;
|
|
38
|
-
red100: string;
|
|
39
|
-
ocean300: string;
|
|
40
|
-
ocean200: string;
|
|
41
|
-
ocean100: string;
|
|
42
|
-
purple400: string;
|
|
43
|
-
purple300: string;
|
|
44
|
-
purple100: string;
|
|
45
|
-
yellow300: string;
|
|
46
|
-
yellow200: string;
|
|
47
|
-
yellow100: string;
|
|
48
|
-
green300: string;
|
|
49
|
-
green200: string;
|
|
50
|
-
green100: string;
|
|
51
|
-
shopl400: string;
|
|
52
|
-
shopl300: string;
|
|
53
|
-
shopl200: string;
|
|
54
|
-
shopl150: string;
|
|
55
|
-
shopl100: string;
|
|
56
|
-
hada400: string;
|
|
57
|
-
hada300: string;
|
|
58
|
-
hada200: string;
|
|
59
|
-
hada150: string;
|
|
60
|
-
hada100: string;
|
|
61
|
-
background: string;
|
|
62
|
-
primary100: string;
|
|
63
|
-
primary150: string;
|
|
64
|
-
primary200: string;
|
|
65
|
-
primary300: string;
|
|
66
|
-
primary400: string;
|
|
67
|
-
};
|
|
68
|
-
typographies: {
|
|
69
|
-
heading1_700: _emotion_utils.SerializedStyles;
|
|
70
|
-
heading1_400: _emotion_utils.SerializedStyles;
|
|
71
|
-
heading2_700: _emotion_utils.SerializedStyles;
|
|
72
|
-
heading2_400: _emotion_utils.SerializedStyles;
|
|
73
|
-
heading3_700: _emotion_utils.SerializedStyles;
|
|
74
|
-
heading3_400: _emotion_utils.SerializedStyles;
|
|
75
|
-
title1_700: _emotion_utils.SerializedStyles;
|
|
76
|
-
title1_400: _emotion_utils.SerializedStyles;
|
|
77
|
-
title2_700: _emotion_utils.SerializedStyles;
|
|
78
|
-
title2_500: _emotion_utils.SerializedStyles;
|
|
79
|
-
title2_400: _emotion_utils.SerializedStyles;
|
|
80
|
-
body1_700: _emotion_utils.SerializedStyles;
|
|
81
|
-
body1_500: _emotion_utils.SerializedStyles;
|
|
82
|
-
body1_400: _emotion_utils.SerializedStyles;
|
|
83
|
-
body2_700: _emotion_utils.SerializedStyles;
|
|
84
|
-
body2_500: _emotion_utils.SerializedStyles;
|
|
85
|
-
body2_400: _emotion_utils.SerializedStyles;
|
|
86
|
-
body3_400: _emotion_utils.SerializedStyles;
|
|
87
|
-
body3_500: _emotion_utils.SerializedStyles;
|
|
88
|
-
caption_400: _emotion_utils.SerializedStyles;
|
|
89
|
-
};
|
|
90
|
-
spacings: {
|
|
91
|
-
spacing04: string;
|
|
92
|
-
spacing06: string;
|
|
93
|
-
spacing08: string;
|
|
94
|
-
spacing12: string;
|
|
95
|
-
spacing16: string;
|
|
96
|
-
spacing20: string;
|
|
97
|
-
spacing24: string;
|
|
98
|
-
spacing30: string;
|
|
99
|
-
spacing32: string;
|
|
100
|
-
spacing40: string;
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
type ShoplflowTheme = typeof hadaTheme;
|
|
105
|
-
|
|
106
|
-
declare module '@emotion/react' {
|
|
107
|
-
export interface Theme extends ShoplflowTheme {}
|
|
108
|
-
}
|
|
109
2
|
|
|
110
3
|
declare module '*.svg' {
|
|
111
4
|
export const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
package/dist/emotion.d.d.ts
CHANGED
|
@@ -1,111 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import * as _emotion_utils from '@emotion/utils';
|
|
3
|
-
|
|
4
|
-
declare const hadaTheme: {
|
|
5
|
-
borderRadius: {
|
|
6
|
-
borderRadius04: string;
|
|
7
|
-
borderRadius02: string;
|
|
8
|
-
borderRadius06: string;
|
|
9
|
-
borderRadius08: string;
|
|
10
|
-
borderRadius12: string;
|
|
11
|
-
borderRadius16: string;
|
|
12
|
-
};
|
|
13
|
-
fontWeights: {
|
|
14
|
-
regular: string;
|
|
15
|
-
medium: string;
|
|
16
|
-
bold: string;
|
|
17
|
-
};
|
|
18
|
-
colors: {
|
|
19
|
-
coolgray300: string;
|
|
20
|
-
coolgray200: string;
|
|
21
|
-
coolgray100: string;
|
|
22
|
-
coolgray50: string;
|
|
23
|
-
navy400: string;
|
|
24
|
-
navy300: string;
|
|
25
|
-
neutral0: string;
|
|
26
|
-
neutral100: string;
|
|
27
|
-
neutral150: string;
|
|
28
|
-
neutral200: string;
|
|
29
|
-
neutral300: string;
|
|
30
|
-
neutral350: string;
|
|
31
|
-
neutral400: string;
|
|
32
|
-
neutral500: string;
|
|
33
|
-
neutral600: string;
|
|
34
|
-
neutral700: string;
|
|
35
|
-
neutral400_5: string;
|
|
36
|
-
red300: string;
|
|
37
|
-
red200: string;
|
|
38
|
-
red100: string;
|
|
39
|
-
ocean300: string;
|
|
40
|
-
ocean200: string;
|
|
41
|
-
ocean100: string;
|
|
42
|
-
purple400: string;
|
|
43
|
-
purple300: string;
|
|
44
|
-
purple100: string;
|
|
45
|
-
yellow300: string;
|
|
46
|
-
yellow200: string;
|
|
47
|
-
yellow100: string;
|
|
48
|
-
green300: string;
|
|
49
|
-
green200: string;
|
|
50
|
-
green100: string;
|
|
51
|
-
shopl400: string;
|
|
52
|
-
shopl300: string;
|
|
53
|
-
shopl200: string;
|
|
54
|
-
shopl150: string;
|
|
55
|
-
shopl100: string;
|
|
56
|
-
hada400: string;
|
|
57
|
-
hada300: string;
|
|
58
|
-
hada200: string;
|
|
59
|
-
hada150: string;
|
|
60
|
-
hada100: string;
|
|
61
|
-
background: string;
|
|
62
|
-
primary100: string;
|
|
63
|
-
primary150: string;
|
|
64
|
-
primary200: string;
|
|
65
|
-
primary300: string;
|
|
66
|
-
primary400: string;
|
|
67
|
-
};
|
|
68
|
-
typographies: {
|
|
69
|
-
heading1_700: _emotion_utils.SerializedStyles;
|
|
70
|
-
heading1_400: _emotion_utils.SerializedStyles;
|
|
71
|
-
heading2_700: _emotion_utils.SerializedStyles;
|
|
72
|
-
heading2_400: _emotion_utils.SerializedStyles;
|
|
73
|
-
heading3_700: _emotion_utils.SerializedStyles;
|
|
74
|
-
heading3_400: _emotion_utils.SerializedStyles;
|
|
75
|
-
title1_700: _emotion_utils.SerializedStyles;
|
|
76
|
-
title1_400: _emotion_utils.SerializedStyles;
|
|
77
|
-
title2_700: _emotion_utils.SerializedStyles;
|
|
78
|
-
title2_500: _emotion_utils.SerializedStyles;
|
|
79
|
-
title2_400: _emotion_utils.SerializedStyles;
|
|
80
|
-
body1_700: _emotion_utils.SerializedStyles;
|
|
81
|
-
body1_500: _emotion_utils.SerializedStyles;
|
|
82
|
-
body1_400: _emotion_utils.SerializedStyles;
|
|
83
|
-
body2_700: _emotion_utils.SerializedStyles;
|
|
84
|
-
body2_500: _emotion_utils.SerializedStyles;
|
|
85
|
-
body2_400: _emotion_utils.SerializedStyles;
|
|
86
|
-
body3_400: _emotion_utils.SerializedStyles;
|
|
87
|
-
body3_500: _emotion_utils.SerializedStyles;
|
|
88
|
-
caption_400: _emotion_utils.SerializedStyles;
|
|
89
|
-
};
|
|
90
|
-
spacings: {
|
|
91
|
-
spacing04: string;
|
|
92
|
-
spacing06: string;
|
|
93
|
-
spacing08: string;
|
|
94
|
-
spacing12: string;
|
|
95
|
-
spacing16: string;
|
|
96
|
-
spacing20: string;
|
|
97
|
-
spacing24: string;
|
|
98
|
-
spacing30: string;
|
|
99
|
-
spacing32: string;
|
|
100
|
-
spacing40: string;
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
type ShoplflowTheme = typeof hadaTheme;
|
|
105
|
-
|
|
106
|
-
declare module '@emotion/react' {
|
|
107
|
-
export interface Theme extends ShoplflowTheme {}
|
|
108
|
-
}
|
|
109
2
|
|
|
110
3
|
declare module '*.svg' {
|
|
111
4
|
export const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
package/dist/emotion.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/emotion.d.ts"],"sourcesContent":["import '@emotion/react';\nimport React from 'react';\
|
|
1
|
+
{"version":3,"sources":["../src/emotion.d.ts"],"sourcesContent":["import '@emotion/react';\nimport type React from 'react';\ndeclare module '*.svg' {\n export const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;\n}\n"],"mappings":";AAAA,OAAO;","names":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -17,10 +17,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// src/index.
|
|
20
|
+
// src/index.ts
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
|
-
Button: () => Button_default
|
|
23
|
+
Button: () => Button_default,
|
|
24
|
+
ShoplflowProvider: () => ShoplflowProvider_default,
|
|
25
|
+
tokens: () => tokens_exports,
|
|
26
|
+
useDomain: () => useDomain
|
|
24
27
|
});
|
|
25
28
|
module.exports = __toCommonJS(src_exports);
|
|
26
29
|
|
|
@@ -30,8 +33,185 @@ var Button = () => {
|
|
|
30
33
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "Button" });
|
|
31
34
|
};
|
|
32
35
|
var Button_default = Button;
|
|
36
|
+
|
|
37
|
+
// src/hooks/useDomain.ts
|
|
38
|
+
var import_react = require("react");
|
|
39
|
+
function useDomain({ domain = "SHOPL" }) {
|
|
40
|
+
const [domainType, setDomainType] = (0, import_react.useState)(void 0);
|
|
41
|
+
(0, import_react.useEffect)(() => {
|
|
42
|
+
if (domain) {
|
|
43
|
+
setDomainType(domain);
|
|
44
|
+
}
|
|
45
|
+
}, [domain]);
|
|
46
|
+
(0, import_react.useEffect)(() => {
|
|
47
|
+
if (typeof window !== "undefined") {
|
|
48
|
+
}
|
|
49
|
+
}, []);
|
|
50
|
+
(0, import_react.useEffect)(() => {
|
|
51
|
+
if (!domainType) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
document.documentElement.dataset.shoplflow = domainType;
|
|
55
|
+
if (domainType === "SHOPL") {
|
|
56
|
+
document.documentElement.dataset.shoplflow = "shopl";
|
|
57
|
+
} else {
|
|
58
|
+
document.documentElement.dataset.shoplflow = "hada";
|
|
59
|
+
}
|
|
60
|
+
}, [domainType]);
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// src/providers/ShoplflowProvider.tsx
|
|
65
|
+
var import_jsx_runtime2 = require("@emotion/react/jsx-runtime");
|
|
66
|
+
var ShoplflowProvider = ({ children, domain = "HADA" }) => {
|
|
67
|
+
useDomain({
|
|
68
|
+
domain
|
|
69
|
+
});
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children });
|
|
71
|
+
};
|
|
72
|
+
var ShoplflowProvider_default = ShoplflowProvider;
|
|
73
|
+
|
|
74
|
+
// src/styles/tokens.ts
|
|
75
|
+
var tokens_exports = {};
|
|
76
|
+
__export(tokens_exports, {
|
|
77
|
+
background: () => background,
|
|
78
|
+
borderRadius04: () => borderRadius04,
|
|
79
|
+
borderRadius06: () => borderRadius06,
|
|
80
|
+
borderRadius08: () => borderRadius08,
|
|
81
|
+
borderRadius12: () => borderRadius12,
|
|
82
|
+
borderRadius16: () => borderRadius16,
|
|
83
|
+
coolgray100: () => coolgray100,
|
|
84
|
+
coolgray200: () => coolgray200,
|
|
85
|
+
coolgray300: () => coolgray300,
|
|
86
|
+
coolgray50: () => coolgray50,
|
|
87
|
+
fontWeightBold: () => fontWeightBold,
|
|
88
|
+
fontWeightMedium: () => fontWeightMedium,
|
|
89
|
+
fontWeightRegular: () => fontWeightRegular,
|
|
90
|
+
green100: () => green100,
|
|
91
|
+
green200: () => green200,
|
|
92
|
+
green300: () => green300,
|
|
93
|
+
hada100: () => hada100,
|
|
94
|
+
hada150: () => hada150,
|
|
95
|
+
hada200: () => hada200,
|
|
96
|
+
hada300: () => hada300,
|
|
97
|
+
hada400: () => hada400,
|
|
98
|
+
navy300: () => navy300,
|
|
99
|
+
navy400: () => navy400,
|
|
100
|
+
neutral0: () => neutral0,
|
|
101
|
+
neutral100: () => neutral100,
|
|
102
|
+
neutral150: () => neutral150,
|
|
103
|
+
neutral200: () => neutral200,
|
|
104
|
+
neutral300: () => neutral300,
|
|
105
|
+
neutral350: () => neutral350,
|
|
106
|
+
neutral400: () => neutral400,
|
|
107
|
+
neutral400_5: () => neutral400_5,
|
|
108
|
+
neutral500: () => neutral500,
|
|
109
|
+
neutral600: () => neutral600,
|
|
110
|
+
neutral700: () => neutral700,
|
|
111
|
+
ocean100: () => ocean100,
|
|
112
|
+
ocean200: () => ocean200,
|
|
113
|
+
ocean300: () => ocean300,
|
|
114
|
+
primary100: () => primary100,
|
|
115
|
+
primary150: () => primary150,
|
|
116
|
+
primary200: () => primary200,
|
|
117
|
+
primary300: () => primary300,
|
|
118
|
+
primary400: () => primary400,
|
|
119
|
+
purple100: () => purple100,
|
|
120
|
+
purple300: () => purple300,
|
|
121
|
+
purple400: () => purple400,
|
|
122
|
+
red100: () => red100,
|
|
123
|
+
red200: () => red200,
|
|
124
|
+
red300: () => red300,
|
|
125
|
+
shopl100: () => shopl100,
|
|
126
|
+
shopl150: () => shopl150,
|
|
127
|
+
shopl200: () => shopl200,
|
|
128
|
+
shopl300: () => shopl300,
|
|
129
|
+
shopl400: () => shopl400,
|
|
130
|
+
spacing04: () => spacing04,
|
|
131
|
+
spacing06: () => spacing06,
|
|
132
|
+
spacing08: () => spacing08,
|
|
133
|
+
spacing12: () => spacing12,
|
|
134
|
+
spacing16: () => spacing16,
|
|
135
|
+
spacing20: () => spacing20,
|
|
136
|
+
spacing24: () => spacing24,
|
|
137
|
+
spacing30: () => spacing30,
|
|
138
|
+
spacing32: () => spacing32,
|
|
139
|
+
spacing40: () => spacing40,
|
|
140
|
+
yellow100: () => yellow100,
|
|
141
|
+
yellow200: () => yellow200,
|
|
142
|
+
yellow300: () => yellow300
|
|
143
|
+
});
|
|
144
|
+
var fontWeightRegular = "var(--font-weight-regular)";
|
|
145
|
+
var fontWeightMedium = "var(--font-weight-medium)";
|
|
146
|
+
var fontWeightBold = "var(--font-weight-bold)";
|
|
147
|
+
var borderRadius04 = "var(--border-radius04)";
|
|
148
|
+
var borderRadius06 = "var(--border-radius06)";
|
|
149
|
+
var borderRadius08 = "var(--border-radius08)";
|
|
150
|
+
var borderRadius12 = "var(--border-radius12)";
|
|
151
|
+
var borderRadius16 = "var(--border-radius16)";
|
|
152
|
+
var coolgray300 = "var(--coolgray300)";
|
|
153
|
+
var coolgray200 = "var(--coolgray200)";
|
|
154
|
+
var coolgray100 = "var(--coolgray100)";
|
|
155
|
+
var coolgray50 = "var(--coolgray50)";
|
|
156
|
+
var navy400 = "var(--navy400)";
|
|
157
|
+
var navy300 = "var(--navy300)";
|
|
158
|
+
var neutral0 = "var(--neutral0)";
|
|
159
|
+
var neutral100 = "var(--neutral100)";
|
|
160
|
+
var neutral150 = "var(--neutral150)";
|
|
161
|
+
var neutral200 = "var(--neutral200)";
|
|
162
|
+
var neutral300 = "var(--neutral300)";
|
|
163
|
+
var neutral350 = "var(--neutral350)";
|
|
164
|
+
var neutral400 = "var(--neutral400)";
|
|
165
|
+
var neutral500 = "var(--neutral500)";
|
|
166
|
+
var neutral600 = "var(--neutral600)";
|
|
167
|
+
var neutral700 = "var(--neutral700)";
|
|
168
|
+
var neutral400_5 = "var(--neutral400_5)";
|
|
169
|
+
var red300 = "var(--red300)";
|
|
170
|
+
var red200 = "var(--red200)";
|
|
171
|
+
var red100 = "var(--red100)";
|
|
172
|
+
var ocean300 = "var(--ocean300)";
|
|
173
|
+
var ocean200 = "var(--ocean200)";
|
|
174
|
+
var ocean100 = "var(--ocean100)";
|
|
175
|
+
var purple400 = "var(--purple400)";
|
|
176
|
+
var purple300 = "var(--purple300)";
|
|
177
|
+
var purple100 = "var(--purple100)";
|
|
178
|
+
var yellow300 = "var(--yellow300)";
|
|
179
|
+
var yellow200 = "var(--yellow200)";
|
|
180
|
+
var yellow100 = "var(--yellow100)";
|
|
181
|
+
var green300 = "var(--green300)";
|
|
182
|
+
var green200 = "var(--green200)";
|
|
183
|
+
var green100 = "var(--green100)";
|
|
184
|
+
var shopl400 = "var(--shopl400)";
|
|
185
|
+
var shopl300 = "var(--shopl300)";
|
|
186
|
+
var shopl200 = "var(--shopl200)";
|
|
187
|
+
var shopl150 = "var(--shopl150)";
|
|
188
|
+
var shopl100 = "var(--shopl100)";
|
|
189
|
+
var hada400 = "var(--hada400)";
|
|
190
|
+
var hada300 = "var(--hada300)";
|
|
191
|
+
var hada200 = "var(--hada200)";
|
|
192
|
+
var hada150 = "var(--hada150)";
|
|
193
|
+
var hada100 = "var(--hada100)";
|
|
194
|
+
var background = "var(--background)";
|
|
195
|
+
var primary100 = "var(--primary100)";
|
|
196
|
+
var primary150 = "var(--primary150)";
|
|
197
|
+
var primary200 = "var(--primary200)";
|
|
198
|
+
var primary300 = "var(--primary300)";
|
|
199
|
+
var primary400 = "var(--primary400)";
|
|
200
|
+
var spacing04 = "var(--spacing04)";
|
|
201
|
+
var spacing06 = "var(--spacing06)";
|
|
202
|
+
var spacing08 = "var(--spacing08)";
|
|
203
|
+
var spacing12 = "var(--spacing12)";
|
|
204
|
+
var spacing16 = "var(--spacing16)";
|
|
205
|
+
var spacing20 = "var(--spacing20)";
|
|
206
|
+
var spacing24 = "var(--spacing24)";
|
|
207
|
+
var spacing30 = "var(--spacing30)";
|
|
208
|
+
var spacing32 = "var(--spacing32)";
|
|
209
|
+
var spacing40 = "var(--spacing40)";
|
|
33
210
|
// Annotate the CommonJS export names for ESM import in node:
|
|
34
211
|
0 && (module.exports = {
|
|
35
|
-
Button
|
|
212
|
+
Button,
|
|
213
|
+
ShoplflowProvider,
|
|
214
|
+
tokens,
|
|
215
|
+
useDomain
|
|
36
216
|
});
|
|
37
217
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/components/Button.tsx","../src/hooks/useDomain.ts","../src/providers/ShoplflowProvider.tsx","../src/styles/tokens.ts"],"sourcesContent":["export { default as Button } from './components/Button';\nexport * from './providers';\nexport * from './hooks';\nexport * from './styles';\n","const Button = () => {\n return <div>Button</div>;\n};\n\nexport default Button;\n","import { useEffect, useState } from 'react';\nimport type { DomainType } from '../types/Domain';\n\ntype UseDarkModeProps = {\n domain?: DomainType;\n};\n\nexport function useDomain({ domain = 'SHOPL' }: UseDarkModeProps) {\n const [domainType, setDomainType] = useState<DomainType | undefined>(undefined);\n\n useEffect(() => {\n if (domain) {\n setDomainType(domain);\n }\n }, [domain]);\n useEffect(() => {\n if (typeof window !== 'undefined') {\n // const domain = localStorage.getItem('domain');\n // setDomainType(domain ? (domain as DomainType) : 'SHOPL');\n }\n }, []);\n\n useEffect(() => {\n if (!domainType) {\n return;\n }\n document.documentElement.dataset.shoplflow = domainType;\n if (domainType === 'SHOPL') {\n document.documentElement.dataset.shoplflow = 'shopl';\n // localStorage.setItem('domain', domainType);\n } else {\n document.documentElement.dataset.shoplflow = 'hada';\n // localStorage.setItem('domain', domainType);\n }\n }, [domainType]);\n return null;\n}\n","import React from 'react';\n\nimport { useDomain } from '../hooks/useDomain';\nimport type { DomainType } from '../types/Domain';\n\nexport interface ShoplflowProviderProps {\n domain?: DomainType;\n children: React.ReactNode;\n}\n\nconst ShoplflowProvider = ({ children, domain = 'HADA' }: ShoplflowProviderProps) => {\n useDomain({\n domain,\n });\n return <>{children}</>;\n};\n\nexport default ShoplflowProvider;\n","/* Generate by scripts/generate-tokens.js */\n/* eslint-disable */\nexport const fontWeightRegular = 'var(--font-weight-regular)';\nexport const fontWeightMedium = 'var(--font-weight-medium)';\nexport const fontWeightBold = 'var(--font-weight-bold)';\nexport const borderRadius04 = 'var(--border-radius04)';\nexport const borderRadius06 = 'var(--border-radius06)';\nexport const borderRadius08 = 'var(--border-radius08)';\nexport const borderRadius12 = 'var(--border-radius12)';\nexport const borderRadius16 = 'var(--border-radius16)';\nexport const coolgray300 = 'var(--coolgray300)';\nexport const coolgray200 = 'var(--coolgray200)';\nexport const coolgray100 = 'var(--coolgray100)';\nexport const coolgray50 = 'var(--coolgray50)';\nexport const navy400 = 'var(--navy400)';\nexport const navy300 = 'var(--navy300)';\nexport const neutral0 = 'var(--neutral0)';\nexport const neutral100 = 'var(--neutral100)';\nexport const neutral150 = 'var(--neutral150)';\nexport const neutral200 = 'var(--neutral200)';\nexport const neutral300 = 'var(--neutral300)';\nexport const neutral350 = 'var(--neutral350)';\nexport const neutral400 = 'var(--neutral400)';\nexport const neutral500 = 'var(--neutral500)';\nexport const neutral600 = 'var(--neutral600)';\nexport const neutral700 = 'var(--neutral700)';\nexport const neutral400_5 = 'var(--neutral400_5)';\nexport const red300 = 'var(--red300)';\nexport const red200 = 'var(--red200)';\nexport const red100 = 'var(--red100)';\nexport const ocean300 = 'var(--ocean300)';\nexport const ocean200 = 'var(--ocean200)';\nexport const ocean100 = 'var(--ocean100)';\nexport const purple400 = 'var(--purple400)';\nexport const purple300 = 'var(--purple300)';\nexport const purple100 = 'var(--purple100)';\nexport const yellow300 = 'var(--yellow300)';\nexport const yellow200 = 'var(--yellow200)';\nexport const yellow100 = 'var(--yellow100)';\nexport const green300 = 'var(--green300)';\nexport const green200 = 'var(--green200)';\nexport const green100 = 'var(--green100)';\nexport const shopl400 = 'var(--shopl400)';\nexport const shopl300 = 'var(--shopl300)';\nexport const shopl200 = 'var(--shopl200)';\nexport const shopl150 = 'var(--shopl150)';\nexport const shopl100 = 'var(--shopl100)';\nexport const hada400 = 'var(--hada400)';\nexport const hada300 = 'var(--hada300)';\nexport const hada200 = 'var(--hada200)';\nexport const hada150 = 'var(--hada150)';\nexport const hada100 = 'var(--hada100)';\nexport const background = 'var(--background)';\nexport const primary100 = 'var(--primary100)';\nexport const primary150 = 'var(--primary150)';\nexport const primary200 = 'var(--primary200)';\nexport const primary300 = 'var(--primary300)';\nexport const primary400 = 'var(--primary400)';\nexport const spacing04 = 'var(--spacing04)';\nexport const spacing06 = 'var(--spacing06)';\nexport const spacing08 = 'var(--spacing08)';\nexport const spacing12 = 'var(--spacing12)';\nexport const spacing16 = 'var(--spacing16)';\nexport const spacing20 = 'var(--spacing20)';\nexport const spacing24 = 'var(--spacing24)';\nexport const spacing30 = 'var(--spacing30)';\nexport const spacing32 = 'var(--spacing32)';\nexport const spacing40 = 'var(--spacing40)';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCS;AADT,IAAM,SAAS,MAAM;AACnB,SAAO,4CAAC,SAAI,oBAAM;AACpB;AAEA,IAAO,iBAAQ;;;ACJf,mBAAoC;AAO7B,SAAS,UAAU,EAAE,SAAS,QAAQ,GAAqB;AAChE,QAAM,CAAC,YAAY,aAAa,QAAI,uBAAiC,MAAS;AAE9E,8BAAU,MAAM;AACd,QAAI,QAAQ;AACV,oBAAc,MAAM;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AACX,8BAAU,MAAM;AACd,QAAI,OAAO,WAAW,aAAa;AAAA,IAGnC;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,8BAAU,MAAM;AACd,QAAI,CAAC,YAAY;AACf;AAAA,IACF;AACA,aAAS,gBAAgB,QAAQ,YAAY;AAC7C,QAAI,eAAe,SAAS;AAC1B,eAAS,gBAAgB,QAAQ,YAAY;AAAA,IAE/C,OAAO;AACL,eAAS,gBAAgB,QAAQ,YAAY;AAAA,IAE/C;AAAA,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