@pingux/astro 2.121.0-alpha.0 → 2.121.0-alpha.2
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/lib/cjs/components/Footer/CopyrightText.d.ts +4 -0
- package/lib/cjs/components/Footer/CopyrightText.js +28 -0
- package/lib/cjs/components/Footer/Footer.d.ts +3 -0
- package/lib/cjs/components/Footer/Footer.js +35 -0
- package/lib/cjs/components/Footer/Footer.mdx +30 -0
- package/lib/cjs/components/Footer/Footer.stories.d.ts +5 -0
- package/lib/cjs/components/Footer/Footer.stories.js +148 -0
- package/lib/cjs/components/Footer/Footer.styles.js +9 -0
- package/lib/cjs/components/Footer/Footer.test.d.ts +1 -0
- package/lib/cjs/components/Footer/Footer.test.js +109 -0
- package/lib/cjs/components/Footer/FooterNav.d.ts +4 -0
- package/lib/cjs/components/Footer/FooterNav.js +25 -0
- package/lib/cjs/components/Footer/FooterNavItem.d.ts +6 -0
- package/lib/cjs/components/Footer/FooterNavItem.js +23 -0
- package/lib/cjs/components/Footer/index.d.ts +4 -0
- package/lib/cjs/components/Footer/index.js +35 -0
- package/lib/cjs/components/Footer/stories/FooterNextGenComponent.d.ts +2 -0
- package/lib/cjs/components/Footer/stories/FooterNextGenComponent.js +126 -0
- package/lib/cjs/{recipes/NextGen/ListViewNextGen.stories.js → components/Footer/stories/NextGenDarkFooterStory.chomatic.stories.js} +6 -7
- package/lib/cjs/components/Footer/stories/NextGenFooterStory.chromatic.stories.js +22 -0
- package/lib/cjs/components/Icon/Icon.js +13 -10
- package/lib/cjs/components/IconButton/IconButton.styles.d.ts +37 -0
- package/lib/cjs/components/IconButton/IconButton.styles.js +6 -1
- package/lib/cjs/components/IconWrapper/iconWrapperAttributes.js +1 -1
- package/lib/cjs/components/Link/Link.styles.d.ts +37 -0
- package/lib/cjs/components/Link/Link.styles.js +31 -1
- package/lib/cjs/components/ListView/ListView.js +5 -0
- package/lib/cjs/components/ListView/ListView.stories.d.ts +3 -3
- package/lib/cjs/components/ListView/ListView.stories.js +27 -458
- package/lib/cjs/components/ListView/ListViewExpandableItem.js +1 -0
- package/lib/cjs/components/ListView/ListViewItem.js +4 -1
- package/lib/cjs/{styles/themes/next-gen/stories/NextGenListView.chromatic.stories.js → components/ListView/stories/ListView.chromatic.stories.js} +2 -2
- package/lib/cjs/components/ListView/stories/ListViewNextGenComponent.js +144 -0
- package/lib/cjs/components/ListView/stories/ListViewOnyxDark.stories.d.ts +6 -0
- package/lib/cjs/{styles/themeOverrides/nextGenDarkMode/stories/NextGenDarkListView.chromatic.stories.js → components/ListView/stories/ListViewOnyxDark.stories.js} +3 -3
- package/lib/cjs/components/ListViewItem/ListViewItem.js +16 -5
- package/lib/cjs/components/ListViewItem/ListViewItem.stories.js +40 -3
- package/lib/cjs/components/ListViewItem/ListViewItem.styles.js +15 -1
- package/lib/cjs/components/ListViewItem/controls/ListViewItemEditButton.js +1 -1
- package/lib/cjs/components/ListViewItem/controls/ListViewItemMenu.js +9 -3
- package/lib/cjs/components/ListViewItem/controls/ListViewItemMenu.test.js +1 -0
- package/lib/cjs/components/ListViewItem/controls/chart/ListViewItemChart.js +5 -1
- package/lib/cjs/components/Pagination/Pagination.stories.js +3 -3
- package/lib/cjs/components/SearchField/SearchField.js +2 -8
- package/lib/cjs/components/Text/Text.styles.d.ts +7 -0
- package/lib/cjs/components/Text/Text.styles.js +8 -0
- package/lib/cjs/hooks/useExpandableListViewItem/useExpandableListViewItem.js +9 -3
- package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +2 -0
- package/lib/cjs/index.d.ts +2 -0
- package/lib/cjs/index.js +76 -57
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.d.ts +4 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.js +4 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/icons.d.ts +1 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/nextGenDarkModeOverride.js +2 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/footer.d.ts +5 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/footer.js +14 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/links.d.ts +27 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/links.js +13 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/listview.d.ts +58 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/{lsitview.js → listview.js} +37 -2
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/text.d.ts +18 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/text.js +26 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +39 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +6 -3
- package/lib/cjs/styles/themes/astro/customProperties/icons.d.ts +1 -0
- package/lib/cjs/styles/themes/astro/customProperties/icons.js +2 -1
- package/lib/cjs/styles/themes/astro/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themes/next-gen/colors/colors.d.ts +4 -0
- package/lib/cjs/styles/themes/next-gen/colors/iconWrapper.d.ts +4 -0
- package/lib/cjs/styles/themes/next-gen/colors/iconWrapper.js +4 -0
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +2 -2
- package/lib/cjs/styles/themes/next-gen/customProperties/icons.d.ts +1 -0
- package/lib/cjs/styles/themes/next-gen/customProperties/icons.js +2 -1
- package/lib/cjs/styles/themes/next-gen/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +175 -18
- package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +29 -0
- package/lib/cjs/styles/themes/next-gen/variants/button.js +14 -2
- package/lib/cjs/styles/themes/next-gen/variants/footer.d.ts +31 -0
- package/lib/cjs/styles/themes/next-gen/variants/footer.js +43 -0
- package/lib/cjs/styles/themes/next-gen/variants/links.d.ts +21 -0
- package/lib/cjs/styles/themes/next-gen/variants/links.js +18 -2
- package/lib/cjs/styles/themes/next-gen/variants/listview.d.ts +79 -17
- package/lib/cjs/styles/themes/next-gen/variants/listview.js +89 -24
- package/lib/cjs/styles/themes/next-gen/variants/text.d.ts +13 -1
- package/lib/cjs/styles/themes/next-gen/variants/text.js +16 -4
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +113 -17
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +10 -1
- package/lib/cjs/styles/variants/variants.js +2 -0
- package/lib/cjs/types/footer.d.ts +11 -0
- package/lib/cjs/types/footer.js +6 -0
- package/lib/cjs/types/iconWrapper.d.ts +1 -1
- package/lib/cjs/types/index.d.ts +1 -0
- package/lib/cjs/types/index.js +53 -42
- package/lib/cjs/utils/devUtils/constants/animals.js +449 -1
- package/lib/cjs/utils/devUtils/constants/images.d.ts +1 -0
- package/lib/cjs/utils/devUtils/constants/images.js +4 -2
- package/lib/components/Footer/CopyrightText.js +19 -0
- package/lib/components/Footer/Footer.js +21 -0
- package/lib/components/Footer/Footer.mdx +30 -0
- package/lib/components/Footer/Footer.stories.js +138 -0
- package/lib/components/Footer/Footer.styles.js +1 -0
- package/lib/components/Footer/Footer.test.js +100 -0
- package/lib/components/Footer/FooterNav.js +16 -0
- package/lib/components/Footer/FooterNavItem.js +14 -0
- package/lib/components/Footer/index.js +4 -0
- package/lib/components/Footer/stories/FooterNextGenComponent.js +117 -0
- package/lib/components/Footer/stories/NextGenDarkFooterStory.chomatic.stories.js +12 -0
- package/lib/components/Footer/stories/NextGenFooterStory.chromatic.stories.js +12 -0
- package/lib/components/Icon/Icon.js +13 -10
- package/lib/components/IconButton/IconButton.styles.js +6 -1
- package/lib/components/IconWrapper/iconWrapperAttributes.js +1 -1
- package/lib/components/Link/Link.styles.js +31 -1
- package/lib/components/ListView/ListView.js +5 -0
- package/lib/components/ListView/ListView.stories.js +25 -455
- package/lib/components/ListView/ListViewExpandableItem.js +1 -0
- package/lib/components/ListView/ListViewItem.js +4 -1
- package/lib/{styles/themes/next-gen/stories/NextGenListView.chromatic.stories.js → components/ListView/stories/ListView.chromatic.stories.js} +2 -2
- package/lib/components/ListView/stories/ListViewNextGenComponent.js +130 -0
- package/lib/{styles/themeOverrides/nextGenDarkMode/stories/NextGenDarkListView.chromatic.stories.js → components/ListView/stories/ListViewOnyxDark.stories.js} +3 -3
- package/lib/components/ListViewItem/ListViewItem.js +18 -7
- package/lib/components/ListViewItem/ListViewItem.stories.js +40 -3
- package/lib/components/ListViewItem/ListViewItem.styles.js +15 -1
- package/lib/components/ListViewItem/controls/ListViewItemEditButton.js +1 -1
- package/lib/components/ListViewItem/controls/ListViewItemMenu.js +9 -3
- package/lib/components/ListViewItem/controls/ListViewItemMenu.test.js +1 -0
- package/lib/components/ListViewItem/controls/chart/ListViewItemChart.js +5 -1
- package/lib/components/Pagination/Pagination.stories.js +1 -1
- package/lib/components/SearchField/SearchField.js +2 -8
- package/lib/components/Text/Text.styles.js +8 -0
- package/lib/hooks/useExpandableListViewItem/useExpandableListViewItem.js +9 -3
- package/lib/index.js +2 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/colors.js +4 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/nextGenDarkModeOverride.js +2 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/footer.js +6 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/links.js +13 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/listview.js +58 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/text.js +18 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +4 -1
- package/lib/styles/themes/astro/customProperties/icons.js +2 -1
- package/lib/styles/themes/next-gen/colors/iconWrapper.js +4 -0
- package/lib/styles/themes/next-gen/convertedComponentList.js +2 -2
- package/lib/styles/themes/next-gen/customProperties/icons.js +2 -1
- package/lib/styles/themes/next-gen/variants/button.js +13 -2
- package/lib/styles/themes/next-gen/variants/footer.js +35 -0
- package/lib/styles/themes/next-gen/variants/links.js +14 -2
- package/lib/styles/themes/next-gen/variants/listview.js +84 -22
- package/lib/styles/themes/next-gen/variants/text.js +16 -4
- package/lib/styles/themes/next-gen/variants/variants.js +11 -2
- package/lib/styles/variants/variants.js +2 -0
- package/lib/types/footer.js +1 -0
- package/lib/types/index.js +1 -0
- package/lib/utils/devUtils/constants/animals.js +449 -1
- package/lib/utils/devUtils/constants/images.js +2 -1
- package/package.json +5 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/lsitview.d.ts +0 -24
- package/lib/cjs/styles/themes/next-gen/stories/ListViewItemNextGen.d.ts +0 -29
- package/lib/cjs/styles/themes/next-gen/stories/ListViewItemNextGen.js +0 -84
- package/lib/cjs/styles/themes/next-gen/stories/ListViewNextGenComponent.js +0 -67
- package/lib/cjs/styles/themes/next-gen/stories/NextGenListViewItem.stories.js +0 -35
- package/lib/recipes/NextGen/ListViewNextGen.stories.js +0 -13
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/lsitview.js +0 -24
- package/lib/styles/themes/next-gen/stories/ListViewItemNextGen.js +0 -75
- package/lib/styles/themes/next-gen/stories/ListViewNextGenComponent.js +0 -58
- package/lib/styles/themes/next-gen/stories/NextGenListViewItem.stories.js +0 -25
- /package/lib/cjs/{styles/themeOverrides/nextGenDarkMode/stories/NextGenDarkListView.chromatic.stories.d.ts → components/Footer/stories/NextGenDarkFooterStory.chomatic.stories.d.ts} +0 -0
- /package/lib/cjs/{styles/themes/next-gen/stories/NextGenListView.chromatic.stories.d.ts → components/Footer/stories/NextGenFooterStory.chromatic.stories.d.ts} +0 -0
- /package/lib/cjs/{styles/themes/next-gen/stories/NextGenListViewItem.stories.d.ts → components/ListView/stories/ListView.chromatic.stories.d.ts} +0 -0
- /package/lib/cjs/{styles/themes/next-gen → components/ListView}/stories/ListViewNextGenComponent.d.ts +0 -0
@@ -1,67 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
4
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
5
|
-
_Object$defineProperty(exports, "__esModule", {
|
6
|
-
value: true
|
7
|
-
});
|
8
|
-
exports.ListViewNextGen = void 0;
|
9
|
-
var _from = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/from"));
|
10
|
-
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
11
|
-
var _react = _interopRequireDefault(require("react"));
|
12
|
-
var _TrashCanOutlineIcon = _interopRequireDefault(require("@pingux/mdi-react/TrashCanOutlineIcon"));
|
13
|
-
var _index = require("../../../../index");
|
14
|
-
var _ListViewItemNextGen = require("./ListViewItemNextGen");
|
15
|
-
var _react2 = require("@emotion/react");
|
16
|
-
var loremText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
|
17
|
-
var items = (0, _from["default"])({
|
18
|
-
length: 300
|
19
|
-
}, function (_, index) {
|
20
|
-
var id = (index + 1).toString();
|
21
|
-
return {
|
22
|
-
key: "Animal".concat(id),
|
23
|
-
name: "Animal".concat(id),
|
24
|
-
id: id
|
25
|
-
};
|
26
|
-
});
|
27
|
-
var colors = ['cyan', 'orange', 'red', 'green', 'purple', 'yellow', 'teal', 'pink', 'yellow', 'green'];
|
28
|
-
var getColor = function getColor(index) {
|
29
|
-
var lastDigit = index % 10;
|
30
|
-
return colors[lastDigit];
|
31
|
-
};
|
32
|
-
var ListViewNextGen = function ListViewNextGen() {
|
33
|
-
return (0, _react2.jsx)(_index.Box, {
|
34
|
-
backgroundColor: "background.base",
|
35
|
-
p: "lg"
|
36
|
-
}, (0, _react2.jsx)(_index.Box, {
|
37
|
-
height: "400px",
|
38
|
-
backgroundColor: "background.base"
|
39
|
-
}, (0, _react2.jsx)(_index.ListView, {
|
40
|
-
items: items,
|
41
|
-
selectionMode: "single"
|
42
|
-
}, (0, _map["default"])(items).call(items, function (item, index) {
|
43
|
-
return (0, _react2.jsx)(_index.Item, item, (0, _react2.jsx)(_index.ListViewItem, {
|
44
|
-
data: {
|
45
|
-
icon: null
|
46
|
-
},
|
47
|
-
slots: {
|
48
|
-
leftOfData: (0, _react2.jsx)(_index.IconWrapper, {
|
49
|
-
color: getColor(index),
|
50
|
-
icon: _TrashCanOutlineIcon["default"],
|
51
|
-
size: "md",
|
52
|
-
title: {
|
53
|
-
name: 'trash can'
|
54
|
-
},
|
55
|
-
isCircle: true
|
56
|
-
}),
|
57
|
-
rightOfData: (0, _react2.jsx)(_ListViewItemNextGen.TextSlot, {
|
58
|
-
title: item.name,
|
59
|
-
key: item.key,
|
60
|
-
description: loremText
|
61
|
-
})
|
62
|
-
},
|
63
|
-
hasSeparator: false
|
64
|
-
}));
|
65
|
-
}))));
|
66
|
-
};
|
67
|
-
exports.ListViewNextGen = ListViewNextGen;
|
@@ -1,35 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
4
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
5
|
-
_Object$defineProperty(exports, "__esModule", {
|
6
|
-
value: true
|
7
|
-
});
|
8
|
-
exports["default"] = exports.Default = void 0;
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
10
|
-
var _ = require("../../../..");
|
11
|
-
var _ListViewItemNextGen = require("./ListViewItemNextGen");
|
12
|
-
var _react2 = require("@emotion/react");
|
13
|
-
var _default = {
|
14
|
-
title: 'Onyx Recipes/ListViewItem'
|
15
|
-
};
|
16
|
-
exports["default"] = _default;
|
17
|
-
var item = {
|
18
|
-
key: 'test',
|
19
|
-
id: 'test',
|
20
|
-
name: 'JavaScript Array For Each',
|
21
|
-
title: 'JavaScript Array For Each',
|
22
|
-
category: 'Code Snippet',
|
23
|
-
description: 'Sample code demonstrating how to iterate over a description'
|
24
|
-
};
|
25
|
-
var Default = function Default() {
|
26
|
-
return (0, _react2.jsx)(_.Box, {
|
27
|
-
sx: {
|
28
|
-
border: '1px solid',
|
29
|
-
borderColor: 'border.base'
|
30
|
-
}
|
31
|
-
}, (0, _react2.jsx)(_ListViewItemNextGen.ListViewItemNextGen, {
|
32
|
-
item: item
|
33
|
-
}));
|
34
|
-
};
|
35
|
-
exports.Default = Default;
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { Box } from '../../index';
|
3
|
-
import { ListViewNextGen } from '../../styles/themes/next-gen/stories/ListViewNextGenComponent';
|
4
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
5
|
-
export default {
|
6
|
-
title: 'Onyx Recipes/ListView'
|
7
|
-
};
|
8
|
-
export var Default = function Default() {
|
9
|
-
return ___EmotionJSX(Box, {
|
10
|
-
backgroundColor: "background.base",
|
11
|
-
p: "lg"
|
12
|
-
}, ___EmotionJSX(ListViewNextGen, null));
|
13
|
-
};
|
@@ -1,24 +0,0 @@
|
|
1
|
-
export var listViewItem = {
|
2
|
-
styledListItem: {
|
3
|
-
'&.has-separator': {
|
4
|
-
borderBottom: '1px solid',
|
5
|
-
borderBottomColor: 'border.base'
|
6
|
-
},
|
7
|
-
bg: 'background.base',
|
8
|
-
'&.is-selected': {
|
9
|
-
bg: 'background.hover'
|
10
|
-
},
|
11
|
-
'&.is-hovered': {
|
12
|
-
bg: 'background.hover'
|
13
|
-
},
|
14
|
-
'&.is-focused': {
|
15
|
-
boxShadow: '0 0 0 3px inset #1a73e8',
|
16
|
-
bg: 'background.hover'
|
17
|
-
}
|
18
|
-
}
|
19
|
-
};
|
20
|
-
export var listView = {
|
21
|
-
container: {
|
22
|
-
borderColor: 'border.base'
|
23
|
-
}
|
24
|
-
};
|
@@ -1,75 +0,0 @@
|
|
1
|
-
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
2
|
-
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
3
|
-
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
4
|
-
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
5
|
-
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
6
|
-
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
7
|
-
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
8
|
-
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
9
|
-
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
10
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
11
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
12
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
13
|
-
import React from 'react';
|
14
|
-
import TrashCanOutlineIcon from '@pingux/mdi-react/TrashCanOutlineIcon';
|
15
|
-
import { Badge, Box, Icon, IconWrapper, Item, ListViewItem, ListViewItemMenu, Text } from '../../../../index';
|
16
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
17
|
-
var textSlotContainerStyle = {
|
18
|
-
ml: 'md',
|
19
|
-
gap: '2px',
|
20
|
-
overflow: 'hidden',
|
21
|
-
textOverflow: 'ellipsis',
|
22
|
-
flexShrink: '4',
|
23
|
-
'div:has > div': {
|
24
|
-
whiteSpace: 'nowrap',
|
25
|
-
overflow: 'hidden',
|
26
|
-
flexGrow: 4
|
27
|
-
}
|
28
|
-
};
|
29
|
-
export var TextSlot = function TextSlot(props) {
|
30
|
-
var title = props.title,
|
31
|
-
category = props.category,
|
32
|
-
description = props.description;
|
33
|
-
return ___EmotionJSX(Box, {
|
34
|
-
sx: _objectSpread({}, textSlotContainerStyle)
|
35
|
-
}, ___EmotionJSX(Text, {
|
36
|
-
textOverflow: "ellipsis",
|
37
|
-
fontWeight: "2",
|
38
|
-
color: "text.secondary"
|
39
|
-
}, title), ___EmotionJSX(Text, {
|
40
|
-
textOverflow: "ellipsis"
|
41
|
-
}, description), ___EmotionJSX(Badge, {
|
42
|
-
variant: "secondary",
|
43
|
-
label: category
|
44
|
-
}));
|
45
|
-
};
|
46
|
-
export var ListViewItemNextGen = function ListViewItemNextGen(props) {
|
47
|
-
var item = props.item;
|
48
|
-
return ___EmotionJSX(ListViewItem, _extends({}, item, {
|
49
|
-
data: {
|
50
|
-
icon: null
|
51
|
-
},
|
52
|
-
slots: {
|
53
|
-
leftOfData: ___EmotionJSX(IconWrapper, {
|
54
|
-
color: "purple",
|
55
|
-
icon: TrashCanOutlineIcon,
|
56
|
-
size: "md",
|
57
|
-
title: {
|
58
|
-
name: 'trash can'
|
59
|
-
},
|
60
|
-
isCircle: true
|
61
|
-
}),
|
62
|
-
rightOfData: ___EmotionJSX(TextSlot, item)
|
63
|
-
},
|
64
|
-
hasSeparator: false
|
65
|
-
}), ___EmotionJSX(ListViewItemMenu, null, ___EmotionJSX(Item, {
|
66
|
-
key: "enable"
|
67
|
-
}, ___EmotionJSX(Box, {
|
68
|
-
isRow: true,
|
69
|
-
gap: "sm",
|
70
|
-
px: "sm",
|
71
|
-
py: "xs"
|
72
|
-
}, ___EmotionJSX(Icon, {
|
73
|
-
icon: TrashCanOutlineIcon
|
74
|
-
}), ___EmotionJSX(Text, null, "Delete")))));
|
75
|
-
};
|
@@ -1,58 +0,0 @@
|
|
1
|
-
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
2
|
-
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
3
|
-
import React from 'react';
|
4
|
-
import TrashCanOutlineIcon from '@pingux/mdi-react/TrashCanOutlineIcon';
|
5
|
-
import { Box, IconWrapper, Item, ListView, ListViewItem } from '../../../../index';
|
6
|
-
import { TextSlot } from './ListViewItemNextGen';
|
7
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
8
|
-
var loremText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
|
9
|
-
var items = _Array$from({
|
10
|
-
length: 300
|
11
|
-
}, function (_, index) {
|
12
|
-
var id = (index + 1).toString();
|
13
|
-
return {
|
14
|
-
key: "Animal".concat(id),
|
15
|
-
name: "Animal".concat(id),
|
16
|
-
id: id
|
17
|
-
};
|
18
|
-
});
|
19
|
-
var colors = ['cyan', 'orange', 'red', 'green', 'purple', 'yellow', 'teal', 'pink', 'yellow', 'green'];
|
20
|
-
var getColor = function getColor(index) {
|
21
|
-
var lastDigit = index % 10;
|
22
|
-
return colors[lastDigit];
|
23
|
-
};
|
24
|
-
export var ListViewNextGen = function ListViewNextGen() {
|
25
|
-
return ___EmotionJSX(Box, {
|
26
|
-
backgroundColor: "background.base",
|
27
|
-
p: "lg"
|
28
|
-
}, ___EmotionJSX(Box, {
|
29
|
-
height: "400px",
|
30
|
-
backgroundColor: "background.base"
|
31
|
-
}, ___EmotionJSX(ListView, {
|
32
|
-
items: items,
|
33
|
-
selectionMode: "single"
|
34
|
-
}, _mapInstanceProperty(items).call(items, function (item, index) {
|
35
|
-
return ___EmotionJSX(Item, item, ___EmotionJSX(ListViewItem, {
|
36
|
-
data: {
|
37
|
-
icon: null
|
38
|
-
},
|
39
|
-
slots: {
|
40
|
-
leftOfData: ___EmotionJSX(IconWrapper, {
|
41
|
-
color: getColor(index),
|
42
|
-
icon: TrashCanOutlineIcon,
|
43
|
-
size: "md",
|
44
|
-
title: {
|
45
|
-
name: 'trash can'
|
46
|
-
},
|
47
|
-
isCircle: true
|
48
|
-
}),
|
49
|
-
rightOfData: ___EmotionJSX(TextSlot, {
|
50
|
-
title: item.name,
|
51
|
-
key: item.key,
|
52
|
-
description: loremText
|
53
|
-
})
|
54
|
-
},
|
55
|
-
hasSeparator: false
|
56
|
-
}));
|
57
|
-
}))));
|
58
|
-
};
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { Box } from '../../../..';
|
3
|
-
import { ListViewItemNextGen } from './ListViewItemNextGen';
|
4
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
5
|
-
export default {
|
6
|
-
title: 'Onyx Recipes/ListViewItem'
|
7
|
-
};
|
8
|
-
var item = {
|
9
|
-
key: 'test',
|
10
|
-
id: 'test',
|
11
|
-
name: 'JavaScript Array For Each',
|
12
|
-
title: 'JavaScript Array For Each',
|
13
|
-
category: 'Code Snippet',
|
14
|
-
description: 'Sample code demonstrating how to iterate over a description'
|
15
|
-
};
|
16
|
-
export var Default = function Default() {
|
17
|
-
return ___EmotionJSX(Box, {
|
18
|
-
sx: {
|
19
|
-
border: '1px solid',
|
20
|
-
borderColor: 'border.base'
|
21
|
-
}
|
22
|
-
}, ___EmotionJSX(ListViewItemNextGen, {
|
23
|
-
item: item
|
24
|
-
}));
|
25
|
-
};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|