@bitrise/bitkit 10.25.4 → 10.26.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "10.25.4",
4
+ "version": "10.26.0",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -1,30 +1,49 @@
1
- import { ComponentStory, ComponentMeta } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import Breadcrumb from './Breadcrumb';
3
3
  import BreadcrumbLink from './BreadcrumbLink';
4
4
 
5
5
  export default {
6
- title: 'Components/Breadcrumb',
7
6
  component: Breadcrumb,
8
7
  subcomponents: { BreadcrumbLink },
8
+ args: {
9
+ hasSeparatorAfterLast: true,
10
+ hasSeparatorBeforeFirst: false,
11
+ },
9
12
  } as ComponentMeta<typeof Breadcrumb>;
10
13
 
11
- const Template: ComponentStory<typeof Breadcrumb> = (props) => (
12
- <Breadcrumb {...props}>
13
- <BreadcrumbLink
14
- avatarUrl="https://bitrise-public-content-production.s3.amazonaws.com/org-icons/default_avatar-02.png"
15
- href="#"
16
- >
17
- Bitrise #Core
18
- </BreadcrumbLink>
19
- <BreadcrumbLink avatarName="Bitkit" href="#">
20
- bitkit
21
- </BreadcrumbLink>
22
- <BreadcrumbLink isCurrentPage>settings</BreadcrumbLink>
23
- </Breadcrumb>
24
- );
14
+ export const DefaultVersion = {
15
+ args: {
16
+ children: [
17
+ <BreadcrumbLink
18
+ avatarUrl="https://bitrise-public-content-production.s3.amazonaws.com/org-icons/default_avatar-02.png"
19
+ href="#"
20
+ >
21
+ Bitrise #Core
22
+ </BreadcrumbLink>,
23
+ <BreadcrumbLink avatarName="Bitkit" href="#">
24
+ bitkit
25
+ </BreadcrumbLink>,
26
+ <BreadcrumbLink isCurrentPage>settings</BreadcrumbLink>,
27
+ ],
28
+ },
29
+ };
25
30
 
26
- export const WithProps = Template.bind({});
27
- WithProps.args = {
28
- hasSeparatorAfterLast: false,
29
- hasSeparatorBeforeFirst: false,
31
+ export const WithLongText = {
32
+ args: {
33
+ children: [
34
+ <BreadcrumbLink
35
+ avatarUrl="https://bitrise-public-content-production.s3.amazonaws.com/org-icons/default_avatar-02.png"
36
+ href="#"
37
+ >
38
+ Bitrise #Core
39
+ </BreadcrumbLink>,
40
+ <BreadcrumbLink avatarName="Bitkit" href="#">
41
+ Bitkit
42
+ </BreadcrumbLink>,
43
+ <BreadcrumbLink href="#">
44
+ There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in
45
+ some form, by injected humour, or randomised words which don't look even slightly believable.
46
+ </BreadcrumbLink>,
47
+ ],
48
+ },
30
49
  };
@@ -8,13 +8,22 @@ const BreadcrumbTheme: SystemStyleObject = {
8
8
  alignItems: 'center',
9
9
  },
10
10
  },
11
+ item: {
12
+ _last: {
13
+ minWidth: 0,
14
+ '.chakra-breadcrumb__link': {
15
+ display: 'block',
16
+ maxWidth: '100%',
17
+ overflow: 'hidden',
18
+ textOverflow: 'ellipsis',
19
+ },
20
+ },
21
+ },
11
22
  link: {
12
23
  display: 'flex',
13
24
  alignItems: 'center',
14
25
  gap: '8',
15
- '[aria-current]': {
16
- color: 'red',
17
- },
26
+ whiteSpace: 'nowrap',
18
27
  },
19
28
  separator: {
20
29
  display: 'flex',