@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.
- 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 +69 -28
- package/lib/cjs/components/Button/Button.test.js +26 -0
- package/lib/cjs/components/CopyText/CopyButton.js +9 -2
- package/lib/cjs/components/HelpHint/HelpHint.js +24 -6
- package/lib/cjs/components/HelpHint/HelpHint.stories.js +57 -0
- package/lib/cjs/components/HelpHint/HelpHint.test.js +80 -0
- package/lib/cjs/components/Messages/Messages.reducer.js +2 -1
- package/lib/cjs/components/Messages/Messages.stories.js +10 -10
- package/lib/cjs/components/Messages/Messages.test.js +15 -1
- package/lib/cjs/components/Messages/index.js +21 -2
- package/lib/cjs/components/Modal/Modal.stories.js +1 -1
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +3 -1
- package/lib/cjs/components/NumberField/NumberField.js +3 -1
- package/lib/cjs/components/NumberField/NumberField.test.js +7 -0
- package/lib/cjs/components/OverlayPanel/OverlayPanel.js +2 -16
- package/lib/cjs/components/OverlayPanel/OverlayPanel.test.js +44 -0
- package/lib/cjs/components/SearchField/SearchField.stories.js +1 -15
- package/lib/cjs/components/TextAreaField/TextAreaField.js +1 -1
- package/lib/cjs/components/TextAreaField/TextAreaField.stories.js +1 -54
- package/lib/cjs/components/TextField/TextField.stories.js +79 -2
- package/lib/cjs/hooks/useAriaLabelWarning/useAriaLabelWarning.js +2 -1
- 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/buttons.js +78 -2
- package/lib/cjs/styles/variants/text.js +14 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.stories.js +3 -3
- package/lib/components/Button/Button.js +15 -3
- package/lib/components/Button/Button.stories.js +53 -15
- package/lib/components/Button/Button.test.js +20 -0
- package/lib/components/CopyText/CopyButton.js +7 -2
- package/lib/components/HelpHint/HelpHint.js +25 -5
- package/lib/components/HelpHint/HelpHint.stories.js +34 -0
- package/lib/components/HelpHint/HelpHint.test.js +58 -0
- package/lib/components/Messages/Messages.reducer.js +1 -1
- package/lib/components/Messages/Messages.stories.js +1 -1
- package/lib/components/Messages/Messages.test.js +11 -1
- package/lib/components/Messages/index.js +2 -1
- package/lib/components/Modal/Modal.stories.js +1 -1
- package/lib/components/MultivaluesField/MultivaluesField.js +3 -1
- package/lib/components/NumberField/NumberField.js +2 -1
- package/lib/components/NumberField/NumberField.test.js +7 -0
- package/lib/components/OverlayPanel/OverlayPanel.js +3 -16
- package/lib/components/OverlayPanel/OverlayPanel.test.js +38 -0
- package/lib/components/SearchField/SearchField.stories.js +0 -11
- package/lib/components/TextAreaField/TextAreaField.js +1 -1
- package/lib/components/TextAreaField/TextAreaField.stories.js +0 -43
- package/lib/components/TextField/TextField.stories.js +72 -0
- package/lib/hooks/useAriaLabelWarning/useAriaLabelWarning.js +2 -1
- 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/buttons.js +78 -2
- package/lib/styles/variants/text.js +14 -0
- 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: "
|
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
|
};
|
@@ -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
|
-
|
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.
|
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": "
|
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",
|