@webx-ui/core 0.23.0 → 0.26.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/dist/components/Button/Button.d.ts +1 -0
- package/dist/components/Button/types.d.ts +3 -0
- package/dist/components/DatePicker/DatePicker.d.ts +1 -0
- package/dist/components/DatePicker/types.d.ts +8 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +1 -0
- package/dist/components/DateRangePicker/types.d.ts +8 -0
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +1 -0
- package/dist/components/EntityCard/EntityCard.d.ts +1 -0
- package/dist/components/EntityCard/types.d.ts +8 -0
- package/dist/components/FormItem/FormItem.d.ts +1 -1
- package/dist/components/Icon/icons.d.ts +2 -0
- package/dist/components/RichText/RichText.d.ts +6 -4
- package/dist/components/RichText/tools.d.ts +7 -35
- package/dist/components/RichText/types.d.ts +40 -6
- package/dist/components/Table/Table.d.ts +34 -0
- package/dist/components/Table/types.d.ts +19 -0
- package/dist/components/TimePicker/TimePicker.d.ts +1 -0
- package/dist/composables/useDateLocale.d.ts +23 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5765 -5506
- package/dist/index.js.map +1 -1
- package/dist/internal/dateLocale.d.ts +19 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IconName } from '../Icon/types';
|
|
1
2
|
export type ButtonType = 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
2
3
|
export type ButtonVariant = 'solid' | 'outline' | 'text';
|
|
3
4
|
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
@@ -5,6 +6,8 @@ export type ButtonNativeType = 'button' | 'submit' | 'reset';
|
|
|
5
6
|
export interface ButtonProps {
|
|
6
7
|
/** Semantic colour of the button. Defaults to `default`, or to the group's. */
|
|
7
8
|
type?: ButtonType;
|
|
9
|
+
/** Icon before the label. The `icon` slot wins when both are given. */
|
|
10
|
+
icon?: IconName;
|
|
8
11
|
/** Visual weight: filled, bordered or borderless. Defaults to `solid`, or to the group's. */
|
|
9
12
|
variant?: ButtonVariant;
|
|
10
13
|
/** Defaults to `md`, or to the enclosing `WxButtonGroup`. */
|
|
@@ -35,6 +35,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
35
35
|
id: string;
|
|
36
36
|
readonly: boolean;
|
|
37
37
|
format: string;
|
|
38
|
+
locale: string | import('../..').DateFnsLocale;
|
|
38
39
|
valueFormat: string;
|
|
39
40
|
minDate: string | Date;
|
|
40
41
|
maxDate: string | Date;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ControlSize, ControlStatus } from '../../composables/useFormField';
|
|
2
|
+
import { DateFnsLocale } from '../../internal/dateLocale';
|
|
2
3
|
export type DatePickerType = 'date' | 'datetime' | 'time';
|
|
3
4
|
export type DatePickerModelValue = string | Date | null;
|
|
4
5
|
export interface DatePickerProps {
|
|
@@ -22,6 +23,13 @@ export interface DatePickerProps {
|
|
|
22
23
|
minutesIncrement?: number;
|
|
23
24
|
/** 24-hour clock. Off means AM/PM. */
|
|
24
25
|
is24?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Language the calendar is drawn in: a BCP-47 tag such as `'ru'` or `'pt-BR'`, whose
|
|
28
|
+
* month and weekday names come from the browser, or a date-fns locale object for a
|
|
29
|
+
* language the browser does not carry. Defaults to what the application provided with
|
|
30
|
+
* `provideDateLocale`, then to the browser's own language.
|
|
31
|
+
*/
|
|
32
|
+
locale?: string | DateFnsLocale;
|
|
25
33
|
/** First day of the week: 0 is Sunday, 1 is Monday. */
|
|
26
34
|
weekStart?: number;
|
|
27
35
|
/** Apply the value as soon as it is picked, with no confirm button. */
|
|
@@ -34,6 +34,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
34
34
|
id: string;
|
|
35
35
|
readonly: boolean;
|
|
36
36
|
format: string;
|
|
37
|
+
locale: string | import('../..').DateFnsLocale;
|
|
37
38
|
valueFormat: string;
|
|
38
39
|
minDate: string | Date;
|
|
39
40
|
maxDate: string | Date;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ControlSize, ControlStatus } from '../../composables/useFormField';
|
|
2
|
+
import { DateFnsLocale } from '../../internal/dateLocale';
|
|
2
3
|
/** `[start, end]`, or `null` while nothing is picked. */
|
|
3
4
|
export type DateRangePickerModelValue = string[] | Date[] | null;
|
|
4
5
|
export interface DateRangePickerProps {
|
|
@@ -12,6 +13,13 @@ export interface DateRangePickerProps {
|
|
|
12
13
|
maxDate?: string | Date;
|
|
13
14
|
/** How many months to show side by side. Two makes picking across a boundary easy. */
|
|
14
15
|
months?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Language the calendar is drawn in: a BCP-47 tag such as `'ru'` or `'pt-BR'`, whose
|
|
18
|
+
* month and weekday names come from the browser, or a date-fns locale object for a
|
|
19
|
+
* language the browser does not carry. Defaults to what the application provided with
|
|
20
|
+
* `provideDateLocale`, then to the browser's own language.
|
|
21
|
+
*/
|
|
22
|
+
locale?: string | DateFnsLocale;
|
|
15
23
|
/** First day of the week: 0 is Sunday, 1 is Monday. */
|
|
16
24
|
weekStart?: number;
|
|
17
25
|
/** Apply as soon as the second date is picked, with no confirm button. */
|
|
@@ -33,6 +33,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
33
33
|
id: string;
|
|
34
34
|
readonly: boolean;
|
|
35
35
|
format: string;
|
|
36
|
+
locale: string | import('../..').DateFnsLocale;
|
|
36
37
|
valueFormat: string;
|
|
37
38
|
minDate: string | Date;
|
|
38
39
|
maxDate: string | Date;
|
|
@@ -29,6 +29,7 @@ declare const __VLS_component: import('vue').DefineComponent<EntityCardProps, {}
|
|
|
29
29
|
shape: import('./types').EntityCardShape;
|
|
30
30
|
imageAlt: string;
|
|
31
31
|
imageSize: number | string;
|
|
32
|
+
titleLines: number;
|
|
32
33
|
selected: boolean;
|
|
33
34
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
34
35
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -24,6 +24,14 @@ export interface EntityCardProps {
|
|
|
24
24
|
imageSize?: number | string;
|
|
25
25
|
/** Facts under the title. Use the `meta` slot when a fact needs markup. */
|
|
26
26
|
meta?: EntityCardMeta[];
|
|
27
|
+
/**
|
|
28
|
+
* How many lines the name may take before it is cut.
|
|
29
|
+
*
|
|
30
|
+
* One by default, because a row of entities reads as a row only while every one of them is
|
|
31
|
+
* the same height. Two is for a list where the name is a sentence rather than a label — an
|
|
32
|
+
* article headline cut to one line on a phone is half a thought.
|
|
33
|
+
*/
|
|
34
|
+
titleLines?: number;
|
|
27
35
|
size?: EntityCardSize;
|
|
28
36
|
/** `card` sits on its own surface; `plain` drops the background for use inside one. */
|
|
29
37
|
variant?: EntityCardVariant;
|
|
@@ -20,10 +20,10 @@ declare const __VLS_component: import('vue').DefineComponent<FormItemProps, {
|
|
|
20
20
|
required: boolean;
|
|
21
21
|
label: string;
|
|
22
22
|
error: string | string[];
|
|
23
|
+
wide: boolean;
|
|
23
24
|
labelWidth: string;
|
|
24
25
|
help: string;
|
|
25
26
|
reserveErrorSpace: boolean;
|
|
26
|
-
wide: boolean;
|
|
27
27
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
28
28
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
29
29
|
export default _default;
|
|
@@ -47,6 +47,8 @@ export declare const builtinIcons: {
|
|
|
47
47
|
readonly sliders: "<path d=\"M4 7h9M17 7h3M4 17h3M11 17h9\"/><circle cx=\"15\" cy=\"7\" r=\"2\"/><circle cx=\"9\" cy=\"17\" r=\"2\"/>";
|
|
48
48
|
readonly home: "<path d=\"M4 10.5 12 4l8 6.5V19a1.5 1.5 0 0 1-1.5 1.5H15V14H9v6.5H5.5A1.5 1.5 0 0 1 4 19Z\"/>";
|
|
49
49
|
readonly file: "<path d=\"M13.5 3.5H7a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9zm0 0V9H19\"/>";
|
|
50
|
+
readonly 'file-text': string;
|
|
51
|
+
readonly newspaper: "<path d=\"M5 20.5h13.5a2 2 0 0 0 2-2v-13a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v13a2 2 0 0 1-2 2Z\"/><path d=\"M5 20.5a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2\"/><path d=\"M9.8 6.8h8.2v3.6h-8.2z\"/><path d=\"M9.8 13.6h8.2M9.8 16.6h5.2\"/>";
|
|
50
52
|
readonly folder: "<path d=\"M3.5 7a2 2 0 0 1 2-2h3.2a2 2 0 0 1 1.5.7l1.3 1.5h7a2 2 0 0 1 2 2v8.3a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2z\"/>";
|
|
51
53
|
readonly 'folder-move': string;
|
|
52
54
|
readonly image: "<rect x=\"3.5\" y=\"4.5\" width=\"17\" height=\"15\" rx=\"2.5\"/><circle cx=\"8.75\" cy=\"9.75\" r=\"1.75\"/><path d=\"m4 17 4.5-4.2a2 2 0 0 1 2.7 0l3 2.8 1.6-1.5a2 2 0 0 1 2.7 0L20 16\"/>";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RichTextProps, RichTextTool } from './types';
|
|
1
|
+
import { RichTextLabels, RichTextModelValue, RichTextProps, RichTextTool } from './types';
|
|
2
2
|
type __VLS_Props = RichTextProps;
|
|
3
3
|
type __VLS_PublicProps = {
|
|
4
|
-
modelValue?:
|
|
4
|
+
modelValue?: RichTextModelValue;
|
|
5
5
|
} & __VLS_Props;
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
7
7
|
editor: import('vue').ShallowRef<import('@tiptap/vue-3').Editor | undefined, import('@tiptap/vue-3').Editor | undefined>;
|
|
@@ -9,13 +9,13 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
|
9
9
|
clear: () => boolean | undefined;
|
|
10
10
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
11
|
change: (html: string) => any;
|
|
12
|
-
"update:modelValue": (value:
|
|
12
|
+
"update:modelValue": (value: RichTextModelValue) => any;
|
|
13
13
|
blur: () => any;
|
|
14
14
|
focus: () => any;
|
|
15
15
|
uploadError: (error: unknown, file: File) => any;
|
|
16
16
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
17
17
|
onChange?: ((html: string) => any) | undefined;
|
|
18
|
-
"onUpdate:modelValue"?: ((value:
|
|
18
|
+
"onUpdate:modelValue"?: ((value: RichTextModelValue) => any) | undefined;
|
|
19
19
|
onBlur?: (() => any) | undefined;
|
|
20
20
|
onFocus?: (() => any) | undefined;
|
|
21
21
|
onUploadError?: ((error: unknown, file: File) => any) | undefined;
|
|
@@ -29,9 +29,11 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
|
29
29
|
id: string;
|
|
30
30
|
readonly: boolean;
|
|
31
31
|
minHeight: string;
|
|
32
|
+
localized: boolean;
|
|
32
33
|
tools: RichTextTool[];
|
|
33
34
|
pickImage: import('./types').RichTextImagePicker;
|
|
34
35
|
accept: string[];
|
|
36
|
+
labels: RichTextLabels;
|
|
35
37
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
36
38
|
fileInput: HTMLInputElement;
|
|
37
39
|
}, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RichTextTool } from './types';
|
|
1
|
+
import { RichTextTableTool, RichTextTool } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Kept out of the component because `withDefaults` cannot reference a binding
|
|
4
4
|
* declared inside `<script setup>` — it is hoisted out of `setup()`.
|
|
@@ -12,37 +12,9 @@ export interface ToolMeta {
|
|
|
12
12
|
}
|
|
13
13
|
export declare const TOOL_META: Record<Exclude<RichTextTool, 'divider'>, ToolMeta>;
|
|
14
14
|
/** Shown as a second row while the caret sits inside a table. */
|
|
15
|
-
export declare const TABLE_TOOLS:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
readonly label: "Row above";
|
|
22
|
-
readonly icon: "rowBefore";
|
|
23
|
-
}, {
|
|
24
|
-
readonly key: "addColumnAfter";
|
|
25
|
-
readonly label: "Column after";
|
|
26
|
-
readonly icon: "columnAfter";
|
|
27
|
-
}, {
|
|
28
|
-
readonly key: "addColumnBefore";
|
|
29
|
-
readonly label: "Column before";
|
|
30
|
-
readonly icon: "columnBefore";
|
|
31
|
-
}, {
|
|
32
|
-
readonly key: "deleteRow";
|
|
33
|
-
readonly label: "Delete row";
|
|
34
|
-
readonly icon: "deleteRow";
|
|
35
|
-
}, {
|
|
36
|
-
readonly key: "deleteColumn";
|
|
37
|
-
readonly label: "Delete column";
|
|
38
|
-
readonly icon: "deleteColumn";
|
|
39
|
-
}, {
|
|
40
|
-
readonly key: "mergeOrSplit";
|
|
41
|
-
readonly label: "Merge or split cells";
|
|
42
|
-
readonly icon: "mergeCells";
|
|
43
|
-
}, {
|
|
44
|
-
readonly key: "deleteTable";
|
|
45
|
-
readonly label: "Delete table";
|
|
46
|
-
readonly icon: "deleteTable";
|
|
47
|
-
}];
|
|
48
|
-
export type TableToolKey = (typeof TABLE_TOOLS)[number]['key'];
|
|
15
|
+
export declare const TABLE_TOOLS: {
|
|
16
|
+
key: RichTextTableTool;
|
|
17
|
+
label: string;
|
|
18
|
+
icon: string;
|
|
19
|
+
}[];
|
|
20
|
+
export type TableToolKey = RichTextTableTool;
|
|
@@ -1,16 +1,48 @@
|
|
|
1
1
|
import { ControlSize, ControlStatus } from '../../composables/useFormField';
|
|
2
|
+
import { LocalizedFieldProps, LocalizedValue } from '../../composables/useLocalized';
|
|
2
3
|
export type RichTextTool = 'bold' | 'italic' | 'strike' | 'code' | 'h2' | 'h3' | 'h4' | 'bulletList' | 'orderedList' | 'blockquote' | 'hr' | 'link' | 'table' | 'image' | 'youtube' | 'undo' | 'redo'
|
|
3
4
|
/** A vertical rule between groups. */
|
|
4
5
|
| 'divider';
|
|
5
|
-
|
|
6
|
+
/** The keys of the second toolbar, the one that appears inside a table. */
|
|
7
|
+
export type RichTextTableTool = 'addRowAfter' | 'addRowBefore' | 'addColumnAfter' | 'addColumnBefore' | 'deleteRow' | 'deleteColumn' | 'mergeOrSplit' | 'deleteTable';
|
|
8
|
+
/**
|
|
9
|
+
* Everything this editor says out loud: a tooltip on every button, the two lines of the link
|
|
10
|
+
* bar, and the word shown while a file is going up.
|
|
11
|
+
*/
|
|
12
|
+
export type RichTextLabelKey = Exclude<RichTextTool, 'divider'> | RichTextTableTool
|
|
13
|
+
/** The accessible name of the toolbar itself. */
|
|
14
|
+
| 'toolbar' | 'linkAddress' | 'youtubeAddress' | 'apply' | 'cancel' | 'uploading';
|
|
15
|
+
/**
|
|
16
|
+
* What the editor calls its own buttons. It knows nothing about the panel it is opened in, so
|
|
17
|
+
* whoever opens it translates it; a key left out stays English.
|
|
18
|
+
*/
|
|
19
|
+
export type RichTextLabels = Partial<Record<RichTextLabelKey, string>>;
|
|
20
|
+
/**
|
|
21
|
+
* A picture going into the document: where it is right now, and what it is filed under.
|
|
22
|
+
*
|
|
23
|
+
* `path` is the library's own key, written into the document as `data-wx-path` and kept there.
|
|
24
|
+
* The address is not the picture — a bucket that moves, a signed link that expires, an image
|
|
25
|
+
* edited in place all change the URL and none of them change the key — so whoever stores the
|
|
26
|
+
* document can work the address out again from the key rather than serving last month's.
|
|
27
|
+
* Without a `path` the picture is simply an address, which is what an external one is.
|
|
28
|
+
*/
|
|
29
|
+
export interface RichTextImage {
|
|
6
30
|
url: string;
|
|
31
|
+
path?: string;
|
|
7
32
|
alt?: string;
|
|
8
33
|
}
|
|
9
|
-
/**
|
|
10
|
-
export type
|
|
11
|
-
/**
|
|
12
|
-
export type
|
|
13
|
-
|
|
34
|
+
/** What an upload answers with. */
|
|
35
|
+
export type RichTextUploadResult = RichTextImage;
|
|
36
|
+
/** Uploads one file and resolves with where it ended up. */
|
|
37
|
+
export type RichTextUpload = (file: File) => Promise<RichTextImage>;
|
|
38
|
+
/**
|
|
39
|
+
* Opens a media library and resolves with what was chosen, or `null` if cancelled. A bare
|
|
40
|
+
* string is an address and nothing else — fine for a picker with no library behind it.
|
|
41
|
+
*/
|
|
42
|
+
export type RichTextImagePicker = () => Promise<RichTextImage | string | null>;
|
|
43
|
+
/** One language's HTML, or every language's when the field is localized. */
|
|
44
|
+
export type RichTextModelValue = string | LocalizedValue;
|
|
45
|
+
export interface RichTextProps extends LocalizedFieldProps {
|
|
14
46
|
placeholder?: string;
|
|
15
47
|
disabled?: boolean;
|
|
16
48
|
readonly?: boolean;
|
|
@@ -32,6 +64,8 @@ export interface RichTextProps {
|
|
|
32
64
|
pickImage?: RichTextImagePicker;
|
|
33
65
|
/** MIME types accepted for upload. */
|
|
34
66
|
accept?: string[];
|
|
67
|
+
/** What the buttons and the link bar are called, for a panel that is not in English. */
|
|
68
|
+
labels?: RichTextLabels;
|
|
35
69
|
}
|
|
36
70
|
export interface RichTextEmits {
|
|
37
71
|
change: [html: string];
|
|
@@ -40,6 +40,23 @@ declare const _default: <T extends TableRow = TableRow>(__VLS_props: NonNullable
|
|
|
40
40
|
}) => unknown) | undefined;
|
|
41
41
|
title?: () => unknown;
|
|
42
42
|
actions?: () => unknown;
|
|
43
|
+
/**
|
|
44
|
+
* The fields of the filter, inside the panel a funnel in the header opens.
|
|
45
|
+
*
|
|
46
|
+
* Three dropdowns standing open in the header is three controls of chrome above the first
|
|
47
|
+
* row, and on a phone that is half the screen before any data. Behind the funnel they cost
|
|
48
|
+
* one button, and what they are set to is said by `applied` instead.
|
|
49
|
+
*/
|
|
50
|
+
filters?: () => unknown;
|
|
51
|
+
/**
|
|
52
|
+
* What the filters are set to, as chips the reader can take off — the strip between the
|
|
53
|
+
* header and the rows.
|
|
54
|
+
*
|
|
55
|
+
* The table gives the place and the spacing; the chips are the caller's, because only the
|
|
56
|
+
* caller knows what "rubric: News" is called and what taking it off means. Nothing is drawn
|
|
57
|
+
* while the strip holds no elements.
|
|
58
|
+
*/
|
|
59
|
+
applied?: () => unknown;
|
|
43
60
|
empty?: () => unknown;
|
|
44
61
|
footer?: () => unknown;
|
|
45
62
|
loading?: () => unknown;
|
|
@@ -68,6 +85,23 @@ declare const _default: <T extends TableRow = TableRow>(__VLS_props: NonNullable
|
|
|
68
85
|
}) => unknown) | undefined;
|
|
69
86
|
title?: () => unknown;
|
|
70
87
|
actions?: () => unknown;
|
|
88
|
+
/**
|
|
89
|
+
* The fields of the filter, inside the panel a funnel in the header opens.
|
|
90
|
+
*
|
|
91
|
+
* Three dropdowns standing open in the header is three controls of chrome above the first
|
|
92
|
+
* row, and on a phone that is half the screen before any data. Behind the funnel they cost
|
|
93
|
+
* one button, and what they are set to is said by `applied` instead.
|
|
94
|
+
*/
|
|
95
|
+
filters?: () => unknown;
|
|
96
|
+
/**
|
|
97
|
+
* What the filters are set to, as chips the reader can take off — the strip between the
|
|
98
|
+
* header and the rows.
|
|
99
|
+
*
|
|
100
|
+
* The table gives the place and the spacing; the chips are the caller's, because only the
|
|
101
|
+
* caller knows what "rubric: News" is called and what taking it off means. Nothing is drawn
|
|
102
|
+
* while the strip holds no elements.
|
|
103
|
+
*/
|
|
104
|
+
applied?: () => unknown;
|
|
71
105
|
empty?: () => unknown;
|
|
72
106
|
footer?: () => unknown;
|
|
73
107
|
loading?: () => unknown;
|
|
@@ -33,6 +33,13 @@ export interface TableColumn<T = TableRow> {
|
|
|
33
33
|
/** Heading text. Use the `header-<key>` slot for anything richer. */
|
|
34
34
|
label?: string;
|
|
35
35
|
width?: string | number;
|
|
36
|
+
/**
|
|
37
|
+
* A floor for the column — and only with `layout="auto"`.
|
|
38
|
+
*
|
|
39
|
+
* The fixed algorithm reads `width` and nothing else, and the widths ride on a `<col>`, where
|
|
40
|
+
* `min-width` is not one of the four properties that apply: declared there it computes, shows
|
|
41
|
+
* in devtools and does nothing. A fixed table sizes its columns by `width`.
|
|
42
|
+
*/
|
|
36
43
|
minWidth?: string | number;
|
|
37
44
|
align?: TableAlign;
|
|
38
45
|
/** Adds a sort control to the heading. The table reports, it does not reorder. */
|
|
@@ -153,6 +160,18 @@ export interface TableProps<T = TableRow> {
|
|
|
153
160
|
/** Adds the search field to the header. */
|
|
154
161
|
searchable?: boolean;
|
|
155
162
|
searchPlaceholder?: string;
|
|
163
|
+
/**
|
|
164
|
+
* How many filters are on.
|
|
165
|
+
*
|
|
166
|
+
* A panel of filters says nothing about itself once it is shut, and a list narrowed by
|
|
167
|
+
* something the reader cannot see is a list that looks wrong. The number rides on the funnel,
|
|
168
|
+
* and `0` leaves it bare. What the filters actually are is said by the `applied` slot.
|
|
169
|
+
*/
|
|
170
|
+
filtersCount?: number;
|
|
171
|
+
/** Name of the funnel — its tooltip, its accessible name and the heading of the panel. */
|
|
172
|
+
filtersLabel?: string;
|
|
173
|
+
/** Width of that panel: a number in pixels, or any CSS length. */
|
|
174
|
+
filtersWidth?: number | string;
|
|
156
175
|
/** How long typing settles before `search` fires. Zero reports every keystroke. */
|
|
157
176
|
searchDebounce?: number;
|
|
158
177
|
loading?: boolean;
|
|
@@ -33,6 +33,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
33
33
|
id: string;
|
|
34
34
|
readonly: boolean;
|
|
35
35
|
format: string;
|
|
36
|
+
locale: string | import('../..').DateFnsLocale;
|
|
36
37
|
valueFormat: string;
|
|
37
38
|
minDate: string | Date;
|
|
38
39
|
maxDate: string | Date;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComputedRef, InjectionKey, Ref } from 'vue';
|
|
2
|
+
import { DateFnsLocale } from '../internal/dateLocale';
|
|
3
|
+
/** A BCP-47 tag, or something that reads one — the application's own language. */
|
|
4
|
+
export type DateLocaleSource = string | Ref<string> | ComputedRef<string>;
|
|
5
|
+
/**
|
|
6
|
+
* The language every date picker below draws its calendar in.
|
|
7
|
+
*
|
|
8
|
+
* This is the language of the *interface*, not of the content: an administrator who
|
|
9
|
+
* switched the panel to Russian on a machine set to English expects the month header to
|
|
10
|
+
* follow the switch, and neither the browser nor the site's content languages know about
|
|
11
|
+
* it. A `locale` prop on the picker still wins over what is provided here.
|
|
12
|
+
*/
|
|
13
|
+
export declare const dateLocaleKey: InjectionKey<DateLocaleSource>;
|
|
14
|
+
/**
|
|
15
|
+
* Tells every date picker below which language to draw its calendar in.
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* app.provide(dateLocaleKey, computed(() => admin.i18n.state.locale))
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function provideDateLocale(locale: DateLocaleSource): void;
|
|
22
|
+
/** The calendar's language: the `locale` prop, then the application's, then the browser's. */
|
|
23
|
+
export declare function useDateLocale(locale: () => string | DateFnsLocale | undefined): ComputedRef<DateFnsLocale>;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export { WebxUI, type WebxUiOptions } from './plugin';
|
|
|
3
3
|
export type { ControlSize, ControlStatus, ValidationErrors } from './composables/useFormField';
|
|
4
4
|
export { useControlAttrs, type ControlAttrs } from './composables/useControlAttrs';
|
|
5
5
|
export { provideLocales, useLocales, useLocalized, localeLabel, localizedValue, localesKey, type LocaleOption, type LocalesContext, type LocalizedValue, type LocalizedFieldProps, } from './composables/useLocalized';
|
|
6
|
+
export { provideDateLocale, useDateLocale, dateLocaleKey, type DateLocaleSource, } from './composables/useDateLocale';
|
|
7
|
+
export type { DateFnsLocale } from './internal/dateLocale';
|
|
6
8
|
export { useElementWidth } from './composables/useElementWidth';
|
|
7
9
|
export { useHoverPointer } from './composables/useHoverPointer';
|
|
8
10
|
export { useToast, toast, toastQueue, dismissToast, removeToast, clearToasts, type ToastApi, type ToastHandle, type ToastOptions, type ToastRecord, type ToastType, type ToastAction, } from './composables/useToast';
|