@teambit/panels 0.0.0-3e7b7de2eb6ceb522eaf9b0c7b17dfb3249fe3a0

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/dist/esm.mjs ADDED
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line import/no-unresolved
2
+ import cjsModule from './index.js';
3
+
4
+ export const PanelUiAspect = cjsModule.PanelUiAspect;
5
+ export const TabContainer = cjsModule.TabContainer;
6
+ export const Tab = cjsModule.Tab;
7
+ export const TabList = cjsModule.TabList;
8
+ export const TabPanel = cjsModule.TabPanel;
9
+
10
+ export default cjsModule;
11
+
@@ -0,0 +1,3 @@
1
+ export type { PanelUIMain } from './panel-ui.main.runtime';
2
+ export { PanelUiAspect } from './panel-ui.aspect';
3
+ export { TabContainer, Tab, TabList, TabPanel } from './ui/tabs';
package/dist/index.js ADDED
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "PanelUiAspect", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _panelUi().PanelUiAspect;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "Tab", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _tabs().Tab;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "TabContainer", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _tabs().TabContainer;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "TabList", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _tabs().TabList;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "TabPanel", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _tabs().TabPanel;
34
+ }
35
+ });
36
+ function _panelUi() {
37
+ const data = require("./panel-ui.aspect");
38
+ _panelUi = function () {
39
+ return data;
40
+ };
41
+ return data;
42
+ }
43
+ function _tabs() {
44
+ const data = require("./ui/tabs");
45
+ _tabs = function () {
46
+ return data;
47
+ };
48
+ return data;
49
+ }
50
+
51
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_panelUi","data","require","_tabs"],"sources":["index.ts"],"sourcesContent":["export type { PanelUIMain } from './panel-ui.main.runtime';\nexport { PanelUiAspect } from './panel-ui.aspect';\nexport { TabContainer, Tab, TabList, TabPanel } from './ui/tabs';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import { Aspect } from '@teambit/harmony';
2
+ export declare const PanelUiAspect: Aspect;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PanelUiAspect = void 0;
7
+ function _harmony() {
8
+ const data = require("@teambit/harmony");
9
+ _harmony = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ const PanelUiAspect = exports.PanelUiAspect = _harmony().Aspect.create({
15
+ id: 'teambit.ui-foundation/panels',
16
+ dependencies: [],
17
+ defaultConfig: {}
18
+ });
19
+
20
+ //# sourceMappingURL=panel-ui.aspect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_harmony","data","require","PanelUiAspect","exports","Aspect","create","id","dependencies","defaultConfig"],"sources":["panel-ui.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const PanelUiAspect = Aspect.create({\n id: 'teambit.ui-foundation/panels',\n dependencies: [],\n defaultConfig: {},\n});\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EACzCC,EAAE,EAAE,8BAA8B;EAClCC,YAAY,EAAE,EAAE;EAChBC,aAAa,EAAE,CAAC;AAClB,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ export declare class PanelUIMain {
2
+ static runtime: import("@teambit/harmony").RuntimeDefinition;
3
+ static dependencies: never[];
4
+ static provider(): Promise<PanelUIMain>;
5
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PanelUIMain = void 0;
7
+ function _cli() {
8
+ const data = require("@teambit/cli");
9
+ _cli = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ function _panelUi() {
15
+ const data = require("./panel-ui.aspect");
16
+ _panelUi = function () {
17
+ return data;
18
+ };
19
+ return data;
20
+ }
21
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
22
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
23
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
24
+ class PanelUIMain {
25
+ static async provider() {
26
+ return new PanelUIMain();
27
+ }
28
+ }
29
+ exports.PanelUIMain = PanelUIMain;
30
+ _defineProperty(PanelUIMain, "runtime", _cli().MainRuntime);
31
+ _defineProperty(PanelUIMain, "dependencies", []);
32
+ _panelUi().PanelUiAspect.addRuntime(PanelUIMain);
33
+
34
+ //# sourceMappingURL=panel-ui.main.runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_cli","data","require","_panelUi","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","PanelUIMain","provider","exports","MainRuntime","PanelUiAspect","addRuntime"],"sources":["panel-ui.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\n\nimport { PanelUiAspect } from './panel-ui.aspect';\n\nexport class PanelUIMain {\n static runtime = MainRuntime;\n static dependencies = [];\n\n static async provider() {\n return new PanelUIMain();\n }\n}\n\nPanelUiAspect.addRuntime(PanelUIMain);\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAkD,SAAAG,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAF,CAAA,GAAAE,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAb,CAAA,QAAAU,CAAA,GAAAV,CAAA,CAAAc,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,MAAA,EAAAf,CAAA;AAE3C,MAAMgB,WAAW,CAAC;EAIvB,aAAaC,QAAQA,CAAA,EAAG;IACtB,OAAO,IAAID,WAAW,CAAC,CAAC;EAC1B;AACF;AAACE,OAAA,CAAAF,WAAA,GAAAA,WAAA;AAAAnB,eAAA,CAPYmB,WAAW,aACLG,kBAAW;AAAAtB,eAAA,CADjBmB,WAAW,kBAEA,EAAE;AAO1BI,wBAAa,CAACC,UAAU,CAACL,WAAW,CAAC","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ ;
2
+ ;
3
+
4
+ export const compositions = [];
5
+ export const overview = [];
6
+
7
+ export const compositions_metadata = {"compositions":[]};
@@ -0,0 +1,14 @@
1
+ import { TabListProps as BaseTabListProps, TabPanel as TabPanelBase, TabProps as BaseTabProps, Tabs } from 'react-tabs';
2
+ export type TabContainerProps = Tabs;
3
+ export declare const TabContainer: typeof Tabs;
4
+ export type TabProps = BaseTabProps;
5
+ export type TabListProps = BaseTabListProps;
6
+ export declare function TabList(props: TabListProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare namespace TabList {
8
+ var tabsRole: string;
9
+ }
10
+ export declare const TabPanel: typeof TabPanelBase;
11
+ export declare function Tab(props: BaseTabProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare namespace Tab {
13
+ var tabsRole: string;
14
+ }
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Tab = Tab;
7
+ exports.TabContainer = void 0;
8
+ exports.TabList = TabList;
9
+ exports.TabPanel = void 0;
10
+ function _classnames() {
11
+ const data = _interopRequireDefault(require("classnames"));
12
+ _classnames = function () {
13
+ return data;
14
+ };
15
+ return data;
16
+ }
17
+ function _react() {
18
+ const data = _interopRequireDefault(require("react"));
19
+ _react = function () {
20
+ return data;
21
+ };
22
+ return data;
23
+ }
24
+ function _reactTabs() {
25
+ const data = require("react-tabs");
26
+ _reactTabs = function () {
27
+ return data;
28
+ };
29
+ return data;
30
+ }
31
+ function _tabsModule() {
32
+ const data = _interopRequireDefault(require("./tabs.module.scss"));
33
+ _tabsModule = function () {
34
+ return data;
35
+ };
36
+ return data;
37
+ }
38
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
39
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
40
+ const TabContainer = exports.TabContainer = _reactTabs().Tabs;
41
+ // TabContainer.tabsRole = TabPanel
42
+
43
+ function TabList(props) {
44
+ return (
45
+ /*#__PURE__*/
46
+ // @ts-ignore @TODO "Types of property 'ref' are incompatible"
47
+ _react().default.createElement(_reactTabs().TabList, _extends({}, props, {
48
+ className: (0, _classnames().default)(_tabsModule().default.tabContainer, props.className)
49
+ }))
50
+ );
51
+ }
52
+ TabList.tabsRole = 'TabList';
53
+ const TabPanel = exports.TabPanel = _reactTabs().TabPanel;
54
+ function Tab(props) {
55
+ return (
56
+ /*#__PURE__*/
57
+ // @ts-ignore @TODO "Types of property 'ref' are incompatible"
58
+ _react().default.createElement(_reactTabs().Tab, _extends({}, props, {
59
+ className: (0, _classnames().default)(props.className, _tabsModule().default.tab),
60
+ selectedClassName: _tabsModule().default.active,
61
+ disabledClassName: _tabsModule().default.disabled
62
+ }))
63
+ );
64
+ }
65
+ Tab.tabsRole = 'Tab';
66
+
67
+ //# sourceMappingURL=tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_classnames","data","_interopRequireDefault","require","_react","_reactTabs","_tabsModule","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","TabContainer","exports","Tabs","TabList","props","createElement","className","classNames","styles","tabContainer","tabsRole","TabPanel","TabPanelBase","Tab","tab","selectedClassName","active","disabledClassName","disabled"],"sources":["tabs.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport React from 'react';\nimport {\n Tab as BaseTab,\n TabList as BaseTabList,\n TabListProps as BaseTabListProps,\n TabPanel as TabPanelBase,\n TabProps as BaseTabProps,\n Tabs,\n} from 'react-tabs';\n\nimport styles from './tabs.module.scss';\n\nexport type TabContainerProps = Tabs;\nexport const TabContainer = Tabs;\n// TabContainer.tabsRole = TabPanel\n\nexport type TabProps = BaseTabProps;\n\nexport type TabListProps = BaseTabListProps;\nexport function TabList(props: TabListProps) {\n return (\n // @ts-ignore @TODO \"Types of property 'ref' are incompatible\"\n <BaseTabList {...props} className={classNames(styles.tabContainer, props.className)} />\n );\n}\nTabList.tabsRole = 'TabList';\n\nexport const TabPanel = TabPanelBase;\nexport function Tab(props: BaseTabProps) {\n return (\n // @ts-ignore @TODO \"Types of property 'ref' are incompatible\"\n <BaseTab\n {...props}\n className={classNames(props.className, styles.tab)}\n selectedClassName={styles.active}\n disabledClassName={styles.disabled}\n />\n );\n}\nTab.tabsRole = 'Tab';\n"],"mappings":";;;;;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AASA,SAAAK,YAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAG,WAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAwC,SAAAC,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,CAAAI,CAAA,IAAAD,CAAA,CAAAC,CAAA,aAAAJ,CAAA,KAAAJ,QAAA,CAAAW,KAAA,OAAAN,SAAA;AAGjC,MAAMO,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAGE,iBAAI;AAChC;;AAKO,SAASC,OAAOA,CAACC,KAAmB,EAAE;EAC3C;IAAA;IACE;IACAtB,MAAA,GAAAK,OAAA,CAAAkB,aAAA,CAACtB,UAAA,GAAAoB,OAAW,EAAAf,QAAA,KAAKgB,KAAK;MAAEE,SAAS,EAAE,IAAAC,qBAAU,EAACC,qBAAM,CAACC,YAAY,EAAEL,KAAK,CAACE,SAAS;IAAE,EAAE;EAAC;AAE3F;AACAH,OAAO,CAACO,QAAQ,GAAG,SAAS;AAErB,MAAMC,QAAQ,GAAAV,OAAA,CAAAU,QAAA,GAAGC,qBAAY;AAC7B,SAASC,GAAGA,CAACT,KAAmB,EAAE;EACvC;IAAA;IACE;IACAtB,MAAA,GAAAK,OAAA,CAAAkB,aAAA,CAACtB,UAAA,GAAA8B,GAAO,EAAAzB,QAAA,KACFgB,KAAK;MACTE,SAAS,EAAE,IAAAC,qBAAU,EAACH,KAAK,CAACE,SAAS,EAAEE,qBAAM,CAACM,GAAG,CAAE;MACnDC,iBAAiB,EAAEP,qBAAM,CAACQ,MAAO;MACjCC,iBAAiB,EAAET,qBAAM,CAACU;IAAS,EACpC;EAAC;AAEN;AACAL,GAAG,CAACH,QAAQ,GAAG,KAAK","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ .tabContainer {
2
+ display: flex;
3
+ }
4
+
5
+ .tab {
6
+ cursor: pointer;
7
+ position: relative;
8
+ padding: 8px;
9
+ text-transform: uppercase;
10
+ font-size: 12px;
11
+ font-weight: bold;
12
+ outline: none;
13
+
14
+ color: var(--on-background-color, #878c9a); //TODO
15
+ transition: color 300ms ease-in-out;
16
+ &:hover {
17
+ color: var(--primary-color);
18
+ }
19
+
20
+ &.disabled {
21
+ color: var(--bit-text-color-light, #6c707c);
22
+ }
23
+
24
+ &.active {
25
+ &:before {
26
+ content: '';
27
+ position: absolute;
28
+ top: 0;
29
+ left: 0;
30
+ right: 0;
31
+
32
+ background-color: var(--bit-accent-color, #6c5ce7);
33
+ height: 3px;
34
+ border-radius: 2px;
35
+
36
+ transition:
37
+ background-color 300ms,
38
+ height 300ms;
39
+ }
40
+ }
41
+ }
package/esm.mjs ADDED
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line import/no-unresolved
2
+ import cjsModule from './index.js';
3
+
4
+ export const PanelUiAspect = cjsModule.PanelUiAspect;
5
+ export const TabContainer = cjsModule.TabContainer;
6
+ export const Tab = cjsModule.Tab;
7
+ export const TabList = cjsModule.TabList;
8
+ export const TabPanel = cjsModule.TabPanel;
9
+
10
+ export default cjsModule;
11
+
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@teambit/panels",
3
+ "version": "0.0.0-3e7b7de2eb6ceb522eaf9b0c7b17dfb3249fe3a0",
4
+ "homepage": "https://bit.cloud/teambit/ui-foundation/panels",
5
+ "main": "dist/index.js",
6
+ "componentId": {
7
+ "scope": "teambit.ui-foundation",
8
+ "name": "panels",
9
+ "version": "3e7b7de2eb6ceb522eaf9b0c7b17dfb3249fe3a0"
10
+ },
11
+ "dependencies": {
12
+ "classnames": "2.2.6",
13
+ "react-tabs": "3.2.0",
14
+ "@teambit/harmony": "0.4.7",
15
+ "@teambit/cli": "0.0.0-3dabbcb2983030940896e7d011077946ed7206c9"
16
+ },
17
+ "devDependencies": {
18
+ "@types/classnames": "2.2.11",
19
+ "@types/react-tabs": "2.3.2",
20
+ "@types/mocha": "9.1.0",
21
+ "@teambit/harmony.envs.core-aspect-env": "0.0.69"
22
+ },
23
+ "peerDependencies": {
24
+ "react": "^17.0.0 || ^18.0.0",
25
+ "@types/react": "^17.0.73"
26
+ },
27
+ "license": "Apache-2.0",
28
+ "optionalDependencies": {},
29
+ "peerDependenciesMeta": {},
30
+ "exports": {
31
+ ".": {
32
+ "node": {
33
+ "require": "./dist/index.js",
34
+ "import": "./dist/esm.mjs"
35
+ },
36
+ "default": "./dist/index.js"
37
+ },
38
+ "./dist/*": "./dist/*",
39
+ "./artifacts/*": "./artifacts/*",
40
+ "./*": "./*.ts"
41
+ },
42
+ "private": false,
43
+ "engines": {
44
+ "node": ">=16.0.0"
45
+ },
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "https://github.com/teambit/bit"
49
+ },
50
+ "keywords": [
51
+ "bit",
52
+ "bit-aspect",
53
+ "bit-core-aspect",
54
+ "components",
55
+ "collaboration",
56
+ "web"
57
+ ]
58
+ }
@@ -0,0 +1,41 @@
1
+ declare module '*.png' {
2
+ const value: any;
3
+ export = value;
4
+ }
5
+ declare module '*.svg' {
6
+ import type { FunctionComponent, SVGProps } from 'react';
7
+
8
+ export const ReactComponent: FunctionComponent<
9
+ SVGProps<SVGSVGElement> & { title?: string }
10
+ >;
11
+ const src: string;
12
+ export default src;
13
+ }
14
+ declare module '*.jpg' {
15
+ const value: any;
16
+ export = value;
17
+ }
18
+ declare module '*.jpeg' {
19
+ const value: any;
20
+ export = value;
21
+ }
22
+ declare module '*.gif' {
23
+ const value: any;
24
+ export = value;
25
+ }
26
+ declare module '*.bmp' {
27
+ const value: any;
28
+ export = value;
29
+ }
30
+ declare module '*.otf' {
31
+ const value: any;
32
+ export = value;
33
+ }
34
+ declare module '*.woff' {
35
+ const value: any;
36
+ export = value;
37
+ }
38
+ declare module '*.woff2' {
39
+ const value: any;
40
+ export = value;
41
+ }
@@ -0,0 +1,42 @@
1
+ declare module '*.module.css' {
2
+ const classes: { readonly [key: string]: string };
3
+ export default classes;
4
+ }
5
+ declare module '*.module.scss' {
6
+ const classes: { readonly [key: string]: string };
7
+ export default classes;
8
+ }
9
+ declare module '*.module.sass' {
10
+ const classes: { readonly [key: string]: string };
11
+ export default classes;
12
+ }
13
+
14
+ declare module '*.module.less' {
15
+ const classes: { readonly [key: string]: string };
16
+ export default classes;
17
+ }
18
+
19
+ declare module '*.less' {
20
+ const classes: { readonly [key: string]: string };
21
+ export default classes;
22
+ }
23
+
24
+ declare module '*.css' {
25
+ const classes: { readonly [key: string]: string };
26
+ export default classes;
27
+ }
28
+
29
+ declare module '*.sass' {
30
+ const classes: { readonly [key: string]: string };
31
+ export default classes;
32
+ }
33
+
34
+ declare module '*.scss' {
35
+ const classes: { readonly [key: string]: string };
36
+ export default classes;
37
+ }
38
+
39
+ declare module '*.mdx' {
40
+ const component: any;
41
+ export default component;
42
+ }
@@ -0,0 +1,41 @@
1
+ .tabContainer {
2
+ display: flex;
3
+ }
4
+
5
+ .tab {
6
+ cursor: pointer;
7
+ position: relative;
8
+ padding: 8px;
9
+ text-transform: uppercase;
10
+ font-size: 12px;
11
+ font-weight: bold;
12
+ outline: none;
13
+
14
+ color: var(--on-background-color, #878c9a); //TODO
15
+ transition: color 300ms ease-in-out;
16
+ &:hover {
17
+ color: var(--primary-color);
18
+ }
19
+
20
+ &.disabled {
21
+ color: var(--bit-text-color-light, #6c707c);
22
+ }
23
+
24
+ &.active {
25
+ &:before {
26
+ content: '';
27
+ position: absolute;
28
+ top: 0;
29
+ left: 0;
30
+ right: 0;
31
+
32
+ background-color: var(--bit-accent-color, #6c5ce7);
33
+ height: 3px;
34
+ border-radius: 2px;
35
+
36
+ transition:
37
+ background-color 300ms,
38
+ height 300ms;
39
+ }
40
+ }
41
+ }
package/ui/tabs.tsx ADDED
@@ -0,0 +1,41 @@
1
+ import classNames from 'classnames';
2
+ import React from 'react';
3
+ import {
4
+ Tab as BaseTab,
5
+ TabList as BaseTabList,
6
+ TabListProps as BaseTabListProps,
7
+ TabPanel as TabPanelBase,
8
+ TabProps as BaseTabProps,
9
+ Tabs,
10
+ } from 'react-tabs';
11
+
12
+ import styles from './tabs.module.scss';
13
+
14
+ export type TabContainerProps = Tabs;
15
+ export const TabContainer = Tabs;
16
+ // TabContainer.tabsRole = TabPanel
17
+
18
+ export type TabProps = BaseTabProps;
19
+
20
+ export type TabListProps = BaseTabListProps;
21
+ export function TabList(props: TabListProps) {
22
+ return (
23
+ // @ts-ignore @TODO "Types of property 'ref' are incompatible"
24
+ <BaseTabList {...props} className={classNames(styles.tabContainer, props.className)} />
25
+ );
26
+ }
27
+ TabList.tabsRole = 'TabList';
28
+
29
+ export const TabPanel = TabPanelBase;
30
+ export function Tab(props: BaseTabProps) {
31
+ return (
32
+ // @ts-ignore @TODO "Types of property 'ref' are incompatible"
33
+ <BaseTab
34
+ {...props}
35
+ className={classNames(props.className, styles.tab)}
36
+ selectedClassName={styles.active}
37
+ disabledClassName={styles.disabled}
38
+ />
39
+ );
40
+ }
41
+ Tab.tabsRole = 'Tab';