jaci-ui 0.3.0 → 0.5.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.
Files changed (188) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +85 -0
  3. package/dist/components/calendar/calendar.cjs +377 -0
  4. package/dist/components/calendar/calendar.cjs.map +1 -0
  5. package/dist/components/calendar/calendar.d.cts +56 -0
  6. package/dist/components/calendar/calendar.d.ts +56 -0
  7. package/dist/components/calendar/calendar.js +368 -0
  8. package/dist/components/calendar/calendar.js.map +1 -0
  9. package/dist/components/calendar/index.d.cts +2 -0
  10. package/dist/components/calendar/index.d.ts +2 -0
  11. package/dist/components/combobox/combobox.cjs +13 -1
  12. package/dist/components/combobox/combobox.cjs.map +1 -1
  13. package/dist/components/combobox/combobox.d.cts +7 -2
  14. package/dist/components/combobox/combobox.d.ts +7 -2
  15. package/dist/components/combobox/combobox.js +13 -2
  16. package/dist/components/combobox/combobox.js.map +1 -1
  17. package/dist/components/combobox/index.d.cts +2 -2
  18. package/dist/components/combobox/index.d.ts +2 -2
  19. package/dist/components/command/command.cjs +55 -34
  20. package/dist/components/command/command.cjs.map +1 -1
  21. package/dist/components/command/command.d.cts +1 -0
  22. package/dist/components/command/command.d.ts +1 -0
  23. package/dist/components/command/command.js +55 -34
  24. package/dist/components/command/command.js.map +1 -1
  25. package/dist/components/controls/input.cjs +26 -5
  26. package/dist/components/controls/input.cjs.map +1 -1
  27. package/dist/components/controls/input.d.cts +5 -2
  28. package/dist/components/controls/input.d.ts +5 -2
  29. package/dist/components/controls/input.js +28 -7
  30. package/dist/components/controls/input.js.map +1 -1
  31. package/dist/components/controls/textarea.cjs +26 -5
  32. package/dist/components/controls/textarea.cjs.map +1 -1
  33. package/dist/components/controls/textarea.d.cts +5 -2
  34. package/dist/components/controls/textarea.d.ts +5 -2
  35. package/dist/components/controls/textarea.js +28 -7
  36. package/dist/components/controls/textarea.js.map +1 -1
  37. package/dist/components/data-toolbar/data-toolbar.cjs +141 -0
  38. package/dist/components/data-toolbar/data-toolbar.cjs.map +1 -0
  39. package/dist/components/data-toolbar/data-toolbar.d.cts +50 -0
  40. package/dist/components/data-toolbar/data-toolbar.d.ts +50 -0
  41. package/dist/components/data-toolbar/data-toolbar.js +132 -0
  42. package/dist/components/data-toolbar/data-toolbar.js.map +1 -0
  43. package/dist/components/data-toolbar/index.d.cts +2 -0
  44. package/dist/components/data-toolbar/index.d.ts +2 -0
  45. package/dist/components/data-view/data-view.cjs +33 -1
  46. package/dist/components/data-view/data-view.cjs.map +1 -1
  47. package/dist/components/data-view/data-view.d.cts +12 -1
  48. package/dist/components/data-view/data-view.d.ts +12 -1
  49. package/dist/components/data-view/data-view.js +31 -2
  50. package/dist/components/data-view/data-view.js.map +1 -1
  51. package/dist/components/data-view/index.d.cts +2 -2
  52. package/dist/components/data-view/index.d.ts +2 -2
  53. package/dist/components/date-picker/date-picker.cjs +9 -9
  54. package/dist/components/date-picker/date-picker.cjs.map +1 -1
  55. package/dist/components/date-picker/date-picker.d.cts +3 -1
  56. package/dist/components/date-picker/date-picker.d.ts +3 -1
  57. package/dist/components/date-picker/date-picker.js +9 -9
  58. package/dist/components/date-picker/date-picker.js.map +1 -1
  59. package/dist/components/date-range-picker/date-range-picker.cjs +589 -0
  60. package/dist/components/date-range-picker/date-range-picker.cjs.map +1 -0
  61. package/dist/components/date-range-picker/date-range-picker.d.cts +134 -0
  62. package/dist/components/date-range-picker/date-range-picker.d.ts +134 -0
  63. package/dist/components/date-range-picker/date-range-picker.js +568 -0
  64. package/dist/components/date-range-picker/date-range-picker.js.map +1 -0
  65. package/dist/components/date-range-picker/index.d.cts +2 -0
  66. package/dist/components/date-range-picker/index.d.ts +2 -0
  67. package/dist/components/field/field.cjs +106 -11
  68. package/dist/components/field/field.cjs.map +1 -1
  69. package/dist/components/field/field.d.cts +22 -4
  70. package/dist/components/field/field.d.ts +22 -4
  71. package/dist/components/field/field.js +107 -13
  72. package/dist/components/field/field.js.map +1 -1
  73. package/dist/components/field/index.d.cts +2 -2
  74. package/dist/components/field/index.d.ts +2 -2
  75. package/dist/components/list/list.cjs +3 -1
  76. package/dist/components/list/list.cjs.map +1 -1
  77. package/dist/components/list/list.d.cts +3 -1
  78. package/dist/components/list/list.d.ts +3 -1
  79. package/dist/components/list/list.js +3 -1
  80. package/dist/components/list/list.js.map +1 -1
  81. package/dist/components/pagination/index.d.cts +2 -2
  82. package/dist/components/pagination/index.d.ts +2 -2
  83. package/dist/components/pagination/pagination.cjs +122 -21
  84. package/dist/components/pagination/pagination.cjs.map +1 -1
  85. package/dist/components/pagination/pagination.d.cts +25 -13
  86. package/dist/components/pagination/pagination.d.ts +25 -13
  87. package/dist/components/pagination/pagination.js +122 -23
  88. package/dist/components/pagination/pagination.js.map +1 -1
  89. package/dist/components/pin-input/index.d.cts +2 -0
  90. package/dist/components/pin-input/index.d.ts +2 -0
  91. package/dist/components/pin-input/pin-input.cjs +266 -0
  92. package/dist/components/pin-input/pin-input.cjs.map +1 -0
  93. package/dist/components/pin-input/pin-input.d.cts +46 -0
  94. package/dist/components/pin-input/pin-input.d.ts +46 -0
  95. package/dist/components/pin-input/pin-input.js +258 -0
  96. package/dist/components/pin-input/pin-input.js.map +1 -0
  97. package/dist/components/select/index.d.cts +2 -2
  98. package/dist/components/select/index.d.ts +2 -2
  99. package/dist/components/select/select.cjs +80 -3
  100. package/dist/components/select/select.cjs.map +1 -1
  101. package/dist/components/select/select.d.cts +18 -3
  102. package/dist/components/select/select.d.ts +18 -3
  103. package/dist/components/select/select.js +78 -5
  104. package/dist/components/select/select.js.map +1 -1
  105. package/dist/components/table/index.d.cts +2 -2
  106. package/dist/components/table/index.d.ts +2 -2
  107. package/dist/components/table/table.cjs +265 -46
  108. package/dist/components/table/table.cjs.map +1 -1
  109. package/dist/components/table/table.d.cts +41 -8
  110. package/dist/components/table/table.d.ts +41 -8
  111. package/dist/components/table/table.js +264 -48
  112. package/dist/components/table/table.js.map +1 -1
  113. package/dist/components/tags-input/tags-input.cjs +83 -5
  114. package/dist/components/tags-input/tags-input.cjs.map +1 -1
  115. package/dist/components/tags-input/tags-input.d.cts +3 -0
  116. package/dist/components/tags-input/tags-input.d.ts +3 -0
  117. package/dist/components/tags-input/tags-input.js +83 -5
  118. package/dist/components/tags-input/tags-input.js.map +1 -1
  119. package/dist/components/tree-view/index.d.cts +2 -2
  120. package/dist/components/tree-view/index.d.ts +2 -2
  121. package/dist/components/tree-view/tree-view.cjs +60 -3
  122. package/dist/components/tree-view/tree-view.cjs.map +1 -1
  123. package/dist/components/tree-view/tree-view.d.cts +12 -1
  124. package/dist/components/tree-view/tree-view.d.ts +12 -1
  125. package/dist/components/tree-view/tree-view.js +58 -4
  126. package/dist/components/tree-view/tree-view.js.map +1 -1
  127. package/dist/components/upload/index.d.cts +2 -2
  128. package/dist/components/upload/index.d.ts +2 -2
  129. package/dist/components/upload/upload.cjs +90 -10
  130. package/dist/components/upload/upload.cjs.map +1 -1
  131. package/dist/components/upload/upload.d.cts +25 -2
  132. package/dist/components/upload/upload.d.ts +25 -2
  133. package/dist/components/upload/upload.js +89 -11
  134. package/dist/components/upload/upload.js.map +1 -1
  135. package/dist/index.cjs +74 -1
  136. package/dist/index.d.cts +17 -9
  137. package/dist/index.d.ts +17 -9
  138. package/dist/index.js +14 -10
  139. package/dist/styled-system/recipes/calendar.cjs +43 -0
  140. package/dist/styled-system/recipes/calendar.cjs.map +1 -0
  141. package/dist/styled-system/recipes/calendar.js +43 -0
  142. package/dist/styled-system/recipes/calendar.js.map +1 -0
  143. package/dist/styled-system/recipes/combobox.cjs +1 -0
  144. package/dist/styled-system/recipes/combobox.cjs.map +1 -1
  145. package/dist/styled-system/recipes/combobox.js +1 -0
  146. package/dist/styled-system/recipes/combobox.js.map +1 -1
  147. package/dist/styled-system/recipes/data-toolbar.cjs +40 -0
  148. package/dist/styled-system/recipes/data-toolbar.cjs.map +1 -0
  149. package/dist/styled-system/recipes/data-toolbar.js +40 -0
  150. package/dist/styled-system/recipes/data-toolbar.js.map +1 -0
  151. package/dist/styled-system/recipes/data-view.cjs +3 -0
  152. package/dist/styled-system/recipes/data-view.cjs.map +1 -1
  153. package/dist/styled-system/recipes/data-view.js +3 -0
  154. package/dist/styled-system/recipes/data-view.js.map +1 -1
  155. package/dist/styled-system/recipes/date-range-picker.cjs +52 -0
  156. package/dist/styled-system/recipes/date-range-picker.cjs.map +1 -0
  157. package/dist/styled-system/recipes/date-range-picker.js +52 -0
  158. package/dist/styled-system/recipes/date-range-picker.js.map +1 -0
  159. package/dist/styled-system/recipes/list.cjs +7 -1
  160. package/dist/styled-system/recipes/list.cjs.map +1 -1
  161. package/dist/styled-system/recipes/list.js +7 -1
  162. package/dist/styled-system/recipes/list.js.map +1 -1
  163. package/dist/styled-system/recipes/pagination.cjs +9 -1
  164. package/dist/styled-system/recipes/pagination.cjs.map +1 -1
  165. package/dist/styled-system/recipes/pagination.js +9 -1
  166. package/dist/styled-system/recipes/pagination.js.map +1 -1
  167. package/dist/styled-system/recipes/pin-input.cjs +39 -0
  168. package/dist/styled-system/recipes/pin-input.cjs.map +1 -0
  169. package/dist/styled-system/recipes/pin-input.js +39 -0
  170. package/dist/styled-system/recipes/pin-input.js.map +1 -0
  171. package/dist/styled-system/recipes/select.cjs +5 -1
  172. package/dist/styled-system/recipes/select.cjs.map +1 -1
  173. package/dist/styled-system/recipes/select.js +5 -1
  174. package/dist/styled-system/recipes/select.js.map +1 -1
  175. package/dist/styled-system/recipes/table.cjs +15 -2
  176. package/dist/styled-system/recipes/table.cjs.map +1 -1
  177. package/dist/styled-system/recipes/table.js +15 -2
  178. package/dist/styled-system/recipes/table.js.map +1 -1
  179. package/dist/styled-system/recipes/tree-view.cjs +4 -1
  180. package/dist/styled-system/recipes/tree-view.cjs.map +1 -1
  181. package/dist/styled-system/recipes/tree-view.js +4 -1
  182. package/dist/styled-system/recipes/tree-view.js.map +1 -1
  183. package/dist/styled-system/recipes/upload.cjs +2 -0
  184. package/dist/styled-system/recipes/upload.cjs.map +1 -1
  185. package/dist/styled-system/recipes/upload.js +2 -0
  186. package/dist/styled-system/recipes/upload.js.map +1 -1
  187. package/dist/styles.css +995 -95
  188. package/package.json +3 -2
@@ -2,16 +2,24 @@ import { ComponentPropsWithoutRef, ReactNode } from "react";
2
2
  //#region src/components/data-view/data-view.d.ts
3
3
  type DataViewLayout = "table" | "list" | "grid";
4
4
  type DataViewColumns = 1 | 2 | 3 | 4;
5
+ type DataViewStatus = "idle" | "loading" | "empty" | "error" | "ready";
5
6
  interface DataViewRootProps extends Omit<ComponentPropsWithoutRef<"section">, "children"> {
6
7
  children?: ReactNode;
7
8
  columns?: DataViewColumns;
8
9
  layout?: DataViewLayout;
10
+ status?: DataViewStatus;
9
11
  }
10
12
  declare const DataViewRoot: import("react").ForwardRefExoticComponent<DataViewRootProps & import("react").RefAttributes<HTMLElement>>;
11
13
  type DataViewToolbarProps = ComponentPropsWithoutRef<"div">;
12
14
  declare const DataViewToolbar: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
15
+ type DataViewFiltersProps = ComponentPropsWithoutRef<"div">;
16
+ declare const DataViewFilters: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
13
17
  type DataViewContentProps = ComponentPropsWithoutRef<"div">;
14
18
  declare const DataViewContent: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
19
+ type DataViewFooterProps = ComponentPropsWithoutRef<"div">;
20
+ declare const DataViewFooter: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
21
+ type DataViewPaginationProps = ComponentPropsWithoutRef<"div">;
22
+ declare const DataViewPagination: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
15
23
  interface DataViewStateProps extends ComponentPropsWithoutRef<"div"> {
16
24
  children?: ReactNode;
17
25
  }
@@ -21,11 +29,14 @@ declare const DataViewError: import("react").ForwardRefExoticComponent<DataViewS
21
29
  declare const DataView: {
22
30
  Root: import("react").ForwardRefExoticComponent<DataViewRootProps & import("react").RefAttributes<HTMLElement>>;
23
31
  Toolbar: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
32
+ Filters: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
24
33
  Content: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
34
+ Footer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
35
+ Pagination: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
25
36
  Loading: import("react").ForwardRefExoticComponent<DataViewStateProps & import("react").RefAttributes<HTMLDivElement>>;
26
37
  Empty: import("react").ForwardRefExoticComponent<DataViewStateProps & import("react").RefAttributes<HTMLDivElement>>;
27
38
  Error: import("react").ForwardRefExoticComponent<DataViewStateProps & import("react").RefAttributes<HTMLDivElement>>;
28
39
  };
29
40
  //#endregion
30
- export { DataView, DataViewColumns, DataViewContent, DataViewContentProps, DataViewEmpty, DataViewError, DataViewLayout, DataViewLoading, DataViewRoot, DataViewRootProps, DataViewStateProps, DataViewToolbar, DataViewToolbarProps };
41
+ export { DataView, DataViewColumns, DataViewContent, DataViewContentProps, DataViewEmpty, DataViewError, DataViewFilters, DataViewFiltersProps, DataViewFooter, DataViewFooterProps, DataViewLayout, DataViewLoading, DataViewPagination, DataViewPaginationProps, DataViewRoot, DataViewRootProps, DataViewStateProps, DataViewStatus, DataViewToolbar, DataViewToolbarProps };
31
42
  //# sourceMappingURL=data-view.d.cts.map
@@ -2,16 +2,24 @@ import { ComponentPropsWithoutRef, ReactNode } from "react";
2
2
  //#region src/components/data-view/data-view.d.ts
3
3
  type DataViewLayout = "table" | "list" | "grid";
4
4
  type DataViewColumns = 1 | 2 | 3 | 4;
5
+ type DataViewStatus = "idle" | "loading" | "empty" | "error" | "ready";
5
6
  interface DataViewRootProps extends Omit<ComponentPropsWithoutRef<"section">, "children"> {
6
7
  children?: ReactNode;
7
8
  columns?: DataViewColumns;
8
9
  layout?: DataViewLayout;
10
+ status?: DataViewStatus;
9
11
  }
10
12
  declare const DataViewRoot: import("react").ForwardRefExoticComponent<DataViewRootProps & import("react").RefAttributes<HTMLElement>>;
11
13
  type DataViewToolbarProps = ComponentPropsWithoutRef<"div">;
12
14
  declare const DataViewToolbar: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
15
+ type DataViewFiltersProps = ComponentPropsWithoutRef<"div">;
16
+ declare const DataViewFilters: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
13
17
  type DataViewContentProps = ComponentPropsWithoutRef<"div">;
14
18
  declare const DataViewContent: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
19
+ type DataViewFooterProps = ComponentPropsWithoutRef<"div">;
20
+ declare const DataViewFooter: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
21
+ type DataViewPaginationProps = ComponentPropsWithoutRef<"div">;
22
+ declare const DataViewPagination: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
15
23
  interface DataViewStateProps extends ComponentPropsWithoutRef<"div"> {
16
24
  children?: ReactNode;
17
25
  }
@@ -21,11 +29,14 @@ declare const DataViewError: import("react").ForwardRefExoticComponent<DataViewS
21
29
  declare const DataView: {
22
30
  Root: import("react").ForwardRefExoticComponent<DataViewRootProps & import("react").RefAttributes<HTMLElement>>;
23
31
  Toolbar: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
32
+ Filters: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
24
33
  Content: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
34
+ Footer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
35
+ Pagination: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
25
36
  Loading: import("react").ForwardRefExoticComponent<DataViewStateProps & import("react").RefAttributes<HTMLDivElement>>;
26
37
  Empty: import("react").ForwardRefExoticComponent<DataViewStateProps & import("react").RefAttributes<HTMLDivElement>>;
27
38
  Error: import("react").ForwardRefExoticComponent<DataViewStateProps & import("react").RefAttributes<HTMLDivElement>>;
28
39
  };
29
40
  //#endregion
30
- export { DataView, DataViewColumns, DataViewContent, DataViewContentProps, DataViewEmpty, DataViewError, DataViewLayout, DataViewLoading, DataViewRoot, DataViewRootProps, DataViewStateProps, DataViewToolbar, DataViewToolbarProps };
41
+ export { DataView, DataViewColumns, DataViewContent, DataViewContentProps, DataViewEmpty, DataViewError, DataViewFilters, DataViewFiltersProps, DataViewFooter, DataViewFooterProps, DataViewLayout, DataViewLoading, DataViewPagination, DataViewPaginationProps, DataViewRoot, DataViewRootProps, DataViewStateProps, DataViewStatus, DataViewToolbar, DataViewToolbarProps };
31
42
  //# sourceMappingURL=data-view.d.ts.map
@@ -3,7 +3,7 @@ import { dataView } from "../../styled-system/recipes/data-view.js";
3
3
  import { forwardRef } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/components/data-view/data-view.tsx
6
- const DataViewRoot = forwardRef(function DataViewRoot({ children, className, columns = 3, layout = "list", ...props }, ref) {
6
+ const DataViewRoot = forwardRef(function DataViewRoot({ children, className, columns = 3, layout = "list", status = "idle", ...props }, ref) {
7
7
  const styles = dataView({
8
8
  columns: String(columns),
9
9
  layout
@@ -12,9 +12,11 @@ const DataViewRoot = forwardRef(function DataViewRoot({ children, className, col
12
12
  ...props,
13
13
  ref,
14
14
  className: cx(styles.root, className),
15
+ "aria-busy": props["aria-busy"] ?? (status === "loading" || void 0),
15
16
  "data-columns": columns,
16
17
  "data-jaci-component": "data-view",
17
18
  "data-layout": layout,
19
+ "data-status": status,
18
20
  "data-slot": "data-view",
19
21
  children
20
22
  });
@@ -27,6 +29,14 @@ const DataViewToolbar = forwardRef(function DataViewToolbar({ className, ...prop
27
29
  "data-slot": "data-view-toolbar"
28
30
  });
29
31
  });
32
+ const DataViewFilters = forwardRef(function DataViewFilters({ className, ...props }, ref) {
33
+ return /* @__PURE__ */ jsx("div", {
34
+ ...props,
35
+ ref,
36
+ className: cx(dataView().filters, className),
37
+ "data-slot": "data-view-filters"
38
+ });
39
+ });
30
40
  const DataViewContent = forwardRef(function DataViewContent({ className, ...props }, ref) {
31
41
  return /* @__PURE__ */ jsx("div", {
32
42
  ...props,
@@ -35,6 +45,22 @@ const DataViewContent = forwardRef(function DataViewContent({ className, ...prop
35
45
  "data-slot": "data-view-content"
36
46
  });
37
47
  });
48
+ const DataViewFooter = forwardRef(function DataViewFooter({ className, ...props }, ref) {
49
+ return /* @__PURE__ */ jsx("div", {
50
+ ...props,
51
+ ref,
52
+ className: cx(dataView().footer, className),
53
+ "data-slot": "data-view-footer"
54
+ });
55
+ });
56
+ const DataViewPagination = forwardRef(function DataViewPagination({ className, ...props }, ref) {
57
+ return /* @__PURE__ */ jsx("div", {
58
+ ...props,
59
+ ref,
60
+ className: cx(dataView().pagination, className),
61
+ "data-slot": "data-view-pagination"
62
+ });
63
+ });
38
64
  const DataViewLoading = forwardRef(function DataViewLoading({ children = "Loading…", className, ...props }, ref) {
39
65
  return /* @__PURE__ */ jsx("div", {
40
66
  ...props,
@@ -68,12 +94,15 @@ const DataViewError = forwardRef(function DataViewError({ children = "Something
68
94
  const DataView = {
69
95
  Root: DataViewRoot,
70
96
  Toolbar: DataViewToolbar,
97
+ Filters: DataViewFilters,
71
98
  Content: DataViewContent,
99
+ Footer: DataViewFooter,
100
+ Pagination: DataViewPagination,
72
101
  Loading: DataViewLoading,
73
102
  Empty: DataViewEmpty,
74
103
  Error: DataViewError
75
104
  };
76
105
  //#endregion
77
- export { DataView, DataViewContent, DataViewEmpty, DataViewError, DataViewLoading, DataViewRoot, DataViewToolbar };
106
+ export { DataView, DataViewContent, DataViewEmpty, DataViewError, DataViewFilters, DataViewFooter, DataViewLoading, DataViewPagination, DataViewRoot, DataViewToolbar };
78
107
 
79
108
  //# sourceMappingURL=data-view.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-view.js","names":[],"sources":["../../../src/components/data-view/data-view.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { dataView } from \"../../styled-system/recipes\";\n\nexport type DataViewLayout = \"table\" | \"list\" | \"grid\";\nexport type DataViewColumns = 1 | 2 | 3 | 4;\n\nexport interface DataViewRootProps extends Omit<ComponentPropsWithoutRef<\"section\">, \"children\"> {\n children?: ReactNode;\n columns?: DataViewColumns;\n layout?: DataViewLayout;\n}\n\nexport const DataViewRoot = forwardRef<HTMLElement, DataViewRootProps>(function DataViewRoot(\n { children, className, columns = 3, layout = \"list\", ...props },\n ref,\n) {\n const styles = dataView({ columns: String(columns) as \"1\" | \"2\" | \"3\" | \"4\", layout });\n\n return (\n <section\n {...props}\n ref={ref}\n className={cx(styles.root, className)}\n data-columns={columns}\n data-jaci-component=\"data-view\"\n data-layout={layout}\n data-slot=\"data-view\"\n >\n {children}\n </section>\n );\n});\n\nexport type DataViewToolbarProps = ComponentPropsWithoutRef<\"div\">;\nexport const DataViewToolbar = forwardRef<HTMLDivElement, DataViewToolbarProps>(\n function DataViewToolbar({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dataView().toolbar, className)}\n data-slot=\"data-view-toolbar\"\n />\n );\n },\n);\n\nexport type DataViewContentProps = ComponentPropsWithoutRef<\"div\">;\nexport const DataViewContent = forwardRef<HTMLDivElement, DataViewContentProps>(\n function DataViewContent({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dataView().content, className)}\n data-slot=\"data-view-content\"\n />\n );\n },\n);\n\nexport interface DataViewStateProps extends ComponentPropsWithoutRef<\"div\"> {\n children?: ReactNode;\n}\n\nexport const DataViewLoading = forwardRef<HTMLDivElement, DataViewStateProps>(\n function DataViewLoading({ children = \"Loading…\", className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n aria-live=\"polite\"\n className={cx(dataView().loading, className)}\n data-slot=\"data-view-loading\"\n >\n {children}\n </div>\n );\n },\n);\n\nexport const DataViewEmpty = forwardRef<HTMLDivElement, DataViewStateProps>(function DataViewEmpty(\n { children = \"No results found.\", className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dataView().empty, className)}\n data-slot=\"data-view-empty\"\n >\n {children}\n </div>\n );\n});\n\nexport const DataViewError = forwardRef<HTMLDivElement, DataViewStateProps>(function DataViewError(\n { children = \"Something went wrong.\", className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n aria-live=\"assertive\"\n className={cx(dataView().error, className)}\n data-slot=\"data-view-error\"\n role=\"alert\"\n >\n {children}\n </div>\n );\n});\n\n// biome-ignore lint/suspicious/noShadowRestrictedNames: DataView is the public component API name.\nexport const DataView = {\n Root: DataViewRoot,\n Toolbar: DataViewToolbar,\n Content: DataViewContent,\n Loading: DataViewLoading,\n Empty: DataViewEmpty,\n Error: DataViewError,\n};\n"],"mappings":";;;;;AAeA,MAAa,eAAe,WAA2C,SAAS,aAC9E,EAAE,UAAU,WAAW,UAAU,GAAG,SAAS,QAAQ,GAAG,SACxD,KACA;CACA,MAAM,SAAS,SAAS;EAAE,SAAS,OAAO,OAAO;EAA4B;CAAO,CAAC;CAErF,OACE,oBAAC,WAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,OAAO,MAAM,SAAS;EACpC,gBAAc;EACd,uBAAoB;EACpB,eAAa;EACb,aAAU;EAET;CACM,CAAA;AAEb,CAAC;AAGD,MAAa,kBAAkB,WAC7B,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,SAAS,CAAC,CAAC,SAAS,SAAS;EAC3C,aAAU;CACX,CAAA;AAEL,CACF;AAGA,MAAa,kBAAkB,WAC7B,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,SAAS,CAAC,CAAC,SAAS,SAAS;EAC3C,aAAU;CACX,CAAA;AAEL,CACF;AAMA,MAAa,kBAAkB,WAC7B,SAAS,gBAAgB,EAAE,WAAW,YAAY,WAAW,GAAG,SAAS,KAAK;CAC5E,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,aAAU;EACV,WAAW,GAAG,SAAS,CAAC,CAAC,SAAS,SAAS;EAC3C,aAAU;EAET;CACE,CAAA;AAET,CACF;AAEA,MAAa,gBAAgB,WAA+C,SAAS,cACnF,EAAE,WAAW,qBAAqB,WAAW,GAAG,SAChD,KACA;CACA,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,SAAS,CAAC,CAAC,OAAO,SAAS;EACzC,aAAU;EAET;CACE,CAAA;AAET,CAAC;AAED,MAAa,gBAAgB,WAA+C,SAAS,cACnF,EAAE,WAAW,yBAAyB,WAAW,GAAG,SACpD,KACA;CACA,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,aAAU;EACV,WAAW,GAAG,SAAS,CAAC,CAAC,OAAO,SAAS;EACzC,aAAU;EACV,MAAK;EAEJ;CACE,CAAA;AAET,CAAC;AAGD,MAAa,WAAW;CACtB,MAAM;CACN,SAAS;CACT,SAAS;CACT,SAAS;CACT,OAAO;CACP,OAAO;AACT"}
1
+ {"version":3,"file":"data-view.js","names":[],"sources":["../../../src/components/data-view/data-view.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { dataView } from \"../../styled-system/recipes\";\n\nexport type DataViewLayout = \"table\" | \"list\" | \"grid\";\nexport type DataViewColumns = 1 | 2 | 3 | 4;\nexport type DataViewStatus = \"idle\" | \"loading\" | \"empty\" | \"error\" | \"ready\";\n\nexport interface DataViewRootProps extends Omit<ComponentPropsWithoutRef<\"section\">, \"children\"> {\n children?: ReactNode;\n columns?: DataViewColumns;\n layout?: DataViewLayout;\n status?: DataViewStatus;\n}\n\nexport const DataViewRoot = forwardRef<HTMLElement, DataViewRootProps>(function DataViewRoot(\n { children, className, columns = 3, layout = \"list\", status = \"idle\", ...props },\n ref,\n) {\n const styles = dataView({ columns: String(columns) as \"1\" | \"2\" | \"3\" | \"4\", layout });\n\n return (\n <section\n {...props}\n ref={ref}\n className={cx(styles.root, className)}\n aria-busy={props[\"aria-busy\"] ?? (status === \"loading\" || undefined)}\n data-columns={columns}\n data-jaci-component=\"data-view\"\n data-layout={layout}\n data-status={status}\n data-slot=\"data-view\"\n >\n {children}\n </section>\n );\n});\n\nexport type DataViewToolbarProps = ComponentPropsWithoutRef<\"div\">;\nexport const DataViewToolbar = forwardRef<HTMLDivElement, DataViewToolbarProps>(\n function DataViewToolbar({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dataView().toolbar, className)}\n data-slot=\"data-view-toolbar\"\n />\n );\n },\n);\n\nexport type DataViewFiltersProps = ComponentPropsWithoutRef<\"div\">;\nexport const DataViewFilters = forwardRef<HTMLDivElement, DataViewFiltersProps>(\n function DataViewFilters({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dataView().filters, className)}\n data-slot=\"data-view-filters\"\n />\n );\n },\n);\n\nexport type DataViewContentProps = ComponentPropsWithoutRef<\"div\">;\nexport const DataViewContent = forwardRef<HTMLDivElement, DataViewContentProps>(\n function DataViewContent({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dataView().content, className)}\n data-slot=\"data-view-content\"\n />\n );\n },\n);\n\nexport type DataViewFooterProps = ComponentPropsWithoutRef<\"div\">;\nexport const DataViewFooter = forwardRef<HTMLDivElement, DataViewFooterProps>(\n function DataViewFooter({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dataView().footer, className)}\n data-slot=\"data-view-footer\"\n />\n );\n },\n);\n\nexport type DataViewPaginationProps = ComponentPropsWithoutRef<\"div\">;\nexport const DataViewPagination = forwardRef<HTMLDivElement, DataViewPaginationProps>(\n function DataViewPagination({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dataView().pagination, className)}\n data-slot=\"data-view-pagination\"\n />\n );\n },\n);\n\nexport interface DataViewStateProps extends ComponentPropsWithoutRef<\"div\"> {\n children?: ReactNode;\n}\n\nexport const DataViewLoading = forwardRef<HTMLDivElement, DataViewStateProps>(\n function DataViewLoading({ children = \"Loading…\", className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n aria-live=\"polite\"\n className={cx(dataView().loading, className)}\n data-slot=\"data-view-loading\"\n >\n {children}\n </div>\n );\n },\n);\n\nexport const DataViewEmpty = forwardRef<HTMLDivElement, DataViewStateProps>(function DataViewEmpty(\n { children = \"No results found.\", className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dataView().empty, className)}\n data-slot=\"data-view-empty\"\n >\n {children}\n </div>\n );\n});\n\nexport const DataViewError = forwardRef<HTMLDivElement, DataViewStateProps>(function DataViewError(\n { children = \"Something went wrong.\", className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n aria-live=\"assertive\"\n className={cx(dataView().error, className)}\n data-slot=\"data-view-error\"\n role=\"alert\"\n >\n {children}\n </div>\n );\n});\n\n// biome-ignore lint/suspicious/noShadowRestrictedNames: DataView is the public component API name.\nexport const DataView = {\n Root: DataViewRoot,\n Toolbar: DataViewToolbar,\n Filters: DataViewFilters,\n Content: DataViewContent,\n Footer: DataViewFooter,\n Pagination: DataViewPag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AAGA,MAAa,qBAAqB,WAChC,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAS,KAAK;CACxD,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,SAAS,CAAC,CAAC,YAAY,SAAS;EAC9C,aAAU;CACX,CAAA;AAEL,CACF;AAMA,MAAa,kBAAkB,WAC7B,SAAS,gBAAgB,EAAE,WAAW,YAAY,WAAW,GAAG,SAAS,KAAK;CAC5E,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,aAAU;EACV,WAAW,GAAG,SAAS,CAAC,CAAC,SAAS,SAAS;EAC3C,aAAU;EAET;CACE,CAAA;AAET,CACF;AAEA,MAAa,gBAAgB,WAA+C,SAAS,cACnF,EAAE,WAAW,qBAAqB,WAAW,GAAG,SAChD,KACA;CACA,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,SAAS,CAAC,CAAC,OAAO,SAAS;EACzC,aAAU;EAET;CACE,CAAA;AAET,CAAC;AAED,MAAa,gBAAgB,WAA+C,SAAS,cACnF,EAAE,WAAW,yBAAyB,WAAW,GAAG,SACpD,KACA;CACA,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,aAAU;EACV,WAAW,GAAG,SAAS,CAAC,CAAC,OAAO,SAAS;EACzC,aAAU;EACV,MAAK;EAEJ;CACE,CAAA;AAET,CAAC;AAGD,MAAa,WAAW;CACtB,MAAM;CACN,SAAS;CACT,SAAS;CACT,SAAS;CACT,QAAQ;CACR,YAAY;CACZ,SAAS;CACT,OAAO;CACP,OAAO;AACT"}
@@ -1,2 +1,2 @@
1
- import { DataView, DataViewColumns, DataViewContent, DataViewContentProps, DataViewEmpty, DataViewError, DataViewLayout, DataViewLoading, DataViewRoot, DataViewRootProps, DataViewStateProps, DataViewToolbar, DataViewToolbarProps } from "./data-view.cjs";
2
- export { DataView, type DataViewColumns, DataViewContent, type DataViewContentProps, DataViewEmpty, DataViewError, type DataViewLayout, DataViewLoading, DataViewRoot, type DataViewRootProps, type DataViewStateProps, DataViewToolbar, type DataViewToolbarProps };
1
+ import { DataView, DataViewColumns, DataViewContent, DataViewContentProps, DataViewEmpty, DataViewError, DataViewFilters, DataViewFiltersProps, DataViewFooter, DataViewFooterProps, DataViewLayout, DataViewLoading, DataViewPagination, DataViewPaginationProps, DataViewRoot, DataViewRootProps, DataViewStateProps, DataViewStatus, DataViewToolbar, DataViewToolbarProps } from "./data-view.cjs";
2
+ export { DataView, type DataViewColumns, DataViewContent, type DataViewContentProps, DataViewEmpty, DataViewError, DataViewFilters, type DataViewFiltersProps, DataViewFooter, type DataViewFooterProps, type DataViewLayout, DataViewLoading, DataViewPagination, type DataViewPaginationProps, DataViewRoot, type DataViewRootProps, type DataViewStateProps, type DataViewStatus, DataViewToolbar, type DataViewToolbarProps };
@@ -1,2 +1,2 @@
1
- import { DataView, DataViewColumns, DataViewContent, DataViewContentProps, DataViewEmpty, DataViewError, DataViewLayout, DataViewLoading, DataViewRoot, DataViewRootProps, DataViewStateProps, DataViewToolbar, DataViewToolbarProps } from "./data-view.js";
2
- export { DataView, type DataViewColumns, DataViewContent, type DataViewContentProps, DataViewEmpty, DataViewError, type DataViewLayout, DataViewLoading, DataViewRoot, type DataViewRootProps, type DataViewStateProps, DataViewToolbar, type DataViewToolbarProps };
1
+ import { DataView, DataViewColumns, DataViewContent, DataViewContentProps, DataViewEmpty, DataViewError, DataViewFilters, DataViewFiltersProps, DataViewFooter, DataViewFooterProps, DataViewLayout, DataViewLoading, DataViewPagination, DataViewPaginationProps, DataViewRoot, DataViewRootProps, DataViewStateProps, DataViewStatus, DataViewToolbar, DataViewToolbarProps } from "./data-view.js";
2
+ export { DataView, type DataViewColumns, DataViewContent, type DataViewContentProps, DataViewEmpty, DataViewError, DataViewFilters, type DataViewFiltersProps, DataViewFooter, type DataViewFooterProps, type DataViewLayout, DataViewLoading, DataViewPagination, type DataViewPaginationProps, DataViewRoot, type DataViewRootProps, type DataViewStateProps, type DataViewStatus, DataViewToolbar, type DataViewToolbarProps };
@@ -23,17 +23,17 @@ function composeRefs(first, second) {
23
23
  else if (first) first.current = value;
24
24
  };
25
25
  }
26
- function DatePickerRoot({ children, closeOnSelect: closeOnSelectProp, defaultValue = null, disabled = false, granularity = "day", isDateDisabled, locale = "pt-BR", maxDate, minDate, name, onValueChange, onMonthChange, placeholder = "Select a date", size = "md", value: controlledValue, weekStartsOn = 0, yearRange: configuredYearRange, actionsRef: externalActionsRef, ...popoverProps }) {
26
+ function DatePickerRoot({ children, closeOnSelect: closeOnSelectProp, defaultValue = null, disabled = false, granularity = "day", isDateDisabled, locale = "pt-BR", maxDate, minDate, name, onValueChange, onMonthChange, placeholder = "Select a date", size = "md", value: controlledValue, weekStartsOn = 0, yearRange: configuredYearRange, referenceDate, actionsRef: externalActionsRef, ...popoverProps }) {
27
27
  const [uncontrolledValue, setUncontrolledValue] = (0, react.useState)(defaultValue);
28
28
  const selected = controlledValue === void 0 ? uncontrolledValue : controlledValue;
29
- const [month, setMonthState] = (0, react.useState)(() => require_date_utils.startOfMonth(selected ?? /* @__PURE__ */ new Date()));
30
- const [focusedDate, setFocusedDate] = (0, react.useState)(selected ?? month);
29
+ const [month, setMonthState] = (0, react.useState)(() => require_date_utils.startOfMonth(selected ?? referenceDate ?? /* @__PURE__ */ new Date()));
30
+ const [focusedDate, setFocusedDate] = (0, react.useState)(selected ?? referenceDate ?? month);
31
31
  const previousMonthRef = (0, react.useRef)(month);
32
32
  const internalActionsRef = (0, react.useRef)(null);
33
33
  const dayRefs = (0, react.useRef)(/* @__PURE__ */ new Map());
34
34
  const labelId = (0, react.useId)();
35
35
  const triggerId = (0, react.useId)();
36
- const today = (0, react.useMemo)(() => /* @__PURE__ */ new Date(), []);
36
+ const today = (0, react.useMemo)(() => referenceDate ?? /* @__PURE__ */ new Date(), [referenceDate]);
37
37
  const styles = require_date_picker.datePicker({ size });
38
38
  const minMonth = minDate ? require_date_utils.startOfMonth(minDate) : void 0;
39
39
  const maxMonth = maxDate ? require_date_utils.startOfMonth(maxDate) : void 0;
@@ -92,9 +92,9 @@ function DatePickerRoot({ children, closeOnSelect: closeOnSelectProp, defaultVal
92
92
  (externalActionsRef ?? internalActionsRef).current?.close();
93
93
  }, [externalActionsRef]);
94
94
  const setValue = (0, react.useCallback)((nextValue) => {
95
- setUncontrolledValue(nextValue);
95
+ if (controlledValue === void 0) setUncontrolledValue(nextValue);
96
96
  onValueChange?.(nextValue);
97
- }, [onValueChange]);
97
+ }, [controlledValue, onValueChange]);
98
98
  const monthDisabled = (0, react.useCallback)((candidate) => {
99
99
  const firstDay = require_date_utils.startOfMonth(candidate);
100
100
  const lastDay = require_date_utils.createCalendarDate(candidate.getFullYear(), candidate.getMonth() + 1, 0);
@@ -466,7 +466,7 @@ const DatePickerNext = (0, react.forwardRef)(function DatePickerNext(props, ref)
466
466
  });
467
467
  });
468
468
  const DatePickerDay = (0, react.forwardRef)(function DatePickerDay({ children, className, date, disabled, onClick, onKeyDown, ...props }, ref) {
469
- const { dateDisabled, disabled: pickerDisabled, focusDate, focusedDate, locale, month, onSelect, registerDay, selected, styles, today } = useDatePickerContext();
469
+ const { dateDisabled, disabled: pickerDisabled, focusDate, focusedDate, locale, month, onSelect, registerDay, selected, styles, today, weekStartsOn } = useDatePickerContext();
470
470
  const key = require_date_utils.dateKey(date);
471
471
  const outsideMonth = !isSameMonth(date, month);
472
472
  const isDisabled = disabled || pickerDisabled || dateDisabled(date);
@@ -491,10 +491,10 @@ const DatePickerDay = (0, react.forwardRef)(function DatePickerDay({ children, c
491
491
  nextDate = require_date_utils.addDays(date, 7);
492
492
  break;
493
493
  case "Home":
494
- nextDate = require_date_utils.addDays(date, -date.getDay());
494
+ nextDate = require_date_utils.addDays(date, -((date.getDay() - weekStartsOn + 7) % 7));
495
495
  break;
496
496
  case "End":
497
- nextDate = require_date_utils.addDays(date, 6 - date.getDay());
497
+ nextDate = require_date_utils.addDays(date, 6 - (date.getDay() - weekStartsOn + 7) % 7);
498
498
  break;
499
499
  case "PageUp":
500
500
  nextDate = require_date_utils.addMonths(date, event.shiftKey ? -12 : -1);
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.cjs","names":["startOfMonth","datePicker","isBeforeDay","isAfterDay","createCalendarDate","isSameDay","addDays","dateKey","addMonths","toTimeInput","formatDateLabel","BasePopover","toInputMonth","toInputDateTime","toInputDate","cx","withRecipeClassName","formatMonthLabel","getMonthLabels","getDateRangeLabel","getCalendarDays","getWeekdayLabels"],"sources":["../../../src/components/date-picker/date-picker.tsx"],"sourcesContent":["\"use client\";\n\nimport { Popover as BasePopover } from \"@base-ui/react/popover\";\nimport {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport type { ComponentPropsWithoutRef, KeyboardEvent, MouseEvent, ReactNode, Ref } from \"react\";\nimport type { PopoverRoot as BasePopoverRoot } from \"@base-ui/react/popover\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { datePicker } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport {\n addDays,\n addMonths,\n createCalendarDate,\n dateKey,\n formatDateLabel,\n formatMonthLabel,\n getCalendarDays,\n getDateRangeLabel,\n getMonthLabels,\n getWeekdayLabels,\n isAfterDay,\n isBeforeDay,\n isSameDay,\n startOfMonth,\n toInputDate,\n toInputDateTime,\n toInputMonth,\n toTimeInput,\n} from \"./date-utils\";\nimport type { DatePickerGranularity } from \"./date-utils\";\n\nexport type DatePickerSize = \"sm\" | \"md\" | \"lg\";\nexport type { DatePickerGranularity } from \"./date-utils\";\n\nexport interface DatePickerYearRange {\n start: number;\n end: number;\n}\n\ninterface DatePickerContextValue {\n canNavigate: (amount: number) => boolean;\n close: () => void;\n dateDisabled: (date: Date) => boolean;\n granularity: DatePickerGranularity;\n disabled: boolean;\n focusDate: (date: Date, direction?: number) => void;\n focusedDate: Date;\n formatDate: (date: Date | null) => string;\n labelId: string;\n locale: string;\n month: Date;\n monthDisabled: (date: Date) => boolean;\n onClear: () => void;\n onTimeChange: (value: string) => void;\n onSelect: (date: Date) => void;\n selectMonth: (month: number) => void;\n selectYear: (year: number) => void;\n placeholder: ReactNode;\n registerDay: (key: string, node: HTMLButtonElement | null) => void;\n selected: Date | null;\n setFocusedDate: (date: Date) => void;\n setMonth: (date: Date) => void;\n size: DatePickerSize;\n styles: ReturnType<typeof datePicker>;\n today: Date;\n timeMax: string | undefined;\n timeMin: string | undefined;\n triggerId: string;\n weekStartsOn: number;\n yearRange: DatePickerYearRange;\n}\n\nconst DatePickerContext = createContext<DatePickerContextValue | null>(null);\n\nfunction useDatePickerContext() {\n const context = useContext(DatePickerContext);\n if (!context) {\n throw new Error(\"DatePicker parts must be rendered inside DatePicker.Root.\");\n }\n\n return context;\n}\n\nfunction isSameMonth(left: Date, right: Date) {\n return left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth();\n}\n\nfunction composeRefs<T>(first: Ref<T> | undefined, second: (value: T | null) => void) {\n return (value: T | null) => {\n second(value);\n if (typeof first === \"function\") {\n first(value);\n } else if (first) {\n first.current = value;\n }\n };\n}\n\nexport interface DatePickerRootProps extends Omit<BasePopoverRoot.Props, \"children\"> {\n /** Selected value. Use together with `onValueChange` for a controlled picker. */\n value?: Date | null;\n /** Initial selected value for an uncontrolled picker. */\n defaultValue?: Date | null;\n /** Called after a valid day, month, or time is selected, or when the value is cleared. */\n onValueChange?: (value: Date | null) => void;\n /** Prevents dates before this local calendar day from being selected. */\n minDate?: Date;\n /** Prevents dates after this local calendar day from being selected. */\n maxDate?: Date;\n /** Adds application-specific disabled dates, such as holidays or weekends. */\n isDateDisabled?: (date: Date) => boolean;\n /** Locale used for month, weekday and value formatting. */\n locale?: string;\n /** Called after the visible calendar month changes. */\n onMonthChange?: (month: Date) => void;\n /** First weekday in the calendar, where 0 is Sunday and 1 is Monday. */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n /** Text shown when no date has been selected. */\n placeholder?: ReactNode;\n /** Shared visual size for the trigger and calendar days. */\n size?: DatePickerSize;\n /** Controls whether the picker selects days, months, or date and time. */\n granularity?: DatePickerGranularity;\n /** Inclusive range used by the year selector. */\n yearRange?: DatePickerYearRange;\n /** Adds a native hidden input using the representation for the selected granularity. */\n name?: string;\n /** Prevents interaction and disables the hidden form input. */\n disabled?: boolean;\n /** Closes the popup after a value is chosen. Defaults to false for date-time mode and true otherwise. */\n closeOnSelect?: boolean;\n children?: ReactNode;\n}\n\nexport function DatePickerRoot({\n children,\n closeOnSelect: closeOnSelectProp,\n defaultValue = null,\n disabled = false,\n granularity = \"day\",\n isDateDisabled,\n locale = \"pt-BR\",\n maxDate,\n minDate,\n name,\n onValueChange,\n onMonthChange,\n placeholder = \"Select a date\",\n size = \"md\",\n value: controlledValue,\n weekStartsOn = 0,\n yearRange: configuredYearRange,\n actionsRef: externalActionsRef,\n ...popoverProps\n}: DatePickerRootProps) {\n const [uncontrolledValue, setUncontrolledValue] = useState<Date | null>(defaultValue);\n const selected = controlledValue === undefined ? uncontrolledValue : controlledValue;\n const [month, setMonthState] = useState(() => startOfMonth(selected ?? new Date()));\n const [focusedDate, setFocusedDate] = useState(selected ?? month);\n const previousMonthRef = useRef(month);\n const internalActionsRef = useRef<BasePopoverRoot.Actions | null>(null);\n const dayRefs = useRef(new Map<string, HTMLButtonElement>());\n const labelId = useId();\n const triggerId = useId();\n const today = useMemo(() => new Date(), []);\n const styles = datePicker({ size });\n const minMonth = minDate ? startOfMonth(minDate) : undefined;\n const maxMonth = maxDate ? startOfMonth(maxDate) : undefined;\n const closeOnSelect = closeOnSelectProp ?? granularity !== \"date-time\";\n const yearRange = useMemo(() => {\n const defaultStart = today.getFullYear() - 100;\n const defaultEnd = today.getFullYear() + 20;\n const start = configuredYearRange?.start ?? defaultStart;\n const end = configuredYearRange?.end ?? defaultEnd;\n const years = [selected?.getFullYear(), minDate?.getFullYear(), maxDate?.getFullYear()].filter(\n (year): year is number => year !== undefined,\n );\n return {\n end: Math.max(start, end, ...years),\n start: Math.min(start, end, ...years),\n };\n }, [configuredYearRange?.end, configuredYearRange?.start, maxDate, minDate, selected, today]);\n\n const clampMonth = useCallback(\n (nextMonth: Date) => {\n const normalized = startOfMonth(nextMonth);\n if (minMonth && isBeforeDay(normalized, minMonth)) return minMonth;\n if (maxMonth && isAfterDay(normalized, maxMonth)) return maxMonth;\n return normalized;\n },\n [maxMonth, minMonth],\n );\n\n const setMonth = useCallback(\n (nextMonth: Date) => {\n const normalized = clampMonth(nextMonth);\n setMonthState((current) => {\n if (isSameMonth(current, normalized)) return current;\n return normalized;\n });\n },\n [clampMonth],\n );\n\n useEffect(() => {\n if (isSameMonth(previousMonthRef.current, month)) return;\n previousMonthRef.current = month;\n onMonthChange?.(month);\n }, [month, onMonthChange]);\n\n useEffect(() => {\n if (!selected) {\n return;\n }\n\n setFocusedDate(selected);\n setMonthState((current) => (isSameMonth(current, selected) ? current : clampMonth(selected)));\n }, [clampMonth, selected]);\n\n const dateDisabled = useCallback(\n (date: Date) =>\n Boolean(\n (minDate && isBeforeDay(date, minDate)) ||\n (maxDate && isAfterDay(date, maxDate)) ||\n isDateDisabled?.(date),\n ),\n [isDateDisabled, maxDate, minDate],\n );\n\n const close = useCallback(() => {\n (externalActionsRef ?? internalActionsRef).current?.close();\n }, [externalActionsRef]);\n\n const setValue = useCallback(\n (nextValue: Date | null) => {\n setUncontrolledValue(nextValue);\n onValueChange?.(nextValue);\n },\n [onValueChange],\n );\n\n const monthDisabled = useCallback(\n (candidate: Date) => {\n const firstDay = startOfMonth(candidate);\n const lastDay = createCalendarDate(candidate.getFullYear(), candidate.getMonth() + 1, 0);\n return Boolean(\n (minDate && isBeforeDay(lastDay, minDate)) || (maxDate && isAfterDay(firstDay, maxDate)),\n );\n },\n [maxDate, minDate],\n );\n\n const onSelect = useCallback(\n (date: Date) => {\n if (disabled || (granularity === \"month\" ? monthDisabled(date) : dateDisabled(date))) {\n return;\n }\n\n const nextValue = createCalendarDate(\n date.getFullYear(),\n date.getMonth(),\n granularity === \"month\" ? 1 : date.getDate(),\n );\n if (granularity === \"date-time\") {\n nextValue.setHours(selected?.getHours() ?? 12, selected?.getMinutes() ?? 0, 0, 0);\n if (minDate && isSameDay(nextValue, minDate) && nextValue < minDate) {\n nextValue.setHours(minDate.getHours(), minDate.getMinutes(), 0, 0);\n }\n if (maxDate && isSameDay(nextValue, maxDate) && nextValue > maxDate) {\n nextValue.setHours(maxDate.getHours(), maxDate.getMinutes(), 0, 0);\n }\n }\n setValue(nextValue);\n setFocusedDate(nextValue);\n setMonth(startOfMonth(nextValue));\n if (closeOnSelect) {\n close();\n }\n },\n [\n close,\n closeOnSelect,\n dateDisabled,\n disabled,\n granularity,\n maxDate,\n monthDisabled,\n minDate,\n selected,\n setMonth,\n setValue,\n ],\n );\n\n const onClear = useCallback(() => {\n setValue(null);\n }, [setValue]);\n\n const selectMonth = useCallback(\n (monthIndex: number) => {\n const nextMonth = clampMonth(createCalendarDate(month.getFullYear(), monthIndex, 1));\n if (monthDisabled(nextMonth)) return;\n setMonth(nextMonth);\n if (granularity === \"month\") {\n const nextValue = createCalendarDate(nextMonth.getFullYear(), nextMonth.getMonth(), 1);\n setFocusedDate(nextValue);\n setValue(nextValue);\n if (closeOnSelect) close();\n }\n },\n [clampMonth, close, closeOnSelect, granularity, month, monthDisabled, setMonth, setValue],\n );\n\n const selectYear = useCallback(\n (year: number) => {\n const nextMonth = clampMonth(createCalendarDate(year, month.getMonth(), 1));\n if (monthDisabled(nextMonth)) return;\n setMonth(nextMonth);\n if (granularity === \"month\") {\n const nextValue = createCalendarDate(nextMonth.getFullYear(), nextMonth.getMonth(), 1);\n setFocusedDate(nextValue);\n setValue(nextValue);\n if (closeOnSelect) close();\n }\n },\n [clampMonth, close, closeOnSelect, granularity, month, monthDisabled, setMonth, setValue],\n );\n\n const onTimeChange = useCallback(\n (value: string) => {\n const match = value.match(/^(\\d{2}):(\\d{2})$/);\n if (!match) return;\n const hours = Number(match[1]);\n const minutes = Number(match[2]);\n if (hours > 23 || minutes > 59) return;\n const baseDate = selected ?? focusedDate;\n const nextValue = createCalendarDate(\n baseDate.getFullYear(),\n baseDate.getMonth(),\n baseDate.getDate(),\n );\n nextValue.setHours(hours, minutes, 0, 0);\n if (minDate && isSameDay(nextValue, minDate) && nextValue < minDate) return;\n if (maxDate && isSameDay(nextValue, maxDate) && nextValue > maxDate) return;\n setValue(nextValue);\n },\n [focusedDate, maxDate, minDate, selected, setValue],\n );\n\n const focusDate = useCallback(\n (date: Date, direction = 1) => {\n let nextDate = createCalendarDate(date.getFullYear(), date.getMonth(), date.getDate());\n const step = direction < 0 ? -1 : 1;\n let attempts = 0;\n while (dateDisabled(nextDate) && attempts < 366) {\n nextDate = addDays(nextDate, step);\n attempts += 1;\n }\n\n setFocusedDate(nextDate);\n setMonth(nextDate);\n\n const focusTarget = () => dayRefs.current.get(dateKey(nextDate))?.focus();\n focusTarget();\n queueMicrotask(focusTarget);\n },\n [dateDisabled, setMonth],\n );\n\n const canNavigate = useCallback(\n (amount: number) => {\n const nextMonth = addMonths(month, amount);\n return !(\n (minMonth && isBeforeDay(nextMonth, minMonth)) ||\n (maxMonth && isAfterDay(nextMonth, maxMonth))\n );\n },\n [maxMonth, minMonth, month],\n );\n\n const registerDay = useCallback((key: string, node: HTMLButtonElement | null) => {\n if (node) {\n dayRefs.current.set(key, node);\n } else {\n dayRefs.current.delete(key);\n }\n }, []);\n\n const timeMin =\n selected && minDate && isSameDay(selected, minDate) ? toTimeInput(minDate) : undefined;\n const timeMax =\n selected && maxDate && isSameDay(selected, maxDate) ? toTimeInput(maxDate) : undefined;\n\n const context: DatePickerContextValue = {\n canNavigate,\n close,\n dateDisabled,\n granularity,\n disabled,\n focusDate,\n focusedDate,\n formatDate: (date) => formatDateLabel(date, locale, String(placeholder), granularity),\n labelId,\n locale,\n month,\n monthDisabled,\n onClear,\n onTimeChange,\n onSelect,\n selectMonth,\n selectYear,\n placeholder,\n registerDay,\n selected,\n setFocusedDate,\n setMonth,\n size,\n styles,\n today: createCalendarDate(today.getFullYear(), today.getMonth(), today.getDate()),\n timeMax,\n timeMin,\n triggerId,\n weekStartsOn,\n yearRange,\n };\n\n return (\n <DatePickerContext.Provider value={context}>\n <BasePopover.Root {...popoverProps} actionsRef={externalActionsRef ?? internalActionsRef}>\n {children}\n </BasePopover.Root>\n {name ? (\n <input\n disabled={disabled}\n name={name}\n type=\"hidden\"\n value={\n granularity === \"month\"\n ? toInputMonth(selected)\n : granularity === \"date-time\"\n ? toInputDateTime(selected)\n : toInputDate(selected)\n }\n />\n ) : null}\n </DatePickerContext.Provider>\n );\n}\n\nexport type DatePickerLabelProps = ComponentPropsWithoutRef<\"label\">;\n\nexport const DatePickerLabel = forwardRef<HTMLLabelElement, DatePickerLabelProps>(\n function DatePickerLabel({ children, className, ...props }, ref) {\n const { labelId, styles, triggerId } = useDatePickerContext();\n\n return (\n <label\n {...props}\n ref={ref}\n className={cx(styles.label, className)}\n data-slot=\"date-picker-label\"\n htmlFor={props.htmlFor ?? triggerId}\n id={props.id ?? labelId}\n >\n {children}\n </label>\n );\n },\n);\n\nexport type DatePickerControlProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const DatePickerControl = forwardRef<HTMLDivElement, DatePickerControlProps>(\n function DatePickerControl({ className, ...props }, ref) {\n const { styles } = useDatePickerContext();\n\n return (\n <div\n {...props}\n ref={ref}\n className={cx(styles.control, className)}\n data-jaci-component=\"date-picker\"\n data-slot=\"date-picker-control\"\n />\n );\n },\n);\n\nexport type DatePickerTriggerProps = ComponentPropsWithoutRef<typeof BasePopover.Trigger>;\n\nexport const DatePickerTrigger = forwardRef<HTMLButtonElement, DatePickerTriggerProps>(\n function DatePickerTrigger({ children, className, disabled, id, ...props }, ref) {\n const { disabled: pickerDisabled, styles, triggerId } = useDatePickerContext();\n\n return (\n <BasePopover.Trigger\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Choose date\"}\n disabled={disabled ?? pickerDisabled}\n id={id ?? triggerId}\n ref={ref}\n className={withRecipeClassName(styles.trigger, className)}\n data-jaci-component=\"date-picker\"\n data-slot=\"date-picker-trigger\"\n >\n {children ?? (\n <>\n <DatePickerValue />\n <span aria-hidden=\"true\">▾</span>\n </>\n )}\n </BasePopover.Trigger>\n );\n },\n);\n\nexport interface DatePickerValueProps extends ComponentPropsWithoutRef<\"span\"> {\n placeholder?: ReactNode;\n}\n\nexport const DatePickerValue = forwardRef<HTMLSpanElement, DatePickerValueProps>(\n function DatePickerValue({ children, className, placeholder, ...props }, ref) {\n const { formatDate, selected, styles } = useDatePickerContext();\n const value = children ?? (selected ? formatDate(selected) : (placeholder ?? \"Select a date\"));\n\n return (\n <span\n {...props}\n ref={ref}\n className={cx(styles.value, className)}\n data-placeholder={selected ? undefined : \"true\"}\n data-slot=\"date-picker-value\"\n >\n {value}\n </span>\n );\n },\n);\n\nexport type DatePickerClearProps = ComponentPropsWithoutRef<\"button\">;\n\nexport const DatePickerClear = forwardRef<HTMLButtonElement, DatePickerClearProps>(\n function DatePickerClear({ children = \"×\", className, disabled, onClick, ...props }, ref) {\n const { close, disabled: pickerDisabled, onClear, selected, styles } = useDatePickerContext();\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n onClear();\n onClick?.(event);\n close();\n };\n\n return (\n <button\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Clear date\"}\n className={cx(styles.clear, className)}\n data-slot=\"date-picker-clear\"\n disabled={disabled || pickerDisabled || !selected}\n onClick={handleClick}\n ref={ref}\n type=\"button\"\n >\n {children}\n </button>\n );\n },\n);\n\nexport type DatePickerPortalProps = ComponentPropsWithoutRef<typeof BasePopover.Portal>;\nexport const DatePickerPortal: typeof BasePopover.Portal = BasePopover.Portal;\n\nexport type DatePickerPositionerProps = ComponentPropsWithoutRef<typeof BasePopover.Positioner>;\n\nexport const DatePickerPositioner = forwardRef<HTMLDivElement, DatePickerPositionerProps>(\n function DatePickerPositioner({ className, ...props }, ref) {\n const { styles } = useDatePickerContext();\n\n return (\n <BasePopover.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.positioner, className)}\n data-slot=\"date-picker-positioner\"\n />\n );\n },\n);\n\nexport type DatePickerPopupProps = ComponentPropsWithoutRef<typeof BasePopover.Popup>;\n\nexport const DatePickerPopup = forwardRef<HTMLDivElement, DatePickerPopupProps>(\n function DatePickerPopup({ className, ...props }, ref) {\n const { styles } = useDatePickerContext();\n\n return (\n <BasePopover.Popup\n {...props}\n ref={ref}\n aria-label={props[\"aria-label\"] ?? \"Calendar\"}\n className={withRecipeClassName(styles.popup, className)}\n data-slot=\"date-picker-popup\"\n />\n );\n },\n);\n\nexport type DatePickerCloseProps = ComponentPropsWithoutRef<typeof BasePopover.Close>;\n\nexport const DatePickerClose = forwardRef<HTMLButtonElement, DatePickerCloseProps>(\n function DatePickerClose({ className, ...props }, ref) {\n const { styles } = useDatePickerContext();\n\n return (\n <BasePopover.Close\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.close, className)}\n data-slot=\"date-picker-close\"\n />\n );\n },\n);\n\nexport type DatePickerHeaderProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const DatePickerHeader = forwardRef<HTMLDivElement, DatePickerHeaderProps>(\n function DatePickerHeader({ className, ...props }, ref) {\n const { styles } = useDatePickerContext();\n\n return (\n <div\n {...props}\n ref={ref}\n className={cx(styles.header, className)}\n data-slot=\"date-picker-header\"\n />\n );\n },\n);\n\nexport type DatePickerCaptionProps = ComponentPropsWithoutRef<\"span\">;\n\nexport const DatePickerCaption = forwardRef<HTMLSpanElement, DatePickerCaptionProps>(\n function DatePickerCaption({ children, className, ...props }, ref) {\n const { locale, month, styles } = useDatePickerContext();\n\n return (\n <span\n {...props}\n ref={ref}\n className={cx(styles.caption, className)}\n data-slot=\"date-picker-caption\"\n >\n {children ?? formatMonthLabel(month, locale)}\n </span>\n );\n },\n);\n\nexport type DatePickerMonthSelectProps = Omit<\n ComponentPropsWithoutRef<\"select\">,\n \"children\" | \"onChange\" | \"value\"\n>;\n\nexport const DatePickerMonthSelect = forwardRef<HTMLSelectElement, DatePickerMonthSelectProps>(\n function DatePickerMonthSelect({ className, ...props }, ref) {\n const { locale, month, monthDisabled, selectMonth, styles } = useDatePickerContext();\n const labels = getMonthLabels(locale);\n\n return (\n <select\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Select month\"}\n className={cx(styles.monthSelect, className)}\n data-slot=\"date-picker-month-select\"\n onChange={(event) => selectMonth(Number(event.currentTarget.value))}\n ref={ref}\n value={month.getMonth()}\n >\n {labels.map((label, monthIndex) => (\n <option\n disabled={monthDisabled(createCalendarDate(month.getFullYear(), monthIndex, 1))}\n key={label}\n value={monthIndex}\n >\n {label}\n </option>\n ))}\n </select>\n );\n },\n);\n\nexport type DatePickerYearSelectProps = Omit<\n ComponentPropsWithoutRef<\"select\">,\n \"children\" | \"onChange\" | \"value\"\n>;\n\nexport const DatePickerYearSelect = forwardRef<HTMLSelectElement, DatePickerYearSelectProps>(\n function DatePickerYearSelect({ className, ...props }, ref) {\n const { month, monthDisabled, selectYear, styles, yearRange } = useDatePickerContext();\n const years = Array.from(\n { length: yearRange.end - yearRange.start + 1 },\n (_, index) => yearRange.start + index,\n );\n\n return (\n <select\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Select year\"}\n className={cx(styles.yearSelect, className)}\n data-slot=\"date-picker-year-select\"\n onChange={(event) => selectYear(Number(event.currentTarget.value))}\n ref={ref}\n value={month.getFullYear()}\n >\n {years.map((year) => (\n <option\n disabled={monthDisabled(createCalendarDate(year, month.getMonth(), 1))}\n key={year}\n value={year}\n >\n {year}\n </option>\n ))}\n </select>\n );\n },\n);\n\nexport type DatePickerTimeFieldProps = Omit<\n ComponentPropsWithoutRef<\"input\">,\n \"onChange\" | \"type\" | \"value\"\n>;\n\nexport const DatePickerTimeField = forwardRef<HTMLInputElement, DatePickerTimeFieldProps>(\n function DatePickerTimeField({ className, ...props }, ref) {\n const { disabled, granularity, onTimeChange, selected, styles, timeMax, timeMin } =\n useDatePickerContext();\n if (granularity !== \"date-time\") return null;\n\n return (\n <input\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Select time\"}\n className={cx(styles.timeField, className)}\n data-slot=\"date-picker-time-field\"\n disabled={disabled || !selected}\n max={timeMax}\n min={timeMin}\n onChange={(event) => onTimeChange(event.currentTarget.value)}\n ref={ref}\n type=\"time\"\n value={toTimeInput(selected)}\n />\n );\n },\n);\n\nexport interface DatePickerNavigationProps extends ComponentPropsWithoutRef<\"button\"> {\n amount?: number;\n}\n\nconst DatePickerNavigationButton = forwardRef<HTMLButtonElement, DatePickerNavigationProps>(\n function DatePickerNavigationButton({ amount, children, className, onClick, ...props }, ref) {\n const { canNavigate, month, setMonth, styles } = useDatePickerContext();\n const direction = amount ?? 1;\n const isDisabled = props.disabled || !canNavigate(direction);\n\n return (\n <button\n {...props}\n aria-label={props[\"aria-label\"] ?? (direction < 0 ? \"Previous month\" : \"Next month\")}\n className={cx(styles.navigation, className)}\n data-slot={direction < 0 ? \"date-picker-previous\" : \"date-picker-next\"}\n disabled={isDisabled}\n onClick={(event) => {\n if (!isDisabled) setMonth(addMonths(month, direction));\n onClick?.(event);\n }}\n ref={ref}\n type=\"button\"\n >\n {children ?? (direction < 0 ? \"‹\" : \"›\")}\n </button>\n );\n },\n);\n\nexport const DatePickerPrevious = forwardRef<HTMLButtonElement, DatePickerNavigationProps>(\n function DatePickerPrevious(props, ref) {\n return <DatePickerNavigationButton {...props} amount={-1} ref={ref} />;\n },\n);\n\nexport const DatePickerNext = forwardRef<HTMLButtonElement, DatePickerNavigationProps>(\n function DatePickerNext(props, ref) {\n return <DatePickerNavigationButton {...props} amount={1} ref={ref} />;\n },\n);\n\nexport interface DatePickerDayProps extends Omit<ComponentPropsWithoutRef<\"button\">, \"value\"> {\n date: Date;\n}\n\nexport const DatePickerDay = forwardRef<HTMLButtonElement, DatePickerDayProps>(\n function DatePickerDay(\n { children, className, date, disabled, onClick, onKeyDown, ...props },\n ref,\n ) {\n const {\n dateDisabled,\n disabled: pickerDisabled,\n focusDate,\n focusedDate,\n locale,\n month,\n onSelect,\n registerDay,\n selected,\n styles,\n today,\n } = useDatePickerContext();\n const key = dateKey(date);\n const outsideMonth = !isSameMonth(date, month);\n const isDisabled = disabled || pickerDisabled || dateDisabled(date);\n const isFocused = isSameDay(date, focusedDate);\n const isSelected = isSameDay(date, selected);\n const isToday = isSameDay(date, today);\n const dayRef = composeRefs(ref, (node) => registerDay(key, node));\n\n const moveByKey = (event: KeyboardEvent<HTMLButtonElement>) => {\n if (event.defaultPrevented) {\n return;\n }\n\n let nextDate: Date | undefined;\n switch (event.key) {\n case \"ArrowLeft\":\n nextDate = addDays(date, -1);\n break;\n case \"ArrowRight\":\n nextDate = addDays(date, 1);\n break;\n case \"ArrowUp\":\n nextDate = addDays(date, -7);\n break;\n case \"ArrowDown\":\n nextDate = addDays(date, 7);\n break;\n case \"Home\":\n nextDate = addDays(date, -date.getDay());\n break;\n case \"End\":\n nextDate = addDays(date, 6 - date.getDay());\n break;\n case \"PageUp\":\n nextDate = addMonths(date, event.shiftKey ? -12 : -1);\n break;\n case \"PageDown\":\n nextDate = addMonths(date, event.shiftKey ? 12 : 1);\n break;\n case \"Enter\":\n case \" \":\n if (!isDisabled) {\n event.preventDefault();\n onSelect(date);\n }\n break;\n default:\n break;\n }\n\n if (nextDate) {\n event.preventDefault();\n focusDate(nextDate, nextDate < date ? -1 : 1);\n }\n };\n\n return (\n // biome-ignore lint/a11y/useSemanticElements: A calendar day is an interactive gridcell, not a generic table cell.\n <button\n {...props}\n ref={dayRef}\n aria-label={props[\"aria-label\"] ?? getDateRangeLabel(date, locale)}\n aria-current={isToday ? \"date\" : undefined}\n aria-selected={isSelected}\n className={cx(styles.day, className)}\n data-date={key}\n data-disabled={isDisabled || undefined}\n data-outside-month={outsideMonth || undefined}\n data-selected={isSelected || undefined}\n data-slot=\"date-picker-day\"\n data-today={isToday || undefined}\n disabled={isDisabled}\n onClick={(event) => {\n onSelect(date);\n onClick?.(event);\n }}\n onKeyDown={(event) => {\n moveByKey(event);\n onKeyDown?.(event);\n }}\n role=\"gridcell\"\n tabIndex={isFocused && !isDisabled ? 0 : -1}\n type=\"button\"\n >\n {children ?? date.getDate()}\n </button>\n );\n },\n);\n\ninterface DatePickerMonthButtonProps {\n date: Date;\n}\n\nconst DatePickerMonthButton = forwardRef<HTMLButtonElement, DatePickerMonthButtonProps>(\n function DatePickerMonthButton({ date }, ref) {\n const { disabled, granularity, locale, monthDisabled, onSelect, selected, styles } =\n useDatePickerContext();\n const isDisabled = disabled || monthDisabled(date);\n const isSelected = granularity === \"month\" && Boolean(selected && isSameMonth(selected, date));\n\n return (\n // biome-ignore lint/a11y/useSemanticElements: Month choices use the calendar gridcell pattern.\n <button\n aria-label={new Intl.DateTimeFormat(locale, { month: \"long\" }).format(date)}\n aria-selected={isSelected}\n className={styles.month}\n data-disabled={isDisabled || undefined}\n data-selected={isSelected || undefined}\n data-slot=\"date-picker-month\"\n disabled={isDisabled}\n onClick={() => onSelect(date)}\n ref={ref}\n role=\"gridcell\"\n type=\"button\"\n >\n {new Intl.DateTimeFormat(locale, { month: \"short\" }).format(date)}\n </button>\n );\n },\n);\n\nexport interface DatePickerCalendarProps\n extends Omit<ComponentPropsWithoutRef<\"section\">, \"children\"> {\n \"aria-label\"?: string;\n}\n\nexport const DatePickerCalendar = forwardRef<HTMLElement, DatePickerCalendarProps>(\n function DatePickerCalendar({ \"aria-label\": ariaLabel, className, ...props }, ref) {\n const { granularity, locale, month, styles, weekStartsOn } = useDatePickerContext();\n const days = useMemo(() => getCalendarDays(month, weekStartsOn), [month, weekStartsOn]);\n const weekdays = useMemo(() => getWeekdayLabels(locale, weekStartsOn), [locale, weekStartsOn]);\n const monthDates = useMemo(\n () =>\n Array.from({ length: 12 }, (_, index) => createCalendarDate(month.getFullYear(), index, 1)),\n [month],\n );\n\n return (\n <section\n {...props}\n ref={ref}\n aria-label={ariaLabel ?? formatMonthLabel(month, locale)}\n className={cx(styles.calendar, className)}\n data-granularity={granularity}\n data-slot=\"date-picker-calendar\"\n >\n {granularity === \"month\" ? (\n // biome-ignore lint/a11y/useSemanticElements: Month selection uses the calendar grid pattern.\n <div\n aria-label={String(month.getFullYear())}\n className={styles.monthGrid}\n data-slot=\"date-picker-month-grid\"\n role=\"grid\"\n >\n {monthDates.map((date) => (\n <DatePickerMonthButton date={date} key={dateKey(date)} />\n ))}\n </div>\n ) : (\n <>\n <div aria-hidden=\"true\" className={styles.weekdays} data-slot=\"date-picker-weekdays\">\n {weekdays.map((weekday) => (\n <span className={styles.weekday} data-slot=\"date-picker-weekday\" key={weekday}>\n {weekday}\n </span>\n ))}\n </div>\n {/* biome-ignore lint/a11y/useSemanticElements: Calendar grids use the WAI-ARIA grid pattern for roving day focus. */}\n <div\n aria-label={formatMonthLabel(month, locale)}\n className={styles.grid}\n data-slot=\"date-picker-grid\"\n role=\"grid\"\n >\n {days.map((date) => (\n <DatePickerDay date={date} key={dateKey(date)} />\n ))}\n </div>\n </>\n )}\n </section>\n );\n },\n);\n\nexport const DatePicker = {\n Root: DatePickerRoot,\n Label: DatePickerLabel,\n Control: DatePickerControl,\n Trigger: DatePickerTrigger,\n Value: DatePickerValue,\n Clear: DatePickerClear,\n Portal: DatePickerPortal,\n Positioner: DatePickerPositioner,\n Popup: DatePickerPopup,\n Close: DatePickerClose,\n Header: DatePickerHeader,\n Caption: DatePickerCaption,\n MonthSelect: DatePickerMonthSelect,\n YearSelect: DatePickerYearSelect,\n TimeField: DatePickerTimeField,\n Previous: DatePickerPrevious,\n Next: DatePickerNext,\n Day: DatePickerDay,\n Calendar: DatePickerCalendar,\n};\n"],"mappings":";;;;;;;;;AAmFA,MAAM,qBAAA,GAAA,MAAA,cAAA,CAAiE,IAAI;AAE3E,SAAS,uBAAuB;CAC9B,MAAM,WAAA,GAAA,MAAA,WAAA,CAAqB,iBAAiB;CAC5C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,2DAA2D;CAG7E,OAAO;AACT;AAEA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AA6B,KAA2B,GAAhBR,mBAAAA,QAAQ,IAAI,CAAI,CACzD;EACE,CAAA,IAEL,iBAAA,GAAA,kBAAA,KAAA,CAAA,kBAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GAAK,eAAY;GAAO,WAAW,OAAO;GAAU,aAAU;aAC3D,SAAS,KAAK,YACb,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,WAAW,OAAO;IAAS,aAAU;cACxC;GACG,GAFgE,OAEhE,CACP;EACE,CAAA,GAEL,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GACE,cAAYU,mBAAAA,iBAAiB,OAAO,MAAM;GAC1C,WAAW,OAAO;GAClB,aAAU;GACV,MAAK;aAEJ,KAAK,KAAK,SACT,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAD,EAAqB,KAA2B,GAAhBV,mBAAAA,QAAQ,IAAI,CAAI,CACjD;EACE,CAAA,CACL,EAAA,CAAA;CAEG,CAAA;AAEb,CACF;AAEA,MAAa,aAAa;CACxB,MAAM;CACN,OAAO;CACP,SAAS;CACT,SAAS;CACT,OAAO;CACP,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,OAAO;CACP,QAAQ;CACR,SAAS;CACT,aAAa;CACb,YAAY;CACZ,WAAW;CACX,UAAU;CACV,MAAM;CACN,KAAK;CACL,UAAU;AACZ"}
1
+ {"version":3,"file":"date-picker.cjs","names":["startOfMonth","datePicker","isBeforeDay","isAfterDay","createCalendarDate","isSameDay","addDays","dateKey","addMonths","toTimeInput","formatDateLabel","BasePopover","toInputMonth","toInputDateTime","toInputDate","cx","withRecipeClassName","formatMonthLabel","getMonthLabels","getDateRangeLabel","getCalendarDays","getWeekdayLabels"],"sources":["../../../src/components/date-picker/date-picker.tsx"],"sourcesContent":["\"use client\";\n\nimport { Popover as BasePopover } from \"@base-ui/react/popover\";\nimport {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport type { ComponentPropsWithoutRef, KeyboardEvent, MouseEvent, ReactNode, Ref } from \"react\";\nimport type { PopoverRoot as BasePopoverRoot } from \"@base-ui/react/popover\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { datePicker } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport {\n addDays,\n addMonths,\n createCalendarDate,\n dateKey,\n formatDateLabel,\n formatMonthLabel,\n getCalendarDays,\n getDateRangeLabel,\n getMonthLabels,\n getWeekdayLabels,\n isAfterDay,\n isBeforeDay,\n isSameDay,\n startOfMonth,\n toInputDate,\n toInputDateTime,\n toInputMonth,\n toTimeInput,\n} from \"./date-utils\";\nimport type { DatePickerGranularity } from \"./date-utils\";\n\nexport type DatePickerSize = \"sm\" | \"md\" | \"lg\";\nexport type { DatePickerGranularity } from \"./date-utils\";\n\nexport interface DatePickerYearRange {\n start: number;\n end: number;\n}\n\ninterface DatePickerContextValue {\n canNavigate: (amount: number) => boolean;\n close: () => void;\n dateDisabled: (date: Date) => boolean;\n granularity: DatePickerGranularity;\n disabled: boolean;\n focusDate: (date: Date, direction?: number) => void;\n focusedDate: Date;\n formatDate: (date: Date | null) => string;\n labelId: string;\n locale: string;\n month: Date;\n monthDisabled: (date: Date) => boolean;\n onClear: () => void;\n onTimeChange: (value: string) => void;\n onSelect: (date: Date) => void;\n selectMonth: (month: number) => void;\n selectYear: (year: number) => void;\n placeholder: ReactNode;\n registerDay: (key: string, node: HTMLButtonElement | null) => void;\n selected: Date | null;\n setFocusedDate: (date: Date) => void;\n setMonth: (date: Date) => void;\n size: DatePickerSize;\n styles: ReturnType<typeof datePicker>;\n today: Date;\n timeMax: string | undefined;\n timeMin: string | undefined;\n triggerId: string;\n weekStartsOn: number;\n yearRange: DatePickerYearRange;\n}\n\nconst DatePickerContext = createContext<DatePickerContextValue | null>(null);\n\nfunction useDatePickerContext() {\n const context = useContext(DatePickerContext);\n if (!context) {\n throw new Error(\"DatePicker parts must be rendered inside DatePicker.Root.\");\n }\n\n return context;\n}\n\nfunction isSameMonth(left: Date, right: Date) {\n return left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth();\n}\n\nfunction composeRefs<T>(first: Ref<T> | undefined, second: (value: T | null) => void) {\n return (value: T | null) => {\n second(value);\n if (typeof first === \"function\") {\n first(value);\n } else if (first) {\n first.current = value;\n }\n };\n}\n\nexport interface DatePickerRootProps extends Omit<BasePopoverRoot.Props, \"children\"> {\n /** Selected value. Use together with `onValueChange` for a controlled picker. */\n value?: Date | null;\n /** Initial selected value for an uncontrolled picker. */\n defaultValue?: Date | null;\n /** Called after a valid day, month, or time is selected, or when the value is cleared. */\n onValueChange?: (value: Date | null) => void;\n /** Prevents dates before this local calendar day from being selected. */\n minDate?: Date;\n /** Prevents dates after this local calendar day from being selected. */\n maxDate?: Date;\n /** Adds application-specific disabled dates, such as holidays or weekends. */\n isDateDisabled?: (date: Date) => boolean;\n /** Locale used for month, weekday and value formatting. */\n locale?: string;\n /** Called after the visible calendar month changes. */\n onMonthChange?: (month: Date) => void;\n /** First weekday in the calendar, where 0 is Sunday and 1 is Monday. */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n /** Text shown when no date has been selected. */\n placeholder?: ReactNode;\n /** Shared visual size for the trigger and calendar days. */\n size?: DatePickerSize;\n /** Controls whether the picker selects days, months, or date and time. */\n granularity?: DatePickerGranularity;\n /** Inclusive range used by the year selector. */\n yearRange?: DatePickerYearRange;\n /** Reference date used when no value is selected, useful for deterministic SSR and tests. */\n referenceDate?: Date;\n /** Adds a native hidden input using the representation for the selected granularity. */\n name?: string;\n /** Prevents interaction and disables the hidden form input. */\n disabled?: boolean;\n /** Closes the popup after a value is chosen. Defaults to false for date-time mode and true otherwise. */\n closeOnSelect?: boolean;\n children?: ReactNode;\n}\n\nexport function DatePickerRoot({\n children,\n closeOnSelect: closeOnSelectProp,\n defaultValue = null,\n disabled = false,\n granularity = \"day\",\n isDateDisabled,\n locale = \"pt-BR\",\n maxDate,\n minDate,\n name,\n onValueChange,\n onMonthChange,\n placeholder = \"Select a date\",\n size = \"md\",\n value: controlledValue,\n weekStartsOn = 0,\n yearRange: configuredYearRange,\n referenceDate,\n actionsRef: externalActionsRef,\n ...popoverProps\n}: DatePickerRootProps) {\n const [uncontrolledValue, setUncontrolledValue] = useState<Date | null>(defaultValue);\n const selected = controlledValue === undefined ? uncontrolledValue : controlledValue;\n const [month, setMonthState] = useState(() =>\n startOfMonth(selected ?? referenceDate ?? new Date()),\n );\n const [focusedDate, setFocusedDate] = useState(selected ?? referenceDate ?? month);\n const previousMonthRef = useRef(month);\n const internalActionsRef = useRef<BasePopoverRoot.Actions | null>(null);\n const dayRefs = useRef(new Map<string, HTMLButtonElement>());\n const labelId = useId();\n const triggerId = useId();\n const today = useMemo(() => referenceDate ?? new Date(), [referenceDate]);\n const styles = datePicker({ size });\n const minMonth = minDate ? startOfMonth(minDate) : undefined;\n const maxMonth = maxDate ? startOfMonth(maxDate) : undefined;\n const closeOnSelect = closeOnSelectProp ?? granularity !== \"date-time\";\n const yearRange = useMemo(() => {\n const defaultStart = today.getFullYear() - 100;\n const defaultEnd = today.getFullYear() + 20;\n const start = configuredYearRange?.start ?? defaultStart;\n const end = configuredYearRange?.end ?? defaultEnd;\n const years = [selected?.getFullYear(), minDate?.getFullYear(), maxDate?.getFullYear()].filter(\n (year): year is number => year !== undefined,\n );\n return {\n end: Math.max(start, end, ...years),\n start: Math.min(start, end, ...years),\n };\n }, [configuredYearRange?.end, configuredYearRange?.start, maxDate, minDate, selected, today]);\n\n const clampMonth = useCallback(\n (nextMonth: Date) => {\n const normalized = startOfMonth(nextMonth);\n if (minMonth && isBeforeDay(normalized, minMonth)) return minMonth;\n if (maxMonth && isAfterDay(normalized, maxMonth)) return maxMonth;\n return normalized;\n },\n [maxMonth, minMonth],\n );\n\n const setMonth = useCallback(\n (nextMonth: Date) => {\n const normalized = clampMonth(nextMonth);\n setMonthState((current) => {\n if (isSameMonth(current, normalized)) return current;\n return normalized;\n });\n },\n [clampMonth],\n );\n\n useEffect(() => {\n if (isSameMonth(previousMonthRef.current, month)) return;\n previousMonthRef.current = month;\n onMonthChange?.(month);\n }, [month, onMonthChange]);\n\n useEffect(() => {\n if (!selected) {\n return;\n }\n\n setFocusedDate(selected);\n setMonthState((current) => (isSameMonth(current, selected) ? current : clampMonth(selected)));\n }, [clampMonth, selected]);\n\n const dateDisabled = useCallback(\n (date: Date) =>\n Boolean(\n (minDate && isBeforeDay(date, minDate)) ||\n (maxDate && isAfterDay(date, maxDate)) ||\n isDateDisabled?.(date),\n ),\n [isDateDisabled, maxDate, minDate],\n );\n\n const close = useCallback(() => {\n (externalActionsRef ?? internalActionsRef).current?.close();\n }, [externalActionsRef]);\n\n const setValue = useCallback(\n (nextValue: Date | null) => {\n if (controlledValue === undefined) setUncontrolledValue(nextValue);\n onValueChange?.(nextValue);\n },\n [controlledValue, onValueChange],\n );\n\n const monthDisabled = useCallback(\n (candidate: Date) => {\n const firstDay = startOfMonth(candidate);\n const lastDay = createCalendarDate(candidate.getFullYear(), candidate.getMonth() + 1, 0);\n return Boolean(\n (minDate && isBeforeDay(lastDay, minDate)) || (maxDate && isAfterDay(firstDay, maxDate)),\n );\n },\n [maxDate, minDate],\n );\n\n const onSelect = useCallback(\n (date: Date) => {\n if (disabled || (granularity === \"month\" ? monthDisabled(date) : dateDisabled(date))) {\n return;\n }\n\n const nextValue = createCalendarDate(\n date.getFullYear(),\n date.getMonth(),\n granularity === \"month\" ? 1 : date.getDate(),\n );\n if (granularity === \"date-time\") {\n nextValue.setHours(selected?.getHours() ?? 12, selected?.getMinutes() ?? 0, 0, 0);\n if (minDate && isSameDay(nextValue, minDate) && nextValue < minDate) {\n nextValue.setHours(minDate.getHours(), minDate.getMinutes(), 0, 0);\n }\n if (maxDate && isSameDay(nextValue, maxDate) && nextValue > maxDate) {\n nextValue.setHours(maxDate.getHours(), maxDate.getMinutes(), 0, 0);\n }\n }\n setValue(nextValue);\n setFocusedDate(nextValue);\n setMonth(startOfMonth(nextValue));\n if (closeOnSelect) {\n close();\n }\n },\n [\n close,\n closeOnSelect,\n dateDisabled,\n disabled,\n granularity,\n maxDate,\n monthDisabled,\n minDate,\n selected,\n setMonth,\n setValue,\n ],\n );\n\n const onClear = useCallback(() => {\n setValue(null);\n }, [setValue]);\n\n const selectMonth = useCallback(\n (monthIndex: number) => {\n const nextMonth = clampMonth(createCalendarDate(month.getFullYear(), monthIndex, 1));\n if (monthDisabled(nextMonth)) return;\n setMonth(nextMonth);\n if (granularity === \"month\") {\n const nextValue = createCalendarDate(nextMonth.getFullYear(), nextMonth.getMonth(), 1);\n setFocusedDate(nextValue);\n setValue(nextValue);\n if (closeOnSelect) close();\n }\n },\n [clampMonth, close, closeOnSelect, granularity, month, monthDisabled, setMonth, setValue],\n );\n\n const selectYear = useCallback(\n (year: number) => {\n const nextMonth = clampMonth(createCalendarDate(year, month.getMonth(), 1));\n if (monthDisabled(nextMonth)) return;\n setMonth(nextMonth);\n if (granularity === \"month\") {\n const nextValue = createCalendarDate(nextMonth.getFullYear(), nextMonth.getMonth(), 1);\n setFocusedDate(nextValue);\n setValue(nextValue);\n if (closeOnSelect) close();\n }\n },\n [clampMonth, close, closeOnSelect, granularity, month, monthDisabled, setMonth, setValue],\n );\n\n const onTimeChange = useCallback(\n (value: string) => {\n const match = value.match(/^(\\d{2}):(\\d{2})$/);\n if (!match) return;\n const hours = Number(match[1]);\n const minutes = Number(match[2]);\n if (hours > 23 || minutes > 59) return;\n const baseDate = selected ?? focusedDate;\n const nextValue = createCalendarDate(\n baseDate.getFullYear(),\n baseDate.getMonth(),\n baseDate.getDate(),\n );\n nextValue.setHours(hours, minutes, 0, 0);\n if (minDate && isSameDay(nextValue, minDate) && nextValue < minDate) return;\n if (maxDate && isSameDay(nextValue, maxDate) && nextValue > maxDate) return;\n setValue(nextValue);\n },\n [focusedDate, maxDate, minDate, selected, setValue],\n );\n\n const focusDate = useCallback(\n (date: Date, direction = 1) => {\n let nextDate = createCalendarDate(date.getFullYear(), date.getMonth(), date.getDate());\n const step = direction < 0 ? -1 : 1;\n let attempts = 0;\n while (dateDisabled(nextDate) && attempts < 366) {\n nextDate = addDays(nextDate, step);\n attempts += 1;\n }\n\n setFocusedDate(nextDate);\n setMonth(nextDate);\n\n const focusTarget = () => dayRefs.current.get(dateKey(nextDate))?.focus();\n focusTarget();\n queueMicrotask(focusTarget);\n },\n [dateDisabled, setMonth],\n );\n\n const canNavigate = useCallback(\n (amount: number) => {\n const nextMonth = addMonths(month, amount);\n return !(\n (minMonth && isBeforeDay(nextMonth, minMonth)) ||\n (maxMonth && isAfterDay(nextMonth, maxMonth))\n );\n },\n [maxMonth, minMonth, month],\n );\n\n const registerDay = useCallback((key: string, node: HTMLButtonElement | null) => {\n if (node) {\n dayRefs.current.set(key, node);\n } else {\n dayRefs.current.delete(key);\n }\n }, []);\n\n const timeMin =\n selected && minDate && isSameDay(selected, minDate) ? toTimeInput(minDate) : undefined;\n const timeMax =\n selected && maxDate && isSameDay(selected, maxDate) ? toTimeInput(maxDate) : undefined;\n\n const context: DatePickerContextValue = {\n canNavigate,\n close,\n dateDisabled,\n granularity,\n disabled,\n focusDate,\n focusedDate,\n formatDate: (date) => formatDateLabel(date, locale, String(placeholder), granularity),\n labelId,\n locale,\n month,\n monthDisabled,\n onClear,\n onTimeChange,\n onSelect,\n selectMonth,\n selectYear,\n placeholder,\n registerDay,\n selected,\n setFocusedDate,\n setMonth,\n size,\n styles,\n today: createCalendarDate(today.getFullYear(), today.getMonth(), today.getDate()),\n timeMax,\n timeMin,\n triggerId,\n weekStartsOn,\n yearRange,\n };\n\n return (\n <DatePickerContext.Provider value={context}>\n <BasePopover.Root {...popoverProps} actionsRef={externalActionsRef ?? internalActionsRef}>\n {children}\n </BasePopover.Root>\n {name ? (\n <input\n disabled={disabled}\n name={name}\n type=\"hidden\"\n value={\n granularity === \"month\"\n ? toInputMonth(selected)\n : granularity === \"date-time\"\n ? toInputDateTime(selected)\n : toInputDate(selected)\n }\n />\n ) : null}\n </DatePickerContext.Provider>\n );\n}\n\nexport type DatePickerLabelProps = ComponentPropsWithoutRef<\"label\">;\n\nexport const DatePickerLabel = forwardRef<HTMLLabelElement, DatePickerLabelProps>(\n function DatePickerLabel({ children, className, ...props }, ref) {\n const { labelId, styles, triggerId } = useDatePickerContext();\n\n return (\n <label\n {...props}\n ref={ref}\n className={cx(styles.label, className)}\n data-slot=\"date-picker-label\"\n htmlFor={props.htmlFor ?? triggerId}\n id={props.id ?? labelId}\n >\n {children}\n </label>\n );\n },\n);\n\nexport type DatePickerControlProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const DatePickerControl = forwardRef<HTMLDivElement, DatePickerControlProps>(\n function DatePickerControl({ className, ...props }, ref) {\n const { styles } = useDatePickerContext();\n\n return (\n <div\n {...props}\n ref={ref}\n className={cx(styles.control, className)}\n data-jaci-component=\"date-picker\"\n data-slot=\"date-picker-control\"\n />\n );\n },\n);\n\nexport type DatePickerTriggerProps = ComponentPropsWithoutRef<typeof BasePopover.Trigger>;\n\nexport const DatePickerTrigger = forwardRef<HTMLButtonElement, DatePickerTriggerProps>(\n function DatePickerTrigger({ children, className, disabled, id, ...props }, ref) {\n const { disabled: pickerDisabled, styles, triggerId } = useDatePickerContext();\n\n return (\n <BasePopover.Trigger\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Choose date\"}\n disabled={disabled ?? pickerDisabled}\n id={id ?? triggerId}\n ref={ref}\n className={withRecipeClassName(styles.trigger, className)}\n data-jaci-component=\"date-picker\"\n data-slot=\"date-picker-trigger\"\n >\n {children ?? (\n <>\n <DatePickerValue />\n <span aria-hidden=\"true\">▾</span>\n </>\n )}\n </BasePopover.Trigger>\n );\n },\n);\n\nexport interface DatePickerValueProps extends ComponentPropsWithoutRef<\"span\"> {\n placeholder?: ReactNode;\n}\n\nexport const DatePickerValue = forwardRef<HTMLSpanElement, DatePickerValueProps>(\n function DatePickerValue({ children, className, placeholder, ...props }, ref) {\n const { formatDate, selected, styles } = useDatePickerContext();\n const value = children ?? (selected ? formatDate(selected) : (placeholder ?? \"Select a date\"));\n\n return (\n <span\n {...props}\n ref={ref}\n className={cx(styles.value, className)}\n data-placeholder={selected ? undefined : \"true\"}\n data-slot=\"date-picker-value\"\n >\n {value}\n </span>\n );\n },\n);\n\nexport type DatePickerClearProps = ComponentPropsWithoutRef<\"button\">;\n\nexport const DatePickerClear = forwardRef<HTMLButtonElement, DatePickerClearProps>(\n function DatePickerClear({ children = \"×\", className, disabled, onClick, ...props }, ref) {\n const { close, disabled: pickerDisabled, onClear, selected, styles } = useDatePickerContext();\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n onClear();\n onClick?.(event);\n close();\n };\n\n return (\n <button\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Clear date\"}\n className={cx(styles.clear, className)}\n data-slot=\"date-picker-clear\"\n disabled={disabled || pickerDisabled || !selected}\n onClick={handleClick}\n ref={ref}\n type=\"button\"\n >\n {children}\n </button>\n );\n },\n);\n\nexport type DatePickerPortalProps = ComponentPropsWithoutRef<typeof BasePopover.Portal>;\nexport const DatePickerPortal: typeof BasePopover.Portal = BasePopover.Portal;\n\nexport type DatePickerPositionerProps = ComponentPropsWithoutRef<typeof BasePopover.Positioner>;\n\nexport const DatePickerPositioner = forwardRef<HTMLDivElement, DatePickerPositionerProps>(\n function DatePickerPositioner({ className, ...props }, ref) {\n const { styles } = useDatePickerContext();\n\n return (\n <BasePopover.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.positioner, className)}\n data-slot=\"date-picker-positioner\"\n />\n );\n },\n);\n\nexport type DatePickerPopupProps = ComponentPropsWithoutRef<typeof BasePopover.Popup>;\n\nexport const DatePickerPopup = forwardRef<HTMLDivElement, DatePickerPopupProps>(\n function DatePickerPopup({ className, ...props }, ref) {\n const { styles } = useDatePickerContext();\n\n return (\n <BasePopover.Popup\n {...props}\n ref={ref}\n aria-label={props[\"aria-label\"] ?? \"Calendar\"}\n className={withRecipeClassName(styles.popup, className)}\n data-slot=\"date-picker-popup\"\n />\n );\n },\n);\n\nexport type DatePickerCloseProps = ComponentPropsWithoutRef<typeof BasePopover.Close>;\n\nexport const DatePickerClose = forwardRef<HTMLButtonElement, DatePickerCloseProps>(\n function DatePickerClose({ className, ...props }, ref) {\n const { styles } = useDatePickerContext();\n\n return (\n <BasePopover.Close\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.close, className)}\n data-slot=\"date-picker-close\"\n />\n );\n },\n);\n\nexport type DatePickerHeaderProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const DatePickerHeader = forwardRef<HTMLDivElement, DatePickerHeaderProps>(\n function DatePickerHeader({ className, ...props }, ref) {\n const { styles } = useDatePickerContext();\n\n return (\n <div\n {...props}\n ref={ref}\n className={cx(styles.header, className)}\n data-slot=\"date-picker-header\"\n />\n );\n },\n);\n\nexport type DatePickerCaptionProps = ComponentPropsWithoutRef<\"span\">;\n\nexport const DatePickerCaption = forwardRef<HTMLSpanElement, DatePickerCaptionProps>(\n function DatePickerCaption({ children, className, ...props }, ref) {\n const { locale, month, styles } = useDatePickerContext();\n\n return (\n <span\n {...props}\n ref={ref}\n className={cx(styles.caption, className)}\n data-slot=\"date-picker-caption\"\n >\n {children ?? formatMonthLabel(month, locale)}\n </span>\n );\n },\n);\n\nexport type DatePickerMonthSelectProps = Omit<\n ComponentPropsWithoutRef<\"select\">,\n \"children\" | \"onChange\" | \"value\"\n>;\n\nexport const DatePickerMonthSelect = forwardRef<HTMLSelectElement, DatePickerMonthSelectProps>(\n function DatePickerMonthSelect({ className, ...props }, ref) {\n const { locale, month, monthDisabled, selectMonth, styles } = useDatePickerContext();\n const labels = getMonthLabels(locale);\n\n return (\n <select\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Select month\"}\n className={cx(styles.monthSelect, className)}\n data-slot=\"date-picker-month-select\"\n onChange={(event) => selectMonth(Number(event.currentTarget.value))}\n ref={ref}\n value={month.getMonth()}\n >\n {labels.map((label, monthIndex) => (\n <option\n disabled={monthDisabled(createCalendarDate(month.getFullYear(), monthIndex, 1))}\n key={label}\n value={monthIndex}\n >\n {label}\n </option>\n ))}\n </select>\n );\n },\n);\n\nexport type DatePickerYearSelectProps = Omit<\n ComponentPropsWithoutRef<\"select\">,\n \"children\" | \"onChange\" | \"value\"\n>;\n\nexport const DatePickerYearSelect = forwardRef<HTMLSelectElement, DatePickerYearSelectProps>(\n function DatePickerYearSelect({ className, ...props }, ref) {\n const { month, monthDisabled, selectYear, styles, yearRange } = useDatePickerContext();\n const years = Array.from(\n { length: yearRange.end - yearRange.start + 1 },\n (_, index) => yearRange.start + index,\n );\n\n return (\n <select\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Select year\"}\n className={cx(styles.yearSelect, className)}\n data-slot=\"date-picker-year-select\"\n onChange={(event) => selectYear(Number(event.currentTarget.value))}\n ref={ref}\n value={month.getFullYear()}\n >\n {years.map((year) => (\n <option\n disabled={monthDisabled(createCalendarDate(year, month.getMonth(), 1))}\n key={year}\n value={year}\n >\n {year}\n </option>\n ))}\n </select>\n );\n },\n);\n\nexport type DatePickerTimeFieldProps = Omit<\n ComponentPropsWithoutRef<\"input\">,\n \"onChange\" | \"type\" | \"value\"\n>;\n\nexport const DatePickerTimeField = forwardRef<HTMLInputElement, DatePickerTimeFieldProps>(\n function DatePickerTimeField({ className, ...props }, ref) {\n const { disabled, granularity, onTimeChange, selected, styles, timeMax, timeMin } =\n useDatePickerContext();\n if (granularity !== \"date-time\") return null;\n\n return (\n <input\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Select time\"}\n className={cx(styles.timeField, className)}\n data-slot=\"date-picker-time-field\"\n disabled={disabled || !selected}\n max={timeMax}\n min={timeMin}\n onChange={(event) => onTimeChange(event.currentTarget.value)}\n ref={ref}\n type=\"time\"\n value={toTimeInput(selected)}\n />\n );\n },\n);\n\nexport interface DatePickerNavigationProps extends ComponentPropsWithoutRef<\"button\"> {\n amount?: number;\n}\n\nconst DatePickerNavigationButton = forwardRef<HTMLButtonElement, DatePickerNavigationProps>(\n function DatePickerNavigationButton({ amount, children, className, onClick, ...props }, ref) {\n const { canNavigate, month, setMonth, styles } = useDatePickerContext();\n const direction = amount ?? 1;\n const isDisabled = props.disabled || !canNavigate(direction);\n\n return (\n <button\n {...props}\n aria-label={props[\"aria-label\"] ?? (direction < 0 ? \"Previous month\" : \"Next month\")}\n className={cx(styles.navigation, className)}\n data-slot={direction < 0 ? \"date-picker-previous\" : \"date-picker-next\"}\n disabled={isDisabled}\n onClick={(event) => {\n if (!isDisabled) setMonth(addMonths(month, direction));\n onClick?.(event);\n }}\n ref={ref}\n type=\"button\"\n >\n {children ?? (direction < 0 ? \"‹\" : \"›\")}\n </button>\n );\n },\n);\n\nexport const DatePickerPrevious = forwardRef<HTMLButtonElement, DatePickerNavigationProps>(\n function DatePickerPrevious(props, ref) {\n return <DatePickerNavigationButton {...props} amount={-1} ref={ref} />;\n },\n);\n\nexport const DatePickerNext = forwardRef<HTMLButtonElement, DatePickerNavigationProps>(\n function DatePickerNext(props, ref) {\n return <DatePickerNavigationButton {...props} amount={1} ref={ref} />;\n },\n);\n\nexport interface DatePickerDayProps extends Omit<ComponentPropsWithoutRef<\"button\">, \"value\"> {\n date: Date;\n}\n\nexport const DatePickerDay = forwardRef<HTMLButtonElement, DatePickerDayProps>(\n function DatePickerDay(\n { children, className, date, disabled, onClick, onKeyDown, ...props },\n ref,\n ) {\n const {\n dateDisabled,\n disabled: pickerDisabled,\n focusDate,\n focusedDate,\n locale,\n month,\n onSelect,\n registerDay,\n selected,\n styles,\n today,\n weekStartsOn,\n } = useDatePickerContext();\n const key = dateKey(date);\n const outsideMonth = !isSameMonth(date, month);\n const isDisabled = disabled || pickerDisabled || dateDisabled(date);\n const isFocused = isSameDay(date, focusedDate);\n const isSelected = isSameDay(date, selected);\n const isToday = isSameDay(date, today);\n const dayRef = composeRefs(ref, (node) => registerDay(key, node));\n\n const moveByKey = (event: KeyboardEvent<HTMLButtonElement>) => {\n if (event.defaultPrevented) {\n return;\n }\n\n let nextDate: Date | undefined;\n switch (event.key) {\n case \"ArrowLeft\":\n nextDate = addDays(date, -1);\n break;\n case \"ArrowRight\":\n nextDate = addDays(date, 1);\n break;\n case \"ArrowUp\":\n nextDate = addDays(date, -7);\n break;\n case \"ArrowDown\":\n nextDate = addDays(date, 7);\n break;\n case \"Home\":\n nextDate = addDays(date, -((date.getDay() - weekStartsOn + 7) % 7));\n break;\n case \"End\":\n nextDate = addDays(date, 6 - ((date.getDay() - weekStartsOn + 7) % 7));\n break;\n case \"PageUp\":\n nextDate = addMonths(date, event.shiftKey ? -12 : -1);\n break;\n case \"PageDown\":\n nextDate = addMonths(date, event.shiftKey ? 12 : 1);\n break;\n case \"Enter\":\n case \" \":\n if (!isDisabled) {\n event.preventDefault();\n onSelect(date);\n }\n break;\n default:\n break;\n }\n\n if (nextDate) {\n event.preventDefault();\n focusDate(nextDate, nextDate < date ? -1 : 1);\n }\n };\n\n return (\n // biome-ignore lint/a11y/useSemanticElements: A calendar day is an interactive gridcell, not a generic table cell.\n <button\n {...props}\n ref={dayRef}\n aria-label={props[\"aria-label\"] ?? getDateRangeLabel(date, locale)}\n aria-current={isToday ? \"date\" : undefined}\n aria-selected={isSelected}\n className={cx(styles.day, className)}\n data-date={key}\n data-disabled={isDisabled || undefined}\n data-outside-month={outsideMonth || undefined}\n data-selected={isSelected || undefined}\n data-slot=\"date-picker-day\"\n data-today={isToday || undefined}\n disabled={isDisabled}\n onClick={(event) => {\n onSelect(date);\n onClick?.(event);\n }}\n onKeyDown={(event) => {\n moveByKey(event);\n onKeyDown?.(event);\n }}\n role=\"gridcell\"\n tabIndex={isFocused && !isDisabled ? 0 : -1}\n type=\"button\"\n >\n {children ?? date.getDate()}\n </button>\n );\n },\n);\n\ninterface DatePickerMonthButtonProps {\n date: Date;\n}\n\nconst DatePickerMonthButton = forwardRef<HTMLButtonElement, DatePickerMonthButtonProps>(\n function DatePickerMonthButton({ date }, ref) {\n const { disabled, granularity, locale, monthDisabled, onSelect, selected, styles } =\n useDatePickerContext();\n const isDisabled = disabled || monthDisabled(date);\n const isSelected = granularity === \"month\" && Boolean(selected && isSameMonth(selected, date));\n\n return (\n // biome-ignore lint/a11y/useSemanticElements: Month choices use the calendar gridcell pattern.\n <button\n aria-label={new Intl.DateTimeFormat(locale, { month: \"long\" }).format(date)}\n aria-selected={isSelected}\n className={styles.month}\n data-disabled={isDisabled || undefined}\n data-selected={isSelected || undefined}\n data-slot=\"date-picker-month\"\n disabled={isDisabled}\n onClick={() => onSelect(date)}\n ref={ref}\n role=\"gridcell\"\n type=\"button\"\n >\n {new Intl.DateTimeFormat(locale, { month: \"short\" }).format(date)}\n </button>\n );\n },\n);\n\nexport interface DatePickerCalendarProps\n extends Omit<ComponentPropsWithoutRef<\"section\">, \"children\"> {\n \"aria-label\"?: string;\n}\n\nexport const DatePickerCalendar = forwardRef<HTMLElement, DatePickerCalendarProps>(\n function DatePickerCalendar({ \"aria-label\": ariaLabel, className, ...props }, ref) {\n const { granularity, locale, month, styles, weekStartsOn } = useDatePickerContext();\n const days = useMemo(() => getCalendarDays(month, weekStartsOn), [month, weekStartsOn]);\n const weekdays = useMemo(() => getWeekdayLabels(locale, weekStartsOn), [locale, weekStartsOn]);\n const monthDates = useMemo(\n () =>\n Array.from({ length: 12 }, (_, index) => createCalendarDate(month.getFullYear(), index, 1)),\n [month],\n );\n\n return (\n <section\n {...props}\n ref={ref}\n aria-label={ariaLabel ?? formatMonthLabel(month, locale)}\n className={cx(styles.calendar, className)}\n data-granularity={granularity}\n data-slot=\"date-picker-calendar\"\n >\n {granularity === \"month\" ? (\n // biome-ignore lint/a11y/useSemanticElements: Month selection uses the calendar grid pattern.\n <div\n aria-label={String(month.getFullYear())}\n className={styles.monthGrid}\n data-slot=\"date-picker-month-grid\"\n role=\"grid\"\n >\n {monthDates.map((date) => (\n <DatePickerMonthButton date={date} key={dateKey(date)} />\n ))}\n </div>\n ) : (\n <>\n <div aria-hidden=\"true\" className={styles.weekdays} data-slot=\"date-picker-weekdays\">\n {weekdays.map((weekday) => (\n <span className={styles.weekday} data-slot=\"date-picker-weekday\" key={weekday}>\n {weekday}\n </span>\n ))}\n </div>\n {/* biome-ignore lint/a11y/useSemanticElements: Calendar grids use the WAI-ARIA grid pattern for roving day focus. */}\n <div\n aria-label={formatMonthLabel(month, locale)}\n className={styles.grid}\n data-slot=\"date-picker-grid\"\n role=\"grid\"\n >\n {days.map((date) => (\n <DatePickerDay date={date} key={dateKey(date)} />\n ))}\n </div>\n </>\n )}\n </section>\n );\n },\n);\n\nexport const DatePicker = {\n Root: DatePickerRoot,\n Label: DatePickerLabel,\n Control: DatePickerControl,\n Trigger: DatePickerTrigger,\n Value: DatePickerValue,\n Clear: DatePickerClear,\n Portal: DatePickerPortal,\n Positioner: DatePickerPositioner,\n Popup: DatePickerPopup,\n Close: DatePickerClose,\n Header: DatePickerHeader,\n Caption: DatePickerCaption,\n MonthSelect: DatePickerMonthSelect,\n YearSelect: DatePickerYearSelect,\n TimeField: DatePickerTimeField,\n Previous: DatePickerPrevious,\n Next: DatePickerNext,\n Day: DatePickerDay,\n Calendar: DatePickerCalendar,\n};\n"],"mappings":";;;;;;;;;AAmFA,MAAM,qBAAA,GAAA,MAAA,cAAA,CAAiE,IAAI;AAE3E,SAAS,uBAAuB;CAC9B,MAAM,WAAA,GAAA,MAAA,WAAA,CAAqB,iBAAiB;CAC5C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,2DAA2D;CAG7E,OAAO;AACT;AAEA,SAAS,YAAY,MAAY,OAAa;CAC5C,OAAO,KAAK,YAAY,MAAM,MAAM,YAAY,KAAK,KAAK,SAAS,MAAM,MAAM,SAAS;AAC1F;AAEA,SAAS,YAAe,OAA2B,QAAmC;CACpF,QAAQ,UAAoB;EAC1B,OAAO,KAAK;EACZ,IAAI,OAAO,UAAU,YACnB,MAAM,KAAK;OACN,IAAI,OAC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BAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GAAK,eAAY;GAAO,WAAW,OAAO;GAAU,aAAU;aAC3D,SAAS,KAAK,YACb,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,WAAW,OAAO;IAAS,aAAU;cACxC;GACG,GAFgE,OAEhE,CACP;EACE,CAAA,GAEL,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GACE,cAAYU,mBAAAA,iBAAiB,OAAO,MAAM;GAC1C,WAAW,OAAO;GAClB,aAAU;GACV,MAAK;aAEJ,KAAK,KAAK,SACT,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAD,EAAqB,KAA2B,GAAhBV,mBAAAA,QAAQ,IAAI,CAAI,CACjD;EACE,CAAA,CACL,EAAA,CAAA;CAEG,CAAA;AAEb,CACF;AAEA,MAAa,aAAa;CACxB,MAAM;CACN,OAAO;CACP,SAAS;CACT,SAAS;CACT,OAAO;CACP,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,OAAO;CACP,QAAQ;CACR,SAAS;CACT,aAAa;CACb,YAAY;CACZ,WAAW;CACX,UAAU;CACV,MAAM;CACN,KAAK;CACL,UAAU;AACZ"}
@@ -34,6 +34,8 @@ interface DatePickerRootProps extends Omit<PopoverRoot.Props, "children"> {
34
34
  granularity?: DatePickerGranularity;
35
35
  /** Inclusive range used by the year selector. */
36
36
  yearRange?: DatePickerYearRange;
37
+ /** Reference date used when no value is selected, useful for deterministic SSR and tests. */
38
+ referenceDate?: Date;
37
39
  /** Adds a native hidden input using the representation for the selected granularity. */
38
40
  name?: string;
39
41
  /** Prevents interaction and disables the hidden form input. */
@@ -42,7 +44,7 @@ interface DatePickerRootProps extends Omit<PopoverRoot.Props, "children"> {
42
44
  closeOnSelect?: boolean;
43
45
  children?: ReactNode;
44
46
  }
45
- declare function DatePickerRoot({ children, closeOnSelect: closeOnSelectProp, defaultValue, disabled, granularity, isDateDisabled, locale, maxDate, minDate, name, onValueChange, onMonthChange, placeholder, size, value: controlledValue, weekStartsOn, yearRange: configuredYearRange, actionsRef: externalActionsRef, ...popoverProps }: DatePickerRootProps): import("react").JSX.Element;
47
+ declare function DatePickerRoot({ children, closeOnSelect: closeOnSelectProp, defaultValue, disabled, granularity, isDateDisabled, locale, maxDate, minDate, name, onValueChange, onMonthChange, placeholder, size, value: controlledValue, weekStartsOn, yearRange: configuredYearRange, referenceDate, actionsRef: externalActionsRef, ...popoverProps }: DatePickerRootProps): import("react").JSX.Element;
46
48
  type DatePickerLabelProps = ComponentPropsWithoutRef<"label">;
47
49
  declare const DatePickerLabel: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
48
50
  type DatePickerControlProps = ComponentPropsWithoutRef<"div">;
@@ -34,6 +34,8 @@ interface DatePickerRootProps extends Omit<PopoverRoot.Props, "children"> {
34
34
  granularity?: DatePickerGranularity;
35
35
  /** Inclusive range used by the year selector. */
36
36
  yearRange?: DatePickerYearRange;
37
+ /** Reference date used when no value is selected, useful for deterministic SSR and tests. */
38
+ referenceDate?: Date;
37
39
  /** Adds a native hidden input using the representation for the selected granularity. */
38
40
  name?: string;
39
41
  /** Prevents interaction and disables the hidden form input. */
@@ -42,7 +44,7 @@ interface DatePickerRootProps extends Omit<PopoverRoot.Props, "children"> {
42
44
  closeOnSelect?: boolean;
43
45
  children?: ReactNode;
44
46
  }
45
- declare function DatePickerRoot({ children, closeOnSelect: closeOnSelectProp, defaultValue, disabled, granularity, isDateDisabled, locale, maxDate, minDate, name, onValueChange, onMonthChange, placeholder, size, value: controlledValue, weekStartsOn, yearRange: configuredYearRange, actionsRef: externalActionsRef, ...popoverProps }: DatePickerRootProps): import("react").JSX.Element;
47
+ declare function DatePickerRoot({ children, closeOnSelect: closeOnSelectProp, defaultValue, disabled, granularity, isDateDisabled, locale, maxDate, minDate, name, onValueChange, onMonthChange, placeholder, size, value: controlledValue, weekStartsOn, yearRange: configuredYearRange, referenceDate, actionsRef: externalActionsRef, ...popoverProps }: DatePickerRootProps): import("react").JSX.Element;
46
48
  type DatePickerLabelProps = ComponentPropsWithoutRef<"label">;
47
49
  declare const DatePickerLabel: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
48
50
  type DatePickerControlProps = ComponentPropsWithoutRef<"div">;