@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.
Files changed (314) hide show
  1. package/dist/BaseButton-BNFAYn-S.js +219 -0
  2. package/dist/BaseButton-BNFAYn-S.js.map +1 -0
  3. package/dist/BaseHyperlinkMixin-BNuwbiEf.js +65 -0
  4. package/dist/BaseHyperlinkMixin-BNuwbiEf.js.map +1 -0
  5. package/dist/BaseInput-14YmcfK7.js +27 -0
  6. package/dist/BaseInput-14YmcfK7.js.map +1 -0
  7. package/dist/assets/components.css +1 -1
  8. package/dist/assets/components.css.map +1 -1
  9. package/dist/assets/styles.css +1 -1
  10. package/dist/assets/styles.css.map +1 -1
  11. package/dist/banner.js +14 -30
  12. package/dist/banner.js.map +1 -1
  13. package/dist/{button-DMN1dPAg.js → button-colors-Ccys3hvS.js} +5 -468
  14. package/dist/button-colors-Ccys3hvS.js.map +1 -0
  15. package/dist/button-group.js +228 -8
  16. package/dist/button-group.js.map +1 -1
  17. package/dist/button.js +294 -8
  18. package/dist/button.js.map +1 -1
  19. package/dist/calendar-column-view.js +634 -0
  20. package/dist/calendar-column-view.js.map +1 -0
  21. package/dist/calendar-event-BrQ_SEKD.js +199 -0
  22. package/dist/calendar-event-BrQ_SEKD.js.map +1 -0
  23. package/dist/calendar-month-view.js +376 -0
  24. package/dist/calendar-month-view.js.map +1 -0
  25. package/dist/calendar.js +339 -0
  26. package/dist/calendar.js.map +1 -0
  27. package/dist/canvas.js +361 -0
  28. package/dist/canvas.js.map +1 -0
  29. package/dist/card.js +18 -73
  30. package/dist/card.js.map +1 -1
  31. package/dist/cb-compound-expression.js +125 -0
  32. package/dist/cb-compound-expression.js.map +1 -0
  33. package/dist/cb-divider.js +150 -0
  34. package/dist/cb-divider.js.map +1 -0
  35. package/dist/cb-expression.js +75 -0
  36. package/dist/cb-expression.js.map +1 -0
  37. package/dist/cb-predicate.js +137 -0
  38. package/dist/cb-predicate.js.map +1 -0
  39. package/dist/chart-bar.js.map +1 -1
  40. package/dist/chart-doughnut.js +2 -2
  41. package/dist/chart-doughnut.js.map +1 -1
  42. package/dist/chart-pie.js +2 -2
  43. package/dist/chart-pie.js.map +1 -1
  44. package/dist/chart-stacked-bar.js.map +1 -1
  45. package/dist/code-editor.js +2 -1
  46. package/dist/code-editor.js.map +1 -1
  47. package/dist/code-highlighter.js +2 -1
  48. package/dist/code-highlighter.js.map +1 -1
  49. package/dist/condition-builder.js +58 -0
  50. package/dist/condition-builder.js.map +1 -0
  51. package/dist/custom-elements-jsdocs.json +10860 -5567
  52. package/dist/custom-elements.json +16180 -7996
  53. package/dist/dropdown-button.js +216 -0
  54. package/dist/dropdown-button.js.map +1 -0
  55. package/dist/event-manager-D-QCmUgR.js +113 -0
  56. package/dist/event-manager-D-QCmUgR.js.map +1 -0
  57. package/dist/fab.js +421 -9
  58. package/dist/fab.js.map +1 -1
  59. package/dist/flow-designer-dZnLJOQT.js +1656 -0
  60. package/dist/flow-designer-dZnLJOQT.js.map +1 -0
  61. package/dist/flow-designer-node-XMe-jlKg.js +548 -0
  62. package/dist/flow-designer-node-XMe-jlKg.js.map +1 -0
  63. package/dist/flow-designer-node.js +4 -0
  64. package/dist/flow-designer-node.js.map +1 -0
  65. package/dist/flow-designer.js +16 -0
  66. package/dist/flow-designer.js.map +1 -0
  67. package/dist/html-editor.js +358 -0
  68. package/dist/html-editor.js.map +1 -0
  69. package/dist/icon-button-CK1ZuE-2.js +247 -0
  70. package/dist/icon-button-CK1ZuE-2.js.map +1 -0
  71. package/dist/index.js +31 -8
  72. package/dist/index.js.map +1 -1
  73. package/dist/{is-dark-mode-DicqGkCJ.js → is-dark-mode-DOcaw4Yq.js} +2 -27
  74. package/dist/is-dark-mode-DOcaw4Yq.js.map +1 -0
  75. package/dist/modal.js +418 -0
  76. package/dist/modal.js.map +1 -0
  77. package/dist/{select-4pl4XBj7.js → navigation-rail-DyO0oAZU.js} +2000 -2767
  78. package/dist/navigation-rail-DyO0oAZU.js.map +1 -0
  79. package/dist/notification-manager.js +268 -0
  80. package/dist/notification-manager.js.map +1 -0
  81. package/dist/notification.js +3 -2
  82. package/dist/notification.js.map +1 -1
  83. package/dist/peacock-loader.js +102 -14
  84. package/dist/peacock-loader.js.map +1 -1
  85. package/dist/popover-NC7b1lTq.js +1971 -0
  86. package/dist/popover-NC7b1lTq.js.map +1 -0
  87. package/dist/popover-content.js +125 -0
  88. package/dist/popover-content.js.map +1 -0
  89. package/dist/popover.js +4 -0
  90. package/dist/popover.js.map +1 -0
  91. package/dist/search.js +4 -0
  92. package/dist/search.js.map +1 -1
  93. package/dist/split-button.js +388 -0
  94. package/dist/split-button.js.map +1 -0
  95. package/dist/src/__controllers/floating-controller.d.ts +35 -0
  96. package/dist/src/__mixins/BaseButtonMixin.d.ts +20 -0
  97. package/dist/src/__mixins/BaseHyperlinkMixin.d.ts +18 -0
  98. package/dist/src/__mixins/MixinConstructor.d.ts +1 -0
  99. package/dist/src/banner/banner.d.ts +0 -4
  100. package/dist/src/button/BaseButton.d.ts +4 -47
  101. package/dist/src/button/button/button.d.ts +32 -3
  102. package/dist/src/button/button-group/button-group.d.ts +2 -2
  103. package/dist/src/button/icon-button/icon-button.d.ts +33 -8
  104. package/dist/src/calendar/base-event.d.ts +10 -0
  105. package/dist/src/calendar/calendar-column-view.d.ts +41 -0
  106. package/dist/src/calendar/calendar-event.d.ts +7 -0
  107. package/dist/src/calendar/calendar-month-view.d.ts +31 -0
  108. package/dist/src/calendar/calendar.d.ts +65 -0
  109. package/dist/src/calendar/event-manager.d.ts +17 -0
  110. package/dist/src/calendar/index.d.ts +4 -0
  111. package/dist/src/calendar/types.d.ts +13 -0
  112. package/dist/src/calendar/utils.d.ts +31 -0
  113. package/dist/src/canvas/canvas.d.ts +92 -0
  114. package/dist/src/canvas/index.d.ts +2 -0
  115. package/dist/src/card/card.d.ts +4 -15
  116. package/dist/src/condition-builder/cb-compound-expression.d.ts +31 -0
  117. package/dist/src/condition-builder/cb-divider.d.ts +26 -0
  118. package/dist/src/condition-builder/cb-expression.d.ts +31 -0
  119. package/dist/src/condition-builder/cb-predicate.d.ts +30 -0
  120. package/dist/src/condition-builder/condition-builder.d.ts +27 -0
  121. package/dist/src/condition-builder/index.d.ts +5 -0
  122. package/dist/src/dropdown-button/dropdown-button.d.ts +68 -0
  123. package/dist/src/dropdown-button/index.d.ts +1 -0
  124. package/dist/src/fab/fab.d.ts +4 -35
  125. package/dist/src/flow-designer/commands.d.ts +66 -0
  126. package/dist/src/flow-designer/flow-designer-node.d.ts +46 -0
  127. package/dist/src/flow-designer/flow-designer.d.ts +133 -0
  128. package/dist/src/flow-designer/index.d.ts +7 -0
  129. package/dist/src/flow-designer/layout.d.ts +30 -0
  130. package/dist/src/flow-designer/types.d.ts +142 -0
  131. package/dist/src/flow-designer/validation.d.ts +43 -0
  132. package/dist/src/flow-designer/workflow-utils.d.ts +40 -0
  133. package/dist/src/focus-ring/focus-ring.d.ts +11 -5
  134. package/dist/src/html-editor/html-editor.d.ts +56 -0
  135. package/dist/src/html-editor/index.d.ts +2 -0
  136. package/dist/src/index.d.ts +16 -1
  137. package/dist/src/link/link.d.ts +1 -1
  138. package/dist/src/menu/menu/menu.d.ts +5 -7
  139. package/dist/src/menu/menu-item/menu-item.d.ts +14 -13
  140. package/dist/src/modal/index.d.ts +1 -0
  141. package/dist/src/modal/modal.d.ts +63 -0
  142. package/dist/src/navigation-rail/index.d.ts +2 -0
  143. package/dist/src/navigation-rail/navigation-rail-item.d.ts +55 -0
  144. package/dist/src/navigation-rail/navigation-rail.d.ts +71 -0
  145. package/dist/src/notification-manager/index.d.ts +1 -0
  146. package/dist/src/notification-manager/notification-manager.d.ts +44 -0
  147. package/dist/src/popover/index.d.ts +2 -0
  148. package/dist/src/popover/popover-content.d.ts +29 -0
  149. package/dist/src/popover/popover.d.ts +62 -0
  150. package/dist/src/sidebar-menu/index.d.ts +3 -0
  151. package/dist/src/sidebar-menu/sidebar-menu-item.d.ts +58 -0
  152. package/dist/src/sidebar-menu/sidebar-menu.d.ts +38 -0
  153. package/dist/src/sidebar-menu/sidebar-sub-menu.d.ts +35 -0
  154. package/dist/src/split-button/index.d.ts +1 -0
  155. package/dist/src/split-button/split-button.d.ts +72 -0
  156. package/dist/src/toolbar/toolbar.d.ts +10 -10
  157. package/dist/src/tooltip/tooltip.d.ts +5 -15
  158. package/dist/src/url-field/index.d.ts +1 -0
  159. package/dist/src/url-field/url-field.d.ts +48 -0
  160. package/dist/test/flow-designer.test.d.ts +1 -0
  161. package/dist/test/sidebar-menu.test.d.ts +1 -0
  162. package/dist/toolbar.js +10 -10
  163. package/dist/toolbar.js.map +1 -1
  164. package/dist/tsconfig.tsbuildinfo +1 -1
  165. package/package.json +4 -2
  166. package/readme.md +73 -65
  167. package/scss/mixin.scss +16 -0
  168. package/src/__controllers/floating-controller.ts +237 -0
  169. package/src/__mixins/BaseButtonMixin.ts +83 -0
  170. package/src/__mixins/BaseHyperlinkMixin.ts +68 -0
  171. package/src/__mixins/MixinConstructor.ts +1 -0
  172. package/src/{__base_element → __mixins}/README.md +2 -2
  173. package/src/banner/banner.scss +20 -25
  174. package/src/banner/banner.ts +1 -7
  175. package/src/button/BaseButton.ts +11 -100
  176. package/src/button/button/button-sizes.scss +4 -2
  177. package/src/button/button/button.ts +77 -23
  178. package/src/button/button-group/button-group.ts +2 -2
  179. package/src/button/icon-button/icon-button.ts +75 -33
  180. package/src/calendar/base-event.ts +49 -0
  181. package/src/calendar/calendar-column-view.scss +326 -0
  182. package/src/calendar/calendar-column-view.ts +392 -0
  183. package/src/calendar/calendar-event.ts +20 -0
  184. package/src/calendar/calendar-month-view.scss +192 -0
  185. package/src/calendar/calendar-month-view.ts +244 -0
  186. package/src/calendar/calendar.scss +71 -0
  187. package/src/calendar/calendar.ts +298 -0
  188. package/src/calendar/event-manager.ts +117 -0
  189. package/src/calendar/index.ts +4 -0
  190. package/src/calendar/types.ts +14 -0
  191. package/src/calendar/utils.ts +180 -0
  192. package/src/canvas/canvas.scss +60 -0
  193. package/src/canvas/canvas.ts +391 -0
  194. package/src/canvas/index.ts +2 -0
  195. package/src/card/card.ts +11 -71
  196. package/src/chart-bar/chart-bar.ts +9 -14
  197. package/src/chart-bar/chart-stacked-bar.ts +12 -18
  198. package/src/chart-doughnut/chart-doughnut.ts +23 -27
  199. package/src/chart-pie/chart-pie.ts +19 -23
  200. package/src/checkbox/checkbox.scss +17 -34
  201. package/src/checkbox/checkbox.ts +3 -1
  202. package/src/code-highlighter/code-highlighter.scss +1 -0
  203. package/src/code-highlighter/code-highlighter.ts +1 -1
  204. package/src/condition-builder/cb-compound-expression.scss +37 -0
  205. package/src/condition-builder/cb-compound-expression.ts +80 -0
  206. package/src/condition-builder/cb-divider.scss +93 -0
  207. package/src/condition-builder/cb-divider.ts +56 -0
  208. package/src/condition-builder/cb-expression.scss +14 -0
  209. package/src/condition-builder/cb-expression.ts +49 -0
  210. package/src/condition-builder/cb-predicate.scss +35 -0
  211. package/src/condition-builder/cb-predicate.ts +102 -0
  212. package/src/condition-builder/condition-builder.scss +13 -0
  213. package/src/condition-builder/condition-builder.ts +38 -0
  214. package/src/condition-builder/index.ts +5 -0
  215. package/src/date-picker/date-picker.ts +1 -1
  216. package/src/dropdown-button/demo/index.html +110 -0
  217. package/src/dropdown-button/dropdown-button.scss +22 -0
  218. package/src/dropdown-button/dropdown-button.ts +206 -0
  219. package/src/dropdown-button/index.ts +1 -0
  220. package/src/elevation/elevation.scss +5 -5
  221. package/src/fab/fab.ts +29 -100
  222. package/src/flow-designer/DEMO.md +239 -0
  223. package/src/flow-designer/commands.ts +278 -0
  224. package/src/flow-designer/flow-designer-node.ts +172 -0
  225. package/src/flow-designer/flow-designer.scss +457 -0
  226. package/src/flow-designer/flow-designer.ts +611 -0
  227. package/src/flow-designer/index.ts +41 -0
  228. package/src/flow-designer/layout.ts +357 -0
  229. package/src/flow-designer/types.ts +166 -0
  230. package/src/flow-designer/validation.ts +284 -0
  231. package/src/flow-designer/workflow-utils.ts +282 -0
  232. package/src/focus-ring/focus-ring.ts +47 -40
  233. package/src/html-editor/html-editor.scss +146 -0
  234. package/src/html-editor/html-editor.ts +276 -0
  235. package/src/html-editor/index.ts +3 -0
  236. package/src/index.ts +28 -1
  237. package/src/input/input.ts +3 -1
  238. package/src/link/link.ts +2 -2
  239. package/src/menu/menu/menu.scss +2 -2
  240. package/src/menu/menu/menu.ts +91 -101
  241. package/src/menu/menu-item/menu-item.scss +4 -0
  242. package/src/menu/menu-item/menu-item.ts +85 -79
  243. package/src/modal/index.ts +1 -0
  244. package/src/modal/modal.scss +206 -0
  245. package/src/modal/modal.ts +201 -0
  246. package/src/navigation-rail/index.ts +2 -0
  247. package/src/navigation-rail/navigation-rail-item.scss +216 -0
  248. package/src/navigation-rail/navigation-rail-item.ts +223 -0
  249. package/src/navigation-rail/navigation-rail.scss +72 -0
  250. package/src/navigation-rail/navigation-rail.ts +149 -0
  251. package/src/notification/notification.ts +3 -2
  252. package/src/notification-manager/index.ts +1 -0
  253. package/src/notification-manager/notification-manager.scss +113 -0
  254. package/src/notification-manager/notification-manager.ts +199 -0
  255. package/src/number-field/number-field.ts +6 -4
  256. package/src/pagination/pagination.ts +6 -4
  257. package/src/peacock-loader.ts +93 -5
  258. package/src/popover/index.ts +2 -0
  259. package/src/popover/popover-content.scss +69 -0
  260. package/src/popover/popover-content.ts +51 -0
  261. package/src/popover/popover.scss +7 -0
  262. package/src/popover/popover.ts +170 -0
  263. package/src/search/search.ts +4 -0
  264. package/src/sidebar-menu/demo/index.html +68 -0
  265. package/src/sidebar-menu/index.ts +3 -0
  266. package/src/sidebar-menu/sidebar-menu-item.scss +102 -0
  267. package/src/sidebar-menu/sidebar-menu-item.ts +151 -0
  268. package/src/{tree-view/tree-view.scss → sidebar-menu/sidebar-menu.scss} +1 -1
  269. package/src/sidebar-menu/sidebar-menu.ts +182 -0
  270. package/src/sidebar-menu/sidebar-sub-menu.scss +130 -0
  271. package/src/sidebar-menu/sidebar-sub-menu.ts +160 -0
  272. package/src/skeleton/skeleton.scss +18 -24
  273. package/src/snackbar/snackbar.ts +1 -1
  274. package/src/split-button/index.ts +1 -0
  275. package/src/split-button/split-button-colors.scss +56 -0
  276. package/src/split-button/split-button-sizes.scss +28 -0
  277. package/src/split-button/split-button.scss +79 -0
  278. package/src/split-button/split-button.ts +236 -0
  279. package/src/table/table.ts +2 -2
  280. package/src/tabs/tab.ts +4 -3
  281. package/src/text/text.css-component.scss +7 -1
  282. package/src/time-picker/time-picker.ts +1 -1
  283. package/src/toolbar/toolbar.ts +10 -10
  284. package/src/tooltip/tooltip.scss +4 -3
  285. package/src/tooltip/tooltip.ts +64 -98
  286. package/src/url-field/index.ts +1 -0
  287. package/src/url-field/url-field.scss +50 -0
  288. package/src/url-field/url-field.ts +239 -0
  289. package/dist/button-DMN1dPAg.js.map +0 -1
  290. package/dist/button-group-CX9CUUXk.js +0 -435
  291. package/dist/button-group-CX9CUUXk.js.map +0 -1
  292. package/dist/fab-C5Nzxk0E.js +0 -497
  293. package/dist/fab-C5Nzxk0E.js.map +0 -1
  294. package/dist/is-dark-mode-DicqGkCJ.js.map +0 -1
  295. package/dist/select-4pl4XBj7.js.map +0 -1
  296. package/dist/spread-B5cgadZl.js +0 -32
  297. package/dist/spread-B5cgadZl.js.map +0 -1
  298. package/dist/src/__base_element/BaseHyperlink.d.ts +0 -20
  299. package/dist/src/menu/menu/MenuSurfaceController.d.ts +0 -18
  300. package/dist/src/tree-view/index.d.ts +0 -2
  301. package/dist/src/tree-view/tree-node.d.ts +0 -69
  302. package/dist/src/tree-view/tree-view.d.ts +0 -40
  303. package/dist/src/tree-view/wc-tree-view.d.ts +0 -6
  304. package/dist/test/tree-view.test.d.ts +0 -1
  305. package/dist/throttle-C7ZAPqtu.js +0 -24
  306. package/dist/throttle-C7ZAPqtu.js.map +0 -1
  307. package/src/__base_element/BaseHyperlink.ts +0 -42
  308. package/src/menu/menu/MenuSurfaceController.ts +0 -61
  309. package/src/tree-view/demo/index.html +0 -57
  310. package/src/tree-view/index.ts +0 -2
  311. package/src/tree-view/tree-node.scss +0 -101
  312. package/src/tree-view/tree-node.ts +0 -268
  313. package/src/tree-view/tree-view.ts +0 -182
  314. package/src/tree-view/wc-tree-view.ts +0 -9
@@ -0,0 +1,199 @@
1
+ import { LitElement, html, nothing } from 'lit';
2
+ import { property, state } from 'lit/decorators.js';
3
+ import { classMap } from 'lit/directives/class-map.js';
4
+
5
+ import IndividualComponent from '@/IndividualComponent.js';
6
+ import styles from './notification-manager.scss';
7
+
8
+ type NotificationVariant = 'success' | 'error' | 'info' | 'warning';
9
+
10
+ type NotificationEntry = {
11
+ id: string;
12
+ title: string;
13
+ subtitle?: string;
14
+ action?: string;
15
+ variant: NotificationVariant;
16
+ dismissible: boolean;
17
+ timeout: number;
18
+ hide: boolean;
19
+ width?: string;
20
+ };
21
+
22
+ let notificationCounter = 0;
23
+ function nextId(): string {
24
+ return `wc-notification-${++notificationCounter}`;
25
+ }
26
+
27
+ /**
28
+ * @label Notification Manager
29
+ * @tag wc-notification-manager
30
+ * @rawTag notification-manager
31
+ * @summary The Notification Manager handles the organization and display of notifications within the application.
32
+ *
33
+ * @fires {CustomEvent} notification-manager-action - Fired when the action button of a managed notification is clicked. Detail: `{ id: string }`.
34
+ * @fires {CustomEvent} notification-manager-dismiss - Fired when a managed notification is dismissed. Detail: `{ id: string }`.
35
+ *
36
+ * @example
37
+ * ```html
38
+ * <wc-notification-manager position="bottom-right"></wc-notification-manager>
39
+ * <script>
40
+ * window.dispatchEvent(new CustomEvent('notification', {
41
+ * detail: { title: 'Record saved', variant: 'success', dismissible: true }
42
+ * }));
43
+ * </script>
44
+ * ```
45
+ * @tags display, feedback
46
+ */
47
+ @IndividualComponent
48
+ export class NotificationManager extends LitElement {
49
+ static styles = [styles];
50
+
51
+ /**
52
+ * Name of this manager instance. Only notifications whose `target` matches
53
+ * this name (or whose `target` is absent and this manager's `name` is
54
+ * `'global'`) will be handled.
55
+ */
56
+ @property({ type: String, reflect: true }) name = 'global';
57
+
58
+ /**
59
+ * Screen position where notifications are stacked.
60
+ */
61
+ @property({ type: String, reflect: true })
62
+ position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' =
63
+ 'bottom-right';
64
+
65
+ @state() private notifications: NotificationEntry[] = [];
66
+
67
+ private readonly handleWindowNotification = (event: Event) => {
68
+ const evt = event as CustomEvent;
69
+ const detail = evt.detail ?? {};
70
+
71
+ // Route by target: accept if target matches our name, or if we are global
72
+ // and no specific target is set.
73
+ const target: string | undefined = detail.target;
74
+ const isForUs =
75
+ target === this.name || (!target && this.name === 'global');
76
+
77
+ if (!isForUs || detail.processed) {
78
+ return;
79
+ }
80
+
81
+ evt.stopPropagation();
82
+ detail.processed = true;
83
+
84
+ const entry: NotificationEntry = {
85
+ id: nextId(),
86
+ title: detail.title ?? '',
87
+ subtitle: detail.subtitle,
88
+ action: detail.action,
89
+ variant: detail.variant ?? 'info',
90
+ dismissible: detail.dismissible ?? false,
91
+ timeout: detail.timeout ?? 5000,
92
+ hide: false,
93
+ width: detail.width,
94
+ };
95
+
96
+ this.notifications = [...this.notifications, entry];
97
+
98
+ if (typeof detail.callback === 'function') {
99
+ detail.callback(entry.id);
100
+ }
101
+
102
+ if (!entry.dismissible) {
103
+ setTimeout(() => {
104
+ this._hideNotification(entry.id);
105
+ }, entry.timeout);
106
+ }
107
+ };
108
+
109
+ private readonly handleWindowDismiss = (event: Event) => {
110
+ const evt = event as CustomEvent;
111
+ const ids: string[] = evt.detail?.notifications ?? [];
112
+ ids.forEach(id => this._hideNotification(id));
113
+ };
114
+
115
+ connectedCallback() {
116
+ super.connectedCallback();
117
+ window.addEventListener('notification', this.handleWindowNotification);
118
+ window.addEventListener(
119
+ 'notification-dismiss',
120
+ this.handleWindowDismiss,
121
+ );
122
+ }
123
+
124
+ disconnectedCallback() {
125
+ window.removeEventListener(
126
+ 'notification',
127
+ this.handleWindowNotification,
128
+ );
129
+ window.removeEventListener(
130
+ 'notification-dismiss',
131
+ this.handleWindowDismiss,
132
+ );
133
+ super.disconnectedCallback();
134
+ }
135
+
136
+ private _hideNotification(id: string) {
137
+ this.notifications = this.notifications.map(n =>
138
+ n.id === id ? { ...n, hide: true } : n,
139
+ );
140
+ }
141
+
142
+ private _handleDismiss(id: string) {
143
+ this._hideNotification(id);
144
+ this.dispatchEvent(
145
+ new CustomEvent('notification-manager-dismiss', {
146
+ detail: { id },
147
+ bubbles: true,
148
+ composed: true,
149
+ }),
150
+ );
151
+ }
152
+
153
+ private _handleAction(id: string) {
154
+ this.dispatchEvent(
155
+ new CustomEvent('notification-manager-action', {
156
+ detail: { id },
157
+ bubbles: true,
158
+ composed: true,
159
+ }),
160
+ );
161
+ }
162
+
163
+ private renderNotification(n: NotificationEntry) {
164
+ return html`
165
+ <div
166
+ id=${n.id}
167
+ class=${classMap({ notification: true, hidden: n.hide })}
168
+ style=${n.width ? `width: ${n.width}` : nothing}
169
+ >
170
+ <wc-notification
171
+ variant=${n.variant}
172
+ ?dismissible=${n.dismissible}
173
+ managed
174
+ action=${n.action ?? nothing}
175
+ @notification-dismiss=${() => this._handleDismiss(n.id)}
176
+ @notification-action-click=${() => this._handleAction(n.id)}
177
+ >
178
+ <span slot="title">${n.title}</span>
179
+ ${n.subtitle
180
+ ? html`<span slot="subtitle">${n.subtitle}</span>`
181
+ : nothing}
182
+ </wc-notification>
183
+ </div>
184
+ `;
185
+ }
186
+
187
+ render() {
188
+ return html`
189
+ <div
190
+ class=${classMap({
191
+ 'notification-manager': true,
192
+ [`position-${this.position}`]: true,
193
+ })}
194
+ >
195
+ ${this.notifications.map(n => this.renderNotification(n))}
196
+ </div>
197
+ `;
198
+ }
199
+ }
@@ -170,11 +170,12 @@ export class NumberField extends BaseInput {
170
170
  ${this.stepper && !this.disabled
171
171
  ? html`<wc-icon-button
172
172
  class="stepper"
173
- name="remove"
174
173
  variant="text"
175
174
  slot="field-start"
176
175
  @click=${this.stepDown}
177
- ></wc-icon-button>`
176
+ >
177
+ <wc-icon name="remove"></wc-icon>
178
+ </wc-icon-button>`
178
179
  : nothing}
179
180
 
180
181
  <slot name="start" slot="field-start"></slot>
@@ -206,10 +207,11 @@ export class NumberField extends BaseInput {
206
207
  ? html`<wc-icon-button
207
208
  class="stepper"
208
209
  variant="text"
209
- name="add"
210
210
  slot="field-end"
211
211
  @click=${this.stepUp}
212
- ></wc-icon-button>`
212
+ >
213
+ <wc-icon name="add"></wc-icon>
214
+ </wc-icon-button>`
213
215
  : nothing}
214
216
  </wc-field>
215
217
  `;
@@ -166,21 +166,23 @@ export class Pagination extends LitElement {
166
166
  color="secondary"
167
167
  variant="text"
168
168
  size="sm"
169
- name="keyboard_arrow_left"
170
169
  title="Previous page"
171
170
  ?disabled=${isFirstPage}
172
171
  @click=${this.handlePreviousPage}
173
- ></wc-icon-button>
172
+ >
173
+ <wc-icon name="keyboard_arrow_left"></wc-icon>
174
+ </wc-icon-button>
174
175
  <wc-icon-button
175
176
  class="nav-button"
176
177
  color="secondary"
177
178
  variant="text"
178
179
  size="sm"
179
- name="keyboard_arrow_right"
180
180
  title="Next page"
181
181
  ?disabled=${isLastPage}
182
182
  @click=${this.handleNextPage}
183
- ></wc-icon-button>
183
+ >
184
+ <wc-icon name="keyboard_arrow_right"></wc-icon>
185
+ </wc-icon-button>
184
186
  </div>
185
187
  </div>
186
188
  `;
@@ -14,7 +14,10 @@ import { IconButton } from './button/icon-button/icon-button.js';
14
14
  import { Fab } from './fab/fab.js';
15
15
  import { SegmentedButton } from './segmented-button/segmented-button.js';
16
16
  import { SegmentedButtonGroup } from './segmented-button/segmented-button-group.js';
17
+ import { SplitButton } from './split-button/split-button.js';
18
+ import { DropdownButton } from './dropdown-button/dropdown-button.js';
17
19
  import { Input } from './input/input.js';
20
+ import { UrlField } from './url-field/url-field.js';
18
21
  import { Field } from './field/field.js';
19
22
  import { NumberField } from './number-field/number-field.js';
20
23
  import { DatePicker } from './date-picker/date-picker.js';
@@ -36,6 +39,8 @@ import { LinearProgress } from './progress/linear-progress/linear-progress.js';
36
39
  import { CircularProgress } from './progress/circular-progress/circular-progress.js';
37
40
 
38
41
  import { Tooltip } from './tooltip/tooltip.js';
42
+ import { Popover } from './popover/popover.js';
43
+ import { PopoverContent } from './popover/popover-content.js';
39
44
  import { Breadcrumb, BreadcrumbItem } from './breadcrumb/index.js';
40
45
 
41
46
  import { Skeleton } from './skeleton/skeleton.js';
@@ -54,18 +59,35 @@ import { TabPanel } from './tabs/tab-panel.js';
54
59
  import { Slider } from './slider/slider.js';
55
60
  import { Table } from './table/table.js';
56
61
  import { Pagination } from './pagination/pagination.js';
57
- import { TreeView } from './tree-view/tree-view.js';
62
+ import { SidebarMenu } from './sidebar-menu/sidebar-menu.js';
63
+ import { SidebarMenuItem } from './sidebar-menu/sidebar-menu-item.js';
64
+ import { SidebarSubMenu } from './sidebar-menu/sidebar-sub-menu.js';
58
65
  import { Card } from './card/card.js';
59
66
  import { CardContent } from './card/card-content.js';
60
67
  import { Banner } from './banner/banner.js';
61
68
  import { Notification } from './notification/notification.js';
69
+ import { NotificationManager } from './notification-manager/notification-manager.js';
62
70
  import { Snackbar } from './snackbar/snackbar.js';
63
71
  import { BottomSheet } from './bottom-sheet/bottom-sheet.js';
64
72
  import { SideSheet } from './side-sheet/side-sheet.js';
73
+ import { Modal } from './modal/modal.js';
65
74
  import { Select } from './select/select.js';
66
75
  import { SelectOptionElement } from './select/option.js';
67
76
  import { Search } from './search/search.js';
68
77
  import { Toolbar } from './toolbar/toolbar.js';
78
+ import { NavigationRail } from './navigation-rail/navigation-rail.js';
79
+ import { NavigationRailItem } from './navigation-rail/navigation-rail-item.js';
80
+ import { Calendar } from './calendar/calendar.js';
81
+ import { CalendarColumnView } from './calendar/calendar-column-view.js';
82
+ import { CalendarMonthView } from './calendar/calendar-month-view.js';
83
+ import { Canvas } from './canvas/canvas.js';
84
+ import { FlowDesigner } from './flow-designer/flow-designer.js';
85
+ import { FlowDesignerNode } from './flow-designer/flow-designer-node.js';
86
+ import { ConditionBuilder } from './condition-builder/condition-builder.js';
87
+ import { CbPredicate } from './condition-builder/cb-predicate.js';
88
+ import { CbCompoundExpression } from './condition-builder/cb-compound-expression.js';
89
+ import { CbExpression } from './condition-builder/cb-expression.js';
90
+ import { CbDivider } from './condition-builder/cb-divider.js';
69
91
 
70
92
  const distDirectory = `${import.meta.url}/..`;
71
93
  await loadCSS(`${distDirectory}/assets/styles.css`);
@@ -123,6 +145,12 @@ const loaderConfig: LoaderConfig = {
123
145
  'wc-segmented-button-group': {
124
146
  CustomElementClass: SegmentedButtonGroup,
125
147
  },
148
+ 'wc-split-button': {
149
+ CustomElementClass: SplitButton,
150
+ },
151
+ 'wc-dropdown-button': {
152
+ CustomElementClass: DropdownButton,
153
+ },
126
154
  'wc-divider': {
127
155
  CustomElementClass: Divider,
128
156
  },
@@ -171,6 +199,9 @@ const loaderConfig: LoaderConfig = {
171
199
  'wc-notification': {
172
200
  CustomElementClass: Notification,
173
201
  },
202
+ 'wc-notification-manager': {
203
+ CustomElementClass: NotificationManager,
204
+ },
174
205
  'wc-tag': {
175
206
  CustomElementClass: Tag,
176
207
  },
@@ -190,6 +221,9 @@ const loaderConfig: LoaderConfig = {
190
221
  'wc-input': {
191
222
  CustomElementClass: Input,
192
223
  },
224
+ 'wc-url-field': {
225
+ CustomElementClass: UrlField,
226
+ },
193
227
  'wc-number-field': {
194
228
  CustomElementClass: NumberField,
195
229
  },
@@ -205,12 +239,21 @@ const loaderConfig: LoaderConfig = {
205
239
  'wc-tooltip': {
206
240
  CustomElementClass: Tooltip,
207
241
  },
242
+ 'wc-popover': {
243
+ CustomElementClass: Popover,
244
+ },
245
+ 'wc-popover-content': {
246
+ CustomElementClass: PopoverContent,
247
+ },
208
248
  'wc-number-counter': {
209
249
  importPath: `${distDirectory}/number-counter.js`,
210
250
  },
211
251
  'wc-code-editor': {
212
252
  importPath: `${distDirectory}/code-editor.js`,
213
253
  },
254
+ 'wc-html-editor': {
255
+ importPath: `${distDirectory}/html-editor.js`,
256
+ },
214
257
  'wc-code-highlighter': {
215
258
  importPath: `${distDirectory}/code-highlighter.js`,
216
259
  },
@@ -259,11 +302,14 @@ const loaderConfig: LoaderConfig = {
259
302
  'wc-pagination': {
260
303
  CustomElementClass: Pagination,
261
304
  },
262
- 'wc-tree-view': {
263
- CustomElementClass: TreeView,
305
+ 'wc-sidebar-menu': {
306
+ CustomElementClass: SidebarMenu,
307
+ },
308
+ 'wc-sidebar-menu-item': {
309
+ CustomElementClass: SidebarMenuItem,
264
310
  },
265
- 'wc-tree-node': {
266
- CustomElementClass: TreeView.Node,
311
+ 'wc-sidebar-sub-menu': {
312
+ CustomElementClass: SidebarSubMenu,
267
313
  },
268
314
  'wc-snackbar': {
269
315
  CustomElementClass: Snackbar,
@@ -274,6 +320,9 @@ const loaderConfig: LoaderConfig = {
274
320
  'wc-side-sheet': {
275
321
  CustomElementClass: SideSheet,
276
322
  },
323
+ 'wc-modal': {
324
+ CustomElementClass: Modal,
325
+ },
277
326
  'wc-select': {
278
327
  CustomElementClass: Select,
279
328
  },
@@ -286,6 +335,30 @@ const loaderConfig: LoaderConfig = {
286
335
  'wc-toolbar': {
287
336
  CustomElementClass: Toolbar,
288
337
  },
338
+ 'wc-navigation-rail': {
339
+ CustomElementClass: NavigationRail,
340
+ },
341
+ 'wc-navigation-rail-item': {
342
+ CustomElementClass: NavigationRailItem,
343
+ },
344
+ 'wc-calendar': {
345
+ CustomElementClass: Calendar,
346
+ },
347
+ 'wc-calendar-column-view': {
348
+ CustomElementClass: CalendarColumnView,
349
+ },
350
+ 'wc-calendar-month-view': {
351
+ CustomElementClass: CalendarMonthView,
352
+ },
353
+ 'wc-canvas': {
354
+ CustomElementClass: Canvas,
355
+ },
356
+ 'wc-flow-designer': {
357
+ CustomElementClass: FlowDesigner,
358
+ },
359
+ 'wc-flow-designer-node': {
360
+ CustomElementClass: FlowDesignerNode,
361
+ },
289
362
  'wc-chart-doughnut': {
290
363
  importPath: `${distDirectory}/chart-doughnut.js`,
291
364
  },
@@ -298,6 +371,21 @@ const loaderConfig: LoaderConfig = {
298
371
  'wc-chart-stacked-bar': {
299
372
  importPath: `${distDirectory}/chart-stacked-bar.js`,
300
373
  },
374
+ 'wc-condition-builder': {
375
+ CustomElementClass: ConditionBuilder,
376
+ },
377
+ 'wc-cb-predicate': {
378
+ CustomElementClass: CbPredicate,
379
+ },
380
+ 'wc-cb-compound-expression': {
381
+ CustomElementClass: CbCompoundExpression,
382
+ },
383
+ 'wc-cb-expression': {
384
+ CustomElementClass: CbExpression,
385
+ },
386
+ 'wc-cb-divider': {
387
+ CustomElementClass: CbDivider,
388
+ },
301
389
  },
302
390
  };
303
391
 
@@ -1 +1,3 @@
1
1
  export { Tooltip } from '../tooltip/tooltip.js';
2
+ export { Popover } from './popover.js';
3
+ export { PopoverContent } from './popover-content.js';
@@ -0,0 +1,69 @@
1
+ @use "../../scss/mixin";
2
+
3
+ @include mixin.base-styles;
4
+
5
+ :host {
6
+ position: fixed;
7
+ top: 0;
8
+ left: 0;
9
+ z-index: var(--z-index-popover, 1000);
10
+ pointer-events: none;
11
+
12
+ /**
13
+ * @prop --popover-content-background: Background color of the popover content
14
+ */
15
+ --popover-content-background: var(--color-surface-container);
16
+
17
+ /**
18
+ * @prop --popover-content-padding: Padding of the popover content
19
+ */
20
+ --popover-content-padding: var(--spacing-200);
21
+
22
+ /**
23
+ * @prop --popover-content-border-radius: Border radius of the popover content
24
+ */
25
+ --popover-content-border-radius: var(--shape-corner-small);
26
+
27
+ /**
28
+ * @prop --popover-content-min-width: Minimum width of the popover content
29
+ */
30
+ --popover-content-min-width: 10rem;
31
+ }
32
+
33
+ :host([open]) {
34
+ pointer-events: auto;
35
+ }
36
+
37
+ .popover-content {
38
+ position: relative;
39
+ background: var(--popover-content-background);
40
+ padding: var(--popover-content-padding);
41
+ border-radius: var(--popover-content-border-radius);
42
+ min-width: var(--popover-content-min-width);
43
+ color: var(--color-on-surface);
44
+
45
+ transform: scale(0.9);
46
+ opacity: 0;
47
+ transition:
48
+ transform var(--duration-short2, 0.1s) var(--easing-standard, ease-in-out),
49
+ opacity var(--duration-short2, 0.1s) var(--easing-standard, ease-in-out);
50
+
51
+ &.open {
52
+ transform: scale(1);
53
+ opacity: 1;
54
+ }
55
+ }
56
+
57
+ .elevation {
58
+ --elevation-level: 2;
59
+ --elevation-container-shape: var(--popover-content-border-radius, var(--shape-corner-small));
60
+ }
61
+
62
+ .arrow {
63
+ width: 0.75rem;
64
+ height: 0.75rem;
65
+ background: var(--popover-content-background);
66
+ position: absolute;
67
+ z-index: -1;
68
+ display: none;
69
+ }
@@ -0,0 +1,51 @@
1
+ import { html, LitElement } from 'lit';
2
+ import { property } from 'lit/decorators.js';
3
+ import { classMap } from 'lit/directives/class-map.js';
4
+ import IndividualComponent from '@/IndividualComponent.js';
5
+ import styles from './popover-content.scss';
6
+
7
+ /**
8
+ * @label Popover Content
9
+ * @tag wc-popover-content
10
+ * @rawTag popover-content
11
+ * @summary Content container for the wc-popover component.
12
+ * @childComponent true
13
+ * @tags display
14
+ *
15
+ * @cssprop --popover-content-background - Background color of the popover content. Defaults to `var(--color-surface-container)`.
16
+ * @cssprop --popover-content-padding - Padding of the popover content. Defaults to `var(--spacing-200)`.
17
+ * @cssprop --popover-content-border-radius - Border radius of the popover content. Defaults to `var(--shape-corner-small)`.
18
+ * @cssprop --popover-content-min-width - Minimum width of the popover content. Defaults to `10rem`.
19
+ *
20
+ * @example
21
+ * ```html
22
+ * <wc-popover-content>
23
+ * <p>Popover body text</p>
24
+ * </wc-popover-content>
25
+ * ```
26
+ */
27
+ @IndividualComponent
28
+ export class PopoverContent extends LitElement {
29
+ static styles = [styles];
30
+
31
+ /**
32
+ * Whether the popover content is visible.
33
+ */
34
+ @property({ type: Boolean, reflect: true }) open = false;
35
+
36
+ render() {
37
+ return html`
38
+ <div
39
+ class=${classMap({
40
+ 'popover-content': true,
41
+ open: this.open,
42
+ })}
43
+ part="container"
44
+ >
45
+ <slot></slot>
46
+ <wc-elevation class="elevation"></wc-elevation>
47
+ <div class="arrow" part="arrow"></div>
48
+ </div>
49
+ `;
50
+ }
51
+ }
@@ -0,0 +1,7 @@
1
+ @use "../../scss/mixin";
2
+
3
+ @include mixin.base-styles;
4
+
5
+ :host {
6
+ display: inline-block;
7
+ }