rei-kit 0.4.4 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { n as registerErrorMapper, r as toAppError, t as AppError } from "./app-error-DF9cijE0.js";
2
- import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onErrorCaptured, onMounted, onScopeDispose, onUnmounted, openBlock, readonly, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useId, useModel, vModelDynamic, vModelRadio, watch, watchEffect, withCtx, withDirectives } from "vue";
3
- import { ArrowDown, ArrowRight, ArrowUp, ChevronRight, X } from "lucide-vue-next";
2
+ import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onErrorCaptured, onMounted, onScopeDispose, onUnmounted, openBlock, readonly, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useId, useModel, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, watch, watchEffect, withCtx, withDirectives } from "vue";
3
+ import { ArrowDown, ArrowRight, ArrowUp, ChevronDown, ChevronRight, X } from "lucide-vue-next";
4
4
  import { RouterLink } from "vue-router";
5
5
  import { createI18n } from "vue-i18n";
6
6
  //#region src/utils/date.ts
@@ -728,9 +728,9 @@ function useVisualViewport() {
728
728
  }
729
729
  //#endregion
730
730
  //#region src/components/BaseAlert.vue?vue&type=script&setup=true&lang.ts
731
- var _hoisted_1$17 = ["role", "aria-live"];
732
- var _hoisted_2$15 = { class: "min-w-0 flex-1" };
733
- var _hoisted_3$10 = {
731
+ var _hoisted_1$22 = ["role", "aria-live"];
732
+ var _hoisted_2$16 = { class: "min-w-0 flex-1" };
733
+ var _hoisted_3$12 = {
734
734
  key: 0,
735
735
  class: "text-ink font-semibold"
736
736
  };
@@ -771,9 +771,9 @@ var BaseAlert_default = /* @__PURE__ */ defineComponent({
771
771
  class: normalizeClass(["mt-px grid size-6 shrink-0 place-items-center rounded-full text-xs font-semibold", mark.value]),
772
772
  "aria-hidden": "true"
773
773
  }, [renderSlot(_ctx.$slots, "mark")], 2)) : createCommentVNode("", true),
774
- createElementVNode("div", _hoisted_2$15, [_ctx.$slots.title ? (openBlock(), createElementBlock("p", _hoisted_3$10, [renderSlot(_ctx.$slots, "title")])) : createCommentVNode("", true), createElementVNode("div", { class: normalizeClass(_ctx.$slots.title ? "mt-1" : "") }, [renderSlot(_ctx.$slots, "default")], 2)]),
774
+ createElementVNode("div", _hoisted_2$16, [_ctx.$slots.title ? (openBlock(), createElementBlock("p", _hoisted_3$12, [renderSlot(_ctx.$slots, "title")])) : createCommentVNode("", true), createElementVNode("div", { class: normalizeClass(_ctx.$slots.title ? "mt-1" : "") }, [renderSlot(_ctx.$slots, "default")], 2)]),
775
775
  renderSlot(_ctx.$slots, "action")
776
- ], 10, _hoisted_1$17);
776
+ ], 10, _hoisted_1$22);
777
777
  };
778
778
  }
779
779
  });
@@ -798,12 +798,7 @@ var BaseBadge_default = /* @__PURE__ */ defineComponent({
798
798
  });
799
799
  //#endregion
800
800
  //#region src/components/BaseButton.vue?vue&type=script&setup=true&lang.ts
801
- var _hoisted_1$16 = [
802
- "type",
803
- "disabled",
804
- "aria-busy"
805
- ];
806
- var _hoisted_2$14 = {
801
+ var _hoisted_1$21 = {
807
802
  key: 0,
808
803
  class: "size-4 animate-spin rounded-full border-2 border-current border-t-transparent",
809
804
  "aria-hidden": "true"
@@ -813,6 +808,7 @@ var _hoisted_2$14 = {
813
808
  var BaseButton_default = /* @__PURE__ */ defineComponent({
814
809
  __name: "BaseButton",
815
810
  props: {
811
+ as: { default: "button" },
816
812
  variant: { default: "primary" },
817
813
  size: { default: "md" },
818
814
  loading: {
@@ -823,7 +819,17 @@ var BaseButton_default = /* @__PURE__ */ defineComponent({
823
819
  type: Boolean,
824
820
  default: false
825
821
  },
826
- type: { default: "button" }
822
+ type: { default: "button" },
823
+ icon: {
824
+ type: Boolean,
825
+ default: false
826
+ },
827
+ block: {
828
+ type: Boolean,
829
+ default: false
830
+ },
831
+ to: { default: () => void 0 },
832
+ href: { default: () => void 0 }
827
833
  },
828
834
  setup(__props) {
829
835
  const VARIANT_CLASS = {
@@ -834,23 +840,98 @@ var BaseButton_default = /* @__PURE__ */ defineComponent({
834
840
  };
835
841
  const SIZE_CLASS = {
836
842
  sm: "h-9 px-3 text-sm",
837
- md: "h-11 px-4 text-base"
843
+ md: "h-11 px-4 text-base",
844
+ lg: "h-14 px-6 text-lg"
845
+ };
846
+ const ICON_SIZE_CLASS = {
847
+ sm: "size-9 text-sm",
848
+ md: "size-11 text-base",
849
+ lg: "size-14 text-lg"
838
850
  };
851
+ /** Anything that is not a `<button>` cannot be `disabled`; it has to be told. */
852
+ const inactive = computed(() => __props.disabled || __props.loading);
853
+ const linkProps = computed(() => {
854
+ if (__props.as === "router-link") return { to: __props.to };
855
+ if (__props.as === "a") return inactive.value ? {} : { href: __props.href };
856
+ return {};
857
+ });
839
858
  return (_ctx, _cache) => {
840
- return openBlock(), createElementBlock("button", {
841
- type: __props.type,
842
- disabled: __props.disabled || __props.loading,
859
+ return openBlock(), createBlock(resolveDynamicComponent(__props.as), mergeProps(linkProps.value, {
860
+ type: __props.as === "button" ? __props.type : void 0,
861
+ disabled: __props.as === "button" ? inactive.value : void 0,
862
+ "aria-disabled": __props.as !== "button" && inactive.value ? "true" : void 0,
843
863
  "aria-busy": __props.loading,
844
- class: normalizeClass(["rounded-card focus-visible:outline-primary inline-flex items-center justify-center gap-2 font-medium transition-transform duration-100 select-none focus-visible:outline-2 focus-visible:outline-offset-2 active:scale-95 disabled:pointer-events-none disabled:opacity-50", [VARIANT_CLASS[__props.variant], SIZE_CLASS[__props.size]]])
845
- }, [__props.loading ? (openBlock(), createElementBlock("span", _hoisted_2$14)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$16);
864
+ class: ["rounded-card focus-visible:outline-primary inline-flex items-center justify-center gap-2 font-medium transition-transform duration-100 select-none focus-visible:outline-2 focus-visible:outline-offset-2 active:scale-95 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50", [
865
+ VARIANT_CLASS[__props.variant],
866
+ __props.icon ? ICON_SIZE_CLASS[__props.size] : SIZE_CLASS[__props.size],
867
+ __props.block ? "w-full" : ""
868
+ ]]
869
+ }), {
870
+ default: withCtx(() => [__props.loading ? (openBlock(), createElementBlock("span", _hoisted_1$21)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")]),
871
+ _: 3
872
+ }, 16, [
873
+ "type",
874
+ "disabled",
875
+ "aria-disabled",
876
+ "aria-busy",
877
+ "class"
878
+ ]);
879
+ };
880
+ }
881
+ });
882
+ //#endregion
883
+ //#region src/components/FormField.vue?vue&type=script&setup=true&lang.ts
884
+ var _hoisted_1$20 = ["for"];
885
+ //#endregion
886
+ //#region src/components/FormField.vue
887
+ var FormField_default = /* @__PURE__ */ defineComponent({
888
+ __name: "FormField",
889
+ props: {
890
+ label: {},
891
+ error: { default: "" },
892
+ hint: { default: "" },
893
+ size: { default: "md" },
894
+ labelHidden: {
895
+ type: Boolean,
896
+ default: false
897
+ }
898
+ },
899
+ setup(__props) {
900
+ const id = useId();
901
+ const errorId = `${id}-error`;
902
+ const hintId = `${id}-hint`;
903
+ const describedBy = computed(() => {
904
+ if (__props.error) return errorId;
905
+ if (__props.hint) return hintId;
906
+ });
907
+ return (_ctx, _cache) => {
908
+ return openBlock(), createElementBlock("div", { class: normalizeClass(["flex flex-col", __props.size === "sm" ? "gap-1" : "gap-1.5"]) }, [
909
+ createElementVNode("label", {
910
+ for: unref(id),
911
+ class: normalizeClass(["font-medium", [__props.labelHidden ? "sr-only" : "", __props.size === "sm" ? "text-ink-soft text-xs" : "text-ink text-sm"]])
912
+ }, toDisplayString(__props.label), 11, _hoisted_1$20),
913
+ renderSlot(_ctx.$slots, "default", {
914
+ id: unref(id),
915
+ describedBy: describedBy.value,
916
+ invalid: Boolean(__props.error),
917
+ size: __props.size
918
+ }),
919
+ __props.error ? (openBlock(), createElementBlock("p", {
920
+ key: 0,
921
+ id: errorId,
922
+ class: "text-negative text-xs"
923
+ }, toDisplayString(__props.error), 1)) : __props.hint ? (openBlock(), createElementBlock("p", {
924
+ key: 1,
925
+ id: hintId,
926
+ class: "text-ink-soft text-xs"
927
+ }, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
928
+ ], 2);
846
929
  };
847
930
  }
848
931
  });
849
932
  //#endregion
850
933
  //#region src/components/BaseInput.vue?vue&type=script&setup=true&lang.ts
851
- var _hoisted_1$15 = { class: "flex flex-col gap-1.5" };
852
- var _hoisted_2$13 = ["for"];
853
- var _hoisted_3$9 = [
934
+ var _hoisted_1$19 = [
854
935
  "id",
855
936
  "type",
856
937
  "aria-invalid",
@@ -869,53 +950,51 @@ var BaseInput_default = /* @__PURE__ */ defineComponent({
869
950
  type: Boolean,
870
951
  default: false
871
952
  },
872
- type: { default: "text" }
953
+ type: { default: "text" },
954
+ size: { default: "md" }
873
955
  }, {
874
956
  "modelValue": {},
875
957
  "modelModifiers": {}
876
958
  }),
877
959
  emits: ["update:modelValue"],
878
960
  setup(__props) {
961
+ const SIZE_CLASS = {
962
+ sm: "h-9 text-sm",
963
+ md: "h-11 text-base"
964
+ };
879
965
  const model = useModel(__props, "modelValue");
880
- const id = useId();
881
- const errorId = `${id}-error`;
882
- const hintId = `${id}-hint`;
883
- const describedBy = computed(() => {
884
- if (__props.error) return errorId;
885
- if (__props.hint) return hintId;
886
- });
887
966
  return (_ctx, _cache) => {
888
- return openBlock(), createElementBlock("div", _hoisted_1$15, [
889
- createElementVNode("label", {
890
- for: unref(id),
891
- class: normalizeClass(["text-ink text-sm font-medium", __props.labelHidden ? "sr-only" : ""])
892
- }, toDisplayString(__props.label), 11, _hoisted_2$13),
893
- withDirectives(createElementVNode("input", mergeProps({
894
- id: unref(id),
967
+ return openBlock(), createBlock(FormField_default, {
968
+ label: __props.label,
969
+ error: __props.error,
970
+ hint: __props.hint,
971
+ "label-hidden": __props.labelHidden,
972
+ size: __props.size
973
+ }, {
974
+ default: withCtx(({ id, describedBy, invalid }) => [withDirectives(createElementVNode("input", mergeProps({
975
+ id,
895
976
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
896
977
  type: __props.type,
897
- "aria-invalid": Boolean(__props.error),
898
- "aria-describedby": describedBy.value
899
- }, _ctx.$attrs, { class: ["border-hair bg-surface text-ink rounded-card focus-visible:outline-primary h-11 border px-3 focus-visible:outline-2 focus-visible:outline-offset-1", __props.error ? "border-negative" : ""] }), null, 16, _hoisted_3$9), [[vModelDynamic, model.value]]),
900
- __props.error ? (openBlock(), createElementBlock("p", {
901
- key: 0,
902
- id: errorId,
903
- class: "text-negative text-xs"
904
- }, toDisplayString(__props.error), 1)) : __props.hint ? (openBlock(), createElementBlock("p", {
905
- key: 1,
906
- id: hintId,
907
- class: "text-ink-soft text-xs"
908
- }, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
978
+ "aria-invalid": invalid,
979
+ "aria-describedby": describedBy
980
+ }, _ctx.$attrs, { class: ["border-hair bg-surface text-ink rounded-card focus-visible:outline-primary border px-3 focus-visible:outline-2 focus-visible:outline-offset-1", [SIZE_CLASS[__props.size], invalid ? "border-negative" : ""]] }), null, 16, _hoisted_1$19), [[vModelDynamic, model.value]])]),
981
+ _: 1
982
+ }, 8, [
983
+ "label",
984
+ "error",
985
+ "hint",
986
+ "label-hidden",
987
+ "size"
909
988
  ]);
910
989
  };
911
990
  }
912
991
  });
913
992
  //#endregion
914
993
  //#region src/components/BaseSheet.vue?vue&type=script&setup=true&lang.ts
915
- var _hoisted_1$14 = { class: "shell-frame md:rounded-shell relative flex max-h-full flex-col justify-end overflow-hidden" };
916
- var _hoisted_2$12 = ["aria-label"];
917
- var _hoisted_3$8 = { class: "flex shrink-0 items-start gap-3 px-6 pt-4 pb-5" };
918
- var _hoisted_4$6 = { class: "min-w-0 flex-1" };
994
+ var _hoisted_1$18 = { class: "shell-frame md:rounded-shell relative flex max-h-full flex-col justify-end overflow-hidden" };
995
+ var _hoisted_2$15 = ["aria-label"];
996
+ var _hoisted_3$11 = { class: "flex shrink-0 items-start gap-3 px-6 pt-4 pb-5" };
997
+ var _hoisted_4$7 = { class: "min-w-0 flex-1" };
919
998
  var _hoisted_5$4 = { class: "text-ink text-xl leading-tight font-semibold" };
920
999
  var _hoisted_6$2 = {
921
1000
  key: 0,
@@ -993,7 +1072,7 @@ var BaseSheet_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
993
1072
  key: 0,
994
1073
  class: "fixed inset-x-0 top-0 bottom-0 z-50 flex items-center justify-center",
995
1074
  style: normalizeStyle(viewportStyle.value)
996
- }, [createElementVNode("div", _hoisted_1$14, [createElementVNode("div", {
1075
+ }, [createElementVNode("div", _hoisted_1$18, [createElementVNode("div", {
997
1076
  class: "bg-ink/45 absolute inset-0 backdrop-blur-[2px]",
998
1077
  onClick: close
999
1078
  }), createElementVNode("section", {
@@ -1009,14 +1088,14 @@ var BaseSheet_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
1009
1088
  class: "flex shrink-0 justify-center pt-3",
1010
1089
  "aria-hidden": "true"
1011
1090
  }, [createElementVNode("span", { class: "bg-hair h-1.5 w-10 rounded-full" })], -1)),
1012
- createElementVNode("header", _hoisted_3$8, [createElementVNode("div", _hoisted_4$6, [createElementVNode("h2", _hoisted_5$4, toDisplayString(__props.title), 1), __props.subtitle ? (openBlock(), createElementBlock("p", _hoisted_6$2, toDisplayString(__props.subtitle), 1)) : createCommentVNode("", true)]), createElementVNode("button", {
1091
+ createElementVNode("header", _hoisted_3$11, [createElementVNode("div", _hoisted_4$7, [createElementVNode("h2", _hoisted_5$4, toDisplayString(__props.title), 1), __props.subtitle ? (openBlock(), createElementBlock("p", _hoisted_6$2, toDisplayString(__props.subtitle), 1)) : createCommentVNode("", true)]), createElementVNode("button", {
1013
1092
  type: "button",
1014
1093
  class: "text-ink-soft hover:bg-muted hover:text-ink -mt-1 flex size-10 shrink-0 items-center justify-center rounded-full transition-colors active:scale-90",
1015
1094
  "aria-label": __props.closeLabel,
1016
1095
  onClick: close
1017
1096
  }, [createVNode(unref(X), { class: "size-5" })], 8, _hoisted_7$2)]),
1018
1097
  createElementVNode("div", _hoisted_8$1, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])
1019
- ], 8, _hoisted_2$12)])], 4)) : createCommentVNode("", true)]),
1098
+ ], 8, _hoisted_2$15)])], 4)) : createCommentVNode("", true)]),
1020
1099
  _: 3
1021
1100
  })]);
1022
1101
  };
@@ -1034,12 +1113,12 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
1034
1113
  var BaseSheet_default = /*#__PURE__*/ _plugin_vue_export_helper_default(BaseSheet_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-cb967015"]]);
1035
1114
  //#endregion
1036
1115
  //#region src/components/BaseCard.vue?vue&type=script&setup=true&lang.ts
1037
- var _hoisted_1$13 = {
1116
+ var _hoisted_1$17 = {
1038
1117
  key: 0,
1039
1118
  class: "border-hair/70 border-b px-5 py-4"
1040
1119
  };
1041
- var _hoisted_2$11 = { class: "px-5 py-4" };
1042
- var _hoisted_3$7 = {
1120
+ var _hoisted_2$14 = { class: "px-5 py-4" };
1121
+ var _hoisted_3$10 = {
1043
1122
  key: 1,
1044
1123
  class: "border-hair/70 bg-muted/30 border-t px-5 py-3.5"
1045
1124
  };
@@ -1070,9 +1149,9 @@ var BaseCard_default = /* @__PURE__ */ defineComponent({
1070
1149
  return (_ctx, _cache) => {
1071
1150
  return openBlock(), createBlock(resolveDynamicComponent(__props.as), { class: normalizeClass(["border-hair bg-surface rounded-card border", __props.interactive ? "transition-[transform,box-shadow] duration-300 ease-out hover:-translate-y-0.5 hover:shadow-lg active:translate-y-0 active:shadow-sm" : ""]) }, {
1072
1151
  default: withCtx(() => [
1073
- _ctx.$slots.head ? (openBlock(), createElementBlock("div", _hoisted_1$13, [renderSlot(_ctx.$slots, "head")])) : createCommentVNode("", true),
1074
- createElementVNode("div", _hoisted_2$11, [renderSlot(_ctx.$slots, "default")]),
1075
- _ctx.$slots.foot ? (openBlock(), createElementBlock("div", _hoisted_3$7, [renderSlot(_ctx.$slots, "foot")])) : createCommentVNode("", true)
1152
+ _ctx.$slots.head ? (openBlock(), createElementBlock("div", _hoisted_1$17, [renderSlot(_ctx.$slots, "head")])) : createCommentVNode("", true),
1153
+ createElementVNode("div", _hoisted_2$14, [renderSlot(_ctx.$slots, "default")]),
1154
+ _ctx.$slots.foot ? (openBlock(), createElementBlock("div", _hoisted_3$10, [renderSlot(_ctx.$slots, "foot")])) : createCommentVNode("", true)
1076
1155
  ]),
1077
1156
  _: 3
1078
1157
  }, 8, ["class"]);
@@ -1080,6 +1159,269 @@ var BaseCard_default = /* @__PURE__ */ defineComponent({
1080
1159
  }
1081
1160
  });
1082
1161
  //#endregion
1162
+ //#region src/components/BaseCheckbox.vue?vue&type=script&setup=true&lang.ts
1163
+ var _hoisted_1$16 = { class: "flex flex-col gap-1.5" };
1164
+ var _hoisted_2$13 = ["for"];
1165
+ var _hoisted_3$9 = [
1166
+ "id",
1167
+ "disabled",
1168
+ "aria-invalid",
1169
+ "aria-describedby"
1170
+ ];
1171
+ //#endregion
1172
+ //#region src/components/BaseCheckbox.vue
1173
+ var BaseCheckbox_default = /* @__PURE__ */ defineComponent({
1174
+ __name: "BaseCheckbox",
1175
+ props: /*@__PURE__*/ mergeModels({
1176
+ label: {},
1177
+ error: { default: "" },
1178
+ hint: { default: "" },
1179
+ disabled: {
1180
+ type: Boolean,
1181
+ default: false
1182
+ },
1183
+ size: { default: "md" }
1184
+ }, {
1185
+ "modelValue": {
1186
+ type: Boolean,
1187
+ default: false
1188
+ },
1189
+ "modelModifiers": {}
1190
+ }),
1191
+ emits: ["update:modelValue"],
1192
+ setup(__props) {
1193
+ const model = useModel(__props, "modelValue");
1194
+ const id = useId();
1195
+ const errorId = `${id}-error`;
1196
+ const hintId = `${id}-hint`;
1197
+ const describedBy = computed(() => {
1198
+ if (__props.error) return errorId;
1199
+ if (__props.hint) return hintId;
1200
+ });
1201
+ return (_ctx, _cache) => {
1202
+ return openBlock(), createElementBlock("div", _hoisted_1$16, [createElementVNode("label", {
1203
+ for: unref(id),
1204
+ class: normalizeClass(["flex items-center", [__props.size === "sm" ? "gap-2" : "gap-3", __props.disabled ? "opacity-50" : "cursor-pointer"]])
1205
+ }, [withDirectives(createElementVNode("input", {
1206
+ id: unref(id),
1207
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
1208
+ type: "checkbox",
1209
+ disabled: __props.disabled,
1210
+ "aria-invalid": Boolean(__props.error),
1211
+ "aria-describedby": describedBy.value,
1212
+ class: "accent-primary focus-visible:outline-primary size-4 shrink-0 focus-visible:outline-2 focus-visible:outline-offset-2"
1213
+ }, null, 8, _hoisted_3$9), [[vModelCheckbox, model.value]]), createElementVNode("span", { class: normalizeClass(["text-sm", __props.size === "sm" ? "text-ink-soft" : "text-ink"]) }, toDisplayString(__props.label), 3)], 10, _hoisted_2$13), __props.error ? (openBlock(), createElementBlock("p", {
1214
+ key: 0,
1215
+ id: errorId,
1216
+ class: "text-negative text-xs"
1217
+ }, toDisplayString(__props.error), 1)) : __props.hint ? (openBlock(), createElementBlock("p", {
1218
+ key: 1,
1219
+ id: hintId,
1220
+ class: "text-ink-soft text-xs"
1221
+ }, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)]);
1222
+ };
1223
+ }
1224
+ });
1225
+ //#endregion
1226
+ //#region src/components/BaseRadioGroup.vue?vue&type=script&setup=true&lang.ts
1227
+ var _hoisted_1$15 = ["aria-describedby"];
1228
+ var _hoisted_2$12 = [
1229
+ "name",
1230
+ "value",
1231
+ "disabled"
1232
+ ];
1233
+ var _hoisted_3$8 = { class: "text-ink text-sm" };
1234
+ //#endregion
1235
+ //#region src/components/BaseRadioGroup.vue
1236
+ var BaseRadioGroup_default = /* @__PURE__ */ defineComponent({
1237
+ __name: "BaseRadioGroup",
1238
+ props: /*@__PURE__*/ mergeModels({
1239
+ legend: {},
1240
+ options: {},
1241
+ error: { default: "" },
1242
+ hint: { default: "" },
1243
+ legendHidden: {
1244
+ type: Boolean,
1245
+ default: false
1246
+ }
1247
+ }, {
1248
+ "modelValue": {},
1249
+ "modelModifiers": {}
1250
+ }),
1251
+ emits: ["update:modelValue"],
1252
+ setup(__props) {
1253
+ const model = useModel(__props, "modelValue");
1254
+ const id = useId();
1255
+ const errorId = `${id}-error`;
1256
+ const hintId = `${id}-hint`;
1257
+ const describedBy = computed(() => {
1258
+ if (__props.error) return errorId;
1259
+ if (__props.hint) return hintId;
1260
+ });
1261
+ return (_ctx, _cache) => {
1262
+ return openBlock(), createElementBlock("fieldset", {
1263
+ class: "flex flex-col gap-1.5",
1264
+ "aria-describedby": describedBy.value
1265
+ }, [
1266
+ createElementVNode("legend", { class: normalizeClass(["text-ink mb-1.5 text-sm font-medium", __props.legendHidden ? "sr-only" : ""]) }, toDisplayString(__props.legend), 3),
1267
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
1268
+ return openBlock(), createElementBlock("label", {
1269
+ key: option.value,
1270
+ class: normalizeClass(["flex items-center gap-3", option.disabled ? "opacity-50" : "cursor-pointer"])
1271
+ }, [withDirectives(createElementVNode("input", {
1272
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
1273
+ type: "radio",
1274
+ name: unref(id),
1275
+ value: option.value,
1276
+ disabled: option.disabled,
1277
+ class: "accent-primary focus-visible:outline-primary size-4 shrink-0 focus-visible:outline-2 focus-visible:outline-offset-2"
1278
+ }, null, 8, _hoisted_2$12), [[vModelRadio, model.value]]), createElementVNode("span", _hoisted_3$8, toDisplayString(option.label), 1)], 2);
1279
+ }), 128)),
1280
+ __props.error ? (openBlock(), createElementBlock("p", {
1281
+ key: 0,
1282
+ id: errorId,
1283
+ class: "text-negative text-xs"
1284
+ }, toDisplayString(__props.error), 1)) : __props.hint ? (openBlock(), createElementBlock("p", {
1285
+ key: 1,
1286
+ id: hintId,
1287
+ class: "text-ink-soft text-xs"
1288
+ }, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
1289
+ ], 8, _hoisted_1$15);
1290
+ };
1291
+ }
1292
+ });
1293
+ //#endregion
1294
+ //#region src/components/BaseSelect.vue?vue&type=script&setup=true&lang.ts
1295
+ var _hoisted_1$14 = { class: "relative" };
1296
+ var _hoisted_2$11 = [
1297
+ "id",
1298
+ "aria-invalid",
1299
+ "aria-describedby"
1300
+ ];
1301
+ var _hoisted_3$7 = {
1302
+ key: 0,
1303
+ value: "",
1304
+ disabled: ""
1305
+ };
1306
+ var _hoisted_4$6 = ["value", "disabled"];
1307
+ //#endregion
1308
+ //#region src/components/BaseSelect.vue
1309
+ var BaseSelect_default = /* @__PURE__ */ defineComponent({
1310
+ __name: "BaseSelect",
1311
+ props: /*@__PURE__*/ mergeModels({
1312
+ label: {},
1313
+ options: {},
1314
+ error: { default: "" },
1315
+ hint: { default: "" },
1316
+ labelHidden: {
1317
+ type: Boolean,
1318
+ default: false
1319
+ },
1320
+ placeholder: { default: "" },
1321
+ size: { default: "md" }
1322
+ }, {
1323
+ "modelValue": {},
1324
+ "modelModifiers": {}
1325
+ }),
1326
+ emits: ["update:modelValue"],
1327
+ setup(__props) {
1328
+ const SIZE_CLASS = {
1329
+ sm: "h-9 text-sm",
1330
+ md: "h-11 text-base"
1331
+ };
1332
+ const model = useModel(__props, "modelValue");
1333
+ return (_ctx, _cache) => {
1334
+ return openBlock(), createBlock(FormField_default, {
1335
+ label: __props.label,
1336
+ error: __props.error,
1337
+ hint: __props.hint,
1338
+ "label-hidden": __props.labelHidden,
1339
+ size: __props.size
1340
+ }, {
1341
+ default: withCtx(({ id, describedBy, invalid }) => [createElementVNode("div", _hoisted_1$14, [withDirectives(createElementVNode("select", {
1342
+ id,
1343
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
1344
+ "aria-invalid": invalid,
1345
+ "aria-describedby": describedBy,
1346
+ class: normalizeClass(["border-hair bg-surface text-ink rounded-card focus-visible:outline-primary w-full appearance-none border py-0 pr-10 pl-3 focus-visible:outline-2 focus-visible:outline-offset-1", [SIZE_CLASS[__props.size], invalid ? "border-negative" : ""]])
1347
+ }, [__props.placeholder ? (openBlock(), createElementBlock("option", _hoisted_3$7, toDisplayString(__props.placeholder), 1)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
1348
+ return openBlock(), createElementBlock("option", {
1349
+ key: option.value,
1350
+ value: option.value,
1351
+ disabled: option.disabled
1352
+ }, toDisplayString(option.label), 9, _hoisted_4$6);
1353
+ }), 128))], 10, _hoisted_2$11), [[vModelSelect, model.value]]), createVNode(unref(ChevronDown), {
1354
+ class: "text-ink-soft pointer-events-none absolute top-1/2 right-3 size-4 -translate-y-1/2",
1355
+ "aria-hidden": "true"
1356
+ })])]),
1357
+ _: 1
1358
+ }, 8, [
1359
+ "label",
1360
+ "error",
1361
+ "hint",
1362
+ "label-hidden",
1363
+ "size"
1364
+ ]);
1365
+ };
1366
+ }
1367
+ });
1368
+ //#endregion
1369
+ //#region src/components/BaseTextarea.vue?vue&type=script&setup=true&lang.ts
1370
+ var _hoisted_1$13 = [
1371
+ "id",
1372
+ "rows",
1373
+ "aria-invalid",
1374
+ "aria-describedby"
1375
+ ];
1376
+ //#endregion
1377
+ //#region src/components/BaseTextarea.vue
1378
+ var BaseTextarea_default = /* @__PURE__ */ defineComponent({
1379
+ inheritAttrs: false,
1380
+ __name: "BaseTextarea",
1381
+ props: /*@__PURE__*/ mergeModels({
1382
+ label: {},
1383
+ error: { default: "" },
1384
+ hint: { default: "" },
1385
+ labelHidden: {
1386
+ type: Boolean,
1387
+ default: false
1388
+ },
1389
+ rows: { default: 4 },
1390
+ size: { default: "md" }
1391
+ }, {
1392
+ "modelValue": {},
1393
+ "modelModifiers": {}
1394
+ }),
1395
+ emits: ["update:modelValue"],
1396
+ setup(__props) {
1397
+ const model = useModel(__props, "modelValue");
1398
+ return (_ctx, _cache) => {
1399
+ return openBlock(), createBlock(FormField_default, {
1400
+ label: __props.label,
1401
+ error: __props.error,
1402
+ hint: __props.hint,
1403
+ "label-hidden": __props.labelHidden,
1404
+ size: __props.size
1405
+ }, {
1406
+ default: withCtx(({ id, describedBy, invalid }) => [withDirectives(createElementVNode("textarea", mergeProps({
1407
+ id,
1408
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
1409
+ rows: __props.rows,
1410
+ "aria-invalid": invalid,
1411
+ "aria-describedby": describedBy
1412
+ }, _ctx.$attrs, { class: ["border-hair bg-surface text-ink rounded-card focus-visible:outline-primary resize-y border px-3 py-2 leading-relaxed focus-visible:outline-2 focus-visible:outline-offset-1", [__props.size === "sm" ? "text-sm" : "text-base", invalid ? "border-negative" : ""]] }), null, 16, _hoisted_1$13), [[vModelText, model.value]])]),
1413
+ _: 1
1414
+ }, 8, [
1415
+ "label",
1416
+ "error",
1417
+ "hint",
1418
+ "label-hidden",
1419
+ "size"
1420
+ ]);
1421
+ };
1422
+ }
1423
+ });
1424
+ //#endregion
1083
1425
  //#region src/components/EmptyState.vue?vue&type=script&setup=true&lang.ts
1084
1426
  var _hoisted_1$12 = { class: "flex flex-col items-center gap-3 px-6 py-10 text-center" };
1085
1427
  var _hoisted_2$10 = {
@@ -1800,8 +2142,8 @@ function createI18nRuntime(options) {
1800
2142
  *
1801
2143
  * The fallback keeps `vitest` and `vite dev` honest, where no define runs.
1802
2144
  */
1803
- var VERSION = "0.4.4";
2145
+ var VERSION = "0.5.1";
1804
2146
  //#endregion
1805
- export { AppError, BaseAlert_default as BaseAlert, BaseBadge_default as BaseBadge, BaseButton_default as BaseButton, BaseCard_default as BaseCard, BaseInput_default as BaseInput, BaseSheet_default as BaseSheet, EmptyState_default as EmptyState, ErrorBoundary_default as ErrorBoundary, GoogleButton_default as GoogleButton, LocaleLinks_default as LocaleLinks, PageContainer_default as PageContainer, PageHeader_default as PageHeader, PriceCard_default as PriceCard, ProgressBar_default as ProgressBar, SectionHeading_default as SectionHeading, SegmentedControl_default as SegmentedControl, SettingsGroup_default as SettingsGroup, SettingsRow_default as SettingsRow, SkeletonList_default as SkeletonList, StatCard_default as StatCard, TabBar_default as TabBar, ToneDot_default as ToneDot, VERSION, addDays, applyTheme, createI18nRuntime, downloadJson, eachDayOfYear, formatDate, fromDateKey, isApplePortable, isInstalled, isThemePreference, lastNDays, leadingBlanks, needsIosInstall, readStoredTheme, registerErrorMapper, relativeDayLabel, safeRedirect, setFormatLocale, setThemeStorageKey, startOfWeek, tapFeedback, toAppError, toDateKey, todayKey, useDebouncedCallback, useDragScroll, useMediaQuery, useOnline, useTheme, useToday, useVisualViewport };
2147
+ export { AppError, BaseAlert_default as BaseAlert, BaseBadge_default as BaseBadge, BaseButton_default as BaseButton, BaseCard_default as BaseCard, BaseCheckbox_default as BaseCheckbox, BaseInput_default as BaseInput, BaseRadioGroup_default as BaseRadioGroup, BaseSelect_default as BaseSelect, BaseSheet_default as BaseSheet, BaseTextarea_default as BaseTextarea, EmptyState_default as EmptyState, ErrorBoundary_default as ErrorBoundary, FormField_default as FormField, GoogleButton_default as GoogleButton, LocaleLinks_default as LocaleLinks, PageContainer_default as PageContainer, PageHeader_default as PageHeader, PriceCard_default as PriceCard, ProgressBar_default as ProgressBar, SectionHeading_default as SectionHeading, SegmentedControl_default as SegmentedControl, SettingsGroup_default as SettingsGroup, SettingsRow_default as SettingsRow, SkeletonList_default as SkeletonList, StatCard_default as StatCard, TabBar_default as TabBar, ToneDot_default as ToneDot, VERSION, addDays, applyTheme, createI18nRuntime, downloadJson, eachDayOfYear, formatDate, fromDateKey, isApplePortable, isInstalled, isThemePreference, lastNDays, leadingBlanks, needsIosInstall, readStoredTheme, registerErrorMapper, relativeDayLabel, safeRedirect, setFormatLocale, setThemeStorageKey, startOfWeek, tapFeedback, toAppError, toDateKey, todayKey, useDebouncedCallback, useDragScroll, useMediaQuery, useOnline, useTheme, useToday, useVisualViewport };
1806
2148
 
1807
2149
  //# sourceMappingURL=index.js.map