lizaui 12.0.4 → 12.0.7
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/components/travel-calendar/calendar-format.d.ts +9 -2
- package/dist/components/travel-calendar/calendar-format.d.ts.map +1 -1
- package/dist/components/travel-calendar/calendar-travel-form.d.ts +16 -0
- package/dist/components/travel-calendar/calendar-travel-form.d.ts.map +1 -1
- package/dist/components/travel-calendar/hook/use-calendar-dropdown.d.ts +6 -1
- package/dist/components/travel-calendar/hook/use-calendar-dropdown.d.ts.map +1 -1
- package/dist/components/travel-calendar/hook/use-calendar-presets.d.ts +4 -5
- package/dist/components/travel-calendar/hook/use-calendar-presets.d.ts.map +1 -1
- package/dist/components/travel-calendar/hook/use-calendar-pricing.d.ts +25 -4
- package/dist/components/travel-calendar/hook/use-calendar-pricing.d.ts.map +1 -1
- package/dist/components/travel-calendar/hook/use-calendar-value.d.ts +3 -2
- package/dist/components/travel-calendar/hook/use-calendar-value.d.ts.map +1 -1
- package/dist/lizaui.css +161 -49
- package/dist/table/index.cjs.js +54 -2
- package/dist/table/index.cjs.js.map +1 -1
- package/dist/table/index.es.js +53 -1
- package/dist/table/index.es.js.map +1 -1
- package/dist/travel-calendar/index.cjs.js +467 -322
- package/dist/travel-calendar/index.cjs.js.map +1 -1
- package/dist/travel-calendar/index.es.js +467 -322
- package/dist/travel-calendar/index.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/loader-circle-DgmOcU-K.js +0 -59
- package/dist/chunks/loader-circle-DgmOcU-K.js.map +0 -1
- package/dist/chunks/loader-circle-Dxh3rZ7y.js +0 -60
- package/dist/chunks/loader-circle-Dxh3rZ7y.js.map +0 -1
|
@@ -37,8 +37,15 @@ export declare const formatDateString: (date: Date, format: CalendarFormat) => s
|
|
|
37
37
|
* la fecha sin desfases de zona horaria.
|
|
38
38
|
*/
|
|
39
39
|
export declare const formatDisplayDate: (date: Date, format: CalendarFormat) => string;
|
|
40
|
-
/**
|
|
41
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Clave `YYYY-MM-DD` de la fecha CIVIL para comparar/indexar días.
|
|
42
|
+
*
|
|
43
|
+
* - String con fecha al inicio ("2026-06-04", "2026-06-04 06:47:00"): se toma tal cual, sin pasar por `Date`
|
|
44
|
+
* (así "2026-06-04" no se convierte en medianoche UTC y cambia de día según la zona).
|
|
45
|
+
* - `Date`: se leen los campos LOCALES, que es como la construyen el calendario y los atajos
|
|
46
|
+
* (`new Date(y, m, d)`). Con getters UTC, en zonas al este de UTC la medianoche local caía en el día anterior.
|
|
47
|
+
*/
|
|
48
|
+
export declare const formatDateKey: (value: string | Date) => string;
|
|
42
49
|
export declare const startOfDay: (d: Date) => Date;
|
|
43
50
|
export declare const addDays: (d: Date, n: number) => Date;
|
|
44
51
|
export declare const isSameDay: (a?: Date | null, b?: Date | null) => boolean;
|
|
@@ -1 +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;
|
|
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;AAKnG;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,GAAG,IAAI,KAAG,MAYpD,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"}
|
|
@@ -3,6 +3,7 @@ import { DateObject, CalendarProps } from 'react-multi-date-picker';
|
|
|
3
3
|
import { CalendarFormatInput } from './calendar-format';
|
|
4
4
|
import { TravelPrice } from './hook/use-calendar-pricing';
|
|
5
5
|
import { CalendarLang } from './locale';
|
|
6
|
+
export type TravelCalendarRadius = "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "input";
|
|
6
7
|
interface Props extends CalendarProps {
|
|
7
8
|
name: string;
|
|
8
9
|
style?: CSSProperties;
|
|
@@ -24,10 +25,25 @@ interface Props extends CalendarProps {
|
|
|
24
25
|
isClose?: boolean;
|
|
25
26
|
lang?: CalendarLang;
|
|
26
27
|
format?: CalendarFormatInput;
|
|
28
|
+
/**
|
|
29
|
+
* Precios por fecha. Define también qué días se pueden elegir:
|
|
30
|
+
* - `undefined` (por defecto): sin restricción, todos los días habilitados.
|
|
31
|
+
* - Array: solo esas fechas; `[]` = ninguna disponible (se muestra el estado vacío).
|
|
32
|
+
*/
|
|
27
33
|
travelPrices?: TravelPrice[];
|
|
28
34
|
/** Fecha mínima seleccionable, ej. "2026-02-28 06:47:00". Hacia atrás se deshabilitan. null/undefined = sin límite. */
|
|
29
35
|
minSelectableDate?: string | null;
|
|
30
36
|
showActionsButtons?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Resalta en verde el precio más bajo de cada mes (solo si el mes tiene precios distintos).
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
highlightLowestPrice?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Radio de las esquinas del popover del calendario.
|
|
44
|
+
* @default "md"
|
|
45
|
+
*/
|
|
46
|
+
radius?: TravelCalendarRadius;
|
|
31
47
|
readOnly?: boolean;
|
|
32
48
|
disabled?: boolean;
|
|
33
49
|
}
|
|
@@ -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,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,
|
|
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,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,OAAO,CAAC;AAaxF,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;;;;OAIG;IACH,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,uHAAuH;IACvH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;OAGG;IACH,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB,wGA2L9B,CAAC"}
|
|
@@ -5,7 +5,12 @@ interface UseCalendarDropdownProps {
|
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* Maneja la apertura/cierre del popover del calendario y dispara
|
|
8
|
-
* `onOpenCalendar` (vía ref,
|
|
8
|
+
* `onOpenCalendar` (vía ref, siempre la última versión) cada vez que se abre.
|
|
9
|
+
*
|
|
10
|
+
* `onOpenCalendar` se llama en el MISMO evento que abre el popover, no en un
|
|
11
|
+
* efecto posterior: así el `setLoading(true)` del padre entra en el mismo render
|
|
12
|
+
* que la apertura y el primer cuadro ya sale en estado "cargando", sin un
|
|
13
|
+
* parpadeo previo con todos los días habilitados y sin precios.
|
|
9
14
|
*/
|
|
10
15
|
export declare function useCalendarDropdown({ onOpenCalendar, readOnly, disabled }: UseCalendarDropdownProps): {
|
|
11
16
|
isOpen: boolean;
|
|
@@ -1 +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
|
|
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;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,wBAAwB;;;;;EAoBnG"}
|
|
@@ -8,9 +8,8 @@ export interface PresetItem {
|
|
|
8
8
|
}
|
|
9
9
|
interface UseCalendarPresetsProps {
|
|
10
10
|
selectedDate: Date | null;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
hasTravelPrices: boolean;
|
|
11
|
+
/** Misma regla que el calendario: mínimo, fechas con salida y carga en curso. */
|
|
12
|
+
isDateKeySelectable: (key: string) => boolean;
|
|
14
13
|
handleChange?: (selectedDates: DateObject | DateObject[] | null) => void;
|
|
15
14
|
/** Aplica la fecha elegida (refleja en el input y cierra el popover). */
|
|
16
15
|
onSelect: (date: Date) => void;
|
|
@@ -18,9 +17,9 @@ interface UseCalendarPresetsProps {
|
|
|
18
17
|
/**
|
|
19
18
|
* Construye los atajos del calendario ("Hoy", "+7 días", "Navidad", …) y la
|
|
20
19
|
* lógica para saber si cada atajo está activo/deshabilitado y para aplicarlo
|
|
21
|
-
* respetando
|
|
20
|
+
* respetando las fechas seleccionables del calendario.
|
|
22
21
|
*/
|
|
23
|
-
export declare function useCalendarPresets({ selectedDate,
|
|
22
|
+
export declare function useCalendarPresets({ selectedDate, isDateKeySelectable, handleChange, onSelect }: UseCalendarPresetsProps): {
|
|
24
23
|
presets: PresetItem[];
|
|
25
24
|
getPresetState: (preset: PresetItem) => {
|
|
26
25
|
active: boolean;
|
|
@@ -1 +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,
|
|
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,iFAAiF;IACjF,mBAAmB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9C,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,EAAE,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,uBAAuB;;6BA0D9G,UAAU;;;;gCAsBV,UAAU;EA8BpB"}
|
|
@@ -5,24 +5,45 @@ export interface TravelPrice {
|
|
|
5
5
|
priceTravel: number;
|
|
6
6
|
}
|
|
7
7
|
interface UseCalendarPricingProps {
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* `undefined` = sin restricción (todos los días seleccionables, sin precios).
|
|
10
|
+
* Array = solo esas fechas se pueden elegir; `[]` significa que no hay ninguna disponible.
|
|
11
|
+
*/
|
|
12
|
+
travelPrices: TravelPrice[] | undefined;
|
|
9
13
|
/** Fecha mínima seleccionable, ej. "2026-02-28 06:47:00". null/undefined = sin límite. */
|
|
10
14
|
minSelectableDate: string | null;
|
|
15
|
+
/** Los precios se están consultando: los días no se pueden elegir y el precio se muestra como skeleton. */
|
|
16
|
+
loading: boolean;
|
|
17
|
+
/** Resalta en verde el precio más bajo de cada mes. */
|
|
18
|
+
highlightLowestPrice: boolean;
|
|
11
19
|
normalizedFormat: CalendarFormat;
|
|
12
20
|
lang: CalendarLang;
|
|
13
21
|
}
|
|
14
22
|
/**
|
|
15
23
|
* Deriva, a partir de `travelPrices` y `minSelectableDate`, las estructuras
|
|
16
24
|
* necesarias para pintar el calendario: el set de fechas habilitadas, la clave
|
|
17
|
-
* de fecha mínima y el `mapDays` que renderiza
|
|
25
|
+
* de fecha mínima, si una fecha se puede elegir y el `mapDays` que renderiza
|
|
26
|
+
* cada día con su precio/estado.
|
|
27
|
+
*
|
|
28
|
+
* Cada día tiene SIEMPRE la misma estructura (número + hueco de precio de alto
|
|
29
|
+
* fijo), cargue o no, tenga precio o no: así la llegada de los precios no mueve
|
|
30
|
+
* nada (sin layout shift).
|
|
18
31
|
*/
|
|
19
|
-
export declare function useCalendarPricing({ travelPrices, minSelectableDate, normalizedFormat, lang }: UseCalendarPricingProps): {
|
|
32
|
+
export declare function useCalendarPricing({ travelPrices, minSelectableDate, loading, highlightLowestPrice, normalizedFormat, lang, }: UseCalendarPricingProps): {
|
|
20
33
|
enabledDatesSet: Set<string>;
|
|
34
|
+
isRestricted: boolean;
|
|
35
|
+
isEmpty: boolean;
|
|
21
36
|
minDateKey: string | null;
|
|
37
|
+
isDateKeyAllowed: (key: string) => boolean;
|
|
38
|
+
isDateKeySelectable: (key: string) => boolean;
|
|
22
39
|
mapDays: ({ date, today, selectedDate, isSameDate }: any) => {
|
|
40
|
+
children: import("react").JSX.Element;
|
|
41
|
+
"aria-label": any;
|
|
23
42
|
disabled: boolean;
|
|
24
|
-
|
|
43
|
+
} | {
|
|
25
44
|
children: import("react").JSX.Element;
|
|
45
|
+
title: any;
|
|
46
|
+
disabled: boolean;
|
|
26
47
|
};
|
|
27
48
|
};
|
|
28
49
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-calendar-pricing.d.ts","sourceRoot":"","sources":["../../../../src/components/travel-calendar/hook/use-calendar-pricing.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-calendar-pricing.d.ts","sourceRoot":"","sources":["../../../../src/components/travel-calendar/hook/use-calendar-pricing.tsx"],"names":[],"mappings":"AACA,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;;;OAGG;IACH,YAAY,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC;IACxC,0FAA0F;IAC1F,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,2GAA2G;IAC3G,OAAO,EAAE,OAAO,CAAC;IACjB,uDAAuD;IACvD,oBAAoB,EAAE,OAAO,CAAC;IAC9B,gBAAgB,EAAE,cAAc,CAAC;IACjC,IAAI,EAAE,YAAY,CAAC;CACnB;AAOD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,EAClC,YAAY,EACZ,iBAAiB,EACjB,OAAO,EACP,oBAAoB,EACpB,gBAAgB,EAChB,IAAI,GACJ,EAAE,uBAAuB;;;;;4BA8DlB,MAAM;+BAUiC,MAAM;yDAOP,GAAG;;;;;;;;;EAwDhD"}
|
|
@@ -3,7 +3,8 @@ import { CalendarFormat } from '../calendar-format';
|
|
|
3
3
|
interface UseCalendarValueProps {
|
|
4
4
|
value: unknown;
|
|
5
5
|
normalizedFormat: CalendarFormat;
|
|
6
|
-
|
|
6
|
+
/** Lo que se escribe tampoco puede saltarse el mínimo ni las fechas sin salida (la carga en curso no bloquea escribir). */
|
|
7
|
+
isDateKeyAllowed: (key: string) => boolean;
|
|
7
8
|
handleChange?: (selectedDates: DateObject | DateObject[] | null) => void;
|
|
8
9
|
/** Se invoca tras elegir una fecha en el calendario (p.ej. para cerrar el popover). */
|
|
9
10
|
onClose: () => void;
|
|
@@ -13,7 +14,7 @@ interface UseCalendarValueProps {
|
|
|
13
14
|
* (`inputDraft`), lo sincroniza con el `value` controlado, deriva la fecha
|
|
14
15
|
* seleccionada y expone los manejadores de escritura/selección.
|
|
15
16
|
*/
|
|
16
|
-
export declare function useCalendarValue({ value, normalizedFormat,
|
|
17
|
+
export declare function useCalendarValue({ value, normalizedFormat, isDateKeyAllowed, handleChange, onClose }: UseCalendarValueProps): {
|
|
17
18
|
inputRef: import('react').RefObject<HTMLInputElement | null>;
|
|
18
19
|
valueInput: string;
|
|
19
20
|
selectedDate: Date | null;
|
|
@@ -1 +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,
|
|
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,2HAA2H;IAC3H,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAC3C,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,gBAAgB,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,qBAAqB;;;;2BA+BtH,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC;8BA6BnC,UAAU,GAAG,UAAU,EAAE,GAAG,IAAI;wBAtC7B,IAAI;;EAqDZ"}
|
package/dist/lizaui.css
CHANGED
|
@@ -2475,10 +2475,13 @@
|
|
|
2475
2475
|
|
|
2476
2476
|
:root {
|
|
2477
2477
|
--tc-day-size: 45px;
|
|
2478
|
-
--tc-font-size-number:
|
|
2479
|
-
--tc-font-size-price:
|
|
2480
|
-
|
|
2478
|
+
--tc-font-size-number: 13px;
|
|
2479
|
+
--tc-font-size-price: 10px;
|
|
2480
|
+
/* Alto fijo del hueco de precio: igual con precio, sin precio o cargando (evita layout shift). */
|
|
2481
|
+
--tc-price-height: 10px;
|
|
2482
|
+
--tc-color-price: var(--color-default-500, #6b7280);
|
|
2481
2483
|
--tc-color-price-empty: #9ca3af;
|
|
2484
|
+
--tc-color-price-lowest: var(--color-success-600, #16a34a);
|
|
2482
2485
|
--tc-bg-selected: rgba(59, 130, 246, 0.2);
|
|
2483
2486
|
--tc-radius: 50%;
|
|
2484
2487
|
--tc-transition: 120ms ease-in-out;
|
|
@@ -2541,102 +2544,211 @@
|
|
|
2541
2544
|
outline: 2px solid currentColor;
|
|
2542
2545
|
}
|
|
2543
2546
|
}
|
|
2547
|
+
.react-multi-date-picker-travel-calendar-popover {
|
|
2548
|
+
/* ------------------------------------------------------------ cabeceras */
|
|
2549
|
+
/* Solo el estilo del texto: la posición del título y de las flechas no cambia. */
|
|
2550
|
+
}
|
|
2544
2551
|
.react-multi-date-picker-travel-calendar-popover .rmdp-header-values {
|
|
2545
|
-
|
|
2552
|
+
font-size: 14px;
|
|
2553
|
+
font-weight: 600;
|
|
2554
|
+
color: var(--color-foreground, #11181c) !important;
|
|
2555
|
+
/* La librería separa cada parte con padding-left: 5px; el espacio del separador basta ("Junio 2026"). */
|
|
2556
|
+
}
|
|
2557
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-header-values span {
|
|
2558
|
+
padding: 0 !important;
|
|
2546
2559
|
}
|
|
2547
2560
|
.react-multi-date-picker-travel-calendar-popover .rmdp-week-day {
|
|
2561
|
+
font-size: 12px !important;
|
|
2548
2562
|
font-weight: 500 !important;
|
|
2549
2563
|
color: var(--color-default-500) !important;
|
|
2550
2564
|
}
|
|
2565
|
+
.react-multi-date-picker-travel-calendar-popover {
|
|
2566
|
+
/* ------------------------------------------------------------------ días */
|
|
2567
|
+
}
|
|
2568
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day,
|
|
2569
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-week-day {
|
|
2570
|
+
width: var(--tc-day-size) !important;
|
|
2571
|
+
height: var(--tc-day-size) !important;
|
|
2572
|
+
min-height: var(--tc-day-size) !important;
|
|
2573
|
+
max-width: var(--tc-day-size) !important;
|
|
2574
|
+
}
|
|
2575
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day span {
|
|
2576
|
+
position: relative !important;
|
|
2577
|
+
left: 0;
|
|
2578
|
+
right: 0;
|
|
2579
|
+
top: 0;
|
|
2580
|
+
}
|
|
2551
2581
|
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day {
|
|
2552
2582
|
position: relative;
|
|
2553
2583
|
display: flex;
|
|
2554
2584
|
flex-direction: column;
|
|
2555
2585
|
align-items: center !important;
|
|
2556
2586
|
justify-content: center !important;
|
|
2587
|
+
gap: 2px;
|
|
2557
2588
|
width: var(--tc-day-size);
|
|
2558
2589
|
height: var(--tc-day-size);
|
|
2559
|
-
font-size: 12px;
|
|
2560
2590
|
line-height: 1;
|
|
2561
2591
|
user-select: none;
|
|
2562
2592
|
border-radius: var(--tc-radius) !important;
|
|
2563
|
-
transition: background-color var(--tc-transition), color var(--tc-transition),
|
|
2593
|
+
transition: background-color var(--tc-transition), color var(--tc-transition), opacity var(--tc-transition);
|
|
2594
|
+
}
|
|
2595
|
+
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day__number {
|
|
2596
|
+
font-size: var(--tc-font-size-number) !important;
|
|
2597
|
+
font-weight: 600 !important;
|
|
2598
|
+
color: var(--color-default-900) !important;
|
|
2599
|
+
font-variant-numeric: tabular-nums;
|
|
2600
|
+
}
|
|
2601
|
+
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day__price {
|
|
2602
|
+
display: block;
|
|
2603
|
+
height: var(--tc-price-height);
|
|
2604
|
+
line-height: var(--tc-price-height);
|
|
2605
|
+
font-size: var(--tc-font-size-price) !important;
|
|
2606
|
+
font-weight: 500;
|
|
2607
|
+
color: var(--tc-color-price) !important;
|
|
2608
|
+
font-variant-numeric: tabular-nums;
|
|
2609
|
+
white-space: nowrap;
|
|
2610
|
+
}
|
|
2611
|
+
.react-multi-date-picker-travel-calendar-popover {
|
|
2612
|
+
/* El precio aparece con un fundido corto cuando llega (sin mover nada). */
|
|
2613
|
+
}
|
|
2614
|
+
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day__price:not(.travel-calendar-day__price--loading, .travel-calendar-day__price--empty) {
|
|
2615
|
+
animation: tc-price-in 180ms ease-out;
|
|
2616
|
+
}
|
|
2617
|
+
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day__price--empty {
|
|
2618
|
+
color: var(--tc-color-price-empty);
|
|
2619
|
+
}
|
|
2620
|
+
.react-multi-date-picker-travel-calendar-popover {
|
|
2621
|
+
/* Precio más bajo del mes (solo cuando el mes tiene precios distintos). */
|
|
2622
|
+
}
|
|
2623
|
+
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day__price--lowest {
|
|
2624
|
+
color: var(--tc-color-price-lowest) !important;
|
|
2625
|
+
font-weight: 700;
|
|
2626
|
+
}
|
|
2627
|
+
.react-multi-date-picker-travel-calendar-popover {
|
|
2628
|
+
/* Skeleton del precio mientras se consulta la API. */
|
|
2629
|
+
}
|
|
2630
|
+
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day__price--loading {
|
|
2631
|
+
width: 22px;
|
|
2632
|
+
height: 6px;
|
|
2633
|
+
margin-block: 2px;
|
|
2634
|
+
border-radius: 9999px;
|
|
2635
|
+
background-color: var(--color-default-200);
|
|
2636
|
+
animation: tc-skeleton-pulse 1.2s ease-in-out infinite;
|
|
2564
2637
|
}
|
|
2565
2638
|
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day--active {
|
|
2566
2639
|
cursor: pointer;
|
|
2567
2640
|
}
|
|
2568
|
-
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day--
|
|
2569
|
-
|
|
2641
|
+
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day--loading {
|
|
2642
|
+
cursor: progress;
|
|
2643
|
+
}
|
|
2644
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-disabled:has(.travel-calendar-day--loading) {
|
|
2645
|
+
cursor: progress;
|
|
2646
|
+
}
|
|
2647
|
+
.react-multi-date-picker-travel-calendar-popover {
|
|
2648
|
+
/* Sin salida: solo atenuado, sin tachar (son la mayoría y el tachado tapaba los días con precio). */
|
|
2570
2649
|
}
|
|
2571
2650
|
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day--disabled {
|
|
2572
|
-
opacity: 0.6;
|
|
2573
2651
|
cursor: not-allowed;
|
|
2574
2652
|
}
|
|
2575
|
-
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day--disabled
|
|
2576
|
-
|
|
2653
|
+
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day--disabled .travel-calendar-day__number {
|
|
2654
|
+
color: var(--color-default-300) !important;
|
|
2655
|
+
font-weight: 500 !important;
|
|
2577
2656
|
}
|
|
2578
|
-
.react-multi-date-picker-travel-calendar-popover
|
|
2579
|
-
|
|
2580
|
-
font-weight: 600;
|
|
2657
|
+
.react-multi-date-picker-travel-calendar-popover {
|
|
2658
|
+
/* Antes de la fecha mínima: aquí sí se tacha, porque no es "sin salida" sino "no permitido". */
|
|
2581
2659
|
}
|
|
2582
|
-
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day--
|
|
2583
|
-
|
|
2660
|
+
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day--before-min .travel-calendar-day__number {
|
|
2661
|
+
text-decoration: line-through;
|
|
2584
2662
|
}
|
|
2585
|
-
.react-multi-date-picker-travel-calendar-popover
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2663
|
+
.react-multi-date-picker-travel-calendar-popover {
|
|
2664
|
+
/*
|
|
2665
|
+
* Días del otro mes (showOtherDays): referencia visual, sin precio ni selección (en doble vista se duplicaban).
|
|
2666
|
+
* Se usa la clase de la librería porque es correcta por mes; el `currentMonth` de mapDays es siempre el primero.
|
|
2667
|
+
*/
|
|
2590
2668
|
}
|
|
2591
|
-
.react-multi-date-picker-travel-calendar-popover .
|
|
2592
|
-
|
|
2593
|
-
color: var(--tc-color-price) !important;
|
|
2594
|
-
font-weight: 500;
|
|
2669
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-deactive {
|
|
2670
|
+
pointer-events: none;
|
|
2595
2671
|
}
|
|
2596
|
-
.react-multi-date-picker-travel-calendar-popover .rmdp-day
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
min-height: var(--tc-day-size) !important;
|
|
2601
|
-
max-width: var(--tc-day-size) !important;
|
|
2672
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-deactive .travel-calendar-day__number {
|
|
2673
|
+
color: var(--color-default-300) !important;
|
|
2674
|
+
font-weight: 400 !important;
|
|
2675
|
+
text-decoration: none;
|
|
2602
2676
|
}
|
|
2603
|
-
.react-multi-date-picker-travel-calendar-popover .rmdp-day
|
|
2604
|
-
|
|
2605
|
-
left: 0;
|
|
2606
|
-
right: 0;
|
|
2607
|
-
top: 0;
|
|
2677
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-deactive .travel-calendar-day__price {
|
|
2678
|
+
visibility: hidden;
|
|
2608
2679
|
}
|
|
2609
|
-
.react-multi-date-picker-travel-calendar-popover .
|
|
2610
|
-
|
|
2680
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-deactive span,
|
|
2681
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-deactive.rmdp-selected span,
|
|
2682
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-deactive.rmdp-today span {
|
|
2683
|
+
background-color: transparent !important;
|
|
2684
|
+
box-shadow: none !important;
|
|
2611
2685
|
}
|
|
2612
2686
|
.react-multi-date-picker-travel-calendar-popover {
|
|
2613
2687
|
/* Accesibilidad: foco navegable si se usa keyboard nav de librería */
|
|
2614
2688
|
}
|
|
2615
2689
|
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day:focus-visible {
|
|
2616
|
-
outline: 2px solid
|
|
2690
|
+
outline: 2px solid var(--color-primary);
|
|
2617
2691
|
outline-offset: 2px;
|
|
2618
2692
|
}
|
|
2619
|
-
.react-multi-date-picker-travel-calendar-popover
|
|
2693
|
+
.react-multi-date-picker-travel-calendar-popover {
|
|
2694
|
+
/*
|
|
2695
|
+
* Hoy: fondo suave y número en primario, como HeroUI (sin aro). Si hoy no tiene salida, solo el número.
|
|
2696
|
+
* El número usa la clase propia: la librería no marca `rmdp-today` en un día deshabilitado.
|
|
2697
|
+
*/
|
|
2698
|
+
}
|
|
2699
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day:not(.rmdp-deactive) .travel-calendar-day--today .travel-calendar-day__number {
|
|
2700
|
+
color: var(--color-primary) !important;
|
|
2701
|
+
}
|
|
2702
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-today:not(.rmdp-disabled, .rmdp-deactive) span {
|
|
2703
|
+
background-color: var(--color-primary-100) !important;
|
|
2704
|
+
}
|
|
2705
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-today.rmdp-disabled:not(.rmdp-deactive) span {
|
|
2706
|
+
background-color: transparent !important;
|
|
2707
|
+
}
|
|
2708
|
+
.react-multi-date-picker-travel-calendar-popover {
|
|
2709
|
+
/* Seleccionado */
|
|
2710
|
+
}
|
|
2711
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-selected:not(.rmdp-deactive) span:not(.highlight) {
|
|
2620
2712
|
background-color: var(--color-primary) !important;
|
|
2621
2713
|
color: #fff !important;
|
|
2622
2714
|
box-shadow: none !important;
|
|
2623
2715
|
}
|
|
2624
|
-
.react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-selected span:not(.highlight) .travel-calendar-
|
|
2716
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-selected:not(.rmdp-deactive) span:not(.highlight) .travel-calendar-day__number {
|
|
2625
2717
|
color: #fff !important;
|
|
2626
2718
|
}
|
|
2719
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day.rmdp-selected:not(.rmdp-deactive) span:not(.highlight) .travel-calendar-day__price {
|
|
2720
|
+
color: rgba(255, 255, 255, 0.85) !important;
|
|
2721
|
+
}
|
|
2627
2722
|
@media (hover: hover) {
|
|
2628
|
-
.react-multi-date-picker-travel-calendar-popover .rmdp-day:not(.rmdp-disabled, .rmdp-day-hidden) span:hover {
|
|
2723
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day:not(.rmdp-disabled, .rmdp-day-hidden, .rmdp-selected) span:hover {
|
|
2629
2724
|
background-color: var(--color-primary-100) !important;
|
|
2630
|
-
color: var(--color-primary-500) !important;
|
|
2631
2725
|
}
|
|
2632
|
-
.react-multi-date-picker-travel-calendar-popover .
|
|
2633
|
-
|
|
2634
|
-
color: var(--color-primary-500) !important;
|
|
2726
|
+
.react-multi-date-picker-travel-calendar-popover .rmdp-day:not(.rmdp-disabled, .rmdp-day-hidden, .rmdp-selected) span:hover .travel-calendar-day__number {
|
|
2727
|
+
color: var(--color-primary) !important;
|
|
2635
2728
|
}
|
|
2636
2729
|
}
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2730
|
+
|
|
2731
|
+
@keyframes tc-skeleton-pulse {
|
|
2732
|
+
0%, 100% {
|
|
2733
|
+
opacity: 1;
|
|
2734
|
+
}
|
|
2735
|
+
50% {
|
|
2736
|
+
opacity: 0.45;
|
|
2737
|
+
}
|
|
2738
|
+
}
|
|
2739
|
+
@keyframes tc-price-in {
|
|
2740
|
+
from {
|
|
2741
|
+
opacity: 0;
|
|
2742
|
+
}
|
|
2743
|
+
to {
|
|
2744
|
+
opacity: 1;
|
|
2745
|
+
}
|
|
2746
|
+
}
|
|
2747
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2748
|
+
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day__price,
|
|
2749
|
+
.react-multi-date-picker-travel-calendar-popover .travel-calendar-day__price--loading {
|
|
2750
|
+
animation: none !important;
|
|
2751
|
+
}
|
|
2640
2752
|
}.table__container_main {
|
|
2641
2753
|
}
|
|
2642
2754
|
|
package/dist/table/index.cjs.js
CHANGED
|
@@ -4,12 +4,64 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const compilerRuntime = require("react/compiler-runtime");
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const tailwindMerge = require("tailwind-merge");
|
|
7
|
-
const loaderCircle = require("../chunks/loader-circle-DgmOcU-K.js");
|
|
8
7
|
const checkbox = require("../chunks/checkbox-BM8KELqq.js");
|
|
9
8
|
const clsx = require("clsx");
|
|
10
9
|
const tooltip = require("../chunks/tooltip-CkpPQC4G.js");
|
|
11
10
|
const chevronUp = require("../chunks/chevron-up-D8XaBFJG.js");
|
|
12
11
|
const chevronsUpDown = require("../chunks/chevrons-up-down-BEtKEloL.js");
|
|
12
|
+
const colorMap = {
|
|
13
|
+
default: "var(--color-default-default)",
|
|
14
|
+
primary: "var(--color-primary-default)",
|
|
15
|
+
danger: "var(--color-danger-default)",
|
|
16
|
+
success: "var(--color-success-default)",
|
|
17
|
+
warning: "var(--color-warning-default)",
|
|
18
|
+
secondary: "var(--color-secondary-default)"
|
|
19
|
+
};
|
|
20
|
+
const LoaderCircle = (t0) => {
|
|
21
|
+
const $ = compilerRuntime.c(7);
|
|
22
|
+
const {
|
|
23
|
+
size: t1,
|
|
24
|
+
color: t2,
|
|
25
|
+
borderWidth: t3
|
|
26
|
+
} = t0;
|
|
27
|
+
const size = t1 === void 0 ? 44 : t1;
|
|
28
|
+
const color = t2 === void 0 ? "primary" : t2;
|
|
29
|
+
const borderWidth = t3 === void 0 ? 2 : t3;
|
|
30
|
+
const colorValue = colorMap[color] ?? colorMap.default;
|
|
31
|
+
const t4 = `${size}px`;
|
|
32
|
+
const t5 = `${borderWidth}px`;
|
|
33
|
+
let t6;
|
|
34
|
+
if ($[0] !== colorValue || $[1] !== t4 || $[2] !== t5) {
|
|
35
|
+
t6 = {
|
|
36
|
+
"--size-loading-circle": t4,
|
|
37
|
+
"--color-loading-circle": colorValue,
|
|
38
|
+
"--border-width-loading-circle": t5
|
|
39
|
+
};
|
|
40
|
+
$[0] = colorValue;
|
|
41
|
+
$[1] = t4;
|
|
42
|
+
$[2] = t5;
|
|
43
|
+
$[3] = t6;
|
|
44
|
+
} else {
|
|
45
|
+
t6 = $[3];
|
|
46
|
+
}
|
|
47
|
+
const style = t6;
|
|
48
|
+
let t7;
|
|
49
|
+
if ($[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
50
|
+
t7 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "loading-circle-app-div", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "loading-circle-app" }) });
|
|
51
|
+
$[4] = t7;
|
|
52
|
+
} else {
|
|
53
|
+
t7 = $[4];
|
|
54
|
+
}
|
|
55
|
+
let t8;
|
|
56
|
+
if ($[5] !== style) {
|
|
57
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container-loading-circle", style, children: t7 });
|
|
58
|
+
$[5] = style;
|
|
59
|
+
$[6] = t8;
|
|
60
|
+
} else {
|
|
61
|
+
t8 = $[6];
|
|
62
|
+
}
|
|
63
|
+
return t8;
|
|
64
|
+
};
|
|
13
65
|
const initialValues = {
|
|
14
66
|
color: "primary",
|
|
15
67
|
disabledKeys: [],
|
|
@@ -202,7 +254,7 @@ function TableBodyComponent(t0) {
|
|
|
202
254
|
if (isLoading) {
|
|
203
255
|
let t82;
|
|
204
256
|
if ($[28] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
205
|
-
t82 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3.5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
257
|
+
t82 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3.5", children: /* @__PURE__ */ jsxRuntime.jsx(LoaderCircle, { size: 45 }) });
|
|
206
258
|
$[28] = t82;
|
|
207
259
|
} else {
|
|
208
260
|
t82 = $[28];
|