@bolio-ui/core 1.1.6 → 1.1.8
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/README.md +0 -4
- package/dist/Popover/Popover.d.ts +8 -9
- package/dist/Popover/index.js +35 -18
- package/dist/index.js +54 -37
- package/esm/Popover/Popover.d.ts +8 -9
- package/esm/Popover/Popover.js +32 -15
- package/package.json +26 -24
- package/esm/Avatar/stories.js +0 -113
- package/esm/Badge/stories.js +0 -92
- package/esm/Breadcrumbs/stories.js +0 -51
- package/esm/Button/stories.js +0 -221
- package/esm/ButtonDropdown/stories.js +0 -92
- package/esm/ButtonGroup/stories.js +0 -66
- package/esm/Capacity/stories.js +0 -85
- package/esm/Card/stories.js +0 -175
- package/esm/Checkbox/stories.js +0 -84
- package/esm/Code/stories.js +0 -53
- package/esm/Collapse/stories.js +0 -48
- package/esm/Description/stories.js +0 -23
- package/esm/Divider/stories.js +0 -41
- package/esm/Dot/stories.js +0 -40
- package/esm/Drawer/stories.js +0 -79
- package/esm/Fieldset/stories.js +0 -72
- package/esm/Grid/stories.js +0 -212
- package/esm/Icon/stories.js +0 -36
- package/esm/Image/stories.js +0 -73
- package/esm/Input/stories.js +0 -145
- package/esm/Keyboard/stories.js +0 -43
- package/esm/Link/stories.js +0 -59
- package/esm/Loading/stories.js +0 -75
- package/esm/Modal/stories.js +0 -165
- package/esm/Note/stories.js +0 -68
- package/esm/Page/stories.js +0 -54
- package/esm/Pagination/stories.js +0 -49
- package/esm/Popover/stories.js +0 -84
- package/esm/Progress/stories.js +0 -114
- package/esm/Radio/stories.js +0 -98
- package/esm/Rating/stories.js +0 -72
- package/esm/Select/stories.js +0 -239
- package/esm/Slider/stories.js +0 -134
- package/esm/Snippet/stories.js +0 -177
- package/esm/Spacer/stories.js +0 -54
- package/esm/Spinner/stories.js +0 -13
- package/esm/Table/stories.js +0 -269
- package/esm/Tabs/stories.js +0 -92
- package/esm/Tag/stories.js +0 -58
- package/esm/Text/stories.js +0 -104
- package/esm/Textarea/stories.js +0 -104
- package/esm/Toggle/stories.js +0 -55
- package/esm/Tooltip/stories.js +0 -183
- package/examples/create-redwoodjs/.redwood/README.md +0 -44
package/README.md
CHANGED
|
@@ -30,10 +30,6 @@
|
|
|
30
30
|
|
|
31
31
|
Visit <a aria-label="bolio-ui learn" href="https://bolio-ui.com/docs/guide">https://bolio-ui.com/docs/guide</a> to get started with Bolio UI.
|
|
32
32
|
|
|
33
|
-
## Documentation
|
|
34
|
-
|
|
35
|
-
Visit [https://bolio-ui.com/docs](https://bolio-ui.com/docs) to view the full documentation.
|
|
36
|
-
|
|
37
33
|
## Quick Start
|
|
38
34
|
|
|
39
35
|
1. Installation: Inside your React project directory, install Bolio UI by running either of the following:
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TooltipProps } from "../Tooltip";
|
|
3
2
|
import { Placement, TriggerTypes } from "../utils/prop-types";
|
|
4
3
|
export declare type PopoverTriggerTypes = TriggerTypes;
|
|
5
4
|
export declare type PopoverPlacement = Placement;
|
|
5
|
+
export declare type TooltipOnVisibleChange = (visible: boolean) => void;
|
|
6
6
|
interface Props {
|
|
7
|
-
content?: React.ReactNode | (() => React.ReactNode)
|
|
7
|
+
content?: React.ReactNode | (() => React.ReactNode);
|
|
8
8
|
trigger?: PopoverTriggerTypes;
|
|
9
9
|
placement?: Placement;
|
|
10
10
|
disableItemsAutoClose?: boolean;
|
|
11
|
+
visible?: boolean;
|
|
12
|
+
onVisibleChange?: TooltipOnVisibleChange;
|
|
11
13
|
}
|
|
12
|
-
declare type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
export declare type PopoverProps = Props & Omit<TooltipProps, keyof ExcludeTooltipProps>;
|
|
18
|
-
declare const Popover: React.ForwardRefExoticComponent<Props & Omit<TooltipProps, keyof ExcludeTooltipProps> & import("../use-scale").ScaleProps & React.RefAttributes<unknown>>;
|
|
14
|
+
export declare type PopoverProps = Props;
|
|
15
|
+
declare const Popover: React.ForwardRefExoticComponent<Props & {
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
} & import("../use-scale").ScaleProps & React.RefAttributes<unknown>>;
|
|
19
18
|
export default Popover;
|
package/dist/Popover/index.js
CHANGED
|
@@ -590,7 +590,7 @@ var useResize = function useResize(callback) {
|
|
|
590
590
|
var useResize$1 = useResize;
|
|
591
591
|
|
|
592
592
|
var _excluded$4 = ["children", "className", "visible", "enterTime", "leaveTime", "clearTime", "name"];
|
|
593
|
-
var defaultProps = {
|
|
593
|
+
var defaultProps$1 = {
|
|
594
594
|
visible: false,
|
|
595
595
|
enterTime: 60,
|
|
596
596
|
leaveTime: 60,
|
|
@@ -653,7 +653,7 @@ function CssTransition(_ref) {
|
|
|
653
653
|
}));
|
|
654
654
|
}
|
|
655
655
|
|
|
656
|
-
CssTransition.defaultProps = defaultProps;
|
|
656
|
+
CssTransition.defaultProps = defaultProps$1;
|
|
657
657
|
CssTransition.displayName = 'BolioUICssTransition';
|
|
658
658
|
|
|
659
659
|
var useClickAnyWhere = function useClickAnyWhere(handler) {
|
|
@@ -1364,30 +1364,46 @@ var usePopoverContext = function usePopoverContext() {
|
|
|
1364
1364
|
return React.useContext(PopoverContext);
|
|
1365
1365
|
};
|
|
1366
1366
|
|
|
1367
|
-
var _excluded$1 = ["content", "children", "
|
|
1368
|
-
|
|
1369
|
-
|
|
1367
|
+
var _excluded$1 = ["content", "children", "trigger", "placement", "initialVisible", "portalClassName", "disableItemsAutoClose", "onVisibleChange", "visible", "type"];
|
|
1368
|
+
var defaultProps = {
|
|
1369
|
+
disableItemsAutoClose: false,
|
|
1370
|
+
trigger: 'click',
|
|
1371
|
+
placement: 'bottom',
|
|
1372
|
+
portalClassName: '',
|
|
1373
|
+
initialVisible: false,
|
|
1374
|
+
hideArrow: false,
|
|
1375
|
+
type: 'default',
|
|
1376
|
+
enterDelay: 100,
|
|
1377
|
+
leaveDelay: 150,
|
|
1378
|
+
offset: 12,
|
|
1379
|
+
className: '',
|
|
1380
|
+
onVisibleChange: function () {},
|
|
1381
|
+
visible: false
|
|
1382
|
+
}; // type ExcludeTooltipProps = {
|
|
1383
|
+
// type: any
|
|
1384
|
+
// text: any
|
|
1385
|
+
// trigger: any
|
|
1386
|
+
// placement: any
|
|
1387
|
+
// }
|
|
1388
|
+
|
|
1389
|
+
var PopoverComponent = function PopoverComponent(_ref) {
|
|
1370
1390
|
var content = _ref.content,
|
|
1371
1391
|
children = _ref.children,
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
portalClassName = _ref$portalClassName === void 0 ? '' : _ref$portalClassName,
|
|
1392
|
+
trigger = _ref.trigger,
|
|
1393
|
+
placement = _ref.placement,
|
|
1394
|
+
initialVisible = _ref.initialVisible,
|
|
1395
|
+
portalClassName = _ref.portalClassName,
|
|
1396
|
+
disableItemsAutoClose = _ref.disableItemsAutoClose,
|
|
1397
|
+
onVisibleChange = _ref.onVisibleChange,
|
|
1398
|
+
customVisible = _ref.visible,
|
|
1380
1399
|
_ref$type = _ref.type,
|
|
1381
1400
|
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
1382
|
-
customVisible = _ref.visible,
|
|
1383
|
-
_ref$onVisibleChange = _ref.onVisibleChange,
|
|
1384
|
-
onVisibleChange = _ref$onVisibleChange === void 0 ? function () {} : _ref$onVisibleChange,
|
|
1385
1401
|
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
1386
1402
|
|
|
1387
1403
|
var _useScale = useScale(),
|
|
1388
1404
|
SCALES = _useScale.SCALES;
|
|
1389
1405
|
|
|
1390
|
-
var _useState = React.useState(
|
|
1406
|
+
var _useState = React.useState(initialVisible),
|
|
1391
1407
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1392
1408
|
visible = _useState2[0],
|
|
1393
1409
|
setVisible = _useState2[1];
|
|
@@ -1432,8 +1448,9 @@ function PopoverComponent(_ref) {
|
|
|
1432
1448
|
id: "421785314",
|
|
1433
1449
|
dynamic: [SCALES.pt(0.9), SCALES.pr(0), SCALES.pb(0.9), SCALES.pl(0)]
|
|
1434
1450
|
}, ".tooltip-content.popover > .inner{padding:".concat(SCALES.pt(0.9), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0.9), " ").concat(SCALES.pl(0), ";}"))));
|
|
1435
|
-
}
|
|
1451
|
+
};
|
|
1436
1452
|
|
|
1453
|
+
PopoverComponent.defaultProps = defaultProps;
|
|
1437
1454
|
PopoverComponent.displayName = 'BolioUIPopover';
|
|
1438
1455
|
var Popover = withScale$1(PopoverComponent);
|
|
1439
1456
|
var Popover$1 = Popover;
|
package/dist/index.js
CHANGED
|
@@ -1304,7 +1304,7 @@ var usePortal = function usePortal() {
|
|
|
1304
1304
|
var usePortal$1 = usePortal;
|
|
1305
1305
|
|
|
1306
1306
|
var _excluded$1g = ["children", "className", "visible", "enterTime", "leaveTime", "clearTime", "name"];
|
|
1307
|
-
var defaultProps$
|
|
1307
|
+
var defaultProps$g = {
|
|
1308
1308
|
visible: false,
|
|
1309
1309
|
enterTime: 60,
|
|
1310
1310
|
leaveTime: 60,
|
|
@@ -1367,10 +1367,10 @@ function CssTransition(_ref) {
|
|
|
1367
1367
|
}));
|
|
1368
1368
|
}
|
|
1369
1369
|
|
|
1370
|
-
CssTransition.defaultProps = defaultProps$
|
|
1370
|
+
CssTransition.defaultProps = defaultProps$g;
|
|
1371
1371
|
CssTransition.displayName = 'BolioUICssTransition';
|
|
1372
1372
|
|
|
1373
|
-
var defaultProps$
|
|
1373
|
+
var defaultProps$f = {
|
|
1374
1374
|
x: 0,
|
|
1375
1375
|
y: 0
|
|
1376
1376
|
};
|
|
@@ -1422,7 +1422,7 @@ var ButtonDrip = function ButtonDrip(_ref) {
|
|
|
1422
1422
|
}, ".drip.jsx-3424889537{position:absolute;left:0;right:0;top:0;bottom:0;}svg.jsx-3424889537{position:absolute;-webkit-animation:350ms ease-in expand-jsx-3424889537;animation:350ms ease-in expand-jsx-3424889537;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;width:1rem;height:1rem;}@-webkit-keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}@keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}"));
|
|
1423
1423
|
};
|
|
1424
1424
|
|
|
1425
|
-
ButtonDrip.defaultProps = defaultProps$
|
|
1425
|
+
ButtonDrip.defaultProps = defaultProps$f;
|
|
1426
1426
|
ButtonDrip.displayName = 'BolioUItButtonDrip';
|
|
1427
1427
|
var ButtonDrip$1 = ButtonDrip;
|
|
1428
1428
|
|
|
@@ -1845,7 +1845,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
1845
1845
|
};
|
|
1846
1846
|
|
|
1847
1847
|
var _excluded$1d = ["children", "disabled", "type", "loading", "shadow", "ghost", "rounded", "effect", "onClick", "auto", "icon", "htmlType", "iconRight", "className"];
|
|
1848
|
-
var defaultProps$
|
|
1848
|
+
var defaultProps$e = {
|
|
1849
1849
|
type: 'default',
|
|
1850
1850
|
htmlType: 'button',
|
|
1851
1851
|
ghost: false,
|
|
@@ -1973,7 +1973,7 @@ var ButtonComponent = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
1973
1973
|
dynamic: [rounded ? '25px' : theme.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ? '0 4px 10px 0' + bg : 'none', SCALES.pl(0.75), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events]
|
|
1974
1974
|
}, ".btn.__jsx-style-dynamic-selector{box-sizing:border-box;display:inline-block;border-radius:".concat(rounded ? '25px' : theme.layout.radius, ";font-weight:bold;font-size:").concat(SCALES.font(0.875), ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;text-transform:capitalize;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;white-space:nowrap;-webkit-transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;position:relative;overflow:hidden;color:").concat(color, ";background-color:").concat(bg, ";border:1px solid ").concat(border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? '0 4px 10px 0' + bg : 'none', ";--bolio-ui-button-icon-padding:").concat(SCALES.pl(0.75), ";--bolio-ui-button-height:").concat(SCALES.height(2.5), ";--bolio-ui-button-color:").concat(color, ";--bolio-ui-button-bg:").concat(bg, ";min-width:").concat(auto ? 'min-content' : SCALES.width(10.5), ";width:").concat(auto ? 'auto' : 'initial', ";height:").concat(SCALES.height(2.5), ";padding:").concat(SCALES.pt(0), " ").concat(paddingRight, " ").concat(SCALES.pb(0), " ").concat(paddingLeft, ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.btn.__jsx-style-dynamic-selector:hover,.btn.__jsx-style-dynamic-selector:focus{cursor:").concat(cursor, ";pointer-events:").concat(events, ";}.btn.__jsx-style-dynamic-selector:active{-webkit-transform:scale(0.98,0.98);-ms-transform:scale(0.98,0.98);transform:scale(0.98,0.98);}.btn.__jsx-style-dynamic-selector .text{position:relative;z-index:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;line-height:inherit;}.btn.__jsx-style-dynamic-selector .text p,.btn.__jsx-style-dynamic-selector .text pre,.btn.__jsx-style-dynamic-selector .text div{margin:0;}")));
|
|
1975
1975
|
});
|
|
1976
|
-
ButtonComponent.defaultProps = defaultProps$
|
|
1976
|
+
ButtonComponent.defaultProps = defaultProps$e;
|
|
1977
1977
|
ButtonComponent.displayName = 'BolioUIButton';
|
|
1978
1978
|
var Button = withScale$1(ButtonComponent);
|
|
1979
1979
|
var Button$1 = Button;
|
|
@@ -2716,7 +2716,7 @@ var ButtonDropdown$1 = ButtonDropdown;
|
|
|
2716
2716
|
ButtonDropdown$1.Item = ButtonDropdownItem;
|
|
2717
2717
|
|
|
2718
2718
|
var _excluded$18 = ["disabled", "type", "ghost", "vertical", "children", "className"];
|
|
2719
|
-
var defaultProps$
|
|
2719
|
+
var defaultProps$d = {
|
|
2720
2720
|
disabled: false,
|
|
2721
2721
|
vertical: false,
|
|
2722
2722
|
ghost: false,
|
|
@@ -2780,7 +2780,7 @@ function ButtonGroupComponent(groupProps) {
|
|
|
2780
2780
|
}, ".btn-group.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;border-radius:".concat(theme.layout.radius, ";border:1px solid ").concat(border, ";background-color:transparent;overflow:hidden;width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'min-content'), ";margin:").concat(SCALES.mt(0.313), " ").concat(SCALES.mr(0.313), " ").concat(SCALES.mb(0.313), " ").concat(SCALES.ml(0.313), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";}.vertical.__jsx-style-dynamic-selector{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.btn-group.__jsx-style-dynamic-selector .btn{border:none;}.btn-group.__jsx-style-dynamic-selector .btn .text{top:0;}.horizontal.__jsx-style-dynamic-selector .btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0;border-left:1px solid ").concat(border, ";}.horizontal.__jsx-style-dynamic-selector .btn:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0;}.vertical.__jsx-style-dynamic-selector .btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-top:1px solid ").concat(border, ";}.vertical.__jsx-style-dynamic-selector .btn:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0;}"))));
|
|
2781
2781
|
}
|
|
2782
2782
|
|
|
2783
|
-
ButtonGroupComponent.defaultProps = defaultProps$
|
|
2783
|
+
ButtonGroupComponent.defaultProps = defaultProps$d;
|
|
2784
2784
|
ButtonGroupComponent.displayName = 'BolioUIButtonGroup';
|
|
2785
2785
|
var ButtonGroup = withScale$1(ButtonGroupComponent);
|
|
2786
2786
|
var ButtonGroup$1 = ButtonGroup;
|
|
@@ -3196,7 +3196,7 @@ var ImageBrowser$1 = ImageBrowser;
|
|
|
3196
3196
|
Image$1.Browser = ImageBrowser$1;
|
|
3197
3197
|
|
|
3198
3198
|
var _excluded$11 = ["children", "hoverable", "rounded", "bordered", "className", "shadow", "type"];
|
|
3199
|
-
var defaultProps$
|
|
3199
|
+
var defaultProps$c = {
|
|
3200
3200
|
type: 'default',
|
|
3201
3201
|
hoverable: false,
|
|
3202
3202
|
bordered: false,
|
|
@@ -3251,7 +3251,7 @@ function CardComponent(_ref) {
|
|
|
3251
3251
|
}, ".card.__jsx-style-dynamic-selector{background:".concat(theme.palette.background, ";-webkit-transition:all 0.2s ease;transition:all 0.2s ease;border-radius:").concat(rounded ? '25px' : theme.layout.radius, ";box-shadow:").concat(shadow ? theme.expressiveness.shadowSmall : 'none', ";box-sizing:border-box;color:").concat(color, ";background-color:").concat(bgColor, ";border:").concat(bordered ? '1px solid' + borderColor : 'none', ";width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.card.__jsx-style-dynamic-selector:hover{box-shadow:").concat(hoverShadow, ";}.card.__jsx-style-dynamic-selector img{width:100%;}.card.__jsx-style-dynamic-selector .image{border-bottom-left-radius:0;border-bottom-right-radius:0;}")));
|
|
3252
3252
|
}
|
|
3253
3253
|
|
|
3254
|
-
CardComponent.defaultProps = defaultProps$
|
|
3254
|
+
CardComponent.defaultProps = defaultProps$c;
|
|
3255
3255
|
CardComponent.displayName = 'BolioUICard';
|
|
3256
3256
|
var Card = withScale$1(CardComponent);
|
|
3257
3257
|
var Card$1 = Card;
|
|
@@ -3709,7 +3709,7 @@ var useRealShape = function useRealShape(ref) {
|
|
|
3709
3709
|
|
|
3710
3710
|
var useRealShape$1 = useRealShape;
|
|
3711
3711
|
|
|
3712
|
-
var defaultProps$
|
|
3712
|
+
var defaultProps$b = {
|
|
3713
3713
|
isExpanded: false,
|
|
3714
3714
|
delay: 200
|
|
3715
3715
|
};
|
|
@@ -3796,7 +3796,7 @@ function Expand(_ref) {
|
|
|
3796
3796
|
}, ".container.__jsx-style-dynamic-selector{padding:0;margin:0;height:0;overflow:hidden;visibility:".concat(visible ? 'visible' : 'hidden', ";-webkit-transition:height ").concat(delay, "ms ease;transition:height ").concat(delay, "ms ease;}.expanded.__jsx-style-dynamic-selector{height:").concat(height, ";visibility:visible;}")));
|
|
3797
3797
|
}
|
|
3798
3798
|
|
|
3799
|
-
Expand.defaultProps = defaultProps$
|
|
3799
|
+
Expand.defaultProps = defaultProps$b;
|
|
3800
3800
|
Expand.displayName = 'BolioUIExpand';
|
|
3801
3801
|
|
|
3802
3802
|
var defaultContext$8 = {
|
|
@@ -3955,7 +3955,7 @@ var CollapseGroup$1 = CollapseGroup;
|
|
|
3955
3955
|
Collapse$1.Group = CollapseGroup$1;
|
|
3956
3956
|
|
|
3957
3957
|
var _excluded$W = ["children", "component", "justify", "align", "fluid", "className"];
|
|
3958
|
-
var defaultProps$
|
|
3958
|
+
var defaultProps$a = {
|
|
3959
3959
|
gap: 0,
|
|
3960
3960
|
justify: 'start',
|
|
3961
3961
|
align: 'top',
|
|
@@ -4008,7 +4008,7 @@ function Container(_ref) {
|
|
|
4008
4008
|
}, ".container.__jsx-style-dynamic-selector{".concat(fluidWidth, ";padding-left:15px;padding-right:15px;margin-right:auto;margin-left:auto;-webkit-box-pack:").concat(justifyValue, ";-webkit-justify-content:").concat(justifyValue, ";-ms-flex-pack:").concat(justifyValue, ";justify-content:").concat(justifyValue, ";-webkit-align-items:").concat(alignValue, ";-webkit-box-align:").concat(alignValue, ";-ms-flex-align:").concat(alignValue, ";align-items:").concat(alignValue, ";}")));
|
|
4009
4009
|
}
|
|
4010
4010
|
|
|
4011
|
-
Container.defaultProps = defaultProps$
|
|
4011
|
+
Container.defaultProps = defaultProps$a;
|
|
4012
4012
|
Container.displayName = 'BolioUIContainer';
|
|
4013
4013
|
|
|
4014
4014
|
var _excluded$V = ["title", "content", "className"];
|
|
@@ -4455,7 +4455,7 @@ var useKeyboard = function useKeyboard(handler, keyBindings) {
|
|
|
4455
4455
|
var useKeyboard$1 = useKeyboard;
|
|
4456
4456
|
|
|
4457
4457
|
var _excluded$R = ["children", "onClick", "visible", "width", "onContentClick", "backdropClassName", "positionClassName", "layerClassName"];
|
|
4458
|
-
var defaultProps$
|
|
4458
|
+
var defaultProps$9 = {
|
|
4459
4459
|
onClick: function onClick() {},
|
|
4460
4460
|
visible: false,
|
|
4461
4461
|
// onContentClick: () => {},
|
|
@@ -4518,7 +4518,7 @@ function BackdropComponent(_ref) {
|
|
|
4518
4518
|
}, ".backdrop.__jsx-style-dynamic-selector{position:fixed;top:0;left:0;right:0;bottom:0;overflow:auto;z-index:1000;-webkit-overflow-scrolling:touch;box-sizing:border-box;text-align:center;}.position.__jsx-style-dynamic-selector{position:relative;z-index:1001;outline:none;max-width:90%;width:".concat(width, ";margin:20px auto;vertical-align:middle;display:inline-block;}.backdrop.__jsx-style-dynamic-selector:before{display:inline-block;width:0;height:100%;vertical-align:middle;content:'';}.layer.__jsx-style-dynamic-selector{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;opacity:").concat(theme.expressiveness.portalOpacity, ";background-color:black;-webkit-transition:opacity 0.35s cubic-bezier(0.4,0,0.2,1);transition:opacity 0.35s cubic-bezier(0.4,0,0.2,1);pointer-events:none;z-index:1000;}.backdrop-wrapper-enter.__jsx-style-dynamic-selector .layer.__jsx-style-dynamic-selector{opacity:0;}.backdrop-wrapper-enter-active.__jsx-style-dynamic-selector .layer.__jsx-style-dynamic-selector{opacity:").concat(theme.expressiveness.portalOpacity, ";}.backdrop-wrapper-leave.__jsx-style-dynamic-selector .layer.__jsx-style-dynamic-selector{opacity:").concat(theme.expressiveness.portalOpacity, ";}.backdrop-wrapper-leave-active.__jsx-style-dynamic-selector .layer.__jsx-style-dynamic-selector{opacity:0;}"))));
|
|
4519
4519
|
}
|
|
4520
4520
|
|
|
4521
|
-
BackdropComponent.defaultProps = defaultProps$
|
|
4521
|
+
BackdropComponent.defaultProps = defaultProps$9;
|
|
4522
4522
|
BackdropComponent.displayName = 'BolioUIBackdrop';
|
|
4523
4523
|
var Backdrop = /*#__PURE__*/React__default["default"].memo(BackdropComponent);
|
|
4524
4524
|
var Backdrop$1 = Backdrop;
|
|
@@ -5030,7 +5030,7 @@ Fieldset$1.Content = FieldsetContent$1;
|
|
|
5030
5030
|
Fieldset$1.Body = FieldsetContent$1;
|
|
5031
5031
|
|
|
5032
5032
|
var _excluded$F = ["xs", "sm", "md", "lg", "xl", "justify", "direction", "alignItems", "alignContent", "children", "className"];
|
|
5033
|
-
var defaultProps$
|
|
5033
|
+
var defaultProps$8 = {
|
|
5034
5034
|
xs: false,
|
|
5035
5035
|
sm: false,
|
|
5036
5036
|
md: false,
|
|
@@ -5115,7 +5115,7 @@ function GridBasicItem(_ref) {
|
|
|
5115
5115
|
}, ".item.__jsx-style-dynamic-selector{font-size:".concat(SCALES.font(1, 'inherit'), ";height:").concat(SCALES.height(1, 'auto'), ";}.justify.__jsx-style-dynamic-selector{-webkit-box-pack:").concat(justify, ";-webkit-justify-content:").concat(justify, ";-ms-flex-pack:").concat(justify, ";justify-content:").concat(justify, ";}.direction.__jsx-style-dynamic-selector{-webkit-flex-direction:").concat(direction, ";-ms-flex-direction:").concat(direction, ";flex-direction:").concat(direction, ";}.alignContent.__jsx-style-dynamic-selector{-webkit-align-content:").concat(alignContent, ";-ms-flex-line-pack:").concat(alignContent, ";align-content:").concat(alignContent, ";}.alignItems.__jsx-style-dynamic-selector{-webkit-align-items:").concat(alignItems, ";-webkit-box-align:").concat(alignItems, ";-ms-flex-align:").concat(alignItems, ";align-items:").concat(alignItems, ";}.xs.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.xs.grow, ";-webkit-flex-grow:").concat(layout.xs.grow, ";-ms-flex-positive:").concat(layout.xs.grow, ";flex-grow:").concat(layout.xs.grow, ";max-width:").concat(layout.xs.width, ";-webkit-flex-basis:").concat(layout.xs.basis, ";-ms-flex-preferred-size:").concat(layout.xs.basis, ";flex-basis:").concat(layout.xs.basis, ";").concat(layout.xs.display, ";}@media only screen and (min-width:").concat(theme.breakpoints.sm.min, "){.sm.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.sm.grow, ";-webkit-flex-grow:").concat(layout.sm.grow, ";-ms-flex-positive:").concat(layout.sm.grow, ";flex-grow:").concat(layout.sm.grow, ";max-width:").concat(layout.sm.width, ";-webkit-flex-basis:").concat(layout.sm.basis, ";-ms-flex-preferred-size:").concat(layout.sm.basis, ";flex-basis:").concat(layout.sm.basis, ";").concat(layout.sm.display, ";}}@media only screen and (min-width:").concat(theme.breakpoints.md.min, "){.md.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.md.grow, ";-webkit-flex-grow:").concat(layout.md.grow, ";-ms-flex-positive:").concat(layout.md.grow, ";flex-grow:").concat(layout.md.grow, ";max-width:").concat(layout.md.width, ";-webkit-flex-basis:").concat(layout.md.basis, ";-ms-flex-preferred-size:").concat(layout.md.basis, ";flex-basis:").concat(layout.md.basis, ";").concat(layout.md.display, ";}}@media only screen and (min-width:").concat(theme.breakpoints.lg.min, "){.lg.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.lg.grow, ";-webkit-flex-grow:").concat(layout.lg.grow, ";-ms-flex-positive:").concat(layout.lg.grow, ";flex-grow:").concat(layout.lg.grow, ";max-width:").concat(layout.lg.width, ";-webkit-flex-basis:").concat(layout.lg.basis, ";-ms-flex-preferred-size:").concat(layout.lg.basis, ";flex-basis:").concat(layout.lg.basis, ";").concat(layout.lg.display, ";}}@media only screen and (min-width:").concat(theme.breakpoints.xl.min, "){.xl.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.xl.grow, ";-webkit-flex-grow:").concat(layout.xl.grow, ";-ms-flex-positive:").concat(layout.xl.grow, ";flex-grow:").concat(layout.xl.grow, ";max-width:").concat(layout.xl.width, ";-webkit-flex-basis:").concat(layout.xl.basis, ";-ms-flex-preferred-size:").concat(layout.xl.basis, ";flex-basis:").concat(layout.xl.basis, ";").concat(layout.xl.display, ";}}")));
|
|
5116
5116
|
}
|
|
5117
5117
|
|
|
5118
|
-
GridBasicItem.defaultProps = defaultProps$
|
|
5118
|
+
GridBasicItem.defaultProps = defaultProps$8;
|
|
5119
5119
|
GridBasicItem.displayName = 'BolioUIGridBasicItem';
|
|
5120
5120
|
|
|
5121
5121
|
var _excluded$E = ["children", "className"];
|
|
@@ -5352,7 +5352,7 @@ var getColors$6 = function getColors(palette, status, disabled, readOnly) {
|
|
|
5352
5352
|
return colors[status];
|
|
5353
5353
|
};
|
|
5354
5354
|
|
|
5355
|
-
var defaultProps$
|
|
5355
|
+
var defaultProps$7 = {
|
|
5356
5356
|
disabled: false,
|
|
5357
5357
|
readOnly: false,
|
|
5358
5358
|
clearable: false,
|
|
@@ -5531,7 +5531,7 @@ var InputComponent = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
5531
5531
|
dynamic: [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, 'initial'), rounded ? '25px' : theme.layout.radius, borderColor ? borderColor : colors.borderColor, backgroundColor ? backgroundColor : colors.bgColor, hoverBorder ? hoverBorder : colors.hoverBorder, backgroundColor ? backgroundColor : colors.hoverBgColor, colors.hoverBorder, SCALES.font(0.875), colors.color, theme.palette.accents_3, theme.palette.background, colors.color]
|
|
5532
5532
|
}, ".with-label.__jsx-style-dynamic-selector{display:inline-block;box-sizing:border-box;-webkit-box-align:center;--input-height:".concat(SCALES.height(2.25), ";font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, 'initial'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.input-container.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:").concat(SCALES.width(1, 'initial'), ";height:var(--input-height);}.input-wrapper.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:").concat(rounded ? '25px' : theme.layout.radius, ";border:1px solid ").concat(borderColor ? borderColor : colors.borderColor, ";-webkit-transition:border 0.2s ease 0s,color 0.2s ease 0s;transition:border 0.2s ease 0s,color 0.2s ease 0s;background:").concat(backgroundColor ? backgroundColor : colors.bgColor, ";}.input-wrapper.active.__jsx-style-dynamic-selector,.input-wrapper.__jsx-style-dynamic-selector:hover{border:1px solid ").concat(hoverBorder ? hoverBorder : colors.hoverBorder, ";background:").concat(backgroundColor ? backgroundColor : colors.hoverBgColor, ";}.input-wrapper.left-label.__jsx-style-dynamic-selector{border-top-left-radius:0;border-bottom-left-radius:0;}.input-wrapper.right-label.__jsx-style-dynamic-selector{border-top-right-radius:0;border-bottom-right-radius:0;}.input-wrapper.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;}input.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;}.input-wrapper.hover.__jsx-style-dynamic-selector{border-color:").concat(colors.hoverBorder, ";}input.__jsx-style-dynamic-selector{margin:0.25em 0.625em;padding:0 4px;box-shadow:none;font-size:").concat(SCALES.font(0.875), ";background-color:transparent;border:none;color:").concat(colors.color, ";outline:none;border-radius:0;width:100%;min-width:0;-webkit-appearance:none;}input.left-icon.__jsx-style-dynamic-selector{margin-left:0;}input.right-icon.__jsx-style-dynamic-selector{margin-right:0;}.__jsx-style-dynamic-selector::-webkit-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector::placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector::-ms-reveal{display:none !important;}input.__jsx-style-dynamic-selector:-webkit-autofill,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:hover,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:active,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:focus{-webkit-box-shadow:0 0 0 30px ").concat(theme.palette.background, " inset !important;-webkit-text-fill-color:").concat(colors.color, " !important;}")));
|
|
5533
5533
|
});
|
|
5534
|
-
InputComponent.defaultProps = defaultProps$
|
|
5534
|
+
InputComponent.defaultProps = defaultProps$7;
|
|
5535
5535
|
InputComponent.displayName = 'BolioUIInput';
|
|
5536
5536
|
var Input = withScale$1(InputComponent);
|
|
5537
5537
|
var Input$1 = Input;
|
|
@@ -5670,7 +5670,7 @@ var PasswordIcon$1 = MemoPasswordIcon;
|
|
|
5670
5670
|
|
|
5671
5671
|
var _excluded$A = ["hideToggle", "children"];
|
|
5672
5672
|
|
|
5673
|
-
var passwordDefaultProps = _objectSpread2(_objectSpread2({}, defaultProps$
|
|
5673
|
+
var passwordDefaultProps = _objectSpread2(_objectSpread2({}, defaultProps$7), {}, {
|
|
5674
5674
|
hideToggle: false
|
|
5675
5675
|
});
|
|
5676
5676
|
|
|
@@ -7069,30 +7069,46 @@ var usePopoverContext = function usePopoverContext() {
|
|
|
7069
7069
|
return React.useContext(PopoverContext);
|
|
7070
7070
|
};
|
|
7071
7071
|
|
|
7072
|
-
var _excluded$l = ["content", "children", "
|
|
7073
|
-
|
|
7074
|
-
|
|
7072
|
+
var _excluded$l = ["content", "children", "trigger", "placement", "initialVisible", "portalClassName", "disableItemsAutoClose", "onVisibleChange", "visible", "type"];
|
|
7073
|
+
var defaultProps$6 = {
|
|
7074
|
+
disableItemsAutoClose: false,
|
|
7075
|
+
trigger: 'click',
|
|
7076
|
+
placement: 'bottom',
|
|
7077
|
+
portalClassName: '',
|
|
7078
|
+
initialVisible: false,
|
|
7079
|
+
hideArrow: false,
|
|
7080
|
+
type: 'default',
|
|
7081
|
+
enterDelay: 100,
|
|
7082
|
+
leaveDelay: 150,
|
|
7083
|
+
offset: 12,
|
|
7084
|
+
className: '',
|
|
7085
|
+
onVisibleChange: function () {},
|
|
7086
|
+
visible: false
|
|
7087
|
+
}; // type ExcludeTooltipProps = {
|
|
7088
|
+
// type: any
|
|
7089
|
+
// text: any
|
|
7090
|
+
// trigger: any
|
|
7091
|
+
// placement: any
|
|
7092
|
+
// }
|
|
7093
|
+
|
|
7094
|
+
var PopoverComponent = function PopoverComponent(_ref) {
|
|
7075
7095
|
var content = _ref.content,
|
|
7076
7096
|
children = _ref.children,
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
portalClassName = _ref$portalClassName === void 0 ? '' : _ref$portalClassName,
|
|
7097
|
+
trigger = _ref.trigger,
|
|
7098
|
+
placement = _ref.placement,
|
|
7099
|
+
initialVisible = _ref.initialVisible,
|
|
7100
|
+
portalClassName = _ref.portalClassName,
|
|
7101
|
+
disableItemsAutoClose = _ref.disableItemsAutoClose,
|
|
7102
|
+
onVisibleChange = _ref.onVisibleChange,
|
|
7103
|
+
customVisible = _ref.visible,
|
|
7085
7104
|
_ref$type = _ref.type,
|
|
7086
7105
|
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
7087
|
-
customVisible = _ref.visible,
|
|
7088
|
-
_ref$onVisibleChange = _ref.onVisibleChange,
|
|
7089
|
-
onVisibleChange = _ref$onVisibleChange === void 0 ? function () {} : _ref$onVisibleChange,
|
|
7090
7106
|
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
7091
7107
|
|
|
7092
7108
|
var _useScale = useScale(),
|
|
7093
7109
|
SCALES = _useScale.SCALES;
|
|
7094
7110
|
|
|
7095
|
-
var _useState = React.useState(
|
|
7111
|
+
var _useState = React.useState(initialVisible),
|
|
7096
7112
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7097
7113
|
visible = _useState2[0],
|
|
7098
7114
|
setVisible = _useState2[1];
|
|
@@ -7137,8 +7153,9 @@ function PopoverComponent(_ref) {
|
|
|
7137
7153
|
id: "421785314",
|
|
7138
7154
|
dynamic: [SCALES.pt(0.9), SCALES.pr(0), SCALES.pb(0.9), SCALES.pl(0)]
|
|
7139
7155
|
}, ".tooltip-content.popover > .inner{padding:".concat(SCALES.pt(0.9), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0.9), " ").concat(SCALES.pl(0), ";}"))));
|
|
7140
|
-
}
|
|
7156
|
+
};
|
|
7141
7157
|
|
|
7158
|
+
PopoverComponent.defaultProps = defaultProps$6;
|
|
7142
7159
|
PopoverComponent.displayName = 'BolioUIPopover';
|
|
7143
7160
|
var Popover = withScale$1(PopoverComponent);
|
|
7144
7161
|
var Popover$1 = Popover;
|
package/esm/Popover/Popover.d.ts
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TooltipProps } from "../Tooltip";
|
|
3
2
|
import { Placement, TriggerTypes } from "../utils/prop-types";
|
|
4
3
|
export declare type PopoverTriggerTypes = TriggerTypes;
|
|
5
4
|
export declare type PopoverPlacement = Placement;
|
|
5
|
+
export declare type TooltipOnVisibleChange = (visible: boolean) => void;
|
|
6
6
|
interface Props {
|
|
7
|
-
content?: React.ReactNode | (() => React.ReactNode)
|
|
7
|
+
content?: React.ReactNode | (() => React.ReactNode);
|
|
8
8
|
trigger?: PopoverTriggerTypes;
|
|
9
9
|
placement?: Placement;
|
|
10
10
|
disableItemsAutoClose?: boolean;
|
|
11
|
+
visible?: boolean;
|
|
12
|
+
onVisibleChange?: TooltipOnVisibleChange;
|
|
11
13
|
}
|
|
12
|
-
declare type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
export declare type PopoverProps = Props & Omit<TooltipProps, keyof ExcludeTooltipProps>;
|
|
18
|
-
declare const Popover: React.ForwardRefExoticComponent<Props & Omit<TooltipProps, keyof ExcludeTooltipProps> & import("../use-scale").ScaleProps & React.RefAttributes<unknown>>;
|
|
14
|
+
export declare type PopoverProps = Props;
|
|
15
|
+
declare const Popover: React.ForwardRefExoticComponent<Props & {
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
} & import("../use-scale").ScaleProps & React.RefAttributes<unknown>>;
|
|
19
18
|
export default Popover;
|
package/esm/Popover/Popover.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["content", "children", "
|
|
4
|
+
var _excluded = ["content", "children", "trigger", "placement", "initialVisible", "portalClassName", "disableItemsAutoClose", "onVisibleChange", "visible", "type"];
|
|
5
5
|
import _JSXStyle from "../styled-jsx.es.js";
|
|
6
6
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
7
7
|
import Tooltip from '../Tooltip';
|
|
@@ -9,29 +9,45 @@ import { getReactNode } from '../utils/collections';
|
|
|
9
9
|
import useScale, { withScale } from '../use-scale';
|
|
10
10
|
import { PopoverContext } from './PopoverContext';
|
|
11
11
|
import useClasses from '../use-classes';
|
|
12
|
+
var defaultProps = {
|
|
13
|
+
disableItemsAutoClose: false,
|
|
14
|
+
trigger: 'click',
|
|
15
|
+
placement: 'bottom',
|
|
16
|
+
portalClassName: '',
|
|
17
|
+
initialVisible: false,
|
|
18
|
+
hideArrow: false,
|
|
19
|
+
type: 'default',
|
|
20
|
+
enterDelay: 100,
|
|
21
|
+
leaveDelay: 150,
|
|
22
|
+
offset: 12,
|
|
23
|
+
className: '',
|
|
24
|
+
onVisibleChange: function () {},
|
|
25
|
+
visible: false
|
|
26
|
+
}; // type ExcludeTooltipProps = {
|
|
27
|
+
// type: any
|
|
28
|
+
// text: any
|
|
29
|
+
// trigger: any
|
|
30
|
+
// placement: any
|
|
31
|
+
// }
|
|
12
32
|
|
|
13
|
-
function PopoverComponent(_ref) {
|
|
33
|
+
var PopoverComponent = function PopoverComponent(_ref) {
|
|
14
34
|
var content = _ref.content,
|
|
15
35
|
children = _ref.children,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
portalClassName = _ref$portalClassName === void 0 ? '' : _ref$portalClassName,
|
|
36
|
+
trigger = _ref.trigger,
|
|
37
|
+
placement = _ref.placement,
|
|
38
|
+
initialVisible = _ref.initialVisible,
|
|
39
|
+
portalClassName = _ref.portalClassName,
|
|
40
|
+
disableItemsAutoClose = _ref.disableItemsAutoClose,
|
|
41
|
+
onVisibleChange = _ref.onVisibleChange,
|
|
42
|
+
customVisible = _ref.visible,
|
|
24
43
|
_ref$type = _ref.type,
|
|
25
44
|
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
26
|
-
customVisible = _ref.visible,
|
|
27
|
-
_ref$onVisibleChange = _ref.onVisibleChange,
|
|
28
|
-
onVisibleChange = _ref$onVisibleChange === void 0 ? function () {} : _ref$onVisibleChange,
|
|
29
45
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
30
46
|
|
|
31
47
|
var _useScale = useScale(),
|
|
32
48
|
SCALES = _useScale.SCALES;
|
|
33
49
|
|
|
34
|
-
var _useState = useState(
|
|
50
|
+
var _useState = useState(initialVisible),
|
|
35
51
|
_useState2 = _slicedToArray(_useState, 2),
|
|
36
52
|
visible = _useState2[0],
|
|
37
53
|
setVisible = _useState2[1];
|
|
@@ -76,8 +92,9 @@ function PopoverComponent(_ref) {
|
|
|
76
92
|
id: "421785314",
|
|
77
93
|
dynamic: [SCALES.pt(0.9), SCALES.pr(0), SCALES.pb(0.9), SCALES.pl(0)]
|
|
78
94
|
}, ".tooltip-content.popover > .inner{padding:".concat(SCALES.pt(0.9), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0.9), " ").concat(SCALES.pl(0), ";}"))));
|
|
79
|
-
}
|
|
95
|
+
};
|
|
80
96
|
|
|
97
|
+
PopoverComponent.defaultProps = defaultProps;
|
|
81
98
|
PopoverComponent.displayName = 'BolioUIPopover';
|
|
82
99
|
var Popover = withScale(PopoverComponent);
|
|
83
100
|
export default Popover;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bolio-ui/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"description": "Amazing, modern and creative tools for React UI. 🥷🏼",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bolio",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"build:storybook": "build-storybook -s ./public",
|
|
49
49
|
"build:clear": "rm -rf ./dist ./esm",
|
|
50
50
|
"build:rollup": "rollup -c scripts/rollup.config.js",
|
|
51
|
-
"build:babel": "babel --no-babelrc --config-file ./scripts/babel.config.js --extensions \".js,.ts,.tsx\" ./core --out-dir ./esm --ignore \"**/__tests__/**/*,**/*.d.ts\"",
|
|
51
|
+
"build:babel": "babel --no-babelrc --config-file ./scripts/babel.config.js --extensions \".js,.ts,.tsx\" ./core --out-dir ./esm --ignore \"**/__tests__/**/*,**/*.d.ts,**/stories.tsx\"",
|
|
52
52
|
"build:after": "node scripts/move-built-in.js",
|
|
53
53
|
"build:webpack": "webpack --config scripts/webpack.config.js",
|
|
54
54
|
"build:types": "ttsc -p ./scripts & ttsc -p ./scripts --outDir ./esm",
|
|
@@ -65,28 +65,7 @@
|
|
|
65
65
|
]
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@
|
|
69
|
-
"@mdx-js/loader": "^1.6.22",
|
|
70
|
-
"@next/mdx": "^11.0.1",
|
|
71
|
-
"algoliasearch": "^4.14.2",
|
|
72
|
-
"classnames": "^2.3.1",
|
|
73
|
-
"gray-matter": "^4.0.3",
|
|
74
|
-
"jest-styled-components": "^7.0.5",
|
|
75
|
-
"kbar": "0.1.0-beta.6",
|
|
76
|
-
"next": "12.3.1",
|
|
77
|
-
"next-seo": "^5.5.0",
|
|
78
|
-
"prism-react-renderer": "^1.2.1",
|
|
79
|
-
"react": "^18.2.0",
|
|
80
|
-
"react-autosuggest": "^10.1.0",
|
|
81
|
-
"react-device-detect": "^1.17.0",
|
|
82
|
-
"react-dom": "^18.2.0",
|
|
83
|
-
"react-instantsearch-dom": "^6.12.0",
|
|
84
|
-
"react-live": "^2.2.3",
|
|
85
|
-
"react-syntax-highlighter": "^15.5.0",
|
|
86
|
-
"rehype-join-line": "^1.0.2",
|
|
87
|
-
"remark-autolink-headings": "^6.0.1",
|
|
88
|
-
"remark-slug": "^6.0.0",
|
|
89
|
-
"styled-components": "^5.3.0"
|
|
68
|
+
"@babel/runtime": "^7.14.8"
|
|
90
69
|
},
|
|
91
70
|
"devDependencies": {
|
|
92
71
|
"@babel/cli": "^7.14.5",
|
|
@@ -96,6 +75,9 @@
|
|
|
96
75
|
"@babel/preset-react": "^7.14.5",
|
|
97
76
|
"@babel/preset-typescript": "^7.14.5",
|
|
98
77
|
"@bolio-ui/icons": "^1.0.4",
|
|
78
|
+
"@mapbox/rehype-prism": "^0.6.0",
|
|
79
|
+
"@mdx-js/loader": "^1.6.22",
|
|
80
|
+
"@next/mdx": "^11.0.1",
|
|
99
81
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
100
82
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
101
83
|
"@storybook/addon-essentials": "^6.5.12",
|
|
@@ -110,9 +92,11 @@
|
|
|
110
92
|
"@types/styled-components": "^5.1.11",
|
|
111
93
|
"@typescript-eslint/eslint-plugin": "^4.29.0",
|
|
112
94
|
"@typescript-eslint/parser": "^4.29.0",
|
|
95
|
+
"algoliasearch": "^4.14.2",
|
|
113
96
|
"babel-loader": "^8.2.2",
|
|
114
97
|
"babel-plugin-styled-components": "^1.13.2",
|
|
115
98
|
"babel-plugin-transform-rename-import": "^2.3.0",
|
|
99
|
+
"classnames": "^2.3.1",
|
|
116
100
|
"eslint": "7.32.0",
|
|
117
101
|
"eslint-config-next": "11.0.1",
|
|
118
102
|
"eslint-config-prettier": "^8.3.0",
|
|
@@ -120,14 +104,32 @@
|
|
|
120
104
|
"eslint-plugin-react": "^7.24.0",
|
|
121
105
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
122
106
|
"eslint-plugin-storybook": "^0.6.4",
|
|
107
|
+
"gray-matter": "^4.0.3",
|
|
123
108
|
"husky": "^7.0.0",
|
|
124
109
|
"jest": "^27.0.6",
|
|
110
|
+
"jest-styled-components": "^7.0.5",
|
|
111
|
+
"kbar": "0.1.0-beta.6",
|
|
125
112
|
"lint-staged": "^11.1.1",
|
|
113
|
+
"next": "12.3.1",
|
|
114
|
+
"next-pwa": "^5.6.0",
|
|
115
|
+
"next-seo": "^5.5.0",
|
|
126
116
|
"plop": "^2.7.4",
|
|
127
117
|
"prettier": "2.3.2",
|
|
118
|
+
"prism-react-renderer": "^1.2.1",
|
|
119
|
+
"react": "^18.2.0",
|
|
120
|
+
"react-autosuggest": "^10.1.0",
|
|
121
|
+
"react-device-detect": "^1.17.0",
|
|
122
|
+
"react-dom": "^18.2.0",
|
|
123
|
+
"react-instantsearch-dom": "^6.12.0",
|
|
124
|
+
"react-live": "^2.2.3",
|
|
125
|
+
"react-syntax-highlighter": "^15.5.0",
|
|
126
|
+
"rehype-join-line": "^1.0.2",
|
|
127
|
+
"remark-autolink-headings": "^6.0.1",
|
|
128
|
+
"remark-slug": "^6.0.0",
|
|
128
129
|
"rollup": "^2.64.0",
|
|
129
130
|
"rollup-plugin-babel": "^4.4.0",
|
|
130
131
|
"rollup-plugin-local-resolve": "^1.0.7",
|
|
132
|
+
"styled-components": "^5.3.0",
|
|
131
133
|
"styled-jsx": "4.0.1",
|
|
132
134
|
"ttypescript": "^1.5.13",
|
|
133
135
|
"typescript": "^4.3.5",
|