@dnb/eufemia 10.67.0 → 10.67.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 (72) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/cjs/components/input/Input.js +17 -2
  3. package/cjs/components/input/Input.js.map +1 -1
  4. package/cjs/components/input-masked/InputMaskedHooks.js +5 -4
  5. package/cjs/components/input-masked/InputMaskedHooks.js.map +1 -1
  6. package/cjs/components/input-masked/MultiInputMask.js +3 -3
  7. package/cjs/components/input-masked/MultiInputMask.js.map +1 -1
  8. package/cjs/extensions/forms/Field/Date/Date.js +5 -4
  9. package/cjs/extensions/forms/Field/Date/Date.js.map +1 -1
  10. package/cjs/extensions/forms/Field/Date/DateDocs.js +4 -1
  11. package/cjs/extensions/forms/Field/Date/DateDocs.js.map +1 -1
  12. package/cjs/shared/Eufemia.d.ts +1 -1
  13. package/cjs/shared/Eufemia.js +2 -2
  14. package/cjs/shared/Eufemia.js.map +1 -1
  15. package/cjs/style/core/scopes.scss +1 -1
  16. package/cjs/style/dnb-ui-basis.css +1 -1
  17. package/cjs/style/dnb-ui-basis.min.css +1 -1
  18. package/cjs/style/dnb-ui-body.css +1 -1
  19. package/cjs/style/dnb-ui-body.min.css +1 -1
  20. package/cjs/style/dnb-ui-core.css +1 -1
  21. package/cjs/style/dnb-ui-core.min.css +1 -1
  22. package/components/input/Input.js +17 -2
  23. package/components/input/Input.js.map +1 -1
  24. package/components/input-masked/InputMaskedHooks.js +3 -4
  25. package/components/input-masked/InputMaskedHooks.js.map +1 -1
  26. package/components/input-masked/MultiInputMask.js +3 -3
  27. package/components/input-masked/MultiInputMask.js.map +1 -1
  28. package/es/components/input/Input.js +17 -2
  29. package/es/components/input/Input.js.map +1 -1
  30. package/es/components/input-masked/InputMaskedHooks.js +3 -4
  31. package/es/components/input-masked/InputMaskedHooks.js.map +1 -1
  32. package/es/components/input-masked/MultiInputMask.js +3 -3
  33. package/es/components/input-masked/MultiInputMask.js.map +1 -1
  34. package/es/extensions/forms/Field/Date/Date.js +5 -4
  35. package/es/extensions/forms/Field/Date/Date.js.map +1 -1
  36. package/es/extensions/forms/Field/Date/DateDocs.js +4 -1
  37. package/es/extensions/forms/Field/Date/DateDocs.js.map +1 -1
  38. package/es/shared/Eufemia.d.ts +1 -1
  39. package/es/shared/Eufemia.js +2 -2
  40. package/es/shared/Eufemia.js.map +1 -1
  41. package/es/style/core/scopes.scss +1 -1
  42. package/es/style/dnb-ui-basis.css +1 -1
  43. package/es/style/dnb-ui-basis.min.css +1 -1
  44. package/es/style/dnb-ui-body.css +1 -1
  45. package/es/style/dnb-ui-body.min.css +1 -1
  46. package/es/style/dnb-ui-core.css +1 -1
  47. package/es/style/dnb-ui-core.min.css +1 -1
  48. package/esm/dnb-ui-basis.min.mjs +1 -1
  49. package/esm/dnb-ui-components.min.mjs +1 -1
  50. package/esm/dnb-ui-elements.min.mjs +1 -1
  51. package/esm/dnb-ui-extensions.min.mjs +1 -1
  52. package/esm/dnb-ui-lib.min.mjs +1 -1
  53. package/extensions/forms/Field/Date/Date.js +5 -4
  54. package/extensions/forms/Field/Date/Date.js.map +1 -1
  55. package/extensions/forms/Field/Date/DateDocs.js +4 -1
  56. package/extensions/forms/Field/Date/DateDocs.js.map +1 -1
  57. package/package.json +1 -1
  58. package/shared/Eufemia.d.ts +1 -1
  59. package/shared/Eufemia.js +2 -2
  60. package/shared/Eufemia.js.map +1 -1
  61. package/style/core/scopes.scss +1 -1
  62. package/style/dnb-ui-basis.css +1 -1
  63. package/style/dnb-ui-basis.min.css +1 -1
  64. package/style/dnb-ui-body.css +1 -1
  65. package/style/dnb-ui-body.min.css +1 -1
  66. package/style/dnb-ui-core.css +1 -1
  67. package/style/dnb-ui-core.min.css +1 -1
  68. package/umd/dnb-ui-basis.min.js +1 -1
  69. package/umd/dnb-ui-components.min.js +1 -1
  70. package/umd/dnb-ui-elements.min.js +1 -1
  71. package/umd/dnb-ui-extensions.min.js +1 -1
  72. package/umd/dnb-ui-lib.min.js +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"MultiInputMask.js","names":["_react","_interopRequireWildcard","require","_Input","_interopRequireDefault","_TextMask","_useHandleCursorPosition","_classnames","_FormLabel","_SpacingHelper","_useMultiInputValues","_useId","_excluded","_excluded2","_excluded3","_excluded4","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","_extends","assign","bind","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","MultiInputMask","_ref","_inputs$","id","label","labelDirection","inputs","delimiter","onChange","onChangeExternal","disabled","status","statusState","values","defaultValues","className","stretch","inputMode","suffix","onBlur","onFocus","props","useId","useMultiInputValue","callback","inputRefs","useRef","areInputsInFocus","onKeyDown","useHandleCursorPosition","current","getKeysToHandle","WrapperElement","createElement","classnames","createSpacingClasses","element","forId","onClick","onLegendClick","label_direction","status_state","input_element","map","_ref2","index","inputId","rest","MultiInputMaskInput","e","_e$relatedTarget","_e$relatedTarget$id","relatedTarget","includes","getInputRef","firstInput","focus","setSelectionRange","ref","inputRef","uniqueMasks","getUniqueMasks","size","pattern","next","replace","RegExp","reduce","_ref3","mask","masks","Set","add","_ref4","placeholderCharacter","attributes","shouldHighlight","test","Fragment","placeholderChar","guide","showMask","keepCharPositions","_ref5","event","select","removePlaceholder","placeholder","_default","exports","_formElement","_supportsSpacingProps"],"sources":["../../../../src/components/input-masked/MultiInputMask.tsx"],"sourcesContent":["import React, { MutableRefObject, useRef } from 'react'\nimport Input from '../Input'\nimport type { InputProps } from '../Input'\nimport TextMask from './TextMask'\nimport useHandleCursorPosition from './hooks/useHandleCursorPosition'\nimport classnames from 'classnames'\nimport FormLabel from '../FormLabel'\nimport { SpacingProps } from '../space/types'\nimport { createSpacingClasses } from '../space/SpacingHelper'\nimport { FormStatusState, FormStatusText } from '../FormStatus'\nimport { useMultiInputValue } from './hooks/useMultiInputValues'\nimport useId from '../../shared/helpers/useId'\n\nexport type MultiInputMaskInput<T extends string> = {\n /**\n * Defines the id for the input. This id is also used to map the input value to the correct property on the objects used for `values` and `onChange` parameters.\n */\n id: T\n /**\n * Label used by the input. The label itself is hidden, but required to uphold accessibility standards for screen readers.\n */\n label: React.ReactNode\n /**\n * Each RegExp item in the array defines what the mask should be for each subsequent character in the input. The length sets the size of the input, so an array of two items would produce an input of two characters\n */\n mask: RegExp[]\n /**\n * Sets the placeholder character used for the input.\n */\n placeholderCharacter: string\n} & Omit<React.HTMLProps<HTMLInputElement>, 'onChange' | 'ref'>\n\nexport type MultiInputMaskValue<T extends string> = {\n // eslint-disable-next-line no-unused-vars\n [K in T]: string\n}\n\nexport type MultiInputMaskProps<T extends string> = {\n /**\n * The label describing the group of inputs inside the components.\n */\n label?: React.ReactNode\n /**\n * Use to change the label layout direction. Defaults to `horizontal`.\n */\n labelDirection?: 'vertical' | 'horizontal'\n /**\n * Used to define the different inputs representing the inputs in the component. The id's defined here is used to map input value to correct property in `values` parameters used in `onChange`\n */\n inputs: MultiInputMaskInput<T>[]\n /**\n * Values used for the inputs inside the component. Expects an object with keys matching the id's defined in `inputs`\n */\n values?: MultiInputMaskValue<T>\n /**\n * Defines the delimiter used to separate the inputs inside the component.\n */\n delimiter?: string\n /**\n * Runs when the input value changes. Has an object parameter with keys matching the id's defined in `inputs`. i.e. `{month: string, year: string}`\n */\n onChange?: (values: MultiInputMaskValue<T>) => void\n /**\n * Runs when the input gains focus. Has an object parameter with keys matching the id's defined in `inputs`. i.e. `{month: string, year: string}`\n */\n onFocus?: (values: MultiInputMaskValue<T>) => void\n /**\n * Runs when the input loses focus. Has an object parameter with keys matching the id's defined in `inputs`. i.e. `{month: string, year: string}`\n */\n onBlur?: (values: MultiInputMaskValue<T>) => void\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 * Set it to `true` in order to stretch the input to the available space. Defaults to false.\n */\n stretch?: boolean\n /**\n * Text describing the content of the input more than the label. you can also send in a React component, so it gets wrapped inside the Input component.\n */\n suffix?: React.ReactNode\n} & Omit<\n React.HTMLProps<HTMLInputElement>,\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'ref'\n | 'value'\n | 'label'\n | 'placeholder'\n | 'size'\n> &\n SpacingProps &\n Pick<InputProps, 'size'>\n\nfunction MultiInputMask<T extends string>({\n id,\n label,\n labelDirection = 'horizontal',\n inputs,\n delimiter,\n onChange: onChangeExternal,\n disabled,\n status,\n statusState,\n values: defaultValues,\n className,\n stretch,\n inputMode,\n suffix,\n onBlur,\n onFocus,\n ...props\n}: MultiInputMaskProps<T>) {\n id = useId(id)\n\n const [values, onChange] = useMultiInputValue({\n inputs,\n defaultValues,\n callback: onChangeExternal,\n })\n\n const inputRefs = useRef<Array<MutableRefObject<HTMLInputElement>>>([])\n const areInputsInFocus = useRef<boolean>(false)\n\n const { onKeyDown } = useHandleCursorPosition(\n inputRefs.current,\n getKeysToHandle()\n )\n\n const WrapperElement = label ? 'fieldset' : 'div'\n\n return (\n <WrapperElement\n className={classnames(\n 'dnb-multi-input-mask__fieldset',\n labelDirection === 'horizontal' &&\n 'dnb-multi-input-mask__fieldset--horizontal',\n createSpacingClasses(props)\n )}\n >\n <Input\n {...props}\n id={id}\n label={\n label && (\n <FormLabel\n element=\"legend\"\n forId={`${id}-${inputs[0]?.id}`}\n disabled={disabled}\n labelDirection={labelDirection}\n onClick={onLegendClick}\n >\n {label}\n </FormLabel>\n )\n }\n className={classnames('dnb-multi-input-mask', className)}\n label_direction={labelDirection}\n disabled={disabled}\n status={status}\n status_state={statusState}\n suffix={suffix}\n stretch={stretch}\n input_element={inputs.map(({ id: inputId, ...rest }, index) => {\n return (\n <MultiInputMaskInput\n key={inputId}\n id={id}\n inputId={inputId}\n delimiter={\n index !== inputs.length - 1 ? delimiter : undefined\n }\n disabled={disabled}\n inputMode={inputMode}\n onKeyDown={onKeyDown}\n onChange={onChange}\n onFocus={() => {\n if (!areInputsInFocus.current) {\n onFocus?.(values)\n }\n\n areInputsInFocus.current = true\n }}\n onBlur={(e) => {\n if (!e.relatedTarget?.id?.includes(id)) {\n onBlur?.(values)\n areInputsInFocus.current = false\n }\n }}\n getInputRef={getInputRef}\n {...rest}\n value={values[inputId]}\n />\n )\n })}\n />\n </WrapperElement>\n )\n\n // Event handlers\n function onLegendClick() {\n if (disabled) {\n return\n }\n\n const firstInput = inputRefs.current[0].current\n\n firstInput.focus()\n firstInput.setSelectionRange(0, 0)\n }\n\n // Utilities\n function getInputRef(ref?: {\n inputRef?: MutableRefObject<HTMLInputElement>\n }) {\n const inputRef = ref?.inputRef\n\n if (inputRef && !inputRefs.current.includes(inputRef)) {\n inputRefs.current.push(inputRef)\n }\n\n return inputRef\n }\n\n function getKeysToHandle() {\n const uniqueMasks = getUniqueMasks()\n\n // Return the only one RegExp since all the inputs are using the same mask\n if (uniqueMasks.size === 1) {\n const pattern = uniqueMasks.values().next().value.replace(/\\//g, '')\n return new RegExp(pattern)\n }\n\n // If there are multiple types of masks used, then map the maps to an object based on input ids\n // So that useHandleCursorPosition can do a per character test to see if the pressed key should be handled or not\n return inputs.reduce(\n (keys, { id, mask }) => {\n keys[id] = mask\n\n return keys\n },\n {} as Record<T, RegExp[]>\n )\n }\n\n function getUniqueMasks() {\n const masks = new Set()\n\n inputs.forEach((input) => {\n input.mask.forEach((pattern) => masks.add(String(pattern)))\n })\n\n return masks\n }\n}\n\ntype MultiInputMaskInputProps<T extends string> =\n MultiInputMaskInput<T> & {\n id: MultiInputMaskInput<T>['id']\n inputId: MultiInputMaskInput<T>['id']\n label: MultiInputMaskInput<T>['label']\n value: string\n mask: MultiInputMaskInput<T>['mask']\n placeholderCharacter: MultiInputMaskInput<T>['placeholderCharacter']\n delimiter?: MultiInputMaskProps<T>['delimiter']\n disabled: boolean\n onKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void\n onChange: (\n id: string,\n placeholderCharacter: MultiInputMaskInput<T>['placeholderCharacter']\n ) => void\n getInputRef: () => MutableRefObject<HTMLInputElement>\n }\n\nfunction MultiInputMaskInput<T extends string>({\n id,\n inputId,\n label,\n value,\n mask,\n placeholderCharacter,\n delimiter,\n disabled,\n getInputRef,\n onKeyDown,\n onChange,\n onBlur,\n onFocus,\n ...attributes\n}: MultiInputMaskInputProps<T>) {\n const shouldHighlight = !disabled && /\\w+/.test(value)\n\n return (\n <>\n <TextMask\n id={`${id}-${inputId}`}\n data-mask-id={inputId}\n className={classnames(\n 'dnb-input__input',\n 'dnb-multi-input-mask__input',\n shouldHighlight && 'dnb-multi-input-mask__input--highlight'\n )}\n disabled={disabled}\n size={mask.length}\n mask={mask}\n value={value ?? ''}\n placeholderChar={placeholderCharacter}\n guide={true}\n showMask={true}\n keepCharPositions={false} // so we can overwrite next value, if it already exists\n aria-label={label}\n ref={getInputRef}\n onKeyDown={onKeyDown}\n onBlur={onBlur}\n onFocus={({ target, ...event }) => {\n target.focus()\n target.select()\n\n if (onFocus) {\n onFocus({ target, ...event })\n }\n }}\n onChange={(event) => {\n onChange(\n inputId,\n removePlaceholder(event.target.value, placeholderCharacter)\n )\n }}\n {...attributes}\n />\n {delimiter && (\n <span\n aria-hidden\n className={classnames(\n 'dnb-multi-input-mask__delimiter',\n shouldHighlight && 'dnb-multi-input-mask__delimiter--highlight'\n )}\n >\n {delimiter}\n </span>\n )}\n </>\n )\n\n function removePlaceholder(value: string, placeholder: string) {\n return value.replace(RegExp(placeholder, 'gm'), '')\n }\n}\n\nexport default MultiInputMask\n\nMultiInputMask._formElement = true\nMultiInputMask._supportsSpacingProps = true\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,wBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,WAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,UAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAEA,IAAAO,cAAA,GAAAP,OAAA;AAEA,IAAAQ,oBAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAP,sBAAA,CAAAF,OAAA;AAA8C,MAAAU,SAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;AAAA,SAAAX,uBAAAY,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAnB,wBAAAe,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAQ,KAAA,GAAAL,wBAAA,CAAAC,WAAA,OAAAI,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,G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,SAAS,EACP,iCAAiC,IACjC6D,eAAe;EACf,GAEDrE,SACG,CAER,CAAC;EAGL,SAAS+E,iBAAiBA,CAAChH,KAAa,EAAEiH,WAAmB,EAAE;IAC7D,OAAOjH,KAAK,CAAC2F,OAAO,CAACC,MAAM,CAACqB,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;EACrD;AACF;AAAC,IAAAC,QAAA,GAEcxF,cAAc;AAAAyF,OAAA,CAAA5J,OAAA,GAAA2J,QAAA;AAE7BxF,cAAc,CAAC0F,YAAY,GAAG,IAAI;AAClC1F,cAAc,CAAC2F,qBAAqB,GAAG,IAAI"}
1
+ {"version":3,"file":"MultiInputMask.js","names":["_react","_interopRequireWildcard","require","_Input","_interopRequireDefault","_TextMask","_useHandleCursorPosition","_classnames","_FormLabel","_SpacingHelper","_useMultiInputValues","_useId","_excluded","_excluded2","_excluded3","_excluded4","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","_extends","assign","bind","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","MultiInputMask","_ref","_inputs$","id","label","labelDirection","inputs","delimiter","onChange","onChangeExternal","disabled","status","statusState","values","defaultValues","className","stretch","inputMode","suffix","onBlur","onFocus","props","useId","useMultiInputValue","callback","inputRefs","useRef","areInputsInFocus","onKeyDown","useHandleCursorPosition","current","getKeysToHandle","WrapperElement","createElement","classnames","createSpacingClasses","element","forId","onClick","onLegendClick","label_direction","status_state","input_element","map","_ref2","index","inputId","rest","MultiInputMaskInput","e","_e$relatedTarget","_e$relatedTarget$id","relatedTarget","includes","getInputRef","firstInput","focus","setSelectionRange","ref","inputRef","uniqueMasks","getUniqueMasks","size","pattern","next","replace","RegExp","reduce","_ref3","mask","masks","Set","add","_ref4","placeholderCharacter","attributes","shouldHighlight","test","Fragment","placeholderChar","guide","showMask","keepCharPositions","_ref5","event","select","removePlaceholder","placeholder","_default","exports","_formElement","_supportsSpacingProps"],"sources":["../../../../src/components/input-masked/MultiInputMask.tsx"],"sourcesContent":["import React, { MutableRefObject, useRef } from 'react'\nimport Input from '../Input'\nimport type { InputProps } from '../Input'\nimport TextMask from './TextMask'\nimport useHandleCursorPosition from './hooks/useHandleCursorPosition'\nimport classnames from 'classnames'\nimport FormLabel from '../FormLabel'\nimport { SpacingProps } from '../space/types'\nimport { createSpacingClasses } from '../space/SpacingHelper'\nimport { FormStatusState, FormStatusText } from '../FormStatus'\nimport { useMultiInputValue } from './hooks/useMultiInputValues'\nimport useId from '../../shared/helpers/useId'\n\nexport type MultiInputMaskInput<T extends string> = {\n /**\n * Defines the id for the input. This id is also used to map the input value to the correct property on the objects used for `values` and `onChange` parameters.\n */\n id: T\n /**\n * Label used by the input. The label itself is hidden, but required to uphold accessibility standards for screen readers.\n */\n label: React.ReactNode\n /**\n * Each RegExp item in the array defines what the mask should be for each subsequent character in the input. The length sets the size of the input, so an array of two items would produce an input of two characters\n */\n mask: RegExp[]\n /**\n * Sets the placeholder character used for the input.\n */\n placeholderCharacter: string\n} & Omit<React.HTMLProps<HTMLInputElement>, 'onChange' | 'ref'>\n\nexport type MultiInputMaskValue<T extends string> = {\n // eslint-disable-next-line no-unused-vars\n [K in T]: string\n}\n\nexport type MultiInputMaskProps<T extends string> = {\n /**\n * The label describing the group of inputs inside the components.\n */\n label?: React.ReactNode\n /**\n * Use to change the label layout direction. Defaults to `horizontal`.\n */\n labelDirection?: 'vertical' | 'horizontal'\n /**\n * Used to define the different inputs representing the inputs in the component. The id's defined here is used to map input value to correct property in `values` parameters used in `onChange`\n */\n inputs: MultiInputMaskInput<T>[]\n /**\n * Values used for the inputs inside the component. Expects an object with keys matching the id's defined in `inputs`\n */\n values?: MultiInputMaskValue<T>\n /**\n * Defines the delimiter used to separate the inputs inside the component.\n */\n delimiter?: string\n /**\n * Runs when the input value changes. Has an object parameter with keys matching the id's defined in `inputs`. i.e. `{month: string, year: string}`\n */\n onChange?: (values: MultiInputMaskValue<T>) => void\n /**\n * Runs when the input gains focus. Has an object parameter with keys matching the id's defined in `inputs`. i.e. `{month: string, year: string}`\n */\n onFocus?: (values: MultiInputMaskValue<T>) => void\n /**\n * Runs when the input loses focus. Has an object parameter with keys matching the id's defined in `inputs`. i.e. `{month: string, year: string}`\n */\n onBlur?: (values: MultiInputMaskValue<T>) => void\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 * Set it to `true` in order to stretch the input to the available space. Defaults to false.\n */\n stretch?: boolean\n /**\n * Text describing the content of the input more than the label. you can also send in a React component, so it gets wrapped inside the Input component.\n */\n suffix?: React.ReactNode\n} & Omit<\n React.HTMLProps<HTMLInputElement>,\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'ref'\n | 'value'\n | 'label'\n | 'placeholder'\n | 'size'\n> &\n SpacingProps &\n Pick<InputProps, 'size'>\n\nfunction MultiInputMask<T extends string>({\n id,\n label,\n labelDirection = 'horizontal',\n inputs,\n delimiter,\n onChange: onChangeExternal,\n disabled,\n status,\n statusState,\n values: defaultValues,\n className,\n stretch,\n inputMode,\n suffix,\n onBlur,\n onFocus,\n ...props\n}: MultiInputMaskProps<T>) {\n id = useId(id)\n\n const [values, onChange] = useMultiInputValue({\n inputs,\n defaultValues,\n callback: onChangeExternal,\n })\n\n const inputRefs = useRef<Array<MutableRefObject<HTMLInputElement>>>([])\n const areInputsInFocus = useRef<boolean>(false)\n\n const { onKeyDown } = useHandleCursorPosition(\n inputRefs.current,\n getKeysToHandle()\n )\n\n const WrapperElement = label ? 'fieldset' : 'div'\n\n return (\n <WrapperElement\n className={classnames(\n 'dnb-multi-input-mask__fieldset',\n labelDirection === 'horizontal' &&\n 'dnb-multi-input-mask__fieldset--horizontal',\n createSpacingClasses(props)\n )}\n >\n <Input\n {...props}\n id={id}\n label={\n label && (\n <FormLabel\n element=\"legend\"\n forId={`${id}-${inputs[0]?.id}`}\n disabled={disabled}\n labelDirection={labelDirection}\n onClick={onLegendClick}\n >\n {label}\n </FormLabel>\n )\n }\n className={classnames('dnb-multi-input-mask', className)}\n label_direction={labelDirection}\n disabled={disabled}\n status={status}\n status_state={statusState}\n suffix={suffix}\n stretch={stretch}\n input_element={inputs.map(({ id: inputId, ...rest }, index) => {\n return (\n <MultiInputMaskInput\n key={inputId}\n id={id}\n inputId={inputId}\n delimiter={\n index !== inputs.length - 1 ? delimiter : undefined\n }\n disabled={disabled}\n inputMode={inputMode}\n onKeyDown={onKeyDown}\n onChange={onChange}\n onFocus={() => {\n if (!areInputsInFocus.current) {\n onFocus?.(values)\n }\n\n areInputsInFocus.current = true\n }}\n onBlur={(e) => {\n if (!e.relatedTarget?.id?.includes(id)) {\n onBlur?.(values)\n areInputsInFocus.current = false\n }\n }}\n getInputRef={getInputRef}\n {...rest}\n value={values[inputId]}\n />\n )\n })}\n />\n </WrapperElement>\n )\n\n // Event handlers\n function onLegendClick() {\n if (disabled) {\n return\n }\n\n const firstInput = inputRefs.current[0].current\n\n firstInput.focus()\n firstInput.setSelectionRange(0, 0)\n }\n\n // Utilities\n function getInputRef(ref?: {\n inputRef?: MutableRefObject<HTMLInputElement>\n }) {\n const inputRef = ref?.inputRef\n\n if (inputRef && !inputRefs.current.includes(inputRef)) {\n inputRefs.current.push(inputRef)\n }\n\n return inputRef\n }\n\n function getKeysToHandle() {\n const uniqueMasks = getUniqueMasks()\n\n // Return the only one RegExp since all the inputs are using the same mask\n if (uniqueMasks.size === 1) {\n const pattern = uniqueMasks.values().next().value.replace(/\\//g, '')\n return new RegExp(pattern)\n }\n\n // If there are multiple types of masks used, then map the maps to an object based on input ids\n // So that useHandleCursorPosition can do a per character test to see if the pressed key should be handled or not\n return inputs.reduce(\n (keys, { id, mask }) => {\n keys[id] = mask\n\n return keys\n },\n {} as Record<T, RegExp[]>\n )\n }\n\n function getUniqueMasks() {\n const masks = new Set()\n\n inputs.forEach((input) => {\n input.mask.forEach((pattern) => masks.add(String(pattern)))\n })\n\n return masks\n }\n}\n\ntype MultiInputMaskInputProps<T extends string> =\n MultiInputMaskInput<T> & {\n id: MultiInputMaskInput<T>['id']\n inputId: MultiInputMaskInput<T>['id']\n label: MultiInputMaskInput<T>['label']\n value: string\n mask: MultiInputMaskInput<T>['mask']\n placeholderCharacter: MultiInputMaskInput<T>['placeholderCharacter']\n delimiter?: MultiInputMaskProps<T>['delimiter']\n disabled: boolean\n onKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void\n onChange: (\n id: string,\n placeholderCharacter: MultiInputMaskInput<T>['placeholderCharacter']\n ) => void\n getInputRef: () => MutableRefObject<HTMLInputElement>\n }\n\nfunction MultiInputMaskInput<T extends string>({\n id,\n inputId,\n label,\n value,\n mask,\n placeholderCharacter,\n delimiter,\n disabled,\n getInputRef,\n onKeyDown,\n onChange,\n onBlur,\n onFocus,\n ...attributes\n}: MultiInputMaskInputProps<T>) {\n const shouldHighlight = !disabled && /\\w+/.test(value)\n\n return (\n <>\n <TextMask\n id={`${id}-${inputId}`}\n data-mask-id={inputId}\n className={classnames(\n 'dnb-input__input',\n 'dnb-multi-input-mask__input',\n shouldHighlight && 'dnb-multi-input-mask__input--highlight'\n )}\n disabled={disabled}\n size={mask.length}\n mask={mask}\n value={value ?? ''}\n placeholderChar={placeholderCharacter}\n guide={true}\n showMask={true}\n keepCharPositions={false} // so we can overwrite next value, if it already exists\n aria-label={label}\n ref={getInputRef}\n onKeyDown={onKeyDown}\n onBlur={onBlur}\n onFocus={({ target, ...event }) => {\n target.focus()\n target.select()\n\n if (onFocus) {\n onFocus({ target, ...event })\n }\n }}\n onChange={(event) => {\n onChange(\n inputId,\n removePlaceholder(event.target.value, placeholderCharacter)\n )\n }}\n {...attributes}\n />\n {delimiter && (\n <span\n aria-hidden\n className={classnames(\n 'dnb-multi-input-mask__delimiter',\n shouldHighlight && 'dnb-multi-input-mask__delimiter--highlight'\n )}\n >\n {delimiter}\n </span>\n )}\n </>\n )\n}\n\nfunction removePlaceholder(value: string, placeholder: string) {\n return value.replace(RegExp(placeholder, 'gm'), '')\n}\n\nexport default MultiInputMask\n\nMultiInputMask._formElement = true\nMultiInputMask._supportsSpacingProps = true\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,wBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,WAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,UAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAEA,IAAAO,cAAA,GAAAP,OAAA;AAEA,IAAAQ,oBAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAP,sBAAA,CAAAF,OAAA;AAA8C,MAAAU,SAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;AAAA,SAAAX,uBAAAY,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,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OAAO,EAAE;QACXA,OAAO,CAAAxD,aAAA;UAAGC;QAAM,GAAKuH,KAAK,CAAE,CAAC;MAC/B;IACF,CAAE;IACF5E,QAAQ,EAAG4E,KAAK,IAAK;MACnB5E,QAAQ,CACNsC,OAAO,EACPwC,iBAAiB,CAACF,KAAK,CAACvH,MAAM,CAACS,KAAK,EAAEoG,oBAAoB,CAC5D,CAAC;IACH;EAAE,GACEC,UAAU,CACf,CAAC,EACDpE,SAAS,IACR5F,MAAA,CAAAkB,OAAA,CAAAoG,aAAA;IACE,mBAAW;IACXlB,SAAS,EACP,iCAAiC,IACjC6D,eAAe;EACf,GAEDrE,SACG,CAER,CAAC;AAEP;AAEA,SAAS+E,iBAAiBA,CAAChH,KAAa,EAAEiH,WAAmB,EAAE;EAC7D,OAAOjH,KAAK,CAAC2F,OAAO,CAACC,MAAM,CAACqB,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;AACrD;AAAC,IAAAC,QAAA,GAEcxF,cAAc;AAAAyF,OAAA,CAAA5J,OAAA,GAAA2J,QAAA;AAE7BxF,cAAc,CAAC0F,YAAY,GAAG,IAAI;AAClC1F,cAAc,CAAC2F,qBAAqB,GAAG,IAAI"}
@@ -18,6 +18,7 @@ var _useTranslation = _interopRequireDefault(require("../../hooks/useTranslation
18
18
  var _Date = require("../../Value/Date");
19
19
  var _DatePickerCalc = require("../../../../components/date-picker/DatePickerCalc");
20
20
  var _utils2 = require("../../utils");
21
+ var _startOfDay = _interopRequireDefault(require("date-fns/startOfDay"));
21
22
  const _excluded = ["id", "path", "itemPath", "className", "label", "value", "hasError", "disabled", "htmlAttributes", "handleFocus", "handleBlur", "handleChange", "setDisplayValue", "range", "showCancelButton", "showResetButton", "showInput", "onReset", "minDate", "maxDate"],
22
23
  _excluded2 = ["value", "isRange", "locale"];
23
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -195,10 +196,10 @@ function validateDateLimit(_ref3) {
195
196
  return;
196
197
  }
197
198
  const [startDateParsed, endDateParsed] = parseRangeValue(value);
198
- const minDate = (0, _DatePickerCalc.convertStringToDate)(dates.minDate);
199
- const maxDate = (0, _DatePickerCalc.convertStringToDate)(dates.maxDate);
200
- const startDate = (0, _DatePickerCalc.convertStringToDate)(startDateParsed);
201
- const endDate = (0, _DatePickerCalc.convertStringToDate)(endDateParsed);
199
+ const minDate = (0, _startOfDay.default)((0, _DatePickerCalc.convertStringToDate)(dates.minDate));
200
+ const maxDate = (0, _startOfDay.default)((0, _DatePickerCalc.convertStringToDate)(dates.maxDate));
201
+ const startDate = (0, _startOfDay.default)((0, _DatePickerCalc.convertStringToDate)(startDateParsed));
202
+ const endDate = (0, _startOfDay.default)((0, _DatePickerCalc.convertStringToDate)(endDateParsed));
202
203
  const isoDates = {
203
204
  minDate: dates.minDate instanceof Date ? dates.minDate.toISOString() : dates.minDate,
204
205
  maxDate: dates.maxDate instanceof Date ? dates.maxDate.toISOString() : dates.maxDate
@@ -1 +1 @@
1
- {"version":3,"file":"Date.js","names":["_react","_interopRequireWildcard","require","_components","_hooks","_utils","_classnames","_interopRequireDefault","_FieldBlock","_Context","_dateFns","_useTranslation","_Date","_DatePickerCalc","_utils2","_excluded","_excluded2","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","ownKeys","object","enumerableOnly","symbols","filter","sym","enumerable","push","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","DateComponent","props","_props$validateInitia","errorRequired","label","defaultLabel","useTranslation","Date","locale","useContext","SharedContext","errorMessages","useMemo","schema","_props$schema","type","pattern","validateRequired","useCallback","_ref","required","error","isValid","parseISO","dateLimitValidator","validateDateLimit","minDate","maxDate","isRange","range","onBlurValidator","hasDateLimitAndValue","Boolean","preparedProps","fromInput","_ref2","date","start_date","end_date","validateInitially","exportValidators","_useFieldProps","useFieldProps","id","path","itemPath","className","valueProp","hasError","disabled","htmlAttributes","handleFocus","handleBlur","handleChange","setDisplayValue","showCancelButton","showResetButton","showInput","onReset","rest","datePickerProps","pickDatePickerProps","startDate","endDate","parseRangeValue","formatDate","fieldBlockProps","forId","classnames","pickSpacingProps","createElement","DatePicker","status","onChange","event","onFocus","onBlur","split","map","test","_ref3","dates","startDateParsed","endDateParsed","convertStringToDate","isoDates","toISOString","options","variant","isBefore","FormError","messageValues","isAfter","messages","datePickerPropKeys","reduce","includes","_supportsSpacingProps","_default","exports"],"sources":["../../../../../../src/extensions/forms/Field/Date/Date.tsx"],"sourcesContent":["import React, { useCallback, useContext, useMemo } from 'react'\nimport { DatePicker } from '../../../../components'\nimport { useFieldProps } from '../../hooks'\nimport type {\n FieldProps,\n AllJSONSchemaVersions,\n ValidatorDisableable,\n} from '../../types'\nimport { pickSpacingProps } from '../../../../components/flex/utils'\nimport classnames from 'classnames'\nimport FieldBlock, { Props as FieldBlockProps } from '../../FieldBlock'\nimport SharedContext from '../../../../shared/Context'\nimport { parseISO, isValid, isBefore, isAfter } from 'date-fns'\nimport useTranslation from '../../hooks/useTranslation'\nimport { FormatDateOptions, formatDate } from '../../Value/Date'\nimport {\n DatePickerEvent,\n DatePickerProps,\n} from '../../../../components/DatePicker'\nimport { convertStringToDate } from '../../../../components/date-picker/DatePickerCalc'\nimport { ProviderProps } from '../../../../shared/Provider'\nimport { FormError } from '../../utils'\n\n// `range`, `showInput`, `showCancelButton` and `showResetButton` are not picked from the `DatePickerProps`\n// Since they require `Field.Date` specific comments, due to them having different default values\nexport type DateProps = Omit<\n FieldProps<string, undefined | string>,\n 'onBlurValidator'\n> & {\n // Validation\n pattern?: string\n /**\n * Defines if the Date field should support a value of two dates (starting and ending date).\n * The value needs to be a string containing two dates, separated by a pipe character (`|`) i.e. (`01-09-2024|30-09-2024`) when this is set to `true`.\n * Defaults to `false`.\n */\n range?: DatePickerProps['range']\n /**\n * If the input fields with the mask should be visible. Defaults to `true`.\n */\n showInput?: DatePickerProps['showInput']\n\n /**\n * If set to `true`, a cancel button will be shown. You can change the default text by using `cancel_button_text=\"Avbryt\"` Defaults to `true`. If the `range` prop is `true`, then the cancel button is shown.\n */\n showCancelButton?: DatePickerProps['showCancelButton']\n /**\n * If set to `true`, a reset button will be shown. You can change the default text by using `reset_button_text=\"Tilbakestill\"` Defaults to `true`.\n */\n showResetButton?: DatePickerProps['showResetButton']\n onBlurValidator?: ValidatorDisableable<string>\n} & Pick<\n DatePickerProps,\n | 'month'\n | 'startMonth'\n | 'endMonth'\n | 'minDate'\n | 'maxDate'\n | 'correctInvalidDate'\n | 'maskOrder'\n | 'maskPlaceholder'\n | 'dateFormat'\n | 'returnFormat'\n | 'hideNavigation'\n | 'hideDays'\n | 'onlyMonth'\n | 'hideLastWeek'\n | 'disableAutofocus'\n | 'showSubmitButton'\n | 'submitButtonText'\n | 'cancelButtonText'\n | 'resetButtonText'\n | 'firstDay'\n | 'link'\n | 'size'\n | 'sync'\n | 'addonElement'\n | 'shortcuts'\n | 'opened'\n | 'direction'\n | 'alignPicker'\n | 'onDaysRender'\n | 'onType'\n | 'onShow'\n | 'onHide'\n | 'onSubmit'\n | 'onCancel'\n | 'onReset'\n | 'skipPortal'\n >\n\nfunction DateComponent(props: DateProps) {\n const { errorRequired, label: defaultLabel } = useTranslation().Date\n const { locale } = useContext(SharedContext)\n\n const errorMessages = useMemo(() => {\n return {\n 'Field.errorRequired': errorRequired,\n 'Field.errorPattern': errorRequired,\n ...props.errorMessages,\n }\n }, [props.errorMessages, errorRequired])\n\n const schema = useMemo<AllJSONSchemaVersions>(\n () =>\n props.schema ?? {\n type: 'string',\n pattern: props.pattern,\n },\n [props.schema, props.pattern]\n )\n\n const validateRequired = useCallback(\n (value: string, { required, error }) => {\n if (required && (!value || !isValid(parseISO(value)))) {\n return error\n }\n\n return undefined\n },\n []\n )\n\n const dateLimitValidator = useCallback(\n (value: string) => {\n const res = validateDateLimit({\n value,\n locale,\n minDate: props.minDate,\n maxDate: props.maxDate,\n isRange: props.range,\n })\n\n return res\n },\n [props.maxDate, props.minDate, props.range, locale]\n )\n\n const onBlurValidator = useMemo(() => {\n if (props.onBlurValidator === false) {\n return undefined\n }\n\n if (props.onBlurValidator) {\n return props.onBlurValidator\n }\n\n return dateLimitValidator\n }, [props.onBlurValidator, dateLimitValidator])\n\n const hasDateLimitAndValue = useMemo(() => {\n return (props.minDate || props.maxDate) && Boolean(props.value)\n }, [props.minDate, props.maxDate, props.value])\n\n const preparedProps = {\n ...props,\n errorMessages,\n schema,\n fromInput: ({\n date,\n start_date,\n end_date,\n }: DatePickerEvent<React.ChangeEvent<HTMLInputElement>>) => {\n return range ? `${start_date}|${end_date}` : date\n },\n validateRequired,\n validateInitially: props.validateInitially ?? hasDateLimitAndValue,\n onBlurValidator,\n exportValidators: { dateLimitValidator },\n }\n\n const {\n id,\n path,\n itemPath,\n className,\n label,\n value: valueProp,\n hasError,\n disabled,\n htmlAttributes,\n handleFocus,\n handleBlur,\n handleChange,\n setDisplayValue,\n range,\n showCancelButton = true,\n showResetButton = true,\n showInput = true,\n onReset,\n minDate,\n maxDate,\n ...rest\n } = useFieldProps(preparedProps)\n\n const datePickerProps = pickDatePickerProps(rest)\n\n const { value, startDate, endDate } = useMemo(() => {\n if (!range || !valueProp) {\n return {\n // Assign to null if falsy value, to properly clear input values\n value: valueProp ?? null,\n startDate: undefined,\n endDate: undefined,\n }\n }\n\n const [startDate, endDate] = parseRangeValue(valueProp)\n\n return {\n value: undefined,\n startDate,\n endDate,\n }\n }, [range, valueProp])\n\n useMemo(() => {\n if ((path || itemPath) && valueProp) {\n setDisplayValue(formatDate(valueProp, { locale }), undefined)\n }\n }, [itemPath, locale, path, setDisplayValue, valueProp])\n\n const fieldBlockProps: FieldBlockProps = {\n forId: id,\n label: label ?? defaultLabel,\n className: classnames('dnb-forms-field-string', className),\n ...pickSpacingProps(props),\n }\n\n return (\n <FieldBlock {...fieldBlockProps}>\n <DatePicker\n id={id}\n date={value}\n disabled={disabled}\n showInput={showInput}\n showCancelButton={showCancelButton}\n showResetButton={showResetButton}\n startDate={startDate}\n endDate={endDate}\n minDate={minDate}\n maxDate={maxDate}\n status={hasError ? 'error' : undefined}\n range={range}\n onChange={handleChange}\n onReset={(event) => {\n handleChange(event)\n onReset?.(event)\n }}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...datePickerProps}\n {...htmlAttributes}\n />\n </FieldBlock>\n )\n}\n\nfunction parseRangeValue(value: DateProps['value']) {\n return (\n value\n .split('|')\n // Assign to null if falsy value, to properly clear input values\n .map((value) => (/(undefined|null)/.test(value) ? null : value))\n )\n}\n\nfunction validateDateLimit({\n value,\n isRange,\n locale,\n ...dates\n}: {\n value: DateProps['value']\n minDate: DateProps['minDate']\n maxDate: DateProps['maxDate']\n isRange: DateProps['range']\n locale: ProviderProps['locale']\n}) {\n if ((!dates.minDate && !dates.maxDate) || !value) {\n return\n }\n\n const [startDateParsed, endDateParsed] = parseRangeValue(value)\n\n const minDate = convertStringToDate(dates.minDate)\n const maxDate = convertStringToDate(dates.maxDate)\n\n const startDate = convertStringToDate(startDateParsed)\n const endDate = convertStringToDate(endDateParsed)\n\n const isoDates = {\n minDate:\n dates.minDate instanceof Date\n ? dates.minDate.toISOString()\n : dates.minDate,\n maxDate:\n dates.maxDate instanceof Date\n ? dates.maxDate.toISOString()\n : dates.maxDate,\n }\n\n const options: FormatDateOptions = {\n locale,\n variant: 'long',\n }\n\n // Handle non range validation\n if (!isRange) {\n if (isBefore(startDate, minDate)) {\n return new FormError('Date.errorMinDate', {\n messageValues: { date: formatDate(isoDates.minDate, options) },\n })\n }\n\n if (isAfter(startDate, maxDate)) {\n return new FormError('Date.errorMaxDate', {\n messageValues: { date: formatDate(isoDates.maxDate, options) },\n })\n }\n\n return\n }\n\n const messages: Array<FormError> = []\n\n // Start date validation\n if (isBefore(startDate, minDate)) {\n messages.push(\n new FormError('Date.errorStartDateMinDate', {\n messageValues: { date: formatDate(isoDates.minDate, options) },\n })\n )\n }\n\n if (isAfter(startDate, maxDate)) {\n messages.push(\n new FormError('Date.errorStartDateMaxDate', {\n messageValues: { date: formatDate(isoDates.maxDate, options) },\n })\n )\n }\n\n // End date validation\n if (isBefore(endDate, minDate)) {\n messages.push(\n new FormError('Date.errorEndDateMinDate', {\n messageValues: { date: formatDate(isoDates.minDate, options) },\n })\n )\n }\n\n if (isAfter(endDate, maxDate)) {\n messages.push(\n new FormError('Date.errorEndDateMaxDate', {\n messageValues: { date: formatDate(isoDates.maxDate, options) },\n })\n )\n }\n\n return messages\n}\n\n// Used to filter out DatePickerProps from the FieldProps.\n// Includes DatePickerProps that are not destructured in useFieldProps\nconst datePickerPropKeys = [\n 'month',\n 'startMonth',\n 'endMonth',\n 'minDate',\n 'maxDate',\n 'correctInvalidDate',\n 'maskOrder',\n 'maskPlaceholder',\n 'dateFormat',\n 'returnFormat',\n 'hideNavigation',\n 'hideDays',\n 'onlyMonth',\n 'hideLastWeek',\n 'disableAutofocus',\n 'showSubmitButton',\n 'submitButtonText',\n 'cancelButtonText',\n 'resetButtonText',\n 'firstDay',\n 'link',\n 'size',\n 'sync',\n 'addonElement',\n 'shortcuts',\n 'opened',\n 'direction',\n 'alignPicker',\n 'onDaysRender',\n 'showInput',\n 'onDaysRender',\n 'onType',\n 'onShow',\n 'onHide',\n 'onSubmit',\n 'onCancel',\n 'onReset',\n 'skipPortal',\n]\n\nfunction pickDatePickerProps(props: DateProps) {\n const datePickerProps = Object.keys(props).reduce(\n (datePickerProps, key) => {\n if (datePickerPropKeys.includes(key)) {\n datePickerProps[key] = props[key]\n }\n\n return datePickerProps\n },\n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AACxB;AAEA5D,aAAa,CAACiG,qBAAqB,GAAG,IAAI;AAAA,IAAAC,QAAA,GAC3BlG,aAAa;AAAAmG,OAAA,CAAAtK,OAAA,GAAAqK,QAAA"}
1
+ {"version":3,"file":"Date.js","names":["_react","_interopRequireWildcard","require","_components","_hooks","_utils","_classnames","_interopRequireDefault","_FieldBlock","_Context","_dateFns","_useTranslation","_Date","_DatePickerCalc","_utils2","_startOfDay","_excluded","_excluded2","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","ownKeys","object","enumerableOnly","symbols","filter","sym","enumerable","push","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","DateComponent","props","_props$validateInitia","errorRequired","label","defaultLabel","useTranslation","Date","locale","useContext","SharedContext","errorMessages","useMemo","schema","_props$schema","type","pattern","validateRequired","useCallback","_ref","required","error","isValid","parseISO","dateLimitValidator","validateDateLimit","minDate","maxDate","isRange","range","onBlurValidator","hasDateLimitAndValue","Boolean","preparedProps","fromInput","_ref2","date","start_date","end_date","validateInitially","exportValidators","_useFieldProps","useFieldProps","id","path","itemPath","className","valueProp","hasError","disabled","htmlAttributes","handleFocus","handleBlur","handleChange","setDisplayValue","showCancelButton","showResetButton","showInput","onReset","rest","datePickerProps","pickDatePickerProps","startDate","endDate","parseRangeValue","formatDate","fieldBlockProps","forId","classnames","pickSpacingProps","createElement","DatePicker","status","onChange","event","onFocus","onBlur","split","map","test","_ref3","dates","startDateParsed","endDateParsed","startOfDay","convertStringToDate","isoDates","toISOString","options","variant","isBefore","FormError","messageValues","isAfter","messages","datePickerPropKeys","reduce","includes","_supportsSpacingProps","_default","exports"],"sources":["../../../../../../src/extensions/forms/Field/Date/Date.tsx"],"sourcesContent":["import React, { useCallback, useContext, useMemo } from 'react'\nimport { DatePicker } from '../../../../components'\nimport { useFieldProps } from '../../hooks'\nimport type {\n FieldProps,\n AllJSONSchemaVersions,\n ValidatorDisableable,\n} from '../../types'\nimport { pickSpacingProps } from '../../../../components/flex/utils'\nimport classnames from 'classnames'\nimport FieldBlock, { Props as FieldBlockProps } from '../../FieldBlock'\nimport SharedContext from '../../../../shared/Context'\nimport { parseISO, isValid, isBefore, isAfter } from 'date-fns'\nimport useTranslation from '../../hooks/useTranslation'\nimport { FormatDateOptions, formatDate } from '../../Value/Date'\nimport {\n DatePickerEvent,\n DatePickerProps,\n} from '../../../../components/DatePicker'\nimport { convertStringToDate } from '../../../../components/date-picker/DatePickerCalc'\nimport { ProviderProps } from '../../../../shared/Provider'\nimport { FormError } from '../../utils'\nimport startOfDay from 'date-fns/startOfDay'\n\n// `range`, `showInput`, `showCancelButton` and `showResetButton` are not picked from the `DatePickerProps`\n// Since they require `Field.Date` specific comments, due to them having different default values\nexport type DateProps = Omit<\n FieldProps<string, undefined | string>,\n 'onBlurValidator'\n> & {\n // Validation\n pattern?: string\n /**\n * Defines if the Date field should support a value of two dates (starting and ending date).\n * The value needs to be a string containing two dates, separated by a pipe character (`|`) i.e. (`01-09-2024|30-09-2024`) when this is set to `true`.\n * Defaults to `false`.\n */\n range?: DatePickerProps['range']\n /**\n * If the input fields with the mask should be visible. Defaults to `true`.\n */\n showInput?: DatePickerProps['showInput']\n\n /**\n * If set to `true`, a cancel button will be shown. You can change the default text by using `cancel_button_text=\"Avbryt\"` Defaults to `true`. If the `range` prop is `true`, then the cancel button is shown.\n */\n showCancelButton?: DatePickerProps['showCancelButton']\n /**\n * If set to `true`, a reset button will be shown. You can change the default text by using `reset_button_text=\"Tilbakestill\"` Defaults to `true`.\n */\n showResetButton?: DatePickerProps['showResetButton']\n onBlurValidator?: ValidatorDisableable<string>\n} & Pick<\n DatePickerProps,\n | 'month'\n | 'startMonth'\n | 'endMonth'\n | 'minDate'\n | 'maxDate'\n | 'correctInvalidDate'\n | 'maskOrder'\n | 'maskPlaceholder'\n | 'dateFormat'\n | 'returnFormat'\n | 'hideNavigation'\n | 'hideDays'\n | 'onlyMonth'\n | 'hideLastWeek'\n | 'disableAutofocus'\n | 'showSubmitButton'\n | 'submitButtonText'\n | 'cancelButtonText'\n | 'resetButtonText'\n | 'firstDay'\n | 'link'\n | 'size'\n | 'sync'\n | 'addonElement'\n | 'shortcuts'\n | 'opened'\n | 'direction'\n | 'alignPicker'\n | 'onDaysRender'\n | 'onType'\n | 'onShow'\n | 'onHide'\n | 'onSubmit'\n | 'onCancel'\n | 'onReset'\n | 'skipPortal'\n >\n\nfunction DateComponent(props: DateProps) {\n const { errorRequired, label: defaultLabel } = useTranslation().Date\n const { locale } = useContext(SharedContext)\n\n const errorMessages = useMemo(() => {\n return {\n 'Field.errorRequired': errorRequired,\n 'Field.errorPattern': errorRequired,\n ...props.errorMessages,\n }\n }, [props.errorMessages, errorRequired])\n\n const schema = useMemo<AllJSONSchemaVersions>(\n () =>\n props.schema ?? {\n type: 'string',\n pattern: props.pattern,\n },\n [props.schema, props.pattern]\n )\n\n const validateRequired = useCallback(\n (value: string, { required, error }) => {\n if (required && (!value || !isValid(parseISO(value)))) {\n return error\n }\n\n return undefined\n },\n []\n )\n\n const dateLimitValidator = useCallback(\n (value: string) => {\n const res = validateDateLimit({\n value,\n locale,\n minDate: props.minDate,\n maxDate: props.maxDate,\n isRange: props.range,\n })\n\n return res\n },\n [props.maxDate, props.minDate, props.range, locale]\n )\n\n const onBlurValidator = useMemo(() => {\n if (props.onBlurValidator === false) {\n return undefined\n }\n\n if (props.onBlurValidator) {\n return props.onBlurValidator\n }\n\n return dateLimitValidator\n }, [props.onBlurValidator, dateLimitValidator])\n\n const hasDateLimitAndValue = useMemo(() => {\n return (props.minDate || props.maxDate) && Boolean(props.value)\n }, [props.minDate, props.maxDate, props.value])\n\n const preparedProps = {\n ...props,\n errorMessages,\n schema,\n fromInput: ({\n date,\n start_date,\n end_date,\n }: DatePickerEvent<React.ChangeEvent<HTMLInputElement>>) => {\n return range ? `${start_date}|${end_date}` : date\n },\n validateRequired,\n validateInitially: props.validateInitially ?? hasDateLimitAndValue,\n onBlurValidator,\n exportValidators: { dateLimitValidator },\n }\n\n const {\n id,\n path,\n itemPath,\n className,\n label,\n value: valueProp,\n hasError,\n disabled,\n htmlAttributes,\n handleFocus,\n handleBlur,\n handleChange,\n setDisplayValue,\n range,\n showCancelButton = true,\n showResetButton = true,\n showInput = true,\n onReset,\n minDate,\n maxDate,\n ...rest\n } = useFieldProps(preparedProps)\n\n const datePickerProps = pickDatePickerProps(rest)\n\n const { value, startDate, endDate } = useMemo(() => {\n if (!range || !valueProp) {\n return {\n // Assign to null if falsy value, to properly clear input values\n value: valueProp ?? null,\n startDate: undefined,\n endDate: undefined,\n }\n }\n\n const [startDate, endDate] = parseRangeValue(valueProp)\n\n return {\n value: undefined,\n startDate,\n endDate,\n }\n }, [range, valueProp])\n\n useMemo(() => {\n if ((path || itemPath) && valueProp) {\n setDisplayValue(formatDate(valueProp, { locale }), undefined)\n }\n }, [itemPath, locale, path, setDisplayValue, valueProp])\n\n const fieldBlockProps: FieldBlockProps = {\n forId: id,\n label: label ?? defaultLabel,\n className: classnames('dnb-forms-field-string', className),\n ...pickSpacingProps(props),\n }\n\n return (\n <FieldBlock {...fieldBlockProps}>\n <DatePicker\n id={id}\n date={value}\n disabled={disabled}\n showInput={showInput}\n showCancelButton={showCancelButton}\n showResetButton={showResetButton}\n startDate={startDate}\n endDate={endDate}\n minDate={minDate}\n maxDate={maxDate}\n status={hasError ? 'error' : undefined}\n range={range}\n onChange={handleChange}\n onReset={(event) => {\n handleChange(event)\n onReset?.(event)\n }}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...datePickerProps}\n {...htmlAttributes}\n />\n </FieldBlock>\n )\n}\n\nfunction parseRangeValue(value: DateProps['value']) {\n return (\n value\n .split('|')\n // Assign to null if falsy value, to properly clear input values\n .map((value) => (/(undefined|null)/.test(value) ? null : value))\n )\n}\n\nfunction validateDateLimit({\n value,\n isRange,\n locale,\n ...dates\n}: {\n value: DateProps['value']\n minDate: DateProps['minDate']\n maxDate: DateProps['maxDate']\n isRange: DateProps['range']\n locale: ProviderProps['locale']\n}) {\n if ((!dates.minDate && !dates.maxDate) || !value) {\n return\n }\n\n const [startDateParsed, endDateParsed] = parseRangeValue(value)\n\n // Set dates to the start of the day to compare the actual days, and not day and time\n const minDate = startOfDay(convertStringToDate(dates.minDate))\n const maxDate = startOfDay(convertStringToDate(dates.maxDate))\n\n const startDate = startOfDay(convertStringToDate(startDateParsed))\n const endDate = startOfDay(convertStringToDate(endDateParsed))\n\n const isoDates = {\n minDate:\n dates.minDate instanceof Date\n ? dates.minDate.toISOString()\n : dates.minDate,\n maxDate:\n dates.maxDate instanceof Date\n ? dates.maxDate.toISOString()\n : dates.maxDate,\n }\n\n const options: FormatDateOptions = {\n locale,\n variant: 'long',\n }\n\n // Handle non range validation\n if (!isRange) {\n if (isBefore(startDate, minDate)) {\n return new FormError('Date.errorMinDate', {\n messageValues: { date: formatDate(isoDates.minDate, options) },\n })\n }\n\n if (isAfter(startDate, maxDate)) {\n return new FormError('Date.errorMaxDate', {\n messageValues: { date: formatDate(isoDates.maxDate, options) },\n })\n }\n\n return\n }\n\n const messages: Array<FormError> = []\n\n // Start date validation\n if (isBefore(startDate, minDate)) {\n messages.push(\n new FormError('Date.errorStartDateMinDate', {\n messageValues: { date: formatDate(isoDates.minDate, options) },\n })\n )\n }\n\n if (isAfter(startDate, maxDate)) {\n messages.push(\n new FormError('Date.errorStartDateMaxDate', {\n messageValues: { date: formatDate(isoDates.maxDate, options) },\n })\n )\n }\n\n // End date validation\n if (isBefore(endDate, minDate)) {\n messages.push(\n new FormError('Date.errorEndDateMinDate', {\n messageValues: { date: formatDate(isoDates.minDate, options) },\n })\n )\n }\n\n if (isAfter(endDate, maxDate)) {\n messages.push(\n new FormError('Date.errorEndDateMaxDate', {\n messageValues: { date: formatDate(isoDates.maxDate, options) },\n })\n )\n }\n\n return messages\n}\n\n// Used to filter out DatePickerProps from the FieldProps.\n// Includes DatePickerProps that are not destructured in useFieldProps\nconst datePickerPropKeys = [\n 'month',\n 'startMonth',\n 'endMonth',\n 'minDate',\n 'maxDate',\n 'correctInvalidDate',\n 'maskOrder',\n 'maskPlaceholder',\n 'dateFormat',\n 'returnFormat',\n 'hideNavigation',\n 'hideDays',\n 'onlyMonth',\n 'hideLastWeek',\n 'disableAutofocus',\n 'showSubmitButton',\n 'submitButtonText',\n 'cancelButtonText',\n 'resetButtonText',\n 'firstDay',\n 'link',\n 'size',\n 'sync',\n 'addonElement',\n 'shortcuts',\n 'opened',\n 'direction',\n 'alignPicker',\n 'onDaysRender',\n 'showInput',\n 'onDaysRender',\n 'onType',\n 'onShow',\n 'onHide',\n 'onSubmit',\n 'onCancel',\n 'onReset',\n 'skipPortal',\n]\n\nfunction pickDatePickerProps(props: DateProps) {\n const datePickerProps = Object.keys(props).reduce(\n (datePickerProps, key) => {\n if (datePickerPropKeys.includes(key)) {\n datePickerProps[key] = props[key]\n }\n\n return datePickerProps\n },\n {}\n )\n\n return datePickerProps\n}\n\nDateComponent._supportsSpacingProps = true\nexport default DateComponent\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAMA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,WAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,QAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,QAAA,GAA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/layout/space/properties)': space
34
37
  } = _DatePickerDocs.DatePickerProperties,
35
- datePickerProperties = _objectWithoutProperties(_DatePickerDocs.DatePickerProperties, ["showCancelButton", "showResetButton", "showInput", "range", "skeleton", "tooltip", "globalStatus", "statusProps", "statusState", "status", "inputElement", "label", "labelDirection", "labelSrOnly", "suffix", "stretch", "size", "[Space](/uilib/layout/space/properties)"]);
38
+ datePickerProperties = _objectWithoutProperties(_DatePickerDocs.DatePickerProperties, ["showCancelButton", "showResetButton", "showInput", "range", "skeleton", "tooltip", "globalStatus", "statusProps", "statusState", "status", "inputElement", "label", "labelDirection", "labelSrOnly", "suffix", "stretch", "size", "date", "startDate", "endDate", "[Space](/uilib/layout/space/properties)"]);
36
39
  const DateProperties = _objectSpread(_objectSpread({
37
40
  range: _objectSpread(_objectSpread({}, range), {}, {
38
41
  doc: 'Defines if the Date field should support a value of two dates (starting and ending date). ' + 'The `value` needs to be a string containing two dates, separated by a pipe character (`|`) (`01-09-2024|30-09-2024`) when this is set to `true`. ' + 'Defaults to `false`.'
@@ -1 +1 @@
1
- {"version":3,"file":"DateDocs.js","names":["_DatePickerDocs","require","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","sourceSymbolKeys","indexOf","prototype","propertyIsEnumerable","sourceKeys","showCancelButton","showResetButton","showInput","range","skeleton","tooltip","globalStatus","statusProps","statusState","status","inputElement","label","labelDirection","labelSrOnly","suffix","stretch","size","space","DatePickerProperties","datePickerProperties","DateProperties","doc","onBlurValidator","type","exports","onChange","onBlur","onFocus","DatePickerEvents","datePickerEvents","DateEvents"],"sources":["../../../../../../src/extensions/forms/Field/Date/DateDocs.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport {\n DatePickerProperties,\n DatePickerEvents,\n} from '../../../../components/date-picker/DatePickerDocs'\nimport { PropertiesTableProps } from '../../../../shared/types'\n\n// Filter out properties that are handled by `useFieldProps` or has a different default value\nconst {\n showCancelButton,\n showResetButton,\n showInput,\n range,\n skeleton,\n tooltip,\n globalStatus,\n statusProps,\n statusState,\n status,\n inputElement,\n label,\n labelDirection,\n labelSrOnly,\n suffix,\n stretch,\n size,\n '[Space](/uilib/layout/space/properties)': space,\n ...datePickerProperties\n} = DatePickerProperties\n\n// `range`, `showInput`, `showCancelButton` and `showResetButton` inherit from `DatePickerProperties`\n// Since they require `Field.Date` specific documentation, due to them having different default values\nexport const DateProperties: PropertiesTableProps = {\n range: {\n ...range,\n doc:\n 'Defines if the Date field should support a value of two dates (starting and ending date). ' +\n 'The `value` needs to be a string containing two dates, separated by a pipe character (`|`) (`01-09-2024|30-09-2024`) when this is set to `true`. ' +\n 'Defaults to `false`.',\n },\n showInput: {\n ...showInput,\n doc: 'If the input fields with the mask should be visible. Defaults to `true`.',\n },\n showCancelButton: {\n ...showCancelButton,\n doc: 'If set to `true`, a cancel button will be shown. You can change the default text by using `cancelButtonText=\"Avbryt\"` Defaults to `true`. If the `range` property is `true`, then the cancel button is shown.',\n },\n showResetButton: {\n ...showResetButton,\n doc: 'If set to `true`, a reset button will be shown. You can change the default text by using `resetButtonText=\"Tilbakestill\"` Defaults to `true`.',\n },\n size: {\n ...size,\n doc: `${size.doc} Consider rather setting field sizes with [Form.Appearance](/uilib/extensions/forms/Form/Appearance/).`,\n },\n ...datePickerProperties,\n onBlurValidator: {\n doc: 'Custom validator function that is triggered when the user leaves a field (e.g., blurring a text input or closing a dropdown). The function can be either asynchronous or synchronous. The first parameter is the value, and the second parameter returns an object containing { errorMessages, connectWithPath, validators }. Defaults to validating the date against `minDate` and `maxDate`, using `dateLimitValidator`. Can be disabled using `false`.',\n type: 'function',\n status: 'optional',\n },\n}\n// Filter out the events that are handled by `useFieldProps`\nconst { onChange, onBlur, onFocus, ...datePickerEvents } = DatePickerEvents\n\nexport const DateEvents = datePickerEvents\n"],"mappings":";;;;;;AACA,IAAAA,eAAA,GAAAC,OAAA;AAG0D,SAAAC,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,IAAA,EAAAG,OAAA,YAAAH,IAAA;AAAA,SAAAU,cAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,WAAAF,SAAA,CAAAD,CAAA,IAAAC,SAAA,CAAAD,CAAA,QAAAA,CAAA,OAAAf,OAAA,CAAAI,MAAA,CAAAc,MAAA,OAAAC,OAAA,WAAAC,GAAA,IAAAC,eAAA,CAAAP,MAAA,EAAAM,GAAA,EAAAF,MAAA,CAAAE,GAAA,SAAAhB,MAAA,CAAAkB,yBAAA,GAAAlB,MAAA,CAAAmB,gBAAA,CAAAT,MAAA,EAAAV,MAAA,CAAAkB,yBAAA,CAAAJ,MAAA,KAAAlB,OAAA,CAAAI,MAAA,CAAAc,MAAA,GAAAC,OAAA,WAAAC,GAAA,IAAAhB,MAAA,CAAAoB,cAAA,CAAAV,MAAA,EAAAM,GAAA,EAAAhB,MAAA,CAAAK,wBAAA,CAAAS,MAAA,EAAAE,GAAA,iBAAAN,MAAA;AAAA,SAAAO,gBAAAI,GAAA,EAAAL,GAAA,EAAAM,KAAA,IAA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G;AACzH,GACEF,oBAAoB;EACvBG,eAAe,EAAE;IACfD,GAAG,EAAE,2bAA2b;IAChcE,IAAI,EAAE,UAAU;IAChBd,MAAM,EAAE;EACV;AAAC,EACF;AAAAe,OAAA,CAAAJ,cAAA,GAAAA,cAAA;AAED,MAAM;IAAEK,QAAQ;IAAEC,MAAM;IAAEC;EAA6B,CAAC,GAAGC,gCAAgB;EAArCC,gBAAgB,GAAArC,wBAAA,CAAKoC,gCAAgB;AAEpE,MAAME,UAAU,GAAGD,gBAAgB;AAAAL,OAAA,CAAAM,UAAA,GAAAA,UAAA"}
1
+ {"version":3,"file":"DateDocs.js","names":["_DatePickerDocs","require","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","sourceSymbolKeys","indexOf","prototype","propertyIsEnumerable","sourceKeys","showCancelButton","showResetButton","showInput","range","skeleton","tooltip","globalStatus","statusProps","statusState","status","inputElement","label","labelDirection","labelSrOnly","suffix","stretch","size","date","startDate","endDate","space","DatePickerProperties","datePickerProperties","DateProperties","doc","onBlurValidator","type","exports","onChange","onBlur","onFocus","DatePickerEvents","datePickerEvents","DateEvents"],"sources":["../../../../../../src/extensions/forms/Field/Date/DateDocs.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport {\n DatePickerProperties,\n DatePickerEvents,\n} from '../../../../components/date-picker/DatePickerDocs'\nimport { PropertiesTableProps } from '../../../../shared/types'\n\n// Filter out properties that are handled by `useFieldProps` or has a different default value\nconst {\n showCancelButton,\n showResetButton,\n showInput,\n range,\n skeleton,\n tooltip,\n globalStatus,\n statusProps,\n statusState,\n status,\n inputElement,\n label,\n labelDirection,\n labelSrOnly,\n suffix,\n stretch,\n size,\n date,\n startDate,\n endDate,\n '[Space](/uilib/layout/space/properties)': space,\n ...datePickerProperties\n} = DatePickerProperties\n\n// `range`, `showInput`, `showCancelButton` and `showResetButton` inherit from `DatePickerProperties`\n// Since they require `Field.Date` specific documentation, due to them having different default values\nexport const DateProperties: PropertiesTableProps = {\n range: {\n ...range,\n doc:\n 'Defines if the Date field should support a value of two dates (starting and ending date). ' +\n 'The `value` needs to be a string containing two dates, separated by a pipe character (`|`) (`01-09-2024|30-09-2024`) when this is set to `true`. ' +\n 'Defaults to `false`.',\n },\n showInput: {\n ...showInput,\n doc: 'If the input fields with the mask should be visible. Defaults to `true`.',\n },\n showCancelButton: {\n ...showCancelButton,\n doc: 'If set to `true`, a cancel button will be shown. You can change the default text by using `cancelButtonText=\"Avbryt\"` Defaults to `true`. If the `range` property is `true`, then the cancel button is shown.',\n },\n showResetButton: {\n ...showResetButton,\n doc: 'If set to `true`, a reset button will be shown. You can change the default text by using `resetButtonText=\"Tilbakestill\"` Defaults to `true`.',\n },\n size: {\n ...size,\n doc: `${size.doc} Consider rather setting field sizes with [Form.Appearance](/uilib/extensions/forms/Form/Appearance/).`,\n },\n ...datePickerProperties,\n onBlurValidator: {\n doc: 'Custom validator function that is triggered when the user leaves a field (e.g., blurring a text input or closing a dropdown). The function can be either asynchronous or synchronous. The first parameter is the value, and the second parameter returns an object containing { errorMessages, connectWithPath, validators }. Defaults to validating the date against `minDate` and `maxDate`, using `dateLimitValidator`. Can be disabled using `false`.',\n type: 'function',\n status: 'optional',\n },\n}\n// Filter out the events that are handled by `useFieldProps`\nconst { onChange, onBlur, onFocus, ...datePickerEvents } = DatePickerEvents\n\nexport const DateEvents = datePickerEvents\n"],"mappings":";;;;;;AACA,IAAAA,eAAA,GAAAC,OAAA;AAG0D,SAAAC,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MA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B,CAAC,GAAGC,gCAAgB;EAArCC,gBAAgB,GAAAxC,wBAAA,CAAKuC,gCAAgB;AAEpE,MAAME,UAAU,GAAGD,gBAAgB;AAAAL,OAAA,CAAAM,UAAA,GAAAA,UAAA"}
@@ -1,2 +1,2 @@
1
- export declare const version = "10.67.0";
1
+ export declare const version = "10.67.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.67.0';
8
+ const version = '10.67.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.67.0';
14
+ return '10.67.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.67.0'\n\nexport function init() {\n if (typeof window !== 'undefined') {\n class Eufemia {\n get version() {\n return '10.67.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.67.1'\n\nexport function init() {\n if (typeof window !== 'undefined') {\n class Eufemia {\n get version() {\n return '10.67.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.67.0';
48
+ --eufemia-version: '10.67.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.67.0";
247
+ --eufemia-version: "10.67.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.67.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.67.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}
@@ -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.67.0";
272
+ --eufemia-version: "10.67.1";
273
273
  }
274
274
  body *,
275
275
  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);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.67.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);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.67.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)}
@@ -268,7 +268,7 @@ body,
268
268
  /* stylelint-disable-next-line */
269
269
  -webkit-text-size-adjust: 100%;
270
270
  word-break: break-word;
271
- --eufemia-version: "10.67.0";
271
+ --eufemia-version: "10.67.1";
272
272
  }
273
273
  body *,
274
274
  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);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.67.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);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.67.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}
@@ -114,6 +114,13 @@ export default class Input extends React.PureComponent {
114
114
  value: null,
115
115
  _value: null
116
116
  });
117
+ _defineProperty(this, "updateInputValue", () => {
118
+ if (this._ref.current && !this.props.input_element) {
119
+ const value = this.state.value;
120
+ const hasValue = Input.hasValue(value);
121
+ this._ref.current.value = hasValue ? value : '';
122
+ }
123
+ });
117
124
  _defineProperty(this, "onFocusHandler", event => {
118
125
  const {
119
126
  value
@@ -159,6 +166,7 @@ export default class Input extends React.PureComponent {
159
166
  event
160
167
  });
161
168
  if (result === false) {
169
+ this.updateInputValue();
162
170
  return;
163
171
  }
164
172
  if (typeof result === 'string') {
@@ -212,6 +220,12 @@ export default class Input extends React.PureComponent {
212
220
  componentWillUnmount() {
213
221
  clearTimeout(this._selectallTimeout);
214
222
  }
223
+ componentDidMount() {
224
+ this.updateInputValue();
225
+ }
226
+ componentDidUpdate() {
227
+ this.updateInputValue();
228
+ }
215
229
  render() {
216
230
  var _this$context, _this$context2, _this$context3;
217
231
  const props = extendPropsWithContextInClassComponent(this.props, Input.defaultProps, {
@@ -288,7 +302,6 @@ export default class Input extends React.PureComponent {
288
302
  const inputParams = _objectSpread(_objectSpread(_objectSpread({
289
303
  className: classnames('dnb-input__input', input_class),
290
304
  autoComplete: autocomplete,
291
- value: hasValue ? value : '',
292
305
  type,
293
306
  id,
294
307
  disabled: isTrue(disabled),
@@ -316,7 +329,9 @@ export default class Input extends React.PureComponent {
316
329
  validateDOMAttributes(this.props, inputParams);
317
330
  validateDOMAttributes(null, shellParams);
318
331
  if (InputElement && typeof InputElement === 'function') {
319
- InputElement = InputElement(inputParams, this._ref);
332
+ InputElement = InputElement(_objectSpread(_objectSpread({}, inputParams), {}, {
333
+ value
334
+ }), this._ref);
320
335
  } else if (!InputElement && _input_element) {
321
336
  InputElement = _input_element;
322
337
  }