@veevarts/design-system 2.1.0-beta.24 → 2.1.0-beta.27

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.
@@ -1,8 +1,15 @@
1
1
  import { ButtonProps, DatePickerProps as HeroUIDatePickerProps, TimeInputProps as HeroUITimeInputProps } from '@heroui/react';
2
- type DateOnlyProps = HeroUIDatePickerProps & {
2
+ type CalendarMarkProps = {
3
+ /**
4
+ * Rings today's cell in the calendar. HeroUI only flags it. Off by
5
+ * default; `DATE_PICKER_DAY_DEFAULTS` turns it on.
6
+ */
7
+ markToday?: boolean;
8
+ };
9
+ type DateOnlyProps = HeroUIDatePickerProps & CalendarMarkProps & {
3
10
  mode?: 'date';
4
11
  };
5
- type DateTimeProps = HeroUIDatePickerProps & {
12
+ type DateTimeProps = HeroUIDatePickerProps & CalendarMarkProps & {
6
13
  mode: 'datetime';
7
14
  };
8
15
  type TimeOnlyProps = HeroUITimeInputProps & {
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The calendar for picking one day the way the program page does, in one
3
+ * spread: weeks start on Monday, the month and the year can be jumped to (a
4
+ * program can be set up a year ahead), and today is marked with a ring so
5
+ * people know where they are. Nothing is preselected: leave `value` empty and
6
+ * the field stays empty.
7
+ *
8
+ * Opt-in. A `DatePicker` without it keeps HeroUI's behaviour (the locale's
9
+ * first weekday, month-by-month paging, today unmarked).
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * <DatePicker {...DATE_PICKER_DAY_DEFAULTS} label={t('startDate')} value={start} onChange={setStart} />
14
+ * ```
15
+ */
16
+ export declare const DATE_PICKER_DAY_DEFAULTS: {
17
+ readonly firstDayOfWeek: "mon";
18
+ readonly showMonthAndYearPickers: true;
19
+ readonly markToday: true;
20
+ };
21
+ /**
22
+ * What `markToday` adds to every calendar cell. HeroUI only flags today
23
+ * (`data-today`) and draws nothing for it. The ring is the primary color, so
24
+ * once today is selected it disappears into the primary fill, which the
25
+ * `DayDefaults` story measures. (A `data-[selected=true]:ring-0` would not
26
+ * help: it loses to the ring in the generated CSS.)
27
+ */
28
+ export declare const TODAY_RING_CLASS = "data-[today=true]:font-semibold data-[today=true]:ring-1 data-[today=true]:ring-inset data-[today=true]:ring-primary";
@@ -1,2 +1,3 @@
1
1
  export { DatePicker } from './DatePicker';
2
2
  export type { DatePickerProps } from './DatePicker';
3
+ export { DATE_PICKER_DAY_DEFAULTS } from './defaults';
@@ -15,7 +15,7 @@ export { AppliedCodeCard } from './AppliedCodeCard';
15
15
  export type { AppliedCodeCardProps } from './AppliedCodeCard';
16
16
  export { Button } from './Button';
17
17
  export type { ButtonProps } from './Button';
18
- export { DatePicker } from './DatePicker';
18
+ export { DatePicker, DATE_PICKER_DAY_DEFAULTS } from './DatePicker';
19
19
  export type { DatePickerProps } from './DatePicker';
20
20
  export { Drawer } from './Drawer';
21
21
  export type { DrawerProps } from './Drawer';