@pingux/astro 1.25.1-alpha.0 → 1.25.1-alpha.11

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.
Files changed (26) hide show
  1. package/README.md +4 -9
  2. package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.test.js +19 -0
  3. package/lib/cjs/components/AccordionGridItem/AccordionGridItemBody.js +0 -1
  4. package/lib/cjs/components/MultivaluesField/MultivaluesField.js +28 -6
  5. package/lib/cjs/components/MultivaluesField/MultivaluesField.stories.js +46 -2
  6. package/lib/cjs/components/MultivaluesField/MultivaluesField.test.js +14 -0
  7. package/lib/cjs/components/PasswordField/PasswordField.js +55 -52
  8. package/lib/cjs/components/PopoverContainer/PopoverContainer.js +1 -1
  9. package/lib/cjs/recipes/ListAndPanel.stories.js +36 -13
  10. package/lib/cjs/recipes/OneWayToBidirectionalArrow.stories.js +125 -30
  11. package/lib/cjs/styles/theme.js +3 -1
  12. package/lib/cjs/styles/variants/bidirectionalIconButton.js +54 -0
  13. package/lib/cjs/styles/variants/index.js +10 -0
  14. package/lib/components/AccordionGridGroup/AccordionGridGroup.test.js +11 -0
  15. package/lib/components/AccordionGridItem/AccordionGridItemBody.js +0 -1
  16. package/lib/components/MultivaluesField/MultivaluesField.js +26 -7
  17. package/lib/components/MultivaluesField/MultivaluesField.stories.js +40 -0
  18. package/lib/components/MultivaluesField/MultivaluesField.test.js +11 -0
  19. package/lib/components/PasswordField/PasswordField.js +53 -49
  20. package/lib/components/PopoverContainer/PopoverContainer.js +1 -1
  21. package/lib/recipes/ListAndPanel.stories.js +36 -14
  22. package/lib/recipes/OneWayToBidirectionalArrow.stories.js +124 -30
  23. package/lib/styles/theme.js +4 -2
  24. package/lib/styles/variants/bidirectionalIconButton.js +34 -0
  25. package/lib/styles/variants/index.js +1 -0
  26. package/package.json +1 -1
@@ -13,7 +13,7 @@ import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
13
13
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
14
14
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
15
15
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
16
- var _excluded = ["helperText", "isVisible", "onVisibleChange", "slots", "status", "viewHiddenIconTestId", "viewIconTestId", "requirements"];
16
+ var _excluded = ["helperText", "isVisible", "onVisibleChange", "requirements", "slots", "status", "viewHiddenIconTestId", "viewIconTestId"];
17
17
 
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
 
@@ -25,32 +25,34 @@ import EyeIcon from 'mdi-react/EyeOutlineIcon';
25
25
  import EyeOffIcon from 'mdi-react/EyeOffOutlineIcon';
26
26
  import { useOverlayPosition } from '@react-aria/overlays';
27
27
  import { useLayoutEffect, useResizeObserver } from '@react-aria/utils';
28
- import useField from '../../hooks/useField';
29
- import useProgressiveState from '../../hooks/useProgressiveState';
28
+ import * as hooks from '../../hooks';
30
29
  import statuses from '../../utils/devUtils/constants/statuses';
31
- import { usePropWarning, useStatusClasses } from '../../hooks';
32
30
  import Box from '../Box';
33
31
  import FieldHelperText from '../FieldHelperText';
34
- import Input from '../Input';
35
- import Label from '../Label';
36
32
  import Icon from '../Icon';
37
33
  import IconButton from '../IconButton';
34
+ import Input from '../Input';
35
+ import Label from '../Label';
38
36
  import PopoverContainer from '../PopoverContainer';
39
37
  import RequirementsList from '../RequirementsList';
38
+ import { jsx as ___EmotionJSX } from "@emotion/react";
39
+ var ARIA_LABELS_FOR_SHOW_PASSWORD_TOGGLE = {
40
+ HIDE: 'hide password',
41
+ SHOW: 'show password'
42
+ };
40
43
  /**
41
44
  * Combines a text input, label, IconButton and helper text for a complete, form-ready solution.
42
45
  */
43
46
 
44
- import { jsx as ___EmotionJSX } from "@emotion/react";
45
47
  var PasswordField = /*#__PURE__*/forwardRef(function (props, ref) {
46
48
  var helperText = props.helperText,
47
49
  isVisibleProp = props.isVisible,
48
50
  onVisibleChangeProp = props.onVisibleChange,
51
+ requirements = props.requirements,
49
52
  slots = props.slots,
50
53
  status = props.status,
51
54
  viewHiddenIconTestId = props.viewHiddenIconTestId,
52
55
  viewIconTestId = props.viewIconTestId,
53
- requirements = props.requirements,
54
56
  others = _objectWithoutProperties(props, _excluded);
55
57
 
56
58
  var checkRequirements = function checkRequirements() {
@@ -59,41 +61,27 @@ var PasswordField = /*#__PURE__*/forwardRef(function (props, ref) {
59
61
  }).length > 0;
60
62
  };
61
63
 
62
- var _useField = useField(_objectSpread({
64
+ var _hooks$useField = hooks.useField(_objectSpread({
63
65
  status: status
64
66
  }, others)),
65
- fieldContainerProps = _useField.fieldContainerProps,
66
- fieldControlProps = _useField.fieldControlProps,
67
- fieldLabelProps = _useField.fieldLabelProps;
67
+ fieldContainerProps = _hooks$useField.fieldContainerProps,
68
+ fieldControlProps = _hooks$useField.fieldControlProps,
69
+ fieldLabelProps = _hooks$useField.fieldLabelProps;
68
70
 
69
71
  var isFocused = fieldControlProps.isFocused;
70
72
  var inputRef = useRef();
71
73
  var popoverRef = useRef();
72
- usePropWarning(props, 'disabled', 'isDisabled');
74
+ hooks.usePropWarning(props, 'disabled', 'isDisabled');
73
75
  /* istanbul ignore next */
74
76
 
75
77
  useImperativeHandle(ref, function () {
76
78
  return inputRef.current;
77
79
  });
78
80
 
79
- var _useProgressiveState = useProgressiveState(isVisibleProp, onVisibleChangeProp),
80
- _useProgressiveState2 = _slicedToArray(_useProgressiveState, 2),
81
- isVisible = _useProgressiveState2[0],
82
- setIsShown = _useProgressiveState2[1];
83
-
84
- var onVisibleChange = function onVisibleChange() {
85
- setIsShown(!isVisible);
86
-
87
- if (onVisibleChangeProp) {
88
- var _context;
89
-
90
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
91
- args[_key] = arguments[_key];
92
- }
93
-
94
- onVisibleChangeProp.apply(void 0, _concatInstanceProperty(_context = [!isVisible]).call(_context, args));
95
- }
96
- }; // Measure the width of the input to inform the width of the menu (below).
81
+ var _hooks$useProgressive = hooks.useProgressiveState(isVisibleProp, onVisibleChangeProp),
82
+ _hooks$useProgressive2 = _slicedToArray(_hooks$useProgressive, 2),
83
+ isVisible = _hooks$useProgressive2[0],
84
+ setIsShown = _hooks$useProgressive2[1]; // Measure the width of the input to inform the width of the menu (below).
97
85
 
98
86
 
99
87
  var _useState = useState(null),
@@ -114,10 +102,10 @@ var PasswordField = /*#__PURE__*/forwardRef(function (props, ref) {
114
102
  useLayoutEffect(onResize, [onResize]);
115
103
 
116
104
  var _useOverlayPosition = useOverlayPosition({
117
- targetRef: inputRef,
105
+ isOpen: true,
118
106
  overlayRef: popoverRef,
119
107
  placement: 'bottom end',
120
- isOpen: true
108
+ targetRef: inputRef
121
109
  }),
122
110
  overlayProps = _useOverlayPosition.overlayProps,
123
111
  placement = _useOverlayPosition.placement,
@@ -131,15 +119,31 @@ var PasswordField = /*#__PURE__*/forwardRef(function (props, ref) {
131
119
  }
132
120
  }, [isFocused, updatePosition]);
133
121
 
134
- var style = _objectSpread(_objectSpread({}, overlayProps.style), {}, {
135
- width: menuWidth,
136
- minWidth: menuWidth
137
- });
122
+ var style = _objectSpread({
123
+ minWidth: menuWidth,
124
+ width: menuWidth
125
+ }, overlayProps.style);
138
126
 
139
- var _useStatusClasses = useStatusClasses(fieldControlProps.className, {
127
+ var _hooks$useStatusClass = hooks.useStatusClasses(fieldControlProps.className, {
140
128
  'is-success': status === statuses.SUCCESS || checkRequirements() && requirements.length > 0
141
129
  }),
142
- classNames = _useStatusClasses.classNames;
130
+ classNames = _hooks$useStatusClass.classNames;
131
+
132
+ var toggleShowPasswordAriaLabel = isVisible ? ARIA_LABELS_FOR_SHOW_PASSWORD_TOGGLE.HIDE : ARIA_LABELS_FOR_SHOW_PASSWORD_TOGGLE.SHOW;
133
+
134
+ var handleToggleShowPassword = function handleToggleShowPassword() {
135
+ setIsShown(!isVisible);
136
+
137
+ if (onVisibleChangeProp) {
138
+ var _context;
139
+
140
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
141
+ args[_key] = arguments[_key];
142
+ }
143
+
144
+ onVisibleChangeProp.apply(void 0, _concatInstanceProperty(_context = [!isVisible]).call(_context, args));
145
+ }
146
+ };
143
147
 
144
148
  return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Box, _extends({
145
149
  variant: "forms.input.wrapper"
@@ -158,23 +162,23 @@ var PasswordField = /*#__PURE__*/forwardRef(function (props, ref) {
158
162
  })), ___EmotionJSX(Box, {
159
163
  variant: "forms.input.containedIcon"
160
164
  }, ___EmotionJSX(IconButton, {
161
- "aria-label": "visible-icon",
165
+ "aria-label": toggleShowPasswordAriaLabel,
162
166
  isDisabled: fieldControlProps.disabled,
163
- size: 28,
164
- onPress: onVisibleChange
167
+ onPress: handleToggleShowPassword,
168
+ size: 28
165
169
  }, ___EmotionJSX(Icon, {
166
170
  "data-testid": isVisible ? viewIconTestId : viewHiddenIconTestId,
167
171
  icon: isVisible ? EyeIcon : EyeOffIcon
168
172
  }))), slots === null || slots === void 0 ? void 0 : slots.inContainer), helperText && ___EmotionJSX(FieldHelperText, {
169
173
  status: status
170
174
  }, helperText)), ___EmotionJSX(PopoverContainer, {
171
- isOpen: isFocused && requirements && _Array$isArray(requirements) && !checkRequirements(),
172
- ref: popoverRef,
173
- placement: placement,
174
- style: style,
175
175
  hasNoArrow: true,
176
+ isDismissable: false,
176
177
  isNonModal: true,
177
- isDismissable: false
178
+ isOpen: isFocused && requirements && _Array$isArray(requirements) && !checkRequirements(),
179
+ placement: placement,
180
+ ref: popoverRef,
181
+ style: style
178
182
  }, ___EmotionJSX(RequirementsList, {
179
183
  requirements: requirements
180
184
  })));
@@ -287,9 +291,9 @@ PasswordField.defaultProps = {
287
291
  isDisabled: false,
288
292
  isReadOnly: false,
289
293
  isRequired: false,
290
- type: 'password',
294
+ requirements: [],
291
295
  status: statuses.DEFAULT,
292
- requirements: []
296
+ type: 'password'
293
297
  };
294
298
  PasswordField.displayName = 'PasswordField';
295
299
  export default PasswordField;
@@ -24,7 +24,7 @@ import { mergeProps } from '@react-aria/utils';
24
24
  import { useStatusClasses } from '../../hooks';
25
25
  import Box from '../Box';
26
26
  /**
27
- * PopoverContainer component used for popover on SelectField, ComboBox, and PopoverMenu.
27
+ * PopoverContainer component used for popover on SelectField, ComboBox & PopoverMenu.
28
28
  */
29
29
 
30
30
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -3,10 +3,11 @@ import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
3
3
  import React, { useRef, useState } from 'react';
4
4
  import { FocusScope } from '@react-aria/focus';
5
5
  import { Item } from '@react-stately/collections';
6
+ import AccountIcon from 'mdi-react/AccountIcon';
6
7
  import CloseIcon from 'mdi-react/CloseIcon';
7
8
  import MoreVertIcon from 'mdi-react/MoreVertIcon';
8
9
  import PencilIcon from 'mdi-react/PencilIcon';
9
- import { Avatar, Box, IconButton, ListView, Menu, OverlayPanel, PopoverMenu, SearchField, Separator, SwitchField, Tab, Tabs, Text } from '../index';
10
+ import { Avatar, Box, Icon, IconButton, ListView, Menu, OverlayPanel, PopoverMenu, SearchField, Separator, SwitchField, Tab, Tabs, Text } from '../index';
10
11
  import { useOverlayPanelState } from '../hooks';
11
12
  import { pingImg } from '../utils/devUtils/constants/images';
12
13
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -17,7 +18,8 @@ var items = [{
17
18
  email: 'dburkitt5@columbia.edu',
18
19
  firstName: 'Nicola',
19
20
  lastName: 'Burkitt',
20
- avatar: pingImg
21
+ hasIcon: true,
22
+ avatar: AccountIcon
21
23
  }, {
22
24
  email: 'idixie2@elegantthemes.com',
23
25
  firstName: 'Cacilia',
@@ -32,52 +34,62 @@ var items = [{
32
34
  email: 'jgolde8@jimdo.com',
33
35
  firstName: 'Celisse',
34
36
  lastName: 'Golde',
35
- avatar: pingImg
37
+ hasIcon: true,
38
+ avatar: AccountIcon
36
39
  }, {
37
40
  email: 'shearst9@answers.com',
38
41
  firstName: 'Jeth',
39
42
  lastName: 'Hearst',
40
- avatar: pingImg
43
+ hasIcon: true,
44
+ avatar: AccountIcon
41
45
  }, {
42
46
  email: 'ajinaa@mapquest.com',
43
47
  firstName: 'Kaycee',
44
48
  lastName: 'Jina',
45
- avatar: pingImg
49
+ hasIcon: true,
50
+ avatar: AccountIcon
46
51
  }, {
47
52
  email: 'vmalster4@biblegateway.com',
48
53
  firstName: 'Lorry',
49
54
  lastName: 'Malster',
50
- avatar: pingImg
55
+ hasIcon: true,
56
+ avatar: AccountIcon
51
57
  }, {
52
58
  email: 'yphipp6@yellowpages.com',
53
59
  firstName: 'Stanley',
54
60
  lastName: 'Phipp',
55
- avatar: pingImg
61
+ hasIcon: true,
62
+ avatar: AccountIcon
56
63
  }, {
57
64
  email: 'mskilbeck3@bbc.co.uk',
58
65
  firstName: 'Gradey',
59
66
  lastName: 'Skilbeck',
60
- avatar: pingImg
67
+ hasIcon: true,
68
+ avatar: AccountIcon
61
69
  }, {
62
70
  email: 'dstebbing1@msu.edu',
63
71
  firstName: 'Marnia',
64
72
  lastName: 'Stebbing',
65
- avatar: pingImg
73
+ hasIcon: true,
74
+ avatar: AccountIcon
66
75
  }, {
67
76
  email: 'lsterley7@lulu.com',
68
77
  firstName: 'Joshua',
69
78
  lastName: 'Sterley',
70
- avatar: pingImg
79
+ hasIcon: true,
80
+ avatar: AccountIcon
71
81
  }, {
72
82
  email: 'luttleyb@hugedomains.com',
73
83
  firstName: 'Jarrod',
74
84
  lastName: 'Uttley',
75
- avatar: pingImg
85
+ hasIcon: true,
86
+ avatar: AccountIcon
76
87
  }, {
77
88
  email: 'lidelc@yelp.com',
78
89
  firstName: 'Andromache',
79
90
  lastName: 'Idel',
80
- avatar: pingImg,
91
+ hasIcon: true,
92
+ avatar: AccountIcon,
81
93
  hasSeparator: false
82
94
  }];
83
95
 
@@ -91,7 +103,13 @@ var ListElement = function ListElement(_ref) {
91
103
  isRow: true,
92
104
  mr: "auto",
93
105
  alignItems: "center"
94
- }, ___EmotionJSX(Avatar, {
106
+ }, item.hasIcon ? ___EmotionJSX(Icon, {
107
+ icon: item.avatar,
108
+ alignSelf: "center",
109
+ size: 24,
110
+ mr: "sm",
111
+ color: "accent.40"
112
+ }) : ___EmotionJSX(Avatar, {
95
113
  mr: "md",
96
114
  sx: {
97
115
  width: '25px',
@@ -170,8 +188,11 @@ export var Default = function Default() {
170
188
  return ___EmotionJSX(Box, {
171
189
  px: "lg",
172
190
  py: "lg",
173
- bg: "accent.99"
191
+ bg: "accent.99",
192
+ height: "900px",
193
+ overflowY: "scroll"
174
194
  }, ___EmotionJSX(SearchField, {
195
+ position: "fixed",
175
196
  mb: "sm",
176
197
  width: "400px",
177
198
  placeholder: "Search",
@@ -227,6 +248,7 @@ export var Default = function Default() {
227
248
  }, ___EmotionJSX(Tab, {
228
249
  title: "Profile"
229
250
  }, selectedItemId >= 0 && ___EmotionJSX(React.Fragment, null, ___EmotionJSX(IconButton, {
251
+ variant: "inverted",
230
252
  sx: {
231
253
  position: 'absolute',
232
254
  top: 0,
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
1
2
  import React from 'react';
2
3
  import DragVerticalIcon from 'mdi-react/DragVerticalIcon';
3
4
  import DeleteIcon from 'mdi-react/DeleteIcon';
@@ -19,42 +20,52 @@ var items = [{
19
20
  id: '3'
20
21
  }];
21
22
  export var Default = function Default() {
22
- var CustomOnSvg = function CustomOnSvg() {
23
- return ___EmotionJSX("svg", {
24
- width: "24",
25
- height: "24",
26
- viewBox: "0 0 24 24",
23
+ var CustomOnSvg = function CustomOnSvg(props) {
24
+ return ___EmotionJSX("svg", _extends({
25
+ width: "16",
26
+ height: "16",
27
+ viewBox: "0 0 16 16",
27
28
  fill: "none",
28
29
  xmlns: "http://www.w3.org/2000/svg"
29
- }, ___EmotionJSX("path", {
30
- d: "M8 10V13H14V18H8V21L2 15.5L8 10Z",
31
- fill: "#CACED3"
32
- }), ___EmotionJSX("path", {
33
- d: "M9.83325 10.6251V6.37511H15.4999V2.94678L21.0533 8.50011L15.4999 14.0534V10.6251H9.83325Z",
34
- fill: "#4462ED"
30
+ }, props), ___EmotionJSX("path", {
31
+ d: "M5.33325 6.66666V8.66666H9.33325V12H5.33325V14L1.33325 10.3333L5.33325 6.66666Z",
32
+ fill: "currentColor"
35
33
  }), ___EmotionJSX("path", {
36
- d: "M8 10V13H14V18H8V21L2 15.5L8 10ZM22 8.5L16 3V6H10V11H16V14L22 8.5Z",
37
- fill: "#515F6B"
34
+ d: "M14.6666 5.66667L10.6666 2V4H6.66658V7.33333H10.6666V9.33333L14.6666 5.66667Z",
35
+ fill: "currentColor"
38
36
  }));
39
37
  };
40
38
 
41
- var CustomOffSvg = function CustomOffSvg() {
42
- return ___EmotionJSX("svg", {
43
- width: "24",
44
- height: "24",
45
- viewBox: "0 0 24 24",
39
+ var CustomOffSvg = function CustomOffSvg(props) {
40
+ return ___EmotionJSX("svg", _extends({
41
+ width: "16",
42
+ height: "16",
43
+ viewBox: "0 0 16 16",
46
44
  fill: "none",
47
45
  xmlns: "http://www.w3.org/2000/svg"
48
- }, ___EmotionJSX("path", {
49
- d: "M8 10V13H14V18H8V21L2 15.5L8 10Z",
46
+ }, props), ___EmotionJSX("path", {
47
+ d: "M5.33325 6.66667V8.66667H9.33325V12H5.33325V14L1.33325 10.3333L5.33325 6.66667Z",
50
48
  fill: "#CACED3"
51
49
  }), ___EmotionJSX("path", {
52
- d: "M9.83331 10.6251V6.37511H15.5V2.94678L21.0533 8.50011L15.5 14.0534V10.6251H9.83331Z",
53
- fill: "#4462ED"
50
+ d: "M14.6666 5.66667L10.6666 2V4H6.66658V7.33333H10.6666V9.33333L14.6666 5.66667Z",
51
+ fill: "currentColor"
52
+ }));
53
+ };
54
+
55
+ var CustomRightSvg = function CustomRightSvg(props) {
56
+ return ___EmotionJSX("svg", _extends({
57
+ width: "8",
58
+ height: "8",
59
+ viewBox: "0 0 8 8",
60
+ fill: "none",
61
+ xmlns: "http://www.w3.org/2000/svg"
62
+ }, props), ___EmotionJSX("path", {
63
+ d: "M8 4L4 0V2.18182H0V5.81818H4V8L8 4Z",
64
+ fill: "currentColor"
54
65
  }));
55
66
  };
56
67
 
57
- return ___EmotionJSX(Box, {
68
+ return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Box, {
58
69
  sx: {
59
70
  alignItems: 'center'
60
71
  },
@@ -83,8 +94,7 @@ export var Default = function Default() {
83
94
  }, item.name);
84
95
  }), ___EmotionJSX(Box, {
85
96
  sx: {
86
- ml: '5px',
87
- mr: '5px',
97
+ mx: 'sm',
88
98
  flexShrink: 0
89
99
  }
90
100
  }, ___EmotionJSX(IconButtonToggle, {
@@ -92,10 +102,91 @@ export var Default = function Default() {
92
102
  defaultIcon: CustomOffSvg,
93
103
  title: "Bidirectional/ Outbound toggle",
94
104
  iconProps: {
95
- size: 20
105
+ size: 16
106
+ },
107
+ buttonProps: {
108
+ variant: 'bidirectionalIconButton'
109
+ }
110
+ })), ___EmotionJSX(ComboBoxField, {
111
+ items: items,
112
+ defaultSelectedKey: "First Name",
113
+ containerProps: {
114
+ width: '275px'
115
+ },
116
+ labelProps: {
117
+ mb: 0
118
+ },
119
+ controlProps: {
120
+ 'aria-label': 'Row one Pingone value'
121
+ }
122
+ }, function (item) {
123
+ return ___EmotionJSX(Item, {
124
+ key: item.name,
125
+ "data-id": item.name
126
+ }, item.name);
127
+ }), ___EmotionJSX(Box, {
128
+ isRow: true,
129
+ alignItems: "center",
130
+ sx: {
131
+ marginLeft: '12px',
132
+ marginRight: '12px'
133
+ }
134
+ }, ___EmotionJSX(IconButton, {
135
+ "aria-label": "Edit"
136
+ }, ___EmotionJSX(Icon, {
137
+ icon: CogsIcon,
138
+ color: "neutral.30",
139
+ size: 20,
140
+ title: "edit icon"
141
+ })), ___EmotionJSX(IconButton, {
142
+ ml: "5px",
143
+ "aria-label": "Delete"
144
+ }, ___EmotionJSX(Icon, {
145
+ icon: DeleteIcon,
146
+ color: "neutral.30",
147
+ size: 20,
148
+ title: "delete icon"
149
+ })))), ___EmotionJSX(Box, {
150
+ sx: {
151
+ alignItems: 'center'
152
+ },
153
+ isRow: true
154
+ }, ___EmotionJSX(Icon, {
155
+ icon: DragVerticalIcon,
156
+ size: 25,
157
+ color: "neutral.50"
158
+ }), ___EmotionJSX(ComboBoxField, {
159
+ items: items,
160
+ defaultSelectedKey: "Last Name",
161
+ containerProps: {
162
+ width: '275px'
163
+ },
164
+ labelProps: {
165
+ mb: 0
166
+ },
167
+ "aria-label": "Row one value",
168
+ controlProps: {
169
+ 'aria-label': 'test'
170
+ }
171
+ }, function (item) {
172
+ return ___EmotionJSX(Item, {
173
+ key: item.name,
174
+ "data-id": item.name
175
+ }, item.name);
176
+ }), ___EmotionJSX(Box, {
177
+ sx: {
178
+ mx: 'sm',
179
+ flexShrink: 0
180
+ }
181
+ }, ___EmotionJSX(IconButtonToggle, {
182
+ toggledIcon: CustomRightSvg,
183
+ defaultIcon: CustomRightSvg,
184
+ title: "This attribute does not support write-back.",
185
+ iconProps: {
186
+ size: 8
96
187
  },
97
188
  buttonProps: {
98
- variant: 'svgIconButton'
189
+ variant: 'bidirectionalIconButton'
99
190
  }
100
191
  })), ___EmotionJSX(ComboBoxField, {
101
192
  items: items,
@@ -121,17 +212,20 @@ export var Default = function Default() {
121
212
  marginLeft: '12px',
122
213
  marginRight: '12px'
123
214
  }
124
- }, ___EmotionJSX(IconButton, null, ___EmotionJSX(Icon, {
215
+ }, ___EmotionJSX(IconButton, {
216
+ "aria-label": "Edit"
217
+ }, ___EmotionJSX(Icon, {
125
218
  icon: CogsIcon,
126
219
  color: "neutral.30",
127
220
  size: 20,
128
221
  title: "edit icon"
129
222
  })), ___EmotionJSX(IconButton, {
130
- ml: "5px"
223
+ ml: "5px",
224
+ "aria-label": "Delete"
131
225
  }, ___EmotionJSX(Icon, {
132
226
  icon: DeleteIcon,
133
227
  color: "neutral.30",
134
228
  size: 20,
135
229
  title: "delete icon"
136
- }))));
230
+ })))));
137
231
  };
@@ -17,7 +17,7 @@ import colors, { accent, line, shadow, focus } from './colors';
17
17
  import { fontSizes, fontWeights, textColors } from './text';
18
18
  import breakpoints from './breakpoints';
19
19
  import forms from './forms';
20
- import { variants, buttons, text, images, links } from './variants';
20
+ import { variants, buttons, text, images, links, bidirectionalIconButton } from './variants';
21
21
  export default {
22
22
  name: 'Astro',
23
23
  space: spacing,
@@ -52,7 +52,9 @@ export default {
52
52
  forms: forms,
53
53
  text: text,
54
54
  images: images,
55
- buttons: buttons,
55
+ buttons: _objectSpread(_objectSpread({}, buttons), {}, {
56
+ bidirectionalIconButton: bidirectionalIconButton
57
+ }),
56
58
  textColors: textColors,
57
59
  links: links,
58
60
  variants: variants
@@ -0,0 +1,34 @@
1
+ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
2
+ import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
3
+ import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
4
+ import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
5
+ import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
6
+ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
7
+ import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
8
+ import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
9
+ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
10
+
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
+
13
+ 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; }
14
+
15
+ import { defaultFocus } from './buttons';
16
+ var bidirectionalIconButton = {
17
+ border: '1px solid',
18
+ outline: 'none',
19
+ height: '24px',
20
+ width: '24px',
21
+ color: 'active',
22
+ borderRadius: '12px',
23
+ borderColor: 'active',
24
+ '&.is-hovered': {
25
+ color: 'accent.40',
26
+ borderColor: 'accent.40'
27
+ },
28
+ '&.is-pressed': {
29
+ color: 'accent.20',
30
+ borderColor: 'accent.20'
31
+ },
32
+ '&.is-focused': _objectSpread({}, defaultFocus)
33
+ };
34
+ export default bidirectionalIconButton;
@@ -1,5 +1,6 @@
1
1
  export { default as variants } from './variants';
2
2
  export { default as buttons } from './buttons';
3
+ export { default as bidirectionalIconButton } from './bidirectionalIconButton';
3
4
  export { default as images } from './images';
4
5
  export { default as links } from './links';
5
6
  export * from './text';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.25.1-alpha.0",
3
+ "version": "1.25.1-alpha.11",
4
4
  "description": "PingUX themeable React component library",
5
5
  "author": "ux-development@pingidentity.com",
6
6
  "license": "Apache-2.0",