@pingux/astro 1.16.1-alpha.0 → 1.17.0-alpha.10

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 (47) hide show
  1. package/lib/cjs/components/Button/Button.stories.js +8 -3
  2. package/lib/cjs/components/Button/Button.test.js +5 -0
  3. package/lib/cjs/components/Chip/Chip.stories.js +18 -1
  4. package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.js +2 -0
  5. package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.stories.js +125 -32
  6. package/lib/cjs/components/CollapsiblePanelContainer/CollapsiblePanelContainer.js +4 -22
  7. package/lib/cjs/components/CollapsiblePanelContainer/CollapsiblePanelContainer.test.js +8 -8
  8. package/lib/cjs/components/CollapsiblePanelItem/CollapsiblePanelItem.js +2 -2
  9. package/lib/cjs/components/ComboBoxField/ComboBoxField.js +40 -7
  10. package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +58 -2
  11. package/lib/cjs/components/ComboBoxField/ComboBoxField.test.js +123 -25
  12. package/lib/cjs/components/Image/Image.js +14 -3
  13. package/lib/cjs/components/Image/Image.stories.js +17 -8
  14. package/lib/cjs/components/Image/Image.test.js +9 -0
  15. package/lib/cjs/components/Link/Link.test.js +5 -0
  16. package/lib/cjs/components/ListView/ListView.js +1 -0
  17. package/lib/cjs/components/MultivaluesField/MultivaluesField.stories.js +142 -21
  18. package/lib/cjs/components/OverlayPanel/OverlayPanel.stories.js +1 -1
  19. package/lib/cjs/components/RockerButton/RockerButton.js +5 -9
  20. package/lib/cjs/styles/variants/boxes.js +19 -0
  21. package/lib/cjs/styles/variants/buttons.js +20 -3
  22. package/lib/cjs/styles/variants/collapsiblePanel.js +26 -7
  23. package/lib/cjs/styles/variants/overlayPanel.js +2 -2
  24. package/lib/components/Button/Button.stories.js +8 -3
  25. package/lib/components/Button/Button.test.js +3 -0
  26. package/lib/components/Chip/Chip.stories.js +14 -0
  27. package/lib/components/CollapsiblePanel/CollapsiblePanel.js +2 -0
  28. package/lib/components/CollapsiblePanel/CollapsiblePanel.stories.js +113 -31
  29. package/lib/components/CollapsiblePanelContainer/CollapsiblePanelContainer.js +1 -15
  30. package/lib/components/CollapsiblePanelContainer/CollapsiblePanelContainer.test.js +6 -6
  31. package/lib/components/CollapsiblePanelItem/CollapsiblePanelItem.js +2 -2
  32. package/lib/components/ComboBoxField/ComboBoxField.js +40 -8
  33. package/lib/components/ComboBoxField/ComboBoxField.stories.js +51 -0
  34. package/lib/components/ComboBoxField/ComboBoxField.test.js +106 -25
  35. package/lib/components/Image/Image.js +15 -4
  36. package/lib/components/Image/Image.stories.js +17 -8
  37. package/lib/components/Image/Image.test.js +9 -0
  38. package/lib/components/Link/Link.test.js +3 -0
  39. package/lib/components/ListView/ListView.js +1 -0
  40. package/lib/components/MultivaluesField/MultivaluesField.stories.js +142 -20
  41. package/lib/components/OverlayPanel/OverlayPanel.stories.js +1 -1
  42. package/lib/components/RockerButton/RockerButton.js +6 -10
  43. package/lib/styles/variants/boxes.js +19 -0
  44. package/lib/styles/variants/buttons.js +20 -3
  45. package/lib/styles/variants/collapsiblePanel.js +26 -7
  46. package/lib/styles/variants/overlayPanel.js +2 -2
  47. package/package.json +1 -1
@@ -16,7 +16,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
16
16
  import React, { forwardRef, useContext, useImperativeHandle, useRef } from 'react';
17
17
  import PropTypes from 'prop-types';
18
18
  import { Item } from '@react-stately/collections';
19
- import { useFocusRing } from '@react-aria/focus';
19
+ import { FocusRing } from '@react-aria/focus';
20
20
  import { useRockerButton, useStatusClasses, usePropWarning } from '../../hooks';
21
21
  import { Box } from '../../index';
22
22
  import { RockerContext } from '../RockerButtonGroup';
@@ -29,15 +29,9 @@ export var CollectionRockerButton = /*#__PURE__*/forwardRef(function (props, ref
29
29
  itemProps = item.props;
30
30
  var state = useContext(RockerContext);
31
31
  var isDisabled = state.disabledKeys.has(key);
32
-
33
- var _useFocusRing = useFocusRing(),
34
- isFocusVisible = _useFocusRing.isFocusVisible,
35
- focusProps = _useFocusRing.focusProps;
36
-
37
32
  var isSelected = state.selectedKey === key;
38
33
 
39
34
  var _useStatusClasses = useStatusClasses(className, {
40
- isFocused: isFocusVisible,
41
35
  isSelected: isSelected,
42
36
  isDisabled: isDisabled
43
37
  }),
@@ -58,17 +52,19 @@ export var CollectionRockerButton = /*#__PURE__*/forwardRef(function (props, ref
58
52
  }, state, rockerButtonRef),
59
53
  rockerButtonProps = _useRockerButton.rockerButtonProps;
60
54
 
61
- return ___EmotionJSX(Box, _extends({
55
+ return ___EmotionJSX(FocusRing, {
56
+ focusRingClass: "is-focused"
57
+ }, ___EmotionJSX(Box, _extends({
62
58
  as: "button",
63
59
  className: classNames,
64
60
  variant: "buttons.rocker"
65
61
  }, rockerButtonProps, {
66
62
  ref: rockerButtonRef
67
- }, focusProps, itemProps, {
63
+ }, itemProps, {
68
64
  sx: {
69
65
  '&.is-selected': _objectSpread({}, itemProps.selectedStyles)
70
66
  }
71
- }), rendered);
67
+ }), rendered));
72
68
  });
73
69
  CollectionRockerButton.displayName = 'CollectionRockerButton';
74
70
  CollectionRockerButton.propTypes = {
@@ -114,6 +114,23 @@ export var chip = {
114
114
  }
115
115
  };
116
116
 
117
+ var countDefault = _objectSpread(_objectSpread({}, chip), {}, {
118
+ width: 'fit-content',
119
+ minWidth: '17px',
120
+ height: '17px'
121
+ });
122
+
123
+ var chipCount = _objectSpread(_objectSpread({}, countDefault), {}, {
124
+ backgroundColor: '#640099 !important'
125
+ });
126
+
127
+ var countNeutral = _objectSpread(_objectSpread({}, chipCount), {}, {
128
+ backgroundColor: '#E4E6E9 !important',
129
+ '& span': {
130
+ color: 'neutral.20'
131
+ }
132
+ });
133
+
117
134
  var multivaluesChip = _objectSpread(_objectSpread({}, chip), {}, {
118
135
  alignSelf: 'center',
119
136
  cursor: 'default',
@@ -316,6 +333,8 @@ export default {
316
333
  base: base,
317
334
  card: card,
318
335
  chip: chip,
336
+ chipCount: chipCount,
337
+ countNeutral: countNeutral,
319
338
  selectedItemChip: selectedItemChip,
320
339
  readOnlyChip: readOnlyChip,
321
340
  copy: copy,
@@ -136,7 +136,7 @@ var collapsiblePanelToggle = _objectSpread(_objectSpread({}, square), {}, {
136
136
  bg: 'accent.99',
137
137
  height: '40px',
138
138
  minWidth: 'max-content',
139
- pl: '0px',
139
+ pl: 'xs',
140
140
  ml: '10px',
141
141
  path: {
142
142
  fill: 'active'
@@ -144,7 +144,10 @@ var collapsiblePanelToggle = _objectSpread(_objectSpread({}, square), {}, {
144
144
  '&.is-hovered': {
145
145
  backgroundColor: 'accent.99'
146
146
  },
147
- '&.is-focused': _objectSpread({}, defaultFocus),
147
+ '&.is-focused': _objectSpread(_objectSpread({}, defaultFocus), {}, {
148
+ outlineOffset: '0',
149
+ zIndex: 1
150
+ }),
148
151
  '&.is-pressed': {
149
152
  backgroundColor: 'accent.99'
150
153
  }
@@ -368,6 +371,18 @@ var inline = _objectSpread(_objectSpread({}, base), {}, {
368
371
  '&.is-focused': _objectSpread({}, defaultFocus)
369
372
  });
370
373
 
374
+ var inlinePrimary = _objectSpread(_objectSpread(_objectSpread({}, inline), defaultActive), {}, {
375
+ '&.is-hovered': _objectSpread(_objectSpread({}, defaultHover), {}, {
376
+ backgroundColor: 'accent.40',
377
+ color: 'white'
378
+ }),
379
+ '&.is-pressed': _objectSpread(_objectSpread({}, defaultActive), {}, {
380
+ backgroundColor: 'accent.20',
381
+ border: '1px solid',
382
+ borderColor: 'accent.20'
383
+ })
384
+ });
385
+
371
386
  var text = _objectSpread(_objectSpread({}, base), {}, {
372
387
  display: 'inline-flex',
373
388
  bg: 'transparent',
@@ -420,7 +435,8 @@ var rocker = _objectSpread(_objectSpread({}, base), {}, {
420
435
  bg: 'accent.95',
421
436
  '&.is-selected': {
422
437
  bg: 'active',
423
- color: 'white'
438
+ color: 'white',
439
+ zIndex: '1'
424
440
  },
425
441
  '&.is-focused': _objectSpread({}, defaultFocus)
426
442
  });
@@ -693,6 +709,7 @@ export default {
693
709
  iconButton: iconButton,
694
710
  imageUpload: imageUpload,
695
711
  inline: inline,
712
+ inlinePrimary: inlinePrimary,
696
713
  inverted: inverted,
697
714
  link: link,
698
715
  primary: primary,
@@ -1,8 +1,15 @@
1
1
  var collapsiblePanelContainer = {
2
- overflowX: 'hidden',
3
2
  pr: 'sm',
4
- transition: 'right 500ms',
5
- minHeight: '80vh'
3
+ minHeight: '80vh',
4
+ '>div': {
5
+ visibility: 'hidden',
6
+ width: 0,
7
+ transition: 'width .3s ease'
8
+ },
9
+ '&.is-open>div': {
10
+ visibility: 'visible',
11
+ width: '300px'
12
+ }
6
13
  };
7
14
  var collapsiblePanelContent = {
8
15
  bg: 'accent.99',
@@ -25,15 +32,17 @@ var collapsiblePanelContent = {
25
32
  };
26
33
  var collapsiblePanelContainerTitle = {
27
34
  alignContent: 'center',
28
- bg: 'accent.99',
29
- display: 'flex',
30
35
  fontWeight: '500',
31
36
  minHeight: '40px',
32
37
  alignItems: 'center',
33
38
  padding: '0 10px !important',
34
39
  flexWrap: 'wrap',
35
40
  maxWidth: 'max-content !important',
36
- margin: '0'
41
+ margin: '0',
42
+ width: '0',
43
+ '.is-open &': {
44
+ width: '300px'
45
+ }
37
46
  };
38
47
  var collapsiblePanelBadge = {
39
48
  borderRadius: '5px',
@@ -46,7 +55,17 @@ var collapsiblePanelBadge = {
46
55
  pr: '3px !important',
47
56
  pl: '3px !important',
48
57
  alignItems: 'center',
49
- fontWeight: 500
58
+ fontWeight: 500,
59
+ '.is-open &.title-badge': {
60
+ minWidth: '0',
61
+ display: 'flex',
62
+ transition: 'min-width .3s ease',
63
+ width: 'max-content'
64
+ },
65
+ '&.title-badge': {
66
+ display: 'none',
67
+ width: '0'
68
+ }
50
69
  };
51
70
  var collapsiblePanellItem = {
52
71
  minHeight: '45px',
@@ -1,7 +1,7 @@
1
1
  var overlayPanel = {
2
2
  position: 'fixed',
3
3
  overflowY: 'scroll',
4
- zIndex: 1,
4
+ zIndex: 10,
5
5
  top: 0,
6
6
  bottom: 0,
7
7
  right: '-100%',
@@ -33,7 +33,7 @@ var overlayPanel = {
33
33
  };
34
34
  var overlayPanelInner = {
35
35
  position: 'absolute',
36
- zIndex: 2,
36
+ zIndex: 9,
37
37
  bottom: 0,
38
38
  right: 0,
39
39
  background: 'white',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.16.1-alpha.0",
3
+ "version": "1.17.0-alpha.10",
4
4
  "description": "PingUX themeable React component library",
5
5
  "author": "ux-development@pingidentity.com",
6
6
  "license": "Apache-2.0",