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