@marianmeres/stuic 3.61.0 → 3.62.0
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.
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
import type { TourStepDef, TourLabels, TourShellContext } from "./onboarding.svelte.js";
|
|
4
4
|
import type { Props as ButtonProps } from "../../components/Button/Button.svelte";
|
|
5
5
|
|
|
6
|
-
type ButtonOverrides = Pick<
|
|
6
|
+
type ButtonOverrides = Pick<
|
|
7
|
+
ButtonProps,
|
|
8
|
+
"variant" | "intent" | "size" | "roundedFull" | "class"
|
|
9
|
+
>;
|
|
7
10
|
|
|
8
11
|
export interface Props {
|
|
9
12
|
step: TourStepDef;
|
|
@@ -34,6 +37,7 @@
|
|
|
34
37
|
import Button from "../../components/Button/Button.svelte";
|
|
35
38
|
import { iconChevronLeft, iconChevronRight, iconCheck } from "../../icons/index.js";
|
|
36
39
|
import { twMerge } from "../../utils/tw-merge.js";
|
|
40
|
+
import { omit } from "../../utils/omit-pick.js";
|
|
37
41
|
|
|
38
42
|
let {
|
|
39
43
|
step,
|
|
@@ -105,21 +109,26 @@
|
|
|
105
109
|
{#if !isFirst}
|
|
106
110
|
<Button
|
|
107
111
|
onclick={prev}
|
|
108
|
-
class={twMerge(BUTTON_CLS, classControls)}
|
|
112
|
+
class={twMerge(BUTTON_CLS, classControls, prevButtonProps?.class)}
|
|
109
113
|
{...BUTTON_PROPS}
|
|
110
|
-
{...prevButtonProps}
|
|
114
|
+
{...omit(prevButtonProps ?? {}, "class")}
|
|
111
115
|
>
|
|
112
116
|
{@html iconChevronLeft({ size: ICON_SIZE })}
|
|
113
117
|
</Button>
|
|
114
118
|
{/if}
|
|
115
119
|
<Button
|
|
116
120
|
onclick={next}
|
|
117
|
-
class={twMerge(
|
|
121
|
+
class={twMerge(
|
|
122
|
+
BUTTON_CLS,
|
|
123
|
+
_finishLabel && "pl-2 pr-3",
|
|
124
|
+
classControls,
|
|
125
|
+
nextButtonProps?.class
|
|
126
|
+
)}
|
|
118
127
|
{...BUTTON_PROPS}
|
|
119
128
|
aspect1={!_finishLabel}
|
|
120
129
|
intent="primary"
|
|
121
130
|
variant="solid"
|
|
122
|
-
{...nextButtonProps}
|
|
131
|
+
{...omit(nextButtonProps ?? {}, "class")}
|
|
123
132
|
>
|
|
124
133
|
{@html isLast
|
|
125
134
|
? iconCheck({ size: ICON_SIZE })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
2
|
import type { TourStepDef, TourLabels, TourShellContext } from "./onboarding.svelte.js";
|
|
3
3
|
import type { Props as ButtonProps } from "../../components/Button/Button.svelte";
|
|
4
|
-
type ButtonOverrides = Pick<ButtonProps, "variant" | "intent" | "size" | "roundedFull">;
|
|
4
|
+
type ButtonOverrides = Pick<ButtonProps, "variant" | "intent" | "size" | "roundedFull" | "class">;
|
|
5
5
|
export interface Props {
|
|
6
6
|
step: TourStepDef;
|
|
7
7
|
/** 0-based index of this step */
|