@redvars/peacock 3.5.0 → 3.6.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/BaseButton-BNFAYn-S.js +219 -0
- package/dist/BaseButton-BNFAYn-S.js.map +1 -0
- package/dist/BaseHyperlinkMixin-BNuwbiEf.js +65 -0
- package/dist/BaseHyperlinkMixin-BNuwbiEf.js.map +1 -0
- package/dist/BaseInput-14YmcfK7.js +27 -0
- package/dist/BaseInput-14YmcfK7.js.map +1 -0
- package/dist/assets/components.css +1 -1
- package/dist/assets/components.css.map +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles.css.map +1 -1
- package/dist/banner.js +14 -30
- package/dist/banner.js.map +1 -1
- package/dist/{button-DMN1dPAg.js → button-colors-Ccys3hvS.js} +5 -468
- package/dist/button-colors-Ccys3hvS.js.map +1 -0
- package/dist/button-group.js +228 -8
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +294 -8
- package/dist/button.js.map +1 -1
- package/dist/calendar-column-view.js +634 -0
- package/dist/calendar-column-view.js.map +1 -0
- package/dist/calendar-event-BrQ_SEKD.js +199 -0
- package/dist/calendar-event-BrQ_SEKD.js.map +1 -0
- package/dist/calendar-month-view.js +376 -0
- package/dist/calendar-month-view.js.map +1 -0
- package/dist/calendar.js +339 -0
- package/dist/calendar.js.map +1 -0
- package/dist/canvas.js +361 -0
- package/dist/canvas.js.map +1 -0
- package/dist/card.js +18 -73
- package/dist/card.js.map +1 -1
- package/dist/cb-compound-expression.js +125 -0
- package/dist/cb-compound-expression.js.map +1 -0
- package/dist/cb-divider.js +150 -0
- package/dist/cb-divider.js.map +1 -0
- package/dist/cb-expression.js +75 -0
- package/dist/cb-expression.js.map +1 -0
- package/dist/cb-predicate.js +137 -0
- package/dist/cb-predicate.js.map +1 -0
- package/dist/chart-bar.js.map +1 -1
- package/dist/chart-doughnut.js +2 -2
- package/dist/chart-doughnut.js.map +1 -1
- package/dist/chart-pie.js +2 -2
- package/dist/chart-pie.js.map +1 -1
- package/dist/chart-stacked-bar.js.map +1 -1
- package/dist/code-editor.js +2 -1
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +2 -1
- package/dist/code-highlighter.js.map +1 -1
- package/dist/condition-builder.js +58 -0
- package/dist/condition-builder.js.map +1 -0
- package/dist/custom-elements-jsdocs.json +10860 -5567
- package/dist/custom-elements.json +16180 -7996
- package/dist/dropdown-button.js +216 -0
- package/dist/dropdown-button.js.map +1 -0
- package/dist/event-manager-D-QCmUgR.js +113 -0
- package/dist/event-manager-D-QCmUgR.js.map +1 -0
- package/dist/fab.js +421 -9
- package/dist/fab.js.map +1 -1
- package/dist/flow-designer-dZnLJOQT.js +1656 -0
- package/dist/flow-designer-dZnLJOQT.js.map +1 -0
- package/dist/flow-designer-node-XMe-jlKg.js +548 -0
- package/dist/flow-designer-node-XMe-jlKg.js.map +1 -0
- package/dist/flow-designer-node.js +4 -0
- package/dist/flow-designer-node.js.map +1 -0
- package/dist/flow-designer.js +16 -0
- package/dist/flow-designer.js.map +1 -0
- package/dist/html-editor.js +358 -0
- package/dist/html-editor.js.map +1 -0
- package/dist/icon-button-CK1ZuE-2.js +247 -0
- package/dist/icon-button-CK1ZuE-2.js.map +1 -0
- package/dist/index.js +31 -8
- package/dist/index.js.map +1 -1
- package/dist/{is-dark-mode-DicqGkCJ.js → is-dark-mode-DOcaw4Yq.js} +2 -27
- package/dist/is-dark-mode-DOcaw4Yq.js.map +1 -0
- package/dist/modal.js +418 -0
- package/dist/modal.js.map +1 -0
- package/dist/{select-4pl4XBj7.js → navigation-rail-DyO0oAZU.js} +2000 -2767
- package/dist/navigation-rail-DyO0oAZU.js.map +1 -0
- package/dist/notification-manager.js +268 -0
- package/dist/notification-manager.js.map +1 -0
- package/dist/notification.js +3 -2
- package/dist/notification.js.map +1 -1
- package/dist/peacock-loader.js +102 -14
- package/dist/peacock-loader.js.map +1 -1
- package/dist/popover-NC7b1lTq.js +1971 -0
- package/dist/popover-NC7b1lTq.js.map +1 -0
- package/dist/popover-content.js +125 -0
- package/dist/popover-content.js.map +1 -0
- package/dist/popover.js +4 -0
- package/dist/popover.js.map +1 -0
- package/dist/search.js +4 -0
- package/dist/search.js.map +1 -1
- package/dist/split-button.js +388 -0
- package/dist/split-button.js.map +1 -0
- package/dist/src/__controllers/floating-controller.d.ts +35 -0
- package/dist/src/__mixins/BaseButtonMixin.d.ts +20 -0
- package/dist/src/__mixins/BaseHyperlinkMixin.d.ts +18 -0
- package/dist/src/__mixins/MixinConstructor.d.ts +1 -0
- package/dist/src/banner/banner.d.ts +0 -4
- package/dist/src/button/BaseButton.d.ts +4 -47
- package/dist/src/button/button/button.d.ts +32 -3
- package/dist/src/button/button-group/button-group.d.ts +2 -2
- package/dist/src/button/icon-button/icon-button.d.ts +33 -8
- package/dist/src/calendar/base-event.d.ts +10 -0
- package/dist/src/calendar/calendar-column-view.d.ts +41 -0
- package/dist/src/calendar/calendar-event.d.ts +7 -0
- package/dist/src/calendar/calendar-month-view.d.ts +31 -0
- package/dist/src/calendar/calendar.d.ts +65 -0
- package/dist/src/calendar/event-manager.d.ts +17 -0
- package/dist/src/calendar/index.d.ts +4 -0
- package/dist/src/calendar/types.d.ts +13 -0
- package/dist/src/calendar/utils.d.ts +31 -0
- package/dist/src/canvas/canvas.d.ts +92 -0
- package/dist/src/canvas/index.d.ts +2 -0
- package/dist/src/card/card.d.ts +4 -15
- package/dist/src/condition-builder/cb-compound-expression.d.ts +31 -0
- package/dist/src/condition-builder/cb-divider.d.ts +26 -0
- package/dist/src/condition-builder/cb-expression.d.ts +31 -0
- package/dist/src/condition-builder/cb-predicate.d.ts +30 -0
- package/dist/src/condition-builder/condition-builder.d.ts +27 -0
- package/dist/src/condition-builder/index.d.ts +5 -0
- package/dist/src/dropdown-button/dropdown-button.d.ts +68 -0
- package/dist/src/dropdown-button/index.d.ts +1 -0
- package/dist/src/fab/fab.d.ts +4 -35
- package/dist/src/flow-designer/commands.d.ts +66 -0
- package/dist/src/flow-designer/flow-designer-node.d.ts +46 -0
- package/dist/src/flow-designer/flow-designer.d.ts +133 -0
- package/dist/src/flow-designer/index.d.ts +7 -0
- package/dist/src/flow-designer/layout.d.ts +30 -0
- package/dist/src/flow-designer/types.d.ts +142 -0
- package/dist/src/flow-designer/validation.d.ts +43 -0
- package/dist/src/flow-designer/workflow-utils.d.ts +40 -0
- package/dist/src/focus-ring/focus-ring.d.ts +11 -5
- package/dist/src/html-editor/html-editor.d.ts +56 -0
- package/dist/src/html-editor/index.d.ts +2 -0
- package/dist/src/index.d.ts +16 -1
- package/dist/src/link/link.d.ts +1 -1
- package/dist/src/menu/menu/menu.d.ts +5 -7
- package/dist/src/menu/menu-item/menu-item.d.ts +14 -13
- package/dist/src/modal/index.d.ts +1 -0
- package/dist/src/modal/modal.d.ts +63 -0
- package/dist/src/navigation-rail/index.d.ts +2 -0
- package/dist/src/navigation-rail/navigation-rail-item.d.ts +55 -0
- package/dist/src/navigation-rail/navigation-rail.d.ts +71 -0
- package/dist/src/notification-manager/index.d.ts +1 -0
- package/dist/src/notification-manager/notification-manager.d.ts +44 -0
- package/dist/src/popover/index.d.ts +2 -0
- package/dist/src/popover/popover-content.d.ts +29 -0
- package/dist/src/popover/popover.d.ts +62 -0
- package/dist/src/sidebar-menu/index.d.ts +3 -0
- package/dist/src/sidebar-menu/sidebar-menu-item.d.ts +58 -0
- package/dist/src/sidebar-menu/sidebar-menu.d.ts +38 -0
- package/dist/src/sidebar-menu/sidebar-sub-menu.d.ts +35 -0
- package/dist/src/split-button/index.d.ts +1 -0
- package/dist/src/split-button/split-button.d.ts +72 -0
- package/dist/src/toolbar/toolbar.d.ts +10 -10
- package/dist/src/tooltip/tooltip.d.ts +5 -15
- package/dist/src/url-field/index.d.ts +1 -0
- package/dist/src/url-field/url-field.d.ts +48 -0
- package/dist/test/flow-designer.test.d.ts +1 -0
- package/dist/test/sidebar-menu.test.d.ts +1 -0
- package/dist/toolbar.js +10 -10
- package/dist/toolbar.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
- package/readme.md +73 -65
- package/scss/mixin.scss +16 -0
- package/src/__controllers/floating-controller.ts +237 -0
- package/src/__mixins/BaseButtonMixin.ts +83 -0
- package/src/__mixins/BaseHyperlinkMixin.ts +68 -0
- package/src/__mixins/MixinConstructor.ts +1 -0
- package/src/{__base_element → __mixins}/README.md +2 -2
- package/src/banner/banner.scss +20 -25
- package/src/banner/banner.ts +1 -7
- package/src/button/BaseButton.ts +11 -100
- package/src/button/button/button-sizes.scss +4 -2
- package/src/button/button/button.ts +77 -23
- package/src/button/button-group/button-group.ts +2 -2
- package/src/button/icon-button/icon-button.ts +75 -33
- package/src/calendar/base-event.ts +49 -0
- package/src/calendar/calendar-column-view.scss +326 -0
- package/src/calendar/calendar-column-view.ts +392 -0
- package/src/calendar/calendar-event.ts +20 -0
- package/src/calendar/calendar-month-view.scss +192 -0
- package/src/calendar/calendar-month-view.ts +244 -0
- package/src/calendar/calendar.scss +71 -0
- package/src/calendar/calendar.ts +298 -0
- package/src/calendar/event-manager.ts +117 -0
- package/src/calendar/index.ts +4 -0
- package/src/calendar/types.ts +14 -0
- package/src/calendar/utils.ts +180 -0
- package/src/canvas/canvas.scss +60 -0
- package/src/canvas/canvas.ts +391 -0
- package/src/canvas/index.ts +2 -0
- package/src/card/card.ts +11 -71
- package/src/chart-bar/chart-bar.ts +9 -14
- package/src/chart-bar/chart-stacked-bar.ts +12 -18
- package/src/chart-doughnut/chart-doughnut.ts +23 -27
- package/src/chart-pie/chart-pie.ts +19 -23
- package/src/checkbox/checkbox.scss +17 -34
- package/src/checkbox/checkbox.ts +3 -1
- package/src/code-highlighter/code-highlighter.scss +1 -0
- package/src/code-highlighter/code-highlighter.ts +1 -1
- package/src/condition-builder/cb-compound-expression.scss +37 -0
- package/src/condition-builder/cb-compound-expression.ts +80 -0
- package/src/condition-builder/cb-divider.scss +93 -0
- package/src/condition-builder/cb-divider.ts +56 -0
- package/src/condition-builder/cb-expression.scss +14 -0
- package/src/condition-builder/cb-expression.ts +49 -0
- package/src/condition-builder/cb-predicate.scss +35 -0
- package/src/condition-builder/cb-predicate.ts +102 -0
- package/src/condition-builder/condition-builder.scss +13 -0
- package/src/condition-builder/condition-builder.ts +38 -0
- package/src/condition-builder/index.ts +5 -0
- package/src/date-picker/date-picker.ts +1 -1
- package/src/dropdown-button/demo/index.html +110 -0
- package/src/dropdown-button/dropdown-button.scss +22 -0
- package/src/dropdown-button/dropdown-button.ts +206 -0
- package/src/dropdown-button/index.ts +1 -0
- package/src/elevation/elevation.scss +5 -5
- package/src/fab/fab.ts +29 -100
- package/src/flow-designer/DEMO.md +239 -0
- package/src/flow-designer/commands.ts +278 -0
- package/src/flow-designer/flow-designer-node.ts +172 -0
- package/src/flow-designer/flow-designer.scss +457 -0
- package/src/flow-designer/flow-designer.ts +611 -0
- package/src/flow-designer/index.ts +41 -0
- package/src/flow-designer/layout.ts +357 -0
- package/src/flow-designer/types.ts +166 -0
- package/src/flow-designer/validation.ts +284 -0
- package/src/flow-designer/workflow-utils.ts +282 -0
- package/src/focus-ring/focus-ring.ts +47 -40
- package/src/html-editor/html-editor.scss +146 -0
- package/src/html-editor/html-editor.ts +276 -0
- package/src/html-editor/index.ts +3 -0
- package/src/index.ts +28 -1
- package/src/input/input.ts +3 -1
- package/src/link/link.ts +2 -2
- package/src/menu/menu/menu.scss +2 -2
- package/src/menu/menu/menu.ts +91 -101
- package/src/menu/menu-item/menu-item.scss +4 -0
- package/src/menu/menu-item/menu-item.ts +85 -79
- package/src/modal/index.ts +1 -0
- package/src/modal/modal.scss +206 -0
- package/src/modal/modal.ts +201 -0
- package/src/navigation-rail/index.ts +2 -0
- package/src/navigation-rail/navigation-rail-item.scss +216 -0
- package/src/navigation-rail/navigation-rail-item.ts +223 -0
- package/src/navigation-rail/navigation-rail.scss +72 -0
- package/src/navigation-rail/navigation-rail.ts +149 -0
- package/src/notification/notification.ts +3 -2
- package/src/notification-manager/index.ts +1 -0
- package/src/notification-manager/notification-manager.scss +113 -0
- package/src/notification-manager/notification-manager.ts +199 -0
- package/src/number-field/number-field.ts +6 -4
- package/src/pagination/pagination.ts +6 -4
- package/src/peacock-loader.ts +93 -5
- package/src/popover/index.ts +2 -0
- package/src/popover/popover-content.scss +69 -0
- package/src/popover/popover-content.ts +51 -0
- package/src/popover/popover.scss +7 -0
- package/src/popover/popover.ts +170 -0
- package/src/search/search.ts +4 -0
- package/src/sidebar-menu/demo/index.html +68 -0
- package/src/sidebar-menu/index.ts +3 -0
- package/src/sidebar-menu/sidebar-menu-item.scss +102 -0
- package/src/sidebar-menu/sidebar-menu-item.ts +151 -0
- package/src/{tree-view/tree-view.scss → sidebar-menu/sidebar-menu.scss} +1 -1
- package/src/sidebar-menu/sidebar-menu.ts +182 -0
- package/src/sidebar-menu/sidebar-sub-menu.scss +130 -0
- package/src/sidebar-menu/sidebar-sub-menu.ts +160 -0
- package/src/skeleton/skeleton.scss +18 -24
- package/src/snackbar/snackbar.ts +1 -1
- package/src/split-button/index.ts +1 -0
- package/src/split-button/split-button-colors.scss +56 -0
- package/src/split-button/split-button-sizes.scss +28 -0
- package/src/split-button/split-button.scss +79 -0
- package/src/split-button/split-button.ts +236 -0
- package/src/table/table.ts +2 -2
- package/src/tabs/tab.ts +4 -3
- package/src/text/text.css-component.scss +7 -1
- package/src/time-picker/time-picker.ts +1 -1
- package/src/toolbar/toolbar.ts +10 -10
- package/src/tooltip/tooltip.scss +4 -3
- package/src/tooltip/tooltip.ts +64 -98
- package/src/url-field/index.ts +1 -0
- package/src/url-field/url-field.scss +50 -0
- package/src/url-field/url-field.ts +239 -0
- package/dist/button-DMN1dPAg.js.map +0 -1
- package/dist/button-group-CX9CUUXk.js +0 -435
- package/dist/button-group-CX9CUUXk.js.map +0 -1
- package/dist/fab-C5Nzxk0E.js +0 -497
- package/dist/fab-C5Nzxk0E.js.map +0 -1
- package/dist/is-dark-mode-DicqGkCJ.js.map +0 -1
- package/dist/select-4pl4XBj7.js.map +0 -1
- package/dist/spread-B5cgadZl.js +0 -32
- package/dist/spread-B5cgadZl.js.map +0 -1
- package/dist/src/__base_element/BaseHyperlink.d.ts +0 -20
- package/dist/src/menu/menu/MenuSurfaceController.d.ts +0 -18
- package/dist/src/tree-view/index.d.ts +0 -2
- package/dist/src/tree-view/tree-node.d.ts +0 -69
- package/dist/src/tree-view/tree-view.d.ts +0 -40
- package/dist/src/tree-view/wc-tree-view.d.ts +0 -6
- package/dist/test/tree-view.test.d.ts +0 -1
- package/dist/throttle-C7ZAPqtu.js +0 -24
- package/dist/throttle-C7ZAPqtu.js.map +0 -1
- package/src/__base_element/BaseHyperlink.ts +0 -42
- package/src/menu/menu/MenuSurfaceController.ts +0 -61
- package/src/tree-view/demo/index.html +0 -57
- package/src/tree-view/index.ts +0 -2
- package/src/tree-view/tree-node.scss +0 -101
- package/src/tree-view/tree-node.ts +0 -268
- package/src/tree-view/tree-view.ts +0 -182
- package/src/tree-view/wc-tree-view.ts +0 -9
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
import { a as i
|
|
2
|
-
import { n } from './property-1psGvXOq.js';
|
|
3
|
-
import { r } from './state-DwbEjqVk.js';
|
|
4
|
-
import { e as e$1 } from './class-map-YU7g0o3B.js';
|
|
5
|
-
import { o as observerSlotChangesWithCallback } from './observe-slot-change-BGJfgg2E.js';
|
|
6
|
-
import { t as throttle } from './throttle-C7ZAPqtu.js';
|
|
7
|
-
import { s as spread } from './spread-B5cgadZl.js';
|
|
8
|
-
import { e } from './query-QBcUV-L_.js';
|
|
9
|
-
import { i as isActivationClick, d as dispatchActivationClick } from './dispatch-event-utils-CuEqjlPT.js';
|
|
1
|
+
import { a as i } from './IndividualComponent-DUINtMGK.js';
|
|
10
2
|
|
|
11
|
-
var css_248z$
|
|
3
|
+
var css_248z$1 = i`* {
|
|
12
4
|
box-sizing: border-box;
|
|
13
5
|
}
|
|
14
6
|
|
|
@@ -357,7 +349,7 @@ slot::slotted(*) {
|
|
|
357
349
|
width: 100%;
|
|
358
350
|
}`;
|
|
359
351
|
|
|
360
|
-
var css_248z
|
|
352
|
+
var css_248z = i`:host([color=primary]:not([toggle])) {
|
|
361
353
|
--filled-button-container-color: var(--color-primary);
|
|
362
354
|
--filled-button-label-text-color: var(--color-on-primary);
|
|
363
355
|
--tonal-button-container-color: var(--color-primary-container);
|
|
@@ -565,460 +557,5 @@ var css_248z$1 = i`:host([color=primary]:not([toggle])) {
|
|
|
565
557
|
--neo-button-label-text-color: var(--color-on-surface);
|
|
566
558
|
}`;
|
|
567
559
|
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
--button-height: 2rem;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
:host([size=xs]) .button,
|
|
574
|
-
:host([size=extra-small]) .button {
|
|
575
|
-
--_button-icon-size: 1rem;
|
|
576
|
-
--_button_container-padding: 0.75rem;
|
|
577
|
-
font-size: 0.875rem !important;
|
|
578
|
-
font-weight: var(--font-weight-medium) !important;
|
|
579
|
-
line-height: 1.25rem !important;
|
|
580
|
-
letter-spacing: 0.1px !important;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
:host([size=sm]),
|
|
584
|
-
:host([size=small]) {
|
|
585
|
-
--button-height: 2.5rem;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
:host([size=sm]) .button,
|
|
589
|
-
:host([size=small]) .button {
|
|
590
|
-
--_button-icon-size: 1.25rem;
|
|
591
|
-
--_button_container-padding: 1rem;
|
|
592
|
-
--_button-icon-label-spacing: 0.5rem;
|
|
593
|
-
font-size: 0.875rem !important;
|
|
594
|
-
font-weight: var(--font-weight-medium) !important;
|
|
595
|
-
line-height: 1.25rem !important;
|
|
596
|
-
letter-spacing: 0.1px !important;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
:host([size=md]),
|
|
600
|
-
:host([size=medium]) {
|
|
601
|
-
--button-height: 3.5rem;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
:host([size=md]) .button,
|
|
605
|
-
:host([size=medium]) .button {
|
|
606
|
-
--_button-icon-size: 1.5rem;
|
|
607
|
-
--_button_container-padding: 1.5rem;
|
|
608
|
-
font-size: 1rem !important;
|
|
609
|
-
font-weight: var(--font-weight-medium) !important;
|
|
610
|
-
line-height: 1.5rem !important;
|
|
611
|
-
letter-spacing: 0.15px !important;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
:host([size=lg]),
|
|
615
|
-
:host([size=large]) {
|
|
616
|
-
--button-height: 6rem;
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
:host([size=lg]) .button,
|
|
620
|
-
:host([size=large]) .button {
|
|
621
|
-
--_button-icon-size: 2rem;
|
|
622
|
-
--_button_container-padding: 3rem;
|
|
623
|
-
font-size: 1.5rem !important;
|
|
624
|
-
font-weight: var(--font-weight-regular) !important;
|
|
625
|
-
line-height: 2rem !important;
|
|
626
|
-
letter-spacing: 0 !important;
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
:host([size=xl]) {
|
|
630
|
-
--button-height: 8.5rem;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
:host([size=xl]) .button {
|
|
634
|
-
--_button-icon-size: 2.5rem;
|
|
635
|
-
--_button_container-padding: 4rem;
|
|
636
|
-
font-size: 2rem !important;
|
|
637
|
-
font-weight: var(--font-weight-regular) !important;
|
|
638
|
-
line-height: 2.5rem !important;
|
|
639
|
-
letter-spacing: 0 !important;
|
|
640
|
-
}`;
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
* 3. Apply the type annotation to the variable.
|
|
644
|
-
*/
|
|
645
|
-
const BaseHyperlink = (superclass) => {
|
|
646
|
-
// Naming the class (BaseHyperlinkElement) instead of using 'Mixin' or anonymous
|
|
647
|
-
// prevents the "__childPart" visibility error.
|
|
648
|
-
class BaseHyperlinkElement extends superclass {
|
|
649
|
-
constructor() {
|
|
650
|
-
super(...arguments);
|
|
651
|
-
this.target = '_self';
|
|
652
|
-
}
|
|
653
|
-
__isLink() {
|
|
654
|
-
return !!this.href;
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
__decorate([
|
|
658
|
-
n({ reflect: true })
|
|
659
|
-
], BaseHyperlinkElement.prototype, "href", void 0);
|
|
660
|
-
__decorate([
|
|
661
|
-
n()
|
|
662
|
-
], BaseHyperlinkElement.prototype, "target", void 0);
|
|
663
|
-
return BaseHyperlinkElement;
|
|
664
|
-
};
|
|
665
|
-
|
|
666
|
-
class BaseButton extends BaseHyperlink(i$1) {
|
|
667
|
-
constructor() {
|
|
668
|
-
super(...arguments);
|
|
669
|
-
this.htmlType = 'button';
|
|
670
|
-
/**
|
|
671
|
-
* The visual style of the button.
|
|
672
|
-
*
|
|
673
|
-
* Possible variant values:
|
|
674
|
-
* `"filled"` is a filled button.
|
|
675
|
-
* `"outlined"` is an outlined button.
|
|
676
|
-
* `"text"` is a transparent button.
|
|
677
|
-
* `"tonal"` is a light color button.
|
|
678
|
-
* `"elevated"` is elevated button
|
|
679
|
-
*/
|
|
680
|
-
this.variant = 'filled';
|
|
681
|
-
/**
|
|
682
|
-
* Defines the primary color of the button. This can be set to predefined color names to apply specific color themes.
|
|
683
|
-
*/
|
|
684
|
-
this.color = 'primary';
|
|
685
|
-
/**
|
|
686
|
-
* Button size.
|
|
687
|
-
* Possible values are `"sm"`, `"md"`, `"lg"`. Defaults to `"md"`.
|
|
688
|
-
*/
|
|
689
|
-
this.size = 'sm';
|
|
690
|
-
/**
|
|
691
|
-
* If true, the user cannot interact with the button. Defaults to `false`.
|
|
692
|
-
*/
|
|
693
|
-
this.disabled = false;
|
|
694
|
-
this.skeleton = false;
|
|
695
|
-
/**
|
|
696
|
-
* If true, the user cannot interact with the button and the button is visually styled as disabled. But the button is still focusable. Defaults to `false`.
|
|
697
|
-
*/
|
|
698
|
-
this.softDisabled = false;
|
|
699
|
-
/**
|
|
700
|
-
* If button is disabled, the reason why it is disabled.
|
|
701
|
-
*/
|
|
702
|
-
this.disabledReason = '';
|
|
703
|
-
this.toggle = false;
|
|
704
|
-
this.selected = false;
|
|
705
|
-
/**
|
|
706
|
-
* Sets the delay for throttle in milliseconds. Defaults to 200 milliseconds.
|
|
707
|
-
*/
|
|
708
|
-
this.throttleDelay = 200;
|
|
709
|
-
/**
|
|
710
|
-
* States
|
|
711
|
-
*/
|
|
712
|
-
this.isPressed = false;
|
|
713
|
-
this.__handlePress = (event) => {
|
|
714
|
-
if (this.disabled || this.skeleton || this.softDisabled)
|
|
715
|
-
return;
|
|
716
|
-
if (event instanceof KeyboardEvent &&
|
|
717
|
-
event.type === 'keydown' &&
|
|
718
|
-
(event.key === 'Enter' || event.key === ' ')) {
|
|
719
|
-
this.isPressed = true;
|
|
720
|
-
}
|
|
721
|
-
else if (event.type === 'mousedown') {
|
|
722
|
-
this.isPressed = true;
|
|
723
|
-
}
|
|
724
|
-
else {
|
|
725
|
-
this.isPressed = false;
|
|
726
|
-
}
|
|
727
|
-
};
|
|
728
|
-
this.__dispatchClickWithThrottle = event => {
|
|
729
|
-
this.__dispatchClick(event);
|
|
730
|
-
};
|
|
731
|
-
this.__dispatchClick = (event) => {
|
|
732
|
-
// If the button is soft-disabled or a disabled link, we need to explicitly
|
|
733
|
-
// prevent the click from propagating to other event listeners as well as
|
|
734
|
-
// prevent the default action.
|
|
735
|
-
if (this.softDisabled || (this.disabled && this.href) || this.skeleton) {
|
|
736
|
-
event.stopImmediatePropagation();
|
|
737
|
-
event.preventDefault();
|
|
738
|
-
return;
|
|
739
|
-
}
|
|
740
|
-
if (!isActivationClick(event) || !this.buttonElement) {
|
|
741
|
-
return;
|
|
742
|
-
}
|
|
743
|
-
if (this.toggle) {
|
|
744
|
-
this.selected = !this.selected;
|
|
745
|
-
}
|
|
746
|
-
this.focus();
|
|
747
|
-
dispatchActivationClick(this.buttonElement);
|
|
748
|
-
};
|
|
749
|
-
}
|
|
750
|
-
focus() {
|
|
751
|
-
this.buttonElement?.focus();
|
|
752
|
-
}
|
|
753
|
-
blur() {
|
|
754
|
-
this.buttonElement?.blur();
|
|
755
|
-
}
|
|
756
|
-
connectedCallback() {
|
|
757
|
-
super.connectedCallback();
|
|
758
|
-
this.addEventListener('click', this.__dispatchClickWithThrottle);
|
|
759
|
-
window.addEventListener('mouseup', this.__handlePress);
|
|
760
|
-
}
|
|
761
|
-
disconnectedCallback() {
|
|
762
|
-
window.removeEventListener('mouseup', this.__handlePress);
|
|
763
|
-
this.removeEventListener('click', this.__dispatchClickWithThrottle);
|
|
764
|
-
super.disconnectedCallback();
|
|
765
|
-
}
|
|
766
|
-
__convertTypeToVariantAndColor() {
|
|
767
|
-
if (this.type === 'primary') {
|
|
768
|
-
this.color = 'primary';
|
|
769
|
-
this.variant = 'filled';
|
|
770
|
-
}
|
|
771
|
-
else if (this.type === 'secondary') {
|
|
772
|
-
this.color = 'surface';
|
|
773
|
-
this.variant = 'filled';
|
|
774
|
-
}
|
|
775
|
-
else if (this.type === 'tertiary') {
|
|
776
|
-
this.color = 'primary';
|
|
777
|
-
this.variant = 'text';
|
|
778
|
-
}
|
|
779
|
-
else if (this.type === 'danger') {
|
|
780
|
-
this.color = 'danger';
|
|
781
|
-
this.variant = 'filled';
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
get __disabledReasonID() {
|
|
785
|
-
return this.disabled && this.disabledReason
|
|
786
|
-
? BaseButton.DISABLED_REASON_ID
|
|
787
|
-
: undefined;
|
|
788
|
-
}
|
|
789
|
-
__renderDisabledReason() {
|
|
790
|
-
const disabledReasonID = this.__disabledReasonID;
|
|
791
|
-
if (disabledReasonID)
|
|
792
|
-
return b `<div
|
|
793
|
-
id=${disabledReasonID}
|
|
794
|
-
role="tooltip"
|
|
795
|
-
aria-label=${this.disabledReason}
|
|
796
|
-
class="screen-reader-only"
|
|
797
|
-
>
|
|
798
|
-
${this.disabledReason}
|
|
799
|
-
</div>`;
|
|
800
|
-
return A;
|
|
801
|
-
}
|
|
802
|
-
__renderTooltip() {
|
|
803
|
-
if (this.tooltip) {
|
|
804
|
-
return b `<wc-tooltip for="button">${this.tooltip}</wc-tooltip>`;
|
|
805
|
-
}
|
|
806
|
-
return A;
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
BaseButton.DISABLED_REASON_ID = 'disabled-reason';
|
|
810
|
-
__decorate([
|
|
811
|
-
n({ type: String })
|
|
812
|
-
], BaseButton.prototype, "htmlType", void 0);
|
|
813
|
-
__decorate([
|
|
814
|
-
n({ type: String })
|
|
815
|
-
], BaseButton.prototype, "type", void 0);
|
|
816
|
-
__decorate([
|
|
817
|
-
n()
|
|
818
|
-
], BaseButton.prototype, "variant", void 0);
|
|
819
|
-
__decorate([
|
|
820
|
-
n({ reflect: true })
|
|
821
|
-
], BaseButton.prototype, "color", void 0);
|
|
822
|
-
__decorate([
|
|
823
|
-
n({ reflect: true })
|
|
824
|
-
], BaseButton.prototype, "size", void 0);
|
|
825
|
-
__decorate([
|
|
826
|
-
n({ type: Boolean, reflect: true })
|
|
827
|
-
], BaseButton.prototype, "disabled", void 0);
|
|
828
|
-
__decorate([
|
|
829
|
-
n({ type: Boolean, reflect: true })
|
|
830
|
-
], BaseButton.prototype, "skeleton", void 0);
|
|
831
|
-
__decorate([
|
|
832
|
-
n({ type: Boolean, reflect: true, attribute: 'soft-disabled' })
|
|
833
|
-
], BaseButton.prototype, "softDisabled", void 0);
|
|
834
|
-
__decorate([
|
|
835
|
-
n({ attribute: 'disabled-reason' })
|
|
836
|
-
], BaseButton.prototype, "disabledReason", void 0);
|
|
837
|
-
__decorate([
|
|
838
|
-
n({ reflect: true })
|
|
839
|
-
], BaseButton.prototype, "configAria", void 0);
|
|
840
|
-
__decorate([
|
|
841
|
-
n({ type: Boolean, reflect: true })
|
|
842
|
-
], BaseButton.prototype, "toggle", void 0);
|
|
843
|
-
__decorate([
|
|
844
|
-
n({ type: Boolean, reflect: true })
|
|
845
|
-
], BaseButton.prototype, "selected", void 0);
|
|
846
|
-
__decorate([
|
|
847
|
-
n()
|
|
848
|
-
], BaseButton.prototype, "throttleDelay", void 0);
|
|
849
|
-
__decorate([
|
|
850
|
-
n()
|
|
851
|
-
], BaseButton.prototype, "tooltip", void 0);
|
|
852
|
-
__decorate([
|
|
853
|
-
r()
|
|
854
|
-
], BaseButton.prototype, "isPressed", void 0);
|
|
855
|
-
__decorate([
|
|
856
|
-
e('.button')
|
|
857
|
-
], BaseButton.prototype, "buttonElement", void 0);
|
|
858
|
-
|
|
859
|
-
var _Button_tabindex;
|
|
860
|
-
/**
|
|
861
|
-
* @label Button
|
|
862
|
-
* @tag wc-button
|
|
863
|
-
* @rawTag button
|
|
864
|
-
*
|
|
865
|
-
* @summary Buttons help people initiate actions, from sending an email, to sharing a document, to liking a post.
|
|
866
|
-
* @overview
|
|
867
|
-
* <p>Buttons are clickable elements that are used to trigger actions. They communicate calls to action to the user and allow users to interact with pages in a variety of ways. Button labels express what action will occur when the user interacts with it.</p>
|
|
868
|
-
*
|
|
869
|
-
* @cssprop --button-container-shape: Defines the border radius of the button container shape.
|
|
870
|
-
*
|
|
871
|
-
* @cssprop --button-container-shape-start-start: Defines the start position of the button container shape.
|
|
872
|
-
* @cssprop --button-container-shape-start-end: Defines the end position of the button container shape.
|
|
873
|
-
* @cssprop --button-container-shape-end-start: Defines the start position of the button container shape.
|
|
874
|
-
* @cssprop --button-container-shape-end-end: Defines the end position of the button container shape.
|
|
875
|
-
*
|
|
876
|
-
*
|
|
877
|
-
* @cssprop --filled-button-container-color: Color of the filled button container.
|
|
878
|
-
* @cssprop --filled-button-label-text-color: Text color of the filled button label.
|
|
879
|
-
*
|
|
880
|
-
* @cssprop --outlined-button-container-color: Color of the outlined button container.
|
|
881
|
-
* @cssprop --outlined-button-label-text-color: Text color of the outlined button label.
|
|
882
|
-
*
|
|
883
|
-
* @cssprop --text-button-label-text-color: Text color of the text button label.
|
|
884
|
-
*
|
|
885
|
-
* @cssprop --tonal-button-container-color: Color of the tonal button container.
|
|
886
|
-
* @cssprop --tonal-button-label-text-color: Text color of the tonal button label.
|
|
887
|
-
*
|
|
888
|
-
* @cssprop --elevated-button-container-color: Color of the elevated button container.
|
|
889
|
-
* @cssprop --elevated-button-label-text-color: Text color of the elevated button label.
|
|
890
|
-
*
|
|
891
|
-
* @cssprop --neo-button-container-color: Color of the neo button container.
|
|
892
|
-
* @cssprop --neo-button-label-text-color: Text color of the neo button label.
|
|
893
|
-
*
|
|
894
|
-
* @fires {MouseEvent} click - Dispatched when the button is clicked.
|
|
895
|
-
*
|
|
896
|
-
* @example
|
|
897
|
-
* ```html
|
|
898
|
-
* <wc-button>Button</wc-button>
|
|
899
|
-
* ```
|
|
900
|
-
* @tags display
|
|
901
|
-
*/
|
|
902
|
-
let Button = class Button extends BaseButton {
|
|
903
|
-
constructor() {
|
|
904
|
-
super(...arguments);
|
|
905
|
-
_Button_tabindex.set(this, 0);
|
|
906
|
-
/**
|
|
907
|
-
* Icon alignment.
|
|
908
|
-
* Possible values are `"start"`, `"end"`. Defaults to `"end"`.
|
|
909
|
-
*/
|
|
910
|
-
this.iconAlign = 'end';
|
|
911
|
-
this.slotHasContent = false;
|
|
912
|
-
}
|
|
913
|
-
focus() {
|
|
914
|
-
this.buttonElement?.focus();
|
|
915
|
-
}
|
|
916
|
-
blur() {
|
|
917
|
-
this.buttonElement?.blur();
|
|
918
|
-
}
|
|
919
|
-
connectedCallback() {
|
|
920
|
-
super.connectedCallback();
|
|
921
|
-
this.addEventListener('click', this.__dispatchClickWithThrottle);
|
|
922
|
-
window.addEventListener('mouseup', this.__handlePress);
|
|
923
|
-
}
|
|
924
|
-
disconnectedCallback() {
|
|
925
|
-
window.removeEventListener('mouseup', this.__handlePress);
|
|
926
|
-
this.removeEventListener('click', this.__dispatchClickWithThrottle);
|
|
927
|
-
super.disconnectedCallback();
|
|
928
|
-
}
|
|
929
|
-
firstUpdated() {
|
|
930
|
-
this.__dispatchClickWithThrottle = throttle(this.__dispatchClick, this.throttleDelay);
|
|
931
|
-
observerSlotChangesWithCallback(this.renderRoot.querySelector('slot'), hasContent => {
|
|
932
|
-
this.slotHasContent = hasContent;
|
|
933
|
-
this.requestUpdate();
|
|
934
|
-
});
|
|
935
|
-
this.__convertTypeToVariantAndColor();
|
|
936
|
-
}
|
|
937
|
-
render() {
|
|
938
|
-
const isLink = this.__isLink();
|
|
939
|
-
const cssClasses = {
|
|
940
|
-
button: true,
|
|
941
|
-
'button-element': true,
|
|
942
|
-
[`size-${this.size}`]: true,
|
|
943
|
-
[`variant-${this.variant}`]: true,
|
|
944
|
-
[`color-${this.color}`]: true,
|
|
945
|
-
disabled: this.disabled || this.softDisabled,
|
|
946
|
-
pressed: this.isPressed,
|
|
947
|
-
'has-content': this.slotHasContent,
|
|
948
|
-
'show-skeleton': this.skeleton,
|
|
949
|
-
[`icon-align-${this.iconAlign}`]: true,
|
|
950
|
-
};
|
|
951
|
-
if (!isLink) {
|
|
952
|
-
return b `<button
|
|
953
|
-
class=${e$1(cssClasses)}
|
|
954
|
-
id="button"
|
|
955
|
-
tabindex=${__classPrivateFieldGet(this, _Button_tabindex, "f")}
|
|
956
|
-
type=${this.htmlType}
|
|
957
|
-
@click=${this.__dispatchClickWithThrottle}
|
|
958
|
-
@mousedown=${this.__handlePress}
|
|
959
|
-
@keydown=${this.__handlePress}
|
|
960
|
-
@keyup=${this.__handlePress}
|
|
961
|
-
aria-describedby=${this.__disabledReasonID}
|
|
962
|
-
aria-disabled=${`${this.disabled || this.softDisabled}`}
|
|
963
|
-
?disabled=${this.disabled}
|
|
964
|
-
${spread(this.configAria)}
|
|
965
|
-
>
|
|
966
|
-
${this.renderButtonContent()}
|
|
967
|
-
</button>
|
|
968
|
-
${this.__renderTooltip()}`;
|
|
969
|
-
}
|
|
970
|
-
return b `<a
|
|
971
|
-
class=${e$1(cssClasses)}
|
|
972
|
-
id="button"
|
|
973
|
-
tabindex=${__classPrivateFieldGet(this, _Button_tabindex, "f")}
|
|
974
|
-
href=${this.href}
|
|
975
|
-
target=${this.target}
|
|
976
|
-
@click=${this.__dispatchClickWithThrottle}
|
|
977
|
-
@mousedown=${this.__handlePress}
|
|
978
|
-
@keydown=${this.__handlePress}
|
|
979
|
-
@keyup=${this.__handlePress}
|
|
980
|
-
role="button"
|
|
981
|
-
aria-describedby=${this.__disabledReasonID}
|
|
982
|
-
aria-disabled=${`${this.disabled}`}
|
|
983
|
-
${spread(this.configAria)}
|
|
984
|
-
>
|
|
985
|
-
${this.renderButtonContent()}
|
|
986
|
-
</a>
|
|
987
|
-
${this.__renderTooltip()}`;
|
|
988
|
-
}
|
|
989
|
-
renderButtonContent() {
|
|
990
|
-
return b `
|
|
991
|
-
<wc-focus-ring class="focus-ring" .control=${this} .forElement=${this.buttonElement}></wc-focus-ring>
|
|
992
|
-
<wc-elevation class="elevation"></wc-elevation>
|
|
993
|
-
<div class="neo-background"></div>
|
|
994
|
-
<div class="background"></div>
|
|
995
|
-
<div class="outline"></div>
|
|
996
|
-
<wc-ripple class="ripple"></wc-ripple>
|
|
997
|
-
<wc-skeleton class="skeleton"></wc-skeleton>
|
|
998
|
-
|
|
999
|
-
<div class="button-content">
|
|
1000
|
-
<div class="slot-container">
|
|
1001
|
-
<slot></slot>
|
|
1002
|
-
</div>
|
|
1003
|
-
|
|
1004
|
-
<slot name="icon"></slot>
|
|
1005
|
-
</div>
|
|
1006
|
-
|
|
1007
|
-
${this.__renderDisabledReason()}
|
|
1008
|
-
`;
|
|
1009
|
-
}
|
|
1010
|
-
};
|
|
1011
|
-
_Button_tabindex = new WeakMap();
|
|
1012
|
-
Button.styles = [css_248z$2, css_248z$1, css_248z];
|
|
1013
|
-
__decorate([
|
|
1014
|
-
n({ attribute: 'icon-align' })
|
|
1015
|
-
], Button.prototype, "iconAlign", void 0);
|
|
1016
|
-
__decorate([
|
|
1017
|
-
r()
|
|
1018
|
-
], Button.prototype, "slotHasContent", void 0);
|
|
1019
|
-
Button = __decorate([
|
|
1020
|
-
IndividualComponent
|
|
1021
|
-
], Button);
|
|
1022
|
-
|
|
1023
|
-
export { Button as B, css_248z$1 as a, BaseButton as b, css_248z$2 as c, BaseHyperlink as d };
|
|
1024
|
-
//# sourceMappingURL=button-DMN1dPAg.js.map
|
|
560
|
+
export { css_248z as a, css_248z$1 as c };
|
|
561
|
+
//# sourceMappingURL=button-colors-Ccys3hvS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-colors-Ccys3hvS.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|