@pingux/astro 2.177.5-alpha.0 → 2.177.7-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.
Files changed (29) hide show
  1. package/lib/cjs/components/Label/Label.styles.js +7 -3
  2. package/lib/cjs/components/TooltipTrigger/Tooltip.js +1 -2
  3. package/lib/cjs/components/TooltipTrigger/Tooltip.styles.js +2 -5
  4. package/lib/cjs/components/TooltipTrigger/TooltipTrigger.stories.js +26 -7
  5. package/lib/cjs/libs/astro/src/styles/themeOverrides/nextGenDarkMode/variants/buttons.d.ts +20 -0
  6. package/lib/cjs/libs/astro/src/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +3 -0
  7. package/lib/cjs/libs/astro/src/styles/themes/next-gen/next-gen.d.ts +75 -1
  8. package/lib/cjs/libs/astro/src/styles/themes/next-gen/variants/button.d.ts +32 -0
  9. package/lib/cjs/libs/astro/src/styles/themes/next-gen/variants/popoverMenu.d.ts +17 -1
  10. package/lib/cjs/libs/astro/src/styles/themes/next-gen/variants/tooltip.d.ts +26 -0
  11. package/lib/cjs/libs/astro/src/styles/themes/next-gen/variants/variants.d.ts +43 -1
  12. package/lib/cjs/libs/astro/tsconfig.lib.tsbuildinfo +1 -1
  13. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +11 -1
  14. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +4 -1
  15. package/lib/cjs/styles/themes/next-gen/text.js +1 -1
  16. package/lib/cjs/styles/themes/next-gen/variants/button.js +11 -1
  17. package/lib/cjs/styles/themes/next-gen/variants/popoverMenu.js +18 -1
  18. package/lib/cjs/styles/themes/next-gen/variants/tooltip.js +41 -4
  19. package/lib/components/Label/Label.styles.js +7 -3
  20. package/lib/components/TooltipTrigger/Tooltip.js +1 -2
  21. package/lib/components/TooltipTrigger/Tooltip.styles.js +2 -5
  22. package/lib/components/TooltipTrigger/TooltipTrigger.stories.js +26 -7
  23. package/lib/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +11 -1
  24. package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +4 -1
  25. package/lib/styles/themes/next-gen/text.js +1 -1
  26. package/lib/styles/themes/next-gen/variants/button.js +11 -1
  27. package/lib/styles/themes/next-gen/variants/popoverMenu.js +18 -1
  28. package/lib/styles/themes/next-gen/variants/tooltip.js +41 -4
  29. package/package.json +2 -2
@@ -27,6 +27,8 @@ var label = exports.label = _objectSpread(_objectSpread({}, _Text.text.label), {
27
27
  display: 'block',
28
28
  mb: 'xs',
29
29
  alignItems: 'center',
30
+ // added to override text-transform from being set to uppercase when used with ui-library
31
+ textTransform: 'inherit',
30
32
  '&.is-float-label': {
31
33
  textOverflow: 'ellipsis',
32
34
  display: 'flex',
@@ -55,7 +57,6 @@ var label = exports.label = _objectSpread(_objectSpread({}, _Text.text.label), {
55
57
  });
56
58
 
57
59
  // Variants below
58
-
59
60
  label.indicator = {
60
61
  color: 'critical.bright',
61
62
  ml: 5
@@ -63,7 +64,8 @@ label.indicator = {
63
64
  label.radio = _objectSpread(_objectSpread({}, _Text.text.base), {}, {
64
65
  cursor: 'pointer',
65
66
  alignItems: 'center',
66
- mb: 'xs'
67
+ mb: 'xs',
68
+ textTransform: 'inherit'
67
69
  });
68
70
 
69
71
  // NOTE: ThemeUI label adds 'flex' after other styles, so we have to use !important to override it
@@ -75,11 +77,13 @@ label.checkbox = _objectSpread(_objectSpread({}, _Text.text.base), {}, {
75
77
  width: 'max-content',
76
78
  alignItems: 'center',
77
79
  cursor: 'pointer',
80
+ textTransform: 'inherit',
78
81
  '&.is-disabled': {
79
82
  opacity: '1',
80
83
  color: 'rgba(37, 55, 70, 0.5)'
81
84
  }
82
85
  });
83
86
  label.radioGroup = _objectSpread(_objectSpread({}, label), {}, {
84
- fontWeight: 1
87
+ fontWeight: 1,
88
+ textTransform: 'inherit'
85
89
  });
@@ -28,8 +28,7 @@ var Tooltip = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
28
28
  var tooltipRef = (0, _hooks.useLocalOrForwardRef)(ref);
29
29
  return (0, _react2.jsx)(_Text["default"], (0, _extends2["default"])({
30
30
  ref: tooltipRef,
31
- variant: "variants.tooltip.container",
32
- p: "sm"
31
+ variant: "variants.tooltip.container"
33
32
  }, tooltipProps, others), children);
34
33
  });
35
34
  var _default = exports["default"] = Tooltip;
@@ -23,6 +23,7 @@ var container = exports.container = {
23
23
  overflow: 'visible',
24
24
  wordBreak: 'break-word',
25
25
  display: 'flex',
26
+ p: 'sm',
26
27
  '.is-right > * > &, .is-left > * > &': {
27
28
  maxWidth: '24em',
28
29
  maxHeight: '6.5em',
@@ -44,11 +45,7 @@ var badge = _objectSpread(_objectSpread({}, _Badge.baseBadge), {}, {
44
45
  var button = exports.button = {
45
46
  cursor: 'default',
46
47
  '&.is-hovered, &.is-pressed': {
47
- backgroundColor: 'inherit',
48
- cursor: 'default',
49
- path: {
50
- fill: 'neutral.20'
51
- }
48
+ cursor: 'default'
52
49
  }
53
50
  };
54
51
  var inline = _objectSpread(_objectSpread({}, _Buttons.text), {}, {
@@ -6,11 +6,14 @@ _Object$defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.withDirectionProp = exports.withDelayProp = exports.withArrowCrossOffsetProp = exports.withAlignProp = exports.isOpen = exports["default"] = exports.customWidth = exports.TextWithTooltip = exports.IconWithTooltip = exports.Disabled = exports.Default = exports.BadgeWithTooltip = void 0;
9
+ var _reverse = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/reverse"));
9
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
10
11
  var _react = _interopRequireDefault(require("react"));
11
- var _AccountIcon = _interopRequireDefault(require("@pingux/mdi-react/AccountIcon"));
12
+ var _AccountOutlineIcon = _interopRequireDefault(require("@pingux/mdi-react/AccountOutlineIcon"));
12
13
  var _EarthIcon = _interopRequireDefault(require("@pingux/mdi-react/EarthIcon"));
14
+ var _onyxTokens = require("@pingux/onyx-tokens");
13
15
  var _storybookDocsLayout = _interopRequireDefault(require("../../../.storybook/storybookDocsLayout"));
16
+ var _hooks = require("../../hooks");
14
17
  var _index = require("../../index");
15
18
  var _figmaLinks = require("../../utils/designUtils/figmaLinks");
16
19
  var _TooltipTrigger = _interopRequireDefault(require("./TooltipTrigger.mdx"));
@@ -66,25 +69,41 @@ var IconWithTooltip = exports.IconWithTooltip = function IconWithTooltip(args) {
66
69
  }, (0, _react2.jsx)(_index.TooltipTrigger, args, (0, _react2.jsx)(_index.IconButton, {
67
70
  variant: "tooltip.button"
68
71
  }, (0, _react2.jsx)(_index.Icon, {
69
- icon: _AccountIcon["default"],
72
+ icon: _AccountOutlineIcon["default"],
70
73
  title: {
71
74
  name: 'Account Icon'
72
75
  }
73
76
  })), (0, _react2.jsx)(_index.Tooltip, null, "Useful tooltip")));
74
77
  };
75
78
  var BadgeWithTooltip = exports.BadgeWithTooltip = function BadgeWithTooltip(args) {
79
+ var _useGetTheme = (0, _hooks.useGetTheme)(),
80
+ _useGetTheme$themeSta = _useGetTheme.themeState,
81
+ isAstro = _useGetTheme$themeSta.isAstro,
82
+ isOnyxDark = _useGetTheme$themeSta.isOnyxDark;
83
+ var getBackground = function getBackground() {
84
+ if (isAstro) {
85
+ return 'neutral.10';
86
+ }
87
+ return isOnyxDark ? _onyxTokens.astroTokens.color.gray.light : _onyxTokens.astroTokens.color.gray.dark;
88
+ };
89
+ var getTextColor = function getTextColor() {
90
+ if (isAstro) {
91
+ return 'white';
92
+ }
93
+ return isOnyxDark ? (0, _reverse["default"])(_onyxTokens.astroTokensDark.color.font) : (0, _reverse["default"])(_onyxTokens.astroTokens.color.font);
94
+ };
76
95
  return (0, _react2.jsx)(_index.Box, {
77
96
  pl: 50
78
97
  }, (0, _react2.jsx)(_index.TooltipTrigger, args, (0, _react2.jsx)(_index.Button, {
79
98
  variant: "variants.tooltip.badge",
80
- bg: "neutral.10"
99
+ bg: getBackground()
81
100
  }, (0, _react2.jsx)(_index.Text, {
82
101
  variant: "label",
83
- sx: {
102
+ sx: isAstro ? {
84
103
  textTransform: 'uppercase'
85
- },
86
- color: "white"
87
- }, "Some text")), (0, _react2.jsx)(_index.Tooltip, {
104
+ } : {},
105
+ color: getTextColor()
106
+ }, "Some Text")), (0, _react2.jsx)(_index.Tooltip, {
88
107
  variant: "variants.tooltip.badgeTooltipContainer"
89
108
  }, "Useful tooltip")));
90
109
  };
@@ -318,6 +318,26 @@ declare const buttons: {
318
318
  };
319
319
  };
320
320
  };
321
+ tooltip: {
322
+ button: {
323
+ '&.is-hovered': {
324
+ path: {
325
+ fill: string;
326
+ };
327
+ backgroundColor: string;
328
+ };
329
+ path: {
330
+ fill: string;
331
+ };
332
+ '&.is-pressed': {
333
+ backgroundColor: string;
334
+ borderColor: string;
335
+ path: {
336
+ fill: string;
337
+ };
338
+ };
339
+ };
340
+ };
321
341
  };
322
342
  searchNavTabLabel: {
323
343
  color: string;
@@ -577,6 +577,9 @@ declare const _default: {
577
577
  tooltip: {
578
578
  inline: {
579
579
  color: string;
580
+ '&.is-hovered': {
581
+ color: string;
582
+ };
580
583
  };
581
584
  };
582
585
  popoverMenu: {
@@ -1615,6 +1615,38 @@ declare const _default: {
1615
1615
  boxShadow: string;
1616
1616
  alignSelf: string;
1617
1617
  };
1618
+ tooltip: {
1619
+ button: {
1620
+ '&.is-hovered': {
1621
+ path: {
1622
+ fill: string;
1623
+ };
1624
+ backgroundColor: string;
1625
+ };
1626
+ path: {
1627
+ fill: string;
1628
+ };
1629
+ '&.is-pressed': {
1630
+ backgroundColor: string;
1631
+ path: {
1632
+ fill: string;
1633
+ };
1634
+ };
1635
+ '&.is-focused': {
1636
+ outline: string;
1637
+ outlineColor: string;
1638
+ outlineOffset: string;
1639
+ };
1640
+ p: string;
1641
+ transition: string;
1642
+ outline: string;
1643
+ borderRadius: string;
1644
+ border: string;
1645
+ cursor: string;
1646
+ boxShadow: string;
1647
+ alignSelf: string;
1648
+ };
1649
+ };
1618
1650
  };
1619
1651
  modalCloseButton: {
1620
1652
  path: {
@@ -5943,7 +5975,6 @@ declare const _default: {
5943
5975
  };
5944
5976
  popoverMenu: {
5945
5977
  container: {
5946
- minWidth: string;
5947
5978
  transition: string;
5948
5979
  '&.animate': {
5949
5980
  opacity: number;
@@ -5951,6 +5982,23 @@ declare const _default: {
5951
5982
  '&.animate.is-mounted.is-transitioning': {
5952
5983
  opacity: string;
5953
5984
  };
5985
+ '&.is-dark-mode': {
5986
+ color: string;
5987
+ alignItems: string;
5988
+ bg: string;
5989
+ '&[data-popover-placement^=top] > [data-popover-arrow="arrow"]:before': {
5990
+ borderTopColor: string;
5991
+ };
5992
+ '&[data-popover-placement^=bottom] > [data-popover-arrow="arrow"]:before': {
5993
+ borderBottomColor: string;
5994
+ };
5995
+ '&[data-popover-placement^=left] > [data-popover-arrow="arrow"]:before': {
5996
+ borderLeftColor: string;
5997
+ };
5998
+ '&[data-popover-placement^=right] > [data-popover-arrow="arrow"]:before': {
5999
+ borderRightColor: string;
6000
+ };
6001
+ };
5954
6002
  };
5955
6003
  arrow: {
5956
6004
  color: string;
@@ -6674,6 +6722,32 @@ declare const _default: {
6674
6722
  borderRadius: string;
6675
6723
  fontSize: string;
6676
6724
  fontFamily: string;
6725
+ lineHeight: string;
6726
+ p: string;
6727
+ px: string;
6728
+ py: string;
6729
+ };
6730
+ badge: {
6731
+ borderRadius: string;
6732
+ position: string;
6733
+ '&.is-focused:before': {
6734
+ position: string;
6735
+ content: string;
6736
+ width: string;
6737
+ height: string;
6738
+ padding: string;
6739
+ borderRadius: string;
6740
+ border: string;
6741
+ borderColor: string;
6742
+ };
6743
+ };
6744
+ inline: {
6745
+ color: string;
6746
+ '&.is-focused': {
6747
+ outline: string;
6748
+ outlineColor: string;
6749
+ outlineOffset: string;
6750
+ };
6677
6751
  };
6678
6752
  };
6679
6753
  };
@@ -1316,6 +1316,38 @@ declare const buttons: {
1316
1316
  boxShadow: string;
1317
1317
  alignSelf: string;
1318
1318
  };
1319
+ tooltip: {
1320
+ button: {
1321
+ '&.is-hovered': {
1322
+ path: {
1323
+ fill: string;
1324
+ };
1325
+ backgroundColor: string;
1326
+ };
1327
+ path: {
1328
+ fill: string;
1329
+ };
1330
+ '&.is-pressed': {
1331
+ backgroundColor: string;
1332
+ path: {
1333
+ fill: string;
1334
+ };
1335
+ };
1336
+ '&.is-focused': {
1337
+ outline: string;
1338
+ outlineColor: string;
1339
+ outlineOffset: string;
1340
+ };
1341
+ p: string;
1342
+ transition: string;
1343
+ outline: string;
1344
+ borderRadius: string;
1345
+ border: string;
1346
+ cursor: string;
1347
+ boxShadow: string;
1348
+ alignSelf: string;
1349
+ };
1350
+ };
1319
1351
  };
1320
1352
  modalCloseButton: {
1321
1353
  path: {
@@ -1,6 +1,5 @@
1
1
  declare const _default: {
2
2
  container: {
3
- minWidth: string;
4
3
  transition: string;
5
4
  '&.animate': {
6
5
  opacity: number;
@@ -8,6 +7,23 @@ declare const _default: {
8
7
  '&.animate.is-mounted.is-transitioning': {
9
8
  opacity: string;
10
9
  };
10
+ '&.is-dark-mode': {
11
+ color: string;
12
+ alignItems: string;
13
+ bg: string;
14
+ '&[data-popover-placement^=top] > [data-popover-arrow="arrow"]:before': {
15
+ borderTopColor: string;
16
+ };
17
+ '&[data-popover-placement^=bottom] > [data-popover-arrow="arrow"]:before': {
18
+ borderBottomColor: string;
19
+ };
20
+ '&[data-popover-placement^=left] > [data-popover-arrow="arrow"]:before': {
21
+ borderLeftColor: string;
22
+ };
23
+ '&[data-popover-placement^=right] > [data-popover-arrow="arrow"]:before': {
24
+ borderRightColor: string;
25
+ };
26
+ };
11
27
  };
12
28
  arrow: {
13
29
  color: string;
@@ -4,6 +4,32 @@ declare const _default: {
4
4
  borderRadius: string;
5
5
  fontSize: string;
6
6
  fontFamily: string;
7
+ lineHeight: string;
8
+ p: string;
9
+ px: string;
10
+ py: string;
11
+ };
12
+ badge: {
13
+ borderRadius: string;
14
+ position: string;
15
+ '&.is-focused:before': {
16
+ position: string;
17
+ content: string;
18
+ width: string;
19
+ height: string;
20
+ padding: string;
21
+ borderRadius: string;
22
+ border: string;
23
+ borderColor: string;
24
+ };
25
+ };
26
+ inline: {
27
+ color: string;
28
+ '&.is-focused': {
29
+ outline: string;
30
+ outlineColor: string;
31
+ outlineOffset: string;
32
+ };
7
33
  };
8
34
  };
9
35
  export default _default;
@@ -1391,7 +1391,6 @@ declare const _default: {
1391
1391
  };
1392
1392
  popoverMenu: {
1393
1393
  container: {
1394
- minWidth: string;
1395
1394
  transition: string;
1396
1395
  '&.animate': {
1397
1396
  opacity: number;
@@ -1399,6 +1398,23 @@ declare const _default: {
1399
1398
  '&.animate.is-mounted.is-transitioning': {
1400
1399
  opacity: string;
1401
1400
  };
1401
+ '&.is-dark-mode': {
1402
+ color: string;
1403
+ alignItems: string;
1404
+ bg: string;
1405
+ '&[data-popover-placement^=top] > [data-popover-arrow="arrow"]:before': {
1406
+ borderTopColor: string;
1407
+ };
1408
+ '&[data-popover-placement^=bottom] > [data-popover-arrow="arrow"]:before': {
1409
+ borderBottomColor: string;
1410
+ };
1411
+ '&[data-popover-placement^=left] > [data-popover-arrow="arrow"]:before': {
1412
+ borderLeftColor: string;
1413
+ };
1414
+ '&[data-popover-placement^=right] > [data-popover-arrow="arrow"]:before': {
1415
+ borderRightColor: string;
1416
+ };
1417
+ };
1402
1418
  };
1403
1419
  arrow: {
1404
1420
  color: string;
@@ -2122,6 +2138,32 @@ declare const _default: {
2122
2138
  borderRadius: string;
2123
2139
  fontSize: string;
2124
2140
  fontFamily: string;
2141
+ lineHeight: string;
2142
+ p: string;
2143
+ px: string;
2144
+ py: string;
2145
+ };
2146
+ badge: {
2147
+ borderRadius: string;
2148
+ position: string;
2149
+ '&.is-focused:before': {
2150
+ position: string;
2151
+ content: string;
2152
+ width: string;
2153
+ height: string;
2154
+ padding: string;
2155
+ borderRadius: string;
2156
+ border: string;
2157
+ borderColor: string;
2158
+ };
2159
+ };
2160
+ inline: {
2161
+ color: string;
2162
+ '&.is-focused': {
2163
+ outline: string;
2164
+ outlineColor: string;
2165
+ outlineOffset: string;
2166
+ };
2125
2167
  };
2126
2168
  };
2127
2169
  };