@pismo/marola 2.0.2 → 2.1.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 (69) hide show
  1. package/dist/{Button-cCziLrIy.js → Button-Bh6rpTyY.js} +2 -2
  2. package/dist/{ClickAwayListener-CUayzVlD.js → ClickAwayListener-BjqhGzJh.js} +3 -3
  3. package/dist/DatePicker.module-C9zgeg52.js +46 -0
  4. package/dist/{Popup-C7AXLoP0.js → Popup-aWlctE1C.js} +3 -3
  5. package/dist/{Portal-CYV5TK_i.js → Portal-Dc9ej3DW.js} +2 -2
  6. package/dist/{RadioButton.module-B4kmS66R.js → RadioButton.module-VF7v9SuY.js} +1 -1
  7. package/dist/{Toggle-DEVeyo2f.js → Toggle-DeMSbC0N.js} +16 -15
  8. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  9. package/dist/assets/DatePicker.css +1 -0
  10. package/dist/{combineHooksSlotProps-BCXoX9Nx.js → combineHooksSlotProps-CNWfgylM.js} +1 -1
  11. package/dist/components/Autocomplete/Autocomplete.js +1 -1
  12. package/dist/components/Button/Button.js +1 -1
  13. package/dist/components/Chip/Chip.js +4 -3
  14. package/dist/components/DatePicker/DatePicker.d.ts +30 -0
  15. package/dist/components/DatePicker/DatePicker.js +1534 -0
  16. package/dist/components/DatePicker/DatePicker.stories.d.ts +45 -0
  17. package/dist/components/DatePicker/dateUtils.d.ts +96 -0
  18. package/dist/components/DatePicker/dateUtils.js +70 -0
  19. package/dist/components/DatePicker/dateUtils.test.d.ts +0 -0
  20. package/dist/components/DatePicker/keyboardNavigation.d.ts +14 -0
  21. package/dist/components/DatePicker/keyboardNavigation.js +26 -0
  22. package/dist/components/DatePicker/keyboardNavigation.test.d.ts +1 -0
  23. package/dist/components/DatePicker/renderCalendarDays.d.ts +25 -0
  24. package/dist/components/DatePicker/renderCalendarDays.js +85 -0
  25. package/dist/components/DatePicker/renderCalendarDays.test.d.ts +2 -0
  26. package/dist/components/DatePicker/renderDualCalendarHeader.d.ts +8 -0
  27. package/dist/components/DatePicker/renderDualCalendarHeader.js +51 -0
  28. package/dist/components/DatePicker/renderDualCalendarHeader.test.d.ts +0 -0
  29. package/dist/components/DatePicker/renderHeader.d.ts +11 -0
  30. package/dist/components/DatePicker/renderHeader.js +41 -0
  31. package/dist/components/DatePicker/renderHeader.test.d.ts +0 -0
  32. package/dist/components/DatePicker/renderNavigatorInput.d.ts +16 -0
  33. package/dist/components/DatePicker/renderNavigatorInput.js +73 -0
  34. package/dist/components/DatePicker/renderNavigatorInput.test.d.ts +1 -0
  35. package/dist/components/DatePicker/renderPeriodSelection.d.ts +17 -0
  36. package/dist/components/DatePicker/renderPeriodSelection.js +81 -0
  37. package/dist/components/DatePicker/renderPeriodSelection.test.d.ts +1 -0
  38. package/dist/components/Dialog/CloseIconButton.js +1 -1
  39. package/dist/components/Dialog/Dialog.js +4 -4
  40. package/dist/components/Icon/Icon.js +181 -158
  41. package/dist/components/Icon/types.d.ts +1 -1
  42. package/dist/components/IconButton/IconButton.js +1 -1
  43. package/dist/components/Input/Input.js +1 -1
  44. package/dist/components/Popover/Popover.js +2 -2
  45. package/dist/components/RadioButton/RadioButton.js +7 -6
  46. package/dist/components/RadioButton/RadioOption.js +7 -6
  47. package/dist/components/ResultWithChips/ResultWithChips.js +1 -1
  48. package/dist/components/RowItem/RowItem.js +4 -3
  49. package/dist/components/Select/Select.js +5 -5
  50. package/dist/components/Snackbar/Snackbar.js +3 -3
  51. package/dist/components/Tabs/Tab.js +3 -3
  52. package/dist/components/Tabs/TabPanel.js +1 -1
  53. package/dist/components/Tabs/Tabs.js +3 -3
  54. package/dist/components/Toggle/Toggle.js +1 -1
  55. package/dist/components/ToggleGroup/Toggle.js +3 -2
  56. package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
  57. package/dist/components/Tooltip/Tooltip.js +3 -3
  58. package/dist/components/Typography/Typography.test.d.ts +1 -0
  59. package/dist/contexts/SnackbarProvider/SnackbarProvider.js +1 -1
  60. package/dist/dayjs.min-ClQKmc--.js +285 -0
  61. package/dist/{index-CATDT7fJ.js → index-Bppuplgd.js} +6 -5
  62. package/dist/main.d.ts +1 -0
  63. package/dist/main.js +106 -105
  64. package/dist/{ownerDocument-CAHSRRik.js → ownerDocument-CXvpb_nj.js} +2 -1
  65. package/dist/{useButton-eF8MXAli.js → useButton-B8Y1xR88.js} +1 -1
  66. package/dist/{useList-CPY2roI7.js → useList-9gbS2r78.js} +2 -2
  67. package/dist/{useSlotProps-DSnfx453.js → useSlotProps-C7dqSmdM.js} +109 -112
  68. package/package.json +1 -1
  69. /package/dist/components/{Typography/typography.test.d.ts → DatePicker/DatePicker.test.d.ts} +0 -0
@@ -0,0 +1,81 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { d as Y } from "../../dayjs.min-ClQKmc--.js";
3
+ import { s } from "../../DatePicker.module-C9zgeg52.js";
4
+ const T = ({
5
+ currentViewMode: d,
6
+ currentMonth: i,
7
+ selectedDate: e,
8
+ locale: S,
9
+ mode: y,
10
+ initialViewMode: f,
11
+ navigatorInput: h,
12
+ setCurrentMonth: $,
13
+ setSelectedDate: o,
14
+ onChange: p,
15
+ setCurrentViewMode: l,
16
+ setIsOpen: b
17
+ }) => {
18
+ if (d === "month") {
19
+ const k = Array.from({ length: 12 }, (r, t) => ({
20
+ value: t,
21
+ label: Y().month(t).locale(S).format("MMM")
22
+ }));
23
+ return /* @__PURE__ */ m("div", { className: s.months, "data-testid": "date-picker-months-container", children: k.map(({ value: r, label: t }) => {
24
+ const n = e && e.month() === r;
25
+ return /* @__PURE__ */ m(
26
+ "button",
27
+ {
28
+ className: `${s.month} ${n ? s.selected : ""}`,
29
+ onClick: () => {
30
+ const a = i.month(r);
31
+ if ($(a), y === "single")
32
+ if (f === "month" || h) {
33
+ const c = a.date(1);
34
+ o(c), p(c), b(!1);
35
+ } else
36
+ o(null), l("day");
37
+ else
38
+ l("day");
39
+ },
40
+ "aria-label": `Select month ${t}`,
41
+ "data-testid": `month-button-${t}`,
42
+ children: t
43
+ },
44
+ r
45
+ );
46
+ }) });
47
+ } else if (d === "year") {
48
+ const r = i.year() - 6, t = Array.from({ length: 12 }, (n, a) => ({
49
+ value: r + a,
50
+ label: `${r + a}`
51
+ }));
52
+ return /* @__PURE__ */ m("div", { className: s.years, "data-testid": "date-picker-years-container", children: t.map(({ value: n, label: a }) => {
53
+ const c = e && e.year() === n;
54
+ return /* @__PURE__ */ m(
55
+ "button",
56
+ {
57
+ className: `${s.year} ${c ? s.selected : ""}`,
58
+ onClick: () => {
59
+ const u = i.year(n);
60
+ if ($(u), y === "single")
61
+ if (f === "year" || h) {
62
+ const N = u.date(1);
63
+ o(N), p(N), b(!1);
64
+ } else
65
+ o(null), l("day");
66
+ else
67
+ l("month");
68
+ },
69
+ "aria-label": `Select year ${a}`,
70
+ "data-testid": `year-button-${a}`,
71
+ children: a
72
+ },
73
+ n
74
+ );
75
+ }) });
76
+ }
77
+ return null;
78
+ };
79
+ export {
80
+ T as renderPeriodSelection
81
+ };
@@ -1,7 +1,7 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { Icon as i } from "../Icon/Icon.js";
3
3
  import { s as r } from "../../Dialog.module-BtKUNFVu.js";
4
- import { B as s } from "../../Button-cCziLrIy.js";
4
+ import { B as s } from "../../Button-Bh6rpTyY.js";
5
5
  const n = ({ handleOnClose: t }) => /* @__PURE__ */ o(
6
6
  s,
7
7
  {
@@ -8,11 +8,11 @@ import ce from "./CloseIconButton.js";
8
8
  import de from "./Content.js";
9
9
  import { s as z } from "../../Dialog.module-BtKUNFVu.js";
10
10
  import ee from "./DialogTitle.js";
11
- import { u as te, P as l, b as C, f as ue, g as fe, a as pe, _ as be, c as G, d as he, e as me } from "../../useSlotProps-DSnfx453.js";
12
- import { o as A, e as oe } from "../../ownerDocument-CAHSRRik.js";
11
+ import { u as te, P as l, b as C, f as ue, g as fe, a as pe, _ as be, c as G, d as he, e as me } from "../../useSlotProps-C7dqSmdM.js";
12
+ import { o as A, e as oe } from "../../ownerDocument-CXvpb_nj.js";
13
13
  import { u as X } from "../../useEventCallback-BAQJJ3ye.js";
14
- import { P as ge, H as Ee } from "../../Portal-CYV5TK_i.js";
15
- import { e as Te } from "../../index-CATDT7fJ.js";
14
+ import { P as ge, H as Ee } from "../../Portal-Dc9ej3DW.js";
15
+ import { e as Te } from "../../index-Bppuplgd.js";
16
16
  function J(...e) {
17
17
  return e.reduce((t, n) => n == null ? t : function(...s) {
18
18
  t.apply(this, s), n.apply(this, s);