@teambit/compositions 0.0.551 → 0.0.556

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 (35) hide show
  1. package/dist/composition.d.ts +22 -1
  2. package/dist/composition.section.d.ts +8 -1
  3. package/dist/compositions.main.runtime.d.ts +56 -1
  4. package/dist/compositions.preview.runtime.d.ts +9 -1
  5. package/dist/compositions.ui.runtime.d.ts +3 -0
  6. package/dist/ui/composition-preview.d.ts +15 -0
  7. package/package.json +32 -26
  8. package/composition.section.tsx +0 -29
  9. package/composition.ts +0 -44
  10. package/compositions.aspect.ts +0 -9
  11. package/compositions.docs.mdx +0 -8
  12. package/compositions.graphql.ts +0 -32
  13. package/compositions.main.runtime.ts +0 -164
  14. package/compositions.module.scss +0 -100
  15. package/compositions.preview-definition.ts +0 -21
  16. package/compositions.preview.runtime.ts +0 -67
  17. package/compositions.tsx +0 -185
  18. package/compositions.ui.runtime.tsx +0 -53
  19. package/index.ts +0 -10
  20. package/package-tar/teambit-compositions-0.0.551.tgz +0 -0
  21. package/tsconfig.json +0 -35
  22. package/types/asset.d.ts +0 -29
  23. package/types/style.d.ts +0 -42
  24. package/ui/composition-preview.tsx +0 -60
  25. package/ui/compositions-overview/compositions-overview.module.scss +0 -16
  26. package/ui/compositions-overview/compositions-overview.tsx +0 -21
  27. package/ui/compositions-overview/index.ts +0 -1
  28. package/ui/compositions-panel/compositions-panel.module.scss +0 -119
  29. package/ui/compositions-panel/compositions-panel.tsx +0 -58
  30. package/ui/compositions-panel/index.ts +0 -0
  31. package/ui/compositions-panel-node/compositions-panel-node.module.scss +0 -15
  32. package/ui/compositions-panel-node/compositions-panel-node.tsx +0 -22
  33. package/ui/compositions-panel-node/index.ts +0 -1
  34. package/ui/index.ts +0 -1
  35. package/ui/use-compositions.tsx +0 -14
@@ -1,21 +0,0 @@
1
- import { Component, ComponentMap } from '@teambit/component';
2
- import { ExecutionContext } from '@teambit/envs';
3
- import { PreviewDefinition } from '@teambit/preview';
4
- import { AbstractVinyl } from '@teambit/legacy/dist/consumer/component/sources';
5
-
6
- import { CompositionsMain } from './compositions.main.runtime';
7
-
8
- export class CompositionPreviewDefinition implements PreviewDefinition {
9
- readonly prefix = 'compositions';
10
-
11
- constructor(private compositions: CompositionsMain) {}
12
-
13
- async renderTemplatePath(context: ExecutionContext): Promise<string> {
14
- return context.env.getMounter();
15
- }
16
-
17
- async getModuleMap(components: Component[]): Promise<ComponentMap<AbstractVinyl[]>> {
18
- const map = this.compositions.getPreviewFiles(components);
19
- return map.filter((value) => value.length !== 0);
20
- }
21
- }
@@ -1,67 +0,0 @@
1
- import {
2
- PreviewAspect,
3
- PreviewPreview,
4
- RenderingContext,
5
- PreviewRuntime,
6
- PreviewModule,
7
- ModuleFile,
8
- } from '@teambit/preview';
9
- import head from 'lodash.head';
10
-
11
- import { CompositionsAspect } from './compositions.aspect';
12
-
13
- export class CompositionsPreview {
14
- constructor(
15
- /**
16
- * preview extension.
17
- */
18
- private preview: PreviewPreview
19
- ) {}
20
-
21
- render(componentId: string, modules: PreviewModule, otherPreviewDefs, context: RenderingContext) {
22
- if (!modules.componentMap[componentId]) return;
23
-
24
- const compositions = this.selectPreviewModel(componentId, modules);
25
- const active = this.getActiveComposition(compositions);
26
-
27
- modules.mainModule.default(active, context);
28
- }
29
-
30
- /** gets relevant information for this preview to render */
31
- selectPreviewModel(componentId: string, previewModule: PreviewModule) {
32
- const files = previewModule.componentMap[componentId] || [];
33
-
34
- // allow compositions to come from many files. It is assumed they will have unique named
35
- const combined = Object.assign({}, ...files);
36
- return combined;
37
- }
38
-
39
- private getActiveComposition(module: ModuleFile) {
40
- const chosen = window.location.hash.split('&')[1];
41
-
42
- if (!chosen) {
43
- const first = head(Object.values(module));
44
- return first;
45
- }
46
-
47
- return module[chosen];
48
- }
49
-
50
- static runtime = PreviewRuntime;
51
-
52
- static dependencies = [PreviewAspect];
53
-
54
- static async provider([preview]: [PreviewPreview]) {
55
- const compPreview = new CompositionsPreview(preview);
56
- preview.registerPreview({
57
- name: 'compositions',
58
- render: compPreview.render.bind(compPreview),
59
- selectPreviewModel: compPreview.selectPreviewModel.bind(compPreview),
60
- default: true,
61
- });
62
-
63
- return compPreview;
64
- }
65
- }
66
-
67
- CompositionsAspect.addRuntime(CompositionsPreview);
package/compositions.tsx DELETED
@@ -1,185 +0,0 @@
1
- import React, { useContext, useEffect, useState, useMemo, useRef, ReactNode } from 'react';
2
- import head from 'lodash.head';
3
- import queryString from 'query-string';
4
- import { ThemeContext } from '@teambit/documenter.theme.theme-context';
5
- import { SplitPane, Pane, Layout } from '@teambit/base-ui.surfaces.split-pane.split-pane';
6
- import { HoverSplitter } from '@teambit/base-ui.surfaces.split-pane.hover-splitter';
7
- import { ComponentContext, ComponentModel } from '@teambit/component';
8
- import { PropTable } from '@teambit/documenter.ui.property-table';
9
- import { Tab, TabContainer, TabList, TabPanel } from '@teambit/panels';
10
- import { useDocs } from '@teambit/docs.ui.queries.get-docs';
11
- import { Collapser } from '@teambit/ui-foundation.ui.buttons.collapser';
12
- import { EmptyBox } from '@teambit/design.ui.empty-box';
13
- import { toPreviewUrl } from '@teambit/preview.ui.component-preview';
14
- import { useIsMobile } from '@teambit/ui-foundation.ui.hooks.use-is-mobile';
15
- import { CompositionsMenuBar } from '@teambit/compositions.ui.compositions-menu-bar';
16
- import { CompositionContextProvider } from '@teambit/compositions.ui.hooks.use-composition';
17
- import { MDXLayout } from '@teambit/mdx.ui.mdx-layout';
18
- import { Separator } from '@teambit/design.ui.separator';
19
- import { H1 } from '@teambit/documenter.ui.heading';
20
- import { AlertCard } from '@teambit/design.ui.alert-card';
21
- import { NativeLink } from '@teambit/base-ui.routing.native-link';
22
- import { OptionButton } from '@teambit/design.ui.input.option-button';
23
- import { StatusMessageCard } from '@teambit/design.ui.surfaces.status-message-card';
24
- import { EmptyStateSlot } from './compositions.ui.runtime';
25
- import { Composition } from './composition';
26
- import styles from './compositions.module.scss';
27
- import { ComponentComposition } from './ui';
28
- import { CompositionsPanel } from './ui/compositions-panel/compositions-panel';
29
- import type { CompositionsMenuSlot } from './compositions.ui.runtime';
30
-
31
- export type MenuBarWidget = {
32
- location: 'start' | 'end';
33
- content: ReactNode;
34
- };
35
- export type CompositionsProp = { menuBarWidgets?: CompositionsMenuSlot; emptyState?: EmptyStateSlot };
36
-
37
- export function Compositions({ menuBarWidgets, emptyState }: CompositionsProp) {
38
- const component = useContext(ComponentContext);
39
- const [selected, selectComposition] = useState(head(component.compositions));
40
- const selectedRef = useRef(selected);
41
- selectedRef.current = selected;
42
-
43
- const properties = useDocs(component.id);
44
-
45
- // reset selected composition when component changes.
46
- // this does trigger renderer, but perf seems to be ok
47
- useEffect(() => {
48
- const prevId = selectedRef.current?.identifier;
49
- const next = component.compositions.find((c) => c.identifier === prevId) || component.compositions[0];
50
-
51
- selectComposition(next);
52
- }, [component]);
53
- const isMobile = useIsMobile();
54
- const showSidebar = !isMobile && component.compositions.length > 0;
55
- const [isSidebarOpen, setSidebarOpenness] = useState(showSidebar);
56
-
57
- const sidebarOpenness = isSidebarOpen ? Layout.row : Layout.left;
58
-
59
- const compositionUrl = toPreviewUrl(component, 'compositions');
60
- const currentCompositionUrl = toPreviewUrl(component, 'compositions', selected?.identifier);
61
-
62
- const [compositionParams, setCompositionParams] = useState<Record<string, any>>({});
63
- const queryParams = useMemo(() => queryString.stringify(compositionParams), [compositionParams]);
64
-
65
- // collapse sidebar when empty, reopen when not
66
- useEffect(() => setSidebarOpenness(showSidebar), [showSidebar]);
67
-
68
- return (
69
- <CompositionContextProvider queryParams={compositionParams} setQueryParams={setCompositionParams}>
70
- <SplitPane layout={sidebarOpenness} size="85%" className={styles.compositionsPage}>
71
- <Pane className={styles.left}>
72
- <CompositionsMenuBar menuBarWidgets={menuBarWidgets} className={styles.menuBar}>
73
- <NativeLink external href={currentCompositionUrl} className={styles.openInNewTab}>
74
- <OptionButton icon="open-tab" />
75
- </NativeLink>
76
- </CompositionsMenuBar>
77
- <CompositionContent
78
- emptyState={emptyState}
79
- component={component}
80
- selected={selected}
81
- queryParams={queryParams}
82
- />
83
- </Pane>
84
- <HoverSplitter className={styles.splitter}>
85
- <Collapser
86
- placement="left"
87
- isOpen={isSidebarOpen}
88
- onMouseDown={(e) => e.stopPropagation()} // avoid split-pane drag
89
- onClick={() => setSidebarOpenness((x) => !x)}
90
- tooltipContent={`${isSidebarOpen ? 'Hide' : 'Show'} side compositions`}
91
- className={styles.collapser}
92
- />
93
- </HoverSplitter>
94
- <Pane className={styles.right}>
95
- <ThemeContext>
96
- <TabContainer className={styles.tabsContainer}>
97
- <TabList className={styles.tabs}>
98
- <Tab>compositions</Tab>
99
- <Tab>properties</Tab>
100
- </TabList>
101
- <TabPanel className={styles.tabContent}>
102
- <CompositionsPanel
103
- onSelectComposition={selectComposition}
104
- url={compositionUrl}
105
- compositions={component.compositions}
106
- active={selected}
107
- className={styles.compost}
108
- />
109
- </TabPanel>
110
- <TabPanel className={styles.tabContent}>
111
- {properties && properties.length > 0 ? <PropTable rows={properties} showListView /> : <div />}
112
- </TabPanel>
113
- </TabContainer>
114
- </ThemeContext>
115
- </Pane>
116
- </SplitPane>
117
- </CompositionContextProvider>
118
- );
119
- }
120
-
121
- type CompositionContentProps = {
122
- component: ComponentModel;
123
- selected?: Composition;
124
- queryParams?: string | string[];
125
- emptyState?: EmptyStateSlot;
126
- };
127
-
128
- function CompositionContent({ component, selected, queryParams, emptyState }: CompositionContentProps) {
129
- const env = component.environment?.id;
130
- const EmptyStateTemplate = emptyState?.get(env || ''); // || defaultTemplate;
131
-
132
- if (component.compositions.length === 0 && component.host === 'teambit.workspace/workspace' && EmptyStateTemplate) {
133
- return (
134
- <div className={styles.noCompositionsPage}>
135
- <div>
136
- <H1 className={styles.title}>Compositions</H1>
137
- <Separator isPresentational className={styles.separator} />
138
- <AlertCard
139
- level="info"
140
- title="There are no
141
- compositions for this Component. Learn how to add compositions:"
142
- >
143
- <MDXLayout>
144
- <EmptyStateTemplate />
145
- </MDXLayout>
146
- </AlertCard>
147
- </div>
148
- </div>
149
- );
150
- }
151
-
152
- if (component?.buildStatus === 'pending' && component?.host === 'teambit.scope/scope')
153
- return (
154
- <StatusMessageCard className={styles.buildStatusMessage} status="PROCESSING" title="component preview pending">
155
- this might take some time
156
- </StatusMessageCard>
157
- );
158
- if (component?.buildStatus === 'failed' && component?.host === 'teambit.scope/scope')
159
- return (
160
- <StatusMessageCard
161
- className={styles.buildStatusMessage}
162
- status="FAILURE"
163
- title="failed to get component preview "
164
- ></StatusMessageCard>
165
- );
166
-
167
- if (component.compositions.length === 0) {
168
- return (
169
- <EmptyBox
170
- title="There are no compositions for this component."
171
- linkText="Learn how to create compositions"
172
- link="https://harmony-docs.bit.dev/compositions/overview/"
173
- />
174
- );
175
- }
176
-
177
- return (
178
- <ComponentComposition
179
- className={styles.compositionsIframe}
180
- component={component}
181
- composition={selected}
182
- queryParams={queryParams}
183
- />
184
- );
185
- }
@@ -1,53 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import { ComponentType } from 'react';
3
- import { Slot, SlotRegistry } from '@teambit/harmony';
4
- import { ComponentAspect, ComponentUI } from '@teambit/component';
5
- import { UIRuntime } from '@teambit/ui';
6
- import { CompositionsSection } from './composition.section';
7
- import { CompositionsAspect } from './compositions.aspect';
8
- import { MenuBarWidget } from './compositions';
9
-
10
- export type CompositionsMenuSlot = SlotRegistry<MenuBarWidget[]>;
11
- export type EmptyStateSlot = SlotRegistry<ComponentType>;
12
-
13
- export class CompositionsUI {
14
- constructor(private menuBarWidgetSlot: CompositionsMenuSlot, private emptyStateSlot: EmptyStateSlot) {}
15
-
16
- /**
17
- * register a new tester empty state. this allows to register a different empty state from each environment for example.
18
- */
19
- registerEmptyState(emptyStateComponent: ComponentType) {
20
- this.emptyStateSlot.register(emptyStateComponent);
21
- return this;
22
- }
23
-
24
- registerMenuWidget(...widget: MenuBarWidget[]) {
25
- this.menuBarWidgetSlot.register(widget);
26
- }
27
-
28
- static dependencies = [ComponentAspect];
29
- static runtime = UIRuntime;
30
- static slots = [Slot.withType<ReactNode>(), Slot.withType<ComponentType>()];
31
-
32
- static async provider(
33
- [component]: [ComponentUI],
34
- config: {},
35
- [compositionMenuSlot, emptyStateSlot]: [CompositionsMenuSlot, EmptyStateSlot]
36
- ) {
37
- const compositions = new CompositionsUI(compositionMenuSlot, emptyStateSlot);
38
- const section = new CompositionsSection(
39
- compositions,
40
- { menuBarWidgetSlot: compositions.menuBarWidgetSlot },
41
- emptyStateSlot
42
- );
43
-
44
- component.registerRoute(section.route);
45
- component.registerNavigation(section.navigationLink, section.order);
46
-
47
- return compositions;
48
- }
49
- }
50
-
51
- export default CompositionsUI;
52
-
53
- CompositionsAspect.addRuntime(CompositionsUI);
package/index.ts DELETED
@@ -1,10 +0,0 @@
1
- import { CompositionsAspect } from './compositions.aspect';
2
-
3
- export { CompositionsAspect };
4
- export type { CompositionsMain } from './compositions.main.runtime';
5
- export type { CompositionsUI, CompositionsMenuSlot } from './compositions.ui.runtime';
6
- export { Composition, CompositionProps } from './composition';
7
- export type { CompositionsPreview } from './compositions.preview.runtime';
8
- export { CompositionsOverview } from './ui/compositions-overview';
9
- export { ComponentComposition } from './ui';
10
- export default CompositionsAspect;
package/tsconfig.json DELETED
@@ -1,35 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "lib": [
4
- "es2019",
5
- "DOM",
6
- "ES6",
7
- "DOM.Iterable",
8
- "ScriptHost"
9
- ],
10
- "target": "es2015",
11
- "module": "commonjs",
12
- "jsx": "react",
13
- "declaration": true,
14
- "sourceMap": true,
15
- "skipLibCheck": true,
16
- "moduleResolution": "node",
17
- "esModuleInterop": true,
18
- "outDir": "dist",
19
- "composite": true,
20
- "emitDeclarationOnly": true,
21
- "experimentalDecorators": true,
22
- "emitDecoratorMetadata": true,
23
- "allowSyntheticDefaultImports": true,
24
- "strictPropertyInitialization": false,
25
- "strict": true,
26
- "noImplicitAny": false,
27
- "rootDir": ".",
28
- "removeComments": true,
29
- "preserveConstEnums": true,
30
- "resolveJsonModule": true
31
- },
32
- "exclude": [
33
- "dist"
34
- ]
35
- }
package/types/asset.d.ts DELETED
@@ -1,29 +0,0 @@
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<SVGProps<SVGSVGElement> & { title?: string }>;
9
- const src: string;
10
- export default src;
11
- }
12
-
13
- // @TODO Gilad
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
- }
package/types/style.d.ts DELETED
@@ -1,42 +0,0 @@
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
- }
@@ -1,60 +0,0 @@
1
- import React, { useMemo } from 'react';
2
- import { ComponentModel } from '@teambit/component';
3
- import { ComponentPreview } from '@teambit/preview.ui.component-preview';
4
-
5
- import { Composition } from '../composition';
6
-
7
- export type ComponentCompositionProps = {
8
- /**
9
- * HTML class
10
- */
11
- className?: string;
12
-
13
- /**
14
- * component to render.
15
- */
16
- component: ComponentModel;
17
-
18
- /**
19
- * composition to use for component rendering.
20
- */
21
- composition?: Composition;
22
-
23
- /**
24
- * Additional query params to append at the end of the *hash*. Changing this property will not reload the composition.
25
- */
26
- queryParams?: string | string[];
27
-
28
- /**
29
- * skip hot reload
30
- */
31
- hotReload?: boolean;
32
- };
33
-
34
- export function ComponentComposition({
35
- component,
36
- composition,
37
- hotReload,
38
- className,
39
- queryParams = [],
40
- }: ComponentCompositionProps) {
41
- const compositionParams = useMemo(() => (composition ? [composition.identifier] : []).concat(queryParams), [
42
- composition?.identifier,
43
- queryParams,
44
- ]);
45
-
46
- return (
47
- <ComponentPreview
48
- className={className}
49
- component={component}
50
- style={{ width: '100%', height: '100%' }}
51
- previewName="compositions"
52
- queryParams={compositionParams}
53
- hotReload={hotReload}
54
- />
55
- );
56
- }
57
-
58
- ComponentComposition.defaultProps = {
59
- skipHotReload: true,
60
- };
@@ -1,16 +0,0 @@
1
- .background {
2
- background: var(--bit-bg-dent, #f6f6f6);
3
- padding: 12px;
4
- border-radius: 6px;
5
- border: 1px solid var(--bit-border-color-lightest, #ededed);
6
- display: flex;
7
- overflow-x: auto;
8
-
9
- > * {
10
- margin-right: 16px;
11
- }
12
-
13
- > :last-child {
14
- margin: 0;
15
- }
16
- }
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import { CompositionCard } from '@teambit/compositions.ui.composition-card';
3
- import { CompositionsModule } from '@teambit/compositions.model.composition-type';
4
-
5
- import styles from './compositions-overview.module.scss';
6
-
7
- export type CompositionsOverviewProps = {
8
- compositions?: CompositionsModule;
9
- compositionCardClass?: string;
10
- };
11
-
12
- export function CompositionsOverview({ compositions, compositionCardClass }: CompositionsOverviewProps) {
13
- return (
14
- <div className={styles.background}>
15
- {compositions &&
16
- Object.entries(compositions).map(([key, composition]) => (
17
- <CompositionCard key={key} Composition={composition} name={key} className={compositionCardClass} />
18
- ))}
19
- </div>
20
- );
21
- }
@@ -1 +0,0 @@
1
- export * from './compositions-overview';
@@ -1,119 +0,0 @@
1
- .linkWrapper {
2
- padding: 0 12px;
3
- display: flex;
4
- align-items: center;
5
- justify-content: space-between;
6
- height: 40px;
7
- font-size: var(--bit-p-xs);
8
- transition: all 300ms ease-in-out;
9
-
10
- &:hover {
11
- background-color: var(--bit-border-color-lightest, #ededed);
12
- // border-radius: 8px;
13
- transition: background-color 300ms ease-in-out;
14
- .right {
15
- visibility: unset;
16
- opacity: 1;
17
- color: var(--bit-text-color-light, #6c707c);
18
- //TODO - fix hover effect and timing of icon
19
- transition: visibility 200ms, opacity 100ms ease-in-out;
20
- .icon {
21
- &:hover {
22
- color: var(--bit-text-color-heavy);
23
- }
24
- }
25
- }
26
- }
27
- &.active {
28
- display: flex;
29
- align-items: center;
30
- background-color: var(--bit-accent-color, #6c5ce7);
31
- color: var(--bit-bg-color, #ffffff);
32
-
33
- // overrides
34
- &:hover {
35
- background-color: #5d4aec;
36
- }
37
-
38
- .box {
39
- background-color: var(--bit-bg-color, #ffffff);
40
- }
41
-
42
- .right {
43
- visibility: unset;
44
- opacity: 1;
45
- color: var(--bit-accent-bg, #eceaff);
46
- .icon {
47
- &:hover {
48
- color: var(--bit-bg-color, #ffffff);
49
- }
50
- }
51
- }
52
- }
53
- .right {
54
- opacity: 0;
55
- visibility: hidden;
56
- font-size: 13px;
57
- transition: visibility 200ms, opacity 100ms ease-in-out;
58
- }
59
- }
60
-
61
- .box {
62
- width: 10px;
63
- height: 10px;
64
- flex-shrink: 0;
65
- background-color: var(--bit-text-color-heavy);
66
- margin-right: 11px;
67
- border-radius: 1px;
68
- }
69
- .name {
70
- overflow: hidden;
71
- text-overflow: ellipsis;
72
- white-space: nowrap;
73
- margin-right: 8px;
74
- }
75
- .panelLink {
76
- display: flex;
77
- align-items: center;
78
- cursor: pointer;
79
- user-select: none;
80
- width: 100%;
81
- height: 100%;
82
- text-decoration: none;
83
- color: inherit;
84
- min-width: 0;
85
-
86
- &:active {
87
- color: inherit;
88
- }
89
- }
90
-
91
- .tabs {
92
- display: flex;
93
- align-items: center;
94
- margin-bottom: 17px;
95
- > div {
96
- position: relative;
97
- padding: 8px;
98
- text-transform: uppercase;
99
- font-size: 12px;
100
- font-weight: bold;
101
- &:not(:first-child) {
102
- color: #878c9a;
103
- }
104
-
105
- &:first-child {
106
- &:before {
107
- content: '';
108
- position: absolute;
109
- top: 0;
110
- left: 0;
111
- right: 0;
112
- background-color: var(--bit-accent-color, #6c5ce7);
113
- height: 3px;
114
- border-radius: 10px;
115
- transition: background-color 300ms, height 300ms;
116
- }
117
- }
118
- }
119
- }