@webiny/admin-ui 6.0.0-alpha.0 → 6.0.0-alpha.2
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/Accordion/Accordion.d.ts +1 -20
- package/Accordion/Accordion.js.map +1 -1
- package/Accordion/Accordion.mdx +11 -4
- package/Accordion/Accordion.stories.d.ts +1 -1
- package/Accordion/Accordion.stories.js +15 -9
- package/Accordion/Accordion.stories.js.map +1 -1
- package/Accordion/components/AccordionContent.js +1 -1
- package/Accordion/components/AccordionContent.js.map +1 -1
- package/Accordion/components/AccordionItem.d.ts +1 -19
- package/Accordion/components/AccordionItem.js +3 -7
- package/Accordion/components/AccordionItem.js.map +1 -1
- package/Accordion/components/AccordionItemAction.d.ts +1 -1
- package/Accordion/components/AccordionItemAction.js.map +1 -1
- package/Accordion/components/AccordionItemDragHandle.d.ts +8 -0
- package/Accordion/components/AccordionItemDragHandle.js +36 -0
- package/Accordion/components/AccordionItemDragHandle.js.map +1 -0
- package/Accordion/components/AccordionItemIcon.d.ts +1 -1
- package/Accordion/components/AccordionItemIcon.js.map +1 -1
- package/Accordion/components/AccordionTrigger.d.ts +2 -2
- package/Accordion/components/AccordionTrigger.js +5 -4
- package/Accordion/components/AccordionTrigger.js.map +1 -1
- package/Alert/Alert.d.ts +1 -1
- package/AutoComplete/AutoComplete.d.ts +2 -2
- package/AutoComplete/AutoComplete.js.map +1 -1
- package/AutoComplete/domains/AutoCompleteOption.d.ts +1 -1
- package/AutoComplete/domains/AutoCompleteOption.js.map +1 -1
- package/AutoComplete/domains/AutoCompleteOptionDto.d.ts +1 -1
- package/AutoComplete/domains/AutoCompleteOptionDto.js.map +1 -1
- package/AutoComplete/primitives/AutoCompletePrimitive.d.ts +3 -6
- package/AutoComplete/primitives/AutoCompletePrimitive.js +1 -0
- package/AutoComplete/primitives/AutoCompletePrimitive.js.map +1 -1
- package/AutoComplete/primitives/AutoCompletePrimitive.stories.d.ts +3 -0
- package/AutoComplete/primitives/AutoCompletePrimitive.stories.js +30 -0
- package/AutoComplete/primitives/AutoCompletePrimitive.stories.js.map +1 -1
- package/AutoComplete/primitives/components/AutoCompleteInputIcons.d.ts +1 -0
- package/AutoComplete/primitives/components/AutoCompleteInputIcons.js +3 -2
- package/AutoComplete/primitives/components/AutoCompleteInputIcons.js.map +1 -1
- package/AutoComplete/primitives/components/AutoCompleteList.d.ts +1 -1
- package/AutoComplete/primitives/components/AutoCompleteList.js.map +1 -1
- package/AutoComplete/primitives/presenters/AutoCompleteListOptionsPresenter.d.ts +2 -2
- package/AutoComplete/primitives/presenters/AutoCompleteListOptionsPresenter.js.map +1 -1
- package/AutoComplete/primitives/presenters/AutoCompletePresenter.d.ts +3 -3
- package/AutoComplete/primitives/presenters/AutoCompletePresenter.js.map +1 -1
- package/AutoComplete/primitives/useAutoComplete.d.ts +1 -1
- package/AutoComplete/primitives/useAutoComplete.js.map +1 -1
- package/Button/Button.js +2 -2
- package/Button/Button.js.map +1 -1
- package/Button/CopyButton.d.ts +2 -3
- package/Button/CopyButton.js.map +1 -1
- package/Button/IconButton.d.ts +1 -1
- package/Button/IconButton.js +2 -2
- package/Button/IconButton.js.map +1 -1
- package/Card/Card.d.ts +2 -1
- package/Card/Card.js.map +1 -1
- package/Card/components/CardFooter.d.ts +1 -1
- package/Card/components/CardFooter.js.map +1 -1
- package/Card/components/CardHeader.d.ts +1 -1
- package/Card/components/CardHeader.js.map +1 -1
- package/Card/components/CardRoot.d.ts +4 -4
- package/Card/components/CardRoot.js.map +1 -1
- package/Checkbox/Checkbox.d.ts +2 -2
- package/Checkbox/Checkbox.js.map +1 -1
- package/Checkbox/domains/CheckboxItem.d.ts +1 -1
- package/Checkbox/domains/CheckboxItem.js.map +1 -1
- package/Checkbox/domains/CheckboxItemDto.d.ts +1 -1
- package/Checkbox/domains/CheckboxItemDto.js.map +1 -1
- package/Checkbox/domains/CheckboxItemFormatted.d.ts +1 -1
- package/Checkbox/domains/CheckboxItemFormatted.js.map +1 -1
- package/Checkbox/domains/CheckboxItemMapper.d.ts +2 -2
- package/Checkbox/domains/CheckboxItemMapper.js.map +1 -1
- package/Checkbox/primitives/CheckboxPrimitive.d.ts +6 -0
- package/Checkbox/primitives/presenters/CheckboxPresenter.d.ts +1 -1
- package/Checkbox/primitives/presenters/CheckboxPresenter.js.map +1 -1
- package/Checkbox/primitives/useCheckbox.d.ts +1 -1
- package/Checkbox/primitives/useCheckbox.js.map +1 -1
- package/CheckboxGroup/CheckboxGroup.d.ts +2 -2
- package/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/CheckboxGroup/primitives/CheckboxGroupPrimitive.d.ts +1 -1
- package/CheckboxGroup/primitives/CheckboxGroupPrimitive.js.map +1 -1
- package/CheckboxGroup/primitives/presenters/CheckboxGroupPresenter.d.ts +1 -1
- package/CheckboxGroup/primitives/presenters/CheckboxGroupPresenter.js.map +1 -1
- package/CheckboxGroup/primitives/useCheckboxGroup.d.ts +1 -1
- package/CheckboxGroup/primitives/useCheckboxGroup.js.map +1 -1
- package/CodeEditor/CodeEditor.d.ts +2 -2
- package/CodeEditor/CodeEditor.js.map +1 -1
- package/CodeEditor/CodeEditorPrimitive.d.ts +1 -3
- package/CodeEditor/CodeEditorPrimitive.js +1 -2
- package/CodeEditor/CodeEditorPrimitive.js.map +1 -1
- package/ColorPicker/ColorPicker.d.ts +2 -2
- package/ColorPicker/ColorPicker.js.map +1 -1
- package/ColorPicker/primitives/presenters/ColorPickerPresenter.d.ts +1 -1
- package/ColorPicker/primitives/presenters/ColorPickerPresenter.js.map +1 -1
- package/ColorPicker/primitives/presenters/ColorPickerPresenter.test.js.map +1 -1
- package/ColorPicker/primitives/useColorPicker.d.ts +1 -1
- package/ColorPicker/primitives/useColorPicker.js.map +1 -1
- package/Command/Command.d.ts +5 -5
- package/Command/components/Input.d.ts +1 -1
- package/Command/components/Input.js.map +1 -1
- package/Command/domain/CommandOption.d.ts +1 -1
- package/Command/domain/CommandOption.js.map +1 -1
- package/Command/domain/CommandOptionFormatter.d.ts +2 -2
- package/Command/domain/CommandOptionFormatter.js.map +1 -1
- package/DataList/DataList.d.ts +1 -1
- package/DataList/DataList.js.map +1 -1
- package/DataList/DataListIcons.d.ts +1 -1
- package/DataList/DataListIcons.js.map +1 -1
- package/DataList/DataListWithSections.d.ts +1 -1
- package/DataList/DataListWithSections.js.map +1 -1
- package/DataList/components/Filters.d.ts +1 -1
- package/DataList/components/Filters.js.map +1 -1
- package/DataList/components/Loader.d.ts +1 -1
- package/DataList/components/Loader.js.map +1 -1
- package/DataList/components/MultiSelectActions.d.ts +1 -1
- package/DataList/components/MultiSelectActions.js.map +1 -1
- package/DataList/components/MultiSelectAll.d.ts +1 -1
- package/DataList/components/MultiSelectAll.js.map +1 -1
- package/DataList/components/Pagination.d.ts +1 -1
- package/DataList/components/Pagination.js.map +1 -1
- package/DataList/components/RefreshButton.d.ts +1 -1
- package/DataList/components/RefreshButton.js.map +1 -1
- package/DataList/components/Sorters.d.ts +1 -1
- package/DataList/components/Sorters.js.map +1 -1
- package/DataTable/DataTable.d.ts +1 -1
- package/DataTable/DataTable.js.map +1 -1
- package/DataTable/DataTable.stories.d.ts +2 -1
- package/DataTable/DataTable.stories.js.map +1 -1
- package/DataTable/components/ColumnsVisibility.d.ts +1 -1
- package/DataTable/components/ColumnsVisibility.js.map +1 -1
- package/Dialog/components/CancelButton.d.ts +1 -1
- package/Dialog/components/CancelButton.js.map +1 -1
- package/Dialog/components/ConfirmButton.d.ts +1 -1
- package/Dialog/components/ConfirmButton.js.map +1 -1
- package/Dialog/components/DialogContent.d.ts +1 -1
- package/Dialog/components/DialogFooter.d.ts +1 -1
- package/Dialog/components/DialogTitle.d.ts +1 -1
- package/Dialog/components/Icon.d.ts +1 -1
- package/Dialog/components/Icon.js.map +1 -1
- package/Drawer/components/CancelButton.d.ts +1 -1
- package/Drawer/components/CancelButton.js.map +1 -1
- package/Drawer/components/ConfirmButton.d.ts +1 -1
- package/Drawer/components/ConfirmButton.js.map +1 -1
- package/Drawer/components/Icon.d.ts +1 -1
- package/Drawer/components/Icon.js.map +1 -1
- package/DropdownMenu/components/DropdownMenuItem.d.ts +1 -1
- package/DropdownMenu/components/DropdownMenuItem.js.map +1 -1
- package/FilePicker/FilePicker.js +9 -13
- package/FilePicker/FilePicker.js.map +1 -1
- package/FilePicker/domains/FileItemFormatter.d.ts +1 -1
- package/FilePicker/domains/FileItemFormatter.js.map +1 -1
- package/FilePicker/primitives/FilePickerPrimitive.d.ts +12 -8
- package/FilePicker/primitives/FilePickerPrimitive.js +15 -5
- package/FilePicker/primitives/FilePickerPrimitive.js.map +1 -1
- package/FilePicker/primitives/components/Description.d.ts +8 -0
- package/FilePicker/primitives/components/Description.js +19 -0
- package/FilePicker/primitives/components/Description.js.map +1 -0
- package/FilePicker/primitives/components/Label.d.ts +3 -3
- package/FilePicker/primitives/components/Label.js +8 -9
- package/FilePicker/primitives/components/Label.js.map +1 -1
- package/FilePicker/primitives/components/Trigger.js +22 -16
- package/FilePicker/primitives/components/Trigger.js.map +1 -1
- package/FilePicker/primitives/components/index.d.ts +1 -0
- package/FilePicker/primitives/components/index.js +1 -0
- package/FilePicker/primitives/components/index.js.map +1 -1
- package/FilePicker/primitives/components/previews/FilePreview.d.ts +2 -2
- package/FilePicker/primitives/components/previews/FilePreview.js.map +1 -1
- package/FilePicker/primitives/components/types.d.ts +2 -2
- package/FilePicker/primitives/components/types.js.map +1 -1
- package/FormComponent/FormComponent.d.ts +2 -2
- package/FormComponent/FormComponent.js.map +1 -1
- package/FormComponent/Label.js.map +1 -1
- package/Grid/Grid.d.ts +4 -4
- package/Heading/Heading.d.ts +1 -1
- package/IconPicker/IconPicker.d.ts +2 -2
- package/IconPicker/IconPicker.js.map +1 -1
- package/IconPicker/domains/IconPickerFontAwesome.d.ts +1 -1
- package/IconPicker/domains/IconPickerFontAwesome.js.map +1 -1
- package/IconPicker/domains/IconPickerIcon.d.ts +1 -1
- package/IconPicker/domains/IconPickerIcon.js.map +1 -1
- package/IconPicker/domains/IconPickerIconFormatter.d.ts +2 -2
- package/IconPicker/domains/IconPickerIconFormatter.js.map +1 -1
- package/IconPicker/primitives/IconPickerPrimitive.d.ts +2 -2
- package/IconPicker/primitives/IconPickerPrimitive.js.map +1 -1
- package/IconPicker/primitives/components/IconPickerGrid.d.ts +1 -1
- package/IconPicker/primitives/components/IconPickerGrid.js.map +1 -1
- package/IconPicker/primitives/components/IconPickerIcon.d.ts +1 -1
- package/IconPicker/primitives/components/IconPickerIcon.js.map +1 -1
- package/IconPicker/primitives/components/IconPickerInput.js.map +1 -1
- package/IconPicker/primitives/presenters/IconPickerPresenter.d.ts +1 -1
- package/IconPicker/primitives/presenters/IconPickerPresenter.js.map +1 -1
- package/IconPicker/primitives/useIconPicker.d.ts +1 -1
- package/IconPicker/primitives/useIconPicker.js.map +1 -1
- package/Input/InputPrimitive.d.ts +5 -14
- package/Input/InputPrimitive.js +15 -124
- package/Input/InputPrimitive.js.map +1 -1
- package/Input/InputPrimitive.stories.js +19 -4
- package/Input/InputPrimitive.stories.js.map +1 -1
- package/Link/Link.d.ts +1 -1
- package/List/components/ListItemAction.d.ts +1 -1
- package/List/components/ListItemAction.js.map +1 -1
- package/List/components/ListItemHandle.d.ts +1 -1
- package/List/components/ListItemHandle.js.map +1 -1
- package/List/components/ListItemIcon.d.ts +1 -1
- package/List/components/ListItemIcon.js.map +1 -1
- package/Loader/OverlayLoader.d.ts +1 -1
- package/Loader/OverlayLoader.js.map +1 -1
- package/MultiAutoComplete/MultiAutoComplete.d.ts +2 -2
- package/MultiAutoComplete/MultiAutoComplete.js.map +1 -1
- package/MultiAutoComplete/domains/MultiAutoCompleteOption.d.ts +1 -1
- package/MultiAutoComplete/domains/MultiAutoCompleteOption.js.map +1 -1
- package/MultiAutoComplete/domains/MultiAutoCompleteOptionDto.d.ts +1 -1
- package/MultiAutoComplete/domains/MultiAutoCompleteOptionDto.js.map +1 -1
- package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.d.ts +3 -3
- package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.js +1 -0
- package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.js.map +1 -1
- package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.stories.d.ts +3 -0
- package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.stories.js +78 -4
- package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.stories.js.map +1 -1
- package/MultiAutoComplete/primitives/components/MultiAutoCompleteInput.d.ts +2 -2
- package/MultiAutoComplete/primitives/components/MultiAutoCompleteInput.js +7 -13
- package/MultiAutoComplete/primitives/components/MultiAutoCompleteInput.js.map +1 -1
- package/MultiAutoComplete/primitives/components/MultiAutoCompleteInputIcons.d.ts +1 -0
- package/MultiAutoComplete/primitives/components/MultiAutoCompleteInputIcons.js +3 -2
- package/MultiAutoComplete/primitives/components/MultiAutoCompleteInputIcons.js.map +1 -1
- package/MultiAutoComplete/primitives/components/MultiAutoCompleteList.d.ts +1 -1
- package/MultiAutoComplete/primitives/components/MultiAutoCompleteList.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteListOptionsPresenter.d.ts +2 -2
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteListOptionsPresenter.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteListOptionsPresenterWithUniqueValues.d.ts +2 -2
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteListOptionsPresenterWithUniqueValues.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenter.d.ts +5 -5
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenter.js +4 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenter.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenter.test.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenterWithFreeInput.d.ts +2 -2
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenterWithFreeInput.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenterWithFreeInput.test.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteSelectedOptionsPresenter.d.ts +2 -2
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteSelectedOptionsPresenter.js +4 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteSelectedOptionsPresenter.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteTemporaryOptionPresenter.d.ts +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteTemporaryOptionPresenter.js.map +1 -1
- package/MultiAutoComplete/primitives/useMultiAutoComplete.d.ts +1 -1
- package/MultiAutoComplete/primitives/useMultiAutoComplete.js.map +1 -1
- package/MultiFilePicker/MultiFilePicker.js +8 -12
- package/MultiFilePicker/MultiFilePicker.js.map +1 -1
- package/MultiFilePicker/primitives/MultiFilePickerPrimitive.d.ts +18 -10
- package/MultiFilePicker/primitives/MultiFilePickerPrimitive.js +16 -6
- package/MultiFilePicker/primitives/MultiFilePickerPrimitive.js.map +1 -1
- package/RadioGroup/RadioGroup.d.ts +2 -2
- package/RadioGroup/RadioGroup.js.map +1 -1
- package/RadioGroup/domains/RadioItem.d.ts +1 -1
- package/RadioGroup/domains/RadioItem.js.map +1 -1
- package/RadioGroup/domains/RadioItemFormatted.d.ts +1 -1
- package/RadioGroup/domains/RadioItemFormatted.js.map +1 -1
- package/RadioGroup/domains/RadioItemFormatter.d.ts +2 -2
- package/RadioGroup/domains/RadioItemFormatter.js.map +1 -1
- package/RadioGroup/domains/RadioItemParams.d.ts +1 -1
- package/RadioGroup/domains/RadioItemParams.js.map +1 -1
- package/RadioGroup/primitives/RadioGroupPrimitive.d.ts +1 -1
- package/RadioGroup/primitives/RadioGroupPrimitive.js +1 -1
- package/RadioGroup/primitives/RadioGroupPrimitive.js.map +1 -1
- package/RadioGroup/primitives/presenters/RadioGroupPresenter.d.ts +2 -2
- package/RadioGroup/primitives/presenters/RadioGroupPresenter.js.map +1 -1
- package/RadioGroup/primitives/useRadioGroup.d.ts +1 -1
- package/RadioGroup/primitives/useRadioGroup.js.map +1 -1
- package/RangeSlider/RangeSlider.d.ts +2 -2
- package/RangeSlider/RangeSlider.js.map +1 -1
- package/RangeSlider/primitives/RangeSliderPrimitive.d.ts +1 -1
- package/RangeSlider/primitives/RangeSliderPrimitive.js.map +1 -1
- package/RangeSlider/primitives/presenters/RangeSliderPresenter.d.ts +1 -1
- package/RangeSlider/primitives/presenters/RangeSliderPresenter.js.map +1 -1
- package/RangeSlider/primitives/useRangeSlider.d.ts +1 -1
- package/RangeSlider/primitives/useRangeSlider.js.map +1 -1
- package/RichTextEditor/RichTextEditor.d.ts +2 -2
- package/RichTextEditor/RichTextEditor.js.map +1 -1
- package/RichTextEditor/RichTextEditorPrimitive.d.ts +1 -1
- package/RichTextEditor/RichTextEditorPrimitive.js.map +1 -1
- package/RichTextEditor/createPropsFromConfig.d.ts +1 -1
- package/RichTextEditor/createPropsFromConfig.js.map +1 -1
- package/Select/Select.d.ts +2 -2
- package/Select/Select.js.map +1 -1
- package/Select/domains/SelectOption.d.ts +1 -1
- package/Select/domains/SelectOption.js.map +1 -1
- package/Select/domains/SelectOptionMapper.d.ts +2 -2
- package/Select/domains/SelectOptionMapper.js.map +1 -1
- package/Select/primitives/SelectPrimitive.d.ts +2 -2
- package/Select/primitives/SelectPrimitive.js +4 -3
- package/Select/primitives/SelectPrimitive.js.map +1 -1
- package/Select/primitives/SelectPrimitive.stories.d.ts +3 -0
- package/Select/primitives/SelectPrimitive.stories.js +28 -0
- package/Select/primitives/SelectPrimitive.stories.js.map +1 -1
- package/Select/primitives/components/SelectTrigger.d.ts +1 -1
- package/Select/primitives/components/SelectTrigger.js +6 -1
- package/Select/primitives/components/SelectTrigger.js.map +1 -1
- package/Select/primitives/presenters/SelectPresenter.d.ts +2 -1
- package/Select/primitives/presenters/SelectPresenter.js.map +1 -1
- package/Select/primitives/useSelect.d.ts +1 -1
- package/Select/primitives/useSelect.js.map +1 -1
- package/Separator/Separator.d.ts +2 -2
- package/Sidebar/components/SidebarRoot.js +1 -4
- package/Sidebar/components/SidebarRoot.js.map +1 -1
- package/Sidebar/components/items/SidebarMenuItem.d.ts +1 -1
- package/Sidebar/components/items/SidebarMenuItem.js.map +1 -1
- package/Skeleton/Skeleton.d.ts +1 -1
- package/Slider/Slider.d.ts +2 -2
- package/Slider/Slider.js.map +1 -1
- package/Slider/primitives/SliderPrimitive.d.ts +1 -1
- package/Slider/primitives/SliderPrimitive.js.map +1 -1
- package/Slider/primitives/components/SliderThumb.d.ts +1 -1
- package/Slider/primitives/components/SliderThumb.js.map +1 -1
- package/Slider/primitives/components/SliderTooltip.d.ts +1 -1
- package/Slider/primitives/presenters/SliderPresenter.d.ts +1 -1
- package/Slider/primitives/presenters/SliderPresenter.js.map +1 -1
- package/Slider/primitives/useSlider.d.ts +1 -1
- package/Slider/primitives/useSlider.js.map +1 -1
- package/Switch/Switch.d.ts +2 -2
- package/Switch/Switch.js.map +1 -1
- package/Switch/domains/SwitchItem.d.ts +1 -1
- package/Switch/domains/SwitchItem.js.map +1 -1
- package/Switch/domains/SwitchItemDto.d.ts +1 -1
- package/Switch/domains/SwitchItemDto.js.map +1 -1
- package/Switch/domains/SwitchItemFormatted.d.ts +1 -1
- package/Switch/domains/SwitchItemFormatted.js.map +1 -1
- package/Switch/domains/SwitchItemMapper.d.ts +2 -2
- package/Switch/domains/SwitchItemMapper.js.map +1 -1
- package/Switch/primitives/SwitchPrimitive.d.ts +1 -1
- package/Switch/primitives/SwitchPrimitive.js.map +1 -1
- package/Switch/primitives/presenters/SwitchPresenter.d.ts +2 -2
- package/Switch/primitives/presenters/SwitchPresenter.js.map +1 -1
- package/Switch/primitives/useSwitch.d.ts +1 -1
- package/Switch/primitives/useSwitch.js.map +1 -1
- package/Tabs/Tabs.d.ts +1 -1
- package/Tabs/Tabs.js.map +1 -1
- package/Tabs/components/Context.d.ts +1 -1
- package/Tabs/components/Context.js.map +1 -1
- package/Tabs/components/Tab.d.ts +2 -2
- package/Tabs/components/Tab.js.map +1 -1
- package/Tag/Tag.d.ts +1 -1
- package/Tag/Tag.js.map +1 -1
- package/Tags/Tags.d.ts +24 -0
- package/Tags/Tags.js +59 -0
- package/Tags/Tags.js.map +1 -0
- package/Tags/Tags.stories.d.ts +13 -0
- package/Tags/Tags.stories.js +92 -0
- package/Tags/Tags.stories.js.map +1 -0
- package/Tags/domain/TagItem.d.ts +18 -0
- package/Tags/domain/TagItem.js +26 -0
- package/Tags/domain/TagItem.js.map +1 -0
- package/Tags/domain/TagItemDto.d.ts +5 -0
- package/Tags/domain/TagItemDto.js +3 -0
- package/Tags/domain/TagItemDto.js.map +1 -0
- package/Tags/domain/TagItemFormatted.d.ts +5 -0
- package/Tags/domain/TagItemFormatted.js +3 -0
- package/Tags/domain/TagItemFormatted.js.map +1 -0
- package/Tags/domain/TagItemMapper.d.ts +5 -0
- package/Tags/domain/TagItemMapper.js +11 -0
- package/Tags/domain/TagItemMapper.js.map +1 -0
- package/Tags/domain/index.d.ts +4 -0
- package/Tags/domain/index.js +6 -0
- package/Tags/domain/index.js.map +1 -0
- package/Tags/index.d.ts +1 -0
- package/Tags/index.js +3 -0
- package/Tags/index.js.map +1 -0
- package/Tags/primitives/TagsPrimitive.d.ts +81 -0
- package/Tags/primitives/TagsPrimitive.js +54 -0
- package/Tags/primitives/TagsPrimitive.js.map +1 -0
- package/Tags/primitives/TagsPrimitive.stories.d.ts +26 -0
- package/Tags/primitives/TagsPrimitive.stories.js +185 -0
- package/Tags/primitives/TagsPrimitive.stories.js.map +1 -0
- package/Tags/primitives/index.d.ts +1 -0
- package/Tags/primitives/index.js +3 -0
- package/Tags/primitives/index.js.map +1 -0
- package/Tags/primitives/presenters/TagsInputPresenter.d.ts +22 -0
- package/Tags/primitives/presenters/TagsInputPresenter.js +22 -0
- package/Tags/primitives/presenters/TagsInputPresenter.js.map +1 -0
- package/Tags/primitives/presenters/TagsPresenter.d.ts +42 -0
- package/Tags/primitives/presenters/TagsPresenter.js +68 -0
- package/Tags/primitives/presenters/TagsPresenter.js.map +1 -0
- package/Tags/primitives/presenters/TagsPresenter.test.d.ts +1 -0
- package/Tags/primitives/presenters/TagsPresenter.test.js +220 -0
- package/Tags/primitives/presenters/TagsPresenter.test.js.map +1 -0
- package/Tags/primitives/presenters/TagsValuesPresenter.d.ts +28 -0
- package/Tags/primitives/presenters/TagsValuesPresenter.js +41 -0
- package/Tags/primitives/presenters/TagsValuesPresenter.js.map +1 -0
- package/Tags/primitives/presenters/index.d.ts +3 -0
- package/Tags/primitives/presenters/index.js +5 -0
- package/Tags/primitives/presenters/index.js.map +1 -0
- package/Tags/primitives/useTags.d.ts +15 -0
- package/Tags/primitives/useTags.js +36 -0
- package/Tags/primitives/useTags.js.map +1 -0
- package/Textarea/Textarea.d.ts +3 -3
- package/Textarea/Textarea.js.map +1 -1
- package/Toast/Toast.d.ts +1 -1
- package/Toast/Toast.js.map +1 -1
- package/Toast/useToast.js +8 -2
- package/Toast/useToast.js.map +1 -1
- package/Tooltip/Tooltip.d.ts +1 -1
- package/Tooltip/Tooltip.js.map +1 -1
- package/Tree/components/ItemDragHandle.d.ts +2 -1
- package/Tree/components/ItemDragHandle.js.map +1 -1
- package/Tree/domains/NodeFormatter.d.ts +1 -1
- package/Tree/domains/NodeFormatter.js.map +1 -1
- package/Tree/useTree.d.ts +1 -1
- package/Tree/useTree.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +9 -8
- package/utils.d.ts +1 -1
- package/utils.js.map +1 -1
- package/Accordion/components/AccordionItemHandle.d.ts +0 -26
- package/Accordion/components/AccordionItemHandle.js +0 -29
- package/Accordion/components/AccordionItemHandle.js.map +0 -1
package/FilePicker/FilePicker.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from "react";
|
|
2
2
|
import { makeDecoratable, withStaticProps } from "../utils";
|
|
3
|
-
import { FilePickerPrimitive } from "./primitives";
|
|
3
|
+
import { FilePickerDescription, FilePickerLabel, FilePickerPrimitive } from "./primitives";
|
|
4
4
|
import { FormComponentErrorMessage, FormComponentNote } from "../FormComponent";
|
|
5
|
-
import { ImagePreview, RichItemPreview, TextOnlyPreview
|
|
5
|
+
import { ImagePreview, RichItemPreview, TextOnlyPreview } from "./primitives/components";
|
|
6
6
|
const BaseFilePicker = ({
|
|
7
7
|
label,
|
|
8
8
|
description,
|
|
@@ -31,21 +31,17 @@ const BaseFilePicker = ({
|
|
|
31
31
|
}, [validate, originalOnBlur]);
|
|
32
32
|
return /*#__PURE__*/React.createElement("div", {
|
|
33
33
|
className: "wby-w-full"
|
|
34
|
-
}, type !== "area" && /*#__PURE__*/React.createElement(
|
|
34
|
+
}, type !== "area" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FilePickerLabel, {
|
|
35
35
|
label: label,
|
|
36
36
|
required: required,
|
|
37
37
|
disabled: disabled,
|
|
38
|
-
description: description,
|
|
39
38
|
invalid: invalid
|
|
40
|
-
}), /*#__PURE__*/React.createElement(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
className: "wby-m-0",
|
|
47
|
-
invalid: invalid
|
|
48
|
-
}),
|
|
39
|
+
}), /*#__PURE__*/React.createElement(FilePickerDescription, {
|
|
40
|
+
description: description,
|
|
41
|
+
disabled: disabled
|
|
42
|
+
})), /*#__PURE__*/React.createElement(FilePickerPrimitive, Object.assign({}, props, {
|
|
43
|
+
label: label,
|
|
44
|
+
description: description,
|
|
49
45
|
disabled: disabled,
|
|
50
46
|
invalid: invalid,
|
|
51
47
|
onBlur: onBlur,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useMemo","makeDecoratable","withStaticProps","FilePickerPrimitive","FormComponentErrorMessage","FormComponentNote","ImagePreview","RichItemPreview","TextOnlyPreview","
|
|
1
|
+
{"version":3,"names":["React","useCallback","useMemo","makeDecoratable","withStaticProps","FilePickerDescription","FilePickerLabel","FilePickerPrimitive","FormComponentErrorMessage","FormComponentNote","ImagePreview","RichItemPreview","TextOnlyPreview","BaseFilePicker","label","description","note","required","disabled","validation","validate","onBlur","originalOnBlur","type","props","isValid","validationIsValid","message","validationMessage","invalid","e","persist","createElement","className","Fragment","Object","assign","text","DecoratableFilePicker","FilePicker","Preview","Image","RichItem","TextOnly"],"sources":["FilePicker.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport { makeDecoratable, withStaticProps } from \"~/utils\";\nimport {\n FilePickerDescription,\n FilePickerLabel,\n FilePickerPrimitive,\n type FilePickerPrimitiveProps\n} from \"./primitives\";\nimport {\n FormComponentErrorMessage,\n FormComponentNote,\n type FormComponentProps\n} from \"~/FormComponent\";\nimport { ImagePreview, RichItemPreview, TextOnlyPreview } from \"~/FilePicker/primitives/components\";\n\ntype FilePickerProps = FilePickerPrimitiveProps & FormComponentProps;\n\nconst BaseFilePicker = ({\n label,\n description,\n note,\n required,\n disabled,\n validation,\n validate,\n onBlur: originalOnBlur,\n type = \"area\",\n ...props\n}: FilePickerProps) => {\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n const invalid = useMemo(() => validationIsValid === false, [validationIsValid]);\n\n const onBlur = useCallback(\n async (e: React.FocusEvent<HTMLInputElement>) => {\n if (validate) {\n // Since we are accessing event in an async operation, we need to persist it.\n // See https://reactjs.org/docs/events.html#event-pooling.\n e.persist();\n await validate();\n }\n originalOnBlur && originalOnBlur(e);\n },\n [validate, originalOnBlur]\n );\n\n return (\n <div className={\"wby-w-full\"}>\n {type !== \"area\" && (\n <>\n <FilePickerLabel\n label={label}\n required={required}\n disabled={disabled}\n invalid={invalid}\n />\n <FilePickerDescription description={description} disabled={disabled} />\n </>\n )}\n <FilePickerPrimitive\n {...props}\n label={label}\n description={description}\n disabled={disabled}\n invalid={invalid}\n onBlur={onBlur}\n type={type}\n />\n <FormComponentErrorMessage\n text={validationMessage}\n invalid={invalid}\n disabled={disabled}\n />\n <FormComponentNote text={note} disabled={disabled} />\n </div>\n );\n};\n\nconst DecoratableFilePicker = makeDecoratable(\"FilePicker\", BaseFilePicker);\n\nconst FilePicker = withStaticProps(DecoratableFilePicker, {\n Preview: {\n Image: ImagePreview,\n RichItem: RichItemPreview,\n TextOnly: TextOnlyPreview\n }\n});\nexport { FilePicker, type FilePickerProps };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACnD,SAASC,eAAe,EAAEC,eAAe;AACzC,SACIC,qBAAqB,EACrBC,eAAe,EACfC,mBAAmB;AAGvB,SACIC,yBAAyB,EACzBC,iBAAiB;AAGrB,SAASC,YAAY,EAAEC,eAAe,EAAEC,eAAe;AAIvD,MAAMC,cAAc,GAAGA,CAAC;EACpBC,KAAK;EACLC,WAAW;EACXC,IAAI;EACJC,QAAQ;EACRC,QAAQ;EACRC,UAAU;EACVC,QAAQ;EACRC,MAAM,EAAEC,cAAc;EACtBC,IAAI,GAAG,MAAM;EACb,GAAGC;AACU,CAAC,KAAK;EACnB,MAAM;IAAEC,OAAO,EAAEC,iBAAiB;IAAEC,OAAO,EAAEC;EAAkB,CAAC,GAAGT,UAAU,IAAI,CAAC,CAAC;EACnF,MAAMU,OAAO,GAAG3B,OAAO,CAAC,MAAMwB,iBAAiB,KAAK,KAAK,EAAE,CAACA,iBAAiB,CAAC,CAAC;EAE/E,MAAML,MAAM,GAAGpB,WAAW,CACtB,MAAO6B,CAAqC,IAAK;IAC7C,IAAIV,QAAQ,EAAE;MACV;MACA;MACAU,CAAC,CAACC,OAAO,CAAC,CAAC;MACX,MAAMX,QAAQ,CAAC,CAAC;IACpB;IACAE,cAAc,IAAIA,cAAc,CAACQ,CAAC,CAAC;EACvC,CAAC,EACD,CAACV,QAAQ,EAAEE,cAAc,CAC7B,CAAC;EAED,oBACItB,KAAA,CAAAgC,aAAA;IAAKC,SAAS,EAAE;EAAa,GACxBV,IAAI,KAAK,MAAM,iBACZvB,KAAA,CAAAgC,aAAA,CAAAhC,KAAA,CAAAkC,QAAA,qBACIlC,KAAA,CAAAgC,aAAA,CAAC1B,eAAe;IACZQ,KAAK,EAAEA,KAAM;IACbG,QAAQ,EAAEA,QAAS;IACnBC,QAAQ,EAAEA,QAAS;IACnBW,OAAO,EAAEA;EAAQ,CACpB,CAAC,eACF7B,KAAA,CAAAgC,aAAA,CAAC3B,qBAAqB;IAACU,WAAW,EAAEA,WAAY;IAACG,QAAQ,EAAEA;EAAS,CAAE,CACxE,CACL,eACDlB,KAAA,CAAAgC,aAAA,CAACzB,mBAAmB,EAAA4B,MAAA,CAAAC,MAAA,KACZZ,KAAK;IACTV,KAAK,EAAEA,KAAM;IACbC,WAAW,EAAEA,WAAY;IACzBG,QAAQ,EAAEA,QAAS;IACnBW,OAAO,EAAEA,OAAQ;IACjBR,MAAM,EAAEA,MAAO;IACfE,IAAI,EAAEA;EAAK,EACd,CAAC,eACFvB,KAAA,CAAAgC,aAAA,CAACxB,yBAAyB;IACtB6B,IAAI,EAAET,iBAAkB;IACxBC,OAAO,EAAEA,OAAQ;IACjBX,QAAQ,EAAEA;EAAS,CACtB,CAAC,eACFlB,KAAA,CAAAgC,aAAA,CAACvB,iBAAiB;IAAC4B,IAAI,EAAErB,IAAK;IAACE,QAAQ,EAAEA;EAAS,CAAE,CACnD,CAAC;AAEd,CAAC;AAED,MAAMoB,qBAAqB,GAAGnC,eAAe,CAAC,YAAY,EAAEU,cAAc,CAAC;AAE3E,MAAM0B,UAAU,GAAGnC,eAAe,CAACkC,qBAAqB,EAAE;EACtDE,OAAO,EAAE;IACLC,KAAK,EAAE/B,YAAY;IACnBgC,QAAQ,EAAE/B,eAAe;IACzBgC,QAAQ,EAAE/B;EACd;AACJ,CAAC,CAAC;AACF,SAAS2B,UAAU","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FileItemFormatter","format","item","id","name","url","mimeType","size"],"sources":["FileItemFormatter.ts"],"sourcesContent":["import { FileItem } from \"./FileItem\";\nimport type { FileItemFormatted } from \"./FileItemFormatted\";\n\nexport class FileItemFormatter {\n static format(item: FileItem): FileItemFormatted {\n return {\n id: item.id,\n name: item.name,\n url: item.url,\n mimeType: item.mimeType,\n size: item.size\n };\n }\n}\n"],"mappings":"AAGA,OAAO,MAAMA,iBAAiB,CAAC;EAC3B,OAAOC,MAAMA,CAACC,IAAc,EAAqB;IAC7C,OAAO;MACHC,EAAE,EAAED,IAAI,CAACC,EAAE;MACXC,IAAI,EAAEF,IAAI,CAACE,IAAI;MACfC,GAAG,EAAEH,IAAI,CAACG,GAAG;MACbC,QAAQ,EAAEJ,IAAI,CAACI,QAAQ;MACvBC,IAAI,EAAEL,IAAI,CAACK;IACf,CAAC;EACL;AACJ","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["FileItemFormatter","format","item","id","name","url","mimeType","size"],"sources":["FileItemFormatter.ts"],"sourcesContent":["import type { FileItem } from \"./FileItem\";\nimport type { FileItemFormatted } from \"./FileItemFormatted\";\n\nexport class FileItemFormatter {\n static format(item: FileItem): FileItemFormatted {\n return {\n id: item.id,\n name: item.name,\n url: item.url,\n mimeType: item.mimeType,\n size: item.size\n };\n }\n}\n"],"mappings":"AAGA,OAAO,MAAMA,iBAAiB,CAAC;EAC3B,OAAOC,MAAMA,CAACC,IAAc,EAAqB;IAC7C,OAAO;MACHC,EAAE,EAAED,IAAI,CAACC,EAAE;MACXC,IAAI,EAAEF,IAAI,CAACE,IAAI;MACfC,GAAG,EAAEH,IAAI,CAACG,GAAG;MACbC,QAAQ,EAAEJ,IAAI,CAACI,QAAQ;MACvBC,IAAI,EAAEL,IAAI,CAACK;IACf,CAAC;EACL;AACJ","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "../../utils";
|
|
3
|
-
import { Label } from "../../Label";
|
|
4
|
-
import { InputPrimitiveProps } from "../../Input";
|
|
3
|
+
import type { Label } from "../../Label";
|
|
4
|
+
import type { InputPrimitiveProps } from "../../Input";
|
|
5
5
|
import { FileItem, type FileItemDto, type FileItemFormatted } from "../domains";
|
|
6
6
|
import type { FilePreviewRendererProps, TriggerRendererProps } from "./components/types";
|
|
7
7
|
declare const filePickerVariants: (props?: ({
|
|
@@ -26,6 +26,10 @@ interface FilePickerPrimitiveProps extends React.HTMLAttributes<HTMLDivElement>,
|
|
|
26
26
|
* Label for the file picker.
|
|
27
27
|
*/
|
|
28
28
|
label?: React.ReactElement<typeof Label> | React.ReactNode | string;
|
|
29
|
+
/**
|
|
30
|
+
* Description for the file picker.
|
|
31
|
+
*/
|
|
32
|
+
description?: React.ReactNode | string;
|
|
29
33
|
/**
|
|
30
34
|
* Callback triggered when an item is edited.
|
|
31
35
|
*/
|
|
@@ -59,21 +63,21 @@ interface FilePickerPrimitiveProps extends React.HTMLAttributes<HTMLDivElement>,
|
|
|
59
63
|
*/
|
|
60
64
|
value?: FileItemDto | string | null;
|
|
61
65
|
}
|
|
62
|
-
declare const FilePickerPrimitive: (({ className, containerStyle, disabled, invalid, label, onEditItem, onRemoveItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, value, variant }: FilePickerPrimitiveProps) => React.JSX.Element) & {
|
|
63
|
-
original: ({ className, containerStyle, disabled, invalid, label, onEditItem, onRemoveItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, value, variant }: FilePickerPrimitiveProps) => React.JSX.Element;
|
|
66
|
+
declare const FilePickerPrimitive: (({ className, containerStyle, description, disabled, invalid, label, onEditItem, onRemoveItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, value, variant }: FilePickerPrimitiveProps) => React.JSX.Element) & {
|
|
67
|
+
original: ({ className, containerStyle, description, disabled, invalid, label, onEditItem, onRemoveItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, value, variant }: FilePickerPrimitiveProps) => React.JSX.Element;
|
|
64
68
|
originalName: string;
|
|
65
69
|
displayName: string;
|
|
66
70
|
} & {
|
|
67
|
-
original: (({ className, containerStyle, disabled, invalid, label, onEditItem, onRemoveItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, value, variant }: FilePickerPrimitiveProps) => React.JSX.Element) & {
|
|
68
|
-
original: ({ className, containerStyle, disabled, invalid, label, onEditItem, onRemoveItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, value, variant }: FilePickerPrimitiveProps) => React.JSX.Element;
|
|
71
|
+
original: (({ className, containerStyle, description, disabled, invalid, label, onEditItem, onRemoveItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, value, variant }: FilePickerPrimitiveProps) => React.JSX.Element) & {
|
|
72
|
+
original: ({ className, containerStyle, description, disabled, invalid, label, onEditItem, onRemoveItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, value, variant }: FilePickerPrimitiveProps) => React.JSX.Element;
|
|
69
73
|
originalName: string;
|
|
70
74
|
displayName: string;
|
|
71
75
|
};
|
|
72
76
|
originalName: string;
|
|
73
77
|
displayName: string;
|
|
74
78
|
} & {
|
|
75
|
-
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ className, containerStyle, disabled, invalid, label, onEditItem, onRemoveItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, value, variant }: FilePickerPrimitiveProps) => React.JSX.Element) & {
|
|
76
|
-
original: ({ className, containerStyle, disabled, invalid, label, onEditItem, onRemoveItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, value, variant }: FilePickerPrimitiveProps) => React.JSX.Element;
|
|
79
|
+
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ className, containerStyle, description, disabled, invalid, label, onEditItem, onRemoveItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, value, variant }: FilePickerPrimitiveProps) => React.JSX.Element) & {
|
|
80
|
+
original: ({ className, containerStyle, description, disabled, invalid, label, onEditItem, onRemoveItem, onSelectItem, placeholder, renderFilePreview, renderTrigger, type, value, variant }: FilePickerPrimitiveProps) => React.JSX.Element;
|
|
77
81
|
originalName: string;
|
|
78
82
|
displayName: string;
|
|
79
83
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { cn, cva, makeDecoratable, withStaticProps } from "../../utils";
|
|
3
|
-
import {
|
|
3
|
+
import { FilePickerLabel, FilePickerDescription, Trigger } from "./components";
|
|
4
4
|
import { inputVariants } from "../../Input";
|
|
5
5
|
import { ImagePreview, RichItemPreview, TextOnlyPreview, FilePreview } from "./components";
|
|
6
6
|
import { FileItem } from "../domains";
|
|
7
7
|
import { useFilePicker } from "./useFilePicker";
|
|
8
|
-
const filePickerVariants = cva(["wby-w-full wby-border-sm wby-text-md wby-peer wby-rounded-md", "focus-visible:wby-outline-none", "data-[disabled=true]:wby-cursor-not-allowed", "wby-flex wby-flex-col wby-gap-y-sm-extra"], {
|
|
8
|
+
const filePickerVariants = cva(["wby-w-full wby-border-sm wby-text-md wby-peer wby-rounded-md", "focus-visible:wby-outline-none", "data-[disabled=true]:wby-cursor-not-allowed", "wby-flex wby-flex-col wby-items-start wby-gap-y-sm-extra"], {
|
|
9
9
|
variants: {
|
|
10
10
|
type: {
|
|
11
11
|
area: ["wby-px-[calc(theme(padding.sm-extra)-theme(borderWidth.sm))] wby-py-[calc(theme(padding.sm-extra)-theme(borderWidth.sm))]"],
|
|
12
|
-
compact: ["wby-py-[calc(theme(padding.
|
|
12
|
+
compact: ["wby-py-[calc(theme(padding.xs-plus)-theme(borderWidth.sm))] wby-px-[calc(theme(padding.sm)-theme(borderWidth.sm))]"]
|
|
13
13
|
},
|
|
14
14
|
variant: {
|
|
15
15
|
primary: "",
|
|
@@ -25,6 +25,7 @@ const filePickerVariants = cva(["wby-w-full wby-border-sm wby-text-md wby-peer w
|
|
|
25
25
|
const BaseFilePickerPrimitive = ({
|
|
26
26
|
className,
|
|
27
27
|
containerStyle,
|
|
28
|
+
description,
|
|
28
29
|
disabled,
|
|
29
30
|
invalid,
|
|
30
31
|
label,
|
|
@@ -53,10 +54,19 @@ const BaseFilePickerPrimitive = ({
|
|
|
53
54
|
variant
|
|
54
55
|
}), className),
|
|
55
56
|
style: containerStyle
|
|
56
|
-
},
|
|
57
|
+
}, type === "area" && (label || description) && /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: "wby-w-full"
|
|
59
|
+
}, label && /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
className: "wby-mb-xs"
|
|
61
|
+
}, typeof label === "string" ? /*#__PURE__*/React.createElement(FilePickerLabel, {
|
|
57
62
|
label: label,
|
|
63
|
+
className: "wby-m-0",
|
|
64
|
+
disabled: disabled
|
|
65
|
+
}) : label), description && /*#__PURE__*/React.createElement(FilePickerDescription, {
|
|
66
|
+
description: description,
|
|
67
|
+
disabled: disabled,
|
|
58
68
|
className: "wby-m-0"
|
|
59
|
-
})
|
|
69
|
+
})), vm.file ? /*#__PURE__*/React.createElement(FilePreview, {
|
|
60
70
|
disabled: disabled,
|
|
61
71
|
onEditItem: onEditItem ? () => onEditItem(vm.file) : undefined,
|
|
62
72
|
onRemoveItem: onRemoveItem ? () => onRemoveItem(vm.file) : undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","cn","cva","makeDecoratable","withStaticProps","
|
|
1
|
+
{"version":3,"names":["React","cn","cva","makeDecoratable","withStaticProps","FilePickerLabel","FilePickerDescription","Trigger","inputVariants","ImagePreview","RichItemPreview","TextOnlyPreview","FilePreview","FileItem","useFilePicker","filePickerVariants","variants","type","area","compact","variant","primary","secondary","ghost","defaultVariants","BaseFilePickerPrimitive","className","containerStyle","description","disabled","invalid","label","onEditItem","onRemoveItem","onSelectItem","placeholder","renderFilePreview","renderTrigger","value","vm","createElement","style","file","undefined","onReplaceItem","text","DecoratableFilePickerPrimitive","FilePickerPrimitive","Preview","Image","RichItem","TextOnly"],"sources":["FilePickerPrimitive.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn, cva, type VariantProps, makeDecoratable, withStaticProps } from \"~/utils\";\nimport { FilePickerLabel, FilePickerDescription, Trigger } from \"./components\";\nimport type { Label } from \"~/Label\";\nimport type { InputPrimitiveProps } from \"~/Input\";\nimport { inputVariants } from \"~/Input\";\nimport { ImagePreview, RichItemPreview, TextOnlyPreview, FilePreview } from \"./components\";\nimport { FileItem, type FileItemDto, type FileItemFormatted } from \"../domains\";\nimport { useFilePicker } from \"./useFilePicker\";\nimport type { FilePreviewRendererProps, TriggerRendererProps } from \"./components/types\";\n\nconst filePickerVariants = cva(\n [\n \"wby-w-full wby-border-sm wby-text-md wby-peer wby-rounded-md\",\n \"focus-visible:wby-outline-none\",\n \"data-[disabled=true]:wby-cursor-not-allowed\",\n \"wby-flex wby-flex-col wby-items-start wby-gap-y-sm-extra\"\n ],\n {\n variants: {\n type: {\n area: [\n \"wby-px-[calc(theme(padding.sm-extra)-theme(borderWidth.sm))] wby-py-[calc(theme(padding.sm-extra)-theme(borderWidth.sm))]\"\n ],\n compact: [\n \"wby-py-[calc(theme(padding.xs-plus)-theme(borderWidth.sm))] wby-px-[calc(theme(padding.sm)-theme(borderWidth.sm))]\"\n ]\n },\n variant: {\n primary: \"\",\n secondary: \"\",\n ghost: [\"hover:wby-bg-transparent\"]\n }\n },\n defaultVariants: {\n type: \"area\",\n variant: \"primary\"\n }\n }\n);\n\ninterface FilePickerPrimitiveProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof filePickerVariants> {\n /**\n * Custom styles for the container.\n */\n containerStyle?: React.CSSProperties;\n /**\n * Indicates if the file picker is disabled.\n */\n disabled?: boolean;\n /**\n * Indicates if the input field is invalid.\n * Refer to `InputPrimitiveProps[\"invalid\"]` for possible values.\n */\n invalid?: InputPrimitiveProps[\"invalid\"];\n /**\n * Label for the file picker.\n */\n label?: React.ReactElement<typeof Label> | React.ReactNode | string;\n /**\n * Description for the file picker.\n */\n description?: React.ReactNode | string;\n /**\n * Callback triggered when an item is edited.\n */\n onEditItem?: (item: FileItemFormatted | null) => void;\n /**\n * Callback triggered when an item is removed.\n */\n onRemoveItem?: (item: FileItemFormatted | null) => void;\n /**\n * Callback triggered when an item is selected.\n */\n onSelectItem: () => void;\n /**\n * Placeholder text for the file picker.\n */\n placeholder?: string;\n /**\n * Custom renderer for the file preview.\n */\n renderFilePreview?: (props: FilePreviewRendererProps) => React.ReactElement<any>;\n /**\n * Custom renderer for the trigger.\n */\n renderTrigger?: (props: TriggerRendererProps) => React.ReactElement<any>;\n /**\n * Custom styles for the file picker.\n */\n style?: React.CSSProperties;\n /**\n * Value of the selected file.\n */\n value?: FileItemDto | string | null;\n}\n\nconst BaseFilePickerPrimitive = ({\n className,\n containerStyle,\n description,\n disabled,\n invalid,\n label,\n onEditItem,\n onRemoveItem,\n onSelectItem,\n placeholder,\n renderFilePreview,\n renderTrigger,\n type = \"area\",\n value,\n variant\n}: FilePickerPrimitiveProps) => {\n const { vm } = useFilePicker({ value });\n\n return (\n <div\n data-disabled={disabled}\n className={cn(\n inputVariants({ variant, invalid }),\n filePickerVariants({ type, variant }),\n className\n )}\n style={containerStyle}\n >\n {type === \"area\" && (label || description) && (\n <div className={\"wby-w-full\"}>\n {label && (\n <div className={\"wby-mb-xs\"}>\n {typeof label === \"string\" ? (\n <FilePickerLabel\n label={label}\n className={\"wby-m-0\"}\n disabled={disabled}\n />\n ) : (\n label\n )}\n </div>\n )}\n {description && (\n <FilePickerDescription\n description={description}\n disabled={disabled}\n className={\"wby-m-0\"}\n />\n )}\n </div>\n )}\n {vm.file ? (\n <FilePreview\n disabled={disabled}\n onEditItem={onEditItem ? () => onEditItem(vm.file) : undefined}\n onRemoveItem={onRemoveItem ? () => onRemoveItem(vm.file) : undefined}\n onReplaceItem={onSelectItem}\n renderFilePreview={renderFilePreview}\n type={type}\n value={vm.file}\n />\n ) : (\n <Trigger\n disabled={disabled}\n onSelectItem={onSelectItem}\n renderTrigger={renderTrigger}\n text={placeholder}\n type={type}\n variant={variant}\n />\n )}\n </div>\n );\n};\n\nconst DecoratableFilePickerPrimitive = makeDecoratable(\n \"FilePickerPrimitive\",\n BaseFilePickerPrimitive\n);\n\nconst FilePickerPrimitive = withStaticProps(DecoratableFilePickerPrimitive, {\n Preview: {\n Image: ImagePreview,\n RichItem: RichItemPreview,\n TextOnly: TextOnlyPreview\n }\n});\n\nexport { FilePickerPrimitive, FileItem, type FilePickerPrimitiveProps, filePickerVariants };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,EAAE,EAAEC,GAAG,EAAqBC,eAAe,EAAEC,eAAe;AACrE,SAASC,eAAe,EAAEC,qBAAqB,EAAEC,OAAO;AAGxD,SAASC,aAAa;AACtB,SAASC,YAAY,EAAEC,eAAe,EAAEC,eAAe,EAAEC,WAAW;AACpE,SAASC,QAAQ;AACjB,SAASC,aAAa;AAGtB,MAAMC,kBAAkB,GAAGb,GAAG,CAC1B,CACI,8DAA8D,EAC9D,gCAAgC,EAChC,6CAA6C,EAC7C,0DAA0D,CAC7D,EACD;EACIc,QAAQ,EAAE;IACNC,IAAI,EAAE;MACFC,IAAI,EAAE,CACF,2HAA2H,CAC9H;MACDC,OAAO,EAAE,CACL,oHAAoH;IAE5H,CAAC;IACDC,OAAO,EAAE;MACLC,OAAO,EAAE,EAAE;MACXC,SAAS,EAAE,EAAE;MACbC,KAAK,EAAE,CAAC,0BAA0B;IACtC;EACJ,CAAC;EACDC,eAAe,EAAE;IACbP,IAAI,EAAE,MAAM;IACZG,OAAO,EAAE;EACb;AACJ,CACJ,CAAC;AA4DD,MAAMK,uBAAuB,GAAGA,CAAC;EAC7BC,SAAS;EACTC,cAAc;EACdC,WAAW;EACXC,QAAQ;EACRC,OAAO;EACPC,KAAK;EACLC,UAAU;EACVC,YAAY;EACZC,YAAY;EACZC,WAAW;EACXC,iBAAiB;EACjBC,aAAa;EACbpB,IAAI,GAAG,MAAM;EACbqB,KAAK;EACLlB;AACsB,CAAC,KAAK;EAC5B,MAAM;IAAEmB;EAAG,CAAC,GAAGzB,aAAa,CAAC;IAAEwB;EAAM,CAAC,CAAC;EAEvC,oBACItC,KAAA,CAAAwC,aAAA;IACI,iBAAeX,QAAS;IACxBH,SAAS,EAAEzB,EAAE,CACTO,aAAa,CAAC;MAAEY,OAAO;MAAEU;IAAQ,CAAC,CAAC,EACnCf,kBAAkB,CAAC;MAAEE,IAAI;MAAEG;IAAQ,CAAC,CAAC,EACrCM,SACJ,CAAE;IACFe,KAAK,EAAEd;EAAe,GAErBV,IAAI,KAAK,MAAM,KAAKc,KAAK,IAAIH,WAAW,CAAC,iBACtC5B,KAAA,CAAAwC,aAAA;IAAKd,SAAS,EAAE;EAAa,GACxBK,KAAK,iBACF/B,KAAA,CAAAwC,aAAA;IAAKd,SAAS,EAAE;EAAY,GACvB,OAAOK,KAAK,KAAK,QAAQ,gBACtB/B,KAAA,CAAAwC,aAAA,CAACnC,eAAe;IACZ0B,KAAK,EAAEA,KAAM;IACbL,SAAS,EAAE,SAAU;IACrBG,QAAQ,EAAEA;EAAS,CACtB,CAAC,GAEFE,KAEH,CACR,EACAH,WAAW,iBACR5B,KAAA,CAAAwC,aAAA,CAAClC,qBAAqB;IAClBsB,WAAW,EAAEA,WAAY;IACzBC,QAAQ,EAAEA,QAAS;IACnBH,SAAS,EAAE;EAAU,CACxB,CAEJ,CACR,EACAa,EAAE,CAACG,IAAI,gBACJ1C,KAAA,CAAAwC,aAAA,CAAC5B,WAAW;IACRiB,QAAQ,EAAEA,QAAS;IACnBG,UAAU,EAAEA,UAAU,GAAG,MAAMA,UAAU,CAACO,EAAE,CAACG,IAAI,CAAC,GAAGC,SAAU;IAC/DV,YAAY,EAAEA,YAAY,GAAG,MAAMA,YAAY,CAACM,EAAE,CAACG,IAAI,CAAC,GAAGC,SAAU;IACrEC,aAAa,EAAEV,YAAa;IAC5BE,iBAAiB,EAAEA,iBAAkB;IACrCnB,IAAI,EAAEA,IAAK;IACXqB,KAAK,EAAEC,EAAE,CAACG;EAAK,CAClB,CAAC,gBAEF1C,KAAA,CAAAwC,aAAA,CAACjC,OAAO;IACJsB,QAAQ,EAAEA,QAAS;IACnBK,YAAY,EAAEA,YAAa;IAC3BG,aAAa,EAAEA,aAAc;IAC7BQ,IAAI,EAAEV,WAAY;IAClBlB,IAAI,EAAEA,IAAK;IACXG,OAAO,EAAEA;EAAQ,CACpB,CAEJ,CAAC;AAEd,CAAC;AAED,MAAM0B,8BAA8B,GAAG3C,eAAe,CAClD,qBAAqB,EACrBsB,uBACJ,CAAC;AAED,MAAMsB,mBAAmB,GAAG3C,eAAe,CAAC0C,8BAA8B,EAAE;EACxEE,OAAO,EAAE;IACLC,KAAK,EAAExC,YAAY;IACnByC,QAAQ,EAAExC,eAAe;IACzByC,QAAQ,EAAExC;EACd;AACJ,CAAC,CAAC;AAEF,SAASoC,mBAAmB,EAAElC,QAAQ,EAAiCE,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type FormComponentProps } from "../../../FormComponent";
|
|
3
|
+
type FilePickerDescriptionProps = Pick<FormComponentProps, "description" | "disabled"> & {
|
|
4
|
+
invalid?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const FilePickerDescription: ({ description, disabled, className }: FilePickerDescriptionProps) => React.JSX.Element | null;
|
|
8
|
+
export { FilePickerDescription, type FilePickerDescriptionProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { FormComponentDescription } from "../../../FormComponent";
|
|
3
|
+
const FilePickerDescription = ({
|
|
4
|
+
description,
|
|
5
|
+
disabled,
|
|
6
|
+
className
|
|
7
|
+
}) => {
|
|
8
|
+
if (!description) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
return /*#__PURE__*/React.createElement(FormComponentDescription, {
|
|
12
|
+
text: description,
|
|
13
|
+
disabled: disabled,
|
|
14
|
+
className: className
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
export { FilePickerDescription };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=Description.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","FormComponentDescription","FilePickerDescription","description","disabled","className","createElement","text"],"sources":["Description.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { FormComponentDescription, type FormComponentProps } from \"~/FormComponent\";\n\ntype FilePickerDescriptionProps = Pick<FormComponentProps, \"description\" | \"disabled\"> & {\n invalid?: boolean;\n className?: string;\n};\n\nconst FilePickerDescription = ({\n description,\n disabled,\n className\n}: FilePickerDescriptionProps) => {\n if (!description) {\n return null;\n }\n\n return (\n <FormComponentDescription text={description} disabled={disabled} className={className} />\n );\n};\n\nexport { FilePickerDescription, type FilePickerDescriptionProps };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,wBAAwB;AAOjC,MAAMC,qBAAqB,GAAGA,CAAC;EAC3BC,WAAW;EACXC,QAAQ;EACRC;AACwB,CAAC,KAAK;EAC9B,IAAI,CAACF,WAAW,EAAE;IACd,OAAO,IAAI;EACf;EAEA,oBACIH,KAAA,CAAAM,aAAA,CAACL,wBAAwB;IAACM,IAAI,EAAEJ,WAAY;IAACC,QAAQ,EAAEA,QAAS;IAACC,SAAS,EAAEA;EAAU,CAAE,CAAC;AAEjG,CAAC;AAED,SAASH,qBAAqB","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type FormComponentProps } from "../../../FormComponent";
|
|
3
|
-
type
|
|
3
|
+
type FilePickerLabelProps = Pick<FormComponentProps, "label" | "disabled" | "required"> & {
|
|
4
4
|
invalid?: boolean;
|
|
5
5
|
className?: string;
|
|
6
6
|
};
|
|
7
|
-
declare const
|
|
8
|
-
export {
|
|
7
|
+
declare const FilePickerLabel: ({ label, required, disabled, invalid, className }: FilePickerLabelProps) => React.JSX.Element | null;
|
|
8
|
+
export { FilePickerLabel, type FilePickerLabelProps };
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
2
|
+
import { FormComponentLabel } from "../../../FormComponent";
|
|
3
|
+
const FilePickerLabel = ({
|
|
4
4
|
label,
|
|
5
|
-
description,
|
|
6
5
|
required,
|
|
7
6
|
disabled,
|
|
8
7
|
invalid,
|
|
9
8
|
className
|
|
10
9
|
}) => {
|
|
11
|
-
|
|
10
|
+
if (!label) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
return /*#__PURE__*/React.createElement(FormComponentLabel, {
|
|
12
14
|
text: label,
|
|
13
15
|
required: required,
|
|
14
16
|
disabled: disabled,
|
|
15
17
|
className: className,
|
|
16
18
|
invalid: invalid
|
|
17
|
-
})
|
|
18
|
-
text: description,
|
|
19
|
-
disabled: disabled
|
|
20
|
-
}));
|
|
19
|
+
});
|
|
21
20
|
};
|
|
22
|
-
export {
|
|
21
|
+
export { FilePickerLabel };
|
|
23
22
|
|
|
24
23
|
//# sourceMappingURL=Label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","FormComponentLabel","FilePickerLabel","label","required","disabled","invalid","className","createElement","text"],"sources":["Label.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { FormComponentLabel, type FormComponentProps } from \"~/FormComponent\";\n\ntype FilePickerLabelProps = Pick<FormComponentProps, \"label\" | \"disabled\" | \"required\"> & {\n invalid?: boolean;\n className?: string;\n};\n\nconst FilePickerLabel = ({\n label,\n required,\n disabled,\n invalid,\n className\n}: FilePickerLabelProps) => {\n if (!label) {\n return null;\n }\n\n return (\n <FormComponentLabel\n text={label}\n required={required}\n disabled={disabled}\n className={className}\n invalid={invalid}\n />\n );\n};\n\nexport { FilePickerLabel, type FilePickerLabelProps };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,kBAAkB;AAO3B,MAAMC,eAAe,GAAGA,CAAC;EACrBC,KAAK;EACLC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC;AACkB,CAAC,KAAK;EACxB,IAAI,CAACJ,KAAK,EAAE;IACR,OAAO,IAAI;EACf;EAEA,oBACIH,KAAA,CAAAQ,aAAA,CAACP,kBAAkB;IACfQ,IAAI,EAAEN,KAAM;IACZC,QAAQ,EAAEA,QAAS;IACnBC,QAAQ,EAAEA,QAAS;IACnBE,SAAS,EAAEA,SAAU;IACrBD,OAAO,EAAEA;EAAQ,CACpB,CAAC;AAEV,CAAC;AAED,SAASJ,eAAe","ignoreList":[]}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { ReactComponent as ImageIcon } from "@webiny/icons/image.svg";
|
|
3
|
-
import { Button } from "../../../Button";
|
|
4
3
|
import { cn, cva } from "../../../utils";
|
|
5
|
-
|
|
4
|
+
import { Icon } from "../../../Icon";
|
|
5
|
+
import { Text } from "../../../Text";
|
|
6
|
+
const triggerVariants = cva(["wby-w-full wby-flex wby-items-center wby-justify-center", "data-[disabled=true]:wby-cursor-not-allowed data-[disabled=true]:wby-bg-neutral-disabled", "focus-visible:wby-outline-none focus-visible:wby-ring-primary-dimmed", "wby-text-neutral-strong data-[disabled=true]:wby-text-neutral-disabled", "wby-fill-neutral-strong data-[disabled=true]:wby-fill-neutral-disabled"], {
|
|
6
7
|
variants: {
|
|
7
8
|
type: {
|
|
8
|
-
area:
|
|
9
|
-
compact: "wby-
|
|
9
|
+
area: "wby-px-xs wby-py-md-extra wby-rounded-md focus-visible:wby-ring-lg",
|
|
10
|
+
compact: "wby-px-sm wby-py-xs wby-rounded-sm focus-visible:wby-ring-md"
|
|
10
11
|
},
|
|
11
12
|
variant: {
|
|
12
|
-
primary: "",
|
|
13
|
-
secondary: "",
|
|
14
|
-
ghost: ""
|
|
13
|
+
primary: ["wby-bg-neutral-subtle", "hover:wby-bg-neutral-light"],
|
|
14
|
+
secondary: ["wby-bg-neutral-base", "hover:wby-bg-neutral-base"],
|
|
15
|
+
ghost: ["wby-bg-neutral-subtle", "hover:wby-bg-neutral-light"]
|
|
15
16
|
}
|
|
16
17
|
},
|
|
17
18
|
compoundVariants: [
|
|
@@ -19,11 +20,11 @@ const triggerVariants = cva(["wby-flex", "data-[disabled=true]:wby-cursor-not-al
|
|
|
19
20
|
{
|
|
20
21
|
type: "area",
|
|
21
22
|
variant: "primary",
|
|
22
|
-
className: ["wby-bg-neutral-subtle", "hover:wby-bg-neutral-light"
|
|
23
|
+
className: ["wby-bg-neutral-subtle", "hover:wby-bg-neutral-light"]
|
|
23
24
|
}, {
|
|
24
25
|
type: "area",
|
|
25
26
|
variant: "secondary",
|
|
26
|
-
className: ["wby-bg-neutral-base", "hover:wby-bg-neutral-base"
|
|
27
|
+
className: ["wby-bg-neutral-base", "hover:wby-bg-neutral-base"]
|
|
27
28
|
}, {
|
|
28
29
|
type: "area",
|
|
29
30
|
variant: "ghost",
|
|
@@ -52,21 +53,26 @@ const Trigger = ({
|
|
|
52
53
|
...props
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
|
-
|
|
56
|
+
const label = text ?? "Select from library";
|
|
57
|
+
return /*#__PURE__*/React.createElement("button", Object.assign({
|
|
56
58
|
"data-role": "select-image",
|
|
57
59
|
"data-disabled": disabled,
|
|
60
|
+
disabled: disabled,
|
|
61
|
+
onClick: onSelectItem,
|
|
58
62
|
className: cn(triggerVariants({
|
|
59
63
|
type,
|
|
60
64
|
variant
|
|
61
65
|
}), className)
|
|
62
|
-
}, props), /*#__PURE__*/React.createElement(
|
|
63
|
-
|
|
66
|
+
}, props), /*#__PURE__*/React.createElement("span", {
|
|
67
|
+
className: "wby-inline-flex wby-items-center wby-justify-center wby-whitespace-nowrap wby-gap-xs"
|
|
68
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
64
69
|
icon: /*#__PURE__*/React.createElement(ImageIcon, null),
|
|
65
|
-
|
|
70
|
+
label: label,
|
|
71
|
+
color: "inherit"
|
|
72
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
66
73
|
size: "sm",
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}));
|
|
74
|
+
className: "wby-leading-none"
|
|
75
|
+
}, label)));
|
|
70
76
|
};
|
|
71
77
|
export { Trigger, triggerVariants };
|
|
72
78
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ReactComponent","ImageIcon","
|
|
1
|
+
{"version":3,"names":["React","ReactComponent","ImageIcon","cn","cva","Icon","Text","triggerVariants","variants","type","area","compact","variant","primary","secondary","ghost","compoundVariants","className","defaultVariants","Trigger","renderTrigger","text","disabled","onSelectItem","props","label","createElement","Object","assign","onClick","icon","color","size"],"sources":["Trigger.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ReactComponent as ImageIcon } from \"@webiny/icons/image.svg\";\nimport { cn, cva, type VariantProps } from \"~/utils\";\nimport type { TriggerDefaultProps } from \"~/FilePicker/primitives/components/types\";\nimport { Icon } from \"~/Icon\";\nimport { Text } from \"~/Text\";\n\nconst triggerVariants = cva(\n [\n \"wby-w-full wby-flex wby-items-center wby-justify-center\",\n \"data-[disabled=true]:wby-cursor-not-allowed data-[disabled=true]:wby-bg-neutral-disabled\",\n \"focus-visible:wby-outline-none focus-visible:wby-ring-primary-dimmed\",\n \"wby-text-neutral-strong data-[disabled=true]:wby-text-neutral-disabled\",\n \"wby-fill-neutral-strong data-[disabled=true]:wby-fill-neutral-disabled\"\n ],\n {\n variants: {\n type: {\n area: \"wby-px-xs wby-py-md-extra wby-rounded-md focus-visible:wby-ring-lg\",\n compact: \"wby-px-sm wby-py-xs wby-rounded-sm focus-visible:wby-ring-md\"\n },\n variant: {\n primary: [\"wby-bg-neutral-subtle\", \"hover:wby-bg-neutral-light\"],\n secondary: [\"wby-bg-neutral-base\", \"hover:wby-bg-neutral-base\"],\n ghost: [\"wby-bg-neutral-subtle\", \"hover:wby-bg-neutral-light\"]\n }\n },\n compoundVariants: [\n // Combination of `type = area` and different `variant`\n {\n type: \"area\",\n variant: \"primary\",\n className: [\"wby-bg-neutral-subtle\", \"hover:wby-bg-neutral-light\"]\n },\n {\n type: \"area\",\n variant: \"secondary\",\n className: [\"wby-bg-neutral-base\", \"hover:wby-bg-neutral-base\"]\n },\n {\n type: \"area\",\n variant: \"ghost\",\n className: [\n \"wby-bg-neutral-subtle\",\n \"hover:wby-bg-neutral-light\",\n \"data-[disabled=true]:wby-bg-neutral-base\"\n ]\n }\n ],\n defaultVariants: {\n type: \"area\",\n variant: \"primary\"\n }\n }\n);\n\ninterface TriggerProps extends TriggerDefaultProps, VariantProps<typeof triggerVariants> {\n renderTrigger?: (props: any) => React.ReactElement<any>;\n}\n\nconst Trigger = ({\n renderTrigger,\n type,\n variant,\n text,\n className,\n disabled,\n onSelectItem,\n ...props\n}: TriggerProps) => {\n if (typeof renderTrigger === \"function\") {\n return renderTrigger({ disabled, text, onSelectItem, ...props });\n }\n\n const label = text ?? \"Select from library\";\n\n return (\n <button\n data-role={\"select-image\"}\n data-disabled={disabled}\n disabled={disabled}\n onClick={onSelectItem}\n className={cn(triggerVariants({ type, variant }), className)}\n {...props}\n >\n <span\n className={\n \"wby-inline-flex wby-items-center wby-justify-center wby-whitespace-nowrap wby-gap-xs\"\n }\n >\n <Icon icon={<ImageIcon />} label={label} color={\"inherit\"} />\n <Text size={\"sm\"} className={\"wby-leading-none\"}>\n {label}\n </Text>\n </span>\n </button>\n );\n};\n\nexport { Trigger, type TriggerProps, triggerVariants };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,IAAIC,SAAS,QAAQ,yBAAyB;AACrE,SAASC,EAAE,EAAEC,GAAG;AAEhB,SAASC,IAAI;AACb,SAASC,IAAI;AAEb,MAAMC,eAAe,GAAGH,GAAG,CACvB,CACI,yDAAyD,EACzD,0FAA0F,EAC1F,uEAAuE,EACvE,wEAAwE,EACxE,wEAAwE,CAC3E,EACD;EACII,QAAQ,EAAE;IACNC,IAAI,EAAE;MACFC,IAAI,EAAE,oEAAoE;MAC1EC,OAAO,EAAE;IACb,CAAC;IACDC,OAAO,EAAE;MACLC,OAAO,EAAE,CAAC,uBAAuB,EAAE,4BAA4B,CAAC;MAChEC,SAAS,EAAE,CAAC,qBAAqB,EAAE,2BAA2B,CAAC;MAC/DC,KAAK,EAAE,CAAC,uBAAuB,EAAE,4BAA4B;IACjE;EACJ,CAAC;EACDC,gBAAgB,EAAE;EACd;EACA;IACIP,IAAI,EAAE,MAAM;IACZG,OAAO,EAAE,SAAS;IAClBK,SAAS,EAAE,CAAC,uBAAuB,EAAE,4BAA4B;EACrE,CAAC,EACD;IACIR,IAAI,EAAE,MAAM;IACZG,OAAO,EAAE,WAAW;IACpBK,SAAS,EAAE,CAAC,qBAAqB,EAAE,2BAA2B;EAClE,CAAC,EACD;IACIR,IAAI,EAAE,MAAM;IACZG,OAAO,EAAE,OAAO;IAChBK,SAAS,EAAE,CACP,uBAAuB,EACvB,4BAA4B,EAC5B,0CAA0C;EAElD,CAAC,CACJ;EACDC,eAAe,EAAE;IACbT,IAAI,EAAE,MAAM;IACZG,OAAO,EAAE;EACb;AACJ,CACJ,CAAC;AAMD,MAAMO,OAAO,GAAGA,CAAC;EACbC,aAAa;EACbX,IAAI;EACJG,OAAO;EACPS,IAAI;EACJJ,SAAS;EACTK,QAAQ;EACRC,YAAY;EACZ,GAAGC;AACO,CAAC,KAAK;EAChB,IAAI,OAAOJ,aAAa,KAAK,UAAU,EAAE;IACrC,OAAOA,aAAa,CAAC;MAAEE,QAAQ;MAAED,IAAI;MAAEE,YAAY;MAAE,GAAGC;IAAM,CAAC,CAAC;EACpE;EAEA,MAAMC,KAAK,GAAGJ,IAAI,IAAI,qBAAqB;EAE3C,oBACIrB,KAAA,CAAA0B,aAAA,WAAAC,MAAA,CAAAC,MAAA;IACI,aAAW,cAAe;IAC1B,iBAAeN,QAAS;IACxBA,QAAQ,EAAEA,QAAS;IACnBO,OAAO,EAAEN,YAAa;IACtBN,SAAS,EAAEd,EAAE,CAACI,eAAe,CAAC;MAAEE,IAAI;MAAEG;IAAQ,CAAC,CAAC,EAAEK,SAAS;EAAE,GACzDO,KAAK,gBAETxB,KAAA,CAAA0B,aAAA;IACIT,SAAS,EACL;EACH,gBAEDjB,KAAA,CAAA0B,aAAA,CAACrB,IAAI;IAACyB,IAAI,eAAE9B,KAAA,CAAA0B,aAAA,CAACxB,SAAS,MAAE,CAAE;IAACuB,KAAK,EAAEA,KAAM;IAACM,KAAK,EAAE;EAAU,CAAE,CAAC,eAC7D/B,KAAA,CAAA0B,aAAA,CAACpB,IAAI;IAAC0B,IAAI,EAAE,IAAK;IAACf,SAAS,EAAE;EAAmB,GAC3CQ,KACC,CACJ,CACF,CAAC;AAEjB,CAAC;AAED,SAASN,OAAO,EAAqBZ,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./previews\";\nexport * from \"./Label\";\nexport * from \"./Trigger\";\n"],"mappings":"AAAA;AACA;AACA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./previews\";\nexport * from \"./Description\";\nexport * from \"./Label\";\nexport * from \"./Trigger\";\n"],"mappings":"AAAA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "../../../../utils";
|
|
3
|
-
import { filePickerVariants } from "../../..";
|
|
4
|
-
import { FilePreviewDefaultProps } from "../types";
|
|
3
|
+
import type { filePickerVariants } from "../../..";
|
|
4
|
+
import type { FilePreviewDefaultProps } from "../types";
|
|
5
5
|
type FilePreviewProps = FilePreviewDefaultProps & {
|
|
6
6
|
type: VariantProps<typeof filePickerVariants>["type"];
|
|
7
7
|
renderFilePreview?: (props: any) => React.ReactElement<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","RichItemPreview","TextOnlyPreview","FilePreview","type","renderFilePreview","props","createElement"],"sources":["FilePreview.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { type VariantProps } from \"~/utils\";\nimport { filePickerVariants } from \"~/FilePicker\";\nimport { FilePreviewDefaultProps } from \"../types\";\nimport { RichItemPreview, TextOnlyPreview } from \"../previews\";\n\ntype FilePreviewProps = FilePreviewDefaultProps & {\n type: VariantProps<typeof filePickerVariants>[\"type\"];\n renderFilePreview?: (props: any) => React.ReactElement<any>;\n};\n\nconst FilePreview = ({ type, renderFilePreview, ...props }: FilePreviewProps) => {\n if (typeof renderFilePreview === \"function\") {\n return renderFilePreview(props);\n }\n\n if (type === \"compact\") {\n return <TextOnlyPreview {...props} />;\n }\n\n return <RichItemPreview {...props} />;\n};\n\nexport { FilePreview, type FilePreviewProps };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAI9B,SAASC,eAAe,EAAEC,eAAe;AAOzC,MAAMC,WAAW,GAAGA,CAAC;EAAEC,IAAI;EAAEC,iBAAiB;EAAE,GAAGC;AAAwB,CAAC,KAAK;EAC7E,IAAI,OAAOD,iBAAiB,KAAK,UAAU,EAAE;IACzC,OAAOA,iBAAiB,CAACC,KAAK,CAAC;EACnC;EAEA,IAAIF,IAAI,KAAK,SAAS,EAAE;IACpB,oBAAOJ,KAAA,CAAAO,aAAA,CAACL,eAAe,EAAKI,KAAQ,CAAC;EACzC;EAEA,oBAAON,KAAA,CAAAO,aAAA,CAACN,eAAe,EAAKK,KAAQ,CAAC;AACzC,CAAC;AAED,SAASH,WAAW","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","RichItemPreview","TextOnlyPreview","FilePreview","type","renderFilePreview","props","createElement"],"sources":["FilePreview.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { type VariantProps } from \"~/utils\";\nimport type { filePickerVariants } from \"~/FilePicker\";\nimport type { FilePreviewDefaultProps } from \"../types\";\nimport { RichItemPreview, TextOnlyPreview } from \"../previews\";\n\ntype FilePreviewProps = FilePreviewDefaultProps & {\n type: VariantProps<typeof filePickerVariants>[\"type\"];\n renderFilePreview?: (props: any) => React.ReactElement<any>;\n};\n\nconst FilePreview = ({ type, renderFilePreview, ...props }: FilePreviewProps) => {\n if (typeof renderFilePreview === \"function\") {\n return renderFilePreview(props);\n }\n\n if (type === \"compact\") {\n return <TextOnlyPreview {...props} />;\n }\n\n return <RichItemPreview {...props} />;\n};\n\nexport { FilePreview, type FilePreviewProps };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAI9B,SAASC,eAAe,EAAEC,eAAe;AAOzC,MAAMC,WAAW,GAAGA,CAAC;EAAEC,IAAI;EAAEC,iBAAiB;EAAE,GAAGC;AAAwB,CAAC,KAAK;EAC7E,IAAI,OAAOD,iBAAiB,KAAK,UAAU,EAAE;IACzC,OAAOA,iBAAiB,CAACC,KAAK,CAAC;EACnC;EAEA,IAAIF,IAAI,KAAK,SAAS,EAAE;IACpB,oBAAOJ,KAAA,CAAAO,aAAA,CAACL,eAAe,EAAKI,KAAQ,CAAC;EACzC;EAEA,oBAAON,KAAA,CAAAO,aAAA,CAACN,eAAe,EAAKK,KAAQ,CAAC;AACzC,CAAC;AAED,SAASH,WAAW","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { VariantProps } from "../../../utils";
|
|
3
|
-
import { previewVariants } from "./previews/variants";
|
|
3
|
+
import type { previewVariants } from "./previews/variants";
|
|
4
4
|
import type { FileItemFormatted } from "../../domains";
|
|
5
5
|
/**
|
|
6
6
|
* Default properties of a file preview component.
|
|
@@ -22,7 +22,7 @@ export type FilePreviewRendererProps = Omit<FilePreviewDefaultProps, "type"> & R
|
|
|
22
22
|
* Default properties of a trigger component.
|
|
23
23
|
* They are shared between the default and custom renderers.
|
|
24
24
|
*/
|
|
25
|
-
export interface TriggerDefaultProps extends
|
|
25
|
+
export interface TriggerDefaultProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
26
26
|
disabled?: boolean;
|
|
27
27
|
text?: string;
|
|
28
28
|
onSelectItem: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { VariantProps } from \"~/utils\";\nimport { previewVariants } from \"./previews/variants\";\nimport type { FileItemFormatted } from \"../../domains\";\n\n/**\n * Default properties of a file preview component.\n * They are shared between the default and custom renderers.\n */\nexport interface FilePreviewDefaultProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\">,\n VariantProps<typeof previewVariants> {\n onReplaceItem?: () => void;\n onRemoveItem?: () => void;\n onEditItem?: () => void;\n value: FileItemFormatted;\n disabled?: boolean;\n}\n\n/**\n * Properties that can be used to render a custom file preview component.\n * @see `renderFilePreview` property of the FilePickerPrimitiveProps.\n */\nexport type FilePreviewRendererProps = Omit<FilePreviewDefaultProps, \"type\"> & Record<string, any>;\n\n/**\n * Default properties of a trigger component.\n * They are shared between the default and custom renderers.\n */\nexport interface TriggerDefaultProps extends
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { VariantProps } from \"~/utils\";\nimport type { previewVariants } from \"./previews/variants\";\nimport type { FileItemFormatted } from \"../../domains\";\n\n/**\n * Default properties of a file preview component.\n * They are shared between the default and custom renderers.\n */\nexport interface FilePreviewDefaultProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\">,\n VariantProps<typeof previewVariants> {\n onReplaceItem?: () => void;\n onRemoveItem?: () => void;\n onEditItem?: () => void;\n value: FileItemFormatted;\n disabled?: boolean;\n}\n\n/**\n * Properties that can be used to render a custom file preview component.\n * @see `renderFilePreview` property of the FilePickerPrimitiveProps.\n */\nexport type FilePreviewRendererProps = Omit<FilePreviewDefaultProps, \"type\"> & Record<string, any>;\n\n/**\n * Default properties of a trigger component.\n * They are shared between the default and custom renderers.\n */\nexport interface TriggerDefaultProps extends React.HTMLAttributes<HTMLButtonElement> {\n disabled?: boolean;\n text?: string;\n onSelectItem: () => void;\n}\n\n/**\n * Properties that can be used to render a custom trigger component.\n * @see `renderTrigger` property of the FilePickerPrimitiveProps.\n */\nexport type TriggerRendererProps = TriggerDefaultProps & Record<string, any>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Label } from "../Label";
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { Label } from "../Label";
|
|
3
3
|
interface FormComponentProps<TValue = any> {
|
|
4
4
|
/**
|
|
5
5
|
* Label for the form component, which can be a React element of type `Label` or any React node.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["FormComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { Label } from \"~/Label\";\n\ninterface FormComponentProps<TValue = any> {\n /**\n * Label for the form component, which can be a React element of type `Label` or any React node.\n */\n label?: React.ReactElement<typeof Label> | React.ReactNode;\n\n /**\n * Description providing additional context or guidance for the form component.\n */\n description?: React.ReactNode;\n\n /**\n * Note or supplementary information to display below the form component.\n */\n note?: React.ReactNode;\n\n /**\n * Indicates whether the form component is required.\n */\n required?: boolean;\n\n /**\n * Indicates whether the form component is disabled, preventing user interaction.\n */\n disabled?: boolean;\n\n /**\n * Validation state for the form component. Provides details about validity,\n * error messages, and additional validation results.\n */\n validation?: {\n /**\n * Indicates whether the form component's value is valid.\n * Can be `true`, `false`, or `null` if not yet validated.\n */\n isValid: boolean | null;\n\n /**\n * Error message to display when the form component's value is invalid.\n */\n message?: string;\n\n /**\n * Additional results or metadata returned by the validation logic.\n */\n results?: { [key: string]: any };\n };\n\n /**\n * Function provided by the parent `<Form>` component to trigger validation when the form component's value changes.\n * Returns a promise that resolves with the validation result.\n */\n validate?: () => Promise<boolean | any>;\n\n /**\n * Form component's value.\n */\n value?: TValue;\n\n /**\n * A callback that is executed each time a value is changed.\n */\n onChange?: (value: TValue) => void;\n}\n\nexport { type FormComponentProps };\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["FormComponent.tsx"],"sourcesContent":["import type React from \"react\";\nimport type { Label } from \"~/Label\";\n\ninterface FormComponentProps<TValue = any> {\n /**\n * Label for the form component, which can be a React element of type `Label` or any React node.\n */\n label?: React.ReactElement<typeof Label> | React.ReactNode;\n\n /**\n * Description providing additional context or guidance for the form component.\n */\n description?: React.ReactNode;\n\n /**\n * Note or supplementary information to display below the form component.\n */\n note?: React.ReactNode;\n\n /**\n * Indicates whether the form component is required.\n */\n required?: boolean;\n\n /**\n * Indicates whether the form component is disabled, preventing user interaction.\n */\n disabled?: boolean;\n\n /**\n * Validation state for the form component. Provides details about validity,\n * error messages, and additional validation results.\n */\n validation?: {\n /**\n * Indicates whether the form component's value is valid.\n * Can be `true`, `false`, or `null` if not yet validated.\n */\n isValid: boolean | null;\n\n /**\n * Error message to display when the form component's value is invalid.\n */\n message?: string;\n\n /**\n * Additional results or metadata returned by the validation logic.\n */\n results?: { [key: string]: any };\n };\n\n /**\n * Function provided by the parent `<Form>` component to trigger validation when the form component's value changes.\n * Returns a promise that resolves with the validation result.\n */\n validate?: () => Promise<boolean | any>;\n\n /**\n * Form component's value.\n */\n value?: TValue;\n\n /**\n * A callback that is executed each time a value is changed.\n */\n onChange?: (value: TValue) => void;\n}\n\nexport { type FormComponentProps };\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","cn","makeDecoratable","Label","DecoratableFormComponentLabel","htmlFor","text","required","disabled","hint","invalid","className","props","renderLabel","isValidElement","type","cloneElement","createElement","Object","assign","FormComponentLabel"],"sources":["Label.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { cn, makeDecoratable } from \"~/utils\";\nimport { Label
|
|
1
|
+
{"version":3,"names":["React","useMemo","cn","makeDecoratable","Label","DecoratableFormComponentLabel","htmlFor","text","required","disabled","hint","invalid","className","props","renderLabel","isValidElement","type","cloneElement","createElement","Object","assign","FormComponentLabel"],"sources":["Label.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { cn, makeDecoratable } from \"~/utils\";\nimport type { LabelProps } from \"~/Label\";\nimport { Label } from \"~/Label\";\n\ninterface FormComponentLabelProps extends React.HTMLAttributes<HTMLDivElement> {\n text?: React.ReactElement<typeof Label> | React.ReactNode;\n invalid?: boolean;\n required?: boolean;\n disabled?: boolean;\n hint?: React.ReactNode;\n htmlFor?: string;\n}\n\nconst DecoratableFormComponentLabel = ({\n htmlFor,\n text,\n required,\n disabled,\n hint,\n invalid,\n className,\n ...props\n}: FormComponentLabelProps) => {\n // UseMemo correctly to memoize the rendered label\n const renderLabel = useMemo(() => {\n if (!text) {\n return null;\n }\n\n if (React.isValidElement(text) && text.type === Label) {\n return React.cloneElement(text as React.ReactElement<LabelProps>, {\n ...text.props,\n htmlFor: text.props.htmlFor ?? htmlFor,\n required: text.props.required ?? required,\n disabled: text.props.disabled ?? disabled,\n hint: text.props.hint ?? hint,\n invalid: text.props.invalid ?? invalid\n });\n }\n\n return (\n <Label\n htmlFor={htmlFor}\n text={text}\n required={required}\n disabled={disabled}\n hint={hint}\n invalid={invalid}\n />\n );\n }, [text, required, disabled, hint, invalid, htmlFor]);\n\n if (!renderLabel) {\n return null;\n }\n\n return (\n <div {...props} className={cn(\"wby-mb-xs\", className)}>\n {renderLabel}\n </div>\n );\n};\n\nconst FormComponentLabel = makeDecoratable(\"FormComponentLabel\", DecoratableFormComponentLabel);\n\nexport { FormComponentLabel, type FormComponentLabelProps };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,EAAE,EAAEC,eAAe;AAE5B,SAASC,KAAK;AAWd,MAAMC,6BAA6B,GAAGA,CAAC;EACnCC,OAAO;EACPC,IAAI;EACJC,QAAQ;EACRC,QAAQ;EACRC,IAAI;EACJC,OAAO;EACPC,SAAS;EACT,GAAGC;AACkB,CAAC,KAAK;EAC3B;EACA,MAAMC,WAAW,GAAGb,OAAO,CAAC,MAAM;IAC9B,IAAI,CAACM,IAAI,EAAE;MACP,OAAO,IAAI;IACf;IAEA,IAAI,aAAAP,KAAK,CAACe,cAAc,CAACR,IAAI,CAAC,IAAIA,IAAI,CAACS,IAAI,KAAKZ,KAAK,EAAE;MACnD,oBAAOJ,KAAK,CAACiB,YAAY,CAACV,IAAI,EAAoC;QAC9D,GAAGA,IAAI,CAACM,KAAK;QACbP,OAAO,EAAEC,IAAI,CAACM,KAAK,CAACP,OAAO,IAAIA,OAAO;QACtCE,QAAQ,EAAED,IAAI,CAACM,KAAK,CAACL,QAAQ,IAAIA,QAAQ;QACzCC,QAAQ,EAAEF,IAAI,CAACM,KAAK,CAACJ,QAAQ,IAAIA,QAAQ;QACzCC,IAAI,EAAEH,IAAI,CAACM,KAAK,CAACH,IAAI,IAAIA,IAAI;QAC7BC,OAAO,EAAEJ,IAAI,CAACM,KAAK,CAACF,OAAO,IAAIA;MACnC,CAAC,CAAC;IACN;IAEA,oBACIX,KAAA,CAAAkB,aAAA,CAACd,KAAK;MACFE,OAAO,EAAEA,OAAQ;MACjBC,IAAI,EAAEA,IAAK;MACXC,QAAQ,EAAEA,QAAS;MACnBC,QAAQ,EAAEA,QAAS;MACnBC,IAAI,EAAEA,IAAK;MACXC,OAAO,EAAEA;IAAQ,CACpB,CAAC;EAEV,CAAC,EAAE,CAACJ,IAAI,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,EAAEL,OAAO,CAAC,CAAC;EAEtD,IAAI,CAACQ,WAAW,EAAE;IACd,OAAO,IAAI;EACf;EAEA,oBACId,KAAA,CAAAkB,aAAA,QAAAC,MAAA,CAAAC,MAAA,KAASP,KAAK;IAAED,SAAS,EAAEV,EAAE,CAAC,WAAW,EAAEU,SAAS;EAAE,IACjDE,WACA,CAAC;AAEd,CAAC;AAED,MAAMO,kBAAkB,GAAGlB,eAAe,CAAC,oBAAoB,EAAEE,6BAA6B,CAAC;AAE/F,SAASgB,kBAAkB","ignoreList":[]}
|
package/Grid/Grid.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type VariantProps } from "../utils";
|
|
3
3
|
declare const columnVariants: (props?: ({
|
|
4
|
-
span?:
|
|
5
|
-
offset?:
|
|
6
|
-
align?: "
|
|
4
|
+
span?: 1 | 4 | 2 | 3 | 5 | 12 | 6 | 8 | 10 | "auto" | 9 | 7 | 11 | null | undefined;
|
|
5
|
+
offset?: 1 | 4 | 2 | 3 | 5 | 6 | 8 | 10 | 9 | 7 | 11 | null | undefined;
|
|
6
|
+
align?: "bottom" | "top" | "middle" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
8
|
interface ColumnProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof columnVariants> {
|
|
9
9
|
children?: React.ReactNode;
|
|
@@ -28,7 +28,7 @@ declare const Column: (({ span, align, children, className, offset, ...props }:
|
|
|
28
28
|
}>) => (props: unknown) => React.JSX.Element;
|
|
29
29
|
};
|
|
30
30
|
declare const gridVariants: (props?: ({
|
|
31
|
-
gap?: "
|
|
31
|
+
gap?: "none" | "small" | "comfortable" | "compact" | "micro" | "spacious" | null | undefined;
|
|
32
32
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
33
33
|
interface GridProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof gridVariants> {
|
|
34
34
|
children: React.ReactElement<ColumnProps, typeof Column> | Array<React.ReactElement<ColumnProps, typeof Column>>;
|
package/Heading/Heading.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type VariantProps } from "../utils";
|
|
|
3
3
|
export type HeadingTags = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
4
4
|
export type HeadingLevels = 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
5
|
declare const headingVariants: (props?: ({
|
|
6
|
-
level?:
|
|
6
|
+
level?: 1 | 4 | 2 | 3 | 5 | 6 | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
8
|
interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement>, VariantProps<typeof headingVariants> {
|
|
9
9
|
as?: HeadingTags;
|