stargazer-ui 1.5.12 → 1.5.13
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/.babelrc.json +10 -0
- package/.eslintrc.cjs +18 -0
- package/.gitattributes +2 -0
- package/LICENSE +21 -0
- package/dev/index.html +12 -0
- package/dev/index.jsx +46 -0
- package/dev/index.scss +74 -0
- package/dev/pages/ButtonPage.jsx +44 -0
- package/dev/pages/CardPage.jsx +81 -0
- package/dev/pages/DropdownPage.jsx +32 -0
- package/dev/pages/FormPage.jsx +155 -0
- package/dev/pages/ListPage.jsx +52 -0
- package/dev/pages/ModalPage.jsx +38 -0
- package/dev/pages/OverlayPage.jsx +39 -0
- package/dev/pages/components.jsx +19 -0
- package/dev/stargazerui.css +3762 -0
- package/dev/stargazerui.css.map +1 -0
- package/dev/test.jsx +87 -0
- package/package.json +79 -1
- package/rollup.config.js +140 -0
- package/scripts/writePackageJsons.js +42 -0
- package/src/Bar/Bar.tsx +0 -0
- package/src/Bar/Bar.type.ts +9 -0
- package/src/Bar/index.ts +0 -0
- package/src/Button/Button.tsx +20 -0
- package/src/Button/Button.types.ts +8 -0
- package/src/Button/index.ts +3 -0
- package/src/ButtonGroup/ButtonGroup.tsx +14 -0
- package/src/ButtonGroup/ButtonGroup.types.ts +8 -0
- package/src/ButtonGroup/index.ts +3 -0
- package/src/Card/Card.tsx +70 -0
- package/src/Card/Card.types.ts +33 -0
- package/src/Card/index.ts +3 -0
- package/src/CloseButton/CloseButton.tsx +14 -0
- package/src/CloseButton/CloseButton.types.ts +6 -0
- package/src/CloseButton/index.ts +3 -0
- package/src/Dropdown/Dropdown.tsx +440 -0
- package/src/Dropdown/Dropdown.types.ts +60 -0
- package/src/Dropdown/DropdownOld.tsx +409 -0
- package/src/Dropdown/index.ts +4 -0
- package/src/FileUploadButton/FileUploadButton.tsx +27 -0
- package/src/FileUploadButton/FileUploadButton.types.ts +9 -0
- package/src/FileUploadButton/index.ts +3 -0
- package/src/FloatingLabel/FloatingLabel.tsx +22 -0
- package/src/FloatingLabel/FloatingLabel.types.ts +11 -0
- package/src/FloatingLabel/index.ts +3 -0
- package/src/Form/Form.tsx +398 -0
- package/src/Form/Form.types.ts +169 -0
- package/src/Form/FormSelect.tsx +527 -0
- package/src/Form/index.ts +4 -0
- package/src/InputGroup/InputGroup.tsx +46 -0
- package/src/InputGroup/InputGroup.types.ts +22 -0
- package/src/InputGroup/index.ts +4 -0
- package/src/List/List.tsx +112 -0
- package/src/List/List.types.ts +34 -0
- package/src/List/index.ts +4 -0
- package/src/Modal/Modal.tsx +229 -0
- package/src/Modal/Modal.types.ts +49 -0
- package/src/Modal/index.ts +4 -0
- package/src/Nav/Nav.tsx +43 -0
- package/src/Nav/Nav.types.ts +21 -0
- package/src/Nav/index.ts +4 -0
- package/src/NavBar/Navbar.tsx +57 -0
- package/src/NavBar/Navbar.types.ts +24 -0
- package/src/NavBar/index.ts +4 -0
- package/src/NavDropdown/NavDropdown.tsx +93 -0
- package/src/NavDropdown/NavDropdown.types.ts +6 -0
- package/src/NavDropdown/index.ts +3 -0
- package/src/Overlay/Overlay.tsx +309 -0
- package/src/Overlay/Overlay.types.ts +24 -0
- package/{Overlay/index.d.ts → src/Overlay/index.ts} +3 -3
- package/src/Popout/Popout.tsx +155 -0
- package/src/Popout/Popout.types.ts +42 -0
- package/src/Popout/index.ts +3 -0
- package/src/Spinner/Spinner.tsx +15 -0
- package/src/Spinner/Spinner.types.ts +7 -0
- package/src/Spinner/index.ts +3 -0
- package/src/Table/Table.tsx +16 -0
- package/src/Table/Table.types.ts +9 -0
- package/src/Table/index.ts +3 -0
- package/src/Tabs/Tabs.tsx +233 -0
- package/src/Tabs/Tabs.types.ts +52 -0
- package/src/Tabs/index.ts +3 -0
- package/src/ToggleButton/ToggleButton.tsx +21 -0
- package/src/ToggleButton/ToggleButton.types.ts +8 -0
- package/src/ToggleButton/index.ts +3 -0
- package/src/assets/tooltip-pointer.svg +3 -0
- package/src/assets/warning.svg +39 -0
- package/{hooks/index.d.ts → src/hooks/index.ts} +7 -6
- package/src/hooks/useClassname.ts +5 -0
- package/src/hooks/useDraggable.ts +186 -0
- package/src/hooks/useKeepElementFocused.ts +37 -0
- package/src/hooks/useQueryParams.ts +12 -0
- package/src/hooks/useScreenSize.ts +24 -0
- package/src/index.ts +21 -0
- package/src/styles/_Card.scss +166 -0
- package/src/styles/_CloseButton.scss +51 -0
- package/src/styles/_CustomButton.scss +134 -0
- package/src/styles/_Dropdown.scss +127 -0
- package/src/styles/_FloatingLabel.scss +56 -0
- package/src/styles/_Forms.scss +7 -0
- package/src/styles/_Grid.scss +178 -0
- package/src/styles/_InputGroup.scss +71 -0
- package/src/styles/_List.scss +62 -0
- package/src/styles/_Modal.scss +234 -0
- package/src/styles/_ModalOld.scss +242 -0
- package/src/styles/_Nav.scss +36 -0
- package/src/styles/_NavBar.scss +116 -0
- package/src/styles/_NavDropdown.scss +33 -0
- package/src/styles/_OffCanvas.scss +260 -0
- package/src/styles/_OverLay.scss +64 -0
- package/src/styles/_Popout.scss +75 -0
- package/src/styles/_Spinner.scss +19 -0
- package/src/styles/_Table.scss +34 -0
- package/src/styles/_Tabs.scss +129 -0
- package/src/styles/_colors.scss +510 -0
- package/src/styles/_components.scss +40 -0
- package/src/styles/_functions.scss +134 -0
- package/src/styles/_mixins.scss +26 -0
- package/src/styles/_reset.scss +237 -0
- package/src/styles/_utilities.scss +2480 -0
- package/src/styles/_variables.scss +164 -0
- package/src/styles/forms/_FormCheck.scss +270 -0
- package/src/styles/forms/_FormControl.scss +135 -0
- package/src/styles/forms/_FormGroup.scss +26 -0
- package/src/styles/forms/_FormLabel.scss +3 -0
- package/src/styles/forms/_FormSelect.scss +196 -0
- package/src/styles/forms/_FormSlider.scss +116 -0
- package/src/styles/forms/_FormText.scss +6 -0
- package/{utils/BaseTypes.d.ts → src/utils/BaseTypes.ts} +32 -25
- package/src/utils/ContrastingColor.ts +25 -0
- package/src/utils/CreateSyntheticEvent.ts +30 -0
- package/src/utils/FileImportExport.js +50 -0
- package/src/utils/IsInputKey.ts +18 -0
- package/src/utils/MergeClassnames.ts +5 -0
- package/src/utils/MergeRefs.ts +12 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig-build.json +4 -0
- package/tsconfig.json +79 -0
- package/tsconfig.node.json +10 -0
- package/types/BaseTypes.d.ts +19 -0
- package/{Button → types/components/Button}/Button.types.d.ts +2 -1
- package/types/components/Button/index.d.ts +1 -0
- package/{Card → types/components/Card}/Card.types.d.ts +1 -3
- package/types/components/Card/index.d.ts +1 -0
- package/{CloseButton → types/components/CloseButton}/CloseButton.types.d.ts +1 -1
- package/types/components/CloseButton/index.d.ts +1 -0
- package/{Dropdown/DropdownOld.d.ts → types/components/Dropdown/Dropdown.d.ts} +3 -67
- package/{Dropdown → types/components/Dropdown}/Dropdown.types.d.ts +11 -12
- package/types/components/Dropdown/index.d.ts +1 -0
- package/{FloatingLabel → types/components/FloatingLabel}/FloatingLabel.types.d.ts +1 -1
- package/types/components/FloatingLabel/index.d.ts +1 -0
- package/types/components/Form/Form.d.ts +17 -0
- package/types/components/Form/Form.types.d.ts +50 -0
- package/types/components/Form/index.d.ts +1 -0
- package/types/components/InputGroup/InputGroup.d.ts +6 -0
- package/types/components/InputGroup/InputGroup.types.d.ts +10 -0
- package/types/components/InputGroup/index.d.ts +1 -0
- package/{Modal → types/components/Modal}/Modal.d.ts +1 -1
- package/{Modal → types/components/Modal}/Modal.types.d.ts +2 -3
- package/types/components/Modal/index.d.ts +1 -0
- package/{Nav → types/components/Nav}/Nav.types.d.ts +1 -1
- package/types/components/Nav/index.d.ts +1 -0
- package/{NavBar → types/components/NavBar}/Navbar.d.ts +2 -1
- package/{NavBar → types/components/NavBar}/Navbar.types.d.ts +1 -2
- package/types/components/NavBar/index.d.ts +1 -0
- package/types/components/NavDropdown/NavDropdown.d.ts +35 -0
- package/types/components/NavDropdown/index.d.ts +1 -0
- package/{Popout → types/components/Popout}/Popout.types.d.ts +1 -1
- package/types/components/Popout/index.d.ts +1 -0
- package/types/components/Spinner/index.d.ts +1 -0
- package/{Table → types/components/Table}/Table.types.d.ts +1 -1
- package/types/components/Table/index.d.ts +1 -0
- package/{Tabs → types/components/Tabs}/Tabs.types.d.ts +1 -12
- package/types/components/Tabs/index.d.ts +1 -0
- package/types/components/ToggleButton/ToggleButton.d.ts +9 -0
- package/types/components/ToggleButton/ToggleButton.types.d.ts +0 -0
- package/types/components/ToggleButton/index.d.ts +1 -0
- package/types/components/index.d.ts +16 -0
- package/types/index.d.ts +1 -0
- package/vite.config.js +57 -0
- package/vite.config.js.timestamp-1708777378490-e94428ceb2bf9.mjs +42 -0
- package/Bar/Bar.type.d.ts +0 -6
- package/Bar/index.js +0 -2
- package/Bar/index.js.map +0 -1
- package/Bar/package.json +0 -1
- package/Button/Button.js +0 -15
- package/Button/Button.js.map +0 -1
- package/Button/index.d.ts +0 -3
- package/Button/index.js +0 -7
- package/Button/index.js.map +0 -1
- package/Button/package.json +0 -1
- package/ButtonGroup/ButtonGroup.d.ts +0 -4
- package/ButtonGroup/ButtonGroup.js +0 -11
- package/ButtonGroup/ButtonGroup.js.map +0 -1
- package/ButtonGroup/ButtonGroup.types.d.ts +0 -7
- package/ButtonGroup/index.d.ts +0 -3
- package/ButtonGroup/index.js +0 -7
- package/ButtonGroup/index.js.map +0 -1
- package/ButtonGroup/package.json +0 -1
- package/Card/Card.js +0 -42
- package/Card/Card.js.map +0 -1
- package/Card/index.d.ts +0 -3
- package/Card/index.js +0 -7
- package/Card/index.js.map +0 -1
- package/Card/package.json +0 -1
- package/CloseButton/CloseButton.js +0 -11
- package/CloseButton/CloseButton.js.map +0 -1
- package/CloseButton/index.d.ts +0 -3
- package/CloseButton/index.js +0 -7
- package/CloseButton/index.js.map +0 -1
- package/CloseButton/package.json +0 -1
- package/Dropdown/Dropdown.d.ts +0 -135
- package/Dropdown/Dropdown.js +0 -377
- package/Dropdown/Dropdown.js.map +0 -1
- package/Dropdown/index.d.ts +0 -4
- package/Dropdown/index.js +0 -8
- package/Dropdown/index.js.map +0 -1
- package/Dropdown/package.json +0 -1
- package/FileUploadButton/FileUploadButton.d.ts +0 -4
- package/FileUploadButton/FileUploadButton.js +0 -20
- package/FileUploadButton/FileUploadButton.js.map +0 -1
- package/FileUploadButton/FileUploadButton.types.d.ts +0 -7
- package/FileUploadButton/index.d.ts +0 -3
- package/FileUploadButton/index.js +0 -7
- package/FileUploadButton/index.js.map +0 -1
- package/FileUploadButton/package.json +0 -1
- package/FloatingLabel/FloatingLabel.js +0 -15
- package/FloatingLabel/FloatingLabel.js.map +0 -1
- package/FloatingLabel/index.d.ts +0 -3
- package/FloatingLabel/index.js +0 -7
- package/FloatingLabel/index.js.map +0 -1
- package/FloatingLabel/package.json +0 -1
- package/Form/Form.d.ts +0 -38
- package/Form/Form.js +0 -227
- package/Form/Form.js.map +0 -1
- package/Form/Form.types.d.ts +0 -159
- package/Form/FormSelect.d.ts +0 -15
- package/Form/FormSelect.js +0 -436
- package/Form/FormSelect.js.map +0 -1
- package/Form/index.d.ts +0 -4
- package/Form/index.js +0 -8
- package/Form/index.js.map +0 -1
- package/Form/package.json +0 -1
- package/InputGroup/InputGroup.d.ts +0 -7
- package/InputGroup/InputGroup.js +0 -31
- package/InputGroup/InputGroup.js.map +0 -1
- package/InputGroup/InputGroup.types.d.ts +0 -17
- package/InputGroup/index.d.ts +0 -4
- package/InputGroup/index.js +0 -7
- package/InputGroup/index.js.map +0 -1
- package/InputGroup/package.json +0 -1
- package/List/List.d.ts +0 -14
- package/List/List.js +0 -77
- package/List/List.js.map +0 -1
- package/List/List.types.d.ts +0 -28
- package/List/index.d.ts +0 -3
- package/List/index.js +0 -7
- package/List/index.js.map +0 -1
- package/List/package.json +0 -1
- package/Modal/Modal.js +0 -157
- package/Modal/Modal.js.map +0 -1
- package/Modal/index.d.ts +0 -3
- package/Modal/index.js +0 -7
- package/Modal/index.js.map +0 -1
- package/Modal/package.json +0 -1
- package/Nav/Nav.js +0 -29
- package/Nav/Nav.js.map +0 -1
- package/Nav/index.d.ts +0 -4
- package/Nav/index.js +0 -7
- package/Nav/index.js.map +0 -1
- package/Nav/package.json +0 -1
- package/NavBar/Navbar.js +0 -36
- package/NavBar/Navbar.js.map +0 -1
- package/NavBar/index.d.ts +0 -4
- package/NavBar/index.js +0 -8
- package/NavBar/index.js.map +0 -1
- package/NavBar/package.json +0 -1
- package/NavDropdown/NavDropdown.d.ts +0 -99
- package/NavDropdown/NavDropdown.js +0 -75
- package/NavDropdown/NavDropdown.js.map +0 -1
- package/NavDropdown/index.d.ts +0 -3
- package/NavDropdown/index.js +0 -7
- package/NavDropdown/index.js.map +0 -1
- package/NavDropdown/package.json +0 -1
- package/Overlay/Overlay.d.ts +0 -4
- package/Overlay/Overlay.js +0 -242
- package/Overlay/Overlay.js.map +0 -1
- package/Overlay/Overlay.types.d.ts +0 -22
- package/Overlay/index.js +0 -7
- package/Overlay/index.js.map +0 -1
- package/Overlay/package.json +0 -1
- package/Popout/Popout.js +0 -111
- package/Popout/Popout.js.map +0 -1
- package/Popout/index.d.ts +0 -3
- package/Popout/index.js +0 -7
- package/Popout/index.js.map +0 -1
- package/Popout/package.json +0 -1
- package/Spinner/Spinner.js +0 -11
- package/Spinner/Spinner.js.map +0 -1
- package/Spinner/index.d.ts +0 -3
- package/Spinner/index.js +0 -7
- package/Spinner/index.js.map +0 -1
- package/Spinner/package.json +0 -1
- package/Table/Table.js +0 -12
- package/Table/Table.js.map +0 -1
- package/Table/index.d.ts +0 -3
- package/Table/index.js +0 -7
- package/Table/index.js.map +0 -1
- package/Table/package.json +0 -1
- package/Tabs/Tabs.js +0 -162
- package/Tabs/Tabs.js.map +0 -1
- package/Tabs/index.d.ts +0 -3
- package/Tabs/index.js +0 -7
- package/Tabs/index.js.map +0 -1
- package/Tabs/package.json +0 -1
- package/ToggleButton/ToggleButton.d.ts +0 -4
- package/ToggleButton/ToggleButton.js +0 -18
- package/ToggleButton/ToggleButton.js.map +0 -1
- package/ToggleButton/ToggleButton.types.d.ts +0 -7
- package/ToggleButton/index.d.ts +0 -3
- package/ToggleButton/index.js +0 -7
- package/ToggleButton/index.js.map +0 -1
- package/ToggleButton/package.json +0 -1
- package/hooks/index.js +0 -7
- package/hooks/index.js.map +0 -1
- package/hooks/package.json +0 -1
- package/hooks/useClassname.d.ts +0 -2
- package/hooks/useClassname.js +0 -7
- package/hooks/useClassname.js.map +0 -1
- package/hooks/useDraggable.d.ts +0 -23
- package/hooks/useDraggable.js +0 -147
- package/hooks/useDraggable.js.map +0 -1
- package/hooks/useKeepElementFocused.d.ts +0 -2
- package/hooks/useKeepElementFocused.js +0 -37
- package/hooks/useKeepElementFocused.js.map +0 -1
- package/hooks/useQueryParams.d.ts +0 -2
- package/hooks/useQueryParams.js +0 -13
- package/hooks/useQueryParams.js.map +0 -1
- package/hooks/useScreenSize.d.ts +0 -5
- package/hooks/useScreenSize.js +0 -21
- package/hooks/useScreenSize.js.map +0 -1
- package/index.d.ts +0 -18
- package/index.js +0 -19
- package/index.js.map +0 -1
- package/styles/stargazerui.css +0 -6552
- package/styles/stargazerui.css.map +0 -1
- package/utils/ContrastingColor.d.ts +0 -1
- package/utils/CreateSyntheticEvent.d.ts +0 -3
- package/utils/CreateSyntheticEvent.js +0 -33
- package/utils/CreateSyntheticEvent.js.map +0 -1
- package/utils/IsInputKey.d.ts +0 -7
- package/utils/IsInputKey.js +0 -20
- package/utils/IsInputKey.js.map +0 -1
- package/utils/MergeClassnames.d.ts +0 -2
- package/utils/MergeClassnames.js +0 -7
- package/utils/MergeClassnames.js.map +0 -1
- package/utils/MergeRefs.d.ts +0 -2
- package/utils/MergeRefs.js +0 -16
- package/utils/MergeRefs.js.map +0 -1
- /package/{Button → types/components/Button}/Button.d.ts +0 -0
- /package/{Card → types/components/Card}/Card.d.ts +0 -0
- /package/{CloseButton → types/components/CloseButton}/CloseButton.d.ts +0 -0
- /package/{FloatingLabel → types/components/FloatingLabel}/FloatingLabel.d.ts +0 -0
- /package/{Nav → types/components/Nav}/Nav.d.ts +0 -0
- /package/{NavDropdown → types/components/NavDropdown}/NavDropdown.types.d.ts +0 -0
- /package/{Popout → types/components/Popout}/Popout.d.ts +0 -0
- /package/{Spinner → types/components/Spinner}/Spinner.d.ts +0 -0
- /package/{Spinner → types/components/Spinner}/Spinner.types.d.ts +0 -0
- /package/{Table → types/components/Table}/Table.d.ts +0 -0
- /package/{Tabs → types/components/Tabs}/Tabs.d.ts +0 -0
package/Form/Form.js
DELETED
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
-
import { forwardRef, createContext, useContext, useMemo, useState, useRef } from 'react';
|
|
4
|
-
import useClassname from '../hooks/useClassname.js';
|
|
5
|
-
import mergeClassnames from '../utils/MergeClassnames.js';
|
|
6
|
-
import mergeRefs from '../utils/MergeRefs.js';
|
|
7
|
-
import Overlay from '../Overlay/Overlay.js';
|
|
8
|
-
import Select from './FormSelect.js';
|
|
9
|
-
|
|
10
|
-
const WarningIcon = forwardRef(({ className, alt, color, size, ...restProps }, ref) => {
|
|
11
|
-
const sizeComputed = { width: size ?? "1rem", height: size ?? "1rem" };
|
|
12
|
-
const classNameComputed = mergeClassnames("sg-form-control-error-icon", className);
|
|
13
|
-
return (jsxs("svg", { ref: ref, className: classNameComputed, color: color ?? "currentColor", xmlns: "http://www.w3.org/2000/svg", width: sizeComputed.width, height: sizeComputed.height, viewBox: "0 0 256 256", ...restProps, children: [jsx("path", { fill: "transparent", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 28, d: "M128 83v65" }), jsx("circle", { cx: 128, cy: 183, r: 14, fill: "currentColor" }), jsx("path", { fill: "transparent", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 20, d: "M40 223h176l16-32-79-158h-50L24 191l16 32Z" })] }));
|
|
14
|
-
});
|
|
15
|
-
WarningIcon.displayName = "WarningIcon";
|
|
16
|
-
const FormTagContext = createContext(null);
|
|
17
|
-
const FormTagContextProvider = ({ children, value }) => {
|
|
18
|
-
return (jsx(FormTagContext.Provider, { value: value, children: children }));
|
|
19
|
-
};
|
|
20
|
-
const useFormTagContext = () => {
|
|
21
|
-
const context = useContext(FormTagContext);
|
|
22
|
-
if (!context) {
|
|
23
|
-
return { noValidate: null };
|
|
24
|
-
}
|
|
25
|
-
return context;
|
|
26
|
-
};
|
|
27
|
-
const FormContext = createContext(null);
|
|
28
|
-
const FormContextProvider = ({ children, value }) => {
|
|
29
|
-
return (jsx(FormContext.Provider, { value: value, children: children }));
|
|
30
|
-
};
|
|
31
|
-
const useFormContext = () => {
|
|
32
|
-
const context = useContext(FormContext);
|
|
33
|
-
if (!context) {
|
|
34
|
-
return {};
|
|
35
|
-
}
|
|
36
|
-
return context;
|
|
37
|
-
};
|
|
38
|
-
const Form = forwardRef(({ children, noValidate, ...restProps }, ref) => {
|
|
39
|
-
const context = useMemo(() => {
|
|
40
|
-
return { noValidate: !!noValidate };
|
|
41
|
-
}, [noValidate]);
|
|
42
|
-
return (jsx("form", { ref: ref, noValidate: noValidate, ...restProps, children: jsx(FormTagContextProvider, { value: context, children: children }) }));
|
|
43
|
-
});
|
|
44
|
-
Form.displayName = "Form";
|
|
45
|
-
const ErrorMessage = forwardRef(({ children, className, id, message, ...restProps }, ref) => {
|
|
46
|
-
const classNameComputed = mergeClassnames("sg-form-control-error", className);
|
|
47
|
-
return (jsxs("p", { ref: ref, id: id + "-error-message", className: classNameComputed, ...restProps, children: [jsx(WarningIcon, { width: "1.25em", height: "1.25em" }), jsx("span", { children: message ?? children })] }));
|
|
48
|
-
});
|
|
49
|
-
ErrorMessage.displayName = "ErrorMessage";
|
|
50
|
-
const HintMessage = forwardRef(({ children, className, id, message, ...restProps }, ref) => {
|
|
51
|
-
const classNameComputed = mergeClassnames("sg-form-control-hint", className);
|
|
52
|
-
return (jsx(Fragment, { children: message ?
|
|
53
|
-
jsx("p", { ref: ref, id: id + "-hint-message", className: classNameComputed, ...restProps, children: message })
|
|
54
|
-
:
|
|
55
|
-
jsx("div", { ref: ref, id: id, className: classNameComputed, ...restProps, children: children }) }));
|
|
56
|
-
});
|
|
57
|
-
HintMessage.displayName = "HintMessage";
|
|
58
|
-
const Control = forwardRef(({ as = "input", className = "", plaintext = false, id, type = "text", autoFocus = false, error, errorAsOverlay = false, hint, required, "aria-describedby": ariaDescribedby, ...restProps }, ref) => {
|
|
59
|
-
let Component = as;
|
|
60
|
-
const { noValidate } = useFormTagContext();
|
|
61
|
-
const { controlId, isInputGroup, isFLoatingLabel } = useFormContext();
|
|
62
|
-
const isOverlay = isInputGroup || isFLoatingLabel || errorAsOverlay;
|
|
63
|
-
let elementId = id ?? controlId;
|
|
64
|
-
let computedClassName = mergeClassnames(plaintext ? "sg-form-control-plaintext" : "sg-form-control", className != "" ? className : "", type == "color" ? "sg-form-control-color" : "", error ? "invalid" : "");
|
|
65
|
-
const errorMessageId = error ? elementId + "-error-message" : undefined;
|
|
66
|
-
const hintMessageId = hint ? elementId + "-hint-message" : undefined;
|
|
67
|
-
const tooltipMessage = isOverlay && (error || hint) ?
|
|
68
|
-
jsxs("div", { className: "sg-form-control-description tooltip", children: [error ? jsx(ErrorMessage, { id: errorMessageId, message: error.message }) : null, hint ? jsx(HintMessage, { id: hintMessageId, message: hint.message }) : null] }) : undefined; // "Testing a tooltip with a long message. This messsage is so long it hsould in theory trigger a wrap."
|
|
69
|
-
const describedby = mergeClassnames(ariaDescribedby, errorMessageId, hintMessageId);
|
|
70
|
-
return (jsxs(Fragment, { children: [jsx(Overlay, { trigger: "focus", position: "top", tooltip: tooltipMessage, children: jsx(Component, { required: (required && !noValidate) ?? undefined, "aria-required": required ?? undefined, "aria-invalid": error ? "true" : "false", "aria-describedby": describedby != "" ? describedby : null, autoFocus: autoFocus, ref: ref, id: elementId, type: type, className: computedClassName, ...restProps }) }), jsxs("div", { className: "sg-form-control-description", children: [error && !isOverlay ?
|
|
71
|
-
jsx(ErrorMessage, { id: elementId, message: error.message, style: error.style, className: error.className })
|
|
72
|
-
: null, hint && !isOverlay ?
|
|
73
|
-
jsx(HintMessage, { id: elementId, message: hint.message, style: hint.style, className: hint.className })
|
|
74
|
-
: null] })] }));
|
|
75
|
-
});
|
|
76
|
-
Control.displayName = "FormControl";
|
|
77
|
-
const Group = forwardRef(({ children, className, controlId, vertical, ...restProps }, ref) => {
|
|
78
|
-
const context = useMemo(() => {
|
|
79
|
-
return { controlId: controlId };
|
|
80
|
-
}, [controlId]);
|
|
81
|
-
return (jsx("div", { ref: ref, className: `sg-form-group${className ? " " + className : ""}${vertical ? " sg-form-group-vertical" : ""}`, ...restProps, children: jsx(FormContextProvider, { value: context, children: children }) }));
|
|
82
|
-
});
|
|
83
|
-
Group.displayName = "FormGroup";
|
|
84
|
-
const Label = forwardRef(({ children, className, htmlFor, ...restProps }, ref) => {
|
|
85
|
-
const { controlId } = useFormContext();
|
|
86
|
-
let elementHtmlFor = htmlFor ?? controlId;
|
|
87
|
-
return (jsx("label", { ref: ref, htmlFor: elementHtmlFor, className: `sg-form-label${className ? " " + className : ""}`, ...restProps, children: children }));
|
|
88
|
-
});
|
|
89
|
-
Label.displayName = "FormLabel";
|
|
90
|
-
const Check = forwardRef(({ children, classNameContainer, containerRef, containerId, styleContainer, classNameLabel, labelRef, label, labelId, styleLabel, className, type = "checkbox", id, reverse = false, style, onChange, required, ...restProps }, ref) => {
|
|
91
|
-
const { noValidate } = useFormTagContext();
|
|
92
|
-
const { controlId } = useFormContext();
|
|
93
|
-
const typeComputed = !["radio", "checkbox", "color"].includes(type) ? "checkbox" : type;
|
|
94
|
-
const classNameComputed = mergeClassnames("sg-form-check-input", className ?? "");
|
|
95
|
-
const classNameLabelComputed = mergeClassnames("sg-form-check-label", classNameLabel ?? "");
|
|
96
|
-
const classNameContainerComputed = mergeClassnames("sg-form-check", reverse ? " sg-form-check-reverse" : "", classNameContainer ?? "", type === "switch" ? " sg-form-switch" : "");
|
|
97
|
-
useState({});
|
|
98
|
-
const onChangeInternal = (event) => {
|
|
99
|
-
//setContrastColor({backgroundColor: "#"+contrastingColor(event.target.value)})
|
|
100
|
-
if (onChange)
|
|
101
|
-
onChange(event);
|
|
102
|
-
};
|
|
103
|
-
//required={(required && !noValidate) ?? undefined} aria-required={required ?? undefined}
|
|
104
|
-
const elementId = id ?? controlId;
|
|
105
|
-
return (jsx("div", { ref: containerRef, id: containerId, style: styleContainer, className: classNameContainerComputed, children: controlId ?
|
|
106
|
-
jsx("input", { required: (required && !noValidate) ?? undefined, "aria-required": required ?? undefined, id: controlId, ref: ref, type: typeComputed, style: style, className: classNameComputed, onChange: event => onChangeInternal(event), ...restProps })
|
|
107
|
-
:
|
|
108
|
-
jsxs("label", { ref: labelRef, htmlFor: elementId, id: labelId, style: styleLabel, className: classNameLabelComputed, children: [reverse ? jsx("span", { children: children ?? label }) : null, jsx("input", { required: (required && !noValidate) ?? undefined, "aria-required": required ?? undefined, ref: ref, type: typeComputed, style: style, id: elementId, className: classNameComputed, onChange: event => onChangeInternal(event), ...restProps }), !reverse ? jsx("span", { children: children ?? label }) : null] }) }));
|
|
109
|
-
});
|
|
110
|
-
Check.displayName = "FormCheck";
|
|
111
|
-
const Text = forwardRef(({ children, className, ...restProps }, ref) => {
|
|
112
|
-
return (jsx("small", { ref: ref, className: `sg-form-text${className ? " " + className : ""}`, ...restProps, children: children }));
|
|
113
|
-
});
|
|
114
|
-
Check.displayName = "FormText";
|
|
115
|
-
createContext(null);
|
|
116
|
-
const Slider = forwardRef(({ className, style, controlId, min = 1, max = 10, step = 1, defaultValue = 6, value, onChange, ...restProps }, ref) => {
|
|
117
|
-
const internalRef = useRef(null);
|
|
118
|
-
//if(internalRef.current) console.log(internalRef.current)
|
|
119
|
-
const trackEmpty = useRef(null);
|
|
120
|
-
const trackFilled = useRef(null);
|
|
121
|
-
const thumbRef = useRef(null);
|
|
122
|
-
const [internalValue, setInternalValue] = useState(value ? value + 1 - min : defaultValue - min);
|
|
123
|
-
if (value && value != internalValue + min) {
|
|
124
|
-
setInternalValue(value - min);
|
|
125
|
-
}
|
|
126
|
-
const internalMin = min < 1 ? 1 : min;
|
|
127
|
-
const internalMax = min < 1 ? max + 1 - min : max;
|
|
128
|
-
const [isGrabbing, setIsGrabbing] = useState(false);
|
|
129
|
-
const updateValue = (value) => {
|
|
130
|
-
let parsedValue = value < internalMin - 1 ? internalMin - 1 : value;
|
|
131
|
-
parsedValue = parsedValue > internalMax - internalMin ? internalMax - internalMin : parsedValue;
|
|
132
|
-
if (parsedValue === internalValue)
|
|
133
|
-
return;
|
|
134
|
-
setInternalValue(parsedValue);
|
|
135
|
-
if (onChange) {
|
|
136
|
-
onChange(Math.abs(parsedValue) + min);
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
const getNearestStep = (event, targetElement) => {
|
|
140
|
-
const { pageX } = event;
|
|
141
|
-
const paddingLeft = parseFloat(window.getComputedStyle(targetElement, null).getPropertyValue('padding-left'));
|
|
142
|
-
const leftEdge = targetElement.getBoundingClientRect().left + paddingLeft;
|
|
143
|
-
const width = targetElement.scrollWidth - 2 * paddingLeft;
|
|
144
|
-
const thresholdDeltaX = width * (step) / (internalMax - internalMin);
|
|
145
|
-
const relativeMousePositionX = (pageX - leftEdge) / thresholdDeltaX < 0 ? 0 : (pageX - leftEdge) / thresholdDeltaX;
|
|
146
|
-
const nearestStep = Math.round((pageX - leftEdge) / thresholdDeltaX);
|
|
147
|
-
return { relativeMousePositionX, nearestStep };
|
|
148
|
-
};
|
|
149
|
-
const onPointerDownTrack = (event) => {
|
|
150
|
-
if (!internalRef.current)
|
|
151
|
-
return;
|
|
152
|
-
const { nearestStep } = getNearestStep(event, internalRef.current);
|
|
153
|
-
updateValue(nearestStep * step);
|
|
154
|
-
};
|
|
155
|
-
const onPointerDown = (event) => {
|
|
156
|
-
event.target.setPointerCapture(event.pointerId);
|
|
157
|
-
setIsGrabbing(true);
|
|
158
|
-
if (!thumbRef.current)
|
|
159
|
-
return;
|
|
160
|
-
};
|
|
161
|
-
const onPointerMove = (event) => {
|
|
162
|
-
if (!isGrabbing)
|
|
163
|
-
return;
|
|
164
|
-
if (!internalRef.current)
|
|
165
|
-
return;
|
|
166
|
-
const { relativeMousePositionX, nearestStep } = getNearestStep(event, internalRef.current);
|
|
167
|
-
//console.log(nearestStep)
|
|
168
|
-
const lowerBoundary = nearestStep === 0 || relativeMousePositionX === 0 ? -0.05 : 0.95 * nearestStep;
|
|
169
|
-
const upperBoundary = nearestStep === 0 || relativeMousePositionX === 0 ? 0.05 : 1.05 * nearestStep;
|
|
170
|
-
if (lowerBoundary < relativeMousePositionX && relativeMousePositionX < upperBoundary) {
|
|
171
|
-
updateValue(nearestStep * step);
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
const onPointerUp = (event) => {
|
|
175
|
-
setIsGrabbing(false);
|
|
176
|
-
};
|
|
177
|
-
const onKeyDown = (event) => {
|
|
178
|
-
switch (event.key) {
|
|
179
|
-
case "ArrowLeft":
|
|
180
|
-
case "ArrowDown":
|
|
181
|
-
updateValue(internalValue - 1);
|
|
182
|
-
event.preventDefault();
|
|
183
|
-
break;
|
|
184
|
-
case "ArrowRight":
|
|
185
|
-
case "ArrowUp":
|
|
186
|
-
updateValue(internalValue + 1);
|
|
187
|
-
event.preventDefault();
|
|
188
|
-
break;
|
|
189
|
-
case "End":
|
|
190
|
-
updateValue(internalMax - 1);
|
|
191
|
-
event.preventDefault();
|
|
192
|
-
break;
|
|
193
|
-
case "Home":
|
|
194
|
-
updateValue(internalMin - 1);
|
|
195
|
-
event.preventDefault();
|
|
196
|
-
break;
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
const filled = (internalValue) / (internalMax - internalMin);
|
|
200
|
-
const pointerActions = { onPointerDown, onPointerMove, onPointerUp };
|
|
201
|
-
return (jsxs("div", { onPointerDown: onPointerDownTrack, ref: mergeRefs([ref, internalRef]), id: controlId, style: { ...style, "--filled": filled * 100 + "%" }, className: useClassname("sg-form-slider", className), children: [jsx("span", { ref: trackFilled, className: "sg-form-slider-filled", id: controlId + "-track-filled" }), jsx("span", { role: "slider", tabIndex: 0, ref: thumbRef, "data-grabbing": isGrabbing, id: controlId + "-track-thumb", ...pointerActions, onKeyDown: onKeyDown, className: "sg-form-slider-thumb", "aria-valuenow": internalValue + min, "aria-valuemax": max, "aria-valuemin": min, ...restProps }), jsx("span", { ref: trackEmpty, className: "sg-form-slider-empty", id: controlId + "-track-empty" })] }));
|
|
202
|
-
});
|
|
203
|
-
Slider.displayName = "FormSlider";
|
|
204
|
-
const SelectTag = forwardRef(({ children, className, id, required, ...restProps }, ref) => {
|
|
205
|
-
const { noValidate } = useFormTagContext();
|
|
206
|
-
const { controlId } = useFormContext();
|
|
207
|
-
const elementId = id ?? controlId;
|
|
208
|
-
const classNameComputed = mergeClassnames("sg-form-select-tag", className ?? "");
|
|
209
|
-
return (jsx("select", { ref: ref, required: (required && !noValidate) ?? undefined, "aria-required": required ?? undefined, className: classNameComputed, id: elementId, ...restProps, children: children }));
|
|
210
|
-
});
|
|
211
|
-
SelectTag.displayName = "FormSelectTag";
|
|
212
|
-
var Form$1 = Object.assign(Form, {
|
|
213
|
-
Control: Control,
|
|
214
|
-
Select: Select,
|
|
215
|
-
SelectTag: SelectTag,
|
|
216
|
-
Group: Group,
|
|
217
|
-
Label: Label,
|
|
218
|
-
Check: Check,
|
|
219
|
-
Text: Text,
|
|
220
|
-
Slider: Slider,
|
|
221
|
-
WarningIcon: WarningIcon,
|
|
222
|
-
Hint: HintMessage,
|
|
223
|
-
Error: ErrorMessage
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
export { ErrorMessage, FormContext, FormContextProvider, HintMessage, Form$1 as default, useFormContext, useFormTagContext };
|
|
227
|
-
//# sourceMappingURL=Form.js.map
|
package/Form/Form.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../src/Form/Form.tsx"],"sourcesContent":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EAAC,GAAG,SAAS,EAAC,EAAE,GAAG,KAAI;AAC1H,IAAA,MAAM,EAAE,UAAU,EAAE,GAAG,iBAAiB,EAAE,CAAA;AAC1C,IAAA,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,EAAE,CAAA;AACtC,IAAA,MAAM,SAAS,GAAG,EAAE,IAAI,SAAS,CAAA;IACjC,MAAM,iBAAiB,GAAG,eAAe,CAAC,oBAAoB,EAAE,SAAS,IAAI,EAAE,CAAC,CAAA;AAChF,IAAA,QACIA,GAAA,CAAA,QAAA,EAAA,EAAQ,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,QAAQ,IAAI,CAAC,UAAU,KAAK,SAAS,EAAA,eAAA,EAAiB,QAAQ,IAAI,SAAS,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,EAAE,SAAS,KAAM,SAAS,EAAA,QAAA,EAC/J,QAAQ,EAAA,CACJ,EACZ;AACL,CAAC,CAAC,CAAA;AACF,SAAS,CAAC,WAAW,GAAG,eAAe,CAAA;AAEvC,aAAgB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;AAChC,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,MAAM,EAAG,MAAM;AACf,IAAA,SAAS,EAAE,SAAS;AACpB,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,MAAM,EAAE,MAAM;AACd,IAAA,WAAW,EAAE,WAAW;AACxB,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,KAAK,EAAE,YAAY;AACtB,CAAA,CAAC;;;;"}
|
package/Form/Form.types.d.ts
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { ReactNode, Dispatch } from "react";
|
|
2
|
-
import { BaseElementType, BaseParagraphType, BaseDivType, BaseFormType, BaseInputType, BaseLabelType, BaseLItemType, BaseSelectType, BaseSpanType, BaseSmallType, BaseUListType, BaseSVGType, BaseButtonType } from "../utils/BaseTypes";
|
|
3
|
-
export type FormTagContextType = {
|
|
4
|
-
noValidate: boolean;
|
|
5
|
-
};
|
|
6
|
-
export type FormContextType = {
|
|
7
|
-
controlId?: string;
|
|
8
|
-
isInputGroup?: boolean;
|
|
9
|
-
isFLoatingLabel?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export type FormType = {
|
|
12
|
-
children: ReactNode;
|
|
13
|
-
} & BaseFormType;
|
|
14
|
-
type ErrorMessageType = {
|
|
15
|
-
message: string;
|
|
16
|
-
type?: string;
|
|
17
|
-
className?: string;
|
|
18
|
-
style?: React.CSSProperties;
|
|
19
|
-
} & BaseParagraphType;
|
|
20
|
-
type HintMessageType = {
|
|
21
|
-
message: string;
|
|
22
|
-
custom?: boolean;
|
|
23
|
-
className?: string;
|
|
24
|
-
style?: React.CSSProperties;
|
|
25
|
-
} & BaseParagraphType;
|
|
26
|
-
export type ErrorType = {
|
|
27
|
-
children?: ReactNode;
|
|
28
|
-
} & ErrorMessageType;
|
|
29
|
-
export type HintType = {
|
|
30
|
-
children?: ReactNode;
|
|
31
|
-
} & HintMessageType;
|
|
32
|
-
export type FormControlType = {
|
|
33
|
-
as?: React.ElementType;
|
|
34
|
-
className?: string;
|
|
35
|
-
plaintext?: boolean;
|
|
36
|
-
id?: string;
|
|
37
|
-
type?: string;
|
|
38
|
-
autoFocus?: boolean;
|
|
39
|
-
error?: ErrorMessageType;
|
|
40
|
-
errorAsOverlay?: boolean;
|
|
41
|
-
hint?: HintMessageType;
|
|
42
|
-
} & BaseInputType;
|
|
43
|
-
export type SelectContextType = {
|
|
44
|
-
internalId?: string;
|
|
45
|
-
showList: boolean;
|
|
46
|
-
setShowList: Dispatch<React.SetStateAction<boolean>>;
|
|
47
|
-
activeDescendant: any;
|
|
48
|
-
setActiveDescendant: Dispatch<React.SetStateAction<any>>;
|
|
49
|
-
inputValue: string;
|
|
50
|
-
setInputValue: Dispatch<React.SetStateAction<string>>;
|
|
51
|
-
selectedDescendant: any;
|
|
52
|
-
setSelectedDescendant: Dispatch<React.SetStateAction<any>>;
|
|
53
|
-
children: ReactNode;
|
|
54
|
-
};
|
|
55
|
-
export type FormSelectTagType = {
|
|
56
|
-
children: ReactNode;
|
|
57
|
-
className?: string;
|
|
58
|
-
id?: string;
|
|
59
|
-
required?: boolean;
|
|
60
|
-
value?: any;
|
|
61
|
-
error?: ErrorMessageType;
|
|
62
|
-
errorAsOverlay?: boolean;
|
|
63
|
-
hint?: HintMessageType;
|
|
64
|
-
} & BaseSelectType;
|
|
65
|
-
export type FormSelectType = {
|
|
66
|
-
children: ReactNode;
|
|
67
|
-
className?: string;
|
|
68
|
-
id?: string;
|
|
69
|
-
required?: boolean;
|
|
70
|
-
value?: any;
|
|
71
|
-
error?: ErrorMessageType;
|
|
72
|
-
errorAsOverlay?: boolean;
|
|
73
|
-
hint?: HintMessageType;
|
|
74
|
-
loading?: boolean;
|
|
75
|
-
} & FormSelectControlType;
|
|
76
|
-
export type FormSelectControlType = {
|
|
77
|
-
children?: ReactNode;
|
|
78
|
-
required?: boolean;
|
|
79
|
-
className?: string;
|
|
80
|
-
placeholder?: string;
|
|
81
|
-
searchable?: boolean;
|
|
82
|
-
value: any;
|
|
83
|
-
label: ReactNode;
|
|
84
|
-
} & BaseButtonType;
|
|
85
|
-
export type FormSelectInputType = {
|
|
86
|
-
className?: string;
|
|
87
|
-
id?: string;
|
|
88
|
-
} & BaseInputType;
|
|
89
|
-
export type FormSelectListType = {
|
|
90
|
-
children: ReactNode;
|
|
91
|
-
className?: string;
|
|
92
|
-
id?: string;
|
|
93
|
-
} & BaseUListType;
|
|
94
|
-
export type FormSelectOptionType = {
|
|
95
|
-
children?: ReactNode;
|
|
96
|
-
className?: string;
|
|
97
|
-
value: string;
|
|
98
|
-
disabled?: boolean;
|
|
99
|
-
label?: string;
|
|
100
|
-
selected?: boolean;
|
|
101
|
-
type?: string;
|
|
102
|
-
} & BaseLItemType & BaseElementType;
|
|
103
|
-
export type FormGroupType = {
|
|
104
|
-
children: ReactNode;
|
|
105
|
-
className?: string;
|
|
106
|
-
controlId: string;
|
|
107
|
-
vertical?: boolean;
|
|
108
|
-
} & BaseDivType;
|
|
109
|
-
export type FormLabelType = {
|
|
110
|
-
children: ReactNode;
|
|
111
|
-
className?: string;
|
|
112
|
-
htmlFor?: string;
|
|
113
|
-
} & BaseLabelType;
|
|
114
|
-
export type FormCheckType = {
|
|
115
|
-
children?: ReactNode;
|
|
116
|
-
style?: React.CSSProperties;
|
|
117
|
-
classNameContainer?: string;
|
|
118
|
-
containerRef?: React.LegacyRef<HTMLDivElement>;
|
|
119
|
-
containerId?: string;
|
|
120
|
-
styleContainer?: React.CSSProperties;
|
|
121
|
-
classNameLabel?: string;
|
|
122
|
-
labelRef?: React.LegacyRef<HTMLLabelElement>;
|
|
123
|
-
label?: string;
|
|
124
|
-
labelId?: string;
|
|
125
|
-
styleLabel?: React.CSSProperties;
|
|
126
|
-
className?: string;
|
|
127
|
-
type?: string;
|
|
128
|
-
controlId?: string;
|
|
129
|
-
reverse?: boolean;
|
|
130
|
-
} & BaseInputType;
|
|
131
|
-
export type FormTextType = {
|
|
132
|
-
children: ReactNode;
|
|
133
|
-
className?: string;
|
|
134
|
-
} & BaseSmallType;
|
|
135
|
-
export type FormSliderType = {
|
|
136
|
-
children?: ReactNode;
|
|
137
|
-
className?: string;
|
|
138
|
-
style?: React.CSSProperties;
|
|
139
|
-
controlId: string;
|
|
140
|
-
min?: number;
|
|
141
|
-
max?: number;
|
|
142
|
-
step?: number;
|
|
143
|
-
defaultValue?: number;
|
|
144
|
-
value: number;
|
|
145
|
-
onChange(value: number): () => any;
|
|
146
|
-
} & BaseSpanType;
|
|
147
|
-
export type SliderContextType = {
|
|
148
|
-
children: ReactNode;
|
|
149
|
-
controlId: string;
|
|
150
|
-
min?: number;
|
|
151
|
-
max?: number;
|
|
152
|
-
step?: number;
|
|
153
|
-
};
|
|
154
|
-
export type WarningIconType = {
|
|
155
|
-
alt?: string;
|
|
156
|
-
size?: string | number;
|
|
157
|
-
color?: string;
|
|
158
|
-
} & BaseSVGType;
|
|
159
|
-
export {};
|
package/Form/FormSelect.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FormSelectType, FormSelectControlType, FormSelectInputType, FormSelectListType, FormSelectOptionType, SelectContextType } from "./Form.types";
|
|
3
|
-
export declare const SelectContext: import("react").Context<SelectContextType | null>;
|
|
4
|
-
export declare const SelectContextProvider: ({ children, value }: {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
value: SelectContextType;
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare const useSelectContext: () => SelectContextType;
|
|
9
|
-
declare const _default: import("react").ForwardRefExoticComponent<Omit<FormSelectType, "ref"> & import("react").RefAttributes<HTMLButtonElement>> & {
|
|
10
|
-
Control: import("react").ForwardRefExoticComponent<Omit<FormSelectControlType, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
11
|
-
Input: import("react").ForwardRefExoticComponent<Omit<FormSelectInputType, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
12
|
-
Options: import("react").ForwardRefExoticComponent<Omit<FormSelectListType, "ref"> & import("react").RefAttributes<HTMLUListElement>>;
|
|
13
|
-
Option: import("react").ForwardRefExoticComponent<Omit<FormSelectOptionType, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
14
|
-
};
|
|
15
|
-
export default _default;
|