@pingux/astro 2.142.1-alpha.1 → 2.143.0-alpha.1
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/AccordionGridGroup/AccordionGrid.styles.js +1 -2
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +86 -5
- package/lib/cjs/components/AccordionGridItem/AccordionGridItemHeader.js +7 -5
- package/lib/cjs/components/AccordionGroup/AccordionGroup.js +5 -3
- package/lib/cjs/components/AccordionGroup/AccordionGroup.stories.js +3 -6
- package/lib/cjs/components/AccordionItem/AccordionItem.js +8 -4
- package/lib/cjs/components/AstroProvider/AstroProvider.js +3 -3
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.js +6 -2
- package/lib/cjs/components/Button/Button.stories.js +6 -3
- package/lib/cjs/components/Button/Buttons.styles.d.ts +40 -0
- package/lib/cjs/components/Button/Buttons.styles.js +2 -0
- package/lib/cjs/components/Card/Card.styles.d.ts +3 -0
- package/lib/cjs/components/Card/Card.styles.js +4 -1
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.stories.js +5 -1
- package/lib/cjs/components/CopyText/CopyButton.js +4 -1
- package/lib/cjs/components/CopyText/CopyText.js +2 -1
- package/lib/cjs/components/GridList/GridList.stories.js +0 -1
- package/lib/cjs/components/Icon/Icon.js +2 -1
- package/lib/cjs/components/Icon/Icon.stories.js +1 -1
- package/lib/cjs/components/IconBadge/IconBadge.js +4 -4
- package/lib/cjs/components/IconBadge/IconBadge.stories.js +2 -2
- package/lib/cjs/components/Input/Input.styles.js +3 -0
- package/lib/cjs/components/ListView/ListView.stories.js +27 -10
- package/lib/cjs/components/ListView/ListViewItem.js +1 -1
- package/lib/cjs/components/Loader/Loader.js +71 -5
- package/lib/cjs/components/Loader/Loader.stories.js +17 -2
- package/lib/cjs/components/Loader/Loader.styles.d.ts +7 -0
- package/lib/cjs/components/Loader/Loader.styles.js +11 -1
- package/lib/cjs/components/MultivaluesField/CondensedMultivaluesField.js +6 -4
- package/lib/cjs/components/MultivaluesField/DefaultMultivaluesField.js +26 -15
- package/lib/cjs/components/PageHeader/PageHeader.js +5 -2
- package/lib/cjs/components/PanelHeader/PanelHeader.js +43 -10
- package/lib/cjs/components/PanelHeader/PanelHeader.stories.js +9 -4
- package/lib/cjs/components/PanelHeader/PanelHeader.styles.js +5 -0
- package/lib/cjs/components/PanelHeader/PanelHeader.test.js +22 -0
- package/lib/cjs/components/RequirementsList/RequirementsList.js +11 -8
- package/lib/cjs/components/Stepper/Step.js +1 -1
- package/lib/cjs/components/Stepper/Stepper.styles.js +1 -0
- package/lib/cjs/components/Switch/Switch.js +12 -2
- package/lib/cjs/components/Switch/Switch.styles.js +1 -1
- package/lib/cjs/components/SwitchField/SwitchField.js +7 -2
- package/lib/cjs/components/TableBase/TableBase.d.ts +1 -7
- package/lib/cjs/components/TableBase/TableBase.js +96 -74
- package/lib/cjs/components/TableBase/TableBase.stories.js +45 -36
- package/lib/cjs/components/TableBase/TableBase.styles.d.ts +5 -7
- package/lib/cjs/components/TableBase/TableBase.styles.js +8 -3
- package/lib/cjs/components/TableBase/stories/NextGenTableBase.js +5 -2
- package/lib/cjs/components/Tabs/Tabs.stories.js +23 -7
- package/lib/cjs/components/Text/Text.stories.d.ts +1 -0
- package/lib/cjs/components/Text/Text.stories.js +354 -1
- package/lib/cjs/components/Text/Text.styles.d.ts +10 -0
- package/lib/cjs/components/Text/Text.styles.js +5 -0
- package/lib/cjs/components/TextField/TextField.stories.js +12 -2
- package/lib/cjs/hooks/useCircularLoader/useCircularLoader.d.ts +23 -0
- package/lib/cjs/hooks/useCircularLoader/useCircularLoader.js +80 -0
- package/lib/cjs/hooks/useCircularLoader/useCircularLoader.test.d.ts +1 -0
- package/lib/cjs/hooks/useCircularLoader/useCircularLoader.test.js +136 -0
- package/lib/cjs/hooks/useField/useField.d.ts +6 -6
- package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +75 -0
- package/lib/cjs/hooks/usePagination/usePagination.d.ts +4 -4
- package/lib/cjs/styles/colors.d.ts +6 -0
- package/lib/cjs/styles/colors.js +4 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.d.ts +36 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.js +23 -2
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/icons.d.ts +5 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/index.d.ts +17 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/index.js +7 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.d.ts +66 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +18 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/forms.d.ts +15 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/forms.js +18 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/input.d.ts +0 -8
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/input.js +9 -9
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/links.d.ts +14 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/links.js +15 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +10 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +11 -0
- package/lib/cjs/styles/themes/astro/customProperties/icons.d.ts +5 -0
- package/lib/cjs/styles/themes/astro/customProperties/icons.js +11 -4
- package/lib/cjs/styles/themes/astro/customProperties/index.d.ts +18 -0
- package/lib/cjs/styles/themes/astro/customProperties/index.js +26 -1
- package/lib/cjs/styles/themes/next-gen/codeView/codeView.d.ts +2 -0
- package/lib/cjs/styles/themes/next-gen/codeView/codeView.js +4 -2
- package/lib/cjs/styles/themes/next-gen/colors/colors.d.ts +37 -0
- package/lib/cjs/styles/themes/next-gen/colors/colors.js +5 -2
- package/lib/cjs/styles/themes/next-gen/colors/iconWrapper.js +14 -35
- package/lib/cjs/styles/themes/next-gen/colors/twoTone.d.ts +37 -0
- package/lib/cjs/styles/themes/next-gen/colors/twoTone.js +46 -0
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.d.ts +4 -1
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +6 -3
- package/lib/cjs/styles/themes/next-gen/customProperties/customSizes.d.ts +10 -0
- package/lib/cjs/styles/themes/next-gen/customProperties/customSizes.js +22 -0
- package/lib/cjs/styles/themes/next-gen/customProperties/icons.d.ts +5 -0
- package/lib/cjs/styles/themes/next-gen/customProperties/icons.js +10 -3
- package/lib/cjs/styles/themes/next-gen/customProperties/index.d.ts +17 -0
- package/lib/cjs/styles/themes/next-gen/customProperties/index.js +26 -4
- package/lib/cjs/styles/themes/next-gen/customProperties/tShirtSizes.js +4 -4
- package/lib/cjs/styles/themes/next-gen/forms.d.ts +42 -0
- package/lib/cjs/styles/themes/next-gen/forms.js +5 -0
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +1185 -881
- package/lib/cjs/styles/themes/next-gen/next-gen.js +1 -1
- package/lib/cjs/styles/themes/next-gen/text.js +2 -2
- package/lib/cjs/styles/themes/next-gen/variants/accordion.d.ts +16 -0
- package/lib/cjs/styles/themes/next-gen/variants/accordion.js +26 -0
- package/lib/cjs/styles/themes/next-gen/variants/badges.d.ts +0 -17
- package/lib/cjs/styles/themes/next-gen/variants/badges.js +1 -3
- package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +151 -105
- package/lib/cjs/styles/themes/next-gen/variants/button.js +38 -7
- package/lib/cjs/styles/themes/next-gen/variants/cards.js +1 -1
- package/lib/cjs/styles/themes/next-gen/variants/input.js +16 -5
- package/lib/cjs/styles/themes/next-gen/variants/label.js +5 -3
- package/lib/cjs/styles/themes/next-gen/variants/links.d.ts +4 -2
- package/lib/cjs/styles/themes/next-gen/variants/listview.js +1 -1
- package/lib/cjs/styles/themes/next-gen/variants/panelHeader.d.ts +16 -0
- package/lib/cjs/styles/themes/next-gen/variants/panelHeader.js +26 -0
- package/lib/cjs/styles/themes/next-gen/variants/stepper.d.ts +66 -0
- package/lib/cjs/styles/themes/next-gen/variants/stepper.js +74 -0
- package/lib/cjs/styles/themes/next-gen/variants/switch.d.ts +36 -0
- package/lib/cjs/styles/themes/next-gen/variants/switch.js +44 -0
- package/lib/cjs/styles/themes/next-gen/variants/tableBase.d.ts +32 -22
- package/lib/cjs/styles/themes/next-gen/variants/tableBase.js +35 -23
- package/lib/cjs/styles/themes/next-gen/variants/text.d.ts +62 -0
- package/lib/cjs/styles/themes/next-gen/variants/text.js +67 -7
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +919 -752
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +88 -38
- package/lib/cjs/types/loader.d.ts +5 -2
- package/lib/cjs/types/shared/style.d.ts +2 -0
- package/lib/cjs/types/tableBase.d.ts +4 -3
- package/lib/components/AccordionGridGroup/AccordionGrid.styles.js +1 -2
- package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +86 -5
- package/lib/components/AccordionGridItem/AccordionGridItemHeader.js +6 -4
- package/lib/components/AccordionGroup/AccordionGroup.js +5 -3
- package/lib/components/AccordionGroup/AccordionGroup.stories.js +3 -6
- package/lib/components/AccordionItem/AccordionItem.js +8 -4
- package/lib/components/AstroProvider/AstroProvider.js +3 -3
- package/lib/components/Breadcrumbs/Breadcrumbs.js +7 -3
- package/lib/components/Button/Button.stories.js +4 -1
- package/lib/components/Button/Buttons.styles.js +2 -0
- package/lib/components/Card/Card.styles.js +4 -1
- package/lib/components/CollapsiblePanel/CollapsiblePanel.stories.js +5 -1
- package/lib/components/CopyText/CopyButton.js +4 -1
- package/lib/components/CopyText/CopyText.js +2 -1
- package/lib/components/GridList/GridList.stories.js +0 -1
- package/lib/components/Icon/Icon.js +2 -1
- package/lib/components/Icon/Icon.stories.js +1 -1
- package/lib/components/IconBadge/IconBadge.js +4 -4
- package/lib/components/IconBadge/IconBadge.stories.js +2 -2
- package/lib/components/Input/Input.styles.js +3 -0
- package/lib/components/ListView/ListView.stories.js +28 -11
- package/lib/components/ListView/ListViewItem.js +1 -1
- package/lib/components/Loader/Loader.js +71 -3
- package/lib/components/Loader/Loader.stories.js +13 -0
- package/lib/components/Loader/Loader.styles.js +11 -1
- package/lib/components/MultivaluesField/CondensedMultivaluesField.js +6 -4
- package/lib/components/MultivaluesField/DefaultMultivaluesField.js +27 -16
- package/lib/components/PageHeader/PageHeader.js +5 -2
- package/lib/components/PanelHeader/PanelHeader.js +44 -11
- package/lib/components/PanelHeader/PanelHeader.stories.js +9 -4
- package/lib/components/PanelHeader/PanelHeader.styles.js +5 -0
- package/lib/components/PanelHeader/PanelHeader.test.js +23 -1
- package/lib/components/RequirementsList/RequirementsList.js +7 -4
- package/lib/components/Stepper/Step.js +1 -1
- package/lib/components/Stepper/Stepper.styles.js +1 -0
- package/lib/components/Switch/Switch.js +12 -2
- package/lib/components/Switch/Switch.styles.js +1 -1
- package/lib/components/SwitchField/SwitchField.js +7 -2
- package/lib/components/TableBase/TableBase.js +100 -72
- package/lib/components/TableBase/TableBase.stories.js +46 -37
- package/lib/components/TableBase/TableBase.styles.js +8 -3
- package/lib/components/TableBase/stories/NextGenTableBase.js +6 -3
- package/lib/components/Tabs/Tabs.stories.js +23 -7
- package/lib/components/Text/Text.stories.js +352 -0
- package/lib/components/Text/Text.styles.js +5 -0
- package/lib/components/TextField/TextField.stories.js +12 -2
- package/lib/hooks/useCircularLoader/useCircularLoader.js +71 -0
- package/lib/hooks/useCircularLoader/useCircularLoader.test.js +129 -0
- package/lib/styles/colors.js +4 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/colors.js +23 -2
- package/lib/styles/themeOverrides/nextGenDarkMode/customProperties/index.js +7 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +18 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/forms.js +18 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/input.js +9 -9
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/links.js +15 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +11 -0
- package/lib/styles/themes/astro/customProperties/icons.js +12 -5
- package/lib/styles/themes/astro/customProperties/index.js +26 -1
- package/lib/styles/themes/next-gen/codeView/codeView.js +4 -2
- package/lib/styles/themes/next-gen/colors/colors.js +5 -2
- package/lib/styles/themes/next-gen/colors/iconWrapper.js +14 -35
- package/lib/styles/themes/next-gen/colors/twoTone.js +38 -0
- package/lib/styles/themes/next-gen/convertedComponentList.js +6 -3
- package/lib/styles/themes/next-gen/customProperties/customSizes.js +14 -0
- package/lib/styles/themes/next-gen/customProperties/icons.js +10 -3
- package/lib/styles/themes/next-gen/customProperties/index.js +26 -2
- package/lib/styles/themes/next-gen/customProperties/tShirtSizes.js +4 -4
- package/lib/styles/themes/next-gen/forms.js +5 -0
- package/lib/styles/themes/next-gen/next-gen.js +1 -1
- package/lib/styles/themes/next-gen/text.js +2 -2
- package/lib/styles/themes/next-gen/variants/accordion.js +18 -0
- package/lib/styles/themes/next-gen/variants/badges.js +1 -3
- package/lib/styles/themes/next-gen/variants/button.js +38 -7
- package/lib/styles/themes/next-gen/variants/cards.js +1 -1
- package/lib/styles/themes/next-gen/variants/input.js +16 -5
- package/lib/styles/themes/next-gen/variants/label.js +5 -3
- package/lib/styles/themes/next-gen/variants/listview.js +1 -1
- package/lib/styles/themes/next-gen/variants/panelHeader.js +18 -0
- package/lib/styles/themes/next-gen/variants/stepper.js +66 -0
- package/lib/styles/themes/next-gen/variants/switch.js +36 -0
- package/lib/styles/themes/next-gen/variants/tableBase.js +35 -23
- package/lib/styles/themes/next-gen/variants/text.js +67 -7
- package/lib/styles/themes/next-gen/variants/variants.js +82 -37
- package/package.json +1 -1
@@ -10,8 +10,9 @@ 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 = ["caption", "selectionMode", "selectionBehavior", "
|
14
|
-
_excluded2 = ["
|
13
|
+
var _excluded = ["caption", "selectionMode", "selectionBehavior", "hasSelectionCheckboxes", "isStickyHeader", "className"],
|
14
|
+
_excluded2 = ["caption"],
|
15
|
+
_excluded3 = ["type", "children", "className", "isSticky"];
|
15
16
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
16
17
|
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
17
18
|
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; }
|
@@ -23,7 +24,7 @@ import { useTable, useTableCell, useTableColumnHeader, useTableHeaderRow, useTab
|
|
23
24
|
import { mergeProps, useResizeObserver } from '@react-aria/utils';
|
24
25
|
import { VisuallyHidden } from '@react-aria/visually-hidden';
|
25
26
|
import { useTableColumnResizeState, useTableState } from '@react-stately/table';
|
26
|
-
import { Box,
|
27
|
+
import { Box, CheckboxField, Icon, Loader, Text } from '../..';
|
27
28
|
import { useGetTheme, useLocalOrForwardRef, useStatusClasses } from '../../hooks';
|
28
29
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
29
30
|
var TableBase = /*#__PURE__*/forwardRef(function (props, ref) {
|
@@ -31,11 +32,15 @@ var TableBase = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
31
32
|
var caption = props.caption,
|
32
33
|
selectionMode = props.selectionMode,
|
33
34
|
selectionBehavior = props.selectionBehavior,
|
34
|
-
tableBodyProps = props.tableBodyProps,
|
35
35
|
hasSelectionCheckboxes = props.hasSelectionCheckboxes,
|
36
36
|
_props$isStickyHeader = props.isStickyHeader,
|
37
37
|
isStickyHeader = _props$isStickyHeader === void 0 ? false : _props$isStickyHeader,
|
38
|
+
className = props.className,
|
38
39
|
others = _objectWithoutProperties(props, _excluded);
|
40
|
+
var tableRef = useLocalOrForwardRef(ref);
|
41
|
+
var headerRef = useRef(null);
|
42
|
+
var scrollRef = useRef(null);
|
43
|
+
var bodyRef = useRef(null);
|
39
44
|
var _useState = useState(0),
|
40
45
|
_useState2 = _slicedToArray(_useState, 2),
|
41
46
|
tableWidth = _useState2[0],
|
@@ -43,11 +48,9 @@ var TableBase = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
43
48
|
var state = useTableState(_objectSpread(_objectSpread({}, props), {}, {
|
44
49
|
showSelectionCheckboxes: hasSelectionCheckboxes || selectionMode === 'multiple' && selectionBehavior !== 'replace'
|
45
50
|
}));
|
46
|
-
var tableRef = useLocalOrForwardRef(ref);
|
47
|
-
var bodyRef = useRef(null);
|
48
51
|
var collection = state.collection;
|
49
52
|
var _useTable = useTable(_objectSpread(_objectSpread({}, props), {}, {
|
50
|
-
scrollRef:
|
53
|
+
scrollRef: scrollRef
|
51
54
|
}), state, tableRef),
|
52
55
|
gridProps = _useTable.gridProps;
|
53
56
|
var getDefaultWidth = useCallback(function (node) {
|
@@ -58,9 +61,9 @@ var TableBase = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
58
61
|
}, []);
|
59
62
|
var getDefaultMinWidth = useCallback(function (node) {
|
60
63
|
if (node.props.isSelectionCell) {
|
61
|
-
return
|
64
|
+
return 70;
|
62
65
|
}
|
63
|
-
return
|
66
|
+
return 100;
|
64
67
|
}, []);
|
65
68
|
var layoutState = useTableColumnResizeState({
|
66
69
|
getDefaultWidth: getDefaultWidth,
|
@@ -78,28 +81,31 @@ var TableBase = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
78
81
|
return setTableWidth(tableRef.current.clientWidth);
|
79
82
|
}
|
80
83
|
});
|
81
|
-
|
82
|
-
|
84
|
+
var _useStatusClasses = useStatusClasses(className, {
|
85
|
+
'has-caption': !!caption
|
86
|
+
}),
|
87
|
+
classNames = _useStatusClasses.classNames;
|
88
|
+
return ___EmotionJSX(Box, {
|
89
|
+
ref: scrollRef
|
83
90
|
}, ___EmotionJSX(Box, _extends({
|
84
91
|
as: "table",
|
92
|
+
display: "table",
|
85
93
|
variant: "tableBase.container",
|
94
|
+
className: classNames,
|
86
95
|
ref: tableRef
|
87
|
-
}, gridProps, others), caption && ___EmotionJSX(
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
textAlign: "left"
|
92
|
-
}, caption), ___EmotionJSX(TableRowGroup, {
|
96
|
+
}, gridProps, others), caption && ___EmotionJSX(TableCaption, {
|
97
|
+
caption: caption
|
98
|
+
}), ___EmotionJSX(TableRowGroup, {
|
99
|
+
ref: headerRef,
|
93
100
|
type: "thead",
|
94
|
-
hasCaption: !!caption,
|
95
101
|
isSticky: isStickyHeader
|
96
102
|
}, _mapInstanceProperty(_context = collection.headerRows).call(_context, function (headerRow) {
|
97
|
-
var _context2
|
103
|
+
var _context2;
|
98
104
|
return ___EmotionJSX(TableHeaderRow, {
|
99
105
|
key: headerRow.key,
|
100
106
|
item: headerRow,
|
101
107
|
state: state
|
102
|
-
}, _mapInstanceProperty(_context2 = _Array$from(
|
108
|
+
}, _mapInstanceProperty(_context2 = _Array$from(headerRow.childNodes)).call(_context2, function (column) {
|
103
109
|
return column.props.isSelectionCell ? ___EmotionJSX(TableSelectAllCell, {
|
104
110
|
key: column.key,
|
105
111
|
column: column,
|
@@ -115,24 +121,24 @@ var TableBase = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
115
121
|
})), ___EmotionJSX(TableRowGroup, _extends({
|
116
122
|
ref: bodyRef,
|
117
123
|
type: "tbody"
|
118
|
-
},
|
124
|
+
}, collection.body.props), collection.size === 0 && ___EmotionJSX(Box, {
|
125
|
+
as: "tr",
|
119
126
|
role: "row",
|
120
127
|
key: "loading",
|
121
128
|
"data-testid": "loading",
|
122
|
-
as: "tr",
|
123
129
|
alignItems: "center",
|
124
130
|
justifyContent: "center",
|
125
131
|
px: "lg",
|
126
132
|
py: "md"
|
127
133
|
}, ___EmotionJSX(Loader, {
|
128
134
|
color: "active"
|
129
|
-
})), _mapInstanceProperty(_context3 = _Array$from(collection)).call(_context3, function (row) {
|
135
|
+
})), _mapInstanceProperty(_context3 = _Array$from(collection.body.childNodes)).call(_context3, function (row) {
|
130
136
|
var _context4;
|
131
137
|
return ___EmotionJSX(TableRow, {
|
132
138
|
key: row.key,
|
133
139
|
item: row,
|
134
140
|
state: state
|
135
|
-
}, _mapInstanceProperty(_context4 = _Array$from(
|
141
|
+
}, _mapInstanceProperty(_context4 = _Array$from(collection.getChildren(row.key))).call(_context4, function (cell) {
|
136
142
|
return cell.props.isSelectionCell ? ___EmotionJSX(TableCheckboxCell, {
|
137
143
|
key: cell.key,
|
138
144
|
cell: cell,
|
@@ -147,29 +153,41 @@ var TableBase = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
147
153
|
}));
|
148
154
|
}))));
|
149
155
|
});
|
150
|
-
|
151
|
-
|
156
|
+
var TableCaption = /*#__PURE__*/forwardRef(function (props, ref) {
|
157
|
+
var caption = props.caption,
|
158
|
+
others = _objectWithoutProperties(props, _excluded2);
|
159
|
+
if (!caption) {
|
160
|
+
return null;
|
161
|
+
}
|
162
|
+
return ___EmotionJSX(Box, _extends({
|
163
|
+
as: "caption",
|
164
|
+
display: "table-caption",
|
165
|
+
ref: ref,
|
166
|
+
variant: "tableBase.caption",
|
167
|
+
textAlign: "left"
|
168
|
+
}, others), caption);
|
169
|
+
});
|
170
|
+
var TableRowGroup = /*#__PURE__*/forwardRef(function (props, ref) {
|
152
171
|
var type = props.type,
|
153
172
|
children = props.children,
|
154
|
-
hasCaption = props.hasCaption,
|
155
173
|
className = props.className,
|
156
174
|
isSticky = props.isSticky,
|
157
|
-
others = _objectWithoutProperties(props,
|
175
|
+
others = _objectWithoutProperties(props, _excluded3);
|
158
176
|
var _useTableRowGroup = useTableRowGroup(),
|
159
177
|
rowGroupProps = _useTableRowGroup.rowGroupProps;
|
160
|
-
var
|
161
|
-
hasCaption: hasCaption,
|
178
|
+
var _useStatusClasses2 = useStatusClasses(className, {
|
162
179
|
isSticky: isSticky && type === 'thead'
|
163
180
|
}),
|
164
|
-
classNames =
|
181
|
+
classNames = _useStatusClasses2.classNames;
|
165
182
|
return ___EmotionJSX(Box, _extends({
|
166
|
-
ref: ref,
|
167
183
|
as: type,
|
184
|
+
display: type === 'thead' ? 'table-header-group' : 'table-row-group',
|
185
|
+
ref: ref,
|
168
186
|
className: classNames,
|
169
187
|
variant: "tableBase.".concat(type)
|
170
188
|
}, rowGroupProps, others), children);
|
171
189
|
});
|
172
|
-
|
190
|
+
function TableHeaderRow(props) {
|
173
191
|
var item = props.item,
|
174
192
|
state = props.state,
|
175
193
|
children = props.children;
|
@@ -180,12 +198,12 @@ export function TableHeaderRow(props) {
|
|
180
198
|
rowProps = _useTableHeaderRow.rowProps;
|
181
199
|
return ___EmotionJSX(Box, _extends({
|
182
200
|
as: "tr",
|
183
|
-
|
201
|
+
display: "table-row"
|
184
202
|
}, rowProps, {
|
185
203
|
ref: ref
|
186
204
|
}), children);
|
187
205
|
}
|
188
|
-
|
206
|
+
function TableColumnHeader(props) {
|
189
207
|
var _column$props;
|
190
208
|
var column = props.column,
|
191
209
|
state = props.state,
|
@@ -214,24 +232,26 @@ export function TableColumnHeader(props) {
|
|
214
232
|
name: (sortDescriptor === null || sortDescriptor === void 0 ? void 0 : sortDescriptor.direction) === 'ascending' ? 'Sort ascending' : 'Sort descending'
|
215
233
|
}
|
216
234
|
});
|
217
|
-
var
|
235
|
+
var _useStatusClasses3 = useStatusClasses(className, {
|
218
236
|
isFocused: isFocusVisible
|
219
237
|
}),
|
220
|
-
classNames =
|
238
|
+
classNames = _useStatusClasses3.classNames;
|
221
239
|
return ___EmotionJSX(Box, _extends({
|
222
|
-
isRow: true,
|
223
|
-
ref: ref,
|
224
240
|
as: "th",
|
241
|
+
display: "table-cell",
|
242
|
+
ref: ref,
|
225
243
|
variant: "tableBase.head",
|
226
244
|
className: classNames,
|
227
|
-
alignItems: "center",
|
228
245
|
sx: _objectSpread({
|
229
|
-
gap: 'sm',
|
230
246
|
width: layoutState === null || layoutState === void 0 ? void 0 : layoutState.getColumnWidth(column.key)
|
231
247
|
}, column.props.sx)
|
232
|
-
}, mergeProps(columnHeaderProps, focusProps, column.props)),
|
248
|
+
}, mergeProps(columnHeaderProps, focusProps, column.props)), ___EmotionJSX(Box, {
|
249
|
+
isRow: true,
|
250
|
+
gap: "sm",
|
251
|
+
alignItems: "center"
|
252
|
+
}, ___EmotionJSX(Text, null, column.rendered), allowsSorting && sortIcon));
|
233
253
|
}
|
234
|
-
|
254
|
+
function TableRow(props) {
|
235
255
|
var item = props.item,
|
236
256
|
state = props.state,
|
237
257
|
children = props.children,
|
@@ -254,24 +274,24 @@ export function TableRow(props) {
|
|
254
274
|
}),
|
255
275
|
pressProps = _usePress.pressProps,
|
256
276
|
isPressed = _usePress.isPressed;
|
257
|
-
var
|
277
|
+
var _useStatusClasses4 = useStatusClasses(className, {
|
258
278
|
isSelected: isSelected,
|
259
279
|
isHovered: isHovered,
|
260
280
|
isPressed: isPressed,
|
261
281
|
isFocused: isFocusVisible,
|
262
282
|
isDisabled: isDisabled
|
263
283
|
}),
|
264
|
-
classNames =
|
284
|
+
classNames = _useStatusClasses4.classNames;
|
265
285
|
return ___EmotionJSX(Box, _extends({
|
266
286
|
as: "tr",
|
267
|
-
|
287
|
+
display: "table-row",
|
268
288
|
className: classNames,
|
269
289
|
variant: "tableBase.row"
|
270
290
|
}, mergeProps(rowProps, focusProps, hoverProps, pressProps), {
|
271
291
|
ref: ref
|
272
292
|
}), children);
|
273
293
|
}
|
274
|
-
|
294
|
+
function TableCell(props) {
|
275
295
|
var cell = props.cell,
|
276
296
|
state = props.state,
|
277
297
|
className = props.className,
|
@@ -284,12 +304,13 @@ export function TableCell(props) {
|
|
284
304
|
var _useFocusRing3 = useFocusRing(),
|
285
305
|
isFocusVisible = _useFocusRing3.isFocusVisible,
|
286
306
|
focusProps = _useFocusRing3.focusProps;
|
287
|
-
var
|
307
|
+
var _useStatusClasses5 = useStatusClasses(className, {
|
288
308
|
isFocused: isFocusVisible
|
289
309
|
}),
|
290
|
-
classNames =
|
310
|
+
classNames = _useStatusClasses5.classNames;
|
291
311
|
return ___EmotionJSX(Box, _extends({
|
292
312
|
as: "td",
|
313
|
+
display: "table-cell",
|
293
314
|
variant: "tableBase.data",
|
294
315
|
ref: ref,
|
295
316
|
className: classNames,
|
@@ -298,27 +319,6 @@ export function TableCell(props) {
|
|
298
319
|
}, cell.props.sx)
|
299
320
|
}, mergeProps(gridCellProps, focusProps, cell.props)), cell.rendered);
|
300
321
|
}
|
301
|
-
export function TableCheckboxCell(props) {
|
302
|
-
var cell = props.cell,
|
303
|
-
state = props.state,
|
304
|
-
layoutState = props.layoutState;
|
305
|
-
var ref = useRef(null);
|
306
|
-
var _useTableCell2 = useTableCell({
|
307
|
-
node: cell
|
308
|
-
}, state, ref),
|
309
|
-
gridCellProps = _useTableCell2.gridCellProps;
|
310
|
-
var _useTableSelectionChe = useTableSelectionCheckbox({
|
311
|
-
key: cell.parentKey
|
312
|
-
}, state),
|
313
|
-
checkboxProps = _useTableSelectionChe.checkboxProps;
|
314
|
-
return ___EmotionJSX(Box, _extends({
|
315
|
-
as: "td",
|
316
|
-
variant: "tableBase.data",
|
317
|
-
width: layoutState === null || layoutState === void 0 ? void 0 : layoutState.getColumnWidth(cell.column.key)
|
318
|
-
}, gridCellProps, {
|
319
|
-
ref: ref
|
320
|
-
}), ___EmotionJSX(CheckboxField, checkboxProps));
|
321
|
-
}
|
322
322
|
function TableSelectAllCell(props) {
|
323
323
|
var column = props.column,
|
324
324
|
state = props.state,
|
@@ -332,8 +332,11 @@ function TableSelectAllCell(props) {
|
|
332
332
|
checkboxProps = _useTableSelectAllChe.checkboxProps;
|
333
333
|
return ___EmotionJSX(Box, _extends({
|
334
334
|
as: "th",
|
335
|
+
display: "table-cell",
|
335
336
|
variant: "tableBase.head",
|
336
|
-
|
337
|
+
sx: {
|
338
|
+
width: layoutState === null || layoutState === void 0 ? void 0 : layoutState.getColumnWidth(column.key)
|
339
|
+
}
|
337
340
|
}, columnHeaderProps, {
|
338
341
|
ref: ref
|
339
342
|
}), state.selectionManager.selectionMode === 'single' ? ___EmotionJSX(VisuallyHidden, null, checkboxProps['aria-label']) : ___EmotionJSX(CheckboxField, _extends({
|
@@ -341,4 +344,29 @@ function TableSelectAllCell(props) {
|
|
341
344
|
'data-testid': 'select-all-checkbox'
|
342
345
|
}
|
343
346
|
}, checkboxProps)));
|
344
|
-
}
|
347
|
+
}
|
348
|
+
function TableCheckboxCell(props) {
|
349
|
+
var cell = props.cell,
|
350
|
+
state = props.state,
|
351
|
+
layoutState = props.layoutState;
|
352
|
+
var ref = useRef(null);
|
353
|
+
var _useTableCell2 = useTableCell({
|
354
|
+
node: cell
|
355
|
+
}, state, ref),
|
356
|
+
gridCellProps = _useTableCell2.gridCellProps;
|
357
|
+
var _useTableSelectionChe = useTableSelectionCheckbox({
|
358
|
+
key: cell.parentKey
|
359
|
+
}, state),
|
360
|
+
checkboxProps = _useTableSelectionChe.checkboxProps;
|
361
|
+
return ___EmotionJSX(Box, _extends({
|
362
|
+
as: "td",
|
363
|
+
display: "table-cell",
|
364
|
+
variant: "tableBase.data",
|
365
|
+
sx: _objectSpread({
|
366
|
+
width: layoutState === null || layoutState === void 0 ? void 0 : layoutState.getColumnWidth(cell.column.key)
|
367
|
+
}, cell.props.sx)
|
368
|
+
}, gridCellProps, {
|
369
|
+
ref: ref
|
370
|
+
}), ___EmotionJSX(CheckboxField, checkboxProps));
|
371
|
+
}
|
372
|
+
export default TableBase;
|
@@ -20,7 +20,7 @@ import React, { useState } from 'react';
|
|
20
20
|
import { useCollator } from '@react-aria/i18n';
|
21
21
|
import { useAsyncList } from '@react-stately/data';
|
22
22
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
23
|
-
import { Badge, Box, Cell, Column, Pagination, PaginationProvider, Row, TableBase, TBody, Text, THead } from '../..';
|
23
|
+
import { Badge, Box, Card, Cell, Column, Pagination, PaginationProvider, Row, TableBase, TBody, Text, THead } from '../..';
|
24
24
|
import { usePaginationState } from '../../hooks';
|
25
25
|
import { items as listData } from '../../utils/devUtils/constants/items';
|
26
26
|
import TableReadme from './TableBase.mdx';
|
@@ -76,14 +76,17 @@ var statusVariant = {
|
|
76
76
|
Inactive: 'secondaryStatusBadge'
|
77
77
|
};
|
78
78
|
export var Default = function Default() {
|
79
|
-
return ___EmotionJSX(
|
79
|
+
return ___EmotionJSX(Card, {
|
80
|
+
variant: "cards.tableWrapper"
|
81
|
+
}, ___EmotionJSX(TableBase, {
|
80
82
|
caption: "Lorem ipsum",
|
81
83
|
"aria-label": "table"
|
82
84
|
}, ___EmotionJSX(THead, {
|
83
85
|
columns: headers
|
84
86
|
}, function (column) {
|
85
87
|
return ___EmotionJSX(Column, {
|
86
|
-
key: column.key
|
88
|
+
key: column.key,
|
89
|
+
minWidth: 200
|
87
90
|
}, column.name);
|
88
91
|
}), ___EmotionJSX(TBody, {
|
89
92
|
items: objects
|
@@ -93,14 +96,16 @@ export var Default = function Default() {
|
|
93
96
|
}, function (columnKey) {
|
94
97
|
return ___EmotionJSX(Cell, null, item[columnKey]);
|
95
98
|
});
|
96
|
-
}));
|
99
|
+
})));
|
97
100
|
};
|
98
101
|
export var MultiSelection = function MultiSelection() {
|
99
102
|
var _React$useState = React.useState(new _Set(['1', '3'])),
|
100
103
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
101
104
|
selectedKeys = _React$useState2[0],
|
102
105
|
setSelectedKeys = _React$useState2[1];
|
103
|
-
return ___EmotionJSX(
|
106
|
+
return ___EmotionJSX(Card, {
|
107
|
+
variant: "cards.tableWrapper"
|
108
|
+
}, ___EmotionJSX(TableBase, {
|
104
109
|
caption: "Lorem ipsum",
|
105
110
|
"aria-label": "table",
|
106
111
|
selectionMode: "multiple",
|
@@ -110,7 +115,8 @@ export var MultiSelection = function MultiSelection() {
|
|
110
115
|
columns: headers
|
111
116
|
}, function (column) {
|
112
117
|
return ___EmotionJSX(Column, {
|
113
|
-
key: column.key
|
118
|
+
key: column.key,
|
119
|
+
minWidth: 200
|
114
120
|
}, column.name);
|
115
121
|
}), ___EmotionJSX(TBody, {
|
116
122
|
items: objects
|
@@ -120,41 +126,37 @@ export var MultiSelection = function MultiSelection() {
|
|
120
126
|
}, function (columnKey) {
|
121
127
|
return ___EmotionJSX(Cell, null, item[columnKey]);
|
122
128
|
});
|
123
|
-
}));
|
129
|
+
})));
|
124
130
|
};
|
125
131
|
export var WithStickyHeader = function WithStickyHeader() {
|
126
|
-
return ___EmotionJSX(
|
132
|
+
return ___EmotionJSX(Card, {
|
133
|
+
variant: "cards.tableWrapper",
|
134
|
+
height: "400px"
|
135
|
+
}, ___EmotionJSX(TableBase, {
|
127
136
|
"aria-label": "table",
|
128
137
|
isStickyHeader: true,
|
129
138
|
selectionMode: "single",
|
130
139
|
defaultSelectedKeys: ['2'],
|
131
|
-
disabledKeys: ['3']
|
132
|
-
tableBodyProps: {
|
133
|
-
style: {
|
134
|
-
height: '300px'
|
135
|
-
}
|
136
|
-
}
|
140
|
+
disabledKeys: ['3']
|
137
141
|
}, ___EmotionJSX(THead, null, ___EmotionJSX(Column, {
|
138
|
-
|
142
|
+
minWidth: 200
|
139
143
|
}, "Name"), ___EmotionJSX(Column, {
|
140
|
-
|
144
|
+
minWidth: 300
|
141
145
|
}, "Email"), ___EmotionJSX(Column, {
|
142
|
-
|
143
|
-
}, "Status"), ___EmotionJSX(Column, {
|
144
|
-
width: "1fr"
|
145
|
-
}, "Bio")), ___EmotionJSX(TBody, {
|
146
|
+
minWidth: 150
|
147
|
+
}, "Status"), ___EmotionJSX(Column, null, "Bio")), ___EmotionJSX(TBody, {
|
146
148
|
items: listData
|
147
149
|
}, function (item) {
|
148
150
|
var _context;
|
149
151
|
return ___EmotionJSX(Row, {
|
150
152
|
key: item.id
|
151
|
-
}, ___EmotionJSX(Cell, null, _concatInstanceProperty(_context = "".concat(item.firstName, " ")).call(_context, item.lastName)
|
153
|
+
}, ___EmotionJSX(Cell, null, _concatInstanceProperty(_context = "".concat(item.firstName, " ")).call(_context, item.lastName)), ___EmotionJSX(Cell, null, item.email), ___EmotionJSX(Cell, null, ___EmotionJSX(Badge, {
|
152
154
|
variant: statusVariant[item.status],
|
153
155
|
label: item.status
|
154
156
|
})), ___EmotionJSX(Cell, null, ___EmotionJSX(Text, {
|
155
157
|
variant: "textEllipsis"
|
156
|
-
}, "Lorem ipsum dolor sit amet
|
157
|
-
}));
|
158
|
+
}, "Lorem ipsum dolor sit amet.")));
|
159
|
+
})));
|
158
160
|
};
|
159
161
|
WithStickyHeader.parameters = {
|
160
162
|
a11y: {
|
@@ -174,16 +176,15 @@ var ExampleTable = function ExampleTable() {
|
|
174
176
|
paginationState = _usePaginationState.paginationState;
|
175
177
|
var renderItems = _sliceInstanceProperty(listData).call(listData, paginationState.firstRenderedIndex, paginationState.lastRenderedIndex + 1);
|
176
178
|
return ___EmotionJSX(TableBase, {
|
177
|
-
"aria-label": "table"
|
179
|
+
"aria-label": "table",
|
180
|
+
className: "has-pagination"
|
178
181
|
}, ___EmotionJSX(THead, null, ___EmotionJSX(Column, {
|
179
|
-
|
182
|
+
minWidth: 200
|
180
183
|
}, "Name"), ___EmotionJSX(Column, {
|
181
|
-
|
184
|
+
minWidth: 300
|
182
185
|
}, "Email"), ___EmotionJSX(Column, {
|
183
|
-
|
184
|
-
}, "Status"), ___EmotionJSX(Column, {
|
185
|
-
width: "1fr"
|
186
|
-
}, "Bio")), ___EmotionJSX(TBody, {
|
186
|
+
minWidth: 150
|
187
|
+
}, "Status"), ___EmotionJSX(Column, null, "Bio")), ___EmotionJSX(TBody, {
|
187
188
|
items: renderItems
|
188
189
|
}, function (item) {
|
189
190
|
var _context2;
|
@@ -194,7 +195,7 @@ var ExampleTable = function ExampleTable() {
|
|
194
195
|
label: item.status
|
195
196
|
})), ___EmotionJSX(Cell, null, ___EmotionJSX(Text, {
|
196
197
|
variant: "textEllipsis"
|
197
|
-
}, "Lorem ipsum dolor sit amet
|
198
|
+
}, "Lorem ipsum dolor sit amet.")));
|
198
199
|
}));
|
199
200
|
};
|
200
201
|
export var WithPagination = function WithPagination() {
|
@@ -202,14 +203,20 @@ export var WithPagination = function WithPagination() {
|
|
202
203
|
_useState2 = _slicedToArray(_useState, 2),
|
203
204
|
offsetCount = _useState2[0],
|
204
205
|
setOffsetCount = _useState2[1];
|
205
|
-
return ___EmotionJSX(
|
206
|
-
|
207
|
-
}, ___EmotionJSX(
|
206
|
+
return ___EmotionJSX(Card, {
|
207
|
+
variant: "cards.tableWrapper"
|
208
|
+
}, ___EmotionJSX(PaginationProvider, null, ___EmotionJSX(Box, {
|
209
|
+
variant: "cards.body",
|
210
|
+
overflow: "auto",
|
211
|
+
p: "0"
|
212
|
+
}, ___EmotionJSX(ExampleTable, null)), ___EmotionJSX(Box, {
|
213
|
+
variant: "cards.footer"
|
214
|
+
}, ___EmotionJSX(Pagination, {
|
208
215
|
totalCount: listData.length,
|
209
216
|
offsetCount: offsetCount,
|
210
217
|
onOffsetCountChange: setOffsetCount,
|
211
218
|
offsetOptions: [10, 20, 50, 100]
|
212
|
-
})));
|
219
|
+
}))));
|
213
220
|
};
|
214
221
|
WithPagination.parameters = {
|
215
222
|
a11y: {
|
@@ -325,7 +332,9 @@ export var DynamicWithSorting = function DynamicWithSorting() {
|
|
325
332
|
direction: 'ascending'
|
326
333
|
}
|
327
334
|
});
|
328
|
-
return ___EmotionJSX(
|
335
|
+
return ___EmotionJSX(Card, {
|
336
|
+
variant: "cards.tableWrapper"
|
337
|
+
}, ___EmotionJSX(TableBase, {
|
329
338
|
"aria-label": "Dynamic table",
|
330
339
|
onSortChange: function onSortChange(descriptor) {
|
331
340
|
if (descriptor.column) {
|
@@ -350,7 +359,7 @@ export var DynamicWithSorting = function DynamicWithSorting() {
|
|
350
359
|
}, function (columnKey) {
|
351
360
|
return ___EmotionJSX(Cell, null, item[columnKey]);
|
352
361
|
});
|
353
|
-
}));
|
362
|
+
})));
|
354
363
|
};
|
355
364
|
|
356
365
|
// Added to bypass color contrast issue due to virtualizer
|
@@ -18,6 +18,7 @@ var defaultFocus = {
|
|
18
18
|
};
|
19
19
|
var container = {
|
20
20
|
width: '100%',
|
21
|
+
height: '100%',
|
21
22
|
borderSpacing: '0',
|
22
23
|
borderCollapse: 'collapse',
|
23
24
|
position: 'relative'
|
@@ -36,7 +37,8 @@ var thead = {
|
|
36
37
|
'&.is-sticky': {
|
37
38
|
position: 'sticky',
|
38
39
|
top: 0,
|
39
|
-
zIndex: 1
|
40
|
+
zIndex: 1,
|
41
|
+
boxShadow: '0 1px 0 #68747f'
|
40
42
|
}
|
41
43
|
};
|
42
44
|
var head = _objectSpread(_objectSpread({}, text.label), {}, {
|
@@ -52,7 +54,8 @@ var head = _objectSpread(_objectSpread({}, text.label), {}, {
|
|
52
54
|
var tbody = {
|
53
55
|
borderBottom: '1px solid',
|
54
56
|
borderBottomColor: 'neutral.80',
|
55
|
-
|
57
|
+
overflowX: 'auto',
|
58
|
+
scrollPaddingBottom: '20px'
|
56
59
|
};
|
57
60
|
var row = {
|
58
61
|
'&:nth-of-type(odd) ': {
|
@@ -65,7 +68,9 @@ var row = {
|
|
65
68
|
'&.is-hovered': {
|
66
69
|
// This is the hover state for the row
|
67
70
|
},
|
68
|
-
'&.is-selected':
|
71
|
+
'&.is-selected': {
|
72
|
+
// This is the selected state for the row
|
73
|
+
},
|
69
74
|
'&.is-disabled': {
|
70
75
|
bg: 'neutral.90',
|
71
76
|
opacity: 0.5,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { Cell, Column, Row, TableBase, TBody, THead } from '../../..';
|
2
|
+
import { Card, Cell, Column, Row, TableBase, TBody, THead } from '../../..';
|
3
3
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
4
4
|
var NextGenTableBase = function NextGenTableBase() {
|
5
5
|
var headers = [{
|
@@ -34,7 +34,10 @@ var NextGenTableBase = function NextGenTableBase() {
|
|
34
34
|
additional_grant: '+25,000',
|
35
35
|
total_grant: '75,000'
|
36
36
|
}];
|
37
|
-
return ___EmotionJSX(
|
37
|
+
return ___EmotionJSX(Card, {
|
38
|
+
variant: "cards.tableWrapper",
|
39
|
+
overflow: "unset"
|
40
|
+
}, ___EmotionJSX(TableBase, {
|
38
41
|
caption: "Lorem ipsum",
|
39
42
|
"aria-label": "table"
|
40
43
|
}, ___EmotionJSX(THead, {
|
@@ -51,6 +54,6 @@ var NextGenTableBase = function NextGenTableBase() {
|
|
51
54
|
}, function (columnKey) {
|
52
55
|
return ___EmotionJSX(Cell, null, item[columnKey]);
|
53
56
|
});
|
54
|
-
}));
|
57
|
+
})));
|
55
58
|
};
|
56
59
|
export default NextGenTableBase;
|
@@ -45,13 +45,25 @@ export default {
|
|
45
45
|
}
|
46
46
|
};
|
47
47
|
var tabs = [{
|
48
|
-
name: '
|
49
|
-
children: ___EmotionJSX(Text, null, "Tab
|
48
|
+
name: 'Overview',
|
49
|
+
children: ___EmotionJSX(Text, null, "Tab 3 body")
|
50
50
|
}, {
|
51
|
-
name: '
|
52
|
-
children: ___EmotionJSX(Text, null, "Tab
|
51
|
+
name: 'Configuration',
|
52
|
+
children: ___EmotionJSX(Text, null, "Tab 3 body")
|
53
|
+
}, {
|
54
|
+
name: 'Resources',
|
55
|
+
children: ___EmotionJSX(Text, null, "Tab 3 body")
|
56
|
+
}, {
|
57
|
+
name: 'Policies',
|
58
|
+
children: ___EmotionJSX(Text, null, "Tab 3 body")
|
59
|
+
}, {
|
60
|
+
name: 'Attribute Mappings',
|
61
|
+
children: ___EmotionJSX(Text, null, "Tab 3 body")
|
62
|
+
}, {
|
63
|
+
name: 'Access',
|
64
|
+
children: ___EmotionJSX(Text, null, "Tab 3 body")
|
53
65
|
}, {
|
54
|
-
name: '
|
66
|
+
name: 'Integration',
|
55
67
|
children: ___EmotionJSX(Text, null, "Tab 3 body")
|
56
68
|
}];
|
57
69
|
var customTabs = [{
|
@@ -81,7 +93,11 @@ export var Controlled = function Controlled() {
|
|
81
93
|
_useState2 = _slicedToArray(_useState, 2),
|
82
94
|
currentTab = _useState2[0],
|
83
95
|
setCurrentTab = _useState2[1];
|
84
|
-
return ___EmotionJSX(
|
96
|
+
return ___EmotionJSX(Box, {
|
97
|
+
sx: {
|
98
|
+
maxWidth: '500px'
|
99
|
+
}
|
100
|
+
}, ___EmotionJSX(Tabs, {
|
85
101
|
selectedKey: currentTab,
|
86
102
|
onSelectionChange: setCurrentTab,
|
87
103
|
items: tabs
|
@@ -91,7 +107,7 @@ export var Controlled = function Controlled() {
|
|
91
107
|
title: item.name,
|
92
108
|
textValue: item.name
|
93
109
|
}, item.children);
|
94
|
-
});
|
110
|
+
}));
|
95
111
|
};
|
96
112
|
export var Centered = function Centered() {
|
97
113
|
return ___EmotionJSX(Tabs, {
|