@navikt/ds-react 7.14.0-alpha.1 → 7.14.1

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 (226) hide show
  1. package/cjs/date/date-utils/check-dates.js +2 -2
  2. package/cjs/date/date-utils/check-dates.js.map +1 -1
  3. package/cjs/form/combobox/Combobox.d.ts +1 -1
  4. package/cjs/form/combobox/Input/InputController.d.ts +1 -1
  5. package/esm/date/date-utils/check-dates.js +3 -3
  6. package/esm/date/date-utils/check-dates.js.map +1 -1
  7. package/esm/form/combobox/Combobox.d.ts +1 -1
  8. package/esm/form/combobox/Input/InputController.d.ts +1 -1
  9. package/package.json +5 -4
  10. package/src/date/date-utils/check-dates.ts +10 -3
  11. package/cjs/date/context/index.d.ts +0 -3
  12. package/cjs/date/context/index.js +0 -13
  13. package/cjs/date/context/index.js.map +0 -1
  14. package/cjs/date/context/useDateInputContext.d.ts +0 -21
  15. package/cjs/date/context/useDateInputContext.js +0 -14
  16. package/cjs/date/context/useDateInputContext.js.map +0 -1
  17. package/cjs/date/context/useDateTranslationContext.d.ts +0 -8
  18. package/cjs/date/context/useDateTranslationContext.js +0 -7
  19. package/cjs/date/context/useDateTranslationContext.js.map +0 -1
  20. package/cjs/date/context/useSharedMonthContext.d.ts +0 -21
  21. package/cjs/date/context/useSharedMonthContext.js +0 -64
  22. package/cjs/date/context/useSharedMonthContext.js.map +0 -1
  23. package/cjs/date/datepicker/DatePickerStandalone.d.ts +0 -18
  24. package/cjs/date/datepicker/DatePickerStandalone.js +0 -86
  25. package/cjs/date/datepicker/DatePickerStandalone.js.map +0 -1
  26. package/cjs/date/datepicker/parts/Caption.d.ts +0 -7
  27. package/cjs/date/datepicker/parts/Caption.js +0 -30
  28. package/cjs/date/datepicker/parts/Caption.js.map +0 -1
  29. package/cjs/date/datepicker/parts/DayButton.d.ts +0 -4
  30. package/cjs/date/datepicker/parts/DayButton.js +0 -43
  31. package/cjs/date/datepicker/parts/DayButton.js.map +0 -1
  32. package/cjs/date/datepicker/parts/DropdownCaption.d.ts +0 -7
  33. package/cjs/date/datepicker/parts/DropdownCaption.js +0 -46
  34. package/cjs/date/datepicker/parts/DropdownCaption.js.map +0 -1
  35. package/cjs/date/datepicker/parts/HeadRow.d.ts +0 -10
  36. package/cjs/date/datepicker/parts/HeadRow.js +0 -36
  37. package/cjs/date/datepicker/parts/HeadRow.js.map +0 -1
  38. package/cjs/date/datepicker/parts/Row.d.ts +0 -16
  39. package/cjs/date/datepicker/parts/Row.js +0 -25
  40. package/cjs/date/datepicker/parts/Row.js.map +0 -1
  41. package/cjs/date/datepicker/parts/TableHead.d.ts +0 -5
  42. package/cjs/date/datepicker/parts/TableHead.js +0 -19
  43. package/cjs/date/datepicker/parts/TableHead.js.map +0 -1
  44. package/cjs/date/datepicker/parts/WeekNumber.d.ts +0 -11
  45. package/cjs/date/datepicker/parts/WeekNumber.js +0 -33
  46. package/cjs/date/datepicker/parts/WeekNumber.js.map +0 -1
  47. package/cjs/date/datepicker/parts/WeekRow.d.ts +0 -5
  48. package/cjs/date/datepicker/parts/WeekRow.js +0 -36
  49. package/cjs/date/datepicker/parts/WeekRow.js.map +0 -1
  50. package/cjs/date/datepicker/types.d.ts +0 -105
  51. package/cjs/date/datepicker/types.js +0 -3
  52. package/cjs/date/datepicker/types.js.map +0 -1
  53. package/cjs/date/hooks/index.d.ts +0 -6
  54. package/cjs/date/hooks/index.js +0 -10
  55. package/cjs/date/hooks/index.js.map +0 -1
  56. package/cjs/date/hooks/useDatepicker.d.ts +0 -90
  57. package/cjs/date/hooks/useDatepicker.js +0 -163
  58. package/cjs/date/hooks/useDatepicker.js.map +0 -1
  59. package/cjs/date/hooks/useMonthPicker.d.ts +0 -85
  60. package/cjs/date/hooks/useMonthPicker.js +0 -174
  61. package/cjs/date/hooks/useMonthPicker.js.map +0 -1
  62. package/cjs/date/hooks/useRangeDatepicker.d.ts +0 -76
  63. package/cjs/date/hooks/useRangeDatepicker.js +0 -319
  64. package/cjs/date/hooks/useRangeDatepicker.js.map +0 -1
  65. package/cjs/date/monthpicker/MonthButton.d.ts +0 -11
  66. package/cjs/date/monthpicker/MonthButton.js +0 -82
  67. package/cjs/date/monthpicker/MonthButton.js.map +0 -1
  68. package/cjs/date/monthpicker/MonthCaption.d.ts +0 -3
  69. package/cjs/date/monthpicker/MonthCaption.js +0 -52
  70. package/cjs/date/monthpicker/MonthCaption.js.map +0 -1
  71. package/cjs/date/monthpicker/MonthPickerStandalone.d.ts +0 -11
  72. package/cjs/date/monthpicker/MonthPickerStandalone.js +0 -65
  73. package/cjs/date/monthpicker/MonthPickerStandalone.js.map +0 -1
  74. package/cjs/date/monthpicker/MonthSelector.d.ts +0 -3
  75. package/cjs/date/monthpicker/MonthSelector.js +0 -80
  76. package/cjs/date/monthpicker/MonthSelector.js.map +0 -1
  77. package/cjs/date/monthpicker/types.d.ts +0 -86
  78. package/cjs/date/monthpicker/types.js +0 -3
  79. package/cjs/date/monthpicker/types.js.map +0 -1
  80. package/cjs/date/parts/DateInput.d.ts +0 -28
  81. package/cjs/date/parts/DateInput.js +0 -91
  82. package/cjs/date/parts/DateInput.js.map +0 -1
  83. package/cjs/date/parts/DateWrapper.d.ts +0 -18
  84. package/cjs/date/parts/DateWrapper.js +0 -67
  85. package/cjs/date/parts/DateWrapper.js.map +0 -1
  86. package/cjs/date/utils/check-dates.d.ts +0 -3
  87. package/cjs/date/utils/check-dates.js +0 -14
  88. package/cjs/date/utils/check-dates.js.map +0 -1
  89. package/cjs/date/utils/dates-disabled.d.ts +0 -1
  90. package/cjs/date/utils/dates-disabled.js +0 -30
  91. package/cjs/date/utils/dates-disabled.js.map +0 -1
  92. package/cjs/date/utils/format-date.d.ts +0 -2
  93. package/cjs/date/utils/format-date.js +0 -13
  94. package/cjs/date/utils/format-date.js.map +0 -1
  95. package/cjs/date/utils/get-dates.d.ts +0 -2
  96. package/cjs/date/utils/get-dates.js +0 -52
  97. package/cjs/date/utils/get-dates.js.map +0 -1
  98. package/cjs/date/utils/get-initial-year.d.ts +0 -5
  99. package/cjs/date/utils/get-initial-year.js +0 -21
  100. package/cjs/date/utils/get-initial-year.js.map +0 -1
  101. package/cjs/date/utils/get-month-weeks.d.ts +0 -16
  102. package/cjs/date/utils/get-month-weeks.js +0 -46
  103. package/cjs/date/utils/get-month-weeks.js.map +0 -1
  104. package/cjs/date/utils/index.d.ts +0 -9
  105. package/cjs/date/utils/index.js +0 -29
  106. package/cjs/date/utils/index.js.map +0 -1
  107. package/cjs/date/utils/is-match.d.ts +0 -4
  108. package/cjs/date/utils/is-match.js +0 -61
  109. package/cjs/date/utils/is-match.js.map +0 -1
  110. package/cjs/date/utils/locale.d.ts +0 -36
  111. package/cjs/date/utils/locale.js +0 -54
  112. package/cjs/date/utils/locale.js.map +0 -1
  113. package/cjs/date/utils/navigation.d.ts +0 -2
  114. package/cjs/date/utils/navigation.js +0 -156
  115. package/cjs/date/utils/navigation.js.map +0 -1
  116. package/cjs/date/utils/parse-date.d.ts +0 -4
  117. package/cjs/date/utils/parse-date.js +0 -87
  118. package/cjs/date/utils/parse-date.js.map +0 -1
  119. package/esm/date/context/index.d.ts +0 -3
  120. package/esm/date/context/index.js +0 -4
  121. package/esm/date/context/index.js.map +0 -1
  122. package/esm/date/context/useDateInputContext.d.ts +0 -21
  123. package/esm/date/context/useDateInputContext.js +0 -10
  124. package/esm/date/context/useDateInputContext.js.map +0 -1
  125. package/esm/date/context/useDateTranslationContext.d.ts +0 -8
  126. package/esm/date/context/useDateTranslationContext.js +0 -3
  127. package/esm/date/context/useDateTranslationContext.js.map +0 -1
  128. package/esm/date/context/useSharedMonthContext.d.ts +0 -21
  129. package/esm/date/context/useSharedMonthContext.js +0 -36
  130. package/esm/date/context/useSharedMonthContext.js.map +0 -1
  131. package/esm/date/datepicker/DatePickerStandalone.d.ts +0 -18
  132. package/esm/date/datepicker/DatePickerStandalone.js +0 -57
  133. package/esm/date/datepicker/DatePickerStandalone.js.map +0 -1
  134. package/esm/date/datepicker/parts/Caption.d.ts +0 -7
  135. package/esm/date/datepicker/parts/Caption.js +0 -23
  136. package/esm/date/datepicker/parts/Caption.js.map +0 -1
  137. package/esm/date/datepicker/parts/DayButton.d.ts +0 -4
  138. package/esm/date/datepicker/parts/DayButton.js +0 -18
  139. package/esm/date/datepicker/parts/DayButton.js.map +0 -1
  140. package/esm/date/datepicker/parts/DropdownCaption.d.ts +0 -7
  141. package/esm/date/datepicker/parts/DropdownCaption.js +0 -39
  142. package/esm/date/datepicker/parts/DropdownCaption.js.map +0 -1
  143. package/esm/date/datepicker/parts/HeadRow.d.ts +0 -10
  144. package/esm/date/datepicker/parts/HeadRow.js +0 -29
  145. package/esm/date/datepicker/parts/HeadRow.js.map +0 -1
  146. package/esm/date/datepicker/parts/Row.d.ts +0 -16
  147. package/esm/date/datepicker/parts/Row.js +0 -20
  148. package/esm/date/datepicker/parts/Row.js.map +0 -1
  149. package/esm/date/datepicker/parts/TableHead.d.ts +0 -5
  150. package/esm/date/datepicker/parts/TableHead.js +0 -14
  151. package/esm/date/datepicker/parts/TableHead.js.map +0 -1
  152. package/esm/date/datepicker/parts/WeekNumber.d.ts +0 -11
  153. package/esm/date/datepicker/parts/WeekNumber.js +0 -28
  154. package/esm/date/datepicker/parts/WeekNumber.js.map +0 -1
  155. package/esm/date/datepicker/parts/WeekRow.d.ts +0 -5
  156. package/esm/date/datepicker/parts/WeekRow.js +0 -31
  157. package/esm/date/datepicker/parts/WeekRow.js.map +0 -1
  158. package/esm/date/datepicker/types.d.ts +0 -105
  159. package/esm/date/datepicker/types.js +0 -2
  160. package/esm/date/datepicker/types.js.map +0 -1
  161. package/esm/date/hooks/index.d.ts +0 -6
  162. package/esm/date/hooks/index.js +0 -4
  163. package/esm/date/hooks/index.js.map +0 -1
  164. package/esm/date/hooks/useDatepicker.d.ts +0 -90
  165. package/esm/date/hooks/useDatepicker.js +0 -159
  166. package/esm/date/hooks/useDatepicker.js.map +0 -1
  167. package/esm/date/hooks/useMonthPicker.d.ts +0 -85
  168. package/esm/date/hooks/useMonthPicker.js +0 -170
  169. package/esm/date/hooks/useMonthPicker.js.map +0 -1
  170. package/esm/date/hooks/useRangeDatepicker.d.ts +0 -76
  171. package/esm/date/hooks/useRangeDatepicker.js +0 -315
  172. package/esm/date/hooks/useRangeDatepicker.js.map +0 -1
  173. package/esm/date/monthpicker/MonthButton.d.ts +0 -11
  174. package/esm/date/monthpicker/MonthButton.js +0 -52
  175. package/esm/date/monthpicker/MonthButton.js.map +0 -1
  176. package/esm/date/monthpicker/MonthCaption.d.ts +0 -3
  177. package/esm/date/monthpicker/MonthCaption.js +0 -45
  178. package/esm/date/monthpicker/MonthCaption.js.map +0 -1
  179. package/esm/date/monthpicker/MonthPickerStandalone.d.ts +0 -11
  180. package/esm/date/monthpicker/MonthPickerStandalone.js +0 -36
  181. package/esm/date/monthpicker/MonthPickerStandalone.js.map +0 -1
  182. package/esm/date/monthpicker/MonthSelector.d.ts +0 -3
  183. package/esm/date/monthpicker/MonthSelector.js +0 -50
  184. package/esm/date/monthpicker/MonthSelector.js.map +0 -1
  185. package/esm/date/monthpicker/types.d.ts +0 -86
  186. package/esm/date/monthpicker/types.js +0 -2
  187. package/esm/date/monthpicker/types.js.map +0 -1
  188. package/esm/date/parts/DateInput.d.ts +0 -28
  189. package/esm/date/parts/DateInput.js +0 -62
  190. package/esm/date/parts/DateInput.js.map +0 -1
  191. package/esm/date/parts/DateWrapper.d.ts +0 -18
  192. package/esm/date/parts/DateWrapper.js +0 -37
  193. package/esm/date/parts/DateWrapper.js.map +0 -1
  194. package/esm/date/utils/check-dates.d.ts +0 -3
  195. package/esm/date/utils/check-dates.js +0 -9
  196. package/esm/date/utils/check-dates.js.map +0 -1
  197. package/esm/date/utils/dates-disabled.d.ts +0 -1
  198. package/esm/date/utils/dates-disabled.js +0 -26
  199. package/esm/date/utils/dates-disabled.js.map +0 -1
  200. package/esm/date/utils/format-date.d.ts +0 -2
  201. package/esm/date/utils/format-date.js +0 -9
  202. package/esm/date/utils/format-date.js.map +0 -1
  203. package/esm/date/utils/get-dates.d.ts +0 -2
  204. package/esm/date/utils/get-dates.js +0 -47
  205. package/esm/date/utils/get-dates.js.map +0 -1
  206. package/esm/date/utils/get-initial-year.d.ts +0 -5
  207. package/esm/date/utils/get-initial-year.js +0 -18
  208. package/esm/date/utils/get-initial-year.js.map +0 -1
  209. package/esm/date/utils/get-month-weeks.d.ts +0 -16
  210. package/esm/date/utils/get-month-weeks.js +0 -42
  211. package/esm/date/utils/get-month-weeks.js.map +0 -1
  212. package/esm/date/utils/index.d.ts +0 -9
  213. package/esm/date/utils/index.js +0 -10
  214. package/esm/date/utils/index.js.map +0 -1
  215. package/esm/date/utils/is-match.d.ts +0 -4
  216. package/esm/date/utils/is-match.js +0 -57
  217. package/esm/date/utils/is-match.js.map +0 -1
  218. package/esm/date/utils/locale.d.ts +0 -36
  219. package/esm/date/utils/locale.js +0 -45
  220. package/esm/date/utils/locale.js.map +0 -1
  221. package/esm/date/utils/navigation.d.ts +0 -2
  222. package/esm/date/utils/navigation.js +0 -152
  223. package/esm/date/utils/navigation.js.map +0 -1
  224. package/esm/date/utils/parse-date.d.ts +0 -4
  225. package/esm/date/utils/parse-date.js +0 -83
  226. package/esm/date/utils/parse-date.js.map +0 -1
@@ -13,8 +13,8 @@ function isValidDate(day) {
13
13
  return !!(day && !Number.isNaN(day.getTime()) && day.getFullYear() > 999);
14
14
  }
15
15
  function isDateOutsideRange({ day, fromDate, toDate, }) {
16
- const isDateAfter = toDate && (0, date_fns_1.differenceInCalendarDays)(day, toDate) > 0;
17
- const isDateBefore = fromDate && (0, date_fns_1.differenceInCalendarDays)(fromDate, day) > 0;
16
+ const isDateAfter = toDate && (0, date_fns_1.differenceInCalendarDays)(day, (0, date_fns_1.startOfDay)(toDate)) > 0;
17
+ const isDateBefore = fromDate && (0, date_fns_1.differenceInCalendarDays)((0, date_fns_1.startOfDay)(fromDate), day) > 0;
18
18
  return isDateAfter || isDateBefore || false;
19
19
  }
20
20
  //# sourceMappingURL=check-dates.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-dates.js","sourceRoot":"","sources":["../../../src/date/date-utils/check-dates.ts"],"names":[],"mappings":";;;AAUA,kCAEC;AAED,gDAaC;AA3BD,uCAA0E;AAEnE,MAAM,oBAAoB,GAAG,CAClC,IAAU,EACV,aAAmB,EACV,EAAE;IACX,OAAO,IAAA,sBAAW,EAAC,IAAA,kBAAO,EAAC,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;AACzE,CAAC,CAAC;AALW,QAAA,oBAAoB,wBAK/B;AAEF,eAAe;AACf,SAAgB,WAAW,CAAC,GAAU;IACpC,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,IAAI,GAAG,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,CAAC;AAC5E,CAAC;AAED,SAAgB,kBAAkB,CAAC,EACjC,GAAG,EACH,QAAQ,EACR,MAAM,GAKP;IACC,MAAM,WAAW,GAAG,MAAM,IAAI,IAAA,mCAAwB,EAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;IACxE,MAAM,YAAY,GAAG,QAAQ,IAAI,IAAA,mCAAwB,EAAC,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IAE7E,OAAO,WAAW,IAAI,YAAY,IAAI,KAAK,CAAC;AAC9C,CAAC"}
1
+ {"version":3,"file":"check-dates.js","sourceRoot":"","sources":["../../../src/date/date-utils/check-dates.ts"],"names":[],"mappings":";;;AAeA,kCAEC;AAED,gDAeC;AAlCD,uCAKkB;AAEX,MAAM,oBAAoB,GAAG,CAClC,IAAU,EACV,aAAmB,EACV,EAAE;IACX,OAAO,IAAA,sBAAW,EAAC,IAAA,kBAAO,EAAC,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;AACzE,CAAC,CAAC;AALW,QAAA,oBAAoB,wBAK/B;AAEF,eAAe;AACf,SAAgB,WAAW,CAAC,GAAU;IACpC,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,IAAI,GAAG,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,CAAC;AAC5E,CAAC;AAED,SAAgB,kBAAkB,CAAC,EACjC,GAAG,EACH,QAAQ,EACR,MAAM,GAKP;IACC,MAAM,WAAW,GACf,MAAM,IAAI,IAAA,mCAAwB,EAAC,GAAG,EAAE,IAAA,qBAAU,EAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;IAClE,MAAM,YAAY,GAChB,QAAQ,IAAI,IAAA,mCAAwB,EAAC,IAAA,qBAAU,EAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IAEtE,OAAO,WAAW,IAAI,YAAY,IAAI,KAAK,CAAC;AAC9C,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { ComboboxProps } from "./types";
3
- export declare const Combobox: React.ForwardRefExoticComponent<Omit<ComboboxProps, "size" | "disabled" | "value" | "onChange" | "onClear" | "options"> & React.RefAttributes<HTMLInputElement>>;
3
+ export declare const Combobox: React.ForwardRefExoticComponent<Omit<ComboboxProps, "onChange" | "value" | "size" | "disabled" | "options" | "onClear"> & React.RefAttributes<HTMLInputElement>>;
4
4
  export default Combobox;
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
2
  import { ComboboxProps } from "../types";
3
- export declare const InputController: React.ForwardRefExoticComponent<Omit<ComboboxProps, "size" | "disabled" | "description" | "value" | "onChange" | "label" | "hideLabel" | "onClear" | "options"> & React.RefAttributes<HTMLInputElement>>;
3
+ export declare const InputController: React.ForwardRefExoticComponent<Omit<ComboboxProps, "onChange" | "value" | "label" | "size" | "disabled" | "options" | "hideLabel" | "description" | "onClear"> & React.RefAttributes<HTMLInputElement>>;
@@ -1,4 +1,4 @@
1
- import { differenceInCalendarDays, isThisMonth, setYear } from "date-fns";
1
+ import { differenceInCalendarDays, isThisMonth, setYear, startOfDay, } from "date-fns";
2
2
  export const dateIsInCurrentMonth = (date, dateToCompare) => {
3
3
  return isThisMonth(setYear(date, Number(dateToCompare.getFullYear())));
4
4
  };
@@ -7,8 +7,8 @@ export function isValidDate(day) {
7
7
  return !!(day && !Number.isNaN(day.getTime()) && day.getFullYear() > 999);
8
8
  }
9
9
  export function isDateOutsideRange({ day, fromDate, toDate, }) {
10
- const isDateAfter = toDate && differenceInCalendarDays(day, toDate) > 0;
11
- const isDateBefore = fromDate && differenceInCalendarDays(fromDate, day) > 0;
10
+ const isDateAfter = toDate && differenceInCalendarDays(day, startOfDay(toDate)) > 0;
11
+ const isDateBefore = fromDate && differenceInCalendarDays(startOfDay(fromDate), day) > 0;
12
12
  return isDateAfter || isDateBefore || false;
13
13
  }
14
14
  //# sourceMappingURL=check-dates.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-dates.js","sourceRoot":"","sources":["../../../src/date/date-utils/check-dates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAE1E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,IAAU,EACV,aAAmB,EACV,EAAE;IACX,OAAO,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;AACzE,CAAC,CAAC;AAEF,eAAe;AACf,MAAM,UAAU,WAAW,CAAC,GAAU;IACpC,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,IAAI,GAAG,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,UAA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9C,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { ComboboxProps } from "./types.js";
3
- export declare const Combobox: React.ForwardRefExoticComponent<Omit<ComboboxProps, "size" | "disabled" | "value" | "onChange" | "onClear" | "options"> & React.RefAttributes<HTMLInputElement>>;
3
+ export declare const Combobox: React.ForwardRefExoticComponent<Omit<ComboboxProps, "onChange" | "value" | "size" | "disabled" | "options" | "onClear"> & React.RefAttributes<HTMLInputElement>>;
4
4
  export default Combobox;
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
2
  import { ComboboxProps } from "../types.js";
3
- export declare const InputController: React.ForwardRefExoticComponent<Omit<ComboboxProps, "size" | "disabled" | "description" | "value" | "onChange" | "label" | "hideLabel" | "onClear" | "options"> & React.RefAttributes<HTMLInputElement>>;
3
+ export declare const InputController: React.ForwardRefExoticComponent<Omit<ComboboxProps, "onChange" | "value" | "label" | "size" | "disabled" | "options" | "hideLabel" | "description" | "onClear"> & React.RefAttributes<HTMLInputElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navikt/ds-react",
3
- "version": "7.14.0-alpha.1",
3
+ "version": "7.14.1",
4
4
  "description": "React components from the Norwegian Labour and Welfare Administration.",
5
5
  "author": "Aksel, a team part of the Norwegian Labour and Welfare Administration.",
6
6
  "license": "MIT",
@@ -17,7 +17,8 @@
17
17
  "sideEffects": false,
18
18
  "typings": "./esm/index.d.ts",
19
19
  "publishConfig": {
20
- "access": "public"
20
+ "access": "public",
21
+ "provenance": true
21
22
  },
22
23
  "files": [
23
24
  "/cjs",
@@ -624,8 +625,8 @@
624
625
  "dependencies": {
625
626
  "@floating-ui/react": "0.25.4",
626
627
  "@floating-ui/react-dom": "^2.0.9",
627
- "@navikt/aksel-icons": "^7.14.0",
628
- "@navikt/ds-tokens": "^7.14.0",
628
+ "@navikt/aksel-icons": "^7.14.1",
629
+ "@navikt/ds-tokens": "^7.14.1",
629
630
  "clsx": "^2.1.0",
630
631
  "date-fns": "^4.0.0",
631
632
  "react-day-picker": "9.5.0"
@@ -1,4 +1,9 @@
1
- import { differenceInCalendarDays, isThisMonth, setYear } from "date-fns";
1
+ import {
2
+ differenceInCalendarDays,
3
+ isThisMonth,
4
+ setYear,
5
+ startOfDay,
6
+ } from "date-fns";
2
7
 
3
8
  export const dateIsInCurrentMonth = (
4
9
  date: Date,
@@ -21,8 +26,10 @@ export function isDateOutsideRange({
21
26
  fromDate?: Date;
22
27
  toDate?: Date;
23
28
  }): boolean {
24
- const isDateAfter = toDate && differenceInCalendarDays(day, toDate) > 0;
25
- const isDateBefore = fromDate && differenceInCalendarDays(fromDate, day) > 0;
29
+ const isDateAfter =
30
+ toDate && differenceInCalendarDays(day, startOfDay(toDate)) > 0;
31
+ const isDateBefore =
32
+ fromDate && differenceInCalendarDays(startOfDay(fromDate), day) > 0;
26
33
 
27
34
  return isDateAfter || isDateBefore || false;
28
35
  }
@@ -1,3 +0,0 @@
1
- export { useDateInputContext, DateInputContext } from "./useDateInputContext";
2
- export { useSharedMonthContext, SharedMonthProvider, } from "./useSharedMonthContext";
3
- export { useDateTranslationContext, DateTranslationContextProvider, } from "./useDateTranslationContext";
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DateTranslationContextProvider = exports.useDateTranslationContext = exports.SharedMonthProvider = exports.useSharedMonthContext = exports.DateInputContext = exports.useDateInputContext = void 0;
4
- var useDateInputContext_1 = require("./useDateInputContext");
5
- Object.defineProperty(exports, "useDateInputContext", { enumerable: true, get: function () { return useDateInputContext_1.useDateInputContext; } });
6
- Object.defineProperty(exports, "DateInputContext", { enumerable: true, get: function () { return useDateInputContext_1.DateInputContext; } });
7
- var useSharedMonthContext_1 = require("./useSharedMonthContext");
8
- Object.defineProperty(exports, "useSharedMonthContext", { enumerable: true, get: function () { return useSharedMonthContext_1.useSharedMonthContext; } });
9
- Object.defineProperty(exports, "SharedMonthProvider", { enumerable: true, get: function () { return useSharedMonthContext_1.SharedMonthProvider; } });
10
- var useDateTranslationContext_1 = require("./useDateTranslationContext");
11
- Object.defineProperty(exports, "useDateTranslationContext", { enumerable: true, get: function () { return useDateTranslationContext_1.useDateTranslationContext; } });
12
- Object.defineProperty(exports, "DateTranslationContextProvider", { enumerable: true, get: function () { return useDateTranslationContext_1.DateTranslationContextProvider; } });
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/date/context/index.ts"],"names":[],"mappings":";;;AAAA,6DAA8E;AAArE,0HAAA,mBAAmB,OAAA;AAAE,uHAAA,gBAAgB,OAAA;AAC9C,iEAGiC;AAF/B,8HAAA,qBAAqB,OAAA;AACrB,4HAAA,mBAAmB,OAAA;AAErB,yEAGqC;AAFnC,sIAAA,yBAAyB,OAAA;AACzB,2IAAA,8BAA8B,OAAA"}
@@ -1,21 +0,0 @@
1
- interface DateInputContextProps {
2
- /**
3
- * Open state for popover
4
- */
5
- open: boolean;
6
- /**
7
- * Callback for opOpen toggle
8
- */
9
- onOpen: () => void;
10
- /**
11
- * Aria-connected ID
12
- */
13
- ariaId?: string;
14
- /**
15
- * Flag for enabled-check
16
- */
17
- defined: boolean;
18
- }
19
- export declare const DateInputContext: import("react").Context<DateInputContextProps | null>;
20
- export declare const useDateInputContext: () => DateInputContextProps | null;
21
- export {};
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useDateInputContext = exports.DateInputContext = void 0;
4
- const react_1 = require("react");
5
- exports.DateInputContext = (0, react_1.createContext)(null);
6
- const useDateInputContext = () => {
7
- const context = (0, react_1.useContext)(exports.DateInputContext);
8
- if (!context) {
9
- console.warn("useDateInputContext must be used with DateInputContext");
10
- }
11
- return context;
12
- };
13
- exports.useDateInputContext = useDateInputContext;
14
- //# sourceMappingURL=useDateInputContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDateInputContext.js","sourceRoot":"","sources":["../../../src/date/context/useDateInputContext.tsx"],"names":[],"mappings":";;;AAAA,iCAAkD;AAqBrC,QAAA,gBAAgB,GAAG,IAAA,qBAAa,EAC3C,IAAI,CACL,CAAC;AAEK,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,wBAAgB,CAAC,CAAC;IAE7C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;IACzE,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AARW,QAAA,mBAAmB,uBAQ9B"}
@@ -1,8 +0,0 @@
1
- import { TFunction } from "../../util/i18n/i18n.types";
2
- interface DateTranslationContextProps {
3
- translate: TFunction<"DatePicker">;
4
- }
5
- export declare const DateTranslationContextProvider: import("react").ForwardRefExoticComponent<DateTranslationContextProps & {
6
- children: import("react").ReactNode;
7
- } & import("react").RefAttributes<unknown>>, useDateTranslationContext: <S extends boolean = true>(strict?: S) => S extends true ? DateTranslationContextProps : DateTranslationContextProps | undefined;
8
- export {};
@@ -1,7 +0,0 @@
1
- "use strict";
2
- var _a;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useDateTranslationContext = exports.DateTranslationContextProvider = void 0;
5
- const create_context_1 = require("../../util/create-context");
6
- _a = (0, create_context_1.createContext)(), exports.DateTranslationContextProvider = _a[0], exports.useDateTranslationContext = _a[1];
7
- //# sourceMappingURL=useDateTranslationContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDateTranslationContext.js","sourceRoot":"","sources":["../../../src/date/context/useDateTranslationContext.ts"],"names":[],"mappings":";;;;AAAA,8DAA0D;AAO7C,KACX,IAAA,8BAAa,GAA+B,EADhC,sCAA8B,UAAE,iCAAyB,SACxB"}
@@ -1,21 +0,0 @@
1
- import React from "react";
2
- import { Matcher } from "../utils";
3
- export type SharedMonthContextType = {
4
- hasDropdown: boolean;
5
- year: Date;
6
- toYear: (date: Date) => void;
7
- disabled: Matcher[];
8
- selected?: Date;
9
- onSelect: (v?: Date) => void;
10
- };
11
- export declare const SharedMonthContext: React.Context<SharedMonthContextType>;
12
- export declare const useSharedMonthContext: () => SharedMonthContextType;
13
- export declare const SharedMonthProvider: ({ children, dropdownCaption, disabled, selected, onSelect, year: _year, onYearChange, }: {
14
- children: any;
15
- dropdownCaption: any;
16
- disabled: any;
17
- selected: any;
18
- onSelect: any;
19
- year: any;
20
- onYearChange: any;
21
- }) => React.JSX.Element;
@@ -1,64 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.SharedMonthProvider = exports.useSharedMonthContext = exports.SharedMonthContext = void 0;
27
- const date_fns_1 = require("date-fns");
28
- const react_1 = __importStar(require("react"));
29
- const react_day_picker_1 = require("react-day-picker");
30
- const utils_1 = require("../utils");
31
- exports.SharedMonthContext = (0, react_1.createContext)({
32
- hasDropdown: false,
33
- year: new Date(),
34
- toYear: () => null,
35
- disabled: [],
36
- onSelect: () => null,
37
- });
38
- const useSharedMonthContext = () => (0, react_1.useContext)(exports.SharedMonthContext);
39
- exports.useSharedMonthContext = useSharedMonthContext;
40
- const SharedMonthProvider = ({ children, dropdownCaption, disabled, selected, onSelect, year: _year, onYearChange, }) => {
41
- const context = (0, react_day_picker_1.useDayPicker)();
42
- const [year, toYear] = (0, react_1.useState)((0, utils_1.getInitialYear)(context));
43
- const hasDropdown = !!(dropdownCaption && context.fromDate && context.toDate);
44
- if (context.fromDate &&
45
- context.toDate &&
46
- (context === null || context === void 0 ? void 0 : context.fromDate) >= (context === null || context === void 0 ? void 0 : context.toDate)) {
47
- console.warn("fromDate needs to be before toDate - MonthPicker");
48
- }
49
- return (react_1.default.createElement(exports.SharedMonthContext.Provider, { value: {
50
- year: _year !== null && _year !== void 0 ? _year : year,
51
- toYear: (y) => {
52
- toYear(y);
53
- onYearChange === null || onYearChange === void 0 ? void 0 : onYearChange(y);
54
- },
55
- hasDropdown,
56
- disabled,
57
- selected,
58
- onSelect: (v) => v
59
- ? onSelect((0, date_fns_1.setYear)((0, date_fns_1.startOfMonth)(v), (_year !== null && _year !== void 0 ? _year : year).getFullYear()))
60
- : onSelect(undefined),
61
- } }, children));
62
- };
63
- exports.SharedMonthProvider = SharedMonthProvider;
64
- //# sourceMappingURL=useSharedMonthContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSharedMonthContext.js","sourceRoot":"","sources":["../../../src/date/context/useSharedMonthContext.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAiD;AACjD,+CAAmE;AACnE,uDAAgD;AAChD,oCAAmD;AAWtC,QAAA,kBAAkB,GAAG,IAAA,qBAAa,EAAyB;IACtE,WAAW,EAAE,KAAK;IAClB,IAAI,EAAE,IAAI,IAAI,EAAE;IAChB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI;IAClB,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,GAAG,EA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AY,EAAC,CAAC,CAAC,EAAE,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;gBACnE,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;SAC1B,IAEA,QAAQ,CACmB,CAC/B,CAAC;AACJ,CAAC,CAAC;AA3CW,QAAA,mBAAmB,uBA2C9B"}
@@ -1,18 +0,0 @@
1
- import React from "react";
2
- import { DatePickerDefaultProps, MultipleMode, RangeMode, SingleMode } from "./types";
3
- interface DatePickerStandaloneDefaultProps extends Omit<DatePickerDefaultProps, "open" | "onClose" | "onOpenToggle" | "wrapperClassName" | "strategy"> {
4
- /**
5
- * Datepicker classname
6
- */
7
- className?: string;
8
- /**
9
- * If datepicker should be fixed to 6 weeks, regardless of actual weeks in month
10
- * @default true
11
- */
12
- fixedWeeks?: boolean;
13
- }
14
- type StandaloneConditionalModeProps = SingleMode | MultipleMode | RangeMode;
15
- export type DatePickerStandaloneProps = DatePickerStandaloneDefaultProps & StandaloneConditionalModeProps;
16
- export type DatePickerStandaloneType = React.ForwardRefExoticComponent<DatePickerStandaloneProps & React.RefAttributes<HTMLDivElement>>;
17
- export declare const DatePickerStandalone: DatePickerStandaloneType;
18
- export default DatePickerStandalone;
@@ -1,86 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __rest = (this && this.__rest) || function (s, e) {
26
- var t = {};
27
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
- t[p] = s[p];
29
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
- t[p[i]] = s[p[i]];
33
- }
34
- return t;
35
- };
36
- var __importDefault = (this && this.__importDefault) || function (mod) {
37
- return (mod && mod.__esModule) ? mod : { "default": mod };
38
- };
39
- Object.defineProperty(exports, "__esModule", { value: true });
40
- exports.DatePickerStandalone = void 0;
41
- const clsx_1 = __importDefault(require("clsx"));
42
- const date_fns_1 = require("date-fns");
43
- const react_1 = __importStar(require("react"));
44
- const react_day_picker_1 = require("react-day-picker");
45
- const util_1 = require("../../util");
46
- const i18n_hooks_1 = require("../../util/i18n/i18n.hooks");
47
- const context_1 = require("../context");
48
- const utils_1 = require("../utils");
49
- const Caption_1 = __importDefault(require("./parts/Caption"));
50
- const DropdownCaption_1 = __importDefault(require("./parts/DropdownCaption"));
51
- const HeadRow_1 = require("./parts/HeadRow");
52
- const Row_1 = __importDefault(require("./parts/Row"));
53
- const TableHead_1 = __importDefault(require("./parts/TableHead"));
54
- const WeekNumber_1 = __importDefault(require("./parts/WeekNumber"));
55
- exports.DatePickerStandalone = (0, react_1.forwardRef)((_a, ref) => {
56
- var _b;
57
- var { className, locale, translations, dropdownCaption, disabled = [], disableWeekends = false, showWeekNumber = false, selected, defaultSelected, onSelect, fixedWeeks = false, onWeekNumberClick } = _a, rest = __rest(_a, ["className", "locale", "translations", "dropdownCaption", "disabled", "disableWeekends", "showWeekNumber", "selected", "defaultSelected", "onSelect", "fixedWeeks", "onWeekNumberClick"]);
58
- const translate = (0, i18n_hooks_1.useI18n)("DatePicker", translations, (0, utils_1.getTranslations)(locale));
59
- const langProviderLocale = (0, i18n_hooks_1.useDateLocale)();
60
- const [selectedDates, setSelectedDates] = react_1.default.useState(defaultSelected);
61
- const mode = (_b = rest.mode) !== null && _b !== void 0 ? _b : "single";
62
- /**
63
- * @param newSelected Date | Date[] | DateRange | undefined
64
- */
65
- const handleSelect = (newSelected) => {
66
- setSelectedDates(newSelected);
67
- onSelect === null || onSelect === void 0 ? void 0 : onSelect(newSelected);
68
- };
69
- return (react_1.default.createElement("div", { ref: ref, className: (0, clsx_1.default)("navds-date__standalone-wrapper", className) },
70
- react_1.default.createElement(context_1.DateTranslationContextProvider, { translate: translate },
71
- react_1.default.createElement(react_day_picker_1.DayPicker, Object.assign({ locale: locale ? (0, utils_1.getLocaleFromString)(locale) : langProviderLocale, mode: mode, onSelect: handleSelect, selected: selected !== null && selected !== void 0 ? selected : selectedDates, components: {
72
- Caption: dropdownCaption ? DropdownCaption_1.default : Caption_1.default,
73
- Head: TableHead_1.default,
74
- HeadRow: HeadRow_1.HeadRow,
75
- WeekNumber: WeekNumber_1.default,
76
- Row: Row_1.default,
77
- }, className: "navds-date", classNames: { vhidden: "navds-sr-only" }, disabled: (day) => {
78
- return ((disableWeekends && (0, date_fns_1.isWeekend)(day)) || (0, react_day_picker_1.isMatch)(day, disabled));
79
- }, weekStartsOn: 1, initialFocus: false, modifiers: {
80
- weekend: (day) => disableWeekends && (0, date_fns_1.isWeekend)(day),
81
- }, modifiersClassNames: {
82
- weekend: "rdp-day__weekend",
83
- }, showWeekNumber: showWeekNumber, onWeekNumberClick: mode === "multiple" ? onWeekNumberClick : undefined, fixedWeeks: fixedWeeks, showOutsideDays: true }, (0, util_1.omit)(rest, ["children", "id"]))))));
84
- });
85
- exports.default = exports.DatePickerStandalone;
86
- //# sourceMappingURL=DatePickerStandalone.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DatePickerStandalone.js","sourceRoot":"","sources":["../../../src/date/datepicker/DatePickerStandalone.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAsB;AACtB,uCAAqC;AACrC,+CAA0C;AAC1C,uDAAiE;AACjE,qCAAkC;AAClC,2DAAoE;AACpE,wCAA4D;AAC5D,oCAAgE;AAChE,8DAAsC;AACtC,8EAAsD;AACtD,6CAA0C;AAC1C,sDAA8B;AAC9B,kEAA0C;AAC1C,oEAA4C;AAiC/B,QAAA,oBAAoB,GAA6B,IAAA,kBAAU,EAItE,CACE,EAcC,EACD,GAAG,EACH,EAAE;;QAhBF,EACE,SAAS,EACT,MAAM,EACN,YAAY,EACZ,eAAe,EACf,QAAQ,GAAG,EAAE,EACb,eAAe,GAAG,KAAK,EACvB,cAAc,GAAG,KAAK,EACtB,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,UAAU,GAAG,KAAK,EAClB,iBAAiB,OAElB,EADI,IAAI,cAbT,yLAcC,CADQ;IAIT,MAAM,SAAS,GAAG,IAAA,oBAAO,EACvB,YAAY,EACZ,YAAY,EACZ,IAAA,uBAAe,EAAC,MAAM,CAAC,CACxB,CAAC;IACF,MAAM,kBAAkB,GAAG,IAAA,0BAAa,GAAE,CAAC;IAC3C,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,eAAK,CAAC,QAAQ,CAEtD,eAAe,CAAC,CAAC;IAEnB,MAAM,IAAI,GAAG,MAAA,IAAI,CAAC,IAAI,mCAAK,QAAgB,CAAC;IAE5C;;OAEG;IACH,MAAM,YAAY,GAAG,CAAC,WAAW,EAAE,EAAE;QACnC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAC9B,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,WAAW,CAAC,CAAC;IAC1B,CAAC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,WAAI,EAAC,IAAI,EAAE,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,EAClC,CAC6B,CAC7B,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,kBAAe,4BAAoB,CAAC"}
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- import { CaptionProps } from "react-day-picker";
3
- /**
4
- * https://github.com/gpbl/react-day-picker/tree/main/src/components/Caption
5
- */
6
- export declare const DatePickerCaption: ({ displayMonth, id }: CaptionProps) => React.JSX.Element;
7
- export default DatePickerCaption;
@@ -1,30 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.DatePickerCaption = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const react_day_picker_1 = require("react-day-picker");
9
- const aksel_icons_1 = require("@navikt/aksel-icons");
10
- const button_1 = require("../../../button");
11
- const typography_1 = require("../../../typography");
12
- const context_1 = require("../../context");
13
- const WeekRow_1 = __importDefault(require("./WeekRow"));
14
- /**
15
- * https://github.com/gpbl/react-day-picker/tree/main/src/components/Caption
16
- */
17
- const DatePickerCaption = ({ displayMonth, id }) => {
18
- const { goToMonth, nextMonth, previousMonth } = (0, react_day_picker_1.useNavigation)();
19
- const { formatters: { formatCaption }, locale, } = (0, react_day_picker_1.useDayPicker)();
20
- const translate = (0, context_1.useDateTranslationContext)().translate;
21
- return (react_1.default.createElement(react_1.default.Fragment, null,
22
- react_1.default.createElement("div", { className: "navds-date__caption" },
23
- react_1.default.createElement(button_1.Button, { variant: "tertiary-neutral", disabled: !previousMonth, onClick: () => previousMonth && goToMonth(previousMonth), icon: react_1.default.createElement(aksel_icons_1.ArrowLeftIcon, { title: translate("goToPreviousMonth") }), className: "navds-date__caption-button", type: "button" }),
24
- react_1.default.createElement(typography_1.Label, { as: "span", "aria-live": "polite", "aria-atomic": "true", id: id, className: "navds-date__caption-label" }, formatCaption(displayMonth, { locale })),
25
- react_1.default.createElement(button_1.Button, { icon: react_1.default.createElement(aksel_icons_1.ArrowRightIcon, { title: translate("goToNextMonth") }), onClick: () => nextMonth && goToMonth(nextMonth), disabled: !nextMonth, variant: "tertiary-neutral", className: "navds-date__caption-button", type: "button" })),
26
- react_1.default.createElement(WeekRow_1.default, { displayMonth: displayMonth })));
27
- };
28
- exports.DatePickerCaption = DatePickerCaption;
29
- exports.default = exports.DatePickerCaption;
30
- //# sourceMappingURL=Caption.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Caption.js","sourceRoot":"","sources":["../../../../src/date/datepicker/parts/Caption.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,uDAA6E;AAC7E,qDAAoE;AACpE,4CAAyC;AACzC,oDAA4C;AAC5C,2CAA0D;AAC1D,wDAAgC;AAEhC;;GAEG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAAE,YAAY,EAAE,EAAE,EAAgB,EAAE,EAAE;IACtE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,IAAA,gCAAa,GAAE,CAAC;IAChE,MAAM,EACJ,UAAU,EAAE,EAAE,aAAa,EAAE,EAC7B,MAAM,GACP,GAAG,IAAA,+BAAY,GAAE,CAAC;IACnB,MAAM,SAAS,GAAG,IAAA,mCAAyB,GAAE,CAAC,SAAS,CAAC;IAExD,OAAO,CACL;QACE,uCAAK,SAAS,EAAC,qBAAqB;YAClC,8BAAC,eAAM,IACL,OAAO,EAAC,kBAAkB,EAC1B,QAAQ,EAAE,CAAC,aAAa,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,IAAI,SAAS,CAAC,aAAa,CAAC,EACxD,IAAI,EAAE,8BAAC,2BAAa,IAAC,KAAK,EAAE,SAAS,CAAC,mBAAmB,CAAC,GAAI,EAC9D,SAAS,EAAC,4BAA4B,EACtC,IAAI,EAAC,QAAQ,GACb;YACF,8BAAC,kBAAK,IACJ,EAAE,EAAC,MAAM,eACC,QAAQ,iBACN,MAAM,EAClB,EAAE,EAAE,EAAE,EACN,SAAS,EAAC,2BAA2B,IAEpC,aAAa,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,CAAC,CAClC;YACR,8BAAC,eAAM,IACL,IAAI,EAAE,8BAAC,4BAAc,IAAC,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,GAAI,EAC3D,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,IAAI,SAAS,CAAC,SAAS,CAAC,EAChD,QAAQ,EAAE,CAAC,SAAS,EACpB,OAAO,EAAC,kBAAkB,EAC1B,SAAS,EAAC,4BAA4B,EACtC,IAAI,EAAC,QAAQ,GACb,CACE;QACN,8BAAC,iBAAO,IAAC,YAAY,EAAE,YAAY,GAAI,CACtC,CACJ,CAAC;AACJ,CAAC,CAAC;AAxCW,QAAA,iBAAiB,qBAwC5B;AAEF,kBAAe,yBAAiB,CAAC"}
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import { DayProps } from "react-day-picker";
3
- declare const DayButton: (props: DayProps) => React.JSX.Element;
4
- export default DayButton;
@@ -1,43 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- const date_fns_1 = require("date-fns");
27
- const react_1 = __importStar(require("react"));
28
- const react_day_picker_1 = require("react-day-picker");
29
- const DayButton = (props) => {
30
- const buttonRef = (0, react_1.useRef)(null);
31
- const dayRender = (0, react_day_picker_1.useDayRender)(props.date, props.displayMonth, buttonRef);
32
- const { locale } = (0, react_day_picker_1.useDayPicker)();
33
- const dateTime = (0, date_fns_1.format)(props.date, "cccc d", { locale });
34
- if (dayRender.isHidden) {
35
- return react_1.default.createElement(react_1.default.Fragment, null);
36
- }
37
- if (!dayRender.isButton) {
38
- return react_1.default.createElement("div", Object.assign({}, dayRender.divProps));
39
- }
40
- return (react_1.default.createElement(react_day_picker_1.Button, Object.assign({ name: "day", ref: buttonRef }, dayRender.buttonProps, { role: undefined, "aria-label": dateTime, "aria-hidden": dayRender.activeModifiers.outside, "aria-selected": undefined, "aria-pressed": !!dayRender.activeModifiers.selected })));
41
- };
42
- exports.default = DayButton;
43
- //# sourceMappingURL=DayButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DayButton.js","sourceRoot":"","sources":["../../../../src/date/datepicker/parts/DayButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAkC;AAClC,+CAAsC;AACtC,uDAAgF;AAEhF,MAAM,SAAS,GAAG,CAAC,KAAe,EAAE,EAAE;IACpC,MAAM,SAAS,GAAG,IAAA,cAAM,EAAoB,IAAI,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,IAAA,+BAAY,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IAC1E,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,+BAAY,GAAE,CAAC;IAClC,MAAM,QAAQ,GAAG,IAAA,iBAAM,EAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAE1D,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;QACvB,OAAO,6DAAK,CAAC;IACf,CAAC;IACD,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QACxB,OAAO,uDAAS,SAAS,CAAC,QAAQ,EAAI,CAAC;IACzC,CAAC;IAED,OAAO,CACL,8BAAC,yBAAM,kBACL,IAAI,EAAC,KAAK,EACV,GAAG,EAAE,SAAS,IACV,SAAS,CAAC,WAAW,IACzB,IAAI,EAAE,SAAS,gBACH,QAAQ,iBACP,SAAS,CAAC,eAAe,CAAC,OAAO,mBAC/B,SAAS,kBACV,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,QAAQ,IAClD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC"}
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- import { CaptionProps } from "react-day-picker";
3
- /**
4
- * https://github.com/gpbl/react-day-picker/tree/main/src/components/CaptionDropdowns
5
- */
6
- export declare const DropdownCaption: ({ displayMonth, id }: CaptionProps) => React.JSX.Element | null;
7
- export default DropdownCaption;
@@ -1,46 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.DropdownCaption = void 0;
7
- const date_fns_1 = require("date-fns");
8
- const react_1 = __importDefault(require("react"));
9
- const react_day_picker_1 = require("react-day-picker");
10
- const aksel_icons_1 = require("@navikt/aksel-icons");
11
- const button_1 = require("../../../button");
12
- const select_1 = require("../../../form/select");
13
- const context_1 = require("../../context");
14
- const utils_1 = require("../../utils");
15
- const WeekRow_1 = __importDefault(require("./WeekRow"));
16
- /**
17
- * https://github.com/gpbl/react-day-picker/tree/main/src/components/CaptionDropdowns
18
- */
19
- const DropdownCaption = ({ displayMonth, id }) => {
20
- const { goToMonth, nextMonth, previousMonth } = (0, react_day_picker_1.useNavigation)();
21
- const { fromDate, toDate, formatters: { formatYearCaption, formatMonthCaption, formatCaption }, locale, } = (0, react_day_picker_1.useDayPicker)();
22
- const translate = (0, context_1.useDateTranslationContext)().translate;
23
- if (!fromDate || !toDate) {
24
- console.warn("Using dropdownCaption required fromDate and toDate");
25
- return null;
26
- }
27
- const handleYearChange = (e) => {
28
- const newMonth = (0, date_fns_1.setYear)((0, date_fns_1.startOfMonth)(displayMonth), Number(e.target.value));
29
- goToMonth((0, date_fns_1.startOfMonth)((0, date_fns_1.min)([(0, date_fns_1.max)([newMonth, fromDate]), toDate])));
30
- };
31
- const handleMonthChange = (e) => goToMonth((0, date_fns_1.setMonth)((0, date_fns_1.startOfMonth)(displayMonth), Number(e.target.value)));
32
- const years = (0, utils_1.getYears)(fromDate, toDate, displayMonth.getFullYear()).reverse();
33
- const months = (0, utils_1.getMonths)(fromDate, toDate, displayMonth);
34
- return (react_1.default.createElement(react_1.default.Fragment, null,
35
- react_1.default.createElement("div", { className: "navds-date__caption" },
36
- react_1.default.createElement("span", { "aria-live": "polite", "aria-atomic": "true", id: id, className: "navds-sr-only" }, formatCaption(displayMonth, { locale })),
37
- react_1.default.createElement(button_1.Button, { variant: "tertiary-neutral", disabled: !previousMonth, onClick: () => previousMonth && goToMonth(previousMonth), icon: react_1.default.createElement(aksel_icons_1.ArrowLeftIcon, { title: translate("goToPreviousMonth") }), className: "navds-date__caption-button", type: "button" }),
38
- react_1.default.createElement("div", { className: "navds-date__caption" },
39
- react_1.default.createElement(select_1.Select, { label: translate("month"), hideLabel: true, className: "navds-date__caption__month", value: displayMonth.getMonth(), onChange: handleMonthChange }, months.map((m) => (react_1.default.createElement("option", { key: m.getMonth(), value: m.getMonth() }, formatMonthCaption(m, { locale }))))),
40
- react_1.default.createElement(select_1.Select, { label: translate("year"), hideLabel: true, value: displayMonth.getFullYear(), onChange: handleYearChange, className: "navds-date__caption__year" }, years.map((year) => (react_1.default.createElement("option", { key: year.getFullYear(), value: year.getFullYear() }, formatYearCaption(year, { locale })))))),
41
- react_1.default.createElement(button_1.Button, { variant: "tertiary-neutral", icon: react_1.default.createElement(aksel_icons_1.ArrowRightIcon, { title: translate("goToNextMonth") }), onClick: () => nextMonth && goToMonth(nextMonth), disabled: !nextMonth, className: "navds-date__caption-button", type: "button" })),
42
- react_1.default.createElement(WeekRow_1.default, { displayMonth: displayMonth })));
43
- };
44
- exports.DropdownCaption = DropdownCaption;
45
- exports.default = exports.DropdownCaption;
46
- //# sourceMappingURL=DropdownCaption.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DropdownCaption.js","sourceRoot":"","sources":["../../../../src/date/datepicker/parts/DropdownCaption.tsx"],"names":[],"mappings":";;;;;;AAAA,uCAAqE;AACrE,kDAA0B;AAC1B,uDAA6E;AAC7E,qDAAoE;AACpE,4CAAyC;AACzC,iDAA8C;AAC9C,2CAA0D;AAC1D,uCAAkD;AAClD,wDAAgC;AAEhC;;GAEG;AACI,MAAM,eAAe,GAAG,CAAC,EAAE,YAAY,EAAE,EAAE,EAAgB,EAAE,EAAE;IACpE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,IAAA,gCAAa,GAAE,CAAC;IAChE,MAAM,EACJ,QAAQ,EACR,MAAM,EACN,UAAU,EAAE,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,aAAa,EAAE,EACpE,MAAM,GACP,GAAG,IAAA,+BAAY,GAAE,CAAC;IACnB,MAAM,SAAS,GAAG,IAAA,mCAAyB,GAAE,CAAC,SAAS,CAAC;IAExD,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM,EAAE,CAAC;QACzB,OAAO,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,gBAAgB,GAAgD,CAAC,CAAC,EAAE,EAAE;QAC1E,MAAM,QAAQ,GAAG,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 -1,10 +0,0 @@
1
- import { Locale } from "date-fns";
2
- /**
3
- * https://github.com/gpbl/react-day-picker/tree/main/src/components/HeadRow
4
- */
5
- export declare function HeadRow(): JSX.Element;
6
- /**
7
- * Generate a series of 7 days, starting from the week, to use for formatting
8
- * the weekday names (Monday, Tuesday, etc.).
9
- */
10
- export declare function getWeekdays(locale?: Locale): Date[];