@teambit/compositions 1.0.956 → 1.0.958
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/compositions.module.scss +232 -13
- package/compositions.tsx +85 -11
- package/dist/compositions.js +107 -3
- package/dist/compositions.js.map +1 -1
- package/dist/compositions.module.scss +232 -13
- package/dist/{preview-1776699657100.js → preview-1776774270951.js} +2 -2
- package/dist/ui/compositions-panel/compositions-panel.d.ts +0 -15
- package/dist/ui/compositions-panel/compositions-panel.js +10 -59
- package/dist/ui/compositions-panel/compositions-panel.js.map +1 -1
- package/dist/ui/compositions-panel/compositions-panel.module.scss +71 -119
- package/dist/ui/compositions-panel/live-control-input.module.scss +79 -22
- package/dist/ui/compositions-panel/live-control-panel.module.scss +29 -7
- package/dist/ui/compositions-panel/live-controls-diff-panel.module.scss +34 -34
- package/dist/ui/compositions-panel/overlay.module.scss +4 -2
- package/package.json +19 -20
- package/ui/compositions-panel/compositions-panel.module.scss +71 -119
- package/ui/compositions-panel/compositions-panel.tsx +40 -86
- package/ui/compositions-panel/live-control-input.module.scss +79 -22
- package/ui/compositions-panel/live-control-panel.module.scss +29 -7
- package/ui/compositions-panel/live-controls-diff-panel.module.scss +34 -34
- package/ui/compositions-panel/overlay.module.scss +4 -2
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
z-index: $modal-z-index - 1;
|
|
6
6
|
overflow-y: auto;
|
|
7
7
|
background: var(--surface-neutral-color, #fff);
|
|
8
|
-
border: 1px solid var(--border-
|
|
8
|
+
border: 1px solid var(--bit-border-color-lightest, #eaeaec);
|
|
9
9
|
border-radius: 8px;
|
|
10
|
-
box-shadow:
|
|
10
|
+
box-shadow:
|
|
11
|
+
0 4px 16px rgba(0, 0, 0, 0.08),
|
|
12
|
+
0 1px 3px rgba(0, 0, 0, 0.06);
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
.suppressNativeMenu {
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/compositions",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.958",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/compositions/compositions",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.compositions",
|
|
8
8
|
"name": "compositions",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.958"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"graphql-tag": "2.12.1",
|
|
@@ -16,10 +16,14 @@
|
|
|
16
16
|
"classnames": "^2.5.1",
|
|
17
17
|
"@teambit/compositions.model.composition-id": "0.0.506",
|
|
18
18
|
"@teambit/harmony": "0.4.7",
|
|
19
|
+
"@teambit/cli": "0.0.1318",
|
|
20
|
+
"@teambit/component.sources": "0.0.161",
|
|
21
|
+
"@teambit/legacy.consumer-component": "0.0.110",
|
|
19
22
|
"@teambit/toolbox.path.match-patterns": "0.0.27",
|
|
20
23
|
"@teambit/ui-foundation.ui.constants.z-indexes": "0.0.504",
|
|
21
24
|
"@teambit/base-ui.surfaces.split-pane.hover-splitter": "1.0.1",
|
|
22
25
|
"@teambit/base-ui.surfaces.split-pane.split-pane": "1.0.0",
|
|
26
|
+
"@teambit/compositions.ui.composition-live-controls": "0.0.6",
|
|
23
27
|
"@teambit/compositions.ui.compositions-menu-bar": "0.0.177",
|
|
24
28
|
"@teambit/compositions.ui.hooks.use-composition": "0.0.177",
|
|
25
29
|
"@teambit/design.ui.input.option-button": "1.0.13",
|
|
@@ -29,6 +33,8 @@
|
|
|
29
33
|
"@teambit/documenter.theme.theme-context": "4.0.7",
|
|
30
34
|
"@teambit/documenter.ui.heading": "4.1.8",
|
|
31
35
|
"@teambit/documenter.ui.property-table": "4.1.11",
|
|
36
|
+
"@teambit/evangelist.elements.icon": "1.0.5",
|
|
37
|
+
"@teambit/panels": "0.0.1320",
|
|
32
38
|
"@teambit/preview.ui.component-preview": "1.0.32",
|
|
33
39
|
"@teambit/ui-foundation.ui.buttons.collapser": "0.0.233",
|
|
34
40
|
"@teambit/ui-foundation.ui.hooks.use-is-mobile": "0.0.200",
|
|
@@ -37,13 +43,9 @@
|
|
|
37
43
|
"@teambit/design.ui.surfaces.status-message-card": "0.0.18",
|
|
38
44
|
"@teambit/mdx.ui.mdx-layout": "1.0.12",
|
|
39
45
|
"@teambit/compositions.ui.composition-compare-section": "0.0.103",
|
|
40
|
-
"@teambit/compositions.ui.composition-compare": "0.0.262",
|
|
41
46
|
"@teambit/api-reference.hooks.use-api": "0.0.57",
|
|
42
47
|
"@teambit/workspace.ui.use-workspace-mode": "0.0.2",
|
|
43
|
-
"@teambit/compositions.ui.composition-live-controls": "0.0.6",
|
|
44
|
-
"@teambit/evangelist.elements.icon": "1.0.5",
|
|
45
48
|
"@teambit/ui-foundation.ui.menu-widget-icon": "0.0.502",
|
|
46
|
-
"@teambit/ui-foundation.ui.tree.drawer": "1.0.0",
|
|
47
49
|
"@teambit/design.inputs.selectors.menu-item": "1.1.0",
|
|
48
50
|
"@teambit/design.inputs.date-picker": "0.0.3",
|
|
49
51
|
"@teambit/design.inputs.dropdown": "1.3.3",
|
|
@@ -52,20 +54,17 @@
|
|
|
52
54
|
"@teambit/design.inputs.toggle-switch": "0.0.9",
|
|
53
55
|
"@teambit/design.ui.input.color-picker": "0.0.56",
|
|
54
56
|
"@teambit/base-ui.loaders.skeleton": "1.0.2",
|
|
55
|
-
"@teambit/component": "1.0.
|
|
56
|
-
"@teambit/graphql": "1.0.
|
|
57
|
-
"@teambit/
|
|
58
|
-
"@teambit/
|
|
59
|
-
"@teambit/
|
|
60
|
-
"@teambit/
|
|
61
|
-
"@teambit/
|
|
62
|
-
"@teambit/
|
|
63
|
-
"@teambit/
|
|
64
|
-
"@teambit/
|
|
65
|
-
"@teambit/
|
|
66
|
-
"@teambit/panels": "0.0.1320",
|
|
67
|
-
"@teambit/component-compare": "1.0.956",
|
|
68
|
-
"@teambit/ui": "1.0.956"
|
|
57
|
+
"@teambit/component": "1.0.958",
|
|
58
|
+
"@teambit/graphql": "1.0.958",
|
|
59
|
+
"@teambit/dev-files": "1.0.958",
|
|
60
|
+
"@teambit/envs": "1.0.958",
|
|
61
|
+
"@teambit/preview": "1.0.958",
|
|
62
|
+
"@teambit/schema": "1.0.958",
|
|
63
|
+
"@teambit/scope": "1.0.958",
|
|
64
|
+
"@teambit/workspace": "1.0.958",
|
|
65
|
+
"@teambit/component-compare": "1.0.958",
|
|
66
|
+
"@teambit/compositions.ui.composition-compare": "0.0.263",
|
|
67
|
+
"@teambit/ui": "1.0.958"
|
|
69
68
|
},
|
|
70
69
|
"devDependencies": {
|
|
71
70
|
"@types/lodash": "4.14.165",
|
|
@@ -6,130 +6,74 @@
|
|
|
6
6
|
height: 100%;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
border-bottom: 1px solid var(--bit-border-color-lightest, #ededed);
|
|
15
|
-
|
|
16
|
-
&:hover {
|
|
17
|
-
background: var(--surface-hover-color, #f6f6f6);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
> div:last-child {
|
|
22
|
-
border-bottom: 1px solid var(--bit-border-color-lightest, #ededed);
|
|
23
|
-
}
|
|
9
|
+
// ─── Compositions list ──────────────────────────────────────────────────
|
|
10
|
+
.compositionsList {
|
|
11
|
+
flex: 1 1 auto;
|
|
12
|
+
overflow-y: auto;
|
|
13
|
+
padding: 4px 0;
|
|
24
14
|
}
|
|
25
15
|
|
|
26
|
-
.
|
|
27
|
-
padding: 0
|
|
16
|
+
.compositionItem {
|
|
17
|
+
padding: 0 6px;
|
|
18
|
+
margin: 1px 6px;
|
|
28
19
|
display: flex;
|
|
29
20
|
align-items: center;
|
|
30
21
|
justify-content: space-between;
|
|
31
|
-
height:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
height: 34px;
|
|
23
|
+
border-radius: 6px;
|
|
24
|
+
font-size: 13px;
|
|
25
|
+
transition: all 140ms ease;
|
|
26
|
+
color: var(--on-background-color, #1c2024);
|
|
35
27
|
position: relative;
|
|
36
28
|
|
|
37
29
|
&:hover {
|
|
38
|
-
background
|
|
39
|
-
// border-radius: 8px;
|
|
40
|
-
transition: background-color 300ms ease-in-out;
|
|
30
|
+
background: var(--surface-hover-color, rgba(0, 0, 0, 0.04));
|
|
41
31
|
|
|
42
32
|
.panelLink {
|
|
43
33
|
padding-right: 40px;
|
|
44
34
|
}
|
|
45
35
|
|
|
46
|
-
.
|
|
36
|
+
.itemActions {
|
|
47
37
|
visibility: visible;
|
|
48
38
|
opacity: 1;
|
|
49
|
-
color: var(--bit-text-color-light, #6c707c);
|
|
50
|
-
transition: opacity 100ms ease-in-out;
|
|
51
|
-
|
|
52
|
-
.icon {
|
|
53
|
-
&:hover {
|
|
54
|
-
color: var(--bit-text-color-heavy);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
39
|
}
|
|
58
40
|
}
|
|
59
41
|
|
|
60
42
|
&.active {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
color: var(--bit-bg-color, #ffffff);
|
|
43
|
+
background: var(--bit-accent-color, #6c5ce7);
|
|
44
|
+
color: #ffffff;
|
|
45
|
+
font-weight: 500;
|
|
65
46
|
|
|
66
|
-
// overrides
|
|
67
47
|
&:hover {
|
|
68
|
-
background-color
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.box {
|
|
72
|
-
background-color: var(--bit-bg-color, #ffffff);
|
|
48
|
+
background: color-mix(in srgb, var(--bit-accent-color, #6c5ce7) 88%, #000);
|
|
73
49
|
}
|
|
74
50
|
|
|
75
|
-
.
|
|
76
|
-
// visibility: unset;
|
|
51
|
+
.itemActions {
|
|
77
52
|
opacity: 1;
|
|
78
|
-
|
|
53
|
+
visibility: visible;
|
|
54
|
+
color: rgba(255, 255, 255, 0.7);
|
|
79
55
|
|
|
80
|
-
.
|
|
81
|
-
|
|
82
|
-
color: var(--bit-bg-color, #ffffff);
|
|
83
|
-
}
|
|
56
|
+
.actionIcon:hover {
|
|
57
|
+
color: #ffffff;
|
|
84
58
|
}
|
|
85
59
|
}
|
|
86
|
-
}
|
|
87
60
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
top: 50%;
|
|
92
|
-
transform: translateY(-50%);
|
|
93
|
-
display: flex;
|
|
94
|
-
gap: 12px;
|
|
95
|
-
align-items: center;
|
|
96
|
-
justify-content: center;
|
|
97
|
-
opacity: 0;
|
|
98
|
-
visibility: hidden;
|
|
99
|
-
font-size: 13px;
|
|
100
|
-
transition:
|
|
101
|
-
opacity 100ms ease-in-out,
|
|
102
|
-
visibility 0s linear 100ms;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.codeLink {
|
|
106
|
-
cursor: pointer;
|
|
61
|
+
.compositionDot {
|
|
62
|
+
background: rgba(255, 255, 255, 0.5);
|
|
63
|
+
}
|
|
107
64
|
}
|
|
108
65
|
}
|
|
109
66
|
|
|
110
|
-
.
|
|
111
|
-
width:
|
|
112
|
-
height:
|
|
67
|
+
.compositionDot {
|
|
68
|
+
width: 5px;
|
|
69
|
+
height: 5px;
|
|
70
|
+
border-radius: 50%;
|
|
71
|
+
background: var(--bit-accent-color, #6c5ce7);
|
|
72
|
+
opacity: 0.4;
|
|
113
73
|
flex-shrink: 0;
|
|
114
|
-
background-color: var(--bit-text-color-heavy);
|
|
115
|
-
margin-right: 11px;
|
|
116
|
-
border-radius: 1px;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.name {
|
|
120
|
-
overflow: hidden;
|
|
121
|
-
text-overflow: ellipsis;
|
|
122
|
-
white-space: nowrap;
|
|
123
74
|
margin-right: 8px;
|
|
124
75
|
}
|
|
125
76
|
|
|
126
|
-
.iconLink {
|
|
127
|
-
display: flex;
|
|
128
|
-
align-items: center;
|
|
129
|
-
color: inherit;
|
|
130
|
-
text-decoration: none;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
77
|
.panelLink {
|
|
134
78
|
display: flex;
|
|
135
79
|
align-items: center;
|
|
@@ -140,51 +84,59 @@
|
|
|
140
84
|
text-decoration: none;
|
|
141
85
|
color: inherit;
|
|
142
86
|
min-width: 0;
|
|
143
|
-
transition: padding-right
|
|
87
|
+
transition: padding-right 140ms ease;
|
|
144
88
|
|
|
145
89
|
&:active {
|
|
146
90
|
color: inherit;
|
|
147
91
|
}
|
|
148
92
|
}
|
|
149
93
|
|
|
150
|
-
.
|
|
151
|
-
|
|
94
|
+
.name {
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
text-overflow: ellipsis;
|
|
97
|
+
white-space: nowrap;
|
|
152
98
|
}
|
|
153
99
|
|
|
154
|
-
.
|
|
100
|
+
.itemActions {
|
|
101
|
+
position: absolute;
|
|
102
|
+
right: 8px;
|
|
103
|
+
top: 50%;
|
|
104
|
+
transform: translateY(-50%);
|
|
155
105
|
display: flex;
|
|
106
|
+
gap: 6px;
|
|
156
107
|
align-items: center;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
padding: 8px;
|
|
162
|
-
text-transform: uppercase;
|
|
163
|
-
font-size: 12px;
|
|
164
|
-
font-weight: bold;
|
|
108
|
+
opacity: 0;
|
|
109
|
+
visibility: hidden;
|
|
110
|
+
transition: opacity 100ms ease;
|
|
111
|
+
}
|
|
165
112
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
113
|
+
.actionIcon {
|
|
114
|
+
display: flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
justify-content: center;
|
|
117
|
+
width: 22px;
|
|
118
|
+
height: 22px;
|
|
119
|
+
border-radius: 4px;
|
|
120
|
+
color: var(--bit-text-color-light, #8b8d98);
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
transition: all 100ms ease;
|
|
123
|
+
text-decoration: none;
|
|
124
|
+
font-size: 12px;
|
|
169
125
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
position: absolute;
|
|
174
|
-
top: 0;
|
|
175
|
-
left: 0;
|
|
176
|
-
right: 0;
|
|
177
|
-
background-color: var(--bit-accent-color, #6c5ce7);
|
|
178
|
-
height: 3px;
|
|
179
|
-
border-radius: 10px;
|
|
180
|
-
transition:
|
|
181
|
-
background-color 300ms,
|
|
182
|
-
height 300ms;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
126
|
+
&:hover {
|
|
127
|
+
color: var(--bit-text-color-heavy, #1c2024);
|
|
128
|
+
background: rgba(0, 0, 0, 0.06);
|
|
185
129
|
}
|
|
186
130
|
}
|
|
187
131
|
|
|
132
|
+
.iconLink {
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
color: inherit;
|
|
136
|
+
text-decoration: none;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// ─── Legacy compat ──────────────────────────────────────────────────────
|
|
188
140
|
.liveControlsSkeleton {
|
|
189
141
|
padding: 12px 16px;
|
|
190
142
|
display: flex;
|
|
@@ -1,40 +1,21 @@
|
|
|
1
1
|
import { Icon } from '@teambit/evangelist.elements.icon';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { useSearchParams } from 'react-router-dom';
|
|
4
|
-
import React, { useCallback
|
|
5
|
-
import { DrawerUI } from '@teambit/ui-foundation.ui.tree.drawer';
|
|
4
|
+
import React, { useCallback } from 'react';
|
|
6
5
|
import { MenuWidgetIcon } from '@teambit/ui-foundation.ui.menu-widget-icon';
|
|
7
6
|
import { Tooltip } from '@teambit/design.ui.tooltip';
|
|
8
7
|
import { useNavigate, useLocation } from '@teambit/base-react.navigation.link';
|
|
9
8
|
import { useLiveControls } from '@teambit/compositions.ui.composition-live-controls';
|
|
10
9
|
import styles from './compositions-panel.module.scss';
|
|
11
10
|
import type { Composition } from '../../composition';
|
|
12
|
-
import { LiveControls } from './live-control-panel';
|
|
13
11
|
|
|
14
12
|
export type CompositionsPanelProps = {
|
|
15
|
-
/**
|
|
16
|
-
* list of compositions
|
|
17
|
-
*/
|
|
18
13
|
compositions: Composition[];
|
|
19
|
-
/**
|
|
20
|
-
* select composition to display
|
|
21
|
-
*/
|
|
22
14
|
onSelectComposition: (composition: Composition) => void;
|
|
23
|
-
/**
|
|
24
|
-
* the currently active composition
|
|
25
|
-
*/
|
|
26
15
|
active?: Composition;
|
|
27
|
-
/**
|
|
28
|
-
* the url to the base composition. doesntc contain the current composition params
|
|
29
|
-
*/
|
|
30
16
|
url: string;
|
|
31
|
-
/**
|
|
32
|
-
* checks if a component is using the new preview api. if false, doesnt scale to support new preview
|
|
33
|
-
*/
|
|
34
17
|
isScaling?: boolean;
|
|
35
|
-
|
|
36
18
|
includesEnvTemplate?: boolean;
|
|
37
|
-
|
|
38
19
|
useNameParam?: boolean;
|
|
39
20
|
} & React.HTMLAttributes<HTMLUListElement>;
|
|
40
21
|
|
|
@@ -49,27 +30,14 @@ export function CompositionsPanel({
|
|
|
49
30
|
className,
|
|
50
31
|
...rest
|
|
51
32
|
}: CompositionsPanelProps) {
|
|
52
|
-
const
|
|
53
|
-
const { hasLiveControls, ready, defs, values, onChange, setTimestamp } = useLiveControls();
|
|
54
|
-
const handleDrawerToggle = (id: string) => {
|
|
55
|
-
const isDrawerOpen = openDrawerList.includes(id);
|
|
56
|
-
if (isDrawerOpen) {
|
|
57
|
-
onToggleDrawer((list) => list.filter((drawer) => drawer !== id));
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
onToggleDrawer((list) => list.concat(id));
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
// setup from props
|
|
33
|
+
const { setTimestamp } = useLiveControls();
|
|
64
34
|
const shouldAddNameParam = useNameParam || (isScaling && includesEnvTemplate === false);
|
|
65
35
|
|
|
66
|
-
// current composition state
|
|
67
36
|
const location = useLocation();
|
|
68
37
|
const [searchParams] = useSearchParams();
|
|
69
38
|
const versionFromQueryParams = searchParams.get('version');
|
|
70
39
|
const navigate = useNavigate();
|
|
71
40
|
|
|
72
|
-
// composition navigation action
|
|
73
41
|
const handleSelect = useCallback(
|
|
74
42
|
(selected: Composition) => {
|
|
75
43
|
onSelect && onSelect(selected);
|
|
@@ -78,6 +46,7 @@ export function CompositionsPanel({
|
|
|
78
46
|
},
|
|
79
47
|
[onSelect, active, setTimestamp]
|
|
80
48
|
);
|
|
49
|
+
|
|
81
50
|
const onCompositionCodeClicked = useCallback(
|
|
82
51
|
(composition: Composition) => (e: React.MouseEvent<HTMLDivElement>) => {
|
|
83
52
|
e.preventDefault();
|
|
@@ -93,58 +62,43 @@ export function CompositionsPanel({
|
|
|
93
62
|
);
|
|
94
63
|
|
|
95
64
|
return (
|
|
96
|
-
<div className={
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
</DrawerUI>
|
|
134
|
-
{hasLiveControls ? (
|
|
135
|
-
<DrawerUI
|
|
136
|
-
name="LIVE CONTROLS"
|
|
137
|
-
className={classNames(styles.tab, className)}
|
|
138
|
-
isOpen={openDrawerList.includes('LIVE_CONTROLS')}
|
|
139
|
-
onToggle={() => handleDrawerToggle('LIVE_CONTROLS')}
|
|
140
|
-
>
|
|
141
|
-
{ready ? (
|
|
142
|
-
<LiveControls defs={defs} values={values} onChange={onChange} />
|
|
143
|
-
) : (
|
|
144
|
-
<div className={styles.noLiveControls}>No live controls available for this composition</div>
|
|
145
|
-
)}
|
|
146
|
-
</DrawerUI>
|
|
147
|
-
) : null}
|
|
65
|
+
<div className={styles.container}>
|
|
66
|
+
<ul {...rest} className={classNames(styles.compositionsList, className)}>
|
|
67
|
+
{compositions.map((composition) => {
|
|
68
|
+
const href = shouldAddNameParam
|
|
69
|
+
? `${url}&name=${composition.identifier}`
|
|
70
|
+
: `${url}&${composition.identifier}`;
|
|
71
|
+
return (
|
|
72
|
+
<li
|
|
73
|
+
key={composition.identifier}
|
|
74
|
+
className={classNames(styles.compositionItem, composition === active && styles.active)}
|
|
75
|
+
>
|
|
76
|
+
<a className={styles.panelLink} onClick={() => handleSelect(composition)}>
|
|
77
|
+
<span className={styles.compositionDot} />
|
|
78
|
+
<span className={styles.name}>{composition.displayName}</span>
|
|
79
|
+
</a>
|
|
80
|
+
<div className={styles.itemActions}>
|
|
81
|
+
<MenuWidgetIcon
|
|
82
|
+
className={styles.actionIcon}
|
|
83
|
+
icon="Code"
|
|
84
|
+
tooltipContent="View source"
|
|
85
|
+
onClick={onCompositionCodeClicked(composition)}
|
|
86
|
+
/>
|
|
87
|
+
<Tooltip content="Open in new tab" placement="bottom">
|
|
88
|
+
<a
|
|
89
|
+
className={classNames(styles.actionIcon, styles.iconLink)}
|
|
90
|
+
target="_blank"
|
|
91
|
+
rel="noopener noreferrer"
|
|
92
|
+
href={href}
|
|
93
|
+
>
|
|
94
|
+
<Icon of="open-tab" />
|
|
95
|
+
</a>
|
|
96
|
+
</Tooltip>
|
|
97
|
+
</div>
|
|
98
|
+
</li>
|
|
99
|
+
);
|
|
100
|
+
})}
|
|
101
|
+
</ul>
|
|
148
102
|
</div>
|
|
149
103
|
);
|
|
150
104
|
}
|
|
@@ -30,13 +30,26 @@
|
|
|
30
30
|
.wrapper :global(textarea) {
|
|
31
31
|
min-height: 78px;
|
|
32
32
|
resize: vertical;
|
|
33
|
+
border-radius: 6px;
|
|
34
|
+
border: 1px solid var(--bit-border-color-lightest, #dcdde1);
|
|
35
|
+
font-size: 13px;
|
|
36
|
+
padding: 8px 10px;
|
|
37
|
+
transition:
|
|
38
|
+
border-color 140ms ease,
|
|
39
|
+
box-shadow 140ms ease;
|
|
40
|
+
|
|
41
|
+
&:focus {
|
|
42
|
+
outline: none;
|
|
43
|
+
border-color: var(--bit-accent-color, #6c5ce7);
|
|
44
|
+
box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.12);
|
|
45
|
+
}
|
|
33
46
|
}
|
|
34
47
|
|
|
35
48
|
.toggleWrapper {
|
|
36
49
|
display: flex;
|
|
37
50
|
align-items: center;
|
|
38
51
|
justify-content: flex-start;
|
|
39
|
-
min-height:
|
|
52
|
+
min-height: 34px;
|
|
40
53
|
}
|
|
41
54
|
|
|
42
55
|
.toggleControl {
|
|
@@ -51,53 +64,87 @@
|
|
|
51
64
|
|
|
52
65
|
.rangeWrapper {
|
|
53
66
|
display: flex;
|
|
54
|
-
|
|
55
|
-
gap:
|
|
56
|
-
padding
|
|
67
|
+
align-items: center;
|
|
68
|
+
gap: 10px;
|
|
69
|
+
padding: 2px 0;
|
|
57
70
|
}
|
|
58
71
|
|
|
59
72
|
.rangeInput {
|
|
60
|
-
|
|
73
|
+
flex: 1;
|
|
61
74
|
margin: 0;
|
|
62
|
-
|
|
75
|
+
height: 4px;
|
|
76
|
+
accent-color: var(--bit-accent-color, #6c5ce7);
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
|
|
79
|
+
&::-webkit-slider-runnable-track {
|
|
80
|
+
height: 4px;
|
|
81
|
+
border-radius: 2px;
|
|
82
|
+
background: var(--bit-border-color-lightest, #dcdde1);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&::-webkit-slider-thumb {
|
|
86
|
+
width: 14px;
|
|
87
|
+
height: 14px;
|
|
88
|
+
border-radius: 50%;
|
|
89
|
+
background: var(--bit-accent-color, #6c5ce7);
|
|
90
|
+
border: 2px solid white;
|
|
91
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
|
|
92
|
+
margin-top: -5px;
|
|
93
|
+
-webkit-appearance: none;
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
transition: transform 100ms ease;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&::-webkit-slider-thumb:hover {
|
|
99
|
+
transform: scale(1.15);
|
|
100
|
+
}
|
|
63
101
|
}
|
|
64
102
|
|
|
65
103
|
.rangeValue {
|
|
66
|
-
font-size:
|
|
67
|
-
|
|
68
|
-
color: var(--on-background-color, #
|
|
69
|
-
|
|
104
|
+
font-size: 12px;
|
|
105
|
+
font-weight: 600;
|
|
106
|
+
color: var(--on-background-color, #1c2024);
|
|
107
|
+
min-width: 32px;
|
|
108
|
+
text-align: right;
|
|
109
|
+
font-variant-numeric: tabular-nums;
|
|
110
|
+
background: var(--bit-border-color-lightest, rgba(0, 0, 0, 0.04));
|
|
111
|
+
padding: 2px 6px;
|
|
112
|
+
border-radius: 4px;
|
|
70
113
|
}
|
|
71
114
|
|
|
72
115
|
.multiSelect {
|
|
73
116
|
width: 100%;
|
|
74
|
-
min-height:
|
|
117
|
+
min-height: 80px;
|
|
75
118
|
padding: 6px 8px;
|
|
76
|
-
border: 1px solid var(--border-
|
|
77
|
-
border-radius:
|
|
119
|
+
border: 1px solid var(--bit-border-color-lightest, #dcdde1);
|
|
120
|
+
border-radius: 6px;
|
|
78
121
|
background: var(--surface-neutral-color, #ffffff);
|
|
79
|
-
color: var(--on-background-color, #
|
|
122
|
+
color: var(--on-background-color, #1c2024);
|
|
80
123
|
font: inherit;
|
|
81
|
-
|
|
124
|
+
font-size: 13px;
|
|
125
|
+
line-height: 1.5;
|
|
82
126
|
box-sizing: border-box;
|
|
83
|
-
|
|
127
|
+
transition:
|
|
128
|
+
border-color 140ms ease,
|
|
129
|
+
box-shadow 140ms ease;
|
|
84
130
|
}
|
|
85
131
|
|
|
86
132
|
.multiSelect:focus {
|
|
87
133
|
outline: none;
|
|
88
|
-
border-color: var(--
|
|
89
|
-
box-shadow: 0 0 0 2px rgba(
|
|
134
|
+
border-color: var(--bit-accent-color, #6c5ce7);
|
|
135
|
+
box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.12);
|
|
90
136
|
}
|
|
91
137
|
|
|
92
138
|
.multiSelect option {
|
|
93
139
|
padding: 4px 6px;
|
|
94
|
-
|
|
140
|
+
border-radius: 4px;
|
|
141
|
+
color: var(--on-background-color, #1c2024);
|
|
95
142
|
}
|
|
96
143
|
|
|
97
144
|
.multiSelect option:checked,
|
|
98
145
|
.multiSelect option:hover {
|
|
99
|
-
background:
|
|
100
|
-
color: var(--on-surface-color, #
|
|
146
|
+
background: rgba(108, 92, 231, 0.08);
|
|
147
|
+
color: var(--on-surface-color, #1c2024);
|
|
101
148
|
}
|
|
102
149
|
|
|
103
150
|
.portalMenu {
|
|
@@ -113,9 +160,19 @@
|
|
|
113
160
|
|
|
114
161
|
.portalMenuItem {
|
|
115
162
|
cursor: pointer;
|
|
116
|
-
font-
|
|
163
|
+
font-size: 13px;
|
|
117
164
|
}
|
|
118
165
|
|
|
119
166
|
.inputText {
|
|
120
167
|
padding-top: 0px !important;
|
|
168
|
+
border-radius: 6px !important;
|
|
169
|
+
font-size: 13px !important;
|
|
170
|
+
transition:
|
|
171
|
+
border-color 140ms ease,
|
|
172
|
+
box-shadow 140ms ease !important;
|
|
173
|
+
|
|
174
|
+
&:focus {
|
|
175
|
+
border-color: var(--bit-accent-color, #6c5ce7) !important;
|
|
176
|
+
box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.12) !important;
|
|
177
|
+
}
|
|
121
178
|
}
|