@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,48 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* @label Navigation Drawer Item
|
|
4
|
+
* @tag wc-navigation-drawer-item
|
|
5
|
+
* @rawTag navigation-drawer-item
|
|
6
|
+
*
|
|
7
|
+
* @summary A destination in a navigation drawer.
|
|
8
|
+
* @overview
|
|
9
|
+
* <p>A full-width row with an optional icon, a label and an optional badge. The active item gets
|
|
10
|
+
* the pill-shaped active indicator. With <code>href</code> it renders a link, otherwise a button.</p>
|
|
11
|
+
*
|
|
12
|
+
* @slot - The label.
|
|
13
|
+
* @slot icon - Leading icon.
|
|
14
|
+
* @slot badge - Trailing content, such as a count. Overrides the `badge` attribute.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```html
|
|
18
|
+
* <wc-navigation-drawer-item active badge="24">
|
|
19
|
+
* <wc-icon slot="icon" name="inbox"></wc-icon>
|
|
20
|
+
* Inbox
|
|
21
|
+
* </wc-navigation-drawer-item>
|
|
22
|
+
* ```
|
|
23
|
+
* @tags navigation
|
|
24
|
+
*/
|
|
25
|
+
export declare class NavigationDrawerItem extends LitElement {
|
|
26
|
+
static shadowRootOptions: ShadowRootInit;
|
|
27
|
+
static styles: import("lit").CSSResultGroup[];
|
|
28
|
+
/** Whether this item is the current destination. */
|
|
29
|
+
active: boolean;
|
|
30
|
+
/** Whether this item is disabled. */
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
/** If provided, the item renders as a link. */
|
|
33
|
+
href?: string;
|
|
34
|
+
/** Link target. */
|
|
35
|
+
target: string;
|
|
36
|
+
/** Identifies the item in the drawer's `change` event. */
|
|
37
|
+
value?: string;
|
|
38
|
+
/** Short trailing text, such as an unread count. */
|
|
39
|
+
badge?: string;
|
|
40
|
+
/** True when the `icon` slot has content. */
|
|
41
|
+
private hasIcon;
|
|
42
|
+
readonly itemElement: HTMLElement | null;
|
|
43
|
+
focus(): void;
|
|
44
|
+
blur(): void;
|
|
45
|
+
private handleIconSlotChange;
|
|
46
|
+
private renderContent;
|
|
47
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import { NavigationDrawerItem } from './navigation-drawer-item.js';
|
|
3
|
+
/**
|
|
4
|
+
* @label Navigation Drawer
|
|
5
|
+
* @tag wc-navigation-drawer
|
|
6
|
+
* @rawTag navigation-drawer
|
|
7
|
+
*
|
|
8
|
+
* @summary A side panel listing an app's destinations.
|
|
9
|
+
* @overview
|
|
10
|
+
* <p>Navigation drawer holds <code>wc-navigation-drawer-item</code> destinations. Clicking an item makes
|
|
11
|
+
* it the active one and fires <code>change</code>.</p>
|
|
12
|
+
* <ul>
|
|
13
|
+
* <li><code>variant="standard"</code> (default) sits in the page layout, next to the content.</li>
|
|
14
|
+
* <li><code>variant="modal"</code> opens over the page with a scrim. It traps focus, closes on Escape,
|
|
15
|
+
* on a scrim click and after an item is chosen.</li>
|
|
16
|
+
* </ul>
|
|
17
|
+
* <p>Both variants show only while <code>open</code> is set.</p>
|
|
18
|
+
*
|
|
19
|
+
* @slot - The drawer items. Other content, such as `wc-divider` or section titles, works too.
|
|
20
|
+
* @slot header - Content above the items, after the headline.
|
|
21
|
+
*
|
|
22
|
+
* @fires {CustomEvent<{value: string | undefined, index: number, item: NavigationDrawerItem}>} change - Dispatched when the user activates an item.
|
|
23
|
+
* @fires {CustomEvent} open - Dispatched when the drawer opens.
|
|
24
|
+
* @fires {CustomEvent} close - Dispatched when the drawer closes.
|
|
25
|
+
*
|
|
26
|
+
* @cssprop --navigation-drawer-width - Width of the drawer. Defaults to 22.5rem (360dp).
|
|
27
|
+
* @cssprop --navigation-drawer-container-color - Background of the drawer. Defaults to `--color-surface-container-low`.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```html
|
|
31
|
+
* <wc-navigation-drawer open headline="Mail">
|
|
32
|
+
* <wc-navigation-drawer-item active badge="24">
|
|
33
|
+
* <wc-icon slot="icon" name="inbox"></wc-icon>
|
|
34
|
+
* Inbox
|
|
35
|
+
* </wc-navigation-drawer-item>
|
|
36
|
+
* <wc-navigation-drawer-item>
|
|
37
|
+
* <wc-icon slot="icon" name="send"></wc-icon>
|
|
38
|
+
* Sent
|
|
39
|
+
* </wc-navigation-drawer-item>
|
|
40
|
+
* </wc-navigation-drawer>
|
|
41
|
+
* ```
|
|
42
|
+
* @tags navigation
|
|
43
|
+
*/
|
|
44
|
+
export declare class NavigationDrawer extends LitElement {
|
|
45
|
+
static styles: import("lit").CSSResultGroup[];
|
|
46
|
+
static Item: typeof NavigationDrawerItem;
|
|
47
|
+
/** Whether the drawer is shown. */
|
|
48
|
+
open: boolean;
|
|
49
|
+
/** `"standard"` sits in the layout; `"modal"` opens over the page with a scrim. */
|
|
50
|
+
variant: 'standard' | 'modal';
|
|
51
|
+
/** Title shown at the top of the drawer. */
|
|
52
|
+
headline: string;
|
|
53
|
+
private dialogElement?;
|
|
54
|
+
connectedCallback(): void;
|
|
55
|
+
disconnectedCallback(): void;
|
|
56
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
57
|
+
/** Opens the drawer. */
|
|
58
|
+
show(): void;
|
|
59
|
+
/** Closes the drawer. */
|
|
60
|
+
close(): void;
|
|
61
|
+
private getItems;
|
|
62
|
+
private syncDialog;
|
|
63
|
+
private handleItemClick;
|
|
64
|
+
/** Escape: close through `open` so the property stays the source of truth. */
|
|
65
|
+
private handleCancel;
|
|
66
|
+
/** A click that lands on the dialog itself, not its content, is a scrim click. */
|
|
67
|
+
private handleDialogClick;
|
|
68
|
+
private renderContent;
|
|
69
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
70
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* @label Radio Group
|
|
4
|
+
* @tag wc-radio-group
|
|
5
|
+
* @rawTag radio-group
|
|
6
|
+
* @summary Groups radios under one label, one name and one value.
|
|
7
|
+
* @overview
|
|
8
|
+
* <p>Radio group gives its <code>wc-radio</code> children a shared <code>name</code> (its own, or a
|
|
9
|
+
* generated one), so only one can be checked. Its <code>value</code> is the value of the checked radio,
|
|
10
|
+
* and setting it checks the matching radio.</p>
|
|
11
|
+
* <p>The radios stay form-associated, so the group submits once, through the checked radio.</p>
|
|
12
|
+
*
|
|
13
|
+
* @fires {CustomEvent<{value: string}>} change - Dispatched when the user checks a different radio. The group swallows the radios' own `change` events.
|
|
14
|
+
*
|
|
15
|
+
* @cssprop --radio-group-gap - Space between radios. Defaults to `--spacing-100`.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```html
|
|
19
|
+
* <wc-radio-group label="Size" name="size" value="md">
|
|
20
|
+
* <wc-radio value="sm" label="Small"></wc-radio>
|
|
21
|
+
* <wc-radio value="md" label="Medium"></wc-radio>
|
|
22
|
+
* <wc-radio value="lg" label="Large"></wc-radio>
|
|
23
|
+
* </wc-radio-group>
|
|
24
|
+
* ```
|
|
25
|
+
* @tags input, form
|
|
26
|
+
*/
|
|
27
|
+
export declare class RadioGroup extends LitElement {
|
|
28
|
+
static styles: import("lit").CSSResultGroup[];
|
|
29
|
+
/** Name given to every radio in the group, and submitted with forms. Generated when empty. */
|
|
30
|
+
name: string;
|
|
31
|
+
/** Value of the checked radio. Setting it checks the radio with that value. */
|
|
32
|
+
value: string;
|
|
33
|
+
/** Group label, shown above the radios and used as the accessible name. */
|
|
34
|
+
label: string;
|
|
35
|
+
/** Lays the radios out in a column (default) or a row. */
|
|
36
|
+
orientation: 'vertical' | 'horizontal';
|
|
37
|
+
/** Disables every radio in the group. */
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
/** Marks the group as required. */
|
|
40
|
+
required: boolean;
|
|
41
|
+
private readonly generatedName;
|
|
42
|
+
connectedCallback(): void;
|
|
43
|
+
disconnectedCallback(): void;
|
|
44
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
45
|
+
private getRadios;
|
|
46
|
+
/** Pushes the group's name, value and disabled state down to its radios. */
|
|
47
|
+
private syncRadios;
|
|
48
|
+
private handleRadioChange;
|
|
49
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
50
|
+
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
|
|
2
|
+
import { type FormRestoreState, type FormValue, getFormState, getFormValue } from '@/__internal/mixins/form-associated.js';
|
|
3
|
+
declare const Radio_base: import("../__internal/mixins/mixin.js").MixinReturn<(abstract new (...args: any[]) => import("@/__internal/mixins/element-internals.js").WithElementInternals) & typeof LitElement & import("@/__internal/mixins/form-associated.js").FormAssociatedConstructor, import("@/__internal/mixins/form-associated.js").FormAssociated>;
|
|
4
|
+
export declare class Radio extends Radio_base {
|
|
3
5
|
private static readonly DIRECTION_NEXT;
|
|
4
6
|
private static readonly DIRECTION_PREVIOUS;
|
|
5
7
|
static styles: import("lit").CSSResultGroup[];
|
|
6
|
-
/**
|
|
7
|
-
* The input field name for grouping radios.
|
|
8
|
-
*/
|
|
9
|
-
name: string;
|
|
10
8
|
/**
|
|
11
9
|
* The submitted value when this radio is selected.
|
|
12
10
|
*/
|
|
@@ -27,10 +25,6 @@ export declare class Radio extends LitElement {
|
|
|
27
25
|
* If true, the radio is readonly. Defaults to `false`.
|
|
28
26
|
*/
|
|
29
27
|
readonly: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* If true, the user cannot interact with the radio. Defaults to `false`.
|
|
32
|
-
*/
|
|
33
|
-
disabled: boolean;
|
|
34
28
|
/**
|
|
35
29
|
* Configuration object for aria attributes.
|
|
36
30
|
*/
|
|
@@ -44,13 +38,26 @@ export declare class Radio extends LitElement {
|
|
|
44
38
|
/** True for the one radio in the group that should receive tab focus (roving tabindex). */
|
|
45
39
|
private isGroupFocusTarget;
|
|
46
40
|
private containerElement?;
|
|
47
|
-
private nativeElement?;
|
|
48
41
|
/** Captured `tabindex` attribute value forwarded to the inner container. */
|
|
49
42
|
private tabindex?;
|
|
43
|
+
/** `checked` when first connected; `form.reset()` returns to it. */
|
|
44
|
+
private defaultChecked?;
|
|
50
45
|
connectedCallback(): void;
|
|
51
46
|
disconnectedCallback(): void;
|
|
52
47
|
firstUpdated(): void;
|
|
53
48
|
updated(changedProps: Map<string, unknown>): void;
|
|
49
|
+
/**
|
|
50
|
+
* Sets focus on the radio.
|
|
51
|
+
*/
|
|
52
|
+
focus(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Removes focus from the radio.
|
|
55
|
+
*/
|
|
56
|
+
blur(): void;
|
|
57
|
+
[getFormValue](): FormValue | null;
|
|
58
|
+
[getFormState](): FormValue | null;
|
|
59
|
+
formResetCallback(): void;
|
|
60
|
+
formStateRestoreCallback(state: FormRestoreState | null): void;
|
|
54
61
|
private handleInitialAttributes;
|
|
55
62
|
private windowMouseUp;
|
|
56
63
|
private windowKeyUp;
|
|
@@ -66,13 +73,6 @@ export declare class Radio extends LitElement {
|
|
|
66
73
|
private isRadioEnabled;
|
|
67
74
|
private updateGroupFocusTarget;
|
|
68
75
|
private navigateGroup;
|
|
69
|
-
/**
|
|
70
|
-
* Sets focus on the radio.
|
|
71
|
-
*/
|
|
72
|
-
focus(): void;
|
|
73
|
-
/**
|
|
74
|
-
* Removes focus from the radio.
|
|
75
|
-
*/
|
|
76
|
-
blur(): void;
|
|
77
76
|
render(): import("lit-html").TemplateResult<1>;
|
|
78
77
|
}
|
|
78
|
+
export {};
|
|
@@ -40,6 +40,11 @@ export declare class SegmentedButtonGroup extends LitElement {
|
|
|
40
40
|
nullable: boolean;
|
|
41
41
|
connectedCallback(): void;
|
|
42
42
|
disconnectedCallback(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Swallows a segment's own `change` on the way down (capture phase), so listeners on the group
|
|
45
|
+
* and above see only the group's `change`, one per selection.
|
|
46
|
+
*/
|
|
47
|
+
private _stopSegmentChange;
|
|
43
48
|
private _getSegments;
|
|
44
49
|
private _onSegmentChange;
|
|
45
50
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -14,7 +14,8 @@ import { LitElement } from 'lit';
|
|
|
14
14
|
* @cssprop --segmented-button-outline-color: Outline / border color.
|
|
15
15
|
* @cssprop --segmented-button-disabled-opacity: Opacity when the segment is disabled.
|
|
16
16
|
*
|
|
17
|
-
* @fires {CustomEvent}
|
|
17
|
+
* @fires {CustomEvent} change - Dispatched when the segment is activated. Detail: `{ value, selected, originalEvent }`, where `selected` is the requested state. Inside a `wc-segmented-button-group` the group swallows it and fires its own `change` instead.
|
|
18
|
+
* @fires {CustomEvent} segmented-button--change - Deprecated alias of `change`, fired alongside it.
|
|
18
19
|
*
|
|
19
20
|
* @example
|
|
20
21
|
* ```html
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type FormValue, getFormValue } from '@/__internal/mixins/form-associated.js';
|
|
1
2
|
import BaseInput from '../input/BaseInput.js';
|
|
2
3
|
export interface SelectOption {
|
|
3
4
|
label: string;
|
|
@@ -17,6 +18,10 @@ export interface SelectOption {
|
|
|
17
18
|
* - Client-side typeahead with `search="contains"`
|
|
18
19
|
* - Server-side typeahead with `search="managed"`
|
|
19
20
|
* - Multi-select chips display
|
|
21
|
+
* - Form-associated: submits the value under `name` (one entry per value with `multiple`)
|
|
22
|
+
*
|
|
23
|
+
* @fires {CustomEvent<{value: string}>} change - Dispatched when the selection changes.
|
|
24
|
+
* @fires {CustomEvent<{value: string}>} select-search - Dispatched as the user types when `search="managed"`.
|
|
20
25
|
*
|
|
21
26
|
* @example
|
|
22
27
|
* ```html
|
|
@@ -80,6 +85,7 @@ export declare class Select extends BaseInput {
|
|
|
80
85
|
private _searchInputEl?;
|
|
81
86
|
focus(): void;
|
|
82
87
|
blur(): void;
|
|
88
|
+
[getFormValue](): FormValue | null;
|
|
83
89
|
protected updated(changedProperties: Map<string, unknown>): void;
|
|
84
90
|
/**
|
|
85
91
|
* Reconciles the `options` property with auto-generated `<wc-option>` light-DOM
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
import { type FormRestoreState, type FormValue, getFormValue } from '@/__internal/mixins/form-associated.js';
|
|
3
|
+
declare const Slider_base: import("../__internal/mixins/mixin.js").MixinReturn<(abstract new (...args: any[]) => import("@/__internal/mixins/element-internals.js").WithElementInternals) & typeof LitElement & import("@/__internal/mixins/form-associated.js").FormAssociatedConstructor, import("@/__internal/mixins/form-associated.js").FormAssociated>;
|
|
2
4
|
/**
|
|
3
5
|
* @label Slider
|
|
4
6
|
* @tag wc-slider
|
|
5
7
|
* @rawTag slider
|
|
6
8
|
*
|
|
7
9
|
* @summary Sliders allow users to make selections from a range of values.
|
|
10
|
+
* @overview
|
|
11
|
+
* <p>The slider is form-associated: its <code>value</code> is submitted under its <code>name</code>,
|
|
12
|
+
* and <code>form.reset()</code> restores the starting value.</p>
|
|
8
13
|
*
|
|
9
14
|
* @fires {CustomEvent} input - Dispatched when the slider value changes during interaction.
|
|
10
15
|
* @fires {CustomEvent} change - Dispatched when the slider interaction ends.
|
|
@@ -13,8 +18,9 @@ import { LitElement } from 'lit';
|
|
|
13
18
|
* ```html
|
|
14
19
|
* <wc-slider min="0" max="100" value="50"></wc-slider>
|
|
15
20
|
* ```
|
|
21
|
+
* @tags input, form
|
|
16
22
|
*/
|
|
17
|
-
export declare class Slider extends
|
|
23
|
+
export declare class Slider extends Slider_base {
|
|
18
24
|
static styles: import("lit").CSSResultGroup[];
|
|
19
25
|
/**
|
|
20
26
|
* The minimum value of the slider.
|
|
@@ -32,10 +38,6 @@ export declare class Slider extends LitElement {
|
|
|
32
38
|
* The step increment for the slider.
|
|
33
39
|
*/
|
|
34
40
|
step: number;
|
|
35
|
-
/**
|
|
36
|
-
* Whether the slider is disabled.
|
|
37
|
-
*/
|
|
38
|
-
disabled: boolean;
|
|
39
41
|
/**
|
|
40
42
|
* Whether to show labels on the slider.
|
|
41
43
|
*/
|
|
@@ -48,6 +50,12 @@ export declare class Slider extends LitElement {
|
|
|
48
50
|
private isDragging;
|
|
49
51
|
private container;
|
|
50
52
|
private thumbElement;
|
|
53
|
+
/** `value` when first connected; `form.reset()` returns to it. */
|
|
54
|
+
private defaultValue?;
|
|
55
|
+
connectedCallback(): void;
|
|
56
|
+
[getFormValue](): FormValue | null;
|
|
57
|
+
formResetCallback(): void;
|
|
58
|
+
formStateRestoreCallback(state: FormRestoreState | null): void;
|
|
51
59
|
private handleInput;
|
|
52
60
|
private onMouseDown;
|
|
53
61
|
private onMouseMove;
|
|
@@ -55,3 +63,4 @@ export declare class Slider extends LitElement {
|
|
|
55
63
|
private handleKeyDown;
|
|
56
64
|
render(): import("lit-html").TemplateResult<1>;
|
|
57
65
|
}
|
|
66
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { nothing } from 'lit';
|
|
2
|
+
import { type FormRestoreState, type FormValue, getFormState, getFormValue } from '@/__internal/mixins/form-associated.js';
|
|
2
3
|
import BaseInput from '../input/BaseInput.js';
|
|
3
4
|
/**
|
|
4
5
|
* @label Switch
|
|
@@ -8,6 +9,7 @@ import BaseInput from '../input/BaseInput.js';
|
|
|
8
9
|
* @summary Captures boolean input with an on/off switch interaction.
|
|
9
10
|
* @overview
|
|
10
11
|
* <p>Toggles are used to enable or disable a single option. They provide immediate feedback about whether an option is active or inactive.</p>
|
|
12
|
+
* <p>The switch is form-associated: when <code>checked</code>, it submits <code>on</code> under its <code>name</code>.</p>
|
|
11
13
|
*
|
|
12
14
|
* @cssprop --switch-track-color: Color of the switch track when checked.
|
|
13
15
|
* @cssprop --switch-track-off-color: Color of the switch track when unchecked.
|
|
@@ -16,23 +18,27 @@ import BaseInput from '../input/BaseInput.js';
|
|
|
16
18
|
* @cssprop --switch-handle-radius: Size of the switch handle.
|
|
17
19
|
* @cssprop --switch-handle-color: Color of the switch handle.
|
|
18
20
|
*
|
|
19
|
-
* @fires {CustomEvent} change - Dispatched when the switch value
|
|
21
|
+
* @fires {CustomEvent} change - Dispatched when the switch is toggled. Detail: `{ checked, value, originalEvent }`.
|
|
20
22
|
* @fires {CustomEvent} blur - Dispatched when the switch loses focus.
|
|
21
23
|
* @fires {CustomEvent} focus - Dispatched when the switch receives focus.
|
|
22
24
|
*
|
|
23
25
|
* @example
|
|
24
26
|
* ```html
|
|
25
|
-
* <wc-switch
|
|
27
|
+
* <wc-switch checked label="Wi-Fi"></wc-switch>
|
|
26
28
|
* ```
|
|
27
29
|
* @tags input, form
|
|
28
30
|
*/
|
|
29
31
|
export declare class Switch extends BaseInput {
|
|
30
32
|
static styles: import("lit").CSSResultGroup[];
|
|
31
|
-
value: boolean;
|
|
32
33
|
/**
|
|
33
|
-
*
|
|
34
|
+
* Whether the switch is on.
|
|
34
35
|
*/
|
|
35
|
-
|
|
36
|
+
checked: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Use `checked`. Kept as an alias of `checked`.
|
|
39
|
+
*/
|
|
40
|
+
get value(): boolean;
|
|
41
|
+
set value(value: boolean);
|
|
36
42
|
/**
|
|
37
43
|
* The switch label.
|
|
38
44
|
*/
|
|
@@ -41,18 +47,6 @@ export declare class Switch extends BaseInput {
|
|
|
41
47
|
* If true, the toggle has rounded corners. Defaults to `true`.
|
|
42
48
|
*/
|
|
43
49
|
rounded: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* If true, required icon is shown. Defaults to `false`.
|
|
46
|
-
*/
|
|
47
|
-
required: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* If true, the toggle is readonly. Defaults to `false`.
|
|
50
|
-
*/
|
|
51
|
-
readonly: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* If true, the user cannot interact with the toggle. Defaults to `false`.
|
|
54
|
-
*/
|
|
55
|
-
disabled: boolean;
|
|
56
50
|
withIcon: boolean;
|
|
57
51
|
/**
|
|
58
52
|
* Configuration object for aria attributes.
|
|
@@ -62,11 +56,21 @@ export declare class Switch extends BaseInput {
|
|
|
62
56
|
private isActive;
|
|
63
57
|
private slotHasContent;
|
|
64
58
|
private trackElement?;
|
|
65
|
-
private nativeElement?;
|
|
66
59
|
private tabindex?;
|
|
67
60
|
connectedCallback(): void;
|
|
68
61
|
disconnectedCallback(): void;
|
|
69
62
|
firstUpdated(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Sets focus on the toggle.
|
|
65
|
+
*/
|
|
66
|
+
focus(): void;
|
|
67
|
+
/**
|
|
68
|
+
* Removes focus from the toggle.
|
|
69
|
+
*/
|
|
70
|
+
blur(): void;
|
|
71
|
+
[getFormValue](): FormValue | null;
|
|
72
|
+
[getFormState](): FormValue | null;
|
|
73
|
+
formStateRestoreCallback(state: FormRestoreState | null): void;
|
|
70
74
|
private handleInitialAttributes;
|
|
71
75
|
private windowMouseUp;
|
|
72
76
|
private windowKeyUp;
|
|
@@ -76,14 +80,6 @@ export declare class Switch extends BaseInput {
|
|
|
76
80
|
private blurHandler;
|
|
77
81
|
private focusHandler;
|
|
78
82
|
private handleKeyUp;
|
|
79
|
-
/**
|
|
80
|
-
* Sets focus on the toggle.
|
|
81
|
-
*/
|
|
82
|
-
focus(): void;
|
|
83
|
-
/**
|
|
84
|
-
* Removes focus from the toggle.
|
|
85
|
-
*/
|
|
86
|
-
blur(): void;
|
|
87
83
|
__renderIcon(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
88
84
|
render(): import("lit-html").TemplateResult<1>;
|
|
89
85
|
}
|
package/dist/src/tabs/tabs.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ import { Tab } from './tab.js';
|
|
|
9
9
|
* @overview
|
|
10
10
|
* <p>Tabs holds the tab buttons and manages their layout.</p>
|
|
11
11
|
*
|
|
12
|
+
* @fires {CustomEvent<{index: number, value: string}>} change - Dispatched when the user activates a tab.
|
|
13
|
+
* @fires {CustomEvent<{index: number, value: string}>} tab-click - Deprecated alias of `change`, fired alongside it.
|
|
14
|
+
*
|
|
12
15
|
* @example
|
|
13
16
|
* ```html
|
|
14
17
|
* <wc-tabs>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
import { type LegacySize, type Size } from '@/__internal/utils/size.js';
|
|
2
3
|
/**
|
|
3
4
|
* @label Toolbar
|
|
4
5
|
* @tag wc-toolbar
|
|
@@ -71,11 +72,13 @@ export declare class Toolbar extends LitElement {
|
|
|
71
72
|
orientation: 'horizontal' | 'vertical';
|
|
72
73
|
/**
|
|
73
74
|
* Size of the docked toolbar.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
* - `"sm"`: 80dp height (default).
|
|
76
|
+
* - `"md"`: 96dp height.
|
|
77
|
+
* - `"lg"`: 112dp height.
|
|
78
|
+
*
|
|
79
|
+
* The long names `"small"`, `"medium"` and `"large"` still work but are deprecated.
|
|
77
80
|
*/
|
|
78
|
-
size:
|
|
81
|
+
size: Size | LegacySize;
|
|
79
82
|
/**
|
|
80
83
|
* Whether the toolbar is visually elevated (adds a shadow).
|
|
81
84
|
*/
|
package/dist/svg.js
CHANGED
|
@@ -62,7 +62,7 @@ var css_248z = i`* {
|
|
|
62
62
|
position: fixed;
|
|
63
63
|
inset: 0;
|
|
64
64
|
z-index: 9999;
|
|
65
|
-
background:
|
|
65
|
+
background: color-mix(in srgb, var(--color-scrim) 85%, transparent);
|
|
66
66
|
align-items: center;
|
|
67
67
|
justify-content: center;
|
|
68
68
|
cursor: zoom-out;
|
|
@@ -78,14 +78,14 @@ var css_248z = i`* {
|
|
|
78
78
|
right: 1rem;
|
|
79
79
|
background: transparent;
|
|
80
80
|
border: none;
|
|
81
|
-
color:
|
|
81
|
+
color: var(--color-white);
|
|
82
82
|
font-size: 1.5rem;
|
|
83
83
|
cursor: pointer;
|
|
84
84
|
line-height: 1;
|
|
85
85
|
padding: 0.25rem 0.5rem;
|
|
86
86
|
}
|
|
87
87
|
.preview-close:focus-visible {
|
|
88
|
-
outline: 2px solid
|
|
88
|
+
outline: 2px solid var(--color-white);
|
|
89
89
|
outline-offset: 2px;
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -100,8 +100,8 @@ var css_248z = i`* {
|
|
|
100
100
|
.preview-content svg {
|
|
101
101
|
max-width: 90vw;
|
|
102
102
|
max-height: 90vh;
|
|
103
|
-
box-shadow: 0 8px 40px
|
|
104
|
-
border-radius:
|
|
103
|
+
box-shadow: 0 8px 40px color-mix(in srgb, var(--color-shadow) 60%, transparent);
|
|
104
|
+
border-radius: var(--shape-corner-extra-small);
|
|
105
105
|
}`;
|
|
106
106
|
|
|
107
107
|
/**
|