@mrcaktuz/sds-tokens 0.1.0 → 0.2.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/_tokens.scss +27 -0
- package/dist/index.cjs +426 -418
- package/dist/index.d.cts +681 -665
- package/dist/index.d.ts +681 -665
- package/dist/index.js +405 -373
- package/dist/tokens.css +10 -0
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,442 +1,450 @@
|
|
|
1
|
-
"
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/index.ts
|
|
21
|
-
var index_exports = {};
|
|
22
|
-
__export(index_exports, {
|
|
23
|
-
backgroundTheme: () => backgroundTheme,
|
|
24
|
-
borderTheme: () => borderTheme,
|
|
25
|
-
borderWidths: () => borderWidths,
|
|
26
|
-
breakpoints: () => breakpoints,
|
|
27
|
-
buttonTokens: () => buttonTokens,
|
|
28
|
-
colors: () => colors,
|
|
29
|
-
contentTheme: () => contentTheme,
|
|
30
|
-
cssPrefix: () => cssPrefix,
|
|
31
|
-
defaultButtonColor: () => defaultButtonColor,
|
|
32
|
-
defaultButtonVariant: () => defaultButtonVariant,
|
|
33
|
-
fontFamilies: () => fontFamilies,
|
|
34
|
-
fontSizes: () => fontSizes,
|
|
35
|
-
fontWeights: () => fontWeights,
|
|
36
|
-
getButtonColors: () => getButtonColors,
|
|
37
|
-
getButtonDisabledColors: () => getButtonDisabledColors,
|
|
38
|
-
radius: () => radius,
|
|
39
|
-
spacers: () => spacers,
|
|
40
|
-
themeModes: () => themeModes,
|
|
41
|
-
transitions: () => transitions
|
|
42
|
-
});
|
|
43
|
-
module.exports = __toCommonJS(index_exports);
|
|
44
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
45
2
|
// src/colors.ts
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
3
|
+
const colors = {
|
|
4
|
+
gray: {
|
|
5
|
+
white: "#ffffff",
|
|
6
|
+
lightest: "#f5f4f4",
|
|
7
|
+
lighter: "#e3e3e3",
|
|
8
|
+
light: "#cacaca",
|
|
9
|
+
default: "#9a9a9a",
|
|
10
|
+
dark: "#696969",
|
|
11
|
+
darker: "#202020",
|
|
12
|
+
darkest: "#141414"
|
|
13
|
+
},
|
|
14
|
+
brand: {
|
|
15
|
+
lightest: "#e4f0ff",
|
|
16
|
+
lighter: "#99c5ff",
|
|
17
|
+
light: "#004baf",
|
|
18
|
+
default: "#003781",
|
|
19
|
+
dark: "#00316f",
|
|
20
|
+
darker: "#002a5c",
|
|
21
|
+
darkest: "#001633"
|
|
22
|
+
},
|
|
23
|
+
success: {
|
|
24
|
+
lightest: "#ebfaf1",
|
|
25
|
+
lighter: "#b2ddc8",
|
|
26
|
+
light: "#4eb184",
|
|
27
|
+
default: "#3a8362",
|
|
28
|
+
dark: "#327155",
|
|
29
|
+
darker: "#295b44",
|
|
30
|
+
darkest: "#1c3b2e"
|
|
31
|
+
},
|
|
32
|
+
warning: {
|
|
33
|
+
lightest: "#fff2e8",
|
|
34
|
+
lighter: "#fdd2a0",
|
|
35
|
+
light: "#fdb35e",
|
|
36
|
+
default: "#ff832b",
|
|
37
|
+
dark: "#bd5b00",
|
|
38
|
+
darker: "#7a3e03",
|
|
39
|
+
darkest: "#361b00"
|
|
40
|
+
},
|
|
41
|
+
danger: {
|
|
42
|
+
lightest: "#fff1f1",
|
|
43
|
+
lighter: "#f09e9e",
|
|
44
|
+
light: "#e35656",
|
|
45
|
+
default: "#d32222",
|
|
46
|
+
dark: "#a10505",
|
|
47
|
+
darker: "#730202",
|
|
48
|
+
darkest: "#440101"
|
|
49
|
+
},
|
|
50
|
+
visited: {
|
|
51
|
+
lightest: "#f8e9fc",
|
|
52
|
+
lighter: "#ecc2f7",
|
|
53
|
+
light: "#d575eb",
|
|
54
|
+
default: "#c029df",
|
|
55
|
+
dark: "#8a17a1",
|
|
56
|
+
darker: "#6d127e",
|
|
57
|
+
darkest: "#310839"
|
|
58
|
+
}
|
|
102
59
|
};
|
|
103
|
-
|
|
104
60
|
// src/theme/background.ts
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
61
|
+
const backgroundTheme = {
|
|
62
|
+
content: {
|
|
63
|
+
light: colors.gray.white,
|
|
64
|
+
dark: colors.gray.darkest
|
|
65
|
+
},
|
|
66
|
+
graySoft: {
|
|
67
|
+
light: colors.gray.lightest,
|
|
68
|
+
dark: colors.gray.darker
|
|
69
|
+
},
|
|
70
|
+
gray: {
|
|
71
|
+
light: colors.gray.light,
|
|
72
|
+
dark: colors.gray.darker
|
|
73
|
+
},
|
|
74
|
+
grayHover: {
|
|
75
|
+
light: colors.gray.light,
|
|
76
|
+
dark: colors.gray.darkest
|
|
77
|
+
},
|
|
78
|
+
grayStrong: {
|
|
79
|
+
light: colors.gray.darker,
|
|
80
|
+
dark: colors.gray.default
|
|
81
|
+
},
|
|
82
|
+
overlay: {
|
|
83
|
+
light: "rgba(20, 20, 20, 0.2)",
|
|
84
|
+
dark: "rgba(20, 20, 20, 0.2)"
|
|
85
|
+
},
|
|
86
|
+
brand: {
|
|
87
|
+
light: colors.brand.default,
|
|
88
|
+
dark: colors.brand.light
|
|
89
|
+
},
|
|
90
|
+
brandHover: {
|
|
91
|
+
light: colors.brand.light,
|
|
92
|
+
dark: colors.brand.default
|
|
93
|
+
},
|
|
94
|
+
brandSoft: {
|
|
95
|
+
light: colors.brand.lightest,
|
|
96
|
+
dark: colors.brand.darker
|
|
97
|
+
},
|
|
98
|
+
success: {
|
|
99
|
+
light: colors.success.default,
|
|
100
|
+
dark: colors.success.default
|
|
101
|
+
},
|
|
102
|
+
successHover: {
|
|
103
|
+
light: colors.success.light,
|
|
104
|
+
dark: colors.success.light
|
|
105
|
+
},
|
|
106
|
+
successSoft: {
|
|
107
|
+
light: colors.success.lightest,
|
|
108
|
+
dark: colors.success.darkest
|
|
109
|
+
},
|
|
110
|
+
warning: {
|
|
111
|
+
light: colors.warning.default,
|
|
112
|
+
dark: colors.warning.default
|
|
113
|
+
},
|
|
114
|
+
warningHover: {
|
|
115
|
+
light: colors.warning.light,
|
|
116
|
+
dark: colors.warning.light
|
|
117
|
+
},
|
|
118
|
+
warningSoft: {
|
|
119
|
+
light: colors.warning.lightest,
|
|
120
|
+
dark: colors.warning.darkest
|
|
121
|
+
},
|
|
122
|
+
danger: {
|
|
123
|
+
light: colors.danger.default,
|
|
124
|
+
dark: colors.danger.default
|
|
125
|
+
},
|
|
126
|
+
dangerHover: {
|
|
127
|
+
light: colors.danger.light,
|
|
128
|
+
dark: colors.danger.light
|
|
129
|
+
},
|
|
130
|
+
dangerSoft: {
|
|
131
|
+
light: colors.danger.lightest,
|
|
132
|
+
dark: colors.danger.darkest
|
|
133
|
+
},
|
|
134
|
+
visited: {
|
|
135
|
+
light: colors.visited.default,
|
|
136
|
+
dark: colors.visited.dark
|
|
137
|
+
},
|
|
138
|
+
visitedSoft: {
|
|
139
|
+
light: colors.visited.lightest,
|
|
140
|
+
dark: colors.visited.darker
|
|
141
|
+
}
|
|
186
142
|
};
|
|
187
|
-
|
|
188
143
|
// src/theme/border.ts
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
144
|
+
const borderTheme = {
|
|
145
|
+
focus: {
|
|
146
|
+
light: colors.brand.lighter,
|
|
147
|
+
dark: colors.brand.lighter
|
|
148
|
+
},
|
|
149
|
+
gray: {
|
|
150
|
+
light: colors.gray.light,
|
|
151
|
+
dark: colors.gray.dark
|
|
152
|
+
},
|
|
153
|
+
graySoft: {
|
|
154
|
+
light: colors.gray.lighter,
|
|
155
|
+
dark: colors.gray.dark
|
|
156
|
+
},
|
|
157
|
+
grayStrong: {
|
|
158
|
+
light: colors.gray.dark,
|
|
159
|
+
dark: colors.gray.light
|
|
160
|
+
},
|
|
161
|
+
brand: {
|
|
162
|
+
light: colors.brand.default,
|
|
163
|
+
dark: colors.brand.light
|
|
164
|
+
},
|
|
165
|
+
brandSoft: {
|
|
166
|
+
light: colors.brand.lighter,
|
|
167
|
+
dark: colors.brand.dark
|
|
168
|
+
},
|
|
169
|
+
success: {
|
|
170
|
+
light: colors.success.default,
|
|
171
|
+
dark: colors.success.dark
|
|
172
|
+
},
|
|
173
|
+
successSoft: {
|
|
174
|
+
light: colors.success.lighter,
|
|
175
|
+
dark: colors.success.darker
|
|
176
|
+
},
|
|
177
|
+
warning: {
|
|
178
|
+
light: colors.warning.default,
|
|
179
|
+
dark: colors.warning.dark
|
|
180
|
+
},
|
|
181
|
+
warningSoft: {
|
|
182
|
+
light: colors.warning.lighter,
|
|
183
|
+
dark: colors.warning.darker
|
|
184
|
+
},
|
|
185
|
+
danger: {
|
|
186
|
+
light: colors.danger.default,
|
|
187
|
+
dark: colors.danger.dark
|
|
188
|
+
},
|
|
189
|
+
dangerSoft: {
|
|
190
|
+
light: colors.danger.lighter,
|
|
191
|
+
dark: colors.danger.darker
|
|
192
|
+
},
|
|
193
|
+
visited: {
|
|
194
|
+
light: colors.visited.default,
|
|
195
|
+
dark: colors.visited.dark
|
|
196
|
+
},
|
|
197
|
+
visitedSoft: {
|
|
198
|
+
light: colors.visited.lighter,
|
|
199
|
+
dark: colors.visited.darker
|
|
200
|
+
}
|
|
246
201
|
};
|
|
247
|
-
|
|
248
202
|
// src/theme/content.ts
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
203
|
+
const contentTheme = {
|
|
204
|
+
default: {
|
|
205
|
+
light: colors.gray.darkest,
|
|
206
|
+
dark: colors.gray.lightest
|
|
207
|
+
},
|
|
208
|
+
inverse: {
|
|
209
|
+
light: colors.gray.white,
|
|
210
|
+
dark: colors.gray.white
|
|
211
|
+
},
|
|
212
|
+
gray: {
|
|
213
|
+
light: colors.gray.dark,
|
|
214
|
+
dark: colors.gray.light
|
|
215
|
+
},
|
|
216
|
+
graySoft: {
|
|
217
|
+
light: colors.gray.default,
|
|
218
|
+
dark: colors.gray.default
|
|
219
|
+
},
|
|
220
|
+
grayStrong: {
|
|
221
|
+
light: colors.gray.darker,
|
|
222
|
+
dark: colors.gray.lighter
|
|
223
|
+
},
|
|
224
|
+
brand: {
|
|
225
|
+
light: colors.brand.default,
|
|
226
|
+
dark: colors.brand.lighter
|
|
227
|
+
},
|
|
228
|
+
brandHover: {
|
|
229
|
+
light: colors.brand.light,
|
|
230
|
+
dark: colors.brand.light
|
|
231
|
+
},
|
|
232
|
+
success: {
|
|
233
|
+
light: colors.success.default,
|
|
234
|
+
dark: colors.success.light
|
|
235
|
+
},
|
|
236
|
+
warning: {
|
|
237
|
+
light: colors.warning.dark,
|
|
238
|
+
dark: colors.warning.default
|
|
239
|
+
},
|
|
240
|
+
danger: {
|
|
241
|
+
light: colors.danger.default,
|
|
242
|
+
dark: colors.danger.light
|
|
243
|
+
},
|
|
244
|
+
visited: {
|
|
245
|
+
light: colors.visited.default,
|
|
246
|
+
dark: colors.visited.default
|
|
247
|
+
}
|
|
294
248
|
};
|
|
295
|
-
|
|
296
249
|
// src/theme/index.ts
|
|
297
|
-
|
|
298
|
-
|
|
250
|
+
const themeModes = ["light", "dark"];
|
|
299
251
|
// src/spacing.ts
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
252
|
+
const generateSpacers = (count, step) => {
|
|
253
|
+
const spacers = {
|
|
254
|
+
0: 0,
|
|
255
|
+
2: 2
|
|
256
|
+
};
|
|
257
|
+
for (let i = 1; i <= count; i++) spacers[i * step] = i * step;
|
|
258
|
+
return spacers;
|
|
306
259
|
};
|
|
307
|
-
|
|
308
|
-
|
|
260
|
+
const spacers = generateSpacers(50, 4);
|
|
309
261
|
// src/typography.ts
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
262
|
+
const fontFamilies = { sans: {
|
|
263
|
+
name: "Open Sans",
|
|
264
|
+
fallback: "sans-serif"
|
|
265
|
+
} };
|
|
266
|
+
const fontWeights = {
|
|
267
|
+
light: 300,
|
|
268
|
+
regular: 400,
|
|
269
|
+
semibold: 600,
|
|
270
|
+
bold: 800
|
|
318
271
|
};
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
272
|
+
const fontSizes = {
|
|
273
|
+
0: 0,
|
|
274
|
+
sm: 12,
|
|
275
|
+
md: 14,
|
|
276
|
+
lg: 16,
|
|
277
|
+
big: 18,
|
|
278
|
+
hero: 24
|
|
326
279
|
};
|
|
327
|
-
|
|
328
280
|
// src/border.ts
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
281
|
+
const radius = {
|
|
282
|
+
0: 0,
|
|
283
|
+
btn: 4,
|
|
284
|
+
input: 4,
|
|
285
|
+
card: 8,
|
|
286
|
+
pill: 100,
|
|
287
|
+
round: "50%"
|
|
336
288
|
};
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
289
|
+
const borderWidths = {
|
|
290
|
+
0: 0,
|
|
291
|
+
1: 1,
|
|
292
|
+
2: 2,
|
|
293
|
+
3: 3
|
|
342
294
|
};
|
|
343
|
-
|
|
344
295
|
// src/breakpoints.ts
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
296
|
+
const breakpoints = {
|
|
297
|
+
xs: 0,
|
|
298
|
+
sm: 480,
|
|
299
|
+
md: 680,
|
|
300
|
+
lg: 1024,
|
|
301
|
+
xl: 1200,
|
|
302
|
+
xxl: 1400
|
|
352
303
|
};
|
|
353
|
-
|
|
354
304
|
// src/transitions.ts
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
305
|
+
const transitions = {
|
|
306
|
+
default: {
|
|
307
|
+
property: "all",
|
|
308
|
+
duration: 300,
|
|
309
|
+
timing: "ease-in-out",
|
|
310
|
+
delay: 0
|
|
311
|
+
},
|
|
312
|
+
chevronRotate: {
|
|
313
|
+
property: "transform",
|
|
314
|
+
duration: 300,
|
|
315
|
+
timing: "ease-in-out",
|
|
316
|
+
delay: 75
|
|
317
|
+
}
|
|
358
318
|
};
|
|
359
|
-
|
|
360
319
|
// src/components/button.ts
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
320
|
+
const primary = (content, background, backgroundHover) => ({
|
|
321
|
+
content,
|
|
322
|
+
background,
|
|
323
|
+
backgroundHover,
|
|
324
|
+
border: null,
|
|
325
|
+
borderHover: null
|
|
326
|
+
});
|
|
327
|
+
const outline = (content, backgroundHover) => ({
|
|
328
|
+
content,
|
|
329
|
+
background: null,
|
|
330
|
+
backgroundHover,
|
|
331
|
+
border: "currentColor",
|
|
332
|
+
borderHover: null
|
|
333
|
+
});
|
|
334
|
+
const ghost = (content, backgroundHover) => ({
|
|
335
|
+
content,
|
|
336
|
+
background: null,
|
|
337
|
+
backgroundHover,
|
|
338
|
+
border: null,
|
|
339
|
+
borderHover: null
|
|
340
|
+
});
|
|
341
|
+
const button = {
|
|
342
|
+
base: {
|
|
343
|
+
padding: {
|
|
344
|
+
x: 16,
|
|
345
|
+
y: 12
|
|
346
|
+
},
|
|
347
|
+
paddingFromMd: {
|
|
348
|
+
x: 16,
|
|
349
|
+
y: 8
|
|
350
|
+
},
|
|
351
|
+
gap: 8,
|
|
352
|
+
iconSize: 16,
|
|
353
|
+
radius: "btn",
|
|
354
|
+
fontSize: "md",
|
|
355
|
+
fontWeight: "semibold",
|
|
356
|
+
lineHeight: 1.15,
|
|
357
|
+
borderWidth: 1
|
|
358
|
+
},
|
|
359
|
+
small: { paddingFromMd: {
|
|
360
|
+
x: 8,
|
|
361
|
+
y: 4
|
|
362
|
+
} },
|
|
363
|
+
iconOnly: { padding: 8 },
|
|
364
|
+
variants: {
|
|
365
|
+
primary: {
|
|
366
|
+
brand: primary("inverse", "brand", "brandHover"),
|
|
367
|
+
gray: primary("inverse", "brand", "brandHover"),
|
|
368
|
+
success: primary("inverse", "success", "successHover"),
|
|
369
|
+
warning: primary("default", "warning", "warningHover"),
|
|
370
|
+
danger: primary("inverse", "danger", "dangerHover")
|
|
371
|
+
},
|
|
372
|
+
outline: {
|
|
373
|
+
brand: outline("brand", "brandSoft"),
|
|
374
|
+
success: outline("brand", "brandSoft"),
|
|
375
|
+
warning: outline("brand", "brandSoft"),
|
|
376
|
+
gray: outline("default", "grayHover"),
|
|
377
|
+
danger: outline("danger", "dangerSoft")
|
|
378
|
+
},
|
|
379
|
+
ghost: {
|
|
380
|
+
brand: ghost("brand", "brandSoft"),
|
|
381
|
+
warning: ghost("warning", "warningSoft"),
|
|
382
|
+
success: {
|
|
383
|
+
...ghost("success", "successHover"),
|
|
384
|
+
disabledAs: "primary"
|
|
385
|
+
},
|
|
386
|
+
gray: ghost("default", "graySoft"),
|
|
387
|
+
danger: ghost("danger", "dangerSoft")
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
disabled: {
|
|
391
|
+
primary: {
|
|
392
|
+
content: "graySoft",
|
|
393
|
+
background: "graySoft",
|
|
394
|
+
border: "currentColor"
|
|
395
|
+
},
|
|
396
|
+
outline: {
|
|
397
|
+
content: "graySoft",
|
|
398
|
+
background: null,
|
|
399
|
+
border: "gray"
|
|
400
|
+
},
|
|
401
|
+
ghost: {
|
|
402
|
+
content: "graySoft",
|
|
403
|
+
background: null,
|
|
404
|
+
border: null
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
const buttonTokens = button;
|
|
409
|
+
const defaultButtonVariant = "primary";
|
|
410
|
+
const defaultButtonColor = "brand";
|
|
411
|
+
const getButtonColors = (variant, color) => button.variants[variant][color];
|
|
412
|
+
const getButtonDisabledColors = (variant, color) => button.disabled[getButtonColors(variant, color).disabledAs ?? variant];
|
|
413
|
+
const mainGridTokens = {
|
|
414
|
+
columns: 12,
|
|
415
|
+
gap: 12,
|
|
416
|
+
padding: 20
|
|
417
|
+
};
|
|
418
|
+
const mainNavTokens = {
|
|
419
|
+
widthCollapsed: 48,
|
|
420
|
+
widthExpanded: 200,
|
|
421
|
+
padding: 8,
|
|
422
|
+
gap: 4,
|
|
423
|
+
iconBox: 32,
|
|
424
|
+
iconSize: 20,
|
|
425
|
+
chevronSize: 16,
|
|
426
|
+
submenuMinWidth: 200
|
|
412
427
|
};
|
|
413
|
-
var buttonTokens = button;
|
|
414
|
-
var defaultButtonVariant = "primary";
|
|
415
|
-
var defaultButtonColor = "brand";
|
|
416
|
-
var getButtonColors = (variant, color) => button.variants[variant][color];
|
|
417
|
-
var getButtonDisabledColors = (variant, color) => button.disabled[getButtonColors(variant, color).disabledAs ?? variant];
|
|
418
|
-
|
|
419
428
|
// src/index.ts
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
});
|
|
429
|
+
const cssPrefix = "sds";
|
|
430
|
+
exports.backgroundTheme = backgroundTheme;
|
|
431
|
+
exports.borderTheme = borderTheme;
|
|
432
|
+
exports.borderWidths = borderWidths;
|
|
433
|
+
exports.breakpoints = breakpoints;
|
|
434
|
+
exports.buttonTokens = buttonTokens;
|
|
435
|
+
exports.colors = colors;
|
|
436
|
+
exports.contentTheme = contentTheme;
|
|
437
|
+
exports.cssPrefix = cssPrefix;
|
|
438
|
+
exports.defaultButtonColor = defaultButtonColor;
|
|
439
|
+
exports.defaultButtonVariant = defaultButtonVariant;
|
|
440
|
+
exports.fontFamilies = fontFamilies;
|
|
441
|
+
exports.fontSizes = fontSizes;
|
|
442
|
+
exports.fontWeights = fontWeights;
|
|
443
|
+
exports.getButtonColors = getButtonColors;
|
|
444
|
+
exports.getButtonDisabledColors = getButtonDisabledColors;
|
|
445
|
+
exports.mainGridTokens = mainGridTokens;
|
|
446
|
+
exports.mainNavTokens = mainNavTokens;
|
|
447
|
+
exports.radius = radius;
|
|
448
|
+
exports.spacers = spacers;
|
|
449
|
+
exports.themeModes = themeModes;
|
|
450
|
+
exports.transitions = transitions;
|