@openedx/paragon 22.11.1 → 22.12.0
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/README.md +8 -0
- package/dist/Card/CardFallbackDefaultImage.js +1 -0
- package/dist/Card/CardImageCap.js +1 -1
- package/dist/Card/CardImageCap.js.map +1 -1
- package/dist/Form/FormGroup.d.ts +41 -0
- package/dist/Form/FormGroup.js +3 -11
- package/dist/Form/FormGroup.js.map +1 -1
- package/dist/Form/FormGroupContext.d.ts +24 -0
- package/dist/Form/FormGroupContext.js +2 -17
- package/dist/Form/FormGroupContext.js.map +1 -1
- package/dist/Form/FormLabel.d.ts +20 -0
- package/dist/Form/FormLabel.js +2 -10
- package/dist/Form/FormLabel.js.map +1 -1
- package/dist/Form/constants.d.ts +13 -0
- package/dist/Form/constants.js +5 -8
- package/dist/Form/constants.js.map +1 -0
- package/dist/Form/fieldUtils.d.ts +9 -0
- package/dist/Form/fieldUtils.js +27 -29
- package/dist/Form/fieldUtils.js.map +1 -0
- package/dist/Form/index.d.ts +39 -0
- package/dist/Form/index.js +18 -1
- package/dist/Form/index.js.map +1 -1
- package/dist/Form/messages.d.ts +13 -0
- package/dist/Form/messages.js +4 -5
- package/dist/Form/messages.js.map +1 -0
- package/dist/IconButton/index.js +1 -1
- package/dist/IconButton/index.js.map +1 -1
- package/dist/index.d.ts +22 -22
- package/dist/index.js +22 -22
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/newId.d.ts +2 -0
- package/dist/utils/newId.js +3 -3
- package/dist/utils/newId.js.map +1 -0
- package/package.json +1 -1
- package/src/Card/CardFallbackDefaultImage.js +1 -0
- package/src/Card/CardImageCap.jsx +1 -1
- package/src/Card/tests/CardImageCap.test.jsx +3 -3
- package/src/Form/{FormGroup.jsx → FormGroup.tsx} +24 -14
- package/src/Form/{FormGroupContext.jsx → FormGroupContext.tsx} +29 -27
- package/src/Form/{FormLabel.jsx → FormLabel.tsx} +8 -11
- package/src/Form/{constants.js → constants.ts} +4 -7
- package/src/Form/{fieldUtils.js → fieldUtils.ts} +14 -11
- package/src/Form/{index.jsx → index.tsx} +33 -1
- package/src/IconButton/index.tsx +1 -1
- package/src/index.d.ts +22 -22
- package/src/index.js +22 -22
- package/dist/Card/fallback-default.png +0 -0
- package/src/Card/fallback-default.png +0 -0
- /package/src/Form/{messages.js → messages.ts} +0 -0
- /package/src/utils/{index.js → index.ts} +0 -0
- /package/src/utils/{newId.js → newId.ts} +0 -0
|
@@ -1,22 +1,54 @@
|
|
|
1
|
-
import
|
|
1
|
+
import BootstrapForm, { FormProps } from 'react-bootstrap/Form';
|
|
2
|
+
import { ComponentWithAsProp } from '../utils/types/bootstrap';
|
|
3
|
+
// TODO: add more typing and remove the @ts-ignore directives here
|
|
4
|
+
// @ts-ignore
|
|
2
5
|
import FormControl from './FormControl';
|
|
3
6
|
import FormLabel from './FormLabel';
|
|
4
7
|
import FormGroup from './FormGroup';
|
|
8
|
+
// @ts-ignore
|
|
5
9
|
import FormControlFeedback from './FormControlFeedback';
|
|
10
|
+
// @ts-ignore
|
|
6
11
|
import FormText from './FormText';
|
|
12
|
+
// @ts-ignore
|
|
7
13
|
import FormControlDecoratorGroup from './FormControlDecoratorGroup';
|
|
14
|
+
// @ts-ignore
|
|
8
15
|
import FormRadio, { RadioControl } from './FormRadio';
|
|
16
|
+
// @ts-ignore
|
|
9
17
|
import FormRadioSet from './FormRadioSet';
|
|
18
|
+
// @ts-ignore
|
|
10
19
|
import FormRadioSetContext from './FormRadioSetContext';
|
|
20
|
+
// @ts-ignore
|
|
11
21
|
import FormAutosuggest from './FormAutosuggest';
|
|
22
|
+
// @ts-ignore
|
|
12
23
|
import FormAutosuggestOption from './FormAutosuggestOption';
|
|
24
|
+
// @ts-ignore
|
|
13
25
|
import FormCheckbox, { CheckboxControl } from './FormCheckbox';
|
|
26
|
+
// @ts-ignore
|
|
14
27
|
import FormSwitch, { SwitchControl } from './FormSwitch';
|
|
28
|
+
// @ts-ignore
|
|
15
29
|
import FormCheckboxSet from './FormCheckboxSet';
|
|
30
|
+
// @ts-ignore
|
|
16
31
|
import FormSwitchSet from './FormSwitchSet';
|
|
32
|
+
// @ts-ignore
|
|
17
33
|
import FormCheckboxSetContext from './FormCheckboxSetContext';
|
|
34
|
+
// @ts-ignore
|
|
18
35
|
import useCheckboxSetValues from './useCheckboxSetValues';
|
|
19
36
|
|
|
37
|
+
const Form = BootstrapForm as any as ComponentWithAsProp<'form', FormProps> & {
|
|
38
|
+
Control: typeof FormControl;
|
|
39
|
+
Radio: typeof FormRadio;
|
|
40
|
+
RadioSet: typeof FormRadioSet;
|
|
41
|
+
Autosuggest: typeof FormAutosuggest;
|
|
42
|
+
AutosuggestOption: typeof FormAutosuggestOption;
|
|
43
|
+
Checkbox: typeof FormCheckbox;
|
|
44
|
+
CheckboxSet: typeof FormCheckboxSet;
|
|
45
|
+
Row: typeof BootstrapForm.Row;
|
|
46
|
+
Switch: typeof FormSwitch;
|
|
47
|
+
SwitchSet: typeof FormSwitchSet;
|
|
48
|
+
Label: typeof FormLabel;
|
|
49
|
+
Group: typeof FormGroup;
|
|
50
|
+
Text: typeof FormText;
|
|
51
|
+
};
|
|
20
52
|
Form.Control = FormControl;
|
|
21
53
|
Form.Radio = FormRadio;
|
|
22
54
|
Form.RadioSet = FormRadioSet;
|
package/src/IconButton/index.tsx
CHANGED
|
@@ -143,7 +143,7 @@ IconButton.propTypes = {
|
|
|
143
143
|
size: PropTypes.oneOf(['sm', 'md', 'inline']),
|
|
144
144
|
/** whether to show the `IconButton` in an active state, whose styling is distinct from default state */
|
|
145
145
|
isActive: PropTypes.bool,
|
|
146
|
-
/** Used with
|
|
146
|
+
/** Used with `IconButtonToggle` */
|
|
147
147
|
value: PropTypes.string,
|
|
148
148
|
};
|
|
149
149
|
|
package/src/index.d.ts
CHANGED
|
@@ -9,6 +9,28 @@ export { default as Button, ButtonGroup, ButtonToolbar } from './Button';
|
|
|
9
9
|
export { default as Chip, CHIP_PGN_CLASS } from './Chip';
|
|
10
10
|
export { default as ChipCarousel } from './ChipCarousel';
|
|
11
11
|
export { default as Container, ContainerSize } from './Container';
|
|
12
|
+
export {
|
|
13
|
+
default as Form,
|
|
14
|
+
RadioControl,
|
|
15
|
+
CheckboxControl,
|
|
16
|
+
SwitchControl,
|
|
17
|
+
FormSwitchSet,
|
|
18
|
+
FormControl,
|
|
19
|
+
FormControlDecoratorGroup,
|
|
20
|
+
FormControlFeedback,
|
|
21
|
+
FormCheck,
|
|
22
|
+
FormFile,
|
|
23
|
+
FormRadio,
|
|
24
|
+
FormRadioSet,
|
|
25
|
+
FormRadioSetContext,
|
|
26
|
+
FormGroup,
|
|
27
|
+
FormLabel,
|
|
28
|
+
useCheckboxSetValues,
|
|
29
|
+
FormText,
|
|
30
|
+
FormAutosuggest,
|
|
31
|
+
FormAutosuggestOption,
|
|
32
|
+
InputGroup,
|
|
33
|
+
} from './Form';
|
|
12
34
|
export { default as Hyperlink, HYPER_LINK_EXTERNAL_LINK_ALT_TEXT, HYPER_LINK_EXTERNAL_LINK_TITLE } from './Hyperlink';
|
|
13
35
|
export { default as Icon } from './Icon';
|
|
14
36
|
export { default as IconButton, IconButtonWithTooltip } from './IconButton';
|
|
@@ -61,28 +83,6 @@ export const
|
|
|
61
83
|
export const Fade: any; // from './Fade';
|
|
62
84
|
/** @deprecated */
|
|
63
85
|
export const Fieldset: any; // from './Fieldset';
|
|
64
|
-
export const
|
|
65
|
-
Form: any,
|
|
66
|
-
RadioControl: any,
|
|
67
|
-
CheckboxControl: any,
|
|
68
|
-
SwitchControl: any,
|
|
69
|
-
FormSwitchSet: any,
|
|
70
|
-
FormControl: any,
|
|
71
|
-
FormControlDecoratorGroup: any,
|
|
72
|
-
FormControlFeedback: any,
|
|
73
|
-
FormCheck: any,
|
|
74
|
-
FormFile: any,
|
|
75
|
-
FormRadio: any,
|
|
76
|
-
FormRadioSet: any,
|
|
77
|
-
FormRadioSetContext: any,
|
|
78
|
-
FormGroup: any,
|
|
79
|
-
FormLabel: any,
|
|
80
|
-
useCheckboxSetValues: any,
|
|
81
|
-
FormText: any,
|
|
82
|
-
FormAutosuggest: any,
|
|
83
|
-
FormAutosuggestOption: any,
|
|
84
|
-
InputGroup: any;
|
|
85
|
-
// from './Form';
|
|
86
86
|
export const IconButtonToggle: any; // from './IconButtonToggle';
|
|
87
87
|
/** @deprecated Replaced by `Form.Control`. */
|
|
88
88
|
export const Input: any; // from './Input';
|
package/src/index.js
CHANGED
|
@@ -9,6 +9,28 @@ export { default as Button, ButtonGroup, ButtonToolbar } from './Button';
|
|
|
9
9
|
export { default as Chip, CHIP_PGN_CLASS } from './Chip';
|
|
10
10
|
export { default as ChipCarousel } from './ChipCarousel';
|
|
11
11
|
export { default as Container } from './Container';
|
|
12
|
+
export {
|
|
13
|
+
default as Form,
|
|
14
|
+
RadioControl,
|
|
15
|
+
CheckboxControl,
|
|
16
|
+
SwitchControl,
|
|
17
|
+
FormSwitchSet,
|
|
18
|
+
FormControl,
|
|
19
|
+
FormControlDecoratorGroup,
|
|
20
|
+
FormControlFeedback,
|
|
21
|
+
FormCheck,
|
|
22
|
+
FormFile,
|
|
23
|
+
FormRadio,
|
|
24
|
+
FormRadioSet,
|
|
25
|
+
FormRadioSetContext,
|
|
26
|
+
FormGroup,
|
|
27
|
+
FormLabel,
|
|
28
|
+
useCheckboxSetValues,
|
|
29
|
+
FormText,
|
|
30
|
+
FormAutosuggest,
|
|
31
|
+
FormAutosuggestOption,
|
|
32
|
+
InputGroup,
|
|
33
|
+
} from './Form';
|
|
12
34
|
export { default as Hyperlink, HYPER_LINK_EXTERNAL_LINK_ALT_TEXT, HYPER_LINK_EXTERNAL_LINK_TITLE } from './Hyperlink';
|
|
13
35
|
export { default as Icon } from './Icon';
|
|
14
36
|
export { default as IconButton, IconButtonWithTooltip } from './IconButton';
|
|
@@ -61,28 +83,6 @@ export {
|
|
|
61
83
|
export { default as Fade } from './Fade';
|
|
62
84
|
/** @deprecated */
|
|
63
85
|
export { default as Fieldset } from './Fieldset';
|
|
64
|
-
export {
|
|
65
|
-
default as Form,
|
|
66
|
-
RadioControl,
|
|
67
|
-
CheckboxControl,
|
|
68
|
-
SwitchControl,
|
|
69
|
-
FormSwitchSet,
|
|
70
|
-
FormControl,
|
|
71
|
-
FormControlDecoratorGroup,
|
|
72
|
-
FormControlFeedback,
|
|
73
|
-
FormCheck,
|
|
74
|
-
FormFile,
|
|
75
|
-
FormRadio,
|
|
76
|
-
FormRadioSet,
|
|
77
|
-
FormRadioSetContext,
|
|
78
|
-
FormGroup,
|
|
79
|
-
FormLabel,
|
|
80
|
-
useCheckboxSetValues,
|
|
81
|
-
FormText,
|
|
82
|
-
FormAutosuggest,
|
|
83
|
-
FormAutosuggestOption,
|
|
84
|
-
InputGroup,
|
|
85
|
-
} from './Form';
|
|
86
86
|
export { default as IconButtonToggle } from './IconButtonToggle';
|
|
87
87
|
/** @deprecated Replaced by `Form.Control`. */
|
|
88
88
|
export { default as Input } from './Input';
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|