@foxford/ui 2.102.0 → 2.103.0-beta-bdca95a-20260331
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Accordion/Accordion.js +1 -1
- package/components/Accordion/Accordion.js.map +1 -1
- package/components/Accordion/Accordion.mjs +1 -1
- package/components/Accordion/Accordion.mjs.map +1 -1
- package/components/Accordion/hooks.js +1 -1
- package/components/Accordion/hooks.js.map +1 -1
- package/components/Accordion/hooks.mjs +1 -1
- package/components/Accordion/hooks.mjs.map +1 -1
- package/components/Accordion/style.js +1 -1
- package/components/Accordion/style.js.map +1 -1
- package/components/Accordion/style.mjs +1 -1
- package/components/Accordion/style.mjs.map +1 -1
- package/components/AccordionItem/AccordionItem.js +1 -1
- package/components/AccordionItem/AccordionItem.js.map +1 -1
- package/components/AccordionItem/AccordionItem.mjs +1 -1
- package/components/AccordionItem/AccordionItem.mjs.map +1 -1
- package/components/AccordionItem/style.js +1 -1
- package/components/AccordionItem/style.js.map +1 -1
- package/components/AccordionItem/style.mjs +1 -1
- package/components/AccordionItem/style.mjs.map +1 -1
- package/components/AccordionItem/useAccordionPanel.js +1 -1
- package/components/AccordionItem/useAccordionPanel.js.map +1 -1
- package/components/AccordionItem/useAccordionPanel.mjs +1 -1
- package/components/AccordionItem/useAccordionPanel.mjs.map +1 -1
- package/components/AccordionItem/useAccordionPanelProps.js.map +1 -1
- package/components/AccordionItem/useAccordionPanelProps.mjs.map +1 -1
- package/components/ActionBtn/style.js +1 -1
- package/components/ActionBtn/style.js.map +1 -1
- package/components/ActionBtn/style.mjs +1 -1
- package/components/ActionBtn/style.mjs.map +1 -1
- package/components/AddElement/AddElement.js +1 -1
- package/components/AddElement/AddElement.js.map +1 -1
- package/components/AddElement/AddElement.mjs +1 -1
- package/components/AddElement/AddElement.mjs.map +1 -1
- package/components/AddElement/style.js +1 -1
- package/components/AddElement/style.js.map +1 -1
- package/components/AddElement/style.mjs +1 -1
- package/components/AddElement/style.mjs.map +1 -1
- package/components/Alert/Alert.js +1 -1
- package/components/Alert/Alert.js.map +1 -1
- package/components/Alert/Alert.mjs +1 -1
- package/components/Alert/Alert.mjs.map +1 -1
- package/components/Alert/CountdownCircle.js +1 -1
- package/components/Alert/CountdownCircle.js.map +1 -1
- package/components/Alert/CountdownCircle.mjs +1 -1
- package/components/Alert/CountdownCircle.mjs.map +1 -1
- package/components/Alert/style.js +1 -1
- package/components/Alert/style.js.map +1 -1
- package/components/Alert/style.mjs +1 -1
- package/components/Alert/style.mjs.map +1 -1
- package/components/Alert/utils.js.map +1 -1
- package/components/Alert/utils.mjs.map +1 -1
- package/components/Amount/Amount.js.map +1 -1
- package/components/Amount/Amount.mjs.map +1 -1
- package/components/Amount/style.js +1 -1
- package/components/Amount/style.js.map +1 -1
- package/components/Amount/style.mjs +1 -1
- package/components/Amount/style.mjs.map +1 -1
- package/components/Anchor/Anchor.js +1 -1
- package/components/Anchor/Anchor.js.map +1 -1
- package/components/Anchor/Anchor.mjs +1 -1
- package/components/Anchor/Anchor.mjs.map +1 -1
- package/components/Anchor/style.js +1 -1
- package/components/Anchor/style.js.map +1 -1
- package/components/Anchor/style.mjs +1 -1
- package/components/Anchor/style.mjs.map +1 -1
- package/components/Arrow/Arrow.js +1 -1
- package/components/Arrow/Arrow.js.map +1 -1
- package/components/Arrow/Arrow.mjs +1 -1
- package/components/Arrow/Arrow.mjs.map +1 -1
- package/components/Arrow/images/chevronUpDefault.svg.js +1 -1
- package/components/Arrow/images/chevronUpDefault.svg.js.map +1 -1
- package/components/Arrow/style.js +1 -1
- package/components/Arrow/style.js.map +1 -1
- package/components/Arrow/style.mjs +1 -1
- package/components/Arrow/style.mjs.map +1 -1
- package/components/ArrowBadge/ArrowBadge.js +1 -1
- package/components/ArrowBadge/ArrowBadge.js.map +1 -1
- package/components/ArrowBadge/ArrowBadge.mjs +1 -1
- package/components/ArrowBadge/ArrowBadge.mjs.map +1 -1
- package/components/ArrowBadge/images/arrow.svg.js +1 -1
- package/components/ArrowBadge/images/arrow.svg.js.map +1 -1
- package/components/ArrowBadge/images/fancy.svg.js +1 -1
- package/components/ArrowBadge/images/fancy.svg.js.map +1 -1
- package/components/ArrowBadge/images/rectangle.svg.js +1 -1
- package/components/ArrowBadge/images/rectangle.svg.js.map +1 -1
- package/components/ArrowBadge/style.js +1 -1
- package/components/ArrowBadge/style.js.map +1 -1
- package/components/ArrowBadge/style.mjs +1 -1
- package/components/ArrowBadge/style.mjs.map +1 -1
- package/components/AspectRatio/AspectRatio.js +1 -1
- package/components/AspectRatio/AspectRatio.js.map +1 -1
- package/components/AspectRatio/AspectRatio.mjs +1 -1
- package/components/AspectRatio/AspectRatio.mjs.map +1 -1
- package/components/AspectRatio/style.js +1 -1
- package/components/AspectRatio/style.js.map +1 -1
- package/components/AspectRatio/style.mjs +1 -1
- package/components/AspectRatio/style.mjs.map +1 -1
- package/components/Avatar/Avatar.js +1 -1
- package/components/Avatar/Avatar.js.map +1 -1
- package/components/Avatar/Avatar.mjs +1 -1
- package/components/Avatar/Avatar.mjs.map +1 -1
- package/components/Avatar/sizes.js +1 -1
- package/components/Avatar/sizes.js.map +1 -1
- package/components/Avatar/sizes.mjs +1 -1
- package/components/Avatar/sizes.mjs.map +1 -1
- package/components/Avatar/style.js +1 -1
- package/components/Avatar/style.js.map +1 -1
- package/components/Avatar/style.mjs +1 -1
- package/components/Avatar/style.mjs.map +1 -1
- package/components/Avatar/utils.js +1 -1
- package/components/Avatar/utils.js.map +1 -1
- package/components/Avatar/utils.mjs +1 -1
- package/components/Avatar/utils.mjs.map +1 -1
- package/components/Badge/Badge.js +1 -1
- package/components/Badge/Badge.js.map +1 -1
- package/components/Badge/Badge.mjs +1 -1
- package/components/Badge/Badge.mjs.map +1 -1
- package/components/Badge/style.js +1 -1
- package/components/Badge/style.js.map +1 -1
- package/components/Badge/style.mjs +1 -1
- package/components/Badge/style.mjs.map +1 -1
- package/components/Button/Button.js +1 -1
- package/components/Button/Button.js.map +1 -1
- package/components/Button/Button.mjs +1 -1
- package/components/Button/Button.mjs.map +1 -1
- package/components/Button/style.js +1 -1
- package/components/Button/style.js.map +1 -1
- package/components/Button/style.mjs +1 -1
- package/components/Button/style.mjs.map +1 -1
- package/components/Checkbox/Checkbox.js +1 -1
- package/components/Checkbox/Checkbox.js.map +1 -1
- package/components/Checkbox/Checkbox.mjs +1 -1
- package/components/Checkbox/Checkbox.mjs.map +1 -1
- package/components/Checkbox/images/checkDefault.svg.js +1 -1
- package/components/Checkbox/images/checkDefault.svg.js.map +1 -1
- package/components/Checkbox/style.js +2 -2
- package/components/Checkbox/style.js.map +1 -1
- package/components/Checkbox/style.mjs +2 -2
- package/components/Checkbox/style.mjs.map +1 -1
- package/components/Chip/Chip.js +1 -1
- package/components/Chip/Chip.js.map +1 -1
- package/components/Chip/Chip.mjs +1 -1
- package/components/Chip/Chip.mjs.map +1 -1
- package/components/Chip/sizes.js +2 -0
- package/components/Chip/sizes.js.map +1 -0
- package/components/Chip/sizes.mjs +2 -0
- package/components/Chip/sizes.mjs.map +1 -0
- package/components/Chip/style.js +1 -1
- package/components/Chip/style.js.map +1 -1
- package/components/Chip/style.mjs +1 -1
- package/components/Chip/style.mjs.map +1 -1
- package/components/Container/style.js +1 -1
- package/components/Container/style.js.map +1 -1
- package/components/Container/style.mjs +1 -1
- package/components/Container/style.mjs.map +1 -1
- package/components/ContextMenu/ContextMenu.js +1 -1
- package/components/ContextMenu/ContextMenu.js.map +1 -1
- package/components/ContextMenu/ContextMenu.mjs +1 -1
- package/components/ContextMenu/ContextMenu.mjs.map +1 -1
- package/components/ContextMenu/style.js +1 -1
- package/components/ContextMenu/style.js.map +1 -1
- package/components/ContextMenu/style.mjs +1 -1
- package/components/ContextMenu/style.mjs.map +1 -1
- package/components/ContextMenu.Multilevel/ContextMenu.Multilevel.js +1 -1
- package/components/ContextMenu.Multilevel/ContextMenu.Multilevel.js.map +1 -1
- package/components/ContextMenu.Multilevel/ContextMenu.Multilevel.mjs +1 -1
- package/components/ContextMenu.Multilevel/ContextMenu.Multilevel.mjs.map +1 -1
- package/components/ContextMenu.Multilevel/style.js +1 -1
- package/components/ContextMenu.Multilevel/style.js.map +1 -1
- package/components/ContextMenu.Multilevel/style.mjs +1 -1
- package/components/ContextMenu.Multilevel/style.mjs.map +1 -1
- package/components/Dialog/Dialog.js +1 -1
- package/components/Dialog/Dialog.js.map +1 -1
- package/components/Dialog/Dialog.mjs +1 -1
- package/components/Dialog/Dialog.mjs.map +1 -1
- package/components/Dialog/style.js +1 -1
- package/components/Dialog/style.js.map +1 -1
- package/components/Dialog/style.mjs +1 -1
- package/components/Dialog/style.mjs.map +1 -1
- package/components/DialogComponent/DialogComponent.js +1 -1
- package/components/DialogComponent/DialogComponent.js.map +1 -1
- package/components/DialogComponent/DialogComponent.mjs +1 -1
- package/components/DialogComponent/DialogComponent.mjs.map +1 -1
- package/components/DialogComponent/Header.js +1 -1
- package/components/DialogComponent/Header.js.map +1 -1
- package/components/DialogComponent/Header.mjs +1 -1
- package/components/DialogComponent/Header.mjs.map +1 -1
- package/components/DialogComponent/images/dragging.svg.js +1 -1
- package/components/DialogComponent/images/dragging.svg.js.map +1 -1
- package/components/DialogComponent/style.js +1 -1
- package/components/DialogComponent/style.js.map +1 -1
- package/components/DialogComponent/style.mjs +1 -1
- package/components/DialogComponent/style.mjs.map +1 -1
- package/components/Divider/Divider.js +1 -1
- package/components/Divider/Divider.js.map +1 -1
- package/components/Divider/Divider.mjs +1 -1
- package/components/Divider/Divider.mjs.map +1 -1
- package/components/Divider/style.js +1 -1
- package/components/Divider/style.js.map +1 -1
- package/components/Divider/style.mjs +1 -1
- package/components/Divider/style.mjs.map +1 -1
- package/components/Dropdown/Dropdown.js +1 -1
- package/components/Dropdown/Dropdown.js.map +1 -1
- package/components/Dropdown/Dropdown.mjs +1 -1
- package/components/Dropdown/Dropdown.mjs.map +1 -1
- package/components/Dropdown/DropdownListItem.js +1 -1
- package/components/Dropdown/DropdownListItem.js.map +1 -1
- package/components/Dropdown/DropdownListItem.mjs +1 -1
- package/components/Dropdown/DropdownListItem.mjs.map +1 -1
- package/components/Dropdown/DropdownMenu.js +1 -1
- package/components/Dropdown/DropdownMenu.js.map +1 -1
- package/components/Dropdown/DropdownMenu.mjs +1 -1
- package/components/Dropdown/DropdownMenu.mjs.map +1 -1
- package/components/Dropdown/DropdownMenuMultiple.js +1 -1
- package/components/Dropdown/DropdownMenuMultiple.js.map +1 -1
- package/components/Dropdown/DropdownMenuMultiple.mjs +1 -1
- package/components/Dropdown/DropdownMenuMultiple.mjs.map +1 -1
- package/components/Dropdown/DropdownMenuNoOptions.js.map +1 -1
- package/components/Dropdown/DropdownMenuNoOptions.mjs.map +1 -1
- package/components/Dropdown/DropdownMenuSingle.js +1 -1
- package/components/Dropdown/DropdownMenuSingle.js.map +1 -1
- package/components/Dropdown/DropdownMenuSingle.mjs +1 -1
- package/components/Dropdown/DropdownMenuSingle.mjs.map +1 -1
- package/components/Dropdown/hooks.js +1 -1
- package/components/Dropdown/hooks.js.map +1 -1
- package/components/Dropdown/hooks.mjs +1 -1
- package/components/Dropdown/hooks.mjs.map +1 -1
- package/components/Dropdown/renderDropdownOptionsList.js +1 -1
- package/components/Dropdown/renderDropdownOptionsList.js.map +1 -1
- package/components/Dropdown/renderDropdownOptionsList.mjs +1 -1
- package/components/Dropdown/renderDropdownOptionsList.mjs.map +1 -1
- package/components/Dropdown/style.js +1 -1
- package/components/Dropdown/style.js.map +1 -1
- package/components/Dropdown/style.mjs +1 -1
- package/components/Dropdown/style.mjs.map +1 -1
- package/components/Dropdown/utils.js +1 -1
- package/components/Dropdown/utils.js.map +1 -1
- package/components/Dropdown/utils.mjs +1 -1
- package/components/Dropdown/utils.mjs.map +1 -1
- package/components/FormInput/FormInput.js +1 -1
- package/components/FormInput/FormInput.js.map +1 -1
- package/components/FormInput/FormInput.mjs +1 -1
- package/components/FormInput/FormInput.mjs.map +1 -1
- package/components/FormInput/style.js +1 -1
- package/components/FormInput/style.js.map +1 -1
- package/components/FormInput/style.mjs +1 -1
- package/components/FormInput/style.mjs.map +1 -1
- package/components/FormInputLabel/FormInputLabel.js +1 -1
- package/components/FormInputLabel/FormInputLabel.js.map +1 -1
- package/components/FormInputLabel/FormInputLabel.mjs +1 -1
- package/components/FormInputLabel/FormInputLabel.mjs.map +1 -1
- package/components/FormInputLabel/style.js +1 -1
- package/components/FormInputLabel/style.js.map +1 -1
- package/components/FormInputLabel/style.mjs +1 -1
- package/components/FormInputLabel/style.mjs.map +1 -1
- package/components/FormLabel/FormLabel.js +1 -1
- package/components/FormLabel/FormLabel.js.map +1 -1
- package/components/FormLabel/FormLabel.mjs +1 -1
- package/components/FormLabel/FormLabel.mjs.map +1 -1
- package/components/FormLabel/constants.js +1 -1
- package/components/FormLabel/constants.js.map +1 -1
- package/components/FormLabel/constants.mjs +1 -1
- package/components/FormLabel/constants.mjs.map +1 -1
- package/components/FormLabel/style.js +1 -1
- package/components/FormLabel/style.js.map +1 -1
- package/components/FormLabel/style.mjs +1 -1
- package/components/FormLabel/style.mjs.map +1 -1
- package/components/Icon/Icon.js +1 -1
- package/components/Icon/Icon.js.map +1 -1
- package/components/Icon/Icon.mjs +1 -1
- package/components/Icon/Icon.mjs.map +1 -1
- package/components/Icon/iconPack.js +1 -1
- package/components/Icon/iconPack.js.map +1 -1
- package/components/Icon/iconPack.mjs +1 -1
- package/components/Icon/iconPack.mjs.map +1 -1
- package/components/Icon/images/blackBoard_default.svg.js +1 -1
- package/components/Icon/images/blackBoard_default.svg.js.map +1 -1
- package/components/Icon/images/book_default.svg.js +1 -1
- package/components/Icon/images/book_default.svg.js.map +1 -1
- package/components/Icon/images/burger_default.svg.js +1 -1
- package/components/Icon/images/burger_default.svg.js.map +1 -1
- package/components/Icon/images/calendar_default.svg.js +1 -1
- package/components/Icon/images/calendar_default.svg.js.map +1 -1
- package/components/Icon/images/calendar_simple_default.svg.js +1 -1
- package/components/Icon/images/calendar_simple_default.svg.js.map +1 -1
- package/components/Icon/images/camps_default.svg.js +1 -1
- package/components/Icon/images/camps_default.svg.js.map +1 -1
- package/components/Icon/images/cancel_default.svg.js +1 -1
- package/components/Icon/images/cancel_default.svg.js.map +1 -1
- package/components/Icon/images/cart_default.svg.js +1 -1
- package/components/Icon/images/cart_default.svg.js.map +1 -1
- package/components/Icon/images/checkCircle_default.svg.js +1 -1
- package/components/Icon/images/checkCircle_default.svg.js.map +1 -1
- package/components/Icon/images/check_default.svg.js +1 -1
- package/components/Icon/images/check_default.svg.js.map +1 -1
- package/components/Icon/images/chevronDown_default.svg.js +1 -1
- package/components/Icon/images/chevronDown_default.svg.js.map +1 -1
- package/components/Icon/images/chevronLeft_default.svg.js +1 -1
- package/components/Icon/images/chevronLeft_default.svg.js.map +1 -1
- package/components/Icon/images/chevronRight_default.svg.js +1 -1
- package/components/Icon/images/chevronRight_default.svg.js.map +1 -1
- package/components/Icon/images/chevronUp_default.svg.js +1 -1
- package/components/Icon/images/chevronUp_default.svg.js.map +1 -1
- package/components/Icon/images/clockFilled_default.svg.js +1 -1
- package/components/Icon/images/clockFilled_default.svg.js.map +1 -1
- package/components/Icon/images/clock_default.svg.js +1 -1
- package/components/Icon/images/clock_default.svg.js.map +1 -1
- package/components/Icon/images/coins_default.svg.js +1 -1
- package/components/Icon/images/coins_default.svg.js.map +1 -1
- package/components/Icon/images/copy_default.svg.js +1 -1
- package/components/Icon/images/copy_default.svg.js.map +1 -1
- package/components/Icon/images/courses_default.svg.js +1 -1
- package/components/Icon/images/courses_default.svg.js.map +1 -1
- package/components/Icon/images/cross_default.svg.js +1 -1
- package/components/Icon/images/cross_default.svg.js.map +1 -1
- package/components/Icon/images/dialog_default.svg.js +1 -1
- package/components/Icon/images/dialog_default.svg.js.map +1 -1
- package/components/Icon/images/diamondFilled_default.svg.js +1 -1
- package/components/Icon/images/diamondFilled_default.svg.js.map +1 -1
- package/components/Icon/images/diamond_default.svg.js +1 -1
- package/components/Icon/images/diamond_default.svg.js.map +1 -1
- package/components/Icon/images/discount_default.svg.js +1 -1
- package/components/Icon/images/discount_default.svg.js.map +1 -1
- package/components/Icon/images/document_default.svg.js +1 -1
- package/components/Icon/images/document_default.svg.js.map +1 -1
- package/components/Icon/images/dropDownArrow_default.svg.js +1 -1
- package/components/Icon/images/dropDownArrow_default.svg.js.map +1 -1
- package/components/Icon/images/edit_default.svg.js +1 -1
- package/components/Icon/images/edit_default.svg.js.map +1 -1
- package/components/Icon/images/email_default.svg.js +1 -1
- package/components/Icon/images/email_default.svg.js.map +1 -1
- package/components/Icon/images/externalLink_default.svg.js +1 -1
- package/components/Icon/images/externalLink_default.svg.js.map +1 -1
- package/components/Icon/images/externat_default.svg.js +1 -1
- package/components/Icon/images/externat_default.svg.js.map +1 -1
- package/components/Icon/images/eye_default.svg.js +1 -1
- package/components/Icon/images/eye_default.svg.js.map +1 -1
- package/components/Icon/images/fileBordered_default.svg.js +1 -1
- package/components/Icon/images/fileBordered_default.svg.js.map +1 -1
- package/components/Icon/images/file_default.svg.js +1 -1
- package/components/Icon/images/file_default.svg.js.map +1 -1
- package/components/Icon/images/fire_default.svg.js +1 -1
- package/components/Icon/images/fire_default.svg.js.map +1 -1
- package/components/Icon/images/headphones_default.svg.js +1 -1
- package/components/Icon/images/headphones_default.svg.js.map +1 -1
- package/components/Icon/images/home_default.svg.js +1 -1
- package/components/Icon/images/home_default.svg.js.map +1 -1
- package/components/Icon/images/infoInverse_default.svg.js +1 -1
- package/components/Icon/images/infoInverse_default.svg.js.map +1 -1
- package/components/Icon/images/info_default.svg.js +1 -1
- package/components/Icon/images/info_default.svg.js.map +1 -1
- package/components/Icon/images/lessons_default.svg.js +1 -1
- package/components/Icon/images/lessons_default.svg.js.map +1 -1
- package/components/Icon/images/list_default.svg.js +1 -1
- package/components/Icon/images/list_default.svg.js.map +1 -1
- package/components/Icon/images/login_default.svg.js +1 -1
- package/components/Icon/images/login_default.svg.js.map +1 -1
- package/components/Icon/images/logout_default.svg.js +1 -1
- package/components/Icon/images/logout_default.svg.js.map +1 -1
- package/components/Icon/images/message_default.svg.js +1 -1
- package/components/Icon/images/message_default.svg.js.map +1 -1
- package/components/Icon/images/objective_default.svg.js +1 -1
- package/components/Icon/images/objective_default.svg.js.map +1 -1
- package/components/Icon/images/page_default.svg.js +1 -1
- package/components/Icon/images/page_default.svg.js.map +1 -1
- package/components/Icon/images/pencil_default.svg.js +1 -1
- package/components/Icon/images/pencil_default.svg.js.map +1 -1
- package/components/Icon/images/person_default.svg.js +1 -1
- package/components/Icon/images/person_default.svg.js.map +1 -1
- package/components/Icon/images/phoneNoFill_default.svg.js +1 -1
- package/components/Icon/images/phoneNoFill_default.svg.js.map +1 -1
- package/components/Icon/images/phone_default.svg.js +1 -1
- package/components/Icon/images/phone_default.svg.js.map +1 -1
- package/components/Icon/images/playPause_default.svg.js +1 -1
- package/components/Icon/images/playPause_default.svg.js.map +1 -1
- package/components/Icon/images/play_default.svg.js +1 -1
- package/components/Icon/images/play_default.svg.js.map +1 -1
- package/components/Icon/images/plusThin_default.svg.js +1 -1
- package/components/Icon/images/plusThin_default.svg.js.map +1 -1
- package/components/Icon/images/plus_default.svg.js +1 -1
- package/components/Icon/images/plus_default.svg.js.map +1 -1
- package/components/Icon/images/present_default.svg.js +1 -1
- package/components/Icon/images/present_default.svg.js.map +1 -1
- package/components/Icon/images/priceTag_default.svg.js +1 -1
- package/components/Icon/images/priceTag_default.svg.js.map +1 -1
- package/components/Icon/images/print_default.svg.js +1 -1
- package/components/Icon/images/print_default.svg.js.map +1 -1
- package/components/Icon/images/prof_default.svg.js +1 -1
- package/components/Icon/images/prof_default.svg.js.map +1 -1
- package/components/Icon/images/questionFilled_default.svg.js +1 -1
- package/components/Icon/images/questionFilled_default.svg.js.map +1 -1
- package/components/Icon/images/radioChecked_default.svg.js +1 -1
- package/components/Icon/images/radioChecked_default.svg.js.map +1 -1
- package/components/Icon/images/radioNotChecked_default.svg.js +1 -1
- package/components/Icon/images/radioNotChecked_default.svg.js.map +1 -1
- package/components/Icon/images/reload_default.svg.js +1 -1
- package/components/Icon/images/reload_default.svg.js.map +1 -1
- package/components/Icon/images/search_default.svg.js +1 -1
- package/components/Icon/images/search_default.svg.js.map +1 -1
- package/components/Icon/images/settings_default.svg.js +1 -1
- package/components/Icon/images/settings_default.svg.js.map +1 -1
- package/components/Icon/images/sharpCross_default.svg.js +1 -1
- package/components/Icon/images/sharpCross_default.svg.js.map +1 -1
- package/components/Icon/images/sort_default.svg.js +1 -1
- package/components/Icon/images/sort_default.svg.js.map +1 -1
- package/components/Icon/images/star_default.svg.js +1 -1
- package/components/Icon/images/star_default.svg.js.map +1 -1
- package/components/Icon/images/student_default.svg.js +1 -1
- package/components/Icon/images/student_default.svg.js.map +1 -1
- package/components/Icon/images/target_default.svg.js +1 -1
- package/components/Icon/images/target_default.svg.js.map +1 -1
- package/components/Icon/images/tasks_default.svg.js +1 -1
- package/components/Icon/images/tasks_default.svg.js.map +1 -1
- package/components/Icon/images/textbook_default.svg.js +1 -1
- package/components/Icon/images/textbook_default.svg.js.map +1 -1
- package/components/Icon/images/tinyCross_default.svg.js +1 -1
- package/components/Icon/images/tinyCross_default.svg.js.map +1 -1
- package/components/Icon/images/trophy_default.svg.js +1 -1
- package/components/Icon/images/trophy_default.svg.js.map +1 -1
- package/components/Icon/images/unsort_default.svg.js +1 -1
- package/components/Icon/images/unsort_default.svg.js.map +1 -1
- package/components/Icon/images/video_default.svg.js +1 -1
- package/components/Icon/images/video_default.svg.js.map +1 -1
- package/components/Icon/images/wallet_default.svg.js +1 -1
- package/components/Icon/images/wallet_default.svg.js.map +1 -1
- package/components/Icon/style.js +1 -1
- package/components/Icon/style.js.map +1 -1
- package/components/Icon/style.mjs +1 -1
- package/components/Icon/style.mjs.map +1 -1
- package/components/IconButton/IconButton.js +1 -1
- package/components/IconButton/IconButton.js.map +1 -1
- package/components/IconButton/IconButton.mjs +1 -1
- package/components/IconButton/IconButton.mjs.map +1 -1
- package/components/IconButton/sizes.js +1 -1
- package/components/IconButton/sizes.js.map +1 -1
- package/components/IconButton/sizes.mjs +1 -1
- package/components/IconButton/sizes.mjs.map +1 -1
- package/components/IconButton/style.js +1 -1
- package/components/IconButton/style.js.map +1 -1
- package/components/IconButton/style.mjs +1 -1
- package/components/IconButton/style.mjs.map +1 -1
- package/components/Indicator/Indicator.js +1 -1
- package/components/Indicator/Indicator.js.map +1 -1
- package/components/Indicator/Indicator.mjs +1 -1
- package/components/Indicator/Indicator.mjs.map +1 -1
- package/components/Indicator/constants.js +1 -1
- package/components/Indicator/constants.js.map +1 -1
- package/components/Indicator/constants.mjs +1 -1
- package/components/Indicator/constants.mjs.map +1 -1
- package/components/Indicator/style.js +1 -1
- package/components/Indicator/style.js.map +1 -1
- package/components/Indicator/style.mjs +1 -1
- package/components/Indicator/style.mjs.map +1 -1
- package/components/Input/Input.js +1 -1
- package/components/Input/Input.js.map +1 -1
- package/components/Input/Input.mjs +1 -1
- package/components/Input/Input.mjs.map +1 -1
- package/components/Input/style.js +1 -1
- package/components/Input/style.js.map +1 -1
- package/components/Input/style.mjs +1 -1
- package/components/Input/style.mjs.map +1 -1
- package/components/Input.Phone/Input.Phone.js.map +1 -1
- package/components/Input.Phone/Input.Phone.mjs.map +1 -1
- package/components/InputCheckbox/InputCheckbox.js +1 -1
- package/components/InputCheckbox/InputCheckbox.js.map +1 -1
- package/components/InputCheckbox/InputCheckbox.mjs +1 -1
- package/components/InputCheckbox/InputCheckbox.mjs.map +1 -1
- package/components/InputCheckbox/style.js +1 -1
- package/components/InputCheckbox/style.js.map +1 -1
- package/components/InputCheckbox/style.mjs +1 -1
- package/components/InputCheckbox/style.mjs.map +1 -1
- package/components/InputLabel/InputLabel.js +1 -1
- package/components/InputLabel/InputLabel.js.map +1 -1
- package/components/InputLabel/InputLabel.mjs +1 -1
- package/components/InputLabel/InputLabel.mjs.map +1 -1
- package/components/InputLabel/style.js +1 -1
- package/components/InputLabel/style.js.map +1 -1
- package/components/InputLabel/style.mjs +1 -1
- package/components/InputLabel/style.mjs.map +1 -1
- package/components/InputRadio/InputRadio.js +1 -1
- package/components/InputRadio/InputRadio.js.map +1 -1
- package/components/InputRadio/InputRadio.mjs +1 -1
- package/components/InputRadio/InputRadio.mjs.map +1 -1
- package/components/InputRadio/style.js +1 -1
- package/components/InputRadio/style.js.map +1 -1
- package/components/InputRadio/style.mjs +1 -1
- package/components/InputRadio/style.mjs.map +1 -1
- package/components/ListItem/ListItem.js +1 -1
- package/components/ListItem/ListItem.js.map +1 -1
- package/components/ListItem/ListItem.mjs +1 -1
- package/components/ListItem/ListItem.mjs.map +1 -1
- package/components/ListItem/sizes.js +2 -0
- package/components/ListItem/sizes.js.map +1 -0
- package/components/ListItem/sizes.mjs +2 -0
- package/components/ListItem/sizes.mjs.map +1 -0
- package/components/ListItem/style.js +1 -1
- package/components/ListItem/style.js.map +1 -1
- package/components/ListItem/style.mjs +1 -1
- package/components/ListItem/style.mjs.map +1 -1
- package/components/Media/Media.js +1 -1
- package/components/Media/Media.js.map +1 -1
- package/components/Media/Media.mjs +1 -1
- package/components/Media/Media.mjs.map +1 -1
- package/components/Media/MediaMatcher.js +1 -1
- package/components/Media/MediaMatcher.js.map +1 -1
- package/components/Media/MediaMatcher.mjs +1 -1
- package/components/Media/MediaMatcher.mjs.map +1 -1
- package/components/Media/MediaMatchers.js.map +1 -1
- package/components/Media/MediaMatchers.mjs.map +1 -1
- package/components/Media/context.js.map +1 -1
- package/components/Media/context.mjs.map +1 -1
- package/components/Media/useMediaConnector.js +1 -1
- package/components/Media/useMediaConnector.js.map +1 -1
- package/components/Media/useMediaConnector.mjs +1 -1
- package/components/Media/useMediaConnector.mjs.map +1 -1
- package/components/Menu/Menu.js +1 -1
- package/components/Menu/Menu.js.map +1 -1
- package/components/Menu/Menu.mjs +1 -1
- package/components/Menu/Menu.mjs.map +1 -1
- package/components/MenuComponent/MenuComponent.js +1 -1
- package/components/MenuComponent/MenuComponent.js.map +1 -1
- package/components/MenuComponent/MenuComponent.mjs +1 -1
- package/components/MenuComponent/MenuComponent.mjs.map +1 -1
- package/components/MenuComponent/style.js +1 -1
- package/components/MenuComponent/style.js.map +1 -1
- package/components/MenuComponent/style.mjs +1 -1
- package/components/MenuComponent/style.mjs.map +1 -1
- package/components/MenuContainer/MenuContainer.js +1 -1
- package/components/MenuContainer/MenuContainer.js.map +1 -1
- package/components/MenuContainer/MenuContainer.mjs +1 -1
- package/components/MenuContainer/MenuContainer.mjs.map +1 -1
- package/components/MenuDivider/MenuDivider.js +1 -1
- package/components/MenuDivider/MenuDivider.js.map +1 -1
- package/components/MenuDivider/MenuDivider.mjs +1 -1
- package/components/MenuDivider/MenuDivider.mjs.map +1 -1
- package/components/MenuDivider/style.js +1 -1
- package/components/MenuDivider/style.js.map +1 -1
- package/components/MenuDivider/style.mjs +1 -1
- package/components/MenuDivider/style.mjs.map +1 -1
- package/components/MenuList/MenuList.js +1 -1
- package/components/MenuList/MenuList.js.map +1 -1
- package/components/MenuList/MenuList.mjs +1 -1
- package/components/MenuList/MenuList.mjs.map +1 -1
- package/components/MenuList/style.js +1 -1
- package/components/MenuList/style.js.map +1 -1
- package/components/MenuList/style.mjs +1 -1
- package/components/MenuList/style.mjs.map +1 -1
- package/components/Modal/adapter.js.map +1 -1
- package/components/Modal/adapter.mjs.map +1 -1
- package/components/Modal/images/tinyCrossDefault.svg.js +1 -1
- package/components/Modal/images/tinyCrossDefault.svg.js.map +1 -1
- package/components/Modal/style.js +1 -1
- package/components/Modal/style.js.map +1 -1
- package/components/Modal/style.mjs +1 -1
- package/components/Modal/style.mjs.map +1 -1
- package/components/Notification/Notification.js +1 -1
- package/components/Notification/Notification.js.map +1 -1
- package/components/Notification/Notification.mjs +1 -1
- package/components/Notification/Notification.mjs.map +1 -1
- package/components/Notification/style.js +1 -1
- package/components/Notification/style.js.map +1 -1
- package/components/Notification/style.mjs +1 -1
- package/components/Notification/style.mjs.map +1 -1
- package/components/Paper/style.js +1 -1
- package/components/Paper/style.js.map +1 -1
- package/components/Paper/style.mjs +1 -1
- package/components/Paper/style.mjs.map +1 -1
- package/components/Popover/Popover.js +1 -1
- package/components/Popover/Popover.js.map +1 -1
- package/components/Popover/Popover.mjs +1 -1
- package/components/Popover/Popover.mjs.map +1 -1
- package/components/PopoverComponent/PopoverComponent.js +1 -1
- package/components/PopoverComponent/PopoverComponent.js.map +1 -1
- package/components/PopoverComponent/PopoverComponent.mjs +1 -1
- package/components/PopoverComponent/PopoverComponent.mjs.map +1 -1
- package/components/PopoverComponent/style.js +1 -1
- package/components/PopoverComponent/style.js.map +1 -1
- package/components/PopoverComponent/style.mjs +1 -1
- package/components/PopoverComponent/style.mjs.map +1 -1
- package/components/Progress/style.js +1 -1
- package/components/Progress/style.js.map +1 -1
- package/components/Progress/style.mjs +1 -1
- package/components/Progress/style.mjs.map +1 -1
- package/components/Progress.Circle/Progress.Circle.js.map +1 -1
- package/components/Progress.Circle/Progress.Circle.mjs.map +1 -1
- package/components/Progress.Circle/style.js +1 -1
- package/components/Progress.Circle/style.js.map +1 -1
- package/components/Progress.Circle/style.mjs +1 -1
- package/components/Progress.Circle/style.mjs.map +1 -1
- package/components/Progress.Segmented/Progress.Segmented.js +1 -1
- package/components/Progress.Segmented/Progress.Segmented.js.map +1 -1
- package/components/Progress.Segmented/Progress.Segmented.mjs +1 -1
- package/components/Progress.Segmented/Progress.Segmented.mjs.map +1 -1
- package/components/Progress.Segmented/style.js +1 -1
- package/components/Progress.Segmented/style.js.map +1 -1
- package/components/Progress.Segmented/style.mjs +1 -1
- package/components/Progress.Segmented/style.mjs.map +1 -1
- package/components/ProgressCircle/ProgressCircle.js +1 -1
- package/components/ProgressCircle/ProgressCircle.js.map +1 -1
- package/components/ProgressCircle/ProgressCircle.mjs +1 -1
- package/components/ProgressCircle/ProgressCircle.mjs.map +1 -1
- package/components/ProgressCircle/style.js +1 -1
- package/components/ProgressCircle/style.js.map +1 -1
- package/components/ProgressCircle/style.mjs +1 -1
- package/components/ProgressCircle/style.mjs.map +1 -1
- package/components/ProgressLine/ProgressLine.js +1 -1
- package/components/ProgressLine/ProgressLine.js.map +1 -1
- package/components/ProgressLine/ProgressLine.mjs +1 -1
- package/components/ProgressLine/ProgressLine.mjs.map +1 -1
- package/components/ProgressLine/style.js +1 -1
- package/components/ProgressLine/style.js.map +1 -1
- package/components/ProgressLine/style.mjs +1 -1
- package/components/ProgressLine/style.mjs.map +1 -1
- package/components/Radio/style.js +2 -2
- package/components/Radio/style.js.map +1 -1
- package/components/Radio/style.mjs +2 -2
- package/components/Radio/style.mjs.map +1 -1
- package/components/Scrollable/Scrollable.js.map +1 -1
- package/components/Scrollable/Scrollable.mjs.map +1 -1
- package/components/Section/style.js +1 -1
- package/components/Section/style.js.map +1 -1
- package/components/Section/style.mjs +1 -1
- package/components/Section/style.mjs.map +1 -1
- package/components/Select/style.js +1 -1
- package/components/Select/style.js.map +1 -1
- package/components/Select/style.mjs +1 -1
- package/components/Select/style.mjs.map +1 -1
- package/components/Separator/style.js +1 -1
- package/components/Separator/style.js.map +1 -1
- package/components/Separator/style.mjs +1 -1
- package/components/Separator/style.mjs.map +1 -1
- package/components/Skeleton/Skeleton.js +1 -1
- package/components/Skeleton/Skeleton.js.map +1 -1
- package/components/Skeleton/Skeleton.mjs +1 -1
- package/components/Skeleton/Skeleton.mjs.map +1 -1
- package/components/Skeleton/style.js +1 -1
- package/components/Skeleton/style.js.map +1 -1
- package/components/Skeleton/style.mjs +1 -1
- package/components/Skeleton/style.mjs.map +1 -1
- package/components/Slot/Slot.js +1 -1
- package/components/Slot/Slot.js.map +1 -1
- package/components/Slot/Slot.mjs +1 -1
- package/components/Slot/Slot.mjs.map +1 -1
- package/components/Spacer/style.js +1 -1
- package/components/Spacer/style.js.map +1 -1
- package/components/Spacer/style.mjs +1 -1
- package/components/Spacer/style.mjs.map +1 -1
- package/components/Spinner/style.js +1 -1
- package/components/Spinner/style.js.map +1 -1
- package/components/Spinner/style.mjs +1 -1
- package/components/Spinner/style.mjs.map +1 -1
- package/components/Switch/Knob.js +1 -1
- package/components/Switch/Knob.js.map +1 -1
- package/components/Switch/Knob.mjs +1 -1
- package/components/Switch/Knob.mjs.map +1 -1
- package/components/Switch/Switch.js +1 -1
- package/components/Switch/Switch.js.map +1 -1
- package/components/Switch/Switch.mjs +1 -1
- package/components/Switch/Switch.mjs.map +1 -1
- package/components/Switch/style.js +1 -1
- package/components/Switch/style.js.map +1 -1
- package/components/Switch/style.mjs +1 -1
- package/components/Switch/style.mjs.map +1 -1
- package/components/Switcher/Switcher.js +1 -1
- package/components/Switcher/Switcher.js.map +1 -1
- package/components/Switcher/Switcher.mjs +1 -1
- package/components/Switcher/Switcher.mjs.map +1 -1
- package/components/Switcher/style.js +1 -1
- package/components/Switcher/style.js.map +1 -1
- package/components/Switcher/style.mjs +1 -1
- package/components/Switcher/style.mjs.map +1 -1
- package/components/Tab/Tab.js +1 -1
- package/components/Tab/Tab.js.map +1 -1
- package/components/Tab/Tab.mjs +1 -1
- package/components/Tab/Tab.mjs.map +1 -1
- package/components/Tab/images/arrow.svg.js +1 -1
- package/components/Tab/images/arrow.svg.js.map +1 -1
- package/components/Tab/style.js +1 -1
- package/components/Tab/style.js.map +1 -1
- package/components/Tab/style.mjs +1 -1
- package/components/Tab/style.mjs.map +1 -1
- package/components/TabList/TabList.js +1 -1
- package/components/TabList/TabList.js.map +1 -1
- package/components/TabList/TabList.mjs +1 -1
- package/components/TabList/TabList.mjs.map +1 -1
- package/components/TabList/TabListMenuTab.js +1 -1
- package/components/TabList/TabListMenuTab.js.map +1 -1
- package/components/TabList/TabListMenuTab.mjs +1 -1
- package/components/TabList/TabListMenuTab.mjs.map +1 -1
- package/components/TabList/TabListPanel.js +1 -1
- package/components/TabList/TabListPanel.js.map +1 -1
- package/components/TabList/TabListPanel.mjs +1 -1
- package/components/TabList/TabListPanel.mjs.map +1 -1
- package/components/TabList/hooks.js +1 -1
- package/components/TabList/hooks.js.map +1 -1
- package/components/TabList/hooks.mjs +1 -1
- package/components/TabList/hooks.mjs.map +1 -1
- package/components/TabList/style.js +1 -1
- package/components/TabList/style.js.map +1 -1
- package/components/TabList/style.mjs +1 -1
- package/components/TabList/style.mjs.map +1 -1
- package/components/TabListTab/TabListTab.js +1 -1
- package/components/TabListTab/TabListTab.js.map +1 -1
- package/components/TabListTab/TabListTab.mjs +1 -1
- package/components/TabListTab/TabListTab.mjs.map +1 -1
- package/components/TabListTab/hooks.js.map +1 -1
- package/components/TabListTab/hooks.mjs.map +1 -1
- package/components/TabListTab/style.js +1 -1
- package/components/TabListTab/style.js.map +1 -1
- package/components/TabListTab/style.mjs +1 -1
- package/components/TabListTab/style.mjs.map +1 -1
- package/components/Tabs/style.js +1 -1
- package/components/Tabs/style.js.map +1 -1
- package/components/Tabs/style.mjs +1 -1
- package/components/Tabs/style.mjs.map +1 -1
- package/components/Tag/style.js +1 -1
- package/components/Tag/style.js.map +1 -1
- package/components/Tag/style.mjs +1 -1
- package/components/Tag/style.mjs.map +1 -1
- package/components/Text/Ellipsis.js +1 -1
- package/components/Text/Ellipsis.js.map +1 -1
- package/components/Text/Ellipsis.mjs +1 -1
- package/components/Text/Ellipsis.mjs.map +1 -1
- package/components/Text/Text.js +1 -1
- package/components/Text/Text.js.map +1 -1
- package/components/Text/Text.mjs +1 -1
- package/components/Text/Text.mjs.map +1 -1
- package/components/Text/style.js +1 -1
- package/components/Text/style.js.map +1 -1
- package/components/Text/style.mjs +1 -1
- package/components/Text/style.mjs.map +1 -1
- package/components/Text.Ellipse/Text.Ellipse.js +1 -1
- package/components/Text.Ellipse/Text.Ellipse.js.map +1 -1
- package/components/Text.Ellipse/Text.Ellipse.mjs +1 -1
- package/components/Text.Ellipse/Text.Ellipse.mjs.map +1 -1
- package/components/Text.Heading/Text.Heading.js.map +1 -1
- package/components/Text.Heading/Text.Heading.mjs.map +1 -1
- package/components/Textarea/Textarea.js +1 -1
- package/components/Textarea/Textarea.js.map +1 -1
- package/components/Textarea/Textarea.mjs +1 -1
- package/components/Textarea/Textarea.mjs.map +1 -1
- package/components/Textarea/style.js +1 -1
- package/components/Textarea/style.js.map +1 -1
- package/components/Textarea/style.mjs +1 -1
- package/components/Textarea/style.mjs.map +1 -1
- package/components/Tooltip/Tooltip.js +1 -1
- package/components/Tooltip/Tooltip.js.map +1 -1
- package/components/Tooltip/Tooltip.mjs +1 -1
- package/components/Tooltip/Tooltip.mjs.map +1 -1
- package/components/Tooltip/TooltipWrapper.js +1 -1
- package/components/Tooltip/TooltipWrapper.js.map +1 -1
- package/components/Tooltip/TooltipWrapper.mjs +1 -1
- package/components/Tooltip/TooltipWrapper.mjs.map +1 -1
- package/components/TooltipComponent/TooltipComponent.js +1 -1
- package/components/TooltipComponent/TooltipComponent.js.map +1 -1
- package/components/TooltipComponent/TooltipComponent.mjs +1 -1
- package/components/TooltipComponent/TooltipComponent.mjs.map +1 -1
- package/components/TooltipComponent/sizes.js +2 -0
- package/components/TooltipComponent/sizes.js.map +1 -0
- package/components/TooltipComponent/sizes.mjs +2 -0
- package/components/TooltipComponent/sizes.mjs.map +1 -0
- package/components/TooltipComponent/style.js +1 -1
- package/components/TooltipComponent/style.js.map +1 -1
- package/components/TooltipComponent/style.mjs +1 -1
- package/components/TooltipComponent/style.mjs.map +1 -1
- package/dts/index.d.ts +833 -460
- package/hocs/withMergedProps.js +1 -1
- package/hocs/withMergedProps.js.map +1 -1
- package/hocs/withMergedProps.mjs +1 -1
- package/hocs/withMergedProps.mjs.map +1 -1
- package/hocs/withTranslation.js +1 -1
- package/hocs/withTranslation.js.map +1 -1
- package/hocs/withTranslation.mjs +1 -1
- package/hocs/withTranslation.mjs.map +1 -1
- package/hooks/use-config-priority.js +1 -1
- package/hooks/use-config-priority.js.map +1 -1
- package/hooks/use-config-priority.mjs +1 -1
- package/hooks/use-config-priority.mjs.map +1 -1
- package/hooks/useClickOutside.js +1 -1
- package/hooks/useClickOutside.js.map +1 -1
- package/hooks/useClickOutside.mjs +1 -1
- package/hooks/useClickOutside.mjs.map +1 -1
- package/hooks/useFloaterPortal.js +1 -1
- package/hooks/useFloaterPortal.js.map +1 -1
- package/hooks/useFloaterPortal.mjs +1 -1
- package/hooks/useFloaterPortal.mjs.map +1 -1
- package/hooks/useKeyboardListener.js +1 -1
- package/hooks/useKeyboardListener.js.map +1 -1
- package/hooks/useKeyboardListener.mjs +1 -1
- package/hooks/useKeyboardListener.mjs.map +1 -1
- package/hooks/useMergedPalette.js +1 -1
- package/hooks/useMergedPalette.js.map +1 -1
- package/hooks/useMergedPalette.mjs +1 -1
- package/hooks/useMergedPalette.mjs.map +1 -1
- package/hooks/useMergedProps.js +1 -1
- package/hooks/useMergedProps.js.map +1 -1
- package/hooks/useMergedProps.mjs +1 -1
- package/hooks/useMergedProps.mjs.map +1 -1
- package/hooks/useMountedStatus.js +1 -1
- package/hooks/useMountedStatus.js.map +1 -1
- package/hooks/useMountedStatus.mjs +1 -1
- package/hooks/useMountedStatus.mjs.map +1 -1
- package/hooks/useResizable.js +1 -1
- package/hooks/useResizable.js.map +1 -1
- package/hooks/useResizable.mjs +1 -1
- package/hooks/useResizable.mjs.map +1 -1
- package/hooks/useResizeObserver.js +1 -1
- package/hooks/useResizeObserver.js.map +1 -1
- package/hooks/useResizeObserver.mjs +1 -1
- package/hooks/useResizeObserver.mjs.map +1 -1
- package/hooks/useScrollLock.js +1 -1
- package/hooks/useScrollLock.js.map +1 -1
- package/hooks/useScrollLock.mjs +1 -1
- package/hooks/useScrollLock.mjs.map +1 -1
- package/hooks/useScrollMonitor.js +1 -1
- package/hooks/useScrollMonitor.js.map +1 -1
- package/hooks/useScrollMonitor.mjs +1 -1
- package/hooks/useScrollMonitor.mjs.map +1 -1
- package/hooks/useScrollThresholds.js +1 -1
- package/hooks/useScrollThresholds.js.map +1 -1
- package/hooks/useScrollThresholds.mjs +1 -1
- package/hooks/useScrollThresholds.mjs.map +1 -1
- package/icon-pack/src/icons/ArrowUp/index.js +1 -1
- package/icon-pack/src/icons/ArrowUp/index.js.map +1 -1
- package/icon-pack/src/icons/ArrowUp/index.mjs +1 -1
- package/icon-pack/src/icons/ArrowUp/index.mjs.map +1 -1
- package/icon-pack/src/icons/CheckCircleFill/index.js +1 -1
- package/icon-pack/src/icons/CheckCircleFill/index.js.map +1 -1
- package/icon-pack/src/icons/CheckCircleFill/index.mjs +1 -1
- package/icon-pack/src/icons/CheckCircleFill/index.mjs.map +1 -1
- package/icon-pack/src/icons/CheckFill/index.js +1 -1
- package/icon-pack/src/icons/CheckFill/index.js.map +1 -1
- package/icon-pack/src/icons/CheckFill/index.mjs +1 -1
- package/icon-pack/src/icons/CheckFill/index.mjs.map +1 -1
- package/icon-pack/src/icons/ChevronDown/index.js +1 -1
- package/icon-pack/src/icons/ChevronDown/index.js.map +1 -1
- package/icon-pack/src/icons/ChevronDown/index.mjs +1 -1
- package/icon-pack/src/icons/ChevronDown/index.mjs.map +1 -1
- package/icon-pack/src/icons/ChevronLeft/index.js +1 -1
- package/icon-pack/src/icons/ChevronLeft/index.js.map +1 -1
- package/icon-pack/src/icons/ChevronLeft/index.mjs +1 -1
- package/icon-pack/src/icons/ChevronLeft/index.mjs.map +1 -1
- package/icon-pack/src/icons/ChevronRight/index.js +1 -1
- package/icon-pack/src/icons/ChevronRight/index.js.map +1 -1
- package/icon-pack/src/icons/ChevronRight/index.mjs +1 -1
- package/icon-pack/src/icons/ChevronRight/index.mjs.map +1 -1
- package/icon-pack/src/icons/Close/index.js +1 -1
- package/icon-pack/src/icons/Close/index.js.map +1 -1
- package/icon-pack/src/icons/Close/index.mjs +1 -1
- package/icon-pack/src/icons/Close/index.mjs.map +1 -1
- package/icon-pack/src/icons/CloseCirlceFill/index.js +1 -1
- package/icon-pack/src/icons/CloseCirlceFill/index.js.map +1 -1
- package/icon-pack/src/icons/CloseCirlceFill/index.mjs +1 -1
- package/icon-pack/src/icons/CloseCirlceFill/index.mjs.map +1 -1
- package/icon-pack/src/icons/HelpCircle/index.js +1 -1
- package/icon-pack/src/icons/HelpCircle/index.js.map +1 -1
- package/icon-pack/src/icons/HelpCircle/index.mjs +1 -1
- package/icon-pack/src/icons/HelpCircle/index.mjs.map +1 -1
- package/icon-pack/src/icons/InfoCircle/index.js +1 -1
- package/icon-pack/src/icons/InfoCircle/index.js.map +1 -1
- package/icon-pack/src/icons/InfoCircle/index.mjs +1 -1
- package/icon-pack/src/icons/InfoCircle/index.mjs.map +1 -1
- package/icon-pack/src/icons/LoaderFill/index.js +1 -1
- package/icon-pack/src/icons/LoaderFill/index.js.map +1 -1
- package/icon-pack/src/icons/LoaderFill/index.mjs +1 -1
- package/icon-pack/src/icons/LoaderFill/index.mjs.map +1 -1
- package/icon-pack/src/icons/Minus/index.js +1 -1
- package/icon-pack/src/icons/Minus/index.js.map +1 -1
- package/icon-pack/src/icons/Minus/index.mjs +1 -1
- package/icon-pack/src/icons/Minus/index.mjs.map +1 -1
- package/icon-pack/src/icons/MinusFill/index.js +1 -1
- package/icon-pack/src/icons/MinusFill/index.js.map +1 -1
- package/icon-pack/src/icons/MinusFill/index.mjs +1 -1
- package/icon-pack/src/icons/MinusFill/index.mjs.map +1 -1
- package/icon-pack/src/icons/NotifFill/index.js +1 -1
- package/icon-pack/src/icons/NotifFill/index.js.map +1 -1
- package/icon-pack/src/icons/NotifFill/index.mjs +1 -1
- package/icon-pack/src/icons/NotifFill/index.mjs.map +1 -1
- package/icon-pack/src/icons/Plus/index.js +1 -1
- package/icon-pack/src/icons/Plus/index.js.map +1 -1
- package/icon-pack/src/icons/Plus/index.mjs +1 -1
- package/icon-pack/src/icons/Plus/index.mjs.map +1 -1
- package/icon-pack/src/icons/PlusLarge/index.js +1 -1
- package/icon-pack/src/icons/PlusLarge/index.js.map +1 -1
- package/icon-pack/src/icons/PlusLarge/index.mjs +1 -1
- package/icon-pack/src/icons/PlusLarge/index.mjs.map +1 -1
- package/icon-pack/src/icons/Redo/index.js +1 -1
- package/icon-pack/src/icons/Redo/index.js.map +1 -1
- package/icon-pack/src/icons/Redo/index.mjs +1 -1
- package/icon-pack/src/icons/Redo/index.mjs.map +1 -1
- package/icon-pack/src/icons/ResizeHandle/index.js +1 -1
- package/icon-pack/src/icons/ResizeHandle/index.js.map +1 -1
- package/icon-pack/src/icons/ResizeHandle/index.mjs +1 -1
- package/icon-pack/src/icons/ResizeHandle/index.mjs.map +1 -1
- package/icon-pack/src/icons/StarFill/index.js +1 -1
- package/icon-pack/src/icons/StarFill/index.js.map +1 -1
- package/icon-pack/src/icons/StarFill/index.mjs +1 -1
- package/icon-pack/src/icons/StarFill/index.mjs.map +1 -1
- package/icon-pack/src/icons/WarningTriangleFill/index.js +1 -1
- package/icon-pack/src/icons/WarningTriangleFill/index.js.map +1 -1
- package/icon-pack/src/icons/WarningTriangleFill/index.mjs +1 -1
- package/icon-pack/src/icons/WarningTriangleFill/index.mjs.map +1 -1
- package/mixins/color.js.map +1 -1
- package/mixins/color.mjs.map +1 -1
- package/mixins/create-responsive-props.js +1 -1
- package/mixins/create-responsive-props.js.map +1 -1
- package/mixins/create-responsive-props.mjs +1 -1
- package/mixins/create-responsive-props.mjs.map +1 -1
- package/mixins/focus.js +1 -1
- package/mixins/focus.js.map +1 -1
- package/mixins/focus.mjs +1 -1
- package/mixins/focus.mjs.map +1 -1
- package/mixins/responsive-layout.js +1 -1
- package/mixins/responsive-layout.js.map +1 -1
- package/mixins/responsive-layout.mjs +1 -1
- package/mixins/responsive-layout.mjs.map +1 -1
- package/mixins/responsive-margin.js +1 -1
- package/mixins/responsive-margin.js.map +1 -1
- package/mixins/responsive-margin.mjs +1 -1
- package/mixins/responsive-margin.mjs.map +1 -1
- package/mixins/responsive-position.js +1 -1
- package/mixins/responsive-position.js.map +1 -1
- package/mixins/responsive-position.mjs +1 -1
- package/mixins/responsive-position.mjs.map +1 -1
- package/mixins/responsive-property.js +1 -1
- package/mixins/responsive-property.js.map +1 -1
- package/mixins/responsive-property.mjs +1 -1
- package/mixins/responsive-property.mjs.map +1 -1
- package/mixins/responsive-size.js +1 -1
- package/mixins/responsive-size.js.map +1 -1
- package/mixins/responsive-size.mjs +1 -1
- package/mixins/responsive-size.mjs.map +1 -1
- package/mixins/screen.js.map +1 -1
- package/mixins/screen.mjs.map +1 -1
- package/mixins/shared.js +1 -1
- package/mixins/shared.js.map +1 -1
- package/mixins/shared.mjs +1 -1
- package/mixins/shared.mjs.map +1 -1
- package/package.json +2 -2
- package/shared/resize-observer.js +1 -1
- package/shared/resize-observer.js.map +1 -1
- package/shared/resize-observer.mjs +1 -1
- package/shared/resize-observer.mjs.map +1 -1
- package/shared/utils/Observable.js +1 -1
- package/shared/utils/Observable.js.map +1 -1
- package/shared/utils/Observable.mjs +1 -1
- package/shared/utils/Observable.mjs.map +1 -1
- package/shared/utils/colors.js +1 -1
- package/shared/utils/colors.js.map +1 -1
- package/shared/utils/colors.mjs +1 -1
- package/shared/utils/colors.mjs.map +1 -1
- package/shared/utils/createPolymorphicComponentWithRef.js +2 -0
- package/shared/utils/createPolymorphicComponentWithRef.js.map +1 -0
- package/shared/utils/createPolymorphicComponentWithRef.mjs +2 -0
- package/shared/utils/createPolymorphicComponentWithRef.mjs.map +1 -0
- package/shared/utils/dom.js +1 -1
- package/shared/utils/dom.js.map +1 -1
- package/shared/utils/dom.mjs +1 -1
- package/shared/utils/dom.mjs.map +1 -1
- package/shared/utils/getDomTargets.js +1 -1
- package/shared/utils/getDomTargets.js.map +1 -1
- package/shared/utils/getDomTargets.mjs +1 -1
- package/shared/utils/getDomTargets.mjs.map +1 -1
- package/shared/utils/getProgressPercent.js.map +1 -1
- package/shared/utils/getProgressPercent.mjs.map +1 -1
- package/shared/utils/misc.js +1 -1
- package/shared/utils/misc.js.map +1 -1
- package/shared/utils/misc.mjs +1 -1
- package/shared/utils/misc.mjs.map +1 -1
- package/shared/utils/react.js +1 -1
- package/shared/utils/react.js.map +1 -1
- package/shared/utils/react.mjs +1 -1
- package/shared/utils/react.mjs.map +1 -1
- package/shared/utils/style.js +1 -1
- package/shared/utils/style.js.map +1 -1
- package/shared/utils/style.mjs +1 -1
- package/shared/utils/style.mjs.map +1 -1
- package/theme/global-styled.js +1 -1
- package/theme/global-styled.js.map +1 -1
- package/theme/global-styled.mjs +1 -1
- package/theme/global-styled.mjs.map +1 -1
- package/theme/theme-provider.js +1 -1
- package/theme/theme-provider.js.map +1 -1
- package/theme/theme-provider.mjs +1 -1
- package/theme/theme-provider.mjs.map +1 -1
- package/components/Chip/constants.js +0 -2
- package/components/Chip/constants.js.map +0 -1
- package/components/Chip/constants.mjs +0 -2
- package/components/Chip/constants.mjs.map +0 -1
- package/components/ListItem/constants.js +0 -2
- package/components/ListItem/constants.js.map +0 -1
- package/components/ListItem/constants.mjs +0 -2
- package/components/ListItem/constants.mjs.map +0 -1
- package/components/TooltipComponent/constants.js +0 -2
- package/components/TooltipComponent/constants.js.map +0 -1
- package/components/TooltipComponent/constants.mjs +0 -2
- package/components/TooltipComponent/constants.mjs.map +0 -1
- package/shared/utils/polymorphic.js +0 -2
- package/shared/utils/polymorphic.js.map +0 -1
- package/shared/utils/polymorphic.mjs +0 -2
- package/shared/utils/polymorphic.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../icon-pack/src/icons/WarningTriangleFill/index.tsx"],"sourcesContent":["import type { SVGProps, Ref } from 'react'\nimport { forwardRef } from 'react'\n\nexport const WarningTriangleFill = forwardRef((props: SVGProps<SVGSVGElement>, ref: Ref<SVGSVGElement>) => (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n viewBox='0 0 24 24'\n fill='currentcolor'\n width='1em'\n height='1em'\n ref={ref}\n {...props}\n >\n <path\n fillRule='evenodd'\n d='M13.135 2.995a2.75 2.75 0 0 0-2.27 0c-.494.224-.855.64-1.18 1.116-.322.473-.678 1.115-1.12 1.908l-4.598 8.278c-.419.753-.758 1.365-.98 1.867-.224.508-.38 1.014-.32 1.537a2.75 2.75 0 0 0 1.127 1.913c.427.308.946.417 1.498.468.547.05 1.246.05 2.109.05h9.198c.863 0 1.562 0 2.11-.05.551-.051 1.07-.16 1.497-.468a2.75 2.75 0 0 0 1.126-1.913c.061-.523-.095-1.03-.319-1.537-.222-.502-.561-1.114-.98-1.867l-4.599-8.278c-.44-.793-.797-1.435-1.12-1.908-.324-.476-.685-.892-1.179-1.116M13 9.382a1 1 0 1 0-2 0v4a1 1 0 1 0 2 0zm-1 6a1 1 0 0 0 0 2h.01a1 1 0 1 0 0-2z'\n clipRule='evenodd'\n />\n </svg>\n))\n"],"names":["forwardRef","props","ref","_jsx","xmlns","viewBox","fill","width","height","children","fillRule","d","clipRule"],"mappings":"gHAGmCA,MAAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../icon-pack/src/icons/WarningTriangleFill/index.tsx"],"sourcesContent":["import type { SVGProps, Ref } from 'react'\nimport { forwardRef } from 'react'\n\nexport const WarningTriangleFill = forwardRef((props: SVGProps<SVGSVGElement>, ref: Ref<SVGSVGElement>) => (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n viewBox='0 0 24 24'\n fill='currentcolor'\n width='1em'\n height='1em'\n ref={ref}\n {...props}\n >\n <path\n fillRule='evenodd'\n d='M13.135 2.995a2.75 2.75 0 0 0-2.27 0c-.494.224-.855.64-1.18 1.116-.322.473-.678 1.115-1.12 1.908l-4.598 8.278c-.419.753-.758 1.365-.98 1.867-.224.508-.38 1.014-.32 1.537a2.75 2.75 0 0 0 1.127 1.913c.427.308.946.417 1.498.468.547.05 1.246.05 2.109.05h9.198c.863 0 1.562 0 2.11-.05.551-.051 1.07-.16 1.497-.468a2.75 2.75 0 0 0 1.126-1.913c.061-.523-.095-1.03-.319-1.537-.222-.502-.561-1.114-.98-1.867l-4.599-8.278c-.44-.793-.797-1.435-1.12-1.908-.324-.476-.685-.892-1.179-1.116M13 9.382a1 1 0 1 0-2 0v4a1 1 0 1 0 2 0zm-1 6a1 1 0 0 0 0 2h.01a1 1 0 1 0 0-2z'\n clipRule='evenodd'\n />\n </svg>\n))\n"],"names":["forwardRef","props","ref","_jsx","xmlns","viewBox","fill","width","height","children","fillRule","d","clipRule"],"mappings":"gHAGmCA,MAAAA,WAAW,CAACC,EAAgCC,IAC7EC,WAAAA,IAAA,MAAA,CACEC,MAAM,6BACNC,QAAQ,YACRC,KAAK,eACLC,MAAM,MACNC,OAAO,MACPN,IAAKA,KACDD,EAAKQ,SAETN,WAAAA,IAAA,OAAA,CACEO,SAAS,UACTC,EAAE,4iBACFC,SAAS"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{forwardRef}from'react';import{jsx}from'react/jsx-runtime';const WarningTriangleFill=forwardRef((
|
|
1
|
+
import{forwardRef}from'react';import{jsx}from'react/jsx-runtime';const WarningTriangleFill=forwardRef((r,e)=>jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentcolor",width:"1em",height:"1em",ref:e,...r,children:jsx("path",{fillRule:"evenodd",d:"M13.135 2.995a2.75 2.75 0 0 0-2.27 0c-.494.224-.855.64-1.18 1.116-.322.473-.678 1.115-1.12 1.908l-4.598 8.278c-.419.753-.758 1.365-.98 1.867-.224.508-.38 1.014-.32 1.537a2.75 2.75 0 0 0 1.127 1.913c.427.308.946.417 1.498.468.547.05 1.246.05 2.109.05h9.198c.863 0 1.562 0 2.11-.05.551-.051 1.07-.16 1.497-.468a2.75 2.75 0 0 0 1.126-1.913c.061-.523-.095-1.03-.319-1.537-.222-.502-.561-1.114-.98-1.867l-4.599-8.278c-.44-.793-.797-1.435-1.12-1.908-.324-.476-.685-.892-1.179-1.116M13 9.382a1 1 0 1 0-2 0v4a1 1 0 1 0 2 0zm-1 6a1 1 0 0 0 0 2h.01a1 1 0 1 0 0-2z",clipRule:"evenodd"})}));export{WarningTriangleFill};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../icon-pack/src/icons/WarningTriangleFill/index.tsx"],"sourcesContent":["import type { SVGProps, Ref } from 'react'\nimport { forwardRef } from 'react'\n\nexport const WarningTriangleFill = forwardRef((props: SVGProps<SVGSVGElement>, ref: Ref<SVGSVGElement>) => (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n viewBox='0 0 24 24'\n fill='currentcolor'\n width='1em'\n height='1em'\n ref={ref}\n {...props}\n >\n <path\n fillRule='evenodd'\n d='M13.135 2.995a2.75 2.75 0 0 0-2.27 0c-.494.224-.855.64-1.18 1.116-.322.473-.678 1.115-1.12 1.908l-4.598 8.278c-.419.753-.758 1.365-.98 1.867-.224.508-.38 1.014-.32 1.537a2.75 2.75 0 0 0 1.127 1.913c.427.308.946.417 1.498.468.547.05 1.246.05 2.109.05h9.198c.863 0 1.562 0 2.11-.05.551-.051 1.07-.16 1.497-.468a2.75 2.75 0 0 0 1.126-1.913c.061-.523-.095-1.03-.319-1.537-.222-.502-.561-1.114-.98-1.867l-4.599-8.278c-.44-.793-.797-1.435-1.12-1.908-.324-.476-.685-.892-1.179-1.116M13 9.382a1 1 0 1 0-2 0v4a1 1 0 1 0 2 0zm-1 6a1 1 0 0 0 0 2h.01a1 1 0 1 0 0-2z'\n clipRule='evenodd'\n />\n </svg>\n))\n"],"names":["WarningTriangleFill","forwardRef","props","ref","_jsx","xmlns","viewBox","fill","width","height","children","fillRule","d","clipRule"],"mappings":"iEAGO,MAAMA,oBAAsBC,
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../../icon-pack/src/icons/WarningTriangleFill/index.tsx"],"sourcesContent":["import type { SVGProps, Ref } from 'react'\nimport { forwardRef } from 'react'\n\nexport const WarningTriangleFill = forwardRef((props: SVGProps<SVGSVGElement>, ref: Ref<SVGSVGElement>) => (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n viewBox='0 0 24 24'\n fill='currentcolor'\n width='1em'\n height='1em'\n ref={ref}\n {...props}\n >\n <path\n fillRule='evenodd'\n d='M13.135 2.995a2.75 2.75 0 0 0-2.27 0c-.494.224-.855.64-1.18 1.116-.322.473-.678 1.115-1.12 1.908l-4.598 8.278c-.419.753-.758 1.365-.98 1.867-.224.508-.38 1.014-.32 1.537a2.75 2.75 0 0 0 1.127 1.913c.427.308.946.417 1.498.468.547.05 1.246.05 2.109.05h9.198c.863 0 1.562 0 2.11-.05.551-.051 1.07-.16 1.497-.468a2.75 2.75 0 0 0 1.126-1.913c.061-.523-.095-1.03-.319-1.537-.222-.502-.561-1.114-.98-1.867l-4.599-8.278c-.44-.793-.797-1.435-1.12-1.908-.324-.476-.685-.892-1.179-1.116M13 9.382a1 1 0 1 0-2 0v4a1 1 0 1 0 2 0zm-1 6a1 1 0 0 0 0 2h.01a1 1 0 1 0 0-2z'\n clipRule='evenodd'\n />\n </svg>\n))\n"],"names":["WarningTriangleFill","forwardRef","props","ref","_jsx","xmlns","viewBox","fill","width","height","children","fillRule","d","clipRule"],"mappings":"iEAGO,MAAMA,oBAAsBC,WAAW,CAACC,EAAgCC,IAC7EC,IAAA,MAAA,CACEC,MAAM,6BACNC,QAAQ,YACRC,KAAK,eACLC,MAAM,MACNC,OAAO,MACPN,IAAKA,KACDD,EAAKQ,SAETN,IAAA,OAAA,CACEO,SAAS,UACTC,EAAE,4iBACFC,SAAS"}
|
package/mixins/color.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.js","sources":["../../../src/mixins/color.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { DefaultTheme, FlattenSimpleInterpolation } from 'styled-components'\nimport type { CSSColor, Color } from 'shared/types'\n\ntype ColorPropertyVariants = 'color' | 'fontColor' | `${string}Color` | `color${string}`\ntype ColorCalcProperty = (_color: CSSColor) => FlattenSimpleInterpolation | null\ntype ColorCssProperty = string | ColorCalcProperty\n\nexport type ColorProperty<T extends ColorPropertyVariants = 'color'> = Partial<Record<T, Color>>\n\nexport const getColor = (color: Color, props: { theme: DefaultTheme }) => {\n if (typeof color === 'string' && (color.includes('#') || color.includes('rgb'))) return color\n\n if (props.theme.colors[color as keyof typeof props.theme.colors]) {\n return props.theme.colors[color as keyof typeof props.theme.colors]\n }\n\n return color\n}\n\nexport const color =\n (name?: Color | string, cssProperty: ColorCssProperty = 'color') =>\n () =>\n (props: { theme: DefaultTheme }) => {\n const colorVal = name || props?.theme?.textColor || props?.theme?.fallbackColor\n const _color = getColor(colorVal as Color, props)\n\n if (typeof cssProperty === 'function') {\n return cssProperty(_color as CSSColor)\n }\n\n return css`\n ${cssProperty}: ${_color};\n `\n }\n"],"names":["getColor","color","props","includes","theme","colors","name","cssProperty","_color","textColor","fallbackColor","css"],"mappings":"2DAUaA,SAAWA,CAACC,EAAcC,WAC1BD,GAAU,WAAaA,EAAME,SAAS,MAAQF,EAAME,SAAS,QAAgBF,EAEpFC,EAAME,MAAMC,OAAOJ,GACdC,EAAME,MAAMC,OAAOJ,GAGrBA,gBAIPA,CAACK,EAAuBC,EAAgC,UACxD,IACCL,IAEC,MAAMM,EAASR,SADEM,GAAQJ,GAAOE,OAAOK,WAAaP,GAAOE,OAAOM,cACvBR,GAE3C,cAAWK,GAAgB,WAClBA,EAAYC,GAGdG,OAAAA,IAAG,CAAA,GAAA,IAAA,KACNJ,EAAgBC
|
|
1
|
+
{"version":3,"file":"color.js","sources":["../../../src/mixins/color.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { DefaultTheme, FlattenSimpleInterpolation } from 'styled-components'\nimport type { CSSColor, Color } from 'shared/types'\n\ntype ColorPropertyVariants = 'color' | 'fontColor' | `${string}Color` | `color${string}`\ntype ColorCalcProperty = (_color: CSSColor) => FlattenSimpleInterpolation | null\ntype ColorCssProperty = string | ColorCalcProperty\n\nexport type ColorProperty<T extends ColorPropertyVariants = 'color'> = Partial<Record<T, Color>>\n\nexport const getColor = (color: Color, props: { theme: DefaultTheme }) => {\n if (typeof color === 'string' && (color.includes('#') || color.includes('rgb'))) return color\n\n if (props.theme.colors[color as keyof typeof props.theme.colors]) {\n return props.theme.colors[color as keyof typeof props.theme.colors]\n }\n\n return color\n}\n\nexport const color =\n (name?: Color | string, cssProperty: ColorCssProperty = 'color') =>\n () =>\n (props: { theme: DefaultTheme }) => {\n const colorVal = name || props?.theme?.textColor || props?.theme?.fallbackColor\n const _color = getColor(colorVal as Color, props)\n\n if (typeof cssProperty === 'function') {\n return cssProperty(_color as CSSColor)\n }\n\n return css`\n ${cssProperty}: ${_color};\n `\n }\n"],"names":["getColor","color","props","includes","theme","colors","name","cssProperty","_color","textColor","fallbackColor","css"],"mappings":"2DAUaA,SAAWA,CAACC,EAAcC,WAC1BD,GAAU,WAAaA,EAAME,SAAS,MAAQF,EAAME,SAAS,QAAgBF,EAEpFC,EAAME,MAAMC,OAAOJ,GACdC,EAAME,MAAMC,OAAOJ,GAGrBA,gBAIPA,CAACK,EAAuBC,EAAgC,UACxD,IACCL,IAEC,MAAMM,EAASR,SADEM,GAAQJ,GAAOE,OAAOK,WAAaP,GAAOE,OAAOM,cACvBR,GAE3C,cAAWK,GAAgB,WAClBA,EAAYC,GAGdG,OAAAA,IAAG,CAAA,GAAA,IAAA,KACNJ,EAAgBC"}
|
package/mixins/color.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.mjs","sources":["../../../src/mixins/color.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { DefaultTheme, FlattenSimpleInterpolation } from 'styled-components'\nimport type { CSSColor, Color } from 'shared/types'\n\ntype ColorPropertyVariants = 'color' | 'fontColor' | `${string}Color` | `color${string}`\ntype ColorCalcProperty = (_color: CSSColor) => FlattenSimpleInterpolation | null\ntype ColorCssProperty = string | ColorCalcProperty\n\nexport type ColorProperty<T extends ColorPropertyVariants = 'color'> = Partial<Record<T, Color>>\n\nexport const getColor = (color: Color, props: { theme: DefaultTheme }) => {\n if (typeof color === 'string' && (color.includes('#') || color.includes('rgb'))) return color\n\n if (props.theme.colors[color as keyof typeof props.theme.colors]) {\n return props.theme.colors[color as keyof typeof props.theme.colors]\n }\n\n return color\n}\n\nexport const color =\n (name?: Color | string, cssProperty: ColorCssProperty = 'color') =>\n () =>\n (props: { theme: DefaultTheme }) => {\n const colorVal = name || props?.theme?.textColor || props?.theme?.fallbackColor\n const _color = getColor(colorVal as Color, props)\n\n if (typeof cssProperty === 'function') {\n return cssProperty(_color as CSSColor)\n }\n\n return css`\n ${cssProperty}: ${_color};\n `\n }\n"],"names":["getColor","color","props","includes","theme","colors","name","cssProperty","_color","textColor","fallbackColor","css"],"mappings":"yCAUaA,SAAWA,CAACC,EAAcC,WAC1BD,GAAU,WAAaA,EAAME,SAAS,MAAQF,EAAME,SAAS,QAAgBF,EAEpFC,EAAME,MAAMC,OAAOJ,GACdC,EAAME,MAAMC,OAAOJ,GAGrBA,EAGF,MAAMA,MACXA,CAACK,EAAuBC,EAAgC,UACxD,IACCL,IAEC,MAAMM,EAASR,SADEM,GAAQJ,GAAOE,OAAOK,WAAaP,GAAOE,OAAOM,cACvBR,GAE3C,cAAWK,GAAgB,WAClBA,EAAYC,GAGdG,IAAG,CAAA,GAAA,IAAA,KACNJ,EAAgBC
|
|
1
|
+
{"version":3,"file":"color.mjs","sources":["../../../src/mixins/color.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { DefaultTheme, FlattenSimpleInterpolation } from 'styled-components'\nimport type { CSSColor, Color } from 'shared/types'\n\ntype ColorPropertyVariants = 'color' | 'fontColor' | `${string}Color` | `color${string}`\ntype ColorCalcProperty = (_color: CSSColor) => FlattenSimpleInterpolation | null\ntype ColorCssProperty = string | ColorCalcProperty\n\nexport type ColorProperty<T extends ColorPropertyVariants = 'color'> = Partial<Record<T, Color>>\n\nexport const getColor = (color: Color, props: { theme: DefaultTheme }) => {\n if (typeof color === 'string' && (color.includes('#') || color.includes('rgb'))) return color\n\n if (props.theme.colors[color as keyof typeof props.theme.colors]) {\n return props.theme.colors[color as keyof typeof props.theme.colors]\n }\n\n return color\n}\n\nexport const color =\n (name?: Color | string, cssProperty: ColorCssProperty = 'color') =>\n () =>\n (props: { theme: DefaultTheme }) => {\n const colorVal = name || props?.theme?.textColor || props?.theme?.fallbackColor\n const _color = getColor(colorVal as Color, props)\n\n if (typeof cssProperty === 'function') {\n return cssProperty(_color as CSSColor)\n }\n\n return css`\n ${cssProperty}: ${_color};\n `\n }\n"],"names":["getColor","color","props","includes","theme","colors","name","cssProperty","_color","textColor","fallbackColor","css"],"mappings":"yCAUaA,SAAWA,CAACC,EAAcC,WAC1BD,GAAU,WAAaA,EAAME,SAAS,MAAQF,EAAME,SAAS,QAAgBF,EAEpFC,EAAME,MAAMC,OAAOJ,GACdC,EAAME,MAAMC,OAAOJ,GAGrBA,EAGF,MAAMA,MACXA,CAACK,EAAuBC,EAAgC,UACxD,IACCL,IAEC,MAAMM,EAASR,SADEM,GAAQJ,GAAOE,OAAOK,WAAaP,GAAOE,OAAOM,cACvBR,GAE3C,cAAWK,GAAgB,WAClBA,EAAYC,GAGdG,IAAG,CAAA,GAAA,IAAA,KACNJ,EAAgBC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var styled=require('styled-components');var screen=require('./screen.js');var shared=require('./shared.js');exports.createResponsivePropsMixin=(e,s)=>{const r=new RegExp(`^(${e.join('|')})$`);const n=new RegExp(`^(${e.join('|')})(XXS|XS|S|M|L|XL)$`);const c=/(XXS|XS|S|M|L|XL)$/;const t=[screen.screenMinM,screen.screenMaxM,screen.screenMaxS];const o=[screen.screenMinL,screen.screenMaxL,screen.screenMaxM,screen.screenMaxS,screen.screenMaxXs,screen.screenMaxXxs];return e=>{const a=Object.keys(e).reduce((
|
|
1
|
+
'use strict';var styled=require('styled-components');var screen=require('./screen.js');var shared=require('./shared.js');exports.createResponsivePropsMixin=(e,s)=>{const r=new RegExp(`^(${e.join('|')})$`);const n=new RegExp(`^(${e.join('|')})(XXS|XS|S|M|L|XL)$`);const c=/(XXS|XS|S|M|L|XL)$/;const t=[screen.screenMinM,screen.screenMaxM,screen.screenMaxS];const o=[screen.screenMinL,screen.screenMaxL,screen.screenMaxM,screen.screenMaxS,screen.screenMaxXs,screen.screenMaxXxs];return e=>{const a=Object.keys(e).reduce((e,s)=>(r.test(s)?e[0].push(s):n.test(s)&&e[1].push(s),e),[[],[]]);const u=a[0].reduce((r,n)=>{const c=e[n];if(Array.isArray(c)){if(c.length>0){const a=[];const u=c.length>t.length?o:t;for(let r=0;r<c.length&&u[r];r++){const t=s(n,c[r],e);Object.keys(t).length>0&&a.push(u[r]()`${t}`)}r.push(...a)}}else{const t=s(n,c,e);Object.keys(t).length>0&&r.push(t)}return r},[]);const h=a[1].sort(shared.desktopFirst).reduce((r,n)=>{const t=s(n.replace(c,''),e[n],e);return Object.keys(t).length>0&&r.push(shared.getMediaQueryByResponsiveProp(n)()`${t}`),r},[]);return styled.css([""," ",""],u,h)}};
|
|
2
2
|
//# sourceMappingURL=create-responsive-props.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-responsive-props.js","sources":["../../../src/mixins/create-responsive-props.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { ThemedStyledProps, DefaultTheme, CSSObject, FlattenInterpolation, ThemeProps } from 'styled-components'\nimport { screenMinM, screenMaxM, screenMaxS, screenMinL, screenMaxL, screenMaxXs, screenMaxXxs } from 'mixins/screen'\nimport { getMediaQueryByResponsiveProp, desktopFirst } from 'mixins/shared'\nimport type { MediaQuery } from 'mixins/screen'\nimport type { ResponsivePropKey } from 'shared/types'\nimport type { ResponsiveProps } from 'shared/interfaces'\n\ntype MediaFunction = ReturnType<ReturnType<MediaQuery>>\n\n/**\n *\n * Factory to create mixins to enable responsive interface for any set of props\n */\nfunction createResponsivePropsMixin<K extends ResponsivePropKey, V, P extends ResponsiveProps<K, V>>(\n propsNames: K[],\n buildCSSObject: (propKey: K, propValue: V, props: ThemedStyledProps<P, DefaultTheme>) => CSSObject\n): (props: ThemedStyledProps<P, DefaultTheme>) => FlattenInterpolation<ThemeProps<DefaultTheme>> {\n const propsRegExp = new RegExp(`^(${propsNames.join('|')})$`)\n const breakpointsPropsRegExp = new RegExp(`^(${propsNames.join('|')})(XXS|XS|S|M|L|XL)$`)\n const breakpointsRegExp = /(XXS|XS|S|M|L|XL)$/\n\n const deviceQueries = [screenMinM, screenMaxM, screenMaxS]\n const breakpointsQueries = [screenMinL, screenMaxL, screenMaxM, screenMaxS, screenMaxXs, screenMaxXxs]\n\n return (props) => {\n const propsKeys = Object.keys(props).reduce(\n (groups, propKey) => {\n if (propsRegExp.test(propKey)) groups[0].push(propKey)\n else if (breakpointsPropsRegExp.test(propKey)) groups[1].push(propKey)\n\n return groups\n },\n [[], []] as [string[], string[]]\n )\n\n const interpolations = propsKeys[0].reduce(\n (acc, propKey) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const propValue: V | V[] = props[propKey]\n\n if (!Array.isArray(propValue)) {\n const cssObject = buildCSSObject(propKey as K, propValue, props)\n\n if (Object.keys(cssObject).length > 0) {\n acc.push(cssObject)\n }\n } else if (propValue.length > 0) {\n const mediaFunctions: MediaFunction[] = []\n const queries = propValue.length > deviceQueries.length ? breakpointsQueries : deviceQueries\n\n for (let i = 0; i < propValue.length; i++) {\n if (!queries[i]) break\n\n const cssObject = buildCSSObject(propKey as K, propValue[i], props)\n\n if (Object.keys(cssObject).length > 0) {\n mediaFunctions.push(queries[i]()`${cssObject}`)\n }\n }\n\n acc.push(...mediaFunctions)\n }\n\n return acc\n },\n [] as (CSSObject | MediaFunction)[]\n )\n\n const breakpointsInterpolations = propsKeys[1].sort(desktopFirst).reduce((acc, propKey) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const cssObject = buildCSSObject(propKey.replace(breakpointsRegExp, '') as K, props[propKey], props)\n\n if (Object.keys(cssObject).length > 0) {\n acc.push(getMediaQueryByResponsiveProp(propKey)()`${cssObject}`)\n }\n\n return acc\n }, [] as MediaFunction[])\n\n return css`\n ${interpolations}\n ${breakpointsInterpolations}\n `\n }\n}\n\nexport type { ResponsiveProps }\n\nexport { createResponsivePropsMixin }\n"],"names":["propsNames","buildCSSObject","propsRegExp","RegExp","join","breakpointsPropsRegExp","breakpointsRegExp","deviceQueries","screenMinM","screenMaxM","screenMaxS","breakpointsQueries","screenMinL","screenMaxL","screenMaxXs","screenMaxXxs","props","propsKeys","Object","keys","reduce","groups","propKey","test","push","interpolations","acc","propValue","Array","isArray","length","mediaFunctions","queries","i","cssObject","breakpointsInterpolations","sort","desktopFirst","replace","getMediaQueryByResponsiveProp","css"],"mappings":"4JAcA,CACEA,EACAC,KAEA,MAAMC,EAAc,IAAIC,OAAO,KAAKH,EAAWI,KAAK,UACpD,MAAMC,EAAyB,IAAIF,OAAO,KAAKH,EAAWI,KAAK,2BAC/D,MAAME,EAAoB,qBAE1B,MAAMC,EAAgB,CAACC,kBAAYC,OAAAA,WAAYC,OAAAA,YAC/C,MAAMC,EAAqB,CAACC,kBAAYC,OAAAA,WAAYJ,OAAAA,WAAYC,OAAAA,WAAYI,OAAAA,YAAaC,qBAEzF,OAAQC,IACN,MAAMC,EAAYC,OAAOC,KAAKH,GAAOI,
|
|
1
|
+
{"version":3,"file":"create-responsive-props.js","sources":["../../../src/mixins/create-responsive-props.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { ThemedStyledProps, DefaultTheme, CSSObject, FlattenInterpolation, ThemeProps } from 'styled-components'\nimport { screenMinM, screenMaxM, screenMaxS, screenMinL, screenMaxL, screenMaxXs, screenMaxXxs } from 'mixins/screen'\nimport { getMediaQueryByResponsiveProp, desktopFirst } from 'mixins/shared'\nimport type { MediaQuery } from 'mixins/screen'\nimport type { ResponsivePropKey } from 'shared/types'\nimport type { ResponsiveProps } from 'shared/interfaces'\n\ntype MediaFunction = ReturnType<ReturnType<MediaQuery>>\n\n/**\n *\n * Factory to create mixins to enable responsive interface for any set of props\n */\nfunction createResponsivePropsMixin<K extends ResponsivePropKey, V, P extends ResponsiveProps<K, V>>(\n propsNames: K[],\n buildCSSObject: (propKey: K, propValue: V, props: ThemedStyledProps<P, DefaultTheme>) => CSSObject\n): (props: ThemedStyledProps<P, DefaultTheme>) => FlattenInterpolation<ThemeProps<DefaultTheme>> {\n const propsRegExp = new RegExp(`^(${propsNames.join('|')})$`)\n const breakpointsPropsRegExp = new RegExp(`^(${propsNames.join('|')})(XXS|XS|S|M|L|XL)$`)\n const breakpointsRegExp = /(XXS|XS|S|M|L|XL)$/\n\n const deviceQueries = [screenMinM, screenMaxM, screenMaxS]\n const breakpointsQueries = [screenMinL, screenMaxL, screenMaxM, screenMaxS, screenMaxXs, screenMaxXxs]\n\n return (props) => {\n const propsKeys = Object.keys(props).reduce(\n (groups, propKey) => {\n if (propsRegExp.test(propKey)) groups[0].push(propKey)\n else if (breakpointsPropsRegExp.test(propKey)) groups[1].push(propKey)\n\n return groups\n },\n [[], []] as [string[], string[]]\n )\n\n const interpolations = propsKeys[0].reduce(\n (acc, propKey) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const propValue: V | V[] = props[propKey]\n\n if (!Array.isArray(propValue)) {\n const cssObject = buildCSSObject(propKey as K, propValue, props)\n\n if (Object.keys(cssObject).length > 0) {\n acc.push(cssObject)\n }\n } else if (propValue.length > 0) {\n const mediaFunctions: MediaFunction[] = []\n const queries = propValue.length > deviceQueries.length ? breakpointsQueries : deviceQueries\n\n for (let i = 0; i < propValue.length; i++) {\n if (!queries[i]) break\n\n const cssObject = buildCSSObject(propKey as K, propValue[i], props)\n\n if (Object.keys(cssObject).length > 0) {\n mediaFunctions.push(queries[i]()`${cssObject}`)\n }\n }\n\n acc.push(...mediaFunctions)\n }\n\n return acc\n },\n [] as (CSSObject | MediaFunction)[]\n )\n\n const breakpointsInterpolations = propsKeys[1].sort(desktopFirst).reduce((acc, propKey) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const cssObject = buildCSSObject(propKey.replace(breakpointsRegExp, '') as K, props[propKey], props)\n\n if (Object.keys(cssObject).length > 0) {\n acc.push(getMediaQueryByResponsiveProp(propKey)()`${cssObject}`)\n }\n\n return acc\n }, [] as MediaFunction[])\n\n return css`\n ${interpolations}\n ${breakpointsInterpolations}\n `\n }\n}\n\nexport type { ResponsiveProps }\n\nexport { createResponsivePropsMixin }\n"],"names":["propsNames","buildCSSObject","propsRegExp","RegExp","join","breakpointsPropsRegExp","breakpointsRegExp","deviceQueries","screenMinM","screenMaxM","screenMaxS","breakpointsQueries","screenMinL","screenMaxL","screenMaxXs","screenMaxXxs","props","propsKeys","Object","keys","reduce","groups","propKey","test","push","interpolations","acc","propValue","Array","isArray","length","mediaFunctions","queries","i","cssObject","breakpointsInterpolations","sort","desktopFirst","replace","getMediaQueryByResponsiveProp","css"],"mappings":"4JAcA,CACEA,EACAC,KAEA,MAAMC,EAAc,IAAIC,OAAO,KAAKH,EAAWI,KAAK,UACpD,MAAMC,EAAyB,IAAIF,OAAO,KAAKH,EAAWI,KAAK,2BAC/D,MAAME,EAAoB,qBAE1B,MAAMC,EAAgB,CAACC,kBAAYC,OAAAA,WAAYC,OAAAA,YAC/C,MAAMC,EAAqB,CAACC,kBAAYC,OAAAA,WAAYJ,OAAAA,WAAYC,OAAAA,WAAYI,OAAAA,YAAaC,qBAEzF,OAAQC,IACN,MAAMC,EAAYC,OAAOC,KAAKH,GAAOI,OACnC,CAACC,EAAQC,KACHpB,EAAYqB,KAAKD,GAAUD,EAAO,GAAGG,KAAKF,GACrCjB,EAAuBkB,KAAKD,IAAUD,EAAO,GAAGG,KAAKF,GAEvDD,GAET,CAAC,GAAI,KAGP,MAAMI,EAAiBR,EAAU,GAAGG,OAClC,CAACM,EAAKJ,KAGJ,MAAMK,EAAqBX,EAAMM,GAEjC,GAAKM,MAAMC,QAAQF,IAMZ,GAAIA,EAAUG,OAAS,EAAG,CAC/B,MAAMC,EAAkC,GACxC,MAAMC,EAAUL,EAAUG,OAASvB,EAAcuB,OAASnB,EAAqBJ,EAE/E,IAAK,IAAI0B,EAAI,EAAGA,EAAIN,EAAUG,QACvBE,EAAQC,GADuBA,IAAK,CAGzC,MAAMC,EAAYjC,EAAeqB,EAAcK,EAAUM,GAAIjB,GAEzDE,OAAOC,KAAKe,GAAWJ,OAAS,GAClCC,EAAeP,KAAKQ,EAAQC,IAAI,GAAGC,IAEvC,CAEAR,EAAIF,QAAQO,EACd,MArB+B,CAC7B,MAAMG,EAAYjC,EAAeqB,EAAcK,EAAWX,GAEtDE,OAAOC,KAAKe,GAAWJ,OAAS,GAClCJ,EAAIF,KAAKU,EAEb,CAiBA,OAAOR,GAET,IAGF,MAAMS,EAA4BlB,EAAU,GAAGmB,KAAKC,OAAAA,cAAcjB,OAAO,CAACM,EAAKJ,KAG7E,MAAMY,EAAYjC,EAAeqB,EAAQgB,QAAQhC,EAAmB,IAAUU,EAAMM,GAAUN,GAM9F,OAJIE,OAAOC,KAAKe,GAAWJ,OAAS,GAClCJ,EAAIF,KAAKe,qCAA8BjB,EAA9BiB,EAAwC,GAAGL,KAG/CR,GACN,IAEH,OAAOc,OAAAA,IAAG,CAAA,GAAA,IAAA,IACNf,EACAU,GAGR"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{css}from'styled-components';import{screenMinM,screenMaxM,screenMaxS,screenMinL,screenMaxL,screenMaxXs,screenMaxXxs}from'./screen.mjs';import{desktopFirst,getMediaQueryByResponsiveProp}from'./shared.mjs';function createResponsivePropsMixin(e,s){const n=new RegExp(`^(${e.join('|')})$`);const r=new RegExp(`^(${e.join('|')})(XXS|XS|S|M|L|XL)$`);const t=/(XXS|XS|S|M|L|XL)$/;const c=[screenMinM,screenMaxM,screenMaxS];const o=[screenMinL,screenMaxL,screenMaxM,screenMaxS,screenMaxXs,screenMaxXxs];return e=>{const M=Object.keys(e).reduce((
|
|
1
|
+
import{css}from'styled-components';import{screenMinM,screenMaxM,screenMaxS,screenMinL,screenMaxL,screenMaxXs,screenMaxXxs}from'./screen.mjs';import{desktopFirst,getMediaQueryByResponsiveProp}from'./shared.mjs';function createResponsivePropsMixin(e,s){const n=new RegExp(`^(${e.join('|')})$`);const r=new RegExp(`^(${e.join('|')})(XXS|XS|S|M|L|XL)$`);const t=/(XXS|XS|S|M|L|XL)$/;const c=[screenMinM,screenMaxM,screenMaxS];const o=[screenMinL,screenMaxL,screenMaxM,screenMaxS,screenMaxXs,screenMaxXxs];return e=>{const M=Object.keys(e).reduce((e,s)=>(n.test(s)?e[0].push(s):r.test(s)&&e[1].push(s),e),[[],[]]);const i=M[0].reduce((n,r)=>{const t=e[r];if(Array.isArray(t)){if(t.length>0){const M=[];const i=t.length>c.length?o:c;for(let n=0;n<t.length&&i[n];n++){const c=s(r,t[n],e);Object.keys(c).length>0&&M.push(i[n]()`${c}`)}n.push(...M)}}else{const c=s(r,t,e);Object.keys(c).length>0&&n.push(c)}return n},[]);const p=M[1].sort(desktopFirst).reduce((n,r)=>{const c=s(r.replace(t,''),e[r],e);return Object.keys(c).length>0&&n.push(getMediaQueryByResponsiveProp(r)()`${c}`),n},[]);return css([""," ",""],i,p)}}export{createResponsivePropsMixin};
|
|
2
2
|
//# sourceMappingURL=create-responsive-props.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-responsive-props.mjs","sources":["../../../src/mixins/create-responsive-props.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { ThemedStyledProps, DefaultTheme, CSSObject, FlattenInterpolation, ThemeProps } from 'styled-components'\nimport { screenMinM, screenMaxM, screenMaxS, screenMinL, screenMaxL, screenMaxXs, screenMaxXxs } from 'mixins/screen'\nimport { getMediaQueryByResponsiveProp, desktopFirst } from 'mixins/shared'\nimport type { MediaQuery } from 'mixins/screen'\nimport type { ResponsivePropKey } from 'shared/types'\nimport type { ResponsiveProps } from 'shared/interfaces'\n\ntype MediaFunction = ReturnType<ReturnType<MediaQuery>>\n\n/**\n *\n * Factory to create mixins to enable responsive interface for any set of props\n */\nfunction createResponsivePropsMixin<K extends ResponsivePropKey, V, P extends ResponsiveProps<K, V>>(\n propsNames: K[],\n buildCSSObject: (propKey: K, propValue: V, props: ThemedStyledProps<P, DefaultTheme>) => CSSObject\n): (props: ThemedStyledProps<P, DefaultTheme>) => FlattenInterpolation<ThemeProps<DefaultTheme>> {\n const propsRegExp = new RegExp(`^(${propsNames.join('|')})$`)\n const breakpointsPropsRegExp = new RegExp(`^(${propsNames.join('|')})(XXS|XS|S|M|L|XL)$`)\n const breakpointsRegExp = /(XXS|XS|S|M|L|XL)$/\n\n const deviceQueries = [screenMinM, screenMaxM, screenMaxS]\n const breakpointsQueries = [screenMinL, screenMaxL, screenMaxM, screenMaxS, screenMaxXs, screenMaxXxs]\n\n return (props) => {\n const propsKeys = Object.keys(props).reduce(\n (groups, propKey) => {\n if (propsRegExp.test(propKey)) groups[0].push(propKey)\n else if (breakpointsPropsRegExp.test(propKey)) groups[1].push(propKey)\n\n return groups\n },\n [[], []] as [string[], string[]]\n )\n\n const interpolations = propsKeys[0].reduce(\n (acc, propKey) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const propValue: V | V[] = props[propKey]\n\n if (!Array.isArray(propValue)) {\n const cssObject = buildCSSObject(propKey as K, propValue, props)\n\n if (Object.keys(cssObject).length > 0) {\n acc.push(cssObject)\n }\n } else if (propValue.length > 0) {\n const mediaFunctions: MediaFunction[] = []\n const queries = propValue.length > deviceQueries.length ? breakpointsQueries : deviceQueries\n\n for (let i = 0; i < propValue.length; i++) {\n if (!queries[i]) break\n\n const cssObject = buildCSSObject(propKey as K, propValue[i], props)\n\n if (Object.keys(cssObject).length > 0) {\n mediaFunctions.push(queries[i]()`${cssObject}`)\n }\n }\n\n acc.push(...mediaFunctions)\n }\n\n return acc\n },\n [] as (CSSObject | MediaFunction)[]\n )\n\n const breakpointsInterpolations = propsKeys[1].sort(desktopFirst).reduce((acc, propKey) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const cssObject = buildCSSObject(propKey.replace(breakpointsRegExp, '') as K, props[propKey], props)\n\n if (Object.keys(cssObject).length > 0) {\n acc.push(getMediaQueryByResponsiveProp(propKey)()`${cssObject}`)\n }\n\n return acc\n }, [] as MediaFunction[])\n\n return css`\n ${interpolations}\n ${breakpointsInterpolations}\n `\n }\n}\n\nexport type { ResponsiveProps }\n\nexport { createResponsivePropsMixin }\n"],"names":["createResponsivePropsMixin","propsNames","buildCSSObject","propsRegExp","RegExp","join","breakpointsPropsRegExp","breakpointsRegExp","deviceQueries","screenMinM","screenMaxM","screenMaxS","breakpointsQueries","screenMinL","screenMaxL","screenMaxXs","screenMaxXxs","props","propsKeys","Object","keys","reduce","groups","propKey","test","push","interpolations","acc","propValue","Array","isArray","length","mediaFunctions","queries","i","cssObject","breakpointsInterpolations","sort","desktopFirst","replace","getMediaQueryByResponsiveProp","css"],"mappings":"kNAcA,SAASA,2BACPC,EACAC,GAEA,MAAMC,EAAc,IAAIC,OAAO,KAAKH,EAAWI,KAAK,UACpD,MAAMC,EAAyB,IAAIF,OAAO,KAAKH,EAAWI,KAAK,2BAC/D,MAAME,EAAoB,qBAE1B,MAAMC,EAAgB,CAACC,WAAYC,WAAYC,YAC/C,MAAMC,EAAqB,CAACC,WAAYC,WAAYJ,WAAYC,WAAYI,YAAaC,cAEzF,OAAQC,IACN,MAAMC,EAAYC,OAAOC,KAAKH,GAAOI,
|
|
1
|
+
{"version":3,"file":"create-responsive-props.mjs","sources":["../../../src/mixins/create-responsive-props.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { ThemedStyledProps, DefaultTheme, CSSObject, FlattenInterpolation, ThemeProps } from 'styled-components'\nimport { screenMinM, screenMaxM, screenMaxS, screenMinL, screenMaxL, screenMaxXs, screenMaxXxs } from 'mixins/screen'\nimport { getMediaQueryByResponsiveProp, desktopFirst } from 'mixins/shared'\nimport type { MediaQuery } from 'mixins/screen'\nimport type { ResponsivePropKey } from 'shared/types'\nimport type { ResponsiveProps } from 'shared/interfaces'\n\ntype MediaFunction = ReturnType<ReturnType<MediaQuery>>\n\n/**\n *\n * Factory to create mixins to enable responsive interface for any set of props\n */\nfunction createResponsivePropsMixin<K extends ResponsivePropKey, V, P extends ResponsiveProps<K, V>>(\n propsNames: K[],\n buildCSSObject: (propKey: K, propValue: V, props: ThemedStyledProps<P, DefaultTheme>) => CSSObject\n): (props: ThemedStyledProps<P, DefaultTheme>) => FlattenInterpolation<ThemeProps<DefaultTheme>> {\n const propsRegExp = new RegExp(`^(${propsNames.join('|')})$`)\n const breakpointsPropsRegExp = new RegExp(`^(${propsNames.join('|')})(XXS|XS|S|M|L|XL)$`)\n const breakpointsRegExp = /(XXS|XS|S|M|L|XL)$/\n\n const deviceQueries = [screenMinM, screenMaxM, screenMaxS]\n const breakpointsQueries = [screenMinL, screenMaxL, screenMaxM, screenMaxS, screenMaxXs, screenMaxXxs]\n\n return (props) => {\n const propsKeys = Object.keys(props).reduce(\n (groups, propKey) => {\n if (propsRegExp.test(propKey)) groups[0].push(propKey)\n else if (breakpointsPropsRegExp.test(propKey)) groups[1].push(propKey)\n\n return groups\n },\n [[], []] as [string[], string[]]\n )\n\n const interpolations = propsKeys[0].reduce(\n (acc, propKey) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const propValue: V | V[] = props[propKey]\n\n if (!Array.isArray(propValue)) {\n const cssObject = buildCSSObject(propKey as K, propValue, props)\n\n if (Object.keys(cssObject).length > 0) {\n acc.push(cssObject)\n }\n } else if (propValue.length > 0) {\n const mediaFunctions: MediaFunction[] = []\n const queries = propValue.length > deviceQueries.length ? breakpointsQueries : deviceQueries\n\n for (let i = 0; i < propValue.length; i++) {\n if (!queries[i]) break\n\n const cssObject = buildCSSObject(propKey as K, propValue[i], props)\n\n if (Object.keys(cssObject).length > 0) {\n mediaFunctions.push(queries[i]()`${cssObject}`)\n }\n }\n\n acc.push(...mediaFunctions)\n }\n\n return acc\n },\n [] as (CSSObject | MediaFunction)[]\n )\n\n const breakpointsInterpolations = propsKeys[1].sort(desktopFirst).reduce((acc, propKey) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const cssObject = buildCSSObject(propKey.replace(breakpointsRegExp, '') as K, props[propKey], props)\n\n if (Object.keys(cssObject).length > 0) {\n acc.push(getMediaQueryByResponsiveProp(propKey)()`${cssObject}`)\n }\n\n return acc\n }, [] as MediaFunction[])\n\n return css`\n ${interpolations}\n ${breakpointsInterpolations}\n `\n }\n}\n\nexport type { ResponsiveProps }\n\nexport { createResponsivePropsMixin }\n"],"names":["createResponsivePropsMixin","propsNames","buildCSSObject","propsRegExp","RegExp","join","breakpointsPropsRegExp","breakpointsRegExp","deviceQueries","screenMinM","screenMaxM","screenMaxS","breakpointsQueries","screenMinL","screenMaxL","screenMaxXs","screenMaxXxs","props","propsKeys","Object","keys","reduce","groups","propKey","test","push","interpolations","acc","propValue","Array","isArray","length","mediaFunctions","queries","i","cssObject","breakpointsInterpolations","sort","desktopFirst","replace","getMediaQueryByResponsiveProp","css"],"mappings":"kNAcA,SAASA,2BACPC,EACAC,GAEA,MAAMC,EAAc,IAAIC,OAAO,KAAKH,EAAWI,KAAK,UACpD,MAAMC,EAAyB,IAAIF,OAAO,KAAKH,EAAWI,KAAK,2BAC/D,MAAME,EAAoB,qBAE1B,MAAMC,EAAgB,CAACC,WAAYC,WAAYC,YAC/C,MAAMC,EAAqB,CAACC,WAAYC,WAAYJ,WAAYC,WAAYI,YAAaC,cAEzF,OAAQC,IACN,MAAMC,EAAYC,OAAOC,KAAKH,GAAOI,OACnC,CAACC,EAAQC,KACHpB,EAAYqB,KAAKD,GAAUD,EAAO,GAAGG,KAAKF,GACrCjB,EAAuBkB,KAAKD,IAAUD,EAAO,GAAGG,KAAKF,GAEvDD,GAET,CAAC,GAAI,KAGP,MAAMI,EAAiBR,EAAU,GAAGG,OAClC,CAACM,EAAKJ,KAGJ,MAAMK,EAAqBX,EAAMM,GAEjC,GAAKM,MAAMC,QAAQF,IAMZ,GAAIA,EAAUG,OAAS,EAAG,CAC/B,MAAMC,EAAkC,GACxC,MAAMC,EAAUL,EAAUG,OAASvB,EAAcuB,OAASnB,EAAqBJ,EAE/E,IAAK,IAAI0B,EAAI,EAAGA,EAAIN,EAAUG,QACvBE,EAAQC,GADuBA,IAAK,CAGzC,MAAMC,EAAYjC,EAAeqB,EAAcK,EAAUM,GAAIjB,GAEzDE,OAAOC,KAAKe,GAAWJ,OAAS,GAClCC,EAAeP,KAAKQ,EAAQC,IAAI,GAAGC,IAEvC,CAEAR,EAAIF,QAAQO,EACd,MArB+B,CAC7B,MAAMG,EAAYjC,EAAeqB,EAAcK,EAAWX,GAEtDE,OAAOC,KAAKe,GAAWJ,OAAS,GAClCJ,EAAIF,KAAKU,EAEb,CAiBA,OAAOR,GAET,IAGF,MAAMS,EAA4BlB,EAAU,GAAGmB,KAAKC,cAAcjB,OAAO,CAACM,EAAKJ,KAG7E,MAAMY,EAAYjC,EAAeqB,EAAQgB,QAAQhC,EAAmB,IAAUU,EAAMM,GAAUN,GAM9F,OAJIE,OAAOC,KAAKe,GAAWJ,OAAS,GAClCJ,EAAIF,KAAKe,8BAA8BjB,EAA9BiB,EAAwC,GAAGL,KAG/CR,GACN,IAEH,OAAOc,IAAG,CAAA,GAAA,IAAA,IACNf,EACAU,GAGR"}
|
package/mixins/focus.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';const focus=Object.assign(
|
|
1
|
+
'use strict';const focus=Object.assign(o=>`\n &:focus-visible {\n box-shadow: 0 0 0 2px ${o.theme.colors.white}, 0 0 0 4px ${o.theme.colors['border-focus']};\n outline: 2px solid transparent;\n outline-offset: 2px;\n }\n `,{padding:4});exports.focus=focus;
|
|
2
2
|
//# sourceMappingURL=focus.js.map
|
package/mixins/focus.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus.js","sources":["../../../src/mixins/focus.ts"],"sourcesContent":["import type { ThemeProps, DefaultTheme } from 'styled-components'\n\nconst focus = Object.assign<\n (props: ThemeProps<DefaultTheme>) => string,\n {\n readonly padding: number\n }\n>(\n (props) => `\n &:focus-visible {\n box-shadow: 0 0 0 2px ${props.theme.colors.white}, 0 0 0 4px ${props.theme.colors['border-focus']};\n outline: 2px solid transparent;\n outline-offset: 2px;\n }\n `,\n { padding: 4 }\n)\n\nexport { focus }\n"],"names":["focus","Object","assign","props","theme","colors","white","padding"],"mappings":"aAEA,MAAMA,MAAQC,OAAOC,
|
|
1
|
+
{"version":3,"file":"focus.js","sources":["../../../src/mixins/focus.ts"],"sourcesContent":["import type { ThemeProps, DefaultTheme } from 'styled-components'\n\nconst focus = Object.assign<\n (props: ThemeProps<DefaultTheme>) => string,\n {\n readonly padding: number\n }\n>(\n (props) => `\n &:focus-visible {\n box-shadow: 0 0 0 2px ${props.theme.colors.white}, 0 0 0 4px ${props.theme.colors['border-focus']};\n outline: 2px solid transparent;\n outline-offset: 2px;\n }\n `,\n { padding: 4 }\n)\n\nexport { focus }\n"],"names":["focus","Object","assign","props","theme","colors","white","padding"],"mappings":"aAEA,MAAMA,MAAQC,OAAOC,OAMlBC,GAAU,wDAEiBA,EAAMC,MAAMC,OAAOC,oBAAoBH,EAAMC,MAAMC,OAAO,iGAKtF,CAAEE,QAAS"}
|
package/mixins/focus.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const focus=Object.assign(
|
|
1
|
+
const focus=Object.assign(o=>`\n &:focus-visible {\n box-shadow: 0 0 0 2px ${o.theme.colors.white}, 0 0 0 4px ${o.theme.colors['border-focus']};\n outline: 2px solid transparent;\n outline-offset: 2px;\n }\n `,{padding:4});export{focus};
|
|
2
2
|
//# sourceMappingURL=focus.mjs.map
|
package/mixins/focus.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus.mjs","sources":["../../../src/mixins/focus.ts"],"sourcesContent":["import type { ThemeProps, DefaultTheme } from 'styled-components'\n\nconst focus = Object.assign<\n (props: ThemeProps<DefaultTheme>) => string,\n {\n readonly padding: number\n }\n>(\n (props) => `\n &:focus-visible {\n box-shadow: 0 0 0 2px ${props.theme.colors.white}, 0 0 0 4px ${props.theme.colors['border-focus']};\n outline: 2px solid transparent;\n outline-offset: 2px;\n }\n `,\n { padding: 4 }\n)\n\nexport { focus }\n"],"names":["focus","Object","assign","props","theme","colors","white","padding"],"mappings":"AAEA,MAAMA,MAAQC,OAAOC,
|
|
1
|
+
{"version":3,"file":"focus.mjs","sources":["../../../src/mixins/focus.ts"],"sourcesContent":["import type { ThemeProps, DefaultTheme } from 'styled-components'\n\nconst focus = Object.assign<\n (props: ThemeProps<DefaultTheme>) => string,\n {\n readonly padding: number\n }\n>(\n (props) => `\n &:focus-visible {\n box-shadow: 0 0 0 2px ${props.theme.colors.white}, 0 0 0 4px ${props.theme.colors['border-focus']};\n outline: 2px solid transparent;\n outline-offset: 2px;\n }\n `,\n { padding: 4 }\n)\n\nexport { focus }\n"],"names":["focus","Object","assign","props","theme","colors","white","padding"],"mappings":"AAEA,MAAMA,MAAQC,OAAOC,OAMlBC,GAAU,wDAEiBA,EAAMC,MAAMC,OAAOC,oBAAoBH,EAAMC,MAAMC,OAAO,iGAKtF,CAAEE,QAAS"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';const responsiveLayout=require('./create-responsive-props.js').createResponsivePropsMixin(['layout'],(
|
|
1
|
+
'use strict';const responsiveLayout=require('./create-responsive-props.js').createResponsivePropsMixin(['layout'],(e,s,o)=>s===void 0||s===null?{}:o.layouts[s]??{});exports.responsiveLayout=responsiveLayout;
|
|
2
2
|
//# sourceMappingURL=responsive-layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive-layout.js","sources":["../../../src/mixins/responsive-layout.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport type { ResponsiveLayoutInterpolationProps } from 'shared/interfaces'\nimport type { Nullable } from 'shared/types'\n\nconst responsiveLayout = createResponsivePropsMixin<'layout', Nullable<string>, ResponsiveLayoutInterpolationProps>(\n ['layout'],\n (_, layout, props) => {\n if (layout === undefined || layout === null) return {} as CSSObject\n\n return (props.layouts[layout] ?? {}) as CSSObject\n }\n)\n\nexport { responsiveLayout }\n"],"names":["responsiveLayout","createResponsivePropsMixin","_","layout","props","undefined","layouts"],"mappings":"aAKA,MAAMA,yDAAmBC,2BACvB,CAAC,
|
|
1
|
+
{"version":3,"file":"responsive-layout.js","sources":["../../../src/mixins/responsive-layout.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport type { ResponsiveLayoutInterpolationProps } from 'shared/interfaces'\nimport type { Nullable } from 'shared/types'\n\nconst responsiveLayout = createResponsivePropsMixin<'layout', Nullable<string>, ResponsiveLayoutInterpolationProps>(\n ['layout'],\n (_, layout, props) => {\n if (layout === undefined || layout === null) return {} as CSSObject\n\n return (props.layouts[layout] ?? {}) as CSSObject\n }\n)\n\nexport { responsiveLayout }\n"],"names":["responsiveLayout","createResponsivePropsMixin","_","layout","props","undefined","layouts"],"mappings":"aAKA,MAAMA,yDAAmBC,2BACvB,CAAC,UACD,CAACC,EAAGC,EAAQC,IACND,SAAWE,GAAaF,IAAW,KAAa,CAAA,EAE5CC,EAAME,QAAQH,IAAW,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createResponsivePropsMixin}from'./create-responsive-props.mjs';const responsiveLayout=createResponsivePropsMixin(['layout'],(
|
|
1
|
+
import{createResponsivePropsMixin}from'./create-responsive-props.mjs';const responsiveLayout=createResponsivePropsMixin(['layout'],(e,o,s)=>o===void 0||o===null?{}:s.layouts[o]??{});export{responsiveLayout};
|
|
2
2
|
//# sourceMappingURL=responsive-layout.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive-layout.mjs","sources":["../../../src/mixins/responsive-layout.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport type { ResponsiveLayoutInterpolationProps } from 'shared/interfaces'\nimport type { Nullable } from 'shared/types'\n\nconst responsiveLayout = createResponsivePropsMixin<'layout', Nullable<string>, ResponsiveLayoutInterpolationProps>(\n ['layout'],\n (_, layout, props) => {\n if (layout === undefined || layout === null) return {} as CSSObject\n\n return (props.layouts[layout] ?? {}) as CSSObject\n }\n)\n\nexport { responsiveLayout }\n"],"names":["responsiveLayout","createResponsivePropsMixin","_","layout","props","undefined","layouts"],"mappings":"sEAKA,MAAMA,iBAAmBC,2BACvB,CAAC,
|
|
1
|
+
{"version":3,"file":"responsive-layout.mjs","sources":["../../../src/mixins/responsive-layout.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport type { ResponsiveLayoutInterpolationProps } from 'shared/interfaces'\nimport type { Nullable } from 'shared/types'\n\nconst responsiveLayout = createResponsivePropsMixin<'layout', Nullable<string>, ResponsiveLayoutInterpolationProps>(\n ['layout'],\n (_, layout, props) => {\n if (layout === undefined || layout === null) return {} as CSSObject\n\n return (props.layouts[layout] ?? {}) as CSSObject\n }\n)\n\nexport { responsiveLayout }\n"],"names":["responsiveLayout","createResponsivePropsMixin","_","layout","props","undefined","layouts"],"mappings":"sEAKA,MAAMA,iBAAmBC,2BACvB,CAAC,UACD,CAACC,EAAGC,EAAQC,IACND,SAAWE,GAAaF,IAAW,KAAa,CAAA,EAE5CC,EAAME,QAAQH,IAAW,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var createResponsiveProps=require('./create-responsive-props.js');var shared=require('./shared.js');const responsiveMargin=createResponsiveProps.createResponsivePropsMixin(['margin','marginTop','marginRight','marginBottom','marginLeft'],(
|
|
1
|
+
'use strict';var createResponsiveProps=require('./create-responsive-props.js');var shared=require('./shared.js');const responsiveMargin=createResponsiveProps.createResponsivePropsMixin(['margin','marginTop','marginRight','marginBottom','marginLeft'],(e,r)=>r===void 0||r===null?{}:typeof r=='string'&&shared.SIZES_LATIN[r]?{[e]:`${shared.SIZES_LATIN[r]}px`}:{[e]:typeof r=='string'?r:`${r}px`});exports.responsiveMargin=responsiveMargin;
|
|
2
2
|
//# sourceMappingURL=responsive-margin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive-margin.js","sources":["../../../src/mixins/responsive-margin.ts"],"sourcesContent":["import { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport { SIZES_LATIN } from 'mixins/shared'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { CSSGlobalValue } from 'shared/types'\n\ntype MarginProperty = 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft'\n\ntype MarginValue = CSSGlobalValue | (string & {}) | number\n\ntype ResponsiveMarginProps = ResponsiveProps<MarginProperty, MarginValue>\n\n/**\n *\n * Mixin enables responsive margin interface\n */\nconst responsiveMargin = createResponsivePropsMixin<MarginProperty, MarginValue | void, ResponsiveMarginProps>(\n ['margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n (propKey, propValue) => {\n if (propValue === undefined || propValue === null) return {}\n\n if (typeof propValue === 'string' && SIZES_LATIN[propValue as keyof typeof SIZES_LATIN]) {\n return {\n [propKey]: `${SIZES_LATIN[propValue as keyof typeof SIZES_LATIN]}px`,\n }\n }\n\n return {\n [propKey]: typeof propValue === 'string' ? propValue : `${propValue}px`,\n }\n }\n)\n\nexport type { ResponsiveMarginProps }\n\nexport { responsiveMargin }\n"],"names":["responsiveMargin","createResponsivePropsMixin","propKey","propValue","undefined","SIZES_LATIN"],"mappings":"iHAeA,MAAMA,iBAAmBC,sBAAAA,2BACvB,CAAC,SAAU,YAAa,cAAe,eAAgB,
|
|
1
|
+
{"version":3,"file":"responsive-margin.js","sources":["../../../src/mixins/responsive-margin.ts"],"sourcesContent":["import { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport { SIZES_LATIN } from 'mixins/shared'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { CSSGlobalValue } from 'shared/types'\n\ntype MarginProperty = 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft'\n\ntype MarginValue = CSSGlobalValue | (string & {}) | number\n\ntype ResponsiveMarginProps = ResponsiveProps<MarginProperty, MarginValue>\n\n/**\n *\n * Mixin enables responsive margin interface\n */\nconst responsiveMargin = createResponsivePropsMixin<MarginProperty, MarginValue | void, ResponsiveMarginProps>(\n ['margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n (propKey, propValue) => {\n if (propValue === undefined || propValue === null) return {}\n\n if (typeof propValue === 'string' && SIZES_LATIN[propValue as keyof typeof SIZES_LATIN]) {\n return {\n [propKey]: `${SIZES_LATIN[propValue as keyof typeof SIZES_LATIN]}px`,\n }\n }\n\n return {\n [propKey]: typeof propValue === 'string' ? propValue : `${propValue}px`,\n }\n }\n)\n\nexport type { ResponsiveMarginProps }\n\nexport { responsiveMargin }\n"],"names":["responsiveMargin","createResponsivePropsMixin","propKey","propValue","undefined","SIZES_LATIN"],"mappings":"iHAeA,MAAMA,iBAAmBC,sBAAAA,2BACvB,CAAC,SAAU,YAAa,cAAe,eAAgB,cACvD,CAACC,EAASC,IACJA,SAAcC,GAAaD,IAAc,KAAa,CAAA,SAE/CA,GAAc,UAAYE,OAAAA,YAAYF,GACxC,CACLD,CAACA,GAAU,GAAGG,mBAAYF,QAIvB,CACLD,CAACA,UAAiBC,GAAc,SAAWA,EAAY,GAAGA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createResponsivePropsMixin}from'./create-responsive-props.mjs';import{SIZES_LATIN}from'./shared.mjs';const responsiveMargin=createResponsivePropsMixin(['margin','marginTop','marginRight','marginBottom','marginLeft'],(
|
|
1
|
+
import{createResponsivePropsMixin}from'./create-responsive-props.mjs';import{SIZES_LATIN}from'./shared.mjs';const responsiveMargin=createResponsivePropsMixin(['margin','marginTop','marginRight','marginBottom','marginLeft'],(r,i)=>i===void 0||i===null?{}:typeof i=='string'&&SIZES_LATIN[i]?{[r]:`${SIZES_LATIN[i]}px`}:{[r]:typeof i=='string'?i:`${i}px`});export{responsiveMargin};
|
|
2
2
|
//# sourceMappingURL=responsive-margin.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive-margin.mjs","sources":["../../../src/mixins/responsive-margin.ts"],"sourcesContent":["import { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport { SIZES_LATIN } from 'mixins/shared'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { CSSGlobalValue } from 'shared/types'\n\ntype MarginProperty = 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft'\n\ntype MarginValue = CSSGlobalValue | (string & {}) | number\n\ntype ResponsiveMarginProps = ResponsiveProps<MarginProperty, MarginValue>\n\n/**\n *\n * Mixin enables responsive margin interface\n */\nconst responsiveMargin = createResponsivePropsMixin<MarginProperty, MarginValue | void, ResponsiveMarginProps>(\n ['margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n (propKey, propValue) => {\n if (propValue === undefined || propValue === null) return {}\n\n if (typeof propValue === 'string' && SIZES_LATIN[propValue as keyof typeof SIZES_LATIN]) {\n return {\n [propKey]: `${SIZES_LATIN[propValue as keyof typeof SIZES_LATIN]}px`,\n }\n }\n\n return {\n [propKey]: typeof propValue === 'string' ? propValue : `${propValue}px`,\n }\n }\n)\n\nexport type { ResponsiveMarginProps }\n\nexport { responsiveMargin }\n"],"names":["responsiveMargin","createResponsivePropsMixin","propKey","propValue","undefined","SIZES_LATIN"],"mappings":"4GAeA,MAAMA,iBAAmBC,2BACvB,CAAC,SAAU,YAAa,cAAe,eAAgB,
|
|
1
|
+
{"version":3,"file":"responsive-margin.mjs","sources":["../../../src/mixins/responsive-margin.ts"],"sourcesContent":["import { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport { SIZES_LATIN } from 'mixins/shared'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { CSSGlobalValue } from 'shared/types'\n\ntype MarginProperty = 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft'\n\ntype MarginValue = CSSGlobalValue | (string & {}) | number\n\ntype ResponsiveMarginProps = ResponsiveProps<MarginProperty, MarginValue>\n\n/**\n *\n * Mixin enables responsive margin interface\n */\nconst responsiveMargin = createResponsivePropsMixin<MarginProperty, MarginValue | void, ResponsiveMarginProps>(\n ['margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n (propKey, propValue) => {\n if (propValue === undefined || propValue === null) return {}\n\n if (typeof propValue === 'string' && SIZES_LATIN[propValue as keyof typeof SIZES_LATIN]) {\n return {\n [propKey]: `${SIZES_LATIN[propValue as keyof typeof SIZES_LATIN]}px`,\n }\n }\n\n return {\n [propKey]: typeof propValue === 'string' ? propValue : `${propValue}px`,\n }\n }\n)\n\nexport type { ResponsiveMarginProps }\n\nexport { responsiveMargin }\n"],"names":["responsiveMargin","createResponsivePropsMixin","propKey","propValue","undefined","SIZES_LATIN"],"mappings":"4GAeA,MAAMA,iBAAmBC,2BACvB,CAAC,SAAU,YAAa,cAAe,eAAgB,cACvD,CAACC,EAASC,IACJA,SAAcC,GAAaD,IAAc,KAAa,CAAA,SAE/CA,GAAc,UAAYE,YAAYF,GACxC,CACLD,CAACA,GAAU,GAAGG,YAAYF,QAIvB,CACLD,CAACA,UAAiBC,GAAc,SAAWA,EAAY,GAAGA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';const responsivePosition=require('./create-responsive-props.js').createResponsivePropsMixin(['position'],(
|
|
1
|
+
'use strict';const responsivePosition=require('./create-responsive-props.js').createResponsivePropsMixin(['position'],(s,i,o)=>i===void 0||i===null?{}:o.positions[i]??{});exports.responsivePosition=responsivePosition;
|
|
2
2
|
//# sourceMappingURL=responsive-position.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive-position.js","sources":["../../../src/mixins/responsive-position.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { Nullable } from 'shared/types'\n\ntype ResponsivePositionMixinInterpolationProps = ResponsiveProps<'position', string> & {\n positions: Record<string, CSSProperties>\n}\n\n/**\n *\n * Mixin enables responsive position interface\n */\nconst responsivePosition = createResponsivePropsMixin<\n 'position',\n Nullable<string>,\n ResponsivePositionMixinInterpolationProps\n>(['position'], (_, position, props) => {\n if (position === undefined || position === null) return {} as CSSObject\n\n return (props.positions[position] ?? {}) as CSSObject\n})\n\nexport { responsivePosition }\n"],"names":["responsivePosition","createResponsivePropsMixin","_","position","props","undefined","positions"],"mappings":"aAcA,MAAMA,2DAAqBC,2BAIzB,CAAC,
|
|
1
|
+
{"version":3,"file":"responsive-position.js","sources":["../../../src/mixins/responsive-position.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { Nullable } from 'shared/types'\n\ntype ResponsivePositionMixinInterpolationProps = ResponsiveProps<'position', string> & {\n positions: Record<string, CSSProperties>\n}\n\n/**\n *\n * Mixin enables responsive position interface\n */\nconst responsivePosition = createResponsivePropsMixin<\n 'position',\n Nullable<string>,\n ResponsivePositionMixinInterpolationProps\n>(['position'], (_, position, props) => {\n if (position === undefined || position === null) return {} as CSSObject\n\n return (props.positions[position] ?? {}) as CSSObject\n})\n\nexport { responsivePosition }\n"],"names":["responsivePosition","createResponsivePropsMixin","_","position","props","undefined","positions"],"mappings":"aAcA,MAAMA,2DAAqBC,2BAIzB,CAAC,YAAa,CAACC,EAAGC,EAAUC,IACxBD,SAAaE,GAAaF,IAAa,KAAa,CAAA,EAEhDC,EAAME,UAAUH,IAAa,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createResponsivePropsMixin}from'./create-responsive-props.mjs';const responsivePosition=createResponsivePropsMixin(['position'],(
|
|
1
|
+
import{createResponsivePropsMixin}from'./create-responsive-props.mjs';const responsivePosition=createResponsivePropsMixin(['position'],(o,s,i)=>s===void 0||s===null?{}:i.positions[s]??{});export{responsivePosition};
|
|
2
2
|
//# sourceMappingURL=responsive-position.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive-position.mjs","sources":["../../../src/mixins/responsive-position.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { Nullable } from 'shared/types'\n\ntype ResponsivePositionMixinInterpolationProps = ResponsiveProps<'position', string> & {\n positions: Record<string, CSSProperties>\n}\n\n/**\n *\n * Mixin enables responsive position interface\n */\nconst responsivePosition = createResponsivePropsMixin<\n 'position',\n Nullable<string>,\n ResponsivePositionMixinInterpolationProps\n>(['position'], (_, position, props) => {\n if (position === undefined || position === null) return {} as CSSObject\n\n return (props.positions[position] ?? {}) as CSSObject\n})\n\nexport { responsivePosition }\n"],"names":["responsivePosition","createResponsivePropsMixin","_","position","props","undefined","positions"],"mappings":"sEAcA,MAAMA,mBAAqBC,2BAIzB,CAAC,
|
|
1
|
+
{"version":3,"file":"responsive-position.mjs","sources":["../../../src/mixins/responsive-position.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { Nullable } from 'shared/types'\n\ntype ResponsivePositionMixinInterpolationProps = ResponsiveProps<'position', string> & {\n positions: Record<string, CSSProperties>\n}\n\n/**\n *\n * Mixin enables responsive position interface\n */\nconst responsivePosition = createResponsivePropsMixin<\n 'position',\n Nullable<string>,\n ResponsivePositionMixinInterpolationProps\n>(['position'], (_, position, props) => {\n if (position === undefined || position === null) return {} as CSSObject\n\n return (props.positions[position] ?? {}) as CSSObject\n})\n\nexport { responsivePosition }\n"],"names":["responsivePosition","createResponsivePropsMixin","_","position","props","undefined","positions"],"mappings":"sEAcA,MAAMA,mBAAqBC,2BAIzB,CAAC,YAAa,CAACC,EAAGC,EAAUC,IACxBD,SAAaE,GAAaF,IAAa,KAAa,CAAA,EAEhDC,EAAME,UAAUH,IAAa,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var styled=require('styled-components');var screen=require('./screen.js');var shared=require('./shared.js');const SCREEN_SIZE_MAP={XXS:screen.screenMaxXxs,XS:screen.screenMaxXs,S:screen.screenMaxS,M:screen.screenMaxM,L:screen.screenMaxL,XL:screen.screenMinL};const SCREEN_SIZE_MAP_BY_DEVICE_ALIAS={desktop:screen.screenMinM,tablet:screen.screenMaxM,mobile:screen.screenMaxS};exports.property=(e,r="size",s="px",t)=>()=>()=>{if(typeof e=='boolean')return typeof r=='function'?r(1):null;const n=t??shared.getLatinSizeMapByCssProperty(r);return typeof r=='function'?r(typeof e=='number'?e:n[e]):typeof e=='string'&&['auto','initial','inherit'].includes(e)?styled.css(["",":",";"],r,e):styled.css(["",":","",";"],r,typeof e=='string'&&n[e]?n[e]:e,s??'')},exports.responsiveNamedProperty=({sizes:e,predefinedSizes:r,cssProperty:s="size",sizing:t="px",customSizeHandler:n,sort:o=shared.desktopFirst})=>()=>()=>Object.keys(e).sort(o).map(
|
|
1
|
+
'use strict';var styled=require('styled-components');var screen=require('./screen.js');var shared=require('./shared.js');const SCREEN_SIZE_MAP={XXS:screen.screenMaxXxs,XS:screen.screenMaxXs,S:screen.screenMaxS,M:screen.screenMaxM,L:screen.screenMaxL,XL:screen.screenMinL};const SCREEN_SIZE_MAP_BY_DEVICE_ALIAS={desktop:screen.screenMinM,tablet:screen.screenMaxM,mobile:screen.screenMaxS};exports.property=(e,r="size",s="px",t)=>()=>()=>{if(typeof e=='boolean')return typeof r=='function'?r(1):null;const n=t??shared.getLatinSizeMapByCssProperty(r);return typeof r=='function'?r(typeof e=='number'?e:n[e]):typeof e=='string'&&['auto','initial','inherit'].includes(e)?styled.css(["",":",";"],r,e):styled.css(["",":","",";"],r,typeof e=='string'&&n[e]?n[e]:e,s??'')},exports.responsiveNamedProperty=({sizes:e,predefinedSizes:r,cssProperty:s="size",sizing:t="px",customSizeHandler:n,sort:o=shared.desktopFirst})=>()=>()=>Object.keys(e).sort(o).map(o=>{const i=e[o];if(i!==void 0){const e=typeof n=='function'?n(i):i;return shared.buildMediaQuery(e,s,shared.getMediaQueryByResponsiveProp(o),t,r)}return null}).filter(Boolean).map(e=>styled.css(["",""],e)),exports.responsiveProperty=(e,r=null,s="px")=>()=>t=>{const n=t[e]??null;const o=r??e;if(!n)return null;if(Array.isArray(n)&&n.length===3){const[e,r,t]=n;return styled.css([""," "," ",""],SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.desktop()`
|
|
2
2
|
${o}: ${typeof e=='number'?`${e}${s??''}`:e};
|
|
3
3
|
`,SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.tablet()`
|
|
4
4
|
${o}: ${typeof r=='number'?`${r}${s??''}`:r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive-property.js","sources":["../../../src/mixins/responsive-property.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { FlattenSimpleInterpolation } from 'styled-components'\nimport { screenMaxL, screenMaxM, screenMaxS, screenMaxXs, screenMinL, screenMaxXxs, screenMinM } from 'mixins/screen'\nimport {\n buildMediaQuery,\n getLatinSizeMapByCssProperty,\n desktopFirst,\n getMediaQueryByResponsiveProp,\n} from 'mixins/shared'\nimport type { Size } from 'shared/types'\n\n/**\n * Value for breakpoint\n */\nexport type PossibleValues = number | Size | 'auto' | 'initial' | 'inherit' | boolean\n\ntype PropsProperties =\n | 'size'\n | 'fontSize'\n | 'height'\n | 'width'\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'padding'\n | 'paddingTop'\n | 'paddingRight'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'margin'\n | 'marginTop'\n | 'marginRight'\n | 'marginBottom'\n | 'marginLeft'\n | 'fluid'\n\nexport type CalcProperty = (\n _size: number | 'auto' | 'initial' | 'inherit' | boolean,\n _sizing?: null | string\n) => FlattenSimpleInterpolation | null\ntype CssProperty = string | CalcProperty\ntype ResponsiveKeys = '' | 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL'\n\nexport type ResponsiveNamedProperty<T extends PropsProperties, V extends PossibleValues = PossibleValues> = Partial<\n Record<`${T}${ResponsiveKeys}`, V>\n>\n\nexport type ResponsiveProperty<V = number | Size> =\n | V\n | [desktop: V, tablet: V, mobile: V]\n | [xl: V, l: V, m: V, s: V, xs: V, xxs: V]\n\nexport const property =\n (\n value: PossibleValues,\n cssProperty: CssProperty = 'size',\n sizing: null | string = 'px',\n sizes?: Record<Size, number>\n ) =>\n () =>\n () => {\n if (typeof value === 'boolean') {\n return typeof cssProperty === 'function' ? cssProperty(1) : null\n }\n\n const sizeMap = sizes ?? getLatinSizeMapByCssProperty(cssProperty)\n\n if (typeof cssProperty === 'function') {\n return cssProperty(typeof value === 'number' ? value : sizeMap[value as keyof typeof sizeMap])\n }\n\n if (typeof value === 'string' && ['auto', 'initial', 'inherit'].includes(value))\n return css`\n ${cssProperty}: ${value};\n `\n\n return css`\n ${cssProperty}: ${typeof value === 'string' && sizeMap[value as keyof typeof sizeMap]\n ? sizeMap[value as keyof typeof sizeMap]\n : value}${sizing ?? ''};\n `\n }\n\nconst SCREEN_SIZE_MAP: Record<Exclude<ResponsiveKeys, ''>, typeof screenMaxXs> = {\n XXS: screenMaxXxs,\n XS: screenMaxXs,\n S: screenMaxS,\n M: screenMaxM,\n L: screenMaxL,\n XL: screenMinL,\n}\n\nconst SCREEN_SIZE_MAP_BY_DEVICE_ALIAS: Record<'desktop' | 'tablet' | 'mobile', typeof screenMaxXs> = {\n desktop: screenMinM,\n tablet: screenMaxM,\n mobile: screenMaxS,\n}\n\ninterface ResponsiveNamedPropertyPayload<T extends PropsProperties> {\n sizes: ResponsiveNamedProperty<T>\n cssProperty: CssProperty\n sizing?: null | string\n customSizeHandler?: (_value: PossibleValues) => PossibleValues\n sort?: (_a: string, _b: string) => number\n predefinedSizes?: Record<Size, number>\n}\n\n/**\n * Миксин для генерации media запросов\n *\n * @param obj.sizes Объект, в качестве ключей брэйкпоинт, в качестве значений - величина\n * @param obj.cssProperty CSS свойство, может быть функцией, возвращающей css`` из styled-components\n * @param obj.sizing значение величины, по умолчанию `px`\n * @param obj.customSizeHandler функция для вычисления кастомных значений величин\n * @returns строки медиазапросов\n */\nexport const responsiveNamedProperty =\n <T extends PropsProperties>({\n sizes,\n predefinedSizes,\n cssProperty = 'size',\n sizing = 'px',\n customSizeHandler,\n sort = desktopFirst,\n }: ResponsiveNamedPropertyPayload<T>) =>\n () =>\n () => {\n const mediaCssStrArr = Object.keys(sizes)\n .sort(sort)\n .map((size) => {\n const value = sizes[size as keyof Required<typeof sizes>]\n\n if (value !== undefined) {\n const _size: PossibleValues = typeof customSizeHandler === 'function' ? customSizeHandler(value) : value\n\n return buildMediaQuery(_size, cssProperty, getMediaQueryByResponsiveProp(size), sizing, predefinedSizes)\n }\n return null\n })\n .filter(Boolean)\n .map(\n (item) => css`\n ${item}\n `\n )\n\n return mediaCssStrArr\n }\n\n/**\n * Миксин для генерации media запросов\n *\n * @param propName имя пропсы\n * @param cssProperty имя css свойства\n * @param sizing значение величины, по умолчанию `px`\n * @returns строки медиазапросов\n */\nexport const responsiveProperty =\n (propName: string, cssProperty: string | null = null, sizing: null | string = 'px') =>\n () =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (props: any) => {\n const prop: ResponsiveProperty | null = props[propName] ?? null\n const _cssProperty = cssProperty ?? propName\n if (!prop) return null\n\n if (Array.isArray(prop) && prop.length === 3) {\n const [desktop, tablet, mobile] = prop\n return css`\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.desktop()`\n ${_cssProperty}: ${typeof desktop === 'number' ? `${desktop}${sizing ?? ''}` : desktop};\n `}\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.tablet()`\n ${_cssProperty}: ${typeof tablet === 'number' ? `${tablet}${sizing ?? ''}` : tablet};\n `}\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.mobile()`\n ${_cssProperty}: ${typeof mobile === 'number' ? `${mobile}${sizing ?? ''}` : mobile};\n `}\n `\n }\n\n if (Array.isArray(prop) && prop.length === 6 && typeof _cssProperty === 'string') {\n const [xl, l, m, s, xs, xxs] = prop\n return css`\n ${SCREEN_SIZE_MAP.XL()`\n ${_cssProperty}: ${typeof xl === 'number' ? `${xl}${sizing ?? ''}` : xl};\n `}\n ${SCREEN_SIZE_MAP.L()`\n ${_cssProperty}: ${typeof l === 'number' ? `${l}${sizing ?? ''}` : l};\n `}\n ${SCREEN_SIZE_MAP.M()`\n ${_cssProperty}: ${typeof m === 'number' ? `${m}${sizing ?? ''}` : m};\n `}\n ${SCREEN_SIZE_MAP.S()`\n ${_cssProperty}: ${typeof s === 'number' ? `${s}${sizing ?? ''}` : s};\n `}\n ${SCREEN_SIZE_MAP.XS()`\n ${_cssProperty}: ${typeof xs === 'number' ? `${xs}${sizing ?? ''}` : xs};\n `}\n ${SCREEN_SIZE_MAP.XXS()`\n ${_cssProperty}: ${typeof xxs === 'number' ? `${xxs}${sizing ?? ''}` : xxs};\n `}\n `\n }\n\n if (typeof prop === 'number') {\n return css`\n ${_cssProperty}: ${prop}${sizing ?? null};\n `\n }\n\n if (typeof prop === 'string') {\n return css`\n ${_cssProperty}: ${prop};\n `\n }\n\n return null\n }\n"],"names":["SCREEN_SIZE_MAP","XXS","screenMaxXxs","XS","screenMaxXs","S","screenMaxS","M","screenMaxM","L","screenMaxL","XL","screenMinL","SCREEN_SIZE_MAP_BY_DEVICE_ALIAS","desktop","screenMinM","tablet","mobile","property","value","cssProperty","sizing","sizes","sizeMap","getLatinSizeMapByCssProperty","includes","css","responsiveNamedProperty","predefinedSizes","customSizeHandler","sort","desktopFirst","Object","keys","map","size","undefined","_size","buildMediaQuery","getMediaQueryByResponsiveProp","filter","Boolean","item","responsiveProperty","propName","props","prop","_cssProperty","Array","isArray","length","xl","l","m","s","xs","xxs"],"mappings":"yHAoFA,MAAMA,gBAA2E,CAC/EC,IAAKC,OAAAA,aACLC,GAAIC,OAAAA,YACJC,EAAGC,OAAAA,WACHC,EAAGC,OAAAA,WACHC,EAAGC,OAAAA,WACHC,GAAIC,OAAAA,YAGN,MAAMC,gCAA+F,CACnGC,QAASC,OAAAA,WACTC,OAAQR,OAAAA,WACRS,OAAQX,OAAAA,6BA1CRY,CACEC,EACAC,EAA2B,OAC3BC,EAAwB,KACxBC,IAEF,IACA,KACE,UAAWH,GAAU,UACnB,cAAcC,GAAgB,WAAaA,EAAY,GAAK,KAG9D,MAAMG,EAAUD,GAASE,OAAAA,6BAA6BJ,GAEtD,cAAWA,GAAgB,WAClBA,SAAmBD,GAAU,SAAWA,EAAQI,EAAQJ,WAGtDA,GAAU,UAAY,CAAC,OAAQ,UAAW,WAAWM,SAASN,GAChEO,OAAAA,IAAG,CAAA,GAAA,IAAA,KACNN,EAAgBD,GAGfO,OAAAA,oBACHN,SAAuBD,GAAU,UAAYI,EAAQJ,GACnDI,EAAQJ,GACRA,EAAQE,GAAU,
|
|
1
|
+
{"version":3,"file":"responsive-property.js","sources":["../../../src/mixins/responsive-property.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { FlattenSimpleInterpolation } from 'styled-components'\nimport { screenMaxL, screenMaxM, screenMaxS, screenMaxXs, screenMinL, screenMaxXxs, screenMinM } from 'mixins/screen'\nimport {\n buildMediaQuery,\n getLatinSizeMapByCssProperty,\n desktopFirst,\n getMediaQueryByResponsiveProp,\n} from 'mixins/shared'\nimport type { Size } from 'shared/types'\n\n/**\n * Value for breakpoint\n */\nexport type PossibleValues = number | Size | 'auto' | 'initial' | 'inherit' | boolean\n\ntype PropsProperties =\n | 'size'\n | 'fontSize'\n | 'height'\n | 'width'\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'padding'\n | 'paddingTop'\n | 'paddingRight'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'margin'\n | 'marginTop'\n | 'marginRight'\n | 'marginBottom'\n | 'marginLeft'\n | 'fluid'\n\nexport type CalcProperty = (\n _size: number | 'auto' | 'initial' | 'inherit' | boolean,\n _sizing?: null | string\n) => FlattenSimpleInterpolation | null\ntype CssProperty = string | CalcProperty\ntype ResponsiveKeys = '' | 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL'\n\nexport type ResponsiveNamedProperty<T extends PropsProperties, V extends PossibleValues = PossibleValues> = Partial<\n Record<`${T}${ResponsiveKeys}`, V>\n>\n\nexport type ResponsiveProperty<V = number | Size> =\n | V\n | [desktop: V, tablet: V, mobile: V]\n | [xl: V, l: V, m: V, s: V, xs: V, xxs: V]\n\nexport const property =\n (\n value: PossibleValues,\n cssProperty: CssProperty = 'size',\n sizing: null | string = 'px',\n sizes?: Record<Size, number>\n ) =>\n () =>\n () => {\n if (typeof value === 'boolean') {\n return typeof cssProperty === 'function' ? cssProperty(1) : null\n }\n\n const sizeMap = sizes ?? getLatinSizeMapByCssProperty(cssProperty)\n\n if (typeof cssProperty === 'function') {\n return cssProperty(typeof value === 'number' ? value : sizeMap[value as keyof typeof sizeMap])\n }\n\n if (typeof value === 'string' && ['auto', 'initial', 'inherit'].includes(value))\n return css`\n ${cssProperty}: ${value};\n `\n\n return css`\n ${cssProperty}: ${typeof value === 'string' && sizeMap[value as keyof typeof sizeMap]\n ? sizeMap[value as keyof typeof sizeMap]\n : value}${sizing ?? ''};\n `\n }\n\nconst SCREEN_SIZE_MAP: Record<Exclude<ResponsiveKeys, ''>, typeof screenMaxXs> = {\n XXS: screenMaxXxs,\n XS: screenMaxXs,\n S: screenMaxS,\n M: screenMaxM,\n L: screenMaxL,\n XL: screenMinL,\n}\n\nconst SCREEN_SIZE_MAP_BY_DEVICE_ALIAS: Record<'desktop' | 'tablet' | 'mobile', typeof screenMaxXs> = {\n desktop: screenMinM,\n tablet: screenMaxM,\n mobile: screenMaxS,\n}\n\ninterface ResponsiveNamedPropertyPayload<T extends PropsProperties> {\n sizes: ResponsiveNamedProperty<T>\n cssProperty: CssProperty\n sizing?: null | string\n customSizeHandler?: (_value: PossibleValues) => PossibleValues\n sort?: (_a: string, _b: string) => number\n predefinedSizes?: Record<Size, number>\n}\n\n/**\n * Миксин для генерации media запросов\n *\n * @param obj.sizes Объект, в качестве ключей брэйкпоинт, в качестве значений - величина\n * @param obj.cssProperty CSS свойство, может быть функцией, возвращающей css`` из styled-components\n * @param obj.sizing значение величины, по умолчанию `px`\n * @param obj.customSizeHandler функция для вычисления кастомных значений величин\n * @returns строки медиазапросов\n */\nexport const responsiveNamedProperty =\n <T extends PropsProperties>({\n sizes,\n predefinedSizes,\n cssProperty = 'size',\n sizing = 'px',\n customSizeHandler,\n sort = desktopFirst,\n }: ResponsiveNamedPropertyPayload<T>) =>\n () =>\n () => {\n const mediaCssStrArr = Object.keys(sizes)\n .sort(sort)\n .map((size) => {\n const value = sizes[size as keyof Required<typeof sizes>]\n\n if (value !== undefined) {\n const _size: PossibleValues = typeof customSizeHandler === 'function' ? customSizeHandler(value) : value\n\n return buildMediaQuery(_size, cssProperty, getMediaQueryByResponsiveProp(size), sizing, predefinedSizes)\n }\n return null\n })\n .filter(Boolean)\n .map(\n (item) => css`\n ${item}\n `\n )\n\n return mediaCssStrArr\n }\n\n/**\n * Миксин для генерации media запросов\n *\n * @param propName имя пропсы\n * @param cssProperty имя css свойства\n * @param sizing значение величины, по умолчанию `px`\n * @returns строки медиазапросов\n */\nexport const responsiveProperty =\n (propName: string, cssProperty: string | null = null, sizing: null | string = 'px') =>\n () =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (props: any) => {\n const prop: ResponsiveProperty | null = props[propName] ?? null\n const _cssProperty = cssProperty ?? propName\n if (!prop) return null\n\n if (Array.isArray(prop) && prop.length === 3) {\n const [desktop, tablet, mobile] = prop\n return css`\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.desktop()`\n ${_cssProperty}: ${typeof desktop === 'number' ? `${desktop}${sizing ?? ''}` : desktop};\n `}\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.tablet()`\n ${_cssProperty}: ${typeof tablet === 'number' ? `${tablet}${sizing ?? ''}` : tablet};\n `}\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.mobile()`\n ${_cssProperty}: ${typeof mobile === 'number' ? `${mobile}${sizing ?? ''}` : mobile};\n `}\n `\n }\n\n if (Array.isArray(prop) && prop.length === 6 && typeof _cssProperty === 'string') {\n const [xl, l, m, s, xs, xxs] = prop\n return css`\n ${SCREEN_SIZE_MAP.XL()`\n ${_cssProperty}: ${typeof xl === 'number' ? `${xl}${sizing ?? ''}` : xl};\n `}\n ${SCREEN_SIZE_MAP.L()`\n ${_cssProperty}: ${typeof l === 'number' ? `${l}${sizing ?? ''}` : l};\n `}\n ${SCREEN_SIZE_MAP.M()`\n ${_cssProperty}: ${typeof m === 'number' ? `${m}${sizing ?? ''}` : m};\n `}\n ${SCREEN_SIZE_MAP.S()`\n ${_cssProperty}: ${typeof s === 'number' ? `${s}${sizing ?? ''}` : s};\n `}\n ${SCREEN_SIZE_MAP.XS()`\n ${_cssProperty}: ${typeof xs === 'number' ? `${xs}${sizing ?? ''}` : xs};\n `}\n ${SCREEN_SIZE_MAP.XXS()`\n ${_cssProperty}: ${typeof xxs === 'number' ? `${xxs}${sizing ?? ''}` : xxs};\n `}\n `\n }\n\n if (typeof prop === 'number') {\n return css`\n ${_cssProperty}: ${prop}${sizing ?? null};\n `\n }\n\n if (typeof prop === 'string') {\n return css`\n ${_cssProperty}: ${prop};\n `\n }\n\n return null\n }\n"],"names":["SCREEN_SIZE_MAP","XXS","screenMaxXxs","XS","screenMaxXs","S","screenMaxS","M","screenMaxM","L","screenMaxL","XL","screenMinL","SCREEN_SIZE_MAP_BY_DEVICE_ALIAS","desktop","screenMinM","tablet","mobile","property","value","cssProperty","sizing","sizes","sizeMap","getLatinSizeMapByCssProperty","includes","css","responsiveNamedProperty","predefinedSizes","customSizeHandler","sort","desktopFirst","Object","keys","map","size","undefined","_size","buildMediaQuery","getMediaQueryByResponsiveProp","filter","Boolean","item","responsiveProperty","propName","props","prop","_cssProperty","Array","isArray","length","xl","l","m","s","xs","xxs"],"mappings":"yHAoFA,MAAMA,gBAA2E,CAC/EC,IAAKC,OAAAA,aACLC,GAAIC,OAAAA,YACJC,EAAGC,OAAAA,WACHC,EAAGC,OAAAA,WACHC,EAAGC,OAAAA,WACHC,GAAIC,OAAAA,YAGN,MAAMC,gCAA+F,CACnGC,QAASC,OAAAA,WACTC,OAAQR,OAAAA,WACRS,OAAQX,OAAAA,6BA1CRY,CACEC,EACAC,EAA2B,OAC3BC,EAAwB,KACxBC,IAEF,IACA,KACE,UAAWH,GAAU,UACnB,cAAcC,GAAgB,WAAaA,EAAY,GAAK,KAG9D,MAAMG,EAAUD,GAASE,OAAAA,6BAA6BJ,GAEtD,cAAWA,GAAgB,WAClBA,SAAmBD,GAAU,SAAWA,EAAQI,EAAQJ,WAGtDA,GAAU,UAAY,CAAC,OAAQ,UAAW,WAAWM,SAASN,GAChEO,OAAAA,IAAG,CAAA,GAAA,IAAA,KACNN,EAAgBD,GAGfO,OAAAA,oBACHN,SAAuBD,GAAU,UAAYI,EAAQJ,GACnDI,EAAQJ,GACRA,EAAQE,GAAU,qCAsC1BM,EACEL,QACAM,kBACAR,cAAc,OACdC,SAAS,KACTQ,oBACAC,OAAOC,OAAAA,gBAET,IACA,IACyBC,OAAOC,KAAKX,GAChCQ,KAAKA,GACLI,IAAKC,IACJ,MAAMhB,EAAQG,EAAMa,GAEpB,GAAIhB,SAAUiB,EAAW,CACvB,MAAMC,SAA+BR,GAAsB,WAAaA,EAAkBV,GAASA,EAEnG,OAAOmB,OAAAA,gBAAgBD,EAAOjB,EAAamB,OAAAA,8BAA8BJ,GAAOd,EAAQO,EAC1F,CACA,OAAO,OAERY,OAAOC,SACPP,IACEQ,GAAShB,OAAAA,IAAG,CAAA,GAAA,IACTgB,+BAgBVC,CAACC,EAAkBxB,EAA6B,KAAMC,EAAwB,OAC9E,IAECwB,IACC,MAAMC,EAAkCD,EAAMD,IAAa,KAC3D,MAAMG,EAAe3B,GAAewB,EACpC,IAAKE,EAAM,OAAO,KAElB,GAAIE,MAAMC,QAAQH,IAASA,EAAKI,SAAW,EAAG,CAC5C,MAAOpC,EAASE,EAAQC,GAAU6B,EAClC,OAAOpB,OAAAA,IAAG,CAAA,GAAA,IAAA,IAAA,IACNb,gCAAgCC,SAAS;YACvCiC,aAAwBjC,GAAY,SAAW,GAAGA,IAAUO,GAAU,KAAOP;UAE/ED,gCAAgCG,QAAQ;YACtC+B,aAAwB/B,GAAW,SAAW,GAAGA,IAASK,GAAU,KAAOL;UAE7EH,gCAAgCI,QAAQ;YACtC8B,aAAwB9B,GAAW,SAAW,GAAGA,IAASI,GAAU,KAAOJ;UAGnF,CAEA,GAAI+B,MAAMC,QAAQH,IAASA,EAAKI,SAAW,UAAYH,GAAiB,SAAU,CAChF,MAAOI,EAAIC,EAAGC,EAAGC,EAAGC,EAAIC,GAAOV,EAC/B,OAAOpB,WAAG,CAAA,GAAA,IAAA,IAAA,IAAA,IAAA,IAAA,IACN1B,gBAAgBW,IAAI;cAChBoC,aAAwBI,GAAO,SAAW,GAAGA,IAAK9B,GAAU,KAAO8B;YAEvEnD,gBAAgBS,GAAG;cACfsC,aAAwBK,GAAM,SAAW,GAAGA,IAAI/B,GAAU,KAAO+B;YAEnEpD,gBAAgBO,GAAG;cACjBwC,aAAwBM,GAAM,SAAW,GAAGA,IAAIhC,GAAU,KAAOgC;YAEnErD,gBAAgBK,GAAG;cACjB0C,aAAwBO,GAAM,SAAW,GAAGA,IAAIjC,GAAU,KAAOiC;YAEnEtD,gBAAgBG,IAAI;cAClB4C,aAAwBQ,GAAO,SAAW,GAAGA,IAAKlC,GAAU,KAAOkC;YAErEvD,gBAAgBC,KAAK;cACnB8C,aAAwBS,GAAQ,SAAW,GAAGA,IAAMnC,GAAU,KAAOmC;YAG/E,CAEA,cAAWV,GAAS,SACXpB,2BACHqB,EAAiBD,EAAOzB,GAAU,aAI7ByB,GAAS,SACXpB,OAAAA,IAAG,CAAA,GAAA,IAAA,KACNqB,EAAiBD,GAIhB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{css}from'styled-components';import{screenMinM,screenMaxS,screenMaxM,screenMinL,screenMaxL,screenMaxXs,screenMaxXxs}from'./screen.mjs';import{desktopFirst,buildMediaQuery,getMediaQueryByResponsiveProp,getLatinSizeMapByCssProperty}from'./shared.mjs';const property=(e,r="size",s="px",n)=>()=>()=>{if(typeof e=='boolean')return typeof r=='function'?r(1):null;const t=n??getLatinSizeMapByCssProperty(r);return typeof r=='function'?r(typeof e=='number'?e:t[e]):typeof e=='string'&&['auto','initial','inherit'].includes(e)?css(["",":",";"],r,e):css(["",":","",";"],r,typeof e=='string'&&t[e]?t[e]:e,s??'')};const SCREEN_SIZE_MAP={XXS:screenMaxXxs,XS:screenMaxXs,S:screenMaxS,M:screenMaxM,L:screenMaxL,XL:screenMinL};const SCREEN_SIZE_MAP_BY_DEVICE_ALIAS={desktop:screenMinM,tablet:screenMaxM,mobile:screenMaxS};const responsiveNamedProperty=({sizes:e,predefinedSizes:r,cssProperty:s="size",sizing:n="px",customSizeHandler:t,sort:o=desktopFirst})=>()=>()=>Object.keys(e).sort(o).map(
|
|
1
|
+
import{css}from'styled-components';import{screenMinM,screenMaxS,screenMaxM,screenMinL,screenMaxL,screenMaxXs,screenMaxXxs}from'./screen.mjs';import{desktopFirst,buildMediaQuery,getMediaQueryByResponsiveProp,getLatinSizeMapByCssProperty}from'./shared.mjs';const property=(e,r="size",s="px",n)=>()=>()=>{if(typeof e=='boolean')return typeof r=='function'?r(1):null;const t=n??getLatinSizeMapByCssProperty(r);return typeof r=='function'?r(typeof e=='number'?e:t[e]):typeof e=='string'&&['auto','initial','inherit'].includes(e)?css(["",":",";"],r,e):css(["",":","",";"],r,typeof e=='string'&&t[e]?t[e]:e,s??'')};const SCREEN_SIZE_MAP={XXS:screenMaxXxs,XS:screenMaxXs,S:screenMaxS,M:screenMaxM,L:screenMaxL,XL:screenMinL};const SCREEN_SIZE_MAP_BY_DEVICE_ALIAS={desktop:screenMinM,tablet:screenMaxM,mobile:screenMaxS};const responsiveNamedProperty=({sizes:e,predefinedSizes:r,cssProperty:s="size",sizing:n="px",customSizeHandler:t,sort:o=desktopFirst})=>()=>()=>Object.keys(e).sort(o).map(o=>{const i=e[o];if(i!==void 0){const e=typeof t=='function'?t(i):i;return buildMediaQuery(e,s,getMediaQueryByResponsiveProp(o),n,r)}return null}).filter(Boolean).map(e=>css(["",""],e));const responsiveProperty=(e,r=null,s="px")=>()=>n=>{const t=n[e]??null;const o=r??e;if(!t)return null;if(Array.isArray(t)&&t.length===3){const[e,r,n]=t;return css([""," "," ",""],SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.desktop()`
|
|
2
2
|
${o}: ${typeof e=='number'?`${e}${s??''}`:e};
|
|
3
3
|
`,SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.tablet()`
|
|
4
4
|
${o}: ${typeof r=='number'?`${r}${s??''}`:r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive-property.mjs","sources":["../../../src/mixins/responsive-property.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { FlattenSimpleInterpolation } from 'styled-components'\nimport { screenMaxL, screenMaxM, screenMaxS, screenMaxXs, screenMinL, screenMaxXxs, screenMinM } from 'mixins/screen'\nimport {\n buildMediaQuery,\n getLatinSizeMapByCssProperty,\n desktopFirst,\n getMediaQueryByResponsiveProp,\n} from 'mixins/shared'\nimport type { Size } from 'shared/types'\n\n/**\n * Value for breakpoint\n */\nexport type PossibleValues = number | Size | 'auto' | 'initial' | 'inherit' | boolean\n\ntype PropsProperties =\n | 'size'\n | 'fontSize'\n | 'height'\n | 'width'\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'padding'\n | 'paddingTop'\n | 'paddingRight'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'margin'\n | 'marginTop'\n | 'marginRight'\n | 'marginBottom'\n | 'marginLeft'\n | 'fluid'\n\nexport type CalcProperty = (\n _size: number | 'auto' | 'initial' | 'inherit' | boolean,\n _sizing?: null | string\n) => FlattenSimpleInterpolation | null\ntype CssProperty = string | CalcProperty\ntype ResponsiveKeys = '' | 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL'\n\nexport type ResponsiveNamedProperty<T extends PropsProperties, V extends PossibleValues = PossibleValues> = Partial<\n Record<`${T}${ResponsiveKeys}`, V>\n>\n\nexport type ResponsiveProperty<V = number | Size> =\n | V\n | [desktop: V, tablet: V, mobile: V]\n | [xl: V, l: V, m: V, s: V, xs: V, xxs: V]\n\nexport const property =\n (\n value: PossibleValues,\n cssProperty: CssProperty = 'size',\n sizing: null | string = 'px',\n sizes?: Record<Size, number>\n ) =>\n () =>\n () => {\n if (typeof value === 'boolean') {\n return typeof cssProperty === 'function' ? cssProperty(1) : null\n }\n\n const sizeMap = sizes ?? getLatinSizeMapByCssProperty(cssProperty)\n\n if (typeof cssProperty === 'function') {\n return cssProperty(typeof value === 'number' ? value : sizeMap[value as keyof typeof sizeMap])\n }\n\n if (typeof value === 'string' && ['auto', 'initial', 'inherit'].includes(value))\n return css`\n ${cssProperty}: ${value};\n `\n\n return css`\n ${cssProperty}: ${typeof value === 'string' && sizeMap[value as keyof typeof sizeMap]\n ? sizeMap[value as keyof typeof sizeMap]\n : value}${sizing ?? ''};\n `\n }\n\nconst SCREEN_SIZE_MAP: Record<Exclude<ResponsiveKeys, ''>, typeof screenMaxXs> = {\n XXS: screenMaxXxs,\n XS: screenMaxXs,\n S: screenMaxS,\n M: screenMaxM,\n L: screenMaxL,\n XL: screenMinL,\n}\n\nconst SCREEN_SIZE_MAP_BY_DEVICE_ALIAS: Record<'desktop' | 'tablet' | 'mobile', typeof screenMaxXs> = {\n desktop: screenMinM,\n tablet: screenMaxM,\n mobile: screenMaxS,\n}\n\ninterface ResponsiveNamedPropertyPayload<T extends PropsProperties> {\n sizes: ResponsiveNamedProperty<T>\n cssProperty: CssProperty\n sizing?: null | string\n customSizeHandler?: (_value: PossibleValues) => PossibleValues\n sort?: (_a: string, _b: string) => number\n predefinedSizes?: Record<Size, number>\n}\n\n/**\n * Миксин для генерации media запросов\n *\n * @param obj.sizes Объект, в качестве ключей брэйкпоинт, в качестве значений - величина\n * @param obj.cssProperty CSS свойство, может быть функцией, возвращающей css`` из styled-components\n * @param obj.sizing значение величины, по умолчанию `px`\n * @param obj.customSizeHandler функция для вычисления кастомных значений величин\n * @returns строки медиазапросов\n */\nexport const responsiveNamedProperty =\n <T extends PropsProperties>({\n sizes,\n predefinedSizes,\n cssProperty = 'size',\n sizing = 'px',\n customSizeHandler,\n sort = desktopFirst,\n }: ResponsiveNamedPropertyPayload<T>) =>\n () =>\n () => {\n const mediaCssStrArr = Object.keys(sizes)\n .sort(sort)\n .map((size) => {\n const value = sizes[size as keyof Required<typeof sizes>]\n\n if (value !== undefined) {\n const _size: PossibleValues = typeof customSizeHandler === 'function' ? customSizeHandler(value) : value\n\n return buildMediaQuery(_size, cssProperty, getMediaQueryByResponsiveProp(size), sizing, predefinedSizes)\n }\n return null\n })\n .filter(Boolean)\n .map(\n (item) => css`\n ${item}\n `\n )\n\n return mediaCssStrArr\n }\n\n/**\n * Миксин для генерации media запросов\n *\n * @param propName имя пропсы\n * @param cssProperty имя css свойства\n * @param sizing значение величины, по умолчанию `px`\n * @returns строки медиазапросов\n */\nexport const responsiveProperty =\n (propName: string, cssProperty: string | null = null, sizing: null | string = 'px') =>\n () =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (props: any) => {\n const prop: ResponsiveProperty | null = props[propName] ?? null\n const _cssProperty = cssProperty ?? propName\n if (!prop) return null\n\n if (Array.isArray(prop) && prop.length === 3) {\n const [desktop, tablet, mobile] = prop\n return css`\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.desktop()`\n ${_cssProperty}: ${typeof desktop === 'number' ? `${desktop}${sizing ?? ''}` : desktop};\n `}\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.tablet()`\n ${_cssProperty}: ${typeof tablet === 'number' ? `${tablet}${sizing ?? ''}` : tablet};\n `}\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.mobile()`\n ${_cssProperty}: ${typeof mobile === 'number' ? `${mobile}${sizing ?? ''}` : mobile};\n `}\n `\n }\n\n if (Array.isArray(prop) && prop.length === 6 && typeof _cssProperty === 'string') {\n const [xl, l, m, s, xs, xxs] = prop\n return css`\n ${SCREEN_SIZE_MAP.XL()`\n ${_cssProperty}: ${typeof xl === 'number' ? `${xl}${sizing ?? ''}` : xl};\n `}\n ${SCREEN_SIZE_MAP.L()`\n ${_cssProperty}: ${typeof l === 'number' ? `${l}${sizing ?? ''}` : l};\n `}\n ${SCREEN_SIZE_MAP.M()`\n ${_cssProperty}: ${typeof m === 'number' ? `${m}${sizing ?? ''}` : m};\n `}\n ${SCREEN_SIZE_MAP.S()`\n ${_cssProperty}: ${typeof s === 'number' ? `${s}${sizing ?? ''}` : s};\n `}\n ${SCREEN_SIZE_MAP.XS()`\n ${_cssProperty}: ${typeof xs === 'number' ? `${xs}${sizing ?? ''}` : xs};\n `}\n ${SCREEN_SIZE_MAP.XXS()`\n ${_cssProperty}: ${typeof xxs === 'number' ? `${xxs}${sizing ?? ''}` : xxs};\n `}\n `\n }\n\n if (typeof prop === 'number') {\n return css`\n ${_cssProperty}: ${prop}${sizing ?? null};\n `\n }\n\n if (typeof prop === 'string') {\n return css`\n ${_cssProperty}: ${prop};\n `\n }\n\n return null\n }\n"],"names":["property","value","cssProperty","sizing","sizes","sizeMap","getLatinSizeMapByCssProperty","includes","css","SCREEN_SIZE_MAP","XXS","screenMaxXxs","XS","screenMaxXs","S","screenMaxS","M","screenMaxM","L","screenMaxL","XL","screenMinL","SCREEN_SIZE_MAP_BY_DEVICE_ALIAS","desktop","screenMinM","tablet","mobile","responsiveNamedProperty","predefinedSizes","customSizeHandler","sort","desktopFirst","Object","keys","map","size","undefined","_size","buildMediaQuery","getMediaQueryByResponsiveProp","filter","Boolean","item","responsiveProperty","propName","props","prop","_cssProperty","Array","isArray","length","xl","l","m","s","xs","xxs"],"mappings":"qQAqDaA,SACXA,CACEC,EACAC,EAA2B,OAC3BC,EAAwB,KACxBC,IAEF,IACA,KACE,UAAWH,GAAU,UACnB,cAAcC,GAAgB,WAAaA,EAAY,GAAK,KAG9D,MAAMG,EAAUD,GAASE,6BAA6BJ,GAEtD,cAAWA,GAAgB,WAClBA,SAAmBD,GAAU,SAAWA,EAAQI,EAAQJ,WAGtDA,GAAU,UAAY,CAAC,OAAQ,UAAW,WAAWM,SAASN,GAChEO,IAAG,CAAA,GAAA,IAAA,KACNN,EAAgBD,GAGfO,oBACHN,SAAuBD,GAAU,UAAYI,EAAQJ,GACnDI,EAAQJ,GACRA,EAAQE,GAAU,
|
|
1
|
+
{"version":3,"file":"responsive-property.mjs","sources":["../../../src/mixins/responsive-property.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { FlattenSimpleInterpolation } from 'styled-components'\nimport { screenMaxL, screenMaxM, screenMaxS, screenMaxXs, screenMinL, screenMaxXxs, screenMinM } from 'mixins/screen'\nimport {\n buildMediaQuery,\n getLatinSizeMapByCssProperty,\n desktopFirst,\n getMediaQueryByResponsiveProp,\n} from 'mixins/shared'\nimport type { Size } from 'shared/types'\n\n/**\n * Value for breakpoint\n */\nexport type PossibleValues = number | Size | 'auto' | 'initial' | 'inherit' | boolean\n\ntype PropsProperties =\n | 'size'\n | 'fontSize'\n | 'height'\n | 'width'\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'padding'\n | 'paddingTop'\n | 'paddingRight'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'margin'\n | 'marginTop'\n | 'marginRight'\n | 'marginBottom'\n | 'marginLeft'\n | 'fluid'\n\nexport type CalcProperty = (\n _size: number | 'auto' | 'initial' | 'inherit' | boolean,\n _sizing?: null | string\n) => FlattenSimpleInterpolation | null\ntype CssProperty = string | CalcProperty\ntype ResponsiveKeys = '' | 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL'\n\nexport type ResponsiveNamedProperty<T extends PropsProperties, V extends PossibleValues = PossibleValues> = Partial<\n Record<`${T}${ResponsiveKeys}`, V>\n>\n\nexport type ResponsiveProperty<V = number | Size> =\n | V\n | [desktop: V, tablet: V, mobile: V]\n | [xl: V, l: V, m: V, s: V, xs: V, xxs: V]\n\nexport const property =\n (\n value: PossibleValues,\n cssProperty: CssProperty = 'size',\n sizing: null | string = 'px',\n sizes?: Record<Size, number>\n ) =>\n () =>\n () => {\n if (typeof value === 'boolean') {\n return typeof cssProperty === 'function' ? cssProperty(1) : null\n }\n\n const sizeMap = sizes ?? getLatinSizeMapByCssProperty(cssProperty)\n\n if (typeof cssProperty === 'function') {\n return cssProperty(typeof value === 'number' ? value : sizeMap[value as keyof typeof sizeMap])\n }\n\n if (typeof value === 'string' && ['auto', 'initial', 'inherit'].includes(value))\n return css`\n ${cssProperty}: ${value};\n `\n\n return css`\n ${cssProperty}: ${typeof value === 'string' && sizeMap[value as keyof typeof sizeMap]\n ? sizeMap[value as keyof typeof sizeMap]\n : value}${sizing ?? ''};\n `\n }\n\nconst SCREEN_SIZE_MAP: Record<Exclude<ResponsiveKeys, ''>, typeof screenMaxXs> = {\n XXS: screenMaxXxs,\n XS: screenMaxXs,\n S: screenMaxS,\n M: screenMaxM,\n L: screenMaxL,\n XL: screenMinL,\n}\n\nconst SCREEN_SIZE_MAP_BY_DEVICE_ALIAS: Record<'desktop' | 'tablet' | 'mobile', typeof screenMaxXs> = {\n desktop: screenMinM,\n tablet: screenMaxM,\n mobile: screenMaxS,\n}\n\ninterface ResponsiveNamedPropertyPayload<T extends PropsProperties> {\n sizes: ResponsiveNamedProperty<T>\n cssProperty: CssProperty\n sizing?: null | string\n customSizeHandler?: (_value: PossibleValues) => PossibleValues\n sort?: (_a: string, _b: string) => number\n predefinedSizes?: Record<Size, number>\n}\n\n/**\n * Миксин для генерации media запросов\n *\n * @param obj.sizes Объект, в качестве ключей брэйкпоинт, в качестве значений - величина\n * @param obj.cssProperty CSS свойство, может быть функцией, возвращающей css`` из styled-components\n * @param obj.sizing значение величины, по умолчанию `px`\n * @param obj.customSizeHandler функция для вычисления кастомных значений величин\n * @returns строки медиазапросов\n */\nexport const responsiveNamedProperty =\n <T extends PropsProperties>({\n sizes,\n predefinedSizes,\n cssProperty = 'size',\n sizing = 'px',\n customSizeHandler,\n sort = desktopFirst,\n }: ResponsiveNamedPropertyPayload<T>) =>\n () =>\n () => {\n const mediaCssStrArr = Object.keys(sizes)\n .sort(sort)\n .map((size) => {\n const value = sizes[size as keyof Required<typeof sizes>]\n\n if (value !== undefined) {\n const _size: PossibleValues = typeof customSizeHandler === 'function' ? customSizeHandler(value) : value\n\n return buildMediaQuery(_size, cssProperty, getMediaQueryByResponsiveProp(size), sizing, predefinedSizes)\n }\n return null\n })\n .filter(Boolean)\n .map(\n (item) => css`\n ${item}\n `\n )\n\n return mediaCssStrArr\n }\n\n/**\n * Миксин для генерации media запросов\n *\n * @param propName имя пропсы\n * @param cssProperty имя css свойства\n * @param sizing значение величины, по умолчанию `px`\n * @returns строки медиазапросов\n */\nexport const responsiveProperty =\n (propName: string, cssProperty: string | null = null, sizing: null | string = 'px') =>\n () =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (props: any) => {\n const prop: ResponsiveProperty | null = props[propName] ?? null\n const _cssProperty = cssProperty ?? propName\n if (!prop) return null\n\n if (Array.isArray(prop) && prop.length === 3) {\n const [desktop, tablet, mobile] = prop\n return css`\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.desktop()`\n ${_cssProperty}: ${typeof desktop === 'number' ? `${desktop}${sizing ?? ''}` : desktop};\n `}\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.tablet()`\n ${_cssProperty}: ${typeof tablet === 'number' ? `${tablet}${sizing ?? ''}` : tablet};\n `}\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.mobile()`\n ${_cssProperty}: ${typeof mobile === 'number' ? `${mobile}${sizing ?? ''}` : mobile};\n `}\n `\n }\n\n if (Array.isArray(prop) && prop.length === 6 && typeof _cssProperty === 'string') {\n const [xl, l, m, s, xs, xxs] = prop\n return css`\n ${SCREEN_SIZE_MAP.XL()`\n ${_cssProperty}: ${typeof xl === 'number' ? `${xl}${sizing ?? ''}` : xl};\n `}\n ${SCREEN_SIZE_MAP.L()`\n ${_cssProperty}: ${typeof l === 'number' ? `${l}${sizing ?? ''}` : l};\n `}\n ${SCREEN_SIZE_MAP.M()`\n ${_cssProperty}: ${typeof m === 'number' ? `${m}${sizing ?? ''}` : m};\n `}\n ${SCREEN_SIZE_MAP.S()`\n ${_cssProperty}: ${typeof s === 'number' ? `${s}${sizing ?? ''}` : s};\n `}\n ${SCREEN_SIZE_MAP.XS()`\n ${_cssProperty}: ${typeof xs === 'number' ? `${xs}${sizing ?? ''}` : xs};\n `}\n ${SCREEN_SIZE_MAP.XXS()`\n ${_cssProperty}: ${typeof xxs === 'number' ? `${xxs}${sizing ?? ''}` : xxs};\n `}\n `\n }\n\n if (typeof prop === 'number') {\n return css`\n ${_cssProperty}: ${prop}${sizing ?? null};\n `\n }\n\n if (typeof prop === 'string') {\n return css`\n ${_cssProperty}: ${prop};\n `\n }\n\n return null\n }\n"],"names":["property","value","cssProperty","sizing","sizes","sizeMap","getLatinSizeMapByCssProperty","includes","css","SCREEN_SIZE_MAP","XXS","screenMaxXxs","XS","screenMaxXs","S","screenMaxS","M","screenMaxM","L","screenMaxL","XL","screenMinL","SCREEN_SIZE_MAP_BY_DEVICE_ALIAS","desktop","screenMinM","tablet","mobile","responsiveNamedProperty","predefinedSizes","customSizeHandler","sort","desktopFirst","Object","keys","map","size","undefined","_size","buildMediaQuery","getMediaQueryByResponsiveProp","filter","Boolean","item","responsiveProperty","propName","props","prop","_cssProperty","Array","isArray","length","xl","l","m","s","xs","xxs"],"mappings":"qQAqDaA,SACXA,CACEC,EACAC,EAA2B,OAC3BC,EAAwB,KACxBC,IAEF,IACA,KACE,UAAWH,GAAU,UACnB,cAAcC,GAAgB,WAAaA,EAAY,GAAK,KAG9D,MAAMG,EAAUD,GAASE,6BAA6BJ,GAEtD,cAAWA,GAAgB,WAClBA,SAAmBD,GAAU,SAAWA,EAAQI,EAAQJ,WAGtDA,GAAU,UAAY,CAAC,OAAQ,UAAW,WAAWM,SAASN,GAChEO,IAAG,CAAA,GAAA,IAAA,KACNN,EAAgBD,GAGfO,oBACHN,SAAuBD,GAAU,UAAYI,EAAQJ,GACnDI,EAAQJ,GACRA,EAAQE,GAAU,KAI5B,MAAMM,gBAA2E,CAC/EC,IAAKC,aACLC,GAAIC,YACJC,EAAGC,WACHC,EAAGC,WACHC,EAAGC,WACHC,GAAIC,YAGN,MAAMC,gCAA+F,CACnGC,QAASC,WACTC,OAAQR,WACRS,OAAQX,YAqBH,MAAMY,wBACXA,EACEvB,QACAwB,kBACA1B,cAAc,OACdC,SAAS,KACT0B,oBACAC,OAAOC,gBAET,IACA,IACyBC,OAAOC,KAAK7B,GAChC0B,KAAKA,GACLI,IAAKC,IACJ,MAAMlC,EAAQG,EAAM+B,GAEpB,GAAIlC,SAAUmC,EAAW,CACvB,MAAMC,SAA+BR,GAAsB,WAAaA,EAAkB5B,GAASA,EAEnG,OAAOqC,gBAAgBD,EAAOnC,EAAaqC,8BAA8BJ,GAAOhC,EAAQyB,EAC1F,CACA,OAAO,OAERY,OAAOC,SACPP,IACEQ,GAASlC,IAAG,CAAA,GAAA,IACTkC,IAeL,MAAMC,mBACXA,CAACC,EAAkB1C,EAA6B,KAAMC,EAAwB,OAC9E,IAEC0C,IACC,MAAMC,EAAkCD,EAAMD,IAAa,KAC3D,MAAMG,EAAe7C,GAAe0C,EACpC,IAAKE,EAAM,OAAO,KAElB,GAAIE,MAAMC,QAAQH,IAASA,EAAKI,SAAW,EAAG,CAC5C,MAAO3B,EAASE,EAAQC,GAAUoB,EAClC,OAAOtC,IAAG,CAAA,GAAA,IAAA,IAAA,IACNc,gCAAgCC,SAAS;YACvCwB,aAAwBxB,GAAY,SAAW,GAAGA,IAAUpB,GAAU,KAAOoB;UAE/ED,gCAAgCG,QAAQ;YACtCsB,aAAwBtB,GAAW,SAAW,GAAGA,IAAStB,GAAU,KAAOsB;UAE7EH,gCAAgCI,QAAQ;YACtCqB,aAAwBrB,GAAW,SAAW,GAAGA,IAASvB,GAAU,KAAOuB;UAGnF,CAEA,GAAIsB,MAAMC,QAAQH,IAASA,EAAKI,SAAW,UAAYH,GAAiB,SAAU,CAChF,MAAOI,EAAIC,EAAGC,EAAGC,EAAGC,EAAIC,GAAOV,EAC/B,OAAOtC,IAAG,CAAA,GAAA,IAAA,IAAA,IAAA,IAAA,IAAA,IACNC,gBAAgBW,IAAI;cAChB2B,aAAwBI,GAAO,SAAW,GAAGA,IAAKhD,GAAU,KAAOgD;YAEvE1C,gBAAgBS,GAAG;cACf6B,aAAwBK,GAAM,SAAW,GAAGA,IAAIjD,GAAU,KAAOiD;YAEnE3C,gBAAgBO,GAAG;cACjB+B,aAAwBM,GAAM,SAAW,GAAGA,IAAIlD,GAAU,KAAOkD;YAEnE5C,gBAAgBK,GAAG;cACjBiC,aAAwBO,GAAM,SAAW,GAAGA,IAAInD,GAAU,KAAOmD;YAEnE7C,gBAAgBG,IAAI;cAClBmC,aAAwBQ,GAAO,SAAW,GAAGA,IAAKpD,GAAU,KAAOoD;YAErE9C,gBAAgBC,KAAK;cACnBqC,aAAwBS,GAAQ,SAAW,GAAGA,IAAMrD,GAAU,KAAOqD;YAG/E,CAEA,cAAWV,GAAS,SACXtC,oBACHuC,EAAiBD,EAAO3C,GAAU,aAI7B2C,GAAS,SACXtC,IAAG,CAAA,GAAA,IAAA,KACNuC,EAAiBD,GAIhB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var createResponsiveProps=require('./create-responsive-props.js');var style=require('../shared/utils/style.js');const responsiveSize=createResponsiveProps.createResponsivePropsMixin(['size'],(
|
|
1
|
+
'use strict';var createResponsiveProps=require('./create-responsive-props.js');var style=require('../shared/utils/style.js');const responsiveSize=createResponsiveProps.createResponsivePropsMixin(['size'],(e,s,i)=>s===void 0||s===null?{}:typeof s=='number'||style.isCSSGlobalValue(s)?typeof i.dynamicSizeDeclaration=='function'?i.dynamicSizeDeclaration(s,i.sizeUnits??'px'):{fontSize:typeof s=='string'?s:`${s}${i.sizeUnits??'px'}`}:typeof s=='string'?i.sizes[s]??{}:{});exports.responsiveSize=responsiveSize;
|
|
2
2
|
//# sourceMappingURL=responsive-size.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive-size.js","sources":["../../../src/mixins/responsive-size.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport { isCSSGlobalValue } from 'shared/utils/style'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { CSSUnit, CSSGlobalValue } from 'shared/types'\n\ntype ResponsiveSizeMixinInterpolationProps = ResponsiveProps<'size', unknown> & {\n sizeUnits?: CSSUnit\n sizes: Record<string, CSSProperties>\n dynamicSizeDeclaration?: (size: number | CSSGlobalValue, sizeUnits: CSSUnit) => CSSObject\n}\n\n/**\n *\n * Mixin enables responsive size interface\n */\nconst responsiveSize = createResponsivePropsMixin<'size', unknown, ResponsiveSizeMixinInterpolationProps>(\n ['size'],\n (_, sizeValue, props) => {\n if (sizeValue === undefined || sizeValue === null) return {} as CSSObject\n\n if (typeof sizeValue === 'number' || isCSSGlobalValue(sizeValue)) {\n const cssObject =\n typeof props.dynamicSizeDeclaration === 'function'\n ? props.dynamicSizeDeclaration(sizeValue, props.sizeUnits ?? 'px')\n : { fontSize: typeof sizeValue === 'string' ? sizeValue : `${sizeValue}${props.sizeUnits ?? 'px'}` }\n\n return cssObject\n }\n\n if (typeof sizeValue === 'string') {\n return (props.sizes[sizeValue] ?? {}) as CSSObject\n }\n\n return {} as CSSObject\n }\n)\n\nexport { responsiveSize }\n"],"names":["responsiveSize","createResponsivePropsMixin","_","sizeValue","props","undefined","isCSSGlobalValue","dynamicSizeDeclaration","sizeUnits","fontSize","sizes"],"mappings":"6HAiBA,MAAMA,eAAiBC,sBAAAA,2BACrB,CAAC,
|
|
1
|
+
{"version":3,"file":"responsive-size.js","sources":["../../../src/mixins/responsive-size.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport { isCSSGlobalValue } from 'shared/utils/style'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { CSSUnit, CSSGlobalValue } from 'shared/types'\n\ntype ResponsiveSizeMixinInterpolationProps = ResponsiveProps<'size', unknown> & {\n sizeUnits?: CSSUnit\n sizes: Record<string, CSSProperties>\n dynamicSizeDeclaration?: (size: number | CSSGlobalValue, sizeUnits: CSSUnit) => CSSObject\n}\n\n/**\n *\n * Mixin enables responsive size interface\n */\nconst responsiveSize = createResponsivePropsMixin<'size', unknown, ResponsiveSizeMixinInterpolationProps>(\n ['size'],\n (_, sizeValue, props) => {\n if (sizeValue === undefined || sizeValue === null) return {} as CSSObject\n\n if (typeof sizeValue === 'number' || isCSSGlobalValue(sizeValue)) {\n const cssObject =\n typeof props.dynamicSizeDeclaration === 'function'\n ? props.dynamicSizeDeclaration(sizeValue, props.sizeUnits ?? 'px')\n : { fontSize: typeof sizeValue === 'string' ? sizeValue : `${sizeValue}${props.sizeUnits ?? 'px'}` }\n\n return cssObject\n }\n\n if (typeof sizeValue === 'string') {\n return (props.sizes[sizeValue] ?? {}) as CSSObject\n }\n\n return {} as CSSObject\n }\n)\n\nexport { responsiveSize }\n"],"names":["responsiveSize","createResponsivePropsMixin","_","sizeValue","props","undefined","isCSSGlobalValue","dynamicSizeDeclaration","sizeUnits","fontSize","sizes"],"mappings":"6HAiBA,MAAMA,eAAiBC,sBAAAA,2BACrB,CAAC,QACD,CAACC,EAAGC,EAAWC,IACTD,SAAcE,GAAaF,IAAc,KAAa,CAAA,SAE/CA,GAAc,UAAYG,MAAAA,iBAAiBH,UAE3CC,EAAMG,wBAA2B,WACpCH,EAAMG,uBAAuBJ,EAAWC,EAAMI,WAAa,MAC3D,CAAEC,gBAAiBN,GAAc,SAAWA,EAAY,GAAGA,IAAYC,EAAMI,WAAa,eAKvFL,GAAc,SACfC,EAAMM,MAAMP,IAAc,CAAA,EAG7B,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createResponsivePropsMixin}from'./create-responsive-props.mjs';import{isCSSGlobalValue}from'../shared/utils/style.mjs';const responsiveSize=createResponsivePropsMixin(['size'],(
|
|
1
|
+
import{createResponsivePropsMixin}from'./create-responsive-props.mjs';import{isCSSGlobalValue}from'../shared/utils/style.mjs';const responsiveSize=createResponsivePropsMixin(['size'],(e,i,s)=>i===void 0||i===null?{}:typeof i=='number'||isCSSGlobalValue(i)?typeof s.dynamicSizeDeclaration=='function'?s.dynamicSizeDeclaration(i,s.sizeUnits??'px'):{fontSize:typeof i=='string'?i:`${i}${s.sizeUnits??'px'}`}:typeof i=='string'?s.sizes[i]??{}:{});export{responsiveSize};
|
|
2
2
|
//# sourceMappingURL=responsive-size.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive-size.mjs","sources":["../../../src/mixins/responsive-size.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport { isCSSGlobalValue } from 'shared/utils/style'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { CSSUnit, CSSGlobalValue } from 'shared/types'\n\ntype ResponsiveSizeMixinInterpolationProps = ResponsiveProps<'size', unknown> & {\n sizeUnits?: CSSUnit\n sizes: Record<string, CSSProperties>\n dynamicSizeDeclaration?: (size: number | CSSGlobalValue, sizeUnits: CSSUnit) => CSSObject\n}\n\n/**\n *\n * Mixin enables responsive size interface\n */\nconst responsiveSize = createResponsivePropsMixin<'size', unknown, ResponsiveSizeMixinInterpolationProps>(\n ['size'],\n (_, sizeValue, props) => {\n if (sizeValue === undefined || sizeValue === null) return {} as CSSObject\n\n if (typeof sizeValue === 'number' || isCSSGlobalValue(sizeValue)) {\n const cssObject =\n typeof props.dynamicSizeDeclaration === 'function'\n ? props.dynamicSizeDeclaration(sizeValue, props.sizeUnits ?? 'px')\n : { fontSize: typeof sizeValue === 'string' ? sizeValue : `${sizeValue}${props.sizeUnits ?? 'px'}` }\n\n return cssObject\n }\n\n if (typeof sizeValue === 'string') {\n return (props.sizes[sizeValue] ?? {}) as CSSObject\n }\n\n return {} as CSSObject\n }\n)\n\nexport { responsiveSize }\n"],"names":["responsiveSize","createResponsivePropsMixin","_","sizeValue","props","undefined","isCSSGlobalValue","dynamicSizeDeclaration","sizeUnits","fontSize","sizes"],"mappings":"8HAiBA,MAAMA,eAAiBC,2BACrB,CAAC,
|
|
1
|
+
{"version":3,"file":"responsive-size.mjs","sources":["../../../src/mixins/responsive-size.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport { isCSSGlobalValue } from 'shared/utils/style'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { CSSUnit, CSSGlobalValue } from 'shared/types'\n\ntype ResponsiveSizeMixinInterpolationProps = ResponsiveProps<'size', unknown> & {\n sizeUnits?: CSSUnit\n sizes: Record<string, CSSProperties>\n dynamicSizeDeclaration?: (size: number | CSSGlobalValue, sizeUnits: CSSUnit) => CSSObject\n}\n\n/**\n *\n * Mixin enables responsive size interface\n */\nconst responsiveSize = createResponsivePropsMixin<'size', unknown, ResponsiveSizeMixinInterpolationProps>(\n ['size'],\n (_, sizeValue, props) => {\n if (sizeValue === undefined || sizeValue === null) return {} as CSSObject\n\n if (typeof sizeValue === 'number' || isCSSGlobalValue(sizeValue)) {\n const cssObject =\n typeof props.dynamicSizeDeclaration === 'function'\n ? props.dynamicSizeDeclaration(sizeValue, props.sizeUnits ?? 'px')\n : { fontSize: typeof sizeValue === 'string' ? sizeValue : `${sizeValue}${props.sizeUnits ?? 'px'}` }\n\n return cssObject\n }\n\n if (typeof sizeValue === 'string') {\n return (props.sizes[sizeValue] ?? {}) as CSSObject\n }\n\n return {} as CSSObject\n }\n)\n\nexport { responsiveSize }\n"],"names":["responsiveSize","createResponsivePropsMixin","_","sizeValue","props","undefined","isCSSGlobalValue","dynamicSizeDeclaration","sizeUnits","fontSize","sizes"],"mappings":"8HAiBA,MAAMA,eAAiBC,2BACrB,CAAC,QACD,CAACC,EAAGC,EAAWC,IACTD,SAAcE,GAAaF,IAAc,KAAa,CAAA,SAE/CA,GAAc,UAAYG,iBAAiBH,UAE3CC,EAAMG,wBAA2B,WACpCH,EAAMG,uBAAuBJ,EAAWC,EAAMI,WAAa,MAC3D,CAAEC,gBAAiBN,GAAc,SAAWA,EAAY,GAAGA,IAAYC,EAAMI,WAAa,eAKvFL,GAAc,SACfC,EAAMM,MAAMP,IAAc,CAAA,EAG7B,CAAA"}
|
package/mixins/screen.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen.js","sources":["../../../src/mixins/screen.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { CSSObject, ThemeProps, DefaultTheme, SimpleInterpolation, Interpolation } from 'styled-components'\nimport { BREAKPOINTS } from 'shared/constants'\n\ntype MediaQueryParams = {\n and?: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n condition?: (_props: any) => boolean\n}\n\ntype ThemeBreakpoints = DefaultTheme['breakpoints']\n\ntype BreakpointKey = keyof ThemeBreakpoints\n\nconst CONDITIONS = (() => {\n const maxWidth = (breakpoints: ThemeBreakpoints, point: BreakpointKey) =>\n `(max-width: ${breakpoints[point] - 0.02}px)`\n const minWidth = (breakpoints: ThemeBreakpoints, point: BreakpointKey) => `(min-width: ${breakpoints[point]}px)`\n\n return {\n MAX: maxWidth,\n MIN: minWidth,\n RANGE: (breakpoints: ThemeBreakpoints, point1: BreakpointKey, point2: BreakpointKey) =>\n `${minWidth(breakpoints, point1)} and ${maxWidth(breakpoints, point2)}`,\n }\n})()\n\nexport const createMediaQuery =\n (condition: (_breakpoints: ThemeBreakpoints, ..._points: BreakpointKey[]) => string, ...points: BreakpointKey[]) =>\n (params?: MediaQueryParams) =>\n <T extends object>(...args: [CSSObject | TemplateStringsArray, ...Interpolation<T & ThemeProps<DefaultTheme>>[]]) =>\n (props: ThemeProps<DefaultTheme>) => {\n const contextBreakpoints = props.theme?.breakpoints ?? {}\n const breakpoints: ThemeBreakpoints = { ...BREAKPOINTS, ...contextBreakpoints }\n\n if (params !== undefined && typeof params.condition === 'function' && params.condition(props) === false) {\n return ''\n }\n\n return css<T>`\n /* stylelint-disable-next-line media-query-no-invalid */\n @media screen and ${condition(breakpoints, ...points)} ${params !== undefined && typeof params.and === 'string'\n ? `and ${params.and}`\n : ``} {\n ${css<T>(...args)}\n }\n `\n }\n\n/**\n * @return `@media screen and (min-width: 320px) and (max-width: 374px) { ...args }`\n */\nexport const screenXs = createMediaQuery(CONDITIONS.RANGE, 'xxs', 'xs')\n\n/**\n * @return `@media screen and (min-width: 375px) and (max-width: 767px) { ...args }`\n */\nexport const screenS = createMediaQuery(CONDITIONS.RANGE, 'xs', 's')\n\n/**\n * @return `@media screen and (min-width: 768) and (max-width: 1023px) { ...args }`\n */\nexport const screenM = createMediaQuery(CONDITIONS.RANGE, 's', 'm')\n\n/**\n * @return `@media screen and (min-width: 1024px) and (max-width: 1279px) { ...args }`\n */\nexport const screenL = createMediaQuery(CONDITIONS.RANGE, 'm', 'l')\n\n/**\n * @return `@media screen and (min-width: 1280px) and (max-width: 1439px) { ...args }`\n */\nexport const screenXl = createMediaQuery(CONDITIONS.RANGE, 'l', 'xl')\n\n/**\n * @return `@media screen and (max-width: 319px) { ...args }`\n */\nexport const screenMaxXxs = createMediaQuery(CONDITIONS.MAX, 'xxs')\n\n/**\n * @return `@media screen and (max-width: 374px) { ...args }`\n */\nexport const screenMaxXs = createMediaQuery(CONDITIONS.MAX, 'xs')\n\n/**\n * @return `@media screen and (min-width: 375px) { ...args }`\n */\nexport const screenMinXs = createMediaQuery(CONDITIONS.MIN, 'xs')\n\n/**\n * @return `@media screen and (max-width: 767px) { ...args }`\n */\nexport const screenMaxS = createMediaQuery(CONDITIONS.MAX, 's')\n\n/**\n * @return `@media screen and (min-width: 768px) { ...args }`\n */\nexport const screenMinS = createMediaQuery(CONDITIONS.MIN, 's')\n\n/**\n * @return `@media screen and (max-width: 1023px) { ...args }`\n */\nexport const screenMaxM = createMediaQuery(CONDITIONS.MAX, 'm')\n\n/**\n * @return `@media screen and (min-width: 1024px) { ...args }`\n */\nexport const screenMinM = createMediaQuery(CONDITIONS.MIN, 'm')\n\n/**\n * @return `@media screen and (max-width: 1279px) { ...args }`\n */\nexport const screenMaxL = createMediaQuery(CONDITIONS.MAX, 'l')\n\n/**\n * @return `@media screen and (min-width: 1280px) { ...args }`\n */\nexport const screenMinL = createMediaQuery(CONDITIONS.MIN, 'l')\n\n/**\n * @return `@media screen and (max-width: 1439px) { ...args }`\n */\nexport const screenMaxXl = createMediaQuery(CONDITIONS.MAX, 'xl')\n\n/**\n * @return `@media screen and (min-width: 1440px) { ...args }`\n */\nexport const screenMinXl = createMediaQuery(CONDITIONS.MIN, 'xl')\n\n/**\n * @return `@media -webkit-min-device-pixel-ratio: 2 and (min-resolution: 192dpi) { ...args }`\n */\nexport const screenRetina = (...args: [CSSObject | TemplateStringsArray, SimpleInterpolation]) => css`\n @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {\n ${css(...args)}\n }\n`\n\nexport type MediaQuery = ReturnType<typeof createMediaQuery>\n"],"names":["CONDITIONS","maxWidth","breakpoints","point","minWidth","MAX","MIN","RANGE","point1","point2","createMediaQuery","condition","points","params","args","props","BREAKPOINTS","theme","undefined","css","and","screenXs","screenS","screenM","screenL","screenXl","screenMaxXxs","screenMaxXs","screenMinXs","screenMaxS","screenMinS","screenMaxM","screenMinM","screenMaxL","screenMinL","screenMaxXl","screenMinXl","screenRetina"],"mappings":"qGAcA,MAAMA,WAAa,MACjB,MAAMC,SAAWA,CAACC,EAA+BC,IAC/C,eAAeD,EAAYC,GAAS,SACtC,MAAMC,SAAWA,CAACF,EAA+BC,IAAyB,eAAeD,EAAYC,QAErG,MAAO,CACLE,IAAKJ,SACLK,IAAKF,SACLG,MAAOA,CAACL,EAA+BM,EAAuBC,IAC5D,GAAGL,SAASF,EAAaM,UAAeP,SAASC,EAAaO,KAEnE,EAXkB,SAaNC,iBACXA,CAACC,KAAuFC,IACvFC,GACD,IAAsBC,IACrBC,IAEC,MAAMb,EAAgC,IAAKc,UAAAA,eADhBD,EAAME,OAAOf,aAAe,CAAA,GAGvD,OAAIW,SAAWK,UAAoBL,EAAOF,WAAc,YAAcE,EAAOF,UAAUI,MAAW,EACzF,GAGFI,WAAG,CAAA,qBAAA,IAAA,IAAA,KAEYR,EAAUT,KAAgBU,GAAWC,SAAWK,UAAoBL,EAAOO,KAAQ,SACjG,OAAOP,EAAOO,MACd,GACFD,cAAUL,
|
|
1
|
+
{"version":3,"file":"screen.js","sources":["../../../src/mixins/screen.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { CSSObject, ThemeProps, DefaultTheme, SimpleInterpolation, Interpolation } from 'styled-components'\nimport { BREAKPOINTS } from 'shared/constants'\n\ntype MediaQueryParams = {\n and?: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n condition?: (_props: any) => boolean\n}\n\ntype ThemeBreakpoints = DefaultTheme['breakpoints']\n\ntype BreakpointKey = keyof ThemeBreakpoints\n\nconst CONDITIONS = (() => {\n const maxWidth = (breakpoints: ThemeBreakpoints, point: BreakpointKey) =>\n `(max-width: ${breakpoints[point] - 0.02}px)`\n const minWidth = (breakpoints: ThemeBreakpoints, point: BreakpointKey) => `(min-width: ${breakpoints[point]}px)`\n\n return {\n MAX: maxWidth,\n MIN: minWidth,\n RANGE: (breakpoints: ThemeBreakpoints, point1: BreakpointKey, point2: BreakpointKey) =>\n `${minWidth(breakpoints, point1)} and ${maxWidth(breakpoints, point2)}`,\n }\n})()\n\nexport const createMediaQuery =\n (condition: (_breakpoints: ThemeBreakpoints, ..._points: BreakpointKey[]) => string, ...points: BreakpointKey[]) =>\n (params?: MediaQueryParams) =>\n <T extends object>(...args: [CSSObject | TemplateStringsArray, ...Interpolation<T & ThemeProps<DefaultTheme>>[]]) =>\n (props: ThemeProps<DefaultTheme>) => {\n const contextBreakpoints = props.theme?.breakpoints ?? {}\n const breakpoints: ThemeBreakpoints = { ...BREAKPOINTS, ...contextBreakpoints }\n\n if (params !== undefined && typeof params.condition === 'function' && params.condition(props) === false) {\n return ''\n }\n\n return css<T>`\n /* stylelint-disable-next-line media-query-no-invalid */\n @media screen and ${condition(breakpoints, ...points)} ${params !== undefined && typeof params.and === 'string'\n ? `and ${params.and}`\n : ``} {\n ${css<T>(...args)}\n }\n `\n }\n\n/**\n * @return `@media screen and (min-width: 320px) and (max-width: 374px) { ...args }`\n */\nexport const screenXs = createMediaQuery(CONDITIONS.RANGE, 'xxs', 'xs')\n\n/**\n * @return `@media screen and (min-width: 375px) and (max-width: 767px) { ...args }`\n */\nexport const screenS = createMediaQuery(CONDITIONS.RANGE, 'xs', 's')\n\n/**\n * @return `@media screen and (min-width: 768) and (max-width: 1023px) { ...args }`\n */\nexport const screenM = createMediaQuery(CONDITIONS.RANGE, 's', 'm')\n\n/**\n * @return `@media screen and (min-width: 1024px) and (max-width: 1279px) { ...args }`\n */\nexport const screenL = createMediaQuery(CONDITIONS.RANGE, 'm', 'l')\n\n/**\n * @return `@media screen and (min-width: 1280px) and (max-width: 1439px) { ...args }`\n */\nexport const screenXl = createMediaQuery(CONDITIONS.RANGE, 'l', 'xl')\n\n/**\n * @return `@media screen and (max-width: 319px) { ...args }`\n */\nexport const screenMaxXxs = createMediaQuery(CONDITIONS.MAX, 'xxs')\n\n/**\n * @return `@media screen and (max-width: 374px) { ...args }`\n */\nexport const screenMaxXs = createMediaQuery(CONDITIONS.MAX, 'xs')\n\n/**\n * @return `@media screen and (min-width: 375px) { ...args }`\n */\nexport const screenMinXs = createMediaQuery(CONDITIONS.MIN, 'xs')\n\n/**\n * @return `@media screen and (max-width: 767px) { ...args }`\n */\nexport const screenMaxS = createMediaQuery(CONDITIONS.MAX, 's')\n\n/**\n * @return `@media screen and (min-width: 768px) { ...args }`\n */\nexport const screenMinS = createMediaQuery(CONDITIONS.MIN, 's')\n\n/**\n * @return `@media screen and (max-width: 1023px) { ...args }`\n */\nexport const screenMaxM = createMediaQuery(CONDITIONS.MAX, 'm')\n\n/**\n * @return `@media screen and (min-width: 1024px) { ...args }`\n */\nexport const screenMinM = createMediaQuery(CONDITIONS.MIN, 'm')\n\n/**\n * @return `@media screen and (max-width: 1279px) { ...args }`\n */\nexport const screenMaxL = createMediaQuery(CONDITIONS.MAX, 'l')\n\n/**\n * @return `@media screen and (min-width: 1280px) { ...args }`\n */\nexport const screenMinL = createMediaQuery(CONDITIONS.MIN, 'l')\n\n/**\n * @return `@media screen and (max-width: 1439px) { ...args }`\n */\nexport const screenMaxXl = createMediaQuery(CONDITIONS.MAX, 'xl')\n\n/**\n * @return `@media screen and (min-width: 1440px) { ...args }`\n */\nexport const screenMinXl = createMediaQuery(CONDITIONS.MIN, 'xl')\n\n/**\n * @return `@media -webkit-min-device-pixel-ratio: 2 and (min-resolution: 192dpi) { ...args }`\n */\nexport const screenRetina = (...args: [CSSObject | TemplateStringsArray, SimpleInterpolation]) => css`\n @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {\n ${css(...args)}\n }\n`\n\nexport type MediaQuery = ReturnType<typeof createMediaQuery>\n"],"names":["CONDITIONS","maxWidth","breakpoints","point","minWidth","MAX","MIN","RANGE","point1","point2","createMediaQuery","condition","points","params","args","props","BREAKPOINTS","theme","undefined","css","and","screenXs","screenS","screenM","screenL","screenXl","screenMaxXxs","screenMaxXs","screenMinXs","screenMaxS","screenMinS","screenMaxM","screenMinM","screenMaxL","screenMinL","screenMaxXl","screenMinXl","screenRetina"],"mappings":"qGAcA,MAAMA,WAAa,MACjB,MAAMC,SAAWA,CAACC,EAA+BC,IAC/C,eAAeD,EAAYC,GAAS,SACtC,MAAMC,SAAWA,CAACF,EAA+BC,IAAyB,eAAeD,EAAYC,QAErG,MAAO,CACLE,IAAKJ,SACLK,IAAKF,SACLG,MAAOA,CAACL,EAA+BM,EAAuBC,IAC5D,GAAGL,SAASF,EAAaM,UAAeP,SAASC,EAAaO,KAEnE,EAXkB,SAaNC,iBACXA,CAACC,KAAuFC,IACvFC,GACD,IAAsBC,IACrBC,IAEC,MAAMb,EAAgC,IAAKc,UAAAA,eADhBD,EAAME,OAAOf,aAAe,CAAA,GAGvD,OAAIW,SAAWK,UAAoBL,EAAOF,WAAc,YAAcE,EAAOF,UAAUI,MAAW,EACzF,GAGFI,WAAG,CAAA,qBAAA,IAAA,IAAA,KAEYR,EAAUT,KAAgBU,GAAWC,SAAWK,UAAoBL,EAAOO,KAAQ,SACjG,OAAOP,EAAOO,MACd,GACFD,cAAUL,KAQb,MAAMO,SAAWX,iBAAiBV,WAAWO,MAAO,MAAO,MAK3D,MAAMe,QAAUZ,iBAAiBV,WAAWO,MAAO,KAAM,KAKzD,MAAMgB,QAAUb,iBAAiBV,WAAWO,MAAO,IAAK,KAKxD,MAAMiB,QAAUd,iBAAiBV,WAAWO,MAAO,IAAK,KAKxD,MAAMkB,SAAWf,iBAAiBV,WAAWO,MAAO,IAAK,MAKzD,MAAMmB,aAAehB,iBAAiBV,WAAWK,IAAK,OAKtD,MAAMsB,YAAcjB,iBAAiBV,WAAWK,IAAK,MAKrD,MAAMuB,YAAclB,iBAAiBV,WAAWM,IAAK,MAKrD,MAAMuB,WAAanB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAMyB,WAAapB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAMyB,WAAarB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAM2B,WAAatB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAM2B,WAAavB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAM6B,WAAaxB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAM6B,YAAczB,iBAAiBV,WAAWK,IAAK,MAKrD,MAAM+B,YAAc1B,iBAAiBV,WAAWM,IAAK,2cAKhC+B,IAAIvB,IAAkEK,WAAG,CAAA,qEAAA,KAE/FA,cAAOL"}
|
package/mixins/screen.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen.mjs","sources":["../../../src/mixins/screen.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { CSSObject, ThemeProps, DefaultTheme, SimpleInterpolation, Interpolation } from 'styled-components'\nimport { BREAKPOINTS } from 'shared/constants'\n\ntype MediaQueryParams = {\n and?: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n condition?: (_props: any) => boolean\n}\n\ntype ThemeBreakpoints = DefaultTheme['breakpoints']\n\ntype BreakpointKey = keyof ThemeBreakpoints\n\nconst CONDITIONS = (() => {\n const maxWidth = (breakpoints: ThemeBreakpoints, point: BreakpointKey) =>\n `(max-width: ${breakpoints[point] - 0.02}px)`\n const minWidth = (breakpoints: ThemeBreakpoints, point: BreakpointKey) => `(min-width: ${breakpoints[point]}px)`\n\n return {\n MAX: maxWidth,\n MIN: minWidth,\n RANGE: (breakpoints: ThemeBreakpoints, point1: BreakpointKey, point2: BreakpointKey) =>\n `${minWidth(breakpoints, point1)} and ${maxWidth(breakpoints, point2)}`,\n }\n})()\n\nexport const createMediaQuery =\n (condition: (_breakpoints: ThemeBreakpoints, ..._points: BreakpointKey[]) => string, ...points: BreakpointKey[]) =>\n (params?: MediaQueryParams) =>\n <T extends object>(...args: [CSSObject | TemplateStringsArray, ...Interpolation<T & ThemeProps<DefaultTheme>>[]]) =>\n (props: ThemeProps<DefaultTheme>) => {\n const contextBreakpoints = props.theme?.breakpoints ?? {}\n const breakpoints: ThemeBreakpoints = { ...BREAKPOINTS, ...contextBreakpoints }\n\n if (params !== undefined && typeof params.condition === 'function' && params.condition(props) === false) {\n return ''\n }\n\n return css<T>`\n /* stylelint-disable-next-line media-query-no-invalid */\n @media screen and ${condition(breakpoints, ...points)} ${params !== undefined && typeof params.and === 'string'\n ? `and ${params.and}`\n : ``} {\n ${css<T>(...args)}\n }\n `\n }\n\n/**\n * @return `@media screen and (min-width: 320px) and (max-width: 374px) { ...args }`\n */\nexport const screenXs = createMediaQuery(CONDITIONS.RANGE, 'xxs', 'xs')\n\n/**\n * @return `@media screen and (min-width: 375px) and (max-width: 767px) { ...args }`\n */\nexport const screenS = createMediaQuery(CONDITIONS.RANGE, 'xs', 's')\n\n/**\n * @return `@media screen and (min-width: 768) and (max-width: 1023px) { ...args }`\n */\nexport const screenM = createMediaQuery(CONDITIONS.RANGE, 's', 'm')\n\n/**\n * @return `@media screen and (min-width: 1024px) and (max-width: 1279px) { ...args }`\n */\nexport const screenL = createMediaQuery(CONDITIONS.RANGE, 'm', 'l')\n\n/**\n * @return `@media screen and (min-width: 1280px) and (max-width: 1439px) { ...args }`\n */\nexport const screenXl = createMediaQuery(CONDITIONS.RANGE, 'l', 'xl')\n\n/**\n * @return `@media screen and (max-width: 319px) { ...args }`\n */\nexport const screenMaxXxs = createMediaQuery(CONDITIONS.MAX, 'xxs')\n\n/**\n * @return `@media screen and (max-width: 374px) { ...args }`\n */\nexport const screenMaxXs = createMediaQuery(CONDITIONS.MAX, 'xs')\n\n/**\n * @return `@media screen and (min-width: 375px) { ...args }`\n */\nexport const screenMinXs = createMediaQuery(CONDITIONS.MIN, 'xs')\n\n/**\n * @return `@media screen and (max-width: 767px) { ...args }`\n */\nexport const screenMaxS = createMediaQuery(CONDITIONS.MAX, 's')\n\n/**\n * @return `@media screen and (min-width: 768px) { ...args }`\n */\nexport const screenMinS = createMediaQuery(CONDITIONS.MIN, 's')\n\n/**\n * @return `@media screen and (max-width: 1023px) { ...args }`\n */\nexport const screenMaxM = createMediaQuery(CONDITIONS.MAX, 'm')\n\n/**\n * @return `@media screen and (min-width: 1024px) { ...args }`\n */\nexport const screenMinM = createMediaQuery(CONDITIONS.MIN, 'm')\n\n/**\n * @return `@media screen and (max-width: 1279px) { ...args }`\n */\nexport const screenMaxL = createMediaQuery(CONDITIONS.MAX, 'l')\n\n/**\n * @return `@media screen and (min-width: 1280px) { ...args }`\n */\nexport const screenMinL = createMediaQuery(CONDITIONS.MIN, 'l')\n\n/**\n * @return `@media screen and (max-width: 1439px) { ...args }`\n */\nexport const screenMaxXl = createMediaQuery(CONDITIONS.MAX, 'xl')\n\n/**\n * @return `@media screen and (min-width: 1440px) { ...args }`\n */\nexport const screenMinXl = createMediaQuery(CONDITIONS.MIN, 'xl')\n\n/**\n * @return `@media -webkit-min-device-pixel-ratio: 2 and (min-resolution: 192dpi) { ...args }`\n */\nexport const screenRetina = (...args: [CSSObject | TemplateStringsArray, SimpleInterpolation]) => css`\n @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {\n ${css(...args)}\n }\n`\n\nexport type MediaQuery = ReturnType<typeof createMediaQuery>\n"],"names":["CONDITIONS","maxWidth","breakpoints","point","minWidth","MAX","MIN","RANGE","point1","point2","createMediaQuery","condition","points","params","args","props","BREAKPOINTS","theme","undefined","css","and","screenXs","screenS","screenM","screenL","screenXl","screenMaxXxs","screenMaxXs","screenMinXs","screenMaxS","screenMinS","screenMaxM","screenMinM","screenMaxL","screenMinL","screenMaxXl","screenMinXl","screenRetina"],"mappings":"oFAcA,MAAMA,WAAa,MACjB,MAAMC,SAAWA,CAACC,EAA+BC,IAC/C,eAAeD,EAAYC,GAAS,SACtC,MAAMC,SAAWA,CAACF,EAA+BC,IAAyB,eAAeD,EAAYC,QAErG,MAAO,CACLE,IAAKJ,SACLK,IAAKF,SACLG,MAAOA,CAACL,EAA+BM,EAAuBC,IAC5D,GAAGL,SAASF,EAAaM,UAAeP,SAASC,EAAaO,KAEnE,EAXkB,SAaNC,iBACXA,CAACC,KAAuFC,IACvFC,GACD,IAAsBC,IACrBC,IAEC,MAAMb,EAAgC,IAAKc,eADhBD,EAAME,OAAOf,aAAe,CAAA,GAGvD,OAAIW,SAAWK,UAAoBL,EAAOF,WAAc,YAAcE,EAAOF,UAAUI,MAAW,EACzF,GAGFI,IAAG,CAAA,qBAAA,IAAA,IAAA,KAEYR,EAAUT,KAAgBU,GAAWC,SAAWK,UAAoBL,EAAOO,KAAQ,SACjG,OAAOP,EAAOO,MACd,GACFD,OAAUL,
|
|
1
|
+
{"version":3,"file":"screen.mjs","sources":["../../../src/mixins/screen.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { CSSObject, ThemeProps, DefaultTheme, SimpleInterpolation, Interpolation } from 'styled-components'\nimport { BREAKPOINTS } from 'shared/constants'\n\ntype MediaQueryParams = {\n and?: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n condition?: (_props: any) => boolean\n}\n\ntype ThemeBreakpoints = DefaultTheme['breakpoints']\n\ntype BreakpointKey = keyof ThemeBreakpoints\n\nconst CONDITIONS = (() => {\n const maxWidth = (breakpoints: ThemeBreakpoints, point: BreakpointKey) =>\n `(max-width: ${breakpoints[point] - 0.02}px)`\n const minWidth = (breakpoints: ThemeBreakpoints, point: BreakpointKey) => `(min-width: ${breakpoints[point]}px)`\n\n return {\n MAX: maxWidth,\n MIN: minWidth,\n RANGE: (breakpoints: ThemeBreakpoints, point1: BreakpointKey, point2: BreakpointKey) =>\n `${minWidth(breakpoints, point1)} and ${maxWidth(breakpoints, point2)}`,\n }\n})()\n\nexport const createMediaQuery =\n (condition: (_breakpoints: ThemeBreakpoints, ..._points: BreakpointKey[]) => string, ...points: BreakpointKey[]) =>\n (params?: MediaQueryParams) =>\n <T extends object>(...args: [CSSObject | TemplateStringsArray, ...Interpolation<T & ThemeProps<DefaultTheme>>[]]) =>\n (props: ThemeProps<DefaultTheme>) => {\n const contextBreakpoints = props.theme?.breakpoints ?? {}\n const breakpoints: ThemeBreakpoints = { ...BREAKPOINTS, ...contextBreakpoints }\n\n if (params !== undefined && typeof params.condition === 'function' && params.condition(props) === false) {\n return ''\n }\n\n return css<T>`\n /* stylelint-disable-next-line media-query-no-invalid */\n @media screen and ${condition(breakpoints, ...points)} ${params !== undefined && typeof params.and === 'string'\n ? `and ${params.and}`\n : ``} {\n ${css<T>(...args)}\n }\n `\n }\n\n/**\n * @return `@media screen and (min-width: 320px) and (max-width: 374px) { ...args }`\n */\nexport const screenXs = createMediaQuery(CONDITIONS.RANGE, 'xxs', 'xs')\n\n/**\n * @return `@media screen and (min-width: 375px) and (max-width: 767px) { ...args }`\n */\nexport const screenS = createMediaQuery(CONDITIONS.RANGE, 'xs', 's')\n\n/**\n * @return `@media screen and (min-width: 768) and (max-width: 1023px) { ...args }`\n */\nexport const screenM = createMediaQuery(CONDITIONS.RANGE, 's', 'm')\n\n/**\n * @return `@media screen and (min-width: 1024px) and (max-width: 1279px) { ...args }`\n */\nexport const screenL = createMediaQuery(CONDITIONS.RANGE, 'm', 'l')\n\n/**\n * @return `@media screen and (min-width: 1280px) and (max-width: 1439px) { ...args }`\n */\nexport const screenXl = createMediaQuery(CONDITIONS.RANGE, 'l', 'xl')\n\n/**\n * @return `@media screen and (max-width: 319px) { ...args }`\n */\nexport const screenMaxXxs = createMediaQuery(CONDITIONS.MAX, 'xxs')\n\n/**\n * @return `@media screen and (max-width: 374px) { ...args }`\n */\nexport const screenMaxXs = createMediaQuery(CONDITIONS.MAX, 'xs')\n\n/**\n * @return `@media screen and (min-width: 375px) { ...args }`\n */\nexport const screenMinXs = createMediaQuery(CONDITIONS.MIN, 'xs')\n\n/**\n * @return `@media screen and (max-width: 767px) { ...args }`\n */\nexport const screenMaxS = createMediaQuery(CONDITIONS.MAX, 's')\n\n/**\n * @return `@media screen and (min-width: 768px) { ...args }`\n */\nexport const screenMinS = createMediaQuery(CONDITIONS.MIN, 's')\n\n/**\n * @return `@media screen and (max-width: 1023px) { ...args }`\n */\nexport const screenMaxM = createMediaQuery(CONDITIONS.MAX, 'm')\n\n/**\n * @return `@media screen and (min-width: 1024px) { ...args }`\n */\nexport const screenMinM = createMediaQuery(CONDITIONS.MIN, 'm')\n\n/**\n * @return `@media screen and (max-width: 1279px) { ...args }`\n */\nexport const screenMaxL = createMediaQuery(CONDITIONS.MAX, 'l')\n\n/**\n * @return `@media screen and (min-width: 1280px) { ...args }`\n */\nexport const screenMinL = createMediaQuery(CONDITIONS.MIN, 'l')\n\n/**\n * @return `@media screen and (max-width: 1439px) { ...args }`\n */\nexport const screenMaxXl = createMediaQuery(CONDITIONS.MAX, 'xl')\n\n/**\n * @return `@media screen and (min-width: 1440px) { ...args }`\n */\nexport const screenMinXl = createMediaQuery(CONDITIONS.MIN, 'xl')\n\n/**\n * @return `@media -webkit-min-device-pixel-ratio: 2 and (min-resolution: 192dpi) { ...args }`\n */\nexport const screenRetina = (...args: [CSSObject | TemplateStringsArray, SimpleInterpolation]) => css`\n @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {\n ${css(...args)}\n }\n`\n\nexport type MediaQuery = ReturnType<typeof createMediaQuery>\n"],"names":["CONDITIONS","maxWidth","breakpoints","point","minWidth","MAX","MIN","RANGE","point1","point2","createMediaQuery","condition","points","params","args","props","BREAKPOINTS","theme","undefined","css","and","screenXs","screenS","screenM","screenL","screenXl","screenMaxXxs","screenMaxXs","screenMinXs","screenMaxS","screenMinS","screenMaxM","screenMinM","screenMaxL","screenMinL","screenMaxXl","screenMinXl","screenRetina"],"mappings":"oFAcA,MAAMA,WAAa,MACjB,MAAMC,SAAWA,CAACC,EAA+BC,IAC/C,eAAeD,EAAYC,GAAS,SACtC,MAAMC,SAAWA,CAACF,EAA+BC,IAAyB,eAAeD,EAAYC,QAErG,MAAO,CACLE,IAAKJ,SACLK,IAAKF,SACLG,MAAOA,CAACL,EAA+BM,EAAuBC,IAC5D,GAAGL,SAASF,EAAaM,UAAeP,SAASC,EAAaO,KAEnE,EAXkB,SAaNC,iBACXA,CAACC,KAAuFC,IACvFC,GACD,IAAsBC,IACrBC,IAEC,MAAMb,EAAgC,IAAKc,eADhBD,EAAME,OAAOf,aAAe,CAAA,GAGvD,OAAIW,SAAWK,UAAoBL,EAAOF,WAAc,YAAcE,EAAOF,UAAUI,MAAW,EACzF,GAGFI,IAAG,CAAA,qBAAA,IAAA,IAAA,KAEYR,EAAUT,KAAgBU,GAAWC,SAAWK,UAAoBL,EAAOO,KAAQ,SACjG,OAAOP,EAAOO,MACd,GACFD,OAAUL,KAQb,MAAMO,SAAWX,iBAAiBV,WAAWO,MAAO,MAAO,MAK3D,MAAMe,QAAUZ,iBAAiBV,WAAWO,MAAO,KAAM,KAKzD,MAAMgB,QAAUb,iBAAiBV,WAAWO,MAAO,IAAK,KAKxD,MAAMiB,QAAUd,iBAAiBV,WAAWO,MAAO,IAAK,KAKxD,MAAMkB,SAAWf,iBAAiBV,WAAWO,MAAO,IAAK,MAKzD,MAAMmB,aAAehB,iBAAiBV,WAAWK,IAAK,OAKtD,MAAMsB,YAAcjB,iBAAiBV,WAAWK,IAAK,MAKrD,MAAMuB,YAAclB,iBAAiBV,WAAWM,IAAK,MAKrD,MAAMuB,WAAanB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAMyB,WAAapB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAMyB,WAAarB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAM2B,WAAatB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAM2B,WAAavB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAM6B,WAAaxB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAM6B,YAAczB,iBAAiBV,WAAWK,IAAK,MAKrD,MAAM+B,YAAc1B,iBAAiBV,WAAWM,IAAK,MAKrD,MAAM+B,aAAeA,IAAIvB,IAAkEK,IAAG,CAAA,qEAAA,KAE/FA,OAAOL"}
|
package/mixins/shared.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
${s(S,n)}
|
|
3
3
|
`:t()`
|
|
4
4
|
${s}: ${String(S)}${typeof S=='string'?'':n??''};
|
|
5
|
-
`)},exports.desktopFirst=(e,s)=>{const t=getKey(e);const n=getKey(s);return t&&n?DESKTOP_FIRST_KEYS.findIndex(
|
|
5
|
+
`)},exports.desktopFirst=(e,s)=>{const t=getKey(e);const n=getKey(s);return t&&n?DESKTOP_FIRST_KEYS.findIndex(e=>e===t)<DESKTOP_FIRST_KEYS.findIndex(e=>e===n)?-1:1:0},exports.getLatinSizeMapByCssProperty=getLatinSizeMapByCssProperty,exports.getMediaQueryByResponsiveProp=e=>e.endsWith('XXS')?screen.screenMaxXxs:e.endsWith('XS')?screen.screenMaxXs:e.endsWith('S')?screen.screenMaxS:e.endsWith('M')?screen.screenMaxM:e.endsWith('XL')?screen.screenMinL:screen.screenMaxL,exports.mobileFirst=(e,s)=>{const t=getKey(e);const n=getKey(s);return t&&n?MOBILE_FIRST_KEYS.findIndex(e=>e===t)<MOBILE_FIRST_KEYS.findIndex(e=>e===n)?-1:1:0};
|
|
6
6
|
//# sourceMappingURL=shared.js.map
|