@canlooks/can-ui 0.0.47 → 0.0.48
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/cjs/components/button/button.js +1 -1
- package/dist/cjs/components/calendar/calendar.style.js +124 -124
- package/dist/cjs/components/clickAway/clickAway.d.ts +1 -3
- package/dist/cjs/components/descriptions/descriptionItem.js +1 -1
- package/dist/cjs/components/descriptions/descriptions.style.js +8 -5
- package/dist/cjs/components/form/form.js +1 -0
- package/dist/cjs/components/form/formItem.js +3 -2
- package/dist/cjs/components/inputBase/inputBase.js +1 -1
- package/dist/esm/components/button/button.js +1 -1
- package/dist/esm/components/calendar/calendar.style.js +124 -124
- package/dist/esm/components/clickAway/clickAway.d.ts +1 -3
- package/dist/esm/components/descriptions/descriptionItem.js +1 -1
- package/dist/esm/components/descriptions/descriptions.style.js +8 -5
- package/dist/esm/components/form/form.js +1 -0
- package/dist/esm/components/form/formItem.js +3 -2
- package/dist/esm/components/inputBase/inputBase.js +1 -1
- package/documentation/dist/assets/{index-DpTyMkMP.js → index-UW3tEkHN.js} +500 -497
- package/documentation/dist/index.html +1 -1
- package/extensions/curd.cjs +5 -5
- package/extensions/documentViewer.cjs +5 -5
- package/extensions/textFormatter.cjs +5 -5
- package/package.json +6 -6
|
@@ -133,18 +133,21 @@ export const gridItemStyle = defineCss(({ spacing, text }) => css `
|
|
|
133
133
|
.${classes.label} {
|
|
134
134
|
text-align: right;
|
|
135
135
|
justify-content: flex-end;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
|
|
137
|
+
+ .${classes.content} {
|
|
138
|
+
margin-left: ${spacing[3]}px;
|
|
139
|
+
}
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
&[data-label-placement=right] {
|
|
144
144
|
.${classes.content} {
|
|
145
145
|
text-align: right;
|
|
146
|
-
margin-right: ${spacing[2]}px;
|
|
147
146
|
justify-content: flex-end;
|
|
148
147
|
}
|
|
148
|
+
|
|
149
|
+
.${classes.label} + .${classes.content} {
|
|
150
|
+
margin-right: ${spacing[3]}px;
|
|
151
|
+
}
|
|
149
152
|
}
|
|
150
153
|
`);
|
|
@@ -39,6 +39,7 @@ inline, columnCount = 1, gap, columnGap, rowGap, ...props }) => {
|
|
|
39
39
|
*/
|
|
40
40
|
const itemsContainer = useRef(new Map());
|
|
41
41
|
const submitHandler = async (e) => {
|
|
42
|
+
console.log(e);
|
|
42
43
|
e?.preventDefault();
|
|
43
44
|
try {
|
|
44
45
|
await Promise.all([...itemsContainer.current].map(async ([, item]) => {
|
|
@@ -156,6 +156,7 @@ export const FormItem = ({ ref, wrapperRef, field, initialValue, label = '', rul
|
|
|
156
156
|
if (noStyle || variant === 'plain') {
|
|
157
157
|
return renderedChildren;
|
|
158
158
|
}
|
|
159
|
-
return (_jsxs(DescriptionItem, { flex: void 0, ...props, ref: wrapperRef, className: clsx(classes.item, props.className), label:
|
|
160
|
-
|
|
159
|
+
return (_jsxs(DescriptionItem, { flex: void 0, ...props, ref: wrapperRef, className: clsx(classes.item, props.className), label: !!label &&
|
|
160
|
+
_jsxs(_Fragment, { children: [isRequired && !!requiredMark &&
|
|
161
|
+
_jsx("span", { className: classes.requiredMark, children: requiredMark }), label] }), children: [renderedChildren, _jsx(Collapse, { in: innerError.current || !!helperText, children: _jsx("div", { className: classes.helperText, children: innerHelperText.current }) })] }));
|
|
161
162
|
};
|
|
@@ -9,7 +9,7 @@ import { Icon } from '../..';
|
|
|
9
9
|
import { faCircleXmark } from '@fortawesome/free-solid-svg-icons/faCircleXmark';
|
|
10
10
|
export const InputBase = (({ variant = 'outlined', size, shape, color = 'primary', children, prefix, suffix, onClear, loading, type, clearable = type !== 'number',
|
|
11
11
|
// 以下属性传递给<input/>
|
|
12
|
-
min
|
|
12
|
+
min, max, step, precision, placeholder, disabled, readOnly, autoFocus, defaultValue, value, onChange, ...props }) => {
|
|
13
13
|
const theme = useTheme();
|
|
14
14
|
size ??= theme.size;
|
|
15
15
|
const innerInputRef = useRef(null);
|