@dnb/eufemia 10.65.0 → 10.65.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/cjs/components/date-picker/DatePicker.d.ts +3 -1
  3. package/cjs/components/date-picker/DatePicker.js +3 -1
  4. package/cjs/components/date-picker/DatePicker.js.map +1 -1
  5. package/cjs/components/date-picker/DatePickerAddon.js +8 -1
  6. package/cjs/components/date-picker/DatePickerAddon.js.map +1 -1
  7. package/cjs/extensions/forms/DataContext/Context.d.ts +1 -1
  8. package/cjs/extensions/forms/DataContext/Context.js.map +1 -1
  9. package/cjs/extensions/forms/DataContext/FieldBoundary/FieldBoundaryContext.d.ts +1 -1
  10. package/cjs/extensions/forms/DataContext/FieldBoundary/FieldBoundaryContext.js.map +1 -1
  11. package/cjs/extensions/forms/DataContext/FieldBoundary/FieldBoundaryProvider.js +2 -2
  12. package/cjs/extensions/forms/DataContext/FieldBoundary/FieldBoundaryProvider.js.map +1 -1
  13. package/cjs/extensions/forms/DataContext/Provider/Provider.js +2 -2
  14. package/cjs/extensions/forms/DataContext/Provider/Provider.js.map +1 -1
  15. package/cjs/extensions/forms/Iterate/PushContainer/PushContainer.js +7 -2
  16. package/cjs/extensions/forms/Iterate/PushContainer/PushContainer.js.map +1 -1
  17. package/cjs/extensions/forms/hooks/useFieldProps.js +8 -8
  18. package/cjs/extensions/forms/hooks/useFieldProps.js.map +1 -1
  19. package/cjs/shared/Eufemia.d.ts +1 -1
  20. package/cjs/shared/Eufemia.js +2 -2
  21. package/cjs/shared/Eufemia.js.map +1 -1
  22. package/cjs/style/core/scopes.scss +1 -1
  23. package/cjs/style/dnb-ui-basis.css +1 -1
  24. package/cjs/style/dnb-ui-basis.min.css +1 -1
  25. package/cjs/style/dnb-ui-body.css +1 -1
  26. package/cjs/style/dnb-ui-body.min.css +1 -1
  27. package/cjs/style/dnb-ui-core.css +1 -1
  28. package/cjs/style/dnb-ui-core.min.css +1 -1
  29. package/components/date-picker/DatePicker.d.ts +3 -1
  30. package/components/date-picker/DatePicker.js +3 -1
  31. package/components/date-picker/DatePicker.js.map +1 -1
  32. package/components/date-picker/DatePickerAddon.js +6 -1
  33. package/components/date-picker/DatePickerAddon.js.map +1 -1
  34. package/es/components/date-picker/DatePicker.d.ts +3 -1
  35. package/es/components/date-picker/DatePicker.js +3 -1
  36. package/es/components/date-picker/DatePicker.js.map +1 -1
  37. package/es/components/date-picker/DatePickerAddon.js +6 -1
  38. package/es/components/date-picker/DatePickerAddon.js.map +1 -1
  39. package/es/extensions/forms/DataContext/Context.d.ts +1 -1
  40. package/es/extensions/forms/DataContext/Context.js.map +1 -1
  41. package/es/extensions/forms/DataContext/FieldBoundary/FieldBoundaryContext.d.ts +1 -1
  42. package/es/extensions/forms/DataContext/FieldBoundary/FieldBoundaryContext.js.map +1 -1
  43. package/es/extensions/forms/DataContext/FieldBoundary/FieldBoundaryProvider.js +2 -2
  44. package/es/extensions/forms/DataContext/FieldBoundary/FieldBoundaryProvider.js.map +1 -1
  45. package/es/extensions/forms/DataContext/Provider/Provider.js +2 -2
  46. package/es/extensions/forms/DataContext/Provider/Provider.js.map +1 -1
  47. package/es/extensions/forms/Iterate/PushContainer/PushContainer.js +7 -2
  48. package/es/extensions/forms/Iterate/PushContainer/PushContainer.js.map +1 -1
  49. package/es/extensions/forms/hooks/useFieldProps.js +8 -8
  50. package/es/extensions/forms/hooks/useFieldProps.js.map +1 -1
  51. package/es/shared/Eufemia.d.ts +1 -1
  52. package/es/shared/Eufemia.js +2 -2
  53. package/es/shared/Eufemia.js.map +1 -1
  54. package/es/style/core/scopes.scss +1 -1
  55. package/es/style/dnb-ui-basis.css +1 -1
  56. package/es/style/dnb-ui-basis.min.css +1 -1
  57. package/es/style/dnb-ui-body.css +1 -1
  58. package/es/style/dnb-ui-body.min.css +1 -1
  59. package/es/style/dnb-ui-core.css +1 -1
  60. package/es/style/dnb-ui-core.min.css +1 -1
  61. package/esm/dnb-ui-basis.min.mjs +1 -1
  62. package/esm/dnb-ui-components.min.mjs +1 -1
  63. package/esm/dnb-ui-elements.min.mjs +1 -1
  64. package/esm/dnb-ui-extensions.min.mjs +3 -3
  65. package/esm/dnb-ui-lib.min.mjs +1 -1
  66. package/extensions/forms/DataContext/Context.d.ts +1 -1
  67. package/extensions/forms/DataContext/Context.js.map +1 -1
  68. package/extensions/forms/DataContext/FieldBoundary/FieldBoundaryContext.d.ts +1 -1
  69. package/extensions/forms/DataContext/FieldBoundary/FieldBoundaryContext.js.map +1 -1
  70. package/extensions/forms/DataContext/FieldBoundary/FieldBoundaryProvider.js +2 -2
  71. package/extensions/forms/DataContext/FieldBoundary/FieldBoundaryProvider.js.map +1 -1
  72. package/extensions/forms/DataContext/Provider/Provider.js +2 -2
  73. package/extensions/forms/DataContext/Provider/Provider.js.map +1 -1
  74. package/extensions/forms/Iterate/PushContainer/PushContainer.js +7 -2
  75. package/extensions/forms/Iterate/PushContainer/PushContainer.js.map +1 -1
  76. package/extensions/forms/hooks/useFieldProps.js +8 -8
  77. package/extensions/forms/hooks/useFieldProps.js.map +1 -1
  78. package/package.json +1 -1
  79. package/shared/Eufemia.d.ts +1 -1
  80. package/shared/Eufemia.js +2 -2
  81. package/shared/Eufemia.js.map +1 -1
  82. package/style/core/scopes.scss +1 -1
  83. package/style/dnb-ui-basis.css +1 -1
  84. package/style/dnb-ui-basis.min.css +1 -1
  85. package/style/dnb-ui-body.css +1 -1
  86. package/style/dnb-ui-body.min.css +1 -1
  87. package/style/dnb-ui-core.css +1 -1
  88. package/style/dnb-ui-core.min.css +1 -1
  89. package/umd/dnb-ui-basis.min.js +1 -1
  90. package/umd/dnb-ui-components.min.js +1 -1
  91. package/umd/dnb-ui-elements.min.js +1 -1
  92. package/umd/dnb-ui-extensions.min.js +2 -2
  93. package/umd/dnb-ui-lib.min.js +1 -1
@@ -1,2 +1,2 @@
1
- export declare const version = "10.65.0";
1
+ export declare const version = "10.65.1";
2
2
  export declare function init(): void;
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.init = init;
7
7
  exports.version = void 0;
8
- const version = '10.65.0';
8
+ const version = '10.65.1';
9
9
  exports.version = version;
10
10
  function init() {
11
11
  if (typeof window !== 'undefined') {
12
12
  class Eufemia {
13
13
  get version() {
14
- return '10.65.0';
14
+ return '10.65.1';
15
15
  }
16
16
  }
17
17
  window.Eufemia = new Eufemia();
@@ -1 +1 @@
1
- {"version":3,"file":"Eufemia.js","names":["version","exports","init","window","Eufemia"],"sources":["../../../src/shared/Eufemia.ts"],"sourcesContent":["export const version = '10.65.0'\n\nexport function init() {\n if (typeof window !== 'undefined') {\n class Eufemia {\n get version() {\n return '10.65.0'\n }\n }\n\n window.Eufemia = new Eufemia()\n }\n}\n"],"mappings":";;;;;;;AAAO,MAAMA,OAAO,GAAG,SAAS;AAAAC,OAAA,CAAAD,OAAA,GAAAA,OAAA;AAEzB,SAASE,IAAIA,CAAA,EAAG;EACrB,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;IACjC,MAAMC,OAAO,CAAC;MACZ,IAAIJ,OAAOA,CAAA,EAAG;QACZ,OAAO,SAAS;MAClB;IACF;IAEAG,MAAM,CAACC,OAAO,GAAG,IAAIA,OAAO,CAAC,CAAC;EAChC;AACF"}
1
+ {"version":3,"file":"Eufemia.js","names":["version","exports","init","window","Eufemia"],"sources":["../../../src/shared/Eufemia.ts"],"sourcesContent":["export const version = '10.65.1'\n\nexport function init() {\n if (typeof window !== 'undefined') {\n class Eufemia {\n get version() {\n return '10.65.1'\n }\n }\n\n window.Eufemia = new Eufemia()\n }\n}\n"],"mappings":";;;;;;;AAAO,MAAMA,OAAO,GAAG,SAAS;AAAAC,OAAA,CAAAD,OAAA,GAAAA,OAAA;AAEzB,SAASE,IAAIA,CAAA,EAAG;EACrB,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;IACjC,MAAMC,OAAO,CAAC;MACZ,IAAIJ,OAAOA,CAAA,EAAG;QACZ,OAAO,SAAS;MAClB;IACF;IAEAG,MAAM,CAACC,OAAO,GAAG,IAAIA,OAAO,CAAC,CAAC;EAChC;AACF"}
@@ -45,7 +45,7 @@
45
45
  word-break: break-word;
46
46
 
47
47
  // Will add this to the body tag – later we can test for a version mismatch
48
- --eufemia-version: '10.65.0';
48
+ --eufemia-version: '10.65.1';
49
49
 
50
50
  @content;
51
51
  }
@@ -244,7 +244,7 @@ body {
244
244
  /* stylelint-disable-next-line */
245
245
  -webkit-text-size-adjust: 100%;
246
246
  word-break: break-word;
247
- --eufemia-version: "10.65.0";
247
+ --eufemia-version: "10.65.1";
248
248
  }
249
249
  .dnb-core-style *,
250
250
  .dnb-core-style ::before,
@@ -1 +1 @@
1
- @charset "UTF-8";html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{padding:0;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}body{margin:0}.dnb-core-style{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.65.0";color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis);tab-size:4;-moz-tab-size:4;word-break:break-word}.dnb-core-style *,.dnb-core-style :after,.dnb-core-style :before{background-repeat:no-repeat;box-sizing:border-box}.dnb-core-style :after,.dnb-core-style :before{text-decoration:inherit;vertical-align:inherit}.dnb-core-style hr{height:0;overflow:visible}.dnb-core-style main{display:block}.dnb-core-style nav ol,.dnb-core-style nav ul{list-style:none}.dnb-core-style abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.dnb-core-style b,.dnb-core-style strong{font-weight:bolder}.dnb-core-style code,.dnb-core-style kbd,.dnb-core-style pre,.dnb-core-style samp{font-family:var(--font-family-monospace)}.dnb-core-style ::selection{background-color:#b3d4fc;color:#000;text-shadow:none}.dnb-core-style audio,.dnb-core-style canvas,.dnb-core-style iframe,.dnb-core-style img,.dnb-core-style svg,.dnb-core-style video{vertical-align:middle}.dnb-core-style audio,.dnb-core-style video{display:inline-block}.dnb-core-style audio:not([controls]){display:none;height:0}.dnb-core-style img{border-style:none}.dnb-core-style svg:not([fill]){fill:currentcolor}.dnb-core-style svg:not(:root){overflow:hidden}.dnb-core-style table{border-collapse:collapse}.dnb-core-style button,.dnb-core-style input,.dnb-core-style select,.dnb-core-style textarea{font-family:inherit;font-size:inherit;line-height:inherit}.dnb-core-style button,.dnb-core-style figure,.dnb-core-style input,.dnb-core-style select{margin:0}.dnb-core-style button{overflow:visible;text-transform:none}.dnb-core-style input{overflow:visible;word-break:normal}.dnb-core-style legend{color:inherit;display:table;max-width:100%;white-space:normal}.dnb-core-style progress{display:inline-block;vertical-align:baseline}.dnb-core-style select{text-transform:none}.dnb-core-style textarea{overflow:auto;resize:vertical}.dnb-core-style [type=checkbox],.dnb-core-style [type=radio]{padding:0}.dnb-core-style input[type=search]{-webkit-appearance:textfield;appearance:textfield;outline-offset:-2px}.dnb-core-style ::-webkit-inner-spin-button,.dnb-core-style ::-webkit-outer-spin-button{height:auto}.dnb-core-style ::input-placeholder{color:inherit;opacity:.54}.dnb-core-style ::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.dnb-core-style ::-webkit-file-upload-button{background-color:transparent;border:none;font:inherit}.dnb-core-style ::-moz-focus-inner{border-style:none;padding:0}.dnb-core-style details{display:block}.dnb-core-style summary{display:list-item}.dnb-core-style canvas{display:inline-block}.dnb-core-style template{display:none}.dnb-core-style [tabindex],.dnb-core-style a,.dnb-core-style area,.dnb-core-style button,.dnb-core-style input,.dnb-core-style label,.dnb-core-style select,.dnb-core-style summary,.dnb-core-style textarea{touch-action:manipulation}.dnb-core-style [hidden]{display:none}.dnb-core-style [aria-busy=true]{cursor:progress}.dnb-core-style [aria-controls]:not(input){cursor:pointer}.dnb-core-style [aria-disabled=true],.dnb-core-style [disabled]{cursor:not-allowed}.dnb-core-style [aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);display:inherit;position:absolute}@media print{.dnb-core-style{background-color:#fff;color:#000}}.dnb-core-style .eufemia-theme{color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis)}.dnb-no-focus,.dnb-tab-focus,.dnb-tab-focus:focus{outline:none}html[data-whatinput=keyboard] .dnb-tab-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-mouse-focus,.dnb-mouse-focus:focus{outline:none}html[data-whatinput=mouse] .dnb-mouse-focus:focus{box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-focus-ring,html[data-whatinput=mouse] .dnb-mouse-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent}.dnb-focus-ring{box-shadow:0 0 0 var(--border-width) var(--border-color)!important}.dnb-scrollbar-appearance{-webkit-overflow-scrolling:touch;-ms-overflow-style:auto;scrollbar-color:var(--scrollbar-thumb-color,#888) transparent}@supports not (scrollbar-color:auto){.dnb-scrollbar-appearance::-webkit-scrollbar{background-color:var(--scrollbar-track-color,#eee);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:vertical{width:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:horizontal{height:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color,#888);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color,#666)}}.dnb-skip-link{opacity:.3;position:absolute;top:-100vh;transition:opacity .3s ease-out;z-index:0}.dnb-skip-link--active,.dnb-skip-link:focus{background-color:transparent;border:none;border-radius:0;box-shadow:none;color:var(--skip-link-color);font-size:var(--font-size-basis);left:40%;margin:0;outline:none;padding:.5rem 1rem;position:fixed;text-align:center;-webkit-text-decoration:none;text-decoration:none;top:5%;user-select:none;-webkit-user-select:none;white-space:nowrap;z-index:9999}.dnb-skip-link--active:after,.dnb-skip-link:focus:after{background-color:hsla(0,0%,100%,.85);box-shadow:150vw 150vh 0 0 hsla(0,0%,100%,.85);content:"";height:150vh;left:-200vw;position:absolute;top:-200vh;width:150vw;z-index:-2}.dnb-skip-link--active:before,.dnb-skip-link:focus:before{background-color:var(--skip-link-background);border-radius:1.5rem;content:"";height:100%;left:0;outline:none;position:absolute;top:0;width:100%;z-index:-1}html[data-whatinput=mouse] .dnb-skip-link--active:before,html[data-whatinput=mouse] .dnb-skip-link:focus:before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:hover:before,.dnb-skip-link:focus:hover:before{background-color:var(--skip-link-background--hover)}.dnb-skip-link--active:active:before,.dnb-skip-link:focus:active:before{background-color:var(--skip-link-background--active)}.dnb-skip-link--active:focus:not(:active):before,.dnb-skip-link:focus:focus:not(:active):before{outline:none}html[data-whatinput=keyboard] .dnb-skip-link--active:focus:not(:active):before,html[data-whatinput=keyboard] .dnb-skip-link:focus:focus:not(:active):before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:focus,.dnb-skip-link:focus:focus{opacity:1}.dnb-skip-link--active:hover,.dnb-skip-link:focus:hover{background-color:transparent;box-shadow:none;color:var(--skip-link-color--hover)}.dnb-skip-link--active:focus:not(:hover):not(:active),.dnb-skip-link:focus:focus:not(:hover):not(:active){background-color:transparent;box-shadow:none;color:var(--skip-link-color)}.dnb-skip-link--active:active,.dnb-skip-link:focus:active{background-color:transparent;color:var(--skip-link-color--active)}html[data-whatintent=touch] .dnb-skip-link{display:none}.dnb-alignment-helper,.dnb-alignment-helper:before{speak:none;display:inline-block;font-size:var(--font-size-small);height:0;width:0}.dnb-alignment-helper:before{content:"‌"}.dnb-drop-shadow{box-shadow:var(--shadow-default)}.dnb-sr-only{-webkit-touch-callout:none!important;border:0!important;clip-path:inset(50%)!important;margin:0!important;max-height:1px!important;max-width:1px!important;overflow:hidden!important;padding:0!important;pointer-events:none!important;position:absolute!important;-webkit-user-select:none!important;user-select:none!important;white-space:nowrap!important}.dnb-suffix{font-size:var(--font-size-basis);line-height:var(--line-height-basis);padding-left:.5rem;word-break:normal}
1
+ @charset "UTF-8";html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{padding:0;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}body{margin:0}.dnb-core-style{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.65.1";color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis);tab-size:4;-moz-tab-size:4;word-break:break-word}.dnb-core-style *,.dnb-core-style :after,.dnb-core-style :before{background-repeat:no-repeat;box-sizing:border-box}.dnb-core-style :after,.dnb-core-style :before{text-decoration:inherit;vertical-align:inherit}.dnb-core-style hr{height:0;overflow:visible}.dnb-core-style main{display:block}.dnb-core-style nav ol,.dnb-core-style nav ul{list-style:none}.dnb-core-style abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.dnb-core-style b,.dnb-core-style strong{font-weight:bolder}.dnb-core-style code,.dnb-core-style kbd,.dnb-core-style pre,.dnb-core-style samp{font-family:var(--font-family-monospace)}.dnb-core-style ::selection{background-color:#b3d4fc;color:#000;text-shadow:none}.dnb-core-style audio,.dnb-core-style canvas,.dnb-core-style iframe,.dnb-core-style img,.dnb-core-style svg,.dnb-core-style video{vertical-align:middle}.dnb-core-style audio,.dnb-core-style video{display:inline-block}.dnb-core-style audio:not([controls]){display:none;height:0}.dnb-core-style img{border-style:none}.dnb-core-style svg:not([fill]){fill:currentcolor}.dnb-core-style svg:not(:root){overflow:hidden}.dnb-core-style table{border-collapse:collapse}.dnb-core-style button,.dnb-core-style input,.dnb-core-style select,.dnb-core-style textarea{font-family:inherit;font-size:inherit;line-height:inherit}.dnb-core-style button,.dnb-core-style figure,.dnb-core-style input,.dnb-core-style select{margin:0}.dnb-core-style button{overflow:visible;text-transform:none}.dnb-core-style input{overflow:visible;word-break:normal}.dnb-core-style legend{color:inherit;display:table;max-width:100%;white-space:normal}.dnb-core-style progress{display:inline-block;vertical-align:baseline}.dnb-core-style select{text-transform:none}.dnb-core-style textarea{overflow:auto;resize:vertical}.dnb-core-style [type=checkbox],.dnb-core-style [type=radio]{padding:0}.dnb-core-style input[type=search]{-webkit-appearance:textfield;appearance:textfield;outline-offset:-2px}.dnb-core-style ::-webkit-inner-spin-button,.dnb-core-style ::-webkit-outer-spin-button{height:auto}.dnb-core-style ::input-placeholder{color:inherit;opacity:.54}.dnb-core-style ::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.dnb-core-style ::-webkit-file-upload-button{background-color:transparent;border:none;font:inherit}.dnb-core-style ::-moz-focus-inner{border-style:none;padding:0}.dnb-core-style details{display:block}.dnb-core-style summary{display:list-item}.dnb-core-style canvas{display:inline-block}.dnb-core-style template{display:none}.dnb-core-style [tabindex],.dnb-core-style a,.dnb-core-style area,.dnb-core-style button,.dnb-core-style input,.dnb-core-style label,.dnb-core-style select,.dnb-core-style summary,.dnb-core-style textarea{touch-action:manipulation}.dnb-core-style [hidden]{display:none}.dnb-core-style [aria-busy=true]{cursor:progress}.dnb-core-style [aria-controls]:not(input){cursor:pointer}.dnb-core-style [aria-disabled=true],.dnb-core-style [disabled]{cursor:not-allowed}.dnb-core-style [aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);display:inherit;position:absolute}@media print{.dnb-core-style{background-color:#fff;color:#000}}.dnb-core-style .eufemia-theme{color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis)}.dnb-no-focus,.dnb-tab-focus,.dnb-tab-focus:focus{outline:none}html[data-whatinput=keyboard] .dnb-tab-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-mouse-focus,.dnb-mouse-focus:focus{outline:none}html[data-whatinput=mouse] .dnb-mouse-focus:focus{box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-focus-ring,html[data-whatinput=mouse] .dnb-mouse-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent}.dnb-focus-ring{box-shadow:0 0 0 var(--border-width) var(--border-color)!important}.dnb-scrollbar-appearance{-webkit-overflow-scrolling:touch;-ms-overflow-style:auto;scrollbar-color:var(--scrollbar-thumb-color,#888) transparent}@supports not (scrollbar-color:auto){.dnb-scrollbar-appearance::-webkit-scrollbar{background-color:var(--scrollbar-track-color,#eee);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:vertical{width:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:horizontal{height:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color,#888);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color,#666)}}.dnb-skip-link{opacity:.3;position:absolute;top:-100vh;transition:opacity .3s ease-out;z-index:0}.dnb-skip-link--active,.dnb-skip-link:focus{background-color:transparent;border:none;border-radius:0;box-shadow:none;color:var(--skip-link-color);font-size:var(--font-size-basis);left:40%;margin:0;outline:none;padding:.5rem 1rem;position:fixed;text-align:center;-webkit-text-decoration:none;text-decoration:none;top:5%;user-select:none;-webkit-user-select:none;white-space:nowrap;z-index:9999}.dnb-skip-link--active:after,.dnb-skip-link:focus:after{background-color:hsla(0,0%,100%,.85);box-shadow:150vw 150vh 0 0 hsla(0,0%,100%,.85);content:"";height:150vh;left:-200vw;position:absolute;top:-200vh;width:150vw;z-index:-2}.dnb-skip-link--active:before,.dnb-skip-link:focus:before{background-color:var(--skip-link-background);border-radius:1.5rem;content:"";height:100%;left:0;outline:none;position:absolute;top:0;width:100%;z-index:-1}html[data-whatinput=mouse] .dnb-skip-link--active:before,html[data-whatinput=mouse] .dnb-skip-link:focus:before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:hover:before,.dnb-skip-link:focus:hover:before{background-color:var(--skip-link-background--hover)}.dnb-skip-link--active:active:before,.dnb-skip-link:focus:active:before{background-color:var(--skip-link-background--active)}.dnb-skip-link--active:focus:not(:active):before,.dnb-skip-link:focus:focus:not(:active):before{outline:none}html[data-whatinput=keyboard] .dnb-skip-link--active:focus:not(:active):before,html[data-whatinput=keyboard] .dnb-skip-link:focus:focus:not(:active):before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:focus,.dnb-skip-link:focus:focus{opacity:1}.dnb-skip-link--active:hover,.dnb-skip-link:focus:hover{background-color:transparent;box-shadow:none;color:var(--skip-link-color--hover)}.dnb-skip-link--active:focus:not(:hover):not(:active),.dnb-skip-link:focus:focus:not(:hover):not(:active){background-color:transparent;box-shadow:none;color:var(--skip-link-color)}.dnb-skip-link--active:active,.dnb-skip-link:focus:active{background-color:transparent;color:var(--skip-link-color--active)}html[data-whatintent=touch] .dnb-skip-link{display:none}.dnb-alignment-helper,.dnb-alignment-helper:before{speak:none;display:inline-block;font-size:var(--font-size-small);height:0;width:0}.dnb-alignment-helper:before{content:"‌"}.dnb-drop-shadow{box-shadow:var(--shadow-default)}.dnb-sr-only{-webkit-touch-callout:none!important;border:0!important;clip-path:inset(50%)!important;margin:0!important;max-height:1px!important;max-width:1px!important;overflow:hidden!important;padding:0!important;pointer-events:none!important;position:absolute!important;-webkit-user-select:none!important;user-select:none!important;white-space:nowrap!important}.dnb-suffix{font-size:var(--font-size-basis);line-height:var(--line-height-basis);padding-left:.5rem;word-break:normal}
@@ -270,7 +270,7 @@ body {
270
270
  /* stylelint-disable-next-line */
271
271
  -webkit-text-size-adjust: 100%;
272
272
  word-break: break-word;
273
- --eufemia-version: "10.65.0";
273
+ --eufemia-version: "10.65.1";
274
274
  }
275
275
  body *,
276
276
  body ::before,
@@ -1 +1 @@
1
- html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;cursor:default;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:var(--line-height-basis);-moz-tab-size:4;tab-size:4;word-break:break-word}body{margin:0}html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{padding:0;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.65.0";color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis);tab-size:4;-moz-tab-size:4;word-break:break-word}body *,body :after,body :before{background-repeat:no-repeat;box-sizing:border-box}body :after,body :before{text-decoration:inherit;vertical-align:inherit}body hr{height:0;overflow:visible}body main{display:block}body nav ol,body nav ul{list-style:none}body abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}body b,body strong{font-weight:bolder}body code,body kbd,body pre,body samp{font-family:var(--font-family-monospace)}body ::selection{background-color:#b3d4fc;color:#000;text-shadow:none}body audio,body canvas,body iframe,body img,body svg,body video{vertical-align:middle}body audio,body video{display:inline-block}body audio:not([controls]){display:none;height:0}body img{border-style:none}body svg:not([fill]){fill:currentcolor}body svg:not(:root){overflow:hidden}body table{border-collapse:collapse}body button,body input,body select,body textarea{font-family:inherit;font-size:inherit;line-height:inherit}body button,body figure,body input,body select{margin:0}body button{overflow:visible;text-transform:none}body input{overflow:visible;word-break:normal}body legend{color:inherit;display:table;max-width:100%;white-space:normal}body progress{display:inline-block;vertical-align:baseline}body select{text-transform:none}body textarea{overflow:auto;resize:vertical}body [type=checkbox],body [type=radio]{padding:0}body input[type=search]{-webkit-appearance:textfield;appearance:textfield;outline-offset:-2px}body ::-webkit-inner-spin-button,body ::-webkit-outer-spin-button{height:auto}body ::input-placeholder{color:inherit;opacity:.54}body ::-webkit-search-decoration{-webkit-appearance:none;appearance:none}body ::-webkit-file-upload-button{background-color:transparent;border:none;font:inherit}body ::-moz-focus-inner{border-style:none;padding:0}body details{display:block}body summary{display:list-item}body canvas{display:inline-block}body template{display:none}body [tabindex],body a,body area,body button,body input,body label,body select,body summary,body textarea{touch-action:manipulation}body [hidden]{display:none}body [aria-busy=true]{cursor:progress}body [aria-controls]:not(input){cursor:pointer}body [aria-disabled=true],body [disabled]{cursor:not-allowed}body [aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);display:inherit;position:absolute}@media print{body{background-color:#fff;color:#000}}body .eufemia-theme{color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis)}
1
+ html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;cursor:default;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:var(--line-height-basis);-moz-tab-size:4;tab-size:4;word-break:break-word}body{margin:0}html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{padding:0;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.65.1";color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis);tab-size:4;-moz-tab-size:4;word-break:break-word}body *,body :after,body :before{background-repeat:no-repeat;box-sizing:border-box}body :after,body :before{text-decoration:inherit;vertical-align:inherit}body hr{height:0;overflow:visible}body main{display:block}body nav ol,body nav ul{list-style:none}body abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}body b,body strong{font-weight:bolder}body code,body kbd,body pre,body samp{font-family:var(--font-family-monospace)}body ::selection{background-color:#b3d4fc;color:#000;text-shadow:none}body audio,body canvas,body iframe,body img,body svg,body video{vertical-align:middle}body audio,body video{display:inline-block}body audio:not([controls]){display:none;height:0}body img{border-style:none}body svg:not([fill]){fill:currentcolor}body svg:not(:root){overflow:hidden}body table{border-collapse:collapse}body button,body input,body select,body textarea{font-family:inherit;font-size:inherit;line-height:inherit}body button,body figure,body input,body select{margin:0}body button{overflow:visible;text-transform:none}body input{overflow:visible;word-break:normal}body legend{color:inherit;display:table;max-width:100%;white-space:normal}body progress{display:inline-block;vertical-align:baseline}body select{text-transform:none}body textarea{overflow:auto;resize:vertical}body [type=checkbox],body [type=radio]{padding:0}body input[type=search]{-webkit-appearance:textfield;appearance:textfield;outline-offset:-2px}body ::-webkit-inner-spin-button,body ::-webkit-outer-spin-button{height:auto}body ::input-placeholder{color:inherit;opacity:.54}body ::-webkit-search-decoration{-webkit-appearance:none;appearance:none}body ::-webkit-file-upload-button{background-color:transparent;border:none;font:inherit}body ::-moz-focus-inner{border-style:none;padding:0}body details{display:block}body summary{display:list-item}body canvas{display:inline-block}body template{display:none}body [tabindex],body a,body area,body button,body input,body label,body select,body summary,body textarea{touch-action:manipulation}body [hidden]{display:none}body [aria-busy=true]{cursor:progress}body [aria-controls]:not(input){cursor:pointer}body [aria-disabled=true],body [disabled]{cursor:not-allowed}body [aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);display:inherit;position:absolute}@media print{body{background-color:#fff;color:#000}}body .eufemia-theme{color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis)}
@@ -269,7 +269,7 @@ body,
269
269
  /* stylelint-disable-next-line */
270
270
  -webkit-text-size-adjust: 100%;
271
271
  word-break: break-word;
272
- --eufemia-version: "10.65.0";
272
+ --eufemia-version: "10.65.1";
273
273
  }
274
274
  body *,
275
275
  body ::before,
@@ -1 +1 @@
1
- @charset "UTF-8";html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;cursor:default;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:var(--line-height-basis);-moz-tab-size:4;tab-size:4;word-break:break-word}body{margin:0}html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{padding:0;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}.dnb-core-style,body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.65.0";color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis);tab-size:4;-moz-tab-size:4;word-break:break-word}.dnb-core-style *,.dnb-core-style :after,.dnb-core-style :before,body *,body :after,body :before{background-repeat:no-repeat;box-sizing:border-box}.dnb-core-style :after,.dnb-core-style :before,body :after,body :before{text-decoration:inherit;vertical-align:inherit}.dnb-core-style hr,body hr{height:0;overflow:visible}.dnb-core-style main,body main{display:block}.dnb-core-style nav ol,.dnb-core-style nav ul,body nav ol,body nav ul{list-style:none}.dnb-core-style abbr[title],body abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.dnb-core-style b,.dnb-core-style strong,body b,body strong{font-weight:bolder}.dnb-core-style code,.dnb-core-style kbd,.dnb-core-style pre,.dnb-core-style samp,body code,body kbd,body pre,body samp{font-family:var(--font-family-monospace)}.dnb-core-style ::selection,body ::selection{background-color:#b3d4fc;color:#000;text-shadow:none}.dnb-core-style audio,.dnb-core-style canvas,.dnb-core-style iframe,.dnb-core-style img,.dnb-core-style svg,.dnb-core-style video,body audio,body canvas,body iframe,body img,body svg,body video{vertical-align:middle}.dnb-core-style audio,.dnb-core-style video,body audio,body video{display:inline-block}.dnb-core-style audio:not([controls]),body audio:not([controls]){display:none;height:0}.dnb-core-style img,body img{border-style:none}.dnb-core-style svg:not([fill]),body svg:not([fill]){fill:currentcolor}.dnb-core-style svg:not(:root),body svg:not(:root){overflow:hidden}.dnb-core-style table,body table{border-collapse:collapse}.dnb-core-style button,.dnb-core-style input,.dnb-core-style select,.dnb-core-style textarea,body button,body input,body select,body textarea{font-family:inherit;font-size:inherit;line-height:inherit}.dnb-core-style button,.dnb-core-style figure,.dnb-core-style input,.dnb-core-style select,body button,body figure,body input,body select{margin:0}.dnb-core-style button,body button{overflow:visible;text-transform:none}.dnb-core-style input,body input{overflow:visible;word-break:normal}.dnb-core-style legend,body legend{color:inherit;display:table;max-width:100%;white-space:normal}.dnb-core-style progress,body progress{display:inline-block;vertical-align:baseline}.dnb-core-style select,body select{text-transform:none}.dnb-core-style textarea,body textarea{overflow:auto;resize:vertical}.dnb-core-style [type=checkbox],.dnb-core-style [type=radio],body [type=checkbox],body [type=radio]{padding:0}.dnb-core-style input[type=search],body input[type=search]{-webkit-appearance:textfield;appearance:textfield;outline-offset:-2px}.dnb-core-style ::-webkit-inner-spin-button,.dnb-core-style ::-webkit-outer-spin-button,body ::-webkit-inner-spin-button,body ::-webkit-outer-spin-button{height:auto}.dnb-core-style ::input-placeholder,body ::input-placeholder{color:inherit;opacity:.54}.dnb-core-style ::-webkit-search-decoration,body ::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.dnb-core-style ::-webkit-file-upload-button,body ::-webkit-file-upload-button{background-color:transparent;border:none;font:inherit}.dnb-core-style ::-moz-focus-inner,body ::-moz-focus-inner{border-style:none;padding:0}.dnb-core-style details,body details{display:block}.dnb-core-style summary,body summary{display:list-item}.dnb-core-style canvas,body canvas{display:inline-block}.dnb-core-style template,body template{display:none}.dnb-core-style [tabindex],.dnb-core-style a,.dnb-core-style area,.dnb-core-style button,.dnb-core-style input,.dnb-core-style label,.dnb-core-style select,.dnb-core-style summary,.dnb-core-style textarea,body [tabindex],body a,body area,body button,body input,body label,body select,body summary,body textarea{touch-action:manipulation}.dnb-core-style [hidden],body [hidden]{display:none}.dnb-core-style [aria-busy=true],body [aria-busy=true]{cursor:progress}.dnb-core-style [aria-controls]:not(input),body [aria-controls]:not(input){cursor:pointer}.dnb-core-style [aria-disabled=true],.dnb-core-style [disabled],body [aria-disabled=true],body [disabled]{cursor:not-allowed}.dnb-core-style [aria-hidden=false][hidden]:not(:focus),body [aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);display:inherit;position:absolute}@media print{.dnb-core-style,body{background-color:#fff;color:#000}}.dnb-core-style .eufemia-theme,body .eufemia-theme{color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis)}.dnb-no-focus,.dnb-tab-focus,.dnb-tab-focus:focus{outline:none}html[data-whatinput=keyboard] .dnb-tab-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-mouse-focus,.dnb-mouse-focus:focus{outline:none}html[data-whatinput=mouse] .dnb-mouse-focus:focus{box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-focus-ring,html[data-whatinput=mouse] .dnb-mouse-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent}.dnb-focus-ring{box-shadow:0 0 0 var(--border-width) var(--border-color)!important}.dnb-scrollbar-appearance{-webkit-overflow-scrolling:touch;-ms-overflow-style:auto;scrollbar-color:var(--scrollbar-thumb-color,#888) transparent}@supports not (scrollbar-color:auto){.dnb-scrollbar-appearance::-webkit-scrollbar{background-color:var(--scrollbar-track-color,#eee);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:vertical{width:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:horizontal{height:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color,#888);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color,#666)}}.dnb-skip-link{opacity:.3;position:absolute;top:-100vh;transition:opacity .3s ease-out;z-index:0}.dnb-skip-link--active,.dnb-skip-link:focus{background-color:transparent;border:none;border-radius:0;box-shadow:none;color:var(--skip-link-color);font-size:var(--font-size-basis);left:40%;margin:0;outline:none;padding:.5rem 1rem;position:fixed;text-align:center;-webkit-text-decoration:none;text-decoration:none;top:5%;user-select:none;-webkit-user-select:none;white-space:nowrap;z-index:9999}.dnb-skip-link--active:after,.dnb-skip-link:focus:after{background-color:hsla(0,0%,100%,.85);box-shadow:150vw 150vh 0 0 hsla(0,0%,100%,.85);content:"";height:150vh;left:-200vw;position:absolute;top:-200vh;width:150vw;z-index:-2}.dnb-skip-link--active:before,.dnb-skip-link:focus:before{background-color:var(--skip-link-background);border-radius:1.5rem;content:"";height:100%;left:0;outline:none;position:absolute;top:0;width:100%;z-index:-1}html[data-whatinput=mouse] .dnb-skip-link--active:before,html[data-whatinput=mouse] .dnb-skip-link:focus:before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:hover:before,.dnb-skip-link:focus:hover:before{background-color:var(--skip-link-background--hover)}.dnb-skip-link--active:active:before,.dnb-skip-link:focus:active:before{background-color:var(--skip-link-background--active)}.dnb-skip-link--active:focus:not(:active):before,.dnb-skip-link:focus:focus:not(:active):before{outline:none}html[data-whatinput=keyboard] .dnb-skip-link--active:focus:not(:active):before,html[data-whatinput=keyboard] .dnb-skip-link:focus:focus:not(:active):before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:focus,.dnb-skip-link:focus:focus{opacity:1}.dnb-skip-link--active:hover,.dnb-skip-link:focus:hover{background-color:transparent;box-shadow:none;color:var(--skip-link-color--hover)}.dnb-skip-link--active:focus:not(:hover):not(:active),.dnb-skip-link:focus:focus:not(:hover):not(:active){background-color:transparent;box-shadow:none;color:var(--skip-link-color)}.dnb-skip-link--active:active,.dnb-skip-link:focus:active{background-color:transparent;color:var(--skip-link-color--active)}html[data-whatintent=touch] .dnb-skip-link{display:none}.dnb-alignment-helper,.dnb-alignment-helper:before{speak:none;display:inline-block;font-size:var(--font-size-small);height:0;width:0}.dnb-alignment-helper:before{content:"‌"}.dnb-drop-shadow{box-shadow:var(--shadow-default)}.dnb-sr-only{-webkit-touch-callout:none!important;border:0!important;clip-path:inset(50%)!important;margin:0!important;max-height:1px!important;max-width:1px!important;overflow:hidden!important;padding:0!important;pointer-events:none!important;position:absolute!important;-webkit-user-select:none!important;user-select:none!important;white-space:nowrap!important}.dnb-suffix{font-size:var(--font-size-basis);line-height:var(--line-height-basis);padding-left:.5rem;word-break:normal}
1
+ @charset "UTF-8";html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;cursor:default;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:var(--line-height-basis);-moz-tab-size:4;tab-size:4;word-break:break-word}body{margin:0}html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{padding:0;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}.dnb-core-style,body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.65.1";color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis);tab-size:4;-moz-tab-size:4;word-break:break-word}.dnb-core-style *,.dnb-core-style :after,.dnb-core-style :before,body *,body :after,body :before{background-repeat:no-repeat;box-sizing:border-box}.dnb-core-style :after,.dnb-core-style :before,body :after,body :before{text-decoration:inherit;vertical-align:inherit}.dnb-core-style hr,body hr{height:0;overflow:visible}.dnb-core-style main,body main{display:block}.dnb-core-style nav ol,.dnb-core-style nav ul,body nav ol,body nav ul{list-style:none}.dnb-core-style abbr[title],body abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.dnb-core-style b,.dnb-core-style strong,body b,body strong{font-weight:bolder}.dnb-core-style code,.dnb-core-style kbd,.dnb-core-style pre,.dnb-core-style samp,body code,body kbd,body pre,body samp{font-family:var(--font-family-monospace)}.dnb-core-style ::selection,body ::selection{background-color:#b3d4fc;color:#000;text-shadow:none}.dnb-core-style audio,.dnb-core-style canvas,.dnb-core-style iframe,.dnb-core-style img,.dnb-core-style svg,.dnb-core-style video,body audio,body canvas,body iframe,body img,body svg,body video{vertical-align:middle}.dnb-core-style audio,.dnb-core-style video,body audio,body video{display:inline-block}.dnb-core-style audio:not([controls]),body audio:not([controls]){display:none;height:0}.dnb-core-style img,body img{border-style:none}.dnb-core-style svg:not([fill]),body svg:not([fill]){fill:currentcolor}.dnb-core-style svg:not(:root),body svg:not(:root){overflow:hidden}.dnb-core-style table,body table{border-collapse:collapse}.dnb-core-style button,.dnb-core-style input,.dnb-core-style select,.dnb-core-style textarea,body button,body input,body select,body textarea{font-family:inherit;font-size:inherit;line-height:inherit}.dnb-core-style button,.dnb-core-style figure,.dnb-core-style input,.dnb-core-style select,body button,body figure,body input,body select{margin:0}.dnb-core-style button,body button{overflow:visible;text-transform:none}.dnb-core-style input,body input{overflow:visible;word-break:normal}.dnb-core-style legend,body legend{color:inherit;display:table;max-width:100%;white-space:normal}.dnb-core-style progress,body progress{display:inline-block;vertical-align:baseline}.dnb-core-style select,body select{text-transform:none}.dnb-core-style textarea,body textarea{overflow:auto;resize:vertical}.dnb-core-style [type=checkbox],.dnb-core-style [type=radio],body [type=checkbox],body [type=radio]{padding:0}.dnb-core-style input[type=search],body input[type=search]{-webkit-appearance:textfield;appearance:textfield;outline-offset:-2px}.dnb-core-style ::-webkit-inner-spin-button,.dnb-core-style ::-webkit-outer-spin-button,body ::-webkit-inner-spin-button,body ::-webkit-outer-spin-button{height:auto}.dnb-core-style ::input-placeholder,body ::input-placeholder{color:inherit;opacity:.54}.dnb-core-style ::-webkit-search-decoration,body ::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.dnb-core-style ::-webkit-file-upload-button,body ::-webkit-file-upload-button{background-color:transparent;border:none;font:inherit}.dnb-core-style ::-moz-focus-inner,body ::-moz-focus-inner{border-style:none;padding:0}.dnb-core-style details,body details{display:block}.dnb-core-style summary,body summary{display:list-item}.dnb-core-style canvas,body canvas{display:inline-block}.dnb-core-style template,body template{display:none}.dnb-core-style [tabindex],.dnb-core-style a,.dnb-core-style area,.dnb-core-style button,.dnb-core-style input,.dnb-core-style label,.dnb-core-style select,.dnb-core-style summary,.dnb-core-style textarea,body [tabindex],body a,body area,body button,body input,body label,body select,body summary,body textarea{touch-action:manipulation}.dnb-core-style [hidden],body [hidden]{display:none}.dnb-core-style [aria-busy=true],body [aria-busy=true]{cursor:progress}.dnb-core-style [aria-controls]:not(input),body [aria-controls]:not(input){cursor:pointer}.dnb-core-style [aria-disabled=true],.dnb-core-style [disabled],body [aria-disabled=true],body [disabled]{cursor:not-allowed}.dnb-core-style [aria-hidden=false][hidden]:not(:focus),body [aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);display:inherit;position:absolute}@media print{.dnb-core-style,body{background-color:#fff;color:#000}}.dnb-core-style .eufemia-theme,body .eufemia-theme{color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis)}.dnb-no-focus,.dnb-tab-focus,.dnb-tab-focus:focus{outline:none}html[data-whatinput=keyboard] .dnb-tab-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-mouse-focus,.dnb-mouse-focus:focus{outline:none}html[data-whatinput=mouse] .dnb-mouse-focus:focus{box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-focus-ring,html[data-whatinput=mouse] .dnb-mouse-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent}.dnb-focus-ring{box-shadow:0 0 0 var(--border-width) var(--border-color)!important}.dnb-scrollbar-appearance{-webkit-overflow-scrolling:touch;-ms-overflow-style:auto;scrollbar-color:var(--scrollbar-thumb-color,#888) transparent}@supports not (scrollbar-color:auto){.dnb-scrollbar-appearance::-webkit-scrollbar{background-color:var(--scrollbar-track-color,#eee);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:vertical{width:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:horizontal{height:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color,#888);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color,#666)}}.dnb-skip-link{opacity:.3;position:absolute;top:-100vh;transition:opacity .3s ease-out;z-index:0}.dnb-skip-link--active,.dnb-skip-link:focus{background-color:transparent;border:none;border-radius:0;box-shadow:none;color:var(--skip-link-color);font-size:var(--font-size-basis);left:40%;margin:0;outline:none;padding:.5rem 1rem;position:fixed;text-align:center;-webkit-text-decoration:none;text-decoration:none;top:5%;user-select:none;-webkit-user-select:none;white-space:nowrap;z-index:9999}.dnb-skip-link--active:after,.dnb-skip-link:focus:after{background-color:hsla(0,0%,100%,.85);box-shadow:150vw 150vh 0 0 hsla(0,0%,100%,.85);content:"";height:150vh;left:-200vw;position:absolute;top:-200vh;width:150vw;z-index:-2}.dnb-skip-link--active:before,.dnb-skip-link:focus:before{background-color:var(--skip-link-background);border-radius:1.5rem;content:"";height:100%;left:0;outline:none;position:absolute;top:0;width:100%;z-index:-1}html[data-whatinput=mouse] .dnb-skip-link--active:before,html[data-whatinput=mouse] .dnb-skip-link:focus:before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:hover:before,.dnb-skip-link:focus:hover:before{background-color:var(--skip-link-background--hover)}.dnb-skip-link--active:active:before,.dnb-skip-link:focus:active:before{background-color:var(--skip-link-background--active)}.dnb-skip-link--active:focus:not(:active):before,.dnb-skip-link:focus:focus:not(:active):before{outline:none}html[data-whatinput=keyboard] .dnb-skip-link--active:focus:not(:active):before,html[data-whatinput=keyboard] .dnb-skip-link:focus:focus:not(:active):before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:focus,.dnb-skip-link:focus:focus{opacity:1}.dnb-skip-link--active:hover,.dnb-skip-link:focus:hover{background-color:transparent;box-shadow:none;color:var(--skip-link-color--hover)}.dnb-skip-link--active:focus:not(:hover):not(:active),.dnb-skip-link:focus:focus:not(:hover):not(:active){background-color:transparent;box-shadow:none;color:var(--skip-link-color)}.dnb-skip-link--active:active,.dnb-skip-link:focus:active{background-color:transparent;color:var(--skip-link-color--active)}html[data-whatintent=touch] .dnb-skip-link{display:none}.dnb-alignment-helper,.dnb-alignment-helper:before{speak:none;display:inline-block;font-size:var(--font-size-small);height:0;width:0}.dnb-alignment-helper:before{content:"‌"}.dnb-drop-shadow{box-shadow:var(--shadow-default)}.dnb-sr-only{-webkit-touch-callout:none!important;border:0!important;clip-path:inset(50%)!important;margin:0!important;max-height:1px!important;max-width:1px!important;overflow:hidden!important;padding:0!important;pointer-events:none!important;position:absolute!important;-webkit-user-select:none!important;user-select:none!important;white-space:nowrap!important}.dnb-suffix{font-size:var(--font-size-basis);line-height:var(--line-height-basis);padding-left:.5rem;word-break:normal}
@@ -21,8 +21,10 @@ export type DatePickerEventAttributes = {
21
21
  end?: string;
22
22
  } & Record<string, unknown>;
23
23
  export type DatePickerEvent<T> = ReturnObject<T>;
24
- export type DisplayPickerEvent = (React.MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLElement> | MouseEvent | KeyboardEvent) & DatePickerDates & {
24
+ type FocusOnHide = {
25
25
  focusOnHide?: boolean | string;
26
+ };
27
+ export type DisplayPickerEvent = (React.MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLElement> | MouseEvent | KeyboardEvent | FocusOnHide) & DatePickerDates & FocusOnHide & {
26
28
  event?: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>;
27
29
  };
28
30
  export type DatePickerProps = {
@@ -173,7 +173,9 @@ function DatePicker(externalProps) {
173
173
  } = _ref2,
174
174
  args = _objectWithoutProperties(_ref2, _excluded);
175
175
  if (shouldHidePicker && !showSubmitButton && !showCancelButton) {
176
- hidePicker();
176
+ hidePicker({
177
+ focusOnHide: true
178
+ });
177
179
  }
178
180
  setDates({
179
181
  startDate: args.startDate,
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.js","names":["React","useCallback","useContext","useEffect","useLayoutEffect","useMemo","useRef","useState","classnames","warn","makeUniqueId","extendPropsWithContext","detectOutsideClick","getStatusState","combineDescribedBy","validateDOMAttributes","AlignmentHelper","createSpacingClasses","skeletonDOMAttributes","format","Context","Suffix","FormLabel","FormStatus","DatePickerProvider","DatePickerRange","DatePickerInput","DatePickerAddon","DatePickerFooter","pickFormElementProps","useTranslation","convertSnakeCaseProps","DatePickerPortal","defaultProps","maskOrder","maskPlaceholder","dateFormat","returnFormat","hideNavigation","hideNavigationButtons","hideDays","onlyMonth","hideLastWeek","disableAutofocus","enableKeyboardNav","showInput","submitButtonText","cancelButtonText","resetButtonText","resetDate","firstDay","range","link","sync","statusState","opened","noAnimation","direction","skipPortal","DatePicker","externalProps","props","_objectSpread","preventClose","onHide","onShow","onSubmit","onCancel","onReset","alignPicker","showSubmitButton","showCancelButton","openedProp","endDate","endDateProp","setOpened","hidden","setHidden","dates","setDates","context","blurDelay","id","innerRef","triangleRef","submitButtonRef","getReturnObject","hideTimeout","outsideClick","calendarContainerRef","translation","removeOutsideClickHandler","current","remove","hidePicker","args","event","persist","setTimeout","focus","preventScroll","e","setOutsideClickHandler","_ref","focusOnHide","setTrianglePosition","triangleWidth","shellWidth","querySelector","getBoundingClientRect","width","buttonWidth","distance","style","marginRight","marginLeft","showPicker","clearTimeout","onPickerChange","_ref2","shouldHidePicker","_objectWithoutProperties","_excluded","startDate","onSubmitHandler","onCancelHandler","onResetHandler","togglePicker","formatSelectedDateTitle","selectedDate","start","end","currentDate","replace","extendedProps","skeleton","getTranslation","FormRow","formElement","label","title","labelDirection","labelSrOnly","inputElement","addonElement","shortcuts","disabled","stretch","size","status","statusProps","statusNoAnimation","globalStatus","suffix","showResetButton","className","tooltip","restProps","_excluded2","attributes","filterOutNonAttributes","shouldHideDays","shouldHideNavigation","showStatus","pickerParams","submitParams","ref","tabIndex","selectedDateTitle","mainParams","lang","locale","containerClassNames","remainingDOMProps","remainingSubmitProps","remainingPickerProps","createElement","_extends","setReturnObject","fn","forId","text","srOnly","_AlignmentHelper","show","String","text_id","width_selector","state","no_animation","isRange","submitAttributes","alignment","targetElementRef","firstDayOfWeek","isLink","isSync","hideNav","views","nextBtn","prevBtn","hideNextMonthWeek","noAutoFocus","onChange","renderElement","NonAttributes","Object","keys","reduce","key","includes","_supportsSpacingProps"],"sources":["../../../../src/components/date-picker/DatePicker.tsx"],"sourcesContent":["/**\n * Web DatePicker Component\n *\n */\n\nimport React, {\n HTMLProps,\n useCallback,\n useContext,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react'\n\nimport classnames from 'classnames'\nimport {\n warn,\n makeUniqueId,\n extendPropsWithContext,\n detectOutsideClick,\n getStatusState,\n combineDescribedBy,\n validateDOMAttributes,\n DetectOutsideClickClass,\n} from '../../shared/component-helper'\nimport AlignmentHelper from '../../shared/AlignmentHelper'\nimport { createSpacingClasses } from '../space/SpacingHelper'\nimport { skeletonDOMAttributes } from '../skeleton/SkeletonHelper'\n\n// date-fns\nimport format from 'date-fns/format'\n\nimport Context, { Locale } from '../../shared/Context'\nimport Suffix from '../../shared/helpers/Suffix'\nimport FormLabel from '../form-label/FormLabel'\nimport FormStatus, {\n FormStatusProps,\n FormStatusState,\n FormStatusText,\n} from '../form-status/FormStatus'\nimport DatePickerProvider, {\n DatePickerChangeEvent,\n type ReturnObject,\n} from './DatePickerProvider'\nimport DatePickerRange from './DatePickerRange'\nimport DatePickerInput from './DatePickerInput'\nimport DatePickerAddon, { DatePickerAddonProps } from './DatePickerAddon'\nimport DatePickerFooter from './DatePickerFooter'\nimport { SpacingProps } from '../space/types'\nimport { InputInputElement, InputSize } from '../Input'\nimport { SkeletonShow } from '../Skeleton'\nimport { GlobalStatusConfigObject } from '../GlobalStatus'\nimport { pickFormElementProps } from '../../shared/helpers/filterValidProps'\nimport { CalendarDay, DatePickerCalendarProps } from './DatePickerCalendar'\nimport { DatePickerContextValues, DateType } from './DatePickerContext'\nimport { DatePickerDates } from './hooks/useDates'\nimport { useTranslation } from '../../shared'\nimport { convertSnakeCaseProps } from '../../shared/helpers/withSnakeCaseProps'\nimport DatePickerPortal from './DatePickerPortal'\n\nexport type DatePickerEventAttributes = {\n day?: string\n year?: string\n start?: string\n end?: string\n} & Record<string, unknown>\n\n// Takes the return object from DatePickerProvider and extends it with the event\nexport type DatePickerEvent<T> = ReturnObject<T>\n\nexport type DisplayPickerEvent = (\n | React.MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLElement>\n | MouseEvent\n | KeyboardEvent\n) &\n DatePickerDates & {\n focusOnHide?: boolean | string\n event?: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>\n }\n\nexport type DatePickerProps = {\n /**\n * Defines the pre-filled date by either a JavaScript DateInstance or (ISO 8601) like `date=\"2019-05-05\"`.\n */\n date?: DateType\n /**\n * To set the pre-filled starting date. Is used if `range={true}` is set to `true`. Defaults to `null`, showing the `maskPlaceholder`.\n */\n startDate?: DateType\n /**\n * To set the pre-filled ending date. Is used if `range={true}` is set to `true`. Defaults to `null`, showing the `maskPlaceholder`.\n */\n endDate?: DateType\n /**\n * To display what month should be shown in the first calendar by default. Defaults to the `date` respective `startDate`.\n */\n month?: DateType\n /**\n * To display what month should be shown in the first calendar by default. Defaults to the `date` respective `startDate`.\n */\n startMonth?: DateType\n /**\n * To display what month should be shown in the second calendar by default. Defaults to the `date` respective `startDate`.\n */\n endMonth?: DateType\n /**\n * To limit a date range to a minimum `startDate`. Defaults to `null`.\n */\n minDate?: DateType\n /**\n * To limit a date range to a maximum `endDate`. Defaults to `null`.\n */\n maxDate?: DateType\n /**\n * Corrects the input date value to be the same as either `minDate` or `maxDate`, when the user types in a date that is either before or after one of these. Defaults to `false`.\n */\n correctInvalidDate?: boolean\n /**\n * To define the order of the masked placeholder input fields. Defaults to `dd/mm/yyyy`\n */\n maskOrder?: string\n /**\n * To display the placeholder on input. Defaults to `dd/mm/åååå`.\n */\n maskPlaceholder?: string\n /**\n * Defines how the prop dates (`date`, `startDate` and `endDate`) should be parsed, e.g. `yyyy/MM/dd`. Defaults to `yyyy-MM-dd`.\n */\n dateFormat?: string\n /**\n * Defines how the returned date, as a string, should be formatted as. Defaults to `yyyy-MM-dd`.\n */\n returnFormat?: string\n /**\n * If set to `true`, the navigation will be hidden. Defaults to `false`.\n */\n hideNavigation?: boolean\n hideNavigationButtons?: boolean\n /**\n * If set to `true`, the week days will be hidden. Defaults to `false`.\n */\n hideDays?: boolean\n /**\n * Use `true` to only show the defined month. Disables the month navigation possibility. Defaults to `false`.\n */\n onlyMonth?: boolean\n /**\n * Use `true` to only show the last week in the current month if it needs to be shown. The result is that there will mainly be shows five (5) weeks (rows) instead of six (6). Defaults to `false`.\n */\n hideLastWeek?: boolean\n /**\n * Once the date picker gets opened, there is a focus handling to ensure good accessibility. can be disabled with property. Defaults to `false`.\n */\n disableAutofocus?: boolean\n enableKeyboardNav?: boolean\n /**\n * If the input fields with the mask should be visible. Defaults to `false`.\n */\n showInput?: boolean\n /**\n * If set to `true`, a submit button will be shown. You can change the default text by using `submitButtonText=\"Ok\"`. Defaults to `false`. If the `range` prop is `true`, then the submit button is shown.\n */\n showSubmitButton?: boolean\n /**\n * If set to `true`, a cancel button will be shown. You can change the default text by using `cancelButtonText=\"Avbryt\"` Defaults to `false`. If the `range` prop is `true`, then the cancel button is shown.\n */\n showCancelButton?: boolean\n /**\n * If set to `true`, a reset button will be shown. You can change the default text by using `resetButtonText=\"Tilbakestill\"` Defaults to `false`.\n */\n showResetButton?: boolean\n submitButtonText?: string\n cancelButtonText?: string\n resetButtonText?: string\n resetDate?: boolean\n /**\n * To define the first day of the week. Defaults to `monday`.\n */\n firstDay?:\n | 'monday'\n | 'tuesday'\n | 'wednesday'\n | 'thursday'\n | 'friday'\n | 'saturday'\n | 'sunday'\n /**\n * If the date picker should support a range of two dates (starting and ending date). Defaults to `false`.\n */\n range?: boolean\n /**\n * Link both calendars, once to the user is navigating between months. Only meant to use if the range is set to `true`. Defaults to `false`.\n */\n link?: boolean\n /**\n * Sync input values with the calendars views. Once the input values get changed, the calendar changes its views in sync. Defaults to `true`.\n */\n sync?: boolean\n /**\n * A prepending label in sync with the date input field.\n */\n label?: React.ReactNode\n /**\n * Use `labelDirection=\"vertical\"` to change the label layout direction. Defaults to `horizontal`.\n */\n labelDirection?: 'vertical' | 'horizontal'\n /**\n * Use `true` to make the label only readable by screen readers.\n */\n labelSrOnly?: boolean\n /**\n * Gives you the possibility to use a plain/vanilla `<input />` HTML element by defining it as a string `inputElement=\"input\"`, a React element, or a render function `inputElement={(internalProps) => (<Return />)}`. Can also be used in circumstances where the `react-text-mask` not should be used, e.g. in testing environments. Defaults to custom masked input.\n */\n inputElement?: InputInputElement\n /**\n * Gives you the possibility to inject a React element showing up over the footer. Use it to customize `shortcuts`.\n */\n addonElement?: React.ReactNode\n /**\n * Gives you the possibility to set predefined dates and date ranges so the user can select these by one click. Define either a JSON or an object with the defined shortcuts. More info is below.\n */\n shortcuts?: DatePickerAddonProps['shortcuts']\n disabled?: boolean\n /**\n * If set to `true`, then the date-picker input field will be 100% in `width`.\n */\n stretch?: boolean\n /**\n * If set to `true`, an overlaying skeleton with animation will be shown.\n */\n skeleton?: SkeletonShow\n /**\n * The sizes you can choose is `small` (1.5rem), `default` (2rem), `medium` (2.5rem) and `large` (3rem) are supported component sizes. Defaults to `default` / `null`.\n */\n size?: InputSize\n /**\n * Text with a status message. The style defaults to an error message. You can use `true` to only get the status color, without a message.\n */\n status?: FormStatusText\n /**\n * Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.\n */\n statusState?: FormStatusState\n /**\n * Use an object to define additional FormStatus properties.\n */\n statusProps?: FormStatusProps\n statusNoAnimation?: boolean\n /**\n * The <a href=\"/uilib/components/global-status/properties/#configuration-object\">configuration</a> used for the target <a href=\"/uilib/components/global-status\">GlobalStatus</a>.\n */\n globalStatus?: GlobalStatusConfigObject\n /**\n * Text describing the content of the DatePicker more than the label. You can also send in a React component, so it gets wrapped inside the DatePicker component.\n */\n suffix?: React.ReactNode\n /**\n * To open the date-picker by default. Defaults to `false`.\n */\n opened?: boolean\n /**\n * Provide a short Tooltip content that shows up on the picker button.\n */\n tooltip?: React.ReactNode\n tabIndex?: number\n preventClose?: boolean\n noAnimation?: boolean\n direction?: 'auto' | 'top' | 'bottom'\n /**\n * Use `right` to change the calendar alignment direction. Defaults to `left`.\n */\n alignPicker?: 'auto' | 'left' | 'right'\n /**\n * If set to `true`, the calendar will not be rendered inside a react portal. Defaults to `false`.\n */\n skipPortal?: boolean\n className?: string\n /**\n * Will be called right before every new calendar view gets rendered. See the example above.\n */\n onDaysRender?: (\n days: Array<CalendarDay>,\n nr?: DatePickerCalendarProps['nr']\n ) => void\n /**\n * Will be called on a date change event. Returns an `object`. See Returned Object below.\n */\n onChange?: (\n event: DatePickerEvent<React.ChangeEvent<HTMLInputElement>>\n ) => void\n /**\n * Will be called on every input and date picker interaction. Returns an `object`. See Returned Object below.\n */\n onType?: (\n event: DatePickerEvent<React.ChangeEvent<HTMLInputElement>>\n ) => void\n /**\n * Will be called once date-picker is visible.\n */\n onShow?: (event: DatePickerEvent<DisplayPickerEvent>) => void\n /**\n * Will be called once date-picker is hidden.\n */\n onHide?: (event: DatePickerEvent<DisplayPickerEvent>) => void\n /**\n * Will be called once a user presses the submit button.\n */\n onSubmit?: (\n event: DatePickerEvent<React.MouseEvent<HTMLButtonElement>>\n ) => void\n /**\n * Will be called once a user presses the cancel button.\n */\n onCancel?: (\n event: DatePickerEvent<React.MouseEvent<HTMLButtonElement>>\n ) => void\n /**\n * Will be called once a user presses the reset button.\n */\n onReset?: (\n event: DatePickerEvent<React.MouseEvent<HTMLButtonElement>>\n ) => void\n /**\n * Will be called once the input gets focus.\n */\n onFocus?: (event: DatePickerEvent<React.FocusEvent<HTMLElement>>) => void\n /**\n * Will be called once the input lose focus.\n */\n onBlur?: (event: DatePickerEvent<React.FocusEvent<HTMLElement>>) => void\n}\n// Can be removed in v11\ntype DatePickerDeprecatedProps = {\n /**\n * @deprecated use `startDate` instead.\n */\n start_date?: DateType\n /**\n * @deprecated use `endDate` instead.\n */\n end_date?: DateType\n /**\n * @deprecated use `startMonth` instead.\n */\n start_month?: DateType\n /**\n * @deprecated use `endMonth` instead.\n */\n end_month?: DateType\n /**\n * @deprecated use `minDate` instead.\n */\n min_date?: DateType\n /**\n * @deprecated use `maxDate` instead.\n */\n max_date?: DateType\n /**\n * @deprecated use `correctInvalidDate` instead.\n */\n correct_invalid_date?: boolean\n /**\n * @deprecated use `maskOrder` instead.\n */\n mask_order?: string\n /**\n * @deprecated use `maskPlaceholder` instead.\n */\n mask_placeholder?: string\n /**\n * @deprecated use `dateFormat` instead.\n */\n date_format?: string\n /**\n * @deprecated use `returnFormat` instead.\n */\n return_format?: string\n /**\n * @deprecated use `hideNavigation` instead.\n */\n hide_navigation?: boolean\n /**\n * @deprecated use `hideNavigationButtons` instead.\n */\n hide_navigation_buttons?: boolean\n /**\n * @deprecated use `hideDays` instead.\n */\n hide_days?: boolean\n /**\n * @deprecated use `onlyMonth` instead.\n */\n only_month?: boolean\n /**\n * @deprecated use `hideLastWeek` instead.\n */\n hide_last_week?: boolean\n /**\n * @deprecated use `disableAutofocus` instead.\n */\n disable_autofocus?: boolean\n /**\n * @deprecated use `enableKeyboardNav` instead.\n */\n enable_keyboard_nav?: boolean\n /**\n * @deprecated use `showInput` instead.\n */\n show_input?: boolean\n /**\n * @deprecated use `showSubmitButton` instead.\n */\n show_submit_button?: boolean\n /**\n * @deprecated use `showCancelButton` instead.\n */\n show_cancel_button?: boolean\n /**\n * @deprecated\n */\n show_reset_button?: boolean\n /**\n * @deprecated use `submitButtonText` instead.\n */\n submit_button_text?: string\n /**\n * @deprecated use `cancelButtonText` instead.\n */\n cancel_button_text?: string\n /**\n * @deprecated use `resetButtonText` instead.\n */\n reset_button_text?: string\n /**\n * @deprecated use `resetDate` instead.\n */\n reset_date?: boolean\n /**\n * @deprecated use `firstDay` instead.\n */\n first_day?: string\n /**\n * @deprecated set locale with `Provider` instead.\n */\n locale?: Locale\n /**\n * @deprecated use `labelDirection` instead.\n */\n label_direction?: 'vertical' | 'horizontal'\n /**\n * @deprecated use `labelSrOnly` instead.\n */\n label_sr_only?: boolean\n /**\n * @deprecated use `inputElement` instead.\n */\n input_element?: InputInputElement\n /**\n * @deprecated use `addonElement` instead.\n */\n addon_element?: React.ReactNode\n /**\n * @deprecated use `statusState` instead.\n */\n status_state?: FormStatusState\n /**\n * @deprecated use `statusProps` instead.\n */\n status_props?: FormStatusProps\n /**\n * @deprecated use `statusNoAnimation` instead.\n */\n status_no_animation?: boolean\n /**\n * @deprecated use `preventClose` instead.\n */\n prevent_close?: boolean\n /**\n * @deprecated use `no_animation` instead.\n */\n no_animation?: boolean\n /**\n * @deprecated use `alignPicker` instead.\n */\n align_picker?: 'auto' | 'left' | 'right'\n /**\n * @deprecated use `onDaysRender` instead.\n */\n on_days_render?: (\n days: Array<CalendarDay>,\n nr?: DatePickerCalendarProps['nr']\n ) => void\n /**\n * @deprecated use `onChange` instead.\n */\n on_change?: (\n event: DatePickerEvent<React.ChangeEvent<HTMLInputElement>>\n ) => void\n /**\n * @deprecated use `onType` instead.\n */\n on_type?: (\n event: DatePickerEvent<React.ChangeEvent<HTMLInputElement>>\n ) => void\n /**\n * @deprecated use `onShow` instead.\n */\n on_show?: (event: DatePickerEvent<DisplayPickerEvent>) => void\n /**\n * @deprecated use `onHide` instead.\n */\n on_hide?: (event: DatePickerEvent<DisplayPickerEvent>) => void\n /**\n * @deprecated use `onSubmit` instead.\n */\n on_submit?: (\n event: DatePickerEvent<React.MouseEvent<HTMLButtonElement>>\n ) => void\n /**\n * @deprecated use `onCancel` instead.\n */\n on_cancel?: (\n event: DatePickerEvent<React.MouseEvent<HTMLButtonElement>>\n ) => void\n /**\n * @deprecated use `onReset` instead.\n */\n on_reset?: (\n event: DatePickerEvent<React.MouseEvent<HTMLButtonElement>>\n ) => void\n}\n\nexport type DatePickerAllProps = DatePickerProps &\n DatePickerDeprecatedProps &\n SpacingProps &\n Omit<\n React.HTMLProps<HTMLElement>,\n | 'ref'\n | 'children'\n | 'label'\n | 'size'\n | 'onChange'\n | 'onBlur'\n | 'onFocus'\n | 'onSubmit'\n | 'onReset'\n | 'start'\n >\n\nconst defaultProps: DatePickerProps = {\n maskOrder: 'dd/mm/yyyy',\n maskPlaceholder: 'dd/mm/åååå', // have to be same setup as \"mask\" - but can be like\n dateFormat: 'yyyy-MM-dd', // in v1 of date-fns we were more flexible in terms of the format\n returnFormat: 'yyyy-MM-dd', // used in date-fns v1\n hideNavigation: false,\n hideNavigationButtons: false,\n hideDays: false,\n onlyMonth: false,\n hideLastWeek: false,\n disableAutofocus: false,\n enableKeyboardNav: false,\n showInput: false,\n submitButtonText: 'Ok',\n cancelButtonText: 'Avbryt',\n resetButtonText: 'Tilbakestill',\n resetDate: true,\n firstDay: 'monday',\n range: false,\n link: false,\n sync: true,\n statusState: 'error',\n opened: false,\n noAnimation: false,\n direction: 'auto',\n skipPortal: false,\n}\n\nfunction DatePicker(externalProps: DatePickerAllProps) {\n const props = { ...defaultProps, ...externalProps }\n\n const {\n preventClose,\n onHide,\n onShow,\n onSubmit,\n onCancel,\n onReset,\n noAnimation,\n showInput,\n alignPicker,\n showSubmitButton,\n showCancelButton,\n range,\n hideDays,\n hideNavigation,\n opened: openedProp,\n endDate: endDateProp,\n } = convertSnakeCaseProps(props) // convertSnakeCaseProps - can be removed in v11\n\n const [opened, setOpened] = useState<boolean>(openedProp)\n const [hidden, setHidden] = useState(!opened)\n const [dates, setDates] = useState<\n Pick<DatePickerDates, 'startDate' | 'endDate'>\n >({})\n\n const context = useContext(Context)\n const blurDelay = 201 // some ms more than \"dropdownSlideDown 200ms\"\n const id = props.id || makeUniqueId()\n\n const innerRef = useRef<HTMLSpanElement>()\n const triangleRef = useRef<HTMLSpanElement>()\n const submitButtonRef = useRef<HTMLButtonElement>()\n const getReturnObject =\n useRef<DatePickerContextValues['getReturnObject']>()\n const hideTimeout = useRef<NodeJS.Timeout>()\n const outsideClick = useRef<DetectOutsideClickClass>()\n const calendarContainerRef = useRef<HTMLDivElement>()\n\n const translation = useTranslation().DatePicker\n\n if (endDateProp && !range) {\n warn(\n `The DatePicker got a \"endDate\". You have to set range={true} as well!.`\n )\n }\n\n const removeOutsideClickHandler = useCallback(() => {\n if (outsideClick.current) {\n outsideClick.current.remove()\n }\n }, [])\n\n const hidePicker = useCallback(\n (args?: DisplayPickerEvent) => {\n if (preventClose) {\n return // stop here\n }\n\n if (args && args.event && args.event.persist) {\n args.event.persist()\n }\n\n setOpened(false)\n\n hideTimeout.current = setTimeout(\n () => {\n setHidden(true)\n onHide?.({\n ...getReturnObject.current(args),\n })\n if (args?.['focusOnHide']) {\n try {\n submitButtonRef.current.focus({\n preventScroll: true,\n })\n } catch (e) {\n warn(e)\n }\n }\n },\n noAnimation ? 1 : blurDelay\n ) // wait until animation is over\n\n removeOutsideClickHandler()\n },\n [noAnimation, preventClose, onHide, removeOutsideClickHandler]\n )\n\n const setOutsideClickHandler = useCallback(() => {\n outsideClick.current = detectOutsideClick(\n // Sending in portalRef, instead of portalRef.current,\n // as that would lead to the ignoreElement being null/undefined,\n // since the portal has not been rendered yet,\n // causing the calendar to close when clicking on the calendar itself\n [innerRef.current, calendarContainerRef],\n ({ event }: { event: MouseEvent | KeyboardEvent }) => {\n hidePicker({ ...event, focusOnHide: event?.['code'] })\n }\n )\n }, [hidePicker])\n\n const setTrianglePosition = useCallback(() => {\n const triangleWidth = 16\n if (showInput && triangleRef.current && innerRef.current) {\n try {\n const shellWidth = innerRef.current\n .querySelector('.dnb-input__shell')\n .getBoundingClientRect().width\n\n const buttonWidth = innerRef.current\n .querySelector('.dnb-input__submit-button__button')\n .getBoundingClientRect().width\n\n if (alignPicker === 'right') {\n const distance = buttonWidth / 2 - triangleWidth / 2\n triangleRef.current.style.marginRight = `${distance / 16}rem`\n } else {\n const distance = shellWidth - buttonWidth / 2 - triangleWidth / 2\n triangleRef.current.style.marginLeft = `${distance / 16}rem`\n }\n } catch (e) {\n warn(e)\n }\n }\n }, [showInput, alignPicker])\n\n const showPicker = useCallback(\n (event?: DisplayPickerEvent) => {\n if (hideTimeout.current) {\n clearTimeout(hideTimeout.current)\n }\n\n setOpened(true)\n setHidden(false)\n\n onShow?.({ ...getReturnObject.current(event) })\n\n setOutsideClickHandler()\n },\n [setOutsideClickHandler, onShow]\n )\n\n // Make sure the triangle is positioned correctly after calendar is mounted\n useLayoutEffect(() => {\n if (!hidden) {\n setTrianglePosition()\n }\n }, [hidden, setTrianglePosition])\n\n // React to opened prop changes\n useEffect(() => {\n if (openedProp) {\n showPicker()\n }\n }, [openedProp, showPicker])\n\n const onPickerChange = useCallback(\n ({\n hidePicker: shouldHidePicker = true,\n ...args\n }: DatePickerChangeEvent<\n | React.MouseEvent<HTMLSpanElement>\n | React.KeyboardEvent<HTMLTableElement>\n >) => {\n if (shouldHidePicker && !showSubmitButton && !showCancelButton) {\n hidePicker()\n }\n\n setDates({ startDate: args.startDate, endDate: args.endDate })\n },\n [hidePicker, showSubmitButton, showCancelButton]\n )\n\n const onSubmitHandler = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n hidePicker(event)\n onSubmit?.({\n ...getReturnObject.current({ event }),\n })\n },\n [hidePicker, onSubmit]\n )\n\n const onCancelHandler = useCallback(\n (\n event: DatePickerChangeEvent<React.MouseEvent<HTMLButtonElement>>\n ) => {\n hidePicker()\n onCancel?.({ ...getReturnObject.current(event) })\n },\n [hidePicker, onCancel]\n )\n\n const onResetHandler = useCallback(\n (\n event: DatePickerChangeEvent<React.MouseEvent<HTMLButtonElement>>\n ) => {\n hidePicker()\n onReset?.({ ...getReturnObject.current(event) })\n },\n [hidePicker, onReset]\n )\n\n const togglePicker = useCallback(\n (args: React.MouseEvent<HTMLButtonElement>) => {\n !opened ? showPicker(args) : hidePicker(args)\n },\n [opened, showPicker, hidePicker]\n )\n\n const formatSelectedDateTitle = useCallback(() => {\n const { selectedDate, start, end } = translation\n const { startDate, endDate } = dates\n\n let currentDate = startDate ? format(startDate, 'PPPP') : null\n\n if (range && startDate && endDate) {\n currentDate = `${start} ${currentDate} - ${end} ${format(\n endDate,\n 'PPPP'\n )}`\n }\n\n return currentDate ? selectedDate.replace(/%s/, currentDate) : ''\n }, [range, translation, dates])\n\n // use only the props from context, who are available here anyway\n const extendedProps = extendPropsWithContext(\n props,\n defaultProps,\n { skeleton: context?.skeleton },\n convertSnakeCaseProps(context.getTranslation(props).DatePicker), // convertSnakeCaseProps - can be removed in v11\n pickFormElementProps(context?.FormRow), // Deprecated – can be removed in v11\n convertSnakeCaseProps(pickFormElementProps(context?.formElement)), // Deprecated – can be removed in v11\n context.DatePicker\n )\n\n const {\n label,\n title,\n labelDirection,\n labelSrOnly,\n onlyMonth,\n hideLastWeek,\n disableAutofocus,\n hideNavigationButtons,\n firstDay,\n resetDate,\n link,\n sync,\n inputElement,\n addonElement,\n shortcuts,\n disabled,\n stretch,\n skeleton,\n size,\n status,\n statusState,\n statusProps,\n statusNoAnimation,\n globalStatus,\n suffix,\n maskOrder,\n maskPlaceholder,\n submitButtonText,\n cancelButtonText,\n resetButtonText,\n showResetButton,\n className,\n tooltip,\n skipPortal,\n ...restProps\n } = extendedProps\n\n const attributes = useMemo(\n () => filterOutNonAttributes(restProps),\n [restProps]\n )\n\n const shouldHideDays = onlyMonth ? true : hideDays\n const shouldHideNavigation = onlyMonth\n ? hideNavigationButtons\n ? false\n : true\n : hideNavigation\n\n const showStatus = getStatusState(status)\n\n const pickerParams = {} as HTMLProps<HTMLSpanElement>\n\n if (showStatus || suffix) {\n pickerParams['aria-describedby'] = combineDescribedBy(\n pickerParams,\n showStatus ? id + '-status' : null,\n suffix ? id + '-suffix' : null\n )\n }\n\n const submitParams = {\n ['aria-expanded']: opened,\n ref: submitButtonRef,\n tabIndex: extendedProps.tabIndex,\n tooltip,\n }\n\n const selectedDateTitle = formatSelectedDateTitle()\n\n const mainParams = {\n className: classnames(\n 'dnb-date-picker',\n status && `dnb-date-picker__status--${statusState}`,\n labelDirection && `dnb-date-picker--${labelDirection}`,\n opened && 'dnb-date-picker--opened',\n hidden && 'dnb-date-picker--hidden',\n showInput && 'dnb-date-picker--show-input',\n (range || showSubmitButton || showCancelButton || showResetButton) &&\n 'dnb-date-picker--show-footer',\n alignPicker && `dnb-date-picker--${alignPicker}`,\n stretch && `dnb-date-picker--stretch`,\n 'dnb-form-component',\n size && `dnb-date-picker--${size}`,\n createSpacingClasses(props),\n className\n ),\n lang: context.locale,\n } as HTMLProps<HTMLSpanElement>\n\n const containerClassNames = classnames(\n 'dnb-date-picker__container',\n opened && 'dnb-date-picker__container--opened',\n !opened && 'dnb-date-picker__container--closed',\n hidden && 'dnb-date-picker__container--hidden',\n showInput && 'dnb-date-picker__container--show-input',\n alignPicker && `dnb-date-picker__container--${alignPicker}`,\n size && `dnb-date-picker--${size}`\n )\n\n const remainingDOMProps = validateDOMAttributes(props, attributes)\n const remainingSubmitProps = validateDOMAttributes(null, submitParams)\n const remainingPickerProps = validateDOMAttributes(\n null,\n skeletonDOMAttributes(pickerParams, skeleton, context)\n )\n\n return (\n <DatePickerProvider\n {...props}\n attributes={remainingDOMProps}\n setReturnObject={(fn) => (getReturnObject.current = fn)}\n hidePicker={hidePicker}\n >\n <span {...mainParams}>\n {label && (\n <FormLabel\n id={id + '-label'}\n forId={id}\n text={label}\n labelDirection={labelDirection}\n srOnly={labelSrOnly}\n disabled={disabled}\n skeleton={skeleton}\n />\n )}\n\n <span\n className=\"dnb-date-picker__inner\"\n ref={innerRef}\n {...remainingPickerProps}\n >\n <AlignmentHelper />\n\n <FormStatus\n show={showStatus}\n id={id + '-form-status'}\n globalStatus={globalStatus}\n label={String(label)}\n text_id={id + '-status'} // used for \"aria-describedby\"\n width_selector={id + '-shell'}\n text={status}\n state={statusState}\n no_animation={statusNoAnimation}\n skeleton={skeleton}\n {...statusProps}\n />\n\n <span className=\"dnb-date-picker__row\">\n <span className=\"dnb-date-picker__shell\" id={`${id}-shell`}>\n <DatePickerInput\n id={id}\n title={title}\n disabled={disabled}\n stretch={stretch}\n skeleton={skeleton}\n maskOrder={maskOrder}\n maskPlaceholder={maskPlaceholder}\n isRange={range}\n showInput={showInput}\n selectedDateTitle={selectedDateTitle}\n inputElement={inputElement}\n opened={opened}\n hidden={hidden}\n size={size}\n status={status ? 'error' : null}\n statusState={statusState}\n lang={context.locale}\n {...attributes}\n submitAttributes={remainingSubmitProps}\n onSubmit={togglePicker}\n {...statusProps}\n />\n\n {!hidden && (\n <DatePickerPortal\n alignment={alignPicker}\n skipPortal={skipPortal}\n targetElementRef={innerRef}\n >\n <span\n className={containerClassNames}\n ref={calendarContainerRef}\n >\n <span\n className=\"dnb-date-picker__triangle\"\n ref={triangleRef}\n />\n <DatePickerRange\n id={id}\n firstDayOfWeek={firstDay}\n resetDate={resetDate}\n isRange={range}\n isLink={link}\n isSync={sync}\n hideDays={shouldHideDays}\n hideNav={shouldHideNavigation}\n views={\n hideNavigationButtons\n ? [{ nextBtn: false, prevBtn: false }]\n : null\n }\n onlyMonth={onlyMonth}\n hideNextMonthWeek={hideLastWeek}\n noAutoFocus={disableAutofocus}\n onChange={onPickerChange}\n locale={context.locale}\n />\n {(addonElement || shortcuts) && (\n <DatePickerAddon\n renderElement={addonElement}\n shortcuts={shortcuts}\n />\n )}\n <DatePickerFooter\n isRange={range}\n onSubmit={onSubmitHandler}\n onCancel={onCancelHandler}\n onReset={onResetHandler}\n submitButtonText={submitButtonText}\n cancelButtonText={cancelButtonText}\n resetButtonText={resetButtonText}\n />\n </span>\n </DatePickerPortal>\n )}\n </span>\n {suffix && (\n <Suffix\n className=\"dnb-date-picker__suffix\"\n id={id + '-suffix'} // used for \"aria-describedby\"\n context={props}\n >\n {suffix}\n </Suffix>\n )}\n </span>\n </span>\n\n <p className=\"dnb-sr-only\" aria-live=\"assertive\">\n {selectedDateTitle}\n </p>\n </span>\n </DatePickerProvider>\n )\n}\n\nconst NonAttributes = [\n 'locale',\n 'id',\n 'month',\n 'date',\n 'startDate',\n 'endDate',\n 'minDate',\n 'maxDate',\n 'enableKeyboardNav',\n 'hideNavigation',\n 'returnFormat',\n 'dateFormat',\n 'hideDays',\n 'correctInvalidDate',\n 'opened',\n 'direction',\n 'range',\n 'showInput',\n 'noAnimation',\n 'onDaysRender',\n 'onShow',\n 'onType',\n 'onHide',\n 'showSubmitButton',\n 'showCancelButton',\n 'selectedDate',\n 'selectedMonth',\n 'selectedYear',\n 'nextMonth',\n 'nextYear',\n 'openPickerText',\n 'placeholderCharacters',\n 'prevMonth',\n 'prevYear',\n 'endMonth',\n 'startMonth',\n 'alignPicker',\n 'preventClose',\n]\n\nfunction filterOutNonAttributes(props: DatePickerProps) {\n return Object.keys(props).reduce((attributes, key) => {\n if (!NonAttributes.includes(key)) {\n attributes[key] = props[key]\n }\n return attributes\n }, {})\n}\n\nexport default DatePicker\n\nDatePicker._supportsSpacingProps = true\n"],"mappings":";;;;;;;;;;AAKA,OAAOA,KAAK,IAEVC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,eAAe,EACfC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AAEd,OAAOC,UAAU,MAAM,YAAY;AACnC,SACEC,IAAI,EACJC,YAAY,EACZC,sBAAsB,EACtBC,kBAAkB,EAClBC,cAAc,EACdC,kBAAkB,EAClBC,qBAAqB,QAEhB,+BAA+B;AACtC,OAAOC,eAAe,MAAM,8BAA8B;AAC1D,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,qBAAqB,QAAQ,4BAA4B;AAGlE,OAAOC,MAAM,MAAM,iBAAiB;AAE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ACA,OAAOlD,UAAU;EACnB,CAAC,EAAE,CAAC,CAAC,CAAC;AACR;AAEA,eAAepG,UAAU;AAEzBA,UAAU,CAACwJ,qBAAqB,GAAG,IAAI"}
1
+ {"version":3,"file":"DatePicker.js","names":["React","useCallback","useContext","useEffect","useLayoutEffect","useMemo","useRef","useState","classnames","warn","makeUniqueId","extendPropsWithContext","detectOutsideClick","getStatusState","combineDescribedBy","validateDOMAttributes","AlignmentHelper","createSpacingClasses","skeletonDOMAttributes","format","Context","Suffix","FormLabel","FormStatus","DatePickerProvider","DatePickerRange","DatePickerInput","DatePickerAddon","DatePickerFooter","pickFormElementProps","useTranslation","convertSnakeCaseProps","DatePickerPortal","defaultProps","maskOrder","maskPlaceholder","dateFormat","returnFormat","hideNavigation","hideNavigationButtons","hideDays","onlyMonth","hideLastWeek","disableAutofocus","enableKeyboardNav","showInput","submitButtonText","cancelButtonText","resetButtonText","resetDate","firstDay","range","link","sync","statusState","opened","noAnimation","direction","skipPortal","DatePicker","externalProps","props","_objectSpread","preventClose","onHide","onShow","onSubmit","onCancel","onReset","alignPicker","showSubmitButton","showCancelButton","openedProp","endDate","endDateProp","setOpened","hidden","setHidden","dates","setDates","context","blurDelay","id","innerRef","triangleRef","submitButtonRef","getReturnObject","hideTimeout","outsideClick","calendarContainerRef","translation","removeOutsideClickHandler","current","remove","hidePicker","args","event","persist","setTimeout","focus","preventScroll","e","setOutsideClickHandler","_ref","focusOnHide","setTrianglePosition","triangleWidth","shellWidth","querySelector","getBoundingClientRect","width","buttonWidth","distance","style","marginRight","marginLeft","showPicker","clearTimeout","onPickerChange","_ref2","shouldHidePicker","_objectWithoutProperties","_excluded","startDate","onSubmitHandler","onCancelHandler","onResetHandler","togglePicker","formatSelectedDateTitle","selectedDate","start","end","currentDate","replace","extendedProps","skeleton","getTranslation","FormRow","formElement","label","title","labelDirection","labelSrOnly","inputElement","addonElement","shortcuts","disabled","stretch","size","status","statusProps","statusNoAnimation","globalStatus","suffix","showResetButton","className","tooltip","restProps","_excluded2","attributes","filterOutNonAttributes","shouldHideDays","shouldHideNavigation","showStatus","pickerParams","submitParams","ref","tabIndex","selectedDateTitle","mainParams","lang","locale","containerClassNames","remainingDOMProps","remainingSubmitProps","remainingPickerProps","createElement","_extends","setReturnObject","fn","forId","text","srOnly","_AlignmentHelper","show","String","text_id","width_selector","state","no_animation","isRange","submitAttributes","alignment","targetElementRef","firstDayOfWeek","isLink","isSync","hideNav","views","nextBtn","prevBtn","hideNextMonthWeek","noAutoFocus","onChange","renderElement","NonAttributes","Object","keys","reduce","key","includes","_supportsSpacingProps"],"sources":["../../../../src/components/date-picker/DatePicker.tsx"],"sourcesContent":["/**\n * Web DatePicker Component\n *\n */\n\nimport React, {\n HTMLProps,\n useCallback,\n useContext,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react'\n\nimport classnames from 'classnames'\nimport {\n warn,\n makeUniqueId,\n extendPropsWithContext,\n detectOutsideClick,\n getStatusState,\n combineDescribedBy,\n validateDOMAttributes,\n DetectOutsideClickClass,\n} from '../../shared/component-helper'\nimport AlignmentHelper from '../../shared/AlignmentHelper'\nimport { createSpacingClasses } from '../space/SpacingHelper'\nimport { skeletonDOMAttributes } from '../skeleton/SkeletonHelper'\n\n// date-fns\nimport format from 'date-fns/format'\n\nimport Context, { Locale } from '../../shared/Context'\nimport Suffix from '../../shared/helpers/Suffix'\nimport FormLabel from '../form-label/FormLabel'\nimport FormStatus, {\n FormStatusProps,\n FormStatusState,\n FormStatusText,\n} from '../form-status/FormStatus'\nimport DatePickerProvider, {\n DatePickerChangeEvent,\n type ReturnObject,\n} from './DatePickerProvider'\nimport DatePickerRange from './DatePickerRange'\nimport DatePickerInput from './DatePickerInput'\nimport DatePickerAddon, { DatePickerAddonProps } from './DatePickerAddon'\nimport DatePickerFooter from './DatePickerFooter'\nimport { SpacingProps } from '../space/types'\nimport { InputInputElement, InputSize } from '../Input'\nimport { SkeletonShow } from '../Skeleton'\nimport { GlobalStatusConfigObject } from '../GlobalStatus'\nimport { pickFormElementProps } from '../../shared/helpers/filterValidProps'\nimport { CalendarDay, DatePickerCalendarProps } from './DatePickerCalendar'\nimport { DatePickerContextValues, DateType } from './DatePickerContext'\nimport { DatePickerDates } from './hooks/useDates'\nimport { useTranslation } from '../../shared'\nimport { convertSnakeCaseProps } from '../../shared/helpers/withSnakeCaseProps'\nimport DatePickerPortal from './DatePickerPortal'\n\nexport type DatePickerEventAttributes = {\n day?: string\n year?: string\n start?: string\n end?: string\n} & Record<string, unknown>\n\n// Takes the return object from DatePickerProvider and extends it with the event\nexport type DatePickerEvent<T> = ReturnObject<T>\n\ntype FocusOnHide = { focusOnHide?: boolean | string }\n\nexport type DisplayPickerEvent = (\n | React.MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLElement>\n | MouseEvent\n | KeyboardEvent\n | FocusOnHide\n) &\n DatePickerDates &\n FocusOnHide & {\n event?: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>\n }\n\nexport type DatePickerProps = {\n /**\n * Defines the pre-filled date by either a JavaScript DateInstance or (ISO 8601) like `date=\"2019-05-05\"`.\n */\n date?: DateType\n /**\n * To set the pre-filled starting date. Is used if `range={true}` is set to `true`. Defaults to `null`, showing the `maskPlaceholder`.\n */\n startDate?: DateType\n /**\n * To set the pre-filled ending date. Is used if `range={true}` is set to `true`. Defaults to `null`, showing the `maskPlaceholder`.\n */\n endDate?: DateType\n /**\n * To display what month should be shown in the first calendar by default. Defaults to the `date` respective `startDate`.\n */\n month?: DateType\n /**\n * To display what month should be shown in the first calendar by default. Defaults to the `date` respective `startDate`.\n */\n startMonth?: DateType\n /**\n * To display what month should be shown in the second calendar by default. Defaults to the `date` respective `startDate`.\n */\n endMonth?: DateType\n /**\n * To limit a date range to a minimum `startDate`. Defaults to `null`.\n */\n minDate?: DateType\n /**\n * To limit a date range to a maximum `endDate`. Defaults to `null`.\n */\n maxDate?: DateType\n /**\n * Corrects the input date value to be the same as either `minDate` or `maxDate`, when the user types in a date that is either before or after one of these. Defaults to `false`.\n */\n correctInvalidDate?: boolean\n /**\n * To define the order of the masked placeholder input fields. Defaults to `dd/mm/yyyy`\n */\n maskOrder?: string\n /**\n * To display the placeholder on input. Defaults to `dd/mm/åååå`.\n */\n maskPlaceholder?: string\n /**\n * Defines how the prop dates (`date`, `startDate` and `endDate`) should be parsed, e.g. `yyyy/MM/dd`. Defaults to `yyyy-MM-dd`.\n */\n dateFormat?: string\n /**\n * Defines how the returned date, as a string, should be formatted as. Defaults to `yyyy-MM-dd`.\n */\n returnFormat?: string\n /**\n * If set to `true`, the navigation will be hidden. Defaults to `false`.\n */\n hideNavigation?: boolean\n hideNavigationButtons?: boolean\n /**\n * If set to `true`, the week days will be hidden. Defaults to `false`.\n */\n hideDays?: boolean\n /**\n * Use `true` to only show the defined month. Disables the month navigation possibility. Defaults to `false`.\n */\n onlyMonth?: boolean\n /**\n * Use `true` to only show the last week in the current month if it needs to be shown. The result is that there will mainly be shows five (5) weeks (rows) instead of six (6). Defaults to `false`.\n */\n hideLastWeek?: boolean\n /**\n * Once the date picker gets opened, there is a focus handling to ensure good accessibility. can be disabled with property. Defaults to `false`.\n */\n disableAutofocus?: boolean\n enableKeyboardNav?: boolean\n /**\n * If the input fields with the mask should be visible. Defaults to `false`.\n */\n showInput?: boolean\n /**\n * If set to `true`, a submit button will be shown. You can change the default text by using `submitButtonText=\"Ok\"`. Defaults to `false`. If the `range` prop is `true`, then the submit button is shown.\n */\n showSubmitButton?: boolean\n /**\n * If set to `true`, a cancel button will be shown. You can change the default text by using `cancelButtonText=\"Avbryt\"` Defaults to `false`. If the `range` prop is `true`, then the cancel button is shown.\n */\n showCancelButton?: boolean\n /**\n * If set to `true`, a reset button will be shown. You can change the default text by using `resetButtonText=\"Tilbakestill\"` Defaults to `false`.\n */\n showResetButton?: boolean\n submitButtonText?: string\n cancelButtonText?: string\n resetButtonText?: string\n resetDate?: boolean\n /**\n * To define the first day of the week. Defaults to `monday`.\n */\n firstDay?:\n | 'monday'\n | 'tuesday'\n | 'wednesday'\n | 'thursday'\n | 'friday'\n | 'saturday'\n | 'sunday'\n /**\n * If the date picker should support a range of two dates (starting and ending date). Defaults to `false`.\n */\n range?: boolean\n /**\n * Link both calendars, once to the user is navigating between months. Only meant to use if the range is set to `true`. Defaults to `false`.\n */\n link?: boolean\n /**\n * Sync input values with the calendars views. Once the input values get changed, the calendar changes its views in sync. Defaults to `true`.\n */\n sync?: boolean\n /**\n * A prepending label in sync with the date input field.\n */\n label?: React.ReactNode\n /**\n * Use `labelDirection=\"vertical\"` to change the label layout direction. Defaults to `horizontal`.\n */\n labelDirection?: 'vertical' | 'horizontal'\n /**\n * Use `true` to make the label only readable by screen readers.\n */\n labelSrOnly?: boolean\n /**\n * Gives you the possibility to use a plain/vanilla `<input />` HTML element by defining it as a string `inputElement=\"input\"`, a React element, or a render function `inputElement={(internalProps) => (<Return />)}`. Can also be used in circumstances where the `react-text-mask` not should be used, e.g. in testing environments. Defaults to custom masked input.\n */\n inputElement?: InputInputElement\n /**\n * Gives you the possibility to inject a React element showing up over the footer. Use it to customize `shortcuts`.\n */\n addonElement?: React.ReactNode\n /**\n * Gives you the possibility to set predefined dates and date ranges so the user can select these by one click. Define either a JSON or an object with the defined shortcuts. More info is below.\n */\n shortcuts?: DatePickerAddonProps['shortcuts']\n disabled?: boolean\n /**\n * If set to `true`, then the date-picker input field will be 100% in `width`.\n */\n stretch?: boolean\n /**\n * If set to `true`, an overlaying skeleton with animation will be shown.\n */\n skeleton?: SkeletonShow\n /**\n * The sizes you can choose is `small` (1.5rem), `default` (2rem), `medium` (2.5rem) and `large` (3rem) are supported component sizes. Defaults to `default` / `null`.\n */\n size?: InputSize\n /**\n * Text with a status message. The style defaults to an error message. You can use `true` to only get the status color, without a message.\n */\n status?: FormStatusText\n /**\n * Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.\n */\n statusState?: FormStatusState\n /**\n * Use an object to define additional FormStatus properties.\n */\n statusProps?: FormStatusProps\n statusNoAnimation?: boolean\n /**\n * The <a href=\"/uilib/components/global-status/properties/#configuration-object\">configuration</a> used for the target <a href=\"/uilib/components/global-status\">GlobalStatus</a>.\n */\n globalStatus?: GlobalStatusConfigObject\n /**\n * Text describing the content of the DatePicker more than the label. You can also send in a React component, so it gets wrapped inside the DatePicker component.\n */\n suffix?: React.ReactNode\n /**\n * To open the date-picker by default. Defaults to `false`.\n */\n opened?: boolean\n /**\n * Provide a short Tooltip content that shows up on the picker button.\n */\n tooltip?: React.ReactNode\n tabIndex?: number\n preventClose?: boolean\n noAnimation?: boolean\n direction?: 'auto' | 'top' | 'bottom'\n /**\n * Use `right` to change the calendar alignment direction. Defaults to `left`.\n */\n alignPicker?: 'auto' | 'left' | 'right'\n /**\n * If set to `true`, the calendar will not be rendered inside a react portal. Defaults to `false`.\n */\n skipPortal?: boolean\n className?: string\n /**\n * Will be called right before every new calendar view gets rendered. See the example above.\n */\n onDaysRender?: (\n days: Array<CalendarDay>,\n nr?: DatePickerCalendarProps['nr']\n ) => void\n /**\n * Will be called on a date change event. Returns an `object`. See Returned Object below.\n */\n onChange?: (\n event: DatePickerEvent<React.ChangeEvent<HTMLInputElement>>\n ) => void\n /**\n * Will be called on every input and date picker interaction. Returns an `object`. See Returned Object below.\n */\n onType?: (\n event: DatePickerEvent<React.ChangeEvent<HTMLInputElement>>\n ) => void\n /**\n * Will be called once date-picker is visible.\n */\n onShow?: (event: DatePickerEvent<DisplayPickerEvent>) => void\n /**\n * Will be called once date-picker is hidden.\n */\n onHide?: (event: DatePickerEvent<DisplayPickerEvent>) => void\n /**\n * Will be called once a user presses the submit button.\n */\n onSubmit?: (\n event: DatePickerEvent<React.MouseEvent<HTMLButtonElement>>\n ) => void\n /**\n * Will be called once a user presses the cancel button.\n */\n onCancel?: (\n event: DatePickerEvent<React.MouseEvent<HTMLButtonElement>>\n ) => void\n /**\n * Will be called once a user presses the reset button.\n */\n onReset?: (\n event: DatePickerEvent<React.MouseEvent<HTMLButtonElement>>\n ) => void\n /**\n * Will be called once the input gets focus.\n */\n onFocus?: (event: DatePickerEvent<React.FocusEvent<HTMLElement>>) => void\n /**\n * Will be called once the input lose focus.\n */\n onBlur?: (event: DatePickerEvent<React.FocusEvent<HTMLElement>>) => void\n}\n// Can be removed in v11\ntype DatePickerDeprecatedProps = {\n /**\n * @deprecated use `startDate` instead.\n */\n start_date?: DateType\n /**\n * @deprecated use `endDate` instead.\n */\n end_date?: DateType\n /**\n * @deprecated use `startMonth` instead.\n */\n start_month?: DateType\n /**\n * @deprecated use `endMonth` instead.\n */\n end_month?: DateType\n /**\n * @deprecated use `minDate` instead.\n */\n min_date?: DateType\n /**\n * @deprecated use `maxDate` instead.\n */\n max_date?: DateType\n /**\n * @deprecated use `correctInvalidDate` instead.\n */\n correct_invalid_date?: boolean\n /**\n * @deprecated use `maskOrder` instead.\n */\n mask_order?: string\n /**\n * @deprecated use `maskPlaceholder` instead.\n */\n mask_placeholder?: string\n /**\n * @deprecated use `dateFormat` instead.\n */\n date_format?: string\n /**\n * @deprecated use `returnFormat` instead.\n */\n return_format?: string\n /**\n * @deprecated use `hideNavigation` instead.\n */\n hide_navigation?: boolean\n /**\n * @deprecated use `hideNavigationButtons` instead.\n */\n hide_navigation_buttons?: boolean\n /**\n * @deprecated use `hideDays` instead.\n */\n hide_days?: boolean\n /**\n * @deprecated use `onlyMonth` instead.\n */\n only_month?: boolean\n /**\n * @deprecated use `hideLastWeek` instead.\n */\n hide_last_week?: boolean\n /**\n * @deprecated use `disableAutofocus` instead.\n */\n disable_autofocus?: boolean\n /**\n * @deprecated use `enableKeyboardNav` instead.\n */\n enable_keyboard_nav?: boolean\n /**\n * @deprecated use `showInput` instead.\n */\n show_input?: boolean\n /**\n * @deprecated use `showSubmitButton` instead.\n */\n show_submit_button?: boolean\n /**\n * @deprecated use `showCancelButton` instead.\n */\n show_cancel_button?: boolean\n /**\n * @deprecated\n */\n show_reset_button?: boolean\n /**\n * @deprecated use `submitButtonText` instead.\n */\n submit_button_text?: string\n /**\n * @deprecated use `cancelButtonText` instead.\n */\n cancel_button_text?: string\n /**\n * @deprecated use `resetButtonText` instead.\n */\n reset_button_text?: string\n /**\n * @deprecated use `resetDate` instead.\n */\n reset_date?: boolean\n /**\n * @deprecated use `firstDay` instead.\n */\n first_day?: string\n /**\n * @deprecated set locale with `Provider` instead.\n */\n locale?: Locale\n /**\n * @deprecated use `labelDirection` instead.\n */\n label_direction?: 'vertical' | 'horizontal'\n /**\n * @deprecated use `labelSrOnly` instead.\n */\n label_sr_only?: boolean\n /**\n * @deprecated use `inputElement` instead.\n */\n input_element?: InputInputElement\n /**\n * @deprecated use `addonElement` instead.\n */\n addon_element?: React.ReactNode\n /**\n * @deprecated use `statusState` instead.\n */\n status_state?: FormStatusState\n /**\n * @deprecated use `statusProps` instead.\n */\n status_props?: FormStatusProps\n /**\n * @deprecated use `statusNoAnimation` instead.\n */\n status_no_animation?: boolean\n /**\n * @deprecated use `preventClose` instead.\n */\n prevent_close?: boolean\n /**\n * @deprecated use `no_animation` instead.\n */\n no_animation?: boolean\n /**\n * @deprecated use `alignPicker` instead.\n */\n align_picker?: 'auto' | 'left' | 'right'\n /**\n * @deprecated use `onDaysRender` instead.\n */\n on_days_render?: (\n days: Array<CalendarDay>,\n nr?: DatePickerCalendarProps['nr']\n ) => void\n /**\n * @deprecated use `onChange` instead.\n */\n on_change?: (\n event: DatePickerEvent<React.ChangeEvent<HTMLInputElement>>\n ) => void\n /**\n * @deprecated use `onType` instead.\n */\n on_type?: (\n event: DatePickerEvent<React.ChangeEvent<HTMLInputElement>>\n ) => void\n /**\n * @deprecated use `onShow` instead.\n */\n on_show?: (event: DatePickerEvent<DisplayPickerEvent>) => void\n /**\n * @deprecated use `onHide` instead.\n */\n on_hide?: (event: DatePickerEvent<DisplayPickerEvent>) => void\n /**\n * @deprecated use `onSubmit` instead.\n */\n on_submit?: (\n event: DatePickerEvent<React.MouseEvent<HTMLButtonElement>>\n ) => void\n /**\n * @deprecated use `onCancel` instead.\n */\n on_cancel?: (\n event: DatePickerEvent<React.MouseEvent<HTMLButtonElement>>\n ) => void\n /**\n * @deprecated use `onReset` instead.\n */\n on_reset?: (\n event: DatePickerEvent<React.MouseEvent<HTMLButtonElement>>\n ) => void\n}\n\nexport type DatePickerAllProps = DatePickerProps &\n DatePickerDeprecatedProps &\n SpacingProps &\n Omit<\n React.HTMLProps<HTMLElement>,\n | 'ref'\n | 'children'\n | 'label'\n | 'size'\n | 'onChange'\n | 'onBlur'\n | 'onFocus'\n | 'onSubmit'\n | 'onReset'\n | 'start'\n >\n\nconst defaultProps: DatePickerProps = {\n maskOrder: 'dd/mm/yyyy',\n maskPlaceholder: 'dd/mm/åååå', // have to be same setup as \"mask\" - but can be like\n dateFormat: 'yyyy-MM-dd', // in v1 of date-fns we were more flexible in terms of the format\n returnFormat: 'yyyy-MM-dd', // used in date-fns v1\n hideNavigation: false,\n hideNavigationButtons: false,\n hideDays: false,\n onlyMonth: false,\n hideLastWeek: false,\n disableAutofocus: false,\n enableKeyboardNav: false,\n showInput: false,\n submitButtonText: 'Ok',\n cancelButtonText: 'Avbryt',\n resetButtonText: 'Tilbakestill',\n resetDate: true,\n firstDay: 'monday',\n range: false,\n link: false,\n sync: true,\n statusState: 'error',\n opened: false,\n noAnimation: false,\n direction: 'auto',\n skipPortal: false,\n}\n\nfunction DatePicker(externalProps: DatePickerAllProps) {\n const props = { ...defaultProps, ...externalProps }\n\n const {\n preventClose,\n onHide,\n onShow,\n onSubmit,\n onCancel,\n onReset,\n noAnimation,\n showInput,\n alignPicker,\n showSubmitButton,\n showCancelButton,\n range,\n hideDays,\n hideNavigation,\n opened: openedProp,\n endDate: endDateProp,\n } = convertSnakeCaseProps(props) // convertSnakeCaseProps - can be removed in v11\n\n const [opened, setOpened] = useState<boolean>(openedProp)\n const [hidden, setHidden] = useState(!opened)\n const [dates, setDates] = useState<\n Pick<DatePickerDates, 'startDate' | 'endDate'>\n >({})\n\n const context = useContext(Context)\n const blurDelay = 201 // some ms more than \"dropdownSlideDown 200ms\"\n const id = props.id || makeUniqueId()\n\n const innerRef = useRef<HTMLSpanElement>()\n const triangleRef = useRef<HTMLSpanElement>()\n const submitButtonRef = useRef<HTMLButtonElement>()\n const getReturnObject =\n useRef<DatePickerContextValues['getReturnObject']>()\n const hideTimeout = useRef<NodeJS.Timeout>()\n const outsideClick = useRef<DetectOutsideClickClass>()\n const calendarContainerRef = useRef<HTMLDivElement>()\n\n const translation = useTranslation().DatePicker\n\n if (endDateProp && !range) {\n warn(\n `The DatePicker got a \"endDate\". You have to set range={true} as well!.`\n )\n }\n\n const removeOutsideClickHandler = useCallback(() => {\n if (outsideClick.current) {\n outsideClick.current.remove()\n }\n }, [])\n\n const hidePicker = useCallback(\n (args?: DisplayPickerEvent) => {\n if (preventClose) {\n return // stop here\n }\n\n if (args && args.event && args.event.persist) {\n args.event.persist()\n }\n\n setOpened(false)\n\n hideTimeout.current = setTimeout(\n () => {\n setHidden(true)\n onHide?.({\n ...getReturnObject.current(args),\n })\n if (args?.['focusOnHide']) {\n try {\n submitButtonRef.current.focus({\n preventScroll: true,\n })\n } catch (e) {\n warn(e)\n }\n }\n },\n noAnimation ? 1 : blurDelay\n ) // wait until animation is over\n\n removeOutsideClickHandler()\n },\n [noAnimation, preventClose, onHide, removeOutsideClickHandler]\n )\n\n const setOutsideClickHandler = useCallback(() => {\n outsideClick.current = detectOutsideClick(\n // Sending in portalRef, instead of portalRef.current,\n // as that would lead to the ignoreElement being null/undefined,\n // since the portal has not been rendered yet,\n // causing the calendar to close when clicking on the calendar itself\n [innerRef.current, calendarContainerRef],\n ({ event }: { event: MouseEvent | KeyboardEvent }) => {\n hidePicker({ ...event, focusOnHide: event?.['code'] })\n }\n )\n }, [hidePicker])\n\n const setTrianglePosition = useCallback(() => {\n const triangleWidth = 16\n if (showInput && triangleRef.current && innerRef.current) {\n try {\n const shellWidth = innerRef.current\n .querySelector('.dnb-input__shell')\n .getBoundingClientRect().width\n\n const buttonWidth = innerRef.current\n .querySelector('.dnb-input__submit-button__button')\n .getBoundingClientRect().width\n\n if (alignPicker === 'right') {\n const distance = buttonWidth / 2 - triangleWidth / 2\n triangleRef.current.style.marginRight = `${distance / 16}rem`\n } else {\n const distance = shellWidth - buttonWidth / 2 - triangleWidth / 2\n triangleRef.current.style.marginLeft = `${distance / 16}rem`\n }\n } catch (e) {\n warn(e)\n }\n }\n }, [showInput, alignPicker])\n\n const showPicker = useCallback(\n (event?: DisplayPickerEvent) => {\n if (hideTimeout.current) {\n clearTimeout(hideTimeout.current)\n }\n\n setOpened(true)\n setHidden(false)\n\n onShow?.({ ...getReturnObject.current(event) })\n\n setOutsideClickHandler()\n },\n [setOutsideClickHandler, onShow]\n )\n\n // Make sure the triangle is positioned correctly after calendar is mounted\n useLayoutEffect(() => {\n if (!hidden) {\n setTrianglePosition()\n }\n }, [hidden, setTrianglePosition])\n\n // React to opened prop changes\n useEffect(() => {\n if (openedProp) {\n showPicker()\n }\n }, [openedProp, showPicker])\n\n const onPickerChange = useCallback(\n ({\n hidePicker: shouldHidePicker = true,\n ...args\n }: DatePickerChangeEvent<\n | React.MouseEvent<HTMLSpanElement>\n | React.KeyboardEvent<HTMLTableElement>\n >) => {\n if (shouldHidePicker && !showSubmitButton && !showCancelButton) {\n hidePicker({ focusOnHide: true })\n }\n\n setDates({ startDate: args.startDate, endDate: args.endDate })\n },\n [hidePicker, showSubmitButton, showCancelButton]\n )\n\n const onSubmitHandler = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n hidePicker(event)\n onSubmit?.({\n ...getReturnObject.current({ event }),\n })\n },\n [hidePicker, onSubmit]\n )\n\n const onCancelHandler = useCallback(\n (\n event: DatePickerChangeEvent<React.MouseEvent<HTMLButtonElement>>\n ) => {\n hidePicker()\n onCancel?.({ ...getReturnObject.current(event) })\n },\n [hidePicker, onCancel]\n )\n\n const onResetHandler = useCallback(\n (\n event: DatePickerChangeEvent<React.MouseEvent<HTMLButtonElement>>\n ) => {\n hidePicker()\n onReset?.({ ...getReturnObject.current(event) })\n },\n [hidePicker, onReset]\n )\n\n const togglePicker = useCallback(\n (args: React.MouseEvent<HTMLButtonElement>) => {\n !opened ? showPicker(args) : hidePicker(args)\n },\n [opened, showPicker, hidePicker]\n )\n\n const formatSelectedDateTitle = useCallback(() => {\n const { selectedDate, start, end } = translation\n const { startDate, endDate } = dates\n\n let currentDate = startDate ? format(startDate, 'PPPP') : null\n\n if (range && startDate && endDate) {\n currentDate = `${start} ${currentDate} - ${end} ${format(\n endDate,\n 'PPPP'\n )}`\n }\n\n return currentDate ? selectedDate.replace(/%s/, currentDate) : ''\n }, [range, translation, dates])\n\n // use only the props from context, who are available here anyway\n const extendedProps = extendPropsWithContext(\n props,\n defaultProps,\n { skeleton: context?.skeleton },\n convertSnakeCaseProps(context.getTranslation(props).DatePicker), // convertSnakeCaseProps - can be removed in v11\n pickFormElementProps(context?.FormRow), // Deprecated – can be removed in v11\n convertSnakeCaseProps(pickFormElementProps(context?.formElement)), // Deprecated – can be removed in v11\n context.DatePicker\n )\n\n const {\n label,\n title,\n labelDirection,\n labelSrOnly,\n onlyMonth,\n hideLastWeek,\n disableAutofocus,\n hideNavigationButtons,\n firstDay,\n resetDate,\n link,\n sync,\n inputElement,\n addonElement,\n shortcuts,\n disabled,\n stretch,\n skeleton,\n size,\n status,\n statusState,\n statusProps,\n statusNoAnimation,\n globalStatus,\n suffix,\n maskOrder,\n maskPlaceholder,\n submitButtonText,\n cancelButtonText,\n resetButtonText,\n showResetButton,\n className,\n tooltip,\n skipPortal,\n ...restProps\n } = extendedProps\n\n const attributes = useMemo(\n () => filterOutNonAttributes(restProps),\n [restProps]\n )\n\n const shouldHideDays = onlyMonth ? true : hideDays\n const shouldHideNavigation = onlyMonth\n ? hideNavigationButtons\n ? false\n : true\n : hideNavigation\n\n const showStatus = getStatusState(status)\n\n const pickerParams = {} as HTMLProps<HTMLSpanElement>\n\n if (showStatus || suffix) {\n pickerParams['aria-describedby'] = combineDescribedBy(\n pickerParams,\n showStatus ? id + '-status' : null,\n suffix ? id + '-suffix' : null\n )\n }\n\n const submitParams = {\n ['aria-expanded']: opened,\n ref: submitButtonRef,\n tabIndex: extendedProps.tabIndex,\n tooltip,\n }\n\n const selectedDateTitle = formatSelectedDateTitle()\n\n const mainParams = {\n className: classnames(\n 'dnb-date-picker',\n status && `dnb-date-picker__status--${statusState}`,\n labelDirection && `dnb-date-picker--${labelDirection}`,\n opened && 'dnb-date-picker--opened',\n hidden && 'dnb-date-picker--hidden',\n showInput && 'dnb-date-picker--show-input',\n (range || showSubmitButton || showCancelButton || showResetButton) &&\n 'dnb-date-picker--show-footer',\n alignPicker && `dnb-date-picker--${alignPicker}`,\n stretch && `dnb-date-picker--stretch`,\n 'dnb-form-component',\n size && `dnb-date-picker--${size}`,\n createSpacingClasses(props),\n className\n ),\n lang: context.locale,\n } as HTMLProps<HTMLSpanElement>\n\n const containerClassNames = classnames(\n 'dnb-date-picker__container',\n opened && 'dnb-date-picker__container--opened',\n !opened && 'dnb-date-picker__container--closed',\n hidden && 'dnb-date-picker__container--hidden',\n showInput && 'dnb-date-picker__container--show-input',\n alignPicker && `dnb-date-picker__container--${alignPicker}`,\n size && `dnb-date-picker--${size}`\n )\n\n const remainingDOMProps = validateDOMAttributes(props, attributes)\n const remainingSubmitProps = validateDOMAttributes(null, submitParams)\n const remainingPickerProps = validateDOMAttributes(\n null,\n skeletonDOMAttributes(pickerParams, skeleton, context)\n )\n\n return (\n <DatePickerProvider\n {...props}\n attributes={remainingDOMProps}\n setReturnObject={(fn) => (getReturnObject.current = fn)}\n hidePicker={hidePicker}\n >\n <span {...mainParams}>\n {label && (\n <FormLabel\n id={id + '-label'}\n forId={id}\n text={label}\n labelDirection={labelDirection}\n srOnly={labelSrOnly}\n disabled={disabled}\n skeleton={skeleton}\n />\n )}\n\n <span\n className=\"dnb-date-picker__inner\"\n ref={innerRef}\n {...remainingPickerProps}\n >\n <AlignmentHelper />\n\n <FormStatus\n show={showStatus}\n id={id + '-form-status'}\n globalStatus={globalStatus}\n label={String(label)}\n text_id={id + '-status'} // used for \"aria-describedby\"\n width_selector={id + '-shell'}\n text={status}\n state={statusState}\n no_animation={statusNoAnimation}\n skeleton={skeleton}\n {...statusProps}\n />\n\n <span className=\"dnb-date-picker__row\">\n <span className=\"dnb-date-picker__shell\" id={`${id}-shell`}>\n <DatePickerInput\n id={id}\n title={title}\n disabled={disabled}\n stretch={stretch}\n skeleton={skeleton}\n maskOrder={maskOrder}\n maskPlaceholder={maskPlaceholder}\n isRange={range}\n showInput={showInput}\n selectedDateTitle={selectedDateTitle}\n inputElement={inputElement}\n opened={opened}\n hidden={hidden}\n size={size}\n status={status ? 'error' : null}\n statusState={statusState}\n lang={context.locale}\n {...attributes}\n submitAttributes={remainingSubmitProps}\n onSubmit={togglePicker}\n {...statusProps}\n />\n\n {!hidden && (\n <DatePickerPortal\n alignment={alignPicker}\n skipPortal={skipPortal}\n targetElementRef={innerRef}\n >\n <span\n className={containerClassNames}\n ref={calendarContainerRef}\n >\n <span\n className=\"dnb-date-picker__triangle\"\n ref={triangleRef}\n />\n <DatePickerRange\n id={id}\n firstDayOfWeek={firstDay}\n resetDate={resetDate}\n isRange={range}\n isLink={link}\n isSync={sync}\n hideDays={shouldHideDays}\n hideNav={shouldHideNavigation}\n views={\n hideNavigationButtons\n ? [{ nextBtn: false, prevBtn: false }]\n : null\n }\n onlyMonth={onlyMonth}\n hideNextMonthWeek={hideLastWeek}\n noAutoFocus={disableAutofocus}\n onChange={onPickerChange}\n locale={context.locale}\n />\n {(addonElement || shortcuts) && (\n <DatePickerAddon\n renderElement={addonElement}\n shortcuts={shortcuts}\n />\n )}\n <DatePickerFooter\n isRange={range}\n onSubmit={onSubmitHandler}\n onCancel={onCancelHandler}\n onReset={onResetHandler}\n submitButtonText={submitButtonText}\n cancelButtonText={cancelButtonText}\n resetButtonText={resetButtonText}\n />\n </span>\n </DatePickerPortal>\n )}\n </span>\n {suffix && (\n <Suffix\n className=\"dnb-date-picker__suffix\"\n id={id + '-suffix'} // used for \"aria-describedby\"\n context={props}\n >\n {suffix}\n </Suffix>\n )}\n </span>\n </span>\n\n <p className=\"dnb-sr-only\" aria-live=\"assertive\">\n {selectedDateTitle}\n </p>\n </span>\n </DatePickerProvider>\n )\n}\n\nconst NonAttributes = [\n 'locale',\n 'id',\n 'month',\n 'date',\n 'startDate',\n 'endDate',\n 'minDate',\n 'maxDate',\n 'enableKeyboardNav',\n 'hideNavigation',\n 'returnFormat',\n 'dateFormat',\n 'hideDays',\n 'correctInvalidDate',\n 'opened',\n 'direction',\n 'range',\n 'showInput',\n 'noAnimation',\n 'onDaysRender',\n 'onShow',\n 'onType',\n 'onHide',\n 'showSubmitButton',\n 'showCancelButton',\n 'selectedDate',\n 'selectedMonth',\n 'selectedYear',\n 'nextMonth',\n 'nextYear',\n 'openPickerText',\n 'placeholderCharacters',\n 'prevMonth',\n 'prevYear',\n 'endMonth',\n 'startMonth',\n 'alignPicker',\n 'preventClose',\n]\n\nfunction filterOutNonAttributes(props: DatePickerProps) {\n return Object.keys(props).reduce((attributes, key) => {\n if (!NonAttributes.includes(key)) {\n attributes[key] = props[key]\n }\n return attributes\n }, {})\n}\n\nexport default DatePicker\n\nDatePicker._supportsSpacingProps = true\n"],"mappings":";;;;;;;;;;AAKA,OAAOA,KAAK,IAEVC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,eAAe,EACfC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AAEd,OAAOC,UAAU,MAAM,YAAY;AACnC,SACEC,IAAI,EACJC,YAAY,EACZC,sBAAsB,EACtBC,kBAAkB,EAClBC,cAAc,EACdC,kBAAkB,EAClBC,qBAAqB,QAEhB,+BAA+B;AACtC,OAAOC,eAAe,MAAM,8BAA8B;AAC1D,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,qBAAqB,QAAQ,4BAA4B;AAGlE,OAAOC,MAAM,MAAM,iBAAiB;AAEpC,OAAOC,OAAO,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G,CAAC;IAC9B;IACA,OAAOlD,UAAU;EACnB,CAAC,EAAE,CAAC,CAAC,CAAC;AACR;AAEA,eAAepG,UAAU;AAEzBA,UAAU,CAACwJ,qBAAqB,GAAG,IAAI"}
@@ -1,7 +1,10 @@
1
1
  "use client";
2
2
 
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
5
  const _excluded = ["title"];
6
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
8
  import React, { useCallback, useContext, useMemo } from 'react';
6
9
  import { convertStringToDate } from './DatePickerCalc';
7
10
  import Button from '../button/Button';
@@ -56,7 +59,9 @@ function DatePickerAddon(props) {
56
59
  event
57
60
  });
58
61
  if (shortcut.close_on_select) {
59
- hidePicker(event);
62
+ hidePicker(_objectSpread(_objectSpread({}, event), {}, {
63
+ focusOnHide: true
64
+ }));
60
65
  }
61
66
  }, [callOnChange, currentDates, hidePicker]);
62
67
  const shortcutsArray = useMemo(() => shortcuts ? typeof shortcuts === 'string' ? JSON.parse(shortcuts) : shortcuts : [], [shortcuts]);
@@ -1 +1 @@
1
- {"version":3,"file":"DatePickerAddon.js","names":["React","useCallback","useContext","useMemo","convertStringToDate","Button","DatePickerContext","DatePickerAddon","props","updateDates","forceViewMonthChange","callOnChangeHandler","hidePicker","startDate","endDate","shortcuts","renderElement","currentDates","date","start_date","end_date","callOnChange","event","arguments","length","undefined","setDate","_ref","shortcut","close_on_select","shortcutsArray","JSON","parse","hasShortcuts","shortcutElements","createElement","Fragment","map","_ref2","i","title","_objectWithoutProperties","_excluded","key","text","variant","onClick","className"],"sources":["../../../../src/components/date-picker/DatePickerAddon.tsx"],"sourcesContent":["/**\n * Web DatePicker Component\n *\n */\n\nimport React, { useCallback, useContext, useMemo } from 'react'\nimport { convertStringToDate } from './DatePickerCalc'\nimport Button from '../button/Button'\nimport DatePickerContext from './DatePickerContext'\n\n// TODO: convert shortcut properties to camelCase, constitutes a breaking change - could be included in v11\nexport type DatePickerShortcut = {\n title?: string\n date?: string | Date | ((...args: unknown[]) => Date)\n start_date?: string | Date | ((...args: unknown[]) => Date)\n end_date?: string | Date | ((...args: unknown[]) => Date)\n close_on_select?: boolean\n}\n\nexport type DatePickerAddonProps = React.HTMLProps<HTMLElement> & {\n /**\n * Gives you the possibility to set predefined dates and date ranges so the user can select these by one click. Define either a JSON or an object with the defined shortcuts. More info is below.\n */\n shortcuts?: Array<DatePickerShortcut> | string\n renderElement?: React.ReactNode\n}\n\nfunction DatePickerAddon(props: DatePickerAddonProps) {\n const {\n updateDates,\n forceViewMonthChange,\n callOnChangeHandler,\n hidePicker,\n startDate,\n endDate,\n } = useContext(DatePickerContext)\n\n const { shortcuts, renderElement } = props\n\n const currentDates = useMemo(\n () => ({\n date: startDate,\n start_date: startDate,\n end_date: endDate,\n }),\n [startDate, endDate]\n )\n\n const callOnChange = useCallback(\n ({\n startDate,\n endDate,\n event = null,\n }: {\n startDate?: Date\n endDate?: Date\n event?: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>\n } = {}) => {\n updateDates({ startDate, endDate })\n forceViewMonthChange()\n callOnChangeHandler({\n startDate,\n endDate: endDate || startDate,\n event,\n })\n },\n [updateDates, callOnChangeHandler, forceViewMonthChange]\n )\n\n const setDate = useCallback(\n ({\n shortcut,\n event,\n }: {\n shortcut: DatePickerShortcut\n event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>\n }) => {\n const start_date = shortcut.date || shortcut.start_date\n const end_date = shortcut.end_date\n\n const startDate =\n typeof start_date === 'function'\n ? start_date(currentDates)\n : start_date\n ? convertStringToDate(start_date)\n : null\n\n const endDate =\n typeof end_date === 'function'\n ? end_date(currentDates)\n : end_date\n ? convertStringToDate(end_date)\n : null\n\n callOnChange({\n startDate,\n endDate: endDate || startDate,\n event,\n })\n\n if (shortcut.close_on_select) {\n hidePicker(event)\n }\n },\n [callOnChange, currentDates, hidePicker]\n )\n\n const shortcutsArray: Array<DatePickerShortcut> = useMemo(\n () =>\n shortcuts\n ? typeof shortcuts === 'string'\n ? JSON.parse(shortcuts)\n : shortcuts\n : [],\n [shortcuts]\n )\n\n const hasShortcuts = shortcutsArray && shortcutsArray.length > 0\n\n const shortcutElements = useMemo(\n () =>\n hasShortcuts && (\n <>\n {shortcutsArray.map(({ title, ...shortcut }, i: number) => {\n return (\n <Button\n key={i}\n text={title}\n variant=\"secondary\"\n onClick={(event) => setDate({ shortcut, event })}\n />\n )\n })}\n </>\n ),\n [hasShortcuts, shortcutsArray, setDate]\n )\n\n if (!hasShortcuts && !renderElement) {\n return <></>\n }\n\n return (\n <div className=\"dnb-date-picker__addon\">\n {renderElement}\n {shortcutElements}\n </div>\n )\n}\n\nexport default DatePickerAddon\n"],"mappings":";;;;AAKA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAC/D,SAASC,mBAAmB,QAAQ,kBAAkB;AACtD,OAAOC,MAAM,MAAM,kBAAkB;AACrC,OAAOC,iBAAiB,MAAM,qBAAqB;AAmBnD,SAASC,eAAeA,CAACC,KAA2B,EAAE;EACpD,MAAM;IACJC,WAAW;IACXC,oBAAoB;IACpBC,mBAAmB;IACnBC,UAAU;IACVC,SAAS;IACTC;EACF,CAAC,GAAGZ,UAAU,C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IAAKY,SAAS,EAAC;EAAwB,GACpC/B,aAAa,EACbkB,gBACE,CAAC;AAEV;AAEA,eAAe3B,eAAe"}
1
+ {"version":3,"file":"DatePickerAddon.js","names":["React","useCallback","useContext","useMemo","convertStringToDate","Button","DatePickerContext","DatePickerAddon","props","updateDates","forceViewMonthChange","callOnChangeHandler","hidePicker","startDate","endDate","shortcuts","renderElement","currentDates","date","start_date","end_date","callOnChange","event","arguments","length","undefined","setDate","_ref","shortcut","close_on_select","_objectSpread","focusOnHide","shortcutsArray","JSON","parse","hasShortcuts","shortcutElements","createElement","Fragment","map","_ref2","i","title","_objectWithoutProperties","_excluded","key","text","variant","onClick","className"],"sources":["../../../../src/components/date-picker/DatePickerAddon.tsx"],"sourcesContent":["/**\n * Web DatePicker Component\n *\n */\n\nimport React, { useCallback, useContext, useMemo } from 'react'\nimport { convertStringToDate } from './DatePickerCalc'\nimport Button from '../button/Button'\nimport DatePickerContext from './DatePickerContext'\n\n// TODO: convert shortcut properties to camelCase, constitutes a breaking change - could be included in v11\nexport type DatePickerShortcut = {\n title?: string\n date?: string | Date | ((...args: unknown[]) => Date)\n start_date?: string | Date | ((...args: unknown[]) => Date)\n end_date?: string | Date | ((...args: unknown[]) => Date)\n close_on_select?: boolean\n}\n\nexport type DatePickerAddonProps = React.HTMLProps<HTMLElement> & {\n /**\n * Gives you the possibility to set predefined dates and date ranges so the user can select these by one click. Define either a JSON or an object with the defined shortcuts. More info is below.\n */\n shortcuts?: Array<DatePickerShortcut> | string\n renderElement?: React.ReactNode\n}\n\nfunction DatePickerAddon(props: DatePickerAddonProps) {\n const {\n updateDates,\n forceViewMonthChange,\n callOnChangeHandler,\n hidePicker,\n startDate,\n endDate,\n } = useContext(DatePickerContext)\n\n const { shortcuts, renderElement } = props\n\n const currentDates = useMemo(\n () => ({\n date: startDate,\n start_date: startDate,\n end_date: endDate,\n }),\n [startDate, endDate]\n )\n\n const callOnChange = useCallback(\n ({\n startDate,\n endDate,\n event = null,\n }: {\n startDate?: Date\n endDate?: Date\n event?: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>\n } = {}) => {\n updateDates({ startDate, endDate })\n forceViewMonthChange()\n callOnChangeHandler({\n startDate,\n endDate: endDate || startDate,\n event,\n })\n },\n [updateDates, callOnChangeHandler, forceViewMonthChange]\n )\n\n const setDate = useCallback(\n ({\n shortcut,\n event,\n }: {\n shortcut: DatePickerShortcut\n event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>\n }) => {\n const start_date = shortcut.date || shortcut.start_date\n const end_date = shortcut.end_date\n\n const startDate =\n typeof start_date === 'function'\n ? start_date(currentDates)\n : start_date\n ? convertStringToDate(start_date)\n : null\n\n const endDate =\n typeof end_date === 'function'\n ? end_date(currentDates)\n : end_date\n ? convertStringToDate(end_date)\n : null\n\n callOnChange({\n startDate,\n endDate: endDate || startDate,\n event,\n })\n\n if (shortcut.close_on_select) {\n hidePicker({ ...event, focusOnHide: true })\n }\n },\n [callOnChange, currentDates, hidePicker]\n )\n\n const shortcutsArray: Array<DatePickerShortcut> = useMemo(\n () =>\n shortcuts\n ? typeof shortcuts === 'string'\n ? JSON.parse(shortcuts)\n : shortcuts\n : [],\n [shortcuts]\n )\n\n const hasShortcuts = shortcutsArray && shortcutsArray.length > 0\n\n const shortcutElements = useMemo(\n () =>\n hasShortcuts && (\n <>\n {shortcutsArray.map(({ title, ...shortcut }, i: number) => {\n return (\n <Button\n key={i}\n text={title}\n variant=\"secondary\"\n onClick={(event) => setDate({ shortcut, event })}\n />\n )\n })}\n </>\n ),\n [hasShortcuts, shortcutsArray, setDate]\n )\n\n if (!hasShortcuts && !renderElement) {\n return <></>\n }\n\n return (\n <div className=\"dnb-date-picker__addon\">\n {renderElement}\n {shortcutElements}\n </div>\n )\n}\n\nexport default DatePickerAddon\n"],"mappings":";;;;;;;AAKA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAC/D,SAASC,mBAAmB,QAAQ,kBAA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QAAQ;QAAEN;MAAM,CAAC;IAAE,CAClD,CAAC;EAEN,CAAC,CACD,CACH,EACH,CAACa,YAAY,EAAEH,cAAc,EAAEN,OAAO,CACxC,CAAC;EAED,IAAI,CAACS,YAAY,IAAI,CAACnB,aAAa,EAAE;IACnC,OAAOhB,KAAA,CAAAqC,aAAA,CAAArC,KAAA,CAAAsC,QAAA,MAAI,CAAC;EACd;EAEA,OACEtC,KAAA,CAAAqC,aAAA;IAAKY,SAAS,EAAC;EAAwB,GACpCjC,aAAa,EACboB,gBACE,CAAC;AAEV;AAEA,eAAe7B,eAAe"}
@@ -21,8 +21,10 @@ export type DatePickerEventAttributes = {
21
21
  end?: string;
22
22
  } & Record<string, unknown>;
23
23
  export type DatePickerEvent<T> = ReturnObject<T>;
24
- export type DisplayPickerEvent = (React.MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLElement> | MouseEvent | KeyboardEvent) & DatePickerDates & {
24
+ type FocusOnHide = {
25
25
  focusOnHide?: boolean | string;
26
+ };
27
+ export type DisplayPickerEvent = (React.MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLElement> | MouseEvent | KeyboardEvent | FocusOnHide) & DatePickerDates & FocusOnHide & {
26
28
  event?: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>;
27
29
  };
28
30
  export type DatePickerProps = {
@@ -172,7 +172,9 @@ function DatePicker(externalProps) {
172
172
  } = _ref,
173
173
  args = _objectWithoutProperties(_ref, _excluded);
174
174
  if (shouldHidePicker && !showSubmitButton && !showCancelButton) {
175
- hidePicker();
175
+ hidePicker({
176
+ focusOnHide: true
177
+ });
176
178
  }
177
179
  setDates({
178
180
  startDate: args.startDate,