@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.
@@ -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
- .${classes.content} {
139
- margin-left: ${spacing[3]}px;
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: _jsxs(_Fragment, { children: [isRequired && !!requiredMark &&
160
- _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 }) })] }));
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 = -Infinity, max = Infinity, step, precision, placeholder, disabled, readOnly, autoFocus, defaultValue, value, onChange, ...props }) => {
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);