@dnb/eufemia 10.70.0 → 10.71.0
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.
- package/CHANGELOG.md +26 -0
- package/cjs/components/autocomplete/AutocompleteDocs.js +3 -3
- package/cjs/components/autocomplete/AutocompleteDocs.js.map +1 -1
- package/cjs/components/avatar/Avatar.js +3 -8
- package/cjs/components/avatar/Avatar.js.map +1 -1
- package/cjs/components/checkbox/CheckboxDocs.js +2 -2
- package/cjs/components/checkbox/CheckboxDocs.js.map +1 -1
- package/cjs/components/date-picker/DatePickerContext.d.ts +0 -1
- package/cjs/components/date-picker/DatePickerContext.js.map +1 -1
- package/cjs/components/date-picker/DatePickerDocs.js +1 -1
- package/cjs/components/date-picker/DatePickerDocs.js.map +1 -1
- package/cjs/components/date-picker/DatePickerInput.js +110 -136
- package/cjs/components/date-picker/DatePickerInput.js.map +1 -1
- package/cjs/components/date-picker/DatePickerProvider.js +0 -2
- package/cjs/components/date-picker/DatePickerProvider.js.map +1 -1
- package/cjs/components/date-picker/hooks/useDates.d.ts +0 -2
- package/cjs/components/date-picker/hooks/useDates.js +5 -5
- package/cjs/components/date-picker/hooks/useDates.js.map +1 -1
- package/cjs/components/date-picker/style/dnb-date-picker.css +4 -0
- package/cjs/components/date-picker/style/dnb-date-picker.min.css +1 -1
- package/cjs/components/date-picker/style/dnb-date-picker.scss +3 -0
- package/cjs/components/dialog/DialogDocs.js +7 -2
- package/cjs/components/dialog/DialogDocs.js.map +1 -1
- package/cjs/components/dropdown/Dropdown.d.ts +20 -20
- package/cjs/components/dropdown/DropdownDocs.d.ts +1 -0
- package/cjs/components/dropdown/DropdownDocs.js +158 -1
- package/cjs/components/dropdown/DropdownDocs.js.map +1 -1
- package/cjs/components/flex/ContainerDocs.js +1 -1
- package/cjs/components/flex/ContainerDocs.js.map +1 -1
- package/cjs/components/flex/ItemDocs.d.ts +2 -0
- package/cjs/components/flex/ItemDocs.js +39 -0
- package/cjs/components/flex/ItemDocs.js.map +1 -0
- package/cjs/components/grid/ItemDocs.d.ts +2 -0
- package/cjs/components/grid/ItemDocs.js +19 -0
- package/cjs/components/grid/ItemDocs.js.map +1 -0
- package/cjs/components/input/InputDocs.js +3 -3
- package/cjs/components/input/InputDocs.js.map +1 -1
- package/cjs/components/input-masked/InputMasked.d.ts +0 -3
- package/cjs/components/input-masked/InputMaskedDocs.d.ts +1 -0
- package/cjs/components/input-masked/InputMaskedDocs.js +58 -1
- package/cjs/components/input-masked/InputMaskedDocs.js.map +1 -1
- package/cjs/components/input-masked/InputMaskedHooks.js +11 -7
- package/cjs/components/input-masked/InputMaskedHooks.js.map +1 -1
- package/cjs/components/input-masked/InputMaskedUtils.d.ts +1 -1
- package/cjs/components/input-masked/InputMaskedUtils.js +2 -1
- package/cjs/components/input-masked/InputMaskedUtils.js.map +1 -1
- package/cjs/components/input-masked/MultiInputMaskedDocs.d.ts +2 -0
- package/cjs/components/input-masked/MultiInputMaskedDocs.js +70 -1
- package/cjs/components/input-masked/MultiInputMaskedDocs.js.map +1 -1
- package/cjs/components/input-masked/style/dnb-input-masked.css +9 -0
- package/cjs/components/input-masked/style/dnb-input-masked.min.css +1 -1
- package/cjs/components/input-masked/style/dnb-input-masked.scss +12 -0
- package/cjs/components/input-masked/text-mask/InputModeNumber.d.ts +8 -0
- package/cjs/components/input-masked/text-mask/InputModeNumber.js +32 -9
- package/cjs/components/input-masked/text-mask/InputModeNumber.js.map +1 -1
- package/cjs/components/input-masked/text-mask/adjustCaretPosition.d.ts +2 -1
- package/cjs/components/input-masked/text-mask/adjustCaretPosition.js +3 -2
- package/cjs/components/input-masked/text-mask/adjustCaretPosition.js.map +1 -1
- package/cjs/components/input-masked/text-mask/createTextMaskInputElement.js +9 -3
- package/cjs/components/input-masked/text-mask/createTextMaskInputElement.js.map +1 -1
- package/cjs/components/modal/ModalDocs.d.ts +5 -0
- package/cjs/components/modal/ModalDocs.js +201 -0
- package/cjs/components/modal/ModalDocs.js.map +1 -0
- package/cjs/components/radio/RadioDocs.js +2 -2
- package/cjs/components/radio/RadioDocs.js.map +1 -1
- package/cjs/components/section/Section.js +2 -7
- package/cjs/components/section/Section.js.map +1 -1
- package/cjs/components/section/SectionDocs.js +1 -1
- package/cjs/components/section/SectionDocs.js.map +1 -1
- package/cjs/components/slider/SliderDocs.js +2 -2
- package/cjs/components/slider/SliderDocs.js.map +1 -1
- package/cjs/components/space/SpaceDocs.d.ts +3 -0
- package/cjs/components/space/SpaceDocs.js +61 -0
- package/cjs/components/space/SpaceDocs.js.map +1 -0
- package/cjs/components/switch/SwitchDocs.js +2 -2
- package/cjs/components/switch/SwitchDocs.js.map +1 -1
- package/cjs/components/textarea/TextareaDocs.js +3 -3
- package/cjs/components/textarea/TextareaDocs.js.map +1 -1
- package/cjs/components/toggle-button/ToggleButtonGroupDocs.js +1 -1
- package/cjs/components/toggle-button/ToggleButtonGroupDocs.js.map +1 -1
- package/cjs/components/tooltip/TooltipDocs.js +1 -1
- package/cjs/components/tooltip/TooltipDocs.js.map +1 -1
- package/cjs/components/upload/Upload.js +6 -3
- package/cjs/components/upload/Upload.js.map +1 -1
- package/cjs/components/upload/UploadDocs.d.ts +1 -0
- package/cjs/components/upload/UploadDocs.js +43 -1
- package/cjs/components/upload/UploadDocs.js.map +1 -1
- package/cjs/components/upload/UploadFileListCell.js +32 -12
- package/cjs/components/upload/UploadFileListCell.js.map +1 -1
- package/cjs/components/upload/types.d.ts +7 -0
- package/cjs/components/upload/types.js.map +1 -1
- package/cjs/extensions/forms/DataContext/At/AtDocs.d.ts +2 -0
- package/cjs/extensions/forms/DataContext/At/AtDocs.js +24 -0
- package/cjs/extensions/forms/DataContext/At/AtDocs.js.map +1 -0
- package/cjs/extensions/forms/DataContext/Provider/ProviderDocs.js +1 -1
- package/cjs/extensions/forms/DataContext/Provider/ProviderDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/Number/Number.js +3 -6
- package/cjs/extensions/forms/Field/Number/Number.js.map +1 -1
- package/cjs/extensions/forms/Field/Password/PasswordDocs.d.ts +1 -0
- package/cjs/extensions/forms/Field/Password/PasswordDocs.js +14 -2
- package/cjs/extensions/forms/Field/Password/PasswordDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumber.d.ts +6 -4
- package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumber.js +33 -25
- package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumber.js.map +1 -1
- package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.d.ts +2 -2
- package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js +8 -3
- package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/Provider/useFieldProvider.d.ts +3 -3
- package/cjs/extensions/forms/Field/String/StringDocs.js +1 -1
- package/cjs/extensions/forms/Field/String/StringDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/Upload/Upload.d.ts +1 -1
- package/cjs/extensions/forms/Field/Upload/Upload.js +3 -1
- package/cjs/extensions/forms/Field/Upload/Upload.js.map +1 -1
- package/cjs/extensions/forms/FieldBlock/FieldBlock.js +11 -4
- package/cjs/extensions/forms/FieldBlock/FieldBlock.js.map +1 -1
- package/cjs/extensions/forms/FieldBlock/FieldBlockContext.d.ts +1 -1
- package/cjs/extensions/forms/FieldBlock/FieldBlockContext.js.map +1 -1
- package/cjs/extensions/forms/Form/ButtonRow/ButtonRowDocs.d.ts +2 -0
- package/cjs/extensions/forms/Form/ButtonRow/ButtonRowDocs.js +19 -0
- package/cjs/extensions/forms/Form/ButtonRow/ButtonRowDocs.js.map +1 -0
- package/cjs/extensions/forms/Form/Isolation/IsolationDocs.js +1 -1
- package/cjs/extensions/forms/Form/Isolation/IsolationDocs.js.map +1 -1
- package/cjs/extensions/forms/Wizard/Buttons/ButtonsDocs.d.ts +2 -0
- package/cjs/extensions/forms/Wizard/Buttons/ButtonsDocs.js +14 -0
- package/cjs/extensions/forms/Wizard/Buttons/ButtonsDocs.js.map +1 -0
- package/cjs/extensions/forms/hooks/DataValueWritePropsDocs.js +1 -1
- package/cjs/extensions/forms/hooks/DataValueWritePropsDocs.js.map +1 -1
- package/cjs/extensions/forms/hooks/useFieldProps.js +55 -18
- package/cjs/extensions/forms/hooks/useFieldProps.js.map +1 -1
- package/cjs/extensions/forms/types.d.ts +8 -5
- package/cjs/extensions/forms/types.js.map +1 -1
- package/cjs/extensions/forms/utils/FormError.d.ts +20 -16
- package/cjs/extensions/forms/utils/FormError.js.map +1 -1
- package/cjs/shared/Eufemia.d.ts +1 -1
- package/cjs/shared/Eufemia.js +2 -2
- package/cjs/shared/Eufemia.js.map +1 -1
- package/cjs/shared/helpers.d.ts +1 -0
- package/cjs/shared/helpers.js +7 -0
- package/cjs/shared/helpers.js.map +1 -1
- package/cjs/shared/locales/sv-SE.js +2 -2
- package/cjs/shared/locales/sv-SE.js.map +1 -1
- package/cjs/style/core/scopes.scss +1 -1
- package/cjs/style/dnb-ui-basis.css +1 -1
- package/cjs/style/dnb-ui-basis.min.css +1 -1
- package/cjs/style/dnb-ui-body.css +1 -1
- package/cjs/style/dnb-ui-body.min.css +1 -1
- package/cjs/style/dnb-ui-components.css +13 -0
- package/cjs/style/dnb-ui-components.min.css +1 -1
- package/cjs/style/dnb-ui-core.css +1 -1
- package/cjs/style/dnb-ui-core.min.css +1 -1
- package/cjs/style/themes/theme-eiendom/eiendom-theme-components.css +13 -0
- package/cjs/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
- package/cjs/style/themes/theme-sbanken/sbanken-theme-components.css +13 -0
- package/cjs/style/themes/theme-sbanken/sbanken-theme-components.min.css +1 -1
- package/cjs/style/themes/theme-ui/ui-theme-components.css +13 -0
- package/cjs/style/themes/theme-ui/ui-theme-components.min.css +1 -1
- package/components/autocomplete/AutocompleteDocs.js +3 -3
- package/components/autocomplete/AutocompleteDocs.js.map +1 -1
- package/components/avatar/Avatar.js +1 -6
- package/components/avatar/Avatar.js.map +1 -1
- package/components/checkbox/CheckboxDocs.js +2 -2
- package/components/checkbox/CheckboxDocs.js.map +1 -1
- package/components/date-picker/DatePickerContext.d.ts +0 -1
- package/components/date-picker/DatePickerContext.js.map +1 -1
- package/components/date-picker/DatePickerDocs.js +1 -1
- package/components/date-picker/DatePickerDocs.js.map +1 -1
- package/components/date-picker/DatePickerInput.js +111 -137
- package/components/date-picker/DatePickerInput.js.map +1 -1
- package/components/date-picker/DatePickerProvider.js +0 -2
- package/components/date-picker/DatePickerProvider.js.map +1 -1
- package/components/date-picker/hooks/useDates.d.ts +0 -2
- package/components/date-picker/hooks/useDates.js +3 -5
- package/components/date-picker/hooks/useDates.js.map +1 -1
- package/components/date-picker/style/dnb-date-picker.css +4 -0
- package/components/date-picker/style/dnb-date-picker.min.css +1 -1
- package/components/date-picker/style/dnb-date-picker.scss +3 -0
- package/components/dialog/DialogDocs.js +7 -2
- package/components/dialog/DialogDocs.js.map +1 -1
- package/components/dropdown/Dropdown.d.ts +20 -20
- package/components/dropdown/DropdownDocs.d.ts +1 -0
- package/components/dropdown/DropdownDocs.js +157 -0
- package/components/dropdown/DropdownDocs.js.map +1 -1
- package/components/flex/ContainerDocs.js +1 -1
- package/components/flex/ContainerDocs.js.map +1 -1
- package/components/flex/ItemDocs.d.ts +2 -0
- package/components/flex/ItemDocs.js +33 -0
- package/components/flex/ItemDocs.js.map +1 -0
- package/components/grid/ItemDocs.d.ts +2 -0
- package/components/grid/ItemDocs.js +13 -0
- package/components/grid/ItemDocs.js.map +1 -0
- package/components/input/InputDocs.js +3 -3
- package/components/input/InputDocs.js.map +1 -1
- package/components/input-masked/InputMasked.d.ts +0 -3
- package/components/input-masked/InputMaskedDocs.d.ts +1 -0
- package/components/input-masked/InputMaskedDocs.js +57 -0
- package/components/input-masked/InputMaskedDocs.js.map +1 -1
- package/components/input-masked/InputMaskedHooks.js +11 -7
- package/components/input-masked/InputMaskedHooks.js.map +1 -1
- package/components/input-masked/InputMaskedUtils.d.ts +1 -1
- package/components/input-masked/InputMaskedUtils.js +2 -1
- package/components/input-masked/InputMaskedUtils.js.map +1 -1
- package/components/input-masked/MultiInputMaskedDocs.d.ts +2 -0
- package/components/input-masked/MultiInputMaskedDocs.js +69 -0
- package/components/input-masked/MultiInputMaskedDocs.js.map +1 -1
- package/components/input-masked/style/dnb-input-masked.css +9 -0
- package/components/input-masked/style/dnb-input-masked.min.css +1 -1
- package/components/input-masked/style/dnb-input-masked.scss +12 -0
- package/components/input-masked/text-mask/InputModeNumber.d.ts +8 -0
- package/components/input-masked/text-mask/InputModeNumber.js +32 -9
- package/components/input-masked/text-mask/InputModeNumber.js.map +1 -1
- package/components/input-masked/text-mask/adjustCaretPosition.d.ts +2 -1
- package/components/input-masked/text-mask/adjustCaretPosition.js +3 -2
- package/components/input-masked/text-mask/adjustCaretPosition.js.map +1 -1
- package/components/input-masked/text-mask/createTextMaskInputElement.js +9 -3
- package/components/input-masked/text-mask/createTextMaskInputElement.js.map +1 -1
- package/components/modal/ModalDocs.d.ts +5 -0
- package/components/modal/ModalDocs.js +195 -0
- package/components/modal/ModalDocs.js.map +1 -0
- package/components/radio/RadioDocs.js +2 -2
- package/components/radio/RadioDocs.js.map +1 -1
- package/components/section/Section.js +1 -6
- package/components/section/Section.js.map +1 -1
- package/components/section/SectionDocs.js +1 -1
- package/components/section/SectionDocs.js.map +1 -1
- package/components/slider/SliderDocs.js +2 -2
- package/components/slider/SliderDocs.js.map +1 -1
- package/components/space/SpaceDocs.d.ts +3 -0
- package/components/space/SpaceDocs.js +55 -0
- package/components/space/SpaceDocs.js.map +1 -0
- package/components/switch/SwitchDocs.js +2 -2
- package/components/switch/SwitchDocs.js.map +1 -1
- package/components/textarea/TextareaDocs.js +3 -3
- package/components/textarea/TextareaDocs.js.map +1 -1
- package/components/toggle-button/ToggleButtonGroupDocs.js +1 -1
- package/components/toggle-button/ToggleButtonGroupDocs.js.map +1 -1
- package/components/tooltip/TooltipDocs.js +1 -1
- package/components/tooltip/TooltipDocs.js.map +1 -1
- package/components/upload/Upload.js +6 -3
- package/components/upload/Upload.js.map +1 -1
- package/components/upload/UploadDocs.d.ts +1 -0
- package/components/upload/UploadDocs.js +42 -0
- package/components/upload/UploadDocs.js.map +1 -1
- package/components/upload/UploadFileListCell.js +32 -12
- package/components/upload/UploadFileListCell.js.map +1 -1
- package/components/upload/types.d.ts +7 -0
- package/components/upload/types.js.map +1 -1
- package/es/components/autocomplete/AutocompleteDocs.js +3 -3
- package/es/components/autocomplete/AutocompleteDocs.js.map +1 -1
- package/es/components/avatar/Avatar.js +1 -6
- package/es/components/avatar/Avatar.js.map +1 -1
- package/es/components/checkbox/CheckboxDocs.js +2 -2
- package/es/components/checkbox/CheckboxDocs.js.map +1 -1
- package/es/components/date-picker/DatePickerContext.d.ts +0 -1
- package/es/components/date-picker/DatePickerContext.js.map +1 -1
- package/es/components/date-picker/DatePickerDocs.js +1 -1
- package/es/components/date-picker/DatePickerDocs.js.map +1 -1
- package/es/components/date-picker/DatePickerInput.js +103 -130
- package/es/components/date-picker/DatePickerInput.js.map +1 -1
- package/es/components/date-picker/DatePickerProvider.js +0 -2
- package/es/components/date-picker/DatePickerProvider.js.map +1 -1
- package/es/components/date-picker/hooks/useDates.d.ts +0 -2
- package/es/components/date-picker/hooks/useDates.js +3 -5
- package/es/components/date-picker/hooks/useDates.js.map +1 -1
- package/es/components/date-picker/style/dnb-date-picker.css +4 -0
- package/es/components/date-picker/style/dnb-date-picker.min.css +1 -1
- package/es/components/date-picker/style/dnb-date-picker.scss +3 -0
- package/es/components/dialog/DialogDocs.js +7 -2
- package/es/components/dialog/DialogDocs.js.map +1 -1
- package/es/components/dropdown/Dropdown.d.ts +20 -20
- package/es/components/dropdown/DropdownDocs.d.ts +1 -0
- package/es/components/dropdown/DropdownDocs.js +157 -0
- package/es/components/dropdown/DropdownDocs.js.map +1 -1
- package/es/components/flex/ContainerDocs.js +1 -1
- package/es/components/flex/ContainerDocs.js.map +1 -1
- package/es/components/flex/ItemDocs.d.ts +2 -0
- package/es/components/flex/ItemDocs.js +33 -0
- package/es/components/flex/ItemDocs.js.map +1 -0
- package/es/components/grid/ItemDocs.d.ts +2 -0
- package/es/components/grid/ItemDocs.js +13 -0
- package/es/components/grid/ItemDocs.js.map +1 -0
- package/es/components/input/InputDocs.js +3 -3
- package/es/components/input/InputDocs.js.map +1 -1
- package/es/components/input-masked/InputMasked.d.ts +0 -3
- package/es/components/input-masked/InputMaskedDocs.d.ts +1 -0
- package/es/components/input-masked/InputMaskedDocs.js +57 -0
- package/es/components/input-masked/InputMaskedDocs.js.map +1 -1
- package/es/components/input-masked/InputMaskedHooks.js +11 -7
- package/es/components/input-masked/InputMaskedHooks.js.map +1 -1
- package/es/components/input-masked/InputMaskedUtils.d.ts +1 -1
- package/es/components/input-masked/InputMaskedUtils.js +2 -1
- package/es/components/input-masked/InputMaskedUtils.js.map +1 -1
- package/es/components/input-masked/MultiInputMaskedDocs.d.ts +2 -0
- package/es/components/input-masked/MultiInputMaskedDocs.js +69 -0
- package/es/components/input-masked/MultiInputMaskedDocs.js.map +1 -1
- package/es/components/input-masked/style/dnb-input-masked.css +9 -0
- package/es/components/input-masked/style/dnb-input-masked.min.css +1 -1
- package/es/components/input-masked/style/dnb-input-masked.scss +12 -0
- package/es/components/input-masked/text-mask/InputModeNumber.d.ts +8 -0
- package/es/components/input-masked/text-mask/InputModeNumber.js +39 -9
- package/es/components/input-masked/text-mask/InputModeNumber.js.map +1 -1
- package/es/components/input-masked/text-mask/adjustCaretPosition.d.ts +2 -1
- package/es/components/input-masked/text-mask/adjustCaretPosition.js +3 -2
- package/es/components/input-masked/text-mask/adjustCaretPosition.js.map +1 -1
- package/es/components/input-masked/text-mask/createTextMaskInputElement.js +9 -3
- package/es/components/input-masked/text-mask/createTextMaskInputElement.js.map +1 -1
- package/es/components/modal/ModalDocs.d.ts +5 -0
- package/es/components/modal/ModalDocs.js +191 -0
- package/es/components/modal/ModalDocs.js.map +1 -0
- package/es/components/radio/RadioDocs.js +2 -2
- package/es/components/radio/RadioDocs.js.map +1 -1
- package/es/components/section/Section.js +1 -6
- package/es/components/section/Section.js.map +1 -1
- package/es/components/section/SectionDocs.js +1 -1
- package/es/components/section/SectionDocs.js.map +1 -1
- package/es/components/slider/SliderDocs.js +2 -2
- package/es/components/slider/SliderDocs.js.map +1 -1
- package/es/components/space/SpaceDocs.d.ts +3 -0
- package/es/components/space/SpaceDocs.js +55 -0
- package/es/components/space/SpaceDocs.js.map +1 -0
- package/es/components/switch/SwitchDocs.js +2 -2
- package/es/components/switch/SwitchDocs.js.map +1 -1
- package/es/components/textarea/TextareaDocs.js +3 -3
- package/es/components/textarea/TextareaDocs.js.map +1 -1
- package/es/components/toggle-button/ToggleButtonGroupDocs.js +1 -1
- package/es/components/toggle-button/ToggleButtonGroupDocs.js.map +1 -1
- package/es/components/tooltip/TooltipDocs.js +1 -1
- package/es/components/tooltip/TooltipDocs.js.map +1 -1
- package/es/components/upload/Upload.js +6 -3
- package/es/components/upload/Upload.js.map +1 -1
- package/es/components/upload/UploadDocs.d.ts +1 -0
- package/es/components/upload/UploadDocs.js +42 -0
- package/es/components/upload/UploadDocs.js.map +1 -1
- package/es/components/upload/UploadFileListCell.js +32 -12
- package/es/components/upload/UploadFileListCell.js.map +1 -1
- package/es/components/upload/types.d.ts +7 -0
- package/es/components/upload/types.js.map +1 -1
- package/es/extensions/forms/DataContext/At/AtDocs.d.ts +2 -0
- package/es/extensions/forms/DataContext/At/AtDocs.js +18 -0
- package/es/extensions/forms/DataContext/At/AtDocs.js.map +1 -0
- package/es/extensions/forms/DataContext/Provider/ProviderDocs.js +1 -1
- package/es/extensions/forms/DataContext/Provider/ProviderDocs.js.map +1 -1
- package/es/extensions/forms/Field/Number/Number.js +3 -6
- package/es/extensions/forms/Field/Number/Number.js.map +1 -1
- package/es/extensions/forms/Field/Password/PasswordDocs.d.ts +1 -0
- package/es/extensions/forms/Field/Password/PasswordDocs.js +13 -1
- package/es/extensions/forms/Field/Password/PasswordDocs.js.map +1 -1
- package/es/extensions/forms/Field/PhoneNumber/PhoneNumber.d.ts +6 -4
- package/es/extensions/forms/Field/PhoneNumber/PhoneNumber.js +24 -16
- package/es/extensions/forms/Field/PhoneNumber/PhoneNumber.js.map +1 -1
- package/es/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.d.ts +2 -2
- package/es/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js +7 -2
- package/es/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js.map +1 -1
- package/es/extensions/forms/Field/Provider/useFieldProvider.d.ts +3 -3
- package/es/extensions/forms/Field/String/StringDocs.js +1 -1
- package/es/extensions/forms/Field/String/StringDocs.js.map +1 -1
- package/es/extensions/forms/Field/Upload/Upload.d.ts +1 -1
- package/es/extensions/forms/Field/Upload/Upload.js +3 -1
- package/es/extensions/forms/Field/Upload/Upload.js.map +1 -1
- package/es/extensions/forms/FieldBlock/FieldBlock.js +11 -4
- package/es/extensions/forms/FieldBlock/FieldBlock.js.map +1 -1
- package/es/extensions/forms/FieldBlock/FieldBlockContext.d.ts +1 -1
- package/es/extensions/forms/FieldBlock/FieldBlockContext.js.map +1 -1
- package/es/extensions/forms/Form/ButtonRow/ButtonRowDocs.d.ts +2 -0
- package/es/extensions/forms/Form/ButtonRow/ButtonRowDocs.js +13 -0
- package/es/extensions/forms/Form/ButtonRow/ButtonRowDocs.js.map +1 -0
- package/es/extensions/forms/Form/Isolation/IsolationDocs.js +1 -1
- package/es/extensions/forms/Form/Isolation/IsolationDocs.js.map +1 -1
- package/es/extensions/forms/Wizard/Buttons/ButtonsDocs.d.ts +2 -0
- package/es/extensions/forms/Wizard/Buttons/ButtonsDocs.js +8 -0
- package/es/extensions/forms/Wizard/Buttons/ButtonsDocs.js.map +1 -0
- package/es/extensions/forms/hooks/DataValueWritePropsDocs.js +1 -1
- package/es/extensions/forms/hooks/DataValueWritePropsDocs.js.map +1 -1
- package/es/extensions/forms/hooks/useFieldProps.js +56 -19
- package/es/extensions/forms/hooks/useFieldProps.js.map +1 -1
- package/es/extensions/forms/types.d.ts +8 -5
- package/es/extensions/forms/types.js.map +1 -1
- package/es/extensions/forms/utils/FormError.d.ts +20 -16
- package/es/extensions/forms/utils/FormError.js +1 -0
- package/es/extensions/forms/utils/FormError.js.map +1 -1
- package/es/shared/Eufemia.d.ts +1 -1
- package/es/shared/Eufemia.js +2 -2
- package/es/shared/Eufemia.js.map +1 -1
- package/es/shared/helpers.d.ts +1 -0
- package/es/shared/helpers.js +6 -0
- package/es/shared/helpers.js.map +1 -1
- package/es/shared/locales/sv-SE.js +2 -2
- package/es/shared/locales/sv-SE.js.map +1 -1
- package/es/style/core/scopes.scss +1 -1
- package/es/style/dnb-ui-basis.css +1 -1
- package/es/style/dnb-ui-basis.min.css +1 -1
- package/es/style/dnb-ui-body.css +1 -1
- package/es/style/dnb-ui-body.min.css +1 -1
- package/es/style/dnb-ui-components.css +13 -0
- package/es/style/dnb-ui-components.min.css +1 -1
- package/es/style/dnb-ui-core.css +1 -1
- package/es/style/dnb-ui-core.min.css +1 -1
- package/es/style/themes/theme-eiendom/eiendom-theme-components.css +13 -0
- package/es/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
- package/es/style/themes/theme-sbanken/sbanken-theme-components.css +13 -0
- package/es/style/themes/theme-sbanken/sbanken-theme-components.min.css +1 -1
- package/es/style/themes/theme-ui/ui-theme-components.css +13 -0
- package/es/style/themes/theme-ui/ui-theme-components.min.css +1 -1
- package/esm/dnb-ui-basis.min.mjs +1 -1
- package/esm/dnb-ui-components.min.mjs +1 -1
- package/esm/dnb-ui-elements.min.mjs +1 -1
- package/esm/dnb-ui-extensions.min.mjs +1 -1
- package/esm/dnb-ui-lib.min.mjs +1 -1
- package/extensions/forms/DataContext/At/AtDocs.d.ts +2 -0
- package/extensions/forms/DataContext/At/AtDocs.js +18 -0
- package/extensions/forms/DataContext/At/AtDocs.js.map +1 -0
- package/extensions/forms/DataContext/Provider/ProviderDocs.js +1 -1
- package/extensions/forms/DataContext/Provider/ProviderDocs.js.map +1 -1
- package/extensions/forms/Field/Number/Number.js +3 -6
- package/extensions/forms/Field/Number/Number.js.map +1 -1
- package/extensions/forms/Field/Password/PasswordDocs.d.ts +1 -0
- package/extensions/forms/Field/Password/PasswordDocs.js +13 -1
- package/extensions/forms/Field/Password/PasswordDocs.js.map +1 -1
- package/extensions/forms/Field/PhoneNumber/PhoneNumber.d.ts +6 -4
- package/extensions/forms/Field/PhoneNumber/PhoneNumber.js +33 -25
- package/extensions/forms/Field/PhoneNumber/PhoneNumber.js.map +1 -1
- package/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.d.ts +2 -2
- package/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js +7 -2
- package/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js.map +1 -1
- package/extensions/forms/Field/Provider/useFieldProvider.d.ts +3 -3
- package/extensions/forms/Field/String/StringDocs.js +1 -1
- package/extensions/forms/Field/String/StringDocs.js.map +1 -1
- package/extensions/forms/Field/Upload/Upload.d.ts +1 -1
- package/extensions/forms/Field/Upload/Upload.js +3 -1
- package/extensions/forms/Field/Upload/Upload.js.map +1 -1
- package/extensions/forms/FieldBlock/FieldBlock.js +11 -4
- package/extensions/forms/FieldBlock/FieldBlock.js.map +1 -1
- package/extensions/forms/FieldBlock/FieldBlockContext.d.ts +1 -1
- package/extensions/forms/FieldBlock/FieldBlockContext.js.map +1 -1
- package/extensions/forms/Form/ButtonRow/ButtonRowDocs.d.ts +2 -0
- package/extensions/forms/Form/ButtonRow/ButtonRowDocs.js +13 -0
- package/extensions/forms/Form/ButtonRow/ButtonRowDocs.js.map +1 -0
- package/extensions/forms/Form/Isolation/IsolationDocs.js +1 -1
- package/extensions/forms/Form/Isolation/IsolationDocs.js.map +1 -1
- package/extensions/forms/Wizard/Buttons/ButtonsDocs.d.ts +2 -0
- package/extensions/forms/Wizard/Buttons/ButtonsDocs.js +8 -0
- package/extensions/forms/Wizard/Buttons/ButtonsDocs.js.map +1 -0
- package/extensions/forms/hooks/DataValueWritePropsDocs.js +1 -1
- package/extensions/forms/hooks/DataValueWritePropsDocs.js.map +1 -1
- package/extensions/forms/hooks/useFieldProps.js +56 -19
- package/extensions/forms/hooks/useFieldProps.js.map +1 -1
- package/extensions/forms/types.d.ts +8 -5
- package/extensions/forms/types.js.map +1 -1
- package/extensions/forms/utils/FormError.d.ts +20 -16
- package/extensions/forms/utils/FormError.js.map +1 -1
- package/package.json +1 -1
- package/shared/Eufemia.d.ts +1 -1
- package/shared/Eufemia.js +2 -2
- package/shared/Eufemia.js.map +1 -1
- package/shared/helpers.d.ts +1 -0
- package/shared/helpers.js +6 -0
- package/shared/helpers.js.map +1 -1
- package/shared/locales/sv-SE.js +2 -2
- package/shared/locales/sv-SE.js.map +1 -1
- package/style/core/scopes.scss +1 -1
- package/style/dnb-ui-basis.css +1 -1
- package/style/dnb-ui-basis.min.css +1 -1
- package/style/dnb-ui-body.css +1 -1
- package/style/dnb-ui-body.min.css +1 -1
- package/style/dnb-ui-components.css +13 -0
- package/style/dnb-ui-components.min.css +1 -1
- package/style/dnb-ui-core.css +1 -1
- package/style/dnb-ui-core.min.css +1 -1
- package/style/themes/theme-eiendom/eiendom-theme-components.css +13 -0
- package/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
- package/style/themes/theme-sbanken/sbanken-theme-components.css +13 -0
- package/style/themes/theme-sbanken/sbanken-theme-components.min.css +1 -1
- package/style/themes/theme-ui/ui-theme-components.css +13 -0
- package/style/themes/theme-ui/ui-theme-components.min.css +1 -1
- package/umd/dnb-ui-basis.min.js +1 -1
- package/umd/dnb-ui-components.min.js +1 -1
- package/umd/dnb-ui-elements.min.js +1 -1
- package/umd/dnb-ui-extensions.min.js +1 -1
- package/umd/dnb-ui-lib.min.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,32 @@
|
|
|
3
3
|
All notable changes to @dnb/eufemia will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [10.71.0](https://github.com/dnbexperience/eufemia/compare/v10.70.1...v10.71.0) (2025-04-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **DatePicker:** display correct dates when props are updated with `useLayoutEffect` ([#4937](https://github.com/dnbexperience/eufemia/issues/4937)) ([cbaf535](https://github.com/dnbexperience/eufemia/commit/cbaf535a8fc12ba6933efddd08d2d10c02f213c5))
|
|
12
|
+
* **InputMasked:** ensure correct cursor position when suffix changes during typing ([#4939](https://github.com/dnbexperience/eufemia/issues/4939)) ([17d5da5](https://github.com/dnbexperience/eufemia/commit/17d5da53c30221d397dd0733107b11e143970116))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### :sparkles: Features
|
|
16
|
+
|
|
17
|
+
* **DatePicker:** remove stepped date change on `ArrowUp` a `ArrowDown` key press ([#4917](https://github.com/dnbexperience/eufemia/issues/4917)) ([9569617](https://github.com/dnbexperience/eufemia/commit/95696172a18242216a29f37d729814b11d9a8ff3))
|
|
18
|
+
* **Forms:** add `iso` (country) to additional args in PhoneNumber field ([#4929](https://github.com/dnbexperience/eufemia/issues/4929)) ([6ee934a](https://github.com/dnbexperience/eufemia/commit/6ee934aab4b99f99099c66dc31ad69ef84c548b8))
|
|
19
|
+
* **Forms:** add support for string and JSX format to Field.* `error` prop and validators ([#4928](https://github.com/dnbexperience/eufemia/issues/4928)) ([ee0183f](https://github.com/dnbexperience/eufemia/commit/ee0183f91ad11232ba29294040664cbfff75f319))
|
|
20
|
+
* **Upload:** add `description` to fileItem ([#4935](https://github.com/dnbexperience/eufemia/issues/4935)) ([688e340](https://github.com/dnbexperience/eufemia/commit/688e340d4d76ed8c96ab71e78afbb91cbb56b0de))
|
|
21
|
+
* **Upload:** add `disableDragAndDrop` ([#4905](https://github.com/dnbexperience/eufemia/issues/4905)) ([7205f96](https://github.com/dnbexperience/eufemia/commit/7205f96755ff492fdde9ccd79a7c86615dfe52c1))
|
|
22
|
+
* **Upload:** add `removeDeleteButton` to fileItem ([#4936](https://github.com/dnbexperience/eufemia/issues/4936)) ([00e7b81](https://github.com/dnbexperience/eufemia/commit/00e7b81d70e0ba7c030c5ece55a343fb9ea3ef7c))
|
|
23
|
+
|
|
24
|
+
## [10.70.1](https://github.com/dnbexperience/eufemia/compare/v10.70.0...v10.70.1) (2025-04-10)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### :bug: Bug Fixes
|
|
28
|
+
|
|
29
|
+
* **DatePicker:** enhance typing in input ([#4893](https://github.com/dnbexperience/eufemia/issues/4893)) ([1162c72](https://github.com/dnbexperience/eufemia/commit/1162c72842286e0383a15406a02f7e3846d275f4))
|
|
30
|
+
* **Forms:** prevent form submit when `error` prop is set on a `Field.*` ([#4908](https://github.com/dnbexperience/eufemia/issues/4908)) ([687c249](https://github.com/dnbexperience/eufemia/commit/687c2493ab5f463163cb947aef162890f50153cd))
|
|
31
|
+
|
|
6
32
|
## [10.70.0](https://github.com/dnbexperience/eufemia/compare/v10.69.1...v10.70.0) (2025-04-04)
|
|
7
33
|
|
|
8
34
|
|
|
@@ -187,12 +187,12 @@ const autocompleteProperties = exports.autocompleteProperties = {
|
|
|
187
187
|
},
|
|
188
188
|
status: {
|
|
189
189
|
doc: '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.',
|
|
190
|
-
type: '
|
|
190
|
+
type: ['error', 'info', 'boolean'],
|
|
191
191
|
status: 'optional'
|
|
192
192
|
},
|
|
193
193
|
status_state: {
|
|
194
194
|
doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',
|
|
195
|
-
type: '
|
|
195
|
+
type: ['error', 'info'],
|
|
196
196
|
status: 'optional'
|
|
197
197
|
},
|
|
198
198
|
status_props: {
|
|
@@ -232,7 +232,7 @@ const autocompleteProperties = exports.autocompleteProperties = {
|
|
|
232
232
|
},
|
|
233
233
|
input_ref: {
|
|
234
234
|
doc: 'Use a React.Ref to get access to the `input` DOM element.',
|
|
235
|
-
type: 'React.
|
|
235
|
+
type: 'React.RefObject',
|
|
236
236
|
status: 'optional'
|
|
237
237
|
},
|
|
238
238
|
input_element: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteDocs.js","names":["autocompleteProperties","exports","mode","doc","type","status","input_value","placeholder","title","disable_filter","disable_highlighting","disable_reorder","search_numbers","search_in_word_index","keep_value","keep_selection","keep_value_and_selection","prevent_selection","show_clear_button","icon","icon_size","icon_position","input_icon","triangle_position","size","drawer_class","show_submit_button","align_autocomplete","no_options","aria_live_options","show_all","indicator_label","show_options_sr","selected_sr","submit_button_title","submit_button_icon","submit_element","opened","open_on_focus","stretch","skip_portal","status_state","status_props","globalStatus","label","label_direction","label_sr_only","suffix","skeleton","input_ref","input_element","AutocompleteEvents","on_type","on_focus","on_blur","on_change","on_select","on_show","on_hide"],"sources":["../../../../src/components/autocomplete/AutocompleteDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const autocompleteProperties: PropertiesTableProps = {\n mode: {\n doc: 'If set to `async`, it prevents showing the \"no options\" message during typing / filtering. Defaults to `sync`.',\n type: 'string',\n status: 'optional',\n },\n input_value: {\n doc: 'Lets you define a custom input value.',\n type: 'string',\n status: 'optional',\n },\n placeholder: {\n doc: 'Use this to define the pre-filled placeholder text in the input. Defaults to `title=\"Skriv og velg\"`.',\n type: 'string',\n status: 'optional',\n },\n title: {\n doc: 'Give a title to let the user know what they have to do. Defaults to `Skriv og få alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n disable_filter: {\n doc: 'If set to `true`, word highlighting will still be active, but no options will be filtered out. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n disable_highlighting: {\n doc: 'If set to `true`, word highlighting will be disabled, but the options will still get filtered. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n disable_reorder: {\n doc: 'If set to `true`, reordering of search results will be disabled. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n search_numbers: {\n doc: 'If set to `true` and `search_in_word_index` is not set, the user will be able to more easily search and filter e.g. bank account numbers. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n search_in_word_index: {\n doc: 'This gives you the possibility to change the threshold number, which defines from what word on we search \"inside words\". Defaults to `3`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_value: {\n doc: 'Use `true` to not remove the typed value on input blur, if it is invalid. By default, the typed value will disappear / replaced by a selected value from the data list during the input field blur. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_selection: {\n doc: 'Use `true` to not remove selected item on input blur, when the input value is empty. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_value_and_selection: {\n doc: 'Like `keep_value` – but would not reset to the selected value during input field blur. Also, the selected value would still be kept. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n prevent_selection: {\n doc: 'If set to `true`, no permanent selection will be made. Also, the typed value will not disappear on input blur (like `keep_value`). Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n show_clear_button: {\n doc: 'If set to `true`, a clear button is shown inside the input field. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n icon: {\n doc: 'To be included in the autocomplete input.',\n type: ['string', 'React.Node'],\n status: 'optional',\n },\n icon_size: {\n doc: 'Change the size of the icon pragmatically.',\n type: 'string',\n status: 'optional',\n },\n icon_position: {\n doc: 'Position of the icon inside the autocomplete. Set to `left` or `right`. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n input_icon: {\n doc: 'Same as `icon`.',\n type: ['string', 'React.Node'],\n status: 'optional',\n },\n triangle_position: {\n doc: 'Position of icon arrow / triangle the drawer. Set to `left` or `right`. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n size: {\n doc: 'Define the height of the Autocomplete. Can be set to `small`, `default`, `medium` and `large`. Defaults to `default`.',\n type: 'string',\n status: 'optional',\n },\n drawer_class: {\n doc: 'Define a custom class for the internal drawer-list. This makes it possible more easily customize the drawer-list style with styled-components and the `css` style method. Defaults to `null`.',\n type: 'string',\n status: 'optional',\n },\n show_submit_button: {\n doc: 'Use `true` to show a Autocomplete button to toggle the [DrawerList](/uilib/components/fragments/drawer-list). Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n align_autocomplete: {\n doc: 'Use `right` to change the options alignment direction. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n no_options: {\n doc: 'Text show in the \"no options\" item. Defaults to `Ingen alternativer`.',\n type: 'boolean',\n status: 'optional',\n },\n aria_live_options: {\n doc: 'Text read out by screen readers. This way users with screen readers know how many options they got during typing. Defaults to `%s alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n show_all: {\n doc: 'Text that lets a user unravel all the available options. Defaults to `Vis alt`.',\n type: 'boolean',\n status: 'optional',\n },\n indicator_label: {\n doc: 'Text show on indicator \"options\" item. Defaults to `Henter data ...`.',\n type: 'React.Node',\n status: 'optional',\n },\n show_options_sr: {\n doc: 'Only for screen readers. Title of the button to show the suggestions / options. It is always present and when activating, it opens the DrawerList and sets the focus on it. Defaults to `Bla gjennom alternativer`.',\n type: 'string',\n status: 'optional',\n },\n selected_sr: {\n doc: 'Only for screen readers (VoiceOver). The label used to announce the selected item. Defaults to `Valgt:`.',\n type: 'string',\n status: 'optional',\n },\n submit_button_title: {\n doc: 'Title on submit button. Defaults to `Vis alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n submit_button_icon: {\n doc: 'The icon used in the submit button. Defaults to `chevron_down`.',\n type: ['string', 'React.Element'],\n status: 'optional',\n },\n submit_element: {\n doc: 'Replace the dropdown / submit button with a custom React element. Defaults to the input SubmitButton `import { SubmitButton } from '@dnb/eufemia/components/input/Input'`.',\n type: 'React.Node',\n status: 'optional',\n },\n opened: {\n doc: 'If set to `true`, the Autocomplete will be rendered initially with a visible and accessible data list / options.',\n type: 'boolean',\n status: 'optional',\n },\n open_on_focus: {\n doc: 'Use `true` to auto open the list once the user is entering the input field with the keyboard.',\n type: 'boolean',\n status: 'optional',\n },\n stretch: {\n doc: 'If set to `true`, then the autocomplete will be 100% in available `width`.',\n type: 'boolean',\n status: 'optional',\n },\n skip_portal: {\n doc: 'Set to `true` to disable the React Portal behavior. Defaults to `false`.',\n type: 'string',\n status: 'optional',\n },\n status: {\n doc: '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 type: 'string',\n status: 'optional',\n },\n status_state: {\n doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',\n type: 'string',\n status: 'optional',\n },\n status_props: {\n doc: 'Use an object to define additional FormStatus properties.',\n type: 'object',\n status: 'optional',\n },\n globalStatus: {\n doc: 'The [configuration](/uilib/components/global-status/properties/#configuration-object) used for the target [GlobalStatus](/uilib/components/global-status).',\n type: 'object',\n status: 'optional',\n },\n label: {\n doc: 'Prepends the Form Label component. If no ID is provided, a random ID is created.',\n type: 'React.Node',\n status: 'optional',\n },\n label_direction: {\n doc: 'Use `label_direction=\"vertical\"` to change the label layout direction. Defaults to `horizontal`.',\n type: 'React.Node',\n status: 'optional',\n },\n label_sr_only: {\n doc: 'Use `true` to make the label only readable by screen readers.',\n type: 'boolean',\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the Autocomplete more than the label. You can also send in a React component, so it gets wrapped inside the Autocomplete component.',\n type: 'React.Node',\n status: 'optional',\n },\n skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n input_ref: {\n doc: 'Use a React.Ref to get access to the `input` DOM element.',\n type: 'React.Ref',\n status: 'optional',\n },\n input_element: {\n doc: 'Lets you provide a custom React element as the input HTML element.',\n type: ['string', 'React.Element'],\n status: 'optional',\n },\n '[DrawerList](/uilib/components/fragments/drawer-list/properties)': {\n doc: 'all DrawerList properties.',\n type: 'Various',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n\nexport const AutocompleteEvents: PropertiesTableProps = {\n on_type: {\n doc: 'Will be called for every key change the users makes. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data)',\n type: 'function',\n status: 'optional',\n },\n on_focus: {\n doc: 'Will be called on user generated focus action. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_blur: {\n doc: 'Will be called on user generated blur action. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_change: {\n doc: 'Will be called on state changes made by the user. Returns an object with the new selected `data` item `{ data, event, attributes, value }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_select: {\n doc: 'Will be called once the users focuses or selects an item by a click or keyboard navigation. Returns an object with the new selected `data` item `{ data, event, attributes, value, active_item }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data). The \"active_item\" property is the currently selected item by keyboard navigation',\n type: 'function',\n status: 'optional',\n },\n on_show: {\n doc: 'Will be called once the user presses the autocomplete. Returns the data item `{ data, attributes }`.',\n type: 'function',\n status: 'optional',\n },\n on_hide: {\n doc: 'Will be called once the user presses the autocomplete again, or clicks somewhere else. Returns the data item `{ data, attributes }`.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":";;;;;;AAEO,MAAMA,sBAA4C,GAAAC,OAAA,CAAAD,sBAAA,GAAG;EAC1DE,IAAI,EAAE;IACJC,GAAG,EAAE,gHAAgH;IACrHC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDC,WAAW,EAAE;IACXH,GAAG,EAAE,uCAAuC;IAC5CC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;E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AM,EAAE;EACV;AACF,CAAC;AAEM,MAAM8C,kBAAwC,GAAAlD,OAAA,CAAAkD,kBAAA,GAAG;EACtDC,OAAO,EAAE;IACPjD,GAAG,EAAE,8NAA8N;IACnOC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDgD,QAAQ,EAAE;IACRlD,GAAG,EAAE,yNAAyN;IAC9NC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDiD,OAAO,EAAE;IACPnD,GAAG,EAAE,wNAAwN;IAC7NC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDkD,SAAS,EAAE;IACTpD,GAAG,EAAE,sOAAsO;IAC3OC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDmD,SAAS,EAAE;IACTrD,GAAG,EAAE,8WAA8W;IACnXC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDoD,OAAO,EAAE;IACPtD,GAAG,EAAE,sGAAsG;IAC3GC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDqD,OAAO,EAAE;IACPvD,GAAG,EAAE,sIAAsI;IAC3IC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"AutocompleteDocs.js","names":["autocompleteProperties","exports","mode","doc","type","status","input_value","placeholder","title","disable_filter","disable_highlighting","disable_reorder","search_numbers","search_in_word_index","keep_value","keep_selection","keep_value_and_selection","prevent_selection","show_clear_button","icon","icon_size","icon_position","input_icon","triangle_position","size","drawer_class","show_submit_button","align_autocomplete","no_options","aria_live_options","show_all","indicator_label","show_options_sr","selected_sr","submit_button_title","submit_button_icon","submit_element","opened","open_on_focus","stretch","skip_portal","status_state","status_props","globalStatus","label","label_direction","label_sr_only","suffix","skeleton","input_ref","input_element","AutocompleteEvents","on_type","on_focus","on_blur","on_change","on_select","on_show","on_hide"],"sources":["../../../../src/components/autocomplete/AutocompleteDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const autocompleteProperties: PropertiesTableProps = {\n mode: {\n doc: 'If set to `async`, it prevents showing the \"no options\" message during typing / filtering. Defaults to `sync`.',\n type: 'string',\n status: 'optional',\n },\n input_value: {\n doc: 'Lets you define a custom input value.',\n type: 'string',\n status: 'optional',\n },\n placeholder: {\n doc: 'Use this to define the pre-filled placeholder text in the input. Defaults to `title=\"Skriv og velg\"`.',\n type: 'string',\n status: 'optional',\n },\n title: {\n doc: 'Give a title to let the user know what they have to do. Defaults to `Skriv og få alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n disable_filter: {\n doc: 'If set to `true`, word highlighting will still be active, but no options will be filtered out. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n disable_highlighting: {\n doc: 'If set to `true`, word highlighting will be disabled, but the options will still get filtered. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n disable_reorder: {\n doc: 'If set to `true`, reordering of search results will be disabled. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n search_numbers: {\n doc: 'If set to `true` and `search_in_word_index` is not set, the user will be able to more easily search and filter e.g. bank account numbers. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n search_in_word_index: {\n doc: 'This gives you the possibility to change the threshold number, which defines from what word on we search \"inside words\". Defaults to `3`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_value: {\n doc: 'Use `true` to not remove the typed value on input blur, if it is invalid. By default, the typed value will disappear / replaced by a selected value from the data list during the input field blur. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_selection: {\n doc: 'Use `true` to not remove selected item on input blur, when the input value is empty. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_value_and_selection: {\n doc: 'Like `keep_value` – but would not reset to the selected value during input field blur. Also, the selected value would still be kept. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n prevent_selection: {\n doc: 'If set to `true`, no permanent selection will be made. Also, the typed value will not disappear on input blur (like `keep_value`). Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n show_clear_button: {\n doc: 'If set to `true`, a clear button is shown inside the input field. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n icon: {\n doc: 'To be included in the autocomplete input.',\n type: ['string', 'React.Node'],\n status: 'optional',\n },\n icon_size: {\n doc: 'Change the size of the icon pragmatically.',\n type: 'string',\n status: 'optional',\n },\n icon_position: {\n doc: 'Position of the icon inside the autocomplete. Set to `left` or `right`. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n input_icon: {\n doc: 'Same as `icon`.',\n type: ['string', 'React.Node'],\n status: 'optional',\n },\n triangle_position: {\n doc: 'Position of icon arrow / triangle the drawer. Set to `left` or `right`. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n size: {\n doc: 'Define the height of the Autocomplete. Can be set to `small`, `default`, `medium` and `large`. Defaults to `default`.',\n type: 'string',\n status: 'optional',\n },\n drawer_class: {\n doc: 'Define a custom class for the internal drawer-list. This makes it possible more easily customize the drawer-list style with styled-components and the `css` style method. Defaults to `null`.',\n type: 'string',\n status: 'optional',\n },\n show_submit_button: {\n doc: 'Use `true` to show a Autocomplete button to toggle the [DrawerList](/uilib/components/fragments/drawer-list). Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n align_autocomplete: {\n doc: 'Use `right` to change the options alignment direction. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n no_options: {\n doc: 'Text show in the \"no options\" item. Defaults to `Ingen alternativer`.',\n type: 'boolean',\n status: 'optional',\n },\n aria_live_options: {\n doc: 'Text read out by screen readers. This way users with screen readers know how many options they got during typing. Defaults to `%s alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n show_all: {\n doc: 'Text that lets a user unravel all the available options. Defaults to `Vis alt`.',\n type: 'boolean',\n status: 'optional',\n },\n indicator_label: {\n doc: 'Text show on indicator \"options\" item. Defaults to `Henter data ...`.',\n type: 'React.Node',\n status: 'optional',\n },\n show_options_sr: {\n doc: 'Only for screen readers. Title of the button to show the suggestions / options. It is always present and when activating, it opens the DrawerList and sets the focus on it. Defaults to `Bla gjennom alternativer`.',\n type: 'string',\n status: 'optional',\n },\n selected_sr: {\n doc: 'Only for screen readers (VoiceOver). The label used to announce the selected item. Defaults to `Valgt:`.',\n type: 'string',\n status: 'optional',\n },\n submit_button_title: {\n doc: 'Title on submit button. Defaults to `Vis alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n submit_button_icon: {\n doc: 'The icon used in the submit button. Defaults to `chevron_down`.',\n type: ['string', 'React.Element'],\n status: 'optional',\n },\n submit_element: {\n doc: 'Replace the dropdown / submit button with a custom React element. Defaults to the input SubmitButton `import { SubmitButton } from '@dnb/eufemia/components/input/Input'`.',\n type: 'React.Node',\n status: 'optional',\n },\n opened: {\n doc: 'If set to `true`, the Autocomplete will be rendered initially with a visible and accessible data list / options.',\n type: 'boolean',\n status: 'optional',\n },\n open_on_focus: {\n doc: 'Use `true` to auto open the list once the user is entering the input field with the keyboard.',\n type: 'boolean',\n status: 'optional',\n },\n stretch: {\n doc: 'If set to `true`, then the autocomplete will be 100% in available `width`.',\n type: 'boolean',\n status: 'optional',\n },\n skip_portal: {\n doc: 'Set to `true` to disable the React Portal behavior. Defaults to `false`.',\n type: 'string',\n status: 'optional',\n },\n status: {\n doc: '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 type: ['error', 'info', 'boolean'],\n status: 'optional',\n },\n status_state: {\n doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',\n type: ['error', 'info'],\n status: 'optional',\n },\n status_props: {\n doc: 'Use an object to define additional FormStatus properties.',\n type: 'object',\n status: 'optional',\n },\n globalStatus: {\n doc: 'The [configuration](/uilib/components/global-status/properties/#configuration-object) used for the target [GlobalStatus](/uilib/components/global-status).',\n type: 'object',\n status: 'optional',\n },\n label: {\n doc: 'Prepends the Form Label component. If no ID is provided, a random ID is created.',\n type: 'React.Node',\n status: 'optional',\n },\n label_direction: {\n doc: 'Use `label_direction=\"vertical\"` to change the label layout direction. Defaults to `horizontal`.',\n type: 'React.Node',\n status: 'optional',\n },\n label_sr_only: {\n doc: 'Use `true` to make the label only readable by screen readers.',\n type: 'boolean',\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the Autocomplete more than the label. You can also send in a React component, so it gets wrapped inside the Autocomplete component.',\n type: 'React.Node',\n status: 'optional',\n },\n skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n input_ref: {\n doc: 'Use a React.Ref to get access to the `input` DOM element.',\n type: 'React.RefObject',\n status: 'optional',\n },\n input_element: {\n doc: 'Lets you provide a custom React element as the input HTML element.',\n type: ['string', 'React.Element'],\n status: 'optional',\n },\n '[DrawerList](/uilib/components/fragments/drawer-list/properties)': {\n doc: 'all DrawerList properties.',\n type: 'Various',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n\nexport const AutocompleteEvents: PropertiesTableProps = {\n on_type: {\n doc: 'Will be called for every key change the users makes. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data)',\n type: 'function',\n status: 'optional',\n },\n on_focus: {\n doc: 'Will be called on user generated focus action. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_blur: {\n doc: 'Will be called on user generated blur action. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_change: {\n doc: 'Will be called on state changes made by the user. Returns an object with the new selected `data` item `{ data, event, attributes, value }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_select: {\n doc: 'Will be called once the users focuses or selects an item by a click or keyboard navigation. Returns an object with the new selected `data` item `{ data, event, attributes, value, active_item }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data). The \"active_item\" property is the currently selected item by keyboard navigation',\n type: 'function',\n status: 'optional',\n },\n on_show: {\n doc: 'Will be called once the user presses the autocomplete. Returns the data item `{ data, attributes }`.',\n type: 'function',\n status: 'optional',\n },\n on_hide: {\n doc: 'Will be called once the user presses the autocomplete again, or clicks somewhere else. Returns the data item `{ data, attributes }`.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":";;;;;;AAEO,MAAMA,sBAA4C,GAAAC,OAAA,CAAAD,sBAAA,GAAG;EAC1DE,IAAI,EAAE;IACJC,GAAG,EAAE,gHAAgH;IACrHC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDC,WAAW,EAAE;IACXH,GAAG,EAAE,uCAAuC;IAC5CC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDE,WAAW,EAAE;IACXJ,GAAG,EAAE,uGAAuG;IAC5GC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDG,KAAK,EAAE;IACLL,GAAG,EAAE,iGAAiG;IACtGC,IAAI,EAAE,YAAY;IAClBC,MAAM,EAAE;EACV,CAAC;EACDI,cAAc,EAAE;IACdN,GAAG,EAAE,qHAAqH;IAC1HC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDK,oBAAoB,EAAE;IACpBP,GAAG,EAAE,qHAAqH;IAC1HC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDM,eAAe,EAAE;IACfR,GAAG,EAAE,uFAAuF;IAC5FC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDO,cAAc,EAAE;IACdT,GAAG,EAAE,gKAAgK;IACrKC,IAA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;EACDmD,SAAS,EAAE;IACTrD,GAAG,EAAE,8WAA8W;IACnXC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDoD,OAAO,EAAE;IACPtD,GAAG,EAAE,sGAAsG;IAC3GC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDqD,OAAO,EAAE;IACPvD,GAAG,EAAE,sIAAsI;IAC3IC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
|
|
@@ -20,6 +20,7 @@ var _Img = _interopRequireDefault(require("../../elements/img/Img"));
|
|
|
20
20
|
var _Context = _interopRequireDefault(require("../../shared/Context"));
|
|
21
21
|
var _componentHelper = require("../../shared/component-helper");
|
|
22
22
|
var _AvatarGroup = _interopRequireWildcard(require("./AvatarGroup"));
|
|
23
|
+
var _helpers = require("../../shared/helpers");
|
|
23
24
|
const _excluded = ["alt", "className", "children", "size", "skeleton", "variant", "src", "imgProps", "hasLabel", "backgroundColor", "color"];
|
|
24
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
25
26
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -80,8 +81,8 @@ const Avatar = localProps => {
|
|
|
80
81
|
}
|
|
81
82
|
(0, _componentHelper.validateDOMAttributes)(allProps, props);
|
|
82
83
|
const style = _objectSpread({
|
|
83
|
-
'--background-color': getColor(backgroundColor),
|
|
84
|
-
'--color': getColor(color)
|
|
84
|
+
'--background-color': (0, _helpers.getColor)(backgroundColor),
|
|
85
|
+
'--color': (0, _helpers.getColor)(color)
|
|
85
86
|
}, props === null || props === void 0 ? void 0 : props.style);
|
|
86
87
|
return _react.default.createElement("span", _extends({
|
|
87
88
|
className: (0, _classnames.default)(`dnb-avatar dnb-avatar--${variant || 'primary'} dnb-avatar--size-${size || 'medium'}`, skeletonClasses, spacingClasses, className)
|
|
@@ -91,12 +92,6 @@ const Avatar = localProps => {
|
|
|
91
92
|
className: "dnb-sr-only"
|
|
92
93
|
}, childrenProp), children);
|
|
93
94
|
};
|
|
94
|
-
function getColor(value) {
|
|
95
|
-
if (String(value).includes('--')) {
|
|
96
|
-
return value;
|
|
97
|
-
}
|
|
98
|
-
return value ? !/#|var/.test(value) ? `var(--color-${value})` : value : undefined;
|
|
99
|
-
}
|
|
100
95
|
Avatar.Group = _AvatarGroup.default;
|
|
101
96
|
Avatar._supportsSpacingProps = true;
|
|
102
97
|
var _default = exports.default = Avatar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","names":["_react","_interopRequireDefault","require","_classnames","_SpacingHelper","_SkeletonHelper","_Img","_Context","_componentHelper","_AvatarGroup","_interopRequireWildcard","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","_objectWithoutProperties","_objectWithoutPropertiesLoose","indexOf","propertyIsEnumerable","defaultProps","exports","size","variant","skeleton","Avatar","localProps","context","React","useContext","Context","avatarGroupContext","AvatarGroupContext","allProps","extendPropsWithContext","alt","className","children","childrenProp","src","imgProps","hasLabel","backgroundColor","color","props","skeletonClasses","createSkeletonClass","spacingClasses","createSpacingClasses","childrenIsString","imageProps","createElement","firstLetterUpperCase","charAt","toUpperCase","warn","validateDOMAttributes","style","getColor","classnames","includes","test","undefined","Group","AvatarGroup","_supportsSpacingProps","_default"],"sources":["../../../../src/components/avatar/Avatar.tsx"],"sourcesContent":["import React from 'react'\nimport classnames from 'classnames'\n\n// Components\nimport { createSpacingClasses } from '../space/SpacingHelper'\nimport { createSkeletonClass } from '../skeleton/SkeletonHelper'\n\n// Elements\nimport Img, { ImgProps } from '../../elements/img/Img'\n\n// Shared\nimport Context from '../../shared/Context'\nimport type { SpacingProps } from '../../shared/types'\nimport type { SkeletonShow } from '../skeleton/Skeleton'\nimport {\n validateDOMAttributes,\n extendPropsWithContext,\n warn,\n} from '../../shared/component-helper'\n\n// Internal\nimport AvatarGroup, { AvatarGroupContext } from './AvatarGroup'\n\nexport type AvatarSizes = 'small' | 'medium' | 'large' | 'x-large'\nexport type AvatarVariants = 'primary' | 'secondary' | 'tertiary'\n\nexport type AvatarImgProps = ImgProps\n\nexport interface AvatarProps\n extends Omit<React.HTMLProps<HTMLElement>, 'size'> {\n /**\n * Used in combination with `src` to provide an alt attribute for the `img` element.\n * Default: null\n */\n alt?: string\n\n /**\n * Custom className on the component root\n * Default: null\n */\n className?: string\n\n /**\n * Skeleton should be applied when loading content\n * Default: null\n */\n skeleton?: SkeletonShow\n\n /**\n * The content of the component. Can be used instead of prop \"data\".\n * Default: null\n */\n children?: React.ReactNode\n\n /**\n * The size of the component.\n * Default: medium.\n */\n size?: AvatarSizes\n\n /**\n * Specifies the path to the image\n * Default: null\n */\n src?: string\n\n /**\n * Props applied to the `img` element if the component is used to display an image.\n * Default: null\n */\n imgProps?: ImgProps\n\n /**\n * The variant of the component.\n * Default: primary.\n */\n variant?: AvatarVariants\n\n /**\n * If an avatar is hidden from the screen reader (by setting aria-hidden={true}) or if label is given, typical inside a table or dl (definition list), then you can disable Avatar.Group as a dependent of Avatar.\n * Use `true` to omit the `Avatar group required:` warning.\n * Default: null\n */\n hasLabel?: boolean\n\n /**\n * Define a custom background color, instead of a variant. Use a Eufemia color.\n * Default: undefined\n */\n backgroundColor?: string\n\n /**\n * Define a custom color to compliment the backgroundColor. Use a Eufemia color.\n * Default: undefined\n */\n color?: string\n}\n\nexport const defaultProps = {\n size: 'medium',\n variant: 'primary',\n skeleton: false,\n}\n\nconst Avatar = (localProps: AvatarProps & SpacingProps) => {\n // Every component should have a context\n const context = React.useContext(Context)\n const avatarGroupContext = React.useContext(AvatarGroupContext)\n\n // Extract additional props from global context\n const allProps = extendPropsWithContext(\n localProps,\n defaultProps,\n context?.Avatar,\n { skeleton: context?.skeleton },\n avatarGroupContext\n )\n\n const {\n alt,\n className,\n children: childrenProp,\n size,\n skeleton,\n variant,\n src,\n imgProps,\n hasLabel,\n backgroundColor,\n color,\n ...props\n } = allProps\n\n let children = null\n\n const skeletonClasses = createSkeletonClass('shape', skeleton, context)\n const spacingClasses = createSpacingClasses(props)\n\n const childrenIsString = typeof childrenProp === 'string'\n\n if (src || imgProps) {\n const imageProps = { src, alt, ...imgProps }\n children = <Img {...imageProps} />\n } else if (childrenIsString) {\n const firstLetterUpperCase = childrenProp.charAt(0).toUpperCase()\n children = <span aria-hidden>{firstLetterUpperCase}</span>\n } else {\n children = childrenProp\n }\n\n if (!avatarGroupContext && !hasLabel) {\n warn(\n `Avatar group required: An Avatar requires an Avatar.Group with label description as a parent component. This is to ensure correct semantic and accessibility.`\n )\n }\n\n validateDOMAttributes(allProps, props)\n\n const style = {\n '--background-color': getColor(backgroundColor),\n '--color': getColor(color),\n ...props?.style,\n } as React.CSSProperties\n\n return (\n <span\n className={classnames(\n 'dnb-avatar',\n `dnb-avatar--${variant || 'primary'}`,\n `dnb-avatar--size-${size || 'medium'}`,\n skeletonClasses,\n spacingClasses,\n className\n )}\n {...props}\n style={style}\n >\n {childrenIsString && (\n <span className=\"dnb-sr-only\">{childrenProp}</span>\n )}\n {children}\n </span>\n )\n}\n\nfunction getColor(value: string) {\n if (String(value).includes('--')) {\n return value\n }\n return value\n ? !/#|var/.test(value)\n ? `var(--color-${value})`\n : value\n : undefined\n}\n\nAvatar.Group = AvatarGroup\n\nexport { AvatarGroup }\n\nAvatar._supportsSpacingProps = true\n\nexport default Avatar\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AAGA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AAGA,IAAAI,IAAA,GAAAL,sBAAA,CAAAC,OAAA;AAGA,IAAAK,QAAA,GAAAN,sBAAA,CAAAC,OAAA;AAGA,IAAAM,gBAAA,GAAAN,OAAA;AAOA,IAAAO,YAAA,GAAAC,uBAAA,CAAAR,OAAA;AAA+D,MAAAS,SAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,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ault","require","_classnames","_SpacingHelper","_SkeletonHelper","_Img","_Context","_componentHelper","_AvatarGroup","_interopRequireWildcard","_helpers","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","_objectWithoutProperties","_objectWithoutPropertiesLoose","indexOf","propertyIsEnumerable","defaultProps","exports","size","variant","skeleton","Avatar","localProps","context","React","useContext","Context","avatarGroupContext","AvatarGroupContext","allProps","extendPropsWithContext","alt","className","children","childrenProp","src","imgProps","hasLabel","backgroundColor","color","props","skeletonClasses","createSkeletonClass","spacingClasses","createSpacingClasses","childrenIsString","imageProps","createElement","firstLetterUpperCase","charAt","toUpperCase","warn","validateDOMAttributes","style","getColor","classnames","Group","AvatarGroup","_supportsSpacingProps","_default"],"sources":["../../../../src/components/avatar/Avatar.tsx"],"sourcesContent":["import React from 'react'\nimport classnames from 'classnames'\n\n// Components\nimport { createSpacingClasses } from '../space/SpacingHelper'\nimport { createSkeletonClass } from '../skeleton/SkeletonHelper'\n\n// Elements\nimport Img, { ImgProps } from '../../elements/img/Img'\n\n// Shared\nimport Context from '../../shared/Context'\nimport type { SpacingProps } from '../../shared/types'\nimport type { SkeletonShow } from '../skeleton/Skeleton'\nimport {\n validateDOMAttributes,\n extendPropsWithContext,\n warn,\n} from '../../shared/component-helper'\n\n// Internal\nimport AvatarGroup, { AvatarGroupContext } from './AvatarGroup'\nimport { getColor } from '../../shared/helpers'\n\nexport type AvatarSizes = 'small' | 'medium' | 'large' | 'x-large'\nexport type AvatarVariants = 'primary' | 'secondary' | 'tertiary'\n\nexport type AvatarImgProps = ImgProps\n\nexport interface AvatarProps\n extends Omit<React.HTMLProps<HTMLElement>, 'size'> {\n /**\n * Used in combination with `src` to provide an alt attribute for the `img` element.\n * Default: null\n */\n alt?: string\n\n /**\n * Custom className on the component root\n * Default: null\n */\n className?: string\n\n /**\n * Skeleton should be applied when loading content\n * Default: null\n */\n skeleton?: SkeletonShow\n\n /**\n * The content of the component. Can be used instead of prop \"data\".\n * Default: null\n */\n children?: React.ReactNode\n\n /**\n * The size of the component.\n * Default: medium.\n */\n size?: AvatarSizes\n\n /**\n * Specifies the path to the image\n * Default: null\n */\n src?: string\n\n /**\n * Props applied to the `img` element if the component is used to display an image.\n * Default: null\n */\n imgProps?: ImgProps\n\n /**\n * The variant of the component.\n * Default: primary.\n */\n variant?: AvatarVariants\n\n /**\n * If an avatar is hidden from the screen reader (by setting aria-hidden={true}) or if label is given, typical inside a table or dl (definition list), then you can disable Avatar.Group as a dependent of Avatar.\n * Use `true` to omit the `Avatar group required:` warning.\n * Default: null\n */\n hasLabel?: boolean\n\n /**\n * Define a custom background color, instead of a variant. Use a Eufemia color.\n * Default: undefined\n */\n backgroundColor?: string\n\n /**\n * Define a custom color to compliment the backgroundColor. Use a Eufemia color.\n * Default: undefined\n */\n color?: string\n}\n\nexport const defaultProps = {\n size: 'medium',\n variant: 'primary',\n skeleton: false,\n}\n\nconst Avatar = (localProps: AvatarProps & SpacingProps) => {\n // Every component should have a context\n const context = React.useContext(Context)\n const avatarGroupContext = React.useContext(AvatarGroupContext)\n\n // Extract additional props from global context\n const allProps = extendPropsWithContext(\n localProps,\n defaultProps,\n context?.Avatar,\n { skeleton: context?.skeleton },\n avatarGroupContext\n )\n\n const {\n alt,\n className,\n children: childrenProp,\n size,\n skeleton,\n variant,\n src,\n imgProps,\n hasLabel,\n backgroundColor,\n color,\n ...props\n } = allProps\n\n let children = null\n\n const skeletonClasses = createSkeletonClass('shape', skeleton, context)\n const spacingClasses = createSpacingClasses(props)\n\n const childrenIsString = typeof childrenProp === 'string'\n\n if (src || imgProps) {\n const imageProps = { src, alt, ...imgProps }\n children = <Img {...imageProps} />\n } else if (childrenIsString) {\n const firstLetterUpperCase = childrenProp.charAt(0).toUpperCase()\n children = <span aria-hidden>{firstLetterUpperCase}</span>\n } else {\n children = childrenProp\n }\n\n if (!avatarGroupContext && !hasLabel) {\n warn(\n `Avatar group required: An Avatar requires an Avatar.Group with label description as a parent component. This is to ensure correct semantic and accessibility.`\n )\n }\n\n validateDOMAttributes(allProps, props)\n\n const style = {\n '--background-color': getColor(backgroundColor),\n '--color': getColor(color),\n ...props?.style,\n } as React.CSSProperties\n\n return (\n <span\n className={classnames(\n 'dnb-avatar',\n `dnb-avatar--${variant || 'primary'}`,\n `dnb-avatar--size-${size || 'medium'}`,\n skeletonClasses,\n spacingClasses,\n className\n )}\n {...props}\n style={style}\n >\n {childrenIsString && (\n <span className=\"dnb-sr-only\">{childrenProp}</span>\n )}\n {children}\n </span>\n )\n}\n\nAvatar.Group = AvatarGroup\n\nexport { AvatarGroup }\n\nAvatar._supportsSpacingProps = true\n\nexport default Avatar\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AAGA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AAGA,IAAAI,IAAA,GAAAL,sBAAA,CAAAC,OAAA;AAGA,IAAAK,QAAA,GAAAN,sBAAA,CAAAC,OAAA;AAGA,IAAAM,gBAAA,GAAAN,OAAA;AAOA,IAAAO,YAAA,GAAAC,uBAAA,CAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAA+C,MAAAU,SAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,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AAM,CAACmC,KAAK,GAAGC,oBAAW;AAI1BpC,MAAM,CAACqC,qBAAqB,GAAG,IAAI;AAAA,IAAAC,QAAA,GAAA1C,OAAA,CAAA/C,OAAA,GAEpBmD,MAAM","ignoreList":[]}
|
|
@@ -42,7 +42,7 @@ const CheckboxProperties = exports.CheckboxProperties = {
|
|
|
42
42
|
},
|
|
43
43
|
status: {
|
|
44
44
|
doc: '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.',
|
|
45
|
-
type: '
|
|
45
|
+
type: ['error', 'info', 'boolean'],
|
|
46
46
|
status: 'optional'
|
|
47
47
|
},
|
|
48
48
|
statusState: {
|
|
@@ -72,7 +72,7 @@ const CheckboxProperties = exports.CheckboxProperties = {
|
|
|
72
72
|
},
|
|
73
73
|
innerRef: {
|
|
74
74
|
doc: 'By providing a React.ref we can get the internally used input element (DOM). E.g. `innerRef={myRef}` by using `React.createRef()` or `React.useRef()`.',
|
|
75
|
-
type: 'React.
|
|
75
|
+
type: 'React.RefObject',
|
|
76
76
|
status: 'optional'
|
|
77
77
|
},
|
|
78
78
|
'[Space](/uilib/layout/space/properties)': {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxDocs.js","names":["CheckboxProperties","exports","checked","doc","type","status","title","label","labelPosition","labelSrOnly","size","indeterminate","statusState","statusProps","globalStatus","skeleton","suffix","innerRef","CheckboxEvents","onChange"],"sources":["../../../../src/components/checkbox/CheckboxDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const CheckboxProperties: PropertiesTableProps = {\n checked: {\n doc: 'Determine whether the checkbox is checked or not. The default is `false`.',\n type: 'boolean',\n status: 'optional',\n },\n title: {\n doc: 'The `title` of the input - describing it a bit further for accessibility reasons.',\n type: 'ReactNode',\n status: 'optional',\n },\n label: {\n doc: 'Use either the `label` property or provide a custom one.',\n type: 'ReactNode',\n status: 'optional',\n },\n labelPosition: {\n doc: 'Defines the position of the `label`. Use either `left` or `right`. Defaults to `right`.',\n type: 'string',\n status: 'optional',\n },\n labelSrOnly: {\n doc: 'Use `true` to make the label only readable by screen readers.',\n type: 'string',\n status: 'optional',\n },\n size: {\n doc: 'The size of the checkbox. For now there is \"medium\" (default) and \"large\".',\n type: ['string', 'number'],\n status: 'optional',\n },\n indeterminate: {\n doc: 'Controls the checkbox indeterminate (partial) state.',\n type: 'boolean',\n status: 'optional',\n },\n status: {\n doc: '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 type: '
|
|
1
|
+
{"version":3,"file":"CheckboxDocs.js","names":["CheckboxProperties","exports","checked","doc","type","status","title","label","labelPosition","labelSrOnly","size","indeterminate","statusState","statusProps","globalStatus","skeleton","suffix","innerRef","CheckboxEvents","onChange"],"sources":["../../../../src/components/checkbox/CheckboxDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const CheckboxProperties: PropertiesTableProps = {\n checked: {\n doc: 'Determine whether the checkbox is checked or not. The default is `false`.',\n type: 'boolean',\n status: 'optional',\n },\n title: {\n doc: 'The `title` of the input - describing it a bit further for accessibility reasons.',\n type: 'ReactNode',\n status: 'optional',\n },\n label: {\n doc: 'Use either the `label` property or provide a custom one.',\n type: 'ReactNode',\n status: 'optional',\n },\n labelPosition: {\n doc: 'Defines the position of the `label`. Use either `left` or `right`. Defaults to `right`.',\n type: 'string',\n status: 'optional',\n },\n labelSrOnly: {\n doc: 'Use `true` to make the label only readable by screen readers.',\n type: 'string',\n status: 'optional',\n },\n size: {\n doc: 'The size of the checkbox. For now there is \"medium\" (default) and \"large\".',\n type: ['string', 'number'],\n status: 'optional',\n },\n indeterminate: {\n doc: 'Controls the checkbox indeterminate (partial) state.',\n type: 'boolean',\n status: 'optional',\n },\n status: {\n doc: '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 type: ['error', 'info', 'boolean'],\n status: 'optional',\n },\n statusState: {\n doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',\n type: ['error', 'info'],\n status: 'optional',\n },\n statusProps: {\n doc: 'Use an object to define additional FormStatus properties. See [FormStatus](/uilib/components/form-status/properties/)',\n type: 'FormStatusProps',\n status: 'optional',\n },\n globalStatus: {\n doc: 'The [configuration](/uilib/components/global-status/properties/#configuration-object) used for the target [GlobalStatus](/uilib/components/global-status)',\n type: 'object',\n status: 'optional',\n },\n skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the Checkbox more than the label. You can also send in a React component, so it gets wrapped inside the Checkbox component.',\n type: 'ReactNode',\n status: 'optional',\n },\n innerRef: {\n doc: 'By providing a React.ref we can get the internally used input element (DOM). E.g. `innerRef={myRef}` by using `React.createRef()` or `React.useRef()`.',\n type: 'React.RefObject',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n\nexport const CheckboxEvents: PropertiesTableProps = {\n onChange: {\n doc: 'Will be called on state changes made by the user.',\n type: '() => {checked: boolean; event: ChangeEvent}',\n status: 'optional',\n },\n}\n"],"mappings":";;;;;;AAEO,MAAMA,kBAAwC,GAAAC,OAAA,CAAAD,kBAAA,GAAG;EACtDE,OAAO,EAAE;IACPC,GAAG,EAAE,2EAA2E;IAChFC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDC,KAAK,EAAE;IACLH,GAAG,EAAE,mFAAmF;IACxFC,IAAI,EAAE,WAAW;IACjBC,MAAM,EAAE;EACV,CAAC;EACDE,KAAK,EAAE;IACLJ,GAAG,EAAE,0DAA0D;IAC/DC,IAAI,EAAE,WAAW;IACjBC,MAAM,EAAE;EACV,CAAC;EACDG,aAAa,EAAE;IACbL,GAAG,EAAE,yFAAyF;IAC9FC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDI,WAA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M,MAAMa,cAAoC,GAAAjB,OAAA,CAAAiB,cAAA,GAAG;EAClDC,QAAQ,EAAE;IACRhB,GAAG,EAAE,mDAAmD;IACxDC,IAAI,EAAE,8CAA8C;IACpDC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
|
|
@@ -13,7 +13,6 @@ export type DatePickerContextValues = ContextProps & DatePickerDates & {
|
|
|
13
13
|
props: DatePickerAllProps;
|
|
14
14
|
translation: ContextProps['translation'];
|
|
15
15
|
views: Array<CalendarView>;
|
|
16
|
-
hasHadValidDate: boolean;
|
|
17
16
|
previousDateProps: DatePickerDateProps;
|
|
18
17
|
updateDates: (dates: DatePickerDates, callback?: (dates: DatePickerDates) => void) => void;
|
|
19
18
|
setState?: (state: DatePickerProviderState) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePickerContext.js","names":["_react","_interopRequireDefault","require","e","__esModule","default","DatePickerContext","React","createContext","_default","exports"],"sources":["../../../../src/components/date-picker/DatePickerContext.ts"],"sourcesContent":["/**\n * Web DatePicker Context\n *\n */\n\nimport React from 'react'\nimport { DatePickerAllProps, DisplayPickerEvent } from './DatePicker'\nimport { ContextProps } from '../../shared/Context'\nimport {\n DatePickerChangeEvent,\n DatePickerProviderState,\n GetReturnObjectParams,\n ReturnObject,\n} from './DatePickerProvider'\nimport { DatePickerDateProps, DatePickerDates } from './hooks/useDates'\nimport { CalendarView } from './hooks/useViews'\n\nexport type DateType = Date | string\n\nexport type DatePickerContextValues = ContextProps &\n DatePickerDates & {\n props: DatePickerAllProps\n translation: ContextProps['translation']\n views: Array<CalendarView>\n
|
|
1
|
+
{"version":3,"file":"DatePickerContext.js","names":["_react","_interopRequireDefault","require","e","__esModule","default","DatePickerContext","React","createContext","_default","exports"],"sources":["../../../../src/components/date-picker/DatePickerContext.ts"],"sourcesContent":["/**\n * Web DatePicker Context\n *\n */\n\nimport React from 'react'\nimport { DatePickerAllProps, DisplayPickerEvent } from './DatePicker'\nimport { ContextProps } from '../../shared/Context'\nimport {\n DatePickerChangeEvent,\n DatePickerProviderState,\n GetReturnObjectParams,\n ReturnObject,\n} from './DatePickerProvider'\nimport { DatePickerDateProps, DatePickerDates } from './hooks/useDates'\nimport { CalendarView } from './hooks/useViews'\n\nexport type DateType = Date | string\n\nexport type DatePickerContextValues = ContextProps &\n DatePickerDates & {\n props: DatePickerAllProps\n translation: ContextProps['translation']\n views: Array<CalendarView>\n previousDateProps: DatePickerDateProps\n updateDates: (\n dates: DatePickerDates,\n callback?: (dates: DatePickerDates) => void\n ) => void\n setState?: (state: DatePickerProviderState) => void\n setViews: (views: Array<CalendarView>, callback?: () => void) => void\n setHasClickedCalendarDay: (hasClicked: boolean) => void\n callOnChangeHandler: <E>(event: DatePickerChangeEvent<E>) => void\n hidePicker: (event: DisplayPickerEvent) => void\n getReturnObject: <E>(\n params: GetReturnObjectParams<E>\n ) => ReturnObject<E>\n }\n\nconst DatePickerContext = React.createContext<DatePickerContextValues>(\n {} as DatePickerContextValues\n)\n\nexport default DatePickerContext\n"],"mappings":";;;;;;AAKA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAyB,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAkCzB,MAAMG,iBAAiB,GAAGC,cAAK,CAACC,aAAa,CAC3C,CAAC,CACH,CAAC;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAL,OAAA,GAEcC,iBAAiB","ignoreList":[]}
|
|
@@ -183,7 +183,7 @@ const DatePickerProperties = exports.DatePickerProperties = {
|
|
|
183
183
|
},
|
|
184
184
|
status: {
|
|
185
185
|
doc: '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.',
|
|
186
|
-
type: '
|
|
186
|
+
type: ['error', 'info', 'boolean'],
|
|
187
187
|
status: 'optional'
|
|
188
188
|
},
|
|
189
189
|
statusState: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePickerDocs.js","names":["dateType","DatePickerProperties","exports","date","doc","type","status","startDate","endDate","month","startMonth","endMonth","minDate","maxDate","dateFormat","returnFormat","range","showInput","maskOrder","opened","maskPlaceholder","hideNavigation","hideDays","showSubmitButton","showCancelButton","showResetButton","link","sync","firstDay","alignPicker","skipPortal","onlyMonth","hideLastWeek","stretch","label","labelDirection","suffix","labelSrOnly","shortcuts","addonElement","inputElement","statusState","statusProps","disableAutofocus","correctInvalidDate","globalStatus","tooltip","skeleton","size","DatePickerEvents","onChange","onType","onSubmit","onCancel","onReset","onShow","onHide","onDaysRender","onFocus","onBlur"],"sources":["../../../../src/components/date-picker/DatePickerDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nconst dateType = ['string', 'Date']\n\nexport const DatePickerProperties: PropertiesTableProps = {\n date: {\n doc: 'Defines the pre-filled date by either a JavaScript DateInstance or (ISO 8601) like `date=\"2019-05-05\"` and `content`.',\n type: dateType,\n status: 'optional',\n },\n startDate: {\n doc: 'To set the pre-filled starting date. Is used if `range={true}` is set to `true`. Defaults to `null`, showing the `maskPlaceholder`.',\n type: dateType,\n status: 'optional',\n },\n endDate: {\n doc: 'To set the pre-filled ending date. Is used if `range={true}` is set to `true`. Defaults to `null`, showing the `maskPlaceholder`',\n type: dateType,\n status: 'optional',\n },\n month: {\n doc: 'To display what month should be shown in the first calendar by default. Defaults to the `date` respective `startDate`.',\n type: dateType,\n status: 'optional',\n },\n startMonth: {\n doc: 'To display what month should be shown in the first calendar by default. Defaults to the `date` respective `startDate`.',\n type: dateType,\n status: 'optional',\n },\n endMonth: {\n doc: 'To display what month should be shown in the second calendar by default. Defaults to the `date` respective `startDate`.',\n type: dateType,\n status: 'optional',\n },\n minDate: {\n doc: 'To limit a date range to a minimum `startDate`. Defaults to `null`.',\n type: dateType,\n status: 'optional',\n },\n maxDate: {\n doc: 'To limit a date range to a maximum `endDate`. Defaults to `null`.',\n type: dateType,\n status: 'optional',\n },\n dateFormat: {\n doc: 'Defines how the property dates (`date`, `startDate` and `endDate`) should be parsed, e.g. `yyyy/MM/dd`. Defaults to `yyyy-MM-dd`.',\n type: 'string',\n status: 'optional',\n },\n returnFormat: {\n doc: 'Defines how the returned date, as a string, should be formatted as. Defaults to `yyyy-MM-dd`.',\n type: 'string',\n status: 'optional',\n },\n range: {\n doc:\n 'Defines if the date picker should support a range of two dates (starting and ending date).' +\n 'Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n showInput: {\n doc: 'If the input fields with the mask should be visible. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n maskOrder: {\n doc: 'To define the order of the masked placeholder input fields. Defaults to `dd/mm/yyyy`.',\n type: 'string',\n status: 'optional',\n },\n opened: {\n doc: 'To open the date-picker by default. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n maskPlaceholder: {\n doc: 'To display the placeholder on input. Defaults to `dd/mm/åååå`.',\n type: 'string',\n status: 'optional',\n },\n hideNavigation: {\n doc: 'If set to `true`, the navigation will be hidden. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n hideDays: {\n doc: 'If set to `true`, the week days will be hidden. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n showSubmitButton: {\n doc: 'If set to `true`, a submit button will be shown. You can change the default text by using `submitButtonText=\"Ok\"`. Defaults to `false`. If the `range` property is `true`, then the submit button is shown.',\n type: 'boolean',\n status: 'optional',\n },\n showCancelButton: {\n doc: 'If set to `true`, a cancel button will be shown. You can change the default text by using `cancelButtonText=\"Avbryt\"`. If the `range` property is `true`, then the cancel button is shown. Defaults to `false`',\n type: 'boolean',\n status: 'optional',\n },\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 `false`.',\n type: 'boolean',\n status: 'optional',\n },\n link: {\n doc: 'Link both calendars, once to the user is navigating between months. Only meant to use if the range is set to `true`. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n sync: {\n doc: 'Sync input values with the calendars views. Once the input values get changed, the calendar changes its views in sync. Defaults to `true`.',\n type: 'boolean',\n status: 'optional',\n },\n firstDay: {\n doc: 'To define the first day of the week. Defaults to `monday`.',\n type: [\n 'monday',\n 'tuesday',\n 'wednesday',\n 'thursday',\n 'friday',\n 'saturday',\n 'sunday',\n ],\n status: 'optional',\n },\n alignPicker: {\n doc: 'Use `right` to change the calendar alignment direction. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n skipPortal: {\n doc: ' If set to `true`, the calendar will not be rendered inside a react portal. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n onlyMonth: {\n doc: 'Use `true` to only show the defined month. Disables the month navigation possibility. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n hideLastWeek: {\n doc: 'Use `true` to only show the last week in the current month if it needs to be shown. The result is that there will mainly be shows five (5) weeks (rows) instead of six (6). Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n stretch: {\n doc: 'If set to `true`, then the date-picker input field will be 100% in `width`',\n type: 'boolean',\n status: 'optional',\n },\n label: {\n doc: 'A prepending label in sync with the date input field.',\n type: 'React.ReactNode',\n status: 'optional',\n },\n labelDirection: {\n doc: ' Use `label_direction=\"vertical\"` to change the label layout direction. Defaults to `horizontal`.',\n type: ['vertical', 'horizontal'],\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the DatePicker more than the label. You can also send in a React component, so it gets wrapped inside the DatePicker component.',\n type: 'React.ReactNode',\n status: 'optional',\n },\n labelSrOnly: {\n doc: 'Use `true` to make the label only readable by screen readers.',\n type: 'boolean',\n status: 'optional',\n },\n shortcuts: {\n doc: 'Gives you the possibility to set predefined dates and date ranges so the user can select these by one click. Define either a JSON or an object with the defined shortcuts. More info is below.',\n type: 'object',\n status: 'optional',\n },\n addonElement: {\n doc: 'Gives you the possibility to inject a React element showing up over the footer. Use it to customize `shortcuts`.',\n type: 'object',\n status: 'optional',\n },\n inputElement: {\n doc: 'Gives you the possibility to use a plain/vanilla `<input />` HTML element by defining it as a string `inputElement=\"input\"`, a React element, or a render function `inputElement={(internalProps) => (<Return />)}`. Can also be used in circumstances where the `react-text-mask` should not be used, e.g. in testing environments. Defaults to custom masked input.',\n type: 'React.ReactNode',\n status: 'optional',\n },\n status: {\n doc: '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 type: 'string | boolean',\n status: 'optional',\n },\n statusState: {\n doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',\n type: 'string',\n status: 'optional',\n },\n statusProps: {\n doc: 'Use an object to define additional FormStatus properties.',\n type: 'object',\n status: 'optional',\n },\n disableAutofocus: {\n doc: 'Once the date picker gets opened, there is a focus handling to ensure good accessibility. This can be disabled with this property. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n correctInvalidDate: {\n doc: 'Corrects the input date value to be the same as either `minDate` or `maxDate`, when the user types in a date that is either before or after one of these. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n globalStatus: {\n doc: 'The [configuration](/uilib/components/global-status/properties/#configuration-object) used for the target [GlobalStatus](/uilib/components/global-status).',\n type: 'object',\n status: 'optional',\n },\n tooltip: {\n doc: 'Provide a short Tooltip content that shows up on the picker button.',\n type: 'string',\n status: 'optional',\n },\n skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n size: {\n doc: 'The sizes you can choose is `small` (1.5rem), `default` (2rem), `medium` (2.5rem) and `large` (3rem) are supported component sizes. Defaults to `default` / `null`.',\n type: 'string',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n\nexport const DatePickerEvents: PropertiesTableProps = {\n onChange: {\n doc: 'Will be called on a date change event. Returns an object. See Returned Object below.',\n type: 'function',\n status: 'optional',\n },\n onType: {\n doc: 'Will be called on every input and date picker interaction. Returns an `object`. See Returned Object below.',\n type: 'function',\n status: 'optional',\n },\n onSubmit: {\n doc: 'Will be called once a user presses the submit button.',\n type: 'function',\n status: 'optional',\n },\n onCancel: {\n doc: 'Will be called once a user presses the cancel button.',\n type: 'function',\n status: 'optional',\n },\n onReset: {\n doc: 'Will be called once a user presses the reset button.',\n type: 'function',\n status: 'optional',\n },\n onShow: {\n doc: 'Will be called once date-picker is visible.',\n type: 'function',\n status: 'optional',\n },\n onHide: {\n doc: 'Will be called once date-picker is hidden.',\n type: 'function',\n status: 'optional',\n },\n onDaysRender: {\n doc: 'Will be called right before every new calendar view gets rendered. See the example above.',\n type: 'function',\n status: 'optional',\n },\n onFocus: {\n doc: 'Will be called once the input gets focus.',\n type: 'function',\n status: 'optional',\n },\n onBlur: {\n doc: 'Will be called once the input lose focus.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":";;;;;;AAEA,MAAMA,QAAQ,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC;AAE5B,MAAMC,oBAA0C,GAAAC,OAAA,CAAAD,oBAAA,GAAG;EACxDE,IAAI,EAAE;IACJC,GAAG,EAAE,uHAAuH;IAC5HC,IAAI,EAAEL,QAAQ;IACdM,MAAM,EAAE;EACV,CAAC;EACDC,SAAS,EAAE;IACTH,GAAG,EAAE,qIAAqI;IAC1IC,IAAI,EAAEL,QAAQ;IACdM,MAAM,EAAE;EACV,CAAC;EACDE,OAAO,EAAE;IACPJ,GAAG,EAAE,kIAAkI;IACvIC,IAAI,EAAEL,QAAQ;IACdM,MAAM,EAAE;EACV,CAAC;EACDG,KAAK,EAAE;IACLL,GAAG,EAAE,wHAAwH;IAC7HC,IAAI,EAAEL,QAAQ;IACdM,MAAM,EAAE;EACV,CAAC;EACDI,UAAU,EAAE;IACVN,GAAG,EAAE,wHAAwH;IAC7HC,IAAI,EAAEL,QAAQ;IACdM,MAAM,EAAE;EACV,CAAC;EACDK,QAAQ,EAAE;IACRP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NpD,GAAG,EAAE,4CAA4C;IACjDC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDmD,YAAY,EAAE;IACZrD,GAAG,EAAE,2FAA2F;IAChGC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDoD,OAAO,EAAE;IACPtD,GAAG,EAAE,2CAA2C;IAChDC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDqD,MAAM,EAAE;IACNvD,GAAG,EAAE,2CAA2C;IAChDC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"DatePickerDocs.js","names":["dateType","DatePickerProperties","exports","date","doc","type","status","startDate","endDate","month","startMonth","endMonth","minDate","maxDate","dateFormat","returnFormat","range","showInput","maskOrder","opened","maskPlaceholder","hideNavigation","hideDays","showSubmitButton","showCancelButton","showResetButton","link","sync","firstDay","alignPicker","skipPortal","onlyMonth","hideLastWeek","stretch","label","labelDirection","suffix","labelSrOnly","shortcuts","addonElement","inputElement","statusState","statusProps","disableAutofocus","correctInvalidDate","globalStatus","tooltip","skeleton","size","DatePickerEvents","onChange","onType","onSubmit","onCancel","onReset","onShow","onHide","onDaysRender","onFocus","onBlur"],"sources":["../../../../src/components/date-picker/DatePickerDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nconst dateType = ['string', 'Date']\n\nexport const DatePickerProperties: PropertiesTableProps = {\n date: {\n doc: 'Defines the pre-filled date by either a JavaScript DateInstance or (ISO 8601) like `date=\"2019-05-05\"` and `content`.',\n type: dateType,\n status: 'optional',\n },\n startDate: {\n doc: 'To set the pre-filled starting date. Is used if `range={true}` is set to `true`. Defaults to `null`, showing the `maskPlaceholder`.',\n type: dateType,\n status: 'optional',\n },\n endDate: {\n doc: 'To set the pre-filled ending date. Is used if `range={true}` is set to `true`. Defaults to `null`, showing the `maskPlaceholder`',\n type: dateType,\n status: 'optional',\n },\n month: {\n doc: 'To display what month should be shown in the first calendar by default. Defaults to the `date` respective `startDate`.',\n type: dateType,\n status: 'optional',\n },\n startMonth: {\n doc: 'To display what month should be shown in the first calendar by default. Defaults to the `date` respective `startDate`.',\n type: dateType,\n status: 'optional',\n },\n endMonth: {\n doc: 'To display what month should be shown in the second calendar by default. Defaults to the `date` respective `startDate`.',\n type: dateType,\n status: 'optional',\n },\n minDate: {\n doc: 'To limit a date range to a minimum `startDate`. Defaults to `null`.',\n type: dateType,\n status: 'optional',\n },\n maxDate: {\n doc: 'To limit a date range to a maximum `endDate`. Defaults to `null`.',\n type: dateType,\n status: 'optional',\n },\n dateFormat: {\n doc: 'Defines how the property dates (`date`, `startDate` and `endDate`) should be parsed, e.g. `yyyy/MM/dd`. Defaults to `yyyy-MM-dd`.',\n type: 'string',\n status: 'optional',\n },\n returnFormat: {\n doc: 'Defines how the returned date, as a string, should be formatted as. Defaults to `yyyy-MM-dd`.',\n type: 'string',\n status: 'optional',\n },\n range: {\n doc:\n 'Defines if the date picker should support a range of two dates (starting and ending date).' +\n 'Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n showInput: {\n doc: 'If the input fields with the mask should be visible. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n maskOrder: {\n doc: 'To define the order of the masked placeholder input fields. Defaults to `dd/mm/yyyy`.',\n type: 'string',\n status: 'optional',\n },\n opened: {\n doc: 'To open the date-picker by default. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n maskPlaceholder: {\n doc: 'To display the placeholder on input. Defaults to `dd/mm/åååå`.',\n type: 'string',\n status: 'optional',\n },\n hideNavigation: {\n doc: 'If set to `true`, the navigation will be hidden. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n hideDays: {\n doc: 'If set to `true`, the week days will be hidden. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n showSubmitButton: {\n doc: 'If set to `true`, a submit button will be shown. You can change the default text by using `submitButtonText=\"Ok\"`. Defaults to `false`. If the `range` property is `true`, then the submit button is shown.',\n type: 'boolean',\n status: 'optional',\n },\n showCancelButton: {\n doc: 'If set to `true`, a cancel button will be shown. You can change the default text by using `cancelButtonText=\"Avbryt\"`. If the `range` property is `true`, then the cancel button is shown. Defaults to `false`',\n type: 'boolean',\n status: 'optional',\n },\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 `false`.',\n type: 'boolean',\n status: 'optional',\n },\n link: {\n doc: 'Link both calendars, once to the user is navigating between months. Only meant to use if the range is set to `true`. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n sync: {\n doc: 'Sync input values with the calendars views. Once the input values get changed, the calendar changes its views in sync. Defaults to `true`.',\n type: 'boolean',\n status: 'optional',\n },\n firstDay: {\n doc: 'To define the first day of the week. Defaults to `monday`.',\n type: [\n 'monday',\n 'tuesday',\n 'wednesday',\n 'thursday',\n 'friday',\n 'saturday',\n 'sunday',\n ],\n status: 'optional',\n },\n alignPicker: {\n doc: 'Use `right` to change the calendar alignment direction. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n skipPortal: {\n doc: ' If set to `true`, the calendar will not be rendered inside a react portal. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n onlyMonth: {\n doc: 'Use `true` to only show the defined month. Disables the month navigation possibility. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n hideLastWeek: {\n doc: 'Use `true` to only show the last week in the current month if it needs to be shown. The result is that there will mainly be shows five (5) weeks (rows) instead of six (6). Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n stretch: {\n doc: 'If set to `true`, then the date-picker input field will be 100% in `width`',\n type: 'boolean',\n status: 'optional',\n },\n label: {\n doc: 'A prepending label in sync with the date input field.',\n type: 'React.ReactNode',\n status: 'optional',\n },\n labelDirection: {\n doc: ' Use `label_direction=\"vertical\"` to change the label layout direction. Defaults to `horizontal`.',\n type: ['vertical', 'horizontal'],\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the DatePicker more than the label. You can also send in a React component, so it gets wrapped inside the DatePicker component.',\n type: 'React.ReactNode',\n status: 'optional',\n },\n labelSrOnly: {\n doc: 'Use `true` to make the label only readable by screen readers.',\n type: 'boolean',\n status: 'optional',\n },\n shortcuts: {\n doc: 'Gives you the possibility to set predefined dates and date ranges so the user can select these by one click. Define either a JSON or an object with the defined shortcuts. More info is below.',\n type: 'object',\n status: 'optional',\n },\n addonElement: {\n doc: 'Gives you the possibility to inject a React element showing up over the footer. Use it to customize `shortcuts`.',\n type: 'object',\n status: 'optional',\n },\n inputElement: {\n doc: 'Gives you the possibility to use a plain/vanilla `<input />` HTML element by defining it as a string `inputElement=\"input\"`, a React element, or a render function `inputElement={(internalProps) => (<Return />)}`. Can also be used in circumstances where the `react-text-mask` should not be used, e.g. in testing environments. Defaults to custom masked input.',\n type: 'React.ReactNode',\n status: 'optional',\n },\n status: {\n doc: '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 type: ['error', 'info', 'boolean'],\n status: 'optional',\n },\n statusState: {\n doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',\n type: 'string',\n status: 'optional',\n },\n statusProps: {\n doc: 'Use an object to define additional FormStatus properties.',\n type: 'object',\n status: 'optional',\n },\n disableAutofocus: {\n doc: 'Once the date picker gets opened, there is a focus handling to ensure good accessibility. This can be disabled with this property. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n correctInvalidDate: {\n doc: 'Corrects the input date value to be the same as either `minDate` or `maxDate`, when the user types in a date that is either before or after one of these. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n globalStatus: {\n doc: 'The [configuration](/uilib/components/global-status/properties/#configuration-object) used for the target [GlobalStatus](/uilib/components/global-status).',\n type: 'object',\n status: 'optional',\n },\n tooltip: {\n doc: 'Provide a short Tooltip content that shows up on the picker button.',\n type: 'string',\n status: 'optional',\n },\n skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n size: {\n doc: 'The sizes you can choose is `small` (1.5rem), `default` (2rem), `medium` (2.5rem) and `large` (3rem) are supported component sizes. Defaults to `default` / `null`.',\n type: 'string',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n\nexport const DatePickerEvents: PropertiesTableProps = {\n onChange: {\n doc: 'Will be called on a date change event. Returns an object. See Returned Object below.',\n type: 'function',\n status: 'optional',\n },\n onType: {\n doc: 'Will be called on every input and date picker interaction. Returns an `object`. See Returned Object below.',\n type: 'function',\n status: 'optional',\n },\n onSubmit: {\n doc: 'Will be called once a user presses the submit button.',\n type: 'function',\n status: 'optional',\n },\n onCancel: {\n doc: 'Will be called once a user presses the cancel button.',\n type: 'function',\n status: 'optional',\n },\n onReset: {\n doc: 'Will be called once a user presses the reset button.',\n type: 'function',\n status: 'optional',\n },\n onShow: {\n doc: 'Will be called once date-picker is visible.',\n type: 'function',\n status: 'optional',\n },\n onHide: {\n doc: 'Will be called once date-picker is hidden.',\n type: 'function',\n status: 'optional',\n },\n onDaysRender: {\n doc: 'Will be called right before every new calendar view gets rendered. See the example above.',\n type: 'function',\n status: 'optional',\n },\n onFocus: {\n doc: 'Will be called once the input gets focus.',\n type: 'function',\n status: 'optional',\n },\n onBlur: {\n doc: 'Will be called once the input lose focus.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":";;;;;;AAEA,MAAMA,QAAQ,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC;AAE5B,MAAMC,oBAA0C,GAAAC,OAAA,CAAAD,oBAAA,GAAG;EACxDE,IAAI,EAAE;IACJC,GAAG,EAAE,uHAAuH;IAC5HC,IAAI,EAAEL,QAAQ;IACdM,MAAM,EAAE;EACV,CAAC;EACDC,SAAS,EAAE;IACTH,GA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