iryx-ui 0.21.0 → 0.23.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 (34) hide show
  1. package/dist/component-names.d.ts +1 -1
  2. package/dist/component-names.js +1 -1
  3. package/dist/components/Checkbox.vue.d.ts +20 -3
  4. package/dist/components/Checkbox.vue_vue_type_script_setup_true_lang.js +90 -43
  5. package/dist/components/Code.js +5 -0
  6. package/dist/components/Code.vue.d.ts +38 -0
  7. package/dist/components/Code.vue_vue_type_script_setup_true_lang.js +66 -0
  8. package/dist/components/DescriptionList.js +5 -0
  9. package/dist/components/DescriptionList.vue.d.ts +50 -0
  10. package/dist/components/DescriptionList.vue_vue_type_script_setup_true_lang.js +48 -0
  11. package/dist/components/Progress.vue.d.ts +29 -3
  12. package/dist/components/Progress.vue_vue_type_script_setup_true_lang.js +103 -47
  13. package/dist/components/RadioGroup.vue.d.ts +12 -0
  14. package/dist/components/RadioGroup.vue_vue_type_script_setup_true_lang.js +73 -39
  15. package/dist/components/Switch.vue_vue_type_script_setup_true_lang.js +35 -35
  16. package/dist/components/index.d.ts +2 -0
  17. package/dist/components/index.js +124 -120
  18. package/dist/index.d.ts +2 -0
  19. package/dist/index.js +126 -122
  20. package/dist/theme/checkbox.d.ts +42 -39
  21. package/dist/theme/checkbox.js +117 -15
  22. package/dist/theme/code.d.ts +53 -0
  23. package/dist/theme/code.js +24 -0
  24. package/dist/theme/description-list.d.ts +62 -0
  25. package/dist/theme/description-list.js +48 -0
  26. package/dist/theme/index.d.ts +2 -0
  27. package/dist/theme/presets.d.ts +8 -2
  28. package/dist/theme/presets.js +2 -2
  29. package/dist/theme/progress.d.ts +75 -0
  30. package/dist/theme/progress.js +43 -11
  31. package/dist/theme/radio-group.d.ts +45 -30
  32. package/dist/theme/radio-group.js +118 -11
  33. package/package.json +1 -1
  34. package/theme.css +25 -0
@@ -3,7 +3,7 @@
3
3
  * Consumed by the Vue plugin (global registration) and the Nuxt module
4
4
  * (auto-imports). Keep in sync with `src/components/index.ts`.
5
5
  */
6
- export declare const componentNames: readonly ["Accordion", "Alert", "App", "AppShell", "AspectRatio", "AuthProviders", "Avatar", "AvatarGroup", "Badge", "BarChart", "Banner", "Breadcrumb", "Button", "ButtonGroup", "Calendar", "Card", "Carousel", "ChartLegend", "Checkbox", "ColorPicker", "Combobox", "Collapsible", "CommandPalette", "Container", "ConfirmDialog", "ContextMenu", "DateField", "DatePicker", "DateRangePicker", "Dialog", "DonutChart", "Drawer", "DropdownMenu", "Editable", "EmptyState", "FileUpload", "Form", "FormField", "HoverCard", "Icon", "Input", "Kbd", "Label", "LineChart", "NavigationMenu", "NumberInput", "Menubar", "PageHeader", "Pagination", "PasswordInput", "PinInput", "Popover", "Progress", "RadioGroup", "Rating", "ScrollArea", "ScrollFade", "Select", "Separator", "Sidebar", "SignaturePad", "Skeleton", "Slider", "Sparkline", "Splitter", "Stat", "Stepper", "Switch", "Table", "Tabs", "TagsInput", "Textarea", "Toaster", "Toggle", "ToggleGroup", "TimeField", "Timeline", "Toolbar", "Tooltip", "Tree"];
6
+ export declare const componentNames: readonly ["Accordion", "Alert", "App", "AppShell", "AspectRatio", "AuthProviders", "Avatar", "AvatarGroup", "Badge", "BarChart", "Banner", "Breadcrumb", "Button", "ButtonGroup", "Calendar", "Card", "Carousel", "ChartLegend", "Checkbox", "Code", "ColorPicker", "Combobox", "Collapsible", "CommandPalette", "Container", "ConfirmDialog", "ContextMenu", "DateField", "DatePicker", "DateRangePicker", "DescriptionList", "Dialog", "DonutChart", "Drawer", "DropdownMenu", "Editable", "EmptyState", "FileUpload", "Form", "FormField", "HoverCard", "Icon", "Input", "Kbd", "Label", "LineChart", "NavigationMenu", "NumberInput", "Menubar", "PageHeader", "Pagination", "PasswordInput", "PinInput", "Popover", "Progress", "RadioGroup", "Rating", "ScrollArea", "ScrollFade", "Select", "Separator", "Sidebar", "SignaturePad", "Skeleton", "Slider", "Sparkline", "Splitter", "Stat", "Stepper", "Switch", "Table", "Tabs", "TagsInput", "Textarea", "Toaster", "Toggle", "ToggleGroup", "TimeField", "Timeline", "Toolbar", "Tooltip", "Tree"];
7
7
  export type ComponentName = (typeof componentNames)[number];
8
8
  /**
9
9
  * Names of every block exported from `iryx-ui/marketing`.
@@ -1,5 +1,5 @@
1
1
  //#region src/component-names.ts
2
- var e = /* @__PURE__ */ "Accordion.Alert.App.AppShell.AspectRatio.AuthProviders.Avatar.AvatarGroup.Badge.BarChart.Banner.Breadcrumb.Button.ButtonGroup.Calendar.Card.Carousel.ChartLegend.Checkbox.ColorPicker.Combobox.Collapsible.CommandPalette.Container.ConfirmDialog.ContextMenu.DateField.DatePicker.DateRangePicker.Dialog.DonutChart.Drawer.DropdownMenu.Editable.EmptyState.FileUpload.Form.FormField.HoverCard.Icon.Input.Kbd.Label.LineChart.NavigationMenu.NumberInput.Menubar.PageHeader.Pagination.PasswordInput.PinInput.Popover.Progress.RadioGroup.Rating.ScrollArea.ScrollFade.Select.Separator.Sidebar.SignaturePad.Skeleton.Slider.Sparkline.Splitter.Stat.Stepper.Switch.Table.Tabs.TagsInput.Textarea.Toaster.Toggle.ToggleGroup.TimeField.Timeline.Toolbar.Tooltip.Tree".split("."), t = [
2
+ var e = /* @__PURE__ */ "Accordion.Alert.App.AppShell.AspectRatio.AuthProviders.Avatar.AvatarGroup.Badge.BarChart.Banner.Breadcrumb.Button.ButtonGroup.Calendar.Card.Carousel.ChartLegend.Checkbox.Code.ColorPicker.Combobox.Collapsible.CommandPalette.Container.ConfirmDialog.ContextMenu.DateField.DatePicker.DateRangePicker.DescriptionList.Dialog.DonutChart.Drawer.DropdownMenu.Editable.EmptyState.FileUpload.Form.FormField.HoverCard.Icon.Input.Kbd.Label.LineChart.NavigationMenu.NumberInput.Menubar.PageHeader.Pagination.PasswordInput.PinInput.Popover.Progress.RadioGroup.Rating.ScrollArea.ScrollFade.Select.Separator.Sidebar.SignaturePad.Skeleton.Slider.Sparkline.Splitter.Stat.Stepper.Switch.Table.Tabs.TagsInput.Textarea.Toaster.Toggle.ToggleGroup.TimeField.Timeline.Toolbar.Tooltip.Tree".split("."), t = [
3
3
  "BrowserFrame",
4
4
  "FeatureCard",
5
5
  "Hero",
@@ -1,10 +1,19 @@
1
1
  import type { CheckboxRootProps } from 'reka-ui';
2
2
  import type { ClassValue } from '../class-value';
3
+ import type { IconLike } from '../composables/icon';
3
4
  export interface CheckboxProps extends CheckboxRootProps {
4
5
  /** Text shown beside the box. Also makes the text clickable. */
5
6
  label?: string;
6
7
  /** Secondary text under the label. */
7
8
  description?: string;
9
+ /**
10
+ * How the control is drawn. `checkbox` is a box beside its label, `card`
11
+ * makes the whole bordered surface the control, and `tile` centres an icon
12
+ * above the label.
13
+ */
14
+ variant?: 'checkbox' | 'card' | 'tile';
15
+ /** Shown above the label by the `tile` variant, ignored by the others. */
16
+ icon?: IconLike;
8
17
  size?: 'sm' | 'md' | 'lg';
9
18
  id?: string;
10
19
  /** Mark as failing validation. Taken from the enclosing `IFormField` when omitted. */
@@ -16,21 +25,29 @@ export interface CheckboxProps extends CheckboxRootProps {
16
25
  ui?: {
17
26
  wrapper?: string;
18
27
  root?: string;
28
+ mark?: string;
29
+ icon?: string;
19
30
  indicator?: string;
20
31
  content?: string;
21
32
  label?: string;
22
33
  description?: string;
23
34
  };
24
35
  }
25
- declare var __VLS_13: {}, __VLS_31: {}, __VLS_33: {}, __VLS_48: {};
36
+ declare var __VLS_14: {}, __VLS_31: {}, __VLS_33: {}, __VLS_47: {}, __VLS_65: {}, __VLS_67: {}, __VLS_82: {};
26
37
  type __VLS_Slots = {} & {
27
- default?: (props: typeof __VLS_13) => any;
38
+ default?: (props: typeof __VLS_14) => any;
28
39
  } & {
29
40
  label?: (props: typeof __VLS_31) => any;
30
41
  } & {
31
42
  description?: (props: typeof __VLS_33) => any;
32
43
  } & {
33
- default?: (props: typeof __VLS_48) => any;
44
+ default?: (props: typeof __VLS_47) => any;
45
+ } & {
46
+ label?: (props: typeof __VLS_65) => any;
47
+ } & {
48
+ description?: (props: typeof __VLS_67) => any;
49
+ } & {
50
+ default?: (props: typeof __VLS_82) => any;
34
51
  };
35
52
  declare const __VLS_base: import("vue").DefineComponent<CheckboxProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
36
53
  "update:modelValue": (value: boolean | "indeterminate") => any;
@@ -2,16 +2,18 @@ import { useIryxUiConfig as e } from "../config.js";
2
2
  import t from "./Icon.js";
3
3
  import { useFormField as n } from "../composables/form.js";
4
4
  import { checkboxTheme as r } from "../theme/checkbox.js";
5
- import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeProps as f, normalizeClass as p, openBlock as m, renderSlot as h, toDisplayString as g, unref as _, withCtx as v } from "vue";
6
- import { MinusSignIcon as y, Tick02Icon as b } from "@hugeicons/core-free-icons";
7
- import { CheckboxIndicator as x, CheckboxRoot as S, Label as C, useForwardPropsEmits as w, useId as T } from "reka-ui";
5
+ import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeProps as f, normalizeClass as p, openBlock as m, renderSlot as h, toDisplayString as g, unref as _, useSlots as v, withCtx as y } from "vue";
6
+ import { MinusSignIcon as b, Tick02Icon as x } from "@hugeicons/core-free-icons";
7
+ import { CheckboxIndicator as S, CheckboxRoot as C, Label as w, useForwardPropsEmits as T, useId as E } from "reka-ui";
8
8
  //#region src/components/Checkbox.vue?vue&type=script&setup=true&lang.ts
9
- var E = ["id"], D = /*@__PURE__*/ d({
9
+ var D = ["id"], O = ["id"], k = ["id"], A = /*@__PURE__*/ d({
10
10
  inheritAttrs: !1,
11
11
  __name: "Checkbox",
12
12
  props: {
13
13
  label: {},
14
14
  description: {},
15
+ variant: {},
16
+ icon: {},
15
17
  size: {},
16
18
  id: {},
17
19
  invalid: {
@@ -41,35 +43,80 @@ var E = ["id"], D = /*@__PURE__*/ d({
41
43
  required: { type: Boolean }
42
44
  },
43
45
  emits: ["update:modelValue"],
44
- setup(d, { emit: D }) {
45
- let O = d, k = D, A = w(i(() => {
46
- let { label: e, description: t, size: n, id: r, invalid: i, unstyled: a, class: o, ui: s, ...c } = O;
47
- return c;
48
- }), k), j = T(), M = n(), N = i(() => O.invalid ?? M?.invalid.value ?? !1), P = i(() => O.id ?? M?.id.value ?? j);
49
- M && (M.id.value = P.value);
50
- let F = i(() => !!(O.label || O.description)), I = e(), L = i(() => O.unstyled ?? I.unstyled), R = i(() => r({
51
- size: O.size,
52
- withText: F.value,
53
- invalid: N.value
54
- })), z = i(() => L.value ? O.ui?.wrapper : R.value.wrapper({ class: O.ui?.wrapper })), B = i(() => L.value ? [O.ui?.root, O.class] : R.value.root({ class: [O.ui?.root, O.class] })), V = i(() => L.value ? O.ui?.indicator : R.value.indicator({ class: O.ui?.indicator })), H = i(() => L.value ? O.ui?.content : R.value.content({ class: O.ui?.content })), U = i(() => L.value ? O.ui?.label : R.value.label({ class: O.ui?.label })), W = i(() => L.value ? O.ui?.description : R.value.description({ class: O.ui?.description }));
55
- return (e, n) => F.value ? (m(), s("div", {
46
+ setup(d, { emit: A }) {
47
+ let j = d, M = A, N = T(i(() => {
48
+ let { label: e, description: t, variant: n, icon: r, size: i, id: a, invalid: o, unstyled: s, class: c, ui: l, ...u } = j;
49
+ return u;
50
+ }), M), P = v(), F = E(), I = n(), L = i(() => j.invalid ?? I?.invalid.value ?? !1), R = i(() => j.id ?? I?.id.value ?? F);
51
+ I && (I.id.value = R.value);
52
+ let z = i(() => !!(j.description || P.description)), B = i(() => !!(j.label || P.label || z.value)), V = i(() => z.value ? `${R.value}-description` : void 0), H = e(), U = i(() => j.unstyled ?? H.unstyled), W = i(() => (j.variant ?? "checkbox") !== "checkbox"), G = i(() => r({
53
+ variant: j.variant,
54
+ size: j.size,
55
+ withText: B.value,
56
+ invalid: L.value
57
+ })), K = i(() => U.value ? j.ui?.wrapper : G.value.wrapper({ class: j.ui?.wrapper })), q = i(() => U.value ? [j.ui?.root, j.class] : G.value.root({ class: [j.ui?.root, j.class] })), J = i(() => U.value ? j.ui?.indicator : G.value.indicator({ class: j.ui?.indicator })), Y = i(() => U.value ? j.ui?.content : G.value.content({ class: j.ui?.content })), X = i(() => U.value ? j.ui?.label : G.value.label({ class: j.ui?.label })), Z = i(() => U.value ? j.ui?.description : G.value.description({ class: j.ui?.description })), Q = i(() => U.value ? j.ui?.mark : G.value.mark({ class: j.ui?.mark })), $ = i(() => U.value ? j.ui?.icon : G.value.icon({ class: j.ui?.icon }));
58
+ return (e, n) => W.value ? (m(), a(_(C), f({
56
59
  key: 0,
57
- class: p(z.value)
58
- }, [u(_(S), f({ id: P.value }, {
59
- ..._(A),
60
+ id: R.value
61
+ }, {
62
+ ..._(N),
60
63
  ...e.$attrs
61
64
  }, {
62
- "aria-invalid": N.value || void 0,
63
- "aria-describedby": O.description ? `${P.value}-description` : void 0,
64
- class: B.value
65
+ "aria-invalid": L.value || void 0,
66
+ "aria-labelledby": `${R.value}-label`,
67
+ "aria-describedby": V.value,
68
+ class: [q.value, "group/item"]
65
69
  }), {
66
- default: v(() => [u(_(x), { class: p(V.value) }, {
67
- default: v(() => [h(e.$slots, "default", {}, () => [O.modelValue === "indeterminate" ? (m(), a(t, {
70
+ default: y(() => [j.variant === "card" ? (m(), s("span", {
71
+ key: 0,
72
+ class: p(Q.value)
73
+ }, [u(_(S), { class: p(J.value) }, {
74
+ default: y(() => [h(e.$slots, "default", {}, () => [j.modelValue === "indeterminate" ? (m(), a(t, {
68
75
  key: 0,
69
- icon: _(y)
76
+ icon: _(b)
70
77
  }, null, 8, ["icon"])) : (m(), a(t, {
71
78
  key: 1,
79
+ icon: _(x)
80
+ }, null, 8, ["icon"]))])]),
81
+ _: 3
82
+ }, 8, ["class"])], 2)) : j.icon ? (m(), a(t, {
83
+ key: 1,
84
+ icon: j.icon,
85
+ "data-slot": "icon",
86
+ class: p($.value)
87
+ }, null, 8, ["icon", "class"])) : o("", !0), c("span", { class: p(Y.value) }, [c("span", {
88
+ id: `${R.value}-label`,
89
+ class: p(X.value)
90
+ }, [h(e.$slots, "label", {}, () => [l(g(j.label), 1)])], 10, D), z.value ? (m(), s("span", {
91
+ key: 0,
92
+ id: `${R.value}-description`,
93
+ class: p(Z.value)
94
+ }, [h(e.$slots, "description", {}, () => [l(g(j.description), 1)])], 10, O)) : o("", !0)], 2)]),
95
+ _: 3
96
+ }, 16, [
97
+ "id",
98
+ "aria-invalid",
99
+ "aria-labelledby",
100
+ "aria-describedby",
101
+ "class"
102
+ ])) : B.value ? (m(), s("div", {
103
+ key: 1,
104
+ class: p(K.value)
105
+ }, [u(_(C), f({ id: R.value }, {
106
+ ..._(N),
107
+ ...e.$attrs
108
+ }, {
109
+ "aria-invalid": L.value || void 0,
110
+ "aria-describedby": V.value,
111
+ class: q.value
112
+ }), {
113
+ default: y(() => [u(_(S), { class: p(J.value) }, {
114
+ default: y(() => [h(e.$slots, "default", {}, () => [j.modelValue === "indeterminate" ? (m(), a(t, {
115
+ key: 0,
72
116
  icon: _(b)
117
+ }, null, 8, ["icon"])) : (m(), a(t, {
118
+ key: 1,
119
+ icon: _(x)
73
120
  }, null, 8, ["icon"]))])]),
74
121
  _: 3
75
122
  }, 8, ["class"])]),
@@ -79,33 +126,33 @@ var E = ["id"], D = /*@__PURE__*/ d({
79
126
  "aria-invalid",
80
127
  "aria-describedby",
81
128
  "class"
82
- ]), c("div", { class: p(H.value) }, [u(_(C), {
83
- for: P.value,
84
- class: p(U.value)
129
+ ]), c("div", { class: p(Y.value) }, [u(_(w), {
130
+ for: R.value,
131
+ class: p(X.value)
85
132
  }, {
86
- default: v(() => [h(e.$slots, "label", {}, () => [l(g(O.label), 1)])]),
133
+ default: y(() => [h(e.$slots, "label", {}, () => [l(g(j.label), 1)])]),
87
134
  _: 3
88
- }, 8, ["for", "class"]), O.description || e.$slots.description ? (m(), s("p", {
135
+ }, 8, ["for", "class"]), z.value ? (m(), s("p", {
89
136
  key: 0,
90
- id: `${P.value}-description`,
91
- class: p(W.value)
92
- }, [h(e.$slots, "description", {}, () => [l(g(O.description), 1)])], 10, E)) : o("", !0)], 2)], 2)) : (m(), a(_(S), f({
93
- key: 1,
94
- id: P.value
137
+ id: `${R.value}-description`,
138
+ class: p(Z.value)
139
+ }, [h(e.$slots, "description", {}, () => [l(g(j.description), 1)])], 10, k)) : o("", !0)], 2)], 2)) : (m(), a(_(C), f({
140
+ key: 2,
141
+ id: R.value
95
142
  }, {
96
- ..._(A),
143
+ ..._(N),
97
144
  ...e.$attrs
98
145
  }, {
99
- "aria-invalid": N.value || void 0,
100
- class: B.value
146
+ "aria-invalid": L.value || void 0,
147
+ class: q.value
101
148
  }), {
102
- default: v(() => [u(_(x), { class: p(V.value) }, {
103
- default: v(() => [h(e.$slots, "default", {}, () => [O.modelValue === "indeterminate" ? (m(), a(t, {
149
+ default: y(() => [u(_(S), { class: p(J.value) }, {
150
+ default: y(() => [h(e.$slots, "default", {}, () => [j.modelValue === "indeterminate" ? (m(), a(t, {
104
151
  key: 0,
105
- icon: _(y)
152
+ icon: _(b)
106
153
  }, null, 8, ["icon"])) : (m(), a(t, {
107
154
  key: 1,
108
- icon: _(b)
155
+ icon: _(x)
109
156
  }, null, 8, ["icon"]))])]),
110
157
  _: 3
111
158
  }, 8, ["class"])]),
@@ -118,4 +165,4 @@ var E = ["id"], D = /*@__PURE__*/ d({
118
165
  }
119
166
  });
120
167
  //#endregion
121
- export { D as default };
168
+ export { A as default };
@@ -0,0 +1,5 @@
1
+ import e from "./Code.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/Code.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,38 @@
1
+ import type { ClassValue } from '../class-value';
2
+ export interface CodeProps {
3
+ /** The code itself. The default slot renders instead when it is absent. */
4
+ code?: string;
5
+ /** Render a `pre` block rather than an inline chip. */
6
+ block?: boolean;
7
+ /** Show a copy button. Defaults to on for a block, off inline. */
8
+ copy?: boolean;
9
+ copyLabel?: string;
10
+ copiedLabel?: string;
11
+ /** Skip built-in classes; you take over styling entirely. */
12
+ unstyled?: boolean;
13
+ class?: ClassValue;
14
+ /** Override classes per element, e.g. `{ code: 'text-xs' }`. */
15
+ ui?: {
16
+ root?: string;
17
+ code?: string;
18
+ copy?: string;
19
+ };
20
+ }
21
+ declare var __VLS_8: {};
22
+ type __VLS_Slots = {} & {
23
+ default?: (props: typeof __VLS_8) => any;
24
+ };
25
+ declare const __VLS_base: import("vue").DefineComponent<CodeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CodeProps> & Readonly<{}>, {
26
+ unstyled: boolean;
27
+ copy: boolean;
28
+ copyLabel: string;
29
+ copiedLabel: string;
30
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
32
+ declare const _default: typeof __VLS_export;
33
+ export default _default;
34
+ type __VLS_WithSlots<T, S> = T & {
35
+ new (): {
36
+ $slots: S;
37
+ };
38
+ };
@@ -0,0 +1,66 @@
1
+ import { useIryxUiConfig as e } from "../config.js";
2
+ import t from "./Icon.js";
3
+ import { codeTheme as n } from "../theme/code.js";
4
+ import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, onBeforeUnmount as f, openBlock as p, ref as m, renderSlot as h, toDisplayString as g, unref as _, withCtx as v } from "vue";
5
+ import { Copy01Icon as y, Tick02Icon as b } from "@hugeicons/core-free-icons";
6
+ import { Primitive as x } from "reka-ui";
7
+ //#region src/components/Code.vue?vue&type=script&setup=true&lang.ts
8
+ var S = ["aria-label"], C = /*@__PURE__*/ u({
9
+ __name: "Code",
10
+ props: {
11
+ code: {},
12
+ block: { type: Boolean },
13
+ copy: {
14
+ type: Boolean,
15
+ default: void 0
16
+ },
17
+ copyLabel: { default: "Copy code" },
18
+ copiedLabel: { default: "Copied" },
19
+ unstyled: {
20
+ type: Boolean,
21
+ default: void 0
22
+ },
23
+ class: { type: [
24
+ String,
25
+ Boolean,
26
+ null,
27
+ Array
28
+ ] },
29
+ ui: {}
30
+ },
31
+ setup(u) {
32
+ let C = u, w = e(), T = r(() => C.unstyled ?? w.unstyled), E = r(() => C.copy ?? C.block ?? !1), D = m(), O = m(!1), k;
33
+ async function A() {
34
+ let e = C.code ?? D.value?.textContent ?? "";
35
+ if (e) {
36
+ try {
37
+ await navigator.clipboard.writeText(e);
38
+ } catch {
39
+ return;
40
+ }
41
+ O.value = !0, clearTimeout(k), k = setTimeout(() => O.value = !1, 2e3);
42
+ }
43
+ }
44
+ f(() => clearTimeout(k));
45
+ let j = r(() => n({ block: C.block })), M = r(() => T.value ? [C.ui?.root, C.class] : j.value.root({ class: [C.ui?.root, C.class] })), N = r(() => T.value ? C.ui?.code : j.value.code({ class: C.ui?.code })), P = r(() => T.value ? C.ui?.copy : j.value.copy({ class: C.ui?.copy }));
46
+ return (e, n) => (p(), i(_(x), {
47
+ as: C.block ? "pre" : "span",
48
+ class: d(M.value)
49
+ }, {
50
+ default: v(() => [s("code", {
51
+ ref_key: "codeEl",
52
+ ref: D,
53
+ class: d(N.value)
54
+ }, [h(e.$slots, "default", {}, () => [c(g(C.code), 1)])], 2), E.value ? (p(), o("button", {
55
+ key: 0,
56
+ type: "button",
57
+ class: d(P.value),
58
+ "aria-label": O.value ? C.copiedLabel : C.copyLabel,
59
+ onClick: A
60
+ }, [l(t, { icon: O.value ? _(b) : _(y) }, null, 8, ["icon"])], 10, S)) : a("", !0)]),
61
+ _: 3
62
+ }, 8, ["as", "class"]));
63
+ }
64
+ });
65
+ //#endregion
66
+ export { C as default };
@@ -0,0 +1,5 @@
1
+ import e from "./DescriptionList.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/DescriptionList.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,50 @@
1
+ import type { ClassValue } from '../class-value';
2
+ export interface DescriptionListItem {
3
+ term: string;
4
+ description?: string | number;
5
+ /** Passed to the slots, so a row can be rendered by name rather than by index. */
6
+ key?: string;
7
+ }
8
+ export interface DescriptionListProps {
9
+ items?: DescriptionListItem[];
10
+ /** `horizontal` puts the term and the description side by side on one row. */
11
+ orientation?: 'vertical' | 'horizontal';
12
+ /** Separate the rows with a rule instead of whitespace. */
13
+ divided?: boolean;
14
+ /** Skip built-in classes; you take over styling entirely. */
15
+ unstyled?: boolean;
16
+ class?: ClassValue;
17
+ /** Override classes per element, e.g. `{ term: 'text-foreground' }`. */
18
+ ui?: {
19
+ root?: string;
20
+ item?: string;
21
+ term?: string;
22
+ description?: string;
23
+ };
24
+ }
25
+ declare var __VLS_8: {
26
+ item: DescriptionListItem;
27
+ index: number;
28
+ }, __VLS_10: {
29
+ item: DescriptionListItem;
30
+ index: number;
31
+ }, __VLS_12: {};
32
+ type __VLS_Slots = {} & {
33
+ term?: (props: typeof __VLS_8) => any;
34
+ } & {
35
+ description?: (props: typeof __VLS_10) => any;
36
+ } & {
37
+ default?: (props: typeof __VLS_12) => any;
38
+ };
39
+ declare const __VLS_base: import("vue").DefineComponent<DescriptionListProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DescriptionListProps> & Readonly<{}>, {
40
+ items: DescriptionListItem[];
41
+ unstyled: boolean;
42
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
43
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
44
+ declare const _default: typeof __VLS_export;
45
+ export default _default;
46
+ type __VLS_WithSlots<T, S> = T & {
47
+ new (): {
48
+ $slots: S;
49
+ };
50
+ };
@@ -0,0 +1,48 @@
1
+ import { useIryxUiConfig as e } from "../config.js";
2
+ import { descriptionListTheme as t } from "../theme/description-list.js";
3
+ import { Fragment as n, computed as r, createBlock as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, defineComponent as c, normalizeClass as l, openBlock as u, renderList as d, renderSlot as f, toDisplayString as p, unref as m, withCtx as h } from "vue";
4
+ import { Primitive as g } from "reka-ui";
5
+ //#region src/components/DescriptionList.vue?vue&type=script&setup=true&lang.ts
6
+ var _ = /*@__PURE__*/ c({
7
+ __name: "DescriptionList",
8
+ props: {
9
+ items: { default: () => [] },
10
+ orientation: {},
11
+ divided: { type: Boolean },
12
+ unstyled: {
13
+ type: Boolean,
14
+ default: void 0
15
+ },
16
+ class: { type: [
17
+ String,
18
+ Boolean,
19
+ null,
20
+ Array
21
+ ] },
22
+ ui: {}
23
+ },
24
+ setup(c) {
25
+ let _ = c, v = e(), y = r(() => _.unstyled ?? v.unstyled), b = r(() => t({
26
+ orientation: _.orientation,
27
+ divided: _.divided
28
+ })), x = r(() => y.value ? [_.ui?.root, _.class] : b.value.root({ class: [_.ui?.root, _.class] })), S = r(() => y.value ? _.ui?.item : b.value.item({ class: _.ui?.item })), C = r(() => y.value ? _.ui?.term : b.value.term({ class: _.ui?.term })), w = r(() => y.value ? _.ui?.description : b.value.description({ class: _.ui?.description }));
29
+ return (e, t) => (u(), i(m(g), {
30
+ as: "dl",
31
+ class: l(x.value)
32
+ }, {
33
+ default: h(() => [(u(!0), a(n, null, d(_.items, (t, n) => (u(), a("div", {
34
+ key: t.key ?? t.term,
35
+ class: l(S.value)
36
+ }, [o("dt", { class: l(C.value) }, [f(e.$slots, "term", {
37
+ item: t,
38
+ index: n
39
+ }, () => [s(p(t.term), 1)])], 2), o("dd", { class: l(w.value) }, [f(e.$slots, "description", {
40
+ item: t,
41
+ index: n
42
+ }, () => [s(p(t.description), 1)])], 2)], 2))), 128)), f(e.$slots, "default")]),
43
+ _: 3
44
+ }, 8, ["class"]));
45
+ }
46
+ });
47
+ //#endregion
48
+ export { _ as default };
@@ -11,6 +11,18 @@ export interface ProgressProps {
11
11
  /** Current value. `null` (or `indeterminate`) means unknown duration. */
12
12
  modelValue?: number | null;
13
13
  max?: number;
14
+ /**
15
+ * `linear` is a bar, `circle` a ring with the value in the middle. A ring
16
+ * ignores `segments` — a broken-up ring is a donut chart, and `IDonutChart`
17
+ * is the component for that.
18
+ */
19
+ shape?: 'linear' | 'circle';
20
+ /**
21
+ * How many degrees of the ring the track covers — `180` is a half circle,
22
+ * `270` a gauge. The arc is centred at the top, so the gap sits at the
23
+ * bottom. Circles only, and ignored by the bar.
24
+ */
25
+ angle?: number;
14
26
  variant?: ProgressVariant;
15
27
  /**
16
28
  * Break the bar into runs that share one track — storage by file type, a
@@ -46,17 +58,31 @@ export interface ProgressProps {
46
58
  legendItem?: string;
47
59
  legendSwatch?: string;
48
60
  legendValue?: string;
61
+ ring?: string;
62
+ ringTrack?: string;
63
+ ringIndicator?: string;
64
+ ringContent?: string;
65
+ ringValue?: string;
66
+ ringLabel?: string;
49
67
  };
50
68
  }
51
- declare var __VLS_1: {}, __VLS_3: {
69
+ declare var __VLS_13: {
70
+ value: number | null;
71
+ percent: number;
72
+ formatted: string;
73
+ }, __VLS_15: {}, __VLS_17: {}, __VLS_19: {
52
74
  value: number | null;
53
75
  percent: number;
54
76
  formatted: string;
55
77
  };
56
78
  type __VLS_Slots = {} & {
57
- label?: (props: typeof __VLS_1) => any;
79
+ value?: (props: typeof __VLS_13) => any;
80
+ } & {
81
+ label?: (props: typeof __VLS_15) => any;
82
+ } & {
83
+ label?: (props: typeof __VLS_17) => any;
58
84
  } & {
59
- value?: (props: typeof __VLS_3) => any;
85
+ value?: (props: typeof __VLS_19) => any;
60
86
  };
61
87
  declare const __VLS_base: import("vue").DefineComponent<ProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ProgressProps> & Readonly<{}>, {
62
88
  unstyled: boolean;