@loja-integrada/admin-components 0.15.5 → 0.16.2
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/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/Forms/InputMask/InputMask.stories.d.ts +7 -0
- package/dist/Forms/InputMask/utils.d.ts +40 -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 +160 -5
- 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 +158 -6
- package/dist/admin-components.esm.js.map +1 -1
- package/package.json +14 -12
- package/src/Components/Button/Button.spec.tsx +1 -1
- package/src/Components/Button/Button.tsx +1 -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/index.ts +1 -0
- package/src/Forms/Checkbox/Checkbox.tsx +2 -1
- package/src/Forms/Input/Input.spec.tsx +1 -1
- package/src/Forms/InputMask/InputMask.spec.tsx +71 -6
- package/src/Forms/InputMask/InputMask.stories.tsx +63 -0
- package/src/Forms/InputMask/InputMask.tsx +1 -1
- package/src/Forms/InputMask/utils.ts +119 -1
- package/src/Forms/commonStyles.ts +1 -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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const SidebarFixedComponent: React.FC<SidebarFixedProps>;
|
|
3
|
+
export declare const SidebarFixed: React.NamedExoticComponent<SidebarFixedProps>;
|
|
4
|
+
export interface SidebarFixedProps {
|
|
5
|
+
/**
|
|
6
|
+
* React children
|
|
7
|
+
* Also support render prop
|
|
8
|
+
*/
|
|
9
|
+
children?: React.ReactNode | ((props: SidebarFixedProps) => React.ReactNode);
|
|
10
|
+
/**
|
|
11
|
+
* Bottom actions
|
|
12
|
+
*/
|
|
13
|
+
footerActions?: React.ReactNode;
|
|
14
|
+
/** Sidebar is open
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
isOpen?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Call when sidebar is closed
|
|
20
|
+
* */
|
|
21
|
+
onClose?: Function;
|
|
22
|
+
/**
|
|
23
|
+
* Help external link
|
|
24
|
+
*/
|
|
25
|
+
helpLink?: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SidebarFixedProps } from '.';
|
|
2
|
+
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, SidebarFixedProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SidebarFixed';
|
|
@@ -5,6 +5,13 @@ export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("
|
|
|
5
5
|
export declare const Date: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, InputMaskProps>;
|
|
6
6
|
export declare const OnlyNumbers: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, InputMaskProps>;
|
|
7
7
|
export declare const OnlyText: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, InputMaskProps>;
|
|
8
|
+
export declare const ZipCode: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, InputMaskProps>;
|
|
9
|
+
export declare const Nfe: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, InputMaskProps>;
|
|
10
|
+
export declare const Phone: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, InputMaskProps>;
|
|
11
|
+
export declare const Cellphone: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, InputMaskProps>;
|
|
12
|
+
export declare const PhoneOrCellphone: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, InputMaskProps>;
|
|
13
|
+
export declare const CPF: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, InputMaskProps>;
|
|
14
|
+
export declare const CNPJ: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, InputMaskProps>;
|
|
8
15
|
export declare const DateWithStartAdornment: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, InputMaskProps>;
|
|
9
16
|
export declare const DateWithEndAdornment: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, InputMaskProps>;
|
|
10
17
|
export declare const DateWithEndAdornmentError: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, InputMaskProps>;
|
|
@@ -21,5 +21,45 @@ export declare const formatValuePatterns: {
|
|
|
21
21
|
};
|
|
22
22
|
keepCharPositions: boolean;
|
|
23
23
|
inputMode: string;
|
|
24
|
+
placeholder: string;
|
|
25
|
+
};
|
|
26
|
+
zipCode: {
|
|
27
|
+
mask: (string | RegExp)[];
|
|
28
|
+
keepCharPositions: boolean;
|
|
29
|
+
inputMode: string;
|
|
30
|
+
placeholder: string;
|
|
31
|
+
};
|
|
32
|
+
nfe: {
|
|
33
|
+
mask: () => (string | RegExp)[];
|
|
34
|
+
keepCharPositions: boolean;
|
|
35
|
+
inputMode: string;
|
|
36
|
+
placeholder: string;
|
|
37
|
+
};
|
|
38
|
+
phone: {
|
|
39
|
+
mask: (string | RegExp)[];
|
|
40
|
+
inputMode: string;
|
|
41
|
+
placeholder: string;
|
|
42
|
+
};
|
|
43
|
+
cellphone: {
|
|
44
|
+
mask: (string | RegExp)[];
|
|
45
|
+
inputMode: string;
|
|
46
|
+
placeholder: string;
|
|
47
|
+
};
|
|
48
|
+
phoneOrCellphone: {
|
|
49
|
+
mask: (rawValue: any) => (string | RegExp)[];
|
|
50
|
+
inputMode: string;
|
|
51
|
+
placeholder: string;
|
|
52
|
+
};
|
|
53
|
+
cpf: {
|
|
54
|
+
mask: (string | RegExp)[];
|
|
55
|
+
keepCharPositions: boolean;
|
|
56
|
+
inputMode: string;
|
|
57
|
+
placeholder: string;
|
|
58
|
+
};
|
|
59
|
+
cnpj: {
|
|
60
|
+
mask: (string | RegExp)[];
|
|
61
|
+
keepCharPositions: boolean;
|
|
62
|
+
inputMode: string;
|
|
63
|
+
placeholder: string;
|
|
24
64
|
};
|
|
25
65
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const TagTypes: {
|
|
3
|
+
neutral: string;
|
|
4
|
+
primary: string;
|
|
5
|
+
danger: string;
|
|
6
|
+
success: string;
|
|
7
|
+
warning: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const Tag: React.MemoExoticComponent<({ type, content, fullWidth, className, action, }: TagProps) => JSX.Element>;
|
|
10
|
+
export interface TagProps {
|
|
11
|
+
/** Tag color
|
|
12
|
+
* @default neutral
|
|
13
|
+
* */
|
|
14
|
+
type?: keyof typeof TagTypes;
|
|
15
|
+
/**
|
|
16
|
+
* Tag content
|
|
17
|
+
* */
|
|
18
|
+
content: string | React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Enlarge width of the Tag
|
|
21
|
+
* */
|
|
22
|
+
fullWidth?: boolean;
|
|
23
|
+
/** Adittional classes for Tag
|
|
24
|
+
* @default ''
|
|
25
|
+
* */
|
|
26
|
+
className?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Action for the tag, like an button or icon
|
|
29
|
+
* */
|
|
30
|
+
action: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TagProps } from './Tag';
|
|
2
|
+
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, TagProps>;
|
|
5
|
+
export declare const WithAction: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, TagProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tag';
|
|
@@ -74,6 +74,18 @@ function _taggedTemplateLiteralLoose(strings, raw) {
|
|
|
74
74
|
return strings;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
var Adjust = function Adjust() {
|
|
78
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement("path", {
|
|
79
|
+
fillRule: "evenodd",
|
|
80
|
+
clipRule: "evenodd",
|
|
81
|
+
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"
|
|
82
|
+
}), React__default.createElement("path", {
|
|
83
|
+
fillRule: "evenodd",
|
|
84
|
+
clipRule: "evenodd",
|
|
85
|
+
d: "M5.74951 4V.5h-1.5V4h1.5Zm0 4h-1.5v9.5h1.5V8ZM13.7495 10V.5h-1.5V10h1.5Zm0 4h-1.5v3.5h1.5V14Z"
|
|
86
|
+
}));
|
|
87
|
+
};
|
|
88
|
+
|
|
77
89
|
var AngleLeft = function AngleLeft() {
|
|
78
90
|
return React__default.createElement("path", {
|
|
79
91
|
fillRule: "evenodd",
|
|
@@ -554,6 +566,7 @@ var User = function User() {
|
|
|
554
566
|
};
|
|
555
567
|
|
|
556
568
|
var icons = {
|
|
569
|
+
adjust: Adjust,
|
|
557
570
|
angleLeft: AngleLeft,
|
|
558
571
|
angleRight: AngleRight,
|
|
559
572
|
angleDiagonal: AngleDiagonal,
|
|
@@ -699,7 +712,7 @@ var listOfStylesDisabled = {
|
|
|
699
712
|
onlyText: "bg-transparent text-on-base-3 shadow-none ring-0 border-0"
|
|
700
713
|
};
|
|
701
714
|
var listOfSizes = {
|
|
702
|
-
small: "text-
|
|
715
|
+
small: "text-f6 h-10",
|
|
703
716
|
"default": "text-f6 h-12",
|
|
704
717
|
large: "text-f5 h-14"
|
|
705
718
|
};
|
|
@@ -831,7 +844,7 @@ var prefixClasses = adornmentClasses + " rounded-l left-0";
|
|
|
831
844
|
var sufixClasses = adornmentClasses + " rounded-r right-0";
|
|
832
845
|
var variantClasses = {
|
|
833
846
|
"default": 'h-12',
|
|
834
|
-
small: 'h-
|
|
847
|
+
small: 'h-10',
|
|
835
848
|
large: 'h-14',
|
|
836
849
|
xlarge: 'h-24'
|
|
837
850
|
};
|
|
@@ -1024,6 +1037,8 @@ function createAutoCorrectedDatePipe(dateFormat, _temp) {
|
|
|
1024
1037
|
};
|
|
1025
1038
|
}
|
|
1026
1039
|
|
|
1040
|
+
/* docs: https://github.com/text-mask/text-mask/blob/master/componentDocumentation.md */
|
|
1041
|
+
|
|
1027
1042
|
var formatValuePatterns = {
|
|
1028
1043
|
"default": {},
|
|
1029
1044
|
onlyNumber: {
|
|
@@ -1063,7 +1078,60 @@ var formatValuePatterns = {
|
|
|
1063
1078
|
mask: [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/],
|
|
1064
1079
|
pipe: /*#__PURE__*/createAutoCorrectedDatePipe('dd/mm/yyyy'),
|
|
1065
1080
|
keepCharPositions: true,
|
|
1066
|
-
inputMode: '
|
|
1081
|
+
inputMode: 'decimal',
|
|
1082
|
+
placeholder: '__/__/____'
|
|
1083
|
+
},
|
|
1084
|
+
zipCode: {
|
|
1085
|
+
mask: [/\d/, /\d/, /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/],
|
|
1086
|
+
keepCharPositions: true,
|
|
1087
|
+
inputMode: 'decimal',
|
|
1088
|
+
placeholder: '_____-___'
|
|
1089
|
+
},
|
|
1090
|
+
nfe: {
|
|
1091
|
+
mask: function mask() {
|
|
1092
|
+
var maxLength = 44;
|
|
1093
|
+
var mask = [];
|
|
1094
|
+
|
|
1095
|
+
for (var i = 1; i <= maxLength; i++) {
|
|
1096
|
+
mask.push(/\d/);
|
|
1097
|
+
if (i % 4 === 0 && i !== maxLength) mask.push(' ');
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
return mask;
|
|
1101
|
+
},
|
|
1102
|
+
keepCharPositions: true,
|
|
1103
|
+
inputMode: 'decimal',
|
|
1104
|
+
placeholder: '____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____'
|
|
1105
|
+
},
|
|
1106
|
+
phone: {
|
|
1107
|
+
mask: ['(', /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/],
|
|
1108
|
+
inputMode: 'decimal',
|
|
1109
|
+
placeholder: '(__) ____-____'
|
|
1110
|
+
},
|
|
1111
|
+
cellphone: {
|
|
1112
|
+
mask: ['(', /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/],
|
|
1113
|
+
inputMode: 'decimal',
|
|
1114
|
+
placeholder: '(__) _____-____'
|
|
1115
|
+
},
|
|
1116
|
+
phoneOrCellphone: {
|
|
1117
|
+
mask: function mask(rawValue) {
|
|
1118
|
+
var cleanedText = rawValue.replace(/[^\d]/g, '');
|
|
1119
|
+
if (cleanedText.length > 10) return formatValuePatterns.cellphone.mask;else return formatValuePatterns.phone.mask;
|
|
1120
|
+
},
|
|
1121
|
+
inputMode: 'decimal',
|
|
1122
|
+
placeholder: '(__) _____-____'
|
|
1123
|
+
},
|
|
1124
|
+
cpf: {
|
|
1125
|
+
mask: [/\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, '-', /\d/, /\d/],
|
|
1126
|
+
keepCharPositions: true,
|
|
1127
|
+
inputMode: 'decimal',
|
|
1128
|
+
placeholder: '___.___.___-__'
|
|
1129
|
+
},
|
|
1130
|
+
cnpj: {
|
|
1131
|
+
mask: [/\d/, /\d/, '.', /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/, '-', /\d/, /\d/],
|
|
1132
|
+
keepCharPositions: true,
|
|
1133
|
+
inputMode: 'decimal',
|
|
1134
|
+
placeholder: '___.___.___-__'
|
|
1067
1135
|
}
|
|
1068
1136
|
};
|
|
1069
1137
|
|
|
@@ -1081,7 +1149,7 @@ function InputMaskComponent(_ref, inputRef) {
|
|
|
1081
1149
|
|
|
1082
1150
|
var formatValueProps = formatValuePatterns[formatValue] || {};
|
|
1083
1151
|
|
|
1084
|
-
var mergedProps = _extends({},
|
|
1152
|
+
var mergedProps = _extends({}, formatValueProps, props);
|
|
1085
1153
|
|
|
1086
1154
|
if (!mergedProps.mask) {
|
|
1087
1155
|
mergedProps.mask = false;
|
|
@@ -1776,11 +1844,12 @@ var CheckboxComponent = function CheckboxComponent(_ref, ref) {
|
|
|
1776
1844
|
htmlFor: inputId,
|
|
1777
1845
|
className: "inline-flex " + alignOptions[boxAlign] + " cursor-pointer"
|
|
1778
1846
|
}, React__default.createElement("span", {
|
|
1779
|
-
className: "rounded z-50 flex items-center justify-center focus-within:ring-2 ring-focus"
|
|
1847
|
+
className: "relative rounded z-50 flex items-center justify-center focus-within:ring-2 ring-focus"
|
|
1780
1848
|
}, React__default.createElement("input", Object.assign({
|
|
1781
1849
|
ref: ref || inputRef,
|
|
1782
1850
|
type: "checkbox",
|
|
1783
1851
|
id: inputId,
|
|
1852
|
+
name: name,
|
|
1784
1853
|
className: "opacity-0 absolute h-4 w-4 z-50 cursor-pointer",
|
|
1785
1854
|
checked: isChecked,
|
|
1786
1855
|
onChange: handleChange,
|
|
@@ -2477,6 +2546,61 @@ var ModalComponent = function ModalComponent(_ref) {
|
|
|
2477
2546
|
|
|
2478
2547
|
var Modal = /*#__PURE__*/React__default.memo(ModalComponent);
|
|
2479
2548
|
|
|
2549
|
+
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'];
|
|
2550
|
+
var SidebarFixedComponent = function SidebarFixedComponent(_ref) {
|
|
2551
|
+
var children = _ref.children,
|
|
2552
|
+
footerActions = _ref.footerActions,
|
|
2553
|
+
_ref$isOpen = _ref.isOpen,
|
|
2554
|
+
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
2555
|
+
onClose = _ref.onClose,
|
|
2556
|
+
helpLink = _ref.helpLink;
|
|
2557
|
+
|
|
2558
|
+
var _useState = React.useState(false),
|
|
2559
|
+
sidebarIsOpen = _useState[0],
|
|
2560
|
+
setSidebarIsOpen = _useState[1];
|
|
2561
|
+
|
|
2562
|
+
React.useEffect(function () {
|
|
2563
|
+
setSidebarIsOpen(isOpen);
|
|
2564
|
+
}, [isOpen]);
|
|
2565
|
+
|
|
2566
|
+
var handleRequestCloseFunc = function handleRequestCloseFunc() {
|
|
2567
|
+
setSidebarIsOpen(false);
|
|
2568
|
+
onClose == null ? void 0 : onClose();
|
|
2569
|
+
};
|
|
2570
|
+
|
|
2571
|
+
return React__default.createElement("div", {
|
|
2572
|
+
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')
|
|
2573
|
+
}, React__default.createElement("div", {
|
|
2574
|
+
className: "sidebar-fixed-backdrop fixed inset-0 h-full w-full bg-black-alpha -z-1",
|
|
2575
|
+
onClick: handleRequestCloseFunc
|
|
2576
|
+
}), React__default.createElement("div", {
|
|
2577
|
+
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')
|
|
2578
|
+
}, React__default.createElement("div", {
|
|
2579
|
+
className: "sidebar-fixed-header flex justify-between items-center p-3 lg:px-5 text-inverted-2"
|
|
2580
|
+
}, React__default.createElement("button", {
|
|
2581
|
+
className: "sidebar-fixed-close p-2 hover:text-primary transition-colors",
|
|
2582
|
+
onClick: handleRequestCloseFunc
|
|
2583
|
+
}, React__default.createElement(Icon, {
|
|
2584
|
+
icon: "close",
|
|
2585
|
+
block: true,
|
|
2586
|
+
size: 4
|
|
2587
|
+
})), helpLink && React__default.createElement("a", {
|
|
2588
|
+
className: "sidebar-fixed-help p-2 hover:text-primary transition-colors",
|
|
2589
|
+
href: helpLink,
|
|
2590
|
+
target: "_blank",
|
|
2591
|
+
rel: "noreferrer"
|
|
2592
|
+
}, React__default.createElement(Icon, {
|
|
2593
|
+
icon: "questionCircle",
|
|
2594
|
+
block: true,
|
|
2595
|
+
size: 4
|
|
2596
|
+
}))), React__default.createElement("div", {
|
|
2597
|
+
className: "sidebar-fixed-content flex-1 flex-grow w-full overflow-auto overscroll-none px-5 lg:px-7 break-words " + backgroundShadowEffect.join(' ')
|
|
2598
|
+
}, children), footerActions && React__default.createElement("div", {
|
|
2599
|
+
className: "sidebar-fixed-footer flex justify-between items-center p-5 lg:p-7 lg:pt-6"
|
|
2600
|
+
}, footerActions)));
|
|
2601
|
+
};
|
|
2602
|
+
var SidebarFixed = /*#__PURE__*/React__default.memo(SidebarFixedComponent);
|
|
2603
|
+
|
|
2480
2604
|
var alertTypes = {
|
|
2481
2605
|
success: {
|
|
2482
2606
|
"class": 'bg-success-light border-success',
|
|
@@ -2606,6 +2730,34 @@ var StatusComponent = function StatusComponent(_ref2) {
|
|
|
2606
2730
|
|
|
2607
2731
|
var Status = /*#__PURE__*/React__default.memo(StatusComponent);
|
|
2608
2732
|
|
|
2733
|
+
var TagTypes = {
|
|
2734
|
+
neutral: 'bg-base-1 border-inverted-2',
|
|
2735
|
+
primary: 'bg-primary-light border-primary',
|
|
2736
|
+
danger: 'bg-danger-light border-danger',
|
|
2737
|
+
success: 'bg-success-light border-success',
|
|
2738
|
+
warning: 'bg-warning-light border-warning'
|
|
2739
|
+
};
|
|
2740
|
+
|
|
2741
|
+
var TagComponent = function TagComponent(_ref) {
|
|
2742
|
+
var _ref$type = _ref.type,
|
|
2743
|
+
type = _ref$type === void 0 ? 'neutral' : _ref$type,
|
|
2744
|
+
content = _ref.content,
|
|
2745
|
+
_ref$fullWidth = _ref.fullWidth,
|
|
2746
|
+
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
2747
|
+
_ref$className = _ref.className,
|
|
2748
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
2749
|
+
action = _ref.action;
|
|
2750
|
+
return React__default.createElement("div", {
|
|
2751
|
+
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
|
|
2752
|
+
}, React__default.createElement("div", {
|
|
2753
|
+
className: "min-w-0 break-words -my-px"
|
|
2754
|
+
}, content), action && React__default.createElement("div", {
|
|
2755
|
+
className: "-my-px ml-3"
|
|
2756
|
+
}, action));
|
|
2757
|
+
};
|
|
2758
|
+
|
|
2759
|
+
var Tag = /*#__PURE__*/React__default.memo(TagComponent);
|
|
2760
|
+
|
|
2609
2761
|
var contextClass = {
|
|
2610
2762
|
success: 'bg-primary-light border-primary-dark',
|
|
2611
2763
|
error: 'bg-danger-light border-danger-dark',
|
|
@@ -3390,6 +3542,8 @@ exports.Pagination = Pagination;
|
|
|
3390
3542
|
exports.Select = Select;
|
|
3391
3543
|
exports.SelectComponent = SelectComponent;
|
|
3392
3544
|
exports.Sidebar = Sidebar;
|
|
3545
|
+
exports.SidebarFixed = SidebarFixed;
|
|
3546
|
+
exports.SidebarFixedComponent = SidebarFixedComponent;
|
|
3393
3547
|
exports.SidebarItem = SidebarItem;
|
|
3394
3548
|
exports.SidebarSubItem = SidebarSubItem;
|
|
3395
3549
|
exports.Status = Status;
|
|
@@ -3398,6 +3552,7 @@ exports.TableList = TableList;
|
|
|
3398
3552
|
exports.TableListItem = TableListItem;
|
|
3399
3553
|
exports.TableListItemLoading = TableListItemLoading;
|
|
3400
3554
|
exports.Tabs = Tabs;
|
|
3555
|
+
exports.Tag = Tag;
|
|
3401
3556
|
exports.Timeline = Timeline;
|
|
3402
3557
|
exports.Toast = Toast;
|
|
3403
3558
|
exports.Toggle = Toggle;
|