@mirai/ui 1.0.170 → 1.0.172
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/build/components/Action/Action.js +3 -2
- package/build/components/Action/Action.js.map +1 -1
- package/build/components/Action/Action.stories.js +6 -8
- package/build/components/Action/Action.stories.js.map +1 -1
- package/build/components/Action/__tests__/__snapshots__/Action.test.js.snap +1 -1
- package/build/components/Button/Button.js +3 -2
- package/build/components/Button/Button.js.map +1 -1
- package/build/components/Button/Button.stories.js +8 -6
- package/build/components/Button/Button.stories.js.map +1 -1
- package/build/components/Button/__tests__/__snapshots__/Button.test.js.snap +1 -1
- package/build/components/Calendar/Calendar.Month.js +3 -3
- package/build/components/Calendar/Calendar.Month.js.map +1 -1
- package/build/components/Calendar/Calendar.Week.js +1 -1
- package/build/components/Calendar/Calendar.Week.js.map +1 -1
- package/build/components/Calendar/Calendar.js +4 -3
- package/build/components/Calendar/Calendar.js.map +1 -1
- package/build/components/Calendar/Calendar.stories.js +7 -4
- package/build/components/Calendar/Calendar.stories.js.map +1 -1
- package/build/components/Calendar/__tests__/__snapshots__/Calendar.test.jsx.snap +1 -1
- package/build/components/Form/Form.js +4 -1
- package/build/components/Form/Form.js.map +1 -1
- package/build/components/Form/Form.stories.js +6 -4
- package/build/components/Form/Form.stories.js.map +1 -1
- package/build/components/Form/__tests__/__snapshots__/Form.test.jsx.snap +1 -1
- package/build/components/InputDate/InputDate.js +1 -0
- package/build/components/InputDate/InputDate.js.map +1 -1
- package/build/components/InputDate/InputDate.stories.js +6 -7
- package/build/components/InputDate/InputDate.stories.js.map +1 -1
- package/build/components/InputDate/__tests__/__snapshots__/InputDate.test.js.snap +1 -1
- package/build/components/InputNumber/InputNumber.js +1 -0
- package/build/components/InputNumber/InputNumber.js.map +1 -1
- package/build/components/InputNumber/InputNumber.stories.js +6 -7
- package/build/components/InputNumber/InputNumber.stories.js.map +1 -1
- package/build/components/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +1 -1
- package/build/components/InputOption/InputOption.js +1 -0
- package/build/components/InputOption/InputOption.js.map +1 -1
- package/build/components/InputOption/InputOption.stories.js +6 -7
- package/build/components/InputOption/InputOption.stories.js.map +1 -1
- package/build/components/InputOption/__tests__/__snapshots__/InputOption.test.js.snap +1 -1
- package/build/components/InputPhone/InputPhone.js +4 -3
- package/build/components/InputPhone/InputPhone.js.map +1 -1
- package/build/components/InputPhone/InputPhone.stories.js +6 -7
- package/build/components/InputPhone/InputPhone.stories.js.map +1 -1
- package/build/components/InputPhone/__tests__/__snapshots__/InputPhone.test.js.snap +2 -2
- package/build/components/InputSelect/InputSelect.js +1 -0
- package/build/components/InputSelect/InputSelect.js.map +1 -1
- package/build/components/InputSelect/InputSelect.stories.js +6 -7
- package/build/components/InputSelect/InputSelect.stories.js.map +1 -1
- package/build/components/InputSelect/__tests__/__snapshots__/InputSelect.test.js.snap +1 -1
- package/build/components/InputText/InputText.js +1 -0
- package/build/components/InputText/InputText.js.map +1 -1
- package/build/components/InputText/InputText.stories.js +6 -7
- package/build/components/InputText/InputText.stories.js.map +1 -1
- package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +1 -1
- package/build/components/Menu/Menu.js +4 -3
- package/build/components/Menu/Menu.js.map +1 -1
- package/build/components/Menu/Menu.stories.js +10 -10
- package/build/components/Menu/Menu.stories.js.map +1 -1
- package/build/components/Menu/__tests__/__snapshots__/Menu.test.jsx.snap +1 -1
- package/build/components/Modal/Modal.js +7 -5
- package/build/components/Modal/Modal.js.map +1 -1
- package/build/components/Modal/Modal.stories.js +6 -7
- package/build/components/Modal/Modal.stories.js.map +1 -1
- package/build/components/Modal/__tests__/__snapshots__/Modal.test.js.snap +1 -1
- package/build/components/Notification/Notification.js +2 -1
- package/build/components/Notification/Notification.js.map +1 -1
- package/build/components/Notification/Notification.stories.js +6 -8
- package/build/components/Notification/Notification.stories.js.map +1 -1
- package/build/components/Notification/__tests__/__snapshots__/Notification.test.js.snap +1 -1
- package/build/components/Progress/Progress.js +1 -0
- package/build/components/Progress/Progress.js.map +1 -1
- package/build/components/Progress/Progress.stories.js +6 -8
- package/build/components/Progress/Progress.stories.js.map +1 -1
- package/build/components/Progress/__tests__/__snapshots__/Progress.test.jsx.snap +1 -1
- package/build/components/Table/Table.Filter.js +8 -3
- package/build/components/Table/Table.Filter.js.map +1 -1
- package/build/components/Table/Table.Row.js +15 -14
- package/build/components/Table/Table.Row.js.map +1 -1
- package/build/components/Table/Table.js +15 -6
- package/build/components/Table/Table.js.map +1 -1
- package/build/components/Table/Table.stories.js +11 -8
- package/build/components/Table/Table.stories.js.map +1 -1
- package/build/components/Table/__tests__/__snapshots__/Table.test.js.snap +39 -202
- package/build/components/Tooltip/Tooltip.js +5 -4
- package/build/components/Tooltip/Tooltip.js.map +1 -1
- package/build/components/Tooltip/Tooltip.stories.js +6 -8
- package/build/components/Tooltip/Tooltip.stories.js.map +1 -1
- package/build/components/Tooltip/__tests__/__snapshots__/Tooltip.test.jsx.snap +1 -1
- package/build/helpers/styles.js +2 -1
- package/build/helpers/styles.js.map +1 -1
- package/build/primitives/Checkbox/Checkbox.js +8 -5
- package/build/primitives/Checkbox/Checkbox.js.map +1 -1
- package/build/primitives/Checkbox/Checkbox.stories.js +6 -7
- package/build/primitives/Checkbox/Checkbox.stories.js.map +1 -1
- package/build/primitives/Checkbox/__tests__/__snapshots__/Checkbox.test.js.snap +1 -1
- package/build/primitives/Icon/Icon.js +4 -1
- package/build/primitives/Icon/Icon.js.map +1 -1
- package/build/primitives/Icon/Icon.stories.js +6 -8
- package/build/primitives/Icon/Icon.stories.js.map +1 -1
- package/build/primitives/Icon/__tests__/__snapshots__/Icon.test.js.snap +1 -1
- package/build/primitives/Input/Input.js +8 -4
- package/build/primitives/Input/Input.js.map +1 -1
- package/build/primitives/Input/Input.stories.js +6 -7
- package/build/primitives/Input/Input.stories.js.map +1 -1
- package/build/primitives/Input/__tests__/__snapshots__/Input.test.js.snap +1 -1
- package/build/primitives/Layer/Layer.js +8 -4
- package/build/primitives/Layer/Layer.js.map +1 -1
- package/build/primitives/Layer/Layer.stories.js +6 -8
- package/build/primitives/Layer/Layer.stories.js.map +1 -1
- package/build/primitives/Layer/__tests__/__snapshots__/Layer.test.js.snap +1 -1
- package/build/primitives/Pressable/Pressable.js +7 -3
- package/build/primitives/Pressable/Pressable.js.map +1 -1
- package/build/primitives/Pressable/Pressable.stories.js +6 -8
- package/build/primitives/Pressable/Pressable.stories.js.map +1 -1
- package/build/primitives/Pressable/__tests__/__snapshots__/Pressable.test.js.snap +1 -1
- package/build/primitives/Primitive/Primitive.constants.js +14 -0
- package/build/primitives/Primitive/Primitive.constants.js.map +1 -0
- package/build/primitives/Primitive/Primitive.js +37 -0
- package/build/primitives/Primitive/Primitive.js.map +1 -0
- package/build/primitives/Primitive/Primitive.stories.js +31 -0
- package/build/primitives/Primitive/Primitive.stories.js.map +1 -0
- package/build/primitives/Primitive/__tests__/__snapshots__/Primitive.test.js.snap +45 -0
- package/build/primitives/Primitive/helpers/getProps.js +31 -0
- package/build/primitives/Primitive/helpers/getProps.js.map +1 -0
- package/build/primitives/Primitive/helpers/index.js +17 -0
- package/build/primitives/Primitive/helpers/index.js.map +1 -0
- package/build/primitives/Primitive/index.js +17 -0
- package/build/primitives/Primitive/index.js.map +1 -0
- package/build/primitives/Radio/Radio.js +8 -4
- package/build/primitives/Radio/Radio.js.map +1 -1
- package/build/primitives/Radio/Radio.stories.js +6 -7
- package/build/primitives/Radio/Radio.stories.js.map +1 -1
- package/build/primitives/Radio/__tests__/__snapshots__/Radio.test.js.snap +1 -1
- package/build/primitives/ScrollView/ScrollView.js +6 -3
- package/build/primitives/ScrollView/ScrollView.js.map +1 -1
- package/build/primitives/ScrollView/ScrollView.stories.js +6 -4
- package/build/primitives/ScrollView/ScrollView.stories.js.map +1 -1
- package/build/primitives/ScrollView/__tests__/__snapshots__/ScrollView.test.js.snap +1 -1
- package/build/primitives/Select/Select.js +11 -5
- package/build/primitives/Select/Select.js.map +1 -1
- package/build/primitives/Select/Select.stories.js +6 -7
- package/build/primitives/Select/Select.stories.js.map +1 -1
- package/build/primitives/Select/__tests__/__snapshots__/Select.test.js.snap +1 -1
- package/build/primitives/Switch/Switch.js +10 -6
- package/build/primitives/Switch/Switch.js.map +1 -1
- package/build/primitives/Switch/Switch.stories.js +6 -7
- package/build/primitives/Switch/Switch.stories.js.map +1 -1
- package/build/primitives/Switch/__tests__/__snapshots__/Switch.test.js.snap +1 -1
- package/build/primitives/Text/Text.js +4 -1
- package/build/primitives/Text/Text.js.map +1 -1
- package/build/primitives/Text/Text.stories.js +6 -8
- package/build/primitives/Text/Text.stories.js.map +1 -1
- package/build/primitives/Text/__tests__/__snapshots__/Text.test.js.snap +1 -1
- package/build/primitives/View/View.js +6 -3
- package/build/primitives/View/View.js.map +1 -1
- package/build/primitives/View/View.stories.js +6 -8
- package/build/primitives/View/View.stories.js.map +1 -1
- package/build/primitives/View/__tests__/__snapshots__/View.test.js.snap +1 -1
- package/build/primitives/index.js +11 -0
- package/build/primitives/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,12 +8,8 @@ exports.default = exports.Story = void 0;
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _ = require("../../");
|
|
10
10
|
var _Modal = require("./Modal");
|
|
11
|
-
var _Story$args;
|
|
12
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
16
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
17
13
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
18
14
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
19
15
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -92,12 +88,15 @@ var Story = function Story(props) {
|
|
|
92
88
|
};
|
|
93
89
|
exports.Story = Story;
|
|
94
90
|
Story.storyName = 'Modal';
|
|
95
|
-
Story.args =
|
|
91
|
+
Story.args = {
|
|
96
92
|
blur: false,
|
|
97
93
|
fit: false,
|
|
98
94
|
overflow: true,
|
|
99
95
|
portal: false,
|
|
100
|
-
title: 'title'
|
|
101
|
-
|
|
96
|
+
title: 'title',
|
|
97
|
+
// inherited properties
|
|
98
|
+
testId: 'test-story',
|
|
99
|
+
style: {}
|
|
100
|
+
};
|
|
102
101
|
Story.argTypes = {};
|
|
103
102
|
//# sourceMappingURL=Modal.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.stories.js","names":["title","Story","props","useState","visible","setVisible","visibleSecond","setVisibleSecond","handleBack","others","console","log","handleClose","handleOverflow","padding","storyName","args","blur","fit","overflow","portal","argTypes"],"sources":["../../../src/components/Modal/Modal.stories.jsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { Button, Text, View } from '../../';\nimport { Modal } from './Modal';\n\nexport default {\n title: 'Components',\n};\n\nexport const Story = (props) => {\n const [visible, setVisible] = useState(true);\n const [visibleSecond, setVisibleSecond] = useState(false);\n\n const handleBack = (...others) => {\n console.log('<Modal>::onBack', ...others);\n setVisibleSecond(false);\n };\n\n const handleClose = (...others) => {\n console.log('<Modal>::onClose', ...others);\n setVisible(false);\n };\n\n const handleOverflow = (...others) => {\n console.log('<Modal>::onOverflow', ...others);\n handleClose(others);\n };\n\n return (\n <>\n <Text bold headline>\n What is Lorem Ipsum?\n </Text>\n <Text>\n Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's\n standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make\n a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,\n remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing\n Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions\n of Lorem Ipsum.\n </Text>\n\n <Button onPress={() => setVisible(true)}>Show modal</Button>\n\n <Text bold headline>\n Where does it come from?\n </Text>\n <Text>\n Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin\n literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney\n College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and\n going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum\n comes from sections 1.10.32 and 1.10.33 of \"de Finibus Bonorum et Malorum\" (The Extremes of Good and Evil) by\n Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance.\n The first line of Lorem Ipsum, \"Lorem ipsum dolor sit amet..\", comes from a line in section 1.10.32.\n </Text>\n\n <Modal {...props} onClose={handleClose} onOverflow={handleOverflow} visible={visible}>\n <View style={{ padding: 'var(--mirai-ui-space-L)' }}>\n <Text>\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi nemo adipisci consequatur et tenetur natus\n dolore, facere facilis placeat nostrum unde cumque. Voluptas enim rerum voluptatum, deserunt fugiat\n aspernatur excepturi.\n </Text>\n <Button onPress={() => setVisibleSecond(true)}>Show another Modal</Button>\n </View>\n </Modal>\n\n <Modal {...props} onBack={handleBack} onOverflow={handleOverflow} visible={visibleSecond}>\n <View style={{ padding: 'var(--mirai-ui-space-L)' }}>\n <Text>\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi nemo adipisci consequatur et tenetur natus\n dolore, facere facilis placeat nostrum unde cumque. Voluptas enim rerum voluptatum, deserunt fugiat\n aspernatur excepturi.\n </Text>\n </View>\n </Modal>\n </>\n );\n};\nStory.storyName = 'Modal';\n\nStory.args = {\n blur: false,\n fit: false,\n overflow: true,\n portal: false,\n title: 'title',\n // inherited properties\n
|
|
1
|
+
{"version":3,"file":"Modal.stories.js","names":["title","Story","props","useState","visible","setVisible","visibleSecond","setVisibleSecond","handleBack","others","console","log","handleClose","handleOverflow","padding","storyName","args","blur","fit","overflow","portal","testId","style","argTypes"],"sources":["../../../src/components/Modal/Modal.stories.jsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { Button, Text, View } from '../../';\nimport { Modal } from './Modal';\n\nexport default {\n title: 'Components',\n};\n\nexport const Story = (props) => {\n const [visible, setVisible] = useState(true);\n const [visibleSecond, setVisibleSecond] = useState(false);\n\n const handleBack = (...others) => {\n console.log('<Modal>::onBack', ...others);\n setVisibleSecond(false);\n };\n\n const handleClose = (...others) => {\n console.log('<Modal>::onClose', ...others);\n setVisible(false);\n };\n\n const handleOverflow = (...others) => {\n console.log('<Modal>::onOverflow', ...others);\n handleClose(others);\n };\n\n return (\n <>\n <Text bold headline>\n What is Lorem Ipsum?\n </Text>\n <Text>\n Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's\n standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make\n a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,\n remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing\n Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions\n of Lorem Ipsum.\n </Text>\n\n <Button onPress={() => setVisible(true)}>Show modal</Button>\n\n <Text bold headline>\n Where does it come from?\n </Text>\n <Text>\n Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin\n literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney\n College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and\n going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum\n comes from sections 1.10.32 and 1.10.33 of \"de Finibus Bonorum et Malorum\" (The Extremes of Good and Evil) by\n Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance.\n The first line of Lorem Ipsum, \"Lorem ipsum dolor sit amet..\", comes from a line in section 1.10.32.\n </Text>\n\n <Modal {...props} onClose={handleClose} onOverflow={handleOverflow} visible={visible}>\n <View style={{ padding: 'var(--mirai-ui-space-L)' }}>\n <Text>\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi nemo adipisci consequatur et tenetur natus\n dolore, facere facilis placeat nostrum unde cumque. Voluptas enim rerum voluptatum, deserunt fugiat\n aspernatur excepturi.\n </Text>\n <Button onPress={() => setVisibleSecond(true)}>Show another Modal</Button>\n </View>\n </Modal>\n\n <Modal {...props} onBack={handleBack} onOverflow={handleOverflow} visible={visibleSecond}>\n <View style={{ padding: 'var(--mirai-ui-space-L)' }}>\n <Text>\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi nemo adipisci consequatur et tenetur natus\n dolore, facere facilis placeat nostrum unde cumque. Voluptas enim rerum voluptatum, deserunt fugiat\n aspernatur excepturi.\n </Text>\n </View>\n </Modal>\n </>\n );\n};\nStory.storyName = 'Modal';\n\nStory.args = {\n blur: false,\n fit: false,\n overflow: true,\n portal: false,\n title: 'title',\n // inherited properties\n testId: 'test-story',\n style: {},\n};\n\nStory.argTypes = {};\n"],"mappings":";;;;;;;AAAA;AAEA;AACA;AAAgC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAEjB;EACbA,KAAK,EAAE;AACT,CAAC;AAAA;AAEM,IAAMC,KAAK,GAAG,SAARA,KAAK,CAAIC,KAAK,EAAK;EAC9B,gBAA8B,IAAAC,eAAQ,EAAC,IAAI,CAAC;IAAA;IAArCC,OAAO;IAAEC,UAAU;EAC1B,iBAA0C,IAAAF,eAAQ,EAAC,KAAK,CAAC;IAAA;IAAlDG,aAAa;IAAEC,gBAAgB;EAEtC,IAAMC,UAAU,GAAG,SAAbA,UAAU,GAAkB;IAAA;IAAA,kCAAXC,MAAM;MAANA,MAAM;IAAA;IAC3B,YAAAC,OAAO,EAACC,GAAG,kBAAC,iBAAiB,SAAKF,MAAM,EAAC;IACzCF,gBAAgB,CAAC,KAAK,CAAC;EACzB,CAAC;EAED,IAAMK,WAAW,GAAG,SAAdA,WAAW,GAAkB;IAAA;IAAA,mCAAXH,MAAM;MAANA,MAAM;IAAA;IAC5B,aAAAC,OAAO,EAACC,GAAG,mBAAC,kBAAkB,SAAKF,MAAM,EAAC;IAC1CJ,UAAU,CAAC,KAAK,CAAC;EACnB,CAAC;EAED,IAAMQ,cAAc,GAAG,S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EACpBC,KAAK,EAAE,CAAC;AACV,CAAC;AAEDrB,KAAK,CAACsB,QAAQ,GAAG,CAAC,CAAC"}
|
|
@@ -29,6 +29,7 @@ var Notification = function Notification(_ref) {
|
|
|
29
29
|
others = _objectWithoutProperties(_ref, _excluded);
|
|
30
30
|
return /*#__PURE__*/_react.default.createElement(_primitives.View, _extends({}, others, {
|
|
31
31
|
row: true,
|
|
32
|
+
role: others.role || 'notification',
|
|
32
33
|
className: (0, _helpers.styles)(_NotificationModule.default.notification, error ? _NotificationModule.default.error : warning ? _NotificationModule.default.warning : success ? _NotificationModule.default.success : info ? _NotificationModule.default.info : undefined, inline ? _NotificationModule.default.inline : _NotificationModule.default.outlined, inline && _NotificationModule.default.inline, large ? _NotificationModule.default.large : small && _NotificationModule.default.small, wide && _NotificationModule.default.wide, others.className)
|
|
33
34
|
}), /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
|
|
34
35
|
headline: large,
|
|
@@ -46,7 +47,7 @@ var Notification = function Notification(_ref) {
|
|
|
46
47
|
}, children), !large && onClose && /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
|
|
47
48
|
onPress: onClose,
|
|
48
49
|
className: (0, _helpers.styles)(_NotificationModule.default.pressable, _NotificationModule.default.icon),
|
|
49
|
-
|
|
50
|
+
testId: others.testId ? "".concat(others.testId, "-button-close") : undefined
|
|
50
51
|
}, /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
|
|
51
52
|
value: _primitives.ICON.CLOSE,
|
|
52
53
|
paragraph: small
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.js","names":["Notification","children","error","info","inline","large","small","success","warning","wide","onClose","others","styles","style","notification","undefined","outlined","className","getIconState","icon","text","pressable","ICON","CLOSE","displayName","propTypes","PropTypes","any","isRequired","bool","func"],"sources":["../../../src/components/Notification/Notification.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { getIconState, styles } from '../../helpers';\nimport { Icon, ICON, Pressable, Text, View } from '../../primitives';\nimport style from './Notification.module.css';\n\nconst Notification = ({\n children,\n error,\n info,\n inline = false,\n large,\n small,\n success,\n warning,\n wide,\n onClose,\n ...others\n}) => (\n <View\n {...others}\n row\n className={styles(\n style.notification,\n error ? style.error : warning ? style.warning : success ? style.success : info ? style.info : undefined,\n inline ? style.inline : style.outlined,\n inline && style.inline,\n large ? style.large : small && style.small,\n wide && style.wide,\n others.className,\n )}\n >\n <Icon\n headline={large}\n level={large ? 1 : undefined}\n paragraph={small}\n value={getIconState({ error, success, warning })}\n className={style.icon}\n />\n <Text\n small={small}\n className={styles(\n style.text,\n error ? style.error : warning ? style.warning : success ? style.success : undefined,\n )}\n >\n {children}\n </Text>\n {!large && onClose && (\n <Pressable\n onPress={onClose}\n className={styles(style.pressable, style.icon)}\n
|
|
1
|
+
{"version":3,"file":"Notification.js","names":["Notification","children","error","info","inline","large","small","success","warning","wide","onClose","others","role","styles","style","notification","undefined","outlined","className","getIconState","icon","text","pressable","testId","ICON","CLOSE","displayName","propTypes","PropTypes","any","isRequired","bool","func"],"sources":["../../../src/components/Notification/Notification.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { getIconState, styles } from '../../helpers';\nimport { Icon, ICON, Pressable, Text, View } from '../../primitives';\nimport style from './Notification.module.css';\n\nconst Notification = ({\n children,\n error,\n info,\n inline = false,\n large,\n small,\n success,\n warning,\n wide,\n onClose,\n ...others\n}) => (\n <View\n {...others}\n row\n role={others.role || 'notification'}\n className={styles(\n style.notification,\n error ? style.error : warning ? style.warning : success ? style.success : info ? style.info : undefined,\n inline ? style.inline : style.outlined,\n inline && style.inline,\n large ? style.large : small && style.small,\n wide && style.wide,\n others.className,\n )}\n >\n <Icon\n headline={large}\n level={large ? 1 : undefined}\n paragraph={small}\n value={getIconState({ error, success, warning })}\n className={style.icon}\n />\n <Text\n small={small}\n className={styles(\n style.text,\n error ? style.error : warning ? style.warning : success ? style.success : undefined,\n )}\n >\n {children}\n </Text>\n {!large && onClose && (\n <Pressable\n onPress={onClose}\n className={styles(style.pressable, style.icon)}\n testId={others.testId ? `${others.testId}-button-close` : undefined}\n >\n <Icon value={ICON.CLOSE} paragraph={small} />\n </Pressable>\n )}\n </View>\n);\n\nNotification.displayName = 'Component:Notification';\n\nNotification.propTypes = {\n children: PropTypes.any.isRequired,\n error: PropTypes.bool,\n info: PropTypes.bool,\n inline: PropTypes.bool,\n large: PropTypes.bool,\n small: PropTypes.bool,\n success: PropTypes.bool,\n warning: PropTypes.bool,\n wide: PropTypes.bool,\n onClose: PropTypes.func,\n};\n\nexport { Notification };\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AACA;AAA8C;AAAA;AAAA;AAAA;AAAA;AAE9C,IAAMA,YAAY,GAAG,SAAfA,YAAY;EAAA,IAChBC,QAAQ,QAARA,QAAQ;IACRC,KAAK,QAALA,KAAK;IACLC,IAAI,QAAJA,IAAI;IAAA,mBACJC,MAAM;IAANA,MAAM,4BAAG,KAAK;IACdC,KAAK,QAALA,KAAK;IACLC,KAAK,QAALA,KAAK;IACLC,OAAO,QAAPA,OAAO;IACPC,OAAO,QAAPA,OAAO;IACPC,IAAI,QAAJA,IAAI;IACJC,OAAO,QAAPA,OAAO;IACJC,MAAM;EAAA,oBAET,6BAAC,gBAAI,eACCA,MAAM;IACV,GAAG;IACH,IAAI,EAAEA,MAAM,CAACC,IAAI,IAAI,cAAe;IACpC,SAAS,EAAE,IAAAC,eAAM,EACfC,2BAAK,CAACC,YAAY,EAClBb,KAAK,GAAGY,2BAAK,CAACZ,KAAK,GAAGM,OAAO,GAAGM,2BAAK,CAACN,OAAO,GAAGD,OAAO,GAAGO,2BAAK,CAACP,OAAO,GAAGJ,IAAI,GAAGW,2BAAK,CAACX,IAAI,GAAGa,SAAS,EACvGZ,MAAM,GAAGU,2BAAK,CAACV,MAAM,GAAGU,2BAAK,CAACG,QAAQ,EACtCb,MAAM,IAAIU,2BAAK,CAACV,MAAM,EACtBC,K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AS,CAACG,IAAI;EACrB5B,IAAI,EAAEyB,kBAAS,CAACG,IAAI;EACpB3B,MAAM,EAAEwB,kBAAS,CAACG,IAAI;EACtB1B,KAAK,EAAEuB,kBAAS,CAACG,IAAI;EACrBzB,KAAK,EAAEsB,kBAAS,CAACG,IAAI;EACrBxB,OAAO,EAAEqB,kBAAS,CAACG,IAAI;EACvBvB,OAAO,EAAEoB,kBAAS,CAACG,IAAI;EACvBtB,IAAI,EAAEmB,kBAAS,CAACG,IAAI;EACpBrB,OAAO,EAAEkB,kBAAS,CAACI;AACrB,CAAC"}
|
|
@@ -6,12 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.Story = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _Notification = require("./Notification");
|
|
9
|
-
var _Story$args;
|
|
10
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
12
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
15
10
|
var _default = {
|
|
16
11
|
title: 'Components'
|
|
17
12
|
};
|
|
@@ -21,7 +16,7 @@ var Story = function Story(props) {
|
|
|
21
16
|
};
|
|
22
17
|
exports.Story = Story;
|
|
23
18
|
Story.storyName = 'Notification';
|
|
24
|
-
Story.args =
|
|
19
|
+
Story.args = {
|
|
25
20
|
children: 'children',
|
|
26
21
|
error: false,
|
|
27
22
|
info: false,
|
|
@@ -30,8 +25,11 @@ Story.args = (_Story$args = {
|
|
|
30
25
|
small: false,
|
|
31
26
|
success: false,
|
|
32
27
|
warning: false,
|
|
33
|
-
wide: false
|
|
34
|
-
|
|
28
|
+
wide: false,
|
|
29
|
+
// inherited properties
|
|
30
|
+
testId: 'test-story',
|
|
31
|
+
style: {}
|
|
32
|
+
};
|
|
35
33
|
Story.argTypes = {
|
|
36
34
|
onClose: {
|
|
37
35
|
action: 'onClose'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.stories.js","names":["title","Story","props","storyName","args","children","error","info","inline","large","small","success","warning","wide","argTypes","onClose","action"],"sources":["../../../src/components/Notification/Notification.stories.jsx"],"sourcesContent":["import React from 'react';\n\nimport { Notification } from './Notification';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => <Notification {...props} />;\n\nStory.storyName = 'Notification';\n\nStory.args = {\n children: 'children',\n error: false,\n info: false,\n inline: false,\n large: false,\n small: false,\n success: false,\n warning: false,\n wide: false,\n // inherited properties\n
|
|
1
|
+
{"version":3,"file":"Notification.stories.js","names":["title","Story","props","storyName","args","children","error","info","inline","large","small","success","warning","wide","testId","style","argTypes","onClose","action"],"sources":["../../../src/components/Notification/Notification.stories.jsx"],"sourcesContent":["import React from 'react';\n\nimport { Notification } from './Notification';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => <Notification {...props} />;\n\nStory.storyName = 'Notification';\n\nStory.args = {\n children: 'children',\n error: false,\n info: false,\n inline: false,\n large: false,\n small: false,\n success: false,\n warning: false,\n wide: false,\n // inherited properties\n testId: 'test-story',\n style: {},\n};\n\nStory.argTypes = {\n onClose: { action: 'onClose' },\n};\n"],"mappings":";;;;;;AAAA;AAEA;AAA8C;AAAA,eAE/B;EAAEA,KAAK,EAAE;AAAa,CAAC;AAAA;AAE/B,IAAMC,KAAK,GAAG,SAARA,KAAK,CAAIC,KAAK;EAAA,oBAAK,6BAAC,0BAAY,EAAKA,KAAK,CAAI;AAAA;AAAC;AAE5DD,KAAK,CAACE,SAAS,GAAG,cAAc;AAEhCF,KAAK,CAACG,IAAI,GAAG;EACXC,QAAQ,EAAE,UAAU;EACpBC,KAAK,EAAE,KAAK;EACZC,IAAI,EAAE,KAAK;EACXC,MAAM,EAAE,KAAK;EACbC,KAAK,EAAE,KAAK;EACZC,KAAK,EAAE,KAAK;EACZC,OAAO,EAAE,KAAK;EACdC,OAAO,EAAE,KAAK;EACdC,IAAI,EAAE,KAAK;EACX;EACAC,MAAM,EAAE,YAAY;EACpBC,KAAK,EAAE,CAAC;AACV,CAAC;AAEDd,KAAK,CAACe,QAAQ,GAAG;EACfC,OAAO,EAAE;IAAEC,MAAM,EAAE;EAAU;AAC/B,CAAC"}
|
|
@@ -781,7 +781,7 @@ exports[`component:<Notification> renders 1`] = `
|
|
|
781
781
|
</DocumentFragment>
|
|
782
782
|
`;
|
|
783
783
|
|
|
784
|
-
exports[`component:<Notification>
|
|
784
|
+
exports[`component:<Notification> testId 1`] = `
|
|
785
785
|
<DocumentFragment>
|
|
786
786
|
<div
|
|
787
787
|
class="view row notification outlined"
|
|
@@ -23,6 +23,7 @@ var Progress = function Progress(_ref) {
|
|
|
23
23
|
visible = _ref$visible === void 0 ? false : _ref$visible,
|
|
24
24
|
others = _objectWithoutProperties(_ref, _excluded);
|
|
25
25
|
return /*#__PURE__*/_react.default.createElement(_primitives.View, _extends({}, others, {
|
|
26
|
+
role: others.role || 'progress',
|
|
26
27
|
className: (0, _helpers.styles)(_ProgressModule.default.progress, visible && _ProgressModule.default.visible, others.className)
|
|
27
28
|
}), /*#__PURE__*/_react.default.createElement(_primitives.View, {
|
|
28
29
|
className: (0, _helpers.styles)(_ProgressModule.default.value, indeterminate && _ProgressModule.default.indeterminate),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.js","names":["Progress","indeterminate","value","visible","others","styles","style","progress","className","width","undefined","propTypes","PropTypes","bool","number"],"sources":["../../../src/components/Progress/Progress.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { View } from '../../primitives';\nimport style from './Progress.module.css';\n\nconst Progress = ({ indeterminate = false, value = 0, visible = false, ...others }) => (\n <View
|
|
1
|
+
{"version":3,"file":"Progress.js","names":["Progress","indeterminate","value","visible","others","role","styles","style","progress","className","width","undefined","propTypes","PropTypes","bool","number"],"sources":["../../../src/components/Progress/Progress.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { View } from '../../primitives';\nimport style from './Progress.module.css';\n\nconst Progress = ({ indeterminate = false, value = 0, visible = false, ...others }) => (\n <View\n {...others}\n role={others.role || 'progress'}\n className={styles(style.progress, visible && style.visible, others.className)}\n >\n <View\n className={styles(style.value, indeterminate && style.indeterminate)}\n style={!indeterminate ? { width: `${value}%` } : undefined}\n />\n </View>\n);\n\nProgress.propTypes = {\n indeterminate: PropTypes.bool,\n value: PropTypes.number,\n visible: PropTypes.bool,\n};\n\nexport { Progress };\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AACA;AAA0C;AAAA;AAAA;AAAA;AAAA;AAE1C,IAAMA,QAAQ,GAAG,SAAXA,QAAQ;EAAA,8BAAMC,aAAa;IAAbA,aAAa,mCAAG,KAAK;IAAA,kBAAEC,KAAK;IAALA,KAAK,2BAAG,CAAC;IAAA,oBAAEC,OAAO;IAAPA,OAAO,6BAAG,KAAK;IAAKC,MAAM;EAAA,oBAC9E,6BAAC,gBAAI,eACCA,MAAM;IACV,IAAI,EAAEA,MAAM,CAACC,IAAI,IAAI,UAAW;IAChC,SAAS,EAAE,IAAAC,eAAM,EAACC,uBAAK,CAACC,QAAQ,EAAEL,OAAO,IAAII,uBAAK,CAACJ,OAAO,EAAEC,MAAM,CAACK,SAAS;EAAE,iBAE9E,6BAAC,gBAAI;IACH,SAAS,EAAE,IAAAH,eAAM,EAACC,uBAAK,CAACL,KAAK,EAAED,aAAa,IAAIM,uBAAK,CAACN,aAAa,CAAE;IACrE,KAAK,EAAE,CAACA,aAAa,GAAG;MAAES,KAAK,YAAKR,KAAK;IAAI,CAAC,GAAGS;EAAU,EAC3D,CACG;AAAA,CACR;AAAC;AAEFX,QAAQ,CAACY,SAAS,GAAG;EACnBX,aAAa,EAAEY,kBAAS,CAACC,IAAI;EAC7BZ,KAAK,EAAEW,kBAAS,CAACE,MAAM;EACvBZ,OAAO,EAAEU,kBAAS,CAACC;AACrB,CAAC"}
|
|
@@ -7,12 +7,7 @@ exports.default = exports.Story = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _ = require("../..");
|
|
9
9
|
var _Progress = require("./Progress");
|
|
10
|
-
var _Story$args;
|
|
11
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
13
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
11
|
var _default = {
|
|
17
12
|
title: 'Components'
|
|
18
13
|
};
|
|
@@ -23,10 +18,13 @@ var Story = function Story(props) {
|
|
|
23
18
|
};
|
|
24
19
|
exports.Story = Story;
|
|
25
20
|
Story.storyName = 'Progress';
|
|
26
|
-
Story.args =
|
|
21
|
+
Story.args = {
|
|
27
22
|
indeterminate: false,
|
|
28
23
|
value: 25,
|
|
29
|
-
visible: true
|
|
30
|
-
|
|
24
|
+
visible: true,
|
|
25
|
+
// inherited properties
|
|
26
|
+
testId: 'test-story',
|
|
27
|
+
style: {}
|
|
28
|
+
};
|
|
31
29
|
Story.argTypes = {};
|
|
32
30
|
//# sourceMappingURL=Progress.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.stories.js","names":["title","INSTANCES","Array","from","keys","Story","props","storyName","args","indeterminate","value","visible","argTypes"],"sources":["../../../src/components/Progress/Progress.stories.jsx"],"sourcesContent":["import React from 'react';\n\nimport { Text, View } from '../..';\nimport { Progress } from './Progress';\n\nexport default { title: 'Components' };\n\nconst INSTANCES = Array.from(Array(3).keys());\n\nexport const Story = (props) => <Progress {...props} />;\n\nStory.storyName = 'Progress';\n\nStory.args = {\n indeterminate: false,\n value: 25,\n visible: true,\n // inherited properties\n
|
|
1
|
+
{"version":3,"file":"Progress.stories.js","names":["title","INSTANCES","Array","from","keys","Story","props","storyName","args","indeterminate","value","visible","testId","style","argTypes"],"sources":["../../../src/components/Progress/Progress.stories.jsx"],"sourcesContent":["import React from 'react';\n\nimport { Text, View } from '../..';\nimport { Progress } from './Progress';\n\nexport default { title: 'Components' };\n\nconst INSTANCES = Array.from(Array(3).keys());\n\nexport const Story = (props) => <Progress {...props} />;\n\nStory.storyName = 'Progress';\n\nStory.args = {\n indeterminate: false,\n value: 25,\n visible: true,\n // inherited properties\n testId: 'test-story',\n style: {},\n};\n\nStory.argTypes = {};\n"],"mappings":";;;;;;AAAA;AAEA;AACA;AAAsC;AAAA,eAEvB;EAAEA,KAAK,EAAE;AAAa,CAAC;AAAA;AAEtC,IAAMC,SAAS,GAAGC,KAAK,CAACC,IAAI,CAACD,KAAK,CAAC,CAAC,CAAC,CAACE,IAAI,EAAE,CAAC;AAEtC,IAAMC,KAAK,GAAG,SAARA,KAAK,CAAIC,KAAK;EAAA,oBAAK,6BAAC,kBAAQ,EAAKA,KAAK,CAAI;AAAA;AAAC;AAExDD,KAAK,CAACE,SAAS,GAAG,UAAU;AAE5BF,KAAK,CAACG,IAAI,GAAG;EACXC,aAAa,EAAE,KAAK;EACpBC,KAAK,EAAE,EAAE;EACTC,OAAO,EAAE,IAAI;EACb;EACAC,MAAM,EAAE,YAAY;EACpBC,KAAK,EAAE,CAAC;AACV,CAAC;AAEDR,KAAK,CAACS,QAAQ,GAAG,CAAC,CAAC"}
|
|
@@ -8,17 +8,22 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _primitives = require("../../primitives");
|
|
10
10
|
var _TableModule = _interopRequireDefault(require("./Table.module.css"));
|
|
11
|
+
var _excluded = ["filter", "onRemove"];
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
16
|
var Filter = function Filter(_ref) {
|
|
13
17
|
var _ref$filter = _ref.filter,
|
|
14
18
|
filter = _ref$filter === void 0 ? [] : _ref$filter,
|
|
15
19
|
_ref$onRemove = _ref.onRemove,
|
|
16
|
-
onRemove = _ref$onRemove === void 0 ? function () {} : _ref$onRemove
|
|
17
|
-
|
|
20
|
+
onRemove = _ref$onRemove === void 0 ? function () {} : _ref$onRemove,
|
|
21
|
+
others = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.View, _extends({}, others, {
|
|
18
23
|
row: true,
|
|
19
24
|
wide: true,
|
|
20
25
|
className: _TableModule.default.filters
|
|
21
|
-
}, filter.map(function (_ref2, index) {
|
|
26
|
+
}), filter.map(function (_ref2, index) {
|
|
22
27
|
var field = _ref2.field,
|
|
23
28
|
value = _ref2.value,
|
|
24
29
|
min = _ref2.min,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.Filter.js","names":["Filter","filter","onRemove","style","filters","map","index","field","value","min","max","ICON","CLOSE","displayName","propTypes","PropTypes","arrayOf","shape","func","isRequired"],"sources":["../../../src/components/Table/Table.Filter.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { Icon, ICON, Pressable, Text, View } from '../../primitives';\nimport style from './Table.module.css';\n\nconst Filter = ({ filter = [], onRemove = () => {} }) => (\n <View row wide className={style.filters}>\n {filter.map(({ field, value, min, max }, index) => (\n <View row key={index} className={style.filter}>\n <Text small>{field}</Text>\n {value && (\n <Text bold small>\n {value}\n </Text>\n )}\n {min && (\n <Text bold small>\n {`${max ? '' : '≥ '}${min}`}\n </Text>\n )}\n {max && (\n <Text bold small>\n {`${min ? ' - ' : '≤ '}${max}`}\n </Text>\n )}\n <Pressable onPress={() => onRemove(index)}>\n <Icon action value={ICON.CLOSE} />\n </Pressable>\n </View>\n ))}\n </View>\n);\n\nFilter.displayName = 'Component:Table:Filter';\n\nFilter.propTypes = {\n filter: PropTypes.arrayOf(PropTypes.shape({})),\n onRemove: PropTypes.func.isRequired,\n};\n\nexport { Filter };\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AAAuC;AAEvC,IAAMA,MAAM,GAAG,SAATA,MAAM;EAAA,uBAAMC,MAAM;IAANA,MAAM,4BAAG,EAAE;IAAA,qBAAEC,QAAQ;IAARA,QAAQ,8BAAG,YAAM,CAAC,CAAC;EAAA,
|
|
1
|
+
{"version":3,"file":"Table.Filter.js","names":["Filter","filter","onRemove","others","style","filters","map","index","field","value","min","max","ICON","CLOSE","displayName","propTypes","PropTypes","arrayOf","shape","func","isRequired"],"sources":["../../../src/components/Table/Table.Filter.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { Icon, ICON, Pressable, Text, View } from '../../primitives';\nimport style from './Table.module.css';\n\nconst Filter = ({ filter = [], onRemove = () => {}, ...others }) => (\n <View {...others} row wide className={style.filters}>\n {filter.map(({ field, value, min, max }, index) => (\n <View row key={index} className={style.filter}>\n <Text small>{field}</Text>\n {value && (\n <Text bold small>\n {value}\n </Text>\n )}\n {min && (\n <Text bold small>\n {`${max ? '' : '≥ '}${min}`}\n </Text>\n )}\n {max && (\n <Text bold small>\n {`${min ? ' - ' : '≤ '}${max}`}\n </Text>\n )}\n <Pressable onPress={() => onRemove(index)}>\n <Icon action value={ICON.CLOSE} />\n </Pressable>\n </View>\n ))}\n </View>\n);\n\nFilter.displayName = 'Component:Table:Filter';\n\nFilter.propTypes = {\n filter: PropTypes.arrayOf(PropTypes.shape({})),\n onRemove: PropTypes.func.isRequired,\n};\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GAAG,wBAAwB;AAE7Cd,MAAM,CAACe,SAAS,GAAG;EACjBd,MAAM,EAAEe,kBAAS,CAACC,OAAO,CAACD,kBAAS,CAACE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;EAC9ChB,QAAQ,EAAEc,kBAAS,CAACG,IAAI,CAACC;AAC3B,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -15,9 +14,6 @@ var _TableModule = _interopRequireDefault(require("./Table.module.css"));
|
|
|
15
14
|
var _excluded = ["checked", "dataSource", "indeterminate", "schema", "sort", "onFilter", "onPress", "onSelect", "onSort"];
|
|
16
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
16
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
18
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
20
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
21
17
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
22
18
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
23
19
|
var CUSTOM_EVENT_TYPES = ['button', 'checkbox', 'input', 'radio', 'submit'];
|
|
@@ -34,7 +30,7 @@ var Row = function Row(_ref) {
|
|
|
34
30
|
onSort = _ref.onSort,
|
|
35
31
|
others = _objectWithoutProperties(_ref, _excluded);
|
|
36
32
|
var isHead = dataSource === undefined;
|
|
37
|
-
var testId = others
|
|
33
|
+
var testId = others.testId;
|
|
38
34
|
var handlePress = function handlePress(field, event) {
|
|
39
35
|
var _event$target = event.target;
|
|
40
36
|
_event$target = _event$target === void 0 ? {} : _event$target;
|
|
@@ -42,28 +38,33 @@ var Row = function Row(_ref) {
|
|
|
42
38
|
if (CUSTOM_EVENT_TYPES.includes(type)) return;
|
|
43
39
|
isHead ? onSort(field) : onPress && onPress(dataSource, event);
|
|
44
40
|
};
|
|
45
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
46
|
-
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Primitive, _extends({
|
|
42
|
+
tag: "tr"
|
|
43
|
+
}, others, {
|
|
47
44
|
className: (0, _helpers.styles)(checked && _TableModule.default.selected, onPress && _TableModule.default.onPress)
|
|
48
45
|
}), Object.keys(schema).filter(function (field) {
|
|
49
46
|
return schema[field].type !== 'hidden';
|
|
50
47
|
}).map(function (field, index) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Primitive, {
|
|
49
|
+
tag: isHead ? 'th' : 'td',
|
|
50
|
+
testId: testId ? "".concat(testId, "-").concat(field) : undefined,
|
|
51
|
+
key: field,
|
|
52
|
+
onClick: function onClick(event) {
|
|
53
|
+
return handlePress(field, event);
|
|
54
|
+
}
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.View, {
|
|
55
56
|
forceRow: true,
|
|
56
57
|
tag: "span",
|
|
57
58
|
className: (0, _helpers.styles)(_TableModule.default.column, onSelect && index === 0 && _TableModule.default.selectable, !isHead && !(onSelect && index === 0) && _TableModule.default[schema[field].type || 'text'])
|
|
58
59
|
}, onSelect && index === 0 && /*#__PURE__*/_react.default.createElement(_InputOption.InputOption, {
|
|
59
60
|
checked: checked,
|
|
60
|
-
"data-testid": testId ? "".concat(testId, "-checkbox") : undefined,
|
|
61
61
|
indeterminate: indeterminate,
|
|
62
62
|
name: "checkbox",
|
|
63
|
-
className: _TableModule.default.checkbox,
|
|
64
63
|
onChange: function onChange(event) {
|
|
65
64
|
return onSelect(dataSource, event);
|
|
66
|
-
}
|
|
65
|
+
},
|
|
66
|
+
className: _TableModule.default.checkbox,
|
|
67
|
+
testId: testId ? "".concat(testId, "-checkbox") : undefined
|
|
67
68
|
}), isHead ? schema[field].label : dataSource[field], isHead && onSort && /*#__PURE__*/_react.default.createElement(_primitives.View, {
|
|
68
69
|
row: true,
|
|
69
70
|
className: _TableModule.default.icons
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.Row.js","names":["CUSTOM_EVENT_TYPES","Row","checked","dataSource","indeterminate","schema","sort","onFilter","onPress","onSelect","onSort","others","isHead","undefined","testId","handlePress","field","event","target","type","includes","styles","style","selected","Object","keys","filter","map","index","React","createElement","column","selectable","checkbox","label","icons","ICON","UP","DOWN","icon","disabled","displayName","propTypes","PropTypes","bool","shape","isRequired","func"],"sources":["../../../src/components/Table/Table.Row.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Icon, ICON, View } from '../../primitives';\nimport { InputOption } from '../InputOption';\nimport { ColumnFilter } from './Table.ColumnFilter';\nimport style from './Table.module.css';\n\nconst CUSTOM_EVENT_TYPES = ['button', 'checkbox', 'input', 'radio', 'submit'];\n\nconst Row = ({\n checked,\n dataSource,\n indeterminate,\n schema,\n sort = {},\n onFilter,\n onPress,\n onSelect,\n onSort,\n ...others\n}) => {\n const isHead = dataSource === undefined;\n const {
|
|
1
|
+
{"version":3,"file":"Table.Row.js","names":["CUSTOM_EVENT_TYPES","Row","checked","dataSource","indeterminate","schema","sort","onFilter","onPress","onSelect","onSort","others","isHead","undefined","testId","handlePress","field","event","target","type","includes","styles","style","selected","Object","keys","filter","map","index","React","createElement","Primitive","tag","key","onClick","column","selectable","checkbox","label","icons","ICON","UP","DOWN","icon","disabled","displayName","propTypes","PropTypes","bool","shape","isRequired","func"],"sources":["../../../src/components/Table/Table.Row.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Icon, ICON, Primitive, View } from '../../primitives';\nimport { InputOption } from '../InputOption';\nimport { ColumnFilter } from './Table.ColumnFilter';\nimport style from './Table.module.css';\n\nconst CUSTOM_EVENT_TYPES = ['button', 'checkbox', 'input', 'radio', 'submit'];\n\nconst Row = ({\n checked,\n dataSource,\n indeterminate,\n schema,\n sort = {},\n onFilter,\n onPress,\n onSelect,\n onSort,\n ...others\n}) => {\n const isHead = dataSource === undefined;\n const { testId } = others;\n\n const handlePress = (field, event) => {\n const { target: { type } = {} } = event;\n if (CUSTOM_EVENT_TYPES.includes(type)) return;\n\n isHead ? onSort(field) : onPress && onPress(dataSource, event);\n };\n\n return (\n <Primitive tag=\"tr\" {...others} className={styles(checked && style.selected, onPress && style.onPress)}>\n {Object.keys(schema)\n .filter((field) => schema[field].type !== 'hidden')\n .map((field, index) =>\n React.createElement(\n Primitive,\n {\n tag: isHead ? 'th' : 'td',\n testId: testId ? `${testId}-${field}` : undefined,\n key: field,\n onClick: (event) => handlePress(field, event),\n },\n <View\n forceRow\n tag=\"span\"\n className={styles(\n style.column,\n onSelect && index === 0 && style.selectable,\n !isHead && !(onSelect && index === 0) && style[schema[field].type || 'text'],\n )}\n >\n {onSelect && index === 0 && (\n <InputOption\n checked={checked}\n indeterminate={indeterminate}\n name=\"checkbox\"\n onChange={(event) => onSelect(dataSource, event)}\n className={style.checkbox}\n testId={testId ? `${testId}-checkbox` : undefined}\n />\n )}\n\n {isHead ? schema[field].label : dataSource[field]}\n\n {isHead && onSort && (\n <View row className={style.icons}>\n {onSort && (\n <Icon\n value={sort[field] === false ? ICON.UP : ICON.DOWN}\n className={styles(style.icon, sort[field] === undefined && style.disabled)}\n />\n )}\n {onFilter && <ColumnFilter field={field} schema={schema[field]} onSubmit={onFilter} />}\n </View>\n )}\n </View>,\n ),\n )}\n </Primitive>\n );\n};\n\nRow.displayName = 'Component:Table:Row';\n\nRow.propTypes = {\n checked: PropTypes.bool,\n dataSource: PropTypes.shape({}),\n indeterminate: PropTypes.bool,\n schema: PropTypes.shape({}).isRequired,\n sort: PropTypes.shape({}),\n onFilter: PropTypes.func,\n onPress: PropTypes.func,\n onSelect: PropTypes.func,\n onSort: PropTypes.func,\n};\n\nexport { Row };\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAuC;AAAA;AAAA;AAAA;AAAA;AAEvC,IAAMA,kBAAkB,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC;AAE7E,IAAMC,GAAG,GAAG,SAANA,GAAG,OAWH;EAAA,IAVJC,OAAO,QAAPA,OAAO;IACPC,UAAU,QA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AACsB,QAAQ;IAAE,EAE9E,EACArC,QAAQ,iBAAI,6BAAC,mBAAY;MAAC,KAAK,EAAES,KAAM;MAAC,MAAM,EAAEX,MAAM,CAACW,KAAK,CAAE;MAAC,QAAQ,EAAET;IAAS,EAAG,CAEzF,CACI,CACR;EAAA,EACF,CACO;AAEhB,CAAC;AAAC;AAEFN,GAAG,CAAC4C,WAAW,GAAG,qBAAqB;AAEvC5C,GAAG,CAAC6C,SAAS,GAAG;EACd5C,OAAO,EAAE6C,kBAAS,CAACC,IAAI;EACvB7C,UAAU,EAAE4C,kBAAS,CAACE,KAAK,CAAC,CAAC,CAAC,CAAC;EAC/B7C,aAAa,EAAE2C,kBAAS,CAACC,IAAI;EAC7B3C,MAAM,EAAE0C,kBAAS,CAACE,KAAK,CAAC,CAAC,CAAC,CAAC,CAACC,UAAU;EACtC5C,IAAI,EAAEyC,kBAAS,CAACE,KAAK,CAAC,CAAC,CAAC,CAAC;EACzB1C,QAAQ,EAAEwC,kBAAS,CAACI,IAAI;EACxB3C,OAAO,EAAEuC,kBAAS,CAACI,IAAI;EACvB1C,QAAQ,EAAEsC,kBAAS,CAACI,IAAI;EACxBzC,MAAM,EAAEqC,kBAAS,CAACI;AACpB,CAAC"}
|
|
@@ -94,18 +94,25 @@ var Table = function Table(_ref) {
|
|
|
94
94
|
var handleSort = function handleSort(field) {
|
|
95
95
|
setSort(sort[field] === undefined ? _defineProperty({}, field, true) : sort[field] ? _defineProperty({}, field, false) : {});
|
|
96
96
|
};
|
|
97
|
-
var testId = others
|
|
97
|
+
var testId = others.testId;
|
|
98
98
|
return /*#__PURE__*/_react.default.createElement(onScroll ? _primitives.ScrollView : !inline ? _primitives.View : _react.Fragment, onScroll || !inline ? _objectSpread(_objectSpread({}, others), {}, {
|
|
99
|
+
role: others.role || 'table',
|
|
99
100
|
onScroll: onScroll,
|
|
100
101
|
className: (0, _helpers.styles)(!inline && _TableModule.default.outlined, others.className)
|
|
101
102
|
}) : undefined, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, filter.length > 0 && /*#__PURE__*/_react.default.createElement(_Table.Filter, {
|
|
102
103
|
filter: filter,
|
|
104
|
+
role: "table-filter",
|
|
103
105
|
onRemove: function onRemove(index) {
|
|
104
106
|
return handleRemoveFilter(index);
|
|
105
107
|
}
|
|
106
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
108
|
+
}), /*#__PURE__*/_react.default.createElement(_primitives.Primitive, _extends({
|
|
109
|
+
role: "table",
|
|
110
|
+
tag: "table"
|
|
111
|
+
}, !onScroll ? others : undefined, {
|
|
107
112
|
className: (0, _helpers.styles)(_TableModule.default.table, !onScroll && !inline && others.className)
|
|
108
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
113
|
+
}), /*#__PURE__*/_react.default.createElement(_primitives.Primitive, {
|
|
114
|
+
tag: "thead"
|
|
115
|
+
}, /*#__PURE__*/_react.default.createElement(_Table2.Row, {
|
|
109
116
|
checked: selected.length === dataSource.length,
|
|
110
117
|
indeterminate: selected.length > 0,
|
|
111
118
|
schema: schema,
|
|
@@ -113,8 +120,10 @@ var Table = function Table(_ref) {
|
|
|
113
120
|
onFilter: handleAddFilter,
|
|
114
121
|
onSelect: onSelect ? handleHeadSelect : undefined,
|
|
115
122
|
onSort: handleSort,
|
|
116
|
-
|
|
117
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
123
|
+
testId: testId ? "".concat(testId, "-head") : undefined
|
|
124
|
+
})), /*#__PURE__*/_react.default.createElement(_primitives.Primitive, {
|
|
125
|
+
tag: "tbody"
|
|
126
|
+
}, (0, _react.useMemo)(function () {
|
|
118
127
|
return (0, _helpers2.select)({
|
|
119
128
|
dataSource: dataSource,
|
|
120
129
|
filter: filter,
|
|
@@ -132,7 +141,7 @@ var Table = function Table(_ref) {
|
|
|
132
141
|
schema: schema,
|
|
133
142
|
onPress: onPress,
|
|
134
143
|
onSelect: onSelect ? handleSelect : undefined,
|
|
135
|
-
|
|
144
|
+
testId: testId ? "".concat(testId, "-").concat(index) : undefined
|
|
136
145
|
});
|
|
137
146
|
})))));
|
|
138
147
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","names":["Table","dataSource","filter","propFilter","inline","schema","search","selected","propSelected","onPress","onScroll","onSelect","others","useState","setFilter","setSelected","sort","setSort","useEffect","JSON","stringify","handleAddFilter","item","handleRemoveFilter","index","splice","handleHeadSelect","row","event","next","length","handleSelect","exists","includes","push","handleSort","field","undefined","testId","React","createElement","ScrollView","View","Fragment","className","styles","style","outlined","table","useMemo","select","map","find","displayName","propTypes","PropTypes","arrayOf","shape","bool","isRequired","string","func"],"sources":["../../../src/components/Table/Table.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { Fragment, useEffect, useMemo, useState } from 'react';\n\nimport { styles } from '../../helpers';\nimport { ScrollView, View } from '../../primitives';\nimport { select } from './helpers';\nimport { Filter } from './Table.Filter';\nimport style from './Table.module.css';\nimport { Row } from './Table.Row';\n\nexport const Table = ({\n dataSource = [],\n filter: propFilter = [],\n inline = true,\n schema,\n search,\n selected: propSelected = [],\n onPress,\n onScroll,\n onSelect,\n ...others\n}) => {\n const [filter, setFilter] = useState(propFilter);\n const [selected, setSelected] = useState(propSelected);\n const [sort, setSort] = useState({});\n\n useEffect(() => {\n if (JSON.stringify(filter) !== JSON.stringify(propFilter)) setFilter(propFilter);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [propFilter]);\n\n const handleAddFilter = (item) => {\n setFilter([...filter, item]);\n };\n\n const handleRemoveFilter = (index) => {\n filter.splice(index, 1);\n setFilter([...filter]);\n };\n\n const handleHeadSelect = (row, event) => {\n setSelected(() => {\n const next = selected.length !== dataSource.length ? dataSource : [];\n onSelect(next, event);\n\n return next;\n });\n };\n\n const handleSelect = (row, event) => {\n setSelected(() => {\n const exists = selected.includes(row);\n const next = selected.filter((item) => item !== row);\n if (!exists) next.push(row);\n onSelect(next, event);\n\n return next;\n });\n };\n\n const handleSort = (field) => {\n setSort(sort[field] === undefined ? { [field]: true } : sort[field] ? { [field]: false } : {});\n };\n\n const {
|
|
1
|
+
{"version":3,"file":"Table.js","names":["Table","dataSource","filter","propFilter","inline","schema","search","selected","propSelected","onPress","onScroll","onSelect","others","useState","setFilter","setSelected","sort","setSort","useEffect","JSON","stringify","handleAddFilter","item","handleRemoveFilter","index","splice","handleHeadSelect","row","event","next","length","handleSelect","exists","includes","push","handleSort","field","undefined","testId","React","createElement","ScrollView","View","Fragment","role","className","styles","style","outlined","table","useMemo","select","map","find","displayName","propTypes","PropTypes","arrayOf","shape","bool","isRequired","string","func"],"sources":["../../../src/components/Table/Table.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { Fragment, useEffect, useMemo, useState } from 'react';\n\nimport { styles } from '../../helpers';\nimport { Primitive, ScrollView, View } from '../../primitives';\nimport { select } from './helpers';\nimport { Filter } from './Table.Filter';\nimport style from './Table.module.css';\nimport { Row } from './Table.Row';\n\nexport const Table = ({\n dataSource = [],\n filter: propFilter = [],\n inline = true,\n schema,\n search,\n selected: propSelected = [],\n onPress,\n onScroll,\n onSelect,\n ...others\n}) => {\n const [filter, setFilter] = useState(propFilter);\n const [selected, setSelected] = useState(propSelected);\n const [sort, setSort] = useState({});\n\n useEffect(() => {\n if (JSON.stringify(filter) !== JSON.stringify(propFilter)) setFilter(propFilter);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [propFilter]);\n\n const handleAddFilter = (item) => {\n setFilter([...filter, item]);\n };\n\n const handleRemoveFilter = (index) => {\n filter.splice(index, 1);\n setFilter([...filter]);\n };\n\n const handleHeadSelect = (row, event) => {\n setSelected(() => {\n const next = selected.length !== dataSource.length ? dataSource : [];\n onSelect(next, event);\n\n return next;\n });\n };\n\n const handleSelect = (row, event) => {\n setSelected(() => {\n const exists = selected.includes(row);\n const next = selected.filter((item) => item !== row);\n if (!exists) next.push(row);\n onSelect(next, event);\n\n return next;\n });\n };\n\n const handleSort = (field) => {\n setSort(sort[field] === undefined ? { [field]: true } : sort[field] ? { [field]: false } : {});\n };\n\n const { testId } = others;\n\n return React.createElement(\n onScroll ? ScrollView : !inline ? View : Fragment,\n onScroll || !inline\n ? {\n ...others,\n role: others.role || 'table',\n onScroll,\n className: styles(!inline && style.outlined, others.className),\n }\n : undefined,\n <>\n {filter.length > 0 && (\n <Filter filter={filter} role=\"table-filter\" onRemove={(index) => handleRemoveFilter(index)} />\n )}\n <Primitive\n role=\"table\"\n tag=\"table\"\n {...(!onScroll ? others : undefined)}\n className={styles(style.table, !onScroll && !inline && others.className)}\n >\n <Primitive tag=\"thead\">\n <Row\n checked={selected.length === dataSource.length}\n indeterminate={selected.length > 0}\n schema={schema}\n sort={sort}\n onFilter={handleAddFilter}\n onSelect={onSelect ? handleHeadSelect : undefined}\n onSort={handleSort}\n testId={testId ? `${testId}-head` : undefined}\n />\n </Primitive>\n <Primitive tag=\"tbody\">\n {useMemo(\n () => select({ dataSource, filter, schema, search, sort }),\n [dataSource, filter, schema, search, sort],\n ).map((row, index) => (\n <Row\n checked={!!selected.find((item) => JSON.stringify(item) === JSON.stringify(row))}\n dataSource={row}\n key={index}\n schema={schema}\n onPress={onPress}\n onSelect={onSelect ? handleSelect : undefined}\n testId={testId ? `${testId}-${index}` : undefined}\n />\n ))}\n </Primitive>\n </Primitive>\n </>,\n );\n};\n\nTable.displayName = 'Component:Table';\n\nTable.propTypes = {\n dataSource: PropTypes.arrayOf(PropTypes.shape({})),\n filter: PropTypes.arrayOf(PropTypes.shape({})),\n inline: PropTypes.bool,\n schema: PropTypes.shape({}).isRequired,\n search: PropTypes.string,\n selected: PropTypes.arrayOf(PropTypes.shape()),\n onPress: PropTypes.func,\n onScroll: PropTypes.func,\n onSelect: PropTypes.func,\n};\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAkC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AACtB,CAAC"}
|
|
@@ -9,7 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _ = require("../../");
|
|
10
10
|
var _Table = require("./Table");
|
|
11
11
|
var _TableStoriesModule = _interopRequireDefault(require("./Table.stories.module.css"));
|
|
12
|
-
var _ref
|
|
12
|
+
var _ref;
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -130,7 +130,7 @@ var dataSource = [{
|
|
|
130
130
|
year: 2022
|
|
131
131
|
}];
|
|
132
132
|
Story.storyName = 'Table';
|
|
133
|
-
Story.args =
|
|
133
|
+
Story.args = {
|
|
134
134
|
dataSource: dataSource,
|
|
135
135
|
filter: [{
|
|
136
136
|
field: 'email',
|
|
@@ -181,11 +181,14 @@ Story.args = (_Story$args = {
|
|
|
181
181
|
type: 'hidden'
|
|
182
182
|
}
|
|
183
183
|
},
|
|
184
|
-
search: ''
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
184
|
+
search: '',
|
|
185
|
+
// inherited properties
|
|
186
|
+
testId: 'test-story',
|
|
187
|
+
style: {
|
|
188
|
+
height: '128px !important;',
|
|
189
|
+
width: 128,
|
|
190
|
+
background: 'green'
|
|
191
|
+
}
|
|
192
|
+
};
|
|
190
193
|
Story.argTypes = {};
|
|
191
194
|
//# sourceMappingURL=Table.stories.js.map
|