@redvars/peacock 3.10.1 → 3.11.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/{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/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 +1044 -382
- package/dist/custom-elements.json +8615 -4726
- 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 +25 -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 +32 -8
- 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 +52 -12
- 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/date-picker/date-picker.d.ts +0 -1
- package/dist/src/index.d.ts +4 -3
- 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/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/date-picker/date-picker.ts +2 -3
- package/src/field/field.scss +31 -0
- package/src/flow/flow.scss +5 -5
- package/src/image/image.scss +2 -2
- package/src/index.ts +7 -3
- 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 +28 -6
- 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/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/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/dist/test/{brand-loader.test.d.ts → button.test.d.ts} +0 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { i, _ as __decorate, I as IndividualComponent, a as i$1, A, b } from './IndividualComponent-Bdwyrvd6.js';
|
|
2
|
+
import { n } from './property-B49QQ8pS.js';
|
|
3
|
+
import { e } from './query-CHb9Ft_d.js';
|
|
4
|
+
import { NavigationDrawerItem } from './navigation-drawer-item.js';
|
|
5
|
+
import './base-Cl6v8-BZ.js';
|
|
6
|
+
import './state-DkTK9EGF.js';
|
|
7
|
+
import './class-map-DG7CA1et.js';
|
|
8
|
+
import './directive-ZPhl09Yt.js';
|
|
9
|
+
|
|
10
|
+
var css_248z = i`* {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
-webkit-tap-highlight-color: transparent;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.screen-reader-only {
|
|
16
|
+
display: none !important;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
[hidden] {
|
|
20
|
+
display: none !important;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host {
|
|
24
|
+
display: block;
|
|
25
|
+
--_width: var(--navigation-drawer-width, 22.5rem);
|
|
26
|
+
--_container-color: var(
|
|
27
|
+
--navigation-drawer-container-color,
|
|
28
|
+
var(--color-surface-container-low)
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host([variant=standard]) {
|
|
33
|
+
height: 100%;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([variant=standard]:not([open])) {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.drawer {
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
background-color: var(--_container-color);
|
|
43
|
+
color: var(--color-on-surface-variant);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.standard {
|
|
47
|
+
width: var(--_width);
|
|
48
|
+
height: 100%;
|
|
49
|
+
overflow-y: auto;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.modal {
|
|
53
|
+
position: fixed;
|
|
54
|
+
inset-block: 0;
|
|
55
|
+
inset-inline-start: 0;
|
|
56
|
+
inset-inline-end: auto;
|
|
57
|
+
width: min(var(--_width), 100vw - 3.5rem);
|
|
58
|
+
max-width: none;
|
|
59
|
+
height: 100dvh;
|
|
60
|
+
max-height: none;
|
|
61
|
+
margin: 0;
|
|
62
|
+
padding: 0;
|
|
63
|
+
border: none;
|
|
64
|
+
border-start-end-radius: var(--shape-corner-large);
|
|
65
|
+
border-end-end-radius: var(--shape-corner-large);
|
|
66
|
+
box-shadow: var(--elevation-level1);
|
|
67
|
+
overflow-y: auto;
|
|
68
|
+
}
|
|
69
|
+
.modal[open] {
|
|
70
|
+
animation: slide-in var(--duration-medium2, 300ms) var(--easing-emphasized-decelerate, ease-out);
|
|
71
|
+
}
|
|
72
|
+
.modal::backdrop {
|
|
73
|
+
background: color-mix(in srgb, var(--color-scrim, black) 32%, transparent);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@keyframes slide-in {
|
|
77
|
+
from {
|
|
78
|
+
transform: translateX(-100%);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
:host(:dir(rtl)) .modal[open] {
|
|
82
|
+
animation-name: slide-in-rtl;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@keyframes slide-in-rtl {
|
|
86
|
+
from {
|
|
87
|
+
transform: translateX(100%);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
.container {
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: column;
|
|
93
|
+
min-height: 100%;
|
|
94
|
+
padding: var(--spacing-150);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.headline {
|
|
98
|
+
font-family: var(--typography-title-small-font-family) !important;
|
|
99
|
+
font-size: var(--typography-title-small-font-size) !important;
|
|
100
|
+
font-weight: var(--typography-title-small-font-weight) !important;
|
|
101
|
+
line-height: var(--typography-title-small-line-height) !important;
|
|
102
|
+
letter-spacing: var(--typography-title-small-letter-spacing) !important;
|
|
103
|
+
color: var(--color-on-surface-variant);
|
|
104
|
+
padding: var(--spacing-200) var(--spacing-200) var(--spacing-150);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.items {
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@media (prefers-reduced-motion: reduce) {
|
|
113
|
+
.modal[open] {
|
|
114
|
+
animation: none;
|
|
115
|
+
}
|
|
116
|
+
}`;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @label Navigation Drawer
|
|
120
|
+
* @tag wc-navigation-drawer
|
|
121
|
+
* @rawTag navigation-drawer
|
|
122
|
+
*
|
|
123
|
+
* @summary A side panel listing an app's destinations.
|
|
124
|
+
* @overview
|
|
125
|
+
* <p>Navigation drawer holds <code>wc-navigation-drawer-item</code> destinations. Clicking an item makes
|
|
126
|
+
* it the active one and fires <code>change</code>.</p>
|
|
127
|
+
* <ul>
|
|
128
|
+
* <li><code>variant="standard"</code> (default) sits in the page layout, next to the content.</li>
|
|
129
|
+
* <li><code>variant="modal"</code> opens over the page with a scrim. It traps focus, closes on Escape,
|
|
130
|
+
* on a scrim click and after an item is chosen.</li>
|
|
131
|
+
* </ul>
|
|
132
|
+
* <p>Both variants show only while <code>open</code> is set.</p>
|
|
133
|
+
*
|
|
134
|
+
* @slot - The drawer items. Other content, such as `wc-divider` or section titles, works too.
|
|
135
|
+
* @slot header - Content above the items, after the headline.
|
|
136
|
+
*
|
|
137
|
+
* @fires {CustomEvent<{value: string | undefined, index: number, item: NavigationDrawerItem}>} change - Dispatched when the user activates an item.
|
|
138
|
+
* @fires {CustomEvent} open - Dispatched when the drawer opens.
|
|
139
|
+
* @fires {CustomEvent} close - Dispatched when the drawer closes.
|
|
140
|
+
*
|
|
141
|
+
* @cssprop --navigation-drawer-width - Width of the drawer. Defaults to 22.5rem (360dp).
|
|
142
|
+
* @cssprop --navigation-drawer-container-color - Background of the drawer. Defaults to `--color-surface-container-low`.
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```html
|
|
146
|
+
* <wc-navigation-drawer open headline="Mail">
|
|
147
|
+
* <wc-navigation-drawer-item active badge="24">
|
|
148
|
+
* <wc-icon slot="icon" name="inbox"></wc-icon>
|
|
149
|
+
* Inbox
|
|
150
|
+
* </wc-navigation-drawer-item>
|
|
151
|
+
* <wc-navigation-drawer-item>
|
|
152
|
+
* <wc-icon slot="icon" name="send"></wc-icon>
|
|
153
|
+
* Sent
|
|
154
|
+
* </wc-navigation-drawer-item>
|
|
155
|
+
* </wc-navigation-drawer>
|
|
156
|
+
* ```
|
|
157
|
+
* @tags navigation
|
|
158
|
+
*/
|
|
159
|
+
let NavigationDrawer = class NavigationDrawer extends i$1 {
|
|
160
|
+
constructor() {
|
|
161
|
+
// ── Static ───────────────────────────────────────────────────────────────
|
|
162
|
+
super(...arguments);
|
|
163
|
+
// ── Properties ───────────────────────────────────────────────────────────
|
|
164
|
+
/** Whether the drawer is shown. */
|
|
165
|
+
this.open = false;
|
|
166
|
+
/** `"standard"` sits in the layout; `"modal"` opens over the page with a scrim. */
|
|
167
|
+
this.variant = 'standard';
|
|
168
|
+
/** Title shown at the top of the drawer. */
|
|
169
|
+
this.headline = '';
|
|
170
|
+
this.handleItemClick = (event) => {
|
|
171
|
+
const item = event.target.closest?.('wc-navigation-drawer-item');
|
|
172
|
+
if (!item || item.disabled)
|
|
173
|
+
return;
|
|
174
|
+
const items = this.getItems();
|
|
175
|
+
for (const drawerItem of items) {
|
|
176
|
+
drawerItem.active = drawerItem === item;
|
|
177
|
+
}
|
|
178
|
+
this.dispatchEvent(new CustomEvent('change', {
|
|
179
|
+
detail: { value: item.value, index: items.indexOf(item), item },
|
|
180
|
+
bubbles: true,
|
|
181
|
+
composed: true,
|
|
182
|
+
}));
|
|
183
|
+
if (this.variant === 'modal')
|
|
184
|
+
this.close();
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
// ── Lifecycle ────────────────────────────────────────────────────────────
|
|
188
|
+
connectedCallback() {
|
|
189
|
+
super.connectedCallback();
|
|
190
|
+
this.addEventListener('click', this.handleItemClick);
|
|
191
|
+
}
|
|
192
|
+
disconnectedCallback() {
|
|
193
|
+
this.removeEventListener('click', this.handleItemClick);
|
|
194
|
+
super.disconnectedCallback();
|
|
195
|
+
}
|
|
196
|
+
updated(changed) {
|
|
197
|
+
if (changed.has('open') || changed.has('variant')) {
|
|
198
|
+
this.syncDialog();
|
|
199
|
+
}
|
|
200
|
+
// Skip the first render: `open` set in markup is not a user action.
|
|
201
|
+
if (changed.has('open') && changed.get('open') !== undefined) {
|
|
202
|
+
this.dispatchEvent(new CustomEvent(this.open ? 'open' : 'close', {
|
|
203
|
+
bubbles: true,
|
|
204
|
+
composed: true,
|
|
205
|
+
}));
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
// ── Public methods ───────────────────────────────────────────────────────
|
|
209
|
+
/** Opens the drawer. */
|
|
210
|
+
show() {
|
|
211
|
+
this.open = true;
|
|
212
|
+
}
|
|
213
|
+
/** Closes the drawer. */
|
|
214
|
+
close() {
|
|
215
|
+
this.open = false;
|
|
216
|
+
}
|
|
217
|
+
// ── Private methods ──────────────────────────────────────────────────────
|
|
218
|
+
getItems() {
|
|
219
|
+
return Array.from(this.querySelectorAll('wc-navigation-drawer-item'));
|
|
220
|
+
}
|
|
221
|
+
syncDialog() {
|
|
222
|
+
const dialog = this.dialogElement;
|
|
223
|
+
if (!dialog)
|
|
224
|
+
return;
|
|
225
|
+
if (this.open && !dialog.open) {
|
|
226
|
+
dialog.showModal();
|
|
227
|
+
const items = this.getItems();
|
|
228
|
+
(items.find(item => item.active) ?? items[0])?.focus();
|
|
229
|
+
}
|
|
230
|
+
else if (!this.open && dialog.open) {
|
|
231
|
+
dialog.close();
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
/** Escape: close through `open` so the property stays the source of truth. */
|
|
235
|
+
handleCancel(event) {
|
|
236
|
+
event.preventDefault();
|
|
237
|
+
this.close();
|
|
238
|
+
}
|
|
239
|
+
/** A click that lands on the dialog itself, not its content, is a scrim click. */
|
|
240
|
+
handleDialogClick(event) {
|
|
241
|
+
if (event.target === this.dialogElement)
|
|
242
|
+
this.close();
|
|
243
|
+
}
|
|
244
|
+
// ── Render helpers ───────────────────────────────────────────────────────
|
|
245
|
+
renderContent() {
|
|
246
|
+
return b `
|
|
247
|
+
<div class="container" part="container">
|
|
248
|
+
${this.headline
|
|
249
|
+
? b `<div class="headline">${this.headline}</div>`
|
|
250
|
+
: A}
|
|
251
|
+
<slot name="header"></slot>
|
|
252
|
+
<nav class="items" aria-label=${this.headline || 'Navigation'}>
|
|
253
|
+
<slot></slot>
|
|
254
|
+
</nav>
|
|
255
|
+
</div>
|
|
256
|
+
`;
|
|
257
|
+
}
|
|
258
|
+
// ── Render ───────────────────────────────────────────────────────────────
|
|
259
|
+
render() {
|
|
260
|
+
if (this.variant === 'modal') {
|
|
261
|
+
return b `<dialog
|
|
262
|
+
class="drawer modal"
|
|
263
|
+
@cancel=${this.handleCancel}
|
|
264
|
+
@click=${this.handleDialogClick}
|
|
265
|
+
>
|
|
266
|
+
${this.renderContent()}
|
|
267
|
+
</dialog>`;
|
|
268
|
+
}
|
|
269
|
+
return b `<div class="drawer standard" ?hidden=${!this.open}>
|
|
270
|
+
${this.renderContent()}
|
|
271
|
+
</div>`;
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
NavigationDrawer.styles = [css_248z];
|
|
275
|
+
NavigationDrawer.Item = NavigationDrawerItem;
|
|
276
|
+
__decorate([
|
|
277
|
+
n({ type: Boolean, reflect: true })
|
|
278
|
+
], NavigationDrawer.prototype, "open", void 0);
|
|
279
|
+
__decorate([
|
|
280
|
+
n({ reflect: true })
|
|
281
|
+
], NavigationDrawer.prototype, "variant", void 0);
|
|
282
|
+
__decorate([
|
|
283
|
+
n()
|
|
284
|
+
], NavigationDrawer.prototype, "headline", void 0);
|
|
285
|
+
__decorate([
|
|
286
|
+
e('dialog')
|
|
287
|
+
], NavigationDrawer.prototype, "dialogElement", void 0);
|
|
288
|
+
NavigationDrawer = __decorate([
|
|
289
|
+
IndividualComponent
|
|
290
|
+
], NavigationDrawer);
|
|
291
|
+
|
|
292
|
+
export { NavigationDrawer };
|
|
293
|
+
//# sourceMappingURL=navigation-drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-drawer.js","sources":["../../src/navigation-drawer/navigation-drawer.ts"],"sourcesContent":["import { html, LitElement, nothing, PropertyValues } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport { NavigationDrawerItem } from './navigation-drawer-item.js';\nimport styles from './navigation-drawer.scss';\n\n/**\n * @label Navigation Drawer\n * @tag wc-navigation-drawer\n * @rawTag navigation-drawer\n *\n * @summary A side panel listing an app's destinations.\n * @overview\n * <p>Navigation drawer holds <code>wc-navigation-drawer-item</code> destinations. Clicking an item makes\n * it the active one and fires <code>change</code>.</p>\n * <ul>\n * <li><code>variant=\"standard\"</code> (default) sits in the page layout, next to the content.</li>\n * <li><code>variant=\"modal\"</code> opens over the page with a scrim. It traps focus, closes on Escape,\n * on a scrim click and after an item is chosen.</li>\n * </ul>\n * <p>Both variants show only while <code>open</code> is set.</p>\n *\n * @slot - The drawer items. Other content, such as `wc-divider` or section titles, works too.\n * @slot header - Content above the items, after the headline.\n *\n * @fires {CustomEvent<{value: string | undefined, index: number, item: NavigationDrawerItem}>} change - Dispatched when the user activates an item.\n * @fires {CustomEvent} open - Dispatched when the drawer opens.\n * @fires {CustomEvent} close - Dispatched when the drawer closes.\n *\n * @cssprop --navigation-drawer-width - Width of the drawer. Defaults to 22.5rem (360dp).\n * @cssprop --navigation-drawer-container-color - Background of the drawer. Defaults to `--color-surface-container-low`.\n *\n * @example\n * ```html\n * <wc-navigation-drawer open headline=\"Mail\">\n * <wc-navigation-drawer-item active badge=\"24\">\n * <wc-icon slot=\"icon\" name=\"inbox\"></wc-icon>\n * Inbox\n * </wc-navigation-drawer-item>\n * <wc-navigation-drawer-item>\n * <wc-icon slot=\"icon\" name=\"send\"></wc-icon>\n * Sent\n * </wc-navigation-drawer-item>\n * </wc-navigation-drawer>\n * ```\n * @tags navigation\n */\n@IndividualComponent\nexport class NavigationDrawer extends LitElement {\n // ── Static ───────────────────────────────────────────────────────────────\n\n static styles = [styles];\n\n static Item = NavigationDrawerItem;\n\n // ── Properties ───────────────────────────────────────────────────────────\n\n /** Whether the drawer is shown. */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /** `\"standard\"` sits in the layout; `\"modal\"` opens over the page with a scrim. */\n @property({ reflect: true }) variant: 'standard' | 'modal' = 'standard';\n\n /** Title shown at the top of the drawer. */\n @property() headline = '';\n\n // ── Queries ──────────────────────────────────────────────────────────────\n\n @query('dialog') private dialogElement?: HTMLDialogElement;\n\n // ── Lifecycle ────────────────────────────────────────────────────────────\n\n override connectedCallback() {\n super.connectedCallback();\n this.addEventListener('click', this.handleItemClick);\n }\n\n override disconnectedCallback() {\n this.removeEventListener('click', this.handleItemClick);\n super.disconnectedCallback();\n }\n\n protected override updated(changed: PropertyValues<this>) {\n if (changed.has('open') || changed.has('variant')) {\n this.syncDialog();\n }\n // Skip the first render: `open` set in markup is not a user action.\n if (changed.has('open') && changed.get('open') !== undefined) {\n this.dispatchEvent(\n new CustomEvent(this.open ? 'open' : 'close', {\n bubbles: true,\n composed: true,\n }),\n );\n }\n }\n\n // ── Public methods ───────────────────────────────────────────────────────\n\n /** Opens the drawer. */\n show() {\n this.open = true;\n }\n\n /** Closes the drawer. */\n close() {\n this.open = false;\n }\n\n // ── Private methods ──────────────────────────────────────────────────────\n\n private getItems(): NavigationDrawerItem[] {\n return Array.from(\n this.querySelectorAll<NavigationDrawerItem>('wc-navigation-drawer-item'),\n );\n }\n\n private syncDialog() {\n const dialog = this.dialogElement;\n if (!dialog) return;\n if (this.open && !dialog.open) {\n dialog.showModal();\n const items = this.getItems();\n (items.find(item => item.active) ?? items[0])?.focus();\n } else if (!this.open && dialog.open) {\n dialog.close();\n }\n }\n\n private handleItemClick = (event: Event) => {\n const item = (event.target as Element).closest?.(\n 'wc-navigation-drawer-item',\n ) as NavigationDrawerItem | null;\n if (!item || item.disabled) return;\n\n const items = this.getItems();\n for (const drawerItem of items) {\n drawerItem.active = drawerItem === item;\n }\n\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: { value: item.value, index: items.indexOf(item), item },\n bubbles: true,\n composed: true,\n }),\n );\n\n if (this.variant === 'modal') this.close();\n };\n\n /** Escape: close through `open` so the property stays the source of truth. */\n private handleCancel(event: Event) {\n event.preventDefault();\n this.close();\n }\n\n /** A click that lands on the dialog itself, not its content, is a scrim click. */\n private handleDialogClick(event: MouseEvent) {\n if (event.target === this.dialogElement) this.close();\n }\n\n // ── Render helpers ───────────────────────────────────────────────────────\n\n private renderContent() {\n return html`\n <div class=\"container\" part=\"container\">\n ${this.headline\n ? html`<div class=\"headline\">${this.headline}</div>`\n : nothing}\n <slot name=\"header\"></slot>\n <nav class=\"items\" aria-label=${this.headline || 'Navigation'}>\n <slot></slot>\n </nav>\n </div>\n `;\n }\n\n // ── Render ───────────────────────────────────────────────────────────────\n\n render() {\n if (this.variant === 'modal') {\n return html`<dialog\n class=\"drawer modal\"\n @cancel=${this.handleCancel}\n @click=${this.handleDialogClick}\n >\n ${this.renderContent()}\n </dialog>`;\n }\n\n return html`<div class=\"drawer standard\" ?hidden=${!this.open}>\n ${this.renderContent()}\n </div>`;\n }\n}\n"],"names":["LitElement","html","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AA,gBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAG5B,UAAA,CAAA;AAA5B,IAAAA,CAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;AAA6C,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAG5D,UAAA,CAAA;AAAX,IAAAA,CAAQ;AAAiB,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAID,UAAA,CAAA;IAAxBC,CAAK,CAAC,QAAQ;AAA4C,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;AApBhD,gBAAgB,GAAA,UAAA,CAAA;IAD5B;AACY,CAAA,EAAA,gBAAgB,CAmJ5B;;;;"}
|
package/dist/navigation-rail.js
CHANGED
|
@@ -31,7 +31,7 @@ var css_248z = i`* {
|
|
|
31
31
|
overflow-y: auto;
|
|
32
32
|
overflow-x: hidden;
|
|
33
33
|
--nav-rail-padding-block: 1.5rem;
|
|
34
|
-
--nav-rail-container-color: var(--
|
|
34
|
+
--nav-rail-container-color: var(--color-surface);
|
|
35
35
|
--nav-rail-label-text-color: var(--color-on-surface);
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { i, _ as __decorate, I as IndividualComponent, A, b } from './IndividualComponent-Bdwyrvd6.js';
|
|
2
|
+
import { n } from './property-B49QQ8pS.js';
|
|
3
|
+
import { r } from './state-DkTK9EGF.js';
|
|
4
|
+
import { e } from './query-CHb9Ft_d.js';
|
|
5
|
+
import { e as e$1 } from './class-map-DG7CA1et.js';
|
|
6
|
+
import { r as redispatchEvent } from './dispatch-event-utils-CuEqjlPT.js';
|
|
7
|
+
import { s as spread } from './spread-B5cgadZl.js';
|
|
8
|
+
import { B as BaseInput } from './BaseInput-CV0pZgSb.js';
|
|
9
|
+
import './base-Cl6v8-BZ.js';
|
|
10
|
+
import './directive-ZPhl09Yt.js';
|
|
11
|
+
import './element-internals-QME0yEz4.js';
|
|
12
|
+
import './form-associated-Bhwwr6dT.js';
|
|
13
|
+
|
|
14
|
+
var css_248z = i`* {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
-webkit-tap-highlight-color: transparent;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.screen-reader-only {
|
|
20
|
+
display: none !important;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
[hidden] {
|
|
24
|
+
display: none !important;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host {
|
|
28
|
+
display: block;
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.input-element {
|
|
33
|
+
border: none;
|
|
34
|
+
outline: none;
|
|
35
|
+
margin: 0;
|
|
36
|
+
padding: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.input-wrapper .input {
|
|
40
|
+
flex: 1;
|
|
41
|
+
width: 100%;
|
|
42
|
+
background: none;
|
|
43
|
+
cursor: inherit;
|
|
44
|
+
}
|
|
45
|
+
.input-wrapper .password-toggle {
|
|
46
|
+
--button-container-shape: var(--shape-corner-full);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.stepper {
|
|
50
|
+
/* Chrome, Safari, Edge, Opera */
|
|
51
|
+
}
|
|
52
|
+
.stepper input::-webkit-outer-spin-button,
|
|
53
|
+
.stepper input::-webkit-inner-spin-button {
|
|
54
|
+
-webkit-appearance: none;
|
|
55
|
+
margin: 0;
|
|
56
|
+
}
|
|
57
|
+
.stepper {
|
|
58
|
+
/* Firefox */
|
|
59
|
+
}
|
|
60
|
+
.stepper input[type=number] {
|
|
61
|
+
-moz-appearance: textfield;
|
|
62
|
+
}`;
|
|
63
|
+
|
|
64
|
+
var _NumberField_id;
|
|
65
|
+
/**
|
|
66
|
+
* @label Number Field
|
|
67
|
+
* @tag wc-number-field
|
|
68
|
+
* @rawTag number-field
|
|
69
|
+
*
|
|
70
|
+
* @summary The Number Field component is used to capture numeric user input.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```html
|
|
74
|
+
* <wc-number-field label="Age" placeholder="Enter your age"></wc-number-field>
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
let NumberField = class NumberField extends BaseInput {
|
|
78
|
+
constructor() {
|
|
79
|
+
super(...arguments);
|
|
80
|
+
_NumberField_id.set(this, crypto.randomUUID());
|
|
81
|
+
this.placeholder = '';
|
|
82
|
+
this.label = '';
|
|
83
|
+
this.inline = false;
|
|
84
|
+
this.size = 'md';
|
|
85
|
+
this.autocomplete = 'off';
|
|
86
|
+
this.configAria = {};
|
|
87
|
+
/**
|
|
88
|
+
* Helper text to display below the input.
|
|
89
|
+
*/
|
|
90
|
+
this.helperText = '';
|
|
91
|
+
this.error = false;
|
|
92
|
+
this.errorText = '';
|
|
93
|
+
this.warning = false;
|
|
94
|
+
this.warningText = '';
|
|
95
|
+
this.stepper = false;
|
|
96
|
+
this.focused = false;
|
|
97
|
+
/**
|
|
98
|
+
* Returns true when the text field has been interacted with. Native
|
|
99
|
+
* validation errors only display in response to user interactions.
|
|
100
|
+
*/
|
|
101
|
+
this.dirty = false;
|
|
102
|
+
}
|
|
103
|
+
connectedCallback() {
|
|
104
|
+
super.connectedCallback();
|
|
105
|
+
this.handleInitialAttributes();
|
|
106
|
+
}
|
|
107
|
+
handleInitialAttributes() {
|
|
108
|
+
if (this.hasAttribute('tabindex')) {
|
|
109
|
+
this.tabindex = this.getAttribute('tabindex') || undefined;
|
|
110
|
+
this.removeAttribute('tabindex');
|
|
111
|
+
}
|
|
112
|
+
Array.from(this.attributes).forEach(attr => {
|
|
113
|
+
if (attr.name.startsWith('aria-')) {
|
|
114
|
+
this.configAria[attr.name] = attr.value;
|
|
115
|
+
this.removeAttribute(attr.name);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
__handleInput(event) {
|
|
120
|
+
this.dirty = true;
|
|
121
|
+
this.value = Number(event.target.value);
|
|
122
|
+
}
|
|
123
|
+
focus() {
|
|
124
|
+
this.inputElement?.focus();
|
|
125
|
+
}
|
|
126
|
+
blur() {
|
|
127
|
+
this.inputElement?.blur();
|
|
128
|
+
}
|
|
129
|
+
__handleFocusChange() {
|
|
130
|
+
// When calling focus() or reportValidity() during change, it's possible
|
|
131
|
+
// for blur to be called after the new focus event. Rather than set
|
|
132
|
+
// `this.focused` to true/false on focus/blur, we always set it to whether
|
|
133
|
+
// or not the input itself is focused.
|
|
134
|
+
this.focused = this.inputElement?.matches(':focus') ?? false;
|
|
135
|
+
}
|
|
136
|
+
__redispatchEvent(event) {
|
|
137
|
+
redispatchEvent(this, event);
|
|
138
|
+
}
|
|
139
|
+
stepUp() {
|
|
140
|
+
this.inputElement?.stepUp();
|
|
141
|
+
}
|
|
142
|
+
stepDown() {
|
|
143
|
+
this.inputElement?.stepDown();
|
|
144
|
+
}
|
|
145
|
+
render() {
|
|
146
|
+
const classes = {
|
|
147
|
+
'input-wrapper': true,
|
|
148
|
+
stepper: this.stepper,
|
|
149
|
+
};
|
|
150
|
+
return b `
|
|
151
|
+
<wc-field
|
|
152
|
+
?required=${this.required}
|
|
153
|
+
?disabled=${this.disabled}
|
|
154
|
+
?readonly=${this.readonly}
|
|
155
|
+
?skeleton=${this.skeleton}
|
|
156
|
+
helper-text=${this.helperText}
|
|
157
|
+
?error=${this.error}
|
|
158
|
+
error-text=${this.errorText}
|
|
159
|
+
?warning=${this.warning}
|
|
160
|
+
warning-text=${this.warningText}
|
|
161
|
+
label=${this.label}
|
|
162
|
+
?focused=${this.focused}
|
|
163
|
+
.host=${this}
|
|
164
|
+
class=${e$1(classes)}
|
|
165
|
+
>
|
|
166
|
+
${this.stepper && !this.disabled
|
|
167
|
+
? b `<wc-icon-button
|
|
168
|
+
class="stepper"
|
|
169
|
+
variant="text"
|
|
170
|
+
slot="field-start"
|
|
171
|
+
@click=${this.stepDown}
|
|
172
|
+
>
|
|
173
|
+
<wc-icon name="remove"></wc-icon>
|
|
174
|
+
</wc-icon-button>`
|
|
175
|
+
: A}
|
|
176
|
+
|
|
177
|
+
<slot name="start" slot="field-start"></slot>
|
|
178
|
+
|
|
179
|
+
<input
|
|
180
|
+
class="input input-element"
|
|
181
|
+
name=${this.name}
|
|
182
|
+
type="number"
|
|
183
|
+
placeholder=${this.placeholder}
|
|
184
|
+
autocomplete=${this.autocomplete}
|
|
185
|
+
.value=${this.value}
|
|
186
|
+
?tabindex=${this.tabindex}
|
|
187
|
+
?readonly=${this.readonly}
|
|
188
|
+
?required=${this.required}
|
|
189
|
+
?disabled=${this.disabled}
|
|
190
|
+
min=${this.min}
|
|
191
|
+
max=${this.max}
|
|
192
|
+
step=${this.step}
|
|
193
|
+
@input=${this.__handleInput}
|
|
194
|
+
@change=${this.__redispatchEvent}
|
|
195
|
+
@focus=${this.__handleFocusChange}
|
|
196
|
+
@blur=${this.__handleFocusChange}
|
|
197
|
+
${spread(this.configAria)}
|
|
198
|
+
/>
|
|
199
|
+
|
|
200
|
+
<slot name="end" slot="field-end"></slot>
|
|
201
|
+
|
|
202
|
+
${this.stepper && !this.disabled
|
|
203
|
+
? b `<wc-icon-button
|
|
204
|
+
class="stepper"
|
|
205
|
+
variant="text"
|
|
206
|
+
slot="field-end"
|
|
207
|
+
@click=${this.stepUp}
|
|
208
|
+
>
|
|
209
|
+
<wc-icon name="add"></wc-icon>
|
|
210
|
+
</wc-icon-button>`
|
|
211
|
+
: A}
|
|
212
|
+
</wc-field>
|
|
213
|
+
`;
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
_NumberField_id = new WeakMap();
|
|
217
|
+
NumberField.styles = [css_248z];
|
|
218
|
+
__decorate([
|
|
219
|
+
n({ type: Number })
|
|
220
|
+
], NumberField.prototype, "value", void 0);
|
|
221
|
+
__decorate([
|
|
222
|
+
n({ type: String })
|
|
223
|
+
], NumberField.prototype, "placeholder", void 0);
|
|
224
|
+
__decorate([
|
|
225
|
+
n({ type: String })
|
|
226
|
+
], NumberField.prototype, "label", void 0);
|
|
227
|
+
__decorate([
|
|
228
|
+
n({ type: Boolean, reflect: true })
|
|
229
|
+
], NumberField.prototype, "inline", void 0);
|
|
230
|
+
__decorate([
|
|
231
|
+
n({ type: String, reflect: true })
|
|
232
|
+
], NumberField.prototype, "size", void 0);
|
|
233
|
+
__decorate([
|
|
234
|
+
n({ type: Number })
|
|
235
|
+
], NumberField.prototype, "max", void 0);
|
|
236
|
+
__decorate([
|
|
237
|
+
n({ type: Number })
|
|
238
|
+
], NumberField.prototype, "min", void 0);
|
|
239
|
+
__decorate([
|
|
240
|
+
n({ type: Number })
|
|
241
|
+
], NumberField.prototype, "step", void 0);
|
|
242
|
+
__decorate([
|
|
243
|
+
n({ type: String })
|
|
244
|
+
], NumberField.prototype, "autocomplete", void 0);
|
|
245
|
+
__decorate([
|
|
246
|
+
n({ type: Object })
|
|
247
|
+
], NumberField.prototype, "configAria", void 0);
|
|
248
|
+
__decorate([
|
|
249
|
+
n({ type: String, attribute: 'helper-text' })
|
|
250
|
+
], NumberField.prototype, "helperText", void 0);
|
|
251
|
+
__decorate([
|
|
252
|
+
n({ type: Boolean })
|
|
253
|
+
], NumberField.prototype, "error", void 0);
|
|
254
|
+
__decorate([
|
|
255
|
+
n({ type: String, attribute: 'error-text' })
|
|
256
|
+
], NumberField.prototype, "errorText", void 0);
|
|
257
|
+
__decorate([
|
|
258
|
+
n({ type: Boolean })
|
|
259
|
+
], NumberField.prototype, "warning", void 0);
|
|
260
|
+
__decorate([
|
|
261
|
+
n({ type: String, attribute: 'warning-text' })
|
|
262
|
+
], NumberField.prototype, "warningText", void 0);
|
|
263
|
+
__decorate([
|
|
264
|
+
n({ type: Boolean })
|
|
265
|
+
], NumberField.prototype, "stepper", void 0);
|
|
266
|
+
__decorate([
|
|
267
|
+
r()
|
|
268
|
+
], NumberField.prototype, "focused", void 0);
|
|
269
|
+
__decorate([
|
|
270
|
+
r()
|
|
271
|
+
], NumberField.prototype, "dirty", void 0);
|
|
272
|
+
__decorate([
|
|
273
|
+
e('.input-element')
|
|
274
|
+
], NumberField.prototype, "inputElement", void 0);
|
|
275
|
+
NumberField = __decorate([
|
|
276
|
+
IndividualComponent
|
|
277
|
+
], NumberField);
|
|
278
|
+
|
|
279
|
+
export { NumberField };
|
|
280
|
+
//# sourceMappingURL=number-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number-field.js","sources":["../../src/number-field/number-field.ts"],"sourcesContent":["import { html, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport { redispatchEvent } from '@/__internal/utils/dispatch-event-utils.js';\nimport { spread } from '@/__internal/directive/spread.js';\n\nimport IndividualComponent from '@/IndividualComponent.js';\nimport BaseInput from '../input/BaseInput.js';\nimport styles from './number-field.scss';\n\n/**\n * @label Number Field\n * @tag wc-number-field\n * @rawTag number-field\n *\n * @summary The Number Field component is used to capture numeric user input.\n *\n * @example\n * ```html\n * <wc-number-field label=\"Age\" placeholder=\"Enter your age\"></wc-number-field>\n * ```\n */\n@IndividualComponent\nexport class NumberField extends BaseInput {\n static styles = [styles];\n\n #id: string = crypto.randomUUID();\n\n @property({ type: Number })\n value?: number;\n\n @property({ type: String })\n placeholder = '';\n\n @property({ type: String })\n label = '';\n\n @property({ type: Boolean, reflect: true })\n inline = false;\n\n @property({ type: String, reflect: true })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n @property({ type: Number })\n max?: number;\n\n @property({ type: Number })\n min?: number;\n\n @property({ type: Number })\n step?: number;\n\n @property({ type: String })\n autocomplete: 'on' | 'off' = 'off';\n\n @property({ type: Object })\n configAria: Record<string, string> = {};\n\n /**\n * Helper text to display below the input.\n */\n @property({ type: String, attribute: 'helper-text' })\n helperText: string = '';\n\n @property({ type: Boolean })\n error: boolean = false;\n\n @property({ type: String, attribute: 'error-text' })\n errorText: string = '';\n\n @property({ type: Boolean })\n warning: boolean = false;\n\n @property({ type: String, attribute: 'warning-text' })\n warningText: string = '';\n\n @property({ type: Boolean })\n stepper: boolean = false;\n\n @state()\n private focused = false;\n\n /**\n * Returns true when the text field has been interacted with. Native\n * validation errors only display in response to user interactions.\n */\n @state() private dirty = false;\n\n @query('.input-element')\n private inputElement?: HTMLInputElement;\n\n private tabindex?: string;\n\n connectedCallback() {\n super.connectedCallback();\n this.handleInitialAttributes();\n }\n\n private handleInitialAttributes() {\n if (this.hasAttribute('tabindex')) {\n this.tabindex = this.getAttribute('tabindex') || undefined;\n this.removeAttribute('tabindex');\n }\n\n Array.from(this.attributes).forEach(attr => {\n if (attr.name.startsWith('aria-')) {\n this.configAria[attr.name] = attr.value;\n this.removeAttribute(attr.name);\n }\n });\n }\n\n private __handleInput(event: InputEvent) {\n this.dirty = true;\n this.value = Number((event.target as HTMLInputElement).value);\n }\n\n override focus() {\n this.inputElement?.focus();\n }\n\n override blur() {\n this.inputElement?.blur();\n }\n\n private __handleFocusChange() {\n // When calling focus() or reportValidity() during change, it's possible\n // for blur to be called after the new focus event. Rather than set\n // `this.focused` to true/false on focus/blur, we always set it to whether\n // or not the input itself is focused.\n this.focused = this.inputElement?.matches(':focus') ?? false;\n }\n\n private __redispatchEvent(event: Event) {\n redispatchEvent(this, event);\n }\n\n private stepUp() {\n this.inputElement?.stepUp();\n }\n\n private stepDown() {\n this.inputElement?.stepDown();\n }\n\n render() {\n const classes = {\n 'input-wrapper': true,\n stepper: this.stepper,\n };\n\n return html`\n <wc-field\n ?required=${this.required}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?skeleton=${this.skeleton}\n helper-text=${this.helperText}\n ?error=${this.error}\n error-text=${this.errorText}\n ?warning=${this.warning}\n warning-text=${this.warningText}\n label=${this.label}\n ?focused=${this.focused}\n .host=${this}\n class=${classMap(classes)}\n >\n ${this.stepper && !this.disabled\n ? html`<wc-icon-button\n class=\"stepper\"\n variant=\"text\"\n slot=\"field-start\"\n @click=${this.stepDown}\n >\n <wc-icon name=\"remove\"></wc-icon>\n </wc-icon-button>`\n : nothing}\n\n <slot name=\"start\" slot=\"field-start\"></slot>\n\n <input\n class=\"input input-element\"\n name=${this.name}\n type=\"number\"\n placeholder=${this.placeholder}\n autocomplete=${this.autocomplete}\n .value=${this.value}\n ?tabindex=${this.tabindex}\n ?readonly=${this.readonly}\n ?required=${this.required}\n ?disabled=${this.disabled}\n min=${this.min}\n max=${this.max}\n step=${this.step}\n @input=${this.__handleInput}\n @change=${this.__redispatchEvent}\n @focus=${this.__handleFocusChange}\n @blur=${this.__handleFocusChange}\n ${spread(this.configAria)}\n />\n\n <slot name=\"end\" slot=\"field-end\"></slot>\n\n ${this.stepper && !this.disabled\n ? html`<wc-icon-button\n class=\"stepper\"\n variant=\"text\"\n slot=\"field-end\"\n @click=${this.stepUp}\n >\n <wc-icon name=\"add\"></wc-icon>\n </wc-icon-button>`\n : nothing}\n </wc-field>\n `;\n }\n}\n"],"names":["html","classMap","nothing","styles","property","state","query"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA;;;;;;;;;;;AAWG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,SAAS,CAAA;AAAnC,IAAA,WAAA,GAAA;;AAGL,QAAA,eAAA,CAAA,GAAA,CAAA,IAAA,EAAc,MAAM,CAAC,UAAU,EAAE,CAAA;QAMjC,IAAA,CAAA,WAAW,GAAG,EAAE;QAGhB,IAAA,CAAA,KAAK,GAAG,EAAE;QAGV,IAAA,CAAA,MAAM,GAAG,KAAK;QAGd,IAAA,CAAA,IAAI,GAAuB,IAAI;QAY/B,IAAA,CAAA,YAAY,GAAiB,KAAK;QAGlC,IAAA,CAAA,UAAU,GAA2B,EAAE;AAEvC;;AAEG;QAEH,IAAA,CAAA,UAAU,GAAW,EAAE;QAGvB,IAAA,CAAA,KAAK,GAAY,KAAK;QAGtB,IAAA,CAAA,SAA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