Skip to content

Commit 699e51a

Browse files
committed
remove commented out code
1 parent f591a51 commit 699e51a

File tree

11 files changed

+11
-36
lines changed

11 files changed

+11
-36
lines changed

packages/chakra-ui/src/BaseInputTemplate/BaseInputTemplate.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export default function BaseInputTemplate<
3737
disabled,
3838
} = props;
3939
const inputProps = getInputProps<T, S, F>(schema, type, options);
40-
// const chakraProps = getChakra({ uiSchema });
4140

4241
const _onChange = ({ target: { value } }: ChangeEvent<HTMLInputElement>) =>
4342
onChange(value === '' ? options.emptyValue : value);
@@ -47,7 +46,6 @@ export default function BaseInputTemplate<
4746
return (
4847
<Field
4948
mb={1}
50-
// {...chakraProps}
5149
disabled={disabled || readonly}
5250
required={required}
5351
readOnly={readonly}

packages/chakra-ui/src/ChakraFrameProvider.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { CacheProvider } from '@emotion/react';
22
import createCache from '@emotion/cache';
33
import weakMemoize from '@emotion/weak-memoize';
44
import { ChakraProvider, defaultSystem } from '@chakra-ui/react';
5-
// import CSSReset from './CssReset';
65

76
/**
87
* __createChakraFrameProvider is used to ensure that <Global> emotion components
@@ -24,8 +23,6 @@ const memoizedCreateCacheWithContainer = weakMemoize((container: HTMLElement) =>
2423
return newCache;
2524
});
2625

27-
// const system = createSystem(defaultConfig, { preflight: false });
28-
2926
export const __createChakraFrameProvider =
3027
(props: any) =>
3128
({ document }: any) => {

packages/chakra-ui/src/CheckboxWidget/CheckboxWidget.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export default function CheckboxWidget<
3434
uiSchema,
3535
schema,
3636
} = props;
37-
// const chakraProps = getChakra({ uiSchema });
3837
// Because an unchecked checkbox will cause html5 validation to fail, only add
3938
// the "required" attribute if the field value must be "true", due to the
4039
// "const" or "enum" keywords

packages/chakra-ui/src/CheckboxesWidget/CheckboxesWidget.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import { FocusEvent } from 'react';
2-
import { CheckboxGroup, Text, Stack, FieldsetRoot } from '@chakra-ui/react';
1+
import { CheckboxGroup, FieldsetRoot, Stack, Text } from '@chakra-ui/react';
32
import {
43
ariaDescribedByIds,
54
enumOptionsIndexForValue,
65
enumOptionsValueForIndex,
6+
FormContextType,
77
labelValue,
88
optionId,
9-
FormContextType,
109
RJSFSchema,
1110
StrictRJSFSchema,
1211
WidgetProps,
1312
} from '@rjsf/utils';
13+
import { FocusEvent } from 'react';
1414
import { Checkbox } from '../components/ui/checkbox';
1515

1616
export default function CheckboxesWidget<
@@ -33,7 +33,6 @@ export default function CheckboxesWidget<
3333
rawErrors = [],
3434
} = props;
3535
const { enumOptions, enumDisabled, emptyValue } = options;
36-
// const chakraProps = getChakra({ uiSchema });
3736

3837
const _onBlur = ({ target }: FocusEvent<HTMLInputElement | any>) =>
3938
onBlur(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, emptyValue));
@@ -46,7 +45,6 @@ export default function CheckboxesWidget<
4645
return (
4746
<FieldsetRoot
4847
mb={1}
49-
// {...chakraProps}
5048
disabled={disabled || readonly}
5149
invalid={rawErrors && rawErrors.length > 0}
5250
>

packages/chakra-ui/src/RadioWidget/RadioWidget.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export default function RadioWidget<T = any, S extends StrictRJSFSchema = RJSFSc
2828
onFocus,
2929
}: WidgetProps<T, S, F>) {
3030
const { enumOptions, enumDisabled, emptyValue } = options;
31-
// const chakraProps = getChakra({ uiSchema });
3231

3332
const _onChange = ({ target: { value } }: ChangeEvent<HTMLInputElement>) =>
3433
onChange(enumOptionsValueForIndex<S>(value, enumOptions, emptyValue));
@@ -43,7 +42,6 @@ export default function RadioWidget<T = any, S extends StrictRJSFSchema = RJSFSc
4342
return (
4443
<Field
4544
mb={1}
46-
// {...chakraProps}
4745
disabled={disabled || readonly}
4846
required={required}
4947
readOnly={readonly}

packages/chakra-ui/src/RangeWidget/RangeWidget.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export default function RangeWidget<T = any, S extends StrictRJSFSchema = RJSFSc
2525
hideLabel,
2626
id,
2727
}: WidgetProps<T, S, F>) {
28-
// const chakraProps = getChakra({ uiSchema });
2928

3029
const sliderWidgetProps = { value, label, id, ...rangeSpec<S>(schema) };
3130

packages/chakra-ui/src/SelectNativeWidget/NativeSelectWidget.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export default function NativeSelectWidget<
4040
schema,
4141
} = props;
4242
const { enumOptions, enumDisabled, emptyValue } = options;
43-
// const chakraProps = getChakra({ uiSchema });
4443

4544
const _onChange = ({ target }: ChangeEvent<HTMLSelectElement>) => {
4645
return onChange(enumOptionsValueForIndex<S>(target && target.value, enumOptions, emptyValue));
@@ -97,7 +96,6 @@ export default function NativeSelectWidget<
9796
return (
9897
<Field
9998
mb={1}
100-
// {...chakraProps}
10199
disabled={disabled || readonly}
102100
required={required}
103101
readOnly={readonly}

packages/chakra-ui/src/SelectWidget/SelectWidget.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export default function SelectWidget<T = any, S extends StrictRJSFSchema = RJSFS
3939
schema,
4040
} = props;
4141
const { enumOptions, enumDisabled, emptyValue } = options;
42-
// const chakraProps = getChakra({ uiSchema });
4342

4443
const _onMultiChange = ({ value }: SelectValueChangeDetails) => {
4544
return onChange(
@@ -120,7 +119,6 @@ export default function SelectWidget<T = any, S extends StrictRJSFSchema = RJSFS
120119
<Field
121120
ref={containerRef}
122121
mb={1}
123-
// {...chakraProps}
124122
disabled={disabled || readonly}
125123
required={required}
126124
readOnly={readonly}

packages/chakra-ui/src/TextareaWidget/TextareaWidget.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ export default function TextareaWidget<
3030
required,
3131
rawErrors,
3232
}: WidgetProps<T, S, F>) {
33-
// const chakraProps = getChakra({ uiSchema });
34-
3533
const _onChange = ({ target: { value } }: ChangeEvent<HTMLTextAreaElement>) =>
3634
onChange(value === '' ? options.emptyValue : value);
3735
const _onBlur = ({ target }: FocusEvent<HTMLTextAreaElement>) => onBlur(id, target && target.value);
@@ -40,7 +38,6 @@ export default function TextareaWidget<
4038
return (
4139
<Field
4240
mb={1}
43-
// {...chakraProps}
4441
disabled={disabled || readonly}
4542
required={required}
4643
readOnly={readonly}

packages/chakra-ui/src/UpDownWidget/UpDownWidget.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,13 @@ export default function UpDownWidget<T = any, S extends StrictRJSFSchema = RJSFS
1717
) {
1818
const { id, readonly, disabled, label, hideLabel, value, onChange, onBlur, onFocus, rawErrors, required } = props;
1919

20-
// const chakraProps = getChakra({ uiSchema }); TODO - adjust getChakra everywhere
21-
2220
const _onChange = ({ value }: NumberInputValueChangeDetails) => onChange(value);
2321
const _onBlur = ({ target }: FocusEvent<HTMLInputElement | any>) => onBlur(id, target && target.value);
2422
const _onFocus = ({ target }: FocusEvent<HTMLInputElement | any>) => onFocus(id, target && target.value);
2523

2624
return (
2725
<Field
2826
mb={1}
29-
// {...chakraProps}
3027
disabled={disabled || readonly}
3128
required={required}
3229
readOnly={readonly}

0 commit comments

Comments
 (0)