@epilot/base-elements 3.9.15 → 3.9.16
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/Checkbox/Checkbox.d.ts +1 -1
- package/dist/Checkbox/Checkbox.js +4 -4
- package/dist/Checkbox/Checkbox.js.map +1 -1
- package/dist/Checkbox/types.d.ts +6 -75
- package/dist/FeedbackMessage/FeedbackMessage.js +12 -2
- package/dist/FeedbackMessage/FeedbackMessage.js.map +1 -1
- package/dist/bundle.js +18 -18
- package/dist/bundle.js.map +1 -1
- package/package.json +1 -1
|
@@ -22,10 +22,10 @@ var useStyles = core_1.makeStyles(function () {
|
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
|
-
function
|
|
26
|
-
var label = props.label, labelPlacement = props.labelPlacement, _a = props.checkboxPlacement, checkboxPlacement = _a === void 0 ? 'top' : _a, rest = tslib_1.__rest(props, ["label", "labelPlacement", "checkboxPlacement"]);
|
|
25
|
+
var Checkbox = function (props) {
|
|
26
|
+
var label = props.label, labelPlacement = props.labelPlacement, _a = props.checkboxPlacement, checkboxPlacement = _a === void 0 ? 'top' : _a, className = props.className, style = props.style, rest = tslib_1.__rest(props, ["label", "labelPlacement", "checkboxPlacement", "className", "style"]);
|
|
27
27
|
var classes = useStyles({ checkboxPlacement: checkboxPlacement });
|
|
28
|
-
return (react_1["default"].createElement(core_1.FormControlLabel, { classes: { root: classes.labelRoot }, control: react_1["default"].createElement(core_1.Checkbox, tslib_1.__assign({ className: classes.input }, rest)), label: label, labelPlacement: labelPlacement }));
|
|
29
|
-
}
|
|
28
|
+
return (react_1["default"].createElement(core_1.FormControlLabel, { className: className, classes: { root: classes.labelRoot }, control: react_1["default"].createElement(core_1.Checkbox, tslib_1.__assign({ className: classes.input }, rest)), label: label, labelPlacement: labelPlacement, style: style }));
|
|
29
|
+
};
|
|
30
30
|
exports.Checkbox = Checkbox;
|
|
31
31
|
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../src/Checkbox/Checkbox.tsx"],"names":[],"mappings":";;;;AAAA,0CAM0B;AAC1B,wDAAyB;AAIzB,IAAM,SAAS,GAAG,iBAAU,CAAuC;IACjE,OAAA,mBAAY,CAAC;QACX,SAAS,EAAE;YACT,UAAU,EAAE,CAAC;YACb,WAAW,EAAE,CAAC;SACf;QACD,KAAK,EAAE,UAAC,EAAqB;gBAAnB,iBAAiB,uBAAA;YAAO,OAAA,CAAC;gBACjC,SAAS,EACP,iBAAiB,KAAK,KAAK;oBACzB,CAAC,CAAC,YAAY;oBACd,CAAC,CAAC,iBAAiB,KAAK,QAAQ;wBAChC,CAAC,CAAC,UAAU;wBACZ,CAAC,CAAC,EAAE;aACT,CAAC;QAPgC,CAOhC;KACH,CAAC;AAbF,CAaE,CACH,CAAA;
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../src/Checkbox/Checkbox.tsx"],"names":[],"mappings":";;;;AAAA,0CAM0B;AAC1B,wDAAyB;AAIzB,IAAM,SAAS,GAAG,iBAAU,CAAuC;IACjE,OAAA,mBAAY,CAAC;QACX,SAAS,EAAE;YACT,UAAU,EAAE,CAAC;YACb,WAAW,EAAE,CAAC;SACf;QACD,KAAK,EAAE,UAAC,EAAqB;gBAAnB,iBAAiB,uBAAA;YAAO,OAAA,CAAC;gBACjC,SAAS,EACP,iBAAiB,KAAK,KAAK;oBACzB,CAAC,CAAC,YAAY;oBACd,CAAC,CAAC,iBAAiB,KAAK,QAAQ;wBAChC,CAAC,CAAC,UAAU;wBACZ,CAAC,CAAC,EAAE;aACT,CAAC;QAPgC,CAOhC;KACH,CAAC;AAbF,CAaE,CACH,CAAA;AAEM,IAAM,QAAQ,GAAG,UAAC,KAAoB;IAEzC,IAAA,KAAK,GAMH,KAAK,MANF,EACL,cAAc,GAKZ,KAAK,eALO,EACd,KAIE,KAAK,kBAJkB,EAAzB,iBAAiB,mBAAG,KAAK,KAAA,EACzB,SAAS,GAGP,KAAK,UAHE,EACT,KAAK,GAEH,KAAK,MAFF,EACF,IAAI,kBACL,KAAK,EAPH,sEAOL,CADQ,CACA;IAET,IAAM,OAAO,GAAG,SAAS,CAAC,EAAE,iBAAiB,mBAAA,EAAE,CAAC,CAAA;IAEhD,OAAO,CACL,iCAAC,uBAAgB,IACf,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,EACpC,OAAO,EAAE,iCAAC,eAAW,qBAAC,SAAS,EAAE,OAAO,CAAC,KAAK,IAAM,IAAI,EAAI,EAC5D,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,KAAK,GACZ,CACH,CAAA;AACH,CAAC,CAAA;AAtBY,QAAA,QAAQ,YAsBpB"}
|
package/dist/Checkbox/types.d.ts
CHANGED
|
@@ -1,84 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
label?: React.ReactNode;
|
|
1
|
+
import type { FormControlLabel as MuiFormControlLabel, Checkbox as MuiCheckbox } from '@material-ui/core';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
declare type MuiCheckboxProps = ComponentProps<typeof MuiCheckbox>;
|
|
4
|
+
declare type LabelProps = ComponentProps<typeof MuiFormControlLabel>;
|
|
5
|
+
export declare type CheckboxProps = Partial<Pick<LabelProps, 'label' | 'labelPlacement' | 'className' | 'style'>> & MuiCheckboxProps & {
|
|
8
6
|
/**
|
|
9
7
|
* placement of the checkbox
|
|
10
8
|
*/
|
|
11
9
|
checkboxPlacement?: 'top' | 'bottom' | 'middle';
|
|
12
|
-
/**
|
|
13
|
-
* the placement for the label relative to the checkbox
|
|
14
|
-
*/
|
|
15
|
-
labelPlacement?: 'end' | 'start';
|
|
16
|
-
/**
|
|
17
|
-
* If `true`, the component is checked.
|
|
18
|
-
*/
|
|
19
|
-
checked?: SwitchBaseProps['checked'];
|
|
20
|
-
/**
|
|
21
|
-
* The icon to display when the component is checked.
|
|
22
|
-
*/
|
|
23
|
-
checkedIcon?: React.ReactNode;
|
|
24
|
-
/**
|
|
25
|
-
* The color of the component. It supports those theme colors that make sense for this component.
|
|
26
|
-
*/
|
|
27
|
-
color?: 'primary' | 'secondary' | 'default';
|
|
28
|
-
/**
|
|
29
|
-
* If `true`, the checkbox will be disabled.
|
|
30
|
-
*/
|
|
31
|
-
disabled?: SwitchBaseProps['disabled'];
|
|
32
|
-
/**
|
|
33
|
-
* The icon to display when the component is unchecked.
|
|
34
|
-
*/
|
|
35
|
-
icon?: React.ReactNode;
|
|
36
|
-
/**
|
|
37
|
-
* The id of the `input` element.
|
|
38
|
-
*/
|
|
39
|
-
id?: SwitchBaseProps['id'];
|
|
40
|
-
/**
|
|
41
|
-
* If `true`, the component appears indeterminate.
|
|
42
|
-
* This does not set the native input element to indeterminate due
|
|
43
|
-
* to inconsistent behavior across browsers.
|
|
44
|
-
* However, we set a `data-indeterminate` attribute on the input.
|
|
45
|
-
*/
|
|
46
|
-
indeterminate?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* The icon to display when the component is indeterminate.
|
|
49
|
-
*/
|
|
50
|
-
indeterminateIcon?: React.ReactNode;
|
|
51
|
-
/**
|
|
52
|
-
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
53
|
-
*/
|
|
54
|
-
inputProps?: SwitchBaseProps['inputProps'];
|
|
55
|
-
/**
|
|
56
|
-
* Pass a ref to the `input` element.
|
|
57
|
-
*/
|
|
58
|
-
inputRef?: React.Ref<HTMLInputElement>;
|
|
59
|
-
/**
|
|
60
|
-
* Callback fired when the state is changed.
|
|
61
|
-
*
|
|
62
|
-
* @param {object} event The event source of the callback.
|
|
63
|
-
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
64
|
-
*/
|
|
65
|
-
onChange?: SwitchBaseProps['onChange'];
|
|
66
|
-
/**
|
|
67
|
-
* If `true`, the `input` element will be required.
|
|
68
|
-
*/
|
|
69
|
-
required?: SwitchBaseProps['required'];
|
|
70
|
-
/**
|
|
71
|
-
* The size of the checkbox.
|
|
72
|
-
* `small` is equivalent to the dense checkbox styling.
|
|
73
|
-
*/
|
|
74
|
-
size?: 'small' | 'medium';
|
|
75
|
-
/**
|
|
76
|
-
* The value of the component. The DOM API casts this to a string.
|
|
77
|
-
* The browser uses "on" as the default value.
|
|
78
|
-
*/
|
|
79
|
-
value?: SwitchBaseProps['value'];
|
|
80
10
|
/**
|
|
81
11
|
* onclick handler.
|
|
82
12
|
*/
|
|
83
13
|
onClick?: () => void;
|
|
84
14
|
};
|
|
15
|
+
export {};
|
|
@@ -18,6 +18,15 @@ var variantIconMap = (_a = {},
|
|
|
18
18
|
_a[types_1.StateVariant.info] = 'info',
|
|
19
19
|
_a);
|
|
20
20
|
var useStyles = core_1.makeStyles(function (theme) { return ({
|
|
21
|
+
contentWrapper: {
|
|
22
|
+
display: 'flex',
|
|
23
|
+
flexDirection: 'row',
|
|
24
|
+
gap: '6px',
|
|
25
|
+
fontSize: '16px'
|
|
26
|
+
},
|
|
27
|
+
icon: {
|
|
28
|
+
flexShrink: 0
|
|
29
|
+
},
|
|
21
30
|
wrapper: function (_a) {
|
|
22
31
|
var _b, _c, _d, _e, _f, _g;
|
|
23
32
|
var themeColor = _a.themeColor;
|
|
@@ -46,8 +55,9 @@ var FeedbackMessage = react_1.memo(function (_a) {
|
|
|
46
55
|
_b[classes.wrapper] = true,
|
|
47
56
|
_b[(_c = rest === null || rest === void 0 ? void 0 : rest.className) !== null && _c !== void 0 ? _c : ''] = !!(rest === null || rest === void 0 ? void 0 : rest.className),
|
|
48
57
|
_b)) },
|
|
49
|
-
react_1["default"].createElement(
|
|
50
|
-
|
|
58
|
+
react_1["default"].createElement("div", { className: classes.contentWrapper },
|
|
59
|
+
react_1["default"].createElement(icons_1.EpilotIcon, { className: classes.icon, fill: (_e = (_d = theme.palette) === null || _d === void 0 ? void 0 : _d[themeColor]) === null || _e === void 0 ? void 0 : _e[40], name: variantIconMap[stateVariant] }),
|
|
60
|
+
react_1["default"].createElement(Typography_1.BodyText, null, feedbackMessage)),
|
|
51
61
|
actionIcon && (react_1["default"].createElement(IconButton_1.IconButton, { onClick: onActionButtonClick },
|
|
52
62
|
react_1["default"].createElement(Icon_1.Icon, { customColor: (_g = (_f = theme.palette) === null || _f === void 0 ? void 0 : _f[themeColor]) === null || _g === void 0 ? void 0 : _g[10], name: actionIcon })))));
|
|
53
63
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackMessage.js","sourceRoot":"","sources":["../../src/FeedbackMessage/FeedbackMessage.tsx"],"names":[],"mappings":";;;;;AAAA,0CAAuD;AACvD,0CAAwD;AACxD,kEAAmC;AACnC,qDAAmC;AAEnC,gCAA8B;AAC9B,4CAA0C;AAE1C,4CAAwC;AAExC,iCAA4D;AAE5D,IAAM,cAAc;IAClB,GAAC,oBAAY,CAAC,OAAO,IAAG,cAAc;IACtC,GAAC,oBAAY,CAAC,OAAO,IAAG,SAAS;IACjC,GAAC,oBAAY,CAAC,KAAK,IAAG,OAAO;IAC7B,GAAC,oBAAY,CAAC,IAAI,IAAG,MAAM;OAC5B,CAAA;AAID,IAAM,SAAS,GAAG,iBAAU,CAAC,UAAC,KAAkB,IAAK,OAAA,CAAC;IACpD,OAAO,EAAE,UAAC,EAAiD;;YAA/C,UAAU,gBAAA;QAA0C,OAAA,CAAC;YAC/D,OAAO,EAAE,MAAM;YACf,IAAI,EAAE,CAAC;YACP,OAAO,EAAE,SAAS;YAClB,MAAM,EAAE,4BAAa,KAAK,CAAC,OAAO,0CAAG,UAAU,2CAAI,EAAE,EAAG;YACxD,YAAY,EAAK,KAAK,CAAC,KAAK,CAAC,YAAY,OAAI;YAC7C,eAAe,cAAE,KAAK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