stargazer-ui 1.5.26 → 1.5.29
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/Bar/Bar.type.d.ts +6 -0
- package/Bar/index.js +2 -0
- package/Bar/index.js.map +1 -0
- package/Bar/package.json +1 -0
- package/Button/Button.js +15 -0
- package/Button/Button.js.map +1 -0
- package/{types/components/Button → Button}/Button.types.d.ts +1 -2
- package/Button/index.d.ts +3 -0
- package/Button/index.js +7 -0
- package/Button/index.js.map +1 -0
- package/Button/package.json +1 -0
- package/ButtonGroup/ButtonGroup.d.ts +4 -0
- package/ButtonGroup/ButtonGroup.js +11 -0
- package/ButtonGroup/ButtonGroup.js.map +1 -0
- package/ButtonGroup/ButtonGroup.types.d.ts +7 -0
- package/ButtonGroup/index.d.ts +3 -0
- package/ButtonGroup/index.js +7 -0
- package/ButtonGroup/index.js.map +1 -0
- package/ButtonGroup/package.json +1 -0
- package/{types/components/Card → Card}/Card.d.ts +12 -12
- package/Card/Card.js +42 -0
- package/Card/Card.js.map +1 -0
- package/{types/components/Card → Card}/Card.types.d.ts +3 -1
- package/Card/index.d.ts +3 -0
- package/Card/index.js +7 -0
- package/Card/index.js.map +1 -0
- package/Card/package.json +1 -0
- package/CloseButton/CloseButton.js +11 -0
- package/CloseButton/CloseButton.js.map +1 -0
- package/{types/components/CloseButton → CloseButton}/CloseButton.types.d.ts +1 -1
- package/CloseButton/index.d.ts +3 -0
- package/CloseButton/index.js +7 -0
- package/CloseButton/index.js.map +1 -0
- package/CloseButton/package.json +1 -0
- package/Dropdown/Dropdown.d.ts +39 -0
- package/Dropdown/Dropdown.js +380 -0
- package/Dropdown/Dropdown.js.map +1 -0
- package/{types/components/Dropdown → Dropdown}/Dropdown.types.d.ts +13 -12
- package/Dropdown/index.d.ts +4 -0
- package/Dropdown/index.js +8 -0
- package/Dropdown/index.js.map +1 -0
- package/Dropdown/package.json +1 -0
- package/FileUploadButton/FileUploadButton.d.ts +4 -0
- package/FileUploadButton/FileUploadButton.js +20 -0
- package/FileUploadButton/FileUploadButton.js.map +1 -0
- package/FileUploadButton/FileUploadButton.types.d.ts +7 -0
- package/FileUploadButton/index.d.ts +3 -0
- package/FileUploadButton/index.js +7 -0
- package/FileUploadButton/index.js.map +1 -0
- package/FileUploadButton/package.json +1 -0
- package/FloatingLabel/FloatingLabel.js +15 -0
- package/FloatingLabel/FloatingLabel.js.map +1 -0
- package/{types/components/FloatingLabel → FloatingLabel}/FloatingLabel.types.d.ts +1 -1
- package/FloatingLabel/index.d.ts +3 -0
- package/FloatingLabel/index.js +7 -0
- package/FloatingLabel/index.js.map +1 -0
- package/FloatingLabel/package.json +1 -0
- package/Form/Form.d.ts +37 -0
- package/Form/Form.js +227 -0
- package/Form/Form.js.map +1 -0
- package/Form/Form.types.d.ts +159 -0
- package/Form/FormSelect.d.ts +12 -0
- package/Form/FormSelect.js +512 -0
- package/Form/FormSelect.js.map +1 -0
- package/Form/index.d.ts +4 -0
- package/Form/index.js +8 -0
- package/Form/index.js.map +1 -0
- package/Form/package.json +1 -0
- package/InputGroup/InputGroup.d.ts +7 -0
- package/InputGroup/InputGroup.js +31 -0
- package/InputGroup/InputGroup.js.map +1 -0
- package/InputGroup/InputGroup.types.d.ts +17 -0
- package/InputGroup/index.d.ts +4 -0
- package/InputGroup/index.js +7 -0
- package/InputGroup/index.js.map +1 -0
- package/InputGroup/package.json +1 -0
- package/List/List.d.ts +14 -0
- package/List/List.js +77 -0
- package/List/List.js.map +1 -0
- package/List/List.types.d.ts +28 -0
- package/List/index.d.ts +3 -0
- package/List/index.js +7 -0
- package/List/index.js.map +1 -0
- package/List/package.json +1 -0
- package/{types/components/Modal → Modal}/Modal.d.ts +19 -19
- package/Modal/Modal.js +157 -0
- package/Modal/Modal.js.map +1 -0
- package/{types/components/Modal → Modal}/Modal.types.d.ts +3 -2
- package/Modal/index.d.ts +3 -0
- package/Modal/index.js +7 -0
- package/Modal/index.js.map +1 -0
- package/Modal/package.json +1 -0
- package/{types/components/Nav → Nav}/Nav.d.ts +12 -12
- package/Nav/Nav.js +29 -0
- package/Nav/Nav.js.map +1 -0
- package/{types/components/Nav → Nav}/Nav.types.d.ts +1 -1
- package/Nav/index.d.ts +4 -0
- package/Nav/index.js +7 -0
- package/Nav/index.js.map +1 -0
- package/Nav/package.json +1 -0
- package/{types/components/NavBar → NavBar}/Navbar.d.ts +7 -8
- package/NavBar/Navbar.js +36 -0
- package/NavBar/Navbar.js.map +1 -0
- package/{types/components/NavBar → NavBar}/Navbar.types.d.ts +2 -1
- package/NavBar/index.d.ts +4 -0
- package/NavBar/index.js +8 -0
- package/NavBar/index.js.map +1 -0
- package/NavBar/package.json +1 -0
- package/NavDropdown/NavDropdown.d.ts +19 -0
- package/NavDropdown/NavDropdown.js +75 -0
- package/NavDropdown/NavDropdown.js.map +1 -0
- package/{types/components/NavDropdown → NavDropdown}/NavDropdown.types.d.ts +2 -1
- package/NavDropdown/index.d.ts +3 -0
- package/NavDropdown/index.js +7 -0
- package/NavDropdown/index.js.map +1 -0
- package/NavDropdown/package.json +1 -0
- package/Overlay/Overlay.d.ts +4 -0
- package/Overlay/Overlay.js +241 -0
- package/Overlay/Overlay.js.map +1 -0
- package/Overlay/Overlay.types.d.ts +22 -0
- package/{src/Overlay/index.ts → Overlay/index.d.ts} +2 -2
- package/Overlay/index.js +7 -0
- package/Overlay/index.js.map +1 -0
- package/Overlay/package.json +1 -0
- package/{types/components/Popout → Popout}/Popout.d.ts +6 -6
- package/Popout/Popout.js +111 -0
- package/Popout/Popout.js.map +1 -0
- package/{types/components/Popout → Popout}/Popout.types.d.ts +1 -1
- package/Popout/index.d.ts +3 -0
- package/Popout/index.js +7 -0
- package/Popout/index.js.map +1 -0
- package/Popout/package.json +1 -0
- package/Spinner/Spinner.js +11 -0
- package/Spinner/Spinner.js.map +1 -0
- package/Spinner/index.d.ts +3 -0
- package/Spinner/index.js +7 -0
- package/Spinner/index.js.map +1 -0
- package/Spinner/package.json +1 -0
- package/Table/Table.js +12 -0
- package/Table/Table.js.map +1 -0
- package/{types/components/Table → Table}/Table.types.d.ts +1 -1
- package/Table/index.d.ts +3 -0
- package/Table/index.js +7 -0
- package/Table/index.js.map +1 -0
- package/Table/package.json +1 -0
- package/Tabs/Tabs.js +162 -0
- package/Tabs/Tabs.js.map +1 -0
- package/{types/components/Tabs → Tabs}/Tabs.types.d.ts +12 -2
- package/Tabs/index.d.ts +3 -0
- package/Tabs/index.js +7 -0
- package/Tabs/index.js.map +1 -0
- package/Tabs/package.json +1 -0
- package/ToggleButton/ToggleButton.d.ts +4 -0
- package/ToggleButton/ToggleButton.js +18 -0
- package/ToggleButton/ToggleButton.js.map +1 -0
- package/ToggleButton/ToggleButton.types.d.ts +7 -0
- package/ToggleButton/index.d.ts +3 -0
- package/ToggleButton/index.js +7 -0
- package/ToggleButton/index.js.map +1 -0
- package/ToggleButton/package.json +1 -0
- package/{src/hooks/index.ts → hooks/index.d.ts} +1 -2
- package/hooks/index.js +7 -0
- package/hooks/index.js.map +1 -0
- package/hooks/package.json +1 -0
- package/hooks/useClassname.d.ts +2 -0
- package/hooks/useClassname.js +7 -0
- package/hooks/useClassname.js.map +1 -0
- package/hooks/useDraggable.d.ts +23 -0
- package/hooks/useDraggable.js +147 -0
- package/hooks/useDraggable.js.map +1 -0
- package/hooks/useKeepElementFocused.d.ts +2 -0
- package/hooks/useKeepElementFocused.js +37 -0
- package/hooks/useKeepElementFocused.js.map +1 -0
- package/hooks/useQueryParams.d.ts +2 -0
- package/hooks/useQueryParams.js +13 -0
- package/hooks/useQueryParams.js.map +1 -0
- package/hooks/useScreenSize.d.ts +5 -0
- package/hooks/useScreenSize.js +21 -0
- package/hooks/useScreenSize.js.map +1 -0
- package/index.d.ts +19 -0
- package/index.js +20 -0
- package/index.js.map +1 -0
- package/package.json +1 -80
- package/styles/stargazerui.css +6661 -0
- package/styles/stargazerui.css.map +1 -0
- package/{src/utils/BaseTypes.ts → utils/BaseTypes.d.ts} +2 -9
- package/utils/ContrastingColor.d.ts +1 -0
- package/utils/CreateSyntheticEvent.d.ts +2 -0
- package/utils/CreateSyntheticEvent.js +33 -0
- package/utils/CreateSyntheticEvent.js.map +1 -0
- package/utils/IsInputKey.d.ts +7 -0
- package/utils/IsInputKey.js +20 -0
- package/utils/IsInputKey.js.map +1 -0
- package/utils/MergeClassnames.d.ts +2 -0
- package/utils/MergeClassnames.js +7 -0
- package/utils/MergeClassnames.js.map +1 -0
- package/utils/MergeRefs.d.ts +1 -0
- package/utils/MergeRefs.js +16 -0
- package/utils/MergeRefs.js.map +1 -0
- package/utils/createFastContext.d.ts +16 -0
- package/utils/createFastContext.js +99 -0
- package/utils/createFastContext.js.map +1 -0
- package/utils/index.d.ts +4 -0
- package/.babelrc.json +0 -10
- package/.eslintrc.cjs +0 -18
- package/.gitattributes +0 -2
- package/.github/workflows/npm-publish.yml +0 -24
- package/LICENSE +0 -21
- package/dev/index.html +0 -16
- package/dev/index.jsx +0 -46
- package/dev/index.scss +0 -74
- package/dev/pages/ButtonPage.jsx +0 -44
- package/dev/pages/CardPage.jsx +0 -81
- package/dev/pages/DropdownPage.jsx +0 -32
- package/dev/pages/FormPage.jsx +0 -163
- package/dev/pages/ListPage.jsx +0 -52
- package/dev/pages/ModalPage.jsx +0 -38
- package/dev/pages/OverlayPage.jsx +0 -39
- package/dev/pages/components.jsx +0 -19
- package/dev/stargazerui.css +0 -3762
- package/dev/stargazerui.css.map +0 -1
- package/dev/test.jsx +0 -87
- package/rollup.config.js +0 -140
- package/scripts/writePackageJsons.js +0 -42
- package/src/Bar/Bar.tsx +0 -0
- package/src/Bar/Bar.type.ts +0 -9
- package/src/Bar/index.ts +0 -0
- package/src/Button/Button.tsx +0 -20
- package/src/Button/Button.types.ts +0 -8
- package/src/Button/index.ts +0 -3
- package/src/ButtonGroup/ButtonGroup.tsx +0 -14
- package/src/ButtonGroup/ButtonGroup.types.ts +0 -8
- package/src/ButtonGroup/index.ts +0 -3
- package/src/Card/Card.tsx +0 -70
- package/src/Card/Card.types.ts +0 -33
- package/src/Card/index.ts +0 -3
- package/src/CloseButton/CloseButton.tsx +0 -14
- package/src/CloseButton/CloseButton.types.ts +0 -6
- package/src/CloseButton/index.ts +0 -3
- package/src/Dropdown/Dropdown.tsx +0 -441
- package/src/Dropdown/Dropdown.types.ts +0 -60
- package/src/Dropdown/index.ts +0 -4
- package/src/FileUploadButton/FileUploadButton.tsx +0 -27
- package/src/FileUploadButton/FileUploadButton.types.ts +0 -9
- package/src/FileUploadButton/index.ts +0 -3
- package/src/FloatingLabel/FloatingLabel.tsx +0 -22
- package/src/FloatingLabel/FloatingLabel.types.ts +0 -11
- package/src/FloatingLabel/index.ts +0 -3
- package/src/Form/Form.tsx +0 -399
- package/src/Form/Form.types.ts +0 -169
- package/src/Form/FormSelect.tsx +0 -620
- package/src/Form/index.ts +0 -4
- package/src/InputGroup/InputGroup.tsx +0 -46
- package/src/InputGroup/InputGroup.types.ts +0 -22
- package/src/InputGroup/index.ts +0 -4
- package/src/List/List.tsx +0 -112
- package/src/List/List.types.ts +0 -34
- package/src/List/index.ts +0 -4
- package/src/Modal/Modal.tsx +0 -229
- package/src/Modal/Modal.types.ts +0 -49
- package/src/Modal/index.ts +0 -4
- package/src/Nav/Nav.tsx +0 -43
- package/src/Nav/Nav.types.ts +0 -21
- package/src/Nav/index.ts +0 -4
- package/src/NavBar/Navbar.tsx +0 -57
- package/src/NavBar/Navbar.types.ts +0 -24
- package/src/NavBar/index.ts +0 -4
- package/src/NavDropdown/NavDropdown.tsx +0 -93
- package/src/NavDropdown/NavDropdown.types.ts +0 -7
- package/src/NavDropdown/index.ts +0 -3
- package/src/Overlay/Overlay.tsx +0 -305
- package/src/Overlay/Overlay.types.ts +0 -24
- package/src/Popout/Popout.tsx +0 -155
- package/src/Popout/Popout.types.ts +0 -42
- package/src/Popout/index.ts +0 -3
- package/src/Spinner/Spinner.tsx +0 -15
- package/src/Spinner/Spinner.types.ts +0 -7
- package/src/Spinner/index.ts +0 -3
- package/src/Table/Table.tsx +0 -16
- package/src/Table/Table.types.ts +0 -9
- package/src/Table/index.ts +0 -3
- package/src/Tabs/Tabs.tsx +0 -233
- package/src/Tabs/Tabs.types.ts +0 -52
- package/src/Tabs/index.ts +0 -3
- package/src/ToggleButton/ToggleButton.tsx +0 -21
- package/src/ToggleButton/ToggleButton.types.ts +0 -8
- package/src/ToggleButton/index.ts +0 -3
- package/src/assets/tooltip-pointer.svg +0 -3
- package/src/assets/warning.svg +0 -39
- package/src/hooks/useClassname.ts +0 -5
- package/src/hooks/useDraggable.ts +0 -186
- package/src/hooks/useKeepElementFocused.ts +0 -37
- package/src/hooks/useQueryParams.ts +0 -12
- package/src/hooks/useScreenSize.ts +0 -24
- package/src/index.ts +0 -21
- package/src/styles/_Card.scss +0 -166
- package/src/styles/_CloseButton.scss +0 -51
- package/src/styles/_CustomButton.scss +0 -134
- package/src/styles/_Dropdown.scss +0 -127
- package/src/styles/_FloatingLabel.scss +0 -56
- package/src/styles/_Forms.scss +0 -7
- package/src/styles/_Grid.scss +0 -178
- package/src/styles/_InputGroup.scss +0 -71
- package/src/styles/_List.scss +0 -62
- package/src/styles/_Modal.scss +0 -235
- package/src/styles/_ModalOld.scss +0 -242
- package/src/styles/_Nav.scss +0 -36
- package/src/styles/_NavBar.scss +0 -116
- package/src/styles/_NavDropdown.scss +0 -33
- package/src/styles/_OffCanvas.scss +0 -260
- package/src/styles/_OverLay.scss +0 -79
- package/src/styles/_Popout.scss +0 -75
- package/src/styles/_Resizable.scss +0 -64
- package/src/styles/_Spinner.scss +0 -19
- package/src/styles/_Table.scss +0 -34
- package/src/styles/_Tabs.scss +0 -129
- package/src/styles/_colors.scss +0 -510
- package/src/styles/_components.scss +0 -41
- package/src/styles/_functions.scss +0 -134
- package/src/styles/_mixins.scss +0 -26
- package/src/styles/_reset.scss +0 -239
- package/src/styles/_utilities.scss +0 -2480
- package/src/styles/_variables.scss +0 -164
- package/src/styles/forms/_FormCheck.scss +0 -270
- package/src/styles/forms/_FormControl.scss +0 -135
- package/src/styles/forms/_FormGroup.scss +0 -26
- package/src/styles/forms/_FormLabel.scss +0 -3
- package/src/styles/forms/_FormSelect.scss +0 -222
- package/src/styles/forms/_FormSlider.scss +0 -116
- package/src/styles/forms/_FormText.scss +0 -6
- package/src/utils/ContrastingColor.ts +0 -25
- package/src/utils/CreateSyntheticEvent.ts +0 -30
- package/src/utils/FileImportExport.js +0 -50
- package/src/utils/IsInputKey.ts +0 -18
- package/src/utils/MergeClassnames.ts +0 -5
- package/src/utils/MergeRefs.ts +0 -12
- package/src/utils/createFastContext.tsx +0 -120
- package/src/utils/index.ts +0 -4
- package/src/vite-env.d.ts +0 -1
- package/tsconfig-build.json +0 -4
- package/tsconfig.json +0 -79
- package/tsconfig.node.json +0 -10
- package/types/BaseTypes.d.ts +0 -19
- package/types/components/Button/index.d.ts +0 -1
- package/types/components/Card/index.d.ts +0 -1
- package/types/components/CloseButton/index.d.ts +0 -1
- package/types/components/Dropdown/Dropdown.d.ts +0 -71
- package/types/components/Dropdown/index.d.ts +0 -1
- package/types/components/FloatingLabel/index.d.ts +0 -1
- package/types/components/Form/Form.d.ts +0 -17
- package/types/components/Form/Form.types.d.ts +0 -50
- package/types/components/Form/index.d.ts +0 -1
- package/types/components/InputGroup/InputGroup.d.ts +0 -6
- package/types/components/InputGroup/InputGroup.types.d.ts +0 -10
- package/types/components/InputGroup/index.d.ts +0 -1
- package/types/components/Modal/index.d.ts +0 -1
- package/types/components/Nav/index.d.ts +0 -1
- package/types/components/NavBar/index.d.ts +0 -1
- package/types/components/NavDropdown/NavDropdown.d.ts +0 -35
- package/types/components/NavDropdown/index.d.ts +0 -1
- package/types/components/Popout/index.d.ts +0 -1
- package/types/components/Spinner/index.d.ts +0 -1
- package/types/components/Table/index.d.ts +0 -1
- package/types/components/Tabs/index.d.ts +0 -1
- package/types/components/ToggleButton/ToggleButton.d.ts +0 -9
- package/types/components/ToggleButton/ToggleButton.types.d.ts +0 -0
- package/types/components/ToggleButton/index.d.ts +0 -1
- package/types/components/index.d.ts +0 -16
- package/types/index.d.ts +0 -1
- package/vite.config.js +0 -57
- package/vite.config.js.timestamp-1708777378490-e94428ceb2bf9.mjs +0 -42
- /package/{types/components/Button → Button}/Button.d.ts +0 -0
- /package/{types/components/CloseButton → CloseButton}/CloseButton.d.ts +0 -0
- /package/{types/components/FloatingLabel → FloatingLabel}/FloatingLabel.d.ts +0 -0
- /package/{types/components/Spinner → Spinner}/Spinner.d.ts +0 -0
- /package/{types/components/Spinner → Spinner}/Spinner.types.d.ts +0 -0
- /package/{types/components/Table → Table}/Table.d.ts +0 -0
- /package/{types/components/Tabs → Tabs}/Tabs.d.ts +0 -0
package/Bar/index.js
ADDED
package/Bar/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/Bar/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"stargazer-ui/Bar","private":false,"module":"./index.js","types":"./index.d.ts","peerDependencies":{"lodash":"^4.17.21","react":">=17.0.0","react-dom":">=17.0.0"}}
|
package/Button/Button.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import mergeClassnames from '../utils/MergeClassnames.js';
|
|
5
|
+
|
|
6
|
+
const Button = forwardRef(({ children, variant = "primary", className, ...rest }, ref) => {
|
|
7
|
+
const variants = ["primary", "secondary", "success", "info", "warning", "danger", "dark", "light", "custom"]; //["red", "blue", "yellow", "green", "purple"]
|
|
8
|
+
const variantTest = variants.find(variantTest => variantTest === variant) ? variant : "primary";
|
|
9
|
+
const computedClassnames = mergeClassnames("sg-button", `sg-button-${variantTest}`, className);
|
|
10
|
+
return (jsx("button", { ref: ref, type: "button", className: computedClassnames, ...rest, children: children }));
|
|
11
|
+
});
|
|
12
|
+
Button.displayName = "Button";
|
|
13
|
+
|
|
14
|
+
export { Button as default };
|
|
15
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../src/Button/Button.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;AAMM,MAAA,MAAM,GAAG,UAAU,CAAiC,CAAC,EAAC,QAAQ,EAAE,OAAO,GAAC,SAAS,EAAE,SAAS,EAAE,GAAG,IAAI,EAAC,EAAE,GAAG,KAAI;IACjH,MAAM,QAAQ,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAA;IAC5G,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,IAAI,WAAW,KAAK,OAAO,CAAC,GAAG,OAAO,GAAG,SAAS;AAC/F,IAAA,MAAM,kBAAkB,GAAG,eAAe,CAAC,WAAW,EAAE,CAAa,UAAA,EAAA,WAAW,CAAE,CAAA,EAAE,SAAS,CAAC;AAC9F,IAAA,QACIA,GAAQ,CAAA,QAAA,EAAA,EAAA,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,kBAAkB,EAAM,GAAA,IAAI,YAClE,QAAQ,EAAA,CACJ;AAEjB,CAAC;AAED,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
|
package/Button/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"stargazer-ui/Button","private":false,"module":"./index.js","types":"./index.d.ts","peerDependencies":{"lodash":"^4.17.21","react":">=17.0.0","react-dom":">=17.0.0"}}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
|
|
5
|
+
const ButtonGroup = forwardRef(({ children, className, vertical = false, ...restProps }, ref) => {
|
|
6
|
+
return (jsx("div", { ref: ref, role: "group", className: `sg-button-group${vertical ? "-vertical" : ""}${className ? " " + className : ""}`, ...restProps, children: children }));
|
|
7
|
+
});
|
|
8
|
+
ButtonGroup.displayName = "ButtonGroup";
|
|
9
|
+
|
|
10
|
+
export { ButtonGroup as default };
|
|
11
|
+
//# sourceMappingURL=ButtonGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonGroup.js","sources":["../../src/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;AAGM,MAAA,WAAW,GAAG,UAAU,CAAmC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,GAAC,KAAK,EAAE,GAAG,SAAS,EAAC,EAAE,GAAG,KAAI;AAC3H,IAAA,QACIA,GAAK,CAAA,KAAA,EAAA,EAAA,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,CAAkB,eAAA,EAAA,QAAQ,GAAG,WAAW,GAAG,EAAE,GAAG,SAAS,GAAG,GAAG,GAAC,SAAS,GAAG,EAAE,EAAE,EAAM,GAAA,SAAS,YACjI,QAAQ,EAAA,CACP;AAEd,CAAC;AAED,WAAW,CAAC,WAAW,GAAG,aAAa;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"stargazer-ui/ButtonGroup","private":false,"module":"./index.js","types":"./index.d.ts","peerDependencies":{"lodash":"^4.17.21","react":">=17.0.0","react-dom":">=17.0.0"}}
|
|
@@ -3,30 +3,30 @@ import { CardBodyType, CardFooterType, CardTextType, CardType } from "./Card.typ
|
|
|
3
3
|
declare const _default: React.ForwardRefExoticComponent<Omit<CardType, "ref"> & React.RefAttributes<HTMLDivElement>> & {
|
|
4
4
|
Header: React.ForwardRefExoticComponent<(Omit<{
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
-
className?: string
|
|
7
|
-
as?: React.ElementType
|
|
6
|
+
className?: string;
|
|
7
|
+
as?: React.ElementType;
|
|
8
8
|
} & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, "ref"> | Omit<{
|
|
9
9
|
children: React.ReactNode;
|
|
10
|
-
className?: string
|
|
11
|
-
as?: React.ElementType
|
|
10
|
+
className?: string;
|
|
11
|
+
as?: React.ElementType;
|
|
12
12
|
} & React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement>, "ref"> | Omit<{
|
|
13
13
|
children: React.ReactNode;
|
|
14
|
-
className?: string
|
|
15
|
-
as?: React.ElementType
|
|
14
|
+
className?: string;
|
|
15
|
+
as?: React.ElementType;
|
|
16
16
|
} & React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement>, "ref">) & React.RefAttributes<HTMLDivElement | HTMLHeadingElement | HTMLSpanElement>>;
|
|
17
17
|
Body: React.ForwardRefExoticComponent<Omit<CardBodyType, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
18
|
Title: React.ForwardRefExoticComponent<(Omit<{
|
|
19
19
|
children: React.ReactNode;
|
|
20
|
-
className?: string
|
|
21
|
-
as?: React.ElementType
|
|
20
|
+
className?: string;
|
|
21
|
+
as?: React.ElementType;
|
|
22
22
|
} & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, "ref"> | Omit<{
|
|
23
23
|
children: React.ReactNode;
|
|
24
|
-
className?: string
|
|
25
|
-
as?: React.ElementType
|
|
24
|
+
className?: string;
|
|
25
|
+
as?: React.ElementType;
|
|
26
26
|
} & React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement>, "ref"> | Omit<{
|
|
27
27
|
children: React.ReactNode;
|
|
28
|
-
className?: string
|
|
29
|
-
as?: React.ElementType
|
|
28
|
+
className?: string;
|
|
29
|
+
as?: React.ElementType;
|
|
30
30
|
} & React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement>, "ref">) & React.RefAttributes<HTMLHeadingElement>>;
|
|
31
31
|
Text: React.ForwardRefExoticComponent<Omit<CardTextType, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
32
32
|
Footer: React.ForwardRefExoticComponent<Omit<CardFooterType, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/Card/Card.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
|
|
5
|
+
const Card = forwardRef(({ children, className, variant, inverted = false, ...restProps }, ref) => {
|
|
6
|
+
return (jsx("div", { ref: ref, className: `sg-card${className ? " " + className : ""}${variant ? " " + variant : ""}${inverted ? " inverted" : ""}`, ...restProps, children: children }));
|
|
7
|
+
});
|
|
8
|
+
Card.displayName = "Card";
|
|
9
|
+
const Header = forwardRef(({ as = "div", className, children, ...restProps }, ref) => {
|
|
10
|
+
let validAs = ["div", "span", "h1", "h2", "h3", "h4", "h5", "h6"];
|
|
11
|
+
let Component = validAs.find(valid => valid === as) ? as : "div";
|
|
12
|
+
return (jsx(Component, { ref: ref, className: `sg-card-header ${className}`, ...restProps, children: children }));
|
|
13
|
+
});
|
|
14
|
+
Header.displayName = "CardHeader";
|
|
15
|
+
const Title = forwardRef(({ as = "h5", className, children, ...restProps }, ref) => {
|
|
16
|
+
let validAs = ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
17
|
+
let Component = validAs.find(valid => valid === as) ? as : "h5";
|
|
18
|
+
return (jsx(Component, { ref: ref, className: `sg-card-title${className ? " " + className : ""}`, ...restProps, children: children }));
|
|
19
|
+
});
|
|
20
|
+
Title.displayName = "CardTitle";
|
|
21
|
+
const Body = forwardRef(({ children, className, ...restProps }, ref) => {
|
|
22
|
+
return (jsx("div", { ref: ref, className: `sg-card-body ${className}`, ...restProps, children: children }));
|
|
23
|
+
});
|
|
24
|
+
Body.displayName = "CardBody";
|
|
25
|
+
const Text = forwardRef(({ children, className, ...restProps }, ref) => {
|
|
26
|
+
return (jsx("p", { ref: ref, className: `sg-card-text ${className}`, ...restProps, children: children }));
|
|
27
|
+
});
|
|
28
|
+
Text.displayName = "CardText";
|
|
29
|
+
const Footer = forwardRef(({ children, className, ...restProps }, ref) => {
|
|
30
|
+
return (jsx("div", { ref: ref, className: `sg-card-footer ${className}`, ...restProps, children: children }));
|
|
31
|
+
});
|
|
32
|
+
Footer.displayName = "CardFooter";
|
|
33
|
+
var Card$1 = Object.assign(Card, {
|
|
34
|
+
Header: Header,
|
|
35
|
+
Body: Body,
|
|
36
|
+
Title: Title,
|
|
37
|
+
Text: Text,
|
|
38
|
+
Footer: Footer
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export { Card$1 as default };
|
|
42
|
+
//# sourceMappingURL=Card.js.map
|
package/Card/Card.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../../src/Card/Card.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;AAIA,MAAM,IAAI,GAAG,UAAU,CAA4B,CAAC,EAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,GAAC,KAAK,EAAC,GAAG,SAAS,EAAC,EAAE,GAAG,KAAI;IACpH,QACIA,aAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,CAAA,OAAA,EAAU,SAAS,GAAG,GAAG,GAAC,SAAS,GAAC,EAAE,CAAG,EAAA,OAAO,GAAG,GAAG,GAAC,OAAO,GAAC,EAAE,CAAA,EAAG,QAAQ,GAAG,WAAW,GAAC,EAAE,CAAE,CAAA,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MAAM,EAAE;AACX,CAAA,CAAC;;;;"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import { BaseDivType, BaseHeadingType, BaseSpanType, BaseParagraphType } from "
|
|
2
|
+
import { BaseDivType, BaseHeadingType, BaseSpanType, BaseParagraphType } from "../utils/BaseTypes";
|
|
3
3
|
export type CardType = {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
className?: string;
|
|
6
|
+
variant?: string;
|
|
7
|
+
inverted?: boolean;
|
|
6
8
|
} & BaseDivType;
|
|
7
9
|
export type CardHeaderPossible = BaseDivType | BaseSpanType | BaseHeadingType;
|
|
8
10
|
export type CardHeaderType = {
|
package/Card/index.d.ts
ADDED
package/Card/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"stargazer-ui/Card","private":false,"module":"./index.js","types":"./index.d.ts","peerDependencies":{"lodash":"^4.17.21","react":">=17.0.0","react-dom":">=17.0.0"}}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
|
|
5
|
+
const CloseButton = forwardRef(({ className, variant = false, ...restProps }, ref) => {
|
|
6
|
+
return (jsx("button", { ref: ref, className: `sg-button-close${variant ? " sg-button-close-white" : ""} ${className}`, ...restProps, children: jsx("span", { className: "sg-close-visually-hidden-label", children: "Close" }) }));
|
|
7
|
+
});
|
|
8
|
+
CloseButton.displayName = "CloseButton";
|
|
9
|
+
|
|
10
|
+
export { CloseButton as default };
|
|
11
|
+
//# sourceMappingURL=CloseButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloseButton.js","sources":["../../src/CloseButton/CloseButton.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;AAIA,MAAM,WAAW,GAAG,UAAU,CAAsC,CAAC,EAAC,SAAS,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,SAAS,EAAC,EAAE,GAAG,KAAI;AACpH,IAAA,QACIA,GAAA,CAAA,QAAA,EAAA,EAAQ,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,CAAkB,eAAA,EAAA,OAAO,GAAG,wBAAwB,GAAG,EAAE,CAAA,CAAA,EAAI,SAAS,CAAA,CAAE,KAAM,SAAS,EAAA,QAAA,EAChHA,GAAM,CAAA,MAAA,EAAA,EAAA,SAAS,EAAC,gCAAgC,EAAa,QAAA,EAAA,OAAA,EAAA,CAAA,EAAA,CACxD;AAEjB,CAAC;AACD,WAAW,CAAC,WAAW,GAAG,aAAa;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"stargazer-ui/CloseButton","private":false,"module":"./index.js","types":"./index.d.ts","peerDependencies":{"lodash":"^4.17.21","react":">=17.0.0","react-dom":">=17.0.0"}}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DropdownContextType, DropdownDividerType, DropdownMenuType, DropdownToggleType, DropdownType } from "./Dropdown.types";
|
|
3
|
+
export declare const DropdownContext: React.Context<DropdownContextType | null>;
|
|
4
|
+
export declare const DropdownContextProvider: ({ children, value }: {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
value: DropdownContextType;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const useDropdownContext: () => DropdownContextType;
|
|
9
|
+
export declare const Toggle: React.ForwardRefExoticComponent<Omit<DropdownToggleType, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export declare const Menu: React.ForwardRefExoticComponent<Omit<DropdownMenuType, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
11
|
+
export declare const Item: React.ForwardRefExoticComponent<(Omit<{
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
as?: React.ElementType;
|
|
14
|
+
className?: string;
|
|
15
|
+
liProps: import("..").BaseLItemType;
|
|
16
|
+
} & React.ClassAttributes<HTMLAnchorElement> & React.AnchorHTMLAttributes<HTMLAnchorElement>, "ref"> | Omit<{
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
as?: React.ElementType;
|
|
19
|
+
className?: string;
|
|
20
|
+
liProps: import("..").BaseLItemType;
|
|
21
|
+
} & React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement>, "ref">) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
22
|
+
export declare const Divider: React.ForwardRefExoticComponent<Omit<DropdownDividerType, "ref"> & React.RefAttributes<HTMLHRElement>>;
|
|
23
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<DropdownType, "ref"> & React.RefAttributes<HTMLButtonElement>> & {
|
|
24
|
+
Toggle: React.ForwardRefExoticComponent<Omit<DropdownToggleType, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
25
|
+
Menu: React.ForwardRefExoticComponent<Omit<DropdownMenuType, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
26
|
+
Item: React.ForwardRefExoticComponent<(Omit<{
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
as?: React.ElementType;
|
|
29
|
+
className?: string;
|
|
30
|
+
liProps: import("..").BaseLItemType;
|
|
31
|
+
} & React.ClassAttributes<HTMLAnchorElement> & React.AnchorHTMLAttributes<HTMLAnchorElement>, "ref"> | Omit<{
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
as?: React.ElementType;
|
|
34
|
+
className?: string;
|
|
35
|
+
liProps: import("..").BaseLItemType;
|
|
36
|
+
} & React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement>, "ref">) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
37
|
+
Divider: React.ForwardRefExoticComponent<Omit<DropdownDividerType, "ref"> & React.RefAttributes<HTMLHRElement>>;
|
|
38
|
+
};
|
|
39
|
+
export default _default;
|