@hexure/ui 1.8.12 → 1.8.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +165 -117
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/FieldGroup/FieldGroup.d.ts +9 -0
- package/dist/cjs/types/components/FieldGroup/index.d.ts +1 -0
- package/dist/cjs/types/components/Modal/Modal.d.ts +1 -5
- package/dist/cjs/types/components/PageHeader/PageHeader.d.ts +2 -0
- package/dist/cjs/types/components/ProgressBar/ProgressBar.d.ts +12 -0
- package/dist/cjs/types/components/ProgressBar/index.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +2 -0
- package/dist/esm/index.js +164 -118
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/FieldGroup/FieldGroup.d.ts +9 -0
- package/dist/esm/types/components/FieldGroup/index.d.ts +1 -0
- package/dist/esm/types/components/Modal/Modal.d.ts +1 -5
- package/dist/esm/types/components/PageHeader/PageHeader.d.ts +2 -0
- package/dist/esm/types/components/ProgressBar/ProgressBar.d.ts +12 -0
- package/dist/esm/types/components/ProgressBar/index.d.ts +1 -0
- package/dist/esm/types/index.d.ts +2 -0
- package/dist/index.d.ts +33 -18
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface FieldGroupProps {
|
|
3
|
+
/** The label to display above the field group */
|
|
4
|
+
label: string;
|
|
5
|
+
/** The content of the field group...usually a set of Field components */
|
|
6
|
+
children: any;
|
|
7
|
+
}
|
|
8
|
+
declare const FieldGroup: FC<FieldGroupProps>;
|
|
9
|
+
export default FieldGroup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './FieldGroup';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
import { AccessibleProps } from '../../utils/Accessibility';
|
|
3
|
+
import { StepProps } from '../ProgressBar/ProgressBar';
|
|
3
4
|
interface ButtonProps {
|
|
4
5
|
disabled?: boolean;
|
|
5
6
|
children: string;
|
|
@@ -8,11 +9,6 @@ interface ButtonProps {
|
|
|
8
9
|
tabIndex?: number;
|
|
9
10
|
loading?: boolean;
|
|
10
11
|
}
|
|
11
|
-
interface StepProps {
|
|
12
|
-
label: string;
|
|
13
|
-
complete?: boolean;
|
|
14
|
-
active?: boolean;
|
|
15
|
-
}
|
|
16
12
|
export interface ModalProps extends AccessibleProps {
|
|
17
13
|
/** Defines a button to be displayed on the far right of the bottom button bar */
|
|
18
14
|
primaryButton?: ButtonProps;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { MenuItemProps } from '../MoreMenu/MoreMenu';
|
|
3
|
+
import { TagProps } from '../Tag/Tag';
|
|
3
4
|
export interface PageHeaderProps {
|
|
4
5
|
title?: string;
|
|
5
6
|
breadcrumbs?: Array<{
|
|
@@ -21,6 +22,7 @@ export interface PageHeaderProps {
|
|
|
21
22
|
label: string;
|
|
22
23
|
menuItems: Array<MenuItemProps>;
|
|
23
24
|
};
|
|
25
|
+
tag?: TagProps;
|
|
24
26
|
}
|
|
25
27
|
declare const PageHeader: FC<PageHeaderProps>;
|
|
26
28
|
export default PageHeader;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface StepProps {
|
|
3
|
+
label: string;
|
|
4
|
+
complete?: boolean;
|
|
5
|
+
active?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ProgressBarProps {
|
|
8
|
+
/** */
|
|
9
|
+
steps: StepProps[];
|
|
10
|
+
}
|
|
11
|
+
declare const ProgressBar: FC<ProgressBarProps>;
|
|
12
|
+
export default ProgressBar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ProgressBar';
|
|
@@ -10,6 +10,7 @@ export { default as Copy } from './components/Copy';
|
|
|
10
10
|
export { default as DatePicker } from './components/DatePicker';
|
|
11
11
|
export { default as Drawer } from './components/Drawer';
|
|
12
12
|
export { default as Field } from './components/Field';
|
|
13
|
+
export { default as FieldGroup } from './components/FieldGroup';
|
|
13
14
|
export { default as FileUpload } from './components/FileUpload';
|
|
14
15
|
export { default as Heading } from './components/Heading';
|
|
15
16
|
export { default as Input } from './components/Input';
|
|
@@ -21,6 +22,7 @@ export { default as MoreMenu } from './components/MoreMenu';
|
|
|
21
22
|
export { default as MultiSelect } from './components/MultiSelect';
|
|
22
23
|
export { default as PageHeader } from './components/PageHeader';
|
|
23
24
|
export { default as Pagination } from './components/Pagination';
|
|
25
|
+
export { default as ProgressBar } from './components/ProgressBar';
|
|
24
26
|
export { default as Radio } from './components/Radio';
|
|
25
27
|
export { default as RadioList } from './components/RadioList';
|
|
26
28
|
export { default as Select } from './components/Select';
|
package/dist/esm/index.js
CHANGED
|
@@ -2027,7 +2027,7 @@ const Header$3 = styled.div `
|
|
|
2027
2027
|
height: 50px;
|
|
2028
2028
|
cursor: pointer;
|
|
2029
2029
|
`;
|
|
2030
|
-
const Title$
|
|
2030
|
+
const Title$2 = styled.div `
|
|
2031
2031
|
font-size: ${FontSizes.DEFAULT};
|
|
2032
2032
|
font-weight: 400;
|
|
2033
2033
|
color: ${Colors.BLACK.Hex};
|
|
@@ -2039,7 +2039,7 @@ const Accordion = (_a) => {
|
|
|
2039
2039
|
var { title, children, open, onClick } = _a, accessibleProps = __rest(_a, ["title", "children", "open", "onClick"]);
|
|
2040
2040
|
return (React.createElement(React.Fragment, null,
|
|
2041
2041
|
React.createElement(Header$3, Object.assign({ onClick: onClick }, accessibleProps),
|
|
2042
|
-
React.createElement(Title$
|
|
2042
|
+
React.createElement(Title$2, null, title),
|
|
2043
2043
|
React.createElement(Icon, { color: Colors.BLACK.Hex, path: open ? mdiChevronUp : mdiChevronDown, size: '24px' })),
|
|
2044
2044
|
open ? children : null));
|
|
2045
2045
|
};
|
|
@@ -2114,7 +2114,7 @@ const StyledButton = styled.button `
|
|
|
2114
2114
|
opacity: ${props => (props.$disabled ? 0.6 : 1)};
|
|
2115
2115
|
}
|
|
2116
2116
|
`;
|
|
2117
|
-
const Label$
|
|
2117
|
+
const Label$5 = styled.span `
|
|
2118
2118
|
color: ${props => (props.$format ? button_type_mapping[props.$format].content_color : '#fff')};
|
|
2119
2119
|
font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
|
|
2120
2120
|
font-family: ${FontStyles.DEFAULT};
|
|
@@ -2149,7 +2149,7 @@ const Button = (_a) => {
|
|
|
2149
2149
|
var { badge, children, disabled = false, icon, isForm = false, loading = false, margin = '', onClick, small = false, format = 'primary' } = _a, accessibleProps = __rest(_a, ["badge", "children", "disabled", "icon", "isForm", "loading", "margin", "onClick", "small", "format"]);
|
|
2150
2150
|
const has_children = children && children.length > 0;
|
|
2151
2151
|
return (React.createElement(StyledButton, Object.assign({ "$disabled": disabled || loading, "$format": format, "$hasChildren": !!has_children, "$margin": margin, "$small": small, onClick: disabled || loading ? undefined : onClick, type: isForm ? 'submit' : undefined }, accessibleProps),
|
|
2152
|
-
children ? (React.createElement(Label$
|
|
2152
|
+
children ? (React.createElement(Label$5, { "$format": format, "$small": small }, children)) : null,
|
|
2153
2153
|
icon && !badge ? (React.createElement(StyledIcon$3, { "$hasChildren": !!has_children },
|
|
2154
2154
|
React.createElement(Icon, { color: format ? button_type_mapping[format].content_color : '#fff', path: loading ? mdiLoading : icon, size: small ? '20px' : '24px', spin: loading }))) : null,
|
|
2155
2155
|
badge && !icon ? (React.createElement(Badge$1, { "$format": format, "$small": small }, badge)) : null));
|
|
@@ -2225,7 +2225,7 @@ Heading.defaultProps = {
|
|
|
2225
2225
|
type: 'primary',
|
|
2226
2226
|
};
|
|
2227
2227
|
|
|
2228
|
-
const Wrapper$
|
|
2228
|
+
const Wrapper$i = styled.div `
|
|
2229
2229
|
position: fixed;
|
|
2230
2230
|
top: 0;
|
|
2231
2231
|
right: 0;
|
|
@@ -2261,7 +2261,7 @@ const Buttons = styled.div `
|
|
|
2261
2261
|
`;
|
|
2262
2262
|
const ActionDialog = (_a) => {
|
|
2263
2263
|
var { description, title, primaryButton, secondaryButton, tertiaryButton } = _a, accessibleProps = __rest(_a, ["description", "title", "primaryButton", "secondaryButton", "tertiaryButton"]);
|
|
2264
|
-
return (React.createElement(Wrapper$
|
|
2264
|
+
return (React.createElement(Wrapper$i, Object.assign({}, accessibleProps),
|
|
2265
2265
|
React.createElement(Container$3, { open: true },
|
|
2266
2266
|
title ? (React.createElement(Heading, { margin: '0px 0px 20px 0px', type: 'secondary' }, title)) : null,
|
|
2267
2267
|
description ? React.createElement(Copy, { align: 'center' }, description) : null,
|
|
@@ -2271,7 +2271,7 @@ const ActionDialog = (_a) => {
|
|
|
2271
2271
|
primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format === 'red' ? 'red' : 'primary' }))) : null)) : null)));
|
|
2272
2272
|
};
|
|
2273
2273
|
|
|
2274
|
-
const Wrapper$
|
|
2274
|
+
const Wrapper$h = styled.div `
|
|
2275
2275
|
border: 1px solid #f1f1f1;
|
|
2276
2276
|
border-radius: 4px;
|
|
2277
2277
|
border-left-width: 4px;
|
|
@@ -2281,7 +2281,7 @@ const Wrapper$g = styled.div `
|
|
|
2281
2281
|
padding: 20px;
|
|
2282
2282
|
box-sizing: border-box;
|
|
2283
2283
|
`;
|
|
2284
|
-
const Content$
|
|
2284
|
+
const Content$4 = styled.div `
|
|
2285
2285
|
margin-left: 20px;
|
|
2286
2286
|
`;
|
|
2287
2287
|
const Action$1 = styled.div `
|
|
@@ -2312,16 +2312,16 @@ const Alert = (_a) => {
|
|
|
2312
2312
|
icon: mdiCheckboxMarkedCircleOutline,
|
|
2313
2313
|
},
|
|
2314
2314
|
};
|
|
2315
|
-
return (React.createElement(Wrapper$
|
|
2315
|
+
return (React.createElement(Wrapper$h, Object.assign({}, accessibleProps, { style: { borderLeftColor: type_mapping[type].color } }),
|
|
2316
2316
|
React.createElement("div", { style: { flexShrink: 0 } },
|
|
2317
2317
|
React.createElement(Icon, { color: type_mapping[type].color, path: type_mapping[type].icon, size: '30px' })),
|
|
2318
|
-
React.createElement(Content$
|
|
2318
|
+
React.createElement(Content$4, null,
|
|
2319
2319
|
title ? (React.createElement(Heading, { bold: true, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
|
|
2320
2320
|
description ? React.createElement(Copy, { margin: '6px 0 0 0 !important' }, description) : null,
|
|
2321
2321
|
action ? React.createElement(Action$1, { onClick: action.onClick }, action.label) : null)));
|
|
2322
2322
|
};
|
|
2323
2323
|
|
|
2324
|
-
const Wrapper$
|
|
2324
|
+
const Wrapper$g = styled.div `
|
|
2325
2325
|
border: 1px solid ${Colors.PRIMARY.Hex};
|
|
2326
2326
|
border-radius: 8px;
|
|
2327
2327
|
box-sizing: border-box;
|
|
@@ -2389,7 +2389,7 @@ const ErrorMsg = styled.span `
|
|
|
2389
2389
|
`;
|
|
2390
2390
|
const BulkActionBar = (_a) => {
|
|
2391
2391
|
var { actions = [], errorMsg, onClear, selectedCount = 0 } = _a, accessibleProps = __rest(_a, ["actions", "errorMsg", "onClear", "selectedCount"]);
|
|
2392
|
-
return (React.createElement(Wrapper$
|
|
2392
|
+
return (React.createElement(Wrapper$g, Object.assign({}, accessibleProps),
|
|
2393
2393
|
React.createElement(Left, null,
|
|
2394
2394
|
React.createElement(Info$1, null,
|
|
2395
2395
|
React.createElement(Selected, null,
|
|
@@ -2402,7 +2402,7 @@ const BulkActionBar = (_a) => {
|
|
|
2402
2402
|
React.createElement(ErrorMsg, null, errorMsg))) : null));
|
|
2403
2403
|
};
|
|
2404
2404
|
|
|
2405
|
-
const Wrapper$
|
|
2405
|
+
const Wrapper$f = styled.div `
|
|
2406
2406
|
background: #fff;
|
|
2407
2407
|
border-radius: 8px;
|
|
2408
2408
|
box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
|
|
@@ -2431,7 +2431,7 @@ const MenuItem = styled.div `
|
|
|
2431
2431
|
}
|
|
2432
2432
|
}
|
|
2433
2433
|
`;
|
|
2434
|
-
const Title = styled.span `
|
|
2434
|
+
const Title$1 = styled.span `
|
|
2435
2435
|
font-family: Roboto;
|
|
2436
2436
|
font-size: 14px;
|
|
2437
2437
|
font-weight: 400;
|
|
@@ -2442,14 +2442,14 @@ const Title = styled.span `
|
|
|
2442
2442
|
`;
|
|
2443
2443
|
const MoreMenu = (_a) => {
|
|
2444
2444
|
var { maxHeight, menuItems = [] } = _a, accessibleProps = __rest(_a, ["maxHeight", "menuItems"]);
|
|
2445
|
-
return (React.createElement(Wrapper$
|
|
2445
|
+
return (React.createElement(Wrapper$f, Object.assign({ "$maxHeight": maxHeight }, accessibleProps), menuItems.map((item, i) => {
|
|
2446
2446
|
return (React.createElement(MenuItem, { key: i, onClick: item.onClick },
|
|
2447
2447
|
item.icon ? (React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: item.icon, size: '20px' })) : null,
|
|
2448
|
-
React.createElement(Title, null, item.label)));
|
|
2448
|
+
React.createElement(Title$1, null, item.label)));
|
|
2449
2449
|
})));
|
|
2450
2450
|
};
|
|
2451
2451
|
|
|
2452
|
-
const Wrapper$
|
|
2452
|
+
const Wrapper$e = styled.div `
|
|
2453
2453
|
position: relative;
|
|
2454
2454
|
display: inline-block;
|
|
2455
2455
|
`;
|
|
@@ -2463,12 +2463,12 @@ const StyledMoreMenu = styled(MoreMenu) `
|
|
|
2463
2463
|
`;
|
|
2464
2464
|
const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = 'right', format = 'primary', menuWidth = '200px', }) => {
|
|
2465
2465
|
const [show_menu, toggleMenu] = useState(false);
|
|
2466
|
-
return (React.createElement(Wrapper$
|
|
2466
|
+
return (React.createElement(Wrapper$e, { onMouseEnter: disabled ? undefined : toggleMenu.bind(null, true), onMouseLeave: disabled ? undefined : toggleMenu.bind(null, false) },
|
|
2467
2467
|
React.createElement(Button, { disabled: disabled, format: format, icon: mdiDotsHorizontal, small: small }, label),
|
|
2468
2468
|
show_menu ? (React.createElement(StyledMoreMenu, { "$menuWidth": menuWidth, "$position": position, "$small": small, maxHeight: maxHeight, menuItems: menuItems })) : null));
|
|
2469
2469
|
};
|
|
2470
2470
|
|
|
2471
|
-
const Wrapper$
|
|
2471
|
+
const Wrapper$d = styled.label `
|
|
2472
2472
|
padding: 4px 0;
|
|
2473
2473
|
cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
|
|
2474
2474
|
display: flex;
|
|
@@ -2483,7 +2483,7 @@ const Input$2 = styled.input `
|
|
|
2483
2483
|
line-height: 1.1em;
|
|
2484
2484
|
box-sizing: border-box;
|
|
2485
2485
|
`;
|
|
2486
|
-
const Label$
|
|
2486
|
+
const Label$4 = styled.span `
|
|
2487
2487
|
font-family: ${FontStyles.DEFAULT};
|
|
2488
2488
|
font-size: ${FontSizes.DEFAULT};
|
|
2489
2489
|
font-weight: 400;
|
|
@@ -2494,9 +2494,9 @@ const Label$3 = styled.span `
|
|
|
2494
2494
|
`;
|
|
2495
2495
|
const Checkbox = (_a) => {
|
|
2496
2496
|
var { children, disabled, checked, onChange } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange"]);
|
|
2497
|
-
return (React.createElement(Wrapper$
|
|
2497
|
+
return (React.createElement(Wrapper$d, Object.assign({}, accessibleProps),
|
|
2498
2498
|
React.createElement(Input$2, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'checkbox' }),
|
|
2499
|
-
children ? React.createElement(Label$
|
|
2499
|
+
children ? React.createElement(Label$4, null, children) : null));
|
|
2500
2500
|
};
|
|
2501
2501
|
|
|
2502
2502
|
const SelectAll = styled.div `
|
|
@@ -2863,7 +2863,7 @@ var dayjs_min = {exports: {}};
|
|
|
2863
2863
|
var dayjs_minExports = dayjs_min.exports;
|
|
2864
2864
|
var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
|
|
2865
2865
|
|
|
2866
|
-
const Wrapper$
|
|
2866
|
+
const Wrapper$c = styled.div `
|
|
2867
2867
|
border-radius: 4px;
|
|
2868
2868
|
height: 40px;
|
|
2869
2869
|
background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
|
|
@@ -2907,7 +2907,7 @@ const IconWrapper$2 = styled(Icon) `
|
|
|
2907
2907
|
`;
|
|
2908
2908
|
const Select = (_a) => {
|
|
2909
2909
|
var { options, optionGroups, placeholder, readOnly, invalid, value, onChange, style } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "value", "onChange", "style"]);
|
|
2910
|
-
return (React.createElement(Wrapper$
|
|
2910
|
+
return (React.createElement(Wrapper$c, { "$invalid": invalid, "$readOnly": readOnly, "$style": style },
|
|
2911
2911
|
React.createElement(Trigger$1, Object.assign({ disabled: readOnly, onChange: onChange, placeholder: placeholder, value: value }, accessibleProps),
|
|
2912
2912
|
placeholder ? (React.createElement("option", { disabled: true, value: '' }, placeholder)) : null,
|
|
2913
2913
|
optionGroups &&
|
|
@@ -3077,7 +3077,7 @@ const Drawer = (_a) => {
|
|
|
3077
3077
|
scrim ? React.createElement(Scrim$1, { "$position": position, "$scrim": scrim, onClick: onClose }) : null));
|
|
3078
3078
|
};
|
|
3079
3079
|
|
|
3080
|
-
const Wrapper$
|
|
3080
|
+
const Wrapper$b = styled.div `
|
|
3081
3081
|
display: inline-block;
|
|
3082
3082
|
position: relative;
|
|
3083
3083
|
height: 16px;
|
|
@@ -3117,15 +3117,15 @@ const positions = {
|
|
|
3117
3117
|
transform: 'translateY(-50%)',
|
|
3118
3118
|
},
|
|
3119
3119
|
};
|
|
3120
|
-
const Content$
|
|
3120
|
+
const Content$3 = styled.div(props => (Object.assign({ position: 'absolute', borderRadius: '4px', borderWidth: '1px', borderStyle: 'solid', borderColor: Colors.PRIMARY.Hex, background: '#ffffff', boxShadow: '0px 5px 30px -10px rgba(0, 0, 0, 0.5)', width: props.$width || '240px', padding: '10px 12px', zIndex: 10 }, positions[props.$position])));
|
|
3121
3121
|
const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, }) => {
|
|
3122
3122
|
const [show_content, toggleContent] = useState(false);
|
|
3123
|
-
return (React.createElement(Wrapper$
|
|
3123
|
+
return (React.createElement(Wrapper$b, { onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
|
|
3124
3124
|
trigger || React.createElement(StyledIcon$2, { path: mdiInformationOutline }),
|
|
3125
|
-
show_content ? (React.createElement(Content$
|
|
3125
|
+
show_content ? (React.createElement(Content$3, { "$position": position, "$width": width }, children && React.createElement(Copy, { type: 'small' }, children))) : null));
|
|
3126
3126
|
};
|
|
3127
3127
|
|
|
3128
|
-
const Wrapper$
|
|
3128
|
+
const Wrapper$a = styled.div(props => (Object.assign({ margin: '0px 0px 18px 0px' }, props.style)));
|
|
3129
3129
|
const LabelRow = styled.div `
|
|
3130
3130
|
display: flex;
|
|
3131
3131
|
align-items: center;
|
|
@@ -3133,7 +3133,7 @@ const LabelRow = styled.div `
|
|
|
3133
3133
|
margin: 0 0 4px 0;
|
|
3134
3134
|
box-sizing: border-box;
|
|
3135
3135
|
`;
|
|
3136
|
-
const Label$
|
|
3136
|
+
const Label$3 = styled.label `
|
|
3137
3137
|
font-size: ${FontSizes.DEFAULT};
|
|
3138
3138
|
font-weight: 500;
|
|
3139
3139
|
line-height: 1em;
|
|
@@ -3174,9 +3174,9 @@ const Validation = styled.div `
|
|
|
3174
3174
|
`;
|
|
3175
3175
|
const Field = (_a) => {
|
|
3176
3176
|
var { action, children, validationText, label, description, required, htmlFor, style, tooltip } = _a, accessibleProps = __rest(_a, ["action", "children", "validationText", "label", "description", "required", "htmlFor", "style", "tooltip"]);
|
|
3177
|
-
return (React.createElement(Wrapper$
|
|
3177
|
+
return (React.createElement(Wrapper$a, Object.assign({ style: style }, accessibleProps),
|
|
3178
3178
|
React.createElement(LabelRow, null,
|
|
3179
|
-
React.createElement(Label$
|
|
3179
|
+
React.createElement(Label$3, { htmlFor: htmlFor },
|
|
3180
3180
|
label,
|
|
3181
3181
|
required ? React.createElement(Required, null, "*") : null,
|
|
3182
3182
|
tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null),
|
|
@@ -3186,6 +3186,41 @@ const Field = (_a) => {
|
|
|
3186
3186
|
validationText ? React.createElement(Validation, null, validationText) : null));
|
|
3187
3187
|
};
|
|
3188
3188
|
|
|
3189
|
+
const Wrapper$9 = styled.fieldset `
|
|
3190
|
+
margin-inline-start: 0px;
|
|
3191
|
+
margin-inline-end: 0px;
|
|
3192
|
+
padding-block-start: 0px;
|
|
3193
|
+
padding-inline-start: 0px;
|
|
3194
|
+
padding-inline-end: 0px;
|
|
3195
|
+
padding-block-end: 0px;
|
|
3196
|
+
min-inline-size: min-content;
|
|
3197
|
+
border-width: 0px;
|
|
3198
|
+
border-style: none;
|
|
3199
|
+
border-color: transparent;
|
|
3200
|
+
border-image: none;
|
|
3201
|
+
`;
|
|
3202
|
+
const Label$2 = styled.legend `
|
|
3203
|
+
padding-inline-start: 0px;
|
|
3204
|
+
padding-inline-end: 0px;
|
|
3205
|
+
|
|
3206
|
+
color: ${Colors.BLACK.Hex};
|
|
3207
|
+
font-family: ${FontStyles.DEFAULT};
|
|
3208
|
+
font-size: ${FontSizes.DEFAULT};
|
|
3209
|
+
font-weight: 500;
|
|
3210
|
+
line-height: 22px;
|
|
3211
|
+
margin-bottom: 6px;
|
|
3212
|
+
`;
|
|
3213
|
+
const Content$2 = styled.div `
|
|
3214
|
+
padding: 20px;
|
|
3215
|
+
border-radius: 8px;
|
|
3216
|
+
background: #fcfcfc;
|
|
3217
|
+
`;
|
|
3218
|
+
const FieldGroup = ({ children, label }) => {
|
|
3219
|
+
return (React.createElement(Wrapper$9, null,
|
|
3220
|
+
React.createElement(Label$2, null, label),
|
|
3221
|
+
React.createElement(Content$2, null, children)));
|
|
3222
|
+
};
|
|
3223
|
+
|
|
3189
3224
|
const Dropzone = styled.div `
|
|
3190
3225
|
border-radius: 8px;
|
|
3191
3226
|
border-width: 1px;
|
|
@@ -3605,6 +3640,49 @@ const Logo = (_a) => {
|
|
|
3605
3640
|
}
|
|
3606
3641
|
};
|
|
3607
3642
|
|
|
3643
|
+
const Steps = styled.div `
|
|
3644
|
+
padding: 20px;
|
|
3645
|
+
border-bottom: 1px solid #e7e6e6;
|
|
3646
|
+
background: #f5f5f5;
|
|
3647
|
+
display: flex;
|
|
3648
|
+
gap: 30px;
|
|
3649
|
+
align-items: center;
|
|
3650
|
+
`;
|
|
3651
|
+
const Step = styled.div `
|
|
3652
|
+
display: flex;
|
|
3653
|
+
align-items: center;
|
|
3654
|
+
gap: 8px;
|
|
3655
|
+
`;
|
|
3656
|
+
const StepIndicator = styled.div `
|
|
3657
|
+
width: 30px;
|
|
3658
|
+
height: 30px;
|
|
3659
|
+
border-radius: 15px;
|
|
3660
|
+
background: ${props => (props.$active ? Colors.PRIMARY.Hex : Colors.LIGHT_GRAY.Hex)};
|
|
3661
|
+
color: ${props => (props.$active ? '#fff' : Colors.MEDIUM_GRAY.Hex)};
|
|
3662
|
+
font-family: 'Roboto', Helvetica, Arial, sans-serif;
|
|
3663
|
+
font-size: 14px;
|
|
3664
|
+
font-weight: 500;
|
|
3665
|
+
line-height: 1;
|
|
3666
|
+
display: flex;
|
|
3667
|
+
align-items: center;
|
|
3668
|
+
justify-content: center;
|
|
3669
|
+
flex-shrink: 0;
|
|
3670
|
+
`;
|
|
3671
|
+
const StepLabel = styled.div `
|
|
3672
|
+
color: #000;
|
|
3673
|
+
font-family: 'Roboto', Helvetica, Arial, sans-serif;
|
|
3674
|
+
font-size: 14px;
|
|
3675
|
+
font-weight: 500;
|
|
3676
|
+
line-height: 1;
|
|
3677
|
+
`;
|
|
3678
|
+
const ProgressBar = ({ steps }) => {
|
|
3679
|
+
return (React.createElement(Steps, null, steps.map((step, i) => {
|
|
3680
|
+
return (React.createElement(Step, { key: i },
|
|
3681
|
+
step.complete ? (React.createElement(Icon, { color: Colors.PRIMARY.Hex, path: mdiCheckboxMarkedCircleOutline, size: '32px' })) : (React.createElement(StepIndicator, { "$active": step.active }, i + 1)),
|
|
3682
|
+
React.createElement(StepLabel, null, step.label)));
|
|
3683
|
+
})));
|
|
3684
|
+
};
|
|
3685
|
+
|
|
3608
3686
|
const Wrapper$7 = styled.div `
|
|
3609
3687
|
position: fixed;
|
|
3610
3688
|
top: 0;
|
|
@@ -3653,41 +3731,6 @@ const CloseMsg = styled.span `
|
|
|
3653
3731
|
line-height: 1em;
|
|
3654
3732
|
color: ${Colors.MEDIUM_GRAY.Hex};
|
|
3655
3733
|
`;
|
|
3656
|
-
const Steps = styled.div `
|
|
3657
|
-
padding: 20px;
|
|
3658
|
-
border-bottom: 1px solid #e7e6e6;
|
|
3659
|
-
background: #f5f5f5;
|
|
3660
|
-
display: flex;
|
|
3661
|
-
gap: 30px;
|
|
3662
|
-
align-items: center;
|
|
3663
|
-
`;
|
|
3664
|
-
const Step = styled.div `
|
|
3665
|
-
display: flex;
|
|
3666
|
-
align-items: center;
|
|
3667
|
-
gap: 8px;
|
|
3668
|
-
`;
|
|
3669
|
-
const StepIndicator = styled.div `
|
|
3670
|
-
width: 30px;
|
|
3671
|
-
height: 30px;
|
|
3672
|
-
border-radius: 15px;
|
|
3673
|
-
background: ${props => (props.$active ? Colors.PRIMARY.Hex : Colors.LIGHT_GRAY.Hex)};
|
|
3674
|
-
color: ${props => (props.$active ? '#fff' : Colors.MEDIUM_GRAY.Hex)};
|
|
3675
|
-
font-family: 'Roboto', Helvetica, Arial, sans-serif;
|
|
3676
|
-
font-size: 14px;
|
|
3677
|
-
font-weight: 500;
|
|
3678
|
-
line-height: 1;
|
|
3679
|
-
display: flex;
|
|
3680
|
-
align-items: center;
|
|
3681
|
-
justify-content: center;
|
|
3682
|
-
flex-shrink: 0;
|
|
3683
|
-
`;
|
|
3684
|
-
const StepLabel = styled.div `
|
|
3685
|
-
color: #000;
|
|
3686
|
-
font-family: 'Roboto', Helvetica, Arial, sans-serif;
|
|
3687
|
-
font-size: 14px;
|
|
3688
|
-
font-weight: 500;
|
|
3689
|
-
line-height: 1;
|
|
3690
|
-
`;
|
|
3691
3734
|
const ContentWrapper = styled.div `
|
|
3692
3735
|
overflow-x: hidden;
|
|
3693
3736
|
overflow-y: auto;
|
|
@@ -3725,11 +3768,7 @@ const Modal = (_a) => {
|
|
|
3725
3768
|
React.createElement(Close, { onClick: onClose },
|
|
3726
3769
|
React.createElement(CloseMsg, null, "(Esc)"),
|
|
3727
3770
|
React.createElement(Icon, { color: Colors.BLACK.Hex, path: mdiClose, size: '24px' }))),
|
|
3728
|
-
steps ?
|
|
3729
|
-
return (React.createElement(Step, { key: i },
|
|
3730
|
-
step.complete ? (React.createElement(Icon, { color: Colors.PRIMARY.Hex, path: mdiCheckboxMarkedCircleOutline, size: '32px' })) : (React.createElement(StepIndicator, { "$active": step.active }, i + 1)),
|
|
3731
|
-
React.createElement(StepLabel, null, step.label)));
|
|
3732
|
-
}))) : null,
|
|
3771
|
+
steps ? React.createElement(ProgressBar, { steps: steps }) : null,
|
|
3733
3772
|
React.createElement(ContentWrapper, null, children),
|
|
3734
3773
|
primaryButton || secondaryButton || tertiaryButton ? (React.createElement(ButtonBar, null,
|
|
3735
3774
|
tertiaryButton ? React.createElement(Button, Object.assign({}, tertiaryButton, { format: 'secondary' })) : null,
|
|
@@ -3825,6 +3864,40 @@ const MultiSelect = (_a) => {
|
|
|
3825
3864
|
};
|
|
3826
3865
|
|
|
3827
3866
|
const Wrapper$5 = styled.div `
|
|
3867
|
+
display: inline-block;
|
|
3868
|
+
border-radius: 4px;
|
|
3869
|
+
padding: 4px 6px;
|
|
3870
|
+
background: ${props => Colors[props.$color].Hex};
|
|
3871
|
+
color: #ffffff;
|
|
3872
|
+
box-sizing: border-box;
|
|
3873
|
+
cursor: ${props => (props.$removable ? 'pointer' : 'default')};
|
|
3874
|
+
`;
|
|
3875
|
+
const Content = styled.div `
|
|
3876
|
+
display: flex;
|
|
3877
|
+
align-items: center;
|
|
3878
|
+
`;
|
|
3879
|
+
const Label$1 = styled.div `
|
|
3880
|
+
color: ${props => (props.$color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff')};
|
|
3881
|
+
font-size: ${FontSizes.SMALL};
|
|
3882
|
+
font-weight: 500;
|
|
3883
|
+
font-family: ${FontStyles.DEFAULT};
|
|
3884
|
+
line-height: 1.2em;
|
|
3885
|
+
`;
|
|
3886
|
+
const Remove = styled.div `
|
|
3887
|
+
margin-left: 10px;
|
|
3888
|
+
display: flex;
|
|
3889
|
+
align-items: center;
|
|
3890
|
+
`;
|
|
3891
|
+
const Tag = (_a) => {
|
|
3892
|
+
var { children, color = 'PRIMARY', removable, onClick } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick"]);
|
|
3893
|
+
return (React.createElement(Wrapper$5, Object.assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps),
|
|
3894
|
+
React.createElement(Content, null,
|
|
3895
|
+
React.createElement(Label$1, { "$color": color }, children),
|
|
3896
|
+
removable ? (React.createElement(Remove, null,
|
|
3897
|
+
React.createElement(Icon, { color: color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff', path: mdiClose, size: '15px' }))) : null)));
|
|
3898
|
+
};
|
|
3899
|
+
|
|
3900
|
+
const Wrapper$4 = styled.div `
|
|
3828
3901
|
display: flex;
|
|
3829
3902
|
padding: 16px 30px;
|
|
3830
3903
|
align-items: center;
|
|
@@ -3832,6 +3905,11 @@ const Wrapper$5 = styled.div `
|
|
|
3832
3905
|
align-self: stretch;
|
|
3833
3906
|
border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
|
|
3834
3907
|
`;
|
|
3908
|
+
const Title = styled.div `
|
|
3909
|
+
display: flex;
|
|
3910
|
+
align-items: center;
|
|
3911
|
+
gap: 20px;
|
|
3912
|
+
`;
|
|
3835
3913
|
const Info = styled.div `
|
|
3836
3914
|
display: flex;
|
|
3837
3915
|
flex-direction: column;
|
|
@@ -3849,11 +3927,13 @@ const Actions = styled.div `
|
|
|
3849
3927
|
align-items: center;
|
|
3850
3928
|
gap: 8px;
|
|
3851
3929
|
`;
|
|
3852
|
-
const PageHeader = ({ title = '', breadcrumbs, actions, buttonMenu }) => {
|
|
3930
|
+
const PageHeader = ({ title = '', breadcrumbs, actions, buttonMenu, tag }) => {
|
|
3853
3931
|
const { format = 'primary', menuItems = [], label = '', } = buttonMenu || {};
|
|
3854
|
-
return (React.createElement(Wrapper$
|
|
3932
|
+
return (React.createElement(Wrapper$4, null,
|
|
3855
3933
|
React.createElement(Info, null,
|
|
3856
|
-
React.createElement(
|
|
3934
|
+
React.createElement(Title, null,
|
|
3935
|
+
React.createElement(Heading, { type: 'secondary' }, title),
|
|
3936
|
+
tag ? React.createElement(Tag, Object.assign({}, tag)) : null),
|
|
3857
3937
|
breadcrumbs ? (React.createElement(Breadcrumbs, null, breadcrumbs.map((crumb, i) => {
|
|
3858
3938
|
return (React.createElement(React.Fragment, { key: i },
|
|
3859
3939
|
crumb.onClick ? (React.createElement(Link, { onClick: crumb.onClick, small: true }, crumb.label)) : (React.createElement(Copy, { type: 'small' }, crumb.label)),
|
|
@@ -3867,7 +3947,7 @@ const PageHeader = ({ title = '', breadcrumbs, actions, buttonMenu }) => {
|
|
|
3867
3947
|
menuItems.length ? (React.createElement(ButtonMenu, { format: format, label: label, menuItems: menuItems, small: true })) : null)) : null));
|
|
3868
3948
|
};
|
|
3869
3949
|
|
|
3870
|
-
const Wrapper$
|
|
3950
|
+
const Wrapper$3 = styled.nav `
|
|
3871
3951
|
box-sizing: border-box;
|
|
3872
3952
|
display: flex;
|
|
3873
3953
|
align-items: center;
|
|
@@ -3893,7 +3973,7 @@ const Pagination = (_a) => {
|
|
|
3893
3973
|
onClick(new_page);
|
|
3894
3974
|
}
|
|
3895
3975
|
};
|
|
3896
|
-
return (React.createElement(Wrapper$
|
|
3976
|
+
return (React.createElement(Wrapper$3, Object.assign({}, accessibleProps),
|
|
3897
3977
|
React.createElement(Button, { disabled: is_first_page, icon: mdiChevronLeft, onClick: handlePrevClick, small: true }),
|
|
3898
3978
|
React.createElement(Select, { onChange: handlePageChange, options: Array.from(Array(pageCount).keys(), p => p + 1).map(p => ({
|
|
3899
3979
|
label: `Page ${p}`,
|
|
@@ -3902,7 +3982,7 @@ const Pagination = (_a) => {
|
|
|
3902
3982
|
React.createElement(Button, { disabled: is_last_page, icon: mdiChevronRight, onClick: handleNextClick, small: true })));
|
|
3903
3983
|
};
|
|
3904
3984
|
|
|
3905
|
-
const Wrapper$
|
|
3985
|
+
const Wrapper$2 = styled.label `
|
|
3906
3986
|
padding: 4px 0;
|
|
3907
3987
|
cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
|
|
3908
3988
|
display: flex;
|
|
@@ -3916,7 +3996,7 @@ const Input = styled.input `
|
|
|
3916
3996
|
margin: 0px 0px 2px 0px;
|
|
3917
3997
|
line-height: 1.1em;
|
|
3918
3998
|
`;
|
|
3919
|
-
const Label
|
|
3999
|
+
const Label = styled.span `
|
|
3920
4000
|
font-family: ${FontStyles.DEFAULT};
|
|
3921
4001
|
font-size: ${FontSizes.DEFAULT};
|
|
3922
4002
|
font-weight: 400;
|
|
@@ -3926,9 +4006,9 @@ const Label$1 = styled.span `
|
|
|
3926
4006
|
`;
|
|
3927
4007
|
const Radio = (_a) => {
|
|
3928
4008
|
var { children, disabled, checked, onChange, value } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value"]);
|
|
3929
|
-
return (React.createElement(Wrapper$
|
|
4009
|
+
return (React.createElement(Wrapper$2, Object.assign({ "$disabled": disabled }, accessibleProps),
|
|
3930
4010
|
React.createElement(Input, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'radio', value: value }),
|
|
3931
|
-
React.createElement(Label
|
|
4011
|
+
React.createElement(Label, null, children)));
|
|
3932
4012
|
};
|
|
3933
4013
|
|
|
3934
4014
|
const RadioList = (_a) => {
|
|
@@ -4010,7 +4090,7 @@ const Table = (_a) => {
|
|
|
4010
4090
|
}))) : null));
|
|
4011
4091
|
};
|
|
4012
4092
|
|
|
4013
|
-
const Wrapper$
|
|
4093
|
+
const Wrapper$1 = styled.div `
|
|
4014
4094
|
display: flex;
|
|
4015
4095
|
box-sizing: border-box;
|
|
4016
4096
|
align-items: flex-end;
|
|
@@ -4059,7 +4139,7 @@ const Badge = styled.div `
|
|
|
4059
4139
|
`;
|
|
4060
4140
|
const Tabs = (_a) => {
|
|
4061
4141
|
var { tabs } = _a, accessibleProps = __rest(_a, ["tabs"]);
|
|
4062
|
-
return (React.createElement(Wrapper$
|
|
4142
|
+
return (React.createElement(Wrapper$1, Object.assign({}, accessibleProps), tabs.map((_a, i) => {
|
|
4063
4143
|
var { isActive, label, badgeCount, errorBadge, onClick } = _a, accessibleProps = __rest(_a, ["isActive", "label", "badgeCount", "errorBadge", "onClick"]);
|
|
4064
4144
|
return (React.createElement(Tab, Object.assign({ "$isActive": isActive || false, key: i, onClick: isActive ? undefined : onClick }, accessibleProps),
|
|
4065
4145
|
badgeCount ? React.createElement(Badge, { "$isError": errorBadge || false }, badgeCount) : null,
|
|
@@ -4068,40 +4148,6 @@ const Tabs = (_a) => {
|
|
|
4068
4148
|
};
|
|
4069
4149
|
Tabs.defaultProps = {};
|
|
4070
4150
|
|
|
4071
|
-
const Wrapper$1 = styled.div `
|
|
4072
|
-
display: inline-block;
|
|
4073
|
-
border-radius: 4px;
|
|
4074
|
-
padding: 4px 6px;
|
|
4075
|
-
background: ${props => Colors[props.$color].Hex};
|
|
4076
|
-
color: #ffffff;
|
|
4077
|
-
box-sizing: border-box;
|
|
4078
|
-
cursor: ${props => (props.$removable ? 'pointer' : 'default')};
|
|
4079
|
-
`;
|
|
4080
|
-
const Content = styled.div `
|
|
4081
|
-
display: flex;
|
|
4082
|
-
align-items: center;
|
|
4083
|
-
`;
|
|
4084
|
-
const Label = styled.div `
|
|
4085
|
-
color: ${props => (props.$color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff')};
|
|
4086
|
-
font-size: ${FontSizes.SMALL};
|
|
4087
|
-
font-weight: 500;
|
|
4088
|
-
font-family: ${FontStyles.DEFAULT};
|
|
4089
|
-
line-height: 1.2em;
|
|
4090
|
-
`;
|
|
4091
|
-
const Remove = styled.div `
|
|
4092
|
-
margin-left: 10px;
|
|
4093
|
-
display: flex;
|
|
4094
|
-
align-items: center;
|
|
4095
|
-
`;
|
|
4096
|
-
const Tag = (_a) => {
|
|
4097
|
-
var { children, color = 'PRIMARY', removable, onClick } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick"]);
|
|
4098
|
-
return (React.createElement(Wrapper$1, Object.assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps),
|
|
4099
|
-
React.createElement(Content, null,
|
|
4100
|
-
React.createElement(Label, { "$color": color }, children),
|
|
4101
|
-
removable ? (React.createElement(Remove, null,
|
|
4102
|
-
React.createElement(Icon, { color: color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff', path: mdiClose, size: '15px' }))) : null)));
|
|
4103
|
-
};
|
|
4104
|
-
|
|
4105
4151
|
const Track = styled.div `
|
|
4106
4152
|
height: 24px;
|
|
4107
4153
|
border-radius: 12px;
|
|
@@ -4169,5 +4215,5 @@ const ZeroState = (_a) => {
|
|
|
4169
4215
|
action && (React.createElement(Button, { children: action === null || action === void 0 ? void 0 : action.children, icon: action === null || action === void 0 ? void 0 : action.icon, onClick: action === null || action === void 0 ? void 0 : action.onClick }))));
|
|
4170
4216
|
};
|
|
4171
4217
|
|
|
4172
|
-
export { Accordion, ActionDialog, Alert, BulkActionBar, Button, ButtonMenu, Checkbox, Checklist, Copy, DatePicker, Drawer, Field, FileUpload, Heading, Input$1 as Input, Link, Loader, Logo, Modal, MoreMenu, MultiSelect, PageHeader, Pagination, Radio, RadioList, Select, Table, Tabs, Tag, Toggle, Tooltip, ZeroState };
|
|
4218
|
+
export { Accordion, ActionDialog, Alert, BulkActionBar, Button, ButtonMenu, Checkbox, Checklist, Copy, DatePicker, Drawer, Field, FieldGroup, FileUpload, Heading, Input$1 as Input, Link, Loader, Logo, Modal, MoreMenu, MultiSelect, PageHeader, Pagination, ProgressBar, Radio, RadioList, Select, Table, Tabs, Tag, Toggle, Tooltip, ZeroState };
|
|
4173
4219
|
//# sourceMappingURL=index.js.map
|