@laser-ui/components 0.1.2 → 0.1.3
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 +7 -0
- package/form/FormItem.js +5 -1
- package/package.json +4 -4
- package/upload/Upload.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [0.1.3](https://github.com/laser-ui/laser-ui/compare/v0.1.2...v0.1.3) (2023-09-15)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **components:** fix creating uid when upload file ([5e3a8af](https://github.com/laser-ui/laser-ui/commit/5e3a8afa656721871e88f01f0b6e48843bdb64c1))
|
|
10
|
+
- **components:** fix width of form-item's content ([6063665](https://github.com/laser-ui/laser-ui/commit/60636657f4c581bc2964471f30078f1685f906c1))
|
|
11
|
+
|
|
5
12
|
## [0.1.2](https://github.com/laser-ui/laser-ui/compare/v0.1.1...v0.1.2) (2023-09-14)
|
|
6
13
|
|
|
7
14
|
**Note:** Version bump only for package @laser-ui/components
|
package/form/FormItem.js
CHANGED
|
@@ -156,7 +156,11 @@ export function FormItem(props) {
|
|
|
156
156
|
'form__item-label--colon': formContext.labelColon,
|
|
157
157
|
}), { htmlFor: labelFor, "data-l-form-label": true, children: [label, (labelExtra || (formContext.requiredType === 'optional' && !required)) && (_jsxs("div", Object.assign({}, styled('form__item-label-extra'), { children: [formContext.requiredType === 'optional' && !required && _jsx("span", { children: t('Form', 'Optional') }), labelExtra] })))] }))) }))), _jsxs("div", Object.assign({}, mergeCS(styled('form__item-content'), {
|
|
158
158
|
style: {
|
|
159
|
-
width: `calc(100% - ${formContext.vertical
|
|
159
|
+
width: `calc(100% - ${formContext.vertical
|
|
160
|
+
? '0px'
|
|
161
|
+
: labelWidth === 'auto'
|
|
162
|
+
? 'var(--label-width)'
|
|
163
|
+
: labelWidth + (isNumber(labelWidth) ? 'px' : '')} - ${formContext.feedbackIcon ? 'var(--size)' : '0px'})`,
|
|
160
164
|
},
|
|
161
165
|
}), { children: [_jsx("div", Object.assign({}, styled('form__item-control'), { children: isFunction(children) ? children(formControlProviders) : children })), _jsx("div", Object.assign({}, styled('form__error-container'), { children: (() => {
|
|
162
166
|
const errorsMap = new Map();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@laser-ui/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "React components.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"module": "./index.js",
|
|
27
27
|
"types": "./index.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@laser-ui/hooks": "0.1.
|
|
30
|
-
"@laser-ui/utils": "0.1.
|
|
29
|
+
"@laser-ui/hooks": "0.1.3",
|
|
30
|
+
"@laser-ui/utils": "0.1.3",
|
|
31
31
|
"@material-design-icons/svg": "^0.14.12",
|
|
32
32
|
"jss": "^10.10.0",
|
|
33
33
|
"jss-preset-default": "^10.10.0",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"access": "public",
|
|
46
46
|
"directory": "../../dist/libs/components"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "3975a04e735243cb8fc0b80374677c8a3cd619a9"
|
|
49
49
|
}
|
package/upload/Upload.js
CHANGED
|
@@ -32,12 +32,13 @@ function UploadFC(props, ref) {
|
|
|
32
32
|
customUpload(fileList);
|
|
33
33
|
}
|
|
34
34
|
else {
|
|
35
|
+
let n = Date.now();
|
|
35
36
|
const filesAdded = [];
|
|
36
37
|
for (let index = 0; index < fileList.length; index++) {
|
|
37
38
|
const file = fileList.item(index);
|
|
38
39
|
if (file) {
|
|
39
40
|
const xhr = new XMLHttpRequest();
|
|
40
|
-
let uid =
|
|
41
|
+
let uid = ++n;
|
|
41
42
|
const add = (obj) => {
|
|
42
43
|
const fileURL = URL.createObjectURL(file);
|
|
43
44
|
dataRef.current.fileURLs.push(fileURL);
|