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,350 +0,0 @@
|
|
|
1
|
-
import { Meta, type StoryObj } from '@storybook/react';
|
|
2
|
-
import { idAndClassName } from '@utils/controls';
|
|
3
|
-
|
|
4
|
-
import { CarouselThumbnail } from '.';
|
|
5
|
-
|
|
6
|
-
const slides = [
|
|
7
|
-
<img
|
|
8
|
-
key={1}
|
|
9
|
-
className="keen-slider__slide number-slide1"
|
|
10
|
-
src="https://picsum.photos/500/300"
|
|
11
|
-
/>,
|
|
12
|
-
<img
|
|
13
|
-
key={2}
|
|
14
|
-
className="keen-slider__slide number-slide2"
|
|
15
|
-
src="https://picsum.photos/500/301"
|
|
16
|
-
/>,
|
|
17
|
-
<img
|
|
18
|
-
key={3}
|
|
19
|
-
className="keen-slider__slide number-slide3"
|
|
20
|
-
src="https://picsum.photos/500/302"
|
|
21
|
-
/>,
|
|
22
|
-
<img
|
|
23
|
-
key={4}
|
|
24
|
-
className="keen-slider__slide number-slide4"
|
|
25
|
-
src="https://picsum.photos/500/303"
|
|
26
|
-
/>,
|
|
27
|
-
<img
|
|
28
|
-
key={5}
|
|
29
|
-
className="keen-slider__slide number-slide5"
|
|
30
|
-
src="https://picsum.photos/500/304"
|
|
31
|
-
/>,
|
|
32
|
-
<img
|
|
33
|
-
key={6}
|
|
34
|
-
className="keen-slider__slide number-slide6"
|
|
35
|
-
src="https://picsum.photos/500/30"
|
|
36
|
-
/>,
|
|
37
|
-
]
|
|
38
|
-
|
|
39
|
-
const meta = {
|
|
40
|
-
title: 'Components/CarouselThumbnail',
|
|
41
|
-
component: CarouselThumbnail,
|
|
42
|
-
parameters: {},
|
|
43
|
-
argTypes: {
|
|
44
|
-
...idAndClassName,
|
|
45
|
-
breakpoints: {
|
|
46
|
-
type: { name: 'number', required: false },
|
|
47
|
-
description: 'The slide to begin on',
|
|
48
|
-
table: {
|
|
49
|
-
category: '',
|
|
50
|
-
subcategory: '',
|
|
51
|
-
type: { summary: 'number' },
|
|
52
|
-
defaultValue: { summary: 'undefined' },
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
defaultAnimation: {
|
|
56
|
-
type: { name: 'number', required: false },
|
|
57
|
-
description: 'The slide to begin on',
|
|
58
|
-
table: {
|
|
59
|
-
category: '',
|
|
60
|
-
subcategory: '',
|
|
61
|
-
type: { summary: 'number' },
|
|
62
|
-
defaultValue: { summary: 'undefined' },
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
drag: {
|
|
66
|
-
type: { name: 'boolean', required: false },
|
|
67
|
-
description: 'Can the carousel be dragged or not',
|
|
68
|
-
table: {
|
|
69
|
-
category: '',
|
|
70
|
-
subcategory: '',
|
|
71
|
-
type: { summary: 'boolean' },
|
|
72
|
-
defaultValue: { summary: 'undefined' },
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
dragSpeed: {
|
|
76
|
-
type: { name: 'number', required: false },
|
|
77
|
-
description: 'The slide to begin on',
|
|
78
|
-
table: {
|
|
79
|
-
category: '',
|
|
80
|
-
subcategory: '',
|
|
81
|
-
type: { summary: 'number' },
|
|
82
|
-
defaultValue: { summary: 'undefined' },
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
initial: {
|
|
86
|
-
type: { name: 'number', required: false },
|
|
87
|
-
description: 'The slide to begin on',
|
|
88
|
-
table: {
|
|
89
|
-
category: '',
|
|
90
|
-
subcategory: '',
|
|
91
|
-
type: { summary: 'number' },
|
|
92
|
-
defaultValue: { summary: 'undefined' },
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
loop: {
|
|
96
|
-
type: { name: 'boolean', required: false },
|
|
97
|
-
description: 'loop the end back to the start',
|
|
98
|
-
table: {
|
|
99
|
-
category: '',
|
|
100
|
-
subcategory: '',
|
|
101
|
-
type: { summary: 'boolean' },
|
|
102
|
-
defaultValue: { summary: 'undefined' },
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
mode: {
|
|
106
|
-
type: { name: 'string', required: false },
|
|
107
|
-
description: 'snap, free or snap-free',
|
|
108
|
-
table: {
|
|
109
|
-
category: '',
|
|
110
|
-
subcategory: '',
|
|
111
|
-
type: { summary: 'string' },
|
|
112
|
-
defaultValue: { summary: 'undefined' },
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
range: {
|
|
116
|
-
type: { name: 'number', required: false },
|
|
117
|
-
description: '',
|
|
118
|
-
table: {
|
|
119
|
-
category: '',
|
|
120
|
-
subcategory: '',
|
|
121
|
-
type: { summary: 'number' },
|
|
122
|
-
defaultValue: { summary: 'undefined' },
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
renderMode: {
|
|
126
|
-
type: { name: 'number', required: false },
|
|
127
|
-
description: '',
|
|
128
|
-
table: {
|
|
129
|
-
category: '',
|
|
130
|
-
subcategory: '',
|
|
131
|
-
type: { summary: 'number' },
|
|
132
|
-
defaultValue: { summary: 'undefined' },
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
rtl: {
|
|
136
|
-
type: { name: 'boolean', required: false },
|
|
137
|
-
description: 'to display right to left',
|
|
138
|
-
table: {
|
|
139
|
-
category: '',
|
|
140
|
-
subcategory: '',
|
|
141
|
-
type: { summary: 'boolean' },
|
|
142
|
-
defaultValue: { summary: 'undefined' },
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
rubberband: {
|
|
146
|
-
type: { name: 'boolean', required: false },
|
|
147
|
-
description: '',
|
|
148
|
-
table: {
|
|
149
|
-
category: '',
|
|
150
|
-
subcategory: '',
|
|
151
|
-
type: { summary: 'boolean' },
|
|
152
|
-
defaultValue: { summary: 'undefined' },
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
slides: {
|
|
156
|
-
type: { name: 'boolean', required: false },
|
|
157
|
-
description: '',
|
|
158
|
-
table: {
|
|
159
|
-
category: '',
|
|
160
|
-
subcategory: '',
|
|
161
|
-
type: { summary: 'boolean' },
|
|
162
|
-
defaultValue: { summary: 'undefined' },
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
vertical: {
|
|
166
|
-
type: { name: 'boolean', required: false },
|
|
167
|
-
description: 'displays the slider vertically',
|
|
168
|
-
table: {
|
|
169
|
-
category: '',
|
|
170
|
-
subcategory: '',
|
|
171
|
-
type: { summary: 'boolean' },
|
|
172
|
-
defaultValue: { summary: 'undefined' },
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
|
-
animationStarted: {
|
|
176
|
-
type: { name: 'boolean', required: false },
|
|
177
|
-
description: '',
|
|
178
|
-
table: {
|
|
179
|
-
category: '',
|
|
180
|
-
subcategory: '',
|
|
181
|
-
type: { summary: 'boolean' },
|
|
182
|
-
defaultValue: { summary: 'undefined' },
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
animationStopped: {
|
|
186
|
-
type: { name: 'boolean', required: false },
|
|
187
|
-
description: '',
|
|
188
|
-
table: {
|
|
189
|
-
category: '',
|
|
190
|
-
subcategory: '',
|
|
191
|
-
type: { summary: 'boolean' },
|
|
192
|
-
defaultValue: { summary: 'undefined' },
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
animationEnded: {
|
|
196
|
-
type: { name: 'boolean', required: false },
|
|
197
|
-
description: '',
|
|
198
|
-
table: {
|
|
199
|
-
category: '',
|
|
200
|
-
subcategory: '',
|
|
201
|
-
type: { summary: 'boolean' },
|
|
202
|
-
defaultValue: { summary: 'undefined' },
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
destroyed: {
|
|
206
|
-
type: { name: 'boolean', required: false },
|
|
207
|
-
description: '',
|
|
208
|
-
table: {
|
|
209
|
-
category: '',
|
|
210
|
-
subcategory: '',
|
|
211
|
-
type: { summary: 'boolean' },
|
|
212
|
-
defaultValue: { summary: 'undefined' },
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
|
-
detailsChanged: {
|
|
216
|
-
type: { name: 'boolean', required: false },
|
|
217
|
-
description: '',
|
|
218
|
-
table: {
|
|
219
|
-
category: '',
|
|
220
|
-
subcategory: '',
|
|
221
|
-
type: { summary: 'boolean' },
|
|
222
|
-
defaultValue: { summary: 'undefined' },
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
dragged: {
|
|
226
|
-
type: { name: 'boolean', required: false },
|
|
227
|
-
description: '',
|
|
228
|
-
table: {
|
|
229
|
-
category: '',
|
|
230
|
-
subcategory: '',
|
|
231
|
-
type: { summary: 'boolean' },
|
|
232
|
-
defaultValue: { summary: 'undefined' },
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
dragStarted: {
|
|
236
|
-
type: { name: 'boolean', required: false },
|
|
237
|
-
description: '',
|
|
238
|
-
table: {
|
|
239
|
-
category: '',
|
|
240
|
-
subcategory: '',
|
|
241
|
-
type: { summary: 'boolean' },
|
|
242
|
-
defaultValue: { summary: 'undefined' },
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
dragChecked: {
|
|
246
|
-
type: { name: 'boolean', required: false },
|
|
247
|
-
description: '',
|
|
248
|
-
table: {
|
|
249
|
-
category: '',
|
|
250
|
-
subcategory: '',
|
|
251
|
-
type: { summary: 'boolean' },
|
|
252
|
-
defaultValue: { summary: 'undefined' },
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
|
-
dragEnded: {
|
|
256
|
-
type: { name: 'boolean', required: false },
|
|
257
|
-
description: '',
|
|
258
|
-
table: {
|
|
259
|
-
category: '',
|
|
260
|
-
subcategory: '',
|
|
261
|
-
type: { summary: 'boolean' },
|
|
262
|
-
defaultValue: { summary: 'undefined' },
|
|
263
|
-
}
|
|
264
|
-
},
|
|
265
|
-
beforeOptionsChanged: {
|
|
266
|
-
type: { name: 'boolean', required: false },
|
|
267
|
-
description: '',
|
|
268
|
-
table: {
|
|
269
|
-
category: '',
|
|
270
|
-
subcategory: '',
|
|
271
|
-
type: { summary: 'boolean' },
|
|
272
|
-
defaultValue: { summary: 'undefined' },
|
|
273
|
-
}
|
|
274
|
-
},
|
|
275
|
-
optionsChanged: {
|
|
276
|
-
type: { name: 'boolean', required: false },
|
|
277
|
-
description: '',
|
|
278
|
-
table: {
|
|
279
|
-
category: '',
|
|
280
|
-
subcategory: '',
|
|
281
|
-
type: { summary: 'boolean' },
|
|
282
|
-
defaultValue: { summary: 'undefined' },
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
updated: {
|
|
286
|
-
type: { name: 'boolean', required: false },
|
|
287
|
-
description: '',
|
|
288
|
-
table: {
|
|
289
|
-
category: '',
|
|
290
|
-
subcategory: '',
|
|
291
|
-
type: { summary: 'boolean' },
|
|
292
|
-
defaultValue: { summary: 'undefined' },
|
|
293
|
-
}
|
|
294
|
-
},
|
|
295
|
-
perView: {
|
|
296
|
-
type: { name: 'number', required: false },
|
|
297
|
-
description: 'The number of slides to show at a time',
|
|
298
|
-
table: {
|
|
299
|
-
category: '',
|
|
300
|
-
subcategory: '',
|
|
301
|
-
type: { summary: 'number' },
|
|
302
|
-
defaultValue: { summary: 'undefined' },
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
|
-
spacing: {
|
|
306
|
-
type: { name: 'number', required: false },
|
|
307
|
-
description: 'The spacing left and right of each slide',
|
|
308
|
-
table: {
|
|
309
|
-
category: '',
|
|
310
|
-
subcategory: '',
|
|
311
|
-
type: { summary: 'number' },
|
|
312
|
-
defaultValue: { summary: 'undefined' },
|
|
313
|
-
}
|
|
314
|
-
},
|
|
315
|
-
number: {
|
|
316
|
-
type: { name: 'number', required: false },
|
|
317
|
-
description: '',
|
|
318
|
-
table: {
|
|
319
|
-
category: '',
|
|
320
|
-
subcategory: '',
|
|
321
|
-
type: { summary: 'number' },
|
|
322
|
-
defaultValue: { summary: 'undefined' },
|
|
323
|
-
}
|
|
324
|
-
},
|
|
325
|
-
origin: {
|
|
326
|
-
type: { name: 'boolean', required: false },
|
|
327
|
-
description: '',
|
|
328
|
-
table: {
|
|
329
|
-
category: '',
|
|
330
|
-
subcategory: '',
|
|
331
|
-
type: { summary: 'boolean' },
|
|
332
|
-
defaultValue: { summary: 'undefined' },
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
},
|
|
336
|
-
args: {
|
|
337
|
-
title: 'Card Carousel',
|
|
338
|
-
description: 'what do you think to this?',
|
|
339
|
-
loop: true,
|
|
340
|
-
drag: true,
|
|
341
|
-
slides,
|
|
342
|
-
spacing: 16,
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
export default meta;
|
|
347
|
-
|
|
348
|
-
type Story = StoryObj<typeof CarouselThumbnail>;
|
|
349
|
-
|
|
350
|
-
export const Default: Story = {};
|
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
import { ComponentWrapper } from '@components/ComponentWrapper';
|
|
2
|
-
import { type Colours } from '@utils/controls';
|
|
3
|
-
import classNames from 'classnames';
|
|
4
|
-
import 'keen-slider/keen-slider.min.css';
|
|
5
|
-
import {
|
|
6
|
-
useKeenSlider,
|
|
7
|
-
type KeenSliderInstance,
|
|
8
|
-
type KeenSliderHooks,
|
|
9
|
-
type KeenSliderOptions,
|
|
10
|
-
} from 'keen-slider/react';
|
|
11
|
-
|
|
12
|
-
export interface CarouselProps {
|
|
13
|
-
id?: string;
|
|
14
|
-
className?: string;
|
|
15
|
-
slideWrapperClassName?: string;
|
|
16
|
-
title?: string;
|
|
17
|
-
description?: string;
|
|
18
|
-
bgColour?: Colours;
|
|
19
|
-
breakpoints?: Record<
|
|
20
|
-
string,
|
|
21
|
-
Omit<KeenSliderOptions<{}, {}, KeenSliderHooks>, 'breakpoints'>
|
|
22
|
-
>;
|
|
23
|
-
defaultAnimation?: { duration?: number; easing?: (t: number) => number };
|
|
24
|
-
disabled: boolean;
|
|
25
|
-
drag?: boolean;
|
|
26
|
-
dragSpeed?: number;
|
|
27
|
-
initial?: number;
|
|
28
|
-
loop?: boolean;
|
|
29
|
-
mode?: 'snap' | 'free' | 'free-snap';
|
|
30
|
-
range?: { align?: boolean; min?: number; max?: number };
|
|
31
|
-
renderMode?: 'precision' | 'performance' | 'custom';
|
|
32
|
-
rtl?: boolean;
|
|
33
|
-
rubberband?: boolean;
|
|
34
|
-
slides?: any[];
|
|
35
|
-
vertical?: boolean;
|
|
36
|
-
animationStarted?: (
|
|
37
|
-
slider: KeenSliderInstance<{}, {}, KeenSliderHooks>,
|
|
38
|
-
) => void;
|
|
39
|
-
animationStopped?: (
|
|
40
|
-
slider: KeenSliderInstance<{}, {}, KeenSliderHooks>,
|
|
41
|
-
) => void;
|
|
42
|
-
animationEnded?: (
|
|
43
|
-
slider: KeenSliderInstance<{}, {}, KeenSliderHooks>,
|
|
44
|
-
) => void;
|
|
45
|
-
created?: (slider: KeenSliderInstance<{}, {}, KeenSliderHooks>) => void;
|
|
46
|
-
destroyed?: (slider: KeenSliderInstance<{}, {}, KeenSliderHooks>) => void;
|
|
47
|
-
detailsChanged?: (
|
|
48
|
-
slider: KeenSliderInstance<{}, {}, KeenSliderHooks>,
|
|
49
|
-
) => void;
|
|
50
|
-
dragged?: (slider: KeenSliderInstance<{}, {}, KeenSliderHooks>) => void;
|
|
51
|
-
dragStarted?: (slider: KeenSliderInstance<{}, {}, KeenSliderHooks>) => void;
|
|
52
|
-
dragChecked?: (slider: KeenSliderInstance<{}, {}, KeenSliderHooks>) => void;
|
|
53
|
-
dragEnded?: (slider: KeenSliderInstance<{}, {}, KeenSliderHooks>) => void;
|
|
54
|
-
beforeOptionsChanged?: (
|
|
55
|
-
slider: KeenSliderInstance<{}, {}, KeenSliderHooks>,
|
|
56
|
-
) => void;
|
|
57
|
-
optionsChanged?: (
|
|
58
|
-
slider: KeenSliderInstance<{}, {}, KeenSliderHooks>,
|
|
59
|
-
) => void;
|
|
60
|
-
slideChanged?: boolean;
|
|
61
|
-
updated?: (slider: KeenSliderInstance<{}, {}, KeenSliderHooks>) => void;
|
|
62
|
-
spacing?: number;
|
|
63
|
-
number?: number;
|
|
64
|
-
origin?: number | 'auto' | 'center';
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export const CarouselThumbnail = ({
|
|
68
|
-
id,
|
|
69
|
-
className,
|
|
70
|
-
slideWrapperClassName,
|
|
71
|
-
title,
|
|
72
|
-
description,
|
|
73
|
-
bgColour,
|
|
74
|
-
breakpoints,
|
|
75
|
-
defaultAnimation,
|
|
76
|
-
disabled,
|
|
77
|
-
drag,
|
|
78
|
-
dragSpeed,
|
|
79
|
-
initial,
|
|
80
|
-
loop = true,
|
|
81
|
-
mode = 'snap',
|
|
82
|
-
range,
|
|
83
|
-
renderMode,
|
|
84
|
-
rtl,
|
|
85
|
-
rubberband,
|
|
86
|
-
slides,
|
|
87
|
-
vertical,
|
|
88
|
-
animationStarted,
|
|
89
|
-
animationStopped,
|
|
90
|
-
animationEnded,
|
|
91
|
-
created,
|
|
92
|
-
destroyed,
|
|
93
|
-
detailsChanged,
|
|
94
|
-
dragged,
|
|
95
|
-
dragStarted,
|
|
96
|
-
dragChecked,
|
|
97
|
-
dragEnded,
|
|
98
|
-
beforeOptionsChanged,
|
|
99
|
-
optionsChanged,
|
|
100
|
-
slideChanged,
|
|
101
|
-
updated,
|
|
102
|
-
spacing,
|
|
103
|
-
number,
|
|
104
|
-
origin,
|
|
105
|
-
}: CarouselProps) => {
|
|
106
|
-
const classList = className;
|
|
107
|
-
|
|
108
|
-
function WheelControls(slider: any): void {
|
|
109
|
-
let touchTimeout: any;
|
|
110
|
-
let position: any;
|
|
111
|
-
let wheelActive: boolean;
|
|
112
|
-
|
|
113
|
-
function dispatch(e: any, name: string): void {
|
|
114
|
-
position.x -= e.deltaX;
|
|
115
|
-
position.y -= e.deltaY;
|
|
116
|
-
slider.container.dispatchEvent(
|
|
117
|
-
new CustomEvent(name, {
|
|
118
|
-
detail: {
|
|
119
|
-
x: position.x,
|
|
120
|
-
y: position.y,
|
|
121
|
-
}
|
|
122
|
-
}),
|
|
123
|
-
)
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function wheelStart(e: any): void {
|
|
127
|
-
position = {
|
|
128
|
-
x: e.pageX,
|
|
129
|
-
y: e.pageY,
|
|
130
|
-
}
|
|
131
|
-
dispatch(e, 'ksDragStart');
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function wheel(e: any): void {
|
|
135
|
-
dispatch(e, 'ksDrag');
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
function wheelEnd(e: any): void {
|
|
139
|
-
dispatch(e, 'ksDragEnd');
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function eventWheel(e: any): void {
|
|
143
|
-
if (!wheelActive) {
|
|
144
|
-
wheelStart(e);
|
|
145
|
-
wheelActive = true;
|
|
146
|
-
}
|
|
147
|
-
wheel(e);
|
|
148
|
-
clearTimeout(touchTimeout);
|
|
149
|
-
touchTimeout = setTimeout(() => {
|
|
150
|
-
wheelActive = false;
|
|
151
|
-
wheelEnd(e);
|
|
152
|
-
}, 50);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
slider.on('created', () => {
|
|
156
|
-
slider.container.addEventListener('wheel', eventWheel, {
|
|
157
|
-
passive: true,
|
|
158
|
-
})
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function ThumbnailPlugin(mainRef: any) {
|
|
163
|
-
return (slider: any) => {
|
|
164
|
-
function removeActive(): void {
|
|
165
|
-
slider.slides.forEach((slide: any) => {
|
|
166
|
-
slide.classList.remove('active');
|
|
167
|
-
})
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
function addActive(idx: number): void {
|
|
171
|
-
slider.slides[idx].classList.add('active');
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
function addClickEvents(): void {
|
|
175
|
-
slider.slides.forEach((slide: any, idx: number) => {
|
|
176
|
-
slide.addEventListener('click', () => {
|
|
177
|
-
if (mainRef.current) mainRef.current.moveToIdx(idx);
|
|
178
|
-
})
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
slider.on('created', () => {
|
|
183
|
-
if (!mainRef.current) return;
|
|
184
|
-
addActive(slider.track.details.rel);
|
|
185
|
-
addClickEvents();
|
|
186
|
-
mainRef.current.on('animationStarted', (main: any) => {
|
|
187
|
-
removeActive();
|
|
188
|
-
const next = main.animator.targetIdx || 0;
|
|
189
|
-
addActive(main.track.absToRel(next));
|
|
190
|
-
slider.moveToIdx(Math.min(slider.track.details.maxIdx, next));
|
|
191
|
-
})
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
const breakpointsToRender: any = {
|
|
197
|
-
'(min-width: 320px)': {
|
|
198
|
-
slides: { perView: 1, spacing: 25 },
|
|
199
|
-
},
|
|
200
|
-
'(max-width: 500px)': {
|
|
201
|
-
slides: { perView: 1, spacing: 25 },
|
|
202
|
-
},
|
|
203
|
-
'(min-width: 768px)': {
|
|
204
|
-
slides: { perView: 1, spacing: 25 },
|
|
205
|
-
},
|
|
206
|
-
'(min-width: 1024px)': {
|
|
207
|
-
slides: { perView: 2, spacing: 20 },
|
|
208
|
-
},
|
|
209
|
-
'(min-width: 1280px)': {
|
|
210
|
-
slides: { perView: 2, spacing: 10 },
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
const [sliderRef, instanceRef] = useKeenSlider<HTMLDivElement>(
|
|
215
|
-
{
|
|
216
|
-
initial,
|
|
217
|
-
breakpoints: breakpointsToRender,
|
|
218
|
-
defaultAnimation,
|
|
219
|
-
disabled,
|
|
220
|
-
drag,
|
|
221
|
-
dragSpeed,
|
|
222
|
-
loop,
|
|
223
|
-
mode,
|
|
224
|
-
range,
|
|
225
|
-
renderMode,
|
|
226
|
-
rtl,
|
|
227
|
-
rubberband,
|
|
228
|
-
vertical,
|
|
229
|
-
slideChanged() {},
|
|
230
|
-
// slideChanged: slideChanged,
|
|
231
|
-
// created: created,
|
|
232
|
-
animationStarted,
|
|
233
|
-
animationStopped,
|
|
234
|
-
animationEnded,
|
|
235
|
-
destroyed,
|
|
236
|
-
detailsChanged,
|
|
237
|
-
dragged,
|
|
238
|
-
dragStarted,
|
|
239
|
-
dragChecked,
|
|
240
|
-
dragEnded,
|
|
241
|
-
beforeOptionsChanged,
|
|
242
|
-
optionsChanged,
|
|
243
|
-
updated,
|
|
244
|
-
slides: {
|
|
245
|
-
spacing,
|
|
246
|
-
origin,
|
|
247
|
-
number,
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
[WheelControls],
|
|
251
|
-
)
|
|
252
|
-
|
|
253
|
-
const [thumbnailRef] = useKeenSlider(
|
|
254
|
-
{
|
|
255
|
-
initial: 0,
|
|
256
|
-
slides: {
|
|
257
|
-
perView: 4,
|
|
258
|
-
spacing: 10,
|
|
259
|
-
}
|
|
260
|
-
},
|
|
261
|
-
[ThumbnailPlugin(instanceRef)],
|
|
262
|
-
)
|
|
263
|
-
|
|
264
|
-
return (
|
|
265
|
-
<ComponentWrapper
|
|
266
|
-
id={id}
|
|
267
|
-
className={classList}
|
|
268
|
-
title={title}
|
|
269
|
-
description={description}
|
|
270
|
-
bgColour={bgColour}
|
|
271
|
-
>
|
|
272
|
-
<div className={classNames(classList, 'navigation-wrapper w-full')}>
|
|
273
|
-
<div
|
|
274
|
-
ref={sliderRef}
|
|
275
|
-
className={classNames(
|
|
276
|
-
slideWrapperClassName,
|
|
277
|
-
'keen-slider h-96 w-full rounded-t-2xl pb-4',
|
|
278
|
-
)}
|
|
279
|
-
>
|
|
280
|
-
{slides != null && slides}
|
|
281
|
-
</div>
|
|
282
|
-
<div>
|
|
283
|
-
<div
|
|
284
|
-
ref={thumbnailRef}
|
|
285
|
-
className={'keen-slider thumbnail h-24 w-16 rounded-b-2xl'}
|
|
286
|
-
>
|
|
287
|
-
{slides != null && slides}
|
|
288
|
-
</div>
|
|
289
|
-
</div>
|
|
290
|
-
</div>
|
|
291
|
-
</ComponentWrapper>
|
|
292
|
-
);
|
|
293
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{/* Checkbox.mdx */}
|
|
2
|
-
|
|
3
|
-
import { Meta, Primary, Controls, Story } from '@storybook/blocks';
|
|
4
|
-
|
|
5
|
-
import * as CheckboxStories from './Checkbox.stories';
|
|
6
|
-
|
|
7
|
-
<Meta of={CheckboxStories} />
|
|
8
|
-
|
|
9
|
-
# Checkbox
|
|
10
|
-
|
|
11
|
-
A checkbox is an interactive component with and optional label.
|
|
12
|
-
|
|
13
|
-
It is able to display two states to the end user.
|
|
14
|
-
|
|
15
|
-
The state of the checkbox can toggled by clicking on the component.
|
|
16
|
-
|
|
17
|
-
<Primary />
|
|
18
|
-
|
|
19
|
-
## Props
|
|
20
|
-
|
|
21
|
-
<Controls />
|
|
22
|
-
|
|
23
|
-
## Variants
|
|
24
|
-
|
|
25
|
-
A checkbox can exist in two different states:
|
|
26
|
-
|
|
27
|
-
### Checked
|
|
28
|
-
|
|
29
|
-
<Story of={CheckboxStories.Checked} />
|
|
30
|
-
|
|
31
|
-
### Unchecked
|
|
32
|
-
|
|
33
|
-
<Story of={CheckboxStories.Unchecked} />
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type StoryObj, Meta } from '@storybook/react';
|
|
2
|
-
import { idAndClassName } from '@utils/controls';
|
|
3
|
-
|
|
4
|
-
import { Checkbox } from '.';
|
|
5
|
-
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'Components/Checkbox',
|
|
8
|
-
component: Checkbox,
|
|
9
|
-
argTypes: {
|
|
10
|
-
...idAndClassName,
|
|
11
|
-
label: {
|
|
12
|
-
description: '',
|
|
13
|
-
table: {},
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
args: {
|
|
17
|
-
label: '{{ label }}',
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export default meta;
|
|
22
|
-
type Story = StoryObj<typeof Checkbox>;
|
|
23
|
-
|
|
24
|
-
export const Checked: Story = {
|
|
25
|
-
args: {
|
|
26
|
-
checked: true,
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const Unchecked: Story = {
|
|
31
|
-
args: {
|
|
32
|
-
checked: false,
|
|
33
|
-
}
|
|
34
|
-
}
|