@watermarkinsights/ripple 5.32.0 → 5.32.1-alpha.1
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/dist/cjs/{app-globals-5a9e2484.js → app-globals-6f8f7d34.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ripple.cjs.js +1 -1
- package/dist/cjs/wm-navigation_3.cjs.entry.js +2 -2
- package/dist/cjs/wm-tag-input.cjs.entry.js +8 -6
- package/dist/collection/components/wm-navigation/wm-navigation.js +48 -15
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +8 -6
- package/dist/docs/docs.json +9 -5
- package/dist/docs/props-reference.json +1 -1
- package/dist/docs/skill/wm-navigation.md +37 -3
- package/dist/esm/{app-globals-e9a97ede.js → app-globals-668b9d5c.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ripple.js +1 -1
- package/dist/esm/wm-navigation_3.entry.js +2 -2
- package/dist/esm/wm-tag-input.entry.js +8 -6
- package/dist/ripple/p-44c372a6.js +1 -0
- package/dist/ripple/p-729314c0.entry.js +1 -0
- package/dist/ripple/{p-6db681c8.entry.js → p-b9a39381.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/types/components/wm-navigation/wm-navigation.d.ts +46 -13
- package/dist/types/components.d.ts +136 -12
- package/package.json +2 -3
- package/dist/ripple/p-f6f92d2a.js +0 -1
- package/dist/ripple/p-fc843bb8.entry.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-bb947bd5.js');
|
|
6
|
-
const appGlobals = require('./app-globals-
|
|
6
|
+
const appGlobals = require('./app-globals-6f8f7d34.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
package/dist/cjs/ripple.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-bb947bd5.js');
|
|
6
|
-
const appGlobals = require('./app-globals-
|
|
6
|
+
const appGlobals = require('./app-globals-6f8f7d34.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
Stencil Client Patch Browser v4.21.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -106,9 +106,9 @@ const Navigation = class {
|
|
|
106
106
|
} }));
|
|
107
107
|
}
|
|
108
108
|
render() {
|
|
109
|
-
return (index.h(index.Host, { key: '
|
|
109
|
+
return (index.h(index.Host, { key: '96933040f7f88edf4e52c5e0480712e1f15e8db6', role: "navigation", "aria-expanded": this.ariaExpanded, "aria-label": this.mainNavigationMessage }, this.open ? this.renderOverlay() : "", this.isCollapsible && (index.h("div", { key: '4658a3e22aa96a55dfb5b0211912805b683e26d2', class: "trapfocus", tabindex: this.open ? 0 : undefined, onFocus: () => this.focusLastItem() })), index.h("div", { key: 'cb3ae13600538706292ed27eeff3f70e33015975', class: "tray" }, index.h("div", { key: 'df934dfeb30d54294656dde2cfc78c95c6140e65', class: "toggle-wrapper" }, index.h("wm-button", { key: '478b6428b08703302a21f64d7adc58e6788e1803', ref: (el) => (this.toggleEl = el), class: "toggle", "button-type": "navigational", icon: this.open ? "#close" : "#menu", "icon-size": "2rem", tooltip: this.open ? intl.globalMessages.close : intl.globalMessages.open, "tooltip-position": "right", tabIndex: this.open ? undefined : -1, onClick: () => {
|
|
110
110
|
this.open = !this.open;
|
|
111
|
-
} })), index.h("ul", { key: '
|
|
111
|
+
} })), index.h("ul", { key: '32035dea4487af347ec5e56c3010bdf8b84d2c12', class: "navlist" }, index.h("slot", { key: 'a3512e42e16da5ad5591fa1f1f5211dc5b1576ee' }))), this.isCollapsible && (index.h("div", { key: '8e77d6376ccc683560ec214d2ec7d694aa417789', class: "trapfocus", tabindex: this.open ? 0 : undefined, onFocus: () => this.toggleEl.focus() }))));
|
|
112
112
|
}
|
|
113
113
|
static get delegatesFocus() { return true; }
|
|
114
114
|
get el() { return index.getElement(this); }
|
|
@@ -144,9 +144,7 @@ const TagInput = class {
|
|
|
144
144
|
}
|
|
145
145
|
// get the internal representation of a wm-tag-option
|
|
146
146
|
elFromTagOption(el) {
|
|
147
|
-
return el.id
|
|
148
|
-
? this.el.shadowRoot.querySelector("#" + el.id)
|
|
149
|
-
: undefined;
|
|
147
|
+
return el.id ? this.el.shadowRoot.querySelector("#" + el.id) : undefined;
|
|
150
148
|
}
|
|
151
149
|
// focusedOption state refers to the wm-tag-option. This gets the corresponding element in the shadow DOM, or the "Add New" button.
|
|
152
150
|
get _focusedOption() {
|
|
@@ -329,7 +327,11 @@ const TagInput = class {
|
|
|
329
327
|
const addedNodes = Array.from(record.addedNodes);
|
|
330
328
|
if (addedNodes.length > 0) {
|
|
331
329
|
this.assignOptionIds();
|
|
332
|
-
|
|
330
|
+
// reassign rather than push: Stencil only re-renders on a state reference change
|
|
331
|
+
const newNodes = addedNodes.filter((n) => !this.tagsList.includes(n));
|
|
332
|
+
if (newNodes.length > 0) {
|
|
333
|
+
this.tagsList = [...this.tagsList, ...newNodes];
|
|
334
|
+
}
|
|
333
335
|
}
|
|
334
336
|
const removedNodes = Array.from(record.removedNodes);
|
|
335
337
|
if (removedNodes.length > 0) {
|
|
@@ -968,10 +970,10 @@ const TagInput = class {
|
|
|
968
970
|
}
|
|
969
971
|
}
|
|
970
972
|
render() {
|
|
971
|
-
return (index.h("div", { key: '
|
|
973
|
+
return (index.h("div", { key: '0506ec7b7255034f0fa8132d813727a72895b86a', class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, index.h("div", { key: '8f8726c6d9e1a524b6c9b9aa90dee9748fc93635', class: "label-wrapper" }, index.h("label", { key: '1f9b00a496fcd9923800471cc77e8c9c65111a8b', class: "label", htmlFor: "input", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => functions.hideTooltip() }, this.label), this.labelPosition !== "none" && this.requiredField && (index.h("div", { key: '3109f9ca0c4dbdfdde971b9c30c65e90a3d2c573', class: "required", "aria-hidden": "true" }, "*"))), index.h("div", { key: 'a3bfc9d17aa1df1ff84e807cd21bfb52dd3690de', class: `field-wrapper ${this.el.shadowRoot.activeElement === this.inputEl ? "focused" : ""} ${this.errorMessage ? "invalid" : ""}`, ref: (el) => (this.fieldWrapperEl = el) }, index.h("div", { key: 'be11a9727d97017988960d9458bf018e27f25c3b', class: "upper-row" }, index.h("div", { key: '9ae64eac0452889a0dbc49630a731f297c92c8c5', class: "svg-icon svg-search" }), index.h("div", { key: '07372a530d3bd24b8ae783d0bed5a3e095dbeeeb', class: `tags-and-input-wrapper` }, index.h("ul", { key: '2b16ed13429d52b1ad44b1aea45087f34e05997f', ref: (el) => (this.tagAreaEl = el), class: `tag-area ${this.taggedOptions.length === 0 && "empty"} ${this.isKeying ? "user-is-keying" : ""}`, role: "listbox", "aria-activedescendant": this.focusedTag ? this.focusedTag.id : null, "aria-orientation": "horizontal", "aria-labelledby": "sr-instructions", tabindex: this._tagEls.length > 0 ? 0 : -1, "aria-describedby": `info max-tags`, onFocus: (ev) => this.handleTagAreaFocus(ev), onBlur: (ev) => {
|
|
972
974
|
this.focusedTagIndex = undefined;
|
|
973
975
|
this.handleBlur(ev);
|
|
974
|
-
}, onKeyDown: (ev) => this.handleTagAreaKeyDown(ev) }, this.renderTags()), index.h("div", { key: '
|
|
976
|
+
}, onKeyDown: (ev) => this.handleTagAreaKeyDown(ev) }, this.renderTags()), index.h("div", { key: '3888229daf857f5c86ee4112d0762b9be5b3b099', class: "sr-only", id: "sr-instructions" }, this.label, ". ", this.tagAreaInstructions), this.isDropdown && this.renderDropdownInput(), this.isTable && this.renderTableInput()), this.isDropdown && (index.h("div", { key: 'fce52fa11fb5403c1dd7ac9c2dca11bbe9402665', class: "character-count" }, this.charCount, "/", this.characterLimit))), this.renderTagCounter(), this.isDropdown && this.renderDropdown()), this.info && (index.h("div", { key: '1befdf76851f651878ade4110d8aec2e0238cdbe', id: "info", class: "info-text" }, this.info)), index.h("div", { key: '4bcd00c2fa6d4f00c79fc8a752a3dd57594ce9a1', id: "error" }, this.errorMessage), index.h("div", { key: '9d6da4e7accb62f9ad05dbdf0c5827ea18ade783', class: "sr-only", "aria-live": "polite", ref: (el) => (this.liveRegionEl = el), "aria-atomic": "true" }, this.liveRegionMessage), this.isTable && this.renderTable()));
|
|
975
977
|
}
|
|
976
978
|
static get delegatesFocus() { return true; }
|
|
977
979
|
get el() { return index.getElement(this); }
|
|
@@ -4,7 +4,9 @@ import { globalMessages } from "../../global/intl";
|
|
|
4
4
|
/**
|
|
5
5
|
* Sidebar navigation that collapses into a hamburger menu on viewports narrower than 1024px.
|
|
6
6
|
* Contains wm-navigation-item children and works alongside an external wm-navigation-hamburger
|
|
7
|
-
* toggle.
|
|
7
|
+
* toggle. Render it as the first child of `<main>`, with the page's actual content in a sibling
|
|
8
|
+
* element — a flex or grid `<main>` lets the navigation sit alongside that content as a
|
|
9
|
+
* sidebar on viewports 1024px and wider, with no extra positioning needed.
|
|
8
10
|
*
|
|
9
11
|
* @category Navigation
|
|
10
12
|
*
|
|
@@ -23,8 +25,11 @@ import { globalMessages } from "../../global/intl";
|
|
|
23
25
|
* address bar via a `focus` listener on `document.body`.
|
|
24
26
|
*
|
|
25
27
|
* @usageNotes
|
|
26
|
-
* - Use `wm-navigation-hamburger` (a separate component) as the external toggle
|
|
27
|
-
* with wm-navigation via the `wmNavigationHamburgerClicked` window event
|
|
28
|
+
* - Use `wm-navigation-hamburger` (a separate component) as the external toggle. It communicates
|
|
29
|
+
* with wm-navigation via the `wmNavigationHamburgerClicked` window event and a document-wide
|
|
30
|
+
* lookup, so it does not need to be a DOM sibling of wm-navigation — place it in the page
|
|
31
|
+
* header instead, at the leading edge before the logo, with room around it so it isn't flush
|
|
32
|
+
* against neighboring header content.
|
|
28
33
|
* - `open` can be set initially to `true` to start the navigation expanded.
|
|
29
34
|
* - Navigation and main content scroll independently — no additional overflow handling is needed.
|
|
30
35
|
*
|
|
@@ -32,20 +37,48 @@ import { globalMessages } from "../../global/intl";
|
|
|
32
37
|
* - Never set `display: none` or `visibility: hidden` on the host element or its wrapper
|
|
33
38
|
* container. The component manages its own visibility internally, and hiding the container
|
|
34
39
|
* from the outside blocks the overlay from appearing when the hamburger is triggered.
|
|
40
|
+
* - Give the element that wraps wm-navigation and the page content (commonly `<main>`) a flex
|
|
41
|
+
* or grid layout. Without one, the navigation and content stack instead of sitting side by
|
|
42
|
+
* side as a sidebar on viewports 1024px and wider.
|
|
35
43
|
*
|
|
36
44
|
* @example {html} Basic navigation
|
|
37
|
-
* <
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
45
|
+
* <header class="app-header">
|
|
46
|
+
* <div class="app-header__hamburger">
|
|
47
|
+
* <wm-navigation-hamburger nav-id="main-nav"></wm-navigation-hamburger>
|
|
48
|
+
* </div>
|
|
49
|
+
* <a class="app-header__logo" href="/">App Name</a>
|
|
50
|
+
* </header>
|
|
51
|
+
* <main class="app-main">
|
|
52
|
+
* <wm-navigation id="main-nav">
|
|
53
|
+
* <wm-navigation-item href="/dashboard" text="Dashboard" active></wm-navigation-item>
|
|
54
|
+
* <wm-navigation-item href="/reports" text="Reports"></wm-navigation-item>
|
|
55
|
+
* </wm-navigation>
|
|
56
|
+
* <div class="app-main__content">Page content</div>
|
|
57
|
+
* </main>
|
|
42
58
|
*
|
|
43
59
|
* @example {react} Basic navigation
|
|
44
|
-
* <
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* </
|
|
60
|
+
* <header className="app-header">
|
|
61
|
+
* <div className="app-header__hamburger">
|
|
62
|
+
* <WmNavigationHamburger navId="main-nav" />
|
|
63
|
+
* </div>
|
|
64
|
+
* <a className="app-header__logo" href="/">App Name</a>
|
|
65
|
+
* </header>
|
|
66
|
+
* <main className="app-main">
|
|
67
|
+
* <WmNavigation id="main-nav">
|
|
68
|
+
* <WmNavigationItem href="/dashboard" text="Dashboard" active={true} />
|
|
69
|
+
* <WmNavigationItem href="/reports" text="Reports" />
|
|
70
|
+
* </WmNavigation>
|
|
71
|
+
* <div className="app-main__content">Page content</div>
|
|
72
|
+
* </main>
|
|
73
|
+
*
|
|
74
|
+
* @requiredSetup
|
|
75
|
+
* - `wm-navigation-item` — slot at least one as a child; each supplies a link the collapsible
|
|
76
|
+
* menu and the persistent sidebar both render.
|
|
77
|
+
* - `wm-navigation-hamburger` — required for collapsible viewports; set its `nav-id` to match
|
|
78
|
+
* this component's `id`. No handler is needed for the pairing itself — wm-navigation listens
|
|
79
|
+
* for `wmNavigationHamburgerClicked` on `window` and toggles `open` itself — but without a
|
|
80
|
+
* matching `nav-id`/`id` pair, the hamburger's `aria-controls` and the toggle both silently
|
|
81
|
+
* fail to connect.
|
|
49
82
|
*
|
|
50
83
|
*/
|
|
51
84
|
export class Navigation {
|
|
@@ -143,9 +176,9 @@ export class Navigation {
|
|
|
143
176
|
} }));
|
|
144
177
|
}
|
|
145
178
|
render() {
|
|
146
|
-
return (h(Host, { key: '
|
|
179
|
+
return (h(Host, { key: '96933040f7f88edf4e52c5e0480712e1f15e8db6', role: "navigation", "aria-expanded": this.ariaExpanded, "aria-label": this.mainNavigationMessage }, this.open ? this.renderOverlay() : "", this.isCollapsible && (h("div", { key: '4658a3e22aa96a55dfb5b0211912805b683e26d2', class: "trapfocus", tabindex: this.open ? 0 : undefined, onFocus: () => this.focusLastItem() })), h("div", { key: 'cb3ae13600538706292ed27eeff3f70e33015975', class: "tray" }, h("div", { key: 'df934dfeb30d54294656dde2cfc78c95c6140e65', class: "toggle-wrapper" }, h("wm-button", { key: '478b6428b08703302a21f64d7adc58e6788e1803', ref: (el) => (this.toggleEl = el), class: "toggle", "button-type": "navigational", icon: this.open ? "#close" : "#menu", "icon-size": "2rem", tooltip: this.open ? globalMessages.close : globalMessages.open, "tooltip-position": "right", tabIndex: this.open ? undefined : -1, onClick: () => {
|
|
147
180
|
this.open = !this.open;
|
|
148
|
-
} })), h("ul", { key: '
|
|
181
|
+
} })), h("ul", { key: '32035dea4487af347ec5e56c3010bdf8b84d2c12', class: "navlist" }, h("slot", { key: 'a3512e42e16da5ad5591fa1f1f5211dc5b1576ee' }))), this.isCollapsible && (h("div", { key: '8e77d6376ccc683560ec214d2ec7d694aa417789', class: "trapfocus", tabindex: this.open ? 0 : undefined, onFocus: () => this.toggleEl.focus() }))));
|
|
149
182
|
}
|
|
150
183
|
static get is() { return "wm-navigation"; }
|
|
151
184
|
static get encapsulation() { return "shadow"; }
|
|
@@ -251,9 +251,7 @@ export class TagInput {
|
|
|
251
251
|
}
|
|
252
252
|
// get the internal representation of a wm-tag-option
|
|
253
253
|
elFromTagOption(el) {
|
|
254
|
-
return el.id
|
|
255
|
-
? this.el.shadowRoot.querySelector("#" + el.id)
|
|
256
|
-
: undefined;
|
|
254
|
+
return el.id ? this.el.shadowRoot.querySelector("#" + el.id) : undefined;
|
|
257
255
|
}
|
|
258
256
|
// focusedOption state refers to the wm-tag-option. This gets the corresponding element in the shadow DOM, or the "Add New" button.
|
|
259
257
|
get _focusedOption() {
|
|
@@ -436,7 +434,11 @@ export class TagInput {
|
|
|
436
434
|
const addedNodes = Array.from(record.addedNodes);
|
|
437
435
|
if (addedNodes.length > 0) {
|
|
438
436
|
this.assignOptionIds();
|
|
439
|
-
|
|
437
|
+
// reassign rather than push: Stencil only re-renders on a state reference change
|
|
438
|
+
const newNodes = addedNodes.filter((n) => !this.tagsList.includes(n));
|
|
439
|
+
if (newNodes.length > 0) {
|
|
440
|
+
this.tagsList = [...this.tagsList, ...newNodes];
|
|
441
|
+
}
|
|
440
442
|
}
|
|
441
443
|
const removedNodes = Array.from(record.removedNodes);
|
|
442
444
|
if (removedNodes.length > 0) {
|
|
@@ -1075,10 +1077,10 @@ export class TagInput {
|
|
|
1075
1077
|
}
|
|
1076
1078
|
}
|
|
1077
1079
|
render() {
|
|
1078
|
-
return (h("div", { key: '
|
|
1080
|
+
return (h("div", { key: '0506ec7b7255034f0fa8132d813727a72895b86a', class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '8f8726c6d9e1a524b6c9b9aa90dee9748fc93635', class: "label-wrapper" }, h("label", { key: '1f9b00a496fcd9923800471cc77e8c9c65111a8b', class: "label", htmlFor: "input", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label), this.labelPosition !== "none" && this.requiredField && (h("div", { key: '3109f9ca0c4dbdfdde971b9c30c65e90a3d2c573', class: "required", "aria-hidden": "true" }, "*"))), h("div", { key: 'a3bfc9d17aa1df1ff84e807cd21bfb52dd3690de', class: `field-wrapper ${this.el.shadowRoot.activeElement === this.inputEl ? "focused" : ""} ${this.errorMessage ? "invalid" : ""}`, ref: (el) => (this.fieldWrapperEl = el) }, h("div", { key: 'be11a9727d97017988960d9458bf018e27f25c3b', class: "upper-row" }, h("div", { key: '9ae64eac0452889a0dbc49630a731f297c92c8c5', class: "svg-icon svg-search" }), h("div", { key: '07372a530d3bd24b8ae783d0bed5a3e095dbeeeb', class: `tags-and-input-wrapper` }, h("ul", { key: '2b16ed13429d52b1ad44b1aea45087f34e05997f', ref: (el) => (this.tagAreaEl = el), class: `tag-area ${this.taggedOptions.length === 0 && "empty"} ${this.isKeying ? "user-is-keying" : ""}`, role: "listbox", "aria-activedescendant": this.focusedTag ? this.focusedTag.id : null, "aria-orientation": "horizontal", "aria-labelledby": "sr-instructions", tabindex: this._tagEls.length > 0 ? 0 : -1, "aria-describedby": `info max-tags`, onFocus: (ev) => this.handleTagAreaFocus(ev), onBlur: (ev) => {
|
|
1079
1081
|
this.focusedTagIndex = undefined;
|
|
1080
1082
|
this.handleBlur(ev);
|
|
1081
|
-
}, onKeyDown: (ev) => this.handleTagAreaKeyDown(ev) }, this.renderTags()), h("div", { key: '
|
|
1083
|
+
}, onKeyDown: (ev) => this.handleTagAreaKeyDown(ev) }, this.renderTags()), h("div", { key: '3888229daf857f5c86ee4112d0762b9be5b3b099', class: "sr-only", id: "sr-instructions" }, this.label, ". ", this.tagAreaInstructions), this.isDropdown && this.renderDropdownInput(), this.isTable && this.renderTableInput()), this.isDropdown && (h("div", { key: 'fce52fa11fb5403c1dd7ac9c2dca11bbe9402665', class: "character-count" }, this.charCount, "/", this.characterLimit))), this.renderTagCounter(), this.isDropdown && this.renderDropdown()), this.info && (h("div", { key: '1befdf76851f651878ade4110d8aec2e0238cdbe', id: "info", class: "info-text" }, this.info)), h("div", { key: '4bcd00c2fa6d4f00c79fc8a752a3dd57594ce9a1', id: "error" }, this.errorMessage), h("div", { key: '9d6da4e7accb62f9ad05dbdf0c5827ea18ade783', class: "sr-only", "aria-live": "polite", ref: (el) => (this.liveRegionEl = el), "aria-atomic": "true" }, this.liveRegionMessage), this.isTable && this.renderTable()));
|
|
1082
1084
|
}
|
|
1083
1085
|
static get is() { return "wm-tag-input"; }
|
|
1084
1086
|
static get encapsulation() { return "shadow"; }
|
package/dist/docs/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-
|
|
2
|
+
"timestamp": "2026-09-08T13:22:53",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.21.0",
|
|
@@ -7663,7 +7663,7 @@
|
|
|
7663
7663
|
"filePath": "src/components/wm-navigation/wm-navigation.tsx",
|
|
7664
7664
|
"encapsulation": "shadow",
|
|
7665
7665
|
"tag": "wm-navigation",
|
|
7666
|
-
"docs": "Sidebar navigation that collapses into a hamburger menu on viewports narrower than 1024px.\nContains wm-navigation-item children and works alongside an external wm-navigation-hamburger\ntoggle.
|
|
7666
|
+
"docs": "Sidebar navigation that collapses into a hamburger menu on viewports narrower than 1024px.\nContains wm-navigation-item children and works alongside an external wm-navigation-hamburger\ntoggle. Render it as the first child of `<main>`, with the page's actual content in a sibling\nelement — a flex or grid `<main>` lets the navigation sit alongside that content as a\nsidebar on viewports 1024px and wider, with no extra positioning needed.",
|
|
7667
7667
|
"docsTags": [
|
|
7668
7668
|
{
|
|
7669
7669
|
"name": "category",
|
|
@@ -7683,15 +7683,19 @@
|
|
|
7683
7683
|
},
|
|
7684
7684
|
{
|
|
7685
7685
|
"name": "usageNotes",
|
|
7686
|
-
"text": "- Use `wm-navigation-hamburger` (a separate component) as the external toggle
|
|
7686
|
+
"text": "- Use `wm-navigation-hamburger` (a separate component) as the external toggle. It communicates\n with wm-navigation via the `wmNavigationHamburgerClicked` window event and a document-wide\n lookup, so it does not need to be a DOM sibling of wm-navigation — place it in the page\n header instead, at the leading edge before the logo, with room around it so it isn't flush\n against neighboring header content.\n- `open` can be set initially to `true` to start the navigation expanded.\n- Navigation and main content scroll independently — no additional overflow handling is needed.\n\nRequired host setup:\n- Never set `display: none` or `visibility: hidden` on the host element or its wrapper\n container. The component manages its own visibility internally, and hiding the container\n from the outside blocks the overlay from appearing when the hamburger is triggered.\n- Give the element that wraps wm-navigation and the page content (commonly `<main>`) a flex\n or grid layout. Without one, the navigation and content stack instead of sitting side by\n side as a sidebar on viewports 1024px and wider."
|
|
7687
7687
|
},
|
|
7688
7688
|
{
|
|
7689
7689
|
"name": "example",
|
|
7690
|
-
"text": "{html} Basic navigation\n<wm-navigation-hamburger nav-id=\"main-nav\"></wm-navigation-hamburger>\n<wm-navigation id=\"main-nav\">\n<wm-navigation-item href=\"/dashboard\" text=\"Dashboard\" active></wm-navigation-item>\n<wm-navigation-item href=\"/reports\" text=\"Reports\"></wm-navigation-item>\n</wm-navigation>"
|
|
7690
|
+
"text": "{html} Basic navigation\n<header class=\"app-header\">\n<div class=\"app-header__hamburger\">\n<wm-navigation-hamburger nav-id=\"main-nav\"></wm-navigation-hamburger>\n</div>\n<a class=\"app-header__logo\" href=\"/\">App Name</a>\n</header>\n<main class=\"app-main\">\n<wm-navigation id=\"main-nav\">\n<wm-navigation-item href=\"/dashboard\" text=\"Dashboard\" active></wm-navigation-item>\n<wm-navigation-item href=\"/reports\" text=\"Reports\"></wm-navigation-item>\n</wm-navigation>\n<div class=\"app-main__content\">Page content</div>\n</main>"
|
|
7691
7691
|
},
|
|
7692
7692
|
{
|
|
7693
7693
|
"name": "example",
|
|
7694
|
-
"text": "{react} Basic navigation\n<WmNavigationHamburger navId=\"main-nav\" />\n<WmNavigation id=\"main-nav\">\n<WmNavigationItem href=\"/dashboard\" text=\"Dashboard\" active={true} />\n<WmNavigationItem href=\"/reports\" text=\"Reports\" />\n</WmNavigation>"
|
|
7694
|
+
"text": "{react} Basic navigation\n<header className=\"app-header\">\n<div className=\"app-header__hamburger\">\n<WmNavigationHamburger navId=\"main-nav\" />\n</div>\n<a className=\"app-header__logo\" href=\"/\">App Name</a>\n</header>\n<main className=\"app-main\">\n<WmNavigation id=\"main-nav\">\n<WmNavigationItem href=\"/dashboard\" text=\"Dashboard\" active={true} />\n<WmNavigationItem href=\"/reports\" text=\"Reports\" />\n</WmNavigation>\n<div className=\"app-main__content\">Page content</div>\n</main>"
|
|
7695
|
+
},
|
|
7696
|
+
{
|
|
7697
|
+
"name": "requiredSetup",
|
|
7698
|
+
"text": "- `wm-navigation-item` — slot at least one as a child; each supplies a link the collapsible\n menu and the persistent sidebar both render.\n- `wm-navigation-hamburger` — required for collapsible viewports; set its `nav-id` to match\n this component's `id`. No handler is needed for the pairing itself — wm-navigation listens\n for `wmNavigationHamburgerClicked` on `window` and toggles `open` itself — but without a\n matching `nav-id`/`id` pair, the hamburger's `aria-controls` and the toggle both silently\n fail to connect."
|
|
7695
7699
|
}
|
|
7696
7700
|
],
|
|
7697
7701
|
"usage": {},
|
|
@@ -1085,7 +1085,7 @@
|
|
|
1085
1085
|
},
|
|
1086
1086
|
{
|
|
1087
1087
|
"tag": "wm-navigation",
|
|
1088
|
-
"description": "Sidebar navigation that collapses into a hamburger menu on viewports narrower than 1024px.\nContains wm-navigation-item children and works alongside an external wm-navigation-hamburger\ntoggle.
|
|
1088
|
+
"description": "Sidebar navigation that collapses into a hamburger menu on viewports narrower than 1024px.\nContains wm-navigation-item children and works alongside an external wm-navigation-hamburger\ntoggle. Render it as the first child of `<main>`, with the page's actual content in a sibling\nelement — a flex or grid `<main>` lets the navigation sit alongside that content as a\nsidebar on viewports 1024px and wider, with no extra positioning needed.",
|
|
1089
1089
|
"props": [
|
|
1090
1090
|
{
|
|
1091
1091
|
"name": "open",
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
**Purpose:** Sidebar navigation that collapses into a hamburger menu on viewports narrower than 1024px.
|
|
5
5
|
Contains wm-navigation-item children and works alongside an external wm-navigation-hamburger
|
|
6
|
-
toggle.
|
|
6
|
+
toggle. Render it as the first child of `<main>`, with the page's actual content in a sibling
|
|
7
|
+
element -- a flex or grid `<main>` lets the navigation sit alongside that content as a
|
|
8
|
+
sidebar on viewports 1024px and wider, with no extra positioning needed.
|
|
7
9
|
|
|
8
10
|
**When to use:**
|
|
9
11
|
|
|
@@ -20,8 +22,11 @@ _None documented_
|
|
|
20
22
|
|
|
21
23
|
**Usage notes:**
|
|
22
24
|
|
|
23
|
-
- Use `wm-navigation-hamburger` (a separate component) as the external toggle
|
|
24
|
-
with wm-navigation via the `wmNavigationHamburgerClicked` window event
|
|
25
|
+
- Use `wm-navigation-hamburger` (a separate component) as the external toggle. It communicates
|
|
26
|
+
with wm-navigation via the `wmNavigationHamburgerClicked` window event and a document-wide
|
|
27
|
+
lookup, so it does not need to be a DOM sibling of wm-navigation -- place it in the page
|
|
28
|
+
header instead, at the leading edge before the logo, with room around it so it isn't flush
|
|
29
|
+
against neighboring header content.
|
|
25
30
|
- `open` can be set initially to `true` to start the navigation expanded.
|
|
26
31
|
- Navigation and main content scroll independently -- no additional overflow handling is needed.
|
|
27
32
|
|
|
@@ -29,6 +34,9 @@ Required host setup:
|
|
|
29
34
|
- Never set `display: none` or `visibility: hidden` on the host element or its wrapper
|
|
30
35
|
container. The component manages its own visibility internally, and hiding the container
|
|
31
36
|
from the outside blocks the overlay from appearing when the hamburger is triggered.
|
|
37
|
+
- Give the element that wraps wm-navigation and the page content (commonly `<main>`) a flex
|
|
38
|
+
or grid layout. Without one, the navigation and content stack instead of sitting side by
|
|
39
|
+
side as a sidebar on viewports 1024px and wider.
|
|
32
40
|
|
|
33
41
|
**Props:**
|
|
34
42
|
- `open` -- Controls the open/closed state of the collapsible navigation. Has no effect
|
|
@@ -41,6 +49,16 @@ on viewports wider than 1024px where the navigation is always visible. _(default
|
|
|
41
49
|
- `wmNavigationStateChanged` -- Fires when the collapsible navigation opens or closes. Consumed by
|
|
42
50
|
wm-navigation-hamburger to keep its `aria-expanded` state in sync.
|
|
43
51
|
|
|
52
|
+
**Required setup:**
|
|
53
|
+
|
|
54
|
+
- `wm-navigation-item` -- slot at least one as a child; each supplies a link the collapsible
|
|
55
|
+
menu and the persistent sidebar both render.
|
|
56
|
+
- `wm-navigation-hamburger` -- required for collapsible viewports; set its `nav-id` to match
|
|
57
|
+
this component's `id`. No handler is needed for the pairing itself -- wm-navigation listens
|
|
58
|
+
for `wmNavigationHamburgerClicked` on `window` and toggles `open` itself -- but without a
|
|
59
|
+
matching `nav-id`/`id` pair, the hamburger's `aria-controls` and the toggle both silently
|
|
60
|
+
fail to connect.
|
|
61
|
+
|
|
44
62
|
**Accessibility:**
|
|
45
63
|
|
|
46
64
|
- Rendered with `role="navigation"` and an `aria-label` of "Main".
|
|
@@ -64,19 +82,35 @@ wm-navigation-hamburger to keep its `aria-expanded` state in sync.
|
|
|
64
82
|
_Basic navigation_
|
|
65
83
|
|
|
66
84
|
```html
|
|
85
|
+
<header class="app-header">
|
|
86
|
+
<div class="app-header__hamburger">
|
|
67
87
|
<wm-navigation-hamburger nav-id="main-nav"></wm-navigation-hamburger>
|
|
88
|
+
</div>
|
|
89
|
+
<a class="app-header__logo" href="/">App Name</a>
|
|
90
|
+
</header>
|
|
91
|
+
<main class="app-main">
|
|
68
92
|
<wm-navigation id="main-nav">
|
|
69
93
|
<wm-navigation-item href="/dashboard" text="Dashboard" active></wm-navigation-item>
|
|
70
94
|
<wm-navigation-item href="/reports" text="Reports"></wm-navigation-item>
|
|
71
95
|
</wm-navigation>
|
|
96
|
+
<div class="app-main__content">Page content</div>
|
|
97
|
+
</main>
|
|
72
98
|
```
|
|
73
99
|
|
|
74
100
|
_Basic navigation_
|
|
75
101
|
|
|
76
102
|
```react
|
|
103
|
+
<header className="app-header">
|
|
104
|
+
<div className="app-header__hamburger">
|
|
77
105
|
<WmNavigationHamburger navId="main-nav" />
|
|
106
|
+
</div>
|
|
107
|
+
<a className="app-header__logo" href="/">App Name</a>
|
|
108
|
+
</header>
|
|
109
|
+
<main className="app-main">
|
|
78
110
|
<WmNavigation id="main-nav">
|
|
79
111
|
<WmNavigationItem href="/dashboard" text="Dashboard" active={true} />
|
|
80
112
|
<WmNavigationItem href="/reports" text="Reports" />
|
|
81
113
|
</WmNavigation>
|
|
114
|
+
<div className="app-main__content">Page content</div>
|
|
115
|
+
</main>
|
|
82
116
|
```
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { b as bootstrapLazy } from './index-3425d80d.js';
|
|
2
2
|
export { s as setNonce } from './index-3425d80d.js';
|
|
3
|
-
import { g as globalScripts } from './app-globals-
|
|
3
|
+
import { g as globalScripts } from './app-globals-668b9d5c.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
package/dist/esm/ripple.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as promiseResolve, b as bootstrapLazy } from './index-3425d80d.js';
|
|
2
2
|
export { s as setNonce } from './index-3425d80d.js';
|
|
3
|
-
import { g as globalScripts } from './app-globals-
|
|
3
|
+
import { g as globalScripts } from './app-globals-668b9d5c.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v4.21.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -102,9 +102,9 @@ const Navigation = class {
|
|
|
102
102
|
} }));
|
|
103
103
|
}
|
|
104
104
|
render() {
|
|
105
|
-
return (h(Host, { key: '
|
|
105
|
+
return (h(Host, { key: '96933040f7f88edf4e52c5e0480712e1f15e8db6', role: "navigation", "aria-expanded": this.ariaExpanded, "aria-label": this.mainNavigationMessage }, this.open ? this.renderOverlay() : "", this.isCollapsible && (h("div", { key: '4658a3e22aa96a55dfb5b0211912805b683e26d2', class: "trapfocus", tabindex: this.open ? 0 : undefined, onFocus: () => this.focusLastItem() })), h("div", { key: 'cb3ae13600538706292ed27eeff3f70e33015975', class: "tray" }, h("div", { key: 'df934dfeb30d54294656dde2cfc78c95c6140e65', class: "toggle-wrapper" }, h("wm-button", { key: '478b6428b08703302a21f64d7adc58e6788e1803', ref: (el) => (this.toggleEl = el), class: "toggle", "button-type": "navigational", icon: this.open ? "#close" : "#menu", "icon-size": "2rem", tooltip: this.open ? globalMessages.close : globalMessages.open, "tooltip-position": "right", tabIndex: this.open ? undefined : -1, onClick: () => {
|
|
106
106
|
this.open = !this.open;
|
|
107
|
-
} })), h("ul", { key: '
|
|
107
|
+
} })), h("ul", { key: '32035dea4487af347ec5e56c3010bdf8b84d2c12', class: "navlist" }, h("slot", { key: 'a3512e42e16da5ad5591fa1f1f5211dc5b1576ee' }))), this.isCollapsible && (h("div", { key: '8e77d6376ccc683560ec214d2ec7d694aa417789', class: "trapfocus", tabindex: this.open ? 0 : undefined, onFocus: () => this.toggleEl.focus() }))));
|
|
108
108
|
}
|
|
109
109
|
static get delegatesFocus() { return true; }
|
|
110
110
|
get el() { return getElement(this); }
|
|
@@ -140,9 +140,7 @@ const TagInput = class {
|
|
|
140
140
|
}
|
|
141
141
|
// get the internal representation of a wm-tag-option
|
|
142
142
|
elFromTagOption(el) {
|
|
143
|
-
return el.id
|
|
144
|
-
? this.el.shadowRoot.querySelector("#" + el.id)
|
|
145
|
-
: undefined;
|
|
143
|
+
return el.id ? this.el.shadowRoot.querySelector("#" + el.id) : undefined;
|
|
146
144
|
}
|
|
147
145
|
// focusedOption state refers to the wm-tag-option. This gets the corresponding element in the shadow DOM, or the "Add New" button.
|
|
148
146
|
get _focusedOption() {
|
|
@@ -325,7 +323,11 @@ const TagInput = class {
|
|
|
325
323
|
const addedNodes = Array.from(record.addedNodes);
|
|
326
324
|
if (addedNodes.length > 0) {
|
|
327
325
|
this.assignOptionIds();
|
|
328
|
-
|
|
326
|
+
// reassign rather than push: Stencil only re-renders on a state reference change
|
|
327
|
+
const newNodes = addedNodes.filter((n) => !this.tagsList.includes(n));
|
|
328
|
+
if (newNodes.length > 0) {
|
|
329
|
+
this.tagsList = [...this.tagsList, ...newNodes];
|
|
330
|
+
}
|
|
329
331
|
}
|
|
330
332
|
const removedNodes = Array.from(record.removedNodes);
|
|
331
333
|
if (removedNodes.length > 0) {
|
|
@@ -964,10 +966,10 @@ const TagInput = class {
|
|
|
964
966
|
}
|
|
965
967
|
}
|
|
966
968
|
render() {
|
|
967
|
-
return (h("div", { key: '
|
|
969
|
+
return (h("div", { key: '0506ec7b7255034f0fa8132d813727a72895b86a', class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '8f8726c6d9e1a524b6c9b9aa90dee9748fc93635', class: "label-wrapper" }, h("label", { key: '1f9b00a496fcd9923800471cc77e8c9c65111a8b', class: "label", htmlFor: "input", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label), this.labelPosition !== "none" && this.requiredField && (h("div", { key: '3109f9ca0c4dbdfdde971b9c30c65e90a3d2c573', class: "required", "aria-hidden": "true" }, "*"))), h("div", { key: 'a3bfc9d17aa1df1ff84e807cd21bfb52dd3690de', class: `field-wrapper ${this.el.shadowRoot.activeElement === this.inputEl ? "focused" : ""} ${this.errorMessage ? "invalid" : ""}`, ref: (el) => (this.fieldWrapperEl = el) }, h("div", { key: 'be11a9727d97017988960d9458bf018e27f25c3b', class: "upper-row" }, h("div", { key: '9ae64eac0452889a0dbc49630a731f297c92c8c5', class: "svg-icon svg-search" }), h("div", { key: '07372a530d3bd24b8ae783d0bed5a3e095dbeeeb', class: `tags-and-input-wrapper` }, h("ul", { key: '2b16ed13429d52b1ad44b1aea45087f34e05997f', ref: (el) => (this.tagAreaEl = el), class: `tag-area ${this.taggedOptions.length === 0 && "empty"} ${this.isKeying ? "user-is-keying" : ""}`, role: "listbox", "aria-activedescendant": this.focusedTag ? this.focusedTag.id : null, "aria-orientation": "horizontal", "aria-labelledby": "sr-instructions", tabindex: this._tagEls.length > 0 ? 0 : -1, "aria-describedby": `info max-tags`, onFocus: (ev) => this.handleTagAreaFocus(ev), onBlur: (ev) => {
|
|
968
970
|
this.focusedTagIndex = undefined;
|
|
969
971
|
this.handleBlur(ev);
|
|
970
|
-
}, onKeyDown: (ev) => this.handleTagAreaKeyDown(ev) }, this.renderTags()), h("div", { key: '
|
|
972
|
+
}, onKeyDown: (ev) => this.handleTagAreaKeyDown(ev) }, this.renderTags()), h("div", { key: '3888229daf857f5c86ee4112d0762b9be5b3b099', class: "sr-only", id: "sr-instructions" }, this.label, ". ", this.tagAreaInstructions), this.isDropdown && this.renderDropdownInput(), this.isTable && this.renderTableInput()), this.isDropdown && (h("div", { key: 'fce52fa11fb5403c1dd7ac9c2dca11bbe9402665', class: "character-count" }, this.charCount, "/", this.characterLimit))), this.renderTagCounter(), this.isDropdown && this.renderDropdown()), this.info && (h("div", { key: '1befdf76851f651878ade4110d8aec2e0238cdbe', id: "info", class: "info-text" }, this.info)), h("div", { key: '4bcd00c2fa6d4f00c79fc8a752a3dd57594ce9a1', id: "error" }, this.errorMessage), h("div", { key: '9d6da4e7accb62f9ad05dbdf0c5827ea18ade783', class: "sr-only", "aria-live": "polite", ref: (el) => (this.liveRegionEl = el), "aria-atomic": "true" }, this.liveRegionMessage), this.isTable && this.renderTable()));
|
|
971
973
|
}
|
|
972
974
|
static get delegatesFocus() { return true; }
|
|
973
975
|
get el() { return getElement(this); }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./p-83c3db60.js";window.navigator.plugins.length>0&&console.log("%cRipple component library %c%s","color: #575195; font-weight: bold","font-weight: bold","5.32.1-alpha.1"),window.addEventListener("keydown",(function(n){if("Tab"==n.key){var o=new Event("wmUserIsTabbing");window.dispatchEvent(o),document.querySelector("body").classList.add("wmcl-user-is-tabbing")}"ArrowLeft"!=n.key&&"ArrowUp"!=n.key&&"ArrowRight"!=n.key&&"ArrowDown"!=n.key||(o=new Event("wmUserIsKeying"),window.dispatchEvent(o),document.querySelector("body").classList.add("wmcl-user-is-keying"))})),window.addEventListener("mousedown",(function(){var n=new Event("wmUserIsNotTabbing");window.dispatchEvent(n),document.querySelector("body").classList.remove("wmcl-user-is-tabbing"),document.querySelector("body").classList.remove("wmcl-user-is-keying")}));const n=document.createElement("div");n.id="wm-tooltip-container";const o=document.createElement("div");o.id="wm-tooltip",o.classList.add("wm-tooltip"),o.setAttribute("popover","manual"),o.setAttribute("aria-hidden","true");const t=document.createElement("style");t.textContent="\n.wm-tooltip {\n position: fixed;\n overflow: hidden;\n pointer-events: none;\n line-height: normal;\n font-family: inherit;\n font-size: 0.875rem;\n text-transform: none;\n font-weight: normal;\n background: var(--wmcolor-tooltip-background);\n color: var(--wmcolor-tooltip-text);\n z-index: 999999;\n max-width: var(--wmTooltipMaxWidth, 13.75rem);\n margin-right: 1.5rem;\n padding: 0.375rem;\n transition-property: opacity;\n transition-delay: 0s;\n opacity: 0;\n inset: unset;\n top: 0;\n left: 0;\n transform: translateZ(0);\n will-change: transform;\n transform: translate(var(--wmTooltipLeft), var(--wmTooltipTop));\n border: none;\n}\n\n.wm-tooltip:popover-open {\n opacity: 0;\n}\n\n.wm-tooltip.show {\n transition-delay: 500ms;\n opacity: 1;\n}\n";const e=document.querySelector("body");e?(document.head.appendChild(t),n.appendChild(o),e.appendChild(n)):document.addEventListener("DOMContentLoaded",(()=>{const e=document.querySelector("body");document.head.appendChild(t),n.appendChild(o),e.appendChild(n)}));const i=()=>{};export{i as g}
|