@pingux/astro 1.2.0-alpha.1 → 1.2.0-alpha.13

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 (59) hide show
  1. package/lib/cjs/components/Breadcrumbs/Breadcrumbs.stories.js +3 -3
  2. package/lib/cjs/components/Button/Button.js +14 -2
  3. package/lib/cjs/components/Button/Button.stories.js +69 -28
  4. package/lib/cjs/components/Button/Button.test.js +26 -0
  5. package/lib/cjs/components/CopyText/CopyButton.js +9 -2
  6. package/lib/cjs/components/HelpHint/HelpHint.js +24 -6
  7. package/lib/cjs/components/HelpHint/HelpHint.stories.js +57 -0
  8. package/lib/cjs/components/HelpHint/HelpHint.test.js +80 -0
  9. package/lib/cjs/components/Messages/Messages.reducer.js +2 -1
  10. package/lib/cjs/components/Messages/Messages.stories.js +10 -10
  11. package/lib/cjs/components/Messages/Messages.test.js +15 -1
  12. package/lib/cjs/components/Messages/index.js +21 -2
  13. package/lib/cjs/components/Modal/Modal.stories.js +1 -1
  14. package/lib/cjs/components/MultivaluesField/MultivaluesField.js +3 -1
  15. package/lib/cjs/components/NumberField/NumberField.js +3 -1
  16. package/lib/cjs/components/NumberField/NumberField.test.js +7 -0
  17. package/lib/cjs/components/OverlayPanel/OverlayPanel.js +2 -16
  18. package/lib/cjs/components/OverlayPanel/OverlayPanel.test.js +44 -0
  19. package/lib/cjs/components/SearchField/SearchField.stories.js +1 -15
  20. package/lib/cjs/components/TextAreaField/TextAreaField.js +1 -1
  21. package/lib/cjs/components/TextAreaField/TextAreaField.stories.js +1 -54
  22. package/lib/cjs/components/TextField/TextField.stories.js +79 -2
  23. package/lib/cjs/hooks/useAriaLabelWarning/useAriaLabelWarning.js +2 -1
  24. package/lib/cjs/layouts/ListLayout.stories.js +6 -6
  25. package/lib/cjs/recipes/ArrayField.stories.js +1 -1
  26. package/lib/cjs/recipes/ConditionalFilter.stories.js +7 -3
  27. package/lib/cjs/recipes/RadioButtonsWithLinks.stories.js +1 -1
  28. package/lib/cjs/styles/variants/buttons.js +78 -2
  29. package/lib/cjs/styles/variants/text.js +14 -0
  30. package/lib/components/Breadcrumbs/Breadcrumbs.stories.js +3 -3
  31. package/lib/components/Button/Button.js +15 -3
  32. package/lib/components/Button/Button.stories.js +53 -15
  33. package/lib/components/Button/Button.test.js +20 -0
  34. package/lib/components/CopyText/CopyButton.js +7 -2
  35. package/lib/components/HelpHint/HelpHint.js +25 -5
  36. package/lib/components/HelpHint/HelpHint.stories.js +34 -0
  37. package/lib/components/HelpHint/HelpHint.test.js +58 -0
  38. package/lib/components/Messages/Messages.reducer.js +1 -1
  39. package/lib/components/Messages/Messages.stories.js +1 -1
  40. package/lib/components/Messages/Messages.test.js +11 -1
  41. package/lib/components/Messages/index.js +2 -1
  42. package/lib/components/Modal/Modal.stories.js +1 -1
  43. package/lib/components/MultivaluesField/MultivaluesField.js +3 -1
  44. package/lib/components/NumberField/NumberField.js +2 -1
  45. package/lib/components/NumberField/NumberField.test.js +7 -0
  46. package/lib/components/OverlayPanel/OverlayPanel.js +3 -16
  47. package/lib/components/OverlayPanel/OverlayPanel.test.js +38 -0
  48. package/lib/components/SearchField/SearchField.stories.js +0 -11
  49. package/lib/components/TextAreaField/TextAreaField.js +1 -1
  50. package/lib/components/TextAreaField/TextAreaField.stories.js +0 -43
  51. package/lib/components/TextField/TextField.stories.js +72 -0
  52. package/lib/hooks/useAriaLabelWarning/useAriaLabelWarning.js +2 -1
  53. package/lib/layouts/ListLayout.stories.js +6 -6
  54. package/lib/recipes/ArrayField.stories.js +1 -1
  55. package/lib/recipes/ConditionalFilter.stories.js +7 -3
  56. package/lib/recipes/RadioButtonsWithLinks.stories.js +1 -1
  57. package/lib/styles/variants/buttons.js +78 -2
  58. package/lib/styles/variants/text.js +14 -0
  59. package/package.json +2 -2
@@ -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
  }
@@ -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: "text",
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: "text",
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: "text",
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: "text",
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: "danger",
849
+ variant: "critical",
850
850
  mr: "md",
851
851
  onPress: deleteItem
852
852
  }, "Delete"), ___EmotionJSX(Button, {
853
- variant: "text",
853
+ variant: "link",
854
854
  onPress: function onPress() {
855
855
  return setIsDeleting(false);
856
856
  }
@@ -120,7 +120,7 @@ export var Default = function Default() {
120
120
  title: "Text Field"
121
121
  }, otherFieldProps)));
122
122
  }), ___EmotionJSX(Button, {
123
- variant: "text",
123
+ variant: "link",
124
124
  onPress: onFieldAdd,
125
125
  role: "button",
126
126
  title: "Add Field Button",
@@ -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: setStaticOverviewVisible
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: setEditOverviewVisible
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: "text",
442
+ variant: "link",
439
443
  "aria-label": "cancel"
440
444
  }, "Cancel"))))));
441
445
  };
@@ -48,7 +48,7 @@ export var Default = function Default() {
48
48
  label: fieldName,
49
49
  isDisabled: isDisabled
50
50
  }), ___EmotionJSX(Button, {
51
- variant: "text",
51
+ variant: "link",
52
52
  mb: "xs",
53
53
  ml: "md",
54
54
  onPress: function onPress() {
@@ -295,6 +295,11 @@ var helpHint = _objectSpread(_objectSpread({}, iconButton), {}, {
295
295
  ml: '5px',
296
296
  maxWidth: '13px',
297
297
  maxHeight: '14px',
298
+ borderRadius: '5.5px',
299
+ 'svg': {
300
+ 'height': '100%',
301
+ mb: 0.75
302
+ },
298
303
  'path': {
299
304
  fill: 'neutral.20'
300
305
  },
@@ -354,7 +359,7 @@ var chipDeleteButton = {
354
359
  borderRadius: '50%',
355
360
  cursor: 'pointer',
356
361
  height: 14,
357
- ml: 'xs',
362
+ mx: '3px !important',
358
363
  p: 0,
359
364
  width: 14,
360
365
  '&.is-focused, &.is-hovered': {
@@ -534,6 +539,75 @@ var tooltipInline = _objectSpread(_objectSpread({}, text), {}, {
534
539
  }
535
540
  });
536
541
 
542
+ var defaultVariant = _objectSpread(_objectSpread({}, base), {}, {
543
+ bg: 'white',
544
+ border: '1px solid',
545
+ borderColor: 'active',
546
+ '&.is-hovered': _objectSpread({}, defaultHover),
547
+ '&.is-pressed': _objectSpread({}, defaultActive),
548
+ '&.is-focused': _objectSpread({}, defaultFocus)
549
+ });
550
+
551
+ var filter = _objectSpread(_objectSpread({}, defaultVariant), {}, {
552
+ px: 'sm',
553
+ borderColor: 'neutral.80',
554
+ height: 40,
555
+ color: 'active',
556
+ display: 'flex'
557
+ });
558
+
559
+ var colorBlock = {
560
+ bg: 'neutral.95',
561
+ border: '1px solid',
562
+ borderColor: 'neutral.90',
563
+ borderRadius: 10,
564
+ outline: 'none',
565
+ cursor: 'pointer',
566
+ width: 150,
567
+ minHeight: 40,
568
+ p: '5px 15px',
569
+ display: 'flex',
570
+ justifyContent: 'space-between',
571
+ alignItems: 'center',
572
+ '&.is-hovered': {
573
+ bg: 'neutral.80'
574
+ },
575
+ '&.is-focused': _objectSpread({}, defaultFocus),
576
+ '&.is-pressed': {
577
+ bg: 'neutral.60',
578
+ borderColor: 'neutral.60'
579
+ },
580
+ '& span': {
581
+ color: 'text.primary',
582
+ textAlign: 'left'
583
+ },
584
+ '&>div': {
585
+ alignItems: 'baseline'
586
+ },
587
+ '&>svg': {
588
+ color: 'text.secondary',
589
+ fill: 'text.secondary'
590
+ },
591
+ '&.is-configured': {
592
+ bg: 'active',
593
+ borderColor: 'active',
594
+ '& span': {
595
+ color: 'white'
596
+ },
597
+ '&>svg': {
598
+ color: 'white',
599
+ fill: 'white'
600
+ }
601
+ },
602
+ '&.is-configured.is-hovered': {
603
+ bg: 'accent.40',
604
+ borderColor: 'accent.40'
605
+ },
606
+ '&.is-configured.is-pressed': {
607
+ bg: 'accent.20',
608
+ borderColor: 'accent.20'
609
+ }
610
+ };
537
611
  export default {
538
612
  accordionHeader: accordionHeader,
539
613
  chipDeleteButton: chipDeleteButton,
@@ -554,6 +628,7 @@ export default {
554
628
  environmentBreadcrumb: environmentBreadcrumb,
555
629
  expandableRow: expandableRow,
556
630
  fileInputField: fileInputField,
631
+ filter: filter,
557
632
  iconButton: iconButton,
558
633
  imageUpload: imageUpload,
559
634
  inline: inline,
@@ -573,5 +648,6 @@ export default {
573
648
  invertedSquare: invertedSquare,
574
649
  tooltipChip: tooltipChip,
575
650
  tooltipIconButton: tooltipIconButton,
576
- tooltipInline: tooltipInline
651
+ tooltipInline: tooltipInline,
652
+ colorBlock: colorBlock
577
653
  };
@@ -158,6 +158,20 @@ export var text = {
158
158
  color: 'accent.30',
159
159
  fontFamily: 'standard'
160
160
  }),
161
+ buttonTitle: _objectSpread(_objectSpread({}, wordWrap), {}, {
162
+ fontSize: 'xs',
163
+ fontWeight: 0,
164
+ color: 'text.primary',
165
+ fontFamily: 'standard',
166
+ lineHeight: '13px'
167
+ }),
168
+ buttonSubtitle: _objectSpread(_objectSpread({}, wordWrap), {}, {
169
+ fontSize: 'sm',
170
+ fontWeight: 3,
171
+ color: 'text.primary',
172
+ fontFamily: 'standard',
173
+ lineHeight: '16px'
174
+ }),
161
175
  capsLabel: _objectSpread(_objectSpread({}, wordWrap), {}, {
162
176
  color: 'text.secondary',
163
177
  textTransform: 'uppercase',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.2.0-alpha.1",
3
+ "version": "1.2.0-alpha.13",
4
4
  "description": "PingUX themeable React component library",
5
5
  "author": "uxdev@pingidentity.com",
6
6
  "license": "Apache-2.0",
@@ -132,7 +132,7 @@
132
132
  "lodash": "^4.17.21",
133
133
  "mdi-react": "^7.4.0",
134
134
  "moment": "^2.29.1",
135
- "prism-react-renderer": "^1.2.1",
135
+ "prism-react-renderer": "1.2.1",
136
136
  "prop-types": "^15.7.2",
137
137
  "react-calendar": "^3.4.0",
138
138
  "react-color": "^2.19.3",