@coyalabs/bts-style 1.0.9 → 1.1.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.
- package/dist/Base/BaseContainer.svelte +10 -1
- package/dist/Base/BaseContainer.svelte.d.ts +2 -2
- package/dist/Base/BasePage.svelte +23 -1
- package/dist/Base/BasePage.svelte.d.ts +6 -0
- package/dist/Components/Button.svelte +32 -8
- package/dist/Components/Button.svelte.d.ts +4 -2
- package/dist/Components/Dropdown.svelte +191 -0
- package/dist/Components/Dropdown.svelte.d.ts +54 -0
- package/dist/Components/Separator.svelte +2 -0
- package/dist/Components/Special/SpecialAction.svelte +46 -0
- package/dist/Components/Special/SpecialAction.svelte.d.ts +32 -0
- package/dist/Components/Special/SpecialParagraph.svelte +159 -0
- package/dist/Components/Special/SpecialParagraph.svelte.d.ts +52 -0
- package/dist/Components/Tooltip.svelte +1 -1
- package/dist/Structure/BG/AssetGear.d.ts +2 -0
- package/dist/Structure/BG/AssetGear.js +2 -0
- package/dist/Structure/BG/BGChain.svelte +188 -0
- package/dist/Structure/BG/BGChain.svelte.d.ts +36 -0
- package/dist/Structure/BG/BGDetails.svelte +130 -0
- package/dist/Structure/BG/BGDetails.svelte.d.ts +36 -0
- package/dist/Structure/BG/BGGears.svelte +188 -0
- package/dist/Structure/BG/BGGears.svelte.d.ts +38 -0
- package/dist/icons.d.ts +1 -0
- package/dist/icons.js +2 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +8 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
/**
|
|
3
|
-
* @type {'full' | 'primary' | 'secondary' | 'filled'}
|
|
3
|
+
* @type {'full' | 'primary' | 'secondary' | 'filled' | 'special-filled'}
|
|
4
4
|
*/
|
|
5
5
|
export let theme = 'full';
|
|
6
6
|
|
|
@@ -73,4 +73,13 @@
|
|
|
73
73
|
0px 0px 13px 0px #ffffff1a,
|
|
74
74
|
inset 0px 0px 9px 2px #ffffff0a;
|
|
75
75
|
}
|
|
76
|
+
|
|
77
|
+
/* Theme D - Filled */
|
|
78
|
+
.glow-base-container[data-theme='special-filled'] {
|
|
79
|
+
background: linear-gradient(-78deg, #382D40 0%, #3A2B45 100%);
|
|
80
|
+
box-shadow:
|
|
81
|
+
0px 0px 13px 16px #A461CA08,
|
|
82
|
+
inset 0px 0px 9px 2px #AA91D845,
|
|
83
|
+
inset 2px 3px 9px 0px #BE81E225;
|
|
84
|
+
}
|
|
76
85
|
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default BaseContainer;
|
|
2
2
|
type BaseContainer = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
|
|
3
|
-
theme?: "full" | "primary" | "secondary" | "filled" | undefined;
|
|
3
|
+
theme?: "full" | "primary" | "secondary" | "filled" | "special-filled" | undefined;
|
|
4
4
|
borderRadiusTopLeft?: string | undefined;
|
|
5
5
|
borderRadiusTopRight?: string | undefined;
|
|
6
6
|
borderRadiusBottomLeft?: string | undefined;
|
|
@@ -16,7 +16,7 @@ type BaseContainer = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
|
|
|
16
16
|
$$bindings?: string | undefined;
|
|
17
17
|
};
|
|
18
18
|
declare const BaseContainer: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
19
|
-
theme?: "full" | "primary" | "secondary" | "filled" | undefined;
|
|
19
|
+
theme?: "full" | "primary" | "secondary" | "filled" | "special-filled" | undefined;
|
|
20
20
|
borderRadiusTopLeft?: string | undefined;
|
|
21
21
|
borderRadiusTopRight?: string | undefined;
|
|
22
22
|
borderRadiusBottomLeft?: string | undefined;
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { onMount } from 'svelte';
|
|
3
|
+
import BGDetails from '../Structure/BG/BGDetails.svelte';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @type {string | null}
|
|
6
7
|
*/
|
|
7
8
|
export let favicon = null;
|
|
8
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @type {boolean}
|
|
12
|
+
*/
|
|
13
|
+
export let showBGDetails = true;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @type {string}
|
|
17
|
+
*/
|
|
18
|
+
export let chainColor = "#130F15";
|
|
19
|
+
|
|
9
20
|
onMount(() => {
|
|
10
21
|
// Set favicon if not already set
|
|
11
22
|
let link = document.querySelector("link[rel*='icon']") as HTMLLinkElement | null;
|
|
@@ -24,11 +35,17 @@
|
|
|
24
35
|
</script>
|
|
25
36
|
|
|
26
37
|
<div class="base-page">
|
|
27
|
-
|
|
38
|
+
{#if showBGDetails}
|
|
39
|
+
<BGDetails {chainColor} />
|
|
40
|
+
{/if}
|
|
41
|
+
<div class="page-content">
|
|
42
|
+
<slot />
|
|
43
|
+
</div>
|
|
28
44
|
</div>
|
|
29
45
|
|
|
30
46
|
<style>
|
|
31
47
|
.base-page {
|
|
48
|
+
position: relative;
|
|
32
49
|
min-height: 100vh;
|
|
33
50
|
background-color: #0B070D;
|
|
34
51
|
margin: 0;
|
|
@@ -48,4 +65,9 @@
|
|
|
48
65
|
.base-page > :global(*) {
|
|
49
66
|
margin-top: 0;
|
|
50
67
|
}
|
|
68
|
+
|
|
69
|
+
.page-content {
|
|
70
|
+
position: relative;
|
|
71
|
+
z-index: 1;
|
|
72
|
+
}
|
|
51
73
|
</style>
|
|
@@ -20,6 +20,12 @@ declare const BasePage: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsW
|
|
|
20
20
|
/**
|
|
21
21
|
* @type {string | null}
|
|
22
22
|
*/ favicon?: any;
|
|
23
|
+
/**
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
*/ showBGDetails?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* @type {string}
|
|
28
|
+
*/ chainColor?: string;
|
|
23
29
|
}, {
|
|
24
30
|
default: {};
|
|
25
31
|
}>, {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import BaseContainer from '../Base/BaseContainer.svelte';
|
|
3
3
|
import BaseText from '../Base/BaseText.svelte';
|
|
4
4
|
import BaseIcon from '../Base/BaseIcon.svelte';
|
|
5
|
-
|
|
5
|
+
import { icons } from '../icons';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* @type {'full' | 'primary' | 'secondary'}
|
|
8
|
+
* @type {'full' | 'primary' | 'secondary' | 'special-filled' }
|
|
9
9
|
*/
|
|
10
10
|
export let theme = 'full';
|
|
11
11
|
|
|
@@ -34,6 +34,11 @@
|
|
|
34
34
|
*/
|
|
35
35
|
export let iconSize = '18px';
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
*/
|
|
40
|
+
export let iconToned = true;
|
|
41
|
+
|
|
37
42
|
/**
|
|
38
43
|
* @type {string}
|
|
39
44
|
*/
|
|
@@ -66,7 +71,7 @@
|
|
|
66
71
|
<div class="icon-text">
|
|
67
72
|
{#if icon}
|
|
68
73
|
<div class="icon-wrapper" style="transform: rotate({iconRotation}deg)">
|
|
69
|
-
<BaseIcon variant="toned" svg={icon} size={iconSize} />
|
|
74
|
+
<BaseIcon variant={iconToned ? "toned" : "default"} svg={icon} size={iconSize} />
|
|
70
75
|
</div>
|
|
71
76
|
{/if}
|
|
72
77
|
<BaseText variant="button">
|
|
@@ -88,6 +93,7 @@
|
|
|
88
93
|
cursor: pointer;
|
|
89
94
|
display: block;
|
|
90
95
|
width: 100%;
|
|
96
|
+
user-select: none;
|
|
91
97
|
}
|
|
92
98
|
|
|
93
99
|
.button-content {
|
|
@@ -107,21 +113,39 @@
|
|
|
107
113
|
transition: transform 0.2s ease;
|
|
108
114
|
}
|
|
109
115
|
|
|
110
|
-
.button-wrapper :global(.glow-base-container) {
|
|
116
|
+
.button-wrapper > :global(.glow-base-container) {
|
|
111
117
|
transition: all 0.2s ease;
|
|
112
118
|
}
|
|
113
119
|
|
|
114
|
-
/* Hover state -
|
|
115
|
-
.button-wrapper:hover :global(.glow-base-container) {
|
|
120
|
+
/* Hover state - default for most themes */
|
|
121
|
+
.button-wrapper:hover > :global(.glow-base-container:not([data-theme='special-filled'])) {
|
|
116
122
|
background: rgba(150, 132, 141, 0.37) !important;
|
|
117
123
|
box-shadow:
|
|
118
124
|
0px 0px 13px 0px rgba(255, 255, 255, 0.07),
|
|
119
125
|
inset 0px 0px 6px 4px rgba(150, 132, 141, 0.37) !important;
|
|
120
126
|
}
|
|
121
127
|
|
|
122
|
-
/* Pressed/Active state -
|
|
123
|
-
.button-wrapper:active :global(.glow-base-container) {
|
|
128
|
+
/* Pressed/Active state - default for most themes */
|
|
129
|
+
.button-wrapper:active > :global(.glow-base-container:not([data-theme='special-filled'])) {
|
|
124
130
|
background: rgba(150, 132, 140, 0.25) !important;
|
|
125
131
|
box-shadow: 0px 0px 13px 0px rgba(255, 255, 255, 0.07) !important;
|
|
126
132
|
}
|
|
133
|
+
|
|
134
|
+
/* Special-filled theme hover */
|
|
135
|
+
.button-wrapper:hover > :global(.glow-base-container[data-theme='special-filled']) {
|
|
136
|
+
background: linear-gradient(78deg, #4A3B55 0%, #4C385A 100%) !important;
|
|
137
|
+
box-shadow:
|
|
138
|
+
0px 0px 16px 18px #A461CA15,
|
|
139
|
+
inset 0px 0px 12px 3px #AA91D860,
|
|
140
|
+
inset -2px -3px 12px 0px #BE81E240 !important;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Special-filled theme pressed */
|
|
144
|
+
.button-wrapper:active > :global(.glow-base-container[data-theme='special-filled']) {
|
|
145
|
+
background: linear-gradient(-78deg, #2E2438 0%, #301F3D 100%) !important;
|
|
146
|
+
box-shadow:
|
|
147
|
+
0px 0px 13px 16px #A461CA05,
|
|
148
|
+
inset 0px 0px 6px 2px #AA91D830,
|
|
149
|
+
inset 2px 3px 6px 0px #BE81E215 !important;
|
|
150
|
+
}
|
|
127
151
|
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default Button;
|
|
2
2
|
type Button = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
|
|
3
|
-
theme?: "full" | "primary" | "secondary" | undefined;
|
|
3
|
+
theme?: "full" | "primary" | "secondary" | "special-filled" | undefined;
|
|
4
4
|
borderRadiusTopLeft?: string | undefined;
|
|
5
5
|
borderRadiusTopRight?: string | undefined;
|
|
6
6
|
borderRadiusBottomLeft?: string | undefined;
|
|
@@ -10,6 +10,7 @@ type Button = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
|
|
|
10
10
|
iconRotation?: number | undefined;
|
|
11
11
|
actionIconRotation?: number | undefined;
|
|
12
12
|
iconSize?: string | undefined;
|
|
13
|
+
iconToned?: boolean | undefined;
|
|
13
14
|
actionIconSize?: string | undefined;
|
|
14
15
|
}, {
|
|
15
16
|
default: {};
|
|
@@ -23,7 +24,7 @@ type Button = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
|
|
|
23
24
|
$$bindings?: string | undefined;
|
|
24
25
|
};
|
|
25
26
|
declare const Button: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
26
|
-
theme?: "full" | "primary" | "secondary" | undefined;
|
|
27
|
+
theme?: "full" | "primary" | "secondary" | "special-filled" | undefined;
|
|
27
28
|
borderRadiusTopLeft?: string | undefined;
|
|
28
29
|
borderRadiusTopRight?: string | undefined;
|
|
29
30
|
borderRadiusBottomLeft?: string | undefined;
|
|
@@ -33,6 +34,7 @@ declare const Button: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWit
|
|
|
33
34
|
iconRotation?: number | undefined;
|
|
34
35
|
actionIconRotation?: number | undefined;
|
|
35
36
|
iconSize?: string | undefined;
|
|
37
|
+
iconToned?: boolean | undefined;
|
|
36
38
|
actionIconSize?: string | undefined;
|
|
37
39
|
}, {
|
|
38
40
|
default: {};
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import Button from './Button.svelte';
|
|
3
|
+
import BaseContainer from '../Base/BaseContainer.svelte';
|
|
4
|
+
import { icons } from '../icons';
|
|
5
|
+
import { slide } from 'svelte/transition';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @type {string}
|
|
9
|
+
*/
|
|
10
|
+
export let label = '';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @type {string | null}
|
|
14
|
+
*/
|
|
15
|
+
export let icon = null;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @type {'full' | 'primary' | 'secondary'}
|
|
19
|
+
*/
|
|
20
|
+
export let theme = 'full';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @type {string}
|
|
24
|
+
*/
|
|
25
|
+
export let width = '200px';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @type {Array<{label: string, value: any, disabled?: boolean}>}
|
|
29
|
+
*/
|
|
30
|
+
export let options = [];
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @type {any}
|
|
34
|
+
*/
|
|
35
|
+
export let value = null;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @type {(value: any) => void}
|
|
39
|
+
*/
|
|
40
|
+
export let onChange = () => {};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @type {string}
|
|
44
|
+
*/
|
|
45
|
+
export let borderRadiusTopLeft = '25px';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @type {string}
|
|
49
|
+
*/
|
|
50
|
+
export let borderRadiusTopRight = '25px';
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @type {string}
|
|
54
|
+
*/
|
|
55
|
+
export let borderRadiusBottomLeft = '25px';
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @type {string}
|
|
59
|
+
*/
|
|
60
|
+
export let borderRadiusBottomRight = '25px';
|
|
61
|
+
|
|
62
|
+
let isOpen = false;
|
|
63
|
+
/**
|
|
64
|
+
* @type {HTMLDivElement}
|
|
65
|
+
*/
|
|
66
|
+
let dropdownRef;
|
|
67
|
+
|
|
68
|
+
function toggleDropdown() {
|
|
69
|
+
isOpen = !isOpen;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @param {any} optionValue
|
|
74
|
+
*/
|
|
75
|
+
function selectOption(optionValue) {
|
|
76
|
+
value = optionValue;
|
|
77
|
+
isOpen = false;
|
|
78
|
+
onChange(optionValue);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @param {MouseEvent} event
|
|
83
|
+
*/
|
|
84
|
+
function handleClickOutside(event) {
|
|
85
|
+
if (dropdownRef && event.target instanceof Node && !dropdownRef.contains(event.target)) {
|
|
86
|
+
isOpen = false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
$: selectedOption = options.find(opt => opt.value === value);
|
|
91
|
+
$: displayLabel = selectedOption ? selectedOption.label : label;
|
|
92
|
+
</script>
|
|
93
|
+
|
|
94
|
+
<svelte:window on:click={handleClickOutside} />
|
|
95
|
+
|
|
96
|
+
<div class="dropdown-container" bind:this={dropdownRef} style="width: {width};">
|
|
97
|
+
<Button
|
|
98
|
+
{theme}
|
|
99
|
+
{icon}
|
|
100
|
+
actionIcon={icons.icon_expand}
|
|
101
|
+
actionIconSize="12px"
|
|
102
|
+
actionIconRotation={isOpen ? 180 : 0}
|
|
103
|
+
{borderRadiusTopLeft}
|
|
104
|
+
{borderRadiusTopRight}
|
|
105
|
+
{borderRadiusBottomLeft}
|
|
106
|
+
{borderRadiusBottomRight}
|
|
107
|
+
on:click={toggleDropdown}
|
|
108
|
+
>
|
|
109
|
+
<span class="button-label">{displayLabel}</span>
|
|
110
|
+
</Button>
|
|
111
|
+
|
|
112
|
+
{#if isOpen}
|
|
113
|
+
<div class="dropdown-menu" transition:slide={{ duration: 150 }}>
|
|
114
|
+
<BaseContainer theme="filled" padding="0.5rem" borderRadiusTopLeft="15px" borderRadiusTopRight="15px" borderRadiusBottomLeft="15px" borderRadiusBottomRight="15px">
|
|
115
|
+
{#each options as option}
|
|
116
|
+
<button
|
|
117
|
+
class="dropdown-item"
|
|
118
|
+
class:selected={option.value === value}
|
|
119
|
+
class:disabled={option.disabled}
|
|
120
|
+
disabled={option.disabled}
|
|
121
|
+
on:click={() => selectOption(option.value)}
|
|
122
|
+
>
|
|
123
|
+
{option.label}
|
|
124
|
+
</button>
|
|
125
|
+
{/each}
|
|
126
|
+
</BaseContainer>
|
|
127
|
+
</div>
|
|
128
|
+
{/if}
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<style>
|
|
132
|
+
.dropdown-container {
|
|
133
|
+
position: relative;
|
|
134
|
+
display: inline-block;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.dropdown-container :global(button) {
|
|
138
|
+
width: 100%;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.button-label {
|
|
142
|
+
max-width: 100%;
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
text-overflow: ellipsis;
|
|
145
|
+
white-space: nowrap;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.dropdown-menu {
|
|
149
|
+
position: absolute;
|
|
150
|
+
top: calc(100% + 4px);
|
|
151
|
+
left: 0;
|
|
152
|
+
right: 0;
|
|
153
|
+
z-index: 1000;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.dropdown-item {
|
|
157
|
+
width: 100%;
|
|
158
|
+
padding: 0.75rem 1rem;
|
|
159
|
+
background: none;
|
|
160
|
+
border: none;
|
|
161
|
+
color: #E3D8D8;
|
|
162
|
+
font-family: 'Satoshi', sans-serif;
|
|
163
|
+
font-size: 0.95rem;
|
|
164
|
+
font-weight: 500;
|
|
165
|
+
text-align: left;
|
|
166
|
+
cursor: pointer;
|
|
167
|
+
transition: background-color 0.15s ease;
|
|
168
|
+
border-radius: 10px;
|
|
169
|
+
white-space: nowrap;
|
|
170
|
+
overflow: hidden;
|
|
171
|
+
text-overflow: ellipsis;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.dropdown-item:hover:not(.disabled) {
|
|
175
|
+
background-color: rgba(227, 216, 216, 0.1);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.dropdown-item.selected {
|
|
179
|
+
background-color: rgba(255, 239, 246, 0.15);
|
|
180
|
+
font-weight: 700;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.dropdown-item.disabled {
|
|
184
|
+
opacity: 0.4;
|
|
185
|
+
cursor: not-allowed;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.dropdown-item:not(:last-child) {
|
|
189
|
+
margin-bottom: 4px;
|
|
190
|
+
}
|
|
191
|
+
</style>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export default Dropdown;
|
|
2
|
+
type Dropdown = SvelteComponent<{
|
|
3
|
+
theme?: "full" | "primary" | "secondary" | undefined;
|
|
4
|
+
borderRadiusTopLeft?: string | undefined;
|
|
5
|
+
borderRadiusTopRight?: string | undefined;
|
|
6
|
+
borderRadiusBottomLeft?: string | undefined;
|
|
7
|
+
borderRadiusBottomRight?: string | undefined;
|
|
8
|
+
label?: string | undefined;
|
|
9
|
+
icon?: string | null | undefined;
|
|
10
|
+
width?: string | undefined;
|
|
11
|
+
value?: any;
|
|
12
|
+
options?: {
|
|
13
|
+
label: string;
|
|
14
|
+
value: any;
|
|
15
|
+
disabled?: boolean | undefined;
|
|
16
|
+
}[] | undefined;
|
|
17
|
+
onChange?: ((value: any) => void) | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
}, {}> & {
|
|
21
|
+
$$bindings?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
declare const Dropdown: $$__sveltets_2_IsomorphicComponent<{
|
|
24
|
+
theme?: "full" | "primary" | "secondary" | undefined;
|
|
25
|
+
borderRadiusTopLeft?: string | undefined;
|
|
26
|
+
borderRadiusTopRight?: string | undefined;
|
|
27
|
+
borderRadiusBottomLeft?: string | undefined;
|
|
28
|
+
borderRadiusBottomRight?: string | undefined;
|
|
29
|
+
label?: string | undefined;
|
|
30
|
+
icon?: string | null | undefined;
|
|
31
|
+
width?: string | undefined;
|
|
32
|
+
value?: any;
|
|
33
|
+
options?: {
|
|
34
|
+
label: string;
|
|
35
|
+
value: any;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
}[] | undefined;
|
|
38
|
+
onChange?: ((value: any) => void) | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
[evt: string]: CustomEvent<any>;
|
|
41
|
+
}, {}, {}, string>;
|
|
42
|
+
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> {
|
|
43
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
44
|
+
$$bindings?: Bindings;
|
|
45
|
+
} & Exports;
|
|
46
|
+
(internal: unknown, props: Props & {
|
|
47
|
+
$$events?: Events;
|
|
48
|
+
$$slots?: Slots;
|
|
49
|
+
}): Exports & {
|
|
50
|
+
$set?: any;
|
|
51
|
+
$on?: any;
|
|
52
|
+
};
|
|
53
|
+
z_$$bindings?: Bindings;
|
|
54
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import Button from '../Button.svelte';
|
|
3
|
+
import Tooltip from '../Tooltip.svelte';
|
|
4
|
+
import { icons } from '../../icons.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @type {string}
|
|
8
|
+
*/
|
|
9
|
+
export let label = '';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @type {string}
|
|
13
|
+
*/
|
|
14
|
+
export let tooltipText = '';
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div class="special-action-wrapper">
|
|
18
|
+
<Button theme="special-filled"
|
|
19
|
+
icon={icons.any_ai}
|
|
20
|
+
iconToned={false}
|
|
21
|
+
actionIcon={null}
|
|
22
|
+
on:click
|
|
23
|
+
>
|
|
24
|
+
{label}
|
|
25
|
+
</Button>
|
|
26
|
+
{#if tooltipText}
|
|
27
|
+
<div class="tooltip-container">
|
|
28
|
+
<Tooltip text={tooltipText} iconSize="14px" />
|
|
29
|
+
</div>
|
|
30
|
+
{/if}
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<style>
|
|
34
|
+
.special-action-wrapper {
|
|
35
|
+
position: relative;
|
|
36
|
+
display: block;
|
|
37
|
+
width: 100%;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.tooltip-container {
|
|
41
|
+
position: absolute;
|
|
42
|
+
right: 1rem;
|
|
43
|
+
top: 50%;
|
|
44
|
+
transform: translateY(-50%);
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default SpecialAction;
|
|
2
|
+
type SpecialAction = SvelteComponent<{
|
|
3
|
+
label?: string | undefined;
|
|
4
|
+
tooltipText?: string | undefined;
|
|
5
|
+
}, {
|
|
6
|
+
click: PointerEvent;
|
|
7
|
+
} & {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
}, {}> & {
|
|
10
|
+
$$bindings?: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
declare const SpecialAction: $$__sveltets_2_IsomorphicComponent<{
|
|
13
|
+
label?: string | undefined;
|
|
14
|
+
tooltipText?: string | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
click: PointerEvent;
|
|
17
|
+
} & {
|
|
18
|
+
[evt: string]: CustomEvent<any>;
|
|
19
|
+
}, {}, {}, string>;
|
|
20
|
+
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> {
|
|
21
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
22
|
+
$$bindings?: Bindings;
|
|
23
|
+
} & Exports;
|
|
24
|
+
(internal: unknown, props: Props & {
|
|
25
|
+
$$events?: Events;
|
|
26
|
+
$$slots?: Slots;
|
|
27
|
+
}): Exports & {
|
|
28
|
+
$set?: any;
|
|
29
|
+
$on?: any;
|
|
30
|
+
};
|
|
31
|
+
z_$$bindings?: Bindings;
|
|
32
|
+
}
|