@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
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { a as i, _ as __decorate, I as IndividualComponent, i as i$1, A, b } from './IndividualComponent-DUINtMGK.js';
|
|
2
|
+
import { n } from './property-1psGvXOq.js';
|
|
3
|
+
import { r } from './state-DwbEjqVk.js';
|
|
4
|
+
import { e } from './class-map-YU7g0o3B.js';
|
|
5
|
+
import './directive-ZPhl09Yt.js';
|
|
6
|
+
|
|
7
|
+
var css_248z = i`* {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.screen-reader-only {
|
|
12
|
+
display: none !important;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@keyframes reveal-top {
|
|
16
|
+
0% {
|
|
17
|
+
opacity: 0;
|
|
18
|
+
transform: translateY(-1rem);
|
|
19
|
+
max-height: 0;
|
|
20
|
+
}
|
|
21
|
+
100% {
|
|
22
|
+
max-height: 500px;
|
|
23
|
+
opacity: 1;
|
|
24
|
+
transform: translateY(0);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
@keyframes reveal-bottom {
|
|
28
|
+
0% {
|
|
29
|
+
opacity: 0;
|
|
30
|
+
transform: translateY(1rem);
|
|
31
|
+
max-height: 0;
|
|
32
|
+
}
|
|
33
|
+
100% {
|
|
34
|
+
max-height: 500px;
|
|
35
|
+
opacity: 1;
|
|
36
|
+
transform: translateY(0);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
:host {
|
|
40
|
+
display: block;
|
|
41
|
+
position: var(--notification-manager-position, absolute);
|
|
42
|
+
width: 20rem;
|
|
43
|
+
z-index: var(--z-index-notification-manager, 9000);
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.notification-manager {
|
|
48
|
+
pointer-events: none;
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
gap: var(--spacing-100);
|
|
52
|
+
margin: var(--spacing-150);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.notification {
|
|
56
|
+
pointer-events: auto;
|
|
57
|
+
max-height: 500px;
|
|
58
|
+
transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.notification.hidden {
|
|
63
|
+
max-height: 0;
|
|
64
|
+
opacity: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Position variants */
|
|
68
|
+
:host([position=bottom-right]) {
|
|
69
|
+
bottom: 0;
|
|
70
|
+
right: 0;
|
|
71
|
+
}
|
|
72
|
+
:host([position=bottom-right]) .notification-manager {
|
|
73
|
+
align-items: flex-end;
|
|
74
|
+
}
|
|
75
|
+
:host([position=bottom-right]) .notification {
|
|
76
|
+
animation: reveal-bottom 0.5s ease-in;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:host([position=bottom-left]) {
|
|
80
|
+
bottom: 0;
|
|
81
|
+
left: 0;
|
|
82
|
+
}
|
|
83
|
+
:host([position=bottom-left]) .notification-manager {
|
|
84
|
+
align-items: flex-start;
|
|
85
|
+
}
|
|
86
|
+
:host([position=bottom-left]) .notification {
|
|
87
|
+
animation: reveal-bottom 0.5s ease-in;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:host([position=top-right]) {
|
|
91
|
+
top: 0;
|
|
92
|
+
right: 0;
|
|
93
|
+
}
|
|
94
|
+
:host([position=top-right]) .notification-manager {
|
|
95
|
+
align-items: flex-end;
|
|
96
|
+
}
|
|
97
|
+
:host([position=top-right]) .notification {
|
|
98
|
+
animation: reveal-top 0.5s ease-in;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:host([position=top-left]) {
|
|
102
|
+
top: 0;
|
|
103
|
+
left: 0;
|
|
104
|
+
}
|
|
105
|
+
:host([position=top-left]) .notification-manager {
|
|
106
|
+
align-items: flex-start;
|
|
107
|
+
}
|
|
108
|
+
:host([position=top-left]) .notification {
|
|
109
|
+
animation: reveal-top 0.5s ease-in;
|
|
110
|
+
}`;
|
|
111
|
+
|
|
112
|
+
let notificationCounter = 0;
|
|
113
|
+
function nextId() {
|
|
114
|
+
return `wc-notification-${++notificationCounter}`;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* @label Notification Manager
|
|
118
|
+
* @tag wc-notification-manager
|
|
119
|
+
* @rawTag notification-manager
|
|
120
|
+
* @summary The Notification Manager handles the organization and display of notifications within the application.
|
|
121
|
+
*
|
|
122
|
+
* @fires {CustomEvent} notification-manager-action - Fired when the action button of a managed notification is clicked. Detail: `{ id: string }`.
|
|
123
|
+
* @fires {CustomEvent} notification-manager-dismiss - Fired when a managed notification is dismissed. Detail: `{ id: string }`.
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```html
|
|
127
|
+
* <wc-notification-manager position="bottom-right"></wc-notification-manager>
|
|
128
|
+
* <script>
|
|
129
|
+
* window.dispatchEvent(new CustomEvent('notification', {
|
|
130
|
+
* detail: { title: 'Record saved', variant: 'success', dismissible: true }
|
|
131
|
+
* }));
|
|
132
|
+
* </script>
|
|
133
|
+
* ```
|
|
134
|
+
* @tags display, feedback
|
|
135
|
+
*/
|
|
136
|
+
let NotificationManager = class NotificationManager extends i$1 {
|
|
137
|
+
constructor() {
|
|
138
|
+
super(...arguments);
|
|
139
|
+
/**
|
|
140
|
+
* Name of this manager instance. Only notifications whose `target` matches
|
|
141
|
+
* this name (or whose `target` is absent and this manager's `name` is
|
|
142
|
+
* `'global'`) will be handled.
|
|
143
|
+
*/
|
|
144
|
+
this.name = 'global';
|
|
145
|
+
/**
|
|
146
|
+
* Screen position where notifications are stacked.
|
|
147
|
+
*/
|
|
148
|
+
this.position = 'bottom-right';
|
|
149
|
+
this.notifications = [];
|
|
150
|
+
this.handleWindowNotification = (event) => {
|
|
151
|
+
const evt = event;
|
|
152
|
+
const detail = evt.detail ?? {};
|
|
153
|
+
// Route by target: accept if target matches our name, or if we are global
|
|
154
|
+
// and no specific target is set.
|
|
155
|
+
const target = detail.target;
|
|
156
|
+
const isForUs = target === this.name || (!target && this.name === 'global');
|
|
157
|
+
if (!isForUs || detail.processed) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
evt.stopPropagation();
|
|
161
|
+
detail.processed = true;
|
|
162
|
+
const entry = {
|
|
163
|
+
id: nextId(),
|
|
164
|
+
title: detail.title ?? '',
|
|
165
|
+
subtitle: detail.subtitle,
|
|
166
|
+
action: detail.action,
|
|
167
|
+
variant: detail.variant ?? 'info',
|
|
168
|
+
dismissible: detail.dismissible ?? false,
|
|
169
|
+
timeout: detail.timeout ?? 5000,
|
|
170
|
+
hide: false,
|
|
171
|
+
width: detail.width,
|
|
172
|
+
};
|
|
173
|
+
this.notifications = [...this.notifications, entry];
|
|
174
|
+
if (typeof detail.callback === 'function') {
|
|
175
|
+
detail.callback(entry.id);
|
|
176
|
+
}
|
|
177
|
+
if (!entry.dismissible) {
|
|
178
|
+
setTimeout(() => {
|
|
179
|
+
this._hideNotification(entry.id);
|
|
180
|
+
}, entry.timeout);
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
this.handleWindowDismiss = (event) => {
|
|
184
|
+
const evt = event;
|
|
185
|
+
const ids = evt.detail?.notifications ?? [];
|
|
186
|
+
ids.forEach(id => this._hideNotification(id));
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
connectedCallback() {
|
|
190
|
+
super.connectedCallback();
|
|
191
|
+
window.addEventListener('notification', this.handleWindowNotification);
|
|
192
|
+
window.addEventListener('notification-dismiss', this.handleWindowDismiss);
|
|
193
|
+
}
|
|
194
|
+
disconnectedCallback() {
|
|
195
|
+
window.removeEventListener('notification', this.handleWindowNotification);
|
|
196
|
+
window.removeEventListener('notification-dismiss', this.handleWindowDismiss);
|
|
197
|
+
super.disconnectedCallback();
|
|
198
|
+
}
|
|
199
|
+
_hideNotification(id) {
|
|
200
|
+
this.notifications = this.notifications.map(n => n.id === id ? { ...n, hide: true } : n);
|
|
201
|
+
}
|
|
202
|
+
_handleDismiss(id) {
|
|
203
|
+
this._hideNotification(id);
|
|
204
|
+
this.dispatchEvent(new CustomEvent('notification-manager-dismiss', {
|
|
205
|
+
detail: { id },
|
|
206
|
+
bubbles: true,
|
|
207
|
+
composed: true,
|
|
208
|
+
}));
|
|
209
|
+
}
|
|
210
|
+
_handleAction(id) {
|
|
211
|
+
this.dispatchEvent(new CustomEvent('notification-manager-action', {
|
|
212
|
+
detail: { id },
|
|
213
|
+
bubbles: true,
|
|
214
|
+
composed: true,
|
|
215
|
+
}));
|
|
216
|
+
}
|
|
217
|
+
renderNotification(n) {
|
|
218
|
+
return b `
|
|
219
|
+
<div
|
|
220
|
+
id=${n.id}
|
|
221
|
+
class=${e({ notification: true, hidden: n.hide })}
|
|
222
|
+
style=${n.width ? `width: ${n.width}` : A}
|
|
223
|
+
>
|
|
224
|
+
<wc-notification
|
|
225
|
+
variant=${n.variant}
|
|
226
|
+
?dismissible=${n.dismissible}
|
|
227
|
+
managed
|
|
228
|
+
action=${n.action ?? A}
|
|
229
|
+
@notification-dismiss=${() => this._handleDismiss(n.id)}
|
|
230
|
+
@notification-action-click=${() => this._handleAction(n.id)}
|
|
231
|
+
>
|
|
232
|
+
<span slot="title">${n.title}</span>
|
|
233
|
+
${n.subtitle
|
|
234
|
+
? b `<span slot="subtitle">${n.subtitle}</span>`
|
|
235
|
+
: A}
|
|
236
|
+
</wc-notification>
|
|
237
|
+
</div>
|
|
238
|
+
`;
|
|
239
|
+
}
|
|
240
|
+
render() {
|
|
241
|
+
return b `
|
|
242
|
+
<div
|
|
243
|
+
class=${e({
|
|
244
|
+
'notification-manager': true,
|
|
245
|
+
[`position-${this.position}`]: true,
|
|
246
|
+
})}
|
|
247
|
+
>
|
|
248
|
+
${this.notifications.map(n => this.renderNotification(n))}
|
|
249
|
+
</div>
|
|
250
|
+
`;
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
NotificationManager.styles = [css_248z];
|
|
254
|
+
__decorate([
|
|
255
|
+
n({ type: String, reflect: true })
|
|
256
|
+
], NotificationManager.prototype, "name", void 0);
|
|
257
|
+
__decorate([
|
|
258
|
+
n({ type: String, reflect: true })
|
|
259
|
+
], NotificationManager.prototype, "position", void 0);
|
|
260
|
+
__decorate([
|
|
261
|
+
r()
|
|
262
|
+
], NotificationManager.prototype, "notifications", void 0);
|
|
263
|
+
NotificationManager = __decorate([
|
|
264
|
+
IndividualComponent
|
|
265
|
+
], NotificationManager);
|
|
266
|
+
|
|
267
|
+
export { NotificationManager };
|
|
268
|
+
//# sourceMappingURL=notification-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-manager.js","sources":["../../src/notification-manager/notification-manager.ts"],"sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './notification-manager.scss';\n\ntype NotificationVariant = 'success' | 'error' | 'info' | 'warning';\n\ntype NotificationEntry = {\n id: string;\n title: string;\n subtitle?: string;\n action?: string;\n variant: NotificationVariant;\n dismissible: boolean;\n timeout: number;\n hide: boolean;\n width?: string;\n};\n\nlet notificationCounter = 0;\nfunction nextId(): string {\n return `wc-notification-${++notificationCounter}`;\n}\n\n/**\n * @label Notification Manager\n * @tag wc-notification-manager\n * @rawTag notification-manager\n * @summary The Notification Manager handles the organization and display of notifications within the application.\n *\n * @fires {CustomEvent} notification-manager-action - Fired when the action button of a managed notification is clicked. Detail: `{ id: string }`.\n * @fires {CustomEvent} notification-manager-dismiss - Fired when a managed notification is dismissed. Detail: `{ id: string }`.\n *\n * @example\n * ```html\n * <wc-notification-manager position=\"bottom-right\"></wc-notification-manager>\n * <script>\n * window.dispatchEvent(new CustomEvent('notification', {\n * detail: { title: 'Record saved', variant: 'success', dismissible: true }\n * }));\n * </script>\n * ```\n * @tags display, feedback\n */\n@IndividualComponent\nexport class NotificationManager extends LitElement {\n static styles = [styles];\n\n /**\n * Name of this manager instance. Only notifications whose `target` matches\n * this name (or whose `target` is absent and this manager's `name` is\n * `'global'`) will be handled.\n */\n @property({ type: String, reflect: true }) name = 'global';\n\n /**\n * Screen position where notifications are stacked.\n */\n @property({ type: String, reflect: true })\n position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' =\n 'bottom-right';\n\n @state() private notifications: NotificationEntry[] = [];\n\n private readonly handleWindowNotification = (event: Event) => {\n const evt = event as CustomEvent;\n const detail = evt.detail ?? {};\n\n // Route by target: accept if target matches our name, or if we are global\n // and no specific target is set.\n const target: string | undefined = detail.target;\n const isForUs =\n target === this.name || (!target && this.name === 'global');\n\n if (!isForUs || detail.processed) {\n return;\n }\n\n evt.stopPropagation();\n detail.processed = true;\n\n const entry: NotificationEntry = {\n id: nextId(),\n title: detail.title ?? '',\n subtitle: detail.subtitle,\n action: detail.action,\n variant: detail.variant ?? 'info',\n dismissible: detail.dismissible ?? false,\n timeout: detail.timeout ?? 5000,\n hide: false,\n width: detail.width,\n };\n\n this.notifications = [...this.notifications, entry];\n\n if (typeof detail.callback === 'function') {\n detail.callback(entry.id);\n }\n\n if (!entry.dismissible) {\n setTimeout(() => {\n this._hideNotification(entry.id);\n }, entry.timeout);\n }\n };\n\n private readonly handleWindowDismiss = (event: Event) => {\n const evt = event as CustomEvent;\n const ids: string[] = evt.detail?.notifications ?? [];\n ids.forEach(id => this._hideNotification(id));\n };\n\n connectedCallback() {\n super.connectedCallback();\n window.addEventListener('notification', this.handleWindowNotification);\n window.addEventListener(\n 'notification-dismiss',\n this.handleWindowDismiss,\n );\n }\n\n disconnectedCallback() {\n window.removeEventListener(\n 'notification',\n this.handleWindowNotification,\n );\n window.removeEventListener(\n 'notification-dismiss',\n this.handleWindowDismiss,\n );\n super.disconnectedCallback();\n }\n\n private _hideNotification(id: string) {\n this.notifications = this.notifications.map(n =>\n n.id === id ? { ...n, hide: true } : n,\n );\n }\n\n private _handleDismiss(id: string) {\n this._hideNotification(id);\n this.dispatchEvent(\n new CustomEvent('notification-manager-dismiss', {\n detail: { id },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private _handleAction(id: string) {\n this.dispatchEvent(\n new CustomEvent('notification-manager-action', {\n detail: { id },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private renderNotification(n: NotificationEntry) {\n return html`\n <div\n id=${n.id}\n class=${classMap({ notification: true, hidden: n.hide })}\n style=${n.width ? `width: ${n.width}` : nothing}\n >\n <wc-notification\n variant=${n.variant}\n ?dismissible=${n.dismissible}\n managed\n action=${n.action ?? nothing}\n @notification-dismiss=${() => this._handleDismiss(n.id)}\n @notification-action-click=${() => this._handleAction(n.id)}\n >\n <span slot=\"title\">${n.title}</span>\n ${n.subtitle\n ? html`<span slot=\"subtitle\">${n.subtitle}</span>`\n : nothing}\n </wc-notification>\n </div>\n `;\n }\n\n render() {\n return html`\n <div\n class=${classMap({\n 'notification-manager': true,\n [`position-${this.position}`]: true,\n })}\n >\n ${this.notifications.map(n => this.renderNotification(n))}\n </div>\n `;\n }\n}\n"],"names":["LitElement","html","classMap","nothing","styles","property","state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAI,mBAAmB,GAAG,CAAC;AAC3B,SAAS,MAAM,GAAA;AACb,IAAA,OAAO,CAAA,gBAAA,EAAmB,EAAE,mBAAmB,CAAA,CAAE;AACnD;AAEA;;;;;;;;;;;;;;;;;;;AAmBG;AAEI,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQA,GAAU,CAAA;AAA5C,IAAA,WAAA,GAAA;;AAGL;;;;AAIG;QACwC,IAAA,CAAA,IAAI,GAAG,QAAQ;AAE1D;;AAEG;QAEH,IAAA,CAAA,QAAQ,GACN,cAAc;QAEC,IAAA,CAAA,aAAa,GAAwB,EAAE;AAEvC,QAAA,IAAA,CAAA,wBAAwB,GAAG,CAAC,KAAY,KAAI;YAC3D,MAAM,GAAG,GAAG,KAAoB;AAChC,YAAA,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,IAAI,EAAE;;;AAI/B,YAAA,MAAM,MAAM,GAAuB,MAAM,CAAC,MAAM;AAChD,YAAA,MAAM,OAAO,GACX,MAAM,KAAK,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC;AAE7D,YAAA,IAAI,CAAC,OAAO,IAAI,MAAM,CAAC,SAAS,EAAE;gBAChC;YACF;YAEA,GAAG,CAAC,eAAe,EAAE;AACrB,YAAA,MAAM,CAAC,SAAS,GAAG,IAAI;AAEvB,YAAA,MAAM,KAAK,GAAsB;gBAC/B,EAAE,EAAE,MAAM,EAAE;AACZ,gBAAA,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,EAA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AjB9C,mBAAmB,GAAA,UAAA,CAAA;IAD/B;AACY,CAAA,EAAA,mBAAmB,CAuJ/B;;;;"}
|
package/dist/notification.js
CHANGED
|
@@ -373,11 +373,12 @@ let Notification = class Notification extends i$1 {
|
|
|
373
373
|
variant="text"
|
|
374
374
|
size="sm"
|
|
375
375
|
aria-label="Close notification"
|
|
376
|
-
name="close"
|
|
377
376
|
@click=${() => {
|
|
378
377
|
this.hideAndEmitDismiss('dismiss');
|
|
379
378
|
}}
|
|
380
|
-
|
|
379
|
+
>
|
|
380
|
+
<wc-icon name="close"></wc-icon>
|
|
381
|
+
</wc-icon-button>
|
|
381
382
|
</div>`
|
|
382
383
|
: A}
|
|
383
384
|
</div>
|
package/dist/notification.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.js","sources":["../../src/notification/notification.ts"],"sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './notification.scss';\n\ntype NotificationVariant = 'success' | 'error' | 'info' | 'warning';\n\nconst VARIANT_LABELS: Record<NotificationVariant, string> = {\n success: 'Success',\n error: 'Error',\n info: 'Information',\n warning: 'Warning',\n};\n\nconst VARIANT_ICONS: Record<NotificationVariant, string> = {\n success: 'check_circle',\n error: 'error',\n info: 'info',\n warning: 'warning',\n};\n\n/**\n * @label Notification\n * @tag wc-notification\n * @rawTag notification\n * @summary Notifications communicate contextual status, errors, warnings, and success messages.\n *\n * @cssprop --notification-container-color - Surface color for the notification container.\n * @cssprop --notification-text-color - Label and supporting text color.\n * @cssprop --notification-leading-icon-color - Leading state icon color.\n * @cssprop --notification-accent-color - Start border color for status emphasis.\n * @cssprop --notification-border-radius - Border radius of the notification container.\n *\n * @fires {CustomEvent} notification-dismiss - Fired when the notification is dismissed.\n * @fires {CustomEvent} notification-action-click - Fired when the action button is clicked.\n *\n * @example\n * ```html\n * <wc-notification variant=\"success\" action=\"Undo\" dismissible>\n * <span slot=\"title\">Record saved</span>\n * </wc-notification>\n * ```\n * @tags display, feedback\n */\n@IndividualComponent\nexport class Notification extends LitElement {\n static styles = [styles];\n\n /**\n * If true, content and actions are laid out in a single row.\n */\n @property({ type: Boolean, reflect: true }) inline = false;\n\n /**\n * The visual variant of the notification.\n */\n @property({ type: String, reflect: true })\n variant: NotificationVariant = 'info';\n\n /**\n * Enables a high contrast appearance.\n */\n @property({ type: Boolean, reflect: true, attribute: 'high-contrast' })\n highContrast = false;\n\n /**\n * If true, renders a dismiss icon button.\n */\n @property({ type: Boolean, reflect: true }) dismissible = false;\n\n /**\n * Action label text. When provided, an action button is shown.\n */\n @property({ type: String }) action = '';\n\n /**\n * If true, the host controls visibility when dismissed.\n */\n @property({ type: Boolean, reflect: true }) managed = false;\n\n @state() private isHidden = false;\n \n @state() private hasSubtitle = false;\n\n /**\n * Programmatically reveals the notification.\n */\n show() {\n this.isHidden = false;\n }\n\n /**\n * Programmatically dismisses the notification.\n */\n dismiss() {\n this.hideAndEmitDismiss('programmatic');\n }\n\n private get variantIcon() {\n return VARIANT_ICONS[this.variant];\n }\n\n private get variantLabel() {\n return VARIANT_LABELS[this.variant];\n }\n\n private emitActionClick() {\n this.dispatchEvent(\n new CustomEvent('notification-action-click', {\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private hideAndEmitDismiss(reason: 'dismiss' | 'programmatic') {\n if (!this.managed) {\n this.isHidden = true;\n }\n\n this.dispatchEvent(\n new CustomEvent('notification-dismiss', {\n detail: { reason },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private handleSubtitleSlotChange(event: Event) {\n const slot = event.target as HTMLSlotElement;\n this.hasSubtitle = slot\n .assignedNodes({ flatten: true })\n .some(node => node.textContent?.trim());\n }\n\n render() {\n if (this.isHidden) {\n return nothing;\n }\n\n return html`\n <div\n class=${classMap({\n notification: true,\n inline: this.inline,\n 'high-contrast': this.highContrast,\n 'has-subtitle': this.hasSubtitle,\n [`variant-${this.variant}`]: true,\n })}\n role=\"alert\"\n aria-live=\"polite\"\n aria-label=${this.variantLabel}\n >\n <div class=\"state-icon\" aria-hidden=\"true\">\n <slot name=\"icon\">\n <wc-icon name=${this.variantIcon}></wc-icon>\n </slot>\n </div>\n\n <div class=\"content\">\n <div class=\"content-text\">\n <div class=\"title\">\n <slot name=\"title\"></slot>\n <slot></slot>\n </div>\n\n <div class=\"subtitle\">\n <slot name=\"subtitle\" @slotchange=${this.handleSubtitleSlotChange}></slot>\n </div>\n </div>\n\n ${this.action\n ? html`<div class=\"actions\">\n <wc-button\n class=\"action\"\n size=\"sm\"\n variant=${this.inline ? 'text' : 'outlined'}\n @click=${this.emitActionClick}\n >\n ${this.action}\n </wc-button>\n </div>`\n : nothing}\n </div>\n\n ${this.dismissible\n ? html`<div class=\"close-button-container\">\n <wc-icon-button\n class=\"close-button\"\n variant=\"text\"\n size=\"sm\"\n aria-label=\"Close notification\"\n
|
|
1
|
+
{"version":3,"file":"notification.js","sources":["../../src/notification/notification.ts"],"sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './notification.scss';\n\ntype NotificationVariant = 'success' | 'error' | 'info' | 'warning';\n\nconst VARIANT_LABELS: Record<NotificationVariant, string> = {\n success: 'Success',\n error: 'Error',\n info: 'Information',\n warning: 'Warning',\n};\n\nconst VARIANT_ICONS: Record<NotificationVariant, string> = {\n success: 'check_circle',\n error: 'error',\n info: 'info',\n warning: 'warning',\n};\n\n/**\n * @label Notification\n * @tag wc-notification\n * @rawTag notification\n * @summary Notifications communicate contextual status, errors, warnings, and success messages.\n *\n * @cssprop --notification-container-color - Surface color for the notification container.\n * @cssprop --notification-text-color - Label and supporting text color.\n * @cssprop --notification-leading-icon-color - Leading state icon color.\n * @cssprop --notification-accent-color - Start border color for status emphasis.\n * @cssprop --notification-border-radius - Border radius of the notification container.\n *\n * @fires {CustomEvent} notification-dismiss - Fired when the notification is dismissed.\n * @fires {CustomEvent} notification-action-click - Fired when the action button is clicked.\n *\n * @example\n * ```html\n * <wc-notification variant=\"success\" action=\"Undo\" dismissible>\n * <span slot=\"title\">Record saved</span>\n * </wc-notification>\n * ```\n * @tags display, feedback\n */\n@IndividualComponent\nexport class Notification extends LitElement {\n static styles = [styles];\n\n /**\n * If true, content and actions are laid out in a single row.\n */\n @property({ type: Boolean, reflect: true }) inline = false;\n\n /**\n * The visual variant of the notification.\n */\n @property({ type: String, reflect: true })\n variant: NotificationVariant = 'info';\n\n /**\n * Enables a high contrast appearance.\n */\n @property({ type: Boolean, reflect: true, attribute: 'high-contrast' })\n highContrast = false;\n\n /**\n * If true, renders a dismiss icon button.\n */\n @property({ type: Boolean, reflect: true }) dismissible = false;\n\n /**\n * Action label text. When provided, an action button is shown.\n */\n @property({ type: String }) action = '';\n\n /**\n * If true, the host controls visibility when dismissed.\n */\n @property({ type: Boolean, reflect: true }) managed = false;\n\n @state() private isHidden = false;\n \n @state() private hasSubtitle = false;\n\n /**\n * Programmatically reveals the notification.\n */\n show() {\n this.isHidden = false;\n }\n\n /**\n * Programmatically dismisses the notification.\n */\n dismiss() {\n this.hideAndEmitDismiss('programmatic');\n }\n\n private get variantIcon() {\n return VARIANT_ICONS[this.variant];\n }\n\n private get variantLabel() {\n return VARIANT_LABELS[this.variant];\n }\n\n private emitActionClick() {\n this.dispatchEvent(\n new CustomEvent('notification-action-click', {\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private hideAndEmitDismiss(reason: 'dismiss' | 'programmatic') {\n if (!this.managed) {\n this.isHidden = true;\n }\n\n this.dispatchEvent(\n new CustomEvent('notification-dismiss', {\n detail: { reason },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private handleSubtitleSlotChange(event: Event) {\n const slot = event.target as HTMLSlotElement;\n this.hasSubtitle = slot\n .assignedNodes({ flatten: true })\n .some(node => node.textContent?.trim());\n }\n\n render() {\n if (this.isHidden) {\n return nothing;\n }\n\n return html`\n <div\n class=${classMap({\n notification: true,\n inline: this.inline,\n 'high-contrast': this.highContrast,\n 'has-subtitle': this.hasSubtitle,\n [`variant-${this.variant}`]: true,\n })}\n role=\"alert\"\n aria-live=\"polite\"\n aria-label=${this.variantLabel}\n >\n <div class=\"state-icon\" aria-hidden=\"true\">\n <slot name=\"icon\">\n <wc-icon name=${this.variantIcon}></wc-icon>\n </slot>\n </div>\n\n <div class=\"content\">\n <div class=\"content-text\">\n <div class=\"title\">\n <slot name=\"title\"></slot>\n <slot></slot>\n </div>\n\n <div class=\"subtitle\">\n <slot name=\"subtitle\" @slotchange=${this.handleSubtitleSlotChange}></slot>\n </div>\n </div>\n\n ${this.action\n ? html`<div class=\"actions\">\n <wc-button\n class=\"action\"\n size=\"sm\"\n variant=${this.inline ? 'text' : 'outlined'}\n @click=${this.emitActionClick}\n >\n ${this.action}\n </wc-button>\n </div>`\n : nothing}\n </div>\n\n ${this.dismissible\n ? html`<div class=\"close-button-container\">\n <wc-icon-button\n class=\"close-button\"\n variant=\"text\"\n size=\"sm\"\n aria-label=\"Close notification\"\n @click=${() => {\n this.hideAndEmitDismiss('dismiss');\n }}\n >\n <wc-icon name=\"close\"></wc-icon>\n </wc-icon-button>\n </div>`\n : nothing}\n </div>\n `;\n }\n}\n"],"names":["LitElement","nothing","html","classMap","styles","property","state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAM,cAAc,GAAwC;AAC1D,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,KAAK,EAAE,OAAO;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,EAAE,OAAO,EAAE,IAAI,EAAE;AAAkB,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAE3C,UAAA,CAAA;AAAhB,IAAAC,CAAK;AAA4B,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAEjB,UAAA,CAAA;AAAhB,IAAAA,CAAK;AAA+B,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AArC1B,YAAY,GAAA,UAAA,CAAA;IADxB;AACY,CAAA,EAAA,YAAY,CA+JxB;;;;"}
|
package/dist/peacock-loader.js
CHANGED
|
@@ -1,28 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { A as Accordion, m as NavigationRailItem, N as NavigationRail, r as SelectOptionElement, q as Select, x as Snackbar, u as SidebarSubMenu, t as SidebarMenuItem, s as SidebarMenu, P as Pagination, K as Table, w as Slider, I as Image, f as Container, z as SubMenu, l as MenuItem, M as Menu, h as EmptyState, y as Spinner, R as Radio, C as Checkbox, G as Switch, c as BreadcrumbItem, b as Breadcrumb, W as Tooltip, V as TimePicker, D as DatePicker, U as Textarea, n as NumberField, X as UrlField, j as Input, F as Field, v as Skeleton, e as CircularProgress, L as LinearProgress, Q as Tag, d as Chip, k as Link, J as TabPanel, T as Tab, H as TabGroup, O as Tabs, o as Ripple, E as Elevation, g as Divider, p as SegmentedButtonGroup, S as SegmentedButton, B as Badge, a as Avatar, i as FocusRing } from './navigation-rail-DyO0oAZU.js';
|
|
2
|
+
import { F as FlowDesigner, I as Icon } from './flow-designer-dZnLJOQT.js';
|
|
3
|
+
import { Button } from './button.js';
|
|
4
|
+
import { ButtonGroup } from './button-group.js';
|
|
5
|
+
import { I as IconButton } from './icon-button-CK1ZuE-2.js';
|
|
6
|
+
import { Fab } from './fab.js';
|
|
7
|
+
import { SplitButton } from './split-button.js';
|
|
8
|
+
import { DropdownButton } from './dropdown-button.js';
|
|
9
|
+
import { P as Popover } from './popover-NC7b1lTq.js';
|
|
10
|
+
import { PopoverContent } from './popover-content.js';
|
|
5
11
|
import { Card } from './card.js';
|
|
6
12
|
import { CardContent } from './card-content.js';
|
|
7
13
|
import { Banner } from './banner.js';
|
|
8
14
|
import { Notification } from './notification.js';
|
|
15
|
+
import { NotificationManager } from './notification-manager.js';
|
|
9
16
|
import { BottomSheet } from './bottom-sheet.js';
|
|
10
17
|
import { SideSheet } from './side-sheet.js';
|
|
18
|
+
import { Modal } from './modal.js';
|
|
11
19
|
import { Search } from './search.js';
|
|
12
20
|
import { Toolbar } from './toolbar.js';
|
|
21
|
+
import { Calendar } from './calendar.js';
|
|
22
|
+
import { CalendarColumnView } from './calendar-column-view.js';
|
|
23
|
+
import { CalendarMonthView } from './calendar-month-view.js';
|
|
24
|
+
import { Canvas } from './canvas.js';
|
|
25
|
+
import { F as FlowDesignerNode } from './flow-designer-node-XMe-jlKg.js';
|
|
26
|
+
import { ConditionBuilder } from './condition-builder.js';
|
|
27
|
+
import { CbPredicate } from './cb-predicate.js';
|
|
28
|
+
import { CbCompoundExpression } from './cb-compound-expression.js';
|
|
29
|
+
import { CbExpression } from './cb-expression.js';
|
|
30
|
+
import { CbDivider } from './cb-divider.js';
|
|
13
31
|
import './IndividualComponent-DUINtMGK.js';
|
|
14
32
|
import './property-1psGvXOq.js';
|
|
15
|
-
import './state-DwbEjqVk.js';
|
|
16
|
-
import './directive-ZPhl09Yt.js';
|
|
17
|
-
import './unsafe-html-BsGUjx94.js';
|
|
18
33
|
import './class-map-YU7g0o3B.js';
|
|
34
|
+
import './directive-ZPhl09Yt.js';
|
|
35
|
+
import './state-DwbEjqVk.js';
|
|
19
36
|
import './observe-slot-change-BGJfgg2E.js';
|
|
20
37
|
import './query-QBcUV-L_.js';
|
|
38
|
+
import './BaseHyperlinkMixin-BNuwbiEf.js';
|
|
21
39
|
import './style-map-DVmWOuYy.js';
|
|
22
40
|
import './dispatch-event-utils-CuEqjlPT.js';
|
|
23
|
-
import './
|
|
24
|
-
import './
|
|
25
|
-
import './
|
|
41
|
+
import './BaseButton-BNFAYn-S.js';
|
|
42
|
+
import './BaseInput-14YmcfK7.js';
|
|
43
|
+
import './is-dark-mode-DOcaw4Yq.js';
|
|
44
|
+
import './unsafe-html-BsGUjx94.js';
|
|
45
|
+
import './button-colors-Ccys3hvS.js';
|
|
46
|
+
import './calendar-event-BrQ_SEKD.js';
|
|
47
|
+
import './event-manager-D-QCmUgR.js';
|
|
26
48
|
|
|
27
49
|
class LoaderUtils {
|
|
28
50
|
constructor(loaderConfig) {
|
|
@@ -181,6 +203,12 @@ const loaderConfig = {
|
|
|
181
203
|
'wc-segmented-button-group': {
|
|
182
204
|
CustomElementClass: SegmentedButtonGroup,
|
|
183
205
|
},
|
|
206
|
+
'wc-split-button': {
|
|
207
|
+
CustomElementClass: SplitButton,
|
|
208
|
+
},
|
|
209
|
+
'wc-dropdown-button': {
|
|
210
|
+
CustomElementClass: DropdownButton,
|
|
211
|
+
},
|
|
184
212
|
'wc-divider': {
|
|
185
213
|
CustomElementClass: Divider,
|
|
186
214
|
},
|
|
@@ -229,6 +257,9 @@ const loaderConfig = {
|
|
|
229
257
|
'wc-notification': {
|
|
230
258
|
CustomElementClass: Notification,
|
|
231
259
|
},
|
|
260
|
+
'wc-notification-manager': {
|
|
261
|
+
CustomElementClass: NotificationManager,
|
|
262
|
+
},
|
|
232
263
|
'wc-tag': {
|
|
233
264
|
CustomElementClass: Tag,
|
|
234
265
|
},
|
|
@@ -247,6 +278,9 @@ const loaderConfig = {
|
|
|
247
278
|
'wc-input': {
|
|
248
279
|
CustomElementClass: Input,
|
|
249
280
|
},
|
|
281
|
+
'wc-url-field': {
|
|
282
|
+
CustomElementClass: UrlField,
|
|
283
|
+
},
|
|
250
284
|
'wc-number-field': {
|
|
251
285
|
CustomElementClass: NumberField,
|
|
252
286
|
},
|
|
@@ -262,12 +296,21 @@ const loaderConfig = {
|
|
|
262
296
|
'wc-tooltip': {
|
|
263
297
|
CustomElementClass: Tooltip,
|
|
264
298
|
},
|
|
299
|
+
'wc-popover': {
|
|
300
|
+
CustomElementClass: Popover,
|
|
301
|
+
},
|
|
302
|
+
'wc-popover-content': {
|
|
303
|
+
CustomElementClass: PopoverContent,
|
|
304
|
+
},
|
|
265
305
|
'wc-number-counter': {
|
|
266
306
|
importPath: `${distDirectory}/number-counter.js`,
|
|
267
307
|
},
|
|
268
308
|
'wc-code-editor': {
|
|
269
309
|
importPath: `${distDirectory}/code-editor.js`,
|
|
270
310
|
},
|
|
311
|
+
'wc-html-editor': {
|
|
312
|
+
importPath: `${distDirectory}/html-editor.js`,
|
|
313
|
+
},
|
|
271
314
|
'wc-code-highlighter': {
|
|
272
315
|
importPath: `${distDirectory}/code-highlighter.js`,
|
|
273
316
|
},
|
|
@@ -316,11 +359,14 @@ const loaderConfig = {
|
|
|
316
359
|
'wc-pagination': {
|
|
317
360
|
CustomElementClass: Pagination,
|
|
318
361
|
},
|
|
319
|
-
'wc-
|
|
320
|
-
CustomElementClass:
|
|
362
|
+
'wc-sidebar-menu': {
|
|
363
|
+
CustomElementClass: SidebarMenu,
|
|
364
|
+
},
|
|
365
|
+
'wc-sidebar-menu-item': {
|
|
366
|
+
CustomElementClass: SidebarMenuItem,
|
|
321
367
|
},
|
|
322
|
-
'wc-
|
|
323
|
-
CustomElementClass:
|
|
368
|
+
'wc-sidebar-sub-menu': {
|
|
369
|
+
CustomElementClass: SidebarSubMenu,
|
|
324
370
|
},
|
|
325
371
|
'wc-snackbar': {
|
|
326
372
|
CustomElementClass: Snackbar,
|
|
@@ -331,6 +377,9 @@ const loaderConfig = {
|
|
|
331
377
|
'wc-side-sheet': {
|
|
332
378
|
CustomElementClass: SideSheet,
|
|
333
379
|
},
|
|
380
|
+
'wc-modal': {
|
|
381
|
+
CustomElementClass: Modal,
|
|
382
|
+
},
|
|
334
383
|
'wc-select': {
|
|
335
384
|
CustomElementClass: Select,
|
|
336
385
|
},
|
|
@@ -343,6 +392,30 @@ const loaderConfig = {
|
|
|
343
392
|
'wc-toolbar': {
|
|
344
393
|
CustomElementClass: Toolbar,
|
|
345
394
|
},
|
|
395
|
+
'wc-navigation-rail': {
|
|
396
|
+
CustomElementClass: NavigationRail,
|
|
397
|
+
},
|
|
398
|
+
'wc-navigation-rail-item': {
|
|
399
|
+
CustomElementClass: NavigationRailItem,
|
|
400
|
+
},
|
|
401
|
+
'wc-calendar': {
|
|
402
|
+
CustomElementClass: Calendar,
|
|
403
|
+
},
|
|
404
|
+
'wc-calendar-column-view': {
|
|
405
|
+
CustomElementClass: CalendarColumnView,
|
|
406
|
+
},
|
|
407
|
+
'wc-calendar-month-view': {
|
|
408
|
+
CustomElementClass: CalendarMonthView,
|
|
409
|
+
},
|
|
410
|
+
'wc-canvas': {
|
|
411
|
+
CustomElementClass: Canvas,
|
|
412
|
+
},
|
|
413
|
+
'wc-flow-designer': {
|
|
414
|
+
CustomElementClass: FlowDesigner,
|
|
415
|
+
},
|
|
416
|
+
'wc-flow-designer-node': {
|
|
417
|
+
CustomElementClass: FlowDesignerNode,
|
|
418
|
+
},
|
|
346
419
|
'wc-chart-doughnut': {
|
|
347
420
|
importPath: `${distDirectory}/chart-doughnut.js`,
|
|
348
421
|
},
|
|
@@ -355,6 +428,21 @@ const loaderConfig = {
|
|
|
355
428
|
'wc-chart-stacked-bar': {
|
|
356
429
|
importPath: `${distDirectory}/chart-stacked-bar.js`,
|
|
357
430
|
},
|
|
431
|
+
'wc-condition-builder': {
|
|
432
|
+
CustomElementClass: ConditionBuilder,
|
|
433
|
+
},
|
|
434
|
+
'wc-cb-predicate': {
|
|
435
|
+
CustomElementClass: CbPredicate,
|
|
436
|
+
},
|
|
437
|
+
'wc-cb-compound-expression': {
|
|
438
|
+
CustomElementClass: CbCompoundExpression,
|
|
439
|
+
},
|
|
440
|
+
'wc-cb-expression': {
|
|
441
|
+
CustomElementClass: CbExpression,
|
|
442
|
+
},
|
|
443
|
+
'wc-cb-divider': {
|
|
444
|
+
CustomElementClass: CbDivider,
|
|
445
|
+
},
|
|
358
446
|
},
|
|
359
447
|
};
|
|
360
448
|
new LoaderUtils(loaderConfig).start();
|