@oicl/openbridge-webcomponents-svelte 2.0.0-next.66 → 2.0.0-next.67

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.
@@ -22,6 +22,11 @@ value?: string | undefined;
22
22
  disabled?: boolean;
23
23
  /** If true, the select expands to fill the width of its container. Default is false. */
24
24
  fullWidth?: boolean;
25
+ /** If true, a `value` that does not match any option leaves the button with no option selected,
26
+ showing `placeholder` instead of defaulting to the first option. Default is false. */
27
+ allowEmptySelection?: boolean;
28
+ /** Text shown when nothing is selected and `allowEmptySelection` is true. Default is an empty string. */
29
+ placeholder?: string;
25
30
  /** Controls the button's display type.
26
31
  - `label`: Text label only (default)
27
32
  - `icon`: Icon only, no label
@@ -17,6 +17,11 @@ Example:
17
17
  disabled?: boolean;
18
18
  /** If true, the select expands to fill the width of its container. Default is false. */
19
19
  fullWidth?: boolean;
20
+ /** If true, a `value` that does not match any option leaves the button with no option selected,
21
+ showing `placeholder` instead of defaulting to the first option. Default is false. */
22
+ allowEmptySelection?: boolean;
23
+ /** Text shown when nothing is selected and `allowEmptySelection` is true. Default is an empty string. */
24
+ placeholder?: string;
20
25
  /** Controls the button's display type.
21
26
  - `label`: Text label only (default)
22
27
  - `icon`: Icon only, no label
@@ -47,7 +47,12 @@ displayOverride?: string;
47
47
  decimalSeparator?: string | undefined;
48
48
  groupSeparator?: string | undefined;
49
49
  minFractionDigits?: number;
50
- maxFractionDigits?: number | undefined
50
+ maxFractionDigits?: number | undefined;
51
+ /** Optional regex pattern. When set, any keystroke or paste whose resulting
52
+ value does not match this pattern is blocked at the `beforeinput` stage.
53
+ When unset, a permissive numeric filter (digits, sign, active separators,
54
+ whitespace) is applied instead. */
55
+ validationPattern?: string
51
56
  }
52
57
  export interface Events {
53
58
  onInput?: (event: CustomEvent<{value: number}>) => void;
@@ -43,6 +43,11 @@ that manage formatted strings while the committed value may be NaN. */
43
43
  groupSeparator?: string | undefined;
44
44
  minFractionDigits?: number;
45
45
  maxFractionDigits?: number | undefined;
46
+ /** Optional regex pattern. When set, any keystroke or paste whose resulting
47
+ value does not match this pattern is blocked at the `beforeinput` stage.
48
+ When unset, a permissive numeric filter (digits, sign, active separators,
49
+ whitespace) is applied instead. */
50
+ validationPattern?: string;
46
51
  }
47
52
  export interface Events {
48
53
  onInput?: (event: CustomEvent<{
@@ -29,7 +29,7 @@ max?: number | undefined;
29
29
  stepUp?: number;
30
30
  /** Decrement step size (default 1). */
31
31
  stepDown?: number;
32
- /** Unit text displayed inside the field. Overridden by the `unit` slot if assigned. */
32
+ /** Unit text displayed inside the field. */
33
33
  unit?: string;
34
34
  /** Helper text displayed below the stepper. When set, the helper text is shown. */
35
35
  helperText?: string;
@@ -45,9 +45,9 @@ readonly?: boolean
45
45
  onChange?: (event: CustomEvent<{value: number | null}>) => void
46
46
  }
47
47
  export interface Slots {
48
- unitSnippet?: Snippet
48
+ children?: Snippet
49
49
  }
50
- const {onDown, onUp, onInput, onChange, class: className, style, unitSnippet, ...props} = $props<Props & Events & Slots>();
50
+ const {onDown, onUp, onInput, onChange, class: className, style, children, ...props} = $props<Props & Events & Slots>();
51
51
 
52
52
  </script>
53
53
  <obc-stepper-box
@@ -59,9 +59,7 @@ readonly?: boolean
59
59
  oninput={onInput}
60
60
  onchange={onChange} >
61
61
 
62
- {#if unitSnippet}
63
- <div slot="unit">
64
- {@render unitSnippet()}
65
- </div>
66
- {/if}
62
+ {#if children}
63
+ {@render children()}
64
+ {/if}
67
65
  </obc-stepper-box>
@@ -24,7 +24,7 @@ Pass `null` to clear the value and show the `placeholder` instead. */
24
24
  stepUp?: number;
25
25
  /** Decrement step size (default 1). */
26
26
  stepDown?: number;
27
- /** Unit text displayed inside the field. Overridden by the `unit` slot if assigned. */
27
+ /** Unit text displayed inside the field. */
28
28
  unit?: string;
29
29
  /** Helper text displayed below the stepper. When set, the helper text is shown. */
30
30
  helperText?: string;
@@ -48,7 +48,7 @@ export interface Events {
48
48
  }>) => void;
49
49
  }
50
50
  export interface Slots {
51
- unitSnippet?: Snippet;
51
+ children?: Snippet;
52
52
  }
53
53
  type $$ComponentProps = Props & Events & Slots;
54
54
  declare const ObcStepperBox: import("svelte").Component<$$ComponentProps, {
@@ -47,6 +47,14 @@ When true, the group will not update its selection when the `value` property cha
47
47
 
48
48
  Defaults to false. */
49
49
  externalControl?: boolean;
50
+ /** If true, a `value` that does not match any enabled option leaves the group with no option selected
51
+ instead of defaulting to the first enabled option.
52
+
53
+ This also applies when the currently selected option becomes disabled: the group clears its selection
54
+ rather than falling back to another option.
55
+
56
+ Defaults to false (the first enabled option is selected when the value does not match). */
57
+ allowEmptySelection?: boolean;
50
58
  /** Disables the entire toggle button group and all contained options when true.
51
59
 
52
60
  When disabled, no option can be selected or interacted with. */
@@ -42,6 +42,14 @@ When true, the group will not update its selection when the `value` property cha
42
42
 
43
43
  Defaults to false. */
44
44
  externalControl?: boolean;
45
+ /** If true, a `value` that does not match any enabled option leaves the group with no option selected
46
+ instead of defaulting to the first enabled option.
47
+
48
+ This also applies when the currently selected option becomes disabled: the group clears its selection
49
+ rather than falling back to another option.
50
+
51
+ Defaults to false (the first enabled option is selected when the value does not match). */
52
+ allowEmptySelection?: boolean;
45
53
  /** Disables the entire toggle button group and all contained options when true.
46
54
 
47
55
  When disabled, no option can be selected or interacted with. */
@@ -14,7 +14,8 @@
14
14
  status?: string;
15
15
  readouts?: IntegrationFleetButtonReadout[];
16
16
  alertTopic?: string;
17
- alerts?: { alarm: number; warning: number; caution: number; }
17
+ alerts?: { alarm: number; warning: number; caution: number; };
18
+ showAlerts?: boolean
18
19
  }
19
20
  export interface Events {
20
21
 
@@ -14,6 +14,7 @@ export interface Props {
14
14
  warning: number;
15
15
  caution: number;
16
16
  };
17
+ showAlerts?: boolean;
17
18
  }
18
19
  export interface Events {
19
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents-svelte",
3
- "version": "2.0.0-next.66",
3
+ "version": "2.0.0-next.67",
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.65"
34
+ "@oicl/openbridge-webcomponents": "^2.0.0-next.66"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "svelte": "^5.0.0"