@webiny/ui 5.34.8 → 5.35.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.js +4 -14
- package/Accordion/Accordion.js.map +1 -1
- package/Accordion/Accordion.stories.js +0 -8
- package/Accordion/Accordion.stories.js.map +1 -1
- package/Accordion/AccordionItem.d.ts +4 -1
- package/Accordion/AccordionItem.js +5 -26
- package/Accordion/AccordionItem.js.map +1 -1
- package/Accordion/AccordionItemActions.js +2 -10
- package/Accordion/AccordionItemActions.js.map +1 -1
- package/Accordion/index.js +0 -4
- package/Accordion/index.js.map +1 -1
- package/Alert/Alert.js +3 -10
- package/Alert/Alert.js.map +1 -1
- package/Alert/Alert.stories.js +0 -6
- package/Alert/Alert.stories.js.map +1 -1
- package/Alert/index.js +0 -2
- package/Alert/index.js.map +1 -1
- package/AutoComplete/AutoComplete.js +38 -88
- package/AutoComplete/AutoComplete.js.map +1 -1
- package/AutoComplete/AutoComplete.stories.js +0 -7
- package/AutoComplete/AutoComplete.stories.js.map +1 -1
- package/AutoComplete/MultiAutoComplete.js +52 -128
- package/AutoComplete/MultiAutoComplete.js.map +1 -1
- package/AutoComplete/MultiAutoComplete.stories.js +0 -8
- package/AutoComplete/MultiAutoComplete.stories.js.map +1 -1
- package/AutoComplete/index.js +0 -4
- package/AutoComplete/index.js.map +1 -1
- package/AutoComplete/styles.js +0 -2
- package/AutoComplete/styles.js.map +1 -1
- package/AutoComplete/utils.js +0 -8
- package/AutoComplete/utils.js.map +1 -1
- package/Avatar/Avatar.js +7 -18
- package/Avatar/Avatar.js.map +1 -1
- package/Avatar/Avatar.stories.js +0 -6
- package/Avatar/Avatar.stories.js.map +1 -1
- package/Avatar/index.js +0 -2
- package/Avatar/index.js.map +1 -1
- package/Button/Button.js +39 -59
- package/Button/Button.js.map +1 -1
- package/Button/Button.stories.js +0 -10
- package/Button/Button.stories.js.map +1 -1
- package/Button/Button.styles.js +0 -2
- package/Button/Button.styles.js.map +1 -1
- package/Button/CopyButton/CopyButton.js +2 -12
- package/Button/CopyButton/CopyButton.js.map +1 -1
- package/Button/CopyButton/CopyButton.stories.js +0 -7
- package/Button/CopyButton/CopyButton.stories.js.map +1 -1
- package/Button/IconButton/IconButton.js +6 -11
- package/Button/IconButton/IconButton.js.map +1 -1
- package/Button/IconButton/IconButton.stories.js +0 -9
- package/Button/IconButton/IconButton.stories.js.map +1 -1
- package/Button/index.js +0 -6
- package/Button/index.js.map +1 -1
- package/Carousel/Carousel.js +0 -14
- package/Carousel/Carousel.js.map +1 -1
- package/Carousel/Carouser.stories.js +0 -7
- package/Carousel/Carouser.stories.js.map +1 -1
- package/Carousel/index.js +0 -2
- package/Carousel/index.js.map +1 -1
- package/Checkbox/Checkbox.d.ts +1 -0
- package/Checkbox/Checkbox.js +13 -31
- package/Checkbox/Checkbox.js.map +1 -1
- package/Checkbox/Checkbox.stories.js +0 -8
- package/Checkbox/Checkbox.stories.js.map +1 -1
- package/Checkbox/Checkbox.styles.js +0 -2
- package/Checkbox/Checkbox.styles.js.map +1 -1
- package/Checkbox/CheckboxGroup.js +7 -24
- package/Checkbox/CheckboxGroup.js.map +1 -1
- package/Checkbox/CheckboxGroup.stories.js +2 -10
- package/Checkbox/CheckboxGroup.stories.js.map +1 -1
- package/Checkbox/index.js +0 -3
- package/Checkbox/index.js.map +1 -1
- package/Chips/Chip.js +1 -8
- package/Chips/Chip.js.map +1 -1
- package/Chips/Chips.js +3 -13
- package/Chips/Chips.js.map +1 -1
- package/Chips/Chips.stories.js +0 -8
- package/Chips/Chips.stories.js.map +1 -1
- package/Chips/index.js +0 -4
- package/Chips/index.js.map +1 -1
- package/Chips/styles.js +0 -2
- package/Chips/styles.js.map +1 -1
- package/CodeEditor/CodeEditor.js +8 -36
- package/CodeEditor/CodeEditor.js.map +1 -1
- package/CodeEditor/CodeEditor.stories.js +0 -10
- package/CodeEditor/CodeEditor.stories.js.map +1 -1
- package/CodeEditor/index.js +0 -2
- package/CodeEditor/index.js.map +1 -1
- package/ColorPicker/ColorPicker.js +7 -31
- package/ColorPicker/ColorPicker.js.map +1 -1
- package/ColorPicker/ColorPicker.stories.js +0 -8
- package/ColorPicker/ColorPicker.stories.js.map +1 -1
- package/ColorPicker/index.js +0 -2
- package/ColorPicker/index.js.map +1 -1
- package/ConfirmationDialog/ConfirmationDialog.js +33 -65
- package/ConfirmationDialog/ConfirmationDialog.js.map +1 -1
- package/ConfirmationDialog/ConfirmationDialog.stories.js +0 -7
- package/ConfirmationDialog/ConfirmationDialog.stories.js.map +1 -1
- package/ConfirmationDialog/index.js +0 -4
- package/ConfirmationDialog/index.js.map +1 -1
- package/ConfirmationDialog/withConfirmation.js +0 -5
- package/ConfirmationDialog/withConfirmation.js.map +1 -1
- package/DataTable/DataTable.d.ts +14 -1
- package/DataTable/DataTable.js +60 -45
- package/DataTable/DataTable.js.map +1 -1
- package/DataTable/DataTable.stories.js +0 -6
- package/DataTable/DataTable.stories.js.map +1 -1
- package/DataTable/index.js +0 -2
- package/DataTable/index.js.map +1 -1
- package/DataTable/styled.d.ts +29 -1
- package/DataTable/styled.js +25 -7
- package/DataTable/styled.js.map +1 -1
- package/DelayedOnChange/DelayedOnChange.js +19 -35
- package/DelayedOnChange/DelayedOnChange.js.map +1 -1
- package/DelayedOnChange/index.js +0 -3
- package/DelayedOnChange/index.js.map +1 -1
- package/DelayedOnChange/withDelayedOnChange.js +3 -9
- package/DelayedOnChange/withDelayedOnChange.js.map +1 -1
- package/Dialog/Dialog.js +5 -40
- package/Dialog/Dialog.js.map +1 -1
- package/Dialog/Dialog.stories.js +0 -7
- package/Dialog/Dialog.stories.js.map +1 -1
- package/Dialog/index.js +0 -2
- package/Dialog/index.js.map +1 -1
- package/Drawer/Drawer.js +0 -9
- package/Drawer/Drawer.js.map +1 -1
- package/Drawer/Drawer.stories.js +0 -8
- package/Drawer/Drawer.stories.js.map +1 -1
- package/Drawer/index.js +0 -2
- package/Drawer/index.js.map +1 -1
- package/DynamicFieldset/Fieldset.js +7 -34
- package/DynamicFieldset/Fieldset.js.map +1 -1
- package/DynamicFieldset/index.js +0 -2
- package/DynamicFieldset/index.js.map +1 -1
- package/Elevation/Elevation.js +0 -5
- package/Elevation/Elevation.js.map +1 -1
- package/Elevation/Elevation.stories.js +0 -8
- package/Elevation/Elevation.stories.js.map +1 -1
- package/Elevation/index.js +0 -2
- package/Elevation/index.js.map +1 -1
- package/FormElementMessage/FormElementMessage.js +0 -5
- package/FormElementMessage/FormElementMessage.js.map +1 -1
- package/FormElementMessage/index.js +0 -1
- package/FormElementMessage/index.js.map +1 -1
- package/FullName/FullName.js +0 -7
- package/FullName/FullName.js.map +1 -1
- package/FullName/index.js +0 -2
- package/FullName/index.js.map +1 -1
- package/Grid/Grid.js +1 -9
- package/Grid/Grid.js.map +1 -1
- package/Grid/Grid.stories.js +0 -6
- package/Grid/Grid.stories.js.map +1 -1
- package/Grid/index.js +0 -2
- package/Grid/index.js.map +1 -1
- package/Helpers/ClassNames.js +0 -9
- package/Helpers/ClassNames.js.map +1 -1
- package/Helpers/index.js +0 -1
- package/Helpers/index.js.map +1 -1
- package/Icon/Icon.js +1 -7
- package/Icon/Icon.js.map +1 -1
- package/Icon/Icon.stories.js +0 -10
- package/Icon/Icon.stories.js.map +1 -1
- package/Icon/index.js +0 -2
- package/Icon/index.js.map +1 -1
- package/Image/Image.js +0 -8
- package/Image/Image.js.map +1 -1
- package/Image/Image.stories.js +0 -7
- package/Image/Image.stories.js.map +1 -1
- package/Image/index.js +0 -2
- package/Image/index.js.map +1 -1
- package/ImageEditor/ImageEditor.js +46 -107
- package/ImageEditor/ImageEditor.js.map +1 -1
- package/ImageEditor/index.js +0 -2
- package/ImageEditor/index.js.map +1 -1
- package/ImageEditor/toolbar/crop.js +1 -16
- package/ImageEditor/toolbar/crop.js.map +1 -1
- package/ImageEditor/toolbar/filter.js +11 -36
- package/ImageEditor/toolbar/filter.js.map +1 -1
- package/ImageEditor/toolbar/flip.js +0 -17
- package/ImageEditor/toolbar/flip.js.map +1 -1
- package/ImageEditor/toolbar/icons/index.js +0 -8
- package/ImageEditor/toolbar/icons/index.js.map +1 -1
- package/ImageEditor/toolbar/index.js +0 -5
- package/ImageEditor/toolbar/index.js.map +1 -1
- package/ImageEditor/toolbar/rotate.js +8 -43
- package/ImageEditor/toolbar/rotate.js.map +1 -1
- package/ImageUpload/Image.js +10 -34
- package/ImageUpload/Image.js.map +1 -1
- package/ImageUpload/ImageEditorDialog.js +11 -33
- package/ImageUpload/ImageEditorDialog.js.map +1 -1
- package/ImageUpload/MultiImageUpload.js +111 -175
- package/ImageUpload/MultiImageUpload.js.map +1 -1
- package/ImageUpload/MultiImageUpload.stories.js +0 -8
- package/ImageUpload/MultiImageUpload.stories.js.map +1 -1
- package/ImageUpload/SingleImageUpload.js +38 -79
- package/ImageUpload/SingleImageUpload.js.map +1 -1
- package/ImageUpload/SingleImageUpload.stories.js +0 -8
- package/ImageUpload/SingleImageUpload.stories.js.map +1 -1
- package/ImageUpload/index.js +0 -5
- package/ImageUpload/index.js.map +1 -1
- package/ImageUpload/styled.d.ts +27 -17
- package/ImageUpload/styled.js +0 -5
- package/ImageUpload/styled.js.map +1 -1
- package/Input/Input.js +34 -60
- package/Input/Input.js.map +1 -1
- package/Input/Input.stories.js +0 -13
- package/Input/Input.stories.js.map +1 -1
- package/Input/__tests__/Input.test.js +4 -30
- package/Input/__tests__/Input.test.js.map +1 -1
- package/Input/index.js +0 -2
- package/Input/index.js.map +1 -1
- package/List/CollapsibleList/CollapsibleList.stories.js +0 -8
- package/List/CollapsibleList/CollapsibleList.stories.js.map +1 -1
- package/List/CollapsibleList/index.js +0 -6
- package/List/CollapsibleList/index.js.map +1 -1
- package/List/DataList/DataList.js +7 -45
- package/List/DataList/DataList.js.map +1 -1
- package/List/DataList/DataList.stories.js +2 -10
- package/List/DataList/DataList.stories.js.map +1 -1
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.d.ts +8 -6
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.js +8 -18
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.js.map +1 -1
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js +3 -14
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js.map +1 -1
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js +3 -12
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js.map +1 -1
- package/List/DataList/DataListModalOverlay/index.js +0 -3
- package/List/DataList/DataListModalOverlay/index.js.map +1 -1
- package/List/DataList/DataListWithSections.js +4 -48
- package/List/DataList/DataListWithSections.js.map +1 -1
- package/List/DataList/Loader.js +0 -7
- package/List/DataList/Loader.js.map +1 -1
- package/List/DataList/NoData.js +0 -7
- package/List/DataList/NoData.js.map +1 -1
- package/List/DataList/icons/index.js +0 -29
- package/List/DataList/icons/index.js.map +1 -1
- package/List/DataList/index.js +0 -6
- package/List/DataList/index.js.map +1 -1
- package/List/List.js +0 -39
- package/List/List.js.map +1 -1
- package/List/List.stories.js +0 -12
- package/List/List.stories.js.map +1 -1
- package/List/icons/index.js +0 -3
- package/List/icons/index.js.map +1 -1
- package/List/index.js +0 -4
- package/List/index.js.map +1 -1
- package/Menu/Menu.js +2 -28
- package/Menu/Menu.js.map +1 -1
- package/Menu/Menu.stories.js +0 -7
- package/Menu/Menu.stories.js.map +1 -1
- package/Menu/index.js +0 -2
- package/Menu/index.js.map +1 -1
- package/Mosaic/Mosaic.js +3 -7
- package/Mosaic/Mosaic.js.map +1 -1
- package/Mosaic/Mosaic.stories.js +0 -6
- package/Mosaic/Mosaic.stories.js.map +1 -1
- package/Mosaic/index.js +0 -2
- package/Mosaic/index.js.map +1 -1
- package/Progress/CircularProgress.js +6 -14
- package/Progress/CircularProgress.js.map +1 -1
- package/Progress/index.js +0 -2
- package/Progress/index.js.map +1 -1
- package/Radio/Radio.js +9 -28
- package/Radio/Radio.js.map +1 -1
- package/Radio/Radio.styles.js +0 -2
- package/Radio/Radio.styles.js.map +1 -1
- package/Radio/RadioGroup.js +5 -21
- package/Radio/RadioGroup.js.map +1 -1
- package/Radio/RadioGroup.stories.js +2 -10
- package/Radio/RadioGroup.stories.js.map +1 -1
- package/Radio/index.js +0 -3
- package/Radio/index.js.map +1 -1
- package/RichTextEditor/RichTextEditor.js +30 -64
- package/RichTextEditor/RichTextEditor.js.map +1 -1
- package/RichTextEditor/RichTextEditor.stories.js +0 -7
- package/RichTextEditor/RichTextEditor.stories.js.map +1 -1
- package/RichTextEditor/createPropsFromConfig.js +0 -4
- package/RichTextEditor/createPropsFromConfig.js.map +1 -1
- package/RichTextEditor/index.js +0 -3
- package/RichTextEditor/index.js.map +1 -1
- package/Ripple/Ripple.js +0 -6
- package/Ripple/Ripple.js.map +1 -1
- package/Ripple/Ripple.stories.js +0 -12
- package/Ripple/Ripple.stories.js.map +1 -1
- package/Ripple/index.js +0 -2
- package/Ripple/index.js.map +1 -1
- package/Scrollbar/Scrollbar.js +0 -5
- package/Scrollbar/Scrollbar.js.map +1 -1
- package/Scrollbar/Scrollbar.stories.js +0 -6
- package/Scrollbar/Scrollbar.stories.js.map +1 -1
- package/Scrollbar/index.js +0 -2
- package/Scrollbar/index.js.map +1 -1
- package/Section/Section.stories.js +0 -7
- package/Section/Section.stories.js.map +1 -1
- package/Section/index.js +2 -12
- package/Section/index.js.map +1 -1
- package/Select/Select.js +9 -32
- package/Select/Select.js.map +1 -1
- package/Select/Select.stories.js +0 -8
- package/Select/Select.stories.js.map +1 -1
- package/Select/index.js +0 -2
- package/Select/index.js.map +1 -1
- package/Skeleton/Skeleton.d.ts +6 -2
- package/Skeleton/Skeleton.js +8 -11
- package/Skeleton/Skeleton.js.map +1 -1
- package/Skeleton/Skeleton.stories.js +0 -6
- package/Skeleton/Skeleton.stories.js.map +1 -1
- package/Skeleton/index.js +0 -2
- package/Skeleton/index.js.map +1 -1
- package/Slider/Slider.js +7 -29
- package/Slider/Slider.js.map +1 -1
- package/Slider/Slider.stories.js +1 -9
- package/Slider/Slider.stories.js.map +1 -1
- package/Slider/index.js +0 -2
- package/Slider/index.js.map +1 -1
- package/Snackbar/Snackbar.js +0 -19
- package/Snackbar/Snackbar.js.map +1 -1
- package/Snackbar/Snackbar.stories.js +0 -23
- package/Snackbar/Snackbar.stories.js.map +1 -1
- package/Snackbar/index.js +0 -1
- package/Snackbar/index.js.map +1 -1
- package/Switch/Switch.js +5 -28
- package/Switch/Switch.js.map +1 -1
- package/Switch/Switch.stories.js +0 -8
- package/Switch/Switch.stories.js.map +1 -1
- package/Switch/index.js +0 -2
- package/Switch/index.js.map +1 -1
- package/Tabs/Tab.js +0 -9
- package/Tabs/Tab.js.map +1 -1
- package/Tabs/Tabs.js +15 -29
- package/Tabs/Tabs.js.map +1 -1
- package/Tabs/Tabs.stories.js +0 -10
- package/Tabs/Tabs.stories.js.map +1 -1
- package/Tabs/index.js +0 -4
- package/Tabs/index.js.map +1 -1
- package/Tags/Tags.js +13 -37
- package/Tags/Tags.js.map +1 -1
- package/Tags/Tags.stories.js +0 -8
- package/Tags/Tags.stories.js.map +1 -1
- package/Tags/index.js +0 -2
- package/Tags/index.js.map +1 -1
- package/Tooltip/Tooltip.js +0 -19
- package/Tooltip/Tooltip.js.map +1 -1
- package/Tooltip/Tooltip.stories.js +0 -6
- package/Tooltip/Tooltip.stories.js.map +1 -1
- package/Tooltip/index.js +0 -2
- package/Tooltip/index.js.map +1 -1
- package/TopAppBar/TopAppBar.js +1 -8
- package/TopAppBar/TopAppBar.js.map +1 -1
- package/TopAppBar/TopAppBar.stories.js +3 -16
- package/TopAppBar/TopAppBar.stories.js.map +1 -1
- package/TopAppBar/TopAppBarActionItem.js +0 -5
- package/TopAppBar/TopAppBarActionItem.js.map +1 -1
- package/TopAppBar/TopAppBarNavigationIcon.js +0 -5
- package/TopAppBar/TopAppBarNavigationIcon.js.map +1 -1
- package/TopAppBar/TopAppBarPrimary.js +1 -8
- package/TopAppBar/TopAppBarPrimary.js.map +1 -1
- package/TopAppBar/TopAppBarSecondary.js +3 -10
- package/TopAppBar/TopAppBarSecondary.js.map +1 -1
- package/TopAppBar/TopAppBarSection.js +1 -8
- package/TopAppBar/TopAppBarSection.js.map +1 -1
- package/TopAppBar/TopAppBarTitle.js +1 -8
- package/TopAppBar/TopAppBarTitle.js.map +1 -1
- package/TopAppBar/index.js +0 -14
- package/TopAppBar/index.js.map +1 -1
- package/TopProgressBar/TopProgressBar.js +0 -5
- package/TopProgressBar/TopProgressBar.js.map +1 -1
- package/TopProgressBar/TopProgressBar.stories.js +1 -8
- package/TopProgressBar/TopProgressBar.stories.js.map +1 -1
- package/TopProgressBar/hoc/index.js +0 -2
- package/TopProgressBar/hoc/index.js.map +1 -1
- package/TopProgressBar/hoc/withTopProgressBar.js +2 -8
- package/TopProgressBar/hoc/withTopProgressBar.js.map +1 -1
- package/TopProgressBar/index.js +0 -2
- package/TopProgressBar/index.js.map +1 -1
- package/Typography/Typography.js +0 -5
- package/Typography/Typography.js.map +1 -1
- package/Typography/Typography.stories.js +0 -6
- package/Typography/Typography.stories.js.map +1 -1
- package/Typography/index.js +0 -2
- package/Typography/index.js.map +1 -1
- package/package.json +16 -15
package/Drawer/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Drawer\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Drawer\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,34 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
|
-
|
|
12
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
-
|
|
14
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
-
|
|
16
11
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
17
|
-
|
|
18
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
19
|
-
|
|
20
13
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
21
|
-
|
|
22
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
|
-
|
|
24
15
|
var _react = _interopRequireDefault(require("react"));
|
|
25
|
-
|
|
26
16
|
var _dotPropImmutable = _interopRequireDefault(require("dot-prop-immutable"));
|
|
27
|
-
|
|
28
17
|
var _FormElementMessage = require("../FormElementMessage");
|
|
29
|
-
|
|
30
18
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
31
|
-
|
|
32
19
|
var DynamicFieldsetRow = /*#__PURE__*/(0, _styled.default)("div", {
|
|
33
20
|
target: "eqcnudi0",
|
|
34
21
|
label: "DynamicFieldsetRow"
|
|
@@ -41,21 +28,15 @@ var DynamicFieldsetRow = /*#__PURE__*/(0, _styled.default)("div", {
|
|
|
41
28
|
}
|
|
42
29
|
}
|
|
43
30
|
});
|
|
44
|
-
|
|
45
31
|
var Fieldset = /*#__PURE__*/function (_React$Component) {
|
|
46
32
|
(0, _inherits2.default)(Fieldset, _React$Component);
|
|
47
|
-
|
|
48
33
|
var _super = (0, _createSuper2.default)(Fieldset);
|
|
49
|
-
|
|
50
34
|
function Fieldset() {
|
|
51
35
|
var _this;
|
|
52
|
-
|
|
53
36
|
(0, _classCallCheck2.default)(this, Fieldset);
|
|
54
|
-
|
|
55
37
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
56
38
|
args[_key] = arguments[_key];
|
|
57
39
|
}
|
|
58
|
-
|
|
59
40
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
60
41
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "header", null);
|
|
61
42
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "rows", null);
|
|
@@ -76,19 +57,17 @@ var Fieldset = /*#__PURE__*/function (_React$Component) {
|
|
|
76
57
|
});
|
|
77
58
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "removeData", function (index) {
|
|
78
59
|
var _this$props = _this.props,
|
|
79
|
-
|
|
80
|
-
|
|
60
|
+
value = _this$props.value,
|
|
61
|
+
onChange = _this$props.onChange;
|
|
81
62
|
onChange(_dotPropImmutable.default.delete(value, index));
|
|
82
63
|
});
|
|
83
64
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "addData", function () {
|
|
84
65
|
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
|
|
85
66
|
var onChange = _this.props.onChange;
|
|
86
67
|
var value = _this.props.value;
|
|
87
|
-
|
|
88
68
|
if (!value) {
|
|
89
69
|
value = [];
|
|
90
70
|
}
|
|
91
|
-
|
|
92
71
|
if (index < 0) {
|
|
93
72
|
onChange([].concat((0, _toConsumableArray2.default)(value), [{}]));
|
|
94
73
|
} else {
|
|
@@ -101,11 +80,9 @@ var Fieldset = /*#__PURE__*/function (_React$Component) {
|
|
|
101
80
|
});
|
|
102
81
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderRow", function (cb) {
|
|
103
82
|
var value = _this.props.value;
|
|
104
|
-
|
|
105
83
|
if (!value) {
|
|
106
84
|
return null;
|
|
107
85
|
}
|
|
108
|
-
|
|
109
86
|
_this.rows = value.map(function (record, index) {
|
|
110
87
|
return /*#__PURE__*/_react.default.createElement(DynamicFieldsetRow, {
|
|
111
88
|
key: index
|
|
@@ -122,7 +99,6 @@ var Fieldset = /*#__PURE__*/function (_React$Component) {
|
|
|
122
99
|
});
|
|
123
100
|
return _this;
|
|
124
101
|
}
|
|
125
|
-
|
|
126
102
|
(0, _createClass2.default)(Fieldset, [{
|
|
127
103
|
key: "renderComponent",
|
|
128
104
|
value: function renderComponent() {
|
|
@@ -134,22 +110,20 @@ var Fieldset = /*#__PURE__*/function (_React$Component) {
|
|
|
134
110
|
row: this.renderRow,
|
|
135
111
|
empty: this.renderEmpty
|
|
136
112
|
});
|
|
137
|
-
|
|
138
113
|
if (!value || value.length === 0) {
|
|
139
114
|
return this.empty;
|
|
140
115
|
}
|
|
141
|
-
|
|
142
116
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, this.header, this.rows);
|
|
143
117
|
}
|
|
144
118
|
}, {
|
|
145
119
|
key: "render",
|
|
146
120
|
value: function render() {
|
|
147
121
|
var _this$props2 = this.props,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
122
|
+
description = _this$props2.description,
|
|
123
|
+
_this$props2$validati = _this$props2.validation,
|
|
124
|
+
validation = _this$props2$validati === void 0 ? {
|
|
125
|
+
isValid: null
|
|
126
|
+
} : _this$props2$validati;
|
|
153
127
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, this.renderComponent(), validation.isValid === false && /*#__PURE__*/_react.default.createElement(_FormElementMessage.FormElementMessage, {
|
|
154
128
|
error: true
|
|
155
129
|
}, validation.message), validation.isValid !== false && description && /*#__PURE__*/_react.default.createElement(_FormElementMessage.FormElementMessage, null, description));
|
|
@@ -157,7 +131,6 @@ var Fieldset = /*#__PURE__*/function (_React$Component) {
|
|
|
157
131
|
}]);
|
|
158
132
|
return Fieldset;
|
|
159
133
|
}(_react.default.Component);
|
|
160
|
-
|
|
161
134
|
(0, _defineProperty2.default)(Fieldset, "defaultProps", {
|
|
162
135
|
value: []
|
|
163
136
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DynamicFieldsetRow","styled","paddingBottom","padding","display","Fieldset","add","index","addData","remove","removeData","props","value","onChange","dotProp","delete","slice","cb","header","rows","map","record","data","empty","children","actions","renderHeader","row","renderRow","renderEmpty","length","description","validation","isValid","renderComponent","message","React","Component"],"sources":["Fieldset.tsx"],"sourcesContent":["import React from \"react\";\nimport dotProp from \"dot-prop-immutable\";\nimport { FormElementMessage } from \"~/FormElementMessage\";\nimport styled from \"@emotion/styled\";\n\ninterface ChildrenRenderPropRowCallableParams {\n index: number;\n data: any;\n}\ninterface ChildrenRenderPropRowCallable {\n (params: ChildrenRenderPropRowCallableParams): React.ReactNode;\n}\n\ninterface ChildrenRenderPropHeaderCallable {\n (): React.ReactNode;\n}\ninterface ChildrenRenderPropEmptyCallable {\n (): React.ReactNode;\n}\ninterface ChildrenRenderProp {\n actions: {\n add: Function;\n remove: Function;\n };\n header: (cb: ChildrenRenderPropHeaderCallable) => React.ReactNode;\n row: (cb: ChildrenRenderPropRowCallable) => React.ReactNode;\n empty: (cb: ChildrenRenderPropEmptyCallable) => React.ReactNode;\n}\n\ninterface FieldsetProps {\n value?: any[];\n description?: string;\n validation?: { isValid: null | boolean; message?: string };\n onChange: Function;\n children: (props: ChildrenRenderProp) => React.ReactNode;\n}\n\nconst DynamicFieldsetRow = styled(\"div\")({\n paddingBottom: 10,\n \"> .mdc-layout-grid\": {\n padding: 0,\n \"> .mdc-layout-grid__inner\": {\n display: \"block\"\n }\n }\n});\n\nclass Fieldset extends React.Component<FieldsetProps> {\n static defaultProps: Partial<FieldsetProps> = {\n value: []\n };\n\n header: React.ReactNode = null;\n rows: React.ReactNode = null;\n empty: React.ReactNode = null;\n\n actions = {\n add:\n (index = -1) =>\n () =>\n this.addData(index),\n remove:\n (index = -1) =>\n () =>\n this.removeData(index)\n };\n\n removeData = (index: number) => {\n const { value, onChange } = this.props;\n onChange(dotProp.delete(value, index));\n };\n\n addData = (index = -1) => {\n const { onChange } = this.props;\n let value = this.props.value;\n if (!value) {\n value = [];\n }\n if (index < 0) {\n onChange([...value, {}]);\n } else {\n onChange([...value.slice(0, index + 1), {}, ...value.slice(index + 1)]);\n }\n };\n\n renderHeader = (cb: () => React.ReactNode): React.ReactNode => {\n this.header = cb();\n return null;\n };\n\n renderRow = (cb: ChildrenRenderPropRowCallable): React.ReactNode => {\n const { value } = this.props;\n if (!value) {\n return null;\n }\n this.rows = value.map((record, index) => {\n return (\n <DynamicFieldsetRow key={index}>{cb({ data: record, index })}</DynamicFieldsetRow>\n );\n });\n return null;\n };\n\n renderEmpty = (cb: () => React.ReactNode): React.ReactNode => {\n this.empty = cb();\n return null;\n };\n\n public renderComponent(): React.ReactNode {\n const { value } = this.props;\n const { children } = this.props;\n\n children({\n actions: this.actions,\n header: this.renderHeader,\n row: this.renderRow,\n empty: this.renderEmpty\n });\n\n if (!value || value.length === 0) {\n return this.empty;\n }\n\n return (\n <React.Fragment>\n {this.header}\n {this.rows}\n </React.Fragment>\n );\n }\n\n public override render() {\n const { description, validation = { isValid: null } } = this.props;\n\n return (\n <>\n {this.renderComponent()}\n {validation.isValid === false && (\n <FormElementMessage error>{validation.message}</FormElementMessage>\n )}\n\n {validation.isValid !== false && description && (\n <FormElementMessage>{description}</FormElementMessage>\n )}\n </>\n );\n }\n}\n\nexport default Fieldset;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["DynamicFieldsetRow","styled","paddingBottom","padding","display","Fieldset","add","index","addData","remove","removeData","props","value","onChange","dotProp","delete","slice","cb","header","rows","map","record","data","empty","children","actions","renderHeader","row","renderRow","renderEmpty","length","description","validation","isValid","renderComponent","message","React","Component"],"sources":["Fieldset.tsx"],"sourcesContent":["import React from \"react\";\nimport dotProp from \"dot-prop-immutable\";\nimport { FormElementMessage } from \"~/FormElementMessage\";\nimport styled from \"@emotion/styled\";\n\ninterface ChildrenRenderPropRowCallableParams {\n index: number;\n data: any;\n}\ninterface ChildrenRenderPropRowCallable {\n (params: ChildrenRenderPropRowCallableParams): React.ReactNode;\n}\n\ninterface ChildrenRenderPropHeaderCallable {\n (): React.ReactNode;\n}\ninterface ChildrenRenderPropEmptyCallable {\n (): React.ReactNode;\n}\ninterface ChildrenRenderProp {\n actions: {\n add: Function;\n remove: Function;\n };\n header: (cb: ChildrenRenderPropHeaderCallable) => React.ReactNode;\n row: (cb: ChildrenRenderPropRowCallable) => React.ReactNode;\n empty: (cb: ChildrenRenderPropEmptyCallable) => React.ReactNode;\n}\n\ninterface FieldsetProps {\n value?: any[];\n description?: string;\n validation?: { isValid: null | boolean; message?: string };\n onChange: Function;\n children: (props: ChildrenRenderProp) => React.ReactNode;\n}\n\nconst DynamicFieldsetRow = styled(\"div\")({\n paddingBottom: 10,\n \"> .mdc-layout-grid\": {\n padding: 0,\n \"> .mdc-layout-grid__inner\": {\n display: \"block\"\n }\n }\n});\n\nclass Fieldset extends React.Component<FieldsetProps> {\n static defaultProps: Partial<FieldsetProps> = {\n value: []\n };\n\n header: React.ReactNode = null;\n rows: React.ReactNode = null;\n empty: React.ReactNode = null;\n\n actions = {\n add:\n (index = -1) =>\n () =>\n this.addData(index),\n remove:\n (index = -1) =>\n () =>\n this.removeData(index)\n };\n\n removeData = (index: number) => {\n const { value, onChange } = this.props;\n onChange(dotProp.delete(value, index));\n };\n\n addData = (index = -1) => {\n const { onChange } = this.props;\n let value = this.props.value;\n if (!value) {\n value = [];\n }\n if (index < 0) {\n onChange([...value, {}]);\n } else {\n onChange([...value.slice(0, index + 1), {}, ...value.slice(index + 1)]);\n }\n };\n\n renderHeader = (cb: () => React.ReactNode): React.ReactNode => {\n this.header = cb();\n return null;\n };\n\n renderRow = (cb: ChildrenRenderPropRowCallable): React.ReactNode => {\n const { value } = this.props;\n if (!value) {\n return null;\n }\n this.rows = value.map((record, index) => {\n return (\n <DynamicFieldsetRow key={index}>{cb({ data: record, index })}</DynamicFieldsetRow>\n );\n });\n return null;\n };\n\n renderEmpty = (cb: () => React.ReactNode): React.ReactNode => {\n this.empty = cb();\n return null;\n };\n\n public renderComponent(): React.ReactNode {\n const { value } = this.props;\n const { children } = this.props;\n\n children({\n actions: this.actions,\n header: this.renderHeader,\n row: this.renderRow,\n empty: this.renderEmpty\n });\n\n if (!value || value.length === 0) {\n return this.empty;\n }\n\n return (\n <React.Fragment>\n {this.header}\n {this.rows}\n </React.Fragment>\n );\n }\n\n public override render() {\n const { description, validation = { isValid: null } } = this.props;\n\n return (\n <>\n {this.renderComponent()}\n {validation.isValid === false && (\n <FormElementMessage error>{validation.message}</FormElementMessage>\n )}\n\n {validation.isValid !== false && description && (\n <FormElementMessage>{description}</FormElementMessage>\n )}\n </>\n );\n }\n}\n\nexport default Fieldset;\n"],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AAkCA,IAAMA,kBAAkB,oBAAGC,eAAM,EAAC,KAAK;EAAA;EAAA;AAAA,GAAE;EACrCC,aAAa,EAAE,EAAE;EACjB,oBAAoB,EAAE;IAClBC,OAAO,EAAE,CAAC;IACV,2BAA2B,EAAE;MACzBC,OAAO,EAAE;IACb;EACJ;AACJ,CAAC,CAAC;AAAC,IAEGC,QAAQ;EAAA;EAAA;EAAA;IAAA;IAAA;IAAA;MAAA;IAAA;IAAA;IAAA,qFAKgB,IAAI;IAAA,mFACN,IAAI;IAAA,oFACH,IAAI;IAAA,sFAEnB;MACNC,GAAG,EACC;QAAA,IAACC,KAAK,uEAAG,CAAC,CAAC;QAAA,OACX;UAAA,OACI,MAAKC,OAAO,CAACD,KAAK,CAAC;QAAA;MAAA;MAC3BE,MAAM,EACF;QAAA,IAACF,KAAK,uEAAG,CAAC,CAAC;QAAA,OACX;UAAA,OACI,MAAKG,UAAU,CAACH,KAAK,CAAC;QAAA;MAAA;IAClC,CAAC;IAAA,yFAEY,UAACA,KAAa,EAAK;MAC5B,kBAA4B,MAAKI,KAAK;QAA9BC,KAAK,eAALA,KAAK;QAAEC,QAAQ,eAARA,QAAQ;MACvBA,QAAQ,CAACC,yBAAO,CAACC,MAAM,CAACH,KAAK,EAAEL,KAAK,CAAC,CAAC;IAC1C,CAAC;IAAA,sFAES,YAAgB;MAAA,IAAfA,KAAK,uEAAG,CAAC,CAAC;MACjB,IAAQM,QAAQ,GAAK,MAAKF,KAAK,CAAvBE,QAAQ;MAChB,IAAID,KAAK,GAAG,MAAKD,KAAK,CAACC,KAAK;MAC5B,IAAI,CAACA,KAAK,EAAE;QACRA,KAAK,GAAG,EAAE;MACd;MACA,IAAIL,KAAK,GAAG,CAAC,EAAE;QACXM,QAAQ,4CAAKD,KAAK,IAAE,CAAC,CAAC,GAAE;MAC5B,CAAC,MAAM;QACHC,QAAQ,4CAAKD,KAAK,CAACI,KAAK,CAAC,CAAC,EAAET,KAAK,GAAG,CAAC,CAAC,IAAE,CAAC,CAAC,oCAAKK,KAAK,CAACI,KAAK,CAACT,KAAK,GAAG,CAAC,CAAC,GAAE;MAC3E;IACJ,CAAC;IAAA,2FAEc,UAACU,EAAyB,EAAsB;MAC3D,MAAKC,MAAM,GAAGD,EAAE,EAAE;MAClB,OAAO,IAAI;IACf,CAAC;IAAA,wFAEW,UAACA,EAAiC,EAAsB;MAChE,IAAQL,KAAK,GAAK,MAAKD,KAAK,CAApBC,KAAK;MACb,IAAI,CAACA,KAAK,EAAE;QACR,OAAO,IAAI;MACf;MACA,MAAKO,IAAI,GAAGP,KAAK,CAACQ,GAAG,CAAC,UAACC,MAAM,EAAEd,KAAK,EAAK;QACrC,oBACI,6BAAC,kBAAkB;UAAC,GAAG,EAAEA;QAAM,GAAEU,EAAE,CAAC;UAAEK,IAAI,EAAED,MAAM;UAAEd,KAAK,EAALA;QAAM,CAAC,CAAC,CAAsB;MAE1F,CAAC,CAAC;MACF,OAAO,IAAI;IACf,CAAC;IAAA,0FAEa,UAACU,EAAyB,EAAsB;MAC1D,MAAKM,KAAK,GAAGN,EAAE,EAAE;MACjB,OAAO,IAAI;IACf,CAAC;IAAA;EAAA;EAAA;IAAA;IAAA,OAED,2BAA0C;MACtC,IAAQL,KAAK,GAAK,IAAI,CAACD,KAAK,CAApBC,KAAK;MACb,IAAQY,QAAQ,GAAK,IAAI,CAACb,KAAK,CAAvBa,QAAQ;MAEhBA,QAAQ,CAAC;QACLC,OAAO,EAAE,IAAI,CAACA,OAAO;QACrBP,MAAM,EAAE,IAAI,CAACQ,YAAY;QACzBC,GAAG,EAAE,IAAI,CAACC,SAAS;QACnBL,KAAK,EAAE,IAAI,CAACM;MAChB,CAAC,CAAC;MAEF,IAAI,CAACjB,KAAK,IAAIA,KAAK,CAACkB,MAAM,KAAK,CAAC,EAAE;QAC9B,OAAO,IAAI,CAACP,KAAK;MACrB;MAEA,oBACI,6BAAC,cAAK,CAAC,QAAQ,QACV,IAAI,CAACL,MAAM,EACX,IAAI,CAACC,IAAI,CACG;IAEzB;EAAC;IAAA;IAAA,OAED,kBAAyB;MACrB,mBAAwD,IAAI,CAACR,KAAK;QAA1DoB,WAAW,gBAAXA,WAAW;QAAA,qCAAEC,UAAU;QAAVA,UAAU,sCAAG;UAAEC,OAAO,EAAE;QAAK,CAAC;MAEnD,oBACI,4DACK,IAAI,CAACC,eAAe,EAAE,EACtBF,UAAU,CAACC,OAAO,KAAK,KAAK,iBACzB,6BAAC,sCAAkB;QAAC,KAAK;MAAA,GAAED,UAAU,CAACG,OAAO,CAChD,EAEAH,UAAU,CAACC,OAAO,KAAK,KAAK,IAAIF,WAAW,iBACxC,6BAAC,sCAAkB,QAAEA,WAAW,CACnC,CACF;IAEX;EAAC;EAAA;AAAA,EAnGkBK,cAAK,CAACC,SAAS;AAAA,8BAAhChC,QAAQ,kBACoC;EAC1CO,KAAK,EAAE;AACX,CAAC;AAAA,eAmGUP,QAAQ;AAAA"}
|
package/DynamicFieldset/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -11,5 +10,4 @@ Object.defineProperty(exports, "DynamicFieldset", {
|
|
|
11
10
|
return _Fieldset.default;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
|
-
|
|
15
13
|
var _Fieldset = _interopRequireDefault(require("./Fieldset"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default as DynamicFieldset } from \"./Fieldset\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default as DynamicFieldset } from \"./Fieldset\";\n"],"mappings":";;;;;;;;;;;;AAAA"}
|
package/Elevation/Elevation.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.Elevation = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
var _elevation = require("@rmwc/elevation");
|
|
13
|
-
|
|
14
10
|
/**
|
|
15
11
|
* Elevation component visually raises any content by applying shadow.
|
|
16
12
|
*/
|
|
@@ -19,6 +15,5 @@ var Elevation = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
19
15
|
ref: ref
|
|
20
16
|
}, props), props.children);
|
|
21
17
|
});
|
|
22
|
-
|
|
23
18
|
exports.Elevation = Elevation;
|
|
24
19
|
Elevation.displayName = "Elevation";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Elevation","React","forwardRef","props","ref","children","displayName"],"sources":["Elevation.tsx"],"sourcesContent":["import React from \"react\";\nimport { Elevation as RmwcElevation } from \"@rmwc/elevation\";\n\nexport type ElevationProps = {\n // Any element that needs to be highlighted.\n children?: React.ReactNode;\n\n // Increasing this number (from 0 to 24) will increase the amount of shadow applied.\n z: number;\n\n // Adds smooth transitions when the z value changes.\n transition?: boolean;\n\n // CSS class name\n className?: string;\n\n // Style object\n style?: React.CSSProperties;\n};\n\n/**\n * Elevation component visually raises any content by applying shadow.\n */\nconst Elevation = React.forwardRef((props: ElevationProps, ref: React.Ref<any>) => {\n return (\n <RmwcElevation ref={ref} {...props}>\n {props.children}\n </RmwcElevation>\n );\n});\n\nElevation.displayName = \"Elevation\";\n\nexport { Elevation };\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["Elevation","React","forwardRef","props","ref","children","displayName"],"sources":["Elevation.tsx"],"sourcesContent":["import React from \"react\";\nimport { Elevation as RmwcElevation } from \"@rmwc/elevation\";\n\nexport type ElevationProps = {\n // Any element that needs to be highlighted.\n children?: React.ReactNode;\n\n // Increasing this number (from 0 to 24) will increase the amount of shadow applied.\n z: number;\n\n // Adds smooth transitions when the z value changes.\n transition?: boolean;\n\n // CSS class name\n className?: string;\n\n // Style object\n style?: React.CSSProperties;\n};\n\n/**\n * Elevation component visually raises any content by applying shadow.\n */\nconst Elevation = React.forwardRef((props: ElevationProps, ref: React.Ref<any>) => {\n return (\n <RmwcElevation ref={ref} {...props}>\n {props.children}\n </RmwcElevation>\n );\n});\n\nElevation.displayName = \"Elevation\";\n\nexport { Elevation };\n"],"mappings":";;;;;;;AAAA;AACA;AAmBA;AACA;AACA;AACA,IAAMA,SAAS,gBAAGC,cAAK,CAACC,UAAU,CAAC,UAACC,KAAqB,EAAEC,GAAmB,EAAK;EAC/E,oBACI,6BAAC,oBAAa;IAAC,GAAG,EAAEA;EAAI,GAAKD,KAAK,GAC7BA,KAAK,CAACE,QAAQ,CACH;AAExB,CAAC,CAAC;AAAC;AAEHL,SAAS,CAACM,WAAW,GAAG,WAAW"}
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
6
|
-
|
|
7
5
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
|
|
9
6
|
var _react2 = require("@storybook/react");
|
|
10
|
-
|
|
11
7
|
var _Story = require("@webiny/storybook-utils/Story");
|
|
12
|
-
|
|
13
8
|
var _README = _interopRequireDefault(require("./../Elevation/README.md"));
|
|
14
|
-
|
|
15
9
|
var _addonKnobs = require("@storybook/addon-knobs");
|
|
16
|
-
|
|
17
10
|
var _Elevation = require("./Elevation");
|
|
18
|
-
|
|
19
11
|
var story = (0, _react2.storiesOf)("Components/Elevation", module);
|
|
20
12
|
story.addDecorator(_addonKnobs.withKnobs);
|
|
21
13
|
story.add("usage", function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["story","storiesOf","module","addDecorator","withKnobs","add","transition","boolean","z","select","Array","keys","style","padding","backgroundColor","readme","info","propTables","Elevation"],"sources":["Elevation.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport { storiesOf } from \"@storybook/react\";\nimport {\n Story,\n StoryReadme,\n StorySandboxCode,\n StorySandbox,\n StorySandboxExample\n} from \"@webiny/storybook-utils/Story\";\nimport readme from \"./../Elevation/README.md\";\nimport { withKnobs, boolean, select } from \"@storybook/addon-knobs\";\nimport { Elevation } from \"./Elevation\";\n\nconst story = storiesOf(\"Components/Elevation\", module);\nstory.addDecorator(withKnobs);\n\nstory.add(\n \"usage\",\n () => {\n const transition = boolean(\"Transition\", true);\n const z = select(\"Z (elevation height)\", [...Array(25).keys()], 1);\n\n const style = {\n padding: 20,\n backgroundColor: \"white\"\n };\n\n return (\n <Story>\n <StoryReadme>{readme}</StoryReadme>\n <StorySandbox title={\"An area with applied elevation\"}>\n <StorySandboxExample>\n <Elevation z={z} transition={transition}>\n <div style={style}>This is an elevated content.</div>\n </Elevation>\n </StorySandboxExample>\n <StorySandboxCode>\n {`\n <Elevation z={${z}} transition={${transition}}>\n <div>This is an elevated content.</div>\n </Elevation>\n `}\n </StorySandboxCode>\n </StorySandbox>\n </Story>\n );\n },\n { info: { propTables: [Elevation] } }\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["story","storiesOf","module","addDecorator","withKnobs","add","transition","boolean","z","select","Array","keys","style","padding","backgroundColor","readme","info","propTables","Elevation"],"sources":["Elevation.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport { storiesOf } from \"@storybook/react\";\nimport {\n Story,\n StoryReadme,\n StorySandboxCode,\n StorySandbox,\n StorySandboxExample\n} from \"@webiny/storybook-utils/Story\";\nimport readme from \"./../Elevation/README.md\";\nimport { withKnobs, boolean, select } from \"@storybook/addon-knobs\";\nimport { Elevation } from \"./Elevation\";\n\nconst story = storiesOf(\"Components/Elevation\", module);\nstory.addDecorator(withKnobs);\n\nstory.add(\n \"usage\",\n () => {\n const transition = boolean(\"Transition\", true);\n const z = select(\"Z (elevation height)\", [...Array(25).keys()], 1);\n\n const style = {\n padding: 20,\n backgroundColor: \"white\"\n };\n\n return (\n <Story>\n <StoryReadme>{readme}</StoryReadme>\n <StorySandbox title={\"An area with applied elevation\"}>\n <StorySandboxExample>\n <Elevation z={z} transition={transition}>\n <div style={style}>This is an elevated content.</div>\n </Elevation>\n </StorySandboxExample>\n <StorySandboxCode>\n {`\n <Elevation z={${z}} transition={${transition}}>\n <div>This is an elevated content.</div>\n </Elevation>\n `}\n </StorySandboxCode>\n </StorySandbox>\n </Story>\n );\n },\n { info: { propTables: [Elevation] } }\n);\n"],"mappings":";;;;AAAA;AACA;AACA;AAOA;AACA;AACA;AAEA,IAAMA,KAAK,GAAG,IAAAC,iBAAS,EAAC,sBAAsB,EAAEC,MAAM,CAAC;AACvDF,KAAK,CAACG,YAAY,CAACC,qBAAS,CAAC;AAE7BJ,KAAK,CAACK,GAAG,CACL,OAAO,EACP,YAAM;EACF,IAAMC,UAAU,GAAG,IAAAC,mBAAO,EAAC,YAAY,EAAE,IAAI,CAAC;EAC9C,IAAMC,CAAC,GAAG,IAAAC,kBAAM,EAAC,sBAAsB,mCAAMC,KAAK,CAAC,EAAE,CAAC,CAACC,IAAI,EAAE,GAAG,CAAC,CAAC;EAElE,IAAMC,KAAK,GAAG;IACVC,OAAO,EAAE,EAAE;IACXC,eAAe,EAAE;EACrB,CAAC;EAED,oBACI,6BAAC,YAAK,qBACF,6BAAC,kBAAW,QAAEC,eAAM,CAAe,eACnC,6BAAC,mBAAY;IAAC,KAAK,EAAE;EAAiC,gBAClD,6BAAC,0BAAmB,qBAChB,6BAAC,oBAAS;IAAC,CAAC,EAAEP,CAAE;IAAC,UAAU,EAAEF;EAAW,gBACpC;IAAK,KAAK,EAAEM;EAAM,GAAC,8BAA4B,CAAM,CAC7C,CACM,eACtB,6BAAC,uBAAgB,0DAEGJ,CAAC,2BAAiBF,UAAU,yIAI7B,CACR,CACX;AAEhB,CAAC,EACD;EAAEU,IAAI,EAAE;IAAEC,UAAU,EAAE,CAACC,oBAAS;EAAE;AAAE,CAAC,CACxC"}
|
package/Elevation/index.js
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
var _Elevation = require("./Elevation");
|
|
8
|
-
|
|
9
7
|
Object.keys(_Elevation).forEach(function (key) {
|
|
10
8
|
if (key === "default" || key === "__esModule") return;
|
|
11
9
|
if (key in exports && exports[key] === _Elevation[key]) return;
|
package/Elevation/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Elevation\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Elevation\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.FormElementMessage = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var FormElementMessage = function FormElementMessage(props) {
|
|
15
11
|
var classNames = (0, _classnames.default)("mdc-text-field-helper-text mdc-text-field-helper-text--persistent", props.className, {
|
|
16
12
|
"mdc-text-field-helper-text--error": props.error
|
|
@@ -19,5 +15,4 @@ var FormElementMessage = function FormElementMessage(props) {
|
|
|
19
15
|
className: classNames
|
|
20
16
|
}, props.children);
|
|
21
17
|
};
|
|
22
|
-
|
|
23
18
|
exports.FormElementMessage = FormElementMessage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FormElementMessage","props","classNames","classnames","className","error","children"],"sources":["FormElementMessage.tsx"],"sourcesContent":["import React from \"react\";\nimport classnames from \"classnames\";\n\ntype Props = {\n // message to display\n children: React.ReactNode;\n\n // optional class name\n className?: string;\n\n // is it an error message we're displaying\n error?: boolean;\n};\n\nconst FormElementMessage = (props: Props) => {\n const classNames = classnames(\n \"mdc-text-field-helper-text mdc-text-field-helper-text--persistent\",\n props.className,\n { \"mdc-text-field-helper-text--error\": props.error }\n );\n\n return <div className={classNames}>{props.children}</div>;\n};\n\nexport { FormElementMessage };\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["FormElementMessage","props","classNames","classnames","className","error","children"],"sources":["FormElementMessage.tsx"],"sourcesContent":["import React from \"react\";\nimport classnames from \"classnames\";\n\ntype Props = {\n // message to display\n children: React.ReactNode;\n\n // optional class name\n className?: string;\n\n // is it an error message we're displaying\n error?: boolean;\n};\n\nconst FormElementMessage = (props: Props) => {\n const classNames = classnames(\n \"mdc-text-field-helper-text mdc-text-field-helper-text--persistent\",\n props.className,\n { \"mdc-text-field-helper-text--error\": props.error }\n );\n\n return <div className={classNames}>{props.children}</div>;\n};\n\nexport { FormElementMessage };\n"],"mappings":";;;;;;;AAAA;AACA;AAaA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkB,CAAIC,KAAY,EAAK;EACzC,IAAMC,UAAU,GAAG,IAAAC,mBAAU,EACzB,mEAAmE,EACnEF,KAAK,CAACG,SAAS,EACf;IAAE,mCAAmC,EAAEH,KAAK,CAACI;EAAM,CAAC,CACvD;EAED,oBAAO;IAAK,SAAS,EAAEH;EAAW,GAAED,KAAK,CAACK,QAAQ,CAAO;AAC7D,CAAC;AAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { FormElementMessage } from \"./FormElementMessage\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { FormElementMessage } from \"./FormElementMessage\";\n"],"mappings":";;;;;;;;;;;AAAA"}
|
package/FullName/FullName.js
CHANGED
|
@@ -4,25 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.FullName = void 0;
|
|
7
|
-
|
|
8
7
|
var FullName = function FullName(props) {
|
|
9
8
|
var data = props.data;
|
|
10
|
-
|
|
11
9
|
if (!data) {
|
|
12
10
|
return "N/A";
|
|
13
11
|
}
|
|
14
|
-
|
|
15
12
|
var output = "";
|
|
16
|
-
|
|
17
13
|
if (data.firstName) {
|
|
18
14
|
output += data.firstName;
|
|
19
15
|
}
|
|
20
|
-
|
|
21
16
|
if (data.lastName) {
|
|
22
17
|
output += " " + data.lastName;
|
|
23
18
|
}
|
|
24
|
-
|
|
25
19
|
return output;
|
|
26
20
|
};
|
|
27
|
-
|
|
28
21
|
exports.FullName = FullName;
|
package/FullName/FullName.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FullName","props","data","output","firstName","lastName"],"sources":["FullName.ts"],"sourcesContent":["type Props = {\n data?: {\n firstName?: string;\n lastName?: string;\n };\n};\n\nconst FullName = (props: Props) => {\n const { data } = props;\n\n if (!data) {\n return \"N/A\";\n }\n\n let output = \"\";\n if (data.firstName) {\n output += data.firstName;\n }\n\n if (data.lastName) {\n output += \" \" + data.lastName;\n }\n\n return output;\n};\n\nexport { FullName };\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["FullName","props","data","output","firstName","lastName"],"sources":["FullName.ts"],"sourcesContent":["type Props = {\n data?: {\n firstName?: string;\n lastName?: string;\n };\n};\n\nconst FullName = (props: Props) => {\n const { data } = props;\n\n if (!data) {\n return \"N/A\";\n }\n\n let output = \"\";\n if (data.firstName) {\n output += data.firstName;\n }\n\n if (data.lastName) {\n output += \" \" + data.lastName;\n }\n\n return output;\n};\n\nexport { FullName };\n"],"mappings":";;;;;;AAOA,IAAMA,QAAQ,GAAG,SAAXA,QAAQ,CAAIC,KAAY,EAAK;EAC/B,IAAQC,IAAI,GAAKD,KAAK,CAAdC,IAAI;EAEZ,IAAI,CAACA,IAAI,EAAE;IACP,OAAO,KAAK;EAChB;EAEA,IAAIC,MAAM,GAAG,EAAE;EACf,IAAID,IAAI,CAACE,SAAS,EAAE;IAChBD,MAAM,IAAID,IAAI,CAACE,SAAS;EAC5B;EAEA,IAAIF,IAAI,CAACG,QAAQ,EAAE;IACfF,MAAM,IAAI,GAAG,GAAGD,IAAI,CAACG,QAAQ;EACjC;EAEA,OAAOF,MAAM;AACjB,CAAC;AAAC"}
|
package/FullName/index.js
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
var _FullName = require("./FullName");
|
|
8
|
-
|
|
9
7
|
Object.keys(_FullName).forEach(function (key) {
|
|
10
8
|
if (key === "default" || key === "__esModule") return;
|
|
11
9
|
if (key in exports && exports[key] === _FullName[key]) return;
|
package/FullName/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./FullName\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./FullName\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
package/Grid/Grid.js
CHANGED
|
@@ -1,37 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.GridInner = exports.Grid = exports.Cell = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
var _grid = require("@rmwc/grid");
|
|
13
|
-
|
|
14
10
|
/**
|
|
15
11
|
* Cell must be direct children of Grid component.
|
|
16
12
|
*/
|
|
17
13
|
var Cell = function Cell(props) {
|
|
18
14
|
return /*#__PURE__*/_react.default.createElement(_grid.GridCell, props, props.children);
|
|
19
15
|
};
|
|
20
|
-
|
|
21
16
|
exports.Cell = Cell;
|
|
22
|
-
|
|
23
17
|
var GridInner = function GridInner(props) {
|
|
24
18
|
return /*#__PURE__*/_react.default.createElement(_grid.GridRow, props, props.children);
|
|
25
19
|
};
|
|
26
|
-
|
|
27
20
|
exports.GridInner = GridInner;
|
|
28
21
|
GridInner.displayName = "GridInner";
|
|
22
|
+
|
|
29
23
|
/**
|
|
30
24
|
* Use Grid component to display a list of choices, once the handler is triggered.
|
|
31
25
|
*/
|
|
32
|
-
|
|
33
26
|
var Grid = function Grid(props) {
|
|
34
27
|
return /*#__PURE__*/_react.default.createElement(_grid.Grid, props, props.children);
|
|
35
28
|
};
|
|
36
|
-
|
|
37
29
|
exports.Grid = Grid;
|
package/Grid/Grid.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Cell","props","children","GridInner","displayName","Grid"],"sources":["Grid.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n Grid as RmwcGrid,\n GridCell as RmwcGridCell,\n GridRow as RmwcGridInner,\n GridCellProps as RmwcGridCellProps,\n GridProps as RmwcGridProps\n} from \"@rmwc/grid\";\nimport { CSSProperties } from \"react\";\n\nexport type CellProps = RmwcGridCellProps & {\n // One or more Cell components.\n children?: React.ReactNode;\n\n // CSS class name that will be added to the element\n className?: string;\n\n style?: { [key: string]: any };\n};\n\nexport type GridProps = RmwcGridProps & {\n className?: string;\n style?: CSSProperties;\n};\n\n/**\n * Cell must be direct children of Grid component.\n */\nexport const Cell = (props: CellProps) => {\n return <RmwcGridCell {...props}>{props.children}</RmwcGridCell>;\n};\n\nexport type GridInnerProps = {\n // One or more Cell components.\n children: React.ReactElement<typeof Cell> | React.ReactElement<typeof Cell>[];\n\n /**\n * CSS class name\n */\n className?: string;\n};\n\nexport const GridInner = (props: GridInnerProps) => {\n return <RmwcGridInner {...props}>{props.children}</RmwcGridInner>;\n};\n\nGridInner.displayName = \"GridInner\";\n\n/**\n * Use Grid component to display a list of choices, once the handler is triggered.\n */\nexport const Grid = (props: GridProps) => {\n return <RmwcGrid {...props}>{props.children}</RmwcGrid>;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["Cell","props","children","GridInner","displayName","Grid"],"sources":["Grid.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n Grid as RmwcGrid,\n GridCell as RmwcGridCell,\n GridRow as RmwcGridInner,\n GridCellProps as RmwcGridCellProps,\n GridProps as RmwcGridProps\n} from \"@rmwc/grid\";\nimport { CSSProperties } from \"react\";\n\nexport type CellProps = RmwcGridCellProps & {\n // One or more Cell components.\n children?: React.ReactNode;\n\n // CSS class name that will be added to the element\n className?: string;\n\n style?: { [key: string]: any };\n};\n\nexport type GridProps = RmwcGridProps & {\n className?: string;\n style?: CSSProperties;\n};\n\n/**\n * Cell must be direct children of Grid component.\n */\nexport const Cell = (props: CellProps) => {\n return <RmwcGridCell {...props}>{props.children}</RmwcGridCell>;\n};\n\nexport type GridInnerProps = {\n // One or more Cell components.\n children: React.ReactElement<typeof Cell> | React.ReactElement<typeof Cell>[];\n\n /**\n * CSS class name\n */\n className?: string;\n};\n\nexport const GridInner = (props: GridInnerProps) => {\n return <RmwcGridInner {...props}>{props.children}</RmwcGridInner>;\n};\n\nGridInner.displayName = \"GridInner\";\n\n/**\n * Use Grid component to display a list of choices, once the handler is triggered.\n */\nexport const Grid = (props: GridProps) => {\n return <RmwcGrid {...props}>{props.children}</RmwcGrid>;\n};\n"],"mappings":";;;;;;;AAAA;AACA;AAwBA;AACA;AACA;AACO,IAAMA,IAAI,GAAG,SAAPA,IAAI,CAAIC,KAAgB,EAAK;EACtC,oBAAO,6BAAC,cAAY,EAAKA,KAAK,EAAGA,KAAK,CAACC,QAAQ,CAAgB;AACnE,CAAC;AAAC;AAYK,IAAMC,SAAS,GAAG,SAAZA,SAAS,CAAIF,KAAqB,EAAK;EAChD,oBAAO,6BAAC,aAAa,EAAKA,KAAK,EAAGA,KAAK,CAACC,QAAQ,CAAiB;AACrE,CAAC;AAAC;AAEFC,SAAS,CAACC,WAAW,GAAG,WAAW;;AAEnC;AACA;AACA;AACO,IAAMC,IAAI,GAAG,SAAPA,IAAI,CAAIJ,KAAgB,EAAK;EACtC,oBAAO,6BAAC,UAAQ,EAAKA,KAAK,EAAGA,KAAK,CAACC,QAAQ,CAAY;AAC3D,CAAC;AAAC"}
|
package/Grid/Grid.stories.js
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
var _react = _interopRequireDefault(require("react"));
|
|
6
|
-
|
|
7
5
|
var _react2 = require("@storybook/react");
|
|
8
|
-
|
|
9
6
|
var _Story = require("@webiny/storybook-utils/Story");
|
|
10
|
-
|
|
11
7
|
var _README = _interopRequireDefault(require("./../Grid/README.md"));
|
|
12
|
-
|
|
13
8
|
var _Grid = require("./Grid");
|
|
14
|
-
|
|
15
9
|
var story = (0, _react2.storiesOf)("Components/Grid", module);
|
|
16
10
|
story.add("usage", function () {
|
|
17
11
|
return /*#__PURE__*/_react.default.createElement(_Story.Story, null, /*#__PURE__*/_react.default.createElement(_Story.StoryReadme, null, _README.default), /*#__PURE__*/_react.default.createElement(_Story.StorySandbox, {
|
package/Grid/Grid.stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["story","storiesOf","module","add","readme","info","propTables","Grid","Cell"],"sources":["Grid.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport { storiesOf } from \"@storybook/react\";\nimport { Story, StoryReadme, StorySandbox } from \"@webiny/storybook-utils/Story\";\nimport readme from \"./../Grid/README.md\";\nimport { Grid, Cell } from \"./Grid\";\n\nconst story = storiesOf(\"Components/Grid\", module);\n\nstory.add(\n \"usage\",\n () => {\n return (\n <Story>\n <StoryReadme>{readme}</StoryReadme>\n <StorySandbox title={\"A simple grid.\"}>\n <Grid>\n <Cell span={3} tablet={6} phone={12}>\n Apples\n </Cell>\n <Cell span={3} tablet={6} phone={12}>\n Oranges\n </Cell>\n <Cell span={3} tablet={6} phone={12}>\n Bananas\n </Cell>\n <Cell span={3} tablet={6} phone={12}>\n Strawberries\n </Cell>\n </Grid>\n </StorySandbox>\n </Story>\n );\n },\n { info: { propTables: [Grid, Cell] } }\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["story","storiesOf","module","add","readme","info","propTables","Grid","Cell"],"sources":["Grid.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport { storiesOf } from \"@storybook/react\";\nimport { Story, StoryReadme, StorySandbox } from \"@webiny/storybook-utils/Story\";\nimport readme from \"./../Grid/README.md\";\nimport { Grid, Cell } from \"./Grid\";\n\nconst story = storiesOf(\"Components/Grid\", module);\n\nstory.add(\n \"usage\",\n () => {\n return (\n <Story>\n <StoryReadme>{readme}</StoryReadme>\n <StorySandbox title={\"A simple grid.\"}>\n <Grid>\n <Cell span={3} tablet={6} phone={12}>\n Apples\n </Cell>\n <Cell span={3} tablet={6} phone={12}>\n Oranges\n </Cell>\n <Cell span={3} tablet={6} phone={12}>\n Bananas\n </Cell>\n <Cell span={3} tablet={6} phone={12}>\n Strawberries\n </Cell>\n </Grid>\n </StorySandbox>\n </Story>\n );\n },\n { info: { propTables: [Grid, Cell] } }\n);\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AAEA,IAAMA,KAAK,GAAG,IAAAC,iBAAS,EAAC,iBAAiB,EAAEC,MAAM,CAAC;AAElDF,KAAK,CAACG,GAAG,CACL,OAAO,EACP,YAAM;EACF,oBACI,6BAAC,YAAK,qBACF,6BAAC,kBAAW,QAAEC,eAAM,CAAe,eACnC,6BAAC,mBAAY;IAAC,KAAK,EAAE;EAAiB,gBAClC,6BAAC,UAAI,qBACD,6BAAC,UAAI;IAAC,IAAI,EAAE,CAAE;IAAC,MAAM,EAAE,CAAE;IAAC,KAAK,EAAE;EAAG,GAAC,QAErC,CAAO,eACP,6BAAC,UAAI;IAAC,IAAI,EAAE,CAAE;IAAC,MAAM,EAAE,CAAE;IAAC,KAAK,EAAE;EAAG,GAAC,SAErC,CAAO,eACP,6BAAC,UAAI;IAAC,IAAI,EAAE,CAAE;IAAC,MAAM,EAAE,CAAE;IAAC,KAAK,EAAE;EAAG,GAAC,SAErC,CAAO,eACP,6BAAC,UAAI;IAAC,IAAI,EAAE,CAAE;IAAC,MAAM,EAAE,CAAE;IAAC,KAAK,EAAE;EAAG,GAAC,cAErC,CAAO,CACJ,CACI,CACX;AAEhB,CAAC,EACD;EAAEC,IAAI,EAAE;IAAEC,UAAU,EAAE,CAACC,UAAI,EAAEC,UAAI;EAAE;AAAE,CAAC,CACzC"}
|
package/Grid/index.js
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
var _Grid = require("./Grid");
|
|
8
|
-
|
|
9
7
|
Object.keys(_Grid).forEach(function (key) {
|
|
10
8
|
if (key === "default" || key === "__esModule") return;
|
|
11
9
|
if (key in exports && exports[key] === _Grid[key]) return;
|
package/Grid/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Grid\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Grid\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
package/Helpers/ClassNames.js
CHANGED
|
@@ -1,41 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.getClasses = void 0;
|
|
9
|
-
|
|
10
8
|
var _clone2 = _interopRequireDefault(require("lodash/clone"));
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
/**
|
|
15
11
|
* This is a pass-through that modifies your object's props and creates the required className prop by merging
|
|
16
12
|
* the provided appendClasses(string) and any class names defined inside your props.
|
|
17
13
|
* To you the function just do: {...getClasses (props)}
|
|
18
14
|
* and make sure you are not spreading the `props` element, as this will clone and spread your current `props` element already.
|
|
19
15
|
*/
|
|
20
|
-
|
|
21
16
|
/**
|
|
22
17
|
* TODO @ts-refactor figure out propList type
|
|
23
18
|
*/
|
|
24
19
|
var getClasses = function getClasses(propList, appendClasses) {
|
|
25
20
|
var classes = "";
|
|
26
21
|
var props = (0, _clone2.default)(propList);
|
|
27
|
-
|
|
28
22
|
if (propList.hasOwnProperty("className")) {
|
|
29
23
|
classes = (0, _classnames.default)(propList.className);
|
|
30
24
|
delete props.className;
|
|
31
25
|
}
|
|
32
|
-
|
|
33
26
|
if (typeof appendClasses !== "undefined") {
|
|
34
27
|
classes = (0, _classnames.default)(classes, appendClasses);
|
|
35
28
|
}
|
|
36
|
-
|
|
37
29
|
props.className = classes;
|
|
38
30
|
return props;
|
|
39
31
|
};
|
|
40
|
-
|
|
41
32
|
exports.getClasses = getClasses;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getClasses","propList","appendClasses","classes","props","hasOwnProperty","classnames","className"],"sources":["ClassNames.ts"],"sourcesContent":["import classnames from \"classnames\";\nimport { clone } from \"lodash\";\n\n/**\n * This is a pass-through that modifies your object's props and creates the required className prop by merging\n * the provided appendClasses(string) and any class names defined inside your props.\n * To you the function just do: {...getClasses (props)}\n * and make sure you are not spreading the `props` element, as this will clone and spread your current `props` element already.\n */\n/**\n * TODO @ts-refactor figure out propList type\n */\nconst getClasses = (propList: any, appendClasses: string[] | string) => {\n let classes = \"\";\n const props = clone(propList);\n if (propList.hasOwnProperty(\"className\")) {\n classes = classnames(propList.className);\n delete props.className;\n }\n\n if (typeof appendClasses !== \"undefined\") {\n classes = classnames(classes, appendClasses);\n }\n\n props.className = classes;\n\n return props;\n};\n\nexport { getClasses };\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["getClasses","propList","appendClasses","classes","props","hasOwnProperty","classnames","className"],"sources":["ClassNames.ts"],"sourcesContent":["import classnames from \"classnames\";\nimport { clone } from \"lodash\";\n\n/**\n * This is a pass-through that modifies your object's props and creates the required className prop by merging\n * the provided appendClasses(string) and any class names defined inside your props.\n * To you the function just do: {...getClasses (props)}\n * and make sure you are not spreading the `props` element, as this will clone and spread your current `props` element already.\n */\n/**\n * TODO @ts-refactor figure out propList type\n */\nconst getClasses = (propList: any, appendClasses: string[] | string) => {\n let classes = \"\";\n const props = clone(propList);\n if (propList.hasOwnProperty(\"className\")) {\n classes = classnames(propList.className);\n delete props.className;\n }\n\n if (typeof appendClasses !== \"undefined\") {\n classes = classnames(classes, appendClasses);\n }\n\n props.className = classes;\n\n return props;\n};\n\nexport { getClasses };\n"],"mappings":";;;;;;;;AAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,UAAU,GAAG,SAAbA,UAAU,CAAIC,QAAa,EAAEC,aAAgC,EAAK;EACpE,IAAIC,OAAO,GAAG,EAAE;EAChB,IAAMC,KAAK,GAAG,qBAAMH,QAAQ,CAAC;EAC7B,IAAIA,QAAQ,CAACI,cAAc,CAAC,WAAW,CAAC,EAAE;IACtCF,OAAO,GAAG,IAAAG,mBAAU,EAACL,QAAQ,CAACM,SAAS,CAAC;IACxC,OAAOH,KAAK,CAACG,SAAS;EAC1B;EAEA,IAAI,OAAOL,aAAa,KAAK,WAAW,EAAE;IACtCC,OAAO,GAAG,IAAAG,mBAAU,EAACH,OAAO,EAAED,aAAa,CAAC;EAChD;EAEAE,KAAK,CAACG,SAAS,GAAGJ,OAAO;EAEzB,OAAOC,KAAK;AAChB,CAAC;AAAC"}
|
package/Helpers/index.js
CHANGED
package/Helpers/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import { getClasses } from \"./ClassNames\";\n\nexport { getClasses };\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import { getClasses } from \"./ClassNames\";\n\nexport { getClasses };\n"],"mappings":";;;;;;;;;;;AAAA"}
|
package/Icon/Icon.js
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.Icon = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
var _emotion = require("emotion");
|
|
13
|
-
|
|
14
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
11
|
var webinyIcon = /*#__PURE__*/(0, _emotion.css)({}, {
|
|
17
12
|
"&.mdc-button__icon": {
|
|
18
13
|
marginLeft: 0,
|
|
@@ -20,10 +15,10 @@ var webinyIcon = /*#__PURE__*/(0, _emotion.css)({}, {
|
|
|
20
15
|
display: "block"
|
|
21
16
|
}
|
|
22
17
|
}, "label:webinyIcon;");
|
|
18
|
+
|
|
23
19
|
/**
|
|
24
20
|
* Use Icon component to display an icon.
|
|
25
21
|
*/
|
|
26
|
-
|
|
27
22
|
var Icon = function Icon(props) {
|
|
28
23
|
return /*#__PURE__*/_react.default.cloneElement(props.icon, {
|
|
29
24
|
"data-testid": props["data-testid"],
|
|
@@ -31,5 +26,4 @@ var Icon = function Icon(props) {
|
|
|
31
26
|
onClick: props.onClick
|
|
32
27
|
});
|
|
33
28
|
};
|
|
34
|
-
|
|
35
29
|
exports.Icon = Icon;
|
package/Icon/Icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["webinyIcon","css","marginLeft","width","display","Icon","props","React","cloneElement","icon","className","classNames","onClick"],"sources":["Icon.tsx"],"sourcesContent":["import React from \"react\";\nimport { css } from \"emotion\";\nimport classNames from \"classnames\";\n\nexport type IconProps = {\n /**\n * SvgComponent containing the svg icon\n */\n icon: React.ReactElement;\n\n /**\n * Optional onclick handler\n */\n onClick?: Function;\n\n /**\n * CSS class to be added to the icon\n */\n className?: string;\n\n // For testing purposes.\n \"data-testid\"?: string;\n};\n\nconst webinyIcon = css(\n {},\n {\n \"&.mdc-button__icon\": {\n marginLeft: 0,\n width: \"inherit\",\n display: \"block\"\n }\n }\n);\n\n/**\n * Use Icon component to display an icon.\n */\nconst Icon: React.FC<IconProps> = props => {\n return React.cloneElement(props.icon, {\n \"data-testid\": props[\"data-testid\"],\n className: classNames(\"mdc-button__icon webiny-ui-icon\", webinyIcon, props.className),\n onClick: props.onClick\n });\n};\n\nexport { Icon };\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["webinyIcon","css","marginLeft","width","display","Icon","props","React","cloneElement","icon","className","classNames","onClick"],"sources":["Icon.tsx"],"sourcesContent":["import React from \"react\";\nimport { css } from \"emotion\";\nimport classNames from \"classnames\";\n\nexport type IconProps = {\n /**\n * SvgComponent containing the svg icon\n */\n icon: React.ReactElement;\n\n /**\n * Optional onclick handler\n */\n onClick?: Function;\n\n /**\n * CSS class to be added to the icon\n */\n className?: string;\n\n // For testing purposes.\n \"data-testid\"?: string;\n};\n\nconst webinyIcon = css(\n {},\n {\n \"&.mdc-button__icon\": {\n marginLeft: 0,\n width: \"inherit\",\n display: \"block\"\n }\n }\n);\n\n/**\n * Use Icon component to display an icon.\n */\nconst Icon: React.FC<IconProps> = props => {\n return React.cloneElement(props.icon, {\n \"data-testid\": props[\"data-testid\"],\n className: classNames(\"mdc-button__icon webiny-ui-icon\", webinyIcon, props.className),\n onClick: props.onClick\n });\n};\n\nexport { Icon };\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AAsBA,IAAMA,UAAU,gBAAG,IAAAC,YAAG,EAClB,CAAC,CAAC,EACF;EACI,oBAAoB,EAAE;IAClBC,UAAU,EAAE,CAAC;IACbC,KAAK,EAAE,SAAS;IAChBC,OAAO,EAAE;EACb;AACJ,CAAC,sBACJ;;AAED;AACA;AACA;AACA,IAAMC,IAAyB,GAAG,SAA5BA,IAAyB,CAAGC,KAAK,EAAI;EACvC,oBAAOC,cAAK,CAACC,YAAY,CAACF,KAAK,CAACG,IAAI,EAAE;IAClC,aAAa,EAAEH,KAAK,CAAC,aAAa,CAAC;IACnCI,SAAS,EAAE,IAAAC,mBAAU,EAAC,iCAAiC,EAAEX,UAAU,EAAEM,KAAK,CAACI,SAAS,CAAC;IACrFE,OAAO,EAAEN,KAAK,CAACM;EACnB,CAAC,CAAC;AACN,CAAC;AAAC"}
|