@guildofgleks/ui 21.4.3 → 21.4.4
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 +154 -135
- package/CHANGELOG.md +85 -14
- package/README.md +14 -0
- package/package.json +2 -1
- package/schematics/collection.json +9 -0
- package/schematics/ng-add/index.cjs +62 -0
- package/schematics/ng-add/schema.cjs +2 -0
- package/schematics/ng-add/schema.json +15 -0
- package/src/styles/theme.css +15 -6
- package/src/styles/utilities.css +185 -170
- package/styles/theme.css +15 -6
- package/styles/utilities.css +185 -170
package/src/styles/utilities.css
CHANGED
|
@@ -1,170 +1,185 @@
|
|
|
1
|
-
.gog-inline-center {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.gog-flex-center {
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/*
|
|
14
|
-
* Scopes reflow to this subtree. Never put it on an element that has to paint something
|
|
15
|
-
* outside its own box — `contain: layout` creates a stacking context, so a popup inside
|
|
16
|
-
* it can no longer stack above the rest of the page no matter its z-index. That rules it
|
|
17
|
-
* out for gog-select and gog-multiselect.
|
|
18
|
-
*/
|
|
19
|
-
.gog-contained-layout {
|
|
20
|
-
contain: layout style;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.gog-cursor-pointer {
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.gog-cursor-wait {
|
|
28
|
-
cursor: wait;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.gog-cursor-not-allowed {
|
|
32
|
-
cursor: not-allowed;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/*
|
|
36
|
-
* Present to assistive tech, invisible on screen. The clip-path/1px recipe rather than
|
|
37
|
-
* `display: none` or `visibility: hidden`, both of which remove the text from the
|
|
38
|
-
* accessibility tree along with the pixels.
|
|
39
|
-
*/
|
|
40
|
-
.gog-visually-hidden {
|
|
41
|
-
position: absolute;
|
|
42
|
-
width: 1px;
|
|
43
|
-
height: 1px;
|
|
44
|
-
margin: -1px;
|
|
45
|
-
padding: 0;
|
|
46
|
-
border: 0;
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
clip-path: inset(50%);
|
|
49
|
-
white-space: nowrap;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/*
|
|
53
|
-
* `gogBadge`'s classes, global for the same reason as `gog-collapsible`'s below: the
|
|
54
|
-
* directive appends its badge into a *consumer's* element, which is light DOM belonging to
|
|
55
|
-
* that consumer's view, so a scoped stylesheet could never reach it.
|
|
56
|
-
*/
|
|
57
|
-
.gog-badge-host {
|
|
58
|
-
/* The badge is positioned against this element, so it has to be a containing block.
|
|
59
|
-
Harmless on an already-relative host; a host that is itself absolutely positioned
|
|
60
|
-
should set its own position after this class, which ordinary specificity allows. */
|
|
61
|
-
position: relative;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.gog-badge {
|
|
65
|
-
position: absolute;
|
|
66
|
-
z-index: var(--gog-badge-z);
|
|
67
|
-
display: inline-flex;
|
|
68
|
-
align-items: center;
|
|
69
|
-
justify-content: center;
|
|
70
|
-
box-sizing: border-box;
|
|
71
|
-
min-width: var(--gog-badge-size);
|
|
72
|
-
height: var(--gog-badge-size);
|
|
73
|
-
padding-inline: var(--gog-badge-padding-inline);
|
|
74
|
-
border: var(--gog-badge-border-width) var(--gog-badge-border-style) var(--gog-badge-border-color);
|
|
75
|
-
border-radius: var(--gog-badge-radius);
|
|
76
|
-
background-color: var(--gog-badge-bg, var(--gog-badge-variant-bg, var(--gog-badge-danger-bg)));
|
|
77
|
-
color: var(--gog-badge-color, var(--gog-badge-variant-color, var(--gog-badge-danger-color)));
|
|
78
|
-
font-family: var(--gog-badge-font-family);
|
|
79
|
-
font-size: var(--gog-badge-font-size);
|
|
80
|
-
font-weight: var(--gog-badge-font-weight);
|
|
81
|
-
line-height: var(--gog-badge-line-height);
|
|
82
|
-
pointer-events: none;
|
|
83
|
-
white-space: nowrap;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/* A dot carries no text, so it collapses to a circle and drops its padding. */
|
|
87
|
-
.gog-badge--dot {
|
|
88
|
-
min-width: var(--gog-badge-dot-size);
|
|
89
|
-
width: var(--gog-badge-dot-size);
|
|
90
|
-
height: var(--gog-badge-dot-size);
|
|
91
|
-
padding-inline: 0;
|
|
92
|
-
border-radius: 50%;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/* Logical insets rather than a translate, so the corners follow the writing direction. */
|
|
96
|
-
.gog-badge--top-end {
|
|
97
|
-
top: calc(-1 * var(--gog-badge-offset));
|
|
98
|
-
inset-inline-end: calc(-1 * var(--gog-badge-offset));
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.gog-badge--top-start {
|
|
102
|
-
top: calc(-1 * var(--gog-badge-offset));
|
|
103
|
-
inset-inline-start: calc(-1 * var(--gog-badge-offset));
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.gog-badge--bottom-end {
|
|
107
|
-
bottom: calc(-1 * var(--gog-badge-offset));
|
|
108
|
-
inset-inline-end: calc(-1 * var(--gog-badge-offset));
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.gog-badge--bottom-start {
|
|
112
|
-
bottom: calc(-1 * var(--gog-badge-offset));
|
|
113
|
-
inset-inline-start: calc(-1 * var(--gog-badge-offset));
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.gog-badge--success {
|
|
117
|
-
--gog-badge-variant-bg: var(--gog-badge-success-bg);
|
|
118
|
-
--gog-badge-variant-color: var(--gog-badge-success-color);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.gog-badge--danger {
|
|
122
|
-
--gog-badge-variant-bg: var(--gog-badge-danger-bg);
|
|
123
|
-
--gog-badge-variant-color: var(--gog-badge-danger-color);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.gog-badge--warning {
|
|
127
|
-
--gog-badge-variant-bg: var(--gog-badge-warning-bg);
|
|
128
|
-
--gog-badge-variant-color: var(--gog-badge-warning-color);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.gog-badge--info {
|
|
132
|
-
--gog-badge-variant-bg: var(--gog-badge-info-bg);
|
|
133
|
-
--gog-badge-variant-color: var(--gog-badge-info-color);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/*
|
|
137
|
-
* `gog-collapsible`'s trigger/content classes, global rather than component-scoped: both
|
|
138
|
-
* are applied via `gogCollapsibleTrigger`/`gogCollapsibleContent` directives to elements a
|
|
139
|
-
* *consumer* projects into `<gog-collapsible>` — light DOM that belongs to the consumer's
|
|
140
|
-
* own view, not `gog-collapsible`'s, so a scoped stylesheet on the component itself would
|
|
141
|
-
* never reach it.
|
|
142
|
-
*/
|
|
143
|
-
.gog-collapsible__trigger {
|
|
144
|
-
cursor: pointer;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.gog-collapsible__trigger[aria-disabled='true'] {
|
|
148
|
-
cursor: not-allowed;
|
|
149
|
-
opacity: var(--gog-collapsible-disabled-opacity);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.gog-collapsible__content {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
1
|
+
.gog-inline-center {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.gog-flex-center {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* Scopes reflow to this subtree. Never put it on an element that has to paint something
|
|
15
|
+
* outside its own box — `contain: layout` creates a stacking context, so a popup inside
|
|
16
|
+
* it can no longer stack above the rest of the page no matter its z-index. That rules it
|
|
17
|
+
* out for gog-select and gog-multiselect.
|
|
18
|
+
*/
|
|
19
|
+
.gog-contained-layout {
|
|
20
|
+
contain: layout style;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.gog-cursor-pointer {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.gog-cursor-wait {
|
|
28
|
+
cursor: wait;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.gog-cursor-not-allowed {
|
|
32
|
+
cursor: not-allowed;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/*
|
|
36
|
+
* Present to assistive tech, invisible on screen. The clip-path/1px recipe rather than
|
|
37
|
+
* `display: none` or `visibility: hidden`, both of which remove the text from the
|
|
38
|
+
* accessibility tree along with the pixels.
|
|
39
|
+
*/
|
|
40
|
+
.gog-visually-hidden {
|
|
41
|
+
position: absolute;
|
|
42
|
+
width: 1px;
|
|
43
|
+
height: 1px;
|
|
44
|
+
margin: -1px;
|
|
45
|
+
padding: 0;
|
|
46
|
+
border: 0;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
clip-path: inset(50%);
|
|
49
|
+
white-space: nowrap;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
* `gogBadge`'s classes, global for the same reason as `gog-collapsible`'s below: the
|
|
54
|
+
* directive appends its badge into a *consumer's* element, which is light DOM belonging to
|
|
55
|
+
* that consumer's view, so a scoped stylesheet could never reach it.
|
|
56
|
+
*/
|
|
57
|
+
.gog-badge-host {
|
|
58
|
+
/* The badge is positioned against this element, so it has to be a containing block.
|
|
59
|
+
Harmless on an already-relative host; a host that is itself absolutely positioned
|
|
60
|
+
should set its own position after this class, which ordinary specificity allows. */
|
|
61
|
+
position: relative;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.gog-badge {
|
|
65
|
+
position: absolute;
|
|
66
|
+
z-index: var(--gog-badge-z);
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
box-sizing: border-box;
|
|
71
|
+
min-width: var(--gog-badge-size);
|
|
72
|
+
height: var(--gog-badge-size);
|
|
73
|
+
padding-inline: var(--gog-badge-padding-inline);
|
|
74
|
+
border: var(--gog-badge-border-width) var(--gog-badge-border-style) var(--gog-badge-border-color);
|
|
75
|
+
border-radius: var(--gog-badge-radius);
|
|
76
|
+
background-color: var(--gog-badge-bg, var(--gog-badge-variant-bg, var(--gog-badge-danger-bg)));
|
|
77
|
+
color: var(--gog-badge-color, var(--gog-badge-variant-color, var(--gog-badge-danger-color)));
|
|
78
|
+
font-family: var(--gog-badge-font-family);
|
|
79
|
+
font-size: var(--gog-badge-font-size);
|
|
80
|
+
font-weight: var(--gog-badge-font-weight);
|
|
81
|
+
line-height: var(--gog-badge-line-height);
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
white-space: nowrap;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* A dot carries no text, so it collapses to a circle and drops its padding. */
|
|
87
|
+
.gog-badge--dot {
|
|
88
|
+
min-width: var(--gog-badge-dot-size);
|
|
89
|
+
width: var(--gog-badge-dot-size);
|
|
90
|
+
height: var(--gog-badge-dot-size);
|
|
91
|
+
padding-inline: 0;
|
|
92
|
+
border-radius: 50%;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Logical insets rather than a translate, so the corners follow the writing direction. */
|
|
96
|
+
.gog-badge--top-end {
|
|
97
|
+
top: calc(-1 * var(--gog-badge-offset));
|
|
98
|
+
inset-inline-end: calc(-1 * var(--gog-badge-offset));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.gog-badge--top-start {
|
|
102
|
+
top: calc(-1 * var(--gog-badge-offset));
|
|
103
|
+
inset-inline-start: calc(-1 * var(--gog-badge-offset));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.gog-badge--bottom-end {
|
|
107
|
+
bottom: calc(-1 * var(--gog-badge-offset));
|
|
108
|
+
inset-inline-end: calc(-1 * var(--gog-badge-offset));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.gog-badge--bottom-start {
|
|
112
|
+
bottom: calc(-1 * var(--gog-badge-offset));
|
|
113
|
+
inset-inline-start: calc(-1 * var(--gog-badge-offset));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.gog-badge--success {
|
|
117
|
+
--gog-badge-variant-bg: var(--gog-badge-success-bg);
|
|
118
|
+
--gog-badge-variant-color: var(--gog-badge-success-color);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.gog-badge--danger {
|
|
122
|
+
--gog-badge-variant-bg: var(--gog-badge-danger-bg);
|
|
123
|
+
--gog-badge-variant-color: var(--gog-badge-danger-color);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.gog-badge--warning {
|
|
127
|
+
--gog-badge-variant-bg: var(--gog-badge-warning-bg);
|
|
128
|
+
--gog-badge-variant-color: var(--gog-badge-warning-color);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.gog-badge--info {
|
|
132
|
+
--gog-badge-variant-bg: var(--gog-badge-info-bg);
|
|
133
|
+
--gog-badge-variant-color: var(--gog-badge-info-color);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/*
|
|
137
|
+
* `gog-collapsible`'s trigger/content classes, global rather than component-scoped: both
|
|
138
|
+
* are applied via `gogCollapsibleTrigger`/`gogCollapsibleContent` directives to elements a
|
|
139
|
+
* *consumer* projects into `<gog-collapsible>` — light DOM that belongs to the consumer's
|
|
140
|
+
* own view, not `gog-collapsible`'s, so a scoped stylesheet on the component itself would
|
|
141
|
+
* never reach it.
|
|
142
|
+
*/
|
|
143
|
+
.gog-collapsible__trigger {
|
|
144
|
+
cursor: pointer;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.gog-collapsible__trigger[aria-disabled='true'] {
|
|
148
|
+
cursor: not-allowed;
|
|
149
|
+
opacity: var(--gog-collapsible-disabled-opacity);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.gog-collapsible__content {
|
|
153
|
+
/*
|
|
154
|
+
* Lets the `max-height` transition below run to `max-content` — the default of
|
|
155
|
+
* `--gog-collapsible-max-height` — instead of refusing to animate to an intrinsic keyword.
|
|
156
|
+
* That default is what keeps an open panel from clipping its content at an arbitrary
|
|
157
|
+
* number; this property is only what makes the same value animate.
|
|
158
|
+
*
|
|
159
|
+
* Declared here rather than on `:root`: the property is inherited, and a component library
|
|
160
|
+
* has no business switching keyword interpolation on for a consumer's whole document. It
|
|
161
|
+
* does inherit into this panel's own descendants, which is harmless — it changes nothing
|
|
162
|
+
* for an element that is not animating to or from an intrinsic size.
|
|
163
|
+
*
|
|
164
|
+
* Unsupported browsers ignore it and the panel snaps open, exactly as it does when a
|
|
165
|
+
* consumer sets `--gog-collapsible-max-height: none`.
|
|
166
|
+
*/
|
|
167
|
+
interpolate-size: allow-keywords;
|
|
168
|
+
max-height: 0;
|
|
169
|
+
opacity: 0;
|
|
170
|
+
overflow: hidden;
|
|
171
|
+
transition:
|
|
172
|
+
max-height var(--gog-collapsible-transition-duration) var(--gog-easing),
|
|
173
|
+
opacity var(--gog-collapsible-transition-duration) var(--gog-easing);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.gog-collapsible__content--open {
|
|
177
|
+
max-height: var(--gog-collapsible-max-height);
|
|
178
|
+
opacity: 1;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@media (prefers-reduced-motion: reduce) {
|
|
182
|
+
.gog-collapsible__content {
|
|
183
|
+
transition: none;
|
|
184
|
+
}
|
|
185
|
+
}
|
package/styles/theme.css
CHANGED
|
@@ -400,10 +400,15 @@
|
|
|
400
400
|
rules (they style content this component's consumer projects, which sits outside
|
|
401
401
|
`gog-collapsible`'s own view and can't be reached by its scoped stylesheet). */
|
|
402
402
|
--gog-collapsible-transition-duration: var(--gog-duration-slow);
|
|
403
|
-
/*
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
403
|
+
/* The panel's natural height, so an open panel never truncates whatever it holds. This was
|
|
404
|
+
a fixed `480px` cap, which bought the CSS-only transition an animatable target but paid
|
|
405
|
+
for it by silently clipping any taller content — `overflow: hidden` means no scrollbar
|
|
406
|
+
and no other sign that the rest of the panel is missing. `max-content` still animates,
|
|
407
|
+
via `interpolate-size: allow-keywords` on the content element (see utilities.css); where
|
|
408
|
+
that is unsupported the panel snaps open instead of easing, which is the right way round
|
|
409
|
+
for the trade — losing an animation is visible and harmless, losing content is neither.
|
|
410
|
+
Set a length here to cap a particular panel on purpose; it will clip, as before. */
|
|
411
|
+
--gog-collapsible-max-height: max-content;
|
|
407
412
|
--gog-collapsible-disabled-opacity: var(--gog-disabled-opacity);
|
|
408
413
|
|
|
409
414
|
/* ── Button ────────────────────────────────────────────────────────────────
|
|
@@ -436,7 +441,10 @@
|
|
|
436
441
|
--gog-btn-primary-hover-color: var(--gog-btn-primary-color);
|
|
437
442
|
--gog-btn-primary-hover-shadow: 0 0 16px
|
|
438
443
|
color-mix(in srgb, var(--gog-accent-bright) 45%, transparent);
|
|
439
|
-
|
|
444
|
+
/* The label's colour, not the page's. `--gog-text-color` is the colour of text on the page
|
|
445
|
+
background, and a filled button is not the page background — on the dark theme that put pale
|
|
446
|
+
parchment on bright amber, which read as a washed-out spinner beside a near-black label. */
|
|
447
|
+
--gog-btn-primary-spinner-color: var(--gog-btn-primary-color);
|
|
440
448
|
|
|
441
449
|
--gog-btn-secondary-bg: var(--gog-secondary-color);
|
|
442
450
|
--gog-btn-secondary-color: var(--gog-accent-text-color, var(--gog-primary-color));
|
|
@@ -445,7 +453,8 @@
|
|
|
445
453
|
--gog-btn-secondary-hover-bg: var(--gog-accent-color);
|
|
446
454
|
--gog-btn-secondary-hover-color: var(--gog-btn-secondary-color);
|
|
447
455
|
--gog-btn-secondary-hover-shadow: none;
|
|
448
|
-
|
|
456
|
+
/* Same reasoning as primary: the other filled variant, the same mismatch. */
|
|
457
|
+
--gog-btn-secondary-spinner-color: var(--gog-btn-secondary-color);
|
|
449
458
|
|
|
450
459
|
--gog-btn-outline-bg: transparent;
|
|
451
460
|
--gog-btn-outline-color: var(--gog-accent-color);
|