@juspay/svelte-ui-components 2.9.0 → 2.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/README.md +337 -77
- package/dist/Accordion/Accordion.svelte +4 -2
- package/dist/Accordion/Accordion.svelte.d.ts +2 -4
- package/dist/Accordion/properties.d.ts +6 -0
- package/dist/Accordion/properties.js +1 -0
- package/dist/Animations/ModalAnimation.svelte +11 -9
- package/dist/Avatar/Avatar.svelte +122 -0
- package/dist/Avatar/Avatar.svelte.d.ts +4 -0
- package/dist/Avatar/properties.d.ts +15 -0
- package/dist/Avatar/properties.js +1 -0
- package/dist/Badge/Badge.svelte +2 -2
- package/dist/Badge/properties.d.ts +1 -0
- package/dist/Banner/Banner.svelte +132 -48
- package/dist/Banner/Banner.svelte.d.ts +1 -1
- package/dist/Banner/properties.d.ts +8 -3
- package/dist/Book/Book.svelte +281 -0
- package/dist/Book/Book.svelte.d.ts +4 -0
- package/dist/Book/properties.d.ts +24 -0
- package/dist/Book/properties.js +1 -0
- package/dist/BrandLoader/BrandLoader.svelte +3 -3
- package/dist/BrandLoader/properties.d.ts +1 -0
- package/dist/Browser/Browser.svelte +193 -0
- package/dist/Browser/Browser.svelte.d.ts +3 -0
- package/dist/Browser/properties.d.ts +16 -0
- package/dist/Browser/properties.js +1 -0
- package/dist/Button/Button.svelte +20 -7
- package/dist/Button/properties.d.ts +7 -4
- package/dist/Calendar/Calendar.svelte +476 -0
- package/dist/Calendar/Calendar.svelte.d.ts +4 -0
- package/dist/Calendar/properties.d.ts +30 -0
- package/dist/Calendar/properties.js +1 -0
- package/dist/Carousel/Carousel.svelte +19 -16
- package/dist/Carousel/properties.d.ts +1 -0
- package/dist/CheckListItem/CheckListItem.svelte +31 -26
- package/dist/CheckListItem/properties.d.ts +4 -1
- package/dist/Checkbox/Checkbox.svelte +157 -0
- package/dist/Checkbox/Checkbox.svelte.d.ts +4 -0
- package/dist/Checkbox/properties.d.ts +17 -0
- package/dist/Checkbox/properties.js +1 -0
- package/dist/Choicebox/Choicebox.svelte +85 -0
- package/dist/Choicebox/Choicebox.svelte.d.ts +4 -0
- package/dist/Choicebox/properties.d.ts +14 -0
- package/dist/Choicebox/properties.js +1 -0
- package/dist/CommandMenu/CommandMenu.svelte +452 -0
- package/dist/CommandMenu/CommandMenu.svelte.d.ts +4 -0
- package/dist/CommandMenu/properties.d.ts +26 -0
- package/dist/CommandMenu/properties.js +1 -0
- package/dist/ContextMenu/ContextMenu.svelte +308 -0
- package/dist/ContextMenu/ContextMenu.svelte.d.ts +4 -0
- package/dist/ContextMenu/properties.d.ts +26 -0
- package/dist/ContextMenu/properties.js +1 -0
- package/dist/Gauge/Gauge.svelte +70 -0
- package/dist/Gauge/Gauge.svelte.d.ts +4 -0
- package/dist/Gauge/properties.d.ts +9 -0
- package/dist/Gauge/properties.js +1 -0
- package/dist/GridItem/GridItem.svelte +5 -4
- package/dist/GridItem/properties.d.ts +1 -0
- package/dist/Icon/Icon.svelte +3 -3
- package/dist/Icon/properties.d.ts +1 -0
- package/dist/IconStack/IconStack.svelte +3 -3
- package/dist/IconStack/properties.d.ts +1 -0
- package/dist/Img/Img.svelte +5 -3
- package/dist/Img/properties.d.ts +5 -1
- package/dist/Input/Input.svelte +12 -6
- package/dist/Input/properties.d.ts +1 -0
- package/dist/InputButton/InputButton.svelte +4 -3
- package/dist/InputButton/properties.d.ts +5 -6
- package/dist/KeyboardInput/KeyboardInput.svelte +93 -0
- package/dist/KeyboardInput/KeyboardInput.svelte.d.ts +4 -0
- package/dist/KeyboardInput/properties.d.ts +12 -0
- package/dist/KeyboardInput/properties.js +1 -0
- package/dist/ListItem/ListItem.svelte +31 -28
- package/dist/ListItem/properties.d.ts +1 -0
- package/dist/Loader/Loader.svelte +10 -6
- package/dist/Loader/Loader.svelte.d.ts +3 -25
- package/dist/Loader/properties.d.ts +3 -0
- package/dist/Loader/properties.js +1 -0
- package/dist/LoadingDots/LoadingDots.svelte +64 -0
- package/dist/LoadingDots/LoadingDots.svelte.d.ts +3 -0
- package/dist/LoadingDots/properties.d.ts +8 -0
- package/dist/LoadingDots/properties.js +1 -0
- package/dist/Menu/Menu.svelte +349 -0
- package/dist/Menu/Menu.svelte.d.ts +4 -0
- package/dist/Menu/properties.d.ts +24 -0
- package/dist/Menu/properties.js +1 -0
- package/dist/Modal/Modal.svelte +10 -9
- package/dist/Modal/properties.d.ts +1 -0
- package/dist/Pagination/Pagination.svelte +152 -0
- package/dist/Pagination/Pagination.svelte.d.ts +4 -0
- package/dist/Pagination/properties.d.ts +14 -0
- package/dist/Pagination/properties.js +1 -0
- package/dist/Phone/Phone.svelte +234 -0
- package/dist/Phone/Phone.svelte.d.ts +3 -0
- package/dist/Phone/properties.d.ts +11 -0
- package/dist/Phone/properties.js +1 -0
- package/dist/Pill/Pill.svelte +130 -0
- package/dist/Pill/Pill.svelte.d.ts +4 -0
- package/dist/Pill/properties.d.ts +16 -0
- package/dist/Pill/properties.js +1 -0
- package/dist/Progress/Progress.svelte +68 -0
- package/dist/Progress/Progress.svelte.d.ts +4 -0
- package/dist/Progress/properties.d.ts +10 -0
- package/dist/Progress/properties.js +1 -0
- package/dist/Radio/Radio.svelte +128 -0
- package/dist/Radio/Radio.svelte.d.ts +4 -0
- package/dist/Radio/properties.d.ts +15 -0
- package/dist/Radio/properties.js +1 -0
- package/dist/RelativeTime/RelativeTime.svelte +117 -0
- package/dist/RelativeTime/RelativeTime.svelte.d.ts +4 -0
- package/dist/RelativeTime/properties.d.ts +13 -0
- package/dist/RelativeTime/properties.js +1 -0
- package/dist/Scroller/Scroller.svelte +389 -0
- package/dist/Scroller/Scroller.svelte.d.ts +4 -0
- package/dist/Scroller/properties.d.ts +30 -0
- package/dist/Scroller/properties.js +1 -0
- package/dist/Select/Select.svelte +382 -344
- package/dist/Select/Select.svelte.d.ts +1 -1
- package/dist/Select/properties.d.ts +16 -26
- package/dist/Sheet/Sheet.svelte +264 -0
- package/dist/Sheet/Sheet.svelte.d.ts +4 -0
- package/dist/Sheet/properties.d.ts +19 -0
- package/dist/Sheet/properties.js +1 -0
- package/dist/Shimmer/Shimmer.svelte +44 -0
- package/dist/Shimmer/Shimmer.svelte.d.ts +4 -0
- package/dist/Shimmer/properties.d.ts +4 -0
- package/dist/Shimmer/properties.js +1 -0
- package/dist/Slider/Slider.svelte +144 -0
- package/dist/Slider/Slider.svelte.d.ts +4 -0
- package/dist/Slider/properties.d.ts +17 -0
- package/dist/Slider/properties.js +1 -0
- package/dist/Snippet/Snippet.svelte +123 -0
- package/dist/Snippet/Snippet.svelte.d.ts +4 -0
- package/dist/Snippet/properties.d.ts +15 -0
- package/dist/Snippet/properties.js +1 -0
- package/dist/SplitButton/SplitButton.svelte +135 -0
- package/dist/SplitButton/SplitButton.svelte.d.ts +4 -0
- package/dist/SplitButton/properties.d.ts +17 -0
- package/dist/SplitButton/properties.js +1 -0
- package/dist/Status/Status.svelte +5 -3
- package/dist/Status/properties.d.ts +1 -0
- package/dist/Stepper/Step.svelte +3 -3
- package/dist/Stepper/Stepper.svelte +3 -3
- package/dist/Stepper/properties.d.ts +2 -0
- package/dist/Table/Table.svelte +15 -8
- package/dist/Table/properties.d.ts +1 -0
- package/dist/Tabs/Tabs.svelte +240 -0
- package/dist/Tabs/Tabs.svelte.d.ts +4 -0
- package/dist/Tabs/properties.d.ts +16 -0
- package/dist/Tabs/properties.js +1 -0
- package/dist/ThemeSwitcher/ThemeSwitcher.svelte +249 -0
- package/dist/ThemeSwitcher/ThemeSwitcher.svelte.d.ts +4 -0
- package/dist/ThemeSwitcher/properties.d.ts +19 -0
- package/dist/ThemeSwitcher/properties.js +1 -0
- package/dist/Toast/Toast.svelte +25 -30
- package/dist/Toast/properties.d.ts +1 -0
- package/dist/Toggle/Toggle.svelte +2 -2
- package/dist/Toggle/properties.d.ts +1 -0
- package/dist/Toolbar/Toolbar.svelte +8 -7
- package/dist/Toolbar/properties.d.ts +1 -0
- package/dist/Tooltip/Tooltip.svelte +153 -0
- package/dist/Tooltip/Tooltip.svelte.d.ts +4 -0
- package/dist/Tooltip/properties.d.ts +13 -0
- package/dist/Tooltip/properties.js +1 -0
- package/dist/assets/battery.svg +5 -0
- package/dist/assets/checkmark.svg +3 -0
- package/dist/assets/chevron-down-sm.svg +3 -0
- package/dist/assets/chevron-down.svg +3 -0
- package/dist/assets/chevron-left-lg.svg +3 -0
- package/dist/assets/chevron-left.svg +3 -0
- package/dist/assets/chevron-right-lg.svg +3 -0
- package/dist/assets/chevron-right.svg +3 -0
- package/dist/assets/chevron-up.svg +3 -0
- package/dist/assets/close.svg +4 -0
- package/dist/assets/copy.svg +4 -0
- package/dist/assets/error-circle.svg +5 -0
- package/dist/assets/lock.svg +3 -0
- package/dist/assets/minus.svg +3 -0
- package/dist/assets/monitor.svg +5 -0
- package/dist/assets/moon.svg +3 -0
- package/dist/assets/palette.svg +7 -0
- package/dist/assets/search.svg +4 -0
- package/dist/assets/signal.svg +6 -0
- package/dist/assets/sun.svg +11 -0
- package/dist/assets/wifi.svg +3 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.js +27 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +18 -4
- package/package.json +26 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
export type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
3
|
+
export type MandatoryTooltipProperties = {
|
|
4
|
+
text: string;
|
|
5
|
+
children: Snippet;
|
|
6
|
+
};
|
|
7
|
+
export type OptionalTooltipProperties = {
|
|
8
|
+
position?: TooltipPosition;
|
|
9
|
+
delay?: number;
|
|
10
|
+
testId?: string | null;
|
|
11
|
+
classes?: string;
|
|
12
|
+
};
|
|
13
|
+
export type TooltipProperties = MandatoryTooltipProperties & OptionalTooltipProperties;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg viewBox="0 0 28 13" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="0" y="0" width="24" height="12" rx="2" stroke="currentColor" stroke-width="1" fill="none" />
|
|
3
|
+
<rect x="2" y="2" width="18" height="8" rx="1" />
|
|
4
|
+
<rect x="25" y="3.5" width="3" height="5" rx="1" />
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<line x1="18" y1="6" x2="6" y2="18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<line x1="6" y1="6" x2="18" y2="18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
|
|
3
|
+
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="2"/>
|
|
3
|
+
<path d="M12 8V12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
4
|
+
<circle cx="12" cy="16" r="1" fill="currentColor"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM12 17c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM15.1 8H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect>
|
|
3
|
+
<line x1="8" y1="21" x2="16" y2="21"></line>
|
|
4
|
+
<line x1="12" y1="17" x2="12" y2="21"></line>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle cx="13.5" cy="6.5" r="0.5" fill="currentColor"></circle>
|
|
3
|
+
<circle cx="17.5" cy="10.5" r="0.5" fill="currentColor"></circle>
|
|
4
|
+
<circle cx="8.5" cy="7.5" r="0.5" fill="currentColor"></circle>
|
|
5
|
+
<circle cx="6.5" cy="12.5" r="0.5" fill="currentColor"></circle>
|
|
6
|
+
<path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z"></path>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg viewBox="0 0 18 12" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="0" y="8" width="3" height="4" rx="0.5" />
|
|
3
|
+
<rect x="5" y="5" width="3" height="7" rx="0.5" />
|
|
4
|
+
<rect x="10" y="2" width="3" height="10" rx="0.5" />
|
|
5
|
+
<rect x="15" y="0" width="3" height="12" rx="0.5" />
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle cx="12" cy="12" r="5"></circle>
|
|
3
|
+
<line x1="12" y1="1" x2="12" y2="3"></line>
|
|
4
|
+
<line x1="12" y1="21" x2="12" y2="23"></line>
|
|
5
|
+
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
|
6
|
+
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
|
7
|
+
<line x1="1" y1="12" x2="3" y2="12"></line>
|
|
8
|
+
<line x1="21" y1="12" x2="23" y2="12"></line>
|
|
9
|
+
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
|
10
|
+
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg viewBox="0 0 16 12" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M8 2.4C5.6 2.4 3.5 3.4 2 5l1.4 1.4C4.6 5.2 6.2 4.4 8 4.4s3.4.8 4.6 2l1.4-1.4C12.5 3.4 10.4 2.4 8 2.4zM8 6.4c-1.4 0-2.6.6-3.4 1.4L6 9.2c.5-.5 1.2-.8 2-.8s1.5.3 2 .8l1.4-1.4C10.6 7 9.4 6.4 8 6.4zM8 10.4c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z" />
|
|
3
|
+
</svg>
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,33 @@ export { default as Toast } from './Toast/Toast.svelte';
|
|
|
24
24
|
export { default as GridItem } from './GridItem/GridItem.svelte';
|
|
25
25
|
export { default as IconStack } from './IconStack/IconStack.svelte';
|
|
26
26
|
export { default as Img } from './Img/Img.svelte';
|
|
27
|
+
export { default as Checkbox } from './Checkbox/Checkbox.svelte';
|
|
28
|
+
export { default as Radio } from './Radio/Radio.svelte';
|
|
29
|
+
export { default as Avatar } from './Avatar/Avatar.svelte';
|
|
30
|
+
export { default as Tabs } from './Tabs/Tabs.svelte';
|
|
31
|
+
export { default as Choicebox } from './Choicebox/Choicebox.svelte';
|
|
32
|
+
export { default as Slider } from './Slider/Slider.svelte';
|
|
33
|
+
export { default as Tooltip } from './Tooltip/Tooltip.svelte';
|
|
34
|
+
export { default as Shimmer } from './Shimmer/Shimmer.svelte';
|
|
35
|
+
export { default as Progress } from './Progress/Progress.svelte';
|
|
36
|
+
export { default as Pill } from './Pill/Pill.svelte';
|
|
37
|
+
export { default as Pagination } from './Pagination/Pagination.svelte';
|
|
38
|
+
export { default as Snippet } from './Snippet/Snippet.svelte';
|
|
39
|
+
export { default as Gauge } from './Gauge/Gauge.svelte';
|
|
40
|
+
export { default as SplitButton } from './SplitButton/SplitButton.svelte';
|
|
41
|
+
export { default as KeyboardInput } from './KeyboardInput/KeyboardInput.svelte';
|
|
42
|
+
export { default as LoadingDots } from './LoadingDots/LoadingDots.svelte';
|
|
43
|
+
export { default as Menu } from './Menu/Menu.svelte';
|
|
44
|
+
export { default as Sheet } from './Sheet/Sheet.svelte';
|
|
45
|
+
export { default as Scroller } from './Scroller/Scroller.svelte';
|
|
46
|
+
export { default as CommandMenu } from './CommandMenu/CommandMenu.svelte';
|
|
47
|
+
export { default as ContextMenu } from './ContextMenu/ContextMenu.svelte';
|
|
48
|
+
export { default as Calendar } from './Calendar/Calendar.svelte';
|
|
49
|
+
export { default as RelativeTime } from './RelativeTime/RelativeTime.svelte';
|
|
50
|
+
export { default as ThemeSwitcher } from './ThemeSwitcher/ThemeSwitcher.svelte';
|
|
51
|
+
export { default as Book } from './Book/Book.svelte';
|
|
52
|
+
export { default as Browser } from './Browser/Browser.svelte';
|
|
53
|
+
export { default as Phone } from './Phone/Phone.svelte';
|
|
27
54
|
export type * from './Button/properties';
|
|
28
55
|
export type * from './Modal/properties';
|
|
29
56
|
export type * from './Input/properties';
|
|
@@ -43,4 +70,32 @@ export type * from './Stepper/properties';
|
|
|
43
70
|
export type * from './Toast/properties';
|
|
44
71
|
export type * from './IconStack/properties';
|
|
45
72
|
export type * from './Img/properties';
|
|
73
|
+
export type * from './Checkbox/properties';
|
|
74
|
+
export type * from './Radio/properties';
|
|
75
|
+
export type * from './Avatar/properties';
|
|
76
|
+
export type * from './Tabs/properties';
|
|
77
|
+
export type * from './Choicebox/properties';
|
|
78
|
+
export type * from './Slider/properties';
|
|
79
|
+
export type * from './Tooltip/properties';
|
|
80
|
+
export type * from './Shimmer/properties';
|
|
81
|
+
export type * from './Progress/properties';
|
|
82
|
+
export type * from './Pill/properties';
|
|
83
|
+
export type * from './Pagination/properties';
|
|
84
|
+
export type * from './Snippet/properties';
|
|
85
|
+
export type * from './Gauge/properties';
|
|
86
|
+
export type * from './SplitButton/properties';
|
|
87
|
+
export type * from './KeyboardInput/properties';
|
|
88
|
+
export type * from './LoadingDots/properties';
|
|
89
|
+
export type * from './Menu/properties';
|
|
90
|
+
export type * from './Sheet/properties';
|
|
91
|
+
export type * from './Scroller/properties';
|
|
92
|
+
export type * from './CommandMenu/properties';
|
|
93
|
+
export type * from './ContextMenu/properties';
|
|
94
|
+
export type * from './Calendar/properties';
|
|
95
|
+
export type * from './RelativeTime/properties';
|
|
96
|
+
export type * from './ThemeSwitcher/properties';
|
|
97
|
+
export type * from './Book/properties';
|
|
98
|
+
export type * from './Browser/properties';
|
|
99
|
+
export type * from './Phone/properties';
|
|
100
|
+
export type * from './Loader/properties';
|
|
46
101
|
export { validateInput } from './utils';
|
package/dist/index.js
CHANGED
|
@@ -24,4 +24,31 @@ export { default as Toast } from './Toast/Toast.svelte';
|
|
|
24
24
|
export { default as GridItem } from './GridItem/GridItem.svelte';
|
|
25
25
|
export { default as IconStack } from './IconStack/IconStack.svelte';
|
|
26
26
|
export { default as Img } from './Img/Img.svelte';
|
|
27
|
+
export { default as Checkbox } from './Checkbox/Checkbox.svelte';
|
|
28
|
+
export { default as Radio } from './Radio/Radio.svelte';
|
|
29
|
+
export { default as Avatar } from './Avatar/Avatar.svelte';
|
|
30
|
+
export { default as Tabs } from './Tabs/Tabs.svelte';
|
|
31
|
+
export { default as Choicebox } from './Choicebox/Choicebox.svelte';
|
|
32
|
+
export { default as Slider } from './Slider/Slider.svelte';
|
|
33
|
+
export { default as Tooltip } from './Tooltip/Tooltip.svelte';
|
|
34
|
+
export { default as Shimmer } from './Shimmer/Shimmer.svelte';
|
|
35
|
+
export { default as Progress } from './Progress/Progress.svelte';
|
|
36
|
+
export { default as Pill } from './Pill/Pill.svelte';
|
|
37
|
+
export { default as Pagination } from './Pagination/Pagination.svelte';
|
|
38
|
+
export { default as Snippet } from './Snippet/Snippet.svelte';
|
|
39
|
+
export { default as Gauge } from './Gauge/Gauge.svelte';
|
|
40
|
+
export { default as SplitButton } from './SplitButton/SplitButton.svelte';
|
|
41
|
+
export { default as KeyboardInput } from './KeyboardInput/KeyboardInput.svelte';
|
|
42
|
+
export { default as LoadingDots } from './LoadingDots/LoadingDots.svelte';
|
|
43
|
+
export { default as Menu } from './Menu/Menu.svelte';
|
|
44
|
+
export { default as Sheet } from './Sheet/Sheet.svelte';
|
|
45
|
+
export { default as Scroller } from './Scroller/Scroller.svelte';
|
|
46
|
+
export { default as CommandMenu } from './CommandMenu/CommandMenu.svelte';
|
|
47
|
+
export { default as ContextMenu } from './ContextMenu/ContextMenu.svelte';
|
|
48
|
+
export { default as Calendar } from './Calendar/Calendar.svelte';
|
|
49
|
+
export { default as RelativeTime } from './RelativeTime/RelativeTime.svelte';
|
|
50
|
+
export { default as ThemeSwitcher } from './ThemeSwitcher/ThemeSwitcher.svelte';
|
|
51
|
+
export { default as Book } from './Book/Book.svelte';
|
|
52
|
+
export { default as Browser } from './Browser/Browser.svelte';
|
|
53
|
+
export { default as Phone } from './Phone/Phone.svelte';
|
|
27
54
|
export { validateInput } from './utils';
|
package/dist/utils.d.ts
CHANGED
|
@@ -14,4 +14,6 @@ export declare function validateInput(inputValue: string, dataType: InputDataTyp
|
|
|
14
14
|
* @param delay The delay period in milliseconds before invoking the callback.
|
|
15
15
|
* @returns A debouncer function that accepts a callback and delays its invocation based on the specified delay.
|
|
16
16
|
*/
|
|
17
|
+
export declare function getStorageItem(key: string): string | null;
|
|
18
|
+
export declare function setStorageItem(key: string, value: string): void;
|
|
17
19
|
export declare function createDebouncer(delay: number): <T extends unknown[]>(callback: (...args: T) => void, ...args: T) => void;
|
package/dist/utils.js
CHANGED
|
@@ -125,11 +125,9 @@ function validateEmailInput(emailId) {
|
|
|
125
125
|
* @returns ValidationState
|
|
126
126
|
*/
|
|
127
127
|
function validatePhoneNumber(phoneNumber) {
|
|
128
|
-
let validationPattern = null;
|
|
129
|
-
let inProgressPattern = null;
|
|
130
128
|
try {
|
|
131
|
-
validationPattern = new RegExp('^[6-9]{1}[0-9]{9}$');
|
|
132
|
-
inProgressPattern = new RegExp('^[6-9]{1}[0-9]{0,9}$');
|
|
129
|
+
const validationPattern = new RegExp('^[6-9]{1}[0-9]{9}$');
|
|
130
|
+
const inProgressPattern = new RegExp('^[6-9]{1}[0-9]{0,9}$');
|
|
133
131
|
if (validationPattern.test(phoneNumber)) {
|
|
134
132
|
return 'Valid';
|
|
135
133
|
}
|
|
@@ -150,6 +148,22 @@ function validatePhoneNumber(phoneNumber) {
|
|
|
150
148
|
* @param delay The delay period in milliseconds before invoking the callback.
|
|
151
149
|
* @returns A debouncer function that accepts a callback and delays its invocation based on the specified delay.
|
|
152
150
|
*/
|
|
151
|
+
export function getStorageItem(key) {
|
|
152
|
+
try {
|
|
153
|
+
return localStorage.getItem(key);
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
export function setStorageItem(key, value) {
|
|
160
|
+
try {
|
|
161
|
+
localStorage.setItem(key, value);
|
|
162
|
+
}
|
|
163
|
+
catch {
|
|
164
|
+
// localStorage unavailable (SSR, private browsing, storage full)
|
|
165
|
+
}
|
|
166
|
+
}
|
|
153
167
|
export function createDebouncer(delay) {
|
|
154
168
|
let lastCallTime = 0;
|
|
155
169
|
return function (callback, ...args) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/svelte-ui-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
|
+
"description": "A themeable Svelte 5 UI component library with CSS custom property driven styling",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"svelte",
|
|
7
|
+
"svelte5",
|
|
8
|
+
"ui",
|
|
9
|
+
"components",
|
|
10
|
+
"component-library",
|
|
11
|
+
"design-system",
|
|
12
|
+
"css-variables",
|
|
13
|
+
"themeable",
|
|
14
|
+
"svelte-components"
|
|
15
|
+
],
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/juspay/svelte-ui-components"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"homepage": "https://github.com/juspay/svelte-ui-components",
|
|
4
22
|
"scripts": {
|
|
5
23
|
"dev": "vite dev --host",
|
|
6
24
|
"build": "vite build && npm run package",
|
|
@@ -34,8 +52,11 @@
|
|
|
34
52
|
"@commitlint/cli": "^20.1.0",
|
|
35
53
|
"@commitlint/config-conventional": "^20.0.0",
|
|
36
54
|
"@digitalroute/cz-conventional-changelog-for-jira": "^8.0.1",
|
|
55
|
+
"@eslint/compat": "^2.0.2",
|
|
56
|
+
"@eslint/js": "^10.0.1",
|
|
37
57
|
"@playwright/test": "^1.56.1",
|
|
38
58
|
"@sveltejs/adapter-auto": "^7.0.0",
|
|
59
|
+
"@sveltejs/adapter-static": "^3.0.10",
|
|
39
60
|
"@sveltejs/kit": "^2.47.3",
|
|
40
61
|
"@sveltejs/package": "^2.5.4",
|
|
41
62
|
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
@@ -47,7 +68,10 @@
|
|
|
47
68
|
"eslint": "^9.38.0",
|
|
48
69
|
"eslint-config-prettier": "^10.1.8",
|
|
49
70
|
"eslint-plugin-svelte": "^3.12.5",
|
|
71
|
+
"eslint-plugin-unused-imports": "^4.4.1",
|
|
72
|
+
"globals": "^17.3.0",
|
|
50
73
|
"husky": "^9.1.7",
|
|
74
|
+
"marked": "^17.0.3",
|
|
51
75
|
"prettier": "^3.6.2",
|
|
52
76
|
"prettier-plugin-svelte": "^3.4.0",
|
|
53
77
|
"publint": "^0.3.15",
|
|
@@ -56,6 +80,7 @@
|
|
|
56
80
|
"tslib": "^2.8.1",
|
|
57
81
|
"type-decoder": "^2.1.0",
|
|
58
82
|
"typescript": "^5.9.3",
|
|
83
|
+
"typescript-eslint": "^8.56.0",
|
|
59
84
|
"vite": "^7.1.11",
|
|
60
85
|
"vitest": "^4.0.1"
|
|
61
86
|
},
|