@teambit/component 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 (101) hide show
  1. package/dist/aspect-list.d.ts +18 -0
  2. package/dist/component-factory.d.ts +49 -0
  3. package/dist/component-fs.d.ts +20 -1
  4. package/dist/component-map/component-map.d.ts +32 -0
  5. package/dist/component-meta.d.ts +11 -1
  6. package/dist/component.d.ts +96 -1
  7. package/dist/component.main.runtime.d.ts +30 -1
  8. package/dist/component.ui.runtime.d.ts +21 -1
  9. package/dist/config.d.ts +18 -1
  10. package/dist/dependencies/dependencies.d.ts +18 -0
  11. package/dist/exceptions/host-not-found.d.ts +8 -1
  12. package/dist/hash.d.ts +3 -0
  13. package/dist/show/show-fragment.d.ts +23 -0
  14. package/dist/snap/author.d.ts +12 -0
  15. package/dist/snap/snap.d.ts +39 -1
  16. package/dist/state.d.ts +44 -1
  17. package/dist/tag/tag.d.ts +21 -1
  18. package/dist/tag-map.d.ts +19 -0
  19. package/dist/ui/component-error/component-error.d.ts +15 -1
  20. package/dist/ui/component-model/component-model.d.ts +102 -1
  21. package/dist/ui/component.d.ts +3 -0
  22. package/dist/ui/context/component-provider.d.ts +6 -0
  23. package/dist/ui/menu/menu.d.ts +12 -0
  24. package/dist/ui/use-component-query.d.ts +1 -0
  25. package/package.json +40 -34
  26. package/aspect-entry.ts +0 -67
  27. package/aspect-list.ts +0 -100
  28. package/aspect.section.tsx +0 -16
  29. package/component-factory.ts +0 -106
  30. package/component-fs.ts +0 -60
  31. package/component-map/component-map.ts +0 -106
  32. package/component-map/index.ts +0 -1
  33. package/component-meta.ts +0 -29
  34. package/component.aspect.ts +0 -9
  35. package/component.docs.mdx +0 -8
  36. package/component.graphql.ts +0 -202
  37. package/component.main.runtime.ts +0 -162
  38. package/component.route.ts +0 -26
  39. package/component.ts +0 -278
  40. package/component.ui.runtime.tsx +0 -216
  41. package/config.ts +0 -34
  42. package/dependencies/dependencies.ts +0 -74
  43. package/dependencies/index.ts +0 -1
  44. package/exceptions/could-not-find-latest.ts +0 -8
  45. package/exceptions/host-not-found.ts +0 -14
  46. package/exceptions/index.ts +0 -4
  47. package/exceptions/nothing-to-snap.ts +0 -1
  48. package/hash.ts +0 -4
  49. package/head.ts +0 -0
  50. package/history-graph.ts +0 -1
  51. package/host/component-host-model.ts +0 -9
  52. package/host/index.ts +0 -2
  53. package/host/use-component-host.ts +0 -39
  54. package/index.ts +0 -32
  55. package/on-load.ts +0 -0
  56. package/package-tar/teambit-component-0.0.551.tgz +0 -0
  57. package/section/index.ts +0 -1
  58. package/section/section.tsx +0 -8
  59. package/show/extensions.fragment.ts +0 -23
  60. package/show/files.fragment.ts +0 -24
  61. package/show/id.fragment.ts +0 -20
  62. package/show/index.ts +0 -8
  63. package/show/main-file.fragment.ts +0 -13
  64. package/show/name.fragment.ts +0 -13
  65. package/show/scope.fragment.ts +0 -15
  66. package/show/show-fragment.ts +0 -44
  67. package/show/show.cmd.ts +0 -85
  68. package/snap/author.ts +0 -19
  69. package/snap/index.ts +0 -2
  70. package/snap/snap.ts +0 -63
  71. package/state.ts +0 -73
  72. package/store.ts +0 -3
  73. package/tag/index.ts +0 -1
  74. package/tag/tag.ts +0 -37
  75. package/tag-map.ts +0 -87
  76. package/tsconfig.json +0 -35
  77. package/types/asset.d.ts +0 -29
  78. package/types/style.d.ts +0 -42
  79. package/ui/aspect-page/aspect-page.module.scss +0 -20
  80. package/ui/aspect-page/aspect-page.tsx +0 -64
  81. package/ui/aspect-page/index.ts +0 -1
  82. package/ui/component-error/component-error.tsx +0 -22
  83. package/ui/component-error/index.ts +0 -1
  84. package/ui/component-model/component-model.ts +0 -169
  85. package/ui/component-model/index.ts +0 -1
  86. package/ui/component.module.scss +0 -7
  87. package/ui/component.tsx +0 -48
  88. package/ui/context/component-context.ts +0 -5
  89. package/ui/context/component-provider.tsx +0 -20
  90. package/ui/context/index.ts +0 -2
  91. package/ui/index.ts +0 -3
  92. package/ui/menu/index.ts +0 -2
  93. package/ui/menu/menu-nav.tsx +0 -37
  94. package/ui/menu/menu.module.scss +0 -62
  95. package/ui/menu/menu.tsx +0 -94
  96. package/ui/menu/nav-plugin.tsx +0 -9
  97. package/ui/top-bar-nav/index.ts +0 -1
  98. package/ui/top-bar-nav/top-bar-nav.module.scss +0 -52
  99. package/ui/top-bar-nav/top-bar-nav.tsx +0 -26
  100. package/ui/use-component-query.ts +0 -195
  101. package/ui/use-component.tsx +0 -34
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,20 +0,0 @@
1
- .aspectPage {
2
- padding: 50px 40px 100px 40px;
3
- width: 100%;
4
- overflow-y: scroll;
5
- box-sizing: border-box;
6
- > div {
7
- max-width: 1440px;
8
- margin: 0 auto;
9
- }
10
- }
11
- .title {
12
- margin-bottom: 25px;
13
- font-size: var(--bit-h-xs, 26px);
14
- }
15
- .separator {
16
- margin-bottom: 41px;
17
- }
18
- .aspectBox {
19
- margin-bottom: 32px;
20
- }
@@ -1,64 +0,0 @@
1
- import { AspectBox } from '@teambit/harmony.ui.aspect-box';
2
- import { ComponentContext } from '@teambit/component';
3
- import React, { useContext } from 'react';
4
- import { useDataQuery } from '@teambit/ui-foundation.ui.hooks.use-data-query';
5
- import { gql } from '@apollo/client';
6
- import { EmptyBox } from '@teambit/design.ui.empty-box';
7
- import { H1 } from '@teambit/documenter.ui.heading';
8
- import { Separator } from '@teambit/documenter.ui.separator';
9
- import styles from './aspect-page.module.scss';
10
-
11
- const GET_COMPONENT = gql`
12
- query($id: String!) {
13
- getHost {
14
- get(id: $id) {
15
- aspects {
16
- id
17
- config
18
- data
19
- icon
20
- }
21
- }
22
- }
23
- }
24
- `;
25
-
26
- export function AspectPage() {
27
- const component = useContext(ComponentContext);
28
- const { data } = useDataQuery(GET_COMPONENT, {
29
- variables: { id: component.id._legacy.name },
30
- });
31
- const aspectList = data?.getHost?.get?.aspects;
32
-
33
- if (aspectList && aspectList.length === 0) {
34
- return (
35
- <EmptyBox
36
- title="This component is new and doesn’t have any aspects."
37
- linkText="Learn more about component aspects"
38
- link="https://harmony-docs.bit.dev/aspects/aspects-overview"
39
- />
40
- );
41
- }
42
-
43
- return (
44
- <div className={styles.aspectPage}>
45
- <div>
46
- <H1 className={styles.title}>Configuration</H1>
47
- <Separator className={styles.separator} />
48
- {aspectList &&
49
- aspectList.map((aspect, index) => {
50
- return (
51
- <AspectBox
52
- key={index}
53
- className={styles.aspectBox}
54
- name={aspect.id}
55
- icon={aspect.icon}
56
- config={aspect.config}
57
- data={aspect.data}
58
- />
59
- );
60
- })}
61
- </div>
62
- </div>
63
- );
64
- }
@@ -1 +0,0 @@
1
- export { AspectPage } from './aspect-page';
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import { NotFoundPage } from '@teambit/design.ui.pages.not-found';
3
- import { ServerErrorPage } from '@teambit/design.ui.pages.server-error';
4
-
5
- export class ComponentError {
6
- constructor(
7
- /**
8
- * http status code of error
9
- */
10
- public readonly code: number,
11
-
12
- /**
13
- * error message of the error
14
- */
15
- public readonly message?: string
16
- ) {}
17
-
18
- renderError() {
19
- if (this.code === 404) return <NotFoundPage />;
20
- return <ServerErrorPage />;
21
- }
22
- }
@@ -1 +0,0 @@
1
- export { ComponentError } from './component-error';
@@ -1,169 +0,0 @@
1
- import { Composition, CompositionProps } from '@teambit/compositions';
2
- import { DeprecationInfo } from '@teambit/deprecation';
3
- import { Descriptor } from '@teambit/envs';
4
- import { ComponentID, ComponentIdObj } from '@teambit/component-id';
5
-
6
- import { Tag } from '../../tag';
7
- import { TagMap } from '../../tag-map';
8
- import { TagProps } from '../../tag/tag';
9
- // import { Snap } from '../../snap';
10
-
11
- // ADDING MORE PROPERTIES HERE IS NOT ALLOWED!!! IF YOU NEED DATA PLEASE ADD A NEW
12
- // HOOK FROM YOUR ASPECT!!!
13
- // TODO: remove all properties from here to their rightful place in their aspects.
14
- export type ComponentModelProps = {
15
- id: ComponentIdObj;
16
- description: string;
17
- buildStatus?: string;
18
- server?: ComponentServer;
19
- displayName: string;
20
- packageName: string; // pkg aspect
21
- elementsUrl?: string; // pkg aspect
22
- compositions?: CompositionProps[];
23
- tags?: TagProps[];
24
- issuesCount?: number; // component/issues aspect
25
- status?: any; // workspace aspect.
26
- deprecation?: DeprecationInfo; // deprecation aspect
27
- env?: Descriptor; // env aspect.
28
- labels?: string[];
29
- host?: string;
30
- };
31
-
32
- export type ComponentServer = {
33
- env: string;
34
- url: string;
35
- };
36
-
37
- export class ComponentModel {
38
- constructor(
39
- /**
40
- * id of the component
41
- */
42
- readonly id: ComponentID,
43
-
44
- /**
45
- * display name of the component.
46
- */
47
- readonly displayName: string,
48
-
49
- /**
50
- * package name of the component.
51
- */
52
- readonly packageName: string,
53
-
54
- /**
55
- * the component server.
56
- */
57
- readonly server: ComponentServer | undefined,
58
-
59
- /**
60
- * array of compositions
61
- */
62
- readonly compositions: Composition[],
63
-
64
- /**
65
- * tags of the component.
66
- */
67
- readonly tags: TagMap,
68
-
69
- /**
70
- * component build status
71
- */
72
- readonly buildStatus?: string,
73
-
74
- /**
75
- * issues of component.
76
- */
77
- readonly issuesCount?: number,
78
- /**
79
- * elements url
80
- */
81
- readonly elementsUrl?: string,
82
- /**
83
- * status of component.
84
- */
85
- readonly status?: any,
86
-
87
- /**
88
- * deprecation info of the component.
89
- */
90
- readonly deprecation?: DeprecationInfo,
91
-
92
- /**
93
- * env descriptor.
94
- */
95
- readonly environment?: Descriptor,
96
-
97
- /**
98
- * description of the component.
99
- */
100
-
101
- readonly description = '',
102
-
103
- readonly labels: string[] = [],
104
-
105
- /**
106
- * host of the component
107
- */
108
- readonly host?: string
109
- ) {}
110
-
111
- get version() {
112
- if (!this.id.version) return 'new';
113
- return this.id.version;
114
- }
115
-
116
- /**
117
- * create an instance of a component from a plain object.
118
- */
119
- static from({
120
- id,
121
- server,
122
- displayName,
123
- compositions = [],
124
- packageName,
125
- elementsUrl,
126
- tags = [],
127
- deprecation,
128
- buildStatus,
129
- env,
130
- status,
131
- issuesCount,
132
- description,
133
- labels,
134
- host,
135
- }: ComponentModelProps) {
136
- return new ComponentModel(
137
- ComponentID.fromObject(id),
138
- displayName,
139
- packageName,
140
- server,
141
- Composition.fromArray(compositions),
142
- TagMap.fromArray(tags.map((tag) => Tag.fromObject(tag))),
143
- buildStatus,
144
- issuesCount,
145
- elementsUrl,
146
- status,
147
- deprecation,
148
- env,
149
- description,
150
- labels,
151
- host
152
- );
153
- }
154
-
155
- static fromArray(componentsProps: ComponentModelProps[]) {
156
- return componentsProps.map((rawComponent) => ComponentModel.from(rawComponent));
157
- }
158
-
159
- static empty() {
160
- return new ComponentModel(
161
- ComponentID.fromObject({ name: 'root', scope: 'temp' }),
162
- '',
163
- '',
164
- { env: '', url: '' },
165
- [],
166
- TagMap.empty()
167
- );
168
- }
169
- }
@@ -1 +0,0 @@
1
- export { ComponentModel, ComponentModelProps } from './component-model';
@@ -1,7 +0,0 @@
1
- $topbarHeight: 64px;
2
-
3
- .container {
4
- height: 100%;
5
- display: flex;
6
- flex-direction: column;
7
- }
package/ui/component.tsx DELETED
@@ -1,48 +0,0 @@
1
- import React, { useEffect, ReactNode, useMemo } from 'react';
2
- import flatten from 'lodash.flatten';
3
- import { RouteSlot, SlotSubRouter } from '@teambit/ui-foundation.ui.react-router.slot-router';
4
- import { SlotRegistry } from '@teambit/harmony';
5
-
6
- import styles from './component.module.scss';
7
- import { ComponentProvider } from './context';
8
- import { useComponent } from './use-component';
9
- import { ComponentModel } from './component-model';
10
-
11
- export type ComponentPageSlot = SlotRegistry<ComponentPageElement[]>;
12
- export type ComponentPageElement = {
13
- type: 'before' | 'after';
14
- content: ReactNode;
15
- };
16
-
17
- export type ComponentProps = {
18
- containerSlot?: ComponentPageSlot;
19
- routeSlot: RouteSlot;
20
- host: string;
21
- onComponentChange?: (activeComponent?: ComponentModel) => void;
22
- };
23
-
24
- /**
25
- * main UI component of the Component extension.
26
- */
27
- export function Component({ routeSlot, containerSlot, host, onComponentChange }: ComponentProps) {
28
- const { component, error } = useComponent(host);
29
- // trigger onComponentChange when component changes
30
- useEffect(() => onComponentChange?.(component), [component]);
31
- // cleanup when unmounting component
32
- useEffect(() => () => onComponentChange?.(undefined), []);
33
-
34
- const pageItems = useMemo(() => flatten(containerSlot?.values()), [containerSlot]);
35
- const before = useMemo(() => pageItems.filter((x) => x.type === 'before').map((x) => x.content), [pageItems]);
36
- const after = useMemo(() => pageItems.filter((x) => x.type === 'after').map((x) => x.content), [pageItems]);
37
-
38
- if (error) return error.renderError();
39
- if (!component) return <div></div>;
40
-
41
- return (
42
- <ComponentProvider component={component}>
43
- {before}
44
- <div className={styles.container}>{routeSlot && <SlotSubRouter slot={routeSlot} />}</div>
45
- {after}
46
- </ComponentProvider>
47
- );
48
- }
@@ -1,5 +0,0 @@
1
- import { createContext } from 'react';
2
-
3
- import { ComponentModel } from '../component-model';
4
-
5
- export const ComponentContext: React.Context<ComponentModel> = createContext<ComponentModel>(ComponentModel.empty());
@@ -1,20 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
-
3
- import { ComponentModel } from '../component-model';
4
- import { ComponentContext } from './component-context';
5
-
6
- export type ComponentProviderProps = {
7
- /**
8
- * component model.
9
- */
10
- component: ComponentModel;
11
-
12
- /**
13
- * component children.
14
- */
15
- children: ReactNode;
16
- };
17
-
18
- export function ComponentProvider({ component, children }: ComponentProviderProps) {
19
- return <ComponentContext.Provider value={component}>{children}</ComponentContext.Provider>;
20
- }
@@ -1,2 +0,0 @@
1
- export { ComponentContext } from './component-context';
2
- export { ComponentProvider } from './component-provider';
package/ui/index.ts DELETED
@@ -1,3 +0,0 @@
1
- export { Component } from './component';
2
- export { ComponentModel, ComponentModelProps } from './component-model';
3
- export { ComponentContext, ComponentProvider } from './context';
package/ui/menu/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export { Menu } from './menu';
2
- export type { NavPlugin, OrderedNavigationSlot } from './nav-plugin';
@@ -1,37 +0,0 @@
1
- import React from 'react';
2
-
3
- import { TopBarNav } from '../top-bar-nav';
4
- import styles from './menu.module.scss';
5
- import { NavPlugin, OrderedNavigationSlot } from './nav-plugin';
6
-
7
- export function MenuNav({ navigationSlot }: { navigationSlot: OrderedNavigationSlot }) {
8
- const plugins = navigationSlot.toArray().sort(sortFn);
9
-
10
- return (
11
- <nav className={styles.navigation}>
12
- {plugins.map(([id, menuItem]) => (
13
- <TopBarNav key={id} {...menuItem.props} />
14
- ))}
15
- </nav>
16
- );
17
- }
18
-
19
- function sortFn([, { order: first }]: [string, NavPlugin], [, { order: second }]: [string, NavPlugin]) {
20
- // 0 - equal
21
- // <0 - first < second
22
- // >0 - first > second
23
-
24
- return (first ?? 0) - (second ?? 0);
25
- }
26
-
27
- // // this is the aspect-oriented and serialize-able way to sort plugins.
28
- // const pluginOrder = ['teambit.docs/docs', 'teambit.compositions/compositions', 'teambit.docs/docs'];
29
- // export function toSortedArray<T>(slot: SlotRegistry<T>, order: string[]) {
30
- // // sort items according to the order
31
- // const sorted = order.map((x) => [x, slot.get(x)]).filter(([, val]) => !!val) as [string, T][];
32
- //
33
- // // add all other items
34
- // const unsorted = slot.toArray().filter(([id]) => order.indexOf(id) < 0);
35
- //
36
- // return sorted.concat(unsorted);
37
- // }
@@ -1,62 +0,0 @@
1
- .topBar {
2
- display: flex;
3
- justify-content: space-between;
4
- align-items: center;
5
- width: 100%;
6
- height: 100%;
7
- }
8
-
9
- .leftSide {
10
- display: flex;
11
- align-items: center;
12
- height: 100%;
13
- }
14
-
15
- .navigation {
16
- display: flex;
17
- list-style: none;
18
- height: 100%;
19
- padding-left: 28px;
20
- @media screen and (max-width: 768px) {
21
- padding-left: 6px;
22
- }
23
-
24
- > li {
25
- display: block;
26
- margin-right: 16px;
27
- height: 100%;
28
- }
29
- }
30
-
31
- .rightSide {
32
- display: flex;
33
- align-items: center;
34
- height: 100%;
35
- > * {
36
- margin-right: 12px;
37
- &:last-child {
38
- margin-right: 16px;
39
- }
40
- }
41
- .widgets {
42
- height: 100%;
43
- margin-right: 20px;
44
- display: flex;
45
- align-items: center;
46
- > nav {
47
- > a {
48
- padding: 0;
49
- &:last-child {
50
- margin-right: 0;
51
- }
52
- }
53
- }
54
- }
55
- .widget {
56
- font-size: 17px;
57
- }
58
- }
59
-
60
- .useBox {
61
- --bit-drawer-margin: 14px;
62
- }
package/ui/menu/menu.tsx DELETED
@@ -1,94 +0,0 @@
1
- import { MainDropdown, MenuItemSlot } from '@teambit/ui-foundation.ui.main-dropdown';
2
- import { VersionDropdown } from '@teambit/component.ui.version-dropdown';
3
- import { FullLoader } from '@teambit/legacy/dist/to-eject/full-loader';
4
- import { flatten, groupBy } from 'lodash';
5
- import classnames from 'classnames';
6
- import React, { useMemo } from 'react';
7
- import { UseBoxDropdown } from '@teambit/ui-foundation.ui.use-box.dropdown';
8
- import { Menu as UseBoxMenu } from '@teambit/ui-foundation.ui.use-box.menu';
9
- import type { ComponentModel } from '../component-model';
10
- import { useComponent } from '../use-component';
11
- import { MenuNav } from './menu-nav';
12
- import styles from './menu.module.scss';
13
- import { OrderedNavigationSlot } from './nav-plugin';
14
-
15
- export type MenuProps = {
16
- className?: string;
17
- /**
18
- * slot for top bar menu nav items
19
- */
20
- navigationSlot: OrderedNavigationSlot;
21
- /**
22
- * right side menu item slot
23
- */
24
- widgetSlot: OrderedNavigationSlot;
25
- host: string;
26
- /**
27
- * main dropdown item slot
28
- */
29
- menuItemSlot: MenuItemSlot;
30
- };
31
-
32
- /**
33
- * top bar menu.
34
- */
35
- export function Menu({ navigationSlot, widgetSlot, className, host, menuItemSlot }: MenuProps) {
36
- const { component } = useComponent(host);
37
- const mainMenuItems = useMemo(() => groupBy(flatten(menuItemSlot.values()), 'category'), [menuItemSlot]);
38
-
39
- if (!component) return <FullLoader />;
40
-
41
- return (
42
- <div className={classnames(styles.topBar, className)}>
43
- <div className={styles.leftSide}>
44
- <MenuNav navigationSlot={navigationSlot} />
45
- </div>
46
- <div className={styles.rightSide}>
47
- <div className={styles.widgets}>
48
- <MenuNav navigationSlot={widgetSlot} />
49
- </div>
50
- <VersionRelatedDropdowns component={component} />
51
- <MainDropdown menuItems={mainMenuItems} />
52
- </div>
53
- </div>
54
- );
55
- }
56
-
57
- function VersionRelatedDropdowns({ component }: { component: ComponentModel }) {
58
- const versionList =
59
- useMemo(
60
- () =>
61
- component.tags
62
- ?.toArray()
63
- .map((tag) => tag?.version?.version)
64
- .filter((x) => x !== undefined)
65
- .reverse(),
66
- [component.tags]
67
- ) || [];
68
-
69
- const isLatestVersion = useMemo(() => component.version === versionList[0], [component.version]);
70
- const packageVersion = useMemo(() => (isLatestVersion ? '' : `@${component.version}`), [component.version]);
71
- const origin = typeof window !== undefined ? window.location.origin : undefined;
72
- const finalElementsUrl = origin && component.elementsUrl ? `${origin}${component.elementsUrl}` : undefined;
73
-
74
- return (
75
- <>
76
- {versionList.length > 0 && (
77
- <UseBoxDropdown
78
- position="bottom-end"
79
- className={styles.useBox}
80
- Menu={() => (
81
- <UseBoxMenu
82
- componentName={component.id.name}
83
- componentId={component.id.toString({ ignoreVersion: isLatestVersion })}
84
- packageName={`${component.packageName}${packageVersion}`}
85
- elementsUrl={finalElementsUrl}
86
- registryName={component.packageName.split('/')[0]}
87
- />
88
- )}
89
- />
90
- )}
91
- <VersionDropdown versions={versionList} currentVersion={component.version} />
92
- </>
93
- );
94
- }
@@ -1,9 +0,0 @@
1
- import { SlotRegistry } from '@teambit/harmony';
2
- import { NavLinkProps } from '@teambit/base-ui.routing.nav-link';
3
-
4
- export type NavPlugin = {
5
- props: NavLinkProps;
6
- order?: number;
7
- };
8
-
9
- export type OrderedNavigationSlot = SlotRegistry<NavPlugin>;
@@ -1 +0,0 @@
1
- export * from './top-bar-nav';
@@ -1,52 +0,0 @@
1
- .topBarLink {
2
- position: relative;
3
- padding: 0 8px;
4
-
5
- box-sizing: border-box;
6
-
7
- display: flex;
8
- align-items: center;
9
-
10
- color: inherit;
11
- text-decoration: none;
12
-
13
- transition: color 300ms;
14
- margin: 0 5px;
15
-
16
- &:hover:not(.active) {
17
- > div {
18
- background-color: var(--bit-bg-heavy);
19
- }
20
- }
21
-
22
- &.active {
23
- color: var(--bit-accent-color, #6c5ce7);
24
-
25
- &:after {
26
- background-color: var(--bit-accent-color, #6c5ce7);
27
- height: 4px;
28
- }
29
- }
30
-
31
- &:after {
32
- content: '';
33
- position: absolute;
34
- bottom: 0;
35
- left: 0;
36
- right: 0;
37
- background-color: transparent;
38
- height: 0;
39
- border-top-right-radius: 2px;
40
- border-top-left-radius: 2px;
41
- transition: background-color 300ms, height 300ms;
42
- }
43
-
44
- > div {
45
- border-radius: 6px;
46
- padding: 0 8px;
47
- height: 30px;
48
- display: flex;
49
- align-items: center;
50
- transition: background-color 300ms ease-in-out;
51
- }
52
- }