glints-aries 4.0.159 → 4.0.161
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/README.md +17 -0
- package/es/Display/Accordion/Accordion.js +10 -22
- package/es/Display/Accordion/Accordion.stories.js +4 -6
- package/es/Display/Accordion/AccordionPanel.js +10 -16
- package/es/Display/Accordion/AccordionStyle.js +2 -6
- package/es/Display/Collapsible/Collapsible.js +6 -9
- package/es/Display/Collapsible/Collapsible.stories.js +1 -4
- package/es/Display/Collapsible/CollapsibleStyle.js +0 -1
- package/es/Display/Gallery/Gallery.js +13 -23
- package/es/Display/Gallery/Gallery.stories.js +2 -4
- package/es/Display/Gallery/GalleryStyle.js +0 -1
- package/es/Display/Modal/Modal.js +22 -27
- package/es/Display/Modal/Modal.stories.js +6 -10
- package/es/Display/Modal/ModalStyle.js +2 -14
- package/es/Display/Modal/utils.js +0 -3
- package/es/Display/PointingModal/PointingModal.js +2 -5
- package/es/Display/PointingModal/PointingModal.stories.js +2 -4
- package/es/Display/PointingModal/PointingModalBody.js +2 -5
- package/es/Display/PointingModal/PointingModalFooter.js +2 -5
- package/es/Display/PointingModal/PointingModalHeader.js +2 -5
- package/es/Display/PointingModal/PointingModalItem.js +2 -5
- package/es/Display/Popover/Popover.js +4 -10
- package/es/Display/Popover/Popover.stories.js +2 -4
- package/es/Display/Slider/LeftArrow.js +3 -5
- package/es/Display/Slider/RightArrow.js +4 -6
- package/es/Display/Slider/Slider.js +22 -40
- package/es/Display/Slider/Slider.stories.js +2 -4
- package/es/Display/Slider/SliderItem.js +0 -2
- package/es/Display/Swipeable/Swipeable.js +2 -2
- package/es/Display/Swipeable/Swipeable.stories.js +2 -4
- package/es/Display/Swipeable/SwipeableItem.js +2 -5
- package/es/Display/Tabs/TabPane.js +2 -5
- package/es/Display/Tabs/Tabs.js +9 -15
- package/es/Display/Tabs/Tabs.stories.js +3 -7
- package/es/Display/Tabs/TabsStyle.js +1 -6
- package/es/Display/Tooltip/Tooltip.js +11 -18
- package/es/Display/Tooltip/Tooltip.stories.js +3 -8
- package/es/Display/Tooltip/TooltipStyle.js +0 -4
- package/es/General/@next/Typography/Typography.d.ts +1 -1
- package/es/General/@next/Typography/Typography.js +4 -8
- package/es/General/@next/Typography/Typography.stories.js +0 -2
- package/es/General/@next/Typography/TypographyStyles.js +0 -1
- package/es/General/Alert/Alert.js +34 -44
- package/es/General/Alert/Alert.stories.js +2 -5
- package/es/General/Badge/Badge.js +4 -5
- package/es/General/Badge/Badge.stories.js +0 -2
- package/es/General/Badge/BadgeStyle.js +0 -4
- package/es/General/Brand/Brand.js +5 -15
- package/es/General/Brand/Brand.stories.js +0 -2
- package/es/General/Button/Button.js +15 -27
- package/es/General/Button/Button.stories.js +0 -2
- package/es/General/Button/ButtonStyle.js +8 -23
- package/es/General/Button/GhostButton.js +9 -13
- package/es/General/Button/LinkButton.js +4 -8
- package/es/General/Button/SolidButton.js +9 -13
- package/es/General/Button/SolidShadowButton.js +8 -12
- package/es/General/Divider/Divider.js +4 -5
- package/es/General/Divider/Divider.stories.js +0 -2
- package/es/General/Divider/DividerStyle.js +0 -6
- package/es/General/Heading/Heading.js +6 -7
- package/es/General/Heading/Heading.stories.js +1 -4
- package/es/General/Icon/Icon.js +10 -13
- package/es/General/Icon/IconStoriesHelpers.js +2 -3
- package/es/General/Icon/LegacyIcon.js +1 -6
- package/es/General/Icon/components/AddCircleOutlineIcon.js +0 -2
- package/es/General/Icon/components/AddCircleSolidIcon.js +0 -2
- package/es/General/Icon/components/AddIcon.js +0 -2
- package/es/General/Icon/components/ArrowBackDoubleIcon.js +0 -2
- package/es/General/Icon/components/ArrowBackIcon.js +0 -2
- package/es/General/Icon/components/ArrowBackSolidIcon.js +0 -2
- package/es/General/Icon/components/ArrowDownCircleOutlineIcon.js +0 -2
- package/es/General/Icon/components/ArrowDownIcon.js +0 -2
- package/es/General/Icon/components/ArrowDownSolidIcon.js +0 -2
- package/es/General/Icon/components/ArrowNextDoubleIcon.js +0 -2
- package/es/General/Icon/components/ArrowNextIcon.js +0 -2
- package/es/General/Icon/components/ArrowNextSolidIcon.js +0 -2
- package/es/General/Icon/components/ArrowRoundBackIcon.js +0 -2
- package/es/General/Icon/components/ArrowRoundForwardIcon.js +0 -2
- package/es/General/Icon/components/ArrowUpIcon.js +0 -2
- package/es/General/Icon/components/ArrowUpSolidIcon.js +0 -2
- package/es/General/Icon/components/AsteriskSolidIcon.js +0 -2
- package/es/General/Icon/components/AttachmentIcon.js +0 -2
- package/es/General/Icon/components/BehanceIcon.js +0 -2
- package/es/General/Icon/components/BellIcon.js +0 -2
- package/es/General/Icon/components/BookmarkIcon.js +0 -2
- package/es/General/Icon/components/BookmarkOutlineIcon.js +0 -2
- package/es/General/Icon/components/BookmarkRoundedOutlineIcon.js +0 -2
- package/es/General/Icon/components/BoxWithHandleSolidIcon.js +0 -2
- package/es/General/Icon/components/BriefcaseSolidIcon.js +0 -2
- package/es/General/Icon/components/BuildingSolidIcon.js +0 -2
- package/es/General/Icon/components/BulletListIcon.js +0 -2
- package/es/General/Icon/components/CalendarIcon.js +0 -2
- package/es/General/Icon/components/CameraIcon.js +0 -2
- package/es/General/Icon/components/ChecklistIcon.js +0 -2
- package/es/General/Icon/components/CheckmarkIcon.js +0 -2
- package/es/General/Icon/components/CheckmarkSolidIcon.js +0 -2
- package/es/General/Icon/components/CheckmarkThickIcon.js +0 -2
- package/es/General/Icon/components/CircleAndCheckIcon.js +0 -2
- package/es/General/Icon/components/CircleIcon.js +0 -2
- package/es/General/Icon/components/ClipboardCheckOutlineIcon.js +0 -2
- package/es/General/Icon/components/ClipboardIcon.js +0 -2
- package/es/General/Icon/components/ClockIcon.js +0 -2
- package/es/General/Icon/components/CloseCircleSolidIcon.js +0 -2
- package/es/General/Icon/components/CloseIcon.js +0 -2
- package/es/General/Icon/components/CloudDownloadIcon.js +0 -2
- package/es/General/Icon/components/CloudUploadIcon.js +0 -2
- package/es/General/Icon/components/CodepenIcon.js +0 -2
- package/es/General/Icon/components/CommunityIcon.js +0 -2
- package/es/General/Icon/components/CompassIcon.js +0 -2
- package/es/General/Icon/components/ConnectionIcon.js +0 -2
- package/es/General/Icon/components/CopyIcon.js +0 -2
- package/es/General/Icon/components/CopyLinkIcon.js +0 -2
- package/es/General/Icon/components/CopyOutlinedIcon.js +0 -2
- package/es/General/Icon/components/CurrencyIcon.js +0 -2
- package/es/General/Icon/components/DeleteIcon.js +0 -2
- package/es/General/Icon/components/DiscountSolidIcon.js +0 -2
- package/es/General/Icon/components/DocumentCheckIcon.js +0 -2
- package/es/General/Icon/components/DotIcon.js +0 -2
- package/es/General/Icon/components/DoubleCheckmarkIcon.js +0 -2
- package/es/General/Icon/components/DoveIcon.js +0 -2
- package/es/General/Icon/components/DownloadIcon.js +0 -2
- package/es/General/Icon/components/DragArrowIcon.js +0 -2
- package/es/General/Icon/components/DragStripesIcon.js +0 -2
- package/es/General/Icon/components/EditIcon.js +0 -2
- package/es/General/Icon/components/EditOutlineIcon.js +0 -2
- package/es/General/Icon/components/ExclamationIcon.js +0 -2
- package/es/General/Icon/components/ExitFullScreenIcon.js +0 -2
- package/es/General/Icon/components/ExternalLinkIcon.js +0 -2
- package/es/General/Icon/components/EyeIcon.js +0 -2
- package/es/General/Icon/components/EyeSlashedIcon.js +0 -2
- package/es/General/Icon/components/EyeSolidIcon.js +0 -2
- package/es/General/Icon/components/FacebookIcon.js +0 -2
- package/es/General/Icon/components/FileAlternateIcon.js +0 -2
- package/es/General/Icon/components/FileIcon.js +0 -2
- package/es/General/Icon/components/FilePreviewIcon.js +0 -2
- package/es/General/Icon/components/FileSolidIcon.js +0 -2
- package/es/General/Icon/components/FilterIcon.js +0 -2
- package/es/General/Icon/components/FlagIcon.js +0 -2
- package/es/General/Icon/components/FolderIcon.js +0 -2
- package/es/General/Icon/components/FullScreenIcon.js +0 -2
- package/es/General/Icon/components/GithubIcon.js +0 -2
- package/es/General/Icon/components/GlobeIcon.js +0 -2
- package/es/General/Icon/components/GraduationHatIcon.js +0 -2
- package/es/General/Icon/components/GroupIcon.js +0 -2
- package/es/General/Icon/components/GuaranteeIcon.js +0 -2
- package/es/General/Icon/components/HandIcon.js +0 -2
- package/es/General/Icon/components/HandShakeIcon.js +0 -2
- package/es/General/Icon/components/HeartIcon.js +0 -2
- package/es/General/Icon/components/HeartSolidIcon.js +0 -2
- package/es/General/Icon/components/HelpIcon.js +0 -2
- package/es/General/Icon/components/HomeIcon.js +0 -2
- package/es/General/Icon/components/HourglassIcon.js +0 -2
- package/es/General/Icon/components/ImageIcon.js +0 -2
- package/es/General/Icon/components/InfoIcon.js +0 -2
- package/es/General/Icon/components/InfoSolidIcon.js +0 -2
- package/es/General/Icon/components/InstagramIcon.js +0 -2
- package/es/General/Icon/components/JobOutlineIcon.js +0 -2
- package/es/General/Icon/components/JobSearchIcon.js +0 -2
- package/es/General/Icon/components/LightbulbIcon.js +0 -2
- package/es/General/Icon/components/LightningOutlineIcon.js +0 -2
- package/es/General/Icon/components/LineIcon.js +0 -2
- package/es/General/Icon/components/LinkedinIcon.js +0 -2
- package/es/General/Icon/components/LoadingIcon.js +0 -2
- package/es/General/Icon/components/LocationIcon.js +0 -2
- package/es/General/Icon/components/LockSolidIcon.js +0 -2
- package/es/General/Icon/components/MailIcon.js +0 -2
- package/es/General/Icon/components/MailSolidIcon.js +0 -2
- package/es/General/Icon/components/MedalIcon.js +0 -2
- package/es/General/Icon/components/MenuHalfIcon.js +0 -2
- package/es/General/Icon/components/MenuIcon.js +0 -2
- package/es/General/Icon/components/MessageOutlineIcon.js +0 -2
- package/es/General/Icon/components/MessageOutlineIncomingIcon.js +0 -2
- package/es/General/Icon/components/MicIcon.js +0 -2
- package/es/General/Icon/components/MicOffIcon.js +0 -2
- package/es/General/Icon/components/MinusCircleIcon.js +0 -2
- package/es/General/Icon/components/MinusCircleSolidIcon.js +0 -2
- package/es/General/Icon/components/MinusIcon.js +0 -2
- package/es/General/Icon/components/MoreHorizontalIcon.js +0 -2
- package/es/General/Icon/components/MoreIcon.js +0 -2
- package/es/General/Icon/components/NameTagIcon.js +0 -2
- package/es/General/Icon/components/NotificationIcon.js +0 -2
- package/es/General/Icon/components/NumberListIcon.js +0 -2
- package/es/General/Icon/components/OnlineIcon.js +0 -2
- package/es/General/Icon/components/PdfIcon.js +0 -2
- package/es/General/Icon/components/PdfOutlineIcon.js +0 -2
- package/es/General/Icon/components/PhoneIcon.js +0 -2
- package/es/General/Icon/components/PowerIcon.js +0 -2
- package/es/General/Icon/components/PuzzleIcon.js +0 -2
- package/es/General/Icon/components/QuestionOutlineIcon.js +0 -2
- package/es/General/Icon/components/QuotationIcon.js +0 -2
- package/es/General/Icon/components/RefreshSolidIcon.js +0 -2
- package/es/General/Icon/components/ReplyIcon.js +0 -2
- package/es/General/Icon/components/ResumeOutlineIcon.js +0 -2
- package/es/General/Icon/components/RotateIcon.js +0 -2
- package/es/General/Icon/components/RssIcon.js +0 -2
- package/es/General/Icon/components/SalaryIcon.js +0 -2
- package/es/General/Icon/components/SaveSolidIcon.js +0 -2
- package/es/General/Icon/components/SearchIcon.js +0 -2
- package/es/General/Icon/components/SendIcon.js +0 -2
- package/es/General/Icon/components/SettingIcon.js +0 -2
- package/es/General/Icon/components/SettingSolidIcon.js +0 -2
- package/es/General/Icon/components/ShareArrowIcon.js +0 -2
- package/es/General/Icon/components/ShareArrowOutlineIcon.js +0 -2
- package/es/General/Icon/components/ShareIcon.js +0 -2
- package/es/General/Icon/components/ShareOutlineIcon.js +0 -2
- package/es/General/Icon/components/ShareScreenIcon.js +0 -2
- package/es/General/Icon/components/ShieldCheckIcon.js +0 -2
- package/es/General/Icon/components/SpeakerIcon.js +0 -2
- package/es/General/Icon/components/SpeechBubbleIcon.js +0 -2
- package/es/General/Icon/components/SpeechBubbleOutlineIcon.js +0 -2
- package/es/General/Icon/components/SpinnerIcon.js +0 -2
- package/es/General/Icon/components/StackIcon.js +0 -2
- package/es/General/Icon/components/StarCircleIcon.js +0 -2
- package/es/General/Icon/components/StarIcon.js +0 -2
- package/es/General/Icon/components/StarOutlineIcon.js +0 -2
- package/es/General/Icon/components/TagIcon.js +0 -2
- package/es/General/Icon/components/TaskIcon.js +0 -2
- package/es/General/Icon/components/TelegramIcon.js +0 -2
- package/es/General/Icon/components/ThumbsUpIcon.js +0 -2
- package/es/General/Icon/components/ThumbsUpOutlineIcon.js +0 -2
- package/es/General/Icon/components/TicketSolidIcon.js +0 -2
- package/es/General/Icon/components/TieIcon.js +0 -2
- package/es/General/Icon/components/TrashIcon.js +0 -2
- package/es/General/Icon/components/TvPlayIcon.js +0 -2
- package/es/General/Icon/components/TwitterIcon.js +0 -2
- package/es/General/Icon/components/UploadIcon.js +0 -2
- package/es/General/Icon/components/UpvoteIcon.js +0 -2
- package/es/General/Icon/components/UserCogIcon.js +0 -2
- package/es/General/Icon/components/UserIcon.js +0 -2
- package/es/General/Icon/components/UserWrenchIcon.js +0 -2
- package/es/General/Icon/components/VideoIcon.js +0 -2
- package/es/General/Icon/components/VideoOffIcon.js +0 -2
- package/es/General/Icon/components/ViewIcon.js +0 -2
- package/es/General/Icon/components/VimeoIcon.js +0 -2
- package/es/General/Icon/components/WarningCircleSolidIcon.js +0 -2
- package/es/General/Icon/components/WarningIcon.js +0 -2
- package/es/General/Icon/components/WarningOutlineIcon.js +0 -2
- package/es/General/Icon/components/WarningSolidIcon.js +0 -2
- package/es/General/Icon/components/WhatsappIcon.js +0 -2
- package/es/General/Icon/components/YoutubeIcon.js +0 -2
- package/es/General/Icon/components/ZaloIcon.js +0 -2
- package/es/General/Icon/components/index.d.ts +4 -4
- package/es/General/Loading/Loading.js +1 -1
- package/es/General/Loading/Loading.stories.js +0 -2
- package/es/General/ProfilePicture/ProfilePicture.js +5 -11
- package/es/General/ProfilePicture/ProfilePicture.stories.js +0 -2
- package/es/General/ProfilePicture/ProfilePictureStyle.js +0 -4
- package/es/General/Tag/BasicTag.js +5 -8
- package/es/General/Tag/Tag.js +9 -15
- package/es/General/Tag/Tag.stories.js +0 -2
- package/es/General/Tag/TagStyle.js +0 -2
- package/es/General/Typography/Paragraph.js +12 -13
- package/es/General/Typography/Paragraph.stories.js +0 -2
- package/es/General/Typography/ParagraphStyles.js +0 -1
- package/es/General/Typography/Title.js +10 -11
- package/es/General/Typography/Title.stories.js +0 -2
- package/es/General/Typography/TitleStyles.js +0 -7
- package/es/General/Typography/Typography.js +0 -2
- package/es/Input/Checkbox/Checkbox.js +14 -22
- package/es/Input/Checkbox/Checkbox.stories.js +0 -4
- package/es/Input/Datepicker/Datepicker.js +20 -81
- package/es/Input/Datepicker/DatepickerStyle.js +1 -1
- package/es/Input/DownshiftSelect/Select.js +96 -116
- package/es/Input/DownshiftSelect/Select.stories.js +18 -35
- package/es/Input/DownshiftSelect/SelectStyle.js +1 -1
- package/es/Input/NumberInput/NumberInput.js +0 -1
- package/es/Input/NumberInput/NumberInput.stories.js +2 -5
- package/es/Input/PhoneNumberInput/PhoneNumberInput.js +51 -65
- package/es/Input/PhoneNumberInput/PhoneNumberInput.stories.js +9 -17
- package/es/Input/PhoneNumberInput/PhoneNumberInputStyles.js +0 -2
- package/es/Input/RadioButton/RadioButton.js +14 -15
- package/es/Input/RadioButton/RadioButton.stories.js +0 -2
- package/es/Input/RadioButton/RadioButtonStyle.js +7 -14
- package/es/Input/Select/Select.js +61 -90
- package/es/Input/Select/Select.stories.js +0 -2
- package/es/Input/Select/SelectItem.js +3 -6
- package/es/Input/Select/SelectList.js +10 -13
- package/es/Input/Select/SelectStyle.js +5 -16
- package/es/Input/TextField/TextField.js +23 -31
- package/es/Input/TextField/TextField.stories.js +2 -5
- package/es/Input/TextField/TextFieldStyle.js +3 -9
- package/es/Input/Textarea/Textarea.js +23 -32
- package/es/Input/Textarea/Textarea.stories.js +0 -2
- package/es/Input/Textarea/TextareaStyle.js +0 -1
- package/es/Input/ToggleSwitch/ToggleSwitch.js +8 -16
- package/es/Input/ToggleSwitch/ToggleSwitch.stories.js +0 -2
- package/es/Layout/Box/Box.stories.js +0 -2
- package/es/Layout/Box/constants.js +2 -7
- package/es/Layout/Box/index.js +0 -1
- package/es/Layout/Flex/Flex.stories.js +3 -10
- package/es/Layout/Flex/index.js +8 -9
- package/es/Layout/Grid/Col.js +13 -20
- package/es/Layout/Grid/GridStyle.js +5 -9
- package/es/Layout/Grid/Row.js +3 -6
- package/es/Navigation/Breadcrumb/Breadcrumb.js +2 -3
- package/es/Navigation/Breadcrumb/Breadcrumb.stories.js +0 -2
- package/es/Navigation/Breadcrumb/BreadcrumbItem.js +3 -6
- package/es/Navigation/Drawer/Drawer.js +6 -11
- package/es/Navigation/Drawer/Drawer.stories.js +2 -5
- package/es/Navigation/Drawer/DrawerStyle.js +2 -2
- package/es/Navigation/Dropdown/Dropdown.js +30 -44
- package/es/Navigation/Dropdown/Dropdown.stories.js +0 -2
- package/es/Navigation/Dropdown/DropdownItem.js +2 -5
- package/es/Navigation/Dropdown/DropdownStyle.js +5 -16
- package/es/Utils/ColorsStoriesHelpers.js +2 -2
- package/es/Utils/DelayedUnmount.js +5 -7
- package/es/Utils/DomUtils.js +1 -5
- package/es/Utils/Icon/generateIcons.js +2 -8
- package/es/Utils/Matcher.js +0 -2
- package/es/Utils/StyleConfig.js +0 -6
- package/es/Utils/Unit.js +0 -8
- package/es/Utils/getReadableColor.js +0 -1
- package/es/Utils/useOutsideAlerter.js +1 -2
- package/es/index.js +11 -6
- package/es/stories/story-components/AriesStatus.js +2 -3
- package/lib/Display/Accordion/Accordion.js +10 -32
- package/lib/Display/Accordion/Accordion.stories.js +4 -11
- package/lib/Display/Accordion/AccordionPanel.js +10 -25
- package/lib/Display/Accordion/AccordionStyle.js +2 -25
- package/lib/Display/Accordion/index.js +0 -3
- package/lib/Display/Collapsible/Collapsible.js +8 -24
- package/lib/Display/Collapsible/Collapsible.stories.js +1 -9
- package/lib/Display/Collapsible/CollapsibleStyle.js +0 -14
- package/lib/Display/Collapsible/index.js +0 -3
- package/lib/Display/Gallery/Gallery.js +13 -30
- package/lib/Display/Gallery/Gallery.stories.js +2 -9
- package/lib/Display/Gallery/GalleryStyle.js +0 -14
- package/lib/Display/Gallery/index.js +0 -3
- package/lib/Display/Modal/Modal.js +24 -45
- package/lib/Display/Modal/Modal.stories.js +9 -25
- package/lib/Display/Modal/ModalStyle.js +2 -31
- package/lib/Display/Modal/index.js +0 -3
- package/lib/Display/Modal/utils.js +0 -5
- package/lib/Display/PointingModal/PointingModal.js +2 -17
- package/lib/Display/PointingModal/PointingModal.stories.js +2 -11
- package/lib/Display/PointingModal/PointingModalBody.js +2 -13
- package/lib/Display/PointingModal/PointingModalFooter.js +2 -13
- package/lib/Display/PointingModal/PointingModalHeader.js +2 -13
- package/lib/Display/PointingModal/PointingModalItem.js +2 -13
- package/lib/Display/PointingModal/PointingModalStyle.js +0 -16
- package/lib/Display/PointingModal/index.js +0 -3
- package/lib/Display/Popover/Popover.js +4 -17
- package/lib/Display/Popover/Popover.stories.js +2 -11
- package/lib/Display/Popover/PopoverStyle.js +0 -16
- package/lib/Display/Popover/index.js +0 -3
- package/lib/Display/Slider/LeftArrow.js +3 -11
- package/lib/Display/Slider/RightArrow.js +4 -12
- package/lib/Display/Slider/Slider.js +28 -59
- package/lib/Display/Slider/Slider.stories.js +2 -16
- package/lib/Display/Slider/SliderItem.js +0 -6
- package/lib/Display/Slider/SliderStyle.js +0 -20
- package/lib/Display/Slider/index.js +0 -3
- package/lib/Display/Slider/utils.js +0 -3
- package/lib/Display/Swipeable/Swipeable.js +1 -10
- package/lib/Display/Swipeable/Swipeable.stories.js +2 -9
- package/lib/Display/Swipeable/SwipeableItem.js +2 -13
- package/lib/Display/Swipeable/SwipeableStyle.js +0 -11
- package/lib/Display/Swipeable/index.js +0 -3
- package/lib/Display/Tabs/TabPane.js +2 -12
- package/lib/Display/Tabs/Tabs.js +9 -24
- package/lib/Display/Tabs/Tabs.stories.js +3 -12
- package/lib/Display/Tabs/TabsStyle.js +1 -17
- package/lib/Display/Tabs/index.js +0 -3
- package/lib/Display/Tooltip/Tooltip.js +11 -28
- package/lib/Display/Tooltip/Tooltip.stories.js +3 -15
- package/lib/Display/Tooltip/TooltipStyle.js +0 -13
- package/lib/Display/Tooltip/index.js +0 -3
- package/lib/General/@next/Typography/Typography.d.ts +1 -1
- package/lib/General/@next/Typography/Typography.js +4 -15
- package/lib/General/@next/Typography/Typography.stories.js +0 -10
- package/lib/General/@next/Typography/TypographyStyles.js +0 -9
- package/lib/General/@next/Typography/index.js +0 -2
- package/lib/General/Alert/Alert.js +34 -56
- package/lib/General/Alert/Alert.stories.js +2 -14
- package/lib/General/Alert/AlertStyle.js +0 -14
- package/lib/General/Alert/index.js +0 -3
- package/lib/General/Badge/Badge.js +6 -19
- package/lib/General/Badge/Badge.stories.js +0 -10
- package/lib/General/Badge/BadgeStyle.js +0 -11
- package/lib/General/Badge/index.js +0 -3
- package/lib/General/Brand/Brand.js +5 -24
- package/lib/General/Brand/Brand.stories.js +0 -7
- package/lib/General/Brand/BrandStyle.js +0 -6
- package/lib/General/Brand/index.js +0 -3
- package/lib/General/Button/Button.js +15 -45
- package/lib/General/Button/Button.stories.js +0 -21
- package/lib/General/Button/ButtonStyle.js +8 -44
- package/lib/General/Button/GhostButton.js +9 -23
- package/lib/General/Button/LinkButton.js +4 -18
- package/lib/General/Button/SolidButton.js +9 -23
- package/lib/General/Button/SolidShadowButton.js +8 -22
- package/lib/General/Button/index.js +0 -3
- package/lib/General/Divider/Divider.js +3 -12
- package/lib/General/Divider/Divider.stories.js +0 -8
- package/lib/General/Divider/DividerStyle.js +0 -11
- package/lib/General/Divider/index.js +0 -3
- package/lib/General/Heading/Heading.js +6 -15
- package/lib/General/Heading/Heading.stories.js +1 -9
- package/lib/General/Heading/HeadingStyle.js +0 -5
- package/lib/General/Heading/index.js +0 -3
- package/lib/General/Icon/Icon.js +10 -21
- package/lib/General/Icon/IconStoriesHelpers.js +4 -22
- package/lib/General/Icon/IconStyle.js +0 -4
- package/lib/General/Icon/LegacyIcon.js +3 -13
- package/lib/General/Icon/components/AddCircleOutlineIcon.js +1 -7
- package/lib/General/Icon/components/AddCircleSolidIcon.js +1 -7
- package/lib/General/Icon/components/AddIcon.js +1 -7
- package/lib/General/Icon/components/ArrowBackDoubleIcon.js +1 -7
- package/lib/General/Icon/components/ArrowBackIcon.js +1 -7
- package/lib/General/Icon/components/ArrowBackSolidIcon.js +1 -7
- package/lib/General/Icon/components/ArrowDownCircleOutlineIcon.js +1 -7
- package/lib/General/Icon/components/ArrowDownIcon.js +1 -7
- package/lib/General/Icon/components/ArrowDownSolidIcon.js +1 -7
- package/lib/General/Icon/components/ArrowNextDoubleIcon.js +1 -7
- package/lib/General/Icon/components/ArrowNextIcon.js +1 -7
- package/lib/General/Icon/components/ArrowNextSolidIcon.js +1 -7
- package/lib/General/Icon/components/ArrowRoundBackIcon.js +1 -7
- package/lib/General/Icon/components/ArrowRoundForwardIcon.js +1 -7
- package/lib/General/Icon/components/ArrowUpIcon.js +1 -7
- package/lib/General/Icon/components/ArrowUpSolidIcon.js +1 -7
- package/lib/General/Icon/components/AsteriskSolidIcon.js +1 -7
- package/lib/General/Icon/components/AttachmentIcon.js +1 -7
- package/lib/General/Icon/components/BehanceIcon.js +1 -7
- package/lib/General/Icon/components/BellIcon.js +1 -7
- package/lib/General/Icon/components/BookmarkIcon.js +1 -7
- package/lib/General/Icon/components/BookmarkOutlineIcon.js +1 -7
- package/lib/General/Icon/components/BookmarkRoundedOutlineIcon.js +1 -7
- package/lib/General/Icon/components/BoxWithHandleSolidIcon.js +1 -7
- package/lib/General/Icon/components/BriefcaseSolidIcon.js +1 -7
- package/lib/General/Icon/components/BuildingSolidIcon.js +1 -7
- package/lib/General/Icon/components/BulletListIcon.js +1 -7
- package/lib/General/Icon/components/CalendarIcon.js +1 -7
- package/lib/General/Icon/components/CameraIcon.js +1 -7
- package/lib/General/Icon/components/ChecklistIcon.js +1 -7
- package/lib/General/Icon/components/CheckmarkIcon.js +1 -7
- package/lib/General/Icon/components/CheckmarkSolidIcon.js +1 -7
- package/lib/General/Icon/components/CheckmarkThickIcon.js +1 -7
- package/lib/General/Icon/components/CircleAndCheckIcon.js +1 -7
- package/lib/General/Icon/components/CircleIcon.js +1 -7
- package/lib/General/Icon/components/ClipboardCheckOutlineIcon.js +1 -7
- package/lib/General/Icon/components/ClipboardIcon.js +1 -7
- package/lib/General/Icon/components/ClockIcon.js +1 -7
- package/lib/General/Icon/components/CloseCircleSolidIcon.js +1 -7
- package/lib/General/Icon/components/CloseIcon.js +1 -7
- package/lib/General/Icon/components/CloudDownloadIcon.js +1 -7
- package/lib/General/Icon/components/CloudUploadIcon.js +1 -7
- package/lib/General/Icon/components/CodepenIcon.js +1 -7
- package/lib/General/Icon/components/CommunityIcon.js +1 -7
- package/lib/General/Icon/components/CompassIcon.js +1 -7
- package/lib/General/Icon/components/ConnectionIcon.js +1 -7
- package/lib/General/Icon/components/CopyIcon.js +1 -7
- package/lib/General/Icon/components/CopyLinkIcon.js +1 -7
- package/lib/General/Icon/components/CopyOutlinedIcon.js +1 -7
- package/lib/General/Icon/components/CurrencyIcon.js +1 -7
- package/lib/General/Icon/components/DeleteIcon.js +1 -7
- package/lib/General/Icon/components/DiscountSolidIcon.js +1 -7
- package/lib/General/Icon/components/DocumentCheckIcon.js +1 -7
- package/lib/General/Icon/components/DotIcon.js +1 -7
- package/lib/General/Icon/components/DoubleCheckmarkIcon.js +1 -7
- package/lib/General/Icon/components/DoveIcon.js +1 -7
- package/lib/General/Icon/components/DownloadIcon.js +1 -7
- package/lib/General/Icon/components/DragArrowIcon.js +1 -7
- package/lib/General/Icon/components/DragStripesIcon.js +1 -7
- package/lib/General/Icon/components/EditIcon.js +1 -7
- package/lib/General/Icon/components/EditOutlineIcon.js +1 -7
- package/lib/General/Icon/components/ExclamationIcon.js +1 -7
- package/lib/General/Icon/components/ExitFullScreenIcon.js +1 -7
- package/lib/General/Icon/components/ExternalLinkIcon.js +1 -7
- package/lib/General/Icon/components/EyeIcon.js +1 -7
- package/lib/General/Icon/components/EyeSlashedIcon.js +1 -7
- package/lib/General/Icon/components/EyeSolidIcon.js +1 -7
- package/lib/General/Icon/components/FacebookIcon.js +1 -7
- package/lib/General/Icon/components/FileAlternateIcon.js +1 -7
- package/lib/General/Icon/components/FileIcon.js +1 -7
- package/lib/General/Icon/components/FilePreviewIcon.js +1 -7
- package/lib/General/Icon/components/FileSolidIcon.js +1 -7
- package/lib/General/Icon/components/FilterIcon.js +1 -7
- package/lib/General/Icon/components/FlagIcon.js +1 -7
- package/lib/General/Icon/components/FolderIcon.js +1 -7
- package/lib/General/Icon/components/FullScreenIcon.js +1 -7
- package/lib/General/Icon/components/GithubIcon.js +1 -7
- package/lib/General/Icon/components/GlobeIcon.js +1 -7
- package/lib/General/Icon/components/GraduationHatIcon.js +1 -7
- package/lib/General/Icon/components/GroupIcon.js +1 -7
- package/lib/General/Icon/components/GuaranteeIcon.js +1 -7
- package/lib/General/Icon/components/HandIcon.js +1 -7
- package/lib/General/Icon/components/HandShakeIcon.js +1 -7
- package/lib/General/Icon/components/HeartIcon.js +1 -7
- package/lib/General/Icon/components/HeartSolidIcon.js +1 -7
- package/lib/General/Icon/components/HelpIcon.js +1 -7
- package/lib/General/Icon/components/HomeIcon.js +1 -7
- package/lib/General/Icon/components/HourglassIcon.js +1 -7
- package/lib/General/Icon/components/ImageIcon.js +1 -7
- package/lib/General/Icon/components/InfoIcon.js +1 -7
- package/lib/General/Icon/components/InfoSolidIcon.js +1 -7
- package/lib/General/Icon/components/InstagramIcon.js +1 -7
- package/lib/General/Icon/components/JobOutlineIcon.js +1 -7
- package/lib/General/Icon/components/JobSearchIcon.js +1 -7
- package/lib/General/Icon/components/LightbulbIcon.js +1 -7
- package/lib/General/Icon/components/LightningOutlineIcon.js +1 -7
- package/lib/General/Icon/components/LineIcon.js +1 -7
- package/lib/General/Icon/components/LinkedinIcon.js +1 -7
- package/lib/General/Icon/components/LoadingIcon.js +1 -7
- package/lib/General/Icon/components/LocationIcon.js +1 -7
- package/lib/General/Icon/components/LockSolidIcon.js +1 -7
- package/lib/General/Icon/components/MailIcon.js +1 -7
- package/lib/General/Icon/components/MailSolidIcon.js +1 -7
- package/lib/General/Icon/components/MedalIcon.js +1 -7
- package/lib/General/Icon/components/MenuHalfIcon.js +1 -7
- package/lib/General/Icon/components/MenuIcon.js +1 -7
- package/lib/General/Icon/components/MessageOutlineIcon.js +1 -7
- package/lib/General/Icon/components/MessageOutlineIncomingIcon.js +1 -7
- package/lib/General/Icon/components/MicIcon.js +1 -7
- package/lib/General/Icon/components/MicOffIcon.js +1 -7
- package/lib/General/Icon/components/MinusCircleIcon.js +1 -7
- package/lib/General/Icon/components/MinusCircleSolidIcon.js +1 -7
- package/lib/General/Icon/components/MinusIcon.js +1 -7
- package/lib/General/Icon/components/MoreHorizontalIcon.js +1 -7
- package/lib/General/Icon/components/MoreIcon.js +1 -7
- package/lib/General/Icon/components/NameTagIcon.js +1 -7
- package/lib/General/Icon/components/NotificationIcon.js +1 -7
- package/lib/General/Icon/components/NumberListIcon.js +1 -7
- package/lib/General/Icon/components/OnlineIcon.js +1 -7
- package/lib/General/Icon/components/PdfIcon.js +1 -7
- package/lib/General/Icon/components/PdfOutlineIcon.js +1 -7
- package/lib/General/Icon/components/PhoneIcon.js +1 -7
- package/lib/General/Icon/components/PowerIcon.js +1 -7
- package/lib/General/Icon/components/PuzzleIcon.js +1 -7
- package/lib/General/Icon/components/QuestionOutlineIcon.js +1 -7
- package/lib/General/Icon/components/QuotationIcon.js +1 -7
- package/lib/General/Icon/components/RefreshSolidIcon.js +1 -7
- package/lib/General/Icon/components/ReplyIcon.js +1 -7
- package/lib/General/Icon/components/ResumeOutlineIcon.js +1 -7
- package/lib/General/Icon/components/RotateIcon.js +1 -7
- package/lib/General/Icon/components/RssIcon.js +1 -7
- package/lib/General/Icon/components/SalaryIcon.js +1 -7
- package/lib/General/Icon/components/SaveSolidIcon.js +1 -7
- package/lib/General/Icon/components/SearchIcon.js +1 -7
- package/lib/General/Icon/components/SendIcon.js +1 -7
- package/lib/General/Icon/components/SettingIcon.js +1 -7
- package/lib/General/Icon/components/SettingSolidIcon.js +1 -7
- package/lib/General/Icon/components/ShareArrowIcon.js +1 -7
- package/lib/General/Icon/components/ShareArrowOutlineIcon.js +1 -7
- package/lib/General/Icon/components/ShareIcon.js +1 -7
- package/lib/General/Icon/components/ShareOutlineIcon.js +1 -7
- package/lib/General/Icon/components/ShareScreenIcon.js +1 -7
- package/lib/General/Icon/components/ShieldCheckIcon.js +1 -7
- package/lib/General/Icon/components/SpeakerIcon.js +1 -7
- package/lib/General/Icon/components/SpeechBubbleIcon.js +1 -7
- package/lib/General/Icon/components/SpeechBubbleOutlineIcon.js +1 -7
- package/lib/General/Icon/components/SpinnerIcon.js +1 -7
- package/lib/General/Icon/components/StackIcon.js +1 -7
- package/lib/General/Icon/components/StarCircleIcon.js +1 -7
- package/lib/General/Icon/components/StarIcon.js +1 -7
- package/lib/General/Icon/components/StarOutlineIcon.js +1 -7
- package/lib/General/Icon/components/TagIcon.js +1 -7
- package/lib/General/Icon/components/TaskIcon.js +1 -7
- package/lib/General/Icon/components/TelegramIcon.js +1 -7
- package/lib/General/Icon/components/ThumbsUpIcon.js +1 -7
- package/lib/General/Icon/components/ThumbsUpOutlineIcon.js +1 -7
- package/lib/General/Icon/components/TicketSolidIcon.js +1 -7
- package/lib/General/Icon/components/TieIcon.js +1 -7
- package/lib/General/Icon/components/TrashIcon.js +1 -7
- package/lib/General/Icon/components/TvPlayIcon.js +1 -7
- package/lib/General/Icon/components/TwitterIcon.js +1 -7
- package/lib/General/Icon/components/UploadIcon.js +1 -7
- package/lib/General/Icon/components/UpvoteIcon.js +1 -7
- package/lib/General/Icon/components/UserCogIcon.js +1 -7
- package/lib/General/Icon/components/UserIcon.js +1 -7
- package/lib/General/Icon/components/UserWrenchIcon.js +1 -7
- package/lib/General/Icon/components/VideoIcon.js +1 -7
- package/lib/General/Icon/components/VideoOffIcon.js +1 -7
- package/lib/General/Icon/components/ViewIcon.js +1 -7
- package/lib/General/Icon/components/VimeoIcon.js +1 -7
- package/lib/General/Icon/components/WarningCircleSolidIcon.js +1 -7
- package/lib/General/Icon/components/WarningIcon.js +1 -7
- package/lib/General/Icon/components/WarningOutlineIcon.js +1 -7
- package/lib/General/Icon/components/WarningSolidIcon.js +1 -7
- package/lib/General/Icon/components/WhatsappIcon.js +1 -7
- package/lib/General/Icon/components/YoutubeIcon.js +1 -7
- package/lib/General/Icon/components/ZaloIcon.js +1 -7
- package/lib/General/Icon/components/index.d.ts +4 -4
- package/lib/General/Icon/components/index.js +0 -355
- package/lib/General/Icon/index.js +0 -3
- package/lib/General/Loading/Loading.js +0 -7
- package/lib/General/Loading/Loading.stories.js +0 -8
- package/lib/General/Loading/LoadingStyle.js +0 -9
- package/lib/General/Loading/index.js +0 -3
- package/lib/General/ProfilePicture/ProfilePicture.js +5 -21
- package/lib/General/ProfilePicture/ProfilePicture.stories.js +0 -6
- package/lib/General/ProfilePicture/ProfilePictureStyle.js +0 -9
- package/lib/General/ProfilePicture/index.js +0 -3
- package/lib/General/Tag/ActionTags/AddTag.js +0 -5
- package/lib/General/Tag/ActionTags/ResetTag.js +0 -5
- package/lib/General/Tag/BasicTag.js +5 -16
- package/lib/General/Tag/Tag.js +9 -27
- package/lib/General/Tag/Tag.stories.js +0 -14
- package/lib/General/Tag/TagStyle.js +0 -11
- package/lib/General/Tag/index.js +0 -3
- package/lib/General/Typography/Paragraph.js +12 -24
- package/lib/General/Typography/Paragraph.stories.js +0 -9
- package/lib/General/Typography/ParagraphStyles.js +0 -6
- package/lib/General/Typography/Title.js +10 -22
- package/lib/General/Typography/Title.stories.js +0 -8
- package/lib/General/Typography/TitleStyles.js +0 -12
- package/lib/General/Typography/Typography.js +0 -8
- package/lib/General/Typography/index.js +0 -3
- package/lib/Input/Checkbox/Checkbox.js +16 -35
- package/lib/Input/Checkbox/Checkbox.stories.js +0 -14
- package/lib/Input/Checkbox/CheckboxStyle.js +0 -5
- package/lib/Input/Checkbox/index.js +0 -3
- package/lib/Input/Datepicker/Datepicker.js +21 -90
- package/lib/Input/Datepicker/DatepickerStyle.js +1 -28
- package/lib/Input/Datepicker/index.js +0 -3
- package/lib/Input/DownshiftSelect/Select.js +104 -143
- package/lib/Input/DownshiftSelect/Select.stories.js +23 -71
- package/lib/Input/DownshiftSelect/SelectStyle.js +1 -32
- package/lib/Input/NumberInput/NumberInput.js +0 -8
- package/lib/Input/NumberInput/NumberInput.stories.js +2 -13
- package/lib/Input/NumberInput/index.js +0 -3
- package/lib/Input/PhoneNumberInput/PhoneNumberInput.js +52 -83
- package/lib/Input/PhoneNumberInput/PhoneNumberInput.stories.js +9 -26
- package/lib/Input/PhoneNumberInput/PhoneNumberInputStyles.js +0 -41
- package/lib/Input/RadioButton/RadioButton.js +13 -24
- package/lib/Input/RadioButton/RadioButton.stories.js +0 -7
- package/lib/Input/RadioButton/RadioButtonStyle.js +7 -26
- package/lib/Input/RadioButton/index.js +0 -3
- package/lib/Input/SearchFilter/SearchFilterStyle.js +0 -17
- package/lib/Input/Select/Select.js +66 -109
- package/lib/Input/Select/Select.stories.js +0 -15
- package/lib/Input/Select/SelectItem.js +3 -13
- package/lib/Input/Select/SelectList.js +10 -22
- package/lib/Input/Select/SelectStyle.js +5 -34
- package/lib/Input/Select/index.js +0 -3
- package/lib/Input/TextField/TextField.js +23 -47
- package/lib/Input/TextField/TextField.stories.js +2 -14
- package/lib/Input/TextField/TextFieldStyle.js +3 -25
- package/lib/Input/TextField/index.js +0 -3
- package/lib/Input/Textarea/Textarea.js +25 -50
- package/lib/Input/Textarea/Textarea.stories.js +0 -8
- package/lib/Input/Textarea/TextareaStyle.js +0 -10
- package/lib/Input/Textarea/index.js +0 -3
- package/lib/Input/ToggleSwitch/Styles.js +0 -8
- package/lib/Input/ToggleSwitch/ToggleSwitch.js +8 -27
- package/lib/Input/ToggleSwitch/ToggleSwitch.stories.js +0 -13
- package/lib/Input/ToggleSwitch/index.js +0 -3
- package/lib/Layout/Box/Box.stories.js +0 -11
- package/lib/Layout/Box/BoxStoryStyle.js +0 -7
- package/lib/Layout/Box/constants.js +2 -13
- package/lib/Layout/Box/index.js +0 -14
- package/lib/Layout/Flex/Flex.stories.js +3 -19
- package/lib/Layout/Flex/FlexStoryStyle.js +0 -5
- package/lib/Layout/Flex/index.js +8 -20
- package/lib/Layout/GlintsContainer/GlintsContainer.js +0 -11
- package/lib/Layout/Grid/Col.js +13 -29
- package/lib/Layout/Grid/GridStoriesHelpers.js +0 -5
- package/lib/Layout/Grid/GridStyle.js +5 -16
- package/lib/Layout/Grid/Row.js +3 -13
- package/lib/Layout/Grid/index.js +0 -5
- package/lib/Navigation/Breadcrumb/Breadcrumb.js +2 -14
- package/lib/Navigation/Breadcrumb/Breadcrumb.stories.js +0 -10
- package/lib/Navigation/Breadcrumb/BreadcrumbItem.js +3 -14
- package/lib/Navigation/Breadcrumb/BreadcrumbStyle.js +0 -7
- package/lib/Navigation/Breadcrumb/index.js +0 -3
- package/lib/Navigation/Drawer/Drawer.js +6 -18
- package/lib/Navigation/Drawer/Drawer.stories.js +2 -13
- package/lib/Navigation/Drawer/DrawerStyle.js +2 -10
- package/lib/Navigation/Drawer/index.js +0 -3
- package/lib/Navigation/Dropdown/Dropdown.js +30 -57
- package/lib/Navigation/Dropdown/Dropdown.stories.js +0 -8
- package/lib/Navigation/Dropdown/DropdownItem.js +2 -12
- package/lib/Navigation/Dropdown/DropdownStyle.js +5 -33
- package/lib/Navigation/Dropdown/index.js +0 -3
- package/lib/Utils/@next/colors/index.js +0 -14
- package/lib/Utils/ColorsStoriesHelpers.js +2 -13
- package/lib/Utils/DelayedUnmount.js +5 -12
- package/lib/Utils/DomUtils.js +1 -7
- package/lib/Utils/Icon/IconLibrary.js +0 -4
- package/lib/Utils/Icon/generateIcons.js +2 -16
- package/lib/Utils/Matcher.js +0 -3
- package/lib/Utils/Shadow/ShadowsStoriesHelpers.js +0 -9
- package/lib/Utils/StyleConfig.js +0 -6
- package/lib/Utils/Unit.js +0 -9
- package/lib/Utils/getReadableColor.js +0 -3
- package/lib/Utils/useOutsideAlerter.js +0 -4
- package/lib/index.js +0 -451
- package/lib/stories/story-components/AriesStatus.js +2 -9
- package/package.json +30 -24
- package/CHANGELOG.md +0 -654
package/README.md
CHANGED
|
@@ -83,6 +83,23 @@ Currently there is an issue where the above leads to react complaining about mul
|
|
|
83
83
|
4. Open terminal in `glints-aries`.
|
|
84
84
|
5. Run `yarn link react`.
|
|
85
85
|
|
|
86
|
+
### Adding visual test
|
|
87
|
+
|
|
88
|
+
We use [playwright](https://playwright.dev/docs/test-snapshots) visual comparison test for components to check for regressions, since images in every browser and machine can be rendered differently we'll use docker image to generate and compare the screenshots.
|
|
89
|
+
|
|
90
|
+
All visual test and screenshots can be found in `test/e2e` directory
|
|
91
|
+
|
|
92
|
+
To generate new screenshots locally:
|
|
93
|
+
|
|
94
|
+
Create docker image with `docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.29.0-focal /bin/bash`
|
|
95
|
+
|
|
96
|
+
Run following commands in that image:
|
|
97
|
+
|
|
98
|
+
1. Install the dependencies `yarn install` or `npm install`
|
|
99
|
+
2. Run storybook `yarn storybook`
|
|
100
|
+
3. Generate screenshot of your tests with `npx playwright test --update-snapshots`
|
|
101
|
+
4. Commit and push your test screenshots
|
|
102
|
+
|
|
86
103
|
### Code structure in glints-aries
|
|
87
104
|
|
|
88
105
|
1. Always do alphabetically when importing file.
|
|
@@ -1,46 +1,35 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
3
|
var _excluded = ["label", "content"];
|
|
4
|
-
|
|
5
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
-
|
|
7
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
|
-
|
|
9
4
|
import * as React from 'react';
|
|
10
5
|
import classNames from 'classnames';
|
|
11
6
|
import { AddIcon, MinusIcon, ArrowDownSolidIcon } from '../../General/Icon/components';
|
|
12
7
|
import AccordionPanel from './AccordionPanel';
|
|
13
8
|
import { Container } from './AccordionStyle';
|
|
14
|
-
|
|
15
9
|
var Accordion = function Accordion(_ref) {
|
|
16
10
|
var children = _ref.children,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
className = _ref.className,
|
|
12
|
+
_ref$iconPosition = _ref.iconPosition,
|
|
13
|
+
iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition;
|
|
21
14
|
var _React$useState = React.useState(-1),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
currIndex = _React$useState[0],
|
|
16
|
+
setCurrIndex = _React$useState[1];
|
|
25
17
|
var iconOptions = {
|
|
26
18
|
activeIcon: iconPosition === 'left' ? /*#__PURE__*/React.createElement(MinusIcon, null) : /*#__PURE__*/React.createElement(ArrowDownSolidIcon, null),
|
|
27
19
|
inactiveIcon: iconPosition === 'left' ? /*#__PURE__*/React.createElement(AddIcon, null) : /*#__PURE__*/React.createElement(ArrowDownSolidIcon, null),
|
|
28
20
|
position: iconPosition
|
|
29
21
|
};
|
|
30
|
-
|
|
31
22
|
var handleOpen = function handleOpen(index) {
|
|
32
23
|
setCurrIndex(currIndex === index ? -1 : index);
|
|
33
24
|
};
|
|
34
|
-
|
|
35
25
|
return /*#__PURE__*/React.createElement(Container, {
|
|
36
26
|
className: classNames('aries-accordion', className)
|
|
37
27
|
}, React.Children.map(children, function (child, index) {
|
|
38
28
|
var _child$props = child.props,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return /*#__PURE__*/React.cloneElement(child, _objectSpread({
|
|
29
|
+
label = _child$props.label,
|
|
30
|
+
content = _child$props.content,
|
|
31
|
+
restChildProps = _objectWithoutPropertiesLoose(_child$props, _excluded);
|
|
32
|
+
return /*#__PURE__*/React.cloneElement(child, _extends({
|
|
44
33
|
key: index,
|
|
45
34
|
label: label,
|
|
46
35
|
content: content,
|
|
@@ -52,7 +41,6 @@ var Accordion = function Accordion(_ref) {
|
|
|
52
41
|
}, restChildProps));
|
|
53
42
|
}));
|
|
54
43
|
};
|
|
55
|
-
|
|
56
44
|
Accordion.Panel = AccordionPanel;
|
|
57
45
|
Accordion.Panel.displayName = 'Accordion.Panel'; // To show the correct name in code sample
|
|
58
46
|
|
|
@@ -31,17 +31,16 @@ var defaultPanels = [{
|
|
|
31
31
|
label: 'What is Lorem Ipsum?',
|
|
32
32
|
content: 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.'
|
|
33
33
|
}];
|
|
34
|
-
|
|
35
34
|
var Template = function Template(_ref) {
|
|
36
35
|
var _ref$iconPosition = _ref.iconPosition,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition,
|
|
37
|
+
_ref$panels = _ref.panels,
|
|
38
|
+
panels = _ref$panels === void 0 ? defaultPanels : _ref$panels;
|
|
40
39
|
return /*#__PURE__*/React.createElement(Accordion, {
|
|
41
40
|
iconPosition: iconPosition
|
|
42
41
|
}, panels.map(function (_ref2) {
|
|
43
42
|
var label = _ref2.label,
|
|
44
|
-
|
|
43
|
+
content = _ref2.content;
|
|
45
44
|
return /*#__PURE__*/React.createElement(Accordion.Panel, {
|
|
46
45
|
key: label,
|
|
47
46
|
label: label,
|
|
@@ -49,7 +48,6 @@ var Template = function Template(_ref) {
|
|
|
49
48
|
});
|
|
50
49
|
}));
|
|
51
50
|
};
|
|
52
|
-
|
|
53
51
|
export var Interactive = Template.bind({});
|
|
54
52
|
export var DifferentIconPosition = Template.bind({});
|
|
55
53
|
DifferentIconPosition.args = {
|
|
@@ -4,35 +4,30 @@ var _excluded = ["className", "content", "label", "active", "iconOptions", "onOp
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { PanelWrapper, IconWrapper, IconLabelWrapper, ContentWrapper, Content, Label } from './AccordionStyle';
|
|
7
|
-
|
|
8
7
|
var AccordionPanel = function AccordionPanel(props) {
|
|
9
8
|
var className = props.className,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
content = props.content,
|
|
10
|
+
label = props.label,
|
|
11
|
+
active = props.active,
|
|
12
|
+
_props$iconOptions = props.iconOptions,
|
|
13
|
+
activeIcon = _props$iconOptions.activeIcon,
|
|
14
|
+
inactiveIcon = _props$iconOptions.inactiveIcon,
|
|
15
|
+
position = _props$iconOptions.position,
|
|
16
|
+
onOpen = props.onOpen,
|
|
17
|
+
onClick = props.onClick,
|
|
18
|
+
restProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
21
19
|
var handleClick = function handleClick(e) {
|
|
22
20
|
onOpen();
|
|
23
|
-
|
|
24
21
|
if (onClick) {
|
|
25
22
|
onClick(e);
|
|
26
23
|
}
|
|
27
24
|
};
|
|
28
|
-
|
|
29
25
|
var renderIcon = function renderIcon() {
|
|
30
26
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
31
27
|
position: position,
|
|
32
28
|
active: active
|
|
33
29
|
}, active ? activeIcon : inactiveIcon);
|
|
34
30
|
};
|
|
35
|
-
|
|
36
31
|
return /*#__PURE__*/React.createElement(PanelWrapper, _extends({
|
|
37
32
|
className: classNames('panel-wrapper', className),
|
|
38
33
|
role: "tab",
|
|
@@ -51,5 +46,4 @@ var AccordionPanel = function AccordionPanel(props) {
|
|
|
51
46
|
position: position
|
|
52
47
|
}, content)));
|
|
53
48
|
};
|
|
54
|
-
|
|
55
49
|
export default AccordionPanel;
|
|
@@ -11,9 +11,7 @@ export var PanelWrapper = styled.div.withConfig({
|
|
|
11
11
|
export var Container = styled.div.withConfig({
|
|
12
12
|
displayName: "AccordionStyle__Container",
|
|
13
13
|
componentId: "sc-7hk6zs-1"
|
|
14
|
-
})(["", ":first-child{border-top:none;}"],
|
|
15
|
-
/* sc-selector */
|
|
16
|
-
PanelWrapper);
|
|
14
|
+
})(["", ":first-child{border-top:none;}"], /* sc-selector */PanelWrapper);
|
|
17
15
|
export var IconLabelWrapper = styled.div.withConfig({
|
|
18
16
|
displayName: "AccordionStyle__IconLabelWrapper",
|
|
19
17
|
componentId: "sc-7hk6zs-2"
|
|
@@ -56,11 +54,9 @@ export var IconWrapper = styled.div.withConfig({
|
|
|
56
54
|
componentId: "sc-7hk6zs-6"
|
|
57
55
|
})(["display:flex;align-items:center;svg{width:", ";height:", ";}", ""], iconSize + "px", iconSize + "px", function (_ref8) {
|
|
58
56
|
var position = _ref8.position,
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
active = _ref8.active;
|
|
61
58
|
if (position === 'right') {
|
|
62
59
|
return css(["transform:", ";transition:transform ", ";"], active ? 'rotate(180deg)' : 'none', transitionTiming);
|
|
63
60
|
}
|
|
64
|
-
|
|
65
61
|
return css(["margin-right:", ";"], iconMargin + "px");
|
|
66
62
|
});
|
|
@@ -8,19 +8,16 @@ import { ArrowDownIcon } from '../../General/Icon/components';
|
|
|
8
8
|
import { CollapsibleContainer, CollapsibleContent, CollapsibleHeader, CollapsibleBody } from './CollapsibleStyle';
|
|
9
9
|
export var Collapsible = function Collapsible(_ref) {
|
|
10
10
|
var label = _ref.label,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
children = _ref.children,
|
|
12
|
+
className = _ref.className,
|
|
13
|
+
isOpen = _ref.isOpen,
|
|
14
|
+
defaultProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
16
15
|
var _useState = useState(isUndefined(isOpen) ? true : isOpen),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
isOpenInternal = _useState[0],
|
|
17
|
+
setIsOpenInternal = _useState[1];
|
|
20
18
|
var toggle = function toggle() {
|
|
21
19
|
setIsOpenInternal(!isOpenInternal);
|
|
22
20
|
};
|
|
23
|
-
|
|
24
21
|
return /*#__PURE__*/React.createElement(CollapsibleContainer, _extends({
|
|
25
22
|
className: classNames('aries-collapsible', className),
|
|
26
23
|
tabIndex: 0,
|
|
@@ -11,14 +11,11 @@ export default {
|
|
|
11
11
|
}]
|
|
12
12
|
};
|
|
13
13
|
var defaultText = 'Lorem ipsum dolor sit amet consectetur adipisicing elit.';
|
|
14
|
-
|
|
15
14
|
var Template = function Template(_ref) {
|
|
16
15
|
var children = _ref.children,
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
args = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
19
17
|
return /*#__PURE__*/React.createElement(Collapsible, args, children || defaultText);
|
|
20
18
|
};
|
|
21
|
-
|
|
22
19
|
export var Interactive = Template.bind({});
|
|
23
20
|
Interactive.args = {
|
|
24
21
|
label: 'Lorem Ipsum',
|
|
@@ -14,7 +14,6 @@ export var CollapsibleHeader = styled.div.withConfig({
|
|
|
14
14
|
componentId: "sc-133mwvh-2"
|
|
15
15
|
})(["background:", ";display:flex;justify-content:space-between;align-items:center;padding:1.2em;&:hover{color:", ";}svg{transform:rotate(0);transition:transform 0.5s;", "}"], Greyscale.white, SecondaryColor.actionblue, function (_ref) {
|
|
16
16
|
var isOpen = _ref.isOpen;
|
|
17
|
-
|
|
18
17
|
if (isOpen) {
|
|
19
18
|
return "\n transform: rotate(180deg);\n transition: transform .5s;\n ";
|
|
20
19
|
}
|
|
@@ -1,56 +1,47 @@
|
|
|
1
1
|
/* eslint-disable react/no-array-index-key */
|
|
2
|
+
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import Modal from '../../Display/Modal';
|
|
4
5
|
import Slider from '../../Display/Slider';
|
|
5
6
|
import { GalleryContainer, GalleryItemWrapper, GalleryItem, GalleryImageWrapper, GalleryThumbnailWrapper } from './GalleryStyle';
|
|
6
|
-
|
|
7
7
|
var Gallery = function Gallery(_ref) {
|
|
8
8
|
var _ref$initialVisibilit = _ref.initialVisibility,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
initialVisibility = _ref$initialVisibilit === void 0 ? false : _ref$initialVisibilit,
|
|
10
|
+
children = _ref.children,
|
|
11
|
+
_ref$imagesDisplayed = _ref.imagesDisplayed,
|
|
12
|
+
imagesDisplayed = _ref$imagesDisplayed === void 0 ? 8 : _ref$imagesDisplayed;
|
|
13
13
|
var sliderRef = React.useRef();
|
|
14
|
-
|
|
15
14
|
var _React$useState = React.useState(initialVisibility),
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
visible = _React$useState[0],
|
|
16
|
+
setVisible = _React$useState[1];
|
|
19
17
|
var _React$useState2 = React.useState(0),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
currentIndex = _React$useState2[0],
|
|
19
|
+
setCurrentIndex = _React$useState2[1];
|
|
23
20
|
var _React$useState3 = React.useState(0),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
imageLeft = _React$useState3[0],
|
|
22
|
+
setImageLeft = _React$useState3[1];
|
|
27
23
|
var closeModal = function closeModal() {
|
|
28
24
|
return setVisible(false);
|
|
29
25
|
};
|
|
30
|
-
|
|
31
26
|
var handleClick = function handleClick(index) {
|
|
32
27
|
setVisible(true);
|
|
33
28
|
setCurrentIndex(index);
|
|
34
29
|
};
|
|
35
|
-
|
|
36
30
|
var handleClickThumbs = function handleClickThumbs(index) {
|
|
37
31
|
return setCurrentIndex(index);
|
|
38
32
|
};
|
|
39
|
-
|
|
40
33
|
var getCurrentIndex = function getCurrentIndex(index) {
|
|
41
34
|
return setCurrentIndex(index - 1);
|
|
42
35
|
};
|
|
43
|
-
|
|
44
36
|
var hasImage = React.Children.toArray(children).some(function (child) {
|
|
45
37
|
return /*#__PURE__*/React.isValidElement(child) && child.type === 'img';
|
|
46
38
|
});
|
|
47
|
-
|
|
48
39
|
if (!hasImage) {
|
|
49
40
|
console.error('Only img components allowed as children.');
|
|
50
41
|
}
|
|
51
|
-
|
|
52
42
|
React.useEffect(function componentDidMount() {
|
|
53
|
-
if (React.Children.count(children) > imagesDisplayed) setImageLeft(React.Children.count(children) - imagesDisplayed);
|
|
43
|
+
if (React.Children.count(children) > imagesDisplayed) setImageLeft(React.Children.count(children) - imagesDisplayed);
|
|
44
|
+
// Disabling this warning because we want to preserver some legacy
|
|
54
45
|
// behaviour here.
|
|
55
46
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
56
47
|
}, []);
|
|
@@ -105,5 +96,4 @@ var Gallery = function Gallery(_ref) {
|
|
|
105
96
|
}));
|
|
106
97
|
}))));
|
|
107
98
|
};
|
|
108
|
-
|
|
109
99
|
export default Gallery;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import Gallery from './Gallery';
|
|
@@ -16,10 +17,8 @@ export default {
|
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
};
|
|
19
|
-
|
|
20
20
|
var Template = function Template(_ref) {
|
|
21
|
-
var args = _extends({}, _ref);
|
|
22
|
-
|
|
21
|
+
var args = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
23
22
|
return /*#__PURE__*/React.createElement(Gallery, args, /*#__PURE__*/React.createElement("img", {
|
|
24
23
|
src: "https://images.unsplash.com/photo-1512979797260-1a645592b48f?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=2fc2ca84d8c407bd48ab15ea27c87eaf&auto=format&fit=crop&h=500&q=80",
|
|
25
24
|
alt: "Profile Picture"
|
|
@@ -49,7 +48,6 @@ var Template = function Template(_ref) {
|
|
|
49
48
|
alt: "Keyboard"
|
|
50
49
|
}));
|
|
51
50
|
};
|
|
52
|
-
|
|
53
51
|
export var Interactive = Template.bind({});
|
|
54
52
|
Interactive.args = {};
|
|
55
53
|
export var ImagesDisplayed = Template.bind({});
|
|
@@ -13,7 +13,6 @@ export var GalleryItem = styled.div.withConfig({
|
|
|
13
13
|
componentId: "sc-mrr504-2"
|
|
14
14
|
})(["position:relative;margin:5px;", ""], function (_ref) {
|
|
15
15
|
var imageLeft = _ref.imageLeft;
|
|
16
|
-
|
|
17
16
|
if (imageLeft !== 0) {
|
|
18
17
|
return "\n &:last-child:after {\n content: '+" + imageLeft + "';\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n color: #0869C2;\n height: 100%;\n width: 100%;\n font-size: 18px;\n background: rgba(255, 255, 255, 0.75);\n cursor: pointer;\n }\n ";
|
|
19
18
|
}
|
|
@@ -11,29 +11,26 @@ import { checkIsChildrenInMultiLines } from './utils';
|
|
|
11
11
|
import { ModalContainer, ModalDialog, ModalContentArea, ModalHeader, ModalBody, ModalFooter } from './ModalStyle';
|
|
12
12
|
export var Modal = function Modal(_ref) {
|
|
13
13
|
var isVisible = _ref.isVisible,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
title = _ref.title,
|
|
15
|
+
onClose = _ref.onClose,
|
|
16
|
+
children = _ref.children,
|
|
17
|
+
className = _ref.className,
|
|
18
|
+
hideContentArea = _ref.hideContentArea,
|
|
19
|
+
centering = _ref.centering,
|
|
20
|
+
fullscreen = _ref.fullscreen,
|
|
21
|
+
removeAnimation = _ref.removeAnimation,
|
|
22
|
+
footer = _ref.footer,
|
|
23
|
+
size = _ref.size,
|
|
24
|
+
hideHeader = _ref.hideHeader,
|
|
25
|
+
keepChildrenMountedOnClose = _ref.keepChildrenMountedOnClose,
|
|
26
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
28
27
|
var modalContentAreaRef = useRef(null);
|
|
29
28
|
var modalContainerRef = useRef(null);
|
|
30
29
|
var modalBodyRef = useRef(null);
|
|
31
30
|
var modalFooterRef = useRef(null);
|
|
32
|
-
|
|
33
31
|
var _useState = useState(false),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
isFooterChildrenInMultiLines = _useState[0],
|
|
33
|
+
setIsFooterChildrenInMultiLines = _useState[1];
|
|
37
34
|
var handleClose = React.useCallback(function () {
|
|
38
35
|
if (typeof onClose === 'function') {
|
|
39
36
|
onClose();
|
|
@@ -42,13 +39,12 @@ export var Modal = function Modal(_ref) {
|
|
|
42
39
|
useLayoutEffect(function () {
|
|
43
40
|
var scrollableTarget = centering ? modalBodyRef.current : modalContainerRef.current;
|
|
44
41
|
if (!scrollableTarget) return;
|
|
42
|
+
|
|
45
43
|
/**
|
|
46
44
|
* this tricks mobile safari into thinking the overlay is scrollable, thus
|
|
47
45
|
* intercepting the touch event from the body to prevent background scrolling
|
|
48
46
|
*/
|
|
49
|
-
|
|
50
47
|
scrollableTarget.style['-webkit-overflow-scrolling'] = 'touch';
|
|
51
|
-
|
|
52
48
|
if (isVisible) {
|
|
53
49
|
// On modal open
|
|
54
50
|
modalContentAreaRef.current.focus();
|
|
@@ -57,7 +53,6 @@ export var Modal = function Modal(_ref) {
|
|
|
57
53
|
// On modal close
|
|
58
54
|
enableBodyScroll(scrollableTarget);
|
|
59
55
|
}
|
|
60
|
-
|
|
61
56
|
return function () {
|
|
62
57
|
clearAllBodyScrollLocks();
|
|
63
58
|
};
|
|
@@ -66,10 +61,11 @@ export var Modal = function Modal(_ref) {
|
|
|
66
61
|
var escapeKeyEventListener = createEscapeKeyEventListener(function () {
|
|
67
62
|
if (isVisible) handleClose();
|
|
68
63
|
});
|
|
69
|
-
document.addEventListener('keydown', escapeKeyEventListener, false);
|
|
64
|
+
document.addEventListener('keydown', escapeKeyEventListener, false);
|
|
65
|
+
|
|
66
|
+
// This function will be called on unmount and _before_ this effect is
|
|
70
67
|
// re-executed because its dependencies changed. This gives us the chance
|
|
71
68
|
// to clean up the existing escape key event listener.
|
|
72
|
-
|
|
73
69
|
return function () {
|
|
74
70
|
return document.removeEventListener('keydown', escapeKeyEventListener, false);
|
|
75
71
|
};
|
|
@@ -79,17 +75,17 @@ export var Modal = function Modal(_ref) {
|
|
|
79
75
|
var isChildrenInMultiLines = checkIsChildrenInMultiLines(modalFooterRef);
|
|
80
76
|
setIsFooterChildrenInMultiLines(isChildrenInMultiLines);
|
|
81
77
|
};
|
|
82
|
-
|
|
83
78
|
var debouncedCheckFooter = debounce(checkIsFooterChildrenInMultiLines, 500);
|
|
84
79
|
debouncedCheckFooter();
|
|
85
80
|
window.addEventListener('resize', debouncedCheckFooter);
|
|
86
81
|
return function () {
|
|
87
82
|
return window.removeEventListener('resize', debouncedCheckFooter);
|
|
88
83
|
};
|
|
89
|
-
}, []);
|
|
84
|
+
}, []);
|
|
85
|
+
|
|
86
|
+
// To prevent the modal from closing
|
|
90
87
|
// when a mousedown event occurs inside the ModalContentArea
|
|
91
88
|
// but the subsequent mouseup event occurs outside
|
|
92
|
-
|
|
93
89
|
var mouseDownTarget = useRef(null);
|
|
94
90
|
var handleMouseDown = useCallback(function (e) {
|
|
95
91
|
var element = e.target;
|
|
@@ -97,7 +93,6 @@ export var Modal = function Modal(_ref) {
|
|
|
97
93
|
}, [mouseDownTarget]);
|
|
98
94
|
var handleClick = useCallback(function (e) {
|
|
99
95
|
var element = e.target;
|
|
100
|
-
|
|
101
96
|
if (mouseDownTarget.current === element) {
|
|
102
97
|
handleClose();
|
|
103
98
|
}
|
|
@@ -15,18 +15,15 @@ export default {
|
|
|
15
15
|
};
|
|
16
16
|
var defaultTitle = 'Lorem Ipsum';
|
|
17
17
|
var defaultChildren = 'Lorem ipsum dolor sit amet consectetur adipisicing elit.';
|
|
18
|
-
|
|
19
18
|
var Template = function Template(_ref) {
|
|
20
19
|
var children = _ref.children,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
title = _ref.title,
|
|
21
|
+
_ref$buttonTexts = _ref.buttonTexts,
|
|
22
|
+
buttonTexts = _ref$buttonTexts === void 0 ? [] : _ref$buttonTexts,
|
|
23
|
+
args = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
26
24
|
var _useState = useState(false),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
isModalVisible = _useState[0],
|
|
26
|
+
setIsModalVisible = _useState[1];
|
|
30
27
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
31
28
|
variant: "solid-blue",
|
|
32
29
|
onClick: function onClick() {
|
|
@@ -53,7 +50,6 @@ var Template = function Template(_ref) {
|
|
|
53
50
|
}, buttonTexts[1] || 'Save')]
|
|
54
51
|
}), children || defaultChildren));
|
|
55
52
|
};
|
|
56
|
-
|
|
57
53
|
export var Interactive = Template.bind({});
|
|
58
54
|
Interactive.args = {
|
|
59
55
|
title: defaultTitle,
|
|
@@ -19,8 +19,7 @@ export var ModalContainer = styled.div.withConfig({
|
|
|
19
19
|
return centering && 'center';
|
|
20
20
|
}, function (_ref3) {
|
|
21
21
|
var removeAnimation = _ref3.removeAnimation,
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
isOpen = _ref3.isOpen;
|
|
24
23
|
if (!removeAnimation) {
|
|
25
24
|
return "\n opacity: " + (isOpen ? '1' : '0') + ";\n transform: " + (isOpen ? 'scale(1)' : 'scale(0.98)') + ";\n transform-origin: center;\n transition: " + (isOpen ? 'all .2s ease-in' : 'all .15s ease-out') + ";\n ";
|
|
26
25
|
}
|
|
@@ -38,7 +37,6 @@ export var ModalBody = styled.section.withConfig({
|
|
|
38
37
|
componentId: "sc-bg1vyz-3"
|
|
39
38
|
})(["position:relative;", " padding:", ";@media ", "{padding:", ";}"], function (_ref4) {
|
|
40
39
|
var centering = _ref4.centering;
|
|
41
|
-
|
|
42
40
|
if (centering) {
|
|
43
41
|
return "\n max-height: 300px;\n overflow: auto;\n ";
|
|
44
42
|
}
|
|
@@ -54,11 +52,9 @@ export var ModalFooter = styled.footer.withConfig({
|
|
|
54
52
|
componentId: "sc-bg1vyz-4"
|
|
55
53
|
})(["position:relative;display:flex;flex-direction:row;flex-wrap:wrap;padding:16px 30px;justify-content:flex-end;border-top:1px solid ", ";@media ", "{padding:16px;}", ""], Greyscale.lightgrey, Device.mobileM, function (_ref7) {
|
|
56
54
|
var isChildrenInMultiLines = _ref7.isChildrenInMultiLines;
|
|
57
|
-
|
|
58
55
|
if (isChildrenInMultiLines) {
|
|
59
56
|
return "\n flex-direction: column-reverse;\n\n > * {\n flex-grow: 1;\n\n &:nth-child(2) {\n margin-bottom: 10px; \n }\n\n button {\n width: 100%;\n }\n }\n ";
|
|
60
57
|
}
|
|
61
|
-
|
|
62
58
|
return "\n > *:nth-child(2) {\n margin-left: 10px;\n }\n ";
|
|
63
59
|
});
|
|
64
60
|
export var ModalContentArea = styled.div.withConfig({
|
|
@@ -69,39 +65,31 @@ export var ModalContentArea = styled.div.withConfig({
|
|
|
69
65
|
return hideContentArea ? 'transparent' : "" + Greyscale.white;
|
|
70
66
|
}, function (_ref9) {
|
|
71
67
|
var size = _ref9.size;
|
|
72
|
-
|
|
73
68
|
switch (size) {
|
|
74
69
|
case 's':
|
|
75
70
|
return "\n width: " + SIZES.s + "px;\n ";
|
|
76
|
-
|
|
77
71
|
case 'm':
|
|
78
72
|
return "\n width: " + SIZES.m + "px;\n ";
|
|
79
|
-
|
|
80
73
|
case 'l':
|
|
81
74
|
return "\n width: " + SIZES.l + "px;\n ";
|
|
82
|
-
|
|
83
75
|
case 'xl':
|
|
84
76
|
return "\n width: " + SIZES.xl + "px;\n ";
|
|
85
|
-
|
|
86
77
|
default:
|
|
87
78
|
return "\n width: " + SIZES["default"] + "px;\n ";
|
|
88
79
|
}
|
|
89
80
|
}, function (_ref10) {
|
|
90
81
|
var centering = _ref10.centering;
|
|
91
|
-
|
|
92
82
|
if (centering) {
|
|
93
83
|
return "\n display: flex;\n flex-direction: column;\n max-height: 85vh;\n ";
|
|
94
84
|
}
|
|
95
85
|
}, function (_ref11) {
|
|
96
86
|
var fullscreen = _ref11.fullscreen;
|
|
97
|
-
|
|
98
87
|
if (fullscreen) {
|
|
99
88
|
return "\n display: flex;\n flex-direction: column;\n max-width: none;\n max-height: none;\n min-width: 100vw;\n min-height: 100vh;\n margin: 0;\n\n " + ModalBody + " {\n overflow: auto;\n }\n\n " + ModalFooter + " {\n margin-top: auto;\n }\n ";
|
|
100
89
|
}
|
|
101
90
|
}, Device.mobileM, function (_ref12) {
|
|
102
91
|
var removeAnimation = _ref12.removeAnimation,
|
|
103
|
-
|
|
104
|
-
|
|
92
|
+
isOpen = _ref12.isOpen;
|
|
105
93
|
if (!removeAnimation) {
|
|
106
94
|
return "\n opacity: " + (isOpen ? '1' : '0') + ";\n transform: " + (isOpen ? 'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)' : 'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 30, 0, 1)') + ";\n transition: " + (isOpen ? 'all .25s ease-in' : 'all .25s ease-out') + ";\n ";
|
|
107
95
|
}
|
|
@@ -7,13 +7,10 @@ export var checkIsChildrenInMultiLines = function checkIsChildrenInMultiLines(re
|
|
|
7
7
|
if (!ref.current) {
|
|
8
8
|
return false;
|
|
9
9
|
}
|
|
10
|
-
|
|
11
10
|
var childNodes = ref.current.childNodes;
|
|
12
|
-
|
|
13
11
|
if (childNodes.length < 2) {
|
|
14
12
|
return false;
|
|
15
13
|
}
|
|
16
|
-
|
|
17
14
|
var firstElement = childNodes[0];
|
|
18
15
|
var secondElement = childNodes[1];
|
|
19
16
|
return firstElement.offsetTop !== secondElement.offsetTop;
|
|
@@ -8,12 +8,10 @@ import PointingModalHeader from './PointingModalHeader';
|
|
|
8
8
|
import PointingModalBody from './PointingModalBody';
|
|
9
9
|
import PointingModalItem from './PointingModalItem';
|
|
10
10
|
import PointingModalFooter from './PointingModalFooter';
|
|
11
|
-
|
|
12
11
|
var PointingModal = function PointingModal(props) {
|
|
13
12
|
var children = props.children,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
className = props.className,
|
|
14
|
+
defaultProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
17
15
|
return /*#__PURE__*/React.createElement(PointingModalContainer, _extends({
|
|
18
16
|
className: classNames('aries-pointingmodal', className),
|
|
19
17
|
role: "dialog",
|
|
@@ -22,7 +20,6 @@ var PointingModal = function PointingModal(props) {
|
|
|
22
20
|
role: "presentation"
|
|
23
21
|
}), children);
|
|
24
22
|
};
|
|
25
|
-
|
|
26
23
|
PointingModal.Header = PointingModalHeader;
|
|
27
24
|
PointingModal.Header.displayName = 'PointingModal.Header';
|
|
28
25
|
PointingModal.Body = PointingModalBody;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import PointingModal from './PointingModal';
|
|
@@ -11,10 +12,8 @@ export default {
|
|
|
11
12
|
return /*#__PURE__*/React.createElement(BaseContainer, null, Story());
|
|
12
13
|
}]
|
|
13
14
|
};
|
|
14
|
-
|
|
15
15
|
var Template = function Template(_ref) {
|
|
16
|
-
var args = _extends({}, _ref);
|
|
17
|
-
|
|
16
|
+
var args = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
18
17
|
return /*#__PURE__*/React.createElement(PointingModal, args, /*#__PURE__*/React.createElement(PointingModal.Header, null, /*#__PURE__*/React.createElement(ProfilePicture, {
|
|
19
18
|
editable: true
|
|
20
19
|
}, /*#__PURE__*/React.createElement("img", {
|
|
@@ -28,6 +27,5 @@ var Template = function Template(_ref) {
|
|
|
28
27
|
theme: "grey"
|
|
29
28
|
}), /*#__PURE__*/React.createElement(PointingModal.Body, null, /*#__PURE__*/React.createElement(PointingModal.Item, null, "View Profile"), /*#__PURE__*/React.createElement(PointingModal.Item, null, "Edit Profile"), /*#__PURE__*/React.createElement(PointingModal.Item, null, "Sign Out")), /*#__PURE__*/React.createElement(PointingModal.Footer, null, "Have a nice day"));
|
|
30
29
|
};
|
|
31
|
-
|
|
32
30
|
export var Interactive = Template.bind({});
|
|
33
31
|
Interactive.args = {};
|
|
@@ -4,16 +4,13 @@ var _excluded = ["children", "className"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { PointingModalBodyWrapper } from './PointingModalStyle';
|
|
7
|
-
|
|
8
7
|
var PointingModalBody = function PointingModalBody(props) {
|
|
9
8
|
var children = props.children,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
className = props.className,
|
|
10
|
+
defaultProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
13
11
|
return /*#__PURE__*/React.createElement(PointingModalBodyWrapper, _extends({
|
|
14
12
|
className: classNames('pointingmodal-body', className),
|
|
15
13
|
role: "list"
|
|
16
14
|
}, defaultProps), /*#__PURE__*/React.createElement("ul", null, children));
|
|
17
15
|
};
|
|
18
|
-
|
|
19
16
|
export default PointingModalBody;
|