@salutejs/plasma-new-hope 0.174.0-canary.1503.11466452273.0 → 0.174.0-canary.1504.11479867300.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -1
- package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -1
- package/cjs/components/Attach/Attach.js +3 -4
- package/cjs/components/Attach/Attach.js.map +1 -1
- package/cjs/components/Attach/components/AttachButton/AttachButton.js +0 -1
- package/cjs/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
- package/cjs/components/Attach/ui/Button/Button.styles.js +0 -1
- package/cjs/components/Attach/ui/Button/Button.styles.js.map +1 -1
- package/cjs/components/Attach/ui/Cell/Cell.styles.js +0 -2
- package/cjs/components/Attach/ui/Cell/Cell.styles.js.map +1 -1
- package/cjs/components/Attach/ui/IconButton/IconButton.styles.js +0 -1
- package/cjs/components/Attach/ui/IconButton/IconButton.styles.js.map +1 -1
- package/cjs/components/Attach/utils/getFileicon.js +3 -4
- package/cjs/components/Attach/utils/getFileicon.js.map +1 -1
- package/cjs/components/Attach/utils/index.js +0 -3
- package/cjs/components/Attach/utils/index.js.map +1 -1
- package/cjs/components/Autocomplete/Autocomplete.js +5 -6
- package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
- package/cjs/components/Autocomplete/Autocomplete.styles.js +2 -3
- package/cjs/components/Autocomplete/Autocomplete.styles.js.map +1 -1
- package/cjs/components/Autocomplete/ui/TextField/TextField.styles.js +1 -2
- package/cjs/components/Autocomplete/ui/TextField/TextField.styles.js.map +1 -1
- package/cjs/components/Avatar/Avatar.js +2 -3
- package/cjs/components/Avatar/Avatar.js.map +1 -1
- package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +2 -4
- package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
- package/cjs/components/Button/Button.styles.js +0 -3
- package/cjs/components/Button/Button.styles.js.map +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js +5 -5
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +8 -8
- package/cjs/components/Calendar/hooks/useDays.js +2 -2
- package/cjs/components/Calendar/hooks/useKeyNavigation.js +1 -1
- package/cjs/components/Calendar/hooks/useMonths.js +2 -2
- package/cjs/components/Calendar/hooks/useQuarters.js +2 -2
- package/cjs/components/Calendar/hooks/useYears.js +2 -2
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +4 -4
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -6
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +0 -1
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +4 -4
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +4 -4
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +4 -4
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +11 -12
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js +2 -4
- package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +0 -2
- package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js +1 -2
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -6
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +1 -3
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -2
- package/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/Combobox.js +4 -10
- package/cjs/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
- package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
- package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -10
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -10
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -10
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -10
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
- package/cjs/components/DatePicker/DatePickerBase.styles.js +1 -7
- package/cjs/components/DatePicker/DatePickerBase.styles.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.js +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
- package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
- package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
- package/cjs/components/Drawer/Drawer.js +5 -10
- package/cjs/components/Drawer/Drawer.js.map +1 -1
- package/cjs/components/Drawer/Drawer.styles.js +0 -4
- package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
- package/cjs/components/Drawer/hooks/useDrawer.js +0 -4
- package/cjs/components/Drawer/hooks/useDrawer.js.map +1 -1
- package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
- package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
- package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
- package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
- package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
- package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.js +3 -10
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.styles.js +2 -3
- package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -9
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -2
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -2
- package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +0 -1
- package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -1
- package/cjs/components/Editable/Editable.js +3 -4
- package/cjs/components/Editable/Editable.js.map +1 -1
- package/cjs/components/Editable/utils/clearSelection.js +0 -2
- package/cjs/components/Editable/utils/clearSelection.js.map +1 -1
- package/cjs/components/Editable/utils/selectText.js +0 -2
- package/cjs/components/Editable/utils/selectText.js.map +1 -1
- package/cjs/components/EmptyState/EmptyState.styles.js +1 -2
- package/cjs/components/EmptyState/EmptyState.styles.js.map +1 -1
- package/cjs/components/IconButton/IconButton.js +1 -1
- package/cjs/components/IconButton/IconButton.styles.js +0 -8
- package/cjs/components/IconButton/IconButton.styles.js.map +1 -1
- package/cjs/components/Modal/Modal.js +6 -8
- package/cjs/components/Modal/Modal.js.map +1 -1
- package/cjs/components/Modal/hooks/useModal.js +0 -4
- package/cjs/components/Modal/hooks/useModal.js.map +1 -1
- package/cjs/components/Notification/Notification.js +2 -2
- package/cjs/components/Notification/Notification.js.map +1 -1
- package/cjs/components/Notification/Notification.styles.js +2 -3
- package/cjs/components/Notification/Notification.styles.js.map +1 -1
- package/cjs/components/Notification/Notification.types.js.map +1 -1
- package/cjs/components/Notification/NotificationsPortal.js +5 -8
- package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
- package/cjs/components/Notification/NotificationsProvider.js +1 -3
- package/cjs/components/Notification/NotificationsProvider.js.map +1 -1
- package/cjs/components/Pagination/Pagination.css +13 -13
- package/cjs/components/Pagination/Pagination.styles.js +1 -2
- package/cjs/components/Pagination/Pagination.styles.js.map +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +13 -13
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -2
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
- package/cjs/components/Panel/ui/PanelHeader/PanelHeader.js +1 -2
- package/cjs/components/Panel/ui/PanelHeader/PanelHeader.js.map +1 -1
- package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -2
- package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
- package/cjs/components/Popover/Popover.js +1 -1
- package/cjs/components/Popup/Popup.js +2 -2
- package/cjs/components/Popup/PopupContext.js +1 -1
- package/cjs/components/Range/Range.styles.js +0 -1
- package/cjs/components/Range/Range.styles.js.map +1 -1
- package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +4 -5
- package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
- package/cjs/components/Select/Select.css +13 -13
- package/cjs/components/Select/Select.js +11 -12
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/Select.styles.js +3 -6
- package/cjs/components/Select/Select.styles.js.map +1 -1
- package/cjs/components/Select/Select.styles_ei4ic3.css +5 -0
- package/cjs/components/Select/Select.tokens.js +17 -1
- package/cjs/components/Select/Select.tokens.js.map +1 -1
- package/cjs/components/Select/hooks/usePathMaps.js +0 -2
- package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
- package/cjs/components/Select/ui/Inner/Inner.css +13 -13
- package/cjs/components/Select/ui/Inner/Inner.js +1 -2
- package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.css +13 -13
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js +4 -5
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +11 -12
- package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/{Item.styles_baxa65.css → Item.styles_1gaxu1y.css} +2 -2
- package/cjs/components/Select/ui/Target/ui/Button/Button.js +1 -1
- package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +1 -3
- package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -2
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -4
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +1 -2
- package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -1
- package/cjs/components/Select/utils/getButtonLabel.js +0 -2
- package/cjs/components/Select/utils/getButtonLabel.js.map +1 -1
- package/cjs/components/Sheet/Sheet.js +3 -3
- package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +2 -4
- package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
- package/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js +2 -4
- package/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js.map +1 -1
- package/cjs/components/Slider/Slider.js +0 -8
- package/cjs/components/Slider/Slider.js.map +1 -1
- package/cjs/components/Slider/components/Double/Double.js +1 -2
- package/cjs/components/Slider/components/Double/Double.js.map +1 -1
- package/cjs/components/Slider/components/Double/Double.styles.js +0 -1
- package/cjs/components/Slider/components/Double/Double.styles.js.map +1 -1
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
- package/cjs/components/Slider/components/Single/Single.js +1 -2
- package/cjs/components/Slider/components/Single/Single.js.map +1 -1
- package/cjs/components/Slider/components/SliderBase/SliderBase.js +1 -1
- package/cjs/components/Steps/Steps.js +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
- package/cjs/components/TextArea/TextArea.js +2 -2
- package/cjs/components/TextArea/TextArea.styles.js +2 -3
- package/cjs/components/TextArea/TextArea.styles.js.map +1 -1
- package/cjs/components/TextArea/ui/Hint/Hint.js +1 -2
- package/cjs/components/TextArea/ui/Hint/Hint.js.map +1 -1
- package/cjs/components/TextField/TextField.js +3 -3
- package/cjs/components/TextField/TextField.styles.js +1 -2
- package/cjs/components/TextField/TextField.styles.js.map +1 -1
- package/cjs/components/TextField/ui/Hint/Hint.js +1 -2
- package/cjs/components/TextField/ui/Hint/Hint.js.map +1 -1
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
- package/cjs/components/Toast/Toast.styles.js +1 -1
- package/cjs/components/Toast/ToastController.js +1 -1
- package/cjs/components/Toast/utils.js +1 -2
- package/cjs/components/Toast/utils.js.map +1 -1
- package/cjs/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
- package/cjs/components/Tooltip/Tooltip.js +2 -3
- package/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/cjs/engines/index.js +0 -2
- package/cjs/engines/index.js.map +1 -1
- package/cjs/hooks/useIsomorphicLayoutEffect.js +0 -1
- package/cjs/hooks/useIsomorphicLayoutEffect.js.map +1 -1
- package/cjs/index.css +13 -13
- package/cjs/index.js +49 -52
- package/cjs/index.js.map +1 -1
- package/cjs/utils/index.js +0 -5
- package/cjs/utils/index.js.map +1 -1
- package/emotion/cjs/components/Notification/Notification.js +2 -2
- package/emotion/cjs/components/Notification/Notification.template-doc.mdx +7 -15
- package/emotion/cjs/components/Notification/NotificationsPortal.js +3 -5
- package/emotion/cjs/components/Notification/NotificationsProvider.js +1 -3
- package/emotion/cjs/components/Notification/index.js +4 -4
- package/emotion/cjs/components/Select/Select.styles.js +5 -5
- package/emotion/cjs/components/Select/Select.tokens.js +17 -1
- package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +10 -10
- package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.js +3 -5
- package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
- package/emotion/cjs/examples/plasma_web/components/Notification/Notification.js +3 -5
- package/emotion/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
- package/emotion/es/components/Notification/Notification.js +1 -1
- package/emotion/es/components/Notification/Notification.template-doc.mdx +7 -15
- package/emotion/es/components/Notification/NotificationsPortal.js +3 -5
- package/emotion/es/components/Notification/NotificationsProvider.js +1 -3
- package/emotion/es/components/Notification/index.js +1 -1
- package/emotion/es/components/Select/Select.styles.js +5 -5
- package/emotion/es/components/Select/Select.tokens.js +17 -1
- package/emotion/es/components/Select/ui/Inner/ui/Item/Item.styles.js +10 -10
- package/emotion/es/examples/plasma_b2c/components/Notification/Notification.js +4 -6
- package/emotion/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
- package/emotion/es/examples/plasma_web/components/Notification/Notification.js +4 -6
- package/emotion/es/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
- package/emotion/package.json +2 -1
- package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -1
- package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -1
- package/es/components/Attach/Attach.js +3 -4
- package/es/components/Attach/Attach.js.map +1 -1
- package/es/components/Attach/components/AttachButton/AttachButton.js +0 -1
- package/es/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
- package/es/components/Attach/ui/Button/Button.styles.js +0 -1
- package/es/components/Attach/ui/Button/Button.styles.js.map +1 -1
- package/es/components/Attach/ui/Cell/Cell.styles.js +0 -2
- package/es/components/Attach/ui/Cell/Cell.styles.js.map +1 -1
- package/es/components/Attach/ui/IconButton/IconButton.styles.js +0 -1
- package/es/components/Attach/ui/IconButton/IconButton.styles.js.map +1 -1
- package/es/components/Attach/utils/getFileicon.js +3 -4
- package/es/components/Attach/utils/getFileicon.js.map +1 -1
- package/es/components/Attach/utils/index.js +0 -3
- package/es/components/Attach/utils/index.js.map +1 -1
- package/es/components/Autocomplete/Autocomplete.js +5 -6
- package/es/components/Autocomplete/Autocomplete.js.map +1 -1
- package/es/components/Autocomplete/Autocomplete.styles.js +2 -3
- package/es/components/Autocomplete/Autocomplete.styles.js.map +1 -1
- package/es/components/Autocomplete/ui/TextField/TextField.styles.js +1 -2
- package/es/components/Autocomplete/ui/TextField/TextField.styles.js.map +1 -1
- package/es/components/Avatar/Avatar.js +2 -3
- package/es/components/Avatar/Avatar.js.map +1 -1
- package/es/components/Breadcrumbs/Breadcrumbs.styles.js +2 -4
- package/es/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
- package/es/components/Button/Button.styles.js +0 -3
- package/es/components/Button/Button.styles.js.map +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.js +5 -5
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js +8 -8
- package/es/components/Calendar/hooks/useDays.js +2 -2
- package/es/components/Calendar/hooks/useKeyNavigation.js +1 -1
- package/es/components/Calendar/hooks/useMonths.js +2 -2
- package/es/components/Calendar/hooks/useQuarters.js +2 -2
- package/es/components/Calendar/hooks/useYears.js +2 -2
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +4 -4
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -6
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +0 -1
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +4 -4
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +4 -4
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +4 -4
- package/es/components/Combobox/ComboboxNew/Combobox.js +11 -12
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.styles.js +2 -4
- package/es/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +0 -2
- package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js +1 -2
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -6
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +1 -3
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -2
- package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/Combobox.js +4 -10
- package/es/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
- package/es/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
- package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
- package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -10
- package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -10
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -10
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -10
- package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
- package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
- package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
- package/es/components/DatePicker/DatePickerBase.styles.js +1 -7
- package/es/components/DatePicker/DatePickerBase.styles.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDate.js +1 -1
- package/es/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
- package/es/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
- package/es/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
- package/es/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
- package/es/components/Drawer/Drawer.js +5 -10
- package/es/components/Drawer/Drawer.js.map +1 -1
- package/es/components/Drawer/Drawer.styles.js +0 -4
- package/es/components/Drawer/Drawer.styles.js.map +1 -1
- package/es/components/Drawer/hooks/useDrawer.js +0 -4
- package/es/components/Drawer/hooks/useDrawer.js.map +1 -1
- package/es/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
- package/es/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
- package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
- package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
- package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
- package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
- package/es/components/Dropdown/Dropdown.js +3 -10
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Dropdown/Dropdown.styles.js +2 -3
- package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -9
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -2
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -2
- package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +0 -1
- package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -1
- package/es/components/Editable/Editable.js +3 -4
- package/es/components/Editable/Editable.js.map +1 -1
- package/es/components/Editable/utils/clearSelection.js +0 -2
- package/es/components/Editable/utils/clearSelection.js.map +1 -1
- package/es/components/Editable/utils/selectText.js +0 -2
- package/es/components/Editable/utils/selectText.js.map +1 -1
- package/es/components/EmptyState/EmptyState.styles.js +1 -2
- package/es/components/EmptyState/EmptyState.styles.js.map +1 -1
- package/es/components/IconButton/IconButton.js +1 -1
- package/es/components/IconButton/IconButton.styles.js +0 -8
- package/es/components/IconButton/IconButton.styles.js.map +1 -1
- package/es/components/Modal/Modal.js +6 -8
- package/es/components/Modal/Modal.js.map +1 -1
- package/es/components/Modal/hooks/useModal.js +0 -4
- package/es/components/Modal/hooks/useModal.js.map +1 -1
- package/es/components/Notification/Notification.js +2 -2
- package/es/components/Notification/Notification.js.map +1 -1
- package/es/components/Notification/Notification.styles.js +2 -3
- package/es/components/Notification/Notification.styles.js.map +1 -1
- package/es/components/Notification/Notification.types.js.map +1 -1
- package/es/components/Notification/NotificationsPortal.js +5 -8
- package/es/components/Notification/NotificationsPortal.js.map +1 -1
- package/es/components/Notification/NotificationsProvider.js +1 -3
- package/es/components/Notification/NotificationsProvider.js.map +1 -1
- package/es/components/Pagination/Pagination.css +13 -13
- package/es/components/Pagination/Pagination.styles.js +1 -2
- package/es/components/Pagination/Pagination.styles.js.map +1 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +13 -13
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -2
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
- package/es/components/Panel/ui/PanelHeader/PanelHeader.js +1 -2
- package/es/components/Panel/ui/PanelHeader/PanelHeader.js.map +1 -1
- package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -2
- package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
- package/es/components/Popover/Popover.js +1 -1
- package/es/components/Popup/Popup.js +2 -2
- package/es/components/Popup/PopupContext.js +1 -1
- package/es/components/Range/Range.styles.js +0 -1
- package/es/components/Range/Range.styles.js.map +1 -1
- package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js +4 -5
- package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
- package/es/components/Select/Select.css +13 -13
- package/es/components/Select/Select.js +11 -12
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/Select.styles.js +3 -6
- package/es/components/Select/Select.styles.js.map +1 -1
- package/es/components/Select/Select.styles_ei4ic3.css +5 -0
- package/es/components/Select/Select.tokens.js +17 -1
- package/es/components/Select/Select.tokens.js.map +1 -1
- package/es/components/Select/hooks/usePathMaps.js +0 -2
- package/es/components/Select/hooks/usePathMaps.js.map +1 -1
- package/es/components/Select/ui/Inner/Inner.css +13 -13
- package/es/components/Select/ui/Inner/Inner.js +1 -2
- package/es/components/Select/ui/Inner/Inner.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.css +13 -13
- package/es/components/Select/ui/Inner/ui/Item/Item.js +4 -5
- package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.styles.js +11 -12
- package/es/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/{Item.styles_baxa65.css → Item.styles_1gaxu1y.css} +2 -2
- package/es/components/Select/ui/Target/ui/Button/Button.js +1 -1
- package/es/components/Select/ui/Target/ui/Button/Button.styles.js +1 -3
- package/es/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -2
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -4
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +1 -2
- package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -1
- package/es/components/Select/utils/getButtonLabel.js +0 -2
- package/es/components/Select/utils/getButtonLabel.js.map +1 -1
- package/es/components/Sheet/Sheet.js +3 -3
- package/es/components/Skeleton/LineSkeleton/LineSkeleton.js +2 -4
- package/es/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
- package/es/components/Skeleton/RectSkeleton/RectSkeleton.js +2 -4
- package/es/components/Skeleton/RectSkeleton/RectSkeleton.js.map +1 -1
- package/es/components/Slider/Slider.js +0 -8
- package/es/components/Slider/Slider.js.map +1 -1
- package/es/components/Slider/components/Double/Double.js +1 -2
- package/es/components/Slider/components/Double/Double.js.map +1 -1
- package/es/components/Slider/components/Double/Double.styles.js +0 -1
- package/es/components/Slider/components/Double/Double.styles.js.map +1 -1
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
- package/es/components/Slider/components/Single/Single.js +1 -2
- package/es/components/Slider/components/Single/Single.js.map +1 -1
- package/es/components/Slider/components/SliderBase/SliderBase.js +1 -1
- package/es/components/Steps/Steps.js +1 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
- package/es/components/TextArea/TextArea.js +2 -2
- package/es/components/TextArea/TextArea.styles.js +2 -3
- package/es/components/TextArea/TextArea.styles.js.map +1 -1
- package/es/components/TextArea/ui/Hint/Hint.js +1 -2
- package/es/components/TextArea/ui/Hint/Hint.js.map +1 -1
- package/es/components/TextField/TextField.js +3 -3
- package/es/components/TextField/TextField.styles.js +1 -2
- package/es/components/TextField/TextField.styles.js.map +1 -1
- package/es/components/TextField/ui/Hint/Hint.js +1 -2
- package/es/components/TextField/ui/Hint/Hint.js.map +1 -1
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
- package/es/components/Toast/Toast.styles.js +1 -1
- package/es/components/Toast/ToastController.js +1 -1
- package/es/components/Toast/utils.js +1 -2
- package/es/components/Toast/utils.js.map +1 -1
- package/es/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
- package/es/components/Tooltip/Tooltip.js +2 -3
- package/es/components/Tooltip/Tooltip.js.map +1 -1
- package/es/engines/index.js +0 -2
- package/es/engines/index.js.map +1 -1
- package/es/hooks/useIsomorphicLayoutEffect.js +0 -1
- package/es/hooks/useIsomorphicLayoutEffect.js.map +1 -1
- package/es/index.css +13 -13
- package/es/index.js +22 -25
- package/es/index.js.map +1 -1
- package/es/utils/index.js +0 -3
- package/es/utils/index.js.map +1 -1
- package/package.json +5 -2
- package/styled-components/cjs/components/Notification/Notification.js +2 -2
- package/styled-components/cjs/components/Notification/Notification.template-doc.mdx +7 -15
- package/styled-components/cjs/components/Notification/NotificationsPortal.js +2 -4
- package/styled-components/cjs/components/Notification/NotificationsProvider.js +1 -3
- package/styled-components/cjs/components/Notification/index.js +4 -4
- package/styled-components/cjs/components/Select/Select.styles.js +2 -2
- package/styled-components/cjs/components/Select/Select.tokens.js +17 -1
- package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +3 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.js +3 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
- package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.js +3 -5
- package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
- package/styled-components/es/components/Notification/Notification.js +1 -1
- package/styled-components/es/components/Notification/Notification.template-doc.mdx +7 -15
- package/styled-components/es/components/Notification/NotificationsPortal.js +2 -4
- package/styled-components/es/components/Notification/NotificationsProvider.js +1 -3
- package/styled-components/es/components/Notification/index.js +1 -1
- package/styled-components/es/components/Select/Select.styles.js +2 -2
- package/styled-components/es/components/Select/Select.tokens.js +17 -1
- package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.styles.js +3 -3
- package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.js +4 -6
- package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
- package/styled-components/es/examples/plasma_web/components/Notification/Notification.js +4 -6
- package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
- package/styled-components/package.json +2 -1
- package/types/components/Notification/Notification.d.ts +3 -3
- package/types/components/Notification/Notification.d.ts.map +1 -1
- package/types/components/Notification/Notification.types.d.ts +5 -11
- package/types/components/Notification/Notification.types.d.ts.map +1 -1
- package/types/components/Notification/NotificationsProvider.d.ts +3 -4
- package/types/components/Notification/NotificationsProvider.d.ts.map +1 -1
- package/types/components/Notification/index.d.ts +2 -2
- package/types/components/Notification/index.d.ts.map +1 -1
- package/types/components/Select/Select.tokens.d.ts +16 -0
- package/types/components/Select/Select.tokens.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Notification/Notification.d.ts +2 -4
- package/types/examples/plasma_b2c/components/Notification/Notification.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Notification/Notification.d.ts +13 -4
- package/types/examples/plasma_web/components/Notification/Notification.d.ts.map +1 -1
- package/cjs/components/Select/Select.styles_1nzals0.css +0 -5
- package/es/components/Select/Select.styles_1nzals0.css +0 -5
@@ -4,7 +4,6 @@ import './AccordionItem.styles_aus2x3.css';
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
5
5
|
|
6
6
|
var react = require('@linaria/react');
|
7
|
-
require('react');
|
8
7
|
var IconChevronDownFill = require('../../../_Icon/Icons/IconChevronDownFill.js');
|
9
8
|
var IconMinus = require('../../../_Icon/Icons/IconMinus.js');
|
10
9
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AccordionItem.styles.js","sources":["../../../../../src/components/Accordion/ui/AccordionItem/AccordionItem.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { IconChevronDownFill, IconMinus } from '../../../_Icon';\nimport { classes, tokens } from '../../Accordion.tokens';\nimport { addFocus } from '../../../../mixins';\n\nexport const StyledAccordionItem = styled.div`\n background: var(${tokens.accordionItemBackground});\n border: var(${tokens.accordionItemBorder});\n border-bottom: var(${tokens.accordionItemBorderBottom});\n\n &:last-child {\n border-bottom: var(${tokens.accordionItemBorder});\n }\n\n &.${classes.accordionDisabled} {\n opacity: 0.4;\n cursor: not-allowed;\n }\n`;\n\nexport const StyledAccordionHeader = styled.button`\n width: 100%;\n border: none;\n padding: var(${tokens.accordionItemPadding});\n display: flex;\n gap: var(${tokens.accordionItemGap});\n justify-content: space-between;\n align-items: center;\n background: none;\n box-sizing: border-box;\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n\n ${addFocus({\n outlineOffset: '0.125rem',\n outlineSize: '0.125rem',\n outlineRadius: '0',\n outlineColor: `var(${tokens.accordionItemFocus})`,\n })}\n`;\n\nexport const StyledAccordionHeaderLeft = styled.div`\n display: flex;\n gap: var(${tokens.accordionItemGap});\n justify-content: space-between;\n align-items: center;\n`;\n\nexport const StyledAccordionContentRight = styled.div`\n transition: 0.2s;\n transform: rotate(90deg);\n\n &.${classes.accordionItemShowBody} {\n transition: 0.2s;\n transform: rotate(0deg);\n }\n`;\n\nexport const StyledAccordionContentLeft = styled.div`\n transition: 0.2s;\n display: flex;\n align-items: center;\n\n &.${classes.accordionItemShowBody} {\n transition: 0.2s;\n transform: rotate(180deg);\n }\n`;\n\nexport const StyledAccordionTitle = styled.div`\n color: var(${tokens.accordionItemTitleColor});\n font-family: var(${tokens.accordionItemTitleFontFamily});\n font-size: var(${tokens.accordionItemTitleFontSize});\n font-weight: var(${tokens.accordionItemTitleFontWeight});\n font-style: var(${tokens.accordionItemTitleFontStyle});\n letter-spacing: var(${tokens.accordionItemTitleLetterSpacing});\n line-height: var(${tokens.accordionItemTitleLineHeight});\n text-align: left;\n`;\n\nexport const StyledAccordionBodyAnimate = styled.div`\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 0.2s ease-out;\n overflow: hidden;\n\n &.${classes.accordionItemShowBody} {\n grid-template-rows: 1fr;\n padding-bottom: var(${tokens.accordionItemPaddingVertical});\n\n &.${classes.accordionPlusAnimationElement} {\n transition: 0.2s;\n transform: rotate(0deg);\n }\n }\n`;\n\nexport const StyledAccordionBody = styled.div`\n color: var(${tokens.accordionItemTextColor});\n font-family: var(${tokens.accordionItemTextFontFamily});\n font-size: var(${tokens.accordionItemTextFontSize});\n font-weight: var(${tokens.accordionItemTextFontWeight});\n font-style: var(${tokens.accordionItemTextFontStyle});\n letter-spacing: var(${tokens.accordionItemTextLetterSpacing});\n line-height: var(${tokens.accordionItemTextLineHeight});\n overflow: hidden;\n padding-right: var(${tokens.accordionItemPaddingHorizontal});\n padding-left: var(${tokens.accordionItemPaddingHorizontalLeft});\n text-align: left;\n`;\n\nexport const StyledArrow = styled(IconChevronDownFill)`\n pointer-events: none;\n user-select: none;\n color: var(${tokens.accordionItemIconColor});\n`;\n\nexport const StyledMinus = styled(IconMinus)`\n pointer-events: none;\n user-select: none;\n color: var(${tokens.accordionItemIconColor});\n display: flex;\n align-items: center;\n position: absolute;\n top: 0;\n left: 0;\n\n &.${classes.accordionPlusAnimationElement} {\n transition: 0.2s;\n transform: rotate(90deg);\n }\n\n &.${classes.accordionItemShowBody} {\n transition: 0.2s;\n transform: rotate(0deg);\n }\n`;\n\nexport const StyledPlus = styled.div`\n position: relative;\n height: 1rem;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n`;\n"],"names":["StyledAccordionItem","styled","name","class","propsAsIs","StyledAccordionHeader","StyledAccordionHeaderLeft","StyledAccordionContentRight","StyledAccordionContentLeft","StyledAccordionTitle","StyledAccordionBodyAnimate","StyledAccordionBody","_exp31","IconChevronDownFill","StyledArrow","_exp33","IconMinus","StyledMinus","StyledPlus"],"mappings":"
|
1
|
+
{"version":3,"file":"AccordionItem.styles.js","sources":["../../../../../src/components/Accordion/ui/AccordionItem/AccordionItem.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { IconChevronDownFill, IconMinus } from '../../../_Icon';\nimport { classes, tokens } from '../../Accordion.tokens';\nimport { addFocus } from '../../../../mixins';\n\nexport const StyledAccordionItem = styled.div`\n background: var(${tokens.accordionItemBackground});\n border: var(${tokens.accordionItemBorder});\n border-bottom: var(${tokens.accordionItemBorderBottom});\n\n &:last-child {\n border-bottom: var(${tokens.accordionItemBorder});\n }\n\n &.${classes.accordionDisabled} {\n opacity: 0.4;\n cursor: not-allowed;\n }\n`;\n\nexport const StyledAccordionHeader = styled.button`\n width: 100%;\n border: none;\n padding: var(${tokens.accordionItemPadding});\n display: flex;\n gap: var(${tokens.accordionItemGap});\n justify-content: space-between;\n align-items: center;\n background: none;\n box-sizing: border-box;\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n\n ${addFocus({\n outlineOffset: '0.125rem',\n outlineSize: '0.125rem',\n outlineRadius: '0',\n outlineColor: `var(${tokens.accordionItemFocus})`,\n })}\n`;\n\nexport const StyledAccordionHeaderLeft = styled.div`\n display: flex;\n gap: var(${tokens.accordionItemGap});\n justify-content: space-between;\n align-items: center;\n`;\n\nexport const StyledAccordionContentRight = styled.div`\n transition: 0.2s;\n transform: rotate(90deg);\n\n &.${classes.accordionItemShowBody} {\n transition: 0.2s;\n transform: rotate(0deg);\n }\n`;\n\nexport const StyledAccordionContentLeft = styled.div`\n transition: 0.2s;\n display: flex;\n align-items: center;\n\n &.${classes.accordionItemShowBody} {\n transition: 0.2s;\n transform: rotate(180deg);\n }\n`;\n\nexport const StyledAccordionTitle = styled.div`\n color: var(${tokens.accordionItemTitleColor});\n font-family: var(${tokens.accordionItemTitleFontFamily});\n font-size: var(${tokens.accordionItemTitleFontSize});\n font-weight: var(${tokens.accordionItemTitleFontWeight});\n font-style: var(${tokens.accordionItemTitleFontStyle});\n letter-spacing: var(${tokens.accordionItemTitleLetterSpacing});\n line-height: var(${tokens.accordionItemTitleLineHeight});\n text-align: left;\n`;\n\nexport const StyledAccordionBodyAnimate = styled.div`\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 0.2s ease-out;\n overflow: hidden;\n\n &.${classes.accordionItemShowBody} {\n grid-template-rows: 1fr;\n padding-bottom: var(${tokens.accordionItemPaddingVertical});\n\n &.${classes.accordionPlusAnimationElement} {\n transition: 0.2s;\n transform: rotate(0deg);\n }\n }\n`;\n\nexport const StyledAccordionBody = styled.div`\n color: var(${tokens.accordionItemTextColor});\n font-family: var(${tokens.accordionItemTextFontFamily});\n font-size: var(${tokens.accordionItemTextFontSize});\n font-weight: var(${tokens.accordionItemTextFontWeight});\n font-style: var(${tokens.accordionItemTextFontStyle});\n letter-spacing: var(${tokens.accordionItemTextLetterSpacing});\n line-height: var(${tokens.accordionItemTextLineHeight});\n overflow: hidden;\n padding-right: var(${tokens.accordionItemPaddingHorizontal});\n padding-left: var(${tokens.accordionItemPaddingHorizontalLeft});\n text-align: left;\n`;\n\nexport const StyledArrow = styled(IconChevronDownFill)`\n pointer-events: none;\n user-select: none;\n color: var(${tokens.accordionItemIconColor});\n`;\n\nexport const StyledMinus = styled(IconMinus)`\n pointer-events: none;\n user-select: none;\n color: var(${tokens.accordionItemIconColor});\n display: flex;\n align-items: center;\n position: absolute;\n top: 0;\n left: 0;\n\n &.${classes.accordionPlusAnimationElement} {\n transition: 0.2s;\n transform: rotate(90deg);\n }\n\n &.${classes.accordionItemShowBody} {\n transition: 0.2s;\n transform: rotate(0deg);\n }\n`;\n\nexport const StyledPlus = styled.div`\n position: relative;\n height: 1rem;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n`;\n"],"names":["StyledAccordionItem","styled","name","class","propsAsIs","StyledAccordionHeader","StyledAccordionHeaderLeft","StyledAccordionContentRight","StyledAccordionContentLeft","StyledAccordionTitle","StyledAccordionBodyAnimate","StyledAccordionBody","_exp31","IconChevronDownFill","StyledArrow","_exp33","IconMinus","StyledMinus","StyledPlus"],"mappings":";;;;;;;;AAMO,IAAMA,mBAAmB,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,qBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAaxC,EAAA;AAEM,IAAMC,qBAAqB,gBAAGJ,YAAM,CAAA,QAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,uBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAsB1C,EAAA;AAEM,IAAME,yBAAyB,gBAAGL,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,2BAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAK9C,EAAA;AAEM,IAAMG,2BAA2B,gBAAGN,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,6BAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAQhD,EAAA;AAEM,IAAMI,0BAA0B,gBAAGP,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,4BAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAS/C,EAAA;AAEM,IAAMK,oBAAoB,gBAAGR,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,sBAAA;AAAAC,EAAA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abelHelpers = require('../../_virtual/_rollupPluginBabelHelper
|
|
6
6
|
var React = require('react');
|
7
7
|
var plasmaCore = require('@salutejs/plasma-core');
|
8
8
|
var index = require('../../utils/index.js');
|
9
|
-
require('@linaria/react');
|
10
|
-
var IconCloseCircleOutline = require('../_Icon/Icons/IconCloseCircleOutline.js');
|
11
9
|
var base$1 = require('./variations/_size/base.js');
|
12
10
|
var base = require('./variations/_view/base.js');
|
13
11
|
var Attach_styles = require('./Attach.styles.js');
|
14
|
-
var Cell_styles = require('./ui/Cell/Cell.styles.js');
|
15
12
|
var index$1 = require('./utils/index.js');
|
16
13
|
var Attach_tokens = require('./Attach.tokens.js');
|
17
|
-
var AttachButton = require('./components/AttachButton/AttachButton.js');
|
18
14
|
var IconButton_styles = require('./ui/IconButton/IconButton.styles.js');
|
19
15
|
var extractExtension = require('./utils/extractExtension.js');
|
20
16
|
var addSeparator = require('./utils/addSeparator.js');
|
17
|
+
var AttachButton = require('./components/AttachButton/AttachButton.js');
|
18
|
+
var Cell_styles = require('./ui/Cell/Cell.styles.js');
|
19
|
+
var IconCloseCircleOutline = require('../_Icon/Icons/IconCloseCircleOutline.js');
|
21
20
|
var getFileicon = require('./utils/getFileicon.js');
|
22
21
|
|
23
22
|
var _IconCloseCircleOutli;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Attach.js","sources":["../../../src/components/Attach/Attach.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { ChangeEvent } from 'react';\nimport { useForkRef, useIsomorphicLayoutEffect } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { IconCloseCircleOutline } from '../_Icon';\n\nimport { AttachProps } from './Attach.types';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base, StyledHiddenInput, StyledHiddenInputHelper } from './Attach.styles';\nimport { StyledCell } from './ui/Cell/Cell';\nimport { extractExtension, getFileicon, addSeparator, separator } from './utils';\nimport { classes } from './Attach.tokens';\nimport { AttachButton } from './components/AttachButton';\nimport { StyledIconButtonCancel } from './ui/IconButton/IconButton.styles';\n\nexport const attachRoot = (Root: RootProps<HTMLDivElement, AttachProps>) =>\n forwardRef<HTMLDivElement, AttachProps>((props, outerRef) => {\n const {\n flow = 'auto',\n buttonType = 'button',\n hasAttachment = true,\n acceptedFileFormats,\n size,\n view,\n className,\n style,\n isLoading,\n disabled,\n id,\n name,\n onChange,\n onClear,\n ...rest\n } = props;\n\n const innerRef = useRef<HTMLDivElement>(null);\n const ref = useForkRef(outerRef, innerRef);\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const inputHelperRef = useRef<HTMLDivElement | null>(null);\n const cellRef = useRef<HTMLDivElement | null>(null);\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n\n const emptyTextCellWidth = useRef<number | null>(null);\n\n const [filename, setFilename] = useState<string>('');\n const [truncatedFilename, setTruncatedFilename] = useState<string>('');\n\n const horizontalClass = flow === 'horizontal' ? classes.horizontal : undefined;\n const verticalClass = flow === 'vertical' ? classes.vertical : undefined;\n const autoClass = flow === 'auto' ? classes.auto : undefined;\n const cellHiddenClass = truncatedFilename.length === 0 ? classes.cellHidden : undefined;\n\n const accept = acceptedFileFormats?.join(',');\n const extension = extractExtension(filename);\n const cellContentLeft = getFileicon(extension, size);\n\n useEffect(() => {\n emptyTextCellWidth.current = cellRef.current?.offsetWidth || 0;\n }, []);\n\n useIsomorphicLayoutEffect(() => {\n if (\n !cellRef.current ||\n !cellRef.current.parentElement ||\n !inputHelperRef.current ||\n !inputHelperRef.current.textContent ||\n !emptyTextCellWidth.current ||\n !buttonRef.current\n ) {\n return;\n }\n\n const { offsetWidth: textWidth } = inputHelperRef.current;\n const { offsetWidth: buttonWidth } = buttonRef.current;\n const { width: parentWidth, left: parentLeft } = cellRef.current.parentElement.getBoundingClientRect();\n const { left: cellLeft } = cellRef.current.getBoundingClientRect();\n const leftDiff = cellLeft - parentLeft;\n let currentTextWidth = textWidth;\n\n if (\n currentTextWidth + emptyTextCellWidth.current + leftDiff <= parentWidth ||\n currentTextWidth + emptyTextCellWidth.current < buttonWidth\n ) {\n setTruncatedFilename(filename);\n return;\n }\n\n let currFilename = addSeparator(filename, separator);\n for (let i = currFilename.indexOf(separator) - 1; i > 0; i -= 1) {\n if (currentTextWidth + emptyTextCellWidth.current + leftDiff <= parentWidth) {\n break;\n }\n\n const left = currFilename.slice(0, i);\n const right = currFilename.slice(i + 1);\n const newFilename = `${left}${right}`;\n inputHelperRef.current.textContent = newFilename;\n currentTextWidth = inputHelperRef.current.offsetWidth;\n\n if (currentTextWidth + emptyTextCellWidth.current < buttonWidth) {\n break;\n }\n\n currFilename = newFilename;\n }\n\n inputHelperRef.current.textContent = filename;\n setTruncatedFilename(currFilename);\n });\n\n const handleClick = () => {\n if (!inputRef.current) {\n return;\n }\n\n inputRef.current.click();\n };\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n if (!e.target.files) {\n return;\n }\n\n if (onChange) {\n onChange(e);\n }\n\n setFilename(e.target.files[0].name);\n };\n\n const handleClear = () => {\n if (!inputRef.current) {\n return;\n }\n\n if (onClear) {\n onClear();\n }\n\n inputRef.current.value = '';\n setFilename('');\n setTruncatedFilename('');\n };\n\n return (\n <Root\n className={cx(horizontalClass, verticalClass, autoClass, className)}\n style={style}\n size={size}\n view={view}\n ref={ref}\n >\n <StyledHiddenInput\n ref={inputRef}\n accept={accept}\n type=\"file\"\n id={id}\n name={name}\n onChange={handleChange}\n />\n <StyledHiddenInputHelper ref={inputHelperRef}>{filename}</StyledHiddenInputHelper>\n\n <AttachButton\n buttonType={buttonType}\n view={view}\n size={size}\n onClick={handleClick}\n isLoading={isLoading}\n disabled={disabled}\n ref={buttonRef}\n {...rest}\n />\n {hasAttachment && (\n <StyledCell\n stretching=\"fixed\"\n className={cellHiddenClass}\n ref={cellRef}\n size={size}\n title={truncatedFilename}\n contentLeft={cellContentLeft}\n contentRight={\n <StyledIconButtonCancel view={view} size={size} onClick={handleClear}>\n <IconCloseCircleOutline size=\"xs\" color=\"inherit\" />\n </StyledIconButtonCancel>\n }\n />\n )}\n </Root>\n );\n });\n\nexport const attachConfig = {\n name: 'Attach',\n tag: 'div',\n layout: attachRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["attachRoot","Root","forwardRef","props","outerRef","_props$flow","flow","_props$buttonType","buttonType","_props$hasAttachment","hasAttachment","acceptedFileFormats","size","view","className","style","isLoading","disabled","id","name","onChange","onClear","rest","_objectWithoutProperties","_excluded","innerRef","useRef","ref","useForkRef","inputRef","inputHelperRef","cellRef","buttonRef","emptyTextCellWidth","_useState","useState","_useState2","_slicedToArray","filename","setFilename","_useState3","_useState4","truncatedFilename","setTruncatedFilename","horizontalClass","classes","horizontal","undefined","verticalClass","vertical","autoClass","auto","cellHiddenClass","length","cellHidden","accept","join","extension","extractExtension","cellContentLeft","getFileicon","useEffect","_cellRef$current","current","offsetWidth","useIsomorphicLayoutEffect","parentElement","textContent","textWidth","buttonWidth","_cellRef$current$pare","getBoundingClientRect","parentWidth","width","parentLeft","left","_cellRef$current$getB","cellLeft","leftDiff","currentTextWidth","currFilename","addSeparator","separator","i","indexOf","slice","right","newFilename","concat","handleClick","click","handleChange","e","target","files","handleClear","value","React","createElement","cx","StyledHiddenInput","type","StyledHiddenInputHelper","AttachButton","_extends","onClick","StyledCell","stretching","title","contentLeft","contentRight","StyledIconButtonCancel","_IconCloseCircleOutli","IconCloseCircleOutline","color","attachConfig","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;IAkBaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,gBAAU,CAA8B,UAACC,KAAK,EAAEC,QAAQ,EAAK;AACzD,IAAA,IAAAC,WAAA,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rG,QAAAA,IAAI,EAAC,IAAI;AAACsG,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAChC,CAAA;AAC3B,KACJ,CAEH,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMC,YAAY,GAAG;AACxBhG,EAAAA,IAAI,EAAE,QAAQ;AACdiG,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAErH,UAAU;AAClBsH,EAAAA,IAAI,EAAJA,kBAAI;AACJC,EAAAA,UAAU,EAAE;AACR1G,IAAAA,IAAI,EAAE;AACF2G,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD7G,IAAAA,IAAI,EAAE;AACF4G,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN9G,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
|
1
|
+
{"version":3,"file":"Attach.js","sources":["../../../src/components/Attach/Attach.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { ChangeEvent } from 'react';\nimport { useForkRef, useIsomorphicLayoutEffect } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { IconCloseCircleOutline } from '../_Icon';\n\nimport { AttachProps } from './Attach.types';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base, StyledHiddenInput, StyledHiddenInputHelper } from './Attach.styles';\nimport { StyledCell } from './ui/Cell/Cell';\nimport { extractExtension, getFileicon, addSeparator, separator } from './utils';\nimport { classes } from './Attach.tokens';\nimport { AttachButton } from './components/AttachButton';\nimport { StyledIconButtonCancel } from './ui/IconButton/IconButton.styles';\n\nexport const attachRoot = (Root: RootProps<HTMLDivElement, AttachProps>) =>\n forwardRef<HTMLDivElement, AttachProps>((props, outerRef) => {\n const {\n flow = 'auto',\n buttonType = 'button',\n hasAttachment = true,\n acceptedFileFormats,\n size,\n view,\n className,\n style,\n isLoading,\n disabled,\n id,\n name,\n onChange,\n onClear,\n ...rest\n } = props;\n\n const innerRef = useRef<HTMLDivElement>(null);\n const ref = useForkRef(outerRef, innerRef);\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const inputHelperRef = useRef<HTMLDivElement | null>(null);\n const cellRef = useRef<HTMLDivElement | null>(null);\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n\n const emptyTextCellWidth = useRef<number | null>(null);\n\n const [filename, setFilename] = useState<string>('');\n const [truncatedFilename, setTruncatedFilename] = useState<string>('');\n\n const horizontalClass = flow === 'horizontal' ? classes.horizontal : undefined;\n const verticalClass = flow === 'vertical' ? classes.vertical : undefined;\n const autoClass = flow === 'auto' ? classes.auto : undefined;\n const cellHiddenClass = truncatedFilename.length === 0 ? classes.cellHidden : undefined;\n\n const accept = acceptedFileFormats?.join(',');\n const extension = extractExtension(filename);\n const cellContentLeft = getFileicon(extension, size);\n\n useEffect(() => {\n emptyTextCellWidth.current = cellRef.current?.offsetWidth || 0;\n }, []);\n\n useIsomorphicLayoutEffect(() => {\n if (\n !cellRef.current ||\n !cellRef.current.parentElement ||\n !inputHelperRef.current ||\n !inputHelperRef.current.textContent ||\n !emptyTextCellWidth.current ||\n !buttonRef.current\n ) {\n return;\n }\n\n const { offsetWidth: textWidth } = inputHelperRef.current;\n const { offsetWidth: buttonWidth } = buttonRef.current;\n const { width: parentWidth, left: parentLeft } = cellRef.current.parentElement.getBoundingClientRect();\n const { left: cellLeft } = cellRef.current.getBoundingClientRect();\n const leftDiff = cellLeft - parentLeft;\n let currentTextWidth = textWidth;\n\n if (\n currentTextWidth + emptyTextCellWidth.current + leftDiff <= parentWidth ||\n currentTextWidth + emptyTextCellWidth.current < buttonWidth\n ) {\n setTruncatedFilename(filename);\n return;\n }\n\n let currFilename = addSeparator(filename, separator);\n for (let i = currFilename.indexOf(separator) - 1; i > 0; i -= 1) {\n if (currentTextWidth + emptyTextCellWidth.current + leftDiff <= parentWidth) {\n break;\n }\n\n const left = currFilename.slice(0, i);\n const right = currFilename.slice(i + 1);\n const newFilename = `${left}${right}`;\n inputHelperRef.current.textContent = newFilename;\n currentTextWidth = inputHelperRef.current.offsetWidth;\n\n if (currentTextWidth + emptyTextCellWidth.current < buttonWidth) {\n break;\n }\n\n currFilename = newFilename;\n }\n\n inputHelperRef.current.textContent = filename;\n setTruncatedFilename(currFilename);\n });\n\n const handleClick = () => {\n if (!inputRef.current) {\n return;\n }\n\n inputRef.current.click();\n };\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n if (!e.target.files) {\n return;\n }\n\n if (onChange) {\n onChange(e);\n }\n\n setFilename(e.target.files[0].name);\n };\n\n const handleClear = () => {\n if (!inputRef.current) {\n return;\n }\n\n if (onClear) {\n onClear();\n }\n\n inputRef.current.value = '';\n setFilename('');\n setTruncatedFilename('');\n };\n\n return (\n <Root\n className={cx(horizontalClass, verticalClass, autoClass, className)}\n style={style}\n size={size}\n view={view}\n ref={ref}\n >\n <StyledHiddenInput\n ref={inputRef}\n accept={accept}\n type=\"file\"\n id={id}\n name={name}\n onChange={handleChange}\n />\n <StyledHiddenInputHelper ref={inputHelperRef}>{filename}</StyledHiddenInputHelper>\n\n <AttachButton\n buttonType={buttonType}\n view={view}\n size={size}\n onClick={handleClick}\n isLoading={isLoading}\n disabled={disabled}\n ref={buttonRef}\n {...rest}\n />\n {hasAttachment && (\n <StyledCell\n stretching=\"fixed\"\n className={cellHiddenClass}\n ref={cellRef}\n size={size}\n title={truncatedFilename}\n contentLeft={cellContentLeft}\n contentRight={\n <StyledIconButtonCancel view={view} size={size} onClick={handleClear}>\n <IconCloseCircleOutline size=\"xs\" color=\"inherit\" />\n </StyledIconButtonCancel>\n }\n />\n )}\n </Root>\n );\n });\n\nexport const attachConfig = {\n name: 'Attach',\n tag: 'div',\n layout: attachRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["attachRoot","Root","forwardRef","props","outerRef","_props$flow","flow","_props$buttonType","buttonType","_props$hasAttachment","hasAttachment","acceptedFileFormats","size","view","className","style","isLoading","disabled","id","name","onChange","onClear","rest","_objectWithoutProperties","_excluded","innerRef","useRef","ref","useForkRef","inputRef","inputHelperRef","cellRef","buttonRef","emptyTextCellWidth","_useState","useState","_useState2","_slicedToArray","filename","setFilename","_useState3","_useState4","truncatedFilename","setTruncatedFilename","horizontalClass","classes","horizontal","undefined","verticalClass","vertical","autoClass","auto","cellHiddenClass","length","cellHidden","accept","join","extension","extractExtension","cellContentLeft","getFileicon","useEffect","_cellRef$current","current","offsetWidth","useIsomorphicLayoutEffect","parentElement","textContent","textWidth","buttonWidth","_cellRef$current$pare","getBoundingClientRect","parentWidth","width","parentLeft","left","_cellRef$current$getB","cellLeft","leftDiff","currentTextWidth","currFilename","addSeparator","separator","i","indexOf","slice","right","newFilename","concat","handleClick","click","handleChange","e","target","files","handleClear","value","React","createElement","cx","StyledHiddenInput","type","StyledHiddenInputHelper","AttachButton","_extends","onClick","StyledCell","stretching","title","contentLeft","contentRight","StyledIconButtonCancel","_IconCloseCircleOutli","IconCloseCircleOutline","color","attachConfig","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;IAkBaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,gBAAU,CAA8B,UAACC,KAAK,EAAEC,QAAQ,EAAK;AACzD,IAAA,IAAAC,WAAA,GAgBIF,KAAK,CAfLG,IAAI;AAAJA,MAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,WAAA;MAAAE,iBAAA,GAebJ,KAAK,CAdLK,UAAU;AAAVA,MAAAA,UAAU,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,Q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EAAE,QAAQ;AACdiG,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAErH,UAAU;AAClBsH,EAAAA,IAAI,EAAJA,kBAAI;AACJC,EAAAA,UAAU,EAAE;AACR1G,IAAAA,IAAI,EAAE;AACF2G,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD7G,IAAAA,IAAI,EAAE;AACF4G,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN9G,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
|
@@ -6,7 +6,6 @@ var _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabel
|
|
6
6
|
var React = require('react');
|
7
7
|
var IconButton_styles = require('../../ui/IconButton/IconButton.styles.js');
|
8
8
|
var Button_styles = require('../../ui/Button/Button.styles.js');
|
9
|
-
require('@linaria/react');
|
10
9
|
var IconPlus = require('../../../_Icon/Icons/IconPlus.js');
|
11
10
|
|
12
11
|
var _excluded = ["size", "icon"],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AttachButton.js","sources":["../../../../../src/components/Attach/components/AttachButton/AttachButton.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { AttachButtonProps } from '../../Attach.types';\nimport { StyledIconButton } from '../../ui/IconButton/IconButton';\nimport { StyledButton } from '../../ui/Button/Button';\nimport { IconPlus } from '../../../_Icon';\n\nconst getDefaultIcon = (size?: string) => {\n let iconSize: 'xs' | 's' | 'm';\n switch (size) {\n case 'xs':\n iconSize = 'xs';\n break;\n case 's':\n iconSize = 's';\n break;\n default:\n iconSize = 'm';\n }\n return <IconPlus size={iconSize} color=\"inherit\" />;\n};\n\nexport const AttachButton = forwardRef<HTMLButtonElement, AttachButtonProps>((props, ref) => {\n if (props.buttonType === 'iconButton') {\n const { size, icon, ...rest } = props;\n\n return (\n <StyledIconButton ref={ref} {...rest}>\n {icon || getDefaultIcon(size)}\n </StyledIconButton>\n );\n }\n\n const { text = 'Загрузить файл', ...rest } = props;\n return <StyledButton ref={ref} text={text} {...rest} />;\n});\n"],"names":["getDefaultIcon","size","iconSize","React","createElement","IconPlus","color","AttachButton","forwardRef","props","ref","buttonType","icon","rest","_objectWithoutProperties","_excluded","StyledIconButton","_extends","_props$text","text","_excluded2","StyledButton"],"mappings":"
|
1
|
+
{"version":3,"file":"AttachButton.js","sources":["../../../../../src/components/Attach/components/AttachButton/AttachButton.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { AttachButtonProps } from '../../Attach.types';\nimport { StyledIconButton } from '../../ui/IconButton/IconButton';\nimport { StyledButton } from '../../ui/Button/Button';\nimport { IconPlus } from '../../../_Icon';\n\nconst getDefaultIcon = (size?: string) => {\n let iconSize: 'xs' | 's' | 'm';\n switch (size) {\n case 'xs':\n iconSize = 'xs';\n break;\n case 's':\n iconSize = 's';\n break;\n default:\n iconSize = 'm';\n }\n return <IconPlus size={iconSize} color=\"inherit\" />;\n};\n\nexport const AttachButton = forwardRef<HTMLButtonElement, AttachButtonProps>((props, ref) => {\n if (props.buttonType === 'iconButton') {\n const { size, icon, ...rest } = props;\n\n return (\n <StyledIconButton ref={ref} {...rest}>\n {icon || getDefaultIcon(size)}\n </StyledIconButton>\n );\n }\n\n const { text = 'Загрузить файл', ...rest } = props;\n return <StyledButton ref={ref} text={text} {...rest} />;\n});\n"],"names":["getDefaultIcon","size","iconSize","React","createElement","IconPlus","color","AttachButton","forwardRef","props","ref","buttonType","icon","rest","_objectWithoutProperties","_excluded","StyledIconButton","_extends","_props$text","text","_excluded2","StyledButton"],"mappings":";;;;;;;;;;;;AAOA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,IAAa,EAAK;AACtC,EAAA,IAAIC,QAA0B,CAAA;AAC9B,EAAA,QAAQD,IAAI;AACR,IAAA,KAAK,IAAI;AACLC,MAAAA,QAAQ,GAAG,IAAI,CAAA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|
@@ -4,7 +4,6 @@ import './Button.styles_bj69th.css';
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
5
5
|
|
6
6
|
var react = require('@linaria/react');
|
7
|
-
require('@linaria/core');
|
8
7
|
var common = require('../../../../engines/common.js');
|
9
8
|
var Button$1 = require('../../../Button/Button.js');
|
10
9
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Button.styles.js","sources":["../../../../../src/components/Attach/ui/Button/Button.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component, mergeConfig } from '../../../../engines';\nimport { buttonConfig, buttonTokens } from '../../../Button';\nimport { tokens as attachTokens } from '../../Attach.tokens';\n\nconst mergedConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedConfig);\n\nexport const StyledButton = styled(Button)`\n ${buttonTokens.buttonColor}: var(${attachTokens.buttonColor});\n ${buttonTokens.buttonValueColor}: var(${attachTokens.buttonValueColor});\n ${buttonTokens.buttonBackgroundColor}: var(${attachTokens.buttonBackgroundColor});\n ${buttonTokens.buttonColorHover}: var(${attachTokens.buttonColorHover});\n ${buttonTokens.buttonBackgroundColorHover}: var(${attachTokens.buttonBackgroundColorHover});\n ${buttonTokens.buttonColorActive}: var(${attachTokens.buttonColorActive});\n ${buttonTokens.buttonBackgroundColorActive}: var(${attachTokens.buttonBackgroundColorActive});\n ${buttonTokens.buttonLoadingBackgroundColor}: var(${attachTokens.buttonLoadingBackgroundColor});\n\n ${buttonTokens.buttonScaleHover}: var(${attachTokens.buttonScaleHover});\n ${buttonTokens.buttonScaleActive}: var(${attachTokens.buttonScaleActive});\n ${buttonTokens.buttonHeight}: var(${attachTokens.buttonHeight});\n ${buttonTokens.buttonWidth}: var(${attachTokens.buttonWidth});\n ${buttonTokens.buttonPadding}: var(${attachTokens.buttonPadding});\n ${buttonTokens.buttonRadius}: var(${attachTokens.buttonRadius});\n ${buttonTokens.buttonRadiusCircle}: var(${attachTokens.buttonRadiusCircle});\n\n ${buttonTokens.buttonFontFamily}: var(${attachTokens.buttonFontFamily});\n ${buttonTokens.buttonFontSize}: var(${attachTokens.buttonFontSize});\n ${buttonTokens.buttonFontStyle}: var(${attachTokens.buttonFontStyle});\n ${buttonTokens.buttonFontWeight}: var(${attachTokens.buttonFontWeight});\n ${buttonTokens.buttonLetterSpacing}: var(${attachTokens.buttonLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${attachTokens.buttonLineHeight});\n\n ${buttonTokens.buttonLeftContentMargin}: var(${attachTokens.buttonLeftContentMargin});\n ${buttonTokens.buttonLeftContentAlignSelf}: var(${attachTokens.buttonLeftContentAlignSelf});\n ${buttonTokens.buttonRightContentMargin}: var(${attachTokens.buttonRightContentMargin});\n ${buttonTokens.buttonRightContentAlignSelf}: var(${attachTokens.buttonRightContentAlignSelf});\n ${buttonTokens.buttonValueMargin}: var(${attachTokens.buttonValueMargin});\n\n ${buttonTokens.buttonDisabledOpacity}: var(${attachTokens.buttonDisabledOpacity});\n ${buttonTokens.buttonFocusColor}: var(${attachTokens.buttonFocusColor});\n\n ${buttonTokens.buttonSpinnerColor}: var(${attachTokens.buttonSpinnerColor});\n ${buttonTokens.buttonSpinnerSize}: var(${attachTokens.buttonSpinnerSize});\n`;\n"],"names":["mergedConfig","mergeConfig","buttonConfig","Button","component","_exp","StyledButton","styled","name","class","propsAsIs"],"mappings":"
|
1
|
+
{"version":3,"file":"Button.styles.js","sources":["../../../../../src/components/Attach/ui/Button/Button.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component, mergeConfig } from '../../../../engines';\nimport { buttonConfig, buttonTokens } from '../../../Button';\nimport { tokens as attachTokens } from '../../Attach.tokens';\n\nconst mergedConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedConfig);\n\nexport const StyledButton = styled(Button)`\n ${buttonTokens.buttonColor}: var(${attachTokens.buttonColor});\n ${buttonTokens.buttonValueColor}: var(${attachTokens.buttonValueColor});\n ${buttonTokens.buttonBackgroundColor}: var(${attachTokens.buttonBackgroundColor});\n ${buttonTokens.buttonColorHover}: var(${attachTokens.buttonColorHover});\n ${buttonTokens.buttonBackgroundColorHover}: var(${attachTokens.buttonBackgroundColorHover});\n ${buttonTokens.buttonColorActive}: var(${attachTokens.buttonColorActive});\n ${buttonTokens.buttonBackgroundColorActive}: var(${attachTokens.buttonBackgroundColorActive});\n ${buttonTokens.buttonLoadingBackgroundColor}: var(${attachTokens.buttonLoadingBackgroundColor});\n\n ${buttonTokens.buttonScaleHover}: var(${attachTokens.buttonScaleHover});\n ${buttonTokens.buttonScaleActive}: var(${attachTokens.buttonScaleActive});\n ${buttonTokens.buttonHeight}: var(${attachTokens.buttonHeight});\n ${buttonTokens.buttonWidth}: var(${attachTokens.buttonWidth});\n ${buttonTokens.buttonPadding}: var(${attachTokens.buttonPadding});\n ${buttonTokens.buttonRadius}: var(${attachTokens.buttonRadius});\n ${buttonTokens.buttonRadiusCircle}: var(${attachTokens.buttonRadiusCircle});\n\n ${buttonTokens.buttonFontFamily}: var(${attachTokens.buttonFontFamily});\n ${buttonTokens.buttonFontSize}: var(${attachTokens.buttonFontSize});\n ${buttonTokens.buttonFontStyle}: var(${attachTokens.buttonFontStyle});\n ${buttonTokens.buttonFontWeight}: var(${attachTokens.buttonFontWeight});\n ${buttonTokens.buttonLetterSpacing}: var(${attachTokens.buttonLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${attachTokens.buttonLineHeight});\n\n ${buttonTokens.buttonLeftContentMargin}: var(${attachTokens.buttonLeftContentMargin});\n ${buttonTokens.buttonLeftContentAlignSelf}: var(${attachTokens.buttonLeftContentAlignSelf});\n ${buttonTokens.buttonRightContentMargin}: var(${attachTokens.buttonRightContentMargin});\n ${buttonTokens.buttonRightContentAlignSelf}: var(${attachTokens.buttonRightContentAlignSelf});\n ${buttonTokens.buttonValueMargin}: var(${attachTokens.buttonValueMargin});\n\n ${buttonTokens.buttonDisabledOpacity}: var(${attachTokens.buttonDisabledOpacity});\n ${buttonTokens.buttonFocusColor}: var(${attachTokens.buttonFocusColor});\n\n ${buttonTokens.buttonSpinnerColor}: var(${attachTokens.buttonSpinnerColor});\n ${buttonTokens.buttonSpinnerSize}: var(${attachTokens.buttonSpinnerSize});\n`;\n"],"names":["mergedConfig","mergeConfig","buttonConfig","Button","component","_exp","StyledButton","styled","name","class","propsAsIs"],"mappings":";;;;;;;;AAMA,IAAMA,YAAY,gBAAGC,kBAAW,CAACC,qBAAY,CAAC,CAAA;AAC9C,IAAMC,MAAM,gBAAGC,gBAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANrBA,SAMqBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,MAAM,CAAA;AAAA,CAAA,CAAA;AAAlC,IAAMG,YAAY,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAoCjC;;;;"}
|
@@ -4,9 +4,7 @@ import './Cell.styles_69w962.css';
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
5
5
|
|
6
6
|
var react = require('@linaria/react');
|
7
|
-
require('@linaria/core');
|
8
7
|
var common = require('../../../../engines/common.js');
|
9
|
-
require('react');
|
10
8
|
var Cell$1 = require('../../../Cell/Cell.js');
|
11
9
|
|
12
10
|
var mergedConfig = /*#__PURE__*/common.mergeConfig(Cell$1.cellConfig);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Cell.styles.js","sources":["../../../../../src/components/Attach/ui/Cell/Cell.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component, mergeConfig } from '../../../../engines';\nimport { cellConfig, cellTokens } from '../../../Cell';\nimport { tokens as attachTokens, classes } from '../../Attach.tokens';\n\nconst mergedConfig = mergeConfig(cellConfig);\nconst Cell = component(mergedConfig);\n\nexport const StyledCell = styled(Cell)`\n ${cellTokens.cellLabelColor}: var(${attachTokens.cellLabelColor});\n ${cellTokens.cellTitleColor}: var(${attachTokens.cellTitleColor});\n ${cellTokens.cellSubtitleColor}: var(${attachTokens.cellSubtitleColor});\n ${cellTokens.cellBackgroundColor}: var(${attachTokens.cellBackgroundColor});\n\n ${cellTokens.cellWidth}: var(${attachTokens.cellWidth});\n ${cellTokens.cellPadding}: var(${attachTokens.cellPadding});\n ${cellTokens.cellPaddingLeftContent}: var(${attachTokens.cellPaddingLeftContent});\n ${cellTokens.cellPaddingContent}: var(${attachTokens.cellPaddingContent});\n ${cellTokens.cellPaddingRightContent}: var(${attachTokens.cellPaddingRightContent});\n\n ${cellTokens.cellTextboxGap}: var(${attachTokens.cellTextboxGap});\n ${cellTokens.cellGap}: var(${attachTokens.cellGap});\n\n ${cellTokens.cellLabelFontFamily}: var(${attachTokens.cellLabelFontFamily});\n ${cellTokens.cellLabelFontSize}: var(${attachTokens.cellLabelFontSize});\n ${cellTokens.cellLabelFontStyle}: var(${attachTokens.cellLabelFontStyle});\n ${cellTokens.cellLabelFontWeight}: var(${attachTokens.cellLabelFontWeight});\n ${cellTokens.cellLabelLetterSpacing}: var(${attachTokens.cellLabelLetterSpacing});\n ${cellTokens.cellLabelLineHeight}: var(${attachTokens.cellLabelLineHeight});\n\n ${cellTokens.cellTitleFontFamily}: var(${attachTokens.cellTitleFontFamily});\n ${cellTokens.cellTitleFontSize}: var(${attachTokens.cellTitleFontSize});\n ${cellTokens.cellTitleFontStyle}: var(${attachTokens.cellTitleFontStyle});\n ${cellTokens.cellTitleFontWeight}: var(${attachTokens.cellTitleFontWeight});\n ${cellTokens.cellTitleLetterSpacing}: var(${attachTokens.cellTitleLetterSpacing});\n ${cellTokens.cellTitleLineHeight}: var(${attachTokens.cellTitleLineHeight});\n\n ${cellTokens.cellSubtitleFontFamily}: var(${attachTokens.cellSubtitleFontFamily});\n ${cellTokens.cellSubtitleFontSize}: var(${attachTokens.cellSubtitleFontSize});\n ${cellTokens.cellSubtitleFontStyle}: var(${attachTokens.cellSubtitleFontStyle});\n ${cellTokens.cellSubtitleFontWeight}: var(${attachTokens.cellSubtitleFontWeight});\n ${cellTokens.cellSubtitleLetterSpacing}: var(${attachTokens.cellSubtitleLetterSpacing});\n ${cellTokens.cellSubtitleLineHeight}: var(${attachTokens.cellSubtitleLineHeight});\n\n white-space: nowrap;\n\n &.${classes.cellHidden} {\n visibility: hidden;\n }\n`;\n"],"names":["mergedConfig","mergeConfig","cellConfig","Cell","component","_exp","StyledCell","styled","name","class","propsAsIs"],"mappings":"
|
1
|
+
{"version":3,"file":"Cell.styles.js","sources":["../../../../../src/components/Attach/ui/Cell/Cell.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component, mergeConfig } from '../../../../engines';\nimport { cellConfig, cellTokens } from '../../../Cell';\nimport { tokens as attachTokens, classes } from '../../Attach.tokens';\n\nconst mergedConfig = mergeConfig(cellConfig);\nconst Cell = component(mergedConfig);\n\nexport const StyledCell = styled(Cell)`\n ${cellTokens.cellLabelColor}: var(${attachTokens.cellLabelColor});\n ${cellTokens.cellTitleColor}: var(${attachTokens.cellTitleColor});\n ${cellTokens.cellSubtitleColor}: var(${attachTokens.cellSubtitleColor});\n ${cellTokens.cellBackgroundColor}: var(${attachTokens.cellBackgroundColor});\n\n ${cellTokens.cellWidth}: var(${attachTokens.cellWidth});\n ${cellTokens.cellPadding}: var(${attachTokens.cellPadding});\n ${cellTokens.cellPaddingLeftContent}: var(${attachTokens.cellPaddingLeftContent});\n ${cellTokens.cellPaddingContent}: var(${attachTokens.cellPaddingContent});\n ${cellTokens.cellPaddingRightContent}: var(${attachTokens.cellPaddingRightContent});\n\n ${cellTokens.cellTextboxGap}: var(${attachTokens.cellTextboxGap});\n ${cellTokens.cellGap}: var(${attachTokens.cellGap});\n\n ${cellTokens.cellLabelFontFamily}: var(${attachTokens.cellLabelFontFamily});\n ${cellTokens.cellLabelFontSize}: var(${attachTokens.cellLabelFontSize});\n ${cellTokens.cellLabelFontStyle}: var(${attachTokens.cellLabelFontStyle});\n ${cellTokens.cellLabelFontWeight}: var(${attachTokens.cellLabelFontWeight});\n ${cellTokens.cellLabelLetterSpacing}: var(${attachTokens.cellLabelLetterSpacing});\n ${cellTokens.cellLabelLineHeight}: var(${attachTokens.cellLabelLineHeight});\n\n ${cellTokens.cellTitleFontFamily}: var(${attachTokens.cellTitleFontFamily});\n ${cellTokens.cellTitleFontSize}: var(${attachTokens.cellTitleFontSize});\n ${cellTokens.cellTitleFontStyle}: var(${attachTokens.cellTitleFontStyle});\n ${cellTokens.cellTitleFontWeight}: var(${attachTokens.cellTitleFontWeight});\n ${cellTokens.cellTitleLetterSpacing}: var(${attachTokens.cellTitleLetterSpacing});\n ${cellTokens.cellTitleLineHeight}: var(${attachTokens.cellTitleLineHeight});\n\n ${cellTokens.cellSubtitleFontFamily}: var(${attachTokens.cellSubtitleFontFamily});\n ${cellTokens.cellSubtitleFontSize}: var(${attachTokens.cellSubtitleFontSize});\n ${cellTokens.cellSubtitleFontStyle}: var(${attachTokens.cellSubtitleFontStyle});\n ${cellTokens.cellSubtitleFontWeight}: var(${attachTokens.cellSubtitleFontWeight});\n ${cellTokens.cellSubtitleLetterSpacing}: var(${attachTokens.cellSubtitleLetterSpacing});\n ${cellTokens.cellSubtitleLineHeight}: var(${attachTokens.cellSubtitleLineHeight});\n\n white-space: nowrap;\n\n &.${classes.cellHidden} {\n visibility: hidden;\n }\n`;\n"],"names":["mergedConfig","mergeConfig","cellConfig","Cell","component","_exp","StyledCell","styled","name","class","propsAsIs"],"mappings":";;;;;;;;AAMA,IAAMA,YAAY,gBAAGC,kBAAW,CAACC,iBAAU,CAAC,CAAA;AAC5C,IAAMC,IAAI,gBAAGC,gBAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANnBA,SAMmBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,IAAI,CAAA;AAAA,CAAA,CAAA;AAA9B,IAAMG,UAAU,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAyC/B;;;;"}
|
@@ -4,7 +4,6 @@ import './IconButton.styles_1q2jfs2.css';
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
5
5
|
|
6
6
|
var react = require('@linaria/react');
|
7
|
-
require('@linaria/core');
|
8
7
|
var common = require('../../../../engines/common.js');
|
9
8
|
var IconButton$1 = require('../../../IconButton/IconButton.js');
|
10
9
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"IconButton.styles.js","sources":["../../../../../src/components/Attach/ui/IconButton/IconButton.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component, mergeConfig } from '../../../../engines';\nimport { iconButtonConfig, iconButtonTokens } from '../../../IconButton';\nimport { tokens as attachTokens } from '../../Attach.tokens';\n\nconst mergedConfig = mergeConfig(iconButtonConfig);\nconst IconButton = component(mergedConfig);\n\nexport const StyledIconButton = styled(IconButton)`\n ${iconButtonTokens.iconButtonColor}: var(${attachTokens.iconButtonColor});\n ${iconButtonTokens.iconButtonBackgroundColor}: var(${attachTokens.iconButtonBackgroundColor});\n ${iconButtonTokens.iconButtonLoadingBackgroundColor}: var(${attachTokens.iconButtonLoadingBackgroundColor});\n ${iconButtonTokens.iconButtonColorHover}: var(${attachTokens.iconButtonColorHover});\n ${iconButtonTokens.iconButtonBackgroundColorHover}: var(${attachTokens.iconButtonBackgroundColorHover});\n ${iconButtonTokens.iconButtonColorActive}: var(${attachTokens.iconButtonColorActive});\n ${iconButtonTokens.iconButtonBackgroundColorActive}: var(${attachTokens.iconButtonBackgroundColorActive});\n\n ${iconButtonTokens.iconButtonScaleHover}: var(${attachTokens.iconButtonScaleHover});\n ${iconButtonTokens.iconButtonScaleActive}: var(${attachTokens.iconButtonScaleActive});\n ${iconButtonTokens.iconButtonHeight}: var(${attachTokens.iconButtonHeight});\n ${iconButtonTokens.iconButtonWidth}: var(${attachTokens.iconButtonWidth});\n ${iconButtonTokens.iconButtonPadding}: var(${attachTokens.iconButtonPadding});\n ${iconButtonTokens.iconButtonRadius}: var(${attachTokens.iconButtonRadius});\n ${iconButtonTokens.iconButtonRadiusCircle}: var(${attachTokens.iconButtonRadiusCircle});\n\n ${iconButtonTokens.iconButtonFontFamily}: var(${attachTokens.iconButtonFontFamily});\n ${iconButtonTokens.iconButtonFontSize}: var(${attachTokens.iconButtonFontSize});\n ${iconButtonTokens.iconButtonFontStyle}: var(${attachTokens.iconButtonFontStyle});\n ${iconButtonTokens.iconButtonFontWeight}: var(${attachTokens.iconButtonFontWeight});\n ${iconButtonTokens.iconButtonLetterSpacing}: var(${attachTokens.iconButtonLetterSpacing});\n ${iconButtonTokens.iconButtonLineHeight}: var(${attachTokens.iconButtonLineHeight});\n\n ${iconButtonTokens.iconButtonDisabledOpacity}: var(${attachTokens.iconButtonDisabledOpacity});\n ${iconButtonTokens.iconButtonFocusColor}: var(${attachTokens.iconButtonFocusColor});\n ${iconButtonTokens.iconButtonSpinnerColor}: var(${attachTokens.iconButtonSpinnerColor});\n ${iconButtonTokens.iconButtonSpinnerSize}: var(${attachTokens.iconButtonSpinnerSize});\n\n flex-shrink: 0;\n`;\n\nexport const StyledIconButtonCancel = styled(IconButton)`\n ${iconButtonTokens.iconButtonColor}: var(${attachTokens.iconButtonCancelColor});\n ${iconButtonTokens.iconButtonBackgroundColor}: var(${attachTokens.iconButtonCancelBackgroundColor});\n ${iconButtonTokens.iconButtonLoadingBackgroundColor}: var(${attachTokens.iconButtonCancelLoadingBackgroundColor});\n ${iconButtonTokens.iconButtonColorHover}: var(${attachTokens.iconButtonCancelColorHover});\n ${iconButtonTokens.iconButtonBackgroundColorHover}: var(${attachTokens.iconButtonCancelBackgroundColorHover});\n ${iconButtonTokens.iconButtonColorActive}: var(${attachTokens.iconButtonCancelColorActive});\n ${iconButtonTokens.iconButtonBackgroundColorActive}: var(${attachTokens.iconButtonCancelBackgroundColorActive});\n\n ${iconButtonTokens.iconButtonScaleHover}: var(${attachTokens.iconButtonCancelScaleHover});\n ${iconButtonTokens.iconButtonScaleActive}: var(${attachTokens.iconButtonCancelScaleActive});\n ${iconButtonTokens.iconButtonHeight}: var(${attachTokens.iconButtonCancelHeight});\n ${iconButtonTokens.iconButtonWidth}: var(${attachTokens.iconButtonCancelWidth});\n ${iconButtonTokens.iconButtonPadding}: var(${attachTokens.iconButtonCancelPadding});\n ${iconButtonTokens.iconButtonRadius}: var(${attachTokens.iconButtonCancelRadius});\n ${iconButtonTokens.iconButtonRadiusCircle}: var(${attachTokens.iconButtonCancelRadiusCircle});\n\n ${iconButtonTokens.iconButtonFontFamily}: var(${attachTokens.iconButtonCancelFontFamily});\n ${iconButtonTokens.iconButtonFontSize}: var(${attachTokens.iconButtonCancelFontSize});\n ${iconButtonTokens.iconButtonFontStyle}: var(${attachTokens.iconButtonCancelFontStyle});\n ${iconButtonTokens.iconButtonFontWeight}: var(${attachTokens.iconButtonCancelFontWeight});\n ${iconButtonTokens.iconButtonLetterSpacing}: var(${attachTokens.iconButtonCancelLetterSpacing});\n ${iconButtonTokens.iconButtonLineHeight}: var(${attachTokens.iconButtonCancelLineHeight});\n\n ${iconButtonTokens.iconButtonDisabledOpacity}: var(${attachTokens.iconButtonCancelDisabledOpacity});\n ${iconButtonTokens.iconButtonFocusColor}: var(${attachTokens.iconButtonCancelFocusColor});\n ${iconButtonTokens.iconButtonSpinnerColor}: var(${attachTokens.iconButtonCancelSpinnerColor});\n ${iconButtonTokens.iconButtonSpinnerSize}: var(${attachTokens.iconButtonCancelSpinnerSize});\n`;\n"],"names":["mergedConfig","mergeConfig","iconButtonConfig","IconButton","component","_exp","StyledIconButton","styled","name","class","propsAsIs","_exp50","StyledIconButtonCancel"],"mappings":"
|
1
|
+
{"version":3,"file":"IconButton.styles.js","sources":["../../../../../src/components/Attach/ui/IconButton/IconButton.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component, mergeConfig } from '../../../../engines';\nimport { iconButtonConfig, iconButtonTokens } from '../../../IconButton';\nimport { tokens as attachTokens } from '../../Attach.tokens';\n\nconst mergedConfig = mergeConfig(iconButtonConfig);\nconst IconButton = component(mergedConfig);\n\nexport const StyledIconButton = styled(IconButton)`\n ${iconButtonTokens.iconButtonColor}: var(${attachTokens.iconButtonColor});\n ${iconButtonTokens.iconButtonBackgroundColor}: var(${attachTokens.iconButtonBackgroundColor});\n ${iconButtonTokens.iconButtonLoadingBackgroundColor}: var(${attachTokens.iconButtonLoadingBackgroundColor});\n ${iconButtonTokens.iconButtonColorHover}: var(${attachTokens.iconButtonColorHover});\n ${iconButtonTokens.iconButtonBackgroundColorHover}: var(${attachTokens.iconButtonBackgroundColorHover});\n ${iconButtonTokens.iconButtonColorActive}: var(${attachTokens.iconButtonColorActive});\n ${iconButtonTokens.iconButtonBackgroundColorActive}: var(${attachTokens.iconButtonBackgroundColorActive});\n\n ${iconButtonTokens.iconButtonScaleHover}: var(${attachTokens.iconButtonScaleHover});\n ${iconButtonTokens.iconButtonScaleActive}: var(${attachTokens.iconButtonScaleActive});\n ${iconButtonTokens.iconButtonHeight}: var(${attachTokens.iconButtonHeight});\n ${iconButtonTokens.iconButtonWidth}: var(${attachTokens.iconButtonWidth});\n ${iconButtonTokens.iconButtonPadding}: var(${attachTokens.iconButtonPadding});\n ${iconButtonTokens.iconButtonRadius}: var(${attachTokens.iconButtonRadius});\n ${iconButtonTokens.iconButtonRadiusCircle}: var(${attachTokens.iconButtonRadiusCircle});\n\n ${iconButtonTokens.iconButtonFontFamily}: var(${attachTokens.iconButtonFontFamily});\n ${iconButtonTokens.iconButtonFontSize}: var(${attachTokens.iconButtonFontSize});\n ${iconButtonTokens.iconButtonFontStyle}: var(${attachTokens.iconButtonFontStyle});\n ${iconButtonTokens.iconButtonFontWeight}: var(${attachTokens.iconButtonFontWeight});\n ${iconButtonTokens.iconButtonLetterSpacing}: var(${attachTokens.iconButtonLetterSpacing});\n ${iconButtonTokens.iconButtonLineHeight}: var(${attachTokens.iconButtonLineHeight});\n\n ${iconButtonTokens.iconButtonDisabledOpacity}: var(${attachTokens.iconButtonDisabledOpacity});\n ${iconButtonTokens.iconButtonFocusColor}: var(${attachTokens.iconButtonFocusColor});\n ${iconButtonTokens.iconButtonSpinnerColor}: var(${attachTokens.iconButtonSpinnerColor});\n ${iconButtonTokens.iconButtonSpinnerSize}: var(${attachTokens.iconButtonSpinnerSize});\n\n flex-shrink: 0;\n`;\n\nexport const StyledIconButtonCancel = styled(IconButton)`\n ${iconButtonTokens.iconButtonColor}: var(${attachTokens.iconButtonCancelColor});\n ${iconButtonTokens.iconButtonBackgroundColor}: var(${attachTokens.iconButtonCancelBackgroundColor});\n ${iconButtonTokens.iconButtonLoadingBackgroundColor}: var(${attachTokens.iconButtonCancelLoadingBackgroundColor});\n ${iconButtonTokens.iconButtonColorHover}: var(${attachTokens.iconButtonCancelColorHover});\n ${iconButtonTokens.iconButtonBackgroundColorHover}: var(${attachTokens.iconButtonCancelBackgroundColorHover});\n ${iconButtonTokens.iconButtonColorActive}: var(${attachTokens.iconButtonCancelColorActive});\n ${iconButtonTokens.iconButtonBackgroundColorActive}: var(${attachTokens.iconButtonCancelBackgroundColorActive});\n\n ${iconButtonTokens.iconButtonScaleHover}: var(${attachTokens.iconButtonCancelScaleHover});\n ${iconButtonTokens.iconButtonScaleActive}: var(${attachTokens.iconButtonCancelScaleActive});\n ${iconButtonTokens.iconButtonHeight}: var(${attachTokens.iconButtonCancelHeight});\n ${iconButtonTokens.iconButtonWidth}: var(${attachTokens.iconButtonCancelWidth});\n ${iconButtonTokens.iconButtonPadding}: var(${attachTokens.iconButtonCancelPadding});\n ${iconButtonTokens.iconButtonRadius}: var(${attachTokens.iconButtonCancelRadius});\n ${iconButtonTokens.iconButtonRadiusCircle}: var(${attachTokens.iconButtonCancelRadiusCircle});\n\n ${iconButtonTokens.iconButtonFontFamily}: var(${attachTokens.iconButtonCancelFontFamily});\n ${iconButtonTokens.iconButtonFontSize}: var(${attachTokens.iconButtonCancelFontSize});\n ${iconButtonTokens.iconButtonFontStyle}: var(${attachTokens.iconButtonCancelFontStyle});\n ${iconButtonTokens.iconButtonFontWeight}: var(${attachTokens.iconButtonCancelFontWeight});\n ${iconButtonTokens.iconButtonLetterSpacing}: var(${attachTokens.iconButtonCancelLetterSpacing});\n ${iconButtonTokens.iconButtonLineHeight}: var(${attachTokens.iconButtonCancelLineHeight});\n\n ${iconButtonTokens.iconButtonDisabledOpacity}: var(${attachTokens.iconButtonCancelDisabledOpacity});\n ${iconButtonTokens.iconButtonFocusColor}: var(${attachTokens.iconButtonCancelFocusColor});\n ${iconButtonTokens.iconButtonSpinnerColor}: var(${attachTokens.iconButtonCancelSpinnerColor});\n ${iconButtonTokens.iconButtonSpinnerSize}: var(${attachTokens.iconButtonCancelSpinnerSize});\n`;\n"],"names":["mergedConfig","mergeConfig","iconButtonConfig","IconButton","component","_exp","StyledIconButton","styled","name","class","propsAsIs","_exp50","StyledIconButtonCancel"],"mappings":";;;;;;;;AAMA,IAAMA,YAAY,gBAAGC,kBAAW,CAACC,6BAAgB,CAAC,CAAA;AAClD,IAAMC,UAAU,gBAAGC,gBAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANzBA,SAMyBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,UAAU,CAAA;AAAA,CAAA,CAAA;AAA1C,IAAMG,gBAAgB,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CA8BrC,EAAA;AAAC,IAAAC,MAAA,GAtCgBA,SAsChBA,MAAAA,GAAA;AAAA,EAAA,OAE2CR,UAAU,CAAA;AAAA,CAAA,CAAA;AAAhD,IAAMS,sBAAsB,gBAAGL,YAAM,CAAAI,MAAA,EAAA,CAAA,CAAA;AAAAH,EAAAA,IAAA,EAAA,wBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CA4B3C;;;;;"}
|
@@ -3,13 +3,12 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var React = require('react');
|
6
|
-
require('@linaria/react');
|
7
|
-
var IconBlankCsvOutline = require('../../_Icon/Icons/IconBlankCsvOutline.js');
|
8
|
-
var IconBlankDocOutline = require('../../_Icon/Icons/IconBlankDocOutline.js');
|
9
6
|
var IconBlankOutline = require('../../_Icon/Icons/IconBlankOutline.js');
|
10
|
-
var
|
7
|
+
var IconBlankCsvOutline = require('../../_Icon/Icons/IconBlankCsvOutline.js');
|
11
8
|
var IconBlankTxtOutline = require('../../_Icon/Icons/IconBlankTxtOutline.js');
|
12
9
|
var IconBlankXlsOutline = require('../../_Icon/Icons/IconBlankXlsOutline.js');
|
10
|
+
var IconBlankDocOutline = require('../../_Icon/Icons/IconBlankDocOutline.js');
|
11
|
+
var IconBlankPdfOutline = require('../../_Icon/Icons/IconBlankPdfOutline.js');
|
13
12
|
|
14
13
|
var getFileicon = function getFileicon(extension, size) {
|
15
14
|
var iconSize = size === 'xs' ? 'xs' : 's';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getFileicon.js","sources":["../../../../src/components/Attach/utils/getFileicon.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n IconBlankCsvOutline,\n IconBlankDocOutline,\n IconBlankOutline,\n IconBlankPdfOutline,\n IconBlankTxtOutline,\n IconBlankXlsOutline,\n} from '../../_Icon';\n\nexport const getFileicon = (extension?: string, size?: string) => {\n const iconSize = size === 'xs' ? 'xs' : 's';\n\n switch (extension) {\n case 'pdf':\n return <IconBlankPdfOutline size={iconSize} color=\"inherit\" />;\n case 'doc':\n return <IconBlankDocOutline size={iconSize} color=\"inherit\" />;\n case 'xls':\n return <IconBlankXlsOutline size={iconSize} color=\"inherit\" />;\n case 'txt':\n return <IconBlankTxtOutline size={iconSize} color=\"inherit\" />;\n case 'csv':\n return <IconBlankCsvOutline size={iconSize} color=\"inherit\" />;\n default:\n return <IconBlankOutline size={iconSize} color=\"inherit\" />;\n }\n};\n"],"names":["getFileicon","extension","size","iconSize","React","createElement","IconBlankPdfOutline","color","IconBlankDocOutline","IconBlankXlsOutline","IconBlankTxtOutline","IconBlankCsvOutline","IconBlankOutline"],"mappings":"
|
1
|
+
{"version":3,"file":"getFileicon.js","sources":["../../../../src/components/Attach/utils/getFileicon.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n IconBlankCsvOutline,\n IconBlankDocOutline,\n IconBlankOutline,\n IconBlankPdfOutline,\n IconBlankTxtOutline,\n IconBlankXlsOutline,\n} from '../../_Icon';\n\nexport const getFileicon = (extension?: string, size?: string) => {\n const iconSize = size === 'xs' ? 'xs' : 's';\n\n switch (extension) {\n case 'pdf':\n return <IconBlankPdfOutline size={iconSize} color=\"inherit\" />;\n case 'doc':\n return <IconBlankDocOutline size={iconSize} color=\"inherit\" />;\n case 'xls':\n return <IconBlankXlsOutline size={iconSize} color=\"inherit\" />;\n case 'txt':\n return <IconBlankTxtOutline size={iconSize} color=\"inherit\" />;\n case 'csv':\n return <IconBlankCsvOutline size={iconSize} color=\"inherit\" />;\n default:\n return <IconBlankOutline size={iconSize} color=\"inherit\" />;\n }\n};\n"],"names":["getFileicon","extension","size","iconSize","React","createElement","IconBlankPdfOutline","color","IconBlankDocOutline","IconBlankXlsOutline","IconBlankTxtOutline","IconBlankCsvOutline","IconBlankOutline"],"mappings":";;;;;;;;;;;;AAWO,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,SAAkB,EAAEC,IAAa,EAAK;EAC9D,IAAMC,QAAQ,GAAGD,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,GAAG,CAAA;AAE3C,EAAA,QAAQD,SAAS;AACb,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOG,KAAA,CAAAC,aAAA,CAACC,uCAAmB,EAAA;AAACJ,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACG,uCAAmB,EAAA;AAACN,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACI,uCAAmB,EAAA;AAACP,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACK,uCAAmB,EAAA;AAACR,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACM,uCAAmB,EAAA;AAACT,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA;AACI,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACO,iCAAgB,EAAA;AAACV,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AACnE,GAAA;AACJ;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/Attach/utils/index.ts"],"sourcesContent":["export { extractExtension } from './extractExtension';\nexport { getFileicon } from './getFileicon';\nexport { addSeparator } from './addSeparator';\n\nexport const separator = '...';\n"],"names":["separator"],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Attach/utils/index.ts"],"sourcesContent":["export { extractExtension } from './extractExtension';\nexport { getFileicon } from './getFileicon';\nexport { addSeparator } from './addSeparator';\n\nexport const separator = '...';\n"],"names":["separator"],"mappings":";;;;AAIO,IAAMA,SAAS,GAAG;;;;"}
|
@@ -5,15 +5,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
6
6
|
var React = require('react');
|
7
7
|
var plasmaCore = require('@salutejs/plasma-core');
|
8
|
-
var useDidMountEffect = require('../../hooks/useDidMountEffect.js');
|
9
|
-
var useOutsideClick = require('../../hooks/useOutsideClick.js');
|
10
|
-
require('../../utils/react.js');
|
11
|
-
var getPopoverPlacement = require('../../utils/getPopoverPlacement.js');
|
12
8
|
var focusedReducer = require('./reducers/focusedReducer.js');
|
13
|
-
var TextField_styles = require('./ui/TextField/TextField.styles.js');
|
14
|
-
var SuggestionItem = require('./ui/SuggestionItem/SuggestionItem.js');
|
15
9
|
var Autocomplete_styles = require('./Autocomplete.styles.js');
|
16
10
|
var useKeyboardNavigation = require('./hooks/useKeyboardNavigation.js');
|
11
|
+
var useOutsideClick = require('../../hooks/useOutsideClick.js');
|
12
|
+
var useDidMountEffect = require('../../hooks/useDidMountEffect.js');
|
13
|
+
var TextField_styles = require('./ui/TextField/TextField.styles.js');
|
14
|
+
var SuggestionItem = require('./ui/SuggestionItem/SuggestionItem.js');
|
15
|
+
var getPopoverPlacement = require('../../utils/getPopoverPlacement.js');
|
17
16
|
|
18
17
|
var _excluded = ["value", "onChange", "suggestions", "view", "size", "labelPlacement", "disabled", "readOnly", "label", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "onScroll", "listMaxHeight", "listWidth", "portal", "filter", "onSuggestionSelect", "threshold", "renderList", "renderListEnd", "onSearch", "hintText"];
|
19
18
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Autocomplete.js","sources":["../../../src/components/Autocomplete/Autocomplete.tsx"],"sourcesContent":["import React, { forwardRef, useState, useReducer } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { useDidMountEffect, useOutsideClick } from '../../hooks';\nimport { RootProps } from '../../engines';\nimport { getPlacements } from '../../utils';\n\nimport { focusedReducer } from './reducers/focusedReducer';\nimport { SuggestionItem, StyledTextField } from './ui';\nimport { StyledPopover, Ul, LeftHelper, base, InfiniteLoaderWrapper } from './Autocomplete.styles';\nimport type { AutocompleteProps, SuggestionItemType } from './Autocomplete.types';\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\n\n/**\n * Компонент Autocomplete. Поле ввода с подсказками в выпадающем списке.\n */\nexport const autocompleteRoot = (Root: RootProps<HTMLInputElement, AutocompleteProps>) =>\n forwardRef<HTMLInputElement, AutocompleteProps>(\n (\n {\n value: outerValue,\n onChange,\n suggestions,\n view,\n size,\n labelPlacement,\n disabled,\n readOnly,\n label,\n leftHelper,\n contentLeft,\n contentRight,\n textBefore,\n textAfter,\n onScroll,\n listMaxHeight,\n listWidth,\n portal,\n filter,\n onSuggestionSelect,\n threshold = 2,\n renderList,\n renderListEnd,\n onSearch,\n\n hintText,\n\n ...rest\n },\n ref,\n ) => {\n const [focused, dispatchFocused] = useReducer(focusedReducer, null);\n const [innerValue, setInnerValue] = useState<string | number>('');\n const [isOpen, setIsOpen] = useState(false);\n\n const listId = safeUseId();\n const value = outerValue ?? innerValue;\n\n const helperTextId = safeUseId();\n\n const targetRef = useOutsideClick<HTMLDivElement>(() => {\n setIsOpen(false);\n });\n\n const handleFocus = () => {\n if (value.toString().length >= threshold) {\n setIsOpen(true);\n }\n };\n\n const handleItemClick = (e: SuggestionItemType) => {\n setInnerValue(e.label);\n\n if (onSuggestionSelect) {\n onSuggestionSelect(e);\n }\n\n setIsOpen(false);\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const currentValue = e.target.value;\n\n setInnerValue(currentValue);\n\n if (onChange) {\n onChange(e);\n }\n\n if (currentValue.toString().length >= threshold) {\n setIsOpen(true);\n } else {\n setIsOpen(false);\n }\n };\n\n const defaultFilterCallback = ({ label }: { label: string }) => {\n return label.toLowerCase().includes(value.toString().toLowerCase());\n };\n\n const finalResults = suggestions?.filter(filter || defaultFilterCallback) || [];\n\n const { onKeyDown } = useKeyNavigation({\n isOpen,\n setIsOpen,\n focused,\n dispatchFocused,\n finalResults,\n handleItemClick,\n });\n\n useDidMountEffect(() => {\n dispatchFocused({ type: 'reset' });\n }, [value]);\n\n return (\n <Root view={view} size={size} labelPlacement={labelPlacement} disabled={disabled} readOnly={readOnly}>\n <StyledPopover\n opened={isOpen}\n offset={[0, 0]}\n placement={getPlacements('bottom')}\n isFocusTrapped={false}\n usePortal={Boolean(portal)}\n frame={portal}\n target={\n <StyledTextField\n value={value}\n onChange={handleChange}\n onSearch={focused === null ? onSearch : undefined}\n ref={ref}\n size={size}\n view={view}\n labelPlacement={labelPlacement}\n disabled={disabled}\n readOnly={readOnly}\n label={label}\n contentLeft={contentLeft}\n contentRight={contentRight}\n textBefore={textBefore}\n textAfter={textAfter}\n onFocus={handleFocus}\n onKeyDown={onKeyDown}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-controls={listId}\n aria-expanded={isOpen}\n aria-activedescendant={`${listId}/${focused}`}\n aria-describedby={helperTextId}\n hintText={String(hintText || '')}\n {...rest}\n />\n }\n preventOverflow={false}\n ref={targetRef}\n listWidth={listWidth}\n >\n {(renderList && renderList(finalResults)) ||\n (Boolean(finalResults.length) && (\n <Root\n view={view}\n size={size}\n labelPlacement={labelPlacement}\n disabled={disabled}\n readOnly={readOnly}\n >\n <Ul\n id={listId}\n role=\"listbox\"\n aria-label={label}\n onScroll={onScroll}\n listMaxHeight={listMaxHeight}\n >\n {finalResults.map((suggestion, index) => (\n <SuggestionItem\n key={index}\n item={suggestion}\n onClick={handleItemClick}\n id={`${listId}/${index}`}\n focused={focused === index}\n />\n ))}\n\n {renderListEnd && (\n <InfiniteLoaderWrapper>{renderListEnd()}</InfiniteLoaderWrapper>\n )}\n </Ul>\n </Root>\n ))}\n </StyledPopover>\n\n {/* TODO: Дублируем хелпер для корректного позиционирования списка подсказок */}\n {leftHelper && (\n <LeftHelper id={helperTextId} disabled={disabled} readOnly={readOnly}>\n {leftHelper}\n </LeftHelper>\n )}\n </Root>\n );\n },\n );\n\nexport const autocompleteConfig = {\n name: 'Autocomplete',\n tag: 'div',\n layout: autocompleteRoot,\n base,\n defaults: {\n view: 'default',\n size: 'l',\n labelPlacement: 'outer',\n },\n variations: {\n view: {\n css: '',\n },\n },\n};\n"],"names":["autocompleteRoot","Root","forwardRef","_ref","ref","outerValue","value","onChange","suggestions","view","size","labelPlacement","disabled","readOnly","label","leftHelper","contentLeft","contentRight","textBefore","textAfter","onScroll","listMaxHeight","listWidth","portal","filter","onSuggestionSelect","_ref$threshold","threshold","renderList","renderListEnd","onSearch","hintText","rest","_objectWithoutProperties","_excluded","_useReducer","useReducer","focusedReducer","_useReducer2","_slicedToArray","focused","dispatchFocused","_useState","useState","_useState2","innerValue","setInnerValue","_useState3","_useState4","isOpen","setIsOpen","listId","safeUseId","helperTextId","targetRef","useOutsideClick","handleFocus","toString","length","handleItemClick","e","handleChange","currentValue","target","defaultFilterCallback","_ref2","toLowerCase","includes","finalResults","_useKeyNavigation","useKeyNavigation","onKeyDown","useDidMountEffect","type","React","createElement","StyledPopover","opened","offset","placement","getPlacements","isFocusTrapped","usePortal","Boolean","frame","StyledTextField","_extends","undefined","onFocus","role","concat","String","preventOverflow","Ul","id","map","suggestion","index","SuggestionItem","key","item","onClick","InfiniteLoaderWrapper","LeftHelper","autocompleteConfig","name","tag","layout","base","defaults","variations","css"],"mappings":";;;;;;;;;;;;;;;;;;;AAaA;AACA;AACA;IACaA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,IAAoD,EAAA;AAAA,EAAA,oBACjFC,gBAAU,CACN,UAAAC,IAAA,EA+BIC,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A,IAAI,EAAE;AACFsG,MAAAA,GAAG,EAAE,EAAA;AACT,KAAA;AACJ,GAAA;AACJ;;;;;"}
|
1
|
+
{"version":3,"file":"Autocomplete.js","sources":["../../../src/components/Autocomplete/Autocomplete.tsx"],"sourcesContent":["import React, { forwardRef, useState, useReducer } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { useDidMountEffect, useOutsideClick } from '../../hooks';\nimport { RootProps } from '../../engines';\nimport { getPlacements } from '../../utils';\n\nimport { focusedReducer } from './reducers/focusedReducer';\nimport { SuggestionItem, StyledTextField } from './ui';\nimport { StyledPopover, Ul, LeftHelper, base, InfiniteLoaderWrapper } from './Autocomplete.styles';\nimport type { AutocompleteProps, SuggestionItemType } from './Autocomplete.types';\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\n\n/**\n * Компонент Autocomplete. Поле ввода с подсказками в выпадающем списке.\n */\nexport const autocompleteRoot = (Root: RootProps<HTMLInputElement, AutocompleteProps>) =>\n forwardRef<HTMLInputElement, AutocompleteProps>(\n (\n {\n value: outerValue,\n onChange,\n suggestions,\n view,\n size,\n labelPlacement,\n disabled,\n readOnly,\n label,\n leftHelper,\n contentLeft,\n contentRight,\n textBefore,\n textAfter,\n onScroll,\n listMaxHeight,\n listWidth,\n portal,\n filter,\n onSuggestionSelect,\n threshold = 2,\n renderList,\n renderListEnd,\n onSearch,\n\n hintText,\n\n ...rest\n },\n ref,\n ) => {\n const [focused, dispatchFocused] = useReducer(focusedReducer, null);\n const [innerValue, setInnerValue] = useState<string | number>('');\n const [isOpen, setIsOpen] = useState(false);\n\n const listId = safeUseId();\n const value = outerValue ?? innerValue;\n\n const helperTextId = safeUseId();\n\n const targetRef = useOutsideClick<HTMLDivElement>(() => {\n setIsOpen(false);\n });\n\n const handleFocus = () => {\n if (value.toString().length >= threshold) {\n setIsOpen(true);\n }\n };\n\n const handleItemClick = (e: SuggestionItemType) => {\n setInnerValue(e.label);\n\n if (onSuggestionSelect) {\n onSuggestionSelect(e);\n }\n\n setIsOpen(false);\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const currentValue = e.target.value;\n\n setInnerValue(currentValue);\n\n if (onChange) {\n onChange(e);\n }\n\n if (currentValue.toString().length >= threshold) {\n setIsOpen(true);\n } else {\n setIsOpen(false);\n }\n };\n\n const defaultFilterCallback = ({ label }: { label: string }) => {\n return label.toLowerCase().includes(value.toString().toLowerCase());\n };\n\n const finalResults = suggestions?.filter(filter || defaultFilterCallback) || [];\n\n const { onKeyDown } = useKeyNavigation({\n isOpen,\n setIsOpen,\n focused,\n dispatchFocused,\n finalResults,\n handleItemClick,\n });\n\n useDidMountEffect(() => {\n dispatchFocused({ type: 'reset' });\n }, [value]);\n\n return (\n <Root view={view} size={size} labelPlacement={labelPlacement} disabled={disabled} readOnly={readOnly}>\n <StyledPopover\n opened={isOpen}\n offset={[0, 0]}\n placement={getPlacements('bottom')}\n isFocusTrapped={false}\n usePortal={Boolean(portal)}\n frame={portal}\n target={\n <StyledTextField\n value={value}\n onChange={handleChange}\n onSearch={focused === null ? onSearch : undefined}\n ref={ref}\n size={size}\n view={view}\n labelPlacement={labelPlacement}\n disabled={disabled}\n readOnly={readOnly}\n label={label}\n contentLeft={contentLeft}\n contentRight={contentRight}\n textBefore={textBefore}\n textAfter={textAfter}\n onFocus={handleFocus}\n onKeyDown={onKeyDown}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-controls={listId}\n aria-expanded={isOpen}\n aria-activedescendant={`${listId}/${focused}`}\n aria-describedby={helperTextId}\n hintText={String(hintText || '')}\n {...rest}\n />\n }\n preventOverflow={false}\n ref={targetRef}\n listWidth={listWidth}\n >\n {(renderList && renderList(finalResults)) ||\n (Boolean(finalResults.length) && (\n <Root\n view={view}\n size={size}\n labelPlacement={labelPlacement}\n disabled={disabled}\n readOnly={readOnly}\n >\n <Ul\n id={listId}\n role=\"listbox\"\n aria-label={label}\n onScroll={onScroll}\n listMaxHeight={listMaxHeight}\n >\n {finalResults.map((suggestion, index) => (\n <SuggestionItem\n key={index}\n item={suggestion}\n onClick={handleItemClick}\n id={`${listId}/${index}`}\n focused={focused === index}\n />\n ))}\n\n {renderListEnd && (\n <InfiniteLoaderWrapper>{renderListEnd()}</InfiniteLoaderWrapper>\n )}\n </Ul>\n </Root>\n ))}\n </StyledPopover>\n\n {/* TODO: Дублируем хелпер для корректного позиционирования списка подсказок */}\n {leftHelper && (\n <LeftHelper id={helperTextId} disabled={disabled} readOnly={readOnly}>\n {leftHelper}\n </LeftHelper>\n )}\n </Root>\n );\n },\n );\n\nexport const autocompleteConfig = {\n name: 'Autocomplete',\n tag: 'div',\n layout: autocompleteRoot,\n base,\n defaults: {\n view: 'default',\n size: 'l',\n labelPlacement: 'outer',\n },\n variations: {\n view: {\n css: '',\n },\n },\n};\n"],"names":["autocompleteRoot","Root","forwardRef","_ref","ref","outerValue","value","onChange","suggestions","view","size","labelPlacement","disabled","readOnly","label","leftHelper","contentLeft","contentRight","textBefore","textAfter","onScroll","listMaxHeight","listWidth","portal","filter","onSuggestionSelect","_ref$threshold","threshold","renderList","renderListEnd","onSearch","hintText","rest","_objectWithoutProperties","_excluded","_useReducer","useReducer","focusedReducer","_useReducer2","_slicedToArray","focused","dispatchFocused","_useState","useState","_useState2","innerValue","setInnerValue","_useState3","_useState4","isOpen","setIsOpen","listId","safeUseId","helperTextId","targetRef","useOutsideClick","handleFocus","toString","length","handleItemClick","e","handleChange","currentValue","target","defaultFilterCallback","_ref2","toLowerCase","includes","finalResults","_useKeyNavigation","useKeyNavigation","onKeyDown","useDidMountEffect","type","React","createElement","StyledPopover","opened","offset","placement","getPlacements","isFocusTrapped","usePortal","Boolean","frame","StyledTextField","_extends","undefined","onFocus","role","concat","String","preventOverflow","Ul","id","map","suggestion","index","SuggestionItem","key","item","onClick","InfiniteLoaderWrapper","LeftHelper","autocompleteConfig","name","tag","layout","base","defaults","variations","css"],"mappings":";;;;;;;;;;;;;;;;;;AAaA;AACA;AACA;IACaA,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AACfC,IAAAA,IAAI,EAAE,GAAG;AACTC,IAAAA,cAAc,EAAE,OAAA;GACnB;AACDmG,EAAAA,UAAU,EAAE;AACRrG,IAAAA,IAAI,EAAE;AACFsG,MAAAA,GAAG,EAAE,EAAA;AACT,KAAA;AACJ,GAAA;AACJ;;;;;"}
|
@@ -4,10 +4,9 @@ import './Autocomplete.styles_192fzgs.css';
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
5
5
|
|
6
6
|
var react = require('@linaria/react');
|
7
|
-
var Popover$1 = require('../Popover/Popover.js');
|
8
|
-
require('@linaria/core');
|
9
|
-
var common = require('../../engines/common.js');
|
10
7
|
var Autocomplete_tokens = require('./Autocomplete.tokens.js');
|
8
|
+
var common = require('../../engines/common.js');
|
9
|
+
var Popover$1 = require('../Popover/Popover.js');
|
11
10
|
|
12
11
|
var base = "bn6ooh7";
|
13
12
|
var Popover = /*#__PURE__*/common.component(Popover$1.popoverConfig);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Autocomplete.styles.js","sources":["../../../src/components/Autocomplete/Autocomplete.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { popoverClasses, popoverConfig } from '../Popover';\nimport { component } from '../../engines';\n\nimport { AutocompleteProps } from './Autocomplete.types';\nimport { tokens } from './Autocomplete.tokens';\n\nexport const base = css`\n .${popoverClasses.wrapper}, .${popoverClasses.target} {\n display: block;\n }\n`;\n\nconst Popover = component(popoverConfig);\n\nexport const StyledPopover = styled(Popover)<{ listWidth: AutocompleteProps['listWidth'] }>`\n .${String(popoverClasses.root)} {\n display: block;\n width: ${({ listWidth }) => listWidth || '100%'};\n }\n`;\n\nexport const Ul = styled.ul<{\n listMaxHeight: AutocompleteProps['listMaxHeight'];\n}>`\n box-sizing: border-box;\n\n background: var(${tokens.background});\n box-shadow: var(${tokens.boxShadow});\n\n border-radius: var(${tokens.borderRadius});\n height: auto;\n max-height: ${({ listMaxHeight }) => listMaxHeight || 'none'};\n overflow-y: scroll;\n border: var(${tokens.dropdownBorderWidth}) solid var(${tokens.dropdownBorderColor});\n\n margin: 0;\n padding: var(${tokens.padding});\n`;\n\nexport const LeftHelper = styled.div<{\n disabled: AutocompleteProps['disabled'];\n readOnly: AutocompleteProps['readOnly'];\n}>`\n color: ${({ readOnly, disabled }) =>\n readOnly && !disabled\n ? `var(${tokens.textFieldLeftHelperColorReadOnly})`\n : `var(${tokens.textFieldLeftHelperColor})`};\n margin-top: var(${tokens.textFieldLeftHelperOffset});\n\n font-family: var(${tokens.textFieldLeftHelperFontFamily});\n font-size: var(${tokens.textFieldLeftHelperFontSize});\n font-style: var(${tokens.textFieldLeftHelperFontStyle});\n font-weight: var(${tokens.textFieldLeftHelperFontWeight});\n letter-spacing: var(${tokens.textFieldLeftHelperLetterSpacing});\n line-height: var(${tokens.textFieldLeftHelperLineHeight});\n\n opacity: var(${tokens.textFieldDisabledOpacity});\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'auto')};\n`;\n\nexport const InfiniteLoaderWrapper = styled.li`\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: content-box;\n min-height: var(${tokens.textFieldHeight});\n`;\n"],"names":["base","Popover","component","popoverConfig","_exp3","_exp5","_ref","listWidth","StyledPopover","styled","name","class","propsAsIs","vars","_exp9","_ref2","listMaxHeight","Ul","_exp13","_ref3","readOnly","disabled","concat","tokens","textFieldLeftHelperColorReadOnly","textFieldLeftHelperColor","_exp22","_ref4","LeftHelper","InfiniteLoaderWrapper"],"mappings":"
|
1
|
+
{"version":3,"file":"Autocomplete.styles.js","sources":["../../../src/components/Autocomplete/Autocomplete.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { popoverClasses, popoverConfig } from '../Popover';\nimport { component } from '../../engines';\n\nimport { AutocompleteProps } from './Autocomplete.types';\nimport { tokens } from './Autocomplete.tokens';\n\nexport const base = css`\n .${popoverClasses.wrapper}, .${popoverClasses.target} {\n display: block;\n }\n`;\n\nconst Popover = component(popoverConfig);\n\nexport const StyledPopover = styled(Popover)<{ listWidth: AutocompleteProps['listWidth'] }>`\n .${String(popoverClasses.root)} {\n display: block;\n width: ${({ listWidth }) => listWidth || '100%'};\n }\n`;\n\nexport const Ul = styled.ul<{\n listMaxHeight: AutocompleteProps['listMaxHeight'];\n}>`\n box-sizing: border-box;\n\n background: var(${tokens.background});\n box-shadow: var(${tokens.boxShadow});\n\n border-radius: var(${tokens.borderRadius});\n height: auto;\n max-height: ${({ listMaxHeight }) => listMaxHeight || 'none'};\n overflow-y: scroll;\n border: var(${tokens.dropdownBorderWidth}) solid var(${tokens.dropdownBorderColor});\n\n margin: 0;\n padding: var(${tokens.padding});\n`;\n\nexport const LeftHelper = styled.div<{\n disabled: AutocompleteProps['disabled'];\n readOnly: AutocompleteProps['readOnly'];\n}>`\n color: ${({ readOnly, disabled }) =>\n readOnly && !disabled\n ? `var(${tokens.textFieldLeftHelperColorReadOnly})`\n : `var(${tokens.textFieldLeftHelperColor})`};\n margin-top: var(${tokens.textFieldLeftHelperOffset});\n\n font-family: var(${tokens.textFieldLeftHelperFontFamily});\n font-size: var(${tokens.textFieldLeftHelperFontSize});\n font-style: var(${tokens.textFieldLeftHelperFontStyle});\n font-weight: var(${tokens.textFieldLeftHelperFontWeight});\n letter-spacing: var(${tokens.textFieldLeftHelperLetterSpacing});\n line-height: var(${tokens.textFieldLeftHelperLineHeight});\n\n opacity: var(${tokens.textFieldDisabledOpacity});\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'auto')};\n`;\n\nexport const InfiniteLoaderWrapper = styled.li`\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: content-box;\n min-height: var(${tokens.textFieldHeight});\n`;\n"],"names":["base","Popover","component","popoverConfig","_exp3","_exp5","_ref","listWidth","StyledPopover","styled","name","class","propsAsIs","vars","_exp9","_ref2","listMaxHeight","Ul","_exp13","_ref3","readOnly","disabled","concat","tokens","textFieldLe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
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
5
5
|
|
6
6
|
var react = require('@linaria/react');
|
7
|
-
var TextField$1 = require('../../../TextField/TextField.js');
|
8
|
-
require('@linaria/core');
|
9
7
|
var common = require('../../../../engines/common.js');
|
8
|
+
var TextField$1 = require('../../../TextField/TextField.js');
|
10
9
|
|
11
10
|
var mergedConfig = /*#__PURE__*/common.mergeConfig(TextField$1.textFieldConfig);
|
12
11
|
var TextField = /*#__PURE__*/common.component(mergedConfig);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TextField.styles.js","sources":["../../../../../src/components/Autocomplete/ui/TextField/TextField.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { textFieldConfig, textFieldTokens } from '../../../TextField';\nimport { component, mergeConfig } from '../../../../engines';\nimport { tokens as autocompleteTokens } from '../../Autocomplete.tokens';\n\nconst mergedConfig = mergeConfig(textFieldConfig);\nconst TextField = component(mergedConfig);\n\nexport const StyledTextField = styled(TextField)`\n ${textFieldTokens.color}: var(${autocompleteTokens.textFieldColor});\n ${textFieldTokens.placeholderColorFocus}: var(${autocompleteTokens.textFieldPlaceholderColorFocus});\n ${textFieldTokens.backgroundColor}: var(${autocompleteTokens.textFieldBackgroundColor});\n ${textFieldTokens.backgroundColorHover}: var(${autocompleteTokens.textFieldBackgroundColorHover});\n ${textFieldTokens.backgroundColorFocus}: var(${autocompleteTokens.textFieldBackgroundColorFocus});\n ${textFieldTokens.borderColor}: var(${autocompleteTokens.textFieldBorderColor});\n ${textFieldTokens.borderColorHover}: var(${autocompleteTokens.textFieldBorderColorHover});\n ${textFieldTokens.borderColorFocus}: var(${autocompleteTokens.textFieldBorderColorFocus});\n ${textFieldTokens.colorReadOnly}: var(${autocompleteTokens.textFieldColorReadOnly});\n ${textFieldTokens.backgroundColorReadOnly}: var(${autocompleteTokens.textFieldBackgroundColorReadOnly});\n ${textFieldTokens.borderColorReadOnly}: var(${autocompleteTokens.textFieldBorderColorReadOnly});\n ${textFieldTokens.placeholderColorReadOnly}: var(${autocompleteTokens.textFieldPlaceholderColorReadOnly});\n ${textFieldTokens.caretColor}: var(${autocompleteTokens.textFieldCaretColor});\n ${textFieldTokens.placeholderColor}: var(${autocompleteTokens.textFieldPlaceholderColor});\n ${textFieldTokens.height}: var(${autocompleteTokens.textFieldHeight});\n ${textFieldTokens.borderWidth}: var(${autocompleteTokens.textFieldBorderWidth});\n ${textFieldTokens.borderRadius}: var(${autocompleteTokens.textFieldBorderRadius});\n ${textFieldTokens.padding}: var(${autocompleteTokens.textFieldPadding});\n ${textFieldTokens.leftContentMargin}: var(${autocompleteTokens.textFieldLeftContentMargin});\n ${textFieldTokens.rightContentMargin}: var(${autocompleteTokens.textFieldRightContentMargin});\n ${textFieldTokens.fontFamily}: var(${autocompleteTokens.textFieldFontFamily});\n ${textFieldTokens.fontStyle}: var(${autocompleteTokens.textFieldFontStyle});\n ${textFieldTokens.fontSize}: var(${autocompleteTokens.textFieldFontSize});\n ${textFieldTokens.fontWeight}: var(${autocompleteTokens.textFieldFontWeight});\n ${textFieldTokens.letterSpacing}: var(${autocompleteTokens.textFieldLetterSpacing});\n ${textFieldTokens.lineHeight}: var(${autocompleteTokens.textFieldLineHeight});\n ${textFieldTokens.labelColor}: var(${autocompleteTokens.textFieldLabelColor});\n ${textFieldTokens.labelColorReadOnly}: var(${autocompleteTokens.textFieldLabelColorReadOnly});\n ${textFieldTokens.labelOffset}: var(${autocompleteTokens.textFieldLabelOffset});\n ${textFieldTokens.labelFontFamily}: var(${autocompleteTokens.textFieldLabelFontFamily});\n ${textFieldTokens.labelFontStyle}: var(${autocompleteTokens.textFieldLabelFontStyle});\n ${textFieldTokens.labelFontSize}: var(${autocompleteTokens.textFieldLabelFontSize});\n ${textFieldTokens.labelFontWeight}: var(${autocompleteTokens.textFieldLabelFontWeight});\n ${textFieldTokens.labelLetterSpacing}: var(${autocompleteTokens.textFieldLabelLetterSpacing});\n ${textFieldTokens.labelLineHeight}: var(${autocompleteTokens.textFieldLabelLineHeight});\n ${textFieldTokens.labelInnerFontFamily}: var(${autocompleteTokens.textFieldLabelInnerFontFamily});\n ${textFieldTokens.labelInnerFontStyle}: var(${autocompleteTokens.textFieldLabelInnerFontStyle});\n ${textFieldTokens.labelInnerFontSize}: var(${autocompleteTokens.textFieldLabelInnerFontSize});\n ${textFieldTokens.labelInnerFontWeight}: var(${autocompleteTokens.textFieldLabelInnerFontWeight});\n ${textFieldTokens.labelInnerLetterSpacing}: var(${autocompleteTokens.textFieldLabelInnerLetterSpacing});\n ${textFieldTokens.labelInnerLineHeight}: var(${autocompleteTokens.textFieldLabelInnerLineHeight});\n ${textFieldTokens.labelInnerPadding}: var(${autocompleteTokens.textFieldLabelInnerPadding});\n ${textFieldTokens.contentLabelInnerPadding}: var(${autocompleteTokens.textFieldContentLabelInnerPadding});\n ${textFieldTokens.leftHelperColor}: var(${autocompleteTokens.textFieldLeftHelperColor});\n ${textFieldTokens.leftHelperColorReadOnly}: var(${autocompleteTokens.textFieldLeftHelperColorReadOnly});\n ${textFieldTokens.leftHelperOffset}: var(${autocompleteTokens.textFieldLeftHelperOffset});\n ${textFieldTokens.leftHelperFontFamily}: var(${autocompleteTokens.textFieldLeftHelperFontFamily});\n ${textFieldTokens.leftHelperFontStyle}: var(${autocompleteTokens.textFieldLeftHelperFontStyle});\n ${textFieldTokens.leftHelperFontSize}: var(${autocompleteTokens.textFieldLeftHelperFontSize});\n ${textFieldTokens.leftHelperFontWeight}: var(${autocompleteTokens.textFieldLeftHelperFontWeight});\n ${textFieldTokens.leftHelperLetterSpacing}: var(${autocompleteTokens.textFieldLeftHelperLetterSpacing});\n ${textFieldTokens.leftHelperLineHeight}: var(${autocompleteTokens.textFieldLeftHelperLineHeight});\n ${textFieldTokens.textBeforeColor}: var(${autocompleteTokens.textFieldTextBeforeColor});\n ${textFieldTokens.textAfterColor}: var(${autocompleteTokens.textFieldTextAfterColor});\n ${textFieldTokens.textBeforeMargin}: var(${autocompleteTokens.textFieldTextBeforeMargin});\n ${textFieldTokens.textAfterMargin}: var(${autocompleteTokens.textFieldTextAfterMargin});\n ${textFieldTokens.disabledOpacity}: var(${autocompleteTokens.textFieldDisabledOpacity});\n ${textFieldTokens.focusColor}: var(${autocompleteTokens.textFieldFocusColor});\n ${textFieldTokens.contentSlotColor}: var(${autocompleteTokens.textFieldContentSlotColor}, var(${autocompleteTokens.textFieldColor}));\n`;\n"],"names":["mergedConfig","mergeConfig","textFieldConfig","TextField","component","_exp","StyledTextField","styled","name","class","propsAsIs"],"mappings":"
|
1
|
+
{"version":3,"file":"TextField.styles.js","sources":["../../../../../src/components/Autocomplete/ui/TextField/TextField.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { textFieldConfig, textFieldTokens } from '../../../TextField';\nimport { component, mergeConfig } from '../../../../engines';\nimport { tokens as autocompleteTokens } from '../../Autocomplete.tokens';\n\nconst mergedConfig = mergeConfig(textFieldConfig);\nconst TextField = component(mergedConfig);\n\nexport const StyledTextField = styled(TextField)`\n ${textFieldTokens.color}: var(${autocompleteTokens.textFieldColor});\n ${textFieldTokens.placeholderColorFocus}: var(${autocompleteTokens.textFieldPlaceholderColorFocus});\n ${textFieldTokens.backgroundColor}: var(${autocompleteTokens.textFieldBackgroundColor});\n ${textFieldTokens.backgroundColorHover}: var(${autocompleteTokens.textFieldBackgroundColorHover});\n ${textFieldTokens.backgroundColorFocus}: var(${autocompleteTokens.textFieldBackgroundColorFocus});\n ${textFieldTokens.borderColor}: var(${autocompleteTokens.textFieldBorderColor});\n ${textFieldTokens.borderColorHover}: var(${autocompleteTokens.textFieldBorderColorHover});\n ${textFieldTokens.borderColorFocus}: var(${autocompleteTokens.textFieldBorderColorFocus});\n ${textFieldTokens.colorReadOnly}: var(${autocompleteTokens.textFieldColorReadOnly});\n ${textFieldTokens.backgroundColorReadOnly}: var(${autocompleteTokens.textFieldBackgroundColorReadOnly});\n ${textFieldTokens.borderColorReadOnly}: var(${autocompleteTokens.textFieldBorderColorReadOnly});\n ${textFieldTokens.placeholderColorReadOnly}: var(${autocompleteTokens.textFieldPlaceholderColorReadOnly});\n ${textFieldTokens.caretColor}: var(${autocompleteTokens.textFieldCaretColor});\n ${textFieldTokens.placeholderColor}: var(${autocompleteTokens.textFieldPlaceholderColor});\n ${textFieldTokens.height}: var(${autocompleteTokens.textFieldHeight});\n ${textFieldTokens.borderWidth}: var(${autocompleteTokens.textFieldBorderWidth});\n ${textFieldTokens.borderRadius}: var(${autocompleteTokens.textFieldBorderRadius});\n ${textFieldTokens.padding}: var(${autocompleteTokens.textFieldPadding});\n ${textFieldTokens.leftContentMargin}: var(${autocompleteTokens.textFieldLeftContentMargin});\n ${textFieldTokens.rightContentMargin}: var(${autocompleteTokens.textFieldRightContentMargin});\n ${textFieldTokens.fontFamily}: var(${autocompleteTokens.textFieldFontFamily});\n ${textFieldTokens.fontStyle}: var(${autocompleteTokens.textFieldFontStyle});\n ${textFieldTokens.fontSize}: var(${autocompleteTokens.textFieldFontSize});\n ${textFieldTokens.fontWeight}: var(${autocompleteTokens.textFieldFontWeight});\n ${textFieldTokens.letterSpacing}: var(${autocompleteTokens.textFieldLetterSpacing});\n ${textFieldTokens.lineHeight}: var(${autocompleteTokens.textFieldLineHeight});\n ${textFieldTokens.labelColor}: var(${autocompleteTokens.textFieldLabelColor});\n ${textFieldTokens.labelColorReadOnly}: var(${autocompleteTokens.textFieldLabelColorReadOnly});\n ${textFieldTokens.labelOffset}: var(${autocompleteTokens.textFieldLabelOffset});\n ${textFieldTokens.labelFontFamily}: var(${autocompleteTokens.textFieldLabelFontFamily});\n ${textFieldTokens.labelFontStyle}: var(${autocompleteTokens.textFieldLabelFontStyle});\n ${textFieldTokens.labelFontSize}: var(${autocompleteTokens.textFieldLabelFontSize});\n ${textFieldTokens.labelFontWeight}: var(${autocompleteTokens.textFieldLabelFontWeight});\n ${textFieldTokens.labelLetterSpacing}: var(${autocompleteTokens.textFieldLabelLetterSpacing});\n ${textFieldTokens.labelLineHeight}: var(${autocompleteTokens.textFieldLabelLineHeight});\n ${textFieldTokens.labelInnerFontFamily}: var(${autocompleteTokens.textFieldLabelInnerFontFamily});\n ${textFieldTokens.labelInnerFontStyle}: var(${autocompleteTokens.textFieldLabelInnerFontStyle});\n ${textFieldTokens.labelInnerFontSize}: var(${autocompleteTokens.textFieldLabelInnerFontSize});\n ${textFieldTokens.labelInnerFontWeight}: var(${autocompleteTokens.textFieldLabelInnerFontWeight});\n ${textFieldTokens.labelInnerLetterSpacing}: var(${autocompleteTokens.textFieldLabelInnerLetterSpacing});\n ${textFieldTokens.labelInnerLineHeight}: var(${autocompleteTokens.textFieldLabelInnerLineHeight});\n ${textFieldTokens.labelInnerPadding}: var(${autocompleteTokens.textFieldLabelInnerPadding});\n ${textFieldTokens.contentLabelInnerPadding}: var(${autocompleteTokens.textFieldContentLabelInnerPadding});\n ${textFieldTokens.leftHelperColor}: var(${autocompleteTokens.textFieldLeftHelperColor});\n ${textFieldTokens.leftHelperColorReadOnly}: var(${autocompleteTokens.textFieldLeftHelperColorReadOnly});\n ${textFieldTokens.leftHelperOffset}: var(${autocompleteTokens.textFieldLeftHelperOffset});\n ${textFieldTokens.leftHelperFontFamily}: var(${autocompleteTokens.textFieldLeftHelperFontFamily});\n ${textFieldTokens.leftHelperFontStyle}: var(${autocompleteTokens.textFieldLeftHelperFontStyle});\n ${textFieldTokens.leftHelperFontSize}: var(${autocompleteTokens.textFieldLeftHelperFontSize});\n ${textFieldTokens.leftHelperFontWeight}: var(${autocompleteTokens.textFieldLeftHelperFontWeight});\n ${textFieldTokens.leftHelperLetterSpacing}: var(${autocompleteTokens.textFieldLeftHelperLetterSpacing});\n ${textFieldTokens.leftHelperLineHeight}: var(${autocompleteTokens.textFieldLeftHelperLineHeight});\n ${textFieldTokens.textBeforeColor}: var(${autocompleteTokens.textFieldTextBeforeColor});\n ${textFieldTokens.textAfterColor}: var(${autocompleteTokens.textFieldTextAfterColor});\n ${textFieldTokens.textBeforeMargin}: var(${autocompleteTokens.textFieldTextBeforeMargin});\n ${textFieldTokens.textAfterMargin}: var(${autocompleteTokens.textFieldTextAfterMargin});\n ${textFieldTokens.disabledOpacity}: var(${autocompleteTokens.textFieldDisabledOpacity});\n ${textFieldTokens.focusColor}: var(${autocompleteTokens.textFieldFocusColor});\n ${textFieldTokens.contentSlotColor}: var(${autocompleteTokens.textFieldContentSlotColor}, var(${autocompleteTokens.textFieldColor}));\n`;\n"],"names":["mergedConfig","mergeConfig","textFieldConfig","TextField","component","_exp","StyledTextField","styled","name","class","propsAsIs"],"mappings":";;;;;;;;AAMA,IAAMA,YAAY,gBAAGC,kBAAW,CAACC,2BAAe,CAAC,CAAA;AACjD,IAAMC,SAAS,gBAAGC,gBAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANxBA,SAMwBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,SAAS,CAAA;AAAA,CAAA,CAAA;AAAxC,IAAMG,eAAe,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,iBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CA4DpC;;;;"}
|
@@ -6,15 +6,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
6
6
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
7
7
|
var React = require('react');
|
8
8
|
var react = require('@linaria/react');
|
9
|
-
require('@linaria/core');
|
10
|
-
var common = require('../../engines/common.js');
|
11
9
|
var index = require('../../utils/index.js');
|
12
|
-
var Indicator$1 = require('../Indicator/Indicator.js');
|
13
10
|
var Avatar_tokens = require('./Avatar.tokens.js');
|
14
11
|
var Avatar_styles = require('./Avatar.styles.js');
|
15
12
|
var base = require('./variations/_size/base.js');
|
16
13
|
var base$1 = require('./variations/_focused/base.js');
|
17
14
|
var getInitialsForName = require('./utils/getInitialsForName.js');
|
15
|
+
var common = require('../../engines/common.js');
|
16
|
+
var Indicator$1 = require('../Indicator/Indicator.js');
|
18
17
|
|
19
18
|
var _excluded = ["size", "name", "url", "customText", "status", "className", "focused", "isScalable", "statusLabels"];
|
20
19
|
var StatusLabelsDefault = {
|