@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
|
@@ -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
|
|
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: '
|
|
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,
|