flipper-ui 0.34.7 → 0.34.9
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/core/data-display/advertise/advertise.stories.d.ts +5 -4
- package/core/data-display/chapter/chapter.stories.d.ts +5 -5
- package/core/data-display/chip/chip.stories.d.ts +5 -9
- package/core/data-display/chip/index.js +7 -14
- package/core/data-display/data-table/data-table-field.js +2 -2
- package/core/data-display/data-table/data-table-query-paginated.stories.d.ts +2 -2
- package/core/data-display/data-table/data-table.js +6 -4
- package/core/data-display/data-table/data-table.stories.d.ts +2 -2
- package/core/data-display/fab/fab.stories.d.ts +5 -4
- package/core/data-display/fab/index.d.ts +1 -1
- package/core/data-display/fab/index.js +8 -13
- package/core/data-display/list/index.d.ts +1 -1
- package/core/data-display/list/index.js +8 -21
- package/core/data-display/list/list.stories.d.ts +5 -6
- package/core/data-display/list-item/index.js +28 -35
- package/core/data-display/table/table.stories.d.ts +5 -4
- package/core/data-display/typography/typography.stories.d.ts +5 -21
- package/core/feedback/dialog/index.js +6 -13
- package/core/feedback/progress/index.d.ts +1 -9
- package/core/feedback/progress/index.js +9 -38
- package/core/feedback/progress/progress.stories.d.ts +6 -13
- package/core/feedback/skeleton/skeleton.stories.d.ts +5 -6
- package/core/feedback/snackbar/index.js +3 -7
- package/core/feedback/snackbar/snackbar.stories.d.ts +5 -7
- package/core/feedback/snackbar/styles.d.ts +2 -0
- package/core/feedback/snackbar/styles.js +12 -0
- package/core/feedback/tooltip/styles.d.ts +1 -0
- package/core/feedback/tooltip/styles.js +11 -0
- package/core/feedback/tooltip/tooltip.stories.d.ts +5 -7
- package/core/inputs/autocomplete/autocomplete.stories.d.ts +1 -1
- package/core/inputs/button/button.stories.d.ts +5 -18
- package/core/inputs/checkbox/checkbox.stories.d.ts +5 -10
- package/core/inputs/chip-field/chip-field.stories.d.ts +5 -10
- package/core/inputs/date-time/index.js +8 -10
- package/core/inputs/icon-button/icon-button.stories.d.ts +5 -7
- package/core/inputs/input-adornment/input-adornment.stories.d.ts +5 -5
- package/core/inputs/mask-field/mask-field.stories.d.ts +5 -6
- package/core/inputs/pin-input/index.js +15 -13
- package/core/inputs/radio/radio.stories.d.ts +5 -7
- package/core/inputs/radio-group/radio-group.stories.d.ts +5 -5
- package/core/inputs/select/select.stories.d.ts +5 -6
- package/core/inputs/slider/index.js +5 -16
- package/core/inputs/slider/slider.stories.d.ts +6 -10
- package/core/inputs/text-field/index.js +19 -27
- package/core/inputs/text-field/text-field.stories.d.ts +0 -1
- package/core/navigation/menu/menu.stories.d.ts +5 -4
- package/core/navigation/sidebar/index.d.ts +1 -3
- package/core/navigation/sidebar/index.js +4 -20
- package/core/navigation/stepper/index.js +3 -3
- package/core/navigation/stepper/stepper.stories.d.ts +6 -5
- package/core/navigation/tabs/tabs.stories.d.ts +5 -4
- package/core/surfaces/box/box.stories.d.ts +5 -4
- package/core/surfaces/expansion-panel/expansion-panel.stories.d.ts +5 -6
- package/core/surfaces/header/header.stories.d.ts +5 -6
- package/core/surfaces/header/styles.d.ts +1 -0
- package/core/surfaces/header/styles.js +11 -0
- package/core/surfaces/step-card/step-card-panel.js +1 -2
- package/core/surfaces/step-card/step-card.stories.d.ts +7 -6
- package/package.json +32 -32
- package/test/mocks/chip-field-mock.d.ts +8 -0
- package/test/mocks/chip-field-mock.js +26 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react';
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import Advertise from '.';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
5
|
-
|
|
3
|
+
declare const meta: Meta<typeof Advertise>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Advertise>;
|
|
6
|
+
export declare const advertise: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react';
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import Chapter from '.';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
3
|
+
declare const meta: Meta<typeof Chapter>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Chapter>;
|
|
6
|
+
export declare const chapter: Story;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react';
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import Chip from '.';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const WithInitialsAvatar: any;
|
|
8
|
-
export declare const WithIconAvatar: any;
|
|
9
|
-
export declare const WithImageAvatar: any;
|
|
10
|
-
export declare const SecondaryColor: any;
|
|
3
|
+
declare const meta: Meta<typeof Chip>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Chip>;
|
|
6
|
+
export declare const chip: Story;
|
|
@@ -8,22 +8,11 @@ exports["default"] = void 0;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
var _makeStyles2 = _interopRequireDefault(require("@mui/styles/makeStyles"));
|
|
12
11
|
var _react = _interopRequireDefault(require("react"));
|
|
13
12
|
var _Chip = _interopRequireDefault(require("@mui/material/Chip"));
|
|
14
13
|
var _excluded = ["square", "padding", "margin", "style"];
|
|
15
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
15
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
|
-
var useStyles = (0, _makeStyles2["default"])(function () {
|
|
18
|
-
return {
|
|
19
|
-
root: {
|
|
20
|
-
borderRadius: '4px'
|
|
21
|
-
},
|
|
22
|
-
avatar: {
|
|
23
|
-
borderRadius: '2px'
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
16
|
var Chip = function Chip(_ref) {
|
|
28
17
|
var square = _ref.square,
|
|
29
18
|
padding = _ref.padding,
|
|
@@ -31,13 +20,17 @@ var Chip = function Chip(_ref) {
|
|
|
31
20
|
_ref$style = _ref.style,
|
|
32
21
|
style = _ref$style === void 0 ? {} : _ref$style,
|
|
33
22
|
otherProps = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
34
|
-
var classes = useStyles();
|
|
35
23
|
return /*#__PURE__*/_react["default"].createElement(_Chip["default"], (0, _extends2["default"])({
|
|
36
|
-
classes: square ? classes : undefined,
|
|
37
24
|
style: _objectSpread({
|
|
38
25
|
padding: padding,
|
|
39
26
|
margin: margin
|
|
40
|
-
}, style)
|
|
27
|
+
}, style),
|
|
28
|
+
sx: {
|
|
29
|
+
borderRadius: square ? '4px' : '16px',
|
|
30
|
+
'.MuiChip-avatar': {
|
|
31
|
+
borderRadius: square ? '4px' : '16px'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
41
34
|
}, otherProps));
|
|
42
35
|
};
|
|
43
36
|
var _default = exports["default"] = Chip;
|
|
@@ -121,7 +121,7 @@ var DataTableField = exports.DataTableField = function DataTableField(props) {
|
|
|
121
121
|
};
|
|
122
122
|
return /*#__PURE__*/_react["default"].createElement(_Table["default"], {
|
|
123
123
|
"data-testid": "data-table-field"
|
|
124
|
-
}, /*#__PURE__*/_react["default"].createElement(_TableHead["default"], null, checkbox && /*#__PURE__*/_react["default"].createElement(_TableCell["default"], {
|
|
124
|
+
}, /*#__PURE__*/_react["default"].createElement(_TableHead["default"], null, /*#__PURE__*/_react["default"].createElement(_styles.RowTable, null, checkbox && /*#__PURE__*/_react["default"].createElement(_TableCell["default"], {
|
|
125
125
|
padding: "checkbox"
|
|
126
126
|
}, /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
|
|
127
127
|
color: "primary",
|
|
@@ -136,6 +136,6 @@ var DataTableField = exports.DataTableField = function DataTableField(props) {
|
|
|
136
136
|
key: i,
|
|
137
137
|
align: "center"
|
|
138
138
|
}, item.title);
|
|
139
|
-
})), /*#__PURE__*/_react["default"].createElement(_TableBody["default"], null, tableBody(rows, header)));
|
|
139
|
+
}))), /*#__PURE__*/_react["default"].createElement(_TableBody["default"], null, tableBody(rows, header)));
|
|
140
140
|
};
|
|
141
141
|
var _default = exports["default"] = DataTableField;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Meta } from '@storybook/react';
|
|
3
3
|
import { DataTableQueryPaginated } from './data-table-query-paginated';
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
4
|
+
declare const meta: Meta<typeof DataTableQueryPaginated>;
|
|
5
|
+
export default meta;
|
|
6
6
|
export declare const Default: () => React.JSX.Element;
|
|
7
7
|
export declare const Empty: () => React.JSX.Element;
|
|
8
8
|
export declare const NoHeader: () => React.JSX.Element;
|
|
@@ -274,11 +274,13 @@ var DataTable = exports.DataTable = function DataTable(props) {
|
|
|
274
274
|
rowsPerPage: rowsPerPage,
|
|
275
275
|
labelRowsPerPage: hideSelect ? '' : pagination.labelRowsPerPage,
|
|
276
276
|
labelDisplayedRows: pagination.labelDisplayedRows,
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
277
|
+
slotProps: {
|
|
278
|
+
select: {
|
|
279
|
+
style: hideSelect ? {
|
|
280
|
+
display: 'none'
|
|
281
|
+
} : {}
|
|
280
282
|
}
|
|
281
|
-
}
|
|
283
|
+
},
|
|
282
284
|
ActionsComponent: paginationActionsComponent,
|
|
283
285
|
onPageChange: function onPageChange(_, page) {
|
|
284
286
|
setPage(page);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Meta } from '@storybook/react';
|
|
3
3
|
import { default as DataTable } from './data-table';
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
4
|
+
declare const meta: Meta<typeof DataTable>;
|
|
5
|
+
export default meta;
|
|
6
6
|
export declare const Default: () => React.JSX.Element;
|
|
7
7
|
export declare const Custom: () => React.JSX.Element;
|
|
8
8
|
export declare const Empty: () => React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react';
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import Fab from '.';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
5
|
-
|
|
3
|
+
declare const meta: Meta<typeof Fab>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Fab>;
|
|
6
|
+
export declare const fab: Story;
|
|
@@ -4,7 +4,7 @@ import type { DefaultProps } from '../../types';
|
|
|
4
4
|
import type { FabProps } from '@mui/material/Fab';
|
|
5
5
|
export interface IFabProps extends DefaultProps, FabProps {
|
|
6
6
|
onClick?: (event?: MouseEvent<HTMLElement>) => void;
|
|
7
|
-
children: ReactElement<Record<string, unknown
|
|
7
|
+
children: ReactElement<Record<string, unknown>> | string;
|
|
8
8
|
}
|
|
9
9
|
declare const Fab: ({ children, margin, padding, style, ...otherProps }: IFabProps) => React.JSX.Element;
|
|
10
10
|
export default Fab;
|
|
@@ -8,21 +8,13 @@ exports["default"] = void 0;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
var _makeStyles2 = _interopRequireDefault(require("@mui/styles/makeStyles"));
|
|
12
11
|
var _react = _interopRequireDefault(require("react"));
|
|
13
12
|
var _Fab = _interopRequireDefault(require("@mui/material/Fab"));
|
|
13
|
+
var _theme = require("../../../theme");
|
|
14
14
|
var _excluded = ["children", "margin", "padding", "style"];
|
|
15
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
|
-
var
|
|
18
|
-
return {
|
|
19
|
-
root: {
|
|
20
|
-
'&:hover': {
|
|
21
|
-
backgroundColor: '#d5d5d5'
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
});
|
|
17
|
+
var gray = _theme.theme.colors.gray;
|
|
26
18
|
var Fab = function Fab(_ref) {
|
|
27
19
|
var children = _ref.children,
|
|
28
20
|
margin = _ref.margin,
|
|
@@ -30,14 +22,17 @@ var Fab = function Fab(_ref) {
|
|
|
30
22
|
_ref$style = _ref.style,
|
|
31
23
|
style = _ref$style === void 0 ? {} : _ref$style,
|
|
32
24
|
otherProps = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
33
|
-
var classes = useStyles();
|
|
34
25
|
return /*#__PURE__*/_react["default"].createElement(_Fab["default"], (0, _extends2["default"])({}, otherProps, {
|
|
35
26
|
color: "inherit",
|
|
36
|
-
classes: classes,
|
|
37
27
|
style: _objectSpread({
|
|
38
28
|
margin: margin,
|
|
39
29
|
padding: padding
|
|
40
|
-
}, style)
|
|
30
|
+
}, style),
|
|
31
|
+
sx: {
|
|
32
|
+
'&:hover': {
|
|
33
|
+
backgroundColor: "".concat(gray[500], "80")
|
|
34
|
+
}
|
|
35
|
+
}
|
|
41
36
|
}), children);
|
|
42
37
|
};
|
|
43
38
|
var _default = exports["default"] = Fab;
|
|
@@ -5,5 +5,5 @@ export interface ListProps extends DefaultProps {
|
|
|
5
5
|
dense?: boolean;
|
|
6
6
|
color?: 'default' | 'inherit';
|
|
7
7
|
}
|
|
8
|
-
declare const List: ({ title, padding, margin, style,
|
|
8
|
+
declare const List: ({ title, padding, margin, style, children, ...otherProps }: ListProps) => React.JSX.Element;
|
|
9
9
|
export default List;
|
|
@@ -8,48 +8,35 @@ exports["default"] = void 0;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
var _createStyles2 = _interopRequireDefault(require("@mui/styles/createStyles"));
|
|
12
|
-
var _makeStyles2 = _interopRequireDefault(require("@mui/styles/makeStyles"));
|
|
13
11
|
var _react = _interopRequireDefault(require("react"));
|
|
14
12
|
var _List = _interopRequireDefault(require("@mui/material/List"));
|
|
15
13
|
var _ListSubheader = _interopRequireDefault(require("@mui/material/ListSubheader"));
|
|
16
14
|
var _theme = require("../../../theme");
|
|
17
|
-
var _excluded = ["title", "padding", "margin", "style", "
|
|
15
|
+
var _excluded = ["title", "padding", "margin", "style", "children"];
|
|
18
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
17
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
18
|
var neutral = _theme.theme.colors.neutral;
|
|
21
|
-
var useStyles = (0, _makeStyles2["default"])(function () {
|
|
22
|
-
return (0, _createStyles2["default"])({
|
|
23
|
-
"default": {
|
|
24
|
-
backgroundColor: neutral[100]
|
|
25
|
-
},
|
|
26
|
-
inherit: {
|
|
27
|
-
backgroundColor: 'inherit',
|
|
28
|
-
color: 'inherit'
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
19
|
var List = function List(_ref) {
|
|
33
20
|
var title = _ref.title,
|
|
34
21
|
padding = _ref.padding,
|
|
35
22
|
margin = _ref.margin,
|
|
36
23
|
_ref$style = _ref.style,
|
|
37
24
|
style = _ref$style === void 0 ? {} : _ref$style,
|
|
38
|
-
_ref$color = _ref.color,
|
|
39
|
-
color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
40
|
-
className = _ref.className,
|
|
41
25
|
children = _ref.children,
|
|
42
26
|
otherProps = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
43
|
-
var classes = useStyles();
|
|
44
27
|
return /*#__PURE__*/_react["default"].createElement(_List["default"], (0, _extends2["default"])({
|
|
45
28
|
subheader: title && /*#__PURE__*/_react["default"].createElement(_ListSubheader["default"], {
|
|
46
|
-
|
|
29
|
+
sx: {
|
|
30
|
+
backgroundColor: neutral[100]
|
|
31
|
+
}
|
|
47
32
|
}, title),
|
|
48
|
-
className: "".concat(classes[color], " ").concat(className),
|
|
49
33
|
style: _objectSpread({
|
|
50
34
|
padding: padding,
|
|
51
35
|
margin: margin
|
|
52
|
-
}, style)
|
|
36
|
+
}, style),
|
|
37
|
+
sx: {
|
|
38
|
+
backgroundColor: neutral[100]
|
|
39
|
+
}
|
|
53
40
|
}, otherProps), children);
|
|
54
41
|
};
|
|
55
42
|
var _default = exports["default"] = List;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react';
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import List from '.';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const WithAvatar: any;
|
|
3
|
+
declare const meta: Meta<typeof List>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof List>;
|
|
6
|
+
export declare const list: Story;
|
|
@@ -6,65 +6,57 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _makeStyles2 = _interopRequireDefault(require("@mui/styles/makeStyles"));
|
|
10
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _ListItem = _interopRequireDefault(require("@mui/material/ListItem"));
|
|
11
11
|
var _ListItemAvatar = _interopRequireDefault(require("@mui/material/ListItemAvatar"));
|
|
12
12
|
var _ListItemButton = _interopRequireDefault(require("@mui/material/ListItemButton"));
|
|
13
13
|
var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
|
|
14
|
-
var _ListItemSecondaryAction = _interopRequireDefault(require("@mui/material/ListItemSecondaryAction"));
|
|
15
14
|
var _ListItemText = _interopRequireDefault(require("@mui/material/ListItemText"));
|
|
16
15
|
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
17
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
17
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
|
-
var useStyles = (0, _makeStyles2["default"])(function () {
|
|
20
|
-
return {
|
|
21
|
-
root: {
|
|
22
|
-
color: 'inherit',
|
|
23
|
-
minHeight: '48px'
|
|
24
|
-
},
|
|
25
|
-
"default": {
|
|
26
|
-
color: 'inherit'
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
});
|
|
30
18
|
var ListItem = function ListItem(props) {
|
|
31
19
|
var padding = props.padding,
|
|
32
20
|
margin = props.margin,
|
|
33
21
|
style = props.style;
|
|
34
|
-
var classes = useStyles();
|
|
35
|
-
var className = props.className;
|
|
36
22
|
var renderCustomItem = function renderCustomItem() {
|
|
37
23
|
var minWidth = props.title || props.subtitle ? '42px' : '0px';
|
|
38
|
-
var className = classes["default"];
|
|
39
|
-
var typographyProps = {
|
|
40
|
-
className: className
|
|
41
|
-
};
|
|
42
24
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, props.avatar && /*#__PURE__*/_react["default"].createElement(_ListItemAvatar["default"], null, props.avatar), props.icon && /*#__PURE__*/_react["default"].createElement(_ListItemIcon["default"], {
|
|
43
|
-
className: className,
|
|
44
25
|
style: {
|
|
45
26
|
minWidth: minWidth
|
|
27
|
+
},
|
|
28
|
+
sx: {
|
|
29
|
+
color: 'inherit'
|
|
46
30
|
}
|
|
47
31
|
}, props.icon), (props.title || props.subtitle) && /*#__PURE__*/_react["default"].createElement(_ListItemText["default"], {
|
|
48
32
|
primary: props.title,
|
|
49
33
|
secondary: props.subtitle,
|
|
50
|
-
primaryTypographyProps:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
34
|
+
primaryTypographyProps: {
|
|
35
|
+
color: 'inherit'
|
|
36
|
+
},
|
|
37
|
+
secondaryTypographyProps: {
|
|
38
|
+
color: 'inherit'
|
|
39
|
+
},
|
|
40
|
+
"data-testid": "list-item-".concat(props.subtitle)
|
|
41
|
+
}), props.action && /*#__PURE__*/_react["default"].createElement(_ListItem["default"], {
|
|
42
|
+
secondaryAction: props.action,
|
|
43
|
+
sx: {
|
|
44
|
+
width: 'auto',
|
|
45
|
+
color: 'inherit',
|
|
46
|
+
position: 'initial',
|
|
47
|
+
paddingRight: '26px'
|
|
48
|
+
}
|
|
49
|
+
}));
|
|
59
50
|
};
|
|
60
51
|
return props.children ? /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
61
52
|
id: props.id,
|
|
62
53
|
value: props.value,
|
|
63
|
-
className: className,
|
|
64
54
|
selected: props.selected,
|
|
65
55
|
disabled: props.disabled,
|
|
66
|
-
|
|
67
|
-
|
|
56
|
+
className: props.className,
|
|
57
|
+
sx: {
|
|
58
|
+
color: 'inherit',
|
|
59
|
+
minHeight: '48px'
|
|
68
60
|
},
|
|
69
61
|
style: _objectSpread({
|
|
70
62
|
padding: padding,
|
|
@@ -73,11 +65,12 @@ var ListItem = function ListItem(props) {
|
|
|
73
65
|
onClick: props.onClick
|
|
74
66
|
}, props.children) : /*#__PURE__*/_react["default"].createElement(_ListItemButton["default"], {
|
|
75
67
|
id: props.id,
|
|
76
|
-
className: className,
|
|
77
68
|
selected: props.selected,
|
|
78
69
|
disabled: props.disabled,
|
|
79
|
-
|
|
80
|
-
|
|
70
|
+
className: props.className,
|
|
71
|
+
sx: {
|
|
72
|
+
color: 'inherit',
|
|
73
|
+
minHeight: '48px'
|
|
81
74
|
},
|
|
82
75
|
style: _objectSpread({
|
|
83
76
|
padding: padding,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react';
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import Table from '.';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
5
|
-
|
|
3
|
+
declare const meta: Meta<typeof Table>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Table>;
|
|
6
|
+
export declare const table: Story;
|
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react';
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import Typography from '.';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const Primary: any;
|
|
8
|
-
export declare const Secondary: any;
|
|
9
|
-
export declare const TextPrimary: any;
|
|
10
|
-
export declare const TextSecondary: any;
|
|
11
|
-
export declare const Button: any;
|
|
12
|
-
export declare const Caption: any;
|
|
13
|
-
export declare const Body1: any;
|
|
14
|
-
export declare const Body2: any;
|
|
15
|
-
export declare const Subtitle1: any;
|
|
16
|
-
export declare const Subtitle2: any;
|
|
17
|
-
export declare const h1: any;
|
|
18
|
-
export declare const h2: any;
|
|
19
|
-
export declare const h3: any;
|
|
20
|
-
export declare const h4: any;
|
|
21
|
-
export declare const h5: any;
|
|
22
|
-
export declare const h6: any;
|
|
3
|
+
declare const meta: Meta<typeof Typography>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Typography>;
|
|
6
|
+
export declare const typography: Story;
|
|
@@ -8,7 +8,6 @@ exports["default"] = void 0;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
var _makeStyles2 = _interopRequireDefault(require("@mui/styles/makeStyles"));
|
|
12
11
|
var _react = _interopRequireDefault(require("react"));
|
|
13
12
|
var _Dialog = _interopRequireDefault(require("@mui/material/Dialog"));
|
|
14
13
|
var _DialogActions = _interopRequireDefault(require("@mui/material/DialogActions"));
|
|
@@ -19,11 +18,6 @@ var _styles = require("./styles");
|
|
|
19
18
|
var _excluded = ["snippet", "style", "padding", "margin", "scroll", "PaperProps", "open", "fullScreen", "fullWidth", "maxWidth", "onClose", "titleAction", "titleWrapperStyle", "titleStyle", "titleActionStyle", "contentStyle", "contentTextStyle", "actionsStyle", "actions", "content", "text", "title", "snippetStyle", "snippetContentStyle", "aria-title"];
|
|
20
19
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
20
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
|
-
var useStyles = (0, _makeStyles2["default"])({
|
|
23
|
-
root: {
|
|
24
|
-
overflowY: 'unset'
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
21
|
var Dialog = function Dialog(_ref) {
|
|
28
22
|
var snippet = _ref.snippet,
|
|
29
23
|
style = _ref.style,
|
|
@@ -51,7 +45,6 @@ var Dialog = function Dialog(_ref) {
|
|
|
51
45
|
snippetContentStyle = _ref.snippetContentStyle,
|
|
52
46
|
ariaTitle = _ref['aria-title'],
|
|
53
47
|
otherProps = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
54
|
-
var classes = useStyles();
|
|
55
48
|
var renderTitle = function renderTitle(title) {
|
|
56
49
|
return titleAction ? /*#__PURE__*/_react["default"].createElement(_styles.TitleWrapper, {
|
|
57
50
|
style: titleWrapperStyle
|
|
@@ -103,13 +96,13 @@ var Dialog = function Dialog(_ref) {
|
|
|
103
96
|
padding: padding,
|
|
104
97
|
margin: margin
|
|
105
98
|
}, style),
|
|
106
|
-
PaperProps: _objectSpread(_objectSpread({
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
classes: {
|
|
110
|
-
root: classes.root
|
|
99
|
+
PaperProps: _objectSpread(_objectSpread({
|
|
100
|
+
sx: {
|
|
101
|
+
overflowY: 'unset'
|
|
111
102
|
}
|
|
112
|
-
},
|
|
103
|
+
}, ariaTitle ? {
|
|
104
|
+
title: ariaTitle
|
|
105
|
+
} : {}), PaperProps),
|
|
113
106
|
onClose: onClose
|
|
114
107
|
}), snippet ? renderSnippet() : renderPaperContent());
|
|
115
108
|
};
|
|
@@ -2,15 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import type { DefaultProps } from '../../types';
|
|
3
3
|
export interface ILinear {
|
|
4
4
|
color?: 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 'inherit';
|
|
5
|
-
classes?: {
|
|
6
|
-
root?: string;
|
|
7
|
-
colorPrimary?: string;
|
|
8
|
-
barColorPrimary?: string;
|
|
9
|
-
barColorSecondary?: string;
|
|
10
|
-
};
|
|
11
5
|
variant?: 'buffer' | 'determinate' | 'indeterminate' | 'query';
|
|
12
6
|
valueBuffer?: number;
|
|
13
|
-
rootColor?: string;
|
|
14
7
|
primaryColor?: string;
|
|
15
8
|
barPrimaryColor?: string;
|
|
16
9
|
barSecondaryColor?: string;
|
|
@@ -25,10 +18,9 @@ export interface ProgressProps extends DefaultProps {
|
|
|
25
18
|
linear?: boolean;
|
|
26
19
|
}
|
|
27
20
|
export interface IColors {
|
|
28
|
-
rootColor?: string;
|
|
29
21
|
primaryColor?: string;
|
|
30
22
|
barPrimaryColor?: string;
|
|
31
23
|
barSecondaryColor?: string;
|
|
32
24
|
}
|
|
33
|
-
declare const Progress: ({ linear, style, margin, padding,
|
|
25
|
+
declare const Progress: ({ linear, style, margin, padding, primaryColor, barPrimaryColor, barSecondaryColor, ...otherProps }: ProgressProps & ICircular & ILinear) => React.JSX.Element;
|
|
34
26
|
export default Progress;
|
|
@@ -8,64 +8,35 @@ exports["default"] = void 0;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
var _makeStyles2 = _interopRequireDefault(require("@mui/styles/makeStyles"));
|
|
12
11
|
var _react = _interopRequireDefault(require("react"));
|
|
13
12
|
var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
|
|
14
13
|
var _LinearProgress = _interopRequireDefault(require("@mui/material/LinearProgress"));
|
|
15
|
-
var _excluded = ["linear", "style", "margin", "padding", "
|
|
14
|
+
var _excluded = ["linear", "style", "margin", "padding", "primaryColor", "barPrimaryColor", "barSecondaryColor"];
|
|
16
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
-
var useStyles = (0, _makeStyles2["default"])(function () {
|
|
19
|
-
return {
|
|
20
|
-
root: function root(props) {
|
|
21
|
-
return {
|
|
22
|
-
backgroundColor: props.rootColor
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
colorPrimary: function colorPrimary(props) {
|
|
26
|
-
return {
|
|
27
|
-
backgroundColor: props.primaryColor
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
barColorPrimary: function barColorPrimary(props) {
|
|
31
|
-
return {
|
|
32
|
-
backgroundColor: props.barPrimaryColor
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
barColorSecondary: function barColorSecondary(props) {
|
|
36
|
-
return {
|
|
37
|
-
backgroundColor: props.barSecondaryColor
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
17
|
var Progress = function Progress(_ref) {
|
|
43
18
|
var linear = _ref.linear,
|
|
44
19
|
_ref$style = _ref.style,
|
|
45
20
|
style = _ref$style === void 0 ? {} : _ref$style,
|
|
46
21
|
margin = _ref.margin,
|
|
47
22
|
padding = _ref.padding,
|
|
48
|
-
rootColor = _ref.rootColor,
|
|
49
23
|
primaryColor = _ref.primaryColor,
|
|
50
24
|
barPrimaryColor = _ref.barPrimaryColor,
|
|
51
25
|
barSecondaryColor = _ref.barSecondaryColor,
|
|
52
26
|
otherProps = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
53
|
-
var classes = useStyles({
|
|
54
|
-
rootColor: rootColor,
|
|
55
|
-
primaryColor: primaryColor,
|
|
56
|
-
barPrimaryColor: barPrimaryColor,
|
|
57
|
-
barSecondaryColor: barSecondaryColor
|
|
58
|
-
});
|
|
59
27
|
return linear ? /*#__PURE__*/_react["default"].createElement(_LinearProgress["default"], (0, _extends2["default"])({
|
|
60
28
|
style: _objectSpread({
|
|
61
29
|
margin: margin,
|
|
62
30
|
padding: padding
|
|
63
31
|
}, style),
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
32
|
+
sx: {
|
|
33
|
+
backgroundColor: primaryColor,
|
|
34
|
+
'.MuiLinearProgress-barColorPrimary': {
|
|
35
|
+
backgroundColor: barPrimaryColor
|
|
36
|
+
},
|
|
37
|
+
'.MuiLinearProgress-barColorSecondary': {
|
|
38
|
+
backgroundColor: barSecondaryColor
|
|
39
|
+
}
|
|
69
40
|
}
|
|
70
41
|
}, otherProps)) : /*#__PURE__*/_react["default"].createElement(_CircularProgress["default"], (0, _extends2["default"])({
|
|
71
42
|
style: _objectSpread({
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react';
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import Progress from '.';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const Inherit: any;
|
|
9
|
-
export declare const Linear: any;
|
|
10
|
-
export declare const LinearSecondary: any;
|
|
11
|
-
export declare const LinearBuffer: any;
|
|
12
|
-
export declare const LinearQuery: any;
|
|
13
|
-
export declare const LinearQuerySecondary: any;
|
|
14
|
-
export declare const LinearWithCustom: any;
|
|
3
|
+
declare const meta: Meta<typeof Progress>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Progress>;
|
|
6
|
+
export declare const progress: Story;
|
|
7
|
+
export declare const progressCustom: Story;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react';
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import Skeleton from '.';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const Circle: any;
|
|
3
|
+
declare const meta: Meta<typeof Skeleton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Skeleton>;
|
|
6
|
+
export declare const skeleton: Story;
|