@dolanske/vui 1.15.1 → 1.15.3
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 +32 -4
- package/dist/src/components/Resizable/Resizable.vue.d.ts +6 -0
- package/dist/src/components/Table/table.d.ts +7 -19
- package/dist/src/index.d.ts +2 -2
- package/dist/src/shared/viewport.d.ts +8 -8
- package/dist/vui.css +1 -1
- package/dist/vui.js +2249 -2267
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,12 +1,40 @@
|
|
|
1
1
|
# VUI
|
|
2
2
|
|
|
3
3
|
1. `npm i @dolanske/vui`
|
|
4
|
-
2. In your main app entry
|
|
4
|
+
2. In your main app entry, `import "@dolanske/vui/style"` to import the global CSS
|
|
5
5
|
3. Override default style [tokens](https://dolanske.github.io/vui/docs/tokens) to fit your style
|
|
6
6
|
4. Build your thing bro
|
|
7
7
|
|
|
8
|
-
---
|
|
9
|
-
|
|
10
8
|
## Documentation
|
|
11
9
|
|
|
12
|
-
[Visit the docs here
|
|
10
|
+
[Visit the docs here](https://dolanske.github.io/vui/)
|
|
11
|
+
|
|
12
|
+
## Contributing
|
|
13
|
+
|
|
14
|
+
This repository is split into two packages: the library itself in `src/` and the documentation in `docs/`. The docs are built with [VitePress](https://vitepress.dev/) and are hosted on GitHub Pages.
|
|
15
|
+
|
|
16
|
+
### Setup
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
# Install library dependencies
|
|
20
|
+
npm install
|
|
21
|
+
|
|
22
|
+
# Install docs dependencies
|
|
23
|
+
cd docs && npm install && cd ..
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Development
|
|
27
|
+
|
|
28
|
+
To run the VUI playground locally, run:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
npm run dev
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
To run the docs dev server, run:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
npm run docs
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
> The docs dev server resolves `@dolanske/vui` directly from `src/`, so changes to components and styles hot-reload instantly without rebuilding the library first.
|
|
@@ -11,6 +11,12 @@ interface Props {
|
|
|
11
11
|
* Hides resizable handles unless hovered.
|
|
12
12
|
*/
|
|
13
13
|
hideHandles?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Minimum size (in pixels) each panel can be resized to. Applies to
|
|
16
|
+
* every panel and is enforced along the active axis (width for
|
|
17
|
+
* horizontal layouts, height for vertical ones).
|
|
18
|
+
*/
|
|
19
|
+
minSize?: number;
|
|
14
20
|
}
|
|
15
21
|
interface PanelProps {
|
|
16
22
|
minWidth: number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ComputedRef, InjectionKey, MaybeRefOrGetter, Ref } from 'vue';
|
|
2
2
|
import { DeepRequired } from '../../shared/types';
|
|
3
3
|
export type BaseRow = Record<string, string | number>;
|
|
4
|
-
export interface TableSelectionProvide {
|
|
5
|
-
selectedRows: Ref<Set<
|
|
6
|
-
selectRow: (row:
|
|
4
|
+
export interface TableSelectionProvide<Row = BaseRow> {
|
|
5
|
+
selectedRows: Ref<Set<Row>>;
|
|
6
|
+
selectRow: (row: Row) => void;
|
|
7
7
|
selectAllRows: () => void;
|
|
8
8
|
enabled: ComputedRef<boolean>;
|
|
9
9
|
isSelectedAll: ComputedRef<boolean>;
|
|
@@ -26,22 +26,10 @@ export declare function defineTable<const Dataset extends any[]>(computedDataset
|
|
|
26
26
|
setSort: (key: keyof Dataset[number], type?: "asc" | "desc" | "toggle") => void;
|
|
27
27
|
clearSort: () => void;
|
|
28
28
|
search: Ref<string | undefined, string | undefined>;
|
|
29
|
-
rows:
|
|
30
|
-
allRows:
|
|
31
|
-
selectedRows: Readonly<Ref<ReadonlySet<
|
|
32
|
-
|
|
33
|
-
}>, ReadonlySet<{
|
|
34
|
-
readonly [x: string]: string | number;
|
|
35
|
-
}>>>;
|
|
36
|
-
headers: Readonly<Ref<readonly {
|
|
37
|
-
readonly label: string;
|
|
38
|
-
readonly sortToggle: () => void;
|
|
39
|
-
readonly sortKey?: "asc" | "desc" | undefined;
|
|
40
|
-
}[], readonly {
|
|
41
|
-
readonly label: string;
|
|
42
|
-
readonly sortToggle: () => void;
|
|
43
|
-
readonly sortKey?: "asc" | "desc" | undefined;
|
|
44
|
-
}[]>>;
|
|
29
|
+
rows: ComputedRef<Dataset>;
|
|
30
|
+
allRows: ComputedRef<Dataset>;
|
|
31
|
+
selectedRows: Readonly<Ref<ReadonlySet<import('vue').DeepReadonly<import('@vue/reactivity').UnwrapRefSimple<Dataset[number]>>>, ReadonlySet<import('vue').DeepReadonly<import('@vue/reactivity').UnwrapRefSimple<Dataset[number]>>>>>;
|
|
32
|
+
headers: ComputedRef<Header[]>;
|
|
45
33
|
pagination: ComputedRef<import('../Pagination/pagination').Pagination>;
|
|
46
34
|
canPrevPage: ComputedRef<boolean>;
|
|
47
35
|
canNextPage: ComputedRef<boolean>;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command, default as Commands } from './components/Commands/Commands.vue';
|
|
2
2
|
import { SelectOption, default as Select } from './components/Select/Select.vue';
|
|
3
3
|
import { Size, Sizes, Spaces, SpaceSize } from './shared/types';
|
|
4
|
+
import { Breakpoints, breakpoints, viewport } from './shared/viewport';
|
|
4
5
|
import { default as Accordion } from './components/Accordion/Accordion.vue';
|
|
5
6
|
import { default as AccordionGroup } from './components/Accordion/AccordionGroup.vue';
|
|
6
7
|
import { default as Alert } from './components/Alert/Alert.vue';
|
|
@@ -69,7 +70,6 @@ import { default as Tooltip } from './components/Tooltip/Tooltip.vue';
|
|
|
69
70
|
import { default as Backdrop } from './internal/Backdrop/Backdrop.vue';
|
|
70
71
|
import { searchString } from './shared/helpers';
|
|
71
72
|
import { setColorTheme, theme } from './shared/theme';
|
|
72
|
-
import { breakpoints, viewport } from './shared/viewport';
|
|
73
73
|
import { useViewTransition } from './shared/viewTransition';
|
|
74
74
|
import * as Table from './components/Table';
|
|
75
|
-
export { Accordion, AccordionGroup, Alert, AspectRatio, Avatar, AvatarGroup, Backdrop, Badge, BadgeGroup, BreadcrumbItem, Breadcrumbs, breakpoints, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Color, type Command, Commands, Confirm, ContextMenu, CopyClipboard, Counter, defineTable, Divider, Drawer, Dropdown, DropdownItem, DropdownTitle, Dropzone, File, Flex, Grid, Histogram, Indicator, Input, Kbd, KbdGroup, Marquee, Menubar, MenuItem, Modal, OTP, OTPItem, Overflow, paginate, Pagination, Password, Popout, PopoutHover, Progress, pushToast, Radio, RadioGroup, removeToast, Resizable, ResizableView, searchString, Select, type SelectOption, setColorTheme, Sheet, Sidebar, type Size, type Sizes, Skeleton, Slider, type Spaces, type SpaceSize, Spinner, Switch, Tab, Table, Tabs, Textarea, theme, Toasts, Tooltip, useViewTransition, viewport, };
|
|
75
|
+
export { Accordion, AccordionGroup, Alert, AspectRatio, Avatar, AvatarGroup, Backdrop, Badge, BadgeGroup, BreadcrumbItem, Breadcrumbs, type Breakpoints, breakpoints, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Color, type Command, Commands, Confirm, ContextMenu, CopyClipboard, Counter, defineTable, Divider, Drawer, Dropdown, DropdownItem, DropdownTitle, Dropzone, File, Flex, Grid, Histogram, Indicator, Input, Kbd, KbdGroup, Marquee, Menubar, MenuItem, Modal, OTP, OTPItem, Overflow, paginate, Pagination, Password, Popout, PopoutHover, Progress, pushToast, Radio, RadioGroup, removeToast, Resizable, ResizableView, searchString, Select, type SelectOption, setColorTheme, Sheet, Sidebar, type Size, type Sizes, Skeleton, Slider, type Spaces, type SpaceSize, Spinner, Switch, Tab, Table, Tabs, Textarea, theme, Toasts, Tooltip, useViewTransition, viewport, };
|
|
@@ -13,21 +13,21 @@ export interface Breakpoints {
|
|
|
13
13
|
*/
|
|
14
14
|
l: boolean;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
type BreakpointValues = Record<string, number> & {
|
|
17
17
|
s: number;
|
|
18
18
|
m: number;
|
|
19
19
|
l: number;
|
|
20
|
-
}
|
|
20
|
+
};
|
|
21
|
+
export declare const breakpoints: Ref<{
|
|
22
|
+
[x: string]: number;
|
|
21
23
|
s: number;
|
|
22
24
|
m: number;
|
|
23
25
|
l: number;
|
|
24
|
-
} | {
|
|
26
|
+
}, BreakpointValues | {
|
|
27
|
+
[x: string]: number;
|
|
25
28
|
s: number;
|
|
26
29
|
m: number;
|
|
27
30
|
l: number;
|
|
28
31
|
}>;
|
|
29
|
-
export declare const viewport:
|
|
30
|
-
|
|
31
|
-
m: boolean;
|
|
32
|
-
l: boolean;
|
|
33
|
-
};
|
|
32
|
+
export declare const viewport: Breakpoints;
|
|
33
|
+
export {};
|