@pingux/astro 2.177.2 → 2.177.6-alpha.0
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/TooltipTrigger/Tooltip.js +1 -2
- package/lib/cjs/components/TooltipTrigger/Tooltip.styles.js +2 -5
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.stories.js +26 -7
- package/lib/cjs/libs/astro/src/styles/themeOverrides/nextGenDarkMode/variants/buttons.d.ts +20 -0
- package/lib/cjs/libs/astro/src/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +3 -0
- package/lib/cjs/libs/astro/src/styles/themes/next-gen/next-gen.d.ts +75 -1
- package/lib/cjs/libs/astro/src/styles/themes/next-gen/variants/button.d.ts +32 -0
- package/lib/cjs/libs/astro/src/styles/themes/next-gen/variants/popoverMenu.d.ts +17 -1
- package/lib/cjs/libs/astro/src/styles/themes/next-gen/variants/tooltip.d.ts +26 -0
- package/lib/cjs/libs/astro/src/styles/themes/next-gen/variants/variants.d.ts +43 -1
- package/lib/cjs/libs/astro/tsconfig.lib.tsbuildinfo +1 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +11 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +4 -1
- package/lib/cjs/styles/themeOverrides/uiLibraryOverride.js +2 -0
- package/lib/cjs/styles/themeOverrides/withUiLibraryCss.js +12 -1
- package/lib/cjs/styles/themes/next-gen/text.js +1 -1
- package/lib/cjs/styles/themes/next-gen/variants/button.js +11 -1
- package/lib/cjs/styles/themes/next-gen/variants/popoverMenu.js +18 -1
- package/lib/cjs/styles/themes/next-gen/variants/tooltip.js +41 -4
- package/lib/components/TooltipTrigger/Tooltip.js +1 -2
- package/lib/components/TooltipTrigger/Tooltip.styles.js +2 -5
- package/lib/components/TooltipTrigger/TooltipTrigger.stories.js +26 -7
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +11 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +4 -1
- package/lib/styles/themeOverrides/uiLibraryOverride.js +2 -0
- package/lib/styles/themeOverrides/withUiLibraryCss.js +13 -2
- package/lib/styles/themes/next-gen/text.js +1 -1
- package/lib/styles/themes/next-gen/variants/button.js +11 -1
- package/lib/styles/themes/next-gen/variants/popoverMenu.js +18 -1
- package/lib/styles/themes/next-gen/variants/tooltip.js +41 -4
- package/package.json +2 -2
|
@@ -78,7 +78,17 @@ var iconButtons = {
|
|
|
78
78
|
'&.is-hovered': {
|
|
79
79
|
backgroundColor: _onyxTokens.astroTokensDark.color.gray.light
|
|
80
80
|
}
|
|
81
|
-
})
|
|
81
|
+
}),
|
|
82
|
+
tooltip: {
|
|
83
|
+
button: _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
84
|
+
'&.is-hovered': {
|
|
85
|
+
path: {
|
|
86
|
+
fill: _onyxTokens.astroTokensDark.color.gray[400]
|
|
87
|
+
},
|
|
88
|
+
backgroundColor: _onyxTokens.astroTokensDark.color.common.light
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
}
|
|
82
92
|
};
|
|
83
93
|
var searchNavTabLabel = {
|
|
84
94
|
color: _onyxTokens.astroTokensDark.color.gray[400],
|
|
@@ -122,7 +122,10 @@ var attachment = {
|
|
|
122
122
|
};
|
|
123
123
|
var tooltip = {
|
|
124
124
|
inline: {
|
|
125
|
-
color: _onyxTokens.astroTokensDark.color.
|
|
125
|
+
color: _onyxTokens.astroTokensDark.color.font.link,
|
|
126
|
+
'&.is-hovered': {
|
|
127
|
+
color: _onyxTokens.astroTokensDark.color.blue[300]
|
|
128
|
+
}
|
|
126
129
|
}
|
|
127
130
|
};
|
|
128
131
|
var statusIcon = {
|
|
@@ -182,6 +182,7 @@ var variants = {
|
|
|
182
182
|
},
|
|
183
183
|
navBar: {
|
|
184
184
|
sectionButton: _objectSpread(_objectSpread({}, _theme["default"].variants.navBar.sectionButton), {}, {
|
|
185
|
+
fontFamily: '"Helvetica Neue", Helvetica, sans-serif !important',
|
|
185
186
|
height: 'unset',
|
|
186
187
|
fontWeight: '500',
|
|
187
188
|
minHeight: '36px',
|
|
@@ -193,6 +194,7 @@ var variants = {
|
|
|
193
194
|
itemButton: _objectSpread(_objectSpread({
|
|
194
195
|
height: 'unset'
|
|
195
196
|
}, _theme["default"].variants.navBar.itemButton), {}, {
|
|
197
|
+
fontFamily: '"Helvetica Neue", Helvetica, sans-serif !important',
|
|
196
198
|
fontWeight: '500',
|
|
197
199
|
'&:not(.disabled):hover': _objectSpread(_objectSpread({}, _theme["default"].variants.navBar.itemButton), {}, {
|
|
198
200
|
fontWeight: '500'
|
|
@@ -16,7 +16,16 @@ var _themeUi = require("theme-ui");
|
|
|
16
16
|
var _theme = _interopRequireDefault(require("../theme"));
|
|
17
17
|
var _uiLibraryOverride = _interopRequireDefault(require("./uiLibraryOverride"));
|
|
18
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
19
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
19
20
|
var UI_LIBRARY_CSS_LINK = 'https://assets.pingone.com/ux/ui-library/5.0.2/css/ui-library.css';
|
|
21
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
22
|
+
name: "u0lwwy",
|
|
23
|
+
styles: "body{font-family:\"Helvetica Neue\",Helvetica,sans-serif!important;}"
|
|
24
|
+
} : {
|
|
25
|
+
name: "1lthfkl-WithUiLibraryCss",
|
|
26
|
+
styles: "body{font-family:\"Helvetica Neue\",Helvetica,sans-serif!important;};label:WithUiLibraryCss;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYXN0cm8vc3JjL3N0eWxlcy90aGVtZU92ZXJyaWRlcy93aXRoVWlMaWJyYXJ5Q3NzLmpzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0Qm1CIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYXN0cm8vc3JjL3N0eWxlcy90aGVtZU92ZXJyaWRlcy93aXRoVWlMaWJyYXJ5Q3NzLmpzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCwgeyB1c2VFZmZlY3QgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MsIEdsb2JhbCwgVGhlbWVQcm92aWRlciB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IG1lcmdlIH0gZnJvbSAndGhlbWUtdWknO1xuXG5pbXBvcnQgYXN0cm9UaGVtZSBmcm9tICcuLi90aGVtZSc7XG5cbmltcG9ydCB1aUxpYnJhcnlPdmVycmlkZSBmcm9tICcuL3VpTGlicmFyeU92ZXJyaWRlJztcblxuY29uc3QgVUlfTElCUkFSWV9DU1NfTElOSyA9ICdodHRwczovL2Fzc2V0cy5waW5nb25lLmNvbS91eC91aS1saWJyYXJ5LzUuMC4yL2Nzcy91aS1saWJyYXJ5LmNzcyc7XG5cbmNvbnN0IFdpdGhVaUxpYnJhcnlDc3MgPSBTdG9yeSA9PiB7XG4gIHVzZUVmZmVjdCgoKSA9PiB7XG4gICAgY29uc3QgdWlMaWJyYX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(Story) {
|
|
21
30
|
(0, _react.useEffect)(function () {
|
|
22
31
|
var uiLibraryCss = document.createElement('link');
|
|
@@ -34,6 +43,8 @@ var WithUiLibraryCss = function WithUiLibraryCss(Story) {
|
|
|
34
43
|
var theme = (0, _themeUi.merge)(_theme["default"], _uiLibraryOverride["default"]);
|
|
35
44
|
return (0, _react2.jsx)(_react2.ThemeProvider, {
|
|
36
45
|
theme: theme
|
|
37
|
-
}, (0, _react2.jsx)(
|
|
46
|
+
}, (0, _react2.jsx)(_react2.Global, {
|
|
47
|
+
styles: _ref
|
|
48
|
+
}), (0, _react2.jsx)(Story, null));
|
|
38
49
|
};
|
|
39
50
|
var _default = exports["default"] = WithUiLibraryCss;
|
|
@@ -21,7 +21,7 @@ var fontSizes = exports.fontSizes = {
|
|
|
21
21
|
},
|
|
22
22
|
'xs': '11px',
|
|
23
23
|
'tiny': "".concat(fontSize.tiny, "px"),
|
|
24
|
-
'sm': "".concat(fontSize.sm, "px"),
|
|
24
|
+
'sm': "".concat(fontSize.small || fontSize.sm, "px"),
|
|
25
25
|
'md': "".concat(fontSizeBase * 1, "rem"),
|
|
26
26
|
'lg': "".concat(fontSizeBase * 1.25, "rem"),
|
|
27
27
|
'xl': "".concat(fontSizeBase * 1.5, "rem"),
|
|
@@ -542,7 +542,17 @@ var iconButtons = {
|
|
|
542
542
|
outlineOffset: '2px',
|
|
543
543
|
outlineColor: _onyxTokens.astroTokens.color.gray[700]
|
|
544
544
|
}
|
|
545
|
-
})
|
|
545
|
+
}),
|
|
546
|
+
tooltip: {
|
|
547
|
+
button: _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
548
|
+
'&.is-hovered': {
|
|
549
|
+
path: {
|
|
550
|
+
fill: 'dark'
|
|
551
|
+
},
|
|
552
|
+
backgroundColor: _onyxTokens.astroTokens.color.common.light
|
|
553
|
+
}
|
|
554
|
+
})
|
|
555
|
+
}
|
|
546
556
|
};
|
|
547
557
|
var listBoxLink = {
|
|
548
558
|
color: 'active',
|
|
@@ -5,14 +5,31 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = void 0;
|
|
8
|
+
var _onyxTokens = require("@pingux/onyx-tokens");
|
|
8
9
|
var container = {
|
|
9
|
-
minWidth: '150px',
|
|
10
10
|
transition: 'opacity 200ms ease',
|
|
11
11
|
'&.animate': {
|
|
12
12
|
opacity: 0
|
|
13
13
|
},
|
|
14
14
|
'&.animate.is-mounted.is-transitioning': {
|
|
15
15
|
opacity: '100%'
|
|
16
|
+
},
|
|
17
|
+
'&.is-dark-mode': {
|
|
18
|
+
color: 'white',
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
bg: _onyxTokens.astroTokens.color.tooltip.container.bg,
|
|
21
|
+
'&[data-popover-placement^=top] > [data-popover-arrow="arrow"]:before': {
|
|
22
|
+
borderTopColor: _onyxTokens.astroTokens.color.tooltip.container.bg
|
|
23
|
+
},
|
|
24
|
+
'&[data-popover-placement^=bottom] > [data-popover-arrow="arrow"]:before': {
|
|
25
|
+
borderBottomColor: _onyxTokens.astroTokens.color.tooltip.container.bg
|
|
26
|
+
},
|
|
27
|
+
'&[data-popover-placement^=left] > [data-popover-arrow="arrow"]:before': {
|
|
28
|
+
borderLeftColor: _onyxTokens.astroTokens.color.tooltip.container.bg
|
|
29
|
+
},
|
|
30
|
+
'&[data-popover-placement^=right] > [data-popover-arrow="arrow"]:before': {
|
|
31
|
+
borderRightColor: _onyxTokens.astroTokens.color.tooltip.container.bg
|
|
32
|
+
}
|
|
16
33
|
}
|
|
17
34
|
};
|
|
18
35
|
var arrow = {
|
|
@@ -1,16 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
|
4
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
|
5
|
+
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
|
6
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
7
|
+
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
|
8
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
|
9
|
+
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
|
3
10
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
11
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
12
|
_Object$defineProperty(exports, "__esModule", {
|
|
5
13
|
value: true
|
|
6
14
|
});
|
|
7
15
|
exports["default"] = void 0;
|
|
16
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
17
|
+
var _onyxTokens = require("@pingux/onyx-tokens");
|
|
18
|
+
var _button = require("./button");
|
|
19
|
+
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
21
|
var container = {
|
|
9
|
-
backgroundColor:
|
|
22
|
+
backgroundColor: _onyxTokens.astroTokens.color.tooltip.container.bg,
|
|
23
|
+
borderRadius: '3px',
|
|
24
|
+
fontSize: 'sm',
|
|
25
|
+
fontFamily: 'standard',
|
|
26
|
+
lineHeight: 'body',
|
|
27
|
+
p: '0',
|
|
28
|
+
px: 'sm',
|
|
29
|
+
py: 'xs'
|
|
30
|
+
};
|
|
31
|
+
var badge = {
|
|
10
32
|
borderRadius: '4px',
|
|
11
|
-
|
|
12
|
-
|
|
33
|
+
position: 'relative',
|
|
34
|
+
'&.is-focused:before': {
|
|
35
|
+
position: 'absolute',
|
|
36
|
+
content: '""',
|
|
37
|
+
width: '100%',
|
|
38
|
+
height: '100%',
|
|
39
|
+
padding: '2px',
|
|
40
|
+
borderRadius: '2px',
|
|
41
|
+
border: '1px solid',
|
|
42
|
+
borderColor: 'focus'
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var inline = {
|
|
46
|
+
color: _onyxTokens.astroTokens.color.font.base,
|
|
47
|
+
'&.is-focused': _objectSpread({}, _button.defaultFocus)
|
|
13
48
|
};
|
|
14
49
|
var _default = exports["default"] = {
|
|
15
|
-
container: container
|
|
50
|
+
container: container,
|
|
51
|
+
badge: badge,
|
|
52
|
+
inline: inline
|
|
16
53
|
};
|
|
@@ -16,8 +16,7 @@ var Tooltip = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
16
16
|
var tooltipRef = useLocalOrForwardRef(ref);
|
|
17
17
|
return ___EmotionJSX(Text, _extends({
|
|
18
18
|
ref: tooltipRef,
|
|
19
|
-
variant: "variants.tooltip.container"
|
|
20
|
-
p: "sm"
|
|
19
|
+
variant: "variants.tooltip.container"
|
|
21
20
|
}, tooltipProps, others), children);
|
|
22
21
|
});
|
|
23
22
|
export default Tooltip;
|
|
@@ -16,6 +16,7 @@ export var container = {
|
|
|
16
16
|
overflow: 'visible',
|
|
17
17
|
wordBreak: 'break-word',
|
|
18
18
|
display: 'flex',
|
|
19
|
+
p: 'sm',
|
|
19
20
|
'.is-right > * > &, .is-left > * > &': {
|
|
20
21
|
maxWidth: '24em',
|
|
21
22
|
maxHeight: '6.5em',
|
|
@@ -37,11 +38,7 @@ var badge = _objectSpread(_objectSpread({}, baseBadge), {}, {
|
|
|
37
38
|
export var button = {
|
|
38
39
|
cursor: 'default',
|
|
39
40
|
'&.is-hovered, &.is-pressed': {
|
|
40
|
-
|
|
41
|
-
cursor: 'default',
|
|
42
|
-
path: {
|
|
43
|
-
fill: 'neutral.20'
|
|
44
|
-
}
|
|
41
|
+
cursor: 'default'
|
|
45
42
|
}
|
|
46
43
|
};
|
|
47
44
|
var inline = _objectSpread(_objectSpread({}, text), {}, {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
2
|
+
import _reverseInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reverse";
|
|
2
3
|
import React from 'react';
|
|
3
|
-
import
|
|
4
|
+
import AccountOutlineIcon from '@pingux/mdi-react/AccountOutlineIcon';
|
|
4
5
|
import Earth from '@pingux/mdi-react/EarthIcon';
|
|
6
|
+
import { astroTokens, astroTokensDark } from '@pingux/onyx-tokens';
|
|
5
7
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
|
8
|
+
import { useGetTheme } from '../../hooks';
|
|
6
9
|
import { Box, Button, Icon, IconButton, Text, Tooltip, TooltipTrigger } from '../../index';
|
|
7
10
|
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
|
|
8
11
|
import TooltipTriggerReadme from './TooltipTrigger.mdx';
|
|
@@ -58,25 +61,41 @@ export var IconWithTooltip = function IconWithTooltip(args) {
|
|
|
58
61
|
}, ___EmotionJSX(TooltipTrigger, args, ___EmotionJSX(IconButton, {
|
|
59
62
|
variant: "tooltip.button"
|
|
60
63
|
}, ___EmotionJSX(Icon, {
|
|
61
|
-
icon:
|
|
64
|
+
icon: AccountOutlineIcon,
|
|
62
65
|
title: {
|
|
63
66
|
name: 'Account Icon'
|
|
64
67
|
}
|
|
65
68
|
})), ___EmotionJSX(Tooltip, null, "Useful tooltip")));
|
|
66
69
|
};
|
|
67
70
|
export var BadgeWithTooltip = function BadgeWithTooltip(args) {
|
|
71
|
+
var _useGetTheme = useGetTheme(),
|
|
72
|
+
_useGetTheme$themeSta = _useGetTheme.themeState,
|
|
73
|
+
isAstro = _useGetTheme$themeSta.isAstro,
|
|
74
|
+
isOnyxDark = _useGetTheme$themeSta.isOnyxDark;
|
|
75
|
+
var getBackground = function getBackground() {
|
|
76
|
+
if (isAstro) {
|
|
77
|
+
return 'neutral.10';
|
|
78
|
+
}
|
|
79
|
+
return isOnyxDark ? astroTokens.color.gray.light : astroTokens.color.gray.dark;
|
|
80
|
+
};
|
|
81
|
+
var getTextColor = function getTextColor() {
|
|
82
|
+
if (isAstro) {
|
|
83
|
+
return 'white';
|
|
84
|
+
}
|
|
85
|
+
return isOnyxDark ? _reverseInstanceProperty(astroTokensDark.color.font) : _reverseInstanceProperty(astroTokens.color.font);
|
|
86
|
+
};
|
|
68
87
|
return ___EmotionJSX(Box, {
|
|
69
88
|
pl: 50
|
|
70
89
|
}, ___EmotionJSX(TooltipTrigger, args, ___EmotionJSX(Button, {
|
|
71
90
|
variant: "variants.tooltip.badge",
|
|
72
|
-
bg:
|
|
91
|
+
bg: getBackground()
|
|
73
92
|
}, ___EmotionJSX(Text, {
|
|
74
93
|
variant: "label",
|
|
75
|
-
sx: {
|
|
94
|
+
sx: isAstro ? {
|
|
76
95
|
textTransform: 'uppercase'
|
|
77
|
-
},
|
|
78
|
-
color:
|
|
79
|
-
}, "Some
|
|
96
|
+
} : {},
|
|
97
|
+
color: getTextColor()
|
|
98
|
+
}, "Some Text")), ___EmotionJSX(Tooltip, {
|
|
80
99
|
variant: "variants.tooltip.badgeTooltipContainer"
|
|
81
100
|
}, "Useful tooltip")));
|
|
82
101
|
};
|
|
@@ -71,7 +71,17 @@ var iconButtons = {
|
|
|
71
71
|
'&.is-hovered': {
|
|
72
72
|
backgroundColor: astroTokensDark.color.gray.light
|
|
73
73
|
}
|
|
74
|
-
})
|
|
74
|
+
}),
|
|
75
|
+
tooltip: {
|
|
76
|
+
button: _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
77
|
+
'&.is-hovered': {
|
|
78
|
+
path: {
|
|
79
|
+
fill: astroTokensDark.color.gray[400]
|
|
80
|
+
},
|
|
81
|
+
backgroundColor: astroTokensDark.color.common.light
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
}
|
|
75
85
|
};
|
|
76
86
|
var searchNavTabLabel = {
|
|
77
87
|
color: astroTokensDark.color.gray[400],
|
|
@@ -114,7 +114,10 @@ var attachment = {
|
|
|
114
114
|
};
|
|
115
115
|
var tooltip = {
|
|
116
116
|
inline: {
|
|
117
|
-
color: astroTokensDark.color.
|
|
117
|
+
color: astroTokensDark.color.font.link,
|
|
118
|
+
'&.is-hovered': {
|
|
119
|
+
color: astroTokensDark.color.blue[300]
|
|
120
|
+
}
|
|
118
121
|
}
|
|
119
122
|
};
|
|
120
123
|
var statusIcon = {
|
|
@@ -175,6 +175,7 @@ var variants = {
|
|
|
175
175
|
},
|
|
176
176
|
navBar: {
|
|
177
177
|
sectionButton: _objectSpread(_objectSpread({}, theme.variants.navBar.sectionButton), {}, {
|
|
178
|
+
fontFamily: '"Helvetica Neue", Helvetica, sans-serif !important',
|
|
178
179
|
height: 'unset',
|
|
179
180
|
fontWeight: '500',
|
|
180
181
|
minHeight: '36px',
|
|
@@ -186,6 +187,7 @@ var variants = {
|
|
|
186
187
|
itemButton: _objectSpread(_objectSpread({
|
|
187
188
|
height: 'unset'
|
|
188
189
|
}, theme.variants.navBar.itemButton), {}, {
|
|
190
|
+
fontFamily: '"Helvetica Neue", Helvetica, sans-serif !important',
|
|
189
191
|
fontWeight: '500',
|
|
190
192
|
'&:not(.disabled):hover': _objectSpread(_objectSpread({}, theme.variants.navBar.itemButton), {}, {
|
|
191
193
|
fontWeight: '500'
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
|
2
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
3
|
import React, { useEffect } from 'react';
|
|
3
|
-
import { ThemeProvider } from '@emotion/react';
|
|
4
|
+
import { css, Global, ThemeProvider } from '@emotion/react';
|
|
4
5
|
import { merge } from 'theme-ui';
|
|
5
6
|
import astroTheme from '../theme';
|
|
6
7
|
import uiLibraryOverride from './uiLibraryOverride';
|
|
7
8
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
8
9
|
var UI_LIBRARY_CSS_LINK = 'https://assets.pingone.com/ux/ui-library/5.0.2/css/ui-library.css';
|
|
10
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
11
|
+
name: "u0lwwy",
|
|
12
|
+
styles: "body{font-family:\"Helvetica Neue\",Helvetica,sans-serif!important;}"
|
|
13
|
+
} : {
|
|
14
|
+
name: "1lthfkl-WithUiLibraryCss",
|
|
15
|
+
styles: "body{font-family:\"Helvetica Neue\",Helvetica,sans-serif!important;};label:WithUiLibraryCss;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvYXN0cm8vc3JjL3N0eWxlcy90aGVtZU92ZXJyaWRlcy93aXRoVWlMaWJyYXJ5Q3NzLmpzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0Qm1CIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uL2xpYnMvYXN0cm8vc3JjL3N0eWxlcy90aGVtZU92ZXJyaWRlcy93aXRoVWlMaWJyYXJ5Q3NzLmpzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCwgeyB1c2V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HVpTGlicmFyeU92ZXJyaWRlKTtcblxuICByZXR1cm4gKFxuICAgIDxUaGVtZVByb3ZpZGVyIHRoZW1lPXt0aGVtZX0+XG4gICAgICA8R2xvYmFsXG4gICAgICAgIHN0eWxlcz17Y3NzYFxuICAgICAgICAgIGJvZHkge1xuICAgICAgICAgICAgZm9udC1mYW1pbHk6IFwiSGVsdmV0aWNhIE5ldWVcIiwgSGVsdmV0aWNhLCBzYW5zLXNlcmlmICFpbXBvcnRhbnQ7XG4gICAgICAgICAgfVxuICAgICAgICBgfVxuICAgICAgLz5cbiAgICAgIDxTdG9yeSAvPlxuICAgIDwvVGhlbWVQcm92aWRlcj5cbiAgKTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IFdpdGhVaUxpYnJhcnlDc3M7XG4iXX0= */",
|
|
16
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
17
|
+
};
|
|
9
18
|
var WithUiLibraryCss = function WithUiLibraryCss(Story) {
|
|
10
19
|
useEffect(function () {
|
|
11
20
|
var uiLibraryCss = document.createElement('link');
|
|
@@ -23,6 +32,8 @@ var WithUiLibraryCss = function WithUiLibraryCss(Story) {
|
|
|
23
32
|
var theme = merge(astroTheme, uiLibraryOverride);
|
|
24
33
|
return ___EmotionJSX(ThemeProvider, {
|
|
25
34
|
theme: theme
|
|
26
|
-
}, ___EmotionJSX(
|
|
35
|
+
}, ___EmotionJSX(Global, {
|
|
36
|
+
styles: _ref
|
|
37
|
+
}), ___EmotionJSX(Story, null));
|
|
27
38
|
};
|
|
28
39
|
export default WithUiLibraryCss;
|
|
@@ -13,7 +13,7 @@ export var fontSizes = {
|
|
|
13
13
|
},
|
|
14
14
|
'xs': '11px',
|
|
15
15
|
'tiny': "".concat(fontSize.tiny, "px"),
|
|
16
|
-
'sm': "".concat(fontSize.sm, "px"),
|
|
16
|
+
'sm': "".concat(fontSize.small || fontSize.sm, "px"),
|
|
17
17
|
'md': "".concat(fontSizeBase * 1, "rem"),
|
|
18
18
|
'lg': "".concat(fontSizeBase * 1.25, "rem"),
|
|
19
19
|
'xl': "".concat(fontSizeBase * 1.5, "rem"),
|
|
@@ -535,7 +535,17 @@ var iconButtons = {
|
|
|
535
535
|
outlineOffset: '2px',
|
|
536
536
|
outlineColor: astroTokens.color.gray[700]
|
|
537
537
|
}
|
|
538
|
-
})
|
|
538
|
+
}),
|
|
539
|
+
tooltip: {
|
|
540
|
+
button: _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
541
|
+
'&.is-hovered': {
|
|
542
|
+
path: {
|
|
543
|
+
fill: 'dark'
|
|
544
|
+
},
|
|
545
|
+
backgroundColor: astroTokens.color.common.light
|
|
546
|
+
}
|
|
547
|
+
})
|
|
548
|
+
}
|
|
539
549
|
};
|
|
540
550
|
var listBoxLink = {
|
|
541
551
|
color: 'active',
|
|
@@ -1,11 +1,28 @@
|
|
|
1
|
+
import { astroTokens } from '@pingux/onyx-tokens';
|
|
1
2
|
var container = {
|
|
2
|
-
minWidth: '150px',
|
|
3
3
|
transition: 'opacity 200ms ease',
|
|
4
4
|
'&.animate': {
|
|
5
5
|
opacity: 0
|
|
6
6
|
},
|
|
7
7
|
'&.animate.is-mounted.is-transitioning': {
|
|
8
8
|
opacity: '100%'
|
|
9
|
+
},
|
|
10
|
+
'&.is-dark-mode': {
|
|
11
|
+
color: 'white',
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
bg: astroTokens.color.tooltip.container.bg,
|
|
14
|
+
'&[data-popover-placement^=top] > [data-popover-arrow="arrow"]:before': {
|
|
15
|
+
borderTopColor: astroTokens.color.tooltip.container.bg
|
|
16
|
+
},
|
|
17
|
+
'&[data-popover-placement^=bottom] > [data-popover-arrow="arrow"]:before': {
|
|
18
|
+
borderBottomColor: astroTokens.color.tooltip.container.bg
|
|
19
|
+
},
|
|
20
|
+
'&[data-popover-placement^=left] > [data-popover-arrow="arrow"]:before': {
|
|
21
|
+
borderLeftColor: astroTokens.color.tooltip.container.bg
|
|
22
|
+
},
|
|
23
|
+
'&[data-popover-placement^=right] > [data-popover-arrow="arrow"]:before': {
|
|
24
|
+
borderRightColor: astroTokens.color.tooltip.container.bg
|
|
25
|
+
}
|
|
9
26
|
}
|
|
10
27
|
};
|
|
11
28
|
var arrow = {
|
|
@@ -1,9 +1,46 @@
|
|
|
1
|
+
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
2
|
+
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
3
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
4
|
+
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
|
5
|
+
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
|
6
|
+
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
7
|
+
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
|
8
|
+
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
|
9
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
10
|
+
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
import { astroTokens } from '@pingux/onyx-tokens';
|
|
13
|
+
import { defaultFocus } from './button';
|
|
1
14
|
var container = {
|
|
2
|
-
backgroundColor:
|
|
15
|
+
backgroundColor: astroTokens.color.tooltip.container.bg,
|
|
16
|
+
borderRadius: '3px',
|
|
17
|
+
fontSize: 'sm',
|
|
18
|
+
fontFamily: 'standard',
|
|
19
|
+
lineHeight: 'body',
|
|
20
|
+
p: '0',
|
|
21
|
+
px: 'sm',
|
|
22
|
+
py: 'xs'
|
|
23
|
+
};
|
|
24
|
+
var badge = {
|
|
3
25
|
borderRadius: '4px',
|
|
4
|
-
|
|
5
|
-
|
|
26
|
+
position: 'relative',
|
|
27
|
+
'&.is-focused:before': {
|
|
28
|
+
position: 'absolute',
|
|
29
|
+
content: '""',
|
|
30
|
+
width: '100%',
|
|
31
|
+
height: '100%',
|
|
32
|
+
padding: '2px',
|
|
33
|
+
borderRadius: '2px',
|
|
34
|
+
border: '1px solid',
|
|
35
|
+
borderColor: 'focus'
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var inline = {
|
|
39
|
+
color: astroTokens.color.font.base,
|
|
40
|
+
'&.is-focused': _objectSpread({}, defaultFocus)
|
|
6
41
|
};
|
|
7
42
|
export default {
|
|
8
|
-
container: container
|
|
43
|
+
container: container,
|
|
44
|
+
badge: badge,
|
|
45
|
+
inline: inline
|
|
9
46
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pingux/astro",
|
|
3
|
-
"version": "2.177.
|
|
3
|
+
"version": "2.177.6-alpha.0",
|
|
4
4
|
"description": "React component library for Ping Identity's design system",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"globals": "^13.19.0",
|
|
112
112
|
"listbox-layout": "npm:@react-stately/layout@3.9.0",
|
|
113
113
|
"listbox-virtualizer": "npm:@react-aria/virtualizer@3.6.0",
|
|
114
|
-
"lodash": "^4.17.
|
|
114
|
+
"lodash": "^4.17.23",
|
|
115
115
|
"markdown-to-jsx": "^7.7.4",
|
|
116
116
|
"moment": "^2.29.4",
|
|
117
117
|
"monaco-editor": "0.34.1",
|