@sabrenski/spire-ui-vue 0.3.7 → 0.3.8

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.
@@ -1,4 +1,4 @@
1
- import { SwitchProps, SwitchSize, SwitchColor } from './types';
1
+ import { SwitchProps, SwitchSize, SwitchColor, SwitchLabelPlacement, SwitchJustify } from './types';
2
2
  declare function focus(): void;
3
3
  declare function __VLS_template(): {
4
4
  attrs: Partial<{}>;
@@ -38,6 +38,8 @@ declare const __VLS_component: import('vue').DefineComponent<SwitchProps, {
38
38
  invalid: boolean;
39
39
  loading: boolean;
40
40
  readonly: boolean;
41
+ justify: SwitchJustify;
42
+ labelPlacement: SwitchLabelPlacement;
41
43
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
42
44
  inputRef: HTMLInputElement;
43
45
  }, HTMLDivElement>;
@@ -16,6 +16,8 @@ declare const __VLS_component: import('vue').DefineComponent<SwitchGroupProps, {
16
16
  orientation: "vertical" | "horizontal";
17
17
  invalid: boolean;
18
18
  readonly: boolean;
19
+ justify: import('./types').SwitchJustify;
20
+ labelPlacement: import('./types').SwitchLabelPlacement;
19
21
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
20
22
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
23
  export default _default;
@@ -1,6 +1,8 @@
1
1
  import { InjectionKey, Ref } from 'vue';
2
2
  export type SwitchSize = 'sm' | 'md' | 'lg';
3
3
  export type SwitchColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
4
+ export type SwitchLabelPlacement = 'start' | 'end';
5
+ export type SwitchJustify = 'start' | 'between';
4
6
  export interface SwitchProps {
5
7
  /** Bound value for v-model */
6
8
  modelValue?: boolean;
@@ -30,6 +32,10 @@ export interface SwitchProps {
30
32
  loading?: boolean;
31
33
  /** Disable all animations */
32
34
  disableAnimation?: boolean;
35
+ /** Position of the label relative to the switch track */
36
+ labelPlacement?: SwitchLabelPlacement;
37
+ /** Justify content of the switch and label */
38
+ justify?: SwitchJustify;
33
39
  /** Custom class names for sub-elements */
34
40
  classNames?: Partial<Record<'base' | 'wrapper' | 'track' | 'thumb' | 'label' | 'description', string>>;
35
41
  }
@@ -56,6 +62,10 @@ export interface SwitchGroupProps {
56
62
  readonly?: boolean;
57
63
  /** Disable animations for all switches */
58
64
  disableAnimation?: boolean;
65
+ /** Position of the label relative to the switch track for all switches */
66
+ labelPlacement?: SwitchLabelPlacement;
67
+ /** Justify content for all switches */
68
+ justify?: SwitchJustify;
59
69
  /** Custom class names */
60
70
  classNames?: Partial<Record<'base' | 'wrapper' | 'label', string>>;
61
71
  }
@@ -67,5 +77,7 @@ export interface SwitchGroupContext {
67
77
  readonly: Ref<boolean>;
68
78
  invalid: Ref<boolean>;
69
79
  disableAnimation: Ref<boolean>;
80
+ labelPlacement: Ref<SwitchLabelPlacement>;
81
+ justify: Ref<SwitchJustify>;
70
82
  }
71
83
  export declare const SWITCH_GROUP_KEY: InjectionKey<SwitchGroupContext>;