@pingux/astro 1.5.0-alpha.2 → 1.5.1-alpha.1

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 CHANGED
@@ -3,6 +3,23 @@
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.5.0](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.4.1...@pingux/astro@1.5.0) (2022-03-22)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * [UIP-5282] Code View discrepancies ([9e483b1](https://gitlab.corp.pingidentity.com/ux/pingux/commit/9e483b1078cc47a21c40fce1d256230dc6d57d65))
12
+
13
+
14
+ ### Features
15
+
16
+ * [UIP-5162] Add MultiselectFilter component ([b624104](https://gitlab.corp.pingidentity.com/ux/pingux/commit/b624104fe17352d7975498378bc605562698916a))
17
+ * [UIP-5163] Tab with Popover menu ([2334558](https://gitlab.corp.pingidentity.com/ux/pingux/commit/23345584dfd0bcc40700cb9925fa908002388de2))
18
+
19
+
20
+
21
+
22
+
6
23
  ## [1.4.1](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.4.0...@pingux/astro@1.4.1) (2022-03-18)
7
24
 
8
25
  **Note:** Version bump only for package @pingux/astro
@@ -80,6 +80,7 @@ var TextAreaField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
80
80
 
81
81
  var textAreaRef = (0, _react.useRef)();
82
82
  var labelRef = (0, _react.useRef)();
83
+ var labelWrapperRef = (0, _react.useRef)();
83
84
  var containerRef = (0, _react.useRef)();
84
85
  var inputContainerRef = (0, _react.useRef)();
85
86
  var slotContainer = (0, _react.useRef)();
@@ -94,6 +95,7 @@ var TextAreaField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
94
95
  var resizeFloatLabel = function resizeFloatLabel() {
95
96
  /* istanbul ignore next */
96
97
  labelRef.current.style.width = textAreaRef.current.style.width;
98
+ labelWrapperRef.current.style.width = "".concat(textAreaRef.current.clientWidth - 2, "px");
97
99
  };
98
100
  /* istanbul ignore next */
99
101
 
@@ -134,19 +136,24 @@ var TextAreaField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
134
136
  thisRef.removeEventListener('mousemove', props.resizeCallback ? props.resizeCallback : resizeFloatLabel);
135
137
  };
136
138
  }, [props.isUnresizable, props.labelMode, props.resizeCallback]);
139
+ var labelNode = (0, _react2.jsx)(_Label["default"], (0, _extends2["default"])({
140
+ ref: labelRef
141
+ }, fieldLabelProps, {
142
+ sx: isLabelHigher && {
143
+ gridRow: '1/5'
144
+ }
145
+ }));
146
+ var wrappedLabel = (0, _react2.jsx)(_Box["default"], {
147
+ variant: "boxes.floatLabelWrapper",
148
+ ref: labelWrapperRef
149
+ }, labelNode);
137
150
  return (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({
138
151
  variant: "forms.input.wrapper"
139
152
  }, fieldContainerProps, {
140
153
  sx: _objectSpread(_objectSpread({}, columnStyleProps === null || columnStyleProps === void 0 ? void 0 : columnStyleProps.sx), fieldContainerProps === null || fieldContainerProps === void 0 ? void 0 : fieldContainerProps.sx),
141
154
  ref: containerRef,
142
155
  maxWidth: "100%"
143
- }), (0, _react2.jsx)(_Label["default"], (0, _extends2["default"])({
144
- ref: labelRef
145
- }, fieldLabelProps, {
146
- sx: isLabelHigher && {
147
- gridRow: '1/5'
148
- }
149
- })), (0, _react2.jsx)(_Box["default"], {
156
+ }), props.labelMode === 'float' ? wrappedLabel : labelNode, (0, _react2.jsx)(_Box["default"], {
150
157
  isRow: true,
151
158
  variant: "forms.input.container",
152
159
  className: fieldControlProps.className,
@@ -299,6 +299,14 @@ var fileInputFieldWrapper = {
299
299
  alignItems: 'center'
300
300
  }
301
301
  };
302
+ var floatLabelWrapper = {
303
+ backgroundColor: 'white',
304
+ position: 'relative',
305
+ height: '17px',
306
+ bottom: '-18px',
307
+ left: '3px',
308
+ zIndex: 2
309
+ };
302
310
  var _default = {
303
311
  base: base,
304
312
  card: card,
@@ -317,6 +325,7 @@ var _default = {
317
325
  radioContainer: radioContainer,
318
326
  scrollbox: scrollbox,
319
327
  topShadowScrollbox: topShadowScrollbox,
320
- bottomShadowScrollbox: bottomShadowScrollbox
328
+ bottomShadowScrollbox: bottomShadowScrollbox,
329
+ floatLabelWrapper: floatLabelWrapper
321
330
  };
322
331
  exports["default"] = _default;
@@ -47,6 +47,7 @@ var TextAreaField = /*#__PURE__*/forwardRef(function (props, ref) {
47
47
 
48
48
  var textAreaRef = useRef();
49
49
  var labelRef = useRef();
50
+ var labelWrapperRef = useRef();
50
51
  var containerRef = useRef();
51
52
  var inputContainerRef = useRef();
52
53
  var slotContainer = useRef();
@@ -61,6 +62,7 @@ var TextAreaField = /*#__PURE__*/forwardRef(function (props, ref) {
61
62
  var resizeFloatLabel = function resizeFloatLabel() {
62
63
  /* istanbul ignore next */
63
64
  labelRef.current.style.width = textAreaRef.current.style.width;
65
+ labelWrapperRef.current.style.width = "".concat(textAreaRef.current.clientWidth - 2, "px");
64
66
  };
65
67
  /* istanbul ignore next */
66
68
 
@@ -101,19 +103,27 @@ var TextAreaField = /*#__PURE__*/forwardRef(function (props, ref) {
101
103
  thisRef.removeEventListener('mousemove', props.resizeCallback ? props.resizeCallback : resizeFloatLabel);
102
104
  };
103
105
  }, [props.isUnresizable, props.labelMode, props.resizeCallback]);
106
+
107
+ var labelNode = ___EmotionJSX(Label, _extends({
108
+ ref: labelRef
109
+ }, fieldLabelProps, {
110
+ sx: isLabelHigher && {
111
+ gridRow: '1/5'
112
+ }
113
+ }));
114
+
115
+ var wrappedLabel = ___EmotionJSX(Box, {
116
+ variant: "boxes.floatLabelWrapper",
117
+ ref: labelWrapperRef
118
+ }, labelNode);
119
+
104
120
  return ___EmotionJSX(Box, _extends({
105
121
  variant: "forms.input.wrapper"
106
122
  }, fieldContainerProps, {
107
123
  sx: _objectSpread(_objectSpread({}, columnStyleProps === null || columnStyleProps === void 0 ? void 0 : columnStyleProps.sx), fieldContainerProps === null || fieldContainerProps === void 0 ? void 0 : fieldContainerProps.sx),
108
124
  ref: containerRef,
109
125
  maxWidth: "100%"
110
- }), ___EmotionJSX(Label, _extends({
111
- ref: labelRef
112
- }, fieldLabelProps, {
113
- sx: isLabelHigher && {
114
- gridRow: '1/5'
115
- }
116
- })), ___EmotionJSX(Box, {
126
+ }), props.labelMode === 'float' ? wrappedLabel : labelNode, ___EmotionJSX(Box, {
117
127
  isRow: true,
118
128
  variant: "forms.input.container",
119
129
  className: fieldControlProps.className,
@@ -277,6 +277,14 @@ var fileInputFieldWrapper = {
277
277
  alignItems: 'center'
278
278
  }
279
279
  };
280
+ var floatLabelWrapper = {
281
+ backgroundColor: 'white',
282
+ position: 'relative',
283
+ height: '17px',
284
+ bottom: '-18px',
285
+ left: '3px',
286
+ zIndex: 2
287
+ };
280
288
  export default {
281
289
  base: base,
282
290
  card: card,
@@ -295,5 +303,6 @@ export default {
295
303
  radioContainer: radioContainer,
296
304
  scrollbox: scrollbox,
297
305
  topShadowScrollbox: topShadowScrollbox,
298
- bottomShadowScrollbox: bottomShadowScrollbox
306
+ bottomShadowScrollbox: bottomShadowScrollbox,
307
+ floatLabelWrapper: floatLabelWrapper
299
308
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.5.0-alpha.2",
3
+ "version": "1.5.1-alpha.1",
4
4
  "description": "PingUX themeable React component library",
5
5
  "author": "ux-development@pingidentity.com",
6
6
  "license": "Apache-2.0",