@platformatic/ui-components 0.1.2 → 0.1.3

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": "@platformatic/ui-components",
3
3
  "description": "Platformatic UI Components",
4
- "version": "0.1.2",
4
+ "version": "0.1.3",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
7
7
  "scripts": {
@@ -1,5 +1,5 @@
1
1
  'use strict'
2
-
2
+ import React from 'react'
3
3
  import BorderedText from '../BorderedText'
4
4
 
5
5
  export default function Endpoints (props) {
@@ -4,6 +4,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
4
4
  import { faDatabase, faFileLines, faGear } from '@fortawesome/free-solid-svg-icons'
5
5
  import BorderedText from '../BorderedText'
6
6
  import styles from './Footer.module.css'
7
+ import React from 'react'
7
8
  export default function ApiFooter (props) {
8
9
  const { graphql, openapi } = props
9
10
  return (
@@ -1,4 +1,5 @@
1
1
  'use strict'
2
+ import React from 'react'
2
3
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
3
4
  import { faCircle } from '@fortawesome/free-solid-svg-icons'
4
5
  export default function ApiStatus (props) {
@@ -1,5 +1,5 @@
1
1
  'use strict'
2
-
2
+ import React from 'react'
3
3
  import BorderedText from '../BorderedText'
4
4
 
5
5
  export default function ApiVersion (props) {
@@ -9,7 +9,7 @@ import ApiStatus from './Api/Status'
9
9
  import BorderedBox from './BorderedBox'
10
10
  import HorizontalSeparator from './HorizontalSeparator'
11
11
  import styles from './Api.module.css'
12
- import { useState } from 'react'
12
+ import React, { useState } from 'react'
13
13
 
14
14
  function ApiName (props) {
15
15
  const { name } = props
@@ -5,9 +5,9 @@ import BorderedBox from './BorderedBox'
5
5
  import BorderedText from './BorderedText'
6
6
  import HorizontalSeparator from './HorizontalSeparator'
7
7
  import TwoColumnsLayout from './layouts/TwoColumnsLayout'
8
- import StatsView from './StatView'
8
+ import StatsView from './StatsView'
9
9
  import VerticalSeparator from './VerticalSeparator'
10
-
10
+ import React from 'react'
11
11
  export default function ApiDetails (props) {
12
12
  const apiData = props.data
13
13
  const { url, repository, version, openapi, graphql, source, lastDeploy } = apiData
@@ -3,6 +3,7 @@
3
3
  import { getColor } from '../lib/utils'
4
4
  import styles from './BorderedBox.module.css'
5
5
  import commonStyles from './Common.module.css'
6
+ import React from 'react'
6
7
  export default function BorderedBox (props) {
7
8
  const { classes, color, children } = props
8
9
  const borderColor = getColor('border', color)
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
  import styles from './BorderedText.module.css'
3
-
3
+ import React from 'react'
4
4
  export default function BorderedText (props) {
5
5
  return (
6
6
  <span className={styles.bordered}>{props.text}</span>
@@ -1,5 +1,5 @@
1
1
  'use strict'
2
-
2
+ import React from 'react'
3
3
  export default function HorizontalSeparator () {
4
4
  return <hr className='text-dark-green my-4' />
5
5
  }
@@ -7,7 +7,7 @@ import TabbedWindow from './TabbedWindow'
7
7
  import Prs from './Pr'
8
8
  import Playground from './Playground'
9
9
  import Versions from './Versions'
10
- import { useState } from 'react'
10
+ import React, { useState } from 'react'
11
11
  export default function Main () {
12
12
  const [currentSearch, setCurrentSearch] = useState('')
13
13
  const apis = [
@@ -1,5 +1,5 @@
1
1
  'use strict'
2
-
2
+ import React from 'react'
3
3
  import BorderedBox from './BorderedBox'
4
4
 
5
5
  export default function Playground () {
@@ -1,5 +1,5 @@
1
1
  'use strict'
2
-
2
+ import React from 'react'
3
3
  import BorderedBox from './BorderedBox'
4
4
 
5
5
  export default function Prs () {
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
+ import React, { useRef } from 'react'
2
3
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
3
4
  import { faSearch } from '@fortawesome/free-solid-svg-icons'
4
- import { useRef } from 'react'
5
5
  import styles from './SearchBar.module.css'
6
6
  import commonStyles from './Common.module.css'
7
7
  export default function SearchBar (props) {
@@ -1,5 +1,5 @@
1
1
  'use strict'
2
- import { Fragment } from 'react'
2
+ import React from 'react'
3
3
  import { getColor } from '../lib/utils'
4
4
  export default function StatValue (props) {
5
5
  const { value, color, label, pre } = props
@@ -6,7 +6,7 @@ import styles from './StatsView.module.css'
6
6
  import HorizontalSeparator from './HorizontalSeparator'
7
7
  import VerticalSeparator from './VerticalSeparator'
8
8
  import StatValue from './StatValue'
9
-
9
+ import React from 'react'
10
10
  export default function StatsView (props) {
11
11
  const { title, stats } = props
12
12
  const mainStat = stats.mainStat
@@ -1,5 +1,5 @@
1
1
  'use strict'
2
-
2
+ import React from 'react'
3
3
  import BorderedBox from './BorderedBox'
4
4
 
5
5
  export default function Versions () {
@@ -1,5 +1,5 @@
1
1
  'use strict'
2
-
2
+ import React from 'react'
3
3
  export default function VerticalSeparator () {
4
4
  return <span className='text-dark-green m-3'> | </span>
5
5
  }
@@ -1,4 +1,5 @@
1
1
  'use strict'
2
+ import React from 'react'
2
3
 
3
4
  export default function Layout (props) {
4
5
  return (
@@ -1,5 +1,5 @@
1
1
  'use strict'
2
-
2
+ import React from 'react'
3
3
  export default function TwoColumnsLayout (props) {
4
4
  return (
5
5
  <div className='grid grid-cols-2 gap-x-4'>
@@ -17,3 +17,8 @@ export const Green = Template.bind({})
17
17
  Green.args = {
18
18
  color: 'green'
19
19
  }
20
+ export const Red = Template.bind({})
21
+
22
+ Red.args = {
23
+ color: 'red'
24
+ }
package/vite.config.js CHANGED
@@ -2,14 +2,5 @@ import { defineConfig } from 'vite'
2
2
  import react from '@vitejs/plugin-react'
3
3
  /** @type {import('vite').UserConfig} */
4
4
  export default defineConfig({
5
- plugins: [react()],
6
- build: {
7
- rollupOptions: {
8
- output: {
9
- assetFileNames: 'platformatic-ui.css',
10
- chunkFileNames: 'platformatic-ui.js',
11
- manualChunks: undefined
12
- }
13
- }
14
- }
5
+ plugins: [react()]
15
6
  })