@humanonlyweb/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.
- package/dist/components/breadcrumbs/Breadcrumbs.js +59 -0
- package/dist/components/breadcrumbs/Breadcrumbs.vue.d.ts +14 -0
- package/dist/components/checkbox-group/CheckboxGroup.js +89 -0
- package/dist/components/checkbox-group/CheckboxGroup.vue.d.ts +43 -0
- package/dist/components/fieldset/Fieldset.js +59 -0
- package/dist/components/fieldset/Fieldset.vue.d.ts +29 -0
- package/dist/components/pagination/Pagination.js +128 -0
- package/dist/components/pagination/Pagination.vue.d.ts +24 -0
- package/dist/components/password-input/PasswordInput.js +151 -0
- package/dist/components/password-input/PasswordInput.vue.d.ts +32 -0
- package/dist/components/progress/Progress.js +52 -0
- package/dist/components/progress/Progress.vue.d.ts +17 -0
- package/dist/components/segmented/Segmented.js +5 -5
- package/dist/components/tabs/Tabs.js +29 -25
- package/dist/components/tag-input/TagInput.js +186 -0
- package/dist/components/tag-input/TagInput.vue.d.ts +36 -0
- package/dist/components/visually-hidden/VisuallyHidden.js +16 -0
- package/dist/components/visually-hidden/VisuallyHidden.vue.d.ts +19 -0
- package/dist/docs/README.md +8 -0
- package/dist/docs/changelog.md +8 -1
- package/dist/docs/components/breadcrumbs.md +81 -0
- package/dist/docs/components/checkbox-group.md +118 -0
- package/dist/docs/components/fieldset.md +65 -0
- package/dist/docs/components/pagination.md +62 -0
- package/dist/docs/components/password-input.md +55 -0
- package/dist/docs/components/progress.md +56 -0
- package/dist/docs/components/tag-input.md +88 -0
- package/dist/docs/components/visually-hidden.md +53 -0
- package/dist/docs/forms.md +1 -1
- package/dist/docs/installation.md +0 -2
- package/dist/docs/localisation.md +2 -0
- package/dist/docs/styling.md +16 -0
- package/dist/index.d.ts +42 -28
- package/dist/index.js +39 -27
- package/dist/nuxt/module.d.ts +1 -1
- package/dist/nuxt/module.js +9 -1
- package/dist/package.js +1 -1
- package/dist/styles/core.css +26 -0
- package/dist/translations.d.ts +15 -1
- package/dist/translations.js +7 -0
- package/dist/types.d.ts +8 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,39 +6,51 @@ import { TOASTER_KEY, createToaster, useToast } from "./composables/use-toast.js
|
|
|
6
6
|
import { defaultTranslations } from "./translations.js";
|
|
7
7
|
import { UI_CONFIG_KEY, createUi, useTranslations, useUiConfig } from "./config.js";
|
|
8
8
|
import _sfc_main$3 from "./components/avatar/AvatarGroup.js";
|
|
9
|
-
import _sfc_main$4 from "./components/
|
|
10
|
-
import _sfc_main$
|
|
9
|
+
import _sfc_main$4 from "./components/breadcrumbs/Breadcrumbs.js";
|
|
10
|
+
import _sfc_main$5 from "./components/button/Button.js";
|
|
11
|
+
import _sfc_main$13 from "./components/button/IconButton.js";
|
|
11
12
|
import { useField } from "./composables/use-field.js";
|
|
12
|
-
import _sfc_main$
|
|
13
|
+
import _sfc_main$6 from "./components/checkbox/Checkbox.js";
|
|
14
|
+
import _sfc_main$12 from "./components/fieldset/Fieldset.js";
|
|
15
|
+
import _sfc_main$7 from "./components/checkbox-group/CheckboxGroup.js";
|
|
13
16
|
import { useCombobox } from "./composables/use-combobox.js";
|
|
14
17
|
import { firstFocusable, useAnchor, usePopoverState } from "./composables/use-popover.js";
|
|
15
|
-
import _sfc_main$
|
|
16
|
-
import _sfc_main$
|
|
17
|
-
import _sfc_main$
|
|
18
|
+
import _sfc_main$8 from "./components/combobox/Combobox.js";
|
|
19
|
+
import _sfc_main$11 from "./components/dialog/Dialog.js";
|
|
20
|
+
import _sfc_main$9 from "./components/dialog/ConfirmDialog.js";
|
|
18
21
|
import { isMenuSeparator, useMenu } from "./composables/use-menu.js";
|
|
19
|
-
import _sfc_main$
|
|
20
|
-
import _sfc_main$
|
|
22
|
+
import _sfc_main$10 from "./components/context-menu/ContextMenu.js";
|
|
23
|
+
import _sfc_main$14 from "./components/input/Input.js";
|
|
21
24
|
import { parseChord, platformFrom, usePlatform } from "./composables/use-platform.js";
|
|
22
|
-
import _sfc_main$
|
|
23
|
-
import _sfc_main$
|
|
24
|
-
import _sfc_main$
|
|
25
|
-
import _sfc_main$
|
|
25
|
+
import _sfc_main$15 from "./components/kbd/Kbd.js";
|
|
26
|
+
import _sfc_main$16 from "./components/menu/Menu.js";
|
|
27
|
+
import _sfc_main$17 from "./components/otp-input/OtpInput.js";
|
|
28
|
+
import _sfc_main$18 from "./components/pagination/Pagination.js";
|
|
29
|
+
import _sfc_main$19 from "./components/password-input/PasswordInput.js";
|
|
30
|
+
import _sfc_main$20 from "./components/popover/Popover.js";
|
|
31
|
+
import _sfc_main$21 from "./components/progress/Progress.js";
|
|
26
32
|
import { useRovingSelection } from "./composables/use-roving-selection.js";
|
|
27
|
-
import _sfc_main$
|
|
33
|
+
import _sfc_main$22 from "./components/radio-group/RadioGroup.js";
|
|
28
34
|
import { useSlideIndicator } from "./composables/use-slide-indicator.js";
|
|
29
|
-
import _sfc_main$
|
|
35
|
+
import _sfc_main$23 from "./components/segmented/Segmented.js";
|
|
30
36
|
import { useSelect } from "./composables/use-select.js";
|
|
31
|
-
import _sfc_main$
|
|
32
|
-
import _sfc_main$
|
|
33
|
-
import _sfc_main$
|
|
34
|
-
import _sfc_main$
|
|
35
|
-
import _sfc_main$
|
|
36
|
-
import _sfc_main$
|
|
37
|
-
import _sfc_main$
|
|
38
|
-
import _sfc_main$
|
|
39
|
-
import _sfc_main$
|
|
40
|
-
import _sfc_main$
|
|
41
|
-
import _sfc_main$
|
|
42
|
-
import _sfc_main$
|
|
37
|
+
import _sfc_main$24 from "./components/select/Select.js";
|
|
38
|
+
import _sfc_main$25 from "./components/slider/Slider.js";
|
|
39
|
+
import _sfc_main$26 from "./components/spin-button/SpinButton.js";
|
|
40
|
+
import _sfc_main$27 from "./components/split-button/SplitButton.js";
|
|
41
|
+
import _sfc_main$28 from "./components/switch/Switch.js";
|
|
42
|
+
import _sfc_main$29 from "./components/table/Table.js";
|
|
43
|
+
import _sfc_main$30 from "./components/tabs/Tabs.js";
|
|
44
|
+
import _sfc_main$31 from "./components/tag-input/TagInput.js";
|
|
45
|
+
import _sfc_main$32 from "./components/textarea/Textarea.js";
|
|
46
|
+
import _sfc_main$33 from "./components/toast/ToastItem.js";
|
|
47
|
+
import _sfc_main$34 from "./components/toast/ToastViewport.js";
|
|
48
|
+
import _sfc_main$35 from "./components/toolbar/Toolbar.js";
|
|
49
|
+
import _sfc_main$36 from "./components/tooltip/Tooltip.js";
|
|
50
|
+
import _sfc_main$37 from "./components/visually-hidden/VisuallyHidden.js";
|
|
43
51
|
import { useForm } from "./composables/use-form.js";
|
|
44
|
-
|
|
52
|
+
import { initDirectivesForSSR } from "vue";
|
|
53
|
+
//#region src/index.ts
|
|
54
|
+
initDirectivesForSSR();
|
|
55
|
+
//#endregion
|
|
56
|
+
export { ACCORDION_KEY, _sfc_main as Accordion, _sfc_main$1 as AccordionItem, _sfc_main$2 as Avatar, _sfc_main$3 as AvatarGroup, _sfc_main$4 as Breadcrumbs, _sfc_main$5 as Button, _sfc_main$6 as Checkbox, _sfc_main$7 as CheckboxGroup, _sfc_main$8 as Combobox, _sfc_main$9 as ConfirmDialog, _sfc_main$10 as ContextMenu, _sfc_main$11 as Dialog, _sfc_main$12 as Fieldset, _sfc_main$13 as IconButton, _sfc_main$14 as Input, _sfc_main$15 as Kbd, _sfc_main$16 as Menu, _sfc_main$17 as OtpInput, _sfc_main$18 as Pagination, _sfc_main$19 as PasswordInput, _sfc_main$20 as Popover, _sfc_main$21 as Progress, _sfc_main$22 as RadioGroup, _sfc_main$23 as Segmented, _sfc_main$24 as Select, _sfc_main$25 as Slider, _sfc_main$26 as SpinButton, _sfc_main$27 as SplitButton, _sfc_main$28 as Switch, TOASTER_KEY, _sfc_main$29 as Table, _sfc_main$30 as Tabs, _sfc_main$31 as TagInput, _sfc_main$32 as Textarea, _sfc_main$33 as ToastItem, _sfc_main$34 as ToastViewport, _sfc_main$35 as Toolbar, _sfc_main$36 as Tooltip, UI_CONFIG_KEY, _sfc_main$37 as VisuallyHidden, createToaster, createUi, defaultTranslations, firstFocusable, isMenuSeparator, parseChord, platformFrom, useAccordionItem, useAnchor, useCombobox, useField, useForm, useMenu, usePlatform, usePopoverState, useRovingSelection, useSelect, useSlideIndicator, useToast, useTranslations, useUiConfig };
|
package/dist/nuxt/module.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/nuxt/module.d.ts
|
|
2
2
|
/** Auto-registered as `<{prefix}{name}>`. A test keeps it in step with `src/index.ts`. */
|
|
3
|
-
export declare const COMPONENTS: readonly ["Accordion", "AccordionItem", "Avatar", "AvatarGroup", "Button", "Checkbox", "Combobox", "ConfirmDialog", "ContextMenu", "Dialog", "IconButton", "Input", "Kbd", "Menu", "OtpInput", "Popover", "RadioGroup", "Segmented", "Select", "Slider", "SpinButton", "SplitButton", "Switch", "Table", "Tabs", "Textarea", "ToastItem", "ToastViewport", "Toolbar", "Tooltip"];
|
|
3
|
+
export declare const COMPONENTS: readonly ["Accordion", "AccordionItem", "Avatar", "AvatarGroup", "Breadcrumbs", "Button", "Checkbox", "CheckboxGroup", "Combobox", "ConfirmDialog", "ContextMenu", "Dialog", "Fieldset", "IconButton", "Input", "Kbd", "Menu", "OtpInput", "Pagination", "PasswordInput", "Popover", "Progress", "RadioGroup", "Segmented", "Select", "Slider", "SpinButton", "SplitButton", "Switch", "Table", "Tabs", "TagInput", "Textarea", "ToastItem", "ToastViewport", "Toolbar", "Tooltip", "VisuallyHidden"];
|
|
4
4
|
export declare const COMPOSABLES: readonly ["useField", "useForm", "useToast"];
|
|
5
5
|
export interface ModuleOptions {
|
|
6
6
|
/** Auto-imported component prefix: `Ui` gives `<UiButton>`. */
|
package/dist/nuxt/module.js
CHANGED
|
@@ -8,18 +8,24 @@ const COMPONENTS = [
|
|
|
8
8
|
"AccordionItem",
|
|
9
9
|
"Avatar",
|
|
10
10
|
"AvatarGroup",
|
|
11
|
+
"Breadcrumbs",
|
|
11
12
|
"Button",
|
|
12
13
|
"Checkbox",
|
|
14
|
+
"CheckboxGroup",
|
|
13
15
|
"Combobox",
|
|
14
16
|
"ConfirmDialog",
|
|
15
17
|
"ContextMenu",
|
|
16
18
|
"Dialog",
|
|
19
|
+
"Fieldset",
|
|
17
20
|
"IconButton",
|
|
18
21
|
"Input",
|
|
19
22
|
"Kbd",
|
|
20
23
|
"Menu",
|
|
21
24
|
"OtpInput",
|
|
25
|
+
"Pagination",
|
|
26
|
+
"PasswordInput",
|
|
22
27
|
"Popover",
|
|
28
|
+
"Progress",
|
|
23
29
|
"RadioGroup",
|
|
24
30
|
"Segmented",
|
|
25
31
|
"Select",
|
|
@@ -29,11 +35,13 @@ const COMPONENTS = [
|
|
|
29
35
|
"Switch",
|
|
30
36
|
"Table",
|
|
31
37
|
"Tabs",
|
|
38
|
+
"TagInput",
|
|
32
39
|
"Textarea",
|
|
33
40
|
"ToastItem",
|
|
34
41
|
"ToastViewport",
|
|
35
42
|
"Toolbar",
|
|
36
|
-
"Tooltip"
|
|
43
|
+
"Tooltip",
|
|
44
|
+
"VisuallyHidden"
|
|
37
45
|
];
|
|
38
46
|
const COMPOSABLES = [
|
|
39
47
|
"useField",
|
package/dist/package.js
CHANGED
package/dist/styles/core.css
CHANGED
|
@@ -281,4 +281,30 @@
|
|
|
281
281
|
[data-part="otp-input"]::selection {
|
|
282
282
|
background: transparent;
|
|
283
283
|
}
|
|
284
|
+
|
|
285
|
+
/* Fieldset: reset the browser's frame, so the legend styles like a label. */
|
|
286
|
+
[data-part="fieldset"] {
|
|
287
|
+
min-inline-size: 0;
|
|
288
|
+
margin: 0;
|
|
289
|
+
padding: 0;
|
|
290
|
+
border: 0;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
[data-part="fieldset-legend"] {
|
|
294
|
+
padding: 0;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/* Visually hidden: in the accessibility tree, out of the layout. Not `display: none`,
|
|
298
|
+
so screen readers still read it. */
|
|
299
|
+
[data-part="visually-hidden"] {
|
|
300
|
+
position: absolute;
|
|
301
|
+
width: 1px;
|
|
302
|
+
height: 1px;
|
|
303
|
+
margin: -1px;
|
|
304
|
+
padding: 0;
|
|
305
|
+
overflow: hidden;
|
|
306
|
+
clip-path: inset(50%);
|
|
307
|
+
white-space: nowrap;
|
|
308
|
+
border: 0;
|
|
309
|
+
}
|
|
284
310
|
}
|
package/dist/translations.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export interface UiTranslations {
|
|
|
27
27
|
characterCount: (count: number, max: number) => string;
|
|
28
28
|
/** Select with several picked: what follows the first label. */
|
|
29
29
|
moreSelected: (count: number) => string;
|
|
30
|
-
/** Combobox chip's remove button. */
|
|
30
|
+
/** Combobox or TagInput chip's remove button. */
|
|
31
31
|
removeItem: (label: string) => string;
|
|
32
32
|
/** Combobox with `multiple`: what's picked, part of the input's description. */
|
|
33
33
|
selectedItems: (labels: string[]) => string;
|
|
@@ -46,6 +46,20 @@ export interface UiTranslations {
|
|
|
46
46
|
rangeEnd: string;
|
|
47
47
|
/** AvatarGroup's "+N" chip, when `overflow-label` isn't set. */
|
|
48
48
|
moreAvatars: (count: number) => string;
|
|
49
|
+
/** Pagination's nav landmark name, when `label` isn't set. */
|
|
50
|
+
pagination: string;
|
|
51
|
+
/** Pagination's previous-page button. */
|
|
52
|
+
previousPage: string;
|
|
53
|
+
/** Pagination's next-page button. */
|
|
54
|
+
nextPage: string;
|
|
55
|
+
/** A pagination page button's name, e.g. "Page 3". */
|
|
56
|
+
page: (page: number) => string;
|
|
57
|
+
/** PasswordInput's reveal button, while the password is concealed. */
|
|
58
|
+
showPassword: string;
|
|
59
|
+
/** PasswordInput's reveal button, while the password is shown. */
|
|
60
|
+
hidePassword: string;
|
|
61
|
+
/** Breadcrumbs' nav landmark name, when `label` isn't set. */
|
|
62
|
+
breadcrumbs: string;
|
|
49
63
|
/** Spoken names of Kbd's special keys. */
|
|
50
64
|
keys: {
|
|
51
65
|
command: string;
|
package/dist/translations.js
CHANGED
|
@@ -22,6 +22,13 @@ const defaultTranslations = {
|
|
|
22
22
|
rangeStart: "Minimum",
|
|
23
23
|
rangeEnd: "Maximum",
|
|
24
24
|
moreAvatars: (count) => `${count} more`,
|
|
25
|
+
pagination: "Pagination",
|
|
26
|
+
previousPage: "Previous page",
|
|
27
|
+
nextPage: "Next page",
|
|
28
|
+
page: (page) => `Page ${page}`,
|
|
29
|
+
showPassword: "Show password",
|
|
30
|
+
hidePassword: "Hide password",
|
|
31
|
+
breadcrumbs: "Breadcrumbs",
|
|
25
32
|
keys: {
|
|
26
33
|
command: "Command",
|
|
27
34
|
control: "Control",
|
package/dist/types.d.ts
CHANGED
|
@@ -36,6 +36,14 @@ export type ButtonType = "button" | "submit" | "reset";
|
|
|
36
36
|
export type LinkTarget = "_blank" | "_self" | "_parent" | "_top";
|
|
37
37
|
/** Whatever the app's router link accepts (`RouteLocationRaw` for vue-router). */
|
|
38
38
|
export type LinkTo = string | Record<string, unknown>;
|
|
39
|
+
export interface BreadcrumbItem {
|
|
40
|
+
/** Text of the crumb. */
|
|
41
|
+
label: string;
|
|
42
|
+
/** Route for the configured router link (`createUi({ link })`), rendered instead of an anchor. */
|
|
43
|
+
to?: LinkTo;
|
|
44
|
+
/** Plain URL, for crumbs without a router location. */
|
|
45
|
+
href?: string;
|
|
46
|
+
}
|
|
39
47
|
export type ToastTone = "success" | "danger" | "info";
|
|
40
48
|
export interface Toast {
|
|
41
49
|
id: number;
|