@happyvertical/smrt-ui 0.38.24 → 0.38.25
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.
|
@@ -96,6 +96,18 @@ const linkProps = $derived(() => {
|
|
|
96
96
|
),
|
|
97
97
|
) as HTMLAnchorAttributes;
|
|
98
98
|
});
|
|
99
|
+
|
|
100
|
+
function handleClick(event: MouseEvent) {
|
|
101
|
+
if (isDisabled) {
|
|
102
|
+
event.preventDefault();
|
|
103
|
+
event.stopPropagation();
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
onclick?.(
|
|
108
|
+
event as Parameters<NonNullable<HTMLButtonAttributes['onclick']>>[0],
|
|
109
|
+
);
|
|
110
|
+
}
|
|
99
111
|
</script>
|
|
100
112
|
|
|
101
113
|
{#if isLink}
|
|
@@ -111,7 +123,7 @@ const linkProps = $derived(() => {
|
|
|
111
123
|
tabindex={isDisabled ? -1 : undefined}
|
|
112
124
|
aria-disabled={isDisabled}
|
|
113
125
|
aria-busy={loading}
|
|
114
|
-
onclick={
|
|
126
|
+
onclick={handleClick as HTMLAnchorAttributes['onclick']}
|
|
115
127
|
{...linkProps()}
|
|
116
128
|
>
|
|
117
129
|
{#if loading}
|
|
@@ -129,7 +141,7 @@ const linkProps = $derived(() => {
|
|
|
129
141
|
class="button {variant} {size} {className}"
|
|
130
142
|
class:full-width={fullWidth}
|
|
131
143
|
class:loading
|
|
132
|
-
{
|
|
144
|
+
onclick={handleClick}
|
|
133
145
|
{...rest}
|
|
134
146
|
>
|
|
135
147
|
{#if loading}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Button.svelte.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACrB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U,CAAC;IAClB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wBAAwB;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oBAAoB;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,MAAM,CAAC,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IACxC,GAAG,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,oBAAoB,CAAC,UAAU,CAAC,CAAC;CAC7C;AAmGD,QAAA,MAAM,MAAM,2CAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-ui",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.25",
|
|
4
4
|
"description": "Domain-agnostic Svelte 5 UI runtime for SMRT: primitives, i18n client, theme system, and module UI registry",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
},
|
|
115
115
|
"dependencies": {
|
|
116
116
|
"esm-env": "^1.2.2",
|
|
117
|
-
"@happyvertical/smrt-types": "0.38.
|
|
117
|
+
"@happyvertical/smrt-types": "0.38.25"
|
|
118
118
|
},
|
|
119
119
|
"peerDependencies": {
|
|
120
120
|
"svelte": "^5.56.4"
|