@pingux/astro 2.75.0 → 2.76.0-alpha.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/lib/cjs/components/Badge/Badge.styles.d.ts +130 -0
- package/lib/cjs/components/Badge/Badge.styles.js +34 -1
- package/lib/cjs/components/Button/Button.stories.js +1 -1
- package/lib/cjs/components/DataTable/DataTable.js +8 -4
- package/lib/cjs/components/DataTable/DataTable.styles.d.ts +1 -0
- package/lib/cjs/components/DataTable/DataTable.styles.js +2 -1
- package/lib/cjs/components/DataTable/DataTableBadge.js +49 -19
- package/lib/cjs/components/DatePicker/DatePicker.js +1 -1
- package/lib/cjs/components/ListView/ListView.js +8 -4
- package/lib/cjs/components/ListView/ListView.stories.js +1 -1
- package/lib/cjs/components/ListView/ListView.styles.d.ts +7 -0
- package/lib/cjs/components/ListView/ListView.styles.js +15 -0
- package/lib/cjs/components/ListView/ListViewFocusWrapper.js +2 -1
- package/lib/cjs/components/ListViewItem/ListViewItem.js +6 -4
- package/lib/cjs/components/ListViewItem/ListViewItem.styles.js +7 -1
- package/lib/cjs/components/MultivaluesField/DefaultMultivaluesField.js +1 -1
- package/lib/cjs/components/NavBar/NavBar.stories.js +1 -4
- package/lib/cjs/components/PanelHeader/PanelHeader.js +1 -1
- package/lib/cjs/hooks/useExpandableListViewItem/useExpandableListViewItem.js +1 -6
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +8 -0
- package/lib/cjs/recipes/ListAndPanel.stories.js +1 -2
- package/lib/cjs/recipes/NextGen/DefaultAvatar.stories.d.ts +6 -0
- package/lib/cjs/recipes/NextGen/DefaultAvatar.stories.js +41 -0
- package/lib/cjs/recipes/NextGen/ListViewNextGen.stories.js +152 -0
- package/lib/cjs/recipes/NextGen/ModalNextGen.stories.d.ts +6 -0
- package/lib/cjs/recipes/NextGen/ModalNextGen.stories.js +72 -0
- package/lib/cjs/recipes/NextGen/NavBarNextGen.stories.d.ts +6 -0
- package/lib/cjs/recipes/NextGen/NavBarNextGen.stories.js +233 -0
- package/lib/cjs/recipes/NextGen/NextGenDataTable.stories.d.ts +6 -0
- package/lib/cjs/recipes/NextGen/NextGenDataTable.stories.js +152 -0
- package/lib/cjs/styles/themes/next-gen/colors/colors.d.ts +209 -0
- package/lib/cjs/styles/themes/next-gen/colors/colors.js +112 -0
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.d.ts +2 -0
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +10 -0
- package/lib/cjs/styles/themes/next-gen/forms.d.ts +235 -0
- package/lib/cjs/styles/themes/next-gen/forms.js +89 -0
- package/lib/cjs/styles/themes/next-gen/index.js +14 -0
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +1455 -0
- package/lib/cjs/styles/themes/next-gen/next-gen.js +52 -0
- package/lib/cjs/styles/themes/next-gen/open_sans.css +1 -0
- package/lib/cjs/styles/themes/next-gen/text.d.ts +15 -0
- package/lib/cjs/styles/themes/next-gen/text.js +26 -0
- package/lib/cjs/styles/themes/next-gen/tokens/colorTokens.d.ts +134 -0
- package/lib/cjs/styles/themes/next-gen/tokens/colorTokens.js +142 -0
- package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +574 -0
- package/lib/cjs/styles/themes/next-gen/variants/button.js +235 -0
- package/lib/cjs/styles/themes/next-gen/variants/input.d.ts +66 -0
- package/lib/cjs/styles/themes/next-gen/variants/input.js +140 -0
- package/lib/cjs/styles/themes/next-gen/variants/label.d.ts +2 -0
- package/lib/cjs/styles/themes/next-gen/variants/label.js +34 -0
- package/lib/cjs/styles/themes/next-gen/variants/text.d.ts +19 -0
- package/lib/cjs/styles/themes/next-gen/variants/text.js +27 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +564 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +462 -0
- package/lib/cjs/styles/variants/variants.js +2 -0
- package/lib/cjs/types/dataTable.d.ts +1 -1
- package/lib/cjs/types/listView.d.ts +1 -0
- package/lib/components/Badge/Badge.styles.js +34 -1
- package/lib/components/Button/Button.stories.js +1 -1
- package/lib/components/DataTable/DataTable.js +8 -4
- package/lib/components/DataTable/DataTable.styles.js +2 -1
- package/lib/components/DataTable/DataTableBadge.js +49 -19
- package/lib/components/DatePicker/DatePicker.js +1 -1
- package/lib/components/ListView/ListView.js +8 -4
- package/lib/components/ListView/ListView.stories.js +1 -1
- package/lib/components/ListView/ListView.styles.js +7 -0
- package/lib/components/ListView/ListViewFocusWrapper.js +2 -1
- package/lib/components/ListViewItem/ListViewItem.js +6 -4
- package/lib/components/ListViewItem/ListViewItem.styles.js +7 -1
- package/lib/components/MultivaluesField/DefaultMultivaluesField.js +1 -1
- package/lib/components/NavBar/NavBar.stories.js +1 -4
- package/lib/components/PanelHeader/PanelHeader.js +1 -1
- package/lib/hooks/useExpandableListViewItem/useExpandableListViewItem.js +1 -6
- package/lib/index.js +1 -0
- package/lib/recipes/ListAndPanel.stories.js +1 -2
- package/lib/recipes/NextGen/DefaultAvatar.stories.js +31 -0
- package/lib/recipes/NextGen/ListViewNextGen.stories.js +142 -0
- package/lib/recipes/NextGen/ModalNextGen.stories.js +62 -0
- package/lib/recipes/NextGen/NavBarNextGen.stories.js +223 -0
- package/lib/recipes/NextGen/NextGenDataTable.stories.js +142 -0
- package/lib/styles/themes/next-gen/colors/colors.js +101 -0
- package/lib/styles/themes/next-gen/convertedComponentList.js +2 -0
- package/lib/styles/themes/next-gen/forms.js +75 -0
- package/lib/styles/themes/next-gen/index.js +1 -0
- package/lib/styles/themes/next-gen/next-gen.js +40 -0
- package/lib/styles/themes/next-gen/open_sans.css +1 -0
- package/lib/styles/themes/next-gen/text.js +16 -0
- package/lib/styles/themes/next-gen/tokens/colorTokens.js +134 -0
- package/lib/styles/themes/next-gen/variants/button.js +227 -0
- package/lib/styles/themes/next-gen/variants/input.js +131 -0
- package/lib/styles/themes/next-gen/variants/label.js +26 -0
- package/lib/styles/themes/next-gen/variants/text.js +19 -0
- package/lib/styles/themes/next-gen/variants/variants.js +452 -0
- package/lib/styles/variants/variants.js +2 -0
- package/package.json +3 -1
@@ -10,7 +10,7 @@ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
10
10
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
11
11
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
12
12
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
13
|
-
var _excluded = ["disabledKeys", "isHoverable", "loadingState", "onLoadMore", "onSelectionChange", "onExpandedChange", "expandedKeys", "selectedKeys", "selectionMode", "selectionStyle", "items", "onFocus"];
|
13
|
+
var _excluded = ["containerProps", "disabledKeys", "isHoverable", "loadingState", "onLoadMore", "onSelectionChange", "onExpandedChange", "expandedKeys", "selectedKeys", "selectionMode", "selectionStyle", "items", "onFocus"];
|
14
14
|
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; }
|
15
15
|
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; }
|
16
16
|
import React, { forwardRef, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
@@ -19,6 +19,7 @@ import { useTreeState } from 'react-stately';
|
|
19
19
|
import { useCollator } from '@react-aria/i18n';
|
20
20
|
import { Virtualizer, VirtualizerItem } from '@react-aria/virtualizer';
|
21
21
|
import { ListLayout } from '@react-stately/layout';
|
22
|
+
import { Box } from '../../index';
|
22
23
|
import loadingStates from '../../utils/devUtils/constants/loadingStates';
|
23
24
|
import Loader from '../Loader';
|
24
25
|
import { ListViewContext } from './ListViewContext';
|
@@ -50,7 +51,8 @@ export function useListLayout(state) {
|
|
50
51
|
return layout;
|
51
52
|
}
|
52
53
|
var ListView = /*#__PURE__*/forwardRef(function (props, ref) {
|
53
|
-
var
|
54
|
+
var containerProps = props.containerProps,
|
55
|
+
disabledKeys = props.disabledKeys,
|
54
56
|
_props$isHoverable = props.isHoverable,
|
55
57
|
isHoverable = _props$isHoverable === void 0 ? true : _props$isHoverable,
|
56
58
|
loadingState = props.loadingState,
|
@@ -125,7 +127,9 @@ var ListView = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
125
127
|
value: {
|
126
128
|
state: state
|
127
129
|
}
|
128
|
-
}, ___EmotionJSX(
|
130
|
+
}, ___EmotionJSX(Box, _extends({
|
131
|
+
variant: "listView.container"
|
132
|
+
}, containerProps), ___EmotionJSX(Virtualizer, _extends({}, items ? gridProps : {
|
129
133
|
role: 'presentation'
|
130
134
|
}, {
|
131
135
|
onLoadMore: onLoadMore,
|
@@ -165,7 +169,7 @@ var ListView = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
165
169
|
});
|
166
170
|
}
|
167
171
|
return null;
|
168
|
-
}));
|
172
|
+
})));
|
169
173
|
});
|
170
174
|
ListView.defaultProps = {
|
171
175
|
'aria-label': 'listView',
|
@@ -63,7 +63,8 @@ var ExpandableItemChildrenContainer = /*#__PURE__*/forwardRef(function (props, r
|
|
63
63
|
tabIndex: 0,
|
64
64
|
onKeyDown: function onKeyDown(e) {
|
65
65
|
escapeFocusDelegate(e, setIsFocusEscaped, focusManager, isFocusEscaped);
|
66
|
-
}
|
66
|
+
},
|
67
|
+
variant: "listViewItem.expandableItemBody"
|
67
68
|
}), children);
|
68
69
|
});
|
69
70
|
var ListViewFocusWrapper = function ListViewFocusWrapper(props) {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
3
|
-
var _excluded = ["children", "className", "data", "isHovered", "isSelected", "linkProps", "onHoverChange", "onHoverEnd", "onHoverStart", "slots"];
|
3
|
+
var _excluded = ["children", "className", "data", "iconProps", "isHovered", "isSelected", "linkProps", "onHoverChange", "onHoverEnd", "onHoverStart", "slots"];
|
4
4
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
5
5
|
import React, { forwardRef } from 'react';
|
6
6
|
import { useHover } from '@react-aria/interactions';
|
@@ -16,6 +16,7 @@ var ListViewItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16
16
|
var children = _ref.children,
|
17
17
|
className = _ref.className,
|
18
18
|
data = _ref.data,
|
19
|
+
iconProps = _ref.iconProps,
|
19
20
|
isHovered = _ref.isHovered,
|
20
21
|
isSelected = _ref.isSelected,
|
21
22
|
linkProps = _ref.linkProps,
|
@@ -47,15 +48,16 @@ var ListViewItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
47
48
|
return 'listViewItem.iconWrapper';
|
48
49
|
};
|
49
50
|
var renderIcon = icon && ___EmotionJSX(Box, {
|
50
|
-
width: "25px"
|
51
|
-
|
51
|
+
width: "25px",
|
52
|
+
variant: "listViewItem.iconContainer"
|
53
|
+
}, ___EmotionJSX(Icon, _extends({
|
52
54
|
color: "accent.40",
|
53
55
|
icon: icon,
|
54
56
|
size: "md",
|
55
57
|
title: {
|
56
58
|
name: _concatInstanceProperty(_context = "".concat(text)).call(_context, LIST_ITEM_ICON)
|
57
59
|
}
|
58
|
-
}));
|
60
|
+
}, iconProps)));
|
59
61
|
var renderImage = !icon && image && ___EmotionJSX(Box, {
|
60
62
|
width: "35px"
|
61
63
|
}, ___EmotionJSX(Image, {
|
@@ -118,14 +118,19 @@ var expandableFocusContainer = {
|
|
118
118
|
boxShadow: '0 0 0 1px inset #D033FF'
|
119
119
|
}
|
120
120
|
};
|
121
|
+
var expandableItemBody = {
|
122
|
+
px: 'md'
|
123
|
+
};
|
121
124
|
var expandableStyledListItem = {
|
122
125
|
display: 'flex',
|
123
126
|
padding: '0px 15px 0px 25px',
|
124
127
|
flex: '1 1 0px',
|
125
|
-
minHeight: '80px',
|
126
128
|
flexGrow: 1,
|
127
129
|
justifyContent: 'center',
|
128
130
|
bg: 'white',
|
131
|
+
minHeight: '75px',
|
132
|
+
py: 'lg',
|
133
|
+
px: 'md',
|
129
134
|
'&.is-hovered': {
|
130
135
|
bg: 'accent.99',
|
131
136
|
cursor: 'pointer'
|
@@ -152,6 +157,7 @@ export default {
|
|
152
157
|
styledListItem: styledListItem,
|
153
158
|
loaderContainer: loaderContainer,
|
154
159
|
expandableFocusContainer: expandableFocusContainer,
|
160
|
+
expandableItemBody: expandableItemBody,
|
155
161
|
expandableStyledListItem: expandableStyledListItem,
|
156
162
|
expandableRow: expandableRow
|
157
163
|
};
|
@@ -357,8 +357,8 @@ var DefaultMultivaluesField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
357
357
|
}, ___EmotionJSX(Badge, _extends({
|
358
358
|
key: item.key,
|
359
359
|
role: "presentation",
|
360
|
-
variant: "selectedItemBadge",
|
361
360
|
bg: "active",
|
361
|
+
variant: "selectedItemBadge",
|
362
362
|
label: item.name,
|
363
363
|
slots: item.slots
|
364
364
|
}, item.badgeProps), ___EmotionJSX(IconButton, _extends({
|
@@ -79,13 +79,10 @@ var Verify = function Verify(props) {
|
|
79
79
|
id: "Hero-Chart",
|
80
80
|
stroke: "none",
|
81
81
|
strokeWidth: "1",
|
82
|
-
fill: "none",
|
83
82
|
fillRule: "evenodd"
|
84
83
|
}, ___EmotionJSX("g", {
|
85
84
|
id: "Dashboard-\u2013-Verify",
|
86
|
-
transform: "translate(-251.000000, -579.000000)"
|
87
|
-
fill: "#ffffff",
|
88
|
-
fillRule: "nonzero"
|
85
|
+
transform: "translate(-251.000000, -579.000000)"
|
89
86
|
}, ___EmotionJSX("g", {
|
90
87
|
id: "Group",
|
91
88
|
transform: "translate(251.000000, 577.000000)"
|
@@ -52,7 +52,7 @@ var PanelHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
52
52
|
var renderData = ___EmotionJSX(Box, {
|
53
53
|
isRow: true,
|
54
54
|
variant: text && subtext ? 'panelHeader.data' : 'panelHeader.emptyData'
|
55
|
-
}, icon ? renderIcon : renderImage, ___EmotionJSX(Box, {
|
55
|
+
}, slots !== null && slots !== void 0 && slots.leftOfData || icon ? renderIcon : renderImage, ___EmotionJSX(Box, {
|
56
56
|
variant: "panelHeader.wrapper"
|
57
57
|
}, text && ___EmotionJSX(Text, {
|
58
58
|
variant: "panelHeaderText"
|
@@ -187,12 +187,7 @@ var useExpandableListViewItem = function useExpandableListViewItem(props) {
|
|
187
187
|
variant: 'listViewItem.expandableRow'
|
188
188
|
});
|
189
189
|
var cellProps = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, hoverProps), {}, {
|
190
|
-
variant: 'listViewItem.expandableStyledListItem'
|
191
|
-
sx: {
|
192
|
-
minHeight: '75px',
|
193
|
-
py: 'lg',
|
194
|
-
px: 'md'
|
195
|
-
}
|
190
|
+
variant: 'listViewItem.expandableStyledListItem'
|
196
191
|
}, gridCellProps), {}, {
|
197
192
|
isFocused: isDisabled ? false : isFocusVisible,
|
198
193
|
isDisabled: isDisabled,
|
package/lib/index.js
CHANGED
@@ -187,6 +187,7 @@ export { default as TooltipTrigger } from './components/TooltipTrigger';
|
|
187
187
|
export * from './components/TooltipTrigger';
|
188
188
|
export { default as TreeView } from './components/TreeView';
|
189
189
|
export * from './components/TreeView';
|
190
|
+
export { default as NextGenTheme } from './styles/themes/next-gen';
|
190
191
|
|
191
192
|
/* eslint-enable import/export */
|
192
193
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { AstroProvider, Box, NextGenTheme } from '../..';
|
3
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
4
|
+
export default {
|
5
|
+
title: 'Next Gen Recipes/Default Avatar'
|
6
|
+
};
|
7
|
+
export var Default = function Default() {
|
8
|
+
return ___EmotionJSX(AstroProvider, {
|
9
|
+
themeOverrides: [NextGenTheme]
|
10
|
+
}, ___EmotionJSX(Box, {
|
11
|
+
isRow: true,
|
12
|
+
gap: "md",
|
13
|
+
alignItems: "center"
|
14
|
+
}, ___EmotionJSX(Box, {
|
15
|
+
variant: "avatar.sm",
|
16
|
+
backgroundColor: "green-100",
|
17
|
+
color: "green-800"
|
18
|
+
}, "AT"), ___EmotionJSX(Box, {
|
19
|
+
variant: "avatar.md",
|
20
|
+
backgroundColor: "blue-100",
|
21
|
+
color: "blue-800"
|
22
|
+
}, "LP"), ___EmotionJSX(Box, {
|
23
|
+
variant: "avatar.lg",
|
24
|
+
backgroundColor: "teal-100",
|
25
|
+
color: "teal-800"
|
26
|
+
}, "WP"), ___EmotionJSX(Box, {
|
27
|
+
variant: "avatar.xl",
|
28
|
+
backgroundColor: "red-100",
|
29
|
+
color: "red-800"
|
30
|
+
}, "JS")));
|
31
|
+
};
|
@@ -0,0 +1,142 @@
|
|
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 _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
14
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
15
|
+
import React from 'react';
|
16
|
+
import FormSelectIcon from '@pingux/mdi-react/FormSelectIcon';
|
17
|
+
import { AstroProvider, Box, Item, ListView, ListViewItem, NextGenTheme, Text } from '../../index';
|
18
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
19
|
+
var items = _Array$from({
|
20
|
+
length: 300
|
21
|
+
}, function (_, index) {
|
22
|
+
var id = (index + 1).toString();
|
23
|
+
return {
|
24
|
+
key: "Animal".concat(id),
|
25
|
+
name: "Animal".concat(id),
|
26
|
+
id: id
|
27
|
+
};
|
28
|
+
});
|
29
|
+
var iconStyles = [{
|
30
|
+
backgroundColor: 'cyan-100',
|
31
|
+
fill: 'cyan-800',
|
32
|
+
color: 'cyan-800'
|
33
|
+
}, {
|
34
|
+
backgroundColor: 'pink-100',
|
35
|
+
color: 'pink-800',
|
36
|
+
fill: 'pink-800'
|
37
|
+
}, {
|
38
|
+
backgroundColor: 'green-100',
|
39
|
+
color: 'green-800',
|
40
|
+
fill: 'green-800'
|
41
|
+
}, {
|
42
|
+
backgroundColor: 'orange-100',
|
43
|
+
color: 'orange-800',
|
44
|
+
fill: 'orange-800'
|
45
|
+
}, {
|
46
|
+
backgroundColor: 'blue-100',
|
47
|
+
color: 'blue-800',
|
48
|
+
fill: 'blue-800'
|
49
|
+
}, {
|
50
|
+
backgroundColor: 'red-100',
|
51
|
+
color: 'red-800',
|
52
|
+
fill: 'red-800'
|
53
|
+
}, {
|
54
|
+
backgroundColor: 'teal-100',
|
55
|
+
color: 'teal-800',
|
56
|
+
fill: 'teal-800'
|
57
|
+
}, {
|
58
|
+
backgroundColor: 'yellow-100',
|
59
|
+
color: 'yellow-800',
|
60
|
+
fill: 'yellow-800'
|
61
|
+
}, {
|
62
|
+
backgroundColor: 'indigo-100',
|
63
|
+
color: 'indigo-800',
|
64
|
+
fill: 'indigo-800'
|
65
|
+
}, {
|
66
|
+
backgroundColor: 'purple-100',
|
67
|
+
color: 'purple-800',
|
68
|
+
fill: 'purple-800'
|
69
|
+
}];
|
70
|
+
var createIcons = function createIcons(index) {
|
71
|
+
var lastDigit = index % 10;
|
72
|
+
return {
|
73
|
+
size: '32px',
|
74
|
+
sx: _objectSpread({
|
75
|
+
borderRadius: '50%',
|
76
|
+
padding: '6px'
|
77
|
+
}, iconStyles[lastDigit])
|
78
|
+
};
|
79
|
+
};
|
80
|
+
export default {
|
81
|
+
title: 'Next Gen Recipes/ListView'
|
82
|
+
};
|
83
|
+
export var Default = function Default() {
|
84
|
+
return ___EmotionJSX(Box, {
|
85
|
+
backgroundColor: "white"
|
86
|
+
}, ___EmotionJSX(AstroProvider, {
|
87
|
+
themeOverrides: [NextGenTheme]
|
88
|
+
}, ___EmotionJSX(Box, {
|
89
|
+
height: "400px",
|
90
|
+
backgroundColor: "white"
|
91
|
+
}, ___EmotionJSX(ListView, {
|
92
|
+
items: items,
|
93
|
+
selectionMode: "single"
|
94
|
+
}, _mapInstanceProperty(items).call(items, function (item, index) {
|
95
|
+
return ___EmotionJSX(Item, _extends({
|
96
|
+
key: item.name
|
97
|
+
}, item, {
|
98
|
+
index: index
|
99
|
+
}), ___EmotionJSX(ListViewItem, {
|
100
|
+
sx: {},
|
101
|
+
data: {
|
102
|
+
text: item.name,
|
103
|
+
icon: FormSelectIcon
|
104
|
+
},
|
105
|
+
iconProps: _objectSpread({}, createIcons(index)),
|
106
|
+
hasSeparator: false,
|
107
|
+
index: index,
|
108
|
+
items: items
|
109
|
+
}));
|
110
|
+
})))));
|
111
|
+
};
|
112
|
+
export var Expandable = function Expandable() {
|
113
|
+
return ___EmotionJSX(Box, {
|
114
|
+
backgroundColor: "white"
|
115
|
+
}, ___EmotionJSX(AstroProvider, {
|
116
|
+
themeOverrides: [NextGenTheme]
|
117
|
+
}, ___EmotionJSX(Box, {
|
118
|
+
height: "400px",
|
119
|
+
backgroundColor: "white"
|
120
|
+
}, ___EmotionJSX(ListView, {
|
121
|
+
items: items,
|
122
|
+
selectionMode: "expansion"
|
123
|
+
}, _mapInstanceProperty(items).call(items, function (item, index) {
|
124
|
+
return ___EmotionJSX(Item, _extends({
|
125
|
+
key: item.name
|
126
|
+
}, item, {
|
127
|
+
index: index
|
128
|
+
}), ___EmotionJSX(ListViewItem, {
|
129
|
+
data: {
|
130
|
+
text: item.name,
|
131
|
+
icon: FormSelectIcon
|
132
|
+
},
|
133
|
+
iconProps: _objectSpread({}, createIcons(index)),
|
134
|
+
hasSeparator: false,
|
135
|
+
index: index,
|
136
|
+
items: items
|
137
|
+
}), ___EmotionJSX(Box, {
|
138
|
+
py: "lg",
|
139
|
+
px: "sm"
|
140
|
+
}, ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat.")));
|
141
|
+
})))));
|
142
|
+
};
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { useModalState } from '../../hooks';
|
3
|
+
import { AstroProvider, Box, Button, Modal, NextGenTheme, OverlayProvider, Text } from '../../index';
|
4
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
5
|
+
export default {
|
6
|
+
title: 'Next Gen Recipes/Modal'
|
7
|
+
};
|
8
|
+
export var Default = function Default() {
|
9
|
+
var state = useModalState();
|
10
|
+
return ___EmotionJSX(AstroProvider, {
|
11
|
+
themeOverrides: [NextGenTheme]
|
12
|
+
}, ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(Button, {
|
13
|
+
onPress: state.open,
|
14
|
+
"aria-label": "Open modal"
|
15
|
+
}, "Open Modal"), state.isOpen && ___EmotionJSX(Modal, {
|
16
|
+
isOpen: state.isOpen,
|
17
|
+
onClose: state.close,
|
18
|
+
hasCloseButton: true,
|
19
|
+
contentProps: {
|
20
|
+
sx: {
|
21
|
+
p: '0px !important'
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}, ___EmotionJSX(Box, {
|
25
|
+
sx: {
|
26
|
+
p: '1rem 1.5rem',
|
27
|
+
borderBottom: '1px solid',
|
28
|
+
borderBottomColor: 'gray-300'
|
29
|
+
}
|
30
|
+
}, ___EmotionJSX(Text, {
|
31
|
+
variant: "modalTitle"
|
32
|
+
}, "Modal Title")), ___EmotionJSX(Box, {
|
33
|
+
p: "1.5rem 1.5rem"
|
34
|
+
}, ___EmotionJSX(Text, null, "Do you want to continue with this action that you\u2018re performing?")), ___EmotionJSX(Box, {
|
35
|
+
isRow: true,
|
36
|
+
sx: {
|
37
|
+
borderTop: '1px solid',
|
38
|
+
borderTopColor: 'gray-300',
|
39
|
+
p: '1rem 1.5rem'
|
40
|
+
}
|
41
|
+
}, ___EmotionJSX(Box, {
|
42
|
+
isRow: true,
|
43
|
+
mr: "auto"
|
44
|
+
}, ___EmotionJSX(Button, {
|
45
|
+
variant: "link",
|
46
|
+
onPress: state.close,
|
47
|
+
"aria-label": "Continue"
|
48
|
+
}, "Previous")), ___EmotionJSX(Box, {
|
49
|
+
isRow: true,
|
50
|
+
ml: "auto"
|
51
|
+
}, ___EmotionJSX(Button, {
|
52
|
+
variant: "link",
|
53
|
+
onPress: state.close,
|
54
|
+
"aria-label": "Cancel"
|
55
|
+
}, "Cancel"), ___EmotionJSX(Button, {
|
56
|
+
variant: "primary",
|
57
|
+
onPress: state.close,
|
58
|
+
ml: ".25rem",
|
59
|
+
"aria-label": "Continue",
|
60
|
+
isDisabled: true
|
61
|
+
}, "Next"))))));
|
62
|
+
};
|