lizaui 10.0.69 → 10.0.71

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 (24) hide show
  1. package/dist/components/travel-calendar/calendar-format.d.ts +46 -0
  2. package/dist/components/travel-calendar/calendar-format.d.ts.map +1 -0
  3. package/dist/components/travel-calendar/calendar-travel-form.d.ts +3 -19
  4. package/dist/components/travel-calendar/calendar-travel-form.d.ts.map +1 -1
  5. package/dist/components/travel-calendar/hook/use-calendar-dropdown.d.ts +17 -0
  6. package/dist/components/travel-calendar/hook/use-calendar-dropdown.d.ts.map +1 -0
  7. package/dist/components/travel-calendar/hook/use-calendar-presets.d.ts +32 -0
  8. package/dist/components/travel-calendar/hook/use-calendar-presets.d.ts.map +1 -0
  9. package/dist/components/travel-calendar/hook/use-calendar-pricing.d.ts +29 -0
  10. package/dist/components/travel-calendar/hook/use-calendar-pricing.d.ts.map +1 -0
  11. package/dist/components/travel-calendar/hook/use-calendar-value.d.ts +26 -0
  12. package/dist/components/travel-calendar/hook/use-calendar-value.d.ts.map +1 -0
  13. package/dist/components/travel-calendar/preset-button.d.ts +9 -0
  14. package/dist/components/travel-calendar/preset-button.d.ts.map +1 -0
  15. package/dist/lizaui.css +167 -166
  16. package/dist/phone-input/index.cjs.js +1 -1
  17. package/dist/phone-input/index.cjs.js.map +1 -1
  18. package/dist/phone-input/index.es.js +1 -1
  19. package/dist/phone-input/index.es.js.map +1 -1
  20. package/dist/travel-calendar/index.cjs.js +929 -310
  21. package/dist/travel-calendar/index.cjs.js.map +1 -1
  22. package/dist/travel-calendar/index.es.js +930 -311
  23. package/dist/travel-calendar/index.es.js.map +1 -1
  24. package/package.json +1 -1
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Utilidades puras (sin React) para el parseo y formateo de fechas del
3
+ * calendario de viajes. Centralizan los formatos soportados y la conversión
4
+ * entre `string | Date | DateObject` para que los hooks y el componente
5
+ * compartan exactamente la misma lógica.
6
+ */
7
+ export declare const CALENDAR_FORMAT_ALIASES: {
8
+ readonly "DD/MM/YYYY": "DD/MM/YYYY";
9
+ readonly "MM/DD/YYYY": "MM/DD/YYYY";
10
+ readonly "DD-MM-YYYY": "DD-MM-YYYY";
11
+ readonly "MM-DD-YYYY": "MM-DD-YYYY";
12
+ readonly "YYYY/MM/DD": "YYYY/MM/DD";
13
+ readonly "YYYY-MM-DD": "YYYY-MM-DD";
14
+ readonly "dd/MM/yyyy": "DD/MM/YYYY";
15
+ readonly "MM/dd/yyyy": "MM/DD/YYYY";
16
+ readonly "dd-MM-yyyy": "DD-MM-YYYY";
17
+ readonly "MM-dd-yyyy": "MM-DD-YYYY";
18
+ readonly "yyyy/MM/dd": "YYYY/MM/DD";
19
+ readonly "yyyy-MM-dd": "YYYY-MM-DD";
20
+ };
21
+ export type CalendarFormatInput = keyof typeof CALENDAR_FORMAT_ALIASES;
22
+ export type CalendarFormat = (typeof CALENDAR_FORMAT_ALIASES)[CalendarFormatInput];
23
+ type CalendarDatePart = "day" | "month" | "year";
24
+ export declare const CALENDAR_FORMAT_CONFIG: Record<CalendarFormat, {
25
+ separator: "/" | "-";
26
+ order: readonly [CalendarDatePart, CalendarDatePart, CalendarDatePart];
27
+ }>;
28
+ export declare const normalizeCalendarFormat: (format: CalendarFormatInput) => CalendarFormat;
29
+ export declare const parseDateFromString: (raw: string, format: CalendarFormat) => Date | null;
30
+ /** Convierte cualquier valor admitido (`DateObject | Date | string`) en un `Date` o `null`. */
31
+ export declare const parseCalendarValue: (currentValue: unknown, format: CalendarFormat) => Date | null;
32
+ /** Serializa un `Date` (en UTC) al string del formato indicado. */
33
+ export declare const formatDateString: (date: Date, format: CalendarFormat) => string;
34
+ /**
35
+ * Toma un `Date` local, lo lleva a medianoche UTC y lo formatea. Encapsula el
36
+ * patrón repetido `formatDateString(new Date(Date.UTC(y, m, d)))` para mostrar
37
+ * la fecha sin desfases de zona horaria.
38
+ */
39
+ export declare const formatDisplayDate: (date: Date, format: CalendarFormat) => string;
40
+ /** Clave consistente `YYYY-MM-DD` (en UTC) para comparar/indexar fechas. */
41
+ export declare const formatDateKey: (iso: string | Date) => string;
42
+ export declare const startOfDay: (d: Date) => Date;
43
+ export declare const addDays: (d: Date, n: number) => Date;
44
+ export declare const isSameDay: (a?: Date | null, b?: Date | null) => boolean;
45
+ export {};
46
+ //# sourceMappingURL=calendar-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-format.d.ts","sourceRoot":"","sources":["../../../src/components/travel-calendar/calendar-format.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;CAa1B,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,uBAAuB,CAAC;AACvE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,mBAAmB,CAAC,CAAC;AACnF,KAAK,gBAAgB,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjD,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAC1C,cAAc,EACd;IACC,SAAS,EAAE,GAAG,GAAG,GAAG,CAAC;IACrB,KAAK,EAAE,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;CACvE,CAQD,CAAC;AAIF,eAAO,MAAM,uBAAuB,GAAI,QAAQ,mBAAmB,KAAG,cAAiD,CAAC;AAgBxH,eAAO,MAAM,mBAAmB,GAAI,KAAK,MAAM,EAAE,QAAQ,cAAc,KAAG,IAAI,GAAG,IA0BhF,CAAC;AAkBF,+FAA+F;AAC/F,eAAO,MAAM,kBAAkB,GAAI,cAAc,OAAO,EAAE,QAAQ,cAAc,KAAG,IAAI,GAAG,IA0BzF,CAAC;AAEF,mEAAmE;AACnE,eAAO,MAAM,gBAAgB,GAAI,MAAM,IAAI,EAAE,QAAQ,cAAc,KAAG,MAcrE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,MAAM,IAAI,EAAE,QAAQ,cAAc,KAAG,MAC2B,CAAC;AAEnG,4EAA4E;AAC5E,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,GAAG,IAAI,KAAG,MAIlD,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,GAAG,IAAI,KAAG,IAAwE,CAAC;AAE9G,eAAO,MAAM,OAAO,GAAI,GAAG,IAAI,EAAE,GAAG,MAAM,KAAG,IAA4E,CAAC;AAE1H,eAAO,MAAM,SAAS,GAAI,IAAI,IAAI,GAAG,IAAI,EAAE,IAAI,IAAI,GAAG,IAAI,KAAG,OAI5D,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { DateObject, CalendarProps } from 'react-multi-date-picker';
3
+ import { CalendarFormatInput } from './calendar-format';
4
+ import { TravelPrice } from './hook/use-calendar-pricing';
3
5
  import { CalendarLang } from './locale';
4
6
  interface Props extends CalendarProps {
5
7
  name: string;
@@ -22,31 +24,13 @@ interface Props extends CalendarProps {
22
24
  isClose?: boolean;
23
25
  lang?: CalendarLang;
24
26
  format?: CalendarFormatInput;
25
- travelPrices?: {
26
- dateTravel: string | Date;
27
- priceTravel: number;
28
- }[];
27
+ travelPrices?: TravelPrice[];
29
28
  /** Fecha mínima seleccionable, ej. "2026-02-28 06:47:00". Hacia atrás se deshabilitan. null/undefined = sin límite. */
30
29
  minSelectableDate?: string | null;
31
30
  showActionsButtons?: boolean;
32
31
  readOnly?: boolean;
33
32
  disabled?: boolean;
34
33
  }
35
- declare const CALENDAR_FORMAT_ALIASES: {
36
- readonly "DD/MM/YYYY": "DD/MM/YYYY";
37
- readonly "MM/DD/YYYY": "MM/DD/YYYY";
38
- readonly "DD-MM-YYYY": "DD-MM-YYYY";
39
- readonly "MM-DD-YYYY": "MM-DD-YYYY";
40
- readonly "YYYY/MM/DD": "YYYY/MM/DD";
41
- readonly "YYYY-MM-DD": "YYYY-MM-DD";
42
- readonly "dd/MM/yyyy": "DD/MM/YYYY";
43
- readonly "MM/dd/yyyy": "MM/DD/YYYY";
44
- readonly "dd-MM-yyyy": "DD-MM-YYYY";
45
- readonly "MM-dd-yyyy": "MM-DD-YYYY";
46
- readonly "yyyy/MM/dd": "YYYY/MM/DD";
47
- readonly "yyyy-MM-dd": "YYYY-MM-DD";
48
- };
49
- type CalendarFormatInput = keyof typeof CALENDAR_FORMAT_ALIASES;
50
34
  export declare const CalendarTravelForm: import('react').ForwardRefExoticComponent<Omit<Props, "ref"> & import('react').RefAttributes<unknown>>;
51
35
  export {};
52
36
  //# sourceMappingURL=calendar-travel-form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar-travel-form.d.ts","sourceRoot":"","sources":["../../../src/components/travel-calendar/calendar-travel-form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAE1G,OAAO,EAAY,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAQnF,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,wBAAwB,CAAC;AAEhC,UAAU,KAAM,SAAQ,aAAa;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,UAAU,GAAG,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,aAAa,EAAE,UAAU,GAAG,UAAU,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC;IACzE,iBAAiB,CAAC,EAAE,CAAC,aAAa,EAAE,UAAU,KAAK,IAAI,CAAC;IACxD,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACvC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qBAAqB,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,YAAY,CAAC,EAAE;QAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACpE,uHAAuH;IACvH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;CAanB,CAAC;AAEX,KAAK,mBAAmB,GAAG,MAAM,OAAO,uBAAuB,CAAC;AAoIhE,eAAO,MAAM,kBAAkB,wGAsc9B,CAAC"}
1
+ {"version":3,"file":"calendar-travel-form.d.ts","sourceRoot":"","sources":["../../../src/components/travel-calendar/calendar-travel-form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAE7E,OAAO,EAAY,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAKnF,OAAO,EAA2B,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGtF,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAEnF,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7D,OAAO,wBAAwB,CAAC;AAEhC,UAAU,KAAM,SAAQ,aAAa;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,UAAU,GAAG,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,aAAa,EAAE,UAAU,GAAG,UAAU,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC;IACzE,iBAAiB,CAAC,EAAE,CAAC,aAAa,EAAE,UAAU,KAAK,IAAI,CAAC;IACxD,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACvC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qBAAqB,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,uHAAuH;IACvH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB,wGAgK9B,CAAC"}
@@ -0,0 +1,17 @@
1
+ interface UseCalendarDropdownProps {
2
+ onOpenCalendar?: () => void;
3
+ readOnly: boolean;
4
+ disabled: boolean;
5
+ }
6
+ /**
7
+ * Maneja la apertura/cierre del popover del calendario y dispara
8
+ * `onOpenCalendar` (vía ref, sin re-suscribir efectos) cada vez que se abre.
9
+ */
10
+ export declare function useCalendarDropdown({ onOpenCalendar, readOnly, disabled }: UseCalendarDropdownProps): {
11
+ isOpen: boolean;
12
+ setIsOpen: import('react').Dispatch<import('react').SetStateAction<boolean>>;
13
+ close: () => void;
14
+ toggleFromInput: () => void;
15
+ };
16
+ export {};
17
+ //# sourceMappingURL=use-calendar-dropdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-calendar-dropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/travel-calendar/hook/use-calendar-dropdown.ts"],"names":[],"mappings":"AAEA,UAAU,wBAAwB;IACjC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,wBAAwB;;;;;EAuBnG"}
@@ -0,0 +1,32 @@
1
+ import { DateObject } from 'react-multi-date-picker';
2
+ export interface PresetItem {
3
+ key: string;
4
+ label: string;
5
+ getValue?: () => DateObject | DateObject[] | null;
6
+ action?: () => void;
7
+ separator?: boolean;
8
+ }
9
+ interface UseCalendarPresetsProps {
10
+ selectedDate: Date | null;
11
+ minDateKey: string | null;
12
+ enabledDatesSet: Set<string>;
13
+ hasTravelPrices: boolean;
14
+ handleChange?: (selectedDates: DateObject | DateObject[] | null) => void;
15
+ /** Aplica la fecha elegida (refleja en el input y cierra el popover). */
16
+ onSelect: (date: Date) => void;
17
+ }
18
+ /**
19
+ * Construye los atajos del calendario ("Hoy", "+7 días", "Navidad", …) y la
20
+ * lógica para saber si cada atajo está activo/deshabilitado y para aplicarlo
21
+ * respetando `minDateKey` y las fechas habilitadas.
22
+ */
23
+ export declare function useCalendarPresets({ selectedDate, minDateKey, enabledDatesSet, hasTravelPrices, handleChange, onSelect, }: UseCalendarPresetsProps): {
24
+ presets: PresetItem[];
25
+ getPresetState: (preset: PresetItem) => {
26
+ active: boolean;
27
+ disabled: boolean;
28
+ };
29
+ handlePresetClick: (preset: PresetItem) => void;
30
+ };
31
+ export {};
32
+ //# sourceMappingURL=use-calendar-presets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-calendar-presets.d.ts","sourceRoot":"","sources":["../../../../src/components/travel-calendar/hook/use-calendar-presets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGrD,MAAM,WAAW,UAAU;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,UAAU,GAAG,UAAU,EAAE,GAAG,IAAI,CAAC;IAClD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,uBAAuB;IAChC,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,CAAC,aAAa,EAAE,UAAU,GAAG,UAAU,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC;IACzE,yEAAyE;IACzE,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CAC/B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EAClC,YAAY,EACZ,UAAU,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACZ,QAAQ,GACR,EAAE,uBAAuB;;6BA0Df,UAAU;;;;gCA0BV,UAAU;EAkCpB"}
@@ -0,0 +1,29 @@
1
+ import { CalendarFormat } from '../calendar-format';
2
+ import { CalendarLang } from '../locale';
3
+ export interface TravelPrice {
4
+ dateTravel: string | Date;
5
+ priceTravel: number;
6
+ }
7
+ interface UseCalendarPricingProps {
8
+ travelPrices: TravelPrice[];
9
+ /** Fecha mínima seleccionable, ej. "2026-02-28 06:47:00". null/undefined = sin límite. */
10
+ minSelectableDate: string | null;
11
+ normalizedFormat: CalendarFormat;
12
+ lang: CalendarLang;
13
+ }
14
+ /**
15
+ * Deriva, a partir de `travelPrices` y `minSelectableDate`, las estructuras
16
+ * necesarias para pintar el calendario: el set de fechas habilitadas, la clave
17
+ * de fecha mínima y el `mapDays` que renderiza cada día con su precio/estado.
18
+ */
19
+ export declare function useCalendarPricing({ travelPrices, minSelectableDate, normalizedFormat, lang }: UseCalendarPricingProps): {
20
+ enabledDatesSet: Set<string>;
21
+ minDateKey: string | null;
22
+ mapDays: ({ date, today, selectedDate, isSameDate }: any) => {
23
+ disabled: boolean;
24
+ title: string;
25
+ children: import("react/jsx-runtime").JSX.Element;
26
+ };
27
+ };
28
+ export {};
29
+ //# sourceMappingURL=use-calendar-pricing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-calendar-pricing.d.ts","sourceRoot":"","sources":["../../../../src/components/travel-calendar/hook/use-calendar-pricing.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,WAAW,WAAW;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,uBAAuB;IAChC,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,0FAA0F;IAC1F,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,gBAAgB,EAAE,cAAc,CAAC;IACjC,IAAI,EAAE,YAAY,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,IAAI,EAAE,EAAE,uBAAuB;;;yDAiCzE,GAAG;;;;;EAuChD"}
@@ -0,0 +1,26 @@
1
+ import { DateObject } from 'react-multi-date-picker';
2
+ import { CalendarFormat } from '../calendar-format';
3
+ interface UseCalendarValueProps {
4
+ value: unknown;
5
+ normalizedFormat: CalendarFormat;
6
+ minDateKey: string | null;
7
+ handleChange?: (selectedDates: DateObject | DateObject[] | null) => void;
8
+ /** Se invoca tras elegir una fecha en el calendario (p.ej. para cerrar el popover). */
9
+ onClose: () => void;
10
+ }
11
+ /**
12
+ * Centraliza el valor del input: mantiene el borrador mientras se escribe
13
+ * (`inputDraft`), lo sincroniza con el `value` controlado, deriva la fecha
14
+ * seleccionada y expone los manejadores de escritura/selección.
15
+ */
16
+ export declare function useCalendarValue({ value, normalizedFormat, minDateKey, handleChange, onClose }: UseCalendarValueProps): {
17
+ inputRef: import('react').RefObject<HTMLInputElement | null>;
18
+ valueInput: string;
19
+ selectedDate: Date | null;
20
+ handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
21
+ handleCalendarChange: (e: DateObject | DateObject[] | null) => void;
22
+ commitDraft: (date: Date) => void;
23
+ clearDraft: () => void;
24
+ };
25
+ export {};
26
+ //# sourceMappingURL=use-calendar-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-calendar-value.d.ts","sourceRoot":"","sources":["../../../../src/components/travel-calendar/hook/use-calendar-value.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAA0E,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEjI,UAAU,qBAAqB;IAC9B,KAAK,EAAE,OAAO,CAAC;IACf,gBAAgB,EAAE,cAAc,CAAC;IACjC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,CAAC,aAAa,EAAE,UAAU,GAAG,UAAU,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC;IACzE,uFAAuF;IACvF,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,qBAAqB;;;;2BA+BhH,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC;8BA4BnC,UAAU,GAAG,UAAU,EAAE,GAAG,IAAI;wBArC7B,IAAI;;EAoDZ"}
@@ -0,0 +1,9 @@
1
+ interface PresetButtonProps {
2
+ label: string;
3
+ active: boolean;
4
+ disabled: boolean;
5
+ onClick: () => void;
6
+ }
7
+ export declare const PresetButton: ({ label, active, disabled, onClick }: PresetButtonProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=preset-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preset-button.d.ts","sourceRoot":"","sources":["../../../src/components/travel-calendar/preset-button.tsx"],"names":[],"mappings":"AAIA,UAAU,iBAAiB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,GAAI,sCAAsC,iBAAiB,4CAkCnF,CAAC"}
package/dist/lizaui.css CHANGED
@@ -1950,172 +1950,7 @@
1950
1950
  inherits: false;
1951
1951
  initial-value: 0 0 #0000;
1952
1952
  }
1953
-
1954
- :root {
1955
- --tc-day-size: 45px;
1956
- --tc-font-size-number: 11px;
1957
- --tc-font-size-price: 9px;
1958
- --tc-color-price: #5f6368;
1959
- --tc-color-price-empty: #9ca3af;
1960
- --tc-bg-selected: rgba(59, 130, 246, 0.2);
1961
- --tc-radius: 50%;
1962
- --tc-transition: 120ms ease-in-out;
1963
- /* Navegación */
1964
- --tc-nav-size: 38px;
1965
- --tc-nav-radius: 50%;
1966
- --tc-nav-color: var(--color-default-700, #374151);
1967
- --tc-nav-bg: var(--color-default-100, #f3f4f6);
1968
- --tc-nav-bg-hover: var(--color-default-200, #e5e7eb);
1969
- --tc-nav-bg-active: var(--color-default-300, #d1d5db);
1970
- }
1971
-
1972
- .react-multi-date-picker-travel-calendar-popover {
1973
- background-color: var(--color-content1-default) !important;
1974
- border: 0px solid transparent !important;
1975
- }
1976
- .react-multi-date-picker-travel-calendar-popover .rmdp-day-picker {
1977
- column-gap: 15px;
1978
- }
1979
- .react-multi-date-picker-travel-calendar-popover {
1980
- /* Navegación flechas */
1981
- }
1982
- .react-multi-date-picker-travel-calendar-popover .rmdp-arrow-container {
1983
- width: var(--tc-nav-size) !important;
1984
- height: var(--tc-nav-size) !important;
1985
- border-radius: var(--tc-nav-radius) !important;
1986
- background-color: var(--tc-nav-bg) !important;
1987
- color: var(--tc-nav-color) !important;
1988
- display: flex !important;
1989
- align-items: center !important;
1990
- justify-content: center !important;
1991
- transition: background-color var(--tc-transition), transform 80ms ease;
1992
- border: none !important;
1993
- outline: none !important;
1994
- position: relative;
1995
- cursor: pointer;
1996
- box-shadow: none !important;
1997
- }
1998
- .react-multi-date-picker-travel-calendar-popover .rmdp-arrow-container .rmdp-arrow {
1999
- margin-top: 0 !important;
2000
- border-color: currentColor !important;
2001
- }
2002
- .react-multi-date-picker-travel-calendar-popover .travel-calendar-nav-button__icon {
2003
- font-size: 18px;
2004
- stroke-width: 2.25;
2005
- }
2006
- .react-multi-date-picker-travel-calendar-popover .rmdp-arrow-container:hover:not(.rmdp-disabled) {
2007
- background-color: var(--tc-nav-bg-hover) !important;
2008
- }
2009
- .react-multi-date-picker-travel-calendar-popover .rmdp-arrow-container:active:not(.rmdp-disabled) {
2010
- background-color: var(--tc-nav-bg-active) !important;
2011
- transform: translateY(1px);
2012
- }
2013
- .react-multi-date-picker-travel-calendar-popover .rmdp-arrow-container.rmdp-disabled {
2014
- opacity: 0.5;
2015
- cursor: not-allowed !important;
2016
- }
2017
- @media (prefers-contrast: more) {
2018
- .react-multi-date-picker-travel-calendar-popover .rmdp-arrow-container {
2019
- outline: 2px solid currentColor;
2020
- }
2021
- }
2022
- .react-multi-date-picker-travel-calendar-popover .rmdp-header-values {
2023
- color: var(--color-default-900) !important;
2024
- }
2025
- .react-multi-date-picker-travel-calendar-popover .rmdp-week-day {
2026
- font-weight: 500 !important;
2027
- color: var(--color-default-500) !important;
2028
- }
2029
- .react-multi-date-picker-travel-calendar-popover .travel-calendar-day {
2030
- position: relative;
2031
- display: flex;
2032
- flex-direction: column;
2033
- align-items: center !important;
2034
- justify-content: center !important;
2035
- width: var(--tc-day-size);
2036
- height: var(--tc-day-size);
2037
- font-size: 12px;
2038
- line-height: 1;
2039
- user-select: none;
2040
- border-radius: var(--tc-radius) !important;
2041
- transition: background-color var(--tc-transition), color var(--tc-transition), box-shadow var(--tc-transition), opacity var(--tc-transition);
2042
- }
2043
- .react-multi-date-picker-travel-calendar-popover .travel-calendar-day--active {
2044
- cursor: pointer;
2045
- }
2046
- .react-multi-date-picker-travel-calendar-popover .travel-calendar-day--active:hover {
2047
- background-color: transparent !important;
2048
- }
2049
- .react-multi-date-picker-travel-calendar-popover .travel-calendar-day--disabled {
2050
- opacity: 0.6;
2051
- cursor: not-allowed;
2052
- }
2053
- .react-multi-date-picker-travel-calendar-popover .travel-calendar-day--disabled span {
2054
- text-decoration: line-through !important;
2055
- }
2056
- .react-multi-date-picker-travel-calendar-popover .travel-calendar-day--selected {
2057
- background: var(--tc-bg-selected);
2058
- font-weight: 600;
2059
- }
2060
- .react-multi-date-picker-travel-calendar-popover .travel-calendar-day--today {
2061
- box-shadow: 0 0 0 1px var(--color-primary);
2062
- }
2063
- .react-multi-date-picker-travel-calendar-popover .travel-calendar-day__number {
2064
- font-size: var(--tc-font-size-number) !important;
2065
- color: var(--color-default-900) !important;
2066
- font-weight: 500 !important;
2067
- margin-bottom: 2px;
2068
- }
2069
- .react-multi-date-picker-travel-calendar-popover .travel-calendar-day__price {
2070
- font-size: var(--tc-font-size-price) !important;
2071
- color: var(--tc-color-price) !important;
2072
- font-weight: 500;
2073
- }
2074
- .react-multi-date-picker-travel-calendar-popover .rmdp-day,
2075
- .react-multi-date-picker-travel-calendar-popover .rmdp-week-day {
2076
- width: var(--tc-day-size) !important;
2077
- height: var(--tc-day-size) !important;
2078
- min-height: var(--tc-day-size) !important;
2079
- max-width: var(--tc-day-size) !important;
2080
- }
2081
- .react-multi-date-picker-travel-calendar-popover .rmdp-day span {
2082
- position: relative !important;
2083
- left: 0;
2084
- right: 0;
2085
- top: 0;
2086
- }
2087
- .react-multi-date-picker-travel-calendar-popover .travel-calendar-day__price--empty {
2088
- color: var(--tc-color-price-empty);
2089
- }
2090
- .react-multi-date-picker-travel-calendar-popover {
2091
- /* Accesibilidad: foco navegable si se usa keyboard nav de librería */
2092
- }
2093
- .react-multi-date-picker-travel-calendar-popover .travel-calendar-day:focus-visible {
2094
- outline: 2px solid #2563eb;
2095
- outline-offset: 2px;
2096
- }
2097
- .react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-selected span:not(.highlight) {
2098
- background-color: var(--color-primary) !important;
2099
- color: #fff !important;
2100
- box-shadow: none !important;
2101
- }
2102
- .react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-selected span:not(.highlight) .travel-calendar-day__price {
2103
- color: #fff !important;
2104
- }
2105
- @media (hover: hover) {
2106
- .react-multi-date-picker-travel-calendar-popover .rmdp-day:not(.rmdp-disabled, .rmdp-day-hidden) span:hover {
2107
- background-color: var(--color-primary-100) !important;
2108
- color: var(--color-primary-500) !important;
2109
- }
2110
- .react-multi-date-picker-travel-calendar-popover .travel-calendar-day.travel-calendar-day--active:hover span {
2111
- background-color: var(--color-primary-100) !important;
2112
- color: var(--color-primary-500) !important;
2113
- }
2114
- }
2115
- .react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-today span {
2116
- background-color: var(--color-primary-100) !important;
2117
- color: var(--color-primary-500) !important;
2118
- }/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
1953
+ /*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
2119
1954
  @layer properties {
2120
1955
  @supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
2121
1956
  *, :before, :after, ::backdrop {
@@ -2667,3 +2502,169 @@
2667
2502
  .table__container_main .table__header_th {
2668
2503
  border-bottom: 1px solid var(--border);
2669
2504
  }
2505
+
2506
+ :root {
2507
+ --tc-day-size: 45px;
2508
+ --tc-font-size-number: 11px;
2509
+ --tc-font-size-price: 9px;
2510
+ --tc-color-price: #5f6368;
2511
+ --tc-color-price-empty: #9ca3af;
2512
+ --tc-bg-selected: rgba(59, 130, 246, 0.2);
2513
+ --tc-radius: 50%;
2514
+ --tc-transition: 120ms ease-in-out;
2515
+ /* Navegación */
2516
+ --tc-nav-size: 38px;
2517
+ --tc-nav-radius: 50%;
2518
+ --tc-nav-color: var(--color-default-700, #374151);
2519
+ --tc-nav-bg: var(--color-default-100, #f3f4f6);
2520
+ --tc-nav-bg-hover: var(--color-default-200, #e5e7eb);
2521
+ --tc-nav-bg-active: var(--color-default-300, #d1d5db);
2522
+ }
2523
+
2524
+ .react-multi-date-picker-travel-calendar-popover {
2525
+ background-color: var(--color-content1-default) !important;
2526
+ border: 0px solid transparent !important;
2527
+ }
2528
+ .react-multi-date-picker-travel-calendar-popover .rmdp-day-picker {
2529
+ column-gap: 15px;
2530
+ }
2531
+ .react-multi-date-picker-travel-calendar-popover {
2532
+ /* Navegación flechas */
2533
+ }
2534
+ .react-multi-date-picker-travel-calendar-popover .rmdp-arrow-container {
2535
+ width: var(--tc-nav-size) !important;
2536
+ height: var(--tc-nav-size) !important;
2537
+ border-radius: var(--tc-nav-radius) !important;
2538
+ background-color: var(--tc-nav-bg) !important;
2539
+ color: var(--tc-nav-color) !important;
2540
+ display: flex !important;
2541
+ align-items: center !important;
2542
+ justify-content: center !important;
2543
+ transition: background-color var(--tc-transition), transform 80ms ease;
2544
+ border: none !important;
2545
+ outline: none !important;
2546
+ position: relative;
2547
+ cursor: pointer;
2548
+ box-shadow: none !important;
2549
+ }
2550
+ .react-multi-date-picker-travel-calendar-popover .rmdp-arrow-container .rmdp-arrow {
2551
+ margin-top: 0 !important;
2552
+ border-color: currentColor !important;
2553
+ }
2554
+ .react-multi-date-picker-travel-calendar-popover .travel-calendar-nav-button__icon {
2555
+ font-size: 18px;
2556
+ stroke-width: 2.25;
2557
+ }
2558
+ .react-multi-date-picker-travel-calendar-popover .rmdp-arrow-container:hover:not(.rmdp-disabled) {
2559
+ background-color: var(--tc-nav-bg-hover) !important;
2560
+ }
2561
+ .react-multi-date-picker-travel-calendar-popover .rmdp-arrow-container:active:not(.rmdp-disabled) {
2562
+ background-color: var(--tc-nav-bg-active) !important;
2563
+ transform: translateY(1px);
2564
+ }
2565
+ .react-multi-date-picker-travel-calendar-popover .rmdp-arrow-container.rmdp-disabled {
2566
+ opacity: 0.5;
2567
+ cursor: not-allowed !important;
2568
+ }
2569
+ @media (prefers-contrast: more) {
2570
+ .react-multi-date-picker-travel-calendar-popover .rmdp-arrow-container {
2571
+ outline: 2px solid currentColor;
2572
+ }
2573
+ }
2574
+ .react-multi-date-picker-travel-calendar-popover .rmdp-header-values {
2575
+ color: var(--color-default-900) !important;
2576
+ }
2577
+ .react-multi-date-picker-travel-calendar-popover .rmdp-week-day {
2578
+ font-weight: 500 !important;
2579
+ color: var(--color-default-500) !important;
2580
+ }
2581
+ .react-multi-date-picker-travel-calendar-popover .travel-calendar-day {
2582
+ position: relative;
2583
+ display: flex;
2584
+ flex-direction: column;
2585
+ align-items: center !important;
2586
+ justify-content: center !important;
2587
+ width: var(--tc-day-size);
2588
+ height: var(--tc-day-size);
2589
+ font-size: 12px;
2590
+ line-height: 1;
2591
+ user-select: none;
2592
+ border-radius: var(--tc-radius) !important;
2593
+ transition: background-color var(--tc-transition), color var(--tc-transition), box-shadow var(--tc-transition), opacity var(--tc-transition);
2594
+ }
2595
+ .react-multi-date-picker-travel-calendar-popover .travel-calendar-day--active {
2596
+ cursor: pointer;
2597
+ }
2598
+ .react-multi-date-picker-travel-calendar-popover .travel-calendar-day--active:hover {
2599
+ background-color: transparent !important;
2600
+ }
2601
+ .react-multi-date-picker-travel-calendar-popover .travel-calendar-day--disabled {
2602
+ opacity: 0.6;
2603
+ cursor: not-allowed;
2604
+ }
2605
+ .react-multi-date-picker-travel-calendar-popover .travel-calendar-day--disabled span {
2606
+ text-decoration: line-through !important;
2607
+ }
2608
+ .react-multi-date-picker-travel-calendar-popover .travel-calendar-day--selected {
2609
+ background: var(--tc-bg-selected);
2610
+ font-weight: 600;
2611
+ }
2612
+ .react-multi-date-picker-travel-calendar-popover .travel-calendar-day--today {
2613
+ box-shadow: 0 0 0 1px var(--color-primary);
2614
+ }
2615
+ .react-multi-date-picker-travel-calendar-popover .travel-calendar-day__number {
2616
+ font-size: var(--tc-font-size-number) !important;
2617
+ color: var(--color-default-900) !important;
2618
+ font-weight: 500 !important;
2619
+ margin-bottom: 2px;
2620
+ }
2621
+ .react-multi-date-picker-travel-calendar-popover .travel-calendar-day__price {
2622
+ font-size: var(--tc-font-size-price) !important;
2623
+ color: var(--tc-color-price) !important;
2624
+ font-weight: 500;
2625
+ }
2626
+ .react-multi-date-picker-travel-calendar-popover .rmdp-day,
2627
+ .react-multi-date-picker-travel-calendar-popover .rmdp-week-day {
2628
+ width: var(--tc-day-size) !important;
2629
+ height: var(--tc-day-size) !important;
2630
+ min-height: var(--tc-day-size) !important;
2631
+ max-width: var(--tc-day-size) !important;
2632
+ }
2633
+ .react-multi-date-picker-travel-calendar-popover .rmdp-day span {
2634
+ position: relative !important;
2635
+ left: 0;
2636
+ right: 0;
2637
+ top: 0;
2638
+ }
2639
+ .react-multi-date-picker-travel-calendar-popover .travel-calendar-day__price--empty {
2640
+ color: var(--tc-color-price-empty);
2641
+ }
2642
+ .react-multi-date-picker-travel-calendar-popover {
2643
+ /* Accesibilidad: foco navegable si se usa keyboard nav de librería */
2644
+ }
2645
+ .react-multi-date-picker-travel-calendar-popover .travel-calendar-day:focus-visible {
2646
+ outline: 2px solid #2563eb;
2647
+ outline-offset: 2px;
2648
+ }
2649
+ .react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-selected span:not(.highlight) {
2650
+ background-color: var(--color-primary) !important;
2651
+ color: #fff !important;
2652
+ box-shadow: none !important;
2653
+ }
2654
+ .react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-selected span:not(.highlight) .travel-calendar-day__price {
2655
+ color: #fff !important;
2656
+ }
2657
+ @media (hover: hover) {
2658
+ .react-multi-date-picker-travel-calendar-popover .rmdp-day:not(.rmdp-disabled, .rmdp-day-hidden) span:hover {
2659
+ background-color: var(--color-primary-100) !important;
2660
+ color: var(--color-primary-500) !important;
2661
+ }
2662
+ .react-multi-date-picker-travel-calendar-popover .travel-calendar-day.travel-calendar-day--active:hover span {
2663
+ background-color: var(--color-primary-100) !important;
2664
+ color: var(--color-primary-500) !important;
2665
+ }
2666
+ }
2667
+ .react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-today span {
2668
+ background-color: var(--color-primary-100) !important;
2669
+ color: var(--color-primary-500) !important;
2670
+ }
@@ -10588,7 +10588,7 @@ const CountrySelect = (t0) => {
10588
10588
  }
10589
10589
  let t7;
10590
10590
  if ($[14] !== disabled || $[15] !== t3 || $[16] !== t6) {
10591
- t7 = /* @__PURE__ */ jsxRuntime.jsx(scrollArea.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(button.Button, { type: "button", variant: "flat", className: "flex gap-1 rounded-e-none rounded-s-input border border-input border-r-0 px-3 focus:z-10 h-input-default min-w-auto", disabled, children: [
10591
+ t7 = /* @__PURE__ */ jsxRuntime.jsx(scrollArea.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(button.Button, { type: "button", variant: "flat", className: "flex gap-1 bg-content1 dark:bg-input/30 rounded-e-none rounded-s-input border border-input border-r-0 px-3 focus:z-10 h-input-default min-w-auto", disabled, children: [
10592
10592
  t3,
10593
10593
  t6
10594
10594
  ] }) });