@redvars/peacock 3.10.1 → 3.12.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/dist/BaseInput-CV0pZgSb.js +58 -0
- package/dist/BaseInput-CV0pZgSb.js.map +1 -0
- package/dist/app-bar.js +16 -16
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles.css.map +1 -1
- package/dist/assets/theme.d.ts +66 -0
- package/dist/assets/theme.js +134 -0
- package/dist/assets/tokens.css +1 -1
- package/dist/assets/tokens.css.map +1 -1
- package/dist/base-progress-CLZTRveO.js +33 -0
- package/dist/base-progress-CLZTRveO.js.map +1 -0
- package/dist/bottom-sheet.js +1 -1
- package/dist/button-group.js +9 -7
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +225 -187
- package/dist/button.js.map +1 -1
- package/dist/cb-divider.js +7 -6
- package/dist/cb-divider.js.map +1 -1
- package/dist/cb-group-base-D9gv7SDY.js +114 -0
- package/dist/cb-group-base-D9gv7SDY.js.map +1 -0
- package/dist/cb-group-base-DsX_2aFl.js +325 -0
- package/dist/cb-group-base-DsX_2aFl.js.map +1 -0
- package/dist/cb-group.js +96 -0
- package/dist/cb-group.js.map +1 -0
- package/dist/cb-rule.js +212 -0
- package/dist/cb-rule.js.map +1 -0
- package/dist/{chart-bar-CapLbc2e.js → chart-bar-D5dGFJfK.js} +2 -2
- package/dist/{chart-bar-CapLbc2e.js.map → chart-bar-D5dGFJfK.js.map} +1 -1
- package/dist/chart-bar.js +1 -1
- package/dist/chart-stacked-bar.js +1 -1
- package/dist/checkbox.js +78 -53
- package/dist/checkbox.js.map +1 -1
- package/dist/chip-set.js +52 -0
- package/dist/chip-set.js.map +1 -0
- package/dist/chip.js +8 -6
- package/dist/chip.js.map +1 -1
- package/dist/circular-progress.js +177 -0
- package/dist/circular-progress.js.map +1 -0
- package/dist/code-editor.js +129 -72
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +2 -38
- package/dist/code-highlighter.js.map +1 -1
- package/dist/color-field.js +309 -0
- package/dist/color-field.js.map +1 -0
- package/dist/color-picker.js +26 -15
- package/dist/color-picker.js.map +1 -1
- package/dist/condition-builder.js +90 -35
- package/dist/condition-builder.js.map +1 -1
- package/dist/copy-to-clipboard-upGx-Ueo.js +39 -0
- package/dist/copy-to-clipboard-upGx-Ueo.js.map +1 -0
- package/dist/custom-elements-jsdocs.json +1140 -398
- package/dist/custom-elements.json +9065 -3989
- package/dist/date-picker.js +241 -0
- package/dist/date-picker.js.map +1 -0
- package/dist/{element-internals-2CMts_0M.js → delegate-py-Ets8N.js} +2 -43
- package/dist/delegate-py-Ets8N.js.map +1 -0
- package/dist/element-internals-QME0yEz4.js +43 -0
- package/dist/element-internals-QME0yEz4.js.map +1 -0
- package/dist/fab.js +51 -49
- package/dist/fab.js.map +1 -1
- package/dist/field.js +27 -0
- package/dist/field.js.map +1 -1
- package/dist/flow.js +5 -5
- package/dist/form-associated-Bhwwr6dT.js +162 -0
- package/dist/form-associated-Bhwwr6dT.js.map +1 -0
- package/dist/{form-associated-BXADnjOB.js → form-submitter-DPI4L6gj.js} +3 -159
- package/dist/form-submitter-DPI4L6gj.js.map +1 -0
- package/dist/html-editor.js +3 -1
- package/dist/html-editor.js.map +1 -1
- package/dist/icon-button.js +195 -156
- package/dist/icon-button.js.map +1 -1
- package/dist/image.js +2 -2
- package/dist/index.js +36 -11
- package/dist/index.js.map +1 -1
- package/dist/input.js +259 -0
- package/dist/input.js.map +1 -0
- package/dist/item.js +2 -1
- package/dist/item.js.map +1 -1
- package/dist/linear-progress.js +192 -0
- package/dist/linear-progress.js.map +1 -0
- package/dist/{list-AdO-PUq_.js → list-item.js} +12 -222
- package/dist/list-item.js.map +1 -0
- package/dist/list.js +225 -6
- package/dist/list.js.map +1 -1
- package/dist/loader-full.js +31 -8
- package/dist/loader-full.js.map +1 -1
- package/dist/loader.js +58 -25
- package/dist/loader.js.map +1 -1
- package/dist/markdown-editor.js +5 -3
- package/dist/markdown-editor.js.map +1 -1
- package/dist/menu-item.js +30 -30
- package/dist/navigation-bar-item.js +41 -0
- package/dist/navigation-bar-item.js.map +1 -0
- package/dist/navigation-bar.js +128 -0
- package/dist/navigation-bar.js.map +1 -0
- package/dist/navigation-drawer-item.js +236 -0
- package/dist/navigation-drawer-item.js.map +1 -0
- package/dist/navigation-drawer.js +293 -0
- package/dist/navigation-drawer.js.map +1 -0
- package/dist/navigation-rail.js +1 -1
- package/dist/number-field.js +280 -0
- package/dist/number-field.js.map +1 -0
- package/dist/pagination.js +1 -1
- package/dist/radio-group.js +209 -0
- package/dist/radio-group.js.map +1 -0
- package/dist/radio.js +47 -37
- package/dist/radio.js.map +1 -1
- package/dist/segmented-button-group.js +12 -0
- package/dist/segmented-button-group.js.map +1 -1
- package/dist/segmented-button.js +10 -6
- package/dist/segmented-button.js.map +1 -1
- package/dist/select.js +653 -0
- package/dist/select.js.map +1 -0
- package/dist/side-sheet.js +1 -1
- package/dist/sidebar-menu-item.js +273 -0
- package/dist/sidebar-menu-item.js.map +1 -0
- package/dist/sidebar-menu.js +193 -0
- package/dist/sidebar-menu.js.map +1 -0
- package/dist/sidebar-sub-menu.js +301 -0
- package/dist/sidebar-sub-menu.js.map +1 -0
- package/dist/slider.js +76 -24
- package/dist/slider.js.map +1 -1
- package/dist/snackbar.js +3 -3
- package/dist/snackbar.js.map +1 -1
- package/dist/split-button.js +2 -2
- package/dist/src/__internal/utils/size.d.ts +9 -0
- package/dist/src/button/ButtonTypes.d.ts +1 -1
- package/dist/src/checkbox/checkbox.d.ts +28 -22
- package/dist/src/chip/chip/chip.d.ts +3 -0
- package/dist/src/chip/tag/tag.d.ts +5 -1
- package/dist/src/code-editor/code-editor.d.ts +37 -10
- package/dist/src/color-field/color-field.d.ts +55 -0
- package/dist/src/color-field/index.d.ts +1 -0
- package/dist/src/color-picker/color-picker.d.ts +1 -1
- package/dist/src/condition-builder/cb-divider.d.ts +3 -1
- package/dist/src/condition-builder/cb-drag.d.ts +10 -0
- package/dist/src/condition-builder/cb-group-base.d.ts +59 -0
- package/dist/src/condition-builder/cb-group.d.ts +34 -0
- package/dist/src/condition-builder/cb-rule.d.ts +32 -0
- package/dist/src/condition-builder/cb-types.d.ts +13 -0
- package/dist/src/condition-builder/condition-builder.d.ts +35 -14
- package/dist/src/condition-builder/index.d.ts +3 -3
- package/dist/src/date-picker/date-picker.d.ts +0 -1
- package/dist/src/index.d.ts +6 -4
- package/dist/src/input/BaseInput.d.ts +21 -3
- package/dist/src/input/input.d.ts +15 -7
- package/dist/src/navigation-bar/index.d.ts +2 -0
- package/dist/src/navigation-bar/navigation-bar-item.d.ts +23 -0
- package/dist/src/navigation-bar/navigation-bar.d.ts +44 -0
- package/dist/src/navigation-drawer/index.d.ts +2 -0
- package/dist/src/navigation-drawer/navigation-drawer-item.d.ts +48 -0
- package/dist/src/navigation-drawer/navigation-drawer.d.ts +70 -0
- package/dist/src/number-field/number-field.d.ts +0 -1
- package/dist/src/radio/index.d.ts +1 -0
- package/dist/src/radio/radio-group.d.ts +50 -0
- package/dist/src/radio/radio.d.ts +18 -18
- package/dist/src/segmented-button/segmented-button-group.d.ts +5 -0
- package/dist/src/segmented-button/segmented-button.d.ts +2 -1
- package/dist/src/select/select.d.ts +6 -0
- package/dist/src/slider/slider.d.ts +14 -5
- package/dist/src/switch/switch.d.ts +22 -26
- package/dist/src/tabs/tabs.d.ts +3 -0
- package/dist/src/textarea/textarea.d.ts +0 -1
- package/dist/src/time-picker/time-picker.d.ts +0 -1
- package/dist/src/toolbar/toolbar.d.ts +7 -4
- package/dist/src/url-field/url-field.d.ts +0 -1
- package/dist/svg.js +5 -5
- package/dist/switch.js +413 -0
- package/dist/switch.js.map +1 -0
- package/dist/tab.js +2 -1
- package/dist/tab.js.map +1 -1
- package/dist/tabs.js +10 -8
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +349 -0
- package/dist/tag.js.map +1 -0
- package/dist/test/code-editor.test.d.ts +1 -0
- package/dist/test/color-field.test.d.ts +1 -0
- package/dist/test/color-picker.test.d.ts +1 -0
- package/dist/test/condition-builder.test.d.ts +1 -0
- package/dist/test/field.test.d.ts +1 -0
- package/dist/test/form-controls.test.d.ts +1 -0
- package/dist/test/icon.test.d.ts +1 -1
- package/dist/test/input.test.d.ts +1 -0
- package/dist/test/navigation.test.d.ts +1 -0
- package/dist/test/segmented-button.test.d.ts +1 -0
- package/dist/test/slider.test.d.ts +1 -0
- package/dist/textarea.js +237 -0
- package/dist/textarea.js.map +1 -0
- package/dist/time-picker.js +241 -0
- package/dist/time-picker.js.map +1 -0
- package/dist/toolbar.js +26 -9
- package/dist/toolbar.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/url-field.js +298 -0
- package/dist/url-field.js.map +1 -0
- package/package.json +29 -8
- package/readme.md +2 -2
- package/scss/tokens.css +175 -18
- package/src/__internal/utils/size.ts +23 -0
- package/src/app-bar/app-bar.scss +4 -16
- package/src/bottom-sheet/bottom-sheet.scss +1 -1
- package/src/button/ButtonTypes.ts +2 -0
- package/src/button/button/button-base.scss +84 -84
- package/src/button/button/button-colors.scss +14 -2
- package/src/button/button/button-layers.scss +71 -71
- package/src/button/button/button-shapes.scss +2 -2
- package/src/button/button/button-sizes.scss +35 -35
- package/src/button/button/button.scss +1 -1
- package/src/button/button/button.ts +1 -2
- package/src/button/button-group/button-group.scss +5 -5
- package/src/button/fab/fab-sizes.scss +15 -15
- package/src/button/fab/fab.scss +32 -32
- package/src/button/icon-button/icon-button-sizes.scss +7 -7
- package/src/chart-bar/chart-bar.scss +1 -1
- package/src/checkbox/checkbox.scss +7 -6
- package/src/checkbox/checkbox.ts +92 -40
- package/src/chip/chip/chip.ts +8 -5
- package/src/chip/chip-set/chip-set.ts +2 -0
- package/src/chip/tag/tag-colors.scss +1 -1
- package/src/chip/tag/tag-sizes.scss +9 -0
- package/src/chip/tag/tag.scss +1 -1
- package/src/chip/tag/tag.ts +20 -9
- package/src/code-editor/code-editor.scss +8 -3
- package/src/code-editor/code-editor.ts +148 -79
- package/src/code-highlighter/code-highlighter.scss +1 -1
- package/src/color-field/color-field.scss +48 -0
- package/src/color-field/color-field.ts +239 -0
- package/src/color-field/index.ts +1 -0
- package/src/color-picker/color-picker.scss +33 -15
- package/src/color-picker/color-picker.ts +2 -1
- package/src/condition-builder/cb-divider.scss +4 -5
- package/src/condition-builder/cb-divider.ts +3 -1
- package/src/condition-builder/cb-drag.ts +35 -0
- package/src/condition-builder/cb-group-base.scss +97 -0
- package/src/condition-builder/cb-group-base.ts +335 -0
- package/src/condition-builder/cb-group.scss +21 -0
- package/src/condition-builder/cb-group.ts +72 -0
- package/src/condition-builder/cb-rule.scss +90 -0
- package/src/condition-builder/cb-rule.ts +129 -0
- package/src/condition-builder/cb-types.ts +16 -0
- package/src/condition-builder/condition-builder.scss +12 -9
- package/src/condition-builder/condition-builder.ts +77 -17
- package/src/condition-builder/index.ts +7 -3
- package/src/date-picker/date-picker.ts +2 -3
- package/src/field/field.scss +34 -0
- package/src/flow/flow.scss +5 -5
- package/src/image/image.scss +2 -2
- package/src/index.ts +14 -6
- package/src/input/BaseInput.ts +54 -4
- package/src/input/input.ts +104 -79
- package/src/list/list-item.ts +2 -0
- package/src/loader.ts +34 -19
- package/src/markdown-editor/markdown-editor.scss +2 -2
- package/src/menu/menu-item/menu-item.scss +30 -30
- package/src/navigation-bar/index.ts +2 -0
- package/src/navigation-bar/navigation-bar-item.ts +25 -0
- package/src/navigation-bar/navigation-bar.scss +27 -0
- package/src/navigation-bar/navigation-bar.ts +96 -0
- package/src/navigation-drawer/index.ts +2 -0
- package/src/navigation-drawer/navigation-drawer-item.scss +82 -0
- package/src/navigation-drawer/navigation-drawer-item.ts +133 -0
- package/src/navigation-drawer/navigation-drawer.scss +99 -0
- package/src/navigation-drawer/navigation-drawer.ts +196 -0
- package/src/navigation-rail/navigation-rail.scss +1 -1
- package/src/number-field/number-field.ts +2 -3
- package/src/pagination/pagination.scss +1 -1
- package/src/progress/circular-progress/circular-progress.ts +2 -0
- package/src/progress/linear-progress/linear-progress.ts +2 -0
- package/src/radio/index.ts +1 -0
- package/src/radio/radio-group.scss +39 -0
- package/src/radio/radio-group.ts +167 -0
- package/src/radio/radio.ts +74 -31
- package/src/segmented-button/segmented-button-group.ts +12 -0
- package/src/segmented-button/segmented-button.ts +12 -6
- package/src/select/select.ts +21 -1
- package/src/side-sheet/side-sheet.scss +1 -1
- package/src/sidebar-menu/sidebar-menu-item.scss +1 -1
- package/src/sidebar-menu/sidebar-menu-item.ts +2 -0
- package/src/sidebar-menu/sidebar-menu.ts +2 -0
- package/src/sidebar-menu/sidebar-sub-menu.scss +1 -1
- package/src/sidebar-menu/sidebar-sub-menu.ts +2 -0
- package/src/slider/slider.scss +3 -3
- package/src/slider/slider.ts +119 -31
- package/src/snackbar/snackbar.ts +3 -3
- package/src/split-button/split-button-colors.scss +2 -2
- package/src/svg/svg.scss +5 -5
- package/src/switch/switch.scss +0 -1
- package/src/switch/switch.ts +82 -47
- package/src/tabs/tab.scss +2 -1
- package/src/tabs/tabs.ts +14 -8
- package/src/textarea/textarea.ts +2 -3
- package/src/time-picker/time-picker.ts +2 -3
- package/src/toolbar/toolbar.scss +4 -4
- package/src/toolbar/toolbar.ts +12 -5
- package/src/url-field/url-field.ts +2 -3
- package/dist/BaseInput-CU1zZYKc.js +0 -27
- package/dist/BaseInput-CU1zZYKc.js.map +0 -1
- package/dist/brand-loader.js +0 -358
- package/dist/brand-loader.js.map +0 -1
- package/dist/cb-compound-expression.js +0 -133
- package/dist/cb-compound-expression.js.map +0 -1
- package/dist/cb-expression.js +0 -78
- package/dist/cb-expression.js.map +0 -1
- package/dist/cb-predicate.js +0 -141
- package/dist/cb-predicate.js.map +0 -1
- package/dist/element-internals-2CMts_0M.js.map +0 -1
- package/dist/form-associated-BXADnjOB.js.map +0 -1
- package/dist/list-AdO-PUq_.js.map +0 -1
- package/dist/select-DkyRqUTI.js +0 -3955
- package/dist/select-DkyRqUTI.js.map +0 -1
- package/dist/src/brand-loader/brand-loader.d.ts +0 -33
- package/dist/src/brand-loader/index.d.ts +0 -2
- package/dist/src/condition-builder/cb-compound-expression.d.ts +0 -30
- package/dist/src/condition-builder/cb-expression.d.ts +0 -30
- package/dist/src/condition-builder/cb-predicate.d.ts +0 -29
- package/src/brand-loader/brand-loader.scss +0 -270
- package/src/brand-loader/brand-loader.ts +0 -115
- package/src/brand-loader/index.ts +0 -2
- package/src/condition-builder/cb-compound-expression.scss +0 -41
- package/src/condition-builder/cb-compound-expression.ts +0 -79
- package/src/condition-builder/cb-expression.scss +0 -13
- package/src/condition-builder/cb-expression.ts +0 -48
- package/src/condition-builder/cb-predicate.scss +0 -35
- package/src/condition-builder/cb-predicate.ts +0 -101
- /package/dist/test/{brand-loader.test.d.ts → button.test.d.ts} +0 -0
package/dist/list.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import './IndividualComponent-Bdwyrvd6.js';
|
|
2
|
-
import './property-B49QQ8pS.js';
|
|
3
|
-
import './state-DkTK9EGF.js';
|
|
4
|
-
import './class-map-DG7CA1et.js';
|
|
5
|
-
|
|
1
|
+
import { i, _ as __decorate, I as IndividualComponent, a as i$1, b } from './IndividualComponent-Bdwyrvd6.js';
|
|
2
|
+
import { n } from './property-B49QQ8pS.js';
|
|
3
|
+
import { r } from './state-DkTK9EGF.js';
|
|
4
|
+
import { e } from './class-map-DG7CA1et.js';
|
|
5
|
+
import { ListItem } from './list-item.js';
|
|
6
6
|
import './directive-ZPhl09Yt.js';
|
|
7
7
|
import './query-CHb9Ft_d.js';
|
|
8
8
|
import './base-Cl6v8-BZ.js';
|
|
@@ -10,5 +10,224 @@ import './is-link-Dk2OV3PM.js';
|
|
|
10
10
|
import './dispatch-event-utils-CuEqjlPT.js';
|
|
11
11
|
import './hyperlink-DLvb6MXE.js';
|
|
12
12
|
import './throttle-C7ZAPqtu.js';
|
|
13
|
-
import './
|
|
13
|
+
import './delegate-py-Ets8N.js';
|
|
14
|
+
import './element-internals-QME0yEz4.js';
|
|
15
|
+
|
|
16
|
+
var css_248z = i`* {
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
-webkit-tap-highlight-color: transparent;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.screen-reader-only {
|
|
22
|
+
display: none !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[hidden] {
|
|
26
|
+
display: none !important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host {
|
|
30
|
+
display: block;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.list {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
}`;
|
|
37
|
+
|
|
38
|
+
var List_1;
|
|
39
|
+
/**
|
|
40
|
+
* @label List
|
|
41
|
+
* @tag wc-list
|
|
42
|
+
* @rawTag list
|
|
43
|
+
*
|
|
44
|
+
* @summary A list container for one or more list items.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```html
|
|
48
|
+
* <wc-list>
|
|
49
|
+
* <wc-list-item>
|
|
50
|
+
* <wc-icon slot="leading" name="inbox"></wc-icon>
|
|
51
|
+
* Inbox
|
|
52
|
+
* <span slot="trailing">24</span>
|
|
53
|
+
* </wc-list-item>
|
|
54
|
+
* <wc-list-item>
|
|
55
|
+
* <wc-avatar slot="leading" name="Ada Lovelace"></wc-avatar>
|
|
56
|
+
* Ada Lovelace
|
|
57
|
+
* <span slot="supporting-text">Software Engineer</span>
|
|
58
|
+
* <span slot="trailing-supporting-text">7</span>
|
|
59
|
+
* <wc-icon slot="trailing" name="chevron_right"></wc-icon>
|
|
60
|
+
* </wc-list-item>
|
|
61
|
+
* </wc-list>
|
|
62
|
+
* ```
|
|
63
|
+
* @tags display
|
|
64
|
+
*/
|
|
65
|
+
let List = List_1 = class List extends i$1 {
|
|
66
|
+
constructor() {
|
|
67
|
+
super(...arguments);
|
|
68
|
+
/** */
|
|
69
|
+
this.variant = 'standard';
|
|
70
|
+
/** Index of the currently active item within the clickable items list. */
|
|
71
|
+
this.activeIndex = -1;
|
|
72
|
+
// ── Handlers ──────────────────────────────────────────────────────────────
|
|
73
|
+
this._onKeyDown = (event) => {
|
|
74
|
+
if (!this._isEventFromThisList(event))
|
|
75
|
+
return;
|
|
76
|
+
const eventItem = this._clickableItemFromEvent(event);
|
|
77
|
+
if (eventItem) {
|
|
78
|
+
this._setActiveItem(eventItem);
|
|
79
|
+
}
|
|
80
|
+
switch (event.key) {
|
|
81
|
+
case 'ArrowDown':
|
|
82
|
+
event.preventDefault();
|
|
83
|
+
this._setActiveByOffset(1);
|
|
84
|
+
break;
|
|
85
|
+
case 'ArrowUp':
|
|
86
|
+
event.preventDefault();
|
|
87
|
+
this._setActiveByOffset(-1);
|
|
88
|
+
break;
|
|
89
|
+
case 'Home':
|
|
90
|
+
event.preventDefault();
|
|
91
|
+
this._setBoundaryActive(0);
|
|
92
|
+
break;
|
|
93
|
+
case 'End':
|
|
94
|
+
event.preventDefault();
|
|
95
|
+
this._setBoundaryActive(Math.max(this._clickableItems().length - 1, 0));
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
this._onClick = (event) => {
|
|
100
|
+
const item = this._clickableItemFromEvent(event);
|
|
101
|
+
if (!item)
|
|
102
|
+
return;
|
|
103
|
+
this._setActiveItem(item);
|
|
104
|
+
};
|
|
105
|
+
this._onSlotChange = () => {
|
|
106
|
+
this._syncRovingTabIndex();
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
connectedCallback() {
|
|
110
|
+
super.connectedCallback();
|
|
111
|
+
this.setAttribute('role', 'list');
|
|
112
|
+
this.addEventListener('keydown', this._onKeyDown);
|
|
113
|
+
this.addEventListener('click', this._onClick);
|
|
114
|
+
}
|
|
115
|
+
disconnectedCallback() {
|
|
116
|
+
this.removeEventListener('keydown', this._onKeyDown);
|
|
117
|
+
this.removeEventListener('click', this._onClick);
|
|
118
|
+
super.disconnectedCallback();
|
|
119
|
+
}
|
|
120
|
+
focus() {
|
|
121
|
+
const target = this._getActiveItem() ?? this._getFirstClickableItem();
|
|
122
|
+
target?.focus();
|
|
123
|
+
}
|
|
124
|
+
// ── Items ─────────────────────────────────────────────────────────────────
|
|
125
|
+
get items() {
|
|
126
|
+
const slot = this.shadowRoot?.querySelector('slot');
|
|
127
|
+
const elements = slot?.assignedElements({ flatten: true }) ?? [];
|
|
128
|
+
return elements.filter(el => el instanceof ListItem);
|
|
129
|
+
}
|
|
130
|
+
_clickableItems() {
|
|
131
|
+
return this.items.filter(item => item.isClickable());
|
|
132
|
+
}
|
|
133
|
+
// ── Roving tabindex ───────────────────────────────────────────────────────
|
|
134
|
+
_syncRovingTabIndex() {
|
|
135
|
+
const allItems = this.items;
|
|
136
|
+
const clickable = this._clickableItems();
|
|
137
|
+
for (const item of allItems) {
|
|
138
|
+
item.tabIndex = -1;
|
|
139
|
+
}
|
|
140
|
+
if (!clickable.length) {
|
|
141
|
+
this.activeIndex = -1;
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
if (this.activeIndex < 0 || this.activeIndex >= clickable.length) {
|
|
145
|
+
this.activeIndex = 0;
|
|
146
|
+
}
|
|
147
|
+
clickable[this.activeIndex].tabIndex = 0;
|
|
148
|
+
}
|
|
149
|
+
_setActiveByOffset(offset) {
|
|
150
|
+
const clickable = this._clickableItems();
|
|
151
|
+
if (!clickable.length)
|
|
152
|
+
return;
|
|
153
|
+
if (this.activeIndex < 0) {
|
|
154
|
+
this.activeIndex = 0;
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
const count = clickable.length;
|
|
158
|
+
this.activeIndex = (this.activeIndex + offset + count) % count;
|
|
159
|
+
}
|
|
160
|
+
this._syncRovingTabIndex();
|
|
161
|
+
clickable[this.activeIndex]?.focus();
|
|
162
|
+
}
|
|
163
|
+
_setBoundaryActive(index) {
|
|
164
|
+
const clickable = this._clickableItems();
|
|
165
|
+
if (!clickable.length)
|
|
166
|
+
return;
|
|
167
|
+
this.activeIndex = index;
|
|
168
|
+
this._syncRovingTabIndex();
|
|
169
|
+
clickable[this.activeIndex]?.focus();
|
|
170
|
+
}
|
|
171
|
+
_getActiveItem() {
|
|
172
|
+
const clickable = this._clickableItems();
|
|
173
|
+
if (!clickable.length || this.activeIndex < 0)
|
|
174
|
+
return null;
|
|
175
|
+
return clickable[this.activeIndex] ?? null;
|
|
176
|
+
}
|
|
177
|
+
_getFirstClickableItem() {
|
|
178
|
+
return this._clickableItems()[0] ?? null;
|
|
179
|
+
}
|
|
180
|
+
// ── Event helpers ─────────────────────────────────────────────────────────
|
|
181
|
+
_isEventFromThisList(event) {
|
|
182
|
+
const path = event.composedPath();
|
|
183
|
+
const sourceList = path.find(target => target instanceof List_1);
|
|
184
|
+
return sourceList === this;
|
|
185
|
+
}
|
|
186
|
+
_clickableItemFromEvent(event) {
|
|
187
|
+
if (!this._isEventFromThisList(event))
|
|
188
|
+
return null;
|
|
189
|
+
const path = event.composedPath();
|
|
190
|
+
const clickable = this._clickableItems();
|
|
191
|
+
for (const target of path) {
|
|
192
|
+
if (target instanceof ListItem) {
|
|
193
|
+
const owned = clickable.find(item => item === target);
|
|
194
|
+
if (owned)
|
|
195
|
+
return owned;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
_setActiveItem(item) {
|
|
201
|
+
const clickable = this._clickableItems();
|
|
202
|
+
const nextIndex = clickable.indexOf(item);
|
|
203
|
+
if (nextIndex < 0)
|
|
204
|
+
return;
|
|
205
|
+
this.activeIndex = nextIndex;
|
|
206
|
+
this._syncRovingTabIndex();
|
|
207
|
+
}
|
|
208
|
+
render() {
|
|
209
|
+
const cssClasses = {
|
|
210
|
+
list: true,
|
|
211
|
+
[`variant-${this.variant}`]: true,
|
|
212
|
+
};
|
|
213
|
+
return b `
|
|
214
|
+
<div class=${e(cssClasses)}>
|
|
215
|
+
<slot @slotchange=${this._onSlotChange}></slot>
|
|
216
|
+
</div>
|
|
217
|
+
`;
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
List.styles = [css_248z];
|
|
221
|
+
List.Item = ListItem;
|
|
222
|
+
__decorate([
|
|
223
|
+
n({ type: String, reflect: true })
|
|
224
|
+
], List.prototype, "variant", void 0);
|
|
225
|
+
__decorate([
|
|
226
|
+
r()
|
|
227
|
+
], List.prototype, "activeIndex", void 0);
|
|
228
|
+
List = List_1 = __decorate([
|
|
229
|
+
IndividualComponent
|
|
230
|
+
], List);
|
|
231
|
+
|
|
232
|
+
export { List };
|
|
14
233
|
//# sourceMappingURL=list.js.map
|
package/dist/list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"list.js","sources":["../../src/list/list.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport styles from './list.scss';\nimport { ListItem } from './list-item.js';\nimport IndividualComponent from '@/IndividualComponent.js';\n\n/**\n * @label List\n * @tag wc-list\n * @rawTag list\n *\n * @summary A list container for one or more list items.\n *\n * @example\n * ```html\n * <wc-list>\n * <wc-list-item>\n * <wc-icon slot=\"leading\" name=\"inbox\"></wc-icon>\n * Inbox\n * <span slot=\"trailing\">24</span>\n * </wc-list-item>\n * <wc-list-item>\n * <wc-avatar slot=\"leading\" name=\"Ada Lovelace\"></wc-avatar>\n * Ada Lovelace\n * <span slot=\"supporting-text\">Software Engineer</span>\n * <span slot=\"trailing-supporting-text\">7</span>\n * <wc-icon slot=\"trailing\" name=\"chevron_right\"></wc-icon>\n * </wc-list-item>\n * </wc-list>\n * ```\n * @tags display\n */\n@IndividualComponent\nexport class List extends LitElement {\n static styles = [styles];\n\n static Item = ListItem;\n\n /** */\n @property({ type: String, reflect: true }) variant: 'standard' | 'segmented' =\n 'standard';\n\n /** Index of the currently active item within the clickable items list. */\n @state() private activeIndex = -1;\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('role', 'list');\n this.addEventListener('keydown', this._onKeyDown);\n this.addEventListener('click', this._onClick);\n }\n\n disconnectedCallback() {\n this.removeEventListener('keydown', this._onKeyDown);\n this.removeEventListener('click', this._onClick);\n super.disconnectedCallback();\n }\n\n override focus() {\n const target = this._getActiveItem() ?? this._getFirstClickableItem();\n target?.focus();\n }\n\n // ── Items ─────────────────────────────────────────────────────────────────\n\n get items(): ListItem[] {\n const slot = this.shadowRoot?.querySelector('slot');\n const elements = slot?.assignedElements({ flatten: true }) ?? [];\n return elements.filter(el => el instanceof ListItem) as ListItem[];\n }\n\n private _clickableItems() {\n return this.items.filter(item => item.isClickable());\n }\n\n // ── Roving tabindex ───────────────────────────────────────────────────────\n\n private _syncRovingTabIndex() {\n const allItems = this.items;\n const clickable = this._clickableItems();\n\n for (const item of allItems) {\n item.tabIndex = -1;\n }\n\n if (!clickable.length) {\n this.activeIndex = -1;\n return;\n }\n\n if (this.activeIndex < 0 || this.activeIndex >= clickable.length) {\n this.activeIndex = 0;\n }\n\n clickable[this.activeIndex].tabIndex = 0;\n }\n\n private _setActiveByOffset(offset: 1 | -1) {\n const clickable = this._clickableItems();\n if (!clickable.length) return;\n\n if (this.activeIndex < 0) {\n this.activeIndex = 0;\n } else {\n const count = clickable.length;\n this.activeIndex = (this.activeIndex + offset + count) % count;\n }\n\n this._syncRovingTabIndex();\n clickable[this.activeIndex]?.focus();\n }\n\n private _setBoundaryActive(index: number) {\n const clickable = this._clickableItems();\n if (!clickable.length) return;\n\n this.activeIndex = index;\n this._syncRovingTabIndex();\n clickable[this.activeIndex]?.focus();\n }\n\n private _getActiveItem() {\n const clickable = this._clickableItems();\n if (!clickable.length || this.activeIndex < 0) return null;\n return clickable[this.activeIndex] ?? null;\n }\n\n private _getFirstClickableItem() {\n return this._clickableItems()[0] ?? null;\n }\n\n // ── Event helpers ─────────────────────────────────────────────────────────\n\n private _isEventFromThisList(event: Event) {\n const path = event.composedPath();\n const sourceList = path.find(target => target instanceof List);\n return sourceList === this;\n }\n\n private _clickableItemFromEvent(event: Event) {\n if (!this._isEventFromThisList(event)) return null;\n const path = event.composedPath();\n const clickable = this._clickableItems();\n for (const target of path) {\n if (target instanceof ListItem) {\n const owned = clickable.find(item => item === target);\n if (owned) return owned;\n }\n }\n return null;\n }\n\n private _setActiveItem(item: ListItem) {\n const clickable = this._clickableItems();\n const nextIndex = clickable.indexOf(item);\n if (nextIndex < 0) return;\n this.activeIndex = nextIndex;\n this._syncRovingTabIndex();\n }\n\n // ── Handlers ──────────────────────────────────────────────────────────────\n\n private _onKeyDown = (event: KeyboardEvent) => {\n if (!this._isEventFromThisList(event)) return;\n\n const eventItem = this._clickableItemFromEvent(event);\n if (eventItem) {\n this._setActiveItem(eventItem);\n }\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n this._setActiveByOffset(1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n this._setActiveByOffset(-1);\n break;\n case 'Home':\n event.preventDefault();\n this._setBoundaryActive(0);\n break;\n case 'End':\n event.preventDefault();\n this._setBoundaryActive(Math.max(this._clickableItems().length - 1, 0));\n break;\n default:\n break;\n }\n };\n\n private _onClick = (event: Event) => {\n const item = this._clickableItemFromEvent(event);\n if (!item) return;\n this._setActiveItem(item);\n };\n\n private _onSlotChange = () => {\n this._syncRovingTabIndex();\n };\n\n render() {\n const cssClasses = {\n list: true,\n [`variant-${this.variant}`]: true,\n };\n\n return html`\n <div class=${classMap(cssClasses)}>\n <slot @slotchange=${this._onSlotChange}></slot>\n </div>\n `;\n }\n}\n"],"names":["LitElement","html","classMap","styles","property","state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;AAEI,IAAM,IAAI,GAAA,MAAA,GAAV,MAAM,IAAK,SAAQA,GAAU,CAAA;AAA7B,IAAA,WA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AmB,EAAE;IAC5B;IA4CA,MAAM,GAAA;AACJ,QAAA,MAAM,UAAU,GAAG;AACjB,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,CAAC,WAAW,IAAI,CAAC,OAAO,CAAA,CAAE,GAAG,IAAI;SAClC;AAED,QAAA,OAAOC,CAAI,CAAA;mBACIC,CAAQ,CAAC,UAAU,CAAC,CAAA;AACX,0BAAA,EAAA,IAAI,CAAC,aAAa,CAAA;;KAEzC;IACH;;AAnLO,IAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AAEjB,IAAA,CAAA,IAAI,GAAG,QAAH;AAGgC,UAAA,CAAA;IAA1CC,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AAC5B,CAAA,EAAA,IAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAGI,UAAA,CAAA;AAAhB,IAAAC,CAAK;AAA4B,CAAA,EAAA,IAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAVvB,IAAI,GAAA,MAAA,GAAA,UAAA,CAAA;IADhB;AACY,CAAA,EAAA,IAAI,CAqLhB;;;;"}
|
package/dist/loader-full.js
CHANGED
|
@@ -25,10 +25,12 @@ import './when-DEJm_QN9.js';
|
|
|
25
25
|
import './is-link-Dk2OV3PM.js';
|
|
26
26
|
import './dispatch-event-utils-CuEqjlPT.js';
|
|
27
27
|
import './ButtonConstants-CahP2_NA.js';
|
|
28
|
-
import './
|
|
29
|
-
import './form-
|
|
28
|
+
import './delegate-py-Ets8N.js';
|
|
29
|
+
import './form-submitter-DPI4L6gj.js';
|
|
30
|
+
import './element-internals-QME0yEz4.js';
|
|
30
31
|
import './hyperlink-DLvb6MXE.js';
|
|
31
32
|
import './throttle-C7ZAPqtu.js';
|
|
33
|
+
import './form-associated-Bhwwr6dT.js';
|
|
32
34
|
import './button-group.js';
|
|
33
35
|
import './icon-button.js';
|
|
34
36
|
import './fab.js';
|
|
@@ -36,14 +38,19 @@ import './segmented-button.js';
|
|
|
36
38
|
import './segmented-button-group.js';
|
|
37
39
|
import './split-button.js';
|
|
38
40
|
import './dropdown-button.js';
|
|
39
|
-
import './
|
|
40
|
-
import './style-map-BQD5Et1D.js';
|
|
41
|
+
import './input.js';
|
|
41
42
|
import './spread-B5cgadZl.js';
|
|
42
|
-
import './BaseInput-
|
|
43
|
-
import './
|
|
43
|
+
import './BaseInput-CV0pZgSb.js';
|
|
44
|
+
import './url-field.js';
|
|
44
45
|
import './field.js';
|
|
46
|
+
import './number-field.js';
|
|
47
|
+
import './date-picker.js';
|
|
48
|
+
import './time-picker.js';
|
|
49
|
+
import './textarea.js';
|
|
50
|
+
import './switch.js';
|
|
45
51
|
import './checkbox.js';
|
|
46
52
|
import './radio.js';
|
|
53
|
+
import './radio-group.js';
|
|
47
54
|
import './menu.js';
|
|
48
55
|
import './floating-controller-CZYwnRVu.js';
|
|
49
56
|
import './floating-ui.dom-oQieRCpS.js';
|
|
@@ -52,13 +59,20 @@ import './NativeHyperlinkMixin-D9J4aBTy.js';
|
|
|
52
59
|
import './sub-menu.js';
|
|
53
60
|
import './query-assigned-elements-BJaGSqM0.js';
|
|
54
61
|
import './item.js';
|
|
55
|
-
import './list
|
|
62
|
+
import './list.js';
|
|
63
|
+
import './list-item.js';
|
|
56
64
|
import './timeline.js';
|
|
57
65
|
import './timeline-item.js';
|
|
58
66
|
import './accordion.js';
|
|
59
67
|
import './accordion-item.js';
|
|
60
68
|
import './link.js';
|
|
69
|
+
import './tag.js';
|
|
61
70
|
import './chip.js';
|
|
71
|
+
import './chip-set.js';
|
|
72
|
+
import './linear-progress.js';
|
|
73
|
+
import './style-map-BQD5Et1D.js';
|
|
74
|
+
import './base-progress-CLZTRveO.js';
|
|
75
|
+
import './circular-progress.js';
|
|
62
76
|
import './tooltip.js';
|
|
63
77
|
import './popover.js';
|
|
64
78
|
import './popover-content.js';
|
|
@@ -66,7 +80,6 @@ import './breadcrumb.js';
|
|
|
66
80
|
import './breadcrumb-item.js';
|
|
67
81
|
import './skeleton.js';
|
|
68
82
|
import './spinner.js';
|
|
69
|
-
import './brand-loader.js';
|
|
70
83
|
import './empty-state.js';
|
|
71
84
|
import './container.js';
|
|
72
85
|
import './image.js';
|
|
@@ -78,8 +91,12 @@ import './tab.js';
|
|
|
78
91
|
import './tab-panel.js';
|
|
79
92
|
import './slider.js';
|
|
80
93
|
import './color-picker.js';
|
|
94
|
+
import './color-field.js';
|
|
81
95
|
import './table.js';
|
|
82
96
|
import './pagination.js';
|
|
97
|
+
import './sidebar-menu.js';
|
|
98
|
+
import './sidebar-menu-item.js';
|
|
99
|
+
import './sidebar-sub-menu.js';
|
|
83
100
|
import './card.js';
|
|
84
101
|
import './card-content.js';
|
|
85
102
|
import './alert.js';
|
|
@@ -89,9 +106,15 @@ import './snackbar.js';
|
|
|
89
106
|
import './bottom-sheet.js';
|
|
90
107
|
import './side-sheet.js';
|
|
91
108
|
import './modal.js';
|
|
109
|
+
import './select.js';
|
|
110
|
+
import './option.js';
|
|
92
111
|
import './search.js';
|
|
93
112
|
import './toolbar.js';
|
|
94
113
|
import './app-bar.js';
|
|
95
114
|
import './navigation-rail.js';
|
|
96
115
|
import './navigation-rail-item.js';
|
|
116
|
+
import './navigation-bar.js';
|
|
117
|
+
import './navigation-bar-item.js';
|
|
118
|
+
import './navigation-drawer.js';
|
|
119
|
+
import './navigation-drawer-item.js';
|
|
97
120
|
//# sourceMappingURL=loader-full.js.map
|
package/dist/loader-full.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader-full.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loader-full.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/loader.js
CHANGED
|
@@ -13,20 +13,32 @@ import { SegmentedButton } from './segmented-button.js';
|
|
|
13
13
|
import { SegmentedButtonGroup } from './segmented-button-group.js';
|
|
14
14
|
import { SplitButton } from './split-button.js';
|
|
15
15
|
import { DropdownButton } from './dropdown-button.js';
|
|
16
|
-
import {
|
|
16
|
+
import { Input } from './input.js';
|
|
17
|
+
import { UrlField } from './url-field.js';
|
|
17
18
|
import { Field } from './field.js';
|
|
19
|
+
import { NumberField } from './number-field.js';
|
|
20
|
+
import { DatePicker } from './date-picker.js';
|
|
21
|
+
import { TimePicker } from './time-picker.js';
|
|
22
|
+
import { Textarea } from './textarea.js';
|
|
23
|
+
import { Switch } from './switch.js';
|
|
18
24
|
import { Checkbox } from './checkbox.js';
|
|
19
25
|
import { Radio } from './radio.js';
|
|
26
|
+
import { RadioGroup } from './radio-group.js';
|
|
20
27
|
import { Menu } from './menu.js';
|
|
21
28
|
import { MenuItem } from './menu-item.js';
|
|
22
29
|
import { SubMenu } from './sub-menu.js';
|
|
23
30
|
import { Item } from './item.js';
|
|
24
|
-
import {
|
|
31
|
+
import { List } from './list.js';
|
|
32
|
+
import { ListItem } from './list-item.js';
|
|
25
33
|
import { Timeline } from './timeline.js';
|
|
26
34
|
import { TimelineItem } from './timeline-item.js';
|
|
27
35
|
import { Accordion } from './accordion.js';
|
|
28
36
|
import { Link } from './link.js';
|
|
37
|
+
import { Tag } from './tag.js';
|
|
29
38
|
import { Chip } from './chip.js';
|
|
39
|
+
import { ChipSet } from './chip-set.js';
|
|
40
|
+
import { LinearProgress } from './linear-progress.js';
|
|
41
|
+
import { CircularProgress } from './circular-progress.js';
|
|
30
42
|
import { Tooltip } from './tooltip.js';
|
|
31
43
|
import { Popover } from './popover.js';
|
|
32
44
|
import { PopoverContent } from './popover-content.js';
|
|
@@ -34,7 +46,6 @@ import { Breadcrumb } from './breadcrumb.js';
|
|
|
34
46
|
import { BreadcrumbItem } from './breadcrumb-item.js';
|
|
35
47
|
import { Skeleton } from './skeleton.js';
|
|
36
48
|
import { Spinner } from './spinner.js';
|
|
37
|
-
import { BrandLoader } from './brand-loader.js';
|
|
38
49
|
import { EmptyState } from './empty-state.js';
|
|
39
50
|
import { Container } from './container.js';
|
|
40
51
|
import { Image } from './image.js';
|
|
@@ -45,8 +56,12 @@ import { Tab } from './tab.js';
|
|
|
45
56
|
import { TabPanel } from './tab-panel.js';
|
|
46
57
|
import { Slider } from './slider.js';
|
|
47
58
|
import { ColorPicker } from './color-picker.js';
|
|
59
|
+
import { ColorField } from './color-field.js';
|
|
48
60
|
import { Table } from './table.js';
|
|
49
61
|
import { Pagination } from './pagination.js';
|
|
62
|
+
import { SidebarMenu } from './sidebar-menu.js';
|
|
63
|
+
import { SidebarMenuItem } from './sidebar-menu-item.js';
|
|
64
|
+
import { SidebarSubMenu } from './sidebar-sub-menu.js';
|
|
50
65
|
import { Card } from './card.js';
|
|
51
66
|
import { CardContent } from './card-content.js';
|
|
52
67
|
import { Alert } from './alert.js';
|
|
@@ -56,12 +71,17 @@ import { Snackbar } from './snackbar.js';
|
|
|
56
71
|
import { BottomSheet } from './bottom-sheet.js';
|
|
57
72
|
import { SideSheet } from './side-sheet.js';
|
|
58
73
|
import { Modal } from './modal.js';
|
|
74
|
+
import { Select } from './select.js';
|
|
59
75
|
import { SelectOptionElement } from './option.js';
|
|
60
76
|
import { Search } from './search.js';
|
|
61
77
|
import { Toolbar } from './toolbar.js';
|
|
62
78
|
import { AppBar } from './app-bar.js';
|
|
63
79
|
import { NavigationRail } from './navigation-rail.js';
|
|
64
80
|
import { NavigationRailItem } from './navigation-rail-item.js';
|
|
81
|
+
import { NavigationBar } from './navigation-bar.js';
|
|
82
|
+
import { NavigationBarItem } from './navigation-bar-item.js';
|
|
83
|
+
import { NavigationDrawer } from './navigation-drawer.js';
|
|
84
|
+
import { NavigationDrawerItem } from './navigation-drawer-item.js';
|
|
65
85
|
import './IndividualComponent-Bdwyrvd6.js';
|
|
66
86
|
import './property-B49QQ8pS.js';
|
|
67
87
|
import './attachable-controller-CAKVrfcG.js';
|
|
@@ -79,18 +99,21 @@ import './when-DEJm_QN9.js';
|
|
|
79
99
|
import './is-link-Dk2OV3PM.js';
|
|
80
100
|
import './dispatch-event-utils-CuEqjlPT.js';
|
|
81
101
|
import './ButtonConstants-CahP2_NA.js';
|
|
82
|
-
import './
|
|
83
|
-
import './form-
|
|
102
|
+
import './delegate-py-Ets8N.js';
|
|
103
|
+
import './form-submitter-DPI4L6gj.js';
|
|
104
|
+
import './element-internals-QME0yEz4.js';
|
|
84
105
|
import './hyperlink-DLvb6MXE.js';
|
|
85
106
|
import './throttle-C7ZAPqtu.js';
|
|
86
|
-
import './
|
|
107
|
+
import './form-associated-Bhwwr6dT.js';
|
|
87
108
|
import './spread-B5cgadZl.js';
|
|
88
|
-
import './BaseInput-
|
|
109
|
+
import './BaseInput-CV0pZgSb.js';
|
|
89
110
|
import './floating-controller-CZYwnRVu.js';
|
|
90
111
|
import './floating-ui.dom-oQieRCpS.js';
|
|
91
112
|
import './NativeHyperlinkMixin-D9J4aBTy.js';
|
|
92
113
|
import './query-assigned-elements-BJaGSqM0.js';
|
|
93
114
|
import './accordion-item.js';
|
|
115
|
+
import './style-map-BQD5Et1D.js';
|
|
116
|
+
import './base-progress-CLZTRveO.js';
|
|
94
117
|
import './is-dark-mode-DOcaw4Yq.js';
|
|
95
118
|
|
|
96
119
|
class LoaderUtils {
|
|
@@ -195,10 +218,12 @@ async function loadCSS(url, options = {}) {
|
|
|
195
218
|
return sheet;
|
|
196
219
|
}
|
|
197
220
|
|
|
198
|
-
|
|
221
|
+
// Resolve the folder this script was served from. `new URL('.', …)` drops the file name and any
|
|
222
|
+
// query string, so `loader.js?styles` still yields `…/dist` (no trailing slash).
|
|
223
|
+
const distDirectory = new URL('.', import.meta.url).href.replace(/\/$/, '');
|
|
199
224
|
const url = new URL(import.meta.url);
|
|
200
225
|
const params = url.searchParams;
|
|
201
|
-
// Example:
|
|
226
|
+
// Example: loader.js?styles also loads dist/assets/styles.css
|
|
202
227
|
const includeStyles = params.has('styles');
|
|
203
228
|
if (includeStyles) {
|
|
204
229
|
await loadCSS(`${distDirectory}/assets/styles.css`);
|
|
@@ -389,12 +414,12 @@ const loaderConfig = {
|
|
|
389
414
|
'wc-radio': {
|
|
390
415
|
CustomElementClass: Radio,
|
|
391
416
|
},
|
|
417
|
+
'wc-radio-group': {
|
|
418
|
+
CustomElementClass: RadioGroup,
|
|
419
|
+
},
|
|
392
420
|
'wc-spinner': {
|
|
393
421
|
CustomElementClass: Spinner,
|
|
394
422
|
},
|
|
395
|
-
'wc-brand-loader': {
|
|
396
|
-
CustomElementClass: BrandLoader,
|
|
397
|
-
},
|
|
398
423
|
'wc-empty-state': {
|
|
399
424
|
CustomElementClass: EmptyState,
|
|
400
425
|
},
|
|
@@ -437,6 +462,9 @@ const loaderConfig = {
|
|
|
437
462
|
'wc-color-picker': {
|
|
438
463
|
CustomElementClass: ColorPicker,
|
|
439
464
|
},
|
|
465
|
+
'wc-color-field': {
|
|
466
|
+
CustomElementClass: ColorField,
|
|
467
|
+
},
|
|
440
468
|
'wc-table': {
|
|
441
469
|
CustomElementClass: Table,
|
|
442
470
|
},
|
|
@@ -485,6 +513,18 @@ const loaderConfig = {
|
|
|
485
513
|
'wc-navigation-rail-item': {
|
|
486
514
|
CustomElementClass: NavigationRailItem,
|
|
487
515
|
},
|
|
516
|
+
'wc-navigation-bar': {
|
|
517
|
+
CustomElementClass: NavigationBar,
|
|
518
|
+
},
|
|
519
|
+
'wc-navigation-bar-item': {
|
|
520
|
+
CustomElementClass: NavigationBarItem,
|
|
521
|
+
},
|
|
522
|
+
'wc-navigation-drawer': {
|
|
523
|
+
CustomElementClass: NavigationDrawer,
|
|
524
|
+
},
|
|
525
|
+
'wc-navigation-drawer-item': {
|
|
526
|
+
CustomElementClass: NavigationDrawerItem,
|
|
527
|
+
},
|
|
488
528
|
'wc-calendar': {
|
|
489
529
|
importPath: `${distDirectory}/calendar.js`,
|
|
490
530
|
dependencies: ['wc-calendar-column-view', 'wc-calendar-month-view'],
|
|
@@ -512,21 +552,14 @@ const loaderConfig = {
|
|
|
512
552
|
},
|
|
513
553
|
'wc-condition-builder': {
|
|
514
554
|
importPath: `${distDirectory}/condition-builder.js`,
|
|
515
|
-
dependencies: [
|
|
516
|
-
'wc-cb-predicate',
|
|
517
|
-
'wc-cb-compound-expression',
|
|
518
|
-
'wc-cb-expression',
|
|
519
|
-
'wc-cb-divider',
|
|
520
|
-
],
|
|
521
|
-
},
|
|
522
|
-
'wc-cb-predicate': {
|
|
523
|
-
importPath: `${distDirectory}/cb-predicate.js`,
|
|
555
|
+
dependencies: ['wc-cb-group', 'wc-cb-rule', 'wc-cb-divider'],
|
|
524
556
|
},
|
|
525
|
-
'wc-cb-
|
|
526
|
-
importPath: `${distDirectory}/cb-
|
|
557
|
+
'wc-cb-group': {
|
|
558
|
+
importPath: `${distDirectory}/cb-group.js`,
|
|
559
|
+
dependencies: ['wc-cb-divider'],
|
|
527
560
|
},
|
|
528
|
-
'wc-cb-
|
|
529
|
-
importPath: `${distDirectory}/cb-
|
|
561
|
+
'wc-cb-rule': {
|
|
562
|
+
importPath: `${distDirectory}/cb-rule.js`,
|
|
530
563
|
},
|
|
531
564
|
'wc-cb-divider': {
|
|
532
565
|
importPath: `${distDirectory}/cb-divider.js`,
|