@ttoss/theme 1.7.23 → 1.8.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/esm/chunk-ICKGF6JN.js +31 -0
- package/dist/esm/index.js +211 -3
- package/dist/esm/themes/Bruttal/Bruttal.js +1501 -1
- package/dist/index.d.ts +1 -1
- package/package.json +4 -4
- package/dist/esm/chunk-ZELVNPEV.js +0 -1531
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
export { __commonJS, __toESM };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,9 +1,217 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import
|
|
2
|
+
import "./chunk-ICKGF6JN.js";
|
|
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
|
+
};
|
|
3
211
|
|
|
4
212
|
// src/createTheme.ts
|
|
5
213
|
import deepmerge from "deepmerge";
|
|
6
|
-
var createTheme = theme => {
|
|
7
|
-
return deepmerge(
|
|
214
|
+
var createTheme = (theme, base = defaultTheme) => {
|
|
215
|
+
return deepmerge(base, theme);
|
|
8
216
|
};
|
|
9
217
|
export { createTheme };
|