@brumaombra/ui-vintage 0.2.2 → 0.3.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 (41) hide show
  1. package/README.md +9 -9
  2. package/dist/{Busy-DSyPtpVD.js → Busy-1BeD2TRH.js} +5 -13
  3. package/dist/{CalendarPrevButton.vue_vue_type_script_setup_true_lang-Dqz6DIGp.js → CalendarPrevButton.vue_vue_type_script_setup_true_lang-BklOxtD-.js} +17 -29
  4. package/dist/CardFooter.vue_vue_type_script_setup_true_lang-B1eS9wge.js +40 -0
  5. package/dist/{DialogPortal-BTVR2QvT.js → DialogPortal-D81oXsCY.js} +1 -13
  6. package/dist/{DialogTitle.vue_vue_type_script_setup_true_lang-83YQbiAn.js → DialogTitle.vue_vue_type_script_setup_true_lang-BMXrxvBF.js} +3 -2
  7. package/dist/HugeiconsIcon.vue-BJ-_Wtmk.js +124 -0
  8. package/dist/{NativeSelectOption.vue_vue_type_script_setup_true_lang-CWhL2Lw8.js → NativeSelectOption.vue_vue_type_script_setup_true_lang-Ce5VmA0n.js} +4 -3
  9. package/dist/{SheetTitle.vue_vue_type_script_setup_true_lang-fx9jbBwT.js → SheetTitle.vue_vue_type_script_setup_true_lang-Csr3nKnG.js} +6 -2
  10. package/dist/badge.js +50 -0
  11. package/dist/busy-indicator.js +1 -1
  12. package/dist/busy.js +1 -1
  13. package/dist/calendar.js +1 -1
  14. package/dist/card.js +7 -40
  15. package/dist/command.js +6 -13
  16. package/dist/components/confirm-dialog/index.d.ts +2 -2
  17. package/dist/components/dashboard-shell/DashboardShell.vue.d.ts +1 -0
  18. package/dist/components/error-page/ErrorPage.vue.d.ts +51 -0
  19. package/dist/components/error-page/index.d.ts +2 -0
  20. package/dist/components/message-dialog/index.d.ts +2 -2
  21. package/dist/components/slider-form-component/SliderFormComponent.vue.d.ts +3 -3
  22. package/dist/components/ui/badge/Badge.vue.d.ts +24 -0
  23. package/dist/components/ui/badge/index.d.ts +6 -0
  24. package/dist/components/ui/button/index.d.ts +1 -1
  25. package/dist/components/ui/popover/PopoverContent.vue.d.ts +1 -1
  26. package/dist/confirm-dialog.js +13 -19
  27. package/dist/dashboard-shell.js +9 -2
  28. package/dist/date-picker.js +6 -15
  29. package/dist/dialog.js +7 -3
  30. package/dist/error-page.js +113 -0
  31. package/dist/message-dialog.js +22 -54
  32. package/dist/native-select.js +1 -1
  33. package/dist/select.js +17 -16
  34. package/dist/sheet.js +1 -1
  35. package/dist/sidebar.js +3 -13
  36. package/dist/style.css +160 -8
  37. package/package.json +11 -2
  38. package/dist/check-iejznCzf.js +0 -11
  39. package/dist/chevron-down-DP-oz-sL.js +0 -13
  40. package/dist/createLucideIcon-CCMB2vDW.js +0 -130
  41. package/dist/info-DZrSmi42.js +0 -15
package/dist/command.js CHANGED
@@ -11,21 +11,11 @@ import { V as VisuallyHiddenInput_default } from "./VisuallyHiddenInput-1G1IEkBL
11
11
  import { u as useVModel, e as useCurrentElement } from "./index-Cq9Ekgtb.js";
12
12
  import { o as createEventHook, g as refAutoReset, r as reactiveOmit } from "./index-qGMU40e1.js";
13
13
  import { c as cn } from "./utils-Bz4m9VPB.js";
14
- import { _ as _sfc_main$9, a as _sfc_main$a, c as _sfc_main$b, e as _sfc_main$c, b as _sfc_main$d } from "./DialogTitle.vue_vue_type_script_setup_true_lang-83YQbiAn.js";
14
+ import { _ as _sfc_main$9, a as _sfc_main$a, c as _sfc_main$b, e as _sfc_main$c, b as _sfc_main$d } from "./DialogTitle.vue_vue_type_script_setup_true_lang-BMXrxvBF.js";
15
15
  import { u as useId, h as handleAndDispatchCustomEvent } from "./Teleport-CV0tKbq5.js";
16
- import { c as createLucideIcon } from "./createLucideIcon-CCMB2vDW.js";
16
+ import { H as HugeiconsIcon, p as pkr } from "./HugeiconsIcon.vue-BJ-_Wtmk.js";
17
17
  import { u as useForwardExpose } from "./useForwardExpose-BiRQH8eO.js";
18
18
  import { S as Separator_default } from "./Separator-CFm_M4pb.js";
19
- /**
20
- * @license lucide-vue-next v1.0.0 - ISC
21
- *
22
- * This source code is licensed under the ISC license.
23
- * See the LICENSE file in the root directory of this source tree.
24
- */
25
- const Search = createLucideIcon("search", [
26
- ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
27
- ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
28
- ]);
29
19
  function findValuesBetween(array, start, end) {
30
20
  const startIndex = array.findIndex((i) => isEqual(i, start));
31
21
  const endIndex = array.findIndex((i) => isEqual(i, end));
@@ -957,7 +947,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
957
947
  const { filterState } = useCommand();
958
948
  return (_ctx, _cache) => {
959
949
  return openBlock(), createElementBlock("div", _hoisted_1$1, [
960
- createVNode(unref(Search), { class: "size-4 shrink-0 opacity-50" }),
950
+ createVNode(unref(HugeiconsIcon), {
951
+ icon: unref(pkr),
952
+ class: "size-4 shrink-0 opacity-50"
953
+ }, null, 8, ["icon"]),
961
954
  createVNode(unref(ListboxFilter_default), mergeProps({ ...unref(forwardedProps), ..._ctx.$attrs }, {
962
955
  modelValue: unref(filterState).search,
963
956
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(filterState).search = $event),
@@ -1,3 +1,3 @@
1
1
  export { default as ConfirmDialog } from './ConfirmDialog.vue';
2
- export { cancelActiveConfirmDialog, closeConfirmDialog, confirmActiveDialog, confirmDialogState, showConfirmDialog, } from './confirm-dialog-state';
3
- export type { DialogButtonVariant, ShowConfirmDialogOptions, } from './confirm-dialog-state';
2
+ export { cancelActiveConfirmDialog, closeConfirmDialog, confirmActiveDialog, confirmDialogState, showConfirmDialog } from './confirm-dialog-state';
3
+ export type { DialogButtonVariant, ShowConfirmDialogOptions } from './confirm-dialog-state';
@@ -7,6 +7,7 @@ interface DashboardSidebarItem {
7
7
  href?: string;
8
8
  to?: unknown;
9
9
  active?: boolean;
10
+ newTab?: boolean;
10
11
  }
11
12
  interface DashboardSidebarSection {
12
13
  id: string;
@@ -0,0 +1,51 @@
1
+ import { HTMLAttributes } from 'vue';
2
+ interface ErrorPageProps {
3
+ statusCode?: number | string;
4
+ label?: string;
5
+ title?: string;
6
+ message?: string;
7
+ actionLabel?: string;
8
+ showBackground?: boolean;
9
+ showDefaultAction?: boolean;
10
+ class?: HTMLAttributes["class"];
11
+ cardClass?: HTMLAttributes["class"];
12
+ contentClass?: HTMLAttributes["class"];
13
+ footerClass?: HTMLAttributes["class"];
14
+ }
15
+ declare function __VLS_template(): {
16
+ attrs: Partial<{}>;
17
+ slots: {
18
+ toolbar?(_: {}): any;
19
+ brand?(_: {}): any;
20
+ actions?(_: {
21
+ onAction: () => void;
22
+ }): any;
23
+ };
24
+ refs: {};
25
+ rootEl: HTMLDivElement;
26
+ };
27
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
28
+ declare const __VLS_component: import('vue').DefineComponent<ErrorPageProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
29
+ action: () => any;
30
+ }, string, import('vue').PublicProps, Readonly<ErrorPageProps> & Readonly<{
31
+ onAction?: (() => any) | undefined;
32
+ }>, {
33
+ label: string;
34
+ title: string;
35
+ class: HTMLAttributes["class"];
36
+ message: string;
37
+ showBackground: boolean;
38
+ statusCode: number | string;
39
+ actionLabel: string;
40
+ showDefaultAction: boolean;
41
+ cardClass: HTMLAttributes["class"];
42
+ contentClass: HTMLAttributes["class"];
43
+ footerClass: HTMLAttributes["class"];
44
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
45
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
46
+ export default _default;
47
+ type __VLS_WithTemplateSlots<T, S> = T & {
48
+ new (): {
49
+ $slots: S;
50
+ };
51
+ };
@@ -0,0 +1,2 @@
1
+ export { default } from './ErrorPage.vue';
2
+ export { default as ErrorPage } from './ErrorPage.vue';
@@ -1,3 +1,3 @@
1
1
  export { default as MessageDialog } from './MessageDialog.vue';
2
- export { closeMessageDialog, messageDialogState, resolveActiveMessageDialog, showMessageDialog, } from './message-dialog-state';
3
- export type { DialogMessageType, ShowMessageDialogOptions, } from './message-dialog-state';
2
+ export { closeMessageDialog, messageDialogState, resolveActiveMessageDialog, showMessageDialog } from './message-dialog-state';
3
+ export type { DialogMessageType, ShowMessageDialogOptions } from './message-dialog-state';
@@ -13,11 +13,11 @@ declare const _default: import('vue').DefineComponent<SliderFormComponentProps,
13
13
  }, string, import('vue').PublicProps, Readonly<SliderFormComponentProps> & Readonly<{
14
14
  "onUpdate:modelValue"?: ((value: number) => any) | undefined;
15
15
  }>, {
16
- id: string;
17
- max: number;
18
- min: number;
19
16
  description: string;
17
+ min: number;
18
+ max: number;
20
19
  step: number;
20
+ id: string;
21
21
  valueText: string;
22
22
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
23
23
  export default _default;
@@ -0,0 +1,24 @@
1
+ import { PrimitiveProps } from 'reka-ui';
2
+ import { HTMLAttributes } from 'vue';
3
+ import { BadgeVariants } from '.';
4
+ interface Props extends PrimitiveProps {
5
+ variant?: BadgeVariants["variant"];
6
+ class?: HTMLAttributes["class"];
7
+ }
8
+ declare function __VLS_template(): {
9
+ attrs: Partial<{}>;
10
+ slots: {
11
+ default?(_: {}): any;
12
+ };
13
+ refs: {};
14
+ rootEl: any;
15
+ };
16
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, 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,6 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ export { default as Badge } from './Badge.vue';
3
+ export declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ export type BadgeVariants = VariantProps<typeof badgeVariants>;
@@ -2,6 +2,6 @@ import { VariantProps } from 'class-variance-authority';
2
2
  export { default as Button } from './Button.vue';
3
3
  export declare const buttonVariants: (props?: ({
4
4
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
- size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
5
+ size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  export type ButtonVariants = VariantProps<typeof buttonVariants>;
@@ -28,7 +28,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
28
28
  onCloseAutoFocus?: ((event: Event) => any) | undefined;
29
29
  }>, {
30
30
  sideOffset: number;
31
- align: "end" | "start" | "center";
31
+ align: "start" | "center" | "end";
32
32
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
33
33
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
34
34
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import { reactive, render, h, markRaw, defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, resolveDynamicComponent, createVNode, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
+ import { H as HugeiconsIcon, A as AE } from "./HugeiconsIcon.vue-BJ-_Wtmk.js";
2
3
  import { _ as _sfc_main$1, a as _sfc_main$2, b as _sfc_main$3, c as _sfc_main$4, d as _sfc_main$5, e as _sfc_main$6 } from "./AlertDialogTitle.vue_vue_type_script_setup_true_lang-Ca0g2mVz.js";
3
4
  import { Button as _sfc_main$7 } from "./button.js";
4
- import { I as Info } from "./info-DZrSmi42.js";
5
5
  const confirmDialogQueue = [];
6
6
  let nextConfirmDialogId = 0;
7
7
  const DIALOG_CLOSE_DURATION_MS = 300;
@@ -57,9 +57,7 @@ const clearCurrentConfirmDialog = () => {
57
57
  openNextConfirmDialog();
58
58
  };
59
59
  const scheduleCloseCurrentConfirmDialog = () => {
60
- if (!confirmDialogState.current || !confirmDialogState.isOpen) {
61
- return;
62
- }
60
+ if (!confirmDialogState.current || !confirmDialogState.isOpen) return;
63
61
  confirmDialogState.isOpen = false;
64
62
  if (closeTimer) {
65
63
  clearTimeout(closeTimer);
@@ -71,18 +69,14 @@ const scheduleCloseCurrentConfirmDialog = () => {
71
69
  };
72
70
  const closeConfirmDialog = () => {
73
71
  const current = confirmDialogState.current;
74
- if (!current || !confirmDialogState.isOpen) {
75
- return;
76
- }
72
+ if (!current || !confirmDialogState.isOpen) return;
77
73
  current.resolve(false);
78
74
  scheduleCloseCurrentConfirmDialog();
79
75
  };
80
76
  const cancelActiveConfirmDialog = async () => {
81
77
  var _a, _b;
82
78
  const current = confirmDialogState.current;
83
- if (!current || confirmDialogState.busy) {
84
- return;
85
- }
79
+ if (!current || confirmDialogState.busy) return;
86
80
  confirmDialogState.busy = true;
87
81
  try {
88
82
  await ((_b = (_a = current.options).onCancel) == null ? void 0 : _b.call(_a));
@@ -94,9 +88,7 @@ const cancelActiveConfirmDialog = async () => {
94
88
  const confirmActiveDialog = async () => {
95
89
  var _a, _b;
96
90
  const current = confirmDialogState.current;
97
- if (!current || confirmDialogState.busy) {
98
- return;
99
- }
91
+ if (!current || confirmDialogState.busy) return;
100
92
  confirmDialogState.busy = true;
101
93
  try {
102
94
  await ((_b = (_a = current.options).onConfirm) == null ? void 0 : _b.call(_a));
@@ -134,10 +126,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
134
126
  __name: "ConfirmDialog",
135
127
  setup(__props) {
136
128
  const currentDialog = computed(() => confirmDialogState.current);
137
- const confirmIcon = computed(() => {
138
- var _a;
139
- return ((_a = currentDialog.value) == null ? void 0 : _a.options.icon) ?? Info;
140
- });
141
129
  const handleOpenChange = (open) => {
142
130
  if (!open) {
143
131
  closeConfirmDialog();
@@ -154,10 +142,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
154
142
  createElementVNode("div", _hoisted_1, [
155
143
  createElementVNode("div", _hoisted_2, [
156
144
  createElementVNode("div", _hoisted_3, [
157
- (openBlock(), createBlock(resolveDynamicComponent(confirmIcon.value), {
145
+ currentDialog.value.options.icon ? (openBlock(), createBlock(resolveDynamicComponent(currentDialog.value.options.icon), {
146
+ key: 0,
147
+ "stroke-width": 1.8,
148
+ class: "size-6 text-[var(--button-primary-light)] dark:text-[var(--button-primary-dark)]"
149
+ })) : (openBlock(), createBlock(unref(HugeiconsIcon), {
150
+ key: 1,
151
+ icon: unref(AE),
158
152
  "stroke-width": 1.8,
159
153
  class: "size-6 text-[var(--button-primary-light)] dark:text-[var(--button-primary-dark)]"
160
- }))
154
+ }, null, 8, ["icon"]))
161
155
  ]),
162
156
  createVNode(unref(_sfc_main$3), { class: "sm:pt-0" }, {
163
157
  default: withCtx(() => [
@@ -33,10 +33,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
33
  setup(__props) {
34
34
  const props = __props;
35
35
  const getSidebarItemLinkProps = (item) => {
36
+ const sharedProps = item.newTab ? { target: "_blank", rel: "noopener noreferrer" } : {};
36
37
  if (props.sidebarLinkComponent === "a") {
37
- return { href: item.href ?? "#" };
38
+ return {
39
+ href: item.href ?? "#",
40
+ ...sharedProps
41
+ };
38
42
  }
39
- return { to: item.to ?? item.href ?? "/" };
43
+ return {
44
+ to: item.to ?? item.href ?? "/",
45
+ ...sharedProps
46
+ };
40
47
  };
41
48
  return (_ctx, _cache) => {
42
49
  return openBlock(), createBlock(unref(_sfc_main$1), null, {
@@ -1,21 +1,9 @@
1
1
  import { defineComponent, ref, computed, openBlock, createBlock, unref, withCtx, createVNode, normalizeClass, createTextVNode, toDisplayString } from "vue";
2
- import { $ as $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3, l as $14e0f24ef4ac5c92$export$aa8b41735afcabd2, m as $fb18d541ea1ad717$export$ad991b66133851cf, _ as _sfc_main$5 } from "./CalendarPrevButton.vue_vue_type_script_setup_true_lang-Dqz6DIGp.js";
2
+ import { $ as $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3, l as $14e0f24ef4ac5c92$export$aa8b41735afcabd2, m as $fb18d541ea1ad717$export$ad991b66133851cf, _ as _sfc_main$5 } from "./CalendarPrevButton.vue_vue_type_script_setup_true_lang-BklOxtD-.js";
3
+ import { H as HugeiconsIcon, c as cL } from "./HugeiconsIcon.vue-BJ-_Wtmk.js";
3
4
  import { c as cn } from "./utils-Bz4m9VPB.js";
4
5
  import { Button as _sfc_main$3 } from "./button.js";
5
6
  import { _ as _sfc_main$1, a as _sfc_main$2, b as _sfc_main$4 } from "./PopoverTrigger.vue_vue_type_script_setup_true_lang-DFZJvU_P.js";
6
- import { c as createLucideIcon } from "./createLucideIcon-CCMB2vDW.js";
7
- /**
8
- * @license lucide-vue-next v1.0.0 - ISC
9
- *
10
- * This source code is licensed under the ISC license.
11
- * See the LICENSE file in the root directory of this source tree.
12
- */
13
- const Calendar = createLucideIcon("calendar", [
14
- ["path", { d: "M8 2v4", key: "1cmpym" }],
15
- ["path", { d: "M16 2v4", key: "4m81vk" }],
16
- ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
17
- ["path", { d: "M3 10h18", key: "8toen8" }]
18
- ]);
19
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
20
8
  __name: "DatePicker",
21
9
  props: {
@@ -55,7 +43,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55
43
  class: normalizeClass(unref(cn)("w-[240px] justify-start text-left font-normal", !date.value && "text-muted-foreground", props.class))
56
44
  }, {
57
45
  default: withCtx(() => [
58
- createVNode(unref(Calendar), { class: "size-4" }),
46
+ createVNode(unref(HugeiconsIcon), {
47
+ icon: unref(cL),
48
+ class: "size-4"
49
+ }, null, 8, ["icon"]),
59
50
  createTextVNode(" " + toDisplayString(date.value ? unref(formatter).format(date.value.toDate(unref($14e0f24ef4ac5c92$export$aa8b41735afcabd2)())) : _ctx.placeholder), 1)
60
51
  ]),
61
52
  _: 1
package/dist/dialog.js CHANGED
@@ -1,11 +1,12 @@
1
- import { _, a, b, c, d, e } from "./DialogTitle.vue_vue_type_script_setup_true_lang-83YQbiAn.js";
1
+ import { _, a, b, c, d, e } from "./DialogTitle.vue_vue_type_script_setup_true_lang-BMXrxvBF.js";
2
2
  import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, createElementBlock, normalizeClass, createVNode, createTextVNode, createCommentVNode, createElementVNode } from "vue";
3
3
  import { D as DialogClose_default } from "./DialogClose-DDtZ0Em0.js";
4
4
  import { c as cn } from "./utils-Bz4m9VPB.js";
5
5
  import { Button as _sfc_main$4 } from "./button.js";
6
+ import { H as HugeiconsIcon, a as dp } from "./HugeiconsIcon.vue-BJ-_Wtmk.js";
6
7
  import { u as useForwardPropsEmits } from "./useForwardPropsEmits-DmumnZO5.js";
7
8
  import { D as DialogOverlay_default, a as DialogContent_default } from "./DialogTitle-CLuntLBB.js";
8
- import { D as DialogPortal_default, X } from "./DialogPortal-BTVR2QvT.js";
9
+ import { D as DialogPortal_default } from "./DialogPortal-D81oXsCY.js";
9
10
  import { r as reactiveOmit } from "./index-qGMU40e1.js";
10
11
  import { D as DialogTrigger_default } from "./DialogTrigger-CjJ8QNL_.js";
11
12
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
@@ -99,7 +100,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
99
100
  renderSlot(_ctx.$slots, "default"),
100
101
  createVNode(unref(DialogClose_default), { class: "absolute top-4 right-4 rounded border border-border bg-card p-1 text-muted-foreground transition-all duration-200 hover:bg-accent hover:text-foreground" }, {
101
102
  default: withCtx(() => [
102
- createVNode(unref(X), { class: "w-4 h-4" }),
103
+ createVNode(unref(HugeiconsIcon), {
104
+ icon: unref(dp),
105
+ class: "size-4"
106
+ }, null, 8, ["icon"]),
103
107
  _cache[1] || (_cache[1] = createElementVNode("span", { class: "sr-only" }, "Close", -1))
104
108
  ]),
105
109
  _: 1
@@ -0,0 +1,113 @@
1
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createBlock, createCommentVNode, createElementVNode, renderSlot, createVNode, withCtx, toDisplayString, createTextVNode } from "vue";
2
+ import { H as HugeiconsIcon, m as mn } from "./HugeiconsIcon.vue-BJ-_Wtmk.js";
3
+ import { B as BackgroundGrid } from "./BackgroundGrid-Cxvbtefm.js";
4
+ import { Button as _sfc_main$4 } from "./button.js";
5
+ import { _ as _sfc_main$1 } from "./Card.vue_vue_type_script_setup_true_lang-6ol3rxy1.js";
6
+ import { _ as _sfc_main$2, a as _sfc_main$3 } from "./CardFooter.vue_vue_type_script_setup_true_lang-B1eS9wge.js";
7
+ import { c as cn } from "./utils-Bz4m9VPB.js";
8
+ const _hoisted_1 = { class: "relative z-10 mx-auto flex min-h-screen w-full max-w-6xl items-center justify-center px-4 py-10 sm:px-6 lg:px-8" };
9
+ const _hoisted_2 = { class: "w-full max-w-xl" };
10
+ const _hoisted_3 = {
11
+ key: 0,
12
+ class: "mb-4 flex justify-end gap-3"
13
+ };
14
+ const _hoisted_4 = { class: "text-sm font-semibold uppercase tracking-[0.24em] text-[var(--button-primary-light)] dark:text-[var(--button-primary-dark)]" };
15
+ const _hoisted_5 = { class: "mt-3 text-2xl font-bold" };
16
+ const _hoisted_6 = { class: "mt-4 text-sm leading-7 text-[var(--text-secondary-light)] dark:text-[var(--text-secondary-dark)] sm:text-base" };
17
+ const _sfc_main = /* @__PURE__ */ defineComponent({
18
+ __name: "ErrorPage",
19
+ props: {
20
+ statusCode: { default: 500 },
21
+ label: { default: "Error" },
22
+ title: { default: void 0 },
23
+ message: { default: void 0 },
24
+ actionLabel: { default: "Go back" },
25
+ showBackground: { type: Boolean, default: true },
26
+ showDefaultAction: { type: Boolean, default: true },
27
+ class: { default: void 0 },
28
+ cardClass: { default: void 0 },
29
+ contentClass: { default: void 0 },
30
+ footerClass: { default: void 0 }
31
+ },
32
+ emits: ["action"],
33
+ setup(__props, { emit: __emit }) {
34
+ const props = __props;
35
+ const emit = __emit;
36
+ const resolvedStatusCode = computed(() => String(props.statusCode ?? 500));
37
+ const resolvedTitle = computed(() => {
38
+ if (props.title) return props.title;
39
+ if (resolvedStatusCode.value === "404") return "Page not found";
40
+ return "Something went wrong";
41
+ });
42
+ const resolvedMessage = computed(() => {
43
+ if (props.message) return props.message;
44
+ if (resolvedStatusCode.value === "404") return "The page you requested could not be found or may have been moved.";
45
+ return "An unexpected error interrupted the current flow. Please try again or go back to a safe page.";
46
+ });
47
+ const handleAction = () => {
48
+ emit("action");
49
+ };
50
+ return (_ctx, _cache) => {
51
+ return openBlock(), createElementBlock("div", {
52
+ class: normalizeClass(unref(cn)("relative min-h-screen bg-[var(--bg-main-light)] text-[var(--text-primary-light)] dark:bg-[var(--bg-main-dark)] dark:text-[var(--text-primary-dark)]", props.class))
53
+ }, [
54
+ props.showBackground ? (openBlock(), createBlock(BackgroundGrid, { key: 0 })) : createCommentVNode("", true),
55
+ createElementVNode("main", _hoisted_1, [
56
+ createElementVNode("div", _hoisted_2, [
57
+ _ctx.$slots.toolbar ? (openBlock(), createElementBlock("div", _hoisted_3, [
58
+ renderSlot(_ctx.$slots, "toolbar")
59
+ ])) : createCommentVNode("", true),
60
+ createVNode(unref(_sfc_main$1), {
61
+ class: normalizeClass(props.cardClass)
62
+ }, {
63
+ default: withCtx(() => [
64
+ createVNode(unref(_sfc_main$2), {
65
+ class: normalizeClass(unref(cn)("space-y-8", props.contentClass))
66
+ }, {
67
+ default: withCtx(() => [
68
+ renderSlot(_ctx.$slots, "brand"),
69
+ createElementVNode("div", null, [
70
+ createElementVNode("div", _hoisted_4, toDisplayString(props.label) + " " + toDisplayString(resolvedStatusCode.value), 1),
71
+ createElementVNode("h1", _hoisted_5, toDisplayString(resolvedTitle.value), 1),
72
+ createElementVNode("p", _hoisted_6, toDisplayString(resolvedMessage.value), 1)
73
+ ])
74
+ ]),
75
+ _: 3
76
+ }, 8, ["class"]),
77
+ createVNode(unref(_sfc_main$3), {
78
+ class: normalizeClass(unref(cn)("items-start flex-col gap-3 sm:flex-row sm:items-center", props.footerClass))
79
+ }, {
80
+ default: withCtx(() => [
81
+ renderSlot(_ctx.$slots, "actions", { onAction: handleAction }, () => [
82
+ props.showDefaultAction ? (openBlock(), createBlock(unref(_sfc_main$4), {
83
+ key: 0,
84
+ variant: "default",
85
+ onClick: handleAction
86
+ }, {
87
+ default: withCtx(() => [
88
+ createVNode(unref(HugeiconsIcon), {
89
+ icon: unref(mn),
90
+ "stroke-width": 1.8,
91
+ class: "size-4"
92
+ }, null, 8, ["icon"]),
93
+ createTextVNode(" " + toDisplayString(props.actionLabel), 1)
94
+ ]),
95
+ _: 1
96
+ })) : createCommentVNode("", true)
97
+ ])
98
+ ]),
99
+ _: 3
100
+ }, 8, ["class"])
101
+ ]),
102
+ _: 3
103
+ }, 8, ["class"])
104
+ ])
105
+ ])
106
+ ], 2);
107
+ };
108
+ }
109
+ });
110
+ export {
111
+ _sfc_main as ErrorPage,
112
+ _sfc_main as default
113
+ };
@@ -1,20 +1,7 @@
1
1
  import { reactive, render, h, markRaw, defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeClass, resolveDynamicComponent, createVNode, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
+ import { A as AE, $ as $o, T as TWr, H as HugeiconsIcon } from "./HugeiconsIcon.vue-BJ-_Wtmk.js";
2
3
  import { _ as _sfc_main$1, a as _sfc_main$2, b as _sfc_main$3, c as _sfc_main$4, d as _sfc_main$5, e as _sfc_main$6 } from "./AlertDialogTitle.vue_vue_type_script_setup_true_lang-Ca0g2mVz.js";
3
4
  import { Button as _sfc_main$7 } from "./button.js";
4
- import { I as Info } from "./info-DZrSmi42.js";
5
- import { c as createLucideIcon } from "./createLucideIcon-CCMB2vDW.js";
6
- import { C as Check } from "./check-iejznCzf.js";
7
- /**
8
- * @license lucide-vue-next v1.0.0 - ISC
9
- *
10
- * This source code is licensed under the ISC license.
11
- * See the LICENSE file in the root directory of this source tree.
12
- */
13
- const CircleAlert = createLucideIcon("circle-alert", [
14
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
15
- ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
16
- ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
17
- ]);
18
5
  const messageDialogQueue = [];
19
6
  let nextMessageDialogId = 0;
20
7
  const DIALOG_CLOSE_DURATION_MS = 300;
@@ -84,17 +71,13 @@ const scheduleCloseCurrentMessageDialog = () => {
84
71
  };
85
72
  const closeMessageDialog = () => {
86
73
  const current = messageDialogState.current;
87
- if (!current || !messageDialogState.isOpen) {
88
- return;
89
- }
74
+ if (!current || !messageDialogState.isOpen) return;
90
75
  current.resolve();
91
76
  scheduleCloseCurrentMessageDialog();
92
77
  };
93
78
  const resolveActiveMessageDialog = () => {
94
79
  const current = messageDialogState.current;
95
- if (!current || messageDialogState.busy) {
96
- return;
97
- }
80
+ if (!current || messageDialogState.busy) return;
98
81
  current.resolve();
99
82
  scheduleCloseCurrentMessageDialog();
100
83
  };
@@ -121,46 +104,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
121
104
  __name: "MessageDialog",
122
105
  setup(__props) {
123
106
  const currentDialog = computed(() => messageDialogState.current);
124
- const messageIcon = computed(() => {
107
+ const defaultMessageIcon = computed(() => {
125
108
  const current = currentDialog.value;
126
- if (!current) {
127
- return Info;
128
- }
129
- if (current.options.icon) {
130
- return current.options.icon;
131
- }
132
- if (current.options.type === "Error") {
133
- return CircleAlert;
134
- }
135
- if (current.options.type === "Success") {
136
- return Check;
137
- }
138
- return Info;
109
+ if (!current) return AE;
110
+ if (current.options.type === "Error") return $o;
111
+ if (current.options.type === "Success") return TWr;
112
+ return AE;
139
113
  });
140
114
  const messageIconClasses = computed(() => {
141
115
  const current = currentDialog.value;
142
- if (!current) {
143
- return "border-[var(--border)] bg-[var(--bg-surface-light)] dark:bg-[var(--bg-surface-dark)]";
144
- }
145
- if (current.options.type === "Error") {
146
- return "border-red-200 bg-red-50 dark:border-red-900/50 dark:bg-red-950/30";
147
- }
148
- if (current.options.type === "Success") {
149
- return "border-green-200 bg-green-50 dark:border-green-900/50 dark:bg-green-950/30";
150
- }
116
+ if (!current) return "border-[var(--border)] bg-[var(--bg-surface-light)] dark:bg-[var(--bg-surface-dark)]";
117
+ if (current.options.type === "Error") return "border-red-200 bg-red-50 dark:border-red-900/50 dark:bg-red-950/30";
118
+ if (current.options.type === "Success") return "border-green-200 bg-green-50 dark:border-green-900/50 dark:bg-green-950/30";
151
119
  return "border-[var(--border)] bg-[var(--bg-surface-light)] dark:bg-[var(--bg-surface-dark)]";
152
120
  });
153
121
  const messageGlyphClasses = computed(() => {
154
122
  const current = currentDialog.value;
155
- if (!current) {
156
- return "text-blue-600";
157
- }
158
- if (current.options.type === "Error") {
159
- return "text-red-600";
160
- }
161
- if (current.options.type === "Success") {
162
- return "text-green-600";
163
- }
123
+ if (!current) return "text-blue-600";
124
+ if (current.options.type === "Error") return "text-red-600";
125
+ if (current.options.type === "Success") return "text-green-600";
164
126
  return "text-blue-600";
165
127
  });
166
128
  const handleOpenChange = (open) => {
@@ -181,10 +143,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
181
143
  createElementVNode("div", {
182
144
  class: normalizeClass(["flex size-12 shrink-0 self-center items-center justify-center rounded border sm:size-10 sm:self-start", messageIconClasses.value])
183
145
  }, [
184
- (openBlock(), createBlock(resolveDynamicComponent(messageIcon.value), {
146
+ currentDialog.value.options.icon ? (openBlock(), createBlock(resolveDynamicComponent(currentDialog.value.options.icon), {
147
+ key: 0,
148
+ "stroke-width": 1.8,
149
+ class: normalizeClass(["size-6", messageGlyphClasses.value])
150
+ }, null, 8, ["class"])) : (openBlock(), createBlock(unref(HugeiconsIcon), {
151
+ key: 1,
152
+ icon: defaultMessageIcon.value,
185
153
  "stroke-width": 1.8,
186
154
  class: normalizeClass(["size-6", messageGlyphClasses.value])
187
- }, null, 8, ["class"]))
155
+ }, null, 8, ["icon", "class"]))
188
156
  ], 2),
189
157
  createVNode(unref(_sfc_main$3), { class: "sm:pt-0" }, {
190
158
  default: withCtx(() => [
@@ -1,4 +1,4 @@
1
- import { _, a } from "./NativeSelectOption.vue_vue_type_script_setup_true_lang-CWhL2Lw8.js";
1
+ import { _, a } from "./NativeSelectOption.vue_vue_type_script_setup_true_lang-Ce5VmA0n.js";
2
2
  import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, renderSlot } from "vue";
3
3
  import { c as cn } from "./utils-Bz4m9VPB.js";
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({