@redvars/peacock 3.6.2 → 3.7.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 (200) hide show
  1. package/dist/ButtonConstants-D06bY4uy.js +114 -0
  2. package/dist/ButtonConstants-D06bY4uy.js.map +1 -0
  3. package/dist/{BaseHyperlinkMixin-BNuwbiEf.js → NativeHyperlinkMixin-DrYXyfMQ.js} +8 -10
  4. package/dist/NativeHyperlinkMixin-DrYXyfMQ.js.map +1 -0
  5. package/dist/assets/components.css +1 -1
  6. package/dist/assets/components.css.map +1 -1
  7. package/dist/assets/styles.css +1 -1
  8. package/dist/assets/styles.css.map +1 -1
  9. package/dist/button-colors-Dwnez1tR.js +586 -0
  10. package/dist/button-colors-Dwnez1tR.js.map +1 -0
  11. package/dist/button-group.js +8 -8
  12. package/dist/button-group.js.map +1 -1
  13. package/dist/button.js +236 -133
  14. package/dist/button.js.map +1 -1
  15. package/dist/calendar-column-view.js +0 -1
  16. package/dist/calendar-column-view.js.map +1 -1
  17. package/dist/calendar-month-view.js +0 -1
  18. package/dist/calendar-month-view.js.map +1 -1
  19. package/dist/canvas.js +126 -107
  20. package/dist/canvas.js.map +1 -1
  21. package/dist/card-content.js +0 -1
  22. package/dist/card-content.js.map +1 -1
  23. package/dist/card.js +96 -90
  24. package/dist/card.js.map +1 -1
  25. package/dist/cb-compound-expression.js +4 -1
  26. package/dist/cb-compound-expression.js.map +1 -1
  27. package/dist/cb-divider.js +0 -1
  28. package/dist/cb-divider.js.map +1 -1
  29. package/dist/cb-expression.js +0 -2
  30. package/dist/cb-expression.js.map +1 -1
  31. package/dist/cb-predicate.js +0 -1
  32. package/dist/cb-predicate.js.map +1 -1
  33. package/dist/code-highlighter.js +23 -6
  34. package/dist/code-highlighter.js.map +1 -1
  35. package/dist/custom-elements-jsdocs.json +5079 -17882
  36. package/dist/custom-elements.json +19272 -19314
  37. package/dist/fab.js +181 -117
  38. package/dist/fab.js.map +1 -1
  39. package/dist/flow-designer.js +4 -4
  40. package/dist/icon-button-DJ0kZXYr.js +318 -0
  41. package/dist/icon-button-DJ0kZXYr.js.map +1 -0
  42. package/dist/index.js +7 -7
  43. package/dist/{navigation-rail-CD7IrqbN.js → navigation-rail-CM_svs5_.js} +1311 -730
  44. package/dist/navigation-rail-CM_svs5_.js.map +1 -0
  45. package/dist/observe-slot-change-D8Xg-kSS.js +60 -0
  46. package/dist/observe-slot-change-D8Xg-kSS.js.map +1 -0
  47. package/dist/peacock-loader.js +10 -7
  48. package/dist/peacock-loader.js.map +1 -1
  49. package/dist/popover-content.js +0 -1
  50. package/dist/popover-content.js.map +1 -1
  51. package/dist/search.js +15 -15
  52. package/dist/search.js.map +1 -1
  53. package/dist/src/__controllers/attachable-controller.d.ts +109 -0
  54. package/dist/src/__mixins/{BaseButtonMixin.d.ts → NativeButtonMixin.d.ts} +3 -3
  55. package/dist/src/__mixins/{BaseHyperlinkMixin.d.ts → NativeHyperlinkMixin.d.ts} +3 -4
  56. package/dist/src/__utils/is-link.d.ts +1 -0
  57. package/dist/src/__utils/observe-slot-change.d.ts +1 -1
  58. package/dist/src/accordion/accordion-item.d.ts +0 -1
  59. package/dist/src/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +0 -1
  60. package/dist/src/button/ButtonConstants.d.ts +1 -0
  61. package/dist/src/button/GroupButtonInterface.d.ts +4 -0
  62. package/dist/src/button/button/button.d.ts +32 -7
  63. package/dist/src/button/button-group/button-group.d.ts +2 -1
  64. package/dist/src/button/icon-button/icon-button.d.ts +26 -5
  65. package/dist/src/button/index.d.ts +1 -1
  66. package/dist/src/calendar/calendar-column-view.d.ts +0 -1
  67. package/dist/src/calendar/calendar-month-view.d.ts +0 -1
  68. package/dist/src/canvas/canvas.d.ts +3 -3
  69. package/dist/src/card/card-content.d.ts +0 -1
  70. package/dist/src/card/card.d.ts +9 -6
  71. package/dist/src/chip/chip/chip.d.ts +22 -3
  72. package/dist/src/condition-builder/cb-compound-expression.d.ts +0 -1
  73. package/dist/src/condition-builder/cb-divider.d.ts +0 -1
  74. package/dist/src/condition-builder/cb-expression.d.ts +0 -1
  75. package/dist/src/condition-builder/cb-predicate.d.ts +0 -1
  76. package/dist/src/fab/fab.d.ts +20 -6
  77. package/dist/src/field/field.d.ts +1 -0
  78. package/dist/src/focus-ring/focus-ring.d.ts +26 -20
  79. package/dist/src/image/image.d.ts +2 -2
  80. package/dist/src/index.d.ts +1 -0
  81. package/dist/src/input/input.d.ts +1 -3
  82. package/dist/src/item/index.d.ts +1 -0
  83. package/dist/src/item/item.d.ts +49 -0
  84. package/dist/src/link/link.d.ts +1 -1
  85. package/dist/src/list/list-item.d.ts +1 -2
  86. package/dist/src/menu/menu-item/menu-item.d.ts +9 -11
  87. package/dist/src/menu/sub-menu/sub-menu.d.ts +1 -1
  88. package/dist/src/navigation-rail/navigation-rail-item.d.ts +0 -2
  89. package/dist/src/navigation-rail/navigation-rail.d.ts +2 -6
  90. package/dist/src/popover/popover-content.d.ts +0 -1
  91. package/dist/src/ripple/ripple.d.ts +9 -1
  92. package/dist/src/search/search.d.ts +2 -6
  93. package/dist/src/segmented-button/segmented-button.d.ts +0 -1
  94. package/dist/src/select/option.d.ts +0 -1
  95. package/dist/src/sidebar-menu/sidebar-menu-item.d.ts +0 -1
  96. package/dist/src/sidebar-menu/sidebar-sub-menu.d.ts +0 -1
  97. package/dist/src/tabs/tab-panel.d.ts +0 -1
  98. package/dist/src/tabs/tab.d.ts +4 -6
  99. package/dist/test/item.test.d.ts +1 -0
  100. package/dist/tsconfig.tsbuildinfo +1 -1
  101. package/package.json +4 -2
  102. package/readme.md +2 -2
  103. package/scss/components.scss +0 -1
  104. package/scss/mixin.scss +33 -13
  105. package/scss/styles.scss +1 -3
  106. package/src/__controllers/attachable-controller.ts +198 -0
  107. package/src/__mixins/NativeButtonMixin.ts +87 -0
  108. package/src/__mixins/{BaseHyperlinkMixin.ts → NativeHyperlinkMixin.ts} +15 -15
  109. package/src/__utils/is-link.ts +3 -0
  110. package/src/__utils/observe-slot-change.ts +46 -14
  111. package/src/accordion/accordion-item.scss +1 -1
  112. package/src/accordion/accordion-item.ts +0 -1
  113. package/src/breadcrumb/breadcrumb-item/breadcrumb-item.ts +0 -1
  114. package/src/button/ButtonConstants.ts +1 -0
  115. package/src/button/GroupButtonInterface.ts +4 -0
  116. package/src/button/button/button-colors.scss +2 -2
  117. package/src/button/button/button-layers.scss +124 -0
  118. package/src/button/button/button-sizes.scss +31 -53
  119. package/src/button/button/button.scss +139 -262
  120. package/src/button/button/button.ts +260 -106
  121. package/src/button/button/only-button.scss +13 -0
  122. package/src/button/button-group/button-group.ts +59 -17
  123. package/src/button/icon-button/icon-button-sizes.scss +12 -27
  124. package/src/button/icon-button/icon-button.ts +191 -83
  125. package/src/button/index.ts +1 -1
  126. package/src/calendar/calendar-column-view.ts +0 -1
  127. package/src/calendar/calendar-month-view.ts +0 -1
  128. package/src/canvas/canvas.scss +18 -6
  129. package/src/canvas/canvas.ts +125 -103
  130. package/src/card/card-content.ts +2 -3
  131. package/src/card/card.scss +87 -95
  132. package/src/card/card.ts +62 -60
  133. package/src/chip/chip/chip.scss +66 -71
  134. package/src/chip/chip/chip.ts +155 -56
  135. package/src/code-highlighter/code-highlighter.scss +1 -1
  136. package/src/code-highlighter/code-highlighter.ts +20 -5
  137. package/src/condition-builder/cb-compound-expression.scss +4 -0
  138. package/src/condition-builder/cb-compound-expression.ts +0 -1
  139. package/src/condition-builder/cb-divider.ts +0 -1
  140. package/src/condition-builder/cb-expression.scss +0 -1
  141. package/src/condition-builder/cb-expression.ts +0 -1
  142. package/src/condition-builder/cb-predicate.ts +0 -1
  143. package/src/elevation/elevation.scss +5 -1
  144. package/src/empty-state/empty-state.scss +1 -0
  145. package/src/fab/fab-colors.scss +2 -2
  146. package/src/fab/fab-sizes.scss +24 -34
  147. package/src/fab/fab.scss +77 -71
  148. package/src/fab/fab.ts +141 -65
  149. package/src/field/field.ts +6 -0
  150. package/src/focus-ring/focus-ring.ts +81 -72
  151. package/src/image/image.scss +21 -16
  152. package/src/image/image.ts +13 -14
  153. package/src/index.ts +1 -0
  154. package/src/input/input.ts +16 -25
  155. package/src/item/index.ts +1 -0
  156. package/src/item/item.scss +195 -0
  157. package/src/item/item.ts +362 -0
  158. package/src/link/link.scss +1 -10
  159. package/src/link/link.ts +4 -2
  160. package/src/list/list-item.ts +8 -8
  161. package/src/menu/menu/menu.ts +5 -9
  162. package/src/menu/menu-item/menu-item.scss +30 -108
  163. package/src/menu/menu-item/menu-item.ts +102 -133
  164. package/src/menu/sub-menu/sub-menu.ts +6 -3
  165. package/src/navigation-rail/navigation-rail-item.scss +5 -0
  166. package/src/navigation-rail/navigation-rail-item.ts +10 -15
  167. package/src/navigation-rail/navigation-rail.ts +2 -6
  168. package/src/peacock-loader.ts +5 -1
  169. package/src/popover/popover-content.ts +0 -1
  170. package/src/ripple/ripple.ts +52 -20
  171. package/src/search/search.scss +3 -0
  172. package/src/search/search.ts +11 -16
  173. package/src/segmented-button/segmented-button.ts +0 -1
  174. package/src/select/option.ts +1 -2
  175. package/src/select/select.scss +1 -10
  176. package/src/select/select.ts +2 -0
  177. package/src/sidebar-menu/sidebar-menu-item.ts +0 -1
  178. package/src/sidebar-menu/sidebar-sub-menu.ts +0 -1
  179. package/src/skeleton/skeleton.scss +5 -1
  180. package/src/tabs/tab-panel.ts +0 -1
  181. package/src/tabs/tab.ts +60 -70
  182. package/src/text/text.css-component.scss +3 -21
  183. package/src/tooltip/tooltip.scss +5 -8
  184. package/src/tooltip/tooltip.ts +1 -2
  185. package/dist/BaseButton-BNFAYn-S.js +0 -219
  186. package/dist/BaseButton-BNFAYn-S.js.map +0 -1
  187. package/dist/BaseHyperlinkMixin-BNuwbiEf.js.map +0 -1
  188. package/dist/button-colors-AvGh22Zn.js +0 -561
  189. package/dist/button-colors-AvGh22Zn.js.map +0 -1
  190. package/dist/icon-button-ohxHhy4t.js +0 -247
  191. package/dist/icon-button-ohxHhy4t.js.map +0 -1
  192. package/dist/navigation-rail-CD7IrqbN.js.map +0 -1
  193. package/dist/observe-slot-change-BGJfgg2E.js +0 -31
  194. package/dist/observe-slot-change-BGJfgg2E.js.map +0 -1
  195. package/dist/src/button/BaseButton.d.ts +0 -28
  196. package/dist/src/focus-ring/FocusAttachableController.d.ts +0 -8
  197. package/src/__mixins/BaseButtonMixin.ts +0 -83
  198. package/src/button/BaseButton.ts +0 -113
  199. package/src/focus-ring/FocusAttachableController.ts +0 -28
  200. package/src/popover/tooltip.css-component.scss +0 -19
@@ -1,13 +1,24 @@
1
- import { html } from 'lit';
2
- import { property } from 'lit/decorators.js';
1
+ import { html, LitElement, nothing } from 'lit';
2
+ import { property, query } from 'lit/decorators.js';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
4
  import { ifDefined } from 'lit/directives/if-defined.js';
5
+ import { when } from 'lit/directives/when.js';
6
+ import buttonLayers from '../button/button-layers.scss';
5
7
  import styles from '../button/button.scss';
6
8
  import colorStyles from '../button/button-colors.scss';
7
9
  import sizeStyles from './icon-button-sizes.scss';
8
10
  import { spread } from '@/__directive/spread.js';
9
11
  import { throttle } from '@/__utils/throttle.js';
10
- import { BaseButton } from '../BaseButton.js';
12
+ import { isLink } from '@/__utils/is-link.js';
13
+ import { observerSlotChangesWithCallback } from '@/__utils/observe-slot-change.js';
14
+ import {
15
+ dispatchActivationClick,
16
+ isActivationClick,
17
+ } from '@/__utils/dispatch-event-utils.js';
18
+ import NativeButtonMixin from '@/__mixins/NativeButtonMixin.js';
19
+ import NativeHyperlinkMixin from '@/__mixins/NativeHyperlinkMixin.js';
20
+ import { GroupButtonInterface } from '@/button/GroupButtonInterface.js';
21
+ import { DISABLED_REASON_ID } from '@/button/ButtonConstants.js';
11
22
 
12
23
  /**
13
24
  * @label Icon Button
@@ -52,8 +63,11 @@ import { BaseButton } from '../BaseButton.js';
52
63
  * ```
53
64
  * @tags display
54
65
  */
55
- export class IconButton extends BaseButton {
56
- static override styles = [styles, colorStyles, sizeStyles];
66
+ export class IconButton
67
+ extends NativeButtonMixin(NativeHyperlinkMixin(LitElement))
68
+ implements GroupButtonInterface
69
+ {
70
+ static override styles = [buttonLayers, styles, colorStyles, sizeStyles];
57
71
 
58
72
  /**
59
73
  * Button size.
@@ -62,39 +76,39 @@ export class IconButton extends BaseButton {
62
76
  @property({ reflect: true }) size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'sm';
63
77
 
64
78
  /**
65
- * Type is preset of color and variant. Type will be only applied.
66
- *
67
- */
68
- @property({ type: String }) type?: 'primary' | 'secondary' | 'tertiary';
69
-
70
- /**
71
- * The visual style of the button.
72
- *
73
- * Possible variant values:
74
- * `"filled"` is a filled button.
75
- * `"outlined"` is an outlined button.
76
- * `"text"` is a transparent button.
77
- * `"tonal"` is a light color button.
78
- * `"elevated"` is elevated button
79
- */
80
- @property() variant:
81
- | 'elevated'
82
- | 'filled'
83
- | 'tonal'
84
- | 'outlined'
85
- | 'text'
86
- | 'neo' = 'filled';
87
-
88
- /**
89
- * Defines the primary color of the button. This can be set to predefined color names to apply specific color themes.
90
- */
91
- @property({ reflect: true }) color:
92
- | 'primary'
93
- | 'success'
94
- | 'danger'
95
- | 'warning'
96
- | 'surface'
97
- | 'on-surface' = 'primary';
79
+ * Type is preset of color and variant. Type will be only applied.
80
+ *
81
+ */
82
+ @property({ type: String }) type?: 'primary' | 'secondary' | 'tertiary';
83
+
84
+ /**
85
+ * The visual style of the button.
86
+ *
87
+ * Possible variant values:
88
+ * `"filled"` is a filled button.
89
+ * `"outlined"` is an outlined button.
90
+ * `"text"` is a transparent button.
91
+ * `"tonal"` is a light color button.
92
+ * `"elevated"` is elevated button
93
+ */
94
+ @property({ reflect: true }) variant:
95
+ | 'elevated'
96
+ | 'filled'
97
+ | 'tonal'
98
+ | 'outlined'
99
+ | 'text'
100
+ | 'neo' = 'filled';
101
+
102
+ /**
103
+ * Defines the primary color of the button. This can be set to predefined color names to apply specific color themes.
104
+ */
105
+ @property({ reflect: true }) color:
106
+ | 'primary'
107
+ | 'success'
108
+ | 'danger'
109
+ | 'warning'
110
+ | 'surface'
111
+ | 'on-surface' = 'primary';
98
112
 
99
113
  /**
100
114
  * Additional ARIA attributes to pass to the inner button/anchor element.
@@ -102,6 +116,92 @@ export class IconButton extends BaseButton {
102
116
  @property({ reflect: true })
103
117
  configAria?: { [key: string]: any };
104
118
 
119
+ @property({ type: Boolean, reflect: true }) skeleton: boolean = false;
120
+
121
+ @property({ type: Boolean, reflect: true }) toggle: boolean = false;
122
+
123
+ @property({ type: Boolean, reflect: true }) selected: boolean = false;
124
+
125
+ /**
126
+ * Sets the delay for throttle in milliseconds. Defaults to 200 milliseconds.
127
+ */
128
+ @property() throttleDelay = 200;
129
+
130
+ @property() tooltip?: string;
131
+
132
+ @property({ type: Boolean, reflect: true })
133
+ pressed = false;
134
+
135
+ @query('.button') readonly buttonElement!: HTMLElement | null;
136
+
137
+ override connectedCallback() {
138
+ super.connectedCallback();
139
+ this.addEventListener('click', this.__dispatchClickWithThrottle);
140
+ window.addEventListener('mouseup', this.__handlePress);
141
+ }
142
+
143
+ override disconnectedCallback() {
144
+ window.removeEventListener('mouseup', this.__handlePress);
145
+ this.removeEventListener('click', this.__dispatchClickWithThrottle);
146
+ super.disconnectedCallback();
147
+ }
148
+
149
+ __handlePress = (event: KeyboardEvent | MouseEvent) => {
150
+ if (this.disabled || this.skeleton || this.softDisabled) return;
151
+ this.pressed =
152
+ (event instanceof KeyboardEvent &&
153
+ event.type === 'keydown' &&
154
+ (event.key === 'Enter' || event.key === ' ')) ||
155
+ event.type === 'mousedown';
156
+ };
157
+
158
+ __dispatchClickWithThrottle: (event: MouseEvent | KeyboardEvent) => void =
159
+ event => {
160
+ this.__dispatchClick(event);
161
+ };
162
+
163
+ __dispatchClick = (event: MouseEvent | KeyboardEvent) => {
164
+ // If the button is soft-disabled or a disabled link, we need to explicitly
165
+ // prevent the click from propagating to other event listeners as well as
166
+ // prevent the default action.
167
+ if (this.softDisabled || (this.disabled && this.href) || this.skeleton) {
168
+ event.stopImmediatePropagation();
169
+ event.preventDefault();
170
+ return;
171
+ }
172
+
173
+ if (!isActivationClick(event) || !this.buttonElement) {
174
+ return;
175
+ }
176
+
177
+ if (this.toggle) {
178
+ this.selected = !this.selected;
179
+ }
180
+
181
+ this.focus();
182
+ dispatchActivationClick(this.buttonElement);
183
+ };
184
+
185
+ __renderDisabledReason(softDisabled: boolean) {
186
+ if (softDisabled)
187
+ return html`<div
188
+ id=${DISABLED_REASON_ID}
189
+ role="tooltip"
190
+ aria-label=${this.disabledReason}
191
+ class="screen-reader-only"
192
+ >
193
+ ${this.disabledReason}
194
+ </div>`;
195
+ return nothing;
196
+ }
197
+
198
+ __renderTooltip() {
199
+ if (this.tooltip) {
200
+ return html`<wc-tooltip class="tooltip" for="button">${this.tooltip}</wc-tooltip>`;
201
+ }
202
+ return nothing;
203
+ }
204
+
105
205
  override focus() {
106
206
  this.buttonElement?.focus();
107
207
  }
@@ -109,7 +209,7 @@ export class IconButton extends BaseButton {
109
209
  override blur() {
110
210
  this.buttonElement?.blur();
111
211
  }
112
-
212
+
113
213
  override firstUpdated() {
114
214
  this.__dispatchClickWithThrottle = throttle(
115
215
  this.__dispatchClick,
@@ -135,8 +235,26 @@ export class IconButton extends BaseButton {
135
235
  }
136
236
 
137
237
  override render() {
138
- const isLink = this.__isLink();
238
+ return html`
239
+ <wc-focus-ring class="focus-ring" for="button"></wc-focus-ring>
240
+ <wc-elevation class="elevation"></wc-elevation>
241
+ ${when(
242
+ this.variant === 'neo',
243
+ () => html`<div class="neo-background"></div>`,
244
+ )}
245
+ <div class="background"></div>
246
+ ${when(
247
+ this.variant === 'outlined' || this.variant === 'neo',
248
+ () => html`<div class="outline"></div>`,
249
+ )}
250
+ <wc-ripple class="ripple" for="button"></wc-ripple>
251
+ <wc-skeleton class="skeleton"></wc-skeleton>
139
252
 
253
+ ${this.renderButtonElement()} ${this.__renderTooltip()}
254
+ `;
255
+ }
256
+
257
+ renderButtonElement() {
140
258
  const cssClasses = {
141
259
  button: true,
142
260
  'button-element': true,
@@ -144,66 +262,56 @@ export class IconButton extends BaseButton {
144
262
  [`variant-${this.variant}`]: true,
145
263
  [`color-${this.color}`]: true,
146
264
  disabled: this.disabled || this.softDisabled,
147
- pressed: this.isPressed,
265
+ pressed: this.pressed,
148
266
  skeleton: this.skeleton,
149
267
  };
150
268
 
151
- if (!isLink) {
269
+ if (!isLink(this)) {
270
+ cssClasses['native-button'] = true;
152
271
  return html`<button
153
- class=${classMap(cssClasses)}
154
- id="button"
155
- type=${this.htmlType}
156
- @click=${this.__dispatchClickWithThrottle}
157
- @mousedown=${this.__handlePress}
158
- @keydown=${this.__handlePress}
159
- @keyup=${this.__handlePress}
160
-
161
- aria-describedby=${ifDefined(this.softDisabled ? BaseButton.DISABLED_REASON_ID : undefined)}
162
- ?aria-disabled=${this.softDisabled}
163
-
164
- ?disabled=${this.disabled}
165
- ${spread(this.configAria)}
166
- >
167
- ${this.renderButtonContent()}
168
- </button>
169
- ${this.__renderTooltip()}`;
170
- }
171
- return html`<a
172
272
  class=${classMap(cssClasses)}
173
273
  id="button"
174
- href=${this.href}
175
- target=${this.target}
176
- tabindex=${this.disabled ? '-1' : '0'}
177
- @click=${this.__dispatchClick}
274
+ type=${this.htmlType}
275
+ @click=${this.__dispatchClickWithThrottle}
178
276
  @mousedown=${this.__handlePress}
179
277
  @keydown=${this.__handlePress}
180
278
  @keyup=${this.__handlePress}
181
- role="button"
182
-
183
- aria-describedby=${ifDefined(this.softDisabled ? BaseButton.DISABLED_REASON_ID : undefined)}
279
+ aria-describedby=${ifDefined(
280
+ this.softDisabled ? DISABLED_REASON_ID : undefined,
281
+ )}
184
282
  ?aria-disabled=${this.softDisabled}
185
-
283
+ ?disabled=${this.disabled}
186
284
  ${spread(this.configAria)}
187
285
  >
188
286
  ${this.renderButtonContent()}
189
- </a>
190
- ${this.__renderTooltip()}`;
287
+ </button>`;
288
+ }
289
+ cssClasses['native-link'] = true;
290
+ return html`<a
291
+ class=${classMap(cssClasses)}
292
+ id="button"
293
+ href=${this.href}
294
+ target=${this.target}
295
+ tabindex=${this.disabled ? '-1' : '0'}
296
+ @click=${this.__dispatchClick}
297
+ @mousedown=${this.__handlePress}
298
+ @keydown=${this.__handlePress}
299
+ @keyup=${this.__handlePress}
300
+ role="button"
301
+ aria-describedby=${ifDefined(
302
+ this.softDisabled ? DISABLED_REASON_ID : undefined,
303
+ )}
304
+ ?aria-disabled=${this.softDisabled}
305
+ ${spread(this.configAria)}
306
+ >
307
+ ${this.renderButtonContent()}
308
+ </a>`;
191
309
  }
192
310
 
193
311
  renderButtonContent() {
194
312
  return html`
195
- <wc-focus-ring class="focus-ring" for='button'></wc-focus-ring>
196
- <wc-elevation class="elevation"></wc-elevation>
197
- <div class="neo-background"></div>
198
- <div class="background"></div>
199
- <div class="outline"></div>
200
- <wc-ripple class="ripple"></wc-ripple>
201
- <wc-skeleton class="skeleton"></wc-skeleton>
202
-
203
- <div class="button-content">
204
- <slot></slot>
205
- </div>
206
-
313
+ <slot class="icon-slot"></slot>
314
+ <div class="touch"></div>
207
315
  ${this.__renderDisabledReason(this.softDisabled)}
208
316
  `;
209
317
  }
@@ -1,3 +1,3 @@
1
1
  export { Button } from './button/button.js';
2
- export { ButtonGroup } from './button-group/button-group.js';
2
+ export { default as ButtonGroup } from './button-group/button-group.js';
3
3
  export { IconButton } from './icon-button/icon-button.js';
@@ -22,7 +22,6 @@ import styles from './calendar-column-view.scss';
22
22
  * @label Calendar Column View
23
23
  * @tag wc-calendar-column-view
24
24
  * @rawTag calendar-column-view
25
- * @parentRawTag calendar
26
25
  * @summary Internal column view component for the calendar (day/week views).
27
26
  */
28
27
  @IndividualComponent
@@ -21,7 +21,6 @@ import styles from './calendar-month-view.scss';
21
21
  * @label Calendar Month View
22
22
  * @tag wc-calendar-month-view
23
23
  * @rawTag calendar-month-view
24
- * @parentRawTag calendar
25
24
  * @summary Internal month view component for the calendar.
26
25
  */
27
26
  @IndividualComponent
@@ -12,8 +12,22 @@
12
12
  }
13
13
 
14
14
  .canvas-wrapper {
15
+ position: relative;
15
16
  background: var(--canvas-background);
16
- border-radius: var(--shape-corner-medium);
17
+ }
18
+
19
+ .canvas {
20
+ display: block;
21
+ }
22
+
23
+ .canvas-background,
24
+ .canvas-shapes {
25
+ position: absolute;
26
+ inset: 0;
27
+ }
28
+
29
+ .canvas-background {
30
+ pointer-events: none;
17
31
  }
18
32
 
19
33
  #canvas-background circle {
@@ -22,16 +36,14 @@
22
36
 
23
37
  #endarrow polyline {
24
38
  fill: none;
25
- stroke: var(--canvas-arrow-color);
39
+ stroke: context-stroke;
26
40
  vector-effect: non-scaling-stroke;
27
41
  stroke-width: 2;
42
+ stroke-linejoin: round;
43
+ stroke-linecap: round;
28
44
  }
29
45
 
30
46
  .line {
31
- &.no-color {
32
- stroke: var(--canvas-line-color);
33
- }
34
-
35
47
  &.variant-dashed {
36
48
  stroke-dasharray: 6 6;
37
49
  }