@aleph-alpha/ui-library 5.6.0 → 5.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 +4 -0
- package/config.d.ts +5 -1
- package/config.js +23 -1
- package/dist/system/components/UiBreadcrumb/UiBreadcrumb.vue.d.ts +17 -0
- package/dist/system/components/UiBreadcrumb/UiBreadcrumbEllipsis.vue.d.ts +17 -0
- package/dist/system/components/UiBreadcrumb/UiBreadcrumbItem.vue.d.ts +17 -0
- package/dist/system/components/UiBreadcrumb/UiBreadcrumbLink.vue.d.ts +18 -0
- package/dist/system/components/UiBreadcrumb/UiBreadcrumbList.vue.d.ts +17 -0
- package/dist/system/components/UiBreadcrumb/UiBreadcrumbPage.vue.d.ts +17 -0
- package/dist/system/components/UiBreadcrumb/UiBreadcrumbSeparator.vue.d.ts +17 -0
- package/dist/system/components/UiBreadcrumb/index.d.ts +8 -0
- package/dist/system/components/UiBreadcrumb/types.d.ts +22 -0
- package/dist/system/components/UiField/types.d.ts +2 -1
- package/dist/system/components/UiToggleGroup/types.d.ts +0 -5
- package/dist/system/components/core/breadcrumb/Breadcrumb.vue.d.ts +21 -0
- package/dist/system/components/core/breadcrumb/BreadcrumbEllipsis.vue.d.ts +21 -0
- package/dist/system/components/core/breadcrumb/BreadcrumbItem.vue.d.ts +21 -0
- package/dist/system/components/core/breadcrumb/BreadcrumbLink.vue.d.ts +24 -0
- package/dist/system/components/core/breadcrumb/BreadcrumbList.vue.d.ts +21 -0
- package/dist/system/components/core/breadcrumb/BreadcrumbPage.vue.d.ts +21 -0
- package/dist/system/components/core/breadcrumb/BreadcrumbSeparator.vue.d.ts +21 -0
- package/dist/system/components/core/breadcrumb/index.d.ts +7 -0
- package/dist/system/components/core/listbox/Listbox.vue.d.ts +28 -2
- package/dist/system/components/core/listbox/context.d.ts +21 -0
- package/dist/system/components/index.d.ts +1 -0
- package/dist/system/lib.js +10062 -9711
- package/dist/system/patterns/UiDatePicker/UiDatePicker.vue.d.ts +1 -1
- package/dist/system/story-sidebar-icons.json +6 -0
- package/package.json +5 -5
- package/src/components/UiAutocomplete/UiAutocomplete.stories.ts +1 -1
- package/src/components/UiBreadcrumb/UiBreadcrumb.stories.ts +1419 -0
- package/src/components/UiBreadcrumb/UiBreadcrumb.vue +19 -0
- package/src/components/UiBreadcrumb/UiBreadcrumbEllipsis.vue +22 -0
- package/src/components/UiBreadcrumb/UiBreadcrumbItem.vue +19 -0
- package/src/components/UiBreadcrumb/UiBreadcrumbLink.vue +26 -0
- package/src/components/UiBreadcrumb/UiBreadcrumbList.vue +19 -0
- package/src/components/UiBreadcrumb/UiBreadcrumbPage.vue +19 -0
- package/src/components/UiBreadcrumb/UiBreadcrumbSeparator.vue +22 -0
- package/src/components/UiBreadcrumb/index.ts +8 -0
- package/src/components/UiBreadcrumb/types.ts +28 -0
- package/src/components/UiCheckbox/UiCheckbox.stories.ts +625 -74
- package/src/components/UiDropdownMenu/UiDropdownMenuTrigger.vue +2 -0
- package/src/components/UiField/UiField.stories.ts +1 -1
- package/src/components/UiField/types.ts +2 -1
- package/src/components/UiListbox/UiListbox.stories.ts +1283 -30
- package/src/components/UiListbox/__tests__/UiListbox.test.ts +70 -35
- package/src/components/UiRadioGroup/UiRadioGroup.stories.ts +995 -0
- package/src/components/UiSelect/UiSelect.stories.ts +1 -1
- package/src/components/UiSwitch/UiSwitch.stories.ts +706 -9
- package/src/components/UiSwitch/__tests__/UiSwitch.test.ts +2 -6
- package/src/components/UiToggle/UiToggle.stories.ts +961 -130
- package/src/components/UiToggle/UiToggle.vue +8 -1
- package/src/components/UiToggle/__tests__/UiToggle.test.ts +55 -65
- package/src/components/UiToggleGroup/UiToggleGroup.stories.ts +1060 -173
- package/src/components/UiToggleGroup/UiToggleGroup.vue +4 -2
- package/src/components/UiToggleGroup/__tests__/UiToggleGroup.test.ts +117 -325
- package/src/components/UiToggleGroup/types.ts +0 -5
- package/src/components/core/breadcrumb/Breadcrumb.vue +13 -0
- package/src/components/core/breadcrumb/BreadcrumbEllipsis.vue +23 -0
- package/src/components/core/breadcrumb/BreadcrumbItem.vue +17 -0
- package/src/components/core/breadcrumb/BreadcrumbLink.vue +29 -0
- package/src/components/core/breadcrumb/BreadcrumbList.vue +22 -0
- package/src/components/core/breadcrumb/BreadcrumbPage.vue +20 -0
- package/src/components/core/breadcrumb/BreadcrumbSeparator.vue +22 -0
- package/src/components/core/breadcrumb/index.ts +7 -0
- package/src/components/core/field/FieldDescription.vue +1 -1
- package/src/components/core/field/FieldLabel.vue +3 -2
- package/src/components/core/field/FieldTitle.vue +1 -1
- package/src/components/core/listbox/Listbox.vue +14 -2
- package/src/components/core/listbox/ListboxContent.vue +61 -3
- package/src/components/core/listbox/ListboxItem.vue +6 -1
- package/src/components/core/listbox/context.ts +34 -0
- package/src/components/core/toggle/Toggle.vue +15 -1
- package/src/components/core/toggle/index.ts +2 -2
- package/src/components/core/toggle-group/ToggleGroup.vue +1 -1
- package/src/components/core/toggle-group/index.ts +5 -2
- package/src/components/index.ts +1 -0
- package/src/components/UiCheckbox/__tests__/UiCheckbox.test.ts +0 -14
- package/src/components/UiRadioGroup/__tests__/UiRadioGroup.test.ts +0 -412
package/README.md
CHANGED
|
@@ -293,6 +293,10 @@ Example:
|
|
|
293
293
|
pnpm dlx shadcn-vue@latest add tooltip
|
|
294
294
|
```
|
|
295
295
|
|
|
296
|
+
Run the CLI on Node 24 (`nvm use 24`) rather than the pinned 20.19.0, otherwise its dependencies
|
|
297
|
+
abort with `ERR_PNPM_UNSUPPORTED_ENGINE`. Afterwards, repoint any generated `@lucide/vue` icon
|
|
298
|
+
import to `lucide-vue-next`, which is the icon package this library depends on.
|
|
299
|
+
|
|
296
300
|
Please refer to [CONTRIBUTION_GUIDELINES.md](./docs/CONTRIBUTION_GUIDELINES.md) for more details on the "Strict Facade" pattern and accessibility requirements.
|
|
297
301
|
|
|
298
302
|
## Testing
|
package/config.d.ts
CHANGED
|
@@ -241,17 +241,21 @@ export declare const presetUiLibraryThemeFromTokens: (
|
|
|
241
241
|
* border color to `border/surface/focus-ring` and draws a 2px ring in the
|
|
242
242
|
* focus-ring color at 50% opacity. Give the element a border so the border
|
|
243
243
|
* color can show, e.g. `border border-transparent`.
|
|
244
|
+
* - `ui-focus-ring-inset` — same ring, drawn inside the element's own box.
|
|
245
|
+
* Apply to options that live in a clipping scroll container (listbox options,
|
|
246
|
+
* menu items), where an outset ring would be cut off by the overflow.
|
|
244
247
|
* - `ui-focus-ring-within` — same visual, but triggered on `:focus-within`.
|
|
245
248
|
* Apply to container controls that wrap the real focusable element (text
|
|
246
249
|
* field wrappers, tag inputs, comboboxes).
|
|
247
250
|
*
|
|
248
|
-
*
|
|
251
|
+
* All three are namespaced with the `ui-` prefix on purpose: an unprefixed
|
|
249
252
|
* `focus-ring` would be parsed by UnoCSS as the `focus:` variant of the `ring`
|
|
250
253
|
* utility and emit an unintended `.focus-ring:focus` rule.
|
|
251
254
|
*
|
|
252
255
|
* @example
|
|
253
256
|
* ```html
|
|
254
257
|
* <button class="ui-focus-ring border border-transparent">Save</button>
|
|
258
|
+
* <div role="option" class="ui-focus-ring-inset rounded-sm">Apple</div>
|
|
255
259
|
* <div class="ui-focus-ring-within border border-input"><input /></div>
|
|
256
260
|
* ```
|
|
257
261
|
*/
|
package/config.js
CHANGED
|
@@ -928,6 +928,11 @@ export const presetUiLibraryThemeFromTokens = (options = {}) => {
|
|
|
928
928
|
:root, :host {
|
|
929
929
|
--font-sans: '${fontBody}', sans-serif;
|
|
930
930
|
--font-heading: '${fontHeading}', sans-serif;
|
|
931
|
+
}
|
|
932
|
+
*,
|
|
933
|
+
::before,
|
|
934
|
+
::after {
|
|
935
|
+
font-variant-ligatures: no-contextual;
|
|
931
936
|
}`.trim();
|
|
932
937
|
|
|
933
938
|
// Return preset with token-related config: CSS variables, token colors, semantic overrides, typography, fonts
|
|
@@ -1147,6 +1152,18 @@ const vHoverOverlayCSS = `
|
|
|
1147
1152
|
border-color: oklch(var(--border-surface-focus-ring));
|
|
1148
1153
|
box-shadow: 0 0 0 2px oklch(var(--ring) / 0.5);
|
|
1149
1154
|
}
|
|
1155
|
+
/* Companion for options inside a clipping scroll container (listbox options,
|
|
1156
|
+
menu items). An outset ring would be cut off by the container's overflow, so
|
|
1157
|
+
the same ring is drawn inside the element's own box instead. */
|
|
1158
|
+
.ui-focus-ring-inset {
|
|
1159
|
+
outline: none;
|
|
1160
|
+
transition: box-shadow 0.15s ease;
|
|
1161
|
+
}
|
|
1162
|
+
.ui-focus-ring-inset:focus-visible {
|
|
1163
|
+
outline: none;
|
|
1164
|
+
box-shadow: inset 0 0 0 2px oklch(var(--ring) / 0.5);
|
|
1165
|
+
border-radius: inherit;
|
|
1166
|
+
}
|
|
1150
1167
|
/* Companion for container/wrapper controls (text field wrappers, tag inputs,
|
|
1151
1168
|
comboboxes) that surface the ring when any descendant is focused. Same visual
|
|
1152
1169
|
as "ui-focus-ring", triggered on :focus-within instead of :focus-visible. */
|
|
@@ -1163,6 +1180,7 @@ const vHoverOverlayCSS = `
|
|
|
1163
1180
|
}
|
|
1164
1181
|
@media (prefers-reduced-motion: reduce) {
|
|
1165
1182
|
.ui-focus-ring,
|
|
1183
|
+
.ui-focus-ring-inset,
|
|
1166
1184
|
.ui-focus-ring-within {
|
|
1167
1185
|
transition: none;
|
|
1168
1186
|
}
|
|
@@ -1186,17 +1204,21 @@ const vHoverOverlayCSS = `
|
|
|
1186
1204
|
* border color to `border/surface/focus-ring` and draws a 2px ring in the
|
|
1187
1205
|
* focus-ring color at 50% opacity. Give the element a border so the border
|
|
1188
1206
|
* color can show, e.g. `border border-transparent`.
|
|
1207
|
+
* - `ui-focus-ring-inset` — same ring, drawn inside the element's own box.
|
|
1208
|
+
* Apply to options that live in a clipping scroll container (listbox options,
|
|
1209
|
+
* menu items), where an outset ring would be cut off by the overflow.
|
|
1189
1210
|
* - `ui-focus-ring-within` — same visual, but triggered on `:focus-within`.
|
|
1190
1211
|
* Apply to container controls that wrap the real focusable element (text
|
|
1191
1212
|
* field wrappers, tag inputs, comboboxes).
|
|
1192
1213
|
*
|
|
1193
|
-
*
|
|
1214
|
+
* All three are namespaced with the `ui-` prefix on purpose: an unprefixed
|
|
1194
1215
|
* `focus-ring` would be parsed by UnoCSS as the `focus:` variant of the `ring`
|
|
1195
1216
|
* utility and emit an unintended `.focus-ring:focus` rule.
|
|
1196
1217
|
*
|
|
1197
1218
|
* @example
|
|
1198
1219
|
* ```html
|
|
1199
1220
|
* <button class="ui-focus-ring border border-transparent">Save</button>
|
|
1221
|
+
* <div role="option" class="ui-focus-ring-inset rounded-sm">Apple</div>
|
|
1200
1222
|
* <div class="ui-focus-ring-within border border-input"><input /></div>
|
|
1201
1223
|
* ```
|
|
1202
1224
|
*
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: any;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: any;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: any;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UiBreadcrumbLinkProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
rootEl: any;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<UiBreadcrumbLinkProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UiBreadcrumbLinkProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: any;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: any;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: any;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as UiBreadcrumb } from './UiBreadcrumb.vue';
|
|
2
|
+
export { default as UiBreadcrumbEllipsis } from './UiBreadcrumbEllipsis.vue';
|
|
3
|
+
export { default as UiBreadcrumbItem } from './UiBreadcrumbItem.vue';
|
|
4
|
+
export { default as UiBreadcrumbLink } from './UiBreadcrumbLink.vue';
|
|
5
|
+
export { default as UiBreadcrumbList } from './UiBreadcrumbList.vue';
|
|
6
|
+
export { default as UiBreadcrumbPage } from './UiBreadcrumbPage.vue';
|
|
7
|
+
export { default as UiBreadcrumbSeparator } from './UiBreadcrumbSeparator.vue';
|
|
8
|
+
export type * from './types';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A navigation trail showing the user's location within a site or app hierarchy.
|
|
3
|
+
* Renders as an ordered list inside a labelled `nav` landmark.
|
|
4
|
+
* @category Navigation
|
|
5
|
+
* @useCases page hierarchy, navigation trail, folder path, wizard location, nested resource path
|
|
6
|
+
* @keywords breadcrumb, navigation, trail, path, hierarchy, crumbs
|
|
7
|
+
* @related UiNavigationMenu, UiTabs
|
|
8
|
+
*/
|
|
9
|
+
export type UiBreadcrumbProps = Record<string, never>;
|
|
10
|
+
export type UiBreadcrumbListProps = Record<string, never>;
|
|
11
|
+
export type UiBreadcrumbItemProps = Record<string, never>;
|
|
12
|
+
export type UiBreadcrumbLinkProps = {
|
|
13
|
+
/**
|
|
14
|
+
* Render as child element (merges props into slotted element instead of wrapping).
|
|
15
|
+
* Use when integrating with router-link or NuxtLink.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
asChild?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export type UiBreadcrumbPageProps = Record<string, never>;
|
|
21
|
+
export type UiBreadcrumbSeparatorProps = Record<string, never>;
|
|
22
|
+
export type UiBreadcrumbEllipsisProps = Record<string, never>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Layout orientation supported by `UiField`.
|
|
3
3
|
* - `vertical`: stacked layout (label above input).
|
|
4
|
+
* - `horizontal`: side-by-side layout that never collapses.
|
|
4
5
|
* - `responsive`: horizontal by default, collapses to vertical on small screens.
|
|
5
6
|
*/
|
|
6
|
-
export type UiFieldOrientation = 'vertical' | 'responsive';
|
|
7
|
+
export type UiFieldOrientation = 'vertical' | 'horizontal' | 'responsive';
|
|
7
8
|
/**
|
|
8
9
|
* Error shape supported by `UiFieldError`.
|
|
9
10
|
*/
|
|
@@ -27,11 +27,6 @@ export interface UiToggleGroupBaseProps {
|
|
|
27
27
|
* @default true
|
|
28
28
|
*/
|
|
29
29
|
rovingFocus?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* The orientation of the toggle group for keyboard navigation.
|
|
32
|
-
* @default 'horizontal'
|
|
33
|
-
*/
|
|
34
|
-
orientation?: 'horizontal' | 'vertical';
|
|
35
30
|
}
|
|
36
31
|
/**
|
|
37
32
|
* Props for single selection toggle group.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLSpanElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLLIElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLIElement>;
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PrimitiveProps } from 'reka-ui';
|
|
2
|
+
import { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = PrimitiveProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: any;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
16
|
+
as: import('reka-ui').AsTag | import('vue').Component;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLOListElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLOListElement>;
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLSpanElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLLIElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLIElement>;
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Breadcrumb } from './Breadcrumb.vue';
|
|
2
|
+
export { default as BreadcrumbEllipsis } from './BreadcrumbEllipsis.vue';
|
|
3
|
+
export { default as BreadcrumbItem } from './BreadcrumbItem.vue';
|
|
4
|
+
export { default as BreadcrumbLink } from './BreadcrumbLink.vue';
|
|
5
|
+
export { default as BreadcrumbList } from './BreadcrumbList.vue';
|
|
6
|
+
export { default as BreadcrumbPage } from './BreadcrumbPage.vue';
|
|
7
|
+
export { default as BreadcrumbSeparator } from './BreadcrumbSeparator.vue';
|
|
@@ -8,7 +8,20 @@ declare function __VLS_template(): {
|
|
|
8
8
|
slots: {
|
|
9
9
|
default?(_: {}): any;
|
|
10
10
|
};
|
|
11
|
-
refs: {
|
|
11
|
+
refs: {
|
|
12
|
+
rootRef: import('vue').ShallowUnwrapRef<{
|
|
13
|
+
highlightedElement: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
14
|
+
highlightItem: (value: import('reka-ui').AcceptableValue) => void;
|
|
15
|
+
highlightFirstItem: () => void;
|
|
16
|
+
highlightSelected: (event?: Event) => Promise<void>;
|
|
17
|
+
getItems: (includeDisabledItem?: boolean) => ({
|
|
18
|
+
ref: HTMLElement;
|
|
19
|
+
value?: any;
|
|
20
|
+
} & {
|
|
21
|
+
value: import('reka-ui').AcceptableValue;
|
|
22
|
+
})[];
|
|
23
|
+
}> | null;
|
|
24
|
+
};
|
|
12
25
|
rootEl: any;
|
|
13
26
|
};
|
|
14
27
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
@@ -28,7 +41,20 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
28
41
|
value: import('reka-ui').AcceptableValue;
|
|
29
42
|
} | undefined) => any) | undefined;
|
|
30
43
|
onLeave?: ((event: Event) => any) | undefined;
|
|
31
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
44
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
45
|
+
rootRef: import('vue').ShallowUnwrapRef<{
|
|
46
|
+
highlightedElement: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
47
|
+
highlightItem: (value: import('reka-ui').AcceptableValue) => void;
|
|
48
|
+
highlightFirstItem: () => void;
|
|
49
|
+
highlightSelected: (event?: Event) => Promise<void>;
|
|
50
|
+
getItems: (includeDisabledItem?: boolean) => ({
|
|
51
|
+
ref: HTMLElement;
|
|
52
|
+
value?: any;
|
|
53
|
+
} & {
|
|
54
|
+
value: import('reka-ui').AcceptableValue;
|
|
55
|
+
})[];
|
|
56
|
+
}> | null;
|
|
57
|
+
}, any>;
|
|
32
58
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
33
59
|
export default _default;
|
|
34
60
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
interface ListboxContext {
|
|
3
|
+
/** Whether the whole listbox is disabled. */
|
|
4
|
+
disabled: Readonly<Ref<boolean>>;
|
|
5
|
+
/** The listbox root element, used to scope DOM lookups to this listbox. */
|
|
6
|
+
rootElement: Readonly<Ref<HTMLElement | undefined>>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Shares the listbox root state with the content, items and filter.
|
|
10
|
+
*
|
|
11
|
+
* reka-ui only renders `data-disabled` for styling, so the disabled state has
|
|
12
|
+
* to be mirrored to `aria-disabled` for assistive technology (WCAG 4.1.2).
|
|
13
|
+
* @param context The root state to share with the descendant parts.
|
|
14
|
+
*/
|
|
15
|
+
export declare function provideListboxContext(context: ListboxContext): void;
|
|
16
|
+
/**
|
|
17
|
+
* Reads the listbox root state, with inert defaults outside a listbox.
|
|
18
|
+
* @returns The surrounding listbox state.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useListboxContext(): ListboxContext;
|
|
21
|
+
export {};
|