@juspay/svelte-ui-components 1.17.0 → 1.19.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/Button/Button.svelte +1 -0
- package/dist/Modal/Modal.svelte +103 -0
- package/dist/Modal/Modal.svelte.d.ts +3 -0
- package/dist/Modal/properties.d.ts +5 -0
- package/dist/Modal/properties.js +1 -1
- package/dist/Select/Select.svelte +59 -24
- package/dist/Select/properties.d.ts +1 -0
- package/dist/Toggle/Toggle.svelte +22 -21
- package/dist/Toggle/Toggle.svelte.d.ts +2 -2
- package/package.json +1 -1
package/dist/Modal/Modal.svelte
CHANGED
|
@@ -3,6 +3,7 @@ import ModalAnimation from "../Animations/ModalAnimation.svelte";
|
|
|
3
3
|
import OverlayAnimation from "../Animations/OverlayAnimation.svelte";
|
|
4
4
|
import { defaultModalProperties } from "./properties";
|
|
5
5
|
import { createDebouncer } from "../utils";
|
|
6
|
+
import Button from "../Button/Button.svelte";
|
|
6
7
|
const dispatch = createEventDispatcher();
|
|
7
8
|
let overlayDiv;
|
|
8
9
|
let backPressed = false;
|
|
@@ -18,6 +19,12 @@ function handleRightImageClick() {
|
|
|
18
19
|
function handleLeftImageClick() {
|
|
19
20
|
dispatch("headerLeftImageClick");
|
|
20
21
|
}
|
|
22
|
+
function handlePrimaryButtonClick() {
|
|
23
|
+
dispatch("primaryButtonClick");
|
|
24
|
+
}
|
|
25
|
+
function handleSecondaryButtonClick() {
|
|
26
|
+
dispatch("secondaryButtonClick");
|
|
27
|
+
}
|
|
21
28
|
function handleOverlayClick(event) {
|
|
22
29
|
if (event.target && event.target === overlayDiv) {
|
|
23
30
|
debounce(() => {
|
|
@@ -93,6 +100,32 @@ onDestroy(() => {
|
|
|
93
100
|
<div class="slot-content">
|
|
94
101
|
<slot name="content" />
|
|
95
102
|
</div>
|
|
103
|
+
{#if $$slots.footer}
|
|
104
|
+
<div class="footer-content">
|
|
105
|
+
<slot name="footer" />
|
|
106
|
+
</div>
|
|
107
|
+
{:else if properties.footer?.primaryButton || properties.footer?.secondaryButton}
|
|
108
|
+
<div class="footer-content">
|
|
109
|
+
<div class="footer-action-buttons">
|
|
110
|
+
{#if properties.footer.secondaryButton}
|
|
111
|
+
<div class="footer-secondary-button">
|
|
112
|
+
<Button
|
|
113
|
+
properties={properties.footer.secondaryButton}
|
|
114
|
+
on:click={handleSecondaryButtonClick}
|
|
115
|
+
/>
|
|
116
|
+
</div>
|
|
117
|
+
{/if}
|
|
118
|
+
{#if properties.footer.primaryButton}
|
|
119
|
+
<div class="footer-primary-button">
|
|
120
|
+
<Button
|
|
121
|
+
properties={properties.footer.primaryButton}
|
|
122
|
+
on:click={handlePrimaryButtonClick}
|
|
123
|
+
/>
|
|
124
|
+
</div>
|
|
125
|
+
{/if}
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
{/if}
|
|
96
129
|
</div>
|
|
97
130
|
</ModalAnimation>
|
|
98
131
|
</div>
|
|
@@ -131,6 +164,7 @@ onDestroy(() => {
|
|
|
131
164
|
display: flex;
|
|
132
165
|
flex-direction: column;
|
|
133
166
|
border-radius: var(--modal-border-radius, 0px);
|
|
167
|
+
overflow: var(--modal-content-overflow, auto);
|
|
134
168
|
}
|
|
135
169
|
|
|
136
170
|
.slot-content {
|
|
@@ -181,6 +215,75 @@ onDestroy(() => {
|
|
|
181
215
|
background-color: var(--modal-header-background-color, #f6f7f9);
|
|
182
216
|
padding: var(--modal-header-padding, 18px 20px);
|
|
183
217
|
border-radius: var(--modal-header-border-radius, 0px);
|
|
218
|
+
border-bottom: var(--modal-header-border-bottom, none);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.footer-content {
|
|
222
|
+
display: flex;
|
|
223
|
+
background-color: var(--modal-footer-background-color, #f6f7f9);
|
|
224
|
+
padding: var(--modal-footer-padding, 18px 20px);
|
|
225
|
+
border-radius: var(--modal-footer-border-radius, 0px);
|
|
226
|
+
border-top: var(--modal-footer-border-top, none);
|
|
227
|
+
justify-content: var(--modal-footer-justify-content, none);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.footer-action-buttons {
|
|
231
|
+
display: flex;
|
|
232
|
+
gap: var(--modal-footer-gap, 0px);
|
|
233
|
+
width: var(--modal-footer-action-buttons-width, auto);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.footer-secondary-button {
|
|
237
|
+
--button-max-height: var(--modal-footer-secondary-button-max-height);
|
|
238
|
+
--button-max-width: var(--modal-footer-secondary-button-max-width);
|
|
239
|
+
--button-font-family: var(--modal-footer-secondary-button-font-family);
|
|
240
|
+
--button-font-weight: var(--modal-footer-secondary-button-font-weight, 500);
|
|
241
|
+
--button-font-size: var(--modal-footer-secondary-button-font-size, 14px);
|
|
242
|
+
--button-color: var(--modal-footer-secondary-button-color, #3a4550);
|
|
243
|
+
--button-text-color: var(--modal-footer-secondary-button-text-color, white);
|
|
244
|
+
--button-height: var(--modal-footer-secondary-button-height, fit-content);
|
|
245
|
+
--button-padding: var(--modal-footer-secondary-button-padding, 16px);
|
|
246
|
+
--button-margin: var(--modal-footer-secondary-button-margin);
|
|
247
|
+
--button-border-radius: var(--modal-footer-secondary-button-border-radius, 0px);
|
|
248
|
+
--button-width: var(--modal-footer-secondary-button-width, fit-content);
|
|
249
|
+
--cursor: var(--modal-footer-secondary-button-cursor, pointer);
|
|
250
|
+
--opacity: var(--modal-footer-secondary-button-opacity, 1);
|
|
251
|
+
--button-border: var(--modal-footer-secondary-button-border, none);
|
|
252
|
+
--button-justify-content: var(--modal-footer-secondary-button-justify-content, center);
|
|
253
|
+
--button-content-flex-direction: var(
|
|
254
|
+
--modal-footer-secondary-button-content-flex-direction,
|
|
255
|
+
row
|
|
256
|
+
);
|
|
257
|
+
--button-content-gap: var(--modal-footer-secondary-button-content-gap, 16px);
|
|
258
|
+
--button-visibility: var(--modal-footer-secondary-button-visibility, visible);
|
|
259
|
+
--button-box-shadow: var(--modal-footer-secondary-button-box-shadow, none);
|
|
260
|
+
order: var(--modal-secondary-button-order, none);
|
|
261
|
+
flex: var(--modal-footer-secondary-button-flex-value, none);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.footer-primary-button {
|
|
265
|
+
--button-max-height: var(--modal-footer-primary-button-max-height);
|
|
266
|
+
--button-max-width: var(--modal-footer-primary-button-max-width);
|
|
267
|
+
--button-font-family: var(--modal-footer-primary-button-font-family);
|
|
268
|
+
--button-font-weight: var(--modal-footer-primary-button-font-weight, 500);
|
|
269
|
+
--button-font-size: var(--modal-footer-primary-button-font-size, 14px);
|
|
270
|
+
--button-color: var(--modal-footer-primary-button-color, #3a4550);
|
|
271
|
+
--button-text-color: var(--modal-footer-primary-button-text-color, white);
|
|
272
|
+
--button-height: var(--modal-footer-primary-button-height, fit-content);
|
|
273
|
+
--button-padding: var(--modal-footer-primary-button-padding, 16px);
|
|
274
|
+
--button-margin: var(--modal-footer-primary-button-margin);
|
|
275
|
+
--button-border-radius: var(--modal-footer-primary-button-border-radius, 0px);
|
|
276
|
+
--button-width: var(--modal-footer-primary-button-width, fit-content);
|
|
277
|
+
--cursor: var(--modal-footer-primary-button-cursor, pointer);
|
|
278
|
+
--opacity: var(--modal-footer-primary-button-opacity, 1);
|
|
279
|
+
--button-border: var(--modal-footer-primary-button-border, none);
|
|
280
|
+
--button-justify-content: var(--modal-footer-primary-button-justify-content, center);
|
|
281
|
+
--button-content-flex-direction: var(--modal-footer-primary-button-content-flex-direction, row);
|
|
282
|
+
--button-content-gap: var(--modal-footer-primary-button-content-gap, 16px);
|
|
283
|
+
--button-visibility: var(--modal-footer-primary-button-visibility, visible);
|
|
284
|
+
--button-box-shadow: var(--modal-footer-primary-button-box-shadow, none);
|
|
285
|
+
order: var(--modal-primary-button-order, none);
|
|
286
|
+
flex: var(--modal-footer-primary-button-flex-value, none);
|
|
184
287
|
}
|
|
185
288
|
|
|
186
289
|
.header-text {
|
|
@@ -9,12 +9,15 @@ declare const __propDef: {
|
|
|
9
9
|
close: CustomEvent<any>;
|
|
10
10
|
headerRightImageClick: CustomEvent<any>;
|
|
11
11
|
headerLeftImageClick: CustomEvent<any>;
|
|
12
|
+
primaryButtonClick: CustomEvent<any>;
|
|
13
|
+
secondaryButtonClick: CustomEvent<any>;
|
|
12
14
|
overlayClick: CustomEvent<any>;
|
|
13
15
|
} & {
|
|
14
16
|
[evt: string]: CustomEvent<any>;
|
|
15
17
|
};
|
|
16
18
|
slots: {
|
|
17
19
|
content: {};
|
|
20
|
+
footer: {};
|
|
18
21
|
};
|
|
19
22
|
};
|
|
20
23
|
export type ModalProps = typeof __propDef.props;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ButtonProperties } from '../Button/properties';
|
|
1
2
|
import type { ModalTransition } from '../types';
|
|
2
3
|
export type ModalSize = 'large' | 'medium' | 'small' | 'fit-content';
|
|
3
4
|
export type ModalAlign = 'top' | 'center' | 'bottom';
|
|
@@ -13,6 +14,10 @@ export type ModalProperties = {
|
|
|
13
14
|
rightImage: string | null;
|
|
14
15
|
text: string | null;
|
|
15
16
|
};
|
|
17
|
+
footer?: {
|
|
18
|
+
primaryButton?: ButtonProperties;
|
|
19
|
+
secondaryButton?: ButtonProperties;
|
|
20
|
+
};
|
|
16
21
|
debounceTime: number;
|
|
17
22
|
};
|
|
18
23
|
export declare const defaultModalProperties: ModalProperties;
|
package/dist/Modal/properties.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script>import { createEventDispatcher, onDestroy, onMount } from "svelte";
|
|
2
2
|
import Img from "../Img/Img.svelte";
|
|
3
3
|
import Button from "../Button/Button.svelte";
|
|
4
|
+
import CheckListItem from "../CheckListItem/CheckListItem.svelte";
|
|
4
5
|
let selectedElementDiv = null;
|
|
5
6
|
export let dropDownIconAlt = "";
|
|
6
7
|
export let properties = {
|
|
@@ -12,7 +13,8 @@ export let properties = {
|
|
|
12
13
|
showSelectedItemInDropdown: false,
|
|
13
14
|
selectMultipleItems: false,
|
|
14
15
|
leftIcon: null,
|
|
15
|
-
showSelectedItem: true
|
|
16
|
+
showSelectedItem: true,
|
|
17
|
+
showSelectedItemCount: false
|
|
16
18
|
};
|
|
17
19
|
const dropDownIcon = properties.dropDownIcon ?? "https://sdk.breeze.in/gallery/icons/down-arrow.svg";
|
|
18
20
|
let applyButtonProps;
|
|
@@ -31,13 +33,6 @@ const selectAllButtonProps = {
|
|
|
31
33
|
loaderType: null,
|
|
32
34
|
type: "submit"
|
|
33
35
|
};
|
|
34
|
-
const clearAllButtonProps = {
|
|
35
|
-
text: "Clear All",
|
|
36
|
-
enable: true,
|
|
37
|
-
showLoader: false,
|
|
38
|
-
loaderType: null,
|
|
39
|
-
type: "submit"
|
|
40
|
-
};
|
|
41
36
|
let isSelectOpen = false;
|
|
42
37
|
const dispatch = createEventDispatcher();
|
|
43
38
|
$:
|
|
@@ -81,13 +76,14 @@ function toggleSelect() {
|
|
|
81
76
|
isSelectOpen = !isSelectOpen;
|
|
82
77
|
dispatch("dropdownClick");
|
|
83
78
|
}
|
|
84
|
-
function clearAllItems() {
|
|
85
|
-
properties.selectedItem = [];
|
|
86
|
-
properties.selectedItemLabel = [];
|
|
87
|
-
}
|
|
88
79
|
function selectAllItems() {
|
|
89
|
-
properties.selectedItem
|
|
90
|
-
|
|
80
|
+
if (properties.selectedItem.length === properties.allItems.length) {
|
|
81
|
+
properties.selectedItem = [];
|
|
82
|
+
properties.selectedItemLabel = [];
|
|
83
|
+
} else {
|
|
84
|
+
properties.selectedItem = [...properties.allItems];
|
|
85
|
+
properties.selectedItemLabel = [...properties.allItems];
|
|
86
|
+
}
|
|
91
87
|
}
|
|
92
88
|
function closeSelect(event) {
|
|
93
89
|
const clickedElement = event.target;
|
|
@@ -96,7 +92,8 @@ function closeSelect(event) {
|
|
|
96
92
|
const isApplyButtonClicked = clickedElement.classList.contains("apply-btn");
|
|
97
93
|
const isClearAllButtonClicked = clickedElement.innerText === "Clear All";
|
|
98
94
|
const isSelectAllButtonClicked = clickedElement.innerText === "Select All";
|
|
99
|
-
|
|
95
|
+
const isCheckListClicked = clickedElement.classList.contains("checkbox");
|
|
96
|
+
if (!isItemClicked && !isApplyButtonClicked && !isClearAllButtonClicked && !isSelectAllButtonClicked && !isCheckListClicked) {
|
|
100
97
|
isSelectOpen = false;
|
|
101
98
|
}
|
|
102
99
|
}
|
|
@@ -154,6 +151,11 @@ onDestroy(() => {
|
|
|
154
151
|
{/if}
|
|
155
152
|
</div>
|
|
156
153
|
<div class="filler" />
|
|
154
|
+
{#if properties.showSelectedItemCount && properties.selectMultipleItems && Array.isArray(properties.selectedItem)}
|
|
155
|
+
<div class="selected-item-count">
|
|
156
|
+
{properties.selectedItem.length}
|
|
157
|
+
</div>
|
|
158
|
+
{/if}
|
|
157
159
|
{#if !properties.hideDropDownIcon}
|
|
158
160
|
<img
|
|
159
161
|
src={dropDownIcon}
|
|
@@ -167,9 +169,14 @@ onDestroy(() => {
|
|
|
167
169
|
style="--non-selected-display:{isSelectOpen ? 'inline-block' : 'none'};"
|
|
168
170
|
>
|
|
169
171
|
{#if properties.selectMultipleItems && !properties.showSingleSelectButton}
|
|
170
|
-
<div class="
|
|
172
|
+
<div class="select-all-btn">
|
|
173
|
+
<CheckListItem
|
|
174
|
+
checked={Array.isArray(properties.selectedItem) &&
|
|
175
|
+
properties.selectedItem.length === properties.allItems.length}
|
|
176
|
+
text=""
|
|
177
|
+
on:click={selectAllItems}
|
|
178
|
+
/>
|
|
171
179
|
<Button properties={selectAllButtonProps} on:click={selectAllItems} />
|
|
172
|
-
<Button properties={clearAllButtonProps} on:click={clearAllItems} />
|
|
173
180
|
</div>
|
|
174
181
|
{/if}
|
|
175
182
|
<div class="item-list">
|
|
@@ -183,6 +190,9 @@ onDestroy(() => {
|
|
|
183
190
|
role="button"
|
|
184
191
|
tabindex="0"
|
|
185
192
|
>
|
|
193
|
+
{#if properties.selectMultipleItems}
|
|
194
|
+
<CheckListItem checked={isSelected(properties.selectedItem, item)} text="" />
|
|
195
|
+
{/if}
|
|
186
196
|
{item}
|
|
187
197
|
</div>
|
|
188
198
|
{/each}
|
|
@@ -221,6 +231,13 @@ onDestroy(() => {
|
|
|
221
231
|
--button-margin: var(--select-btn-margin, 1px);
|
|
222
232
|
--button-border-radius: var(--select-btn-border-radius, 2px);
|
|
223
233
|
--input-button-margin: var(--select-input-button-margin, 10px);
|
|
234
|
+
--check-list-item-margin: var(--select-check-list-item-margin, 0px);
|
|
235
|
+
--checkbox-margin: var(--select-checkbox-margin, 2px 8px 0px 0px);
|
|
236
|
+
--checkbox-height: var(--select-checkbox-height, 14px);
|
|
237
|
+
--checkbox-width: var(--select-checkbox-width, 14px);
|
|
238
|
+
--checkbox-accent-color: var(--select-checkbox-accent-color, #3a4550);
|
|
239
|
+
--check-list-item-checked-font-weight: var(--select-check-list-item-checked-font-weight, bold);
|
|
240
|
+
--check-list-item-width: var(--select-check-list-item-width, fit-content);
|
|
224
241
|
}
|
|
225
242
|
|
|
226
243
|
.select:hover {
|
|
@@ -243,6 +260,7 @@ onDestroy(() => {
|
|
|
243
260
|
border-radius: var(--item-border-radius);
|
|
244
261
|
cursor: pointer;
|
|
245
262
|
position: relative;
|
|
263
|
+
display: flex;
|
|
246
264
|
}
|
|
247
265
|
|
|
248
266
|
.filler {
|
|
@@ -323,14 +341,17 @@ onDestroy(() => {
|
|
|
323
341
|
display: var(--label-container-display, inline-block);
|
|
324
342
|
}
|
|
325
343
|
|
|
326
|
-
.
|
|
344
|
+
.select-all-btn {
|
|
327
345
|
display: flex;
|
|
328
|
-
width: var(--
|
|
329
|
-
white-space: var(--
|
|
330
|
-
padding: var(--
|
|
331
|
-
--button-
|
|
332
|
-
--button-
|
|
333
|
-
--button-
|
|
346
|
+
width: var(--select-all-btn-width, 99%);
|
|
347
|
+
white-space: var(--select-all-btn-white-space, nowrap);
|
|
348
|
+
padding: var(--select-all-btn-padding, 10px 16px);
|
|
349
|
+
--button-font-size: var(--select-all-btn-font-size, 14px);
|
|
350
|
+
--button-width: var(--select-all-btn-width, 100%);
|
|
351
|
+
--button-color: var(--select-all-btn-color, #ffffff);
|
|
352
|
+
--button-text-color: var(--select-all-btn-text-color, #333);
|
|
353
|
+
--button-padding: var(--select-all-btn-inner-padding, 0px);
|
|
354
|
+
--button-justify-content: var(--select-all-btn-justify-content, flex-start);
|
|
334
355
|
}
|
|
335
356
|
|
|
336
357
|
.apply-btn-container {
|
|
@@ -360,4 +381,18 @@ onDestroy(() => {
|
|
|
360
381
|
--image-height: var(--select-icon-height);
|
|
361
382
|
--image-width: var(--select-icon-height);
|
|
362
383
|
}
|
|
384
|
+
|
|
385
|
+
.selected-item-count {
|
|
386
|
+
margin: var(--selected-item-count-margin, 0px 6px);
|
|
387
|
+
height: var(--selected-item-count-height, 18px);
|
|
388
|
+
width: var(--selected-item-count-width, 18px);
|
|
389
|
+
min-width: var(--selected-item-count-min-width, 18px);
|
|
390
|
+
padding: var(--selected-item-count-padding, 4px);
|
|
391
|
+
display: var(--selected-item-count-display, flex);
|
|
392
|
+
justify-content: var(--selected-item-count-justify-content, center);
|
|
393
|
+
align-items: var(--selected-item-count-align-item, center);
|
|
394
|
+
background-color: var(--selected-item-count-bg-color, #3a4550);
|
|
395
|
+
color: var(--selected-item-count-text-color, #ffffff);
|
|
396
|
+
border-radius: var(--selected-item-count-border-radius, 4px);
|
|
397
|
+
}
|
|
363
398
|
</style>
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
<script>export let
|
|
2
|
-
export let
|
|
1
|
+
<script>export let value = false;
|
|
2
|
+
export let text = "";
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
|
-
<div class="
|
|
6
|
-
<div class="
|
|
5
|
+
<div class="container">
|
|
6
|
+
<div class="text" hidden={text.length === 0}>{text}</div>
|
|
7
7
|
<label class="switch">
|
|
8
|
-
<input class="input-checkbox" type="checkbox" bind:checked={
|
|
8
|
+
<input class="input-checkbox" type="checkbox" bind:checked={value} />
|
|
9
9
|
<span class="slider round" />
|
|
10
10
|
</label>
|
|
11
11
|
</div>
|
|
12
12
|
|
|
13
13
|
<style>
|
|
14
|
-
.
|
|
14
|
+
.container {
|
|
15
15
|
display: var(--toggle-container-display, flex);
|
|
16
|
-
align-items: center;
|
|
17
|
-
gap: var(--toggle-
|
|
16
|
+
align-items: var(--toggle-container-align-items, center);
|
|
17
|
+
gap: var(--toggle-container-gap, 8px);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.
|
|
21
|
-
font-size: 14px;
|
|
22
|
-
font-weight:
|
|
23
|
-
color: #4a4a4a;
|
|
24
|
-
margin
|
|
20
|
+
.text {
|
|
21
|
+
font-size: var(--toggle-text-font-size, 14px);
|
|
22
|
+
font-weight: var(--toggle-text-font-weight, 400);
|
|
23
|
+
color: var(--toggle-text-color, #4a4a4a);
|
|
24
|
+
margin: var(--toggle-text-margin, 0px 8px 0px 0px);
|
|
25
|
+
order: var(--toggle-text-order, 0);
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
.switch {
|
|
@@ -45,21 +46,21 @@ export let toggleText = "";
|
|
|
45
46
|
right: var(--toggle-slider-right, 0);
|
|
46
47
|
bottom: var(--toggle-slider-bottom, 0);
|
|
47
48
|
background-color: var(--slider-unchecked-color, #ccc);
|
|
48
|
-
-webkit-transition: 0.4s;
|
|
49
|
-
transition: 0.4s;
|
|
49
|
+
-webkit-transition: var(--toggle-slider-transition, 0.4s);
|
|
50
|
+
transition: var(--toggle-slider-transition, 0.4s);
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
.slider:before {
|
|
53
54
|
position: absolute;
|
|
54
55
|
content: '';
|
|
55
|
-
height: var(--toggle-
|
|
56
|
-
width: var(--toggle-
|
|
56
|
+
height: var(--toggle-ball-height, 23px);
|
|
57
|
+
width: var(--toggle-ball-width, 23px);
|
|
57
58
|
left: var(--toggle-slider-before-left, 2px);
|
|
58
59
|
bottom: var(--toggle-slider-before-bottom, 1px);
|
|
59
60
|
top: var(--toggle-slider-before-top, 1px);
|
|
60
61
|
background-color: var(--toggle-slider-before-background-color, white);
|
|
61
|
-
-webkit-transition: 0.4s;
|
|
62
|
-
transition: 0.4s;
|
|
62
|
+
-webkit-transition: var(--toggle-slider-transition, 0.4s);
|
|
63
|
+
transition: var(--toggle-slider-transition, 0.4s);
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
.input-checkbox:checked + .slider {
|
|
@@ -77,10 +78,10 @@ export let toggleText = "";
|
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
.slider.round {
|
|
80
|
-
border-radius: var(--slider-
|
|
81
|
+
border-radius: var(--slider-border-radius, 23px);
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
.slider.round:before {
|
|
84
|
-
border-radius: var(--slider-
|
|
85
|
+
border-radius: var(--slider-border-radius-before, 50%);
|
|
85
86
|
}
|
|
86
87
|
</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
value?: boolean | undefined;
|
|
5
|
+
text?: string | undefined;
|
|
6
6
|
};
|
|
7
7
|
events: {
|
|
8
8
|
[evt: string]: CustomEvent<any>;
|