@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,358 @@
1
+ import { a as i, _ as __decorate, I as IndividualComponent, b, A } from './IndividualComponent-DUINtMGK.js';
2
+ import { n } from './property-1psGvXOq.js';
3
+ import { r } from './state-DwbEjqVk.js';
4
+ import { e } from './query-QBcUV-L_.js';
5
+ import { e as e$1 } from './class-map-YU7g0o3B.js';
6
+ import { B as BaseInput } from './BaseInput-14YmcfK7.js';
7
+ import { r as redispatchEvent } from './dispatch-event-utils-CuEqjlPT.js';
8
+ import './directive-ZPhl09Yt.js';
9
+
10
+ var css_248z = i`* {
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ .screen-reader-only {
15
+ display: none !important;
16
+ }
17
+
18
+ :host {
19
+ display: block;
20
+ width: 100%;
21
+ }
22
+
23
+ .html-editor-field {
24
+ --field-height: auto;
25
+ --field-padding-block: 0;
26
+ width: 100%;
27
+ }
28
+
29
+ .html-editor-toolbar {
30
+ display: flex;
31
+ flex-wrap: wrap;
32
+ align-items: center;
33
+ gap: var(--spacing-025, 0.125rem);
34
+ padding: var(--spacing-050, 0.25rem) var(--spacing-100, 0.5rem);
35
+ background: var(--html-editor-toolbar-background, var(--color-surface-container, #f3edf7));
36
+ border-block-end: 1px solid var(--html-editor-toolbar-border-color, var(--color-outline-variant, #cac4d0));
37
+ border-start-start-radius: inherit;
38
+ border-start-end-radius: inherit;
39
+ }
40
+
41
+ .toolbar-btn {
42
+ display: inline-flex;
43
+ align-items: center;
44
+ justify-content: center;
45
+ width: 2rem;
46
+ height: 2rem;
47
+ padding: 0;
48
+ border: none;
49
+ border-radius: var(--shape-corner-extra-small, 0.25rem);
50
+ background: transparent;
51
+ color: var(--color-on-surface-variant, #49454f);
52
+ cursor: pointer;
53
+ transition: background 120ms ease, color 120ms ease;
54
+ }
55
+ .toolbar-btn:hover:not(:disabled) {
56
+ background: color-mix(in srgb, var(--color-on-surface-variant, #49454f) 8%, transparent);
57
+ }
58
+ .toolbar-btn:active:not(:disabled) {
59
+ background: color-mix(in srgb, var(--color-primary, #6750a4) 12%, transparent);
60
+ color: var(--color-primary, #6750a4);
61
+ }
62
+ .toolbar-btn:disabled {
63
+ opacity: 0.38;
64
+ cursor: not-allowed;
65
+ }
66
+ .toolbar-btn wc-icon {
67
+ pointer-events: none;
68
+ }
69
+
70
+ .toolbar-divider {
71
+ display: inline-block;
72
+ width: 1px;
73
+ height: 1.5rem;
74
+ background: var(--color-outline-variant, #cac4d0);
75
+ margin-inline: var(--spacing-025, 0.125rem);
76
+ flex-shrink: 0;
77
+ }
78
+
79
+ .html-editor-content {
80
+ min-height: var(--html-editor-min-height, 8rem);
81
+ padding: var(--spacing-200, 1rem) var(--spacing-150, 0.75rem);
82
+ outline: none;
83
+ color: var(--color-on-surface, #1c1b1f);
84
+ font-family: var(--typography-body-medium-font-family, inherit);
85
+ font-size: var(--typography-body-medium-font-size, 0.875rem);
86
+ line-height: var(--typography-body-medium-line-height, 1.5);
87
+ cursor: text;
88
+ word-break: break-word;
89
+ overflow-wrap: break-word;
90
+ }
91
+ .html-editor-content.is-empty::before {
92
+ content: attr(data-placeholder);
93
+ color: var(--color-on-surface-variant, #49454f);
94
+ opacity: 0.6;
95
+ pointer-events: none;
96
+ position: absolute;
97
+ }
98
+ .html-editor-content ul,
99
+ .html-editor-content ol {
100
+ padding-inline-start: 1.5rem;
101
+ margin-block: 0.25rem;
102
+ }
103
+ .html-editor-content a {
104
+ color: var(--color-primary, #6750a4);
105
+ text-decoration: underline;
106
+ }
107
+ .html-editor-content strong,
108
+ .html-editor-content b {
109
+ font-weight: 600;
110
+ }
111
+
112
+ .read-only-tag {
113
+ margin: var(--spacing-050, 0.25rem);
114
+ }
115
+
116
+ :host([disabled]) .html-editor-content,
117
+ :host([readonly]) .html-editor-content {
118
+ cursor: not-allowed;
119
+ opacity: 0.6;
120
+ }`;
121
+
122
+ /**
123
+ * @label HTML Editor
124
+ * @tag wc-html-editor
125
+ * @rawTag html-editor
126
+ *
127
+ * @summary A WYSIWYG HTML editor component with a Material 3 styled toolbar.
128
+ * @overview
129
+ * <p>The HTML Editor provides a rich-text editing experience using the browser's built-in
130
+ * <code>contenteditable</code> API. It wraps the editable area in a Material 3 styled
131
+ * <code>wc-field</code> and exposes a toolbar with common formatting actions.</p>
132
+ *
133
+ * <p>Get and set the HTML content via the <code>value</code> property. The component
134
+ * dispatches a <code>change</code> event whenever the content is modified.</p>
135
+ *
136
+ * @cssprop --html-editor-min-height - Minimum height of the editable area. Defaults to 8rem.
137
+ * @cssprop --html-editor-toolbar-background - Background color of the toolbar.
138
+ * @cssprop --html-editor-toolbar-border-color - Border color between toolbar and editing area.
139
+ *
140
+ * @fires {Event} change - Fired whenever the editable content changes.
141
+ *
142
+ * @example
143
+ * ```html
144
+ * <wc-html-editor label="Description" value="<p>Hello <strong>world</strong></p>"></wc-html-editor>
145
+ * ```
146
+ * @tags input editor
147
+ */
148
+ let HtmlEditor = class HtmlEditor extends BaseInput {
149
+ constructor() {
150
+ super(...arguments);
151
+ /** Current HTML value of the editor. */
152
+ this.value = '';
153
+ /** Label displayed above the editor. */
154
+ this.label = '';
155
+ /** Placeholder text shown when the editor is empty. */
156
+ this.placeholder = 'Enter text\u2026';
157
+ /** Visual style of the wrapping field. */
158
+ this.variant = 'default';
159
+ /** Helper text displayed below the editor. */
160
+ this.helperText = '';
161
+ /** Whether to show an error state. */
162
+ this.error = false;
163
+ /** Error message text. */
164
+ this.errorText = '';
165
+ this._focused = false;
166
+ }
167
+ // ─── Lifecycle ─────────────────────────────────────────────────────────────
168
+ firstUpdated() {
169
+ if (this.value && this._editorEl) {
170
+ this._editorEl.innerHTML = this.value;
171
+ }
172
+ }
173
+ updated(changed) {
174
+ if (changed.has('value') && this._editorEl) {
175
+ if (this._editorEl.innerHTML !== this.value) {
176
+ this._editorEl.innerHTML = this.value ?? '';
177
+ }
178
+ }
179
+ if (changed.has('disabled') || changed.has('readonly')) {
180
+ if (this._editorEl) {
181
+ this._editorEl.contentEditable =
182
+ this.disabled || this.readonly ? 'false' : 'true';
183
+ }
184
+ }
185
+ }
186
+ // ─── Private helpers ───────────────────────────────────────────────────────
187
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
188
+ _execCmd(command, value) {
189
+ if (this.disabled || this.readonly)
190
+ return;
191
+ this._editorEl.focus();
192
+ // execCommand is deprecated but remains broadly supported for rich-text editing
193
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
194
+ document.execCommand(command, false, value ?? null);
195
+ }
196
+ _handleInput() {
197
+ this.value = this._editorEl.innerHTML;
198
+ redispatchEvent(this, new Event('change', { bubbles: true, composed: true }));
199
+ }
200
+ _handleFocus() {
201
+ this._focused = true;
202
+ }
203
+ _handleBlur() {
204
+ this._focused = false;
205
+ }
206
+ _insertLink() {
207
+ // eslint-disable-next-line no-alert
208
+ const url = window.prompt('Enter URL:', 'https://');
209
+ if (url)
210
+ this._execCmd('createLink', url);
211
+ }
212
+ // ─── Toolbar button ────────────────────────────────────────────────────────
213
+ _toolbarButton(icon, title, command, value) {
214
+ return b `
215
+ <button
216
+ class="toolbar-btn"
217
+ title=${title}
218
+ aria-label=${title}
219
+ ?disabled=${this.disabled || this.readonly}
220
+ @mousedown=${(e) => e.preventDefault()}
221
+ @click=${(e) => {
222
+ e.preventDefault();
223
+ this._execCmd(command, value);
224
+ }}
225
+ >
226
+ <wc-icon name=${icon} size="sm"></wc-icon>
227
+ </button>
228
+ `;
229
+ }
230
+ // ─── Toolbar ───────────────────────────────────────────────────────────────
231
+ _renderToolbar() {
232
+ return b `
233
+ <div
234
+ class="html-editor-toolbar"
235
+ role="toolbar"
236
+ aria-label="Formatting toolbar"
237
+ >
238
+ ${this._toolbarButton('format_bold', 'Bold', 'bold')}
239
+ ${this._toolbarButton('format_italic', 'Italic', 'italic')}
240
+ ${this._toolbarButton('format_underlined', 'Underline', 'underline')}
241
+ ${this._toolbarButton('format_strikethrough', 'Strikethrough', 'strikeThrough')}
242
+
243
+ <span class="toolbar-divider"></span>
244
+
245
+ ${this._toolbarButton('format_align_left', 'Align left', 'justifyLeft')}
246
+ ${this._toolbarButton('format_align_center', 'Align center', 'justifyCenter')}
247
+ ${this._toolbarButton('format_align_right', 'Align right', 'justifyRight')}
248
+
249
+ <span class="toolbar-divider"></span>
250
+
251
+ ${this._toolbarButton('format_list_bulleted', 'Unordered list', 'insertUnorderedList')}
252
+ ${this._toolbarButton('format_list_numbered', 'Ordered list', 'insertOrderedList')}
253
+
254
+ <span class="toolbar-divider"></span>
255
+
256
+ ${this._toolbarButton('format_indent_increase', 'Indent', 'indent')}
257
+ ${this._toolbarButton('format_indent_decrease', 'Outdent', 'outdent')}
258
+
259
+ <span class="toolbar-divider"></span>
260
+
261
+ <button
262
+ class="toolbar-btn"
263
+ title="Insert link"
264
+ aria-label="Insert link"
265
+ ?disabled=${this.disabled || this.readonly}
266
+ @mousedown=${(e) => e.preventDefault()}
267
+ @click=${() => this._insertLink()}
268
+ >
269
+ <wc-icon name="link" size="sm"></wc-icon>
270
+ </button>
271
+
272
+ <span class="toolbar-divider"></span>
273
+
274
+ ${this._toolbarButton('undo', 'Undo', 'undo')}
275
+ ${this._toolbarButton('redo', 'Redo', 'redo')}
276
+ </div>
277
+ `;
278
+ }
279
+ // ─── Render ────────────────────────────────────────────────────────────────
280
+ render() {
281
+ const isEmpty = !this.value || this.value === '<br>';
282
+ return b `
283
+ <wc-field
284
+ label=${this.label}
285
+ ?required=${this.required}
286
+ ?disabled=${this.disabled}
287
+ ?readonly=${this.readonly}
288
+ ?skeleton=${this.skeleton}
289
+ ?focused=${this._focused}
290
+ ?error=${this.error}
291
+ error-text=${this.errorText}
292
+ helper-text=${this.helperText}
293
+ variant=${this.variant}
294
+ ?populated=${!isEmpty}
295
+ .host=${this}
296
+ class=${e$1({
297
+ 'html-editor-field': true,
298
+ disabled: this.disabled,
299
+ readonly: this.readonly,
300
+ })}
301
+ >
302
+ ${this._renderToolbar()}
303
+
304
+ <div
305
+ class=${e$1({
306
+ 'html-editor-content': true,
307
+ 'is-empty': isEmpty,
308
+ })}
309
+ contenteditable=${this.disabled || this.readonly ? 'false' : 'true'}
310
+ data-placeholder=${this.placeholder}
311
+ @input=${this._handleInput}
312
+ @focus=${this._handleFocus}
313
+ @blur=${this._handleBlur}
314
+ ></div>
315
+
316
+ ${this.disabled
317
+ ? b `<wc-tag class="read-only-tag" color="red">Disabled</wc-tag>`
318
+ : this.readonly
319
+ ? b `<wc-tag class="read-only-tag" color="red">Read Only</wc-tag>`
320
+ : A}
321
+ </wc-field>
322
+ `;
323
+ }
324
+ };
325
+ HtmlEditor.styles = [css_248z];
326
+ __decorate([
327
+ n({ type: String })
328
+ ], HtmlEditor.prototype, "value", void 0);
329
+ __decorate([
330
+ n({ type: String })
331
+ ], HtmlEditor.prototype, "label", void 0);
332
+ __decorate([
333
+ n({ type: String })
334
+ ], HtmlEditor.prototype, "placeholder", void 0);
335
+ __decorate([
336
+ n({ type: String })
337
+ ], HtmlEditor.prototype, "variant", void 0);
338
+ __decorate([
339
+ n({ type: String, attribute: 'helper-text' })
340
+ ], HtmlEditor.prototype, "helperText", void 0);
341
+ __decorate([
342
+ n({ type: Boolean })
343
+ ], HtmlEditor.prototype, "error", void 0);
344
+ __decorate([
345
+ n({ type: String, attribute: 'error-text' })
346
+ ], HtmlEditor.prototype, "errorText", void 0);
347
+ __decorate([
348
+ r()
349
+ ], HtmlEditor.prototype, "_focused", void 0);
350
+ __decorate([
351
+ e('.html-editor-content')
352
+ ], HtmlEditor.prototype, "_editorEl", void 0);
353
+ HtmlEditor = __decorate([
354
+ IndividualComponent
355
+ ], HtmlEditor);
356
+
357
+ export { HtmlEditor };
358
+ //# sourceMappingURL=html-editor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html-editor.js","sources":["../../src/html-editor/html-editor.ts"],"sourcesContent":["import { html, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport IndividualComponent from '@/IndividualComponent.js';\nimport BaseInput from '../input/BaseInput.js';\nimport { redispatchEvent } from '../__utils/dispatch-event-utils.js';\n\nimport styles from './html-editor.scss';\n\n/**\n * @label HTML Editor\n * @tag wc-html-editor\n * @rawTag html-editor\n *\n * @summary A WYSIWYG HTML editor component with a Material 3 styled toolbar.\n * @overview\n * <p>The HTML Editor provides a rich-text editing experience using the browser's built-in\n * <code>contenteditable</code> API. It wraps the editable area in a Material 3 styled\n * <code>wc-field</code> and exposes a toolbar with common formatting actions.</p>\n *\n * <p>Get and set the HTML content via the <code>value</code> property. The component\n * dispatches a <code>change</code> event whenever the content is modified.</p>\n *\n * @cssprop --html-editor-min-height - Minimum height of the editable area. Defaults to 8rem.\n * @cssprop --html-editor-toolbar-background - Background color of the toolbar.\n * @cssprop --html-editor-toolbar-border-color - Border color between toolbar and editing area.\n *\n * @fires {Event} change - Fired whenever the editable content changes.\n *\n * @example\n * ```html\n * <wc-html-editor label=\"Description\" value=\"<p>Hello <strong>world</strong></p>\"></wc-html-editor>\n * ```\n * @tags input editor\n */\n@IndividualComponent\nexport class HtmlEditor extends BaseInput {\n static styles = [styles];\n\n /** Current HTML value of the editor. */\n @property({ type: String })\n value = '';\n\n /** Label displayed above the editor. */\n @property({ type: String })\n label = '';\n\n /** Placeholder text shown when the editor is empty. */\n @property({ type: String })\n placeholder = 'Enter text\\u2026';\n\n /** Visual style of the wrapping field. */\n @property({ type: String })\n variant: 'filled' | 'outlined' | 'default' = 'default';\n\n /** Helper text displayed below the editor. */\n @property({ type: String, attribute: 'helper-text' })\n helperText = '';\n\n /** Whether to show an error state. */\n @property({ type: Boolean })\n error = false;\n\n /** Error message text. */\n @property({ type: String, attribute: 'error-text' })\n errorText = '';\n\n @state() private _focused = false;\n\n @query('.html-editor-content')\n private _editorEl!: HTMLDivElement;\n\n // ─── Lifecycle ─────────────────────────────────────────────────────────────\n\n protected firstUpdated() {\n if (this.value && this._editorEl) {\n this._editorEl.innerHTML = this.value;\n }\n }\n\n protected updated(changed: Map<string, unknown>) {\n if (changed.has('value') && this._editorEl) {\n if (this._editorEl.innerHTML !== this.value) {\n this._editorEl.innerHTML = this.value ?? '';\n }\n }\n if (changed.has('disabled') || changed.has('readonly')) {\n if (this._editorEl) {\n this._editorEl.contentEditable =\n this.disabled || this.readonly ? 'false' : 'true';\n }\n }\n }\n\n // ─── Private helpers ───────────────────────────────────────────────────────\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _execCmd(command: string, value?: string) {\n if (this.disabled || this.readonly) return;\n this._editorEl.focus();\n // execCommand is deprecated but remains broadly supported for rich-text editing\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (document as any).execCommand(command, false, value ?? null);\n }\n\n private _handleInput() {\n this.value = this._editorEl.innerHTML;\n redispatchEvent(\n this,\n new Event('change', { bubbles: true, composed: true }),\n );\n }\n\n private _handleFocus() {\n this._focused = true;\n }\n\n private _handleBlur() {\n this._focused = false;\n }\n\n private _insertLink() {\n // eslint-disable-next-line no-alert\n const url = window.prompt('Enter URL:', 'https://');\n if (url) this._execCmd('createLink', url);\n }\n\n // ─── Toolbar button ────────────────────────────────────────────────────────\n\n private _toolbarButton(\n icon: string,\n title: string,\n command: string,\n value?: string,\n ) {\n return html`\n <button\n class=\"toolbar-btn\"\n title=${title}\n aria-label=${title}\n ?disabled=${this.disabled || this.readonly}\n @mousedown=${(e: Event) => e.preventDefault()}\n @click=${(e: Event) => {\n e.preventDefault();\n this._execCmd(command, value);\n }}\n >\n <wc-icon name=${icon} size=\"sm\"></wc-icon>\n </button>\n `;\n }\n\n // ─── Toolbar ───────────────────────────────────────────────────────────────\n\n private _renderToolbar() {\n return html`\n <div\n class=\"html-editor-toolbar\"\n role=\"toolbar\"\n aria-label=\"Formatting toolbar\"\n >\n ${this._toolbarButton('format_bold', 'Bold', 'bold')}\n ${this._toolbarButton('format_italic', 'Italic', 'italic')}\n ${this._toolbarButton('format_underlined', 'Underline', 'underline')}\n ${this._toolbarButton(\n 'format_strikethrough',\n 'Strikethrough',\n 'strikeThrough',\n )}\n\n <span class=\"toolbar-divider\"></span>\n\n ${this._toolbarButton('format_align_left', 'Align left', 'justifyLeft')}\n ${this._toolbarButton(\n 'format_align_center',\n 'Align center',\n 'justifyCenter',\n )}\n ${this._toolbarButton(\n 'format_align_right',\n 'Align right',\n 'justifyRight',\n )}\n\n <span class=\"toolbar-divider\"></span>\n\n ${this._toolbarButton(\n 'format_list_bulleted',\n 'Unordered list',\n 'insertUnorderedList',\n )}\n ${this._toolbarButton(\n 'format_list_numbered',\n 'Ordered list',\n 'insertOrderedList',\n )}\n\n <span class=\"toolbar-divider\"></span>\n\n ${this._toolbarButton(\n 'format_indent_increase',\n 'Indent',\n 'indent',\n )}\n ${this._toolbarButton('format_indent_decrease', 'Outdent', 'outdent')}\n\n <span class=\"toolbar-divider\"></span>\n\n <button\n class=\"toolbar-btn\"\n title=\"Insert link\"\n aria-label=\"Insert link\"\n ?disabled=${this.disabled || this.readonly}\n @mousedown=${(e: Event) => e.preventDefault()}\n @click=${() => this._insertLink()}\n >\n <wc-icon name=\"link\" size=\"sm\"></wc-icon>\n </button>\n\n <span class=\"toolbar-divider\"></span>\n\n ${this._toolbarButton('undo', 'Undo', 'undo')}\n ${this._toolbarButton('redo', 'Redo', 'redo')}\n </div>\n `;\n }\n\n // ─── Render ────────────────────────────────────────────────────────────────\n\n render() {\n const isEmpty = !this.value || this.value === '<br>';\n\n return html`\n <wc-field\n label=${this.label}\n ?required=${this.required}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?skeleton=${this.skeleton}\n ?focused=${this._focused}\n ?error=${this.error}\n error-text=${this.errorText}\n helper-text=${this.helperText}\n variant=${this.variant}\n ?populated=${!isEmpty}\n .host=${this}\n class=${classMap({\n 'html-editor-field': true,\n disabled: this.disabled,\n readonly: this.readonly,\n })}\n >\n ${this._renderToolbar()}\n\n <div\n class=${classMap({\n 'html-editor-content': true,\n 'is-empty': isEmpty,\n })}\n contenteditable=${this.disabled || this.readonly ? 'false' : 'true'}\n data-placeholder=${this.placeholder}\n @input=${this._handleInput}\n @focus=${this._handleFocus}\n @blur=${this._handleBlur}\n ></div>\n\n ${this.disabled\n ? html`<wc-tag class=\"read-only-tag\" color=\"red\">Disabled</wc-tag>`\n : this.readonly\n ? html`<wc-tag class=\"read-only-tag\" color=\"red\">Read Only</wc-tag>`\n : nothing}\n </wc-field>\n `;\n }\n}\n"],"names":["html","classMap","nothing","styles","property","state","query"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,SAAS,CAAA;AAAlC,IAAA,WAAA,GAAA;;;QAKL,IAAA,CAAA,KAAK,GAAG,EAAE;;QAIV,IAAA,CAAA,KAAK,GAAG,EAAE;;QAIV,IAAA,CAAA,WAAW,GAAG,kBAAkB;;QAIhC,IAAA,CAAA,OAAO,GAAsC,SAAS;;QAItD,IAAA,CAAA,UAAU,GAAG,EAAE;;QAIf,IAAA,CAAA,KAAK,GAAG,KAAK;;QAIb,IAAA,CAAA,SAAS,GAAG,EAAE;QAEG,IAAA,CAAA,QAAQ,GAAG,KAAK;IA+MnC;;IAxMY,YAAY,GAAA;QACpB,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,SAAS,EAAE;YAChC,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK;QACvC;IACF;AAEU,IAAA,OAAO,CAAC,OAA6B,EAAA;QAC7C,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC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AAA,EAAA,UAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AAId,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE;AACpC,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,CAAA;AAEE,UAAA,CAAA;AAAhB,IAAAC,CAAK;AAA4B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAG1B,UAAA,CAAA;IADPC,CAAK,CAAC,sBAAsB;AACM,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,CAAA;AAlCxB,UAAU,GAAA,UAAA,CAAA;IADtB;AACY,CAAA,EAAA,UAAU,CA8OtB;;;;"}
@@ -0,0 +1,247 @@
1
+ import { a as i, _ as __decorate, b } from './IndividualComponent-DUINtMGK.js';
2
+ import { n } from './property-1psGvXOq.js';
3
+ import { e } from './class-map-YU7g0o3B.js';
4
+ import { B as BaseButton, o, s as spread } from './BaseButton-BNFAYn-S.js';
5
+ import { c as css_248z$1, a as css_248z$2 } from './button-colors-Ccys3hvS.js';
6
+ import { t as throttle } from './BaseHyperlinkMixin-BNuwbiEf.js';
7
+
8
+ var css_248z = i`.button {
9
+ --_container-padding: 0.75rem;
10
+ width: var(--button-height);
11
+ --_container-padding: 0;
12
+ }
13
+
14
+ :host([size=xs]),
15
+ :host([size=extra-small]) {
16
+ --button-height: 2rem;
17
+ }
18
+
19
+ :host([size=xs]) .button,
20
+ :host([size=extra-small]) .button {
21
+ --_button-icon-size: 1rem;
22
+ }
23
+
24
+ :host([size=sm]),
25
+ :host([size=small]) {
26
+ --button-height: 2.5rem;
27
+ }
28
+
29
+ :host([size=sm]) .button,
30
+ :host([size=small]) .button {
31
+ --_button-icon-size: 1.25rem;
32
+ --_button-icon-label-spacing: 0.5rem;
33
+ }
34
+
35
+ :host([size=md]),
36
+ :host([size=medium]) {
37
+ --button-height: 3.5rem;
38
+ }
39
+
40
+ :host([size=md]) .button,
41
+ :host([size=medium]) .button {
42
+ --_button-icon-size: 1.5rem;
43
+ }
44
+
45
+ :host([size=lg]),
46
+ :host([size=large]) {
47
+ --button-height: 6rem;
48
+ }
49
+
50
+ :host([size=lg]) .button,
51
+ :host([size=large]) .button {
52
+ --_button-icon-size: 2rem;
53
+ }
54
+
55
+ :host([size=xl]) {
56
+ --button-height: 8.5rem;
57
+ }
58
+
59
+ :host([size=xl]) .button {
60
+ --_button-icon-size: 2.5rem;
61
+ }`;
62
+
63
+ /**
64
+ * @label Icon Button
65
+ * @tag wc-icon-button
66
+ * @rawTag icon-button
67
+ *
68
+ * @summary Icon buttons allow users to take actions, and make choices, with a single tap.
69
+ *
70
+ * @overview
71
+ * <p>Icon 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. IconButton labels express what action will occur when the user interacts with it.</p>
72
+ *
73
+ * @cssprop --button-container-shape: Defines the border radius of the button container shape.
74
+ *
75
+ * @cssprop --button-container-shape-start-start: Defines the start position of the button container shape.
76
+ * @cssprop --button-container-shape-start-end: Defines the end position of the button container shape.
77
+ * @cssprop --button-container-shape-end-start: Defines the start position of the button container shape.
78
+ * @cssprop --button-container-shape-end-end: Defines the end position of the button container shape.
79
+ *
80
+ *
81
+ * @cssprop --filled-button-container-color: Color of the filled button container.
82
+ * @cssprop --filled-button-label-text-color: Text color of the filled button label.
83
+ *
84
+ * @cssprop --outlined-button-container-color: Color of the outlined button container.
85
+ * @cssprop --outlined-button-label-text-color: Text color of the outlined button label.
86
+ *
87
+ * @cssprop --text-button-label-text-color: Text color of the text button label.
88
+ *
89
+ * @cssprop --tonal-button-container-color: Color of the tonal button container.
90
+ * @cssprop --tonal-button-label-text-color: Text color of the tonal button label.
91
+ *
92
+ * @cssprop --elevated-button-container-color: Color of the elevated button container.
93
+ * @cssprop --elevated-button-label-text-color: Text color of the elevated button label.
94
+ *
95
+ * @cssprop --neo-button-container-color: Color of the neo button container.
96
+ * @cssprop --neo-button-label-text-color: Text color of the neo button label.
97
+ *
98
+ * @fires {CustomEvent} button:click - Dispatched when the button is clicked.
99
+ *
100
+ * @example
101
+ * ```html
102
+ * <wc-icon-button><wc-icon name="home"></wc-icon></wc-icon-button>
103
+ * ```
104
+ * @tags display
105
+ */
106
+ class IconButton extends BaseButton {
107
+ constructor() {
108
+ super(...arguments);
109
+ /**
110
+ * Button size.
111
+ * Possible values are `"xs"`, `"sm"`, `"md"`, `"lg"`, `"xl"`. Defaults to `"sm"`.
112
+ */
113
+ this.size = 'sm';
114
+ /**
115
+ * The visual style of the button.
116
+ *
117
+ * Possible variant values:
118
+ * `"filled"` is a filled button.
119
+ * `"outlined"` is an outlined button.
120
+ * `"text"` is a transparent button.
121
+ * `"tonal"` is a light color button.
122
+ * `"elevated"` is elevated button
123
+ */
124
+ this.variant = 'filled';
125
+ /**
126
+ * Defines the primary color of the button. This can be set to predefined color names to apply specific color themes.
127
+ */
128
+ this.color = 'primary';
129
+ }
130
+ focus() {
131
+ this.buttonElement?.focus();
132
+ }
133
+ blur() {
134
+ this.buttonElement?.blur();
135
+ }
136
+ firstUpdated() {
137
+ this.__dispatchClickWithThrottle = throttle(this.__dispatchClick, this.throttleDelay);
138
+ this.__convertTypeToVariantAndColor();
139
+ }
140
+ __convertTypeToVariantAndColor() {
141
+ if (this.type === 'primary') {
142
+ this.color = 'primary';
143
+ this.variant = 'filled';
144
+ }
145
+ else if (this.type === 'secondary') {
146
+ this.color = 'surface';
147
+ this.variant = 'filled';
148
+ }
149
+ else if (this.type === 'tertiary') {
150
+ this.color = 'primary';
151
+ this.variant = 'text';
152
+ }
153
+ else if (this.type === 'danger') {
154
+ this.color = 'danger';
155
+ this.variant = 'filled';
156
+ }
157
+ }
158
+ render() {
159
+ const isLink = this.__isLink();
160
+ const cssClasses = {
161
+ button: true,
162
+ 'button-element': true,
163
+ [`size-${this.size}`]: true,
164
+ [`variant-${this.variant}`]: true,
165
+ [`color-${this.color}`]: true,
166
+ disabled: this.disabled || this.softDisabled,
167
+ pressed: this.isPressed,
168
+ skeleton: this.skeleton,
169
+ };
170
+ if (!isLink) {
171
+ return b `<button
172
+ class=${e(cssClasses)}
173
+ id="button"
174
+ type=${this.htmlType}
175
+ @click=${this.__dispatchClickWithThrottle}
176
+ @mousedown=${this.__handlePress}
177
+ @keydown=${this.__handlePress}
178
+ @keyup=${this.__handlePress}
179
+
180
+ aria-describedby=${o(this.softDisabled ? BaseButton.DISABLED_REASON_ID : undefined)}
181
+ ?aria-disabled=${this.softDisabled}
182
+
183
+ ?disabled=${this.disabled}
184
+ ${spread(this.configAria)}
185
+ >
186
+ ${this.renderButtonContent()}
187
+ </button>
188
+ ${this.__renderTooltip()}`;
189
+ }
190
+ return b `<a
191
+ class=${e(cssClasses)}
192
+ id="button"
193
+ href=${this.href}
194
+ target=${this.target}
195
+ tabindex=${this.disabled ? '-1' : '0'}
196
+ @click=${this.__dispatchClick}
197
+ @mousedown=${this.__handlePress}
198
+ @keydown=${this.__handlePress}
199
+ @keyup=${this.__handlePress}
200
+ role="button"
201
+
202
+ aria-describedby=${o(this.softDisabled ? BaseButton.DISABLED_REASON_ID : undefined)}
203
+ ?aria-disabled=${this.softDisabled}
204
+
205
+ ${spread(this.configAria)}
206
+ >
207
+ ${this.renderButtonContent()}
208
+ </a>
209
+ ${this.__renderTooltip()}`;
210
+ }
211
+ renderButtonContent() {
212
+ return b `
213
+ <wc-focus-ring class="focus-ring" for='button'></wc-focus-ring>
214
+ <wc-elevation class="elevation"></wc-elevation>
215
+ <div class="neo-background"></div>
216
+ <div class="background"></div>
217
+ <div class="outline"></div>
218
+ <wc-ripple class="ripple"></wc-ripple>
219
+ <wc-skeleton class="skeleton"></wc-skeleton>
220
+
221
+ <div class="button-content">
222
+ <slot></slot>
223
+ </div>
224
+
225
+ ${this.__renderDisabledReason(this.softDisabled)}
226
+ `;
227
+ }
228
+ }
229
+ IconButton.styles = [css_248z$1, css_248z$2, css_248z];
230
+ __decorate([
231
+ n({ reflect: true })
232
+ ], IconButton.prototype, "size", void 0);
233
+ __decorate([
234
+ n({ type: String })
235
+ ], IconButton.prototype, "type", void 0);
236
+ __decorate([
237
+ n()
238
+ ], IconButton.prototype, "variant", void 0);
239
+ __decorate([
240
+ n({ reflect: true })
241
+ ], IconButton.prototype, "color", void 0);
242
+ __decorate([
243
+ n({ reflect: true })
244
+ ], IconButton.prototype, "configAria", void 0);
245
+
246
+ export { IconButton as I };
247
+ //# sourceMappingURL=icon-button-CK1ZuE-2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-button-CK1ZuE-2.js","sources":["../../src/button/icon-button/icon-button.ts"],"sourcesContent":["import { html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from '../button/button.scss';\nimport colorStyles from '../button/button-colors.scss';\nimport sizeStyles from './icon-button-sizes.scss';\nimport { spread } from '@/__directive/spread.js';\nimport { throttle } from '@/__utils/throttle.js';\nimport { BaseButton } from '../BaseButton.js';\n\n/**\n * @label Icon Button\n * @tag wc-icon-button\n * @rawTag icon-button\n *\n * @summary Icon buttons allow users to take actions, and make choices, with a single tap.\n *\n * @overview\n * <p>Icon 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. IconButton labels express what action will occur when the user interacts with it.</p>\n *\n * @cssprop --button-container-shape: Defines the border radius of the button container shape.\n *\n * @cssprop --button-container-shape-start-start: Defines the start position of the button container shape.\n * @cssprop --button-container-shape-start-end: Defines the end position of the button container shape.\n * @cssprop --button-container-shape-end-start: Defines the start position of the button container shape.\n * @cssprop --button-container-shape-end-end: Defines the end position of the button container shape.\n *\n *\n * @cssprop --filled-button-container-color: Color of the filled button container.\n * @cssprop --filled-button-label-text-color: Text color of the filled button label.\n *\n * @cssprop --outlined-button-container-color: Color of the outlined button container.\n * @cssprop --outlined-button-label-text-color: Text color of the outlined button label.\n *\n * @cssprop --text-button-label-text-color: Text color of the text button label.\n *\n * @cssprop --tonal-button-container-color: Color of the tonal button container.\n * @cssprop --tonal-button-label-text-color: Text color of the tonal button label.\n *\n * @cssprop --elevated-button-container-color: Color of the elevated button container.\n * @cssprop --elevated-button-label-text-color: Text color of the elevated button label.\n *\n * @cssprop --neo-button-container-color: Color of the neo button container.\n * @cssprop --neo-button-label-text-color: Text color of the neo button label.\n *\n * @fires {CustomEvent} button:click - Dispatched when the button is clicked.\n *\n * @example\n * ```html\n * <wc-icon-button><wc-icon name=\"home\"></wc-icon></wc-icon-button>\n * ```\n * @tags display\n */\nexport class IconButton extends BaseButton {\n static override styles = [styles, colorStyles, sizeStyles];\n\n /**\n * Button size.\n * Possible values are `\"xs\"`, `\"sm\"`, `\"md\"`, `\"lg\"`, `\"xl\"`. Defaults to `\"sm\"`.\n */\n @property({ reflect: true }) size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'sm';\n\n /**\n * Type is preset of color and variant. Type will be only applied.\n *\n */\n @property({ type: String }) type?: 'primary' | 'secondary' | 'tertiary';\n \n /**\n * The visual style of the button.\n *\n * Possible variant values:\n * `\"filled\"` is a filled button.\n * `\"outlined\"` is an outlined button.\n * `\"text\"` is a transparent button.\n * `\"tonal\"` is a light color button.\n * `\"elevated\"` is elevated button\n */\n @property() variant:\n | 'elevated'\n | 'filled'\n | 'tonal'\n | 'outlined'\n | 'text'\n | 'neo' = 'filled';\n \n /**\n * Defines the primary color of the button. This can be set to predefined color names to apply specific color themes.\n */\n @property({ reflect: true }) color:\n | 'primary'\n | 'success'\n | 'danger'\n | 'warning'\n | 'surface'\n | 'on-surface' = 'primary';\n\n /**\n * Additional ARIA attributes to pass to the inner button/anchor element.\n */\n @property({ reflect: true })\n configAria?: { [key: string]: any };\n\n override focus() {\n this.buttonElement?.focus();\n }\n\n override blur() {\n this.buttonElement?.blur();\n }\n \n override firstUpdated() {\n this.__dispatchClickWithThrottle = throttle(\n this.__dispatchClick,\n this.throttleDelay,\n );\n this.__convertTypeToVariantAndColor();\n }\n\n __convertTypeToVariantAndColor() {\n if (this.type === 'primary') {\n this.color = 'primary';\n this.variant = 'filled';\n } else if (this.type === 'secondary') {\n this.color = 'surface';\n this.variant = 'filled';\n } else if (this.type === 'tertiary') {\n this.color = 'primary';\n this.variant = 'text';\n } else if (this.type === 'danger') {\n this.color = 'danger';\n this.variant = 'filled';\n }\n }\n\n override render() {\n const isLink = this.__isLink();\n\n const cssClasses = {\n button: true,\n 'button-element': true,\n [`size-${this.size}`]: true,\n [`variant-${this.variant}`]: true,\n [`color-${this.color}`]: true,\n disabled: this.disabled || this.softDisabled,\n pressed: this.isPressed,\n skeleton: this.skeleton,\n };\n\n if (!isLink) {\n return html`<button\n class=${classMap(cssClasses)}\n id=\"button\"\n type=${this.htmlType}\n @click=${this.__dispatchClickWithThrottle}\n @mousedown=${this.__handlePress}\n @keydown=${this.__handlePress}\n @keyup=${this.__handlePress}\n \n aria-describedby=${ifDefined(this.softDisabled ? BaseButton.DISABLED_REASON_ID : undefined)}\n ?aria-disabled=${this.softDisabled}\n\n ?disabled=${this.disabled}\n ${spread(this.configAria)}\n >\n ${this.renderButtonContent()}\n </button>\n ${this.__renderTooltip()}`;\n }\n return html`<a\n class=${classMap(cssClasses)}\n id=\"button\"\n href=${this.href}\n target=${this.target}\n tabindex=${this.disabled ? '-1' : '0'}\n @click=${this.__dispatchClick}\n @mousedown=${this.__handlePress}\n @keydown=${this.__handlePress}\n @keyup=${this.__handlePress}\n role=\"button\"\n \n aria-describedby=${ifDefined(this.softDisabled ? BaseButton.DISABLED_REASON_ID : undefined)}\n ?aria-disabled=${this.softDisabled}\n\n ${spread(this.configAria)}\n >\n ${this.renderButtonContent()}\n </a>\n ${this.__renderTooltip()}`;\n }\n\n renderButtonContent() {\n return html`\n <wc-focus-ring class=\"focus-ring\" for='button'></wc-focus-ring>\n <wc-elevation class=\"elevation\"></wc-elevation>\n <div class=\"neo-background\"></div>\n <div class=\"background\"></div>\n <div class=\"outline\"></div>\n <wc-ripple class=\"ripple\"></wc-ripple>\n <wc-skeleton class=\"skeleton\"></wc-skeleton>\n\n <div class=\"button-content\">\n <slot></slot>\n </div>\n\n ${this.__renderDisabledReason(this.softDisabled)}\n `;\n }\n}\n"],"names":["html","classMap","ifDefined","styles","colorStyles","sizeStyles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CG;AACG,MAAO,UAAW,SAAQ,UAAU,CAAA;AAA1C,IAAA,WAAA,GAAA;;AAGE;;;AAGG;QAC0B,IAAA,CAAA,IAAI,GAAqC,IAAI;AAQxE;;;;;;;;;AASG;QACS,IAAA,CAAA,OAAO,GAMP,QAAQ;AAEpB;;AAEG;QAC0B,IAAA,CAAA,KAAK,GAMf,SAAS;IAiHhC;IAzGW,KAAK,GAAA;AACZ,QAAA,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE;IAC7B;IAES,IAAI,GAAA;AACX,QAAA,IAAI,CAAC,aAAa,EAAE,IAAI,EAAE;IAC5B;IAES,YAAY,GAAA;AACnB,QAAA,IAAI,CAAC,2BAA2B,GAAG,QAAQ,CACzC,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,aAAa,CACnB;QACD,IAAI,CAAC,8BAA8B,EAAE;IACvC;IAEA,8BAA8B,GAAA;AAC5B,QAAA,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE;AAC3B,YAAA,IAAI,CAAC,KAAK,GAAG,SAAS;AACtB,YAAA,IAAI,CAAC,OAAO,GAAG,QAAQ;QACzB;AAAO,aAAA,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,EAAE;AACpC,YAAA,IAAI,CAAC,KAAK,GAAG,SAAS;AACtB,YAAA,IAAI,CAAC,OAAO,GAAG,QAAQ;QACzB;AAAO,aAAA,I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