@jobber/components 9.16.7-update-inp-c8026f3.10 → 9.16.8
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/dist/InputFile-cjs.js
CHANGED
|
@@ -1319,6 +1319,16 @@ function InputFileValidationErrors({ validationErrors, }) {
|
|
|
1319
1319
|
}
|
|
1320
1320
|
|
|
1321
1321
|
const inputFileMessages = useAtlantisI18n.defineMessages({
|
|
1322
|
+
fileLimit: {
|
|
1323
|
+
en: {
|
|
1324
|
+
one: "Cannot exceed a maximum of {count} file.",
|
|
1325
|
+
other: "Cannot exceed a maximum of {count} files.",
|
|
1326
|
+
},
|
|
1327
|
+
es: {
|
|
1328
|
+
one: "No se puede superar el máximo de {count} archivo.",
|
|
1329
|
+
other: "No se puede superar el máximo de {count} archivos.",
|
|
1330
|
+
},
|
|
1331
|
+
},
|
|
1322
1332
|
uploadFile: {
|
|
1323
1333
|
en: "Upload file",
|
|
1324
1334
|
es: "Subir archivo",
|
|
@@ -1327,7 +1337,7 @@ const inputFileMessages = useAtlantisI18n.defineMessages({
|
|
|
1327
1337
|
|
|
1328
1338
|
/* eslint-disable max-statements */
|
|
1329
1339
|
function InputFile({ variation = "dropzone", size = "base", name, buttonLabel: providedButtonLabel, allowMultiple = false, allowedTypes = "all", description, hintText, maxFilesValidation, getUploadParams, onUploadStart, onUploadProgress, onUploadComplete, onUploadError, validator, children, }) {
|
|
1330
|
-
const { t } = useAtlantisI18n.useAtlantisI18n(inputFileMessages);
|
|
1340
|
+
const { t, plural } = useAtlantisI18n.useAtlantisI18n(inputFileMessages);
|
|
1331
1341
|
const maxFiles = (maxFilesValidation === null || maxFilesValidation === void 0 ? void 0 : maxFilesValidation.maxFiles) || 0;
|
|
1332
1342
|
const numberOfCurrentFiles = (maxFilesValidation === null || maxFilesValidation === void 0 ? void 0 : maxFilesValidation.numberOfCurrentFiles) || 0;
|
|
1333
1343
|
const [limitError, setLimitError] = React.useState();
|
|
@@ -1420,9 +1430,10 @@ function InputFile({ variation = "dropzone", size = "base", name, buttonLabel: p
|
|
|
1420
1430
|
? remainingCapacity
|
|
1421
1431
|
: Math.min(1, remainingCapacity);
|
|
1422
1432
|
if (acceptedFiles.length > capacity) {
|
|
1433
|
+
const maximum = allowMultiple || remainingCapacity === 0 ? maxFiles : 1;
|
|
1423
1434
|
setLimitError({
|
|
1424
1435
|
code: "too-many-files",
|
|
1425
|
-
message:
|
|
1436
|
+
message: plural("fileLimit", maximum),
|
|
1426
1437
|
});
|
|
1427
1438
|
return;
|
|
1428
1439
|
}
|
package/dist/InputFile-es.js
CHANGED
|
@@ -1317,6 +1317,16 @@ function InputFileValidationErrors({ validationErrors, }) {
|
|
|
1317
1317
|
}
|
|
1318
1318
|
|
|
1319
1319
|
const inputFileMessages = defineMessages({
|
|
1320
|
+
fileLimit: {
|
|
1321
|
+
en: {
|
|
1322
|
+
one: "Cannot exceed a maximum of {count} file.",
|
|
1323
|
+
other: "Cannot exceed a maximum of {count} files.",
|
|
1324
|
+
},
|
|
1325
|
+
es: {
|
|
1326
|
+
one: "No se puede superar el máximo de {count} archivo.",
|
|
1327
|
+
other: "No se puede superar el máximo de {count} archivos.",
|
|
1328
|
+
},
|
|
1329
|
+
},
|
|
1320
1330
|
uploadFile: {
|
|
1321
1331
|
en: "Upload file",
|
|
1322
1332
|
es: "Subir archivo",
|
|
@@ -1325,7 +1335,7 @@ const inputFileMessages = defineMessages({
|
|
|
1325
1335
|
|
|
1326
1336
|
/* eslint-disable max-statements */
|
|
1327
1337
|
function InputFile({ variation = "dropzone", size = "base", name, buttonLabel: providedButtonLabel, allowMultiple = false, allowedTypes = "all", description, hintText, maxFilesValidation, getUploadParams, onUploadStart, onUploadProgress, onUploadComplete, onUploadError, validator, children, }) {
|
|
1328
|
-
const { t } = useAtlantisI18n(inputFileMessages);
|
|
1338
|
+
const { t, plural } = useAtlantisI18n(inputFileMessages);
|
|
1329
1339
|
const maxFiles = (maxFilesValidation === null || maxFilesValidation === void 0 ? void 0 : maxFilesValidation.maxFiles) || 0;
|
|
1330
1340
|
const numberOfCurrentFiles = (maxFilesValidation === null || maxFilesValidation === void 0 ? void 0 : maxFilesValidation.numberOfCurrentFiles) || 0;
|
|
1331
1341
|
const [limitError, setLimitError] = useState();
|
|
@@ -1418,9 +1428,10 @@ function InputFile({ variation = "dropzone", size = "base", name, buttonLabel: p
|
|
|
1418
1428
|
? remainingCapacity
|
|
1419
1429
|
: Math.min(1, remainingCapacity);
|
|
1420
1430
|
if (acceptedFiles.length > capacity) {
|
|
1431
|
+
const maximum = allowMultiple || remainingCapacity === 0 ? maxFiles : 1;
|
|
1421
1432
|
setLimitError({
|
|
1422
1433
|
code: "too-many-files",
|
|
1423
|
-
message:
|
|
1434
|
+
message: plural("fileLimit", maximum),
|
|
1424
1435
|
});
|
|
1425
1436
|
return;
|
|
1426
1437
|
}
|
|
@@ -66,6 +66,13 @@ they map to our low/base/high pattern.
|
|
|
66
66
|
| `--shadow-base` | |
|
|
67
67
|
| `--shadow-high` | |
|
|
68
68
|
|
|
69
|
+
### Dark mode
|
|
70
|
+
|
|
71
|
+
On web and iOS, the dark theme keeps the same shadow offsets and blur and only
|
|
72
|
+
raises the opacity, so elevated elements stay distinguishable against dark
|
|
73
|
+
surfaces. On Android, the dark theme raises `elevation`, which makes the shadow
|
|
74
|
+
larger and softer, and uses a fully opaque shadow colour.
|
|
75
|
+
|
|
69
76
|
## Mobile
|
|
70
77
|
|
|
71
78
|
For mobile designs, the concept of elevation applies to both shadows and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "9.16.
|
|
3
|
+
"version": "9.16.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -501,7 +501,7 @@
|
|
|
501
501
|
"devDependencies": {
|
|
502
502
|
"@apollo/client": "^3.7.10",
|
|
503
503
|
"@csstools/postcss-global-data": "^1.0.3",
|
|
504
|
-
"@jobber/design": "0.121.
|
|
504
|
+
"@jobber/design": "0.121.1",
|
|
505
505
|
"@jobber/hooks": "2.21.1",
|
|
506
506
|
"@rollup/plugin-alias": "^5.1.0",
|
|
507
507
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
@@ -553,5 +553,5 @@
|
|
|
553
553
|
"> 1%",
|
|
554
554
|
"IE 10"
|
|
555
555
|
],
|
|
556
|
-
"gitHead": "
|
|
556
|
+
"gitHead": "48f346d90f5015b50ff0c96d798cce474ae9490e"
|
|
557
557
|
}
|