@arkyn/components 3.0.8 → 3.0.9

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 (86) hide show
  1. package/dist/components/calendar/calendarTableTd/index.d.ts.map +1 -1
  2. package/dist/components/currencyInput/index.d.ts +1 -1
  3. package/dist/components/datePicker/datePickerCalendarContainer/index.d.ts +1 -0
  4. package/dist/components/datePicker/datePickerCalendarContainer/index.d.ts.map +1 -1
  5. package/dist/components/datePicker/datePickerContainer/index.d.ts +5 -1
  6. package/dist/components/datePicker/datePickerContainer/index.d.ts.map +1 -1
  7. package/dist/components/datePicker/index.d.ts.map +1 -1
  8. package/dist/components/drawer/drawerContainer/index.d.ts.map +1 -1
  9. package/dist/components/imageUpload/index.d.ts +1 -1
  10. package/dist/components/input/index.d.ts +1 -1
  11. package/dist/components/modal/modalContainer/index.d.ts.map +1 -1
  12. package/dist/components/multiSelect/index.d.ts +1 -1
  13. package/dist/components/multiSelect/index.d.ts.map +1 -1
  14. package/dist/components/multiSelect/multiSelectContainer/index.d.ts +6 -1
  15. package/dist/components/multiSelect/multiSelectContainer/index.d.ts.map +1 -1
  16. package/dist/components/multiSelect/multiSelectOption/index.d.ts +2 -0
  17. package/dist/components/multiSelect/multiSelectOption/index.d.ts.map +1 -1
  18. package/dist/components/multiSelect/multiSelectOptionsContainer/index.d.ts +1 -0
  19. package/dist/components/multiSelect/multiSelectOptionsContainer/index.d.ts.map +1 -1
  20. package/dist/components/popover/index.d.ts.map +1 -1
  21. package/dist/components/richText/index.d.ts +1 -1
  22. package/dist/components/select/index.d.ts +1 -1
  23. package/dist/components/select/index.d.ts.map +1 -1
  24. package/dist/components/select/selectContainer/index.d.ts +6 -1
  25. package/dist/components/select/selectContainer/index.d.ts.map +1 -1
  26. package/dist/components/select/selectOption/index.d.ts +2 -0
  27. package/dist/components/select/selectOption/index.d.ts.map +1 -1
  28. package/dist/components/select/selectOptionsContainer/index.d.ts +1 -0
  29. package/dist/components/select/selectOptionsContainer/index.d.ts.map +1 -1
  30. package/dist/hooks/useEscapeKey.d.ts +24 -0
  31. package/dist/hooks/useEscapeKey.d.ts.map +1 -0
  32. package/dist/hooks/useFocusTrap.d.ts +28 -0
  33. package/dist/hooks/useFocusTrap.d.ts.map +1 -0
  34. package/dist/index.js +948 -736
  35. package/dist/index.js.map +1 -1
  36. package/dist/modules/components/calendar/calendarTableTd/index.js +7 -2
  37. package/dist/modules/components/calendar/calendarTableTd/index.js.map +1 -1
  38. package/dist/modules/components/calendar/calendarTableTd/styles.css +1 -1
  39. package/dist/modules/components/calendar/styles.css +2 -2
  40. package/dist/modules/components/currencyInput/index.js.map +1 -1
  41. package/dist/modules/components/datePicker/datePickerCalendarContainer/index.js +12 -9
  42. package/dist/modules/components/datePicker/datePickerCalendarContainer/index.js.map +1 -1
  43. package/dist/modules/components/datePicker/datePickerContainer/index.js +9 -2
  44. package/dist/modules/components/datePicker/datePickerContainer/index.js.map +1 -1
  45. package/dist/modules/components/datePicker/index.js +63 -44
  46. package/dist/modules/components/datePicker/index.js.map +1 -1
  47. package/dist/modules/components/datePicker/styles.css +4 -4
  48. package/dist/modules/components/drawer/drawerContainer/index.js +31 -23
  49. package/dist/modules/components/drawer/drawerContainer/index.js.map +1 -1
  50. package/dist/modules/components/facebookPixel/pixel.js +1 -1
  51. package/dist/modules/components/facebookPixel/pixel.js.map +1 -1
  52. package/dist/modules/components/imageUpload/index.js.map +1 -1
  53. package/dist/modules/components/input/index.js.map +1 -1
  54. package/dist/modules/components/modal/modalContainer/index.js +30 -22
  55. package/dist/modules/components/modal/modalContainer/index.js.map +1 -1
  56. package/dist/modules/components/multiSelect/index.js +119 -79
  57. package/dist/modules/components/multiSelect/index.js.map +1 -1
  58. package/dist/modules/components/multiSelect/multiSelectContainer/index.js +10 -2
  59. package/dist/modules/components/multiSelect/multiSelectContainer/index.js.map +1 -1
  60. package/dist/modules/components/multiSelect/multiSelectOption/index.js +7 -3
  61. package/dist/modules/components/multiSelect/multiSelectOption/index.js.map +1 -1
  62. package/dist/modules/components/multiSelect/multiSelectOption/styles.css +1 -1
  63. package/dist/modules/components/multiSelect/multiSelectOptionsContainer/index.js +18 -15
  64. package/dist/modules/components/multiSelect/multiSelectOptionsContainer/index.js.map +1 -1
  65. package/dist/modules/components/multiSelect/styles.css +1 -1
  66. package/dist/modules/components/popover/index.js +23 -17
  67. package/dist/modules/components/popover/index.js.map +1 -1
  68. package/dist/modules/components/richText/index.js.map +1 -1
  69. package/dist/modules/components/searchPlaces.js +1 -1
  70. package/dist/modules/components/searchPlaces.js.map +1 -1
  71. package/dist/modules/components/select/index.js +120 -80
  72. package/dist/modules/components/select/index.js.map +1 -1
  73. package/dist/modules/components/select/selectContainer/index.js +10 -2
  74. package/dist/modules/components/select/selectContainer/index.js.map +1 -1
  75. package/dist/modules/components/select/selectOption/index.js +5 -2
  76. package/dist/modules/components/select/selectOption/index.js.map +1 -1
  77. package/dist/modules/components/select/selectOption/styles.css +1 -1
  78. package/dist/modules/components/select/selectOptionsContainer/index.js +17 -15
  79. package/dist/modules/components/select/selectOptionsContainer/index.js.map +1 -1
  80. package/dist/modules/components/select/styles.css +1 -1
  81. package/dist/modules/hooks/useEscapeKey.js +18 -0
  82. package/dist/modules/hooks/useEscapeKey.js.map +1 -0
  83. package/dist/modules/hooks/useFocusTrap.js +44 -0
  84. package/dist/modules/hooks/useFocusTrap.js.map +1 -0
  85. package/dist/style.css +1 -1
  86. package/package.json +8 -8
@@ -8,11 +8,16 @@ function r(r) {
8
8
  let e = /* @__PURE__ */ new Date();
9
9
  return i === e.getDate() && a === e.getMonth() && o === e.getFullYear();
10
10
  }
11
+ function d() {
12
+ l(i, a, o);
13
+ }
11
14
  return /* @__PURE__ */ t("td", {
12
- onClick: () => l(i, a, o),
13
15
  className: `arkynCalendarTableTd ${s} ${c} ${u() ? "today" : ""}`,
14
- children: /* @__PURE__ */ n("div", {
16
+ children: /* @__PURE__ */ n("button", {
17
+ type: "button",
15
18
  className: "textGroup",
19
+ "aria-pressed": c === "checkedDay",
20
+ onClick: d,
16
21
  children: [/* @__PURE__ */ t("span", {}), /* @__PURE__ */ t("p", { children: i })]
17
22
  })
18
23
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/calendar/calendarTableTd/index.tsx"],"sourcesContent":["import { useCalendar } from \"../_calendarProvider\";\nimport \"./styles.css\";\n\ntype CalendarTableTdProps = {\n\tday: number;\n\tmonth: number;\n\tyear: number;\n\tdayType: \"checkedDay\" | \"middleDay\" | \"uncheckedDay\";\n\tdayOwner: \"previous\" | \"current\" | \"next\";\n};\n\nfunction CalendarTableTd(props: CalendarTableTdProps) {\n\tconst { day, month, year, dayOwner, dayType } = props;\n\tconst { changeDay } = useCalendar();\n\n\tfunction isToday() {\n\t\tconst today = new Date();\n\t\treturn (\n\t\t\tday === today.getDate() &&\n\t\t\tmonth === today.getMonth() &&\n\t\t\tyear === today.getFullYear()\n\t\t);\n\t}\n\n\treturn (\n\t\t<td\n\t\t\tonClick={() => changeDay(day, month, year)}\n\t\t\tclassName={`arkynCalendarTableTd ${dayOwner} ${dayType} ${isToday() ? \"today\" : \"\"}`}\n\t\t>\n\t\t\t<div className=\"textGroup\">\n\t\t\t\t<span />\n\t\t\t\t<p>{day}</p>\n\t\t\t</div>\n\t\t</td>\n\t);\n}\n\nexport { CalendarTableTd };\n"],"mappings":";;;;AAWA,SAAS,EAAgB,GAA6B;CACrD,IAAM,EAAE,QAAK,UAAO,SAAM,aAAU,eAAY,GAC1C,EAAE,iBAAc,EAAY;CAElC,SAAS,IAAU;EAClB,IAAM,oBAAQ,IAAI,KAAK;EACvB,OACC,MAAQ,EAAM,QAAQ,KACtB,MAAU,EAAM,SAAS,KACzB,MAAS,EAAM,YAAY;CAE7B;CAEA,OACC,kBAAC,MAAD;EACC,eAAe,EAAU,GAAK,GAAO,CAAI;EACzC,WAAW,wBAAwB,EAAS,GAAG,EAAQ,GAAG,EAAQ,IAAI,UAAU;YAEhF,kBAAC,OAAD;GAAK,WAAU;aAAf,CACC,kBAAC,QAAD,CAAO,CAAA,GACP,kBAAC,KAAD,EAAA,UAAI,EAAO,CAAA,CACP;;CACF,CAAA;AAEN"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/calendar/calendarTableTd/index.tsx"],"sourcesContent":["import { useCalendar } from \"../_calendarProvider\";\nimport \"./styles.css\";\n\ntype CalendarTableTdProps = {\n\tday: number;\n\tmonth: number;\n\tyear: number;\n\tdayType: \"checkedDay\" | \"middleDay\" | \"uncheckedDay\";\n\tdayOwner: \"previous\" | \"current\" | \"next\";\n};\n\nfunction CalendarTableTd(props: CalendarTableTdProps) {\n\tconst { day, month, year, dayOwner, dayType } = props;\n\tconst { changeDay } = useCalendar();\n\n\tfunction isToday() {\n\t\tconst today = new Date();\n\t\treturn (\n\t\t\tday === today.getDate() &&\n\t\t\tmonth === today.getMonth() &&\n\t\t\tyear === today.getFullYear()\n\t\t);\n\t}\n\n\tfunction handleSelectDay() {\n\t\tchangeDay(day, month, year);\n\t}\n\n\treturn (\n\t\t<td\n\t\t\tclassName={`arkynCalendarTableTd ${dayOwner} ${dayType} ${isToday() ? \"today\" : \"\"}`}\n\t\t>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclassName=\"textGroup\"\n\t\t\t\taria-pressed={dayType === \"checkedDay\"}\n\t\t\t\tonClick={handleSelectDay}\n\t\t\t>\n\t\t\t\t<span />\n\t\t\t\t<p>{day}</p>\n\t\t\t</button>\n\t\t</td>\n\t);\n}\n\nexport { CalendarTableTd };\n"],"mappings":";;;;AAWA,SAAS,EAAgB,GAA6B;CACrD,IAAM,EAAE,QAAK,UAAO,SAAM,aAAU,eAAY,GAC1C,EAAE,iBAAc,EAAY;CAElC,SAAS,IAAU;EAClB,IAAM,oBAAQ,IAAI,KAAK;EACvB,OACC,MAAQ,EAAM,QAAQ,KACtB,MAAU,EAAM,SAAS,KACzB,MAAS,EAAM,YAAY;CAE7B;CAEA,SAAS,IAAkB;EAC1B,EAAU,GAAK,GAAO,CAAI;CAC3B;CAEA,OACC,kBAAC,MAAD;EACC,WAAW,wBAAwB,EAAS,GAAG,EAAQ,GAAG,EAAQ,IAAI,UAAU;YAEhF,kBAAC,UAAD;GACC,MAAK;GACL,WAAU;GACV,gBAAc,MAAY;GAC1B,SAAS;aAJV,CAMC,kBAAC,QAAD,CAAO,CAAA,GACP,kBAAC,KAAD,EAAA,UAAI,EAAO,CAAA,CACJ;;CACL,CAAA;AAEN"}
@@ -1 +1 @@
1
- @layer arkyn{.arkynCalendarTableTd{-webkit-user-select:none;user-select:none;cursor:pointer}.arkynCalendarTableTd p{text-align:center;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;margin:auto;font-size:14px;display:flex}.arkynCalendarTableTd.previous p,.arkynCalendarTableTd.next p{color:var(--text-muted,#a1a1aa)}.arkynCalendarTableTd.current p{color:var(--text-body,#52525b)}.arkynCalendarTableTd:hover p{color:rgb(var(--spotlight-primary,17, 109, 220))}.arkynCalendarTableTd.today:not(.checkedDay) p{color:var(--text-body,#52525b);background-color:var(--background-underground,#fafafa);filter:brightness(.97);font-weight:500}.arkynCalendarTableTd .textGroup{width:40px;height:40px;margin:auto;position:relative}.arkynCalendarTableTd.checkedDay .textGroup span{content:" ";background-color:rgb(var(--spotlight-primary,17, 109, 220));z-index:2;border-radius:8px;position:absolute;inset:0}.arkynCalendarTableTd.checkedDay .textGroup p{color:var(--white,#fff);z-index:3;font-weight:600;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynCalendarTableTd.middleDay .textGroup span{content:" ";background-color:var(--background-underground,#fafafa);filter:brightness(.95);z-index:1;position:absolute;inset:0 -15px}.arkynCalendarTableTd:first-child.middleDay .textGroup span{border-top-left-radius:6px;border-bottom-left-radius:6px;left:0;right:-15px}.arkynCalendarTableTd:last-child.middleDay .textGroup span{border-top-right-radius:6px;border-bottom-right-radius:6px;left:-15px;right:0}.arkynCalendarTableTd.middleDay .textGroup p{color:var(--text-muted,#a1a1aa);z-index:2;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynCalendarTableTd.current.middleDay .textGroup p{color:var(--text-body,#52525b)}}
1
+ @layer arkyn{.arkynCalendarTableTd{-webkit-user-select:none;user-select:none;cursor:pointer}.arkynCalendarTableTd p{text-align:center;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;margin:auto;font-size:14px;display:flex}.arkynCalendarTableTd.previous p,.arkynCalendarTableTd.next p{color:var(--text-muted,#a1a1aa)}.arkynCalendarTableTd.current p{color:var(--text-body,#52525b)}.arkynCalendarTableTd:hover p{color:rgb(var(--spotlight-primary,17, 109, 220))}.arkynCalendarTableTd.today:not(.checkedDay) p{color:var(--text-body,#52525b);background-color:var(--background-underground,#fafafa);filter:brightness(.97);font-weight:500}.arkynCalendarTableTd .textGroup{width:40px;height:40px;font:inherit;cursor:pointer;background-color:#0000;border:none;margin:auto;padding:0;display:block;position:relative}.arkynCalendarTableTd.checkedDay .textGroup span{content:" ";background-color:rgb(var(--spotlight-primary,17, 109, 220));z-index:2;border-radius:8px;position:absolute;inset:0}.arkynCalendarTableTd.checkedDay .textGroup p{color:var(--white,#fff);z-index:3;font-weight:600;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynCalendarTableTd.middleDay .textGroup span{content:" ";background-color:var(--background-underground,#fafafa);filter:brightness(.95);z-index:1;position:absolute;inset:0 -15px}.arkynCalendarTableTd:first-child.middleDay .textGroup span{border-top-left-radius:6px;border-bottom-left-radius:6px;left:0;right:-15px}.arkynCalendarTableTd:last-child.middleDay .textGroup span{border-top-right-radius:6px;border-bottom-right-radius:6px;left:-15px;right:0}.arkynCalendarTableTd.middleDay .textGroup p{color:var(--text-muted,#a1a1aa);z-index:2;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynCalendarTableTd.current.middleDay .textGroup p{color:var(--text-body,#52525b)}}
@@ -14,7 +14,7 @@
14
14
 
15
15
  @layer arkyn{.arkynSelectContent{flex-wrap:wrap;flex:1;align-items:start;gap:4px;display:flex}.arkynSelectContent>p{color:var(--text-muted,#a1a1aa);-webkit-user-select:none;user-select:none;font-weight:400}.arkynSelectContent>p.hasValue{color:var(--text-body,#52525b)}.arkynSelectContent.md>p{font-size:14px;line-height:14px}.arkynSelectContent.lg>p{font-size:16px;line-height:16px}}
16
16
 
17
- @layer arkyn{.arkynSelectOption{color:var(--text-body,#52525b);background-color:inherit;-webkit-user-select:none;user-select:none;border:none;justify-content:space-between;align-items:center;font-weight:400;line-height:21.79px;display:flex}.arkynSelectOption.md{padding:8px 16px;font-size:14px}.arkynSelectOption.lg{padding:8px 16px;font-size:16px}.arkynSelectOption svg{width:20px;height:20px;color:rgb(var(--spotlight-primary,17, 109, 220));display:none}.arkynSelectOption:hover{cursor:pointer;filter:brightness(.98)}.arkynSelectOption.active{color:var(--text-heading,#09090b);filter:brightness(.95);font-weight:600}.arkynSelectOption.active svg{display:unset}html.dark .arkynSelectOption:hover,html.dark .arkynSelectOption.active{filter:brightness(1.2)}}
17
+ @layer arkyn{.arkynSelectOption{color:var(--text-body,#52525b);background-color:inherit;-webkit-user-select:none;user-select:none;border:none;justify-content:space-between;align-items:center;font-weight:400;line-height:21.79px;display:flex}.arkynSelectOption.md{padding:8px 16px;font-size:14px}.arkynSelectOption.lg{padding:8px 16px;font-size:16px}.arkynSelectOption svg{width:20px;height:20px;color:rgb(var(--spotlight-primary,17, 109, 220));display:none}.arkynSelectOption:hover{cursor:pointer;filter:brightness(.98)}.arkynSelectOption.active{color:var(--text-heading,#09090b);filter:brightness(.95);font-weight:600}.arkynSelectOption.active svg{display:unset}.arkynSelectOption.highlighted{filter:brightness(.98)}html.dark .arkynSelectOption:hover,html.dark .arkynSelectOption.active,html.dark .arkynSelectOption.highlighted{filter:brightness(1.2)}}
18
18
 
19
19
  @layer arkyn{.arkynSelectOptionsContainer{z-index:7;border:1px solid var(--border,#e2e8f0);background-color:var(--background-foreground,#fff);border-radius:6px;flex-direction:column;flex:1;height:max-content;max-height:300px;list-style:none;display:flex;position:absolute;left:-2px;right:-2px;overflow:auto;box-shadow:0 4px 8px #0000001a}.arkynSelectOptionsContainer.bottom{top:calc(100% + 5px)}.arkynSelectOptionsContainer.top{bottom:calc(100% + 5px)}.arkynSelectOptionsContainer>p{text-align:center;color:var(--text-body,#52525b);padding:16px;font-size:14px;font-weight:400;line-height:21.79px}}
20
20
 
@@ -26,7 +26,7 @@
26
26
 
27
27
  @layer arkyn{.arkynCalendarTableBody{border-collapse:collapse;border-spacing:0}.arkynCalendarTableBody td p{text-align:center;padding:16px;font-size:14px}.arkynCalendarTableBody tr:first-child td{padding-top:8px}}
28
28
 
29
- @layer arkyn{.arkynCalendarTableTd{-webkit-user-select:none;user-select:none;cursor:pointer}.arkynCalendarTableTd p{text-align:center;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;margin:auto;font-size:14px;display:flex}.arkynCalendarTableTd.previous p,.arkynCalendarTableTd.next p{color:var(--text-muted,#a1a1aa)}.arkynCalendarTableTd.current p{color:var(--text-body,#52525b)}.arkynCalendarTableTd:hover p{color:rgb(var(--spotlight-primary,17, 109, 220))}.arkynCalendarTableTd.today:not(.checkedDay) p{color:var(--text-body,#52525b);background-color:var(--background-underground,#fafafa);filter:brightness(.97);font-weight:500}.arkynCalendarTableTd .textGroup{width:40px;height:40px;margin:auto;position:relative}.arkynCalendarTableTd.checkedDay .textGroup span{content:" ";background-color:rgb(var(--spotlight-primary,17, 109, 220));z-index:2;border-radius:8px;position:absolute;inset:0}.arkynCalendarTableTd.checkedDay .textGroup p{color:var(--white,#fff);z-index:3;font-weight:600;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynCalendarTableTd.middleDay .textGroup span{content:" ";background-color:var(--background-underground,#fafafa);filter:brightness(.95);z-index:1;position:absolute;inset:0 -15px}.arkynCalendarTableTd:first-child.middleDay .textGroup span{border-top-left-radius:6px;border-bottom-left-radius:6px;left:0;right:-15px}.arkynCalendarTableTd:last-child.middleDay .textGroup span{border-top-right-radius:6px;border-bottom-right-radius:6px;left:-15px;right:0}.arkynCalendarTableTd.middleDay .textGroup p{color:var(--text-muted,#a1a1aa);z-index:2;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynCalendarTableTd.current.middleDay .textGroup p{color:var(--text-body,#52525b)}}
29
+ @layer arkyn{.arkynCalendarTableTd{-webkit-user-select:none;user-select:none;cursor:pointer}.arkynCalendarTableTd p{text-align:center;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;margin:auto;font-size:14px;display:flex}.arkynCalendarTableTd.previous p,.arkynCalendarTableTd.next p{color:var(--text-muted,#a1a1aa)}.arkynCalendarTableTd.current p{color:var(--text-body,#52525b)}.arkynCalendarTableTd:hover p{color:rgb(var(--spotlight-primary,17, 109, 220))}.arkynCalendarTableTd.today:not(.checkedDay) p{color:var(--text-body,#52525b);background-color:var(--background-underground,#fafafa);filter:brightness(.97);font-weight:500}.arkynCalendarTableTd .textGroup{width:40px;height:40px;font:inherit;cursor:pointer;background-color:#0000;border:none;margin:auto;padding:0;display:block;position:relative}.arkynCalendarTableTd.checkedDay .textGroup span{content:" ";background-color:rgb(var(--spotlight-primary,17, 109, 220));z-index:2;border-radius:8px;position:absolute;inset:0}.arkynCalendarTableTd.checkedDay .textGroup p{color:var(--white,#fff);z-index:3;font-weight:600;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynCalendarTableTd.middleDay .textGroup span{content:" ";background-color:var(--background-underground,#fafafa);filter:brightness(.95);z-index:1;position:absolute;inset:0 -15px}.arkynCalendarTableTd:first-child.middleDay .textGroup span{border-top-left-radius:6px;border-bottom-left-radius:6px;left:0;right:-15px}.arkynCalendarTableTd:last-child.middleDay .textGroup span{border-top-right-radius:6px;border-bottom-right-radius:6px;left:-15px;right:0}.arkynCalendarTableTd.middleDay .textGroup p{color:var(--text-muted,#a1a1aa);z-index:2;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynCalendarTableTd.current.middleDay .textGroup p{color:var(--text-body,#52525b)}}
30
30
 
31
31
  @layer arkyn{.arkynCalendarTableContainer{border-collapse:collapse;border-spacing:0}}
32
32
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/currencyInput/index.tsx"],"sourcesContent":["import { Loader2, type LucideIcon } from \"lucide-react\";\nimport {\n\ttype ChangeEvent,\n\ttype FocusEvent,\n\ttype InputHTMLAttributes,\n\tuseEffect,\n\tuseId,\n\tuseRef,\n\tuseState,\n} from \"react\";\n\nimport { useForm } from \"../../hooks/useForm\";\nimport { FieldTemplate } from \"../../services/fieldTemplate\";\nimport { IconRenderer } from \"../../services/iconRenderer\";\nimport {\n\tmaskCurrencyValues,\n\tnormalizeValue,\n} from \"../../services/maskCurrencyValues\";\n\nimport \"./style.css\";\n\ntype Locale =\n\t| \"USD\"\n\t| \"EUR\"\n\t| \"JPY\"\n\t| \"GBP\"\n\t| \"AUD\"\n\t| \"CAD\"\n\t| \"CHF\"\n\t| \"CNY\"\n\t| \"SEK\"\n\t| \"NZD\"\n\t| \"BRL\"\n\t| \"INR\"\n\t| \"RUB\"\n\t| \"ZAR\"\n\t| \"MXN\"\n\t| \"SGD\"\n\t| \"HKD\"\n\t| \"NOK\"\n\t| \"KRW\"\n\t| \"TRY\"\n\t| \"IDR\"\n\t| \"THB\";\n\ntype CurrencyInputProps = Omit<\n\tInputHTMLAttributes<HTMLInputElement>,\n\t| \"size\"\n\t| \"prefix\"\n\t| \"name\"\n\t| \"type\"\n\t| \"max\"\n\t| \"defaultValue\"\n\t| \"value\"\n\t| \"onChange\"\n\t| \"placeholder\"\n> & {\n\t/** Field name for form submission. Required. */\n\tname: string;\n\t/**\n\t * Currency locale used to format the displayed value.\n\t * Supported: `\"USD\"` | `\"EUR\"` | `\"BRL\"` | `\"JPY\"` | `\"GBP\"` | … (22 locales).\n\t * Required.\n\t */\n\tlocale: Locale;\n\t/** Optional label text displayed above the input. */\n\tlabel?: string;\n\t/** Validation error message displayed below the input. */\n\terrorMessage?: string;\n\t/** Shows a spinner and disables the input during async operations. @default false */\n\tisLoading?: boolean;\n\t/** When true, skips `FieldTemplate` wrapper (label and error text). @default false */\n\tunShowFieldTemplate?: boolean;\n\t/**\n\t * Input size.\n\t * @default \"md\"\n\t */\n\tsize?: \"md\" | \"lg\";\n\t/**\n\t * Visual style variant.\n\t * - `solid`: filled background.\n\t * - `outline`: bordered, transparent background.\n\t * - `underline`: bottom border only.\n\t * @default \"solid\"\n\t */\n\tvariant?: \"solid\" | \"outline\" | \"underline\";\n\t/**\n\t * Layout direction forwarded to `FieldTemplate`.\n\t * @default \"horizontal\"\n\t */\n\torientation?: \"horizontal\" | \"vertical\" | \"horizontalReverse\";\n\t/** Text or icon rendered at the far left, outside the input area. */\n\tprefix?: string | LucideIcon;\n\t/** Text or icon rendered at the far right, outside the input area. */\n\tsuffix?: string | LucideIcon;\n\t/** Displays an asterisk on the label to signal a required field. */\n\tshowAsterisk?: boolean;\n\t/** Lucide icon rendered inside the input on the left. */\n\tleftIcon?: LucideIcon;\n\t/** Lucide icon rendered inside the input on the right. */\n\trightIcon?: LucideIcon;\n\t/** Maximum numeric value allowed. @default 1_000_000_000 */\n\tmax?: number;\n\t/** Controlled numeric value. */\n\tvalue?: number;\n\t/** Uncontrolled default numeric value. */\n\tdefaultValue?: number;\n\t/**\n\t * Callback fired on value change.\n\t * @param event - Native change event.\n\t * @param originalValue - Raw numeric string (e.g. `\"1234.56\"`).\n\t * @param maskedValue - Formatted display string (e.g. `\"$ 1,234.56\"`).\n\t */\n\tonChange?: (\n\t\tevent: ChangeEvent<HTMLInputElement>,\n\t\toriginalValue: string,\n\t\tmaskedValue: string,\n\t) => void;\n};\n\n/**\n * CurrencyInput, numeric input that automatically formats the displayed value according to a currency locale.\n *\n * The raw numeric value is stored in a hidden `<input>` for form submission.\n * Integrates with `useForm` to display validation errors by field name.\n *\n * @param props.name - Field name for form submission. Required.\n * @param props.locale - Currency locale (e.g. `\"USD\"`, `\"BRL\"`, `\"EUR\"`). Required.\n * @param props.label - Label text displayed above the input.\n * @param props.errorMessage - Validation error message.\n * @param props.isLoading - Shows a spinner and disables the input. Default: false\n * @param props.size - Input size (`md` | `lg`). Default: \"md\"\n * @param props.variant - Visual style variant. Default: \"solid\"\n * @param props.max - Maximum numeric value allowed. Default: 1_000_000_000\n * @param props.value - Controlled numeric value.\n * @param props.defaultValue - Uncontrolled default numeric value.\n * @param props.onChange - Callback fired on change, receives the event, the raw numeric string, and the formatted string.\n * @param props.prefix - Text or icon at the far left.\n * @param props.suffix - Text or icon at the far right.\n * @param props.leftIcon - Lucide icon inside the input on the left.\n * @param props.rightIcon - Lucide icon inside the input on the right.\n * @param props.showAsterisk - Appends `*` to the label.\n * @param props.orientation - Layout direction. Default: \"horizontal\"\n * @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false\n *\n * **...Other valid HTML properties for `<input>` (except `type`, `max`, `value`, `defaultValue`, `onChange`, `placeholder`)**\n *\n * @returns CurrencyInput JSX element wrapped in `FieldTemplate`.\n *\n * @example\n * ```tsx\n * // Basic\n * <CurrencyInput name=\"price\" locale=\"USD\" />\n *\n * // With label and validation\n * <CurrencyInput\n * name=\"salary\"\n * locale=\"BRL\"\n * label=\"Monthly Salary\"\n * showAsterisk\n * errorMessage=\"Please enter a valid amount\"\n * />\n *\n * // With max value and controlled state\n * <CurrencyInput\n * name=\"limit\"\n * locale=\"USD\"\n * label=\"Credit Limit\"\n * max={10000}\n * value={creditLimit}\n * onChange={(e, original) => setCreditLimit(Number(original))}\n * />\n * ```\n */\n\nfunction CurrencyInput(props: CurrencyInputProps) {\n\tconst {\n\t\tname,\n\t\tdisabled,\n\t\ttitle,\n\t\tstyle,\n\t\tvariant = \"solid\",\n\t\tlabel,\n\t\tclassName: wrapperClassName = \"\",\n\t\tvalue,\n\t\tdefaultValue,\n\t\tmax = 1000000000,\n\t\tlocale,\n\t\tonChange,\n\t\tprefix,\n\t\tsuffix,\n\t\tisLoading = false,\n\t\tleftIcon,\n\t\treadOnly,\n\t\tonFocus,\n\t\tonBlur,\n\t\terrorMessage: baseErrorMessage,\n\t\tunShowFieldTemplate,\n\t\torientation,\n\t\tshowAsterisk,\n\t\trightIcon,\n\t\tsize = \"md\",\n\t\tid,\n\t\t...rest\n\t} = props;\n\n\tconst { fieldErrors } = useForm();\n\tconst [isFocused, setIsFocused] = useState(false);\n\tconst [maskedValue, setMaskedValue] = useState(\"0\");\n\n\tconst inputRef = useRef<HTMLInputElement>(null);\n\tconst generatedId = useId();\n\tconst inputId = id || generatedId;\n\n\tconst errorMessage = baseErrorMessage || fieldErrors?.[name];\n\tconst isError = !!errorMessage;\n\tconst isDisabled = disabled || isLoading;\n\n\tconst iconSizes = { md: 20, lg: 20 };\n\tconst iconSize = iconSizes[size];\n\n\tconst loadingPosition = rightIcon ? \"right\" : \"left\";\n\n\tconst showLeftSpinner = loadingPosition === \"left\" && isLoading;\n\tconst showRightSpinner = loadingPosition === \"right\" && isLoading;\n\n\tfunction handleSectionClick() {\n\t\tif (isDisabled || !inputRef?.current) return;\n\t\tsetIsFocused(true);\n\t\tinputRef.current.focus();\n\t}\n\n\tfunction handleFocus(e: FocusEvent<HTMLInputElement>) {\n\t\tsetIsFocused(true);\n\t\tif (onFocus) onFocus(e);\n\t}\n\n\tfunction handleBlur(e: FocusEvent<HTMLInputElement>) {\n\t\tsetIsFocused(false);\n\t\tif (onBlur) onBlur(e);\n\t}\n\n\tconst updateValues = (originalValue: string | number) => {\n\t\tconst [calculatedValue, calculatedMaskedValue] = maskCurrencyValues(\n\t\t\toriginalValue,\n\t\t\tlocale,\n\t\t);\n\n\t\tif (!max || calculatedValue <= max) {\n\t\t\tsetMaskedValue(calculatedMaskedValue);\n\t\t\treturn [calculatedValue, calculatedMaskedValue];\n\t\t}\n\n\t\treturn maskCurrencyValues(originalValue, locale);\n\t};\n\n\tconst handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n\t\tevent.preventDefault();\n\t\tconst [originalValue, maskedValue] = updateValues(event.target.value);\n\n\t\tonChange?.(event, String(originalValue), String(maskedValue));\n\t};\n\n\tuseEffect(() => {\n\t\tfunction currentValue() {\n\t\t\tif (typeof value === \"number\") return value;\n\t\t\tif (typeof defaultValue === \"number\") return defaultValue;\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst [, maskedValue] = maskCurrencyValues(currentValue(), locale);\n\n\t\tsetMaskedValue(maskedValue);\n\t}, [locale, defaultValue, value]);\n\n\tconst hasPrefix = prefix ? \"hasPrefix\" : \"\";\n\tconst hasSuffix = suffix ? \"hasSuffix\" : \"\";\n\tconst errored = isError ? \"errored\" : \"\";\n\tconst opacity = isDisabled || readOnly || isLoading ? \"opacity\" : \"\";\n\tconst focused = isFocused ? \"focused\" : \"\";\n\n\tconst className = `arkynCurrencyInput ${hasPrefix} ${hasSuffix} ${variant} ${size} ${opacity} ${errored} ${focused}`;\n\n\treturn (\n\t\t<FieldTemplate\n\t\t\tname={name}\n\t\t\tlabel={label}\n\t\t\tshowAsterisk={showAsterisk}\n\t\t\tclassName={wrapperClassName}\n\t\t\terrorMessage={errorMessage}\n\t\t\tunShowFieldTemplate={unShowFieldTemplate}\n\t\t\torientation={orientation}\n\t\t>\n\t\t\t<section\n\t\t\t\ttitle={title}\n\t\t\t\tstyle={style}\n\t\t\t\tclassName={className}\n\t\t\t\tonClick={handleSectionClick}\n\t\t\t>\n\t\t\t\t<IconRenderer iconSize={iconSize} icon={prefix} className=\"prefix\" />\n\n\t\t\t\t<IconRenderer\n\t\t\t\t\tshow={showLeftSpinner}\n\t\t\t\t\ticonSize={iconSize}\n\t\t\t\t\tclassName=\"spinner\"\n\t\t\t\t\ticon={Loader2}\n\t\t\t\t/>\n\n\t\t\t\t<IconRenderer show={!isLoading} icon={leftIcon} iconSize={iconSize} />\n\n\t\t\t\t<input\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\tref={inputRef}\n\t\t\t\t\tonFocus={handleFocus}\n\t\t\t\t\tonBlur={handleBlur}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\tid={inputId}\n\t\t\t\t\tplaceholder={isDisabled ? maskedValue : undefined}\n\t\t\t\t\tvalue={isDisabled ? undefined : maskedValue}\n\t\t\t\t\t{...rest}\n\t\t\t\t/>\n\n\t\t\t\t<input\n\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={normalizeValue(maskedValue)}\n\t\t\t\t\treadOnly\n\t\t\t\t/>\n\n\t\t\t\t<IconRenderer show={!isLoading} icon={rightIcon} iconSize={iconSize} />\n\n\t\t\t\t<IconRenderer\n\t\t\t\t\tshow={showRightSpinner}\n\t\t\t\t\ticonSize={iconSize}\n\t\t\t\t\tclassName=\"spinner\"\n\t\t\t\t\ticon={Loader2}\n\t\t\t\t/>\n\n\t\t\t\t<IconRenderer iconSize={iconSize} icon={suffix} className=\"suffix\" />\n\t\t\t</section>\n\t\t</FieldTemplate>\n\t);\n}\n\nexport { CurrencyInput };\n"],"mappings":"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"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/currencyInput/index.tsx"],"sourcesContent":["import { Loader2, type LucideIcon } from \"lucide-react\";\nimport {\n\ttype ChangeEvent,\n\ttype FocusEvent,\n\ttype InputHTMLAttributes,\n\tuseEffect,\n\tuseId,\n\tuseRef,\n\tuseState,\n} from \"react\";\n\nimport { useForm } from \"../../hooks/useForm\";\nimport { FieldTemplate } from \"../../services/fieldTemplate\";\nimport { IconRenderer } from \"../../services/iconRenderer\";\nimport {\n\tmaskCurrencyValues,\n\tnormalizeValue,\n} from \"../../services/maskCurrencyValues\";\n\nimport \"./style.css\";\n\ntype Locale =\n\t| \"USD\"\n\t| \"EUR\"\n\t| \"JPY\"\n\t| \"GBP\"\n\t| \"AUD\"\n\t| \"CAD\"\n\t| \"CHF\"\n\t| \"CNY\"\n\t| \"SEK\"\n\t| \"NZD\"\n\t| \"BRL\"\n\t| \"INR\"\n\t| \"RUB\"\n\t| \"ZAR\"\n\t| \"MXN\"\n\t| \"SGD\"\n\t| \"HKD\"\n\t| \"NOK\"\n\t| \"KRW\"\n\t| \"TRY\"\n\t| \"IDR\"\n\t| \"THB\";\n\ntype CurrencyInputProps = Omit<\n\tInputHTMLAttributes<HTMLInputElement>,\n\t| \"size\"\n\t| \"prefix\"\n\t| \"name\"\n\t| \"type\"\n\t| \"max\"\n\t| \"defaultValue\"\n\t| \"value\"\n\t| \"onChange\"\n\t| \"placeholder\"\n> & {\n\t/** Field name for form submission. Required. */\n\tname: string;\n\t/**\n\t * Currency locale used to format the displayed value.\n\t * Supported: `\"USD\"` | `\"EUR\"` | `\"BRL\"` | `\"JPY\"` | `\"GBP\"` | … (22 locales).\n\t * Required.\n\t */\n\tlocale: Locale;\n\t/** Optional label text displayed above the input. */\n\tlabel?: string;\n\t/** Validation error message displayed below the input. */\n\terrorMessage?: string;\n\t/** Shows a spinner and disables the input during async operations. @default false */\n\tisLoading?: boolean;\n\t/** When true, skips `FieldTemplate` wrapper (label and error text). @default false */\n\tunShowFieldTemplate?: boolean;\n\t/**\n\t * Input size.\n\t * @default \"md\"\n\t */\n\tsize?: \"md\" | \"lg\";\n\t/**\n\t * Visual style variant.\n\t * - `solid`: filled background.\n\t * - `outline`: bordered, transparent background.\n\t * - `underline`: bottom border only.\n\t * @default \"solid\"\n\t */\n\tvariant?: \"solid\" | \"outline\" | \"underline\";\n\t/**\n\t * Layout direction forwarded to `FieldTemplate`.\n\t * @default \"horizontal\"\n\t */\n\torientation?: \"horizontal\" | \"vertical\" | \"horizontalReverse\";\n\t/** Text or icon rendered at the far left, outside the input area. */\n\tprefix?: string | LucideIcon;\n\t/** Text or icon rendered at the far right, outside the input area. */\n\tsuffix?: string | LucideIcon;\n\t/** Displays an asterisk on the label to signal a required field. */\n\tshowAsterisk?: boolean;\n\t/** Lucide icon rendered inside the input on the left. */\n\tleftIcon?: LucideIcon;\n\t/** Lucide icon rendered inside the input on the right. */\n\trightIcon?: LucideIcon;\n\t/** Maximum numeric value allowed. @default 1_000_000_000 */\n\tmax?: number;\n\t/** Controlled numeric value. */\n\tvalue?: number;\n\t/** Uncontrolled default numeric value. */\n\tdefaultValue?: number;\n\t/**\n\t * Callback fired on value change.\n\t * @param event - Native change event.\n\t * @param originalValue - Raw numeric string (e.g. `\"1234.56\"`).\n\t * @param maskedValue - Formatted display string (e.g. `\"$ 1,234.56\"`).\n\t */\n\tonChange?: (\n\t\tevent: ChangeEvent<HTMLInputElement>,\n\t\toriginalValue: string,\n\t\tmaskedValue: string,\n\t) => void;\n};\n\n/**\n * CurrencyInput, numeric input that automatically formats the displayed value according to a currency locale.\n *\n * The raw numeric value is stored in a hidden `<input>` for form submission.\n * Integrates with `useForm` to display validation errors by field name.\n *\n * @param props.name - Field name for form submission. Required.\n * @param props.locale - Currency locale (e.g. `\"USD\"`, `\"BRL\"`, `\"EUR\"`). Required.\n * @param props.label - Label text displayed above the input.\n * @param props.errorMessage - Validation error message.\n * @param props.isLoading - Shows a spinner and disables the input. Default: false\n * @param props.size - Input size (`md` | `lg`). Default: \"md\"\n * @param props.variant - Visual style variant. Default: \"solid\"\n * @param props.max - Maximum numeric value allowed. Default: 1_000_000_000\n * @param props.value - Controlled numeric value.\n * @param props.defaultValue - Uncontrolled default numeric value.\n * @param props.onChange - Callback fired on change, receives the event, the raw numeric string, and the formatted string.\n * @param props.prefix - Text or icon at the far left.\n * @param props.suffix - Text or icon at the far right.\n * @param props.leftIcon - Lucide icon inside the input on the left.\n * @param props.rightIcon - Lucide icon inside the input on the right.\n * @param props.showAsterisk - Appends `*` to the label.\n * @param props.orientation - Layout direction. Default: \"vertical\"\n * @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false\n *\n * **...Other valid HTML properties for `<input>` (except `type`, `max`, `value`, `defaultValue`, `onChange`, `placeholder`)**\n *\n * @returns CurrencyInput JSX element wrapped in `FieldTemplate`.\n *\n * @example\n * ```tsx\n * // Basic\n * <CurrencyInput name=\"price\" locale=\"USD\" />\n *\n * // With label and validation\n * <CurrencyInput\n * name=\"salary\"\n * locale=\"BRL\"\n * label=\"Monthly Salary\"\n * showAsterisk\n * errorMessage=\"Please enter a valid amount\"\n * />\n *\n * // With max value and controlled state\n * <CurrencyInput\n * name=\"limit\"\n * locale=\"USD\"\n * label=\"Credit Limit\"\n * max={10000}\n * value={creditLimit}\n * onChange={(e, original) => setCreditLimit(Number(original))}\n * />\n * ```\n */\n\nfunction CurrencyInput(props: CurrencyInputProps) {\n\tconst {\n\t\tname,\n\t\tdisabled,\n\t\ttitle,\n\t\tstyle,\n\t\tvariant = \"solid\",\n\t\tlabel,\n\t\tclassName: wrapperClassName = \"\",\n\t\tvalue,\n\t\tdefaultValue,\n\t\tmax = 1000000000,\n\t\tlocale,\n\t\tonChange,\n\t\tprefix,\n\t\tsuffix,\n\t\tisLoading = false,\n\t\tleftIcon,\n\t\treadOnly,\n\t\tonFocus,\n\t\tonBlur,\n\t\terrorMessage: baseErrorMessage,\n\t\tunShowFieldTemplate,\n\t\torientation,\n\t\tshowAsterisk,\n\t\trightIcon,\n\t\tsize = \"md\",\n\t\tid,\n\t\t...rest\n\t} = props;\n\n\tconst { fieldErrors } = useForm();\n\tconst [isFocused, setIsFocused] = useState(false);\n\tconst [maskedValue, setMaskedValue] = useState(\"0\");\n\n\tconst inputRef = useRef<HTMLInputElement>(null);\n\tconst generatedId = useId();\n\tconst inputId = id || generatedId;\n\n\tconst errorMessage = baseErrorMessage || fieldErrors?.[name];\n\tconst isError = !!errorMessage;\n\tconst isDisabled = disabled || isLoading;\n\n\tconst iconSizes = { md: 20, lg: 20 };\n\tconst iconSize = iconSizes[size];\n\n\tconst loadingPosition = rightIcon ? \"right\" : \"left\";\n\n\tconst showLeftSpinner = loadingPosition === \"left\" && isLoading;\n\tconst showRightSpinner = loadingPosition === \"right\" && isLoading;\n\n\tfunction handleSectionClick() {\n\t\tif (isDisabled || !inputRef?.current) return;\n\t\tsetIsFocused(true);\n\t\tinputRef.current.focus();\n\t}\n\n\tfunction handleFocus(e: FocusEvent<HTMLInputElement>) {\n\t\tsetIsFocused(true);\n\t\tif (onFocus) onFocus(e);\n\t}\n\n\tfunction handleBlur(e: FocusEvent<HTMLInputElement>) {\n\t\tsetIsFocused(false);\n\t\tif (onBlur) onBlur(e);\n\t}\n\n\tconst updateValues = (originalValue: string | number) => {\n\t\tconst [calculatedValue, calculatedMaskedValue] = maskCurrencyValues(\n\t\t\toriginalValue,\n\t\t\tlocale,\n\t\t);\n\n\t\tif (!max || calculatedValue <= max) {\n\t\t\tsetMaskedValue(calculatedMaskedValue);\n\t\t\treturn [calculatedValue, calculatedMaskedValue];\n\t\t}\n\n\t\treturn maskCurrencyValues(originalValue, locale);\n\t};\n\n\tconst handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n\t\tevent.preventDefault();\n\t\tconst [originalValue, maskedValue] = updateValues(event.target.value);\n\n\t\tonChange?.(event, String(originalValue), String(maskedValue));\n\t};\n\n\tuseEffect(() => {\n\t\tfunction currentValue() {\n\t\t\tif (typeof value === \"number\") return value;\n\t\t\tif (typeof defaultValue === \"number\") return defaultValue;\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst [, maskedValue] = maskCurrencyValues(currentValue(), locale);\n\n\t\tsetMaskedValue(maskedValue);\n\t}, [locale, defaultValue, value]);\n\n\tconst hasPrefix = prefix ? \"hasPrefix\" : \"\";\n\tconst hasSuffix = suffix ? \"hasSuffix\" : \"\";\n\tconst errored = isError ? \"errored\" : \"\";\n\tconst opacity = isDisabled || readOnly || isLoading ? \"opacity\" : \"\";\n\tconst focused = isFocused ? \"focused\" : \"\";\n\n\tconst className = `arkynCurrencyInput ${hasPrefix} ${hasSuffix} ${variant} ${size} ${opacity} ${errored} ${focused}`;\n\n\treturn (\n\t\t<FieldTemplate\n\t\t\tname={name}\n\t\t\tlabel={label}\n\t\t\tshowAsterisk={showAsterisk}\n\t\t\tclassName={wrapperClassName}\n\t\t\terrorMessage={errorMessage}\n\t\t\tunShowFieldTemplate={unShowFieldTemplate}\n\t\t\torientation={orientation}\n\t\t>\n\t\t\t<section\n\t\t\t\ttitle={title}\n\t\t\t\tstyle={style}\n\t\t\t\tclassName={className}\n\t\t\t\tonClick={handleSectionClick}\n\t\t\t>\n\t\t\t\t<IconRenderer iconSize={iconSize} icon={prefix} className=\"prefix\" />\n\n\t\t\t\t<IconRenderer\n\t\t\t\t\tshow={showLeftSpinner}\n\t\t\t\t\ticonSize={iconSize}\n\t\t\t\t\tclassName=\"spinner\"\n\t\t\t\t\ticon={Loader2}\n\t\t\t\t/>\n\n\t\t\t\t<IconRenderer show={!isLoading} icon={leftIcon} iconSize={iconSize} />\n\n\t\t\t\t<input\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\tref={inputRef}\n\t\t\t\t\tonFocus={handleFocus}\n\t\t\t\t\tonBlur={handleBlur}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\tid={inputId}\n\t\t\t\t\tplaceholder={isDisabled ? maskedValue : undefined}\n\t\t\t\t\tvalue={isDisabled ? undefined : maskedValue}\n\t\t\t\t\t{...rest}\n\t\t\t\t/>\n\n\t\t\t\t<input\n\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={normalizeValue(maskedValue)}\n\t\t\t\t\treadOnly\n\t\t\t\t/>\n\n\t\t\t\t<IconRenderer show={!isLoading} icon={rightIcon} iconSize={iconSize} />\n\n\t\t\t\t<IconRenderer\n\t\t\t\t\tshow={showRightSpinner}\n\t\t\t\t\ticonSize={iconSize}\n\t\t\t\t\tclassName=\"spinner\"\n\t\t\t\t\ticon={Loader2}\n\t\t\t\t/>\n\n\t\t\t\t<IconRenderer iconSize={iconSize} icon={suffix} className=\"suffix\" />\n\t\t\t</section>\n\t\t</FieldTemplate>\n\t);\n}\n\nexport { CurrencyInput };\n"],"mappings":";;;;;;;;;AA+KA,SAAS,EAAc,GAA2B;CACjD,IAAM,EACL,SACA,aACA,UACA,UACA,aAAU,SACV,UACA,WAAW,IAAmB,IAC9B,UACA,iBACA,SAAM,KACN,WACA,aACA,WACA,WACA,eAAY,IACZ,aACA,aACA,YACA,WACA,cAAc,GACd,wBACA,gBACA,iBACA,cACA,UAAO,MACP,OACA,GAAG,MACA,GAEE,EAAE,mBAAgB,EAAQ,GAC1B,CAAC,GAAW,KAAgB,EAAS,EAAK,GAC1C,CAAC,GAAa,KAAkB,EAAS,GAAG,GAE5C,IAAW,EAAyB,IAAI,GACxC,IAAc,EAAM,GACpB,IAAU,KAAM,GAEhB,IAAe,KAAoB,IAAc,IACjD,IAAU,CAAC,CAAC,GACZ,IAAa,KAAY,GAGzB,IAAW;EADG,IAAI;EAAI,IAAI;CACf,EAAU,IAErB,IAAkB,IAAY,UAAU,QAExC,IAAkB,MAAoB,UAAU,GAChD,KAAmB,MAAoB,WAAW;CAExD,SAAS,KAAqB;EACzB,KAAc,CAAC,GAAU,YAC7B,EAAa,EAAI,GACjB,EAAS,QAAQ,MAAM;CACxB;CAEA,SAAS,GAAY,GAAiC;EAErD,AADA,EAAa,EAAI,GACb,KAAS,EAAQ,CAAC;CACvB;CAEA,SAAS,GAAW,GAAiC;EAEpD,AADA,EAAa,EAAK,GACd,KAAQ,EAAO,CAAC;CACrB;CAEA,IAAM,MAAgB,MAAmC;EACxD,IAAM,CAAC,GAAiB,KAAyB,EAChD,GACA,CACD;EAOA,OALI,CAAC,KAAO,KAAmB,KAC9B,EAAe,CAAqB,GAC7B,CAAC,GAAiB,CAAqB,KAGxC,EAAmB,GAAe,CAAM;CAChD;CA6BA,OApBA,QAAgB;EACf,SAAS,IAAe;GACvB,IAAI,OAAO,KAAU,UAAU,OAAO;GACtC,IAAI,OAAO,KAAiB,UAAU,OAAO;EAE9C;EAEA,IAAM,GAAG,KAAe,EAAmB,EAAa,GAAG,CAAM;EAEjE,EAAe,CAAW;CAC3B,GAAG;EAAC;EAAQ;EAAc;CAAK,CAAC,GAW/B,kBAAC,GAAD;EACO;EACC;EACO;EACd,WAAW;EACG;EACO;EACR;YAEb,kBAAC,WAAD;GACQ;GACA;GACI,WAAA,sBArBI,IAAS,cAAc,GAMS,GALhC,IAAS,cAAc,GAKsB,GAAG,EAAQ,GAAG,EAAK,GAHlE,KAAc,KAAY,IAAY,YAAY,GAG2B,GAJ7E,IAAU,YAAY,GAIkE,GAFxF,IAAY,YAAY;GAkBrC,SAAS;aAJV;IAMC,kBAAC,GAAD;KAAwB;KAAU,MAAM;KAAQ,WAAU;IAAU,CAAA;IAEpE,kBAAC,GAAD;KACC,MAAM;KACI;KACV,WAAU;KACV,MAAM;IACN,CAAA;IAED,kBAAC,GAAD;KAAc,MAAM,CAAC;KAAW,MAAM;KAAoB;IAAW,CAAA;IAErE,kBAAC,SAAD;KACC,UAAU;KACA;KACV,KAAK;KACL,SAAS;KACT,QAAQ;KACR,WA5DkB,MAAyC;MAC9D,EAAM,eAAe;MACrB,IAAM,CAAC,GAAe,KAAe,GAAa,EAAM,OAAO,KAAK;MAEpE,IAAW,GAAO,OAAO,CAAa,GAAG,OAAO,CAAW,CAAC;KAC7D;KAwDI,IAAI;KACJ,aAAa,IAAa,IAAc,KAAA;KACxC,OAAO,IAAa,KAAA,IAAY;KAChC,GAAI;IACJ,CAAA;IAED,kBAAC,SAAD;KACC,MAAK;KACC;KACN,OAAO,EAAe,CAAW;KACjC,UAAA;IACA,CAAA;IAED,kBAAC,GAAD;KAAc,MAAM,CAAC;KAAW,MAAM;KAAqB;IAAW,CAAA;IAEtE,kBAAC,GAAD;KACC,MAAM;KACI;KACV,WAAU;KACV,MAAM;IACN,CAAA;IAED,kBAAC,GAAD;KAAwB;KAAU,MAAM;KAAQ,WAAU;IAAU,CAAA;GAC5D;;CACK,CAAA;AAEjB"}
@@ -4,18 +4,21 @@ import { useEffect as t, useRef as n, useState as r } from "react";
4
4
  import { jsx as i } from "react/jsx-runtime";
5
5
  //#region src/components/datePicker/datePickerCalendarContainer/index.tsx
6
6
  function a(a) {
7
- let { children: o, isFocused: s } = a, c = n(null), [l, u] = r("bottom");
8
- return e(s), t(() => {
9
- s && (() => {
10
- if (!c.current) return;
11
- let e = c.current.parentElement;
7
+ let { children: o, id: s, isFocused: c } = a, l = n(null), [u, d] = r("bottom");
8
+ return e(c), t(() => {
9
+ c && (() => {
10
+ if (!l.current) return;
11
+ let e = l.current.parentElement;
12
12
  if (!e) return;
13
13
  let t = e.getBoundingClientRect();
14
- window.innerHeight - t.bottom < 420 && t.top > 420 ? u("top") : u("bottom");
14
+ window.innerHeight - t.bottom < 420 && t.top > 420 ? d("top") : d("bottom");
15
15
  })();
16
- }, [s]), s ? /* @__PURE__ */ i("div", {
17
- ref: c,
18
- className: `arkynDatePickerCalendarContainer ${l}`,
16
+ }, [c]), c ? /* @__PURE__ */ i("div", {
17
+ ref: l,
18
+ id: s,
19
+ role: "dialog",
20
+ "aria-modal": "false",
21
+ className: `arkynDatePickerCalendarContainer ${u}`,
19
22
  children: o
20
23
  }) : null;
21
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/datePicker/datePickerCalendarContainer/index.tsx"],"sourcesContent":["import { type ReactNode, useEffect, useRef, useState } from \"react\";\n\nimport { useScrollLock } from \"../../../hooks/useScrollLock\";\n\nimport \"./styles.css\";\n\ntype DatePickerCalendarContainerProps = {\n\tisFocused: boolean;\n\tchildren: ReactNode;\n};\n\nfunction DatePickerCalendarContainer(props: DatePickerCalendarContainerProps) {\n\tconst { children, isFocused } = props;\n\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst [position, setPosition] = useState<\"bottom\" | \"top\">(\"bottom\");\n\n\tuseScrollLock(isFocused);\n\n\tuseEffect(() => {\n\t\tif (!isFocused) return;\n\n\t\tconst checkContainerPosition = () => {\n\t\t\tif (!containerRef.current) return;\n\n\t\t\tconst parentElement = containerRef.current.parentElement;\n\t\t\tif (!parentElement) return;\n\n\t\t\tconst parentRect = parentElement.getBoundingClientRect();\n\t\t\tconst viewportHeight = window.innerHeight;\n\n\t\t\tconst estimatedContainerHeight = 420;\n\t\t\tconst spaceBelow = viewportHeight - parentRect.bottom;\n\n\t\t\tif (\n\t\t\t\tspaceBelow < estimatedContainerHeight &&\n\t\t\t\tparentRect.top > estimatedContainerHeight\n\t\t\t) {\n\t\t\t\tsetPosition(\"top\");\n\t\t\t} else {\n\t\t\t\tsetPosition(\"bottom\");\n\t\t\t}\n\t\t};\n\n\t\tcheckContainerPosition();\n\t}, [isFocused]);\n\n\tif (!isFocused) return null;\n\n\treturn (\n\t\t<div\n\t\t\tref={containerRef}\n\t\t\tclassName={`arkynDatePickerCalendarContainer ${position}`}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\nexport { DatePickerCalendarContainer };\n"],"mappings":";;;;;AAWA,SAAS,EAA4B,GAAyC;CAC7E,IAAM,EAAE,aAAU,iBAAc,GAE1B,IAAe,EAAuB,IAAI,GAC1C,CAAC,GAAU,KAAe,EAA2B,QAAQ;CAkCnE,OAhCA,EAAc,CAAS,GAEvB,QAAgB;EACV,YAEgC;GACpC,IAAI,CAAC,EAAa,SAAS;GAE3B,IAAM,IAAgB,EAAa,QAAQ;GAC3C,IAAI,CAAC,GAAe;GAEpB,IAAM,IAAa,EAAc,sBAAsB;GAMvD,AALuB,OAAO,cAGM,EAAW,SAGjC,OACb,EAAW,MAAM,MAEjB,EAAY,KAAK,IAEjB,EAAY,QAAQ;EAEtB,EAEA,CAAuB;CACxB,GAAG,CAAC,CAAS,CAAC,GAET,IAGJ,kBAAC,OAAD;EACC,KAAK;EACL,WAAW,oCAAoC;EAE9C;CACG,CAAA,IARiB;AAUxB"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/datePicker/datePickerCalendarContainer/index.tsx"],"sourcesContent":["import { type ReactNode, useEffect, useRef, useState } from \"react\";\n\nimport { useScrollLock } from \"../../../hooks/useScrollLock\";\n\nimport \"./styles.css\";\n\ntype DatePickerCalendarContainerProps = {\n\tid?: string;\n\tisFocused: boolean;\n\tchildren: ReactNode;\n};\n\nfunction DatePickerCalendarContainer(props: DatePickerCalendarContainerProps) {\n\tconst { children, id, isFocused } = props;\n\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst [position, setPosition] = useState<\"bottom\" | \"top\">(\"bottom\");\n\n\tuseScrollLock(isFocused);\n\n\tuseEffect(() => {\n\t\tif (!isFocused) return;\n\n\t\tconst checkContainerPosition = () => {\n\t\t\tif (!containerRef.current) return;\n\n\t\t\tconst parentElement = containerRef.current.parentElement;\n\t\t\tif (!parentElement) return;\n\n\t\t\tconst parentRect = parentElement.getBoundingClientRect();\n\t\t\tconst viewportHeight = window.innerHeight;\n\n\t\t\tconst estimatedContainerHeight = 420;\n\t\t\tconst spaceBelow = viewportHeight - parentRect.bottom;\n\n\t\t\tif (\n\t\t\t\tspaceBelow < estimatedContainerHeight &&\n\t\t\t\tparentRect.top > estimatedContainerHeight\n\t\t\t) {\n\t\t\t\tsetPosition(\"top\");\n\t\t\t} else {\n\t\t\t\tsetPosition(\"bottom\");\n\t\t\t}\n\t\t};\n\n\t\tcheckContainerPosition();\n\t}, [isFocused]);\n\n\tif (!isFocused) return null;\n\n\treturn (\n\t\t<div\n\t\t\tref={containerRef}\n\t\t\tid={id}\n\t\t\trole=\"dialog\"\n\t\t\taria-modal=\"false\"\n\t\t\tclassName={`arkynDatePickerCalendarContainer ${position}`}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\nexport { DatePickerCalendarContainer };\n"],"mappings":";;;;;AAYA,SAAS,EAA4B,GAAyC;CAC7E,IAAM,EAAE,aAAU,OAAI,iBAAc,GAE9B,IAAe,EAAuB,IAAI,GAC1C,CAAC,GAAU,KAAe,EAA2B,QAAQ;CAkCnE,OAhCA,EAAc,CAAS,GAEvB,QAAgB;EACV,YAEgC;GACpC,IAAI,CAAC,EAAa,SAAS;GAE3B,IAAM,IAAgB,EAAa,QAAQ;GAC3C,IAAI,CAAC,GAAe;GAEpB,IAAM,IAAa,EAAc,sBAAsB;GAMvD,AALuB,OAAO,cAGM,EAAW,SAGjC,OACb,EAAW,MAAM,MAEjB,EAAY,KAAK,IAEjB,EAAY,QAAQ;EAEtB,EAEA,CAAuB;CACxB,GAAG,CAAC,CAAS,CAAC,GAET,IAGJ,kBAAC,OAAD;EACC,KAAK;EACD;EACJ,MAAK;EACL,cAAW;EACX,WAAW,oCAAoC;EAE9C;CACG,CAAA,IAXiB;AAaxB"}
@@ -2,11 +2,18 @@
2
2
  import { jsx as e } from "react/jsx-runtime";
3
3
  //#region src/components/datePicker/datePickerContainer/index.tsx
4
4
  function t(t) {
5
- let { children: n, handleContainerFocus: r, disabled: i, isError: a, isLoading: o, isFocused: s, className: c, readOnly: l, variant: u, size: d, id: f, prefixExists: p } = t;
6
- return /* @__PURE__ */ e("section", {
5
+ let { children: n, handleContainerFocus: r, disabled: i, isError: a, isLoading: o, isFocused: s, className: c, readOnly: l, variant: u, size: d, id: f, prefixExists: p, containerRef: m, onContainerKeyDown: h, tabIndex: g, ariaControls: _ } = t;
6
+ return /* @__PURE__ */ e("div", {
7
+ ref: m,
7
8
  id: f,
9
+ tabIndex: g,
10
+ role: "combobox",
11
+ "aria-haspopup": "dialog",
12
+ "aria-expanded": s,
13
+ "aria-controls": _,
8
14
  className: `arkynDatePickerContainer ${p ? "hasPrefix" : ""} ${u} ${d} ${i || l || o ? "opacity" : ""} ${a ? "errored" : ""} ${s ? "focused" : ""} ${c}`,
9
15
  onClick: r,
16
+ onKeyDown: h,
10
17
  children: n
11
18
  });
12
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/datePicker/datePickerContainer/index.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport \"./styles.css\";\n\ntype DatePickerContainerProps = {\n\tchildren: ReactNode;\n\thandleContainerFocus: () => void;\n\tprefixExists: boolean;\n\tisError: boolean;\n\tdisabled: boolean;\n\treadOnly: boolean;\n\tisLoading: boolean;\n\tisFocused: boolean;\n\tclassName?: string;\n\tid: string;\n\tvariant: \"solid\" | \"outline\" | \"underline\";\n\tsize: \"md\" | \"lg\";\n};\n\nfunction DatePickerContainer(props: DatePickerContainerProps) {\n\tconst {\n\t\tchildren,\n\t\thandleContainerFocus,\n\t\tdisabled,\n\t\tisError,\n\t\tisLoading,\n\t\tisFocused,\n\t\tclassName,\n\t\treadOnly,\n\t\tvariant,\n\t\tsize,\n\t\tid,\n\t\tprefixExists,\n\t} = props;\n\n\tconst hasPrefix = prefixExists ? \"hasPrefix\" : \"\";\n\tconst errored = isError ? \"errored\" : \"\";\n\tconst opacity = disabled || readOnly || isLoading ? \"opacity\" : \"\";\n\tconst focused = isFocused ? \"focused\" : \"\";\n\n\treturn (\n\t\t<section\n\t\t\tid={id}\n\t\t\tclassName={`arkynDatePickerContainer ${hasPrefix} ${variant} ${size} ${opacity} ${errored} ${focused} ${className}`}\n\t\t\tonClick={handleContainerFocus}\n\t\t>\n\t\t\t{children}\n\t\t</section>\n\t);\n}\n\nexport { DatePickerContainer };\n"],"mappings":";;;AAkBA,SAAS,EAAoB,GAAiC;CAC7D,IAAM,EACL,aACA,yBACA,aACA,YACA,cACA,cACA,cACA,aACA,YACA,SACA,OACA,oBACG;CAOJ,OACC,kBAAC,WAAD;EACK;EACJ,WAAW,4BARK,IAAe,cAAc,GAQI,GAAG,EAAQ,GAAG,EAAK,GANtD,KAAY,KAAY,IAAY,YAAY,GAMiB,GAPjE,IAAU,YAAY,GAOsD,GAL5E,IAAY,YAAY,GAK+D,GAAG;EACxG,SAAS;EAER;CACO,CAAA;AAEX"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/datePicker/datePickerContainer/index.tsx"],"sourcesContent":["import type { KeyboardEvent, ReactNode, RefObject } from \"react\";\nimport \"./styles.css\";\n\ntype DatePickerContainerProps = {\n\tchildren: ReactNode;\n\thandleContainerFocus: () => void;\n\tprefixExists: boolean;\n\tisError: boolean;\n\tdisabled: boolean;\n\treadOnly: boolean;\n\tisLoading: boolean;\n\tisFocused: boolean;\n\tclassName?: string;\n\tid: string;\n\tvariant: \"solid\" | \"outline\" | \"underline\";\n\tsize: \"md\" | \"lg\";\n\tcontainerRef?: RefObject<HTMLDivElement | null>;\n\tonContainerKeyDown?: (e: KeyboardEvent<HTMLDivElement>) => void;\n\ttabIndex?: number;\n\tariaControls?: string;\n};\n\nfunction DatePickerContainer(props: DatePickerContainerProps) {\n\tconst {\n\t\tchildren,\n\t\thandleContainerFocus,\n\t\tdisabled,\n\t\tisError,\n\t\tisLoading,\n\t\tisFocused,\n\t\tclassName,\n\t\treadOnly,\n\t\tvariant,\n\t\tsize,\n\t\tid,\n\t\tprefixExists,\n\t\tcontainerRef,\n\t\tonContainerKeyDown,\n\t\ttabIndex,\n\t\tariaControls,\n\t} = props;\n\n\tconst hasPrefix = prefixExists ? \"hasPrefix\" : \"\";\n\tconst errored = isError ? \"errored\" : \"\";\n\tconst opacity = disabled || readOnly || isLoading ? \"opacity\" : \"\";\n\tconst focused = isFocused ? \"focused\" : \"\";\n\n\treturn (\n\t\t<div\n\t\t\tref={containerRef}\n\t\t\tid={id}\n\t\t\ttabIndex={tabIndex}\n\t\t\trole=\"combobox\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-expanded={isFocused}\n\t\t\taria-controls={ariaControls}\n\t\t\tclassName={`arkynDatePickerContainer ${hasPrefix} ${variant} ${size} ${opacity} ${errored} ${focused} ${className}`}\n\t\t\tonClick={handleContainerFocus}\n\t\t\tonKeyDown={onContainerKeyDown}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\nexport { DatePickerContainer };\n"],"mappings":";;;AAsBA,SAAS,EAAoB,GAAiC;CAC7D,IAAM,EACL,aACA,yBACA,aACA,YACA,cACA,cACA,cACA,aACA,YACA,SACA,OACA,iBACA,iBACA,uBACA,aACA,oBACG;CAOJ,OACC,kBAAC,OAAD;EACC,KAAK;EACD;EACM;EACV,MAAK;EACL,iBAAc;EACd,iBAAe;EACf,iBAAe;EACf,WAAW,4BAdK,IAAe,cAAc,GAcI,GAAG,EAAQ,GAAG,EAAK,GAZtD,KAAY,KAAY,IAAY,YAAY,GAYiB,GAbjE,IAAU,YAAY,GAasD,GAX5E,IAAY,YAAY,GAW+D,GAAG;EACxG,SAAS;EACT,WAAW;EAEV;CACG,CAAA;AAEP"}
@@ -19,61 +19,74 @@ function g(e) {
19
19
  return e.toLocaleDateString("pt-BR");
20
20
  }
21
21
  function _(_) {
22
- let { name: v, className: y = "", placeholder: b = "Selecione uma data...", errorMessage: ee, isLoading: x = !1, readOnly: S = !1, id: C, label: w, showAsterisk: T, leftIcon: E, onFocus: te, onBlur: D, disabled: O = !1, prefix: k, size: A = "md", value: j, variant: M = "solid", orientation: N = "vertical", unShowFieldTemplate: P = !1, calendarVariant: F = "complete" } = _, I = _.closeOnSelect ?? _.type === "single", { fieldErrors: L } = e(), R = d(null), z = u(), B = C || z, V = ee || L?.[v], H = !!V, U = O || x || S, W = {
22
+ let { name: v, className: y = "", placeholder: b = "Selecione uma data...", errorMessage: ee, isLoading: x = !1, readOnly: S = !1, id: te, label: C, showAsterisk: w, leftIcon: T, onFocus: ne, onBlur: re, disabled: E = !1, prefix: D, size: O = "md", value: k, variant: A = "solid", orientation: j = "vertical", unShowFieldTemplate: M = !1, calendarVariant: N = "complete" } = _, P = _.closeOnSelect ?? _.type === "single", { fieldErrors: F } = e(), I = d(null), L = d(null), R = u(), z = te || R, B = `${z}-calendar`, V = ee || F?.[v], H = !!V, U = E || x || S, W = {
23
23
  md: 20,
24
24
  lg: 20
25
- }[A], [G, K] = f(!1), [q, J] = f(_.type === "single" ? _.defaultValue : void 0), [Y, X] = f(_.type === "range" ? _.defaultValue : void 0);
25
+ }[O], [G, K] = f(!1), [q, J] = f(_.type === "single" ? _.defaultValue : void 0), [Y, ie] = f(_.type === "range" ? _.defaultValue : void 0);
26
+ function X() {
27
+ U || !I?.current || G || (K(!0), I.current.focus(), ne?.());
28
+ }
26
29
  function Z() {
27
- U || !R?.current || G || (K(!0), R.current.focus(), te?.());
30
+ K(!1), re && I.current && I.current.blur();
28
31
  }
29
- function Q() {
30
- K(!1), D && R.current && R.current.blur();
32
+ function Q(e) {
33
+ if (!U) {
34
+ if (!G) {
35
+ (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), X());
36
+ return;
37
+ }
38
+ e.key === "Escape" && (e.preventDefault(), Z(), L.current?.focus());
39
+ }
31
40
  }
32
- function ne(e) {
33
- j === void 0 && J(e), _.type === "single" && _.onChange?.(e), I && Q();
41
+ function ae(e) {
42
+ k === void 0 && J(e), _.type === "single" && _.onChange?.(e), P && Z();
34
43
  }
35
- function re(e) {
36
- j === void 0 && X(e), _.type === "range" && _.onChange?.(e), I && Q();
44
+ function oe(e) {
45
+ k === void 0 && ie(e), _.type === "range" && _.onChange?.(e), P && Z();
37
46
  }
38
47
  if (_.type === "range") {
39
- let e = _.rangeSeparator ?? " até ", u = j === void 0 ? Y : j, d = u ? JSON.stringify([h(u[0]), h(u[1])]) : "";
48
+ let e = _.rangeSeparator ?? " até ", u = k === void 0 ? Y : k, d = u ? JSON.stringify([h(u[0]), h(u[1])]) : "";
40
49
  return /* @__PURE__ */ p(n, {
41
50
  name: v,
42
- label: w,
43
- showAsterisk: T,
51
+ label: C,
52
+ showAsterisk: w,
44
53
  className: y,
45
54
  errorMessage: V,
46
- unShowFieldTemplate: P,
47
- orientation: N,
55
+ unShowFieldTemplate: M,
56
+ orientation: j,
48
57
  children: /* @__PURE__ */ m(o, {
49
- handleContainerFocus: Z,
58
+ handleContainerFocus: X,
50
59
  disabled: U,
51
60
  isError: H,
52
61
  isFocused: G,
53
62
  isLoading: x,
54
63
  readOnly: S,
55
- size: A,
56
- variant: M,
57
- prefixExists: !!k,
58
- id: B,
64
+ size: O,
65
+ variant: A,
66
+ prefixExists: !!D,
67
+ id: z,
68
+ containerRef: L,
69
+ onContainerKeyDown: Q,
70
+ tabIndex: U ? -1 : 0,
71
+ ariaControls: B,
59
72
  children: [
60
73
  /* @__PURE__ */ p("input", {
61
- ref: R,
74
+ ref: I,
62
75
  name: v,
63
76
  value: d,
64
77
  type: "hidden"
65
78
  }),
66
79
  /* @__PURE__ */ p(t, {
67
80
  iconSize: W,
68
- icon: k,
81
+ icon: D,
69
82
  className: "prefix"
70
83
  }),
71
- E && /* @__PURE__ */ p(E, {
84
+ T && /* @__PURE__ */ p(T, {
72
85
  size: W,
73
86
  strokeWidth: 2.5
74
87
  }),
75
88
  /* @__PURE__ */ p(s, {
76
- size: A,
89
+ size: O,
77
90
  children: u ? /* @__PURE__ */ m("p", {
78
91
  className: "hasValue",
79
92
  children: [
@@ -84,12 +97,13 @@ function _(_) {
84
97
  }) : /* @__PURE__ */ p("p", { children: b })
85
98
  }),
86
99
  /* @__PURE__ */ p(i, {
100
+ id: B,
87
101
  isFocused: G,
88
102
  children: /* @__PURE__ */ p(r, {
89
103
  type: "range",
90
- variant: F,
104
+ variant: N,
91
105
  value: u,
92
- onChange: re,
106
+ onChange: oe,
93
107
  viewValue: _.viewValue,
94
108
  defaultViewValue: _.defaultViewValue,
95
109
  onChangeView: _.onChangeView
@@ -107,63 +121,68 @@ function _(_) {
107
121
  isLoading: x
108
122
  }),
109
123
  /* @__PURE__ */ p(c, {
110
- handleBlur: Q,
124
+ handleBlur: Z,
111
125
  isFocused: G
112
126
  })
113
127
  ]
114
128
  })
115
129
  });
116
130
  }
117
- let $ = j === void 0 ? q : j, ie = $ ? h($) : "";
131
+ let $ = k === void 0 ? q : k, se = $ ? h($) : "";
118
132
  return /* @__PURE__ */ p(n, {
119
133
  name: v,
120
- label: w,
121
- showAsterisk: T,
134
+ label: C,
135
+ showAsterisk: w,
122
136
  className: y,
123
137
  errorMessage: V,
124
- unShowFieldTemplate: P,
125
- orientation: N,
138
+ unShowFieldTemplate: M,
139
+ orientation: j,
126
140
  children: /* @__PURE__ */ m(o, {
127
- handleContainerFocus: Z,
141
+ handleContainerFocus: X,
128
142
  disabled: U,
129
143
  isError: H,
130
144
  isFocused: G,
131
145
  isLoading: x,
132
146
  readOnly: S,
133
- size: A,
134
- variant: M,
135
- prefixExists: !!k,
136
- id: B,
147
+ size: O,
148
+ variant: A,
149
+ prefixExists: !!D,
150
+ id: z,
151
+ containerRef: L,
152
+ onContainerKeyDown: Q,
153
+ tabIndex: U ? -1 : 0,
154
+ ariaControls: B,
137
155
  children: [
138
156
  /* @__PURE__ */ p("input", {
139
- ref: R,
157
+ ref: I,
140
158
  name: v,
141
- value: ie,
159
+ value: se,
142
160
  type: "hidden"
143
161
  }),
144
162
  /* @__PURE__ */ p(t, {
145
163
  iconSize: W,
146
- icon: k,
164
+ icon: D,
147
165
  className: "prefix"
148
166
  }),
149
- E && /* @__PURE__ */ p(E, {
167
+ T && /* @__PURE__ */ p(T, {
150
168
  size: W,
151
169
  strokeWidth: 2.5
152
170
  }),
153
171
  /* @__PURE__ */ p(s, {
154
- size: A,
172
+ size: O,
155
173
  children: $ ? /* @__PURE__ */ p("p", {
156
174
  className: "hasValue",
157
175
  children: g($)
158
176
  }) : /* @__PURE__ */ p("p", { children: b })
159
177
  }),
160
178
  /* @__PURE__ */ p(i, {
179
+ id: B,
161
180
  isFocused: G,
162
181
  children: /* @__PURE__ */ p(r, {
163
182
  type: "single",
164
- variant: F,
183
+ variant: N,
165
184
  value: $,
166
- onChange: ne,
185
+ onChange: ae,
167
186
  viewValue: _.viewValue,
168
187
  defaultViewValue: _.defaultViewValue,
169
188
  onChangeView: _.onChangeView
@@ -181,7 +200,7 @@ function _(_) {
181
200
  isLoading: x
182
201
  }),
183
202
  /* @__PURE__ */ p(c, {
184
- handleBlur: Q,
203
+ handleBlur: Z,
185
204
  isFocused: G
186
205
  })
187
206
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/datePicker/index.tsx"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\nimport { type FocusEvent, useId, useRef, useState } from \"react\";\n\nimport { useForm } from \"../../hooks/useForm\";\nimport { FieldTemplate } from \"../../services/fieldTemplate\";\nimport { IconRenderer } from \"../../services/iconRenderer\";\n\nimport { Calendar } from \"../calendar\";\n\nimport { DatePickerCalendarContainer } from \"./datePickerCalendarContainer\";\nimport { DatePickerChevron } from \"./datePickerChevron\";\nimport { DatePickerContainer } from \"./datePickerContainer\";\nimport { DatePickerContent } from \"./datePickerContent\";\nimport { DatePickerOverlay } from \"./datePickerOverlay\";\nimport { DatePickerSpinner } from \"./datePickerSpinner\";\n\nfunction toInputDateValue(date: Date) {\n\tconst pad = (value: number) => String(value).padStart(2, \"0\");\n\treturn `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;\n}\n\nfunction toDisplayDateValue(date: Date) {\n\treturn date.toLocaleDateString(\"pt-BR\");\n}\n\ntype BaseDatePickerProps = {\n\t/** Field name for form submission. Required. */\n\tname: string;\n\t/** Optional HTML id for the underlying hidden input. */\n\tid?: string;\n\t/** Displays an asterisk on the label to signal a required field. */\n\tshowAsterisk?: boolean;\n\t/** Optional label text displayed above the date picker. */\n\tlabel?: string;\n\t/** Validation error message displayed below the date picker. */\n\terrorMessage?: string;\n\t/** Placeholder text shown when no date is selected. @default \"Selecione uma data...\" */\n\tplaceholder?: string;\n\t/** Additional CSS class applied to the wrapper element. */\n\tclassName?: string;\n\t/** Disables all interactions. @default false */\n\tdisabled?: boolean;\n\t/** Prevents value changes while keeping the current value visible. @default false */\n\treadOnly?: boolean;\n\t/** Shows a loading spinner and disables interactions. @default false */\n\tisLoading?: boolean;\n\t/**\n\t * Closes the calendar after a date is picked.\n\t * @default true for `single`, `false` for `range`.\n\t */\n\tcloseOnSelect?: boolean;\n\t/** Callback fired when the date picker gains focus. */\n\tonFocus?: () => void;\n\t/** Callback fired when the date picker loses focus. */\n\tonBlur?: (e: FocusEvent<HTMLDivElement>) => void;\n\t/**\n\t * DatePicker size.\n\t * @default \"md\"\n\t */\n\tsize?: \"md\" | \"lg\";\n\t/**\n\t * Visual style variant.\n\t * - `solid`: filled background.\n\t * - `outline`: bordered, transparent background.\n\t * - `underline`: bottom border only.\n\t * @default \"solid\"\n\t */\n\tvariant?: \"solid\" | \"outline\" | \"underline\";\n\t/** Text or icon rendered at the far left, outside the date picker area. */\n\tprefix?: string | LucideIcon;\n\t/** Lucide icon rendered inside the date picker on the left. */\n\tleftIcon?: LucideIcon;\n\t/** When true, skips `FieldTemplate` wrapper (label and error text). @default false */\n\tunShowFieldTemplate?: boolean;\n\t/**\n\t * Layout direction forwarded to `FieldTemplate`.\n\t * @default \"vertical\"\n\t */\n\torientation?: \"horizontal\" | \"vertical\" | \"horizontalReverse\";\n\t/**\n\t * Visual/behavioral variant forwarded to the internal `Calendar`.\n\t * @default \"complete\"\n\t */\n\tcalendarVariant?: \"basic\" | \"complete\";\n};\n\n/**\n * Props for DatePicker single-date selection mode.\n */\ntype SingleDatePickerProps = BaseDatePickerProps & {\n\t/** Sets single-date selection mode. */\n\ttype: \"single\";\n\t/** Controlled selected date. */\n\tvalue?: Date;\n\t/** Uncontrolled default selected date. */\n\tdefaultValue?: Date;\n\t/** Callback fired when the selected date changes. */\n\tonChange?: (date: Date) => void;\n\t/** Currently focused calendar view date. */\n\tviewValue?: Date;\n\t/** Initial focused calendar view date. */\n\tdefaultViewValue?: Date;\n\t/** Callback fired when the calendar view (month/year) changes. */\n\tonChangeView?: (date: Date) => void;\n};\n\n/**\n * Props for DatePicker range selection mode.\n */\ntype RangeDatePickerProps = BaseDatePickerProps & {\n\t/** Sets range selection mode. */\n\ttype: \"range\";\n\t/** Controlled selected range in `[start, end]` format. */\n\tvalue?: [Date, Date];\n\t/** Uncontrolled default range in `[start, end]` format. */\n\tdefaultValue?: [Date, Date];\n\t/** Callback fired when the selected range changes. */\n\tonChange?: (date: [Date, Date]) => void;\n\t/** Currently focused calendar view date. */\n\tviewValue?: Date;\n\t/** Initial focused calendar view date. */\n\tdefaultViewValue?: Date;\n\t/** Callback fired when the calendar view (month/year) changes. */\n\tonChangeView?: (date: Date) => void;\n\t/** Text placed between the start and end dates. @default \" até \" */\n\trangeSeparator?: string;\n};\n\n/**\n * Discriminated union of DatePicker props.\n */\ntype DatePickerProps = SingleDatePickerProps | RangeDatePickerProps;\n\n/**\n * DatePicker, date input field with a popover `Calendar`, supporting single-date\n * (`single`) and range (`range`) selection modes.\n *\n * Opens the calendar on click, the same way `Select` opens its options list, flipping\n * upward or downward depending on the available viewport space so it never renders\n * off-screen. Integrates with `useForm` to display validation errors by field name.\n *\n * @param props.name - Field name for form submission. Required.\n * @param props.type - Selection mode (`single` | `range`). Required.\n * @param props.value - Controlled selected date (`single`) or range (`range`).\n * @param props.defaultValue - Uncontrolled default date or range.\n * @param props.label - Label text displayed above the date picker.\n * @param props.placeholder - Placeholder shown when nothing is selected. Default: \"Selecione uma data...\"\n * @param props.errorMessage - Validation error message.\n * @param props.isLoading - Shows a loading spinner and disables interactions. Default: false\n * @param props.closeOnSelect - Closes the calendar after picking. Default: `true` for `single`, `false` for `range`.\n * @param props.onChange - Callback fired when the selected date/range changes.\n * @param props.calendarVariant - Visual/behavioral variant of the internal `Calendar`. Default: \"complete\"\n * @param props.size - DatePicker size (`md` | `lg`). Default: \"md\"\n * @param props.variant - Visual style variant. Default: \"solid\"\n * @param props.orientation - Layout direction. Default: \"vertical\"\n * @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false\n *\n * @returns DatePicker JSX element wrapped in `FieldTemplate`.\n *\n * @example\n * ```tsx\n * // Single date\n * <DatePicker\n * type=\"single\"\n * name=\"birthDate\"\n * label=\"Data de nascimento\"\n * onChange={(date) => console.log(\"Selected date:\", date)}\n * />\n *\n * // Range\n * <DatePicker\n * type=\"range\"\n * name=\"stay\"\n * label=\"Período da estadia\"\n * calendarVariant=\"basic\"\n * onChange={([start, end]) => console.log(\"Range:\", start, end)}\n * />\n * ```\n */\nfunction DatePicker(props: DatePickerProps) {\n\tconst {\n\t\tname,\n\t\tclassName: wrapperClassName = \"\",\n\t\tplaceholder = \"Selecione uma data...\",\n\t\terrorMessage: baseErrorMessage,\n\t\tisLoading = false,\n\t\treadOnly = false,\n\t\tid,\n\t\tlabel,\n\t\tshowAsterisk,\n\t\tleftIcon: LeftIcon,\n\t\tonFocus,\n\t\tonBlur,\n\t\tdisabled: baseDisabled = false,\n\t\tprefix,\n\t\tsize = \"md\",\n\t\tvalue,\n\t\tvariant = \"solid\",\n\t\torientation = \"vertical\",\n\t\tunShowFieldTemplate = false,\n\t\tcalendarVariant = \"complete\",\n\t} = props;\n\n\tconst closeOnSelect = props.closeOnSelect ?? props.type === \"single\";\n\n\tconst { fieldErrors } = useForm();\n\n\tconst datePickerRef = useRef<HTMLInputElement>(null);\n\tconst generatedId = useId();\n\tconst datePickerId = id || generatedId;\n\n\tconst errorMessage = baseErrorMessage || fieldErrors?.[name];\n\tconst isError = !!errorMessage;\n\tconst disabled = baseDisabled || isLoading || readOnly;\n\n\tconst iconSizes = { md: 20, lg: 20 };\n\tconst iconSize = iconSizes[size];\n\n\tconst [isFocused, setIsFocused] = useState(false);\n\tconst [internalSingleValue, setInternalSingleValue] = useState<\n\t\tDate | undefined\n\t>(props.type === \"single\" ? props.defaultValue : undefined);\n\tconst [internalRangeValue, setInternalRangeValue] = useState<\n\t\t[Date, Date] | undefined\n\t>(props.type === \"range\" ? props.defaultValue : undefined);\n\n\tfunction handleContainerFocus() {\n\t\tif (disabled || !datePickerRef?.current || isFocused) return;\n\t\tsetIsFocused(true);\n\t\tdatePickerRef.current.focus();\n\t\tonFocus?.();\n\t}\n\n\tfunction handleBlur() {\n\t\tsetIsFocused(false);\n\t\tif (onBlur && datePickerRef.current) datePickerRef.current.blur();\n\t}\n\n\tfunction handleChangeSingleDate(date: Date) {\n\t\tif (value === undefined) setInternalSingleValue(date);\n\t\tif (props.type === \"single\") props.onChange?.(date);\n\t\tif (closeOnSelect) handleBlur();\n\t}\n\n\tfunction handleChangeRangeDate(range: [Date, Date]) {\n\t\tif (value === undefined) setInternalRangeValue(range);\n\t\tif (props.type === \"range\") props.onChange?.(range);\n\t\tif (closeOnSelect) handleBlur();\n\t}\n\n\tif (props.type === \"range\") {\n\t\tconst rangeSeparator = props.rangeSeparator ?? \" até \";\n\t\tconst forceValue =\n\t\t\tvalue !== undefined ? (value as [Date, Date]) : internalRangeValue;\n\n\t\tconst hiddenInputValue = forceValue\n\t\t\t? JSON.stringify([\n\t\t\t\t\ttoInputDateValue(forceValue[0]),\n\t\t\t\t\ttoInputDateValue(forceValue[1]),\n\t\t\t\t])\n\t\t\t: \"\";\n\n\t\treturn (\n\t\t\t<FieldTemplate\n\t\t\t\tname={name}\n\t\t\t\tlabel={label}\n\t\t\t\tshowAsterisk={showAsterisk}\n\t\t\t\tclassName={wrapperClassName}\n\t\t\t\terrorMessage={errorMessage}\n\t\t\t\tunShowFieldTemplate={unShowFieldTemplate}\n\t\t\t\torientation={orientation}\n\t\t\t>\n\t\t\t\t<DatePickerContainer\n\t\t\t\t\thandleContainerFocus={handleContainerFocus}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tisError={isError}\n\t\t\t\t\tisFocused={isFocused}\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\tsize={size}\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\tprefixExists={!!prefix}\n\t\t\t\t\tid={datePickerId}\n\t\t\t\t>\n\t\t\t\t\t<input\n\t\t\t\t\t\tref={datePickerRef}\n\t\t\t\t\t\tname={name}\n\t\t\t\t\t\tvalue={hiddenInputValue}\n\t\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<IconRenderer iconSize={iconSize} icon={prefix} className=\"prefix\" />\n\n\t\t\t\t\t{LeftIcon && <LeftIcon size={iconSize} strokeWidth={2.5} />}\n\n\t\t\t\t\t<DatePickerContent size={size}>\n\t\t\t\t\t\t{forceValue ? (\n\t\t\t\t\t\t\t<p className=\"hasValue\">\n\t\t\t\t\t\t\t\t{toDisplayDateValue(forceValue[0])}\n\t\t\t\t\t\t\t\t{rangeSeparator}\n\t\t\t\t\t\t\t\t{toDisplayDateValue(forceValue[1])}\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<p>{placeholder}</p>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</DatePickerContent>\n\n\t\t\t\t\t<DatePickerCalendarContainer isFocused={isFocused}>\n\t\t\t\t\t\t<Calendar\n\t\t\t\t\t\t\ttype=\"range\"\n\t\t\t\t\t\t\tvariant={calendarVariant}\n\t\t\t\t\t\t\tvalue={forceValue}\n\t\t\t\t\t\t\tonChange={handleChangeRangeDate}\n\t\t\t\t\t\t\tviewValue={props.viewValue}\n\t\t\t\t\t\t\tdefaultViewValue={props.defaultViewValue}\n\t\t\t\t\t\t\tonChangeView={props.onChangeView}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</DatePickerCalendarContainer>\n\n\t\t\t\t\t<DatePickerChevron\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tisFocused={isFocused}\n\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\ticonSize={iconSize}\n\t\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\t/>\n\n\t\t\t\t\t<DatePickerSpinner iconSize={iconSize} isLoading={isLoading} />\n\t\t\t\t\t<DatePickerOverlay handleBlur={handleBlur} isFocused={isFocused} />\n\t\t\t\t</DatePickerContainer>\n\t\t\t</FieldTemplate>\n\t\t);\n\t}\n\n\tconst forceValue =\n\t\tvalue !== undefined ? (value as Date) : internalSingleValue;\n\n\tconst hiddenInputValue = forceValue ? toInputDateValue(forceValue) : \"\";\n\n\treturn (\n\t\t<FieldTemplate\n\t\t\tname={name}\n\t\t\tlabel={label}\n\t\t\tshowAsterisk={showAsterisk}\n\t\t\tclassName={wrapperClassName}\n\t\t\terrorMessage={errorMessage}\n\t\t\tunShowFieldTemplate={unShowFieldTemplate}\n\t\t\torientation={orientation}\n\t\t>\n\t\t\t<DatePickerContainer\n\t\t\t\thandleContainerFocus={handleContainerFocus}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tisError={isError}\n\t\t\t\tisFocused={isFocused}\n\t\t\t\tisLoading={isLoading}\n\t\t\t\treadOnly={readOnly}\n\t\t\t\tsize={size}\n\t\t\t\tvariant={variant}\n\t\t\t\tprefixExists={!!prefix}\n\t\t\t\tid={datePickerId}\n\t\t\t>\n\t\t\t\t<input\n\t\t\t\t\tref={datePickerRef}\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={hiddenInputValue}\n\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t/>\n\n\t\t\t\t<IconRenderer iconSize={iconSize} icon={prefix} className=\"prefix\" />\n\n\t\t\t\t{LeftIcon && <LeftIcon size={iconSize} strokeWidth={2.5} />}\n\n\t\t\t\t<DatePickerContent size={size}>\n\t\t\t\t\t{forceValue ? (\n\t\t\t\t\t\t<p className=\"hasValue\">{toDisplayDateValue(forceValue)}</p>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<p>{placeholder}</p>\n\t\t\t\t\t)}\n\t\t\t\t</DatePickerContent>\n\n\t\t\t\t<DatePickerCalendarContainer isFocused={isFocused}>\n\t\t\t\t\t<Calendar\n\t\t\t\t\t\ttype=\"single\"\n\t\t\t\t\t\tvariant={calendarVariant}\n\t\t\t\t\t\tvalue={forceValue}\n\t\t\t\t\t\tonChange={handleChangeSingleDate}\n\t\t\t\t\t\tviewValue={props.viewValue}\n\t\t\t\t\t\tdefaultViewValue={props.defaultViewValue}\n\t\t\t\t\t\tonChangeView={props.onChangeView}\n\t\t\t\t\t/>\n\t\t\t\t</DatePickerCalendarContainer>\n\n\t\t\t\t<DatePickerChevron\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tisFocused={isFocused}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\ticonSize={iconSize}\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t/>\n\n\t\t\t\t<DatePickerSpinner iconSize={iconSize} isLoading={isLoading} />\n\t\t\t\t<DatePickerOverlay handleBlur={handleBlur} isFocused={isFocused} />\n\t\t\t</DatePickerContainer>\n\t\t</FieldTemplate>\n\t);\n}\n\nexport { DatePicker };\n"],"mappings":"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"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/datePicker/index.tsx"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\nimport {\n\ttype FocusEvent,\n\ttype KeyboardEvent,\n\tuseId,\n\tuseRef,\n\tuseState,\n} from \"react\";\n\nimport { useForm } from \"../../hooks/useForm\";\nimport { FieldTemplate } from \"../../services/fieldTemplate\";\nimport { IconRenderer } from \"../../services/iconRenderer\";\n\nimport { Calendar } from \"../calendar\";\n\nimport { DatePickerCalendarContainer } from \"./datePickerCalendarContainer\";\nimport { DatePickerChevron } from \"./datePickerChevron\";\nimport { DatePickerContainer } from \"./datePickerContainer\";\nimport { DatePickerContent } from \"./datePickerContent\";\nimport { DatePickerOverlay } from \"./datePickerOverlay\";\nimport { DatePickerSpinner } from \"./datePickerSpinner\";\n\nfunction toInputDateValue(date: Date) {\n\tconst pad = (value: number) => String(value).padStart(2, \"0\");\n\treturn `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;\n}\n\nfunction toDisplayDateValue(date: Date) {\n\treturn date.toLocaleDateString(\"pt-BR\");\n}\n\ntype BaseDatePickerProps = {\n\t/** Field name for form submission. Required. */\n\tname: string;\n\t/** Optional HTML id for the underlying hidden input. */\n\tid?: string;\n\t/** Displays an asterisk on the label to signal a required field. */\n\tshowAsterisk?: boolean;\n\t/** Optional label text displayed above the date picker. */\n\tlabel?: string;\n\t/** Validation error message displayed below the date picker. */\n\terrorMessage?: string;\n\t/** Placeholder text shown when no date is selected. @default \"Selecione uma data...\" */\n\tplaceholder?: string;\n\t/** Additional CSS class applied to the wrapper element. */\n\tclassName?: string;\n\t/** Disables all interactions. @default false */\n\tdisabled?: boolean;\n\t/** Prevents value changes while keeping the current value visible. @default false */\n\treadOnly?: boolean;\n\t/** Shows a loading spinner and disables interactions. @default false */\n\tisLoading?: boolean;\n\t/**\n\t * Closes the calendar after a date is picked.\n\t * @default true for `single`, `false` for `range`.\n\t */\n\tcloseOnSelect?: boolean;\n\t/** Callback fired when the date picker gains focus. */\n\tonFocus?: () => void;\n\t/** Callback fired when the date picker loses focus. */\n\tonBlur?: (e: FocusEvent<HTMLDivElement>) => void;\n\t/**\n\t * DatePicker size.\n\t * @default \"md\"\n\t */\n\tsize?: \"md\" | \"lg\";\n\t/**\n\t * Visual style variant.\n\t * - `solid`: filled background.\n\t * - `outline`: bordered, transparent background.\n\t * - `underline`: bottom border only.\n\t * @default \"solid\"\n\t */\n\tvariant?: \"solid\" | \"outline\" | \"underline\";\n\t/** Text or icon rendered at the far left, outside the date picker area. */\n\tprefix?: string | LucideIcon;\n\t/** Lucide icon rendered inside the date picker on the left. */\n\tleftIcon?: LucideIcon;\n\t/** When true, skips `FieldTemplate` wrapper (label and error text). @default false */\n\tunShowFieldTemplate?: boolean;\n\t/**\n\t * Layout direction forwarded to `FieldTemplate`.\n\t * @default \"vertical\"\n\t */\n\torientation?: \"horizontal\" | \"vertical\" | \"horizontalReverse\";\n\t/**\n\t * Visual/behavioral variant forwarded to the internal `Calendar`.\n\t * @default \"complete\"\n\t */\n\tcalendarVariant?: \"basic\" | \"complete\";\n};\n\n/**\n * Props for DatePicker single-date selection mode.\n */\ntype SingleDatePickerProps = BaseDatePickerProps & {\n\t/** Sets single-date selection mode. */\n\ttype: \"single\";\n\t/** Controlled selected date. */\n\tvalue?: Date;\n\t/** Uncontrolled default selected date. */\n\tdefaultValue?: Date;\n\t/** Callback fired when the selected date changes. */\n\tonChange?: (date: Date) => void;\n\t/** Currently focused calendar view date. */\n\tviewValue?: Date;\n\t/** Initial focused calendar view date. */\n\tdefaultViewValue?: Date;\n\t/** Callback fired when the calendar view (month/year) changes. */\n\tonChangeView?: (date: Date) => void;\n};\n\n/**\n * Props for DatePicker range selection mode.\n */\ntype RangeDatePickerProps = BaseDatePickerProps & {\n\t/** Sets range selection mode. */\n\ttype: \"range\";\n\t/** Controlled selected range in `[start, end]` format. */\n\tvalue?: [Date, Date];\n\t/** Uncontrolled default range in `[start, end]` format. */\n\tdefaultValue?: [Date, Date];\n\t/** Callback fired when the selected range changes. */\n\tonChange?: (date: [Date, Date]) => void;\n\t/** Currently focused calendar view date. */\n\tviewValue?: Date;\n\t/** Initial focused calendar view date. */\n\tdefaultViewValue?: Date;\n\t/** Callback fired when the calendar view (month/year) changes. */\n\tonChangeView?: (date: Date) => void;\n\t/** Text placed between the start and end dates. @default \" até \" */\n\trangeSeparator?: string;\n};\n\n/**\n * Discriminated union of DatePicker props.\n */\ntype DatePickerProps = SingleDatePickerProps | RangeDatePickerProps;\n\n/**\n * DatePicker, date input field with a popover `Calendar`, supporting single-date\n * (`single`) and range (`range`) selection modes.\n *\n * Opens the calendar on click, the same way `Select` opens its options list, flipping\n * upward or downward depending on the available viewport space so it never renders\n * off-screen. Integrates with `useForm` to display validation errors by field name.\n *\n * @param props.name - Field name for form submission. Required.\n * @param props.type - Selection mode (`single` | `range`). Required.\n * @param props.value - Controlled selected date (`single`) or range (`range`).\n * @param props.defaultValue - Uncontrolled default date or range.\n * @param props.label - Label text displayed above the date picker.\n * @param props.placeholder - Placeholder shown when nothing is selected. Default: \"Selecione uma data...\"\n * @param props.errorMessage - Validation error message.\n * @param props.isLoading - Shows a loading spinner and disables interactions. Default: false\n * @param props.closeOnSelect - Closes the calendar after picking. Default: `true` for `single`, `false` for `range`.\n * @param props.onChange - Callback fired when the selected date/range changes.\n * @param props.calendarVariant - Visual/behavioral variant of the internal `Calendar`. Default: \"complete\"\n * @param props.size - DatePicker size (`md` | `lg`). Default: \"md\"\n * @param props.variant - Visual style variant. Default: \"solid\"\n * @param props.orientation - Layout direction. Default: \"vertical\"\n * @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false\n *\n * @returns DatePicker JSX element wrapped in `FieldTemplate`.\n *\n * @example\n * ```tsx\n * // Single date\n * <DatePicker\n * type=\"single\"\n * name=\"birthDate\"\n * label=\"Data de nascimento\"\n * onChange={(date) => console.log(\"Selected date:\", date)}\n * />\n *\n * // Range\n * <DatePicker\n * type=\"range\"\n * name=\"stay\"\n * label=\"Período da estadia\"\n * calendarVariant=\"basic\"\n * onChange={([start, end]) => console.log(\"Range:\", start, end)}\n * />\n * ```\n */\nfunction DatePicker(props: DatePickerProps) {\n\tconst {\n\t\tname,\n\t\tclassName: wrapperClassName = \"\",\n\t\tplaceholder = \"Selecione uma data...\",\n\t\terrorMessage: baseErrorMessage,\n\t\tisLoading = false,\n\t\treadOnly = false,\n\t\tid,\n\t\tlabel,\n\t\tshowAsterisk,\n\t\tleftIcon: LeftIcon,\n\t\tonFocus,\n\t\tonBlur,\n\t\tdisabled: baseDisabled = false,\n\t\tprefix,\n\t\tsize = \"md\",\n\t\tvalue,\n\t\tvariant = \"solid\",\n\t\torientation = \"vertical\",\n\t\tunShowFieldTemplate = false,\n\t\tcalendarVariant = \"complete\",\n\t} = props;\n\n\tconst closeOnSelect = props.closeOnSelect ?? props.type === \"single\";\n\n\tconst { fieldErrors } = useForm();\n\n\tconst datePickerRef = useRef<HTMLInputElement>(null);\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst generatedId = useId();\n\tconst datePickerId = id || generatedId;\n\tconst calendarId = `${datePickerId}-calendar`;\n\n\tconst errorMessage = baseErrorMessage || fieldErrors?.[name];\n\tconst isError = !!errorMessage;\n\tconst disabled = baseDisabled || isLoading || readOnly;\n\n\tconst iconSizes = { md: 20, lg: 20 };\n\tconst iconSize = iconSizes[size];\n\n\tconst [isFocused, setIsFocused] = useState(false);\n\tconst [internalSingleValue, setInternalSingleValue] = useState<\n\t\tDate | undefined\n\t>(props.type === \"single\" ? props.defaultValue : undefined);\n\tconst [internalRangeValue, setInternalRangeValue] = useState<\n\t\t[Date, Date] | undefined\n\t>(props.type === \"range\" ? props.defaultValue : undefined);\n\n\tfunction handleContainerFocus() {\n\t\tif (disabled || !datePickerRef?.current || isFocused) return;\n\t\tsetIsFocused(true);\n\t\tdatePickerRef.current.focus();\n\t\tonFocus?.();\n\t}\n\n\tfunction handleBlur() {\n\t\tsetIsFocused(false);\n\t\tif (onBlur && datePickerRef.current) datePickerRef.current.blur();\n\t}\n\n\tfunction handleContainerKeyDown(e: KeyboardEvent<HTMLDivElement>) {\n\t\tif (disabled) return;\n\n\t\tif (!isFocused) {\n\t\t\tif (e.key === \"Enter\" || e.key === \" \" || e.key === \"ArrowDown\") {\n\t\t\t\te.preventDefault();\n\t\t\t\thandleContainerFocus();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (e.key === \"Escape\") {\n\t\t\te.preventDefault();\n\t\t\thandleBlur();\n\t\t\tcontainerRef.current?.focus();\n\t\t}\n\t}\n\n\tfunction handleChangeSingleDate(date: Date) {\n\t\tif (value === undefined) setInternalSingleValue(date);\n\t\tif (props.type === \"single\") props.onChange?.(date);\n\t\tif (closeOnSelect) handleBlur();\n\t}\n\n\tfunction handleChangeRangeDate(range: [Date, Date]) {\n\t\tif (value === undefined) setInternalRangeValue(range);\n\t\tif (props.type === \"range\") props.onChange?.(range);\n\t\tif (closeOnSelect) handleBlur();\n\t}\n\n\tif (props.type === \"range\") {\n\t\tconst rangeSeparator = props.rangeSeparator ?? \" até \";\n\t\tconst forceValue =\n\t\t\tvalue !== undefined ? (value as [Date, Date]) : internalRangeValue;\n\n\t\tconst hiddenInputValue = forceValue\n\t\t\t? JSON.stringify([\n\t\t\t\t\ttoInputDateValue(forceValue[0]),\n\t\t\t\t\ttoInputDateValue(forceValue[1]),\n\t\t\t\t])\n\t\t\t: \"\";\n\n\t\treturn (\n\t\t\t<FieldTemplate\n\t\t\t\tname={name}\n\t\t\t\tlabel={label}\n\t\t\t\tshowAsterisk={showAsterisk}\n\t\t\t\tclassName={wrapperClassName}\n\t\t\t\terrorMessage={errorMessage}\n\t\t\t\tunShowFieldTemplate={unShowFieldTemplate}\n\t\t\t\torientation={orientation}\n\t\t\t>\n\t\t\t\t<DatePickerContainer\n\t\t\t\t\thandleContainerFocus={handleContainerFocus}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tisError={isError}\n\t\t\t\t\tisFocused={isFocused}\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\tsize={size}\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\tprefixExists={!!prefix}\n\t\t\t\t\tid={datePickerId}\n\t\t\t\t\tcontainerRef={containerRef}\n\t\t\t\t\tonContainerKeyDown={handleContainerKeyDown}\n\t\t\t\t\ttabIndex={disabled ? -1 : 0}\n\t\t\t\t\tariaControls={calendarId}\n\t\t\t\t>\n\t\t\t\t\t<input\n\t\t\t\t\t\tref={datePickerRef}\n\t\t\t\t\t\tname={name}\n\t\t\t\t\t\tvalue={hiddenInputValue}\n\t\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<IconRenderer iconSize={iconSize} icon={prefix} className=\"prefix\" />\n\n\t\t\t\t\t{LeftIcon && <LeftIcon size={iconSize} strokeWidth={2.5} />}\n\n\t\t\t\t\t<DatePickerContent size={size}>\n\t\t\t\t\t\t{forceValue ? (\n\t\t\t\t\t\t\t<p className=\"hasValue\">\n\t\t\t\t\t\t\t\t{toDisplayDateValue(forceValue[0])}\n\t\t\t\t\t\t\t\t{rangeSeparator}\n\t\t\t\t\t\t\t\t{toDisplayDateValue(forceValue[1])}\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<p>{placeholder}</p>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</DatePickerContent>\n\n\t\t\t\t\t<DatePickerCalendarContainer id={calendarId} isFocused={isFocused}>\n\t\t\t\t\t\t<Calendar\n\t\t\t\t\t\t\ttype=\"range\"\n\t\t\t\t\t\t\tvariant={calendarVariant}\n\t\t\t\t\t\t\tvalue={forceValue}\n\t\t\t\t\t\t\tonChange={handleChangeRangeDate}\n\t\t\t\t\t\t\tviewValue={props.viewValue}\n\t\t\t\t\t\t\tdefaultViewValue={props.defaultViewValue}\n\t\t\t\t\t\t\tonChangeView={props.onChangeView}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</DatePickerCalendarContainer>\n\n\t\t\t\t\t<DatePickerChevron\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tisFocused={isFocused}\n\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\ticonSize={iconSize}\n\t\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\t/>\n\n\t\t\t\t\t<DatePickerSpinner iconSize={iconSize} isLoading={isLoading} />\n\t\t\t\t\t<DatePickerOverlay handleBlur={handleBlur} isFocused={isFocused} />\n\t\t\t\t</DatePickerContainer>\n\t\t\t</FieldTemplate>\n\t\t);\n\t}\n\n\tconst forceValue =\n\t\tvalue !== undefined ? (value as Date) : internalSingleValue;\n\n\tconst hiddenInputValue = forceValue ? toInputDateValue(forceValue) : \"\";\n\n\treturn (\n\t\t<FieldTemplate\n\t\t\tname={name}\n\t\t\tlabel={label}\n\t\t\tshowAsterisk={showAsterisk}\n\t\t\tclassName={wrapperClassName}\n\t\t\terrorMessage={errorMessage}\n\t\t\tunShowFieldTemplate={unShowFieldTemplate}\n\t\t\torientation={orientation}\n\t\t>\n\t\t\t<DatePickerContainer\n\t\t\t\thandleContainerFocus={handleContainerFocus}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tisError={isError}\n\t\t\t\tisFocused={isFocused}\n\t\t\t\tisLoading={isLoading}\n\t\t\t\treadOnly={readOnly}\n\t\t\t\tsize={size}\n\t\t\t\tvariant={variant}\n\t\t\t\tprefixExists={!!prefix}\n\t\t\t\tid={datePickerId}\n\t\t\t\tcontainerRef={containerRef}\n\t\t\t\tonContainerKeyDown={handleContainerKeyDown}\n\t\t\t\ttabIndex={disabled ? -1 : 0}\n\t\t\t\tariaControls={calendarId}\n\t\t\t>\n\t\t\t\t<input\n\t\t\t\t\tref={datePickerRef}\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={hiddenInputValue}\n\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t/>\n\n\t\t\t\t<IconRenderer iconSize={iconSize} icon={prefix} className=\"prefix\" />\n\n\t\t\t\t{LeftIcon && <LeftIcon size={iconSize} strokeWidth={2.5} />}\n\n\t\t\t\t<DatePickerContent size={size}>\n\t\t\t\t\t{forceValue ? (\n\t\t\t\t\t\t<p className=\"hasValue\">{toDisplayDateValue(forceValue)}</p>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<p>{placeholder}</p>\n\t\t\t\t\t)}\n\t\t\t\t</DatePickerContent>\n\n\t\t\t\t<DatePickerCalendarContainer id={calendarId} isFocused={isFocused}>\n\t\t\t\t\t<Calendar\n\t\t\t\t\t\ttype=\"single\"\n\t\t\t\t\t\tvariant={calendarVariant}\n\t\t\t\t\t\tvalue={forceValue}\n\t\t\t\t\t\tonChange={handleChangeSingleDate}\n\t\t\t\t\t\tviewValue={props.viewValue}\n\t\t\t\t\t\tdefaultViewValue={props.defaultViewValue}\n\t\t\t\t\t\tonChangeView={props.onChangeView}\n\t\t\t\t\t/>\n\t\t\t\t</DatePickerCalendarContainer>\n\n\t\t\t\t<DatePickerChevron\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tisFocused={isFocused}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\ticonSize={iconSize}\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t/>\n\n\t\t\t\t<DatePickerSpinner iconSize={iconSize} isLoading={isLoading} />\n\t\t\t\t<DatePickerOverlay handleBlur={handleBlur} isFocused={isFocused} />\n\t\t\t</DatePickerContainer>\n\t\t</FieldTemplate>\n\t);\n}\n\nexport { DatePicker };\n"],"mappings":"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"}
@@ -20,7 +20,7 @@
20
20
 
21
21
  @layer arkyn{.arkynSelectContent{flex-wrap:wrap;flex:1;align-items:start;gap:4px;display:flex}.arkynSelectContent>p{color:var(--text-muted,#a1a1aa);-webkit-user-select:none;user-select:none;font-weight:400}.arkynSelectContent>p.hasValue{color:var(--text-body,#52525b)}.arkynSelectContent.md>p{font-size:14px;line-height:14px}.arkynSelectContent.lg>p{font-size:16px;line-height:16px}}
22
22
 
23
- @layer arkyn{.arkynSelectOption{color:var(--text-body,#52525b);background-color:inherit;-webkit-user-select:none;user-select:none;border:none;justify-content:space-between;align-items:center;font-weight:400;line-height:21.79px;display:flex}.arkynSelectOption.md{padding:8px 16px;font-size:14px}.arkynSelectOption.lg{padding:8px 16px;font-size:16px}.arkynSelectOption svg{width:20px;height:20px;color:rgb(var(--spotlight-primary,17, 109, 220));display:none}.arkynSelectOption:hover{cursor:pointer;filter:brightness(.98)}.arkynSelectOption.active{color:var(--text-heading,#09090b);filter:brightness(.95);font-weight:600}.arkynSelectOption.active svg{display:unset}html.dark .arkynSelectOption:hover,html.dark .arkynSelectOption.active{filter:brightness(1.2)}}
23
+ @layer arkyn{.arkynSelectOption{color:var(--text-body,#52525b);background-color:inherit;-webkit-user-select:none;user-select:none;border:none;justify-content:space-between;align-items:center;font-weight:400;line-height:21.79px;display:flex}.arkynSelectOption.md{padding:8px 16px;font-size:14px}.arkynSelectOption.lg{padding:8px 16px;font-size:16px}.arkynSelectOption svg{width:20px;height:20px;color:rgb(var(--spotlight-primary,17, 109, 220));display:none}.arkynSelectOption:hover{cursor:pointer;filter:brightness(.98)}.arkynSelectOption.active{color:var(--text-heading,#09090b);filter:brightness(.95);font-weight:600}.arkynSelectOption.active svg{display:unset}.arkynSelectOption.highlighted{filter:brightness(.98)}html.dark .arkynSelectOption:hover,html.dark .arkynSelectOption.active,html.dark .arkynSelectOption.highlighted{filter:brightness(1.2)}}
24
24
 
25
25
  @layer arkyn{.arkynSelectOptionsContainer{z-index:7;border:1px solid var(--border,#e2e8f0);background-color:var(--background-foreground,#fff);border-radius:6px;flex-direction:column;flex:1;height:max-content;max-height:300px;list-style:none;display:flex;position:absolute;left:-2px;right:-2px;overflow:auto;box-shadow:0 4px 8px #0000001a}.arkynSelectOptionsContainer.bottom{top:calc(100% + 5px)}.arkynSelectOptionsContainer.top{bottom:calc(100% + 5px)}.arkynSelectOptionsContainer>p{text-align:center;color:var(--text-body,#52525b);padding:16px;font-size:14px;font-weight:400;line-height:21.79px}}
26
26
 
@@ -32,7 +32,7 @@
32
32
 
33
33
  @layer arkyn{.arkynCalendarTableBody{border-collapse:collapse;border-spacing:0}.arkynCalendarTableBody td p{text-align:center;padding:16px;font-size:14px}.arkynCalendarTableBody tr:first-child td{padding-top:8px}}
34
34
 
35
- @layer arkyn{.arkynCalendarTableTd{-webkit-user-select:none;user-select:none;cursor:pointer}.arkynCalendarTableTd p{text-align:center;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;margin:auto;font-size:14px;display:flex}.arkynCalendarTableTd.previous p,.arkynCalendarTableTd.next p{color:var(--text-muted,#a1a1aa)}.arkynCalendarTableTd.current p{color:var(--text-body,#52525b)}.arkynCalendarTableTd:hover p{color:rgb(var(--spotlight-primary,17, 109, 220))}.arkynCalendarTableTd.today:not(.checkedDay) p{color:var(--text-body,#52525b);background-color:var(--background-underground,#fafafa);filter:brightness(.97);font-weight:500}.arkynCalendarTableTd .textGroup{width:40px;height:40px;margin:auto;position:relative}.arkynCalendarTableTd.checkedDay .textGroup span{content:" ";background-color:rgb(var(--spotlight-primary,17, 109, 220));z-index:2;border-radius:8px;position:absolute;inset:0}.arkynCalendarTableTd.checkedDay .textGroup p{color:var(--white,#fff);z-index:3;font-weight:600;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynCalendarTableTd.middleDay .textGroup span{content:" ";background-color:var(--background-underground,#fafafa);filter:brightness(.95);z-index:1;position:absolute;inset:0 -15px}.arkynCalendarTableTd:first-child.middleDay .textGroup span{border-top-left-radius:6px;border-bottom-left-radius:6px;left:0;right:-15px}.arkynCalendarTableTd:last-child.middleDay .textGroup span{border-top-right-radius:6px;border-bottom-right-radius:6px;left:-15px;right:0}.arkynCalendarTableTd.middleDay .textGroup p{color:var(--text-muted,#a1a1aa);z-index:2;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynCalendarTableTd.current.middleDay .textGroup p{color:var(--text-body,#52525b)}}
35
+ @layer arkyn{.arkynCalendarTableTd{-webkit-user-select:none;user-select:none;cursor:pointer}.arkynCalendarTableTd p{text-align:center;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;margin:auto;font-size:14px;display:flex}.arkynCalendarTableTd.previous p,.arkynCalendarTableTd.next p{color:var(--text-muted,#a1a1aa)}.arkynCalendarTableTd.current p{color:var(--text-body,#52525b)}.arkynCalendarTableTd:hover p{color:rgb(var(--spotlight-primary,17, 109, 220))}.arkynCalendarTableTd.today:not(.checkedDay) p{color:var(--text-body,#52525b);background-color:var(--background-underground,#fafafa);filter:brightness(.97);font-weight:500}.arkynCalendarTableTd .textGroup{width:40px;height:40px;font:inherit;cursor:pointer;background-color:#0000;border:none;margin:auto;padding:0;display:block;position:relative}.arkynCalendarTableTd.checkedDay .textGroup span{content:" ";background-color:rgb(var(--spotlight-primary,17, 109, 220));z-index:2;border-radius:8px;position:absolute;inset:0}.arkynCalendarTableTd.checkedDay .textGroup p{color:var(--white,#fff);z-index:3;font-weight:600;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynCalendarTableTd.middleDay .textGroup span{content:" ";background-color:var(--background-underground,#fafafa);filter:brightness(.95);z-index:1;position:absolute;inset:0 -15px}.arkynCalendarTableTd:first-child.middleDay .textGroup span{border-top-left-radius:6px;border-bottom-left-radius:6px;left:0;right:-15px}.arkynCalendarTableTd:last-child.middleDay .textGroup span{border-top-right-radius:6px;border-bottom-right-radius:6px;left:-15px;right:0}.arkynCalendarTableTd.middleDay .textGroup p{color:var(--text-muted,#a1a1aa);z-index:2;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynCalendarTableTd.current.middleDay .textGroup p{color:var(--text-body,#52525b)}}
36
36
 
37
37
  @layer arkyn{.arkynCalendarTableContainer{border-collapse:collapse;border-spacing:0}}
38
38
 
@@ -48,7 +48,7 @@
48
48
 
49
49
  @layer arkyn{.arkynSelectContent{flex-wrap:wrap;flex:1;align-items:start;gap:4px;display:flex}.arkynSelectContent>p{color:var(--text-muted,#a1a1aa);-webkit-user-select:none;user-select:none;font-weight:400}.arkynSelectContent>p.hasValue{color:var(--text-body,#52525b)}.arkynSelectContent.md>p{font-size:14px;line-height:14px}.arkynSelectContent.lg>p{font-size:16px;line-height:16px}}
50
50
 
51
- @layer arkyn{.arkynSelectOption{color:var(--text-body,#52525b);background-color:inherit;-webkit-user-select:none;user-select:none;border:none;justify-content:space-between;align-items:center;font-weight:400;line-height:21.79px;display:flex}.arkynSelectOption.md{padding:8px 16px;font-size:14px}.arkynSelectOption.lg{padding:8px 16px;font-size:16px}.arkynSelectOption svg{width:20px;height:20px;color:rgb(var(--spotlight-primary,17, 109, 220));display:none}.arkynSelectOption:hover{cursor:pointer;filter:brightness(.98)}.arkynSelectOption.active{color:var(--text-heading,#09090b);filter:brightness(.95);font-weight:600}.arkynSelectOption.active svg{display:unset}html.dark .arkynSelectOption:hover,html.dark .arkynSelectOption.active{filter:brightness(1.2)}}
51
+ @layer arkyn{.arkynSelectOption{color:var(--text-body,#52525b);background-color:inherit;-webkit-user-select:none;user-select:none;border:none;justify-content:space-between;align-items:center;font-weight:400;line-height:21.79px;display:flex}.arkynSelectOption.md{padding:8px 16px;font-size:14px}.arkynSelectOption.lg{padding:8px 16px;font-size:16px}.arkynSelectOption svg{width:20px;height:20px;color:rgb(var(--spotlight-primary,17, 109, 220));display:none}.arkynSelectOption:hover{cursor:pointer;filter:brightness(.98)}.arkynSelectOption.active{color:var(--text-heading,#09090b);filter:brightness(.95);font-weight:600}.arkynSelectOption.active svg{display:unset}.arkynSelectOption.highlighted{filter:brightness(.98)}html.dark .arkynSelectOption:hover,html.dark .arkynSelectOption.active,html.dark .arkynSelectOption.highlighted{filter:brightness(1.2)}}
52
52
 
53
53
  @layer arkyn{.arkynSelectOptionsContainer{z-index:7;border:1px solid var(--border,#e2e8f0);background-color:var(--background-foreground,#fff);border-radius:6px;flex-direction:column;flex:1;height:max-content;max-height:300px;list-style:none;display:flex;position:absolute;left:-2px;right:-2px;overflow:auto;box-shadow:0 4px 8px #0000001a}.arkynSelectOptionsContainer.bottom{top:calc(100% + 5px)}.arkynSelectOptionsContainer.top{bottom:calc(100% + 5px)}.arkynSelectOptionsContainer>p{text-align:center;color:var(--text-body,#52525b);padding:16px;font-size:14px;font-weight:400;line-height:21.79px}}
54
54
 
@@ -60,7 +60,7 @@
60
60
 
61
61
  @layer arkyn{.arkynCalendarTableBody{border-collapse:collapse;border-spacing:0}.arkynCalendarTableBody td p{text-align:center;padding:16px;font-size:14px}.arkynCalendarTableBody tr:first-child td{padding-top:8px}}
62
62
 
63
- @layer arkyn{.arkynCalendarTableTd{-webkit-user-select:none;user-select:none;cursor:pointer}.arkynCalendarTableTd p{text-align:center;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;margin:auto;font-size:14px;display:flex}.arkynCalendarTableTd.previous p,.arkynCalendarTableTd.next p{color:var(--text-muted,#a1a1aa)}.arkynCalendarTableTd.current p{color:var(--text-body,#52525b)}.arkynCalendarTableTd:hover p{color:rgb(var(--spotlight-primary,17, 109, 220))}.arkynCalendarTableTd.today:not(.checkedDay) p{color:var(--text-body,#52525b);background-color:var(--background-underground,#fafafa);filter:brightness(.97);font-weight:500}.arkynCalendarTableTd .textGroup{width:40px;height:40px;margin:auto;position:relative}.arkynCalendarTableTd.checkedDay .textGroup span{content:" ";background-color:rgb(var(--spotlight-primary,17, 109, 220));z-index:2;border-radius:8px;position:absolute;inset:0}.arkynCalendarTableTd.checkedDay .textGroup p{color:var(--white,#fff);z-index:3;font-weight:600;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynCalendarTableTd.middleDay .textGroup span{content:" ";background-color:var(--background-underground,#fafafa);filter:brightness(.95);z-index:1;position:absolute;inset:0 -15px}.arkynCalendarTableTd:first-child.middleDay .textGroup span{border-top-left-radius:6px;border-bottom-left-radius:6px;left:0;right:-15px}.arkynCalendarTableTd:last-child.middleDay .textGroup span{border-top-right-radius:6px;border-bottom-right-radius:6px;left:-15px;right:0}.arkynCalendarTableTd.middleDay .textGroup p{color:var(--text-muted,#a1a1aa);z-index:2;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynCalendarTableTd.current.middleDay .textGroup p{color:var(--text-body,#52525b)}}
63
+ @layer arkyn{.arkynCalendarTableTd{-webkit-user-select:none;user-select:none;cursor:pointer}.arkynCalendarTableTd p{text-align:center;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;margin:auto;font-size:14px;display:flex}.arkynCalendarTableTd.previous p,.arkynCalendarTableTd.next p{color:var(--text-muted,#a1a1aa)}.arkynCalendarTableTd.current p{color:var(--text-body,#52525b)}.arkynCalendarTableTd:hover p{color:rgb(var(--spotlight-primary,17, 109, 220))}.arkynCalendarTableTd.today:not(.checkedDay) p{color:var(--text-body,#52525b);background-color:var(--background-underground,#fafafa);filter:brightness(.97);font-weight:500}.arkynCalendarTableTd .textGroup{width:40px;height:40px;font:inherit;cursor:pointer;background-color:#0000;border:none;margin:auto;padding:0;display:block;position:relative}.arkynCalendarTableTd.checkedDay .textGroup span{content:" ";background-color:rgb(var(--spotlight-primary,17, 109, 220));z-index:2;border-radius:8px;position:absolute;inset:0}.arkynCalendarTableTd.checkedDay .textGroup p{color:var(--white,#fff);z-index:3;font-weight:600;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynCalendarTableTd.middleDay .textGroup span{content:" ";background-color:var(--background-underground,#fafafa);filter:brightness(.95);z-index:1;position:absolute;inset:0 -15px}.arkynCalendarTableTd:first-child.middleDay .textGroup span{border-top-left-radius:6px;border-bottom-left-radius:6px;left:0;right:-15px}.arkynCalendarTableTd:last-child.middleDay .textGroup span{border-top-right-radius:6px;border-bottom-right-radius:6px;left:-15px;right:0}.arkynCalendarTableTd.middleDay .textGroup p{color:var(--text-muted,#a1a1aa);z-index:2;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynCalendarTableTd.current.middleDay .textGroup p{color:var(--text-body,#52525b)}}
64
64
 
65
65
  @layer arkyn{.arkynCalendarTableContainer{border-collapse:collapse;border-spacing:0}}
66
66