@pingux/astro 1.0.0-alpha.20 → 1.0.0-alpha.21
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 +11 -0
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.stories.js +45 -2
- package/lib/cjs/styles/variants/boxes.js +2 -1
- package/lib/cjs/styles/variants/buttons.js +36 -1
- package/lib/components/TooltipTrigger/TooltipTrigger.stories.js +33 -1
- package/lib/styles/variants/boxes.js +1 -1
- package/lib/styles/variants/buttons.js +35 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,17 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
# [1.0.0-alpha.21](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.0.0-alpha.20...@pingux/astro@1.0.0-alpha.21) (2022-01-18)
|
7
|
+
|
8
|
+
|
9
|
+
### Features
|
10
|
+
|
11
|
+
* [UIP-5066] Add Icon, Chip, and Text with Tooltips ([1681083](https://gitlab.corp.pingidentity.com/ux/pingux/commit/168108386d77ef09635a177a35cb6d68cfad8bc2))
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
6
17
|
# [1.0.0-alpha.20](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.0.0-alpha.19...@pingux/astro@1.0.0-alpha.20) (2022-01-17)
|
7
18
|
|
8
19
|
**Note:** Version bump only for package @pingux/astro
|
@@ -8,16 +8,20 @@ _Object$defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
9
9
|
});
|
10
10
|
|
11
|
-
exports.Disabled = exports.isOpen = exports.withDelayProp = exports.withDirectionProp = exports.withAlignProp = exports.Default = exports["default"] = void 0;
|
11
|
+
exports.TextWithTooltip = exports.ChipWithTooltip = exports.IconWithTooltip = exports.Disabled = exports.isOpen = exports.withDelayProp = exports.withDirectionProp = exports.withAlignProp = exports.Default = exports["default"] = void 0;
|
12
12
|
|
13
13
|
var _react = _interopRequireDefault(require("react"));
|
14
14
|
|
15
15
|
var _EarthIcon = _interopRequireDefault(require("mdi-react/EarthIcon"));
|
16
16
|
|
17
|
+
var _PersonIcon = _interopRequireDefault(require("mdi-react/PersonIcon"));
|
18
|
+
|
17
19
|
var _index = require("../../index");
|
18
20
|
|
19
21
|
var _IconButton = _interopRequireDefault(require("../IconButton"));
|
20
22
|
|
23
|
+
var _Text = _interopRequireDefault(require("../Text"));
|
24
|
+
|
21
25
|
var _react2 = require("@emotion/react");
|
22
26
|
|
23
27
|
var _default = {
|
@@ -80,4 +84,43 @@ Disabled.parameters = {
|
|
80
84
|
story: 'The tooltip can be disabled without disabling the button press events.'
|
81
85
|
}
|
82
86
|
}
|
83
|
-
};
|
87
|
+
};
|
88
|
+
|
89
|
+
var IconWithTooltip = function IconWithTooltip() {
|
90
|
+
return (0, _react2.jsx)(_index.Box, {
|
91
|
+
pl: 50
|
92
|
+
}, (0, _react2.jsx)(_index.TooltipTrigger, null, (0, _react2.jsx)(_IconButton["default"], {
|
93
|
+
variant: "tooltipIconButton"
|
94
|
+
}, (0, _react2.jsx)(_index.Icon, {
|
95
|
+
icon: _PersonIcon["default"]
|
96
|
+
})), (0, _react2.jsx)(_index.Tooltip, null, "Useful tooltip")));
|
97
|
+
};
|
98
|
+
|
99
|
+
exports.IconWithTooltip = IconWithTooltip;
|
100
|
+
|
101
|
+
var ChipWithTooltip = function ChipWithTooltip() {
|
102
|
+
return (0, _react2.jsx)(_index.Box, {
|
103
|
+
pl: 50
|
104
|
+
}, (0, _react2.jsx)(_index.TooltipTrigger, null, (0, _react2.jsx)(_index.Button, {
|
105
|
+
variant: "tooltipChip",
|
106
|
+
bg: "neutral.10"
|
107
|
+
}, (0, _react2.jsx)(_Text["default"], {
|
108
|
+
variant: "label",
|
109
|
+
sx: {
|
110
|
+
textTransform: 'uppercase'
|
111
|
+
},
|
112
|
+
color: "white"
|
113
|
+
}, "Some text")), (0, _react2.jsx)(_index.Tooltip, null, "Useful tooltip")));
|
114
|
+
};
|
115
|
+
|
116
|
+
exports.ChipWithTooltip = ChipWithTooltip;
|
117
|
+
|
118
|
+
var TextWithTooltip = function TextWithTooltip() {
|
119
|
+
return (0, _react2.jsx)(_index.Box, {
|
120
|
+
pl: 50
|
121
|
+
}, (0, _react2.jsx)(_index.TooltipTrigger, null, (0, _react2.jsx)(_index.Button, {
|
122
|
+
variant: "tooltipInline"
|
123
|
+
}, "Some text"), (0, _react2.jsx)(_index.Tooltip, null, "Useful tooltip")));
|
124
|
+
};
|
125
|
+
|
126
|
+
exports.TextWithTooltip = TextWithTooltip;
|
@@ -8,7 +8,7 @@ _Object$defineProperty2(exports, "__esModule", {
|
|
8
8
|
value: true
|
9
9
|
});
|
10
10
|
|
11
|
-
exports["default"] = void 0;
|
11
|
+
exports["default"] = exports.chip = void 0;
|
12
12
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/define-property"));
|
14
14
|
|
@@ -131,6 +131,7 @@ var chip = {
|
|
131
131
|
}
|
132
132
|
}
|
133
133
|
};
|
134
|
+
exports.chip = chip;
|
134
135
|
var inputInContainerSlot = {
|
135
136
|
position: 'absolute',
|
136
137
|
bg: 'transparent',
|
@@ -32,6 +32,8 @@ var _text = require("./text");
|
|
32
32
|
|
33
33
|
var _colors = require("../colors");
|
34
34
|
|
35
|
+
var _boxes = require("./boxes");
|
36
|
+
|
35
37
|
function ownKeys(object, enumerableOnly) { var keys = (0, _keys["default"])(object); if (_getOwnPropertySymbols["default"]) { var symbols = (0, _getOwnPropertySymbols["default"])(object); if (enumerableOnly) symbols = (0, _filter["default"])(symbols).call(symbols, function (sym) { return (0, _getOwnPropertyDescriptor["default"])(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
36
38
|
|
37
39
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context; (0, _forEach["default"])(_context = ownKeys(Object(source), true)).call(_context, function (key) { (0, _defineProperty3["default"])(target, key, source[key]); }); } else if (_getOwnPropertyDescriptors["default"]) { (0, _defineProperties["default"])(target, (0, _getOwnPropertyDescriptors["default"])(source)); } else { var _context2; (0, _forEach["default"])(_context2 = ownKeys(Object(source))).call(_context2, function (key) { (0, _defineProperty2["default"])(target, key, (0, _getOwnPropertyDescriptor["default"])(source, key)); }); } } return target; }
|
@@ -467,6 +469,36 @@ var fileInputField = {
|
|
467
469
|
boxShadow: 'focus'
|
468
470
|
}
|
469
471
|
};
|
472
|
+
|
473
|
+
var tooltipChip = _objectSpread(_objectSpread({}, _boxes.chip), {}, {
|
474
|
+
cursor: 'default',
|
475
|
+
'&.is-hovered, &.is-pressed': {
|
476
|
+
cursor: 'default',
|
477
|
+
outline: 'none'
|
478
|
+
}
|
479
|
+
});
|
480
|
+
|
481
|
+
var tooltipIconButton = _objectSpread(_objectSpread({}, iconButton), {}, {
|
482
|
+
cursor: 'default',
|
483
|
+
'&.is-hovered, &.is-pressed': {
|
484
|
+
backgroundColor: 'inherit',
|
485
|
+
cursor: 'default',
|
486
|
+
path: {
|
487
|
+
fill: 'neutral.20'
|
488
|
+
}
|
489
|
+
}
|
490
|
+
});
|
491
|
+
|
492
|
+
var tooltipInline = _objectSpread(_objectSpread({}, text), {}, {
|
493
|
+
cursor: 'default',
|
494
|
+
alignSelf: 'flex-start',
|
495
|
+
'&.is-hovered, &.is-pressed': {
|
496
|
+
backgroundColor: 'inherit',
|
497
|
+
cursor: 'default',
|
498
|
+
textDecoration: 'inherit'
|
499
|
+
}
|
500
|
+
});
|
501
|
+
|
470
502
|
var _default = {
|
471
503
|
accordionHeader: accordionHeader,
|
472
504
|
chipDeleteButton: chipDeleteButton,
|
@@ -499,6 +531,9 @@ var _default = {
|
|
499
531
|
helpHint: helpHint,
|
500
532
|
modalCloseButton: modalCloseButton,
|
501
533
|
applicationPortalPinned: applicationPortalPinned,
|
502
|
-
applicationPortal: applicationPortal
|
534
|
+
applicationPortal: applicationPortal,
|
535
|
+
tooltipChip: tooltipChip,
|
536
|
+
tooltipIconButton: tooltipIconButton,
|
537
|
+
tooltipInline: tooltipInline
|
503
538
|
};
|
504
539
|
exports["default"] = _default;
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import Earth from 'mdi-react/EarthIcon';
|
3
|
-
import
|
3
|
+
import PersonIcon from 'mdi-react/PersonIcon';
|
4
|
+
import { Box, Button, Icon, Tooltip, TooltipTrigger } from '../../index';
|
4
5
|
import IconButton from '../IconButton';
|
6
|
+
import Text from '../Text';
|
5
7
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
6
8
|
export default {
|
7
9
|
title: 'TooltipTrigger',
|
@@ -44,4 +46,34 @@ Disabled.parameters = {
|
|
44
46
|
story: 'The tooltip can be disabled without disabling the button press events.'
|
45
47
|
}
|
46
48
|
}
|
49
|
+
};
|
50
|
+
export var IconWithTooltip = function IconWithTooltip() {
|
51
|
+
return ___EmotionJSX(Box, {
|
52
|
+
pl: 50
|
53
|
+
}, ___EmotionJSX(TooltipTrigger, null, ___EmotionJSX(IconButton, {
|
54
|
+
variant: "tooltipIconButton"
|
55
|
+
}, ___EmotionJSX(Icon, {
|
56
|
+
icon: PersonIcon
|
57
|
+
})), ___EmotionJSX(Tooltip, null, "Useful tooltip")));
|
58
|
+
};
|
59
|
+
export var ChipWithTooltip = function ChipWithTooltip() {
|
60
|
+
return ___EmotionJSX(Box, {
|
61
|
+
pl: 50
|
62
|
+
}, ___EmotionJSX(TooltipTrigger, null, ___EmotionJSX(Button, {
|
63
|
+
variant: "tooltipChip",
|
64
|
+
bg: "neutral.10"
|
65
|
+
}, ___EmotionJSX(Text, {
|
66
|
+
variant: "label",
|
67
|
+
sx: {
|
68
|
+
textTransform: 'uppercase'
|
69
|
+
},
|
70
|
+
color: "white"
|
71
|
+
}, "Some text")), ___EmotionJSX(Tooltip, null, "Useful tooltip")));
|
72
|
+
};
|
73
|
+
export var TextWithTooltip = function TextWithTooltip() {
|
74
|
+
return ___EmotionJSX(Box, {
|
75
|
+
pl: 50
|
76
|
+
}, ___EmotionJSX(TooltipTrigger, null, ___EmotionJSX(Button, {
|
77
|
+
variant: "tooltipInline"
|
78
|
+
}, "Some text"), ___EmotionJSX(Tooltip, null, "Useful tooltip")));
|
47
79
|
};
|
@@ -14,6 +14,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
14
14
|
|
15
15
|
import { text as textVariants } from './text';
|
16
16
|
import { neutral } from '../colors';
|
17
|
+
import { chip } from './boxes';
|
17
18
|
|
18
19
|
var base = _objectSpread({
|
19
20
|
cursor: 'pointer',
|
@@ -446,6 +447,36 @@ var fileInputField = {
|
|
446
447
|
boxShadow: 'focus'
|
447
448
|
}
|
448
449
|
};
|
450
|
+
|
451
|
+
var tooltipChip = _objectSpread(_objectSpread({}, chip), {}, {
|
452
|
+
cursor: 'default',
|
453
|
+
'&.is-hovered, &.is-pressed': {
|
454
|
+
cursor: 'default',
|
455
|
+
outline: 'none'
|
456
|
+
}
|
457
|
+
});
|
458
|
+
|
459
|
+
var tooltipIconButton = _objectSpread(_objectSpread({}, iconButton), {}, {
|
460
|
+
cursor: 'default',
|
461
|
+
'&.is-hovered, &.is-pressed': {
|
462
|
+
backgroundColor: 'inherit',
|
463
|
+
cursor: 'default',
|
464
|
+
path: {
|
465
|
+
fill: 'neutral.20'
|
466
|
+
}
|
467
|
+
}
|
468
|
+
});
|
469
|
+
|
470
|
+
var tooltipInline = _objectSpread(_objectSpread({}, text), {}, {
|
471
|
+
cursor: 'default',
|
472
|
+
alignSelf: 'flex-start',
|
473
|
+
'&.is-hovered, &.is-pressed': {
|
474
|
+
backgroundColor: 'inherit',
|
475
|
+
cursor: 'default',
|
476
|
+
textDecoration: 'inherit'
|
477
|
+
}
|
478
|
+
});
|
479
|
+
|
449
480
|
export default {
|
450
481
|
accordionHeader: accordionHeader,
|
451
482
|
chipDeleteButton: chipDeleteButton,
|
@@ -478,5 +509,8 @@ export default {
|
|
478
509
|
helpHint: helpHint,
|
479
510
|
modalCloseButton: modalCloseButton,
|
480
511
|
applicationPortalPinned: applicationPortalPinned,
|
481
|
-
applicationPortal: applicationPortal
|
512
|
+
applicationPortal: applicationPortal,
|
513
|
+
tooltipChip: tooltipChip,
|
514
|
+
tooltipIconButton: tooltipIconButton,
|
515
|
+
tooltipInline: tooltipInline
|
482
516
|
};
|