@orange-halo/components 2.2.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.
- package/custom-elements.json +551 -314
- package/dist/index.d.ts +1 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/dist/oh-accordion.d.ts +53 -8
- package/dist/oh-accordion.d.ts.map +1 -1
- package/dist/oh-accordion.js +77 -15
- package/dist/oh-accordion.js.map +1 -1
- package/dist/oh-alert.d.ts +26 -8
- package/dist/oh-alert.d.ts.map +1 -1
- package/dist/oh-alert.js +32 -14
- package/dist/oh-alert.js.map +1 -1
- package/dist/oh-badge.d.ts +32 -13
- package/dist/oh-badge.d.ts.map +1 -1
- package/dist/oh-badge.js +35 -16
- package/dist/oh-badge.js.map +1 -1
- package/dist/oh-breadcrumb.d.ts +39 -12
- package/dist/oh-breadcrumb.d.ts.map +1 -1
- package/dist/oh-breadcrumb.js +39 -17
- package/dist/oh-breadcrumb.js.map +1 -1
- package/dist/oh-button.d.ts +49 -23
- package/dist/oh-button.d.ts.map +1 -1
- package/dist/oh-button.js +63 -44
- package/dist/oh-button.js.map +1 -1
- package/dist/oh-card.d.ts +47 -19
- package/dist/oh-card.d.ts.map +1 -1
- package/dist/oh-card.js +110 -82
- package/dist/oh-card.js.map +1 -1
- package/dist/oh-checkbox-group.d.ts +56 -12
- package/dist/oh-checkbox-group.d.ts.map +1 -1
- package/dist/oh-checkbox-group.figma.js +4 -6
- package/dist/oh-checkbox-group.figma.js.map +1 -1
- package/dist/oh-checkbox-group.js +86 -44
- package/dist/oh-checkbox-group.js.map +1 -1
- package/dist/oh-checkbox.d.ts +54 -17
- package/dist/oh-checkbox.d.ts.map +1 -1
- package/dist/oh-checkbox.js +85 -55
- package/dist/oh-checkbox.js.map +1 -1
- package/dist/oh-cluster.d.ts +19 -14
- package/dist/oh-cluster.d.ts.map +1 -1
- package/dist/oh-cluster.js +19 -19
- package/dist/oh-cluster.js.map +1 -1
- package/dist/oh-container.d.ts +19 -16
- package/dist/oh-container.d.ts.map +1 -1
- package/dist/oh-container.js +21 -23
- package/dist/oh-container.js.map +1 -1
- package/dist/oh-drawer.d.ts +28 -11
- package/dist/oh-drawer.d.ts.map +1 -1
- package/dist/oh-drawer.js +31 -14
- package/dist/oh-drawer.js.map +1 -1
- package/dist/oh-footer.d.ts +37 -18
- package/dist/oh-footer.d.ts.map +1 -1
- package/dist/oh-footer.js +38 -19
- package/dist/oh-footer.js.map +1 -1
- package/dist/oh-grid.d.ts +27 -14
- package/dist/oh-grid.d.ts.map +1 -1
- package/dist/oh-grid.js +27 -19
- package/dist/oh-grid.js.map +1 -1
- package/dist/oh-icon.d.ts +21 -5
- package/dist/oh-icon.d.ts.map +1 -1
- package/dist/oh-icon.js +21 -5
- package/dist/oh-icon.js.map +1 -1
- package/dist/oh-input.d.ts +104 -20
- 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 +205 -66
- package/dist/oh-input.js.map +1 -1
- package/dist/oh-link.d.ts +42 -19
- package/dist/oh-link.d.ts.map +1 -1
- package/dist/oh-link.js +47 -29
- package/dist/oh-link.js.map +1 -1
- package/dist/oh-modal.d.ts +29 -6
- package/dist/oh-modal.d.ts.map +1 -1
- package/dist/oh-modal.js +37 -16
- package/dist/oh-modal.js.map +1 -1
- package/dist/oh-navbar.d.ts +42 -19
- package/dist/oh-navbar.d.ts.map +1 -1
- package/dist/oh-navbar.js +42 -19
- package/dist/oh-navbar.js.map +1 -1
- package/dist/oh-progress.d.ts +26 -7
- package/dist/oh-progress.d.ts.map +1 -1
- package/dist/oh-progress.js +31 -12
- package/dist/oh-progress.js.map +1 -1
- package/dist/oh-radio-group.d.ts +55 -13
- package/dist/oh-radio-group.d.ts.map +1 -1
- package/dist/oh-radio-group.figma.js +2 -2
- package/dist/oh-radio-group.figma.js.map +1 -1
- package/dist/oh-radio-group.js +83 -43
- package/dist/oh-radio-group.js.map +1 -1
- package/dist/oh-radio.d.ts +55 -17
- package/dist/oh-radio.d.ts.map +1 -1
- package/dist/oh-radio.js +87 -56
- package/dist/oh-radio.js.map +1 -1
- package/dist/oh-select.d.ts +58 -16
- package/dist/oh-select.d.ts.map +1 -1
- package/dist/oh-select.js +70 -33
- package/dist/oh-select.js.map +1 -1
- package/dist/oh-skip-link.d.ts +33 -15
- package/dist/oh-skip-link.d.ts.map +1 -1
- package/dist/oh-skip-link.js +38 -25
- package/dist/oh-skip-link.js.map +1 -1
- package/dist/oh-stack.d.ts +17 -14
- package/dist/oh-stack.d.ts.map +1 -1
- package/dist/oh-stack.js +18 -20
- package/dist/oh-stack.js.map +1 -1
- package/dist/oh-tabs.d.ts +55 -30
- package/dist/oh-tabs.d.ts.map +1 -1
- package/dist/oh-tabs.js +80 -65
- package/dist/oh-tabs.js.map +1 -1
- package/dist/oh-textarea.d.ts +37 -6
- package/dist/oh-textarea.d.ts.map +1 -1
- package/dist/oh-textarea.js +40 -9
- package/dist/oh-textarea.js.map +1 -1
- package/dist/oh-toggle.d.ts +45 -12
- package/dist/oh-toggle.d.ts.map +1 -1
- package/dist/oh-toggle.js +64 -29
- package/dist/oh-toggle.js.map +1 -1
- package/package.json +3 -7
- package/dist/oh-hero.d.ts +0 -33
- package/dist/oh-hero.d.ts.map +0 -1
- package/dist/oh-hero.js +0 -248
- package/dist/oh-hero.js.map +0 -1
package/dist/oh-badge.js
CHANGED
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* oh-badge
|
|
3
3
|
*
|
|
4
|
-
* A
|
|
5
|
-
* Two
|
|
4
|
+
* A non-interactive label for a status or category.
|
|
5
|
+
* Two types per variant: subtle and filled.
|
|
6
6
|
*
|
|
7
7
|
* DESIGN DECISIONS:
|
|
8
8
|
* ─────────────────
|
|
9
|
-
* 1.
|
|
10
|
-
* - No
|
|
9
|
+
* 1. NON-INTERACTIVE
|
|
10
|
+
* - No shadow, no hover states, pointer-events off
|
|
11
11
|
* - Pure informational element
|
|
12
12
|
* - Not clickable
|
|
13
13
|
*
|
|
14
|
-
* 2. TWO
|
|
15
|
-
* - Subtle:
|
|
16
|
-
* - Filled:
|
|
14
|
+
* 2. TWO TYPES
|
|
15
|
+
* - Subtle: the variant's *Subtle background token, its role colour as text
|
|
16
|
+
* - Filled: the role colour as background, its color.text.on* token as text
|
|
17
17
|
*
|
|
18
18
|
* 3. ACCESSIBLE CONTRAST
|
|
19
|
-
* -
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* @element oh-badge
|
|
19
|
+
* - Every text/background pair is in contrast-pairs.json, so
|
|
20
|
+
* check:contrast checks it in every brand and mode
|
|
23
21
|
*/
|
|
24
22
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
25
23
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -30,18 +28,39 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
30
28
|
import { html, css } from "lit";
|
|
31
29
|
import { customElement, property } from "lit/decorators.js";
|
|
32
30
|
import { OhElement, baseStyles } from "./base.js";
|
|
31
|
+
/**
|
|
32
|
+
* A short, non-interactive label that shows the status or category of the thing next to it.
|
|
33
|
+
*
|
|
34
|
+
* **Use it for** a status ("Delivered", "Pending"), a count or a tag next to the item it describes. **Don't use it for** anything the user can select (use `oh-button` or a link); or for a message with more than a word or two (use `oh-alert`).
|
|
35
|
+
*
|
|
36
|
+
* **Variants:** `brand` (default) and `accent` for categories; `success`, `warning`, `error` and `info` for status. **Appearance:** `subtle` (default), for most badges; `filled`, the stronger appearance, for the one status that matters most.
|
|
37
|
+
*
|
|
38
|
+
* **Parts:** the default slot holds the text; the `icon` slot an optional leading icon, sized to the text.
|
|
39
|
+
*
|
|
40
|
+
* **Behaviour:** none. It doesn't take focus or respond to the pointer.
|
|
41
|
+
*
|
|
42
|
+
* **Accessibility:** the badge is plain text to screen readers, so the text must make sense on its own (say "Pending", don't rely on the colour). Mark a decorative icon `aria-hidden`.
|
|
43
|
+
*
|
|
44
|
+
* **Look:** set by tokens. Subtle uses the variant's `color.feedback.<variant>Subtle`, `color.brand.primarySubtle` or `color.accent.subtle` background with the role colour as text; filled uses the role colour (`color.feedback.<variant>`, `color.brand.primary`, `color.accent.default`) as background with `color.text.on<Role>` as text. `shape.compact` sets the corners; `typography.body.*`, `typography.label.base.fontWeight` and `typography.control.letterSpacing` the text.
|
|
45
|
+
*
|
|
46
|
+
* @element oh-badge
|
|
47
|
+
* @slot - The badge text.
|
|
48
|
+
* @slot icon - Optional leading icon.
|
|
49
|
+
* @csspart badge - The badge.
|
|
50
|
+
*/
|
|
33
51
|
let OhBadge = class OhBadge extends OhElement {
|
|
34
52
|
constructor() {
|
|
35
53
|
super(...arguments);
|
|
36
54
|
this.variant = "brand";
|
|
37
|
-
|
|
55
|
+
/** `subtle` (default) for most badges; `filled`, the stronger appearance, for the one status that matters most */
|
|
56
|
+
this.appearance = "subtle";
|
|
38
57
|
}
|
|
39
58
|
static { this.styles = [
|
|
40
59
|
baseStyles,
|
|
41
60
|
css `
|
|
42
61
|
/* ═══════════════════════════════════════════════════════════════
|
|
43
|
-
|
|
44
|
-
|
|
62
|
+
BADGE
|
|
63
|
+
Non-interactive • Informational
|
|
45
64
|
═══════════════════════════════════════════════════════════════ */
|
|
46
65
|
|
|
47
66
|
:host {
|
|
@@ -153,7 +172,7 @@ let OhBadge = class OhBadge extends OhElement {
|
|
|
153
172
|
const classes = this.classMap({
|
|
154
173
|
badge: true,
|
|
155
174
|
[`badge--${this.variant}`]: true,
|
|
156
|
-
[`badge--${this.
|
|
175
|
+
[`badge--${this.appearance}`]: true,
|
|
157
176
|
});
|
|
158
177
|
return html `
|
|
159
178
|
<span class=${classes} part="badge">
|
|
@@ -168,7 +187,7 @@ __decorate([
|
|
|
168
187
|
], OhBadge.prototype, "variant", void 0);
|
|
169
188
|
__decorate([
|
|
170
189
|
property({ type: String, reflect: true })
|
|
171
|
-
], OhBadge.prototype, "
|
|
190
|
+
], OhBadge.prototype, "appearance", void 0);
|
|
172
191
|
OhBadge = __decorate([
|
|
173
192
|
customElement("oh-badge")
|
|
174
193
|
], OhBadge);
|
package/dist/oh-badge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oh-badge.js","sourceRoot":"","sources":["../src/oh-badge.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"oh-badge.js","sourceRoot":"","sources":["../src/oh-badge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;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;AAWlD;;;;;;;;;;;;;;;;;;;GAmBG;AAEI,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,SAAS;IAA/B;;QAoHL,YAAO,GAAiB,OAAO,CAAC;QAEhC,kHAAkH;QAElH,eAAU,GAAoB,QAAQ,CAAC;IAgBzC,CAAC;aAvIiB,WAAM,GAAG;QACvB,UAAU;QACV,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6GF;KACF,AAhHqB,CAgHpB;IASF,MAAM;QACJ,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;YAC5B,KAAK,EAAE,IAAI;YACX,CAAC,UAAU,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI;YAChC,CAAC,UAAU,IAAI,CAAC,UAAU,EAAE,CAAC,EAAE,IAAI;SACpC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAA;oBACK,OAAO;;;;KAItB,CAAC;IACJ,CAAC;;AAnBD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCACV;AAIhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CACH;AAxH5B,OAAO;IADnB,aAAa,CAAC,UAAU,CAAC;GACb,OAAO,CAwInB"}
|
package/dist/oh-breadcrumb.d.ts
CHANGED
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* oh-breadcrumb
|
|
3
3
|
*
|
|
4
|
-
* Accessible breadcrumb navigation with responsive collapse.
|
|
5
|
-
*
|
|
6
4
|
* DESIGN DECISIONS:
|
|
7
5
|
* ─────────────────
|
|
8
6
|
* 1. SEMANTIC STRUCTURE
|
|
9
|
-
* - <nav
|
|
10
|
-
* -
|
|
11
|
-
* - aria-
|
|
7
|
+
* - <nav aria-label="Breadcrumb"> around an <ol>
|
|
8
|
+
* - aria-current="page" on the last item, which is not a link
|
|
9
|
+
* - Separators are aria-hidden
|
|
12
10
|
*
|
|
13
|
-
* 2.
|
|
14
|
-
* -
|
|
15
|
-
*
|
|
11
|
+
* 2. LINKS MIRROR oh-link INLINE
|
|
12
|
+
* - Same underline tokens and hover/focus behaviour, written locally
|
|
13
|
+
* so the trail is one component
|
|
16
14
|
*
|
|
17
15
|
* 3. RESPONSIVE
|
|
18
|
-
* -
|
|
19
|
-
* -
|
|
20
|
-
*
|
|
21
|
-
* @element oh-breadcrumb
|
|
16
|
+
* - Wide viewports: the full trail
|
|
17
|
+
* - Below `size.breakpoint.sm`: a single "Back to [parent]" link
|
|
22
18
|
*/
|
|
23
19
|
import { nothing } from "lit";
|
|
24
20
|
import { OhElement } from "./base.js";
|
|
@@ -26,6 +22,37 @@ export interface BreadcrumbItem {
|
|
|
26
22
|
label: string;
|
|
27
23
|
href?: string;
|
|
28
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* A breadcrumb trail showing where the current page sits in the site's hierarchy.
|
|
27
|
+
*
|
|
28
|
+
* **Use it for** pages two or more levels deep in a hierarchy. **Don't use it
|
|
29
|
+
* for** a site's main navigation (use `oh-navbar`) or for steps in a process.
|
|
30
|
+
*
|
|
31
|
+
* **Parts:** pass `items`, an array of `{ label, href }`, from the top level
|
|
32
|
+
* down. The last item is the current page and is shown as text, not a link.
|
|
33
|
+
*
|
|
34
|
+
* **Behaviour:** below the `size.breakpoint.sm` width the trail collapses to a
|
|
35
|
+
* single "Back to [parent]" link to the second-to-last item; with one item,
|
|
36
|
+
* nothing shows there. Link underlines retract on hover; keyboard focus
|
|
37
|
+
* (`:focus-visible`) shows a solid underline and a background tint.
|
|
38
|
+
* Transitions are cut short under `prefers-reduced-motion`. Renders nothing
|
|
39
|
+
* when `items` is empty.
|
|
40
|
+
*
|
|
41
|
+
* **Accessibility:** renders `<nav aria-label="Breadcrumb">` with an ordered
|
|
42
|
+
* list, `aria-current="page"` on the last item and `aria-hidden` separators.
|
|
43
|
+
* Use one breadcrumb per page.
|
|
44
|
+
*
|
|
45
|
+
* **Look:** set by tokens — `color.text.link` the links,
|
|
46
|
+
* `decoration.underlineThickness`, `decoration.underlineDash` and
|
|
47
|
+
* `decoration.underlinePeriod` their underline; `color.brand.primary` the
|
|
48
|
+
* focus underline and `color.surface.hover` the focus tint;
|
|
49
|
+
* `color.text.primary` and `typography.label.base.fontWeight` the current
|
|
50
|
+
* page; `color.text.secondary` the separators; `typography.body.*` the text;
|
|
51
|
+
* `spacing.*` the gaps; `motion.relaxed` and `motion.easeGentle` the
|
|
52
|
+
* transitions.
|
|
53
|
+
*
|
|
54
|
+
* @element oh-breadcrumb
|
|
55
|
+
*/
|
|
29
56
|
export declare class OhBreadcrumb extends OhElement {
|
|
30
57
|
static styles: import("lit").CSSResult[];
|
|
31
58
|
items: BreadcrumbItem[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oh-breadcrumb.d.ts","sourceRoot":"","sources":["../src/oh-breadcrumb.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"oh-breadcrumb.d.ts","sourceRoot":"","sources":["../src/oh-breadcrumb.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAa,OAAO,EAAE,MAAM,KAAK,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAc,MAAM,WAAW,CAAC;AAElD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBACa,YAAa,SAAQ,SAAS;IACzC,OAAgB,MAAM,4BA2LpB;IAGF,KAAK,EAAE,cAAc,EAAE,CAAM;IAE7B,MAAM;CA8DP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
|
package/dist/oh-breadcrumb.js
CHANGED
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* oh-breadcrumb
|
|
3
3
|
*
|
|
4
|
-
* Accessible breadcrumb navigation with responsive collapse.
|
|
5
|
-
*
|
|
6
4
|
* DESIGN DECISIONS:
|
|
7
5
|
* ─────────────────
|
|
8
6
|
* 1. SEMANTIC STRUCTURE
|
|
9
|
-
* - <nav
|
|
10
|
-
* -
|
|
11
|
-
* - aria-
|
|
7
|
+
* - <nav aria-label="Breadcrumb"> around an <ol>
|
|
8
|
+
* - aria-current="page" on the last item, which is not a link
|
|
9
|
+
* - Separators are aria-hidden
|
|
12
10
|
*
|
|
13
|
-
* 2.
|
|
14
|
-
* -
|
|
15
|
-
*
|
|
11
|
+
* 2. LINKS MIRROR oh-link INLINE
|
|
12
|
+
* - Same underline tokens and hover/focus behaviour, written locally
|
|
13
|
+
* so the trail is one component
|
|
16
14
|
*
|
|
17
15
|
* 3. RESPONSIVE
|
|
18
|
-
* -
|
|
19
|
-
* -
|
|
20
|
-
*
|
|
21
|
-
* @element oh-breadcrumb
|
|
16
|
+
* - Wide viewports: the full trail
|
|
17
|
+
* - Below `size.breakpoint.sm`: a single "Back to [parent]" link
|
|
22
18
|
*/
|
|
23
19
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
24
20
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -29,6 +25,37 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
29
25
|
import { html, css, nothing } from "lit";
|
|
30
26
|
import { customElement, property } from "lit/decorators.js";
|
|
31
27
|
import { OhElement, baseStyles } from "./base.js";
|
|
28
|
+
/**
|
|
29
|
+
* A breadcrumb trail showing where the current page sits in the site's hierarchy.
|
|
30
|
+
*
|
|
31
|
+
* **Use it for** pages two or more levels deep in a hierarchy. **Don't use it
|
|
32
|
+
* for** a site's main navigation (use `oh-navbar`) or for steps in a process.
|
|
33
|
+
*
|
|
34
|
+
* **Parts:** pass `items`, an array of `{ label, href }`, from the top level
|
|
35
|
+
* down. The last item is the current page and is shown as text, not a link.
|
|
36
|
+
*
|
|
37
|
+
* **Behaviour:** below the `size.breakpoint.sm` width the trail collapses to a
|
|
38
|
+
* single "Back to [parent]" link to the second-to-last item; with one item,
|
|
39
|
+
* nothing shows there. Link underlines retract on hover; keyboard focus
|
|
40
|
+
* (`:focus-visible`) shows a solid underline and a background tint.
|
|
41
|
+
* Transitions are cut short under `prefers-reduced-motion`. Renders nothing
|
|
42
|
+
* when `items` is empty.
|
|
43
|
+
*
|
|
44
|
+
* **Accessibility:** renders `<nav aria-label="Breadcrumb">` with an ordered
|
|
45
|
+
* list, `aria-current="page"` on the last item and `aria-hidden` separators.
|
|
46
|
+
* Use one breadcrumb per page.
|
|
47
|
+
*
|
|
48
|
+
* **Look:** set by tokens — `color.text.link` the links,
|
|
49
|
+
* `decoration.underlineThickness`, `decoration.underlineDash` and
|
|
50
|
+
* `decoration.underlinePeriod` their underline; `color.brand.primary` the
|
|
51
|
+
* focus underline and `color.surface.hover` the focus tint;
|
|
52
|
+
* `color.text.primary` and `typography.label.base.fontWeight` the current
|
|
53
|
+
* page; `color.text.secondary` the separators; `typography.body.*` the text;
|
|
54
|
+
* `spacing.*` the gaps; `motion.relaxed` and `motion.easeGentle` the
|
|
55
|
+
* transitions.
|
|
56
|
+
*
|
|
57
|
+
* @element oh-breadcrumb
|
|
58
|
+
*/
|
|
32
59
|
let OhBreadcrumb = class OhBreadcrumb extends OhElement {
|
|
33
60
|
constructor() {
|
|
34
61
|
super(...arguments);
|
|
@@ -37,11 +64,6 @@ let OhBreadcrumb = class OhBreadcrumb extends OhElement {
|
|
|
37
64
|
static { this.styles = [
|
|
38
65
|
baseStyles,
|
|
39
66
|
css `
|
|
40
|
-
/* ═══════════════════════════════════════════════════════════════
|
|
41
|
-
ORANGE HALO BREADCRUMB
|
|
42
|
-
Semantic • Responsive • Accessible
|
|
43
|
-
═══════════════════════════════════════════════════════════════ */
|
|
44
|
-
|
|
45
67
|
:host {
|
|
46
68
|
display: block;
|
|
47
69
|
font-family: var(--oh-typography-body-font-family);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oh-breadcrumb.js","sourceRoot":"","sources":["../src/oh-breadcrumb.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"oh-breadcrumb.js","sourceRoot":"","sources":["../src/oh-breadcrumb.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,UA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D,IAAI,CAAC,KAAK;sBACb;kBACJ,aAAa;gBACb,CAAC,CAAC,IAAI,CAAA;;sBAEF;gBACJ,CAAC,CAAC,OAAO;;aAEd,CAAC;QACJ,CAAC,CAAC;;;;UAIF,UAAU;YACV,CAAC,CAAC,IAAI,CAAA;;4CAE4B,UAAU,CAAC,IAAI,IAAI,GAAG;;;;;;;;;;;;;;;kCAehC,UAAU,CAAC,KAAK;;;aAGrC;YACH,CAAC,CAAC,OAAO;;KAEd,CAAC;IACJ,CAAC;;AA/DD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;2CACG;AA/LlB,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CA+PxB"}
|
package/dist/oh-button.d.ts
CHANGED
|
@@ -1,37 +1,63 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* oh-button
|
|
3
3
|
*
|
|
4
|
-
* A chunky, confident button with playful personality.
|
|
5
|
-
* Inspired by hand-crafted, illustrative UI — not corporate SaaS.
|
|
6
|
-
*
|
|
7
4
|
* DESIGN DECISIONS:
|
|
8
5
|
* ─────────────────
|
|
9
|
-
* 1.
|
|
10
|
-
*
|
|
11
|
-
* -
|
|
12
|
-
*
|
|
6
|
+
* 1. Renders a native <button>, or an <a> when `href` is set, inside the
|
|
7
|
+
* shadow root, so keyboard and screen reader behaviour come from the
|
|
8
|
+
* platform. `accessible-label` is forwarded to it (an aria-label on the
|
|
9
|
+
* host isn't).
|
|
10
|
+
* 2. Look comes from button.* component tokens: button.base.borderWidth
|
|
11
|
+
* (stroke.control), button.base.borderRadius (shape.control),
|
|
12
|
+
* button.variant.<variant>.* for fills, text, border and shadow colour,
|
|
13
|
+
* button.size.<size>.* for type, padding and height.
|
|
14
|
+
* 3. Hover and active move the button by lift.hoverMd / lift.pressMd and set
|
|
15
|
+
* the shadow offset to elevation.offset.2xl / elevation.offset.xs (rest is
|
|
16
|
+
* elevation.offset.lg).
|
|
17
|
+
* 4. Focus is a solid underline on the label (an underline the button draws
|
|
18
|
+
* itself for icon-only and loading buttons, whose text is hidden).
|
|
19
|
+
* 5. Loading uses aria-disabled + aria-busy, not disabled, so focus stays on
|
|
20
|
+
* the button.
|
|
21
|
+
*/
|
|
22
|
+
import { OhElement } from "./base.js";
|
|
23
|
+
export type ButtonVariant = "primary" | "secondary" | "accent";
|
|
24
|
+
export type ButtonSize = "sm" | "md" | "lg";
|
|
25
|
+
export type ButtonState = "default" | "hover" | "active" | "focus";
|
|
26
|
+
/**
|
|
27
|
+
* A button that starts an action, or a link styled as a button when `href` is set.
|
|
13
28
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* - Feels like a physical sticker or stamp
|
|
17
|
-
* - Not a generic centered drop shadow
|
|
29
|
+
* **Use it for** actions: submitting, saving, opening a dialog, confirming.
|
|
30
|
+
* **Don't use it for** links inside running text (use `oh-link`).
|
|
18
31
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* - Focus: warm glow + accessible underline
|
|
32
|
+
* **Variants:** `primary` for the main action, `secondary` for the others,
|
|
33
|
+
* `accent` for an action that takes the accent colour role. **Sizes:** `sm`, `md` (default), `lg`.
|
|
34
|
+
* **States:** rest, hover, active, focus and `loading`.
|
|
23
35
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
36
|
+
* **Behaviour:** fires `oh-click` when the inner `<button>` is clicked, except
|
|
37
|
+
* while `loading`. `loading` shows a spinner, keeps the label for screen
|
|
38
|
+
* readers, sets `aria-busy` and `aria-disabled` and ignores clicks, while the
|
|
39
|
+
* button stays focusable. With `href` it renders an `<a>` (and
|
|
40
|
+
* `target="_blank"` adds `rel="noopener noreferrer"`); link buttons don't fire
|
|
41
|
+
* `oh-click`. It has no `disabled` property and doesn't submit a form by
|
|
42
|
+
* itself: handle `oh-click`. Under `prefers-reduced-motion` it doesn't move.
|
|
43
|
+
*
|
|
44
|
+
* **Accessibility:** focus shows a solid underline on the label. An
|
|
45
|
+
* `icon-only` button has no visible text, so always set `accessible-label`
|
|
46
|
+
* (not `aria-label`, which isn't forwarded into the shadow root).
|
|
47
|
+
*
|
|
48
|
+
* **Look:** set by tokens — `stroke.control` (border width), `shape.control`
|
|
49
|
+
* (corners), `typography.control.*` (type), `button.variant.<variant>.*`
|
|
50
|
+
* (background, text, border and shadow colour per state), `button.size.<size>.*`
|
|
51
|
+
* (font size, padding, minimum height), `elevation.offset.*` (shadow offset)
|
|
52
|
+
* and `lift.hoverMd` / `lift.pressMd` (movement on hover and press).
|
|
28
53
|
*
|
|
29
54
|
* @element oh-button
|
|
55
|
+
* @fires oh-click - The button was clicked (not while loading). `detail.originalEvent` is the click.
|
|
56
|
+
* @slot - The label.
|
|
57
|
+
* @slot icon-left - An icon before the label.
|
|
58
|
+
* @slot icon-right - An icon after the label.
|
|
59
|
+
* @csspart button - The inner `<button>` or `<a>`.
|
|
30
60
|
*/
|
|
31
|
-
import { OhElement } from "./base.js";
|
|
32
|
-
export type ButtonVariant = "primary" | "secondary" | "accent";
|
|
33
|
-
export type ButtonSize = "sm" | "md" | "lg";
|
|
34
|
-
export type ButtonState = "default" | "hover" | "active" | "focus";
|
|
35
61
|
export declare class OhButton extends OhElement {
|
|
36
62
|
static styles: import("lit").CSSResult[];
|
|
37
63
|
variant: ButtonVariant;
|
package/dist/oh-button.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oh-button.d.ts","sourceRoot":"","sources":["../src/oh-button.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"oh-button.d.ts","sourceRoot":"","sources":["../src/oh-button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,OAAO,EAAE,SAAS,EAAc,MAAM,WAAW,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAC/D,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5C,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qBACa,QAAS,SAAQ,SAAS;IACrC,OAAgB,MAAM,4BAuYpB;IAGF,OAAO,EAAE,aAAa,CAAa;IAGnC,IAAI,EAAE,UAAU,CAAQ;IAGxB,OAAO,UAAS;IAGhB,QAAQ,UAAS;IAEjB;;;;OAIG;IAEH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IAEH,UAAU,EAAE,WAAW,CAAa;IAEpC,kEAAkE;IAElE,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,uDAAuD;IAEvD,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,OAAO,CAAC,YAAY;IASpB,+CAA+C;IACtC,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY;IAKrC,8CAA8C;IACrC,IAAI;IAKb,MAAM;CAuDP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
package/dist/oh-button.js
CHANGED
|
@@ -1,32 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* oh-button
|
|
3
3
|
*
|
|
4
|
-
* A chunky, confident button with playful personality.
|
|
5
|
-
* Inspired by hand-crafted, illustrative UI — not corporate SaaS.
|
|
6
|
-
*
|
|
7
4
|
* DESIGN DECISIONS:
|
|
8
5
|
* ─────────────────
|
|
9
|
-
* 1.
|
|
10
|
-
*
|
|
11
|
-
* -
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* -
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* 4. HAND-CRAFTED FEEL
|
|
25
|
-
* - Bold, defined edges
|
|
26
|
-
* - Confident color choices
|
|
27
|
-
* - Personality over polish
|
|
28
|
-
*
|
|
29
|
-
* @element oh-button
|
|
6
|
+
* 1. Renders a native <button>, or an <a> when `href` is set, inside the
|
|
7
|
+
* shadow root, so keyboard and screen reader behaviour come from the
|
|
8
|
+
* platform. `accessible-label` is forwarded to it (an aria-label on the
|
|
9
|
+
* host isn't).
|
|
10
|
+
* 2. Look comes from button.* component tokens: button.base.borderWidth
|
|
11
|
+
* (stroke.control), button.base.borderRadius (shape.control),
|
|
12
|
+
* button.variant.<variant>.* for fills, text, border and shadow colour,
|
|
13
|
+
* button.size.<size>.* for type, padding and height.
|
|
14
|
+
* 3. Hover and active move the button by lift.hoverMd / lift.pressMd and set
|
|
15
|
+
* the shadow offset to elevation.offset.2xl / elevation.offset.xs (rest is
|
|
16
|
+
* elevation.offset.lg).
|
|
17
|
+
* 4. Focus is a solid underline on the label (an underline the button draws
|
|
18
|
+
* itself for icon-only and loading buttons, whose text is hidden).
|
|
19
|
+
* 5. Loading uses aria-disabled + aria-busy, not disabled, so focus stays on
|
|
20
|
+
* the button.
|
|
30
21
|
*/
|
|
31
22
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
32
23
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -37,6 +28,41 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
37
28
|
import { html, css, nothing } from "lit";
|
|
38
29
|
import { customElement, property } from "lit/decorators.js";
|
|
39
30
|
import { OhElement, baseStyles } from "./base.js";
|
|
31
|
+
/**
|
|
32
|
+
* A button that starts an action, or a link styled as a button when `href` is set.
|
|
33
|
+
*
|
|
34
|
+
* **Use it for** actions: submitting, saving, opening a dialog, confirming.
|
|
35
|
+
* **Don't use it for** links inside running text (use `oh-link`).
|
|
36
|
+
*
|
|
37
|
+
* **Variants:** `primary` for the main action, `secondary` for the others,
|
|
38
|
+
* `accent` for an action that takes the accent colour role. **Sizes:** `sm`, `md` (default), `lg`.
|
|
39
|
+
* **States:** rest, hover, active, focus and `loading`.
|
|
40
|
+
*
|
|
41
|
+
* **Behaviour:** fires `oh-click` when the inner `<button>` is clicked, except
|
|
42
|
+
* while `loading`. `loading` shows a spinner, keeps the label for screen
|
|
43
|
+
* readers, sets `aria-busy` and `aria-disabled` and ignores clicks, while the
|
|
44
|
+
* button stays focusable. With `href` it renders an `<a>` (and
|
|
45
|
+
* `target="_blank"` adds `rel="noopener noreferrer"`); link buttons don't fire
|
|
46
|
+
* `oh-click`. It has no `disabled` property and doesn't submit a form by
|
|
47
|
+
* itself: handle `oh-click`. Under `prefers-reduced-motion` it doesn't move.
|
|
48
|
+
*
|
|
49
|
+
* **Accessibility:** focus shows a solid underline on the label. An
|
|
50
|
+
* `icon-only` button has no visible text, so always set `accessible-label`
|
|
51
|
+
* (not `aria-label`, which isn't forwarded into the shadow root).
|
|
52
|
+
*
|
|
53
|
+
* **Look:** set by tokens — `stroke.control` (border width), `shape.control`
|
|
54
|
+
* (corners), `typography.control.*` (type), `button.variant.<variant>.*`
|
|
55
|
+
* (background, text, border and shadow colour per state), `button.size.<size>.*`
|
|
56
|
+
* (font size, padding, minimum height), `elevation.offset.*` (shadow offset)
|
|
57
|
+
* and `lift.hoverMd` / `lift.pressMd` (movement on hover and press).
|
|
58
|
+
*
|
|
59
|
+
* @element oh-button
|
|
60
|
+
* @fires oh-click - The button was clicked (not while loading). `detail.originalEvent` is the click.
|
|
61
|
+
* @slot - The label.
|
|
62
|
+
* @slot icon-left - An icon before the label.
|
|
63
|
+
* @slot icon-right - An icon after the label.
|
|
64
|
+
* @csspart button - The inner `<button>` or `<a>`.
|
|
65
|
+
*/
|
|
40
66
|
let OhButton = class OhButton extends OhElement {
|
|
41
67
|
constructor() {
|
|
42
68
|
super(...arguments);
|
|
@@ -53,17 +79,12 @@ let OhButton = class OhButton extends OhElement {
|
|
|
53
79
|
static { this.styles = [
|
|
54
80
|
baseStyles,
|
|
55
81
|
css `
|
|
56
|
-
/* ═══════════════════════════════════════════════════════════════
|
|
57
|
-
ORANGE HALO BUTTON
|
|
58
|
-
Chunky • Playful • Confident • Hand-crafted
|
|
59
|
-
═══════════════════════════════════════════════════════════════ */
|
|
60
|
-
|
|
61
82
|
:host {
|
|
62
83
|
display: inline-block;
|
|
63
84
|
}
|
|
64
85
|
|
|
65
86
|
.button {
|
|
66
|
-
/* Typography:
|
|
87
|
+
/* Typography: button.base.* (from typography.control.*) */
|
|
67
88
|
font-family: var(--oh-button-base-font-family);
|
|
68
89
|
font-weight: var(--oh-button-base-font-weight);
|
|
69
90
|
letter-spacing: var(--oh-button-base-letter-spacing);
|
|
@@ -75,10 +96,10 @@ let OhButton = class OhButton extends OhElement {
|
|
|
75
96
|
justify-content: center;
|
|
76
97
|
gap: var(--oh-spacing-2);
|
|
77
98
|
|
|
78
|
-
/*
|
|
99
|
+
/* Corners: button.base.borderRadius (shape.control) */
|
|
79
100
|
border-radius: var(--oh-button-base-border-radius);
|
|
80
101
|
|
|
81
|
-
/*
|
|
102
|
+
/* Border width: button.base.borderWidth (stroke.control) */
|
|
82
103
|
border: var(--oh-button-base-border-width) solid;
|
|
83
104
|
|
|
84
105
|
/* Remove default button styles */
|
|
@@ -87,18 +108,16 @@ let OhButton = class OhButton extends OhElement {
|
|
|
87
108
|
-moz-appearance: none;
|
|
88
109
|
appearance: none;
|
|
89
110
|
|
|
90
|
-
/*
|
|
111
|
+
/* Transitions: motion.snappy / motion.quick */
|
|
91
112
|
transition:
|
|
92
|
-
transform var(--oh-motion-snappy) var(--oh-motion-ease-
|
|
93
|
-
box-shadow var(--oh-motion-snappy) var(--oh-motion-ease-
|
|
113
|
+
transform var(--oh-motion-snappy) var(--oh-motion-ease-emphasized),
|
|
114
|
+
box-shadow var(--oh-motion-snappy) var(--oh-motion-ease-emphasized),
|
|
94
115
|
background-color var(--oh-motion-quick) ease;
|
|
95
116
|
}
|
|
96
117
|
|
|
97
118
|
/* ═══════════════════════════════════════════════════════════════
|
|
98
119
|
PRIMARY VARIANT
|
|
99
|
-
|
|
100
|
-
Filled button: color + shadow define shape (no visible border)
|
|
101
|
-
Contrast: white on brand primary = 5.0:1 ✓ (WCAG AA)
|
|
120
|
+
Filled: button.variant.primary.* (border matches the fill)
|
|
102
121
|
═══════════════════════════════════════════════════════════════ */
|
|
103
122
|
|
|
104
123
|
.button--primary {
|
|
@@ -106,7 +125,7 @@ let OhButton = class OhButton extends OhElement {
|
|
|
106
125
|
border-color: var(--oh-button-variant-primary-border-color);
|
|
107
126
|
color: var(--oh-button-variant-primary-color);
|
|
108
127
|
|
|
109
|
-
/*
|
|
128
|
+
/* Offset shadow: elevation.offset.lg at rest */
|
|
110
129
|
box-shadow: var(--oh-elevation-offset-lg) var(--oh-elevation-offset-lg)
|
|
111
130
|
0 0 var(--oh-button-variant-primary-shadow-color);
|
|
112
131
|
}
|
|
@@ -130,7 +149,8 @@ let OhButton = class OhButton extends OhElement {
|
|
|
130
149
|
|
|
131
150
|
/* ═══════════════════════════════════════════════════════════════
|
|
132
151
|
SECONDARY VARIANT
|
|
133
|
-
|
|
152
|
+
button.variant.secondary.*: its border (borderColor) defines the
|
|
153
|
+
button's edge against the page, so it must stay visible
|
|
134
154
|
═══════════════════════════════════════════════════════════════ */
|
|
135
155
|
|
|
136
156
|
.button--secondary {
|
|
@@ -159,8 +179,7 @@ let OhButton = class OhButton extends OhElement {
|
|
|
159
179
|
|
|
160
180
|
/* ═══════════════════════════════════════════════════════════════
|
|
161
181
|
ACCENT VARIANT
|
|
162
|
-
|
|
163
|
-
Filled button: color + shadow define shape (no visible border)
|
|
182
|
+
Filled: button.variant.accent.* (border matches the fill)
|
|
164
183
|
═══════════════════════════════════════════════════════════════ */
|
|
165
184
|
|
|
166
185
|
.button--accent {
|
|
@@ -217,8 +236,8 @@ let OhButton = class OhButton extends OhElement {
|
|
|
217
236
|
|
|
218
237
|
/* ═══════════════════════════════════════════════════════════════
|
|
219
238
|
SIZE VARIANTS
|
|
220
|
-
|
|
221
|
-
|
|
239
|
+
Values: button.size.* tokens. Font sizes come from
|
|
240
|
+
typography.control.fontSize.*, never below font.size.base
|
|
222
241
|
═══════════════════════════════════════════════════════════════ */
|
|
223
242
|
|
|
224
243
|
.button--sm {
|
package/dist/oh-button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oh-button.js","sourceRoot":"","sources":["../src/oh-button.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"oh-button.js","sourceRoot":"","sources":["../src/oh-button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAMlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,SAAS;IAAhC;;QA2YL,YAAO,GAAkB,SAAS,CAAC;QAGnC,SAAI,GAAe,IAAI,CAAC;QAGxB,YAAO,GAAG,KAAK,CAAC;QAGhB,aAAQ,GAAG,KAAK,CAAC;QAUjB;;;WAGG;QAEH,eAAU,GAAgB,SAAS,CAAC;IAsFtC,CAAC;aAxfiB,WAAM,GAAG;QACvB,UAAU;QACV,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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