@fremtind/jokul 0.23.2 → 0.23.4

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 (56) hide show
  1. package/README.md +4 -4
  2. package/build/build-stats.html +1 -1
  3. package/build/cjs/components/datepicker/DatePicker.js +1 -1
  4. package/build/cjs/components/datepicker/DatePicker.js.map +1 -1
  5. package/build/cjs/components/datepicker/internal/useCalendar.js +1 -1
  6. package/build/cjs/components/datepicker/internal/useCalendar.js.map +1 -1
  7. package/build/cjs/components/datepicker/internal/utils.js +1 -1
  8. package/build/cjs/components/datepicker/internal/utils.js.map +1 -1
  9. package/build/es/components/datepicker/DatePicker.js +1 -1
  10. package/build/es/components/datepicker/DatePicker.js.map +1 -1
  11. package/build/es/components/datepicker/internal/useCalendar.js +1 -1
  12. package/build/es/components/datepicker/internal/useCalendar.js.map +1 -1
  13. package/build/es/components/datepicker/internal/utils.js +1 -1
  14. package/build/es/components/datepicker/internal/utils.js.map +1 -1
  15. package/package.json +2 -2
  16. package/src/components/button/styles/button.css +2 -2
  17. package/src/components/button/styles/button.min.css +1 -1
  18. package/src/components/checkbox/styles/checkbox.css +4 -4
  19. package/src/components/checkbox/styles/checkbox.min.css +1 -1
  20. package/src/components/feedback/styles/feedback.css +2 -2
  21. package/src/components/feedback/styles/feedback.min.css +1 -1
  22. package/src/components/input-group/styles/input-group.css +2 -2
  23. package/src/components/input-group/styles/input-group.min.css +1 -1
  24. package/src/components/loader/styles/loader.css +6 -6
  25. package/src/components/loader/styles/loader.min.css +1 -1
  26. package/src/components/loader/styles/skeleton-loader.css +5 -5
  27. package/src/components/loader/styles/skeleton-loader.min.css +1 -1
  28. package/src/components/message/styles/message.css +2 -2
  29. package/src/components/message/styles/message.min.css +1 -1
  30. package/src/components/progress-bar/styles/progress-bar.css +2 -2
  31. package/src/components/progress-bar/styles/progress-bar.min.css +1 -1
  32. package/src/components/radio-button/styles/radio-button.css +2 -2
  33. package/src/components/radio-button/styles/radio-button.min.css +1 -1
  34. package/src/components/system-message/styles/system-message.css +2 -2
  35. package/src/components/system-message/styles/system-message.min.css +1 -1
  36. package/src/components/toast/styles/toast.css +4 -4
  37. package/src/components/toast/styles/toast.min.css +1 -1
  38. package/src/styles/styles.css +33 -33
  39. package/src/styles/styles.min.css +1 -1
  40. /package/src/fonts/{assets/Fremtind-Material-Symbols.woff2 → Fremtind-Material-Symbols.woff2} +0 -0
  41. /package/src/fonts/{assets/FremtindGrotesk-Bold-Web.woff → FremtindGrotesk-Bold-Web.woff} +0 -0
  42. /package/src/fonts/{assets/FremtindGrotesk-Bold-Web.woff2 → FremtindGrotesk-Bold-Web.woff2} +0 -0
  43. /package/src/fonts/{assets/FremtindGrotesk-BoldItalic-Web.woff → FremtindGrotesk-BoldItalic-Web.woff} +0 -0
  44. /package/src/fonts/{assets/FremtindGrotesk-BoldItalic-Web.woff2 → FremtindGrotesk-BoldItalic-Web.woff2} +0 -0
  45. /package/src/fonts/{assets/FremtindGrotesk-Display-Web.woff → FremtindGrotesk-Display-Web.woff} +0 -0
  46. /package/src/fonts/{assets/FremtindGrotesk-Display-Web.woff2 → FremtindGrotesk-Display-Web.woff2} +0 -0
  47. /package/src/fonts/{assets/FremtindGrotesk-Italic-Web.woff → FremtindGrotesk-Italic-Web.woff} +0 -0
  48. /package/src/fonts/{assets/FremtindGrotesk-Italic-Web.woff2 → FremtindGrotesk-Italic-Web.woff2} +0 -0
  49. /package/src/fonts/{assets/FremtindGrotesk-Regular-Web.woff → FremtindGrotesk-Regular-Web.woff} +0 -0
  50. /package/src/fonts/{assets/FremtindGrotesk-Regular-Web.woff2 → FremtindGrotesk-Regular-Web.woff2} +0 -0
  51. /package/src/fonts/{assets/FremtindGroteskMono-Regular-Web.woff → FremtindGroteskMono-Regular-Web.woff} +0 -0
  52. /package/src/fonts/{assets/FremtindGroteskMono-Regular-Web.woff2 → FremtindGroteskMono-Regular-Web.woff2} +0 -0
  53. /package/src/fonts/{_index.scss → styles/_index.scss} +0 -0
  54. /package/src/fonts/{webfonts.css → styles/webfonts.css} +0 -0
  55. /package/src/fonts/{webfonts.min.css → styles/webfonts.min.css} +0 -0
  56. /package/src/fonts/{webfonts.scss → styles/webfonts.scss} +0 -0
@@ -1,2 +1,2 @@
1
- import t from"date-fns/addDays";import e from"date-fns/differenceInCalendarMonths";import n from"date-fns/isBefore";import a from"date-fns/isToday";import s from"date-fns/startOfDay";import{parseDateString as o}from"../utils.js";function r(...t){return e=>t.some((t=>(t&&t(e),e.defaultPrevented)))}function l({calendars:t,offset:n,minDate:a}){if(n>1&&a){const{firstDayOfMonth:s}=t[0],o=e(s,a);o<n&&(n=o)}return n}const i=3;function f(t,e,n,a){if(e&&e.getFullYear()>t)return[e.getFullYear().toString()];if(n&&n.getFullYear()<t)return[n.getFullYear().toString()];let s,o,r=!1;"all"===a?(r=!0,s=3,o=3):(s="number"==typeof a?a:a.previous,o="number"==typeof a?a:a.coming);let l=t-s;if(e){const t=r?e.getFullYear():l;l=Math.max(e.getFullYear(),t)}let i=t+o;if(n){const t=r?n.getFullYear():i;i=Math.min(n.getFullYear(),t)}const f=Math.max(i-l+1,1);return[...Array(f).keys()].map((t=>t+l)).map((t=>t.toString()))}function u(t,e,n,a){const s=(null==n?void 0:n.getFullYear())||t,o=void 0===(null==n?void 0:n.getMonth())?0:n.getMonth(),r=(null==a?void 0:a.getFullYear())||t,l=void 0===(null==a?void 0:a.getMonth())?11:a.getMonth();let i=0,f=11;return s===t&&(i=o),r===t&&(f=l),e.map(((t,e)=>({value:e.toString(),label:t}))).filter((({value:t})=>parseInt(t)>=i&&parseInt(t)<=f))}function c({calendars:t,offset:n,maxDate:a}){if(n>1&&a){const{lastDayOfMonth:s}=t[t.length-1],o=e(a,s);o<n&&(n=o)}return n}function D({calendars:e,minDate:a}){if(!a)return!1;const{firstDayOfMonth:s}=e[0],o=t(s,-1);return!!n(o,a)}function h({calendars:e,maxDate:a}){if(!a)return!1;const{lastDayOfMonth:s}=e[e.length-1],o=t(s,1);return!!n(a,o)}function d({date:t,selected:e,monthsToDisplay:a,offset:o,minDate:r,maxDate:l,firstDayOfWeek:i,showOutsideDays:f}){const u=[],c=function(t,e,a){let o=s(t);if(e){const t=s(e);n(o,t)&&(o=t)}if(a){const t=s(a);n(t,o)&&(o=t)}return o}(t,r,l);for(let t=0;t<a;t++){const n=m({month:c.getMonth()+t+o,year:c.getFullYear(),selectedDates:e,minDate:r,maxDate:l,firstDayOfWeek:i,showOutsideDays:f});u.push(n)}return u}function m({month:e,year:n,selectedDates:s,minDate:o,maxDate:r,firstDayOfWeek:l,showOutsideDays:i}){const f=function(t,e){const n=new Date(e,t,1);return t=n.getMonth(),e=n.getFullYear(),{daysInMonth:32-new Date(e,t,32).getDate(),month:t,year:e}}(e,n),u=f.daysInMonth;e=f.month,n=f.year;const c=[];for(let t=1;t<=u;t++){const l=new Date(n,e,t),i={date:l,selected:g(s,l),selectable:y(o,r,l),today:a(l),prevMonth:!1,nextMonth:!1};c.push(i)}const D=new Date(n,e,1),h=new Date(n,e,u),d=function({firstDayOfMonth:e,minDate:n,maxDate:a,selectedDates:s,firstDayOfWeek:o,showOutsideDays:r}){const l=[];let i=(e.getDay()+7-o)%7;if(r){const o=t(e,-1),r=o.getDate(),f=o.getMonth(),u=o.getFullYear();let c=0;for(;c<i;){const t=new Date(u,f,r-c),e={date:t,selected:g(s,t),selectable:y(n,a,t),today:!1,prevMonth:!0,nextMonth:!1};l.unshift(e),c++}}else for(;i>0;)l.unshift(""),i--;return l}({firstDayOfMonth:D,minDate:o,maxDate:r,selectedDates:s,firstDayOfWeek:l,showOutsideDays:i}),m=function({lastDayOfMonth:e,minDate:n,maxDate:a,selectedDates:s,firstDayOfWeek:o,showOutsideDays:r}){const l=[];let i=(e.getDay()+7-o)%7;if(r){const o=t(e,1),r=o.getMonth(),f=o.getFullYear();let u=0;for(;u<6-i;){const t=new Date(f,r,1+u),e={date:t,selected:g(s,t),selectable:y(n,a,t),today:!1,prevMonth:!1,nextMonth:!0};l.push(e),u++}}else for(;i<6;)l.push(""),i++;return l}({lastDayOfMonth:h,minDate:o,maxDate:r,selectedDates:s,firstDayOfWeek:l,showOutsideDays:i});c.unshift(...d),c.push(...m);const M=function(t){const e=Math.ceil(t.length/7),n=[];for(let a=0;a<e;a++){n[a]=[];for(let e=0;e<7;e++)n[a].push(t[7*a+e])}return n}(c);return{firstDayOfMonth:D,lastDayOfMonth:h,month:e,year:n,weeks:M}}function g(t,e){return!!t&&(t=Array.isArray(t)?t:[t]).some((t=>t instanceof Date&&s(t).getTime()===s(e).getTime()))}function y(t,e,a){return!(t&&n(a,t)||e&&n(e,a))}function M(t,e){return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}function O(t,e){return!t||!M(t,e)}function p(t,e,n){return!!(n&&t>n||e&&t<e)}function w(t,e,n,a){const s=o(t),r=o(e);return s?p(s,n,a)?null:s:r?p(r,n,a)?null:r:null}function F(t,e,n,a){let s=t||e||new Date;return n&&(s=n>s?n:s),a&&(s=a<s?a:s),s}export{i as DEFAULT_YEARS_TO_SHOW,c as addMonth,r as composeEventHandlers,O as dateHasChanged,p as dateIsOutsideRange,d as getCalendars,w as getInitialDate,F as getInitialDateShown,u as getMonthSelectOptions,f as getYearSelectOptions,D as isBackDisabled,h as isForwardDisabled,M as isSameDay,l as subtractMonth};
1
+ import{differenceInCalendarMonths as t,addDays as e,isBefore as n,startOfDay as a,isToday as s}from"date-fns";import{parseDateString as o}from"../utils.js";function r(...t){return e=>t.some((t=>(t&&t(e),e.defaultPrevented)))}function l({calendars:e,offset:n,minDate:a}){if(n>1&&a){const{firstDayOfMonth:s}=e[0],o=t(s,a);o<n&&(n=o)}return n}const i=3;function u(t,e,n,a){if(e&&e.getFullYear()>t)return[e.getFullYear().toString()];if(n&&n.getFullYear()<t)return[n.getFullYear().toString()];let s,o,r=!1;"all"===a?(r=!0,s=3,o=3):(s="number"==typeof a?a:a.previous,o="number"==typeof a?a:a.coming);let l=t-s;if(e){const t=r?e.getFullYear():l;l=Math.max(e.getFullYear(),t)}let i=t+o;if(n){const t=r?n.getFullYear():i;i=Math.min(n.getFullYear(),t)}const u=Math.max(i-l+1,1);return[...Array(u).keys()].map((t=>t+l)).map((t=>t.toString()))}function f(t,e,n,a){const s=(null==n?void 0:n.getFullYear())||t,o=void 0===(null==n?void 0:n.getMonth())?0:n.getMonth(),r=(null==a?void 0:a.getFullYear())||t,l=void 0===(null==a?void 0:a.getMonth())?11:a.getMonth();let i=0,u=11;return s===t&&(i=o),r===t&&(u=l),e.map(((t,e)=>({value:e.toString(),label:t}))).filter((({value:t})=>parseInt(t)>=i&&parseInt(t)<=u))}function c({calendars:e,offset:n,maxDate:a}){if(n>1&&a){const{lastDayOfMonth:s}=e[e.length-1],o=t(a,s);o<n&&(n=o)}return n}function D({calendars:t,minDate:a}){if(!a)return!1;const{firstDayOfMonth:s}=t[0],o=e(s,-1);return!!n(o,a)}function h({calendars:t,maxDate:a}){if(!a)return!1;const{lastDayOfMonth:s}=t[t.length-1],o=e(s,1);return!!n(a,o)}function d({date:t,selected:e,monthsToDisplay:s,offset:o,minDate:r,maxDate:l,firstDayOfWeek:i,showOutsideDays:u}){const f=[],c=function(t,e,s){let o=a(t);if(e){const t=a(e);n(o,t)&&(o=t)}if(s){const t=a(s);n(t,o)&&(o=t)}return o}(t,r,l);for(let t=0;t<s;t++){const n=g({month:c.getMonth()+t+o,year:c.getFullYear(),selectedDates:e,minDate:r,maxDate:l,firstDayOfWeek:i,showOutsideDays:u});f.push(n)}return f}function g({month:t,year:n,selectedDates:a,minDate:o,maxDate:r,firstDayOfWeek:l,showOutsideDays:i}){const u=function(t,e){const n=new Date(e,t,1);return t=n.getMonth(),e=n.getFullYear(),{daysInMonth:32-new Date(e,t,32).getDate(),month:t,year:e}}(t,n),f=u.daysInMonth;t=u.month,n=u.year;const c=[];for(let e=1;e<=f;e++){const l=new Date(n,t,e),i={date:l,selected:y(a,l),selectable:m(o,r,l),today:s(l),prevMonth:!1,nextMonth:!1};c.push(i)}const D=new Date(n,t,1),h=new Date(n,t,f),d=function({firstDayOfMonth:t,minDate:n,maxDate:a,selectedDates:s,firstDayOfWeek:o,showOutsideDays:r}){const l=[];let i=(t.getDay()+7-o)%7;if(r){const o=e(t,-1),r=o.getDate(),u=o.getMonth(),f=o.getFullYear();let c=0;for(;c<i;){const t=new Date(f,u,r-c),e={date:t,selected:y(s,t),selectable:m(n,a,t),today:!1,prevMonth:!0,nextMonth:!1};l.unshift(e),c++}}else for(;i>0;)l.unshift(""),i--;return l}({firstDayOfMonth:D,minDate:o,maxDate:r,selectedDates:a,firstDayOfWeek:l,showOutsideDays:i}),g=function({lastDayOfMonth:t,minDate:n,maxDate:a,selectedDates:s,firstDayOfWeek:o,showOutsideDays:r}){const l=[];let i=(t.getDay()+7-o)%7;if(r){const o=e(t,1),r=o.getMonth(),u=o.getFullYear();let f=0;for(;f<6-i;){const t=new Date(u,r,1+f),e={date:t,selected:y(s,t),selectable:m(n,a,t),today:!1,prevMonth:!1,nextMonth:!0};l.push(e),f++}}else for(;i<6;)l.push(""),i++;return l}({lastDayOfMonth:h,minDate:o,maxDate:r,selectedDates:a,firstDayOfWeek:l,showOutsideDays:i});c.unshift(...d),c.push(...g);const M=function(t){const e=Math.ceil(t.length/7),n=[];for(let a=0;a<e;a++){n[a]=[];for(let e=0;e<7;e++)n[a].push(t[7*a+e])}return n}(c);return{firstDayOfMonth:D,lastDayOfMonth:h,month:t,year:n,weeks:M}}function y(t,e){return!!t&&(t=Array.isArray(t)?t:[t]).some((t=>t instanceof Date&&a(t).getTime()===a(e).getTime()))}function m(t,e,a){return!(t&&n(a,t)||e&&n(e,a))}function M(t,e){return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}function O(t,e){return!t||!M(t,e)}function p(t,e,n){return!!(n&&t>n||e&&t<e)}function w(t,e,n,a){const s=o(t),r=o(e);return s?p(s,n,a)?null:s:r?p(r,n,a)?null:r:null}function F(t,e,n,a){let s=t||e||new Date;return n&&(s=n>s?n:s),a&&(s=a<s?a:s),s}export{i as DEFAULT_YEARS_TO_SHOW,c as addMonth,r as composeEventHandlers,O as dateHasChanged,p as dateIsOutsideRange,d as getCalendars,w as getInitialDate,F as getInitialDateShown,f as getMonthSelectOptions,u as getYearSelectOptions,D as isBackDisabled,h as isForwardDisabled,M as isSameDay,l as subtractMonth};
2
2
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../../../src/components/datepicker/internal/utils.ts"],"sourcesContent":["/***\n * MIT License\n *\n * Copyright (c) 2017 Deseret Digital Media. 2022 Fremtind Forsikring AS.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport addDays from \"date-fns/addDays\";\nimport differenceInCalendarMonths from \"date-fns/differenceInCalendarMonths\";\nimport isBefore from \"date-fns/isBefore\";\nimport isToday from \"date-fns/isToday\";\nimport startOfDay from \"date-fns/startOfDay\";\nimport React from \"react\";\nimport type { ValuePair } from \"../../../utilities\";\nimport type { YearsToShow } from \"../types\";\nimport { parseDateString } from \"../utils\";\n\nexport function composeEventHandlers(...fns: Array<React.MouseEventHandler | undefined>) {\n return (event: React.MouseEvent) =>\n fns.some((fn) => {\n fn && fn(event);\n return event.defaultPrevented;\n });\n}\n\n/**\n * Takes a calendars array and figures out the number of months to subtract\n * based on the current offset and the minDate allowed.\n * @param {Object} param The param object\n * @param {Array} param.calendars The calendars array created by the getCalendars function\n * @param {Number} param.offset The num of months to be subtracted\n * @param {Date} param.minDate The earliest date we are allow to subtract back to\n * @returns {Number} The number of months to subtract\n */\nexport function subtractMonth({\n calendars,\n offset,\n minDate,\n}: {\n calendars: CalendarMonth[];\n offset: number;\n minDate?: Date;\n}): number {\n if (offset > 1 && minDate) {\n const { firstDayOfMonth } = calendars[0];\n const diffInMonths = differenceInCalendarMonths(firstDayOfMonth, minDate);\n if (diffInMonths < offset) {\n offset = diffInMonths;\n }\n }\n return offset;\n}\n\nexport const DEFAULT_YEARS_TO_SHOW = 3;\n\n/**\n * Generates an array of year strings for a year selector component, with min and max dates taken into account.\n *\n * @param {number} currentYear - The current year to center the list around\n * @param {Date | undefined} [minDate] - The minimum date to include in the list of years\n * @param {Date | undefined} [maxDate] - The maximum date to include in the list of years\n *\n * @returns {string[]} - An array of year strings, starting from the earliest year specified by minDate or currentYear - 3, and ending at the latest year specified by maxDate or currentYear + 3\n */\nexport function getYearSelectOptions(\n currentYear: number,\n minDate: Date | undefined,\n maxDate: Date | undefined,\n yearsToShow: YearsToShow,\n): string[] {\n if (minDate && minDate.getFullYear() > currentYear) {\n return [minDate.getFullYear().toString()];\n }\n\n if (maxDate && maxDate.getFullYear() < currentYear) {\n return [maxDate.getFullYear().toString()];\n }\n\n let showAllYears = false;\n let previousYearsToShow: number;\n let comingYearsToShow: number;\n\n if (yearsToShow === \"all\") {\n showAllYears = true;\n previousYearsToShow = DEFAULT_YEARS_TO_SHOW;\n comingYearsToShow = DEFAULT_YEARS_TO_SHOW;\n } else {\n previousYearsToShow = typeof yearsToShow === \"number\" ? yearsToShow : yearsToShow.previous;\n comingYearsToShow = typeof yearsToShow === \"number\" ? yearsToShow : yearsToShow.coming;\n }\n\n let startYear = currentYear - previousYearsToShow;\n if (minDate) {\n const earliestStartYear = showAllYears ? minDate.getFullYear() : startYear;\n startYear = Math.max(minDate.getFullYear(), earliestStartYear);\n }\n\n let endYear = currentYear + comingYearsToShow;\n if (maxDate) {\n const latestEndYear = showAllYears ? maxDate.getFullYear() : endYear;\n endYear = Math.min(maxDate.getFullYear(), latestEndYear);\n }\n\n // Sørg for å alltid vise minst ett år\n const numYears = Math.max(endYear - startYear + 1, 1);\n\n const range = [...Array(numYears).keys()].map((x) => x + startYear);\n const stringRange = range.map((item) => item.toString());\n\n return stringRange;\n}\n\n/**\n * Returns an array of months that are allowed for selection in the current year based on the minimum and maximum dates.\n * @param {number} currentYear The current year\n * @param {string[]} monthNames An array of strings representing the month names\n * @param {Date | undefined} minDate The minimum date that is allowed for selection\n * @param {Date | undefined} maxDate The maximum date that is allowed for selection\n * @returns {ValuePair[]} An array of ValuePairs representing the months that are allowed for selection in the current year\n */\nexport function getMonthSelectOptions(\n currentYear: number,\n monthNames: string[],\n minDate: Date | undefined,\n maxDate: Date | undefined,\n): ValuePair[] {\n const minDateYear = minDate?.getFullYear() || currentYear;\n const minDateMonth = minDate?.getMonth() === undefined ? 0 : minDate.getMonth();\n const maxDateYear = maxDate?.getFullYear() || currentYear;\n const maxDateMonth = maxDate?.getMonth() === undefined ? 11 : maxDate.getMonth();\n\n let startMonth = 0;\n let endMonth = 11;\n\n if (minDateYear === currentYear) {\n startMonth = minDateMonth;\n }\n if (maxDateYear === currentYear) {\n endMonth = maxDateMonth;\n }\n\n const filteredMonths = monthNames\n .map((month, index) => ({\n value: index.toString(),\n label: month,\n }))\n .filter(({ value }) => parseInt(value) >= startMonth && parseInt(value) <= endMonth);\n\n return filteredMonths;\n}\n\n/**s\n * Takes a calendars array and figures out the number of months to add\n * based on the current offset and the maxDate allowed.\n * @param {Object} param The param object\n * @param {Array} param.calendars The calendars array created by the getCalendars function\n * @param {Number} param.offset The num of months to be added\n * @param {Date} param.maxDate The furthest date we are allow to add forward to\n * @returns {Number} The number of months to add\n */\nexport function addMonth({\n calendars,\n offset,\n maxDate,\n}: {\n calendars: CalendarMonth[];\n offset: number;\n maxDate?: Date;\n}): number {\n if (offset > 1 && maxDate) {\n const { lastDayOfMonth } = calendars[calendars.length - 1];\n const diffInMonths = differenceInCalendarMonths(maxDate, lastDayOfMonth);\n if (diffInMonths < offset) {\n offset = diffInMonths;\n }\n }\n return offset;\n}\n\n/**\n * Takes a calendars array and figures out if the back button should be\n * disabled based on the minDate allowed.\n * @param {Object} param The param object\n * @param {Array} param.calendars The calendars array created by the getCalendars function\n * @param {Date} param.minDate The earliest date available\n * @returns {Boolean} Whether the back button should be disabled.\n */\nexport function isBackDisabled({ calendars, minDate }: { calendars: CalendarMonth[]; minDate?: Date }): boolean {\n if (!minDate) {\n return false;\n }\n const { firstDayOfMonth } = calendars[0];\n const firstDayOfMonthMinusOne = addDays(firstDayOfMonth, -1);\n if (isBefore(firstDayOfMonthMinusOne, minDate)) {\n return true;\n }\n return false;\n}\n\n/**\n * Takes a calendars array and figures out if the forward button should be\n * disabled based on the maxDate allowed.\n * @param {Object} param The param object\n * @param {Array} param.calendars The calendars array created by the getCalendars function\n * @param {Date} param.maxDate The furthest date available\n * @returns {Boolean} Whether the forward button should be disabled.\n */\nexport function isForwardDisabled({ calendars, maxDate }: { calendars: CalendarMonth[]; maxDate?: Date }): boolean {\n if (!maxDate) {\n return false;\n }\n const { lastDayOfMonth } = calendars[calendars.length - 1];\n const lastDayOfMonthPlusOne = addDays(lastDayOfMonth, 1);\n if (isBefore(maxDate, lastDayOfMonthPlusOne)) {\n return true;\n }\n return false;\n}\n\ntype GetCalendarProps = {\n /** The date to start the calendar at */\n date: Date;\n /** Date or dates currently selected. */\n selected?: Date | Date[];\n /** The earliest date available */\n minDate?: Date;\n /** The earliest date available */\n maxDate?: Date;\n /** The number of months to return in the calendar view */\n monthsToDisplay: number;\n /** The number of months to offset based off the param.date given */\n offset: number;\n /** First day of week, 0-6 (Sunday to Saturday) */\n firstDayOfWeek: number;\n /** Flag to fill front and back weeks with dates from adjacent months */\n showOutsideDays: boolean;\n};\n\n/**\n * Figures out the months data needed based off the number of monthsToDisplay\n * and other options provided.\n * @param {Object} param The param object\n * @param {Date} param.date The date to start the calendar at\n * @param {Array.<Date>} param.selected An array of dates currently selected\n * @param {Number} param.monthsToDisplay The number of months to return in the calendar view\n * @param {Number} param.offset The number of months to offset based off the param.date given\n * @param {Date} param.minDate The earliest date available\n * @param {Date} param.maxDate The furthest date available\n * @param {Number} param.firstDayOfWeek First day of week, 0-6 (Sunday to Saturday)\n * @param {Bool} param.showOutsideDays Flag to fill front and back weeks with dates from adjacent months\n * @returns {Array.<Object>} An array of objects with month data\n */\nexport function getCalendars({\n date,\n selected,\n monthsToDisplay,\n offset,\n minDate,\n maxDate,\n firstDayOfWeek,\n showOutsideDays,\n}: GetCalendarProps): CalendarMonth[] {\n const months: CalendarMonth[] = [];\n const startDate = getStartDate(date, minDate, maxDate);\n for (let i = 0; i < monthsToDisplay; i++) {\n const calendarDates = getMonths({\n month: startDate.getMonth() + i + offset,\n year: startDate.getFullYear(),\n selectedDates: selected,\n minDate,\n maxDate,\n firstDayOfWeek,\n showOutsideDays,\n });\n months.push(calendarDates);\n }\n return months;\n}\n\n/**\n * Figures out the actual start date based on\n * the min and max dates available.\n * @param {Date} date The we want to start the calendar at\n * @param {Date} minDate The earliest date available to start at\n * @param {Date} maxDate The latest date available to start at\n * @returns {Date} The actual start date\n */\nfunction getStartDate(date: Date, minDate?: Date, maxDate?: Date): Date {\n let startDate = startOfDay(date);\n if (minDate) {\n const minDateNormalized = startOfDay(minDate);\n if (isBefore(startDate, minDateNormalized)) {\n startDate = minDateNormalized;\n }\n }\n if (maxDate) {\n const maxDateNormalized = startOfDay(maxDate);\n if (isBefore(maxDateNormalized, startDate)) {\n startDate = maxDateNormalized;\n }\n }\n return startDate;\n}\n\ntype GetMonthsProps = {\n /** The month to grab data for */\n month: number;\n /** The year to grab data for */\n year: number;\n /** Date or dates currently selected. */\n selectedDates?: Date | Date[];\n /** The earliest date available */\n minDate?: Date;\n /** The earliest date available */\n maxDate?: Date;\n /** First day of week, 0-6 (Sunday to Saturday) */\n firstDayOfWeek: number;\n /** Flag to fill front and back weeks with dates from adjacent months */\n showOutsideDays: boolean;\n};\n\nexport type CalendarMonth = {\n firstDayOfMonth: Date;\n lastDayOfMonth: Date;\n month: number;\n year: number;\n weeks: CalendarWeek[];\n};\n\nexport type CalendarWeek = CalendarDay[];\n\nexport type CalendarDay = DateInfo | string;\n\n/**\n * Figures what week/day data to return for the given month\n * and year. Adds flags to day data if found in the given selectedDates,\n * if is selectable inside the given min and max dates, or is today.\n * @param {Object} param The param object\n * @param {Number} param.month The month to grab data for\n * @param {Number} param.year The year to grab data for\n * @param {Array.<Date>} sparam.electedDates An array of dates currently selected\n * @param {Date} param.minDate The earliest date available\n * @param {Date} param.maxDate The furthest date available\n * @param {Number} param.firstDayOfWeek First day of week, 0-6 (Sunday to Saturday)\n * @param {Bool} param.showOutsideDays Flag to fill front and back weeks with dates from adjacent months\n * @returns {Object} The data for the selected month/year\n */\nfunction getMonths({\n month,\n year,\n selectedDates,\n minDate,\n maxDate,\n firstDayOfWeek,\n showOutsideDays,\n}: GetMonthsProps): CalendarMonth {\n // Get the normalized month and year, along with days in the month.\n const daysMonthYear = getNumDaysMonthYear(month, year);\n const daysInMonth = daysMonthYear.daysInMonth;\n month = daysMonthYear.month;\n year = daysMonthYear.year;\n\n // Fill out the dates for the month.\n const dates = [];\n for (let day = 1; day <= daysInMonth; day++) {\n const date = new Date(year, month, day);\n const dateObj = {\n date,\n selected: isSelected(selectedDates, date),\n selectable: isSelectable(minDate, maxDate, date),\n today: isToday(date),\n prevMonth: false,\n nextMonth: false,\n };\n dates.push(dateObj);\n }\n\n const firstDayOfMonth = new Date(year, month, 1);\n const lastDayOfMonth = new Date(year, month, daysInMonth);\n\n const frontWeekBuffer = fillFrontWeek({\n firstDayOfMonth,\n minDate,\n maxDate,\n selectedDates,\n firstDayOfWeek,\n showOutsideDays,\n });\n\n const backWeekBuffer = fillBackWeek({\n lastDayOfMonth,\n minDate,\n maxDate,\n selectedDates,\n firstDayOfWeek,\n showOutsideDays,\n });\n\n dates.unshift(...frontWeekBuffer);\n dates.push(...backWeekBuffer);\n\n // Get the filled out weeks for the\n // given dates.\n const weeks = getWeeks(dates);\n // return the calendar data.\n return {\n firstDayOfMonth,\n lastDayOfMonth,\n month,\n year,\n weeks,\n };\n}\n\ntype FillFrontWeekProps = {\n firstDayOfMonth: Date;\n /** Date or dates currently selected. */\n selectedDates?: Date | Date[];\n /** The earliest date available */\n minDate?: Date;\n /** The earliest date available */\n maxDate?: Date;\n /** First day of week, 0-6 (Sunday to Saturday) */\n firstDayOfWeek: number;\n /** Flag to fill front and back weeks with dates from adjacent months */\n showOutsideDays: boolean;\n};\n\n/**\n * Fill front week with either empty buffer or dates from previous month,\n * depending on showOutsideDays flag\n * @param {Object} param The param object\n * @param {Array.<Date>} param.selectedDates An array of dates currently selected\n * @param {Date} param.minDate The earliest date available\n * @param {Date} param.maxDate The furthest date available\n * @param {Date} param.firstDayOfMonth First day of the month\n * @param {Number} param.firstDayOfWeek First day of week, 0-6 (Sunday to Saturday)\n * @param {Bool} param.showOutsideDays Flag to fill front and back weeks with dates from adjacent months\n * @returns {Array.<Date>} Buffer to fill front week\n */\nfunction fillFrontWeek({\n firstDayOfMonth,\n minDate,\n maxDate,\n selectedDates,\n firstDayOfWeek,\n showOutsideDays,\n}: FillFrontWeekProps): CalendarWeek {\n const dates: CalendarWeek = [];\n let firstDay = (firstDayOfMonth.getDay() + 7 - firstDayOfWeek) % 7;\n\n if (showOutsideDays) {\n const lastDayOfPrevMonth = addDays(firstDayOfMonth, -1);\n const prevDate = lastDayOfPrevMonth.getDate();\n const prevDateMonth = lastDayOfPrevMonth.getMonth();\n const prevDateYear = lastDayOfPrevMonth.getFullYear();\n\n // Fill out front week for days from\n // preceding month with dates from previous month.\n let counter = 0;\n while (counter < firstDay) {\n const date = new Date(prevDateYear, prevDateMonth, prevDate - counter);\n const dateObj: DateInfo = {\n date,\n selected: isSelected(selectedDates, date),\n selectable: isSelectable(minDate, maxDate, date),\n today: false,\n prevMonth: true,\n nextMonth: false,\n };\n dates.unshift(dateObj);\n counter++;\n }\n } else {\n // Fill out front week for days from\n // preceding month with buffer.\n while (firstDay > 0) {\n dates.unshift(\"\");\n firstDay--;\n }\n }\n\n return dates;\n}\n\nexport type DateInfo = {\n date: Date;\n selected: boolean;\n selectable: boolean;\n today: boolean;\n prevMonth: boolean;\n nextMonth: boolean;\n};\n\ntype FillBackWeekProps = {\n lastDayOfMonth: Date;\n /** Date or dates currently selected. */\n selectedDates?: Date | Date[];\n /** The earliest date available */\n minDate?: Date;\n /** The earliest date available */\n maxDate?: Date;\n /** First day of week, 0-6 (Sunday to Saturday) */\n firstDayOfWeek: number;\n /** Flag to fill front and back weeks with dates from adjacent months */\n showOutsideDays: boolean;\n};\n\n/**\n * Fill back weeks with either empty buffer or dates from next month,\n * depending on showOutsideDays flag\n * @param {Object} param The param object\n * @param {Array.<Date>} param.selectedDates An array of dates currently selected\n * @param {Date} param.minDate The earliest date available\n * @param {Date} param.maxDate The furthest date available\n * @param {Date} param.lastDayOfMonth Last day of the month\n * @param {Number} param.firstDayOfWeek First day of week, 0-6 (Sunday to Saturday)\n * @param {Bool} param.showOutsideDays Flag to fill front and back weeks with dates from adjacent months\n * @returns {Array.<Date>} Buffer to fill back week\n */\nfunction fillBackWeek({\n lastDayOfMonth,\n minDate,\n maxDate,\n selectedDates,\n firstDayOfWeek,\n showOutsideDays,\n}: FillBackWeekProps): CalendarWeek {\n const dates: CalendarWeek = [];\n let lastDay = (lastDayOfMonth.getDay() + 7 - firstDayOfWeek) % 7;\n\n if (showOutsideDays) {\n const firstDayOfNextMonth = addDays(lastDayOfMonth, 1);\n const nextDateMonth = firstDayOfNextMonth.getMonth();\n const nextDateYear = firstDayOfNextMonth.getFullYear();\n\n // Fill out back week for days from\n // following month with dates from next month.\n let counter = 0;\n while (counter < 6 - lastDay) {\n const date = new Date(nextDateYear, nextDateMonth, 1 + counter);\n const dateObj: DateInfo = {\n date,\n selected: isSelected(selectedDates, date),\n selectable: isSelectable(minDate, maxDate, date),\n today: false,\n prevMonth: false,\n nextMonth: true,\n };\n dates.push(dateObj);\n counter++;\n }\n } else {\n // Fill out back week for days from\n // following month with buffer.\n while (lastDay < 6) {\n dates.push(\"\");\n lastDay++;\n }\n }\n\n return dates;\n}\n\n/**\n * Normalizes month (could be overflow) and year pairs and returns the\n * normalized month and year along with the number of days in the month.\n * @param {Number} month The month to normalize\n * @param {Number} year The year to normalize\n * @returns {Object} The normalized month and year along with the number of days in the month\n */\nfunction getNumDaysMonthYear(month: number, year: number): { daysInMonth: number; month: number; year: number } {\n // If a parameter you specify is outside of the expected range for Month or Day,\n // JS Date attempts to update the date information in the Date object accordingly!\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMonth\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setDate\n\n // Let Date handle the overflow of the month,\n // which should return the normalized month and year.\n const normalizedMonthYear = new Date(year, month, 1);\n month = normalizedMonthYear.getMonth();\n year = normalizedMonthYear.getFullYear();\n // Overflow the date to the next month, then subtract the difference\n // to get the number of days in the previous month.\n // This will also account for leap years!\n const daysInMonth = 32 - new Date(year, month, 32).getDate();\n return { daysInMonth, month, year };\n}\n\n/**\n * Takes an array of dates, and turns them into a multi dimensional\n * array with 7 entries for each week.\n * @param {Array.<Object>} dates An array of dates\n * @returns {Array} The weeks as a multi dimensional array\n */\nfunction getWeeks(dates: CalendarWeek): Array<CalendarWeek> {\n const weeksLength = Math.ceil(dates.length / 7);\n const weeks: Array<CalendarWeek> = [];\n for (let i = 0; i < weeksLength; i++) {\n weeks[i] = [];\n for (let x = 0; x < 7; x++) {\n weeks[i].push(dates[i * 7 + x]);\n }\n }\n return weeks;\n}\n\n/**\n * Normalizes dates to the beginning of the day,\n * then checks to see if the day given is found\n * in the selectedDates.\n * @param {Array.<Date>} selectedDates An array of dates currently selected\n * @param {Date} date The date to search with against selectedDates\n * @returns {Boolean} Whether day is found in selectedDates\n */\nfunction isSelected(selectedDates: Date | Date[] | undefined, date: Date): boolean {\n if (!selectedDates) {\n return false;\n }\n selectedDates = Array.isArray(selectedDates) ? selectedDates : [selectedDates];\n return selectedDates.some((selectedDate) => {\n if (selectedDate instanceof Date && startOfDay(selectedDate).getTime() === startOfDay(date).getTime()) {\n return true;\n }\n return false;\n });\n}\n\n/**\n * Checks to see if the date given is\n * between the min and max dates.\n * @param {Date} minDate The earliest date available\n * @param {Date} maxDate The furthest date available\n * @param {Date} date The date to compare with\n * @returns {Boolean} Whether the date is between min and max date\n */\nfunction isSelectable(minDate: Date | undefined, maxDate: Date | undefined, date: Date): boolean {\n if ((minDate && isBefore(date, minDate)) || (maxDate && isBefore(maxDate, date))) {\n return false;\n }\n return true;\n}\n\n/**\n * Check if two Date objects represent the same day\n *\n * @param date1 first Date to compare\n * @param date2 second Date to compare\n */\nexport function isSameDay(date1: Date, date2: Date): boolean {\n return (\n date1.getDate() === date2.getDate() &&\n date1.getMonth() === date2.getMonth() &&\n date1.getFullYear() === date2.getFullYear()\n );\n}\n\n/**\n * Check if the date has changed from the previous date\n *\n * @param date First date to compare\n * @param newDate Second date to compare\n */\nexport function dateHasChanged(date: Date | undefined, newDate: Date): boolean {\n return !date || !isSameDay(date, newDate);\n}\n\n/**\n * Check if a given date is outside a given range\n *\n * @param date Input date\n * @param rangeStart Dates before this date should be disabled\n * @param rangeEnd Dates after this date should be disabled\n */\nexport function dateIsOutsideRange(date: Date, rangeStart: Date | undefined, rangeEnd: Date | undefined): boolean {\n return Boolean((rangeEnd && date > rangeEnd) || (rangeStart && date < rangeStart));\n}\n\n/**\n * Get the correct initial date for initiating the datepicker reducer store\n *\n * @param value Value from props\n * @param initialDate Initial date from porps\n * @param disableDate Function for checking whether the date should be disabled\n */\nexport function getInitialDate(\n value: string | undefined,\n defaultValue: string | undefined,\n minDate: Date | undefined,\n maxDate: Date | undefined,\n): Date | null {\n const valueAsDate = parseDateString(value);\n const defaultValueAsDate = parseDateString(defaultValue);\n if (valueAsDate) {\n return !dateIsOutsideRange(valueAsDate, minDate, maxDate) ? valueAsDate : null;\n }\n if (defaultValueAsDate) {\n return !dateIsOutsideRange(defaultValueAsDate, minDate, maxDate) ? defaultValueAsDate : null;\n }\n return null;\n}\n\n/**\n * Get the initial date to show in the calendar\n *\n * @param date The date set in the DatePicker (from props)\n * @param defaultSelected The defaultSelected prop from DatePicker\n * @param minDate The earliest selectable date, from props\n * @param maxDate The latest selectable date, from props\n * @returns The date to show in the calendar\n */\nexport function getInitialDateShown(\n date: Date | null,\n defaultSelected: Date | undefined,\n minDate: Date | undefined,\n maxDate: Date | undefined,\n): Date {\n let initialDate = date || defaultSelected || new Date();\n\n if (minDate) {\n initialDate = minDate > initialDate ? minDate : initialDate;\n }\n\n if (maxDate) {\n initialDate = maxDate < initialDate ? maxDate : initialDate;\n }\n\n return initialDate;\n}\n"],"names":["composeEventHandlers","fns","event","some","fn","defaultPrevented","subtractMonth","calendars","offset","minDate","firstDayOfMonth","diffInMonths","differenceInCalendarMonths","DEFAULT_YEARS_TO_SHOW","getYearSelectOptions","currentYear","maxDate","yearsToShow","getFullYear","toString","showAllYears","previousYearsToShow","comingYearsToShow","previous","coming","startYear","earliestStartYear","Math","max","endYear","latestEndYear","min","numYears","Array","keys","map","x","item","getMonthSelectOptions","monthNames","minDateYear","minDateMonth","getMonth","maxDateYear","maxDateMonth","startMonth","endMonth","month","index","value","label","filter","parseInt","addMonth","lastDayOfMonth","length","isBackDisabled","firstDayOfMonthMinusOne","addDays","isBefore","isForwardDisabled","lastDayOfMonthPlusOne","getCalendars","date","selected","monthsToDisplay","firstDayOfWeek","showOutsideDays","months","startDate","startOfDay","minDateNormalized","maxDateNormalized","getStartDate","i","calendarDates","getMonths","year","selectedDates","push","daysMonthYear","normalizedMonthYear","Date","daysInMonth","getDate","getNumDaysMonthYear","dates","day","dateObj","isSelected","selectable","isSelectable","today","isToday","prevMonth","nextMonth","frontWeekBuffer","firstDay","getDay","lastDayOfPrevMonth","prevDate","prevDateMonth","prevDateYear","counter","unshift","fillFrontWeek","backWeekBuffer","lastDay","firstDayOfNextMonth","nextDateMonth","nextDateYear","fillBackWeek","weeks","weeksLength","ceil","getWeeks","isArray","selectedDate","getTime","isSameDay","date1","date2","dateHasChanged","newDate","dateIsOutsideRange","rangeStart","rangeEnd","getInitialDate","defaultValue","valueAsDate","parseDateString","defaultValueAsDate","getInitialDateShown","defaultSelected","initialDate"],"mappings":"qOAkCO,SAASA,KAAwBC,GAC7B,OAACC,GACJD,EAAIE,MAAMC,IACNA,GAAMA,EAAGF,GACFA,EAAMG,mBAEzB,CAWO,SAASC,GACZC,UAAAA,EACAC,OAAAA,EACAC,QAAAA,IAMID,GAAAA,EAAS,GAAKC,EAAS,CACjB,MAAEC,gBAAAA,GAAoBH,EAAU,GAChCI,EAAeC,EAA2BF,EAAiBD,GAC7DE,EAAeH,IACNA,EAAAG,EAEjB,CACOH,OAAAA,CACX,CAEO,MAAMK,EAAwB,EAW9B,SAASC,EACZC,EACAN,EACAO,EACAC,GAEIR,GAAAA,GAAWA,EAAQS,cAAgBH,EACnC,MAAO,CAACN,EAAQS,cAAcC,YAG9BH,GAAAA,GAAWA,EAAQE,cAAgBH,EACnC,MAAO,CAACC,EAAQE,cAAcC,YAG9BC,IACAC,EACAC,EAFAF,GAAe,EAIC,QAAhBH,GACeG,GAAA,EACOC,EA/BO,EAgCTC,EAhCS,IAkC7BD,EAA6C,iBAAhBJ,EAA2BA,EAAcA,EAAYM,SAClFD,EAA2C,iBAAhBL,EAA2BA,EAAcA,EA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,GAGhDtH,IACcsH,EAAAtH,EAAUsH,EAActH,EAAUsH,GAG7CA,CACX"}
1
+ {"version":3,"file":"utils.js","sources":["../../../../../src/components/datepicker/internal/utils.ts"],"sourcesContent":["/***\n * MIT License\n *\n * Copyright (c) 2017 Deseret Digital Media. 2022 Fremtind Forsikring AS.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { addDays, differenceInCalendarMonths, isBefore, isToday, startOfDay } from \"date-fns\";\nimport React from \"react\";\nimport type { ValuePair } from \"../../../utilities\";\nimport type { YearsToShow } from \"../types\";\nimport { parseDateString } from \"../utils\";\n\nexport function composeEventHandlers(...fns: Array<React.MouseEventHandler | undefined>) {\n return (event: React.MouseEvent) =>\n fns.some((fn) => {\n fn && fn(event);\n return event.defaultPrevented;\n });\n}\n\n/**\n * Takes a calendars array and figures out the number of months to subtract\n * based on the current offset and the minDate allowed.\n * @param {Object} param The param object\n * @param {Array} param.calendars The calendars array created by the getCalendars function\n * @param {Number} param.offset The num of months to be subtracted\n * @param {Date} param.minDate The earliest date we are allow to subtract back to\n * @returns {Number} The number of months to subtract\n */\nexport function subtractMonth({\n calendars,\n offset,\n minDate,\n}: {\n calendars: CalendarMonth[];\n offset: number;\n minDate?: Date;\n}): number {\n if (offset > 1 && minDate) {\n const { firstDayOfMonth } = calendars[0];\n const diffInMonths = differenceInCalendarMonths(firstDayOfMonth, minDate);\n if (diffInMonths < offset) {\n offset = diffInMonths;\n }\n }\n return offset;\n}\n\nexport const DEFAULT_YEARS_TO_SHOW = 3;\n\n/**\n * Generates an array of year strings for a year selector component, with min and max dates taken into account.\n *\n * @param {number} currentYear - The current year to center the list around\n * @param {Date | undefined} [minDate] - The minimum date to include in the list of years\n * @param {Date | undefined} [maxDate] - The maximum date to include in the list of years\n *\n * @returns {string[]} - An array of year strings, starting from the earliest year specified by minDate or currentYear - 3, and ending at the latest year specified by maxDate or currentYear + 3\n */\nexport function getYearSelectOptions(\n currentYear: number,\n minDate: Date | undefined,\n maxDate: Date | undefined,\n yearsToShow: YearsToShow,\n): string[] {\n if (minDate && minDate.getFullYear() > currentYear) {\n return [minDate.getFullYear().toString()];\n }\n\n if (maxDate && maxDate.getFullYear() < currentYear) {\n return [maxDate.getFullYear().toString()];\n }\n\n let showAllYears = false;\n let previousYearsToShow: number;\n let comingYearsToShow: number;\n\n if (yearsToShow === \"all\") {\n showAllYears = true;\n previousYearsToShow = DEFAULT_YEARS_TO_SHOW;\n comingYearsToShow = DEFAULT_YEARS_TO_SHOW;\n } else {\n previousYearsToShow = typeof yearsToShow === \"number\" ? yearsToShow : yearsToShow.previous;\n comingYearsToShow = typeof yearsToShow === \"number\" ? yearsToShow : yearsToShow.coming;\n }\n\n let startYear = currentYear - previousYearsToShow;\n if (minDate) {\n const earliestStartYear = showAllYears ? minDate.getFullYear() : startYear;\n startYear = Math.max(minDate.getFullYear(), earliestStartYear);\n }\n\n let endYear = currentYear + comingYearsToShow;\n if (maxDate) {\n const latestEndYear = showAllYears ? maxDate.getFullYear() : endYear;\n endYear = Math.min(maxDate.getFullYear(), latestEndYear);\n }\n\n // Sørg for å alltid vise minst ett år\n const numYears = Math.max(endYear - startYear + 1, 1);\n\n const range = [...Array(numYears).keys()].map((x) => x + startYear);\n const stringRange = range.map((item) => item.toString());\n\n return stringRange;\n}\n\n/**\n * Returns an array of months that are allowed for selection in the current year based on the minimum and maximum dates.\n * @param {number} currentYear The current year\n * @param {string[]} monthNames An array of strings representing the month names\n * @param {Date | undefined} minDate The minimum date that is allowed for selection\n * @param {Date | undefined} maxDate The maximum date that is allowed for selection\n * @returns {ValuePair[]} An array of ValuePairs representing the months that are allowed for selection in the current year\n */\nexport function getMonthSelectOptions(\n currentYear: number,\n monthNames: string[],\n minDate: Date | undefined,\n maxDate: Date | undefined,\n): ValuePair[] {\n const minDateYear = minDate?.getFullYear() || currentYear;\n const minDateMonth = minDate?.getMonth() === undefined ? 0 : minDate.getMonth();\n const maxDateYear = maxDate?.getFullYear() || currentYear;\n const maxDateMonth = maxDate?.getMonth() === undefined ? 11 : maxDate.getMonth();\n\n let startMonth = 0;\n let endMonth = 11;\n\n if (minDateYear === currentYear) {\n startMonth = minDateMonth;\n }\n if (maxDateYear === currentYear) {\n endMonth = maxDateMonth;\n }\n\n const filteredMonths = monthNames\n .map((month, index) => ({\n value: index.toString(),\n label: month,\n }))\n .filter(({ value }) => parseInt(value) >= startMonth && parseInt(value) <= endMonth);\n\n return filteredMonths;\n}\n\n/**s\n * Takes a calendars array and figures out the number of months to add\n * based on the current offset and the maxDate allowed.\n * @param {Object} param The param object\n * @param {Array} param.calendars The calendars array created by the getCalendars function\n * @param {Number} param.offset The num of months to be added\n * @param {Date} param.maxDate The furthest date we are allow to add forward to\n * @returns {Number} The number of months to add\n */\nexport function addMonth({\n calendars,\n offset,\n maxDate,\n}: {\n calendars: CalendarMonth[];\n offset: number;\n maxDate?: Date;\n}): number {\n if (offset > 1 && maxDate) {\n const { lastDayOfMonth } = calendars[calendars.length - 1];\n const diffInMonths = differenceInCalendarMonths(maxDate, lastDayOfMonth);\n if (diffInMonths < offset) {\n offset = diffInMonths;\n }\n }\n return offset;\n}\n\n/**\n * Takes a calendars array and figures out if the back button should be\n * disabled based on the minDate allowed.\n * @param {Object} param The param object\n * @param {Array} param.calendars The calendars array created by the getCalendars function\n * @param {Date} param.minDate The earliest date available\n * @returns {Boolean} Whether the back button should be disabled.\n */\nexport function isBackDisabled({ calendars, minDate }: { calendars: CalendarMonth[]; minDate?: Date }): boolean {\n if (!minDate) {\n return false;\n }\n const { firstDayOfMonth } = calendars[0];\n const firstDayOfMonthMinusOne = addDays(firstDayOfMonth, -1);\n if (isBefore(firstDayOfMonthMinusOne, minDate)) {\n return true;\n }\n return false;\n}\n\n/**\n * Takes a calendars array and figures out if the forward button should be\n * disabled based on the maxDate allowed.\n * @param {Object} param The param object\n * @param {Array} param.calendars The calendars array created by the getCalendars function\n * @param {Date} param.maxDate The furthest date available\n * @returns {Boolean} Whether the forward button should be disabled.\n */\nexport function isForwardDisabled({ calendars, maxDate }: { calendars: CalendarMonth[]; maxDate?: Date }): boolean {\n if (!maxDate) {\n return false;\n }\n const { lastDayOfMonth } = calendars[calendars.length - 1];\n const lastDayOfMonthPlusOne = addDays(lastDayOfMonth, 1);\n if (isBefore(maxDate, lastDayOfMonthPlusOne)) {\n return true;\n }\n return false;\n}\n\ntype GetCalendarProps = {\n /** The date to start the calendar at */\n date: Date;\n /** Date or dates currently selected. */\n selected?: Date | Date[];\n /** The earliest date available */\n minDate?: Date;\n /** The earliest date available */\n maxDate?: Date;\n /** The number of months to return in the calendar view */\n monthsToDisplay: number;\n /** The number of months to offset based off the param.date given */\n offset: number;\n /** First day of week, 0-6 (Sunday to Saturday) */\n firstDayOfWeek: number;\n /** Flag to fill front and back weeks with dates from adjacent months */\n showOutsideDays: boolean;\n};\n\n/**\n * Figures out the months data needed based off the number of monthsToDisplay\n * and other options provided.\n * @param {Object} param The param object\n * @param {Date} param.date The date to start the calendar at\n * @param {Array.<Date>} param.selected An array of dates currently selected\n * @param {Number} param.monthsToDisplay The number of months to return in the calendar view\n * @param {Number} param.offset The number of months to offset based off the param.date given\n * @param {Date} param.minDate The earliest date available\n * @param {Date} param.maxDate The furthest date available\n * @param {Number} param.firstDayOfWeek First day of week, 0-6 (Sunday to Saturday)\n * @param {Bool} param.showOutsideDays Flag to fill front and back weeks with dates from adjacent months\n * @returns {Array.<Object>} An array of objects with month data\n */\nexport function getCalendars({\n date,\n selected,\n monthsToDisplay,\n offset,\n minDate,\n maxDate,\n firstDayOfWeek,\n showOutsideDays,\n}: GetCalendarProps): CalendarMonth[] {\n const months: CalendarMonth[] = [];\n const startDate = getStartDate(date, minDate, maxDate);\n for (let i = 0; i < monthsToDisplay; i++) {\n const calendarDates = getMonths({\n month: startDate.getMonth() + i + offset,\n year: startDate.getFullYear(),\n selectedDates: selected,\n minDate,\n maxDate,\n firstDayOfWeek,\n showOutsideDays,\n });\n months.push(calendarDates);\n }\n return months;\n}\n\n/**\n * Figures out the actual start date based on\n * the min and max dates available.\n * @param {Date} date The we want to start the calendar at\n * @param {Date} minDate The earliest date available to start at\n * @param {Date} maxDate The latest date available to start at\n * @returns {Date} The actual start date\n */\nfunction getStartDate(date: Date, minDate?: Date, maxDate?: Date): Date {\n let startDate = startOfDay(date);\n if (minDate) {\n const minDateNormalized = startOfDay(minDate);\n if (isBefore(startDate, minDateNormalized)) {\n startDate = minDateNormalized;\n }\n }\n if (maxDate) {\n const maxDateNormalized = startOfDay(maxDate);\n if (isBefore(maxDateNormalized, startDate)) {\n startDate = maxDateNormalized;\n }\n }\n return startDate;\n}\n\ntype GetMonthsProps = {\n /** The month to grab data for */\n month: number;\n /** The year to grab data for */\n year: number;\n /** Date or dates currently selected. */\n selectedDates?: Date | Date[];\n /** The earliest date available */\n minDate?: Date;\n /** The earliest date available */\n maxDate?: Date;\n /** First day of week, 0-6 (Sunday to Saturday) */\n firstDayOfWeek: number;\n /** Flag to fill front and back weeks with dates from adjacent months */\n showOutsideDays: boolean;\n};\n\nexport type CalendarMonth = {\n firstDayOfMonth: Date;\n lastDayOfMonth: Date;\n month: number;\n year: number;\n weeks: CalendarWeek[];\n};\n\nexport type CalendarWeek = CalendarDay[];\n\nexport type CalendarDay = DateInfo | string;\n\n/**\n * Figures what week/day data to return for the given month\n * and year. Adds flags to day data if found in the given selectedDates,\n * if is selectable inside the given min and max dates, or is today.\n * @param {Object} param The param object\n * @param {Number} param.month The month to grab data for\n * @param {Number} param.year The year to grab data for\n * @param {Array.<Date>} sparam.electedDates An array of dates currently selected\n * @param {Date} param.minDate The earliest date available\n * @param {Date} param.maxDate The furthest date available\n * @param {Number} param.firstDayOfWeek First day of week, 0-6 (Sunday to Saturday)\n * @param {Bool} param.showOutsideDays Flag to fill front and back weeks with dates from adjacent months\n * @returns {Object} The data for the selected month/year\n */\nfunction getMonths({\n month,\n year,\n selectedDates,\n minDate,\n maxDate,\n firstDayOfWeek,\n showOutsideDays,\n}: GetMonthsProps): CalendarMonth {\n // Get the normalized month and year, along with days in the month.\n const daysMonthYear = getNumDaysMonthYear(month, year);\n const daysInMonth = daysMonthYear.daysInMonth;\n month = daysMonthYear.month;\n year = daysMonthYear.year;\n\n // Fill out the dates for the month.\n const dates = [];\n for (let day = 1; day <= daysInMonth; day++) {\n const date = new Date(year, month, day);\n const dateObj = {\n date,\n selected: isSelected(selectedDates, date),\n selectable: isSelectable(minDate, maxDate, date),\n today: isToday(date),\n prevMonth: false,\n nextMonth: false,\n };\n dates.push(dateObj);\n }\n\n const firstDayOfMonth = new Date(year, month, 1);\n const lastDayOfMonth = new Date(year, month, daysInMonth);\n\n const frontWeekBuffer = fillFrontWeek({\n firstDayOfMonth,\n minDate,\n maxDate,\n selectedDates,\n firstDayOfWeek,\n showOutsideDays,\n });\n\n const backWeekBuffer = fillBackWeek({\n lastDayOfMonth,\n minDate,\n maxDate,\n selectedDates,\n firstDayOfWeek,\n showOutsideDays,\n });\n\n dates.unshift(...frontWeekBuffer);\n dates.push(...backWeekBuffer);\n\n // Get the filled out weeks for the\n // given dates.\n const weeks = getWeeks(dates);\n // return the calendar data.\n return {\n firstDayOfMonth,\n lastDayOfMonth,\n month,\n year,\n weeks,\n };\n}\n\ntype FillFrontWeekProps = {\n firstDayOfMonth: Date;\n /** Date or dates currently selected. */\n selectedDates?: Date | Date[];\n /** The earliest date available */\n minDate?: Date;\n /** The earliest date available */\n maxDate?: Date;\n /** First day of week, 0-6 (Sunday to Saturday) */\n firstDayOfWeek: number;\n /** Flag to fill front and back weeks with dates from adjacent months */\n showOutsideDays: boolean;\n};\n\n/**\n * Fill front week with either empty buffer or dates from previous month,\n * depending on showOutsideDays flag\n * @param {Object} param The param object\n * @param {Array.<Date>} param.selectedDates An array of dates currently selected\n * @param {Date} param.minDate The earliest date available\n * @param {Date} param.maxDate The furthest date available\n * @param {Date} param.firstDayOfMonth First day of the month\n * @param {Number} param.firstDayOfWeek First day of week, 0-6 (Sunday to Saturday)\n * @param {Bool} param.showOutsideDays Flag to fill front and back weeks with dates from adjacent months\n * @returns {Array.<Date>} Buffer to fill front week\n */\nfunction fillFrontWeek({\n firstDayOfMonth,\n minDate,\n maxDate,\n selectedDates,\n firstDayOfWeek,\n showOutsideDays,\n}: FillFrontWeekProps): CalendarWeek {\n const dates: CalendarWeek = [];\n let firstDay = (firstDayOfMonth.getDay() + 7 - firstDayOfWeek) % 7;\n\n if (showOutsideDays) {\n const lastDayOfPrevMonth = addDays(firstDayOfMonth, -1);\n const prevDate = lastDayOfPrevMonth.getDate();\n const prevDateMonth = lastDayOfPrevMonth.getMonth();\n const prevDateYear = lastDayOfPrevMonth.getFullYear();\n\n // Fill out front week for days from\n // preceding month with dates from previous month.\n let counter = 0;\n while (counter < firstDay) {\n const date = new Date(prevDateYear, prevDateMonth, prevDate - counter);\n const dateObj: DateInfo = {\n date,\n selected: isSelected(selectedDates, date),\n selectable: isSelectable(minDate, maxDate, date),\n today: false,\n prevMonth: true,\n nextMonth: false,\n };\n dates.unshift(dateObj);\n counter++;\n }\n } else {\n // Fill out front week for days from\n // preceding month with buffer.\n while (firstDay > 0) {\n dates.unshift(\"\");\n firstDay--;\n }\n }\n\n return dates;\n}\n\nexport type DateInfo = {\n date: Date;\n selected: boolean;\n selectable: boolean;\n today: boolean;\n prevMonth: boolean;\n nextMonth: boolean;\n};\n\ntype FillBackWeekProps = {\n lastDayOfMonth: Date;\n /** Date or dates currently selected. */\n selectedDates?: Date | Date[];\n /** The earliest date available */\n minDate?: Date;\n /** The earliest date available */\n maxDate?: Date;\n /** First day of week, 0-6 (Sunday to Saturday) */\n firstDayOfWeek: number;\n /** Flag to fill front and back weeks with dates from adjacent months */\n showOutsideDays: boolean;\n};\n\n/**\n * Fill back weeks with either empty buffer or dates from next month,\n * depending on showOutsideDays flag\n * @param {Object} param The param object\n * @param {Array.<Date>} param.selectedDates An array of dates currently selected\n * @param {Date} param.minDate The earliest date available\n * @param {Date} param.maxDate The furthest date available\n * @param {Date} param.lastDayOfMonth Last day of the month\n * @param {Number} param.firstDayOfWeek First day of week, 0-6 (Sunday to Saturday)\n * @param {Bool} param.showOutsideDays Flag to fill front and back weeks with dates from adjacent months\n * @returns {Array.<Date>} Buffer to fill back week\n */\nfunction fillBackWeek({\n lastDayOfMonth,\n minDate,\n maxDate,\n selectedDates,\n firstDayOfWeek,\n showOutsideDays,\n}: FillBackWeekProps): CalendarWeek {\n const dates: CalendarWeek = [];\n let lastDay = (lastDayOfMonth.getDay() + 7 - firstDayOfWeek) % 7;\n\n if (showOutsideDays) {\n const firstDayOfNextMonth = addDays(lastDayOfMonth, 1);\n const nextDateMonth = firstDayOfNextMonth.getMonth();\n const nextDateYear = firstDayOfNextMonth.getFullYear();\n\n // Fill out back week for days from\n // following month with dates from next month.\n let counter = 0;\n while (counter < 6 - lastDay) {\n const date = new Date(nextDateYear, nextDateMonth, 1 + counter);\n const dateObj: DateInfo = {\n date,\n selected: isSelected(selectedDates, date),\n selectable: isSelectable(minDate, maxDate, date),\n today: false,\n prevMonth: false,\n nextMonth: true,\n };\n dates.push(dateObj);\n counter++;\n }\n } else {\n // Fill out back week for days from\n // following month with buffer.\n while (lastDay < 6) {\n dates.push(\"\");\n lastDay++;\n }\n }\n\n return dates;\n}\n\n/**\n * Normalizes month (could be overflow) and year pairs and returns the\n * normalized month and year along with the number of days in the month.\n * @param {Number} month The month to normalize\n * @param {Number} year The year to normalize\n * @returns {Object} The normalized month and year along with the number of days in the month\n */\nfunction getNumDaysMonthYear(month: number, year: number): { daysInMonth: number; month: number; year: number } {\n // If a parameter you specify is outside of the expected range for Month or Day,\n // JS Date attempts to update the date information in the Date object accordingly!\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMonth\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setDate\n\n // Let Date handle the overflow of the month,\n // which should return the normalized month and year.\n const normalizedMonthYear = new Date(year, month, 1);\n month = normalizedMonthYear.getMonth();\n year = normalizedMonthYear.getFullYear();\n // Overflow the date to the next month, then subtract the difference\n // to get the number of days in the previous month.\n // This will also account for leap years!\n const daysInMonth = 32 - new Date(year, month, 32).getDate();\n return { daysInMonth, month, year };\n}\n\n/**\n * Takes an array of dates, and turns them into a multi dimensional\n * array with 7 entries for each week.\n * @param {Array.<Object>} dates An array of dates\n * @returns {Array} The weeks as a multi dimensional array\n */\nfunction getWeeks(dates: CalendarWeek): Array<CalendarWeek> {\n const weeksLength = Math.ceil(dates.length / 7);\n const weeks: Array<CalendarWeek> = [];\n for (let i = 0; i < weeksLength; i++) {\n weeks[i] = [];\n for (let x = 0; x < 7; x++) {\n weeks[i].push(dates[i * 7 + x]);\n }\n }\n return weeks;\n}\n\n/**\n * Normalizes dates to the beginning of the day,\n * then checks to see if the day given is found\n * in the selectedDates.\n * @param {Array.<Date>} selectedDates An array of dates currently selected\n * @param {Date} date The date to search with against selectedDates\n * @returns {Boolean} Whether day is found in selectedDates\n */\nfunction isSelected(selectedDates: Date | Date[] | undefined, date: Date): boolean {\n if (!selectedDates) {\n return false;\n }\n selectedDates = Array.isArray(selectedDates) ? selectedDates : [selectedDates];\n return selectedDates.some((selectedDate) => {\n if (selectedDate instanceof Date && startOfDay(selectedDate).getTime() === startOfDay(date).getTime()) {\n return true;\n }\n return false;\n });\n}\n\n/**\n * Checks to see if the date given is\n * between the min and max dates.\n * @param {Date} minDate The earliest date available\n * @param {Date} maxDate The furthest date available\n * @param {Date} date The date to compare with\n * @returns {Boolean} Whether the date is between min and max date\n */\nfunction isSelectable(minDate: Date | undefined, maxDate: Date | undefined, date: Date): boolean {\n if ((minDate && isBefore(date, minDate)) || (maxDate && isBefore(maxDate, date))) {\n return false;\n }\n return true;\n}\n\n/**\n * Check if two Date objects represent the same day\n *\n * @param date1 first Date to compare\n * @param date2 second Date to compare\n */\nexport function isSameDay(date1: Date, date2: Date): boolean {\n return (\n date1.getDate() === date2.getDate() &&\n date1.getMonth() === date2.getMonth() &&\n date1.getFullYear() === date2.getFullYear()\n );\n}\n\n/**\n * Check if the date has changed from the previous date\n *\n * @param date First date to compare\n * @param newDate Second date to compare\n */\nexport function dateHasChanged(date: Date | undefined, newDate: Date): boolean {\n return !date || !isSameDay(date, newDate);\n}\n\n/**\n * Check if a given date is outside a given range\n *\n * @param date Input date\n * @param rangeStart Dates before this date should be disabled\n * @param rangeEnd Dates after this date should be disabled\n */\nexport function dateIsOutsideRange(date: Date, rangeStart: Date | undefined, rangeEnd: Date | undefined): boolean {\n return Boolean((rangeEnd && date > rangeEnd) || (rangeStart && date < rangeStart));\n}\n\n/**\n * Get the correct initial date for initiating the datepicker reducer store\n *\n * @param value Value from props\n * @param initialDate Initial date from porps\n * @param disableDate Function for checking whether the date should be disabled\n */\nexport function getInitialDate(\n value: string | undefined,\n defaultValue: string | undefined,\n minDate: Date | undefined,\n maxDate: Date | undefined,\n): Date | null {\n const valueAsDate = parseDateString(value);\n const defaultValueAsDate = parseDateString(defaultValue);\n if (valueAsDate) {\n return !dateIsOutsideRange(valueAsDate, minDate, maxDate) ? valueAsDate : null;\n }\n if (defaultValueAsDate) {\n return !dateIsOutsideRange(defaultValueAsDate, minDate, maxDate) ? defaultValueAsDate : null;\n }\n return null;\n}\n\n/**\n * Get the initial date to show in the calendar\n *\n * @param date The date set in the DatePicker (from props)\n * @param defaultSelected The defaultSelected prop from DatePicker\n * @param minDate The earliest selectable date, from props\n * @param maxDate The latest selectable date, from props\n * @returns The date to show in the calendar\n */\nexport function getInitialDateShown(\n date: Date | null,\n defaultSelected: Date | undefined,\n minDate: Date | undefined,\n maxDate: Date | undefined,\n): Date {\n let initialDate = date || defaultSelected || new Date();\n\n if (minDate) {\n initialDate = minDate > initialDate ? minDate : initialDate;\n }\n\n if (maxDate) {\n initialDate = maxDate < initialDate ? maxDate : initialDate;\n }\n\n return initialDate;\n}\n"],"names":["composeEventHandlers","fns","event","some","fn","defaultPrevented","subtractMonth","calendars","offset","minDate","firstDayOfMonth","diffInMonths","differenceInCalendarMonths","DEFAULT_YEARS_TO_SHOW","getYearSelectOptions","currentYear","maxDate","yearsToShow","getFullYear","toString","showAllYears","previousYearsToShow","comingYearsToShow","previous","coming","startYear","earliestStartYear","Math","max","endYear","latestEndYear","min","numYears","Array","keys","map","x","item","getMonthSelectOptions","monthNames","minDateYear","minDateMonth","getMonth","maxDateYear","maxDateMonth","startMonth","endMonth","month","index","value","label","filter","parseInt","addMonth","lastDayOfMonth","length","isBackDisabled","firstDayOfMonthMinusOne","addDays","isBefore","isForwardDisabled","lastDayOfMonthPlusOne","getCalendars","date","selected","monthsToDisplay","firstDayOfWeek","showOutsideDays","months","startDate","startOfDay","minDateNormalized","maxDateNormalized","getStartDate","i","calendarDates","getMonths","year","selectedDates","push","daysMonthYear","normalizedMonthYear","Date","daysInMonth","getDate","getNumDaysMonthYear","dates","day","dateObj","isSelected","selectable","isSelectable","today","isToday","prevMonth","nextMonth","frontWeekBuffer","firstDay","getDay","lastDayOfPrevMonth","prevDate","prevDateMonth","prevDateYear","counter","unshift","fillFrontWeek","backWeekBuffer","lastDay","firstDayOfNextMonth","nextDateMonth","nextDateYear","fillBackWeek","weeks","weeksLength","ceil","getWeeks","isArray","selectedDate","getTime","isSameDay","date1","date2","dateHasChanged","newDate","dateIsOutsideRange","rangeStart","rangeEnd","getInitialDate","defaultValue","valueAsDate","parseDateString","defaultValueAsDate","getInitialDateShown","defaultSelected","initialDate"],"mappings":"4JA8BO,SAASA,KAAwBC,GAC7B,OAACC,GACJD,EAAIE,MAAMC,IACNA,GAAMA,EAAGF,GACFA,EAAMG,mBAEzB,CAWO,SAASC,GACZC,UAAAA,EACAC,OAAAA,EACAC,QAAAA,IAMID,GAAAA,EAAS,GAAKC,EAAS,CACjB,MAAEC,gBAAAA,GAAoBH,EAAU,GAChCI,EAAeC,EAA2BF,EAAiBD,GAC7DE,EAAeH,IACNA,EAAAG,EAEjB,CACOH,OAAAA,CACX,CAEO,MAAMK,EAAwB,EAW9B,SAASC,EACZC,EACAN,EACAO,EACAC,GAEIR,GAAAA,GAAWA,EAAQS,cAAgBH,EACnC,MAAO,CAACN,EAAQS,cAAcC,YAG9BH,GAAAA,GAAWA,EAAQE,cAAgBH,EACnC,MAAO,CAACC,EAAQE,cAAcC,YAG9BC,IACAC,EACAC,EAFAF,GAAe,EAIC,QAAhBH,GACeG,GAAA,EACOC,EA/BO,EAgCTC,EAhCS,IAkC7BD,EAA6C,iBAAhBJ,EAA2BA,EAAcA,EAAYM,SAClFD,EAA2C,iBAAhBL,EAA2BA,EAAcA,EAAYO,QAGpF,IAAIC,EAAYV,EAAcM,EAC9B,GAAIZ,EAAS,CACT,MAAMiB,EAAoBN,EAAeX,EAAQS,cAAgBO,EACjEA,EAAYE,KAAKC,IAAInB,EAAQS,cAAeQ,EAChD,CAEA,IAAIG,EAAUd,EAAcO,EAC5B,GAAIN,EAAS,CACT,MAAMc,EAAgBV,EAAeJ,EAAQE,cAAgBW,EAC7DA,EAAUF,KAAKI,IAAIf,EAAQE,cAAeY,EAC9C,CAGA,MAAME,EAAWL,KAAKC,IAAIC,E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AACA,IAC3C3E,MAAMkH,GACnBA,aAAwBnC,MAAQZ,EAAW+C,GAAcC,YAAchD,EAAWP,GAAMuD,WAKpG,CAUA,SAAS3B,EAAalF,EAA2BO,EAA2B+C,GACnE,QAAAtD,GAAWkD,EAASI,EAAMtD,IAAcO,GAAW2C,EAAS3C,EAAS+C,GAI9E,CAQgB,SAAAwD,EAAUC,EAAaC,GACnC,OACID,EAAMpC,YAAcqC,EAAMrC,WAC1BoC,EAAM9E,aAAe+E,EAAM/E,YAC3B8E,EAAMtG,gBAAkBuG,EAAMvG,aAEtC,CAQgB,SAAAwG,EAAe3D,EAAwB4D,GACnD,OAAQ5D,IAASwD,EAAUxD,EAAM4D,EACrC,CASgB,SAAAC,EAAmB7D,EAAY8D,EAA8BC,GACzE,SAAgBA,GAAY/D,EAAO+D,GAAcD,GAAc9D,EAAO8D,EAC1E,CASO,SAASE,EACZ9E,EACA+E,EACAvH,EACAO,GAEM,MAAAiH,EAAcC,EAAgBjF,GAC9BkF,EAAqBD,EAAgBF,GAC3C,OAAIC,EACQL,EAAmBK,EAAaxH,EAASO,GAAyB,KAAdiH,EAE5DE,EACQP,EAAmBO,EAAoB1H,EAASO,GAAgC,KAArBmH,EAEhE,IACX,CAWO,SAASC,EACZrE,EACAsE,EACA5H,EACAO,GAEA,IAAIsH,EAAcvE,GAAQsE,GAAmB,IAAInD,KAE7CzE,OAAAA,IACc6H,EAAA7H,EAAU6H,EAAc7H,EAAU6H,GAGhDtH,IACcsH,EAAAtH,EAAUsH,EAActH,EAAUsH,GAG7CA,CACX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fremtind/jokul",
3
- "version": "0.23.2",
3
+ "version": "0.23.4",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -181,5 +181,5 @@
181
181
  "@babel/preset-react"
182
182
  ]
183
183
  },
184
- "gitHead": "fc47ec1f802bffcbe657e1acc694c1be7fc4069e"
184
+ "gitHead": "8f59ac96a958c75aa71f8ae97a5fc0c5e9e8c38b"
185
185
  }
@@ -136,7 +136,7 @@
136
136
  height: 1rem;
137
137
  }
138
138
  html[data-touchnavigation] .jkl-button.jkl-button--pressed::before {
139
- animation: cubic-bezier(0.6, 0.2, 0.35, 1) 250ms jkl-tertiary-flash-umk7sad;
139
+ animation: cubic-bezier(0.6, 0.2, 0.35, 1) 250ms jkl-tertiary-flash-u284kqo;
140
140
  }
141
141
  :not([data-touchnavigation]) .jkl-button--primary:hover, :not([data-touchnavigation]) .jkl-button--secondary:hover, :not([data-touchnavigation]) .jkl-button--tertiary:hover {
142
142
  scale: 1.05;
@@ -180,7 +180,7 @@ html[data-touchnavigation] .jkl-button.jkl-button--pressed::before {
180
180
  --background-color: var(--jkl-color-background-interactive-hover);
181
181
  }
182
182
 
183
- @keyframes jkl-tertiary-flash-umk7sad {
183
+ @keyframes jkl-tertiary-flash-u284kqo {
184
184
  0% {
185
185
  opacity: 0.5;
186
186
  scale: 1;
@@ -1 +1 @@
1
- .jkl .jkl-button,.jkl-button[data-density=comfortable],.jkl-button[data-layout-density=comfortable],[data-density=comfortable] .jkl-button,[data-layout-density=comfortable] .jkl-button{--padding-block:0.5rem;--padding-text:1.5rem;--padding-icon:1rem;--padding-icon-button:0.5rem;--padding-tertiary-inline:0.25rem;--padding-ghost-inline:0.5rem}.jkl-button[data-density=compact],.jkl-button[data-layout-density=compact],[data-density=compact] .jkl-button,[data-layout-density=compact] .jkl-button{--padding-block:0.25rem;--padding-text:0.75rem;--padding-icon:0.5rem;--padding-icon-button:0.25rem;--padding-tertiary-inline:0.125rem;--padding-ghost-inline:0.25rem;font-size:1rem;font-weight:400;line-height:1.5rem;--jkl-icon-weight:300;--jkl-icon-size:1.25rem;--jkl-icon-opsz:20;--jkl-icon-weight:500;font-weight:700}.jkl-button{--text-color:var(--jkl-color-text-default);--background-color:#0000;--border-radius:0;--border-width:0.0625rem;background-color:var(--background-color);border:unset;color:var(--text-color);cursor:pointer;text-decoration:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;border-radius:var(--border-radius);font-size:1.125rem;font-weight:400;line-height:1.75rem;max-width:100%;overflow:hidden;padding-block:var(--padding-block);padding-inline:var(--padding-text);position:relative;transition-duration:.15s;transition-property:scale;transition-timing-function:ease;--jkl-icon-weight:300;--jkl-icon-weight:500;font-weight:700}@media (min-width:680px){.jkl-button{font-size:1.25rem;font-weight:400;line-height:2rem;--jkl-icon-weight:300;--jkl-icon-weight:500;font-weight:700}}.jkl-button:has(.jkl-icon:first-child){padding-inline-start:var(--padding-icon)}.jkl-button:has(.jkl-icon:last-child){padding-inline-end:var(--padding-icon)}.jkl-button:has(.jkl-icon:first-child):has(.jkl-icon:last-child){padding-inline:var(--padding-icon-button)}.jkl-button__label{align-items:center;display:flex;flex-direction:row;gap:.125rem;pointer-events:none;transition-duration:.25s;transition-property:translate;transition-timing-function:ease}.jkl-button__loader{left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transition-duration:.25s;transition-property:opacity,translate;transition-timing-function:ease;translate:-50% 350%}.jkl-button__text{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jkl-button[data-loading=true] .jkl-button__label{translate:0 -120%}.jkl-button[data-loading=true] .jkl-button__loader{opacity:1;translate:-50% -50%}.jkl-button:focus-visible{outline:2px solid var(--jkl-color-border-action);outline-offset:2px}.jkl-button:before{background-color:var(--text-color);border-radius:9999px;content:"";display:block;height:1rem;left:var(--jkl-touch-xcoord,50%);opacity:0;pointer-events:none;position:absolute;top:var(--jkl-touch-ycoord,50%);transform-origin:center;translate:-100%,-100%;width:1rem}html[data-touchnavigation] .jkl-button.jkl-button--pressed:before{animation:jkl-tertiary-flash-umk7sad .25s cubic-bezier(.6,.2,.35,1)}:not([data-touchnavigation]) .jkl-button--primary:hover,:not([data-touchnavigation]) .jkl-button--secondary:hover,:not([data-touchnavigation]) .jkl-button--tertiary:hover{scale:1.05;transform-origin:center}.jkl-button--primary,.jkl-button--secondary{--border-radius:999px}.jkl-button--primary{--background-color:var(--jkl-color-background-action);--text-color:var(--jkl-color-text-on-action)}.jkl-button--secondary:after{border:var(--border-width) solid var(--text-color);border-radius:var(--border-radius);content:"";inset:0;position:absolute}.jkl-button--tertiary,.jkl-button--tertiary:has(.jkl-icon:first-child),.jkl-button--tertiary:has(.jkl-icon:last-child){padding-inline:var(--padding-tertiary-inline)}.jkl-button--tertiary:after,.jkl-button--tertiary:has(.jkl-icon:first-child):after,.jkl-button--tertiary:has(.jkl-icon:last-child):after{border-bottom:var(--border-width) solid var(--text-color);border-radius:var(--border-radius);content:"";inset:0;position:absolute}.jkl-button--tertiary:focus-visible,.jkl-button--tertiary:has(.jkl-icon:first-child):focus-visible,.jkl-button--tertiary:has(.jkl-icon:first-child):hover,.jkl-button--tertiary:has(.jkl-icon:last-child):focus-visible,.jkl-button--tertiary:has(.jkl-icon:last-child):hover,.jkl-button--tertiary:hover{--border-width:0.125rem}.jkl-button--ghost,.jkl-button--ghost:has(.jkl-icon:first-child),.jkl-button--ghost:has(.jkl-icon:last-child){border-radius:.25rem;padding-inline:var(--padding-ghost-inline);transition-duration:.15s;transition-property:background-color;transition-timing-function:ease}.jkl-button--ghost:has(.jkl-icon:first-child):hover,.jkl-button--ghost:has(.jkl-icon:last-child):hover,.jkl-button--ghost:hover{--background-color:var(--jkl-color-background-interactive-hover)}@keyframes jkl-tertiary-flash-umk7sad{0%{opacity:.5;scale:1}to{opacity:0;scale:8}}
1
+ .jkl .jkl-button,.jkl-button[data-density=comfortable],.jkl-button[data-layout-density=comfortable],[data-density=comfortable] .jkl-button,[data-layout-density=comfortable] .jkl-button{--padding-block:0.5rem;--padding-text:1.5rem;--padding-icon:1rem;--padding-icon-button:0.5rem;--padding-tertiary-inline:0.25rem;--padding-ghost-inline:0.5rem}.jkl-button[data-density=compact],.jkl-button[data-layout-density=compact],[data-density=compact] .jkl-button,[data-layout-density=compact] .jkl-button{--padding-block:0.25rem;--padding-text:0.75rem;--padding-icon:0.5rem;--padding-icon-button:0.25rem;--padding-tertiary-inline:0.125rem;--padding-ghost-inline:0.25rem;font-size:1rem;font-weight:400;line-height:1.5rem;--jkl-icon-weight:300;--jkl-icon-size:1.25rem;--jkl-icon-opsz:20;--jkl-icon-weight:500;font-weight:700}.jkl-button{--text-color:var(--jkl-color-text-default);--background-color:#0000;--border-radius:0;--border-width:0.0625rem;background-color:var(--background-color);border:unset;color:var(--text-color);cursor:pointer;text-decoration:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;border-radius:var(--border-radius);font-size:1.125rem;font-weight:400;line-height:1.75rem;max-width:100%;overflow:hidden;padding-block:var(--padding-block);padding-inline:var(--padding-text);position:relative;transition-duration:.15s;transition-property:scale;transition-timing-function:ease;--jkl-icon-weight:300;--jkl-icon-weight:500;font-weight:700}@media (min-width:680px){.jkl-button{font-size:1.25rem;font-weight:400;line-height:2rem;--jkl-icon-weight:300;--jkl-icon-weight:500;font-weight:700}}.jkl-button:has(.jkl-icon:first-child){padding-inline-start:var(--padding-icon)}.jkl-button:has(.jkl-icon:last-child){padding-inline-end:var(--padding-icon)}.jkl-button:has(.jkl-icon:first-child):has(.jkl-icon:last-child){padding-inline:var(--padding-icon-button)}.jkl-button__label{align-items:center;display:flex;flex-direction:row;gap:.125rem;pointer-events:none;transition-duration:.25s;transition-property:translate;transition-timing-function:ease}.jkl-button__loader{left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transition-duration:.25s;transition-property:opacity,translate;transition-timing-function:ease;translate:-50% 350%}.jkl-button__text{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jkl-button[data-loading=true] .jkl-button__label{translate:0 -120%}.jkl-button[data-loading=true] .jkl-button__loader{opacity:1;translate:-50% -50%}.jkl-button:focus-visible{outline:2px solid var(--jkl-color-border-action);outline-offset:2px}.jkl-button:before{background-color:var(--text-color);border-radius:9999px;content:"";display:block;height:1rem;left:var(--jkl-touch-xcoord,50%);opacity:0;pointer-events:none;position:absolute;top:var(--jkl-touch-ycoord,50%);transform-origin:center;translate:-100%,-100%;width:1rem}html[data-touchnavigation] .jkl-button.jkl-button--pressed:before{animation:jkl-tertiary-flash-u284kqo .25s cubic-bezier(.6,.2,.35,1)}:not([data-touchnavigation]) .jkl-button--primary:hover,:not([data-touchnavigation]) .jkl-button--secondary:hover,:not([data-touchnavigation]) .jkl-button--tertiary:hover{scale:1.05;transform-origin:center}.jkl-button--primary,.jkl-button--secondary{--border-radius:999px}.jkl-button--primary{--background-color:var(--jkl-color-background-action);--text-color:var(--jkl-color-text-on-action)}.jkl-button--secondary:after{border:var(--border-width) solid var(--text-color);border-radius:var(--border-radius);content:"";inset:0;position:absolute}.jkl-button--tertiary,.jkl-button--tertiary:has(.jkl-icon:first-child),.jkl-button--tertiary:has(.jkl-icon:last-child){padding-inline:var(--padding-tertiary-inline)}.jkl-button--tertiary:after,.jkl-button--tertiary:has(.jkl-icon:first-child):after,.jkl-button--tertiary:has(.jkl-icon:last-child):after{border-bottom:var(--border-width) solid var(--text-color);border-radius:var(--border-radius);content:"";inset:0;position:absolute}.jkl-button--tertiary:focus-visible,.jkl-button--tertiary:has(.jkl-icon:first-child):focus-visible,.jkl-button--tertiary:has(.jkl-icon:first-child):hover,.jkl-button--tertiary:has(.jkl-icon:last-child):focus-visible,.jkl-button--tertiary:has(.jkl-icon:last-child):hover,.jkl-button--tertiary:hover{--border-width:0.125rem}.jkl-button--ghost,.jkl-button--ghost:has(.jkl-icon:first-child),.jkl-button--ghost:has(.jkl-icon:last-child){border-radius:.25rem;padding-inline:var(--padding-ghost-inline);transition-duration:.15s;transition-property:background-color;transition-timing-function:ease}.jkl-button--ghost:has(.jkl-icon:first-child):hover,.jkl-button--ghost:has(.jkl-icon:last-child):hover,.jkl-button--ghost:hover{--background-color:var(--jkl-color-background-interactive-hover)}@keyframes jkl-tertiary-flash-u284kqo{0%{opacity:.5;scale:1}to{opacity:0;scale:8}}
@@ -32,7 +32,7 @@
32
32
  --jkl-checkbox-line-height: 1.5rem;
33
33
  }
34
34
 
35
- @keyframes jkl-checkbox-checked-uy09qtt {
35
+ @keyframes jkl-checkbox-checked-ut3ropn {
36
36
  0% {
37
37
  width: 0;
38
38
  height: 0;
@@ -46,7 +46,7 @@
46
46
  height: 58%;
47
47
  }
48
48
  }
49
- @keyframes jkl-checkbox-indeterminate-uy09qu3 {
49
+ @keyframes jkl-checkbox-indeterminate-ut3roqc {
50
50
  0% {
51
51
  width: 0;
52
52
  }
@@ -74,11 +74,11 @@
74
74
  top: -6px;
75
75
  }
76
76
  .jkl-checkbox__input:checked + .jkl-checkbox__label .jkl-checkbox__check-mark::after {
77
- animation: jkl-checkbox-checked-uy09qtt 150ms ease-in-out forwards;
77
+ animation: jkl-checkbox-checked-ut3ropn 150ms ease-in-out forwards;
78
78
  opacity: 1;
79
79
  }
80
80
  .jkl-checkbox__input:indeterminate:not(:checked) + .jkl-checkbox__label .jkl-checkbox__indeterminate-mark::after {
81
- animation: jkl-checkbox-indeterminate-uy09qu3 150ms ease-in-out forwards;
81
+ animation: jkl-checkbox-indeterminate-ut3roqc 150ms ease-in-out forwards;
82
82
  opacity: 1;
83
83
  }
84
84
  .jkl-checkbox__input:focus-visible + .jkl-checkbox__label {
@@ -1 +1 @@
1
- :root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-checkbox-font-size:var(--jkl-body-font-size);--jkl-checkbox-line-height:var(--jkl-body-line-height);--jkl-checkbox-font-weight:var(--jkl-body-font-weight);--jkl-checkbox-height:3rem;--jkl-checkbox-box-size:1.5rem;--jkl-checkbox-line-height:2rem}@media (width >= 0) and (max-width:679px){:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-checkbox-height:2.5rem;--jkl-checkbox-box-size:1.5rem;--jkl-checkbox-line-height:1.75rem}}[data-density=compact],[data-layout-density=compact]{--jkl-checkbox-font-size:var(--jkl-small-font-size);--jkl-checkbox-line-height:var(--jkl-small-line-height);--jkl-checkbox-font-weight:var(--jkl-small-font-weight);--jkl-checkbox-height:1.75rem;--jkl-checkbox-box-size:1.125rem;--jkl-checkbox-line-height:1.5rem}@keyframes jkl-checkbox-checked-uy09qtt{0%{height:0;width:0}40%{height:0;width:18%}to{height:58%;width:18%}}@keyframes jkl-checkbox-indeterminate-uy09qu3{0%{width:0}to{width:66%}}.jkl-checkbox{--box-color:var(--jkl-color-border-action);--check-color:var(--jkl-color-border-action);--text-color:var(--jkl-color-text-default);--background-color:#0000;color:var(--text-color);display:flex;flex-wrap:wrap;font-size:var(--jkl-checkbox-font-size);font-weight:var(--jkl-checkbox-font-weight);line-height:var(--jkl-checkbox-line-height);min-height:var(--jkl-checkbox-height);position:relative}.jkl-checkbox__input{opacity:0;position:absolute;top:-6px}.jkl-checkbox__input:checked+.jkl-checkbox__label .jkl-checkbox__check-mark:after{animation:jkl-checkbox-checked-uy09qtt .15s ease-in-out forwards;opacity:1}.jkl-checkbox__input:indeterminate:not(:checked)+.jkl-checkbox__label .jkl-checkbox__indeterminate-mark:after{animation:jkl-checkbox-indeterminate-uy09qu3 .15s ease-in-out forwards;opacity:1}.jkl-checkbox__input:focus-visible+.jkl-checkbox__label{color:var(--jkl-checkbox-focus-color)}.jkl-checkbox__input:focus-visible+.jkl-checkbox__label>.jkl-checkbox__mark{--background-color:var(--jkl-color-background-input-focus);outline:2px solid var(--jkl-color-border-action);outline-offset:2px}.jkl-checkbox__input:disabled+.jkl-checkbox__label{color:var(--jkl-checkbox-disabled-color)}.jkl-checkbox__label{cursor:pointer;display:flex;flex-shrink:0;max-width:100%;min-width:0}.jkl-checkbox__label:active .jkl-checkbox__mark,.jkl-checkbox__label:hover .jkl-checkbox__mark{outline:1px solid var(--box-color)}.jkl-checkbox__label:active{--background-color:var(--jkl-color-background-input-focus)}.jkl-checkbox__text{margin:calc((var(--jkl-checkbox-height) - var(--jkl-checkbox-line-height))*.5) 0;transition-duration:.15s;transition-property:color;transition-timing-function:ease;translate:0 .0625rem}.jkl-checkbox__mark{align-self:flex-start;background-color:var(--background-color);border:1px solid;border-color:var(--box-color);border-radius:0;box-sizing:border-box;flex-shrink:0;height:var(--jkl-checkbox-box-size);margin-block:calc((var(--jkl-checkbox-height) - var(--jkl-checkbox-box-size))*.5);margin-inline-end:var(--jkl-spacing-8);outline:none;position:relative;transition-duration:.15s;transition-property:background-color;transition-timing-function:ease;width:var(--jkl-checkbox-box-size)}@media screen and (forced-colors:active){.jkl-checkbox__mark{border:1px solid ButtonText;outline:revert}}.jkl-checkbox__check-mark:after{border-bottom:.125rem solid var(--check-color);border-left-width:.125rem;border-left:0 solid var(--check-color);border-right:.125rem solid var(--check-color);border-top-width:.125rem;border-top:0 solid var(--check-color);bottom:42%;content:"";display:block;height:58%;left:18%;opacity:0;position:absolute;transform:rotate(45deg);transform-origin:bottom left;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:18%}@media screen and (forced-colors:active){.jkl-checkbox__check-mark:after{border-color:ButtonText}}.jkl-checkbox__indeterminate-mark:after{--width:66%;--thickness:0.125rem;border-bottom:solid var(--thickness) var(--check-color);bottom:calc(50% - var(--thickness)/2);content:"";display:block;left:calc((100% - var(--width))/2);opacity:0;position:absolute;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:var(--width)}@media screen and (forced-colors:active){.jkl-checkbox__indeterminate-mark:after{border-color:ButtonText}}.jkl-checkbox--inline{display:inline-flex}.jkl-checkbox--inline:not(:last-of-type){margin-right:1.5rem}.jkl-checkbox--error{--background-color:var(--jkl-color-background-alert-error);--check-color:var(--jkl-color-text-on-alert)}
1
+ :root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-checkbox-font-size:var(--jkl-body-font-size);--jkl-checkbox-line-height:var(--jkl-body-line-height);--jkl-checkbox-font-weight:var(--jkl-body-font-weight);--jkl-checkbox-height:3rem;--jkl-checkbox-box-size:1.5rem;--jkl-checkbox-line-height:2rem}@media (width >= 0) and (max-width:679px){:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-checkbox-height:2.5rem;--jkl-checkbox-box-size:1.5rem;--jkl-checkbox-line-height:1.75rem}}[data-density=compact],[data-layout-density=compact]{--jkl-checkbox-font-size:var(--jkl-small-font-size);--jkl-checkbox-line-height:var(--jkl-small-line-height);--jkl-checkbox-font-weight:var(--jkl-small-font-weight);--jkl-checkbox-height:1.75rem;--jkl-checkbox-box-size:1.125rem;--jkl-checkbox-line-height:1.5rem}@keyframes jkl-checkbox-checked-ut3ropn{0%{height:0;width:0}40%{height:0;width:18%}to{height:58%;width:18%}}@keyframes jkl-checkbox-indeterminate-ut3roqc{0%{width:0}to{width:66%}}.jkl-checkbox{--box-color:var(--jkl-color-border-action);--check-color:var(--jkl-color-border-action);--text-color:var(--jkl-color-text-default);--background-color:#0000;color:var(--text-color);display:flex;flex-wrap:wrap;font-size:var(--jkl-checkbox-font-size);font-weight:var(--jkl-checkbox-font-weight);line-height:var(--jkl-checkbox-line-height);min-height:var(--jkl-checkbox-height);position:relative}.jkl-checkbox__input{opacity:0;position:absolute;top:-6px}.jkl-checkbox__input:checked+.jkl-checkbox__label .jkl-checkbox__check-mark:after{animation:jkl-checkbox-checked-ut3ropn .15s ease-in-out forwards;opacity:1}.jkl-checkbox__input:indeterminate:not(:checked)+.jkl-checkbox__label .jkl-checkbox__indeterminate-mark:after{animation:jkl-checkbox-indeterminate-ut3roqc .15s ease-in-out forwards;opacity:1}.jkl-checkbox__input:focus-visible+.jkl-checkbox__label{color:var(--jkl-checkbox-focus-color)}.jkl-checkbox__input:focus-visible+.jkl-checkbox__label>.jkl-checkbox__mark{--background-color:var(--jkl-color-background-input-focus);outline:2px solid var(--jkl-color-border-action);outline-offset:2px}.jkl-checkbox__input:disabled+.jkl-checkbox__label{color:var(--jkl-checkbox-disabled-color)}.jkl-checkbox__label{cursor:pointer;display:flex;flex-shrink:0;max-width:100%;min-width:0}.jkl-checkbox__label:active .jkl-checkbox__mark,.jkl-checkbox__label:hover .jkl-checkbox__mark{outline:1px solid var(--box-color)}.jkl-checkbox__label:active{--background-color:var(--jkl-color-background-input-focus)}.jkl-checkbox__text{margin:calc((var(--jkl-checkbox-height) - var(--jkl-checkbox-line-height))*.5) 0;transition-duration:.15s;transition-property:color;transition-timing-function:ease;translate:0 .0625rem}.jkl-checkbox__mark{align-self:flex-start;background-color:var(--background-color);border:1px solid;border-color:var(--box-color);border-radius:0;box-sizing:border-box;flex-shrink:0;height:var(--jkl-checkbox-box-size);margin-block:calc((var(--jkl-checkbox-height) - var(--jkl-checkbox-box-size))*.5);margin-inline-end:var(--jkl-spacing-8);outline:none;position:relative;transition-duration:.15s;transition-property:background-color;transition-timing-function:ease;width:var(--jkl-checkbox-box-size)}@media screen and (forced-colors:active){.jkl-checkbox__mark{border:1px solid ButtonText;outline:revert}}.jkl-checkbox__check-mark:after{border-bottom:.125rem solid var(--check-color);border-left-width:.125rem;border-left:0 solid var(--check-color);border-right:.125rem solid var(--check-color);border-top-width:.125rem;border-top:0 solid var(--check-color);bottom:42%;content:"";display:block;height:58%;left:18%;opacity:0;position:absolute;transform:rotate(45deg);transform-origin:bottom left;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:18%}@media screen and (forced-colors:active){.jkl-checkbox__check-mark:after{border-color:ButtonText}}.jkl-checkbox__indeterminate-mark:after{--width:66%;--thickness:0.125rem;border-bottom:solid var(--thickness) var(--check-color);bottom:calc(50% - var(--thickness)/2);content:"";display:block;left:calc((100% - var(--width))/2);opacity:0;position:absolute;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:var(--width)}@media screen and (forced-colors:active){.jkl-checkbox__indeterminate-mark:after{border-color:ButtonText}}.jkl-checkbox--inline{display:inline-flex}.jkl-checkbox--inline:not(:last-of-type){margin-right:1.5rem}.jkl-checkbox--error{--background-color:var(--jkl-color-background-alert-error);--check-color:var(--jkl-color-text-on-alert)}
@@ -2,7 +2,7 @@
2
2
  * Do not edit directly
3
3
  * Generated on Mon, 23 Sep 2024 08:51:40 GMT
4
4
  */
5
- @keyframes jkl-show-ubvupz7 {
5
+ @keyframes jkl-show-uifymkm {
6
6
  from {
7
7
  transform: translate3d(0, 0.5rem, 0);
8
8
  opacity: 0;
@@ -37,7 +37,7 @@
37
37
  }
38
38
  }
39
39
  .jkl-feedback__fade-in {
40
- animation: jkl-show-ubvupz7 0.25s ease-out;
40
+ animation: jkl-show-uifymkm 0.25s ease-out;
41
41
  }
42
42
 
43
43
  .jkl-feedback-smileys {
@@ -1 +1 @@
1
- @keyframes jkl-show-ubvupz7{0%{opacity:0;transform:translate3d(0,.5rem,0)}}.jkl-feedback{max-width:34.375rem}.jkl-feedback__submit-wrapper{transition-duration:.25s;transition-property:height;transition-timing-function:ease;width:100%}.jkl-feedback__submit-wrapper--hidden{display:none}.jkl-feedback__step-counter{color:var(--jkl-color-text-subdued);font-size:1.125rem;font-weight:400;line-height:1.75rem;margin-bottom:1rem;--jkl-icon-weight:300}@media (min-width:680px){.jkl-feedback__step-counter{font-size:1.25rem;font-weight:400;line-height:2rem;--jkl-icon-weight:300}}.jkl-feedback__fade-in{animation:jkl-show-ubvupz7 .25s ease-out}.jkl-feedback-smileys{display:flex;flex-wrap:nowrap;gap:.75rem;justify-content:space-between;margin-top:.5rem;max-width:22.5rem;width:100%}.jkl-feedback-smiley-option{color:var(--jkl-color-text-subdued);cursor:pointer;display:inline-block;height:2.5rem;position:relative;transform:translateZ(0);transition-duration:.15s;transition-property:transform,color;transition-timing-function:ease;width:2.5rem}@media screen and (forced-colors:active){.jkl-feedback-smiley-option,.jkl-feedback-smiley-option path,.jkl-feedback-smiley-option svg{stroke:ButtonFace;fill:ButtonText}}.jkl-feedback-smiley-option:after,.jkl-feedback-smiley-option:before{border-radius:50%;content:"";opacity:0;position:absolute;transition-duration:.15s;transition-property:opacity;transition-timing-function:ease}.jkl-feedback-smiley-option:after{box-shadow:0 0 0 .125rem currentColor;inset:-.125rem -.125rem -.125rem -.125rem}.jkl-feedback-smiley-option:before{box-shadow:0 .125rem 1.875rem #0000001a;inset:0}.jkl-feedback-smiley-option:hover{color:var(--jkl-color-text-default)}input:checked+.jkl-feedback-smiley-option{color:var(--jkl-color-text-default);transform:translate3d(0,-20%,0)}html:not([data-mousenavigation]):not([data-touchnavigation]) input:focus+.jkl-feedback-smiley-option:after,input:checked+.jkl-feedback-smiley-option:before{opacity:1}
1
+ @keyframes jkl-show-uifymkm{0%{opacity:0;transform:translate3d(0,.5rem,0)}}.jkl-feedback{max-width:34.375rem}.jkl-feedback__submit-wrapper{transition-duration:.25s;transition-property:height;transition-timing-function:ease;width:100%}.jkl-feedback__submit-wrapper--hidden{display:none}.jkl-feedback__step-counter{color:var(--jkl-color-text-subdued);font-size:1.125rem;font-weight:400;line-height:1.75rem;margin-bottom:1rem;--jkl-icon-weight:300}@media (min-width:680px){.jkl-feedback__step-counter{font-size:1.25rem;font-weight:400;line-height:2rem;--jkl-icon-weight:300}}.jkl-feedback__fade-in{animation:jkl-show-uifymkm .25s ease-out}.jkl-feedback-smileys{display:flex;flex-wrap:nowrap;gap:.75rem;justify-content:space-between;margin-top:.5rem;max-width:22.5rem;width:100%}.jkl-feedback-smiley-option{color:var(--jkl-color-text-subdued);cursor:pointer;display:inline-block;height:2.5rem;position:relative;transform:translateZ(0);transition-duration:.15s;transition-property:transform,color;transition-timing-function:ease;width:2.5rem}@media screen and (forced-colors:active){.jkl-feedback-smiley-option,.jkl-feedback-smiley-option path,.jkl-feedback-smiley-option svg{stroke:ButtonFace;fill:ButtonText}}.jkl-feedback-smiley-option:after,.jkl-feedback-smiley-option:before{border-radius:50%;content:"";opacity:0;position:absolute;transition-duration:.15s;transition-property:opacity;transition-timing-function:ease}.jkl-feedback-smiley-option:after{box-shadow:0 0 0 .125rem currentColor;inset:-.125rem -.125rem -.125rem -.125rem}.jkl-feedback-smiley-option:before{box-shadow:0 .125rem 1.875rem #0000001a;inset:0}.jkl-feedback-smiley-option:hover{color:var(--jkl-color-text-default)}input:checked+.jkl-feedback-smiley-option{color:var(--jkl-color-text-default);transform:translate3d(0,-20%,0)}html:not([data-mousenavigation]):not([data-touchnavigation]) input:focus+.jkl-feedback-smiley-option:after,input:checked+.jkl-feedback-smiley-option:before{opacity:1}
@@ -78,7 +78,7 @@
78
78
  --color: var(--jkl-color-text-default);
79
79
  }
80
80
  .jkl-form-support-label--error .jkl-form-support-label__icon, .jkl-form-support-label--warning .jkl-form-support-label__icon, .jkl-form-support-label--success .jkl-form-support-label__icon {
81
- animation: 400ms cubic-bezier(0, 0, 0.3, 1) 250ms jkl-support-icon-entrance-uhl8t4r forwards;
81
+ animation: 400ms cubic-bezier(0, 0, 0.3, 1) 250ms jkl-support-icon-entrance-uinnae0 forwards;
82
82
  }
83
83
  .jkl-form-support-label--sr-only {
84
84
  border: 0 !important;
@@ -153,7 +153,7 @@
153
153
  white-space: nowrap !important; /* 3 */
154
154
  }
155
155
 
156
- @keyframes jkl-support-icon-entrance-uhl8t4r {
156
+ @keyframes jkl-support-icon-entrance-uinnae0 {
157
157
  0% {
158
158
  margin-right: 0;
159
159
  opacity: 0;
@@ -1 +1 @@
1
- .jkl-field-group{border-style:none}.jkl-field-group,.jkl-field-group:active,.jkl-field-group:focus,.jkl-field-group:hover{outline:0;outline-style:none}@media screen and (forced-colors:active){.jkl-field-group{border-style:revert}.jkl-field-group,.jkl-field-group:active,.jkl-field-group:focus,.jkl-field-group:hover{outline:revert;outline-style:revert}}.jkl-dormant-form-support-label{display:none;opacity:0;pointer-events:none}:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-form-support-label-font-size:var(--jkl-small-font-size);--jkl-form-support-label-line-height:var(--jkl-small-line-height);--jkl-form-support-label-font-weight:var(--jkl-small-font-weight);--jkl-form-support-label-margin:0.5rem 0 0;--jkl-form-support-label-icon-size:1.25rem;--jkl-form-support-label-icon-margin:0 -1.25rem -0.375rem 0}[data-density=compact],[data-layout-density=compact]{--jkl-form-support-label-icon-size:1.375rem;--jkl-form-support-label-icon-margin:0 -1.375rem -0.3125rem 0}.jkl-form-support-label{--color:var(--jkl-color-text-subdued);color:var(--color);display:flex;font-size:var(--jkl-form-support-label-font-size);font-weight:var(--jkl-form-support-label-font-weight);line-height:var(--jkl-form-support-label-line-height);margin:var(--jkl-form-support-label-margin);transition-delay:.15s;transition-duration:.4s;transition-property:color;transition-timing-function:ease}.jkl-form-support-label__icon,.jkl-form-support-label__icon.jkl-icon{height:var(--jkl-form-support-label-icon-size);margin:var(--jkl-form-support-label-icon-margin);opacity:0}@media screen and (forced-colors:active){.jkl-form-support-label__icon,.jkl-form-support-label__icon path,.jkl-form-support-label__icon svg,.jkl-form-support-label__icon.jkl-icon,.jkl-form-support-label__icon.jkl-icon path,.jkl-form-support-label__icon.jkl-icon svg{stroke:CanvasText;fill:Canvas}}.jkl-form-support-label--error,.jkl-form-support-label--success,.jkl-form-support-label--warning{--color:var(--jkl-color-text-default)}.jkl-form-support-label--error .jkl-form-support-label__icon,.jkl-form-support-label--success .jkl-form-support-label__icon,.jkl-form-support-label--warning .jkl-form-support-label__icon{animation:jkl-support-icon-entrance-uhl8t4r .4s cubic-bezier(0,0,.3,1) .25s forwards}.jkl-form-support-label--sr-only{border:0!important;clip:rect(1px,1px,1px,1px)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-label-small-margin:0 0 0.25rem 0;--jkl-label-medium-margin:0 0 0.5rem 0;--jkl-label-large-margin:0 0 1rem -0.0625rem;--jkl-label-small-font-size:var(--jkl-small-font-size);--jkl-label-small-line-height:var(--jkl-small-line-height);--jkl-label-small-font-weight:var(--jkl-small-font-weight);--jkl-label-medium-font-size:var(--jkl-body-font-size);--jkl-label-medium-line-height:var(--jkl-body-line-height);--jkl-label-medium-font-weight:var(--jkl-body-font-weight);--jkl-label-large-font-size:var(--jkl-heading-2-font-size);--jkl-label-large-line-height:var(--jkl-heading-2-line-height);--jkl-label-large-font-weight:var(--jkl-heading-2-font-weight)}[data-density=compact],[data-layout-density=compact]{--jkl-label-small-margin:0 0 0.25rem 0;--jkl-label-medium-margin:0 0 0.5rem 0;--jkl-label-large-margin:0 0 0.75rem -0.0625rem}.jkl-label{color:var(--jkl-color-text-default);display:block;margin-left:0}.jkl-label--small{font-size:var(--jkl-label-small-font-size);font-weight:var(--jkl-label-small-font-weight);line-height:var(--jkl-label-small-line-height);margin:var(--jkl-label-small-margin)}.jkl-label--medium{font-size:var(--jkl-label-medium-font-size);font-weight:var(--jkl-label-medium-font-weight);line-height:var(--jkl-label-medium-line-height);margin:var(--jkl-label-medium-margin)}.jkl-label--large{font-size:var(--jkl-label-large-font-size);font-weight:var(--jkl-label-large-font-weight);line-height:var(--jkl-label-large-line-height);margin:var(--jkl-label-large-margin)}.jkl-label--sr-only{border:0!important;clip:rect(1px,1px,1px,1px)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}@keyframes jkl-support-icon-entrance-uhl8t4r{0%{margin-right:0;opacity:0;transform:scale(1)}30%{margin-right:.5rem}50%{opacity:1}70%{transform:scale(1.1)}85%{transform:scale(.9)}to{margin-right:.5rem;opacity:1;transform:scale(1)}}@media screen and (forced-colors:active){.jkl-text-input-action-button,.jkl-text-input-action-button path,.jkl-text-input-action-button svg{stroke:ButtonText;fill:ButtonFace}}
1
+ .jkl-field-group{border-style:none}.jkl-field-group,.jkl-field-group:active,.jkl-field-group:focus,.jkl-field-group:hover{outline:0;outline-style:none}@media screen and (forced-colors:active){.jkl-field-group{border-style:revert}.jkl-field-group,.jkl-field-group:active,.jkl-field-group:focus,.jkl-field-group:hover{outline:revert;outline-style:revert}}.jkl-dormant-form-support-label{display:none;opacity:0;pointer-events:none}:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-form-support-label-font-size:var(--jkl-small-font-size);--jkl-form-support-label-line-height:var(--jkl-small-line-height);--jkl-form-support-label-font-weight:var(--jkl-small-font-weight);--jkl-form-support-label-margin:0.5rem 0 0;--jkl-form-support-label-icon-size:1.25rem;--jkl-form-support-label-icon-margin:0 -1.25rem -0.375rem 0}[data-density=compact],[data-layout-density=compact]{--jkl-form-support-label-icon-size:1.375rem;--jkl-form-support-label-icon-margin:0 -1.375rem -0.3125rem 0}.jkl-form-support-label{--color:var(--jkl-color-text-subdued);color:var(--color);display:flex;font-size:var(--jkl-form-support-label-font-size);font-weight:var(--jkl-form-support-label-font-weight);line-height:var(--jkl-form-support-label-line-height);margin:var(--jkl-form-support-label-margin);transition-delay:.15s;transition-duration:.4s;transition-property:color;transition-timing-function:ease}.jkl-form-support-label__icon,.jkl-form-support-label__icon.jkl-icon{height:var(--jkl-form-support-label-icon-size);margin:var(--jkl-form-support-label-icon-margin);opacity:0}@media screen and (forced-colors:active){.jkl-form-support-label__icon,.jkl-form-support-label__icon path,.jkl-form-support-label__icon svg,.jkl-form-support-label__icon.jkl-icon,.jkl-form-support-label__icon.jkl-icon path,.jkl-form-support-label__icon.jkl-icon svg{stroke:CanvasText;fill:Canvas}}.jkl-form-support-label--error,.jkl-form-support-label--success,.jkl-form-support-label--warning{--color:var(--jkl-color-text-default)}.jkl-form-support-label--error .jkl-form-support-label__icon,.jkl-form-support-label--success .jkl-form-support-label__icon,.jkl-form-support-label--warning .jkl-form-support-label__icon{animation:jkl-support-icon-entrance-uinnae0 .4s cubic-bezier(0,0,.3,1) .25s forwards}.jkl-form-support-label--sr-only{border:0!important;clip:rect(1px,1px,1px,1px)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-label-small-margin:0 0 0.25rem 0;--jkl-label-medium-margin:0 0 0.5rem 0;--jkl-label-large-margin:0 0 1rem -0.0625rem;--jkl-label-small-font-size:var(--jkl-small-font-size);--jkl-label-small-line-height:var(--jkl-small-line-height);--jkl-label-small-font-weight:var(--jkl-small-font-weight);--jkl-label-medium-font-size:var(--jkl-body-font-size);--jkl-label-medium-line-height:var(--jkl-body-line-height);--jkl-label-medium-font-weight:var(--jkl-body-font-weight);--jkl-label-large-font-size:var(--jkl-heading-2-font-size);--jkl-label-large-line-height:var(--jkl-heading-2-line-height);--jkl-label-large-font-weight:var(--jkl-heading-2-font-weight)}[data-density=compact],[data-layout-density=compact]{--jkl-label-small-margin:0 0 0.25rem 0;--jkl-label-medium-margin:0 0 0.5rem 0;--jkl-label-large-margin:0 0 0.75rem -0.0625rem}.jkl-label{color:var(--jkl-color-text-default);display:block;margin-left:0}.jkl-label--small{font-size:var(--jkl-label-small-font-size);font-weight:var(--jkl-label-small-font-weight);line-height:var(--jkl-label-small-line-height);margin:var(--jkl-label-small-margin)}.jkl-label--medium{font-size:var(--jkl-label-medium-font-size);font-weight:var(--jkl-label-medium-font-weight);line-height:var(--jkl-label-medium-line-height);margin:var(--jkl-label-medium-margin)}.jkl-label--large{font-size:var(--jkl-label-large-font-size);font-weight:var(--jkl-label-large-font-weight);line-height:var(--jkl-label-large-line-height);margin:var(--jkl-label-large-margin)}.jkl-label--sr-only{border:0!important;clip:rect(1px,1px,1px,1px)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}@keyframes jkl-support-icon-entrance-uinnae0{0%{margin-right:0;opacity:0;transform:scale(1)}30%{margin-right:.5rem}50%{opacity:1}70%{transform:scale(1.1)}85%{transform:scale(.9)}to{margin-right:.5rem;opacity:1;transform:scale(1)}}@media screen and (forced-colors:active){.jkl-text-input-action-button,.jkl-text-input-action-button path,.jkl-text-input-action-button svg{stroke:ButtonText;fill:ButtonFace}}
@@ -17,15 +17,15 @@
17
17
  animation: 2500ms linear infinite;
18
18
  }
19
19
  .jkl-loader__dot--left {
20
- animation-name: jkl-loader-left-spin-uoymzgh;
20
+ animation-name: jkl-loader-left-spin-uchfh61;
21
21
  margin-right: 1.71em;
22
22
  }
23
23
  .jkl-loader__dot--middle {
24
- animation-name: jkl-loader-middle-spin-uoymzgq;
24
+ animation-name: jkl-loader-middle-spin-uchfh6p;
25
25
  margin-right: 1.9em;
26
26
  }
27
27
  .jkl-loader__dot--right {
28
- animation-name: jkl-loader-right-spin-uoymzh0;
28
+ animation-name: jkl-loader-right-spin-uchfh7p;
29
29
  }
30
30
  @media screen and (forced-colors: active) {
31
31
  .jkl-loader__dot {
@@ -53,7 +53,7 @@
53
53
  margin-right: 0.3em;
54
54
  }
55
55
 
56
- @keyframes jkl-loader-left-spin-uoymzgh {
56
+ @keyframes jkl-loader-left-spin-uchfh61 {
57
57
  0% {
58
58
  transform: rotate(0) scale(0);
59
59
  }
@@ -67,7 +67,7 @@
67
67
  transform: rotate(180deg) scale(0);
68
68
  }
69
69
  }
70
- @keyframes jkl-loader-middle-spin-uoymzgq {
70
+ @keyframes jkl-loader-middle-spin-uchfh6p {
71
71
  0% {
72
72
  transform: rotate(20deg) scale(0);
73
73
  }
@@ -84,7 +84,7 @@
84
84
  transform: rotate(200deg) scale(0);
85
85
  }
86
86
  }
87
- @keyframes jkl-loader-right-spin-uoymzh0 {
87
+ @keyframes jkl-loader-right-spin-uchfh7p {
88
88
  0% {
89
89
  transform: rotate(40deg) scale(0);
90
90
  }
@@ -1 +1 @@
1
- .jkl-loader{display:flex}.jkl-loader--inline{display:inline-flex}.jkl-loader__dot{animation:2.5s linear infinite;background-color:currentColor;display:block;height:.9em;transform-origin:center;width:.9em}.jkl-loader__dot--left{animation-name:jkl-loader-left-spin-uoymzgh;margin-right:1.71em}.jkl-loader__dot--middle{animation-name:jkl-loader-middle-spin-uoymzgq;margin-right:1.9em}.jkl-loader__dot--right{animation-name:jkl-loader-right-spin-uoymzh0}@media screen and (forced-colors:active){.jkl-loader__dot{background-color:CanvasText}}.jkl-button .jkl-loader>.jkl-loader__dot,.jkl-loader--medium>.jkl-loader__dot{height:.35em;width:.35em}.jkl-button .jkl-loader>.jkl-loader__dot--left,.jkl-loader--medium>.jkl-loader__dot--left{margin-right:.585em}.jkl-button .jkl-loader>.jkl-loader__dot--middle,.jkl-loader--medium>.jkl-loader__dot--middle{margin-right:.65em}.jkl-loader--small>.jkl-loader__dot{height:.25em;width:.25em}.jkl-loader--small>.jkl-loader__dot--left{margin-right:.27em}.jkl-loader--small>.jkl-loader__dot--middle{margin-right:.3em}@keyframes jkl-loader-left-spin-uoymzgh{0%{transform:rotate(0) scale(0)}30%{transform:rotate(90deg) scale(1)}70%{transform:rotate(180deg) scale(0)}to{transform:rotate(180deg) scale(0)}}@keyframes jkl-loader-middle-spin-uoymzgq{0%{transform:rotate(20deg) scale(0)}10%{transform:rotate(20deg) scale(0)}40%{transform:rotate(110deg) scale(1.4)}85%{transform:rotate(200deg) scale(0)}to{transform:rotate(200deg) scale(0)}}@keyframes jkl-loader-right-spin-uoymzh0{0%{transform:rotate(40deg) scale(0)}20%{transform:rotate(40deg) scale(0)}50%{transform:rotate(130deg) scale(1)}to{transform:rotate(220deg) scale(0)}}
1
+ .jkl-loader{display:flex}.jkl-loader--inline{display:inline-flex}.jkl-loader__dot{animation:2.5s linear infinite;background-color:currentColor;display:block;height:.9em;transform-origin:center;width:.9em}.jkl-loader__dot--left{animation-name:jkl-loader-left-spin-uchfh61;margin-right:1.71em}.jkl-loader__dot--middle{animation-name:jkl-loader-middle-spin-uchfh6p;margin-right:1.9em}.jkl-loader__dot--right{animation-name:jkl-loader-right-spin-uchfh7p}@media screen and (forced-colors:active){.jkl-loader__dot{background-color:CanvasText}}.jkl-button .jkl-loader>.jkl-loader__dot,.jkl-loader--medium>.jkl-loader__dot{height:.35em;width:.35em}.jkl-button .jkl-loader>.jkl-loader__dot--left,.jkl-loader--medium>.jkl-loader__dot--left{margin-right:.585em}.jkl-button .jkl-loader>.jkl-loader__dot--middle,.jkl-loader--medium>.jkl-loader__dot--middle{margin-right:.65em}.jkl-loader--small>.jkl-loader__dot{height:.25em;width:.25em}.jkl-loader--small>.jkl-loader__dot--left{margin-right:.27em}.jkl-loader--small>.jkl-loader__dot--middle{margin-right:.3em}@keyframes jkl-loader-left-spin-uchfh61{0%{transform:rotate(0) scale(0)}30%{transform:rotate(90deg) scale(1)}70%{transform:rotate(180deg) scale(0)}to{transform:rotate(180deg) scale(0)}}@keyframes jkl-loader-middle-spin-uchfh6p{0%{transform:rotate(20deg) scale(0)}10%{transform:rotate(20deg) scale(0)}40%{transform:rotate(110deg) scale(1.4)}85%{transform:rotate(200deg) scale(0)}to{transform:rotate(200deg) scale(0)}}@keyframes jkl-loader-right-spin-uchfh7p{0%{transform:rotate(40deg) scale(0)}20%{transform:rotate(40deg) scale(0)}50%{transform:rotate(130deg) scale(1)}to{transform:rotate(220deg) scale(0)}}
@@ -36,7 +36,7 @@
36
36
  bottom: 0;
37
37
  width: 12.5rem;
38
38
  background: linear-gradient(89.17deg, rgba(249, 249, 249, 0) 0.8%, var(--jkl-skeleton-sweeper-color) 50.09%, rgba(249, 249, 249, 0) 96.31%);
39
- animation: var(--jkl-skeleton-sweep-duration) ease infinite jkl-sweep-upkn61e;
39
+ animation: var(--jkl-skeleton-sweep-duration) ease infinite jkl-sweep-ulfy2lk;
40
40
  }
41
41
  @media (width >= 0) and (max-width: 679px) {
42
42
  .jkl-skeleton-animation {
@@ -67,7 +67,7 @@
67
67
  @media screen and (forced-colors: active) {
68
68
  .jkl-skeleton-element {
69
69
  border: 1px solid CanvasText;
70
- animation: 2s ease infinite jkl-blink-upkn620;
70
+ animation: 2s ease infinite jkl-blink-ulfy2ll;
71
71
  }
72
72
  }
73
73
 
@@ -123,11 +123,11 @@
123
123
  }
124
124
  @media screen and (forced-colors: active) {
125
125
  .jkl-skeleton-table {
126
- animation: 2s ease-in-out infinite jkl-blink-upkn620;
126
+ animation: 2s ease-in-out infinite jkl-blink-ulfy2ll;
127
127
  }
128
128
  }
129
129
 
130
- @keyframes jkl-sweep-upkn61e {
130
+ @keyframes jkl-sweep-ulfy2lk {
131
131
  0% {
132
132
  transform: translateX(calc(0vw - 200px));
133
133
  }
@@ -135,7 +135,7 @@
135
135
  transform: translateX(calc(100vw + 400px));
136
136
  }
137
137
  }
138
- @keyframes jkl-blink-upkn620 {
138
+ @keyframes jkl-blink-ulfy2ll {
139
139
  0% {
140
140
  opacity: 1;
141
141
  }
@@ -1 +1 @@
1
- @media screen and (prefers-color-scheme:light){:root{--jkl-skeleton-element-color:#e0dbd4;--jkl-skeleton-sweeper-color:#f9f9f9}}[data-theme=light]{--jkl-skeleton-element-color:#e0dbd4;--jkl-skeleton-sweeper-color:#f9f9f9}@media screen and (prefers-color-scheme:dark){:root{--jkl-skeleton-element-color:#636060;--jkl-skeleton-sweeper-color:#1b1917}}[data-theme=dark]{--jkl-skeleton-element-color:#636060;--jkl-skeleton-sweeper-color:#1b1917}.jkl-skeleton-animation{--jkl-skeleton-sweep-duration:3s;overflow:hidden;position:relative}.jkl-skeleton-animation:after{animation:var(--jkl-skeleton-sweep-duration) ease infinite jkl-sweep-upkn61e;background:linear-gradient(89.17deg,#f9f9f900 .8%,var(--jkl-skeleton-sweeper-color) 50.09%,#f9f9f900 96.31%);bottom:0;content:" ";position:absolute;top:0;width:12.5rem}@media (width >= 0) and (max-width:679px){.jkl-skeleton-animation{width:9.375rem}}@media screen and (prefers-reduced-motion:reduce){.jkl-skeleton-animation:after{background:none}}@media screen and (forced-colors:active){.jkl-skeleton-animation:after{animation:none}}.jkl-skeleton-animation--compact:after{width:9.375rem}.jkl-skeleton-element{background-color:var(--jkl-skeleton-element-color);border-radius:.125rem}.jkl-skeleton-element--circle{border-radius:50%}@media screen and (forced-colors:active){.jkl-skeleton-element{animation:jkl-blink-upkn620 2s ease infinite;border:1px solid CanvasText}}.jkl-skeleton-input{display:flex;flex-direction:column;gap:.75rem}.jkl-skeleton-input__checkbox{display:flex;flex-direction:row;flex-wrap:nowrap;gap:.5rem}@media (width >= 0) and (max-width:679px){.jkl-skeleton-input{gap:.5rem}}.jkl-skeleton-input--compact:after{gap:.5rem}.jkl-skeleton-table{display:flex;flex-direction:column}.jkl-skeleton-table__header,.jkl-skeleton-table__row{border-bottom:1px solid var(--jkl-skeleton-element-color);display:flex;flex-direction:row;justify-content:space-between}.jkl-skeleton-table__header{padding:.75rem .5rem}.jkl-skeleton-table__row{padding:1rem .5rem}@media (width >= 0) and (max-width:679px){.jkl-skeleton-table__header{padding:.5rem .25rem}.jkl-skeleton-table__row{padding:.75rem .25rem}}.jkl-skeleton-table--compact::after__header{padding:.5rem .25rem}.jkl-skeleton-table--compact::after__row{padding:.75rem .25rem}@media screen and (forced-colors:active){.jkl-skeleton-table{animation:jkl-blink-upkn620 2s ease-in-out infinite}}@keyframes jkl-sweep-upkn61e{0%{transform:translateX(-200px)}80%,to{transform:translateX(calc(100vw + 400px))}}@keyframes jkl-blink-upkn620{0%{opacity:1}40%,50%{opacity:.3}70%,to{opacity:1}}
1
+ @media screen and (prefers-color-scheme:light){:root{--jkl-skeleton-element-color:#e0dbd4;--jkl-skeleton-sweeper-color:#f9f9f9}}[data-theme=light]{--jkl-skeleton-element-color:#e0dbd4;--jkl-skeleton-sweeper-color:#f9f9f9}@media screen and (prefers-color-scheme:dark){:root{--jkl-skeleton-element-color:#636060;--jkl-skeleton-sweeper-color:#1b1917}}[data-theme=dark]{--jkl-skeleton-element-color:#636060;--jkl-skeleton-sweeper-color:#1b1917}.jkl-skeleton-animation{--jkl-skeleton-sweep-duration:3s;overflow:hidden;position:relative}.jkl-skeleton-animation:after{animation:var(--jkl-skeleton-sweep-duration) ease infinite jkl-sweep-ulfy2lk;background:linear-gradient(89.17deg,#f9f9f900 .8%,var(--jkl-skeleton-sweeper-color) 50.09%,#f9f9f900 96.31%);bottom:0;content:" ";position:absolute;top:0;width:12.5rem}@media (width >= 0) and (max-width:679px){.jkl-skeleton-animation{width:9.375rem}}@media screen and (prefers-reduced-motion:reduce){.jkl-skeleton-animation:after{background:none}}@media screen and (forced-colors:active){.jkl-skeleton-animation:after{animation:none}}.jkl-skeleton-animation--compact:after{width:9.375rem}.jkl-skeleton-element{background-color:var(--jkl-skeleton-element-color);border-radius:.125rem}.jkl-skeleton-element--circle{border-radius:50%}@media screen and (forced-colors:active){.jkl-skeleton-element{animation:jkl-blink-ulfy2ll 2s ease infinite;border:1px solid CanvasText}}.jkl-skeleton-input{display:flex;flex-direction:column;gap:.75rem}.jkl-skeleton-input__checkbox{display:flex;flex-direction:row;flex-wrap:nowrap;gap:.5rem}@media (width >= 0) and (max-width:679px){.jkl-skeleton-input{gap:.5rem}}.jkl-skeleton-input--compact:after{gap:.5rem}.jkl-skeleton-table{display:flex;flex-direction:column}.jkl-skeleton-table__header,.jkl-skeleton-table__row{border-bottom:1px solid var(--jkl-skeleton-element-color);display:flex;flex-direction:row;justify-content:space-between}.jkl-skeleton-table__header{padding:.75rem .5rem}.jkl-skeleton-table__row{padding:1rem .5rem}@media (width >= 0) and (max-width:679px){.jkl-skeleton-table__header{padding:.5rem .25rem}.jkl-skeleton-table__row{padding:.75rem .25rem}}.jkl-skeleton-table--compact::after__header{padding:.5rem .25rem}.jkl-skeleton-table--compact::after__row{padding:.75rem .25rem}@media screen and (forced-colors:active){.jkl-skeleton-table{animation:jkl-blink-ulfy2ll 2s ease-in-out infinite}}@keyframes jkl-sweep-ulfy2lk{0%{transform:translateX(-200px)}80%,to{transform:translateX(calc(100vw + 400px))}}@keyframes jkl-blink-ulfy2ll{0%{opacity:1}40%,50%{opacity:.3}70%,to{opacity:1}}
@@ -168,7 +168,7 @@
168
168
  --background-color: var(--jkl-color-background-alert-success);
169
169
  }
170
170
  .jkl-message--dismissed {
171
- animation: jkl-dismiss-u0oevfi 400ms ease-in-out forwards;
171
+ animation: jkl-dismiss-u67ow3a 400ms ease-in-out forwards;
172
172
  transition: visibility 0ms 400ms;
173
173
  visibility: hidden;
174
174
  }
@@ -188,7 +188,7 @@
188
188
  }
189
189
  }
190
190
 
191
- @keyframes jkl-dismiss-u0oevfi {
191
+ @keyframes jkl-dismiss-u67ow3a {
192
192
  from {
193
193
  opacity: 1;
194
194
  transform: translate3d(0, 0, 0);
@@ -1 +1 @@
1
- :root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-message-content-font-size:var(--jkl-body-font-size);--jkl-message-content-line-height:var(--jkl-body-line-height);--jkl-message-content-font-weight:var(--jkl-body-font-weight);--jkl-message-title-font-size:var(--jkl-heading-4-font-size);--jkl-message-title-line-height:var(--jkl-heading-4-line-height);--jkl-message-title-font-weight:var(--jkl-heading-4-font-weight);--jkl-message-icon-size:1.5rem;--jkl-message-icon-left:1rem;--jkl-message-icon-top:1.5rem;--jkl-message-title-margin:0 0 0.25rem 0;--jkl-message-dismiss-button-size:2.75rem;--jkl-message-gap:0.75rem;--jkl-message-padding:1rem 0.75rem}@media (min-width:680px){:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-message-gap:1rem;--jkl-message-padding:1.5rem 1rem}}[data-density=compact],[data-layout-density=compact]{--jkl-message-content-font-size:var(--jkl-small-font-size);--jkl-message-content-line-height:var(--jkl-small-line-height);--jkl-message-content-font-weight:var(--jkl-small-font-weight);--jkl-message-title-font-size:var(--jkl-heading-5-font-size);--jkl-message-title-line-height:var(--jkl-heading-5-line-height);--jkl-message-title-font-weight:var(--jkl-heading-5-font-weight);--jkl-message-icon-size:1.25rem;--jkl-message-icon-left:0.375rem;--jkl-message-icon-top:0.875rem;--jkl-message-dismiss-button-size:2rem;--jkl-message-gap:0.5rem;--jkl-message-padding:0.75rem 0.5rem}.jkl-message{--background-color:var(--jkl-color-background-alert-neutral);--text-color:var(--jkl-color-text-on-alert);align-items:start;background-color:var(--background-color);border-radius:.25rem;box-sizing:border-box;color:var(--text-color);display:grid;grid-template-areas:"icon content dismiss";grid-template-columns:auto 1fr auto;max-width:35rem;padding:var(--jkl-message-padding);width:100%}.jkl-message__icon{grid-area:icon;margin-right:var(--jkl-message-gap);width:var(--jkl-message-icon-size)}@media screen and (forced-colors:active){.jkl-message__icon,.jkl-message__icon path,.jkl-message__icon svg{stroke:CanvasText}}.jkl-message__content{grid-area:content}.jkl-message__message{font-size:var(--jkl-message-content-font-size);font-weight:var(--jkl-message-content-font-weight);line-height:var(--jkl-message-content-line-height);margin-top:-.125rem}.jkl-message__title{font-size:var(--jkl-message-title-font-size);font-weight:var(--jkl-message-title-font-weight);line-height:var(--jkl-message-title-line-height);margin:var(--jkl-message-title-margin)}.jkl-message__title~.jkl-message__message{margin-top:0}.jkl-message__dismiss-button{background-color:initial;border-style:none;color:inherit;cursor:pointer;grid-area:dismiss;justify-self:end;margin-left:var(--jkl-message-gap);outline:0;outline-style:none;padding:0;position:relative}.jkl-message__dismiss-button:active,.jkl-message__dismiss-button:focus,.jkl-message__dismiss-button:hover{outline:0;outline-style:none}@media screen and (forced-colors:active){.jkl-message__dismiss-button{border-style:revert}.jkl-message__dismiss-button,.jkl-message__dismiss-button:active,.jkl-message__dismiss-button:focus,.jkl-message__dismiss-button:hover{outline:revert;outline-style:revert}.jkl-message__dismiss-button,.jkl-message__dismiss-button path,.jkl-message__dismiss-button svg{stroke:ButtonText}.jkl-message__dismiss-button{background-color:ButtonFace}}.jkl-message__dismiss-button:after{--tap-increment:calc((var(--jkl-message-dismiss-button-size) - 1.25rem)/2*-1);content:"";inset:var(--tap-increment) var(--tap-increment) var(--tap-increment) var(--tap-increment);position:absolute}.jkl-message__dismiss-button:hover{color:#636060}@media screen and (forced-colors:active){.jkl-message__dismiss-button:hover,.jkl-message__dismiss-button:hover path,.jkl-message__dismiss-button:hover svg{stroke:ButtonText}}.jkl-message__dismiss-button:focus-visible{outline:2px solid var(--jkl-color-border-action);outline-offset:0}.jkl-message--full{max-width:100%}.jkl-message--info{--background-color:var(--jkl-color-background-alert-info)}.jkl-message--warning{--background-color:var(--jkl-color-background-alert-warning)}.jkl-message--error{--background-color:var(--jkl-color-background-alert-error)}.jkl-message--success{--background-color:var(--jkl-color-background-alert-success)}.jkl-message--dismissed{animation:jkl-dismiss-u0oevfi .4s ease-in-out forwards;transition:visibility 0s .4s;visibility:hidden}@media screen and (forced-colors:active){.jkl-message{border:2px solid CanvasText}.jkl-message--info{border-style:dotted}.jkl-message--warning{border-style:dashed}.jkl-message--error{border-style:double;border-width:4px}}@keyframes jkl-dismiss-u0oevfi{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-50%,0)}}.jkl-form-error-message{padding-bottom:2.5rem}
1
+ :root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-message-content-font-size:var(--jkl-body-font-size);--jkl-message-content-line-height:var(--jkl-body-line-height);--jkl-message-content-font-weight:var(--jkl-body-font-weight);--jkl-message-title-font-size:var(--jkl-heading-4-font-size);--jkl-message-title-line-height:var(--jkl-heading-4-line-height);--jkl-message-title-font-weight:var(--jkl-heading-4-font-weight);--jkl-message-icon-size:1.5rem;--jkl-message-icon-left:1rem;--jkl-message-icon-top:1.5rem;--jkl-message-title-margin:0 0 0.25rem 0;--jkl-message-dismiss-button-size:2.75rem;--jkl-message-gap:0.75rem;--jkl-message-padding:1rem 0.75rem}@media (min-width:680px){:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-message-gap:1rem;--jkl-message-padding:1.5rem 1rem}}[data-density=compact],[data-layout-density=compact]{--jkl-message-content-font-size:var(--jkl-small-font-size);--jkl-message-content-line-height:var(--jkl-small-line-height);--jkl-message-content-font-weight:var(--jkl-small-font-weight);--jkl-message-title-font-size:var(--jkl-heading-5-font-size);--jkl-message-title-line-height:var(--jkl-heading-5-line-height);--jkl-message-title-font-weight:var(--jkl-heading-5-font-weight);--jkl-message-icon-size:1.25rem;--jkl-message-icon-left:0.375rem;--jkl-message-icon-top:0.875rem;--jkl-message-dismiss-button-size:2rem;--jkl-message-gap:0.5rem;--jkl-message-padding:0.75rem 0.5rem}.jkl-message{--background-color:var(--jkl-color-background-alert-neutral);--text-color:var(--jkl-color-text-on-alert);align-items:start;background-color:var(--background-color);border-radius:.25rem;box-sizing:border-box;color:var(--text-color);display:grid;grid-template-areas:"icon content dismiss";grid-template-columns:auto 1fr auto;max-width:35rem;padding:var(--jkl-message-padding);width:100%}.jkl-message__icon{grid-area:icon;margin-right:var(--jkl-message-gap);width:var(--jkl-message-icon-size)}@media screen and (forced-colors:active){.jkl-message__icon,.jkl-message__icon path,.jkl-message__icon svg{stroke:CanvasText}}.jkl-message__content{grid-area:content}.jkl-message__message{font-size:var(--jkl-message-content-font-size);font-weight:var(--jkl-message-content-font-weight);line-height:var(--jkl-message-content-line-height);margin-top:-.125rem}.jkl-message__title{font-size:var(--jkl-message-title-font-size);font-weight:var(--jkl-message-title-font-weight);line-height:var(--jkl-message-title-line-height);margin:var(--jkl-message-title-margin)}.jkl-message__title~.jkl-message__message{margin-top:0}.jkl-message__dismiss-button{background-color:initial;border-style:none;color:inherit;cursor:pointer;grid-area:dismiss;justify-self:end;margin-left:var(--jkl-message-gap);outline:0;outline-style:none;padding:0;position:relative}.jkl-message__dismiss-button:active,.jkl-message__dismiss-button:focus,.jkl-message__dismiss-button:hover{outline:0;outline-style:none}@media screen and (forced-colors:active){.jkl-message__dismiss-button{border-style:revert}.jkl-message__dismiss-button,.jkl-message__dismiss-button:active,.jkl-message__dismiss-button:focus,.jkl-message__dismiss-button:hover{outline:revert;outline-style:revert}.jkl-message__dismiss-button,.jkl-message__dismiss-button path,.jkl-message__dismiss-button svg{stroke:ButtonText}.jkl-message__dismiss-button{background-color:ButtonFace}}.jkl-message__dismiss-button:after{--tap-increment:calc((var(--jkl-message-dismiss-button-size) - 1.25rem)/2*-1);content:"";inset:var(--tap-increment) var(--tap-increment) var(--tap-increment) var(--tap-increment);position:absolute}.jkl-message__dismiss-button:hover{color:#636060}@media screen and (forced-colors:active){.jkl-message__dismiss-button:hover,.jkl-message__dismiss-button:hover path,.jkl-message__dismiss-button:hover svg{stroke:ButtonText}}.jkl-message__dismiss-button:focus-visible{outline:2px solid var(--jkl-color-border-action);outline-offset:0}.jkl-message--full{max-width:100%}.jkl-message--info{--background-color:var(--jkl-color-background-alert-info)}.jkl-message--warning{--background-color:var(--jkl-color-background-alert-warning)}.jkl-message--error{--background-color:var(--jkl-color-background-alert-error)}.jkl-message--success{--background-color:var(--jkl-color-background-alert-success)}.jkl-message--dismissed{animation:jkl-dismiss-u67ow3a .4s ease-in-out forwards;transition:visibility 0s .4s;visibility:hidden}@media screen and (forced-colors:active){.jkl-message{border:2px solid CanvasText}.jkl-message--info{border-style:dotted}.jkl-message--warning{border-style:dashed}.jkl-message--error{border-style:double;border-width:4px}}@keyframes jkl-dismiss-u67ow3a{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-50%,0)}}.jkl-form-error-message{padding-bottom:2.5rem}
@@ -37,11 +37,11 @@
37
37
  }
38
38
 
39
39
  .jkl-countdown__tracker {
40
- animation: jkl-downcount-ube8wvv var(--duration) linear forwards;
40
+ animation: jkl-downcount-upwo4gp var(--duration) linear forwards;
41
41
  animation-play-state: var(--play-state, running);
42
42
  }
43
43
 
44
- @keyframes jkl-downcount-ube8wvv {
44
+ @keyframes jkl-downcount-upwo4gp {
45
45
  from {
46
46
  width: 100%;
47
47
  }
@@ -1 +1 @@
1
- .jkl-countdown,.jkl-progress-bar{--track-color:var(--jkl-color-border-separator);--bar-color:var(--jkl-color-border-input-focus);--bar-height:0.25rem;background-color:var(--track-color);border-radius:6.25rem;height:var(--bar-height);overflow:hidden;width:100%}.jkl-countdown__tracker,.jkl-progress-bar__tracker{background-color:var(--bar-color);display:block;height:var(--bar-height)}@media screen and (forced-colors:active){.jkl-countdown,.jkl-progress-bar{background-color:Canvas}.jkl-countdown__tracker,.jkl-progress-bar__tracker{background-color:CanvasText}}.jkl-progress-bar__tracker{transition-duration:.15s;transition-property:width;transition-timing-function:ease}.jkl-countdown__tracker{animation:jkl-downcount-ube8wvv var(--duration) linear forwards;animation-play-state:var(--play-state,running)}@keyframes jkl-downcount-ube8wvv{0%{width:100%}to{width:0}}
1
+ .jkl-countdown,.jkl-progress-bar{--track-color:var(--jkl-color-border-separator);--bar-color:var(--jkl-color-border-input-focus);--bar-height:0.25rem;background-color:var(--track-color);border-radius:6.25rem;height:var(--bar-height);overflow:hidden;width:100%}.jkl-countdown__tracker,.jkl-progress-bar__tracker{background-color:var(--bar-color);display:block;height:var(--bar-height)}@media screen and (forced-colors:active){.jkl-countdown,.jkl-progress-bar{background-color:Canvas}.jkl-countdown__tracker,.jkl-progress-bar__tracker{background-color:CanvasText}}.jkl-progress-bar__tracker{transition-duration:.15s;transition-property:width;transition-timing-function:ease}.jkl-countdown__tracker{animation:jkl-downcount-upwo4gp var(--duration) linear forwards;animation-play-state:var(--play-state,running)}@keyframes jkl-downcount-upwo4gp{0%{width:100%}to{width:0}}
@@ -44,7 +44,7 @@
44
44
  --jkl-radio-button-label-font-weight: var(--jkl-small-font-weight);
45
45
  }
46
46
 
47
- @keyframes jkl-dot-in-uczl3hc {
47
+ @keyframes jkl-dot-in-ujunlzj {
48
48
  0% {
49
49
  transform: scale(0.8);
50
50
  }
@@ -87,7 +87,7 @@
87
87
  }
88
88
  .jkl-radio-button__input:checked + .jkl-radio-button__label > .jkl-radio-button__dot::after {
89
89
  --dot-color: var(--jkl-color-border-action);
90
- animation: jkl-dot-in-uczl3hc 150ms ease;
90
+ animation: jkl-dot-in-ujunlzj 150ms ease;
91
91
  }
92
92
  @media screen and (forced-colors: active) {
93
93
  .jkl-radio-button__input:checked + .jkl-radio-button__label > .jkl-radio-button__dot::after {