@juspay/svelte-ui-components 1.8.0 → 1.10.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 +19 -7
- package/dist/InputButton/InputButton.svelte +31 -7
- package/dist/InputButton/InputButton.svelte.d.ts +1 -0
- package/dist/InputButton/properties.d.ts +1 -1
- package/dist/Modal/Modal.svelte +3 -0
- package/dist/Select/Select.svelte +116 -72
- package/dist/Select/Select.svelte.d.ts +3 -2
- package/dist/Select/properties.d.ts +2 -3
- package/dist/Toggle/Toggle.svelte +16 -16
- package/package.json +1 -1
|
@@ -27,13 +27,13 @@ function handleButtonClick() {
|
|
|
27
27
|
disabled={!(properties.enable && !properties.showLoader)}
|
|
28
28
|
type={properties.type}
|
|
29
29
|
>
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
{#if properties.showLoader && properties.loaderType === 'Circular'}
|
|
31
|
+
<div class="button-loader"><Loader /></div>
|
|
32
|
+
{/if}
|
|
33
|
+
{#if $$slots.icon}
|
|
34
|
+
<div class="button-icon"><slot name="icon" /></div>
|
|
32
35
|
{/if}
|
|
33
|
-
{
|
|
34
|
-
<slot name="icon" />
|
|
35
|
-
{/if}
|
|
36
|
-
{properties.text}
|
|
36
|
+
<div class="button-text">{properties.text}</div>
|
|
37
37
|
</button>
|
|
38
38
|
</div>
|
|
39
39
|
|
|
@@ -61,11 +61,23 @@ function handleButtonClick() {
|
|
|
61
61
|
display: flex;
|
|
62
62
|
justify-content: var(--button-justify-content, center);
|
|
63
63
|
align-items: center;
|
|
64
|
-
flex-direction: row
|
|
64
|
+
flex-direction: var(--button-content-flex-direction, row);;
|
|
65
65
|
gap: var(--button-content-gap, 16px);
|
|
66
66
|
visibility: var(--button-visibility, visible);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
.button-loader {
|
|
70
|
+
order: var(--button-loader-order, 1);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.button-icon {
|
|
74
|
+
order: var(--button-icon-order, 2);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.button-text {
|
|
78
|
+
order: var(--button-text-order, 3);
|
|
79
|
+
}
|
|
80
|
+
|
|
69
81
|
button:hover {
|
|
70
82
|
background: var(--button-hover-color, var(--button-color, #3a4550));
|
|
71
83
|
color: var(--button-hover-text-color, var(--button-text-color, white));
|
|
@@ -37,6 +37,9 @@ function handleState(event) {
|
|
|
37
37
|
}
|
|
38
38
|
dispatch("stateChange", event);
|
|
39
39
|
}
|
|
40
|
+
function onFocusOut(event) {
|
|
41
|
+
dispatch("focusout", event);
|
|
42
|
+
}
|
|
40
43
|
</script>
|
|
41
44
|
|
|
42
45
|
{#if properties.inputProperties.label && properties.inputProperties.label !== ''}
|
|
@@ -60,12 +63,13 @@ function handleState(event) {
|
|
|
60
63
|
on:keyup={triggerRightClickIfValid}
|
|
61
64
|
on:stateChange={handleState}
|
|
62
65
|
on:input={(event) => dispatch('input', event)}
|
|
66
|
+
on:focusout={onFocusOut}
|
|
63
67
|
on:focus
|
|
64
68
|
--input-width="auto"
|
|
65
69
|
/>
|
|
66
70
|
</div>
|
|
67
71
|
{#if properties.rightButtonProperties != null}
|
|
68
|
-
<div class="button">
|
|
72
|
+
<div class="right-button">
|
|
69
73
|
<Button properties={properties.rightButtonProperties} on:click={rightButtonClick} />
|
|
70
74
|
</div>
|
|
71
75
|
{/if}
|
|
@@ -97,6 +101,7 @@ function handleState(event) {
|
|
|
97
101
|
--button-width: 100%;
|
|
98
102
|
--input-border: none;
|
|
99
103
|
--input-focus-border: none;
|
|
104
|
+
border: var(--input-button-container-border);
|
|
100
105
|
}
|
|
101
106
|
|
|
102
107
|
.input-button {
|
|
@@ -114,12 +119,6 @@ function handleState(event) {
|
|
|
114
119
|
min-width: 0px;
|
|
115
120
|
}
|
|
116
121
|
|
|
117
|
-
.button {
|
|
118
|
-
flex: 1;
|
|
119
|
-
min-width: 0px;
|
|
120
|
-
--button-height: 54px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
122
|
.bottom-button {
|
|
124
123
|
padding: var(--input-bottom-btn-padding, 10px 0px);
|
|
125
124
|
--cursor: var(--bottom-button-cursor);
|
|
@@ -177,5 +176,30 @@ function handleState(event) {
|
|
|
177
176
|
align-items: center;
|
|
178
177
|
flex-direction: row;
|
|
179
178
|
--button-content-gap: var(--left-button-content-gap);
|
|
179
|
+
--button-content-flex-direction: var(--left-button-content-flex-direction, row);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.right-button {
|
|
183
|
+
flex: var(--right-button-flex, 1);
|
|
184
|
+
display: flex;
|
|
185
|
+
justify-content: center;
|
|
186
|
+
align-items: center;
|
|
187
|
+
flex-direction: row;
|
|
188
|
+
min-width: var(--right-button-min-width, 0px);
|
|
189
|
+
--button-color: var(--right-button-color);
|
|
190
|
+
--button-text-color: var(--right-button-text-color);
|
|
191
|
+
--button-font-family: var(--right-button-font-family);
|
|
192
|
+
--button-font-weight: var(--right-button-font-weight);
|
|
193
|
+
--button-font-size: var(--right-button-font-size);
|
|
194
|
+
--button-height: var(--right-button-height, 54px);
|
|
195
|
+
--button-padding: var(--right-button-padding);
|
|
196
|
+
--button-border-radius: var(--right-button-border-radius);
|
|
197
|
+
--button-width: var(--right-button-width, 100%);
|
|
198
|
+
--cursor: var(--right-button-cursor);
|
|
199
|
+
--opacity: var(--right-button-opacity);
|
|
200
|
+
--button-border: var(--right-button-border);
|
|
201
|
+
--button-content-gap: var(--right-button-content-gap);
|
|
202
|
+
--button-visibility: var(--right-button-visibility, visible);
|
|
203
|
+
--button-content-flex-direction: var(--right-button-content-flex-direction, row);
|
|
180
204
|
}
|
|
181
205
|
</style>
|
|
@@ -4,6 +4,6 @@ export type InputButtonProperties = {
|
|
|
4
4
|
inputProperties: InputProperties;
|
|
5
5
|
rightButtonProperties: ButtonProperties | null;
|
|
6
6
|
leftButtonProperties: ButtonProperties | null;
|
|
7
|
-
bottomButtonProperties
|
|
7
|
+
bottomButtonProperties?: ButtonProperties | null;
|
|
8
8
|
};
|
|
9
9
|
export declare const defaultInputButtonProperties: InputButtonProperties;
|
package/dist/Modal/Modal.svelte
CHANGED
|
@@ -154,14 +154,17 @@ onDestroy(() => {
|
|
|
154
154
|
|
|
155
155
|
.small {
|
|
156
156
|
height: var(--modal-small-height, 20vh);
|
|
157
|
+
width: var(--modal-small-width);
|
|
157
158
|
}
|
|
158
159
|
|
|
159
160
|
.medium {
|
|
160
161
|
height: var(--modal-medium-height, 50vh);
|
|
162
|
+
width: var(--modal-medium-width);
|
|
161
163
|
}
|
|
162
164
|
|
|
163
165
|
.large {
|
|
164
166
|
height: var(--modal-large-height, 80vh);
|
|
167
|
+
width: var(--modal-large-width);
|
|
165
168
|
}
|
|
166
169
|
|
|
167
170
|
.fit-content {
|
|
@@ -1,7 +1,6 @@
|
|
|
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 { InputButton, defaultInputButtonProperties } from "..";
|
|
5
4
|
let selectedElementDiv = null;
|
|
6
5
|
export let dropDownIconAlt = "";
|
|
7
6
|
export let properties = {
|
|
@@ -12,16 +11,19 @@ export let properties = {
|
|
|
12
11
|
selectedItemLabel: null,
|
|
13
12
|
showSelectedItemInDropdown: false,
|
|
14
13
|
selectMultipleItems: false,
|
|
15
|
-
leftIcon: null
|
|
14
|
+
leftIcon: null,
|
|
15
|
+
showSelectedItem: true
|
|
16
16
|
};
|
|
17
17
|
const dropDownIcon = properties.dropDownIcon ?? "https://sdk.breeze.in/gallery/icons/down-arrow.svg";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
let applyButtonProps;
|
|
19
|
+
$:
|
|
20
|
+
applyButtonProps = {
|
|
21
|
+
text: `Select (${properties.selectedItem.length})`,
|
|
22
|
+
enable: properties.selectedItem.length > 0,
|
|
23
|
+
showLoader: false,
|
|
24
|
+
loaderType: null,
|
|
25
|
+
type: "submit"
|
|
26
|
+
};
|
|
25
27
|
const selectAllButtonProps = {
|
|
26
28
|
text: "Select All",
|
|
27
29
|
enable: true,
|
|
@@ -37,7 +39,6 @@ const clearAllButtonProps = {
|
|
|
37
39
|
type: "submit"
|
|
38
40
|
};
|
|
39
41
|
let isSelectOpen = false;
|
|
40
|
-
let isInput = false;
|
|
41
42
|
const dispatch = createEventDispatcher();
|
|
42
43
|
$:
|
|
43
44
|
nonSelectedItems = properties.allItems.filter(
|
|
@@ -74,6 +75,7 @@ function selectItem(item) {
|
|
|
74
75
|
}
|
|
75
76
|
function dispatchEvent() {
|
|
76
77
|
dispatch("message", { selectedItems: properties.selectedItem });
|
|
78
|
+
isSelectOpen = false;
|
|
77
79
|
}
|
|
78
80
|
function toggleSelect() {
|
|
79
81
|
isSelectOpen = !isSelectOpen;
|
|
@@ -94,24 +96,11 @@ function closeSelect(event) {
|
|
|
94
96
|
const isApplyButtonClicked = clickedElement.classList.contains("apply-btn");
|
|
95
97
|
const isClearAllButtonClicked = clickedElement.innerText === "Clear All";
|
|
96
98
|
const isSelectAllButtonClicked = clickedElement.innerText === "Select All";
|
|
97
|
-
|
|
98
|
-
if (!isItemClicked && !isApplyButtonClicked && !isClearAllButtonClicked && !isSelectAllButtonClicked && isInputSelected) {
|
|
99
|
+
if (!isItemClicked && !isApplyButtonClicked && !isClearAllButtonClicked && !isSelectAllButtonClicked) {
|
|
99
100
|
isSelectOpen = false;
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
|
-
function handleSelectInput(event) {
|
|
104
|
-
if (event && event.detail) {
|
|
105
|
-
properties.selectedItem = event.detail.value;
|
|
106
|
-
properties.selectedItemLabel = event.detail.value;
|
|
107
|
-
}
|
|
108
|
-
dispatch("selectInput", event.detail.value);
|
|
109
|
-
isInput = false;
|
|
110
|
-
isSelectOpen = false;
|
|
111
|
-
}
|
|
112
|
-
function toggleIsInput() {
|
|
113
|
-
isInput = true;
|
|
114
|
-
}
|
|
115
104
|
onMount(() => {
|
|
116
105
|
document.addEventListener("click", closeSelect);
|
|
117
106
|
});
|
|
@@ -143,21 +132,27 @@ onDestroy(() => {
|
|
|
143
132
|
<Img {...properties.leftIcon} />
|
|
144
133
|
</div>
|
|
145
134
|
{/if}
|
|
146
|
-
|
|
147
|
-
{#if properties.
|
|
135
|
+
<div class="selected-content">
|
|
136
|
+
{#if properties.selectMultipleItems && Array.isArray(properties.selectedItemLabel) && Array.isArray(properties.selectedItem)}
|
|
137
|
+
{#if properties.selectedItem.length === 0}
|
|
138
|
+
{properties.placeholder}
|
|
139
|
+
{:else if properties.selectedItemLabel?.length === 0 || properties.showSelectedItemInDropdown && properties.showSelectedItem !== false}
|
|
140
|
+
{properties.selectedItem.join(', ')}
|
|
141
|
+
{:else if properties.showSelectedItem !== false}
|
|
142
|
+
{properties.selectedItemLabel.join(', ')}
|
|
143
|
+
{:else}
|
|
144
|
+
{properties.placeholder}
|
|
145
|
+
{/if}
|
|
146
|
+
{:else if properties.selectedItem === ''}
|
|
148
147
|
{properties.placeholder}
|
|
149
|
-
{:else if properties.selectedItemLabel
|
|
150
|
-
{properties.selectedItem
|
|
148
|
+
{:else if properties.selectedItemLabel === null || properties.selectedItemLabel === '' && properties.showSelectedItem !== false}
|
|
149
|
+
{properties.selectedItem}
|
|
150
|
+
{:else if properties.showSelectedItem !== false}
|
|
151
|
+
{properties.selectedItemLabel}
|
|
151
152
|
{:else}
|
|
152
|
-
{properties.
|
|
153
|
+
{properties.placeholder}
|
|
153
154
|
{/if}
|
|
154
|
-
|
|
155
|
-
{properties.placeholder}
|
|
156
|
-
{:else if properties.selectedItemLabel === null || properties.selectedItemLabel === ''}
|
|
157
|
-
{properties.selectedItem}
|
|
158
|
-
{:else}
|
|
159
|
-
{properties.selectedItemLabel}
|
|
160
|
-
{/if}
|
|
155
|
+
</div>
|
|
161
156
|
<div class="filler" />
|
|
162
157
|
{#if !properties.hideDropDownIcon}
|
|
163
158
|
<img
|
|
@@ -171,9 +166,8 @@ onDestroy(() => {
|
|
|
171
166
|
class="non-selected-items"
|
|
172
167
|
style="--non-selected-display:{isSelectOpen ? 'inline-block' : 'none'};"
|
|
173
168
|
>
|
|
174
|
-
{#if properties.selectMultipleItems}
|
|
169
|
+
{#if properties.selectMultipleItems && !properties.showSingleSelectButton}
|
|
175
170
|
<div class="multipleSelect-btn">
|
|
176
|
-
<Button properties={applyButtonProps} on:click={dispatchEvent} />
|
|
177
171
|
<Button properties={selectAllButtonProps} on:click={selectAllItems} />
|
|
178
172
|
<Button properties={clearAllButtonProps} on:click={clearAllItems} />
|
|
179
173
|
</div>
|
|
@@ -185,7 +179,7 @@ onDestroy(() => {
|
|
|
185
179
|
on:click={() => {
|
|
186
180
|
selectItem(item);
|
|
187
181
|
}}
|
|
188
|
-
class="item {isSelected(properties.selectedItem, item) ? '
|
|
182
|
+
class="item {isSelected(properties.selectedItem, item) ? ' item-selected' : ''}"
|
|
189
183
|
role="button"
|
|
190
184
|
tabindex="0"
|
|
191
185
|
>
|
|
@@ -193,9 +187,12 @@ onDestroy(() => {
|
|
|
193
187
|
</div>
|
|
194
188
|
{/each}
|
|
195
189
|
</div>
|
|
196
|
-
{#if
|
|
197
|
-
<
|
|
198
|
-
|
|
190
|
+
{#if $$slots.bottomContent}
|
|
191
|
+
<slot name="bottomContent" />
|
|
192
|
+
{/if}
|
|
193
|
+
{#if properties.selectMultipleItems}
|
|
194
|
+
<div class="apply-btn-container">
|
|
195
|
+
<Button properties={applyButtonProps} on:click={dispatchEvent} />
|
|
199
196
|
</div>
|
|
200
197
|
{/if}
|
|
201
198
|
</div>
|
|
@@ -214,17 +211,16 @@ onDestroy(() => {
|
|
|
214
211
|
min-width: var(--select-min-width);
|
|
215
212
|
box-shadow: var(--select-box-shadow, 0px 1px 8px #2f537733);
|
|
216
213
|
-webkit-appearance: none !important; /* For Safari MWeb */
|
|
217
|
-
outline: none;
|
|
218
|
-
cursor: pointer;
|
|
219
|
-
border: var(--select-border);
|
|
220
|
-
word-break: var(--select-word-break, break-word);
|
|
214
|
+
outline: var(--select-outline, none);
|
|
221
215
|
resize: none;
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
--
|
|
226
|
-
--
|
|
227
|
-
--
|
|
216
|
+
cursor: pointer;
|
|
217
|
+
border: var(--select-border, 1px solid #ccc);
|
|
218
|
+
position: var(--select-position, relative);
|
|
219
|
+
color: var(--select-color, #333);
|
|
220
|
+
display: var(--select-display, inline-block);
|
|
221
|
+
--button-margin: var(--select-btn-margin, 1px);
|
|
222
|
+
--button-border-radius: var(--select-btn-border-radius, 2px);
|
|
223
|
+
--input-button-margin: var(--select-input-button-margin, 10px);
|
|
228
224
|
}
|
|
229
225
|
|
|
230
226
|
.select:hover {
|
|
@@ -235,6 +231,8 @@ onDestroy(() => {
|
|
|
235
231
|
height: var(--dropdown-arrow-icon-height, 16px);
|
|
236
232
|
width: var(--dropdown-arrow-icon-width, 16px);
|
|
237
233
|
transition: transform 0.1s;
|
|
234
|
+
position: absolute;
|
|
235
|
+
right: 10px;
|
|
238
236
|
}
|
|
239
237
|
|
|
240
238
|
.active {
|
|
@@ -242,8 +240,11 @@ onDestroy(() => {
|
|
|
242
240
|
}
|
|
243
241
|
|
|
244
242
|
.item {
|
|
245
|
-
padding: var(--item-padding, 8px);
|
|
246
|
-
|
|
243
|
+
padding: var(--item-padding, 8px 16px);
|
|
244
|
+
background-color: var(--item-background-color, #fff);
|
|
245
|
+
border-radius: var(--item-border-radius);
|
|
246
|
+
cursor: pointer;
|
|
247
|
+
position: relative;
|
|
247
248
|
}
|
|
248
249
|
|
|
249
250
|
.filler {
|
|
@@ -251,15 +252,27 @@ onDestroy(() => {
|
|
|
251
252
|
}
|
|
252
253
|
|
|
253
254
|
.item:hover {
|
|
254
|
-
background-color: var(--non-selected-hover-bg, #
|
|
255
|
+
background-color: var(--non-selected-hover-bg, #f0f0f0);
|
|
255
256
|
color: var(--non-selected-hover-color);
|
|
256
257
|
}
|
|
257
258
|
|
|
258
259
|
.selected {
|
|
259
|
-
margin: 0px;
|
|
260
260
|
display: flex;
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
align-items: var(--selected-align-items, center);
|
|
262
|
+
margin: var(--selected-margin, 0px 0px 0px 0px);
|
|
263
|
+
justify-content: var(--selected-justify-content, flex-start);
|
|
264
|
+
background-color: var(--selected-item-background-color, #f9f9f9);
|
|
265
|
+
white-space: var(--selected-item-white-space, nowrap);
|
|
266
|
+
overflow: var(--selected-item-overflow, hidden);
|
|
267
|
+
text-overflow: var(--selected-item-text-overflow, ellipsis);
|
|
268
|
+
max-width: var(--selected-item-max-widhh, 100%);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.selected-content {
|
|
272
|
+
white-space: nowrap;
|
|
273
|
+
overflow: hidden;
|
|
274
|
+
text-overflow: ellipsis;
|
|
275
|
+
max-width: calc(100% - 20px);
|
|
263
276
|
}
|
|
264
277
|
|
|
265
278
|
.selected:hover {
|
|
@@ -272,50 +285,81 @@ onDestroy(() => {
|
|
|
272
285
|
background-color: var(--non-selected-item-bgcolor, #ffffff);
|
|
273
286
|
color: var(--non-selected-item-color);
|
|
274
287
|
box-shadow: 0px 1px 8px #2f537733;
|
|
275
|
-
width: var(--non-selected-width,
|
|
288
|
+
width: var(--non-selected-width, 100%);
|
|
276
289
|
min-width: var(--non-selected-min-width, 100%);
|
|
277
|
-
position: absolute;
|
|
278
|
-
border-radius: var(--non-selected-border-radius, 4px);
|
|
279
|
-
margin: var(--non-selected-margin, 4px 0px 0px 0px);
|
|
280
|
-
z-index: 10;
|
|
281
290
|
word-wrap: var(--non-selected-word-break, break-word);
|
|
282
|
-
|
|
291
|
+
position: var(--non-selected-items-position, absolute);
|
|
292
|
+
border-radius: var(--non-selected-items-border-radius, 4px);
|
|
293
|
+
margin: var(--non-selected-margin, 4px 0px 0px 0px);
|
|
283
294
|
font-weight: var(--non-select-font-weight, 500);
|
|
284
295
|
left: var(--non-selected-left);
|
|
285
296
|
right: var(--non-selected-right);
|
|
286
297
|
top: var(--non-selected-top);
|
|
287
298
|
bottom: var(--non-selected-bottom);
|
|
299
|
+
z-index: 10;
|
|
300
|
+
overflow-y: auto;
|
|
288
301
|
}
|
|
289
302
|
|
|
290
303
|
::-webkit-scrollbar {
|
|
291
|
-
width: 0;
|
|
304
|
+
width: var(--scrollbar-width, 0);
|
|
292
305
|
}
|
|
293
306
|
|
|
294
307
|
.item-list {
|
|
295
|
-
max-height: var(--non-selected-max-height,
|
|
308
|
+
max-height: var(--non-selected-max-height, 165px);
|
|
296
309
|
overflow-y: auto;
|
|
297
|
-
position: relative;
|
|
298
310
|
}
|
|
299
311
|
|
|
300
312
|
.item-selected::after {
|
|
301
313
|
content: var(--selected-option-icon, '✔');
|
|
302
314
|
position: absolute;
|
|
303
315
|
right: 7px;
|
|
316
|
+
color: var(--item-selected-icon-color);
|
|
304
317
|
}
|
|
305
318
|
|
|
306
319
|
.label-container {
|
|
307
320
|
font-weight: var(--label-text-weight, 400);
|
|
308
321
|
font-size: var(--label-text-size, 12px);
|
|
309
|
-
color: var(--label-text-color, #
|
|
310
|
-
margin-bottom: 4px;
|
|
311
|
-
display: inline-block;
|
|
322
|
+
color: var(--label-text-color, #333);
|
|
323
|
+
margin-bottom: var(--label-container-margin-bottom, 4px);
|
|
324
|
+
display: var(--label-container-display, inline-block);
|
|
312
325
|
}
|
|
313
326
|
|
|
314
327
|
.multipleSelect-btn {
|
|
315
328
|
display: flex;
|
|
316
|
-
width: var(--multipleSelect-btn-width,
|
|
329
|
+
width: var(--multipleSelect-btn-width, 99%);
|
|
317
330
|
white-space: var(--multipleSelect-btn-white-space, nowrap);
|
|
318
|
-
padding: var(--multipleSelect-btn-padding,
|
|
331
|
+
padding: var(--multipleSelect-btn-padding, 1px);
|
|
332
|
+
--button-border: var(--multipleSelect-btn-border, 1px solid white);
|
|
333
|
+
--button-font-size: var(--multipleSelect-btn-font-size, 12px);
|
|
334
|
+
--button-width: var(--multipleSelect-btn-width, 100%);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.icon-container {
|
|
338
|
+
width: var(--select-icon-container-width, fit-content);
|
|
339
|
+
height: var(--select-icon-container-height, fit-content);
|
|
340
|
+
border-radius: var(--select-icon-container-border-radius);
|
|
341
|
+
opacity: var(--select-icon-container-opacity);
|
|
342
|
+
background: var(--select-icon-container-background);
|
|
343
|
+
display: flex;
|
|
344
|
+
align-items: center;
|
|
345
|
+
justify-content: center;
|
|
346
|
+
margin: var(--select-icon-container-margin, 0px 8px 0px 0px);
|
|
347
|
+
padding: var(--select-icon-container-padding);
|
|
348
|
+
--image-height: var(--select-icon-height);
|
|
349
|
+
--image-width: var(--select-icon-height);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.apply-btn-container {
|
|
353
|
+
padding: var(--apply-btn-container-padding, 5px);
|
|
354
|
+
border-top: var(--apply-btn-container-border-top, 1px solid #ddd);
|
|
355
|
+
background-color: var(--apply-btn-container-background-color, #f9f9f9);
|
|
356
|
+
position: var(--apply-btn-container-position, sticky);
|
|
357
|
+
width: var(--apply-btn-container-width, 94%);
|
|
358
|
+
display: var(--apply-btn-display, flex);
|
|
359
|
+
flex-direction: var(--apply-btn-flex-direction, column);
|
|
360
|
+
--button-width: var(--apply-btn-width, 100%);
|
|
361
|
+
--button-padding: var(--apply-btn-padding, 10px);
|
|
362
|
+
--button-font-size: var(--apply-btn-font-size, 14px);
|
|
319
363
|
}
|
|
320
364
|
|
|
321
365
|
.icon-container {
|
|
@@ -9,11 +9,12 @@ declare const __propDef: {
|
|
|
9
9
|
keydown: KeyboardEvent;
|
|
10
10
|
message: CustomEvent<any>;
|
|
11
11
|
dropdownClick: CustomEvent<any>;
|
|
12
|
-
selectInput: CustomEvent<any>;
|
|
13
12
|
} & {
|
|
14
13
|
[evt: string]: CustomEvent<any>;
|
|
15
14
|
};
|
|
16
|
-
slots: {
|
|
15
|
+
slots: {
|
|
16
|
+
bottomContent: {};
|
|
17
|
+
};
|
|
17
18
|
};
|
|
18
19
|
export type SelectProps = typeof __propDef.props;
|
|
19
20
|
export type SelectEvents = typeof __propDef.events;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ButtonProperties } from '../Button/properties';
|
|
2
1
|
import type { ImgProps } from '../Img/properties';
|
|
3
2
|
export type SelectProperties = {
|
|
4
3
|
placeholder: string;
|
|
@@ -11,6 +10,6 @@ export type SelectProperties = {
|
|
|
11
10
|
hideDropDownIcon?: boolean;
|
|
12
11
|
dropDownIcon?: string;
|
|
13
12
|
leftIcon: ImgProps | null;
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
showSingleSelectButton?: boolean | null;
|
|
14
|
+
showSelectedItem?: boolean;
|
|
16
15
|
};
|
|
@@ -12,9 +12,9 @@ export let toggleText = "";
|
|
|
12
12
|
|
|
13
13
|
<style>
|
|
14
14
|
.toggle-container {
|
|
15
|
-
display: flex;
|
|
15
|
+
display: var(--toggle-container-display, flex);
|
|
16
16
|
align-items: center;
|
|
17
|
-
gap: 8px;
|
|
17
|
+
gap: var(--toggle-containter-gap, 8px);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.toggle-text {
|
|
@@ -27,8 +27,8 @@ export let toggleText = "";
|
|
|
27
27
|
.switch {
|
|
28
28
|
position: relative;
|
|
29
29
|
display: inline-block;
|
|
30
|
-
width: 46px;
|
|
31
|
-
height: 25px;
|
|
30
|
+
width: var(--toggle-switch-width, 46px);
|
|
31
|
+
height: var(--toggle-switch-height, 25px);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.switch .input-checkbox {
|
|
@@ -40,10 +40,10 @@ export let toggleText = "";
|
|
|
40
40
|
.slider {
|
|
41
41
|
position: absolute;
|
|
42
42
|
cursor: pointer;
|
|
43
|
-
top: 0;
|
|
44
|
-
left: 0;
|
|
45
|
-
right: 0;
|
|
46
|
-
bottom: 0;
|
|
43
|
+
top: var(--toggle-slider-top, 0);
|
|
44
|
+
left: var(--toggle-slider-left, 0);
|
|
45
|
+
right: var(--toggle-slider-right, 0);
|
|
46
|
+
bottom: var(--toggle-slider-bottom, 0);
|
|
47
47
|
background-color: var(--slider-unchecked-color, #ccc);
|
|
48
48
|
-webkit-transition: 0.4s;
|
|
49
49
|
transition: 0.4s;
|
|
@@ -52,12 +52,12 @@ export let toggleText = "";
|
|
|
52
52
|
.slider:before {
|
|
53
53
|
position: absolute;
|
|
54
54
|
content: '';
|
|
55
|
-
height: 23px;
|
|
56
|
-
width: 23px;
|
|
57
|
-
left: 2px;
|
|
58
|
-
bottom: 1px;
|
|
59
|
-
top: 1px;
|
|
60
|
-
background-color: white;
|
|
55
|
+
height: var(--toggle-slider-before-height, 23px);
|
|
56
|
+
width: var(--toggle-slider-before-width, 23px);
|
|
57
|
+
left: var(--toggle-slider-before-left, 2px);
|
|
58
|
+
bottom: var(--toggle-slider-before-bottom, 1px);
|
|
59
|
+
top: var(--toggle-slider-before-top, 1px);
|
|
60
|
+
background-color: var(--toggle-slider-before-background-color, white);
|
|
61
61
|
-webkit-transition: 0.4s;
|
|
62
62
|
transition: 0.4s;
|
|
63
63
|
}
|
|
@@ -77,10 +77,10 @@ export let toggleText = "";
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.slider.round {
|
|
80
|
-
border-radius: 23px;
|
|
80
|
+
border-radius: var(--slider-round-border-radius, 23px);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
.slider.round:before {
|
|
84
|
-
border-radius: 50
|
|
84
|
+
border-radius: var(--slider-round-before-border-radius, 50%);
|
|
85
85
|
}
|
|
86
86
|
</style>
|