@orange-halo/components 1.0.0 → 2.1.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/custom-elements.json +3182 -73
- package/dist/base.js +3 -3
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/oh-accordion.js +33 -33
- package/dist/oh-alert.js +26 -26
- package/dist/oh-badge.js +11 -11
- package/dist/oh-breadcrumb.js +20 -20
- package/dist/oh-button.d.ts +7 -1
- package/dist/oh-button.d.ts.map +1 -1
- package/dist/oh-button.js +118 -89
- package/dist/oh-button.js.map +1 -1
- package/dist/oh-card.d.ts.map +1 -1
- package/dist/oh-card.js +38 -66
- package/dist/oh-card.js.map +1 -1
- package/dist/oh-checkbox-group.d.ts +8 -0
- package/dist/oh-checkbox-group.d.ts.map +1 -1
- package/dist/oh-checkbox-group.figma.js +1 -1
- package/dist/oh-checkbox-group.figma.js.map +1 -1
- package/dist/oh-checkbox-group.js +40 -26
- package/dist/oh-checkbox-group.js.map +1 -1
- package/dist/oh-checkbox.d.ts +11 -2
- package/dist/oh-checkbox.d.ts.map +1 -1
- package/dist/oh-checkbox.js +44 -28
- package/dist/oh-checkbox.js.map +1 -1
- package/dist/oh-container.d.ts +5 -5
- package/dist/oh-container.js +15 -15
- package/dist/oh-drawer.d.ts +7 -2
- package/dist/oh-drawer.d.ts.map +1 -1
- package/dist/oh-drawer.js +52 -25
- package/dist/oh-drawer.js.map +1 -1
- package/dist/oh-footer.d.ts +5 -0
- package/dist/oh-footer.d.ts.map +1 -1
- package/dist/oh-footer.js +9 -4
- package/dist/oh-footer.js.map +1 -1
- package/dist/oh-hero.d.ts +5 -0
- package/dist/oh-hero.d.ts.map +1 -1
- package/dist/oh-hero.js +55 -51
- package/dist/oh-hero.js.map +1 -1
- package/dist/oh-icon.js +9 -9
- package/dist/oh-input.d.ts +11 -3
- package/dist/oh-input.d.ts.map +1 -1
- package/dist/oh-input.figma.js +2 -2
- package/dist/oh-input.figma.js.map +1 -1
- package/dist/oh-input.js +49 -37
- package/dist/oh-input.js.map +1 -1
- package/dist/oh-link.d.ts +1 -1
- package/dist/oh-link.js +35 -35
- package/dist/oh-modal.d.ts +10 -4
- package/dist/oh-modal.d.ts.map +1 -1
- package/dist/oh-modal.js +75 -72
- package/dist/oh-modal.js.map +1 -1
- package/dist/oh-navbar.d.ts.map +1 -1
- package/dist/oh-navbar.js +4 -5
- package/dist/oh-navbar.js.map +1 -1
- package/dist/oh-progress.d.ts.map +1 -1
- package/dist/oh-progress.js +21 -35
- package/dist/oh-progress.js.map +1 -1
- package/dist/oh-radio-group.d.ts +8 -0
- package/dist/oh-radio-group.d.ts.map +1 -1
- package/dist/oh-radio-group.js +40 -26
- package/dist/oh-radio-group.js.map +1 -1
- package/dist/oh-radio.d.ts +10 -1
- package/dist/oh-radio.d.ts.map +1 -1
- package/dist/oh-radio.js +44 -28
- package/dist/oh-radio.js.map +1 -1
- package/dist/oh-select.d.ts +10 -2
- package/dist/oh-select.d.ts.map +1 -1
- package/dist/oh-select.js +51 -32
- package/dist/oh-select.js.map +1 -1
- package/dist/oh-skip-link.d.ts.map +1 -1
- package/dist/oh-skip-link.js +15 -14
- package/dist/oh-skip-link.js.map +1 -1
- package/dist/oh-tabs.js +15 -15
- package/dist/oh-toggle.d.ts +5 -2
- package/dist/oh-toggle.d.ts.map +1 -1
- package/dist/oh-toggle.js +18 -20
- package/dist/oh-toggle.js.map +1 -1
- package/dist/styles/typography.js +50 -50
- package/package.json +15 -4
package/dist/oh-input.js
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* DESIGN DECISIONS:
|
|
8
8
|
* ─────────────────
|
|
9
9
|
* 1. CHUNKY & CONFIDENT
|
|
10
|
-
* - Thick border (
|
|
10
|
+
* - Thick border (stroke.control) that feels illustrative
|
|
11
11
|
* - Solid fill, no subtle gradients
|
|
12
|
-
* -
|
|
12
|
+
* - shape.control corners (matches button)
|
|
13
13
|
*
|
|
14
14
|
* 2. INSET SHADOW (PRESSED IN)
|
|
15
15
|
* - Shadow offset to top-left (inset)
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* 3. FOCUS RISES UP
|
|
20
20
|
* - Inset shadow disappears
|
|
21
21
|
* - Outset shadow appears (field lifts)
|
|
22
|
-
* - Border turns
|
|
22
|
+
* - Border turns brand orange
|
|
23
23
|
* - Clear visual hierarchy
|
|
24
24
|
*
|
|
25
25
|
* @element oh-input
|
|
@@ -31,7 +31,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
31
31
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
32
32
|
};
|
|
33
33
|
import { html, css, nothing } from "lit";
|
|
34
|
-
import { customElement, property, query } from "lit/decorators.js";
|
|
34
|
+
import { customElement, property, query, state } from "lit/decorators.js";
|
|
35
35
|
import { OhElement, baseStyles } from "./base.js";
|
|
36
36
|
let OhInput = class OhInput extends OhElement {
|
|
37
37
|
constructor() {
|
|
@@ -48,6 +48,12 @@ let OhInput = class OhInput extends OhElement {
|
|
|
48
48
|
* Values: 'hover' | 'focus'
|
|
49
49
|
*/
|
|
50
50
|
this.forceState = "default";
|
|
51
|
+
/**
|
|
52
|
+
* Errors that appear after first render (e.g. on submit) are announced via
|
|
53
|
+
* role="alert". Errors present on page load are only linked with
|
|
54
|
+
* aria-describedby, so they aren't read out unprompted.
|
|
55
|
+
*/
|
|
56
|
+
this._announceError = false;
|
|
51
57
|
}
|
|
52
58
|
static { this.styles = [
|
|
53
59
|
baseStyles,
|
|
@@ -69,11 +75,11 @@ let OhInput = class OhInput extends OhElement {
|
|
|
69
75
|
|
|
70
76
|
/* ─── Label: friendly and readable (16px minimum) ─── */
|
|
71
77
|
.label {
|
|
72
|
-
font-family: var(--oh-font-family
|
|
73
|
-
font-size: var(--oh-font-size-
|
|
74
|
-
font-weight: var(--oh-font-weight
|
|
78
|
+
font-family: var(--oh-typography-control-font-family);
|
|
79
|
+
font-size: var(--oh-typography-control-font-size-sm);
|
|
80
|
+
font-weight: var(--oh-typography-control-font-weight);
|
|
75
81
|
color: var(--oh-color-text-primary);
|
|
76
|
-
letter-spacing: var(--oh-
|
|
82
|
+
letter-spacing: var(--oh-typography-control-letter-spacing);
|
|
77
83
|
}
|
|
78
84
|
|
|
79
85
|
.label--required::after {
|
|
@@ -88,7 +94,7 @@ let OhInput = class OhInput extends OhElement {
|
|
|
88
94
|
|
|
89
95
|
.input {
|
|
90
96
|
width: 100%;
|
|
91
|
-
font-family: var(--oh-font-family
|
|
97
|
+
font-family: var(--oh-typography-control-font-family);
|
|
92
98
|
color: var(--oh-color-text-primary);
|
|
93
99
|
|
|
94
100
|
/* Solid fill — no gradients */
|
|
@@ -96,10 +102,10 @@ let OhInput = class OhInput extends OhElement {
|
|
|
96
102
|
|
|
97
103
|
/* Thick illustrative border (WCAG 3:1 compliant) */
|
|
98
104
|
border: var(--oh-input-base-border-width) solid var(--oh-color-border-emphasis);
|
|
99
|
-
border-radius: var(--oh-
|
|
105
|
+
border-radius: var(--oh-shape-control);
|
|
100
106
|
|
|
101
107
|
/* Inset offset shadow: pressed into page */
|
|
102
|
-
box-shadow: var(--oh-
|
|
108
|
+
box-shadow: inset var(--oh-elevation-offset-md) var(--oh-elevation-offset-md) 0 0 var(--oh-shadow-field);
|
|
103
109
|
|
|
104
110
|
transition:
|
|
105
111
|
border-color var(--oh-motion-snappy) ease,
|
|
@@ -119,11 +125,11 @@ let OhInput = class OhInput extends OhElement {
|
|
|
119
125
|
/* ─── Focus: even inner ring on all sides (no layout shift) ─── */
|
|
120
126
|
.input:focus {
|
|
121
127
|
outline: none;
|
|
122
|
-
background-color: var(--oh-color-surface-
|
|
123
|
-
border-color: var(--oh-
|
|
128
|
+
background-color: var(--oh-color-surface-highlight);
|
|
129
|
+
border-color: var(--oh-focus-ring-color);
|
|
124
130
|
|
|
125
|
-
/*
|
|
126
|
-
box-shadow: inset 0 0 0 2px var(--oh-
|
|
131
|
+
/* Inset ring + border, even on all sides */
|
|
132
|
+
box-shadow: inset 0 0 0 2px var(--oh-focus-ring-color);
|
|
127
133
|
}
|
|
128
134
|
|
|
129
135
|
/* ═══════════════════════════════════════════════════════════════
|
|
@@ -131,7 +137,7 @@ let OhInput = class OhInput extends OhElement {
|
|
|
131
137
|
═══════════════════════════════════════════════════════════════ */
|
|
132
138
|
|
|
133
139
|
.input {
|
|
134
|
-
font-size: var(--oh-font-size-
|
|
140
|
+
font-size: var(--oh-typography-control-font-size-md);
|
|
135
141
|
padding: var(--oh-spacing-3) var(--oh-spacing-4);
|
|
136
142
|
min-height: var(--oh-input-size-md-min-height);
|
|
137
143
|
}
|
|
@@ -144,7 +150,7 @@ let OhInput = class OhInput extends OhElement {
|
|
|
144
150
|
.input--error {
|
|
145
151
|
border-color: var(--oh-color-feedback-error);
|
|
146
152
|
background-color: var(--oh-color-feedback-error-subtle);
|
|
147
|
-
box-shadow: inset
|
|
153
|
+
box-shadow: inset var(--oh-elevation-offset-md) var(--oh-elevation-offset-md) 0 0 var(--oh-shadow-error);
|
|
148
154
|
}
|
|
149
155
|
|
|
150
156
|
.input--error:focus {
|
|
@@ -157,10 +163,10 @@ let OhInput = class OhInput extends OhElement {
|
|
|
157
163
|
═══════════════════════════════════════════════════════════════ */
|
|
158
164
|
|
|
159
165
|
.helper {
|
|
160
|
-
font-family: var(--oh-font-family
|
|
161
|
-
font-size: var(--oh-font-size
|
|
166
|
+
font-family: var(--oh-typography-body-font-family);
|
|
167
|
+
font-size: var(--oh-typography-body-base-font-size);
|
|
162
168
|
color: var(--oh-color-text-secondary);
|
|
163
|
-
letter-spacing: var(--oh-
|
|
169
|
+
letter-spacing: var(--oh-typography-control-letter-spacing);
|
|
164
170
|
}
|
|
165
171
|
|
|
166
172
|
.helper--error {
|
|
@@ -197,14 +203,14 @@ let OhInput = class OhInput extends OhElement {
|
|
|
197
203
|
|
|
198
204
|
/* Forced Focus */
|
|
199
205
|
:host([force-state="focus"]) .input {
|
|
200
|
-
background-color: var(--oh-color-surface-
|
|
201
|
-
border-color: var(--oh-
|
|
202
|
-
box-shadow: inset 0 0 0 2px var(--oh-
|
|
206
|
+
background-color: var(--oh-color-surface-highlight);
|
|
207
|
+
border-color: var(--oh-focus-ring-color);
|
|
208
|
+
box-shadow: inset 0 0 0 2px var(--oh-focus-ring-color);
|
|
203
209
|
}
|
|
204
210
|
|
|
205
211
|
/* Error + Forced Hover */
|
|
206
212
|
:host([force-state="hover"]) .input--error {
|
|
207
|
-
border-color: var(--oh-color-feedback-error-hover
|
|
213
|
+
border-color: var(--oh-color-feedback-error-hover);
|
|
208
214
|
}
|
|
209
215
|
|
|
210
216
|
/* Error + Forced Focus */
|
|
@@ -228,6 +234,11 @@ let OhInput = class OhInput extends OhElement {
|
|
|
228
234
|
blur() {
|
|
229
235
|
this._input?.blur();
|
|
230
236
|
}
|
|
237
|
+
willUpdate(changed) {
|
|
238
|
+
if (this.hasUpdated && changed.has("errorText")) {
|
|
239
|
+
this._announceError = !!this.errorText;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
231
242
|
render() {
|
|
232
243
|
const hasError = !!this.errorText;
|
|
233
244
|
const helperContent = hasError ? this.errorText : this.helperText;
|
|
@@ -263,25 +274,23 @@ let OhInput = class OhInput extends OhElement {
|
|
|
263
274
|
@change=${this._handleChange}
|
|
264
275
|
/>
|
|
265
276
|
|
|
266
|
-
${
|
|
277
|
+
${hasError
|
|
267
278
|
? html `
|
|
268
|
-
<span
|
|
279
|
+
<span
|
|
269
280
|
id="helper"
|
|
270
|
-
class="helper
|
|
281
|
+
class="helper helper--error"
|
|
271
282
|
part="helper"
|
|
272
|
-
role=${
|
|
283
|
+
role=${this._announceError ? "alert" : nothing}
|
|
273
284
|
>
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
</svg>
|
|
279
|
-
`
|
|
280
|
-
: nothing}
|
|
281
|
-
${helperContent}
|
|
285
|
+
<svg class="error-icon" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
286
|
+
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd" />
|
|
287
|
+
</svg>
|
|
288
|
+
${this.errorText}
|
|
282
289
|
</span>
|
|
283
290
|
`
|
|
284
|
-
:
|
|
291
|
+
: this.helperText
|
|
292
|
+
? html `<span id="helper" class="helper" part="helper">${this.helperText}</span>`
|
|
293
|
+
: nothing}
|
|
285
294
|
</div>
|
|
286
295
|
`;
|
|
287
296
|
}
|
|
@@ -313,6 +322,9 @@ __decorate([
|
|
|
313
322
|
__decorate([
|
|
314
323
|
query("input")
|
|
315
324
|
], OhInput.prototype, "_input", void 0);
|
|
325
|
+
__decorate([
|
|
326
|
+
state()
|
|
327
|
+
], OhInput.prototype, "_announceError", void 0);
|
|
316
328
|
OhInput = __decorate([
|
|
317
329
|
customElement("oh-input")
|
|
318
330
|
], OhInput);
|
package/dist/oh-input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oh-input.js","sourceRoot":"","sources":["../src/oh-input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"oh-input.js","sourceRoot":"","sources":["../src/oh-input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,SAAS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AAU;gBACf,CAAC,CAAC,IAAI,CAAA,kDAAkD,IAAI,CAAC,UAAU,SAAS;gBAChF,CAAC,CAAC,OAAO;;KAEhB,CAAC;IACJ,CAAC;;AAtHD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qCACF;AAGzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCAChB;AAGX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CACV;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCAChB;AAGX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACX;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CACZ;AAGf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAC1B;AAOjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;2CACjC;AAG3B;IADP,KAAK,CAAC,OAAO,CAAC;uCACmB;AA0B1B;IADP,KAAK,EAAE;+CACuB;AA9NpB,OAAO;IADnB,aAAa,CAAC,UAAU,CAAC;GACb,OAAO,CA+RnB"}
|
package/dist/oh-link.d.ts
CHANGED
package/dist/oh-link.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* 1. INLINE VARIANT
|
|
10
10
|
* - Dotted underline (quirky, retro feel)
|
|
11
11
|
* - Becomes solid on hover
|
|
12
|
-
* - Warm
|
|
12
|
+
* - Warm brand orange
|
|
13
13
|
* - Subtle but distinctive
|
|
14
14
|
*
|
|
15
15
|
* 2. STANDALONE VARIANT
|
|
@@ -57,8 +57,8 @@ let OhLink = class OhLink extends OhElement {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.link {
|
|
60
|
-
font-family: var(--oh-font-family
|
|
61
|
-
color: var(--oh-color-
|
|
60
|
+
font-family: var(--oh-typography-body-font-family);
|
|
61
|
+
color: var(--oh-color-text-link);
|
|
62
62
|
text-decoration: none;
|
|
63
63
|
cursor: pointer;
|
|
64
64
|
position: relative;
|
|
@@ -81,13 +81,13 @@ let OhLink = class OhLink extends OhElement {
|
|
|
81
81
|
left: 0;
|
|
82
82
|
right: 0;
|
|
83
83
|
bottom: 0;
|
|
84
|
-
height:
|
|
84
|
+
height: var(--oh-decoration-underline-thickness);
|
|
85
85
|
background: repeating-linear-gradient(
|
|
86
86
|
to right,
|
|
87
|
-
var(--oh-color-
|
|
88
|
-
var(--oh-color-
|
|
89
|
-
transparent
|
|
90
|
-
transparent
|
|
87
|
+
var(--oh-color-text-link) 0,
|
|
88
|
+
var(--oh-color-text-link) var(--oh-decoration-underline-dash),
|
|
89
|
+
transparent var(--oh-decoration-underline-dash),
|
|
90
|
+
transparent var(--oh-decoration-underline-period)
|
|
91
91
|
);
|
|
92
92
|
transform-origin: right;
|
|
93
93
|
transform: scaleX(1);
|
|
@@ -126,7 +126,7 @@ let OhLink = class OhLink extends OhElement {
|
|
|
126
126
|
.link--inline:focus .link__text::after {
|
|
127
127
|
/* Solid underline on focus */
|
|
128
128
|
background: var(--oh-color-brand-primary);
|
|
129
|
-
height:
|
|
129
|
+
height: var(--oh-decoration-underline-focus-thickness);
|
|
130
130
|
transform: scaleX(1);
|
|
131
131
|
}
|
|
132
132
|
|
|
@@ -138,12 +138,12 @@ let OhLink = class OhLink extends OhElement {
|
|
|
138
138
|
.link--inline:focus:not(:focus-visible) .link__text::after {
|
|
139
139
|
background: repeating-linear-gradient(
|
|
140
140
|
to right,
|
|
141
|
-
var(--oh-color-
|
|
142
|
-
var(--oh-color-
|
|
143
|
-
transparent
|
|
144
|
-
transparent
|
|
141
|
+
var(--oh-color-text-link) 0,
|
|
142
|
+
var(--oh-color-text-link) var(--oh-decoration-underline-dash),
|
|
143
|
+
transparent var(--oh-decoration-underline-dash),
|
|
144
|
+
transparent var(--oh-decoration-underline-period)
|
|
145
145
|
);
|
|
146
|
-
height:
|
|
146
|
+
height: var(--oh-decoration-underline-thickness);
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
/* ═══════════════════════════════════════════════════════════════
|
|
@@ -155,8 +155,8 @@ let OhLink = class OhLink extends OhElement {
|
|
|
155
155
|
display: inline-flex;
|
|
156
156
|
align-items: center;
|
|
157
157
|
gap: var(--oh-spacing-2);
|
|
158
|
-
font-weight: var(--oh-font-weight
|
|
159
|
-
font-size: var(--oh-font-size
|
|
158
|
+
font-weight: var(--oh-typography-emphasis-font-weight);
|
|
159
|
+
font-size: var(--oh-typography-body-lg-font-size);
|
|
160
160
|
text-decoration: none;
|
|
161
161
|
padding: var(--oh-spacing-1) 0;
|
|
162
162
|
}
|
|
@@ -174,14 +174,14 @@ let OhLink = class OhLink extends OhElement {
|
|
|
174
174
|
outline: 2px solid transparent;
|
|
175
175
|
outline-offset: 2px;
|
|
176
176
|
background-color: var(--oh-focus-glow-color);
|
|
177
|
-
border-radius: var(--oh-
|
|
177
|
+
border-radius: var(--oh-shape-tight);
|
|
178
178
|
padding: var(--oh-spacing-1) var(--oh-spacing-2);
|
|
179
179
|
margin: 0 calc(-1 * var(--oh-spacing-2));
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
.link--standalone:focus .link__text::after {
|
|
183
183
|
background: var(--oh-color-brand-primary);
|
|
184
|
-
height:
|
|
184
|
+
height: var(--oh-decoration-underline-focus-thickness);
|
|
185
185
|
transform: scaleX(1);
|
|
186
186
|
}
|
|
187
187
|
|
|
@@ -195,12 +195,12 @@ let OhLink = class OhLink extends OhElement {
|
|
|
195
195
|
.link--standalone:focus:not(:focus-visible) .link__text::after {
|
|
196
196
|
background: repeating-linear-gradient(
|
|
197
197
|
to right,
|
|
198
|
-
var(--oh-color-
|
|
199
|
-
var(--oh-color-
|
|
200
|
-
transparent
|
|
201
|
-
transparent
|
|
198
|
+
var(--oh-color-text-link) 0,
|
|
199
|
+
var(--oh-color-text-link) var(--oh-decoration-underline-dash),
|
|
200
|
+
transparent var(--oh-decoration-underline-dash),
|
|
201
|
+
transparent var(--oh-decoration-underline-period)
|
|
202
202
|
);
|
|
203
|
-
height:
|
|
203
|
+
height: var(--oh-decoration-underline-thickness);
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
/* ═══════════════════════════════════════════════════════════════
|
|
@@ -253,7 +253,7 @@ let OhLink = class OhLink extends OhElement {
|
|
|
253
253
|
═══════════════════════════════════════════════════════════════ */
|
|
254
254
|
|
|
255
255
|
.link:visited {
|
|
256
|
-
color: var(--oh-color-
|
|
256
|
+
color: var(--oh-color-text-link);
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
/* ═══════════════════════════════════════════════════════════════
|
|
@@ -273,14 +273,14 @@ let OhLink = class OhLink extends OhElement {
|
|
|
273
273
|
background: repeating-linear-gradient(
|
|
274
274
|
to right,
|
|
275
275
|
var(--oh-color-text-on-accent) 0,
|
|
276
|
-
var(--oh-color-text-on-accent)
|
|
277
|
-
transparent
|
|
278
|
-
transparent
|
|
276
|
+
var(--oh-color-text-on-accent) var(--oh-decoration-underline-dash),
|
|
277
|
+
transparent var(--oh-decoration-underline-dash),
|
|
278
|
+
transparent var(--oh-decoration-underline-period)
|
|
279
279
|
);
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
:host([inverse]) .link--inline:focus {
|
|
283
|
-
background-color:
|
|
283
|
+
background-color: var(--oh-link-inverse-focus-background);
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
:host([inverse]) .link--inline:focus .link__text::after {
|
|
@@ -295,14 +295,14 @@ let OhLink = class OhLink extends OhElement {
|
|
|
295
295
|
background: repeating-linear-gradient(
|
|
296
296
|
to right,
|
|
297
297
|
var(--oh-color-text-on-accent) 0,
|
|
298
|
-
var(--oh-color-text-on-accent)
|
|
299
|
-
transparent
|
|
300
|
-
transparent
|
|
298
|
+
var(--oh-color-text-on-accent) var(--oh-decoration-underline-dash),
|
|
299
|
+
transparent var(--oh-decoration-underline-dash),
|
|
300
|
+
transparent var(--oh-decoration-underline-period)
|
|
301
301
|
);
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
:host([inverse]) .link--standalone:focus {
|
|
305
|
-
background-color:
|
|
305
|
+
background-color: var(--oh-link-inverse-focus-background);
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
:host([inverse]) .link--standalone:focus .link__text::after {
|
|
@@ -317,9 +317,9 @@ let OhLink = class OhLink extends OhElement {
|
|
|
317
317
|
background: repeating-linear-gradient(
|
|
318
318
|
to right,
|
|
319
319
|
var(--oh-color-text-on-accent) 0,
|
|
320
|
-
var(--oh-color-text-on-accent)
|
|
321
|
-
transparent
|
|
322
|
-
transparent
|
|
320
|
+
var(--oh-color-text-on-accent) var(--oh-decoration-underline-dash),
|
|
321
|
+
transparent var(--oh-decoration-underline-dash),
|
|
322
|
+
transparent var(--oh-decoration-underline-period)
|
|
323
323
|
);
|
|
324
324
|
}
|
|
325
325
|
|
package/dist/oh-modal.d.ts
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* DESIGN DECISIONS:
|
|
7
7
|
* ─────────────────
|
|
8
8
|
* 1. CHUNKY & LIFTED
|
|
9
|
-
* -
|
|
10
|
-
* - Offset shadow (
|
|
9
|
+
* - stroke.control border like other components
|
|
10
|
+
* - Offset shadow (elevation.offset.2xl) — feels like a lifted surface
|
|
11
11
|
* - Warm backdrop, not pure black
|
|
12
12
|
*
|
|
13
13
|
* 2. ACCESSIBLE
|
|
14
|
-
* - Focus trap when open
|
|
14
|
+
* - Focus trap when open (focus guards at each end of the dialog)
|
|
15
15
|
* - Escape key closes (when dismissible)
|
|
16
16
|
* - Focus returns to trigger on close
|
|
17
17
|
* - role="dialog" + aria-modal="true"
|
|
@@ -38,8 +38,14 @@ export declare class OhModal extends OhElement {
|
|
|
38
38
|
private _onOpen;
|
|
39
39
|
private _onClose;
|
|
40
40
|
private _handleKeyDown;
|
|
41
|
-
|
|
41
|
+
/** Focusable elements in the dialog, in tab order, excluding the guards. */
|
|
42
42
|
private _getFocusableElements;
|
|
43
|
+
/**
|
|
44
|
+
* Focus guards: Tab past the last control lands on the end guard, which
|
|
45
|
+
* wraps to the first; Shift+Tab before the first wraps to the last. This
|
|
46
|
+
* holds however the browser orders Tab (Safari skips links by default).
|
|
47
|
+
*/
|
|
48
|
+
private _focusEdge;
|
|
43
49
|
private _focusFirstElement;
|
|
44
50
|
private _handleBackdropClick;
|
|
45
51
|
private _requestClose;
|
package/dist/oh-modal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oh-modal.d.ts","sourceRoot":"","sources":["../src/oh-modal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,EAAE,SAAS,EAAc,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"oh-modal.d.ts","sourceRoot":"","sources":["../src/oh-modal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,EAAE,SAAS,EAAc,MAAM,WAAW,CAAC;AAGlD,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C,qBACa,OAAQ,SAAQ,SAAS;IACpC,OAAgB,MAAM,4BA4OpB;IAGF,IAAI,UAAS;IAGb,OAAO,SAAM;IAGb,WAAW,UAAQ;IAGnB,IAAI,EAAE,SAAS,CAAQ;IAGvB,OAAO,CAAC,sBAAsB,CAA4B;IAI1D,OAAO,CAAC,YAAY,CAAqB;IAEzC,iBAAiB;IAKjB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAU/C,OAAO,CAAC,OAAO;IAwBf,OAAO,CAAC,QAAQ;IAchB,OAAO,CAAC,cAAc;IAOtB,4EAA4E;IAC5E,OAAO,CAAC,qBAAqB;IAK7B;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,aAAa;IAKrB,oBAAoB;IAMpB,MAAM;CAgEP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|