@orange-halo/components 2.1.0 → 3.0.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.
Files changed (130) hide show
  1. package/custom-elements.json +968 -362
  2. package/dist/base.d.ts.map +1 -1
  3. package/dist/base.js +1 -2
  4. package/dist/base.js.map +1 -1
  5. package/dist/index.d.ts +4 -8
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +2 -4
  8. package/dist/index.js.map +1 -1
  9. package/dist/oh-accordion.d.ts +53 -8
  10. package/dist/oh-accordion.d.ts.map +1 -1
  11. package/dist/oh-accordion.js +99 -29
  12. package/dist/oh-accordion.js.map +1 -1
  13. package/dist/oh-alert.d.ts +26 -8
  14. package/dist/oh-alert.d.ts.map +1 -1
  15. package/dist/oh-alert.js +96 -36
  16. package/dist/oh-alert.js.map +1 -1
  17. package/dist/oh-badge.d.ts +32 -13
  18. package/dist/oh-badge.d.ts.map +1 -1
  19. package/dist/oh-badge.js +38 -19
  20. package/dist/oh-badge.js.map +1 -1
  21. package/dist/oh-breadcrumb.d.ts +39 -12
  22. package/dist/oh-breadcrumb.d.ts.map +1 -1
  23. package/dist/oh-breadcrumb.js +66 -25
  24. package/dist/oh-breadcrumb.js.map +1 -1
  25. package/dist/oh-button.d.ts +49 -23
  26. package/dist/oh-button.d.ts.map +1 -1
  27. package/dist/oh-button.figma.js +1 -3
  28. package/dist/oh-button.figma.js.map +1 -1
  29. package/dist/oh-button.js +133 -82
  30. package/dist/oh-button.js.map +1 -1
  31. package/dist/oh-card.d.ts +47 -19
  32. package/dist/oh-card.d.ts.map +1 -1
  33. package/dist/oh-card.js +143 -96
  34. package/dist/oh-card.js.map +1 -1
  35. package/dist/oh-checkbox-group.d.ts +56 -12
  36. package/dist/oh-checkbox-group.d.ts.map +1 -1
  37. package/dist/oh-checkbox-group.figma.js +4 -6
  38. package/dist/oh-checkbox-group.figma.js.map +1 -1
  39. package/dist/oh-checkbox-group.js +114 -49
  40. package/dist/oh-checkbox-group.js.map +1 -1
  41. package/dist/oh-checkbox.d.ts +54 -17
  42. package/dist/oh-checkbox.d.ts.map +1 -1
  43. package/dist/oh-checkbox.js +117 -60
  44. package/dist/oh-checkbox.js.map +1 -1
  45. package/dist/oh-cluster.d.ts +19 -14
  46. package/dist/oh-cluster.d.ts.map +1 -1
  47. package/dist/oh-cluster.js +19 -19
  48. package/dist/oh-cluster.js.map +1 -1
  49. package/dist/oh-container.d.ts +19 -16
  50. package/dist/oh-container.d.ts.map +1 -1
  51. package/dist/oh-container.js +21 -23
  52. package/dist/oh-container.js.map +1 -1
  53. package/dist/oh-drawer.d.ts +28 -11
  54. package/dist/oh-drawer.d.ts.map +1 -1
  55. package/dist/oh-drawer.js +52 -24
  56. package/dist/oh-drawer.js.map +1 -1
  57. package/dist/oh-footer.d.ts +37 -18
  58. package/dist/oh-footer.d.ts.map +1 -1
  59. package/dist/oh-footer.js +38 -19
  60. package/dist/oh-footer.js.map +1 -1
  61. package/dist/oh-grid.d.ts +27 -14
  62. package/dist/oh-grid.d.ts.map +1 -1
  63. package/dist/oh-grid.js +28 -21
  64. package/dist/oh-grid.js.map +1 -1
  65. package/dist/oh-icon.d.ts +21 -5
  66. package/dist/oh-icon.d.ts.map +1 -1
  67. package/dist/oh-icon.js +27 -9
  68. package/dist/oh-icon.js.map +1 -1
  69. package/dist/oh-input.d.ts +110 -21
  70. package/dist/oh-input.d.ts.map +1 -1
  71. package/dist/oh-input.figma.js +2 -2
  72. package/dist/oh-input.figma.js.map +1 -1
  73. package/dist/oh-input.js +227 -71
  74. package/dist/oh-input.js.map +1 -1
  75. package/dist/oh-link.d.ts +42 -19
  76. package/dist/oh-link.d.ts.map +1 -1
  77. package/dist/oh-link.js +83 -38
  78. package/dist/oh-link.js.map +1 -1
  79. package/dist/oh-modal.d.ts +35 -6
  80. package/dist/oh-modal.d.ts.map +1 -1
  81. package/dist/oh-modal.js +90 -39
  82. package/dist/oh-modal.js.map +1 -1
  83. package/dist/oh-navbar.d.ts +42 -19
  84. package/dist/oh-navbar.d.ts.map +1 -1
  85. package/dist/oh-navbar.js +44 -20
  86. package/dist/oh-navbar.js.map +1 -1
  87. package/dist/oh-progress.d.ts +26 -7
  88. package/dist/oh-progress.d.ts.map +1 -1
  89. package/dist/oh-progress.js +35 -14
  90. package/dist/oh-progress.js.map +1 -1
  91. package/dist/oh-radio-group.d.ts +55 -13
  92. package/dist/oh-radio-group.d.ts.map +1 -1
  93. package/dist/oh-radio-group.figma.js +2 -2
  94. package/dist/oh-radio-group.figma.js.map +1 -1
  95. package/dist/oh-radio-group.js +122 -51
  96. package/dist/oh-radio-group.js.map +1 -1
  97. package/dist/oh-radio.d.ts +55 -17
  98. package/dist/oh-radio.d.ts.map +1 -1
  99. package/dist/oh-radio.js +120 -61
  100. package/dist/oh-radio.js.map +1 -1
  101. package/dist/oh-select.d.ts +59 -16
  102. package/dist/oh-select.d.ts.map +1 -1
  103. package/dist/oh-select.js +141 -69
  104. package/dist/oh-select.js.map +1 -1
  105. package/dist/oh-skip-link.d.ts +33 -15
  106. package/dist/oh-skip-link.d.ts.map +1 -1
  107. package/dist/oh-skip-link.js +43 -32
  108. package/dist/oh-skip-link.js.map +1 -1
  109. package/dist/oh-stack.d.ts +17 -14
  110. package/dist/oh-stack.d.ts.map +1 -1
  111. package/dist/oh-stack.js +18 -20
  112. package/dist/oh-stack.js.map +1 -1
  113. package/dist/oh-tabs.d.ts +55 -30
  114. package/dist/oh-tabs.d.ts.map +1 -1
  115. package/dist/oh-tabs.js +100 -76
  116. package/dist/oh-tabs.js.map +1 -1
  117. package/dist/oh-textarea.d.ts +129 -0
  118. package/dist/oh-textarea.d.ts.map +1 -0
  119. package/dist/oh-textarea.js +401 -0
  120. package/dist/oh-textarea.js.map +1 -0
  121. package/dist/oh-toggle.d.ts +45 -12
  122. package/dist/oh-toggle.d.ts.map +1 -1
  123. package/dist/oh-toggle.js +84 -34
  124. package/dist/oh-toggle.js.map +1 -1
  125. package/dist/styles/typography.js +1 -1
  126. package/package.json +7 -7
  127. package/dist/oh-hero.d.ts +0 -33
  128. package/dist/oh-hero.d.ts.map +0 -1
  129. package/dist/oh-hero.js +0 -246
  130. package/dist/oh-hero.js.map +0 -1
@@ -1,28 +1,23 @@
1
1
  /**
2
2
  * oh-checkbox
3
3
  *
4
- * A chunky, playful checkbox with hand-crafted feel.
5
- * Matches the inset/pressed aesthetic of oh-input.
6
- *
7
4
  * DESIGN DECISIONS:
8
5
  * ─────────────────
9
- * 1. CHUNKY & TACTILE
10
- * - Thick border (stroke.control)
11
- * - Inset shadow when unchecked (pressed into page)
12
- * - shape.compact corners (smaller than buttons)
6
+ * 1. LOOK FROM TOKENS
7
+ * - Border: stroke.control in color.border.emphasis
8
+ * - Corners: shape.compact (smaller than the other controls' shape.control)
9
+ * - Shadow: offset by elevation.offset.* in elevation.color.secondary; hover and
10
+ * press move the box by lift.hoverSm / lift.pressSm
13
11
  *
14
12
  * 2. CHECKED STATE
15
- * - Filled with primary color
16
- * - Custom chunky checkmark
17
- * - Shadow shifts to feel "activated"
13
+ * - Filled with color.brand.primary, a checkmark in color.text.onBrand,
14
+ * and the shadow in elevation.color.primary
18
15
  *
19
16
  * 3. ACCESSIBILITY
20
- * - Native checkbox hidden but accessible
17
+ * - A native checkbox, visually hidden but focusable and announced; the
18
+ * drawn box is decoration
21
19
  * - Label always required
22
- * - Focus ring matches input (even inner ring)
23
- * - Minimum touch target 44px
24
- *
25
- * @element oh-checkbox
20
+ * - Focus underlines the label (a solid indicator)
26
21
  */
27
22
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
28
23
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -33,6 +28,44 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
33
28
  import { html, css, nothing } from "lit";
34
29
  import { customElement, property, state } from "lit/decorators.js";
35
30
  import { OhElement, baseStyles } from "./base.js";
31
+ /**
32
+ * A single checkbox with its label, for turning one option on or off.
33
+ *
34
+ * **Use it for** one yes/no choice, such as agreeing to terms, or as part of
35
+ * a set where any number can be chosen. **Don't use it for** a set of
36
+ * related options on its own (use `oh-checkbox-group`, which adds the
37
+ * fieldset and legend), one choice from several (use `oh-radio-group`), or a
38
+ * setting that applies straight away (use `oh-toggle`).
39
+ *
40
+ * **States:** unchecked, checked, hover, active, focus, error (set `error-text`).
41
+ *
42
+ * **Behaviour:** clicking the box or the label toggles it, as does Space
43
+ * when it's focused. Each change sets `checked` and fires `oh-change`. The
44
+ * native `<input type="checkbox">` sits in the shadow root, so it doesn't
45
+ * submit with a native form: read `checked` or listen for `oh-change`. It
46
+ * has no `disabled` property.
47
+ *
48
+ * **Accessibility:** a real native checkbox, visually hidden, carries the
49
+ * role, state and keyboard behaviour; the drawn box is decoration. Always
50
+ * set `label`: it's the checkbox's name. Focus underlines the label. The
51
+ * error message shows under the checkbox with an icon, sets `aria-invalid`
52
+ * and is linked with `aria-describedby`; it's announced (`role="alert"`)
53
+ * only when it appears after first render.
54
+ *
55
+ * **Look:** set by tokens — `stroke.control` in `color.border.emphasis`
56
+ * (border), `shape.compact` (corners), `typography.control.*` (label),
57
+ * `elevation.offset.*` and `elevation.color.secondary` (shadow), `lift.hoverSm` /
58
+ * `lift.pressSm` (movement on hover and press), `color.border.hover`
59
+ * (hover), `color.brand.primary` (and its hover and active tokens),
60
+ * `color.text.onBrand` and `elevation.color.primary` (checked),
61
+ * `color.feedback.error` and `elevation.color.error` (error).
62
+ *
63
+ * @element oh-checkbox
64
+ * @fires oh-change - The checkbox was toggled. detail: { checked, value }
65
+ * @csspart box - The drawn checkbox
66
+ * @csspart label - The label text
67
+ * @csspart error - The error message
68
+ */
36
69
  let OhCheckbox = class OhCheckbox extends OhElement {
37
70
  constructor() {
38
71
  super(...arguments);
@@ -40,8 +73,11 @@ let OhCheckbox = class OhCheckbox extends OhElement {
40
73
  this.label = "";
41
74
  this.name = "";
42
75
  this.value = "";
43
- this.error = false;
44
- this.errorMessage = "";
76
+ /**
77
+ * Error shown with the control and linked to it. Setting it puts the
78
+ * control in its error state; clear it to leave that state.
79
+ */
80
+ this.errorText = "";
45
81
  /**
46
82
  * Force a visual state (for documentation/Figma sync only)
47
83
  * Values: 'hover' | 'focus'
@@ -58,11 +94,6 @@ let OhCheckbox = class OhCheckbox extends OhElement {
58
94
  static { this.styles = [
59
95
  baseStyles,
60
96
  css `
61
- /* ═══════════════════════════════════════════════════════════════
62
- ORANGE HALO CHECKBOX
63
- Chunky • Tactile • Playful
64
- ═══════════════════════════════════════════════════════════════ */
65
-
66
97
  :host {
67
98
  display: inline-block;
68
99
  }
@@ -96,25 +127,26 @@ let OhCheckbox = class OhCheckbox extends OhElement {
96
127
  width: 24px;
97
128
  height: 24px;
98
129
  flex-shrink: 0;
99
-
100
- /* Chunky border */
130
+
131
+ /* Border: stroke.control in color.border.emphasis */
101
132
  border: var(--oh-stroke-control) solid var(--oh-color-border-emphasis);
102
133
  border-radius: var(--oh-shape-compact);
103
-
104
- /* Offset shadow like primary button */
134
+
135
+ /* Offset shadow: elevation.offset.md in elevation.color.secondary */
105
136
  background-color: var(--oh-color-surface-base);
106
- box-shadow: var(--oh-elevation-offset-md) var(--oh-elevation-offset-md) 0 0 var(--oh-shadow-secondary);
107
-
108
- transition:
109
- transform var(--oh-motion-snappy) var(--oh-motion-ease-playful),
110
- box-shadow var(--oh-motion-snappy) var(--oh-motion-ease-playful),
137
+ box-shadow: var(--oh-elevation-offset-md) var(--oh-elevation-offset-md)
138
+ 0 0 var(--oh-elevation-color-secondary);
139
+
140
+ transition:
141
+ transform var(--oh-motion-snappy) var(--oh-motion-ease-emphasized),
142
+ box-shadow var(--oh-motion-snappy) var(--oh-motion-ease-emphasized),
111
143
  background-color var(--oh-motion-quick) ease,
112
144
  border-color var(--oh-motion-quick) ease;
113
145
  }
114
146
 
115
147
  /* Checkmark (hidden by default) */
116
148
  .checkbox-box::after {
117
- content: '';
149
+ content: "";
118
150
  position: absolute;
119
151
  top: 3px;
120
152
  left: 7px;
@@ -131,24 +163,27 @@ let OhCheckbox = class OhCheckbox extends OhElement {
131
163
  STATES
132
164
  ═══════════════════════════════════════════════════════════════ */
133
165
 
134
- /* Hover: lift up-left, shadow grows */
166
+ /* Hover: moves by lift.hoverSm; shadow offset elevation.offset.lg */
135
167
  .checkbox-wrapper:hover .checkbox-box {
136
168
  border-color: var(--oh-color-border-hover);
137
169
  transform: translate(var(--oh-lift-hover-sm), var(--oh-lift-hover-sm));
138
- box-shadow: var(--oh-elevation-offset-lg) var(--oh-elevation-offset-lg) 0 0 var(--oh-shadow-secondary);
170
+ box-shadow: var(--oh-elevation-offset-lg) var(--oh-elevation-offset-lg)
171
+ 0 0 var(--oh-elevation-color-secondary);
139
172
  }
140
173
 
141
- /* Active: press down-right, shadow shrinks */
174
+ /* Active: moves by lift.pressSm; shadow offset elevation.offset.xs */
142
175
  .checkbox-wrapper:active .checkbox-box {
143
176
  transform: translate(var(--oh-lift-press-sm), var(--oh-lift-press-sm));
144
- box-shadow: var(--oh-elevation-offset-xs) var(--oh-elevation-offset-xs) 0 0 var(--oh-shadow-secondary);
177
+ box-shadow: var(--oh-elevation-offset-xs) var(--oh-elevation-offset-xs)
178
+ 0 0 var(--oh-elevation-color-secondary);
145
179
  }
146
180
 
147
- /* Checked: primary color with warm shadow */
181
+ /* Checked: color.brand.primary fill, elevation.color.primary shadow */
148
182
  .native-checkbox:checked + .checkbox-box {
149
183
  background-color: var(--oh-color-brand-primary);
150
184
  border-color: var(--oh-color-brand-primary);
151
- box-shadow: var(--oh-elevation-offset-md) var(--oh-elevation-offset-md) 0 0 var(--oh-shadow-primary);
185
+ box-shadow: var(--oh-elevation-offset-md) var(--oh-elevation-offset-md)
186
+ 0 0 var(--oh-elevation-color-primary);
152
187
  }
153
188
 
154
189
  .native-checkbox:checked + .checkbox-box::after {
@@ -160,14 +195,16 @@ let OhCheckbox = class OhCheckbox extends OhElement {
160
195
  background-color: var(--oh-color-brand-primary-hover);
161
196
  border-color: var(--oh-color-brand-primary-hover);
162
197
  transform: translate(var(--oh-lift-hover-sm), var(--oh-lift-hover-sm));
163
- box-shadow: var(--oh-elevation-offset-lg) var(--oh-elevation-offset-lg) 0 0 var(--oh-shadow-primary);
198
+ box-shadow: var(--oh-elevation-offset-lg) var(--oh-elevation-offset-lg)
199
+ 0 0 var(--oh-elevation-color-primary);
164
200
  }
165
201
 
166
202
  /* Checked + Active */
167
203
  .checkbox-wrapper:active .native-checkbox:checked + .checkbox-box {
168
204
  background-color: var(--oh-color-brand-primary-active);
169
205
  transform: translate(var(--oh-lift-press-sm), var(--oh-lift-press-sm));
170
- box-shadow: var(--oh-elevation-offset-xs) var(--oh-elevation-offset-xs) 0 0 var(--oh-shadow-primary);
206
+ box-shadow: var(--oh-elevation-offset-xs) var(--oh-elevation-offset-xs)
207
+ 0 0 var(--oh-elevation-color-primary);
171
208
  }
172
209
 
173
210
  /* Focus: underline the label (accessible indicator) */
@@ -193,14 +230,16 @@ let OhCheckbox = class OhCheckbox extends OhElement {
193
230
  ERROR STATE
194
231
  ═══════════════════════════════════════════════════════════════ */
195
232
 
196
- :host([error]) .checkbox-box {
233
+ :host([data-invalid]) .checkbox-box {
197
234
  border-color: var(--oh-color-feedback-error);
198
- box-shadow: var(--oh-elevation-offset-md) var(--oh-elevation-offset-md) 0 0 var(--oh-shadow-error);
235
+ box-shadow: var(--oh-elevation-offset-md) var(--oh-elevation-offset-md)
236
+ 0 0 var(--oh-elevation-color-error);
199
237
  }
200
238
 
201
- :host([error]) .checkbox-wrapper:hover .checkbox-box {
239
+ :host([data-invalid]) .checkbox-wrapper:hover .checkbox-box {
202
240
  border-color: var(--oh-color-feedback-error-hover);
203
- box-shadow: var(--oh-elevation-offset-lg) var(--oh-elevation-offset-lg) 0 0 var(--oh-shadow-error);
241
+ box-shadow: var(--oh-elevation-offset-lg) var(--oh-elevation-offset-lg)
242
+ 0 0 var(--oh-elevation-color-error);
204
243
  }
205
244
 
206
245
  .error-message {
@@ -239,7 +278,8 @@ let OhCheckbox = class OhCheckbox extends OhElement {
239
278
  :host([force-state="hover"]) .checkbox-box {
240
279
  border-color: var(--oh-color-border-hover);
241
280
  transform: translate(var(--oh-lift-hover-sm), var(--oh-lift-hover-sm));
242
- box-shadow: var(--oh-elevation-offset-lg) var(--oh-elevation-offset-lg) 0 0 var(--oh-shadow-secondary);
281
+ box-shadow: var(--oh-elevation-offset-lg) var(--oh-elevation-offset-lg)
282
+ 0 0 var(--oh-elevation-color-secondary);
243
283
  }
244
284
 
245
285
  /* Forced Focus - Unchecked */
@@ -253,7 +293,8 @@ let OhCheckbox = class OhCheckbox extends OhElement {
253
293
  background-color: var(--oh-color-brand-primary-hover);
254
294
  border-color: var(--oh-color-brand-primary-hover);
255
295
  transform: translate(var(--oh-lift-hover-sm), var(--oh-lift-hover-sm));
256
- box-shadow: var(--oh-elevation-offset-lg) var(--oh-elevation-offset-lg) 0 0 var(--oh-shadow-primary);
296
+ box-shadow: var(--oh-elevation-offset-lg) var(--oh-elevation-offset-lg)
297
+ 0 0 var(--oh-elevation-color-primary);
257
298
  }
258
299
  `,
259
300
  ]; }
@@ -262,9 +303,14 @@ let OhCheckbox = class OhCheckbox extends OhElement {
262
303
  this.checked = target.checked;
263
304
  this.emit("oh-change", { checked: this.checked, value: this.value });
264
305
  }
306
+ updated(changed) {
307
+ // Styling hook for the error state (data-invalid on the host)
308
+ if (changed.has("errorText"))
309
+ this.toggleAttribute("data-invalid", !!this.errorText);
310
+ }
265
311
  willUpdate(changed) {
266
- if (this.hasUpdated && (changed.has("error") || changed.has("errorMessage"))) {
267
- this._announceError = !!(this.error && this.errorMessage);
312
+ if (this.hasUpdated && changed.has("errorText")) {
313
+ this._announceError = !!this.errorText;
268
314
  }
269
315
  }
270
316
  render() {
@@ -279,20 +325,34 @@ let OhCheckbox = class OhCheckbox extends OhElement {
279
325
  name=${this.name}
280
326
  .value=${this.value}
281
327
  .checked=${this.checked}
282
- aria-invalid=${this.error ? "true" : "false"}
283
- aria-describedby=${this.error && this.errorMessage ? this._errorId : nothing}
328
+ aria-invalid=${this.errorText ? "true" : "false"}
329
+ aria-describedby=${this.errorText ? this._errorId : nothing}
284
330
  @change=${this._handleChange}
285
331
  />
286
332
  <span class="checkbox-box" part="box"></span>
287
333
  <span class="label" part="label">${this.label}</span>
288
334
  </label>
289
- ${this.error && this.errorMessage
335
+ ${this.errorText
290
336
  ? html `
291
- <div id=${this._errorId} class="error-message" part="error" role=${this._announceError ? "alert" : nothing}>
292
- <svg class="error-icon" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
293
- <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" />
337
+ <div
338
+ id=${this._errorId}
339
+ class="error-message"
340
+ part="error"
341
+ role=${this._announceError ? "alert" : nothing}
342
+ >
343
+ <svg
344
+ class="error-icon"
345
+ viewBox="0 0 20 20"
346
+ fill="currentColor"
347
+ aria-hidden="true"
348
+ >
349
+ <path
350
+ fill-rule="evenodd"
351
+ 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"
352
+ clip-rule="evenodd"
353
+ />
294
354
  </svg>
295
- ${this.errorMessage}
355
+ ${this.errorText}
296
356
  </div>
297
357
  `
298
358
  : ""}
@@ -313,11 +373,8 @@ __decorate([
313
373
  property({ type: String })
314
374
  ], OhCheckbox.prototype, "value", void 0);
315
375
  __decorate([
316
- property({ type: Boolean, reflect: true })
317
- ], OhCheckbox.prototype, "error", void 0);
318
- __decorate([
319
- property({ type: String })
320
- ], OhCheckbox.prototype, "errorMessage", void 0);
376
+ property({ type: String, attribute: "error-text" })
377
+ ], OhCheckbox.prototype, "errorText", void 0);
321
378
  __decorate([
322
379
  property({ type: String, reflect: true, attribute: "force-state" })
323
380
  ], OhCheckbox.prototype, "forceState", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"oh-checkbox.js","sourceRoot":"","sources":["../src/oh-checkbox.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,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAK3C,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,SAAS;IAAlC;;QA6ML,YAAO,GAAG,KAAK,CAAC;QAGhB,UAAK,GAAG,EAAE,CAAC;QAGX,SAAI,GAAG,EAAE,CAAC;QAGV,UAAK,GAAG,EAAE,CAAC;QAGX,UAAK,GAAG,KAAK,CAAC;QAGd,iBAAY,GAAG,EAAE,CAAC;QAElB;;;WAGG;QAEH,eAAU,GAAkB,SAAS,CAAC;QAQtC;;;;WAIG;QAEK,mBAAc,GAAG,KAAK,CAAC;QAEvB,aAAQ,GAAG,qBAAqB,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;IAyCpF,CAAC;aA3RiB,WAAM,GAAG;QACvB,UAAU;QACV,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsMF;KACF,A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AC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAChB;AAOX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;6CACrC;AAOf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;8CAC9B;AAc9B;IADP,KAAK,EAAE;kDACuB;AAvPpB,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAuTtB"}
@@ -1,27 +1,32 @@
1
1
  /**
2
2
  * oh-cluster
3
3
  *
4
- * Horizontal grouping with wrap and gap.
5
- * Perfect for button groups, tags, navigation items.
6
- *
7
4
  * DESIGN DECISIONS:
8
5
  * ─────────────────
9
- * 1. FLEX WRAP BY DEFAULT
10
- * - Items wrap to next line when needed
11
- * - Consistent gaps in both directions
12
- *
13
- * 2. JUSTIFY OPTIONS
14
- * - start, center, end, between, around
15
- *
16
- * 3. ALIGNMENT OPTIONS
17
- * - start, center, end, baseline
18
- *
19
- * @element oh-cluster
6
+ * 1. A wrapping flex row (unless `nowrap`); `gap` maps named steps to
7
+ * `spacing.*` tokens, the same in both directions.
8
+ * 2. Justify: start, center, end, between, around.
9
+ * 3. Align: start, center (default), end, baseline.
20
10
  */
21
11
  import { OhElement } from "./base.js";
22
12
  export type ClusterGap = "none" | "xs" | "sm" | "md" | "lg" | "xl";
23
13
  export type ClusterJustify = "start" | "center" | "end" | "between" | "around";
24
14
  export type ClusterAlign = "start" | "center" | "end" | "baseline";
15
+ /**
16
+ * A horizontal group of items that wraps onto new lines when space runs out.
17
+ *
18
+ * **Use it for** button groups, tags and rows of links. **Don't use it for**
19
+ * vertical lists (use `oh-stack`) or equal-width columns (use `oh-grid`).
20
+ *
21
+ * **Gaps:** `gap` is `none`, `xs` (`spacing.1`), `sm` (`spacing.2`), `md`
22
+ * (default, `spacing.4`), `lg` (`spacing.6`) or `xl` (`spacing.8`), between
23
+ * items and between rows. `justify` is `start` (default), `center`, `end`,
24
+ * `between` or `around`; `align` is `start`, `center` (default), `end` or
25
+ * `baseline`. `nowrap` keeps everything on one line.
26
+ *
27
+ * @element oh-cluster
28
+ * @slot - The items to group.
29
+ */
25
30
  export declare class OhCluster extends OhElement {
26
31
  static styles: import("lit").CSSResult[];
27
32
  gap: ClusterGap;
@@ -1 +1 @@
1
- {"version":3,"file":"oh-cluster.d.ts","sourceRoot":"","sources":["../src/oh-cluster.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAAE,SAAS,EAAc,MAAM,WAAW,CAAC;AAElD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACnE,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC/E,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,UAAU,CAAC;AAEnE,qBACa,SAAU,SAAQ,SAAS;IACtC,OAAgB,MAAM,4BAkFpB;IAGF,GAAG,EAAE,UAAU,CAAQ;IAGvB,OAAO,EAAE,cAAc,CAAW;IAGlC,KAAK,EAAE,YAAY,CAAY;IAG/B,MAAM,UAAS;IAEf,MAAM;CAGP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
1
+ {"version":3,"file":"oh-cluster.d.ts","sourceRoot":"","sources":["../src/oh-cluster.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,SAAS,EAAc,MAAM,WAAW,CAAC;AAElD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACnE,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC/E,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,UAAU,CAAC;AAEnE;;;;;;;;;;;;;;GAcG;AACH,qBACa,SAAU,SAAQ,SAAS;IACtC,OAAgB,MAAM,4BA6EpB;IAGF,GAAG,EAAE,UAAU,CAAQ;IAGvB,OAAO,EAAE,cAAc,CAAW;IAGlC,KAAK,EAAE,YAAY,CAAY;IAG/B,MAAM,UAAS;IAEf,MAAM;CAGP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
@@ -1,22 +1,12 @@
1
1
  /**
2
2
  * oh-cluster
3
3
  *
4
- * Horizontal grouping with wrap and gap.
5
- * Perfect for button groups, tags, navigation items.
6
- *
7
4
  * DESIGN DECISIONS:
8
5
  * ─────────────────
9
- * 1. FLEX WRAP BY DEFAULT
10
- * - Items wrap to next line when needed
11
- * - Consistent gaps in both directions
12
- *
13
- * 2. JUSTIFY OPTIONS
14
- * - start, center, end, between, around
15
- *
16
- * 3. ALIGNMENT OPTIONS
17
- * - start, center, end, baseline
18
- *
19
- * @element oh-cluster
6
+ * 1. A wrapping flex row (unless `nowrap`); `gap` maps named steps to
7
+ * `spacing.*` tokens, the same in both directions.
8
+ * 2. Justify: start, center, end, between, around.
9
+ * 3. Align: start, center (default), end, baseline.
20
10
  */
21
11
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
22
12
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -27,6 +17,21 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
27
17
  import { html, css } from "lit";
28
18
  import { customElement, property } from "lit/decorators.js";
29
19
  import { OhElement, baseStyles } from "./base.js";
20
+ /**
21
+ * A horizontal group of items that wraps onto new lines when space runs out.
22
+ *
23
+ * **Use it for** button groups, tags and rows of links. **Don't use it for**
24
+ * vertical lists (use `oh-stack`) or equal-width columns (use `oh-grid`).
25
+ *
26
+ * **Gaps:** `gap` is `none`, `xs` (`spacing.1`), `sm` (`spacing.2`), `md`
27
+ * (default, `spacing.4`), `lg` (`spacing.6`) or `xl` (`spacing.8`), between
28
+ * items and between rows. `justify` is `start` (default), `center`, `end`,
29
+ * `between` or `around`; `align` is `start`, `center` (default), `end` or
30
+ * `baseline`. `nowrap` keeps everything on one line.
31
+ *
32
+ * @element oh-cluster
33
+ * @slot - The items to group.
34
+ */
30
35
  let OhCluster = class OhCluster extends OhElement {
31
36
  constructor() {
32
37
  super(...arguments);
@@ -38,11 +43,6 @@ let OhCluster = class OhCluster extends OhElement {
38
43
  static { this.styles = [
39
44
  baseStyles,
40
45
  css `
41
- /* ═══════════════════════════════════════════════════════════════
42
- ORANGE HALO CLUSTER
43
- Horizontal grouping • Flex wrap • Consistent gaps
44
- ═══════════════════════════════════════════════════════════════ */
45
-
46
46
  :host {
47
47
  display: flex;
48
48
  flex-wrap: wrap;
@@ -1 +1 @@
1
- {"version":3,"file":"oh-cluster.js","sourceRoot":"","sources":["../src/oh-cluster.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAO3C,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,SAAS;IAAjC;;QAsFL,QAAG,GAAe,IAAI,CAAC;QAGvB,YAAO,GAAmB,OAAO,CAAC;QAGlC,UAAK,GAAiB,QAAQ,CAAC;QAG/B,WAAM,GAAG,KAAK,CAAC;IAKjB,CAAC;aAnGiB,WAAM,G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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0EF;KACF,AA7EqB,CA6EpB;IAcF,MAAM;QACJ,OAAO,IAAI,CAAA,eAAe,CAAC;IAC7B,CAAC;;AAbD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCACnB;AAGvB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CACR;AAGlC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCACX;AAG/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAC5B;AA1FJ,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA+FrB"}
@@ -1,29 +1,32 @@
1
1
  /**
2
2
  * oh-container
3
3
  *
4
- * Max-width wrapper with centered content.
5
- * Used to constrain content width and provide consistent horizontal padding.
6
- *
7
4
  * DESIGN DECISIONS:
8
5
  * ─────────────────
9
- * 1. RESPONSIVE MAX-WIDTHS (layout.container.*)
10
- * - sm: tight, focused content
11
- * - md: articles, forms
12
- * - lg: standard pages
13
- * - xl: wide layouts
14
- * - full: 100% (edge-to-edge)
6
+ * 1. Max-widths come only from `layout.container.*` (sm, md, lg, xl);
7
+ * `full` is edge to edge with no padding.
8
+ * 2. Horizontal padding from `spacing.*`, stepping up at the
9
+ * `size.breakpoint.sm` and `size.breakpoint.lg` widths.
10
+ * 3. Centred with auto margins.
11
+ */
12
+ import { OhElement } from "./base.js";
13
+ export type ContainerSize = "sm" | "md" | "lg" | "xl" | "full";
14
+ /**
15
+ * A centred wrapper that limits content to a maximum width and adds side padding.
16
+ *
17
+ * **Use it for** the outer width of a page or section. **Don't use it for**
18
+ * spacing between items (use `oh-stack`, `oh-cluster` or `oh-grid`).
15
19
  *
16
- * 2. CONSISTENT PADDING
17
- * - Uses spacing tokens for horizontal padding
18
- * - Responsive padding on smaller screens
20
+ * **Sizes:** `size` picks the max-width: `sm`, `md`, `lg` (default) and `xl`
21
+ * use `layout.container.sm` to `layout.container.xl`; `full` is the full
22
+ * width with no side padding. `center` centres the text.
19
23
  *
20
- * 3. CENTERED BY DEFAULT
21
- * - margin: 0 auto for horizontal centering
24
+ * **Behaviour:** side padding is `spacing.4`, rising to `spacing.6` from the
25
+ * `size.breakpoint.sm` width and `spacing.8` from `size.breakpoint.lg`.
22
26
  *
23
27
  * @element oh-container
28
+ * @slot - The content to contain.
24
29
  */
25
- import { OhElement } from "./base.js";
26
- export type ContainerSize = "sm" | "md" | "lg" | "xl" | "full";
27
30
  export declare class OhContainer extends OhElement {
28
31
  static styles: import("lit").CSSResult[];
29
32
  size: ContainerSize;
@@ -1 +1 @@
1
- {"version":3,"file":"oh-container.d.ts","sourceRoot":"","sources":["../src/oh-container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,OAAO,EAAE,SAAS,EAAc,MAAM,WAAW,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAE/D,qBACa,WAAY,SAAQ,SAAS;IACxC,OAAgB,MAAM,4BA6DpB;IAGF,IAAI,EAAE,aAAa,CAAQ;IAG3B,MAAM,UAAS;IAEf,MAAM;CAGP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
1
+ {"version":3,"file":"oh-container.d.ts","sourceRoot":"","sources":["../src/oh-container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,SAAS,EAAc,MAAM,WAAW,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAE/D;;;;;;;;;;;;;;;GAeG;AACH,qBACa,WAAY,SAAQ,SAAS;IACxC,OAAgB,MAAM,4BAwDpB;IAGF,IAAI,EAAE,aAAa,CAAQ;IAG3B,MAAM,UAAS;IAEf,MAAM;CAGP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
@@ -1,26 +1,13 @@
1
1
  /**
2
2
  * oh-container
3
3
  *
4
- * Max-width wrapper with centered content.
5
- * Used to constrain content width and provide consistent horizontal padding.
6
- *
7
4
  * DESIGN DECISIONS:
8
5
  * ─────────────────
9
- * 1. RESPONSIVE MAX-WIDTHS (layout.container.*)
10
- * - sm: tight, focused content
11
- * - md: articles, forms
12
- * - lg: standard pages
13
- * - xl: wide layouts
14
- * - full: 100% (edge-to-edge)
15
- *
16
- * 2. CONSISTENT PADDING
17
- * - Uses spacing tokens for horizontal padding
18
- * - Responsive padding on smaller screens
19
- *
20
- * 3. CENTERED BY DEFAULT
21
- * - margin: 0 auto for horizontal centering
22
- *
23
- * @element oh-container
6
+ * 1. Max-widths come only from `layout.container.*` (sm, md, lg, xl);
7
+ * `full` is edge to edge with no padding.
8
+ * 2. Horizontal padding from `spacing.*`, stepping up at the
9
+ * `size.breakpoint.sm` and `size.breakpoint.lg` widths.
10
+ * 3. Centred with auto margins.
24
11
  */
25
12
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
26
13
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -31,6 +18,22 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
31
18
  import { html, css } from "lit";
32
19
  import { customElement, property } from "lit/decorators.js";
33
20
  import { OhElement, baseStyles } from "./base.js";
21
+ /**
22
+ * A centred wrapper that limits content to a maximum width and adds side padding.
23
+ *
24
+ * **Use it for** the outer width of a page or section. **Don't use it for**
25
+ * spacing between items (use `oh-stack`, `oh-cluster` or `oh-grid`).
26
+ *
27
+ * **Sizes:** `size` picks the max-width: `sm`, `md`, `lg` (default) and `xl`
28
+ * use `layout.container.sm` to `layout.container.xl`; `full` is the full
29
+ * width with no side padding. `center` centres the text.
30
+ *
31
+ * **Behaviour:** side padding is `spacing.4`, rising to `spacing.6` from the
32
+ * `size.breakpoint.sm` width and `spacing.8` from `size.breakpoint.lg`.
33
+ *
34
+ * @element oh-container
35
+ * @slot - The content to contain.
36
+ */
34
37
  let OhContainer = class OhContainer extends OhElement {
35
38
  constructor() {
36
39
  super(...arguments);
@@ -40,11 +43,6 @@ let OhContainer = class OhContainer extends OhElement {
40
43
  static { this.styles = [
41
44
  baseStyles,
42
45
  css `
43
- /* ═══════════════════════════════════════════════════════════════
44
- ORANGE HALO CONTAINER
45
- Max-width wrapper • Centered content • Responsive padding
46
- ═══════════════════════════════════════════════════════════════ */
47
-
48
46
  :host {
49
47
  display: block;
50
48
  width: 100%;
@@ -1 +1 @@
1
- {"version":3,"file":"oh-container.js","sourceRoot":"","sources":["../src/oh-container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAK3C,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,SAAS;IAAnC;;QAiEL,SAAI,GAAkB,IAAI,CAAC;QAG3B,WAAM,GAAG,KAAK,CAAC;IAKjB,CAAC;aAxEiB,WAAM,GAAG;QACvB,UAAU;QACV,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0DF;KACF,AA7DqB,CA6DpB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48 @@
7
7
  * ─────────────────
8
8
  * 1. POSITIONING
9
9
  * - Slides in from left or right
10
- * - Full height, configurable width
11
- * - Overlays content with warm backdrop
10
+ * - Full height, width set by --oh-drawer-width
11
+ * - Overlays content with a color.surface.overlay backdrop
12
12
  *
13
- * 2. STYLING
14
- * - Chunky border on the edge
15
- * - Warm surface background
16
- * - Smooth slide animation
13
+ * 2. LOOK FROM TOKENS
14
+ * - Panel: color.surface.base
15
+ * - Shadow: elevation.strong (left); an elevation.offset.lg offset in
16
+ * color.border.strong (right)
17
+ * - Slide: motion.relaxed with motion.easeGentle, off under reduced motion
17
18
  *
18
19
  * 3. ACCESSIBILITY
19
20
  * - Focus trap when open (focus guards at each end of the panel)
20
21
  * - Escape key closes
21
22
  * - aria-modal and role="dialog"
22
23
  * - Returns focus to trigger on close
24
+ * - inert while closed, and hidden once it has slid away
25
+ */
26
+ import { OhElement } from "./base.js";
27
+ import "./oh-button.js";
28
+ import "./oh-icon.js";
29
+ /**
30
+ * A panel that slides in from the side of the viewport, over the page, for navigation or supplementary content.
31
+ *
32
+ * **Use it for** a site's navigation on small screens, filters, or settings that relate to the page behind. **Don't use it for** a decision the user must make before going on (use `oh-modal`); or for content that should always be visible (put it in the page).
33
+ *
34
+ * **Parts:** `heading` (an optional visible `h2`), a built-in Close button, and the default slot for the content, which scrolls when it's taller than the viewport.
35
+ *
36
+ * **Positions:** `left` (default) or `right`.
37
+ *
38
+ * **Behaviour:** set `open`, or call `show()` and `hide()`. On open, focus moves to the Close button, Tab and Shift+Tab wrap inside the panel, and the page behind stops scrolling. The Close button, Escape, a click on the backdrop and `hide()` close it and fire `oh-close`; focus then returns to the element that opened it. While closed the panel is `inert`. Motion is off under `prefers-reduced-motion`.
39
+ *
40
+ * **Accessibility:** the panel is `role="dialog"` with `aria-modal="true"`, labelled by `heading`, or "Navigation menu" when there's no heading, so set `heading` for any other use. The Close button's accessible name is "Close menu".
41
+ *
42
+ * **Look:** set by tokens. `color.surface.overlay` sets the backdrop and `color.surface.base` the panel. A left drawer's shadow is `elevation.strong`; a right drawer's is an `elevation.offset.lg` offset in `color.border.strong`. The heading uses `typography.heading.h5.fontSize` and `typography.emphasis.fontWeight`. Motion uses `motion.relaxed` and `motion.easeGentle`. `--oh-drawer-width` sets the width.
23
43
  *
24
44
  * @element oh-drawer
25
45
  *
26
46
  * @slot - Default slot for drawer content
27
47
  *
28
- * @fires oh-close - When the drawer is closed
48
+ * @fires oh-close - When the drawer is closed by the Close button, Escape, the backdrop or `hide()`. Not fired when you set `open` to false yourself.
29
49
  *
30
- * @cssprop --oh-drawer-width - Width of the drawer (default: 280px)
50
+ * @cssprop --oh-drawer-width - Width of the drawer. It never fills the whole viewport width.
31
51
  */
32
- import { OhElement } from "./base.js";
33
- import "./oh-button.js";
34
- import "./oh-icon.js";
35
52
  export declare class OhDrawer extends OhElement {
36
53
  static styles: import("lit").CSSResult[];
37
54
  /** Whether the drawer is open */