@revenuecat/purchases-ui-js 2.0.1 → 2.0.3

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.
Files changed (138) hide show
  1. package/dist/components/button/ButtonNode.stories.svelte +66 -108
  2. package/dist/components/button/ButtonNode.svelte +3 -31
  3. package/dist/components/footer/Footer.stories.svelte +112 -106
  4. package/dist/components/footer/Footer.svelte +10 -6
  5. package/dist/components/icon/Icon.stories.svelte +100 -0
  6. package/dist/components/icon/Icon.stories.svelte.d.ts +19 -0
  7. package/dist/components/icon/Icon.svelte +73 -0
  8. package/dist/components/icon/Icon.svelte.d.ts +4 -0
  9. package/dist/components/image/ClipPath.svelte +49 -0
  10. package/dist/components/image/ClipPath.svelte.d.ts +9 -0
  11. package/dist/components/image/Image.stories.svelte +83 -199
  12. package/dist/components/image/Image.svelte +152 -137
  13. package/dist/components/image/Image.svelte.d.ts +1 -1
  14. package/dist/components/image/Overlay.svelte +36 -0
  15. package/dist/components/image/Overlay.svelte.d.ts +8 -0
  16. package/dist/components/package/Package.stories.svelte +12 -27
  17. package/dist/components/package/Package.svelte +10 -44
  18. package/dist/components/paywall/Node.svelte +45 -43
  19. package/dist/components/paywall/Node.svelte.d.ts +10 -12
  20. package/dist/components/paywall/Paywall.stories.svelte +36 -140
  21. package/dist/components/paywall/Paywall.svelte +38 -20
  22. package/dist/components/paywall/Paywall.svelte.d.ts +3 -2
  23. package/dist/components/paywall/fixtures/override-paywall.d.ts +2 -0
  24. package/dist/components/paywall/fixtures/override-paywall.js +1310 -0
  25. package/dist/components/paywall/fixtures/stack-paywall.d.ts +2 -0
  26. package/dist/components/paywall/fixtures/stack-paywall.js +5223 -0
  27. package/dist/components/paywall/fixtures/variables.d.ts +261 -0
  28. package/dist/components/paywall/fixtures/variables.js +262 -0
  29. package/dist/components/purchase-button/PurchaseButton.stories.svelte +10 -29
  30. package/dist/components/purchase-button/PurchaseButton.svelte +2 -34
  31. package/dist/components/stack/Stack.stories.svelte +2364 -1020
  32. package/dist/components/stack/Stack.svelte +108 -151
  33. package/dist/components/stack/Stack.svelte.d.ts +6 -2
  34. package/dist/components/stack/stack-utils.d.ts +10 -30
  35. package/dist/components/stack/stack-utils.js +77 -257
  36. package/dist/components/text/Text.svelte +3 -37
  37. package/dist/components/text/Text.svelte.d.ts +1 -2
  38. package/dist/components/text/TextNode.stories.svelte +10 -48
  39. package/dist/components/text/TextNode.svelte +25 -37
  40. package/dist/components/text/TextNode.svelte.d.ts +1 -1
  41. package/dist/components/text/text-utils.d.ts +4 -9
  42. package/dist/components/text/text-utils.js +32 -117
  43. package/dist/components/timeline/Timeline.stories.svelte +640 -256
  44. package/dist/components/timeline/Timeline.svelte +42 -30
  45. package/dist/components/timeline/Timeline.svelte.d.ts +1 -1
  46. package/dist/components/timeline/TimelineItem.svelte +80 -112
  47. package/dist/components/timeline/TimelineItem.svelte.d.ts +6 -2
  48. package/dist/components/timeline/timeline-utils.d.ts +24 -6
  49. package/dist/components/timeline/timeline-utils.js +21 -114
  50. package/dist/data/entities.d.ts +23 -169
  51. package/dist/index.d.ts +11 -10
  52. package/dist/index.js +11 -10
  53. package/dist/stores/color-mode.d.ts +1 -1
  54. package/dist/stores/localization.d.ts +1 -1
  55. package/dist/stores/localization.js +3 -2
  56. package/dist/stores/paywall.d.ts +7 -3
  57. package/dist/stores/selected.d.ts +5 -0
  58. package/dist/stores/selected.js +12 -0
  59. package/dist/stores/variables.d.ts +2 -3
  60. package/dist/stores/variables.js +0 -1
  61. package/dist/stories/component-decorator.d.ts +2 -0
  62. package/dist/stories/component-decorator.js +12 -0
  63. package/dist/stories/fixtures.d.ts +6 -4
  64. package/dist/stories/fixtures.js +6241 -5485
  65. package/dist/stories/localization-decorator.js +1 -1
  66. package/dist/stories/paywall-decorator.js +8 -1
  67. package/dist/stories/variables-decorator.d.ts +1 -1
  68. package/dist/stories/viewport-decorator.d.ts +2 -0
  69. package/dist/stories/viewport-decorator.js +8 -0
  70. package/dist/stories/viewport-wrapper.svelte +53 -0
  71. package/dist/stories/viewport-wrapper.svelte.d.ts +10 -0
  72. package/dist/stories/with-layout.d.ts +2 -10
  73. package/dist/stories/with-layout.js +3 -5
  74. package/dist/stories/with-layout.svelte +3 -3
  75. package/dist/types/alignment.d.ts +5 -3
  76. package/dist/types/background.d.ts +6 -5
  77. package/dist/types/base.d.ts +7 -0
  78. package/dist/types/colors.d.ts +4 -4
  79. package/dist/types/component.d.ts +10 -0
  80. package/dist/types/component.js +1 -0
  81. package/dist/types/components/button.d.ts +5 -2
  82. package/dist/types/components/footer.d.ts +3 -2
  83. package/dist/types/components/icon.d.ts +28 -0
  84. package/dist/types/components/icon.js +1 -0
  85. package/dist/types/components/image.d.ts +20 -0
  86. package/dist/types/components/image.js +1 -0
  87. package/dist/types/components/package.d.ts +3 -2
  88. package/dist/types/components/purchase-button.d.ts +3 -2
  89. package/dist/types/components/stack.d.ts +32 -0
  90. package/dist/types/components/stack.js +1 -0
  91. package/dist/types/components/text.d.ts +20 -0
  92. package/dist/types/components/text.js +1 -0
  93. package/dist/types/components/timeline.d.ts +35 -0
  94. package/dist/types/components/timeline.js +1 -0
  95. package/dist/types/localization.d.ts +2 -1
  96. package/dist/types/media.d.ts +4 -3
  97. package/dist/types/overrides.d.ts +48 -0
  98. package/dist/types/overrides.js +1 -0
  99. package/dist/types/variables.d.ts +13 -0
  100. package/dist/types/variables.js +10 -0
  101. package/dist/types.d.ts +17 -9
  102. package/dist/ui/atoms/typography.stories.svelte +3 -29
  103. package/dist/ui/atoms/typography.stories.svelte.d.ts +1 -1
  104. package/dist/ui/layout/main-block.svelte +2 -2
  105. package/dist/ui/molecules/button.stories.svelte +5 -10
  106. package/dist/ui/molecules/button.svelte +1 -1
  107. package/dist/ui/theme/colors.d.ts +0 -6
  108. package/dist/ui/theme/colors.js +1 -1
  109. package/dist/ui/theme/text.d.ts +3 -4
  110. package/dist/ui/theme/theme.d.ts +2 -2
  111. package/dist/ui/theme/theme.js +2 -2
  112. package/dist/ui/theme/utils.d.ts +2 -12
  113. package/dist/ui/theme/utils.js +5 -5
  114. package/dist/utils/background-utils.d.ts +4 -0
  115. package/dist/utils/background-utils.js +39 -0
  116. package/dist/utils/base-utils.d.ts +18 -0
  117. package/dist/utils/base-utils.js +124 -0
  118. package/dist/utils/constants.d.ts +2 -2
  119. package/dist/utils/constants.js +6 -1
  120. package/dist/utils/font-utils.d.ts +4 -0
  121. package/dist/utils/font-utils.js +47 -0
  122. package/dist/utils/style-utils.d.ts +7 -120
  123. package/dist/utils/style-utils.js +35 -314
  124. package/dist/utils/variable-utils.d.ts +1 -22
  125. package/dist/utils/variable-utils.js +28 -24
  126. package/dist/web-components/index.css +1 -1
  127. package/dist/web-components/index.js +1415 -987
  128. package/package.json +34 -24
  129. package/dist/components/button/button-utils.d.ts +0 -2
  130. package/dist/components/button/button-utils.js +0 -19
  131. package/dist/components/image/image-utils.d.ts +0 -19
  132. package/dist/components/image/image-utils.js +0 -33
  133. package/dist/components/purchase-button/purchase-button-utils.d.ts +0 -2
  134. package/dist/components/purchase-button/purchase-button-utils.js +0 -20
  135. package/dist/data/state.d.ts +0 -4
  136. package/dist/stories/meta-templates.d.ts +0 -12
  137. package/dist/stories/meta-templates.js +0 -155
  138. /package/dist/{data/state.js → types/base.js} +0 -0
@@ -1,18 +1,14 @@
1
1
  <script module lang="ts">
2
- import { Timeline } from "../..";
2
+ import { FontWeights, Timeline } from "../..";
3
3
  import { defaultColor } from "../text/text-utils";
4
- import type { PurchaseState } from "../../data/state";
5
4
  import { localizationDecorator } from "../../stories/localization-decorator";
6
5
  import { defineMeta } from "@storybook/addon-svelte-csf";
7
6
 
8
7
  const defaultLocale = "en_US";
9
8
 
10
- const purchaseState: PurchaseState = {};
11
-
12
9
  const { Story } = defineMeta({
13
10
  title: "Components/Timeline",
14
11
  component: Timeline,
15
- tags: ["autodocs"],
16
12
  decorators: [
17
13
  localizationDecorator({
18
14
  defaultLocale,
@@ -42,18 +38,16 @@
42
38
  },
43
39
  }),
44
40
  ],
45
- args: { purchaseState },
46
- argTypes: {},
47
41
  });
48
42
  </script>
49
43
 
50
- <!-- Timeline -->
51
44
  <Story
52
45
  name="Round icon"
53
46
  args={{
54
47
  type: "timeline",
55
- item_spacing: 32,
56
- text_spacing: 16,
48
+ item_spacing: 16,
49
+ text_spacing: 4,
50
+ column_gutter: 16,
57
51
  size: { width: { type: "fill" }, height: { type: "fit" } },
58
52
  margin: { top: 8, trailing: 8, bottom: 8, leading: 8 },
59
53
  padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
@@ -61,15 +55,36 @@
61
55
  name: "default timeline",
62
56
  items: [
63
57
  {
58
+ id: "item-1",
59
+ name: "item-1",
60
+ type: "timeline_item",
64
61
  title: {
65
62
  text_lid: "asd123",
66
63
  color: defaultColor,
67
64
  horizontal_alignment: "center",
65
+ font_size: 18,
66
+ font_weight: "bold",
67
+ font_weight_int: 700,
68
+ type: "text",
69
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
70
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
71
+ size: { width: { type: "fit" }, height: { type: "fit" } },
72
+ id: "title-1",
73
+ name: "title-1",
68
74
  },
69
75
  description: {
70
76
  text_lid: "asd123d",
71
77
  color: defaultColor,
72
78
  horizontal_alignment: "center",
79
+ font_size: 18,
80
+ font_weight: "regular",
81
+ font_weight_int: 400,
82
+ type: "text",
83
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
84
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
85
+ size: { width: { type: "fit" }, height: { type: "fit" } },
86
+ id: "description-1",
87
+ name: "description-1",
73
88
  },
74
89
  icon: {
75
90
  name: "check",
@@ -79,29 +94,64 @@
79
94
  value: "#FAFAFA",
80
95
  },
81
96
  },
82
- width_and_height: 32,
83
- padding: 16,
84
- },
85
- icon_background: {
86
- shape: { type: "circle" },
87
- color: {
88
- light: {
89
- type: "hex",
90
- value: "#3f3f3f",
97
+ size: {
98
+ width: { type: "fixed", value: 32 },
99
+ height: { type: "fixed", value: 32 },
100
+ },
101
+ type: "icon",
102
+ padding: { top: 4, trailing: 4, bottom: 4, leading: 4 },
103
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
104
+ id: "icon-1",
105
+ icon_name: "check",
106
+ base_url: "https://icons.pawwalls.com/icons",
107
+ formats: {
108
+ heic: "check.heic",
109
+ png: "check.png",
110
+ svg: "check.svg",
111
+ webp: "check.webp",
112
+ },
113
+ icon_background: {
114
+ shape: { type: "circle" },
115
+ color: {
116
+ light: {
117
+ type: "hex",
118
+ value: "#3f3f3f",
119
+ },
91
120
  },
92
121
  },
93
122
  },
94
123
  },
95
124
  {
125
+ id: "item-2",
126
+ name: "item-2",
127
+ type: "timeline_item",
96
128
  title: {
97
129
  text_lid: "qwe123",
98
130
  color: defaultColor,
99
131
  horizontal_alignment: "center",
132
+ font_size: 18,
133
+ font_weight: "bold",
134
+ font_weight_int: 700,
135
+ type: "text",
136
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
137
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
138
+ size: { width: { type: "fit" }, height: { type: "fit" } },
139
+ id: "title-2",
140
+ name: "title-2",
100
141
  },
101
142
  description: {
102
143
  text_lid: "qwe123d",
103
144
  color: defaultColor,
104
145
  horizontal_alignment: "center",
146
+ font_size: 18,
147
+ font_weight: "regular",
148
+ font_weight_int: 400,
149
+ type: "text",
150
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
151
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
152
+ size: { width: { type: "fit" }, height: { type: "fit" } },
153
+ id: "description-2",
154
+ name: "description-2",
105
155
  },
106
156
  icon: {
107
157
  name: "check",
@@ -111,29 +161,64 @@
111
161
  value: "#FAFAFA",
112
162
  },
113
163
  },
114
- width_and_height: 32,
115
- padding: 16,
116
- },
117
- icon_background: {
118
- shape: { type: "circle" },
119
- color: {
120
- light: {
121
- type: "hex",
122
- value: "#3f3f3f",
164
+ size: {
165
+ width: { type: "fixed", value: 32 },
166
+ height: { type: "fixed", value: 32 },
167
+ },
168
+ type: "icon",
169
+ padding: { top: 4, trailing: 4, bottom: 4, leading: 4 },
170
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
171
+ id: "icon-2",
172
+ icon_name: "check",
173
+ base_url: "https://icons.pawwalls.com/icons",
174
+ formats: {
175
+ heic: "check.heic",
176
+ png: "check.png",
177
+ svg: "check.svg",
178
+ webp: "check.webp",
179
+ },
180
+ icon_background: {
181
+ shape: { type: "circle" },
182
+ color: {
183
+ light: {
184
+ type: "hex",
185
+ value: "#3f3f3f",
186
+ },
123
187
  },
124
188
  },
125
189
  },
126
190
  },
127
191
  {
192
+ id: "item-3",
193
+ name: "item-3",
194
+ type: "timeline_item",
128
195
  title: {
129
196
  text_lid: "zxc123",
130
197
  color: defaultColor,
131
198
  horizontal_alignment: "center",
199
+ font_size: 18,
200
+ font_weight: "bold",
201
+ font_weight_int: 700,
202
+ type: "text",
203
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
204
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
205
+ size: { width: { type: "fit" }, height: { type: "fit" } },
206
+ id: "title-3",
207
+ name: "title-3",
132
208
  },
133
209
  description: {
134
210
  text_lid: "zxc123d",
135
211
  color: defaultColor,
136
212
  horizontal_alignment: "center",
213
+ font_size: 18,
214
+ font_weight: "regular",
215
+ font_weight_int: 400,
216
+ type: "text",
217
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
218
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
219
+ size: { width: { type: "fit" }, height: { type: "fit" } },
220
+ id: "description-3",
221
+ name: "description-3",
137
222
  },
138
223
  icon: {
139
224
  name: "check",
@@ -143,15 +228,29 @@
143
228
  value: "#FAFAFA",
144
229
  },
145
230
  },
146
- width_and_height: 32,
147
- padding: 16,
148
- },
149
- icon_background: {
150
- shape: { type: "circle" },
151
- color: {
152
- light: {
153
- type: "hex",
154
- value: "#3f3f3f",
231
+ size: {
232
+ width: { type: "fixed", value: 32 },
233
+ height: { type: "fixed", value: 32 },
234
+ },
235
+ type: "icon",
236
+ padding: { top: 4, trailing: 4, bottom: 4, leading: 4 },
237
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
238
+ id: "icon-3",
239
+ icon_name: "check",
240
+ base_url: "https://icons.pawwalls.com/icons",
241
+ formats: {
242
+ heic: "check.heic",
243
+ png: "check.png",
244
+ svg: "check.svg",
245
+ webp: "check.webp",
246
+ },
247
+ icon_background: {
248
+ shape: { type: "circle" },
249
+ color: {
250
+ light: {
251
+ type: "hex",
252
+ value: "#3f3f3f",
253
+ },
155
254
  },
156
255
  },
157
256
  },
@@ -164,8 +263,9 @@
164
263
  name="Square icon"
165
264
  args={{
166
265
  type: "timeline",
167
- item_spacing: 32,
168
- text_spacing: 16,
266
+ item_spacing: 16,
267
+ text_spacing: 4,
268
+ column_gutter: 16,
169
269
  size: { width: { type: "fill" }, height: { type: "fit" } },
170
270
  margin: { top: 8, trailing: 8, bottom: 8, leading: 8 },
171
271
  padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
@@ -173,15 +273,36 @@
173
273
  name: "default timeline",
174
274
  items: [
175
275
  {
276
+ id: "item-1",
277
+ name: "item-1",
278
+ type: "timeline_item",
176
279
  title: {
177
280
  text_lid: "asd123",
178
281
  color: defaultColor,
179
282
  horizontal_alignment: "center",
283
+ font_size: 18,
284
+ font_weight: "bold",
285
+ font_weight_int: 700,
286
+ type: "text",
287
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
288
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
289
+ size: { width: { type: "fit" }, height: { type: "fit" } },
290
+ id: "title-1",
291
+ name: "title-1",
180
292
  },
181
293
  description: {
182
294
  text_lid: "asd123d",
183
295
  color: defaultColor,
184
296
  horizontal_alignment: "center",
297
+ font_size: 18,
298
+ font_weight: "regular",
299
+ font_weight_int: 400,
300
+ type: "text",
301
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
302
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
303
+ size: { width: { type: "fit" }, height: { type: "fit" } },
304
+ id: "description-1",
305
+ name: "description-1",
185
306
  },
186
307
  icon: {
187
308
  name: "check",
@@ -191,37 +312,72 @@
191
312
  value: "#FAFAFA",
192
313
  },
193
314
  },
194
- width_and_height: 32,
195
- padding: 16,
196
- },
197
- icon_background: {
198
- shape: {
199
- type: "rectangle",
200
- corners: {
201
- top_leading: 0,
202
- top_trailing: 0,
203
- bottom_leading: 0,
204
- bottom_trailing: 0,
205
- },
206
- },
207
- color: {
208
- light: {
209
- type: "hex",
210
- value: "#3f3f3f",
315
+ size: {
316
+ width: { type: "fixed", value: 32 },
317
+ height: { type: "fixed", value: 32 },
318
+ },
319
+ type: "icon",
320
+ padding: { top: 4, trailing: 4, bottom: 4, leading: 4 },
321
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
322
+ id: "icon-1",
323
+ icon_name: "check",
324
+ base_url: "https://icons.pawwalls.com/icons",
325
+ formats: {
326
+ heic: "check.heic",
327
+ png: "check.png",
328
+ svg: "check.svg",
329
+ webp: "check.webp",
330
+ },
331
+ icon_background: {
332
+ shape: {
333
+ type: "rectangle",
334
+ corners: {
335
+ top_leading: 0,
336
+ top_trailing: 0,
337
+ bottom_leading: 0,
338
+ bottom_trailing: 0,
339
+ },
340
+ },
341
+ color: {
342
+ light: {
343
+ type: "hex",
344
+ value: "#3f3f3f",
345
+ },
211
346
  },
212
347
  },
213
348
  },
214
349
  },
215
350
  {
351
+ id: "item-2",
352
+ name: "item-2",
353
+ type: "timeline_item",
216
354
  title: {
217
355
  text_lid: "qwe123",
218
356
  color: defaultColor,
219
357
  horizontal_alignment: "center",
358
+ font_size: 18,
359
+ font_weight: "bold",
360
+ font_weight_int: 700,
361
+ type: "text",
362
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
363
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
364
+ size: { width: { type: "fit" }, height: { type: "fit" } },
365
+ id: "title-2",
366
+ name: "title-2",
220
367
  },
221
368
  description: {
222
369
  text_lid: "qwe123d",
223
370
  color: defaultColor,
224
371
  horizontal_alignment: "center",
372
+ font_size: 18,
373
+ font_weight: "regular",
374
+ font_weight_int: 400,
375
+ type: "text",
376
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
377
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
378
+ size: { width: { type: "fit" }, height: { type: "fit" } },
379
+ id: "description-2",
380
+ name: "description-2",
225
381
  },
226
382
  icon: {
227
383
  name: "check",
@@ -231,37 +387,72 @@
231
387
  value: "#FAFAFA",
232
388
  },
233
389
  },
234
- width_and_height: 32,
235
- padding: 16,
236
- },
237
- icon_background: {
238
- shape: {
239
- type: "rectangle",
240
- corners: {
241
- top_leading: 8,
242
- top_trailing: 8,
243
- bottom_leading: 8,
244
- bottom_trailing: 8,
245
- },
246
- },
247
- color: {
248
- light: {
249
- type: "hex",
250
- value: "#3f3f3f",
390
+ size: {
391
+ width: { type: "fixed", value: 32 },
392
+ height: { type: "fixed", value: 32 },
393
+ },
394
+ type: "icon",
395
+ padding: { top: 4, trailing: 4, bottom: 4, leading: 4 },
396
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
397
+ id: "icon-2",
398
+ icon_name: "check",
399
+ base_url: "https://icons.pawwalls.com/icons",
400
+ formats: {
401
+ heic: "check.heic",
402
+ png: "check.png",
403
+ svg: "check.svg",
404
+ webp: "check.webp",
405
+ },
406
+ icon_background: {
407
+ shape: {
408
+ type: "rectangle",
409
+ corners: {
410
+ top_leading: 0,
411
+ top_trailing: 0,
412
+ bottom_leading: 0,
413
+ bottom_trailing: 0,
414
+ },
415
+ },
416
+ color: {
417
+ light: {
418
+ type: "hex",
419
+ value: "#3f3f3f",
420
+ },
251
421
  },
252
422
  },
253
423
  },
254
424
  },
255
425
  {
426
+ id: "item-3",
427
+ name: "item-3",
428
+ type: "timeline_item",
256
429
  title: {
257
430
  text_lid: "zxc123",
258
431
  color: defaultColor,
259
432
  horizontal_alignment: "center",
433
+ font_size: 18,
434
+ font_weight: "bold",
435
+ font_weight_int: 700,
436
+ type: "text",
437
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
438
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
439
+ size: { width: { type: "fit" }, height: { type: "fit" } },
440
+ id: "title-3",
441
+ name: "title-3",
260
442
  },
261
443
  description: {
262
444
  text_lid: "zxc123d",
263
445
  color: defaultColor,
264
446
  horizontal_alignment: "center",
447
+ font_size: 18,
448
+ font_weight: "regular",
449
+ font_weight_int: 400,
450
+ type: "text",
451
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
452
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
453
+ size: { width: { type: "fit" }, height: { type: "fit" } },
454
+ id: "description-3",
455
+ name: "description-3",
265
456
  },
266
457
  icon: {
267
458
  name: "check",
@@ -271,23 +462,37 @@
271
462
  value: "#FAFAFA",
272
463
  },
273
464
  },
274
- width_and_height: 32,
275
- padding: 16,
276
- },
277
- icon_background: {
278
- shape: {
279
- type: "rectangle",
280
- corners: {
281
- top_leading: 16,
282
- top_trailing: 16,
283
- bottom_leading: 16,
284
- bottom_trailing: 16,
285
- },
286
- },
287
- color: {
288
- light: {
289
- type: "hex",
290
- value: "#3f3f3f",
465
+ size: {
466
+ width: { type: "fixed", value: 32 },
467
+ height: { type: "fixed", value: 32 },
468
+ },
469
+ type: "icon",
470
+ padding: { top: 4, trailing: 4, bottom: 4, leading: 4 },
471
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
472
+ id: "icon-3",
473
+ icon_name: "check",
474
+ base_url: "https://icons.pawwalls.com/icons",
475
+ formats: {
476
+ heic: "check.heic",
477
+ png: "check.png",
478
+ svg: "check.svg",
479
+ webp: "check.webp",
480
+ },
481
+ icon_background: {
482
+ shape: {
483
+ type: "rectangle",
484
+ corners: {
485
+ top_leading: 0,
486
+ top_trailing: 0,
487
+ bottom_leading: 0,
488
+ bottom_trailing: 0,
489
+ },
490
+ },
491
+ color: {
492
+ light: {
493
+ type: "hex",
494
+ value: "#3f3f3f",
495
+ },
291
496
  },
292
497
  },
293
498
  },
@@ -295,12 +500,14 @@
295
500
  ],
296
501
  }}
297
502
  />
503
+
298
504
  <Story
299
- name="With connector"
505
+ name="Square icon with rounded corners"
300
506
  args={{
301
507
  type: "timeline",
302
- item_spacing: 32,
303
- text_spacing: 16,
508
+ item_spacing: 16,
509
+ text_spacing: 4,
510
+ column_gutter: 16,
304
511
  size: { width: { type: "fill" }, height: { type: "fit" } },
305
512
  margin: { top: 8, trailing: 8, bottom: 8, leading: 8 },
306
513
  padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
@@ -308,15 +515,36 @@
308
515
  name: "default timeline",
309
516
  items: [
310
517
  {
518
+ id: "item-1",
519
+ name: "item-1",
520
+ type: "timeline_item",
311
521
  title: {
312
522
  text_lid: "asd123",
313
523
  color: defaultColor,
314
524
  horizontal_alignment: "center",
525
+ font_size: 18,
526
+ font_weight: "bold",
527
+ font_weight_int: 700,
528
+ type: "text",
529
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
530
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
531
+ size: { width: { type: "fit" }, height: { type: "fit" } },
532
+ id: "title-1",
533
+ name: "title-1",
315
534
  },
316
535
  description: {
317
536
  text_lid: "asd123d",
318
537
  color: defaultColor,
319
538
  horizontal_alignment: "center",
539
+ font_size: 18,
540
+ font_weight: "regular",
541
+ font_weight_int: 400,
542
+ type: "text",
543
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
544
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
545
+ size: { width: { type: "fit" }, height: { type: "fit" } },
546
+ id: "description-1",
547
+ name: "description-1",
320
548
  },
321
549
  icon: {
322
550
  name: "check",
@@ -326,34 +554,72 @@
326
554
  value: "#FAFAFA",
327
555
  },
328
556
  },
329
- width_and_height: 32,
330
- padding: 16,
331
- },
332
- icon_background: {
333
- shape: { type: "circle" },
334
- color: {
335
- light: {
336
- type: "hex",
337
- value: "#3f3f3f",
557
+ size: {
558
+ width: { type: "fixed", value: 32 },
559
+ height: { type: "fixed", value: 32 },
560
+ },
561
+ type: "icon",
562
+ padding: { top: 4, trailing: 4, bottom: 4, leading: 4 },
563
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
564
+ id: "icon-1",
565
+ icon_name: "check",
566
+ base_url: "https://icons.pawwalls.com/icons",
567
+ formats: {
568
+ heic: "check.heic",
569
+ png: "check.png",
570
+ svg: "check.svg",
571
+ webp: "check.webp",
572
+ },
573
+ icon_background: {
574
+ shape: {
575
+ type: "rectangle",
576
+ corners: {
577
+ top_leading: 8,
578
+ top_trailing: 8,
579
+ bottom_leading: 8,
580
+ bottom_trailing: 8,
581
+ },
582
+ },
583
+ color: {
584
+ light: {
585
+ type: "hex",
586
+ value: "#3f3f3f",
587
+ },
338
588
  },
339
589
  },
340
590
  },
341
- connector: {
342
- width: 8,
343
- margin: { top: 0, bottom: 0 },
344
- color: { light: { type: "hex", value: "#d3d3d3" } },
345
- },
346
591
  },
347
592
  {
593
+ id: "item-2",
594
+ name: "item-2",
595
+ type: "timeline_item",
348
596
  title: {
349
597
  text_lid: "qwe123",
350
598
  color: defaultColor,
351
599
  horizontal_alignment: "center",
600
+ font_size: 18,
601
+ font_weight: "bold",
602
+ font_weight_int: 700,
603
+ type: "text",
604
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
605
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
606
+ size: { width: { type: "fit" }, height: { type: "fit" } },
607
+ id: "title-2",
608
+ name: "title-2",
352
609
  },
353
610
  description: {
354
611
  text_lid: "qwe123d",
355
612
  color: defaultColor,
356
613
  horizontal_alignment: "center",
614
+ font_size: 18,
615
+ font_weight: "regular",
616
+ font_weight_int: 400,
617
+ type: "text",
618
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
619
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
620
+ size: { width: { type: "fit" }, height: { type: "fit" } },
621
+ id: "description-2",
622
+ name: "description-2",
357
623
  },
358
624
  icon: {
359
625
  name: "check",
@@ -363,34 +629,72 @@
363
629
  value: "#FAFAFA",
364
630
  },
365
631
  },
366
- width_and_height: 32,
367
- padding: 16,
368
- },
369
- icon_background: {
370
- shape: { type: "circle" },
371
- color: {
372
- light: {
373
- type: "hex",
374
- value: "#3f3f3f",
632
+ size: {
633
+ width: { type: "fixed", value: 32 },
634
+ height: { type: "fixed", value: 32 },
635
+ },
636
+ type: "icon",
637
+ padding: { top: 4, trailing: 4, bottom: 4, leading: 4 },
638
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
639
+ id: "icon-2",
640
+ icon_name: "check",
641
+ base_url: "https://icons.pawwalls.com/icons",
642
+ formats: {
643
+ heic: "check.heic",
644
+ png: "check.png",
645
+ svg: "check.svg",
646
+ webp: "check.webp",
647
+ },
648
+ icon_background: {
649
+ shape: {
650
+ type: "rectangle",
651
+ corners: {
652
+ top_leading: 8,
653
+ top_trailing: 8,
654
+ bottom_leading: 8,
655
+ bottom_trailing: 8,
656
+ },
657
+ },
658
+ color: {
659
+ light: {
660
+ type: "hex",
661
+ value: "#3f3f3f",
662
+ },
375
663
  },
376
664
  },
377
665
  },
378
- connector: {
379
- width: 8,
380
- margin: { top: 0, bottom: 0 },
381
- color: { light: { type: "hex", value: "#d3d3d3" } },
382
- },
383
666
  },
384
667
  {
668
+ id: "item-3",
669
+ name: "item-3",
670
+ type: "timeline_item",
385
671
  title: {
386
672
  text_lid: "zxc123",
387
673
  color: defaultColor,
388
674
  horizontal_alignment: "center",
675
+ font_size: 18,
676
+ font_weight: "bold",
677
+ font_weight_int: 700,
678
+ type: "text",
679
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
680
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
681
+ size: { width: { type: "fit" }, height: { type: "fit" } },
682
+ id: "title-3",
683
+ name: "title-3",
389
684
  },
390
685
  description: {
391
686
  text_lid: "zxc123d",
392
687
  color: defaultColor,
393
688
  horizontal_alignment: "center",
689
+ font_size: 18,
690
+ font_weight: "regular",
691
+ font_weight_int: 400,
692
+ type: "text",
693
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
694
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
695
+ size: { width: { type: "fit" }, height: { type: "fit" } },
696
+ id: "description-3",
697
+ name: "description-3",
394
698
  },
395
699
  icon: {
396
700
  name: "check",
@@ -400,36 +704,37 @@
400
704
  value: "#FAFAFA",
401
705
  },
402
706
  },
403
- width_and_height: 32,
404
- padding: 16,
405
- },
406
- icon_background: {
407
- shape: { type: "circle" },
408
- color: {
409
- light: {
410
- type: "hex",
411
- value: "#3f3f3f",
412
- },
413
- },
414
- },
415
- connector: {
416
- width: 8,
417
- margin: { top: 0, bottom: 0 },
418
- color: {
419
- light: {
420
- degrees: 180,
421
- points: [
422
- {
423
- color: "#d3d3d3",
424
- percent: 0,
425
- },
426
-
427
- {
428
- color: "#d3d3d300",
429
- percent: 100,
430
- },
431
- ],
432
- type: "linear",
707
+ size: {
708
+ width: { type: "fixed", value: 32 },
709
+ height: { type: "fixed", value: 32 },
710
+ },
711
+ type: "icon",
712
+ padding: { top: 4, trailing: 4, bottom: 4, leading: 4 },
713
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
714
+ id: "icon-3",
715
+ icon_name: "check",
716
+ base_url: "https://icons.pawwalls.com/icons",
717
+ formats: {
718
+ heic: "check.heic",
719
+ png: "check.png",
720
+ svg: "check.svg",
721
+ webp: "check.webp",
722
+ },
723
+ icon_background: {
724
+ shape: {
725
+ type: "rectangle",
726
+ corners: {
727
+ top_leading: 8,
728
+ top_trailing: 8,
729
+ bottom_leading: 8,
730
+ bottom_trailing: 8,
731
+ },
732
+ },
733
+ color: {
734
+ light: {
735
+ type: "hex",
736
+ value: "#3f3f3f",
737
+ },
433
738
  },
434
739
  },
435
740
  },
@@ -439,11 +744,12 @@
439
744
  />
440
745
 
441
746
  <Story
442
- name="Connector possibilities"
747
+ name="Square cornered icon with connectors"
443
748
  args={{
444
749
  type: "timeline",
445
- item_spacing: 64,
446
- text_spacing: 8,
750
+ item_spacing: 16,
751
+ text_spacing: 4,
752
+ column_gutter: 16,
447
753
  size: { width: { type: "fill" }, height: { type: "fit" } },
448
754
  margin: { top: 8, trailing: 8, bottom: 8, leading: 8 },
449
755
  padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
@@ -451,15 +757,36 @@
451
757
  name: "default timeline",
452
758
  items: [
453
759
  {
760
+ id: "item-1",
761
+ name: "item-1",
762
+ type: "timeline_item",
454
763
  title: {
455
- text_lid: "case1",
764
+ text_lid: "asd123",
456
765
  color: defaultColor,
457
766
  horizontal_alignment: "center",
767
+ font_size: 18,
768
+ font_weight: "bold",
769
+ font_weight_int: 700,
770
+ type: "text",
771
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
772
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
773
+ size: { width: { type: "fit" }, height: { type: "fit" } },
774
+ id: "title-1",
775
+ name: "title-1",
458
776
  },
459
777
  description: {
460
- text_lid: "case1d",
778
+ text_lid: "asd123d",
461
779
  color: defaultColor,
462
780
  horizontal_alignment: "center",
781
+ font_size: 18,
782
+ font_weight: "regular",
783
+ font_weight_int: 400,
784
+ type: "text",
785
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
786
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
787
+ size: { width: { type: "fit" }, height: { type: "fit" } },
788
+ id: "description-1",
789
+ name: "description-1",
463
790
  },
464
791
  icon: {
465
792
  name: "check",
@@ -469,71 +796,82 @@
469
796
  value: "#FAFAFA",
470
797
  },
471
798
  },
472
- width_and_height: 32,
473
- padding: 12,
474
- },
475
- icon_background: {
476
- shape: { type: "circle" },
477
- color: {
478
- light: {
479
- type: "hex",
480
- value: "#3f3f3f",
799
+ size: {
800
+ width: { type: "fixed", value: 32 },
801
+ height: { type: "fixed", value: 32 },
802
+ },
803
+ type: "icon",
804
+ padding: { top: 4, trailing: 4, bottom: 4, leading: 4 },
805
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
806
+ id: "icon-1",
807
+ icon_name: "check",
808
+ base_url: "https://icons.pawwalls.com/icons",
809
+ formats: {
810
+ heic: "check.heic",
811
+ png: "check.png",
812
+ svg: "check.svg",
813
+ webp: "check.webp",
814
+ },
815
+ icon_background: {
816
+ shape: {
817
+ type: "rectangle",
818
+ corners: {
819
+ top_leading: 8,
820
+ top_trailing: 8,
821
+ bottom_leading: 8,
822
+ bottom_trailing: 8,
823
+ },
824
+ },
825
+ color: {
826
+ light: {
827
+ type: "hex",
828
+ value: "#3f3f3f",
829
+ },
481
830
  },
482
831
  },
483
832
  },
484
833
  connector: {
485
- width: 8,
486
- margin: { top: 0, bottom: 0 },
487
- color: { light: { type: "hex", value: "#d3d3d3" } },
488
- },
489
- },
490
- {
491
- title: {
492
- text_lid: "case2",
493
- color: defaultColor,
494
- horizontal_alignment: "center",
495
- },
496
- description: {
497
- text_lid: "case2d",
498
- color: defaultColor,
499
- horizontal_alignment: "center",
500
- },
501
- icon: {
502
- name: "check",
834
+ width: 4,
503
835
  color: {
504
- light: {
505
- type: "hex",
506
- value: "#FAFAFA",
507
- },
836
+ light: { type: "hex", value: "#8fb43fff" },
508
837
  },
509
- width_and_height: 32,
510
- padding: 12,
511
- },
512
- icon_background: {
513
- shape: { type: "circle" },
514
- color: {
515
- light: {
516
- type: "hex",
517
- value: "#3f3f3f",
518
- },
838
+ margin: {
839
+ top: 0,
840
+ bottom: 0,
519
841
  },
520
842
  },
521
- connector: {
522
- width: 8,
523
- margin: { top: 12, bottom: 12 },
524
- color: { light: { type: "hex", value: "#d3d3d3" } },
525
- },
526
843
  },
527
844
  {
845
+ id: "item-2",
846
+ name: "item-2",
847
+ type: "timeline_item",
528
848
  title: {
529
- text_lid: "case3",
849
+ text_lid: "qwe123",
530
850
  color: defaultColor,
531
851
  horizontal_alignment: "center",
852
+ font_size: 18,
853
+ font_weight: "bold",
854
+ font_weight_int: 700,
855
+ type: "text",
856
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
857
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
858
+ size: { width: { type: "fit" }, height: { type: "fit" } },
859
+ id: "title-2",
860
+ name: "title-2",
532
861
  },
533
862
  description: {
534
- text_lid: "case3d",
863
+ text_lid: "qwe123d",
535
864
  color: defaultColor,
536
865
  horizontal_alignment: "center",
866
+ font_size: 18,
867
+ font_weight: "regular",
868
+ font_weight_int: 400,
869
+ type: "text",
870
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
871
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
872
+ size: { width: { type: "fit" }, height: { type: "fit" } },
873
+ id: "description-2",
874
+ name: "description-2",
537
875
  },
538
876
  icon: {
539
877
  name: "check",
@@ -543,34 +881,82 @@
543
881
  value: "#FAFAFA",
544
882
  },
545
883
  },
546
- width_and_height: 32,
547
- padding: 12,
548
- },
549
- icon_background: {
550
- shape: { type: "circle" },
551
- color: {
552
- light: {
553
- type: "hex",
554
- value: "#3f3f3f",
884
+ size: {
885
+ width: { type: "fixed", value: 32 },
886
+ height: { type: "fixed", value: 32 },
887
+ },
888
+ type: "icon",
889
+ padding: { top: 4, trailing: 4, bottom: 4, leading: 4 },
890
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
891
+ id: "icon-2",
892
+ icon_name: "check",
893
+ base_url: "https://icons.pawwalls.com/icons",
894
+ formats: {
895
+ heic: "check.heic",
896
+ png: "check.png",
897
+ svg: "check.svg",
898
+ webp: "check.webp",
899
+ },
900
+ icon_background: {
901
+ shape: {
902
+ type: "rectangle",
903
+ corners: {
904
+ top_leading: 8,
905
+ top_trailing: 8,
906
+ bottom_leading: 8,
907
+ bottom_trailing: 8,
908
+ },
909
+ },
910
+ color: {
911
+ light: {
912
+ type: "hex",
913
+ value: "#3f3f3f",
914
+ },
555
915
  },
556
916
  },
557
917
  },
558
918
  connector: {
559
- width: 8,
560
- margin: { top: 0, bottom: 12 },
561
- color: { light: { type: "hex", value: "#d3d3d3" } },
919
+ width: 4,
920
+ color: {
921
+ light: { type: "hex", value: "#8fb43fff" },
922
+ },
923
+ margin: {
924
+ top: 0,
925
+ bottom: 0,
926
+ },
562
927
  },
563
928
  },
564
929
  {
930
+ id: "item-3",
931
+ name: "item-3",
932
+ type: "timeline_item",
565
933
  title: {
566
- text_lid: "case4",
934
+ text_lid: "zxc123",
567
935
  color: defaultColor,
568
936
  horizontal_alignment: "center",
937
+ font_size: 18,
938
+ font_weight: "bold",
939
+ font_weight_int: 700,
940
+ type: "text",
941
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
942
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
943
+ size: { width: { type: "fit" }, height: { type: "fit" } },
944
+ id: "title-3",
945
+ name: "title-3",
569
946
  },
570
947
  description: {
571
- text_lid: "case4d",
948
+ text_lid: "zxc123d",
572
949
  color: defaultColor,
573
950
  horizontal_alignment: "center",
951
+ font_size: 18,
952
+ font_weight: "regular",
953
+ font_weight_int: 400,
954
+ type: "text",
955
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
956
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
957
+ size: { width: { type: "fit" }, height: { type: "fit" } },
958
+ id: "description-3",
959
+ name: "description-3",
574
960
  },
575
961
  icon: {
576
962
  name: "check",
@@ -580,53 +966,51 @@
580
966
  value: "#FAFAFA",
581
967
  },
582
968
  },
583
- width_and_height: 32,
584
- padding: 12,
585
- },
586
- icon_background: {
587
- shape: { type: "circle" },
588
- color: {
589
- light: {
590
- type: "hex",
591
- value: "#3f3f3f",
969
+ size: {
970
+ width: { type: "fixed", value: 32 },
971
+ height: { type: "fixed", value: 32 },
972
+ },
973
+ type: "icon",
974
+ padding: { top: 4, trailing: 4, bottom: 4, leading: 4 },
975
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
976
+ id: "icon-3",
977
+ icon_name: "check",
978
+ base_url: "https://icons.pawwalls.com/icons",
979
+ formats: {
980
+ heic: "check.heic",
981
+ png: "check.png",
982
+ svg: "check.svg",
983
+ webp: "check.webp",
984
+ },
985
+ icon_background: {
986
+ shape: {
987
+ type: "rectangle",
988
+ corners: {
989
+ top_leading: 8,
990
+ top_trailing: 8,
991
+ bottom_leading: 8,
992
+ bottom_trailing: 8,
993
+ },
994
+ },
995
+ color: {
996
+ light: {
997
+ type: "hex",
998
+ value: "#3f3f3f",
999
+ },
592
1000
  },
593
1001
  },
594
1002
  },
595
1003
  connector: {
596
- width: 8,
597
- margin: { top: 12, bottom: 0 },
598
- color: { light: { type: "hex", value: "#d3d3d3" } },
599
- },
600
- },
601
- {
602
- title: {
603
- text_lid: "case5",
604
- color: defaultColor,
605
- horizontal_alignment: "center",
606
- },
607
- description: {
608
- text_lid: "case5d",
609
- color: defaultColor,
610
- horizontal_alignment: "center",
611
- },
612
- icon: {
613
- name: "check",
1004
+ width: 4,
614
1005
  color: {
615
1006
  light: {
616
1007
  type: "hex",
617
- value: "#FAFAFA",
1008
+ value: "linear-gradient(to bottom, #8fb43fff, #00000000)",
618
1009
  },
619
1010
  },
620
- width_and_height: 32,
621
- padding: 12,
622
- },
623
- icon_background: {
624
- shape: { type: "circle" },
625
- color: {
626
- light: {
627
- type: "hex",
628
- value: "#3f3f3f",
629
- },
1011
+ margin: {
1012
+ top: 0,
1013
+ bottom: 0,
630
1014
  },
631
1015
  },
632
1016
  },