@loja-integrada/admin-components 0.15.3 → 0.16.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.
- package/dist/Components/Modal/Modal.d.ts +5 -1
- package/dist/Components/SidebarFixed/SidebarFixed.d.ts +26 -0
- package/dist/Components/SidebarFixed/SidebarFixed.spec.d.ts +1 -0
- package/dist/Components/SidebarFixed/SidebarFixed.stories.d.ts +4 -0
- package/dist/Components/SidebarFixed/index.d.ts +1 -0
- package/dist/Components/index.d.ts +1 -0
- package/dist/Icons/icons-path/Adjust.d.ts +2 -0
- package/dist/Icons/icons-path/index.d.ts +1 -0
- package/dist/Indicators/Tag/Tag.d.ts +32 -0
- package/dist/Indicators/Tag/Tag.spec.d.ts +1 -0
- package/dist/Indicators/Tag/Tag.stories.d.ts +5 -0
- package/dist/Indicators/Tag/index.d.ts +1 -0
- package/dist/Indicators/index.d.ts +1 -0
- package/dist/admin-components.cjs.development.js +106 -4
- package/dist/admin-components.cjs.development.js.map +1 -1
- package/dist/admin-components.cjs.production.min.js +1 -1
- package/dist/admin-components.cjs.production.min.js.map +1 -1
- package/dist/admin-components.esm.js +104 -5
- package/dist/admin-components.esm.js.map +1 -1
- package/package.json +14 -12
- package/src/Components/Modal/Modal.tsx +6 -1
- package/src/Components/SidebarFixed/SidebarFixed.spec.tsx +35 -0
- package/src/Components/SidebarFixed/SidebarFixed.stories.tsx +39 -0
- package/src/Components/SidebarFixed/SidebarFixed.tsx +107 -0
- package/src/Components/SidebarFixed/index.tsx +1 -0
- package/src/Components/TableList/TableList.tsx +1 -1
- package/src/Components/TableList/TableListItemWrapper.tsx +1 -1
- package/src/Components/index.ts +1 -0
- package/src/Forms/Checkbox/Checkbox.tsx +2 -1
- package/src/Icons/icons-path/Adjust.tsx +16 -0
- package/src/Icons/icons-path/index.ts +2 -0
- package/src/Indicators/Tag/Tag.spec.tsx +38 -0
- package/src/Indicators/Tag/Tag.stories.tsx +33 -0
- package/src/Indicators/Tag/Tag.tsx +55 -0
- package/src/Indicators/Tag/index.tsx +1 -0
- package/src/Indicators/index.ts +1 -0
|
@@ -66,6 +66,18 @@ function _taggedTemplateLiteralLoose(strings, raw) {
|
|
|
66
66
|
return strings;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
var Adjust = function Adjust() {
|
|
70
|
+
return React.createElement(React.Fragment, null, React.createElement("path", {
|
|
71
|
+
fillRule: "evenodd",
|
|
72
|
+
clipRule: "evenodd",
|
|
73
|
+
d: "M2.25 5c0-.9665.7835-1.75 1.75-1.75h2c.9665 0 1.75.7835 1.75 1.75v2c0 .9665-.7835 1.75-1.75 1.75H4c-.9665 0-1.75-.7835-1.75-1.75V5ZM4 4.75c-.13807 0-.25.11193-.25.25v2c0 .13807.11193.25.25.25h2c.13807 0 .25-.11193.25-.25V5c0-.13807-.11193-.25-.25-.25H4ZM10.25 11c0-.9665.7835-1.75 1.75-1.75h2c.9665 0 1.75.7835 1.75 1.75v2c0 .9665-.7835 1.75-1.75 1.75h-2c-.9665 0-1.75-.7835-1.75-1.75v-2Zm1.75-.25c-.1381 0-.25.1119-.25.25v2c0 .1381.1119.25.25.25h2c.1381 0 .25-.1119.25-.25v-2c0-.1381-.1119-.25-.25-.25h-2Z"
|
|
74
|
+
}), React.createElement("path", {
|
|
75
|
+
fillRule: "evenodd",
|
|
76
|
+
clipRule: "evenodd",
|
|
77
|
+
d: "M5.74951 4V.5h-1.5V4h1.5Zm0 4h-1.5v9.5h1.5V8ZM13.7495 10V.5h-1.5V10h1.5Zm0 4h-1.5v3.5h1.5V14Z"
|
|
78
|
+
}));
|
|
79
|
+
};
|
|
80
|
+
|
|
69
81
|
var AngleLeft = function AngleLeft() {
|
|
70
82
|
return React.createElement("path", {
|
|
71
83
|
fillRule: "evenodd",
|
|
@@ -546,6 +558,7 @@ var User = function User() {
|
|
|
546
558
|
};
|
|
547
559
|
|
|
548
560
|
var icons = {
|
|
561
|
+
adjust: Adjust,
|
|
549
562
|
angleLeft: AngleLeft,
|
|
550
563
|
angleRight: AngleRight,
|
|
551
564
|
angleDiagonal: AngleDiagonal,
|
|
@@ -1768,11 +1781,12 @@ var CheckboxComponent = function CheckboxComponent(_ref, ref) {
|
|
|
1768
1781
|
htmlFor: inputId,
|
|
1769
1782
|
className: "inline-flex " + alignOptions[boxAlign] + " cursor-pointer"
|
|
1770
1783
|
}, React.createElement("span", {
|
|
1771
|
-
className: "rounded z-50 flex items-center justify-center focus-within:ring-2 ring-focus"
|
|
1784
|
+
className: "relative rounded z-50 flex items-center justify-center focus-within:ring-2 ring-focus"
|
|
1772
1785
|
}, React.createElement("input", Object.assign({
|
|
1773
1786
|
ref: ref || inputRef,
|
|
1774
1787
|
type: "checkbox",
|
|
1775
1788
|
id: inputId,
|
|
1789
|
+
name: name,
|
|
1776
1790
|
className: "opacity-0 absolute h-4 w-4 z-50 cursor-pointer",
|
|
1777
1791
|
checked: isChecked,
|
|
1778
1792
|
onChange: handleChange,
|
|
@@ -2040,7 +2054,7 @@ var TableComponent = function TableComponent(_ref2) {
|
|
|
2040
2054
|
var Table = /*#__PURE__*/React.memo(TableComponent);
|
|
2041
2055
|
|
|
2042
2056
|
var ItemWrapperClasses = "flex relative py-6 text-f7 leading-4 break-words no-underline";
|
|
2043
|
-
var ItemWrapperClassesContainerHover = "before:hover:block before:hover:absolute before:hover:h-full before:hover:w-8 before:hover:top-0 before:hover:-left-8 before:hover:bg-base-2 after:hover:block after:hover:absolute after:hover:h-full after:hover:w-8 after:hover:top-0 after:hover:-right-8 after:hover:bg-base-2";
|
|
2057
|
+
var ItemWrapperClassesContainerHover = "before:hover:block before:hover:absolute before:hover:h-full before:hover:w-5 lg:before:hover:w-8 before:hover:top-0 before:hover:-left-5 lg:before:hover:-left-8 before:hover:bg-base-2 after:hover:block after:hover:absolute after:hover:h-full after:hover:w-5 lg:after:hover:w-8 after:hover:top-0 after:hover:-right-5 lg:after:hover:-right-8 after:hover:bg-base-2";
|
|
2044
2058
|
|
|
2045
2059
|
var DefaultWrapper = function DefaultWrapper(props) {
|
|
2046
2060
|
var children = props.children,
|
|
@@ -2182,7 +2196,7 @@ var TableListComponent = function TableListComponent(_ref) {
|
|
|
2182
2196
|
}, isLoading ? React.createElement("div", {
|
|
2183
2197
|
className: "table-list-loading"
|
|
2184
2198
|
}, React.createElement(TableListItemLoading, null), React.createElement(TableListItemLoading, null), React.createElement(TableListItemLoading, null), React.createElement(TableListItemLoading, null)) : !itemsMemoized || !itemsMemoized.length ? React.createElement("div", {
|
|
2185
|
-
className: "table-list-empty flex flex-col items-center justify-center gap-5 min-h-[
|
|
2199
|
+
className: "table-list-empty flex flex-col items-center justify-center gap-5 min-h-[40vh] lg:min-h-[60vh] max-w-sm mx-auto px-4"
|
|
2186
2200
|
}, empty.illustration && React.createElement("div", {
|
|
2187
2201
|
className: "table-list-empty-illustration text-center"
|
|
2188
2202
|
}, empty.illustration), React.createElement("div", {
|
|
@@ -2402,6 +2416,8 @@ var ModalComponent = function ModalComponent(_ref) {
|
|
|
2402
2416
|
headerClose = _ref$headerClose === void 0 ? 'Fechar' : _ref$headerClose,
|
|
2403
2417
|
footerActions = _ref.footerActions,
|
|
2404
2418
|
onClose = _ref.onClose,
|
|
2419
|
+
_ref$closeTimeout = _ref.closeTimeout,
|
|
2420
|
+
closeTimeout = _ref$closeTimeout === void 0 ? 200 : _ref$closeTimeout,
|
|
2405
2421
|
_parentSelector = _ref.parentSelector,
|
|
2406
2422
|
children = _ref.children;
|
|
2407
2423
|
|
|
@@ -2430,7 +2446,7 @@ var ModalComponent = function ModalComponent(_ref) {
|
|
|
2430
2446
|
isOpen: modalIsOpen,
|
|
2431
2447
|
onAfterClose: handleAfterCloseFunc,
|
|
2432
2448
|
onRequestClose: handleRequestCloseFunc,
|
|
2433
|
-
closeTimeoutMS:
|
|
2449
|
+
closeTimeoutMS: closeTimeout,
|
|
2434
2450
|
ariaHideApp: false,
|
|
2435
2451
|
shouldCloseOnOverlayClick: !modalPreventClose,
|
|
2436
2452
|
shouldCloseOnEsc: !modalPreventClose,
|
|
@@ -2467,6 +2483,61 @@ var ModalComponent = function ModalComponent(_ref) {
|
|
|
2467
2483
|
|
|
2468
2484
|
var Modal = /*#__PURE__*/React.memo(ModalComponent);
|
|
2469
2485
|
|
|
2486
|
+
var backgroundShadowEffect = ['[background:linear-gradient(#FFFFFF_33%,rgba(255,255,255,0)),linear-gradient(rgba(255,255,255,0),#FFFFFF_66%)_0_100%,radial-gradient(farthest-side_at_50%_0,rgba(156,156,156,0.5),rgba(0,0,0,0)),radial-gradient(farthest-side_at_50%_100%,_rgba(156,156,156,0.5),rgba(0,0,0,0))_0_100%]', '[background-size:100%_15px,100%_15px,100%_5px,100%_5px]', '[background-attachment:local,local,scroll,scroll]', '[background-repeat:no-repeat]', '[background-color:#FFFFFF]', '[&_.form-group_.bg-base-1]:bg-transparent'];
|
|
2487
|
+
var SidebarFixedComponent = function SidebarFixedComponent(_ref) {
|
|
2488
|
+
var children = _ref.children,
|
|
2489
|
+
footerActions = _ref.footerActions,
|
|
2490
|
+
_ref$isOpen = _ref.isOpen,
|
|
2491
|
+
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
2492
|
+
onClose = _ref.onClose,
|
|
2493
|
+
helpLink = _ref.helpLink;
|
|
2494
|
+
|
|
2495
|
+
var _useState = useState(false),
|
|
2496
|
+
sidebarIsOpen = _useState[0],
|
|
2497
|
+
setSidebarIsOpen = _useState[1];
|
|
2498
|
+
|
|
2499
|
+
useEffect(function () {
|
|
2500
|
+
setSidebarIsOpen(isOpen);
|
|
2501
|
+
}, [isOpen]);
|
|
2502
|
+
|
|
2503
|
+
var handleRequestCloseFunc = function handleRequestCloseFunc() {
|
|
2504
|
+
setSidebarIsOpen(false);
|
|
2505
|
+
onClose == null ? void 0 : onClose();
|
|
2506
|
+
};
|
|
2507
|
+
|
|
2508
|
+
return React.createElement("div", {
|
|
2509
|
+
className: "sidebar-fixed fixed z-40 lg:z-20 right-0 bottom-0 w-full h-full transition-all overflow-x-hidden " + (sidebarIsOpen ? 'pointer-events-auto opacity-100' : 'opacity-0 pointer-events-none')
|
|
2510
|
+
}, React.createElement("div", {
|
|
2511
|
+
className: "sidebar-fixed-backdrop fixed inset-0 h-full w-full bg-black-alpha -z-1",
|
|
2512
|
+
onClick: handleRequestCloseFunc
|
|
2513
|
+
}), React.createElement("div", {
|
|
2514
|
+
className: "sidebar-fixed-inner mt-10 sm:mt-0 top-0 bottom-0 right-0 absolute flex flex-col justify-between bg-base-1 transform transition-transform shadow h-auto w-full sm:max-w-[410px] sm:ml-16 rounded-t-lg sm:rounded-none " + (sidebarIsOpen ? 'translate-x-0' : 'translate-x-10')
|
|
2515
|
+
}, React.createElement("div", {
|
|
2516
|
+
className: "sidebar-fixed-header flex justify-between items-center p-3 lg:px-5 text-inverted-2"
|
|
2517
|
+
}, React.createElement("button", {
|
|
2518
|
+
className: "sidebar-fixed-close p-2 hover:text-primary transition-colors",
|
|
2519
|
+
onClick: handleRequestCloseFunc
|
|
2520
|
+
}, React.createElement(Icon, {
|
|
2521
|
+
icon: "close",
|
|
2522
|
+
block: true,
|
|
2523
|
+
size: 4
|
|
2524
|
+
})), helpLink && React.createElement("a", {
|
|
2525
|
+
className: "sidebar-fixed-help p-2 hover:text-primary transition-colors",
|
|
2526
|
+
href: helpLink,
|
|
2527
|
+
target: "_blank",
|
|
2528
|
+
rel: "noreferrer"
|
|
2529
|
+
}, React.createElement(Icon, {
|
|
2530
|
+
icon: "questionCircle",
|
|
2531
|
+
block: true,
|
|
2532
|
+
size: 4
|
|
2533
|
+
}))), React.createElement("div", {
|
|
2534
|
+
className: "sidebar-fixed-content flex-1 flex-grow w-full overflow-auto overscroll-none px-5 lg:px-7 break-words " + backgroundShadowEffect.join(' ')
|
|
2535
|
+
}, children), footerActions && React.createElement("div", {
|
|
2536
|
+
className: "sidebar-fixed-footer flex justify-between items-center p-5 lg:p-7 lg:pt-6"
|
|
2537
|
+
}, footerActions)));
|
|
2538
|
+
};
|
|
2539
|
+
var SidebarFixed = /*#__PURE__*/React.memo(SidebarFixedComponent);
|
|
2540
|
+
|
|
2470
2541
|
var alertTypes = {
|
|
2471
2542
|
success: {
|
|
2472
2543
|
"class": 'bg-success-light border-success',
|
|
@@ -2596,6 +2667,34 @@ var StatusComponent = function StatusComponent(_ref2) {
|
|
|
2596
2667
|
|
|
2597
2668
|
var Status = /*#__PURE__*/React.memo(StatusComponent);
|
|
2598
2669
|
|
|
2670
|
+
var TagTypes = {
|
|
2671
|
+
neutral: 'bg-base-1 border-inverted-2',
|
|
2672
|
+
primary: 'bg-primary-light border-primary',
|
|
2673
|
+
danger: 'bg-danger-light border-danger',
|
|
2674
|
+
success: 'bg-success-light border-success',
|
|
2675
|
+
warning: 'bg-warning-light border-warning'
|
|
2676
|
+
};
|
|
2677
|
+
|
|
2678
|
+
var TagComponent = function TagComponent(_ref) {
|
|
2679
|
+
var _ref$type = _ref.type,
|
|
2680
|
+
type = _ref$type === void 0 ? 'neutral' : _ref$type,
|
|
2681
|
+
content = _ref.content,
|
|
2682
|
+
_ref$fullWidth = _ref.fullWidth,
|
|
2683
|
+
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
2684
|
+
_ref$className = _ref.className,
|
|
2685
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
2686
|
+
action = _ref.action;
|
|
2687
|
+
return React.createElement("div", {
|
|
2688
|
+
className: "tag " + (fullWidth ? 'flex' : 'inline-flex') + " items-center justify-between border rounded px-4 py-2 tracking-4 leading-6 text-f6 text-primary-bold " + TagTypes[type] + " " + className
|
|
2689
|
+
}, React.createElement("div", {
|
|
2690
|
+
className: "min-w-0 break-words -my-px"
|
|
2691
|
+
}, content), action && React.createElement("div", {
|
|
2692
|
+
className: "-my-px ml-3"
|
|
2693
|
+
}, action));
|
|
2694
|
+
};
|
|
2695
|
+
|
|
2696
|
+
var Tag = /*#__PURE__*/React.memo(TagComponent);
|
|
2697
|
+
|
|
2599
2698
|
var contextClass = {
|
|
2600
2699
|
success: 'bg-primary-light border-primary-dark',
|
|
2601
2700
|
error: 'bg-danger-light border-danger-dark',
|
|
@@ -3358,5 +3457,5 @@ var PaginationComponent = function PaginationComponent(_ref) {
|
|
|
3358
3457
|
|
|
3359
3458
|
var Pagination = /*#__PURE__*/React.memo(PaginationComponent);
|
|
3360
3459
|
|
|
3361
|
-
export { ActionBar, Alert, Badge, Box, Breadcrumb, Button, Checkbox, Container$1 as Container, Dropdown, Icon, Input, InputCurrency, InputCurrencyComponent, InputHelpText, InputLabel, InputMask, LoadingPlaceholder, Modal, Pagination, Select, SelectComponent, Sidebar, SidebarItem, SidebarSubItem, Status, Table, TableList, TableListItem, TableListItemLoading, Tabs, Timeline, Toast, Toggle, Tooltip, Topbar, sizeClasses, varianErrorClasses, variantControlClasses, variantDisabledClasses, variantSelectedClasses, variantValueClasses };
|
|
3460
|
+
export { ActionBar, Alert, Badge, Box, Breadcrumb, Button, Checkbox, Container$1 as Container, Dropdown, Icon, Input, InputCurrency, InputCurrencyComponent, InputHelpText, InputLabel, InputMask, LoadingPlaceholder, Modal, Pagination, Select, SelectComponent, Sidebar, SidebarFixed, SidebarFixedComponent, SidebarItem, SidebarSubItem, Status, Table, TableList, TableListItem, TableListItemLoading, Tabs, Tag, Timeline, Toast, Toggle, Tooltip, Topbar, sizeClasses, varianErrorClasses, variantControlClasses, variantDisabledClasses, variantSelectedClasses, variantValueClasses };
|
|
3362
3461
|
//# sourceMappingURL=admin-components.esm.js.map
|