@dolanske/vui 1.15.2 → 1.15.4
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,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,6 +1,5 @@
|
|
|
1
|
-
import { BaseRow } from './table';
|
|
2
1
|
interface Props {
|
|
3
|
-
row:
|
|
2
|
+
row: any;
|
|
4
3
|
}
|
|
5
4
|
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, {}, any>;
|
|
6
5
|
export default _default;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ComputedRef, InjectionKey, MaybeRefOrGetter, Ref } from 'vue';
|
|
2
2
|
import { DeepRequired } from '../../shared/types';
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
selectRow: (row: BaseRow) => void;
|
|
3
|
+
export interface TableSelectionProvide<Row = any> {
|
|
4
|
+
selectedRows: Ref<Set<Row>>;
|
|
5
|
+
selectRow: (row: Row) => void;
|
|
7
6
|
selectAllRows: () => void;
|
|
8
7
|
enabled: ComputedRef<boolean>;
|
|
9
8
|
isSelectedAll: ComputedRef<boolean>;
|
|
@@ -26,22 +25,10 @@ export declare function defineTable<const Dataset extends any[]>(computedDataset
|
|
|
26
25
|
setSort: (key: keyof Dataset[number], type?: "asc" | "desc" | "toggle") => void;
|
|
27
26
|
clearSort: () => void;
|
|
28
27
|
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
|
-
}[]>>;
|
|
28
|
+
rows: ComputedRef<Dataset>;
|
|
29
|
+
allRows: ComputedRef<Dataset>;
|
|
30
|
+
selectedRows: Readonly<Ref<ReadonlySet<import('vue').DeepReadonly<import('@vue/reactivity').UnwrapRefSimple<Dataset[number]>>>, ReadonlySet<import('vue').DeepReadonly<import('@vue/reactivity').UnwrapRefSimple<Dataset[number]>>>>>;
|
|
31
|
+
headers: ComputedRef<Header[]>;
|
|
45
32
|
pagination: ComputedRef<import('../Pagination/pagination').Pagination>;
|
|
46
33
|
canPrevPage: ComputedRef<boolean>;
|
|
47
34
|
canNextPage: ComputedRef<boolean>;
|