From a294b3559120ce65044d5d3acf3d165a1f4e0963 Mon Sep 17 00:00:00 2001 From: cha0s Date: Sat, 13 Jan 2024 14:24:26 -0600 Subject: [PATCH] refactor: tabs --- packages/behavior/src/persea/traits/behaved.jsx | 9 +++------ .../src/persea/controllers/entity/component.jsx | 12 ++++++------ .../src/persea/controllers/entity/component.scss | 2 -- .../src/persea/controllers/entity/traits/index.jsx | 10 ++++++---- packages/react/package.json | 3 +-- packages/react/src/index.js | 2 -- .../src/persea/components/json-tabs/index.jsx | 12 ++++++------ .../sound/src/persea/controllers/sound/component.jsx | 9 ++------- 8 files changed, 24 insertions(+), 35 deletions(-) diff --git a/packages/behavior/src/persea/traits/behaved.jsx b/packages/behavior/src/persea/traits/behaved.jsx index 4db1353..2d13226 100644 --- a/packages/behavior/src/persea/traits/behaved.jsx +++ b/packages/behavior/src/persea/traits/behaved.jsx @@ -2,18 +2,15 @@ import './behaved.scss'; import {join} from 'path'; +import {Code} from '@avocado/react'; import {JsonTabs, useJsonPatcher} from '@avocado/resource/persea'; +import {PropTypes, React} from '@flecks/react'; import { - PropTypes, - React, -} from '@flecks/react'; -import { - Code, Tab, Tabs, TabList, TabPanel, -} from '@avocado/react'; +} from '@flecks/react/tabs'; const Behaved = ({ json, diff --git a/packages/entity/src/persea/controllers/entity/component.jsx b/packages/entity/src/persea/controllers/entity/component.jsx index 5af3656..e58b782 100644 --- a/packages/entity/src/persea/controllers/entity/component.jsx +++ b/packages/entity/src/persea/controllers/entity/component.jsx @@ -2,12 +2,6 @@ import './component.scss'; import {join} from 'path'; -import { - Tab, - Tabs, - TabList, - TabPanel, -} from '@avocado/react'; import { PropTypes, React, @@ -15,6 +9,12 @@ import { useFlecks, useState, } from '@flecks/react'; +import { + Tab, + Tabs, + TabList, + TabPanel, +} from '@flecks/react/tabs'; import Traits from './traits'; import View from './view'; diff --git a/packages/entity/src/persea/controllers/entity/component.scss b/packages/entity/src/persea/controllers/entity/component.scss index 4892e2d..7ed6c74 100644 --- a/packages/entity/src/persea/controllers/entity/component.scss +++ b/packages/entity/src/persea/controllers/entity/component.scss @@ -1,5 +1,3 @@ -@import '~react-tabs/style/react-tabs.scss'; - .entity-renderer { height: 100%; > .react-tabs { diff --git a/packages/entity/src/persea/controllers/entity/traits/index.jsx b/packages/entity/src/persea/controllers/entity/traits/index.jsx index 3e88016..b096cc5 100644 --- a/packages/entity/src/persea/controllers/entity/traits/index.jsx +++ b/packages/entity/src/persea/controllers/entity/traits/index.jsx @@ -4,10 +4,6 @@ import {join} from 'path'; import { Modal, - Tab, - Tabs, - TabList, - TabPanel, } from '@avocado/react'; import {JsonController, useJsonPatcher} from '@avocado/resource/persea'; import { @@ -17,6 +13,12 @@ import { useRef, useState, } from '@flecks/react'; +import { + Tab, + Tabs, + TabList, + TabPanel, +} from '@flecks/react/tabs'; import difference from 'lodash.difference'; import Suggest from './suggest'; diff --git a/packages/react/package.json b/packages/react/package.json index 80535c9..8b25e84 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -24,8 +24,7 @@ "deepmerge": "^4.2.2", "react-ace": "^9.4.0", "react-json-editor-ajrm": "^2.5.13", - "react-modal": "^3.12.1", - "react-tabs": "^4.0.1" + "react-modal": "^3.12.1" }, "devDependencies": { "@flecks/fleck": "^2.0.3" diff --git a/packages/react/src/index.js b/packages/react/src/index.js index 23aff0a..5e001d2 100644 --- a/packages/react/src/index.js +++ b/packages/react/src/index.js @@ -1,5 +1,3 @@ -export * from 'react-tabs'; - export {default as Code} from './components/code'; export {default as IconPages} from './components/icon-pages'; export {default as Json} from './components/json'; diff --git a/packages/resource/src/persea/components/json-tabs/index.jsx b/packages/resource/src/persea/components/json-tabs/index.jsx index 1a9569d..55224fd 100644 --- a/packages/resource/src/persea/components/json-tabs/index.jsx +++ b/packages/resource/src/persea/components/json-tabs/index.jsx @@ -1,12 +1,6 @@ /* eslint-disable jsx-a11y/control-has-associated-label */ import {join} from 'path'; -import { - Tab, - Tabs, - TabList, - TabPanel, -} from '@avocado/react'; import useJsonPatcher from '@avocado/resource/persea/hooks/use-json-patcher'; import { PropTypes, @@ -16,6 +10,12 @@ import { useRef, useState, } from '@flecks/react'; +import { + Tab, + Tabs, + TabList, + TabPanel, +} from '@flecks/react/tabs'; import './index.scss'; diff --git a/packages/sound/src/persea/controllers/sound/component.jsx b/packages/sound/src/persea/controllers/sound/component.jsx index 07972cf..3d9daae 100644 --- a/packages/sound/src/persea/controllers/sound/component.jsx +++ b/packages/sound/src/persea/controllers/sound/component.jsx @@ -3,14 +3,9 @@ import './component.scss'; import {join} from 'path'; -import { - Number, -} from '@avocado/react'; +import {Number} from '@avocado/react'; import {useJsonPatcher} from '@avocado/resource/persea'; -import { - PropTypes, - React, -} from '@flecks/react'; +import {PropTypes, React} from '@flecks/react'; import SoundSource from './src';