@phila/phila-ui-core 1.0.9 → 1.0.11

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/types.d.ts DELETED
@@ -1,89 +0,0 @@
1
- import { ComponentInternalInstance, ComputedRef, App, Ref, SetupContext } from 'vue';
2
- import { RandomID } from './src/inputs/helperFns.ts';
3
-
4
- export interface ResponsiveState {
5
- isMobile: boolean;
6
- isTablet: boolean;
7
- isDesktop: boolean;
8
- isWideScreen: boolean;
9
- headerOffsetHeight?: number;
10
- footerOffsetHeight?: number;
11
- }
12
- export interface ResponsiveHelpers {
13
- responsiveState: ResponsiveState;
14
- updateResponsiveState: (window: Window) => void;
15
- }
16
- export type HTMLInputValue = string | number;
17
- export type InputOptions = Record<string, HTMLInputValue>;
18
- export type InputOptionsGroup = Record<string, string[]>;
19
- export type Mask = string | number | Date | RegExp | Record<"mask", string | number | Date | RegExp>;
20
- export interface MaskProps {
21
- mask: Mask | Mask[];
22
- lazy?: boolean;
23
- }
24
- export type InputErrors = string | string[] | Record<string, string[]>;
25
- export interface InputProps {
26
- id: string;
27
- errors: InputErrors;
28
- optgroup?: boolean;
29
- options?: HTMLInputValue[] | InputOptions | InputOptions[] | InputOptionsGroup;
30
- textKey?: string;
31
- valueKey?: string;
32
- imaskProps?: MaskProps;
33
- }
34
- export type OptionValue = HTMLInputValue | InputOptions;
35
- export interface UseInputComposable {
36
- (instance: ComponentInternalInstance | null, props: InputProps): {
37
- error: ComputedRef<InputErrors>;
38
- hasError: () => void;
39
- classes: ComputedRef<string | string[]>;
40
- optionText: (option: OptionValue) => HTMLInputValue;
41
- optionValue: (option: OptionValue, key: string) => HTMLInputValue;
42
- };
43
- }
44
- export interface TextboxProps {
45
- label?: string;
46
- desc?: string;
47
- placeholder: string;
48
- type?: string;
49
- modelValue: string | number;
50
- icon?: string;
51
- isLoading?: boolean;
52
- innerLabel?: boolean;
53
- }
54
- export interface UseTextboxComposable {
55
- (emit: SetupContext["emit"], props: TextboxProps): {
56
- inputModifierClasses: ComputedRef<string>;
57
- defaultPlaceholder: ComputedRef<string>;
58
- onInput: (e: Event) => void;
59
- };
60
- }
61
- export interface UseMaskedInputComposable {
62
- (instance: ComponentInternalInstance | null, emit: SetupContext["emit"]): {
63
- mask: MaskProps;
64
- localValue: Ref<HTMLInputValue>;
65
- acceptEvent: (e: InputEvent) => void;
66
- completeEvent: (e: InputEvent) => void;
67
- onFocus: () => void;
68
- onBlur: (e: FocusEvent) => void;
69
- };
70
- }
71
- export type UseTextbox = {
72
- useTextboxComposable: UseTextboxComposable;
73
- };
74
- export type UseInput = {
75
- useInputComposable: UseInputComposable;
76
- };
77
- export type UseMaskInput = {
78
- useMaskedInputComposable: UseMaskedInputComposable;
79
- };
80
- export type FormHelpersInterface = {
81
- randomID: RandomID;
82
- useTextbox: UseTextbox;
83
- useInput: UseInput;
84
- useMaskedInput: UseMaskInput;
85
- };
86
- export type PhilaUICoreInterface = {
87
- formHelpers: FormHelpersInterface;
88
- install: (app: App) => void;
89
- };