@salesql/sql_components_vue3 3.29.0 → 3.30.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.
@@ -0,0 +1,34 @@
1
+ import { type ComponentPublicInstance } from 'vue';
2
+ export interface OrganizerFieldsSource {
3
+ readonly name: string;
4
+ readonly color: string;
5
+ readonly colors: readonly string[];
6
+ readonly maxNameLength: number;
7
+ /** Edit mode: the baseline the form opened with. Unset = create mode. */
8
+ readonly originalName?: string;
9
+ readonly originalColor?: string;
10
+ readonly errorMissingName: string;
11
+ readonly errorTooLongName: string;
12
+ readonly errorMessage: string;
13
+ }
14
+ export declare function useOrganizerFields(props: OrganizerFieldsSource): {
15
+ touched: import("vue").Ref<boolean, boolean>;
16
+ trimmedName: import("vue").ComputedRef<string>;
17
+ isValid: import("vue").ComputedRef<boolean>;
18
+ isChanged: import("vue").ComputedRef<boolean>;
19
+ canSubmit: import("vue").ComputedRef<boolean>;
20
+ shownError: import("vue").ComputedRef<string>;
21
+ };
22
+ /** Radio-group behaviour of a swatch palette: one tab stop, arrows move and pick, wrapping. */
23
+ export declare function useSwatchRadiogroup(props: {
24
+ readonly colors: readonly string[];
25
+ readonly color: string;
26
+ }, onPick: (color: string) => void): {
27
+ tabStop: import("vue").ComputedRef<number>;
28
+ setSwatchRef: (el: Element | ComponentPublicInstance | null, index: number) => void;
29
+ onSwatchKeydown: (event: KeyboardEvent, index: number) => void;
30
+ };
31
+ /** Contrast ratio of white against a hex colour (1 to 21). Unparseable = 21, so it keeps a white mark. */
32
+ export declare function whiteContrast(hex: string): number;
33
+ /** Whether a white check mark would fall under 3:1 on this swatch, so the mark must be dark. */
34
+ export declare function needsDarkMark(hex: string): boolean;
@@ -6,6 +6,8 @@ export declare const FOCUS: "focus";
6
6
  export type FocusEventName = typeof FOCUS;
7
7
  export declare const BLUR: "blur";
8
8
  export type BlurEventName = typeof BLUR;
9
+ export declare const CLEAR: "clear";
10
+ export type ClearEventName = typeof CLEAR;
9
11
  export declare const CHANGE: "change";
10
12
  export type ChangeEventName = typeof CHANGE;
11
13
  export declare const FIELD_BLUR: "field-blur";
@@ -88,3 +90,11 @@ export declare const MINIMIZE: "minimize";
88
90
  export type MinimizeEventName = typeof MINIMIZE;
89
91
  export declare const UPDATE_SELECTED: "update:selected";
90
92
  export type UpdateSelectedEventName = typeof UPDATE_SELECTED;
93
+ export declare const FAVORITE: "favorite";
94
+ export type FavoriteEventName = typeof FAVORITE;
95
+ export declare const COPY_LINK: "copy-link";
96
+ export type CopyLinkEventName = typeof COPY_LINK;
97
+ export declare const UPDATE_PINNED: "update:pinned";
98
+ export type UpdatePinnedEventName = typeof UPDATE_PINNED;
99
+ export declare const PEEK_CHANGE: "peek-change";
100
+ export type PeekChangeEventName = typeof PEEK_CHANGE;