@pingux/astro 1.2.0-alpha.9 → 1.2.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/CHANGELOG.md +43 -0
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.js +32 -25
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +148 -169
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.test.js +25 -30
- package/lib/cjs/components/AccordionGridItem/AccordionGridItem.js +29 -14
- package/lib/cjs/components/AccordionGridItem/AccordionGridItemBody.js +3 -3
- package/lib/cjs/components/AccordionGridItem/AccordionGridItemHeader.js +16 -18
- package/lib/cjs/components/AccordionGroup/AccordionGroup.js +2 -1
- package/lib/cjs/components/AccordionGroup/AccordionGroup.test.js +20 -1
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.stories.js +3 -3
- package/lib/cjs/components/Button/Button.js +14 -2
- package/lib/cjs/components/Button/Button.stories.js +33 -33
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +5 -3
- package/lib/cjs/components/Link/Link.js +2 -1
- package/lib/cjs/components/ListView/ListView.js +9 -13
- package/lib/cjs/components/ListViewItem/ListViewItem.js +15 -3
- package/lib/cjs/components/Modal/Modal.stories.js +1 -1
- package/lib/cjs/components/RockerButton/RockerButton.js +14 -22
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.js +5 -9
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.stories.js +4 -22
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.test.js +5 -14
- package/lib/cjs/components/SearchField/SearchField.stories.js +1 -15
- package/lib/cjs/components/TextAreaField/TextAreaField.js +54 -9
- package/lib/cjs/components/TextAreaField/TextAreaField.stories.js +31 -52
- package/lib/cjs/components/TextAreaField/TextAreaField.test.js +12 -0
- package/lib/cjs/context/AccordionGridContext/index.js +20 -0
- package/lib/cjs/hooks/useAriaLabelWarning/useAriaLabelWarning.js +2 -1
- package/lib/cjs/hooks/useField/useField.js +5 -0
- package/lib/cjs/hooks/useRockerButton/useRockerButton.js +4 -6
- package/lib/cjs/layouts/ListLayout.stories.js +6 -6
- package/lib/cjs/recipes/ArrayField.stories.js +1 -1
- package/lib/cjs/recipes/ConditionalFilter.stories.js +7 -3
- package/lib/cjs/recipes/RadioButtonsWithLinks.stories.js +1 -1
- package/lib/cjs/styles/variants/boxes.js +9 -0
- package/lib/cjs/styles/variants/buttons.js +20 -0
- package/lib/components/AccordionGridGroup/AccordionGridGroup.js +32 -24
- package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +143 -166
- package/lib/components/AccordionGridGroup/AccordionGridGroup.test.js +24 -25
- package/lib/components/AccordionGridItem/AccordionGridItem.js +29 -15
- package/lib/components/AccordionGridItem/AccordionGridItemBody.js +4 -4
- package/lib/components/AccordionGridItem/AccordionGridItemHeader.js +19 -20
- package/lib/components/AccordionGroup/AccordionGroup.js +2 -1
- package/lib/components/AccordionGroup/AccordionGroup.test.js +16 -2
- package/lib/components/Breadcrumbs/Breadcrumbs.stories.js +3 -3
- package/lib/components/Button/Button.js +15 -3
- package/lib/components/Button/Button.stories.js +17 -15
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +5 -3
- package/lib/components/Link/Link.js +2 -1
- package/lib/components/ListView/ListView.js +9 -12
- package/lib/components/ListViewItem/ListViewItem.js +14 -3
- package/lib/components/Modal/Modal.stories.js +1 -1
- package/lib/components/RockerButton/RockerButton.js +14 -21
- package/lib/components/RockerButtonGroup/RockerButtonGroup.js +5 -9
- package/lib/components/RockerButtonGroup/RockerButtonGroup.stories.js +2 -17
- package/lib/components/RockerButtonGroup/RockerButtonGroup.test.js +5 -11
- package/lib/components/SearchField/SearchField.stories.js +0 -11
- package/lib/components/TextAreaField/TextAreaField.js +54 -10
- package/lib/components/TextAreaField/TextAreaField.stories.js +26 -42
- package/lib/components/TextAreaField/TextAreaField.test.js +13 -0
- package/lib/context/AccordionGridContext/index.js +5 -0
- package/lib/hooks/useAriaLabelWarning/useAriaLabelWarning.js +2 -1
- package/lib/hooks/useField/useField.js +5 -0
- package/lib/hooks/useRockerButton/useRockerButton.js +4 -6
- package/lib/layouts/ListLayout.stories.js +6 -6
- package/lib/recipes/ArrayField.stories.js +1 -1
- package/lib/recipes/ConditionalFilter.stories.js +7 -3
- package/lib/recipes/RadioButtonsWithLinks.stories.js +1 -1
- package/lib/styles/variants/boxes.js +9 -0
- package/lib/styles/variants/buttons.js +20 -0
- package/package.json +2 -2
- package/lib/cjs/components/AccordionGridGroup/AccordionGridContext.js +0 -17
- package/lib/components/AccordionGridGroup/AccordionGridContext.js +0 -2
@@ -14,8 +14,9 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
|
|
14
14
|
|
15
15
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context; _forEachInstanceProperty(_context = ownKeys(Object(source), true)).call(_context, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors) { _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)); } else { var _context2; _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
16
16
|
|
17
|
-
import React, { forwardRef, useRef, useImperativeHandle, useEffect } from 'react';
|
17
|
+
import React, { forwardRef, useRef, useImperativeHandle, useEffect, useCallback } from 'react';
|
18
18
|
import PropTypes from 'prop-types';
|
19
|
+
import { useLayoutEffect, useResizeObserver } from '@react-aria/utils';
|
19
20
|
import { useColumnStyles, useField, useLabelHeight, usePropWarning } from '../../hooks';
|
20
21
|
import statuses from '../../utils/devUtils/constants/statuses';
|
21
22
|
import Box from '../Box';
|
@@ -31,7 +32,8 @@ var TextAreaField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
31
32
|
var helperText = props.helperText,
|
32
33
|
isUnresizable = props.isUnresizable,
|
33
34
|
rows = props.rows,
|
34
|
-
status = props.status
|
35
|
+
status = props.status,
|
36
|
+
slots = props.slots;
|
35
37
|
var statusClasses = {
|
36
38
|
isUnresizable: isUnresizable
|
37
39
|
};
|
@@ -45,6 +47,9 @@ var TextAreaField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
45
47
|
|
46
48
|
var textAreaRef = useRef();
|
47
49
|
var labelRef = useRef();
|
50
|
+
var containerRef = useRef();
|
51
|
+
var inputContainerRef = useRef();
|
52
|
+
var slotContainer = useRef();
|
48
53
|
usePropWarning(props, 'disabled', 'isDisabled');
|
49
54
|
/* istanbul ignore next */
|
50
55
|
|
@@ -57,6 +62,24 @@ var TextAreaField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
57
62
|
/* istanbul ignore next */
|
58
63
|
labelRef.current.style.width = textAreaRef.current.style.width;
|
59
64
|
};
|
65
|
+
/* istanbul ignore next */
|
66
|
+
|
67
|
+
|
68
|
+
var resizeSlotContainer = function resizeSlotContainer() {
|
69
|
+
inputContainerRef.current.style.width = textAreaRef.current.style.width;
|
70
|
+
};
|
71
|
+
|
72
|
+
var onResize = useCallback(function () {
|
73
|
+
/* istanbul ignore next */
|
74
|
+
if (slots === null || slots === void 0 ? void 0 : slots.inContainer) {
|
75
|
+
resizeSlotContainer();
|
76
|
+
}
|
77
|
+
}, [slotContainer]);
|
78
|
+
useResizeObserver({
|
79
|
+
ref: textAreaRef,
|
80
|
+
onResize: onResize
|
81
|
+
});
|
82
|
+
useLayoutEffect(onResize, [onResize]);
|
60
83
|
|
61
84
|
var _useLabelHeight = useLabelHeight({
|
62
85
|
labelRef: labelRef,
|
@@ -68,18 +91,22 @@ var TextAreaField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
68
91
|
labelMode: props.labelMode
|
69
92
|
});
|
70
93
|
useEffect(function () {
|
94
|
+
var thisRef = textAreaRef.current;
|
95
|
+
|
71
96
|
if (!props.isUnresizable && props.labelMode === 'float') {
|
72
|
-
|
97
|
+
thisRef.addEventListener('mousemove', props.resizeCallback ? props.resizeCallback : resizeFloatLabel);
|
73
98
|
}
|
74
99
|
|
75
100
|
return function () {
|
76
|
-
|
101
|
+
thisRef.removeEventListener('mousemove', props.resizeCallback ? props.resizeCallback : resizeFloatLabel);
|
77
102
|
};
|
78
|
-
}, []);
|
103
|
+
}, [props.isUnresizable, props.labelMode, props.resizeCallback]);
|
79
104
|
return ___EmotionJSX(Box, _extends({
|
80
105
|
variant: "forms.input.wrapper"
|
81
106
|
}, fieldContainerProps, {
|
82
|
-
sx: _objectSpread(_objectSpread({}, columnStyleProps === null || columnStyleProps === void 0 ? void 0 : columnStyleProps.sx), fieldContainerProps === null || fieldContainerProps === void 0 ? void 0 : fieldContainerProps.sx)
|
107
|
+
sx: _objectSpread(_objectSpread({}, columnStyleProps === null || columnStyleProps === void 0 ? void 0 : columnStyleProps.sx), fieldContainerProps === null || fieldContainerProps === void 0 ? void 0 : fieldContainerProps.sx),
|
108
|
+
ref: containerRef,
|
109
|
+
maxWidth: "100%"
|
83
110
|
}), ___EmotionJSX(Label, _extends({
|
84
111
|
ref: labelRef
|
85
112
|
}, fieldLabelProps, {
|
@@ -87,12 +114,23 @@ var TextAreaField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
87
114
|
gridRow: '1/5'
|
88
115
|
}
|
89
116
|
})), ___EmotionJSX(Box, {
|
117
|
+
isRow: true,
|
90
118
|
variant: "forms.input.container",
|
91
|
-
className: fieldControlProps.className
|
119
|
+
className: fieldControlProps.className,
|
120
|
+
minWidth: "40px",
|
121
|
+
maxWidth: "100%",
|
122
|
+
ref: inputContainerRef
|
92
123
|
}, ___EmotionJSX(TextArea, _extends({
|
93
124
|
ref: textAreaRef,
|
94
125
|
rows: rows
|
95
|
-
}, fieldControlProps
|
126
|
+
}, fieldControlProps, {
|
127
|
+
sx: (slots === null || slots === void 0 ? void 0 : slots.inContainer) && {
|
128
|
+
paddingRight: '35px'
|
129
|
+
}
|
130
|
+
})), (slots === null || slots === void 0 ? void 0 : slots.inContainer) && ___EmotionJSX(Box, {
|
131
|
+
variant: "boxes.textFieldInContainerSlot",
|
132
|
+
ref: slotContainer
|
133
|
+
}, slots === null || slots === void 0 ? void 0 : slots.inContainer)), helperText && ___EmotionJSX(FieldHelperText, {
|
96
134
|
status: status
|
97
135
|
}, helperText));
|
98
136
|
});
|
@@ -187,7 +225,13 @@ TextAreaField.propTypes = {
|
|
187
225
|
controlProps: PropTypes.shape({}),
|
188
226
|
|
189
227
|
/** Props object that is spread directly into the label element. */
|
190
|
-
labelProps: PropTypes.shape({})
|
228
|
+
labelProps: PropTypes.shape({}),
|
229
|
+
|
230
|
+
/** Provides a way to insert markup in specified places. */
|
231
|
+
slots: PropTypes.shape({
|
232
|
+
/** The given node will be inserted into the field container. */
|
233
|
+
inContainer: PropTypes.node
|
234
|
+
})
|
191
235
|
};
|
192
236
|
TextAreaField.defaultProps = {
|
193
237
|
hasAutoFocus: false,
|
@@ -195,7 +239,7 @@ TextAreaField.defaultProps = {
|
|
195
239
|
isReadOnly: false,
|
196
240
|
isRequired: false,
|
197
241
|
isUnresizable: false,
|
198
|
-
rows:
|
242
|
+
rows: 4,
|
199
243
|
status: statuses.DEFAULT
|
200
244
|
};
|
201
245
|
TextAreaField.displayName = 'TextAreaField';
|
@@ -1,8 +1,11 @@
|
|
1
1
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
2
|
+
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
3
|
import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
|
3
4
|
import React, { useState } from 'react';
|
5
|
+
import SearchIcon from 'mdi-react/SearchIcon';
|
4
6
|
import TextAreaField from '.';
|
5
7
|
import Box from '../Box';
|
8
|
+
import Icon from '../Icon';
|
6
9
|
import statuses from '../../utils/devUtils/constants/statuses';
|
7
10
|
import { modes as labelModes } from '../Label/constants';
|
8
11
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
@@ -62,43 +65,38 @@ export default {
|
|
62
65
|
}
|
63
66
|
}
|
64
67
|
};
|
68
|
+
|
69
|
+
var IconSlot = ___EmotionJSX(Box, {
|
70
|
+
isRow: true
|
71
|
+
}, ___EmotionJSX(Icon, {
|
72
|
+
icon: SearchIcon
|
73
|
+
}));
|
74
|
+
|
65
75
|
export var Default = function Default(args) {
|
66
76
|
return ___EmotionJSX(TextAreaField, args);
|
67
77
|
};
|
78
|
+
export var WithSlots = function WithSlots(args) {
|
79
|
+
return (// This is an example of a slot that can be passed into the component
|
80
|
+
// const IconSlot = (
|
81
|
+
// <Box isRow>
|
82
|
+
// <Icon
|
83
|
+
// icon={SearchIcon}
|
84
|
+
// />
|
85
|
+
// </Box>
|
86
|
+
// );
|
87
|
+
___EmotionJSX(TextAreaField, _extends({}, args, {
|
88
|
+
slots: {
|
89
|
+
inContainer: IconSlot
|
90
|
+
}
|
91
|
+
}))
|
92
|
+
);
|
93
|
+
};
|
68
94
|
export var FloatLabel = function FloatLabel() {
|
69
95
|
return ___EmotionJSX(TextAreaField, {
|
70
96
|
label: "Example label",
|
71
97
|
labelMode: "float"
|
72
98
|
});
|
73
99
|
};
|
74
|
-
export var LeftLabel = function LeftLabel() {
|
75
|
-
return ___EmotionJSX(Box, {
|
76
|
-
gap: "xl",
|
77
|
-
width: "fit-content"
|
78
|
-
}, ___EmotionJSX(TextAreaField, {
|
79
|
-
label: "Example label",
|
80
|
-
labelMode: "left"
|
81
|
-
}), ___EmotionJSX(TextAreaField, {
|
82
|
-
label: "Example label that is much longer than the previous one",
|
83
|
-
labelMode: "left",
|
84
|
-
status: "error"
|
85
|
-
}), ___EmotionJSX(TextAreaField, {
|
86
|
-
label: "Example label with set width",
|
87
|
-
labelMode: "left",
|
88
|
-
containerProps: {
|
89
|
-
sx: {
|
90
|
-
gridTemplateColumns: '120px auto'
|
91
|
-
}
|
92
|
-
}
|
93
|
-
}));
|
94
|
-
};
|
95
|
-
LeftLabel.parameters = {
|
96
|
-
docs: {
|
97
|
-
description: {
|
98
|
-
story: 'Users are able to override the default 40% column width when using left label by providing a new gridTemplatesColumn value, as shown in the example below.'
|
99
|
-
}
|
100
|
-
}
|
101
|
-
};
|
102
100
|
export var Controlled = function Controlled() {
|
103
101
|
var _useState = useState(),
|
104
102
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -152,20 +150,6 @@ export var Error = function Error() {
|
|
152
150
|
status: "error"
|
153
151
|
});
|
154
152
|
};
|
155
|
-
export var Success = function Success() {
|
156
|
-
return ___EmotionJSX(TextAreaField, {
|
157
|
-
helperText: "Here is some helpful text...",
|
158
|
-
label: "Example Label",
|
159
|
-
status: "success"
|
160
|
-
});
|
161
|
-
};
|
162
|
-
export var Warning = function Warning() {
|
163
|
-
return ___EmotionJSX(TextAreaField, {
|
164
|
-
helperText: "Here is some helpful text...",
|
165
|
-
label: "Example Label",
|
166
|
-
status: "warning"
|
167
|
-
});
|
168
|
-
};
|
169
153
|
export var WithoutStatusIndicator = function WithoutStatusIndicator() {
|
170
154
|
return ___EmotionJSX(TextAreaField, {
|
171
155
|
label: "Example Label",
|
@@ -120,4 +120,17 @@ test('form wrapper will have a max label column width when custom width set', fu
|
|
120
120
|
});
|
121
121
|
var textAreaContainer = screen.getByTestId(testId);
|
122
122
|
expect(textAreaContainer).toHaveStyle('grid-template-columns: 120px auto');
|
123
|
+
});
|
124
|
+
test('providing slot props causes slot to render', function () {
|
125
|
+
var slot = ___EmotionJSX("p", {
|
126
|
+
"data-testid": "testSlot"
|
127
|
+
}, "testText");
|
128
|
+
|
129
|
+
var slots = {
|
130
|
+
inContainer: slot
|
131
|
+
};
|
132
|
+
getComponent({
|
133
|
+
slots: slots
|
134
|
+
});
|
135
|
+
expect(screen.getByTestId('testSlot')).toBeInTheDocument();
|
123
136
|
});
|
@@ -7,8 +7,9 @@ import { useEffect } from 'react';
|
|
7
7
|
*/
|
8
8
|
|
9
9
|
var useAriaLabelWarning = function useAriaLabelWarning(component, ariaLabel) {
|
10
|
+
var condition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
10
11
|
useEffect(function () {
|
11
|
-
if (process.env.NODE_ENV === 'development' && !ariaLabel) {
|
12
|
+
if (process.env.NODE_ENV === 'development' && condition && !ariaLabel) {
|
12
13
|
// eslint-disable-next-line no-console
|
13
14
|
console.warn("".concat(component, " requires an aria-label"), '\n', '\n', 'NOTE: This is a development-only warning and will not display in production.');
|
14
15
|
}
|
@@ -114,6 +114,11 @@ var useField = function useField() {
|
|
114
114
|
setHasValue(true);
|
115
115
|
} else {
|
116
116
|
setHasValue(false);
|
117
|
+
} // adding this function resolves the error brought up in UIP-5116
|
118
|
+
|
119
|
+
|
120
|
+
if (e.persist) {
|
121
|
+
e.persist();
|
117
122
|
} // Make sure to call the original onChange event
|
118
123
|
|
119
124
|
|
@@ -17,24 +17,22 @@ import { useId } from '@react-aria/utils';
|
|
17
17
|
|
18
18
|
var useRockerButton = function useRockerButton(props, state, ref) {
|
19
19
|
var item = props.item,
|
20
|
-
|
20
|
+
isDisabled = props.isDisabled,
|
21
|
+
isSelected = props.isSelected;
|
21
22
|
var key = item.key;
|
22
|
-
var manager = state.selectionManager
|
23
|
-
selectedKey = state.selectedKey;
|
24
|
-
var isSelected = key === selectedKey;
|
23
|
+
var manager = state.selectionManager;
|
25
24
|
|
26
25
|
var _useSelectableItem = useSelectableItem({
|
26
|
+
isDisabled: isDisabled,
|
27
27
|
selectionManager: manager,
|
28
28
|
key: key,
|
29
29
|
ref: ref
|
30
30
|
}),
|
31
31
|
itemProps = _useSelectableItem.itemProps;
|
32
32
|
|
33
|
-
var isDisabled = propsDisabled || state.disabledKeys.has(key);
|
34
33
|
var rockerButtonId = useId();
|
35
34
|
return {
|
36
35
|
rockerButtonProps: _objectSpread(_objectSpread({}, itemProps), {}, {
|
37
|
-
isDisabled: isDisabled,
|
38
36
|
id: rockerButtonId,
|
39
37
|
'aria-pressed': isSelected,
|
40
38
|
'aria-disabled': isDisabled || undefined
|
@@ -547,7 +547,7 @@ export var Default = function Default() {
|
|
547
547
|
mr: "md",
|
548
548
|
"aria-label": "Save Button"
|
549
549
|
}, "Save"), ___EmotionJSX(Button, {
|
550
|
-
variant: "
|
550
|
+
variant: "link",
|
551
551
|
onPress: viewItem,
|
552
552
|
"aria-label": "Cancel Button"
|
553
553
|
}, "Cancel"))), editConfigurationVisible && ___EmotionJSX(OverlayPanel, {
|
@@ -677,7 +677,7 @@ export var Default = function Default() {
|
|
677
677
|
mr: "md",
|
678
678
|
"aria-label": "Save Button"
|
679
679
|
}, "Save"), ___EmotionJSX(Button, {
|
680
|
-
variant: "
|
680
|
+
variant: "link",
|
681
681
|
onPress: viewItem,
|
682
682
|
"aria-label": "Cancel Button"
|
683
683
|
}, "Cancel"))), addItemVisible && ___EmotionJSX(OverlayPanel, {
|
@@ -763,7 +763,7 @@ export var Default = function Default() {
|
|
763
763
|
isRow: true,
|
764
764
|
sx: buttonBarStyles
|
765
765
|
}, ___EmotionJSX(Button, {
|
766
|
-
variant: "
|
766
|
+
variant: "link",
|
767
767
|
onPress: resetListItem,
|
768
768
|
mr: "md",
|
769
769
|
"aria-label": "Cancel Button"
|
@@ -824,7 +824,7 @@ export var Default = function Default() {
|
|
824
824
|
isRow: true,
|
825
825
|
sx: buttonBarStyles
|
826
826
|
}, ___EmotionJSX(Button, {
|
827
|
-
variant: "
|
827
|
+
variant: "link",
|
828
828
|
onPress: resetListItem,
|
829
829
|
mr: "md"
|
830
830
|
}, "Cancel"), ___EmotionJSX(Button, {
|
@@ -846,11 +846,11 @@ export var Default = function Default() {
|
|
846
846
|
pt: "lg",
|
847
847
|
mr: "auto"
|
848
848
|
}, ___EmotionJSX(Button, {
|
849
|
-
variant: "
|
849
|
+
variant: "critical",
|
850
850
|
mr: "md",
|
851
851
|
onPress: deleteItem
|
852
852
|
}, "Delete"), ___EmotionJSX(Button, {
|
853
|
-
variant: "
|
853
|
+
variant: "link",
|
854
854
|
onPress: function onPress() {
|
855
855
|
return setIsDeleting(false);
|
856
856
|
}
|
@@ -96,7 +96,9 @@ export var Default = function Default() {
|
|
96
96
|
setEditOverviewVisible = _React$useState4[1];
|
97
97
|
|
98
98
|
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(Button, {
|
99
|
-
onPress:
|
99
|
+
onPress: function onPress() {
|
100
|
+
return setStaticOverviewVisible(true);
|
101
|
+
}
|
100
102
|
}, "Open Panel"), staticOverviewVisible && ___EmotionJSX(OverlayPanel, {
|
101
103
|
isOpen: staticOverviewVisible
|
102
104
|
}, ___EmotionJSX(Box, null, ___EmotionJSX(Box, {
|
@@ -111,7 +113,9 @@ export var Default = function Default() {
|
|
111
113
|
"aria-label": "edit",
|
112
114
|
variant: "inverted",
|
113
115
|
ml: "xs",
|
114
|
-
onPress:
|
116
|
+
onPress: function onPress() {
|
117
|
+
return setEditOverviewVisible(true);
|
118
|
+
}
|
115
119
|
}, ___EmotionJSX(Icon, {
|
116
120
|
icon: CreateIcon,
|
117
121
|
size: 14
|
@@ -435,7 +439,7 @@ export var Default = function Default() {
|
|
435
439
|
onPress: function onPress() {
|
436
440
|
return setEditOverviewVisible(false);
|
437
441
|
},
|
438
|
-
variant: "
|
442
|
+
variant: "link",
|
439
443
|
"aria-label": "cancel"
|
440
444
|
}, "Cancel"))))));
|
441
445
|
};
|
@@ -117,6 +117,14 @@ var inputInContainerSlot = {
|
|
117
117
|
top: '50%',
|
118
118
|
transform: 'translateY(-50%)'
|
119
119
|
};
|
120
|
+
var textFieldInContainerSlot = {
|
121
|
+
position: 'absolute',
|
122
|
+
bg: 'transparent',
|
123
|
+
width: '20px',
|
124
|
+
right: '10px',
|
125
|
+
top: '50%',
|
126
|
+
transform: 'translateY(-50%)'
|
127
|
+
};
|
120
128
|
var copy = {
|
121
129
|
alignItems: 'center',
|
122
130
|
width: 'max-content',
|
@@ -295,6 +303,7 @@ export default {
|
|
295
303
|
environmentChip: environmentChip,
|
296
304
|
expandableRow: expandableRow,
|
297
305
|
inputInContainerSlot: inputInContainerSlot,
|
306
|
+
textFieldInContainerSlot: textFieldInContainerSlot,
|
298
307
|
fileInputFieldWrapper: fileInputFieldWrapper,
|
299
308
|
listItem: listItem,
|
300
309
|
listBoxSectionTitle: listBoxSectionTitle,
|
@@ -375,6 +375,7 @@ var chipDeleteButton = {
|
|
375
375
|
};
|
376
376
|
|
377
377
|
var rocker = _objectSpread(_objectSpread({}, base), {}, {
|
378
|
+
border: '0',
|
378
379
|
display: 'inline-flex',
|
379
380
|
height: '26px',
|
380
381
|
lineHeight: '26px',
|
@@ -386,6 +387,7 @@ var rocker = _objectSpread(_objectSpread({}, base), {}, {
|
|
386
387
|
textTransform: 'uppercase',
|
387
388
|
bg: 'accent.95',
|
388
389
|
'&.is-selected': {
|
390
|
+
bg: 'active',
|
389
391
|
color: 'white'
|
390
392
|
},
|
391
393
|
'&.is-focused': _objectSpread({}, defaultFocus)
|
@@ -539,6 +541,23 @@ var tooltipInline = _objectSpread(_objectSpread({}, text), {}, {
|
|
539
541
|
}
|
540
542
|
});
|
541
543
|
|
544
|
+
var defaultVariant = _objectSpread(_objectSpread({}, base), {}, {
|
545
|
+
bg: 'white',
|
546
|
+
border: '1px solid',
|
547
|
+
borderColor: 'active',
|
548
|
+
'&.is-hovered': _objectSpread({}, defaultHover),
|
549
|
+
'&.is-pressed': _objectSpread({}, defaultActive),
|
550
|
+
'&.is-focused': _objectSpread({}, defaultFocus)
|
551
|
+
});
|
552
|
+
|
553
|
+
var filter = _objectSpread(_objectSpread({}, defaultVariant), {}, {
|
554
|
+
px: 'sm',
|
555
|
+
borderColor: 'neutral.80',
|
556
|
+
height: 40,
|
557
|
+
color: 'active',
|
558
|
+
display: 'flex'
|
559
|
+
});
|
560
|
+
|
542
561
|
var colorBlock = {
|
543
562
|
bg: 'neutral.95',
|
544
563
|
border: '1px solid',
|
@@ -611,6 +630,7 @@ export default {
|
|
611
630
|
environmentBreadcrumb: environmentBreadcrumb,
|
612
631
|
expandableRow: expandableRow,
|
613
632
|
fileInputField: fileInputField,
|
633
|
+
filter: filter,
|
614
634
|
iconButton: iconButton,
|
615
635
|
imageUpload: imageUpload,
|
616
636
|
inline: inline,
|
package/package.json
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pingux/astro",
|
3
|
-
"version": "1.2.
|
3
|
+
"version": "1.2.1",
|
4
4
|
"description": "PingUX themeable React component library",
|
5
|
-
"author": "
|
5
|
+
"author": "ux-development@pingidentity.com",
|
6
6
|
"license": "Apache-2.0",
|
7
7
|
"main": "lib/cjs/index.js",
|
8
8
|
"module": "lib/index.js",
|
@@ -1,17 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
4
|
-
|
5
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
6
|
-
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
8
|
-
value: true
|
9
|
-
});
|
10
|
-
|
11
|
-
exports.AccordionGridContext = void 0;
|
12
|
-
|
13
|
-
var _react = _interopRequireDefault(require("react"));
|
14
|
-
|
15
|
-
var AccordionGridContext = /*#__PURE__*/_react["default"].createContext(null);
|
16
|
-
|
17
|
-
exports.AccordionGridContext = AccordionGridContext;
|