@juspay/svelte-ui-components 1.34.1 → 2.0.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/Accordion/Accordion.svelte +17 -30
- package/dist/Accordion/Accordion.svelte.d.ts +6 -20
- package/dist/Animations/ModalAnimation.svelte +44 -30
- package/dist/Animations/ModalAnimation.svelte.d.ts +9 -21
- package/dist/Animations/OverlayAnimation.svelte +9 -2
- package/dist/Animations/OverlayAnimation.svelte.d.ts +6 -28
- package/dist/Badge/Badge.svelte +9 -8
- package/dist/Badge/Badge.svelte.d.ts +3 -18
- package/dist/Banner/Banner.svelte +20 -19
- package/dist/Banner/Banner.svelte.d.ts +3 -23
- package/dist/Banner/properties.d.ts +6 -2
- package/dist/BrandLoader/BrandLoader.svelte +11 -12
- package/dist/BrandLoader/BrandLoader.svelte.d.ts +3 -19
- package/dist/BrandLoader/properties.d.ts +1 -4
- package/dist/BrandLoader/properties.js +1 -7
- package/dist/Button/Button.svelte +38 -27
- package/dist/Button/Button.svelte.d.ts +4 -23
- package/dist/Button/properties.d.ts +9 -5
- package/dist/Button/properties.js +1 -7
- package/dist/Carousel/Carousel.svelte +132 -108
- package/dist/Carousel/Carousel.svelte.d.ts +3 -20
- package/dist/Carousel/properties.d.ts +6 -12
- package/dist/Carousel/properties.js +1 -7
- package/dist/CheckListItem/CheckListItem.svelte +18 -12
- package/dist/CheckListItem/CheckListItem.svelte.d.ts +4 -23
- package/dist/CheckListItem/properties.d.ts +7 -0
- package/dist/CheckListItem/properties.js +1 -0
- package/dist/GridItem/GridItem.svelte +17 -11
- package/dist/GridItem/GridItem.svelte.d.ts +4 -24
- package/dist/GridItem/properties.d.ts +8 -0
- package/dist/GridItem/properties.js +1 -0
- package/dist/Icon/Icon.svelte +8 -6
- package/dist/Icon/Icon.svelte.d.ts +3 -21
- package/dist/Icon/properties.d.ts +3 -2
- package/dist/Icon/properties.js +1 -4
- package/dist/IconStack/IconStack.svelte +5 -3
- package/dist/IconStack/IconStack.svelte.d.ts +4 -19
- package/dist/IconStack/properties.d.ts +4 -1
- package/dist/Img/Img.svelte +13 -9
- package/dist/Img/Img.svelte.d.ts +4 -20
- package/dist/Img/properties.d.ts +2 -2
- package/dist/Input/Input.svelte +172 -139
- package/dist/Input/Input.svelte.d.ts +6 -32
- package/dist/Input/properties.d.ts +23 -22
- package/dist/Input/properties.js +1 -23
- package/dist/InputButton/InputButton.svelte +76 -78
- package/dist/InputButton/InputButton.svelte.d.ts +6 -35
- package/dist/InputButton/properties.d.ts +6 -4
- package/dist/InputButton/properties.js +1 -18
- package/dist/ListItem/ListItem.svelte +87 -64
- package/dist/ListItem/ListItem.svelte.d.ts +4 -35
- package/dist/ListItem/properties.d.ts +21 -7
- package/dist/ListItem/properties.js +1 -8
- package/dist/Loader/Loader.svelte +1 -4
- package/dist/Loader/Loader.svelte.d.ts +24 -15
- package/dist/Modal/Modal.svelte +117 -95
- package/dist/Modal/Modal.svelte.d.ts +3 -29
- package/dist/Modal/properties.d.ts +21 -13
- package/dist/Modal/properties.js +1 -14
- package/dist/Select/Select.svelte +170 -142
- package/dist/Select/Select.svelte.d.ts +3 -26
- package/dist/Select/properties.d.ts +19 -10
- package/dist/Status/Status.svelte +15 -15
- package/dist/Status/Status.svelte.d.ts +3 -21
- package/dist/Status/properties.d.ts +2 -2
- package/dist/Status/properties.js +1 -6
- package/dist/Stepper/Step.svelte +13 -13
- package/dist/Stepper/Step.svelte.d.ts +4 -23
- package/dist/Stepper/Stepper.svelte +10 -7
- package/dist/Stepper/Stepper.svelte.d.ts +3 -20
- package/dist/Stepper/properties.d.ts +12 -0
- package/dist/Table/Table.svelte +73 -47
- package/dist/Table/Table.svelte.d.ts +3 -20
- package/dist/Table/properties.d.ts +5 -5
- package/dist/Toast/Toast.svelte +144 -76
- package/dist/Toast/Toast.svelte.d.ts +24 -23
- package/dist/Toast/properties.d.ts +10 -11
- package/dist/Toast/properties.js +1 -4
- package/dist/Toggle/Toggle.svelte +12 -11
- package/dist/Toggle/Toggle.svelte.d.ts +4 -21
- package/dist/Toggle/properties.d.ts +5 -0
- package/dist/Toggle/properties.js +1 -0
- package/dist/Toolbar/Toolbar.svelte +27 -20
- package/dist/Toolbar/Toolbar.svelte.d.ts +3 -26
- package/dist/Toolbar/properties.d.ts +10 -4
- package/dist/Toolbar/properties.js +1 -5
- package/dist/index.d.ts +0 -11
- package/dist/index.js +0 -11
- package/package.json +29 -29
|
@@ -1,39 +1,46 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { ToolbarProperties } from './properties';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
showBackButton = true,
|
|
6
|
+
text,
|
|
7
|
+
backIcon = 'https://sdk.breeze.in/gallery/icons/back.svg',
|
|
8
|
+
leftContent,
|
|
9
|
+
centerContent,
|
|
10
|
+
rightContent,
|
|
11
|
+
additionalContent,
|
|
12
|
+
onbackClick,
|
|
13
|
+
onkeydown
|
|
14
|
+
}: ToolbarProperties = $props();
|
|
8
15
|
</script>
|
|
9
16
|
|
|
10
17
|
<div class="toolbar">
|
|
11
18
|
<div class="content">
|
|
12
|
-
{#if
|
|
13
|
-
|
|
14
|
-
{:else if
|
|
15
|
-
<div class="back"
|
|
16
|
-
<img src={
|
|
19
|
+
{#if leftContent}
|
|
20
|
+
{@render leftContent()}
|
|
21
|
+
{:else if showBackButton && backIcon}
|
|
22
|
+
<div class="back" onclick={onbackClick} {onkeydown} role="button" tabindex="0">
|
|
23
|
+
<img src={backIcon} alt="Back" />
|
|
17
24
|
</div>
|
|
18
25
|
{/if}
|
|
19
|
-
{#if
|
|
26
|
+
{#if centerContent}
|
|
20
27
|
<div class="center-content">
|
|
21
|
-
|
|
28
|
+
{@render centerContent()}
|
|
22
29
|
</div>
|
|
23
|
-
{:else if
|
|
30
|
+
{:else if text}
|
|
24
31
|
<div class="text">
|
|
25
|
-
{
|
|
32
|
+
{text}
|
|
26
33
|
</div>
|
|
27
34
|
{/if}
|
|
28
|
-
{#if
|
|
35
|
+
{#if rightContent}
|
|
29
36
|
<div class="right-content">
|
|
30
|
-
|
|
37
|
+
{@render rightContent()}
|
|
31
38
|
</div>
|
|
32
39
|
{/if}
|
|
33
40
|
</div>
|
|
34
41
|
<div class="additional-content">
|
|
35
|
-
{#if
|
|
36
|
-
|
|
42
|
+
{#if additionalContent}
|
|
43
|
+
{@render additionalContent()}
|
|
37
44
|
{/if}
|
|
38
45
|
</div>
|
|
39
46
|
</div>
|
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import type { ToolbarProperties } from './properties';
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
events: {
|
|
8
|
-
keydown: KeyboardEvent;
|
|
9
|
-
backClick: CustomEvent<any>;
|
|
10
|
-
} & {
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {
|
|
14
|
-
leftContent: {};
|
|
15
|
-
centerContent: {};
|
|
16
|
-
rightContent: {};
|
|
17
|
-
additionalContent: {};
|
|
18
|
-
};
|
|
19
|
-
exports?: {} | undefined;
|
|
20
|
-
bindings?: string | undefined;
|
|
21
|
-
};
|
|
22
|
-
export type ToolbarProps = typeof __propDef.props;
|
|
23
|
-
export type ToolbarEvents = typeof __propDef.events;
|
|
24
|
-
export type ToolbarSlots = typeof __propDef.slots;
|
|
25
|
-
export default class Toolbar extends SvelteComponent<ToolbarProps, ToolbarEvents, ToolbarSlots> {
|
|
26
|
-
}
|
|
27
|
-
export {};
|
|
2
|
+
declare const Toolbar: import("svelte").Component<ToolbarProperties, {}, "">;
|
|
3
|
+
type Toolbar = ReturnType<typeof Toolbar>;
|
|
4
|
+
export default Toolbar;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
1
2
|
export type ToolbarProperties = {
|
|
2
|
-
showBackButton
|
|
3
|
-
text
|
|
4
|
-
backIcon
|
|
3
|
+
showBackButton?: boolean;
|
|
4
|
+
text?: string | null;
|
|
5
|
+
backIcon?: string | null;
|
|
6
|
+
leftContent?: Snippet;
|
|
7
|
+
centerContent?: Snippet;
|
|
8
|
+
rightContent?: Snippet;
|
|
9
|
+
additionalContent?: Snippet;
|
|
10
|
+
onbackClick?: () => void;
|
|
11
|
+
onkeydown?: (event: KeyboardEvent) => void;
|
|
5
12
|
};
|
|
6
|
-
export declare const defaultToolbarProperties: ToolbarProperties;
|
package/dist/index.d.ts
CHANGED
|
@@ -45,15 +45,4 @@ export type { TableProperties } from './Table/properties';
|
|
|
45
45
|
export type { StepperProperties } from './Stepper/properties';
|
|
46
46
|
export type { ToastProperties } from './Toast/properties';
|
|
47
47
|
export type { IconStackProperties } from './IconStack/properties';
|
|
48
|
-
export { defaultIconProperties } from './Icon/properties';
|
|
49
|
-
export { defaultButtonProperties } from './Button/properties';
|
|
50
|
-
export { defaultModalProperties } from './Modal/properties';
|
|
51
|
-
export { defaultInputProperties } from './Input/properties';
|
|
52
|
-
export { defaultInputButtonProperties } from './InputButton/properties';
|
|
53
|
-
export { defaultBrandLoaderProperties } from './BrandLoader/properties';
|
|
54
|
-
export { defaultStatusProperties } from './Status/properties';
|
|
55
|
-
export { defaultListItemProperties } from './ListItem/properties';
|
|
56
|
-
export { defaultToolbarProperties } from './Toolbar/properties';
|
|
57
|
-
export { defaultCarouselProperties } from './Carousel/properties';
|
|
58
|
-
export { defaultToastProperties } from './Toast/properties';
|
|
59
48
|
export { validateInput } from './utils';
|
package/dist/index.js
CHANGED
|
@@ -23,15 +23,4 @@ export { default as Step } from './Stepper/Step.svelte';
|
|
|
23
23
|
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
|
-
export { defaultIconProperties } from './Icon/properties';
|
|
27
|
-
export { defaultButtonProperties } from './Button/properties';
|
|
28
|
-
export { defaultModalProperties } from './Modal/properties';
|
|
29
|
-
export { defaultInputProperties } from './Input/properties';
|
|
30
|
-
export { defaultInputButtonProperties } from './InputButton/properties';
|
|
31
|
-
export { defaultBrandLoaderProperties } from './BrandLoader/properties';
|
|
32
|
-
export { defaultStatusProperties } from './Status/properties';
|
|
33
|
-
export { defaultListItemProperties } from './ListItem/properties';
|
|
34
|
-
export { defaultToolbarProperties } from './Toolbar/properties';
|
|
35
|
-
export { defaultCarouselProperties } from './Carousel/properties';
|
|
36
|
-
export { defaultToastProperties } from './Toast/properties';
|
|
37
26
|
export { validateInput } from './utils';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/svelte-ui-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev --host",
|
|
6
6
|
"build": "vite build && npm run package",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"test": "npm run test:integration && npm run test:unit",
|
|
11
11
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
12
12
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
13
|
-
"lint": "prettier --check
|
|
14
|
-
"format": "prettier --write
|
|
13
|
+
"lint": "prettier --check src && eslint src",
|
|
14
|
+
"format": "prettier --write src",
|
|
15
15
|
"test:integration": "playwright test",
|
|
16
16
|
"test:unit": "vitest"
|
|
17
17
|
},
|
|
@@ -27,37 +27,37 @@
|
|
|
27
27
|
"!dist/**/*.spec.*"
|
|
28
28
|
],
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"svelte": "^
|
|
31
|
-
"type-decoder": "^1.
|
|
30
|
+
"svelte": "^5.41.2",
|
|
31
|
+
"type-decoder": "^2.1.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@commitlint/cli": "^
|
|
35
|
-
"@commitlint/config-conventional": "^
|
|
34
|
+
"@commitlint/cli": "^20.1.0",
|
|
35
|
+
"@commitlint/config-conventional": "^20.0.0",
|
|
36
36
|
"@digitalroute/cz-conventional-changelog-for-jira": "^8.0.1",
|
|
37
|
-
"@playwright/test": "^1.
|
|
38
|
-
"@sveltejs/adapter-auto": "^
|
|
39
|
-
"@sveltejs/kit": "^
|
|
40
|
-
"@sveltejs/package": "^2.
|
|
41
|
-
"@sveltejs/vite-plugin-svelte": "^2.
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
43
|
-
"@typescript-eslint/parser": "^
|
|
44
|
-
"commitizen": "^4.3.
|
|
37
|
+
"@playwright/test": "^1.56.1",
|
|
38
|
+
"@sveltejs/adapter-auto": "^7.0.0",
|
|
39
|
+
"@sveltejs/kit": "^2.47.3",
|
|
40
|
+
"@sveltejs/package": "^2.5.4",
|
|
41
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
|
43
|
+
"@typescript-eslint/parser": "^8.46.2",
|
|
44
|
+
"commitizen": "^4.3.1",
|
|
45
45
|
"commitlint-config-jira": "^1.6.4",
|
|
46
46
|
"commitlint-plugin-jira-rules": "^1.6.4",
|
|
47
|
-
"eslint": "^
|
|
48
|
-
"eslint-config-prettier": "^
|
|
49
|
-
"eslint-plugin-svelte": "^
|
|
50
|
-
"husky": "^
|
|
51
|
-
"prettier": "^3.
|
|
52
|
-
"prettier-plugin-svelte": "^3.
|
|
53
|
-
"publint": "^0.
|
|
54
|
-
"svelte": "^
|
|
55
|
-
"svelte-check": "^3.
|
|
56
|
-
"tslib": "^2.
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
47
|
+
"eslint": "^9.38.0",
|
|
48
|
+
"eslint-config-prettier": "^10.1.8",
|
|
49
|
+
"eslint-plugin-svelte": "^3.12.5",
|
|
50
|
+
"husky": "^9.1.7",
|
|
51
|
+
"prettier": "^3.6.2",
|
|
52
|
+
"prettier-plugin-svelte": "^3.4.0",
|
|
53
|
+
"publint": "^0.3.15",
|
|
54
|
+
"svelte": "^5.41.2",
|
|
55
|
+
"svelte-check": "^4.3.3",
|
|
56
|
+
"tslib": "^2.8.1",
|
|
57
|
+
"type-decoder": "^2.1.0",
|
|
58
|
+
"typescript": "^5.9.3",
|
|
59
|
+
"vite": "^7.1.11",
|
|
60
|
+
"vitest": "^4.0.1"
|
|
61
61
|
},
|
|
62
62
|
"svelte": "./dist/index.js",
|
|
63
63
|
"types": "./dist/index.d.ts",
|