@platformatic/ui-components 0.1.48 → 0.1.50

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 (152) hide show
  1. package/.github/workflows/ci.yml +26 -26
  2. package/.nvmrc +1 -1
  3. package/LICENSE +201 -201
  4. package/README.md +30 -30
  5. package/fonts/Montserrat/README.txt +81 -81
  6. package/index.html +12 -12
  7. package/index.js +71 -71
  8. package/package.json +76 -76
  9. package/postcss.config.cjs +8 -8
  10. package/public/api-icon-closed.svg +6 -6
  11. package/public/api-icon.svg +9 -9
  12. package/src/App.jsx +12 -12
  13. package/src/components/BorderedBox.jsx +18 -18
  14. package/src/components/BorderedBox.module.css +8 -8
  15. package/src/components/BorderedText.jsx +8 -8
  16. package/src/components/BorderedText.module.css +2 -2
  17. package/src/components/Box.jsx +14 -14
  18. package/src/components/Box.module.css +7 -7
  19. package/src/components/Button.jsx +95 -95
  20. package/src/components/Button.module.css +127 -127
  21. package/src/components/ButtonFullRounded.jsx +17 -17
  22. package/src/components/ButtonFullRounded.module.css +28 -28
  23. package/src/components/Checkbox.jsx +11 -11
  24. package/src/components/Checkbox.module.css +18 -18
  25. package/src/components/Common.module.css +28 -28
  26. package/src/components/DetailedMetric.jsx +32 -32
  27. package/src/components/DetailedMetric.module.css +2 -2
  28. package/src/components/DropDown.jsx +36 -36
  29. package/src/components/DropDown.module.css +27 -27
  30. package/src/components/FollowUs.jsx +35 -35
  31. package/src/components/FollowUs.module.css +11 -11
  32. package/src/components/GHLoginButton.jsx +14 -14
  33. package/src/components/HorizontalSeparator.jsx +15 -15
  34. package/src/components/HorizontalSeparator.module.css +26 -26
  35. package/src/components/InfoBox.jsx +50 -50
  36. package/src/components/InfoBox.module.css +5 -5
  37. package/src/components/List.jsx +20 -20
  38. package/src/components/List.module.css +11 -11
  39. package/src/components/ListElement.jsx +23 -23
  40. package/src/components/ListElement.module.css +23 -23
  41. package/src/components/Loadable.jsx +34 -34
  42. package/src/components/Loadable.module.css +13 -13
  43. package/src/components/Loader.jsx +22 -22
  44. package/src/components/Loader.module.css +13 -13
  45. package/src/components/LoginButton.jsx +17 -17
  46. package/src/components/LoginButton.module.css +7 -7
  47. package/src/components/LoginButton.test.jsx +25 -25
  48. package/src/components/Logo.jsx +62 -62
  49. package/src/components/Logo.module.css +5 -5
  50. package/src/components/Main.jsx +33 -33
  51. package/src/components/MetricValue.jsx +15 -15
  52. package/src/components/MetricValue.module.css +9 -9
  53. package/src/components/Modal.jsx +93 -93
  54. package/src/components/Modal.module.css +50 -50
  55. package/src/components/PlatformaticIcon.jsx +57 -57
  56. package/src/components/PlatformaticIcon.module.css +2 -2
  57. package/src/components/Playground.jsx +9 -9
  58. package/src/components/SearchBar.jsx +63 -63
  59. package/src/components/SearchBar.module.css +20 -20
  60. package/src/components/Sidebar.jsx +153 -153
  61. package/src/components/Sidebar.module.css +66 -66
  62. package/src/components/SimpleMetric.jsx +28 -28
  63. package/src/components/SimpleMetric.module.css +6 -6
  64. package/src/components/Status.jsx +26 -26
  65. package/src/components/TabbedWindow.jsx +39 -39
  66. package/src/components/TabbedWindow.module.css +16 -16
  67. package/src/components/TextWithLabel.jsx +11 -11
  68. package/src/components/TextWithLabel.module.css +8 -8
  69. package/src/components/Versions.jsx +9 -9
  70. package/src/components/VerticalSeparator.jsx +5 -5
  71. package/src/components/forms/Field.jsx +53 -20
  72. package/src/components/forms/Field.module.css +23 -17
  73. package/src/components/forms/Input.jsx +80 -87
  74. package/src/components/forms/Input.module.css +28 -28
  75. package/src/components/forms/Preview.jsx +75 -77
  76. package/src/components/forms/Preview.module.css +14 -14
  77. package/src/components/forms/ToggleSwitch.jsx +18 -18
  78. package/src/components/forms/ToggleSwitch.module.css +42 -42
  79. package/src/components/forms/index.js +8 -8
  80. package/src/components/icons/ApiEmptyIcon.jsx +107 -107
  81. package/src/components/icons/ApiIcon.jsx +29 -29
  82. package/src/components/icons/ApiIconClosed.jsx +19 -19
  83. package/src/components/icons/AppEmptyIcon.jsx +94 -94
  84. package/src/components/icons/AppIcon.jsx +38 -38
  85. package/src/components/icons/AppListIcon.jsx +73 -73
  86. package/src/components/icons/Calendar1Icon.jsx +54 -54
  87. package/src/components/icons/Calendar7Icon.jsx +55 -55
  88. package/src/components/icons/CalendarIcon.jsx +56 -56
  89. package/src/components/icons/CircleAddIcon.jsx +40 -40
  90. package/src/components/icons/CircleBackIcon.jsx +51 -51
  91. package/src/components/icons/CircleCheckMarkIcon.jsx +66 -0
  92. package/src/components/icons/CircleCloseHoverIcon.jsx +42 -42
  93. package/src/components/icons/CircleCloseIcon.jsx +32 -32
  94. package/src/components/icons/CircleExclamationIcon.jsx +29 -29
  95. package/src/components/icons/CloseIcon.jsx +31 -31
  96. package/src/components/icons/CopyIcon.jsx +75 -46
  97. package/src/components/icons/CreatedWorkspaceIcon.jsx +70 -70
  98. package/src/components/icons/DynamicWorkspaceIcon.jsx +125 -125
  99. package/src/components/icons/EditIcon.jsx +38 -0
  100. package/src/components/icons/GearIcon.jsx +40 -40
  101. package/src/components/icons/Icons.module.css +29 -29
  102. package/src/components/icons/LiveIcon.jsx +43 -43
  103. package/src/components/icons/MetricsIcon.jsx +52 -52
  104. package/src/components/icons/PlayIcon.jsx +20 -20
  105. package/src/components/icons/PullRequestIcon.jsx +35 -35
  106. package/src/components/icons/StaticWorkspaceIcon.jsx +119 -119
  107. package/src/components/icons/StopIcon.jsx +21 -21
  108. package/src/components/icons/TerminalIcon.jsx +22 -22
  109. package/src/components/icons/TriangleExclamationIcon.jsx +26 -26
  110. package/src/components/icons/UpgradeIcon.jsx +48 -48
  111. package/src/components/icons/index.js +63 -59
  112. package/src/components/layouts/Layout.jsx +11 -11
  113. package/src/components/layouts/TwoColumnsLayout.jsx +12 -12
  114. package/src/components/layouts/TwoColumnsLayout.module.css +9 -9
  115. package/src/hooks/useEscapeKey.js +20 -20
  116. package/src/lib/utils.js +23 -23
  117. package/src/main.jsx +9 -9
  118. package/src/stories/BorderedBox.stories.jsx +33 -33
  119. package/src/stories/BorderedText.stories.jsx +24 -24
  120. package/src/stories/Button.stories.jsx +114 -114
  121. package/src/stories/ButtonFullRounded.stories.jsx +61 -61
  122. package/src/stories/Checkbox.stories.jsx +27 -27
  123. package/src/stories/DetailedMetric.stories.jsx +33 -33
  124. package/src/stories/DropDown.stories.jsx +62 -62
  125. package/src/stories/FollowUs.stories.jsx +14 -14
  126. package/src/stories/GHLoginButton.stories.jsx +14 -14
  127. package/src/stories/HorizontalSeparator.stories.jsx +12 -12
  128. package/src/stories/InfoBox.stories.jsx +46 -46
  129. package/src/stories/Introduction.stories.mdx +211 -211
  130. package/src/stories/List.stories.jsx +29 -29
  131. package/src/stories/ListElement.stories.jsx +15 -15
  132. package/src/stories/Loadable.stories.jsx +75 -75
  133. package/src/stories/Loader.stories.jsx +44 -44
  134. package/src/stories/LoginButton.stories.jsx +15 -15
  135. package/src/stories/Logo.stories.jsx +17 -17
  136. package/src/stories/Modal.stories.jsx +100 -100
  137. package/src/stories/PlatformaticIcon.stories.jsx +51 -35
  138. package/src/stories/SearchBar.stories.jsx +28 -28
  139. package/src/stories/Sidebar.stories.jsx +61 -61
  140. package/src/stories/SimpleMetric.stories.jsx +41 -41
  141. package/src/stories/Status.stories.jsx +31 -31
  142. package/src/stories/TextWithLabel.stories.jsx +25 -25
  143. package/src/stories/TwoColumnsLayout.stories.jsx +42 -42
  144. package/src/stories/forms/Field.stories.jsx +89 -81
  145. package/src/stories/forms/Input.stories.jsx +89 -69
  146. package/src/stories/forms/Preview.stories.jsx +57 -57
  147. package/src/stories/forms/ToggleSwitch.stories.jsx +15 -15
  148. package/src/stories/icons/Icons.stories.jsx +74 -74
  149. package/src/styles/main.css +15 -15
  150. package/tailwind.config.cjs +60 -60
  151. package/vite.config.js +6 -6
  152. package/vitest.config.js +14 -14
@@ -1,69 +1,89 @@
1
- 'use strict'
2
- import React, { useState } from 'react'
3
- import Input from '../../components/forms/Input'
4
- import { faAdd, faCheckCircle } from '@fortawesome/free-solid-svg-icons'
5
-
6
- export default {
7
- title: 'Platformatic/Forms/Input',
8
- component: Input
9
- }
10
-
11
- const Template = (args) => <Input {...args} />
12
-
13
- export const Default = Template.bind({})
14
-
15
- Default.args = {
16
- name: 'test',
17
- placeholder: 'Platformatic'
18
- }
19
-
20
- const TemplateBorderMainDarkBlue = (args) => <div style={{ backgroundColor: 'white', padding: '2px' }}><Input {...args} /></div>
21
-
22
- export const BorderMainDarkBlue = TemplateBorderMainDarkBlue.bind({})
23
-
24
- BorderMainDarkBlue.args = {
25
- name: 'test',
26
- placeholder: 'Platformatic',
27
- borderColor: 'main-dark-blue'
28
- }
29
-
30
- export const DefaultInvalid = Template.bind({})
31
-
32
- DefaultInvalid.args = {
33
- name: 'test',
34
- placeholder: 'Platformatic',
35
- borderColor: 'main-dark-blue',
36
- errorMessage: 'This is an error message'
37
- }
38
-
39
- const TemplateValuedAndAlertChange = (args) => {
40
- const [value, setValue] = useState('Initial value')
41
-
42
- function handleChange (event) {
43
- setValue(event.target.value)
44
- }
45
-
46
- return (
47
- <>
48
- <p>Value of the input {value}</p>
49
- <Input {...args} value={value} onChange={handleChange} />
50
- </>
51
- )
52
- }
53
-
54
- export const ValuedAndAlertChange = TemplateValuedAndAlertChange.bind({})
55
-
56
- ValuedAndAlertChange.args = {
57
- name: 'test',
58
- placeholder: 'Platformatic'
59
- }
60
-
61
- export const IconBeforeAndAfter = Template.bind({})
62
-
63
- IconBeforeAndAfter.args = {
64
- name: 'test',
65
- placeholder: 'Platformatic',
66
- beforeInputIcon: faAdd,
67
- afterInputIcon: faCheckCircle,
68
- afterInputIconColor: 'error-red'
69
- }
1
+ 'use strict'
2
+ import React, { useState } from 'react'
3
+ import Input from '../../components/forms/Input'
4
+
5
+ const divStyle = {
6
+ width: '100%',
7
+ height: 'auto',
8
+ padding: '20px',
9
+ backgroundColor: 'white'
10
+ }
11
+
12
+ export default {
13
+ title: 'Platformatic/Forms/Input',
14
+ component: Input,
15
+ decorators: [
16
+ (Story) => (
17
+ <div style={divStyle}>
18
+ <Story />
19
+ </div>
20
+ )
21
+ ]
22
+ }
23
+
24
+ const Template = (args) => <Input {...args} />
25
+
26
+ export const Default = Template.bind({})
27
+
28
+ Default.args = {
29
+ name: 'test',
30
+ placeholder: 'Platformatic'
31
+ }
32
+
33
+ const TemplateBorderMainDarkBlue = (args) => <div style={{ backgroundColor: 'white', padding: '2px' }}><Input {...args} /></div>
34
+
35
+ export const BorderMainDarkBlue = TemplateBorderMainDarkBlue.bind({})
36
+
37
+ BorderMainDarkBlue.args = {
38
+ name: 'test',
39
+ placeholder: 'Platformatic',
40
+ borderColor: 'main-dark-blue'
41
+ }
42
+
43
+ export const DefaultInvalid = Template.bind({})
44
+
45
+ DefaultInvalid.args = {
46
+ name: 'test',
47
+ placeholder: 'Platformatic',
48
+ borderColor: 'main-dark-blue',
49
+ errorMessage: 'This is an error message'
50
+ }
51
+
52
+ const TemplateValuedAndAlertChange = (args) => {
53
+ const [value, setValue] = useState('Initial value')
54
+
55
+ function handleChange (event) {
56
+ setValue(event.target.value)
57
+ }
58
+
59
+ return (
60
+ <>
61
+ <p>Value of the input {value}</p>
62
+ <Input {...args} value={value} onChange={handleChange} />
63
+ </>
64
+ )
65
+ }
66
+
67
+ export const ValuedAndAlertChange = TemplateValuedAndAlertChange.bind({})
68
+
69
+ ValuedAndAlertChange.args = {
70
+ name: 'test',
71
+ placeholder: 'Platformatic'
72
+ }
73
+
74
+ export const IconBeforeAndAfter = Template.bind({})
75
+
76
+ IconBeforeAndAfter.args = {
77
+ name: 'test',
78
+ placeholder: 'Platformatic',
79
+ beforeIcon: {
80
+ iconName: 'CopyIcon',
81
+ color: 'main-dark-blue',
82
+ size: 'small',
83
+ onClick: () => { alert('clicked') }
84
+ },
85
+ afterIcon: {
86
+ iconName: 'CircleAddIcon',
87
+ color: 'red'
88
+ }
89
+ }
@@ -1,57 +1,57 @@
1
- 'use strict'
2
- import Preview from '../../components/forms/Preview'
3
-
4
- const divStyle = {
5
- width: '100%',
6
- height: 'auto',
7
- padding: '10px',
8
- backgroundColor: 'white'
9
- }
10
-
11
- export default {
12
- title: 'Platformatic/Forms/Preview',
13
- component: Preview,
14
- decorators: [
15
- (Story) => (
16
- <div style={divStyle}>
17
- <Story />
18
- </div>
19
- )
20
- ]
21
- }
22
-
23
- const Template = (args) => <Preview {...args} />
24
-
25
- export const NormalPreview = Template.bind({})
26
-
27
- NormalPreview.args = {
28
- title: 'My title',
29
- value: 'My value'
30
- }
31
-
32
- export const WithLink = Template.bind({})
33
-
34
- WithLink.args = {
35
- title: 'My value is a link',
36
- value: 'https://example.com',
37
- isLink: true
38
- }
39
-
40
- const TemplateWithChildren = (args) => <Preview {...args}><p>1st paragraph</p><p>2nd paragraph</p></Preview>
41
-
42
- export const WithChildren = TemplateWithChildren.bind({})
43
-
44
- WithChildren.args = {
45
- title: 'My title',
46
- value: 'My value'
47
- }
48
-
49
- export const WithIcon = Template.bind({})
50
-
51
- WithIcon.args = {
52
- title: 'My title',
53
- value: 'My value',
54
- afterValueIcon: 'StaticWorkspaceIcon',
55
- afterValueIconColor: 'green',
56
- onClickAfterValueIcon: () => alert('icon clicked')
57
- }
1
+ 'use strict'
2
+ import Preview from '../../components/forms/Preview'
3
+
4
+ const divStyle = {
5
+ width: '100%',
6
+ height: 'auto',
7
+ padding: '10px',
8
+ backgroundColor: 'white'
9
+ }
10
+
11
+ export default {
12
+ title: 'Platformatic/Forms/Preview',
13
+ component: Preview,
14
+ decorators: [
15
+ (Story) => (
16
+ <div style={divStyle}>
17
+ <Story />
18
+ </div>
19
+ )
20
+ ]
21
+ }
22
+
23
+ const Template = (args) => <Preview {...args} />
24
+
25
+ export const NormalPreview = Template.bind({})
26
+
27
+ NormalPreview.args = {
28
+ title: 'My title',
29
+ value: 'My value'
30
+ }
31
+
32
+ export const WithLink = Template.bind({})
33
+
34
+ WithLink.args = {
35
+ title: 'My value is a link',
36
+ value: 'https://example.com',
37
+ isLink: true
38
+ }
39
+
40
+ const TemplateWithChildren = (args) => <Preview {...args}><p>1st paragraph</p><p>2nd paragraph</p></Preview>
41
+
42
+ export const WithChildren = TemplateWithChildren.bind({})
43
+
44
+ WithChildren.args = {
45
+ title: 'My title',
46
+ value: 'My value'
47
+ }
48
+
49
+ export const WithIcon = Template.bind({})
50
+
51
+ WithIcon.args = {
52
+ title: 'My title',
53
+ value: 'My value',
54
+ afterValueIcon: 'StaticWorkspaceIcon',
55
+ afterValueIconColor: 'green',
56
+ onClickAfterValueIcon: () => alert('icon clicked')
57
+ }
@@ -1,15 +1,15 @@
1
- 'use strict'
2
- import ToggleSwitch from '../../components/forms/ToggleSwitch'
3
- export default {
4
- title: 'Platformatic/Forms/ToggleSwitch',
5
- component: ToggleSwitch
6
- }
7
-
8
- const Template = (args) => <ToggleSwitch {...args} />
9
-
10
- export const Default = Template.bind({})
11
-
12
- Default.args = {
13
- name: 'test',
14
- label: 'This is a label'
15
- }
1
+ 'use strict'
2
+ import ToggleSwitch from '../../components/forms/ToggleSwitch'
3
+ export default {
4
+ title: 'Platformatic/Forms/ToggleSwitch',
5
+ component: ToggleSwitch
6
+ }
7
+
8
+ const Template = (args) => <ToggleSwitch {...args} />
9
+
10
+ export const Default = Template.bind({})
11
+
12
+ Default.args = {
13
+ name: 'test',
14
+ label: 'This is a label'
15
+ }
@@ -1,74 +1,74 @@
1
- import React from 'react'
2
- import PullRequestIcon from '../../components/icons/PullRequestIcon'
3
- import CloseIcon from '../../components/icons/CloseIcon'
4
- import CircleCloseIcon from '../../components/icons/CircleCloseIcon'
5
- import TriangleExclamationIcon from '../../components/icons/TriangleExclamationIcon'
6
- import StaticWorkspaceIcon from '../../components/icons/StaticWorkspaceIcon'
7
- import CreatedWorkspaceIcon from '../../components/icons/CreatedWorkspaceIcon'
8
- import UpgradeIcon from '../../components/icons/UpgradeIcon'
9
- import DynamicWorkspaceIcon from '../../components/icons/DynamicWorkspaceIcon'
10
-
11
- const divStyle = {
12
- display: 'flex',
13
- width: '100%',
14
- minHeight: '400px',
15
- gap: '10px',
16
- backgroundColor: 'white'
17
- }
18
-
19
- export default {
20
- title: 'Platformatic/Icons',
21
- component: PullRequestIcon,
22
- decorators: [
23
- (Story) => (
24
- <div style={divStyle}>
25
- <Story />
26
- </div>
27
- )
28
- ],
29
- argTypes: {
30
- color: {
31
- type: 'string',
32
- control: {
33
- type: 'radio',
34
- options: ['green', 'white', 'red']
35
- }
36
- }
37
- }
38
- }
39
-
40
- const PullRequestIconTemplate = (args) => <PullRequestIcon {...args} />
41
- export const PullRequestIconDefault = PullRequestIconTemplate.bind({})
42
- PullRequestIconDefault.args = {}
43
-
44
- const CloseIconTemplate = (args) => <CloseIcon {...args} />
45
- export const CloseIconDefault = CloseIconTemplate.bind({})
46
- CloseIconDefault.args = {}
47
-
48
- const CircleCloseIconTemplate = (args) => <CircleCloseIcon {...args} />
49
- export const CircleCloseIconDefault = CircleCloseIconTemplate.bind({})
50
- CircleCloseIconDefault.args = {}
51
-
52
- const TriangleExclamationIconTemplate = (args) => <TriangleExclamationIcon {...args} />
53
- export const TriangleExclamationIconDefault = TriangleExclamationIconTemplate.bind({})
54
- TriangleExclamationIconDefault.args = {}
55
-
56
- const WorkspaceIconsTemplate = () => (
57
- [<StaticWorkspaceIcon key='a' />, <DynamicWorkspaceIcon key='b' />].map((component, index) => {
58
- const listElement = []
59
- listElement.push(React.cloneElement(component, { key: `0${index}` }))
60
- listElement.push(React.cloneElement(component, { key: `1${index}`, size: 'small', color: 'green' }))
61
- listElement.push(React.cloneElement(component, { key: `2${index}`, color: 'red' }))
62
- listElement.push(React.cloneElement(component, { key: `3${index}`, size: 'small', color: 'red' }))
63
- listElement.push(React.cloneElement(component, { key: `4${index}`, color: 'main-dark-blue' }))
64
- listElement.push(React.cloneElement(component, { key: `5${index}`, size: 'small', color: 'main-dark-blue' }))
65
- return listElement
66
- })
67
- )
68
-
69
- export const WorkspaceIconsAll = WorkspaceIconsTemplate.bind({})
70
- WorkspaceIconsAll.args = {}
71
-
72
- const LargeIconsTemplate = () => ([<CreatedWorkspaceIcon key='a' size='extra-large' />, <UpgradeIcon key='b' size='extra-large' />].map(component => component))
73
- export const LargeIconsDefault = LargeIconsTemplate.bind({})
74
- LargeIconsDefault.args = {}
1
+ import React from 'react'
2
+ import PullRequestIcon from '../../components/icons/PullRequestIcon'
3
+ import CloseIcon from '../../components/icons/CloseIcon'
4
+ import CircleCloseIcon from '../../components/icons/CircleCloseIcon'
5
+ import TriangleExclamationIcon from '../../components/icons/TriangleExclamationIcon'
6
+ import StaticWorkspaceIcon from '../../components/icons/StaticWorkspaceIcon'
7
+ import CreatedWorkspaceIcon from '../../components/icons/CreatedWorkspaceIcon'
8
+ import UpgradeIcon from '../../components/icons/UpgradeIcon'
9
+ import DynamicWorkspaceIcon from '../../components/icons/DynamicWorkspaceIcon'
10
+
11
+ const divStyle = {
12
+ display: 'flex',
13
+ width: '100%',
14
+ minHeight: '400px',
15
+ gap: '10px',
16
+ backgroundColor: 'white'
17
+ }
18
+
19
+ export default {
20
+ title: 'Platformatic/Icons',
21
+ component: PullRequestIcon,
22
+ decorators: [
23
+ (Story) => (
24
+ <div style={divStyle}>
25
+ <Story />
26
+ </div>
27
+ )
28
+ ],
29
+ argTypes: {
30
+ color: {
31
+ type: 'string',
32
+ control: {
33
+ type: 'radio',
34
+ options: ['green', 'white', 'red']
35
+ }
36
+ }
37
+ }
38
+ }
39
+
40
+ const PullRequestIconTemplate = (args) => <PullRequestIcon {...args} />
41
+ export const PullRequestIconDefault = PullRequestIconTemplate.bind({})
42
+ PullRequestIconDefault.args = {}
43
+
44
+ const CloseIconTemplate = (args) => <CloseIcon {...args} />
45
+ export const CloseIconDefault = CloseIconTemplate.bind({})
46
+ CloseIconDefault.args = {}
47
+
48
+ const CircleCloseIconTemplate = (args) => <CircleCloseIcon {...args} />
49
+ export const CircleCloseIconDefault = CircleCloseIconTemplate.bind({})
50
+ CircleCloseIconDefault.args = {}
51
+
52
+ const TriangleExclamationIconTemplate = (args) => <TriangleExclamationIcon {...args} />
53
+ export const TriangleExclamationIconDefault = TriangleExclamationIconTemplate.bind({})
54
+ TriangleExclamationIconDefault.args = {}
55
+
56
+ const WorkspaceIconsTemplate = () => (
57
+ [<StaticWorkspaceIcon key='a' />, <DynamicWorkspaceIcon key='b' />].map((component, index) => {
58
+ const listElement = []
59
+ listElement.push(React.cloneElement(component, { key: `0${index}` }))
60
+ listElement.push(React.cloneElement(component, { key: `1${index}`, size: 'small', color: 'green' }))
61
+ listElement.push(React.cloneElement(component, { key: `2${index}`, color: 'red' }))
62
+ listElement.push(React.cloneElement(component, { key: `3${index}`, size: 'small', color: 'red' }))
63
+ listElement.push(React.cloneElement(component, { key: `4${index}`, color: 'main-dark-blue' }))
64
+ listElement.push(React.cloneElement(component, { key: `5${index}`, size: 'small', color: 'main-dark-blue' }))
65
+ return listElement
66
+ })
67
+ )
68
+
69
+ export const WorkspaceIconsAll = WorkspaceIconsTemplate.bind({})
70
+ WorkspaceIconsAll.args = {}
71
+
72
+ const LargeIconsTemplate = () => ([<CreatedWorkspaceIcon key='a' size='extra-large' />, <UpgradeIcon key='b' size='extra-large' />].map(component => component))
73
+ export const LargeIconsDefault = LargeIconsTemplate.bind({})
74
+ LargeIconsDefault.args = {}
@@ -1,16 +1,16 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
4
-
5
- :root {
6
- @apply bg-main-dark-blue;
7
- font-family: 'Montserrat';
8
- }
9
- a {
10
- @apply text-tertiary-blue;
11
- }
12
-
13
- input {
14
- background-color: transparent;
15
-
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ :root {
6
+ @apply bg-main-dark-blue;
7
+ font-family: 'Montserrat';
8
+ }
9
+ a {
10
+ @apply text-tertiary-blue;
11
+ }
12
+
13
+ input {
14
+ background-color: transparent;
15
+
16
16
  }
@@ -1,60 +1,60 @@
1
- /** @type {import('tailwindcss').Config} */
2
- module.exports = {
3
- content: ['./src/**/*.{html,jsx}'],
4
- theme: {
5
- container: {
6
- center: true
7
- },
8
- extend: {
9
- screens: {
10
- lg: '1440px'
11
- // => @media (min-width: 1440px) { ... }
12
- },
13
- boxShadow: {
14
- wrap: '0px 0px 20px rgba(0, 0, 0, 0.6)',
15
- 'main-green': '0px 0px 10px rgba(33, 250, 144, 0.5)',
16
- 'dark-green': '0px 0px 10px rgba(2, 120, 63, 1)',
17
- 'light-green': '0px 0px 10px rgba(33, 241, 144, 0.5)',
18
- 'main-dark-blue': '0px 0px 10px rgba(33, 250, 144, 0.5)',
19
- 'dark-blue': '0px 0px 10px rgba(0, 52, 79, 0.5)',
20
- 'light-blue': '0px 0px 10px rgba(233, 247, 255, 0.5)',
21
- 'error-red': '0px 0px 10px rgba(250, 33, 33, 0.5)',
22
- 'tertiary-blue': '0px 0px 10px rgba(37, 136, 228, 0.5)'
23
- }
24
- },
25
- colors: {
26
- 'main-green': '#21FA90',
27
- 'dark-green': '#02783F',
28
- 'light-green': '#21F190',
29
- 'main-dark-blue': '#00283D',
30
- 'dark-blue': '#00344F',
31
- 'light-blue': '#E9F7FF',
32
- white: '#FFFFFF',
33
- 'error-red': '#FA2121',
34
- 'tertiary-blue': '#2588E4',
35
- transparent: 'transparent'
36
- },
37
- fontFamily: {
38
- sans: ['Montserrat']
39
- },
40
- letterSpacing: {
41
- tighter: '-.05em',
42
- tight: '-.025em',
43
- normal: '0',
44
- wide: '.025em',
45
- wider: '.05em',
46
- widest: '.1em',
47
- 'more-widest': '.15em',
48
- 'super-widest': '.25em'
49
- }
50
- },
51
- safelist: [
52
- 'border-error-red',
53
- 'border-main-green',
54
- 'text-3xl',
55
- 'text-4xl',
56
- 'text-5xl',
57
- 'text-6xl'
58
- ],
59
- plugins: []
60
- }
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+ content: ['./src/**/*.{html,jsx}'],
4
+ theme: {
5
+ container: {
6
+ center: true
7
+ },
8
+ extend: {
9
+ screens: {
10
+ lg: '1440px'
11
+ // => @media (min-width: 1440px) { ... }
12
+ },
13
+ boxShadow: {
14
+ wrap: '0px 0px 20px rgba(0, 0, 0, 0.6)',
15
+ 'main-green': '0px 0px 10px rgba(33, 250, 144, 0.5)',
16
+ 'dark-green': '0px 0px 10px rgba(2, 120, 63, 1)',
17
+ 'light-green': '0px 0px 10px rgba(33, 241, 144, 0.5)',
18
+ 'main-dark-blue': '0px 0px 10px rgba(33, 250, 144, 0.5)',
19
+ 'dark-blue': '0px 0px 10px rgba(0, 52, 79, 0.5)',
20
+ 'light-blue': '0px 0px 10px rgba(233, 247, 255, 0.5)',
21
+ 'error-red': '0px 0px 10px rgba(250, 33, 33, 0.5)',
22
+ 'tertiary-blue': '0px 0px 10px rgba(37, 136, 228, 0.5)'
23
+ }
24
+ },
25
+ colors: {
26
+ 'main-green': '#21FA90',
27
+ 'dark-green': '#02783F',
28
+ 'light-green': '#21F190',
29
+ 'main-dark-blue': '#00283D',
30
+ 'dark-blue': '#00344F',
31
+ 'light-blue': '#E9F7FF',
32
+ white: '#FFFFFF',
33
+ 'error-red': '#FA2121',
34
+ 'tertiary-blue': '#2588E4',
35
+ transparent: 'transparent'
36
+ },
37
+ fontFamily: {
38
+ sans: ['Montserrat']
39
+ },
40
+ letterSpacing: {
41
+ tighter: '-.05em',
42
+ tight: '-.025em',
43
+ normal: '0',
44
+ wide: '.025em',
45
+ wider: '.05em',
46
+ widest: '.1em',
47
+ 'more-widest': '.15em',
48
+ 'super-widest': '.25em'
49
+ }
50
+ },
51
+ safelist: [
52
+ 'border-error-red',
53
+ 'border-main-green',
54
+ 'text-3xl',
55
+ 'text-4xl',
56
+ 'text-5xl',
57
+ 'text-6xl'
58
+ ],
59
+ plugins: []
60
+ }
package/vite.config.js CHANGED
@@ -1,6 +1,6 @@
1
- import { defineConfig } from 'vite'
2
- import react from '@vitejs/plugin-react'
3
- /** @type {import('vite').UserConfig} */
4
- export default defineConfig({
5
- plugins: [react()]
6
- })
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+ /** @type {import('vite').UserConfig} */
4
+ export default defineConfig({
5
+ plugins: [react()]
6
+ })
package/vitest.config.js CHANGED
@@ -1,14 +1,14 @@
1
- /// <reference types="vitest" />
2
-
3
- import { defineConfig } from 'vite'
4
- import react from '@vitejs/plugin-react'
5
-
6
- export default defineConfig({
7
- plugins: [react()],
8
- test: {
9
- globals: true,
10
- environment: 'happy-dom',
11
- exclude: ['node_modules']
12
- }
13
-
14
- })
1
+ /// <reference types="vitest" />
2
+
3
+ import { defineConfig } from 'vite'
4
+ import react from '@vitejs/plugin-react'
5
+
6
+ export default defineConfig({
7
+ plugins: [react()],
8
+ test: {
9
+ globals: true,
10
+ environment: 'happy-dom',
11
+ exclude: ['node_modules']
12
+ }
13
+
14
+ })