@dolanske/vui 1.7.8 → 1.8.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.
package/README.md CHANGED
@@ -1,19 +1,19 @@
1
- # VUI
2
-
3
- 1. `npm i @dolanske/vui`
4
- 2. In your main app entry,`import "@dolanske/vui/style` to import the global CSS
5
- 3. Build your thing bro
6
-
7
- ---
8
-
9
- ## TODO
10
-
11
- - [ ] Bump target from ES2022 whenever vite-plugin-dts is fixed
12
- - [ ] Carousel (slider)
13
- - [ ] CodeBlock
14
- - [ ] Code highlighting
15
- - [ ] Copy code
16
- - [ ] Type, padding, etc
17
- - [ ] Use this https://shiki.style/guide/install
18
- - [ ] Command menu
19
- - [ ] Documentation site using my own template
1
+ # VUI
2
+
3
+ 1. `npm i @dolanske/vui`
4
+ 2. In your main app entry,`import "@dolanske/vui/style` to import the global CSS
5
+ 3. Build your thing bro
6
+
7
+ ---
8
+
9
+ ## TODO
10
+
11
+ - [ ] Bump target from ES2022 whenever vite-plugin-dts is fixed
12
+ - [ ] Carousel (slider)
13
+ - [ ] CodeBlock
14
+ - [ ] Code highlighting
15
+ - [ ] Copy code
16
+ - [ ] Type, padding, etc
17
+ - [ ] Use this https://shiki.style/guide/install
18
+ - [ ] Command menu
19
+ - [ ] Documentation site using my own template
@@ -1,5 +1,5 @@
1
- import { VueDatePickerProps } from '@vuepic/vue-datepicker';
2
- type __VLS_Props = VueDatePickerProps & {
1
+ import { RootProps } from '@vuepic/vue-datepicker';
2
+ type __VLS_Props = RootProps & {
3
3
  expand?: boolean;
4
4
  };
5
5
  declare function __VLS_template(): {
@@ -13,10 +13,8 @@ declare function __VLS_template(): {
13
13
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
14
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
15
15
  expand: boolean;
16
- format: string | ((date: Date) => string) | ((dates: Date[]) => string);
17
16
  autoApply: boolean;
18
- autoPosition: boolean | "top" | "bottom";
19
- monthNameFormat: "long" | "short";
17
+ formats: Partial<import('@vuepic/vue-datepicker').FormatsConfig> | null;
20
18
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
19
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
20
  export default _default;
@@ -16,6 +16,10 @@ export interface Props {
16
16
  * Set he max height of the dropdown element before it starts scrolling
17
17
  */
18
18
  maxHeight?: number | string;
19
+ /**
20
+ * Disable mobile drawer behavior, always use the floating dropdown.
21
+ */
22
+ noMobileDrawer?: boolean;
19
23
  }
20
24
  declare function open(): void;
21
25
  declare function close(): void;
@@ -35,6 +39,12 @@ declare function __VLS_template(): {
35
39
  toggle: typeof toggle;
36
40
  isOpen: boolean;
37
41
  }): any;
42
+ default?(_: {
43
+ open: typeof open;
44
+ close: typeof close;
45
+ toggle: typeof toggle;
46
+ isOpen: boolean;
47
+ }): any;
38
48
  };
39
49
  refs: {
40
50
  anchor: HTMLDivElement;
@@ -26,13 +26,13 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
26
26
  onClose?: (() => any) | undefined;
27
27
  onConfirm?: (() => any) | undefined;
28
28
  }>, {
29
- size: import('../../shared/types').Sizes | "screen";
29
+ size: import('../..').Sizes | "screen";
30
30
  open: boolean;
31
31
  canDismiss: boolean;
32
- cancelText: string;
32
+ showCancel: boolean;
33
33
  confirmText: string;
34
34
  confirmVariant: Variants;
35
- showCancel: boolean;
35
+ cancelText: string;
36
36
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
37
37
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
38
38
  export default _default;
@@ -36,6 +36,12 @@ export interface ModalProps {
36
36
  * Setting the value to `none` will not apply any transition
37
37
  */
38
38
  transitionName?: string | 'none';
39
+ /**
40
+ * On mobile, the modal automatically becomes fullscreen. You can configure this
41
+ * breakpoint by setting a custom `vuiBreakpoints` mobile variable. This
42
+ * setting disables the default behavior.
43
+ */
44
+ disableMobileFs?: boolean;
39
45
  }
40
46
  declare function __VLS_template(): {
41
47
  attrs: Partial<{}>;
@@ -28,6 +28,14 @@ export interface Props {
28
28
  * @default true
29
29
  */
30
30
  teleport?: boolean;
31
+ /**
32
+ * Delay in milliseconds before the popout becomes visible after `visible` turns true
33
+ */
34
+ enterDelay?: number;
35
+ /**
36
+ * Delay in milliseconds before the popout hides after `visible` turns false
37
+ */
38
+ leaveDelay?: number;
31
39
  }
32
40
  declare function __VLS_template(): {
33
41
  attrs: Partial<{}>;
@@ -45,8 +53,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
45
53
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
46
54
  onClickOutside?: (() => any) | undefined;
47
55
  }>, {
48
- offset: number;
49
56
  teleport: boolean;
57
+ offset: number;
50
58
  placement: Placement;
51
59
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
52
60
  popout: HTMLDivElement;
@@ -1,3 +1,4 @@
1
+ import { Sizes } from '../../shared/types';
1
2
  export type SelectOption = {
2
3
  value: any;
3
4
  label: string;
@@ -21,6 +22,8 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
21
22
  showClear?: boolean;
22
23
  disabled?: boolean;
23
24
  errors?: string[];
25
+ size?: Sizes;
26
+ noMobileDrawer?: boolean;
24
27
  }) & Partial<{}>> & import('vue').PublicProps;
25
28
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
26
29
  attrs: any;
@@ -2,6 +2,8 @@ interface Props {
2
2
  label?: string;
3
3
  disabled?: boolean;
4
4
  accent?: boolean;
5
+ reversed?: boolean;
6
+ hint?: string;
5
7
  }
6
8
  type __VLS_Props = Props;
7
9
  type __VLS_PublicProps = {
@@ -52,7 +52,7 @@ export declare const toasts: import('vue').Ref<Map<number, {
52
52
  template?: string | object | undefined;
53
53
  render?: Function | undefined;
54
54
  components?: Record<string, Component<any, any, any, import('vue').ComputedOptions, import('vue').MethodOptions, {}, any>> | undefined;
55
- directives?: Record<string, import('vue').Directive<any, any, string, string>> | undefined;
55
+ directives?: Record<string, import('vue').Directive<any, any, string, any>> | undefined;
56
56
  inheritAttrs?: boolean | undefined;
57
57
  emits?: any;
58
58
  slots?: {} | undefined;
@@ -129,18 +129,18 @@ export declare const toasts: import('vue').Ref<Map<number, {
129
129
  filters?: Record<string, Function> | undefined;
130
130
  mixins?: any[] | undefined;
131
131
  extends?: any;
132
- beforeCreate?: (() => void) | undefined;
133
- created?: (() => void) | undefined;
134
- beforeMount?: (() => void) | undefined;
135
- mounted?: (() => void) | undefined;
136
- beforeUpdate?: (() => void) | undefined;
137
- updated?: (() => void) | undefined;
138
- activated?: (() => void) | undefined;
139
- deactivated?: (() => void) | undefined;
140
- beforeDestroy?: (() => void) | undefined;
141
- beforeUnmount?: (() => void) | undefined;
142
- destroyed?: (() => void) | undefined;
143
- unmounted?: (() => void) | undefined;
132
+ beforeCreate?: (() => any) | undefined;
133
+ created?: (() => any) | undefined;
134
+ beforeMount?: (() => any) | undefined;
135
+ mounted?: (() => any) | undefined;
136
+ beforeUpdate?: (() => any) | undefined;
137
+ updated?: (() => any) | undefined;
138
+ activated?: (() => any) | undefined;
139
+ deactivated?: (() => any) | undefined;
140
+ beforeDestroy?: (() => any) | undefined;
141
+ beforeUnmount?: (() => any) | undefined;
142
+ destroyed?: (() => any) | undefined;
143
+ unmounted?: (() => any) | undefined;
144
144
  renderTracked?: ((e: import('vue').DebuggerEvent) => void) | undefined;
145
145
  renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | undefined;
146
146
  errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | undefined;
@@ -182,7 +182,7 @@ export declare const toasts: import('vue').Ref<Map<number, {
182
182
  template?: string | object | undefined;
183
183
  render?: Function | undefined;
184
184
  components?: Record<string, Component<any, any, any, import('vue').ComputedOptions, import('vue').MethodOptions, {}, any>> | undefined;
185
- directives?: Record<string, import('vue').Directive<any, any, string, string>> | undefined;
185
+ directives?: Record<string, import('vue').Directive<any, any, string, any>> | undefined;
186
186
  inheritAttrs?: boolean | undefined;
187
187
  emits?: any;
188
188
  slots?: {} | undefined;
@@ -259,18 +259,18 @@ export declare const toasts: import('vue').Ref<Map<number, {
259
259
  filters?: Record<string, Function> | undefined;
260
260
  mixins?: any[] | undefined;
261
261
  extends?: any;
262
- beforeCreate?: (() => void) | undefined;
263
- created?: (() => void) | undefined;
264
- beforeMount?: (() => void) | undefined;
265
- mounted?: (() => void) | undefined;
266
- beforeUpdate?: (() => void) | undefined;
267
- updated?: (() => void) | undefined;
268
- activated?: (() => void) | undefined;
269
- deactivated?: (() => void) | undefined;
270
- beforeDestroy?: (() => void) | undefined;
271
- beforeUnmount?: (() => void) | undefined;
272
- destroyed?: (() => void) | undefined;
273
- unmounted?: (() => void) | undefined;
262
+ beforeCreate?: (() => any) | undefined;
263
+ created?: (() => any) | undefined;
264
+ beforeMount?: (() => any) | undefined;
265
+ mounted?: (() => any) | undefined;
266
+ beforeUpdate?: (() => any) | undefined;
267
+ updated?: (() => any) | undefined;
268
+ activated?: (() => any) | undefined;
269
+ deactivated?: (() => any) | undefined;
270
+ beforeDestroy?: (() => any) | undefined;
271
+ beforeUnmount?: (() => any) | undefined;
272
+ destroyed?: (() => any) | undefined;
273
+ unmounted?: (() => any) | undefined;
274
274
  renderTracked?: ((e: import('vue').DebuggerEvent) => void) | undefined;
275
275
  renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | undefined;
276
276
  errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | undefined;
@@ -7,7 +7,11 @@ interface Props {
7
7
  /**
8
8
  * Amount of time user should hover the anchor until the tooltip shows up
9
9
  */
10
- delay?: number;
10
+ enterDelay?: number;
11
+ /**
12
+ * Amount of time after the cursor leaves before the tooltip is hidden
13
+ */
14
+ leaveDelay?: number;
11
15
  /**
12
16
  * If set to true, tooltip will not be rendered
13
17
  */
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Command, default as Commands } from './components/Commands/Commands.vue';
2
+ import { Sizes, Space, SpaceSize } from './shared/types';
2
3
  import { default as Accordion } from './components/Accordion/Accordion.vue';
3
4
  import { default as AccordionGroup } from './components/Accordion/AccordionGroup.vue';
4
5
  import { default as Alert } from './components/Alert/Alert.vue';
@@ -51,7 +52,8 @@ import { pushToast, removeToast } from './components/Toast/toast';
51
52
  import { default as Toasts } from './components/Toast/Toasts.vue';
52
53
  import { default as Tooltip } from './components/Tooltip/Tooltip.vue';
53
54
  import { default as Backdrop } from './internal/Backdrop/Backdrop.vue';
55
+ import { vuiBreakpoints } from './shared/breakpoints';
54
56
  import { searchString } from './shared/helpers';
55
57
  import { setColorTheme, theme } from './shared/theme';
56
58
  import * as Table from './components/Table';
57
- export { Accordion, AccordionGroup, Alert, Avatar, Backdrop, Badge, BreadcrumbItem, Breadcrumbs, Button, ButtonGroup, Calendar, Card, Checkbox, Color, type Command, Commands, Confirm, CopyClipboard, Counter, defineTable, Divider, Drawer, Dropdown, DropdownItem, DropdownTitle, Dropzone, File, Flex, Grid, Input, Kbd, KbdGroup, Modal, OTP, OTPItem, paginate, Pagination, Password, Popout, Progress, pushToast, Radio, RadioGroup, removeToast, searchString, Select, setColorTheme, Sheet, Sidebar, Skeleton, Spinner, Switch, Tab, Table, Tabs, Textarea, theme, Toasts, Tooltip, };
59
+ export { Accordion, AccordionGroup, Alert, Avatar, Backdrop, Badge, BreadcrumbItem, Breadcrumbs, Button, ButtonGroup, Calendar, Card, Checkbox, Color, type Command, Commands, Confirm, CopyClipboard, Counter, defineTable, Divider, Drawer, Dropdown, DropdownItem, DropdownTitle, Dropzone, File, Flex, Grid, Input, Kbd, KbdGroup, Modal, OTP, OTPItem, paginate, Pagination, Password, Popout, Progress, pushToast, Radio, RadioGroup, removeToast, searchString, Select, setColorTheme, Sheet, Sidebar, type Sizes, Skeleton, type Space, type SpaceSize, Spinner, Switch, Tab, Table, Tabs, Textarea, theme, Toasts, Tooltip, vuiBreakpoints, };
@@ -0,0 +1,13 @@
1
+ import { Ref } from 'vue';
2
+ export declare enum Breakpoints {
3
+ Mobile = "mobile"
4
+ }
5
+ export declare const vuiBreakpoints: Ref<{
6
+ mobile: number;
7
+ }, Record<Breakpoints, number> | {
8
+ mobile: number;
9
+ }>;
10
+ /**
11
+ * Returns a reactive boolean indicating if the current window width is less than or equal to the specified breakpoint.
12
+ */
13
+ export declare function useBreakpoint(breakpoint: Breakpoints): Ref<boolean>;
@@ -0,0 +1,14 @@
1
+ import { ref } from 'vue';
2
+ interface UseLayer {
3
+ layerIndex: ReturnType<typeof ref<number>>;
4
+ openLayer: () => void;
5
+ closeLayer: () => void;
6
+ }
7
+ /**
8
+ * Provides a reactive z-index that participates in the global layer stack.
9
+ * Each floating element (Modal, Sheet, Popout, Tooltip, …) should call this
10
+ * composable and invoke `open()` when it becomes visible and `close()` when
11
+ * it hides. The layer is automatically released when the component unmounts.
12
+ */
13
+ export declare function useLayer(): UseLayer;
14
+ export {};