@oicl/openbridge-webcomponents-svelte 2.0.0-next.39 → 2.0.0-next.40
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/components/icon-button/ObcIconButton.svelte +3 -1
- package/dist/components/icon-button/ObcIconButton.svelte.d.ts +2 -0
- package/dist/components/number-input-field/ObcNumberInputField.svelte +14 -5
- package/dist/components/number-input-field/ObcNumberInputField.svelte.d.ts +14 -2
- package/package.json +2 -2
|
@@ -35,7 +35,9 @@ Use to indicate ongoing actions or loading states.
|
|
|
35
35
|
If undefined, no progress indicator is shown. */
|
|
36
36
|
progress?: number | undefined;
|
|
37
37
|
/** If true, displays a label below the icon using the `label` slot. */
|
|
38
|
-
hasLabel?: boolean
|
|
38
|
+
hasLabel?: boolean;
|
|
39
|
+
/** If false, and cornerLeft or cornerRight is true, the divider is not shown. */
|
|
40
|
+
showDivider?: boolean
|
|
39
41
|
}
|
|
40
42
|
export interface Events {
|
|
41
43
|
|
|
@@ -31,6 +31,8 @@ If undefined, no progress indicator is shown. */
|
|
|
31
31
|
progress?: number | undefined;
|
|
32
32
|
/** If true, displays a label below the icon using the `label` slot. */
|
|
33
33
|
hasLabel?: boolean;
|
|
34
|
+
/** If false, and cornerLeft or cornerRight is true, the divider is not shown. */
|
|
35
|
+
showDivider?: boolean;
|
|
34
36
|
}
|
|
35
37
|
export interface Events {
|
|
36
38
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
export interface Props {
|
|
10
10
|
class?: string;
|
|
11
11
|
style?: string;
|
|
12
|
-
value?:
|
|
12
|
+
value?: number;
|
|
13
13
|
unit?: string;
|
|
14
14
|
placeholder?: string;
|
|
15
15
|
textAlign?: ObcNumberInputFieldTextAlign;
|
|
@@ -40,24 +40,33 @@ minlength?: number | undefined;
|
|
|
40
40
|
hasHelperIcon?: boolean;
|
|
41
41
|
helperPlacement?: ObcNumberInputFieldPlacement;
|
|
42
42
|
/** Internal property for squared corners, used when input is used in stepper-box */
|
|
43
|
-
squared?: boolean
|
|
43
|
+
squared?: boolean;
|
|
44
|
+
/** Optional display text override for controlled consumers (e.g. keyboard-numeric)
|
|
45
|
+
that manage formatted strings while the committed value may be NaN. */
|
|
46
|
+
displayOverride?: string;
|
|
47
|
+
decimalSeparator?: string | undefined;
|
|
48
|
+
groupSeparator?: string | undefined;
|
|
49
|
+
minFractionDigits?: number;
|
|
50
|
+
maxFractionDigits?: number | undefined
|
|
44
51
|
}
|
|
45
52
|
export interface Events {
|
|
46
|
-
onInput?: (event: CustomEvent<
|
|
53
|
+
onInput?: (event: CustomEvent<{value: number}>) => void;
|
|
54
|
+
onChange?: (event: CustomEvent<{value: number}>) => void
|
|
47
55
|
}
|
|
48
56
|
export interface Slots {
|
|
49
57
|
leadingIcon?: Snippet;
|
|
50
58
|
labelIcon?: Snippet;
|
|
51
59
|
helperIcon?: Snippet
|
|
52
60
|
}
|
|
53
|
-
const {onInput, class: className, style, leadingIcon, labelIcon, helperIcon, ...props} = $props<Props & Events & Slots>();
|
|
61
|
+
const {onInput, onChange, class: className, style, leadingIcon, labelIcon, helperIcon, ...props} = $props<Props & Events & Slots>();
|
|
54
62
|
|
|
55
63
|
</script>
|
|
56
64
|
<obc-number-input-field
|
|
57
65
|
use:setProperties={props}
|
|
58
66
|
class={className}
|
|
59
67
|
style={style}
|
|
60
|
-
oninput={onInput}
|
|
68
|
+
oninput={onInput}
|
|
69
|
+
onchange={onChange} >
|
|
61
70
|
|
|
62
71
|
{#if leadingIcon}
|
|
63
72
|
<div slot="leading-icon">
|
|
@@ -4,7 +4,7 @@ import type { Snippet } from 'svelte';
|
|
|
4
4
|
export interface Props {
|
|
5
5
|
class?: string;
|
|
6
6
|
style?: string;
|
|
7
|
-
value?:
|
|
7
|
+
value?: number;
|
|
8
8
|
unit?: string;
|
|
9
9
|
placeholder?: string;
|
|
10
10
|
textAlign?: ObcNumberInputFieldTextAlign;
|
|
@@ -36,9 +36,21 @@ This is useful to avoid React re-rendering to reset the value. */
|
|
|
36
36
|
helperPlacement?: ObcNumberInputFieldPlacement;
|
|
37
37
|
/** Internal property for squared corners, used when input is used in stepper-box */
|
|
38
38
|
squared?: boolean;
|
|
39
|
+
/** Optional display text override for controlled consumers (e.g. keyboard-numeric)
|
|
40
|
+
that manage formatted strings while the committed value may be NaN. */
|
|
41
|
+
displayOverride?: string;
|
|
42
|
+
decimalSeparator?: string | undefined;
|
|
43
|
+
groupSeparator?: string | undefined;
|
|
44
|
+
minFractionDigits?: number;
|
|
45
|
+
maxFractionDigits?: number | undefined;
|
|
39
46
|
}
|
|
40
47
|
export interface Events {
|
|
41
|
-
onInput?: (event: CustomEvent<
|
|
48
|
+
onInput?: (event: CustomEvent<{
|
|
49
|
+
value: number;
|
|
50
|
+
}>) => void;
|
|
51
|
+
onChange?: (event: CustomEvent<{
|
|
52
|
+
value: number;
|
|
53
|
+
}>) => void;
|
|
42
54
|
}
|
|
43
55
|
export interface Slots {
|
|
44
56
|
leadingIcon?: Snippet;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oicl/openbridge-webcomponents-svelte",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.40",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build && npm run prepack",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@oicl/openbridge-webcomponents": "^2.0.0-next.
|
|
34
|
+
"@oicl/openbridge-webcomponents": "^2.0.0-next.39"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"svelte": "^5.0.0"
|