no-frills-ui 0.0.13 → 0.0.14-alpha.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/index.js +2701 -2944
- package/dist/index.js.map +1 -1
- package/lib-esm/components/Accordion/Accordion.d.ts +2 -2
- package/lib-esm/components/Accordion/Accordion.js +8 -7
- package/lib-esm/components/Accordion/Accordion.js.map +1 -1
- package/lib-esm/components/Accordion/AccordionStep.d.ts +10 -5
- package/lib-esm/components/Accordion/AccordionStep.js +3 -12
- package/lib-esm/components/Accordion/AccordionStep.js.map +1 -1
- package/lib-esm/components/Badge/Badge.d.ts +3 -2
- package/lib-esm/components/Badge/Badge.js +6 -4
- package/lib-esm/components/Badge/Badge.js.map +1 -1
- package/lib-esm/components/Button/ActionButton.d.ts +4 -2
- package/lib-esm/components/Button/Button.d.ts +4 -2
- package/lib-esm/components/Button/IconButton.d.ts +4 -2
- package/lib-esm/components/Button/LinkButton.d.ts +4 -2
- package/lib-esm/components/Button/RaisedButton.d.ts +4 -2
- package/lib-esm/components/Card/Card.d.ts +4 -2
- package/lib-esm/components/Card/index.d.ts +1 -0
- package/lib-esm/components/Card/index.js +1 -0
- package/lib-esm/components/Card/index.js.map +1 -1
- package/lib-esm/components/Chip/Chip.d.ts +6 -0
- package/lib-esm/components/Chip/Chip.js +47 -0
- package/lib-esm/components/Chip/Chip.js.map +1 -0
- package/lib-esm/components/Chip/index.d.ts +1 -0
- package/lib-esm/components/Chip/index.js +2 -0
- package/lib-esm/components/Chip/index.js.map +1 -0
- package/lib-esm/components/Dialog/AlertDialog.d.ts +3 -3
- package/lib-esm/components/Dialog/AlertDialog.js +5 -7
- package/lib-esm/components/Dialog/AlertDialog.js.map +1 -1
- package/lib-esm/components/Dialog/ConfirmDialog.d.ts +2 -2
- package/lib-esm/components/Dialog/ConfirmDialog.js +4 -7
- package/lib-esm/components/Dialog/ConfirmDialog.js.map +1 -1
- package/lib-esm/components/Dialog/Dialog.d.ts +8 -11
- package/lib-esm/components/Dialog/Dialog.js +3 -2
- package/lib-esm/components/Dialog/Dialog.js.map +1 -1
- package/lib-esm/components/Dialog/PromptDialog.d.ts +2 -2
- package/lib-esm/components/Dialog/PromptDialog.js +4 -11
- package/lib-esm/components/Dialog/PromptDialog.js.map +1 -1
- package/lib-esm/components/DragAndDrop/DragAndDrop.d.ts +18 -0
- package/lib-esm/components/DragAndDrop/DragAndDrop.js +25 -0
- package/lib-esm/components/DragAndDrop/DragAndDrop.js.map +1 -0
- package/lib-esm/components/DragAndDrop/DragItem.d.ts +9 -0
- package/lib-esm/components/DragAndDrop/DragItem.js +49 -0
- package/lib-esm/components/DragAndDrop/DragItem.js.map +1 -0
- package/lib-esm/components/DragAndDrop/index.d.ts +2 -0
- package/lib-esm/components/DragAndDrop/index.js +3 -0
- package/lib-esm/components/DragAndDrop/index.js.map +1 -0
- package/lib-esm/components/DragAndDrop/types.d.ts +9 -0
- package/lib-esm/components/DragAndDrop/types.js +8 -0
- package/lib-esm/components/DragAndDrop/types.js.map +1 -0
- package/lib-esm/components/Drawer/Drawer.d.ts +3 -3
- package/lib-esm/components/Drawer/Drawer.js +5 -3
- package/lib-esm/components/Drawer/Drawer.js.map +1 -1
- package/lib-esm/components/Groups/Group.d.ts +1 -1
- package/lib-esm/components/Groups/Group.js +2 -4
- package/lib-esm/components/Groups/Group.js.map +1 -1
- package/lib-esm/components/Groups/GroupLabel.d.ts +4 -2
- package/lib-esm/components/Input/Checkbox.d.ts +2 -2
- package/lib-esm/components/Input/Checkbox.js +4 -4
- package/lib-esm/components/Input/Checkbox.js.map +1 -1
- package/lib-esm/components/Input/Dropdown.d.ts +2 -2
- package/lib-esm/components/Input/Dropdown.js +7 -6
- package/lib-esm/components/Input/Dropdown.js.map +1 -1
- package/lib-esm/components/Input/Input.d.ts +5 -2
- package/lib-esm/components/Input/Input.js +2 -4
- package/lib-esm/components/Input/Input.js.map +1 -1
- package/lib-esm/components/Input/Radio.d.ts +2 -1
- package/lib-esm/components/Input/Radio.js +2 -4
- package/lib-esm/components/Input/Radio.js.map +1 -1
- package/lib-esm/components/Input/RadioButton.d.ts +5 -2
- package/lib-esm/components/Input/RadioButton.js +2 -4
- package/lib-esm/components/Input/RadioButton.js.map +1 -1
- package/lib-esm/components/Input/Select.d.ts +1 -1
- package/lib-esm/components/Input/Select.js +4 -9
- package/lib-esm/components/Input/Select.js.map +1 -1
- package/lib-esm/components/Input/TextArea.d.ts +1 -1
- package/lib-esm/components/Input/TextArea.js +3 -5
- package/lib-esm/components/Input/TextArea.js.map +1 -1
- package/lib-esm/components/Input/Toggle.d.ts +3 -2
- package/lib-esm/components/Input/Toggle.js +2 -5
- package/lib-esm/components/Input/Toggle.js.map +1 -1
- package/lib-esm/components/Menu/Menu.d.ts +1 -1
- package/lib-esm/components/Menu/Menu.js +3 -3
- package/lib-esm/components/Menu/Menu.js.map +1 -1
- package/lib-esm/components/Menu/MenuContext.d.ts +0 -1
- package/lib-esm/components/Menu/MenuItem.d.ts +1 -1
- package/lib-esm/components/Menu/MenuItem.js +4 -5
- package/lib-esm/components/Menu/MenuItem.js.map +1 -1
- package/lib-esm/components/Modal/Modal.d.ts +3 -3
- package/lib-esm/components/Modal/Modal.js +5 -3
- package/lib-esm/components/Modal/Modal.js.map +1 -1
- package/lib-esm/components/Notification/Notification.d.ts +4 -36
- package/lib-esm/components/Notification/Notification.js +4 -19
- package/lib-esm/components/Notification/Notification.js.map +1 -1
- package/lib-esm/components/Notification/NotificationManager.d.ts +2 -2
- package/lib-esm/components/Notification/NotificationManager.js +6 -18
- package/lib-esm/components/Notification/NotificationManager.js.map +1 -1
- package/lib-esm/components/Notification/index.d.ts +2 -1
- package/lib-esm/components/Notification/index.js +2 -1
- package/lib-esm/components/Notification/index.js.map +1 -1
- package/lib-esm/components/Notification/style.d.ts +38 -17
- package/lib-esm/components/Notification/style.js +1 -1
- package/lib-esm/components/Notification/style.js.map +1 -1
- package/lib-esm/components/Notification/types.d.ts +34 -0
- package/lib-esm/components/Notification/types.js +18 -0
- package/lib-esm/components/Notification/types.js.map +1 -0
- package/lib-esm/components/Popover/Popover.d.ts +1 -1
- package/lib-esm/components/Popover/Popover.js +15 -7
- package/lib-esm/components/Popover/Popover.js.map +1 -1
- package/lib-esm/components/Spinner/Spinner.d.ts +2 -2
- package/lib-esm/components/Spinner/Spinner.js +2 -2
- package/lib-esm/components/Spinner/Spinner.js.map +1 -1
- package/lib-esm/components/Stepper/Step.d.ts +2 -1
- package/lib-esm/components/Stepper/Step.js +2 -2
- package/lib-esm/components/Stepper/Step.js.map +1 -1
- package/lib-esm/components/Stepper/Stepper.d.ts +2 -2
- package/lib-esm/components/Stepper/Stepper.js +3 -14
- package/lib-esm/components/Stepper/Stepper.js.map +1 -1
- package/lib-esm/components/Tabs/Tab.d.ts +1 -1
- package/lib-esm/components/Tabs/Tab.js +2 -2
- package/lib-esm/components/Tabs/Tab.js.map +1 -1
- package/lib-esm/components/Tabs/Tabs.d.ts +1 -1
- package/lib-esm/components/Tabs/Tabs.js +3 -4
- package/lib-esm/components/Tabs/Tabs.js.map +1 -1
- package/lib-esm/components/Toast/Toast.js +3 -5
- package/lib-esm/components/Toast/Toast.js.map +1 -1
- package/lib-esm/components/Toast/ToastStory.d.ts +3 -1
- package/lib-esm/components/Toast/ToastStory.js +2 -1
- package/lib-esm/components/Toast/ToastStory.js.map +1 -1
- package/lib-esm/components/Tooltip/Tooltip.d.ts +3 -3
- package/lib-esm/components/Tooltip/Tooltip.js +3 -5
- package/lib-esm/components/Tooltip/Tooltip.js.map +1 -1
- package/lib-esm/components/index.d.ts +3 -1
- package/lib-esm/components/index.js +3 -1
- package/lib-esm/components/index.js.map +1 -1
- package/lib-esm/icons/CheckCircle.d.ts +1 -1
- package/lib-esm/icons/CheckCircle.js +2 -4
- package/lib-esm/icons/CheckCircle.js.map +1 -1
- package/lib-esm/icons/Close.d.ts +1 -1
- package/lib-esm/icons/Close.js +2 -4
- package/lib-esm/icons/Close.js.map +1 -1
- package/lib-esm/icons/DragIndicator.d.ts +1 -0
- package/lib-esm/icons/DragIndicator.js +5 -0
- package/lib-esm/icons/DragIndicator.js.map +1 -0
- package/lib-esm/icons/ErrorOutline.d.ts +1 -1
- package/lib-esm/icons/ErrorOutline.js +2 -3
- package/lib-esm/icons/ErrorOutline.js.map +1 -1
- package/lib-esm/icons/ExpandMore.d.ts +1 -1
- package/lib-esm/icons/ExpandMore.js +2 -4
- package/lib-esm/icons/ExpandMore.js.map +1 -1
- package/lib-esm/icons/FiberManualRecord.d.ts +1 -1
- package/lib-esm/icons/FiberManualRecord.js +2 -4
- package/lib-esm/icons/FiberManualRecord.js.map +1 -1
- package/lib-esm/icons/Info.d.ts +1 -1
- package/lib-esm/icons/Info.js +2 -4
- package/lib-esm/icons/Info.js.map +1 -1
- package/lib-esm/icons/ReportProblem.d.ts +1 -1
- package/lib-esm/icons/ReportProblem.js +2 -4
- package/lib-esm/icons/ReportProblem.js.map +1 -1
- package/lib-esm/icons/index.d.ts +1 -0
- package/lib-esm/icons/index.js +1 -0
- package/lib-esm/icons/index.js.map +1 -1
- package/lib-esm/shared/LayerManager.js +3 -2
- package/lib-esm/shared/LayerManager.js.map +1 -1
- package/lib-esm/shared/styles.d.ts +16 -5
- package/package.json +23 -22
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
declare function Accordion(props: AccordionProps & {
|
|
3
3
|
children: any;
|
|
4
|
-
}): JSX.Element;
|
|
4
|
+
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare namespace Accordion {
|
|
6
6
|
var propTypes: {
|
|
7
7
|
/** Currently opened step */
|
|
@@ -13,5 +13,5 @@ declare namespace Accordion {
|
|
|
13
13
|
active: number;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
type AccordionProps = PropTypes.InferProps<typeof Accordion.propTypes>;
|
|
17
17
|
export default Accordion;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useState, Children, cloneElement } from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
function Accordion(props) {
|
|
4
5
|
const [active, setActive] = useState(props.active);
|
|
@@ -14,12 +15,12 @@ function Accordion(props) {
|
|
|
14
15
|
setActive(newIndex);
|
|
15
16
|
}
|
|
16
17
|
};
|
|
17
|
-
return (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
return (_jsx(_Fragment, { children: Children.map(props.children, (child, index) => {
|
|
19
|
+
return cloneElement(child, {
|
|
20
|
+
open: active === index,
|
|
21
|
+
onStepClick: onStepClick(index, child.props.disabled)
|
|
22
|
+
});
|
|
23
|
+
}) }));
|
|
23
24
|
}
|
|
24
25
|
Accordion.propTypes = {
|
|
25
26
|
/** Currently opened step */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,SAAS,SAAS,CAAC,KAAyC;IACxD,MAAM,CAAE,MAAM,EAAE,SAAS,CAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAErD,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,QAAiB,EAAE,EAAE,CAAC,GAAG,EAAE;QAC3D,IAAI,QAAQ,EAAE,CAAC;YACX,OAAO;QACX,CAAC;QAED,MAAM,QAAQ,GAAG,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9C,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YACpB,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC;aAAM,CAAC;YACJ,SAAS,CAAC,QAAQ,CAAC,CAAC;QACxB,CAAC;IACL,CAAC,CAAA;IAED,OAAO,CACH,4BACC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC3C,OAAO,YAAY,CAAC,KAAK,EAAE;gBACvB,IAAI,EAAE,MAAM,KAAK,KAAK;gBACtB,WAAW,EAAE,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC;aACxD,CAAC,CAAC;QACP,CAAC,CAAC,GACC,CACN,CAAA;AACL,CAAC;AAID,SAAS,CAAC,SAAS,GAAG;IAClB,4BAA4B;IAC5B,MAAM,EAAE,SAAS,CAAC,MAAM;IACxB,wCAAwC;IACxC,WAAW,EAAE,SAAS,CAAC,IAAI;CAC9B,CAAA;AAED,SAAS,CAAC,YAAY,GAAG;IACrB,MAAM,EAAE,CAAC,CAAC;CACb,CAAA;AAGD,eAAe,SAAS,CAAC"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import PropTypes from 'prop-types';
|
|
4
|
-
export declare const AccordionStepBody: import("@emotion/styled
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export declare const AccordionStepBody: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
|
+
export declare const AccordionStepFooter: import("@emotion/styled").StyledComponent<{
|
|
8
|
+
theme?: import("@emotion/react").Theme;
|
|
9
|
+
as?: React.ElementType;
|
|
10
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
|
+
declare function AccordionStep(props: React.PropsWithChildren<AccordionStepProps>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
12
|
declare namespace AccordionStep {
|
|
8
13
|
var propTypes: {
|
|
9
14
|
/** Header text for the step */
|
|
@@ -21,7 +26,7 @@ declare namespace AccordionStep {
|
|
|
21
26
|
};
|
|
22
27
|
}
|
|
23
28
|
export default AccordionStep;
|
|
24
|
-
|
|
29
|
+
type AccordionStepProps = PropTypes.InferProps<typeof AccordionStep.propTypes> & {
|
|
25
30
|
open: boolean;
|
|
26
31
|
completed: boolean;
|
|
27
32
|
onStepClick: () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
|
-
import { css
|
|
4
|
+
import { css } from '@emotion/react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { Card } from '../Card';
|
|
7
7
|
import { Ellipsis } from '../../shared/styles';
|
|
@@ -94,16 +94,7 @@ export default function AccordionStep(props) {
|
|
|
94
94
|
const toggleFocus = () => {
|
|
95
95
|
setFocused(!focused);
|
|
96
96
|
};
|
|
97
|
-
return (
|
|
98
|
-
jsx(StepHeader, { open: open, disabled: disabled, onClick: onStepClick },
|
|
99
|
-
jsx(HeaderContainer, { open: open, completed: completed },
|
|
100
|
-
jsx("input", { type: 'checkbox', checked: open, disabled: disabled, onFocus: toggleFocus, onBlur: toggleFocus }),
|
|
101
|
-
jsx(FiberManualRecord, null),
|
|
102
|
-
jsx(Ellipsis, null, header)),
|
|
103
|
-
jsx(ExpandContainer, { open: open },
|
|
104
|
-
errorText && jsx(Badge, { css: css `margin-right: 15px;`, inline: true, type: BADGE_TYPE.DANGER }, errorText),
|
|
105
|
-
jsx(ExpandMore, null))),
|
|
106
|
-
jsx(StepBody, { ref: ref, height: open ? height : 0 }, open && props.children)));
|
|
97
|
+
return (_jsxs(Step, Object.assign({}, props, { focused: focused, elevated: props.open, children: [_jsxs(StepHeader, { open: open, disabled: disabled, onClick: onStepClick, children: [_jsxs(HeaderContainer, { open: open, completed: completed, children: [_jsx("input", { type: 'checkbox', checked: open, disabled: disabled, onFocus: toggleFocus, onBlur: toggleFocus }), _jsx(FiberManualRecord, {}), _jsx(Ellipsis, { children: header })] }), _jsxs(ExpandContainer, { open: open, children: [errorText && _jsx(Badge, { css: css `margin-right: 15px;`, inline: true, type: BADGE_TYPE.DANGER, children: errorText }), _jsx(ExpandMore, {})] })] }), _jsx(StepBody, { ref: ref, height: open ? height : 0, children: open && props.children })] })));
|
|
107
98
|
}
|
|
108
99
|
AccordionStep.propTypes = {
|
|
109
100
|
/** Header text for the step */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionStep.js","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionStep.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"AccordionStep.js","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionStep.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAA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IAAC,IAAI,EAAE,IAAI,aACtB,SAAS,IAAI,KAAC,KAAK,IAAC,GAAG,EAAE,GAAG,CAAA,qBAAqB,EAAE,MAAM,QAAC,IAAI,EAAE,UAAU,CAAC,MAAM,YAAG,SAAS,GAAS,EACvG,KAAC,UAAU,KAAG,IACA,IACT,EACb,KAAC,QAAQ,IAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,YACxC,IAAI,IAAI,KAAK,CAAC,QAAQ,GAChB,KACR,CACV,CAAA;AACL,CAAC;AAED,aAAa,CAAC,SAAS,GAAG;IACtB,+BAA+B;IAC/B,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IACnC,8BAA8B;IAC9B,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,4CAA4C;IAC5C,SAAS,EAAE,SAAS,CAAC,IAAI;IACzB,8BAA8B;IAC9B,QAAQ,EAAE,SAAS,CAAC,IAAI;CAC3B,CAAA;AAED,aAAa,CAAC,YAAY,GAAG;IACzB,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE,KAAK;CAClB,CAAA"}
|
|
@@ -7,14 +7,15 @@ export declare enum BADGE_TYPE {
|
|
|
7
7
|
DANGER = "danger",
|
|
8
8
|
DISABLED = "disabled"
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
declare function Badge(props: BadgeProps): JSX.Element;
|
|
10
|
+
type BadgeProps = React.PropsWithChildren<PropTypes.InferProps<typeof Badge.propTypes>>;
|
|
11
|
+
declare function Badge(props: BadgeProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare namespace Badge {
|
|
13
13
|
var propTypes: {
|
|
14
14
|
/** Display badge inline or overlay on parent component */
|
|
15
15
|
inline: PropTypes.Requireable<boolean>;
|
|
16
16
|
/** Type of badge */
|
|
17
17
|
type: PropTypes.Requireable<BADGE_TYPE>;
|
|
18
|
+
css: PropTypes.Requireable<any>;
|
|
18
19
|
};
|
|
19
20
|
var defaultProps: {
|
|
20
21
|
inline: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import constants from '../../shared/constants';
|
|
@@ -32,12 +32,12 @@ const BadgeSpan = styled.span `
|
|
|
32
32
|
min-height: 4px;
|
|
33
33
|
min-width: 4px;
|
|
34
34
|
font-size: 12px;
|
|
35
|
-
margin: 0 5px;
|
|
35
|
+
margin: ${props => props.inline ? '0 5px' : '0'};
|
|
36
36
|
|
|
37
37
|
${props => !props.inline && 'position: absolute; top: 0; right: 0; transform: translate(50%, -50%);'};
|
|
38
38
|
`;
|
|
39
39
|
export default function Badge(props) {
|
|
40
|
-
return
|
|
40
|
+
return _jsx(BadgeSpan, Object.assign({}, props));
|
|
41
41
|
}
|
|
42
42
|
;
|
|
43
43
|
Badge.propTypes = {
|
|
@@ -48,8 +48,10 @@ Badge.propTypes = {
|
|
|
48
48
|
BADGE_TYPE.PRIMARY,
|
|
49
49
|
BADGE_TYPE.SUCCESS,
|
|
50
50
|
BADGE_TYPE.WARNING,
|
|
51
|
-
BADGE_TYPE.DANGER
|
|
51
|
+
BADGE_TYPE.DANGER,
|
|
52
|
+
BADGE_TYPE.DISABLED,
|
|
52
53
|
]),
|
|
54
|
+
css: PropTypes.any,
|
|
53
55
|
};
|
|
54
56
|
Badge.defaultProps = {
|
|
55
57
|
inline: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,SAAS,MAAM,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AAS,CAAC,IAAI;IACtB,oBAAoB;IACpB,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC;QAClB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,QAAQ;KACtB,CAAC;IACF,GAAG,EAAE,SAAS,CAAC,GAAG;CACrB,CAAA;AAED,KAAK,CAAC,YAAY,GAAG;IACjB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,UAAU,CAAC,OAAO;CAC3B,CAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const _default: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
3
5
|
export default _default;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const _default: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
3
5
|
export default _default;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const _default: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
3
5
|
export default _default;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const _default: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
3
5
|
export default _default;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const _default: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
3
5
|
export default _default;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface CardExtraProps {
|
|
3
2
|
elevated?: boolean;
|
|
4
3
|
}
|
|
5
|
-
declare const Card: import("@emotion/styled
|
|
4
|
+
declare const Card: import("@emotion/styled").StyledComponent<{
|
|
5
|
+
theme?: import("@emotion/react").Theme;
|
|
6
|
+
as?: React.ElementType;
|
|
7
|
+
} & CardExtraProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
8
|
export default Card;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
13
|
+
import styled from '@emotion/styled';
|
|
14
|
+
import constants from '../../shared/constants';
|
|
15
|
+
import { Close } from '../../icons';
|
|
16
|
+
const Container = styled.div `
|
|
17
|
+
padding: 5px;
|
|
18
|
+
border-radius: 16px;
|
|
19
|
+
background-color: var(--border-light-color, ${constants.BORDER_LIGHT_COLOR});
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
margin: 5px;
|
|
22
|
+
line-height: 20px;
|
|
23
|
+
align-items: center;
|
|
24
|
+
|
|
25
|
+
&:focus-within {
|
|
26
|
+
background-color: var(--light-grey, ${constants.LIGHT_GREY});
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
const Button = styled.button `
|
|
30
|
+
color: #fff;
|
|
31
|
+
background-color: var(--disabled-border, ${constants.DISABLED_BORDER});
|
|
32
|
+
border-radius: 50%;
|
|
33
|
+
border: none;
|
|
34
|
+
padding: 0;
|
|
35
|
+
display: inline-flex;
|
|
36
|
+
margin-left: 5px;
|
|
37
|
+
`;
|
|
38
|
+
export default function Chip(props) {
|
|
39
|
+
const { label, onCloseClick } = props, rest = __rest(props, ["label", "onCloseClick"]);
|
|
40
|
+
const keyUpHandler = (e) => {
|
|
41
|
+
if (e.keyCode === 8 || e.keyCode === 46) {
|
|
42
|
+
onCloseClick === null || onCloseClick === void 0 ? void 0 : onCloseClick();
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
return (_jsxs(Container, Object.assign({}, rest, { onKeyUp: keyUpHandler, children: [label, _jsx(Button, { onClick: onCloseClick, children: _jsx(Close, { height: 20, width: 20 }) })] })));
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=Chip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chip.js","sourceRoot":"","sources":["../../../src/components/Chip/Chip.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAOpC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;kDAGsB,SAAS,CAAC,kBAAkB;;;;;;;8CAOhC,SAAS,CAAC,UAAU;;CAEjE,CAAC;AAEF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;;+CAEmB,SAAS,CAAC,eAAe;;;;;;CAMvE,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAgB;IACzC,MAAM,EAAE,KAAK,EAAE,YAAY,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAxC,yBAAgC,CAAQ,CAAC;IAE/C,MAAM,YAAY,GAA8C,CAAC,CAAC,EAAE,EAAE;QAClE,IAAI,CAAC,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,EAAE,EAAE,CAAC;YACtC,YAAY,aAAZ,YAAY,uBAAZ,YAAY,EAAI,CAAC;QACrB,CAAC;IACL,CAAC,CAAA;IAED,OAAO,CACH,MAAC,SAAS,oBAAK,IAAI,IAAE,OAAO,EAAE,YAAY,aACrC,KAAK,EACN,KAAC,MAAM,IAAC,OAAO,EAAE,YAAY,YAAE,KAAC,KAAK,IAAC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,GAAI,GAAS,KAChE,CACf,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Chip } from './Chip';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Chip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
3
|
+
type AlertOption = PropTypes.InferProps<typeof AlertDialog.propTypes>;
|
|
4
4
|
export default class AlertDialog extends React.Component<AlertOption> {
|
|
5
5
|
private dialog;
|
|
6
6
|
static propTypes: {
|
|
7
7
|
/** Shown as header of the dialog */
|
|
8
8
|
header: PropTypes.Requireable<string>;
|
|
9
9
|
/** Rendered in the body. */
|
|
10
|
-
body: PropTypes.Validator<
|
|
10
|
+
body: PropTypes.Validator<any>;
|
|
11
11
|
/** Accept button text, default value is `OK` */
|
|
12
12
|
buttonText: PropTypes.Requireable<string>;
|
|
13
13
|
/** props for the dialog */
|
|
@@ -18,6 +18,6 @@ export default class AlertDialog extends React.Component<AlertOption> {
|
|
|
18
18
|
};
|
|
19
19
|
show: () => Promise<unknown>;
|
|
20
20
|
private close;
|
|
21
|
-
render(): JSX.Element;
|
|
21
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
22
22
|
}
|
|
23
23
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
1
2
|
import React, { createRef } from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import Dialog, { DialogBody, DialogFooter, DialogHeader } from './Dialog';
|
|
4
5
|
import { Button } from '../Button';
|
|
5
|
-
|
|
6
|
+
class AlertDialog extends React.Component {
|
|
6
7
|
constructor() {
|
|
7
8
|
super(...arguments);
|
|
8
9
|
this.dialog = createRef();
|
|
@@ -15,18 +16,14 @@ export default class AlertDialog extends React.Component {
|
|
|
15
16
|
this.close = () => this.dialog.current.close();
|
|
16
17
|
}
|
|
17
18
|
render() {
|
|
18
|
-
return (
|
|
19
|
-
this.props.header && React.createElement(DialogHeader, null, this.props.header),
|
|
20
|
-
React.createElement(DialogBody, null, this.props.body),
|
|
21
|
-
React.createElement(DialogFooter, null,
|
|
22
|
-
React.createElement(Button, { onClick: this.close }, this.props.buttonText))));
|
|
19
|
+
return (_jsxs(Dialog, Object.assign({}, this.props.dialogProps, { ref: this.dialog, closeOnEsc: false, closeOnOverlayClick: false, children: [this.props.header && _jsx(DialogHeader, { children: this.props.header }), _jsx(DialogBody, { children: this.props.body }), _jsx(DialogFooter, { children: _jsx(Button, { onClick: this.close, children: this.props.buttonText }) })] })));
|
|
23
20
|
}
|
|
24
21
|
}
|
|
25
22
|
AlertDialog.propTypes = {
|
|
26
23
|
/** Shown as header of the dialog */
|
|
27
24
|
header: PropTypes.string,
|
|
28
25
|
/** Rendered in the body. */
|
|
29
|
-
body: PropTypes.
|
|
26
|
+
body: PropTypes.any.isRequired,
|
|
30
27
|
/** Accept button text, default value is `OK` */
|
|
31
28
|
buttonText: PropTypes.string,
|
|
32
29
|
/** props for the dialog */
|
|
@@ -35,4 +32,5 @@ AlertDialog.propTypes = {
|
|
|
35
32
|
AlertDialog.defaultProps = {
|
|
36
33
|
buttonText: 'OK'
|
|
37
34
|
};
|
|
35
|
+
export default AlertDialog;
|
|
38
36
|
//# sourceMappingURL=AlertDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/AlertDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,SAAS,MAAM,YAAY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CAAC,IAAI,GAAc,EAC1C,KAAC,YAAY,cAAC,KAAC,MAAM,IAAC,OAAO,EAAE,IAAI,CAAC,KAAK,YAAG,IAAI,CAAC,KAAK,CAAC,UAAU,GAAU,GAAe,KACrF,CACZ,CAAC;IACN,CAAC;;AAhCM,qBAAS,GAAG;IACf,oCAAoC;IACpC,MAAM,EAAE,SAAS,CAAC,MAAM;IACxB,4BAA4B;IAC5B,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,UAAU;IAC9B,gDAAgD;IAChD,UAAU,EAAE,SAAS,CAAC,MAAM;IAC5B,2BAA2B;IAC3B,WAAW,EAAE,SAAS,CAAC,MAAM;CAChC,AATe,CASf;AAEM,wBAAY,GAAG;IAClB,UAAU,EAAE,IAAI;CACnB,AAFkB,CAElB;eAhBgB,WAAW"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
3
|
+
type ConfirmOption = PropTypes.InferProps<typeof ConfirmDialog.propTypes>;
|
|
4
4
|
export default class ConfirmDialog extends React.Component<ConfirmOption> {
|
|
5
5
|
private dialog;
|
|
6
6
|
static propTypes: {
|
|
@@ -22,6 +22,6 @@ export default class ConfirmDialog extends React.Component<ConfirmOption> {
|
|
|
22
22
|
show: () => Promise<unknown>;
|
|
23
23
|
private cancel;
|
|
24
24
|
private confirm;
|
|
25
|
-
render(): JSX.Element;
|
|
25
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
26
26
|
}
|
|
27
27
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
1
2
|
import React, { createRef } from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import Dialog, { DialogBody, DialogFooter, DialogHeader } from './Dialog';
|
|
4
5
|
import { Button, ActionButton } from '../Button';
|
|
5
|
-
|
|
6
|
+
class ConfirmDialog extends React.Component {
|
|
6
7
|
constructor() {
|
|
7
8
|
super(...arguments);
|
|
8
9
|
this.dialog = createRef();
|
|
@@ -19,12 +20,7 @@ export default class ConfirmDialog extends React.Component {
|
|
|
19
20
|
}
|
|
20
21
|
render() {
|
|
21
22
|
const { header, body, yesText, noText, dialogProps } = this.props;
|
|
22
|
-
return (
|
|
23
|
-
header && React.createElement(DialogHeader, null, header),
|
|
24
|
-
React.createElement(DialogBody, null, body),
|
|
25
|
-
React.createElement(DialogFooter, null,
|
|
26
|
-
React.createElement(Button, { onClick: this.cancel }, noText),
|
|
27
|
-
React.createElement(ActionButton, { onClick: this.confirm }, yesText))));
|
|
23
|
+
return (_jsxs(Dialog, Object.assign({}, dialogProps, { ref: this.dialog, closeOnEsc: false, closeOnOverlayClick: false, children: [header && _jsx(DialogHeader, { children: header }), _jsx(DialogBody, { children: body }), _jsxs(DialogFooter, { children: [_jsx(Button, { onClick: this.cancel, children: noText }), _jsx(ActionButton, { onClick: this.confirm, children: yesText })] })] })));
|
|
28
24
|
}
|
|
29
25
|
}
|
|
30
26
|
ConfirmDialog.propTypes = {
|
|
@@ -43,4 +39,5 @@ ConfirmDialog.defaultProps = {
|
|
|
43
39
|
yesText: 'Yes',
|
|
44
40
|
noText: 'No'
|
|
45
41
|
};
|
|
42
|
+
export default ConfirmDialog;
|
|
46
43
|
//# sourceMappingURL=ConfirmDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmDialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/ConfirmDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AA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