@jobber/components 8.23.0 → 8.23.1-JOB-175910-23de950.7
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.
|
@@ -11,7 +11,7 @@ var Text = require('./Text-cjs.js');
|
|
|
11
11
|
var useFormFieldFocus = require('./useFormFieldFocus-cjs.js');
|
|
12
12
|
var InputValidation = require('./InputValidation-cjs.js');
|
|
13
13
|
|
|
14
|
-
var formFieldStyles = {"container":"YL-mNv-Bl6g-","wrapper":"_8lhbGTQ-hhg-","disabled":"Tz9LK9ABKMk-","horizontalWrapper":"b5mv1x1H7YE-","textarea":"hGr6YW4AeLM-","safari":"QBCWi9GBgMs-","timeInputLabel":"_0pmqVa2zSE4-","miniLabel":"F1t76G6bDKo-","large":"_9tjyT9QUtP8-","text":"QmMiyoAWp-g-","invalid":"XWDSfe6weSY-","
|
|
14
|
+
var formFieldStyles = {"container":"YL-mNv-Bl6g-","wrapper":"_8lhbGTQ-hhg-","disabled":"Tz9LK9ABKMk-","horizontalWrapper":"b5mv1x1H7YE-","textarea":"hGr6YW4AeLM-","safari":"QBCWi9GBgMs-","timeInputLabel":"_0pmqVa2zSE4-","small":"Sw5O4I0lMJg-","miniLabel":"F1t76G6bDKo-","large":"_9tjyT9QUtP8-","text":"QmMiyoAWp-g-","invalid":"XWDSfe6weSY-","inline":"SaORbL7SYWY-","center":"ozy2UoT2vsg-","right":"_3TJdT91YD3c-","maxLength":"W6GrMqLy2qk-","inputWrapper":"-LmjnYRU0r0-","childrenWrapper":"yVXYv6hkuOA-","input":"vtSDcuzNr9Q-","emptyPhoneNumber":"MVhuQuzUBUs-","label":"Dgk00tzlODA-","select":"NwQGiWBWIsc-","externalLabel":"Qb8zQ8n-8vc-","postfix":"yTDzs9h1otI-","affixIcon":"m0YpdssD2dY-","suffix":"_-3mMnjSh6ok-","affixLabel":"-Wzcb0pBh5I-","description":"DHX5ijY3xIw-","toolbar":"AL-2brNI7dk-","spinning":"_8Rzv7CcDW80-"};
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @internal Reach out to UX Foundations if using this component since it is possible it might change
|
|
@@ -95,7 +95,7 @@ function useFormFieldWrapperStyles({ size, align, placeholder, value, invalid, e
|
|
|
95
95
|
[formFieldStyles.invalid]: invalid !== null && invalid !== void 0 ? invalid : error,
|
|
96
96
|
[formFieldStyles.disabled]: disabled,
|
|
97
97
|
[formFieldStyles.maxLength]: maxLength,
|
|
98
|
-
[formFieldStyles.timeInputLabel]: placeholder && type === "time" &&
|
|
98
|
+
[formFieldStyles.timeInputLabel]: placeholder && type === "time" && value === "",
|
|
99
99
|
});
|
|
100
100
|
const containerClasses = classnames(formFieldStyles.container, {
|
|
101
101
|
[formFieldStyles.inline]: inline,
|
|
@@ -9,7 +9,7 @@ import { T as Text } from './Text-es.js';
|
|
|
9
9
|
import { u as useFormFieldFocus } from './useFormFieldFocus-es.js';
|
|
10
10
|
import { I as InputValidation } from './InputValidation-es.js';
|
|
11
11
|
|
|
12
|
-
var formFieldStyles = {"container":"YL-mNv-Bl6g-","wrapper":"_8lhbGTQ-hhg-","disabled":"Tz9LK9ABKMk-","horizontalWrapper":"b5mv1x1H7YE-","textarea":"hGr6YW4AeLM-","safari":"QBCWi9GBgMs-","timeInputLabel":"_0pmqVa2zSE4-","miniLabel":"F1t76G6bDKo-","large":"_9tjyT9QUtP8-","text":"QmMiyoAWp-g-","invalid":"XWDSfe6weSY-","
|
|
12
|
+
var formFieldStyles = {"container":"YL-mNv-Bl6g-","wrapper":"_8lhbGTQ-hhg-","disabled":"Tz9LK9ABKMk-","horizontalWrapper":"b5mv1x1H7YE-","textarea":"hGr6YW4AeLM-","safari":"QBCWi9GBgMs-","timeInputLabel":"_0pmqVa2zSE4-","small":"Sw5O4I0lMJg-","miniLabel":"F1t76G6bDKo-","large":"_9tjyT9QUtP8-","text":"QmMiyoAWp-g-","invalid":"XWDSfe6weSY-","inline":"SaORbL7SYWY-","center":"ozy2UoT2vsg-","right":"_3TJdT91YD3c-","maxLength":"W6GrMqLy2qk-","inputWrapper":"-LmjnYRU0r0-","childrenWrapper":"yVXYv6hkuOA-","input":"vtSDcuzNr9Q-","emptyPhoneNumber":"MVhuQuzUBUs-","label":"Dgk00tzlODA-","select":"NwQGiWBWIsc-","externalLabel":"Qb8zQ8n-8vc-","postfix":"yTDzs9h1otI-","affixIcon":"m0YpdssD2dY-","suffix":"_-3mMnjSh6ok-","affixLabel":"-Wzcb0pBh5I-","description":"DHX5ijY3xIw-","toolbar":"AL-2brNI7dk-","spinning":"_8Rzv7CcDW80-"};
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @internal Reach out to UX Foundations if using this component since it is possible it might change
|
|
@@ -93,7 +93,7 @@ function useFormFieldWrapperStyles({ size, align, placeholder, value, invalid, e
|
|
|
93
93
|
[formFieldStyles.invalid]: invalid !== null && invalid !== void 0 ? invalid : error,
|
|
94
94
|
[formFieldStyles.disabled]: disabled,
|
|
95
95
|
[formFieldStyles.maxLength]: maxLength,
|
|
96
|
-
[formFieldStyles.timeInputLabel]: placeholder && type === "time" &&
|
|
96
|
+
[formFieldStyles.timeInputLabel]: placeholder && type === "time" && value === "",
|
|
97
97
|
});
|
|
98
98
|
const containerClasses = classnames(formFieldStyles.container, {
|
|
99
99
|
[formFieldStyles.inline]: inline,
|
|
@@ -29,6 +29,14 @@ number automatically fills in the rest of the time. For example, typing `2` will
|
|
|
29
29
|
fill in `2:00 PM` and typing `1` waits for a few milliseconds in case the user
|
|
30
30
|
wants to type `10`, `11`, or `12`.
|
|
31
31
|
|
|
32
|
+
## Sizes and the placeholder
|
|
33
|
+
|
|
34
|
+
Consistent with other inputs, `size="small"` does not show the floating mini
|
|
35
|
+
label. The placeholder appears while the field is empty and unfocused, and is
|
|
36
|
+
hidden while the field is being edited or has a value, keeping the field at its
|
|
37
|
+
small height throughout. The default and `large` sizes float the placeholder up
|
|
38
|
+
as a mini label while editing or once a value is set.
|
|
39
|
+
|
|
32
40
|
|
|
33
41
|
## Props
|
|
34
42
|
|
package/dist/styles.css
CHANGED
|
@@ -1425,7 +1425,10 @@
|
|
|
1425
1425
|
-webkit-text-fill-color: var(--field--background-color);
|
|
1426
1426
|
}
|
|
1427
1427
|
|
|
1428
|
-
|
|
1428
|
+
/* Small fields don't grow into the mini-label state; their placeholder
|
|
1429
|
+
is hidden instead (see the .small label rules below) */
|
|
1430
|
+
|
|
1431
|
+
._0pmqVa2zSE4-:not(.Tz9LK9ABKMk-):not(.Sw5O4I0lMJg-):focus-within,
|
|
1429
1432
|
.F1t76G6bDKo- {
|
|
1430
1433
|
--field--placeholder-color: var(--color-text--secondary);
|
|
1431
1434
|
--field--placeholder-offset: var(--space-smallest);
|
|
@@ -1737,7 +1740,10 @@
|
|
|
1737
1740
|
background-color: var(--field--background-color);
|
|
1738
1741
|
}
|
|
1739
1742
|
|
|
1740
|
-
|
|
1743
|
+
/* An empty focused time input shows the native --:-- segments, so small
|
|
1744
|
+
fields hide the placeholder rather than float it as a mini label */
|
|
1745
|
+
|
|
1746
|
+
._0pmqVa2zSE4-.Sw5O4I0lMJg-:focus-within:not(.Tz9LK9ABKMk-) .Dgk00tzlODA- {
|
|
1741
1747
|
display: none;
|
|
1742
1748
|
}
|
|
1743
1749
|
|
|
@@ -1746,7 +1752,7 @@
|
|
|
1746
1752
|
/* stylelint-disable-next-line no-descending-specificity */
|
|
1747
1753
|
|
|
1748
1754
|
._9tjyT9QUtP8-.F1t76G6bDKo- .Dgk00tzlODA-,
|
|
1749
|
-
._0pmqVa2zSE4-._9tjyT9QUtP8
|
|
1755
|
+
._0pmqVa2zSE4-._9tjyT9QUtP8-:focus-within:not(.Tz9LK9ABKMk-) .Dgk00tzlODA- {
|
|
1750
1756
|
padding-top: 8px;
|
|
1751
1757
|
padding-top: var(--space-small);
|
|
1752
1758
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "8.23.
|
|
3
|
+
"version": "8.23.1-JOB-175910-23de950.7+23de9504",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -541,5 +541,5 @@
|
|
|
541
541
|
"> 1%",
|
|
542
542
|
"IE 10"
|
|
543
543
|
],
|
|
544
|
-
"gitHead": "
|
|
544
|
+
"gitHead": "23de95043a80584ff5a8bc1837db160272352eba"
|
|
545
545
|
}
|