@bitrise/bitkit 9.5.2 → 9.5.3-alpha-src.1

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.
Files changed (105) hide show
  1. package/package.json +4 -1
  2. package/src/tsconfig.tsbuildinfo +1 -0
  3. package/.browserslistrc +0 -2
  4. package/.editorconfig +0 -4
  5. package/.eslint-tsconfig.json +0 -7
  6. package/.eslintrc.js +0 -28
  7. package/.husky/commit-msg +0 -4
  8. package/.nvmrc +0 -1
  9. package/.storybook/main.js +0 -35
  10. package/.storybook/manager.js +0 -6
  11. package/.storybook/preview.tsx +0 -20
  12. package/.storybook/theme.js +0 -7
  13. package/.stylelintignore +0 -2
  14. package/.stylelintrc +0 -287
  15. package/.svgrrc.js +0 -52
  16. package/.tool-versions +0 -1
  17. package/@types/@bitrise/bitkit.ts +0 -1
  18. package/@types/react-docgen.ts +0 -119
  19. package/CHANGELOG.md +0 -996
  20. package/CONTRIBUTING.md +0 -79
  21. package/FAQ.md +0 -19
  22. package/bitrise.yml +0 -66
  23. package/commitlint.config.js +0 -10
  24. package/jest.setup.js +0 -36
  25. package/netlify.toml +0 -42
  26. package/postcss.config.js +0 -16
  27. package/release.config.js +0 -32
  28. package/renovate.json +0 -6
  29. package/scripts/build-docs-watch.ts +0 -7
  30. package/scripts/build-docs.ts +0 -59
  31. package/site/assets/fonts/TT_Norms_Pro_Bold.woff +0 -0
  32. package/site/assets/fonts/TT_Norms_Pro_Normal.woff +0 -0
  33. package/site/assets/icons/favicon-32x32.png +0 -0
  34. package/site/assets/images/app_icon.jpg +0 -0
  35. package/site/assets/images/status-checks.png +0 -0
  36. package/site/components/CodeBlock/CodeBlock.css +0 -87
  37. package/site/components/CodeBlock/CodeBlock.tsx +0 -35
  38. package/site/components/Documentation/ComponentDocumentationPage.tsx +0 -150
  39. package/site/components/Documentation/Components/SectionAddonBeam.tsx +0 -47
  40. package/site/components/Documentation/Components/SectionAddonBeamSandbox.tsx +0 -32
  41. package/site/components/Documentation/Components/SectionAddonFooter.tsx +0 -22
  42. package/site/components/Documentation/Components/SectionAppear.tsx +0 -59
  43. package/site/components/Documentation/Components/SectionAvatar.tsx +0 -50
  44. package/site/components/Documentation/Components/SectionBadge.tsx +0 -38
  45. package/site/components/Documentation/Components/SectionBase.tsx +0 -17
  46. package/site/components/Documentation/Components/SectionButtons.tsx +0 -361
  47. package/site/components/Documentation/Components/SectionCards.tsx +0 -276
  48. package/site/components/Documentation/Components/SectionCheckbox.tsx +0 -38
  49. package/site/components/Documentation/Components/SectionDatePicker.tsx +0 -82
  50. package/site/components/Documentation/Components/SectionDivider.tsx +0 -31
  51. package/site/components/Documentation/Components/SectionDot.tsx +0 -27
  52. package/site/components/Documentation/Components/SectionDropdowns.tsx +0 -388
  53. package/site/components/Documentation/Components/SectionExpand.tsx +0 -143
  54. package/site/components/Documentation/Components/SectionFlex.tsx +0 -33
  55. package/site/components/Documentation/Components/SectionFormElements.tsx +0 -187
  56. package/site/components/Documentation/Components/SectionGrid.tsx +0 -125
  57. package/site/components/Documentation/Components/SectionHamburger.tsx +0 -34
  58. package/site/components/Documentation/Components/SectionIcons.tsx +0 -30
  59. package/site/components/Documentation/Components/SectionInputs.tsx +0 -89
  60. package/site/components/Documentation/Components/SectionList.tsx +0 -26
  61. package/site/components/Documentation/Components/SectionModals.tsx +0 -224
  62. package/site/components/Documentation/Components/SectionNotification.tsx +0 -38
  63. package/site/components/Documentation/Components/SectionPlacement.tsx +0 -167
  64. package/site/components/Documentation/Components/SectionProgress.tsx +0 -149
  65. package/site/components/Documentation/Components/SectionRadioButton.tsx +0 -38
  66. package/site/components/Documentation/Components/SectionRibbon.tsx +0 -33
  67. package/site/components/Documentation/Components/SectionRibbonSandbox.tsx +0 -17
  68. package/site/components/Documentation/Components/SectionSidebar.tsx +0 -125
  69. package/site/components/Documentation/Components/SectionSkeleton.tsx +0 -99
  70. package/site/components/Documentation/Components/SectionStatus.tsx +0 -53
  71. package/site/components/Documentation/Components/SectionStatusSandbox404.tsx +0 -42
  72. package/site/components/Documentation/Components/SectionStatusSandbox500.tsx +0 -13
  73. package/site/components/Documentation/Components/SectionTable.tsx +0 -83
  74. package/site/components/Documentation/Components/SectionTabs.tsx +0 -25
  75. package/site/components/Documentation/Components/SectionText.tsx +0 -34
  76. package/site/components/Documentation/Components/SectionTextarea.tsx +0 -43
  77. package/site/components/Documentation/Components/SectionToggle.tsx +0 -50
  78. package/site/components/Documentation/Components/SectionTooltips.tsx +0 -50
  79. package/site/components/Documentation/Documentation.tsx +0 -302
  80. package/site/components/Documentation/Materials/SectionColors.css +0 -33
  81. package/site/components/Documentation/Materials/SectionColors.tsx +0 -197
  82. package/site/components/Documentation/Materials/SectionIcons.tsx +0 -106
  83. package/site/components/Documentation/Materials/SectionTypography.tsx +0 -143
  84. package/site/components/Page/Page.tsx +0 -8
  85. package/site/components/Page/PageTitle.tsx +0 -8
  86. package/site/components/PropsTable/PropsTable.tsx +0 -35
  87. package/site/components/PropsTable/PropsTableCellUnion.tsx +0 -29
  88. package/site/components/PropsTable/PropsTableRow.tsx +0 -55
  89. package/site/components/Root/Root.tsx +0 -89
  90. package/site/components/Root/index.tsx +0 -4
  91. package/site/components/Sandbox/Sandbox.tsx +0 -19
  92. package/site/components/Sandbox/SandboxFrame.css +0 -20
  93. package/site/components/Sandbox/SandboxFrame.tsx +0 -77
  94. package/site/components/Section/Section.tsx +0 -8
  95. package/site/components/Section/SectionSubTitle.tsx +0 -8
  96. package/site/components/Section/SectionTitle.tsx +0 -8
  97. package/site/components/SideMenu/SideMenu.css +0 -39
  98. package/site/components/SideMenu/SideMenu.tsx +0 -53
  99. package/site/components/SideMenu/SideMenuItem.tsx +0 -34
  100. package/site/components/Window/Window.tsx +0 -62
  101. package/site/index.css +0 -11
  102. package/site/index.html +0 -16
  103. package/site/index.tsx +0 -16
  104. package/superstatic.json +0 -13
  105. package/tsconfig.json +0 -25
@@ -1,276 +0,0 @@
1
- import * as React from 'react';
2
- import {
3
- Card,
4
- CardContent,
5
- CardDivider,
6
- Flex,
7
- Icon,
8
- Tab,
9
- Tabs,
10
- Text,
11
- CardButton,
12
- ProgressBitbot,
13
- } from '@bitrise/bitkit';
14
- import CodeBlock from '../../CodeBlock/CodeBlock';
15
- import Section from '../../Section/Section';
16
- import SectionSubTitle from '../../Section/SectionSubTitle';
17
-
18
- const SectionCards = () => {
19
- const [selectedTab, setSelectedTab] = React.useState(1);
20
-
21
- return (
22
- <Section>
23
- <Tabs gap="x6" margin="x8">
24
- <Tab active={selectedTab === 1} onClick={() => setSelectedTab(1)}>
25
- Elevation Levels
26
- </Tab>
27
-
28
- <Tab active={selectedTab === 2} onClick={() => setSelectedTab(2)}>
29
- Divided Content
30
- </Tab>
31
-
32
- <Tab active={selectedTab === 3} onClick={() => setSelectedTab(3)}>
33
- Card Buttons
34
- </Tab>
35
- </Tabs>
36
-
37
- {selectedTab === 1 && (
38
- <>
39
- <Card margin="x4">
40
- <CardContent padding="x6">
41
- <Flex alignChildrenVertical="middle" direction="horizontal" gap="x4">
42
- <Flex>
43
- <Icon name="App" textColor="aqua-3" />
44
- </Flex>
45
-
46
- <Flex>
47
- <Text size="2" textColor="grape-5" uppercase weight="bold">
48
- Unelevated
49
- </Text>
50
- </Flex>
51
- </Flex>
52
- </CardContent>
53
- </Card>
54
-
55
- <Card elevation="x2" margin="x4">
56
- <CardContent padding="x6">
57
- <Flex alignChildrenVertical="middle" direction="horizontal" gap="x4">
58
- <Flex>
59
- <Icon name="App" textColor="aqua-3" />
60
- </Flex>
61
-
62
- <Flex>
63
- <Text size="2" textColor="grape-5" uppercase weight="bold">
64
- Elevation x2
65
- </Text>
66
- </Flex>
67
- </Flex>
68
- </CardContent>
69
- </Card>
70
-
71
- <Card elevation="x3" margin="x4">
72
- <CardContent padding="x6">
73
- <Flex alignChildrenVertical="middle" direction="horizontal" gap="x4">
74
- <Flex>
75
- <Icon name="App" textColor="aqua-3" />
76
- </Flex>
77
-
78
- <Flex>
79
- <Text size="2" textColor="grape-5" uppercase weight="bold">
80
- Elevation x3
81
- </Text>
82
- </Flex>
83
- </Flex>
84
- </CardContent>
85
- </Card>
86
-
87
- <CodeBlock title="Card with elevation">{`const Component = () => (
88
- <Card direction="vertical" elevation="x2">
89
- <CardContent padding="x6">...</CardContent>
90
- </Card>
91
- );`}</CodeBlock>
92
- </>
93
- )}
94
-
95
- {selectedTab === 2 && (
96
- <>
97
- <Card direction="vertical" margin="x4">
98
- <CardContent grow padding="x6">
99
- <Flex alignChildrenVertical="middle" direction="horizontal" gap="x4">
100
- <Flex>
101
- <Icon name="App" textColor="aqua-3" />
102
- </Flex>
103
-
104
- <Flex>
105
- <Text size="2" textColor="grape-5" uppercase weight="bold">
106
- Vertically Divided Content
107
- </Text>
108
- </Flex>
109
- </Flex>
110
- </CardContent>
111
-
112
- <CardDivider />
113
-
114
- <CardContent grow padding="x6">
115
- <Text align="end" size="2" textColor="gray-5" uppercase>
116
- Showing 1 / 1 Apps
117
- </Text>
118
- </CardContent>
119
- </Card>
120
-
121
- <Card direction="horizontal" margin="x4">
122
- <CardContent grow padding="x6">
123
- <Flex alignChildrenVertical="middle" direction="horizontal" gap="x4">
124
- <Flex>
125
- <Icon name="BuildstatusAborted" textColor="red-3" />
126
- </Flex>
127
-
128
- <Flex>
129
- <Text size="1" textColor="gray-4" uppercase weight="bold">
130
- Horizontal Divided Content
131
- </Text>
132
- <Text size="2" textColor="gray-5" uppercase weight="bold">
133
- Horizontal Divided Content
134
- </Text>
135
- </Flex>
136
- </Flex>
137
- </CardContent>
138
-
139
- <CardDivider />
140
-
141
- <CardContent alignChildren="middle" direction="horizontal" padding="x6">
142
- <Icon name="Clock" textColor="gray-4" />
143
- </CardContent>
144
- </Card>
145
-
146
- <CodeBlock title="Card with divisions">{`const VerticalDividedComponent = () => (
147
- <Card direction="vertical">
148
- <CardContent padding="x6">...</CardContent>
149
- <CardDivider />
150
- <CardContent padding="x6">...</CardContent>
151
- </Card>
152
- );
153
-
154
- const HorizontalDividedComponent = () => (
155
- <Card direction="horizontal">
156
- <CardContent padding="x6">...</CardContent>
157
- <CardDivider />
158
- <CardContent padding="x6">...</CardContent>
159
- </Card>
160
- );`}</CodeBlock>
161
- </>
162
- )}
163
-
164
- {selectedTab === 3 && (
165
- <>
166
- <Flex margin="x12">
167
- <SectionSubTitle>Vertical Divided Buttons</SectionSubTitle>
168
-
169
- <Flex direction="horizontal" gap="x6">
170
- <Flex grow initial="none">
171
- <Card direction="vertical" margin="x4">
172
- <CardContent grow padding="x6">
173
- <ProgressBitbot textColor="grape-3" />
174
- </CardContent>
175
-
176
- <CardDivider />
177
-
178
- <CardButton level="primary">
179
- <Text>Primary</Text>
180
- <Icon name="ArrowForward" />
181
- </CardButton>
182
- </Card>
183
- </Flex>
184
-
185
- <Flex grow initial="none">
186
- <Card direction="vertical" margin="x4">
187
- <CardContent grow padding="x6">
188
- <ProgressBitbot textColor="grape-3" />
189
- </CardContent>
190
-
191
- <CardDivider />
192
-
193
- <CardButton level="secondary">
194
- <Text>Secondary</Text>
195
- <Icon name="ArrowForward" />
196
- </CardButton>
197
- </Card>
198
- </Flex>
199
-
200
- <Flex grow initial="none">
201
- <Card direction="vertical" margin="x4">
202
- <CardContent grow padding="x6">
203
- <ProgressBitbot textColor="grape-3" />
204
- </CardContent>
205
-
206
- <CardDivider />
207
-
208
- <CardButton level="tertiary">
209
- <Text>Tertiary</Text>
210
- <Icon name="ArrowForward" />
211
- </CardButton>
212
- </Card>
213
- </Flex>
214
- </Flex>
215
- </Flex>
216
-
217
- <Flex margin="x12">
218
- <SectionSubTitle>Horizontally Divided Buttons</SectionSubTitle>
219
-
220
- <Card direction="horizontal" margin="x4">
221
- <CardContent grow padding="x6">
222
- <Text size="2" textColor="gray-5" uppercase weight="bold">
223
- Primary
224
- </Text>
225
- </CardContent>
226
-
227
- <CardDivider />
228
-
229
- <CardButton level="primary">
230
- <Icon name="ArrowForward" />
231
- </CardButton>
232
- </Card>
233
-
234
- <Card direction="horizontal" margin="x4">
235
- <CardContent grow padding="x6">
236
- <Text size="2" textColor="gray-5" uppercase weight="bold">
237
- Secondary
238
- </Text>
239
- </CardContent>
240
-
241
- <CardDivider />
242
-
243
- <CardButton level="secondary">
244
- <Icon name="ArrowForward" />
245
- </CardButton>
246
- </Card>
247
-
248
- <Card direction="horizontal" margin="x4">
249
- <CardContent grow padding="x6">
250
- <Text size="2" textColor="gray-5" uppercase weight="bold">
251
- Tertiary
252
- </Text>
253
- </CardContent>
254
-
255
- <CardDivider />
256
-
257
- <CardButton level="tertiary">
258
- <Icon name="ArrowForward" />
259
- </CardButton>
260
- </Card>
261
- </Flex>
262
-
263
- <CodeBlock title="Card with CardButton">{`const VerticalDividedComponent = () => (
264
- <Card direction="vertical">
265
- <CardContent padding="x6">...</CardContent>
266
- <CardDivider />
267
- <CardButton level="primary">Action</CardButton>
268
- </Card>
269
- );`}</CodeBlock>
270
- </>
271
- )}
272
- </Section>
273
- );
274
- };
275
-
276
- export default SectionCards;
@@ -1,38 +0,0 @@
1
- import * as React from 'react';
2
- import { hooks, Checkbox, Flex } from '@bitrise/bitkit';
3
- import CodeBlock from '../../CodeBlock/CodeBlock';
4
- import Section from '../../Section/Section';
5
- import SectionSubTitle from '../../Section/SectionSubTitle';
6
-
7
- const { useMediaQuery } = hooks;
8
-
9
- const SectionFormElements = () => {
10
- const match = useMediaQuery(['896px']);
11
-
12
- return (
13
- <Section>
14
- <Flex direction={match('896px') ? 'horizontal' : 'vertical'} gap="x12" margin="x12">
15
- <Flex grow initial={match('896px') ? 'none' : 'content'}>
16
- <SectionSubTitle>Checked Checkbox</SectionSubTitle>
17
- <Checkbox defaultChecked>Checkbox label</Checkbox>
18
- </Flex>
19
-
20
- <Flex grow initial={match('896px') ? 'none' : 'content'}>
21
- <SectionSubTitle>Unchecked Checkbox</SectionSubTitle>
22
- <Checkbox>Checkbox label</Checkbox>
23
- </Flex>
24
-
25
- <Flex grow initial={match('896px') ? 'none' : 'content'}>
26
- <SectionSubTitle>Disabled Checkbox</SectionSubTitle>
27
- <Checkbox disabled>Checkbox label</Checkbox>
28
- </Flex>
29
- </Flex>
30
-
31
- <CodeBlock title="Checkbox usage example">{`const Component = () => (
32
- <Checkbox>Checkbox label</Checkbox>
33
- );`}</CodeBlock>
34
- </Section>
35
- );
36
- };
37
-
38
- export default SectionFormElements;
@@ -1,82 +0,0 @@
1
- import * as React from 'react';
2
- import { DateTime } from 'luxon';
3
- import { Button, Buttons, DatePicker, Icon, Text } from '@bitrise/bitkit';
4
- import CodeBlock from '../../CodeBlock/CodeBlock';
5
- import Section from '../../Section/Section';
6
-
7
- const { useState } = React;
8
-
9
- const dateSelectableFrom = DateTime.local().minus({ months: 2 }).toMillis();
10
- const dateSelectableTo = DateTime.local().plus({ days: 5 }).toMillis();
11
-
12
- const SectionDatePicker = () => {
13
- const [dateSelectedFrom, setDateSelectedFrom] = useState();
14
- const [dateSelectedTo, setDateSelectedTo] = useState();
15
- const [visible, setVisible] = useState(false);
16
-
17
- const handleClose = () => setVisible(false);
18
- const handleOpen = () => setVisible(true);
19
- const handleApply = (dateSelectedFrom?: number, dateSelectedTo?: number) => {
20
- setDateSelectedFrom(dateSelectedFrom);
21
- setDateSelectedTo(dateSelectedTo);
22
- };
23
-
24
- return (
25
- <Section>
26
- <Buttons>
27
- <DatePicker
28
- dateSelectableFrom={dateSelectableFrom}
29
- dateSelectableTo={dateSelectableTo}
30
- dateSelectedFrom={dateSelectedFrom}
31
- dateSelectedTo={dateSelectedTo}
32
- onApply={handleApply}
33
- onClose={handleClose}
34
- visible={visible}
35
- >
36
- {({ ref }) => (
37
- <Button innerRef={ref} level="primary" onClick={handleOpen}>
38
- <Icon name="Calendar" />
39
- <Text>
40
- {!dateSelectedFrom && 'Select a Date'}
41
- {dateSelectedFrom && DateTime.fromMillis(dateSelectedFrom).toFormat('dd MMM')}
42
- {dateSelectedTo && `- ${DateTime.fromMillis(dateSelectedTo).toFormat('dd MMM yyyy')}`}
43
- </Text>
44
- </Button>
45
- )}
46
- </DatePicker>
47
- </Buttons>
48
-
49
- <CodeBlock title="DatePicker usage example">{`const Component = () => {
50
- const [dateSelectedFrom, setDateSelectedFrom] = useState();
51
- const [dateSelectedTo, setDateSelectedTo] = useState();
52
- const [visible, setVisible] = useState(false);
53
-
54
- return (
55
- <DatePicker
56
- dateSelectableFrom={ ${dateSelectableFrom} }
57
- dateSelectableTo={ ${dateSelectableTo} }
58
- dateSelectedFrom={ dateSelectedFrom }
59
- dateSelectedTo={ dateSelectedTo }
60
- onApply={ (dateSelectedFrom?: number, dateSelectedTo?: number) => {
61
- setDateSelectedFrom(dateSelectedFrom);
62
- setDateSelectedTo(dateSelectedTo);
63
- } }
64
- onClose={ () => setVisible(false) }
65
- visible={ visible }>
66
- { ({ ref }) => (
67
- <Button
68
- innerRef={ ref }
69
- level="primary"
70
- onClick={ () => setVisible(true) }>
71
- <Icon name="Calendar" />
72
- <Text>Select a Date</Text>
73
- </Button>
74
- ) }
75
- </DatePicker>
76
- );
77
- }`}</CodeBlock>
78
- </Section>
79
- );
80
- };
81
-
82
- export default SectionDatePicker;
@@ -1,31 +0,0 @@
1
- import * as React from 'react';
2
- import { Divider } from '@bitrise/bitkit';
3
- import CodeBlock from '../../CodeBlock/CodeBlock';
4
- import Section from '../../Section/Section';
5
-
6
- const SectionDivider = () => {
7
- return (
8
- <Section>
9
- <Divider color="grape-5" direction="horizontal" margin="x1" />
10
- <Divider color="grape-4" direction="horizontal" margin="x1" />
11
- <Divider color="grape-3" direction="horizontal" margin="x1" />
12
- <Divider color="grape-2" direction="horizontal" margin="x1" />
13
- <Divider color="grape-1" direction="horizontal" margin="x1" />
14
-
15
- <Divider color="gray-1" direction="horizontal" margin="x1" />
16
- <Divider color="gray-2" direction="horizontal" margin="x1" />
17
- <Divider color="gray-3" direction="horizontal" margin="x1" />
18
- <Divider color="gray-4" direction="horizontal" margin="x1" />
19
- <Divider color="gray-5" direction="horizontal" margin="x1" />
20
- <Divider color="gray-6" direction="horizontal" margin="x1" />
21
- <Divider color="gray-7" direction="horizontal" margin="x1" />
22
- <Divider color="gray-8" direction="horizontal" margin="x1" />
23
-
24
- <CodeBlock title="Divider Usage Example">{`const Component = () => (
25
- <Divider color="gray-1" direction="horizontal" margin="x1" width="0.125rem" />
26
- );`}</CodeBlock>
27
- </Section>
28
- );
29
- };
30
-
31
- export default SectionDivider;
@@ -1,27 +0,0 @@
1
- import * as React from 'react';
2
- import shuffle from 'lodash.shuffle';
3
- import { variables, Dot, Flex, Grid, TypeColors } from '@bitrise/bitkit';
4
- import CodeBlock from '../../CodeBlock/CodeBlock';
5
- import Section from '../../Section/Section';
6
-
7
- const colors = shuffle(Object.entries(variables.colorMap));
8
-
9
- const SectionDot = () => {
10
- return (
11
- <Section>
12
- <Grid alignChildren="middle" gap="x2" repeatWidthMin="4em">
13
- {colors.map(([name]) => (
14
- <Flex alignChildren="middle" borderRadius="x1" direction="vertical" key={name} padding="x2" title={name}>
15
- <Dot backgroundColor={name as TypeColors} size="0.5rem" />
16
- </Flex>
17
- ))}
18
- </Grid>
19
-
20
- <CodeBlock title="Dot Usage Example">{`const Component = () => (
21
- <Dot backgroundColor="grape-3" size="0.5rem" />
22
- );`}</CodeBlock>
23
- </Section>
24
- );
25
- };
26
-
27
- export default SectionDot;