trepur_components 2.3.8 → 2.3.10
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/lib/components/Accordion/Accordion.stories.d.ts +3 -51
- package/lib/components/Accordion/const.d.ts +31 -0
- package/lib/components/Accordion/index.d.ts +3 -4
- package/lib/components/Accordion/index.js +7 -4
- package/lib/components/AlertBar/AlertBar.stories.d.ts +13 -152
- package/lib/components/AlertBar/index.d.ts +12 -8
- package/lib/components/AlertBar/index.js +33 -46
- package/lib/components/Avatar/Avatar.stories.d.ts +0 -34
- package/lib/components/Breadcrumbs/Breadcrumbs.stories.d.ts +6 -50
- package/lib/components/Breadcrumbs/index.d.ts +10 -2
- package/lib/components/Breadcrumbs/index.js +14 -10
- package/lib/components/Button/Button.stories.d.ts +7 -179
- package/lib/components/Button/index.d.ts +10 -16
- package/lib/components/Button/index.js +28 -64
- package/lib/components/Calendar/Calendar.stories.d.ts +3 -128
- package/lib/components/Calendar/index.d.ts +3 -4
- package/lib/components/Calendar/index.js +46 -43
- package/lib/components/Card/Card.stories.d.ts +2 -99
- package/lib/components/Card/index.d.ts +2 -17
- package/lib/components/Card/index.js +20 -46
- package/lib/components/Carousel/Carousel.stories.d.ts +10 -549
- package/lib/components/Carousel/index.d.ts +17 -24
- package/lib/components/Carousel/index.js +148 -237
- package/lib/components/Carousel/utils.d.ts +1 -0
- package/lib/components/Carousel/utils.js +38 -0
- package/lib/components/CarouselThumbnail/CarouselThumbnail.stories.d.ts +10 -534
- package/lib/components/CarouselThumbnail/const.d.ts +1 -0
- package/lib/components/CarouselThumbnail/const.js +20 -0
- package/lib/components/CarouselThumbnail/index.d.ts +10 -9
- package/lib/components/CarouselThumbnail/index.js +59 -190
- package/lib/components/CarouselThumbnail/utils.d.ts +2 -0
- package/lib/components/CarouselThumbnail/utils.js +65 -0
- package/lib/components/Checkbox/Checkbox.stories.d.ts +5 -40
- package/lib/components/Checkbox/index.d.ts +9 -5
- package/lib/components/Checkbox/index.js +19 -22
- package/lib/components/Collapsible/Collapsible.stories.d.ts +11 -36
- package/lib/components/Collapsible/index.d.ts +17 -10
- package/lib/components/Collapsible/index.js +83 -84
- package/lib/components/Counter/Counter.stories.d.ts +8 -36
- package/lib/components/Counter/index.d.ts +11 -3
- package/lib/components/Counter/index.js +47 -29
- package/lib/components/DetailUpdater/DetailUpdater.stories.d.ts +2 -86
- package/lib/components/DetailUpdater/index.js +31 -31
- package/lib/components/Dialog/Dialog.stories.d.ts +0 -130
- package/lib/components/Dialog/index.d.ts +1 -1
- package/lib/components/Dialog/index.js +14 -76
- package/lib/components/Dropdown/Dropdown.stories.d.ts +17 -0
- package/lib/components/Dropdown/index.d.ts +13 -0
- package/lib/components/Dropdown/index.js +66 -0
- package/lib/components/Dropdown/utils.d.ts +1 -0
- package/lib/components/Dropdown/utils.js +14 -0
- package/lib/components/FileUploader/FileUploader.stories.d.ts +6 -4
- package/lib/components/FileUploader/index.d.ts +14 -8
- package/lib/components/Footer/Footer.stories.d.ts +8 -94
- package/lib/components/Footer/index.d.ts +9 -3
- package/lib/components/Footer/index.js +34 -34
- package/lib/components/FooterNav/FooterNav.stories.d.ts +11 -124
- package/lib/components/FooterNav/index.d.ts +14 -12
- package/lib/components/FooterNav/index.js +36 -26
- package/lib/components/Form/index.d.ts +3 -3
- package/lib/components/Form/index.js +6 -17
- package/lib/components/Gallery/Gallery.stories.d.ts +16 -0
- package/lib/components/Gallery/index.d.ts +7 -0
- package/lib/components/Greeting/Greeting.stories.d.ts +2 -72
- package/lib/components/Greeting/index.d.ts +3 -4
- package/lib/components/Greeting/index.js +18 -11
- package/lib/components/HamburgerIcon/HamburgerIcon.stories.d.ts +1 -55
- package/lib/components/HamburgerIcon/index.d.ts +2 -7
- package/lib/components/HamburgerIcon/index.js +38 -53
- package/lib/components/Icon/Icon.stories.d.ts +5 -36
- package/lib/components/Icon/index.d.ts +6 -6
- package/lib/components/Icon/index.js +19 -11
- package/lib/components/Image/Image.stories.d.ts +1 -146
- package/lib/components/Image/index.d.ts +3 -13
- package/lib/components/Image/index.js +15 -97
- package/lib/components/ImageCard/ImageCard.stories.d.ts +19 -0
- package/lib/components/ImageCard/index.d.ts +11 -0
- package/lib/components/ImageCard/index.js +32 -0
- package/lib/components/Input/Input.stories.d.ts +9 -101
- package/lib/components/Input/index.d.ts +11 -7
- package/lib/components/Input/index.js +80 -86
- package/lib/components/MenuButton/index.js +16 -16
- package/lib/components/Nav/Nav.stories.d.ts +32 -0
- package/lib/components/Nav/index.d.ts +21 -0
- package/lib/components/Nav/index.js +82 -0
- package/lib/components/NavItem/NavItem.stories.d.ts +7 -143
- package/lib/components/NavItem/index.d.ts +7 -15
- package/lib/components/NavItem/index.js +22 -23
- package/lib/components/Pill/Pill.stories.d.ts +11 -73
- package/lib/components/Pill/index.d.ts +16 -7
- package/lib/components/Pill/index.js +29 -29
- package/lib/components/Select/index.js +1 -1
- package/lib/components/SplitCard/SplitCard.stories.d.ts +21 -0
- package/lib/components/SplitCard/index.d.ts +14 -0
- package/lib/components/Stars/Star.stories.d.ts +14 -0
- package/lib/components/Stars/index.d.ts +8 -0
- package/lib/components/Stars/index.js +22 -0
- package/lib/components/Testimonial/Testimonial.stories.d.ts +9 -160
- package/lib/components/Testimonial/index.d.ts +12 -15
- package/lib/components/Testimonial/index.js +40 -40
- package/lib/components/TextArea/TextArea.stories.d.ts +8 -72
- package/lib/components/TextArea/index.d.ts +14 -7
- package/lib/components/TextArea/index.js +73 -83
- package/lib/components/Timeline/Timeline.stories.d.ts +9 -69
- package/lib/components/Timeline/index.d.ts +10 -16
- package/lib/components/Timeline/index.js +26 -167
- package/lib/components/Tubestops/Tubestops.stories.d.ts +6 -41
- package/lib/components/Tubestops/index.d.ts +12 -5
- package/lib/components/Tubestops/index.js +69 -36
- package/lib/components/Video/Video.stories.d.ts +12 -38
- package/lib/components/Video/index.d.ts +10 -7
- package/lib/components/Video/index.js +30 -32
- package/lib/components/index.d.ts +5 -28
- package/lib/documentation/assets/index.d.ts +3 -0
- package/lib/index.js +64 -110
- package/lib/styles/global.css +1 -1
- package/lib/styles/themes/local.css +61 -9
- package/lib/styles/themes/test.css +28 -0
- package/lib/tailwind/colors.ts +53 -385
- package/lib/tailwind/preset.ts +4 -0
- package/package.json +6 -2
- package/.eslintrc.cjs +0 -72
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -10
- package/.prettierrc.json +0 -22
- package/archive/theme.ts +0 -39
- package/lib/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.d.ts +0 -67
- package/lib/components/BreadcrumbsBordered/index.d.ts +0 -6
- package/lib/components/BreadcrumbsBordered/index.js +0 -28
- package/lib/components/BreadcrumbsItem/BreadcrumbsItem.stories.d.ts +0 -74
- package/lib/components/BreadcrumbsItem/index.d.ts +0 -10
- package/lib/components/BreadcrumbsItem/index.js +0 -117
- package/lib/components/CardWithTopImage/CardWithTopImage.stories.d.ts +0 -83
- package/lib/components/CardWithTopImage/index.d.ts +0 -9
- package/lib/components/CardWithTopImage/index.js +0 -28
- package/lib/components/Column/Column.stories.d.ts +0 -116
- package/lib/components/Column/index.d.ts +0 -10
- package/lib/components/Column/index.js +0 -8
- package/lib/components/ComponentWrapper/ComponentWrapper.stories.d.ts +0 -77
- package/lib/components/ComponentWrapper/index.d.ts +0 -14
- package/lib/components/ComponentWrapper/index.js +0 -27
- package/lib/components/Container/Container.stories.d.ts +0 -75
- package/lib/components/Container/index.d.ts +0 -7
- package/lib/components/Container/index.js +0 -12
- package/lib/components/DropdownMenu/DropdownMenu.stories.d.ts +0 -76
- package/lib/components/DropdownMenu/index.d.ts +0 -14
- package/lib/components/DropdownMenu/index.js +0 -27
- package/lib/components/DynamicTextSection/DynamicTextSection.stories.d.ts +0 -100
- package/lib/components/DynamicTextSection/index.d.ts +0 -11
- package/lib/components/DynamicTextSection/index.js +0 -18
- package/lib/components/FilterItem/FilterItem.stories.d.ts +0 -57
- package/lib/components/FilterItem/index.d.ts +0 -8
- package/lib/components/FilterItem/index.js +0 -60
- package/lib/components/FooterNavItem/FooterNavItem.stories.d.ts +0 -93
- package/lib/components/FooterNavItem/index.d.ts +0 -16
- package/lib/components/FooterNavItem/index.js +0 -27
- package/lib/components/FyreCard/FyreCard.stories.d.ts +0 -58
- package/lib/components/FyreCard/index.d.ts +0 -12
- package/lib/components/FyreCard/index.js +0 -27
- package/lib/components/HorizontalLine/HorizontalLine.stories.d.ts +0 -96
- package/lib/components/HorizontalLine/index.d.ts +0 -11
- package/lib/components/HorizontalLine/index.js +0 -24
- package/lib/components/IconCard/IconCard.stories.d.ts +0 -51
- package/lib/components/IconCard/index.d.ts +0 -13
- package/lib/components/IconCard/index.js +0 -27
- package/lib/components/ImageInfo/ImageInfo.stories.d.ts +0 -69
- package/lib/components/ImageInfo/index.d.ts +0 -14
- package/lib/components/ImageLink/ImageLink.stories.d.ts +0 -63
- package/lib/components/ImageLink/index.d.ts +0 -14
- package/lib/components/ImageLink/index.js +0 -39
- package/lib/components/ImageLinkList/ImageLinkList.stories.d.ts +0 -48
- package/lib/components/ImageLinkList/index.d.ts +0 -8
- package/lib/components/ImageLinkList/index.js +0 -18
- package/lib/components/InformationIcon/InformationIcon.stories.d.ts +0 -54
- package/lib/components/InformationIcon/index.d.ts +0 -12
- package/lib/components/InformationIcon/index.js +0 -65
- package/lib/components/InformationIconBlock/InformationIconBlock.stories.d.ts +0 -55
- package/lib/components/InformationIconBlock/index.d.ts +0 -12
- package/lib/components/Jumbotron/Jumbotron.stories.d.ts +0 -48
- package/lib/components/Jumbotron/index.d.ts +0 -8
- package/lib/components/Jumbotron/index.js +0 -9
- package/lib/components/NavOld/NavOld.stories.d.ts +0 -290
- package/lib/components/NavOld/StickyNav.d.ts +0 -22
- package/lib/components/NavOld/StickyNav.js +0 -135
- package/lib/components/NavOld/index.d.ts +0 -26
- package/lib/components/NavOld/index.js +0 -187
- package/lib/components/NavTwo/Dropdown.d.ts +0 -7
- package/lib/components/NavTwo/Dropdown.js +0 -21
- package/lib/components/NavTwo/Nav.stories.d.ts +0 -62
- package/lib/components/NavTwo/Sidebar.d.ts +0 -7
- package/lib/components/NavTwo/Sidebar.js +0 -21
- package/lib/components/NavTwo/StickyNav.d.ts +0 -7
- package/lib/components/NavTwo/StickyNav.js +0 -20
- package/lib/components/NavTwo/index.d.ts +0 -13
- package/lib/components/NavTwo/index.js +0 -28
- package/lib/components/NewsCard/NewsCard.stories.d.ts +0 -102
- package/lib/components/NewsCard/index.d.ts +0 -13
- package/lib/components/NewsCard/index.js +0 -26
- package/lib/components/ProductCard/ProductCard.stories.d.ts +0 -86
- package/lib/components/ProductCard/index.d.ts +0 -18
- package/lib/components/ProductCard/index.js +0 -69
- package/lib/components/ProductCardV2/ProductCardV2.stories.d.ts +0 -75
- package/lib/components/ProductCardV2/index.d.ts +0 -21
- package/lib/components/ProductCardV2/index.js +0 -67
- package/lib/components/Proficiencies/Proficiencies.stories.d.ts +0 -51
- package/lib/components/Proficiencies/index.d.ts +0 -12
- package/lib/components/Profile/Profile.stories.d.ts +0 -80
- package/lib/components/Profile/index.d.ts +0 -17
- package/lib/components/Profile/index.js +0 -78
- package/lib/components/Row/Row.stories.d.ts +0 -62
- package/lib/components/Row/index.d.ts +0 -6
- package/lib/components/Row/index.js +0 -9
- package/lib/components/SocialBlock/SocialBlock.stories.d.ts +0 -101
- package/lib/components/SocialBlock/index.d.ts +0 -14
- package/lib/components/SocialBlock/index.js +0 -37
- package/lib/components/SocialButton/index.js +0 -37
- package/lib/components/StarRating/StarRating.stories.d.ts +0 -49
- package/lib/components/StarRating/index.d.ts +0 -9
- package/lib/components/StarRating/index.js +0 -47
- package/lib/components/TextAndTitle/TextAndTitle.stories.d.ts +0 -97
- package/lib/components/TextAndTitle/index.d.ts +0 -25
- package/lib/components/TextAndTitle/index.js +0 -70
- package/lib/components/TimelineV2/TimelineV2.stories.d.ts +0 -87
- package/lib/components/TimelineV2/index.d.ts +0 -20
- package/lib/components/UserIcon/UserIcon.stories.d.ts +0 -81
- package/lib/components/UserIcon/index.d.ts +0 -10
- package/lib/components/UserIcon/index.js +0 -34
- package/lib/styles/themes/palette.css +0 -131
- package/lib/utils/matchMedia.js +0 -9
- package/postcss.config.js +0 -8
- package/src/components/Accordion/Accordion.stories.tsx +0 -116
- package/src/components/Accordion/index.tsx +0 -21
- package/src/components/AlertBar/AlertBar.stories.tsx +0 -95
- package/src/components/AlertBar/index.tsx +0 -113
- package/src/components/Avatar/Avatar.stories.tsx +0 -19
- package/src/components/Avatar/index.tsx +0 -492
- package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +0 -46
- package/src/components/Breadcrumbs/index.tsx +0 -40
- package/src/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.tsx +0 -52
- package/src/components/BreadcrumbsBordered/index.tsx +0 -41
- package/src/components/BreadcrumbsItem/BreadcrumbsItem.stories.tsx +0 -40
- package/src/components/BreadcrumbsItem/index.tsx +0 -147
- package/src/components/Button/Button.stories.tsx +0 -150
- package/src/components/Button/index.tsx +0 -104
- package/src/components/Calendar/Calendar.stories.tsx +0 -82
- package/src/components/Calendar/index.tsx +0 -72
- package/src/components/Calendar/style.css +0 -233
- package/src/components/Card/Card.stories.tsx +0 -75
- package/src/components/Card/index.tsx +0 -96
- package/src/components/CardWithTopImage/CardWithTopImage.stories.tsx +0 -50
- package/src/components/CardWithTopImage/index.tsx +0 -35
- package/src/components/Carousel/Carousel.stories.tsx +0 -451
- package/src/components/Carousel/index.tsx +0 -382
- package/src/components/CarouselThumbnail/CarouselThumbnail.stories.tsx +0 -350
- package/src/components/CarouselThumbnail/index.tsx +0 -293
- package/src/components/Checkbox/Checkbox.mdx +0 -33
- package/src/components/Checkbox/Checkbox.stories.tsx +0 -34
- package/src/components/Checkbox/index.tsx +0 -41
- package/src/components/Collapsible/Collapsible.stories.tsx +0 -67
- package/src/components/Collapsible/index.tsx +0 -128
- package/src/components/Column/Column.stories.tsx +0 -89
- package/src/components/Column/index.tsx +0 -18
- package/src/components/ComponentWrapper/ComponentWrapper.stories.tsx +0 -40
- package/src/components/ComponentWrapper/index.tsx +0 -48
- package/src/components/Container/Container.stories.tsx +0 -40
- package/src/components/Container/index.tsx +0 -21
- package/src/components/Counter/Counter.stories.tsx +0 -19
- package/src/components/Counter/index.tsx +0 -42
- package/src/components/DetailUpdater/DetailUpdater.stories.tsx +0 -95
- package/src/components/DetailUpdater/index.tsx +0 -108
- package/src/components/Dialog/Dialog.stories.tsx +0 -130
- package/src/components/Dialog/index.tsx +0 -93
- package/src/components/DropdownMenu/DropdownMenu.stories.tsx +0 -59
- package/src/components/DropdownMenu/index.tsx +0 -45
- package/src/components/DynamicTextSection/DynamicTextSection.stories.tsx +0 -76
- package/src/components/DynamicTextSection/index.tsx +0 -32
- package/src/components/FileUploader/FilePreview.tsx +0 -45
- package/src/components/FileUploader/FileUploader.stories.tsx +0 -26
- package/src/components/FileUploader/index.tsx +0 -132
- package/src/components/FilterItem/FilterItem.stories.tsx +0 -33
- package/src/components/FilterItem/index.tsx +0 -97
- package/src/components/Footer/Footer.stories.tsx +0 -59
- package/src/components/Footer/index.tsx +0 -48
- package/src/components/FooterNav/FooterNav.stories.tsx +0 -122
- package/src/components/FooterNav/index.tsx +0 -49
- package/src/components/FooterNavItem/FooterNavItem.stories.tsx +0 -53
- package/src/components/FooterNavItem/index.tsx +0 -58
- package/src/components/Form/Form.stories.tsx +0 -86
- package/src/components/Form/index.tsx +0 -46
- package/src/components/Form/style.module.css +0 -0
- package/src/components/FyreCard/FyreCard.stories.tsx +0 -31
- package/src/components/FyreCard/index.tsx +0 -44
- package/src/components/Greeting/Greeting.stories.tsx +0 -41
- package/src/components/Greeting/index.tsx +0 -30
- package/src/components/HamburgerIcon/HamburgerIcon.stories.tsx +0 -32
- package/src/components/HamburgerIcon/index.tsx +0 -97
- package/src/components/HorizontalLine/HorizontalLine.stories.tsx +0 -54
- package/src/components/HorizontalLine/index.tsx +0 -32
- package/src/components/Icon/Icon.stories.tsx +0 -22
- package/src/components/Icon/index.tsx +0 -25
- package/src/components/IconCard/IconCard.stories.tsx +0 -26
- package/src/components/IconCard/index.tsx +0 -54
- package/src/components/Image/Image.stories.tsx +0 -87
- package/src/components/Image/index.tsx +0 -127
- package/src/components/ImageInfo/ImageInfo.stories.tsx +0 -38
- package/src/components/ImageInfo/index.tsx +0 -84
- package/src/components/ImageLink/ImageLink.stories.tsx +0 -36
- package/src/components/ImageLink/index.tsx +0 -58
- package/src/components/ImageLinkList/ImageLinkList.stories.tsx +0 -34
- package/src/components/ImageLinkList/index.tsx +0 -28
- package/src/components/InformationIcon/InformationIcon.stories.tsx +0 -29
- package/src/components/InformationIcon/index.tsx +0 -105
- package/src/components/InformationIconBlock/InformationIconBlock.stories.tsx +0 -38
- package/src/components/InformationIconBlock/index.tsx +0 -56
- package/src/components/Input/Input.stories.tsx +0 -84
- package/src/components/Input/index.tsx +0 -130
- package/src/components/Jumbotron/Jumbotron.stories.tsx +0 -21
- package/src/components/Jumbotron/index.tsx +0 -19
- package/src/components/MenuButton/MenuButton.stories.tsx +0 -46
- package/src/components/MenuButton/index.tsx +0 -66
- package/src/components/Modal/Modal.stories.tsx +0 -82
- package/src/components/Modal/index.tsx +0 -71
- package/src/components/NavItem/NavItem.stories.tsx +0 -90
- package/src/components/NavItem/index.tsx +0 -43
- package/src/components/NavOld/NavOld.stories.tsx +0 -193
- package/src/components/NavOld/StickyNav.tsx +0 -187
- package/src/components/NavOld/index.tsx +0 -265
- package/src/components/NavTwo/Dropdown.tsx +0 -30
- package/src/components/NavTwo/Nav.stories.tsx +0 -32
- package/src/components/NavTwo/Sidebar.tsx +0 -30
- package/src/components/NavTwo/StickyNav.tsx +0 -29
- package/src/components/NavTwo/index.tsx +0 -37
- package/src/components/NewsCard/NewsCard.stories.tsx +0 -72
- package/src/components/NewsCard/index.tsx +0 -44
- package/src/components/Pill/Pill.stories.tsx +0 -44
- package/src/components/Pill/index.tsx +0 -54
- package/src/components/ProductCard/ProductCard.stories.tsx +0 -61
- package/src/components/ProductCard/index.tsx +0 -110
- package/src/components/ProductCardV2/ProductCardV2.stories.tsx +0 -50
- package/src/components/ProductCardV2/index.tsx +0 -98
- package/src/components/Proficiencies/Proficiencies.stories.tsx +0 -50
- package/src/components/Proficiencies/index.tsx +0 -51
- package/src/components/Profile/Profile.stories.tsx +0 -49
- package/src/components/Profile/index.tsx +0 -103
- package/src/components/Row/Row.stories.tsx +0 -53
- package/src/components/Row/index.tsx +0 -17
- package/src/components/Search/Search.stories.tsx +0 -63
- package/src/components/Search/index.tsx +0 -64
- package/src/components/Select/Select.stories.tsx +0 -55
- package/src/components/Select/index.tsx +0 -98
- package/src/components/Showcase/Showcase.stories.tsx +0 -31
- package/src/components/Showcase/index.tsx +0 -69
- package/src/components/SideNav/SideNav.stories.tsx +0 -50
- package/src/components/SideNav/index.tsx +0 -39
- package/src/components/SocialBlock/SocialBlock.stories.tsx +0 -58
- package/src/components/SocialBlock/index.tsx +0 -59
- package/src/components/SocialButton/SocialButton.stories.tsx +0 -88
- package/src/components/SocialButton/index.tsx +0 -64
- package/src/components/StarRating/StarRating.stories.tsx +0 -23
- package/src/components/StarRating/index.tsx +0 -65
- package/src/components/Testimonial/Testimonial.stories.tsx +0 -109
- package/src/components/Testimonial/index.tsx +0 -55
- package/src/components/TextAndTitle/TextAndTitle.stories.tsx +0 -71
- package/src/components/TextAndTitle/index.tsx +0 -119
- package/src/components/TextArea/TextArea.stories.tsx +0 -55
- package/src/components/TextArea/index.tsx +0 -124
- package/src/components/Timeline/Timeline.stories.tsx +0 -92
- package/src/components/Timeline/index.tsx +0 -256
- package/src/components/TimelineV2/TimelineV2.stories.tsx +0 -95
- package/src/components/TimelineV2/index.tsx +0 -70
- package/src/components/Tubestops/Tubestops.stories.tsx +0 -42
- package/src/components/Tubestops/index.tsx +0 -54
- package/src/components/UserIcon/UserIcon.stories.tsx +0 -52
- package/src/components/UserIcon/index.tsx +0 -43
- package/src/components/Video/Video.stories.tsx +0 -23
- package/src/components/Video/index.tsx +0 -45
- package/src/components/fonts/Sora/OFL.txt +0 -93
- package/src/components/fonts/Sora/README.txt +0 -70
- package/src/components/fonts/Sora/Sora-VariableFont_wght.ttf +0 -0
- package/src/components/fonts/Sora/static/Sora-Bold.ttf +0 -0
- package/src/components/fonts/Sora/static/Sora-ExtraBold.ttf +0 -0
- package/src/components/fonts/Sora/static/Sora-ExtraLight.ttf +0 -0
- package/src/components/fonts/Sora/static/Sora-Light.ttf +0 -0
- package/src/components/fonts/Sora/static/Sora-Medium.ttf +0 -0
- package/src/components/fonts/Sora/static/Sora-Regular.ttf +0 -0
- package/src/components/fonts/Sora/static/Sora-SemiBold.ttf +0 -0
- package/src/components/fonts/Sora/static/Sora-Thin.ttf +0 -0
- package/src/components/index.ts +0 -119
- package/src/components/typography/Fonts/Fonts.stories.tsx +0 -14
- package/src/components/typography/Fonts/Fonts.tsx +0 -74
- package/src/documentation/Colours.mdx +0 -192
- package/src/documentation/Introduction.mdx +0 -9
- package/src/index.ts +0 -1
- package/src/styles/global.css +0 -75
- package/src/styles/themes/local.css +0 -40
- package/src/styles/themes/palette.css +0 -131
- package/src/utils/controls.ts +0 -44
- package/src/utils/matchMedia.ts +0 -9
- package/src/utils/screens.ts +0 -7
- package/svg.d.ts +0 -4
- package/tailwind/boxShadow.ts +0 -9
- package/tailwind/colors.ts +0 -410
- package/tailwind/container.ts +0 -11
- package/tailwind/preset.ts +0 -88
- package/tailwind/spacing.ts +0 -14
- package/tailwind.config.ts +0 -81
- package/tsconfig.json +0 -49
- package/tsconfig.node.json +0 -12
- package/vite.config.mjs +0 -64
- /package/lib/{components → documentation}/typography/Fonts/Fonts.d.ts +0 -0
- /package/lib/{components → documentation}/typography/Fonts/Fonts.stories.d.ts +0 -0
|
@@ -1,492 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
|
|
3
|
-
// @ts-expect-error
|
|
4
|
-
import Snap from 'snapsvg-cjs';
|
|
5
|
-
|
|
6
|
-
export const Avatar: React.FC = (): any => {
|
|
7
|
-
const [s, setS] = useState(null);
|
|
8
|
-
|
|
9
|
-
let rightEyeWhite: any,
|
|
10
|
-
rightEyePupil: any,
|
|
11
|
-
leftEyeWhite: any,
|
|
12
|
-
leftEyePupil: any,
|
|
13
|
-
avatar: any,
|
|
14
|
-
armless: any,
|
|
15
|
-
torso: any,
|
|
16
|
-
face: any,
|
|
17
|
-
legs: any,
|
|
18
|
-
rightArm: any,
|
|
19
|
-
leftArm: any,
|
|
20
|
-
rightHand: any,
|
|
21
|
-
leftHand: any,
|
|
22
|
-
arms: any,
|
|
23
|
-
straps: any,
|
|
24
|
-
hands: any,
|
|
25
|
-
leftThigh: any,
|
|
26
|
-
rightThigh: any,
|
|
27
|
-
leftShoe: any,
|
|
28
|
-
rightShoe: any;
|
|
29
|
-
|
|
30
|
-
const leftShoulderRotationPoints = '175, 202';
|
|
31
|
-
const rightShoulderRotationPoints = '94, 202';
|
|
32
|
-
const svgContainerHeight = 400;
|
|
33
|
-
const svgContainerWidth = 265;
|
|
34
|
-
const skinColour = '#FFCC9A';
|
|
35
|
-
const zipColour = '#315107';
|
|
36
|
-
const eyeColour = '#1389BF';
|
|
37
|
-
const hairColour = '#F1B452';
|
|
38
|
-
const beardColour = '#F1B452';
|
|
39
|
-
const rucksackColour = '#072765';
|
|
40
|
-
const trouserColour = '#D3D3D3';
|
|
41
|
-
const jacketColour = '#416E0A';
|
|
42
|
-
const mouthColour = '#DC7144';
|
|
43
|
-
const shoeColour = '#000000';
|
|
44
|
-
const eyebrowColour = '#F1B452';
|
|
45
|
-
const noseColour = '#F1B452';
|
|
46
|
-
|
|
47
|
-
const createAvatar = (s: any, callBack: any): void => {
|
|
48
|
-
if (typeof window === 'undefined') return;
|
|
49
|
-
const head = s?.rect(103, 90, 68, 87, 50).attr({ fill: skinColour });
|
|
50
|
-
|
|
51
|
-
const leftEyebrow = s?.rect(146, 122, 12, 3, 2);
|
|
52
|
-
const rightEyebrow = s?.rect(115, 122, 12, 3, 2);
|
|
53
|
-
|
|
54
|
-
leftEyeWhite = s?.ellipse(152, 132, 6, 4);
|
|
55
|
-
rightEyeWhite = s?.ellipse(121, 132, 6, 4);
|
|
56
|
-
leftEyePupil = s?.ellipse(152, 132, 3, 3).attr({ fill: eyeColour });
|
|
57
|
-
rightEyePupil = s?.ellipse(121, 132, 3, 3).attr({ fill: eyeColour });
|
|
58
|
-
|
|
59
|
-
const leftEye = s?.group(leftEyeWhite, leftEyePupil);
|
|
60
|
-
const rightEye = s?.group(rightEyeWhite, rightEyePupil);
|
|
61
|
-
|
|
62
|
-
const outerBeard = s?.rect(103, 90, 68, 87, 50).attr({ fill: 'white' });
|
|
63
|
-
const innerBeard = s?.rect(106, 105, 62, 62, 50);
|
|
64
|
-
const beardGroup = s?.group(outerBeard, innerBeard);
|
|
65
|
-
const beard = s?.rect(103, 140, 68, 60).attr({
|
|
66
|
-
mask: beardGroup,
|
|
67
|
-
fill: beardColour,
|
|
68
|
-
opacity: 0.6,
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
const outerHair = s?.rect(103, 90, 68, 60, 25).attr({ fill: 'white' });
|
|
72
|
-
const innerHair = s?.rect(109, 105, 56, 40, 10);
|
|
73
|
-
const hairGroup = s?.group(outerHair, innerHair);
|
|
74
|
-
const baseHair = s?.rect(103, 90, 68, 40).attr({
|
|
75
|
-
mask: hairGroup,
|
|
76
|
-
fill: hairColour,
|
|
77
|
-
})
|
|
78
|
-
const hairLevel1 = s
|
|
79
|
-
?.rect(113, 88, 50, 16, 10)
|
|
80
|
-
.attr({ fill: hairColour })
|
|
81
|
-
.transform('r0');
|
|
82
|
-
const hair = s?.group(baseHair, hairLevel1);
|
|
83
|
-
|
|
84
|
-
const outerNose = s?.rect(129, 140, 12, 10, 30)?.attr({ fill: 'white' });
|
|
85
|
-
const innerNose = s?.rect(130, 142, 10, 12, 30);
|
|
86
|
-
const noseGroup = s?.group(outerNose, innerNose);
|
|
87
|
-
const nose = s?.rect(129, 140, 12, 10)?.attr({
|
|
88
|
-
mask: noseGroup,
|
|
89
|
-
fill: noseColour,
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
const leftEar = s?.circle(103, 135, 5)?.attr({ fill: 'white' });
|
|
93
|
-
const leftEarMask = s
|
|
94
|
-
?.rect(89, 120, 15, 30)
|
|
95
|
-
.attr({
|
|
96
|
-
mask: leftEar,
|
|
97
|
-
fill: skinColour,
|
|
98
|
-
})
|
|
99
|
-
.transform('r-2');
|
|
100
|
-
|
|
101
|
-
const rightEar = s?.circle(171, 135, 5)?.attr({ fill: 'white' });
|
|
102
|
-
const rightEarMask = s
|
|
103
|
-
?.rect(170, 120, 15, 30)
|
|
104
|
-
.attr({
|
|
105
|
-
mask: rightEar,
|
|
106
|
-
fill: skinColour,
|
|
107
|
-
})
|
|
108
|
-
.transform('r2');
|
|
109
|
-
|
|
110
|
-
const body = s
|
|
111
|
-
?.rect(100, 188, 73, 105, 16, 16)
|
|
112
|
-
.attr({ fill: jacketColour });
|
|
113
|
-
const hood = s?.ellipse(136, 182, 24, 10).attr({ fill: jacketColour });
|
|
114
|
-
|
|
115
|
-
const rightShoulder = s?.rect(87, 190, 27, 14, 10);
|
|
116
|
-
rightArm = s?.rect(84, 195, 16, 90, 10, 10);
|
|
117
|
-
|
|
118
|
-
const leftShoulder = s?.rect(155, 190, 27, 14, 10);
|
|
119
|
-
leftArm = s?.rect(170, 195, 16, 90, 10, 10);
|
|
120
|
-
|
|
121
|
-
leftHand = s?.circle(178, 278, 8);
|
|
122
|
-
rightHand = s?.circle(92, 278, 8);
|
|
123
|
-
|
|
124
|
-
const wasteBand = s?.rect(98, 277, 74, 33, 0, 0);
|
|
125
|
-
leftThigh = s?.rect(142, 300, 30, 90, 0, 0);
|
|
126
|
-
rightThigh = s?.rect(98, 300, 30, 90, 0, 0);
|
|
127
|
-
|
|
128
|
-
const bag = s?.rect(99, 180, 74, 78, 10);
|
|
129
|
-
const rightStrap = s?.rect(101, 185, 5, 100, 10).transform('r4.5');
|
|
130
|
-
const leftStrap = s?.rect(163, 185, 5, 100, 10).transform('r-4.5');
|
|
131
|
-
|
|
132
|
-
const mouth = s?.circle(136, 155, 10).attr({ fill: 'white' });
|
|
133
|
-
const mouthCutOff = s?.rect(120, 155, 30, 15).attr({ fill: mouthColour });
|
|
134
|
-
|
|
135
|
-
const leftShoeTop = s?.rect(142, 370, 30, 20, 10);
|
|
136
|
-
const leftShoeSole = s?.rect(142, 378, 30, 12);
|
|
137
|
-
|
|
138
|
-
const rightShoeTop = s?.rect(98, 370, 30, 20, 10);
|
|
139
|
-
const rightShoeSole = s?.rect(98, 378, 30, 12);
|
|
140
|
-
|
|
141
|
-
const mainZip = s?.rect(135, 199, 3, 94);
|
|
142
|
-
const leftZip = s?.rect(141, 188, 2, 15).transform('r44.5');
|
|
143
|
-
const rightZip = s?.rect(130, 188, 2, 15).transform('r-44.5');
|
|
144
|
-
|
|
145
|
-
const centerNeck = s?.rect(128, 170, 17, 21);
|
|
146
|
-
const leftNeck = s?.rect(139, 181, 10, 10).transform('r-33');
|
|
147
|
-
const rightNeck = s?.rect(124, 181, 10, 10).transform('r33');
|
|
148
|
-
const frontNeck = s?.rect(129, 182, 15, 15).transform('r45');
|
|
149
|
-
|
|
150
|
-
const neck = s
|
|
151
|
-
?.group(centerNeck, leftNeck, rightNeck, frontNeck)
|
|
152
|
-
.attr({ fill: skinColour });
|
|
153
|
-
const zip = s?.group(mainZip, leftZip, rightZip).attr({ fill: zipColour });
|
|
154
|
-
leftShoe = s?.group(leftShoeTop, leftShoeSole);
|
|
155
|
-
rightShoe = s?.group(rightShoeTop, rightShoeSole);
|
|
156
|
-
const rucksack = s
|
|
157
|
-
?.group(leftStrap, rightStrap, bag)
|
|
158
|
-
.attr({ fill: rucksackColour });
|
|
159
|
-
const eyes = s?.group(leftEye, rightEye).attr({ fill: 'white' });
|
|
160
|
-
const eyebrows = s
|
|
161
|
-
?.group(leftEyebrow, rightEyebrow)
|
|
162
|
-
.attr({ fill: eyebrowColour });
|
|
163
|
-
const shoes = s?.group(leftShoe, rightShoe).attr({ fill: shoeColour });
|
|
164
|
-
const ears = s?.group(leftEarMask, rightEarMask);
|
|
165
|
-
|
|
166
|
-
arms = s
|
|
167
|
-
?.group(rightShoulder, leftShoulder, leftArm, rightArm)
|
|
168
|
-
.attr({ fill: jacketColour });
|
|
169
|
-
hands = s?.group(leftHand, rightHand).attr({ fill: skinColour });
|
|
170
|
-
straps = s?.group(leftStrap, rightStrap).attr({ fill: rucksackColour });
|
|
171
|
-
|
|
172
|
-
face = s?.group(
|
|
173
|
-
head,
|
|
174
|
-
eyes,
|
|
175
|
-
eyebrows,
|
|
176
|
-
nose,
|
|
177
|
-
mouth,
|
|
178
|
-
mouthCutOff,
|
|
179
|
-
ears,
|
|
180
|
-
hair,
|
|
181
|
-
beard,
|
|
182
|
-
)
|
|
183
|
-
torso = s?.group(rucksack, hood, body, neck, zip);
|
|
184
|
-
legs = s
|
|
185
|
-
?.group(leftThigh, rightThigh, wasteBand, shoes)
|
|
186
|
-
.attr({ fill: trouserColour });
|
|
187
|
-
|
|
188
|
-
armless = s?.group(legs, torso, face);
|
|
189
|
-
avatar = s?.group(armless, arms, straps, hands);
|
|
190
|
-
|
|
191
|
-
mouthCutOff?.attr({
|
|
192
|
-
mask: mouth,
|
|
193
|
-
})
|
|
194
|
-
|
|
195
|
-
callBack(avatar);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
const nextFrame = (s: any, frameArray: any, frame: number): void => {
|
|
199
|
-
if (frame >= frameArray.length) {
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
Snap.animate(
|
|
204
|
-
frameArray[frame].from,
|
|
205
|
-
frameArray[frame].to,
|
|
206
|
-
frameArray[frame].funct,
|
|
207
|
-
frameArray[frame].dur,
|
|
208
|
-
null,
|
|
209
|
-
nextFrame.bind(null, Snap, frameArray, frame + 1),
|
|
210
|
-
)
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
const rightWave = [
|
|
214
|
-
{
|
|
215
|
-
funct: function (val: number) {
|
|
216
|
-
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
217
|
-
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
218
|
-
},
|
|
219
|
-
from: 0,
|
|
220
|
-
to: 170,
|
|
221
|
-
dur: 100,
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
funct: function (val: number) {
|
|
225
|
-
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
226
|
-
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
227
|
-
},
|
|
228
|
-
from: 170,
|
|
229
|
-
to: 120,
|
|
230
|
-
dur: 100,
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
funct: function (val: number) {
|
|
234
|
-
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
235
|
-
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
236
|
-
},
|
|
237
|
-
from: 120,
|
|
238
|
-
to: 170,
|
|
239
|
-
dur: 100,
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
funct: function (val: number) {
|
|
243
|
-
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
244
|
-
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
245
|
-
},
|
|
246
|
-
from: 170,
|
|
247
|
-
to: 120,
|
|
248
|
-
dur: 100,
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
funct: function (val: number) {
|
|
252
|
-
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
253
|
-
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
254
|
-
},
|
|
255
|
-
from: 120,
|
|
256
|
-
to: 170,
|
|
257
|
-
dur: 100,
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
funct: function (val: number) {
|
|
261
|
-
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
262
|
-
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
263
|
-
},
|
|
264
|
-
from: 170,
|
|
265
|
-
to: 120,
|
|
266
|
-
dur: 100,
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
funct: function (val: number) {
|
|
270
|
-
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
271
|
-
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
272
|
-
},
|
|
273
|
-
from: 120,
|
|
274
|
-
to: 0,
|
|
275
|
-
dur: 100,
|
|
276
|
-
}
|
|
277
|
-
]
|
|
278
|
-
|
|
279
|
-
const leftWave = [
|
|
280
|
-
{
|
|
281
|
-
funct: function (val: number) {
|
|
282
|
-
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
283
|
-
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
284
|
-
},
|
|
285
|
-
from: 0,
|
|
286
|
-
to: -150,
|
|
287
|
-
dur: 100,
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
funct: function (val: number) {
|
|
291
|
-
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
292
|
-
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
293
|
-
},
|
|
294
|
-
from: -150,
|
|
295
|
-
to: -120,
|
|
296
|
-
dur: 100,
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
funct: function (val: number) {
|
|
300
|
-
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
301
|
-
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
302
|
-
},
|
|
303
|
-
from: -120,
|
|
304
|
-
to: -150,
|
|
305
|
-
dur: 100,
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
funct: function (val: number) {
|
|
309
|
-
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
310
|
-
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
311
|
-
},
|
|
312
|
-
from: -150,
|
|
313
|
-
to: -120,
|
|
314
|
-
dur: 100,
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
funct: function (val: number) {
|
|
318
|
-
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
319
|
-
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
320
|
-
},
|
|
321
|
-
from: -120,
|
|
322
|
-
to: -150,
|
|
323
|
-
dur: 100,
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
funct: function (val: number) {
|
|
327
|
-
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
328
|
-
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
329
|
-
},
|
|
330
|
-
from: -150,
|
|
331
|
-
to: -120,
|
|
332
|
-
dur: 100,
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
funct: function (val: number) {
|
|
336
|
-
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
337
|
-
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
338
|
-
},
|
|
339
|
-
from: -120,
|
|
340
|
-
to: 0,
|
|
341
|
-
dur: 100,
|
|
342
|
-
}
|
|
343
|
-
]
|
|
344
|
-
|
|
345
|
-
const jump = (): void => {
|
|
346
|
-
torso.animate({ transform: 't0,20' }, 500);
|
|
347
|
-
arms.animate({ transform: 't0,20' }, 500);
|
|
348
|
-
straps.animate({ transform: 't0,20' }, 500);
|
|
349
|
-
hands.animate({ transform: 't0,20' }, 500);
|
|
350
|
-
face.animate({ transform: 't0,20' }, 500, function () {
|
|
351
|
-
face.animate({ transform: 't0,-70' }, 200);
|
|
352
|
-
torso.animate({ transform: 't0,-70' }, 200);
|
|
353
|
-
arms.animate({ transform: 't0,-70' }, 200);
|
|
354
|
-
straps.animate({ transform: 't0,-70' }, 200);
|
|
355
|
-
hands.animate({ transform: 't0,-70' }, 200);
|
|
356
|
-
legs.animate({ transform: 't0,-70' }, 200, function () {
|
|
357
|
-
face.animate({ transform: 't0,0' }, 200);
|
|
358
|
-
torso.animate({ transform: 't0,0' }, 200);
|
|
359
|
-
arms.animate({ transform: 't0,0' }, 200);
|
|
360
|
-
straps.animate({ transform: 't0,0' }, 200);
|
|
361
|
-
hands.animate({ transform: 't0,0' }, 200);
|
|
362
|
-
legs.animate({ transform: 't0,0' }, 200);
|
|
363
|
-
})
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
const eyesLeft = (duration: any): void => {
|
|
368
|
-
leftEyePupil.animate({ transform: 't2,0' }, duration);
|
|
369
|
-
rightEyePupil.animate({ transform: 't2,0' }, duration);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
const eyesRight = (duration: any): void => {
|
|
373
|
-
leftEyePupil.animate({ transform: 't-2,0' }, duration);
|
|
374
|
-
rightEyePupil.animate({ transform: 't-2,0' }, duration);
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
const eyesCenter = (duration: any): void => {
|
|
378
|
-
leftEyePupil.animate({ transform: 't0,0' }, duration);
|
|
379
|
-
rightEyePupil.animate({ transform: 't0,0' }, duration);
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
const blink = (times: number): void => {
|
|
383
|
-
if (times < 1) return;
|
|
384
|
-
[...Array(times)].forEach((_) => {
|
|
385
|
-
leftEyeWhite?.animate({ ry: 0 }, 120);
|
|
386
|
-
leftEyePupil.animate({ ry: 0 }, 120);
|
|
387
|
-
rightEyeWhite?.animate({ ry: 0 }, 120);
|
|
388
|
-
rightEyePupil.animate({ ry: 0 }, 120, function () {
|
|
389
|
-
leftEyeWhite?.animate({ ry: 4 }, 200);
|
|
390
|
-
leftEyePupil?.animate({ ry: 3 }, 200);
|
|
391
|
-
rightEyeWhite?.animate({ ry: 4 }, 200);
|
|
392
|
-
rightEyePupil?.animate({ ry: 3 }, 200, () => {
|
|
393
|
-
blink(times - 1);
|
|
394
|
-
})
|
|
395
|
-
});
|
|
396
|
-
})
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
const animate = (s: any, animation: any): any => {
|
|
400
|
-
nextFrame(s, animation, 0);
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
// const drawPath = (s: any): void => {
|
|
404
|
-
// const linePath =
|
|
405
|
-
// "M46.5,433 q3.5,-153 7,-356 q59,-51 116,-5 q60,96 1,159 q-58,26 -116,2 q108,57 119,202 q26,-166 41,-371 q99,1 186,3 q28,108 -21,187 q-66,23 -160,-9 q154,79 133,143 q-82,59 -175,42";
|
|
406
|
-
// const lineLength: number = Snap.path.getTotalLength(linePath);
|
|
407
|
-
// const lineDraw = s?.path(linePath);
|
|
408
|
-
// lineDraw.attr({
|
|
409
|
-
// fill: "none",
|
|
410
|
-
// stroke: "#009FE3",
|
|
411
|
-
// "stroke-dasharray": `${lineLength} ${lineLength}`,
|
|
412
|
-
// "stroke-dashoffset": lineLength,
|
|
413
|
-
// "stroke-width": 6,
|
|
414
|
-
// "stroke-linecap": "round",
|
|
415
|
-
// "stroke-linejoin": "round",
|
|
416
|
-
// "stroke-miterlimit": 10,
|
|
417
|
-
// });
|
|
418
|
-
// lineDraw.animate(
|
|
419
|
-
// {
|
|
420
|
-
// strokeDashoffset: 0,
|
|
421
|
-
// },
|
|
422
|
-
// 3000,
|
|
423
|
-
// null
|
|
424
|
-
// );
|
|
425
|
-
// };
|
|
426
|
-
|
|
427
|
-
useEffect(() => {
|
|
428
|
-
if (typeof window === 'undefined') return;
|
|
429
|
-
if (Snap) {
|
|
430
|
-
setS(Snap('#svg'));
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
const makeBlinkHappen = (): void => {
|
|
434
|
-
const randNum = Math.floor(Math.random() * 2) + 1;
|
|
435
|
-
blink(randNum);
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
const loadActions = (): void => {
|
|
439
|
-
if (!avatar) return;
|
|
440
|
-
|
|
441
|
-
setTimeout(() => {
|
|
442
|
-
animate(s, leftWave);
|
|
443
|
-
}, 1000);
|
|
444
|
-
|
|
445
|
-
// drawPath(s)
|
|
446
|
-
setInterval(makeBlinkHappen, 3500);
|
|
447
|
-
|
|
448
|
-
rightArm?.click(() => animate(s, rightWave));
|
|
449
|
-
rightHand?.click(() => animate(s, rightWave));
|
|
450
|
-
|
|
451
|
-
leftArm?.click(() => animate(s, leftWave));
|
|
452
|
-
leftHand?.click(() => animate(s, leftWave));
|
|
453
|
-
armless?.click(jump);
|
|
454
|
-
leftArm?.hover(() => {
|
|
455
|
-
eyesLeft(200);
|
|
456
|
-
})
|
|
457
|
-
leftThigh?.hover(() => {
|
|
458
|
-
eyesLeft(200);
|
|
459
|
-
})
|
|
460
|
-
leftShoe?.hover(() => {
|
|
461
|
-
eyesLeft(200);
|
|
462
|
-
})
|
|
463
|
-
|
|
464
|
-
torso?.hover(() => {
|
|
465
|
-
eyesCenter(200);
|
|
466
|
-
})
|
|
467
|
-
|
|
468
|
-
rightArm?.hover(() => {
|
|
469
|
-
eyesRight(200);
|
|
470
|
-
})
|
|
471
|
-
rightThigh?.hover(() => {
|
|
472
|
-
eyesRight(200);
|
|
473
|
-
})
|
|
474
|
-
rightShoe?.hover(() => {
|
|
475
|
-
eyesRight(200);
|
|
476
|
-
})
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
createAvatar(s, loadActions);
|
|
480
|
-
}, [s]);
|
|
481
|
-
|
|
482
|
-
return (
|
|
483
|
-
<svg
|
|
484
|
-
id="svg"
|
|
485
|
-
className="mx-auto"
|
|
486
|
-
height={`${svgContainerHeight.toString()}px`}
|
|
487
|
-
width={`${svgContainerWidth.toString()}px`}
|
|
488
|
-
version="1.1"
|
|
489
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
490
|
-
/>
|
|
491
|
-
);
|
|
492
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Meta, type StoryObj } from '@storybook/react';
|
|
2
|
-
import { idAndClassName } from '@utils/controls';
|
|
3
|
-
|
|
4
|
-
import { Breadcrumbs } from '.';
|
|
5
|
-
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'Components/Breadcrumbs',
|
|
8
|
-
component: Breadcrumbs,
|
|
9
|
-
argTypes: {
|
|
10
|
-
...idAndClassName,
|
|
11
|
-
|
|
12
|
-
links: {
|
|
13
|
-
description: 'An array of items to be displayed in the component',
|
|
14
|
-
table: {
|
|
15
|
-
category: '',
|
|
16
|
-
type: { summary: 'array' },
|
|
17
|
-
defaultValue: { summary: 'undefined' },
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
args: {
|
|
22
|
-
links: [
|
|
23
|
-
{
|
|
24
|
-
href: '/',
|
|
25
|
-
name: 'link 1',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
href: '/',
|
|
29
|
-
name: 'link 2',
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
href: '/',
|
|
33
|
-
name: 'link 3',
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
href: '/',
|
|
37
|
-
name: 'link 4',
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
},
|
|
41
|
-
}
|
|
42
|
-
export default meta;
|
|
43
|
-
|
|
44
|
-
type Story = StoryObj<typeof Breadcrumbs>;
|
|
45
|
-
|
|
46
|
-
export const Default: Story = {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import classNames from 'classnames';
|
|
2
|
-
|
|
3
|
-
export interface Props {
|
|
4
|
-
id?: string;
|
|
5
|
-
className?: string;
|
|
6
|
-
links?: Array<{ name: string; href: string }>;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const Breadcrumbs = ({ id, className, links }: Props) => {
|
|
10
|
-
const linksLength = links != null ? Object.keys(links).length : 0;
|
|
11
|
-
|
|
12
|
-
const classList = classNames(className, 'flex py-2');
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<ul id={id} className={classList}>
|
|
16
|
-
{links?.map((link, i) => {
|
|
17
|
-
return (
|
|
18
|
-
<div key={`breadcrumb_${i + 1}`} className="flex">
|
|
19
|
-
<li className="h-8">
|
|
20
|
-
{i + 1 >= linksLength ? (
|
|
21
|
-
<p className="px-1 py-1">{link.name}</p>
|
|
22
|
-
) : (
|
|
23
|
-
<p className="px-1 py-1">
|
|
24
|
-
<a className="text-facebook hover:underline" href={link.href}>
|
|
25
|
-
{link.name}
|
|
26
|
-
</a>
|
|
27
|
-
</p>
|
|
28
|
-
)}
|
|
29
|
-
</li>
|
|
30
|
-
{i + 1 < linksLength && (
|
|
31
|
-
<li className="h-8">
|
|
32
|
-
<p className="py-1"> > </p>
|
|
33
|
-
</li>
|
|
34
|
-
)}
|
|
35
|
-
</div>
|
|
36
|
-
);
|
|
37
|
-
})}
|
|
38
|
-
</ul>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Meta, type StoryObj } from '@storybook/react';
|
|
2
|
-
import { idAndClassName } from '@utils/controls';
|
|
3
|
-
|
|
4
|
-
import { BreadcrumbsBordered } from '.';
|
|
5
|
-
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'Components/BreadcrumbsBordered',
|
|
8
|
-
component: BreadcrumbsBordered,
|
|
9
|
-
parameters: {},
|
|
10
|
-
argTypes: {
|
|
11
|
-
...idAndClassName,
|
|
12
|
-
links: {
|
|
13
|
-
description: 'An array of objects to be displayed in the component',
|
|
14
|
-
control: { type: 'array', default: undefined },
|
|
15
|
-
table: {
|
|
16
|
-
category: '',
|
|
17
|
-
type: { summary: 'array' },
|
|
18
|
-
defaultValue: { summary: 'undefined' },
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
args: {
|
|
23
|
-
links: [
|
|
24
|
-
{
|
|
25
|
-
link: '/',
|
|
26
|
-
name: 'link 1',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
link: '/',
|
|
30
|
-
name: 'link 2',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
link: '/',
|
|
34
|
-
name: 'link 3',
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
link: '/',
|
|
38
|
-
name: 'link 4',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
link: '/',
|
|
42
|
-
name: 'link 5',
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export default meta;
|
|
49
|
-
|
|
50
|
-
type Story = StoryObj<typeof BreadcrumbsBordered>;
|
|
51
|
-
|
|
52
|
-
export const Default: Story = {};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import classNames from 'classnames';
|
|
2
|
-
import { BreadcrumbsItem } from 'src';
|
|
3
|
-
|
|
4
|
-
export interface BreadcrumbsBorderedProps {
|
|
5
|
-
id?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
links?: any[];
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const BreadcrumbsBordered = ({
|
|
11
|
-
id,
|
|
12
|
-
className,
|
|
13
|
-
links,
|
|
14
|
-
}: BreadcrumbsBorderedProps) => {
|
|
15
|
-
const linksLength = links?.length !== undefined ? links.length : 0;
|
|
16
|
-
const classList = classNames(className, 'flex');
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<ul id={id} className={classList}>
|
|
20
|
-
{links?.map((link: any, i: number) => {
|
|
21
|
-
const margin = i === 0 ? 'mr-3' : 'mx-3';
|
|
22
|
-
const first = i === 0;
|
|
23
|
-
|
|
24
|
-
let bType = 'standard';
|
|
25
|
-
if (linksLength >= 1 && i + 1 < linksLength) {
|
|
26
|
-
bType = 'link';
|
|
27
|
-
}
|
|
28
|
-
return (
|
|
29
|
-
<BreadcrumbsItem
|
|
30
|
-
key={`breadcrumb_item_${i + 0}`}
|
|
31
|
-
className={margin}
|
|
32
|
-
name={link.name}
|
|
33
|
-
link={link.link}
|
|
34
|
-
type={bType}
|
|
35
|
-
firstItem={first}
|
|
36
|
-
/>
|
|
37
|
-
);
|
|
38
|
-
})}
|
|
39
|
-
</ul>
|
|
40
|
-
);
|
|
41
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Meta, type StoryObj } from '@storybook/react';
|
|
2
|
-
import { idAndClassName } from '@utils/controls';
|
|
3
|
-
|
|
4
|
-
import { BreadcrumbsItem } from '.';
|
|
5
|
-
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'Components/Breadcrumbs Item',
|
|
8
|
-
component: BreadcrumbsItem,
|
|
9
|
-
parameters: {},
|
|
10
|
-
argTypes: {
|
|
11
|
-
...idAndClassName,
|
|
12
|
-
|
|
13
|
-
name: {
|
|
14
|
-
description: 'Specifies the name for the key attribute',
|
|
15
|
-
table: {
|
|
16
|
-
category: '',
|
|
17
|
-
type: { summary: 'string' },
|
|
18
|
-
defaultValue: { summary: 'undefined' },
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
type: {
|
|
22
|
-
description: 'Specifies the type of breadcrumbs to display ie link',
|
|
23
|
-
table: {
|
|
24
|
-
category: '',
|
|
25
|
-
type: { summary: 'string' },
|
|
26
|
-
defaultValue: { summary: 'undefined' },
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
args: {
|
|
31
|
-
name: 'Link 1',
|
|
32
|
-
href: '/',
|
|
33
|
-
firstItem: false,
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
export default meta;
|
|
37
|
-
|
|
38
|
-
type Story = StoryObj<typeof BreadcrumbsItem>;
|
|
39
|
-
|
|
40
|
-
export const Default: Story = {};
|