@ttoss/theme 1.7.14 → 1.7.16

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/index.js DELETED
@@ -1,951 +0,0 @@
1
- /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- "use strict";
3
-
4
- var __create = Object.create;
5
- var __defProp = Object.defineProperty;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
- var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getProtoOf = Object.getPrototypeOf;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __commonJS = (cb, mod) => function __require() {
11
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = {
12
- exports: {}
13
- }).exports, mod), mod.exports;
14
- };
15
- var __export = (target, all) => {
16
- for (var name in all) __defProp(target, name, {
17
- get: all[name],
18
- enumerable: true
19
- });
20
- };
21
- var __copyProps = (to, from, except, desc) => {
22
- if (from && typeof from === "object" || typeof from === "function") {
23
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
24
- get: () => from[key],
25
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
26
- });
27
- }
28
- return to;
29
- };
30
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
31
- // If the importer is in node compatibility mode or this is not an ESM
32
- // file that has been converted to a CommonJS file using a Babel-
33
- // compatible transform (i.e. "__esModule" has not been set), then set
34
- // "default" to the CommonJS "module.exports" for node compatibility.
35
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
36
- value: mod,
37
- enumerable: true
38
- }) : target, mod));
39
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
40
- value: true
41
- }), mod);
42
-
43
- // ../../node_modules/.pnpm/@iconify+icons-eos-icons@1.2.6/node_modules/@iconify/icons-eos-icons/loading.js
44
- var require_loading = __commonJS({
45
- "../../node_modules/.pnpm/@iconify+icons-eos-icons@1.2.6/node_modules/@iconify/icons-eos-icons/loading.js"(exports2) {
46
- "use strict";
47
-
48
- var data = {
49
- "width": 24,
50
- "height": 24,
51
- "body": '<path fill="currentColor" d="M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z" opacity=".5"/><path fill="currentColor" d="M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"><animateTransform attributeName="transform" dur="1s" from="0 12 12" repeatCount="indefinite" to="360 12 12" type="rotate"/></path>'
52
- };
53
- exports2.__esModule = true;
54
- exports2.default = data;
55
- }
56
- });
57
-
58
- // ../../node_modules/.pnpm/@iconify+icons-mdi@1.2.48/node_modules/@iconify/icons-mdi/success-circle.js
59
- var require_success_circle = __commonJS({
60
- "../../node_modules/.pnpm/@iconify+icons-mdi@1.2.48/node_modules/@iconify/icons-mdi/success-circle.js"(exports2) {
61
- "use strict";
62
-
63
- var data = {
64
- "width": 24,
65
- "height": 24,
66
- "body": '<path fill="currentColor" d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10s10-4.5 10-10S17.5 2 12 2m-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9Z"/>'
67
- };
68
- exports2.__esModule = true;
69
- exports2.default = data;
70
- }
71
- });
72
-
73
- // ../../node_modules/.pnpm/@iconify+icons-eos-icons@1.2.6/node_modules/@iconify/icons-eos-icons/three-dots-loading.js
74
- var require_three_dots_loading = __commonJS({
75
- "../../node_modules/.pnpm/@iconify+icons-eos-icons@1.2.6/node_modules/@iconify/icons-eos-icons/three-dots-loading.js"(exports2) {
76
- "use strict";
77
-
78
- var data = {
79
- "width": 24,
80
- "height": 24,
81
- "body": '<circle cx="18" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".67" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"/></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".33" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"/></circle><circle cx="6" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin="0" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"/></circle>'
82
- };
83
- exports2.__esModule = true;
84
- exports2.default = data;
85
- }
86
- });
87
-
88
- // src/index.ts
89
- var src_exports = {};
90
- __export(src_exports, {
91
- createTheme: () => createTheme
92
- });
93
- module.exports = __toCommonJS(src_exports);
94
-
95
- // src/themes/Bruttal/BruttalIcons.ts
96
- var import_react_icons = require("@ttoss/react-icons");
97
- var import_add_filled = __toESM(require("@iconify/icons-carbon/add-filled"));
98
- var import_arrow_right = __toESM(require("@iconify/icons-carbon/arrow-right"));
99
- var import_arrow_up_right = __toESM(require("@iconify/icons-carbon/arrow-up-right"));
100
- var import_attachment = __toESM(require("@iconify/icons-carbon/attachment"));
101
- var import_calendar = __toESM(require("@iconify/icons-carbon/calendar"));
102
- var import_caret_down = __toESM(require("@iconify/icons-carbon/caret-down"));
103
- var import_caret_up = __toESM(require("@iconify/icons-carbon/caret-up"));
104
- var import_checkmark = __toESM(require("@iconify/icons-carbon/checkmark"));
105
- var import_checkmark_outline = __toESM(require("@iconify/icons-carbon/checkmark-outline"));
106
- var import_checkbox_checked_filled = __toESM(require("@iconify/icons-carbon/checkbox-checked-filled"));
107
- var import_checkbox = __toESM(require("@iconify/icons-carbon/checkbox"));
108
- var import_checkbox_indeterminate_filled = __toESM(require("@iconify/icons-carbon/checkbox-indeterminate-filled"));
109
- var import_chevron_down = __toESM(require("@iconify/icons-carbon/chevron-down"));
110
- var import_chevron_left = __toESM(require("@iconify/icons-carbon/chevron-left"));
111
- var import_chevron_right = __toESM(require("@iconify/icons-carbon/chevron-right"));
112
- var import_chevron_up = __toESM(require("@iconify/icons-carbon/chevron-up"));
113
- var import_close_filled = __toESM(require("@iconify/icons-carbon/close-filled"));
114
- var import_close = __toESM(require("@iconify/icons-carbon/close"));
115
- var import_copy = __toESM(require("@iconify/icons-carbon/copy"));
116
- var import_download = __toESM(require("@iconify/icons-carbon/download"));
117
- var import_edit = __toESM(require("@iconify/icons-carbon/edit"));
118
- var import_email = __toESM(require("@iconify/icons-carbon/email"));
119
- var import_error_filled = __toESM(require("@iconify/icons-carbon/error-filled"));
120
- var import_information_filled = __toESM(require("@iconify/icons-carbon/information-filled"));
121
- var import_language = __toESM(require("@iconify/icons-carbon/language"));
122
- var import_loading = __toESM(require_loading());
123
- var import_menu = __toESM(require("@iconify/icons-carbon/menu"));
124
- var import_paste = __toESM(require("@iconify/icons-carbon/paste"));
125
- var import_radio_button_checked = __toESM(require("@iconify/icons-carbon/radio-button-checked"));
126
- var import_radio_button = __toESM(require("@iconify/icons-carbon/radio-button"));
127
- var import_renew = __toESM(require("@iconify/icons-carbon/renew"));
128
- var import_search = __toESM(require("@iconify/icons-carbon/search"));
129
- var import_share = __toESM(require("@iconify/icons-carbon/share"));
130
- var import_success_circle = __toESM(require_success_circle());
131
- var import_three_dots_loading = __toESM(require_three_dots_loading());
132
- var import_time = __toESM(require("@iconify/icons-carbon/time"));
133
- var import_trash_can = __toESM(require("@iconify/icons-carbon/trash-can"));
134
- var import_upload = __toESM(require("@iconify/icons-carbon/upload"));
135
- var import_user_avatar_filled_alt = __toESM(require("@iconify/icons-carbon/user-avatar-filled-alt"));
136
- var import_view_filled = __toESM(require("@iconify/icons-carbon/view-filled"));
137
- var import_view_off_filled = __toESM(require("@iconify/icons-carbon/view-off-filled"));
138
- var import_warning_alt = __toESM(require("@iconify/icons-carbon/warning-alt"));
139
- var import_warning_filled = __toESM(require("@iconify/icons-carbon/warning-filled"));
140
- var replicateIcon = {
141
- body: `<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
142
- <path d="M42 15V42H15V15H42ZM42 12H15C14.2044 12 13.4413 12.3161 12.8787 12.8787C12.3161 13.4413 12 14.2044 12 15V42C12 42.7956 12.3161 43.5587 12.8787 44.1213C13.4413 44.6839 14.2044 45 15 45H42C42.7956 45 43.5587 44.6839 44.1213 44.1213C44.6839 43.5587 45 42.7956 45 42V15C45 14.2044 44.6839 13.4413 44.1213 12.8787C43.5587 12.3161 42.7956 12 42 12Z" fill="currentColor"/>
143
- <path fill-rule="evenodd" clip-rule="evenodd" d="M3 5.76389C3 4.23744 4.26071 3 5.81588 3H29V5.57963H5.81588C5.71221 5.57963 5.62816 5.66213 5.62816 5.76389V28.994C5.62816 29.0957 5.71221 29.1782 5.81588 29.1782H22.2607L18.7784 25.7602L20.6368 23.9361L27.2916 30.4681L20.6368 37L18.7784 35.1759L22.2607 31.7579H5.81588C4.26071 31.7579 3 30.5204 3 28.994V5.76389Z" fill="currentColor"/>
144
- </svg>`,
145
- width: 48,
146
- height: 48
147
- };
148
- var subtractIcon = {
149
- body: `<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
150
- <path d="M14 26H34V22H14V26ZM24 44C21.2333 44 18.6333 43.4747 16.2 42.424C13.7667 41.3733 11.65 39.9487 9.85 38.15C8.05 36.35 6.62533 34.2333 5.576 31.8C4.52667 29.3667 4.00133 26.7667 4 24C4 21.2333 4.52533 18.6333 5.576 16.2C6.62667 13.7667 8.05133 11.65 9.85 9.85C11.65 8.05 13.7667 6.62533 16.2 5.576C18.6333 4.52667 21.2333 4.00133 24 4C26.7667 4 29.3667 4.52533 31.8 5.576C34.2333 6.62667 36.35 8.05133 38.15 9.85C39.95 11.65 41.3753 13.7667 42.426 16.2C43.4767 18.6333 44.0013 21.2333 44 24C44 26.7667 43.4747 29.3667 42.424 31.8C41.3733 34.2333 39.9487 36.35 38.15 38.15C36.35 39.95 34.2333 41.3753 31.8 42.426C29.3667 43.4767 26.7667 44.0013 24 44Z" fill="black"/>
151
- </svg>
152
- `,
153
- width: 48,
154
- height: 48
155
- };
156
- var BrutalIcons = {
157
- add: import_add_filled.default,
158
- "arrow-right": import_arrow_right.default,
159
- attachment: import_attachment.default,
160
- avatar: import_user_avatar_filled_alt.default,
161
- "caret-down": import_caret_down.default,
162
- "caret-up": import_caret_up.default,
163
- calendar: import_calendar.default,
164
- "checkbox-checked": import_checkbox_checked_filled.default,
165
- "checkbox-indeterminate": import_checkbox_indeterminate_filled.default,
166
- "checkbox-unchecked": import_checkbox.default,
167
- check: import_checkmark.default,
168
- "check-mark": import_checkmark_outline.default,
169
- close: import_close.default,
170
- copy: import_copy.default,
171
- download: import_download.default,
172
- edit: import_edit.default,
173
- email: import_email.default,
174
- delete: import_trash_can.default,
175
- error: import_error_filled.default,
176
- info: import_information_filled.default,
177
- language: import_language.default,
178
- loading: import_loading.default,
179
- "menu-open": import_menu.default,
180
- "open-link": import_arrow_up_right.default,
181
- paste: import_paste.default,
182
- "picker-down": import_chevron_down.default,
183
- "picker-up": import_chevron_up.default,
184
- "nav-left": import_chevron_left.default,
185
- "nav-right": import_chevron_right.default,
186
- "radio-not-selected": import_radio_button.default,
187
- "radio-selected": import_radio_button_checked.default,
188
- refresh: import_renew.default,
189
- replicate: replicateIcon,
190
- search: import_search.default,
191
- share: import_share.default,
192
- subtract: subtractIcon,
193
- "success-circle": import_success_circle.default,
194
- "small-close": import_close_filled.default,
195
- "three-dots-loading": import_three_dots_loading.default,
196
- time: import_time.default,
197
- upload: import_upload.default,
198
- "view-off": import_view_off_filled.default,
199
- "view-on": import_view_filled.default,
200
- warning: import_warning_filled.default,
201
- "warning-alt": import_warning_alt.default
202
- };
203
- Object.entries(BrutalIcons).forEach(([key, icon]) => {
204
- (0, import_react_icons.addIcon)(key, icon);
205
- });
206
-
207
- // src/helpers/geometricCalc.ts
208
- var SIZE_TYPE = "rem";
209
- var calcMultiplyingValues = (initialValue, base, ratio, sizeType = SIZE_TYPE) => {
210
- const result = initialValue * Math.pow(base, ratio);
211
- return `${result.toFixed(2)}${sizeType}`;
212
- };
213
- var calcDividingValues = (initialValue, base, ratio, sizeType = SIZE_TYPE) => {
214
- const result = initialValue / Math.pow(base, ratio);
215
- return `${result.toFixed(2)}${sizeType}`;
216
- };
217
-
218
- // src/tokens/fontSizes.ts
219
- var SIZE_TYPE2 = "rem";
220
- var BASE = 1;
221
- var MULTIPLIER_FACTOR = 1.333;
222
- var fontSizes = {
223
- "2xs": calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, -3),
224
- xs: calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, -2),
225
- sm: calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, -1),
226
- base: `${BASE}${SIZE_TYPE2}`,
227
- lg: calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, 1),
228
- xl: calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, 2),
229
- "2xl": calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, 3),
230
- "3xl": calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, 4),
231
- "4xl": calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, 5),
232
- "5xl": calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, 6),
233
- "6xl": calcMultiplyingValues(BASE, MULTIPLIER_FACTOR, 7)
234
- };
235
-
236
- // src/tokens/fontWeights.ts
237
- var fontWeights = {
238
- thin: 100,
239
- extralight: 200,
240
- light: 300,
241
- normal: 400,
242
- medium: 500,
243
- semibold: 600,
244
- bold: 700,
245
- extrabold: 800
246
- };
247
-
248
- // src/tokens/letterSpacings.ts
249
- var letterSpacings = {
250
- tighter: "-0.05em",
251
- tight: "-0.025em",
252
- regular: "0em",
253
- wide: "0.05em",
254
- wider: "0.1em",
255
- widest: "0.5em"
256
- };
257
-
258
- // src/tokens/lineHeights.ts
259
- var BASE2 = 100;
260
- var MULTIPLIER_FACTOR2 = 1.333;
261
- var SIZE_TYPE3 = "%";
262
- var lineHeights = {
263
- "2xs": calcMultiplyingValues(BASE2, MULTIPLIER_FACTOR2, -3, SIZE_TYPE3),
264
- xs: calcMultiplyingValues(BASE2, MULTIPLIER_FACTOR2, -2, SIZE_TYPE3),
265
- sm: calcDividingValues(BASE2, MULTIPLIER_FACTOR2, 1, SIZE_TYPE3),
266
- base: "normal",
267
- lg: calcMultiplyingValues(BASE2, MULTIPLIER_FACTOR2, 1, SIZE_TYPE3),
268
- xl: calcMultiplyingValues(BASE2, MULTIPLIER_FACTOR2, 2, SIZE_TYPE3),
269
- "2xl": calcMultiplyingValues(BASE2, MULTIPLIER_FACTOR2, 3, SIZE_TYPE3),
270
- flat: "100%"
271
- };
272
-
273
- // src/tokens/space.ts
274
- var SIZE_TYPE4 = "rem";
275
- var MD = 0.5;
276
- var MULTIPLIER_FACTOR3 = 1.618;
277
- var space = {
278
- none: 0,
279
- "2xs": calcDividingValues(MD, MULTIPLIER_FACTOR3, 3),
280
- xs: calcDividingValues(MD, MULTIPLIER_FACTOR3, 2),
281
- sm: calcDividingValues(MD, MULTIPLIER_FACTOR3, 1),
282
- md: `${MD}${SIZE_TYPE4}`,
283
- lg: calcMultiplyingValues(MD, MULTIPLIER_FACTOR3, 1),
284
- xl: calcMultiplyingValues(MD, MULTIPLIER_FACTOR3, 2),
285
- "2xl": calcMultiplyingValues(MD, MULTIPLIER_FACTOR3, 3),
286
- "3xl": calcMultiplyingValues(MD, MULTIPLIER_FACTOR3, 4),
287
- "4xl": calcMultiplyingValues(MD, MULTIPLIER_FACTOR3, 5),
288
- "5xl": calcMultiplyingValues(MD, MULTIPLIER_FACTOR3, 6),
289
- "6xl": calcMultiplyingValues(MD, MULTIPLIER_FACTOR3, 7),
290
- "7xl": calcMultiplyingValues(MD, MULTIPLIER_FACTOR3, 8)
291
- };
292
-
293
- // src/tokens/zIndices.ts
294
- var zIndices = {
295
- deep: -9999,
296
- behind: -1,
297
- auto: "auto",
298
- base: 0,
299
- docked: 10,
300
- /**
301
- * Sticky is a CSS property that can be applied to an element to make it
302
- * "stick" or remain fixed in a specific position relative to the viewport
303
- * as the user scrolls the page. When an element is set as sticky, it will
304
- * initially behave like a normal element but once the user scrolls past a
305
- * certain threshold, it will stick to the designated position.
306
- */
307
- sticky: 100,
308
- /**
309
- * An overlay is a graphical element used in user interfaces to cover or
310
- * partially obscure the underlying content. It is typically a
311
- * semi-transparent or opaque layer that is positioned above other elements
312
- * on the screen. Overlays are commonly employed to provide visual effects,
313
- * create modal or pop-up dialogs, highlight or focus user attention, or
314
- * serve as a background for elements such as tooltips, modals, or dropdown
315
- * menus. They are often used to add depth, dimension, and visual hierarchy
316
- * to the interface by visually separating or layering content.
317
- */
318
- overlay: 1e3,
319
- /**
320
- * A modal is a user interface component that appears as a dialog or window
321
- * overlay on top of the main content, temporarily interrupting the user's
322
- * interaction flow. It is commonly used to display additional information,
323
- * request user input, or confirm an action. Modals typically have a higher
324
- * z-index value than other elements on the page to ensure they are visually
325
- * prominent and receive the user's full attention. They often feature a
326
- * close button or an overlay click outside the modal to dismiss them and
327
- * return to the underlying content. Modals help to focus user attention and
328
- * provide a context-specific interaction within a larger interface.
329
- */
330
- modal: 2e3,
331
- /**
332
- * A dropdown is a user interface component that presents a list of
333
- * selectable options when triggered by a user action, such as clicking on a
334
- * dropdown button or input field. When activated, a dropdown expands
335
- * vertically to reveal a list of choices, allowing the user to select a
336
- * single option. The selected option is then displayed in the closed state
337
- * of the dropdown. Dropdowns are commonly used to conserve space on a page
338
- * or provide a convenient way to choose from a predefined set of options.
339
- * They can be found in various contexts, such as navigation menus, form
340
- * inputs, or filter controls. Dropdowns enhance user interaction by
341
- * providing a compact and organized selection mechanism within the interface.
342
- */
343
- dropdown: 3e3,
344
- /**
345
- * A popover is a user interface component that provides contextual
346
- * information or options when triggered by a user action, such as hovering
347
- * over an element or clicking a button. It typically appears as a small
348
- * overlay near the triggering element, offering additional details, actions,
349
- * or related content. Popovers are designed to be non-intrusive and provide
350
- * concise information or quick actions without requiring the user to
351
- * navigate to a different page or screen. They are often used to enhance the
352
- * user's understanding or provide supplementary functionality within a
353
- * specific context. Popovers are commonly positioned above other elements in
354
- * the interface to ensure visibility and accessibility.
355
- */
356
- popover: 4e3,
357
- /**
358
- * A tooltip is a small, informative message or hint that appears when a user
359
- * hovers over or interacts with an element, such as a button, link, or icon.
360
- * It is typically displayed as a brief, contextual text or label that
361
- * provides additional information or clarifies the purpose of the element.
362
- * Tooltips are used to improve the user's understanding of interface
363
- * elements and enhance usability. They are generally positioned near the
364
- * associated element, often appearing as a small box or bubble that pops up
365
- * temporarily and disappears when the user moves the cursor away from the
366
- * element. Tooltips are designed to be unobtrusive and provide helpful
367
- * guidance or supplementary details without requiring the user to take any
368
- * additional actions.
369
- */
370
- tooltip: 5e3,
371
- /**
372
- * A toast is a brief, temporary notification or message that appears on the
373
- * screen to provide important information or alerts to the user. It
374
- * typically appears as a small box or banner positioned in a non-intrusive
375
- * area of the interface, such as the top or bottom of the screen. Toasts are
376
- * used to communicate updates, notifications, or status messages that may
377
- * require the user's attention but do not require immediate action. They are
378
- * designed to be unobtrusive and automatically disappear after a short
379
- * period, often with a fade-out animation. Toasts are commonly used in web
380
- * and mobile applications to provide timely feedback or inform the user
381
- * about completed actions, errors, or system updates.
382
- */
383
- toast: 6e3
384
- };
385
-
386
- // src/themes/Bruttal/BruttalTheme.ts
387
- var coreFonts = {
388
- main: '"Atkinson Hyperlegible", sans-serif',
389
- contrast: '"Work Sans", sans-serif',
390
- monospace: '"Inconsolata", sans-serif'
391
- };
392
- var brandColors = {
393
- complimentary: "#f4f3f3",
394
- main: "#292C2a",
395
- darkNeutral: "#325C82",
396
- accent: "#0469E3",
397
- lightNeutral: "#F8F8F8"
398
- };
399
- var coreColors = {
400
- ...brandColors,
401
- gray100: "#f9f9f9",
402
- gray200: "#dedede",
403
- gray300: "#c4c4c4",
404
- gray400: "#ababab",
405
- gray500: "#929292",
406
- gray600: "#7a7a7a",
407
- gray700: "#626262",
408
- gray800: "#4c4c4c",
409
- gray900: "#323232",
410
- black: "#000000",
411
- red100: "#ffebeb",
412
- red200: "#fdbfbf",
413
- red300: "#f99595",
414
- red400: "#f56c6c",
415
- red500: "#ef4444",
416
- red600: "#e42828",
417
- red700: "#c62121",
418
- white: "#ffffff",
419
- amber600: "#d97706",
420
- teal600: "#0d9488"
421
- };
422
- var coreBorders = {
423
- none: "0px solid",
424
- thin: "1px solid",
425
- medium: "2px solid",
426
- thick: "4px solid"
427
- };
428
- var coreRadii = {
429
- sharp: "0px",
430
- xs: "2px",
431
- sm: "4px",
432
- md: "6px",
433
- lg: "8px",
434
- xl: "12px",
435
- "2xl": "16px",
436
- "3xl": "24px",
437
- circle: "9999px"
438
- };
439
- var BruttalTheme = {
440
- /**
441
- * Tokens
442
- */
443
- fontSizes,
444
- fontWeights,
445
- letterSpacings,
446
- space,
447
- lineHeights,
448
- zIndices,
449
- colors: {
450
- background: coreColors.complimentary,
451
- text: coreColors.black,
452
- muted: coreColors.gray200,
453
- onMuted: coreColors.gray600,
454
- mutedOutline: coreColors.gray300,
455
- danger: coreColors.red700,
456
- onDanger: coreColors.white,
457
- notice: coreColors.amber600,
458
- onNotice: coreColors.white,
459
- positive: coreColors.teal600,
460
- onPositive: coreColors.white,
461
- surface: coreColors.white,
462
- contentHeader: coreColors.gray200,
463
- onContentHeader: coreColors.black,
464
- outline: coreColors.gray500,
465
- primary: coreColors.main,
466
- onPrimary: coreColors.white,
467
- secondary: coreColors.gray100,
468
- onSecondary: coreColors.black,
469
- highlight: coreColors.darkNeutral,
470
- onHighlight: coreColors.complimentary,
471
- accent: coreColors.accent,
472
- onAccent: coreColors.white,
473
- neutral: coreColors.darkNeutral,
474
- onNeutral: coreColors.lightNeutral,
475
- underemphasize: coreColors.gray300
476
- },
477
- fonts: {
478
- main: coreColors.main,
479
- contrast: coreFonts.contrast,
480
- body: coreFonts.main,
481
- highlight: coreFonts.main,
482
- caption: coreFonts.main
483
- },
484
- borders: {
485
- default: coreBorders.thin,
486
- secondary: coreBorders.medium,
487
- muted: coreBorders.thin,
488
- interaction: coreBorders.medium,
489
- danger: coreBorders.medium,
490
- highlight: coreBorders.medium
491
- },
492
- radii: {
493
- informative: coreRadii.xs,
494
- default: coreRadii.sm,
495
- action: coreRadii.sm
496
- },
497
- /**
498
- * Global styles
499
- */
500
- styles: {
501
- root: {
502
- fontFamily: "body",
503
- fontWeight: "normal",
504
- fontSize: "base",
505
- zIndex: "base",
506
- margin: 0,
507
- padding: 0,
508
- backgroundColor: "background",
509
- /**
510
- * HTML elements
511
- */
512
- table: {
513
- borderCollapse: "collapse"
514
- },
515
- th: {
516
- paddingX: "md",
517
- paddingY: "md"
518
- },
519
- tr: {
520
- borderBottom: "default"
521
- },
522
- td: {
523
- paddingX: "xl",
524
- paddingY: "md"
525
- }
526
- },
527
- a: {
528
- color: "text",
529
- fontFamily: "body",
530
- textDecorationLine: "underline",
531
- lineHeight: "base",
532
- "&.quiet:not(:hover)": {
533
- textDecorationLine: "none"
534
- },
535
- ":visited": {
536
- color: "highlight"
537
- }
538
- }
539
- },
540
- /**
541
- * Components
542
- */
543
- badges: {
544
- positive: {
545
- color: "onPositive",
546
- bg: "positive"
547
- },
548
- negative: {
549
- color: "onDanger",
550
- bg: "danger"
551
- },
552
- neutral: {
553
- color: "onSecondary",
554
- bg: "secondary",
555
- border: "muted",
556
- borderColor: "onMuted"
557
- },
558
- informative: {
559
- color: "onNotice",
560
- bg: "notice"
561
- },
562
- muted: {
563
- color: "onMuted",
564
- bg: "muted"
565
- }
566
- },
567
- buttons: {
568
- accent: {
569
- backgroundColor: "accent",
570
- color: "onAccent",
571
- borderRadius: "action",
572
- borderColor: "accent",
573
- ":hover:not(:active,[disabled])": {
574
- filter: "brightness(90%)"
575
- },
576
- ":disabled": {
577
- cursor: "default",
578
- backgroundColor: "muted",
579
- borderColor: "muted",
580
- color: "onMuted"
581
- }
582
- },
583
- primary: {
584
- backgroundColor: "primary",
585
- color: "onPrimary",
586
- borderRadius: "action",
587
- borderColor: "primary",
588
- ":hover:not(:active,[disabled])": {
589
- filter: "brightness(90%)"
590
- },
591
- ":active": {
592
- backgroundColor: "primary",
593
- color: "onPrimary",
594
- borderColor: "outline"
595
- },
596
- ":disabled": {
597
- cursor: "default",
598
- backgroundColor: "muted",
599
- borderColor: "muted",
600
- color: "onMuted"
601
- }
602
- },
603
- secondary: {
604
- backgroundColor: "secondary",
605
- color: "onSecondary",
606
- borderRadius: "action",
607
- border: "secondary",
608
- borderColor: "onSecondary",
609
- ":hover:not(:active,[disabled])": {
610
- filter: "brightness(90%)"
611
- },
612
- ":disabled": {
613
- cursor: "default",
614
- backgroundColor: "muted",
615
- borderColor: "muted",
616
- color: "onMuted"
617
- }
618
- },
619
- destructive: {
620
- color: "onDanger",
621
- backgroundColor: "danger",
622
- ":hover:not(:active,[disabled])": {
623
- filter: "brightness(90%)"
624
- },
625
- ":disabled": {
626
- cursor: "default",
627
- backgroundColor: "muted",
628
- borderColor: "muted",
629
- color: "onMuted"
630
- }
631
- },
632
- closeButton: {
633
- backgroundColor: "background",
634
- color: "primary",
635
- border: "default",
636
- borderColor: "primary",
637
- borderRadius: "action",
638
- ":disabled": {
639
- border: "muted",
640
- borderColor: "onMuted",
641
- backgroundColor: "muted",
642
- color: "onMuted",
643
- cursor: "not-allowed"
644
- },
645
- ":is(:focus-within, :hover):not(:disabled)": {
646
- color: "onHighlight",
647
- backgroundColor: "highlight",
648
- borderColor: "highlight"
649
- }
650
- },
651
- actionButton: {
652
- default: {
653
- backgroundColor: "secondary",
654
- color: "onSecondary",
655
- border: "default",
656
- borderColor: "onSecondary",
657
- transition: "all 0.2s",
658
- ":is(:focus-within, :hover)": {
659
- backgroundColor: "highlight",
660
- borderColor: "highlight",
661
- color: "onHighlight"
662
- }
663
- },
664
- accent: {
665
- backgroundColor: "accent",
666
- color: "onAccent",
667
- border: "none"
668
- },
669
- quiet: {
670
- backgroundColor: "transparent",
671
- color: "text",
672
- border: "none",
673
- borderColor: "transparent"
674
- }
675
- }
676
- },
677
- cards: {
678
- primary: {
679
- backgroundColor: "primary",
680
- border: "1px solid black",
681
- padding: [4, 5],
682
- display: "flex",
683
- flexDirection: "column",
684
- alignItems: "center",
685
- width: "fit-content"
686
- }
687
- },
688
- forms: {
689
- label: {
690
- color: "text",
691
- '&:is([aria-disabled="true"])': {
692
- color: "onMuted"
693
- },
694
- '& > span[aria-label="tooltip"]': {
695
- fontSize: "sm",
696
- marginLeft: "2xs"
697
- },
698
- '&:has(input[type="checkbox"])': {
699
- fontSize: "base",
700
- gap: "md"
701
- },
702
- '& > div:has(input[type="checkbox"]) > svg': {
703
- marginRight: 0
704
- },
705
- '&:has(input[type="checkbox"]:disabled)': {
706
- color: "onMuted"
707
- },
708
- '&:has(div > input[type="radio"])': {
709
- alignItems: "center"
710
- },
711
- '&:has(div > input[type="radio"]:disabled)': {
712
- color: "muted"
713
- }
714
- },
715
- radio: {
716
- color: "text",
717
- fontFamily: "body",
718
- fontSize: "lg",
719
- "input:disabled ~ &": {
720
- color: "muted"
721
- },
722
- 'input[aria-invalid="true"] ~ &': {
723
- color: "danger"
724
- },
725
- "input:focus ~ &": {
726
- bg: "transparent"
727
- },
728
- "&:is(svg, svg + svg)": {
729
- width: fontSizes.base,
730
- height: fontSizes.base
731
- }
732
- },
733
- checkbox: {
734
- "input:focus ~ &": {
735
- bg: "transparent"
736
- },
737
- "input:not(:checked) ~ &": {
738
- color: "primary"
739
- },
740
- "input:disabled ~ &": {
741
- color: "muted"
742
- },
743
- "input:disabled ~ & path": {
744
- backgroundColor: "onMuted"
745
- },
746
- 'input[aria-invalid="true"] ~ &': {
747
- color: "danger"
748
- },
749
- "&:is(svg, svg + svg)": {
750
- width: fontSizes.base,
751
- height: fontSizes.base
752
- }
753
- },
754
- input: {
755
- color: "text",
756
- border: "interaction",
757
- borderColor: "onMuted",
758
- borderRadius: "action",
759
- backgroundColor: "surface",
760
- fontSize: "base",
761
- lineHeight: "base",
762
- "::placeholder": {
763
- color: "onMuted"
764
- },
765
- ":focus-within": {
766
- outlineColor: "neutral"
767
- },
768
- ":disabled": {
769
- backgroundColor: "muted",
770
- color: "onMuted",
771
- border: "muted",
772
- borderColor: "onMuted"
773
- },
774
- '&[aria-invalid="true"]': {
775
- borderColor: "danger"
776
- },
777
- '&[aria-invalid="true"] ~ span:has(iconify-icon)': {
778
- color: "danger"
779
- }
780
- },
781
- inputNumber: {
782
- color: "text",
783
- border: "interaction",
784
- borderColor: "onMuted",
785
- borderRadius: "action",
786
- ":disabled": {
787
- border: "muted",
788
- borderColor: "onMuted",
789
- color: "muted"
790
- },
791
- ":disabled ~ span > iconify-icon": {
792
- color: "muted",
793
- cursor: "default"
794
- },
795
- ":focus-within": {
796
- outlineColor: "highlight"
797
- },
798
- ':not(:disabled, [aria-invalid="true"]):hover': {
799
- borderColor: "highlight"
800
- },
801
- ':not(:disabled, [aria-invalid="true"]) ~ span:has(iconify-icon):hover': {
802
- color: "highlight"
803
- },
804
- "& ~ span:has(iconify-icon)": {
805
- fontSize: "base"
806
- },
807
- '&[aria-invalid="true"]': {
808
- border: "danger",
809
- borderColor: "danger",
810
- color: "danger",
811
- outlineColor: "danger"
812
- },
813
- '&[aria-invalid="true"] ~ span>iconify-icon': {
814
- color: "danger"
815
- }
816
- },
817
- select: {
818
- color: "text",
819
- backgroundColor: "surface",
820
- border: "interaction",
821
- borderColor: "onMuted",
822
- borderRadius: "action",
823
- ":disabled": {
824
- border: "muted",
825
- borderColor: "onMuted",
826
- backgroundColor: "muted",
827
- color: "onMuted"
828
- },
829
- ":disabled ~ * > span:has(iconify-icon)": {
830
- color: "onMuted"
831
- },
832
- '&[aria-invalid="true"]': {
833
- border: "danger",
834
- borderColor: "danger",
835
- outlineColor: "danger"
836
- },
837
- '&[aria-invalid="true"] ~ * > span.error-icon': {
838
- color: "danger"
839
- }
840
- },
841
- textarea: {
842
- color: "text",
843
- border: "interaction",
844
- borderColor: "onMuted",
845
- backgroundColor: "surface",
846
- borderRadius: "action",
847
- ":focus-within": {
848
- outlineColor: "primary"
849
- },
850
- ":disabled::placeholder": {
851
- color: "onMuted"
852
- },
853
- ":disabled": {
854
- borderColor: "onMuted",
855
- backgroundColor: "muted",
856
- border: "muted",
857
- color: "onMuted"
858
- },
859
- '&[aria-invalid="true"]': {
860
- borderColor: "danger",
861
- outlineColor: "danger"
862
- },
863
- '&[aria-invalid="true"]+span>iconify-icon': {
864
- color: "danger",
865
- fontSize: "base"
866
- }
867
- }
868
- },
869
- text: {
870
- default: {
871
- color: "text",
872
- fontFamily: "body"
873
- },
874
- title: {
875
- fontFamily: "heading",
876
- fontSize: 4,
877
- lineSpace: "3.5"
878
- },
879
- help: {
880
- color: "text",
881
- '&[aria-disabled="true"]': {
882
- color: "onMuted"
883
- },
884
- negative: {
885
- color: "danger",
886
- '&[aria-disabled="true"]': {
887
- color: "onMuted"
888
- }
889
- }
890
- },
891
- headline: {
892
- fontFamily: "contrast",
893
- fontWeight: "bold",
894
- lineHeight: "flat",
895
- fontSize: "5xl",
896
- letterSpacing: "regular"
897
- },
898
- subheadline: {
899
- fontFamily: "main",
900
- fontWeight: "bold",
901
- lineHeight: "base",
902
- fontSize: "xl",
903
- letterSpacing: "regular"
904
- },
905
- h1: {
906
- fontFamily: "contrast",
907
- fontWeight: "extrabold",
908
- lineHeight: "base",
909
- fontSize: "3xl",
910
- letterSpacing: "regular"
911
- },
912
- h2: {
913
- fontFamily: "contrast",
914
- fontWeight: "bold",
915
- lineHeight: "base",
916
- fontSize: "2xl",
917
- letterSpacing: "regular"
918
- },
919
- h3: {
920
- fontFamily: "contrast",
921
- fontWeight: "bold",
922
- lineHeight: "base",
923
- fontSize: "xl",
924
- letterSpacing: "regular"
925
- },
926
- h4: {
927
- fontFamily: "contrast",
928
- fontWeight: "semibold",
929
- lineHeight: "base",
930
- fontSize: "lg",
931
- letterSpacing: "regular"
932
- },
933
- h5: {
934
- fontFamily: "contrast",
935
- fontWeight: "semibold",
936
- lineHeight: "base",
937
- fontSize: "base",
938
- letterSpacing: "regular"
939
- }
940
- }
941
- };
942
-
943
- // src/createTheme.ts
944
- var import_deepmerge = __toESM(require("deepmerge"));
945
- var createTheme = theme => {
946
- return (0, import_deepmerge.default)(BruttalTheme, theme);
947
- };
948
- // Annotate the CommonJS export names for ESM import in node:
949
- 0 && (module.exports = {
950
- createTheme
951
- });