@platformatic/ui-components 0.1.31 → 0.1.33

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 (102) hide show
  1. package/.github/workflows/ci.yml +26 -26
  2. package/.nvmrc +1 -1
  3. package/LICENSE +201 -201
  4. package/README.md +26 -26
  5. package/dist/main.css +31 -18
  6. package/fonts/Montserrat/README.txt +81 -81
  7. package/index.html +12 -12
  8. package/index.js +58 -58
  9. package/package.json +76 -76
  10. package/postcss.config.cjs +8 -8
  11. package/public/api-icon-closed.svg +6 -6
  12. package/public/api-icon.svg +9 -9
  13. package/src/App.jsx +12 -12
  14. package/src/components/BorderedBox.jsx +16 -16
  15. package/src/components/BorderedBox.module.css +2 -2
  16. package/src/components/BorderedText.jsx +8 -8
  17. package/src/components/BorderedText.module.css +2 -2
  18. package/src/components/Box.jsx +14 -14
  19. package/src/components/Box.module.css +7 -7
  20. package/src/components/Button.jsx +23 -23
  21. package/src/components/Button.module.css +20 -20
  22. package/src/components/Common.module.css +7 -7
  23. package/src/components/DetailedMetric.jsx +32 -32
  24. package/src/components/DetailedMetric.module.css +2 -2
  25. package/src/components/DropDown.jsx +35 -35
  26. package/src/components/DropDown.module.css +22 -22
  27. package/src/components/FollowUs.jsx +35 -35
  28. package/src/components/FollowUs.module.css +11 -11
  29. package/src/components/GHLoginButton.jsx +14 -14
  30. package/src/components/HorizontalSeparator.jsx +9 -5
  31. package/src/components/Input.jsx +11 -11
  32. package/src/components/Input.module.css +7 -7
  33. package/src/components/List.jsx +20 -20
  34. package/src/components/List.module.css +11 -11
  35. package/src/components/ListElement.jsx +23 -23
  36. package/src/components/ListElement.module.css +23 -23
  37. package/src/components/Loadable.jsx +34 -34
  38. package/src/components/Loadable.module.css +13 -13
  39. package/src/components/LoginButton.jsx +17 -17
  40. package/src/components/LoginButton.module.css +7 -7
  41. package/src/components/LoginButton.test.jsx +25 -25
  42. package/src/components/Logo.jsx +58 -58
  43. package/src/components/Main.jsx +33 -33
  44. package/src/components/MetricValue.jsx +15 -15
  45. package/src/components/MetricValue.module.css +7 -7
  46. package/src/components/Modal.jsx +29 -29
  47. package/src/components/Modal.module.css +24 -24
  48. package/src/components/Playground.jsx +9 -9
  49. package/src/components/SearchBar.jsx +63 -33
  50. package/src/components/SearchBar.module.css +20 -5
  51. package/src/components/SimpleMetric.jsx +32 -32
  52. package/src/components/SimpleMetric.module.css +6 -6
  53. package/src/components/Status.jsx +26 -26
  54. package/src/components/TabbedWindow.jsx +34 -34
  55. package/src/components/TabbedWindow.module.css +16 -16
  56. package/src/components/TextWithLabel.jsx +11 -11
  57. package/src/components/TextWithLabel.module.css +8 -8
  58. package/src/components/Versions.jsx +9 -9
  59. package/src/components/VerticalSeparator.jsx +5 -5
  60. package/src/components/icons/ApiEmptyIcon.jsx +107 -0
  61. package/src/components/icons/ApiIcon.jsx +29 -29
  62. package/src/components/icons/ApiIconClosed.jsx +19 -19
  63. package/src/components/icons/CloseModalIcon.jsx +26 -26
  64. package/src/components/icons/PullRequestIcon.jsx +31 -31
  65. package/src/components/icons/index.js +9 -8
  66. package/src/components/layouts/Layout.jsx +11 -11
  67. package/src/components/layouts/TwoColumnsLayout.jsx +12 -12
  68. package/src/components/layouts/TwoColumnsLayout.module.css +9 -9
  69. package/src/hooks/useEscapeKey.js +20 -20
  70. package/src/lib/utils.js +23 -23
  71. package/src/main.jsx +9 -9
  72. package/src/stories/BorderedBox.stories.jsx +33 -33
  73. package/src/stories/BorderedText.stories.jsx +24 -24
  74. package/src/stories/Button.stories.jsx +107 -107
  75. package/src/stories/DetailedMetric.stories.jsx +33 -33
  76. package/src/stories/DropDown.stories.jsx +62 -62
  77. package/src/stories/FollowUs.stories.jsx +14 -14
  78. package/src/stories/GHLoginButton.stories.jsx +14 -14
  79. package/src/stories/HorizontalSeparator.stories.jsx +12 -12
  80. package/src/stories/Input.stories.jsx +15 -15
  81. package/src/stories/Introduction.stories.mdx +211 -211
  82. package/src/stories/List.stories.jsx +29 -29
  83. package/src/stories/ListElement.stories.jsx +15 -15
  84. package/src/stories/Loadable.stories.jsx +75 -75
  85. package/src/stories/LoginButton.stories.jsx +15 -15
  86. package/src/stories/Logo.stories.jsx +17 -17
  87. package/src/stories/Modal.stories.jsx +65 -65
  88. package/src/stories/SearchBar.stories.jsx +28 -27
  89. package/src/stories/SimpleMetric.stories.jsx +41 -41
  90. package/src/stories/Status.stories.jsx +31 -31
  91. package/src/stories/TextWithLabel.stories.jsx +25 -25
  92. package/src/stories/TwoColumnsLayout.stories.jsx +42 -42
  93. package/src/styles/main.css +15 -15
  94. package/tailwind.config.cjs +37 -37
  95. package/vite.config.js +6 -6
  96. package/vitest.config.js +14 -14
  97. package/dist/api-icon-closed.svg +0 -6
  98. package/dist/api-icon.svg +0 -9
  99. package/dist/assets/index.5ac5acb7.js +0 -797
  100. package/dist/assets/index.d3f5882c.css +0 -1
  101. package/dist/index.html +0 -14
  102. package/dist/vite.svg +0 -1
@@ -1,25 +1,25 @@
1
- 'use strict'
2
-
3
- import TextWithLabel from '../components/TextWithLabel'
4
- export default {
5
- title: 'Platformatic/TextWithLabel',
6
- component: TextWithLabel,
7
- argTypes: {
8
- label: { control: 'text' },
9
- text: { control: 'text' }
10
- }
11
- }
12
- const Template = (args) => <TextWithLabel {...args} />
13
-
14
- export const Standard = Template.bind({})
15
-
16
- Standard.args = {
17
- label: 'Created By',
18
- text: 'Platformatic Team'
19
- }
20
-
21
- export const WithLink = (args) => <TextWithLabel {...args}><a href='https://example.com'>Standard Link</a></TextWithLabel>
22
-
23
- WithLink.args = {
24
- label: 'External Link'
25
- }
1
+ 'use strict'
2
+
3
+ import TextWithLabel from '../components/TextWithLabel'
4
+ export default {
5
+ title: 'Platformatic/TextWithLabel',
6
+ component: TextWithLabel,
7
+ argTypes: {
8
+ label: { control: 'text' },
9
+ text: { control: 'text' }
10
+ }
11
+ }
12
+ const Template = (args) => <TextWithLabel {...args} />
13
+
14
+ export const Standard = Template.bind({})
15
+
16
+ Standard.args = {
17
+ label: 'Created By',
18
+ text: 'Platformatic Team'
19
+ }
20
+
21
+ export const WithLink = (args) => <TextWithLabel {...args}><a href='https://example.com'>Standard Link</a></TextWithLabel>
22
+
23
+ WithLink.args = {
24
+ label: 'External Link'
25
+ }
@@ -1,42 +1,42 @@
1
- 'use strict'
2
- import TwoColumnsLayout from '../components/layouts/TwoColumnsLayout'
3
- import BorderedBox from '../components/BorderedBox'
4
- export default {
5
- title: 'Platformatic/TwoColumnsLayout',
6
- component: TwoColumnsLayout
7
- // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
8
- /* argTypes: {
9
- gridTemplate: {
10
- type: 'string',
11
- control: {
12
- type: 'radio',
13
- options: ['Default', 'Columns', 'Rows', 'Responsive' ],
14
- }
15
- }
16
- } */
17
- }
18
-
19
- // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
20
- const Template = (args) => <TwoColumnsLayout {...args}><BorderedBox>1st</BorderedBox><BorderedBox>2nd</BorderedBox></TwoColumnsLayout>
21
-
22
- export const Default = Template.bind({})
23
-
24
- Default.args = { }
25
-
26
- export const Columns = Template.bind({})
27
-
28
- Columns.args = {
29
- gridTemplate: 'columns'
30
- }
31
-
32
- export const Rows = Template.bind({})
33
-
34
- Rows.args = {
35
- gridTemplate: 'rows'
36
- }
37
-
38
- export const Responsive = Template.bind({})
39
-
40
- Responsive.args = {
41
- gridTemplate: 'responsive'
42
- }
1
+ 'use strict'
2
+ import TwoColumnsLayout from '../components/layouts/TwoColumnsLayout'
3
+ import BorderedBox from '../components/BorderedBox'
4
+ export default {
5
+ title: 'Platformatic/TwoColumnsLayout',
6
+ component: TwoColumnsLayout
7
+ // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
8
+ /* argTypes: {
9
+ gridTemplate: {
10
+ type: 'string',
11
+ control: {
12
+ type: 'radio',
13
+ options: ['Default', 'Columns', 'Rows', 'Responsive' ],
14
+ }
15
+ }
16
+ } */
17
+ }
18
+
19
+ // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
20
+ const Template = (args) => <TwoColumnsLayout {...args}><BorderedBox>1st</BorderedBox><BorderedBox>2nd</BorderedBox></TwoColumnsLayout>
21
+
22
+ export const Default = Template.bind({})
23
+
24
+ Default.args = { }
25
+
26
+ export const Columns = Template.bind({})
27
+
28
+ Columns.args = {
29
+ gridTemplate: 'columns'
30
+ }
31
+
32
+ export const Rows = Template.bind({})
33
+
34
+ Rows.args = {
35
+ gridTemplate: 'rows'
36
+ }
37
+
38
+ export const Responsive = Template.bind({})
39
+
40
+ Responsive.args = {
41
+ gridTemplate: 'responsive'
42
+ }
@@ -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,37 +1,37 @@
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
- },
14
- colors: {
15
- 'main-green': '#21FA90',
16
- 'dark-green': '#02783F',
17
- 'light-green': '#21F190',
18
- 'main-dark-blue': '#00283D',
19
- 'dark-blue': '#00344F',
20
- white: '#FFFFFF',
21
- 'error-red': '#FA2121',
22
- 'tertiary-blue': '#2588E4'
23
- },
24
- fontFamily: {
25
- sans: ['Montserrat']
26
- }
27
- },
28
- safelist: [
29
- 'border-error-red',
30
- 'border-main-green',
31
- 'text-3xl',
32
- 'text-4xl',
33
- 'text-5xl',
34
- 'text-6xl'
35
- ],
36
- plugins: []
37
- }
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
+ },
14
+ colors: {
15
+ 'main-green': '#21FA90',
16
+ 'dark-green': '#02783F',
17
+ 'light-green': '#21F190',
18
+ 'main-dark-blue': '#00283D',
19
+ 'dark-blue': '#00344F',
20
+ white: '#FFFFFF',
21
+ 'error-red': '#FA2121',
22
+ 'tertiary-blue': '#2588E4'
23
+ },
24
+ fontFamily: {
25
+ sans: ['Montserrat']
26
+ }
27
+ },
28
+ safelist: [
29
+ 'border-error-red',
30
+ 'border-main-green',
31
+ 'text-3xl',
32
+ 'text-4xl',
33
+ 'text-5xl',
34
+ 'text-6xl'
35
+ ],
36
+ plugins: []
37
+ }
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
+ })
@@ -1,6 +0,0 @@
1
- <svg width="38" height="42" viewBox="0 0 38 42" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M8.12022 22.3583C4.18631 22.3583 1 19.1696 1 15.2381C1 11.3065 4.18631 8.11784 8.11784 8.12022C8.11784 4.18631 11.3065 1 15.2381 1C18.1449 1 20.6433 2.74124 21.7492 5.23965C21.9498 5.22054 22.1529 5.21099 22.3583 5.21099C25.6377 5.21099 28.3965 7.42994 29.2229 10.4467C29.7627 10.289 30.3336 10.203 30.9236 10.203C34.2795 10.203 37 12.926 37 16.2818C37 19.6377 34.2795 22.3583 30.9236 22.3583" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
3
- <path d="M13 11.5V18.5M13 31V28M13 25V21.5" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
4
- <path d="M25 13V19M25 34.5V31M25 28V22" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
5
- <path d="M19 15.4L19 22.5M19 40.5L19 36.5M19 25.5L19 33.5" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6
- </svg>
package/dist/api-icon.svg DELETED
@@ -1,9 +0,0 @@
1
- <svg width="38" height="56" viewBox="0 0 38 56" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M8.12022 22.3583C4.18631 22.3583 1 19.1696 1 15.2381C1 11.3065 4.18631 8.11784 8.11784 8.12022C8.11784 4.18631 11.3065 1 15.2381 1C18.1449 1 20.6433 2.74124 21.7492 5.23965C21.9498 5.22054 22.1529 5.21099 22.3583 5.21099C25.6377 5.21099 28.3965 7.42994 29.2229 10.4467C29.7627 10.289 30.3336 10.203 30.9236 10.203C34.2795 10.203 37 12.926 37 16.2818C37 19.6377 34.2795 22.3583 30.9236 22.3583" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
3
- <path d="M13 11.5V31H11.5" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
4
- <path d="M25 13V31H28" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
5
- <path d="M19 15.4L19 51.2L30.4 51.2" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6
- <circle cx="7" cy="31" r="3" stroke="white" stroke-width="2"/>
7
- <circle cx="31" cy="31" r="3" stroke="white" stroke-width="2"/>
8
- <circle cx="34" cy="51.2" r="3" stroke="white" stroke-width="2"/>
9
- </svg>