@juspay/svelte-ui-components 1.1.0 → 1.3.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/Img/Img.svelte +33 -0
- package/dist/Img/Img.svelte.d.ts +18 -0
- package/dist/Input/Input.svelte +1 -0
- package/dist/ListItem/ListItem.svelte +54 -10
- package/dist/ListItem/properties.d.ts +1 -0
- package/dist/ListItem/properties.js +1 -0
- package/dist/Modal/Modal.svelte +4 -3
- package/dist/Toolbar/Toolbar.svelte +9 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script>export let src;
|
|
2
|
+
export let alt;
|
|
3
|
+
export let fallback = null;
|
|
4
|
+
function handleFallback() {
|
|
5
|
+
if (fallback !== null) {
|
|
6
|
+
src = fallback;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
{#if typeof src === 'string' && typeof alt === 'string'}
|
|
12
|
+
<img {src} {alt} on:error|once={handleFallback} />
|
|
13
|
+
{/if}
|
|
14
|
+
|
|
15
|
+
<style>
|
|
16
|
+
img {
|
|
17
|
+
object-fit: var(--image-object-fit);
|
|
18
|
+
height: var(--image-height, 24px);
|
|
19
|
+
width: var(--image-width, 24px);
|
|
20
|
+
padding: var(--image-padding, 0px);
|
|
21
|
+
border-radius: var(--image-border-radius, 0px);
|
|
22
|
+
margin: var(--image-margin, 0px);
|
|
23
|
+
filter: var(--image-filter, none);
|
|
24
|
+
background: var(--image-background);
|
|
25
|
+
border: var(--image-border);
|
|
26
|
+
transition: var(--image-transition);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
img:hover {
|
|
30
|
+
background: var(--image-hover-background, var(--image-background));
|
|
31
|
+
border: var(--image-hover-border, var(--image-border));
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
src: string;
|
|
5
|
+
alt: string;
|
|
6
|
+
fallback?: string | null | undefined;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export type ImgProps = typeof __propDef.props;
|
|
14
|
+
export type ImgEvents = typeof __propDef.events;
|
|
15
|
+
export type ImgSlots = typeof __propDef.slots;
|
|
16
|
+
export default class Img extends SvelteComponent<ImgProps, ImgEvents, ImgSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
package/dist/Input/Input.svelte
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script>import Accordion from "../Accordion/Accordion.svelte";
|
|
2
2
|
import Loader from "../Loader/Loader.svelte";
|
|
3
|
+
import Img from "../Img/Img.svelte";
|
|
3
4
|
import { defaultListItemProperties } from "./properties";
|
|
4
5
|
import { createEventDispatcher } from "svelte";
|
|
5
6
|
const dispatch = createEventDispatcher();
|
|
@@ -55,7 +56,11 @@ function handleTopSectionClick() {
|
|
|
55
56
|
role="button"
|
|
56
57
|
tabindex="0"
|
|
57
58
|
>
|
|
58
|
-
<
|
|
59
|
+
<Img
|
|
60
|
+
src={properties.leftImageUrl}
|
|
61
|
+
alt=""
|
|
62
|
+
fallback={properties.leftImageFallbackUrl}
|
|
63
|
+
/>
|
|
59
64
|
</div>
|
|
60
65
|
{/if}
|
|
61
66
|
{#if $$slots.leftContent}
|
|
@@ -152,6 +157,15 @@ function handleTopSectionClick() {
|
|
|
152
157
|
box-shadow: var(--list-item-box-shadow, none);
|
|
153
158
|
width: var(--list-item-box-width);
|
|
154
159
|
border-radius: var(--list-item-border-radius, 0px);
|
|
160
|
+
margin: var(--list-item-margin);
|
|
161
|
+
padding: var(--list-item-padding);
|
|
162
|
+
border: var(--list-item-border);
|
|
163
|
+
transition: var(--list-item-transition);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.item:hover {
|
|
167
|
+
background-color: var(--list-item-hover-background-color, var(--list-item-background-color));
|
|
168
|
+
border: var(--list-item-hover-border, var(--list-item-border));
|
|
155
169
|
}
|
|
156
170
|
|
|
157
171
|
.top-section {
|
|
@@ -162,12 +176,39 @@ function handleTopSectionClick() {
|
|
|
162
176
|
|
|
163
177
|
.left-content {
|
|
164
178
|
display: flex;
|
|
179
|
+
--image-height: var(--list-item-left-image-height, 24px);
|
|
180
|
+
--image-width: var(--list-item-left-image-width, 24px);
|
|
181
|
+
--image-padding: var(--list-item-left-image-padding, 0px);
|
|
182
|
+
--image-border-radius: var(--list-item-left-image-border-radius, 0px);
|
|
183
|
+
--image-margin: var(--list-item-left-image-margin, 0px);
|
|
184
|
+
--image-filter: var(--list-item-left-image-filter, none);
|
|
185
|
+
--image-background: var(--list-item-left-image-background);
|
|
186
|
+
--image-border: var(--list-item-left-image-border);
|
|
187
|
+
--image-transition: var(--list-item-transition);
|
|
188
|
+
--image-object-fit: var(--list-item-left-image-object-fit);
|
|
189
|
+
--image-hover-background: var(
|
|
190
|
+
--list-item-left-image-hover-background,
|
|
191
|
+
var(--list-item-left-image-background)
|
|
192
|
+
);
|
|
193
|
+
--image-hover-border: var(
|
|
194
|
+
--list-item-left-image-hover-border,
|
|
195
|
+
var(--list-item-left-image-border)
|
|
196
|
+
);
|
|
165
197
|
}
|
|
166
198
|
|
|
167
199
|
.center-text {
|
|
168
200
|
display: flex;
|
|
169
201
|
flex-direction: column;
|
|
202
|
+
justify-content: var(--list-item-center-text-justify-content, flex-start);
|
|
170
203
|
padding: var(--list-item-center-text-padding, 0px 20px);
|
|
204
|
+
color: var(--list-item-center-text-color, #2f3841);
|
|
205
|
+
font-size: var(--list-item-center-text-font-size, 12px);
|
|
206
|
+
font-weight: var(--list-item-center-text-font-weight, 300);
|
|
207
|
+
align-items: var(--list-item-center-text-vertical-align);
|
|
208
|
+
margin: var(--list-item-center-text-margin);
|
|
209
|
+
border: var(--list-item-center-text-border);
|
|
210
|
+
cursor: var(--list-item-center-text-cursor, pointer);
|
|
211
|
+
font-family: var(--list-item-center-text-font-family);
|
|
171
212
|
}
|
|
172
213
|
|
|
173
214
|
.center-content {
|
|
@@ -185,21 +226,24 @@ function handleTopSectionClick() {
|
|
|
185
226
|
margin-top: 0;
|
|
186
227
|
}
|
|
187
228
|
|
|
188
|
-
.left-img {
|
|
189
|
-
height: var(--list-item-left-image-height, 24px);
|
|
190
|
-
width: var(--list-item-left-image-width, 24px);
|
|
191
|
-
padding: var(--list-item-left-image-padding, 0px);
|
|
192
|
-
border-radius: var(--list-item-left-image-border-radius, 0px);
|
|
193
|
-
margin: var(--list-item-left-image-margin, 0px);
|
|
194
|
-
filter: var(--list-item-left-image-filter, none);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
229
|
.right-img {
|
|
198
230
|
height: var(--list-item-right-image-height, 18px);
|
|
199
231
|
width: var(--list-item-right-image-width, 18px);
|
|
200
232
|
padding: var(--list-item-right-image-padding, 0px);
|
|
201
233
|
border-radius: var(--list-item-right-image-border-radius, 0px);
|
|
202
234
|
margin: var(--list-item-right-image-margin, 0px);
|
|
235
|
+
filter: var(--list-item-right-image-filter);
|
|
236
|
+
background: var(--list-item-right-image-background);
|
|
237
|
+
border: var(--list-item-right-image-border);
|
|
238
|
+
transition: var(--list-item-transition);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.right-img:hover {
|
|
242
|
+
background: var(
|
|
243
|
+
--list-item-right-image-hover-background,
|
|
244
|
+
var(--list-item-right-image-background)
|
|
245
|
+
);
|
|
246
|
+
border: var(--list-item-right-image-hover-border, var(--list-item-right-image-border));
|
|
203
247
|
}
|
|
204
248
|
|
|
205
249
|
.right-content-text {
|
package/dist/Modal/Modal.svelte
CHANGED
|
@@ -175,14 +175,15 @@ onDestroy(() => {
|
|
|
175
175
|
.header {
|
|
176
176
|
display: flex;
|
|
177
177
|
background-color: var(--modal-header-background-color, #f6f7f9);
|
|
178
|
-
padding: 18px 20px;
|
|
178
|
+
padding: var(--modal-header-padding, 18px 20px);
|
|
179
|
+
border-radius: var(--modal-header-border-radius, 0px);
|
|
179
180
|
}
|
|
180
181
|
|
|
181
182
|
.header-text {
|
|
182
183
|
display: flex;
|
|
183
184
|
align-items: center;
|
|
184
185
|
flex: 1;
|
|
185
|
-
font-size: 16px;
|
|
186
|
+
font-size: var(--header-text-size, 16px);
|
|
186
187
|
}
|
|
187
188
|
|
|
188
189
|
.header-left-img,
|
|
@@ -192,7 +193,7 @@ onDestroy(() => {
|
|
|
192
193
|
}
|
|
193
194
|
|
|
194
195
|
.header-left-img {
|
|
195
|
-
margin
|
|
196
|
+
margin: var(--header-left-image-margin, 0px 18px 0px 0px);
|
|
196
197
|
width: var(--header-left-image-width, 25px);
|
|
197
198
|
height: var(--header-left-image-height, 25px);
|
|
198
199
|
}
|
|
@@ -74,10 +74,15 @@ function handleBackClick() {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.back {
|
|
77
|
-
height: 20px;
|
|
78
|
-
width: 20px;
|
|
79
|
-
padding: 20px 14px;
|
|
80
|
-
cursor: pointer;
|
|
77
|
+
height: var(--toolbar-back-button-height, 20px);
|
|
78
|
+
width: var(--toolbar-back-button-width, 20px);
|
|
79
|
+
padding: var(--toolbar-back-button-padding, 20px 14px);
|
|
80
|
+
cursor: var(--toolbar-back-button-cursor, pointer);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.back img {
|
|
84
|
+
height: var(--toolbar-back-image-height, 16px);
|
|
85
|
+
width: var(--toolbar-back-image-width, 16px);
|
|
81
86
|
}
|
|
82
87
|
|
|
83
88
|
.center-content {
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export { default as Banner } from './Banner/Banner.svelte';
|
|
|
17
17
|
export { default as Toggle } from './Toggle/Toggle.svelte';
|
|
18
18
|
export { default as Accordion } from './Accordion/Accordion.svelte';
|
|
19
19
|
export { default as CheckListItem } from './CheckListItem/CheckListItem.svelte';
|
|
20
|
+
export { default as Table } from './Table/Table.svelte';
|
|
20
21
|
export type { ButtonProperties } from './Button/properties';
|
|
21
22
|
export type { ModalProperties, ModalAlign, ModalSize } from './Modal/properties';
|
|
22
23
|
export type { InputProperties } from './Input/properties';
|
|
@@ -34,6 +35,7 @@ export type { ToolbarProperties } from './Toolbar/properties';
|
|
|
34
35
|
export type { CarouselProperties } from './Carousel/properties';
|
|
35
36
|
export type { BadgeProperties } from './Badge/properties';
|
|
36
37
|
export type { BannerProperties } from './Banner/properties';
|
|
38
|
+
export type { TableProperties } from './Table/properties';
|
|
37
39
|
export { defaultIconProperties } from './Icon/properties';
|
|
38
40
|
export { defaultButtonProperties } from './Button/properties';
|
|
39
41
|
export { defaultModalProperties } from './Modal/properties';
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export { default as Banner } from './Banner/Banner.svelte';
|
|
|
17
17
|
export { default as Toggle } from './Toggle/Toggle.svelte';
|
|
18
18
|
export { default as Accordion } from './Accordion/Accordion.svelte';
|
|
19
19
|
export { default as CheckListItem } from './CheckListItem/CheckListItem.svelte';
|
|
20
|
+
export { default as Table } from './Table/Table.svelte';
|
|
20
21
|
export { defaultIconProperties } from './Icon/properties';
|
|
21
22
|
export { defaultButtonProperties } from './Button/properties';
|
|
22
23
|
export { defaultModalProperties } from './Modal/properties';
|