@revenuecat/purchases-ui-js 2.0.0 → 2.0.1
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.
- package/dist/components/button/Button.svelte +1 -5
- package/dist/components/button/ButtonNode.stories.svelte +62 -70
- package/dist/components/button/ButtonNode.stories.svelte.d.ts +0 -8
- package/dist/components/button/ButtonNode.svelte +11 -19
- package/dist/components/button/ButtonNode.svelte.d.ts +2 -2
- package/dist/components/button/button-utils.d.ts +2 -2
- package/dist/components/footer/Footer.stories.svelte +30 -22
- package/dist/components/footer/Footer.stories.svelte.d.ts +0 -5
- package/dist/components/footer/Footer.svelte +3 -10
- package/dist/components/footer/Footer.svelte.d.ts +1 -1
- package/dist/components/image/Image.stories.svelte +26 -7
- package/dist/components/image/Image.svelte +17 -15
- package/dist/components/image/image-utils.d.ts +2 -1
- package/dist/components/image/image-utils.js +2 -2
- package/dist/components/package/Package.stories.svelte +31 -27
- package/dist/components/package/Package.stories.svelte.d.ts +0 -6
- package/dist/components/package/Package.svelte +18 -22
- package/dist/components/package/Package.svelte.d.ts +1 -1
- package/dist/components/paywall/Node.svelte +12 -39
- package/dist/components/paywall/Node.svelte.d.ts +4 -8
- package/dist/components/paywall/Paywall.stories.svelte +21 -78
- package/dist/components/paywall/Paywall.svelte +71 -98
- package/dist/components/paywall/Paywall.svelte.d.ts +4 -4
- package/dist/components/paywall/paywall-utils.d.ts +3 -2
- package/dist/components/paywall/paywall-utils.js +5 -5
- package/dist/components/purchase-button/PurchaseButton.stories.svelte +32 -26
- package/dist/components/purchase-button/PurchaseButton.stories.svelte.d.ts +0 -5
- package/dist/components/purchase-button/PurchaseButton.svelte +7 -11
- package/dist/components/purchase-button/PurchaseButton.svelte.d.ts +1 -1
- package/dist/components/purchase-button/purchase-button-utils.d.ts +1 -1
- package/dist/components/stack/Stack.stories.svelte +34 -79
- package/dist/components/stack/Stack.svelte +15 -25
- package/dist/components/stack/stack-utils.d.ts +4 -3
- package/dist/components/stack/stack-utils.js +7 -8
- package/dist/components/text/TextNode.stories.svelte +46 -141
- package/dist/components/text/TextNode.svelte +13 -12
- package/dist/components/text/text-utils.d.ts +7 -6
- package/dist/components/text/text-utils.js +7 -7
- package/dist/components/timeline/Timeline.stories.svelte +41 -47
- package/dist/components/timeline/TimelineItem.svelte +28 -11
- package/dist/components/timeline/timeline-utils.d.ts +3 -3
- package/dist/components/timeline/timeline-utils.js +7 -16
- package/dist/data/entities.d.ts +59 -120
- package/dist/data/state.d.ts +0 -5
- package/dist/stores/color-mode.d.ts +6 -0
- package/dist/stores/color-mode.js +15 -0
- package/dist/stores/localization.d.ts +13 -0
- package/dist/stores/localization.js +25 -0
- package/dist/stores/paywall.d.ts +10 -0
- package/dist/stores/paywall.js +13 -0
- package/dist/stores/variables.d.ts +6 -0
- package/dist/stores/variables.js +14 -0
- package/dist/stories/fixtures.js +7 -76
- package/dist/stories/localization-decorator.d.ts +3 -0
- package/dist/stories/localization-decorator.js +7 -0
- package/dist/stories/paywall-decorator.d.ts +2 -0
- package/dist/stories/paywall-decorator.js +18 -0
- package/dist/stories/variables-decorator.d.ts +3 -0
- package/dist/stories/variables-decorator.js +9 -0
- package/dist/stories/with-layout.svelte +1 -1
- package/dist/types/alignment.d.ts +19 -0
- package/dist/types/alignment.js +1 -0
- package/dist/types/background.d.ts +18 -0
- package/dist/types/background.js +1 -0
- package/dist/types/colors.d.ts +34 -0
- package/dist/types/colors.js +1 -0
- package/dist/types/components/button.d.ts +36 -0
- package/dist/types/components/button.js +1 -0
- package/dist/types/components/footer.d.ts +5 -0
- package/dist/types/components/footer.js +1 -0
- package/dist/types/components/package.d.ts +8 -0
- package/dist/types/components/package.js +1 -0
- package/dist/types/components/purchase-button.d.ts +5 -0
- package/dist/types/components/purchase-button.js +1 -0
- package/dist/types/localization.d.ts +4 -0
- package/dist/types/localization.js +1 -0
- package/dist/types/media.d.ts +18 -0
- package/dist/types/media.js +1 -0
- package/dist/types.d.ts +5 -35
- package/dist/ui/atoms/typography.stories.svelte +8 -14
- package/dist/ui/atoms/typography.svelte +1 -1
- package/dist/ui/molecules/button.stories.svelte +8 -15
- package/dist/ui/molecules/button.svelte +2 -1
- package/dist/ui/molecules/button.svelte.d.ts +2 -26
- package/dist/ui/molecules/types.d.ts +2 -1
- package/dist/utils/style-utils.d.ts +13 -11
- package/dist/utils/style-utils.js +8 -15
- package/dist/utils/variable-utils.d.ts +1 -38
- package/dist/utils/variable-utils.js +6 -48
- package/dist/web-components/index.js +519 -566
- package/package.json +33 -36
- package/dist/stores/theme.d.ts +0 -1
- package/dist/stores/theme.js +0 -17
|
@@ -9,13 +9,9 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const { onclick, children, style, class: clz }: ButtonProps = $props();
|
|
12
|
-
|
|
13
|
-
const handleClick = () => {
|
|
14
|
-
onclick?.();
|
|
15
|
-
};
|
|
16
12
|
</script>
|
|
17
13
|
|
|
18
|
-
<button onclick
|
|
14
|
+
<button {onclick} class={clz} disabled={!onclick} {style}>
|
|
19
15
|
{@render children?.()}
|
|
20
16
|
</button>
|
|
21
17
|
|
|
@@ -1,22 +1,33 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
|
-
import { defineMeta } from "@storybook/addon-svelte-csf";
|
|
3
2
|
import ButtonNode from "./ButtonNode.svelte";
|
|
4
|
-
import type {
|
|
5
|
-
ComponentTypes,
|
|
6
|
-
StackProps,
|
|
7
|
-
SupportedActions,
|
|
8
|
-
} from "../../data/entities";
|
|
3
|
+
import type { StackProps, TextNodeProps } from "../../data/entities";
|
|
9
4
|
import type { PurchaseState } from "../../data/state";
|
|
10
|
-
import {
|
|
5
|
+
import { localizationDecorator } from "../../stories/localization-decorator";
|
|
6
|
+
import { DEFAULT_TEXT_COLOR } from "../../utils/constants";
|
|
7
|
+
import { defineMeta } from "@storybook/addon-svelte-csf";
|
|
11
8
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
};
|
|
9
|
+
const defaultLocale = "en_US";
|
|
10
|
+
|
|
11
|
+
const purchaseState: PurchaseState = {};
|
|
15
12
|
|
|
16
13
|
const { Story } = defineMeta({
|
|
17
14
|
title: "Components/Button",
|
|
18
15
|
component: ButtonNode,
|
|
19
16
|
tags: ["autodocs"],
|
|
17
|
+
decorators: [
|
|
18
|
+
localizationDecorator({
|
|
19
|
+
defaultLocale,
|
|
20
|
+
localizations: {
|
|
21
|
+
[defaultLocale]: {
|
|
22
|
+
id1: "Restore purchases",
|
|
23
|
+
id2: "Navigate back",
|
|
24
|
+
id3: "Navigate to",
|
|
25
|
+
id4: "URL navigation",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
args: { purchaseState },
|
|
20
31
|
argTypes: {
|
|
21
32
|
action: {
|
|
22
33
|
control: { type: "object" },
|
|
@@ -48,51 +59,35 @@
|
|
|
48
59
|
},
|
|
49
60
|
});
|
|
50
61
|
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
light: { type: "hex", value: "transparent" },
|
|
77
|
-
},
|
|
78
|
-
color: {
|
|
79
|
-
dark: { type: "hex", value: DEFAULT_TEXT_COLOR },
|
|
80
|
-
light: { type: "hex", value: "#ffffff" },
|
|
81
|
-
},
|
|
82
|
-
font_size: "body_m",
|
|
83
|
-
margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
|
|
84
|
-
padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
|
|
85
|
-
labels: labelsData,
|
|
86
|
-
size: {
|
|
87
|
-
width: { type: "fit" },
|
|
88
|
-
height: { type: "fit" },
|
|
89
|
-
},
|
|
90
|
-
});
|
|
62
|
+
const textProps = (id: number) =>
|
|
63
|
+
({
|
|
64
|
+
type: "text",
|
|
65
|
+
name: "Button Text",
|
|
66
|
+
components: [],
|
|
67
|
+
id: "button-text-1",
|
|
68
|
+
text_lid: `id${id}`,
|
|
69
|
+
font_weight: "medium",
|
|
70
|
+
horizontal_alignment: "center",
|
|
71
|
+
background_color: {
|
|
72
|
+
dark: { type: "hex", value: "transparent" },
|
|
73
|
+
light: { type: "hex", value: "transparent" },
|
|
74
|
+
},
|
|
75
|
+
color: {
|
|
76
|
+
dark: { type: "hex", value: DEFAULT_TEXT_COLOR },
|
|
77
|
+
light: { type: "hex", value: "#ffffff" },
|
|
78
|
+
},
|
|
79
|
+
font_size: "body_m",
|
|
80
|
+
margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
|
|
81
|
+
padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
|
|
82
|
+
size: {
|
|
83
|
+
width: { type: "fit" },
|
|
84
|
+
height: { type: "fit" },
|
|
85
|
+
},
|
|
86
|
+
}) satisfies Partial<TextNodeProps>;
|
|
91
87
|
|
|
92
|
-
const baseStackProps
|
|
88
|
+
const baseStackProps = {
|
|
93
89
|
type: "stack",
|
|
94
90
|
size: { width: { type: "fill" }, height: { type: "fill" } },
|
|
95
|
-
labels: labelsData,
|
|
96
91
|
dimension: {
|
|
97
92
|
type: "horizontal",
|
|
98
93
|
alignment: "center",
|
|
@@ -109,7 +104,17 @@
|
|
|
109
104
|
dark: { type: "hex", value: "#3471eb" },
|
|
110
105
|
light: { type: "hex", value: "#3471eb" },
|
|
111
106
|
},
|
|
112
|
-
|
|
107
|
+
background: {
|
|
108
|
+
type: "color",
|
|
109
|
+
value: {
|
|
110
|
+
dark: { type: "hex", value: "#3471eb" },
|
|
111
|
+
light: { type: "hex", value: "#3471eb" },
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
border: null,
|
|
115
|
+
shadow: null,
|
|
116
|
+
purchaseState,
|
|
117
|
+
} satisfies Partial<StackProps>;
|
|
113
118
|
</script>
|
|
114
119
|
|
|
115
120
|
<!-- Restore purchases -->
|
|
@@ -118,14 +123,10 @@
|
|
|
118
123
|
args={{
|
|
119
124
|
type: "button",
|
|
120
125
|
action: { type: "restore_purchases" },
|
|
121
|
-
labels: labelsData,
|
|
122
126
|
stack: {
|
|
123
127
|
...baseStackProps,
|
|
124
128
|
components: [textProps(1)],
|
|
125
|
-
|
|
126
|
-
} as StackProps,
|
|
127
|
-
purchaseState: purchaseState,
|
|
128
|
-
onAction,
|
|
129
|
+
},
|
|
129
130
|
}}
|
|
130
131
|
/>
|
|
131
132
|
|
|
@@ -135,8 +136,6 @@
|
|
|
135
136
|
args={{
|
|
136
137
|
type: "button",
|
|
137
138
|
action: { type: "navigate_back" },
|
|
138
|
-
onAction,
|
|
139
|
-
labels: labelsData,
|
|
140
139
|
stack: {
|
|
141
140
|
...baseStackProps,
|
|
142
141
|
shape: {
|
|
@@ -153,8 +152,7 @@
|
|
|
153
152
|
light: { type: "hex", value: "#2E7D32" },
|
|
154
153
|
},
|
|
155
154
|
components: [textProps(2)],
|
|
156
|
-
}
|
|
157
|
-
purchaseState: purchaseState,
|
|
155
|
+
},
|
|
158
156
|
}}
|
|
159
157
|
/>
|
|
160
158
|
|
|
@@ -163,12 +161,10 @@
|
|
|
163
161
|
name="Navigate To"
|
|
164
162
|
args={{
|
|
165
163
|
type: "button",
|
|
166
|
-
labels: labelsData,
|
|
167
164
|
action: {
|
|
168
165
|
type: "navigate_to",
|
|
169
166
|
destination: "customer_center",
|
|
170
167
|
},
|
|
171
|
-
onAction,
|
|
172
168
|
stack: {
|
|
173
169
|
...baseStackProps,
|
|
174
170
|
shape: {
|
|
@@ -185,8 +181,7 @@
|
|
|
185
181
|
light: { type: "hex", value: "#D32F2F" },
|
|
186
182
|
},
|
|
187
183
|
components: [textProps(3)],
|
|
188
|
-
}
|
|
189
|
-
purchaseState: purchaseState,
|
|
184
|
+
},
|
|
190
185
|
}}
|
|
191
186
|
/>
|
|
192
187
|
|
|
@@ -195,7 +190,6 @@
|
|
|
195
190
|
name="URL Navigation"
|
|
196
191
|
args={{
|
|
197
192
|
type: "button",
|
|
198
|
-
labels: labelsData,
|
|
199
193
|
action: {
|
|
200
194
|
type: "navigate_to",
|
|
201
195
|
destination: "url",
|
|
@@ -204,7 +198,6 @@
|
|
|
204
198
|
method: "in_app_browser",
|
|
205
199
|
},
|
|
206
200
|
},
|
|
207
|
-
onAction,
|
|
208
201
|
stack: {
|
|
209
202
|
...baseStackProps,
|
|
210
203
|
background_color: {
|
|
@@ -212,7 +205,6 @@
|
|
|
212
205
|
light: { type: "hex", value: "#4A90E2" },
|
|
213
206
|
},
|
|
214
207
|
components: [textProps(4)],
|
|
215
|
-
}
|
|
216
|
-
purchaseState: purchaseState,
|
|
208
|
+
},
|
|
217
209
|
}}
|
|
218
210
|
/>
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import ButtonNode from "./ButtonNode.svelte";
|
|
2
|
-
export declare const labelsData: {
|
|
3
|
-
en_US: {
|
|
4
|
-
id1: string;
|
|
5
|
-
id2: string;
|
|
6
|
-
id3: string;
|
|
7
|
-
id4: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
2
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
11
3
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
12
4
|
$$bindings?: Bindings;
|
|
@@ -1,37 +1,29 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { ButtonDeprecated } from "../../index";
|
|
3
|
-
import type { ButtonNodeProps } from "../../data/entities";
|
|
4
|
-
import Stack from "../stack/Stack.svelte";
|
|
5
2
|
import { getButtonStyles } from "./button-utils";
|
|
3
|
+
import Stack from "../stack/Stack.svelte";
|
|
4
|
+
import type { ButtonProps } from "../../types/components/button";
|
|
5
|
+
import { ButtonDeprecated } from "../../index";
|
|
6
|
+
import { getPaywallContext } from "../../stores/paywall";
|
|
7
|
+
|
|
8
|
+
const { stack, action, labels, purchaseState, ...restProps }: ButtonProps =
|
|
9
|
+
$props();
|
|
10
|
+
const { onButtonAction } = getPaywallContext();
|
|
6
11
|
|
|
7
|
-
const
|
|
8
|
-
stack,
|
|
9
|
-
action,
|
|
10
|
-
onAction,
|
|
11
|
-
labels,
|
|
12
|
-
purchaseState,
|
|
13
|
-
variableDictionary,
|
|
14
|
-
...restProps
|
|
15
|
-
}: ButtonNodeProps = $props();
|
|
16
|
-
const onClick = () => {
|
|
17
|
-
onAction && onAction(action);
|
|
18
|
-
};
|
|
12
|
+
const onclick = () => onButtonAction(action);
|
|
19
13
|
|
|
20
14
|
const buttonStyles = $derived(
|
|
21
15
|
getButtonStyles({
|
|
22
16
|
stack,
|
|
23
17
|
action,
|
|
24
|
-
onAction,
|
|
25
18
|
labels,
|
|
26
19
|
purchaseState,
|
|
27
|
-
variableDictionary,
|
|
28
20
|
...restProps,
|
|
29
21
|
}),
|
|
30
22
|
);
|
|
31
23
|
</script>
|
|
32
24
|
|
|
33
|
-
<ButtonDeprecated onclick
|
|
34
|
-
<Stack {...stack} {labels} {purchaseState}
|
|
25
|
+
<ButtonDeprecated {onclick} style={buttonStyles} class={"rc-pw-button"}>
|
|
26
|
+
<Stack {...stack} {labels} {purchaseState} />
|
|
35
27
|
</ButtonDeprecated>
|
|
36
28
|
|
|
37
29
|
<style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const ButtonNode: import("svelte").Component<
|
|
1
|
+
import type { ButtonProps } from "../../types/components/button";
|
|
2
|
+
declare const ButtonNode: import("svelte").Component<ButtonProps, {}, "">;
|
|
3
3
|
type ButtonNode = ReturnType<typeof ButtonNode>;
|
|
4
4
|
export default ButtonNode;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function getButtonStyles({ stack, zStackChildStyles }:
|
|
1
|
+
import type { ButtonProps } from "../../types/components/button";
|
|
2
|
+
export declare function getButtonStyles({ stack, zStackChildStyles }: ButtonProps): string;
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
|
-
import { defineMeta } from "@storybook/addon-svelte-csf";
|
|
3
2
|
import Footer from "./Footer.svelte";
|
|
4
|
-
import {
|
|
3
|
+
import type { PurchaseState } from "../../data/state";
|
|
4
|
+
import { localizationDecorator } from "../../stories/localization-decorator";
|
|
5
|
+
import { defineMeta } from "@storybook/addon-svelte-csf";
|
|
5
6
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
defaultLocale: "en_US",
|
|
9
|
-
colorMode: DEFAULT_COLOR_MODE,
|
|
10
|
-
};
|
|
7
|
+
const defaultLocale = "en_US";
|
|
8
|
+
const purchaseState: PurchaseState = {};
|
|
11
9
|
|
|
12
10
|
const { Story } = defineMeta({
|
|
13
11
|
title: "Components/Footer",
|
|
14
12
|
component: Footer,
|
|
15
13
|
tags: ["autodocs"],
|
|
16
|
-
|
|
14
|
+
args: { purchaseState },
|
|
15
|
+
decorators: [
|
|
16
|
+
localizationDecorator({
|
|
17
|
+
defaultLocale,
|
|
18
|
+
localizations: {
|
|
19
|
+
[defaultLocale]: {
|
|
20
|
+
GM2Sytqd5p: "Do it now before you regret it!",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
}),
|
|
24
|
+
],
|
|
17
25
|
});
|
|
18
|
-
|
|
19
|
-
export const labelsData = {
|
|
20
|
-
en_US: {
|
|
21
|
-
GM2Sytqd5p: "Do it now before you regret it!",
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
26
|
</script>
|
|
25
27
|
|
|
26
28
|
<!-- Default -->
|
|
@@ -30,15 +32,23 @@
|
|
|
30
32
|
id: "kHhCWlo9au",
|
|
31
33
|
name: "",
|
|
32
34
|
stack: {
|
|
35
|
+
purchaseState,
|
|
33
36
|
background_color: {
|
|
34
37
|
light: {
|
|
35
38
|
type: "hex",
|
|
36
39
|
value: "#6c6c6cFF",
|
|
37
40
|
},
|
|
38
41
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
background: {
|
|
43
|
+
type: "color",
|
|
44
|
+
value: {
|
|
45
|
+
light: {
|
|
46
|
+
type: "hex",
|
|
47
|
+
value: "#6c6c6cFF",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
border: null,
|
|
42
52
|
components: [
|
|
43
53
|
{
|
|
44
54
|
background_color: null,
|
|
@@ -72,7 +82,7 @@
|
|
|
72
82
|
value: null,
|
|
73
83
|
},
|
|
74
84
|
width: {
|
|
75
|
-
type: "
|
|
85
|
+
type: "fit",
|
|
76
86
|
value: null,
|
|
77
87
|
},
|
|
78
88
|
},
|
|
@@ -81,9 +91,9 @@
|
|
|
81
91
|
},
|
|
82
92
|
],
|
|
83
93
|
dimension: {
|
|
84
|
-
alignment: "top",
|
|
85
|
-
distribution: "space_between",
|
|
86
94
|
type: "vertical",
|
|
95
|
+
alignment: "center",
|
|
96
|
+
distribution: "center",
|
|
87
97
|
},
|
|
88
98
|
id: "yI_0xF4hlJ",
|
|
89
99
|
margin: {
|
|
@@ -131,7 +141,5 @@
|
|
|
131
141
|
type: "stack",
|
|
132
142
|
},
|
|
133
143
|
type: "footer",
|
|
134
|
-
purchaseState: purchaseState,
|
|
135
|
-
labels: labelsData,
|
|
136
144
|
}}
|
|
137
145
|
/>
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import Footer from "./Footer.svelte";
|
|
2
|
-
export declare const labelsData: {
|
|
3
|
-
en_US: {
|
|
4
|
-
GM2Sytqd5p: string;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
2
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
8
3
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
9
4
|
$$bindings?: Bindings;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type { FooterProps } from "../../
|
|
2
|
+
import type { FooterProps } from "../../types/components/footer";
|
|
3
3
|
import Stack from "../stack/Stack.svelte";
|
|
4
4
|
|
|
5
|
-
const {
|
|
6
|
-
stack,
|
|
7
|
-
id,
|
|
8
|
-
labels,
|
|
9
|
-
purchaseState,
|
|
10
|
-
variableDictionary,
|
|
11
|
-
onAction,
|
|
12
|
-
}: FooterProps = $props();
|
|
5
|
+
const { stack, id, labels, purchaseState, onAction }: FooterProps = $props();
|
|
13
6
|
</script>
|
|
14
7
|
|
|
15
8
|
<div class="rc-pw-footer" {id}>
|
|
16
|
-
<Stack {...stack} {labels} {purchaseState} {
|
|
9
|
+
<Stack {...stack} {labels} {purchaseState} {onAction} />
|
|
17
10
|
</div>
|
|
18
11
|
|
|
19
12
|
<style>
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
|
-
import { defineMeta } from "@storybook/addon-svelte-csf";
|
|
3
2
|
import Image from "./Image.svelte";
|
|
4
3
|
import type { PurchaseState } from "../../data/state";
|
|
5
|
-
import {
|
|
4
|
+
import { defineMeta } from "@storybook/addon-svelte-csf";
|
|
6
5
|
|
|
7
|
-
const purchaseState: PurchaseState = {
|
|
8
|
-
colorMode: DEFAULT_COLOR_MODE,
|
|
9
|
-
locale: "en_US",
|
|
10
|
-
defaultLocale: "en_US",
|
|
11
|
-
};
|
|
6
|
+
const purchaseState: PurchaseState = {};
|
|
12
7
|
|
|
13
8
|
const { Story } = defineMeta({
|
|
14
9
|
title: "Components/Image",
|
|
@@ -54,12 +49,15 @@
|
|
|
54
49
|
},
|
|
55
50
|
source: {
|
|
56
51
|
light: {
|
|
52
|
+
width: 600,
|
|
53
|
+
height: 400,
|
|
57
54
|
original: "https://placehold.co/600x400",
|
|
58
55
|
heic: "https://placehold.co/600x400",
|
|
59
56
|
heic_low_res: "https://placehold.co/600x400",
|
|
60
57
|
webp: "https://placehold.co/600x400",
|
|
61
58
|
webp_low_res: "https://placehold.co/600x400",
|
|
62
59
|
},
|
|
60
|
+
dark: null,
|
|
63
61
|
},
|
|
64
62
|
mask_shape: { type: "rectangle" },
|
|
65
63
|
}}
|
|
@@ -78,12 +76,15 @@
|
|
|
78
76
|
},
|
|
79
77
|
source: {
|
|
80
78
|
light: {
|
|
79
|
+
width: 600,
|
|
80
|
+
height: 400,
|
|
81
81
|
original: "https://placehold.co/600x400",
|
|
82
82
|
heic: "https://placehold.co/600x400",
|
|
83
83
|
heic_low_res: "https://placehold.co/600x400",
|
|
84
84
|
webp: "https://placehold.co/600x400",
|
|
85
85
|
webp_low_res: "https://placehold.co/600x400",
|
|
86
86
|
},
|
|
87
|
+
dark: null,
|
|
87
88
|
},
|
|
88
89
|
mask_shape: {
|
|
89
90
|
type: "rectangle",
|
|
@@ -109,12 +110,15 @@
|
|
|
109
110
|
},
|
|
110
111
|
source: {
|
|
111
112
|
light: {
|
|
113
|
+
width: 600,
|
|
114
|
+
height: 400,
|
|
112
115
|
original: "https://placehold.co/600x400",
|
|
113
116
|
heic: "https://placehold.co/600x400",
|
|
114
117
|
heic_low_res: "https://placehold.co/600x400",
|
|
115
118
|
webp: "https://placehold.co/600x400",
|
|
116
119
|
webp_low_res: "https://placehold.co/600x400",
|
|
117
120
|
},
|
|
121
|
+
dark: null,
|
|
118
122
|
},
|
|
119
123
|
mask_shape: { type: "circle" },
|
|
120
124
|
}}
|
|
@@ -132,12 +136,15 @@
|
|
|
132
136
|
},
|
|
133
137
|
source: {
|
|
134
138
|
light: {
|
|
139
|
+
width: 600,
|
|
140
|
+
height: 400,
|
|
135
141
|
original: "https://placehold.co/600x400",
|
|
136
142
|
heic: "https://placehold.co/600x400",
|
|
137
143
|
heic_low_res: "https://placehold.co/600x400",
|
|
138
144
|
webp: "https://placehold.co/600x400",
|
|
139
145
|
webp_low_res: "https://placehold.co/600x400",
|
|
140
146
|
},
|
|
147
|
+
dark: null,
|
|
141
148
|
},
|
|
142
149
|
mask_shape: { type: "concave" },
|
|
143
150
|
}}
|
|
@@ -155,12 +162,15 @@
|
|
|
155
162
|
},
|
|
156
163
|
source: {
|
|
157
164
|
light: {
|
|
165
|
+
width: 600,
|
|
166
|
+
height: 400,
|
|
158
167
|
original: "https://placehold.co/600x400",
|
|
159
168
|
heic: "https://placehold.co/600x400",
|
|
160
169
|
heic_low_res: "https://placehold.co/600x400",
|
|
161
170
|
webp: "https://placehold.co/600x400",
|
|
162
171
|
webp_low_res: "https://placehold.co/600x400",
|
|
163
172
|
},
|
|
173
|
+
dark: null,
|
|
164
174
|
},
|
|
165
175
|
mask_shape: { type: "convex" },
|
|
166
176
|
}}
|
|
@@ -178,12 +188,15 @@
|
|
|
178
188
|
},
|
|
179
189
|
source: {
|
|
180
190
|
light: {
|
|
191
|
+
width: 600,
|
|
192
|
+
height: 400,
|
|
181
193
|
original: "https://placehold.co/600x400",
|
|
182
194
|
heic: "https://placehold.co/600x400",
|
|
183
195
|
heic_low_res: "https://placehold.co/600x400",
|
|
184
196
|
webp: "https://placehold.co/600x400",
|
|
185
197
|
webp_low_res: "https://placehold.co/600x400",
|
|
186
198
|
},
|
|
199
|
+
dark: null,
|
|
187
200
|
},
|
|
188
201
|
color_overlay: {
|
|
189
202
|
dark: {
|
|
@@ -219,12 +232,15 @@
|
|
|
219
232
|
},
|
|
220
233
|
source: {
|
|
221
234
|
light: {
|
|
235
|
+
width: 600,
|
|
236
|
+
height: 400,
|
|
222
237
|
original: "https://placehold.co/600x400",
|
|
223
238
|
heic: "https://placehold.co/600x400",
|
|
224
239
|
heic_low_res: "https://placehold.co/600x400",
|
|
225
240
|
webp: "https://placehold.co/600x400",
|
|
226
241
|
webp_low_res: "https://placehold.co/600x400",
|
|
227
242
|
},
|
|
243
|
+
dark: null,
|
|
228
244
|
},
|
|
229
245
|
color_overlay: {
|
|
230
246
|
dark: {
|
|
@@ -261,12 +277,15 @@
|
|
|
261
277
|
},
|
|
262
278
|
source: {
|
|
263
279
|
light: {
|
|
280
|
+
width: 600,
|
|
281
|
+
height: 400,
|
|
264
282
|
original: "https://placehold.co/600x400",
|
|
265
283
|
heic: "https://placehold.co/600x400",
|
|
266
284
|
heic_low_res: "https://placehold.co/600x400",
|
|
267
285
|
webp: "https://placehold.co/600x400",
|
|
268
286
|
webp_low_res: "https://placehold.co/600x400",
|
|
269
287
|
},
|
|
288
|
+
dark: null,
|
|
270
289
|
},
|
|
271
290
|
color_overlay: {
|
|
272
291
|
dark: {
|