@marianmeres/stuic 2.1.29 → 2.1.31

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.
@@ -26,6 +26,12 @@
26
26
  classMenu?: string;
27
27
  classMenuLi?: string;
28
28
  classButton?: string;
29
+ classButtonCancel?: string;
30
+ classButtonCustom?: string;
31
+ classButtonPrimary?: string;
32
+ variantButtonCancel?: string;
33
+ variantButtonCustom?: string;
34
+ variantButtonPrimary?: string;
29
35
  classSpinnerBox?: string;
30
36
  defaultIcons?: Partial<
31
37
  Record<"info" | "success" | "warn" | "error" | "spinner", () => string | undefined>
@@ -50,6 +56,12 @@
50
56
  classButton,
51
57
  classSpinnerBox,
52
58
  defaultIcons,
59
+ classButtonCancel,
60
+ classButtonCustom,
61
+ classButtonPrimary,
62
+ variantButtonCancel,
63
+ variantButtonCustom,
64
+ variantButtonPrimary,
53
65
  }: Props = $props();
54
66
 
55
67
  let modal = $state<ModalDialog>();
@@ -103,6 +115,12 @@
103
115
  {classButton}
104
116
  {classSpinnerBox}
105
117
  {defaultIcons}
118
+ {classButtonCancel}
119
+ {classButtonCustom}
120
+ {classButtonPrimary}
121
+ {variantButtonCancel}
122
+ {variantButtonCustom}
123
+ {variantButtonPrimary}
106
124
  />
107
125
  </ModalDialog>
108
126
  {/if}
@@ -14,6 +14,12 @@ interface Props {
14
14
  classMenu?: string;
15
15
  classMenuLi?: string;
16
16
  classButton?: string;
17
+ classButtonCancel?: string;
18
+ classButtonCustom?: string;
19
+ classButtonPrimary?: string;
20
+ variantButtonCancel?: string;
21
+ variantButtonCustom?: string;
22
+ variantButtonPrimary?: string;
17
23
  classSpinnerBox?: string;
18
24
  defaultIcons?: Partial<Record<"info" | "success" | "warn" | "error" | "spinner", () => string | undefined>>;
19
25
  }
@@ -30,6 +30,12 @@
30
30
  classMenu?: string;
31
31
  classMenuLi?: string;
32
32
  classButton?: string;
33
+ classButtonCancel?: string;
34
+ classButtonCustom?: string;
35
+ classButtonPrimary?: string;
36
+ variantButtonCancel?: string;
37
+ variantButtonCustom?: string;
38
+ variantButtonPrimary?: string;
33
39
  classSpinnerBox?: string;
34
40
  defaultIcons?: Partial<
35
41
  Record<"info" | "success" | "warn" | "error" | "spinner", () => string | undefined>
@@ -51,6 +57,12 @@
51
57
  classMenu,
52
58
  classMenuLi,
53
59
  classButton,
60
+ classButtonCancel,
61
+ classButtonCustom,
62
+ classButtonPrimary,
63
+ variantButtonCancel,
64
+ variantButtonCustom,
65
+ variantButtonPrimary = "primary",
54
66
  classSpinnerBox,
55
67
  defaultIcons = acpDefaultIcons,
56
68
  }: Props = $props();
@@ -194,7 +206,8 @@
194
206
  {#if current.type !== ALERT}
195
207
  <li class={twMerge(_classMenuLi, classMenuLi)}>
196
208
  <CmpButtonCancel
197
- class={twMerge("cancel", _classButton, classButton)}
209
+ class={twMerge("cancel", _classButton, classButton, classButtonCancel)}
210
+ variant={variantButtonCancel}
198
211
  disabled={isPending}
199
212
  onclick={createOnClick("cancel", current.onCancel)}
200
213
  >
@@ -205,7 +218,8 @@
205
218
  {#if current.labelCustom && typeof current.onCustom === "function"}
206
219
  <li class={twMerge(_classMenuLi, classMenuLi)}>
207
220
  <CmpButtonCustom
208
- class={twMerge("custom", _classButton, classButton)}
221
+ class={twMerge("custom", _classButton, classButton, classButtonCustom)}
222
+ variant={variantButtonCustom}
209
223
  disabled={isPending}
210
224
  onclick={createOnClick("custom", current.onCustom)}
211
225
  >
@@ -215,8 +229,8 @@
215
229
  {/if}
216
230
  <li class={twMerge(_classMenuLi, classMenuLi)}>
217
231
  <CmpButtonOk
218
- class={twMerge("ok", _classButton, classButton)}
219
- variant="primary"
232
+ class={twMerge("ok", _classButton, classButton, classButtonPrimary)}
233
+ variant={variantButtonPrimary}
220
234
  disabled={isPending}
221
235
  onclick={createOnClick("ok", current.onOk)}
222
236
  bind:el={okButtonEl}
@@ -14,6 +14,12 @@ interface Props {
14
14
  classMenu?: string;
15
15
  classMenuLi?: string;
16
16
  classButton?: string;
17
+ classButtonCancel?: string;
18
+ classButtonCustom?: string;
19
+ classButtonPrimary?: string;
20
+ variantButtonCancel?: string;
21
+ variantButtonCustom?: string;
22
+ variantButtonPrimary?: string;
17
23
  classSpinnerBox?: string;
18
24
  defaultIcons?: Partial<Record<"info" | "success" | "warn" | "error" | "spinner", () => string | undefined>>;
19
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "2.1.29",
3
+ "version": "2.1.31",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",