@juspay/svelte-ui-components 1.10.0 → 1.11.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 +5 -5
- package/dist/Input/Input.svelte +1 -0
- package/dist/Input/properties.d.ts +1 -0
- package/dist/InputButton/InputButton.svelte +1 -1
- package/dist/Select/Select.svelte +5 -20
- package/dist/Toast/Toast.svelte +27 -4
- package/dist/Toast/Toast.svelte.d.ts +3 -1
- package/dist/Toast/properties.d.ts +1 -0
- package/package.json +1 -1
|
@@ -27,10 +27,10 @@ function handleButtonClick() {
|
|
|
27
27
|
disabled={!(properties.enable && !properties.showLoader)}
|
|
28
28
|
type={properties.type}
|
|
29
29
|
>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
{#if properties.showLoader && properties.loaderType === 'Circular'}
|
|
31
|
+
<div class="button-loader"><Loader /></div>
|
|
32
|
+
{/if}
|
|
33
|
+
{#if $$slots.icon}
|
|
34
34
|
<div class="button-icon"><slot name="icon" /></div>
|
|
35
35
|
{/if}
|
|
36
36
|
<div class="button-text">{properties.text}</div>
|
|
@@ -61,7 +61,7 @@ function handleButtonClick() {
|
|
|
61
61
|
display: flex;
|
|
62
62
|
justify-content: var(--button-justify-content, center);
|
|
63
63
|
align-items: center;
|
|
64
|
-
flex-direction: var(--button-content-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
|
}
|
package/dist/Input/Input.svelte
CHANGED
|
@@ -178,7 +178,7 @@ function onFocusOut(event) {
|
|
|
178
178
|
--button-content-gap: var(--left-button-content-gap);
|
|
179
179
|
--button-content-flex-direction: var(--left-button-content-flex-direction, row);
|
|
180
180
|
}
|
|
181
|
-
|
|
181
|
+
|
|
182
182
|
.right-button {
|
|
183
183
|
flex: var(--right-button-flex, 1);
|
|
184
184
|
display: flex;
|
|
@@ -111,7 +111,7 @@ onDestroy(() => {
|
|
|
111
111
|
});
|
|
112
112
|
</script>
|
|
113
113
|
|
|
114
|
-
{#if properties.label !== null}
|
|
114
|
+
{#if properties.label !== null && properties.label !== ''}
|
|
115
115
|
<label class="label-container" for={properties.label}>
|
|
116
116
|
{properties.label}
|
|
117
117
|
</label>
|
|
@@ -136,7 +136,7 @@ onDestroy(() => {
|
|
|
136
136
|
{#if properties.selectMultipleItems && Array.isArray(properties.selectedItemLabel) && Array.isArray(properties.selectedItem)}
|
|
137
137
|
{#if properties.selectedItem.length === 0}
|
|
138
138
|
{properties.placeholder}
|
|
139
|
-
{:else if properties.selectedItemLabel?.length === 0 || properties.showSelectedItemInDropdown && properties.showSelectedItem !== false}
|
|
139
|
+
{:else if properties.selectedItemLabel?.length === 0 || (properties.showSelectedItemInDropdown && properties.showSelectedItem !== false)}
|
|
140
140
|
{properties.selectedItem.join(', ')}
|
|
141
141
|
{:else if properties.showSelectedItem !== false}
|
|
142
142
|
{properties.selectedItemLabel.join(', ')}
|
|
@@ -145,7 +145,7 @@ onDestroy(() => {
|
|
|
145
145
|
{/if}
|
|
146
146
|
{:else if properties.selectedItem === ''}
|
|
147
147
|
{properties.placeholder}
|
|
148
|
-
{:else if properties.selectedItemLabel === null || properties.selectedItemLabel === '' && properties.showSelectedItem !== false}
|
|
148
|
+
{:else if properties.selectedItemLabel === null || (properties.selectedItemLabel === '' && properties.showSelectedItem !== false)}
|
|
149
149
|
{properties.selectedItem}
|
|
150
150
|
{:else if properties.showSelectedItem !== false}
|
|
151
151
|
{properties.selectedItemLabel}
|
|
@@ -231,8 +231,6 @@ onDestroy(() => {
|
|
|
231
231
|
height: var(--dropdown-arrow-icon-height, 16px);
|
|
232
232
|
width: var(--dropdown-arrow-icon-width, 16px);
|
|
233
233
|
transition: transform 0.1s;
|
|
234
|
-
position: absolute;
|
|
235
|
-
right: 10px;
|
|
236
234
|
}
|
|
237
235
|
|
|
238
236
|
.active {
|
|
@@ -265,7 +263,8 @@ onDestroy(() => {
|
|
|
265
263
|
white-space: var(--selected-item-white-space, nowrap);
|
|
266
264
|
overflow: var(--selected-item-overflow, hidden);
|
|
267
265
|
text-overflow: var(--selected-item-text-overflow, ellipsis);
|
|
268
|
-
max-width: var(--selected-item-max-
|
|
266
|
+
max-width: var(--selected-item-max-width, 100%);
|
|
267
|
+
padding: var(--selected-item-padding, var(--item-padding, 8px 16px));
|
|
269
268
|
}
|
|
270
269
|
|
|
271
270
|
.selected-content {
|
|
@@ -334,20 +333,6 @@ onDestroy(() => {
|
|
|
334
333
|
--button-width: var(--multipleSelect-btn-width, 100%);
|
|
335
334
|
}
|
|
336
335
|
|
|
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
336
|
|
|
352
337
|
.apply-btn-container {
|
|
353
338
|
padding: var(--apply-btn-container-padding, 5px);
|
package/dist/Toast/Toast.svelte
CHANGED
|
@@ -79,6 +79,13 @@ onDestroy(() => {
|
|
|
79
79
|
|
|
80
80
|
<div class="toast-message">
|
|
81
81
|
{properties.message}
|
|
82
|
+
{#if properties.subtext}
|
|
83
|
+
<div class="toast-subtext">{properties.subtext}</div>
|
|
84
|
+
{/if}
|
|
85
|
+
|
|
86
|
+
{#if $$slots.bottomContent}
|
|
87
|
+
<slot name="bottomContent" />
|
|
88
|
+
{/if}
|
|
82
89
|
</div>
|
|
83
90
|
|
|
84
91
|
{#if properties.rightIcon}
|
|
@@ -93,14 +100,18 @@ onDestroy(() => {
|
|
|
93
100
|
.toast {
|
|
94
101
|
padding: var(--toast-padding, 10px);
|
|
95
102
|
font-size: var(--toast-font-size, 14px);
|
|
103
|
+
font-family: var(--toast-font-family);
|
|
104
|
+
font-weight: var(--toast-font-weight);
|
|
96
105
|
height: var(--toast-height, auto);
|
|
97
106
|
border-radius: var(--toast-border-radius, 0px);
|
|
107
|
+
border: var(--toast-border, none);
|
|
108
|
+
border-style: var(--toast-border-style);
|
|
98
109
|
width: var(--toast-width, auto);
|
|
99
110
|
align-items: var(--toast-align-items, center);
|
|
100
111
|
margin: var(--toast-margin, 0px 10px 10px 10px);
|
|
101
112
|
justify-content: var(--toast-justify-content, space-between);
|
|
102
113
|
z-index: var(--toast-z-index, 1000);
|
|
103
|
-
display: var(--
|
|
114
|
+
display: var(--toast-display, flex);
|
|
104
115
|
position: var(--toast-position, absolute);
|
|
105
116
|
top: var(--toast-top, 10px);
|
|
106
117
|
left: var(--toast-left, 0);
|
|
@@ -115,7 +126,7 @@ onDestroy(() => {
|
|
|
115
126
|
.toast-icon-wrapper {
|
|
116
127
|
width: var(--toast-icon-wrapper-width, 20px);
|
|
117
128
|
height: var(--toast-icon-wrapper-height, 20px);
|
|
118
|
-
margin: var(--toast-icon-margin,
|
|
129
|
+
margin: var(--toast-icon-margin, 0px 6px 0px 0px);
|
|
119
130
|
padding: var(--toast-icon-wrapper-padding, 1px);
|
|
120
131
|
}
|
|
121
132
|
|
|
@@ -126,8 +137,16 @@ onDestroy(() => {
|
|
|
126
137
|
|
|
127
138
|
.toast-message {
|
|
128
139
|
display: var(--toast-message-display, flex);
|
|
129
|
-
flex: var(--
|
|
140
|
+
flex: var(--toast-message-flex, 1);
|
|
130
141
|
padding: var(--toast-message-padding, 1px);
|
|
142
|
+
flex-direction: column;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.toast-subtext {
|
|
146
|
+
color: var(--toast-subtext-color, #c7c7c7);
|
|
147
|
+
font-size: var(--toast-subtext-font-size, 10px);
|
|
148
|
+
font-weight: var(--toast-subtext-font-weight, 400);
|
|
149
|
+
margin: var(--toast-subtext-margin, 10px 0px 0px 0px);
|
|
131
150
|
}
|
|
132
151
|
|
|
133
152
|
.close-button {
|
|
@@ -135,7 +154,7 @@ onDestroy(() => {
|
|
|
135
154
|
height: var(--toast-close-button-height, 20px);
|
|
136
155
|
cursor: var(--toast-close-button-cursor, pointer);
|
|
137
156
|
gap: var(--toast-close-button-gap, 6px);
|
|
138
|
-
margin: var(--toast-close-button-margin,
|
|
157
|
+
margin: var(--toast-close-button-margin, 0px 0px 0px 10px);
|
|
139
158
|
display: var(--toast-close-button-display, flex);
|
|
140
159
|
align-items: var(--toast-close-button-align-items, center);
|
|
141
160
|
justify-content: var(--toast-close-button-justify-content, center);
|
|
@@ -145,20 +164,24 @@ onDestroy(() => {
|
|
|
145
164
|
.success {
|
|
146
165
|
color: var(--toast-success-text, #fff);
|
|
147
166
|
background-color: var(--toast-background-color, #24aa5a);
|
|
167
|
+
--toast-border: var(--toast-success-border);
|
|
148
168
|
}
|
|
149
169
|
|
|
150
170
|
.info {
|
|
151
171
|
color: var(--toast-info-text, #fff);
|
|
152
172
|
background-color: var(--toast-background-color, #87ceeb);
|
|
173
|
+
--toast-border: var(--toast-info-border);
|
|
153
174
|
}
|
|
154
175
|
|
|
155
176
|
.warn {
|
|
156
177
|
color: var(--toast-warn-text, #fff);
|
|
157
178
|
background-color: var(--toast-background-color, #f3a42d);
|
|
179
|
+
--toast-border: var(--toast-warn-border);
|
|
158
180
|
}
|
|
159
181
|
|
|
160
182
|
.error {
|
|
161
183
|
color: var(--toast-error-text, #fff);
|
|
162
184
|
background-color: var(--toast-background-color, #f04438);
|
|
185
|
+
--toast-border: var(--toast-error-border);
|
|
163
186
|
}
|
|
164
187
|
</style>
|