@marianmeres/stuic 2.1.9 → 2.1.10

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.
@@ -65,6 +65,10 @@
65
65
  return out;
66
66
  });
67
67
 
68
+ let CmpButtonOk = $derived(current.CmpButtonOk ?? Button);
69
+ let CmpButtonCancel = $derived(current.CmpButtonCancel ?? Button);
70
+ let CmpButtonCustom = $derived(current.CmpButtonCustom ?? Button);
71
+
68
72
  let inputEl = $state<any>();
69
73
  let okButtonEl = $state<any>();
70
74
 
@@ -189,28 +193,28 @@
189
193
  <menu class={twMerge(_classMenu, classMenu)}>
190
194
  {#if current.type !== ALERT}
191
195
  <li class={twMerge(_classMenuLi, classMenuLi)}>
192
- <Button
196
+ <CmpButtonCancel
193
197
  class={twMerge("cancel", _classButton, classButton)}
194
198
  disabled={isPending}
195
199
  onclick={createOnClick("cancel", current.onCancel)}
196
200
  >
197
201
  <Thc thc={current.labelCancel} {forceAsHtml} />
198
- </Button>
202
+ </CmpButtonCancel>
199
203
  </li>
200
204
  {/if}
201
205
  {#if current.labelCustom && typeof current.onCustom === "function"}
202
206
  <li class={twMerge(_classMenuLi, classMenuLi)}>
203
- <Button
207
+ <CmpButtonCustom
204
208
  class={twMerge("custom", _classButton, classButton)}
205
209
  disabled={isPending}
206
210
  onclick={createOnClick("custom", current.onCustom)}
207
211
  >
208
212
  <Thc thc={current.labelCustom} {forceAsHtml} />
209
- </Button>
213
+ </CmpButtonCustom>
210
214
  </li>
211
215
  {/if}
212
216
  <li class={twMerge(_classMenuLi, classMenuLi)}>
213
- <Button
217
+ <CmpButtonOk
214
218
  class={twMerge("ok", _classButton, classButton)}
215
219
  variant="primary"
216
220
  disabled={isPending}
@@ -218,7 +222,7 @@
218
222
  bind:el={okButtonEl}
219
223
  >
220
224
  <Thc thc={current.labelOk} {forceAsHtml} />
221
- </Button>
225
+ </CmpButtonOk>
222
226
  </li>
223
227
  </menu>
224
228
  {#if isPending}
@@ -25,6 +25,9 @@ export interface AlertConfirmPromptObj extends Record<string, any> {
25
25
  variant: AlertConfirmPromptVariant;
26
26
  iconFn: (() => string) | boolean;
27
27
  forceAsHtml?: boolean;
28
+ CmpButtonOk?: any;
29
+ CmpButtonCancel?: any;
30
+ CmpButtonCustom?: any;
28
31
  }
29
32
  export declare class AlertConfirmPromptStack {
30
33
  #private;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "2.1.9",
3
+ "version": "2.1.10",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",