@coyalabs/bts-style 1.1.16 → 1.1.17

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.
@@ -1,68 +1,73 @@
1
1
  <script>
2
- import BaseContainer from '../Base/BaseContainer.svelte';
3
- import BaseText from '../Base/BaseText.svelte';
4
- import BaseIcon from '../Base/BaseIcon.svelte';
5
- import { icons } from '../icons';
6
-
7
- /**
8
- * @type {'full' | 'primary' | 'secondary' | 'special-filled' }
9
- */
10
- export let theme = 'full';
11
-
12
- /**
13
- * @type {string | null}
14
- */
15
- export let icon = null;
16
-
17
- /**
18
- * @type {string | null}
19
- */
20
- export let actionIcon = icons.arrow;
21
-
22
- /**
23
- * @type {number}
24
- */
25
- export let iconRotation = 0;
26
-
27
- /**
28
- * @type {number}
29
- */
30
- export let actionIconRotation = 0;
31
-
32
- /**
33
- * @type {string}
34
- */
35
- export let iconSize = '18px';
36
-
37
- /**
38
- * @type {boolean}
39
- */
40
- export let iconToned = true;
41
-
42
- /**
43
- * @type {string}
44
- */
45
- export let actionIconSize = '18px';
46
-
47
- /**
48
- * @type {string}
49
- */
50
- export let borderRadiusTopLeft = '25px';
51
-
52
- /**
53
- * @type {string}
54
- */
55
- export let borderRadiusTopRight = '25px';
56
-
57
- /**
58
- * @type {string}
59
- */
60
- export let borderRadiusBottomLeft = '25px';
61
-
62
- /**
63
- * @type {string}
64
- */
65
- export let borderRadiusBottomRight = '25px';
2
+ import BaseContainer from '../Base/BaseContainer.svelte';
3
+ import BaseText from '../Base/BaseText.svelte';
4
+ import BaseIcon from '../Base/BaseIcon.svelte';
5
+ import { icons } from '../icons';
6
+
7
+ /**
8
+ * @type {'full' | 'primary' | 'secondary' | 'special-filled' }
9
+ */
10
+ export let theme = 'full';
11
+
12
+ /**
13
+ * @type {string | null}
14
+ */
15
+ export let icon = null;
16
+
17
+ /**
18
+ * @type {boolean}
19
+ */
20
+ export let slot = true;
21
+
22
+ /**
23
+ * @type {string | null}
24
+ */
25
+ export let actionIcon = icons.arrow;
26
+
27
+ /**
28
+ * @type {number}
29
+ */
30
+ export let iconRotation = 0;
31
+
32
+ /**
33
+ * @type {number}
34
+ */
35
+ export let actionIconRotation = 0;
36
+
37
+ /**
38
+ * @type {string}
39
+ */
40
+ export let iconSize = '18px';
41
+
42
+ /**
43
+ * @type {boolean}
44
+ */
45
+ export let iconToned = true;
46
+
47
+ /**
48
+ * @type {string}
49
+ */
50
+ export let actionIconSize = '18px';
51
+
52
+ /**
53
+ * @type {string}
54
+ */
55
+ export let borderRadiusTopLeft = '25px';
56
+
57
+ /**
58
+ * @type {string}
59
+ */
60
+ export let borderRadiusTopRight = '25px';
61
+
62
+ /**
63
+ * @type {string}
64
+ */
65
+ export let borderRadiusBottomLeft = '25px';
66
+
67
+ /**
68
+ * @type {string}
69
+ */
70
+ export let borderRadiusBottomRight = '25px';
66
71
  </script>
67
72
 
68
73
  <button class="button-wrapper" on:click>
@@ -74,9 +79,11 @@
74
79
  <BaseIcon variant={iconToned ? "toned" : "default"} svg={icon} size={iconSize} />
75
80
  </div>
76
81
  {/if}
77
- <BaseText variant="button">
78
- <slot />
79
- </BaseText>
82
+ {#if slot}
83
+ <BaseText variant="button">
84
+ <slot />
85
+ </BaseText>
86
+ {/if}
80
87
  </div>
81
88
  {#if actionIcon}
82
89
  <div class="icon-wrapper" style="transform: rotate({actionIconRotation}deg)">
@@ -5,6 +5,7 @@ type Button = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
5
5
  borderRadiusTopRight?: string | undefined;
6
6
  borderRadiusBottomLeft?: string | undefined;
7
7
  borderRadiusBottomRight?: string | undefined;
8
+ slot?: boolean | undefined;
8
9
  icon?: string | null | undefined;
9
10
  actionIcon?: string | null | undefined;
10
11
  iconRotation?: number | undefined;
@@ -29,6 +30,7 @@ declare const Button: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWit
29
30
  borderRadiusTopRight?: string | undefined;
30
31
  borderRadiusBottomLeft?: string | undefined;
31
32
  borderRadiusBottomRight?: string | undefined;
33
+ slot?: boolean | undefined;
32
34
  icon?: string | null | undefined;
33
35
  actionIcon?: string | null | undefined;
34
36
  iconRotation?: number | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coyalabs/bts-style",
3
- "version": "1.1.16",
3
+ "version": "1.1.17",
4
4
  "description": "BTS Theme Svelte component templates",
5
5
  "type": "module",
6
6
  "exports": {