bord-design-system 0.0.51 → 0.0.52
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/BordDatePicker/BordDatePicker.constants.d.ts +7 -0
- package/dist/components/BordDatePicker/BordDatePicker.constants.d.ts.map +1 -0
- package/dist/components/BordDatePicker/BordDatePicker.d.ts +5 -1
- package/dist/components/BordDatePicker/BordDatePicker.d.ts.map +1 -1
- package/dist/components/BordDatePicker/BordDatePicker.types.d.ts +24 -0
- package/dist/components/BordDatePicker/BordDatePicker.types.d.ts.map +1 -1
- package/dist/components/BordDatePicker/components/BordDatePickerCalendar/BordDatePickerCalendar.d.ts +9 -0
- package/dist/components/BordDatePicker/components/BordDatePickerCalendar/BordDatePickerCalendar.d.ts.map +1 -0
- package/dist/components/BordDatePicker/components/BordDatePickerCalendar/BordDatePickerCalendar.types.d.ts +4 -0
- package/dist/components/BordDatePicker/components/BordDatePickerCalendar/BordDatePickerCalendar.types.d.ts.map +1 -0
- package/dist/components/BordDatePicker/components/BordDatePickerMonthGrid/BordDatePickerMonthGrid.d.ts +9 -0
- package/dist/components/BordDatePicker/components/BordDatePickerMonthGrid/BordDatePickerMonthGrid.d.ts.map +1 -0
- package/dist/components/BordDatePicker/components/BordDatePickerMonthGrid/BordDatePickerMonthGrid.types.d.ts +22 -0
- package/dist/components/BordDatePicker/components/BordDatePickerMonthGrid/BordDatePickerMonthGrid.types.d.ts.map +1 -0
- package/dist/components/BordDatePicker/components/BordDatePickerTrigger/BordDatePickerTrigger.d.ts +9 -0
- package/dist/components/BordDatePicker/components/BordDatePickerTrigger/BordDatePickerTrigger.d.ts.map +1 -0
- package/dist/components/BordDatePicker/components/BordDatePickerTrigger/BordDatePickerTrigger.types.d.ts +28 -0
- package/dist/components/BordDatePicker/components/BordDatePickerTrigger/BordDatePickerTrigger.types.d.ts.map +1 -0
- package/dist/hooks/useDatePickerSelection.d.ts +18 -0
- package/dist/hooks/useDatePickerSelection.d.ts.map +1 -0
- package/dist/index.d.ts +37 -2
- package/dist/index.esm.js +590 -137
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +589 -136
- package/dist/index.js.map +1 -1
- package/dist/index.webpack.js +590 -137
- package/dist/index.webpack.js.map +1 -1
- package/dist/types/global.types.d.ts +7 -0
- package/dist/types/global.types.d.ts.map +1 -1
- package/dist/utils/formatDatesAndHours.d.ts +60 -0
- package/dist/utils/formatDatesAndHours.d.ts.map +1 -1
- package/dist/utils/formatDatesAndHours.test.d.ts +2 -0
- package/dist/utils/formatDatesAndHours.test.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IBordDatePickerAriaLabels } from './BordDatePicker.types';
|
|
2
|
+
/**
|
|
3
|
+
* Devuelve los textos para lectores de pantalla del calendario según el locale.
|
|
4
|
+
* Cualquier locale que empiece con "en" usa inglés; el resto, español.
|
|
5
|
+
*/
|
|
6
|
+
export declare const getDatePickerAriaLabels: (locale: string) => IBordDatePickerAriaLabels;
|
|
7
|
+
//# sourceMappingURL=BordDatePicker.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BordDatePicker.constants.d.ts","sourceRoot":"","sources":["../../../src/components/BordDatePicker/BordDatePicker.constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAcxE;;;GAGG;AACH,eAAO,MAAM,uBAAuB,WAAY,MAAM,KAAG,yBAC0B,CAAC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { IBordDatePickerProps } from "./BordDatePicker.types";
|
|
2
2
|
import "./BordDatePicker.scss";
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Selector de fecha del DS. Con `variant="native"` (default) usa el input de tipo date del navegador;
|
|
5
|
+
* con `variant="calendar"` abre un calendario custom. Ambas variantes emiten un datetime ISO en UTC.
|
|
6
|
+
*/
|
|
7
|
+
declare const BordDatePicker: ({ variant, debounceTime, ...props }: IBordDatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
8
|
export default BordDatePicker;
|
|
5
9
|
//# sourceMappingURL=BordDatePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BordDatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/BordDatePicker/BordDatePicker.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"BordDatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/BordDatePicker/BordDatePicker.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAO9D,OAAO,uBAAuB,CAAC;AA8F/B;;;GAGG;AACH,QAAA,MAAM,cAAc,wCAAoD,oBAAoB,4CAG3F,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/** Variante visual del date picker: input nativo del navegador o calendario custom del DS. */
|
|
2
|
+
export type TBordDatePickerVariant = 'native' | 'calendar';
|
|
3
|
+
/** Textos para lectores de pantalla de la variante `calendar`, localizados según `locale`. */
|
|
4
|
+
export interface IBordDatePickerAriaLabels {
|
|
5
|
+
dialog: string;
|
|
6
|
+
previousMonth: string;
|
|
7
|
+
nextMonth: string;
|
|
8
|
+
}
|
|
1
9
|
export interface IBordDatePickerProps {
|
|
2
10
|
updateCurrentValueCallback: (inputText: string) => void;
|
|
3
11
|
isFilled: boolean;
|
|
@@ -10,5 +18,21 @@ export interface IBordDatePickerProps {
|
|
|
10
18
|
debounceTime?: number;
|
|
11
19
|
customWidth?: string;
|
|
12
20
|
handleFocus?: () => void;
|
|
21
|
+
/** Variante del picker. Default `'native'` (input de tipo date). */
|
|
22
|
+
variant?: TBordDatePickerVariant;
|
|
23
|
+
/** Solo variante `calendar`: texto cuando no hay fecha seleccionada. Default `'dd/mm/aaaa'`. */
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
/** Solo variante `calendar`: locale para nombres de meses y días (ej. `'es'`, `'en'`). Default `'es'`. */
|
|
26
|
+
locale?: string;
|
|
27
|
+
/** Solo variante `calendar`: valor controlado (datetime ISO). Un string vacío limpia la selección. */
|
|
28
|
+
value?: string;
|
|
29
|
+
/** Solo variante `calendar`: se ejecuta cada vez que el calendario se abre o se cierra. */
|
|
30
|
+
onCalendarOpen?: (isOpen: boolean) => void;
|
|
31
|
+
/** Solo variante `calendar`: primera fecha seleccionable, en formato `yyyy-LL-dd`. */
|
|
32
|
+
minDate?: string;
|
|
33
|
+
/** Solo variante `calendar`: última fecha seleccionable, en formato `yyyy-LL-dd`. */
|
|
34
|
+
maxDate?: string;
|
|
35
|
+
/** Solo variante `calendar`: permite deshabilitar días puntuales. Recibe la fecha en formato `yyyy-LL-dd`. */
|
|
36
|
+
isDateDisabled?: (simpleDate: string) => boolean;
|
|
13
37
|
}
|
|
14
38
|
//# sourceMappingURL=BordDatePicker.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BordDatePicker.types.d.ts","sourceRoot":"","sources":["../../../src/components/BordDatePicker/BordDatePicker.types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,oBAAoB;IACnC,0BAA0B,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"BordDatePicker.types.d.ts","sourceRoot":"","sources":["../../../src/components/BordDatePicker/BordDatePicker.types.ts"],"names":[],"mappings":"AAEA,8FAA8F;AAC9F,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE3D,8FAA8F;AAC9F,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,0BAA0B,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,oEAAoE;IACpE,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,gGAAgG;IAChG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0GAA0G;IAC1G,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sGAAsG;IACtG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2FAA2F;IAC3F,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,sFAAsF;IACtF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8GAA8G;IAC9G,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;CAClD"}
|
package/dist/components/BordDatePicker/components/BordDatePickerCalendar/BordDatePickerCalendar.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IBordDatePickerCalendarProps } from './BordDatePickerCalendar.types';
|
|
2
|
+
import './BordDatePickerCalendar.scss';
|
|
3
|
+
/**
|
|
4
|
+
* Variante `calendar` de BordDatePicker: trigger con ícono a la izquierda que abre un calendario custom en un popover.
|
|
5
|
+
* Emite el mismo formato que la variante nativa: datetime ISO en UTC a las 13:00 de la zona indicada.
|
|
6
|
+
*/
|
|
7
|
+
declare const BordDatePickerCalendar: ({ updateCurrentValueCallback, isFilled, defaultValue, value, desiredTimeZone, label, placeholder, locale, errorText, isDisabled, hideErrorText, handleFocus, onCalendarOpen, customWidth, minDate, maxDate, isDateDisabled, }: IBordDatePickerCalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default BordDatePickerCalendar;
|
|
9
|
+
//# sourceMappingURL=BordDatePickerCalendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BordDatePickerCalendar.d.ts","sourceRoot":"","sources":["../../../../../src/components/BordDatePicker/components/BordDatePickerCalendar/BordDatePickerCalendar.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAEnF,OAAO,+BAA+B,CAAC;AAIvC;;;GAGG;AACH,QAAA,MAAM,sBAAsB,kOAkBzB,4BAA4B,4CA2F9B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IBordDatePickerProps } from '../../BordDatePicker.types';
|
|
2
|
+
/** Props de la variante `calendar`: todas las de BordDatePicker salvo las que solo aplican al input nativo. */
|
|
3
|
+
export type IBordDatePickerCalendarProps = Omit<IBordDatePickerProps, 'variant' | 'debounceTime'>;
|
|
4
|
+
//# sourceMappingURL=BordDatePickerCalendar.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BordDatePickerCalendar.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/BordDatePicker/components/BordDatePickerCalendar/BordDatePickerCalendar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,+GAA+G;AAC/G,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAAC,oBAAoB,EAAE,SAAS,GAAG,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IBordDatePickerMonthGridProps } from './BordDatePickerMonthGrid.types';
|
|
2
|
+
import './BordDatePickerMonthGrid.scss';
|
|
3
|
+
/**
|
|
4
|
+
* Grilla mensual del calendario de BordDatePicker: header con mes y flechas, y una grilla accesible
|
|
5
|
+
* (fila de días de la semana + 6 filas de semanas). Soporta navegación con teclado y días deshabilitados.
|
|
6
|
+
*/
|
|
7
|
+
declare const BordDatePickerMonthGrid: ({ visibleMonth, selectedDate, locale, minDate, maxDate, isDateDisabled, activeDayRef, onSelectDate, onChangeVisibleMonth, }: IBordDatePickerMonthGridProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default BordDatePickerMonthGrid;
|
|
9
|
+
//# sourceMappingURL=BordDatePickerMonthGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BordDatePickerMonthGrid.d.ts","sourceRoot":"","sources":["../../../../../src/components/BordDatePicker/components/BordDatePickerMonthGrid/BordDatePickerMonthGrid.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAErF,OAAO,gCAAgC,CAAC;AAWxC;;;GAGG;AACH,QAAA,MAAM,uBAAuB,gIAU1B,6BAA6B,4CA6J/B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { MutableRefObject } from 'react';
|
|
2
|
+
export interface IBordDatePickerMonthGridProps {
|
|
3
|
+
/** Cualquier fecha del mes visible, en formato `yyyy-LL-dd`. */
|
|
4
|
+
visibleMonth: string;
|
|
5
|
+
/** Fecha seleccionada en formato `yyyy-LL-dd`, o string vacío si no hay selección. */
|
|
6
|
+
selectedDate: string;
|
|
7
|
+
/** Locale para nombres de meses, días y textos de lectores de pantalla. */
|
|
8
|
+
locale: string;
|
|
9
|
+
/** Primera fecha seleccionable, en formato `yyyy-LL-dd`. */
|
|
10
|
+
minDate?: string;
|
|
11
|
+
/** Última fecha seleccionable, en formato `yyyy-LL-dd`. */
|
|
12
|
+
maxDate?: string;
|
|
13
|
+
/** Permite deshabilitar días puntuales. Recibe la fecha en formato `yyyy-LL-dd`. */
|
|
14
|
+
isDateDisabled?: (simpleDate: string) => boolean;
|
|
15
|
+
/** Ref que apunta al día activo (el único con tabIndex 0), usado como foco inicial al abrir el calendario. */
|
|
16
|
+
activeDayRef?: MutableRefObject<HTMLElement | null>;
|
|
17
|
+
/** Se ejecuta al elegir un día habilitado. */
|
|
18
|
+
onSelectDate: (simpleDate: string) => void;
|
|
19
|
+
/** Se ejecuta al cambiar de mes (flechas o navegación con teclado). Recibe el primer día del mes. */
|
|
20
|
+
onChangeVisibleMonth: (monthSimpleDate: string) => void;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=BordDatePickerMonthGrid.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BordDatePickerMonthGrid.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/BordDatePicker/components/BordDatePickerMonthGrid/BordDatePickerMonthGrid.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAE9C,MAAM,WAAW,6BAA6B;IAC5C,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,sFAAsF;IACtF,YAAY,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;IACjD,8GAA8G;IAC9G,YAAY,CAAC,EAAE,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACpD,8CAA8C;IAC9C,YAAY,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,qGAAqG;IACrG,oBAAoB,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;CACzD"}
|
package/dist/components/BordDatePicker/components/BordDatePickerTrigger/BordDatePickerTrigger.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IBordDatePickerTriggerProps } from './BordDatePickerTrigger.types';
|
|
2
|
+
import './BordDatePickerTrigger.scss';
|
|
3
|
+
/**
|
|
4
|
+
* Trigger de la variante `calendar` de BordDatePicker: label, botón con ícono y fecha (o placeholder) y texto de error.
|
|
5
|
+
* Asocia el valor y el error al botón para lectores de pantalla.
|
|
6
|
+
*/
|
|
7
|
+
declare const BordDatePickerTrigger: ({ label, displayValue, placeholder, errorText, hideErrorText, isFilled, isOpen, isDisabled, customWidth, triggerRef, referenceProps, }: IBordDatePickerTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default BordDatePickerTrigger;
|
|
9
|
+
//# sourceMappingURL=BordDatePickerTrigger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BordDatePickerTrigger.d.ts","sourceRoot":"","sources":["../../../../../src/components/BordDatePicker/components/BordDatePickerTrigger/BordDatePickerTrigger.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,2BAA2B,EAE5B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,8BAA8B,CAAC;AAqBtC;;;GAGG;AACH,QAAA,MAAM,qBAAqB,2IAYxB,2BAA2B,4CA+C7B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface IBordDatePickerTriggerProps {
|
|
2
|
+
/** Label que se muestra arriba y da el nombre accesible al botón. */
|
|
3
|
+
label?: string;
|
|
4
|
+
/** Fecha seleccionada ya formateada (dd/mm/aaaa), o string vacío si no hay. */
|
|
5
|
+
displayValue: string;
|
|
6
|
+
/** Texto cuando no hay fecha seleccionada. Default `'dd/mm/aaaa'`. */
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
errorText?: string;
|
|
9
|
+
hideErrorText?: boolean;
|
|
10
|
+
/** Fuerza el estilo "filled" aunque no haya fecha seleccionada. */
|
|
11
|
+
isFilled: boolean;
|
|
12
|
+
isOpen: boolean;
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
customWidth?: string;
|
|
15
|
+
/** Ref del botón, usado por floating-ui como referencia del popover. */
|
|
16
|
+
triggerRef: (triggerNode: HTMLElement | null) => void;
|
|
17
|
+
/** Props de interacción de floating-ui (`getReferenceProps()`). */
|
|
18
|
+
referenceProps: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
/** Estados que determinan las clases del trigger. */
|
|
21
|
+
export interface IBordDatePickerTriggerStateClassNames {
|
|
22
|
+
isFilled: boolean;
|
|
23
|
+
hasValue: boolean;
|
|
24
|
+
hasError: boolean;
|
|
25
|
+
isDisabled?: boolean;
|
|
26
|
+
isOpen: boolean;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=BordDatePickerTrigger.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BordDatePickerTrigger.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/BordDatePicker/components/BordDatePickerTrigger/BordDatePickerTrigger.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,2BAA2B;IAC1C,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,YAAY,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mEAAmE;IACnE,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,UAAU,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IACtD,mEAAmE;IACnE,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,qDAAqD;AACrD,MAAM,WAAW,qCAAqC;IACpD,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;CACjB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface IUseDatePickerSelectionProps {
|
|
2
|
+
/** Valor controlado (datetime ISO). Si viene definido, es la única fuente de la fecha seleccionada. */
|
|
3
|
+
value?: string;
|
|
4
|
+
/** Valor inicial (datetime ISO) para el modo no controlado, mientras el usuario no elija otra fecha. */
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
/** Offset UTC en el que se interpreta la fecha. */
|
|
7
|
+
desiredTimeZone?: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Resuelve la fecha seleccionada de un date picker, controlado o no controlado, sin sincronizar estado con efectos.
|
|
11
|
+
* Controlado: la fecha sale solo de `value`. No controlado: la elegida por el usuario o, mientras no elija, `defaultValue`.
|
|
12
|
+
* @returns la fecha seleccionada en formato yyyy-LL-dd (o string vacío) y la función para guardar una nueva selección
|
|
13
|
+
*/
|
|
14
|
+
export declare const useDatePickerSelection: ({ value, defaultValue, desiredTimeZone }: IUseDatePickerSelectionProps) => {
|
|
15
|
+
selectedDate: string;
|
|
16
|
+
saveSelectedDate: (simpleDate: string) => void;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=useDatePickerSelection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDatePickerSelection.d.ts","sourceRoot":"","sources":["../../src/hooks/useDatePickerSelection.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,4BAA4B;IAC3C,uGAAuG;IACvG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wGAAwG;IACxG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,6CAA8C,4BAA4B;;mCAWrE,MAAM;CAM7C,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -371,6 +371,13 @@ declare enum FORM_COMPONENTS_STANDARD_SIZES {
|
|
|
371
371
|
type TformComponentsStandardSizes = 'w-80' | 'w-180' | 'w-280' | 'w-380' | 'w-464' | (string & {});
|
|
372
372
|
type TSemanticColors = 'informative' | 'success' | 'warning' | 'danger' | 'backlog';
|
|
373
373
|
type TTabValue = string | number;
|
|
374
|
+
/** Celda de un día dentro de la grilla mensual del calendario. */
|
|
375
|
+
interface ICalendarDay {
|
|
376
|
+
simpleDate: string;
|
|
377
|
+
dayNumber: number;
|
|
378
|
+
isCurrentMonth: boolean;
|
|
379
|
+
isToday: boolean;
|
|
380
|
+
}
|
|
374
381
|
|
|
375
382
|
declare const BordOneToneIcon: ({ variant, standardSize, customWidth, style, customClassName, ...rest }: IbordOneToneIconProps) => react_jsx_runtime.JSX.Element;
|
|
376
383
|
|
|
@@ -1979,6 +1986,14 @@ interface IBordCheckBoxProps extends ComponentProps<"div"> {
|
|
|
1979
1986
|
*/
|
|
1980
1987
|
declare const BordCheckBox: ({ label, isButtonActive, isButtonDisabled, handleClickButton, customSize, labelProps, }: IBordCheckBoxProps) => react_jsx_runtime.JSX.Element;
|
|
1981
1988
|
|
|
1989
|
+
/** Variante visual del date picker: input nativo del navegador o calendario custom del DS. */
|
|
1990
|
+
type TBordDatePickerVariant = 'native' | 'calendar';
|
|
1991
|
+
/** Textos para lectores de pantalla de la variante `calendar`, localizados según `locale`. */
|
|
1992
|
+
interface IBordDatePickerAriaLabels {
|
|
1993
|
+
dialog: string;
|
|
1994
|
+
previousMonth: string;
|
|
1995
|
+
nextMonth: string;
|
|
1996
|
+
}
|
|
1982
1997
|
interface IBordDatePickerProps {
|
|
1983
1998
|
updateCurrentValueCallback: (inputText: string) => void;
|
|
1984
1999
|
isFilled: boolean;
|
|
@@ -1991,9 +2006,29 @@ interface IBordDatePickerProps {
|
|
|
1991
2006
|
debounceTime?: number;
|
|
1992
2007
|
customWidth?: string;
|
|
1993
2008
|
handleFocus?: () => void;
|
|
2009
|
+
/** Variante del picker. Default `'native'` (input de tipo date). */
|
|
2010
|
+
variant?: TBordDatePickerVariant;
|
|
2011
|
+
/** Solo variante `calendar`: texto cuando no hay fecha seleccionada. Default `'dd/mm/aaaa'`. */
|
|
2012
|
+
placeholder?: string;
|
|
2013
|
+
/** Solo variante `calendar`: locale para nombres de meses y días (ej. `'es'`, `'en'`). Default `'es'`. */
|
|
2014
|
+
locale?: string;
|
|
2015
|
+
/** Solo variante `calendar`: valor controlado (datetime ISO). Un string vacío limpia la selección. */
|
|
2016
|
+
value?: string;
|
|
2017
|
+
/** Solo variante `calendar`: se ejecuta cada vez que el calendario se abre o se cierra. */
|
|
2018
|
+
onCalendarOpen?: (isOpen: boolean) => void;
|
|
2019
|
+
/** Solo variante `calendar`: primera fecha seleccionable, en formato `yyyy-LL-dd`. */
|
|
2020
|
+
minDate?: string;
|
|
2021
|
+
/** Solo variante `calendar`: última fecha seleccionable, en formato `yyyy-LL-dd`. */
|
|
2022
|
+
maxDate?: string;
|
|
2023
|
+
/** Solo variante `calendar`: permite deshabilitar días puntuales. Recibe la fecha en formato `yyyy-LL-dd`. */
|
|
2024
|
+
isDateDisabled?: (simpleDate: string) => boolean;
|
|
1994
2025
|
}
|
|
1995
2026
|
|
|
1996
|
-
|
|
2027
|
+
/**
|
|
2028
|
+
* Selector de fecha del DS. Con `variant="native"` (default) usa el input de tipo date del navegador;
|
|
2029
|
+
* con `variant="calendar"` abre un calendario custom. Ambas variantes emiten un datetime ISO en UTC.
|
|
2030
|
+
*/
|
|
2031
|
+
declare const BordDatePicker: ({ variant, debounceTime, ...props }: IBordDatePickerProps) => react_jsx_runtime.JSX.Element;
|
|
1997
2032
|
|
|
1998
2033
|
type TcomponentSize = "xsSmall" | "extraSmall-74" | "extraSmall" | "small" | "small-184" | "medium" | "large" | "extraLarge" | "w256" | "w368" | "w-380" | "w-280" | "w-180" | "w-80";
|
|
1999
2034
|
interface IBordDropdown<T> {
|
|
@@ -3282,4 +3317,4 @@ declare const COMPACT_MESSAGE_CONTAINER_SIZE: {
|
|
|
3282
3317
|
declare const INCIDENT_TYPE_CONFIG: Record<TIncidentType, IIncidentTypeConfig>;
|
|
3283
3318
|
|
|
3284
3319
|
export { BORD_AVATARS, BORD_ILUSTRATION_ICONS, BORD_NOTIFICATION_ICONS, BORD_NOTIFICATION_VARIANT, BORD_ONE_TONE_ICONS, BORD_TIMELINE_MARKER_VARIANT, BORD_TWO_TONE_ICONS, BORD_VERTICAL_STEPPER_STATUS, BORD_VERTICAL_STEPPER_VARIANT, BordAccordion, BordActionButton, BordAnimationLoader, BordAssignUsersButton, BordAssignUsersDropdown, BordAttentionButton, BordAvatar, BordAvatarStack, BordBackButton, BordBadge, BordBanner, BordBreadCrumb, BordButton, BordCapacity, BordCard, BordCellCard, BordCheckBox, BordComment, BordCommentBubble, BordCommentInput, BordCommentsPanel, BordComposeMetricCards, BordConditionBadge, BordConditionTooltip, BordConfigStatusCard, BordConfigStatusReport, BordDatePicker, BordDinamic, BordDinamicList, BordDropdown, BordEmailPreview, BordEmptyState, BordFavoriteButton, BordFeedbackAlert, BordFilters, BordFiltersExpandableSelect, BordFlag, BordFloatDropdown, BordGenericSelect, BordGlass, BordGroupedComboBox, BordIlustrationIcon, BordIncidentCard, BordIncidentClosureList, BordIncidentDatesForm, BordInfoBanner, BordInfoCard, BordInfoRow, BordLateralModal, BordLogo, BordMarketplaceButton, BordMentions, BordMetricCard, BordMetricCards, BordModal, BordNotificationBell, BordNotificationIcon, BordNotificationModal, BordNotificationPanel, BordNotificationRow, BordNotificationRowSkeleton, BordOneToneIcon, BordPasswordInput, BordPhoto, BordPopover, BordProfileSummary, BordProgressBar, BordRadioButton, BordScrollBar, BordSearchBar, BordSelect, BordSelectDropdown, BordSelectTriggerBare, BordSelectTriggerDefault, BordSelectTriggerGradient, BordSidebar, BordSidebarButton, BordSidebarWithFilters, BordSortSelect, BordStatus, BordStepper, BordSwitch, BordSwitchGroup, BordTab, BordTabBar, BordTable, BordTabs, BordTabsGroupWithBadge, BordTag, BordTags, BordTextArea, BordTextButton, BordTextInput, BordTickSpinner, BordTimelineEvent, BordTimelineGroupHeader, BordTimelineHolderChip, BordTimelineMarker, BordTimelineSpine, BordTimelineStandaloneEvent, BordToast, BordToolModelMarker, BordToolsPhotos, BordTooltip, BordTooltipKeyValueMessage, BordTrackingEtaCard, BordTrackingEventCard, BordTrelloRowFooterBadgeList, BordTwoToneIcon, BordUploadImage, BordUploaderButton, BordVerticalStepper, COMPACT_MESSAGE_CONTAINER_SIZE, COUNTRY_CODES, FORM_COMPONENTS_STANDARD_SIZES, INCIDENT_TYPE_CONFIG, ModalContent, STATUS_VARIANTS, ThemeProvider };
|
|
3285
|
-
export type { BordCardCheckboxConfig, BordCardProps, BordConditionTooltipProps, BordConditionTooltipTexts, BordFiltersProps, BordTableColumn, BordTableProps, BordTableRowData, BordVerticalStepperListItem, BordVerticalStepperProps, BordVerticalStepperStepStatus, BordVerticalStepperSubStep, BordVerticalStepperVariant, CardBottomContentConfig, CardCollapsedRightContentConfig, CardLeftContentProps, CardLeftFeatureTag, CardRightCollapsedContentProps, CardRightContentProps, CardTextInputFieldConfig, GradingCondition, IBordAccordionCta, IBordAccordionItem, IBordAccordionProps, IBordAccordionSubItem, IBordAnimationLoaderProps, IBordAssignUsersButtonProps, IBordAssignUsersDropdownProps, IBordAssignableUser, IBordAttentionButton, IBordAvatarProps, IBordAvatarStackProps, IBordAvatarStackUser, IBordBackButtonProps, IBordBanner, IBordBreadCrumbProps, IBordButton, IBordCapacityProps, IBordCellCard, IBordCellHeader, IBordCellItem, IBordCellItemData, IBordCheckBoxProps, IBordCheckBoxSvgProps, IBordCommentBubbleProps, IBordCommentInputProps, IBordCommentMention, IBordCommentMentionableUser, IBordCommentProps, IBordCommentSelectedMention, IBordCommentThreadItem, IBordCommentsPanelProps, IBordComposeMetricCardsItem, IBordComposeMetricCardsProps, IBordConditionBadgeProps, IBordDatePickerProps, IBordEmptyStateProps, IBordFavoriteButtonProps, IBordFavoriteStore, IBordFiltersExpandableSelect, IBordFloatDropdown, IBordFloatDropdownOption, IBordGenericSelectProps, IBordGroupCellItem, IBordIlustrationIconProps, IBordIncidentCardProps, IBordInfoBanner, IBordInfoBannerDivProps, IBordInfoBannerSpanProps, IBordInfoCard, IBordInfoCardHeader, IBordInfoCardItem, IBordInfoRow, IBordLogoProps, IBordMarketplaceButtonProps, IBordNotificationBellProps, IBordNotificationDateGroup, IBordNotificationIconProps, IBordNotificationModalProps, IBordNotificationPanelProps, IBordNotificationRowData, IBordNotificationRowProps, IBordPasswordInputProps, IBordPopoverProps, IBordProfileSummaryProps, IBordProgressBarProps, IBordProgressBarSegment, IBordRadioButtonProps, IBordRadioButtonSvgProps, IBordSearchBar, IBordSelectDropdownProps, IBordSelectTriggerProps, IBordSortByOption, IBordSortSelect, IBordSwitchProps, IBordTagProps, IBordTagsProps, IBordTextAreaProps, IBordTimelineEventProps, IBordTimelineGroupHeaderProps, IBordTimelineHolderChipProps, IBordTimelineMarkerProps, IBordTimelineSpineProps, IBordTimelineStandaloneEventProps, IBordTrackingEtaCardProps, IBordTrackingEventCardProps, IBordTwoToneIconProps, IBordUploadImageProps, IBordUploaderButton, IBordVerticalStepperDefaultProps, IBordVerticalStepperLocationStepProps, IDocumentDetail, IIncidentTypeConfig, IModuleFilterInfo, ITwoToneIconProps, IbordComponentColors, IbordSidebarButtonProps, IbordSidebarModulesList, IbordSidebarProps, IbordSidebarWithFilersProps, IcheckBoxButton, IcolorTones, IrawSelectOption, IsidebarFilter, IsidebarFilterValue, IsidebarLogoProps, TBordAssignUsersDropdownAlign, TBordAssignUsersVariant, TBordBannerContentVariant, TBordBannerVariant, TBordCommentAuthorType, TBordComposeMetricCardsItemsPosition, TBordComposeMetricCardsVariant, TBordConditionBadge, TBordConditionBadgeVariant, TBordFavoriteButtonSize, TBordFavoriteButtonVariant, TBordFavoriteStoreId, TBordMetricCardColorVariant, TBordMetricCardIconConfig, TBordMetricCardOneToneIconConfig, TBordMetricCardSizes, TBordMetricCardTwoToneIconConfig, TBordNotificationModalState, TBordNotificationVariant, TBordProgressBarColor, TBordSelectDropdownAlign, TBordSelectDropdownSide, TBordSelectIndicatorPlacement, TBordSelectMultiProps, TBordSelectOption, TBordSelectOptionRowVariant, TBordSelectProps, TBordSelectSingleProps, TBordSelectTriggerAccent, TBordSelectTriggerVariant, TBordSortOnOpenChange, TBordSortOnOrderChange, TBordSortOnSortByChange, TBordSwitchVariant, TBordTimelineMarkerVariant, TBordUploadImageVariant, TFiltersOptionsPanelVariant, TFlexDirection, TIncidentStatus, TIncidentType, TIncidentVariant, TSTATUS_VARIANTS, TSemanticColors, TSortOrder, TTabValue, TTagColors, TTagStandardSizes, TbordAvatarsVariant, TbordOneToneIcon, TbordTwoToneIcon, TbordilustrationIcon, TcountryCode, TformComponentsStandardSizes, TupdateFiltersCallback };
|
|
3320
|
+
export type { BordCardCheckboxConfig, BordCardProps, BordConditionTooltipProps, BordConditionTooltipTexts, BordFiltersProps, BordTableColumn, BordTableProps, BordTableRowData, BordVerticalStepperListItem, BordVerticalStepperProps, BordVerticalStepperStepStatus, BordVerticalStepperSubStep, BordVerticalStepperVariant, CardBottomContentConfig, CardCollapsedRightContentConfig, CardLeftContentProps, CardLeftFeatureTag, CardRightCollapsedContentProps, CardRightContentProps, CardTextInputFieldConfig, GradingCondition, IBordAccordionCta, IBordAccordionItem, IBordAccordionProps, IBordAccordionSubItem, IBordAnimationLoaderProps, IBordAssignUsersButtonProps, IBordAssignUsersDropdownProps, IBordAssignableUser, IBordAttentionButton, IBordAvatarProps, IBordAvatarStackProps, IBordAvatarStackUser, IBordBackButtonProps, IBordBanner, IBordBreadCrumbProps, IBordButton, IBordCapacityProps, IBordCellCard, IBordCellHeader, IBordCellItem, IBordCellItemData, IBordCheckBoxProps, IBordCheckBoxSvgProps, IBordCommentBubbleProps, IBordCommentInputProps, IBordCommentMention, IBordCommentMentionableUser, IBordCommentProps, IBordCommentSelectedMention, IBordCommentThreadItem, IBordCommentsPanelProps, IBordComposeMetricCardsItem, IBordComposeMetricCardsProps, IBordConditionBadgeProps, IBordDatePickerAriaLabels, IBordDatePickerProps, IBordEmptyStateProps, IBordFavoriteButtonProps, IBordFavoriteStore, IBordFiltersExpandableSelect, IBordFloatDropdown, IBordFloatDropdownOption, IBordGenericSelectProps, IBordGroupCellItem, IBordIlustrationIconProps, IBordIncidentCardProps, IBordInfoBanner, IBordInfoBannerDivProps, IBordInfoBannerSpanProps, IBordInfoCard, IBordInfoCardHeader, IBordInfoCardItem, IBordInfoRow, IBordLogoProps, IBordMarketplaceButtonProps, IBordNotificationBellProps, IBordNotificationDateGroup, IBordNotificationIconProps, IBordNotificationModalProps, IBordNotificationPanelProps, IBordNotificationRowData, IBordNotificationRowProps, IBordPasswordInputProps, IBordPopoverProps, IBordProfileSummaryProps, IBordProgressBarProps, IBordProgressBarSegment, IBordRadioButtonProps, IBordRadioButtonSvgProps, IBordSearchBar, IBordSelectDropdownProps, IBordSelectTriggerProps, IBordSortByOption, IBordSortSelect, IBordSwitchProps, IBordTagProps, IBordTagsProps, IBordTextAreaProps, IBordTimelineEventProps, IBordTimelineGroupHeaderProps, IBordTimelineHolderChipProps, IBordTimelineMarkerProps, IBordTimelineSpineProps, IBordTimelineStandaloneEventProps, IBordTrackingEtaCardProps, IBordTrackingEventCardProps, IBordTwoToneIconProps, IBordUploadImageProps, IBordUploaderButton, IBordVerticalStepperDefaultProps, IBordVerticalStepperLocationStepProps, ICalendarDay, IDocumentDetail, IIncidentTypeConfig, IModuleFilterInfo, ITwoToneIconProps, IbordComponentColors, IbordSidebarButtonProps, IbordSidebarModulesList, IbordSidebarProps, IbordSidebarWithFilersProps, IcheckBoxButton, IcolorTones, IrawSelectOption, IsidebarFilter, IsidebarFilterValue, IsidebarLogoProps, TBordAssignUsersDropdownAlign, TBordAssignUsersVariant, TBordBannerContentVariant, TBordBannerVariant, TBordCommentAuthorType, TBordComposeMetricCardsItemsPosition, TBordComposeMetricCardsVariant, TBordConditionBadge, TBordConditionBadgeVariant, TBordDatePickerVariant, TBordFavoriteButtonSize, TBordFavoriteButtonVariant, TBordFavoriteStoreId, TBordMetricCardColorVariant, TBordMetricCardIconConfig, TBordMetricCardOneToneIconConfig, TBordMetricCardSizes, TBordMetricCardTwoToneIconConfig, TBordNotificationModalState, TBordNotificationVariant, TBordProgressBarColor, TBordSelectDropdownAlign, TBordSelectDropdownSide, TBordSelectIndicatorPlacement, TBordSelectMultiProps, TBordSelectOption, TBordSelectOptionRowVariant, TBordSelectProps, TBordSelectSingleProps, TBordSelectTriggerAccent, TBordSelectTriggerVariant, TBordSortOnOpenChange, TBordSortOnOrderChange, TBordSortOnSortByChange, TBordSwitchVariant, TBordTimelineMarkerVariant, TBordUploadImageVariant, TFiltersOptionsPanelVariant, TFlexDirection, TIncidentStatus, TIncidentType, TIncidentVariant, TSTATUS_VARIANTS, TSemanticColors, TSortOrder, TTabValue, TTagColors, TTagStandardSizes, TbordAvatarsVariant, TbordOneToneIcon, TbordTwoToneIcon, TbordilustrationIcon, TcountryCode, TformComponentsStandardSizes, TupdateFiltersCallback };
|