@nexdom/uimed-vue 2.0.0-beta.11 → 2.0.0-beta.13

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.
@@ -43,9 +43,10 @@ interface AppBarNotification {
43
43
  */
44
44
  read?: boolean;
45
45
  /**
46
- * Date the notification was generated.
46
+ * Free text telling when the notification was generated, shown as is (e.g.
47
+ * `"10:30"`, `"Ontem"` or `"28/09/2026"`). Hidden when omitted or empty.
47
48
  */
48
- date?: Date;
49
+ when?: string;
49
50
  }
50
51
  interface AppBarUserProps {
51
52
  /**
@@ -171,8 +172,8 @@ type MainProps = {
171
172
  *
172
173
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/main | Main Guide}
173
174
  */
174
- declare const _default$9: typeof __VLS_export$14;
175
- declare const __VLS_export$14: __VLS_WithSlots$9<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<MainProps & {
175
+ declare const _default$10: typeof __VLS_export$15;
176
+ declare const __VLS_export$15: __VLS_WithSlots$9<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<MainProps & {
176
177
  notificationsOpen?: boolean;
177
178
  }, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {
178
179
  "update:notificationsOpen": (value: boolean) => any;
@@ -204,8 +205,8 @@ type __VLS_WithSlots$9<T, S> = T & {
204
205
  *
205
206
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/button | Button Guide}
206
207
  */
207
- declare const _default$1: typeof __VLS_export$13;
208
- declare const __VLS_export$13: __VLS_WithSlots$8<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {} & {
208
+ declare const _default$1: typeof __VLS_export$14;
209
+ declare const __VLS_export$14: __VLS_WithSlots$8<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {} & {
209
210
  click: (event: MouseEvent) => any;
210
211
  }, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<ButtonProps> & Readonly<{
211
212
  onClick?: ((event: MouseEvent) => any) | undefined;
@@ -376,8 +377,8 @@ type AutocompleteFieldProps<T = string, Multiple extends boolean = false> = {
376
377
  *
377
378
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/autocomplete-field | AutocompleteField Guide}
378
379
  */
379
- declare const _default: typeof __VLS_export$12;
380
- declare const __VLS_export$12: <T = string, Multiple extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$2<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
380
+ declare const _default: typeof __VLS_export$13;
381
+ declare const __VLS_export$13: <T = string, Multiple extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$2<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
381
382
  props: import("vue").PublicProps & __VLS_PrettifyLocal$2<(AutocompleteFieldProps<T, Multiple> & {
382
383
  modelValue?: Multiple extends true ? T[] : T;
383
384
  }) & {
@@ -407,8 +408,8 @@ type __VLS_PrettifyLocal$2<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [
407
408
  *
408
409
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/text-field | TextField Guide}
409
410
  */
410
- declare const _default$14: typeof __VLS_export$11;
411
- declare const __VLS_export$11: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<TextFieldProps & {
411
+ declare const _default$15: typeof __VLS_export$12;
412
+ declare const __VLS_export$12: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<TextFieldProps & {
412
413
  modelValue?: string;
413
414
  }, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {
414
415
  "update:modelValue": (value: string) => any;
@@ -418,8 +419,8 @@ declare const __VLS_export$11: import("vue", { with: { "resolution-mode": "impor
418
419
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
419
420
  }>, {
420
421
  variant: TextFieldVariant;
421
- clearable: boolean;
422
422
  type: TextFieldType;
423
+ clearable: boolean;
423
424
  }, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
424
425
  //#endregion
425
426
  //#region src/components/inputs/checkbox/types.d.ts
@@ -470,8 +471,8 @@ type CheckboxProps<T = boolean> = {
470
471
  *
471
472
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/checkbox | Checkbox Guide}
472
473
  */
473
- declare const _default$2: typeof __VLS_export$10;
474
- declare const __VLS_export$10: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$1<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
474
+ declare const _default$2: typeof __VLS_export$11;
475
+ declare const __VLS_export$11: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$1<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
475
476
  props: import("vue").PublicProps & __VLS_PrettifyLocal$1<(CheckboxProps<boolean | T> & {
476
477
  modelValue?: T;
477
478
  }) & {
@@ -488,6 +489,117 @@ declare const __VLS_export$10: <T = any>(__VLS_props: NonNullable<Awaited<typeof
488
489
  };
489
490
  type __VLS_PrettifyLocal$1<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
490
491
  //#endregion
492
+ //#region src/components/inputs/date-time-field/types.d.ts
493
+ type DateTimeFieldVariant = TextFieldVariant;
494
+ type DateTimeFieldType = "date" | "time" | "datetime";
495
+ /**
496
+ * Props exposed by the {@link DateTimeField} component.
497
+ */
498
+ type DateTimeFieldProps = {
499
+ /**
500
+ * Applies a distinct style variation to the field.
501
+ * One of `primary` or `secondary`.
502
+ * @default "primary"
503
+ */
504
+ variant?: DateTimeFieldVariant;
505
+ /**
506
+ * Defines which pickers are available and the format of the value.
507
+ *
508
+ * - `date`: value formatted as `YYYY-MM-DD` (e.g. `2026-09-24`);
509
+ * - `time`: value formatted as `HH:mm`, 24h (e.g. `14:30`);
510
+ * - `datetime`: value formatted as `YYYY-MM-DDTHH:mm` (e.g. `2026-09-24T14:30`).
511
+ * @default "datetime"
512
+ */
513
+ type?: DateTimeFieldType;
514
+ /**
515
+ * Minimum allowed value, in the same format as the value for the current `type`.
516
+ *
517
+ * Earlier options can't be picked, and an earlier value shows an error message.
518
+ * For `datetime`, the time limit only applies to the minimum's own date.
519
+ */
520
+ min?: string;
521
+ /**
522
+ * Maximum allowed value, in the same format as the value for the current `type`.
523
+ *
524
+ * Later options can't be picked, and a later value shows an error message.
525
+ * For `datetime`, the time limit only applies to the maximum's own date.
526
+ */
527
+ max?: string;
528
+ /**
529
+ * Removes the ability to click or target the field.
530
+ * @default false
531
+ */
532
+ disabled?: boolean;
533
+ /**
534
+ * Displays a loading indicator on the input.
535
+ * @default false
536
+ */
537
+ loading?: boolean;
538
+ /**
539
+ * Displays clear action, which is hidden while the field is `readonly`.
540
+ * @default false
541
+ */
542
+ clearable?: boolean;
543
+ /**
544
+ * Prevent value changes. The pickers won't open.
545
+ * @default false
546
+ */
547
+ readonly?: boolean;
548
+ /**
549
+ * Add `rules` to require field to be filled before form submission.
550
+ * @default false
551
+ */
552
+ required?: boolean;
553
+ /**
554
+ * Field label.
555
+ */
556
+ label?: string;
557
+ /**
558
+ * Field placeholder.
559
+ */
560
+ placeholder?: string;
561
+ /**
562
+ * Field message to show and direct user to fill field correctly.
563
+ *
564
+ * This message will be replaced when there's an error message to be shown.
565
+ */
566
+ hint?: string;
567
+ /**
568
+ * Component id to use on automated tests.
569
+ */
570
+ dataTestid?: string;
571
+ };
572
+ //#endregion
573
+ //#region src/components/inputs/date-time-field/date-time-field.vue.d.ts
574
+ /**
575
+ * Date and/or time field component to be used throughout the application.
576
+ *
577
+ * Its value uses the native input formats: `YYYY-MM-DD` for `date`, `HH:mm`
578
+ * for `time` and `YYYY-MM-DDTHH:mm` for `datetime`.
579
+ *
580
+ * @example
581
+ * ```vue
582
+ * <template>
583
+ * <u-date-time-field v-model="birthDate" label="Data de nascimento" type="date" />
584
+ * <template>
585
+ * ```
586
+ *
587
+ * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/date-time-field | DateTimeField Guide}
588
+ */
589
+ declare const _default$7: typeof __VLS_export$10;
590
+ declare const __VLS_export$10: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<DateTimeFieldProps & {
591
+ modelValue?: string;
592
+ }, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {
593
+ "update:modelValue": (value: string) => any;
594
+ }, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<DateTimeFieldProps & {
595
+ modelValue?: string;
596
+ }> & Readonly<{
597
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
598
+ }>, {
599
+ variant: DateTimeFieldVariant;
600
+ type: DateTimeFieldType;
601
+ }, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
602
+ //#endregion
491
603
  //#region src/components/grid/container/types.d.ts
492
604
  /**
493
605
  * Props exposed by the {@link Container} component.
@@ -560,7 +672,7 @@ type RowProps = {
560
672
  *
561
673
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/layout | Row Guide}
562
674
  */
563
- declare const _default$10: typeof __VLS_export$8;
675
+ declare const _default$11: typeof __VLS_export$8;
564
676
  declare const __VLS_export$8: __VLS_WithSlots$6<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<RowProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<RowProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
565
677
  default?: (props: {}) => any;
566
678
  }>;
@@ -659,7 +771,7 @@ type FormProps = {
659
771
  *
660
772
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/form | Form Guide}
661
773
  */
662
- declare const _default$8: typeof __VLS_export$6;
774
+ declare const _default$9: typeof __VLS_export$6;
663
775
  declare const __VLS_export$6: __VLS_WithSlots$4<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<FormProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {} & {
664
776
  submit: (event: SubmitEvent) => any;
665
777
  }, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<FormProps> & Readonly<{
@@ -689,7 +801,7 @@ type __VLS_WithSlots$4<T, S> = T & {
689
801
  *
690
802
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/section | Section Guide}
691
803
  */
692
- declare const _default$12: typeof __VLS_export$5;
804
+ declare const _default$13: typeof __VLS_export$5;
693
805
  declare const __VLS_export$5: __VLS_WithSlots$3<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<{}, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, true, {}, any>, {
694
806
  default?: (props: {}) => any;
695
807
  }>;
@@ -775,7 +887,7 @@ interface SectionAction extends ButtonProps {
775
887
  *
776
888
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/section | Section Guide}
777
889
  */
778
- declare const _default$11: typeof __VLS_export$4;
890
+ declare const _default$12: typeof __VLS_export$4;
779
891
  declare const __VLS_export$4: __VLS_WithSlots$2<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<SectionProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<SectionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
780
892
  default?: (props: {}) => any;
781
893
  }>;
@@ -850,7 +962,7 @@ type TableProps = {
850
962
  *
851
963
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/table | Table Guide}
852
964
  */
853
- declare const _default$13: typeof __VLS_export$3;
965
+ declare const _default$14: typeof __VLS_export$3;
854
966
  declare const __VLS_export$3: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<TableProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<TableProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
855
967
  //#endregion
856
968
  //#region src/components/details/types.d.ts
@@ -898,7 +1010,7 @@ type DetailsProps = {
898
1010
  *
899
1011
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/details | Details Guide}
900
1012
  */
901
- declare const _default$7: typeof __VLS_export$2;
1013
+ declare const _default$8: typeof __VLS_export$2;
902
1014
  declare const __VLS_export$2: __VLS_WithSlots$1<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<DetailsProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<DetailsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
903
1015
  default?: (props: {}) => any;
904
1016
  }>;
@@ -1087,4 +1199,4 @@ type __VLS_WithSlots<T, S> = T & {
1087
1199
  };
1088
1200
  };
1089
1201
  //#endregion
1090
- export { _default as UAutocompleteField, _default$1 as UButton, _default$2 as UCheckbox, _default$3 as UColumn, _default$4 as UContainer, _default$5 as UDataSet, _default$6 as UDataSetItem, _default$7 as UDetails, _default$8 as UForm, _default$9 as UMain, _default$10 as URow, _default$11 as USection, _default$12 as USectionContent, _default$13 as UTable, _default$14 as UTextField };
1202
+ export { _default as UAutocompleteField, _default$1 as UButton, _default$2 as UCheckbox, _default$3 as UColumn, _default$4 as UContainer, _default$5 as UDataSet, _default$6 as UDataSetItem, _default$7 as UDateTimeField, _default$8 as UDetails, _default$9 as UForm, _default$10 as UMain, _default$11 as URow, _default$12 as USection, _default$13 as USectionContent, _default$14 as UTable, _default$15 as UTextField };
@@ -1,7 +1,8 @@
1
1
  import { a as messages, n as owners, r as requests, s as useVuetifyColor } from "./use-dialog-Ck2_ZW7T.js";
2
2
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, isRef, mergeModels, mergeProps, normalizeClass, onMounted, onScopeDispose, onUnmounted, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toValue, unref, useId, useModel, useSlots, useTemplateRef, watch, withCtx, withModifiers } from "vue";
3
- import { VApp, VAppBar, VAppBarNavIcon, VAppBarTitle, VAutocomplete, VAvatar, VBadge, VBtn, VCard, VCardActions, VCardItem, VCardText, VCardTitle, VCheckboxBtn, VCol, VCombobox, VContainer, VDataIterator, VDialog, VDivider, VEmptyState, VExpansionPanel, VExpansionPanelText, VExpansionPanelTitle, VExpansionPanels, VForm, VIcon, VIconBtn, VImg, VList, VListGroup, VListItem, VListItemAction, VListSubheader, VMain, VMenu, VNavigationDrawer, VPagination, VRow, VSkeletonLoader, VSnackbarQueue, VTable, VTextField } from "vuetify/components";
4
- import { formatDateTime, isEmail, isEmpty, isPhone, isUrl, toPeriodInterval } from "@nexdom/shared/utils";
3
+ import { VApp, VAppBar, VAppBarNavIcon, VAppBarTitle, VAutocomplete, VAvatar, VBadge, VBtn, VCard, VCardActions, VCardItem, VCardText, VCardTitle, VCheckboxBtn, VCol, VCombobox, VContainer, VDataIterator, VDatePicker, VDialog, VDivider, VEmptyState, VExpansionPanel, VExpansionPanelText, VExpansionPanelTitle, VExpansionPanels, VForm, VIcon, VIconBtn, VImg, VList, VListGroup, VListItem, VListItemAction, VListSubheader, VLocaleProvider, VMain, VMenu, VNavigationDrawer, VPagination, VRow, VSkeletonLoader, VSnackbarQueue, VTable, VTextField, VTimePicker } from "vuetify/components";
4
+ import { formatDateTime, isEmail, isEmpty, isPhone, isUrl } from "@nexdom/shared/utils";
5
+ import { pt } from "vuetify/locale";
5
6
  //#region src/composables/navigation/use-route-props.ts
6
7
  function useRouteProps(route) {
7
8
  return computed(() => routeToProps(route));
@@ -80,23 +81,6 @@ var app_bar_default = /* @__PURE__ */ defineComponent({
80
81
  function isParentOption(option) {
81
82
  return "items" in option;
82
83
  }
83
- function formatNotificationDate(date) {
84
- const interval = toPeriodInterval(date);
85
- if (wasThisMonth(interval)) {
86
- if (wasToday(interval)) return formatDateTime(date, "HH:mm");
87
- else if (wasYesterday(interval)) return "Ontem";
88
- }
89
- return formatDateTime(date, "DD/MM/YYYY");
90
- }
91
- function wasThisMonth(interval) {
92
- return interval.months === 0 && interval.years === 0;
93
- }
94
- function wasToday(interval) {
95
- return interval.days === 0;
96
- }
97
- function wasYesterday(interval) {
98
- return interval.days === 1;
99
- }
100
84
  return (_ctx, _cache) => {
101
85
  return openBlock(), createBlock(unref(VAppBar), { "data-testid": props.dataTestid }, {
102
86
  append: withCtx(() => [
@@ -136,10 +120,10 @@ var app_bar_default = /* @__PURE__ */ defineComponent({
136
120
  title: notification.title,
137
121
  subtitle: notification.subtitle,
138
122
  "active-class": "text-primary"
139
- }, createSlots({ _: 2 }, [notification.date ? {
123
+ }, createSlots({ _: 2 }, [notification.when ? {
140
124
  name: "append",
141
125
  fn: withCtx(() => [createVNode(unref(VListItemAction), { end: "" }, {
142
- default: withCtx(() => [createElementVNode("small", _hoisted_1$2, toDisplayString(formatNotificationDate(notification.date)), 1)]),
126
+ default: withCtx(() => [createElementVNode("small", _hoisted_1$2, toDisplayString(notification.when), 1)]),
143
127
  _: 2
144
128
  }, 1024)]),
145
129
  key: "0"
@@ -1039,6 +1023,259 @@ var checkbox_default = /* @__PURE__ */ defineComponent({
1039
1023
  }
1040
1024
  });
1041
1025
  //#endregion
1026
+ //#region src/composables/inputs/date-time-field.ts
1027
+ /**
1028
+ * Extracts the date part (`YYYY-MM-DD`) of a value, or an empty string when
1029
+ * the type has no date.
1030
+ */
1031
+ function getDatePart(value, type) {
1032
+ return type === "time" ? "" : value.split("T")[0];
1033
+ }
1034
+ /**
1035
+ * Extracts the time part (`HH:mm`) of a value, or an empty string when the
1036
+ * value has no time.
1037
+ */
1038
+ function getTimePart(value, type) {
1039
+ if (type === "time") return value;
1040
+ const [, time = ""] = value.split("T");
1041
+ return time;
1042
+ }
1043
+ /**
1044
+ * Builds a value for the given type, or an empty string while any required
1045
+ * part is missing.
1046
+ */
1047
+ function joinDateTime(type, date, time) {
1048
+ if (type === "date") return date;
1049
+ if (type === "time") return time;
1050
+ return date && time ? `${date}T${time}` : "";
1051
+ }
1052
+ /**
1053
+ * Formats a value to be displayed in pt-BR, like `24/09/2026`, `14:30` or
1054
+ * `24/09/2026 14:30`.
1055
+ */
1056
+ function formatDateTime$1(value, type) {
1057
+ return [getDatePart(value, type).split("-").reverse().join("/"), getTimePart(value, type)].filter(Boolean).join(" ");
1058
+ }
1059
+ function useDateTimeFieldRules(props) {
1060
+ const defaultRules = useRules(props);
1061
+ return computed(() => {
1062
+ const rules = [...defaultRules.value];
1063
+ if (props.min) rules.push(minRule(props.min, props.type));
1064
+ if (props.max) rules.push(maxRule(props.max, props.type));
1065
+ return rules;
1066
+ });
1067
+ }
1068
+ /**
1069
+ * Computes the limits of each picker. For `datetime`, time limits only apply
1070
+ * when the selected date is the limit's own date.
1071
+ */
1072
+ function useDateTimeFieldPickerBounds(props, selectedDate) {
1073
+ return computed(() => {
1074
+ const min = props.min ?? "";
1075
+ const max = props.max ?? "";
1076
+ const date = toValue(selectedDate);
1077
+ return {
1078
+ dateMin: getDatePart(min, props.type),
1079
+ dateMax: getDatePart(max, props.type),
1080
+ timeMin: getTimeBound(min, props.type, date),
1081
+ timeMax: getTimeBound(max, props.type, date)
1082
+ };
1083
+ });
1084
+ }
1085
+ function getTimeBound(bound, type, selectedDate) {
1086
+ if (type === "datetime" && getDatePart(bound, type) !== selectedDate) return "";
1087
+ return getTimePart(bound, type);
1088
+ }
1089
+ function minRule(min, type) {
1090
+ const message = `Valor anterior ao mínimo permitido (${formatDateTime$1(min, type)})`;
1091
+ return (value) => !value || value >= min || message;
1092
+ }
1093
+ function maxRule(max, type) {
1094
+ const message = `Valor posterior ao máximo permitido (${formatDateTime$1(max, type)})`;
1095
+ return (value) => !value || value <= max || message;
1096
+ }
1097
+ //#endregion
1098
+ //#region src/components/inputs/date-time-field/date-time-field.vue
1099
+ var date_time_field_default = /* @__PURE__ */ defineComponent({
1100
+ inheritAttrs: false,
1101
+ __name: "date-time-field",
1102
+ props: /*@__PURE__*/ mergeModels({
1103
+ variant: {
1104
+ type: String,
1105
+ required: false,
1106
+ default: "primary"
1107
+ },
1108
+ type: {
1109
+ type: String,
1110
+ required: false,
1111
+ default: "datetime"
1112
+ },
1113
+ min: {
1114
+ type: String,
1115
+ required: false
1116
+ },
1117
+ max: {
1118
+ type: String,
1119
+ required: false
1120
+ },
1121
+ disabled: {
1122
+ type: Boolean,
1123
+ required: false
1124
+ },
1125
+ loading: {
1126
+ type: Boolean,
1127
+ required: false
1128
+ },
1129
+ clearable: {
1130
+ type: Boolean,
1131
+ required: false
1132
+ },
1133
+ readonly: {
1134
+ type: Boolean,
1135
+ required: false
1136
+ },
1137
+ required: {
1138
+ type: Boolean,
1139
+ required: false
1140
+ },
1141
+ label: {
1142
+ type: String,
1143
+ required: false
1144
+ },
1145
+ placeholder: {
1146
+ type: String,
1147
+ required: false
1148
+ },
1149
+ hint: {
1150
+ type: String,
1151
+ required: false
1152
+ },
1153
+ dataTestid: {
1154
+ type: String,
1155
+ required: false
1156
+ }
1157
+ }, {
1158
+ "modelValue": {
1159
+ type: String,
1160
+ default: ""
1161
+ },
1162
+ "modelModifiers": {}
1163
+ }),
1164
+ emits: ["update:modelValue"],
1165
+ setup(__props) {
1166
+ const modelValue = useModel(__props, "modelValue");
1167
+ const props = __props;
1168
+ const messages = { "pt-BR": pt };
1169
+ const vuetifyVariant = useTextFieldVariant(() => props.variant);
1170
+ const rules = useDateTimeFieldRules(props);
1171
+ const displayValue = computed(() => formatDateTime$1(modelValue.value, props.type));
1172
+ const isClearable = computed(() => props.clearable && !props.readonly);
1173
+ const isMenuDisabled = computed(() => props.disabled || props.readonly);
1174
+ const isMenuOpen = ref(false);
1175
+ const draft = ref({});
1176
+ const draftDate = computed(() => draft.value.date ?? getDatePart(modelValue.value, props.type));
1177
+ const draftTime = computed(() => draft.value.time ?? getTimePart(modelValue.value, props.type));
1178
+ const draftValue = computed(() => joinDateTime(props.type, draftDate.value, draftTime.value));
1179
+ const bounds = useDateTimeFieldPickerBounds(props, draftDate);
1180
+ watch(isMenuOpen, () => {
1181
+ draft.value = {};
1182
+ });
1183
+ function onDateUpdate(date) {
1184
+ draft.value.date = formatDateTime(date, "YYYY-MM-DD");
1185
+ commitDraft();
1186
+ closeIfComplete();
1187
+ }
1188
+ function onTimeUpdate(time) {
1189
+ draft.value.time = time ?? "";
1190
+ commitDraft();
1191
+ }
1192
+ function commitDraft() {
1193
+ if (draftValue.value) modelValue.value = draftValue.value;
1194
+ }
1195
+ function closeIfComplete() {
1196
+ if (draftValue.value) isMenuOpen.value = false;
1197
+ }
1198
+ function clear() {
1199
+ modelValue.value = "";
1200
+ }
1201
+ return (_ctx, _cache) => {
1202
+ return openBlock(), createBlock(unref(VTextField), {
1203
+ "model-value": displayValue.value,
1204
+ "validation-value": modelValue.value,
1205
+ variant: unref(vuetifyVariant),
1206
+ rules: unref(rules),
1207
+ "data-testid": props.dataTestid,
1208
+ disabled: props.disabled,
1209
+ loading: props.loading,
1210
+ label: props.label,
1211
+ placeholder: props.placeholder,
1212
+ hint: props.hint,
1213
+ clearable: isClearable.value,
1214
+ readonly: "",
1215
+ "onClick:clear": clear
1216
+ }, {
1217
+ default: withCtx(() => [createVNode(unref(VMenu), {
1218
+ modelValue: isMenuOpen.value,
1219
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isMenuOpen.value = $event),
1220
+ activator: "parent",
1221
+ location: "bottom start",
1222
+ "min-width": "0",
1223
+ disabled: isMenuDisabled.value,
1224
+ "close-on-content-click": false
1225
+ }, {
1226
+ default: withCtx(() => [createVNode(unref(VCard), null, {
1227
+ default: withCtx(() => [createVNode(unref(VLocaleProvider), {
1228
+ locale: "pt-BR",
1229
+ messages,
1230
+ class: "d-flex flex-wrap"
1231
+ }, {
1232
+ default: withCtx(() => [props.type !== "time" ? (openBlock(), createBlock(unref(VDatePicker), {
1233
+ key: 0,
1234
+ "model-value": draftDate.value || null,
1235
+ min: unref(bounds).dateMin,
1236
+ max: unref(bounds).dateMax,
1237
+ "onUpdate:modelValue": onDateUpdate
1238
+ }, null, 8, [
1239
+ "model-value",
1240
+ "min",
1241
+ "max"
1242
+ ])) : createCommentVNode("v-if", true), props.type !== "date" ? (openBlock(), createBlock(unref(VTimePicker), {
1243
+ key: 1,
1244
+ "model-value": draftTime.value,
1245
+ min: unref(bounds).timeMin,
1246
+ max: unref(bounds).timeMax,
1247
+ format: "24hr",
1248
+ "onUpdate:modelValue": onTimeUpdate,
1249
+ "onUpdate:minute": closeIfComplete
1250
+ }, null, 8, [
1251
+ "model-value",
1252
+ "min",
1253
+ "max"
1254
+ ])) : createCommentVNode("v-if", true)]),
1255
+ _: 1
1256
+ })]),
1257
+ _: 1
1258
+ })]),
1259
+ _: 1
1260
+ }, 8, ["modelValue", "disabled"])]),
1261
+ _: 1
1262
+ }, 8, [
1263
+ "model-value",
1264
+ "validation-value",
1265
+ "variant",
1266
+ "rules",
1267
+ "data-testid",
1268
+ "disabled",
1269
+ "loading",
1270
+ "label",
1271
+ "placeholder",
1272
+ "hint",
1273
+ "clearable"
1274
+ ]);
1275
+ };
1276
+ }
1277
+ });
1278
+ //#endregion
1042
1279
  //#region src/components/grid/row/row.vue
1043
1280
  var row_default = /* @__PURE__ */ defineComponent({
1044
1281
  inheritAttrs: false,
@@ -1702,4 +1939,4 @@ var data_set_item_default = /* @__PURE__ */ defineComponent({
1702
1939
  }
1703
1940
  });
1704
1941
  //#endregion
1705
- export { autocomplete_field_default as UAutocompleteField, button_default as UButton, checkbox_default as UCheckbox, column_default as UColumn, container_default as UContainer, data_set_default as UDataSet, data_set_item_default as UDataSetItem, details_default as UDetails, form_default as UForm, main_default as UMain, row_default as URow, section_default as USection, section_content_default as USectionContent, table_default as UTable, text_field_default as UTextField };
1942
+ export { autocomplete_field_default as UAutocompleteField, button_default as UButton, checkbox_default as UCheckbox, column_default as UColumn, container_default as UContainer, data_set_default as UDataSet, data_set_item_default as UDataSetItem, date_time_field_default as UDateTimeField, details_default as UDetails, form_default as UForm, main_default as UMain, row_default as URow, section_default as USection, section_content_default as USectionContent, table_default as UTable, text_field_default as UTextField };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import "@mdi/font/css/materialdesignicons.css";
2
2
  import "vuetify/styles";
3
+ import "./styles/fonts/fonts.css";
3
4
  import { Plugin } from "vue";
4
5
  //#region src/index.d.ts
5
6
  /**
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import "@mdi/font/css/materialdesignicons.css";
2
2
  import "vuetify/styles";
3
+ import "./styles/fonts/fonts.css";
3
4
  import { createVuetify } from "vuetify";
4
5
  import "vue";
5
6
  //#region src/index.ts
@@ -22,7 +23,10 @@ function createUimed() {
22
23
  error: "#D92D20",
23
24
  info: "#9ACBE5"
24
25
  },
25
- variables: { "border-color": "#D0D5DD" }
26
+ variables: {
27
+ "border-color": "#D0D5DD",
28
+ "font-body": "\"Unimed Slab\", sans-serif"
29
+ }
26
30
  } }
27
31
  } });
28
32
  }
package/dist/plugins.js CHANGED
@@ -1,14 +1,10 @@
1
- import { resolve } from "node:path";
2
1
  import vitePluginVuetify from "vite-plugin-vuetify";
3
2
  //#region src/plugins.ts
4
3
  /**
5
4
  * Vite plugin for UIMed.
6
5
  */
7
6
  function vitePluginUimed() {
8
- return vitePluginVuetify({
9
- autoImport: false,
10
- styles: { configFile: resolve(__dirname, "styles/settings.scss") }
11
- });
7
+ return vitePluginVuetify({ autoImport: false });
12
8
  }
13
9
  /**
14
10
  * Vitest Server plugin for UIMed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexdom/uimed-vue",
3
- "version": "2.0.0-beta.11",
3
+ "version": "2.0.0-beta.13",
4
4
  "description": "A ui framework for NEXDOM applications.",
5
5
  "keywords": [
6
6
  "lib",
@@ -1,6 +0,0 @@
1
- @use "fonts";
2
-
3
- @use "sass:string";
4
- @use "vuetify/settings" with (
5
- $body-font-family: string.unquote('"Unimed Slab", sans-serif')
6
- );
File without changes