@awc-ui/core 1.0.0-beta.5 → 1.0.0-beta.7

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 (51) hide show
  1. package/dist/cjs/md-button_6.cjs.entry.js +17 -2
  2. package/dist/cjs/md-button_6.cjs.entry.js.map +1 -1
  3. package/dist/cjs/md-segmented-button-set.cjs.entry.js +20 -2
  4. package/dist/cjs/md-segmented-button-set.cjs.entry.js.map +1 -1
  5. package/dist/collection/components/md-button/md-button.js +17 -2
  6. package/dist/collection/components/md-button/md-button.js.map +1 -1
  7. package/dist/collection/components/md-segmented-button-set/md-segmented-button-set.js +20 -2
  8. package/dist/collection/components/md-segmented-button-set/md-segmented-button-set.js.map +1 -1
  9. package/dist/components/md-button.js +1 -1
  10. package/dist/components/md-date-picker.js +1 -1
  11. package/dist/components/md-dialog.js +1 -1
  12. package/dist/components/md-multi-select.js +1 -1
  13. package/dist/components/md-segmented-button-set.js +1 -1
  14. package/dist/components/md-segmented-button-set.js.map +1 -1
  15. package/dist/components/md-snackbar.js +1 -1
  16. package/dist/components/md-step.js +1 -1
  17. package/dist/components/md-stepper.js +1 -1
  18. package/dist/components/md-time-picker.js +1 -1
  19. package/dist/components/{p-C1RN8YA1.js → p-BTgac9TA.js} +2 -2
  20. package/dist/components/p-BTgac9TA.js.map +1 -0
  21. package/dist/components-csr/md-button.js +1 -1
  22. package/dist/components-csr/md-date-picker.js +1 -1
  23. package/dist/components-csr/md-dialog.js +1 -1
  24. package/dist/components-csr/md-multi-select.js +1 -1
  25. package/dist/components-csr/md-segmented-button-set.js +1 -1
  26. package/dist/components-csr/md-segmented-button-set.js.map +1 -1
  27. package/dist/components-csr/md-snackbar.js +1 -1
  28. package/dist/components-csr/md-step.js +1 -1
  29. package/dist/components-csr/md-stepper.js +1 -1
  30. package/dist/components-csr/md-time-picker.js +1 -1
  31. package/dist/components-csr/{p-GG1ZMEng.js → p-QF3B4ODr.js} +2 -2
  32. package/dist/components-csr/p-QF3B4ODr.js.map +1 -0
  33. package/dist/esm/md-button_6.entry.js +17 -2
  34. package/dist/esm/md-button_6.entry.js.map +1 -1
  35. package/dist/esm/md-segmented-button-set.entry.js +20 -2
  36. package/dist/esm/md-segmented-button-set.entry.js.map +1 -1
  37. package/dist/md3/md3.esm.js +1 -1
  38. package/dist/md3/p-91df971f.entry.js +2 -0
  39. package/dist/md3/p-91df971f.entry.js.map +1 -0
  40. package/dist/md3/p-e661754b.entry.js +2 -0
  41. package/dist/md3/p-e661754b.entry.js.map +1 -0
  42. package/dist/types/components/md-segmented-button-set/md-segmented-button-set.d.ts +16 -0
  43. package/hydrate/index.js +37 -4
  44. package/hydrate/index.mjs +37 -4
  45. package/package.json +2 -2
  46. package/dist/components/p-C1RN8YA1.js.map +0 -1
  47. package/dist/components-csr/p-GG1ZMEng.js.map +0 -1
  48. package/dist/md3/p-56ea09a4.entry.js +0 -2
  49. package/dist/md3/p-56ea09a4.entry.js.map +0 -1
  50. package/dist/md3/p-6b841f69.entry.js +0 -2
  51. package/dist/md3/p-6b841f69.entry.js.map +0 -1
@@ -144,7 +144,22 @@ const MdButton = class {
144
144
  before. window.open remains for a programmatic click() on a button
145
145
  whose href is safe but whose anchor has not rendered yet. */
146
146
  const href = sanitizeHref(this.href);
147
- if (href && !this.el.shadowRoot?.querySelector('.md-button__anchor')) {
147
+ if (!href)
148
+ return;
149
+ const anchor = this.el.shadowRoot?.querySelector('.md-button__anchor');
150
+ /* Did this click actually pass THROUGH the anchor? composedPath sees
151
+ across the shadow boundary, so a real pointer click — on the label, an
152
+ icon, or the anchor's stretched ::after over the padding — is
153
+ recognised and left alone: the browser is already navigating.
154
+
155
+ A PROGRAMMATIC el.click() targets the host and never reaches the
156
+ anchor, so nothing would happen at all. A native <a>.click() does
157
+ navigate, and this component behaved that way before it grew a real
158
+ anchor — including keyboard activation, which routes through
159
+ el.click() in handleKeyDown. Falling back to window.open keeps both
160
+ working, and the composedPath check is what stops a real click from
161
+ navigating twice. */
162
+ if (!anchor || !e.composedPath().includes(anchor)) {
148
163
  window.open(href, this.target, SAFE_WINDOW_FEATURES);
149
164
  }
150
165
  return;
@@ -209,7 +224,7 @@ const MdButton = class {
209
224
  context. Blanket noreferrer would also strip the Referer on ordinary
210
225
  same-tab navigation, quietly breaking referrer-based analytics. */
211
226
  const opensNewContext = !!this.target && this.target !== '_self';
212
- return (h(Host, { key: '01b1d90db83f09f1095a24040c4631b55216847f', class: {
227
+ return (h(Host, { key: 'be127994ceadc697fd589c22af7d7ecc3bc0908d', class: {
213
228
  'md-button': true,
214
229
  [`md-button--${this.variant}`]: true,
215
230
  [`md-button--${this.size}`]: true,