@pingux/astro 1.1.0-alpha.10 → 1.1.0-alpha.14
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 +22 -0
- package/lib/cjs/components/CodeView/CodeView.js +165 -0
- package/lib/cjs/components/CodeView/CodeView.stories.js +93 -0
- package/lib/cjs/components/CodeView/CodeView.test.js +211 -0
- package/lib/cjs/components/CodeView/index.js +18 -0
- package/lib/cjs/components/CopyText/CopyText.js +34 -11
- package/lib/cjs/components/NavBar/NavBar.js +38 -0
- package/lib/cjs/components/NavBar/NavBar.stories.js +679 -0
- package/lib/cjs/components/NavBar/NavBar.test.js +116 -0
- package/lib/cjs/components/NavBar/index.js +18 -0
- package/lib/cjs/components/NavBarSection/NavBarItemBody.js +56 -0
- package/lib/cjs/components/NavBarSection/NavBarItemHeader.js +47 -0
- package/lib/cjs/components/NavBarSection/NavBarSection.js +82 -0
- package/lib/cjs/components/NavBarSection/index.js +18 -0
- package/lib/cjs/components/Separator/Separator.js +1 -1
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.js +10 -5
- package/lib/cjs/index.js +84 -30
- package/lib/cjs/styles/variants/accordion.js +32 -1
- package/lib/cjs/styles/variants/boxes.js +24 -1
- package/lib/cjs/styles/variants/buttons.js +29 -1
- package/lib/cjs/styles/variants/codeView.js +80 -0
- package/lib/cjs/styles/variants/link.js +1 -1
- package/lib/cjs/styles/variants/separator.js +46 -3
- package/lib/cjs/styles/variants/text.js +15 -0
- package/lib/cjs/styles/variants/variants.js +3 -0
- package/lib/components/CodeView/CodeView.js +130 -0
- package/lib/components/CodeView/CodeView.stories.js +67 -0
- package/lib/components/CodeView/CodeView.test.js +171 -0
- package/lib/components/CodeView/index.js +1 -0
- package/lib/components/CopyText/CopyText.js +35 -11
- package/lib/components/NavBar/NavBar.js +24 -0
- package/lib/components/NavBar/NavBar.stories.js +650 -0
- package/lib/components/NavBar/NavBar.test.js +92 -0
- package/lib/components/NavBar/index.js +1 -0
- package/lib/components/NavBarSection/NavBarItemBody.js +37 -0
- package/lib/components/NavBarSection/NavBarItemHeader.js +31 -0
- package/lib/components/NavBarSection/NavBarSection.js +65 -0
- package/lib/components/NavBarSection/index.js +1 -0
- package/lib/components/Separator/Separator.js +1 -1
- package/lib/components/TooltipTrigger/TooltipTrigger.js +10 -5
- package/lib/index.js +5 -0
- package/lib/styles/variants/accordion.js +32 -1
- package/lib/styles/variants/boxes.js +24 -1
- package/lib/styles/variants/buttons.js +29 -1
- package/lib/styles/variants/codeView.js +68 -0
- package/lib/styles/variants/link.js +1 -1
- package/lib/styles/variants/separator.js +33 -1
- package/lib/styles/variants/text.js +15 -0
- package/lib/styles/variants/variants.js +2 -0
- package/package.json +3 -1
@@ -0,0 +1,92 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import GlobeIcon from 'mdi-react/GlobeIcon';
|
3
|
+
import ViewDashboard from 'mdi-react/ViewDashboardIcon';
|
4
|
+
import AccountMultiple from 'mdi-react/AccountMultipleIcon';
|
5
|
+
import TransitConnection from 'mdi-react/TransitConnectionVariantIcon';
|
6
|
+
import EmoticonHappy from 'mdi-react/EmoticonHappyOutlineIcon';
|
7
|
+
import Fingerprint from 'mdi-react/FingerprintIcon';
|
8
|
+
import ScaleBalance from 'mdi-react/ScaleBalanceIcon';
|
9
|
+
import Verify from 'mdi-react/VerifiedIcon';
|
10
|
+
import NavBar from './NavBar';
|
11
|
+
import axeTest from '../../utils/testUtils/testAxe';
|
12
|
+
import { render, screen } from '../../utils/testUtils/testWrapper';
|
13
|
+
import { Box, NavBarSection } from '../../index';
|
14
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
15
|
+
var data = [{
|
16
|
+
icon: GlobeIcon,
|
17
|
+
key: 'Overview',
|
18
|
+
heading: 'Overview',
|
19
|
+
children: ['Users', 'Group', 'Populations', 'Attributes', 'A roles title that is really really really really long']
|
20
|
+
}, {
|
21
|
+
icon: ViewDashboard,
|
22
|
+
key: 'Dashboard',
|
23
|
+
heading: 'Dashboard',
|
24
|
+
children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
|
25
|
+
}, {
|
26
|
+
icon: AccountMultiple,
|
27
|
+
key: 'Identities',
|
28
|
+
heading: 'Identities',
|
29
|
+
children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
|
30
|
+
}, {
|
31
|
+
icon: TransitConnection,
|
32
|
+
key: 'Connections',
|
33
|
+
heading: 'Connections',
|
34
|
+
children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
|
35
|
+
}, {
|
36
|
+
icon: EmoticonHappy,
|
37
|
+
key: 'Experiences',
|
38
|
+
heading: 'Experiences',
|
39
|
+
children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
|
40
|
+
}];
|
41
|
+
var secondData = [{
|
42
|
+
icon: Fingerprint,
|
43
|
+
key: 'MFA',
|
44
|
+
heading: 'MFA',
|
45
|
+
children: ['Users', {
|
46
|
+
subTitle: 'PingOne Services'
|
47
|
+
}, 'Group', 'Populations', 'Attributes', 'Roles']
|
48
|
+
}, {
|
49
|
+
icon: ScaleBalance,
|
50
|
+
key: 'Risk',
|
51
|
+
heading: 'Risk',
|
52
|
+
children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
|
53
|
+
}, {
|
54
|
+
icon: Verify,
|
55
|
+
key: 'Verify',
|
56
|
+
heading: 'Verify',
|
57
|
+
children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
|
58
|
+
}];
|
59
|
+
|
60
|
+
var getComponent = function getComponent() {
|
61
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
62
|
+
return render(___EmotionJSX(NavBar, props, ___EmotionJSX(Box, {
|
63
|
+
sx: {
|
64
|
+
height: '100%',
|
65
|
+
maxHeight: '100%',
|
66
|
+
overflowY: 'overlay !important'
|
67
|
+
}
|
68
|
+
}, ___EmotionJSX(NavBarSection, {
|
69
|
+
items: data,
|
70
|
+
hasSeparator: true
|
71
|
+
}), ___EmotionJSX(NavBarSection, {
|
72
|
+
items: secondData,
|
73
|
+
title: "test_title"
|
74
|
+
}))));
|
75
|
+
};
|
76
|
+
|
77
|
+
axeTest(getComponent);
|
78
|
+
test('should render basic nav with children', function () {
|
79
|
+
getComponent();
|
80
|
+
var nav = screen.queryByRole('navigation');
|
81
|
+
expect(nav).toBeInTheDocument();
|
82
|
+
});
|
83
|
+
test('should render title for sections that have titles', function () {
|
84
|
+
getComponent();
|
85
|
+
var title = screen.getByText('test_title');
|
86
|
+
expect(title).toBeInTheDocument();
|
87
|
+
});
|
88
|
+
test('should render title for itemBodies that have subTitles', function () {
|
89
|
+
getComponent();
|
90
|
+
var subTitle = screen.getByText('PingOne Services');
|
91
|
+
expect(subTitle).toBeInTheDocument();
|
92
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './NavBar';
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
2
|
+
import React, { Fragment } from 'react';
|
3
|
+
import PropTypes from 'prop-types';
|
4
|
+
import { Separator, Box, Text } from '../../index';
|
5
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
6
|
+
|
7
|
+
var NavBarItemBody = function NavBarItemBody(props) {
|
8
|
+
var _context;
|
9
|
+
|
10
|
+
return ___EmotionJSX(Box, {
|
11
|
+
sx: {
|
12
|
+
alignItems: 'flex-start',
|
13
|
+
mb: '15px'
|
14
|
+
}
|
15
|
+
}, _mapInstanceProperty(_context = props.item.children).call(_context, function (child) {
|
16
|
+
return child.subTitle ? ___EmotionJSX(Fragment, {
|
17
|
+
key: "fragment".concat(child.subTitle)
|
18
|
+
}, ___EmotionJSX(Separator, {
|
19
|
+
variant: "separator.navBarSubtitleSeparator",
|
20
|
+
key: "separator".concat(child.subTitle)
|
21
|
+
}), ___EmotionJSX(Text, {
|
22
|
+
key: "text".concat(child.subTitle),
|
23
|
+
variant: "text.navBarSubtitle",
|
24
|
+
sx: {
|
25
|
+
mb: '10px',
|
26
|
+
ml: '45px'
|
27
|
+
}
|
28
|
+
}, child.subTitle)) : child;
|
29
|
+
}));
|
30
|
+
};
|
31
|
+
|
32
|
+
NavBarItemBody.propTypes = {
|
33
|
+
item: PropTypes.shape({
|
34
|
+
children: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object]))
|
35
|
+
})
|
36
|
+
};
|
37
|
+
export default NavBarItemBody;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
import { Box, Icon, Text } from '../../index';
|
4
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
5
|
+
|
6
|
+
var NavBarItemHeader = function NavBarItemHeader(props) {
|
7
|
+
var item = props.item;
|
8
|
+
var icon = item.icon;
|
9
|
+
return ___EmotionJSX(Box, {
|
10
|
+
variant: "boxes.navBarItemHeaderContainer",
|
11
|
+
isRow: true
|
12
|
+
}, icon && ___EmotionJSX(Icon, {
|
13
|
+
icon: icon,
|
14
|
+
size: 20,
|
15
|
+
sx: {
|
16
|
+
mr: '10px',
|
17
|
+
color: 'white',
|
18
|
+
fill: 'white'
|
19
|
+
}
|
20
|
+
}), ___EmotionJSX(Text, {
|
21
|
+
variant: "navBarHeaderText"
|
22
|
+
}, props.item.heading));
|
23
|
+
};
|
24
|
+
|
25
|
+
NavBarItemHeader.propTypes = {
|
26
|
+
item: PropTypes.shape({
|
27
|
+
heading: PropTypes.string,
|
28
|
+
icon: PropTypes.elementType
|
29
|
+
})
|
30
|
+
};
|
31
|
+
export default NavBarItemHeader;
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
import { Separator, AccordionGridGroup, Text, Item, Box } from '../../index';
|
4
|
+
import NavBarItemBody from './NavBarItemBody';
|
5
|
+
import NavBarItemHeader from './NavBarItemHeader';
|
6
|
+
/**
|
7
|
+
* Composed component that creates an AccordionGrid group
|
8
|
+
* with title, and separator options.
|
9
|
+
*
|
10
|
+
*/
|
11
|
+
|
12
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
13
|
+
|
14
|
+
var NavBarSection = function NavBarSection(props) {
|
15
|
+
var hasSeparator = props.hasSeparator,
|
16
|
+
title = props.title,
|
17
|
+
items = props.items;
|
18
|
+
return ___EmotionJSX(React.Fragment, null, title && ___EmotionJSX(Text, {
|
19
|
+
variant: "text.navBarSubtitle",
|
20
|
+
sx: {
|
21
|
+
mt: '25px',
|
22
|
+
mb: '15px',
|
23
|
+
ml: '15px'
|
24
|
+
}
|
25
|
+
}, title), ___EmotionJSX(AccordionGridGroup, {
|
26
|
+
items: items
|
27
|
+
}, function (item) {
|
28
|
+
return ___EmotionJSX(Item, {
|
29
|
+
headerProps: {
|
30
|
+
variant: 'accordion.accordionGridHeaderNav'
|
31
|
+
},
|
32
|
+
textValue: item
|
33
|
+
}, ___EmotionJSX(NavBarItemHeader, {
|
34
|
+
item: item
|
35
|
+
}), ___EmotionJSX(NavBarItemBody, {
|
36
|
+
item: item
|
37
|
+
}));
|
38
|
+
}), hasSeparator && ___EmotionJSX(Box, {
|
39
|
+
sx: {
|
40
|
+
pl: '15px',
|
41
|
+
pr: '15px',
|
42
|
+
mt: '25px'
|
43
|
+
}
|
44
|
+
}, ___EmotionJSX(Separator, {
|
45
|
+
variant: "separator.navBarSeparator"
|
46
|
+
})));
|
47
|
+
};
|
48
|
+
|
49
|
+
NavBarSection.defaultProps = {
|
50
|
+
hasSeparator: false
|
51
|
+
};
|
52
|
+
NavBarSection.propTypes = {
|
53
|
+
/** If true, a separator will render at the end of the section */
|
54
|
+
hasSeparator: PropTypes.bool,
|
55
|
+
|
56
|
+
/** If present, this string will render at the top of the section */
|
57
|
+
title: PropTypes.string,
|
58
|
+
|
59
|
+
/**
|
60
|
+
* *For performance reasons, use this prop instead of Array.map when iteratively rendering Items*.
|
61
|
+
* For use with [dynamic collections](https://react-spectrum.adobe.com/react-stately/collections.html#dynamic-collections).
|
62
|
+
*/
|
63
|
+
items: PropTypes.arrayOf(PropTypes.shape({}))
|
64
|
+
};
|
65
|
+
export default NavBarSection;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './NavBarSection';
|
@@ -29,7 +29,7 @@ var Separator = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
29
29
|
return ___EmotionJSX(Box, _extends({
|
30
30
|
ref: ref,
|
31
31
|
className: classNames,
|
32
|
-
variant: "separator"
|
32
|
+
variant: "separator.base"
|
33
33
|
}, others, separatorProps));
|
34
34
|
});
|
35
35
|
Separator.propTypes = {
|
@@ -32,7 +32,8 @@ var TooltipTrigger = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
32
32
|
className = props.className,
|
33
33
|
isNotFlippable = props.isNotFlippable,
|
34
34
|
isDarkMode = props.isDarkMode,
|
35
|
-
hasNoArrow = props.hasNoArrow
|
35
|
+
hasNoArrow = props.hasNoArrow,
|
36
|
+
targetRef = props.targetRef;
|
36
37
|
|
37
38
|
var _React$Children$toArr = React.Children.toArray(children),
|
38
39
|
_React$Children$toArr2 = _slicedToArray(_React$Children$toArr, 2),
|
@@ -42,23 +43,24 @@ var TooltipTrigger = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
42
43
|
var state = useTooltipTriggerState(props);
|
43
44
|
var tooltipTriggerRef = useRef();
|
44
45
|
var overlayRef = useRef();
|
46
|
+
var tooltipRef = targetRef || tooltipTriggerRef;
|
45
47
|
usePropWarning(props, 'disabled', 'isDisabled');
|
46
48
|
/* istanbul ignore next */
|
47
49
|
|
48
50
|
useImperativeHandle(ref, function () {
|
49
|
-
return
|
51
|
+
return tooltipRef.current;
|
50
52
|
});
|
51
53
|
|
52
54
|
var _useTooltipTrigger = useTooltipTrigger({
|
53
55
|
isDisabled: isDisabled,
|
54
56
|
trigger: triggerAction
|
55
|
-
}, state,
|
57
|
+
}, state, tooltipRef),
|
56
58
|
triggerProps = _useTooltipTrigger.triggerProps,
|
57
59
|
tooltipProps = _useTooltipTrigger.tooltipProps;
|
58
60
|
|
59
61
|
var _useOverlayPosition = useOverlayPosition({
|
60
62
|
placement: _concatInstanceProperty(_context = "".concat(direction, " ")).call(_context, align),
|
61
|
-
targetRef:
|
63
|
+
targetRef: tooltipRef,
|
62
64
|
overlayRef: overlayRef,
|
63
65
|
offset: offset,
|
64
66
|
// Our API preference is for default false so we invert this since it should be default true
|
@@ -134,7 +136,10 @@ TooltipTrigger.propTypes = {
|
|
134
136
|
placement: PropTypes.string,
|
135
137
|
|
136
138
|
/** By default, opens for both focus and hover. Can be made to open only for focus. */
|
137
|
-
trigger: PropTypes.string
|
139
|
+
trigger: PropTypes.string,
|
140
|
+
|
141
|
+
/* The ref for the element which the overlay positions itself with respect to. */
|
142
|
+
targetRef: PropTypes.shape({})
|
138
143
|
};
|
139
144
|
TooltipTrigger.defaultProps = {
|
140
145
|
align: 'middle',
|
package/lib/index.js
CHANGED
@@ -27,6 +27,7 @@ export { default as CheckboxField } from './components/CheckboxField';
|
|
27
27
|
export * from './components/CheckboxField';
|
28
28
|
export { default as Chip } from './components/Chip';
|
29
29
|
export * from './components/Chip';
|
30
|
+
export { default as CodeView } from './components/CodeView';
|
30
31
|
export { default as ComboBoxField } from './components/ComboBoxField';
|
31
32
|
export { default as CopyText } from './components/CopyText';
|
32
33
|
export { default as ColorField } from './components/ColorField';
|
@@ -68,6 +69,10 @@ export { default as Messages } from './components/Messages';
|
|
68
69
|
export * from './components/Messages';
|
69
70
|
export { default as Modal } from './components/Modal';
|
70
71
|
export * from './components/Modal';
|
72
|
+
export { default as NavBar } from './components/NavBar';
|
73
|
+
export * from './components/NavBar';
|
74
|
+
export { default as NavBarSection } from './components/NavBarSection';
|
75
|
+
export * from './components/NavBarSection';
|
71
76
|
export { default as MultivaluesField } from './components/MultivaluesField';
|
72
77
|
export { default as OverlayPanel } from './components/OverlayPanel';
|
73
78
|
export * from './components/OverlayPanel';
|
@@ -56,6 +56,36 @@ var accordionGridHeader = {
|
|
56
56
|
}
|
57
57
|
}
|
58
58
|
};
|
59
|
+
var accordionGridHeaderNav = {
|
60
|
+
padding: '10px 15px 10px 15px',
|
61
|
+
cursor: 'pointer',
|
62
|
+
minHeight: '40px',
|
63
|
+
lineHeight: '30px',
|
64
|
+
outline: 'none',
|
65
|
+
display: 'flex',
|
66
|
+
justifyContent: 'flex-start',
|
67
|
+
flexShrink: 0,
|
68
|
+
wordBreak: 'inherit',
|
69
|
+
whiteSpace: 'nowrap',
|
70
|
+
color: 'neutral.95',
|
71
|
+
flexGrow: 1,
|
72
|
+
fontWeight: 0,
|
73
|
+
fontSize: '16px',
|
74
|
+
mt: '5px',
|
75
|
+
'&.is-focused': {
|
76
|
+
outline: 'none',
|
77
|
+
boxShadow: 'focus',
|
78
|
+
WebkitBoxShadow: 'focus',
|
79
|
+
MozBoxShadow: 'focus'
|
80
|
+
},
|
81
|
+
'&.is-hovered': {
|
82
|
+
backgroundColor: 'accent.10',
|
83
|
+
boxShadow: 'inset 2px 0 0 0 white'
|
84
|
+
},
|
85
|
+
'&.is-pressed': {
|
86
|
+
backgroundColor: 'accent.10'
|
87
|
+
}
|
88
|
+
};
|
59
89
|
var accordionGridBody = {
|
60
90
|
display: 'none !important',
|
61
91
|
pl: 'sm',
|
@@ -69,5 +99,6 @@ export default {
|
|
69
99
|
accordionGridBody: accordionGridBody,
|
70
100
|
accordionTitle: accordionTitle,
|
71
101
|
accordion: accordion,
|
72
|
-
accordionBody: accordionBody
|
102
|
+
accordionBody: accordionBody,
|
103
|
+
accordionGridHeaderNav: accordionGridHeaderNav
|
73
104
|
};
|
@@ -189,6 +189,26 @@ var expandableRow = {
|
|
189
189
|
}
|
190
190
|
}
|
191
191
|
};
|
192
|
+
var navBar = {
|
193
|
+
height: '100%',
|
194
|
+
width: '230px',
|
195
|
+
position: 'absolute',
|
196
|
+
zIndex: '1',
|
197
|
+
top: '0',
|
198
|
+
left: '0',
|
199
|
+
backgroundColor: 'accent.20',
|
200
|
+
overflowY: 'hidden'
|
201
|
+
};
|
202
|
+
var navBarSectionContainer = {
|
203
|
+
height: '100%',
|
204
|
+
maxHeight: '100%',
|
205
|
+
overflowY: 'overlay !important'
|
206
|
+
};
|
207
|
+
var navBarItemHeaderContainer = {
|
208
|
+
flexGrow: 1,
|
209
|
+
alignItems: 'center',
|
210
|
+
maxWidth: '180px'
|
211
|
+
};
|
192
212
|
var datePicker = {
|
193
213
|
'.react-calendar': {
|
194
214
|
width: 280,
|
@@ -270,5 +290,8 @@ export default {
|
|
270
290
|
radioContainer: radioContainer,
|
271
291
|
scrollbox: scrollbox,
|
272
292
|
topShadowScrollbox: topShadowScrollbox,
|
273
|
-
bottomShadowScrollbox: bottomShadowScrollbox
|
293
|
+
bottomShadowScrollbox: bottomShadowScrollbox,
|
294
|
+
navBar: navBar,
|
295
|
+
navBarSectionContainer: navBarSectionContainer,
|
296
|
+
navBarItemHeaderContainer: navBarItemHeaderContainer
|
274
297
|
};
|
@@ -52,6 +52,33 @@ var defaultFocus = {
|
|
52
52
|
outline: 'none',
|
53
53
|
boxShadow: 'focus'
|
54
54
|
};
|
55
|
+
var navItemButton = {
|
56
|
+
textDecoration: 'none',
|
57
|
+
outline: 'none',
|
58
|
+
cursor: 'pointer',
|
59
|
+
borderRadius: 0,
|
60
|
+
backgroundColor: 'transparent',
|
61
|
+
paddingTop: '5px',
|
62
|
+
paddingBottom: '5px',
|
63
|
+
display: 'block',
|
64
|
+
color: 'neutral.95',
|
65
|
+
fontSize: 'sm',
|
66
|
+
fontWeight: 1,
|
67
|
+
flexGrow: '1',
|
68
|
+
width: '100%',
|
69
|
+
textAlign: 'left',
|
70
|
+
lineHeight: '16px',
|
71
|
+
whiteSpace: 'break-spaces',
|
72
|
+
overflowWrap: 'break-word',
|
73
|
+
maxWidth: '100%',
|
74
|
+
wordWrap: 'break-word',
|
75
|
+
wordBreak: 'break-word',
|
76
|
+
'&.is-focused': _objectSpread({}, defaultFocus),
|
77
|
+
'&.is-hovered': {
|
78
|
+
bg: 'accent.10',
|
79
|
+
boxShadow: 'inset 2px 0 0 0 white'
|
80
|
+
}
|
81
|
+
};
|
55
82
|
var iconButton = {
|
56
83
|
justifyContent: 'center',
|
57
84
|
appearance: 'none',
|
@@ -67,7 +94,7 @@ var iconButton = {
|
|
67
94
|
width: 'inherit',
|
68
95
|
height: 'inherit',
|
69
96
|
path: {
|
70
|
-
fill: 'neutral.
|
97
|
+
fill: 'neutral.40'
|
71
98
|
},
|
72
99
|
outline: 'none',
|
73
100
|
'&.is-focused': _objectSpread({}, defaultFocus),
|
@@ -516,6 +543,7 @@ export default {
|
|
516
543
|
text: text,
|
517
544
|
helpHint: helpHint,
|
518
545
|
modalCloseButton: modalCloseButton,
|
546
|
+
navItemButton: navItemButton,
|
519
547
|
applicationPortalPinned: applicationPortalPinned,
|
520
548
|
applicationPortal: applicationPortal,
|
521
549
|
square: square,
|
@@ -0,0 +1,68 @@
|
|
1
|
+
import 'a11y-syntax-highlighting/dist/prism/a11y-light.min.css';
|
2
|
+
var wrapper = {
|
3
|
+
bg: 'accent.99',
|
4
|
+
border: '1px solid',
|
5
|
+
borderColor: 'accent.95',
|
6
|
+
width: 400,
|
7
|
+
height: 200,
|
8
|
+
my: 5,
|
9
|
+
overflow: 'auto',
|
10
|
+
alignItems: 'center',
|
11
|
+
'&.is-focused, &:focus': {
|
12
|
+
boxShadow: 'focus',
|
13
|
+
outline: 'none'
|
14
|
+
},
|
15
|
+
pre: {
|
16
|
+
backgroundColor: 'transparent',
|
17
|
+
m: 0,
|
18
|
+
p: 10,
|
19
|
+
pr: 0,
|
20
|
+
height: '100%',
|
21
|
+
width: '100%',
|
22
|
+
overflowX: 'hidden',
|
23
|
+
overflowY: 'auto',
|
24
|
+
fontFamily: 'standard',
|
25
|
+
fontSize: 'sm',
|
26
|
+
'& .token-line': {
|
27
|
+
display: 'block',
|
28
|
+
alignItems: 'center',
|
29
|
+
'& .token': {
|
30
|
+
whiteSpace: 'pre-wrap',
|
31
|
+
wordBreak: 'break-all'
|
32
|
+
}
|
33
|
+
}
|
34
|
+
},
|
35
|
+
'&.has-no-copy-button': {
|
36
|
+
pre: {
|
37
|
+
p: 10
|
38
|
+
}
|
39
|
+
},
|
40
|
+
'&.has-line-numbers': {
|
41
|
+
pre: {
|
42
|
+
p: '0 10px 0 0',
|
43
|
+
overflow: 'auto',
|
44
|
+
'& .token-line:first-of-type *': {
|
45
|
+
pt: 10
|
46
|
+
},
|
47
|
+
'& .token-line': {
|
48
|
+
display: 'flex',
|
49
|
+
'& .token': {
|
50
|
+
whiteSpace: 'pre'
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
};
|
56
|
+
var lineNo = {
|
57
|
+
display: 'table-cell',
|
58
|
+
userSelect: 'none',
|
59
|
+
p: 5,
|
60
|
+
m: '0 10px 0 0',
|
61
|
+
bg: 'accent.30',
|
62
|
+
minWidth: 26,
|
63
|
+
color: 'white'
|
64
|
+
};
|
65
|
+
export default {
|
66
|
+
wrapper: wrapper,
|
67
|
+
lineNo: lineNo
|
68
|
+
};
|
@@ -1,4 +1,18 @@
|
|
1
|
-
|
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); if (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 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; }
|
14
|
+
|
15
|
+
var base = {
|
2
16
|
bg: 'neutral.80',
|
3
17
|
width: '100%',
|
4
18
|
height: '1px',
|
@@ -8,4 +22,22 @@ export default {
|
|
8
22
|
height: '100%',
|
9
23
|
mx: '5px'
|
10
24
|
}
|
25
|
+
};
|
26
|
+
|
27
|
+
var navBarSeparator = _objectSpread(_objectSpread({}, base), {}, {
|
28
|
+
width: '100%',
|
29
|
+
backgroundColor: 'neutral.60'
|
30
|
+
});
|
31
|
+
|
32
|
+
var navBarSubtitleSeparator = _objectSpread(_objectSpread({}, base), {}, {
|
33
|
+
ml: '45px',
|
34
|
+
width: 'calc(100% - 75px)',
|
35
|
+
mb: '15px',
|
36
|
+
backgroundColor: 'neutral.60'
|
37
|
+
});
|
38
|
+
|
39
|
+
export default {
|
40
|
+
base: base,
|
41
|
+
navBarSeparator: navBarSeparator,
|
42
|
+
navBarSubtitleSeparator: navBarSubtitleSeparator
|
11
43
|
};
|
@@ -119,6 +119,19 @@ var expandableRow = {
|
|
119
119
|
}
|
120
120
|
}
|
121
121
|
};
|
122
|
+
var navBarSubtitle = {
|
123
|
+
fontWeight: 3,
|
124
|
+
fontSize: '11px',
|
125
|
+
color: 'accent.80'
|
126
|
+
};
|
127
|
+
|
128
|
+
var navBarHeaderText = _objectSpread(_objectSpread({}, wordWrap), {}, {
|
129
|
+
whiteSpace: 'break-spaces',
|
130
|
+
lineHeight: '13px',
|
131
|
+
fontSize: '13px',
|
132
|
+
fontWeight: 1
|
133
|
+
});
|
134
|
+
|
122
135
|
export var text = {
|
123
136
|
base: base,
|
124
137
|
bodyStrong: _objectSpread(_objectSpread({}, wordWrap), {}, {
|
@@ -182,6 +195,8 @@ export var text = {
|
|
182
195
|
textOverflow: 'ellipsis'
|
183
196
|
}),
|
184
197
|
expandableRow: expandableRow,
|
198
|
+
navBarHeaderText: navBarHeaderText,
|
199
|
+
navBarSubtitle: navBarSubtitle,
|
185
200
|
placeholder: {
|
186
201
|
fontWeight: -1,
|
187
202
|
color: 'text.secondary',
|
@@ -14,6 +14,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
14
14
|
|
15
15
|
import accordion from './accordion';
|
16
16
|
import boxes from './boxes';
|
17
|
+
import codeView from './codeView';
|
17
18
|
import images from './images';
|
18
19
|
import imageUpload from './imageUpload';
|
19
20
|
import link from './link';
|
@@ -35,6 +36,7 @@ import tooltip from './tooltip';
|
|
35
36
|
export default _objectSpread(_objectSpread({
|
36
37
|
accordion: accordion,
|
37
38
|
boxes: boxes,
|
39
|
+
codeView: codeView,
|
38
40
|
images: images,
|
39
41
|
imageUpload: imageUpload,
|
40
42
|
loader: loader,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pingux/astro",
|
3
|
-
"version": "1.1.0-alpha.
|
3
|
+
"version": "1.1.0-alpha.14",
|
4
4
|
"description": "PingUX themeable React component library",
|
5
5
|
"author": "uxdev@pingidentity.com",
|
6
6
|
"license": "Apache-2.0",
|
@@ -126,12 +126,14 @@
|
|
126
126
|
"@styled-system/props": "^5.1.5",
|
127
127
|
"@styled-system/theme-get": "^5.1.2",
|
128
128
|
"@tippyjs/react": "4.2.0",
|
129
|
+
"a11y-syntax-highlighting": "0.2.0",
|
129
130
|
"chroma-js": "^2.1.0",
|
130
131
|
"classnames": "^2.2.6",
|
131
132
|
"emotion-normalize": "^11.0.1",
|
132
133
|
"lodash": "^4.17.21",
|
133
134
|
"mdi-react": "^7.4.0",
|
134
135
|
"moment": "^2.29.1",
|
136
|
+
"prism-react-renderer": "^1.2.1",
|
135
137
|
"prop-types": "^15.7.2",
|
136
138
|
"react-calendar": "^3.4.0",
|
137
139
|
"react-color": "^2.19.3",
|