@dskripchenko/ui 0.1.0 → 0.2.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,36 @@
1
+ export interface UidCodeProps {
2
+ code?: string;
3
+ language?: string;
4
+ inline?: boolean;
5
+ lineNumbers?: boolean;
6
+ copy?: boolean;
7
+ wrap?: boolean;
8
+ maxHeight?: string;
9
+ }
10
+ declare function __VLS_template(): {
11
+ attrs: Partial<{}>;
12
+ slots: Readonly<{
13
+ default?(): unknown;
14
+ }> & {
15
+ default?(): unknown;
16
+ };
17
+ refs: {};
18
+ rootEl: any;
19
+ };
20
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
21
+ declare const __VLS_component: import('vue').DefineComponent<UidCodeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UidCodeProps> & Readonly<{}>, {
22
+ code: string;
23
+ inline: boolean;
24
+ copy: boolean;
25
+ language: string;
26
+ lineNumbers: boolean;
27
+ wrap: boolean;
28
+ maxHeight: string;
29
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
30
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
31
+ export default _default;
32
+ type __VLS_WithTemplateSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
@@ -0,0 +1,2 @@
1
+ export { default as UidCode } from './UidCode.vue';
2
+ export type { UidCodeProps } from './UidCode.vue';
@@ -0,0 +1,49 @@
1
+ import { Size } from '../../types/index.js';
2
+ export interface ComboboxOption {
3
+ value: string | number;
4
+ label: string;
5
+ hint?: string;
6
+ disabled?: boolean;
7
+ }
8
+ export interface UidComboboxProps {
9
+ options: ComboboxOption[];
10
+ placeholder?: string;
11
+ disabled?: boolean;
12
+ clearable?: boolean;
13
+ allowCreate?: boolean;
14
+ filter?: (option: ComboboxOption, query: string) => boolean;
15
+ size?: Size;
16
+ label?: string;
17
+ hint?: string;
18
+ error?: string;
19
+ required?: boolean;
20
+ emptyText?: string;
21
+ id?: string;
22
+ }
23
+ type __VLS_Props = UidComboboxProps;
24
+ type __VLS_PublicProps = {
25
+ modelValue?: string | number | null;
26
+ } & __VLS_Props;
27
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
28
+ "update:modelValue": (value: string | number | null) => any;
29
+ change: (value: string | number | null) => any;
30
+ create: (value: string) => any;
31
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
32
+ "onUpdate:modelValue"?: ((value: string | number | null) => any) | undefined;
33
+ onChange?: ((value: string | number | null) => any) | undefined;
34
+ onCreate?: ((value: string) => any) | undefined;
35
+ }>, {
36
+ size: Size;
37
+ filter: (option: ComboboxOption, query: string) => boolean;
38
+ required: boolean;
39
+ disabled: boolean;
40
+ placeholder: string;
41
+ emptyText: string;
42
+ clearable: boolean;
43
+ allowCreate: boolean;
44
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
45
+ containerRef: HTMLDivElement;
46
+ inputRef: HTMLInputElement;
47
+ listRef: HTMLDivElement;
48
+ }, HTMLDivElement>;
49
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as UidCombobox } from './UidCombobox.vue';
2
+ export type { UidComboboxProps, ComboboxOption } from './UidCombobox.vue';
@@ -0,0 +1,34 @@
1
+ export interface DateRange {
2
+ start: string | null;
3
+ end: string | null;
4
+ }
5
+ export interface UidDateRangePickerProps {
6
+ min?: string;
7
+ max?: string;
8
+ disabled?: boolean;
9
+ clearable?: boolean;
10
+ placeholder?: string;
11
+ format?: (date: Date) => string;
12
+ }
13
+ type __VLS_Props = UidDateRangePickerProps;
14
+ type __VLS_PublicProps = {
15
+ modelValue?: DateRange;
16
+ } & __VLS_Props;
17
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ "update:modelValue": (value: DateRange) => any;
19
+ change: (value: DateRange) => any;
20
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
21
+ "onUpdate:modelValue"?: ((value: DateRange) => any) | undefined;
22
+ onChange?: ((value: DateRange) => any) | undefined;
23
+ }>, {
24
+ disabled: boolean;
25
+ min: string;
26
+ max: string;
27
+ placeholder: string;
28
+ format: (date: Date) => string;
29
+ clearable: boolean;
30
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
31
+ containerRef: HTMLDivElement;
32
+ triggerRef: HTMLDivElement;
33
+ }, HTMLDivElement>;
34
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as UidDateRangePicker } from './UidDateRangePicker.vue';
2
+ export type { UidDateRangePickerProps, DateRange } from './UidDateRangePicker.vue';
@@ -0,0 +1,46 @@
1
+ export interface UploadedFile {
2
+ file: File;
3
+ id: string;
4
+ progress?: number;
5
+ error?: string;
6
+ }
7
+ export interface UidFileUploadProps {
8
+ multiple?: boolean;
9
+ accept?: string;
10
+ maxSize?: number;
11
+ maxFiles?: number;
12
+ disabled?: boolean;
13
+ label?: string;
14
+ hint?: string;
15
+ error?: string;
16
+ required?: boolean;
17
+ primaryText?: string;
18
+ secondaryText?: string;
19
+ }
20
+ type __VLS_Props = UidFileUploadProps;
21
+ type __VLS_PublicProps = {
22
+ modelValue?: UploadedFile[];
23
+ } & __VLS_Props;
24
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
25
+ add: (files: File[]) => any;
26
+ "update:modelValue": (value: UploadedFile[]) => any;
27
+ remove: (file: File) => any;
28
+ reject: (file: File, reason: string) => any;
29
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
30
+ onAdd?: ((files: File[]) => any) | undefined;
31
+ "onUpdate:modelValue"?: ((value: UploadedFile[]) => any) | undefined;
32
+ onRemove?: ((file: File) => any) | undefined;
33
+ onReject?: ((file: File, reason: string) => any) | undefined;
34
+ }>, {
35
+ required: boolean;
36
+ disabled: boolean;
37
+ multiple: boolean;
38
+ accept: string;
39
+ maxSize: number;
40
+ maxFiles: number;
41
+ primaryText: string;
42
+ secondaryText: string;
43
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
44
+ inputRef: HTMLInputElement;
45
+ }, HTMLDivElement>;
46
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as UidFileUpload } from './UidFileUpload.vue';
2
+ export type { UidFileUploadProps, UploadedFile } from './UidFileUpload.vue';
@@ -0,0 +1,46 @@
1
+ import { Size } from '../../types/index.js';
2
+ export interface UidNumberInputProps {
3
+ min?: number;
4
+ max?: number;
5
+ step?: number;
6
+ precision?: number;
7
+ disabled?: boolean;
8
+ readonly?: boolean;
9
+ size?: Size;
10
+ label?: string;
11
+ hint?: string;
12
+ error?: string;
13
+ required?: boolean;
14
+ placeholder?: string;
15
+ name?: string;
16
+ id?: string;
17
+ controls?: boolean;
18
+ centered?: boolean;
19
+ }
20
+ type __VLS_Props = UidNumberInputProps;
21
+ type __VLS_PublicProps = {
22
+ modelValue?: number | null;
23
+ } & __VLS_Props;
24
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
25
+ blur: (event: FocusEvent) => any;
26
+ focus: (event: FocusEvent) => any;
27
+ "update:modelValue": (value: number | null) => any;
28
+ change: (value: number | null) => any;
29
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
30
+ onBlur?: ((event: FocusEvent) => any) | undefined;
31
+ onFocus?: ((event: FocusEvent) => any) | undefined;
32
+ "onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
33
+ onChange?: ((value: number | null) => any) | undefined;
34
+ }>, {
35
+ size: Size;
36
+ required: boolean;
37
+ disabled: boolean;
38
+ min: number;
39
+ max: number;
40
+ readonly: boolean;
41
+ step: number;
42
+ precision: number;
43
+ controls: boolean;
44
+ centered: boolean;
45
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
46
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as UidNumberInput } from './UidNumberInput.vue';
2
+ export type { UidNumberInputProps } from './UidNumberInput.vue';
@@ -22,10 +22,10 @@ declare const __VLS_component: import('vue').DefineComponent<UidStackProps, {},
22
22
  inline: boolean;
23
23
  direction: "row" | "column" | "row-reverse" | "column-reverse";
24
24
  as: string;
25
+ wrap: boolean;
25
26
  gap: string;
26
27
  align: "start" | "center" | "end" | "stretch" | "baseline";
27
28
  justify: "start" | "center" | "end" | "between" | "around" | "evenly";
28
- wrap: boolean;
29
29
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
30
30
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
31
31
  export default _default;
@@ -0,0 +1,39 @@
1
+ import { Size } from '../../types/index.js';
2
+ export interface UidTagsInputProps {
3
+ separators?: string[];
4
+ max?: number;
5
+ unique?: boolean;
6
+ validate?: (value: string) => boolean;
7
+ placeholder?: string;
8
+ label?: string;
9
+ hint?: string;
10
+ error?: string;
11
+ required?: boolean;
12
+ disabled?: boolean;
13
+ size?: Size;
14
+ id?: string;
15
+ }
16
+ type __VLS_Props = UidTagsInputProps;
17
+ type __VLS_PublicProps = {
18
+ modelValue?: string[];
19
+ } & __VLS_Props;
20
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
+ add: (value: string) => any;
22
+ "update:modelValue": (value: string[]) => any;
23
+ remove: (value: string, index: number) => any;
24
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
25
+ onAdd?: ((value: string) => any) | undefined;
26
+ "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
27
+ onRemove?: ((value: string, index: number) => any) | undefined;
28
+ }>, {
29
+ size: Size;
30
+ required: boolean;
31
+ disabled: boolean;
32
+ max: number;
33
+ validate: (value: string) => boolean;
34
+ separators: string[];
35
+ unique: boolean;
36
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
37
+ inputRef: HTMLInputElement;
38
+ }, HTMLDivElement>;
39
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as UidTagsInput } from './UidTagsInput.vue';
2
+ export type { UidTagsInputProps } from './UidTagsInput.vue';
@@ -0,0 +1,33 @@
1
+ export interface UidTimePickerProps {
2
+ step?: number;
3
+ withSeconds?: boolean;
4
+ hour12?: boolean;
5
+ disabled?: boolean;
6
+ clearable?: boolean;
7
+ placeholder?: string;
8
+ }
9
+ type __VLS_Props = UidTimePickerProps;
10
+ type __VLS_PublicProps = {
11
+ modelValue?: string | null;
12
+ } & __VLS_Props;
13
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
+ "update:modelValue": (value: string | null) => any;
15
+ change: (value: string | null) => any;
16
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
17
+ "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
18
+ onChange?: ((value: string | null) => any) | undefined;
19
+ }>, {
20
+ disabled: boolean;
21
+ placeholder: string;
22
+ step: number;
23
+ clearable: boolean;
24
+ withSeconds: boolean;
25
+ hour12: boolean;
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
27
+ containerRef: HTMLDivElement;
28
+ triggerRef: HTMLDivElement;
29
+ hourColRef: HTMLDivElement;
30
+ minuteColRef: HTMLDivElement;
31
+ secondColRef: HTMLDivElement;
32
+ }, HTMLDivElement>;
33
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as UidTimePicker } from './UidTimePicker.vue';
2
+ export type { UidTimePickerProps } from './UidTimePicker.vue';
@@ -0,0 +1,24 @@
1
+ export interface UidTimelineProps {
2
+ alternate?: boolean;
3
+ }
4
+ declare function __VLS_template(): {
5
+ attrs: Partial<{}>;
6
+ slots: Readonly<{
7
+ default?(): unknown;
8
+ }> & {
9
+ default?(): unknown;
10
+ };
11
+ refs: {};
12
+ rootEl: HTMLOListElement;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<UidTimelineProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UidTimelineProps> & Readonly<{}>, {
16
+ alternate: boolean;
17
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLOListElement>;
18
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
19
+ export default _default;
20
+ type __VLS_WithTemplateSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,33 @@
1
+ export type TimelineTone = 'neutral' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
2
+ export interface UidTimelineItemProps {
3
+ title?: string;
4
+ description?: string;
5
+ time?: string;
6
+ tone?: TimelineTone;
7
+ icon?: unknown;
8
+ }
9
+ declare function __VLS_template(): {
10
+ attrs: Partial<{}>;
11
+ slots: Readonly<{
12
+ default?(): unknown;
13
+ time?(): unknown;
14
+ icon?(): unknown;
15
+ }> & {
16
+ default?(): unknown;
17
+ time?(): unknown;
18
+ icon?(): unknown;
19
+ };
20
+ refs: {};
21
+ rootEl: HTMLLIElement;
22
+ };
23
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
24
+ declare const __VLS_component: import('vue').DefineComponent<UidTimelineItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UidTimelineItemProps> & Readonly<{}>, {
25
+ tone: TimelineTone;
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLIElement>;
27
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
28
+ export default _default;
29
+ type __VLS_WithTemplateSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
@@ -0,0 +1,4 @@
1
+ export { default as UidTimeline } from './UidTimeline.vue';
2
+ export { default as UidTimelineItem } from './UidTimelineItem.vue';
3
+ export type { UidTimelineProps } from './UidTimeline.vue';
4
+ export type { UidTimelineItemProps, TimelineTone } from './UidTimelineItem.vue';
@@ -0,0 +1,7 @@
1
+ import { TreeNode } from './context.js';
2
+ interface Props {
3
+ node: TreeNode;
4
+ level: number;
5
+ }
6
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLIElement>;
7
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import { TreeNode, TreeKey, TreeSelectable } from './context.js';
2
+ export interface UidTreeViewProps {
3
+ nodes: TreeNode[];
4
+ selectable?: TreeSelectable;
5
+ checkable?: boolean;
6
+ disabled?: boolean;
7
+ defaultExpandAll?: boolean;
8
+ showGuides?: boolean;
9
+ }
10
+ type __VLS_Props = UidTreeViewProps;
11
+ type __VLS_PublicProps = {
12
+ 'expandedKeys'?: TreeKey[];
13
+ 'selectedKeys'?: TreeKey[];
14
+ 'checkedKeys'?: TreeKey[];
15
+ } & __VLS_Props;
16
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
+ select: (node: TreeNode) => any;
18
+ check: (node: TreeNode, checked: boolean) => any;
19
+ "update:expandedKeys": (value: TreeKey[]) => any;
20
+ "update:selectedKeys": (value: TreeKey[]) => any;
21
+ "update:checkedKeys": (value: TreeKey[]) => any;
22
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
23
+ onSelect?: ((node: TreeNode) => any) | undefined;
24
+ onCheck?: ((node: TreeNode, checked: boolean) => any) | undefined;
25
+ "onUpdate:expandedKeys"?: ((value: TreeKey[]) => any) | undefined;
26
+ "onUpdate:selectedKeys"?: ((value: TreeKey[]) => any) | undefined;
27
+ "onUpdate:checkedKeys"?: ((value: TreeKey[]) => any) | undefined;
28
+ }>, {
29
+ disabled: boolean;
30
+ selectable: TreeSelectable;
31
+ checkable: boolean;
32
+ defaultExpandAll: boolean;
33
+ showGuides: boolean;
34
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLUListElement>;
35
+ export default _default;
@@ -0,0 +1,26 @@
1
+ import { InjectionKey, Ref } from 'vue';
2
+ export type TreeKey = string | number;
3
+ export interface TreeNode {
4
+ key: TreeKey;
5
+ label: string;
6
+ children?: TreeNode[];
7
+ disabled?: boolean;
8
+ icon?: unknown;
9
+ }
10
+ export type TreeSelectable = 'single' | 'multiple' | false;
11
+ export interface TreeContext {
12
+ selectable: Ref<TreeSelectable>;
13
+ checkable: Ref<boolean>;
14
+ disabled: Ref<boolean>;
15
+ expandedKeys: Ref<Set<TreeKey>>;
16
+ selectedKeys: Ref<Set<TreeKey>>;
17
+ checkedKeys: Ref<Set<TreeKey>>;
18
+ isExpanded(key: TreeKey): boolean;
19
+ isSelected(key: TreeKey): boolean;
20
+ isChecked(key: TreeKey): boolean;
21
+ isIndeterminate(key: TreeKey): boolean;
22
+ toggleExpand(key: TreeKey): void;
23
+ toggleSelect(node: TreeNode): void;
24
+ toggleCheck(node: TreeNode): void;
25
+ }
26
+ export declare const treeContextKey: InjectionKey<TreeContext>;
@@ -0,0 +1,4 @@
1
+ export { default as UidTreeView } from './UidTreeView.vue';
2
+ export { default as UidTreeItem } from './UidTreeItem.vue';
3
+ export type { UidTreeViewProps } from './UidTreeView.vue';
4
+ export type { TreeNode, TreeKey, TreeSelectable, TreeContext } from './context.js';