@guildofgleks/ui 21.3.1 → 21.3.2
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 +1149 -0
- package/README.md +134 -57
- package/TOKENS.md +63 -0
- package/fesm2022/guildofgleks-ui.mjs +665 -104
- package/fesm2022/guildofgleks-ui.mjs.map +1 -1
- package/package.json +11 -4
- package/src/styles/theme.css +20 -0
- package/styles/fonts.css +16 -0
- package/styles/index.css +17 -0
- package/styles/presets/one-dark.css +48 -0
- package/styles/presets/one-light.css +47 -0
- package/styles/presets/slate.css +55 -0
- package/styles/theme.css +1681 -0
- package/styles/typography.css +15 -0
- package/styles/utilities.css +170 -0
- package/types/guildofgleks-ui.d.ts +512 -54
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guildofgleks/ui",
|
|
3
|
-
"version": "21.3.
|
|
3
|
+
"version": "21.3.2",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20.19.0"
|
|
6
6
|
},
|
|
@@ -20,15 +20,20 @@
|
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@angular/common": "^21.2.0",
|
|
22
22
|
"@angular/core": "^21.2.0",
|
|
23
|
-
"@angular/forms": "^21.2.0"
|
|
23
|
+
"@angular/forms": "^21.2.0",
|
|
24
|
+
"@angular/platform-browser": "^21.2.0"
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
27
|
"tslib": "^2.3.0"
|
|
27
28
|
},
|
|
28
29
|
"sideEffects": false,
|
|
29
|
-
"module": "fesm2022/guildofgleks-ui.mjs",
|
|
30
|
-
"typings": "types/guildofgleks-ui.d.ts",
|
|
31
30
|
"exports": {
|
|
31
|
+
"./styles/*": {
|
|
32
|
+
"default": "./styles/*"
|
|
33
|
+
},
|
|
34
|
+
"./src/styles/*": {
|
|
35
|
+
"default": "./src/styles/*"
|
|
36
|
+
},
|
|
32
37
|
"./package.json": {
|
|
33
38
|
"default": "./package.json"
|
|
34
39
|
},
|
|
@@ -37,5 +42,7 @@
|
|
|
37
42
|
"default": "./fesm2022/guildofgleks-ui.mjs"
|
|
38
43
|
}
|
|
39
44
|
},
|
|
45
|
+
"module": "fesm2022/guildofgleks-ui.mjs",
|
|
46
|
+
"typings": "types/guildofgleks-ui.d.ts",
|
|
40
47
|
"type": "module"
|
|
41
48
|
}
|
package/src/styles/theme.css
CHANGED
|
@@ -951,7 +951,27 @@
|
|
|
951
951
|
--gog-textarea-resize-grip-opacity: 0.8;
|
|
952
952
|
--gog-textarea-resize-grip-stripe-width: 1.5px;
|
|
953
953
|
--gog-textarea-resize-grip-stripe-gap: 3px;
|
|
954
|
+
--gog-textarea-resize-grip-offset: 3px;
|
|
955
|
+
/*
|
|
956
|
+
Both default to 0 and are overwritten per instance, as an inline style on the field, from
|
|
957
|
+
the component's own ResizeObserver — they close the gap that opens once the field has been
|
|
958
|
+
dragged narrower/shorter than its container. Declared here rather than left to a `var()`
|
|
959
|
+
fallback so the grip's resting geometry is discoverable in this file like everything else;
|
|
960
|
+
an inline style outranks this declaration, so the per-instance override still wins.
|
|
961
|
+
*/
|
|
962
|
+
--gog-textarea-resize-inset-right: 0px;
|
|
963
|
+
--gog-textarea-resize-inset-bottom: 0px;
|
|
954
964
|
--gog-input-clear-inset: 8px;
|
|
965
|
+
/*
|
|
966
|
+
Width of one stepper button, and so of the whole stepper column. Scales with the field's
|
|
967
|
+
own font size rather than being a fixed px value, so it stays proportional across the five
|
|
968
|
+
sizes. Read in two places — the buttons themselves, and the offset that moves the clear
|
|
969
|
+
button clear of them on a clearable number field — which is why it is a token rather than
|
|
970
|
+
the same `calc()` written twice.
|
|
971
|
+
*/
|
|
972
|
+
--gog-input-spin-width: calc(
|
|
973
|
+
var(--gog-input-size-font-size, var(--gog-field-md-font-size)) * 1.35
|
|
974
|
+
);
|
|
955
975
|
--gog-input-float-label-reserve: var(--gog-field-float-label-reserve);
|
|
956
976
|
--gog-input-float-label-in-top: var(--gog-field-float-label-in-top);
|
|
957
977
|
--gog-input-float-label-over-gap: var(--gog-field-float-label-over-gap);
|
package/styles/fonts.css
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Optional typography preset — the families the showcase uses.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately not part of `index.css`: importing this downloads three families from
|
|
5
|
+
* Google Fonts, which a component library should not decide on its consumer's behalf.
|
|
6
|
+
* The text-size scale lives in `theme.css`; this file only re-points the font families.
|
|
7
|
+
*/
|
|
8
|
+
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&display=swap');
|
|
9
|
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');
|
|
10
|
+
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');
|
|
11
|
+
|
|
12
|
+
:root {
|
|
13
|
+
--gog-font-heading: 'Cinzel', serif;
|
|
14
|
+
--gog-font-body: 'Inter', sans-serif;
|
|
15
|
+
--gog-font-mono: 'JetBrains Mono', monospace;
|
|
16
|
+
}
|
package/styles/index.css
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The single stylesheet a @guildofgleks/ui consumer needs:
|
|
3
|
+
*
|
|
4
|
+
* @import '@guildofgleks/ui/styles/index.css';
|
|
5
|
+
*
|
|
6
|
+
* It brings the baseline theme (every token the components read), the typography helpers
|
|
7
|
+
* and the utility classes that component templates rely on — `font-body`, `font-heading`
|
|
8
|
+
* and `gog-contained-layout` are applied inside the components themselves, so without
|
|
9
|
+
* this import they resolve to nothing.
|
|
10
|
+
*
|
|
11
|
+
* `fonts.css` is deliberately NOT included: it pulls three families from Google Fonts,
|
|
12
|
+
* which a library should not impose on its consumers. Import it explicitly if you want
|
|
13
|
+
* the showcase's typography.
|
|
14
|
+
*/
|
|
15
|
+
@import './theme.css';
|
|
16
|
+
@import './typography.css';
|
|
17
|
+
@import './utilities.css';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* `one-dark` — the Atom/JetBrains One Dark palette, as a @guildofgleks/ui theme.
|
|
3
|
+
*
|
|
4
|
+
* Import it after `index.css`, then put the attribute on the root — or on any subtree:
|
|
5
|
+
*
|
|
6
|
+
* @import '@guildofgleks/ui/styles/index.css';
|
|
7
|
+
* @import '@guildofgleks/ui/styles/presets/one-dark.css';
|
|
8
|
+
*
|
|
9
|
+
* <html data-theme="one-dark">
|
|
10
|
+
*
|
|
11
|
+
* Like every preset here it declares palette tokens only — see `slate.css` for why that is
|
|
12
|
+
* enough to restyle the whole library. The syntax-highlighting hues map onto the library's
|
|
13
|
+
* semantic roles: One Dark's blue is the accent, its green/red/yellow/cyan become
|
|
14
|
+
* success/danger/warning/info.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
:root[data-theme='one-dark'],
|
|
18
|
+
[data-theme='one-dark'] {
|
|
19
|
+
color-scheme: dark;
|
|
20
|
+
|
|
21
|
+
/* Editor chrome */
|
|
22
|
+
--gog-background-color: #282c34;
|
|
23
|
+
--gog-surface-color: #21252b;
|
|
24
|
+
--gog-hover-color: #2c313a;
|
|
25
|
+
--gog-border-color: #3e4451;
|
|
26
|
+
|
|
27
|
+
/* Type */
|
|
28
|
+
--gog-text-color: #abb2bf;
|
|
29
|
+
--gog-accent-text-color: #282c34;
|
|
30
|
+
--gog-muted-text-color: #5c6370;
|
|
31
|
+
|
|
32
|
+
/* Brand — One Dark's blue */
|
|
33
|
+
--gog-primary-color: #abb2bf;
|
|
34
|
+
--gog-accent-color: #61afef;
|
|
35
|
+
--gog-accent-bright: #8ac2f5;
|
|
36
|
+
--gog-accent-dim: #4b8fca;
|
|
37
|
+
--gog-accent-pale: #2d3a4a;
|
|
38
|
+
--gog-secondary-color: #c678dd;
|
|
39
|
+
|
|
40
|
+
/* Semantics — the syntax hues in their natural roles */
|
|
41
|
+
--gog-success-color: #98c379;
|
|
42
|
+
--gog-danger-color: #e06c75;
|
|
43
|
+
--gog-warning-color: #e5c07b;
|
|
44
|
+
--gog-info-color: #56b6c2;
|
|
45
|
+
|
|
46
|
+
--gog-panel-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--gog-border-color);
|
|
47
|
+
--gog-spinner-overlay-bg: rgba(40, 44, 52, 0.85);
|
|
48
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* `one-light` — the Atom/JetBrains One Light palette, as a @guildofgleks/ui theme.
|
|
3
|
+
*
|
|
4
|
+
* Import it after `index.css`, then put the attribute on the root — or on any subtree:
|
|
5
|
+
*
|
|
6
|
+
* @import '@guildofgleks/ui/styles/index.css';
|
|
7
|
+
* @import '@guildofgleks/ui/styles/presets/one-light.css';
|
|
8
|
+
*
|
|
9
|
+
* <html data-theme="one-light">
|
|
10
|
+
*
|
|
11
|
+
* The light counterpart to `one-dark.css`, using the same hue roles: blue is the accent,
|
|
12
|
+
* green/red/yellow/cyan become success/danger/warning/info. Pair the two behind a toggle and
|
|
13
|
+
* `ThemeService.setTheme('one-dark' | 'one-light')` switches between them.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
:root[data-theme='one-light'],
|
|
17
|
+
[data-theme='one-light'] {
|
|
18
|
+
color-scheme: light;
|
|
19
|
+
|
|
20
|
+
/* Editor chrome */
|
|
21
|
+
--gog-background-color: #fafafa;
|
|
22
|
+
--gog-surface-color: #ffffff;
|
|
23
|
+
--gog-hover-color: #eaeaeb;
|
|
24
|
+
--gog-border-color: #d3d3d4;
|
|
25
|
+
|
|
26
|
+
/* Type */
|
|
27
|
+
--gog-text-color: #383a42;
|
|
28
|
+
--gog-accent-text-color: #ffffff;
|
|
29
|
+
--gog-muted-text-color: #a0a1a7;
|
|
30
|
+
|
|
31
|
+
/* Brand — One Light's blue */
|
|
32
|
+
--gog-primary-color: #383a42;
|
|
33
|
+
--gog-accent-color: #4078f2;
|
|
34
|
+
--gog-accent-bright: #5b8dff;
|
|
35
|
+
--gog-accent-dim: #2f5fd0;
|
|
36
|
+
--gog-accent-pale: #dce7fd;
|
|
37
|
+
--gog-secondary-color: #a626a4;
|
|
38
|
+
|
|
39
|
+
/* Semantics — the syntax hues in their natural roles */
|
|
40
|
+
--gog-success-color: #50a14f;
|
|
41
|
+
--gog-danger-color: #e45649;
|
|
42
|
+
--gog-warning-color: #c18401;
|
|
43
|
+
--gog-info-color: #0184bc;
|
|
44
|
+
|
|
45
|
+
--gog-panel-shadow: 0 10px 30px rgba(56, 58, 66, 0.12), 0 0 0 1px var(--gog-border-color);
|
|
46
|
+
--gog-spinner-overlay-bg: rgba(250, 250, 250, 0.85);
|
|
47
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* `slate` — an alternative preset, and a worked example of the whole theming contract.
|
|
3
|
+
*
|
|
4
|
+
* Import it after `index.css`, then put the attribute on the root — or on any subtree:
|
|
5
|
+
*
|
|
6
|
+
* @import '@guildofgleks/ui/styles/index.css';
|
|
7
|
+
* @import '@guildofgleks/ui/styles/presets/slate.css';
|
|
8
|
+
*
|
|
9
|
+
* <html data-theme="slate">
|
|
10
|
+
*
|
|
11
|
+
* Note what this file does *not* contain: no component tokens, no `--gog-btn-*`, no
|
|
12
|
+
* `--gog-table-*`. It declares the palette and nothing else. Every component token in
|
|
13
|
+
* `theme.css`'s derived layer is re-declared on `[data-theme]`, so it re-resolves against
|
|
14
|
+
* whichever palette is in scope — which is exactly why a theme this short can restyle the
|
|
15
|
+
* entire library. If you find yourself listing component tokens in a theme, something in the
|
|
16
|
+
* derived layer is missing instead.
|
|
17
|
+
*
|
|
18
|
+
* Both selectors are listed for the same reason `theme.css` lists both: `:root[data-theme]`
|
|
19
|
+
* themes the page, the bare `[data-theme]` themes any subtree, so several themes can render
|
|
20
|
+
* side by side.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
:root[data-theme='slate'],
|
|
24
|
+
[data-theme='slate'] {
|
|
25
|
+
color-scheme: light;
|
|
26
|
+
|
|
27
|
+
/* Surfaces — cool neutrals rather than the house obsidian */
|
|
28
|
+
--gog-background-color: #f4f6f8;
|
|
29
|
+
--gog-surface-color: #ffffff;
|
|
30
|
+
--gog-hover-color: #e8edf2;
|
|
31
|
+
--gog-border-color: #cbd5e1;
|
|
32
|
+
|
|
33
|
+
/* Type */
|
|
34
|
+
--gog-text-color: #1e293b;
|
|
35
|
+
--gog-accent-text-color: #ffffff;
|
|
36
|
+
--gog-muted-text-color: #64748b;
|
|
37
|
+
|
|
38
|
+
/* Brand — indigo instead of gold, to make the swap unmistakable */
|
|
39
|
+
--gog-primary-color: #1e293b;
|
|
40
|
+
--gog-accent-color: #4f46e5;
|
|
41
|
+
--gog-accent-bright: #6366f1;
|
|
42
|
+
--gog-accent-dim: #4338ca;
|
|
43
|
+
--gog-accent-pale: #e0e7ff;
|
|
44
|
+
--gog-secondary-color: #0ea5e9;
|
|
45
|
+
|
|
46
|
+
/* Semantics */
|
|
47
|
+
--gog-success-color: #059669;
|
|
48
|
+
--gog-danger-color: #dc2626;
|
|
49
|
+
--gog-warning-color: #d97706;
|
|
50
|
+
--gog-info-color: #0284c7;
|
|
51
|
+
|
|
52
|
+
/* The two palette-shaped tokens that are not plain colours. */
|
|
53
|
+
--gog-panel-shadow: 0 10px 30px rgba(15, 23, 42, 0.12), 0 0 0 1px var(--gog-border-color);
|
|
54
|
+
--gog-spinner-overlay-bg: rgba(244, 246, 248, 0.85);
|
|
55
|
+
}
|