@loja-integrada/admin-components 0.14.1 → 0.15.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/TableList/TableList.d.ts +38 -0
- package/dist/Components/TableList/TableList.spec.d.ts +1 -0
- package/dist/Components/TableList/TableList.stories.d.ts +7 -0
- package/dist/Components/TableList/TableListItem.d.ts +3 -0
- package/dist/Components/TableList/TableListItem.interface.d.ts +56 -0
- package/dist/Components/TableList/TableListItem.spec.d.ts +1 -0
- package/dist/Components/TableList/TableListItem.stories.d.ts +4 -0
- package/dist/Components/TableList/TableListItemLoading.d.ts +3 -0
- package/dist/Components/TableList/TableListItemLoading.spec.d.ts +1 -0
- package/dist/Components/TableList/TableListItemLoading.stories.d.ts +4 -0
- package/dist/Components/TableList/TableListItemWrapper.d.ts +12 -0
- package/dist/Components/TableList/TableListItemWrapper.spec.d.ts +1 -0
- package/dist/Components/TableList/TableListItemWrapper.stories.d.ts +4 -0
- package/dist/Components/TableList/index.d.ts +1 -0
- package/dist/Components/index.d.ts +1 -0
- package/dist/Navigation/Breadcrumb/index.d.ts +7 -4
- package/dist/admin-components.cjs.development.js +193 -6
- 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 +193 -7
- package/dist/admin-components.esm.js.map +1 -1
- package/package.json +24 -21
- package/src/Components/TableList/TableList.spec.tsx +85 -0
- package/src/Components/TableList/TableList.stories.tsx +168 -0
- package/src/Components/TableList/TableList.tsx +168 -0
- package/src/Components/TableList/TableListItem.interface.ts +57 -0
- package/src/Components/TableList/TableListItem.spec.tsx +64 -0
- package/src/Components/TableList/TableListItem.stories.tsx +43 -0
- package/src/Components/TableList/TableListItem.tsx +63 -0
- package/src/Components/TableList/TableListItemLoading.spec.tsx +18 -0
- package/src/Components/TableList/TableListItemLoading.stories.tsx +22 -0
- package/src/Components/TableList/TableListItemLoading.tsx +40 -0
- package/src/Components/TableList/TableListItemWrapper.spec.tsx +32 -0
- package/src/Components/TableList/TableListItemWrapper.stories.tsx +38 -0
- package/src/Components/TableList/TableListItemWrapper.tsx +40 -0
- package/src/Components/TableList/index.tsx +1 -0
- package/src/Components/Timeline/TimelineItem.tsx +1 -1
- package/src/Components/index.ts +1 -0
- package/src/Indicators/Badge/Badge.spec.tsx +1 -1
- package/src/Indicators/Badge/Badge.tsx +3 -5
- package/src/Navigation/Breadcrumb/Breadcrumb.spec.tsx +12 -0
- package/src/Navigation/Breadcrumb/index.tsx +20 -6
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableListItemProps } from './TableListItem.interface';
|
|
3
|
+
export declare const TableList: React.MemoExoticComponent<({ className, itemWrapper, items, isLoading, empty, withHover, isInsideContainer, }: TableListProps) => JSX.Element>;
|
|
4
|
+
export interface TableListProps extends Pick<TableListItemProps, 'withHover' | 'isInsideContainer' | 'itemWrapper'> {
|
|
5
|
+
/**
|
|
6
|
+
* Custom class name
|
|
7
|
+
* */
|
|
8
|
+
className?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Items of the TableList
|
|
11
|
+
*/
|
|
12
|
+
items?: Omit<TableListItemProps, 'forceBorderDesktop' | 'itemWrapper' | 'withHover'>[];
|
|
13
|
+
/** TableList is loading
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
isLoading?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Content to show when TableList is empty
|
|
19
|
+
*/
|
|
20
|
+
empty?: {
|
|
21
|
+
/** Title when is empty
|
|
22
|
+
* @default 'Nenhum registro encontrado'
|
|
23
|
+
*/
|
|
24
|
+
title?: string | React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Subtitle when is empty
|
|
27
|
+
*/
|
|
28
|
+
subTitle?: string | React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Illustration or icon for when is empty
|
|
31
|
+
*/
|
|
32
|
+
illustration?: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Action (button) for when is empty
|
|
35
|
+
*/
|
|
36
|
+
action?: React.ReactNode;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TableListProps } from './TableList';
|
|
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, TableListProps>;
|
|
5
|
+
export declare const WithLoading: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, TableListProps>;
|
|
6
|
+
export declare const WithEmpty: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, TableListProps>;
|
|
7
|
+
export declare const WithLink: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, TableListProps>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IconProps } from '../../Icons';
|
|
3
|
+
export declare type TableListItemWrapperProp = React.ComponentClass<any> | React.FunctionComponent<any>;
|
|
4
|
+
export interface TableListItemProps {
|
|
5
|
+
/**
|
|
6
|
+
* Title of the item
|
|
7
|
+
*/
|
|
8
|
+
title: string | React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Description that appears above the title
|
|
11
|
+
*/
|
|
12
|
+
description?: string | React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Timestamp of the item, usually in HH:mm
|
|
15
|
+
*/
|
|
16
|
+
timestampTime?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Timestamp of the item, usually in dd/mm/yyyy
|
|
19
|
+
*/
|
|
20
|
+
timestampDate?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Icon to show at item
|
|
23
|
+
*/
|
|
24
|
+
withIcon?: {
|
|
25
|
+
/**
|
|
26
|
+
* Classes with text-color and background of icon
|
|
27
|
+
*/
|
|
28
|
+
class?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Icon to use
|
|
31
|
+
*/
|
|
32
|
+
icon?: IconProps['icon'];
|
|
33
|
+
};
|
|
34
|
+
/** Force border top at desktop even if is first item
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
forceBorderDesktop?: boolean;
|
|
38
|
+
/** Show hover effect
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
withHover?: boolean;
|
|
42
|
+
/** Adds hover effect and mobile border with negative margin to fulfill container padding
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
isInsideContainer?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Props of the `item.itemWrapper`
|
|
48
|
+
*/
|
|
49
|
+
itemWrapperProps?: {
|
|
50
|
+
[key: string]: unknown;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Component to wrap item. Usually an <a> or related. Props of each item are placed at `items.itemWrapperProps`
|
|
54
|
+
*/
|
|
55
|
+
itemWrapper?: TableListItemWrapperProp;
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TableListItemProps } from './TableListItem.interface';
|
|
2
|
+
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const Item: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, TableListItemProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TableListItemProps } from './TableListItem.interface';
|
|
2
|
+
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const ItemLoading: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, Pick<TableListItemProps, "forceBorderDesktop">>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableListItemWrapperProp } from './TableListItem.interface';
|
|
3
|
+
export declare const TableListItemWrapper: ({ Wrapper, props, children, withHover, isInsideContainer, }: TableListItemWrapperProps) => JSX.Element;
|
|
4
|
+
export interface TableListItemWrapperProps {
|
|
5
|
+
Wrapper?: TableListItemWrapperProp;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
props?: {
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
};
|
|
10
|
+
withHover?: boolean;
|
|
11
|
+
isInsideContainer?: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TableListItemWrapperProps } from './TableListItemWrapper';
|
|
2
|
+
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const ItemWrapper: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, TableListItemWrapperProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TableList';
|
|
@@ -8,11 +8,11 @@ export interface BreadcrumbProps {
|
|
|
8
8
|
/**
|
|
9
9
|
* Current page title
|
|
10
10
|
* */
|
|
11
|
-
currentTitle: string;
|
|
11
|
+
currentTitle: string | React.ReactNode;
|
|
12
12
|
/**
|
|
13
13
|
* Previous page title
|
|
14
14
|
* */
|
|
15
|
-
previousTitle?: string;
|
|
15
|
+
previousTitle?: string | React.ReactNode;
|
|
16
16
|
/**
|
|
17
17
|
* Previous page href
|
|
18
18
|
* */
|
|
@@ -22,8 +22,7 @@ export interface BreadcrumbProps {
|
|
|
22
22
|
* Example: `const Link = (props: any) => { return <a href="https://www.google.com" target="_blank" className={`underline ` + props.className}>{props.children}</a> }`
|
|
23
23
|
* */
|
|
24
24
|
Link?: React.ElementType;
|
|
25
|
-
/**
|
|
26
|
-
* Aligment of `currentTitle` at mobile
|
|
25
|
+
/** Aligment of `currentTitle` at mobile
|
|
27
26
|
* @default 'left'
|
|
28
27
|
* */
|
|
29
28
|
mobileAlign?: 'left' | 'center';
|
|
@@ -39,4 +38,8 @@ export interface BreadcrumbProps {
|
|
|
39
38
|
* Custom actions and buttons
|
|
40
39
|
* */
|
|
41
40
|
actions?: React.ReactNode;
|
|
41
|
+
/** Should show actions only at one resolution or always
|
|
42
|
+
* @default 'both'
|
|
43
|
+
* */
|
|
44
|
+
actionsDisplay?: 'desktop' | 'mobile' | 'both';
|
|
42
45
|
}
|
|
@@ -2038,6 +2038,185 @@ var TableComponent = function TableComponent(_ref2) {
|
|
|
2038
2038
|
|
|
2039
2039
|
var Table = /*#__PURE__*/React__default.memo(TableComponent);
|
|
2040
2040
|
|
|
2041
|
+
var ItemWrapperClasses = "flex relative py-6 text-f7 leading-4 break-words no-underline";
|
|
2042
|
+
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";
|
|
2043
|
+
|
|
2044
|
+
var DefaultWrapper = function DefaultWrapper(props) {
|
|
2045
|
+
var children = props.children,
|
|
2046
|
+
restProps = _objectWithoutPropertiesLoose(props, ["children"]);
|
|
2047
|
+
|
|
2048
|
+
return React__default.createElement("div", Object.assign({}, restProps), children);
|
|
2049
|
+
};
|
|
2050
|
+
|
|
2051
|
+
var TableListItemWrapper = function TableListItemWrapper(_ref) {
|
|
2052
|
+
var _ref$Wrapper = _ref.Wrapper,
|
|
2053
|
+
Wrapper = _ref$Wrapper === void 0 ? DefaultWrapper : _ref$Wrapper,
|
|
2054
|
+
_ref$props = _ref.props,
|
|
2055
|
+
props = _ref$props === void 0 ? {} : _ref$props,
|
|
2056
|
+
children = _ref.children,
|
|
2057
|
+
_ref$withHover = _ref.withHover,
|
|
2058
|
+
withHover = _ref$withHover === void 0 ? false : _ref$withHover,
|
|
2059
|
+
_ref$isInsideContaine = _ref.isInsideContainer,
|
|
2060
|
+
isInsideContainer = _ref$isInsideContaine === void 0 ? false : _ref$isInsideContaine;
|
|
2061
|
+
return React__default.createElement(Wrapper, Object.assign({
|
|
2062
|
+
className: "table-item-wrapper " + ItemWrapperClasses + " " + (withHover ? "hover:bg-base-2 " + (isInsideContainer ? ItemWrapperClassesContainerHover : '') : '')
|
|
2063
|
+
}, props), children);
|
|
2064
|
+
};
|
|
2065
|
+
|
|
2066
|
+
var TableListItem = function TableListItem(_ref) {
|
|
2067
|
+
var _ref$forceBorderDeskt = _ref.forceBorderDesktop,
|
|
2068
|
+
forceBorderDesktop = _ref$forceBorderDeskt === void 0 ? false : _ref$forceBorderDeskt,
|
|
2069
|
+
title = _ref.title,
|
|
2070
|
+
description = _ref.description,
|
|
2071
|
+
timestampTime = _ref.timestampTime,
|
|
2072
|
+
timestampDate = _ref.timestampDate,
|
|
2073
|
+
itemWrapper = _ref.itemWrapper,
|
|
2074
|
+
itemWrapperProps = _ref.itemWrapperProps,
|
|
2075
|
+
_ref$withHover = _ref.withHover,
|
|
2076
|
+
withHover = _ref$withHover === void 0 ? false : _ref$withHover,
|
|
2077
|
+
_ref$isInsideContaine = _ref.isInsideContainer,
|
|
2078
|
+
isInsideContainer = _ref$isInsideContaine === void 0 ? false : _ref$isInsideContaine,
|
|
2079
|
+
withIcon = _ref.withIcon;
|
|
2080
|
+
return React__default.createElement("div", {
|
|
2081
|
+
className: "table-item border-primary-bold border-opacity-10 border-t first:border-t-0 " + (forceBorderDesktop ? 'lg:first:border-t' : '')
|
|
2082
|
+
}, React__default.createElement(TableListItemWrapper, {
|
|
2083
|
+
Wrapper: itemWrapper,
|
|
2084
|
+
props: itemWrapperProps,
|
|
2085
|
+
withHover: withHover,
|
|
2086
|
+
isInsideContainer: isInsideContainer
|
|
2087
|
+
}, withIcon && React__default.createElement("div", {
|
|
2088
|
+
className: "table-item-icon flex items-center justify-center flex-none mr-4"
|
|
2089
|
+
}, React__default.createElement("div", {
|
|
2090
|
+
className: "table-item-icon-background h-8 w-8 flex items-center justify-center rounded " + (withIcon["class"] || '')
|
|
2091
|
+
}, React__default.createElement(Icon, {
|
|
2092
|
+
icon: withIcon.icon || 'minus',
|
|
2093
|
+
block: true,
|
|
2094
|
+
size: 5
|
|
2095
|
+
}))), React__default.createElement("div", {
|
|
2096
|
+
className: "table-item-content flex flex-col justify-center flex-auto gap-1.5 min-w-0 w-full"
|
|
2097
|
+
}, React__default.createElement("div", {
|
|
2098
|
+
className: "table-item-title text-f6 font-semibold"
|
|
2099
|
+
}, title), description && React__default.createElement("div", {
|
|
2100
|
+
className: "table-item-description"
|
|
2101
|
+
}, description)), timestampTime && React__default.createElement("div", {
|
|
2102
|
+
className: "table-item-timestamp flex flex-col justify-center items-end shrink-0 gap-1.5 ml-4 min-w-0 max-w-[50%] text-right"
|
|
2103
|
+
}, React__default.createElement("div", {
|
|
2104
|
+
className: "table-item-timestamp-time w-full"
|
|
2105
|
+
}, timestampTime), timestampDate && React__default.createElement("div", {
|
|
2106
|
+
className: "table-item-timestamp-date w-full hidden lg:block"
|
|
2107
|
+
}, timestampDate))));
|
|
2108
|
+
};
|
|
2109
|
+
|
|
2110
|
+
var TableListItemLoading = function TableListItemLoading(_ref) {
|
|
2111
|
+
var _ref$forceBorderDeskt = _ref.forceBorderDesktop,
|
|
2112
|
+
forceBorderDesktop = _ref$forceBorderDeskt === void 0 ? false : _ref$forceBorderDeskt;
|
|
2113
|
+
return React__default.createElement("div", {
|
|
2114
|
+
className: "table-item table-item-loading border-primary-bold border-opacity-10 border-t first:border-t-0 " + (forceBorderDesktop ? 'lg:first:border-t' : '')
|
|
2115
|
+
}, React__default.createElement(TableListItemWrapper, null, React__default.createElement("div", {
|
|
2116
|
+
className: "table-item-icon flex items-center justify-center flex-none mr-4"
|
|
2117
|
+
}, React__default.createElement("div", {
|
|
2118
|
+
className: "table-item-icon-background h-8 w-8 flex items-center justify-center rounded"
|
|
2119
|
+
}, React__default.createElement(LoadingPlaceholder, {
|
|
2120
|
+
className: "w-full"
|
|
2121
|
+
}))), React__default.createElement("div", {
|
|
2122
|
+
className: "table-item-content flex flex-col justify-center flex-auto gap-1.5 min-w-0 w-full"
|
|
2123
|
+
}, React__default.createElement("div", {
|
|
2124
|
+
className: "table-item-title text-f6 font-semibold"
|
|
2125
|
+
}, React__default.createElement(LoadingPlaceholder, {
|
|
2126
|
+
className: "w-2/3"
|
|
2127
|
+
})), React__default.createElement("div", {
|
|
2128
|
+
className: "table-item-description"
|
|
2129
|
+
}, React__default.createElement(LoadingPlaceholder, {
|
|
2130
|
+
className: "w-1/3"
|
|
2131
|
+
}))), React__default.createElement("div", {
|
|
2132
|
+
className: "table-item-timestamp flex flex-col justify-center items-end shrink-0 gap-1.5 ml-4 min-w-0 max-w-[50%] text-right"
|
|
2133
|
+
}, React__default.createElement("div", {
|
|
2134
|
+
className: "table-item-timestamp-time w-full"
|
|
2135
|
+
}, React__default.createElement(LoadingPlaceholder, {
|
|
2136
|
+
className: "w-16"
|
|
2137
|
+
})))));
|
|
2138
|
+
};
|
|
2139
|
+
|
|
2140
|
+
var groupTitleMobileClass = "before:block before:absolute before:h-0 before:w-5 before:-top-px before:-left-5 before:border-t before:border-primary-bold before:border-opacity-10 after:block after:absolute after:h-0 after:w-5 after:-top-px after:-right-5 after:border-t after:border-primary-bold after:border-opacity-10";
|
|
2141
|
+
|
|
2142
|
+
var TableListComponent = function TableListComponent(_ref) {
|
|
2143
|
+
var _ref$className = _ref.className,
|
|
2144
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
2145
|
+
itemWrapper = _ref.itemWrapper,
|
|
2146
|
+
_ref$items = _ref.items,
|
|
2147
|
+
items = _ref$items === void 0 ? [] : _ref$items,
|
|
2148
|
+
_ref$isLoading = _ref.isLoading,
|
|
2149
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
2150
|
+
_ref$empty = _ref.empty,
|
|
2151
|
+
empty = _ref$empty === void 0 ? {
|
|
2152
|
+
title: 'Nenhum registro encontrado'
|
|
2153
|
+
} : _ref$empty,
|
|
2154
|
+
_ref$withHover = _ref.withHover,
|
|
2155
|
+
withHover = _ref$withHover === void 0 ? false : _ref$withHover,
|
|
2156
|
+
_ref$isInsideContaine = _ref.isInsideContainer,
|
|
2157
|
+
isInsideContainer = _ref$isInsideContaine === void 0 ? false : _ref$isInsideContaine;
|
|
2158
|
+
var itemsMemoized = React__default.useMemo(function () {
|
|
2159
|
+
var groups = items.reduce(function (groups, item) {
|
|
2160
|
+
var groupTitle = item.timestampDate || item.timestampTime || 'no_title';
|
|
2161
|
+
|
|
2162
|
+
if (!groups[groupTitle]) {
|
|
2163
|
+
groups[groupTitle] = [];
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
groups[groupTitle].push(item);
|
|
2167
|
+
return groups;
|
|
2168
|
+
}, {});
|
|
2169
|
+
return Object.keys(groups).map(function (groupTitle) {
|
|
2170
|
+
return {
|
|
2171
|
+
title: groupTitle,
|
|
2172
|
+
items: groups[groupTitle]
|
|
2173
|
+
};
|
|
2174
|
+
});
|
|
2175
|
+
}, [items]);
|
|
2176
|
+
return React__default.createElement("div", {
|
|
2177
|
+
className: "table-list tracking-tight " + className
|
|
2178
|
+
}, isLoading ? React__default.createElement("div", {
|
|
2179
|
+
className: "table-list-loading"
|
|
2180
|
+
}, React__default.createElement(TableListItemLoading, null), React__default.createElement(TableListItemLoading, null), React__default.createElement(TableListItemLoading, null), React__default.createElement(TableListItemLoading, null)) : !itemsMemoized || !itemsMemoized.length ? React__default.createElement("div", {
|
|
2181
|
+
className: "table-list-empty flex flex-col items-center justify-center gap-5 min-h-[80vh] lg:min-h-[60vh] max-w-sm mx-auto px-4"
|
|
2182
|
+
}, empty.illustration && React__default.createElement("div", {
|
|
2183
|
+
className: "table-list-empty-illustration text-center"
|
|
2184
|
+
}, empty.illustration), React__default.createElement("div", {
|
|
2185
|
+
className: "table-list-empty-title text-center text-f4 font-semibold text-primary-bold leading-7"
|
|
2186
|
+
}, empty.title), empty.subTitle && React__default.createElement("div", {
|
|
2187
|
+
className: "table-list-empty-subtitle text-center text-f6 text-on-base-2 leading-6 -mt-1"
|
|
2188
|
+
}, empty.subTitle), empty.action && React__default.createElement("div", {
|
|
2189
|
+
className: "table-list-empty-action text-center"
|
|
2190
|
+
}, empty.action)) : itemsMemoized.map(function (group, indexGroup) {
|
|
2191
|
+
return React__default.createElement("div", {
|
|
2192
|
+
key: "group-items-" + indexGroup,
|
|
2193
|
+
className: "table-list-group"
|
|
2194
|
+
}, group.title && group.title !== 'no_title' && React__default.createElement("div", {
|
|
2195
|
+
className: "table-list-title relative lg:hidden border-primary-bold border-opacity-10 " + (indexGroup !== 0 ? "border-t " + (isInsideContainer ? groupTitleMobileClass : '') : '')
|
|
2196
|
+
}, React__default.createElement("span", {
|
|
2197
|
+
className: "text-f5 text-on-base-2 leading-4 break-words inline-block pt-6 pb-2"
|
|
2198
|
+
}, group.title)), React__default.createElement("div", {
|
|
2199
|
+
className: "group-items"
|
|
2200
|
+
}, group.items.map(function (item, indexItem) {
|
|
2201
|
+
return React__default.createElement(TableListItem, {
|
|
2202
|
+
key: "group-item-" + indexItem,
|
|
2203
|
+
forceBorderDesktop: indexItem === 0 && indexGroup !== 0,
|
|
2204
|
+
title: item.title,
|
|
2205
|
+
description: item.description,
|
|
2206
|
+
timestampTime: item.timestampTime,
|
|
2207
|
+
timestampDate: item.timestampDate,
|
|
2208
|
+
itemWrapper: itemWrapper,
|
|
2209
|
+
itemWrapperProps: item.itemWrapperProps,
|
|
2210
|
+
withIcon: item.withIcon,
|
|
2211
|
+
withHover: withHover,
|
|
2212
|
+
isInsideContainer: isInsideContainer
|
|
2213
|
+
});
|
|
2214
|
+
})));
|
|
2215
|
+
}));
|
|
2216
|
+
};
|
|
2217
|
+
|
|
2218
|
+
var TableList = /*#__PURE__*/React__default.memo(TableListComponent);
|
|
2219
|
+
|
|
2041
2220
|
var activeStyles = function activeStyles(active) {
|
|
2042
2221
|
return active ? "border-primary font-semibold" : "border-transparent";
|
|
2043
2222
|
}; // When using bold at hover, prevent text shift
|
|
@@ -2148,7 +2327,7 @@ var TimelineItem = function TimelineItem(_ref) {
|
|
|
2148
2327
|
size: 3,
|
|
2149
2328
|
className: "mr-1"
|
|
2150
2329
|
}), item.timestamp), item.description && React__default.createElement("div", {
|
|
2151
|
-
className: "timeline-description overflow-hidden text-sm tracking-4 text-inverted-1 break-words transition-max-height " + (isOpen ? 'max-h-96' : 'max-h-0')
|
|
2330
|
+
className: "timeline-description mt-1 overflow-hidden text-sm tracking-4 text-inverted-1 break-words transition-max-height " + (isOpen ? 'max-h-96' : 'max-h-0')
|
|
2152
2331
|
}, item.description)));
|
|
2153
2332
|
};
|
|
2154
2333
|
|
|
@@ -2479,8 +2658,8 @@ var badgeTypes = {
|
|
|
2479
2658
|
warning: 'bg-warning-dark'
|
|
2480
2659
|
};
|
|
2481
2660
|
var badgeSizes = {
|
|
2482
|
-
"default": 'px-2 py-0.5',
|
|
2483
|
-
small: 'px-1'
|
|
2661
|
+
"default": 'px-2 py-0.5 text-xs',
|
|
2662
|
+
small: 'px-1.5 text-[0.70rem]'
|
|
2484
2663
|
};
|
|
2485
2664
|
|
|
2486
2665
|
var BadgeComponent = function BadgeComponent(_ref) {
|
|
@@ -2494,7 +2673,7 @@ var BadgeComponent = function BadgeComponent(_ref) {
|
|
|
2494
2673
|
return React__default.createElement("div", {
|
|
2495
2674
|
className: "badge items-center justify-center rounded-full " + badgeTypes[type] + " " + badgeSizes[size] + " " + (expanded ? 'flex w-full' : 'inline-flex')
|
|
2496
2675
|
}, React__default.createElement("span", {
|
|
2497
|
-
className: "
|
|
2676
|
+
className: "tracking-4 font-semibold text-base-1"
|
|
2498
2677
|
}, text));
|
|
2499
2678
|
};
|
|
2500
2679
|
|
|
@@ -2926,6 +3105,11 @@ var Header = function Header(_ref2) {
|
|
|
2926
3105
|
ContainerComponent.Header = Header;
|
|
2927
3106
|
var Container$1 = ContainerComponent;
|
|
2928
3107
|
|
|
3108
|
+
var actionsDisplayClass = {
|
|
3109
|
+
both: 'flex',
|
|
3110
|
+
desktop: 'hidden lg:flex',
|
|
3111
|
+
mobile: 'flex lg:hidden'
|
|
3112
|
+
};
|
|
2929
3113
|
var Breadcrumb = /*#__PURE__*/React__default.memo(function (_ref) {
|
|
2930
3114
|
var Link = _ref.Link,
|
|
2931
3115
|
currentTitle = _ref.currentTitle,
|
|
@@ -2935,6 +3119,8 @@ var Breadcrumb = /*#__PURE__*/React__default.memo(function (_ref) {
|
|
|
2935
3119
|
mobileAlign = _ref$mobileAlign === void 0 ? 'left' : _ref$mobileAlign,
|
|
2936
3120
|
help = _ref.help,
|
|
2937
3121
|
actions = _ref.actions,
|
|
3122
|
+
_ref$actionsDisplay = _ref.actionsDisplay,
|
|
3123
|
+
actionsDisplay = _ref$actionsDisplay === void 0 ? 'both' : _ref$actionsDisplay,
|
|
2938
3124
|
_ref$className = _ref.className,
|
|
2939
3125
|
className = _ref$className === void 0 ? '' : _ref$className;
|
|
2940
3126
|
var renderPrevTitle = React__default.createElement("span", {
|
|
@@ -2976,7 +3162,7 @@ var Breadcrumb = /*#__PURE__*/React__default.memo(function (_ref) {
|
|
|
2976
3162
|
className: "header-navigation-breadcrumb max-w-full truncate w-full"
|
|
2977
3163
|
}, React__default.createElement("div", {
|
|
2978
3164
|
className: "w-full inline-flex self-center items-center font-semibold tracking-5 text-f5 sm:text-f4 lg:text-f3"
|
|
2979
|
-
}, (previousTitle || previousHref) && React__default.createElement("span", {
|
|
3165
|
+
}, (previousTitle || previousHref || Link) && React__default.createElement("span", {
|
|
2980
3166
|
className: "header-navigation-previous inline-flex items-center text-on-base-2 text-xl -mr-px truncate"
|
|
2981
3167
|
}, renderPrevLink(), previousTitle && React__default.createElement("span", {
|
|
2982
3168
|
className: "hidden lg:inline px-2 -ml-px"
|
|
@@ -2999,7 +3185,7 @@ var Breadcrumb = /*#__PURE__*/React__default.memo(function (_ref) {
|
|
|
2999
3185
|
}), help.title && React__default.createElement("span", {
|
|
3000
3186
|
className: "text-f6 font-semibold tracking-4 leading-6 ml-2 " + (!help.mobileText ? 'hidden md:inline' : '')
|
|
3001
3187
|
}, help.title))), actions && React__default.createElement("div", {
|
|
3002
|
-
className: "header-navigation-actions
|
|
3188
|
+
className: "header-navigation-actions items-center gap-5 " + (actionsDisplayClass[actionsDisplay] || '')
|
|
3003
3189
|
}, actions)));
|
|
3004
3190
|
});
|
|
3005
3191
|
|
|
@@ -3193,6 +3379,7 @@ exports.SidebarItem = SidebarItem;
|
|
|
3193
3379
|
exports.SidebarSubItem = SidebarSubItem;
|
|
3194
3380
|
exports.Status = Status;
|
|
3195
3381
|
exports.Table = Table;
|
|
3382
|
+
exports.TableList = TableList;
|
|
3196
3383
|
exports.Tabs = Tabs;
|
|
3197
3384
|
exports.Timeline = Timeline;
|
|
3198
3385
|
exports.Toast = Toast;
|