@xds/vue 0.0.0-stage → 0.1.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.
Files changed (153) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +19 -2
  3. package/dist/Accordion.js +4 -0
  4. package/dist/Accordion.vue.d.ts +28 -0
  5. package/dist/Accordion.vue_vue_type_script_setup_true_lang.js +56 -0
  6. package/dist/AccordionPanel.js +4 -0
  7. package/dist/AccordionPanel.vue.d.ts +16 -0
  8. package/dist/AccordionPanel.vue_vue_type_script_setup_true_lang.js +29 -0
  9. package/dist/Avatar.js +4 -0
  10. package/dist/Avatar.vue.d.ts +6 -0
  11. package/dist/Avatar.vue_vue_type_script_setup_true_lang.js +35 -0
  12. package/dist/AvatarStack.js +4 -0
  13. package/dist/AvatarStack.vue.d.ts +5 -0
  14. package/dist/AvatarStack.vue_vue_type_script_setup_true_lang.js +45 -0
  15. package/dist/Badge.js +4 -0
  16. package/dist/Badge.vue.d.ts +15 -0
  17. package/dist/Badge.vue_vue_type_script_setup_true_lang.js +35 -0
  18. package/dist/Banner.js +4 -0
  19. package/dist/Banner.vue.d.ts +26 -0
  20. package/dist/Banner.vue_vue_type_script_setup_true_lang.js +65 -0
  21. package/dist/Button.js +4 -0
  22. package/dist/Button.vue.d.ts +21 -0
  23. package/dist/Button.vue_vue_type_script_setup_true_lang.js +96 -0
  24. package/dist/Card.js +4 -0
  25. package/dist/Card.vue.d.ts +24 -0
  26. package/dist/Card.vue_vue_type_script_setup_true_lang.js +96 -0
  27. package/dist/Checkbox.js +4 -0
  28. package/dist/Checkbox.vue.d.ts +16 -0
  29. package/dist/Checkbox.vue_vue_type_script_setup_true_lang.js +68 -0
  30. package/dist/Chip.js +4 -0
  31. package/dist/Chip.vue.d.ts +9 -0
  32. package/dist/Chip.vue_vue_type_script_setup_true_lang.js +42 -0
  33. package/dist/ChipBar.js +4 -0
  34. package/dist/ChipBar.vue.d.ts +15 -0
  35. package/dist/ChipBar.vue_vue_type_script_setup_true_lang.js +18 -0
  36. package/dist/CountBadge.js +4 -0
  37. package/dist/CountBadge.vue.d.ts +15 -0
  38. package/dist/CountBadge.vue_vue_type_script_setup_true_lang.js +33 -0
  39. package/dist/DatePicker.js +4 -0
  40. package/dist/DatePicker.vue.d.ts +10 -0
  41. package/dist/DatePicker.vue_vue_type_script_setup_true_lang.js +149 -0
  42. package/dist/DateRangePicker.js +4 -0
  43. package/dist/DateRangePicker.vue.d.ts +10 -0
  44. package/dist/DateRangePicker.vue_vue_type_script_setup_true_lang.js +222 -0
  45. package/dist/Defaults.vue.d.ts +17 -0
  46. package/dist/Defaults.vue_vue_type_script_setup_true_lang.js +14 -0
  47. package/dist/Defaults2.js +4 -0
  48. package/dist/Dialog.js +4 -0
  49. package/dist/Dialog.vue.d.ts +21 -0
  50. package/dist/Dialog.vue_vue_type_script_setup_true_lang.js +81 -0
  51. package/dist/Divider.js +4 -0
  52. package/dist/Divider.vue.d.ts +3 -0
  53. package/dist/Divider.vue_vue_type_script_setup_true_lang.js +12 -0
  54. package/dist/EmptyState.js +4 -0
  55. package/dist/EmptyState.vue.d.ts +15 -0
  56. package/dist/EmptyState.vue_vue_type_script_setup_true_lang.js +34 -0
  57. package/dist/Icon.js +4 -0
  58. package/dist/Icon.vue.d.ts +5 -0
  59. package/dist/Icon.vue_vue_type_script_setup_true_lang.js +47 -0
  60. package/dist/IconButton.js +4 -0
  61. package/dist/IconButton.vue.d.ts +9 -0
  62. package/dist/IconButton.vue_vue_type_script_setup_true_lang.js +74 -0
  63. package/dist/ListRow.js +4 -0
  64. package/dist/ListRow.vue.d.ts +23 -0
  65. package/dist/ListRow.vue_vue_type_script_setup_true_lang.js +34 -0
  66. package/dist/MediaCard.js +4 -0
  67. package/dist/MediaCard.vue.d.ts +23 -0
  68. package/dist/MediaCard.vue_vue_type_script_setup_true_lang.js +90 -0
  69. package/dist/Menu.js +4 -0
  70. package/dist/Menu.vue.d.ts +16 -0
  71. package/dist/Menu.vue_vue_type_script_setup_true_lang.js +118 -0
  72. package/dist/PlaceRow.js +4 -0
  73. package/dist/PlaceRow.vue.d.ts +18 -0
  74. package/dist/PlaceRow.vue_vue_type_script_setup_true_lang.js +68 -0
  75. package/dist/ProgressBar.js +4 -0
  76. package/dist/ProgressBar.vue.d.ts +5 -0
  77. package/dist/ProgressBar.vue_vue_type_script_setup_true_lang.js +28 -0
  78. package/dist/RadioGroup.js +4 -0
  79. package/dist/RadioGroup.vue.d.ts +23 -0
  80. package/dist/RadioGroup.vue_vue_type_script_setup_true_lang.js +100 -0
  81. package/dist/SearchField.js +4 -0
  82. package/dist/SearchField.vue.d.ts +16 -0
  83. package/dist/SearchField.vue_vue_type_script_setup_true_lang.js +93 -0
  84. package/dist/SectionHeader.js +4 -0
  85. package/dist/SectionHeader.vue.d.ts +11 -0
  86. package/dist/SectionHeader.vue_vue_type_script_setup_true_lang.js +47 -0
  87. package/dist/SegmentedControl.js +4 -0
  88. package/dist/SegmentedControl.vue.d.ts +28 -0
  89. package/dist/SegmentedControl.vue_vue_type_script_setup_true_lang.js +57 -0
  90. package/dist/Select.js +4 -0
  91. package/dist/Select.vue.d.ts +23 -0
  92. package/dist/Select.vue_vue_type_script_setup_true_lang.js +161 -0
  93. package/dist/Sidebar.js +4 -0
  94. package/dist/Sidebar.vue.d.ts +30 -0
  95. package/dist/Sidebar.vue_vue_type_script_setup_true_lang.js +117 -0
  96. package/dist/SidebarRailButton.js +4 -0
  97. package/dist/SidebarRailButton.vue.d.ts +13 -0
  98. package/dist/SidebarRailButton.vue_vue_type_script_setup_true_lang.js +32 -0
  99. package/dist/Skeleton.js +4 -0
  100. package/dist/Skeleton.vue.d.ts +5 -0
  101. package/dist/Skeleton.vue_vue_type_script_setup_true_lang.js +27 -0
  102. package/dist/Slider.js +4 -0
  103. package/dist/Slider.vue.d.ts +14 -0
  104. package/dist/Slider.vue_vue_type_script_setup_true_lang.js +83 -0
  105. package/dist/Spinner.js +4 -0
  106. package/dist/Spinner.vue.d.ts +5 -0
  107. package/dist/Spinner.vue_vue_type_script_setup_true_lang.js +45 -0
  108. package/dist/Switch.js +4 -0
  109. package/dist/Switch.vue.d.ts +16 -0
  110. package/dist/Switch.vue_vue_type_script_setup_true_lang.js +56 -0
  111. package/dist/Tabs.js +4 -0
  112. package/dist/Tabs.vue.d.ts +24 -0
  113. package/dist/Tabs.vue_vue_type_script_setup_true_lang.js +56 -0
  114. package/dist/Text.js +4 -0
  115. package/dist/Text.vue.d.ts +17 -0
  116. package/dist/Text.vue_vue_type_script_setup_true_lang.js +25 -0
  117. package/dist/TextField.js +4 -0
  118. package/dist/TextField.vue.d.ts +31 -0
  119. package/dist/TextField.vue_vue_type_script_setup_true_lang.js +158 -0
  120. package/dist/Thumbnail.js +4 -0
  121. package/dist/Thumbnail.vue.d.ts +6 -0
  122. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang.js +66 -0
  123. package/dist/Toast.js +4 -0
  124. package/dist/Toast.vue.d.ts +9 -0
  125. package/dist/Toast.vue_vue_type_script_setup_true_lang.js +61 -0
  126. package/dist/Tooltip.js +4 -0
  127. package/dist/Tooltip.vue.d.ts +15 -0
  128. package/dist/Tooltip.vue_vue_type_script_setup_true_lang.js +28 -0
  129. package/dist/TooltipOverlay.js +4 -0
  130. package/dist/TooltipOverlay.vue.d.ts +18 -0
  131. package/dist/TooltipOverlay.vue_vue_type_script_setup_true_lang.js +56 -0
  132. package/dist/controlled.d.ts +4 -0
  133. package/dist/controlled.js +15 -0
  134. package/dist/defaults.d.ts +17 -0
  135. package/dist/defaults.js +30 -0
  136. package/dist/index.d.ts +42 -0
  137. package/dist/index.js +40 -0
  138. package/dist/modal-popover.d.ts +7 -0
  139. package/dist/modal-popover.js +22 -0
  140. package/dist/picture.d.ts +19 -0
  141. package/dist/picture.js +25 -0
  142. package/dist/presence.d.ts +7 -0
  143. package/dist/presence.js +20 -0
  144. package/dist/preview.d.ts +14 -0
  145. package/dist/preview.js +146 -0
  146. package/dist/trigger.d.ts +32 -0
  147. package/dist/trigger.js +37 -0
  148. package/dist/wrap.d.ts +11 -0
  149. package/dist/wrap.js +14 -0
  150. package/package.json +60 -4
  151. package/page.css +20 -0
  152. package/styles.css +3252 -0
  153. package/tailwind.css +2665 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 kjmin-dev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,20 @@
1
- # Temporary Holding Version
1
+ # @xds/vue
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The components of the xds design system for Vue, with the look of an app made with `xds create`.
4
+
5
+ ```sh
6
+ npm install @xds/vue
7
+ ```
8
+
9
+ Import the stylesheet once, then use the components:
10
+
11
+ ```js
12
+ import "@xds/vue/styles.css";
13
+ import { Button } from "@xds/vue";
14
+ ```
15
+
16
+ `<Button>` and every other component take the app's class and style on their root element, which also carries a stable class such as `xds-button`. The `Defaults` component sets what the components inside it take when the app passes no variant, size or tone.
17
+
18
+ The stylesheet keeps to the `xds` cascade layer and to the library's own elements, so the app's styles win. `@xds/vue/page.css` gives the page the library's background, text color and font. An app with Tailwind CSS 4.1 or later can import `@xds/vue/tailwind.css` before Tailwind instead of `styles.css`.
19
+
20
+ This channel is a preview while its behavior library, Zag.js 2, is a prerelease. See [xds as a library](https://github.com/kjmin-dev/xds/blob/main/docs/library.md) for modes, themes and the rest of the customization.
@@ -0,0 +1,4 @@
1
+ import Accordion_vue_vue_type_script_setup_true_lang_default from "./Accordion.vue_vue_type_script_setup_true_lang.js";
2
+ // packages/ui-vue/src/Accordion.vue
3
+ var Accordion_default = Accordion_vue_vue_type_script_setup_true_lang_default;
4
+ export { Accordion_default as default };
@@ -0,0 +1,28 @@
1
+ import { type AccordionBaseProps, type AccordionItemBase } from "@xds/core";
2
+ export type AccordionItem<Value extends string = string> = AccordionItemBase<Value> & {
3
+ /** The body, shown under the title while the item is open. */
4
+ content: string;
5
+ };
6
+ export type AccordionProps<Value extends string = string> = AccordionBaseProps<Value> & {
7
+ items: readonly AccordionItem<Value>[];
8
+ };
9
+ declare const __VLS_export: <Value extends string = string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, 'attrs' | 'emit' | 'slots'>>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
10
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<AccordionProps<Value> & {
11
+ "onUpdate:expanded"?: ((expanded: Value[]) => any) | undefined;
12
+ }> & (typeof globalThis extends {
13
+ __VLS_PROPS_FALLBACK: infer P;
14
+ } ? P : {});
15
+ expose: (exposed: {}) => void;
16
+ attrs: any;
17
+ slots: {};
18
+ emit: (evt: "update:expanded", expanded: Value[]) => void;
19
+ }>) => import('vue').VNode & {
20
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
21
+ };
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
25
+ [K in keyof T]: T[K];
26
+ } : {
27
+ [K in keyof T as K]: T[K];
28
+ }) & {};
@@ -0,0 +1,56 @@
1
+ import AccordionPanel_default from "./AccordionPanel.js";
2
+ import Icon_default from "./Icon.js";
3
+ import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, renderList, toDisplayString, unref, useId, withCtx } from "vue";
4
+ import { ACCORDION_PARTS, focusTitleOnClick } from "@xds/core";
5
+ import * as accordion from "@zag-js/accordion";
6
+ import { mergeProps as mergeProps$1, normalizeProps as normalizeProps$1, useMachine } from "@zag-js/vue";
7
+ // packages/ui-vue/src/Accordion.vue?vue&type=script&setup=true&lang.ts
8
+ var Accordion_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
9
+ __name: "Accordion",
10
+ props: {
11
+ expanded: {},
12
+ multiple: {
13
+ type: Boolean,
14
+ default: false
15
+ },
16
+ items: {}
17
+ },
18
+ emits: ["update:expanded"],
19
+ setup(__props, { emit: __emit }) {
20
+ const emit = __emit;
21
+ const id = useId();
22
+ const service = useMachine(accordion.machine, computed(() => ({
23
+ id,
24
+ value: [...__props.expanded],
25
+ onValueChange: (details) => emit("update:expanded", details.value),
26
+ multiple: __props.multiple,
27
+ collapsible: true,
28
+ hiddenUntilFound: true
29
+ })));
30
+ const api = computed(() => accordion.connect(service, normalizeProps$1));
31
+ const trigger = (value) => mergeProps$1(api.value.getItemTriggerProps({ value }), { onClick: focusTitleOnClick });
32
+ const body = (value) => {
33
+ const { hidden: _hidden, ...attributes } = api.value.getItemContentProps({ value });
34
+ return attributes;
35
+ };
36
+ return (_ctx, _cache) => {
37
+ return openBlock(), createElementBlock("div", mergeProps(api.value.getRootProps(), { class: "xds-accordion" }), [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
38
+ return openBlock(), createElementBlock("div", mergeProps({ key: item.value }, { ref_for: true }, api.value.getItemProps({ value: item.value }), { class: "xds-accordion__item" }), [createElementVNode("h3", mergeProps({ ref_for: true }, api.value.getItemHeaderProps({ value: item.value }), { class: "xds-accordion__heading" }), [createElementVNode("button", mergeProps({ ref_for: true }, trigger(item.value), { class: "xds-accordion__trigger group" }), [createElementVNode("span", { class: normalizeClass(unref(ACCORDION_PARTS).text) }, [createElementVNode("span", { class: normalizeClass(unref(ACCORDION_PARTS).title) }, toDisplayString(item.title), 3), item.description ? (openBlock(), createElementBlock("span", {
39
+ key: 0,
40
+ class: normalizeClass(unref(ACCORDION_PARTS).description)
41
+ }, toDisplayString(item.description), 3)) : createCommentVNode("", true)], 2), createVNode(Icon_default, {
42
+ name: "chevron-down",
43
+ size: "sm",
44
+ class: normalizeClass(unref(ACCORDION_PARTS).chevron)
45
+ }, null, 8, ["class"])], 16)], 16), createVNode(AccordionPanel_default, {
46
+ attributes: body(item.value),
47
+ open: api.value.value.includes(item.value)
48
+ }, {
49
+ default: withCtx(() => [createTextVNode(toDisplayString(item.content), 1)]),
50
+ _: 2
51
+ }, 1032, ["attributes", "open"])], 16);
52
+ }), 128))], 16);
53
+ };
54
+ }
55
+ });
56
+ export { Accordion_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,4 @@
1
+ import AccordionPanel_vue_vue_type_script_setup_true_lang_default from "./AccordionPanel.vue_vue_type_script_setup_true_lang.js";
2
+ // packages/ui-vue/src/AccordionPanel.vue
3
+ var AccordionPanel_default = AccordionPanel_vue_vue_type_script_setup_true_lang_default;
4
+ export { AccordionPanel_default as default };
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ open: boolean;
3
+ attributes: Record<string, unknown>;
4
+ };
5
+ type __VLS_Slots = {
6
+ default(): unknown;
7
+ };
8
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
@@ -0,0 +1,29 @@
1
+ import { createElementBlock, createElementVNode, defineComponent, mergeProps, onMounted, openBlock, renderSlot, useTemplateRef, watch } from "vue";
2
+ import { setPanelOpen } from "@xds/core";
3
+ // packages/ui-vue/src/AccordionPanel.vue?vue&type=script&setup=true&lang.ts
4
+ var _hoisted_1 = ["aria-hidden"];
5
+ var _hoisted_2 = { class: "xds-accordion__body" };
6
+ var AccordionPanel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
7
+ __name: "AccordionPanel",
8
+ props: {
9
+ open: { type: Boolean },
10
+ attributes: {}
11
+ },
12
+ setup(__props) {
13
+ const panel = useTemplateRef("panel");
14
+ onMounted(() => panel.value && setPanelOpen(panel.value, __props.open, false));
15
+ watch(() => __props.open, (isOpen, _, onCleanup) => {
16
+ if (panel.value) onCleanup(setPanelOpen(panel.value, isOpen, true));
17
+ }, { flush: "post" });
18
+ return (_ctx, _cache) => {
19
+ return openBlock(), createElementBlock("div", mergeProps(__props.attributes, {
20
+ ref_key: "panel",
21
+ ref: panel,
22
+ role: "group",
23
+ "aria-hidden": __props.open ? void 0 : "true",
24
+ class: "xds-accordion__panel"
25
+ }), [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "default")])], 16, _hoisted_1);
26
+ };
27
+ }
28
+ });
29
+ export { AccordionPanel_vue_vue_type_script_setup_true_lang_default as default };
package/dist/Avatar.js ADDED
@@ -0,0 +1,4 @@
1
+ import Avatar_vue_vue_type_script_setup_true_lang_default from "./Avatar.vue_vue_type_script_setup_true_lang.js";
2
+ // packages/ui-vue/src/Avatar.vue
3
+ var Avatar_default = Avatar_vue_vue_type_script_setup_true_lang_default;
4
+ export { Avatar_default as default };
@@ -0,0 +1,6 @@
1
+ import { type AvatarBaseProps } from "@xds/core";
2
+ export type { AvatarSize } from "@xds/core";
3
+ export type AvatarProps = AvatarBaseProps;
4
+ declare const __VLS_export: import("vue").DefineComponent<AvatarBaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarBaseProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import { useDefaults } from "./defaults.js";
2
+ import { usePicture } from "./picture.js";
3
+ import { createCommentVNode, createElementBlock, createTextVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref } from "vue";
4
+ import { avatarClass, avatarInitials, classes, pictureClass, rootPart } from "@xds/core";
5
+ // packages/ui-vue/src/Avatar.vue?vue&type=script&setup=true&lang.ts
6
+ var _hoisted_1 = ["aria-label"];
7
+ var _hoisted_2 = ["src"];
8
+ var Avatar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
9
+ __name: "Avatar",
10
+ props: {
11
+ name: {},
12
+ src: {},
13
+ size: {}
14
+ },
15
+ setup(__props) {
16
+ const options = useDefaults("Avatar", () => ({ size: __props.size }));
17
+ const picture = usePicture(() => __props.src);
18
+ return (_ctx, _cache) => {
19
+ return openBlock(), createElementBlock("span", {
20
+ role: "img",
21
+ "aria-label": __props.name,
22
+ class: normalizeClass(unref(classes)(unref(rootPart)("Avatar"), unref(avatarClass)(unref(options).size)))
23
+ }, [createTextVNode(toDisplayString(unref(avatarInitials)(__props.name, unref(options).size)), 1), unref(picture).loaded.value !== false && __props.src ? (openBlock(), createElementBlock("img", {
24
+ key: 0,
25
+ src: __props.src,
26
+ alt: "",
27
+ "aria-hidden": "true",
28
+ class: normalizeClass(unref(pictureClass)(unref(picture).loaded.value === true)),
29
+ onLoad: _cache[0] || (_cache[0] = ($event) => unref(picture).onLoad(__props.src)),
30
+ onError: _cache[1] || (_cache[1] = ($event) => unref(picture).onError(__props.src))
31
+ }, null, 42, _hoisted_2)) : createCommentVNode("", true)], 10, _hoisted_1);
32
+ };
33
+ }
34
+ });
35
+ export { Avatar_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,4 @@
1
+ import AvatarStack_vue_vue_type_script_setup_true_lang_default from "./AvatarStack.vue_vue_type_script_setup_true_lang.js";
2
+ // packages/ui-vue/src/AvatarStack.vue
3
+ var AvatarStack_default = AvatarStack_vue_vue_type_script_setup_true_lang_default;
4
+ export { AvatarStack_default as default };
@@ -0,0 +1,5 @@
1
+ import { type AvatarStackBaseProps } from "@xds/core";
2
+ export type AvatarStackProps = AvatarStackBaseProps;
3
+ declare const __VLS_export: import("vue").DefineComponent<AvatarStackBaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarStackBaseProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ declare const _default: typeof __VLS_export;
5
+ export default _default;
@@ -0,0 +1,45 @@
1
+ import Avatar_default from "./Avatar.js";
2
+ import { useDefaults } from "./defaults.js";
3
+ import { Fragment, computed, createCommentVNode, createElementBlock, createVNode, defineComponent, normalizeClass, openBlock, renderList, toDisplayString, unref } from "vue";
4
+ import { avatarStack, avatarStackClass, avatarStackItemClass, avatarStackRestClass, classes, rootPart } from "@xds/core";
5
+ // packages/ui-vue/src/AvatarStack.vue?vue&type=script&setup=true&lang.ts
6
+ var _hoisted_1 = ["aria-label"];
7
+ var AvatarStack_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
8
+ __name: "AvatarStack",
9
+ props: {
10
+ people: {},
11
+ max: {},
12
+ size: {},
13
+ label: {}
14
+ },
15
+ setup(__props) {
16
+ const stack = computed(() => avatarStack(__props.people, __props.max, __props.label));
17
+ const options = useDefaults("AvatarStack", () => ({ size: __props.size }), { size: "md" });
18
+ return (_ctx, _cache) => {
19
+ return openBlock(), createElementBlock("span", {
20
+ role: "img",
21
+ "aria-label": stack.value.name,
22
+ class: normalizeClass(unref(classes)(unref(rootPart)("AvatarStack"), unref(avatarStackClass)))
23
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(stack.value.shown, (person, index) => {
24
+ return openBlock(), createElementBlock("span", {
25
+ key: index,
26
+ "aria-hidden": "true",
27
+ class: normalizeClass(unref(avatarStackItemClass)(unref(options).size))
28
+ }, [createVNode(Avatar_default, {
29
+ name: person.name,
30
+ src: person.src,
31
+ size: unref(options).size
32
+ }, null, 8, [
33
+ "name",
34
+ "src",
35
+ "size"
36
+ ])], 2);
37
+ }), 128)), stack.value.rest > 0 ? (openBlock(), createElementBlock("span", {
38
+ key: 0,
39
+ "aria-hidden": "true",
40
+ class: normalizeClass(unref(avatarStackRestClass)(unref(options).size))
41
+ }, "+" + toDisplayString(stack.value.rest), 3)) : createCommentVNode("", true)], 10, _hoisted_1);
42
+ };
43
+ }
44
+ });
45
+ export { AvatarStack_vue_vue_type_script_setup_true_lang_default as default };
package/dist/Badge.js ADDED
@@ -0,0 +1,4 @@
1
+ import Badge_vue_vue_type_script_setup_true_lang_default from "./Badge.vue_vue_type_script_setup_true_lang.js";
2
+ // packages/ui-vue/src/Badge.vue
3
+ var Badge_default = Badge_vue_vue_type_script_setup_true_lang_default;
4
+ export { Badge_default as default };
@@ -0,0 +1,15 @@
1
+ import { type BadgeBaseProps } from "@xds/core";
2
+ export type { BadgeTone } from "@xds/core";
3
+ export type BadgeProps = BadgeBaseProps;
4
+ type __VLS_Slots = {
5
+ default(): unknown;
6
+ };
7
+ declare const __VLS_base: import("vue").DefineComponent<BadgeBaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeBaseProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
@@ -0,0 +1,35 @@
1
+ import { useDefaults } from "./defaults.js";
2
+ import Icon_default from "./Icon.js";
3
+ import { createBlock, createCommentVNode, createElementBlock, defineComponent, normalizeClass, openBlock, renderSlot, unref } from "vue";
4
+ import { badgeClass, badgeDotClass, classes, rootPart } from "@xds/core";
5
+ // packages/ui-vue/src/Badge.vue?vue&type=script&setup=true&lang.ts
6
+ var Badge_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
7
+ __name: "Badge",
8
+ props: {
9
+ tone: {},
10
+ dot: {
11
+ type: Boolean,
12
+ default: false
13
+ },
14
+ icon: {}
15
+ },
16
+ setup(__props) {
17
+ const options = useDefaults("Badge", () => ({ tone: __props.tone }));
18
+ return (_ctx, _cache) => {
19
+ return openBlock(), createElementBlock("span", { class: normalizeClass(unref(classes)(unref(rootPart)("Badge"), unref(badgeClass)(unref(options).tone))) }, [
20
+ __props.dot ? (openBlock(), createElementBlock("span", {
21
+ key: 0,
22
+ "aria-hidden": "true",
23
+ class: normalizeClass(unref(badgeDotClass))
24
+ }, null, 2)) : createCommentVNode("", true),
25
+ __props.icon ? (openBlock(), createBlock(Icon_default, {
26
+ key: 1,
27
+ name: __props.icon,
28
+ size: "xs"
29
+ }, null, 8, ["name"])) : createCommentVNode("", true),
30
+ renderSlot(_ctx.$slots, "default")
31
+ ], 2);
32
+ };
33
+ }
34
+ });
35
+ export { Badge_vue_vue_type_script_setup_true_lang_default as default };
package/dist/Banner.js ADDED
@@ -0,0 +1,4 @@
1
+ import Banner_vue_vue_type_script_setup_true_lang_default from "./Banner.vue_vue_type_script_setup_true_lang.js";
2
+ // packages/ui-vue/src/Banner.vue
3
+ var Banner_default = Banner_vue_vue_type_script_setup_true_lang_default;
4
+ export { Banner_default as default };
@@ -0,0 +1,26 @@
1
+ import { type BannerBaseProps } from "@xds/core";
2
+ export type { BannerTone } from "@xds/core";
3
+ export type BannerProps = BannerBaseProps & {
4
+ /** What the person can do about the message. Drawn under it as a small secondary button. */
5
+ action?: {
6
+ label: string;
7
+ onPress: () => void;
8
+ };
9
+ /**
10
+ * Shows a close control. The banner does not hide itself: the handler decides what happens
11
+ * to it. A prop rather than an event, since whether there is one decides what is drawn.
12
+ */
13
+ onDismiss?: () => void;
14
+ };
15
+ type __VLS_Slots = {
16
+ default(): unknown;
17
+ };
18
+ declare const __VLS_base: import("vue").DefineComponent<BannerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BannerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,65 @@
1
+ import Button_default from "./Button.js";
2
+ import { useDefaults } from "./defaults.js";
3
+ import IconButton_default from "./IconButton.js";
4
+ import { createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderSlot, toDisplayString, unref, withCtx } from "vue";
5
+ import { BANNER_PARTS, bannerClass, bannerIconClass, bannerIconPath, bannerRole, classes, rootPart } from "@xds/core";
6
+ // packages/ui-vue/src/Banner.vue?vue&type=script&setup=true&lang.ts
7
+ var _hoisted_1 = ["role"];
8
+ var _hoisted_2 = ["d"];
9
+ var Banner_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
10
+ __name: "Banner",
11
+ props: {
12
+ tone: {},
13
+ title: {},
14
+ dismissLabel: { default: "Dismiss" },
15
+ action: {},
16
+ onDismiss: { type: Function }
17
+ },
18
+ setup(__props) {
19
+ const options = useDefaults("Banner", () => ({ tone: __props.tone }));
20
+ return (_ctx, _cache) => {
21
+ return openBlock(), createElementBlock("div", {
22
+ role: unref(bannerRole)(unref(options).tone),
23
+ class: normalizeClass(unref(classes)(unref(rootPart)("Banner"), unref(bannerClass)(unref(options).tone)))
24
+ }, [
25
+ (openBlock(), createElementBlock("svg", {
26
+ viewBox: "0 0 24 24",
27
+ "aria-hidden": "true",
28
+ class: normalizeClass(unref(bannerIconClass)(unref(options).tone))
29
+ }, [createElementVNode("path", {
30
+ fill: "currentColor",
31
+ d: unref(bannerIconPath)(unref(options).tone)
32
+ }, null, 8, _hoisted_2)], 2)),
33
+ createElementVNode("div", { class: normalizeClass(unref(BANNER_PARTS).body) }, [
34
+ __props.title ? (openBlock(), createElementBlock("p", {
35
+ key: 0,
36
+ class: normalizeClass(unref(BANNER_PARTS).title)
37
+ }, toDisplayString(__props.title), 3)) : createCommentVNode("", true),
38
+ createElementVNode("div", null, [renderSlot(_ctx.$slots, "default")]),
39
+ __props.action ? (openBlock(), createElementBlock("div", {
40
+ key: 1,
41
+ class: normalizeClass(unref(BANNER_PARTS).action)
42
+ }, [createVNode(Button_default, {
43
+ variant: "secondary",
44
+ size: "sm",
45
+ onPress: _cache[0] || (_cache[0] = ($event) => __props.action.onPress())
46
+ }, {
47
+ default: withCtx(() => [createTextVNode(toDisplayString(__props.action.label), 1)]),
48
+ _: 1
49
+ })], 2)) : createCommentVNode("", true)
50
+ ], 2),
51
+ __props.onDismiss ? (openBlock(), createElementBlock("div", {
52
+ key: 0,
53
+ class: normalizeClass(unref(BANNER_PARTS).dismiss)
54
+ }, [createVNode(IconButton_default, {
55
+ icon: "x",
56
+ label: __props.dismissLabel,
57
+ variant: "ghost",
58
+ size: "sm",
59
+ onPress: _cache[1] || (_cache[1] = ($event) => __props.onDismiss())
60
+ }, null, 8, ["label"])], 2)) : createCommentVNode("", true)
61
+ ], 10, _hoisted_1);
62
+ };
63
+ }
64
+ });
65
+ export { Banner_vue_vue_type_script_setup_true_lang_default as default };
package/dist/Button.js ADDED
@@ -0,0 +1,4 @@
1
+ import Button_vue_vue_type_script_setup_true_lang_default from "./Button.vue_vue_type_script_setup_true_lang.js";
2
+ // packages/ui-vue/src/Button.vue
3
+ var Button_default = Button_vue_vue_type_script_setup_true_lang_default;
4
+ export { Button_default as default };
@@ -0,0 +1,21 @@
1
+ import { type ButtonBaseProps } from "@xds/core";
2
+ export type ButtonProps = Omit<ButtonBaseProps, "aria-label"> & {
3
+ ariaLabel?: string;
4
+ };
5
+ type __VLS_Slots = {
6
+ /** Leave it out for a button that holds only an icon, and name that one with `aria-label`. */
7
+ default?(): unknown;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ press: () => any;
11
+ }, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{
12
+ onPress?: (() => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,96 @@
1
+ import { useDefaults } from "./defaults.js";
2
+ import Icon_default from "./Icon.js";
3
+ import Spinner_default from "./Spinner.js";
4
+ import { useTrigger } from "./trigger.js";
5
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, guardReactiveProps, normalizeClass, normalizeProps, openBlock, renderSlot, unref, useSlots } from "vue";
6
+ import { BUTTON_ICON, buttonClass, isHeld } from "@xds/core";
7
+ // packages/ui-vue/src/Button.vue?vue&type=script&setup=true&lang.ts
8
+ var Button_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
9
+ __name: "Button",
10
+ props: {
11
+ variant: {},
12
+ size: {},
13
+ iconStart: {},
14
+ iconEnd: {},
15
+ selected: {
16
+ type: Boolean,
17
+ default: () => void 0
18
+ },
19
+ disabled: {
20
+ type: Boolean,
21
+ default: false
22
+ },
23
+ loading: {
24
+ type: Boolean,
25
+ default: false
26
+ },
27
+ fullWidth: {
28
+ type: Boolean,
29
+ default: false
30
+ },
31
+ type: { default: "button" },
32
+ ariaLabel: {}
33
+ },
34
+ emits: ["press"],
35
+ setup(__props, { emit: __emit }) {
36
+ const emit = __emit;
37
+ const slots = useSlots();
38
+ const options = useDefaults("Button", () => ({
39
+ variant: __props.variant,
40
+ size: __props.size
41
+ }), {
42
+ variant: "secondary",
43
+ size: "md"
44
+ });
45
+ const icon = computed(() => BUTTON_ICON[options.value.size]);
46
+ const held = computed(() => isHeld({
47
+ variant: options.value.variant,
48
+ selected: __props.selected,
49
+ disabled: __props.disabled
50
+ }));
51
+ const attributes = useTrigger(() => ({
52
+ type: __props.type,
53
+ class: buttonClass({
54
+ variant: options.value.variant,
55
+ size: options.value.size,
56
+ iconOnly: !slots.default && (__props.iconStart !== void 0 || __props.iconEnd !== void 0),
57
+ fullWidth: __props.fullWidth
58
+ }),
59
+ disabled: __props.disabled,
60
+ "aria-disabled": __props.loading ? "true" : void 0,
61
+ "data-pending": __props.loading ? "" : void 0,
62
+ "aria-pressed": __props.selected === void 0 ? void 0 : __props.selected ? "true" : "false",
63
+ "aria-label": __props.ariaLabel,
64
+ onClick: () => {
65
+ if (!__props.loading) emit("press");
66
+ }
67
+ }), () => __props.loading);
68
+ return (_ctx, _cache) => {
69
+ return openBlock(), createElementBlock("button", normalizeProps(guardReactiveProps(unref(attributes))), [
70
+ __props.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [__props.iconStart ? (openBlock(), createElementBlock("span", {
71
+ key: 0,
72
+ class: normalizeClass(icon.value.box)
73
+ }, [createVNode(Spinner_default, { size: "sm" })], 2)) : (openBlock(), createBlock(Spinner_default, {
74
+ key: 1,
75
+ size: "sm"
76
+ }))], 64)) : __props.iconStart ? (openBlock(), createBlock(Icon_default, {
77
+ key: 1,
78
+ name: __props.iconStart,
79
+ size: icon.value.size,
80
+ filled: held.value
81
+ }, null, 8, [
82
+ "name",
83
+ "size",
84
+ "filled"
85
+ ])) : createCommentVNode("", true),
86
+ renderSlot(_ctx.$slots, "default"),
87
+ __props.iconEnd ? (openBlock(), createBlock(Icon_default, {
88
+ key: 2,
89
+ name: __props.iconEnd,
90
+ size: icon.value.size
91
+ }, null, 8, ["name", "size"])) : createCommentVNode("", true)
92
+ ], 16);
93
+ };
94
+ }
95
+ });
96
+ export { Button_vue_vue_type_script_setup_true_lang_default as default };
package/dist/Card.js ADDED
@@ -0,0 +1,4 @@
1
+ import Card_vue_vue_type_script_setup_true_lang_default from "./Card.vue_vue_type_script_setup_true_lang.js";
2
+ // packages/ui-vue/src/Card.vue
3
+ var Card_default = Card_vue_vue_type_script_setup_true_lang_default;
4
+ export { Card_default as default };
@@ -0,0 +1,24 @@
1
+ import { type CardBaseProps } from "@xds/core";
2
+ export type CardProps = CardBaseProps & {
3
+ /**
4
+ * Makes the whole card one button. Put no other control inside it then. A prop rather than
5
+ * an event, since whether there is one decides what is drawn.
6
+ */
7
+ onPress?: () => void;
8
+ };
9
+ type __VLS_Slots = {
10
+ /** Sit across from the title. A pressable card takes none: it is one button already. */
11
+ actions?(): unknown;
12
+ /** A picture or a drawing at the top, running edge to edge above the padding. */
13
+ media?(): unknown;
14
+ default?(): unknown;
15
+ };
16
+ declare const __VLS_base: import("vue").DefineComponent<CardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };