@conveyorhq/arrow-ds 2.0.0-beta.6 → 2.0.0-beta.7
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/package.json +28 -21
- package/public/components/Accordion/Accordion.d.ts +29 -17
- package/public/components/Accordion/Accordion.js +78 -56
- package/public/components/Accordion/context.d.ts +12 -0
- package/public/components/Accordion/context.js +30 -0
- package/public/components/Accordion/index.d.ts +1 -0
- package/public/components/Accordion/index.js +1 -0
- package/public/components/Accordion/types.d.ts +17 -0
- package/public/components/Accordion/types.js +2 -0
- package/public/components/Avatar/Avatar.d.ts +1 -1
- package/public/components/Avatar/AvatarGroup.d.ts +1 -1
- package/public/components/Avatar/AvatarGroup.js +11 -1
- package/public/components/Button/Button.d.ts +3 -2
- package/public/components/Button/Button.js +3 -0
- package/public/components/CloseButton/CloseButton.d.ts +1 -2
- package/public/components/ConveyorLogo/ConveyorLogo.js +1 -1
- package/public/components/Divider/Divider.d.ts +1 -9
- package/public/components/Divider/Divider.js +13 -24
- package/public/components/Drawer/Drawer.js +11 -9
- package/public/components/Flex/Flex.js +3 -4
- package/public/components/Grid/Grid.d.ts +2 -2
- package/public/components/Grid/Grid.js +9 -3
- package/public/components/Icon/Icon.d.ts +14 -0
- package/public/components/Icon/Icon.js +32 -2
- package/public/components/Icon/svg/ArrowToBottom.d.ts +2 -0
- package/public/components/Icon/svg/ArrowToBottom.js +14 -0
- package/public/components/Icon/svg/CommentAltCheck.d.ts +2 -0
- package/public/components/Icon/svg/CommentAltCheck.js +13 -0
- package/public/components/Icon/svg/index.d.ts +2 -0
- package/public/components/Icon/svg/index.js +2 -0
- package/public/components/Input/Input.d.ts +3 -2
- package/public/components/Input/Input.js +7 -6
- package/public/components/Loading/Loading.d.ts +3 -2
- package/public/components/Loading/Loading.js +4 -7
- package/public/components/Markdown/Markdown.d.ts +1 -1
- package/public/components/Markdown/Markdown.js +3 -3
- package/public/components/MarkdownEditor/MarkdownEditor.js +1 -2
- package/public/components/MarkdownEditor/MarkdownHelp.js +4 -7
- package/public/components/MenuRenderer/MenuRenderer.js +7 -4
- package/public/components/Modal/Modal.d.ts +6 -0
- package/public/components/Modal/Modal.js +29 -19
- package/public/components/Modal/context.d.ts +6 -0
- package/public/components/Modal/context.js +15 -0
- package/public/components/Modal/index.d.ts +1 -0
- package/public/components/Modal/index.js +1 -0
- package/public/components/OptionButton/OptionButton.d.ts +28 -1
- package/public/components/OptionButton/OptionButton.js +58 -11
- package/public/components/OptionButton/context.d.ts +11 -0
- package/public/components/OptionButton/context.js +16 -0
- package/public/components/Overlay/Overlay.js +2 -2
- package/public/components/Paragraph/Paragraph.js +3 -7
- package/public/components/Reference/Reference.d.ts +2 -2
- package/public/components/Select/Select.d.ts +1 -0
- package/public/components/Select/Select.js +12 -7
- package/public/components/Snackbar/Snackbar.d.ts +14 -22
- package/public/components/Snackbar/Snackbar.js +28 -85
- package/public/components/Snackbar/SnackbarProvider.d.ts +2 -0
- package/public/components/Snackbar/SnackbarProvider.js +21 -0
- package/public/components/Snackbar/constants.d.ts +2 -0
- package/public/components/Snackbar/constants.js +5 -0
- package/public/components/Snackbar/context.d.ts +4 -0
- package/public/components/Snackbar/context.js +17 -0
- package/public/components/Snackbar/helpers.d.ts +3 -0
- package/public/components/Snackbar/helpers.js +31 -0
- package/public/components/Snackbar/hooks.d.ts +2 -0
- package/public/components/Snackbar/hooks.js +47 -0
- package/public/components/Snackbar/index.d.ts +6 -0
- package/public/components/Snackbar/index.js +6 -0
- package/public/components/Snackbar/types.d.ts +43 -0
- package/public/components/Snackbar/types.js +2 -0
- package/public/components/SpeechBubble/SpeechBubble.d.ts +1 -0
- package/public/components/SpeechBubble/SpeechBubble.js +9 -2
- package/public/components/Table/Table.d.ts +5 -2
- package/public/components/Table/Table.js +11 -4
- package/public/components/Table/TableCell.d.ts +1 -0
- package/public/components/Table/TableCell.js +4 -2
- package/public/components/Table/TableHeaderCell.d.ts +2 -1
- package/public/components/Table/TableHeaderCell.js +24 -7
- package/public/components/Table/index.d.ts +3 -0
- package/public/components/Tag/Tag.d.ts +2 -2
- package/public/components/Toast/Toast.d.ts +3 -3
- package/public/components/Toast/Toast.js +6 -2
- package/public/css/styles.css +2550 -30950
- package/public/css/styles.min.css +1 -1
- package/public/css/styles.min.css.map +1 -1
- package/public/index.d.ts +0 -15
- package/public/index.js +0 -15
- package/public/storybook-components/ComponentHeading.js +3 -5
- package/public/storybook-components/ComponentStatus.d.ts +1 -0
- package/public/storybook-components/ComponentStatus.js +4 -0
- package/public/storybook-components/index.d.ts +1 -1
- package/public/storybook-components/index.js +1 -1
- package/public/style-dictionary/dist/tokens.css +377 -0
- package/public/style-dictionary/dist/tokens.d.ts +427 -0
- package/public/style-dictionary/dist/tokens.js +427 -0
- package/public/style-dictionary/dist/tokens.module.js +427 -0
- package/public/style-dictionary/src/border-radius.js +11 -0
- package/public/style-dictionary/src/border-width.js +10 -0
- package/public/style-dictionary/src/color.js +97 -0
- package/public/style-dictionary/src/font-size.js +15 -0
- package/public/style-dictionary/src/font-weight.js +7 -0
- package/public/style-dictionary/src/height.js +13 -0
- package/public/style-dictionary/src/leading.js +8 -0
- package/public/style-dictionary/src/screen-width.js +8 -0
- package/public/style-dictionary/src/shadow.js +19 -0
- package/public/style-dictionary/src/spacing.js +69 -0
- package/public/style-dictionary/src/tracking.js +7 -0
- package/public/style-dictionary/src/type.js +34 -0
- package/public/style-dictionary/src/width.js +32 -0
- package/public/style-dictionary/src/z-index.js +21 -0
- package/public/style-dictionary/tailwind.config.js +87 -0
- package/public/tokens/box-shadow.d.ts +1 -0
- package/public/tokens/box-shadow.js +1 -0
- package/public/tokens/font-family.js +1 -1
- package/public/tokens/height.d.ts +65 -43
- package/public/tokens/height.js +3 -44
- package/public/tokens/index.d.ts +526 -173
- package/public/tokens/index.js +1 -1
- package/public/tokens/margin.d.ts +129 -47
- package/public/tokens/margin.js +3 -47
- package/public/tokens/padding.d.ts +65 -24
- package/public/tokens/padding.js +2 -24
- package/public/tokens/sizing-scale.d.ts +133 -0
- package/public/tokens/sizing-scale.js +136 -0
- package/public/tokens/width.d.ts +197 -63
- package/public/tokens/width.js +6 -63
- package/public/types/index.d.ts +14 -2
- package/public/types/index.js +2 -4
- package/src/components/Accordion/Accordion.story.mdx +232 -22
- package/src/components/Accordion/Accordion.tsx +228 -117
- package/src/components/Accordion/context.ts +60 -0
- package/src/components/Accordion/index.css +0 -5
- package/src/components/Accordion/index.ts +1 -0
- package/src/components/Accordion/types.ts +55 -0
- package/src/components/Avatar/Avatar.story.mdx +60 -0
- package/src/components/Avatar/AvatarGroup.tsx +11 -9
- package/src/components/Avatar/index.css +8 -0
- package/src/components/Button/Button.story.mdx +116 -1
- package/src/components/Button/Button.tsx +10 -4
- package/src/components/Button/product.css +12 -0
- package/src/components/Card/Card.story.mdx +11 -36
- package/src/components/CloseButton/CloseButton.tsx +1 -1
- package/src/components/ConveyorLogo/ConveyorLogo.tsx +1 -0
- package/src/components/Divider/Divider.tsx +26 -40
- package/src/components/Divider/index.css +16 -0
- package/src/components/Drawer/Drawer.story.mdx +68 -70
- package/src/components/Drawer/Drawer.tsx +10 -9
- package/src/components/Drawer/index.css +26 -1
- package/src/components/Flex/Flex.story.mdx +130 -0
- package/src/components/Flex/Flex.tsx +7 -6
- package/src/components/Flex/index.css +3 -0
- package/src/components/Frame/Frame.story.mdx +7 -2
- package/src/components/Grid/Grid.story.mdx +205 -3
- package/src/components/Grid/Grid.tsx +44 -5
- package/src/components/Grid/index.css +3 -0
- package/src/components/Icon/Icon.tsx +60 -5
- package/src/components/Icon/svg/ArrowToBottom.tsx +17 -0
- package/src/components/Icon/svg/CommentAltCheck.tsx +13 -0
- package/src/components/Icon/svg/index.ts +2 -0
- package/src/components/Input/Input.story.mdx +199 -13
- package/src/components/Input/Input.tsx +39 -6
- package/src/components/Input/brand.css +7 -7
- package/src/components/Input/index.css +30 -0
- package/src/components/Input/product.css +12 -48
- package/src/components/Loading/Loading.story.mdx +16 -9
- package/src/components/Loading/Loading.tsx +17 -8
- package/src/components/Loading/index.css +1 -67
- package/src/components/Markdown/Markdown.story.mdx +67 -0
- package/src/components/Markdown/Markdown.tsx +3 -2
- package/src/components/MarkdownEditor/MarkdownEditor.tsx +2 -3
- package/src/components/MarkdownEditor/MarkdownHelp.tsx +7 -10
- package/src/components/MarkdownEditor/index.css +5 -1
- package/src/components/MenuRenderer/MenuRenderer.tsx +9 -7
- package/src/components/Modal/Modal.story.mdx +26 -0
- package/src/components/Modal/Modal.tsx +60 -42
- package/src/components/Modal/context.ts +20 -0
- package/src/components/Modal/index.ts +1 -0
- package/src/components/OptionButton/OptionButton.story.mdx +119 -20
- package/src/components/OptionButton/OptionButton.tsx +211 -23
- package/src/components/OptionButton/context.ts +22 -0
- package/src/components/OptionButton/index.css +1 -2
- package/src/components/Overlay/Overlay.tsx +2 -3
- package/src/components/Overlay/index.css +1 -0
- package/src/components/Paragraph/Paragraph.story.mdx +16 -2
- package/src/components/Paragraph/Paragraph.tsx +5 -13
- package/src/components/Paragraph/index.css +6 -0
- package/src/components/Popover/index.css +5 -6
- package/src/components/Reference/Reference.tsx +2 -2
- package/src/components/Select/Select.story.mdx +23 -10
- package/src/components/Select/Select.tsx +31 -6
- package/src/components/Snackbar/Snackbar.story.mdx +96 -9
- package/src/components/Snackbar/Snackbar.tsx +56 -145
- package/src/components/Snackbar/SnackbarProvider.tsx +31 -0
- package/src/components/Snackbar/constants.ts +2 -0
- package/src/components/Snackbar/context.ts +20 -0
- package/src/components/Snackbar/helpers.tsx +52 -0
- package/src/components/Snackbar/hooks.ts +57 -0
- package/src/components/Snackbar/index.ts +6 -0
- package/src/components/Snackbar/types.ts +180 -0
- package/src/components/SpeechBubble/SpeechBubble.story.mdx +76 -0
- package/src/components/SpeechBubble/SpeechBubble.tsx +22 -1
- package/src/components/SpeechBubble/index.css +7 -4
- package/src/components/Table/Table.story.mdx +243 -0
- package/src/components/Table/Table.tsx +36 -1
- package/src/components/Table/TableCell.tsx +24 -1
- package/src/components/Table/TableHeaderCell.tsx +64 -11
- package/src/components/Table/index.css +138 -10
- package/src/components/Table/index.ts +3 -0
- package/src/components/Tag/Tag.tsx +2 -2
- package/src/components/Toast/Toast.story.mdx +1 -1
- package/src/components/Toast/Toast.tsx +14 -10
- package/src/components/Toast/index.css +4 -2
- package/src/components/Toggle/index.css +2 -3
- package/src/css/base.css +6 -561
- package/src/css/components.css +4 -9
- package/src/css/fonts.css +13 -10
- package/src/css/styles.css +0 -1
- package/src/css/utilities/animations.css +13 -0
- package/src/docs/Typography.story.mdx +12 -9
- package/src/index.ts +0 -15
- package/src/storybook-components/ComponentHeading.tsx +4 -19
- package/src/storybook-components/ComponentStatus.tsx +4 -0
- package/src/storybook-components/index.tsx +1 -1
- package/src/tokens/box-shadow.ts +1 -0
- package/src/tokens/font-family.ts +1 -1
- package/src/tokens/height.ts +3 -44
- package/src/tokens/index.ts +2 -2
- package/src/tokens/margin.ts +4 -47
- package/src/tokens/padding.ts +3 -24
- package/src/tokens/sizing-scale.ts +134 -0
- package/src/tokens/width.ts +7 -63
- package/src/types/index.ts +34 -5
- package/public/components/Absolute/Absolute.d.ts +0 -2
- package/public/components/Absolute/Absolute.js +0 -14
- package/public/components/Absolute/index.d.ts +0 -1
- package/public/components/Absolute/index.js +0 -5
- package/public/components/Appbar/Appbar.d.ts +0 -40
- package/public/components/Appbar/Appbar.js +0 -29
- package/public/components/Appbar/AppbarLogo.d.ts +0 -2
- package/public/components/Appbar/AppbarLogo.js +0 -19
- package/public/components/Appbar/AppbarTabs.d.ts +0 -10
- package/public/components/Appbar/AppbarTabs.js +0 -42
- package/public/components/Appbar/AppbarUser.d.ts +0 -26
- package/public/components/Appbar/AppbarUser.js +0 -60
- package/public/components/Appbar/config.d.ts +0 -7
- package/public/components/Appbar/config.js +0 -13
- package/public/components/Appbar/index.d.ts +0 -1
- package/public/components/Appbar/index.js +0 -13
- package/public/components/ArrowButton/ArrowButton.d.ts +0 -9
- package/public/components/ArrowButton/ArrowButton.js +0 -22
- package/public/components/ArrowButton/index.d.ts +0 -1
- package/public/components/ArrowButton/index.js +0 -13
- package/public/components/ArrowLink/ArrowLink.d.ts +0 -9
- package/public/components/ArrowLink/ArrowLink.js +0 -21
- package/public/components/ArrowLink/index.d.ts +0 -1
- package/public/components/ArrowLink/index.js +0 -13
- package/public/components/Aside/Aside.d.ts +0 -14
- package/public/components/Aside/Aside.js +0 -28
- package/public/components/Aside/index.d.ts +0 -1
- package/public/components/Aside/index.js +0 -13
- package/public/components/Fixed/Fixed.d.ts +0 -2
- package/public/components/Fixed/Fixed.js +0 -14
- package/public/components/Fixed/Fixed.story.d.ts +0 -1
- package/public/components/Fixed/Fixed.story.js +0 -12
- package/public/components/Fixed/index.d.ts +0 -1
- package/public/components/Fixed/index.js +0 -5
- package/public/components/Flex/Flex.story.d.ts +0 -1
- package/public/components/Flex/Flex.story.js +0 -12
- package/public/components/IntegrationLogo/IntegrationLogo.d.ts +0 -10
- package/public/components/IntegrationLogo/IntegrationLogo.js +0 -33
- package/public/components/IntegrationLogo/IntegrationLogoSvg.d.ts +0 -9
- package/public/components/IntegrationLogo/IntegrationLogoSvg.js +0 -52
- package/public/components/IntegrationLogo/index.d.ts +0 -1
- package/public/components/IntegrationLogo/index.js +0 -13
- package/public/components/IntegrationLogo/svg/addigy.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/addigy.js +0 -17
- package/public/components/IntegrationLogo/svg/aws.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/aws.js +0 -22
- package/public/components/IntegrationLogo/svg/bamboohr.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/bamboohr.js +0 -18
- package/public/components/IntegrationLogo/svg/bitbucket.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/bitbucket.js +0 -18
- package/public/components/IntegrationLogo/svg/conveyor.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/conveyor.js +0 -20
- package/public/components/IntegrationLogo/svg/default.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/default.js +0 -13
- package/public/components/IntegrationLogo/svg/deploy.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/deploy.js +0 -17
- package/public/components/IntegrationLogo/svg/events-api.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/events-api.js +0 -26
- package/public/components/IntegrationLogo/svg/gcp.d.ts +0 -3
- package/public/components/IntegrationLogo/svg/gcp.js +0 -15
- package/public/components/IntegrationLogo/svg/github.d.ts +0 -3
- package/public/components/IntegrationLogo/svg/github.js +0 -12
- package/public/components/IntegrationLogo/svg/gitlab.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/gitlab.js +0 -19
- package/public/components/IntegrationLogo/svg/gsuite.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/gsuite.js +0 -15
- package/public/components/IntegrationLogo/svg/index.d.ts +0 -21
- package/public/components/IntegrationLogo/svg/index.js +0 -54
- package/public/components/IntegrationLogo/svg/jamf.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/jamf.js +0 -20
- package/public/components/IntegrationLogo/svg/jira.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/jira.js +0 -21
- package/public/components/IntegrationLogo/svg/jumpcloud.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/jumpcloud.js +0 -28
- package/public/components/IntegrationLogo/svg/okta.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/okta.js +0 -16
- package/public/components/IntegrationLogo/svg/onelogin.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/onelogin.js +0 -18
- package/public/components/IntegrationLogo/svg/salesforce.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/salesforce.js +0 -20
- package/public/components/IntegrationLogo/svg/slack.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/slack.js +0 -19
- package/public/components/IntegrationLogo/svg/wrapper.d.ts +0 -11
- package/public/components/IntegrationLogo/svg/wrapper.js +0 -13
- package/public/components/IntegrationLogo/svg/zoom.d.ts +0 -2
- package/public/components/IntegrationLogo/svg/zoom.js +0 -23
- package/public/components/Meta/Meta.d.ts +0 -6
- package/public/components/Meta/Meta.js +0 -21
- package/public/components/Meta/Meta.story.d.ts +0 -1
- package/public/components/Meta/Meta.story.js +0 -39
- package/public/components/Meta/index.d.ts +0 -1
- package/public/components/Meta/index.js +0 -5
- package/public/components/PropertyDiff/PropertyDiff.d.ts +0 -7
- package/public/components/PropertyDiff/PropertyDiff.js +0 -22
- package/public/components/PropertyDiff/index.d.ts +0 -1
- package/public/components/PropertyDiff/index.js +0 -13
- package/public/components/Relative/Relative.d.ts +0 -2
- package/public/components/Relative/Relative.js +0 -14
- package/public/components/Relative/Relative.story.d.ts +0 -1
- package/public/components/Relative/Relative.story.js +0 -12
- package/public/components/Relative/index.d.ts +0 -1
- package/public/components/Relative/index.js +0 -5
- package/public/components/SpeechBubble/SpeechBubble.story.d.ts +0 -1
- package/public/components/SpeechBubble/SpeechBubble.story.js +0 -19
- package/public/components/StatusLabel/StatusLabel.d.ts +0 -16
- package/public/components/StatusLabel/StatusLabel.js +0 -40
- package/public/components/StatusLabel/index.d.ts +0 -1
- package/public/components/StatusLabel/index.js +0 -13
- package/public/components/StatusPanel/StatusPanel.d.ts +0 -11
- package/public/components/StatusPanel/StatusPanel.js +0 -24
- package/public/components/StatusPanel/index.d.ts +0 -1
- package/public/components/StatusPanel/index.js +0 -13
- package/public/components/Sticky/Sticky.d.ts +0 -2
- package/public/components/Sticky/Sticky.js +0 -14
- package/public/components/Sticky/Sticky.story.d.ts +0 -1
- package/public/components/Sticky/Sticky.story.js +0 -12
- package/public/components/Sticky/index.d.ts +0 -1
- package/public/components/Sticky/index.js +0 -5
- package/public/components/TopBar/TopBar.d.ts +0 -14
- package/public/components/TopBar/TopBar.js +0 -24
- package/public/components/TopBar/TopBarBreadcrumbs.d.ts +0 -10
- package/public/components/TopBar/TopBarBreadcrumbs.js +0 -34
- package/public/components/TopBar/TopBarSubNav.d.ts +0 -2
- package/public/components/TopBar/TopBarSubNav.js +0 -16
- package/public/components/TopBar/TopBarSubNavItem.d.ts +0 -5
- package/public/components/TopBar/TopBarSubNavItem.js +0 -17
- package/public/components/TopBar/index.d.ts +0 -1
- package/public/components/TopBar/index.js +0 -13
- package/public/components/VendorLogo/VendorLogo.d.ts +0 -20
- package/public/components/VendorLogo/VendorLogo.js +0 -57
- package/public/components/VendorLogo/index.d.ts +0 -1
- package/public/components/VendorLogo/index.js +0 -13
- package/public/storybook-components/TailwindPropertyClasses.d.ts +0 -9
- package/public/storybook-components/TailwindPropertyClasses.js +0 -194
- package/public/tailwind.config.d.ts +0 -1
- package/public/tailwind.config.js +0 -4
- package/public/tokens/_tailwind-config.d.ts +0 -810
- package/public/tokens/_tailwind-config.js +0 -50
- package/src/components/Absolute/Absolute.story.mdx +0 -26
- package/src/components/Absolute/Absolute.tsx +0 -9
- package/src/components/Absolute/index.ts +0 -1
- package/src/components/Appbar/Appbar.story.mdx +0 -118
- package/src/components/Appbar/Appbar.tsx +0 -64
- package/src/components/Appbar/AppbarLogo.tsx +0 -29
- package/src/components/Appbar/AppbarTabs.tsx +0 -47
- package/src/components/Appbar/AppbarUser.tsx +0 -144
- package/src/components/Appbar/config.ts +0 -12
- package/src/components/Appbar/index.css +0 -203
- package/src/components/Appbar/index.ts +0 -1
- package/src/components/ArrowButton/ArrowButton.story.mdx +0 -110
- package/src/components/ArrowButton/ArrowButton.tsx +0 -54
- package/src/components/ArrowButton/index.css +0 -42
- package/src/components/ArrowButton/index.ts +0 -1
- package/src/components/ArrowLink/ArrowLink.story.mdx +0 -65
- package/src/components/ArrowLink/ArrowLink.tsx +0 -42
- package/src/components/ArrowLink/index.ts +0 -1
- package/src/components/Aside/Aside.story.mdx +0 -65
- package/src/components/Aside/Aside.tsx +0 -59
- package/src/components/Aside/index.css +0 -11
- package/src/components/Aside/index.ts +0 -1
- package/src/components/Fixed/Fixed.md +0 -16
- package/src/components/Fixed/Fixed.story.tsx +0 -12
- package/src/components/Fixed/Fixed.tsx +0 -9
- package/src/components/Fixed/index.ts +0 -1
- package/src/components/Flex/Flex.md +0 -14
- package/src/components/Flex/Flex.story.tsx +0 -12
- package/src/components/IntegrationLogo/IntegrationLogo.story.mdx +0 -159
- package/src/components/IntegrationLogo/IntegrationLogo.tsx +0 -54
- package/src/components/IntegrationLogo/IntegrationLogoSvg.tsx +0 -79
- package/src/components/IntegrationLogo/index.ts +0 -1
- package/src/components/IntegrationLogo/svg/addigy.tsx +0 -23
- package/src/components/IntegrationLogo/svg/aws.tsx +0 -52
- package/src/components/IntegrationLogo/svg/bamboohr.tsx +0 -34
- package/src/components/IntegrationLogo/svg/bitbucket.tsx +0 -37
- package/src/components/IntegrationLogo/svg/conveyor.tsx +0 -41
- package/src/components/IntegrationLogo/svg/default.tsx +0 -11
- package/src/components/IntegrationLogo/svg/deploy.tsx +0 -29
- package/src/components/IntegrationLogo/svg/events-api.tsx +0 -75
- package/src/components/IntegrationLogo/svg/gcp.tsx +0 -26
- package/src/components/IntegrationLogo/svg/github.tsx +0 -14
- package/src/components/IntegrationLogo/svg/gitlab.tsx +0 -40
- package/src/components/IntegrationLogo/svg/gsuite.tsx +0 -24
- package/src/components/IntegrationLogo/svg/index.ts +0 -21
- package/src/components/IntegrationLogo/svg/jamf.tsx +0 -36
- package/src/components/IntegrationLogo/svg/jira.tsx +0 -44
- package/src/components/IntegrationLogo/svg/jumpcloud.tsx +0 -86
- package/src/components/IntegrationLogo/svg/okta.tsx +0 -28
- package/src/components/IntegrationLogo/svg/onelogin.tsx +0 -34
- package/src/components/IntegrationLogo/svg/salesforce.tsx +0 -39
- package/src/components/IntegrationLogo/svg/slack.tsx +0 -40
- package/src/components/IntegrationLogo/svg/wrapper.tsx +0 -35
- package/src/components/IntegrationLogo/svg/zoom.tsx +0 -51
- package/src/components/Meta/Meta.md +0 -14
- package/src/components/Meta/Meta.story.tsx +0 -24
- package/src/components/Meta/Meta.tsx +0 -26
- package/src/components/Meta/index.ts +0 -1
- package/src/components/PropertyDiff/PropertDiff.story.mdx +0 -46
- package/src/components/PropertyDiff/PropertyDiff.tsx +0 -48
- package/src/components/PropertyDiff/index.css +0 -33
- package/src/components/PropertyDiff/index.ts +0 -1
- package/src/components/Relative/Relative.md +0 -16
- package/src/components/Relative/Relative.story.tsx +0 -12
- package/src/components/Relative/Relative.tsx +0 -9
- package/src/components/Relative/index.ts +0 -1
- package/src/components/SpeechBubble/SpeechBubble.md +0 -14
- package/src/components/SpeechBubble/SpeechBubble.story.tsx +0 -26
- package/src/components/StatusLabel/StatusLabel.story.mdx +0 -316
- package/src/components/StatusLabel/StatusLabel.tsx +0 -112
- package/src/components/StatusLabel/index.css +0 -23
- package/src/components/StatusLabel/index.ts +0 -1
- package/src/components/StatusPanel/StatusPanel.story.mdx +0 -109
- package/src/components/StatusPanel/StatusPanel.tsx +0 -51
- package/src/components/StatusPanel/index.css +0 -52
- package/src/components/StatusPanel/index.ts +0 -1
- package/src/components/Sticky/Sticky.md +0 -16
- package/src/components/Sticky/Sticky.story.tsx +0 -12
- package/src/components/Sticky/Sticky.tsx +0 -9
- package/src/components/Sticky/index.ts +0 -1
- package/src/components/TopBar/TopBar.story.mdx +0 -154
- package/src/components/TopBar/TopBar.tsx +0 -40
- package/src/components/TopBar/TopBarBreadcrumbs.tsx +0 -79
- package/src/components/TopBar/TopBarSubNav.tsx +0 -19
- package/src/components/TopBar/TopBarSubNavItem.tsx +0 -21
- package/src/components/TopBar/index.css +0 -102
- package/src/components/TopBar/index.ts +0 -1
- package/src/components/VendorLogo/VendorLogo.story.mdx +0 -209
- package/src/components/VendorLogo/VendorLogo.tsx +0 -110
- package/src/components/VendorLogo/index.css +0 -46
- package/src/components/VendorLogo/index.ts +0 -1
- package/src/docs/TailwindClasses.story.mdx +0 -15
- package/src/docs/brand-components/BrandButton.story.mdx +0 -103
- package/src/docs/brand-components/BrandCheckbox.story.mdx +0 -63
- package/src/docs/brand-components/BrandFormGroup.story.mdx +0 -76
- package/src/docs/brand-components/BrandInput.story.mdx +0 -41
- package/src/docs/brand-components/BrandRadio.story.mdx +0 -45
- package/src/docs/brand-components/BrandTextArea.story.mdx +0 -41
- package/src/storybook-components/TailwindPropertyClasses.tsx +0 -285
- package/src/tailwind.config.ts +0 -6
- package/src/tokens/_tailwind-config.ts +0 -69
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@conveyorhq/arrow-ds",
|
|
3
3
|
"author": "Conveyor",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "2.0.0-beta.
|
|
5
|
+
"version": "2.0.0-beta.7",
|
|
6
6
|
"description": "Arrow Design System",
|
|
7
7
|
"repository": "https://github.com/conveyor/arrow-ds",
|
|
8
8
|
"publishConfig": {
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"@popperjs/core": "^2.4.2",
|
|
26
26
|
"@reach/auto-id": "^0.6.1",
|
|
27
27
|
"@reach/portal": "^0.6.1",
|
|
28
|
+
"@react-spring/web": "^9.4.2",
|
|
28
29
|
"@rehooks/component-size": "^1.0.3",
|
|
29
30
|
"@types/date-fns": "^2.6.0",
|
|
30
31
|
"classnames": "^2.2.6",
|
|
@@ -50,14 +51,18 @@
|
|
|
50
51
|
},
|
|
51
52
|
"scripts": {
|
|
52
53
|
"prepublishOnly": "yarn run build",
|
|
53
|
-
"build": "yarn run build:clean && yarn run build:ts && yarn run build:css && yarn run minify:css && yarn run build:copy-files",
|
|
54
|
+
"build": "yarn run style-dictionary:build && yarn run build:clean && yarn run build:ts && yarn run build:css && yarn run minify:css && yarn run build:copy-files",
|
|
54
55
|
"build:clean": "node utilities/clean.js",
|
|
55
56
|
"build:ts": "tsc -b",
|
|
56
57
|
"build:css": "yarn run postcss -c postcss.config.js -o public/css/styles.css src/css/styles.css",
|
|
57
|
-
"build:copy-files": "
|
|
58
|
+
"build:copy-files": "yarn run build:copy-svg && yarn run build:copy-style-dictionary",
|
|
59
|
+
"build:copy-svg": "copyfiles -u 1 src/**/*.svg public/",
|
|
60
|
+
"build:copy-style-dictionary": "copyfiles style-dictionary/**/* style-dictionary/tailwind.config.js public/",
|
|
58
61
|
"minify:css": "csso public/css/styles.css --output public/css/styles.min.css --comments none --source-map file",
|
|
59
62
|
"storybook": "yarn run build && start-storybook --docs -p 9002 -c .storybook -s .storybook",
|
|
60
63
|
"build-storybook": "yarn run build && build-storybook --docs -c .storybook -s .storybook -o storybook-static",
|
|
64
|
+
"style-dictionary:build": "style-dictionary build --config ./style-dictionary.config.js",
|
|
65
|
+
"style-dictionary:clean": "style-dictionary clean --config ./style-dictionary.config.js",
|
|
61
66
|
"generate": "plop",
|
|
62
67
|
"lint:check": "prettier --check 'src/**/**.{ts,tsx,js,css,mdx}' && eslint 'src/**/**.{ts,tsx,js,mdx}'",
|
|
63
68
|
"lint:fix": "eslint 'src/**/**.{ts,tsx,js,mdx}' --fix && prettier --write 'src/**/**.{ts,tsx,js,css,mdx}'",
|
|
@@ -73,7 +78,7 @@
|
|
|
73
78
|
},
|
|
74
79
|
"release": {
|
|
75
80
|
"branches": [
|
|
76
|
-
"
|
|
81
|
+
"main",
|
|
77
82
|
{
|
|
78
83
|
"name": "alpha",
|
|
79
84
|
"prerelease": true
|
|
@@ -98,17 +103,18 @@
|
|
|
98
103
|
"@babel/preset-env": "^7.9.0",
|
|
99
104
|
"@babel/preset-react": "^7.7.0",
|
|
100
105
|
"@babel/preset-typescript": "^7.7.2",
|
|
101
|
-
"@commitlint/cli": "^
|
|
102
|
-
"@commitlint/config-conventional": "^
|
|
103
|
-
"@storybook/addon-actions": "^6.
|
|
104
|
-
"@storybook/addon-docs": "^6.
|
|
106
|
+
"@commitlint/cli": "^13.0.0",
|
|
107
|
+
"@commitlint/config-conventional": "^13.0.0",
|
|
108
|
+
"@storybook/addon-actions": "^6.4.8",
|
|
109
|
+
"@storybook/addon-docs": "^6.4.8",
|
|
105
110
|
"@storybook/addon-postcss": "^2.0.0",
|
|
106
|
-
"@storybook/react": "^6.
|
|
107
|
-
"@storybook/theming": "^6.
|
|
111
|
+
"@storybook/react": "^6.4.8",
|
|
112
|
+
"@storybook/theming": "^6.4.8",
|
|
108
113
|
"@types/classnames": "^2.2.9",
|
|
109
114
|
"@types/codemirror": "^0.0.91",
|
|
110
115
|
"@types/d3-ease": "^1.0.9",
|
|
111
116
|
"@types/jest": "^24.0.22",
|
|
117
|
+
"@types/lodash.camelcase": "^4.3.6",
|
|
112
118
|
"@types/md5": "^2.2.1",
|
|
113
119
|
"@types/mime-types": "^2.1.0",
|
|
114
120
|
"@types/node": "^12.12.6",
|
|
@@ -117,13 +123,13 @@
|
|
|
117
123
|
"@types/react-dom": "^16.9.4",
|
|
118
124
|
"@types/react-fontawesome": "^1.6.4",
|
|
119
125
|
"@types/react-select": "^3.0.8",
|
|
120
|
-
"@types/tailwindcss": "^
|
|
121
|
-
"@types/webpack": "^
|
|
126
|
+
"@types/tailwindcss": "^3.0.1",
|
|
127
|
+
"@types/webpack": "^5.0.0",
|
|
122
128
|
"@typescript-eslint/eslint-plugin": "^4.18.0",
|
|
123
129
|
"@typescript-eslint/parser": "^4.18.0",
|
|
124
|
-
"autoprefixer": "^10.
|
|
130
|
+
"autoprefixer": "^10.4.0",
|
|
125
131
|
"babel-loader": "^8.0.6",
|
|
126
|
-
"babel-plugin-inline-react-svg": "^
|
|
132
|
+
"babel-plugin-inline-react-svg": "^2.0.0",
|
|
127
133
|
"copyfiles": "^2.4.1",
|
|
128
134
|
"csso-cli": "^3.0.0",
|
|
129
135
|
"eslint": "^7.22.0",
|
|
@@ -139,22 +145,23 @@
|
|
|
139
145
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
140
146
|
"fs-extra": "^8.1.0",
|
|
141
147
|
"husky": "^3.1.0",
|
|
148
|
+
"lodash.camelcase": "^4.3.0",
|
|
142
149
|
"plop": "^2.5.3",
|
|
143
|
-
"postcss": "^8.
|
|
144
|
-
"postcss-cli": "^
|
|
145
|
-
"postcss-import": "^
|
|
150
|
+
"postcss": "^8.4.5",
|
|
151
|
+
"postcss-cli": "^9.0.2",
|
|
152
|
+
"postcss-import": "^14.0.2",
|
|
146
153
|
"prettier": "^2.2.1",
|
|
147
154
|
"react": "^16.11.0",
|
|
148
155
|
"react-docgen-typescript-loader": "^3.6.0",
|
|
149
156
|
"react-dom": "^16.11.0",
|
|
150
157
|
"react-is": "^16.12.0",
|
|
151
158
|
"regenerator-runtime": "^0.13.3",
|
|
152
|
-
"semantic-release": "^
|
|
153
|
-
"
|
|
154
|
-
"tailwindcss": "^
|
|
159
|
+
"semantic-release": "^18.0.1",
|
|
160
|
+
"style-dictionary": "^3.1.1",
|
|
161
|
+
"tailwindcss": "^3.0.7",
|
|
155
162
|
"ts-loader": "^6.2.1",
|
|
156
163
|
"typescript": "^4.2.3",
|
|
157
|
-
"webpack": "^
|
|
164
|
+
"webpack": "^5.0.0",
|
|
158
165
|
"webpack-bundle-analyzer": "^3.6.0"
|
|
159
166
|
},
|
|
160
167
|
"peerDependencies": {
|
|
@@ -1,21 +1,33 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { BoxProps } from "../Box";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { StackProps } from "../Stack";
|
|
4
|
+
import type { AccordionOwnProps, AccordionItemOwnProps, AccordionDisclosureProps, AccordionGroupOwnProps } from "./types";
|
|
5
|
+
export declare type AccordionGroupProps = AccordionGroupOwnProps & Pick<StackProps, "children" | "spacing">;
|
|
6
|
+
export declare const AccordionGroup: ({ children, spacing, defaultValue, ...rest }: AccordionGroupProps) => JSX.Element;
|
|
7
|
+
export declare type AccordionItemProps = AccordionItemOwnProps & BoxProps;
|
|
8
|
+
export declare const AccordionItem: ({ value, defaultIsOpen: defaultIsOpenProp, children, className, ...rest }: AccordionItemProps) => JSX.Element;
|
|
9
|
+
declare type AccordionButtonChildProps = Omit<AccordionDisclosureProps, "onToggle">;
|
|
10
|
+
declare type AccordionButtonChildFunction = {
|
|
11
|
+
children(props: AccordionButtonChildProps): React.ReactNode;
|
|
12
|
+
};
|
|
13
|
+
declare type AccordionButtonOwnProps = AccordionButtonChildFunction | {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
export declare type AccordionButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & AccordionButtonOwnProps;
|
|
17
|
+
export declare const AccordionButton: React.ForwardRefExoticComponent<AccordionButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
export declare type AccordionContentProps = {
|
|
19
|
+
children: React.ReactNode;
|
|
6
20
|
maxHeight?: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
export declare
|
|
12
|
-
children: ReactNode;
|
|
13
|
-
className?: string | undefined;
|
|
14
|
-
}) => JSX.Element;
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const AccordionContent: ({ children, maxHeight, style, className, ...rest }: AccordionContentProps) => JSX.Element;
|
|
25
|
+
export declare type AccordionProps = AccordionOwnProps & BoxProps;
|
|
15
26
|
export declare const Accordion: {
|
|
16
|
-
(
|
|
17
|
-
Group: ({ children,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}) => JSX.Element;
|
|
27
|
+
(props: AccordionProps): JSX.Element;
|
|
28
|
+
Group: ({ children, spacing, defaultValue, ...rest }: AccordionGroupProps) => JSX.Element;
|
|
29
|
+
Item: ({ value, defaultIsOpen: defaultIsOpenProp, children, className, ...rest }: AccordionItemProps) => JSX.Element;
|
|
30
|
+
Button: React.ForwardRefExoticComponent<AccordionButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
31
|
+
Content: ({ children, maxHeight, style, className, ...rest }: AccordionContentProps) => JSX.Element;
|
|
21
32
|
};
|
|
33
|
+
export {};
|
|
@@ -1,83 +1,105 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
4
|
};
|
|
24
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.Accordion = exports.AccordionGroup = void 0;
|
|
26
|
-
const react_1 =
|
|
6
|
+
exports.Accordion = exports.AccordionContent = exports.AccordionButton = exports.AccordionItem = exports.AccordionGroup = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
27
8
|
const classnames_1 = __importDefault(require("classnames"));
|
|
28
|
-
const
|
|
9
|
+
const web_1 = require("@react-spring/web");
|
|
29
10
|
const component_size_1 = __importDefault(require("@rehooks/component-size"));
|
|
30
11
|
const auto_id_1 = require("@reach/auto-id");
|
|
12
|
+
const react_merge_refs_1 = __importDefault(require("react-merge-refs"));
|
|
13
|
+
const utilities_1 = require("../../utilities");
|
|
14
|
+
const hooks_1 = require("../../hooks");
|
|
15
|
+
const types_1 = require("../../types");
|
|
31
16
|
const Box_1 = require("../Box");
|
|
32
17
|
const Flex_1 = require("../Flex");
|
|
18
|
+
const Stack_1 = require("../Stack");
|
|
33
19
|
const Heading_1 = require("../Heading");
|
|
34
20
|
const Icon_1 = require("../Icon");
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
|
|
21
|
+
const context_1 = require("./context");
|
|
22
|
+
const cn = utilities_1.bemHOF("Accordion");
|
|
23
|
+
const AccordionGroup = ({ children, spacing = 0, defaultValue, ...rest }) => {
|
|
24
|
+
return (react_1.default.createElement(context_1.AccordionGroupContext.Provider, { value: { defaultValue } },
|
|
25
|
+
react_1.default.createElement(Stack_1.Stack, Object.assign({ orientation: types_1.ORIENTATION.VERTICAL, spacing: spacing }, rest), children)));
|
|
26
|
+
};
|
|
39
27
|
exports.AccordionGroup = AccordionGroup;
|
|
40
|
-
const
|
|
28
|
+
const AccordionItem = ({ value, defaultIsOpen: defaultIsOpenProp, children, className, ...rest }) => {
|
|
29
|
+
const { defaultValue } = context_1.useAccordionGroupContext();
|
|
30
|
+
const hasDefaultValue = typeof defaultValue === "undefined" ? false : defaultValue === value;
|
|
31
|
+
const defaultIsOpen = typeof defaultIsOpenProp === "undefined"
|
|
32
|
+
? hasDefaultValue
|
|
33
|
+
: defaultIsOpenProp;
|
|
41
34
|
const { isOpen, onToggle } = hooks_1.useDisclosure(defaultIsOpen);
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
35
|
+
const id = `accordion-${auto_id_1.useId()}`;
|
|
36
|
+
const buttonId = `${id}-button`;
|
|
37
|
+
const contentId = `${id}-content`;
|
|
38
|
+
return (react_1.default.createElement(context_1.AccordionItemContext.Provider, { value: {
|
|
39
|
+
defaultIsOpen,
|
|
40
|
+
isOpen,
|
|
41
|
+
onToggle,
|
|
42
|
+
buttonId,
|
|
43
|
+
contentId,
|
|
44
|
+
} },
|
|
45
|
+
react_1.default.createElement(Box_1.Box, Object.assign({ "data-component": "accordion", className: classnames_1.default(cn(), className, {
|
|
46
|
+
[cn({ m: "isOpen" })]: isOpen,
|
|
47
|
+
}) }, rest), children)));
|
|
48
|
+
};
|
|
49
|
+
exports.AccordionItem = AccordionItem;
|
|
50
|
+
exports.AccordionButton = react_1.default.forwardRef((props, forwardedRef) => {
|
|
51
|
+
const { children, className, onClick, disabled = false, ...rest } = props;
|
|
52
|
+
const { buttonId, contentId, isOpen, onToggle } = context_1.useAccordionItemContext();
|
|
53
|
+
const buttonRef = react_1.default.useRef(null);
|
|
54
|
+
const ref = react_merge_refs_1.default([forwardedRef, buttonRef]);
|
|
55
|
+
return (react_1.default.createElement("button", Object.assign({ ref: ref, type: "button", className: className, id: buttonId, "aria-controls": contentId, "aria-expanded": isOpen, "aria-disabled": disabled, disabled: disabled, onClick: (event) => {
|
|
56
|
+
if (onClick) {
|
|
57
|
+
onClick(event);
|
|
58
|
+
}
|
|
59
|
+
if (onToggle) {
|
|
60
|
+
onToggle();
|
|
61
|
+
}
|
|
62
|
+
} }, rest), typeof children === "function" ? children({ isOpen }) : children));
|
|
63
|
+
});
|
|
64
|
+
const AccordionContent = ({ children, maxHeight, style, className, ...rest }) => {
|
|
65
|
+
const { buttonId, contentId, defaultIsOpen, isOpen, } = context_1.useAccordionItemContext();
|
|
66
|
+
const [childrenRef, setChildrenRef] = react_1.default.useState({ current: null });
|
|
67
|
+
const onRefChange = react_1.default.useCallback((node) => {
|
|
45
68
|
if (node !== null) {
|
|
46
69
|
setChildrenRef({ current: node });
|
|
47
70
|
}
|
|
48
71
|
}, []);
|
|
49
|
-
const { height } = component_size_1.default(childrenRef);
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
72
|
+
const { height: componentHeight } = component_size_1.default(childrenRef);
|
|
73
|
+
const [enableTransition, setEnableTransition] = react_1.default.useState(!defaultIsOpen);
|
|
74
|
+
const { height } = web_1.useSpring({
|
|
75
|
+
height: isOpen ? componentHeight : 0,
|
|
76
|
+
immediate: !enableTransition,
|
|
77
|
+
onRest: () => {
|
|
78
|
+
if (defaultIsOpen && isOpen) {
|
|
79
|
+
setEnableTransition(true);
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
return (react_1.default.createElement(web_1.animated.div, Object.assign({ className: classnames_1.default("overflow-hidden box-content", className), style: { ...style, height }, "aria-labelledby": buttonId, id: contentId, role: "region" }, rest),
|
|
84
|
+
react_1.default.createElement(Box_1.Box, { ref: onRefChange, className: classnames_1.default(maxHeight && "overflow-y-auto"), style: maxHeight ? { maxHeight } : undefined }, children)));
|
|
85
|
+
};
|
|
86
|
+
exports.AccordionContent = AccordionContent;
|
|
87
|
+
const Accordion = (props) => {
|
|
88
|
+
const { title, isActive, maxHeight, children, iconSlot, className, removePadding, ...rest } = props;
|
|
89
|
+
return (react_1.default.createElement(exports.AccordionItem, Object.assign({ className: className }, rest),
|
|
64
90
|
react_1.default.createElement(Heading_1.Heading.H5, null,
|
|
65
|
-
react_1.default.createElement(
|
|
91
|
+
react_1.default.createElement(exports.AccordionButton, { className: classnames_1.default(cn({ e: "button" }), {
|
|
66
92
|
[cn({ e: "button", m: "isActive" })]: isActive,
|
|
67
|
-
})
|
|
93
|
+
}) },
|
|
68
94
|
react_1.default.createElement(Flex_1.Flex, { className: "items-center", as: "span" },
|
|
69
95
|
iconSlot && (react_1.default.createElement(Box_1.Box, { className: classnames_1.default(cn({ e: "icon" })), as: "span" }, iconSlot)),
|
|
70
96
|
title),
|
|
71
97
|
react_1.default.createElement(Icon_1.Icon, { icon: Icon_1.ICON_TYPE.CHEVRON_DOWN, className: cn({ e: "chevronIcon" }) }))),
|
|
72
|
-
react_1.default.createElement(
|
|
73
|
-
|
|
74
|
-
setEnableTransition(true);
|
|
75
|
-
}
|
|
76
|
-
}, immediate: !enableTransition }, (show) => {
|
|
77
|
-
return (show &&
|
|
78
|
-
((props) => (react_1.default.createElement("div", { style: props, className: cn({ e: "content" }) },
|
|
79
|
-
react_1.default.createElement(Box_1.Box, { ref: onRefChange, className: classnames_1.default(cn({ e: "children" }), !removePadding && cn({ e: "children", m: "padded" })), style: maxHeight ? { maxHeight } : undefined, id: contentId, "aria-labelledby": buttonId }, children)))));
|
|
80
|
-
})));
|
|
98
|
+
react_1.default.createElement(exports.AccordionContent, { className: cn({ e: "content" }), maxHeight: maxHeight },
|
|
99
|
+
react_1.default.createElement(Box_1.Box, { className: classnames_1.default(cn({ e: "children" }), !removePadding && cn({ e: "children", m: "padded" })) }, children))));
|
|
81
100
|
};
|
|
82
101
|
exports.Accordion = Accordion;
|
|
83
102
|
exports.Accordion.Group = exports.AccordionGroup;
|
|
103
|
+
exports.Accordion.Item = exports.AccordionItem;
|
|
104
|
+
exports.Accordion.Button = exports.AccordionButton;
|
|
105
|
+
exports.Accordion.Content = exports.AccordionContent;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Context } from "react";
|
|
2
|
+
import type { AccordionGroupOwnProps, AccordionItemOwnProps, AccordionDisclosureProps } from "./types";
|
|
3
|
+
declare type AccordionGroupContextType = AccordionGroupOwnProps;
|
|
4
|
+
export declare const AccordionGroupContext: Context<AccordionGroupContextType>;
|
|
5
|
+
export declare function useAccordionGroupContext(): AccordionGroupOwnProps;
|
|
6
|
+
declare type AccordionItemContextType = AccordionItemOwnProps & AccordionDisclosureProps & {
|
|
7
|
+
buttonId: string;
|
|
8
|
+
contentId: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const AccordionItemContext: Context<AccordionItemContextType>;
|
|
11
|
+
export declare function useAccordionItemContext(): AccordionItemContextType;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useAccordionItemContext = exports.AccordionItemContext = exports.useAccordionGroupContext = exports.AccordionGroupContext = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const defaultGroupContext = {
|
|
6
|
+
defaultValue: undefined,
|
|
7
|
+
};
|
|
8
|
+
exports.AccordionGroupContext = react_1.createContext(defaultGroupContext);
|
|
9
|
+
function useAccordionGroupContext() {
|
|
10
|
+
const context = react_1.useContext(exports.AccordionGroupContext) || {
|
|
11
|
+
...defaultGroupContext,
|
|
12
|
+
};
|
|
13
|
+
return context;
|
|
14
|
+
}
|
|
15
|
+
exports.useAccordionGroupContext = useAccordionGroupContext;
|
|
16
|
+
const defaultContext = {
|
|
17
|
+
defaultIsOpen: false,
|
|
18
|
+
isOpen: false,
|
|
19
|
+
onToggle: () => { },
|
|
20
|
+
buttonId: "accordion-0-button",
|
|
21
|
+
contentId: "accordion-0-content",
|
|
22
|
+
};
|
|
23
|
+
exports.AccordionItemContext = react_1.createContext(defaultContext);
|
|
24
|
+
function useAccordionItemContext() {
|
|
25
|
+
const context = react_1.useContext(exports.AccordionItemContext) || {
|
|
26
|
+
...defaultContext,
|
|
27
|
+
};
|
|
28
|
+
return context;
|
|
29
|
+
}
|
|
30
|
+
exports.useAccordionItemContext = useAccordionItemContext;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { DisclosureProps } from "../../types";
|
|
3
|
+
export declare type AccordionGroupOwnProps = {
|
|
4
|
+
defaultValue?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare type AccordionItemOwnProps = {
|
|
7
|
+
defaultIsOpen?: boolean;
|
|
8
|
+
value?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare type AccordionOwnProps = Pick<AccordionItemOwnProps, "defaultIsOpen"> & {
|
|
11
|
+
title: string;
|
|
12
|
+
isActive?: boolean;
|
|
13
|
+
maxHeight?: string;
|
|
14
|
+
iconSlot?: ReactNode;
|
|
15
|
+
removePadding?: ReactNode;
|
|
16
|
+
};
|
|
17
|
+
export declare type AccordionDisclosureProps = Pick<DisclosureProps, "isOpen" | "onToggle">;
|
|
@@ -36,7 +36,7 @@ interface GravatarOrInitialsProps extends InitialsProps {
|
|
|
36
36
|
}
|
|
37
37
|
export declare const SystemAvatarConveyor: () => JSX.Element;
|
|
38
38
|
export declare const SystemAvatarAptible: () => JSX.Element;
|
|
39
|
-
export declare const AvatarWrapper: React.ForwardRefExoticComponent<Pick<SharedAvatarProps, "as" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "
|
|
39
|
+
export declare const AvatarWrapper: React.ForwardRefExoticComponent<Pick<SharedAvatarProps, "as" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "square" | "alt" | "size" | "bordered"> & React.RefAttributes<HTMLDivElement>>;
|
|
40
40
|
export declare const Avatar: {
|
|
41
41
|
({ size: sizeProp, square, bordered, className, style, alt, ...rest }: AvatarProps): JSX.Element;
|
|
42
42
|
Group: ({ children, spacing, size, className, ...rest }: import("./AvatarGroup").AvatarGroupProps) => JSX.Element;
|
|
@@ -4,7 +4,7 @@ import { BoxProps } from "../Box";
|
|
|
4
4
|
import { AvatarSize } from "./types";
|
|
5
5
|
export interface AvatarGroupProps extends BoxProps {
|
|
6
6
|
children: ReactNode[];
|
|
7
|
-
spacing?: "overlap" | Spacing;
|
|
7
|
+
spacing?: "overlap" | "overlap-reverse" | Spacing;
|
|
8
8
|
size?: AvatarSize;
|
|
9
9
|
}
|
|
10
10
|
export declare const AvatarGroup: ({ children, spacing, size, className, ...rest }: AvatarGroupProps) => JSX.Element;
|
|
@@ -32,7 +32,17 @@ const cn = bem_1.bemHOF("AvatarGroup");
|
|
|
32
32
|
const AvatarGroup = ({ children, spacing = 0, size = "medium", className, ...rest }) => {
|
|
33
33
|
const validChildren = react_1.Children.toArray(children).filter((child) => react_1.isValidElement(child));
|
|
34
34
|
const reversedChildren = validChildren.reverse();
|
|
35
|
-
|
|
35
|
+
let spacingClass = "";
|
|
36
|
+
if (spacing === "overlap") {
|
|
37
|
+
spacingClass = cn({ m: "overlap" });
|
|
38
|
+
}
|
|
39
|
+
else if (spacing === "overlap-reverse") {
|
|
40
|
+
spacingClass = cn({ m: "overlap-reverse" });
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
spacingClass = `gap-${spacing}`;
|
|
44
|
+
}
|
|
45
|
+
return (react_1.default.createElement(Flex_1.Flex, Object.assign({ className: classnames_1.default(cn(), spacingClass, className) }, rest),
|
|
36
46
|
react_1.default.createElement(context_1.AvatarContext.Provider, { value: { size } }, reversedChildren)));
|
|
37
47
|
};
|
|
38
48
|
exports.AvatarGroup = AvatarGroup;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, ForwardRefExoticComponent } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { IconType, ICON_STYLE_PREFIX } from "../Icon";
|
|
3
3
|
import { ButtonGroupProps } from "./ButtonGroup";
|
|
4
4
|
import { THEME } from "../../types";
|
|
5
5
|
export declare enum BUTTON_VARIANT {
|
|
@@ -10,6 +10,7 @@ export declare enum BUTTON_VARIANT {
|
|
|
10
10
|
MINIMAL = "minimal"
|
|
11
11
|
}
|
|
12
12
|
export declare enum BUTTON_SIZE {
|
|
13
|
+
SMALL = "small",
|
|
13
14
|
MEDIUM = "medium",
|
|
14
15
|
LARGE = "large"
|
|
15
16
|
}
|
|
@@ -22,7 +23,7 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
22
23
|
block?: boolean;
|
|
23
24
|
depressed?: boolean;
|
|
24
25
|
isLoading?: boolean;
|
|
25
|
-
icon?:
|
|
26
|
+
icon?: IconType;
|
|
26
27
|
iconColor?: string;
|
|
27
28
|
iconPosition?: BUTTON_ICON_POSITION;
|
|
28
29
|
iconSpin?: boolean;
|
|
@@ -41,6 +41,7 @@ var BUTTON_VARIANT;
|
|
|
41
41
|
})(BUTTON_VARIANT = exports.BUTTON_VARIANT || (exports.BUTTON_VARIANT = {}));
|
|
42
42
|
var BUTTON_SIZE;
|
|
43
43
|
(function (BUTTON_SIZE) {
|
|
44
|
+
BUTTON_SIZE["SMALL"] = "small";
|
|
44
45
|
BUTTON_SIZE["MEDIUM"] = "medium";
|
|
45
46
|
BUTTON_SIZE["LARGE"] = "large";
|
|
46
47
|
})(BUTTON_SIZE = exports.BUTTON_SIZE || (exports.BUTTON_SIZE = {}));
|
|
@@ -51,10 +52,12 @@ var BUTTON_ICON_POSITION;
|
|
|
51
52
|
})(BUTTON_ICON_POSITION = exports.BUTTON_ICON_POSITION || (exports.BUTTON_ICON_POSITION = {}));
|
|
52
53
|
function getButtonSizeClasses(size, icon, children) {
|
|
53
54
|
const buttonSizeClasses = {
|
|
55
|
+
[BUTTON_SIZE.SMALL]: bem_1.bem(cn, { m: "small" }),
|
|
54
56
|
[BUTTON_SIZE.MEDIUM]: bem_1.bem(cn, { m: "medium" }),
|
|
55
57
|
[BUTTON_SIZE.LARGE]: bem_1.bem(cn, { m: "large" }),
|
|
56
58
|
};
|
|
57
59
|
const buttonIconOnlySizeClasses = {
|
|
60
|
+
[BUTTON_SIZE.SMALL]: bem_1.bem(cn, { m: "iconOnly--small" }),
|
|
58
61
|
[BUTTON_SIZE.MEDIUM]: bem_1.bem(cn, { m: "iconOnly--medium" }),
|
|
59
62
|
[BUTTON_SIZE.LARGE]: bem_1.bem(cn, { m: "iconOnly--large" }),
|
|
60
63
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import React, { ButtonHTMLAttributes } from "react";
|
|
2
|
-
declare type CloseButtonProps = ButtonHTMLAttributes<HTMLButtonElement>;
|
|
2
|
+
export declare type CloseButtonProps = ButtonHTMLAttributes<HTMLButtonElement>;
|
|
3
3
|
export declare const CloseButton: React.ForwardRefExoticComponent<CloseButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
-
export {};
|
|
@@ -27,7 +27,7 @@ const ConveyorLogo = ({ height = HEIGHT, monochrome = false, theme = types_1.THE
|
|
|
27
27
|
return tokens_1.colors.brandGreen[400];
|
|
28
28
|
};
|
|
29
29
|
const iconColor = iconColorFunction();
|
|
30
|
-
return (react_1.default.createElement(Svg_1.Svg, Object.assign({ width: variant === "wordmark" ? widthFromHeight(height) : height, height: height, viewBox: variant === "wordmark" ? `0 0 ${WIDTH} ${HEIGHT}` : "0 0 32 32" }, rest),
|
|
30
|
+
return (react_1.default.createElement(Svg_1.Svg, Object.assign({ width: variant === "wordmark" ? widthFromHeight(height) : height, height: height, viewBox: variant === "wordmark" ? `0 0 ${WIDTH} ${HEIGHT}` : "0 0 32 32", className: className }, rest),
|
|
31
31
|
variant === "wordmark" && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
32
32
|
react_1.default.createElement("path", { fill: wordmarkColor[theme], d: "M44.159 22.858c-3.914 0-5.732-3.663-5.732-9.087 0-4.222 1.286-8.388 5.144-8.388 2.796 0 4.389 2.125 5.228 5.088h3.076l-0.28-5.088c-1.789-1.51-4.669-2.349-7.884-2.349-6.626 0-11.91 4.473-11.91 11.603 0 6.263 4.11 10.764 11.938 10.764 3.411 0 6.43-0.783 8.36-2.125l0.503-6.039h-3.048c-1.146 3.774-2.768 5.62-5.396 5.62z" }),
|
|
33
33
|
react_1.default.createElement("path", { fill: wordmarkColor[theme], d: "M62.261 23.361c-1.789 0-2.6-2.88-2.6-6.85 0-3.075 0.419-5.088 2.013-5.088 1.789 0 2.6 2.88 2.6 6.85 0 3.075-0.42 5.088-2.013 5.088zM61.674 25.402c5.116 0 8.779-3.187 8.779-8.276 0-4.362-3.215-7.745-8.192-7.745-5.116 0-8.779 3.187-8.779 8.276 0 4.362 3.215 7.745 8.192 7.745z" }),
|
|
@@ -5,12 +5,4 @@ export interface DividerProps extends BoxProps {
|
|
|
5
5
|
dashed?: boolean;
|
|
6
6
|
thick?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare const Divider:
|
|
9
|
-
(props: DividerProps): JSX.Element;
|
|
10
|
-
defaultProps: {
|
|
11
|
-
dashed: boolean;
|
|
12
|
-
direction: ORIENTATION;
|
|
13
|
-
thick: boolean;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export { Divider };
|
|
8
|
+
export declare const Divider: (props: DividerProps) => JSX.Element;
|
|
@@ -8,32 +8,21 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const classnames_1 = __importDefault(require("classnames"));
|
|
9
9
|
const types_1 = require("../../types");
|
|
10
10
|
const Box_1 = require("../Box");
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const dividerClasses = classnames_1.default([
|
|
23
|
-
"border-l",
|
|
24
|
-
"border-gray-400",
|
|
25
|
-
"w-auto",
|
|
26
|
-
dashed && "border-dashed",
|
|
27
|
-
thick && "border",
|
|
11
|
+
const utilities_1 = require("../../utilities");
|
|
12
|
+
const cn = utilities_1.bemHOF("Divider");
|
|
13
|
+
const HorizontalDivider = ({ className, ...rest }) => (react_1.default.createElement(Box_1.Box, Object.assign({ as: "hr", className: className }, rest)));
|
|
14
|
+
const VerticalDivider = ({ className, ...rest }) => (react_1.default.createElement(Box_1.Box, Object.assign({ className: className }, rest)));
|
|
15
|
+
const Divider = (props) => {
|
|
16
|
+
const { direction = types_1.ORIENTATION.HORIZONTAL, dashed = false, thick = false, className, ...rest } = props;
|
|
17
|
+
const styles = classnames_1.default([
|
|
18
|
+
cn(),
|
|
19
|
+
direction === types_1.ORIENTATION.VERTICAL && cn({ m: "vertical" }),
|
|
20
|
+
dashed && cn({ m: "dashed" }),
|
|
21
|
+
thick && cn({ m: "thick" }),
|
|
28
22
|
className,
|
|
29
23
|
]);
|
|
30
|
-
return react_1.default.createElement(Box_1.Box, Object.assign({ className: dividerClasses }, rest));
|
|
31
|
-
};
|
|
32
|
-
const Divider = (props) => {
|
|
33
|
-
const { direction = types_1.ORIENTATION.HORIZONTAL, dashed = defaultDividerProps.dashed, thick = defaultDividerProps.thick, ...rest } = props;
|
|
34
24
|
return direction === types_1.ORIENTATION.HORIZONTAL
|
|
35
|
-
? HorizontalDivider({
|
|
36
|
-
: VerticalDivider({
|
|
25
|
+
? HorizontalDivider({ className: styles, ...rest })
|
|
26
|
+
: VerticalDivider({ className: styles, ...rest });
|
|
37
27
|
};
|
|
38
28
|
exports.Divider = Divider;
|
|
39
|
-
Divider.defaultProps = defaultDividerProps;
|