@pingux/astro 2.119.0-alpha.1 → 2.119.0-alpha.3
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/Button/Buttons.styles.d.ts +40 -0
- package/lib/cjs/components/Button/Buttons.styles.js +4 -0
- package/lib/cjs/components/ListView/ListView.stories.d.ts +3 -0
- package/lib/cjs/components/ListView/ListView.stories.js +2 -1
- package/lib/cjs/components/NavBar/NavBar.stories.d.ts +1 -0
- package/lib/cjs/components/NavBar/NavBar.stories.js +272 -107
- package/lib/cjs/{styles/themeOverrides → components/NavBar}/stories/NavBar.chromatic.stories.js +53 -53
- package/lib/cjs/components/NavBar/stories/NavBarNextGenComponent.js +191 -0
- package/lib/cjs/{styles/themeOverrides/nextGenDarkMode → components/NavBar}/stories/NextGenDarkNavStory.chomatic.stories.js +2 -2
- package/lib/cjs/{styles/themes/next-gen → components/NavBar}/stories/NextGenNavBar.chromatic.stories.js +1 -1
- package/lib/cjs/components/NavBarSection/NavBarItem.js +3 -1
- package/lib/cjs/components/NavBarSection/NavBarItemHeader.js +9 -6
- package/lib/cjs/components/NavBarSection/NavBarItemHeader.test.d.ts +1 -0
- package/lib/cjs/components/NavBarSection/NavBarItemHeader.test.js +86 -0
- package/lib/cjs/components/Pagination/Pagination.d.ts +4 -0
- package/lib/cjs/components/Pagination/Pagination.js +78 -0
- package/lib/cjs/components/Pagination/Pagination.mdx +68 -0
- package/lib/cjs/components/Pagination/Pagination.stories.d.ts +39 -0
- package/lib/cjs/components/Pagination/Pagination.stories.js +159 -0
- package/lib/cjs/components/Pagination/Pagination.styles.d.ts +17 -0
- package/lib/cjs/components/Pagination/Pagination.styles.js +27 -0
- package/lib/cjs/components/Pagination/Pagination.test.d.ts +1 -0
- package/lib/cjs/components/Pagination/Pagination.test.js +208 -0
- package/lib/cjs/components/Pagination/PaginationProvider.d.ts +4 -0
- package/lib/cjs/components/Pagination/PaginationProvider.js +38 -0
- package/lib/cjs/components/Pagination/index.d.ts +2 -0
- package/lib/cjs/components/Pagination/index.js +33 -0
- package/lib/cjs/context/PaginationContext/index.d.ts +10 -0
- package/lib/cjs/context/PaginationContext/index.js +20 -0
- package/lib/cjs/hooks/index.d.ts +2 -0
- package/lib/cjs/hooks/index.js +14 -0
- package/lib/cjs/hooks/usePagination/index.d.ts +1 -0
- package/lib/cjs/hooks/usePagination/index.js +14 -0
- package/lib/cjs/hooks/usePagination/usePagination.d.ts +682 -0
- package/lib/cjs/hooks/usePagination/usePagination.js +178 -0
- package/lib/cjs/hooks/usePaginationState/index.d.ts +1 -0
- package/lib/cjs/hooks/usePaginationState/index.js +14 -0
- package/lib/cjs/hooks/usePaginationState/usePaginationState.d.ts +4 -0
- package/lib/cjs/hooks/usePaginationState/usePaginationState.js +18 -0
- package/lib/cjs/index.d.ts +3 -0
- package/lib/cjs/index.js +24 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.d.ts +3 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +3 -0
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.d.ts +4 -0
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +8 -3
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +30 -0
- package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +17 -0
- package/lib/cjs/styles/themes/next-gen/variants/button.js +7 -1
- package/lib/cjs/styles/themes/next-gen/variants/links.d.ts +9 -0
- package/lib/cjs/styles/themes/next-gen/variants/links.js +12 -1
- package/lib/cjs/styles/themes/next-gen/variants/navbar.d.ts +4 -0
- package/lib/cjs/styles/themes/next-gen/variants/navbar.js +11 -7
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +4 -0
- package/lib/cjs/styles/variants/variants.js +3 -1
- package/lib/cjs/types/pagination.d.ts +46 -0
- package/lib/cjs/types/pagination.js +6 -0
- package/lib/cjs/utils/devUtils/shouldReturnComingSoon.js +8 -2
- package/lib/components/Button/Buttons.styles.js +4 -0
- package/lib/components/ListView/ListView.stories.js +1 -1
- package/lib/components/NavBar/NavBar.stories.js +196 -32
- package/lib/{styles/themeOverrides → components/NavBar}/stories/NavBar.chromatic.stories.js +2 -2
- package/lib/components/NavBar/stories/NavBarNextGenComponent.js +182 -0
- package/lib/{styles/themeOverrides/nextGenDarkMode → components/NavBar}/stories/NextGenDarkNavStory.chomatic.stories.js +2 -2
- package/lib/{styles/themes/next-gen → components/NavBar}/stories/NextGenNavBar.chromatic.stories.js +1 -1
- package/lib/components/NavBarSection/NavBarItem.js +4 -2
- package/lib/components/NavBarSection/NavBarItemHeader.js +7 -4
- package/lib/components/NavBarSection/NavBarItemHeader.test.js +83 -0
- package/lib/components/Pagination/Pagination.js +64 -0
- package/lib/components/Pagination/Pagination.mdx +68 -0
- package/lib/components/Pagination/Pagination.stories.js +141 -0
- package/lib/components/Pagination/Pagination.styles.js +19 -0
- package/lib/components/Pagination/Pagination.test.js +205 -0
- package/lib/components/Pagination/PaginationProvider.js +24 -0
- package/lib/components/Pagination/index.js +2 -0
- package/lib/context/PaginationContext/index.js +11 -0
- package/lib/hooks/index.js +2 -0
- package/lib/hooks/usePagination/index.js +1 -0
- package/lib/hooks/usePagination/usePagination.js +170 -0
- package/lib/hooks/usePaginationState/index.js +1 -0
- package/lib/hooks/usePaginationState/usePaginationState.js +10 -0
- package/lib/index.js +3 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +3 -0
- package/lib/styles/themes/next-gen/convertedComponentList.js +6 -2
- package/lib/styles/themes/next-gen/variants/button.js +7 -1
- package/lib/styles/themes/next-gen/variants/links.js +12 -1
- package/lib/styles/themes/next-gen/variants/navbar.js +11 -7
- package/lib/styles/variants/variants.js +3 -1
- package/lib/types/pagination.js +1 -0
- package/lib/utils/devUtils/shouldReturnComingSoon.js +9 -3
- package/package.json +1 -1
- package/lib/cjs/recipes/NextGen/NavBarNextGen.stories.d.ts +0 -6
- package/lib/cjs/recipes/NextGen/NavBarNextGen.stories.js +0 -19
- package/lib/cjs/styles/themes/next-gen/stories/NavBarNextGenComponent.js +0 -191
- package/lib/recipes/NextGen/NavBarNextGen.stories.js +0 -9
- package/lib/styles/themes/next-gen/stories/NavBarNextGenComponent.js +0 -182
- /package/lib/cjs/{styles/themes/next-gen → components/NavBar}/stories/NavBarNextGenComponent.d.ts +0 -0
- /package/lib/cjs/{styles/themeOverrides/nextGenDarkMode → components/NavBar}/stories/NextGenDarkNavStory.chomatic.stories.d.ts +0 -0
- /package/lib/cjs/{styles/themes/next-gen → components/NavBar}/stories/NextGenNavBar.chromatic.stories.d.ts +0 -0
@@ -0,0 +1,178 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
4
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
5
|
+
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
6
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
7
|
+
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
8
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
9
|
+
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
10
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
11
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
12
|
+
_Object$defineProperty(exports, "__esModule", {
|
13
|
+
value: true
|
14
|
+
});
|
15
|
+
exports["default"] = void 0;
|
16
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
17
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
18
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectWithoutProperties"));
|
19
|
+
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
20
|
+
var _parseInt2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/parse-int"));
|
21
|
+
var _react = require("react");
|
22
|
+
var _PaginationContext = require("../../context/PaginationContext");
|
23
|
+
var _useProgressiveState5 = _interopRequireDefault(require("../useProgressiveState"));
|
24
|
+
var _excluded = ["currentPageIndex", "nextButtonProps", "offsetCount", "offsetMenuProps", "offsetOptions", "onOffsetCountChange", "onPageIndexChange", "previousButtonProps", "totalCount"];
|
25
|
+
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; }
|
26
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context3 = ownKeys(Object(source), !0)).call(_context3, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context4 = ownKeys(Object(source))).call(_context4, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
27
|
+
var getRangeString = function getRangeString(_ref) {
|
28
|
+
var _context, _context2;
|
29
|
+
var first = _ref.first,
|
30
|
+
last = _ref.last,
|
31
|
+
total = _ref.total;
|
32
|
+
return (0, _concat["default"])(_context = (0, _concat["default"])(_context2 = "".concat(first + 1, "-")).call(_context2, Math.min(last + 1, total), " of ")).call(_context, total);
|
33
|
+
};
|
34
|
+
var getNewIndexOnOffsetChange = function getNewIndexOnOffsetChange(_ref2) {
|
35
|
+
var first = _ref2.first,
|
36
|
+
newOffset = _ref2.newOffset;
|
37
|
+
var newLast = Math.floor(first / newOffset);
|
38
|
+
return newLast;
|
39
|
+
};
|
40
|
+
var defaultOffsetOptions = [10, 25, 50];
|
41
|
+
var usePagination = function usePagination(props) {
|
42
|
+
var currentPageIndexProp = props.currentPageIndex,
|
43
|
+
nextButtonProps = props.nextButtonProps,
|
44
|
+
offsetCountProp = props.offsetCount,
|
45
|
+
offsetMenuProps = props.offsetMenuProps,
|
46
|
+
_props$offsetOptions = props.offsetOptions,
|
47
|
+
offsetOptions = _props$offsetOptions === void 0 ? defaultOffsetOptions : _props$offsetOptions,
|
48
|
+
onOffsetCountChange = props.onOffsetCountChange,
|
49
|
+
onPageIndexChange = props.onPageIndexChange,
|
50
|
+
previousButtonProps = props.previousButtonProps,
|
51
|
+
totalCount = props.totalCount,
|
52
|
+
others = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
53
|
+
var isMountedRef = (0, _react.useRef)(false);
|
54
|
+
var initialIndexValue = currentPageIndexProp || 0;
|
55
|
+
var initialOffsetValue = offsetCountProp || 10;
|
56
|
+
var _useProgressiveState = (0, _useProgressiveState5["default"])(currentPageIndexProp, initialIndexValue),
|
57
|
+
_useProgressiveState2 = (0, _slicedToArray2["default"])(_useProgressiveState, 2),
|
58
|
+
currentPageIndex = _useProgressiveState2[0],
|
59
|
+
setCurrentPageIndex = _useProgressiveState2[1];
|
60
|
+
var _useProgressiveState3 = (0, _useProgressiveState5["default"])(offsetCountProp, initialOffsetValue),
|
61
|
+
_useProgressiveState4 = (0, _slicedToArray2["default"])(_useProgressiveState3, 2),
|
62
|
+
offsetCount = _useProgressiveState4[0],
|
63
|
+
setOffsetCount = _useProgressiveState4[1];
|
64
|
+
var _useState = (0, _react.useState)(currentPageIndex),
|
65
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
66
|
+
firstRenderedIndex = _useState2[0],
|
67
|
+
setFirstRenderedIndex = _useState2[1];
|
68
|
+
var _useState3 = (0, _react.useState)((currentPageIndex + 1) * offsetCount - 1),
|
69
|
+
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
70
|
+
lastRenderedIndex = _useState4[0],
|
71
|
+
setLastRenderedIndex = _useState4[1];
|
72
|
+
(0, _react.useEffect)(function () {
|
73
|
+
var calculatedLastIndex = (currentPageIndex + 1) * offsetCount - 1;
|
74
|
+
setFirstRenderedIndex(currentPageIndex * offsetCount);
|
75
|
+
setLastRenderedIndex(Math.min(calculatedLastIndex, totalCount));
|
76
|
+
}, [currentPageIndex, offsetCount, totalCount]);
|
77
|
+
(0, _react.useEffect)(function () {
|
78
|
+
if (isMountedRef.current) {
|
79
|
+
var newIndex = getNewIndexOnOffsetChange({
|
80
|
+
newOffset: offsetCount,
|
81
|
+
first: firstRenderedIndex
|
82
|
+
});
|
83
|
+
setCurrentPageIndex(newIndex);
|
84
|
+
if (onPageIndexChange) {
|
85
|
+
onPageIndexChange(newIndex);
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}, [offsetCount]);
|
89
|
+
(0, _react.useEffect)(function () {
|
90
|
+
isMountedRef.current = true;
|
91
|
+
}, []);
|
92
|
+
var lastIndex = Math.ceil(totalCount / offsetCount);
|
93
|
+
var isFirstIndex = currentPageIndex === 0;
|
94
|
+
var isLastIndex = lastIndex - 1 === currentPageIndex;
|
95
|
+
var popoverButtonString = (0, _react.useMemo)(function () {
|
96
|
+
return getRangeString({
|
97
|
+
first: firstRenderedIndex,
|
98
|
+
last: lastRenderedIndex,
|
99
|
+
total: totalCount
|
100
|
+
});
|
101
|
+
}, [firstRenderedIndex, lastRenderedIndex, totalCount]);
|
102
|
+
var setOffsetCountCallback = (0, _react.useCallback)(function (keys) {
|
103
|
+
if (keys !== null && keys !== void 0 && keys.currentKey) {
|
104
|
+
setOffsetCount((0, _parseInt2["default"])(keys.currentKey, 10));
|
105
|
+
if (onOffsetCountChange && isMountedRef.current) {
|
106
|
+
onOffsetCountChange((0, _parseInt2["default"])(keys.currentKey, 10));
|
107
|
+
}
|
108
|
+
}
|
109
|
+
}, [setOffsetCount, onOffsetCountChange, isMountedRef]);
|
110
|
+
var paginationState = (0, _react.useMemo)(function () {
|
111
|
+
return {
|
112
|
+
isFirstIndex: isFirstIndex,
|
113
|
+
isLastIndex: isLastIndex,
|
114
|
+
firstRenderedIndex: firstRenderedIndex,
|
115
|
+
lastRenderedIndex: lastRenderedIndex,
|
116
|
+
offsetCount: offsetCount,
|
117
|
+
totalCount: totalCount,
|
118
|
+
currentPageIndex: currentPageIndex,
|
119
|
+
popoverButtonString: popoverButtonString,
|
120
|
+
setOffsetCount: setOffsetCountCallback,
|
121
|
+
offsetOptions: offsetOptions
|
122
|
+
};
|
123
|
+
}, [isFirstIndex, isLastIndex, firstRenderedIndex, lastRenderedIndex, offsetCount, totalCount, currentPageIndex, popoverButtonString, setOffsetCountCallback, offsetOptions]);
|
124
|
+
var contextState = (0, _react.useMemo)(function () {
|
125
|
+
return {
|
126
|
+
firstRenderedIndex: firstRenderedIndex,
|
127
|
+
lastRenderedIndex: lastRenderedIndex,
|
128
|
+
offsetCount: offsetCount,
|
129
|
+
totalCount: totalCount,
|
130
|
+
currentPageIndex: currentPageIndex
|
131
|
+
};
|
132
|
+
}, [firstRenderedIndex, lastRenderedIndex, offsetCount, totalCount, currentPageIndex]);
|
133
|
+
var _useContext = (0, _react.useContext)(_PaginationContext.PaginationContext),
|
134
|
+
setPaginationState = _useContext.setPaginationState;
|
135
|
+
(0, _react.useEffect)(function () {
|
136
|
+
if (setPaginationState) {
|
137
|
+
setPaginationState(_objectSpread({}, contextState));
|
138
|
+
}
|
139
|
+
}, [contextState, setPaginationState]);
|
140
|
+
var nextIndex = function nextIndex() {
|
141
|
+
if (!isLastIndex) {
|
142
|
+
setCurrentPageIndex(currentPageIndex + 1);
|
143
|
+
if (onPageIndexChange) {
|
144
|
+
onPageIndexChange(currentPageIndex + 1);
|
145
|
+
}
|
146
|
+
}
|
147
|
+
};
|
148
|
+
var previousIndex = function previousIndex() {
|
149
|
+
if (!isFirstIndex) {
|
150
|
+
setCurrentPageIndex(currentPageIndex - 1);
|
151
|
+
if (onPageIndexChange) {
|
152
|
+
onPageIndexChange(currentPageIndex - 1);
|
153
|
+
}
|
154
|
+
}
|
155
|
+
};
|
156
|
+
var nextButtonPropsSpread = _objectSpread(_objectSpread({
|
157
|
+
'aria-label': 'Next Page'
|
158
|
+
}, nextButtonProps), {}, {
|
159
|
+
isDisabled: isLastIndex,
|
160
|
+
onPress: nextIndex
|
161
|
+
});
|
162
|
+
var previousButtonPropsSpread = _objectSpread(_objectSpread({
|
163
|
+
'aria-label': 'Previous Page'
|
164
|
+
}, previousButtonProps), {}, {
|
165
|
+
isDisabled: isFirstIndex,
|
166
|
+
onPress: previousIndex
|
167
|
+
});
|
168
|
+
var containerProps = _objectSpread({}, others);
|
169
|
+
return {
|
170
|
+
state: paginationState,
|
171
|
+
previousButtonProps: previousButtonPropsSpread,
|
172
|
+
nextButtonProps: nextButtonPropsSpread,
|
173
|
+
containerProps: containerProps,
|
174
|
+
offsetMenuProps: offsetMenuProps
|
175
|
+
};
|
176
|
+
};
|
177
|
+
var _default = usePagination;
|
178
|
+
exports["default"] = _default;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './usePaginationState';
|
@@ -0,0 +1,14 @@
|
|
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
|
+
_Object$defineProperty(exports, "default", {
|
9
|
+
enumerable: true,
|
10
|
+
get: function get() {
|
11
|
+
return _usePaginationState["default"];
|
12
|
+
}
|
13
|
+
});
|
14
|
+
var _usePaginationState = _interopRequireDefault(require("./usePaginationState"));
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
4
|
+
_Object$defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
6
|
+
});
|
7
|
+
exports["default"] = void 0;
|
8
|
+
var _react = require("react");
|
9
|
+
var _PaginationContext = require("../../context/PaginationContext");
|
10
|
+
var usePaginationState = function usePaginationState() {
|
11
|
+
var _useContext = (0, _react.useContext)(_PaginationContext.PaginationContext),
|
12
|
+
paginationState = _useContext.paginationState;
|
13
|
+
return {
|
14
|
+
paginationState: paginationState
|
15
|
+
};
|
16
|
+
};
|
17
|
+
var _default = usePaginationState;
|
18
|
+
exports["default"] = _default;
|
package/lib/cjs/index.d.ts
CHANGED
@@ -134,6 +134,8 @@ export * from './components/NumberField';
|
|
134
134
|
export { default as OverlayPanel } from './components/OverlayPanel';
|
135
135
|
export * from './components/OverlayPanel';
|
136
136
|
export { default as PageHeader } from './components/PageHeader';
|
137
|
+
export { default as Pagination } from './components/Pagination';
|
138
|
+
export { default as PaginationProvider } from './components/Pagination/PaginationProvider';
|
137
139
|
export { default as PanelHeader } from './components/PanelHeader';
|
138
140
|
export { default as PanelHeaderCloseButton } from './components/PanelHeader/controls/PanelHeaderCloseButton';
|
139
141
|
export { default as PanelHeaderMenu } from './components/PanelHeader/controls/PanelHeaderMenu';
|
@@ -206,6 +208,7 @@ export { default as TooltipTrigger } from './components/TooltipTrigger';
|
|
206
208
|
export * from './components/TooltipTrigger';
|
207
209
|
export { default as TreeView } from './components/TreeView';
|
208
210
|
export * from './components/TreeView';
|
211
|
+
export { PaginationContext } from './context/PaginationContext';
|
209
212
|
export { default as NextGenDarkTheme } from './styles/themeOverrides/nextGenDarkMode';
|
210
213
|
export { default as OnyxDarkTheme } from './styles/themeOverrides/nextGenDarkMode';
|
211
214
|
export { default as NextGenTheme } from './styles/themes/next-gen';
|
package/lib/cjs/index.js
CHANGED
@@ -101,6 +101,8 @@ var _exportNames = {
|
|
101
101
|
NumberField: true,
|
102
102
|
OverlayPanel: true,
|
103
103
|
PageHeader: true,
|
104
|
+
Pagination: true,
|
105
|
+
PaginationProvider: true,
|
104
106
|
PanelHeader: true,
|
105
107
|
PanelHeaderCloseButton: true,
|
106
108
|
PanelHeaderMenu: true,
|
@@ -142,6 +144,7 @@ var _exportNames = {
|
|
142
144
|
TimeZonePicker: true,
|
143
145
|
TooltipTrigger: true,
|
144
146
|
TreeView: true,
|
147
|
+
PaginationContext: true,
|
145
148
|
NextGenDarkTheme: true,
|
146
149
|
OnyxDarkTheme: true,
|
147
150
|
NextGenTheme: true,
|
@@ -675,6 +678,24 @@ _Object$defineProperty(exports, "PageHeader", {
|
|
675
678
|
return _PageHeader["default"];
|
676
679
|
}
|
677
680
|
});
|
681
|
+
_Object$defineProperty(exports, "Pagination", {
|
682
|
+
enumerable: true,
|
683
|
+
get: function get() {
|
684
|
+
return _Pagination["default"];
|
685
|
+
}
|
686
|
+
});
|
687
|
+
_Object$defineProperty(exports, "PaginationContext", {
|
688
|
+
enumerable: true,
|
689
|
+
get: function get() {
|
690
|
+
return _PaginationContext.PaginationContext;
|
691
|
+
}
|
692
|
+
});
|
693
|
+
_Object$defineProperty(exports, "PaginationProvider", {
|
694
|
+
enumerable: true,
|
695
|
+
get: function get() {
|
696
|
+
return _PaginationProvider["default"];
|
697
|
+
}
|
698
|
+
});
|
678
699
|
_Object$defineProperty(exports, "PanelHeader", {
|
679
700
|
enumerable: true,
|
680
701
|
get: function get() {
|
@@ -1639,6 +1660,8 @@ _forEachInstanceProperty(_context47 = _Object$keys(_OverlayPanel)).call(_context
|
|
1639
1660
|
});
|
1640
1661
|
});
|
1641
1662
|
var _PageHeader = _interopRequireDefault(require("./components/PageHeader"));
|
1663
|
+
var _Pagination = _interopRequireDefault(require("./components/Pagination"));
|
1664
|
+
var _PaginationProvider = _interopRequireDefault(require("./components/Pagination/PaginationProvider"));
|
1642
1665
|
var _PanelHeader = _interopRequireDefault(require("./components/PanelHeader"));
|
1643
1666
|
var _PanelHeaderCloseButton = _interopRequireDefault(require("./components/PanelHeader/controls/PanelHeaderCloseButton"));
|
1644
1667
|
var _PanelHeaderMenu = _interopRequireDefault(require("./components/PanelHeader/controls/PanelHeaderMenu"));
|
@@ -2031,6 +2054,7 @@ _forEachInstanceProperty(_context79 = _Object$keys(_TreeView)).call(_context79,
|
|
2031
2054
|
}
|
2032
2055
|
});
|
2033
2056
|
});
|
2057
|
+
var _PaginationContext = require("./context/PaginationContext");
|
2034
2058
|
var _nextGenDarkMode = _interopRequireDefault(require("./styles/themeOverrides/nextGenDarkMode"));
|
2035
2059
|
var _nextGen = _interopRequireDefault(require("./styles/themes/next-gen"));
|
2036
2060
|
var _types = require("./types");
|
@@ -8,6 +8,10 @@ export declare const componentSpecificNextGenBlacklist: {
|
|
8
8
|
PasswordField: string[];
|
9
9
|
TextField: string[];
|
10
10
|
OverlayPanel: string[];
|
11
|
+
NavBar: string[];
|
12
|
+
};
|
13
|
+
export declare const astroBlacklistStory: {
|
14
|
+
NavBar: string[];
|
11
15
|
};
|
12
16
|
export declare const nextGenOnlyComponents: string[];
|
13
17
|
export default nextGenConvertedComponents;
|
@@ -4,8 +4,8 @@ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/obje
|
|
4
4
|
_Object$defineProperty(exports, "__esModule", {
|
5
5
|
value: true
|
6
6
|
});
|
7
|
-
exports.nextGenOnlyComponents = exports["default"] = exports.componentSpecificNextGenBlacklist = void 0;
|
8
|
-
var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'NavigationHeader', 'Avatar', 'MultivaluesField', 'Text', 'Link', 'Card', 'IconWrapper', 'ComboBoxField', 'CodeView', 'Sticker Sheet', 'NextGen ListViewItem', 'Skeleton'];
|
7
|
+
exports.nextGenOnlyComponents = exports["default"] = exports.componentSpecificNextGenBlacklist = exports.astroBlacklistStory = void 0;
|
8
|
+
var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'NavigationHeader', 'Avatar', 'MultivaluesField', 'Text', 'Link', 'Card', 'IconWrapper', 'ComboBoxField', 'CodeView', 'Sticker Sheet', 'NextGen ListViewItem', 'Skeleton', 'Pagination'];
|
9
9
|
var componentSpecificNextGenBlacklist = {
|
10
10
|
AstroProvider: ['Default', 'With Custom Theme Override'],
|
11
11
|
Badge: ['Status Badge Variants', 'Badge With Left Slot And Icon', 'Callout Badges', 'Removable'],
|
@@ -14,9 +14,14 @@ var componentSpecificNextGenBlacklist = {
|
|
14
14
|
MultivaluesField: ['Condensed', 'Condensed With Section'],
|
15
15
|
PasswordField: ['Success'],
|
16
16
|
TextField: ['Success'],
|
17
|
-
OverlayPanel: ['Expandable']
|
17
|
+
OverlayPanel: ['Expandable'],
|
18
|
+
NavBar: ['Default', 'Controlled', 'Auto Collapse']
|
18
19
|
};
|
19
20
|
exports.componentSpecificNextGenBlacklist = componentSpecificNextGenBlacklist;
|
21
|
+
var astroBlacklistStory = {
|
22
|
+
NavBar: ['Onyx Default']
|
23
|
+
};
|
24
|
+
exports.astroBlacklistStory = astroBlacklistStory;
|
20
25
|
var nextGenOnlyComponents = ['NavigationHeader', 'Prompt', 'AI Panel', 'Response', 'Suggestions', 'Prompt Input'];
|
21
26
|
exports.nextGenOnlyComponents = nextGenOnlyComponents;
|
22
27
|
var _default = nextGenConvertedComponents;
|
@@ -1086,6 +1086,23 @@ declare const _default: {
|
|
1086
1086
|
};
|
1087
1087
|
transition: string;
|
1088
1088
|
};
|
1089
|
+
paginationMenu: {
|
1090
|
+
px: string;
|
1091
|
+
py: string;
|
1092
|
+
color: string;
|
1093
|
+
transition: string;
|
1094
|
+
fontSize: string;
|
1095
|
+
textDecoration: string;
|
1096
|
+
'&.is-pressed': {
|
1097
|
+
textDecoration: string;
|
1098
|
+
outline: string;
|
1099
|
+
color: string;
|
1100
|
+
};
|
1101
|
+
'&.is-focused': {
|
1102
|
+
textDecoration: string;
|
1103
|
+
outline: string;
|
1104
|
+
};
|
1105
|
+
};
|
1089
1106
|
};
|
1090
1107
|
forms: {
|
1091
1108
|
input: import("theme-ui").ThemeUICSSObject;
|
@@ -1903,6 +1920,15 @@ declare const _default: {
|
|
1903
1920
|
};
|
1904
1921
|
transition: string;
|
1905
1922
|
};
|
1923
|
+
navBarLogoLink: {
|
1924
|
+
borderRadius: string;
|
1925
|
+
px: string;
|
1926
|
+
py: string;
|
1927
|
+
'&.is-focused': {
|
1928
|
+
outline: string;
|
1929
|
+
outlineColor: string;
|
1930
|
+
};
|
1931
|
+
};
|
1906
1932
|
};
|
1907
1933
|
cards: {
|
1908
1934
|
interactive: {
|
@@ -2041,11 +2067,15 @@ declare const _default: {
|
|
2041
2067
|
};
|
2042
2068
|
navBar: {
|
2043
2069
|
container: {
|
2070
|
+
fontFamily: string;
|
2044
2071
|
width: string;
|
2045
2072
|
p: string;
|
2046
2073
|
backgroundColor: string;
|
2047
2074
|
boxShadow: string;
|
2048
2075
|
};
|
2076
|
+
sectionContainer: {
|
2077
|
+
pt: string;
|
2078
|
+
};
|
2049
2079
|
sectionButton: {
|
2050
2080
|
borderRadius: string;
|
2051
2081
|
'&.is-hovered': {
|
@@ -853,5 +853,22 @@ declare const buttons: {
|
|
853
853
|
};
|
854
854
|
transition: string;
|
855
855
|
};
|
856
|
+
paginationMenu: {
|
857
|
+
px: string;
|
858
|
+
py: string;
|
859
|
+
color: string;
|
860
|
+
transition: string;
|
861
|
+
fontSize: string;
|
862
|
+
textDecoration: string;
|
863
|
+
'&.is-pressed': {
|
864
|
+
textDecoration: string;
|
865
|
+
outline: string;
|
866
|
+
color: string;
|
867
|
+
};
|
868
|
+
'&.is-focused': {
|
869
|
+
textDecoration: string;
|
870
|
+
outline: string;
|
871
|
+
};
|
872
|
+
};
|
856
873
|
};
|
857
874
|
export default buttons;
|
@@ -153,6 +153,11 @@ var link = {
|
|
153
153
|
outline: 'none'
|
154
154
|
}
|
155
155
|
};
|
156
|
+
var paginationMenu = _objectSpread(_objectSpread({}, link), {}, {
|
157
|
+
px: '0px',
|
158
|
+
py: '0px',
|
159
|
+
color: 'text.primary'
|
160
|
+
});
|
156
161
|
var withIcon = _objectSpread(_objectSpread({}, secondary), {}, {
|
157
162
|
display: 'inline-flex'
|
158
163
|
});
|
@@ -350,7 +355,8 @@ var buttons = {
|
|
350
355
|
primaryWithIcon: primaryWithIcon,
|
351
356
|
iconButtons: iconButtons,
|
352
357
|
modalCloseButton: modalCloseButton,
|
353
|
-
aiChat: aiChat
|
358
|
+
aiChat: aiChat,
|
359
|
+
paginationMenu: paginationMenu
|
354
360
|
};
|
355
361
|
var _default = buttons;
|
356
362
|
exports["default"] = _default;
|
@@ -229,5 +229,14 @@ declare const _default: {
|
|
229
229
|
};
|
230
230
|
transition: string;
|
231
231
|
};
|
232
|
+
navBarLogoLink: {
|
233
|
+
borderRadius: string;
|
234
|
+
px: string;
|
235
|
+
py: string;
|
236
|
+
'&.is-focused': {
|
237
|
+
outline: string;
|
238
|
+
outlineColor: string;
|
239
|
+
};
|
240
|
+
};
|
232
241
|
};
|
233
242
|
export default _default;
|
@@ -17,6 +17,10 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/he
|
|
17
17
|
var _button = _interopRequireDefault(require("./button"));
|
18
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; }
|
19
19
|
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) { (0, _defineProperty2["default"])(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; }
|
20
|
+
var navBarFocus = {
|
21
|
+
outline: '2px solid',
|
22
|
+
outlineColor: 'active'
|
23
|
+
};
|
20
24
|
var nextGen = {
|
21
25
|
color: 'gray-800',
|
22
26
|
fontSize: 'md',
|
@@ -69,6 +73,12 @@ var button = _objectSpread(_objectSpread({}, _button["default"]["default"]), {},
|
|
69
73
|
var primaryButton = _objectSpread(_objectSpread({}, _button["default"].primary), {}, {
|
70
74
|
textDecoration: 'none'
|
71
75
|
});
|
76
|
+
var navBarLogoLink = {
|
77
|
+
borderRadius: '4px',
|
78
|
+
px: 'md',
|
79
|
+
py: 'sm',
|
80
|
+
'&.is-focused': _objectSpread({}, navBarFocus)
|
81
|
+
};
|
72
82
|
var _default = {
|
73
83
|
nextGen: nextGen,
|
74
84
|
onyx: onyx,
|
@@ -76,6 +86,7 @@ var _default = {
|
|
76
86
|
footerLinks: footerLinks,
|
77
87
|
footerHeader: footerHeader,
|
78
88
|
button: button,
|
79
|
-
primaryButton: primaryButton
|
89
|
+
primaryButton: primaryButton,
|
90
|
+
navBarLogoLink: navBarLogoLink
|
80
91
|
};
|
81
92
|
exports["default"] = _default;
|
@@ -9,11 +9,15 @@ export declare const navBarFocus: {
|
|
9
9
|
};
|
10
10
|
export declare const navBar: {
|
11
11
|
container: {
|
12
|
+
fontFamily: string;
|
12
13
|
width: string;
|
13
14
|
p: string;
|
14
15
|
backgroundColor: string;
|
15
16
|
boxShadow: string;
|
16
17
|
};
|
18
|
+
sectionContainer: {
|
19
|
+
pt: string;
|
20
|
+
};
|
17
21
|
sectionButton: {
|
18
22
|
borderRadius: string;
|
19
23
|
'&.is-hovered': {
|
@@ -29,11 +29,15 @@ var navBarFocus = {
|
|
29
29
|
exports.navBarFocus = navBarFocus;
|
30
30
|
var navBar = {
|
31
31
|
container: {
|
32
|
+
fontFamily: 'standard',
|
32
33
|
width: '252px',
|
33
34
|
p: 'sm',
|
34
35
|
backgroundColor: 'background.base',
|
35
36
|
boxShadow: '0 .5rem 1rem rgba(0, 0, 0, .15)'
|
36
37
|
},
|
38
|
+
sectionContainer: {
|
39
|
+
pt: '0'
|
40
|
+
},
|
37
41
|
sectionButton: {
|
38
42
|
borderRadius: '4px',
|
39
43
|
'&.is-hovered': {
|
@@ -47,7 +51,7 @@ var navBar = {
|
|
47
51
|
itemButton: {
|
48
52
|
py: '.75rem',
|
49
53
|
paddingLeft: '53px',
|
50
|
-
color: '
|
54
|
+
color: 'gray-700',
|
51
55
|
borderRadius: '4px',
|
52
56
|
'&.is-focused': _objectSpread({}, navBarFocus),
|
53
57
|
'&.is-hovered': {
|
@@ -55,7 +59,7 @@ var navBar = {
|
|
55
59
|
},
|
56
60
|
'&.is-pressed': {
|
57
61
|
backgroundColor: 'gray-200',
|
58
|
-
color: '
|
62
|
+
color: 'gray-700'
|
59
63
|
},
|
60
64
|
'&.is-selected': {
|
61
65
|
bg: 'lightblue',
|
@@ -64,7 +68,7 @@ var navBar = {
|
|
64
68
|
}
|
65
69
|
},
|
66
70
|
subtitle: {
|
67
|
-
color: '
|
71
|
+
color: 'gray-700'
|
68
72
|
},
|
69
73
|
headerText: {
|
70
74
|
color: 'text.primary',
|
@@ -88,13 +92,13 @@ var navBar = {
|
|
88
92
|
item: {
|
89
93
|
px: '1rem',
|
90
94
|
py: '.75rem',
|
91
|
-
color: '
|
95
|
+
color: 'gray-700',
|
92
96
|
borderRadius: '4px',
|
93
97
|
'&.is-hovered': {
|
94
98
|
backgroundColor: 'light'
|
95
99
|
},
|
96
100
|
'> div > svg': {
|
97
|
-
fill: '
|
101
|
+
fill: 'gray-700'
|
98
102
|
},
|
99
103
|
'&.is-pressed': {
|
100
104
|
backgroundColor: 'gray-200'
|
@@ -121,10 +125,10 @@ var navBar = {
|
|
121
125
|
'&.is-selected': _objectSpread({}, navBarSelected),
|
122
126
|
backgroundColor: 'transparent',
|
123
127
|
'> svg': {
|
124
|
-
fill: '
|
128
|
+
fill: 'gray-700'
|
125
129
|
},
|
126
130
|
'> div > svg': {
|
127
|
-
fill: '
|
131
|
+
fill: 'gray-700'
|
128
132
|
}
|
129
133
|
},
|
130
134
|
navBarItemBody: {
|
@@ -230,11 +230,15 @@ declare const _default: {
|
|
230
230
|
};
|
231
231
|
navBar: {
|
232
232
|
container: {
|
233
|
+
fontFamily: string;
|
233
234
|
width: string;
|
234
235
|
p: string;
|
235
236
|
backgroundColor: string;
|
236
237
|
boxShadow: string;
|
237
238
|
};
|
239
|
+
sectionContainer: {
|
240
|
+
pt: string;
|
241
|
+
};
|
238
242
|
sectionButton: {
|
239
243
|
borderRadius: string;
|
240
244
|
'&.is-hovered': {
|
@@ -45,6 +45,7 @@ var _Message = _interopRequireDefault(require("../../components/Messages/Message
|
|
45
45
|
var _Modal = _interopRequireDefault(require("../../components/Modal/Modal.styles"));
|
46
46
|
var _NavBar = _interopRequireDefault(require("../../components/NavBar/NavBar.styles"));
|
47
47
|
var _OverlayPanel = _interopRequireDefault(require("../../components/OverlayPanel/OverlayPanel.styles"));
|
48
|
+
var _Pagination = _interopRequireDefault(require("../../components/Pagination/Pagination.styles"));
|
48
49
|
var _PanelHeader = _interopRequireDefault(require("../../components/PanelHeader/PanelHeader.styles"));
|
49
50
|
var _PopoverMenu = _interopRequireDefault(require("../../components/PopoverMenu/PopoverMenu.styles"));
|
50
51
|
var _ProgressBar = _interopRequireDefault(require("../../components/ProgressBar/ProgressBar.styles"));
|
@@ -96,8 +97,9 @@ var _default = _objectSpread({
|
|
96
97
|
modal: _Modal["default"],
|
97
98
|
navBar: _NavBar["default"],
|
98
99
|
overlayPanel: _OverlayPanel["default"],
|
99
|
-
|
100
|
+
pagination: _Pagination["default"],
|
100
101
|
panelHeader: _PanelHeader["default"],
|
102
|
+
popoverMenu: _PopoverMenu["default"],
|
101
103
|
progressBar: _ProgressBar["default"],
|
102
104
|
rockerButton: _RockerButton["default"],
|
103
105
|
scrollBox: _ScrollBox["default"],
|