@stamcat/craftsman 0.0.23-alpha.9 → 0.0.23
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/AGENTS.md +216 -6
- package/Components.d.ts +2 -0
- package/Components.esm.js +20 -5
- package/Styles.d.ts +2 -0
- package/Styles.esm.js +8 -0
- package/Utilities.d.ts +2 -0
- package/Utilities.esm.js +2 -0
- package/_virtual/_rolldown/runtime.esm.js +11 -0
- package/package.json +42 -15
- package/{components → src/components}/Button.d.ts +2 -2
- package/src/components/Button.esm.js +23 -16
- package/src/components/Button.module.css +1 -0
- package/src/components/Button.module.esm.js +9 -0
- package/src/components/Button.module.scss +5 -0
- package/src/components/Checkbox.d.ts +7 -0
- package/src/components/Checkbox.esm.js +10 -0
- package/src/components/Input.d.ts +11 -0
- package/src/components/Input.esm.js +38 -3
- package/src/components/Input.module.css +1 -0
- package/src/components/Input.module.esm.js +11 -0
- package/src/components/Input.module.scss +141 -0
- package/src/components/InputPassword.d.ts +6 -0
- package/src/components/InputPassword.esm.js +32 -0
- package/{components → src/components}/Loader.d.ts +1 -2
- package/src/components/Loader.esm.js +15 -14
- package/{components → src/components}/Modal.d.ts +2 -3
- package/src/components/Modal.esm.js +40 -135
- package/src/components/Modal.module.css +1 -0
- package/src/components/Modal.module.esm.js +13 -0
- package/src/components/Modal.module.scss +133 -0
- package/src/components/RadioButton.d.ts +7 -0
- package/src/components/RadioButton.esm.js +10 -0
- package/{components → src/components}/index.d.ts +3 -0
- package/src/styles/components/ThemeProvider.d.ts +7 -0
- package/src/styles/components/ThemeProvider.esm.js +8 -0
- package/src/styles/global/components/_button.scss +64 -0
- package/src/styles/global/components/_checkbox.scss +78 -0
- package/src/styles/global/components/_code.scss +19 -0
- package/src/styles/global/components/_input.scss +46 -0
- package/src/styles/global/components/_mixins.scss +2 -0
- package/src/styles/global/components/_modal.scss +9 -0
- package/src/styles/global/components/_radioButton.scss +33 -0
- package/src/styles/global/components/_typography.scss +7 -0
- package/{styles → src/styles}/global/components/button.d.ts +1 -2
- package/{styles → src/styles}/global/components/loaders.d.ts +3 -5
- package/src/styles/global/components/loaders.esm.js +44 -55
- package/src/styles/global/components/loaders.module.css +1 -1
- package/src/styles/global/components/loaders.module.esm.js +15 -19
- package/src/styles/global/components/loaders.module.scss +73 -67
- package/src/styles/global/globalStyles.d.ts +1 -0
- package/src/styles/global/globalStyles.esm.js +4 -0
- package/src/styles/global/globalStyles.module.scss +129 -0
- package/src/styles/global/variables.esm.js +11 -0
- package/src/styles/index.d.ts +7 -0
- package/src/styles/theme/components.esm.js +12 -0
- package/src/styles/theme/constants.esm.js +4 -0
- package/src/styles/theme/theme.d.ts +2 -0
- package/src/styles/theme/theme.esm.js +56 -0
- package/{styles → src/styles}/theme/types.d.ts +10 -3
- package/src/styles/theme/utilities.d.ts +3 -0
- package/src/styles/theme/utilities.esm.js +48 -0
- package/src/styles/utilities/color.d.ts +174 -0
- package/src/styles/utilities/color.esm.js +4 -8
- package/src/styles/utilities/constants.d.ts +172 -0
- package/src/styles/utilities/constants.esm.js +175 -71
- package/{styles → src/styles}/utilities/layout.d.ts +6 -4
- package/src/styles/utilities/layout.esm.js +28 -29
- package/src/styles/utilities/types.d.ts +85 -0
- package/src/styles/utilities/types.esm.js +54 -0
- package/src/utilities/index.d.ts +1 -0
- package/src/utilities/validations.esm.js +9 -0
- package/components/Input.d.ts +0 -2
- package/src/styles/utilities/config.esm.js +0 -25
- package/stories/Button.stories.d.ts +0 -15
- package/stories/Colors.stories.d.ts +0 -5
- package/stories/Icons.stories.d.ts +0 -36
- package/stories/Loaders.stories.d.ts +0 -6
- package/stories/Modal.stories.d.ts +0 -8
- package/stories/Toastify.stories.d.ts +0 -7
- package/stories/Typography.stories.d.ts +0 -6
- package/styles/global/components/code.d.ts +0 -1
- package/styles/global/components/typography.d.ts +0 -11
- package/styles/global/globalStyles.d.ts +0 -1
- package/styles/theme/theme.d.ts +0 -8
- package/styles/theme/utilities.d.ts +0 -2
- package/styles/utilities/color.d.ts +0 -5
- package/styles/utilities/config.d.ts +0 -7
- package/styles/utilities/constants.d.ts +0 -77
- package/styles/utilities/types.d.ts +0 -17
- /package/{components → src/components}/Progress.d.ts +0 -0
- /package/{main.d.ts → src/main.d.ts} +0 -0
- /package/{styles → src/styles}/global/variables.d.ts +0 -0
- /package/{styles → src/styles}/theme/components.d.ts +0 -0
- /package/{styles → src/styles}/theme/constants.d.ts +0 -0
- /package/{utilities → src/utilities}/validations.d.ts +0 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
@use "./components/typography";
|
|
2
|
+
@use "./components/code";
|
|
3
|
+
@use "./components/mixins" as mixins;
|
|
4
|
+
@use "./components/checkbox";
|
|
5
|
+
@use "./components/radioButton";
|
|
6
|
+
@use "./components/button";
|
|
7
|
+
@use "./components/input";
|
|
8
|
+
|
|
9
|
+
:global {
|
|
10
|
+
:root {
|
|
11
|
+
color-scheme: light dark;
|
|
12
|
+
font-synthesis: none;
|
|
13
|
+
text-rendering: optimizeLegibility;
|
|
14
|
+
-webkit-font-smoothing: antialiased;
|
|
15
|
+
-moz-osx-font-smoothing: grayscale;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
::-webkit-scrollbar {
|
|
19
|
+
width: 4px;
|
|
20
|
+
height: 4px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
::-webkit-scrollbar-track {
|
|
24
|
+
background: #ddd;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
::-webkit-scrollbar-thumb {
|
|
28
|
+
background: #000;
|
|
29
|
+
border-radius: 6px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
::-webkit-scrollbar-thumb:hover {
|
|
33
|
+
background: #555;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
body {
|
|
37
|
+
@extend %body-typography;
|
|
38
|
+
}
|
|
39
|
+
body,
|
|
40
|
+
ul {
|
|
41
|
+
margin: 0;
|
|
42
|
+
padding: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
body {
|
|
46
|
+
background-color: #fff;
|
|
47
|
+
-webkit-overflow-scrolling: touch;
|
|
48
|
+
overscroll-behavior: contain;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
fieldset {
|
|
52
|
+
padding: 0;
|
|
53
|
+
border: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
code {
|
|
57
|
+
@extend %code;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
button {
|
|
61
|
+
@extend %button-styles;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
input {
|
|
65
|
+
@extend %input-base;
|
|
66
|
+
|
|
67
|
+
&[type="radio"] {
|
|
68
|
+
@extend %radio;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&[type="checkbox"] {
|
|
72
|
+
@extend %checkbox;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
a {
|
|
77
|
+
@extend %text-link;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
h1 {
|
|
81
|
+
font-size: calc(var(--w-text, 14px) * 3.125);
|
|
82
|
+
line-height: 1.2;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
h2 {
|
|
86
|
+
font-size: calc(var(--w-text, 14px) * 2.625);
|
|
87
|
+
font-weight: 625;
|
|
88
|
+
line-height: 1.1;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
h3 {
|
|
92
|
+
font-size: calc(var(--w-text, 14px) * 1.625);
|
|
93
|
+
line-height: 1.1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
h4 {
|
|
97
|
+
font-size: calc(var(--w-text, 14px) * 1.25);
|
|
98
|
+
line-height: 1.1;
|
|
99
|
+
margin: calc(var(--w-gutter, 16px) * 0.5) 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
h5 {
|
|
103
|
+
font-size: var(--w-text, 14px);
|
|
104
|
+
line-height: 1.2;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
h6 {
|
|
108
|
+
font-size: calc(var(--w-text, 14px) * 0.875);
|
|
109
|
+
line-height: 1.2;
|
|
110
|
+
font-weight: 600;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
p {
|
|
114
|
+
font-style: normal;
|
|
115
|
+
font-size: var(--w-text, 14px);
|
|
116
|
+
line-height: 1.5;
|
|
117
|
+
margin: 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@media (max-width: 659.99999px) {
|
|
121
|
+
h4 {
|
|
122
|
+
font-size: var(--w-text, 14px);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
p {
|
|
126
|
+
font-size: calc(var(--w-text, 14px) * 0.875);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defaultWidths as e } from "../utilities/constants.esm.js";
|
|
2
|
+
import { colors as t } from "../utilities/color.esm.js";
|
|
3
|
+
//#region src/styles/global/variables.ts
|
|
4
|
+
var n = {
|
|
5
|
+
...e,
|
|
6
|
+
mobileMax: e.tablet - 1e-5,
|
|
7
|
+
tabletMax: e.desktop - 1e-5,
|
|
8
|
+
desktopMax: e.extDesktop - 1e-5
|
|
9
|
+
}, r = Object.entries(t).map(([e, t]) => `--${e}: ${t};`).join("\n"), i = Object.entries(n).map(([e, t]) => `--w-${e}: ${t}px;`).join("\n");
|
|
10
|
+
//#endregion
|
|
11
|
+
export { r as colors, i as widths };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './utilities/color';
|
|
2
|
+
export * from './utilities/constants';
|
|
3
|
+
export * from './utilities/layout';
|
|
4
|
+
export * from './utilities/types';
|
|
5
|
+
export * from './theme/theme';
|
|
6
|
+
export * from './global/globalStyles';
|
|
7
|
+
export { ThemeProvider } from './components/ThemeProvider';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { htmlTagNames as e } from "./constants.esm.js";
|
|
2
|
+
import { components_exports as t } from "../../../Components.esm.js";
|
|
3
|
+
//#region src/styles/theme/components.ts
|
|
4
|
+
function n(e) {
|
|
5
|
+
return e.charAt(0).toLowerCase() + e.slice(1);
|
|
6
|
+
}
|
|
7
|
+
function r(t) {
|
|
8
|
+
return e.has(t) ? `${t}, .${t}` : `.${t}`;
|
|
9
|
+
}
|
|
10
|
+
var i = Object.keys(t).map(n), a = Object.fromEntries(i.map((e) => [e, r(e)]));
|
|
11
|
+
//#endregion
|
|
12
|
+
export { a as componentSelectors };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region src/styles/theme/constants.ts
|
|
2
|
+
var e = /* @__PURE__ */ new Set(/* @__PURE__ */ "a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.link.main.map.mark.menu.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.slot.small.source.span.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr".split("."));
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as htmlTagNames };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { componentSelectors as e } from "./components.esm.js";
|
|
2
|
+
import { cssObjectToCssText as t, toCSSObject as n } from "./utilities.esm.js";
|
|
3
|
+
import { colors as r, widths as i } from "../global/variables.esm.js";
|
|
4
|
+
//#region src/styles/theme/theme.ts
|
|
5
|
+
var a = /* @__PURE__ */ new Map();
|
|
6
|
+
function o(e) {
|
|
7
|
+
if (typeof document > "u") return;
|
|
8
|
+
let t = `.${e}`, n = {}, r = !1, i = (e) => {
|
|
9
|
+
for (let a of Array.from(e)) {
|
|
10
|
+
if (a instanceof CSSStyleRule) {
|
|
11
|
+
if (!a.selectorText.split(",").map((e) => e.trim()).includes(t)) continue;
|
|
12
|
+
r = !0;
|
|
13
|
+
for (let e of Array.from(a.style)) n[e] = a.style.getPropertyValue(e);
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
a instanceof CSSGroupingRule && i(a.cssRules);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
for (let e of Array.from(document.styleSheets)) try {
|
|
20
|
+
e.cssRules && i(e.cssRules);
|
|
21
|
+
} catch {}
|
|
22
|
+
return r ? n : void 0;
|
|
23
|
+
}
|
|
24
|
+
function s(e) {
|
|
25
|
+
if (a.has(e)) return a.get(e) ?? void 0;
|
|
26
|
+
let t = o(e);
|
|
27
|
+
return a.set(e, t ?? null), t;
|
|
28
|
+
}
|
|
29
|
+
function c(r) {
|
|
30
|
+
let i = [];
|
|
31
|
+
return Object.keys(e).forEach((a) => {
|
|
32
|
+
let o = r?.[a];
|
|
33
|
+
if (o) {
|
|
34
|
+
if (typeof o == "string") {
|
|
35
|
+
let n = s(o);
|
|
36
|
+
if (!n) return;
|
|
37
|
+
i.push(t(e[a], n));
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
i.push(t(e[a], n(o)));
|
|
41
|
+
}
|
|
42
|
+
}), i;
|
|
43
|
+
}
|
|
44
|
+
function l(e) {
|
|
45
|
+
let a = t(":root", {
|
|
46
|
+
...e.colors || {},
|
|
47
|
+
...e.root ? n(e.root) : {}
|
|
48
|
+
});
|
|
49
|
+
return [
|
|
50
|
+
`:root { ${i} ${r} }`,
|
|
51
|
+
a,
|
|
52
|
+
...c(e.components)
|
|
53
|
+
].filter(Boolean).join("\n");
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { l as themeBuilder };
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
import { CSSObject, SerializedStyles } from '@emotion/react';
|
|
2
1
|
import { ColorKey } from '../utilities/color';
|
|
3
2
|
import { componentSelectors } from './components';
|
|
4
3
|
export type ColorVariableName = `--${ColorKey}`;
|
|
4
|
+
export type CSSObject = {
|
|
5
|
+
[key: string]: string | number | CSSObject | undefined;
|
|
6
|
+
};
|
|
7
|
+
export type LegacySerializedStyles = {
|
|
8
|
+
name: string;
|
|
9
|
+
styles: string;
|
|
10
|
+
next?: LegacySerializedStyles;
|
|
11
|
+
};
|
|
5
12
|
export type RegisteredComponent = keyof typeof componentSelectors;
|
|
6
13
|
export type ComponentThemeOverrides = {
|
|
7
|
-
[K in RegisteredComponent]?: CSSObject |
|
|
14
|
+
[K in RegisteredComponent]?: CSSObject | LegacySerializedStyles | string;
|
|
8
15
|
};
|
|
9
16
|
export type Colors = Partial<Record<ColorVariableName, string>>;
|
|
10
17
|
export type Theme = {
|
|
11
18
|
colors?: Colors;
|
|
12
|
-
root?: CSSObject |
|
|
19
|
+
root?: CSSObject | LegacySerializedStyles;
|
|
13
20
|
components?: ComponentThemeOverrides;
|
|
14
21
|
};
|
|
15
22
|
export type ThemeProviderProps = {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//#region src/styles/theme/utilities.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return "styles" in e && "name" in e;
|
|
4
|
+
}
|
|
5
|
+
function t(e) {
|
|
6
|
+
let t = {}, n = e;
|
|
7
|
+
for (; n;) {
|
|
8
|
+
let e = n.styles.split(";").map((e) => e.trim()).filter((e) => e && !e.startsWith("label:"));
|
|
9
|
+
for (let n of e) {
|
|
10
|
+
let e = n.indexOf(":");
|
|
11
|
+
if (e === -1) continue;
|
|
12
|
+
let r = n.slice(0, e).trim(), i = n.slice(e + 1).trim();
|
|
13
|
+
if (!r || !i) continue;
|
|
14
|
+
let a = r.replace(/-([a-z])/g, (e, t) => t.toUpperCase());
|
|
15
|
+
t[a] = i;
|
|
16
|
+
}
|
|
17
|
+
n = n.next;
|
|
18
|
+
}
|
|
19
|
+
return t;
|
|
20
|
+
}
|
|
21
|
+
function n(n) {
|
|
22
|
+
return e(n) ? t(n) : n;
|
|
23
|
+
}
|
|
24
|
+
function r(e) {
|
|
25
|
+
return e.startsWith("--") ? e : e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
26
|
+
}
|
|
27
|
+
function i(e, t) {
|
|
28
|
+
return t.startsWith("&") ? t.replace(/&/g, e) : t.startsWith(":") || t.startsWith("[") ? `${e}${t}` : (/^[>+~]/.test(t), `${e} ${t}`);
|
|
29
|
+
}
|
|
30
|
+
function a(e, t) {
|
|
31
|
+
let n = [], o = [];
|
|
32
|
+
for (let [s, c] of Object.entries(t)) if (c !== void 0) {
|
|
33
|
+
if (typeof c == "object") {
|
|
34
|
+
let t = c;
|
|
35
|
+
if (s.startsWith("@")) {
|
|
36
|
+
o.push(`${s} { ${a(e, t)} }`);
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
let n = i(e, s);
|
|
40
|
+
o.push(a(n, t));
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
n.push(`${r(s)}: ${String(c)};`);
|
|
44
|
+
}
|
|
45
|
+
return [n.length > 0 ? `${e} { ${n.join(" ")} }` : "", ...o].filter(Boolean).join("\n");
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { a as cssObjectToCssText, n as toCSSObject };
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { ColorType } from './types';
|
|
2
|
+
export declare const colors: {
|
|
3
|
+
red990: string;
|
|
4
|
+
red950: string;
|
|
5
|
+
red925: string;
|
|
6
|
+
red900: string;
|
|
7
|
+
red850: string;
|
|
8
|
+
red800: string;
|
|
9
|
+
red750: string;
|
|
10
|
+
red700: string;
|
|
11
|
+
red650: string;
|
|
12
|
+
red600: string;
|
|
13
|
+
red550: string;
|
|
14
|
+
red500: string;
|
|
15
|
+
red450: string;
|
|
16
|
+
red400: string;
|
|
17
|
+
red350: string;
|
|
18
|
+
red300: string;
|
|
19
|
+
red250: string;
|
|
20
|
+
red200: string;
|
|
21
|
+
red150: string;
|
|
22
|
+
red100: string;
|
|
23
|
+
red50: string;
|
|
24
|
+
red10: string;
|
|
25
|
+
orange950: string;
|
|
26
|
+
orange900: string;
|
|
27
|
+
orange800: string;
|
|
28
|
+
orange700: string;
|
|
29
|
+
orange600: string;
|
|
30
|
+
orange500: string;
|
|
31
|
+
orange400: string;
|
|
32
|
+
orange300: string;
|
|
33
|
+
orange200: string;
|
|
34
|
+
orange100: string;
|
|
35
|
+
orange50: string;
|
|
36
|
+
yellow950: string;
|
|
37
|
+
yellow900: string;
|
|
38
|
+
yellow800: string;
|
|
39
|
+
yellow700: string;
|
|
40
|
+
yellow600: string;
|
|
41
|
+
yellow500: string;
|
|
42
|
+
yellow400: string;
|
|
43
|
+
yellow300: string;
|
|
44
|
+
yellow200: string;
|
|
45
|
+
yellow100: string;
|
|
46
|
+
yellow50: string;
|
|
47
|
+
green990: string;
|
|
48
|
+
green975: string;
|
|
49
|
+
green950: string;
|
|
50
|
+
green900: string;
|
|
51
|
+
green850: string;
|
|
52
|
+
green800: string;
|
|
53
|
+
green750: string;
|
|
54
|
+
green700: string;
|
|
55
|
+
green650: string;
|
|
56
|
+
green600: string;
|
|
57
|
+
green550: string;
|
|
58
|
+
green500: string;
|
|
59
|
+
green450: string;
|
|
60
|
+
green400: string;
|
|
61
|
+
green350: string;
|
|
62
|
+
green300: string;
|
|
63
|
+
green250: string;
|
|
64
|
+
green200: string;
|
|
65
|
+
green100: string;
|
|
66
|
+
green80: string;
|
|
67
|
+
green50: string;
|
|
68
|
+
green10: string;
|
|
69
|
+
blueGreen990: string;
|
|
70
|
+
blueGreen975: string;
|
|
71
|
+
blueGreen950: string;
|
|
72
|
+
blueGreen900: string;
|
|
73
|
+
blueGreen850: string;
|
|
74
|
+
blueGreen800: string;
|
|
75
|
+
blueGreen750: string;
|
|
76
|
+
blueGreen700: string;
|
|
77
|
+
blueGreen650: string;
|
|
78
|
+
blueGreen600: string;
|
|
79
|
+
blueGreen550: string;
|
|
80
|
+
blueGreen500: string;
|
|
81
|
+
blueGreen450: string;
|
|
82
|
+
blueGreen400: string;
|
|
83
|
+
blueGreen300: string;
|
|
84
|
+
blueGreen250: string;
|
|
85
|
+
blueGreen150: string;
|
|
86
|
+
blueGreen50: string;
|
|
87
|
+
blueGreen10: string;
|
|
88
|
+
teal900: string;
|
|
89
|
+
teal800: string;
|
|
90
|
+
teal700: string;
|
|
91
|
+
teal600: string;
|
|
92
|
+
teal500: string;
|
|
93
|
+
teal450: string;
|
|
94
|
+
teal400: string;
|
|
95
|
+
teal350: string;
|
|
96
|
+
teal300: string;
|
|
97
|
+
teal250: string;
|
|
98
|
+
teal200: string;
|
|
99
|
+
teal150: string;
|
|
100
|
+
teal100: string;
|
|
101
|
+
teal50: string;
|
|
102
|
+
blue950: string;
|
|
103
|
+
blue900: string;
|
|
104
|
+
blue800: string;
|
|
105
|
+
blue700: string;
|
|
106
|
+
blue600: string;
|
|
107
|
+
blue500: string;
|
|
108
|
+
blue400: string;
|
|
109
|
+
blue300: string;
|
|
110
|
+
blue200: string;
|
|
111
|
+
blue100: string;
|
|
112
|
+
blue50: string;
|
|
113
|
+
violet950: string;
|
|
114
|
+
violet900: string;
|
|
115
|
+
violet800: string;
|
|
116
|
+
violet700: string;
|
|
117
|
+
violet600: string;
|
|
118
|
+
violet500: string;
|
|
119
|
+
violet400: string;
|
|
120
|
+
violet300: string;
|
|
121
|
+
violet200: string;
|
|
122
|
+
violet100: string;
|
|
123
|
+
violet50: string;
|
|
124
|
+
purple950: string;
|
|
125
|
+
purple900: string;
|
|
126
|
+
purple800: string;
|
|
127
|
+
purple700: string;
|
|
128
|
+
purple600: string;
|
|
129
|
+
purple500: string;
|
|
130
|
+
purple400: string;
|
|
131
|
+
purple300: string;
|
|
132
|
+
purple200: string;
|
|
133
|
+
purple100: string;
|
|
134
|
+
purple50: string;
|
|
135
|
+
beige990: string;
|
|
136
|
+
beige900: string;
|
|
137
|
+
beige800: string;
|
|
138
|
+
beige700: string;
|
|
139
|
+
beige600: string;
|
|
140
|
+
beige500: string;
|
|
141
|
+
beige400: string;
|
|
142
|
+
beige300: string;
|
|
143
|
+
beige200: string;
|
|
144
|
+
beige100: string;
|
|
145
|
+
beige50: string;
|
|
146
|
+
gray999: string;
|
|
147
|
+
gray980: string;
|
|
148
|
+
gray950: string;
|
|
149
|
+
gray900: string;
|
|
150
|
+
gray850: string;
|
|
151
|
+
gray800: string;
|
|
152
|
+
gray750: string;
|
|
153
|
+
gray700: string;
|
|
154
|
+
gray650: string;
|
|
155
|
+
gray600: string;
|
|
156
|
+
gray550: string;
|
|
157
|
+
gray500: string;
|
|
158
|
+
gray450: string;
|
|
159
|
+
gray400: string;
|
|
160
|
+
gray350: string;
|
|
161
|
+
gray300: string;
|
|
162
|
+
gray250: string;
|
|
163
|
+
gray200: string;
|
|
164
|
+
gray150: string;
|
|
165
|
+
gray100: string;
|
|
166
|
+
gray50: string;
|
|
167
|
+
gray10: string;
|
|
168
|
+
white: string;
|
|
169
|
+
black: string;
|
|
170
|
+
text: string;
|
|
171
|
+
};
|
|
172
|
+
export type ColorKey = keyof typeof colors;
|
|
173
|
+
export declare function hexToRgba(hex: string, alpha?: number): string;
|
|
174
|
+
export declare const color: (name: ColorKey, type?: ColorType, alpha?: number) => string;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { defaultColors as e } from "./constants.esm.js";
|
|
2
|
-
import { getCraftsmanConfig as t } from "./config.esm.js";
|
|
3
2
|
//#region src/styles/utilities/color.ts
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
get: () => t().colors[n]
|
|
7
|
-
}, e), {}), r = Object.defineProperties({}, n);
|
|
8
|
-
function i(e, t = 1) {
|
|
3
|
+
var t = { ...e };
|
|
4
|
+
function n(e, t = 1) {
|
|
9
5
|
e = e.replace("#", "");
|
|
10
6
|
let n, r, i;
|
|
11
7
|
if (e.length === 6) n = Number.parseInt(e.substring(0, 2), 16), r = Number.parseInt(e.substring(2, 4), 16), i = Number.parseInt(e.substring(4, 6), 16);
|
|
@@ -14,6 +10,6 @@ function i(e, t = 1) {
|
|
|
14
10
|
else throw Error("Invalid hex color format");
|
|
15
11
|
return t = Math.max(0, Math.min(1, t)), `rgba(${n}, ${r}, ${i}, ${t})`;
|
|
16
12
|
}
|
|
17
|
-
var
|
|
13
|
+
var r = (e, t = "hex", n = 1) => t === "rgba" ? `rgb(from var(--${e}) r g b / ${n})` : `var(--${e})`;
|
|
18
14
|
//#endregion
|
|
19
|
-
export {
|
|
15
|
+
export { r as color, t as colors, n as hexToRgba };
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { LayoutWidthsType } from './types';
|
|
2
|
+
export declare const defaultColors: {
|
|
3
|
+
red990: string;
|
|
4
|
+
red950: string;
|
|
5
|
+
red925: string;
|
|
6
|
+
red900: string;
|
|
7
|
+
red850: string;
|
|
8
|
+
red800: string;
|
|
9
|
+
red750: string;
|
|
10
|
+
red700: string;
|
|
11
|
+
red650: string;
|
|
12
|
+
red600: string;
|
|
13
|
+
red550: string;
|
|
14
|
+
red500: string;
|
|
15
|
+
red450: string;
|
|
16
|
+
red400: string;
|
|
17
|
+
red350: string;
|
|
18
|
+
red300: string;
|
|
19
|
+
red250: string;
|
|
20
|
+
red200: string;
|
|
21
|
+
red150: string;
|
|
22
|
+
red100: string;
|
|
23
|
+
red50: string;
|
|
24
|
+
red10: string;
|
|
25
|
+
orange950: string;
|
|
26
|
+
orange900: string;
|
|
27
|
+
orange800: string;
|
|
28
|
+
orange700: string;
|
|
29
|
+
orange600: string;
|
|
30
|
+
orange500: string;
|
|
31
|
+
orange400: string;
|
|
32
|
+
orange300: string;
|
|
33
|
+
orange200: string;
|
|
34
|
+
orange100: string;
|
|
35
|
+
orange50: string;
|
|
36
|
+
yellow950: string;
|
|
37
|
+
yellow900: string;
|
|
38
|
+
yellow800: string;
|
|
39
|
+
yellow700: string;
|
|
40
|
+
yellow600: string;
|
|
41
|
+
yellow500: string;
|
|
42
|
+
yellow400: string;
|
|
43
|
+
yellow300: string;
|
|
44
|
+
yellow200: string;
|
|
45
|
+
yellow100: string;
|
|
46
|
+
yellow50: string;
|
|
47
|
+
green990: string;
|
|
48
|
+
green975: string;
|
|
49
|
+
green950: string;
|
|
50
|
+
green900: string;
|
|
51
|
+
green850: string;
|
|
52
|
+
green800: string;
|
|
53
|
+
green750: string;
|
|
54
|
+
green700: string;
|
|
55
|
+
green650: string;
|
|
56
|
+
green600: string;
|
|
57
|
+
green550: string;
|
|
58
|
+
green500: string;
|
|
59
|
+
green450: string;
|
|
60
|
+
green400: string;
|
|
61
|
+
green350: string;
|
|
62
|
+
green300: string;
|
|
63
|
+
green250: string;
|
|
64
|
+
green200: string;
|
|
65
|
+
green100: string;
|
|
66
|
+
green80: string;
|
|
67
|
+
green50: string;
|
|
68
|
+
green10: string;
|
|
69
|
+
blueGreen990: string;
|
|
70
|
+
blueGreen975: string;
|
|
71
|
+
blueGreen950: string;
|
|
72
|
+
blueGreen900: string;
|
|
73
|
+
blueGreen850: string;
|
|
74
|
+
blueGreen800: string;
|
|
75
|
+
blueGreen750: string;
|
|
76
|
+
blueGreen700: string;
|
|
77
|
+
blueGreen650: string;
|
|
78
|
+
blueGreen600: string;
|
|
79
|
+
blueGreen550: string;
|
|
80
|
+
blueGreen500: string;
|
|
81
|
+
blueGreen450: string;
|
|
82
|
+
blueGreen400: string;
|
|
83
|
+
blueGreen300: string;
|
|
84
|
+
blueGreen250: string;
|
|
85
|
+
blueGreen150: string;
|
|
86
|
+
blueGreen50: string;
|
|
87
|
+
blueGreen10: string;
|
|
88
|
+
teal900: string;
|
|
89
|
+
teal800: string;
|
|
90
|
+
teal700: string;
|
|
91
|
+
teal600: string;
|
|
92
|
+
teal500: string;
|
|
93
|
+
teal450: string;
|
|
94
|
+
teal400: string;
|
|
95
|
+
teal350: string;
|
|
96
|
+
teal300: string;
|
|
97
|
+
teal250: string;
|
|
98
|
+
teal200: string;
|
|
99
|
+
teal150: string;
|
|
100
|
+
teal100: string;
|
|
101
|
+
teal50: string;
|
|
102
|
+
blue950: string;
|
|
103
|
+
blue900: string;
|
|
104
|
+
blue800: string;
|
|
105
|
+
blue700: string;
|
|
106
|
+
blue600: string;
|
|
107
|
+
blue500: string;
|
|
108
|
+
blue400: string;
|
|
109
|
+
blue300: string;
|
|
110
|
+
blue200: string;
|
|
111
|
+
blue100: string;
|
|
112
|
+
blue50: string;
|
|
113
|
+
violet950: string;
|
|
114
|
+
violet900: string;
|
|
115
|
+
violet800: string;
|
|
116
|
+
violet700: string;
|
|
117
|
+
violet600: string;
|
|
118
|
+
violet500: string;
|
|
119
|
+
violet400: string;
|
|
120
|
+
violet300: string;
|
|
121
|
+
violet200: string;
|
|
122
|
+
violet100: string;
|
|
123
|
+
violet50: string;
|
|
124
|
+
purple950: string;
|
|
125
|
+
purple900: string;
|
|
126
|
+
purple800: string;
|
|
127
|
+
purple700: string;
|
|
128
|
+
purple600: string;
|
|
129
|
+
purple500: string;
|
|
130
|
+
purple400: string;
|
|
131
|
+
purple300: string;
|
|
132
|
+
purple200: string;
|
|
133
|
+
purple100: string;
|
|
134
|
+
purple50: string;
|
|
135
|
+
beige990: string;
|
|
136
|
+
beige900: string;
|
|
137
|
+
beige800: string;
|
|
138
|
+
beige700: string;
|
|
139
|
+
beige600: string;
|
|
140
|
+
beige500: string;
|
|
141
|
+
beige400: string;
|
|
142
|
+
beige300: string;
|
|
143
|
+
beige200: string;
|
|
144
|
+
beige100: string;
|
|
145
|
+
beige50: string;
|
|
146
|
+
gray999: string;
|
|
147
|
+
gray980: string;
|
|
148
|
+
gray950: string;
|
|
149
|
+
gray900: string;
|
|
150
|
+
gray850: string;
|
|
151
|
+
gray800: string;
|
|
152
|
+
gray750: string;
|
|
153
|
+
gray700: string;
|
|
154
|
+
gray650: string;
|
|
155
|
+
gray600: string;
|
|
156
|
+
gray550: string;
|
|
157
|
+
gray500: string;
|
|
158
|
+
gray450: string;
|
|
159
|
+
gray400: string;
|
|
160
|
+
gray350: string;
|
|
161
|
+
gray300: string;
|
|
162
|
+
gray250: string;
|
|
163
|
+
gray200: string;
|
|
164
|
+
gray150: string;
|
|
165
|
+
gray100: string;
|
|
166
|
+
gray50: string;
|
|
167
|
+
gray10: string;
|
|
168
|
+
white: string;
|
|
169
|
+
black: string;
|
|
170
|
+
text: string;
|
|
171
|
+
};
|
|
172
|
+
export declare const defaultWidths: Record<LayoutWidthsType, number>;
|