@juspay/svelte-ui-components 4.17.0 → 4.19.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/Card/properties.d.ts +54 -4
- package/dist/MediaPlayer/MediaPlayer.svelte.d.ts +1 -1
- package/dist/Pill/properties.d.ts +62 -4
- package/dist/Select/Select.svelte +311 -134
- package/dist/Select/properties.d.ts +18 -0
- package/dist/types.d.ts +34 -0
- package/dist-wc/index.js +1558 -1489
- package/package.json +1 -1
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { AttrsEscapeHatch, LegacyAttrs } from '../types';
|
|
2
3
|
export type CardProperties = OptionalCardProperties;
|
|
4
|
+
/**
|
|
5
|
+
* The attributes Card writes on its own root, named so each carries the prop to
|
|
6
|
+
* use instead. Card spreads `attrs` first and these after, so an entry for one
|
|
7
|
+
* of these keys has never reached the DOM — declaring them optional and
|
|
8
|
+
* `string`-valued keeps that code compiling, and the `@deprecated` tag is what
|
|
9
|
+
* makes the discard visible at the point it is written.
|
|
10
|
+
*/
|
|
11
|
+
type CardManagedAttrs = {
|
|
12
|
+
/** @deprecated Card writes its own `class`. Use `classes`; this entry is discarded. */
|
|
13
|
+
class?: string;
|
|
14
|
+
/** @deprecated Card writes its own `style`. Use `cssVars`; this entry is discarded. */
|
|
15
|
+
style?: string;
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Card derives `role` from `onclick`/`href` and writes it (or removes
|
|
18
|
+
* it) itself. There is no prop for it; this entry is discarded.
|
|
19
|
+
*/
|
|
20
|
+
role?: string;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Card derives `tabindex` from `onclick`/`href` and writes it (or
|
|
23
|
+
* removes it) itself. There is no prop for it; this entry is discarded.
|
|
24
|
+
*/
|
|
25
|
+
tabindex?: string;
|
|
26
|
+
/** @deprecated Card writes its own `href`. Use `href`; this entry is discarded. */
|
|
27
|
+
href?: string;
|
|
28
|
+
/** @deprecated Card writes its own `target`. Use `target`; this entry is discarded. */
|
|
29
|
+
target?: string;
|
|
30
|
+
/** @deprecated Card writes its own `rel`. Use `rel`; this entry is discarded. */
|
|
31
|
+
rel?: string;
|
|
32
|
+
/** @deprecated Card writes its own `onclick`. Use `onclick`; this entry is discarded. */
|
|
33
|
+
onclick?: string;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Card binds its own `onkeydown` on an interactive card, to make
|
|
36
|
+
* Enter and Space activate it. There is no prop for it; this entry is discarded.
|
|
37
|
+
*/
|
|
38
|
+
onkeydown?: string;
|
|
39
|
+
/** @deprecated Card writes its own `data-pw`. Use `testId`; this entry is discarded. */
|
|
40
|
+
'data-pw'?: string;
|
|
41
|
+
/** @deprecated Card writes its own `testID`. Use `testId`; this entry is discarded. */
|
|
42
|
+
testID?: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* `attrs` with Card's managed attributes rejected instead of deprecated — the
|
|
46
|
+
* shape the prop takes in the next major (#576). Annotate an object with it to
|
|
47
|
+
* get the compile error today.
|
|
48
|
+
*/
|
|
49
|
+
export type CardStrictAttrs = AttrsEscapeHatch<Extract<keyof CardManagedAttrs, string>>;
|
|
3
50
|
export type MandatoryCardProperties = Record<string, never>;
|
|
4
51
|
export type OptionalCardProperties = {
|
|
5
52
|
/**
|
|
@@ -90,11 +137,13 @@ export type OptionalCardProperties = {
|
|
|
90
137
|
* second `classes` modifier for the same state. Applied before Card's own
|
|
91
138
|
* `class`/`style`/`data-pw`/`testID`/`role`/`tabindex`/`href`/`target`/`rel`/
|
|
92
139
|
* `onclick`/`onkeydown` attributes, so an entry here can never override one
|
|
93
|
-
* of those
|
|
94
|
-
*
|
|
95
|
-
*
|
|
140
|
+
* of those. Those keys are deprecated rather than rejected, so code that
|
|
141
|
+
* passes one keeps compiling exactly as before while saying, where it is
|
|
142
|
+
* written, that it has no effect. `CardStrictAttrs` rejects them outright
|
|
143
|
+
* for consumers who want that today. Omitted by default, so existing
|
|
144
|
+
* consumers render exactly the same attributes as before.
|
|
96
145
|
*/
|
|
97
|
-
attrs?:
|
|
146
|
+
attrs?: LegacyAttrs<CardManagedAttrs>;
|
|
98
147
|
/**
|
|
99
148
|
* Overrides the tag `svelte:element` renders for the card root — e.g.
|
|
100
149
|
* `'figure'` for a card whose root needs real `<figure>` sectioning-content
|
|
@@ -123,3 +172,4 @@ export type OptionalCardProperties = {
|
|
|
123
172
|
*/
|
|
124
173
|
as?: 'div' | 'a' | 'figure';
|
|
125
174
|
};
|
|
175
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { MediaPlayerProperties } from './properties';
|
|
2
|
-
declare const MediaPlayer: import("svelte").Component<MediaPlayerProperties, {}, "
|
|
2
|
+
declare const MediaPlayer: import("svelte").Component<MediaPlayerProperties, {}, "muted" | "duration" | "playing" | "currentTime">;
|
|
3
3
|
type MediaPlayer = ReturnType<typeof MediaPlayer>;
|
|
4
4
|
export default MediaPlayer;
|
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { AttrsEscapeHatch, LegacyAttrs } from '../types';
|
|
2
3
|
export type PillProperties = MandatoryPillProperties & OptionalPillProperties & PillEventProperties;
|
|
4
|
+
/**
|
|
5
|
+
* The attributes Pill writes on its own root, named so each carries the prop to
|
|
6
|
+
* use instead. Pill spreads `attrs` first and these after, so an entry for one
|
|
7
|
+
* of these keys has never reached the DOM — declaring them optional and
|
|
8
|
+
* `string`-valued keeps that code compiling, and the `@deprecated` tag is what
|
|
9
|
+
* makes the discard visible at the point it is written.
|
|
10
|
+
*/
|
|
11
|
+
type PillManagedAttrs = {
|
|
12
|
+
/** @deprecated Pill writes its own `class`. Use `classes`; this entry is discarded. */
|
|
13
|
+
class?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Pill always supplies `type="button"` on a `<button>` root, so a
|
|
16
|
+
* pill never submits a form by accident. There is no prop for it; this entry
|
|
17
|
+
* is discarded.
|
|
18
|
+
*/
|
|
19
|
+
type?: string;
|
|
20
|
+
/** @deprecated Pill writes its own `data-pw`. Use `testId`; this entry is discarded. */
|
|
21
|
+
'data-pw'?: string;
|
|
22
|
+
/** @deprecated Pill writes its own `testID`. Use `testId`; this entry is discarded. */
|
|
23
|
+
testID?: string;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Pill derives `role` from whether it is interactive on a
|
|
26
|
+
* non-button root. There is no prop for it; this entry is discarded.
|
|
27
|
+
*/
|
|
28
|
+
role?: string;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Pill derives `tabindex` from whether it is interactive on a
|
|
31
|
+
* non-button root. There is no prop for it; this entry is discarded.
|
|
32
|
+
*/
|
|
33
|
+
tabindex?: string;
|
|
34
|
+
/** @deprecated Pill writes its own `title`. Use `title`; this entry is discarded. */
|
|
35
|
+
title?: string;
|
|
36
|
+
/** @deprecated Pill derives `aria-disabled` from `disabled`; this entry is discarded. */
|
|
37
|
+
'aria-disabled'?: string;
|
|
38
|
+
/** @deprecated Pill derives `aria-expanded` from `ariaExpanded`; this entry is discarded. */
|
|
39
|
+
'aria-expanded'?: string;
|
|
40
|
+
/** @deprecated Pill derives `aria-pressed` from `ariaPressed`; this entry is discarded. */
|
|
41
|
+
'aria-pressed'?: string;
|
|
42
|
+
/** @deprecated Pill writes its own `onclick`. Use `onclick`; this entry is discarded. */
|
|
43
|
+
onclick?: string;
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated Pill binds its own `onkeydown` on an interactive non-button
|
|
46
|
+
* root, to make Enter and Space activate it. There is no prop for it; this
|
|
47
|
+
* entry is discarded.
|
|
48
|
+
*/
|
|
49
|
+
onkeydown?: string;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* `attrs` with Pill's managed attributes rejected instead of deprecated — the
|
|
53
|
+
* shape the prop takes in the next major (#576). Annotate an object with it to
|
|
54
|
+
* get the compile error today.
|
|
55
|
+
*/
|
|
56
|
+
export type PillStrictAttrs = AttrsEscapeHatch<Extract<keyof PillManagedAttrs, string>>;
|
|
3
57
|
export type MandatoryPillProperties = {
|
|
4
58
|
text: string;
|
|
5
59
|
};
|
|
@@ -77,13 +131,17 @@ export type OptionalPillProperties = {
|
|
|
77
131
|
* just to hold the attribute, or adding a second `classes` modifier for the
|
|
78
132
|
* same state. Applied before Pill's own `class`/`onclick`/`onkeydown`/
|
|
79
133
|
* `role`/`tabindex`/`aria-disabled`/`data-pw`/`title`/`testID` attributes, so
|
|
80
|
-
* an entry here can never override one of those
|
|
81
|
-
*
|
|
82
|
-
*
|
|
134
|
+
* an entry here can never override one of those. Those keys are deprecated
|
|
135
|
+
* rather than rejected, so code that passes one keeps compiling exactly as
|
|
136
|
+
* before while saying, where it is written, that it has no effect.
|
|
137
|
+
* `PillStrictAttrs` rejects them outright for consumers who want that today.
|
|
138
|
+
* Omitted by default, so existing consumers render exactly the same
|
|
139
|
+
* attributes as before.
|
|
83
140
|
*/
|
|
84
|
-
attrs?:
|
|
141
|
+
attrs?: LegacyAttrs<PillManagedAttrs>;
|
|
85
142
|
};
|
|
86
143
|
export type PillEventProperties = {
|
|
87
144
|
onclick?: (event: MouseEvent) => void;
|
|
88
145
|
ondismiss?: () => void;
|
|
89
146
|
};
|
|
147
|
+
export {};
|