@teambit/compositions 0.0.553 → 0.0.557

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 +34 -26
  8. package/tsconfig.json +1 -2
  9. package/composition.section.tsx +0 -29
  10. package/composition.ts +0 -44
  11. package/compositions.aspect.ts +0 -9
  12. package/compositions.docs.mdx +0 -8
  13. package/compositions.graphql.ts +0 -32
  14. package/compositions.main.runtime.ts +0 -164
  15. package/compositions.module.scss +0 -100
  16. package/compositions.preview-definition.ts +0 -21
  17. package/compositions.preview.runtime.ts +0 -67
  18. package/compositions.tsx +0 -185
  19. package/compositions.ui.runtime.tsx +0 -53
  20. package/index.ts +0 -10
  21. package/package-tar/teambit-compositions-0.0.553.tgz +0 -0
  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,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
- }
@@ -1,58 +0,0 @@
1
- import { Icon } from '@teambit/evangelist.elements.icon';
2
- import classNames from 'classnames';
3
- import React, { useCallback } from 'react';
4
-
5
- import { Composition } from '../../composition';
6
- import styles from './compositions-panel.module.scss';
7
-
8
- export type CompositionsPanelProps = {
9
- compositions: Composition[];
10
- onSelectComposition: (composition: Composition) => void;
11
- active?: Composition;
12
- url: string;
13
- } & React.HTMLAttributes<HTMLUListElement>;
14
-
15
- export function CompositionsPanel({
16
- url,
17
- compositions,
18
- onSelectComposition: onSelect,
19
- active,
20
- className,
21
- ...rest
22
- }: CompositionsPanelProps) {
23
- const handleSelect = useCallback(
24
- (selected: Composition) => {
25
- onSelect && onSelect(selected);
26
- },
27
- [onSelect]
28
- );
29
-
30
- return (
31
- <ul {...rest} className={classNames(className)}>
32
- {compositions.map((composition) => {
33
- // TODO - move to composition panel node
34
- return (
35
- <li
36
- key={composition.identifier}
37
- className={classNames(styles.linkWrapper, composition === active && styles.active)}
38
- >
39
- <a className={styles.panelLink} onClick={() => handleSelect(composition)}>
40
- <span className={styles.box}></span>
41
- <span className={styles.name}>{composition.displayName}</span>
42
- </a>
43
- <div className={styles.right}>
44
- <a
45
- className={styles.panelLink}
46
- target="_blank"
47
- rel="noopener noreferrer"
48
- href={`${url}&${composition.identifier}`}
49
- >
50
- <Icon className={styles.icon} of="open-tab" />
51
- </a>
52
- </div>
53
- </li>
54
- );
55
- })}
56
- </ul>
57
- );
58
- }
File without changes
@@ -1,15 +0,0 @@
1
- .linkWrapper {
2
- background-color: var(--bit-accent-color, #6c5ce7);
3
- &.active {
4
- display: flex;
5
- background-color: var(--bit-accent-color, #6c5ce7);
6
- height: 40px;
7
- }
8
- }
9
- .panelLink {
10
- cursor: pointer;
11
- }
12
-
13
- .composition {
14
- width: 200px;
15
- }
@@ -1,22 +0,0 @@
1
- import classNames from 'classnames';
2
- import React from 'react';
3
-
4
- import styles from './compositions-panel-node.module.scss';
5
-
6
- export type CompositionsPanelNodeProps = {
7
- name: string;
8
- onClick: (event: React.MouseEvent<HTMLAnchorElement>) => void;
9
- isActive: boolean;
10
- } & React.HTMLAttributes<HTMLLIElement>;
11
-
12
- export function CompositionsPanelNode({ name, onClick, isActive, ...rest }: CompositionsPanelNodeProps) {
13
- return (
14
- <li {...rest}>
15
- <div className={classNames(styles.linkWrapper, { [styles.active]: isActive })}>
16
- <a className={styles.panelLink} onClick={onClick}>
17
- {name}
18
- </a>
19
- </div>
20
- </li>
21
- );
22
- }
@@ -1 +0,0 @@
1
- export * from './compositions-panel-node';
package/ui/index.ts DELETED
@@ -1 +0,0 @@
1
- export { ComponentComposition } from './composition-preview';
@@ -1,14 +0,0 @@
1
- // import gql from 'graphql-tag';
2
- // import { ComponentModel } from '../../component';
3
- // import { Composition } from '../composition';
4
- // import { useDataQuery } from '../../ui';
5
-
6
- // const GET_COMPOSITIONS = gql`
7
- // compositions: {
8
-
9
- // }
10
- // `;
11
-
12
- // export function useCompositions(component: ComponentModel): Composition[] | [] {
13
- // useDataQuery();
14
- // }