@pingux/astro 1.10.0-alpha.3 → 1.10.0-alpha.4
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/SelectFieldBase/SelectFieldBase.test.js +2 -2
- package/lib/cjs/hooks/useField/useField.js +1 -1
- package/lib/cjs/hooks/useField/useField.test.js +1 -1
- package/lib/cjs/styles/forms/label.js +1 -1
- package/lib/components/SelectFieldBase/SelectFieldBase.test.js +2 -2
- package/lib/hooks/useField/useField.js +1 -1
- package/lib/hooks/useField/useField.test.js +1 -1
- package/lib/styles/forms/label.js +1 -1
- package/package.json +1 -1
@@ -175,7 +175,7 @@ test('select field with helper text', function () {
|
|
175
175
|
expect(fieldHelperText).toBeInTheDocument();
|
176
176
|
expect(fieldHelperText).toHaveClass("is-".concat(_statuses["default"].ERROR));
|
177
177
|
});
|
178
|
-
test(
|
178
|
+
test("label floats after user's interacting", function () {
|
179
179
|
getComponent({
|
180
180
|
labelMode: _constants.modes.FLOAT,
|
181
181
|
value: ''
|
@@ -187,7 +187,7 @@ test('label floats after user\'s interacting', function () {
|
|
187
187
|
|
188
188
|
_userEvent["default"].tab();
|
189
189
|
|
190
|
-
expect(textAreaContainer).toHaveClass('is-float-label
|
190
|
+
expect(textAreaContainer).toHaveClass('is-float-label');
|
191
191
|
});
|
192
192
|
test('clicking on the visible button opens the popuplist', function () {
|
193
193
|
getComponent();
|
@@ -190,7 +190,7 @@ var useField = function useField() {
|
|
190
190
|
|
191
191
|
var isFloatLabel = labelMode === _constants.modes.FLOAT || (labelProps === null || labelProps === void 0 ? void 0 : labelProps.labelMode) === _constants.modes.FLOAT;
|
192
192
|
var isLeftLabel = labelMode === _constants.modes.LEFT || (labelProps === null || labelProps === void 0 ? void 0 : labelProps.labelMode) === _constants.modes.LEFT;
|
193
|
-
var isFloatLabelActive = isFloatLabel && (hasValue ||
|
193
|
+
var isFloatLabelActive = isFloatLabel && (hasValue || (containerProps === null || containerProps === void 0 ? void 0 : containerProps.isFloatLabelActive));
|
194
194
|
|
195
195
|
var _useStatusClasses2 = (0, _hooks.useStatusClasses)(containerProps === null || containerProps === void 0 ? void 0 : containerProps.className, {
|
196
196
|
'field-container': true,
|
@@ -165,7 +165,7 @@ test('should return isFloatLabelActive class for container', function () {
|
|
165
165
|
(0, _reactHooks.act)(function () {
|
166
166
|
return result.current.fieldContainerProps.onFocus({});
|
167
167
|
});
|
168
|
-
expect(result.current.fieldContainerProps.className).toContain('is-float-label
|
168
|
+
expect(result.current.fieldContainerProps.className).toContain('is-float-label'); // Does not have the class if the container loses focus within it
|
169
169
|
|
170
170
|
(0, _reactHooks.act)(function () {
|
171
171
|
return result.current.fieldContainerProps.onBlur({
|
@@ -54,7 +54,7 @@ var label = _objectSpread(_objectSpread({}, _text.text.label), {}, {
|
|
54
54
|
left: 'md',
|
55
55
|
mb: 0,
|
56
56
|
transformOrigin: 'top left',
|
57
|
-
transition: 'all 0.
|
57
|
+
transition: 'all 0.1s ease-out',
|
58
58
|
pointerEvents: 'none',
|
59
59
|
paddingRight: '25px',
|
60
60
|
paddingLeft: '1px' // Otherwise, certain characters get cut off on the left from the overflow
|
@@ -136,7 +136,7 @@ test('select field with helper text', function () {
|
|
136
136
|
expect(fieldHelperText).toBeInTheDocument();
|
137
137
|
expect(fieldHelperText).toHaveClass("is-".concat(statuses.ERROR));
|
138
138
|
});
|
139
|
-
test(
|
139
|
+
test("label floats after user's interacting", function () {
|
140
140
|
getComponent({
|
141
141
|
labelMode: modes.FLOAT,
|
142
142
|
value: ''
|
@@ -144,7 +144,7 @@ test('label floats after user\'s interacting', function () {
|
|
144
144
|
var textAreaContainer = screen.getByTestId(testId);
|
145
145
|
expect(textAreaContainer).not.toHaveClass('is-float-label-active');
|
146
146
|
userEvent.tab();
|
147
|
-
expect(textAreaContainer).toHaveClass('is-float-label
|
147
|
+
expect(textAreaContainer).toHaveClass('is-float-label');
|
148
148
|
});
|
149
149
|
test('clicking on the visible button opens the popuplist', function () {
|
150
150
|
getComponent();
|
@@ -159,7 +159,7 @@ var useField = function useField() {
|
|
159
159
|
|
160
160
|
var isFloatLabel = labelMode === labelModes.FLOAT || (labelProps === null || labelProps === void 0 ? void 0 : labelProps.labelMode) === labelModes.FLOAT;
|
161
161
|
var isLeftLabel = labelMode === labelModes.LEFT || (labelProps === null || labelProps === void 0 ? void 0 : labelProps.labelMode) === labelModes.LEFT;
|
162
|
-
var isFloatLabelActive = isFloatLabel && (hasValue ||
|
162
|
+
var isFloatLabelActive = isFloatLabel && (hasValue || (containerProps === null || containerProps === void 0 ? void 0 : containerProps.isFloatLabelActive));
|
163
163
|
|
164
164
|
var _useStatusClasses2 = useStatusClasses(containerProps === null || containerProps === void 0 ? void 0 : containerProps.className, {
|
165
165
|
'field-container': true,
|
@@ -148,7 +148,7 @@ test('should return isFloatLabelActive class for container', function () {
|
|
148
148
|
act(function () {
|
149
149
|
return result.current.fieldContainerProps.onFocus({});
|
150
150
|
});
|
151
|
-
expect(result.current.fieldContainerProps.className).toContain('is-float-label
|
151
|
+
expect(result.current.fieldContainerProps.className).toContain('is-float-label'); // Does not have the class if the container loses focus within it
|
152
152
|
|
153
153
|
act(function () {
|
154
154
|
return result.current.fieldContainerProps.onBlur({
|
@@ -36,7 +36,7 @@ export var label = _objectSpread(_objectSpread({}, text.label), {}, {
|
|
36
36
|
left: 'md',
|
37
37
|
mb: 0,
|
38
38
|
transformOrigin: 'top left',
|
39
|
-
transition: 'all 0.
|
39
|
+
transition: 'all 0.1s ease-out',
|
40
40
|
pointerEvents: 'none',
|
41
41
|
paddingRight: '25px',
|
42
42
|
paddingLeft: '1px' // Otherwise, certain characters get cut off on the left from the overflow
|