stargazer-ui 1.0.4 → 1.0.5

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.
Files changed (136) hide show
  1. package/dist/cjs/index.js +2 -0
  2. package/dist/cjs/index.js.map +1 -0
  3. package/dist/components/Button/Button.d.ts +4 -0
  4. package/dist/components/Button/Button.types.d.ts +7 -0
  5. package/dist/components/Button/Button.types.js +1 -0
  6. package/dist/components/Button/index.d.ts +1 -0
  7. package/dist/components/Button/index.js +4 -0
  8. package/dist/components/Card/Card.d.ts +34 -0
  9. package/dist/components/Card/Card.js +18 -0
  10. package/dist/components/Card/Card.types.d.ts +24 -0
  11. package/dist/components/Card/Card.types.js +1 -0
  12. package/dist/components/Card/index.d.ts +1 -0
  13. package/dist/components/Card/index.js +4 -0
  14. package/dist/{CloseButton/index.d.ts → components/CloseButton/CloseButton.d.ts} +1 -5
  15. package/dist/components/CloseButton/CloseButton.types.d.ts +5 -0
  16. package/dist/components/CloseButton/CloseButton.types.js +1 -0
  17. package/dist/components/CloseButton/index.d.ts +1 -0
  18. package/dist/components/CloseButton/index.js +4 -0
  19. package/dist/{Dropdown/index.d.ts → components/Dropdown/Dropdown.d.ts} +1 -54
  20. package/dist/components/Dropdown/Dropdown.types.d.ts +55 -0
  21. package/dist/components/Dropdown/Dropdown.types.js +1 -0
  22. package/dist/components/Dropdown/index.d.ts +1 -0
  23. package/dist/components/Dropdown/index.js +4 -0
  24. package/dist/components/FloatingLabel/FloatingLabel.d.ts +4 -0
  25. package/dist/{FloatingLabel/index.js → components/FloatingLabel/FloatingLabel.js} +1 -1
  26. package/dist/components/FloatingLabel/FloatingLabel.types.d.ts +9 -0
  27. package/dist/components/FloatingLabel/FloatingLabel.types.js +1 -0
  28. package/dist/components/FloatingLabel/index.d.ts +1 -0
  29. package/dist/components/FloatingLabel/index.js +4 -0
  30. package/dist/components/Form/Form.d.ts +17 -0
  31. package/dist/{Form/index.js → components/Form/Form.js} +15 -15
  32. package/dist/components/Form/Form.types.d.ts +50 -0
  33. package/dist/components/Form/Form.types.js +1 -0
  34. package/dist/components/Form/index.d.ts +1 -0
  35. package/dist/components/Form/index.js +4 -0
  36. package/dist/components/Grid/Grid.d.ts +5 -0
  37. package/dist/components/Grid/Grid.js +36 -0
  38. package/dist/components/Grid/index.d.ts +1 -0
  39. package/dist/components/Grid/index.js +4 -0
  40. package/dist/components/InputGroup/InputGroup.d.ts +6 -0
  41. package/dist/components/InputGroup/InputGroup.js +8 -0
  42. package/dist/components/InputGroup/InputGroup.types.d.ts +10 -0
  43. package/dist/components/InputGroup/InputGroup.types.js +1 -0
  44. package/dist/components/InputGroup/index.d.ts +1 -0
  45. package/dist/components/InputGroup/index.js +4 -0
  46. package/dist/{Modal/index.d.ts → components/Modal/Modal.d.ts} +2 -32
  47. package/dist/{Modal/index.js → components/Modal/Modal.js} +13 -12
  48. package/dist/components/Modal/Modal.types.d.ts +40 -0
  49. package/dist/components/Modal/Modal.types.js +1 -0
  50. package/dist/components/Modal/index.d.ts +1 -0
  51. package/dist/components/Modal/index.js +4 -0
  52. package/dist/{Nav/index.d.ts → components/Nav/Nav.d.ts} +0 -16
  53. package/dist/{Nav/index.js → components/Nav/Nav.js} +7 -7
  54. package/dist/components/Nav/Nav.types.d.ts +17 -0
  55. package/dist/components/Nav/Nav.types.js +1 -0
  56. package/dist/components/Nav/index.d.ts +1 -0
  57. package/dist/components/Nav/index.js +4 -0
  58. package/dist/components/NavBar/Navbar.d.ts +20 -0
  59. package/dist/components/NavBar/Navbar.js +17 -0
  60. package/dist/components/NavBar/Navbar.types.d.ts +18 -0
  61. package/dist/components/NavBar/Navbar.types.js +1 -0
  62. package/dist/components/NavBar/index.d.ts +1 -0
  63. package/dist/components/NavBar/index.js +4 -0
  64. package/dist/{NavDropdown/index.d.ts → components/NavDropdown/NavDropdown.d.ts} +3 -7
  65. package/dist/components/NavDropdown/NavDropdown.js +62 -0
  66. package/dist/components/NavDropdown/NavDropdown.types.d.ts +5 -0
  67. package/dist/components/NavDropdown/NavDropdown.types.js +1 -0
  68. package/dist/components/NavDropdown/index.d.ts +1 -0
  69. package/dist/components/NavDropdown/index.js +4 -0
  70. package/dist/components/OffCanvas/OffCanvas.d.ts +3 -0
  71. package/dist/{OffCanvas → components/OffCanvas}/OffCanvas.js +2 -2
  72. package/dist/components/OffCanvas/index.d.ts +1 -0
  73. package/dist/components/OffCanvas/index.js +4 -0
  74. package/dist/components/Overlay/Overlay.d.ts +3 -0
  75. package/dist/components/Overlay/index.d.ts +1 -0
  76. package/dist/components/Overlay/index.js +4 -0
  77. package/dist/{Popout/index.d.ts → components/Popout/Popout.d.ts} +1 -35
  78. package/dist/{Popout/index.js → components/Popout/Popout.js} +18 -18
  79. package/dist/components/Popout/Popout.types.d.ts +36 -0
  80. package/dist/components/Popout/Popout.types.js +1 -0
  81. package/dist/components/Popout/index.d.ts +1 -0
  82. package/dist/components/Popout/index.js +4 -0
  83. package/dist/{Spinner/index.d.ts → components/Spinner/Spinner.d.ts} +1 -7
  84. package/dist/components/Spinner/Spinner.types.d.ts +7 -0
  85. package/dist/components/Spinner/Spinner.types.js +1 -0
  86. package/dist/components/Spinner/index.d.ts +1 -0
  87. package/dist/components/Spinner/index.js +4 -0
  88. package/dist/components/Table/Table.d.ts +4 -0
  89. package/dist/components/Table/Table.types.d.ts +7 -0
  90. package/dist/components/Table/Table.types.js +1 -0
  91. package/dist/components/Table/index.d.ts +1 -0
  92. package/dist/components/Table/index.js +4 -0
  93. package/dist/components/Tabs/Tabs.d.ts +9 -0
  94. package/dist/{Tabs/index.js → components/Tabs/Tabs.js} +14 -14
  95. package/dist/{Tabs/index.d.ts → components/Tabs/Tabs.types.d.ts} +2 -9
  96. package/dist/components/Tabs/Tabs.types.js +1 -0
  97. package/dist/components/Tabs/index.d.ts +1 -0
  98. package/dist/components/Tabs/index.js +4 -0
  99. package/dist/components/ToggleButton/ToggleButton.d.ts +9 -0
  100. package/dist/components/ToggleButton/ToggleButton.js +11 -0
  101. package/dist/components/ToggleButton/ToggleButton.types.d.ts +0 -0
  102. package/dist/components/ToggleButton/ToggleButton.types.js +1 -0
  103. package/dist/components/ToggleButton/index.d.ts +1 -0
  104. package/dist/components/ToggleButton/index.js +4 -0
  105. package/dist/components/index.d.ts +19 -0
  106. package/dist/components/index.js +19 -0
  107. package/dist/esm/index.js +2 -0
  108. package/dist/esm/index.js.map +1 -0
  109. package/dist/index.d.ts +1 -0
  110. package/dist/index.js +19 -0
  111. package/dist/types.d.ts +2 -0
  112. package/package.json +15 -4
  113. package/dist/Button/index.d.ts +0 -9
  114. package/dist/Card/index.d.ts +0 -92
  115. package/dist/Card/index.js +0 -18
  116. package/dist/FloatingLabel/index.d.ts +0 -11
  117. package/dist/Form/index.d.ts +0 -65
  118. package/dist/Grid/Col.js +0 -19
  119. package/dist/Grid/Container.js +0 -9
  120. package/dist/Grid/Row.js +0 -17
  121. package/dist/InputGroup/index.d.ts +0 -14
  122. package/dist/InputGroup/index.js +0 -8
  123. package/dist/NavBar/index.d.ts +0 -46
  124. package/dist/NavBar/index.js +0 -17
  125. package/dist/NavDropdown/index.js +0 -858
  126. package/dist/Table/index.d.ts +0 -9
  127. package/dist/ToggleButton/index.js +0 -11
  128. package/dist/main.js +0 -30
  129. package/dist/stylesheets/stargazerui.css +0 -4902
  130. package/dist/stylesheets/stargazerui.css.map +0 -1
  131. /package/dist/{Button/index.js → components/Button/Button.js} +0 -0
  132. /package/dist/{CloseButton/index.js → components/CloseButton/CloseButton.js} +0 -0
  133. /package/dist/{Dropdown/index.js → components/Dropdown/Dropdown.js} +0 -0
  134. /package/dist/{Overlay/index.js → components/Overlay/Overlay.js} +0 -0
  135. /package/dist/{Spinner/index.js → components/Spinner/Spinner.js} +0 -0
  136. /package/dist/{Table/index.js → components/Table/Table.js} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/components/Button/Button.tsx","../../src/components/Card/Card.tsx","../../src/components/CloseButton/CloseButton.tsx","../../src/components/Dropdown/Dropdown.tsx","../../src/components/Form/Form.tsx","../../src/components/FloatingLabel/FloatingLabel.tsx","../../src/components/InputGroup/InputGroup.tsx","../../src/components/Modal/Modal.tsx","../../src/components/NavBar/Navbar.tsx","../../src/components/Nav/Nav.tsx","../../src/components/NavDropdown/NavDropdown.tsx","../../src/components/Popout/Popout.tsx","../../src/components/Spinner/Spinner.tsx","../../src/components/Table/Table.tsx","../../src/components/Tabs/Tabs.tsx","../../src/components/ToggleButton/ToggleButton.tsx"],"sourcesContent":["import { forwardRef } from \"react\"\r\n\r\nimport {ButtonType} from \"./Button.types\"\r\n\r\nconst Button = forwardRef<HTMLButtonElement, ButtonType>( ({children, variant=\"primary\", className, ...rest}, ref) => {\r\n //let variants = [\"primary\", \"secondary\", \"success\", \"info\", \"warning\", \"danger\", \"dark\", \"light\"] //[\"red\", \"blue\", \"yellow\", \"green\", \"purple\"]\r\n // let variantTest = variants.find(variantTest => variantTest === variant) ? variant : \"primary\"\r\n return(\r\n <button ref={ref} type=\"button\" className={`sg-button sg-button-${variant}${className == undefined ? \"\" : \" \"+className}`} {...rest}>\r\n {children}\r\n </button>\r\n )\r\n} )\r\n\r\nexport default Button\r\n","import React, { forwardRef } from \"react\"\r\n\r\nimport { CardBodyType, CardFooterType, CardHeaderType, CardTextType, CardType } from \"./Card.types\"\r\n\r\nconst Card = forwardRef<HTMLDivElement, CardType>( ({children, className, ...restProps}, ref) => {\r\n /*\r\n let subComponentList = Object.keys(Card);\r\n let subComponents = []\r\n let childs = children.length === undefined ? children : children.filter(child => child != null && child != \"\")\r\n \r\n subComponentList.forEach((key) => {\r\n React.Children.forEach(childs, (child) => (\r\n child.type.name === key ? subComponents.push(child) : null\r\n ))\r\n })\r\n if(subComponents.length === 0) {\r\n subComponents = [childs]\r\n }\r\n */\r\n //console.log(subComponents)\r\n\r\n return (\r\n <div ref={ref} className={\"sg-card\" + \" \" + className} {...restProps}>\r\n {children}\r\n </div>\r\n )\r\n})\r\n\r\nconst Header = forwardRef<HTMLDivElement | HTMLHeadingElement | HTMLSpanElement, CardHeaderType>( ({as=\"div\", className, children, ...restProps}, ref) => {\r\n let validAs = [\"div\", \"span\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"]\r\n let Component = validAs.find(valid => valid === as) ? as : \"div\"\r\n\r\n return (\r\n <Component ref={ref} className={`sg-card-header ${className}`} {...restProps}>\r\n {children}\r\n </Component>\r\n )\r\n})\r\n\r\nconst Title = forwardRef<HTMLHeadingElement, CardHeaderType>(({as=\"h5\", className, children, ...restProps}, ref) => {\r\n let validAs = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"]\r\n let Component = validAs.find(valid => valid === as) ? as : \"h5\"\r\n return (\r\n <Component ref={ref} className={className} {...restProps}>\r\n {children}\r\n </Component>\r\n )\r\n})\r\n\r\nconst Body = forwardRef<HTMLDivElement, CardBodyType>( ({children, className, ...restProps}, ref) => {\r\n /*\r\n children = children.length ? children.filter(child => child != null && child != \"\") : children\r\n let subComponents = []\r\n React.Children.forEach(children, (child) => {\r\n subComponents.push(child)\r\n })\r\n */\r\n return (\r\n <div ref={ref} className={`sg-card-body ${className}`} {...restProps}>\r\n {children}\r\n </div>\r\n )\r\n})\r\n\r\nconst Text = forwardRef<HTMLParagraphElement, CardTextType>( ({children, className, ...restProps}, ref) => {\r\n return (\r\n <p ref={ref} className={`sg-card-text ${className}`} {...restProps}>\r\n {children}\r\n </p>\r\n )\r\n})\r\n\r\nconst Footer = forwardRef<HTMLDivElement, CardFooterType>( ({children, className, ...restProps}, ref) => {\r\n return (\r\n <div ref={ref} className={`sg-card-footer ${className}`} {...restProps}>\r\n {children}\r\n </div>\r\n )\r\n})\r\n\r\nexport default Object.assign(Card, {\r\n Header: Header,\r\n Body: Body,\r\n Title: Title,\r\n Text: Text,\r\n Footer: Footer\r\n})","import { forwardRef } from \"react\"\r\n\r\nimport { CloseButtonType } from \"./CloseButton.types\"\r\n\r\nconst CloseButton = forwardRef<HTMLButtonElement, CloseButtonType>( ({className, variant = false, ...restProps}, ref) => {\r\n return (\r\n <button ref={ref} className={`sg-button-close${variant ? \" sg-button-close-white\" : \"\"} ${className}`} {...restProps}>\r\n <span className=\"sg-close-visually-hidden-label\">Close</span>\r\n </button>\r\n )\r\n})\r\n\r\nexport default CloseButton","import React, { createContext, forwardRef, useContext, useEffect, useLayoutEffect, useMemo, useState } from \"react\";\r\nimport { DropdownContextType, DropdownItemType, DropdownDividerType, DropdownMenuType, DropdownToggleType, DropdownType } from \"./Dropdown.types\";\r\n//automatic menu placement function\r\nconst getDropdownMenuPlacement = (alignEnd:boolean, dropDirection:string, isRTL:boolean=false) => {\r\n const topStart = isRTL ? 'top-end' : 'top-start';\r\n const topEnd = isRTL ? 'top-start' : 'top-end';\r\n const bottomStart = isRTL ? 'bottom-end' : 'bottom-start';\r\n const bottomEnd = isRTL ? 'bottom-start' : 'bottom-end';\r\n const leftStart = isRTL ? 'right-start' : 'left-start';\r\n const leftEnd = isRTL ? 'right-end' : 'left-end';\r\n const rightStart = isRTL ? 'left-start' : 'right-start';\r\n const rightEnd = isRTL ? 'left-end' : 'right-end';\r\n let placement = alignEnd ? bottomEnd : bottomStart;\r\n if (dropDirection === 'up') \r\n {\r\n placement = alignEnd ? topEnd : topStart\r\n }\r\n else if (dropDirection === 'end') {\r\n placement = alignEnd ? rightEnd : rightStart\r\n } else if (dropDirection === 'start') {\r\n placement = alignEnd ? leftEnd : leftStart\r\n } else if (dropDirection === 'down-centered') {\r\n placement = 'bottom'\r\n } else if (dropDirection === 'up-centered') {\r\n placement = 'top'\r\n }\r\n return placement;\r\n}\r\n// is click event on the menu\r\nconst isEventOnMenu = (event:MouseEvent, controlId:string = \"\") => {\r\n let element = event.target as HTMLElement\r\n let condition = true\r\n let eventIsOnMenu = false\r\n while(condition) {\r\n if(element.id != controlId+\"-menu\") {\r\n element = element.parentElement as HTMLElement\r\n }\r\n else {\r\n eventIsOnMenu = true\r\n condition = false\r\n }\r\n\r\n\r\n if(element.id === \"root\") {\r\n condition = false\r\n eventIsOnMenu = false\r\n }\r\n }\r\n return eventIsOnMenu\r\n}\r\n\r\nexport const DropdownContext = createContext<DropdownContextType | null>(null)\r\nexport const DropdownContextProvider = ({children, value}:{children: React.ReactNode, value:DropdownContextType}) => {\r\n return (\r\n <DropdownContext.Provider value={value}>\r\n {children}\r\n </DropdownContext.Provider>\r\n )\r\n}\r\nexport const useDropdownContext = () => {\r\n const context = useContext(DropdownContext)\r\n if(!context) {\r\n throw new Error(\r\n \"useDropdownContext has to be used within DropdownContextProvider!\"\r\n )\r\n }\r\n return context\r\n}\r\n\r\n\r\nconst Dropdown = forwardRef<HTMLDivElement, DropdownType>((\r\n {\r\n children, className, onSelect, onToggle, controlId,\r\n drop=\"down\", align=\"start\", autoClose=true, show=\"default\", ...restProps\r\n }, ref) => {\r\n \r\n const [showInternal, setShowInternal] = useState<boolean>(show === \"default\" ? false : show as boolean)\r\n\r\n // this is an object like {index: string} because we need it to rerender even if the case is the same\r\n // aka we use a \"next/previous\" case to navigate through the dropdown menu so need to rerender consecutive \"next\" cases\r\n const [activeDescendant, setActiveDescendant] = useState<{case:string}>({case:\"\"})\r\n\r\n const internalOnToggle = (event: MouseEvent) => {\r\n event.stopPropagation()\r\n setShowInternal(prev => !prev)\r\n }\r\n\r\n const alignEnd = align === \"end\"\r\n const placement = getDropdownMenuPlacement(alignEnd, drop )\r\n \r\n const contextValue = useMemo(() => ({\r\n align, \r\n drop, \r\n showInternal: show != \"default\" && onToggle ? show as boolean : showInternal, \r\n handleToggle: show != \"default\" && onToggle ? onToggle : internalOnToggle, \r\n placement, \r\n directionClasses: {\r\n down: \"dropdown\",\r\n 'down-centered': `dropdown-center`,\r\n up: 'dropup',\r\n 'up-centered': 'dropup-center dropup',\r\n end: 'dropend',\r\n start: 'dropstart'\r\n },\r\n controlId: controlId, \r\n activeDescendant, \r\n setActiveDescendant\r\n }), [align, drop, show, showInternal, onToggle, placement, controlId, activeDescendant, setActiveDescendant])\r\n \r\n return (\r\n <div id={controlId+\"-wrapper\"} ref={ref} className={`sg-dropdown${className? \" \"+className:\"\"}`} {...restProps} >\r\n <DropdownContextProvider value={contextValue}>\r\n {children}\r\n </DropdownContextProvider>\r\n </div>\r\n )\r\n})\r\n\r\n\r\nexport const Toggle = forwardRef<HTMLAnchorElement | HTMLButtonElement, DropdownToggleType>( ({children, className, navDropdown=false, as=\"button\", variant=\"primary\", ...restProps}, ref) => {\r\n const { controlId, handleToggle, setActiveDescendant, showInternal } = useDropdownContext()\r\n const Component = as\r\n const handleKeyPress = (event: KeyboardEvent) => {\r\n let flag = false\r\n console.log(event.key)\r\n switch (event.key) {\r\n case \"ArrowDown\":\r\n flag = true\r\n if(showInternal) {\r\n setActiveDescendant(prev => ({...prev, case:\"next\"}))\r\n }\r\n else {\r\n handleToggle(event)\r\n setActiveDescendant(prev => ({...prev, case:\"first\"}))\r\n }\r\n break\r\n case \"ArrowUp\":\r\n flag = true\r\n if(showInternal) {\r\n setActiveDescendant(prev => ({...prev, case:\"previous\"}))\r\n } else {\r\n handleToggle(event)\r\n setActiveDescendant(prev => ({...prev, case:\"last\"}))\r\n }\r\n break\r\n case \"Home\":\r\n flag = true\r\n if(showInternal) {\r\n setActiveDescendant(prev => ({...prev, case:\"first\"}))\r\n }\r\n break\r\n case \"End\":\r\n flag = true\r\n if(showInternal) {\r\n setActiveDescendant(prev => ({...prev, case:\"last\"}))\r\n }\r\n break\r\n case \"Tab\":\r\n if(showInternal) {\r\n handleToggle(event)\r\n }\r\n break\r\n case \"Escape\":\r\n flag = true\r\n if(showInternal) {\r\n handleToggle(event)\r\n }\r\n break\r\n case \"Enter\":\r\n case \" \":\r\n if(showInternal) {\r\n flag = true\r\n const activeElement = document.querySelector(\".sg-dropdown-item-visual-focus\") as HTMLElement\r\n activeElement.click()\r\n handleToggle(event)\r\n break\r\n }\r\n else {\r\n setActiveDescendant(prev => ({...prev, case:\"first\"}))\r\n break\r\n }\r\n }\r\n if(flag) {\r\n event.stopPropagation()\r\n event.preventDefault()\r\n }\r\n }\r\n const handleClick = (event: MouseEvent) => {\r\n if(!showInternal) return\r\n if((event.target as HTMLElement).id === controlId) return\r\n\r\n if(!isEventOnMenu(event, controlId)) {\r\n handleToggle(event)\r\n }\r\n else if(isEventOnMenu(event, controlId)) {\r\n handleToggle(event)\r\n const toggleElement: HTMLElement | null = document.getElementById(controlId)\r\n toggleElement?.focus()\r\n }\r\n }\r\n useEffect(() => {\r\n const toggleElement: HTMLElement = document.getElementById(controlId) as HTMLElement\r\n toggleElement.addEventListener(\"keydown\", handleKeyPress, true)\r\n document.addEventListener(\"mouseup\", handleClick, true)\r\n return function cleanup() {\r\n toggleElement.removeEventListener(\"keydown\", handleKeyPress, true)\r\n document.removeEventListener(\"mouseup\", handleClick, true)\r\n }\r\n }, [handleKeyPress, controlId])\r\n\r\n const toggleButtonClick = (event: MouseEvent) => {\r\n handleToggle(event)\r\n if(!showInternal) {\r\n setActiveDescendant(prev => ({...prev, case:\"first\"}))\r\n }\r\n }\r\n let classNamesComputed = `sg-button sg-button${variant ? \"-\"+variant:\"-primary\"} sg-dropdown-toggle${className ? \" \"+className:\"\"}`\r\n if (Component === \"a\" || navDropdown) {\r\n classNamesComputed = `sg-nav-dropdown-toggle sg-dropdown-toggle${className ? \" \"+className:\"\"}`\r\n }\r\n return (\r\n <Component tabIndex=\"0\" type=\"button\" aria-haspopup=\"true\" aria-controls={controlId+\"-menu\"} aria-expanded={showInternal} id={controlId}\r\n ref={ref} className={classNamesComputed} \r\n onClick={(event: MouseEvent) => toggleButtonClick(event)} {...restProps}\r\n >\r\n {children}\r\n </Component>\r\n )\r\n})\r\n\r\n\r\nexport const Menu = forwardRef<HTMLUListElement, DropdownMenuType>( ({children, className, style = {}, ...restProps}, ref) => {\r\n const { controlId, showInternal, activeDescendant } = useDropdownContext()\r\n const [ computedStyle, setComputedStyle ] = useState(style)\r\n useLayoutEffect(() => {\r\n if(showInternal) {\r\n const menu = document.getElementById(controlId+\"-menu\") as HTMLElement\r\n let tempComputedStyle = {}\r\n if(menu.getBoundingClientRect().right > window.innerWidth) {\r\n tempComputedStyle = {...tempComputedStyle, right:0}\r\n } else if(menu.getBoundingClientRect().left < 0) {\r\n tempComputedStyle = {...tempComputedStyle, left:0}\r\n } else if(menu.getBoundingClientRect().top < 0) {\r\n tempComputedStyle = {...tempComputedStyle, top:0}\r\n } else if(menu.getBoundingClientRect().bottom > window.innerHeight) {\r\n tempComputedStyle = {...tempComputedStyle, bottom:0}\r\n }\r\n setComputedStyle(prev => ({...prev, ...tempComputedStyle}))\r\n }\r\n }, [showInternal])\r\n \r\n useEffect(() => {\r\n if(showInternal) {\r\n const menu = document.getElementById(controlId+\"-menu\") as HTMLElement\r\n const menuChildren = document.getElementById(controlId+\"-menu\")!.children\r\n const menuChildrenLast = menuChildren.length - 1\r\n const elementWithVisualFocus = document.querySelector(\".sg-dropdown-item-visual-focus\")\r\n let currentIndex = 0, currentChild = menuChildren[0].children[0]\r\n if(elementWithVisualFocus != null) {\r\n elementWithVisualFocus.classList.remove(\"sg-dropdown-item-visual-focus\")\r\n for(let i=0; i<menuChildren.length; i++) {\r\n if(menuChildren[i] === elementWithVisualFocus.parentElement) {\r\n currentIndex = i\r\n break\r\n }\r\n }\r\n }\r\n switch (activeDescendant.case) {\r\n case \"first\":\r\n currentChild = menuChildren[0].children[0]\r\n currentIndex = 0\r\n break\r\n case \"last\":\r\n currentChild = menuChildren[menuChildrenLast].children[0]\r\n currentIndex = menuChildrenLast\r\n break\r\n case \"next\":\r\n currentIndex = currentIndex === menuChildrenLast ? 0 : currentIndex + 1\r\n currentChild = menuChildren[currentIndex].children[0]\r\n break\r\n case \"previous\":\r\n currentIndex = currentIndex === 0 ? menuChildrenLast : currentIndex - 1\r\n currentChild = menuChildren[currentIndex].children[0]\r\n break\r\n }\r\n menu.setAttribute(\"aria-activedescendant\", currentChild.id)\r\n menuChildren[currentIndex].children[0].classList.add(\"sg-dropdown-item-visual-focus\")\r\n } else {\r\n const menu = document.getElementById(controlId+\"-menu\") as HTMLElement\r\n menu.setAttribute(\"aria-activedescendant\", \"\")\r\n }\r\n }, [controlId, showInternal, activeDescendant])\r\n\r\n const handleMouseOver = (event: MouseEvent) => {\r\n const target = event.target as HTMLElement\r\n let active=target.classList.contains(\"sg-dropdown-item-visual-focus\")\r\n const menu = document.getElementById(controlId+\"-menu\") as HTMLElement\r\n if(active) {\r\n return\r\n } else {\r\n document.querySelector(\".sg-dropdown-item-visual-focus\")?.classList.remove(\"sg-dropdown-item-visual-focus\")\r\n menu.setAttribute(\"aria-activedescendant\", \"\")\r\n target.classList.add(\"sg-dropdown-item-visual-focus\")\r\n menu.setAttribute(\"aria-activedescendant\", target.id)\r\n }\r\n }\r\n useEffect(() => {\r\n const menu = document.getElementById(controlId+\"-menu\") as HTMLElement\r\n for (let child of menu.children) {\r\n (child as HTMLElement).addEventListener(\"mouseover\", handleMouseOver, true)\r\n }\r\n return function cleanup() {\r\n for (let child of menu.children) {\r\n (child as HTMLElement).removeEventListener(\"mouseover\", handleMouseOver, true)\r\n }\r\n }\r\n }, [])\r\n return (\r\n <ul id={controlId+\"-menu\"} role=\"menu\" tabIndex={-1} aria-labelledby={controlId} \r\n ref={ref} className={`sg-dropdown-list${className ? \" \"+className:\"\"}${showInternal ? \" show\":\"\"}`}\r\n style={computedStyle} {...restProps}\r\n >\r\n {children}\r\n </ul>\r\n )\r\n})\r\n\r\n\r\nexport const Item = forwardRef<HTMLAnchorElement | HTMLButtonElement, DropdownItemType>( ({children, as=\"button\", className, ...restProps}, ref) => {\r\n const Component = as\r\n return (\r\n <li role=\"none\">\r\n <Component ref={ref} role=\"menuitem\" tabIndex=\"-1\" className={`sg-dropdown-item${className ? \" \"+className:\"\"}`} {...restProps}>\r\n {children}\r\n </Component >\r\n </li>\r\n )\r\n})\r\n\r\nexport const Divider = forwardRef<HTMLHRElement, DropdownDividerType>( ({className=\"\", ...restProps}, ref) => {\r\n return (\r\n <hr ref={ref} className={`.sg-dropdown-divider${className}`} {...restProps}></hr>\r\n )\r\n})\r\n\r\nexport default Object.assign(Dropdown, {\r\n Toggle: Toggle,\r\n Menu: Menu,\r\n Item: Item,\r\n //Text: Text,\r\n Divider: Divider\r\n})","import React, { forwardRef, useContext, createContext, useMemo } from \"react\";\r\n\r\nimport { FormCheckType, FormContextType, FormControlType, FormGroupType, FormLabelType, FormSelectType, FormTextType, FormType } from \"./Form.types\";\r\n\r\nexport const FormContext = createContext<FormContextType | null>(null)\r\nexport const FormContextProvider = ({children, value} : {children: React.ReactNode, value:FormContextType}) => {\r\n return (\r\n <FormContext.Provider value={value}>\r\n {children}\r\n </FormContext.Provider>\r\n )\r\n}\r\nexport const useFormContext = () => {\r\n const context = useContext(FormContext)\r\n if(!context) {\r\n throw new Error(\r\n \"useFormContext has to be used within a FormContextProvider!\"\r\n )\r\n }\r\n return context\r\n}\r\n\r\n\r\nconst Form = forwardRef<HTMLFormElement, FormType>(({children, ...restProps}, ref) => {\r\n return (\r\n <form ref={ref} {...restProps}>\r\n {children}\r\n </form>\r\n )\r\n})\r\n\r\n\r\nconst Control = forwardRef<HTMLInputElement, FormControlType>( (\r\n {as = \"input\", className = \"\", plaintext = false, id=\"\", type = \"text\", autoFocus=false, ...restProps}, ref\r\n) => {\r\n let Component = as\r\n\r\n const { controlId } = useFormContext()\r\n\r\n let elementId = controlId || id\r\n\r\n let computedClassName = (plaintext ? \"sg-form-control-plaintext\" : \"sg-form-control\") + (className != \"\" ? \" \"+className : \"\") + (type == \"color\" ? \" sg-form-control-color\" : \"\")\r\n\r\n return (\r\n <Component autoFocus={autoFocus} ref={ref} id={elementId} type={type} className={computedClassName} {...restProps} />\r\n )\r\n})\r\n\r\n\r\nconst Select = forwardRef<HTMLSelectElement, FormSelectType>( ({children, className, id, ...restProps}, ref) => {\r\n const { controlId } = useFormContext()\r\n\r\n let elementId = controlId ? controlId : id\r\n\r\n return (\r\n <select ref={ref} className={`sg-form-select${className ? \" \"+className : \"\"}`} id={elementId} {...restProps}>\r\n {children}\r\n </select>\r\n )\r\n})\r\n\r\n\r\nconst Group = forwardRef<HTMLDivElement, FormGroupType>( ({children, className, controlId, ...restProps}, ref) => {\r\n const context = useMemo(() => {\r\n return {controlId: controlId}\r\n }, [controlId])\r\n return (\r\n <div ref={ref} className={`sg-from-group${className ? \" \"+className : \"\"}`} {...restProps}>\r\n <FormContextProvider value={context}>\r\n {children}\r\n </FormContextProvider>\r\n </div>\r\n )\r\n})\r\n\r\n \r\nconst Label = forwardRef<HTMLLabelElement, FormLabelType>( ({children, className, htmlFor}, ref) => {\r\n const { controlId } = useFormContext()\r\n\r\n let elementHtmlFor = htmlFor ? htmlFor : controlId\r\n return (\r\n <label ref={ref} htmlFor={elementHtmlFor} className={`sg-form-label${className ? \" \"+className : \"\"}`}>\r\n {children}\r\n </label>\r\n )\r\n})\r\n\r\n// <Form.Check className=\"mb-3\" type=\"checkbox\" id=\"remember me checkbox\" label=\"Remember me\" onChange={event => handleChange(event, \"remember\")}/>\r\nconst Check = forwardRef<HTMLInputElement, FormCheckType>( ({ \r\n classNameContainer, containerRef, containerId, style,\r\n classNameLabel, labelRef, label, labelId,\r\n className, type, id, controlId, reverse=false, checkStyle, ...restProps \r\n } , ref) => {\r\n \r\n let elementId = controlId ? controlId : id\r\n let typeComputed = type === \"switch\" ? \"checkbox\" : type\r\n\r\n return (\r\n <div ref={containerRef} id={containerId} style={style} className={`sg-form-check${reverse ? \"-reverse\":\"\"}${classNameContainer ? \" \"+classNameContainer : \"\"}${type === \"switch\" ? \" sg-form-switch\":\"\"}`}>\r\n {reverse ?\r\n <>\r\n <input ref={ref} type={typeComputed} id={elementId} className={`sg-form-check-input${className ? \" \"+className : \"\"}`} {...restProps} />\r\n <label ref={labelRef} id={labelId} htmlFor={elementId}className={`sg-form-check-label${classNameLabel ? \" \"+classNameLabel : \"\"}`}>{label}</label>\r\n </> :\r\n <>\r\n <label ref={labelRef} id={labelId} htmlFor={elementId}className={`sg-form-check-label${classNameLabel ? \" \"+classNameLabel : \"\"}`}>{label}</label>\r\n <input ref={ref} type={typeComputed} id={elementId} className={`sg-form-check-input${className ? \" \"+className : \"\"}`} style={checkStyle} {...restProps} />\r\n </>\r\n }\r\n </div>\r\n )\r\n})\r\n\r\nconst Text = forwardRef<HTMLElement, FormTextType>( ({children, className, ...restProps}, ref) => {\r\n return (\r\n <small ref={ref} className={`sg-form-text${className ? \" \"+className:\"\"}`} {...restProps}>\r\n {children}\r\n </small>\r\n )\r\n})\r\n\r\nexport default Object.assign(Form, {\r\n Control: Control,\r\n Select: Select,\r\n Group: Group,\r\n Label: Label,\r\n Check: Check,\r\n Text: Text\r\n})","import { forwardRef, useMemo } from \"react\";\r\n\r\nimport { FormContextProvider } from \"../Form/Form\";\r\nimport { FormContextType } from \"../Form/Form.types\";\r\nimport { FloatingLabelType } from \"./FloatingLabel.types\";\r\n\r\nconst FloatingLabel = forwardRef<HTMLLabelElement, FloatingLabelType>( ({children, label, controlId, className, htmlFor,...restProps}, ref) => {\r\n const context = useMemo<FormContextType>(() => {\r\n return {controlId: controlId}\r\n }, [controlId])\r\n return (\r\n <FormContextProvider value={context} >\r\n <div className={`sg-form-floating`}>\r\n {children}\r\n <label ref={ref} htmlFor={controlId} className=\"sg-form-floating-label\" {...restProps}>{label}</label>\r\n </div>\r\n </FormContextProvider>\r\n )\r\n})\r\n\r\nexport default FloatingLabel","import { forwardRef } from \"react\"\r\n\r\nimport { InputGroupText, InputGroupType } from \"./InputGroup.types\"\r\n\r\nconst InputGroup = forwardRef<HTMLDivElement, InputGroupType>(({children, className, ...restProps}, ref) => {\r\n return (\r\n <div ref={ref} className={`sg-input-group${className ? \" \"+className : \"\"}`} {...restProps}>\r\n {children}\r\n </div>\r\n )\r\n})\r\n\r\nconst Text = forwardRef<HTMLSpanElement, InputGroupText>( ({children, className, ...restProps}, ref) => {\r\n return (\r\n <span ref={ref} className={`sg-input-group-text${className ? \" \"+className : \"\"}`} {...restProps}>\r\n {children}\r\n </span>\r\n )\r\n})\r\n\r\nexport default Object.assign(InputGroup, {\r\n Text: Text\r\n})","import React, { createContext, useContext, useEffect, useState, forwardRef, useRef } from \"react\"\r\nimport { createPortal } from \"react-dom\"\r\n\r\nimport { ModalBodyType, ModalContextType, ModalFooterType, ModalHeaderType, ModalTitleType, ModalType, ErrorModalType } from \"./Modal.types\"\r\n\r\nimport CloseButton from \"../CloseButton/CloseButton\"\r\nimport Button from \"../Button/Button\"\r\n\r\nconst ModalContext = createContext<ModalContextType>(null)\r\nconst ModalContextProvider = ({children, value}:{children:React.ReactNode, value:ModalContextType}) => {\r\n return (\r\n <ModalContext.Provider value={value}>\r\n {children}\r\n </ModalContext.Provider>\r\n )\r\n}\r\nconst useModalContext = () => {\r\n const context = useContext(ModalContext)\r\n if(!context) {\r\n throw new Error(\r\n \"useModalContext has to be used within ModalContextProvider!\"\r\n )\r\n }\r\n return context\r\n}\r\n\r\nconst Modal = ({ children, centered=false, size = \"md\", show, backdrop = \"static\", onHide, className, id, ...restProps \r\n }: ModalType) => {\r\n const [showModal, setShowModal] = useState<boolean>(show)\r\n useEffect(() => {\r\n setShowModal(show)\r\n }, [show])\r\n\r\n const modalRef = useRef<HTMLDialogElement>(null)\r\n useKeepElementFocused(modalRef)\r\n\r\n let typeCheck : {show: boolean, onHide: boolean} | undefined = typeof(show) === \"boolean\" && typeof(onHide) === \"function\" ? undefined : {show: typeof(show) === \"boolean\", onHide: typeof(onHide) === \"function\"}\r\n if(typeCheck) {\r\n console.error(\r\n !typeCheck.show ? \"The variable 'show' must be used and must be a boolean used to decide when to show the modal!\" : null,\r\n !typeCheck.onHide ? \"The variable 'onHide' must be used and must be a function which is used to set 'show' as the modal gets closed!\" : null\r\n )\r\n }\r\n\r\n const closeModal = () => {\r\n if(onHide) {\r\n onHide()\r\n }\r\n setShowModal(false);\r\n }\r\n\r\n useEffect(() => {\r\n const modal = modalRef.current\r\n \r\n if(!modal) return\r\n if(showModal) {\r\n modal.classList.remove('close')\r\n modal.showModal()\r\n }\r\n else {\r\n modal.close()\r\n }\r\n }, [showModal])\r\n\r\n let classNameComputed: string = `sg-modal-tag sg-modal-${size}`\r\n if(className) {\r\n classNameComputed += \" \"+className\r\n }\r\n if(backdrop === \"static\" || backdrop === \"true\") {\r\n classNameComputed += \" sg-modal-static\"\r\n }\r\n\r\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDialogElement>) => {\r\n const key: string = event.key\r\n if(key != \"Escape\") {return}\r\n \r\n event.preventDefault()\r\n const modal = modalRef.current!\r\n modal.classList.add(\"close\")\r\n modal.addEventListener('animationend', () => {\r\n closeModal(); // then run the default close method\r\n }, {once : true});\r\n }\r\n\r\n return (\r\n createPortal(\r\n <dialog ref={modalRef} className={classNameComputed} onKeyDown={(event) => handleKeyDown(event)} {...restProps }>\r\n <ModalContextProvider value={onHide}>\r\n {!typeCheck ?\r\n children :\r\n <ErrorModal typeCheck={typeCheck} closeModal={closeModal}/>\r\n }\r\n </ModalContextProvider>\r\n </dialog>\r\n , document.body)\r\n )\r\n}\r\n\r\nconst Header = forwardRef<HTMLDivElement | HTMLSpanElement | HTMLHeadingElement, ModalHeaderType>(({children, as=\"\", className = \"\", closeButton = false, onClick, ...restProps}, ref) => {\r\n let validAs = [\"div\", \"span\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"]\r\n let Component = validAs.find(valid => valid === as) ? as : \"div\"\r\n const onHide = useModalContext()\r\n const onCloseButtonClick = (event: React.MouseEvent) => {\r\n if(onClick) {\r\n onClick(event)\r\n }\r\n onHide()\r\n }\r\n\r\n return (\r\n <Component ref={ref} className={`sg-modal-header ${className}`} {...restProps}>\r\n {children}\r\n {closeButton ? <CloseButton variant onClick={event => onCloseButtonClick(event)}/> : null}\r\n </Component>\r\n )\r\n})\r\n\r\nconst Title = forwardRef<HTMLDivElement | HTMLSpanElement | HTMLHeadingElement, ModalTitleType>( ({children, as=\"h4\", className, ...restProps}, ref) => {\r\n let validAs = [\"div\", \"span\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"]\r\n let Component = validAs.find(valid => valid === as) ? as : \"h4\"\r\n return (\r\n <Component ref={ref} className={`sg-modal-title ${className}`} {...restProps}>\r\n {children}\r\n </Component>\r\n )\r\n})\r\n\r\nconst Body = forwardRef<HTMLDivElement, ModalBodyType>( ({children, className, ...restProps}, ref) => {\r\n return (\r\n <div ref={ref} className={`sg-modal-body ${className}`} {...restProps}>\r\n {children}\r\n </div>\r\n )\r\n})\r\n\r\nconst Footer = forwardRef<HTMLDivElement, ModalBodyType>( ({children, className, ...restProps}, ref) => {\r\n return (\r\n <div ref={ref} className={`sg-modal-footer ${className}`} {...restProps}>\r\n {children}\r\n </div>\r\n )\r\n})\r\n\r\nexport default Object.assign(Modal, {\r\n Header: Header,\r\n Title: Title,\r\n Body: Body,\r\n Footer: Footer\r\n})\r\n\r\nexport const useKeepElementFocused = function (elementRef: React.RefObject<HTMLDialogElement>) {\r\n useEffect(() => {\r\n const onKeyDown = (event: KeyboardEvent) => {\r\n const focusableElements = 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\r\n const modal = elementRef.current\r\n if(modal) {\r\n const firstFocusableElement = modal.querySelectorAll(focusableElements)[0] as HTMLElement\r\n const focusableContent = modal.querySelectorAll(focusableElements)\r\n const lastFocusableElement = focusableContent[focusableContent.length - 1] as HTMLElement\r\n let isTabPressed = event.key === 'Tab'\r\n \r\n if (!isTabPressed) {\r\n return;\r\n }\r\n \r\n if (event.shiftKey) {\r\n if (document.activeElement === firstFocusableElement) {\r\n lastFocusableElement.focus()\r\n event.preventDefault()\r\n }\r\n } else if (document.activeElement === lastFocusableElement) {\r\n firstFocusableElement.focus();\r\n event.preventDefault()\r\n }\r\n }\r\n }\r\n document.addEventListener('keydown', onKeyDown, true )\r\n\r\n return function cleanup() {\r\n document.removeEventListener('keydown', onKeyDown, true )\r\n }\r\n }, [elementRef])\r\n}\r\n\r\nconst ErrorModal = ({typeCheck, closeModal}:ErrorModalType) => {\r\n return (\r\n <>\r\n <Header closeButton >\r\n <Title>\r\n An Error ocurred!\r\n </Title>\r\n </Header>\r\n <Body>\r\n <p>\r\n {!typeCheck.show ? \"The variable 'show' must be used and must be a boolean used to decide when to show the modal!\" : null}\r\n {!typeCheck.onHide ? \"The variable 'onHide' must be used and must be a function which is used to set 'show' as the modal gets closed!\" : null}\r\n </p>\r\n </Body>\r\n <Footer>\r\n <Button variant=\"danger\" type=\"button\" onClick={() => closeModal()}>\r\n Close\r\n </Button>\r\n </Footer>\r\n </>\r\n )\r\n}","import React, { createContext, forwardRef, useContext, useMemo } from \"react\";\r\n\r\nimport { NavbarBrandType, NavbarTextType, NavbarType } from \"./Navbar.types\";\r\n\r\nexport type NavbarContextType = string | null\r\nexport const NavbarContext = createContext<NavbarContextType>(null)\r\n\r\nconst NavbarContextProvider = ({children, value}:{children:React.ReactNode, value:NavbarContextType}) => {\r\n return (\r\n <NavbarContext.Provider value={value}>\r\n {children}\r\n </NavbarContext.Provider>\r\n )\r\n}\r\nexport const useNavbarContext = () => {\r\n const context = useContext(NavbarContext)\r\n return context\r\n}\r\n\r\nconst Navbar = forwardRef<HTMLElement, NavbarType>(({children, className, navbarPrefix= \"sg-navbar-\", ...restProps}, ref) => {\r\n const navbarContext = useMemo(() => {\r\n return navbarPrefix\r\n }, [navbarPrefix])\r\n\r\n return (\r\n <nav ref={ref} className={`sg-navbar${className ? \" \"+className:\"\"}`} {...restProps}>\r\n <NavbarContextProvider value={navbarContext}>\r\n {children}\r\n </NavbarContextProvider>\r\n </nav>\r\n )\r\n})\r\n\r\nconst Brand = forwardRef<HTMLAnchorElement | HTMLElement, NavbarBrandType>( ({children, className, href=\"#\", as=\"a\", ...restProps}, ref) => {\r\n const Component = as || (href && as != \"Link\" ? 'a' : 'span')\r\n return (\r\n <Component ref={ref} href={href} className={`sg-navbar-brand${className ? \" \"+className:\"\"}`} {...restProps} >\r\n {children}\r\n </Component>\r\n )\r\n})\r\n\r\nconst Text = forwardRef<HTMLElement, NavbarTextType>( ({children, className, as=\"span\", ...restProps}, ref) => {\r\n const Component = as\r\n return (\r\n <Component ref={ref} className={`sg-navbar-text${className ? \" \"+className:\"\"}`} {...restProps}>\r\n {children}\r\n </Component>\r\n )\r\n})\r\n\r\nexport default Object.assign(Navbar, {\r\n Brand: Brand,\r\n Text: Text\r\n})","import React, { forwardRef } from \"react\";\r\n\r\nimport { NavType, NavItemType, NavLinkType } from \"./Nav.types\";\r\n\r\nimport { useNavbarContext } from \"../NavBar/Navbar\";\r\n\r\nconst Nav = forwardRef<HTMLElement, NavType>(({children, className, as=\"ul\", ...restProps}, ref) => {\r\n const Component = as\r\n const navbarContext = useNavbarContext()\r\n const navbarPrefix = navbarContext ? navbarContext : \"sg-navbar-\"\r\n\r\n return (\r\n <Component ref={ref} className={`${className} ${navbarPrefix}nav`} {...restProps}>\r\n {children}\r\n </Component>\r\n )\r\n})\r\n\r\n\r\nconst Item = forwardRef<HTMLElement, NavItemType>( ({children, className, as=\"li\", ...restProps}, ref) => {\r\n const Component = as\r\n return (\r\n <Component role=\"none\" ref={ref} className={`sg-nav-item${className ? \" \"+className:\"\"}`} {...restProps}>\r\n {children}\r\n </Component>\r\n )\r\n})\r\n\r\n\r\nconst Link = forwardRef<HTMLElement, NavLinkType>( ({children, className, as=\"a\", ...restProps}, ref) => {\r\n const Component = as\r\n return (\r\n <Component role=\"menuitem\" ref={ref} className={`sg-nav-link${className ? \" \"+className:\"\"}`} {...restProps}>\r\n {children}\r\n </Component>\r\n )\r\n})\r\n\r\nexport default Object.assign(Nav, {\r\n Item: Item,\r\n Link: Link\r\n})","import { forwardRef, useCallback, useMemo, useState } from \"react\";\r\n\r\nimport { NavDropdownType } from \"./NavDropdown.types\";\r\n\r\nimport Dropdown, { DropdownContextProvider } from \"../Dropdown/Dropdown\";\r\n\r\nconst getDropdownMenuPlacement = (alignEnd: boolean, dropDirection: string, isRTL:boolean = false) => {\r\n const topStart = isRTL ? 'top-end' : 'top-start';\r\n const topEnd = isRTL ? 'top-start' : 'top-end';\r\n const bottomStart = isRTL ? 'bottom-end' : 'bottom-start';\r\n const bottomEnd = isRTL ? 'bottom-start' : 'bottom-end';\r\n const leftStart = isRTL ? 'right-start' : 'left-start';\r\n const leftEnd = isRTL ? 'right-end' : 'left-end';\r\n const rightStart = isRTL ? 'left-start' : 'right-start';\r\n const rightEnd = isRTL ? 'left-end' : 'right-end';\r\n let placement = alignEnd ? bottomEnd : bottomStart;\r\n if (dropDirection === 'up') \r\n {\r\n placement = alignEnd ? topEnd : topStart\r\n }\r\n else if (dropDirection === 'end') {\r\n placement = alignEnd ? rightEnd : rightStart\r\n } else if (dropDirection === 'start') {\r\n placement = alignEnd ? leftEnd : leftStart\r\n } else if (dropDirection === 'down-centered') {\r\n placement = 'bottom'\r\n } else if (dropDirection === 'up-centered') {\r\n placement = 'top'\r\n }\r\n return placement;\r\n}\r\n\r\nconst NavDropdown = forwardRef<HTMLDivElement, NavDropdownType>((\r\n {\r\n children, className, onSelect, onToggle, controlId, toggleProps, title, menuProps,\r\n drop=\"down\", align=\"start\", autoClose=true, show=\"default\", ...restProps\r\n }, ref) => {\r\n const [showInternal, setShowInternal] = useState<boolean>(show === \"default\" ? false : show as boolean)\r\n const [activeDescendant, setActiveDescendant] = useState({case:\"\"})\r\n\r\n const internalOnToggle = useCallback((event: MouseEvent) => {\r\n event.stopPropagation()\r\n setShowInternal(prev => !prev)\r\n }, [])\r\n\r\n const alignEnd = align === \"end\"\r\n const placement = getDropdownMenuPlacement(alignEnd, drop )\r\n\r\n const directionClasses = {\r\n down: \"dropdown\",\r\n 'down-centered': `dropdown-center`,\r\n up: 'dropup',\r\n 'up-centered': 'dropup-center dropup',\r\n end: 'dropend',\r\n start: 'dropstart'\r\n };\r\n const controlIdcomputed = controlId\r\n const contextValue = useMemo(() => ({\r\n align, \r\n drop, \r\n showInternal: show != \"default\" && onToggle ? show as boolean : showInternal, \r\n handleToggle: show != \"default\" && onToggle ? onToggle : internalOnToggle, \r\n placement, \r\n directionClasses: {\r\n down: \"dropdown\",\r\n 'down-centered': `dropdown-center`,\r\n up: 'dropup',\r\n 'up-centered': 'dropup-center dropup',\r\n end: 'dropend',\r\n start: 'dropstart'\r\n },\r\n controlId: controlIdcomputed, \r\n activeDescendant, \r\n setActiveDescendant\r\n }), [align, drop, show, showInternal, onToggle, internalOnToggle, placement, directionClasses, controlId, activeDescendant, setActiveDescendant])\r\n \r\n return (\r\n <div ref={ref} id={controlId+\"-wrapper\"} className={`sg-dropdown${className? \" \"+className:\"\"} sg-nav-item`} {...restProps} >\r\n <DropdownContextProvider value={contextValue}>\r\n <Dropdown.Toggle navDropdown={true} {...toggleProps}>\r\n {title}\r\n </Dropdown.Toggle>\r\n <Dropdown.Menu {...menuProps}>\r\n {children}\r\n </Dropdown.Menu>\r\n </DropdownContextProvider>\r\n </div>\r\n )\r\n})\r\n\r\nexport default Object.assign(NavDropdown, {\r\n Toggle: Dropdown.Toggle,\r\n Menu: Dropdown.Menu,\r\n Item: Dropdown.Item,\r\n Divider: Dropdown.Divider\r\n})","import { createPortal } from \"react-dom\";\r\nimport React, { forwardRef, useEffect, useRef, useState } from \"react\";\r\n\r\nimport { PopoutType, PopoutBodyType, PopoutFooterType, PopoutHeaderType, PopoutTextType, PopoutTitleType } from \"./Popout.types\";\r\n/*\r\nexport const useEventListener = (eventType: keyof HTMLElementEventMap, callback: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions | undefined, customOptions: {element: HTMLElement}) => {\r\n const element = customOptions ? customOptions.element : document.body\r\n useEffect(() => {\r\n if(element) {\r\n element.addEventListener(eventType, callback, options)\r\n return function cleanup() {\r\n element.removeEventListener(eventType, callback, options)\r\n }\r\n }\r\n }, [callback, element])\r\n}\r\n*/\r\n\r\nconst Popout = forwardRef<HTMLDialogElement, PopoutType>(({children, initialPosition={top:0, left:0}, id, resize=false, move=false, className, style, ...restProps}, ref) => {\r\n const [coordinates, setCoordinates] = useState<{ top?: number, bottom?: number, right?: number, left?: number, offSetTop:number, offSetLeft:number }>({offSetTop:0, offSetLeft:0, ...initialPosition})\r\n const resizeComputed = resize ? \"true\":\"false\"\r\n const moveComputed = move ? \"true\":\"false\"\r\n \r\n const passedRef = useRef(ref)\r\n const popupRef = useRef<HTMLDialogElement>(null)\r\n const [ isMouseDown, setIsMouseDown ] = useState<boolean>(false)\r\n const isMouseDownRef = useRef(isMouseDown)\r\n useEffect(() => {\r\n isMouseDownRef.current = isMouseDown\r\n }, [isMouseDown])\r\n\r\n const onMouseDown = (event: React.PointerEvent<HTMLDialogElement>) => {\r\n const eventTarget = event.target as HTMLElement\r\n if(move && eventTarget.className.includes(\"sg-popout-title\") || eventTarget.className.includes(\"sg-popout-header\")) {\r\n const { top, left} = popupRef.current!.getBoundingClientRect();\r\n setCoordinates(prev => ({\r\n ...prev,\r\n offSetTop:event.clientY - top,\r\n offSetLeft:event.clientX - left\r\n }))\r\n popupRef.current!.style.setProperty(\"user-select\", \"none\")\r\n popupRef.current!.setPointerCapture(event.pointerId)//event.pointerId)//\"moveable-popup-\"+id);\r\n setIsMouseDown(true)\r\n }\r\n }\r\n const onMouseUp = () => {\r\n if(move) {\r\n popupRef.current!.style.removeProperty(\"user-select\")\r\n setIsMouseDown(false)\r\n }\r\n }\r\n const onMouseMove = (event: React.PointerEvent<HTMLDialogElement>) => {\r\n if( move && isMouseDownRef.current && popupRef.current ) {\r\n const isTopOver = event.clientY - coordinates.offSetTop < 0\r\n const isBottomOver = window.innerHeight - (event.clientY - coordinates.offSetTop + popupRef.current.offsetHeight) < 0\r\n const isLeftOver = event.clientX - coordinates.offSetLeft < 0\r\n const isRightOver = window.innerWidth - (event.clientX - coordinates.offSetLeft + popupRef.current.offsetWidth) < 0\r\n\r\n let topCoordinate = isTopOver ? 0 : event.clientY - coordinates.offSetTop\r\n topCoordinate = isBottomOver ? window.innerHeight - popupRef.current.offsetHeight : topCoordinate\r\n\r\n let leftCoordinate = isLeftOver ? 0 : event.clientX - coordinates.offSetLeft\r\n leftCoordinate = isRightOver ? window.innerWidth - popupRef.current.offsetWidth : leftCoordinate\r\n\r\n //console.log(event.clientX - coordinates.offSetLeft, event.clientY - coordinates.offSetTop)\r\n setCoordinates(prev => ({\r\n ...prev,\r\n top:topCoordinate,\r\n left:leftCoordinate\r\n }))\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n document.body.addEventListener(\"pointerup\", () => onMouseUp(), true)\r\n return function cleanup() {\r\n document.body.removeEventListener(\"pointerup\", () => onMouseUp(), true)\r\n }\r\n }, [])\r\n return (\r\n createPortal(\r\n <dialog data-resize={resizeComputed} data-move={moveComputed} data-passedRef={passedRef}\r\n ref={popupRef} id={id} className={`sg-moveable-popout${className ? \" \"+className : \"\"}`}\r\n style={{...style, top:coordinates.top, left:coordinates.left, bottom:coordinates.bottom, right:coordinates.right}}\r\n onPointerDown={onMouseDown} onPointerMove={(event) => onMouseMove(event)} {...restProps}\r\n >\r\n {children}\r\n </dialog>\r\n , document.body\r\n )\r\n )\r\n})\r\n\r\nconst Header = forwardRef<HTMLDivElement | HTMLSpanElement | HTMLHeadingElement, PopoutHeaderType>(\r\n ({ children, className, as = \"div\", ...restProps}, ref) => \r\n {\r\n let validAs = [\"div\", \"span\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"]\r\n let Component = validAs.find(valid => valid === as) ? as : \"div\"\r\n return (\r\n <Component ref={ref} className={`sg-popout-header ${className}`} {...restProps}>\r\n {children}\r\n </Component>\r\n )\r\n})\r\n\r\nconst Title = forwardRef<HTMLHeadingElement, PopoutTitleType>( ({as=\"h4\", className, children, ...restProps}, ref) => {\r\n let validAs = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"]\r\n let Component = validAs.find(valid => valid === as) ? as : \"h5\"\r\n return (\r\n <Component ref={ref} className={`sg-popout-title ${className}`} {...restProps}>\r\n {children}\r\n </Component>\r\n )\r\n})\r\n\r\nconst Body = forwardRef<HTMLDivElement, PopoutBodyType>( ({children, className, ...restProps}, ref) => {\r\n return (\r\n <div ref={ref} className={`sg-popout-body ${className}`} {...restProps}>\r\n {children}\r\n </div>\r\n )\r\n})\r\n\r\nconst Text = forwardRef<HTMLParagraphElement, PopoutTextType>( ({children, className, ...restProps}, ref) => {\r\n return (\r\n <p ref={ref} className={`sg-popout-text ${className}`} {...restProps}>\r\n {children}\r\n </p>\r\n )\r\n})\r\n\r\nconst Footer = forwardRef<HTMLDivElement, PopoutFooterType>( ({children, className, ...restProps}, ref) => {\r\n return (\r\n <div ref={ref} className={`sg-popout-footer ${className}`} {...restProps}>\r\n {children}\r\n </div>\r\n )\r\n})\r\n\r\nexport default Object.assign(Popout, {\r\n Header: Header,\r\n Title: Title,\r\n Body: Body,\r\n Text: Text,\r\n Footer: Footer\r\n})\r\n\r\n","import { forwardRef } from \"react\";\r\n\r\nimport { SpinnerType } from \"./Spinner.types\";\r\n\r\nconst Spinner = forwardRef<HTMLDivElement, SpinnerType>( ({size=\"1em\", color=\"white\", label, className, controlId, ...restProps}, ref) => {\r\n return (\r\n <>\r\n <div aria-labelledby={controlId} role=\"status\" ref={ref} className={`sg-spinner${className ? \" \"+className : \"\"}`} style={{width:size, height:size, borderColor:color}} {...restProps}></div>\r\n <label id={controlId} className=\"sg-visually-hidden\">{label}</label>\r\n </>\r\n )\r\n})\r\n\r\nexport default Spinner","import { forwardRef } from \"react\";\r\n\r\nimport { TableType } from \"./Table.types\";\r\n\r\n\r\nconst Table = forwardRef<HTMLTableElement, TableType>( ({children, size=\"lg\", className, ...restProps}, ref) => {\r\n let classesComputed = `sg-table${className ? \" \"+className:\"\"}${size === \"sm\" ? \" \"+\"sg-table-sm\":\"\"}`\r\n return (\r\n <table ref={ref} className={classesComputed} {...restProps}>\r\n {children}\r\n </table>\r\n )\r\n})\r\n\r\nexport default Table","import { createContext, forwardRef, useContext, useMemo, useState } from \"react\"\r\n\r\nimport { TabsButtonType, TabsContentType, TabsContextType, TabsControlsType, TabsPageType, TabsType } from \"./Tabs.types\"\r\n\r\nconst TabsContext = createContext<TabsContextType | null>(null)\r\nconst TabsContextProvider = ({children, value}:{children: React.ReactNode, value: TabsContextType}) => {\r\n return (\r\n <TabsContext.Provider value={value}>\r\n {children}\r\n </TabsContext.Provider>\r\n )\r\n}\r\nconst useTabsContext = () => {\r\n const context = useContext(TabsContext)\r\n if(!context) {\r\n throw new Error(\r\n \"useTabContext has to be used within a TabContextProvider!\"\r\n )\r\n }\r\n return context\r\n}\r\n\r\nconst Tabs = forwardRef<HTMLDivElement, TabsType>(({children, className, controlId, activeClassName, defaultActive, ...restProps}, ref) => {\r\n const [activeTab, setActiveTab] = useState<string>(defaultActive)\r\n const activeClass= activeClassName ? activeClassName: \"sg-active\"\r\n \r\n const contextValue = useMemo(() => ({\r\n activeTab,\r\n setActiveTab,\r\n controlId,\r\n activeClass\r\n }), [activeTab, setActiveTab, controlId])\r\n return (\r\n <TabsContextProvider value={contextValue}>\r\n <div ref={ref} id={controlId+\"-tab-wrapper\"} className={`sg-tabs${className ? \" \"+className: \"\"}`} {...restProps}>\r\n {children}\r\n </div>\r\n </TabsContextProvider>\r\n )\r\n})\r\n\r\nconst Controls = forwardRef<HTMLDivElement, TabsControlsType>( ({children, className, ...restProps}, ref) => {\r\n const { controlId, activeClass } = useTabsContext()\r\n \r\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\r\n const key = event.key\r\n const tabsControls = document.getElementById(controlId+\"-tab-controls\")\r\n if(tabsControls) {\r\n const tabControlsChildren = Array.from(tabsControls.children) as HTMLElement[]\r\n if(key === \"ArrowRight\" || key === \"ArrowLeft\") {\r\n event.preventDefault()\r\n const activeTab = document.querySelector(\".sg-tabs-button\"+\".\"+activeClass) as HTMLElement\r\n const activeTabIndex = tabControlsChildren.indexOf(activeTab)\r\n const indexChange = key === \"ArrowRight\" ? 1 : -1\r\n const newIndex = activeTabIndex + indexChange < 0 ? tabControlsChildren.length - 1 : (activeTabIndex + indexChange >= tabControlsChildren.length ? 0 : activeTabIndex + indexChange)\r\n tabControlsChildren[newIndex].focus()\r\n tabControlsChildren[newIndex].click()\r\n } else if (key === \"Home\" || key === \"End\") {\r\n event.preventDefault()\r\n const newIndex = key === \"Home\" ? 0 : tabControlsChildren.length -1\r\n tabControlsChildren[newIndex].focus()\r\n tabControlsChildren[newIndex].click()\r\n }\r\n }\r\n }\r\n\r\n return (\r\n <div onKeyDown={(event) => handleKeyDown(event)} role=\"tablist\" id={controlId+\"-tab-controls\"} ref={ref} className={`sg-tabs-controls${className ? \" \"+className:\"\"}`} {...restProps}>\r\n {children}\r\n </div>\r\n )\r\n})\r\n\r\nconst Button = forwardRef<HTMLButtonElement, TabsButtonType>( ({children, className, onClick, tabId, id,...restProps}, ref) => {\r\n const { activeTab, setActiveTab, activeClass } = useTabsContext()\r\n const classNameComputed = \"sg-tabs-button\" + (className ? \" \"+className:\"\") + (activeTab === tabId ? \" \"+activeClass : \"\")\r\n const isActiveTab = activeTab === tabId\r\n const handleClick = (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\r\n setActiveTab(tabId)\r\n if(onClick) {\r\n onClick(event)\r\n }\r\n }\r\n return (\r\n <button \r\n role=\"tab\" type=\"button\" id={tabId+\"-button\"} ref={ref} onClick={event => handleClick(event)} className={classNameComputed} {...restProps}\r\n tabIndex={isActiveTab ? 0:-1} aria-selected={isActiveTab ? \"true\":\"false\"} aria-controls={tabId+\"-page\"}\r\n >\r\n {children}\r\n </button>\r\n )\r\n})\r\n\r\nconst Content = forwardRef<HTMLDivElement, TabsContentType>( ({children, className, ...restProps}, ref) => {\r\n return (\r\n <div role=\"none\" ref={ref} className={`sg-tabs-content${className ? \" \"+className:\"\"}`} {...restProps}>\r\n {children}\r\n </div>\r\n )\r\n})\r\n\r\nconst Page = forwardRef<HTMLDivElement, TabsPageType>( ({children, className, tabId, ...restProps}, ref) => {\r\n const { activeTab, activeClass } = useTabsContext()\r\n const classNameComputed = \"sg-tabs-page\" + (className ? \" \"+className:\"\") + (activeTab === tabId ? \" \"+activeClass : \"\")\r\n return (\r\n <div \r\n role=\"tabpanel\" id={tabId+\"-page\"} aria-labelledby={tabId+\"-button\"}\r\n ref={ref} className={classNameComputed} {...restProps}\r\n >\r\n {children}\r\n </div>\r\n )\r\n})\r\n\r\nexport default Object.assign(Tabs, {\r\n Controls: Controls,\r\n Button: Button,\r\n Content: Content,\r\n Page: Page,\r\n})","import { ReactNode, useState, forwardRef } from \"react\"\r\n\r\nimport { BaseButtonType } from \"../../BaseTypes\"\r\n\r\ntype ToggleButtonType = {\r\n children: ReactNode,\r\n toggled?: boolean,\r\n onClick?: <T>(event: T) => T\r\n} & BaseButtonType\r\n\r\nconst ToggleButton = forwardRef<HTMLButtonElement, ToggleButtonType>( ({children, toggled=\"false\", onClick, ...restProps}, ref) => {\r\n const [ toggledInternal, setToggledInternal ] = useState<boolean>(toggled === \"true\" ? true : false)\r\n const handleClick = (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\r\n setToggledInternal(prev => !prev)\r\n if(onClick) {\r\n onClick(event)\r\n }\r\n }\r\n return (\r\n <button onClick={(event) => handleClick(event)} data-toggled={toggledInternal} {...restProps}>\r\n {children}\r\n </button>\r\n )\r\n})\r\n\r\nexport default ToggleButton"],"names":["Button","forwardRef","children","variant","className","rest","ref","_jsx","type","undefined","Card","restProps","Header","as","Component","find","valid","Title","Body","Text","Footer","Object","assign","CloseButton","isEventOnMenu","event","controlId","element","target","condition","eventIsOnMenu","id","parentElement","DropdownContext","createContext","DropdownContextProvider","value","Provider","useDropdownContext","context","useContext","Error","Dropdown","onSelect","onToggle","drop","align","autoClose","show","showInternal","setShowInternal","useState","activeDescendant","setActiveDescendant","case","internalOnToggle","stopPropagation","prev","placement","alignEnd","dropDirection","isRTL","getDropdownMenuPlacement","contextValue","useMemo","handleToggle","directionClasses","down","up","end","start","Toggle","navDropdown","handleKeyPress","flag","console","log","key","document","querySelector","click","preventDefault","handleClick","toggleElement","getElementById","focus","useEffect","addEventListener","removeEventListener","classNamesComputed","tabIndex","onClick","toggleButtonClick","Menu","style","computedStyle","setComputedStyle","useLayoutEffect","menu","tempComputedStyle","getBoundingClientRect","right","window","innerWidth","left","top","bottom","innerHeight","menuChildren","menuChildrenLast","length","elementWithVisualFocus","currentIndex","currentChild","classList","remove","i","setAttribute","add","handleMouseOver","active","contains","child","role","Item","Divider","Dropdown$1","FormContext","FormContextProvider","useFormContext","Form","Control","plaintext","autoFocus","Select","Group","Label","htmlFor","Check","classNameContainer","containerRef","containerId","classNameLabel","labelRef","label","labelId","reverse","checkStyle","elementId","typeComputed","_jsxs","_Fragment","InputGroup","ModalContext","ModalContextProvider","closeButton","onHide","useModalContext","onCloseButtonClick","centered","size","backdrop","showModal","setShowModal","modalRef","useRef","useKeepElementFocused","typeCheck","error","closeModal","modal","current","close","classNameComputed","createPortal","onKeyDown","once","handleKeyDown","ErrorModal","body","elementRef","focusableElements","firstFocusableElement","querySelectorAll","focusableContent","lastFocusableElement","shiftKey","activeElement","NavbarContext","NavbarContextProvider","Navbar","navbarPrefix","navbarContext","Brand","href","Nav","Link","NavDropdown","toggleProps","title","menuProps","useCallback","controlIdcomputed","Popout","initialPosition","resize","move","coordinates","setCoordinates","offSetTop","offSetLeft","resizeComputed","moveComputed","passedRef","popupRef","isMouseDown","setIsMouseDown","isMouseDownRef","onMouseUp","removeProperty","onPointerDown","eventTarget","includes","clientY","clientX","setProperty","setPointerCapture","pointerId","onPointerMove","isTopOver","isBottomOver","offsetHeight","isLeftOver","isRightOver","offsetWidth","topCoordinate","leftCoordinate","onMouseMove","color","width","height","borderColor","TabsContext","TabsContextProvider","useTabsContext","Tabs","activeClassName","defaultActive","activeTab","setActiveTab","activeClass","Controls","tabsControls","tabControlsChildren","Array","from","activeTabIndex","indexOf","indexChange","newIndex","tabId","isActiveTab","Content","Page","toggled","toggledInternal","setToggledInternal"],"mappings":"2QAIA,MAAMA,EAASC,GAA2C,EAAEC,WAAUC,UAAQ,UAAWC,eAAcC,GAAOC,IAItGC,EAAA,SAAA,CAAQD,IAA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A,EAAKF,UAAW,mBAAkBA,EAAY,IAAIA,EAAU,OAAUO,EAAST,SAChGA,MAKPqQ,GAAOtQ,GAA0C,EAAEC,WAAUE,YAAWgQ,WAAUzP,GAAYL,KAChG,MAAMkP,UAAEA,EAASE,YAAEA,GAAgBN,KAEnC,OACI7O,EAAA,MAAA,CACIoH,KAAK,WAAW5F,GAAIqO,EAAM,QAAO,kBAAmBA,EAAM,UAC1D9P,IAAKA,EAAKF,UAJQ,gBAAkBA,EAAY,IAAIA,EAAU,KAAOoP,IAAcY,EAAQ,IAAIV,EAAc,OAIjE/O,EAAST,SAEpDA,GAER,IAGWmB,OAAOC,OAAO+N,GAAM,CAChCM,SAAUA,GACV3P,OAAQA,GACRsQ,QAASA,GACTC,KAAMA,KC5GWtQ,GAAiD,EAAEC,WAAUsQ,UAAQ,QAAS7K,aAAYhF,GAAYL,KACvH,MAAQmQ,EAAiBC,GAAuBvN,EAA8B,SAAZqN,GAOlE,OACIjQ,YAAQoF,QAAUlE,GAPF,CAACA,IACjBiP,GAAmBjN,IAASA,IACzBkC,GACCA,EAAQlE,EACX,EAG2ByD,CAAYzD,kBAAsBgP,KAAqB9P,EAC9ET,SAAAA,GAER"}
@@ -0,0 +1 @@
1
+ export * from "./components";
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ import "./components/Button/Button.js";
2
+ import "./components/Card/Card.js";
3
+ import "./components/CloseButton/CloseButton.js";
4
+ import "./components/Dropdown/Dropdown.js";
5
+ import "./components/FloatingLabel/FloatingLabel.js";
6
+ import "./components/Form/Form.js";
7
+ import "./components/Grid/Grid.js";
8
+ import "./components/InputGroup/InputGroup.js";
9
+ import "./components/Modal/Modal.js";
10
+ import "./components/Nav/Nav.js";
11
+ import "./components/NavBar/Navbar.js";
12
+ import "./components/NavDropdown/NavDropdown.js";
13
+ import "./components/OffCanvas/OffCanvas.js";
14
+ import "./components/Overlay/Overlay.js";
15
+ import "./components/Popout/Popout.js";
16
+ import "./components/Spinner/Spinner.js";
17
+ import "./components/Table/Table.js";
18
+ import "./components/Tabs/Tabs.js";
19
+ import "./components/ToggleButton/ToggleButton.js";
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/package.json CHANGED
@@ -1,15 +1,18 @@
1
1
  {
2
2
  "name": "stargazer-ui",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "React component library made by Stargazer Works",
5
- "main": "dist/main.js",
5
+ "main": "dist/cjs/index.js",
6
+ "module": "dist/esm/index.js",
7
+ "types": "dist/index.d.ts",
6
8
  "files": [
7
9
  "dist"
8
10
  ],
9
11
  "scripts": {
10
12
  "test": "\"echo \\\"Error: no test specified\\\" && exit 1\"",
11
13
  "dev": "vite --config vite.config.js --port 5000",
12
- "build": "tsc && vite build --config vite.config.js"
14
+ "build": "tsc && vite build --config vite.config.js",
15
+ "rollup": "rollup -c --bundleConfigAsCjs"
13
16
  },
14
17
  "type": "module",
15
18
  "engines": {
@@ -39,6 +42,10 @@
39
42
  },
40
43
  "devDependencies": {
41
44
  "@reduxjs/toolkit": "^2.2.1",
45
+ "@rollup/plugin-commonjs": "^25.0.7",
46
+ "@rollup/plugin-node-resolve": "^15.2.3",
47
+ "@rollup/plugin-terser": "^0.4.4",
48
+ "@rollup/plugin-typescript": "^11.1.6",
42
49
  "@types/node": "^20.8.10",
43
50
  "@types/react": "^18.2.35",
44
51
  "@types/react-dom": "^18.2.14",
@@ -52,11 +59,15 @@
52
59
  "glob": "^10.3.10",
53
60
  "react": ">=17.0.0",
54
61
  "react-dom": ">=17.0.0",
62
+ "rollup": "^4.12.0",
63
+ "rollup-plugin-dts": "^6.1.0",
64
+ "rollup-plugin-peer-deps-external": "^2.2.4",
55
65
  "typescript": "^5.2.2",
56
66
  "vite": "^5.1.4",
57
67
  "vite-plugin-dts": "^3.7.3"
58
68
  },
59
69
  "dependencies": {
60
- "sass": "^1.71.1"
70
+ "sass": "^1.71.1",
71
+ "tslib": "^2.6.2"
61
72
  }
62
73
  }
@@ -1,9 +0,0 @@
1
- import React from "react";
2
- import { BaseButtonType } from "../BaseTypes";
3
- export type ButtonType = {
4
- children: React.ReactNode;
5
- variant?: string;
6
- className?: string;
7
- } & BaseButtonType;
8
- declare const Button: React.ForwardRefExoticComponent<Omit<ButtonType, "ref"> & React.RefAttributes<HTMLButtonElement>>;
9
- export default Button;
@@ -1,92 +0,0 @@
1
- import React from "react";
2
- import { BaseDivType, BaseHeadingType, BaseSpanType, BaseParagraphType } from "../BaseTypes";
3
- export type CardType = {
4
- children: typeof React.Children;
5
- className?: string;
6
- } & BaseDivType;
7
- export type CardHeaderPossible = BaseDivType | BaseSpanType | BaseHeadingType;
8
- export type CardHeaderType = {
9
- children: typeof React.Children;
10
- className?: string;
11
- as?: React.ElementType;
12
- } & CardHeaderPossible;
13
- export type CardBodyType = {
14
- children: typeof React.Children;
15
- className?: string;
16
- } & BaseDivType;
17
- export type CardTextType = {
18
- children: typeof React.Children;
19
- className?: string;
20
- } & BaseParagraphType;
21
- export type CardFooterType = {
22
- children: typeof React.Children;
23
- className?: string;
24
- } & BaseDivType;
25
- declare const _default: React.ForwardRefExoticComponent<Omit<CardType, "ref"> & React.RefAttributes<HTMLDivElement>> & {
26
- Header: React.ForwardRefExoticComponent<(Omit<{
27
- children: {
28
- map<T, C>(children: C | readonly C[], fn: (child: C, index: number) => T): C extends null | undefined ? C : Exclude<T, boolean | null | undefined>[];
29
- forEach<C_1>(children: C_1 | readonly C_1[], fn: (child: C_1, index: number) => void): void;
30
- count(children: any): number;
31
- only<C_2>(children: C_2): C_2 extends any[] ? never : C_2;
32
- toArray(children: React.ReactNode | React.ReactNode[]): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal)[];
33
- };
34
- className?: string | undefined;
35
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
36
- } & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, "ref"> | Omit<{
37
- children: {
38
- map<T, C>(children: C | readonly C[], fn: (child: C, index: number) => T): C extends null | undefined ? C : Exclude<T, boolean | null | undefined>[];
39
- forEach<C_1>(children: C_1 | readonly C_1[], fn: (child: C_1, index: number) => void): void;
40
- count(children: any): number;
41
- only<C_2>(children: C_2): C_2 extends any[] ? never : C_2;
42
- toArray(children: React.ReactNode | React.ReactNode[]): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal)[];
43
- };
44
- className?: string | undefined;
45
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
46
- } & React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement>, "ref"> | Omit<{
47
- children: {
48
- map<T, C>(children: C | readonly C[], fn: (child: C, index: number) => T): C extends null | undefined ? C : Exclude<T, boolean | null | undefined>[];
49
- forEach<C_1>(children: C_1 | readonly C_1[], fn: (child: C_1, index: number) => void): void;
50
- count(children: any): number;
51
- only<C_2>(children: C_2): C_2 extends any[] ? never : C_2;
52
- toArray(children: React.ReactNode | React.ReactNode[]): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal)[];
53
- };
54
- className?: string | undefined;
55
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
56
- } & React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement>, "ref">) & React.RefAttributes<HTMLDivElement | HTMLHeadingElement | HTMLSpanElement>>;
57
- Body: React.ForwardRefExoticComponent<Omit<CardBodyType, "ref"> & React.RefAttributes<HTMLDivElement>>;
58
- Title: React.ForwardRefExoticComponent<(Omit<{
59
- children: {
60
- map<T, C>(children: C | readonly C[], fn: (child: C, index: number) => T): C extends null | undefined ? C : Exclude<T, boolean | null | undefined>[];
61
- forEach<C_1>(children: C_1 | readonly C_1[], fn: (child: C_1, index: number) => void): void;
62
- count(children: any): number;
63
- only<C_2>(children: C_2): C_2 extends any[] ? never : C_2;
64
- toArray(children: React.ReactNode | React.ReactNode[]): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal)[];
65
- };
66
- className?: string | undefined;
67
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
68
- } & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, "ref"> | Omit<{
69
- children: {
70
- map<T, C>(children: C | readonly C[], fn: (child: C, index: number) => T): C extends null | undefined ? C : Exclude<T, boolean | null | undefined>[];
71
- forEach<C_1>(children: C_1 | readonly C_1[], fn: (child: C_1, index: number) => void): void;
72
- count(children: any): number;
73
- only<C_2>(children: C_2): C_2 extends any[] ? never : C_2;
74
- toArray(children: React.ReactNode | React.ReactNode[]): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal)[];
75
- };
76
- className?: string | undefined;
77
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
78
- } & React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement>, "ref"> | Omit<{
79
- children: {
80
- map<T, C>(children: C | readonly C[], fn: (child: C, index: number) => T): C extends null | undefined ? C : Exclude<T, boolean | null | undefined>[];
81
- forEach<C_1>(children: C_1 | readonly C_1[], fn: (child: C_1, index: number) => void): void;
82
- count(children: any): number;
83
- only<C_2>(children: C_2): C_2 extends any[] ? never : C_2;
84
- toArray(children: React.ReactNode | React.ReactNode[]): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal)[];
85
- };
86
- className?: string | undefined;
87
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
88
- } & React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement>, "ref">) & React.RefAttributes<HTMLHeadingElement>>;
89
- Text: React.ForwardRefExoticComponent<Omit<CardTextType, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
90
- Footer: React.ForwardRefExoticComponent<Omit<CardFooterType, "ref"> & React.RefAttributes<HTMLDivElement>>;
91
- };
92
- export default _default;
@@ -1,18 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as d } from "react";
3
- const h = d(({ children: e, className: t, ...r }, s) => /* @__PURE__ */ a("div", { ref: s, className: "sg-card " + t, ...r, children: e })), l = d(({ as: e = "div", className: t, children: r, ...s }, o) => {
4
- let n = ["div", "span", "h1", "h2", "h3", "h4", "h5", "h6"].find((c) => c === e) ? e : "div";
5
- return /* @__PURE__ */ a(n, { ref: o, className: `sg-card-header ${t}`, ...s, children: r });
6
- }), m = d(({ as: e = "h5", className: t, children: r, ...s }, o) => {
7
- let n = ["h1", "h2", "h3", "h4", "h5", "h6"].find((c) => c === e) ? e : "h5";
8
- return /* @__PURE__ */ a(n, { ref: o, className: t, ...s, children: r });
9
- }), v = d(({ children: e, className: t, ...r }, s) => /* @__PURE__ */ a("div", { ref: s, className: `sg-card-body ${t}`, ...r, children: e })), f = d(({ children: e, className: t, ...r }, s) => /* @__PURE__ */ a("p", { ref: s, className: `sg-card-text ${t}`, ...r, children: e })), p = d(({ children: e, className: t, ...r }, s) => /* @__PURE__ */ a("div", { ref: s, className: `sg-card-footer ${t}`, ...r, children: e })), x = Object.assign(h, {
10
- Header: l,
11
- Body: v,
12
- Title: m,
13
- Text: f,
14
- Footer: p
15
- });
16
- export {
17
- x as default
18
- };
@@ -1,11 +0,0 @@
1
- import React from "react";
2
- import { BaseLabelType } from "../BaseTypes";
3
- export type FloatingLabelType = {
4
- children: React.ReactNode;
5
- className?: string;
6
- htmlFor?: string;
7
- label: string;
8
- controlId: string;
9
- } & BaseLabelType;
10
- declare const FloatingLabel: React.ForwardRefExoticComponent<Omit<FloatingLabelType, "ref"> & React.RefAttributes<HTMLLabelElement>>;
11
- export default FloatingLabel;
@@ -1,65 +0,0 @@
1
- import React from "react";
2
- import { BaseDivType, BaseFormType, BaseInputType, BaseLabelType, BaseSelectType, BaseSmallType } from "../BaseTypes";
3
- export type FormContextType = {
4
- controlId: string;
5
- };
6
- export declare const FormContext: React.Context<FormContextType | null>;
7
- export declare const FormContextProvider: ({ children, value }: {
8
- children: React.ReactNode;
9
- value: FormContextType;
10
- }) => import("react/jsx-runtime").JSX.Element;
11
- export declare const useFormContext: () => FormContextType;
12
- export type FormType = {
13
- children: React.ReactNode;
14
- } & BaseFormType;
15
- export type FormControlType = {
16
- as?: React.ElementType;
17
- className?: string;
18
- plaintext?: boolean;
19
- id?: string;
20
- type?: string;
21
- autoFocus?: boolean;
22
- } & BaseInputType;
23
- export type FormSelectType = {
24
- children: React.ReactNode;
25
- className?: string;
26
- id?: string;
27
- } & BaseSelectType;
28
- export type FormGroupType = {
29
- children: React.ReactNode;
30
- className?: string;
31
- controlId: string;
32
- } & BaseDivType;
33
- export type FormLabelType = {
34
- children: React.ReactNode;
35
- className?: string;
36
- htmlFor?: string;
37
- } & BaseLabelType;
38
- export type FormCheckType = {
39
- classNameContainer?: string;
40
- containerRef?: React.LegacyRef<HTMLDivElement>;
41
- containerId?: string;
42
- style?: React.CSSProperties;
43
- classNameLabel?: string;
44
- labelRef?: React.LegacyRef<HTMLLabelElement>;
45
- label?: string;
46
- labelId?: string;
47
- className?: string;
48
- type?: string;
49
- controlId?: string;
50
- reverse?: boolean;
51
- checkStyle?: React.CSSProperties;
52
- } & BaseInputType;
53
- export type FormTextType = {
54
- children: React.ReactNode;
55
- className?: string;
56
- } & BaseSmallType;
57
- declare const _default: React.ForwardRefExoticComponent<Omit<FormType, "ref"> & React.RefAttributes<HTMLFormElement>> & {
58
- Control: React.ForwardRefExoticComponent<Omit<FormControlType, "ref"> & React.RefAttributes<HTMLInputElement>>;
59
- Select: React.ForwardRefExoticComponent<Omit<FormSelectType, "ref"> & React.RefAttributes<HTMLSelectElement>>;
60
- Group: React.ForwardRefExoticComponent<Omit<FormGroupType, "ref"> & React.RefAttributes<HTMLDivElement>>;
61
- Label: React.ForwardRefExoticComponent<Omit<FormLabelType, "ref"> & React.RefAttributes<HTMLLabelElement>>;
62
- Check: React.ForwardRefExoticComponent<Omit<FormCheckType, "ref"> & React.RefAttributes<HTMLInputElement>>;
63
- Text: React.ForwardRefExoticComponent<Omit<FormTextType, "ref"> & React.RefAttributes<HTMLElement>>;
64
- };
65
- export default _default;
package/dist/Grid/Col.js DELETED
@@ -1,19 +0,0 @@
1
- import { jsx as C } from "react/jsx-runtime";
2
- import { forwardRef as h } from "react";
3
- const j = ({ children: u, as: i = "div", className: d = "", ...o }, p) => {
4
- const g = i, m = ["xxl", "xl", "lg", "md", "sm", "xs"], x = "xs";
5
- let n = "", c = "", r = [];
6
- m.forEach((e) => {
7
- const t = o[e];
8
- delete o[e];
9
- let l, f, a;
10
- typeof t == "object" && t != null ? { span: l, offset: f, order: a } = t : l = t;
11
- const s = e !== x ? `-${e}` : "";
12
- l && (c += l === !0 ? ` sg-col${s}` : ` sg-col${s}-${l}`, r.push(l === !0 ? ` sg-col${s}` : ` sg-col${s}-${l}`)), a != null && (n += ` order${s}-${a}`), f != null && (n += ` offset${s}-${f}`);
13
- });
14
- let $ = d + n + c;
15
- return $ += r.length ? "" : " sg-col", /* @__PURE__ */ C(g, { ref: p, className: $, ...o, children: u });
16
- }, v = h(j);
17
- export {
18
- v as default
19
- };
@@ -1,9 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as s } from "react";
3
- const l = ({ children: e, className: o, fluid: r, ...f }, i) => {
4
- let t = "sg-container", n = typeof r == "string" ? `-${r}` : "-fluid";
5
- return /* @__PURE__ */ a("div", { ref: i, className: `${r ? t + n : t} ${o}`, ...f, children: e });
6
- }, d = s(l);
7
- export {
8
- d as default
9
- };
package/dist/Grid/Row.js DELETED
@@ -1,17 +0,0 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import { forwardRef as x } from "react";
3
- const $ = ({ children: n, className: c = "", as: f = "div", ...t }, a) => {
4
- const r = f, m = ["xxl", "xl", "lg", "md", "sm", "xs"], d = "xs";
5
- let e = "";
6
- return m.forEach((o) => {
7
- const l = t[o];
8
- delete t[o];
9
- let s;
10
- l != null && typeof l == "object" ? { cols: s } = l : s = l;
11
- const i = o !== d ? `-${o}` : "";
12
- s != null && (e += ` sg-row-cols${i}-${s}`);
13
- }), /* @__PURE__ */ u(r, { ref: a, className: `sg-row ${c}${e}`, ...t, children: n });
14
- }, g = x($);
15
- export {
16
- g as default
17
- };
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- import { BaseDivType } from "../BaseTypes";
3
- export type InputGroupType = {
4
- children: React.ReactNode;
5
- className?: string;
6
- } & BaseDivType;
7
- export type InputGroupText = {
8
- children: React.ReactNode;
9
- className?: string;
10
- };
11
- declare const _default: React.ForwardRefExoticComponent<Omit<InputGroupType, "ref"> & React.RefAttributes<HTMLDivElement>> & {
12
- Text: React.ForwardRefExoticComponent<InputGroupText & React.RefAttributes<HTMLSpanElement>>;
13
- };
14
- export default _default;
@@ -1,8 +0,0 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { forwardRef as s } from "react";
3
- const e = s(({ children: r, className: t, ...o }, n) => /* @__PURE__ */ p("div", { ref: n, className: `sg-input-group${t ? " " + t : ""}`, ...o, children: r })), u = s(({ children: r, className: t, ...o }, n) => /* @__PURE__ */ p("span", { ref: n, className: `sg-input-group-text${t ? " " + t : ""}`, ...o, children: r })), f = Object.assign(e, {
4
- Text: u
5
- });
6
- export {
7
- f as default
8
- };
@@ -1,46 +0,0 @@
1
- import React from "react";
2
- import { BaseAnchorType, BaseElementType, BaseNavType } from "../BaseTypes";
3
- export type NavbarContextType = string | null;
4
- export declare const NavbarContext: React.Context<NavbarContextType>;
5
- export declare const useNavbarContext: () => NavbarContextType;
6
- export type NavbarType = {
7
- children: React.ReactNode;
8
- className?: string;
9
- navbarPrefix?: string;
10
- } & BaseNavType;
11
- export type NavbarBrandType = {
12
- children: React.ReactNode;
13
- className?: string;
14
- as?: React.ElementType;
15
- href?: string;
16
- } & (BaseAnchorType | BaseElementType);
17
- export type NavbarTextType = {
18
- children: React.ReactNode;
19
- className?: string;
20
- as?: React.ElementType;
21
- } & BaseElementType;
22
- declare const _default: React.ForwardRefExoticComponent<Omit<NavbarType, "ref"> & React.RefAttributes<HTMLElement>> & {
23
- Brand: React.ForwardRefExoticComponent<(Omit<{
24
- children: React.ReactNode;
25
- className?: string | undefined;
26
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
27
- href?: string | undefined;
28
- } & React.ClassAttributes<HTMLAnchorElement> & React.AnchorHTMLAttributes<HTMLAnchorElement>, "ref"> | Omit<{
29
- children: React.ReactNode;
30
- className?: string | undefined;
31
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
32
- href?: string | undefined;
33
- } & React.ClassAttributes<HTMLElement> & React.HTMLAttributes<HTMLElement>, "ref">) & React.RefAttributes<BaseAnchorType | BaseElementType>>;
34
- Text: React.ForwardRefExoticComponent<(Omit<{
35
- children: React.ReactNode;
36
- className?: string | undefined;
37
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
38
- href?: string | undefined;
39
- } & React.ClassAttributes<HTMLAnchorElement> & React.AnchorHTMLAttributes<HTMLAnchorElement>, "ref"> | Omit<{
40
- children: React.ReactNode;
41
- className?: string | undefined;
42
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
43
- href?: string | undefined;
44
- } & React.ClassAttributes<HTMLElement> & React.HTMLAttributes<HTMLElement>, "ref">) & React.RefAttributes<HTMLElement>>;
45
- };
46
- export default _default;