@navikt/ds-react 6.1.1 → 6.3.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/cjs/accordion/Accordion.d.ts +4 -4
- package/cjs/alert/Alert.d.ts +12 -10
- package/cjs/alert/Alert.js.map +1 -1
- package/cjs/button/Button.d.ts +9 -8
- package/cjs/button/Button.js.map +1 -1
- package/cjs/chat/Chat.d.ts +6 -6
- package/cjs/chips/Chips.d.ts +2 -2
- package/cjs/copybutton/CopyButton.d.ts +14 -12
- package/cjs/copybutton/CopyButton.js.map +1 -1
- package/cjs/date/datepicker/types.d.ts +7 -6
- package/cjs/date/hooks/useDatepicker.d.ts +4 -3
- package/cjs/date/hooks/useDatepicker.js.map +1 -1
- package/cjs/date/hooks/useMonthPicker.d.ts +4 -3
- package/cjs/date/hooks/useMonthPicker.js.map +1 -1
- package/cjs/date/monthpicker/types.d.ts +2 -1
- package/cjs/date/parts/DateInput.d.ts +1 -1
- package/cjs/expansion-card/ExpansionCardTitle.d.ts +1 -1
- package/cjs/form/checkbox/CheckboxGroup.d.ts +3 -3
- package/cjs/form/checkbox/types.d.ts +4 -4
- package/cjs/form/combobox/ComboboxProvider.js +5 -1
- package/cjs/form/combobox/ComboboxProvider.js.map +1 -1
- package/cjs/form/combobox/FilteredOptions/FilteredOptions.js +14 -12
- package/cjs/form/combobox/FilteredOptions/FilteredOptions.js.map +1 -1
- package/cjs/form/combobox/FilteredOptions/filtered-options-util.d.ts +3 -3
- package/cjs/form/combobox/FilteredOptions/filtered-options-util.js +1 -3
- package/cjs/form/combobox/FilteredOptions/filtered-options-util.js.map +1 -1
- package/cjs/form/combobox/FilteredOptions/filteredOptionsContext.d.ts +8 -5
- package/cjs/form/combobox/FilteredOptions/filteredOptionsContext.js +8 -13
- package/cjs/form/combobox/FilteredOptions/filteredOptionsContext.js.map +1 -1
- package/cjs/form/combobox/Input/Input.js +9 -7
- package/cjs/form/combobox/Input/Input.js.map +1 -1
- package/cjs/form/combobox/SelectedOptions/SelectedOptions.d.ts +2 -1
- package/cjs/form/combobox/SelectedOptions/SelectedOptions.js +3 -3
- package/cjs/form/combobox/SelectedOptions/SelectedOptions.js.map +1 -1
- package/cjs/form/combobox/SelectedOptions/selectedOptionsContext.d.ts +10 -7
- package/cjs/form/combobox/SelectedOptions/selectedOptionsContext.js +6 -8
- package/cjs/form/combobox/SelectedOptions/selectedOptionsContext.js.map +1 -1
- package/cjs/form/combobox/combobox-utils.d.ts +10 -0
- package/cjs/form/combobox/combobox-utils.js +27 -0
- package/cjs/form/combobox/combobox-utils.js.map +1 -0
- package/cjs/form/combobox/customOptionsContext.d.ts +5 -4
- package/cjs/form/combobox/customOptionsContext.js +1 -1
- package/cjs/form/combobox/customOptionsContext.js.map +1 -1
- package/cjs/form/combobox/types.d.ts +33 -22
- package/cjs/form/error-summary/ErrorSummary.d.ts +5 -5
- package/cjs/form/file-upload/FileUpload.context.d.ts +8 -0
- package/cjs/form/file-upload/FileUpload.context.js +7 -0
- package/cjs/form/file-upload/FileUpload.context.js.map +1 -0
- package/cjs/form/file-upload/FileUpload.d.ts +118 -0
- package/cjs/form/file-upload/FileUpload.js +73 -0
- package/cjs/form/file-upload/FileUpload.js.map +1 -0
- package/cjs/form/file-upload/FileUpload.types.d.ts +55 -0
- package/cjs/form/file-upload/FileUpload.types.js +8 -0
- package/cjs/form/file-upload/FileUpload.types.js.map +1 -0
- package/cjs/form/file-upload/i18n/get.d.ts +2 -0
- package/cjs/form/file-upload/i18n/get.js +38 -0
- package/cjs/form/file-upload/i18n/get.js.map +1 -0
- package/cjs/form/file-upload/i18n/i18n.context.d.ts +11 -0
- package/cjs/form/file-upload/i18n/i18n.context.js +39 -0
- package/cjs/form/file-upload/i18n/i18n.context.js.map +1 -0
- package/cjs/form/file-upload/i18n/i18n.types.d.ts +13 -0
- package/cjs/form/file-upload/i18n/i18n.types.js +3 -0
- package/cjs/form/file-upload/i18n/i18n.types.js.map +1 -0
- package/cjs/form/file-upload/i18n/locales/nb.json +20 -0
- package/cjs/form/file-upload/i18n/merge.d.ts +2 -0
- package/cjs/form/file-upload/i18n/merge.js +29 -0
- package/cjs/form/file-upload/i18n/merge.js.map +1 -0
- package/cjs/form/file-upload/index.d.ts +7 -0
- package/cjs/form/file-upload/index.js +16 -0
- package/cjs/form/file-upload/index.js.map +1 -0
- package/cjs/form/file-upload/parts/Trigger.d.ts +7 -0
- package/cjs/form/file-upload/parts/Trigger.js +43 -0
- package/cjs/form/file-upload/parts/Trigger.js.map +1 -0
- package/cjs/form/file-upload/parts/dropzone/Dropzone.d.ts +4 -0
- package/cjs/form/file-upload/parts/dropzone/Dropzone.js +106 -0
- package/cjs/form/file-upload/parts/dropzone/Dropzone.js.map +1 -0
- package/cjs/form/file-upload/parts/dropzone/dropzone.types.d.ts +18 -0
- package/cjs/form/file-upload/parts/dropzone/dropzone.types.js +3 -0
- package/cjs/form/file-upload/parts/dropzone/dropzone.types.js.map +1 -0
- package/cjs/form/file-upload/parts/dropzone/useDropzone.d.ts +13 -0
- package/cjs/form/file-upload/parts/dropzone/useDropzone.js +34 -0
- package/cjs/form/file-upload/parts/dropzone/useDropzone.js.map +1 -0
- package/cjs/form/file-upload/parts/item/Item.d.ts +55 -0
- package/cjs/form/file-upload/parts/item/Item.js +79 -0
- package/cjs/form/file-upload/parts/item/Item.js.map +1 -0
- package/cjs/form/file-upload/parts/item/Item.types.d.ts +5 -0
- package/cjs/form/file-upload/parts/item/Item.types.js +3 -0
- package/cjs/form/file-upload/parts/item/Item.types.js.map +1 -0
- package/cjs/form/file-upload/parts/item/ItemButton.d.ts +12 -0
- package/cjs/form/file-upload/parts/item/ItemButton.js +22 -0
- package/cjs/form/file-upload/parts/item/ItemButton.js.map +1 -0
- package/cjs/form/file-upload/parts/item/ItemIcon.d.ts +9 -0
- package/cjs/form/file-upload/parts/item/ItemIcon.js +51 -0
- package/cjs/form/file-upload/parts/item/ItemIcon.js.map +1 -0
- package/cjs/form/file-upload/parts/item/ItemName.d.ts +9 -0
- package/cjs/form/file-upload/parts/item/ItemName.js +32 -0
- package/cjs/form/file-upload/parts/item/ItemName.js.map +1 -0
- package/cjs/form/file-upload/parts/item/utils/download-file.d.ts +1 -0
- package/cjs/form/file-upload/parts/item/utils/download-file.js +13 -0
- package/cjs/form/file-upload/parts/item/utils/download-file.js.map +1 -0
- package/cjs/form/file-upload/parts/item/utils/file-type-checker.d.ts +2 -0
- package/cjs/form/file-upload/parts/item/utils/file-type-checker.js +6 -0
- package/cjs/form/file-upload/parts/item/utils/file-type-checker.js.map +1 -0
- package/cjs/form/file-upload/parts/item/utils/format-file-size.d.ts +2 -0
- package/cjs/form/file-upload/parts/item/utils/format-file-size.js +24 -0
- package/cjs/form/file-upload/parts/item/utils/format-file-size.js.map +1 -0
- package/cjs/form/file-upload/useFileUpload.d.ts +12 -0
- package/cjs/form/file-upload/useFileUpload.js +33 -0
- package/cjs/form/file-upload/useFileUpload.js.map +1 -0
- package/cjs/form/file-upload/utils/is-accepted-file-type.d.ts +1 -0
- package/cjs/form/file-upload/utils/is-accepted-file-type.js +26 -0
- package/cjs/form/file-upload/utils/is-accepted-file-type.js.map +1 -0
- package/cjs/form/file-upload/utils/is-accepted-size.d.ts +1 -0
- package/cjs/form/file-upload/utils/is-accepted-size.js +11 -0
- package/cjs/form/file-upload/utils/is-accepted-size.js.map +1 -0
- package/cjs/form/file-upload/utils/validate-files.d.ts +8 -0
- package/cjs/form/file-upload/utils/validate-files.js +48 -0
- package/cjs/form/file-upload/utils/validate-files.js.map +1 -0
- package/cjs/form/radio/RadioGroup.d.ts +1 -1
- package/cjs/form/search/Search.d.ts +3 -2
- package/cjs/form/search/Search.js.map +1 -1
- package/cjs/form/select/Select.d.ts +9 -9
- package/cjs/form/switch/Switch.d.ts +5 -5
- package/cjs/form/textarea/Textarea.d.ts +5 -4
- package/cjs/form/textarea/Textarea.js.map +1 -1
- package/cjs/form/useFormField.d.ts +10 -8
- package/cjs/form/useFormField.js.map +1 -1
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +3 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/bleed/Bleed.d.ts +9 -1
- package/cjs/layout/bleed/Bleed.js.map +1 -1
- package/cjs/layout/box/Box.d.ts +5 -5
- package/cjs/layout/grid/HGrid.d.ts +1 -3
- package/cjs/layout/grid/HGrid.js.map +1 -1
- package/cjs/layout/page/Page.d.ts +2 -2
- package/cjs/layout/responsive/Responsive.d.ts +2 -4
- package/cjs/layout/responsive/Responsive.js.map +1 -1
- package/cjs/layout/stack/Stack.d.ts +18 -4
- package/cjs/layout/stack/Stack.js.map +1 -1
- package/cjs/list/types.d.ts +1 -1
- package/cjs/loader/Loader.d.ts +0 -6
- package/cjs/loader/Loader.js.map +1 -1
- package/cjs/modal/Modal.js +2 -2
- package/cjs/modal/types.d.ts +8 -8
- package/cjs/pagination/Pagination.d.ts +3 -2
- package/cjs/pagination/Pagination.js.map +1 -1
- package/cjs/pagination/PaginationItem.d.ts +1 -1
- package/cjs/popover/Popover.d.ts +2 -1
- package/cjs/popover/Popover.js.map +1 -1
- package/cjs/read-more/ReadMore.d.ts +7 -7
- package/cjs/stepper/Step.d.ts +4 -4
- package/cjs/stepper/Stepper.d.ts +7 -5
- package/cjs/stepper/Stepper.js.map +1 -1
- package/cjs/table/AnimateHeight.d.ts +1 -1
- package/cjs/table/DataCell.d.ts +1 -3
- package/cjs/table/DataCell.js.map +1 -1
- package/cjs/tabs/TabList.d.ts +1 -1
- package/cjs/tabs/Tabs.d.ts +7 -7
- package/cjs/timeline/Timeline.d.ts +6 -3
- package/cjs/timeline/Timeline.js +2 -1
- package/cjs/timeline/Timeline.js.map +1 -1
- package/cjs/timeline/period/index.d.ts +3 -2
- package/cjs/timeline/period/index.js.map +1 -1
- package/cjs/tooltip/Tooltip.d.ts +19 -12
- package/cjs/tooltip/Tooltip.js.map +1 -1
- package/cjs/util/create-context.d.ts +1 -0
- package/cjs/util/create-context.js.map +1 -1
- package/cjs/util/hooks/useEventListener.d.ts +1 -1
- package/cjs/util/hooks/useMergeRefs.d.ts +1 -1
- package/esm/accordion/Accordion.d.ts +4 -4
- package/esm/alert/Alert.d.ts +12 -10
- package/esm/alert/Alert.js.map +1 -1
- package/esm/button/Button.d.ts +9 -8
- package/esm/button/Button.js.map +1 -1
- package/esm/chat/Chat.d.ts +6 -6
- package/esm/chips/Chips.d.ts +2 -2
- package/esm/copybutton/CopyButton.d.ts +14 -12
- package/esm/copybutton/CopyButton.js.map +1 -1
- package/esm/date/datepicker/types.d.ts +7 -6
- package/esm/date/hooks/useDatepicker.d.ts +4 -3
- package/esm/date/hooks/useDatepicker.js.map +1 -1
- package/esm/date/hooks/useMonthPicker.d.ts +4 -3
- package/esm/date/hooks/useMonthPicker.js.map +1 -1
- package/esm/date/monthpicker/types.d.ts +2 -1
- package/esm/date/parts/DateInput.d.ts +1 -1
- package/esm/expansion-card/ExpansionCardTitle.d.ts +1 -1
- package/esm/form/checkbox/CheckboxGroup.d.ts +3 -3
- package/esm/form/checkbox/types.d.ts +4 -4
- package/esm/form/combobox/ComboboxProvider.js +5 -1
- package/esm/form/combobox/ComboboxProvider.js.map +1 -1
- package/esm/form/combobox/FilteredOptions/FilteredOptions.js +14 -12
- package/esm/form/combobox/FilteredOptions/FilteredOptions.js.map +1 -1
- package/esm/form/combobox/FilteredOptions/filtered-options-util.d.ts +3 -3
- package/esm/form/combobox/FilteredOptions/filtered-options-util.js +1 -3
- package/esm/form/combobox/FilteredOptions/filtered-options-util.js.map +1 -1
- package/esm/form/combobox/FilteredOptions/filteredOptionsContext.d.ts +8 -5
- package/esm/form/combobox/FilteredOptions/filteredOptionsContext.js +8 -13
- package/esm/form/combobox/FilteredOptions/filteredOptionsContext.js.map +1 -1
- package/esm/form/combobox/Input/Input.js +9 -7
- package/esm/form/combobox/Input/Input.js.map +1 -1
- package/esm/form/combobox/SelectedOptions/SelectedOptions.d.ts +2 -1
- package/esm/form/combobox/SelectedOptions/SelectedOptions.js +3 -3
- package/esm/form/combobox/SelectedOptions/SelectedOptions.js.map +1 -1
- package/esm/form/combobox/SelectedOptions/selectedOptionsContext.d.ts +10 -7
- package/esm/form/combobox/SelectedOptions/selectedOptionsContext.js +6 -8
- package/esm/form/combobox/SelectedOptions/selectedOptionsContext.js.map +1 -1
- package/esm/form/combobox/combobox-utils.d.ts +10 -0
- package/esm/form/combobox/combobox-utils.js +22 -0
- package/esm/form/combobox/combobox-utils.js.map +1 -0
- package/esm/form/combobox/customOptionsContext.d.ts +5 -4
- package/esm/form/combobox/customOptionsContext.js +1 -1
- package/esm/form/combobox/customOptionsContext.js.map +1 -1
- package/esm/form/combobox/types.d.ts +33 -22
- package/esm/form/error-summary/ErrorSummary.d.ts +5 -5
- package/esm/form/file-upload/FileUpload.context.d.ts +8 -0
- package/esm/form/file-upload/FileUpload.context.js +3 -0
- package/esm/form/file-upload/FileUpload.context.js.map +1 -0
- package/esm/form/file-upload/FileUpload.d.ts +118 -0
- package/esm/form/file-upload/FileUpload.js +44 -0
- package/esm/form/file-upload/FileUpload.js.map +1 -0
- package/esm/form/file-upload/FileUpload.types.d.ts +55 -0
- package/esm/form/file-upload/FileUpload.types.js +5 -0
- package/esm/form/file-upload/FileUpload.types.js.map +1 -0
- package/esm/form/file-upload/i18n/get.d.ts +2 -0
- package/esm/form/file-upload/i18n/get.js +34 -0
- package/esm/form/file-upload/i18n/get.js.map +1 -0
- package/esm/form/file-upload/i18n/i18n.context.d.ts +11 -0
- package/esm/form/file-upload/i18n/i18n.context.js +32 -0
- package/esm/form/file-upload/i18n/i18n.context.js.map +1 -0
- package/esm/form/file-upload/i18n/i18n.types.d.ts +13 -0
- package/esm/form/file-upload/i18n/i18n.types.js +2 -0
- package/esm/form/file-upload/i18n/i18n.types.js.map +1 -0
- package/esm/form/file-upload/i18n/locales/nb.json +20 -0
- package/esm/form/file-upload/i18n/merge.d.ts +2 -0
- package/esm/form/file-upload/i18n/merge.js +25 -0
- package/esm/form/file-upload/i18n/merge.js.map +1 -0
- package/esm/form/file-upload/index.d.ts +7 -0
- package/esm/form/file-upload/index.js +6 -0
- package/esm/form/file-upload/index.js.map +1 -0
- package/esm/form/file-upload/parts/Trigger.d.ts +7 -0
- package/esm/form/file-upload/parts/Trigger.js +18 -0
- package/esm/form/file-upload/parts/Trigger.js.map +1 -0
- package/esm/form/file-upload/parts/dropzone/Dropzone.d.ts +4 -0
- package/esm/form/file-upload/parts/dropzone/Dropzone.js +78 -0
- package/esm/form/file-upload/parts/dropzone/Dropzone.js.map +1 -0
- package/esm/form/file-upload/parts/dropzone/dropzone.types.d.ts +18 -0
- package/esm/form/file-upload/parts/dropzone/dropzone.types.js +2 -0
- package/esm/form/file-upload/parts/dropzone/dropzone.types.js.map +1 -0
- package/esm/form/file-upload/parts/dropzone/useDropzone.d.ts +13 -0
- package/esm/form/file-upload/parts/dropzone/useDropzone.js +30 -0
- package/esm/form/file-upload/parts/dropzone/useDropzone.js.map +1 -0
- package/esm/form/file-upload/parts/item/Item.d.ts +55 -0
- package/esm/form/file-upload/parts/item/Item.js +50 -0
- package/esm/form/file-upload/parts/item/Item.js.map +1 -0
- package/esm/form/file-upload/parts/item/Item.types.d.ts +5 -0
- package/esm/form/file-upload/parts/item/Item.types.js +2 -0
- package/esm/form/file-upload/parts/item/Item.types.js.map +1 -0
- package/esm/form/file-upload/parts/item/ItemButton.d.ts +12 -0
- package/esm/form/file-upload/parts/item/ItemButton.js +17 -0
- package/esm/form/file-upload/parts/item/ItemButton.js.map +1 -0
- package/esm/form/file-upload/parts/item/ItemIcon.d.ts +9 -0
- package/esm/form/file-upload/parts/item/ItemIcon.js +46 -0
- package/esm/form/file-upload/parts/item/ItemIcon.js.map +1 -0
- package/esm/form/file-upload/parts/item/ItemName.d.ts +9 -0
- package/esm/form/file-upload/parts/item/ItemName.js +27 -0
- package/esm/form/file-upload/parts/item/ItemName.js.map +1 -0
- package/esm/form/file-upload/parts/item/utils/download-file.d.ts +1 -0
- package/esm/form/file-upload/parts/item/utils/download-file.js +9 -0
- package/esm/form/file-upload/parts/item/utils/download-file.js.map +1 -0
- package/esm/form/file-upload/parts/item/utils/file-type-checker.d.ts +2 -0
- package/esm/form/file-upload/parts/item/utils/file-type-checker.js +2 -0
- package/esm/form/file-upload/parts/item/utils/file-type-checker.js.map +1 -0
- package/esm/form/file-upload/parts/item/utils/format-file-size.d.ts +2 -0
- package/esm/form/file-upload/parts/item/utils/format-file-size.js +20 -0
- package/esm/form/file-upload/parts/item/utils/format-file-size.js.map +1 -0
- package/esm/form/file-upload/useFileUpload.d.ts +12 -0
- package/esm/form/file-upload/useFileUpload.js +29 -0
- package/esm/form/file-upload/useFileUpload.js.map +1 -0
- package/esm/form/file-upload/utils/is-accepted-file-type.d.ts +1 -0
- package/esm/form/file-upload/utils/is-accepted-file-type.js +22 -0
- package/esm/form/file-upload/utils/is-accepted-file-type.js.map +1 -0
- package/esm/form/file-upload/utils/is-accepted-size.d.ts +1 -0
- package/esm/form/file-upload/utils/is-accepted-size.js +7 -0
- package/esm/form/file-upload/utils/is-accepted-size.js.map +1 -0
- package/esm/form/file-upload/utils/validate-files.d.ts +8 -0
- package/esm/form/file-upload/utils/validate-files.js +44 -0
- package/esm/form/file-upload/utils/validate-files.js.map +1 -0
- package/esm/form/radio/RadioGroup.d.ts +1 -1
- package/esm/form/search/Search.d.ts +3 -2
- package/esm/form/search/Search.js.map +1 -1
- package/esm/form/select/Select.d.ts +9 -9
- package/esm/form/switch/Switch.d.ts +5 -5
- package/esm/form/textarea/Textarea.d.ts +5 -4
- package/esm/form/textarea/Textarea.js.map +1 -1
- package/esm/form/useFormField.d.ts +10 -8
- package/esm/form/useFormField.js.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -1
- package/esm/layout/bleed/Bleed.d.ts +9 -1
- package/esm/layout/bleed/Bleed.js.map +1 -1
- package/esm/layout/box/Box.d.ts +5 -5
- package/esm/layout/grid/HGrid.d.ts +1 -3
- package/esm/layout/grid/HGrid.js.map +1 -1
- package/esm/layout/page/Page.d.ts +2 -2
- package/esm/layout/responsive/Responsive.d.ts +2 -4
- package/esm/layout/responsive/Responsive.js.map +1 -1
- package/esm/layout/stack/Stack.d.ts +18 -4
- package/esm/layout/stack/Stack.js.map +1 -1
- package/esm/list/types.d.ts +1 -1
- package/esm/loader/Loader.d.ts +0 -6
- package/esm/loader/Loader.js.map +1 -1
- package/esm/modal/Modal.js +2 -2
- package/esm/modal/types.d.ts +8 -8
- package/esm/pagination/Pagination.d.ts +3 -2
- package/esm/pagination/Pagination.js.map +1 -1
- package/esm/pagination/PaginationItem.d.ts +1 -1
- package/esm/popover/Popover.d.ts +2 -1
- package/esm/popover/Popover.js.map +1 -1
- package/esm/read-more/ReadMore.d.ts +7 -7
- package/esm/stepper/Step.d.ts +4 -4
- package/esm/stepper/Stepper.d.ts +7 -5
- package/esm/stepper/Stepper.js.map +1 -1
- package/esm/table/AnimateHeight.d.ts +1 -1
- package/esm/table/DataCell.d.ts +1 -3
- package/esm/table/DataCell.js.map +1 -1
- package/esm/tabs/TabList.d.ts +1 -1
- package/esm/tabs/Tabs.d.ts +7 -7
- package/esm/timeline/Timeline.d.ts +6 -3
- package/esm/timeline/Timeline.js +2 -1
- package/esm/timeline/Timeline.js.map +1 -1
- package/esm/timeline/period/index.d.ts +3 -2
- package/esm/timeline/period/index.js.map +1 -1
- package/esm/tooltip/Tooltip.d.ts +19 -12
- package/esm/tooltip/Tooltip.js.map +1 -1
- package/esm/util/create-context.d.ts +1 -0
- package/esm/util/create-context.js.map +1 -1
- package/esm/util/hooks/useEventListener.d.ts +1 -1
- package/esm/util/hooks/useMergeRefs.d.ts +1 -1
- package/package.json +13 -3
- package/src/accordion/Accordion.tsx +4 -4
- package/src/accordion/accordion.stories.tsx +0 -2
- package/src/alert/Alert.tsx +12 -10
- package/src/button/Button.tsx +9 -8
- package/src/chat/Chat.tsx +6 -6
- package/src/chips/Chips.tsx +2 -2
- package/src/copybutton/CopyButton.tsx +14 -12
- package/src/date/datepicker/datepicker.stories.tsx +0 -1
- package/src/date/datepicker/types.ts +7 -6
- package/src/date/hooks/useDatepicker.tsx +4 -3
- package/src/date/hooks/useMonthPicker.tsx +4 -3
- package/src/date/monthpicker/types.ts +2 -1
- package/src/date/parts/DateInput.tsx +1 -1
- package/src/expansion-card/ExpansionCardTitle.tsx +1 -1
- package/src/form/checkbox/CheckboxGroup.tsx +3 -3
- package/src/form/checkbox/types.ts +4 -4
- package/src/form/combobox/ComboboxProvider.tsx +7 -3
- package/src/form/combobox/FilteredOptions/FilteredOptions.tsx +22 -15
- package/src/form/combobox/FilteredOptions/filtered-options-util.ts +5 -10
- package/src/form/combobox/FilteredOptions/filteredOptionsContext.tsx +19 -29
- package/src/form/combobox/Input/Input.tsx +14 -8
- package/src/form/combobox/SelectedOptions/SelectedOptions.tsx +8 -5
- package/src/form/combobox/SelectedOptions/selectedOptionsContext.tsx +24 -25
- package/src/form/combobox/combobox-utils.test.ts +67 -0
- package/src/form/combobox/combobox-utils.ts +32 -0
- package/src/form/combobox/combobox.stories.tsx +67 -32
- package/src/form/combobox/combobox.test.tsx +32 -1
- package/src/form/combobox/customOptionsContext.tsx +9 -8
- package/src/form/combobox/types.ts +34 -22
- package/src/form/error-summary/ErrorSummary.tsx +5 -5
- package/src/form/file-upload/FileUpload.context.tsx +9 -0
- package/src/form/file-upload/FileUpload.tsx +142 -0
- package/src/form/file-upload/FileUpload.types.ts +57 -0
- package/src/form/file-upload/file-upload-dropzone.stories.tsx +123 -0
- package/src/form/file-upload/file-upload-item.stories.tsx +136 -0
- package/src/form/file-upload/file-upload.stories.tsx +236 -0
- package/src/form/file-upload/i18n/get.ts +48 -0
- package/src/form/file-upload/i18n/i18n.context.test.tsx +92 -0
- package/src/form/file-upload/i18n/i18n.context.ts +67 -0
- package/src/form/file-upload/i18n/i18n.types.ts +20 -0
- package/src/form/file-upload/i18n/locales/nb.json +20 -0
- package/src/form/file-upload/i18n/merge.ts +35 -0
- package/src/form/file-upload/index.ts +21 -0
- package/src/form/file-upload/parts/Trigger.tsx +48 -0
- package/src/form/file-upload/parts/dropzone/Dropzone.tsx +180 -0
- package/src/form/file-upload/parts/dropzone/dropzone.types.ts +22 -0
- package/src/form/file-upload/parts/dropzone/useDropzone.ts +43 -0
- package/src/form/file-upload/parts/item/Item.tsx +165 -0
- package/src/form/file-upload/parts/item/Item.types.ts +6 -0
- package/src/form/file-upload/parts/item/ItemButton.tsx +52 -0
- package/src/form/file-upload/parts/item/ItemIcon.tsx +74 -0
- package/src/form/file-upload/parts/item/ItemName.tsx +58 -0
- package/src/form/file-upload/parts/item/utils/download-file.ts +9 -0
- package/src/form/file-upload/parts/item/utils/file-type-checker.ts +4 -0
- package/src/form/file-upload/parts/item/utils/format-file-size.test.ts +76 -0
- package/src/form/file-upload/parts/item/utils/format-file-size.ts +25 -0
- package/src/form/file-upload/useFileUpload.ts +54 -0
- package/src/form/file-upload/utils/is-accepted-file-type.test.ts +69 -0
- package/src/form/file-upload/utils/is-accepted-file-type.ts +25 -0
- package/src/form/file-upload/utils/is-accepted-size.test.ts +26 -0
- package/src/form/file-upload/utils/is-accepted-size.ts +7 -0
- package/src/form/file-upload/utils/validate-files.test.ts +132 -0
- package/src/form/file-upload/utils/validate-files.ts +62 -0
- package/src/form/radio/RadioGroup.tsx +1 -1
- package/src/form/search/Search.tsx +3 -2
- package/src/form/select/Select.tsx +9 -9
- package/src/form/select/select.stories.tsx +32 -37
- package/src/form/switch/Switch.tsx +5 -5
- package/src/form/textarea/Textarea.tsx +5 -4
- package/src/form/useFormField.ts +10 -8
- package/src/index.ts +14 -0
- package/src/internal-header/header.stories.tsx +8 -5
- package/src/layout/bleed/Bleed.tsx +9 -1
- package/src/layout/box/Box.tsx +5 -5
- package/src/layout/grid/HGrid.tsx +1 -3
- package/src/layout/page/Page.tsx +2 -2
- package/src/layout/responsive/Responsive.tsx +2 -4
- package/src/layout/stack/Stack.tsx +18 -4
- package/src/list/types.ts +1 -1
- package/src/loader/Loader.tsx +0 -6
- package/src/modal/Modal.tsx +2 -2
- package/src/modal/types.ts +8 -8
- package/src/pagination/Pagination.tsx +3 -2
- package/src/pagination/PaginationItem.tsx +1 -1
- package/src/popover/Popover.tsx +2 -1
- package/src/read-more/ReadMore.tsx +7 -7
- package/src/stepper/Step.tsx +4 -4
- package/src/stepper/Stepper.tsx +7 -5
- package/src/table/AnimateHeight.tsx +1 -1
- package/src/table/DataCell.tsx +1 -6
- package/src/tabs/TabList.tsx +1 -1
- package/src/tabs/Tabs.tsx +7 -7
- package/src/timeline/Timeline.tsx +6 -3
- package/src/timeline/period/index.tsx +3 -2
- package/src/tooltip/Tooltip.tsx +19 -12
- package/src/util/create-context.tsx +1 -0
- package/src/util/hooks/useMergeRefs.ts +1 -1
|
@@ -2,27 +2,27 @@ import React, { HTMLAttributes } from "react";
|
|
|
2
2
|
import { ErrorSummaryItemType } from "./ErrorSummaryItem";
|
|
3
3
|
export interface ErrorSummaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Collection of `ErrorSummary.Item`.
|
|
6
6
|
*/
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
/**
|
|
9
|
-
* Changes padding and font-sizes
|
|
9
|
+
* Changes padding and font-sizes.
|
|
10
10
|
* @default "medium"
|
|
11
11
|
*/
|
|
12
12
|
size?: "medium" | "small";
|
|
13
13
|
/**
|
|
14
|
-
* Heading above links
|
|
14
|
+
* Heading above links.
|
|
15
15
|
*/
|
|
16
16
|
heading?: React.ReactNode;
|
|
17
17
|
/**
|
|
18
|
-
* Allows setting a different HTML h-tag
|
|
18
|
+
* Allows setting a different HTML h-tag.
|
|
19
19
|
* @default "h2"
|
|
20
20
|
*/
|
|
21
21
|
headingTag?: React.ElementType<any>;
|
|
22
22
|
}
|
|
23
23
|
interface ErrorSummaryComponent extends React.ForwardRefExoticComponent<ErrorSummaryProps & React.RefAttributes<HTMLDivElement>> {
|
|
24
24
|
/**
|
|
25
|
-
* Link to error
|
|
25
|
+
* Link to error.
|
|
26
26
|
*
|
|
27
27
|
* @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support
|
|
28
28
|
*
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentTranslation } from "./i18n/i18n.types";
|
|
3
|
+
export type FileUploadLocaleContextProps = {
|
|
4
|
+
translations?: ComponentTranslation<"FileUpload">;
|
|
5
|
+
};
|
|
6
|
+
export declare const FileUploadLocaleContextProvider: import("react").ForwardRefExoticComponent<FileUploadLocaleContextProps & {
|
|
7
|
+
children: import("react").ReactNode;
|
|
8
|
+
} & import("react").RefAttributes<unknown>>, useFileUploadTranslation: <S extends boolean = true>(strict?: S) => S extends true ? FileUploadLocaleContextProps : FileUploadLocaleContextProps | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.useFileUploadTranslation = exports.FileUploadLocaleContextProvider = void 0;
|
|
5
|
+
const create_context_1 = require("../../util/create-context");
|
|
6
|
+
_a = (0, create_context_1.createContext)(), exports.FileUploadLocaleContextProvider = _a[0], exports.useFileUploadTranslation = _a[1];
|
|
7
|
+
//# sourceMappingURL=FileUpload.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileUpload.context.js","sourceRoot":"","sources":["../../../src/form/file-upload/FileUpload.context.tsx"],"names":[],"mappings":";;;;AAAA,8DAA0D;AAO7C,KACX,IAAA,8BAAa,GAAgC,EADjC,uCAA+B,UAAE,gCAAwB,SACvB"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import React, { HTMLAttributes } from "react";
|
|
2
|
+
import { ComponentTranslation } from "./i18n/i18n.types";
|
|
3
|
+
import Trigger from "./parts/Trigger";
|
|
4
|
+
import Dropzone from "./parts/dropzone/Dropzone";
|
|
5
|
+
import Item from "./parts/item/Item";
|
|
6
|
+
interface FileUploadProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* i18n-API for customizing texts and labels
|
|
10
|
+
*/
|
|
11
|
+
translations?: ComponentTranslation<"FileUpload">;
|
|
12
|
+
}
|
|
13
|
+
interface FileUploadComponent extends React.ForwardRefExoticComponent<FileUploadProps & React.RefAttributes<HTMLDivElement>> {
|
|
14
|
+
/**
|
|
15
|
+
* Framed area to drag-n-drop files, upload files with button-click or copy-paste.
|
|
16
|
+
* @example
|
|
17
|
+
* Single file
|
|
18
|
+
* ```jsx
|
|
19
|
+
* <FileUpload.Dropzone
|
|
20
|
+
* label="Last opp fil"
|
|
21
|
+
* multiple={false}
|
|
22
|
+
* onSelect={onSelect}
|
|
23
|
+
* />
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* Multiple files
|
|
28
|
+
* ```jsx
|
|
29
|
+
* <FileUpload.Dropzone
|
|
30
|
+
* label="Last opp fil"
|
|
31
|
+
* multiple={true}
|
|
32
|
+
* onSelect={onSelect}
|
|
33
|
+
* />
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* Error
|
|
38
|
+
* ```jsx
|
|
39
|
+
* <FileUpload.Dropzone
|
|
40
|
+
* label="Last opp filer"
|
|
41
|
+
* onSelect={onSelect}
|
|
42
|
+
* error={error}
|
|
43
|
+
* />
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
Dropzone: typeof Dropzone;
|
|
47
|
+
/**
|
|
48
|
+
* Displays a file with status, file size, action and error message.
|
|
49
|
+
* @example
|
|
50
|
+
* Single
|
|
51
|
+
* ```jsx
|
|
52
|
+
* <FileUpload.Item file={file} status="uploading" />
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* Multiple items can be semantically grouped as a list.
|
|
57
|
+
* ```jsx
|
|
58
|
+
* <FileUpload>
|
|
59
|
+
* <VStack gap="4" as="ul">
|
|
60
|
+
* <FileUpload.Item as="li" file={file} />
|
|
61
|
+
* <FileUpload.Item as="li" file={file2} />
|
|
62
|
+
* <FileUpload.Item as="li" file={file3} status="uploading" />
|
|
63
|
+
* </VStack>
|
|
64
|
+
* </FileUpload>
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* Custom file object
|
|
69
|
+
* ```jsx
|
|
70
|
+
* <FileUpload.Item file={{ name: "fileName.pdf", size: 1_048_576 }} />
|
|
71
|
+
* ```
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* Error
|
|
75
|
+
* ```jsx
|
|
76
|
+
* <FileUpload.Item file={file} error="Something went wrong" />
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* Status & actions
|
|
81
|
+
* ```jsx
|
|
82
|
+
* <FileUpload.Item file={file} status="uploading" />
|
|
83
|
+
* <FileUpload.Item file={file} status="downloading" />
|
|
84
|
+
* <FileUpload.Item file={file} itemAction="retry" onRetry={...} />
|
|
85
|
+
* <FileUpload.Item file={file} itemAction="delete" onDelete={...} />
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
Item: typeof Item;
|
|
89
|
+
/**
|
|
90
|
+
* Wrapper for a button to trigger file select.
|
|
91
|
+
* @example
|
|
92
|
+
* ```jsx
|
|
93
|
+
* <FileUpload.Trigger onSelect={...}>
|
|
94
|
+
* <Button variant="secondary">Last opp filer</Button>
|
|
95
|
+
* </FileUpload.Trigger>
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
Trigger: typeof Trigger;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* A set of components used to upload and display files.
|
|
102
|
+
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/fileupload)
|
|
103
|
+
* @example Dropzone
|
|
104
|
+
* ```jsx
|
|
105
|
+
* <FileUpload.Dropzone />
|
|
106
|
+
* ```
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* Items
|
|
110
|
+
* ```jsx
|
|
111
|
+
* <VStack gap="4" as="ul">
|
|
112
|
+
* <FileUpload.Item as="li" file={myFile} />
|
|
113
|
+
* <FileUpload.Item as="li" file={mySecondFile} />
|
|
114
|
+
* </VStack>
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
export declare const FileUpload: FileUploadComponent;
|
|
118
|
+
export default FileUpload;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
+
var t = {};
|
|
27
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
+
t[p] = s[p];
|
|
29
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
+
t[p[i]] = s[p[i]];
|
|
33
|
+
}
|
|
34
|
+
return t;
|
|
35
|
+
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.FileUpload = void 0;
|
|
41
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
42
|
+
const react_1 = __importStar(require("react"));
|
|
43
|
+
const FileUpload_context_1 = require("./FileUpload.context");
|
|
44
|
+
const Trigger_1 = __importDefault(require("./parts/Trigger"));
|
|
45
|
+
const Dropzone_1 = __importDefault(require("./parts/dropzone/Dropzone"));
|
|
46
|
+
const Item_1 = __importDefault(require("./parts/item/Item"));
|
|
47
|
+
/**
|
|
48
|
+
* A set of components used to upload and display files.
|
|
49
|
+
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/fileupload)
|
|
50
|
+
* @example Dropzone
|
|
51
|
+
* ```jsx
|
|
52
|
+
* <FileUpload.Dropzone />
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* Items
|
|
57
|
+
* ```jsx
|
|
58
|
+
* <VStack gap="4" as="ul">
|
|
59
|
+
* <FileUpload.Item as="li" file={myFile} />
|
|
60
|
+
* <FileUpload.Item as="li" file={mySecondFile} />
|
|
61
|
+
* </VStack>
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
exports.FileUpload = (0, react_1.forwardRef)((_a, ref) => {
|
|
65
|
+
var { children, className, translations } = _a, rest = __rest(_a, ["children", "className", "translations"]);
|
|
66
|
+
return (react_1.default.createElement(FileUpload_context_1.FileUploadLocaleContextProvider, { translations: translations },
|
|
67
|
+
react_1.default.createElement("div", Object.assign({ ref: ref }, rest, { className: (0, clsx_1.default)("navds-file-upload", className) }), children)));
|
|
68
|
+
});
|
|
69
|
+
exports.FileUpload.Dropzone = Dropzone_1.default;
|
|
70
|
+
exports.FileUpload.Item = Item_1.default;
|
|
71
|
+
exports.FileUpload.Trigger = Trigger_1.default;
|
|
72
|
+
exports.default = exports.FileUpload;
|
|
73
|
+
//# sourceMappingURL=FileUpload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileUpload.js","sourceRoot":"","sources":["../../../src/form/file-upload/FileUpload.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAsB;AACtB,+CAA0D;AAC1D,6DAAuE;AAEvE,8DAAsC;AACtC,yEAAiD;AACjD,6DAAqC;AAsGrC;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,UAAU,GAAG,IAAA,kBAAU,EAClC,CAAC,EAA+D,EAAE,GAAG,EAAE,EAAE;QAAxE,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,OAA4B,EAAvB,IAAI,cAA5C,yCAA8C,CAAF;IAC3C,OAAO,CACL,8BAAC,oDAA+B,IAAC,YAAY,EAAE,YAAY;QACzD,qDAAK,GAAG,EAAE,GAAG,IAAM,IAAI,IAAE,SAAS,EAAE,IAAA,cAAE,EAAC,mBAAmB,EAAE,SAAS,CAAC,KACnE,QAAQ,CACL,CAC0B,CACnC,CAAC;AACJ,CAAC,CACqB,CAAC;AAEzB,kBAAU,CAAC,QAAQ,GAAG,kBAAQ,CAAC;AAC/B,kBAAU,CAAC,IAAI,GAAG,cAAI,CAAC;AACvB,kBAAU,CAAC,OAAO,GAAG,iBAAO,CAAC;AAE7B,kBAAe,kBAAU,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export declare const fileRejectionReason: {
|
|
2
|
+
FileType: "fileType";
|
|
3
|
+
FileSize: "fileSize";
|
|
4
|
+
};
|
|
5
|
+
export type FileRejectionReason = (typeof fileRejectionReason)[keyof typeof fileRejectionReason];
|
|
6
|
+
export type FileRejected = {
|
|
7
|
+
file: File;
|
|
8
|
+
error: true;
|
|
9
|
+
reasons: string[];
|
|
10
|
+
};
|
|
11
|
+
export type FileAccepted = {
|
|
12
|
+
file: File;
|
|
13
|
+
error: false;
|
|
14
|
+
};
|
|
15
|
+
export type FileObject = FileRejected | FileAccepted;
|
|
16
|
+
export type FileRejectedPartitioned = {
|
|
17
|
+
file: File;
|
|
18
|
+
reasons: string[];
|
|
19
|
+
};
|
|
20
|
+
export type FilesPartitioned = {
|
|
21
|
+
accepted: File[];
|
|
22
|
+
rejected: FileRejectedPartitioned[];
|
|
23
|
+
};
|
|
24
|
+
export interface FileUploadBaseProps {
|
|
25
|
+
/**
|
|
26
|
+
* Indicates if it is possible to select multiple files at once.
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
multiple?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Indicates which file types to accept.
|
|
32
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept
|
|
33
|
+
*/
|
|
34
|
+
accept?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Maximum size of a file to accept
|
|
37
|
+
*/
|
|
38
|
+
maxSizeInBytes?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Custom validator that is used to decide if a file is accepted or rejected.
|
|
41
|
+
* @return true if the file is accepted, otherwise a string with the reason for rejection
|
|
42
|
+
*/
|
|
43
|
+
validator?: (file: File) => true | string;
|
|
44
|
+
/**
|
|
45
|
+
* Callback triggered on file select
|
|
46
|
+
*/
|
|
47
|
+
onSelect: (files: FileObject[], partitionedFiles: FilesPartitioned) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Disables the dropzone when current >= max, unless `disabled` prop is set to `false`.
|
|
50
|
+
*/
|
|
51
|
+
fileLimit?: {
|
|
52
|
+
max: number;
|
|
53
|
+
current: number;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileUpload.types.js","sourceRoot":"","sources":["../../../src/form/file-upload/FileUpload.types.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG;IACjC,QAAQ,EAAE,UAAmB;IAC7B,QAAQ,EAAE,UAAmB;CAC9B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.get = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* https://github.com/Shopify/polaris/blob/main/polaris-react/src/utilities/get.ts#L3
|
|
6
|
+
*/
|
|
7
|
+
const OBJECT_NOTATION_MATCHER = /(\w+)/g;
|
|
8
|
+
function get(keypath, ...objs) {
|
|
9
|
+
const keys = Array.isArray(keypath) ? keypath : getKeypath(keypath);
|
|
10
|
+
for (const obj of objs) {
|
|
11
|
+
if (!obj) {
|
|
12
|
+
continue;
|
|
13
|
+
}
|
|
14
|
+
let acc = obj;
|
|
15
|
+
for (let i = 0; i < keys.length; i++) {
|
|
16
|
+
const val = acc[keys[i]];
|
|
17
|
+
if (val === undefined) {
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
acc = val;
|
|
21
|
+
}
|
|
22
|
+
if (typeof acc === "string") {
|
|
23
|
+
return acc;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
throw new Error("Error translating key. The keypath does not resolve to a string.");
|
|
27
|
+
}
|
|
28
|
+
exports.get = get;
|
|
29
|
+
function getKeypath(str) {
|
|
30
|
+
const path = [];
|
|
31
|
+
let result;
|
|
32
|
+
while ((result = OBJECT_NOTATION_MATCHER.exec(str))) {
|
|
33
|
+
const [, first, second] = result;
|
|
34
|
+
path.push(first || second);
|
|
35
|
+
}
|
|
36
|
+
return path;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../src/form/file-upload/i18n/get.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAM,uBAAuB,GAAG,QAAQ,CAAC;AAEzC,SAAgB,GAAG,CACjB,OAA0B,EAC1B,GAAG,IAAuC;IAE1C,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAEpE,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,SAAS;QACX,CAAC;QAED,IAAI,GAAG,GAA+B,GAAG,CAAC;QAE1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,MAAM,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YACzB,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;gBACtB,SAAS;YACX,CAAC;YACD,GAAG,GAAG,GAAG,CAAC;QACZ,CAAC;QAED,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;YAC5B,OAAO,GAAG,CAAC;QACb,CAAC;IACH,CAAC;IAED,MAAM,IAAI,KAAK,CACb,kEAAkE,CACnE,CAAC;AACJ,CAAC;AA7BD,kBA6BC;AAED,SAAS,UAAU,CAAC,GAAW;IAC7B,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,IAAI,MAA8B,CAAC;IACnC,OAAO,CAAC,MAAM,GAAG,uBAAuB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QACpD,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC;IAC7B,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Component, ComponentTranslation, TranslationDictionary } from "./i18n.types";
|
|
3
|
+
import nb from "./locales/nb.json";
|
|
4
|
+
export declare const I18nContext: import("react").Context<TranslationDictionary | TranslationDictionary[]>;
|
|
5
|
+
type NestedKeyOf<ObjectType extends object> = {
|
|
6
|
+
[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object ? `${Key}.${NestedKeyOf<ObjectType[Key]>}` : `${Key}`;
|
|
7
|
+
}[keyof ObjectType & (string | number)];
|
|
8
|
+
export declare function useI18n<T extends Component>(componentName: T, ...local: (ComponentTranslation<T> | undefined)[]): (keypath: NestedKeyOf<(typeof nb)[T]>, options?: {
|
|
9
|
+
replacements: Record<string, string | number>;
|
|
10
|
+
}) => string;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useI18n = exports.I18nContext = void 0;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const get_1 = require("./get");
|
|
9
|
+
const nb_json_1 = __importDefault(require("./locales/nb.json"));
|
|
10
|
+
/**
|
|
11
|
+
* https://regex101.com/r/LYKWi3/1
|
|
12
|
+
*/
|
|
13
|
+
const REPLACE_REGEX = /{[^}]*}/g;
|
|
14
|
+
exports.I18nContext = (0, react_1.createContext)(nb_json_1.default);
|
|
15
|
+
function useI18n(componentName, ...local) {
|
|
16
|
+
const i18n = (0, react_1.useContext)(exports.I18nContext);
|
|
17
|
+
/**
|
|
18
|
+
* https://github.com/Shopify/polaris/blob/2115f9ba2f5bcbf2ad15745233501bff2db81ecf/polaris-react/src/utilities/i18n/I18n.ts#L24
|
|
19
|
+
*/
|
|
20
|
+
const translate = (keypath, options) => {
|
|
21
|
+
const text = (0, get_1.get)(keypath, ...local, ...(Array.isArray(i18n)
|
|
22
|
+
? i18n.map((t) => t[componentName])
|
|
23
|
+
: [i18n[componentName]]));
|
|
24
|
+
if (options === null || options === void 0 ? void 0 : options.replacements) {
|
|
25
|
+
return text.replace(REPLACE_REGEX, (match) => {
|
|
26
|
+
const replacement = match.substring(1, match.length - 1);
|
|
27
|
+
if (options.replacements[replacement] === undefined) {
|
|
28
|
+
const replacementData = JSON.stringify(options.replacements);
|
|
29
|
+
throw new Error(`Error translating key '${keypath}'. No replacement syntax ({}) found for key '${replacement}'. The following replacements were passed: '${replacementData}'`);
|
|
30
|
+
}
|
|
31
|
+
return options.replacements[replacement]; // can also be a number, but JS doesn't mind...
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return text;
|
|
35
|
+
};
|
|
36
|
+
return translate;
|
|
37
|
+
}
|
|
38
|
+
exports.useI18n = useI18n;
|
|
39
|
+
//# sourceMappingURL=i18n.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.context.js","sourceRoot":"","sources":["../../../../src/form/file-upload/i18n/i18n.context.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAkD;AAClD,+BAA4B;AAM5B,gEAAmC;AAEnC;;GAEG;AACH,MAAM,aAAa,GAAG,UAAU,CAAC;AAEpB,QAAA,WAAW,GAAG,IAAA,qBAAa,EAEtC,iBAAE,CAAC,CAAC;AASN,SAAgB,OAAO,CACrB,aAAgB,EAChB,GAAG,KAA8C;IAEjD,MAAM,IAAI,GAAG,IAAA,kBAAU,EAAC,mBAAW,CAAC,CAAC;IAErC;;OAEG;IACH,MAAM,SAAS,GAAG,CAChB,OAAoC,EACpC,OAA2D,EAC3D,EAAE;QACF,MAAM,IAAI,GAAG,IAAA,SAAG,EACd,OAAO,EACP,GAAG,KAAK,EACR,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;YACrB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAC3B,CAAC;QAEF,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,EAAE,CAAC;YAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE;gBAC3C,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;gBAEzD,IAAI,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,KAAK,SAAS,EAAE,CAAC;oBACpD,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;oBAE7D,MAAM,IAAI,KAAK,CACb,0BAA0B,OAAO,gDAAgD,WAAW,+CAA+C,eAAe,GAAG,CAC9J,CAAC;gBACJ,CAAC;gBAED,OAAO,OAAO,CAAC,YAAY,CAAC,WAAW,CAAW,CAAC,CAAC,+CAA+C;YACrG,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC;AAzCD,0BAyCC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import nb from "./locales/nb.json";
|
|
2
|
+
export interface TranslationObject {
|
|
3
|
+
[key: string]: string | TranslationObject | undefined;
|
|
4
|
+
}
|
|
5
|
+
export interface TranslationDictionary {
|
|
6
|
+
[key: string]: TranslationObject | undefined;
|
|
7
|
+
}
|
|
8
|
+
type RecursivePartial<T> = {
|
|
9
|
+
[P in keyof T]?: RecursivePartial<T[P]>;
|
|
10
|
+
};
|
|
11
|
+
export type Component = keyof typeof nb;
|
|
12
|
+
export type ComponentTranslation<T extends Component> = RecursivePartial<(typeof nb)[T]>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.types.js","sourceRoot":"","sources":["../../../../src/form/file-upload/i18n/i18n.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"FileUpload": {
|
|
3
|
+
"dropzone": {
|
|
4
|
+
"button": "Velg fil",
|
|
5
|
+
"buttonMultiple": "Velg filer",
|
|
6
|
+
"dragAndDrop": "Dra og slipp filen her",
|
|
7
|
+
"dragAndDropMultiple": "Dra og slipp filer her",
|
|
8
|
+
"drop": "Slipp",
|
|
9
|
+
"or": "eller",
|
|
10
|
+
"disabled": "Filopplasting er deaktivert",
|
|
11
|
+
"disabledFilelimit": "Du kan ikke laste opp flere filer"
|
|
12
|
+
},
|
|
13
|
+
"item": {
|
|
14
|
+
"retryButtonTitle": "Prøv å laste opp filen på nytt",
|
|
15
|
+
"deleteButtonTitle": "Slett filen",
|
|
16
|
+
"uploading": "Laster opp…",
|
|
17
|
+
"downloading": "Laster ned…"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.merge = void 0;
|
|
4
|
+
function merge(...objs) {
|
|
5
|
+
let final = {};
|
|
6
|
+
for (const obj of objs) {
|
|
7
|
+
final = mergeRecursively(final, obj);
|
|
8
|
+
}
|
|
9
|
+
return final;
|
|
10
|
+
}
|
|
11
|
+
exports.merge = merge;
|
|
12
|
+
function mergeRecursively(objA, objB) {
|
|
13
|
+
const objARes = Object.assign({}, objA);
|
|
14
|
+
for (const key in objB) {
|
|
15
|
+
if (!(key in objB)) {
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
const a = objARes[key];
|
|
19
|
+
const b = objB[key];
|
|
20
|
+
if (b && typeof b !== "string" && typeof a !== "string") {
|
|
21
|
+
objARes[key] = mergeRecursively(a, b);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
objARes[key] = b;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return objARes;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=merge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../../src/form/file-upload/i18n/merge.ts"],"names":[],"mappings":";;;AAEA,SAAgB,KAAK,CAAC,GAAG,IAA6B;IACpD,IAAI,KAAK,GAA0B,EAAE,CAAC;IAEtC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,KAAK,GAAG,gBAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AARD,sBAQC;AAED,SAAS,gBAAgB,CACvB,IAAO,EACP,IAA+C;IAE/C,MAAM,OAAO,qBAAQ,IAAI,CAAE,CAAC;IAE5B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC;YACnB,SAAS;QACX,CAAC;QAED,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QACvB,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;YACxD,OAAO,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACxC,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as UNSAFE_FileUpload } from "./FileUpload";
|
|
2
|
+
export { default as UNSAFE_FileUploadDropzone } from "./parts/dropzone/Dropzone";
|
|
3
|
+
export { type FileUploadDropzoneProps } from "./parts/dropzone/dropzone.types";
|
|
4
|
+
export { default as UNSAFE_FileUploadTrigger, type FileUploadTriggerProps, } from "./parts/Trigger";
|
|
5
|
+
export { type FileObject, type FileRejected, type FileAccepted, type FileRejectedPartitioned, type FilesPartitioned, type FileRejectionReason, } from "./FileUpload.types";
|
|
6
|
+
export { default as UNSAFE_FileUploadItem, type FileUploadItemProps, } from "./parts/item/Item";
|
|
7
|
+
export { type FileItem, type FileMetadata } from "./parts/item/Item.types";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.UNSAFE_FileUploadItem = exports.UNSAFE_FileUploadTrigger = exports.UNSAFE_FileUploadDropzone = exports.UNSAFE_FileUpload = void 0;
|
|
8
|
+
var FileUpload_1 = require("./FileUpload");
|
|
9
|
+
Object.defineProperty(exports, "UNSAFE_FileUpload", { enumerable: true, get: function () { return __importDefault(FileUpload_1).default; } });
|
|
10
|
+
var Dropzone_1 = require("./parts/dropzone/Dropzone");
|
|
11
|
+
Object.defineProperty(exports, "UNSAFE_FileUploadDropzone", { enumerable: true, get: function () { return __importDefault(Dropzone_1).default; } });
|
|
12
|
+
var Trigger_1 = require("./parts/Trigger");
|
|
13
|
+
Object.defineProperty(exports, "UNSAFE_FileUploadTrigger", { enumerable: true, get: function () { return __importDefault(Trigger_1).default; } });
|
|
14
|
+
var Item_1 = require("./parts/item/Item");
|
|
15
|
+
Object.defineProperty(exports, "UNSAFE_FileUploadItem", { enumerable: true, get: function () { return __importDefault(Item_1).default; } });
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/form/file-upload/index.ts"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;AACb,2CAA4D;AAAnD,gIAAA,OAAO,OAAqB;AACrC,sDAAiF;AAAxE,sIAAA,OAAO,OAA6B;AAE7C,2CAGyB;AAFvB,oIAAA,OAAO,OAA4B;AAWrC,0CAG2B;AAFzB,8HAAA,OAAO,OAAyB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FileUploadBaseProps } from "../FileUpload.types";
|
|
3
|
+
export interface FileUploadTriggerProps extends Omit<FileUploadBaseProps, "fileLimit"> {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const Trigger: React.ForwardRefExoticComponent<FileUploadTriggerProps & React.RefAttributes<HTMLInputElement>>;
|
|
7
|
+
export default Trigger;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
const react_1 = __importStar(require("react"));
|
|
27
|
+
const Slot_1 = require("../../../util/Slot");
|
|
28
|
+
const useFileUpload_1 = require("../useFileUpload");
|
|
29
|
+
const Trigger = (0, react_1.forwardRef)(({ children, multiple = true, accept, onSelect, validator, maxSizeInBytes, }, ref) => {
|
|
30
|
+
const { onChange, inputRef, mergedRef } = (0, useFileUpload_1.useFileUpload)({
|
|
31
|
+
ref,
|
|
32
|
+
onSelect,
|
|
33
|
+
validator,
|
|
34
|
+
accept,
|
|
35
|
+
maxSizeInBytes,
|
|
36
|
+
disabled: false,
|
|
37
|
+
});
|
|
38
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
39
|
+
react_1.default.createElement(Slot_1.Slot, { onClick: () => { var _a; return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.click(); } }, children),
|
|
40
|
+
react_1.default.createElement("input", { ref: mergedRef, type: "file", style: { display: "none" }, multiple: multiple, accept: accept, onChange: onChange })));
|
|
41
|
+
});
|
|
42
|
+
exports.default = Trigger;
|
|
43
|
+
//# sourceMappingURL=Trigger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Trigger.js","sourceRoot":"","sources":["../../../../src/form/file-upload/parts/Trigger.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAC1C,6CAA0C;AAE1C,oDAAiD;AAOjD,MAAM,OAAO,GAAG,IAAA,kBAAU,EACxB,CACE,EACE,QAAQ,EACR,QAAQ,GAAG,IAAI,EACf,MAAM,EACN,QAAQ,EACR,SAAS,EACT,cAAc,GACS,EACzB,GAAG,EACH,EAAE;IACF,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAA,6BAAa,EAAC;QACtD,GAAG;QACH,QAAQ;QACR,SAAS;QACT,MAAM;QACN,cAAc;QACd,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAC;IAEH,OAAO,CACL;QACE,8BAAC,WAAI,IAAC,OAAO,EAAE,GAAG,EAAE,WAAC,OAAA,MAAA,QAAQ,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAA,EAAA,IAAG,QAAQ,CAAQ;QACjE,yCACE,GAAG,EAAE,SAAS,EACd,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAC1B,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,GAClB,CACD,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|