@conveyorhq/arrow-ds 2.0.0-beta.5 → 2.0.0-beta.9
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 +31 -23
- package/public/components/Accordion/Accordion.d.ts +29 -17
- package/public/components/Accordion/Accordion.js +73 -53
- 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/Avatar.js +20 -19
- 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 +5 -2
- package/public/components/CloseButton/CloseButton.d.ts +1 -2
- package/public/components/ConveyorLogo/ConveyorLogo.js +7 -7
- package/public/components/Divider/Divider.d.ts +1 -9
- package/public/components/Divider/Divider.js +13 -24
- package/public/components/Drawer/Drawer.js +4 -2
- package/public/components/Flex/Flex.js +3 -4
- package/public/components/Frame/Frame.d.ts +1 -1
- package/public/components/Grid/Grid.d.ts +2 -2
- package/public/components/Grid/Grid.js +9 -3
- package/public/components/Icon/Icon.d.ts +15 -0
- package/public/components/Icon/Icon.js +34 -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/Modal/Modal.d.ts +6 -0
- package/public/components/Modal/Modal.js +30 -20
- 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 +65 -13
- 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 +15 -10
- package/public/components/Select/SelectPopover.js +6 -6
- package/public/components/Select/index.d.ts +2 -0
- package/public/components/Select/index.js +3 -0
- package/public/components/Select/theme.js +22 -22
- 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/Svg/Svg.d.ts +3 -3
- package/public/components/Svg/Svg.js +1 -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/components/Tooltip/Tooltip.js +24 -31
- package/public/components/VisuallyHidden/VisuallyHidden.d.ts +2 -1
- package/public/components/VisuallyHidden/VisuallyHidden.js +3 -5
- package/public/css/styles.css +4542 -33010
- package/public/css/styles.min.css +1 -1
- package/public/css/styles.min.css.map +1 -1
- package/public/hooks/index.d.ts +3 -0
- package/public/hooks/index.js +7 -1
- package/public/hooks/useMatchMedia.d.ts +1 -0
- package/public/hooks/useMatchMedia.js +27 -0
- package/public/hooks/usePrefersReducedMotion.d.ts +1 -0
- package/public/hooks/usePrefersReducedMotion.js +9 -0
- package/public/hooks/useScreenOrientation.d.ts +1 -0
- package/public/hooks/useScreenOrientation.js +24 -0
- package/public/index.d.ts +0 -15
- package/public/index.js +0 -15
- package/public/src/style-dictionary/dist/tokens.css +378 -0
- package/public/src/style-dictionary/dist/tokens.d.ts +428 -0
- package/public/src/style-dictionary/dist/tokens.js +428 -0
- package/public/src/style-dictionary/dist/tokens.module.js +428 -0
- package/public/src/style-dictionary/tailwind.config.js +87 -0
- 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/EnumTable.js +2 -1
- package/public/storybook-components/Story.d.ts +2 -1
- package/public/storybook-components/Story.js +4 -1
- package/public/storybook-components/index.d.ts +1 -1
- package/public/storybook-components/index.js +1 -1
- package/public/style-dictionary/dist/tokens.d.ts +433 -0
- package/public/style-dictionary/dist/tokens.js +426 -0
- package/public/style-dictionary/dist/tokens.module.d.ts +431 -0
- package/public/style-dictionary/dist/tokens.module.js +424 -0
- package/public/style-dictionary/src/border-radius.d.ts +31 -0
- package/public/style-dictionary/src/border-radius.js +12 -0
- package/public/style-dictionary/src/border-width.d.ts +21 -0
- package/public/style-dictionary/src/border-width.js +11 -0
- package/public/style-dictionary/src/color.d.ts +249 -0
- package/public/style-dictionary/src/color.js +99 -0
- package/public/style-dictionary/src/font-size.d.ts +45 -0
- package/public/style-dictionary/src/font-size.js +16 -0
- package/public/style-dictionary/src/font-weight.d.ts +13 -0
- package/public/style-dictionary/src/font-weight.js +8 -0
- package/public/style-dictionary/src/height.d.ts +215 -0
- package/public/style-dictionary/src/height.js +13 -0
- package/public/style-dictionary/src/leading.d.ts +17 -0
- package/public/style-dictionary/src/leading.js +9 -0
- package/public/style-dictionary/src/screen-width.d.ts +17 -0
- package/public/style-dictionary/src/screen-width.js +9 -0
- package/public/style-dictionary/src/shadow.d.ts +63 -0
- package/public/style-dictionary/src/shadow.js +20 -0
- package/public/style-dictionary/src/spacing.d.ts +197 -0
- package/public/style-dictionary/src/spacing.js +70 -0
- package/public/style-dictionary/src/tracking.d.ts +13 -0
- package/public/style-dictionary/src/tracking.js +8 -0
- package/public/style-dictionary/src/type.d.ts +13 -0
- package/public/style-dictionary/src/type.js +35 -0
- package/public/style-dictionary/src/width.d.ts +287 -0
- package/public/style-dictionary/src/width.js +32 -0
- package/public/style-dictionary/src/z-index.d.ts +53 -0
- package/public/style-dictionary/src/z-index.js +22 -0
- package/public/style-dictionary/tailwind.config.d.ts +392 -0
- package/public/style-dictionary/tailwind.config.js +66 -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 -6
- package/public/types/index.js +3 -10
- package/public/utilities/index.d.ts +1 -0
- package/public/utilities/index.js +3 -1
- package/public/utilities/mergeEventHandlers.d.ts +3 -0
- package/public/utilities/mergeEventHandlers.js +13 -0
- package/src/components/Accordion/Accordion.story.mdx +232 -22
- package/src/components/Accordion/Accordion.tsx +237 -114
- 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/Avatar.tsx +20 -19
- 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 +13 -7
- package/src/components/Button/index.css +12 -1
- package/src/components/Button/product.css +12 -0
- package/src/components/Card/Card.story.mdx +56 -73
- package/src/components/CloseButton/CloseButton.tsx +1 -1
- package/src/components/ConveyorLogo/ConveyorLogo.tsx +7 -6
- 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 +9 -8
- 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 +146 -6
- package/src/components/Frame/Frame.tsx +1 -1
- package/src/components/Frame/index.css +8 -13
- 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 +63 -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/Modal/Modal.story.mdx +26 -0
- package/src/components/Modal/Modal.tsx +61 -43
- package/src/components/Modal/context.ts +20 -0
- package/src/components/Modal/index.css +8 -3
- package/src/components/Modal/index.ts +1 -0
- package/src/components/OptionButton/OptionButton.story.mdx +175 -21
- package/src/components/OptionButton/OptionButton.tsx +215 -26
- package/src/components/OptionButton/context.ts +22 -0
- package/src/components/OptionButton/index.css +14 -2
- package/src/components/Overlay/Overlay.story.mdx +26 -0
- 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 +35 -10
- package/src/components/Select/SelectPopover.tsx +6 -6
- package/src/components/Select/index.ts +14 -0
- package/src/components/Select/theme.ts +22 -22
- 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/Svg/Svg.story.mdx +36 -0
- package/src/components/Svg/Svg.tsx +6 -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/Text/Text.story.mdx +34 -0
- 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/components/Tooltip/Tooltip.story.mdx +71 -1
- package/src/components/Tooltip/Tooltip.tsx +40 -35
- package/src/components/Tooltip/index.css +31 -0
- package/src/components/VisuallyHidden/VisuallyHidden.story.mdx +54 -0
- package/src/components/VisuallyHidden/VisuallyHidden.tsx +10 -5
- package/src/components/VisuallyHidden/index.css +3 -0
- package/src/css/base.css +6 -561
- package/src/css/components.css +6 -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/Colors.story.mdx +13 -13
- package/src/docs/Spacing.story.mdx +4 -20
- package/src/docs/Tokens.story.mdx +230 -0
- package/src/docs/Typography.story.mdx +27 -101
- package/src/docs/hooks/useDisclosureHook.story.mdx +58 -0
- package/src/docs/hooks/useKeyPressHook.story.mdx +54 -0
- package/src/docs/hooks/useMatchMediaHook.story.mdx +42 -0
- package/src/docs/hooks/useOutsideClickHook.story.mdx +56 -0
- package/src/docs/hooks/usePrefersReducedMotion.story.mdx +61 -0
- package/src/docs/hooks/useScreenOrientationHook.story.mdx +56 -0
- package/src/docs/hooks/useStepHook.story.mdx +102 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useMatchMedia.ts +40 -0
- package/src/hooks/usePrefersReducedMotion.ts +9 -0
- package/src/hooks/useScreenOrientation.ts +27 -0
- 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/EnumTable.tsx +3 -2
- package/src/storybook-components/Story.tsx +13 -1
- package/src/storybook-components/index.tsx +1 -1
- package/src/style-dictionary/dist/tokens.css +378 -0
- package/src/style-dictionary/dist/tokens.d.ts +428 -0
- package/src/style-dictionary/dist/tokens.js +428 -0
- package/src/style-dictionary/dist/tokens.module.js +428 -0
- package/src/style-dictionary/src/border-radius.js +11 -0
- package/src/style-dictionary/src/border-width.js +10 -0
- package/src/style-dictionary/src/color.js +98 -0
- package/src/style-dictionary/src/font-size.js +15 -0
- package/src/style-dictionary/src/font-weight.js +7 -0
- package/src/style-dictionary/src/height.js +13 -0
- package/src/style-dictionary/src/leading.js +8 -0
- package/src/style-dictionary/src/screen-width.js +8 -0
- package/src/style-dictionary/src/shadow.js +19 -0
- package/src/style-dictionary/src/spacing.js +69 -0
- package/src/style-dictionary/src/tracking.js +7 -0
- package/src/style-dictionary/src/type.js +34 -0
- package/src/style-dictionary/src/width.js +32 -0
- package/src/style-dictionary/src/z-index.js +21 -0
- package/src/style-dictionary/tailwind.config.js +87 -0
- package/src/tokens/borders.ts +6 -0
- package/src/tokens/box-shadow.ts +4 -0
- package/src/tokens/colors.ts +6 -0
- package/src/tokens/font-family.ts +4 -1
- package/src/tokens/font-size.ts +3 -0
- package/src/tokens/font-weight.ts +3 -0
- package/src/tokens/height.ts +6 -44
- package/src/tokens/index.ts +5 -4
- package/src/tokens/letter-spacing.ts +3 -0
- package/src/tokens/line-height.ts +3 -0
- package/src/tokens/margin.ts +7 -47
- package/src/tokens/padding.ts +6 -24
- package/src/tokens/screens.ts +3 -0
- package/src/tokens/sizing-scale.ts +140 -0
- package/src/tokens/width.ts +16 -63
- package/src/tokens/will-change.ts +3 -0
- package/src/tokens/z-index.ts +3 -0
- package/src/types/index.ts +37 -10
- package/src/utilities/index.ts +1 -0
- package/src/utilities/mergeEventHandlers.ts +20 -0
- 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 -60
- package/public/components/Appbar/Appbar.js +0 -42
- package/public/components/Appbar/AppbarClaimProfileButton.d.ts +0 -2
- package/public/components/Appbar/AppbarClaimProfileButton.js +0 -10
- package/public/components/Appbar/AppbarDropdownIcon.d.ts +0 -1
- package/public/components/Appbar/AppbarDropdownIcon.js +0 -10
- package/public/components/Appbar/AppbarLogInButton.d.ts +0 -2
- package/public/components/Appbar/AppbarLogInButton.js +0 -26
- package/public/components/Appbar/AppbarLogo.d.ts +0 -2
- package/public/components/Appbar/AppbarLogo.js +0 -19
- package/public/components/Appbar/AppbarOrganization.d.ts +0 -17
- package/public/components/Appbar/AppbarOrganization.js +0 -35
- package/public/components/Appbar/AppbarTabMarker.d.ts +0 -1
- package/public/components/Appbar/AppbarTabMarker.js +0 -11
- 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 -27
- package/public/components/Appbar/AppbarUser.js +0 -76
- package/public/components/Appbar/config.d.ts +0 -7
- package/public/components/Appbar/config.js +0 -13
- package/public/components/Appbar/context.d.ts +0 -10
- package/public/components/Appbar/context.js +0 -16
- 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/Overlay/Overlay.story.d.ts +0 -1
- package/public/components/Overlay/Overlay.story.js +0 -12
- 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/Svg/Svg.story.d.ts +0 -1
- package/public/components/Svg/Svg.story.js +0 -14
- package/public/components/Text/Text.story.d.ts +0 -1
- package/public/components/Text/Text.story.js +0 -31
- 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/components/VisuallyHidden/VisuallyHidden.story.d.ts +0 -1
- package/public/components/VisuallyHidden/VisuallyHidden.story.js +0 -36
- package/public/components/useStep/ExampleSetupWizard.d.ts +0 -4
- package/public/components/useStep/ExampleSetupWizard.js +0 -33
- 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 -185
- package/src/components/Appbar/Appbar.tsx +0 -108
- package/src/components/Appbar/AppbarClaimProfileButton.tsx +0 -13
- package/src/components/Appbar/AppbarDropdownIcon.tsx +0 -6
- package/src/components/Appbar/AppbarLogInButton.tsx +0 -28
- package/src/components/Appbar/AppbarLogo.tsx +0 -29
- package/src/components/Appbar/AppbarOrganization.tsx +0 -96
- package/src/components/Appbar/AppbarTabMarker.tsx +0 -5
- package/src/components/Appbar/AppbarTabs.tsx +0 -46
- package/src/components/Appbar/AppbarUser.tsx +0 -179
- package/src/components/Appbar/config.ts +0 -12
- package/src/components/Appbar/context.ts +0 -20
- package/src/components/Appbar/index.css +0 -324
- 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/Overlay/Overlay.md +0 -14
- package/src/components/Overlay/Overlay.story.tsx +0 -12
- 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/Svg/Svg.md +0 -14
- package/src/components/Svg/Svg.story.tsx +0 -15
- package/src/components/Text/Text.md +0 -14
- package/src/components/Text/Text.story.tsx +0 -12
- 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/components/VisuallyHidden/VisuallyHidden.md +0 -23
- package/src/components/VisuallyHidden/VisuallyHidden.story.tsx +0 -19
- package/src/components/useStep/ExampleSetupWizard.tsx +0 -63
- package/src/components/useStep/useStep.story.mdx +0 -76
- 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.9",
|
|
6
6
|
"description": "Arrow Design System",
|
|
7
7
|
"repository": "https://github.com/conveyor/arrow-ds",
|
|
8
8
|
"publishConfig": {
|
|
@@ -50,14 +50,18 @@
|
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"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",
|
|
53
|
+
"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
54
|
"build:clean": "node utilities/clean.js",
|
|
55
55
|
"build:ts": "tsc -b",
|
|
56
56
|
"build:css": "yarn run postcss -c postcss.config.js -o public/css/styles.css src/css/styles.css",
|
|
57
|
-
"build:copy-files": "
|
|
57
|
+
"build:copy-files": "yarn run build:copy-svg && yarn run build:copy-style-dictionary",
|
|
58
|
+
"build:copy-svg": "copyfiles -u 1 src/**/*.svg public/",
|
|
59
|
+
"build:copy-style-dictionary": "copyfiles src/style-dictionary/dist/* src/style-dictionary/tailwind.config.js public/",
|
|
58
60
|
"minify:css": "csso public/css/styles.css --output public/css/styles.min.css --comments none --source-map file",
|
|
59
61
|
"storybook": "yarn run build && start-storybook --docs -p 9002 -c .storybook -s .storybook",
|
|
60
62
|
"build-storybook": "yarn run build && build-storybook --docs -c .storybook -s .storybook -o storybook-static",
|
|
63
|
+
"style-dictionary:build": "style-dictionary build --config ./style-dictionary.config.js",
|
|
64
|
+
"style-dictionary:clean": "style-dictionary clean --config ./style-dictionary.config.js",
|
|
61
65
|
"generate": "plop",
|
|
62
66
|
"lint:check": "prettier --check 'src/**/**.{ts,tsx,js,css,mdx}' && eslint 'src/**/**.{ts,tsx,js,mdx}'",
|
|
63
67
|
"lint:fix": "eslint 'src/**/**.{ts,tsx,js,mdx}' --fix && prettier --write 'src/**/**.{ts,tsx,js,css,mdx}'",
|
|
@@ -73,7 +77,7 @@
|
|
|
73
77
|
},
|
|
74
78
|
"release": {
|
|
75
79
|
"branches": [
|
|
76
|
-
"
|
|
80
|
+
"main",
|
|
77
81
|
{
|
|
78
82
|
"name": "alpha",
|
|
79
83
|
"prerelease": true
|
|
@@ -98,17 +102,20 @@
|
|
|
98
102
|
"@babel/preset-env": "^7.9.0",
|
|
99
103
|
"@babel/preset-react": "^7.7.0",
|
|
100
104
|
"@babel/preset-typescript": "^7.7.2",
|
|
101
|
-
"@commitlint/cli": "^
|
|
102
|
-
"@commitlint/config-conventional": "^
|
|
103
|
-
"@storybook/addon-actions": "^
|
|
104
|
-
"@storybook/addon-docs": "^
|
|
105
|
+
"@commitlint/cli": "^16.2.1",
|
|
106
|
+
"@commitlint/config-conventional": "^16.2.1",
|
|
107
|
+
"@storybook/addon-actions": "^v6.5.0-alpha.44",
|
|
108
|
+
"@storybook/addon-docs": "^v6.5.0-alpha.44",
|
|
105
109
|
"@storybook/addon-postcss": "^2.0.0",
|
|
106
|
-
"@storybook/
|
|
107
|
-
"@storybook/
|
|
110
|
+
"@storybook/builder-webpack5": "^6.4.19",
|
|
111
|
+
"@storybook/manager-webpack5": "^6.4.19",
|
|
112
|
+
"@storybook/react": "^v6.5.0-alpha.44",
|
|
113
|
+
"@storybook/theming": "^v6.5.0-alpha.44",
|
|
108
114
|
"@types/classnames": "^2.2.9",
|
|
109
115
|
"@types/codemirror": "^0.0.91",
|
|
110
116
|
"@types/d3-ease": "^1.0.9",
|
|
111
117
|
"@types/jest": "^24.0.22",
|
|
118
|
+
"@types/lodash.camelcase": "^4.3.6",
|
|
112
119
|
"@types/md5": "^2.2.1",
|
|
113
120
|
"@types/mime-types": "^2.1.0",
|
|
114
121
|
"@types/node": "^12.12.6",
|
|
@@ -117,44 +124,45 @@
|
|
|
117
124
|
"@types/react-dom": "^16.9.4",
|
|
118
125
|
"@types/react-fontawesome": "^1.6.4",
|
|
119
126
|
"@types/react-select": "^3.0.8",
|
|
120
|
-
"@types/tailwindcss": "^
|
|
121
|
-
"@types/webpack": "^
|
|
127
|
+
"@types/tailwindcss": "^3.0.1",
|
|
128
|
+
"@types/webpack": "^5.0.0",
|
|
122
129
|
"@typescript-eslint/eslint-plugin": "^4.18.0",
|
|
123
130
|
"@typescript-eslint/parser": "^4.18.0",
|
|
124
|
-
"autoprefixer": "^10.
|
|
131
|
+
"autoprefixer": "^10.4.0",
|
|
125
132
|
"babel-loader": "^8.0.6",
|
|
126
|
-
"babel-plugin-inline-react-svg": "^
|
|
133
|
+
"babel-plugin-inline-react-svg": "^2.0.0",
|
|
127
134
|
"copyfiles": "^2.4.1",
|
|
128
135
|
"csso-cli": "^3.0.0",
|
|
129
|
-
"eslint": "^7.
|
|
136
|
+
"eslint": "^7.32.0",
|
|
130
137
|
"eslint-config-airbnb-typescript": "^12.3.1",
|
|
131
138
|
"eslint-config-prettier": "^8.1.0",
|
|
132
139
|
"eslint-formatter-pretty": "^4.0.0",
|
|
133
140
|
"eslint-import-resolver-typescript": "^2.4.0",
|
|
134
141
|
"eslint-plugin-import": "^2.22.1",
|
|
135
142
|
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
136
|
-
"eslint-plugin-mdx": "^1.
|
|
143
|
+
"eslint-plugin-mdx": "^1.16.0",
|
|
137
144
|
"eslint-plugin-prettier": "^3.3.1",
|
|
138
145
|
"eslint-plugin-react": "^7.22.0",
|
|
139
146
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
140
147
|
"fs-extra": "^8.1.0",
|
|
141
148
|
"husky": "^3.1.0",
|
|
149
|
+
"lodash.camelcase": "^4.3.0",
|
|
142
150
|
"plop": "^2.5.3",
|
|
143
|
-
"postcss": "^8.
|
|
144
|
-
"postcss-cli": "^
|
|
145
|
-
"postcss-import": "^
|
|
151
|
+
"postcss": "^8.4.7",
|
|
152
|
+
"postcss-cli": "^9.0.2",
|
|
153
|
+
"postcss-import": "^14.0.2",
|
|
146
154
|
"prettier": "^2.2.1",
|
|
147
155
|
"react": "^16.11.0",
|
|
148
156
|
"react-docgen-typescript-loader": "^3.6.0",
|
|
149
157
|
"react-dom": "^16.11.0",
|
|
150
158
|
"react-is": "^16.12.0",
|
|
151
159
|
"regenerator-runtime": "^0.13.3",
|
|
152
|
-
"semantic-release": "^
|
|
153
|
-
"
|
|
154
|
-
"tailwindcss": "^
|
|
160
|
+
"semantic-release": "^19.0.2",
|
|
161
|
+
"style-dictionary": "^3.1.1",
|
|
162
|
+
"tailwindcss": "^3.0.23",
|
|
155
163
|
"ts-loader": "^6.2.1",
|
|
156
164
|
"typescript": "^4.2.3",
|
|
157
|
-
"webpack": "^
|
|
165
|
+
"webpack": "^5.0.0",
|
|
158
166
|
"webpack-bundle-analyzer": "^3.6.0"
|
|
159
167
|
},
|
|
160
168
|
"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,103 @@
|
|
|
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
9
|
const renderprops_1 = require("react-spring/renderprops");
|
|
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
72
|
const { height } = component_size_1.default(childrenRef);
|
|
50
73
|
const heightObj = { height };
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
74
|
+
const [enableTransition, setEnableTransition] = react_1.default.useState(!defaultIsOpen);
|
|
75
|
+
return (react_1.default.createElement(renderprops_1.Transition, { items: isOpen, from: { height: 0 }, enter: { height }, leave: { height: 0 }, update: heightObj, onRest: () => {
|
|
76
|
+
if (defaultIsOpen && isOpen) {
|
|
77
|
+
setEnableTransition(true);
|
|
78
|
+
}
|
|
79
|
+
}, immediate: !enableTransition }, (show) => show
|
|
80
|
+
? (styles) => (react_1.default.createElement(Box_1.Box, Object.assign({ className: classnames_1.default("overflow-hidden box-content", className), style: { ...styles, ...style }, "aria-labelledby": buttonId, id: contentId, role: "region" }, rest),
|
|
81
|
+
react_1.default.createElement(Box_1.Box, { ref: onRefChange, className: classnames_1.default(maxHeight && "overflow-y-auto"), style: maxHeight ? { maxHeight } : undefined }, children)))
|
|
82
|
+
: null));
|
|
83
|
+
};
|
|
84
|
+
exports.AccordionContent = AccordionContent;
|
|
85
|
+
const Accordion = (props) => {
|
|
86
|
+
const { title, isActive, maxHeight, children, iconSlot, className, removePadding, ...rest } = props;
|
|
87
|
+
return (react_1.default.createElement(exports.AccordionItem, Object.assign({ className: className }, rest),
|
|
64
88
|
react_1.default.createElement(Heading_1.Heading.H5, null,
|
|
65
|
-
react_1.default.createElement(
|
|
89
|
+
react_1.default.createElement(exports.AccordionButton, { className: classnames_1.default(cn({ e: "button" }), {
|
|
66
90
|
[cn({ e: "button", m: "isActive" })]: isActive,
|
|
67
|
-
})
|
|
91
|
+
}) },
|
|
68
92
|
react_1.default.createElement(Flex_1.Flex, { className: "items-center", as: "span" },
|
|
69
93
|
iconSlot && (react_1.default.createElement(Box_1.Box, { className: classnames_1.default(cn({ e: "icon" })), as: "span" }, iconSlot)),
|
|
70
94
|
title),
|
|
71
95
|
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
|
-
})));
|
|
96
|
+
react_1.default.createElement(exports.AccordionContent, { className: cn({ e: "content" }), maxHeight: maxHeight },
|
|
97
|
+
react_1.default.createElement(Box_1.Box, { className: classnames_1.default(cn({ e: "children" }), !removePadding && cn({ e: "children", m: "padded" })) }, children))));
|
|
81
98
|
};
|
|
82
99
|
exports.Accordion = Accordion;
|
|
83
100
|
exports.Accordion.Group = exports.AccordionGroup;
|
|
101
|
+
exports.Accordion.Item = exports.AccordionItem;
|
|
102
|
+
exports.Accordion.Button = exports.AccordionButton;
|
|
103
|
+
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;
|
|
@@ -27,7 +27,7 @@ const react_1 = __importStar(require("react"));
|
|
|
27
27
|
const md5_1 = __importDefault(require("md5"));
|
|
28
28
|
const classnames_1 = __importDefault(require("classnames"));
|
|
29
29
|
const bem_1 = require("../../utilities/bem");
|
|
30
|
-
const tokens_1 = require("../../tokens");
|
|
30
|
+
const tokens_1 = require("../../style-dictionary/dist/tokens");
|
|
31
31
|
const Box_1 = require("../Box");
|
|
32
32
|
const Icon_1 = require("../Icon");
|
|
33
33
|
const Flex_1 = require("../Flex");
|
|
@@ -39,35 +39,36 @@ const AvatarGroup_1 = require("./AvatarGroup");
|
|
|
39
39
|
const types_1 = require("./types");
|
|
40
40
|
const context_1 = require("./context");
|
|
41
41
|
const cn = bem_1.bemHOF("Avatar");
|
|
42
|
+
const { color } = tokens_1.tokens;
|
|
42
43
|
const SystemIcon = (props) => {
|
|
43
44
|
return (react_1.default.createElement(Svg_1.Svg, Object.assign({ viewBox: "0 0 32 32" }, props),
|
|
44
|
-
react_1.default.createElement("path", { fill:
|
|
45
|
-
react_1.default.createElement("path", { fill:
|
|
46
|
-
react_1.default.createElement("path", { fill:
|
|
47
|
-
react_1.default.createElement("path", { fill:
|
|
48
|
-
react_1.default.createElement("path", { fill:
|
|
45
|
+
react_1.default.createElement("path", { fill: color.brandGreen["400"], d: "M19.042 31.58c-1.17 0.275-2.389 0.42-3.642 0.42-0.24 0-0.479-0.005-0.716-0.016v-2.851c0-1.318-1.285-2.25-2.533-1.843-1.934 0.63-3.873 1.249-5.809 1.872-1.371-0.954-2.586-2.118-3.598-3.447l7.94-2.602c1.96-0.637 4.054-0.299 5.721 0.918s2.633 3.115 2.637 5.186l0.001 2.362z" }),
|
|
46
|
+
react_1.default.createElement("path", { fill: color.brandGreen["400"], d: "M20.856 31.037l0.004-8.342c-0.003-2.071 0.95-3.969 2.636-5.191 1.647-1.216 3.736-1.548 5.716-0.909l2.066 0.675c-0.117 1.502-0.441 2.946-0.943 4.302-0.876-0.286-1.751-0.576-2.627-0.861-1.23-0.401-2.48 0.525-2.48 1.824v6.057c-1.308 1.032-2.781 1.862-4.372 2.445z" }),
|
|
47
|
+
react_1.default.createElement("path", { fill: color.brandGreen["400"], d: "M31.314 15.338l-7.709-2.523c-1.98-0.64-3.471-2.149-4.105-4.12s-0.299-4.075 0.911-5.75l1.212-1.677c1.363 0.582 2.629 1.349 3.767 2.27-0.512 0.704-1.032 1.403-1.555 2.099-0.802 1.066-0.321 2.608 0.946 3.015l5.558 1.785c0.567 1.536 0.906 3.184 0.976 4.901z" }),
|
|
48
|
+
react_1.default.createElement("path", { fill: color.brandGreen["400"], d: "M14.89 0.008c0.169-0.005 0.339-0.008 0.509-0.008 1.534 0 3.017 0.218 4.421 0.624l-4.725 6.537c-1.211 1.675-3.098 2.645-5.159 2.648s-3.949-0.956-5.166-2.651l-1.287-1.776c0.971-1.099 2.091-2.063 3.327-2.859l1.565 2.223c0.764 1.085 2.365 1.090 3.135 0.008l3.379-4.747z" }),
|
|
49
|
+
react_1.default.createElement("path", { fill: color.brandGreen["400"], d: "M0.145 11.383c0.487-1.624 1.223-3.14 2.165-4.502l4.823 6.663c1.217 1.695 1.548 3.795 0.906 5.745-0.636 1.99-2.137 3.487-4.097 4.124l-2.253 0.733c-0.737-1.249-1.31-2.608-1.689-4.046l2.681-0.912c1.244-0.423 1.711-1.948 0.93-3.009-1.168-1.589-2.318-3.193-3.466-4.797z" })));
|
|
49
50
|
};
|
|
50
51
|
const SystemIconConveyor = (props) => (react_1.default.createElement(SystemIcon, Object.assign({}, props)));
|
|
51
52
|
exports.SystemIconConveyor = SystemIconConveyor;
|
|
52
53
|
const SystemIconAptible = (props) => (react_1.default.createElement(Svg_1.Svg, Object.assign({ viewBox: "0 0 40 32" }, props),
|
|
53
|
-
react_1.default.createElement("path", { fill:
|
|
54
|
-
react_1.default.createElement("path", { fill:
|
|
55
|
-
react_1.default.createElement("path", { fill:
|
|
56
|
-
react_1.default.createElement("path", { fill:
|
|
54
|
+
react_1.default.createElement("path", { fill: color.gold["400"], d: "M22.018 31.667h5.646v-11.538l11.291 11.538v-7.692l-16.937-17.308z" }),
|
|
55
|
+
react_1.default.createElement("path", { fill: color.gold["400"], d: "M27.777 0h-7.452l18.631 18.333v-7.333l-11.178-11z" }),
|
|
56
|
+
react_1.default.createElement("path", { fill: color.gold["400"], d: "M0 23.974v7.692l11.291-11.538v11.538h5.646v-25l-16.937 17.308z" }),
|
|
57
|
+
react_1.default.createElement("path", { fill: color.gold["400"], d: "M0 11v7.333l18.631-18.333h-7.522l-11.109 11z" })));
|
|
57
58
|
exports.SystemIconAptible = SystemIconAptible;
|
|
58
59
|
const avatarInitialBackgroundColors = [
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
color.green["600"],
|
|
61
|
+
color.gold["600"],
|
|
62
|
+
color.orange["600"],
|
|
63
|
+
color.red["600"],
|
|
64
|
+
color.pink["600"],
|
|
65
|
+
color.purple["600"],
|
|
66
|
+
color.blue["600"],
|
|
67
|
+
color.cyan["600"],
|
|
67
68
|
];
|
|
68
69
|
const Initials = ({ email, name, firstInitial, lastInitial, }) => {
|
|
69
70
|
const initialsBgColor = react_1.useMemo(() => {
|
|
70
|
-
const fallbackColor =
|
|
71
|
+
const fallbackColor = color.gray["600"];
|
|
71
72
|
if (!email)
|
|
72
73
|
return fallbackColor;
|
|
73
74
|
let hash = 0;
|
|
@@ -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
|
};
|
|
@@ -66,7 +69,7 @@ exports.Button = react_1.forwardRef(({ as: Component = "button", children, class
|
|
|
66
69
|
const isDisabled = disabled || isLoading;
|
|
67
70
|
const themeContext = react_1.useContext(contexts_1.ThemeContext);
|
|
68
71
|
const theme = themeProp || themeContext;
|
|
69
|
-
const buttonClassNames = classnames_1.default(bem_1.bem(cn), bem_1.bem(cn, { m: variant }), bem_1.bem(cn, { m: theme }), block
|
|
72
|
+
const buttonClassNames = classnames_1.default(bem_1.bem(cn), bem_1.bem(cn, { m: variant }), bem_1.bem(cn, { m: theme }), block && bem_1.bem(cn, { m: "block" }), getButtonSizeClasses(size, icon, children), depressed && bem_1.bem(cn, { m: "depressed" }), isDisabled && bem_1.bem(cn, { m: "disabled" }), className);
|
|
70
73
|
const iconClassNames = classnames_1.default(bem_1.bem(cn, { e: "icon" }), children && bem_1.bem(cn, { e: "icon", m: iconPosition }), isLoading && bem_1.bem(cn, { e: "icon", m: "invisible" }));
|
|
71
74
|
const iconProps = icon
|
|
72
75
|
? {
|
|
@@ -82,7 +85,7 @@ exports.Button = react_1.forwardRef(({ as: Component = "button", children, class
|
|
|
82
85
|
type = "button";
|
|
83
86
|
}
|
|
84
87
|
const propsIfLink = Component === Link_1.Link ? { noStyles: true } : {};
|
|
85
|
-
return (react_1.default.createElement(Component, Object.assign({ type: type, className: buttonClassNames, disabled:
|
|
88
|
+
return (react_1.default.createElement(Component, Object.assign({ type: type, className: buttonClassNames, disabled: isDisabled, ref: ref }, propsIfLink, rest),
|
|
86
89
|
icon && iconProps && iconPosition === BUTTON_ICON_POSITION.LEFT && (react_1.default.createElement(Icon_1.Icon, Object.assign({}, iconProps))),
|
|
87
90
|
react_1.default.createElement("span", { className: classnames_1.default(bem_1.bem(cn, { e: "content" }), isLoading && bem_1.bem(cn, { e: "content", m: "invisible" })) }, children),
|
|
88
91
|
icon && iconProps && iconPosition === BUTTON_ICON_POSITION.RIGHT && (react_1.default.createElement(Icon_1.Icon, Object.assign({}, iconProps))),
|