@vector-business-services/cristal-ds-web 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -320,34 +320,6 @@ interface ContextMenuHandle {
320
320
  }
321
321
  declare const ContextMenu: react.ForwardRefExoticComponent<ContextMenuProps & react.RefAttributes<ContextMenuHandle>>;
322
322
 
323
- type DatePickerVariant = InputVariant;
324
- type DatePickerSize = InputSize;
325
- /**
326
- * Props do Calendar do PrimeReact (`selectionMode` single, range ou multiple, `numberOfMonths`,
327
- * `view`, `dateFormat`, `minDate`, `maxDate`, `disabledDates`, `showTime`...), mais o campo do Input
328
- * do Cristal. O visual (pt e unstyled), o ícone e as setas são do Cristal.
329
- */
330
- interface DatePickerProps<TMode extends CalendarSelectionMode = 'single'> extends Omit<CalendarProps$1<TMode>, 'pt' | 'ptOptions' | 'unstyled' | 'inline' | 'prevIcon' | 'nextIcon' | 'showIcon' | 'icon' | 'iconPos' | 'invalid' | 'variant' | 'inputClassName' | 'panelClassName'> {
331
- /** Type no Figma (Input Text): Outline (com borda) e Filled (com fundo). */
332
- variant?: DatePickerVariant;
333
- /** Size no Figma (Input Text): 32, 36, 42 e 48px de altura do campo. */
334
- size?: DatePickerSize;
335
- /** Rótulo acima do campo (Label no Figma). Sem rótulo, passe `aria-label`. */
336
- label?: string;
337
- /** Dica abaixo do campo (Hint no Figma). */
338
- hint?: string;
339
- /** Mensagem de erro: deixa o campo no estado Error e mostra a dica de erro no lugar da dica. */
340
- error?: string;
341
- /** Dias de folga (Day Off no Figma): aparecem riscados. Para não deixar escolher, use `disabledDates`. */
342
- offDays?: Date[];
343
- }
344
- /** A ref é a do Calendar do Prime: `show()`, `hide()`, `getInput()`, `getElement()`... */
345
- type DatePickerHandle = Calendar$1;
346
- /** DatePicker do Figma "Cristal - Core Components | Web": o campo com o calendário em popup. */
347
- declare const DatePicker: <TMode extends CalendarSelectionMode = "single">(props: DatePickerProps<TMode> & {
348
- ref?: Ref<DatePickerHandle>;
349
- }) => ReactElement;
350
-
351
323
  /** Um período: [início, fim], com as duas datas no mesmo dia quando é um dia só. */
352
324
  type DateRange = [Date, Date];
353
325
  /** Item da lista de períodos do Data Picker (.Period no Figma). */
@@ -400,6 +372,47 @@ declare const DATE_PERIODS: {
400
372
  };
401
373
  };
402
374
 
375
+ type DatePickerVariant = InputVariant;
376
+ type DatePickerSize = InputSize;
377
+ /**
378
+ * Props do Calendar do PrimeReact (`selectionMode` single, range ou multiple, `numberOfMonths`,
379
+ * `view`, `dateFormat`, `minDate`, `maxDate`, `disabledDates`, `showTime`...), mais o campo do Input
380
+ * do Cristal. O visual (pt e unstyled), o ícone e as setas são do Cristal.
381
+ */
382
+ interface DatePickerProps<TMode extends CalendarSelectionMode = 'single'> extends Omit<CalendarProps$1<TMode>, 'pt' | 'ptOptions' | 'unstyled' | 'inline' | 'prevIcon' | 'nextIcon' | 'showIcon' | 'icon' | 'iconPos' | 'invalid' | 'variant' | 'inputClassName' | 'panelClassName'> {
383
+ /** Type no Figma (Input Text): Outline (com borda) e Filled (com fundo). */
384
+ variant?: DatePickerVariant;
385
+ /** Size no Figma (Input Text): 32, 36, 42 e 48px de altura do campo. */
386
+ size?: DatePickerSize;
387
+ /** Rótulo acima do campo (Label no Figma). Sem rótulo, passe `aria-label`. */
388
+ label?: string;
389
+ /** Dica abaixo do campo (Hint no Figma). */
390
+ hint?: string;
391
+ /** Mensagem de erro: deixa o campo no estado Error e mostra a dica de erro no lugar da dica. */
392
+ error?: string;
393
+ /** Dias de folga (Day Off no Figma): aparecem riscados. Para não deixar escolher, use `disabledDates`. */
394
+ offDays?: Date[];
395
+ /**
396
+ * Lista de períodos à esquerda do calendário, com os campos de data inicial e final em cima (o
397
+ * Data Picker do Figma). Só com `selectionMode="range"`; os do Figma estão em `DATE_PERIODS`.
398
+ * Padrão: sem lista.
399
+ */
400
+ periods?: DateRangePeriod[];
401
+ /**
402
+ * Rodapé com Fechar e Selecionar (Data Picker do Figma): a escolha só vale no Selecionar; o
403
+ * Fechar, o Esc e o clique fora descartam. Padrão: false.
404
+ */
405
+ footer?: boolean;
406
+ /** O dia de hoje para os períodos (Hoje, Este mês...). Padrão: a data atual. */
407
+ today?: Date;
408
+ }
409
+ /** A ref é a do Calendar do Prime: `show()`, `hide()`, `getInput()`, `getElement()`... */
410
+ type DatePickerHandle = Calendar$1;
411
+ /** DatePicker do Figma "Cristal - Core Components | Web": o campo com o calendário em popup. */
412
+ declare const DatePicker: <TMode extends CalendarSelectionMode = "single">(props: DatePickerProps<TMode> & {
413
+ ref?: Ref<DatePickerHandle>;
414
+ }) => ReactElement;
415
+
403
416
  interface DateRangeButtonChangeEvent {
404
417
  /** O período escolhido: [início, fim]. */
405
418
  value: DateRange;
package/dist/index.d.ts CHANGED
@@ -320,34 +320,6 @@ interface ContextMenuHandle {
320
320
  }
321
321
  declare const ContextMenu: react.ForwardRefExoticComponent<ContextMenuProps & react.RefAttributes<ContextMenuHandle>>;
322
322
 
323
- type DatePickerVariant = InputVariant;
324
- type DatePickerSize = InputSize;
325
- /**
326
- * Props do Calendar do PrimeReact (`selectionMode` single, range ou multiple, `numberOfMonths`,
327
- * `view`, `dateFormat`, `minDate`, `maxDate`, `disabledDates`, `showTime`...), mais o campo do Input
328
- * do Cristal. O visual (pt e unstyled), o ícone e as setas são do Cristal.
329
- */
330
- interface DatePickerProps<TMode extends CalendarSelectionMode = 'single'> extends Omit<CalendarProps$1<TMode>, 'pt' | 'ptOptions' | 'unstyled' | 'inline' | 'prevIcon' | 'nextIcon' | 'showIcon' | 'icon' | 'iconPos' | 'invalid' | 'variant' | 'inputClassName' | 'panelClassName'> {
331
- /** Type no Figma (Input Text): Outline (com borda) e Filled (com fundo). */
332
- variant?: DatePickerVariant;
333
- /** Size no Figma (Input Text): 32, 36, 42 e 48px de altura do campo. */
334
- size?: DatePickerSize;
335
- /** Rótulo acima do campo (Label no Figma). Sem rótulo, passe `aria-label`. */
336
- label?: string;
337
- /** Dica abaixo do campo (Hint no Figma). */
338
- hint?: string;
339
- /** Mensagem de erro: deixa o campo no estado Error e mostra a dica de erro no lugar da dica. */
340
- error?: string;
341
- /** Dias de folga (Day Off no Figma): aparecem riscados. Para não deixar escolher, use `disabledDates`. */
342
- offDays?: Date[];
343
- }
344
- /** A ref é a do Calendar do Prime: `show()`, `hide()`, `getInput()`, `getElement()`... */
345
- type DatePickerHandle = Calendar$1;
346
- /** DatePicker do Figma "Cristal - Core Components | Web": o campo com o calendário em popup. */
347
- declare const DatePicker: <TMode extends CalendarSelectionMode = "single">(props: DatePickerProps<TMode> & {
348
- ref?: Ref<DatePickerHandle>;
349
- }) => ReactElement;
350
-
351
323
  /** Um período: [início, fim], com as duas datas no mesmo dia quando é um dia só. */
352
324
  type DateRange = [Date, Date];
353
325
  /** Item da lista de períodos do Data Picker (.Period no Figma). */
@@ -400,6 +372,47 @@ declare const DATE_PERIODS: {
400
372
  };
401
373
  };
402
374
 
375
+ type DatePickerVariant = InputVariant;
376
+ type DatePickerSize = InputSize;
377
+ /**
378
+ * Props do Calendar do PrimeReact (`selectionMode` single, range ou multiple, `numberOfMonths`,
379
+ * `view`, `dateFormat`, `minDate`, `maxDate`, `disabledDates`, `showTime`...), mais o campo do Input
380
+ * do Cristal. O visual (pt e unstyled), o ícone e as setas são do Cristal.
381
+ */
382
+ interface DatePickerProps<TMode extends CalendarSelectionMode = 'single'> extends Omit<CalendarProps$1<TMode>, 'pt' | 'ptOptions' | 'unstyled' | 'inline' | 'prevIcon' | 'nextIcon' | 'showIcon' | 'icon' | 'iconPos' | 'invalid' | 'variant' | 'inputClassName' | 'panelClassName'> {
383
+ /** Type no Figma (Input Text): Outline (com borda) e Filled (com fundo). */
384
+ variant?: DatePickerVariant;
385
+ /** Size no Figma (Input Text): 32, 36, 42 e 48px de altura do campo. */
386
+ size?: DatePickerSize;
387
+ /** Rótulo acima do campo (Label no Figma). Sem rótulo, passe `aria-label`. */
388
+ label?: string;
389
+ /** Dica abaixo do campo (Hint no Figma). */
390
+ hint?: string;
391
+ /** Mensagem de erro: deixa o campo no estado Error e mostra a dica de erro no lugar da dica. */
392
+ error?: string;
393
+ /** Dias de folga (Day Off no Figma): aparecem riscados. Para não deixar escolher, use `disabledDates`. */
394
+ offDays?: Date[];
395
+ /**
396
+ * Lista de períodos à esquerda do calendário, com os campos de data inicial e final em cima (o
397
+ * Data Picker do Figma). Só com `selectionMode="range"`; os do Figma estão em `DATE_PERIODS`.
398
+ * Padrão: sem lista.
399
+ */
400
+ periods?: DateRangePeriod[];
401
+ /**
402
+ * Rodapé com Fechar e Selecionar (Data Picker do Figma): a escolha só vale no Selecionar; o
403
+ * Fechar, o Esc e o clique fora descartam. Padrão: false.
404
+ */
405
+ footer?: boolean;
406
+ /** O dia de hoje para os períodos (Hoje, Este mês...). Padrão: a data atual. */
407
+ today?: Date;
408
+ }
409
+ /** A ref é a do Calendar do Prime: `show()`, `hide()`, `getInput()`, `getElement()`... */
410
+ type DatePickerHandle = Calendar$1;
411
+ /** DatePicker do Figma "Cristal - Core Components | Web": o campo com o calendário em popup. */
412
+ declare const DatePicker: <TMode extends CalendarSelectionMode = "single">(props: DatePickerProps<TMode> & {
413
+ ref?: Ref<DatePickerHandle>;
414
+ }) => ReactElement;
415
+
403
416
  interface DateRangeButtonChangeEvent {
404
417
  /** O período escolhido: [início, fim]. */
405
418
  value: DateRange;