@dnb/eufemia 10.73.2 → 10.74.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 +28 -0
- package/cjs/components/autocomplete/Autocomplete.js +7 -4
- package/cjs/components/autocomplete/Autocomplete.js.map +1 -1
- package/cjs/components/autocomplete/AutocompleteDocs.d.ts +289 -3
- package/cjs/components/autocomplete/AutocompleteDocs.js +2 -2
- package/cjs/components/autocomplete/AutocompleteDocs.js.map +1 -1
- package/cjs/components/button/style/dnb-button.css +1 -0
- package/cjs/components/button/style/dnb-button.min.css +1 -1
- package/cjs/components/button/style/dnb-button.scss +1 -0
- package/cjs/components/checkbox/Checkbox.d.ts +9 -1
- package/cjs/components/checkbox/Checkbox.js +59 -34
- package/cjs/components/checkbox/Checkbox.js.map +1 -1
- package/cjs/components/checkbox/CheckboxDocs.js +6 -1
- package/cjs/components/checkbox/CheckboxDocs.js.map +1 -1
- package/cjs/components/date-picker/DatePicker.d.ts +4 -0
- package/cjs/components/date-picker/DatePicker.js +4 -3
- package/cjs/components/date-picker/DatePicker.js.map +1 -1
- package/cjs/components/date-picker/DatePickerCalendar.d.ts +2 -16
- package/cjs/components/date-picker/DatePickerCalendar.js +27 -86
- package/cjs/components/date-picker/DatePickerCalendar.js.map +1 -1
- package/cjs/components/date-picker/DatePickerCalendarNavigator.d.ts +37 -0
- package/cjs/components/date-picker/DatePickerCalendarNavigator.js +173 -0
- package/cjs/components/date-picker/DatePickerCalendarNavigator.js.map +1 -0
- package/cjs/components/date-picker/DatePickerContext.d.ts +3 -0
- package/cjs/components/date-picker/DatePickerContext.js.map +1 -1
- package/cjs/components/date-picker/DatePickerDocs.js +6 -1
- package/cjs/components/date-picker/DatePickerDocs.js.map +1 -1
- package/cjs/components/date-picker/DatePickerFooter.js +20 -17
- package/cjs/components/date-picker/DatePickerFooter.js.map +1 -1
- package/cjs/components/date-picker/DatePickerProvider.js +7 -0
- package/cjs/components/date-picker/DatePickerProvider.js.map +1 -1
- package/cjs/components/date-picker/DatePickerRange.js +2 -28
- package/cjs/components/date-picker/DatePickerRange.js.map +1 -1
- package/cjs/components/date-picker/hooks/useSubmittedDates.d.ts +7 -0
- package/cjs/components/date-picker/hooks/useSubmittedDates.js +19 -0
- package/cjs/components/date-picker/hooks/useSubmittedDates.js.map +1 -0
- package/cjs/components/date-picker/style/dnb-date-picker.css +1 -1
- package/cjs/components/date-picker/style/dnb-date-picker.min.css +1 -1
- package/cjs/components/date-picker/style/dnb-date-picker.scss +1 -1
- package/cjs/components/date-picker/style/themes/dnb-date-picker-theme-ui.css +17 -0
- package/cjs/components/date-picker/style/themes/dnb-date-picker-theme-ui.min.css +1 -1
- package/cjs/components/date-picker/style/themes/dnb-date-picker-theme-ui.scss +19 -0
- package/cjs/components/drawer/Drawer.js +1 -0
- package/cjs/components/drawer/Drawer.js.map +1 -1
- package/cjs/components/dropdown/Dropdown.js +6 -4
- package/cjs/components/dropdown/Dropdown.js.map +1 -1
- package/cjs/components/dropdown/DropdownDocs.d.ts +179 -3
- package/cjs/components/dropdown/DropdownDocs.js.map +1 -1
- package/cjs/components/heading/HeadingHelpers.js +9 -5
- package/cjs/components/heading/HeadingHelpers.js.map +1 -1
- package/cjs/components/icon/Icon.d.ts +2 -2
- package/cjs/components/input-masked/InputMaskedDocs.js +1 -1
- package/cjs/components/input-masked/InputMaskedDocs.js.map +1 -1
- package/cjs/components/input-masked/InputMaskedHooks.d.ts +1 -0
- package/cjs/components/input-masked/InputMaskedHooks.js +38 -6
- package/cjs/components/input-masked/InputMaskedHooks.js.map +1 -1
- package/cjs/components/input-masked/InputMaskedUtils.js +5 -4
- package/cjs/components/input-masked/InputMaskedUtils.js.map +1 -1
- package/cjs/components/number-format/NumberUtils.js +6 -4
- package/cjs/components/number-format/NumberUtils.js.map +1 -1
- package/cjs/components/switch/SwitchDocs.js +2 -2
- package/cjs/components/switch/SwitchDocs.js.map +1 -1
- package/cjs/extensions/forms/DataContext/Context.d.ts +1 -1
- package/cjs/extensions/forms/DataContext/Context.js.map +1 -1
- package/cjs/extensions/forms/DataContext/Provider/Provider.js +9 -0
- package/cjs/extensions/forms/DataContext/Provider/Provider.js.map +1 -1
- package/cjs/extensions/forms/Field/Boolean/Boolean.d.ts +1 -0
- package/cjs/extensions/forms/Field/Boolean/Boolean.js.map +1 -1
- package/cjs/extensions/forms/Field/Boolean/BooleanDocs.d.ts +1 -0
- package/cjs/extensions/forms/Field/Boolean/BooleanDocs.js +8 -1
- package/cjs/extensions/forms/Field/Boolean/BooleanDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/Date/Date.d.ts +1 -1
- package/cjs/extensions/forms/Field/Date/Date.js +1 -1
- package/cjs/extensions/forms/Field/Date/Date.js.map +1 -1
- package/cjs/extensions/forms/Field/Expiry/Expiry.js.map +1 -1
- package/cjs/extensions/forms/Field/Number/NumberDocs.js +1 -1
- package/cjs/extensions/forms/Field/Number/NumberDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/Provider/useFieldProvider.d.ts +3 -3
- package/cjs/extensions/forms/Field/SelectCountry/SelectCountryDocs.js +2 -2
- package/cjs/extensions/forms/Field/SelectCountry/SelectCountryDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/SelectCurrency/SelectCurrencyDocs.js +2 -2
- package/cjs/extensions/forms/Field/SelectCurrency/SelectCurrencyDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/Selection/Selection.d.ts +2 -0
- package/cjs/extensions/forms/Field/Selection/Selection.js +10 -9
- package/cjs/extensions/forms/Field/Selection/Selection.js.map +1 -1
- package/cjs/extensions/forms/Field/Toggle/Toggle.d.ts +7 -0
- package/cjs/extensions/forms/Field/Toggle/Toggle.js +24 -8
- package/cjs/extensions/forms/Field/Toggle/Toggle.js.map +1 -1
- package/cjs/extensions/forms/Field/Toggle/ToggleDocs.d.ts +1 -0
- package/cjs/extensions/forms/Field/Toggle/ToggleDocs.js +8 -1
- package/cjs/extensions/forms/Field/Toggle/ToggleDocs.js.map +1 -1
- package/cjs/extensions/forms/Form/Isolation/IsolatedContainer.d.ts +4 -0
- package/cjs/extensions/forms/Form/Isolation/IsolatedContainer.js +64 -0
- package/cjs/extensions/forms/Form/Isolation/IsolatedContainer.js.map +1 -0
- package/cjs/extensions/forms/Form/Isolation/Isolation.d.ts +16 -0
- package/cjs/extensions/forms/Form/Isolation/Isolation.js +39 -14
- package/cjs/extensions/forms/Form/Isolation/Isolation.js.map +1 -1
- package/cjs/extensions/forms/Form/Isolation/IsolationCommitButton.js +1 -1
- package/cjs/extensions/forms/Form/Isolation/IsolationCommitButton.js.map +1 -1
- package/cjs/extensions/forms/Form/Isolation/IsolationContext.d.ts +12 -0
- package/cjs/extensions/forms/Form/Isolation/IsolationContext.js +11 -0
- package/cjs/extensions/forms/Form/Isolation/IsolationContext.js.map +1 -0
- package/cjs/extensions/forms/Form/Isolation/IsolationDataReference.d.ts +9 -0
- package/cjs/extensions/forms/Form/Isolation/IsolationDataReference.js +31 -0
- package/cjs/extensions/forms/Form/Isolation/IsolationDataReference.js.map +1 -0
- package/cjs/extensions/forms/Form/Isolation/IsolationDocs.js +15 -0
- package/cjs/extensions/forms/Form/Isolation/IsolationDocs.js.map +1 -1
- package/cjs/extensions/forms/Form/Isolation/IsolationResetButton.d.ts +7 -0
- package/cjs/extensions/forms/Form/Isolation/IsolationResetButton.js +112 -0
- package/cjs/extensions/forms/Form/Isolation/IsolationResetButton.js.map +1 -0
- package/cjs/extensions/forms/Form/Isolation/useDataContextSnapshot.d.ts +7 -0
- package/cjs/extensions/forms/Form/Isolation/useDataContextSnapshot.js +58 -0
- package/cjs/extensions/forms/Form/Isolation/useDataContextSnapshot.js.map +1 -0
- package/cjs/extensions/forms/Form/Isolation/useHandleStatus.d.ts +9 -0
- package/cjs/extensions/forms/Form/Isolation/useHandleStatus.js +57 -0
- package/cjs/extensions/forms/Form/Isolation/useHandleStatus.js.map +1 -0
- package/cjs/extensions/forms/{Iterate/EditContainer → Form/Isolation}/useHasContentChanged.js +11 -9
- package/cjs/extensions/forms/Form/Isolation/useHasContentChanged.js.map +1 -0
- package/cjs/extensions/forms/Form/Snapshot/Snapshot.d.ts +2 -1
- package/cjs/extensions/forms/Form/Snapshot/Snapshot.js.map +1 -1
- package/cjs/extensions/forms/Iterate/EditContainer/ResetButton.js +1 -1
- package/cjs/extensions/forms/Iterate/EditContainer/ResetButton.js.map +1 -1
- package/cjs/extensions/forms/Iterate/EditContainer/index.d.ts +1 -1
- package/cjs/extensions/forms/Iterate/EditContainer/index.js +1 -1
- package/cjs/extensions/forms/Iterate/EditContainer/index.js.map +1 -1
- package/cjs/extensions/forms/Iterate/PushContainer/PushContainer.d.ts +7 -0
- package/cjs/extensions/forms/Iterate/PushContainer/PushContainer.js +15 -56
- package/cjs/extensions/forms/Iterate/PushContainer/PushContainer.js.map +1 -1
- package/cjs/extensions/forms/Iterate/PushContainer/PushContainerDocs.js +2 -2
- package/cjs/extensions/forms/Iterate/PushContainer/PushContainerDocs.js.map +1 -1
- package/cjs/extensions/forms/constants/locales/en-GB.d.ts +1 -1
- package/cjs/extensions/forms/constants/locales/en-GB.js +3 -3
- package/cjs/extensions/forms/constants/locales/en-GB.js.map +1 -1
- package/cjs/extensions/forms/constants/locales/en-US.d.ts +1 -1
- package/cjs/extensions/forms/constants/locales/index.d.ts +2 -2
- package/cjs/extensions/forms/constants/locales/nb-NO.d.ts +1 -1
- package/cjs/extensions/forms/constants/locales/nb-NO.js +3 -3
- package/cjs/extensions/forms/constants/locales/nb-NO.js.map +1 -1
- package/cjs/extensions/forms/constants/locales/sv-SE.d.ts +1 -1
- package/cjs/extensions/forms/constants/locales/sv-SE.js +3 -3
- package/cjs/extensions/forms/constants/locales/sv-SE.js.map +1 -1
- package/cjs/extensions/forms/hooks/useDataContext.js +5 -3
- package/cjs/extensions/forms/hooks/useDataContext.js.map +1 -1
- package/cjs/extensions/forms/hooks/useSnapshot.js +17 -14
- package/cjs/extensions/forms/hooks/useSnapshot.js.map +1 -1
- package/cjs/fragments/drawer-list/DrawerList.d.ts +176 -224
- package/cjs/fragments/drawer-list/DrawerList.js +70 -175
- package/cjs/fragments/drawer-list/DrawerList.js.map +1 -1
- package/cjs/fragments/drawer-list/DrawerListContext.d.ts +27 -2
- package/cjs/fragments/drawer-list/DrawerListContext.js.map +1 -1
- package/cjs/fragments/drawer-list/DrawerListDocs.d.ts +211 -4
- package/cjs/fragments/drawer-list/DrawerListDocs.js +2 -2
- package/cjs/fragments/drawer-list/DrawerListDocs.js.map +1 -1
- package/cjs/fragments/drawer-list/DrawerListHelpers.d.ts +85 -89
- package/cjs/fragments/drawer-list/DrawerListHelpers.js +52 -58
- package/cjs/fragments/drawer-list/DrawerListHelpers.js.map +1 -1
- package/cjs/fragments/drawer-list/DrawerListItem.d.ts +30 -0
- package/cjs/fragments/drawer-list/DrawerListItem.js +106 -0
- package/cjs/fragments/drawer-list/DrawerListItem.js.map +1 -0
- package/cjs/fragments/drawer-list/DrawerListPortal.d.ts +20 -30
- package/cjs/fragments/drawer-list/DrawerListPortal.js +93 -125
- package/cjs/fragments/drawer-list/DrawerListPortal.js.map +1 -1
- package/cjs/fragments/drawer-list/DrawerListProvider.d.ts +217 -11
- package/cjs/fragments/drawer-list/DrawerListProvider.js +11 -18
- package/cjs/fragments/drawer-list/DrawerListProvider.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/component-helper.d.ts +45 -48
- package/cjs/shared/component-helper.js +72 -201
- package/cjs/shared/component-helper.js.map +1 -1
- package/cjs/shared/helpers/withCamelCaseProps.d.ts +4 -5
- package/cjs/shared/helpers/withCamelCaseProps.js +7 -2
- package/cjs/shared/helpers/withCamelCaseProps.js.map +1 -1
- package/cjs/shared/legacy/component-helper-legacy.d.ts +19 -0
- package/cjs/shared/legacy/component-helper-legacy.js +202 -0
- package/cjs/shared/legacy/component-helper-legacy.js.map +1 -0
- package/cjs/shared/locales/en-GB.d.ts +1 -0
- package/cjs/shared/locales/en-GB.js +1 -0
- package/cjs/shared/locales/en-GB.js.map +1 -1
- package/cjs/shared/locales/en-US.js.map +1 -1
- package/cjs/shared/locales/index.d.ts +2 -0
- package/cjs/shared/locales/nb-NO.d.ts +1 -0
- package/cjs/shared/locales/nb-NO.js +2 -1
- package/cjs/shared/locales/nb-NO.js.map +1 -1
- package/cjs/shared/locales/sv-SE.d.ts +1 -0
- package/cjs/shared/locales/sv-SE.js +1 -0
- 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 +2 -1
- 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 +19 -1
- package/cjs/style/themes/theme-eiendom/eiendom-theme-components.min.css +2 -2
- package/cjs/style/themes/theme-sbanken/sbanken-theme-components.css +19 -1
- package/cjs/style/themes/theme-sbanken/sbanken-theme-components.min.css +2 -2
- package/cjs/style/themes/theme-ui/ui-theme-components.css +19 -1
- package/cjs/style/themes/theme-ui/ui-theme-components.min.css +2 -2
- package/components/autocomplete/Autocomplete.js +6 -3
- package/components/autocomplete/Autocomplete.js.map +1 -1
- package/components/autocomplete/AutocompleteDocs.d.ts +289 -3
- package/components/autocomplete/AutocompleteDocs.js +1 -1
- package/components/autocomplete/AutocompleteDocs.js.map +1 -1
- package/components/button/style/dnb-button.css +1 -0
- package/components/button/style/dnb-button.min.css +1 -1
- package/components/button/style/dnb-button.scss +1 -0
- package/components/checkbox/Checkbox.d.ts +9 -1
- package/components/checkbox/Checkbox.js +60 -35
- package/components/checkbox/Checkbox.js.map +1 -1
- package/components/checkbox/CheckboxDocs.js +6 -1
- package/components/checkbox/CheckboxDocs.js.map +1 -1
- package/components/date-picker/DatePicker.d.ts +4 -0
- package/components/date-picker/DatePicker.js +4 -3
- package/components/date-picker/DatePicker.js.map +1 -1
- package/components/date-picker/DatePickerCalendar.d.ts +2 -16
- package/components/date-picker/DatePickerCalendar.js +27 -86
- package/components/date-picker/DatePickerCalendar.js.map +1 -1
- package/components/date-picker/DatePickerCalendarNavigator.d.ts +37 -0
- package/components/date-picker/DatePickerCalendarNavigator.js +162 -0
- package/components/date-picker/DatePickerCalendarNavigator.js.map +1 -0
- package/components/date-picker/DatePickerContext.d.ts +3 -0
- package/components/date-picker/DatePickerContext.js.map +1 -1
- package/components/date-picker/DatePickerDocs.js +6 -1
- package/components/date-picker/DatePickerDocs.js.map +1 -1
- package/components/date-picker/DatePickerFooter.js +20 -17
- package/components/date-picker/DatePickerFooter.js.map +1 -1
- package/components/date-picker/DatePickerProvider.js +7 -0
- package/components/date-picker/DatePickerProvider.js.map +1 -1
- package/components/date-picker/DatePickerRange.js +2 -28
- package/components/date-picker/DatePickerRange.js.map +1 -1
- package/components/date-picker/hooks/useSubmittedDates.d.ts +7 -0
- package/components/date-picker/hooks/useSubmittedDates.js +14 -0
- package/components/date-picker/hooks/useSubmittedDates.js.map +1 -0
- package/components/date-picker/style/dnb-date-picker.css +1 -1
- package/components/date-picker/style/dnb-date-picker.min.css +1 -1
- package/components/date-picker/style/dnb-date-picker.scss +1 -1
- package/components/date-picker/style/themes/dnb-date-picker-theme-ui.css +17 -0
- package/components/date-picker/style/themes/dnb-date-picker-theme-ui.min.css +1 -1
- package/components/date-picker/style/themes/dnb-date-picker-theme-ui.scss +19 -0
- package/components/drawer/Drawer.js +1 -0
- package/components/drawer/Drawer.js.map +1 -1
- package/components/dropdown/Dropdown.js +6 -4
- package/components/dropdown/Dropdown.js.map +1 -1
- package/components/dropdown/DropdownDocs.d.ts +179 -3
- package/components/dropdown/DropdownDocs.js.map +1 -1
- package/components/heading/HeadingHelpers.js +9 -5
- package/components/heading/HeadingHelpers.js.map +1 -1
- package/components/icon/Icon.d.ts +2 -2
- package/components/input-masked/InputMaskedDocs.js +1 -1
- package/components/input-masked/InputMaskedDocs.js.map +1 -1
- package/components/input-masked/InputMaskedHooks.d.ts +1 -0
- package/components/input-masked/InputMaskedHooks.js +39 -7
- package/components/input-masked/InputMaskedHooks.js.map +1 -1
- package/components/input-masked/InputMaskedUtils.js +6 -5
- package/components/input-masked/InputMaskedUtils.js.map +1 -1
- package/components/number-format/NumberUtils.js +5 -4
- package/components/number-format/NumberUtils.js.map +1 -1
- package/components/switch/SwitchDocs.js +2 -2
- package/components/switch/SwitchDocs.js.map +1 -1
- package/es/components/autocomplete/Autocomplete.js +6 -3
- package/es/components/autocomplete/Autocomplete.js.map +1 -1
- package/es/components/autocomplete/AutocompleteDocs.d.ts +289 -3
- package/es/components/autocomplete/AutocompleteDocs.js +1 -1
- package/es/components/autocomplete/AutocompleteDocs.js.map +1 -1
- package/es/components/button/style/dnb-button.css +1 -0
- package/es/components/button/style/dnb-button.min.css +1 -1
- package/es/components/button/style/dnb-button.scss +1 -0
- package/es/components/checkbox/Checkbox.d.ts +9 -1
- package/es/components/checkbox/Checkbox.js +60 -35
- package/es/components/checkbox/Checkbox.js.map +1 -1
- package/es/components/checkbox/CheckboxDocs.js +6 -1
- package/es/components/checkbox/CheckboxDocs.js.map +1 -1
- package/es/components/date-picker/DatePicker.d.ts +4 -0
- package/es/components/date-picker/DatePicker.js +4 -3
- package/es/components/date-picker/DatePicker.js.map +1 -1
- package/es/components/date-picker/DatePickerCalendar.d.ts +2 -16
- package/es/components/date-picker/DatePickerCalendar.js +23 -80
- package/es/components/date-picker/DatePickerCalendar.js.map +1 -1
- package/es/components/date-picker/DatePickerCalendarNavigator.d.ts +37 -0
- package/es/components/date-picker/DatePickerCalendarNavigator.js +158 -0
- package/es/components/date-picker/DatePickerCalendarNavigator.js.map +1 -0
- package/es/components/date-picker/DatePickerContext.d.ts +3 -0
- package/es/components/date-picker/DatePickerContext.js.map +1 -1
- package/es/components/date-picker/DatePickerDocs.js +6 -1
- package/es/components/date-picker/DatePickerDocs.js.map +1 -1
- package/es/components/date-picker/DatePickerFooter.js +20 -17
- package/es/components/date-picker/DatePickerFooter.js.map +1 -1
- package/es/components/date-picker/DatePickerProvider.js +7 -0
- package/es/components/date-picker/DatePickerProvider.js.map +1 -1
- package/es/components/date-picker/DatePickerRange.js +2 -27
- package/es/components/date-picker/DatePickerRange.js.map +1 -1
- package/es/components/date-picker/hooks/useSubmittedDates.d.ts +7 -0
- package/es/components/date-picker/hooks/useSubmittedDates.js +14 -0
- package/es/components/date-picker/hooks/useSubmittedDates.js.map +1 -0
- package/es/components/date-picker/style/dnb-date-picker.css +1 -1
- package/es/components/date-picker/style/dnb-date-picker.min.css +1 -1
- package/es/components/date-picker/style/dnb-date-picker.scss +1 -1
- package/es/components/date-picker/style/themes/dnb-date-picker-theme-ui.css +17 -0
- package/es/components/date-picker/style/themes/dnb-date-picker-theme-ui.min.css +1 -1
- package/es/components/date-picker/style/themes/dnb-date-picker-theme-ui.scss +19 -0
- package/es/components/drawer/Drawer.js +1 -0
- package/es/components/drawer/Drawer.js.map +1 -1
- package/es/components/dropdown/Dropdown.js +6 -4
- package/es/components/dropdown/Dropdown.js.map +1 -1
- package/es/components/dropdown/DropdownDocs.d.ts +179 -3
- package/es/components/dropdown/DropdownDocs.js.map +1 -1
- package/es/components/heading/HeadingHelpers.js +9 -5
- package/es/components/heading/HeadingHelpers.js.map +1 -1
- package/es/components/icon/Icon.d.ts +2 -2
- package/es/components/input-masked/InputMaskedDocs.js +1 -1
- package/es/components/input-masked/InputMaskedDocs.js.map +1 -1
- package/es/components/input-masked/InputMaskedHooks.d.ts +1 -0
- package/es/components/input-masked/InputMaskedHooks.js +39 -7
- package/es/components/input-masked/InputMaskedHooks.js.map +1 -1
- package/es/components/input-masked/InputMaskedUtils.js +6 -5
- package/es/components/input-masked/InputMaskedUtils.js.map +1 -1
- package/es/components/number-format/NumberUtils.js +5 -4
- package/es/components/number-format/NumberUtils.js.map +1 -1
- package/es/components/switch/SwitchDocs.js +2 -2
- package/es/components/switch/SwitchDocs.js.map +1 -1
- package/es/extensions/forms/DataContext/Context.d.ts +1 -1
- package/es/extensions/forms/DataContext/Context.js.map +1 -1
- package/es/extensions/forms/DataContext/Provider/Provider.js +9 -0
- package/es/extensions/forms/DataContext/Provider/Provider.js.map +1 -1
- package/es/extensions/forms/Field/Boolean/Boolean.d.ts +1 -0
- package/es/extensions/forms/Field/Boolean/Boolean.js.map +1 -1
- package/es/extensions/forms/Field/Boolean/BooleanDocs.d.ts +1 -0
- package/es/extensions/forms/Field/Boolean/BooleanDocs.js +7 -0
- package/es/extensions/forms/Field/Boolean/BooleanDocs.js.map +1 -1
- package/es/extensions/forms/Field/Date/Date.d.ts +1 -1
- package/es/extensions/forms/Field/Date/Date.js +1 -1
- package/es/extensions/forms/Field/Date/Date.js.map +1 -1
- package/es/extensions/forms/Field/Expiry/Expiry.js.map +1 -1
- package/es/extensions/forms/Field/Number/NumberDocs.js +1 -1
- package/es/extensions/forms/Field/Number/NumberDocs.js.map +1 -1
- package/es/extensions/forms/Field/Provider/useFieldProvider.d.ts +3 -3
- package/es/extensions/forms/Field/SelectCountry/SelectCountryDocs.js +3 -3
- package/es/extensions/forms/Field/SelectCountry/SelectCountryDocs.js.map +1 -1
- package/es/extensions/forms/Field/SelectCurrency/SelectCurrencyDocs.js +3 -3
- package/es/extensions/forms/Field/SelectCurrency/SelectCurrencyDocs.js.map +1 -1
- package/es/extensions/forms/Field/Selection/Selection.d.ts +2 -0
- package/es/extensions/forms/Field/Selection/Selection.js +9 -8
- package/es/extensions/forms/Field/Selection/Selection.js.map +1 -1
- package/es/extensions/forms/Field/Toggle/Toggle.d.ts +7 -0
- package/es/extensions/forms/Field/Toggle/Toggle.js +24 -6
- package/es/extensions/forms/Field/Toggle/Toggle.js.map +1 -1
- package/es/extensions/forms/Field/Toggle/ToggleDocs.d.ts +1 -0
- package/es/extensions/forms/Field/Toggle/ToggleDocs.js +7 -0
- package/es/extensions/forms/Field/Toggle/ToggleDocs.js.map +1 -1
- package/es/extensions/forms/Form/Isolation/IsolatedContainer.d.ts +4 -0
- package/es/extensions/forms/Form/Isolation/IsolatedContainer.js +53 -0
- package/es/extensions/forms/Form/Isolation/IsolatedContainer.js.map +1 -0
- package/es/extensions/forms/Form/Isolation/Isolation.d.ts +16 -0
- package/es/extensions/forms/Form/Isolation/Isolation.js +40 -14
- package/es/extensions/forms/Form/Isolation/Isolation.js.map +1 -1
- package/es/extensions/forms/Form/Isolation/IsolationCommitButton.js +1 -1
- package/es/extensions/forms/Form/Isolation/IsolationCommitButton.js.map +1 -1
- package/es/extensions/forms/Form/Isolation/IsolationContext.d.ts +12 -0
- package/es/extensions/forms/Form/Isolation/IsolationContext.js +6 -0
- package/es/extensions/forms/Form/Isolation/IsolationContext.js.map +1 -0
- package/es/extensions/forms/Form/Isolation/IsolationDataReference.d.ts +9 -0
- package/es/extensions/forms/Form/Isolation/IsolationDataReference.js +25 -0
- package/es/extensions/forms/Form/Isolation/IsolationDataReference.js.map +1 -0
- package/es/extensions/forms/Form/Isolation/IsolationDocs.js +15 -0
- package/es/extensions/forms/Form/Isolation/IsolationDocs.js.map +1 -1
- package/es/extensions/forms/Form/Isolation/IsolationResetButton.d.ts +7 -0
- package/es/extensions/forms/Form/Isolation/IsolationResetButton.js +99 -0
- package/es/extensions/forms/Form/Isolation/IsolationResetButton.js.map +1 -0
- package/es/extensions/forms/Form/Isolation/useDataContextSnapshot.d.ts +7 -0
- package/es/extensions/forms/Form/Isolation/useDataContextSnapshot.js +50 -0
- package/es/extensions/forms/Form/Isolation/useDataContextSnapshot.js.map +1 -0
- package/es/extensions/forms/Form/Isolation/useHandleStatus.d.ts +9 -0
- package/es/extensions/forms/Form/Isolation/useHandleStatus.js +48 -0
- package/es/extensions/forms/Form/Isolation/useHandleStatus.js.map +1 -0
- package/es/extensions/forms/{Iterate/EditContainer → Form/Isolation}/useHasContentChanged.js +12 -10
- package/es/extensions/forms/Form/Isolation/useHasContentChanged.js.map +1 -0
- package/es/extensions/forms/Form/Snapshot/Snapshot.d.ts +2 -1
- package/es/extensions/forms/Form/Snapshot/Snapshot.js.map +1 -1
- package/es/extensions/forms/Iterate/EditContainer/ResetButton.js +1 -1
- package/es/extensions/forms/Iterate/EditContainer/ResetButton.js.map +1 -1
- package/es/extensions/forms/Iterate/EditContainer/index.d.ts +1 -1
- package/es/extensions/forms/Iterate/EditContainer/index.js +1 -1
- package/es/extensions/forms/Iterate/EditContainer/index.js.map +1 -1
- package/es/extensions/forms/Iterate/PushContainer/PushContainer.d.ts +7 -0
- package/es/extensions/forms/Iterate/PushContainer/PushContainer.js +16 -55
- package/es/extensions/forms/Iterate/PushContainer/PushContainer.js.map +1 -1
- package/es/extensions/forms/Iterate/PushContainer/PushContainerDocs.js +2 -2
- package/es/extensions/forms/Iterate/PushContainer/PushContainerDocs.js.map +1 -1
- package/es/extensions/forms/constants/locales/en-GB.d.ts +1 -1
- package/es/extensions/forms/constants/locales/en-GB.js +3 -3
- package/es/extensions/forms/constants/locales/en-GB.js.map +1 -1
- package/es/extensions/forms/constants/locales/en-US.d.ts +1 -1
- package/es/extensions/forms/constants/locales/index.d.ts +2 -2
- package/es/extensions/forms/constants/locales/nb-NO.d.ts +1 -1
- package/es/extensions/forms/constants/locales/nb-NO.js +3 -3
- package/es/extensions/forms/constants/locales/nb-NO.js.map +1 -1
- package/es/extensions/forms/constants/locales/sv-SE.d.ts +1 -1
- package/es/extensions/forms/constants/locales/sv-SE.js +3 -3
- package/es/extensions/forms/constants/locales/sv-SE.js.map +1 -1
- package/es/extensions/forms/hooks/useDataContext.js +5 -3
- package/es/extensions/forms/hooks/useDataContext.js.map +1 -1
- package/es/extensions/forms/hooks/useSnapshot.js +18 -15
- package/es/extensions/forms/hooks/useSnapshot.js.map +1 -1
- package/es/fragments/drawer-list/DrawerList.d.ts +176 -224
- package/es/fragments/drawer-list/DrawerList.js +72 -173
- package/es/fragments/drawer-list/DrawerList.js.map +1 -1
- package/es/fragments/drawer-list/DrawerListContext.d.ts +27 -2
- package/es/fragments/drawer-list/DrawerListContext.js.map +1 -1
- package/es/fragments/drawer-list/DrawerListDocs.d.ts +211 -4
- package/es/fragments/drawer-list/DrawerListDocs.js +2 -2
- package/es/fragments/drawer-list/DrawerListDocs.js.map +1 -1
- package/es/fragments/drawer-list/DrawerListHelpers.d.ts +85 -89
- package/es/fragments/drawer-list/DrawerListHelpers.js +45 -54
- package/es/fragments/drawer-list/DrawerListHelpers.js.map +1 -1
- package/es/fragments/drawer-list/DrawerListItem.d.ts +30 -0
- package/es/fragments/drawer-list/DrawerListItem.js +90 -0
- package/es/fragments/drawer-list/DrawerListItem.js.map +1 -0
- package/es/fragments/drawer-list/DrawerListPortal.d.ts +20 -30
- package/es/fragments/drawer-list/DrawerListPortal.js +88 -120
- package/es/fragments/drawer-list/DrawerListPortal.js.map +1 -1
- package/es/fragments/drawer-list/DrawerListProvider.d.ts +217 -11
- package/es/fragments/drawer-list/DrawerListProvider.js +33 -19
- package/es/fragments/drawer-list/DrawerListProvider.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/component-helper.d.ts +45 -48
- package/es/shared/component-helper.js +20 -183
- package/es/shared/component-helper.js.map +1 -1
- package/es/shared/helpers/withCamelCaseProps.d.ts +4 -5
- package/es/shared/helpers/withCamelCaseProps.js +7 -2
- package/es/shared/helpers/withCamelCaseProps.js.map +1 -1
- package/es/shared/legacy/component-helper-legacy.d.ts +19 -0
- package/es/shared/legacy/component-helper-legacy.js +180 -0
- package/es/shared/legacy/component-helper-legacy.js.map +1 -0
- package/es/shared/locales/en-GB.d.ts +1 -0
- package/es/shared/locales/en-GB.js +1 -0
- package/es/shared/locales/en-GB.js.map +1 -1
- package/es/shared/locales/en-US.js.map +1 -1
- package/es/shared/locales/index.d.ts +2 -0
- package/es/shared/locales/nb-NO.d.ts +1 -0
- package/es/shared/locales/nb-NO.js +2 -1
- package/es/shared/locales/nb-NO.js.map +1 -1
- package/es/shared/locales/sv-SE.d.ts +1 -0
- package/es/shared/locales/sv-SE.js +1 -0
- 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 +2 -1
- 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 +19 -1
- package/es/style/themes/theme-eiendom/eiendom-theme-components.min.css +2 -2
- package/es/style/themes/theme-sbanken/sbanken-theme-components.css +19 -1
- package/es/style/themes/theme-sbanken/sbanken-theme-components.min.css +2 -2
- package/es/style/themes/theme-ui/ui-theme-components.css +19 -1
- package/es/style/themes/theme-ui/ui-theme-components.min.css +2 -2
- 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 +2 -2
- package/esm/dnb-ui-lib.min.mjs +1 -1
- package/extensions/forms/DataContext/Context.d.ts +1 -1
- package/extensions/forms/DataContext/Context.js.map +1 -1
- package/extensions/forms/DataContext/Provider/Provider.js +9 -0
- package/extensions/forms/DataContext/Provider/Provider.js.map +1 -1
- package/extensions/forms/Field/Boolean/Boolean.d.ts +1 -0
- package/extensions/forms/Field/Boolean/Boolean.js.map +1 -1
- package/extensions/forms/Field/Boolean/BooleanDocs.d.ts +1 -0
- package/extensions/forms/Field/Boolean/BooleanDocs.js +7 -0
- package/extensions/forms/Field/Boolean/BooleanDocs.js.map +1 -1
- package/extensions/forms/Field/Date/Date.d.ts +1 -1
- package/extensions/forms/Field/Date/Date.js +1 -1
- package/extensions/forms/Field/Date/Date.js.map +1 -1
- package/extensions/forms/Field/Expiry/Expiry.js.map +1 -1
- package/extensions/forms/Field/Number/NumberDocs.js +1 -1
- package/extensions/forms/Field/Number/NumberDocs.js.map +1 -1
- package/extensions/forms/Field/Provider/useFieldProvider.d.ts +3 -3
- package/extensions/forms/Field/SelectCountry/SelectCountryDocs.js +3 -3
- package/extensions/forms/Field/SelectCountry/SelectCountryDocs.js.map +1 -1
- package/extensions/forms/Field/SelectCurrency/SelectCurrencyDocs.js +3 -3
- package/extensions/forms/Field/SelectCurrency/SelectCurrencyDocs.js.map +1 -1
- package/extensions/forms/Field/Selection/Selection.d.ts +2 -0
- package/extensions/forms/Field/Selection/Selection.js +10 -9
- package/extensions/forms/Field/Selection/Selection.js.map +1 -1
- package/extensions/forms/Field/Toggle/Toggle.d.ts +7 -0
- package/extensions/forms/Field/Toggle/Toggle.js +26 -9
- package/extensions/forms/Field/Toggle/Toggle.js.map +1 -1
- package/extensions/forms/Field/Toggle/ToggleDocs.d.ts +1 -0
- package/extensions/forms/Field/Toggle/ToggleDocs.js +7 -0
- package/extensions/forms/Field/Toggle/ToggleDocs.js.map +1 -1
- package/extensions/forms/Form/Isolation/IsolatedContainer.d.ts +4 -0
- package/extensions/forms/Form/Isolation/IsolatedContainer.js +54 -0
- package/extensions/forms/Form/Isolation/IsolatedContainer.js.map +1 -0
- package/extensions/forms/Form/Isolation/Isolation.d.ts +16 -0
- package/extensions/forms/Form/Isolation/Isolation.js +40 -15
- package/extensions/forms/Form/Isolation/Isolation.js.map +1 -1
- package/extensions/forms/Form/Isolation/IsolationCommitButton.js +1 -1
- package/extensions/forms/Form/Isolation/IsolationCommitButton.js.map +1 -1
- package/extensions/forms/Form/Isolation/IsolationContext.d.ts +12 -0
- package/extensions/forms/Form/Isolation/IsolationContext.js +6 -0
- package/extensions/forms/Form/Isolation/IsolationContext.js.map +1 -0
- package/extensions/forms/Form/Isolation/IsolationDataReference.d.ts +9 -0
- package/extensions/forms/Form/Isolation/IsolationDataReference.js +25 -0
- package/extensions/forms/Form/Isolation/IsolationDataReference.js.map +1 -0
- package/extensions/forms/Form/Isolation/IsolationDocs.js +15 -0
- package/extensions/forms/Form/Isolation/IsolationDocs.js.map +1 -1
- package/extensions/forms/Form/Isolation/IsolationResetButton.d.ts +7 -0
- package/extensions/forms/Form/Isolation/IsolationResetButton.js +100 -0
- package/extensions/forms/Form/Isolation/IsolationResetButton.js.map +1 -0
- package/extensions/forms/Form/Isolation/useDataContextSnapshot.d.ts +7 -0
- package/extensions/forms/Form/Isolation/useDataContextSnapshot.js +52 -0
- package/extensions/forms/Form/Isolation/useDataContextSnapshot.js.map +1 -0
- package/extensions/forms/Form/Isolation/useHandleStatus.d.ts +9 -0
- package/extensions/forms/Form/Isolation/useHandleStatus.js +51 -0
- package/extensions/forms/Form/Isolation/useHandleStatus.js.map +1 -0
- package/extensions/forms/{Iterate/EditContainer → Form/Isolation}/useHasContentChanged.js +12 -10
- package/extensions/forms/Form/Isolation/useHasContentChanged.js.map +1 -0
- package/extensions/forms/Form/Snapshot/Snapshot.d.ts +2 -1
- package/extensions/forms/Form/Snapshot/Snapshot.js.map +1 -1
- package/extensions/forms/Iterate/EditContainer/ResetButton.js +1 -1
- package/extensions/forms/Iterate/EditContainer/ResetButton.js.map +1 -1
- package/extensions/forms/Iterate/EditContainer/index.d.ts +1 -1
- package/extensions/forms/Iterate/EditContainer/index.js +1 -1
- package/extensions/forms/Iterate/EditContainer/index.js.map +1 -1
- package/extensions/forms/Iterate/PushContainer/PushContainer.d.ts +7 -0
- package/extensions/forms/Iterate/PushContainer/PushContainer.js +16 -57
- package/extensions/forms/Iterate/PushContainer/PushContainer.js.map +1 -1
- package/extensions/forms/Iterate/PushContainer/PushContainerDocs.js +2 -2
- package/extensions/forms/Iterate/PushContainer/PushContainerDocs.js.map +1 -1
- package/extensions/forms/constants/locales/en-GB.d.ts +1 -1
- package/extensions/forms/constants/locales/en-GB.js +3 -3
- package/extensions/forms/constants/locales/en-GB.js.map +1 -1
- package/extensions/forms/constants/locales/en-US.d.ts +1 -1
- package/extensions/forms/constants/locales/index.d.ts +2 -2
- package/extensions/forms/constants/locales/nb-NO.d.ts +1 -1
- package/extensions/forms/constants/locales/nb-NO.js +3 -3
- package/extensions/forms/constants/locales/nb-NO.js.map +1 -1
- package/extensions/forms/constants/locales/sv-SE.d.ts +1 -1
- package/extensions/forms/constants/locales/sv-SE.js +3 -3
- package/extensions/forms/constants/locales/sv-SE.js.map +1 -1
- package/extensions/forms/hooks/useDataContext.js +5 -3
- package/extensions/forms/hooks/useDataContext.js.map +1 -1
- package/extensions/forms/hooks/useSnapshot.js +18 -15
- package/extensions/forms/hooks/useSnapshot.js.map +1 -1
- package/fragments/drawer-list/DrawerList.d.ts +176 -224
- package/fragments/drawer-list/DrawerList.js +71 -175
- package/fragments/drawer-list/DrawerList.js.map +1 -1
- package/fragments/drawer-list/DrawerListContext.d.ts +27 -2
- package/fragments/drawer-list/DrawerListContext.js.map +1 -1
- package/fragments/drawer-list/DrawerListDocs.d.ts +211 -4
- package/fragments/drawer-list/DrawerListDocs.js +2 -2
- package/fragments/drawer-list/DrawerListDocs.js.map +1 -1
- package/fragments/drawer-list/DrawerListHelpers.d.ts +85 -89
- package/fragments/drawer-list/DrawerListHelpers.js +45 -53
- package/fragments/drawer-list/DrawerListHelpers.js.map +1 -1
- package/fragments/drawer-list/DrawerListItem.d.ts +30 -0
- package/fragments/drawer-list/DrawerListItem.js +91 -0
- package/fragments/drawer-list/DrawerListItem.js.map +1 -0
- package/fragments/drawer-list/DrawerListPortal.d.ts +20 -30
- package/fragments/drawer-list/DrawerListPortal.js +91 -121
- package/fragments/drawer-list/DrawerListPortal.js.map +1 -1
- package/fragments/drawer-list/DrawerListProvider.d.ts +217 -11
- package/fragments/drawer-list/DrawerListProvider.js +12 -19
- package/fragments/drawer-list/DrawerListProvider.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/component-helper.d.ts +45 -48
- package/shared/component-helper.js +23 -189
- package/shared/component-helper.js.map +1 -1
- package/shared/helpers/withCamelCaseProps.d.ts +4 -5
- package/shared/helpers/withCamelCaseProps.js +7 -2
- package/shared/helpers/withCamelCaseProps.js.map +1 -1
- package/shared/legacy/component-helper-legacy.d.ts +19 -0
- package/shared/legacy/component-helper-legacy.js +185 -0
- package/shared/legacy/component-helper-legacy.js.map +1 -0
- package/shared/locales/en-GB.d.ts +1 -0
- package/shared/locales/en-GB.js +1 -0
- package/shared/locales/en-GB.js.map +1 -1
- package/shared/locales/en-US.js.map +1 -1
- package/shared/locales/index.d.ts +2 -0
- package/shared/locales/nb-NO.d.ts +1 -0
- package/shared/locales/nb-NO.js +2 -1
- package/shared/locales/nb-NO.js.map +1 -1
- package/shared/locales/sv-SE.d.ts +1 -0
- package/shared/locales/sv-SE.js +1 -0
- 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 +2 -1
- 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 +19 -1
- package/style/themes/theme-eiendom/eiendom-theme-components.min.css +2 -2
- package/style/themes/theme-sbanken/sbanken-theme-components.css +19 -1
- package/style/themes/theme-sbanken/sbanken-theme-components.min.css +2 -2
- package/style/themes/theme-ui/ui-theme-components.css +19 -1
- package/style/themes/theme-ui/ui-theme-components.min.css +2 -2
- 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/cjs/extensions/forms/Iterate/EditContainer/useHasContentChanged.js.map +0 -1
- package/es/extensions/forms/Iterate/EditContainer/useHasContentChanged.js.map +0 -1
- package/extensions/forms/Iterate/EditContainer/useHasContentChanged.js.map +0 -1
- /package/cjs/extensions/forms/{Iterate/EditContainer → Form/Isolation}/useHasContentChanged.d.ts +0 -0
- /package/es/extensions/forms/{Iterate/EditContainer → Form/Isolation}/useHasContentChanged.d.ts +0 -0
- /package/extensions/forms/{Iterate/EditContainer → Form/Isolation}/useHasContentChanged.d.ts +0 -0
|
@@ -1,3 +1,289 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export declare const AutocompleteProperties: {
|
|
2
|
+
mode: {
|
|
3
|
+
doc: string;
|
|
4
|
+
type: string;
|
|
5
|
+
status: "optional";
|
|
6
|
+
};
|
|
7
|
+
input_value: {
|
|
8
|
+
doc: string;
|
|
9
|
+
type: string;
|
|
10
|
+
status: "optional";
|
|
11
|
+
};
|
|
12
|
+
placeholder: {
|
|
13
|
+
doc: string;
|
|
14
|
+
type: string;
|
|
15
|
+
status: "optional";
|
|
16
|
+
};
|
|
17
|
+
title: {
|
|
18
|
+
doc: string;
|
|
19
|
+
type: string;
|
|
20
|
+
status: "optional";
|
|
21
|
+
};
|
|
22
|
+
disable_filter: {
|
|
23
|
+
doc: string;
|
|
24
|
+
type: string;
|
|
25
|
+
status: "optional";
|
|
26
|
+
};
|
|
27
|
+
disable_highlighting: {
|
|
28
|
+
doc: string;
|
|
29
|
+
type: string;
|
|
30
|
+
status: "optional";
|
|
31
|
+
};
|
|
32
|
+
disable_reorder: {
|
|
33
|
+
doc: string;
|
|
34
|
+
type: string;
|
|
35
|
+
status: "optional";
|
|
36
|
+
};
|
|
37
|
+
search_numbers: {
|
|
38
|
+
doc: string;
|
|
39
|
+
type: string;
|
|
40
|
+
status: "optional";
|
|
41
|
+
};
|
|
42
|
+
search_in_word_index: {
|
|
43
|
+
doc: string;
|
|
44
|
+
type: string;
|
|
45
|
+
status: "optional";
|
|
46
|
+
};
|
|
47
|
+
keep_value: {
|
|
48
|
+
doc: string;
|
|
49
|
+
type: string;
|
|
50
|
+
status: "optional";
|
|
51
|
+
};
|
|
52
|
+
keep_selection: {
|
|
53
|
+
doc: string;
|
|
54
|
+
type: string;
|
|
55
|
+
status: "optional";
|
|
56
|
+
};
|
|
57
|
+
keep_value_and_selection: {
|
|
58
|
+
doc: string;
|
|
59
|
+
type: string;
|
|
60
|
+
status: "optional";
|
|
61
|
+
};
|
|
62
|
+
prevent_selection: {
|
|
63
|
+
doc: string;
|
|
64
|
+
type: string;
|
|
65
|
+
status: "optional";
|
|
66
|
+
};
|
|
67
|
+
show_clear_button: {
|
|
68
|
+
doc: string;
|
|
69
|
+
type: string;
|
|
70
|
+
status: "optional";
|
|
71
|
+
};
|
|
72
|
+
icon: {
|
|
73
|
+
doc: string;
|
|
74
|
+
type: string[];
|
|
75
|
+
status: "optional";
|
|
76
|
+
};
|
|
77
|
+
icon_size: {
|
|
78
|
+
doc: string;
|
|
79
|
+
type: string;
|
|
80
|
+
status: "optional";
|
|
81
|
+
};
|
|
82
|
+
icon_position: {
|
|
83
|
+
doc: string;
|
|
84
|
+
type: string;
|
|
85
|
+
status: "optional";
|
|
86
|
+
};
|
|
87
|
+
input_icon: {
|
|
88
|
+
doc: string;
|
|
89
|
+
type: string[];
|
|
90
|
+
status: "optional";
|
|
91
|
+
};
|
|
92
|
+
triangle_position: {
|
|
93
|
+
doc: string;
|
|
94
|
+
type: string;
|
|
95
|
+
status: "optional";
|
|
96
|
+
};
|
|
97
|
+
size: {
|
|
98
|
+
doc: string;
|
|
99
|
+
type: string;
|
|
100
|
+
status: "optional";
|
|
101
|
+
};
|
|
102
|
+
drawer_class: {
|
|
103
|
+
doc: string;
|
|
104
|
+
type: string;
|
|
105
|
+
status: "optional";
|
|
106
|
+
};
|
|
107
|
+
show_submit_button: {
|
|
108
|
+
doc: string;
|
|
109
|
+
type: string;
|
|
110
|
+
status: "optional";
|
|
111
|
+
};
|
|
112
|
+
align_autocomplete: {
|
|
113
|
+
doc: string;
|
|
114
|
+
type: string;
|
|
115
|
+
status: "optional";
|
|
116
|
+
};
|
|
117
|
+
no_options: {
|
|
118
|
+
doc: string;
|
|
119
|
+
type: string;
|
|
120
|
+
status: "optional";
|
|
121
|
+
};
|
|
122
|
+
aria_live_options: {
|
|
123
|
+
doc: string;
|
|
124
|
+
type: string;
|
|
125
|
+
status: "optional";
|
|
126
|
+
};
|
|
127
|
+
show_all: {
|
|
128
|
+
doc: string;
|
|
129
|
+
type: string;
|
|
130
|
+
status: "optional";
|
|
131
|
+
};
|
|
132
|
+
indicator_label: {
|
|
133
|
+
doc: string;
|
|
134
|
+
type: string;
|
|
135
|
+
status: "optional";
|
|
136
|
+
};
|
|
137
|
+
show_options_sr: {
|
|
138
|
+
doc: string;
|
|
139
|
+
type: string;
|
|
140
|
+
status: "optional";
|
|
141
|
+
};
|
|
142
|
+
selected_sr: {
|
|
143
|
+
doc: string;
|
|
144
|
+
type: string;
|
|
145
|
+
status: "optional";
|
|
146
|
+
};
|
|
147
|
+
selectall: {
|
|
148
|
+
doc: string;
|
|
149
|
+
type: string;
|
|
150
|
+
status: "optional";
|
|
151
|
+
};
|
|
152
|
+
submit_button_title: {
|
|
153
|
+
doc: string;
|
|
154
|
+
type: string;
|
|
155
|
+
status: "optional";
|
|
156
|
+
};
|
|
157
|
+
submit_button_icon: {
|
|
158
|
+
doc: string;
|
|
159
|
+
type: string[];
|
|
160
|
+
status: "optional";
|
|
161
|
+
};
|
|
162
|
+
submit_element: {
|
|
163
|
+
doc: string;
|
|
164
|
+
type: string;
|
|
165
|
+
status: "optional";
|
|
166
|
+
};
|
|
167
|
+
opened: {
|
|
168
|
+
doc: string;
|
|
169
|
+
type: string;
|
|
170
|
+
status: "optional";
|
|
171
|
+
};
|
|
172
|
+
open_on_focus: {
|
|
173
|
+
doc: string;
|
|
174
|
+
type: string;
|
|
175
|
+
status: "optional";
|
|
176
|
+
};
|
|
177
|
+
stretch: {
|
|
178
|
+
doc: string;
|
|
179
|
+
type: string;
|
|
180
|
+
status: "optional";
|
|
181
|
+
};
|
|
182
|
+
skip_portal: {
|
|
183
|
+
doc: string;
|
|
184
|
+
type: string;
|
|
185
|
+
status: "optional";
|
|
186
|
+
};
|
|
187
|
+
status: {
|
|
188
|
+
doc: string;
|
|
189
|
+
type: string[];
|
|
190
|
+
status: "optional";
|
|
191
|
+
};
|
|
192
|
+
status_state: {
|
|
193
|
+
doc: string;
|
|
194
|
+
type: string[];
|
|
195
|
+
status: "optional";
|
|
196
|
+
};
|
|
197
|
+
status_props: {
|
|
198
|
+
doc: string;
|
|
199
|
+
type: string;
|
|
200
|
+
status: "optional";
|
|
201
|
+
};
|
|
202
|
+
globalStatus: {
|
|
203
|
+
doc: string;
|
|
204
|
+
type: string;
|
|
205
|
+
status: "optional";
|
|
206
|
+
};
|
|
207
|
+
label: {
|
|
208
|
+
doc: string;
|
|
209
|
+
type: string;
|
|
210
|
+
status: "optional";
|
|
211
|
+
};
|
|
212
|
+
label_direction: {
|
|
213
|
+
doc: string;
|
|
214
|
+
type: string;
|
|
215
|
+
status: "optional";
|
|
216
|
+
};
|
|
217
|
+
label_sr_only: {
|
|
218
|
+
doc: string;
|
|
219
|
+
type: string;
|
|
220
|
+
status: "optional";
|
|
221
|
+
};
|
|
222
|
+
suffix: {
|
|
223
|
+
doc: string;
|
|
224
|
+
type: string;
|
|
225
|
+
status: "optional";
|
|
226
|
+
};
|
|
227
|
+
skeleton: {
|
|
228
|
+
doc: string;
|
|
229
|
+
type: string;
|
|
230
|
+
status: "optional";
|
|
231
|
+
};
|
|
232
|
+
input_ref: {
|
|
233
|
+
doc: string;
|
|
234
|
+
type: string;
|
|
235
|
+
status: "optional";
|
|
236
|
+
};
|
|
237
|
+
input_element: {
|
|
238
|
+
doc: string;
|
|
239
|
+
type: string[];
|
|
240
|
+
status: "optional";
|
|
241
|
+
};
|
|
242
|
+
'[DrawerList](/uilib/components/fragments/drawer-list/properties)': {
|
|
243
|
+
doc: string;
|
|
244
|
+
type: string;
|
|
245
|
+
status: "optional";
|
|
246
|
+
};
|
|
247
|
+
'[Space](/uilib/layout/space/properties)': {
|
|
248
|
+
doc: string;
|
|
249
|
+
type: string[];
|
|
250
|
+
status: "optional";
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
export declare const AutocompleteEvents: {
|
|
254
|
+
on_type: {
|
|
255
|
+
doc: string;
|
|
256
|
+
type: string;
|
|
257
|
+
status: "optional";
|
|
258
|
+
};
|
|
259
|
+
on_focus: {
|
|
260
|
+
doc: string;
|
|
261
|
+
type: string;
|
|
262
|
+
status: "optional";
|
|
263
|
+
};
|
|
264
|
+
on_blur: {
|
|
265
|
+
doc: string;
|
|
266
|
+
type: string;
|
|
267
|
+
status: "optional";
|
|
268
|
+
};
|
|
269
|
+
on_change: {
|
|
270
|
+
doc: string;
|
|
271
|
+
type: string;
|
|
272
|
+
status: "optional";
|
|
273
|
+
};
|
|
274
|
+
on_select: {
|
|
275
|
+
doc: string;
|
|
276
|
+
type: string;
|
|
277
|
+
status: "optional";
|
|
278
|
+
};
|
|
279
|
+
on_show: {
|
|
280
|
+
doc: string;
|
|
281
|
+
type: string;
|
|
282
|
+
status: "optional";
|
|
283
|
+
};
|
|
284
|
+
on_hide: {
|
|
285
|
+
doc: string;
|
|
286
|
+
type: string;
|
|
287
|
+
status: "optional";
|
|
288
|
+
};
|
|
289
|
+
};
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
const
|
|
6
|
+
exports.AutocompleteProperties = exports.AutocompleteEvents = void 0;
|
|
7
|
+
const AutocompleteProperties = exports.AutocompleteProperties = {
|
|
8
8
|
mode: {
|
|
9
9
|
doc: 'If set to `async`, it prevents showing the "no options" message during typing / filtering. Defaults to `sync`.',
|
|
10
10
|
type: 'string',
|
|
@@ -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","selectall","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 selectall: {\n doc: 'If set to `true`, then the whole input value gets selected on the entry focus. A second click will place the cursor on the wanted position.',\n type: 'boolean',\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;IAC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CAAC;EACD,kEAAkE,EAAE;IAClEF,GAAG,EAAE,4BAA4B;IACjCC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACD,yCAAyC,EAAE;IACzCF,GAAG,EAAE,0DAA0D;IAC/DC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC1BC,MAAM,EAAE;EACV;AACF,CAAC;AAEM,MAAM+C,kBAAwC,GAAAnD,OAAA,CAAAmD,kBAAA,GAAG;EACtDC,OAAO,EAAE;IACPlD,GAAG,EAAE,8NAA8N;IACnOC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDiD,QAAQ,EAAE;IACRnD,GAAG,EAAE,yNAAyN;IAC9NC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDkD,OAAO,EAAE;IACPpD,GAAG,EAAE,wNAAwN;IAC7NC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDmD,SAAS,EAAE;IACTrD,GAAG,EAAE,sOAAsO;IAC3OC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDoD,SAAS,EAAE;IACTtD,GAAG,EAAE,8WAA8W;IACnXC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDqD,OAAO,EAAE;IACPvD,GAAG,EAAE,sGAAsG;IAC3GC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDsD,OAAO,EAAE;IACPxD,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","selectall","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 = {\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 selectall: {\n doc: 'If set to `true`, then the whole input value gets selected on the entry focus. A second click will place the cursor on the wanted position.',\n type: 'boolean',\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} satisfies PropertiesTableProps\n\nexport const AutocompleteEvents = {\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} satisfies PropertiesTableProps\n"],"mappings":";;;;;;AAEO,MAAMA,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG;EACpCE,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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,kBAAA,GAAG;EAChCC,OAAO,EAAE;IACPlD,GAAG,EAAE,8NAA8N;IACnOC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDiD,QAAQ,EAAE;IACRnD,GAAG,EAAE,yNAAyN;IAC9NC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDkD,OAAO,EAAE;IACPpD,GAAG,EAAE,wNAAwN;IAC7NC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDmD,SAAS,EAAE;IACTrD,GAAG,EAAE,sOAAsO;IAC3OC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDoD,SAAS,EAAE;IACTtD,GAAG,EAAE,8WAA8W;IACnXC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDqD,OAAO,EAAE;IACPvD,GAAG,EAAE,sGAAsG;IAC3GC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDsD,OAAO,EAAE;IACPxD,GAAG,EAAE,sIAAsI;IAC3IC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAgC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--button-icon-size:1rem;--button-height:2.5rem}.dnb-button{--button-font-size:var(--font-size-basis);--button-font-size-small:var(--font-size-small);--button-icon-size--small:0.75rem;--button-icon-size--medium:1.5rem;--button-icon-size--large:2rem;--button-icon-gutter:0.5rem;--button-width:2.5rem;--button-width--small:1.5rem;--button-height--small:1.5rem;--button-width--medium:2rem;--button-height--medium:2rem;--button-width--large:3rem;--button-height--large:3rem;--button-border-width:0.0625rem;--button-border-width--hover:0.1875rem;--button-border-radius:calc(var(--button-height)/2);--button-border-radius--control-button:0.25rem;--button-padding-left:0;--button-padding-right:0;--button-padding-icon:1rem;--button-padding--default:1.5rem;--button-padding--small:1rem;--button-padding--medium:1rem;--button-padding--large:2rem;--button-icon-margin-top:0;--button-icon-margin-left:0;--button-icon-margin-right:0;align-items:center;border:none;border-radius:var(--button-border-radius);box-shadow:none;cursor:pointer;display:inline-flex;font-size:var(--font-size-small);height:auto;justify-content:center;padding:0 var(--button-padding-right) 0 var(--button-padding-left);position:relative;text-align:left;-webkit-text-decoration:none;text-decoration:none;user-select:none;-webkit-user-select:none;white-space:nowrap;width:var(--button-width)}.dnb-button--wrap{overflow-wrap:break-word;white-space:normal}.dnb-button,.dnb-core-style .dnb-button{line-height:var(--button-height)}.dnb-button__text{color:inherit;font-size:var(--button-font-size);line-height:var(--line-height-basis);margin:.5rem 0;transform:translateY(-.03125rem)}.dnb-button__text [data-os=linux]{transform:translateY(-.035rem)}.dnb-button__alignment{display:inline-block;width:0}.dnb-button__bounding{background-color:transparent;border-radius:var(--button-border-radius);bottom:0;left:0;position:absolute;right:0;top:0;transform:scale(1.1,1.4)}.dnb-button--size-small{--button-height:var(--button-height--small);font-size:var(--button-font-size-small);width:var(--button-width--small)}.dnb-button--size-small .dnb-button__text{margin:0}.dnb-button--has-text.dnb-button--size-small{--button-padding-left:var(--button-padding--small);--button-padding-right:var(--button-padding--small)}.dnb-button--size-medium{--button-height:var(--button-height--medium);width:var(--button-width--medium)}.dnb-button--size-medium .dnb-button__text{margin:0}.dnb-button--has-text.dnb-button--size-medium{--button-padding-left:var(--button-padding--medium);--button-padding-right:var(--button-padding--medium)}.dnb-button--control-after.dnb-button--size-medium,.dnb-button--control-before.dnb-button--size-medium{line-height:var(--button-height)}.dnb-button--size-large{--button-height:var(--button-height--large);--button-padding-icon:1.5rem;width:var(--button-width--large)}.dnb-button--has-text.dnb-button--size-large{--button-padding-left:var(--button-padding--large);--button-padding-right:var(--button-padding--large)}.dnb-button--has-text{--button-padding-left:var(--button-padding--default);--button-padding-right:var(--button-padding--default);width:auto}.dnb-button__icon{margin:var(--button-icon-margin-top) var(--button-icon-margin-right) 0 var(--button-icon-margin-left)}.dnb-button--has-text.dnb-button--icon-position-left{--button-padding-left:var(--button-padding-icon);--button-icon-margin-right:var(--button-icon-gutter)}.dnb-button--has-text.dnb-button--icon-position-right{--button-padding-right:var(--button-padding-icon);--button-icon-margin-left:var(--button-icon-gutter)}.dnb-button--icon-size-small{--button-icon-size:var(--button-icon-size--small)}.dnb-button--icon-size-medium{--button-icon-size:var(--button-icon-size--medium)}.dnb-button--icon-size-large{--button-icon-size:var(--button-icon-size--large)}.dnb-button--has-text.dnb-button--has-icon .dnb-button__icon{order:2}.dnb-button--has-text.dnb-button--has-icon .dnb-button__text{order:1}.dnb-button:not(.dnb-button--has-text) .dnb-button__icon{width:inherit}.dnb-button__icon.dnb-icon svg:not([width]):not([height]){height:var(--button-icon-size);width:var(--button-icon-size)}[href]>.dnb-button__icon.dnb-icon{line-height:var(--button-font-size)}.dnb-button--has-text.dnb-button--has-icon.dnb-button--icon-position-left .dnb-button__icon,.dnb-button--has-text.dnb-button--has-icon.dnb-button--icon-position-top .dnb-button__icon{order:1}.dnb-button--has-text.dnb-button--has-icon.dnb-button--icon-position-left .dnb-button__text,.dnb-button--has-text.dnb-button--has-icon.dnb-button--icon-position-top .dnb-button__text{order:2}.dnb-button--stretch{width:100%}.dnb-button--control-before{border-radius:var(--button-border-radius--control-button) 0 0 var(--button-border-radius--control-button)}.dnb-button--control-after{border-radius:0 var(--button-border-radius--control-button) var(--button-border-radius--control-button) 0}.dnb-button--reset{-webkit-appearance:none;appearance:none;background-color:transparent;border:none;border-radius:0;box-shadow:none;color:inherit;font:inherit;height:auto;line-height:inherit;margin:0;overflow:visible;padding:0;text-align:inherit;width:auto}html:not([data-whatintent=touch]) .dnb-button--reset:hover[disabled]{cursor:not-allowed}html:not([data-whatintent=touch]) .dnb-button--reset:hover:not([disabled]){border:none;box-shadow:none}.dnb-button--reset:not([disabled]):active,.dnb-button--reset:not([disabled]):focus{outline:none}html[data-whatinput=keyboard] .dnb-button--reset:not([disabled]):active,html[data-whatinput=keyboard] .dnb-button--reset:not([disabled]):focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}html[data-whatinput=mouse] .dnb-button--reset:not([disabled]):active,html[data-whatinput=mouse] .dnb-button--reset:not([disabled]):focus{border:none;box-shadow:none;color:inherit}.dnb-button[type=button],.dnb-button[type=reset],.dnb-button[type=submit]{appearance:none;-moz-appearance:none;-webkit-appearance:none}.dnb-button[disabled]{cursor:not-allowed;outline:none}.dnb-form-row--vertical .dnb-form-row__content>.dnb-button{align-self:flex-start}.dnb-form-row--horizontal .dnb-form-row__content .dnb-button__text{white-space:nowrap}.dnb-button+.dnb-form-status{margin-top:.5rem}button.dnb-button::-moz-focus-inner{border:none}
|
|
1
|
+
:root{--button-icon-size:1rem;--button-height:2.5rem}.dnb-button{--button-font-size:var(--font-size-basis);--button-font-size-small:var(--font-size-small);--button-icon-size--small:0.75rem;--button-icon-size--medium:1.5rem;--button-icon-size--large:2rem;--button-icon-gutter:0.5rem;--button-width:2.5rem;--button-width--small:1.5rem;--button-height--small:1.5rem;--button-width--medium:2rem;--button-height--medium:2rem;--button-width--large:3rem;--button-height--large:3rem;--button-border-width:0.0625rem;--button-border-width--hover:0.1875rem;--button-border-radius:calc(var(--button-height)/2);--button-border-radius--control-button:0.25rem;--button-padding-left:0;--button-padding-right:0;--button-padding-icon:1rem;--button-padding--default:1.5rem;--button-padding--small:1rem;--button-padding--medium:1rem;--button-padding--large:2rem;--button-icon-margin-top:0;--button-icon-margin-left:0;--button-icon-margin-right:0;align-items:center;border:none;border-radius:var(--button-border-radius);box-shadow:none;cursor:pointer;display:inline-flex;font-size:var(--font-size-small);font-weight:var(--font-weight-regular);height:auto;justify-content:center;padding:0 var(--button-padding-right) 0 var(--button-padding-left);position:relative;text-align:left;-webkit-text-decoration:none;text-decoration:none;user-select:none;-webkit-user-select:none;white-space:nowrap;width:var(--button-width)}.dnb-button--wrap{overflow-wrap:break-word;white-space:normal}.dnb-button,.dnb-core-style .dnb-button{line-height:var(--button-height)}.dnb-button__text{color:inherit;font-size:var(--button-font-size);line-height:var(--line-height-basis);margin:.5rem 0;transform:translateY(-.03125rem)}.dnb-button__text [data-os=linux]{transform:translateY(-.035rem)}.dnb-button__alignment{display:inline-block;width:0}.dnb-button__bounding{background-color:transparent;border-radius:var(--button-border-radius);bottom:0;left:0;position:absolute;right:0;top:0;transform:scale(1.1,1.4)}.dnb-button--size-small{--button-height:var(--button-height--small);font-size:var(--button-font-size-small);width:var(--button-width--small)}.dnb-button--size-small .dnb-button__text{margin:0}.dnb-button--has-text.dnb-button--size-small{--button-padding-left:var(--button-padding--small);--button-padding-right:var(--button-padding--small)}.dnb-button--size-medium{--button-height:var(--button-height--medium);width:var(--button-width--medium)}.dnb-button--size-medium .dnb-button__text{margin:0}.dnb-button--has-text.dnb-button--size-medium{--button-padding-left:var(--button-padding--medium);--button-padding-right:var(--button-padding--medium)}.dnb-button--control-after.dnb-button--size-medium,.dnb-button--control-before.dnb-button--size-medium{line-height:var(--button-height)}.dnb-button--size-large{--button-height:var(--button-height--large);--button-padding-icon:1.5rem;width:var(--button-width--large)}.dnb-button--has-text.dnb-button--size-large{--button-padding-left:var(--button-padding--large);--button-padding-right:var(--button-padding--large)}.dnb-button--has-text{--button-padding-left:var(--button-padding--default);--button-padding-right:var(--button-padding--default);width:auto}.dnb-button__icon{margin:var(--button-icon-margin-top) var(--button-icon-margin-right) 0 var(--button-icon-margin-left)}.dnb-button--has-text.dnb-button--icon-position-left{--button-padding-left:var(--button-padding-icon);--button-icon-margin-right:var(--button-icon-gutter)}.dnb-button--has-text.dnb-button--icon-position-right{--button-padding-right:var(--button-padding-icon);--button-icon-margin-left:var(--button-icon-gutter)}.dnb-button--icon-size-small{--button-icon-size:var(--button-icon-size--small)}.dnb-button--icon-size-medium{--button-icon-size:var(--button-icon-size--medium)}.dnb-button--icon-size-large{--button-icon-size:var(--button-icon-size--large)}.dnb-button--has-text.dnb-button--has-icon .dnb-button__icon{order:2}.dnb-button--has-text.dnb-button--has-icon .dnb-button__text{order:1}.dnb-button:not(.dnb-button--has-text) .dnb-button__icon{width:inherit}.dnb-button__icon.dnb-icon svg:not([width]):not([height]){height:var(--button-icon-size);width:var(--button-icon-size)}[href]>.dnb-button__icon.dnb-icon{line-height:var(--button-font-size)}.dnb-button--has-text.dnb-button--has-icon.dnb-button--icon-position-left .dnb-button__icon,.dnb-button--has-text.dnb-button--has-icon.dnb-button--icon-position-top .dnb-button__icon{order:1}.dnb-button--has-text.dnb-button--has-icon.dnb-button--icon-position-left .dnb-button__text,.dnb-button--has-text.dnb-button--has-icon.dnb-button--icon-position-top .dnb-button__text{order:2}.dnb-button--stretch{width:100%}.dnb-button--control-before{border-radius:var(--button-border-radius--control-button) 0 0 var(--button-border-radius--control-button)}.dnb-button--control-after{border-radius:0 var(--button-border-radius--control-button) var(--button-border-radius--control-button) 0}.dnb-button--reset{-webkit-appearance:none;appearance:none;background-color:transparent;border:none;border-radius:0;box-shadow:none;color:inherit;font:inherit;height:auto;line-height:inherit;margin:0;overflow:visible;padding:0;text-align:inherit;width:auto}html:not([data-whatintent=touch]) .dnb-button--reset:hover[disabled]{cursor:not-allowed}html:not([data-whatintent=touch]) .dnb-button--reset:hover:not([disabled]){border:none;box-shadow:none}.dnb-button--reset:not([disabled]):active,.dnb-button--reset:not([disabled]):focus{outline:none}html[data-whatinput=keyboard] .dnb-button--reset:not([disabled]):active,html[data-whatinput=keyboard] .dnb-button--reset:not([disabled]):focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}html[data-whatinput=mouse] .dnb-button--reset:not([disabled]):active,html[data-whatinput=mouse] .dnb-button--reset:not([disabled]):focus{border:none;box-shadow:none;color:inherit}.dnb-button[type=button],.dnb-button[type=reset],.dnb-button[type=submit]{appearance:none;-moz-appearance:none;-webkit-appearance:none}.dnb-button[disabled]{cursor:not-allowed;outline:none}.dnb-form-row--vertical .dnb-form-row__content>.dnb-button{align-self:flex-start}.dnb-form-row--horizontal .dnb-form-row__content .dnb-button__text{white-space:nowrap}.dnb-button+.dnb-form-status{margin-top:.5rem}button.dnb-button::-moz-focus-inner{border:none}
|
|
@@ -13,6 +13,10 @@ export type OnChangeParams = {
|
|
|
13
13
|
checked: boolean;
|
|
14
14
|
event: React.ChangeEvent<HTMLInputElement>;
|
|
15
15
|
};
|
|
16
|
+
export type OnClickParams = React.MouseEvent<HTMLInputElement> & {
|
|
17
|
+
checked: boolean;
|
|
18
|
+
event: React.MouseEvent<HTMLInputElement>;
|
|
19
|
+
};
|
|
16
20
|
export type CheckboxProps = {
|
|
17
21
|
/**
|
|
18
22
|
* Use either the `label` property or provide a custom one.
|
|
@@ -74,11 +78,15 @@ export type CheckboxProps = {
|
|
|
74
78
|
* Will be called on state changes made by the user. Returns an boolean `{ checked, event }`.
|
|
75
79
|
*/
|
|
76
80
|
onChange?: (args: OnChangeParams) => void;
|
|
81
|
+
/**
|
|
82
|
+
* Will be called on click made by the user. Returns the ClickEvent.
|
|
83
|
+
*/
|
|
84
|
+
onClick?: (args: OnClickParams) => void;
|
|
77
85
|
/**
|
|
78
86
|
* 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()`.
|
|
79
87
|
*/
|
|
80
88
|
innerRef?: React.MutableRefObject<HTMLInputElement> | ((elem: HTMLInputElement) => void);
|
|
81
|
-
} & SpacingProps & Omit<React.HTMLProps<HTMLInputElement>, 'ref' | 'label' | 'size' | 'onChange'> & DeprecatedCheckboxProps;
|
|
89
|
+
} & SpacingProps & Omit<React.HTMLProps<HTMLInputElement>, 'ref' | 'label' | 'size' | 'onChange' | 'onClick'> & DeprecatedCheckboxProps;
|
|
82
90
|
type DeprecatedCheckboxProps = {
|
|
83
91
|
/** @deprecated use the `label` prop instead */
|
|
84
92
|
children?: React.ReactNode;
|
|
@@ -21,16 +21,16 @@ var _FormLabel = _interopRequireDefault(require("../form-label/FormLabel"));
|
|
|
21
21
|
var _FormStatus = _interopRequireDefault(require("../form-status/FormStatus"));
|
|
22
22
|
var _CheckIcon = _interopRequireDefault(require("./CheckIcon"));
|
|
23
23
|
var _AlignmentHelper, _span, _span2;
|
|
24
|
-
const _excluded = ["value", "status", "statusState", "statusProps", "statusNoAnimation", "globalStatus", "suffix", "size", "label", "labelPosition", "labelSrOnly", "title", "element", "disabled", "readOnly", "skeleton", "className", "id", "indeterminate", "checked", "onChange", "innerRef"];
|
|
24
|
+
const _excluded = ["value", "status", "statusState", "statusProps", "statusNoAnimation", "globalStatus", "suffix", "size", "label", "labelPosition", "labelSrOnly", "title", "element", "disabled", "readOnly", "skeleton", "className", "id", "indeterminate", "checked", "onChange", "onClick", "innerRef"];
|
|
25
25
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
26
26
|
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); }
|
|
27
27
|
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; }
|
|
28
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
28
29
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29
30
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30
31
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
31
32
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
32
33
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
33
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
34
34
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
35
35
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
36
36
|
const defaultProps = {
|
|
@@ -38,6 +38,11 @@ const defaultProps = {
|
|
|
38
38
|
};
|
|
39
39
|
function Checkbox(localProps) {
|
|
40
40
|
const context = (0, _react.useContext)(_Context.default);
|
|
41
|
+
const extractPropsFromContext = (0, _react.useCallback)(() => {
|
|
42
|
+
return (0, _componentHelper.extendPropsWithContext)((0, _withSnakeCaseProps.convertSnakeCaseProps)(localProps), defaultProps, context.Checkbox, {
|
|
43
|
+
skeleton: context === null || context === void 0 ? void 0 : context.Checkbox
|
|
44
|
+
}, (0, _filterValidProps.pickFormElementProps)(context === null || context === void 0 ? void 0 : context.FormRow), (0, _filterValidProps.pickFormElementProps)(context === null || context === void 0 ? void 0 : context.formElement));
|
|
45
|
+
}, [context.Checkbox, context === null || context === void 0 ? void 0 : context.FormRow, context === null || context === void 0 ? void 0 : context.formElement, localProps]);
|
|
41
46
|
const props = extractPropsFromContext();
|
|
42
47
|
const {
|
|
43
48
|
value,
|
|
@@ -61,9 +66,11 @@ function Checkbox(localProps) {
|
|
|
61
66
|
indeterminate,
|
|
62
67
|
checked,
|
|
63
68
|
onChange,
|
|
69
|
+
onClick,
|
|
64
70
|
innerRef
|
|
65
71
|
} = props,
|
|
66
72
|
rest = _objectWithoutProperties(props, _excluded);
|
|
73
|
+
const [, forceUpdate] = (0, _react.useReducer)(() => ({}), {});
|
|
67
74
|
const id = (0, _useId.default)(idProp);
|
|
68
75
|
const isFn = typeof innerRef === 'function';
|
|
69
76
|
const refHook = (0, _react.useRef)();
|
|
@@ -73,14 +80,16 @@ function Checkbox(localProps) {
|
|
|
73
80
|
innerRef === null || innerRef === void 0 ? void 0 : innerRef(ref.current);
|
|
74
81
|
}
|
|
75
82
|
}, [innerRef, isFn, ref]);
|
|
76
|
-
const
|
|
77
|
-
const
|
|
83
|
+
const preventChangeRef = (0, _react.useRef)(false);
|
|
84
|
+
const isCheckedRef = (0, _react.useRef)(checked !== null && checked !== void 0 ? checked : false);
|
|
85
|
+
const prevCheckedRef = (0, _react.useRef)(checked);
|
|
78
86
|
(0, _react.useEffect)(() => {
|
|
79
|
-
if (checked !==
|
|
80
|
-
|
|
81
|
-
|
|
87
|
+
if (checked !== prevCheckedRef.current) {
|
|
88
|
+
isCheckedRef.current = !!checked;
|
|
89
|
+
prevCheckedRef.current = !!checked;
|
|
90
|
+
forceUpdate();
|
|
82
91
|
}
|
|
83
|
-
}, [checked
|
|
92
|
+
}, [checked]);
|
|
84
93
|
(0, _react.useEffect)(() => {
|
|
85
94
|
ref.current.indeterminate = indeterminate;
|
|
86
95
|
}, [indeterminate, ref]);
|
|
@@ -88,11 +97,13 @@ function Checkbox(localProps) {
|
|
|
88
97
|
onChange === null || onChange === void 0 ? void 0 : onChange(args);
|
|
89
98
|
}, [onChange]);
|
|
90
99
|
const handleChange = (0, _react.useCallback)(event => {
|
|
91
|
-
if (
|
|
92
|
-
return
|
|
100
|
+
if (preventChangeRef.current) {
|
|
101
|
+
return;
|
|
93
102
|
}
|
|
94
|
-
|
|
95
|
-
|
|
103
|
+
preventChangeRef.current = false;
|
|
104
|
+
const updatedCheck = !isCheckedRef.current;
|
|
105
|
+
isCheckedRef.current = updatedCheck;
|
|
106
|
+
forceUpdate();
|
|
96
107
|
callOnChange({
|
|
97
108
|
checked: updatedCheck,
|
|
98
109
|
event
|
|
@@ -100,10 +111,28 @@ function Checkbox(localProps) {
|
|
|
100
111
|
if (ref.current) {
|
|
101
112
|
ref.current.focus();
|
|
102
113
|
}
|
|
103
|
-
}, [callOnChange,
|
|
114
|
+
}, [callOnChange, ref]);
|
|
104
115
|
const onChangeHandler = (0, _react.useCallback)(event => {
|
|
105
116
|
handleChange(event);
|
|
106
117
|
}, [handleChange]);
|
|
118
|
+
const onClickHandler = (0, _react.useCallback)(event => {
|
|
119
|
+
const preventDefault = () => {
|
|
120
|
+
event.preventDefault();
|
|
121
|
+
if (event.target['checked'] !== isCheckedRef.current) {
|
|
122
|
+
preventChangeRef.current = true;
|
|
123
|
+
isCheckedRef.current = !isCheckedRef.current;
|
|
124
|
+
forceUpdate();
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
if (readOnly) {
|
|
128
|
+
return preventDefault();
|
|
129
|
+
}
|
|
130
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(_objectSpread({
|
|
131
|
+
checked: isCheckedRef.current,
|
|
132
|
+
preventDefault,
|
|
133
|
+
event
|
|
134
|
+
}, event));
|
|
135
|
+
}, [onClick, readOnly]);
|
|
107
136
|
const onKeyDownHandler = (0, _react.useCallback)(event => {
|
|
108
137
|
switch ((0, _componentHelper.keycode)(event)) {
|
|
109
138
|
case 'enter':
|
|
@@ -111,10 +140,24 @@ function Checkbox(localProps) {
|
|
|
111
140
|
break;
|
|
112
141
|
}
|
|
113
142
|
}, [handleChange]);
|
|
143
|
+
const showStatus = (0, _componentHelper.getStatusState)(status);
|
|
144
|
+
const handleInputAttributes = (0, _react.useCallback)(() => {
|
|
145
|
+
const inputParams = _objectSpread({
|
|
146
|
+
disabled,
|
|
147
|
+
checked: isCheckedRef.current,
|
|
148
|
+
readOnly
|
|
149
|
+
}, rest);
|
|
150
|
+
if (showStatus || suffix) {
|
|
151
|
+
inputParams['aria-describedby'] = (0, _componentHelper.combineDescribedBy)(inputParams, showStatus ? id + '-status' : null, suffix ? id + '-suffix' : null);
|
|
152
|
+
}
|
|
153
|
+
if (readOnly) {
|
|
154
|
+
inputParams['aria-readonly'] = inputParams.readOnly = true;
|
|
155
|
+
}
|
|
156
|
+
return (0, _componentHelper.validateDOMAttributes)(props, (0, _SkeletonHelper.skeletonDOMAttributes)(inputParams, skeleton, context));
|
|
157
|
+
}, [context, disabled, id, props, readOnly, rest, showStatus, skeleton, suffix]);
|
|
114
158
|
const mainParams = {
|
|
115
159
|
className: (0, _classnames.default)("dnb-checkbox dnb-form-component", (0, _SkeletonHelper.createSkeletonClass)(null, skeleton, context), (0, _SpacingHelper.createSpacingClasses)(props), className, status && `dnb-checkbox__status--${statusState}`, size && `dnb-checkbox--${size}`, label && `dnb-checkbox--label-position-${labelPosition || 'right'}`)
|
|
116
160
|
};
|
|
117
|
-
const showStatus = (0, _componentHelper.getStatusState)(status);
|
|
118
161
|
const inputParams = handleInputAttributes();
|
|
119
162
|
const statusComp = _react.default.createElement(_FormStatus.default, _extends({
|
|
120
163
|
show: showStatus,
|
|
@@ -148,10 +191,11 @@ function Checkbox(localProps) {
|
|
|
148
191
|
type: "checkbox",
|
|
149
192
|
title: title,
|
|
150
193
|
className: "dnb-checkbox__input",
|
|
151
|
-
value:
|
|
194
|
+
value: isCheckedRef.current ? value || '' : '',
|
|
152
195
|
disabled: disabled
|
|
153
196
|
}, inputParams, {
|
|
154
197
|
onChange: onChangeHandler,
|
|
198
|
+
onClick: onClickHandler,
|
|
155
199
|
onKeyDown: onKeyDownHandler,
|
|
156
200
|
ref: ref
|
|
157
201
|
})), _react.default.createElement("span", {
|
|
@@ -168,25 +212,6 @@ function Checkbox(localProps) {
|
|
|
168
212
|
id: id + '-suffix',
|
|
169
213
|
context: props
|
|
170
214
|
}, suffix)), (labelPosition === 'right' || !labelPosition) && statusComp);
|
|
171
|
-
function handleInputAttributes() {
|
|
172
|
-
const inputParams = _objectSpread({
|
|
173
|
-
disabled,
|
|
174
|
-
checked: isChecked,
|
|
175
|
-
readOnly
|
|
176
|
-
}, rest);
|
|
177
|
-
if (showStatus || suffix) {
|
|
178
|
-
inputParams['aria-describedby'] = (0, _componentHelper.combineDescribedBy)(inputParams, showStatus ? id + '-status' : null, suffix ? id + '-suffix' : null);
|
|
179
|
-
}
|
|
180
|
-
if (readOnly) {
|
|
181
|
-
inputParams['aria-readonly'] = inputParams.readOnly = true;
|
|
182
|
-
}
|
|
183
|
-
return (0, _componentHelper.validateDOMAttributes)(props, (0, _SkeletonHelper.skeletonDOMAttributes)(inputParams, skeleton, context));
|
|
184
|
-
}
|
|
185
|
-
function extractPropsFromContext() {
|
|
186
|
-
return (0, _componentHelper.extendPropsWithContext)((0, _withSnakeCaseProps.convertSnakeCaseProps)(localProps), defaultProps, context.Checkbox, {
|
|
187
|
-
skeleton: context === null || context === void 0 ? void 0 : context.Checkbox
|
|
188
|
-
}, (0, _filterValidProps.pickFormElementProps)(context === null || context === void 0 ? void 0 : context.FormRow), (0, _filterValidProps.pickFormElementProps)(context === null || context === void 0 ? void 0 : context.formElement));
|
|
189
|
-
}
|
|
190
215
|
}
|
|
191
216
|
var _default = exports.default = Checkbox;
|
|
192
217
|
//# sourceMappingURL=Checkbox.js.map
|