@marianmeres/stuic 2.1.28 → 2.1.30

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,9 @@
26
26
  classMenu?: string;
27
27
  classMenuLi?: string;
28
28
  classButton?: string;
29
+ classButtonCancel?: string;
30
+ classButtonCustom?: string;
31
+ classButtonPrimary?: string;
29
32
  classSpinnerBox?: string;
30
33
  defaultIcons?: Partial<
31
34
  Record<"info" | "success" | "warn" | "error" | "spinner", () => string | undefined>
@@ -50,6 +53,9 @@
50
53
  classButton,
51
54
  classSpinnerBox,
52
55
  defaultIcons,
56
+ classButtonCancel,
57
+ classButtonCustom,
58
+ classButtonPrimary,
53
59
  }: Props = $props();
54
60
 
55
61
  let modal = $state<ModalDialog>();
@@ -103,6 +109,9 @@
103
109
  {classButton}
104
110
  {classSpinnerBox}
105
111
  {defaultIcons}
112
+ {classButtonCancel}
113
+ {classButtonCustom}
114
+ {classButtonPrimary}
106
115
  />
107
116
  </ModalDialog>
108
117
  {/if}
@@ -14,6 +14,9 @@ interface Props {
14
14
  classMenu?: string;
15
15
  classMenuLi?: string;
16
16
  classButton?: string;
17
+ classButtonCancel?: string;
18
+ classButtonCustom?: string;
19
+ classButtonPrimary?: string;
17
20
  classSpinnerBox?: string;
18
21
  defaultIcons?: Partial<Record<"info" | "success" | "warn" | "error" | "spinner", () => string | undefined>>;
19
22
  }
@@ -30,6 +30,9 @@
30
30
  classMenu?: string;
31
31
  classMenuLi?: string;
32
32
  classButton?: string;
33
+ classButtonCancel?: string;
34
+ classButtonCustom?: string;
35
+ classButtonPrimary?: string;
33
36
  classSpinnerBox?: string;
34
37
  defaultIcons?: Partial<
35
38
  Record<"info" | "success" | "warn" | "error" | "spinner", () => string | undefined>
@@ -51,6 +54,9 @@
51
54
  classMenu,
52
55
  classMenuLi,
53
56
  classButton,
57
+ classButtonCancel,
58
+ classButtonCustom,
59
+ classButtonPrimary,
54
60
  classSpinnerBox,
55
61
  defaultIcons = acpDefaultIcons,
56
62
  }: Props = $props();
@@ -194,7 +200,7 @@
194
200
  {#if current.type !== ALERT}
195
201
  <li class={twMerge(_classMenuLi, classMenuLi)}>
196
202
  <CmpButtonCancel
197
- class={twMerge("cancel", _classButton, classButton)}
203
+ class={twMerge("cancel", _classButton, classButton, classButtonCancel)}
198
204
  disabled={isPending}
199
205
  onclick={createOnClick("cancel", current.onCancel)}
200
206
  >
@@ -205,7 +211,7 @@
205
211
  {#if current.labelCustom && typeof current.onCustom === "function"}
206
212
  <li class={twMerge(_classMenuLi, classMenuLi)}>
207
213
  <CmpButtonCustom
208
- class={twMerge("custom", _classButton, classButton)}
214
+ class={twMerge("custom", _classButton, classButton, classButtonCustom)}
209
215
  disabled={isPending}
210
216
  onclick={createOnClick("custom", current.onCustom)}
211
217
  >
@@ -215,7 +221,7 @@
215
221
  {/if}
216
222
  <li class={twMerge(_classMenuLi, classMenuLi)}>
217
223
  <CmpButtonOk
218
- class={twMerge("ok", _classButton, classButton)}
224
+ class={twMerge("ok", _classButton, classButton, classButtonPrimary)}
219
225
  variant="primary"
220
226
  disabled={isPending}
221
227
  onclick={createOnClick("ok", current.onOk)}
@@ -14,6 +14,9 @@ interface Props {
14
14
  classMenu?: string;
15
15
  classMenuLi?: string;
16
16
  classButton?: string;
17
+ classButtonCancel?: string;
18
+ classButtonCustom?: string;
19
+ classButtonPrimary?: string;
17
20
  classSpinnerBox?: string;
18
21
  defaultIcons?: Partial<Record<"info" | "success" | "warn" | "error" | "spinner", () => string | undefined>>;
19
22
  }
@@ -30,6 +30,7 @@
30
30
  //
31
31
  onOutside?: () => void;
32
32
  // onOutsideEnabled?: boolean;
33
+ noBackdropScrollLock?: boolean;
33
34
  }
34
35
 
35
36
  let {
@@ -48,6 +49,7 @@
48
49
  animOffset = "75vw",
49
50
  onEscape,
50
51
  onOutside,
52
+ noBackdropScrollLock,
51
53
  // onOutsideEnabled = true,
52
54
  }: Props = $props();
53
55
 
@@ -136,6 +138,7 @@
136
138
  fadeOutDuration={transitionDuration}
137
139
  {onEscape}
138
140
  onmousedown={() => onOutside?.()}
141
+ noScrollLock={noBackdropScrollLock}
139
142
  >
140
143
  <!-- svelte-ignore a11y_interactive_supports_focus -->
141
144
  <!-- svelte-ignore a11y_click_events_have_key_events -->
@@ -15,6 +15,7 @@ interface Props {
15
15
  animOffset?: string | number;
16
16
  onEscape?: () => void;
17
17
  onOutside?: () => void;
18
+ noBackdropScrollLock?: boolean;
18
19
  }
19
20
  declare const Drawer: import("svelte").Component<Props, {
20
21
  close: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "2.1.28",
3
+ "version": "2.1.30",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",