@uipath/apollo-react 4.10.0 → 4.11.0

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 (62) hide show
  1. package/dist/canvas/components/AddNodePanel/AddNodePreview.cjs +12 -2
  2. package/dist/canvas/components/AddNodePanel/AddNodePreview.d.ts.map +1 -1
  3. package/dist/canvas/components/AddNodePanel/AddNodePreview.js +13 -3
  4. package/dist/canvas/components/BaseCanvas/CanvasThemeContext.cjs +4 -2
  5. package/dist/canvas/components/BaseCanvas/CanvasThemeContext.d.ts.map +1 -1
  6. package/dist/canvas/components/BaseCanvas/CanvasThemeContext.js +4 -2
  7. package/dist/canvas/components/BaseNode/BaseNode.cjs +7 -7
  8. package/dist/canvas/components/BaseNode/BaseNode.js +7 -7
  9. package/dist/canvas/components/BaseNode/BaseNodeContainer.cjs +1 -1
  10. package/dist/canvas/components/BaseNode/BaseNodeContainer.js +1 -1
  11. package/dist/canvas/components/ButtonHandle/CanvasInlineButton.cjs +56 -0
  12. package/dist/canvas/components/ButtonHandle/CanvasInlineButton.d.ts +8 -0
  13. package/dist/canvas/components/ButtonHandle/CanvasInlineButton.d.ts.map +1 -0
  14. package/dist/canvas/components/ButtonHandle/CanvasInlineButton.js +22 -0
  15. package/dist/canvas/components/ButtonHandle/HandleButton.cjs +3 -11
  16. package/dist/canvas/components/ButtonHandle/HandleButton.d.ts.map +1 -1
  17. package/dist/canvas/components/ButtonHandle/HandleButton.js +3 -11
  18. package/dist/canvas/components/FloatingCanvasPanel/FloatingCanvasPanel.cjs +16 -38
  19. package/dist/canvas/components/FloatingCanvasPanel/FloatingCanvasPanel.d.ts.map +1 -1
  20. package/dist/canvas/components/FloatingCanvasPanel/FloatingCanvasPanel.js +16 -28
  21. package/dist/canvas/components/FloatingCanvasPanel/PanelChrome.cjs +1 -1
  22. package/dist/canvas/components/FloatingCanvasPanel/PanelChrome.js +1 -1
  23. package/dist/canvas/components/Toolbar/EdgeToolbar/EdgeToolbar.cjs +13 -17
  24. package/dist/canvas/components/Toolbar/EdgeToolbar/EdgeToolbar.d.ts.map +1 -1
  25. package/dist/canvas/components/Toolbar/EdgeToolbar/EdgeToolbar.js +14 -18
  26. package/dist/canvas/components/Toolbar/EdgeToolbar/EdgeToolbar.types.d.ts +1 -1
  27. package/dist/canvas/components/Toolbar/EdgeToolbar/EdgeToolbar.types.d.ts.map +1 -1
  28. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.cjs +149 -106
  29. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.d.ts.map +1 -1
  30. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.js +151 -108
  31. package/dist/canvas/components/Toolbar/NodeToolbar/useToolbarState.cjs +1 -1
  32. package/dist/canvas/components/Toolbar/NodeToolbar/useToolbarState.d.ts.map +1 -1
  33. package/dist/canvas/components/Toolbar/NodeToolbar/useToolbarState.js +1 -1
  34. package/dist/canvas/components/Toolbar/shared/ToolbarButton.cjs +7 -7
  35. package/dist/canvas/components/Toolbar/shared/ToolbarButton.js +7 -7
  36. package/dist/canvas/components/Toolbar/shared/ToolbarIconButton.cjs +64 -0
  37. package/dist/canvas/components/Toolbar/shared/ToolbarIconButton.d.ts +8 -0
  38. package/dist/canvas/components/Toolbar/shared/ToolbarIconButton.d.ts.map +1 -0
  39. package/dist/canvas/components/Toolbar/shared/ToolbarIconButton.js +30 -0
  40. package/dist/canvas/components/Toolbar/shared/index.cjs +4 -4
  41. package/dist/canvas/components/Toolbar/shared/index.d.ts +1 -1
  42. package/dist/canvas/components/Toolbar/shared/index.d.ts.map +1 -1
  43. package/dist/canvas/components/Toolbar/shared/index.js +1 -1
  44. package/dist/canvas/constants.cjs +1 -1
  45. package/dist/canvas/constants.d.ts +1 -1
  46. package/dist/canvas/constants.js +1 -1
  47. package/dist/canvas/storybook-utils/decorators.d.ts.map +1 -1
  48. package/dist/canvas/styles/tailwind.canvas.css +1 -1
  49. package/dist/canvas/styles/variables.css +16 -0
  50. package/package.json +1 -1
  51. package/dist/canvas/components/Toolbar/EdgeToolbar/EdgeToolbar.styles.cjs +0 -70
  52. package/dist/canvas/components/Toolbar/EdgeToolbar/EdgeToolbar.styles.d.ts +0 -8
  53. package/dist/canvas/components/Toolbar/EdgeToolbar/EdgeToolbar.styles.d.ts.map +0 -1
  54. package/dist/canvas/components/Toolbar/EdgeToolbar/EdgeToolbar.styles.js +0 -23
  55. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.styles.cjs +0 -236
  56. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.styles.d.ts +0 -26
  57. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.styles.d.ts.map +0 -1
  58. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.styles.js +0 -180
  59. package/dist/canvas/components/Toolbar/shared/ToolbarButton.styles.cjs +0 -78
  60. package/dist/canvas/components/Toolbar/shared/ToolbarButton.styles.d.ts +0 -9
  61. package/dist/canvas/components/Toolbar/shared/ToolbarButton.styles.d.ts.map +0 -1
  62. package/dist/canvas/components/Toolbar/shared/ToolbarButton.styles.js +0 -34
@@ -6,6 +6,7 @@ body.light, body.dark, body.light-hc, body.dark-hc {
6
6
  --canvas-background: var(--color-background);
7
7
  --canvas-background-secondary: var(--color-background-secondary);
8
8
  --canvas-background-raised: var(--color-background-raised);
9
+ --canvas-background-overlay: var(--color-background-selected);
9
10
  --canvas-background-hover: var(--color-background-hover);
10
11
  --canvas-background-inverse: var(--color-background-inverse);
11
12
  --canvas-border: var(--color-border);
@@ -31,6 +32,13 @@ body.light, body.dark, body.light-hc, body.dark-hc {
31
32
  --canvas-info-icon: var(--color-info-icon);
32
33
  --canvas-info-text: var(--color-info-text);
33
34
  --canvas-icon-default: var(--color-icon-default);
35
+ --canvas-node-shadow-rest: 0 2px 8px #0000002e;
36
+ --canvas-node-shadow-hover: 0 4px 16px #0000005c;
37
+ --canvas-node-shadow-lifted: 0 16px 48px #000000b8, 0 4px 16px #0006;
38
+ }
39
+
40
+ body.light, body.light-hc {
41
+ --canvas-node-shadow-lifted: 0 8px 24px #0000001f, 0 2px 8px #0000000f;
34
42
  }
35
43
 
36
44
  .future-light, .future-dark, .wireframe, .vertex, .canvas {
@@ -41,6 +49,7 @@ body.light, body.dark, body.light-hc, body.dark-hc {
41
49
  --canvas-background: var(--surface);
42
50
  --canvas-background-secondary: var(--background);
43
51
  --canvas-background-raised: var(--surface-raised);
52
+ --canvas-background-overlay: var(--surface-overlay);
44
53
  --canvas-background-hover: var(--surface-hover);
45
54
  --canvas-background-inverse: var(--surface-inverse);
46
55
  --canvas-border: var(--ap-wind-border);
@@ -66,5 +75,12 @@ body.light, body.dark, body.light-hc, body.dark-hc {
66
75
  --canvas-info-icon: var(--info, var(--color-sky-500));
67
76
  --canvas-info-text: var(--info, var(--color-sky-500));
68
77
  --canvas-icon-default: var(--foreground-muted);
78
+ --canvas-node-shadow-rest: 0 2px 8px #0000002e;
79
+ --canvas-node-shadow-hover: 0 4px 16px #0000005c;
80
+ --canvas-node-shadow-lifted: 0 16px 48px #000000b8, 0 4px 16px #0006;
81
+ }
82
+
83
+ .future-light, .wireframe {
84
+ --canvas-node-shadow-lifted: 0 8px 24px #0000001f, 0 2px 8px #0000000f;
69
85
  }
70
86
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/apollo-react",
3
- "version": "4.10.0",
3
+ "version": "4.11.0",
4
4
  "description": "Apollo Design System - React component library with Material UI theming",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,70 +0,0 @@
1
- "use strict";
2
- var __webpack_require__ = {};
3
- (()=>{
4
- __webpack_require__.n = (module)=>{
5
- var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
6
- __webpack_require__.d(getter, {
7
- a: getter
8
- });
9
- return getter;
10
- };
11
- })();
12
- (()=>{
13
- __webpack_require__.d = (exports1, definition)=>{
14
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
15
- enumerable: true,
16
- get: definition[key]
17
- });
18
- };
19
- })();
20
- (()=>{
21
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
22
- })();
23
- (()=>{
24
- __webpack_require__.r = (exports1)=>{
25
- if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
26
- value: 'Module'
27
- });
28
- Object.defineProperty(exports1, '__esModule', {
29
- value: true
30
- });
31
- };
32
- })();
33
- var __webpack_exports__ = {};
34
- __webpack_require__.r(__webpack_exports__);
35
- __webpack_require__.d(__webpack_exports__, {
36
- StyledEdgeToolbarContainer: ()=>StyledEdgeToolbarContainer,
37
- StyledEdgeToolbarContent: ()=>StyledEdgeToolbarContent
38
- });
39
- const styled_namespaceObject = require("@emotion/styled");
40
- var styled_default = /*#__PURE__*/ __webpack_require__.n(styled_namespaceObject);
41
- const react_namespaceObject = require("motion/react");
42
- const StyledEdgeToolbarContainer = styled_default()(react_namespaceObject.motion.div)`
43
- position: absolute;
44
- pointer-events: auto;
45
- z-index: 1000;
46
- top: 0;
47
- left: 0;
48
- `;
49
- const StyledEdgeToolbarContent = styled_default().div`
50
- display: flex;
51
- flex-direction: row;
52
- align-items: center;
53
- gap: 4px;
54
- padding: 2px;
55
- background: var(--canvas-background);
56
- border: 1px solid var(--canvas-border-grid);
57
- border-radius: 8px;
58
- box-shadow:
59
- 0 2px 8px rgba(0, 0, 0, 0.08),
60
- 0 1px 2px rgba(0, 0, 0, 0.04);
61
- `;
62
- exports.StyledEdgeToolbarContainer = __webpack_exports__.StyledEdgeToolbarContainer;
63
- exports.StyledEdgeToolbarContent = __webpack_exports__.StyledEdgeToolbarContent;
64
- for(var __rspack_i in __webpack_exports__)if (-1 === [
65
- "StyledEdgeToolbarContainer",
66
- "StyledEdgeToolbarContent"
67
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
68
- Object.defineProperty(exports, '__esModule', {
69
- value: true
70
- });
@@ -1,8 +0,0 @@
1
- export declare const StyledEdgeToolbarContainer: import("@emotion/styled").StyledComponent<Omit<import("motion/react").HTMLMotionProps<"div">, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
2
- theme?: import("@emotion/react").Theme;
3
- }, {}, {}>;
4
- export declare const StyledEdgeToolbarContent: import("@emotion/styled").StyledComponent<{
5
- theme?: import("@emotion/react").Theme;
6
- as?: React.ElementType;
7
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
8
- //# sourceMappingURL=EdgeToolbar.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EdgeToolbar.styles.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Toolbar/EdgeToolbar/EdgeToolbar.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,0BAA0B;;UAMtC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;yGAYpC,CAAC"}
@@ -1,23 +0,0 @@
1
- import styled from "@emotion/styled";
2
- import { motion } from "motion/react";
3
- const StyledEdgeToolbarContainer = styled(motion.div)`
4
- position: absolute;
5
- pointer-events: auto;
6
- z-index: 1000;
7
- top: 0;
8
- left: 0;
9
- `;
10
- const StyledEdgeToolbarContent = styled.div`
11
- display: flex;
12
- flex-direction: row;
13
- align-items: center;
14
- gap: 4px;
15
- padding: 2px;
16
- background: var(--canvas-background);
17
- border: 1px solid var(--canvas-border-grid);
18
- border-radius: 8px;
19
- box-shadow:
20
- 0 2px 8px rgba(0, 0, 0, 0.08),
21
- 0 1px 2px rgba(0, 0, 0, 0.04);
22
- `;
23
- export { StyledEdgeToolbarContainer, StyledEdgeToolbarContent };
@@ -1,236 +0,0 @@
1
- "use strict";
2
- var __webpack_require__ = {};
3
- (()=>{
4
- __webpack_require__.n = (module)=>{
5
- var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
6
- __webpack_require__.d(getter, {
7
- a: getter
8
- });
9
- return getter;
10
- };
11
- })();
12
- (()=>{
13
- __webpack_require__.d = (exports1, definition)=>{
14
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
15
- enumerable: true,
16
- get: definition[key]
17
- });
18
- };
19
- })();
20
- (()=>{
21
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
22
- })();
23
- (()=>{
24
- __webpack_require__.r = (exports1)=>{
25
- if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
26
- value: 'Module'
27
- });
28
- Object.defineProperty(exports1, '__esModule', {
29
- value: true
30
- });
31
- };
32
- })();
33
- var __webpack_exports__ = {};
34
- __webpack_require__.r(__webpack_exports__);
35
- __webpack_require__.d(__webpack_exports__, {
36
- StyledOverflowContainer: ()=>StyledOverflowContainer,
37
- StyledToolbarContainer: ()=>StyledToolbarContainer,
38
- StyledDropdownItem: ()=>StyledDropdownItem,
39
- StyledToolbarSeparator: ()=>StyledToolbarSeparator,
40
- StyledDropdownMenu: ()=>StyledDropdownMenu
41
- });
42
- const styled_namespaceObject = require("@emotion/styled");
43
- var styled_default = /*#__PURE__*/ __webpack_require__.n(styled_namespaceObject);
44
- const react_namespaceObject = require("motion/react");
45
- const StyledToolbarContainer = styled_default()(react_namespaceObject.motion.div, {
46
- shouldForwardProp: (prop)=>!prop.startsWith('$')
47
- })`
48
- position: absolute;
49
- display: flex;
50
- align-items: center;
51
- gap: 4px;
52
- padding: 2px;
53
- background: var(--canvas-background);
54
- border: 1px solid var(--canvas-border-grid);
55
- border-radius: 8px;
56
- box-shadow:
57
- 0 2px 8px rgba(0, 0, 0, 0.08),
58
- 0 1px 2px rgba(0, 0, 0, 0.04);
59
- pointer-events: auto;
60
- z-index: 10;
61
-
62
- ${({ $position, $align = 'center' })=>{
63
- switch($position){
64
- case 'top':
65
- switch($align){
66
- case 'start':
67
- return `
68
- top: -40px;
69
- left: 0;
70
- flex-direction: row;
71
- `;
72
- case 'end':
73
- return `
74
- top: -40px;
75
- right: 0;
76
- flex-direction: row;
77
- `;
78
- case 'center':
79
- default:
80
- return `
81
- top: -40px;
82
- left: 0;
83
- right: 0;
84
- margin: 0 auto;
85
- width: fit-content;
86
- flex-direction: row;
87
- `;
88
- }
89
- case 'bottom':
90
- switch($align){
91
- case 'start':
92
- return `
93
- bottom: -40px;
94
- left: 0;
95
- flex-direction: row;
96
- `;
97
- case 'end':
98
- return `
99
- bottom: -40px;
100
- right: 0;
101
- flex-direction: row;
102
- `;
103
- case 'center':
104
- default:
105
- return `
106
- bottom: -40px;
107
- left: 0;
108
- right: 0;
109
- margin: 0 auto;
110
- width: fit-content;
111
- flex-direction: row;
112
- `;
113
- }
114
- case 'left':
115
- switch($align){
116
- case 'start':
117
- return `
118
- left: -40px;
119
- top: 0;
120
- flex-direction: column;
121
- `;
122
- case 'end':
123
- return `
124
- left: -40px;
125
- bottom: 0;
126
- flex-direction: column;
127
- `;
128
- case 'center':
129
- default:
130
- return `
131
- left: -40px;
132
- top: 0;
133
- bottom: 0;
134
- margin: auto 0;
135
- height: fit-content;
136
- flex-direction: column;
137
- `;
138
- }
139
- case 'right':
140
- switch($align){
141
- case 'start':
142
- return `
143
- right: -40px;
144
- top: 0;
145
- flex-direction: column;
146
- `;
147
- case 'end':
148
- return `
149
- right: -40px;
150
- bottom: 0;
151
- flex-direction: column;
152
- `;
153
- case 'center':
154
- default:
155
- return `
156
- right: -40px;
157
- top: 0;
158
- bottom: 0;
159
- margin: auto 0;
160
- height: fit-content;
161
- flex-direction: column;
162
- `;
163
- }
164
- }
165
- }}
166
- `;
167
- const StyledToolbarSeparator = styled_default().div`
168
- width: ${({ $orientation })=>'vertical' === $orientation ? '1px' : 'calc(100%)'};
169
- height: ${({ $orientation })=>'horizontal' === $orientation ? '1px' : '20px'};
170
- background: var(--canvas-border-grid);
171
- align-self: center;
172
- `;
173
- const StyledDropdownMenu = styled_default()(react_namespaceObject.motion.div)`
174
- position: absolute;
175
- top: -2px;
176
- left: calc(100% + 4px);
177
- min-width: 180px;
178
- background: var(--canvas-background);
179
- border: 1px solid var(--canvas-border-subtle);
180
- border-radius: 6px;
181
- box-shadow:
182
- 0 4px 12px rgba(0, 0, 0, 0.08),
183
- 0 2px 4px rgba(0, 0, 0, 0.04);
184
- padding: 4px;
185
- z-index: 1000;
186
- pointer-events: auto;
187
- `;
188
- const StyledDropdownItem = styled_default().button`
189
- display: flex;
190
- align-items: center;
191
- gap: 12px;
192
- width: 100%;
193
- padding: 8px 12px;
194
- background: transparent;
195
- border: none;
196
- border-radius: 4px;
197
- cursor: ${({ $disabled })=>$disabled ? 'not-allowed' : 'pointer'};
198
- opacity: ${({ $disabled })=>$disabled ? 0.4 : 1};
199
- transition: background 0.15s ease;
200
- font-size: 14px;
201
- color: var(--canvas-foreground);
202
- text-align: left;
203
- pointer-events: ${({ $disabled })=>$disabled ? 'none' : 'auto'};
204
-
205
- &:hover:not(:disabled) {
206
- background: var(--canvas-background-secondary);
207
- }
208
-
209
- svg {
210
- flex-shrink: 0;
211
- color: var(--canvas-foreground);
212
- }
213
-
214
- span {
215
- flex: 1;
216
- color: var(--canvas-foreground);
217
- }
218
- `;
219
- const StyledOverflowContainer = styled_default().div`
220
- position: relative;
221
- `;
222
- exports.StyledDropdownItem = __webpack_exports__.StyledDropdownItem;
223
- exports.StyledDropdownMenu = __webpack_exports__.StyledDropdownMenu;
224
- exports.StyledOverflowContainer = __webpack_exports__.StyledOverflowContainer;
225
- exports.StyledToolbarContainer = __webpack_exports__.StyledToolbarContainer;
226
- exports.StyledToolbarSeparator = __webpack_exports__.StyledToolbarSeparator;
227
- for(var __rspack_i in __webpack_exports__)if (-1 === [
228
- "StyledDropdownItem",
229
- "StyledDropdownMenu",
230
- "StyledOverflowContainer",
231
- "StyledToolbarContainer",
232
- "StyledToolbarSeparator"
233
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
234
- Object.defineProperty(exports, '__esModule', {
235
- value: true
236
- });
@@ -1,26 +0,0 @@
1
- export declare const StyledToolbarContainer: import("@emotion/styled").StyledComponent<Omit<import("motion/react").HTMLMotionProps<"div">, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
2
- theme?: import("@emotion/react").Theme;
3
- } & {
4
- $position: "top" | "bottom" | "left" | "right";
5
- $align?: "start" | "center" | "end";
6
- }, {}, {}>;
7
- export declare const StyledToolbarSeparator: import("@emotion/styled").StyledComponent<{
8
- theme?: import("@emotion/react").Theme;
9
- as?: React.ElementType;
10
- } & {
11
- $orientation: "horizontal" | "vertical";
12
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
13
- export declare const StyledDropdownMenu: import("@emotion/styled").StyledComponent<Omit<import("motion/react").HTMLMotionProps<"div">, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
14
- theme?: import("@emotion/react").Theme;
15
- }, {}, {}>;
16
- export declare const StyledDropdownItem: import("@emotion/styled").StyledComponent<{
17
- theme?: import("@emotion/react").Theme;
18
- as?: React.ElementType;
19
- } & {
20
- $disabled?: boolean;
21
- }, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
22
- export declare const StyledOverflowContainer: import("@emotion/styled").StyledComponent<{
23
- theme?: import("@emotion/react").Theme;
24
- as?: React.ElementType;
25
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
26
- //# sourceMappingURL=NodeToolbar.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NodeToolbar.styles.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Toolbar/NodeToolbar/NodeToolbar.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB;;;eAGtB,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO;aACrC,OAAO,GAAG,QAAQ,GAAG,KAAK;UAwHpC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;kBAA8B,YAAY,GAAG,UAAU;yGAKzF,CAAC;AAEF,eAAO,MAAM,kBAAkB;;UAc9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;gBACjB,OAAO;qHA+BpB,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;yGAEnC,CAAC"}
@@ -1,180 +0,0 @@
1
- import styled from "@emotion/styled";
2
- import { motion } from "motion/react";
3
- const StyledToolbarContainer = styled(motion.div, {
4
- shouldForwardProp: (prop)=>!prop.startsWith('$')
5
- })`
6
- position: absolute;
7
- display: flex;
8
- align-items: center;
9
- gap: 4px;
10
- padding: 2px;
11
- background: var(--canvas-background);
12
- border: 1px solid var(--canvas-border-grid);
13
- border-radius: 8px;
14
- box-shadow:
15
- 0 2px 8px rgba(0, 0, 0, 0.08),
16
- 0 1px 2px rgba(0, 0, 0, 0.04);
17
- pointer-events: auto;
18
- z-index: 10;
19
-
20
- ${({ $position, $align = 'center' })=>{
21
- switch($position){
22
- case 'top':
23
- switch($align){
24
- case 'start':
25
- return `
26
- top: -40px;
27
- left: 0;
28
- flex-direction: row;
29
- `;
30
- case 'end':
31
- return `
32
- top: -40px;
33
- right: 0;
34
- flex-direction: row;
35
- `;
36
- case 'center':
37
- default:
38
- return `
39
- top: -40px;
40
- left: 0;
41
- right: 0;
42
- margin: 0 auto;
43
- width: fit-content;
44
- flex-direction: row;
45
- `;
46
- }
47
- case 'bottom':
48
- switch($align){
49
- case 'start':
50
- return `
51
- bottom: -40px;
52
- left: 0;
53
- flex-direction: row;
54
- `;
55
- case 'end':
56
- return `
57
- bottom: -40px;
58
- right: 0;
59
- flex-direction: row;
60
- `;
61
- case 'center':
62
- default:
63
- return `
64
- bottom: -40px;
65
- left: 0;
66
- right: 0;
67
- margin: 0 auto;
68
- width: fit-content;
69
- flex-direction: row;
70
- `;
71
- }
72
- case 'left':
73
- switch($align){
74
- case 'start':
75
- return `
76
- left: -40px;
77
- top: 0;
78
- flex-direction: column;
79
- `;
80
- case 'end':
81
- return `
82
- left: -40px;
83
- bottom: 0;
84
- flex-direction: column;
85
- `;
86
- case 'center':
87
- default:
88
- return `
89
- left: -40px;
90
- top: 0;
91
- bottom: 0;
92
- margin: auto 0;
93
- height: fit-content;
94
- flex-direction: column;
95
- `;
96
- }
97
- case 'right':
98
- switch($align){
99
- case 'start':
100
- return `
101
- right: -40px;
102
- top: 0;
103
- flex-direction: column;
104
- `;
105
- case 'end':
106
- return `
107
- right: -40px;
108
- bottom: 0;
109
- flex-direction: column;
110
- `;
111
- case 'center':
112
- default:
113
- return `
114
- right: -40px;
115
- top: 0;
116
- bottom: 0;
117
- margin: auto 0;
118
- height: fit-content;
119
- flex-direction: column;
120
- `;
121
- }
122
- }
123
- }}
124
- `;
125
- const StyledToolbarSeparator = styled.div`
126
- width: ${({ $orientation })=>'vertical' === $orientation ? '1px' : 'calc(100%)'};
127
- height: ${({ $orientation })=>'horizontal' === $orientation ? '1px' : '20px'};
128
- background: var(--canvas-border-grid);
129
- align-self: center;
130
- `;
131
- const StyledDropdownMenu = styled(motion.div)`
132
- position: absolute;
133
- top: -2px;
134
- left: calc(100% + 4px);
135
- min-width: 180px;
136
- background: var(--canvas-background);
137
- border: 1px solid var(--canvas-border-subtle);
138
- border-radius: 6px;
139
- box-shadow:
140
- 0 4px 12px rgba(0, 0, 0, 0.08),
141
- 0 2px 4px rgba(0, 0, 0, 0.04);
142
- padding: 4px;
143
- z-index: 1000;
144
- pointer-events: auto;
145
- `;
146
- const StyledDropdownItem = styled.button`
147
- display: flex;
148
- align-items: center;
149
- gap: 12px;
150
- width: 100%;
151
- padding: 8px 12px;
152
- background: transparent;
153
- border: none;
154
- border-radius: 4px;
155
- cursor: ${({ $disabled })=>$disabled ? 'not-allowed' : 'pointer'};
156
- opacity: ${({ $disabled })=>$disabled ? 0.4 : 1};
157
- transition: background 0.15s ease;
158
- font-size: 14px;
159
- color: var(--canvas-foreground);
160
- text-align: left;
161
- pointer-events: ${({ $disabled })=>$disabled ? 'none' : 'auto'};
162
-
163
- &:hover:not(:disabled) {
164
- background: var(--canvas-background-secondary);
165
- }
166
-
167
- svg {
168
- flex-shrink: 0;
169
- color: var(--canvas-foreground);
170
- }
171
-
172
- span {
173
- flex: 1;
174
- color: var(--canvas-foreground);
175
- }
176
- `;
177
- const StyledOverflowContainer = styled.div`
178
- position: relative;
179
- `;
180
- export { StyledDropdownItem, StyledDropdownMenu, StyledOverflowContainer, StyledToolbarContainer, StyledToolbarSeparator };
@@ -1,78 +0,0 @@
1
- "use strict";
2
- var __webpack_require__ = {};
3
- (()=>{
4
- __webpack_require__.n = (module)=>{
5
- var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
6
- __webpack_require__.d(getter, {
7
- a: getter
8
- });
9
- return getter;
10
- };
11
- })();
12
- (()=>{
13
- __webpack_require__.d = (exports1, definition)=>{
14
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
15
- enumerable: true,
16
- get: definition[key]
17
- });
18
- };
19
- })();
20
- (()=>{
21
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
22
- })();
23
- (()=>{
24
- __webpack_require__.r = (exports1)=>{
25
- if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
26
- value: 'Module'
27
- });
28
- Object.defineProperty(exports1, '__esModule', {
29
- value: true
30
- });
31
- };
32
- })();
33
- var __webpack_exports__ = {};
34
- __webpack_require__.r(__webpack_exports__);
35
- __webpack_require__.d(__webpack_exports__, {
36
- StyledToolbarButton: ()=>StyledToolbarButton
37
- });
38
- const styled_namespaceObject = require("@emotion/styled");
39
- var styled_default = /*#__PURE__*/ __webpack_require__.n(styled_namespaceObject);
40
- const react_namespaceObject = require("motion/react");
41
- const StyledToolbarButton = styled_default()(react_namespaceObject.motion.button, {
42
- shouldForwardProp: (prop)=>!prop.startsWith('$')
43
- })`
44
- display: flex;
45
- align-items: center;
46
- justify-content: center;
47
- width: 24px;
48
- height: 24px;
49
- padding: 0;
50
- background: ${({ $isToggled, $hoverColor })=>$isToggled && ($hoverColor || 'var(--canvas-background-secondary)') || 'transparent'};
51
- border: none;
52
- border-radius: 8px;
53
- cursor: ${({ $disabled })=>$disabled ? 'not-allowed' : 'pointer'};
54
- opacity: ${({ $disabled })=>$disabled ? 0.4 : 1};
55
- transition:
56
- background 0.15s ease,
57
- opacity 0.15s ease;
58
- pointer-events: ${({ $disabled })=>$disabled ? 'none' : 'auto'};
59
-
60
- &:hover:not(:disabled) {
61
- background: ${({ $hoverColor })=>$hoverColor || 'var(--canvas-background-secondary)'};
62
- }
63
-
64
- &:active:not(:disabled) {
65
- transform: scale(0.95);
66
- }
67
-
68
- svg {
69
- color: ${({ $color })=>$color || 'var(--canvas-foreground)'};
70
- }
71
- `;
72
- exports.StyledToolbarButton = __webpack_exports__.StyledToolbarButton;
73
- for(var __rspack_i in __webpack_exports__)if (-1 === [
74
- "StyledToolbarButton"
75
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
76
- Object.defineProperty(exports, '__esModule', {
77
- value: true
78
- });
@@ -1,9 +0,0 @@
1
- export declare const StyledToolbarButton: import("@emotion/styled").StyledComponent<Omit<import("motion/react").HTMLMotionProps<"button">, "ref"> & import("react").RefAttributes<HTMLButtonElement> & {
2
- theme?: import("@emotion/react").Theme;
3
- } & {
4
- $disabled?: boolean;
5
- $isToggled?: boolean;
6
- $color?: string;
7
- $hoverColor?: string;
8
- }, {}, {}>;
9
- //# sourceMappingURL=ToolbarButton.styles.d.ts.map