@pingux/astro 2.91.0-alpha.0 → 2.91.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/ListBox/Option.js +4 -2
- package/lib/cjs/components/ListView/ListViewItem.js +4 -2
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +4 -13
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +12 -0
- package/lib/cjs/styles/themes/next-gen/variants/input.js +1 -1
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +12 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +15 -3
- package/lib/components/ListBox/Option.js +4 -2
- package/lib/components/ListView/ListViewItem.js +4 -2
- package/lib/components/MultivaluesField/MultivaluesField.js +5 -14
- package/lib/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/styles/themes/next-gen/variants/input.js +1 -1
- package/lib/styles/themes/next-gen/variants/variants.js +15 -3
- package/package.json +1 -1
@@ -91,7 +91,8 @@ var Option = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
91
91
|
isDisabled = _useOption.isDisabled,
|
92
92
|
isSelected = _useOption.isSelected,
|
93
93
|
isFocused = _useOption.isFocused,
|
94
|
-
isFocusVisible = _useOption.isFocusVisible
|
94
|
+
isFocusVisible = _useOption.isFocusVisible,
|
95
|
+
isPressed = _useOption.isPressed;
|
95
96
|
var focused = isFocused || (state === null || state === void 0 || (_state$selectionManag = state.selectionManager) === null || _state$selectionManag === void 0 ? void 0 : _state$selectionManag.focusedKey) === item.key;
|
96
97
|
var setFocusOnHover = function setFocusOnHover() {
|
97
98
|
if (!focused && !isCondensed) {
|
@@ -103,7 +104,8 @@ var Option = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
103
104
|
isFocused: focused,
|
104
105
|
isSelected: isSelected,
|
105
106
|
isCondensed: isCondensed,
|
106
|
-
isFocusVisible: isFocusVisible
|
107
|
+
isFocusVisible: isFocusVisible,
|
108
|
+
isPressed: isPressed
|
107
109
|
}),
|
108
110
|
classNames = _useStatusClasses.classNames;
|
109
111
|
var updateActiveDescendant = (0, _MultivaluesContext.useMultivaluesContext)();
|
@@ -75,7 +75,8 @@ var ListViewItem = function ListViewItem(props) {
|
|
75
75
|
isVirtualized: true
|
76
76
|
}, state, rowRef),
|
77
77
|
raRowProps = _useGridListItem.rowProps,
|
78
|
-
gridCellProps = _useGridListItem.gridCellProps
|
78
|
+
gridCellProps = _useGridListItem.gridCellProps,
|
79
|
+
isPressed = _useGridListItem.isPressed;
|
79
80
|
var isSelected = state.selectionManager.isSelected(item.key);
|
80
81
|
var mergedProps = (0, _reactAria.mergeProps)(raRowProps, hoverProps, isFocusable ? _objectSpread(_objectSpread({}, focusProps), focusWithinProps) : {}, {
|
81
82
|
onPointerLeave: onPointerLeaveFunction
|
@@ -85,7 +86,8 @@ var ListViewItem = function ListViewItem(props) {
|
|
85
86
|
isSelected: isSelected,
|
86
87
|
isFocused: isDisabled ? false : isFocusVisible || isFocusVisibleWithin,
|
87
88
|
hasSeparator: hasSeparator,
|
88
|
-
hasInsetSeparator: hasInsetSeparator
|
89
|
+
hasInsetSeparator: hasInsetSeparator,
|
90
|
+
isPressed: isPressed
|
89
91
|
}),
|
90
92
|
classNames = _useStatusClasses.classNames;
|
91
93
|
|
@@ -31,19 +31,10 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
31
31
|
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; }
|
32
32
|
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; }
|
33
33
|
var MultivaluesField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
34
|
-
var
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
ref: ref
|
39
|
-
}, props));
|
40
|
-
default:
|
41
|
-
return (0, _react2.jsx)(_DefaultMultivaluesField["default"], (0, _extends2["default"])({
|
42
|
-
ref: ref
|
43
|
-
}, props));
|
44
|
-
}
|
45
|
-
}, [props.mode]);
|
46
|
-
return component;
|
34
|
+
var Component = props.mode === 'condensed' ? _CondensedMultivaluesField["default"] : _DefaultMultivaluesField["default"];
|
35
|
+
return (0, _react2.jsx)(Component, (0, _extends2["default"])({
|
36
|
+
ref: ref
|
37
|
+
}, props));
|
47
38
|
});
|
48
39
|
MultivaluesField.propTypes = _objectSpread(_objectSpread(_objectSpread({
|
49
40
|
/** The initial selected keys in the collection (uncontrolled). */
|
@@ -5,7 +5,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
6
6
|
});
|
7
7
|
exports.nextGenComponents = exports["default"] = 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', 'CodeView'];
|
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', 'ComboBoxField', 'CodeView'];
|
9
9
|
var nextGenComponents = ['NavigationHeader'];
|
10
10
|
exports.nextGenComponents = nextGenComponents;
|
11
11
|
var _default = nextGenConvertedComponents;
|
@@ -1750,6 +1750,10 @@ declare const _default: {
|
|
1750
1750
|
color: string;
|
1751
1751
|
};
|
1752
1752
|
};
|
1753
|
+
'&.is-pressed': {
|
1754
|
+
color: string;
|
1755
|
+
bg: string;
|
1756
|
+
};
|
1753
1757
|
};
|
1754
1758
|
};
|
1755
1759
|
separator: {
|
@@ -1851,6 +1855,9 @@ declare const _default: {
|
|
1851
1855
|
boxShadow: string;
|
1852
1856
|
bg: string;
|
1853
1857
|
};
|
1858
|
+
'&.is-pressed': {
|
1859
|
+
bg: string;
|
1860
|
+
};
|
1854
1861
|
};
|
1855
1862
|
styledContainer: {
|
1856
1863
|
py: string;
|
@@ -2054,6 +2061,11 @@ declare const _default: {
|
|
2054
2061
|
p: string;
|
2055
2062
|
border: string;
|
2056
2063
|
borderColor: string;
|
2064
|
+
item: {
|
2065
|
+
'&.is-pressed': {
|
2066
|
+
bg: string;
|
2067
|
+
};
|
2068
|
+
};
|
2057
2069
|
};
|
2058
2070
|
};
|
2059
2071
|
images: {
|
@@ -453,6 +453,10 @@ declare const _default: {
|
|
453
453
|
color: string;
|
454
454
|
};
|
455
455
|
};
|
456
|
+
'&.is-pressed': {
|
457
|
+
color: string;
|
458
|
+
bg: string;
|
459
|
+
};
|
456
460
|
};
|
457
461
|
};
|
458
462
|
separator: {
|
@@ -554,6 +558,9 @@ declare const _default: {
|
|
554
558
|
boxShadow: string;
|
555
559
|
bg: string;
|
556
560
|
};
|
561
|
+
'&.is-pressed': {
|
562
|
+
bg: string;
|
563
|
+
};
|
557
564
|
};
|
558
565
|
styledContainer: {
|
559
566
|
py: string;
|
@@ -757,6 +764,11 @@ declare const _default: {
|
|
757
764
|
p: string;
|
758
765
|
border: string;
|
759
766
|
borderColor: string;
|
767
|
+
item: {
|
768
|
+
'&.is-pressed': {
|
769
|
+
bg: string;
|
770
|
+
};
|
771
|
+
};
|
760
772
|
};
|
761
773
|
};
|
762
774
|
export default _default;
|
@@ -255,6 +255,10 @@ var listBox = {
|
|
255
255
|
'&.is-focused': {
|
256
256
|
color: 'text.primary'
|
257
257
|
}
|
258
|
+
},
|
259
|
+
'&.is-pressed': {
|
260
|
+
color: 'text.primary',
|
261
|
+
bg: 'lightblue'
|
258
262
|
}
|
259
263
|
}
|
260
264
|
};
|
@@ -368,6 +372,9 @@ var listViewItem = {
|
|
368
372
|
'&.is-focused': {
|
369
373
|
boxShadow: '0 0 0 3px inset #1a73e8',
|
370
374
|
bg: 'gray-100'
|
375
|
+
},
|
376
|
+
'&.is-pressed': {
|
377
|
+
bg: 'gray-200'
|
371
378
|
}
|
372
379
|
},
|
373
380
|
styledContainer: {
|
@@ -413,7 +420,7 @@ var navBar = {
|
|
413
420
|
backgroundColor: 'light'
|
414
421
|
},
|
415
422
|
'&.is-pressed': {
|
416
|
-
backgroundColor: '
|
423
|
+
backgroundColor: 'light'
|
417
424
|
},
|
418
425
|
'&.is-focused': _objectSpread({}, navBarFocus)
|
419
426
|
},
|
@@ -424,7 +431,7 @@ var navBar = {
|
|
424
431
|
backgroundColor: 'light'
|
425
432
|
},
|
426
433
|
'&.is-pressed': {
|
427
|
-
backgroundColor: '
|
434
|
+
backgroundColor: 'light',
|
428
435
|
color: 'text.primary'
|
429
436
|
},
|
430
437
|
'&.is-selected': {
|
@@ -558,7 +565,12 @@ var tabs = {
|
|
558
565
|
var menu = {
|
559
566
|
p: 'sm',
|
560
567
|
border: '1px solid',
|
561
|
-
borderColor: 'gray-300'
|
568
|
+
borderColor: 'gray-300',
|
569
|
+
item: {
|
570
|
+
'&.is-pressed': {
|
571
|
+
bg: 'blue-100'
|
572
|
+
}
|
573
|
+
}
|
562
574
|
};
|
563
575
|
var _default = {
|
564
576
|
navBar: navBar,
|
@@ -80,7 +80,8 @@ var Option = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
80
80
|
isDisabled = _useOption.isDisabled,
|
81
81
|
isSelected = _useOption.isSelected,
|
82
82
|
isFocused = _useOption.isFocused,
|
83
|
-
isFocusVisible = _useOption.isFocusVisible
|
83
|
+
isFocusVisible = _useOption.isFocusVisible,
|
84
|
+
isPressed = _useOption.isPressed;
|
84
85
|
var focused = isFocused || (state === null || state === void 0 || (_state$selectionManag = state.selectionManager) === null || _state$selectionManag === void 0 ? void 0 : _state$selectionManag.focusedKey) === item.key;
|
85
86
|
var setFocusOnHover = function setFocusOnHover() {
|
86
87
|
if (!focused && !isCondensed) {
|
@@ -92,7 +93,8 @@ var Option = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
92
93
|
isFocused: focused,
|
93
94
|
isSelected: isSelected,
|
94
95
|
isCondensed: isCondensed,
|
95
|
-
isFocusVisible: isFocusVisible
|
96
|
+
isFocusVisible: isFocusVisible,
|
97
|
+
isPressed: isPressed
|
96
98
|
}),
|
97
99
|
classNames = _useStatusClasses.classNames;
|
98
100
|
var updateActiveDescendant = useMultivaluesContext();
|
@@ -63,7 +63,8 @@ var ListViewItem = function ListViewItem(props) {
|
|
63
63
|
isVirtualized: true
|
64
64
|
}, state, rowRef),
|
65
65
|
raRowProps = _useGridListItem.rowProps,
|
66
|
-
gridCellProps = _useGridListItem.gridCellProps
|
66
|
+
gridCellProps = _useGridListItem.gridCellProps,
|
67
|
+
isPressed = _useGridListItem.isPressed;
|
67
68
|
var isSelected = state.selectionManager.isSelected(item.key);
|
68
69
|
var mergedProps = mergeProps(raRowProps, hoverProps, isFocusable ? _objectSpread(_objectSpread({}, focusProps), focusWithinProps) : {}, {
|
69
70
|
onPointerLeave: onPointerLeaveFunction
|
@@ -73,7 +74,8 @@ var ListViewItem = function ListViewItem(props) {
|
|
73
74
|
isSelected: isSelected,
|
74
75
|
isFocused: isDisabled ? false : isFocusVisible || isFocusVisibleWithin,
|
75
76
|
hasSeparator: hasSeparator,
|
76
|
-
hasInsetSeparator: hasInsetSeparator
|
77
|
+
hasInsetSeparator: hasInsetSeparator,
|
78
|
+
isPressed: isPressed
|
77
79
|
}),
|
78
80
|
classNames = _useStatusClasses.classNames;
|
79
81
|
|
@@ -10,7 +10,7 @@ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
10
10
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
11
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
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
13
|
-
import React, { forwardRef
|
13
|
+
import React, { forwardRef } from 'react';
|
14
14
|
import PropTypes from 'prop-types';
|
15
15
|
import { isIterableProp } from '../../utils/devUtils/props/isIterable';
|
16
16
|
import { ariaAttributesBasePropTypes } from '../../utils/docUtils/ariaAttributes';
|
@@ -20,19 +20,10 @@ import CondensedMultivaluesField from './CondensedMultivaluesField';
|
|
20
20
|
import DefaultMultivaluesField from './DefaultMultivaluesField';
|
21
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
22
22
|
var MultivaluesField = /*#__PURE__*/forwardRef(function (props, ref) {
|
23
|
-
var
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
ref: ref
|
28
|
-
}, props));
|
29
|
-
default:
|
30
|
-
return ___EmotionJSX(DefaultMultivaluesField, _extends({
|
31
|
-
ref: ref
|
32
|
-
}, props));
|
33
|
-
}
|
34
|
-
}, [props.mode]);
|
35
|
-
return component;
|
23
|
+
var Component = props.mode === 'condensed' ? CondensedMultivaluesField : DefaultMultivaluesField;
|
24
|
+
return ___EmotionJSX(Component, _extends({
|
25
|
+
ref: ref
|
26
|
+
}, props));
|
36
27
|
});
|
37
28
|
MultivaluesField.propTypes = _objectSpread(_objectSpread(_objectSpread({
|
38
29
|
/** The initial selected keys in the collection (uncontrolled). */
|
@@ -1,3 +1,3 @@
|
|
1
|
-
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', 'CodeView'];
|
1
|
+
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', 'ComboBoxField', 'CodeView'];
|
2
2
|
export var nextGenComponents = ['NavigationHeader'];
|
3
3
|
export default nextGenConvertedComponents;
|
@@ -246,6 +246,10 @@ var listBox = {
|
|
246
246
|
'&.is-focused': {
|
247
247
|
color: 'text.primary'
|
248
248
|
}
|
249
|
+
},
|
250
|
+
'&.is-pressed': {
|
251
|
+
color: 'text.primary',
|
252
|
+
bg: 'lightblue'
|
249
253
|
}
|
250
254
|
}
|
251
255
|
};
|
@@ -359,6 +363,9 @@ var listViewItem = {
|
|
359
363
|
'&.is-focused': {
|
360
364
|
boxShadow: '0 0 0 3px inset #1a73e8',
|
361
365
|
bg: 'gray-100'
|
366
|
+
},
|
367
|
+
'&.is-pressed': {
|
368
|
+
bg: 'gray-200'
|
362
369
|
}
|
363
370
|
},
|
364
371
|
styledContainer: {
|
@@ -404,7 +411,7 @@ var navBar = {
|
|
404
411
|
backgroundColor: 'light'
|
405
412
|
},
|
406
413
|
'&.is-pressed': {
|
407
|
-
backgroundColor: '
|
414
|
+
backgroundColor: 'light'
|
408
415
|
},
|
409
416
|
'&.is-focused': _objectSpread({}, navBarFocus)
|
410
417
|
},
|
@@ -415,7 +422,7 @@ var navBar = {
|
|
415
422
|
backgroundColor: 'light'
|
416
423
|
},
|
417
424
|
'&.is-pressed': {
|
418
|
-
backgroundColor: '
|
425
|
+
backgroundColor: 'light',
|
419
426
|
color: 'text.primary'
|
420
427
|
},
|
421
428
|
'&.is-selected': {
|
@@ -549,7 +556,12 @@ var tabs = {
|
|
549
556
|
var menu = {
|
550
557
|
p: 'sm',
|
551
558
|
border: '1px solid',
|
552
|
-
borderColor: 'gray-300'
|
559
|
+
borderColor: 'gray-300',
|
560
|
+
item: {
|
561
|
+
'&.is-pressed': {
|
562
|
+
bg: 'blue-100'
|
563
|
+
}
|
564
|
+
}
|
553
565
|
};
|
554
566
|
export default {
|
555
567
|
navBar: navBar,
|