@guildofgleks/ui 21.3.1 → 21.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guildofgleks/ui",
3
- "version": "21.3.1",
3
+ "version": "21.4.0",
4
4
  "engines": {
5
5
  "node": ">=20.19.0"
6
6
  },
@@ -16,19 +16,25 @@
16
16
  "standalone",
17
17
  "accessible"
18
18
  ],
19
+ "homepage": "https://ui.guildofgleks.com/",
19
20
  "license": "Apache-2.0",
20
21
  "peerDependencies": {
21
22
  "@angular/common": "^21.2.0",
22
23
  "@angular/core": "^21.2.0",
23
- "@angular/forms": "^21.2.0"
24
+ "@angular/forms": "^21.2.0",
25
+ "@angular/platform-browser": "^21.2.0"
24
26
  },
25
27
  "dependencies": {
26
28
  "tslib": "^2.3.0"
27
29
  },
28
30
  "sideEffects": false,
29
- "module": "fesm2022/guildofgleks-ui.mjs",
30
- "typings": "types/guildofgleks-ui.d.ts",
31
31
  "exports": {
32
+ "./styles/*": {
33
+ "default": "./styles/*"
34
+ },
35
+ "./src/styles/*": {
36
+ "default": "./src/styles/*"
37
+ },
32
38
  "./package.json": {
33
39
  "default": "./package.json"
34
40
  },
@@ -37,5 +43,7 @@
37
43
  "default": "./fesm2022/guildofgleks-ui.mjs"
38
44
  }
39
45
  },
46
+ "module": "fesm2022/guildofgleks-ui.mjs",
47
+ "typings": "types/guildofgleks-ui.d.ts",
40
48
  "type": "module"
41
49
  }
@@ -0,0 +1,193 @@
1
+ /*
2
+ * The button's visual block, in a **global** stylesheet rather than the component's own.
3
+ *
4
+ * `gog-button` is not the only thing that renders it: `[gogButton]` applies these same classes to
5
+ * a consumer's own `<a>` or `<button>`, and Angular's emulated encapsulation would never let a
6
+ * component stylesheet reach an element declared in someone else's template. The same reason
7
+ * `gogBadge` and `gog-collapsible` keep their CSS here.
8
+ *
9
+ * Token layering (see theme.css):
10
+ * --gog-btn-<prop> per-instance override. Never declared here or in the
11
+ * theme, so it always wins when a consumer sets it.
12
+ * --gog-btn-variant-<prop> internal, set by the variant classes below.
13
+ * --gog-btn-size-<prop> internal, set by the size classes below.
14
+ * --gog-btn-<variant>-<prop> the actual values, all in theme.css.
15
+ * Nothing in this file is a literal: every colour, font, metric and duration resolves
16
+ * to a theme token, so a theme can restyle the button without touching this stylesheet.
17
+ */
18
+ .gog-btn {
19
+ /* Scopes the spinner rendered inside a loading button to the variant's spinner colour. */
20
+ --gog-spinner-color: var(
21
+ --gog-btn-spinner-color,
22
+ var(--gog-btn-variant-spinner-color, var(--gog-btn-primary-spinner-color))
23
+ );
24
+
25
+ gap: var(--gog-btn-gap);
26
+ border: var(--gog-btn-border-width) var(--gog-btn-border-style)
27
+ var(--gog-btn-border, var(--gog-btn-variant-border, var(--gog-btn-primary-border)));
28
+ border-radius: var(--gog-btn-radius);
29
+ padding: var(--gog-btn-padding, var(--gog-btn-size-padding, var(--gog-btn-md-padding)));
30
+ font-family: var(--gog-btn-font-family);
31
+ font-weight: var(--gog-btn-font-weight);
32
+ font-size: var(--gog-btn-font-size, var(--gog-btn-size-font-size, var(--gog-btn-md-font-size)));
33
+ letter-spacing: var(--gog-btn-letter-spacing);
34
+ text-transform: var(--gog-btn-text-transform);
35
+ line-height: var(--gog-btn-line-height);
36
+ background-color: var(--gog-btn-bg, var(--gog-btn-variant-bg, var(--gog-btn-primary-bg)));
37
+ color: var(--gog-btn-color, var(--gog-btn-variant-color, var(--gog-btn-primary-color)));
38
+ box-shadow: var(--gog-btn-shadow, var(--gog-btn-variant-shadow, var(--gog-btn-primary-shadow)));
39
+ cursor: pointer;
40
+ /* An `<a>` carries the UA underline; a `<button>` never did, which is why the component never
41
+ needed this. Reset here so `[gogButton]` on a link is visually identical to the component. */
42
+ text-decoration: none;
43
+ transition:
44
+ background-color var(--gog-btn-transition-duration) var(--gog-easing),
45
+ box-shadow var(--gog-btn-transition-duration) var(--gog-easing),
46
+ color var(--gog-btn-transition-duration) var(--gog-easing);
47
+ }
48
+
49
+ .gog-btn:focus-visible {
50
+ outline: var(--gog-btn-focus-ring-width) solid
51
+ var(--gog-btn-hover-bg, var(--gog-btn-variant-hover-bg, var(--gog-btn-primary-hover-bg)));
52
+ outline-offset: var(--gog-btn-focus-ring-offset);
53
+ }
54
+
55
+ .gog-btn:hover:not(:disabled) {
56
+ background-color: var(
57
+ --gog-btn-hover-bg,
58
+ var(--gog-btn-variant-hover-bg, var(--gog-btn-primary-hover-bg))
59
+ );
60
+ color: var(
61
+ --gog-btn-hover-color,
62
+ var(--gog-btn-variant-hover-color, var(--gog-btn-primary-hover-color))
63
+ );
64
+ box-shadow: var(
65
+ --gog-btn-hover-shadow,
66
+ var(--gog-btn-variant-hover-shadow, var(--gog-btn-primary-hover-shadow))
67
+ );
68
+ }
69
+
70
+ .gog-btn:active:not(:disabled) {
71
+ transform: scale(var(--gog-btn-active-scale));
72
+ }
73
+
74
+ @media (prefers-reduced-motion: reduce) {
75
+ .gog-btn {
76
+ transition: none;
77
+ }
78
+
79
+ .gog-btn:active:not(:disabled) {
80
+ transform: none;
81
+ }
82
+ }
83
+
84
+ .gog-btn:disabled {
85
+ opacity: var(--gog-btn-disabled-opacity);
86
+ cursor: not-allowed;
87
+ }
88
+
89
+ /* === Variants === */
90
+
91
+ /* primary: solid gold */
92
+ .gog-btn--primary {
93
+ --gog-btn-variant-bg: var(--gog-btn-primary-bg);
94
+ --gog-btn-variant-color: var(--gog-btn-primary-color);
95
+ --gog-btn-variant-border: var(--gog-btn-primary-border);
96
+ --gog-btn-variant-shadow: var(--gog-btn-primary-shadow);
97
+ --gog-btn-variant-hover-bg: var(--gog-btn-primary-hover-bg);
98
+ --gog-btn-variant-hover-color: var(--gog-btn-primary-hover-color);
99
+ --gog-btn-variant-hover-shadow: var(--gog-btn-primary-hover-shadow);
100
+ --gog-btn-variant-spinner-color: var(--gog-btn-primary-spinner-color);
101
+ }
102
+
103
+ .gog-btn--secondary {
104
+ --gog-btn-variant-bg: var(--gog-btn-secondary-bg);
105
+ --gog-btn-variant-color: var(--gog-btn-secondary-color);
106
+ --gog-btn-variant-border: var(--gog-btn-secondary-border);
107
+ --gog-btn-variant-shadow: var(--gog-btn-secondary-shadow);
108
+ --gog-btn-variant-hover-bg: var(--gog-btn-secondary-hover-bg);
109
+ --gog-btn-variant-hover-color: var(--gog-btn-secondary-hover-color);
110
+ --gog-btn-variant-hover-shadow: var(--gog-btn-secondary-hover-shadow);
111
+ --gog-btn-variant-spinner-color: var(--gog-btn-secondary-spinner-color);
112
+ }
113
+
114
+ /* outline: transparent with golden border */
115
+ .gog-btn--outline {
116
+ --gog-btn-variant-bg: var(--gog-btn-outline-bg);
117
+ --gog-btn-variant-color: var(--gog-btn-outline-color);
118
+ --gog-btn-variant-border: var(--gog-btn-outline-border);
119
+ --gog-btn-variant-shadow: var(--gog-btn-outline-shadow);
120
+ --gog-btn-variant-hover-bg: var(--gog-btn-outline-hover-bg);
121
+ --gog-btn-variant-hover-color: var(--gog-btn-outline-hover-color);
122
+ --gog-btn-variant-hover-shadow: var(--gog-btn-outline-hover-shadow);
123
+ --gog-btn-variant-spinner-color: var(--gog-btn-outline-spinner-color);
124
+ }
125
+
126
+ /* ghost: no border, subtle hover */
127
+ .gog-btn--ghost {
128
+ --gog-btn-variant-bg: var(--gog-btn-ghost-bg);
129
+ --gog-btn-variant-color: var(--gog-btn-ghost-color);
130
+ --gog-btn-variant-border: var(--gog-btn-ghost-border);
131
+ --gog-btn-variant-shadow: var(--gog-btn-ghost-shadow);
132
+ --gog-btn-variant-hover-bg: var(--gog-btn-ghost-hover-bg);
133
+ --gog-btn-variant-hover-color: var(--gog-btn-ghost-hover-color);
134
+ --gog-btn-variant-hover-shadow: var(--gog-btn-ghost-hover-shadow);
135
+ --gog-btn-variant-spinner-color: var(--gog-btn-ghost-spinner-color);
136
+ }
137
+
138
+ /* === Sizes === */
139
+ .gog-btn--xsm {
140
+ --gog-btn-size-padding: var(--gog-btn-xsm-padding);
141
+ --gog-btn-size-font-size: var(--gog-btn-xsm-font-size);
142
+ }
143
+
144
+ .gog-btn--sm {
145
+ --gog-btn-size-padding: var(--gog-btn-sm-padding);
146
+ --gog-btn-size-font-size: var(--gog-btn-sm-font-size);
147
+ }
148
+
149
+ .gog-btn--md {
150
+ --gog-btn-size-padding: var(--gog-btn-md-padding);
151
+ --gog-btn-size-font-size: var(--gog-btn-md-font-size);
152
+ }
153
+
154
+ .gog-btn--lg {
155
+ --gog-btn-size-padding: var(--gog-btn-lg-padding);
156
+ --gog-btn-size-font-size: var(--gog-btn-lg-font-size);
157
+ }
158
+
159
+ .gog-btn--slg {
160
+ --gog-btn-size-padding: var(--gog-btn-slg-padding);
161
+ --gog-btn-size-font-size: var(--gog-btn-slg-font-size);
162
+ }
163
+
164
+ .gog-btn--loading {
165
+ position: relative;
166
+ pointer-events: none;
167
+ /* Loading buttons stay natively focusable (aria-disabled + aria-busy instead of
168
+ `disabled`) so keyboard users don't lose focus mid-action. `:disabled` styling
169
+ below therefore no longer covers this state, so the dim is applied explicitly. */
170
+ opacity: var(--gog-btn-loading-opacity);
171
+ }
172
+
173
+ .gog-btn__content--hidden {
174
+ visibility: hidden;
175
+ }
176
+
177
+ /* absolute center so the spinner is always in the middle of the button */
178
+ .gog-btn__spinner {
179
+ position: absolute;
180
+ top: 50%;
181
+ left: 50%;
182
+ transform: translate(-50%, -50%);
183
+ max-width: var(--gog-btn-spinner-max-size);
184
+ max-height: var(--gog-btn-spinner-max-size);
185
+ }
186
+
187
+ /*
188
+ * `gog-button` gets its full width through `:host`, having a wrapper element to work with.
189
+ * `[gogButton]` has none — the element *is* the button — so it needs a class of its own.
190
+ */
191
+ .gog-btn--full-width {
192
+ width: 100%;
193
+ }
@@ -15,3 +15,5 @@
15
15
  @import './theme.css';
16
16
  @import './typography.css';
17
17
  @import './utilities.css';
18
+ /* Global because `[gogButton]` styles a consumer's own element — see the file's own header. */
19
+ @import './button.css';
@@ -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);
@@ -1124,6 +1144,8 @@
1124
1144
  --gog-paginator-ellipsis-color: var(--gog-muted-text-color);
1125
1145
  --gog-paginator-ellipsis-font-size: var(--gog-text-sm);
1126
1146
  --gog-paginator-ellipsis-font-family: var(--gog-font-body);
1147
+ /* Enough for a three-digit page size plus the chevron, so the row doesn't shift on change. */
1148
+ --gog-paginator-page-size-min-width: 5rem;
1127
1149
  --gog-paginator-ellipsis-min-width: 32px;
1128
1150
 
1129
1151
  /* ── Progressbar ──────────────────────────────────────────────────────────── */
@@ -1397,11 +1419,15 @@
1397
1419
  --gog-table-border-width: 2px;
1398
1420
  --gog-table-border-style: solid;
1399
1421
  --gog-table-row-border-width: 1px;
1422
+ /* The selection column is sized to its checkbox and never grows with content. */
1423
+ --gog-table-select-col-width: 44px;
1400
1424
  --gog-table-surface: var(--gog-surface-color);
1401
1425
  --gog-table-text-color: var(--gog-text-color);
1402
1426
  --gog-table-accent-color: var(--gog-accent-color);
1403
1427
  --gog-table-accent-bright: var(--gog-accent-bright);
1404
1428
  --gog-table-hover-bg: var(--gog-accent-pale);
1429
+ /* Selected rows keep this tint through hover, so hovering one never reads as clearing it. */
1430
+ --gog-table-selected-bg: var(--gog-accent-pale);
1405
1431
  --gog-table-muted-color: var(--gog-muted-text-color);
1406
1432
  --gog-table-focus-ring: var(--gog-accent-color);
1407
1433
  --gog-table-focus-ring-width: var(--gog-focus-ring-width);
@@ -0,0 +1,193 @@
1
+ /*
2
+ * The button's visual block, in a **global** stylesheet rather than the component's own.
3
+ *
4
+ * `gog-button` is not the only thing that renders it: `[gogButton]` applies these same classes to
5
+ * a consumer's own `<a>` or `<button>`, and Angular's emulated encapsulation would never let a
6
+ * component stylesheet reach an element declared in someone else's template. The same reason
7
+ * `gogBadge` and `gog-collapsible` keep their CSS here.
8
+ *
9
+ * Token layering (see theme.css):
10
+ * --gog-btn-<prop> per-instance override. Never declared here or in the
11
+ * theme, so it always wins when a consumer sets it.
12
+ * --gog-btn-variant-<prop> internal, set by the variant classes below.
13
+ * --gog-btn-size-<prop> internal, set by the size classes below.
14
+ * --gog-btn-<variant>-<prop> the actual values, all in theme.css.
15
+ * Nothing in this file is a literal: every colour, font, metric and duration resolves
16
+ * to a theme token, so a theme can restyle the button without touching this stylesheet.
17
+ */
18
+ .gog-btn {
19
+ /* Scopes the spinner rendered inside a loading button to the variant's spinner colour. */
20
+ --gog-spinner-color: var(
21
+ --gog-btn-spinner-color,
22
+ var(--gog-btn-variant-spinner-color, var(--gog-btn-primary-spinner-color))
23
+ );
24
+
25
+ gap: var(--gog-btn-gap);
26
+ border: var(--gog-btn-border-width) var(--gog-btn-border-style)
27
+ var(--gog-btn-border, var(--gog-btn-variant-border, var(--gog-btn-primary-border)));
28
+ border-radius: var(--gog-btn-radius);
29
+ padding: var(--gog-btn-padding, var(--gog-btn-size-padding, var(--gog-btn-md-padding)));
30
+ font-family: var(--gog-btn-font-family);
31
+ font-weight: var(--gog-btn-font-weight);
32
+ font-size: var(--gog-btn-font-size, var(--gog-btn-size-font-size, var(--gog-btn-md-font-size)));
33
+ letter-spacing: var(--gog-btn-letter-spacing);
34
+ text-transform: var(--gog-btn-text-transform);
35
+ line-height: var(--gog-btn-line-height);
36
+ background-color: var(--gog-btn-bg, var(--gog-btn-variant-bg, var(--gog-btn-primary-bg)));
37
+ color: var(--gog-btn-color, var(--gog-btn-variant-color, var(--gog-btn-primary-color)));
38
+ box-shadow: var(--gog-btn-shadow, var(--gog-btn-variant-shadow, var(--gog-btn-primary-shadow)));
39
+ cursor: pointer;
40
+ /* An `<a>` carries the UA underline; a `<button>` never did, which is why the component never
41
+ needed this. Reset here so `[gogButton]` on a link is visually identical to the component. */
42
+ text-decoration: none;
43
+ transition:
44
+ background-color var(--gog-btn-transition-duration) var(--gog-easing),
45
+ box-shadow var(--gog-btn-transition-duration) var(--gog-easing),
46
+ color var(--gog-btn-transition-duration) var(--gog-easing);
47
+ }
48
+
49
+ .gog-btn:focus-visible {
50
+ outline: var(--gog-btn-focus-ring-width) solid
51
+ var(--gog-btn-hover-bg, var(--gog-btn-variant-hover-bg, var(--gog-btn-primary-hover-bg)));
52
+ outline-offset: var(--gog-btn-focus-ring-offset);
53
+ }
54
+
55
+ .gog-btn:hover:not(:disabled) {
56
+ background-color: var(
57
+ --gog-btn-hover-bg,
58
+ var(--gog-btn-variant-hover-bg, var(--gog-btn-primary-hover-bg))
59
+ );
60
+ color: var(
61
+ --gog-btn-hover-color,
62
+ var(--gog-btn-variant-hover-color, var(--gog-btn-primary-hover-color))
63
+ );
64
+ box-shadow: var(
65
+ --gog-btn-hover-shadow,
66
+ var(--gog-btn-variant-hover-shadow, var(--gog-btn-primary-hover-shadow))
67
+ );
68
+ }
69
+
70
+ .gog-btn:active:not(:disabled) {
71
+ transform: scale(var(--gog-btn-active-scale));
72
+ }
73
+
74
+ @media (prefers-reduced-motion: reduce) {
75
+ .gog-btn {
76
+ transition: none;
77
+ }
78
+
79
+ .gog-btn:active:not(:disabled) {
80
+ transform: none;
81
+ }
82
+ }
83
+
84
+ .gog-btn:disabled {
85
+ opacity: var(--gog-btn-disabled-opacity);
86
+ cursor: not-allowed;
87
+ }
88
+
89
+ /* === Variants === */
90
+
91
+ /* primary: solid gold */
92
+ .gog-btn--primary {
93
+ --gog-btn-variant-bg: var(--gog-btn-primary-bg);
94
+ --gog-btn-variant-color: var(--gog-btn-primary-color);
95
+ --gog-btn-variant-border: var(--gog-btn-primary-border);
96
+ --gog-btn-variant-shadow: var(--gog-btn-primary-shadow);
97
+ --gog-btn-variant-hover-bg: var(--gog-btn-primary-hover-bg);
98
+ --gog-btn-variant-hover-color: var(--gog-btn-primary-hover-color);
99
+ --gog-btn-variant-hover-shadow: var(--gog-btn-primary-hover-shadow);
100
+ --gog-btn-variant-spinner-color: var(--gog-btn-primary-spinner-color);
101
+ }
102
+
103
+ .gog-btn--secondary {
104
+ --gog-btn-variant-bg: var(--gog-btn-secondary-bg);
105
+ --gog-btn-variant-color: var(--gog-btn-secondary-color);
106
+ --gog-btn-variant-border: var(--gog-btn-secondary-border);
107
+ --gog-btn-variant-shadow: var(--gog-btn-secondary-shadow);
108
+ --gog-btn-variant-hover-bg: var(--gog-btn-secondary-hover-bg);
109
+ --gog-btn-variant-hover-color: var(--gog-btn-secondary-hover-color);
110
+ --gog-btn-variant-hover-shadow: var(--gog-btn-secondary-hover-shadow);
111
+ --gog-btn-variant-spinner-color: var(--gog-btn-secondary-spinner-color);
112
+ }
113
+
114
+ /* outline: transparent with golden border */
115
+ .gog-btn--outline {
116
+ --gog-btn-variant-bg: var(--gog-btn-outline-bg);
117
+ --gog-btn-variant-color: var(--gog-btn-outline-color);
118
+ --gog-btn-variant-border: var(--gog-btn-outline-border);
119
+ --gog-btn-variant-shadow: var(--gog-btn-outline-shadow);
120
+ --gog-btn-variant-hover-bg: var(--gog-btn-outline-hover-bg);
121
+ --gog-btn-variant-hover-color: var(--gog-btn-outline-hover-color);
122
+ --gog-btn-variant-hover-shadow: var(--gog-btn-outline-hover-shadow);
123
+ --gog-btn-variant-spinner-color: var(--gog-btn-outline-spinner-color);
124
+ }
125
+
126
+ /* ghost: no border, subtle hover */
127
+ .gog-btn--ghost {
128
+ --gog-btn-variant-bg: var(--gog-btn-ghost-bg);
129
+ --gog-btn-variant-color: var(--gog-btn-ghost-color);
130
+ --gog-btn-variant-border: var(--gog-btn-ghost-border);
131
+ --gog-btn-variant-shadow: var(--gog-btn-ghost-shadow);
132
+ --gog-btn-variant-hover-bg: var(--gog-btn-ghost-hover-bg);
133
+ --gog-btn-variant-hover-color: var(--gog-btn-ghost-hover-color);
134
+ --gog-btn-variant-hover-shadow: var(--gog-btn-ghost-hover-shadow);
135
+ --gog-btn-variant-spinner-color: var(--gog-btn-ghost-spinner-color);
136
+ }
137
+
138
+ /* === Sizes === */
139
+ .gog-btn--xsm {
140
+ --gog-btn-size-padding: var(--gog-btn-xsm-padding);
141
+ --gog-btn-size-font-size: var(--gog-btn-xsm-font-size);
142
+ }
143
+
144
+ .gog-btn--sm {
145
+ --gog-btn-size-padding: var(--gog-btn-sm-padding);
146
+ --gog-btn-size-font-size: var(--gog-btn-sm-font-size);
147
+ }
148
+
149
+ .gog-btn--md {
150
+ --gog-btn-size-padding: var(--gog-btn-md-padding);
151
+ --gog-btn-size-font-size: var(--gog-btn-md-font-size);
152
+ }
153
+
154
+ .gog-btn--lg {
155
+ --gog-btn-size-padding: var(--gog-btn-lg-padding);
156
+ --gog-btn-size-font-size: var(--gog-btn-lg-font-size);
157
+ }
158
+
159
+ .gog-btn--slg {
160
+ --gog-btn-size-padding: var(--gog-btn-slg-padding);
161
+ --gog-btn-size-font-size: var(--gog-btn-slg-font-size);
162
+ }
163
+
164
+ .gog-btn--loading {
165
+ position: relative;
166
+ pointer-events: none;
167
+ /* Loading buttons stay natively focusable (aria-disabled + aria-busy instead of
168
+ `disabled`) so keyboard users don't lose focus mid-action. `:disabled` styling
169
+ below therefore no longer covers this state, so the dim is applied explicitly. */
170
+ opacity: var(--gog-btn-loading-opacity);
171
+ }
172
+
173
+ .gog-btn__content--hidden {
174
+ visibility: hidden;
175
+ }
176
+
177
+ /* absolute center so the spinner is always in the middle of the button */
178
+ .gog-btn__spinner {
179
+ position: absolute;
180
+ top: 50%;
181
+ left: 50%;
182
+ transform: translate(-50%, -50%);
183
+ max-width: var(--gog-btn-spinner-max-size);
184
+ max-height: var(--gog-btn-spinner-max-size);
185
+ }
186
+
187
+ /*
188
+ * `gog-button` gets its full width through `:host`, having a wrapper element to work with.
189
+ * `[gogButton]` has none — the element *is* the button — so it needs a class of its own.
190
+ */
191
+ .gog-btn--full-width {
192
+ width: 100%;
193
+ }
@@ -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
+ }
@@ -0,0 +1,19 @@
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';
18
+ /* Global because `[gogButton]` styles a consumer's own element — see the file's own header. */
19
+ @import './button.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
+ }