@orange-halo/components 2.2.0 → 3.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 +565 -328
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +7 -0
- package/dist/base.js.map +1 -1
- package/dist/index.d.ts +2 -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 +83 -21
- 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 +43 -21
- package/dist/oh-breadcrumb.js.map +1 -1
- package/dist/oh-button.d.ts +50 -24
- package/dist/oh-button.d.ts.map +1 -1
- package/dist/oh-button.js +66 -47
- 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.js +87 -45
- package/dist/oh-checkbox-group.js.map +1 -1
- package/dist/oh-checkbox.d.ts +55 -18
- package/dist/oh-checkbox.d.ts.map +1 -1
- package/dist/oh-checkbox.js +91 -59
- 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 +26 -33
- package/dist/oh-container.js.map +1 -1
- package/dist/oh-drawer.d.ts +36 -14
- package/dist/oh-drawer.d.ts.map +1 -1
- package/dist/oh-drawer.js +57 -26
- 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 +28 -5
- package/dist/oh-icon.js.map +1 -1
- package/dist/oh-input.d.ts +105 -21
- package/dist/oh-input.d.ts.map +1 -1
- package/dist/oh-input.js +207 -68
- 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 +56 -34
- 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 +44 -21
- 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 +32 -13
- 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.js +84 -44
- package/dist/oh-radio-group.js.map +1 -1
- package/dist/oh-radio.d.ts +56 -18
- package/dist/oh-radio.d.ts.map +1 -1
- package/dist/oh-radio.js +93 -60
- 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 +72 -36
- 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 +39 -26
- 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 +56 -30
- package/dist/oh-tabs.d.ts.map +1 -1
- package/dist/oh-tabs.js +89 -70
- 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 +68 -33
- package/dist/oh-toggle.js.map +1 -1
- package/dist/styles/typography.d.ts.map +1 -1
- package/dist/styles/typography.js +1 -2
- package/dist/styles/typography.js.map +1 -1
- package/package.json +3 -7
- package/dist/oh-button.figma.d.ts +0 -2
- package/dist/oh-button.figma.d.ts.map +0 -1
- package/dist/oh-button.figma.js +0 -18
- package/dist/oh-button.figma.js.map +0 -1
- package/dist/oh-checkbox-group.figma.d.ts +0 -2
- package/dist/oh-checkbox-group.figma.d.ts.map +0 -1
- package/dist/oh-checkbox-group.figma.js +0 -24
- package/dist/oh-checkbox-group.figma.js.map +0 -1
- 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-input.figma.d.ts +0 -2
- package/dist/oh-input.figma.d.ts.map +0 -1
- package/dist/oh-input.figma.js +0 -36
- package/dist/oh-input.figma.js.map +0 -1
- package/dist/oh-radio-group.figma.d.ts +0 -2
- package/dist/oh-radio-group.figma.d.ts.map +0 -1
- package/dist/oh-radio-group.figma.js +0 -22
- package/dist/oh-radio-group.figma.js.map +0 -1
package/dist/base.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAO,SAAS,EAAE,MAAM,KAAK,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAO,SAAS,EAAE,MAAM,KAAK,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,SAwCxB,CAAC;AAEF;;GAEG;AACH,qBAAa,SAAU,SAAQ,UAAU;IACvC;;OAEG;IACH,MAAM,CAAC,MAAM,cAAgB;IAE7B;;OAEG;IACH,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,EACxB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,CAAC,EACV,OAAO,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,GAC3C,OAAO;IAWV;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;CAM7D"}
|
package/dist/base.js
CHANGED
|
@@ -12,6 +12,13 @@ import { LitElement, css } from "lit";
|
|
|
12
12
|
export const baseStyles = css `
|
|
13
13
|
:host {
|
|
14
14
|
box-sizing: border-box;
|
|
15
|
+
/* Text direction as a number, for motion and placement that CSS has no
|
|
16
|
+
logical form of (translateX, transform-origin): 1 in LTR, -1 in RTL */
|
|
17
|
+
--_oh-dir: 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:host(:dir(rtl)) {
|
|
21
|
+
--_oh-dir: -1;
|
|
15
22
|
}
|
|
16
23
|
|
|
17
24
|
:host *,
|
package/dist/base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,GAAG,EAAa,MAAM,KAAK,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAc,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,GAAG,EAAa,MAAM,KAAK,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAc,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCvC,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,UAAU;IACvC;;OAEG;aACI,WAAM,GAAG,CAAC,UAAU,CAAC,CAAC;IAE7B;;OAEG;IACO,IAAI,CACZ,SAAiB,EACjB,MAAU,EACV,OAA4C;QAE5C,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,SAAS,EAAE;YACvC,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI,EAAE,8BAA8B;YAC9C,UAAU,EAAE,IAAI;YAChB,GAAG,OAAO;YACV,MAAM;SACP,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED;;OAEG;IACO,QAAQ,CAAC,OAAgC;QACjD,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;aAC3B,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC;aAC5B,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC;aACnB,IAAI,CAAC,GAAG,CAAC,CAAC;IACf,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,6 @@ import "./oh-container.js";
|
|
|
19
19
|
import "./oh-drawer.js";
|
|
20
20
|
import "./oh-footer.js";
|
|
21
21
|
import "./oh-grid.js";
|
|
22
|
-
import "./oh-hero.js";
|
|
23
22
|
import "./oh-icon.js";
|
|
24
23
|
import "./oh-input.js";
|
|
25
24
|
import "./oh-link.js";
|
|
@@ -40,7 +39,7 @@ export type { AccordionItem, AccordionVariant, HeadingLevel, } from "./oh-accord
|
|
|
40
39
|
export { OhAlert } from "./oh-alert.js";
|
|
41
40
|
export type { AlertVariant } from "./oh-alert.js";
|
|
42
41
|
export { OhBadge } from "./oh-badge.js";
|
|
43
|
-
export type { BadgeVariant,
|
|
42
|
+
export type { BadgeVariant, BadgeAppearance } from "./oh-badge.js";
|
|
44
43
|
export { OhBreadcrumb } from "./oh-breadcrumb.js";
|
|
45
44
|
export type { BreadcrumbItem } from "./oh-breadcrumb.js";
|
|
46
45
|
export { OhButton } from "./oh-button.js";
|
|
@@ -55,14 +54,10 @@ export type { ClusterGap, ClusterJustify, ClusterAlign } from "./oh-cluster.js";
|
|
|
55
54
|
export { OhContainer } from "./oh-container.js";
|
|
56
55
|
export type { ContainerSize } from "./oh-container.js";
|
|
57
56
|
export { OhDrawer } from "./oh-drawer.js";
|
|
58
|
-
|
|
57
|
+
export type { DrawerPosition } from "./oh-drawer.js";
|
|
59
58
|
export { OhFooter } from "./oh-footer.js";
|
|
60
59
|
export { OhGrid } from "./oh-grid.js";
|
|
61
60
|
export type { GridColumns, GridGap } from "./oh-grid.js";
|
|
62
|
-
/** @deprecated Part of the Orange Halo brand: import from @orange-halo/brand-orange-halo. Removed from components in 3.0. */
|
|
63
|
-
export { OhHero } from "./oh-hero.js";
|
|
64
|
-
/** @deprecated Part of the Orange Halo brand: import from @orange-halo/brand-orange-halo. Removed from components in 3.0. */
|
|
65
|
-
export type { HeroVariant, HeroSize } from "./oh-hero.js";
|
|
66
61
|
export { OhIcon } from "./oh-icon.js";
|
|
67
62
|
export type { IconName, IconSize } from "./oh-icon.js";
|
|
68
63
|
export { OhInput } from "./oh-input.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,eAAe,CAAC;AACvB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,wBAAwB,CAAC;AAChC,OAAO,iBAAiB,CAAC;AACzB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,eAAe,CAAC;AACvB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,wBAAwB,CAAC;AAChC,OAAO,iBAAiB,CAAC;AACzB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,cAAc,CAAC;AACtB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BAAgB,CAAC;AAC1C,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,6 @@ import "./oh-container.js";
|
|
|
22
22
|
import "./oh-drawer.js";
|
|
23
23
|
import "./oh-footer.js";
|
|
24
24
|
import "./oh-grid.js";
|
|
25
|
-
import "./oh-hero.js";
|
|
26
25
|
import "./oh-icon.js";
|
|
27
26
|
import "./oh-input.js";
|
|
28
27
|
import "./oh-link.js";
|
|
@@ -54,11 +53,8 @@ export { OhCheckboxGroup } from "./oh-checkbox-group.js";
|
|
|
54
53
|
export { OhCluster } from "./oh-cluster.js";
|
|
55
54
|
export { OhContainer } from "./oh-container.js";
|
|
56
55
|
export { OhDrawer } from "./oh-drawer.js";
|
|
57
|
-
/** @deprecated Part of the Orange Halo brand: import from @orange-halo/brand-orange-halo. Removed from components in 3.0. */
|
|
58
56
|
export { OhFooter } from "./oh-footer.js";
|
|
59
57
|
export { OhGrid } from "./oh-grid.js";
|
|
60
|
-
/** @deprecated Part of the Orange Halo brand: import from @orange-halo/brand-orange-halo. Removed from components in 3.0. */
|
|
61
|
-
export { OhHero } from "./oh-hero.js";
|
|
62
58
|
export { OhIcon } from "./oh-icon.js";
|
|
63
59
|
export { OhInput } from "./oh-input.js";
|
|
64
60
|
export { OhLink } from "./oh-link.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,gFAAgF;AAChF,kEAAkE;AAClE,gFAAgF;AAChF,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,eAAe,CAAC;AACvB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,wBAAwB,CAAC;AAChC,OAAO,iBAAiB,CAAC;AACzB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,gFAAgF;AAChF,kEAAkE;AAClE,gFAAgF;AAChF,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,eAAe,CAAC;AACvB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,wBAAwB,CAAC;AAChC,OAAO,iBAAiB,CAAC;AACzB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,gBAAgB,CAAC;AACxB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,eAAe,CAAC;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E1C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,SAAS;AACT,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/oh-accordion.d.ts
CHANGED
|
@@ -6,35 +6,80 @@
|
|
|
6
6
|
* DESIGN DECISIONS:
|
|
7
7
|
* ─────────────────
|
|
8
8
|
* 1. TWO VARIANTS
|
|
9
|
-
* - Subtle:
|
|
10
|
-
*
|
|
9
|
+
* - Subtle: inline with the content; the trigger follows the link rules
|
|
10
|
+
* (color.text.link, a decoration.underline* underline that clears on hover)
|
|
11
|
+
* - Standout: each item is a boxed surface (color.surface.raised,
|
|
12
|
+
* stroke.control, shape.container) with an elevation.offset.* shadow
|
|
13
|
+
* that moves by lift.hoverMd on hover
|
|
11
14
|
*
|
|
12
15
|
* 2. CONSISTENT ICON
|
|
13
|
-
* - Chevron that rotates
|
|
16
|
+
* - Chevron that rotates a quarter turn when expanded
|
|
14
17
|
* - Same icon for both variants
|
|
15
18
|
*
|
|
16
19
|
* 3. ACCESSIBLE
|
|
17
|
-
* - Button trigger with aria-expanded
|
|
18
|
-
* - Content region with aria-hidden
|
|
20
|
+
* - Button trigger with aria-expanded, inside a heading at a set level
|
|
21
|
+
* - Content region with aria-hidden, and inert while collapsed so
|
|
22
|
+
* nothing inside it can take focus
|
|
19
23
|
* - Keyboard support (Enter/Space)
|
|
20
24
|
* - Focus state with underline
|
|
21
25
|
*
|
|
22
|
-
*
|
|
26
|
+
* 4. ONE ITEM IS FINE
|
|
27
|
+
* - A single item is a show/hide section ("Show as table"). Each
|
|
28
|
+
* item's hiddenText adds heading text only screen readers hear, so
|
|
29
|
+
* several "Show as table" headings on a page can be told apart
|
|
30
|
+
*
|
|
31
|
+
* 5. ANY CONTENT
|
|
32
|
+
* - An item's content is any markup in a child with slot="item-<index>"
|
|
33
|
+
* (item-0 for the first), such as a paragraph or a table
|
|
23
34
|
*/
|
|
24
|
-
import { nothing } from "lit";
|
|
35
|
+
import { nothing, type PropertyValues } from "lit";
|
|
25
36
|
import { OhElement } from "./base.js";
|
|
26
37
|
export interface AccordionItem {
|
|
38
|
+
/** The visible heading */
|
|
27
39
|
heading: string;
|
|
28
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Extra heading text that only screen readers hear, added after the
|
|
42
|
+
* heading, e.g. "(sales per year)" for a "Show as table" heading
|
|
43
|
+
*/
|
|
44
|
+
hiddenText?: string;
|
|
45
|
+
/** Starts open */
|
|
46
|
+
open?: boolean;
|
|
29
47
|
}
|
|
30
48
|
export type AccordionVariant = "subtle" | "standout";
|
|
31
49
|
export type HeadingLevel = 2 | 3 | 4 | 5 | 6;
|
|
50
|
+
/**
|
|
51
|
+
* Collapsible sections, each with a heading that shows and hides its content. Use one item for a single show/hide section.
|
|
52
|
+
*
|
|
53
|
+
* **Use it for** content readers scan by heading and open as needed (FAQs, details, a "Show as table" section). **Don't use it for** content most readers need (leave it visible); for switching between views of the same thing (use tabs); or for site navigation.
|
|
54
|
+
*
|
|
55
|
+
* **Parts:** `items` is an array of `{ heading, hiddenText?, open? }` (in HTML, a JSON array). Item N's content is any markup in a child with `slot="item-N"`, such as a paragraph or a table.
|
|
56
|
+
*
|
|
57
|
+
* **Variants:** `subtle` (default), inline with surrounding content, its trigger styled as a link; `standout`, each item a separate boxed surface, for when the sections are the page's main content.
|
|
58
|
+
*
|
|
59
|
+
* **States:** collapsed and expanded per item (any number can be open; `open` sets the starting state), plus hover and focus-visible on the trigger.
|
|
60
|
+
*
|
|
61
|
+
* **Behaviour:** each trigger is a `<button>` inside a heading at `heading-level` (default 3), so the items fit the page's outline. Click, Enter or Space toggles it. While collapsed, the panel is `aria-hidden` and `inert`, so nothing inside it takes focus. Motion is turned off under `prefers-reduced-motion`.
|
|
62
|
+
*
|
|
63
|
+
* **Accessibility:** the trigger has `aria-expanded` and `aria-controls`; the panel is a `region` labelled by its trigger. `hiddenText` adds heading text only screen readers hear, so several items with the same visible heading (e.g. "Show as table") can be told apart. Set `heading-level` to fit the headings around it.
|
|
64
|
+
*
|
|
65
|
+
* **Look:** set by tokens. `subtle`: the trigger uses `color.text.link` and an underline set by `decoration.underlineThickness`, `underlineDash` and `underlinePeriod`, which clears on hover; focus is a solid `color.brand.primary` underline; items are divided by `stroke.divider` in `color.border.subtle`. `standout`: each item uses `color.surface.raised`, a `stroke.control` border in `color.border.emphasis` (`color.brand.primary` when expanded), `shape.container` corners and an `elevation.offset.*` shadow in `elevation.color.neutral`, which moves by `lift.hoverMd` on hover. Type uses `typography.body.*`; motion uses `motion.*` tokens.
|
|
66
|
+
*
|
|
67
|
+
* @element oh-accordion
|
|
68
|
+
* @slot item-N - The content of the item at index N (item-0 is the first)
|
|
69
|
+
*/
|
|
32
70
|
export declare class OhAccordion extends OhElement {
|
|
33
71
|
static styles: import("lit").CSSResult[];
|
|
72
|
+
/**
|
|
73
|
+
* The sections: { heading, hiddenText?, open? }. In HTML, a JSON array.
|
|
74
|
+
* Each item's content is a child with slot="item-<index>".
|
|
75
|
+
*/
|
|
34
76
|
items: AccordionItem[];
|
|
77
|
+
/** subtle (inline) or standout (boxed) */
|
|
35
78
|
variant: AccordionVariant;
|
|
79
|
+
/** The heading level of each item's trigger, to fit the page's outline */
|
|
36
80
|
headingLevel: HeadingLevel;
|
|
37
81
|
private _expandedItems;
|
|
82
|
+
willUpdate(changed: PropertyValues): void;
|
|
38
83
|
private _toggleItem;
|
|
39
84
|
private _isExpanded;
|
|
40
85
|
render(): typeof nothing | import("lit").TemplateResult<1>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oh-accordion.d.ts","sourceRoot":"","sources":["../src/oh-accordion.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"oh-accordion.d.ts","sourceRoot":"","sources":["../src/oh-accordion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAa,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAG9D,OAAO,EAAE,SAAS,EAAc,MAAM,WAAW,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,UAAU,CAAC;AACrD,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBACa,WAAY,SAAQ,SAAS;IACxC,OAAgB,MAAM,4BAyRpB;IAEF;;;OAGG;IAEH,KAAK,EAAE,aAAa,EAAE,CAAM;IAE5B,0CAA0C;IAE1C,OAAO,EAAE,gBAAgB,CAAY;IAErC,0EAA0E;IAE1E,YAAY,EAAE,YAAY,CAAK;IAG/B,OAAO,CAAC,cAAc,CAA0B;IAEhD,UAAU,CAAC,OAAO,EAAE,cAAc;IASlC,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,WAAW;IAInB,MAAM;CAmEP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|
package/dist/oh-accordion.js
CHANGED
|
@@ -6,20 +6,31 @@
|
|
|
6
6
|
* DESIGN DECISIONS:
|
|
7
7
|
* ─────────────────
|
|
8
8
|
* 1. TWO VARIANTS
|
|
9
|
-
* - Subtle:
|
|
10
|
-
*
|
|
9
|
+
* - Subtle: inline with the content; the trigger follows the link rules
|
|
10
|
+
* (color.text.link, a decoration.underline* underline that clears on hover)
|
|
11
|
+
* - Standout: each item is a boxed surface (color.surface.raised,
|
|
12
|
+
* stroke.control, shape.container) with an elevation.offset.* shadow
|
|
13
|
+
* that moves by lift.hoverMd on hover
|
|
11
14
|
*
|
|
12
15
|
* 2. CONSISTENT ICON
|
|
13
|
-
* - Chevron that rotates
|
|
16
|
+
* - Chevron that rotates a quarter turn when expanded
|
|
14
17
|
* - Same icon for both variants
|
|
15
18
|
*
|
|
16
19
|
* 3. ACCESSIBLE
|
|
17
|
-
* - Button trigger with aria-expanded
|
|
18
|
-
* - Content region with aria-hidden
|
|
20
|
+
* - Button trigger with aria-expanded, inside a heading at a set level
|
|
21
|
+
* - Content region with aria-hidden, and inert while collapsed so
|
|
22
|
+
* nothing inside it can take focus
|
|
19
23
|
* - Keyboard support (Enter/Space)
|
|
20
24
|
* - Focus state with underline
|
|
21
25
|
*
|
|
22
|
-
*
|
|
26
|
+
* 4. ONE ITEM IS FINE
|
|
27
|
+
* - A single item is a show/hide section ("Show as table"). Each
|
|
28
|
+
* item's hiddenText adds heading text only screen readers hear, so
|
|
29
|
+
* several "Show as table" headings on a page can be told apart
|
|
30
|
+
*
|
|
31
|
+
* 5. ANY CONTENT
|
|
32
|
+
* - An item's content is any markup in a child with slot="item-<index>"
|
|
33
|
+
* (item-0 for the first), such as a paragraph or a table
|
|
23
34
|
*/
|
|
24
35
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
25
36
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -31,11 +42,37 @@ import { html, css, nothing } from "lit";
|
|
|
31
42
|
import { unsafeStatic, html as staticHtml } from "lit/static-html.js";
|
|
32
43
|
import { customElement, property, state } from "lit/decorators.js";
|
|
33
44
|
import { OhElement, baseStyles } from "./base.js";
|
|
45
|
+
/**
|
|
46
|
+
* Collapsible sections, each with a heading that shows and hides its content. Use one item for a single show/hide section.
|
|
47
|
+
*
|
|
48
|
+
* **Use it for** content readers scan by heading and open as needed (FAQs, details, a "Show as table" section). **Don't use it for** content most readers need (leave it visible); for switching between views of the same thing (use tabs); or for site navigation.
|
|
49
|
+
*
|
|
50
|
+
* **Parts:** `items` is an array of `{ heading, hiddenText?, open? }` (in HTML, a JSON array). Item N's content is any markup in a child with `slot="item-N"`, such as a paragraph or a table.
|
|
51
|
+
*
|
|
52
|
+
* **Variants:** `subtle` (default), inline with surrounding content, its trigger styled as a link; `standout`, each item a separate boxed surface, for when the sections are the page's main content.
|
|
53
|
+
*
|
|
54
|
+
* **States:** collapsed and expanded per item (any number can be open; `open` sets the starting state), plus hover and focus-visible on the trigger.
|
|
55
|
+
*
|
|
56
|
+
* **Behaviour:** each trigger is a `<button>` inside a heading at `heading-level` (default 3), so the items fit the page's outline. Click, Enter or Space toggles it. While collapsed, the panel is `aria-hidden` and `inert`, so nothing inside it takes focus. Motion is turned off under `prefers-reduced-motion`.
|
|
57
|
+
*
|
|
58
|
+
* **Accessibility:** the trigger has `aria-expanded` and `aria-controls`; the panel is a `region` labelled by its trigger. `hiddenText` adds heading text only screen readers hear, so several items with the same visible heading (e.g. "Show as table") can be told apart. Set `heading-level` to fit the headings around it.
|
|
59
|
+
*
|
|
60
|
+
* **Look:** set by tokens. `subtle`: the trigger uses `color.text.link` and an underline set by `decoration.underlineThickness`, `underlineDash` and `underlinePeriod`, which clears on hover; focus is a solid `color.brand.primary` underline; items are divided by `stroke.divider` in `color.border.subtle`. `standout`: each item uses `color.surface.raised`, a `stroke.control` border in `color.border.emphasis` (`color.brand.primary` when expanded), `shape.container` corners and an `elevation.offset.*` shadow in `elevation.color.neutral`, which moves by `lift.hoverMd` on hover. Type uses `typography.body.*`; motion uses `motion.*` tokens.
|
|
61
|
+
*
|
|
62
|
+
* @element oh-accordion
|
|
63
|
+
* @slot item-N - The content of the item at index N (item-0 is the first)
|
|
64
|
+
*/
|
|
34
65
|
let OhAccordion = class OhAccordion extends OhElement {
|
|
35
66
|
constructor() {
|
|
36
67
|
super(...arguments);
|
|
68
|
+
/**
|
|
69
|
+
* The sections: { heading, hiddenText?, open? }. In HTML, a JSON array.
|
|
70
|
+
* Each item's content is a child with slot="item-<index>".
|
|
71
|
+
*/
|
|
37
72
|
this.items = [];
|
|
73
|
+
/** subtle (inline) or standout (boxed) */
|
|
38
74
|
this.variant = "subtle";
|
|
75
|
+
/** The heading level of each item's trigger, to fit the page's outline */
|
|
39
76
|
this.headingLevel = 3;
|
|
40
77
|
this._expandedItems = new Set();
|
|
41
78
|
}
|
|
@@ -43,7 +80,7 @@ let OhAccordion = class OhAccordion extends OhElement {
|
|
|
43
80
|
baseStyles,
|
|
44
81
|
css `
|
|
45
82
|
/* ═══════════════════════════════════════════════════════════════
|
|
46
|
-
|
|
83
|
+
ACCORDION
|
|
47
84
|
Subtle (inline) • Standout (boxed) • Accessible
|
|
48
85
|
═══════════════════════════════════════════════════════════════ */
|
|
49
86
|
|
|
@@ -93,7 +130,7 @@ let OhAccordion = class OhAccordion extends OhElement {
|
|
|
93
130
|
background: transparent;
|
|
94
131
|
border: none;
|
|
95
132
|
cursor: pointer;
|
|
96
|
-
text-align:
|
|
133
|
+
text-align: start;
|
|
97
134
|
|
|
98
135
|
font-family: var(--oh-typography-body-font-family);
|
|
99
136
|
font-size: var(--oh-typography-body-base-font-size);
|
|
@@ -105,7 +142,7 @@ let OhAccordion = class OhAccordion extends OhElement {
|
|
|
105
142
|
outline: none;
|
|
106
143
|
}
|
|
107
144
|
|
|
108
|
-
/* Text span with
|
|
145
|
+
/* Text span with the link underline (decoration.underline*) */
|
|
109
146
|
.accordion--subtle .accordion-text {
|
|
110
147
|
position: relative;
|
|
111
148
|
padding-bottom: var(--oh-decoration-underline-thickness);
|
|
@@ -114,7 +151,7 @@ let OhAccordion = class OhAccordion extends OhElement {
|
|
|
114
151
|
.accordion--subtle .accordion-text::after {
|
|
115
152
|
content: "";
|
|
116
153
|
position: absolute;
|
|
117
|
-
|
|
154
|
+
inset-inline-start: 0;
|
|
118
155
|
bottom: 0;
|
|
119
156
|
width: 100%;
|
|
120
157
|
height: var(--oh-decoration-underline-thickness);
|
|
@@ -127,7 +164,7 @@ let OhAccordion = class OhAccordion extends OhElement {
|
|
|
127
164
|
);
|
|
128
165
|
background-size: 100% 100%;
|
|
129
166
|
background-repeat: no-repeat;
|
|
130
|
-
transform-origin:
|
|
167
|
+
transform-origin: calc(50% + 50% * var(--_oh-dir)); /* the end side */
|
|
131
168
|
transition: transform var(--oh-motion-relaxed)
|
|
132
169
|
var(--oh-motion-ease-gentle);
|
|
133
170
|
}
|
|
@@ -151,7 +188,7 @@ let OhAccordion = class OhAccordion extends OhElement {
|
|
|
151
188
|
}
|
|
152
189
|
|
|
153
190
|
/* ═══════════════════════════════════════════════════════════════
|
|
154
|
-
STANDOUT VARIANT — Boxed
|
|
191
|
+
STANDOUT VARIANT — Boxed; shadow moves by lift.hoverMd on hover
|
|
155
192
|
═══════════════════════════════════════════════════════════════ */
|
|
156
193
|
|
|
157
194
|
.accordion--standout {
|
|
@@ -166,17 +203,17 @@ let OhAccordion = class OhAccordion extends OhElement {
|
|
|
166
203
|
|
|
167
204
|
/* Base shadow and lift animation */
|
|
168
205
|
box-shadow: var(--oh-elevation-offset-md) var(--oh-elevation-offset-md)
|
|
169
|
-
0 0 var(--oh-
|
|
206
|
+
0 0 var(--oh-elevation-color-neutral);
|
|
170
207
|
transition:
|
|
171
|
-
transform var(--oh-motion-snappy) var(--oh-motion-ease-
|
|
172
|
-
box-shadow var(--oh-motion-snappy) var(--oh-motion-ease-
|
|
208
|
+
transform var(--oh-motion-snappy) var(--oh-motion-ease-emphasized),
|
|
209
|
+
box-shadow var(--oh-motion-snappy) var(--oh-motion-ease-emphasized);
|
|
173
210
|
}
|
|
174
211
|
|
|
175
212
|
/* Lift whole accordion only when trigger is hovered */
|
|
176
213
|
.accordion--standout .accordion-item:has(.accordion-trigger:hover) {
|
|
177
214
|
transform: translate(var(--oh-lift-hover-md), var(--oh-lift-hover-md));
|
|
178
215
|
box-shadow: var(--oh-elevation-offset-xl) var(--oh-elevation-offset-xl)
|
|
179
|
-
0 0 var(--oh-
|
|
216
|
+
0 0 var(--oh-elevation-color-neutral-hover);
|
|
180
217
|
}
|
|
181
218
|
|
|
182
219
|
.accordion--standout .accordion-item[data-expanded="true"] {
|
|
@@ -193,7 +230,7 @@ let OhAccordion = class OhAccordion extends OhElement {
|
|
|
193
230
|
background: transparent;
|
|
194
231
|
border: none;
|
|
195
232
|
cursor: pointer;
|
|
196
|
-
text-align:
|
|
233
|
+
text-align: start;
|
|
197
234
|
|
|
198
235
|
font-family: var(--oh-typography-body-font-family);
|
|
199
236
|
font-size: var(--oh-typography-body-base-font-size);
|
|
@@ -210,7 +247,7 @@ let OhAccordion = class OhAccordion extends OhElement {
|
|
|
210
247
|
text-underline-offset: 3px;
|
|
211
248
|
}
|
|
212
249
|
|
|
213
|
-
/* Text span for standout
|
|
250
|
+
/* Text span for standout: the underline appears on hover */
|
|
214
251
|
.accordion--standout .accordion-text {
|
|
215
252
|
position: relative;
|
|
216
253
|
padding-bottom: var(--oh-decoration-underline-thickness);
|
|
@@ -219,7 +256,7 @@ let OhAccordion = class OhAccordion extends OhElement {
|
|
|
219
256
|
.accordion--standout .accordion-text::after {
|
|
220
257
|
content: "";
|
|
221
258
|
position: absolute;
|
|
222
|
-
|
|
259
|
+
inset-inline-start: 0;
|
|
223
260
|
bottom: 0;
|
|
224
261
|
width: 100%;
|
|
225
262
|
height: var(--oh-decoration-underline-thickness);
|
|
@@ -232,7 +269,7 @@ let OhAccordion = class OhAccordion extends OhElement {
|
|
|
232
269
|
);
|
|
233
270
|
background-size: 100% 100%;
|
|
234
271
|
background-repeat: no-repeat;
|
|
235
|
-
transform-origin:
|
|
272
|
+
transform-origin: calc(50% - 50% * var(--_oh-dir)); /* the start side */
|
|
236
273
|
transform: scaleX(0);
|
|
237
274
|
transition: transform var(--oh-motion-relaxed)
|
|
238
275
|
var(--oh-motion-ease-gentle);
|
|
@@ -290,6 +327,19 @@ let OhAccordion = class OhAccordion extends OhElement {
|
|
|
290
327
|
overflow: hidden;
|
|
291
328
|
}
|
|
292
329
|
|
|
330
|
+
/* Heading text for screen readers only */
|
|
331
|
+
.visually-hidden {
|
|
332
|
+
position: absolute;
|
|
333
|
+
width: 1px;
|
|
334
|
+
height: 1px;
|
|
335
|
+
padding: 0;
|
|
336
|
+
margin: -1px;
|
|
337
|
+
overflow: hidden;
|
|
338
|
+
clip: rect(0, 0, 0, 0);
|
|
339
|
+
white-space: nowrap;
|
|
340
|
+
border: 0;
|
|
341
|
+
}
|
|
342
|
+
|
|
293
343
|
/* ═══════════════════════════════════════════════════════════════
|
|
294
344
|
REDUCED MOTION
|
|
295
345
|
═══════════════════════════════════════════════════════════════ */
|
|
@@ -308,6 +358,12 @@ let OhAccordion = class OhAccordion extends OhElement {
|
|
|
308
358
|
}
|
|
309
359
|
`,
|
|
310
360
|
]; }
|
|
361
|
+
willUpdate(changed) {
|
|
362
|
+
// New items start open or closed as each one says
|
|
363
|
+
if (changed.has("items")) {
|
|
364
|
+
this._expandedItems = new Set((this.items ?? []).flatMap((item, index) => (item.open ? [index] : [])));
|
|
365
|
+
}
|
|
366
|
+
}
|
|
311
367
|
_toggleItem(index) {
|
|
312
368
|
if (this._expandedItems.has(index)) {
|
|
313
369
|
this._expandedItems.delete(index);
|
|
@@ -353,6 +409,11 @@ let OhAccordion = class OhAccordion extends OhElement {
|
|
|
353
409
|
<path d="M6 4L10 8L6 12" />
|
|
354
410
|
</svg>
|
|
355
411
|
<span class="accordion-text">${item.heading}</span>
|
|
412
|
+
${item.hiddenText
|
|
413
|
+
? html `<span class="visually-hidden">
|
|
414
|
+
${item.hiddenText}</span
|
|
415
|
+
>`
|
|
416
|
+
: nothing}
|
|
356
417
|
</button>
|
|
357
418
|
</${headingTag}>
|
|
358
419
|
<div
|
|
@@ -361,11 +422,12 @@ let OhAccordion = class OhAccordion extends OhElement {
|
|
|
361
422
|
role="region"
|
|
362
423
|
aria-labelledby=${triggerId}
|
|
363
424
|
aria-hidden=${!isExpanded}
|
|
425
|
+
?inert=${!isExpanded}
|
|
364
426
|
data-expanded=${isExpanded ? "true" : "false"}
|
|
365
427
|
>
|
|
366
428
|
<div class="accordion-panel-inner">
|
|
367
429
|
<div class="accordion-content">
|
|
368
|
-
|
|
430
|
+
<slot name=${`item-${index}`}></slot>
|
|
369
431
|
</div>
|
|
370
432
|
</div>
|
|
371
433
|
</div>
|
package/dist/oh-accordion.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oh-accordion.js","sourceRoot":"","sources":["../src/oh-accordion.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"oh-accordion.js","sourceRoot":"","sources":["../src/oh-accordion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAiBlD;;;;;;;;;;;;;;;;;;;GAmBG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,SAAS;IAAn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,CAAC,CAAC,OACN;;kBAEE,UAAU;;qBAEP,OAAO;;;kCAGM,SAAS;8BACb,CAAC,UAAU;yBAChB,CAAC,UAAU;gCACJ,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;;;;iCAI5B,QAAQ,KAAK,EAAE;;;;;WAKrC,CAAC;QACJ,CAAC,CAAC;;KAEL,CAAC;IACJ,CAAC;;AArGD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;0CACE;AAI5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CACL;AAIrC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;iDACvC;AAGvB;IADP,KAAK,EAAE;mDACwC;AA5SrC,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAuYvB"}
|
package/dist/oh-alert.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* oh-alert
|
|
3
3
|
*
|
|
4
|
-
* A
|
|
5
|
-
* Subtle backgrounds only, supports rich content including links.
|
|
4
|
+
* A message box for feedback, optionally dismissible, that can hold links.
|
|
6
5
|
*
|
|
7
6
|
* DESIGN DECISIONS:
|
|
8
7
|
* ─────────────────
|
|
9
8
|
* 1. SUBTLE ONLY
|
|
10
|
-
* -
|
|
9
|
+
* - Background is the variant's color.feedback.*Subtle token; border and
|
|
10
|
+
* icon use color.feedback.*; text stays color.text.primary
|
|
11
11
|
* - Matches badge subtle variants
|
|
12
12
|
*
|
|
13
13
|
* 2. DISMISSIBLE
|
|
@@ -19,14 +19,32 @@
|
|
|
19
19
|
* - Default slot for flexible content
|
|
20
20
|
*
|
|
21
21
|
* 4. ACCESSIBLE
|
|
22
|
-
* - role="alert"
|
|
23
|
-
* - Close button has
|
|
24
|
-
* - Links within
|
|
25
|
-
*
|
|
26
|
-
* @element oh-alert
|
|
22
|
+
* - role="alert" only when live is set (alerts added after first render)
|
|
23
|
+
* - Close button has a visible text label
|
|
24
|
+
* - Links within take the variant's feedback colour
|
|
27
25
|
*/
|
|
28
26
|
import { OhElement } from "./base.js";
|
|
29
27
|
export type AlertVariant = "success" | "error" | "warning" | "info";
|
|
28
|
+
/**
|
|
29
|
+
* A message box that tells the user about the result of an action or something that needs their attention.
|
|
30
|
+
*
|
|
31
|
+
* **Use it for** feedback on what just happened (saved, failed) or a notice about the page or account, near the content it's about. **Don't use it for** a short status label (use `oh-badge`); for a field's validation error (use the field's own error message); or for a message that must interrupt the user (use `oh-modal`).
|
|
32
|
+
*
|
|
33
|
+
* **Variants:** `info` (default), `success`, `warning`, `error`, each by its feedback role. Each has its own icon, so the meaning isn't carried by colour alone.
|
|
34
|
+
*
|
|
35
|
+
* **Behaviour:** with `dismissible`, a "Close" button follows the content; selecting it fires `oh-dismiss` and sets `hidden` on the alert. Content goes in the default slot and can include links.
|
|
36
|
+
*
|
|
37
|
+
* **Accessibility:** set `live` only for an alert added after the page has rendered (e.g. after submit); it adds `role="alert"` so screen readers announce it. Leave it off for alerts present on page load. Icons are `aria-hidden`; put the meaning in the text. Links show a solid outline in the current text colour on focus; the close button shows an underline.
|
|
38
|
+
*
|
|
39
|
+
* **Look:** set by tokens. Each variant uses `color.feedback.<variant>Subtle` for the background and `color.feedback.<variant>` for the border, icon and links; text is `color.text.primary`. `stroke.control` sets the border, `shape.container` the corners, `typography.body.*` the text, and `decoration.underlineThickness`, `underlineDash` and `underlinePeriod` the link underline. The close button uses `closeButton.backgroundHover`, `closeButton.shadowHover`, `elevation.offset.*`, `lift.*` and `shape.compact`.
|
|
40
|
+
*
|
|
41
|
+
* @element oh-alert
|
|
42
|
+
* @slot - The message. Can include links.
|
|
43
|
+
* @csspart alert - The alert box.
|
|
44
|
+
* @csspart content - The message wrapper.
|
|
45
|
+
* @csspart close - The close button (only when `dismissible`).
|
|
46
|
+
* @fires oh-dismiss - When the close button is selected, before the alert hides.
|
|
47
|
+
*/
|
|
30
48
|
export declare class OhAlert extends OhElement {
|
|
31
49
|
static styles: import("lit").CSSResult[];
|
|
32
50
|
variant: AlertVariant;
|
package/dist/oh-alert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oh-alert.d.ts","sourceRoot":"","sources":["../src/oh-alert.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"oh-alert.d.ts","sourceRoot":"","sources":["../src/oh-alert.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,EAAE,SAAS,EAAc,MAAM,WAAW,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBACa,OAAQ,SAAQ,SAAS;IACpC,OAAgB,MAAM,4BA0NpB;IAGF,OAAO,EAAE,YAAY,CAAU;IAG/B,WAAW,UAAS;IAEpB;;;OAGG;IAEH,IAAI,UAAS;IAEb,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,QAAQ;IAkEhB,MAAM;CAoCP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|
package/dist/oh-alert.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* oh-alert
|
|
3
3
|
*
|
|
4
|
-
* A
|
|
5
|
-
* Subtle backgrounds only, supports rich content including links.
|
|
4
|
+
* A message box for feedback, optionally dismissible, that can hold links.
|
|
6
5
|
*
|
|
7
6
|
* DESIGN DECISIONS:
|
|
8
7
|
* ─────────────────
|
|
9
8
|
* 1. SUBTLE ONLY
|
|
10
|
-
* -
|
|
9
|
+
* - Background is the variant's color.feedback.*Subtle token; border and
|
|
10
|
+
* icon use color.feedback.*; text stays color.text.primary
|
|
11
11
|
* - Matches badge subtle variants
|
|
12
12
|
*
|
|
13
13
|
* 2. DISMISSIBLE
|
|
@@ -19,11 +19,9 @@
|
|
|
19
19
|
* - Default slot for flexible content
|
|
20
20
|
*
|
|
21
21
|
* 4. ACCESSIBLE
|
|
22
|
-
* - role="alert"
|
|
23
|
-
* - Close button has
|
|
24
|
-
* - Links within
|
|
25
|
-
*
|
|
26
|
-
* @element oh-alert
|
|
22
|
+
* - role="alert" only when live is set (alerts added after first render)
|
|
23
|
+
* - Close button has a visible text label
|
|
24
|
+
* - Links within take the variant's feedback colour
|
|
27
25
|
*/
|
|
28
26
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
29
27
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -34,6 +32,26 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
34
32
|
import { html, css, nothing } from "lit";
|
|
35
33
|
import { customElement, property } from "lit/decorators.js";
|
|
36
34
|
import { OhElement, baseStyles } from "./base.js";
|
|
35
|
+
/**
|
|
36
|
+
* A message box that tells the user about the result of an action or something that needs their attention.
|
|
37
|
+
*
|
|
38
|
+
* **Use it for** feedback on what just happened (saved, failed) or a notice about the page or account, near the content it's about. **Don't use it for** a short status label (use `oh-badge`); for a field's validation error (use the field's own error message); or for a message that must interrupt the user (use `oh-modal`).
|
|
39
|
+
*
|
|
40
|
+
* **Variants:** `info` (default), `success`, `warning`, `error`, each by its feedback role. Each has its own icon, so the meaning isn't carried by colour alone.
|
|
41
|
+
*
|
|
42
|
+
* **Behaviour:** with `dismissible`, a "Close" button follows the content; selecting it fires `oh-dismiss` and sets `hidden` on the alert. Content goes in the default slot and can include links.
|
|
43
|
+
*
|
|
44
|
+
* **Accessibility:** set `live` only for an alert added after the page has rendered (e.g. after submit); it adds `role="alert"` so screen readers announce it. Leave it off for alerts present on page load. Icons are `aria-hidden`; put the meaning in the text. Links show a solid outline in the current text colour on focus; the close button shows an underline.
|
|
45
|
+
*
|
|
46
|
+
* **Look:** set by tokens. Each variant uses `color.feedback.<variant>Subtle` for the background and `color.feedback.<variant>` for the border, icon and links; text is `color.text.primary`. `stroke.control` sets the border, `shape.container` the corners, `typography.body.*` the text, and `decoration.underlineThickness`, `underlineDash` and `underlinePeriod` the link underline. The close button uses `closeButton.backgroundHover`, `closeButton.shadowHover`, `elevation.offset.*`, `lift.*` and `shape.compact`.
|
|
47
|
+
*
|
|
48
|
+
* @element oh-alert
|
|
49
|
+
* @slot - The message. Can include links.
|
|
50
|
+
* @csspart alert - The alert box.
|
|
51
|
+
* @csspart content - The message wrapper.
|
|
52
|
+
* @csspart close - The close button (only when `dismissible`).
|
|
53
|
+
* @fires oh-dismiss - When the close button is selected, before the alert hides.
|
|
54
|
+
*/
|
|
37
55
|
let OhAlert = class OhAlert extends OhElement {
|
|
38
56
|
constructor() {
|
|
39
57
|
super(...arguments);
|
|
@@ -49,7 +67,7 @@ let OhAlert = class OhAlert extends OhElement {
|
|
|
49
67
|
baseStyles,
|
|
50
68
|
css `
|
|
51
69
|
/* ═══════════════════════════════════════════════════════════════
|
|
52
|
-
|
|
70
|
+
ALERT
|
|
53
71
|
Subtle • Dismissible • Rich Content
|
|
54
72
|
═══════════════════════════════════════════════════════════════ */
|
|
55
73
|
|
|
@@ -70,7 +88,7 @@ let OhAlert = class OhAlert extends OhElement {
|
|
|
70
88
|
padding: var(--oh-spacing-4);
|
|
71
89
|
border-radius: var(--oh-shape-container);
|
|
72
90
|
|
|
73
|
-
/*
|
|
91
|
+
/* Border: stroke.control, like other components */
|
|
74
92
|
border: var(--oh-stroke-control) solid;
|
|
75
93
|
}
|
|
76
94
|
|
|
@@ -100,7 +118,7 @@ let OhAlert = class OhAlert extends OhElement {
|
|
|
100
118
|
}
|
|
101
119
|
|
|
102
120
|
/*
|
|
103
|
-
* Links within alert
|
|
121
|
+
* Links within alert: the link underline (decoration.underline*), which shrinks on hover
|
|
104
122
|
* Uses background-image approach which works with ::slotted()
|
|
105
123
|
*/
|
|
106
124
|
.alert-content ::slotted(a) {
|
|
@@ -158,10 +176,10 @@ let OhAlert = class OhAlert extends OhElement {
|
|
|
158
176
|
/* Use primary text color for contrast */
|
|
159
177
|
color: var(--oh-color-text-primary);
|
|
160
178
|
|
|
161
|
-
/*
|
|
179
|
+
/* Hover and press movement come from lift.* and elevation.offset.* */
|
|
162
180
|
transition:
|
|
163
|
-
transform var(--oh-motion-snappy) var(--oh-motion-ease-
|
|
164
|
-
box-shadow var(--oh-motion-snappy) var(--oh-motion-ease-
|
|
181
|
+
transform var(--oh-motion-snappy) var(--oh-motion-ease-emphasized),
|
|
182
|
+
box-shadow var(--oh-motion-snappy) var(--oh-motion-ease-emphasized),
|
|
165
183
|
background-color var(--oh-motion-quick) ease;
|
|
166
184
|
}
|
|
167
185
|
|