@ttoss/theme 1.8.5 → 2.0.1
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/esm/chunk-ZYSSWTLH.js +250 -0
- package/dist/esm/index.js +1 -209
- package/dist/esm/themes/Bruttal/Bruttal.js +483 -524
- package/package.json +4 -4
- package/dist/esm/chunk-ICKGF6JN.js +0 -31
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = {
|
|
10
|
+
exports: {}
|
|
11
|
+
}).exports, mod), mod.exports;
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: true
|
|
30
|
+
}) : target, mod));
|
|
31
|
+
|
|
32
|
+
// src/defaultTokens/borderRadius.ts
|
|
33
|
+
var radii = Object.freeze({
|
|
34
|
+
none: "0",
|
|
35
|
+
"2xs": "0.0625rem",
|
|
36
|
+
xs: "0.125rem",
|
|
37
|
+
sm: "0.25rem",
|
|
38
|
+
md: "0.375rem",
|
|
39
|
+
lg: "0.5rem",
|
|
40
|
+
xl: "0.75rem",
|
|
41
|
+
"2xl": "1rem",
|
|
42
|
+
"3xl": "1.5rem",
|
|
43
|
+
"4xl": "2rem",
|
|
44
|
+
full: "9999px"
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// src/defaultTokens/borders.ts
|
|
48
|
+
var borders = Object.freeze({
|
|
49
|
+
none: "0px solid",
|
|
50
|
+
xs: "0.5px solid",
|
|
51
|
+
sm: "1px solid",
|
|
52
|
+
md: "2px solid",
|
|
53
|
+
lg: "4px solid",
|
|
54
|
+
xl: "8px solid"
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// src/defaultTokens/breakpoints.ts
|
|
58
|
+
var breakpoints = Object.freeze({
|
|
59
|
+
sm: "640px",
|
|
60
|
+
// 40em
|
|
61
|
+
md: "768px",
|
|
62
|
+
// 48em
|
|
63
|
+
lg: "1024px",
|
|
64
|
+
// 64em
|
|
65
|
+
xl: "1280px",
|
|
66
|
+
// 80em
|
|
67
|
+
"2xl": "1536px"
|
|
68
|
+
// 96em
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
// src/defaultTokens/sizes.ts
|
|
72
|
+
var sizes = Object.freeze({
|
|
73
|
+
max: "max-content",
|
|
74
|
+
min: "min-content",
|
|
75
|
+
full: "100%",
|
|
76
|
+
"3xs": "14rem",
|
|
77
|
+
"2xs": "16rem",
|
|
78
|
+
xs: "20rem",
|
|
79
|
+
sm: "24rem",
|
|
80
|
+
md: "28rem",
|
|
81
|
+
lg: "32rem",
|
|
82
|
+
xl: "36rem",
|
|
83
|
+
"2xl": "42rem",
|
|
84
|
+
"3xl": "48rem",
|
|
85
|
+
"4xl": "56rem",
|
|
86
|
+
"5xl": "64rem",
|
|
87
|
+
"6xl": "72rem",
|
|
88
|
+
"7xl": "80rem",
|
|
89
|
+
"8xl": "90rem",
|
|
90
|
+
container: {
|
|
91
|
+
sm: "640px",
|
|
92
|
+
md: "768px",
|
|
93
|
+
lg: "1024px",
|
|
94
|
+
xl: "1280px"
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// src/defaultTokens/spacing.ts
|
|
99
|
+
var spacing = Object.freeze({
|
|
100
|
+
px: "1px",
|
|
101
|
+
// 1px
|
|
102
|
+
0.5: "0.125rem",
|
|
103
|
+
// 2px
|
|
104
|
+
1: "0.25rem",
|
|
105
|
+
// 4px
|
|
106
|
+
1.5: "0.375rem",
|
|
107
|
+
// 6px
|
|
108
|
+
2: "0.5rem",
|
|
109
|
+
// 8px
|
|
110
|
+
2.5: "0.625rem",
|
|
111
|
+
// 10px
|
|
112
|
+
3: "0.75rem",
|
|
113
|
+
// 12px
|
|
114
|
+
3.5: "0.875rem",
|
|
115
|
+
// 14px
|
|
116
|
+
4: "1rem",
|
|
117
|
+
// 16px
|
|
118
|
+
5: "1.25rem",
|
|
119
|
+
// 20px
|
|
120
|
+
6: "1.5rem",
|
|
121
|
+
// 24px
|
|
122
|
+
7: "1.75rem",
|
|
123
|
+
// 28px
|
|
124
|
+
8: "2rem",
|
|
125
|
+
// 32px
|
|
126
|
+
9: "2.25rem",
|
|
127
|
+
// 36px
|
|
128
|
+
10: "2.5rem",
|
|
129
|
+
// 40px
|
|
130
|
+
12: "3rem",
|
|
131
|
+
// 48px
|
|
132
|
+
14: "3.5rem",
|
|
133
|
+
// 56px
|
|
134
|
+
16: "4rem",
|
|
135
|
+
// 64px
|
|
136
|
+
20: "5rem",
|
|
137
|
+
// 80px
|
|
138
|
+
24: "6rem",
|
|
139
|
+
// 96px
|
|
140
|
+
28: "7rem",
|
|
141
|
+
32: "8rem",
|
|
142
|
+
36: "9rem",
|
|
143
|
+
40: "10rem",
|
|
144
|
+
44: "11rem",
|
|
145
|
+
48: "12rem",
|
|
146
|
+
52: "13rem",
|
|
147
|
+
56: "14rem",
|
|
148
|
+
60: "15rem",
|
|
149
|
+
64: "16rem",
|
|
150
|
+
72: "18rem",
|
|
151
|
+
80: "20rem",
|
|
152
|
+
96: "24rem"
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
// src/defaultTokens/typography.ts
|
|
156
|
+
var fontSizes = Object.freeze({
|
|
157
|
+
"4xs": "0.375rem",
|
|
158
|
+
// 6px
|
|
159
|
+
"3xs": "0.5rem",
|
|
160
|
+
// 8px
|
|
161
|
+
"2xs": "0.625rem",
|
|
162
|
+
// 10px
|
|
163
|
+
xs: "0.75rem",
|
|
164
|
+
// 12px
|
|
165
|
+
sm: "0.875rem",
|
|
166
|
+
// 14px
|
|
167
|
+
md: "1rem",
|
|
168
|
+
// 16px
|
|
169
|
+
lg: "1.125rem",
|
|
170
|
+
// 18px
|
|
171
|
+
xl: "1.25rem",
|
|
172
|
+
// 20px
|
|
173
|
+
"2xl": "1.5rem",
|
|
174
|
+
// 24px
|
|
175
|
+
"3xl": "1.875rem",
|
|
176
|
+
// 30px
|
|
177
|
+
"4xl": "2.25rem",
|
|
178
|
+
// 36px
|
|
179
|
+
"5xl": "3rem",
|
|
180
|
+
// 48px
|
|
181
|
+
"6xl": "3.75rem",
|
|
182
|
+
// 60px
|
|
183
|
+
"7xl": "4.5rem",
|
|
184
|
+
// 72px
|
|
185
|
+
"8xl": "6rem",
|
|
186
|
+
// 96px
|
|
187
|
+
"9xl": "8rem"
|
|
188
|
+
// 128px
|
|
189
|
+
});
|
|
190
|
+
var fontWeights = Object.freeze({
|
|
191
|
+
hairline: 100,
|
|
192
|
+
thin: 200,
|
|
193
|
+
light: 300,
|
|
194
|
+
normal: 400,
|
|
195
|
+
medium: 500,
|
|
196
|
+
semibold: 600,
|
|
197
|
+
bold: 700,
|
|
198
|
+
extrabold: 800,
|
|
199
|
+
black: 900
|
|
200
|
+
});
|
|
201
|
+
var lineHeights = Object.freeze({
|
|
202
|
+
normal: "normal",
|
|
203
|
+
none: 1,
|
|
204
|
+
shorter: 1.25,
|
|
205
|
+
short: 1.375,
|
|
206
|
+
moderate: 1.5,
|
|
207
|
+
tall: 1.625,
|
|
208
|
+
taller: "2"
|
|
209
|
+
});
|
|
210
|
+
var letterSpacings = Object.freeze({
|
|
211
|
+
tighter: "-0.05em",
|
|
212
|
+
tight: "-0.025em",
|
|
213
|
+
normal: "0",
|
|
214
|
+
wide: "0.025em",
|
|
215
|
+
wider: "0.05em",
|
|
216
|
+
widest: "0.1em"
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
// src/defaultTokens/zIndex.ts
|
|
220
|
+
var zIndices = Object.freeze({
|
|
221
|
+
hide: -1,
|
|
222
|
+
auto: "auto",
|
|
223
|
+
base: 0,
|
|
224
|
+
docked: 10,
|
|
225
|
+
dropdown: 1e3,
|
|
226
|
+
sticky: 1100,
|
|
227
|
+
banner: 1200,
|
|
228
|
+
overlay: 1300,
|
|
229
|
+
modal: 1400,
|
|
230
|
+
popover: 1500,
|
|
231
|
+
skipNav: 1600,
|
|
232
|
+
toast: 1700,
|
|
233
|
+
tooltip: 1800,
|
|
234
|
+
max: 2147483647
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
// src/themes/default/defaultTheme.ts
|
|
238
|
+
var defaultTheme = {
|
|
239
|
+
breakpoints: Object.values(breakpoints),
|
|
240
|
+
fontSizes,
|
|
241
|
+
fontWeights,
|
|
242
|
+
letterSpacings,
|
|
243
|
+
lineHeights,
|
|
244
|
+
radii,
|
|
245
|
+
sizes,
|
|
246
|
+
space: spacing,
|
|
247
|
+
zIndices,
|
|
248
|
+
borders
|
|
249
|
+
};
|
|
250
|
+
export { __commonJS, __toESM, defaultTheme };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,213 +1,5 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import "./chunk-
|
|
3
|
-
|
|
4
|
-
// src/defaultTokens/borderRadius.ts
|
|
5
|
-
var radii = Object.freeze({
|
|
6
|
-
none: "0",
|
|
7
|
-
"2xs": "0.0625rem",
|
|
8
|
-
xs: "0.125rem",
|
|
9
|
-
sm: "0.25rem",
|
|
10
|
-
md: "0.375rem",
|
|
11
|
-
lg: "0.5rem",
|
|
12
|
-
xl: "0.75rem",
|
|
13
|
-
"2xl": "1rem",
|
|
14
|
-
"3xl": "1.5rem",
|
|
15
|
-
"4xl": "2rem",
|
|
16
|
-
full: "9999px"
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
// src/defaultTokens/breakpoints.ts
|
|
20
|
-
var breakpoints = Object.freeze({
|
|
21
|
-
sm: "640px",
|
|
22
|
-
// 40em
|
|
23
|
-
md: "768px",
|
|
24
|
-
// 48em
|
|
25
|
-
lg: "1024px",
|
|
26
|
-
// 64em
|
|
27
|
-
xl: "1280px",
|
|
28
|
-
// 80em
|
|
29
|
-
"2xl": "1536px"
|
|
30
|
-
// 96em
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
// src/defaultTokens/sizes.ts
|
|
34
|
-
var sizes = Object.freeze({
|
|
35
|
-
max: "max-content",
|
|
36
|
-
min: "min-content",
|
|
37
|
-
full: "100%",
|
|
38
|
-
"3xs": "14rem",
|
|
39
|
-
"2xs": "16rem",
|
|
40
|
-
xs: "20rem",
|
|
41
|
-
sm: "24rem",
|
|
42
|
-
md: "28rem",
|
|
43
|
-
lg: "32rem",
|
|
44
|
-
xl: "36rem",
|
|
45
|
-
"2xl": "42rem",
|
|
46
|
-
"3xl": "48rem",
|
|
47
|
-
"4xl": "56rem",
|
|
48
|
-
"5xl": "64rem",
|
|
49
|
-
"6xl": "72rem",
|
|
50
|
-
"7xl": "80rem",
|
|
51
|
-
"8xl": "90rem",
|
|
52
|
-
container: {
|
|
53
|
-
sm: "640px",
|
|
54
|
-
md: "768px",
|
|
55
|
-
lg: "1024px",
|
|
56
|
-
xl: "1280px"
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
// src/defaultTokens/spacing.ts
|
|
61
|
-
var spacing = Object.freeze({
|
|
62
|
-
px: "1px",
|
|
63
|
-
// 1px
|
|
64
|
-
0.5: "0.125rem",
|
|
65
|
-
// 2px
|
|
66
|
-
1: "0.25rem",
|
|
67
|
-
// 4px
|
|
68
|
-
1.5: "0.375rem",
|
|
69
|
-
// 6px
|
|
70
|
-
2: "0.5rem",
|
|
71
|
-
// 8px
|
|
72
|
-
2.5: "0.625rem",
|
|
73
|
-
// 10px
|
|
74
|
-
3: "0.75rem",
|
|
75
|
-
// 12px
|
|
76
|
-
3.5: "0.875rem",
|
|
77
|
-
// 14px
|
|
78
|
-
4: "1rem",
|
|
79
|
-
// 16px
|
|
80
|
-
5: "1.25rem",
|
|
81
|
-
// 20px
|
|
82
|
-
6: "1.5rem",
|
|
83
|
-
// 24px
|
|
84
|
-
7: "1.75rem",
|
|
85
|
-
// 28px
|
|
86
|
-
8: "2rem",
|
|
87
|
-
// 32px
|
|
88
|
-
9: "2.25rem",
|
|
89
|
-
// 36px
|
|
90
|
-
10: "2.5rem",
|
|
91
|
-
// 40px
|
|
92
|
-
12: "3rem",
|
|
93
|
-
// 48px
|
|
94
|
-
14: "3.5rem",
|
|
95
|
-
// 56px
|
|
96
|
-
16: "4rem",
|
|
97
|
-
// 64px
|
|
98
|
-
20: "5rem",
|
|
99
|
-
// 80px
|
|
100
|
-
24: "6rem",
|
|
101
|
-
// 96px
|
|
102
|
-
28: "7rem",
|
|
103
|
-
32: "8rem",
|
|
104
|
-
36: "9rem",
|
|
105
|
-
40: "10rem",
|
|
106
|
-
44: "11rem",
|
|
107
|
-
48: "12rem",
|
|
108
|
-
52: "13rem",
|
|
109
|
-
56: "14rem",
|
|
110
|
-
60: "15rem",
|
|
111
|
-
64: "16rem",
|
|
112
|
-
72: "18rem",
|
|
113
|
-
80: "20rem",
|
|
114
|
-
96: "24rem"
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
// src/defaultTokens/typography.ts
|
|
118
|
-
var fontSizes = Object.freeze({
|
|
119
|
-
"4xs": "0.375rem",
|
|
120
|
-
// 6px
|
|
121
|
-
"3xs": "0.5rem",
|
|
122
|
-
// 8px
|
|
123
|
-
"2xs": "0.625rem",
|
|
124
|
-
// 10px
|
|
125
|
-
xs: "0.75rem",
|
|
126
|
-
// 12px
|
|
127
|
-
sm: "0.875rem",
|
|
128
|
-
// 14px
|
|
129
|
-
md: "1rem",
|
|
130
|
-
// 16px
|
|
131
|
-
lg: "1.125rem",
|
|
132
|
-
// 18px
|
|
133
|
-
xl: "1.25rem",
|
|
134
|
-
// 20px
|
|
135
|
-
"2xl": "1.5rem",
|
|
136
|
-
// 24px
|
|
137
|
-
"3xl": "1.875rem",
|
|
138
|
-
// 30px
|
|
139
|
-
"4xl": "2.25rem",
|
|
140
|
-
// 36px
|
|
141
|
-
"5xl": "3rem",
|
|
142
|
-
// 48px
|
|
143
|
-
"6xl": "3.75rem",
|
|
144
|
-
// 60px
|
|
145
|
-
"7xl": "4.5rem",
|
|
146
|
-
// 72px
|
|
147
|
-
"8xl": "6rem",
|
|
148
|
-
// 96px
|
|
149
|
-
"9xl": "8rem"
|
|
150
|
-
// 128px
|
|
151
|
-
});
|
|
152
|
-
var fontWeights = Object.freeze({
|
|
153
|
-
hairline: 100,
|
|
154
|
-
thin: 200,
|
|
155
|
-
light: 300,
|
|
156
|
-
normal: 400,
|
|
157
|
-
medium: 500,
|
|
158
|
-
semibold: 600,
|
|
159
|
-
bold: 700,
|
|
160
|
-
extrabold: 800,
|
|
161
|
-
black: 900
|
|
162
|
-
});
|
|
163
|
-
var lineHeights = Object.freeze({
|
|
164
|
-
normal: "normal",
|
|
165
|
-
none: 1,
|
|
166
|
-
shorter: 1.25,
|
|
167
|
-
short: 1.375,
|
|
168
|
-
moderate: 1.5,
|
|
169
|
-
tall: 1.625,
|
|
170
|
-
taller: "2"
|
|
171
|
-
});
|
|
172
|
-
var letterSpacings = Object.freeze({
|
|
173
|
-
tighter: "-0.05em",
|
|
174
|
-
tight: "-0.025em",
|
|
175
|
-
normal: "0",
|
|
176
|
-
wide: "0.025em",
|
|
177
|
-
wider: "0.05em",
|
|
178
|
-
widest: "0.1em"
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
// src/defaultTokens/zIndex.ts
|
|
182
|
-
var zIndices = Object.freeze({
|
|
183
|
-
hide: -1,
|
|
184
|
-
auto: "auto",
|
|
185
|
-
base: 0,
|
|
186
|
-
docked: 10,
|
|
187
|
-
dropdown: 1e3,
|
|
188
|
-
sticky: 1100,
|
|
189
|
-
banner: 1200,
|
|
190
|
-
overlay: 1300,
|
|
191
|
-
modal: 1400,
|
|
192
|
-
popover: 1500,
|
|
193
|
-
skipNav: 1600,
|
|
194
|
-
toast: 1700,
|
|
195
|
-
tooltip: 1800,
|
|
196
|
-
max: 2147483647
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
// src/themes/default/defaultTheme.ts
|
|
200
|
-
var defaultTheme = {
|
|
201
|
-
breakpoints: Object.values(breakpoints),
|
|
202
|
-
fontSizes,
|
|
203
|
-
fontWeights,
|
|
204
|
-
letterSpacings,
|
|
205
|
-
lineHeights,
|
|
206
|
-
radii,
|
|
207
|
-
sizes,
|
|
208
|
-
space: spacing,
|
|
209
|
-
zIndices
|
|
210
|
-
};
|
|
2
|
+
import { defaultTheme } from "./chunk-ZYSSWTLH.js";
|
|
211
3
|
|
|
212
4
|
// src/createTheme.ts
|
|
213
5
|
import deepmerge from "deepmerge";
|