@hexure/ui 1.13.22 → 1.13.24
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/dist/cjs/index.js +99 -92
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/AppMenu/AppMenu.d.ts +1 -0
- package/dist/cjs/types/components/Button/Button.d.ts +5 -0
- package/dist/esm/index.js +101 -94
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/AppMenu/AppMenu.d.ts +1 -0
- package/dist/esm/types/components/Button/Button.d.ts +5 -0
- package/dist/index.d.ts +96 -91
- package/package.json +1 -1
- /package/dist/cjs/types/components/{Multiselect → MultiSelect}/MultiSelect.d.ts +0 -0
- /package/dist/cjs/types/components/{Multiselect → MultiSelect}/index.d.ts +0 -0
- /package/dist/esm/types/components/{Multiselect → MultiSelect}/MultiSelect.d.ts +0 -0
- /package/dist/esm/types/components/{Multiselect → MultiSelect}/index.d.ts +0 -0
package/dist/cjs/index.js
CHANGED
|
@@ -115,6 +115,77 @@ const Accordion = (_a) => {
|
|
|
115
115
|
open ? children : null));
|
|
116
116
|
};
|
|
117
117
|
|
|
118
|
+
const StyledComponent = styled.p `
|
|
119
|
+
color: ${props => Colors[props.$color || 'BLACK'].Hex};
|
|
120
|
+
font-size: ${props => (props.$type === 'small' ? FontSizes.SMALL : FontSizes.DEFAULT)};
|
|
121
|
+
line-height: ${props => (props.$type === 'small' ? '1.5em' : '1.6em')};
|
|
122
|
+
letter-spacing: ${props => (props.$type === 'small' ? '1px' : '0px')};
|
|
123
|
+
font-weight: ${props => (props.$type === 'bold' ? '500' : '400')};
|
|
124
|
+
font-style: ${props => (props.$type === 'italic' ? 'italic' : 'normal')};
|
|
125
|
+
text-decoration: ${props => ['underline', 'line-through'].includes(props.$type) ? props.$type : 'none'};
|
|
126
|
+
font-family: 'Roboto', Helvetica, Arial, sans-serif;
|
|
127
|
+
margin: ${props => props.$margin || '0px'};
|
|
128
|
+
padding: ${props => props.$padding || '0px'};
|
|
129
|
+
text-align: ${props => props.$align || 'left'};
|
|
130
|
+
box-sizing: border-box;
|
|
131
|
+
`;
|
|
132
|
+
const Copy = ({ children, align = '', margin = '', padding = '', type = 'default', color = 'BLACK', }) => {
|
|
133
|
+
return (React.createElement(StyledComponent, { "$align": align, "$color": color, "$margin": margin, "$padding": padding, "$type": type }, children));
|
|
134
|
+
};
|
|
135
|
+
Copy.defaultProps = {
|
|
136
|
+
type: 'default',
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const Wrapper$h = styled.div `
|
|
140
|
+
display: inline-block;
|
|
141
|
+
position: relative;
|
|
142
|
+
height: 16px;
|
|
143
|
+
`;
|
|
144
|
+
const StyledIcon$6 = styled(Icon) `
|
|
145
|
+
width: 16px;
|
|
146
|
+
height: 16px;
|
|
147
|
+
margin: 0px 6px;
|
|
148
|
+
color: ${props => props.theme.PRIMARY_COLOR.Hex};
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
`;
|
|
151
|
+
StyledIcon$6.defaultProps = { theme: EditableTheme };
|
|
152
|
+
const positions = {
|
|
153
|
+
'right-top': {
|
|
154
|
+
top: '0px',
|
|
155
|
+
left: '28px',
|
|
156
|
+
},
|
|
157
|
+
'right-bottom': {
|
|
158
|
+
bottom: '0px',
|
|
159
|
+
left: '28px',
|
|
160
|
+
},
|
|
161
|
+
'right-center': {
|
|
162
|
+
top: '50%',
|
|
163
|
+
left: '28px',
|
|
164
|
+
transform: 'translateY(-50%)',
|
|
165
|
+
},
|
|
166
|
+
'left-top': {
|
|
167
|
+
top: '0px',
|
|
168
|
+
right: '28px',
|
|
169
|
+
},
|
|
170
|
+
'left-bottom': {
|
|
171
|
+
bottom: '0px',
|
|
172
|
+
right: '28px',
|
|
173
|
+
},
|
|
174
|
+
'left-center': {
|
|
175
|
+
top: '50%',
|
|
176
|
+
right: '28px',
|
|
177
|
+
transform: 'translateY(-50%)',
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
const Content$3 = styled.div(props => (Object.assign({ position: 'absolute', borderRadius: '4px', borderWidth: '1px', borderStyle: 'solid', borderColor: props.theme.PRIMARY_COLOR.Hex, background: '#ffffff', boxShadow: '0px 5px 30px -10px rgba(0, 0, 0, 0.5)', width: props.$width || '240px', padding: '10px 12px', zIndex: 9999 }, positions[props.$position])));
|
|
181
|
+
Content$3.defaultProps = { theme: EditableTheme };
|
|
182
|
+
const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, }) => {
|
|
183
|
+
const [show_content, toggleContent] = React.useState(false);
|
|
184
|
+
return (React.createElement(Wrapper$h, { onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
|
|
185
|
+
trigger || React.createElement(StyledIcon$6, { path: js.mdiInformationOutline }),
|
|
186
|
+
show_content ? (React.createElement(Content$3, { "$position": position, "$width": width }, children && React.createElement(Copy, { type: 'small' }, children))) : null));
|
|
187
|
+
};
|
|
188
|
+
|
|
118
189
|
const StyledButton = styled.button `
|
|
119
190
|
height: ${props => (props.$small ? '30px' : '40px')};
|
|
120
191
|
line-height: 1em;
|
|
@@ -165,7 +236,7 @@ const Label$5 = styled.span `
|
|
|
165
236
|
font-weight: 500;
|
|
166
237
|
line-height: 1;
|
|
167
238
|
`;
|
|
168
|
-
const StyledIcon$
|
|
239
|
+
const StyledIcon$5 = styled.span `
|
|
169
240
|
margin-left: ${props => (props.$hasChildren ? '6px' : '0px')};
|
|
170
241
|
margin-right: ${props => (props.$hasChildren ? '-4px' : '0px')};
|
|
171
242
|
display: flex;
|
|
@@ -190,7 +261,7 @@ const Badge$1 = styled.span `
|
|
|
190
261
|
margin-right: ${props => (props.$small ? '-5px' : '-10px')};
|
|
191
262
|
`;
|
|
192
263
|
const Button = (_a) => {
|
|
193
|
-
var { badge, children, disabled = false, icon, isForm = false, loading = false, margin = '', onClick, small = false, format = 'primary' } = _a, accessibleProps = __rest(_a, ["badge", "children", "disabled", "icon", "isForm", "loading", "margin", "onClick", "small", "format"]);
|
|
264
|
+
var { badge, children, disabled = false, icon, isForm = false, loading = false, margin = '', onClick, small = false, format = 'primary', toolTip, title = '' } = _a, accessibleProps = __rest(_a, ["badge", "children", "disabled", "icon", "isForm", "loading", "margin", "onClick", "small", "format", "toolTip", "title"]);
|
|
194
265
|
const theme = React.useContext(styled.ThemeContext) || EditableTheme;
|
|
195
266
|
const has_children = children && children.length > 0;
|
|
196
267
|
const button_type_mapping = {
|
|
@@ -224,32 +295,15 @@ const Button = (_a) => {
|
|
|
224
295
|
},
|
|
225
296
|
};
|
|
226
297
|
const format_styles = button_type_mapping[format];
|
|
227
|
-
|
|
298
|
+
const button_view = (React.createElement(StyledButton, Object.assign({ "$bg_color": format_styles.background_color, "$border_color": format_styles.border_color, "$disabled": disabled || loading, "$hasChildren": !!has_children, "$margin": margin, "$small": small, onClick: disabled || loading ? undefined : onClick, title: title, type: isForm ? 'submit' : undefined }, accessibleProps),
|
|
228
299
|
children ? (React.createElement(Label$5, { "$content_color": format_styles.content_color, "$small": small }, children)) : null,
|
|
229
|
-
icon && !badge ? (React.createElement(StyledIcon$
|
|
300
|
+
icon && !badge ? (React.createElement(StyledIcon$5, { "$hasChildren": !!has_children },
|
|
230
301
|
React.createElement(Icon, { color: format ? format_styles.content_color : '#fff', path: loading ? js.mdiLoading : icon, size: small ? '20px' : '24px', spin: loading }))) : null,
|
|
231
302
|
badge && !icon ? (React.createElement(Badge$1, { "$bg_color": format_styles.badge_bg_color, "$content_color": format_styles.badge_content_color, "$small": small }, badge)) : null));
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
font-size: ${props => (props.$type === 'small' ? FontSizes.SMALL : FontSizes.DEFAULT)};
|
|
237
|
-
line-height: ${props => (props.$type === 'small' ? '1.5em' : '1.6em')};
|
|
238
|
-
letter-spacing: ${props => (props.$type === 'small' ? '1px' : '0px')};
|
|
239
|
-
font-weight: ${props => (props.$type === 'bold' ? '500' : '400')};
|
|
240
|
-
font-style: ${props => (props.$type === 'italic' ? 'italic' : 'normal')};
|
|
241
|
-
text-decoration: ${props => ['underline', 'line-through'].includes(props.$type) ? props.$type : 'none'};
|
|
242
|
-
font-family: 'Roboto', Helvetica, Arial, sans-serif;
|
|
243
|
-
margin: ${props => props.$margin || '0px'};
|
|
244
|
-
padding: ${props => props.$padding || '0px'};
|
|
245
|
-
text-align: ${props => props.$align || 'left'};
|
|
246
|
-
box-sizing: border-box;
|
|
247
|
-
`;
|
|
248
|
-
const Copy = ({ children, align = '', margin = '', padding = '', type = 'default', color = 'BLACK', }) => {
|
|
249
|
-
return (React.createElement(StyledComponent, { "$align": align, "$color": color, "$margin": margin, "$padding": padding, "$type": type }, children));
|
|
250
|
-
};
|
|
251
|
-
Copy.defaultProps = {
|
|
252
|
-
type: 'default',
|
|
303
|
+
if (toolTip && Object.keys(toolTip).length) {
|
|
304
|
+
return (React.createElement(Tooltip, Object.assign({}, toolTip, { trigger: (toolTip === null || toolTip === void 0 ? void 0 : toolTip.trigger) || button_view }), toolTip === null || toolTip === void 0 ? void 0 : toolTip.children));
|
|
305
|
+
}
|
|
306
|
+
return button_view;
|
|
253
307
|
};
|
|
254
308
|
|
|
255
309
|
const H1 = styled.h1 `
|
|
@@ -301,7 +355,7 @@ Heading.defaultProps = {
|
|
|
301
355
|
type: 'primary',
|
|
302
356
|
};
|
|
303
357
|
|
|
304
|
-
const Wrapper$
|
|
358
|
+
const Wrapper$g = styled.div `
|
|
305
359
|
position: fixed;
|
|
306
360
|
top: 0;
|
|
307
361
|
right: 0;
|
|
@@ -325,7 +379,7 @@ const Buttons$1 = styled.div `
|
|
|
325
379
|
`;
|
|
326
380
|
const ActionDialog = (_a) => {
|
|
327
381
|
var { description, title, primaryButton, secondaryButton, tertiaryButton, style = {} } = _a, accessibleProps = __rest(_a, ["description", "title", "primaryButton", "secondaryButton", "tertiaryButton", "style"]);
|
|
328
|
-
return (React.createElement(Wrapper$
|
|
382
|
+
return (React.createElement(Wrapper$g, Object.assign({}, accessibleProps),
|
|
329
383
|
React.createElement(Container$4, { "$customStyle": style, open: true },
|
|
330
384
|
title ? (React.createElement(Heading, { margin: '0px 0px 20px 0px', type: 'secondary' }, title)) : null,
|
|
331
385
|
description ? React.createElement(Copy, { align: 'center' }, description) : null,
|
|
@@ -335,7 +389,7 @@ const ActionDialog = (_a) => {
|
|
|
335
389
|
primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format || 'primary' }))) : null)) : null)));
|
|
336
390
|
};
|
|
337
391
|
|
|
338
|
-
const Wrapper$
|
|
392
|
+
const Wrapper$f = styled.div `
|
|
339
393
|
border: 1px solid #f1f1f1;
|
|
340
394
|
border-radius: 4px;
|
|
341
395
|
border-left-width: 4px;
|
|
@@ -346,7 +400,7 @@ const Wrapper$g = styled.div `
|
|
|
346
400
|
padding: ${({ $small }) => ($small ? '11px' : '20px')};
|
|
347
401
|
box-sizing: border-box;
|
|
348
402
|
`;
|
|
349
|
-
const StyledIcon$
|
|
403
|
+
const StyledIcon$4 = styled(Icon) `
|
|
350
404
|
flex-shrink: 0;
|
|
351
405
|
`;
|
|
352
406
|
const Action$1 = styled.div `
|
|
@@ -379,8 +433,8 @@ const Alert = (_a) => {
|
|
|
379
433
|
icon: js.mdiCheckboxMarkedCircleOutline,
|
|
380
434
|
},
|
|
381
435
|
};
|
|
382
|
-
return (React.createElement(Wrapper$
|
|
383
|
-
React.createElement(StyledIcon$
|
|
436
|
+
return (React.createElement(Wrapper$f, Object.assign({}, accessibleProps, { "$small": small, style: { borderLeftColor: type_mapping[type].color } }),
|
|
437
|
+
React.createElement(StyledIcon$4, { color: type_mapping[type].color, path: type_mapping[type].icon, size: small ? '20px' : '30px' }),
|
|
384
438
|
React.createElement("div", null,
|
|
385
439
|
title && !small ? (React.createElement(Heading, { bold: true, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
|
|
386
440
|
description ? (React.createElement(Copy, { margin: small ? '' : '6px 0 0 0 !important' }, description)) : null,
|
|
@@ -458,7 +512,7 @@ const AppHeader = ({ logoUrl, buttons = [] }) => {
|
|
|
458
512
|
React.createElement(Buttons, null, buttons.map((b, i) => (React.createElement(Button, Object.assign({ key: i }, b)))))));
|
|
459
513
|
};
|
|
460
514
|
|
|
461
|
-
const Wrapper$
|
|
515
|
+
const Wrapper$e = styled.div `
|
|
462
516
|
display: inline-block;
|
|
463
517
|
border-radius: 4px;
|
|
464
518
|
padding: 4px 6px;
|
|
@@ -467,7 +521,7 @@ const Wrapper$f = styled.div `
|
|
|
467
521
|
box-sizing: border-box;
|
|
468
522
|
cursor: ${props => (props.$removable ? 'pointer' : 'default')};
|
|
469
523
|
`;
|
|
470
|
-
const Content$
|
|
524
|
+
const Content$2 = styled.div `
|
|
471
525
|
display: flex;
|
|
472
526
|
align-items: center;
|
|
473
527
|
`;
|
|
@@ -485,8 +539,8 @@ const Remove$1 = styled.div `
|
|
|
485
539
|
`;
|
|
486
540
|
const Tag = (_a) => {
|
|
487
541
|
var { children, color = 'PRIMARY', removable, onClick } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick"]);
|
|
488
|
-
return (React.createElement(Wrapper$
|
|
489
|
-
React.createElement(Content$
|
|
542
|
+
return (React.createElement(Wrapper$e, Object.assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps),
|
|
543
|
+
React.createElement(Content$2, null,
|
|
490
544
|
React.createElement(Label$4, { "$color": color }, children),
|
|
491
545
|
removable ? (React.createElement(Remove$1, null,
|
|
492
546
|
React.createElement(Icon, { color: color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff', path: js.mdiClose, size: '15px' }))) : null)));
|
|
@@ -500,9 +554,12 @@ const SidebarContainer = styled.div `
|
|
|
500
554
|
padding: 12px 0px;
|
|
501
555
|
width: ${props => (props.$isOpen ? props.$width : '60px')};
|
|
502
556
|
`;
|
|
503
|
-
const MenuWrapper$1 = styled.
|
|
557
|
+
const MenuWrapper$1 = styled.button `
|
|
504
558
|
display: flex;
|
|
505
559
|
align-items: center;
|
|
560
|
+
border: 0px;
|
|
561
|
+
background-color: transparent;
|
|
562
|
+
padding-left: 0px;
|
|
506
563
|
border-left-width: 4px;
|
|
507
564
|
border-left-style: solid;
|
|
508
565
|
border-left-color: ${props => (props.$active ? props.$color.Hex : 'transparent')};
|
|
@@ -582,7 +639,7 @@ const AppMenu = ({ menu, isCollapsed, footerTag, defaultWidth = '280px' }) => {
|
|
|
582
639
|
return (React.createElement(SidebarContainer, { "$isOpen": !collapsed, "$width": defaultWidth },
|
|
583
640
|
React.createElement(SidebarMenuContainer, null, menu.map(nav_item => {
|
|
584
641
|
return (React.createElement(React.Fragment, { key: nav_item.label },
|
|
585
|
-
React.createElement(MenuWrapper$1, { "$active": !!nav_item.is_active, "$color": theme.PRIMARY_COLOR, onClick: nav_item.onClick },
|
|
642
|
+
React.createElement(MenuWrapper$1, { "$active": !!nav_item.is_active, "$color": theme.PRIMARY_COLOR, onClick: nav_item.onClick, title: collapsed ? (nav_item === null || nav_item === void 0 ? void 0 : nav_item.title) || nav_item.label : '' },
|
|
586
643
|
React.createElement(MenuIcon, { "$active": !!nav_item.is_active, path: nav_item.icon }),
|
|
587
644
|
collapsed ? null : (React.createElement(MenuLabel, { "$active": nav_item.is_active, "$color": theme.PRIMARY_COLOR }, nav_item.label))),
|
|
588
645
|
nav_item.is_active && nav_item.menu && !collapsed ? (React.createElement(SubMenu, null, nav_item.menu.map(menu_item => (React.createElement(SubMenuItem, { "$active": menu_item.is_active, "$color": theme.PRIMARY_COLOR, key: menu_item.label, onClick: menu_item.onClick }, menu_item.label))))) : null));
|
|
@@ -600,7 +657,7 @@ const AppMenu = ({ menu, isCollapsed, footerTag, defaultWidth = '280px' }) => {
|
|
|
600
657
|
}, small: true }))));
|
|
601
658
|
};
|
|
602
659
|
|
|
603
|
-
const Wrapper$
|
|
660
|
+
const Wrapper$d = styled.div `
|
|
604
661
|
border: 1px solid ${props => props.theme.PRIMARY_COLOR.Hex};
|
|
605
662
|
border-radius: 8px;
|
|
606
663
|
box-sizing: border-box;
|
|
@@ -609,7 +666,7 @@ const Wrapper$e = styled.div `
|
|
|
609
666
|
justify-content: space-between;
|
|
610
667
|
padding: 16px 20px;
|
|
611
668
|
`;
|
|
612
|
-
Wrapper$
|
|
669
|
+
Wrapper$d.defaultProps = { theme: EditableTheme };
|
|
613
670
|
const Left = styled.div `
|
|
614
671
|
box-sizing: border-box;
|
|
615
672
|
display: flex;
|
|
@@ -670,7 +727,7 @@ const ErrorMsg = styled.span `
|
|
|
670
727
|
`;
|
|
671
728
|
const BulkActionBar = (_a) => {
|
|
672
729
|
var { actions = [], errorMsg, onClear, selectedCount = 0 } = _a, accessibleProps = __rest(_a, ["actions", "errorMsg", "onClear", "selectedCount"]);
|
|
673
|
-
return (React.createElement(Wrapper$
|
|
730
|
+
return (React.createElement(Wrapper$d, Object.assign({}, accessibleProps),
|
|
674
731
|
React.createElement(Left, null,
|
|
675
732
|
React.createElement(Info$1, null,
|
|
676
733
|
React.createElement(Selected, null,
|
|
@@ -683,7 +740,7 @@ const BulkActionBar = (_a) => {
|
|
|
683
740
|
React.createElement(ErrorMsg, null, errorMsg))) : null));
|
|
684
741
|
};
|
|
685
742
|
|
|
686
|
-
const Wrapper$
|
|
743
|
+
const Wrapper$c = styled.div `
|
|
687
744
|
background: #fff;
|
|
688
745
|
border-radius: 8px;
|
|
689
746
|
box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
|
|
@@ -729,7 +786,7 @@ Title$1.defaultProps = {
|
|
|
729
786
|
};
|
|
730
787
|
const MoreMenu = (_a) => {
|
|
731
788
|
var { maxHeight, menuItems = [] } = _a, accessibleProps = __rest(_a, ["maxHeight", "menuItems"]);
|
|
732
|
-
return (React.createElement(Wrapper$
|
|
789
|
+
return (React.createElement(Wrapper$c, Object.assign({ "$maxHeight": maxHeight }, accessibleProps), menuItems.map((item, i) => {
|
|
733
790
|
var _a;
|
|
734
791
|
return (React.createElement(MenuItem, { key: i, onClick: item.onClick },
|
|
735
792
|
item.icon ? (React.createElement(Icon, { color: item.disabled ? Colors.LIGHT_GRAY.Hex : Colors.MEDIUM_GRAY.Hex, path: item.icon, size: '20px' })) : null,
|
|
@@ -823,56 +880,6 @@ const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = '
|
|
|
823
880
|
showMenu && (React.createElement(StyledMoreMenu, { "$left": menuPosition.left, "$menuWidth": menuWidth, "$top": menuPosition.top, maxHeight: maxHeight, menuItems: menuItems }))));
|
|
824
881
|
};
|
|
825
882
|
|
|
826
|
-
const Wrapper$c = styled.div `
|
|
827
|
-
display: inline-block;
|
|
828
|
-
position: relative;
|
|
829
|
-
height: 16px;
|
|
830
|
-
`;
|
|
831
|
-
const StyledIcon$4 = styled(Icon) `
|
|
832
|
-
width: 16px;
|
|
833
|
-
height: 16px;
|
|
834
|
-
margin: 0px 6px;
|
|
835
|
-
color: ${props => props.theme.PRIMARY_COLOR.Hex};
|
|
836
|
-
cursor: pointer;
|
|
837
|
-
`;
|
|
838
|
-
StyledIcon$4.defaultProps = { theme: EditableTheme };
|
|
839
|
-
const positions = {
|
|
840
|
-
'right-top': {
|
|
841
|
-
top: '0px',
|
|
842
|
-
left: '28px',
|
|
843
|
-
},
|
|
844
|
-
'right-bottom': {
|
|
845
|
-
bottom: '0px',
|
|
846
|
-
left: '28px',
|
|
847
|
-
},
|
|
848
|
-
'right-center': {
|
|
849
|
-
top: '50%',
|
|
850
|
-
left: '28px',
|
|
851
|
-
transform: 'translateY(-50%)',
|
|
852
|
-
},
|
|
853
|
-
'left-top': {
|
|
854
|
-
top: '0px',
|
|
855
|
-
right: '28px',
|
|
856
|
-
},
|
|
857
|
-
'left-bottom': {
|
|
858
|
-
bottom: '0px',
|
|
859
|
-
right: '28px',
|
|
860
|
-
},
|
|
861
|
-
'left-center': {
|
|
862
|
-
top: '50%',
|
|
863
|
-
right: '28px',
|
|
864
|
-
transform: 'translateY(-50%)',
|
|
865
|
-
},
|
|
866
|
-
};
|
|
867
|
-
const Content$2 = styled.div(props => (Object.assign({ position: 'absolute', borderRadius: '4px', borderWidth: '1px', borderStyle: 'solid', borderColor: props.theme.PRIMARY_COLOR.Hex, background: '#ffffff', boxShadow: '0px 5px 30px -10px rgba(0, 0, 0, 0.5)', width: props.$width || '240px', padding: '10px 12px', zIndex: 9999 }, positions[props.$position])));
|
|
868
|
-
Content$2.defaultProps = { theme: EditableTheme };
|
|
869
|
-
const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, }) => {
|
|
870
|
-
const [show_content, toggleContent] = React.useState(false);
|
|
871
|
-
return (React.createElement(Wrapper$c, { onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
|
|
872
|
-
trigger || React.createElement(StyledIcon$4, { path: js.mdiInformationOutline }),
|
|
873
|
-
show_content ? (React.createElement(Content$2, { "$position": position, "$width": width }, children && React.createElement(Copy, { type: 'small' }, children))) : null));
|
|
874
|
-
};
|
|
875
|
-
|
|
876
883
|
const Wrapper$b = styled.label `
|
|
877
884
|
border-radius: 4px;
|
|
878
885
|
padding: 4px 0px 4px 6px;
|