stargazer-ui 1.0.3 → 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.
- package/dist/BaseTypes.d.ts +4 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/components/Button/Button.d.ts +4 -0
- package/dist/components/Button/Button.types.d.ts +7 -0
- package/dist/components/Button/Button.types.js +1 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.js +4 -0
- package/dist/components/Card/Card.d.ts +34 -0
- package/dist/components/Card/Card.js +18 -0
- package/dist/components/Card/Card.types.d.ts +24 -0
- package/dist/components/Card/Card.types.js +1 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Card/index.js +4 -0
- package/dist/{CloseButton/index.d.ts → components/CloseButton/CloseButton.d.ts} +1 -5
- package/dist/components/CloseButton/CloseButton.types.d.ts +5 -0
- package/dist/components/CloseButton/CloseButton.types.js +1 -0
- package/dist/components/CloseButton/index.d.ts +1 -0
- package/dist/components/CloseButton/index.js +4 -0
- package/dist/{Dropdown/index.d.ts → components/Dropdown/Dropdown.d.ts} +18 -55
- package/dist/{Dropdown/index.js → components/Dropdown/Dropdown.js} +31 -30
- package/dist/components/Dropdown/Dropdown.types.d.ts +55 -0
- package/dist/components/Dropdown/Dropdown.types.js +1 -0
- package/dist/components/Dropdown/index.d.ts +1 -0
- package/dist/components/Dropdown/index.js +4 -0
- package/dist/components/FloatingLabel/FloatingLabel.d.ts +4 -0
- package/dist/components/FloatingLabel/FloatingLabel.js +13 -0
- package/dist/components/FloatingLabel/FloatingLabel.types.d.ts +9 -0
- package/dist/components/FloatingLabel/FloatingLabel.types.js +1 -0
- package/dist/components/FloatingLabel/index.d.ts +1 -0
- package/dist/components/FloatingLabel/index.js +4 -0
- package/dist/components/Form/Form.d.ts +17 -0
- package/dist/{Form/index.js → components/Form/Form.js} +16 -15
- package/dist/components/Form/Form.types.d.ts +50 -0
- package/dist/components/Form/Form.types.js +1 -0
- package/dist/components/Form/index.d.ts +1 -0
- package/dist/components/Form/index.js +4 -0
- package/dist/components/Grid/Grid.d.ts +5 -0
- package/dist/components/Grid/Grid.js +36 -0
- package/dist/components/Grid/index.d.ts +1 -0
- package/dist/components/Grid/index.js +4 -0
- package/dist/components/InputGroup/InputGroup.d.ts +6 -0
- package/dist/components/InputGroup/InputGroup.js +8 -0
- package/dist/components/InputGroup/InputGroup.types.d.ts +10 -0
- package/dist/components/InputGroup/InputGroup.types.js +1 -0
- package/dist/components/InputGroup/index.d.ts +1 -0
- package/dist/components/InputGroup/index.js +4 -0
- package/dist/components/Modal/Modal.d.ts +40 -0
- package/dist/components/Modal/Modal.js +100 -0
- package/dist/components/Modal/Modal.types.d.ts +40 -0
- package/dist/components/Modal/Modal.types.js +1 -0
- package/dist/components/Modal/index.d.ts +1 -0
- package/dist/components/Modal/index.js +4 -0
- package/dist/components/Nav/Nav.d.ts +30 -0
- package/dist/components/Nav/Nav.js +13 -0
- package/dist/components/Nav/Nav.types.d.ts +17 -0
- package/dist/components/Nav/Nav.types.js +1 -0
- package/dist/components/Nav/index.d.ts +1 -0
- package/dist/components/Nav/index.js +4 -0
- package/dist/components/NavBar/Navbar.d.ts +20 -0
- package/dist/components/NavBar/Navbar.js +17 -0
- package/dist/components/NavBar/Navbar.types.d.ts +18 -0
- package/dist/components/NavBar/Navbar.types.js +1 -0
- package/dist/components/NavBar/index.d.ts +1 -0
- package/dist/components/NavBar/index.js +4 -0
- package/dist/components/NavDropdown/NavDropdown.d.ts +35 -0
- package/dist/components/NavDropdown/NavDropdown.js +62 -0
- package/dist/components/NavDropdown/NavDropdown.types.d.ts +5 -0
- package/dist/components/NavDropdown/NavDropdown.types.js +1 -0
- package/dist/components/NavDropdown/index.d.ts +1 -0
- package/dist/components/NavDropdown/index.js +4 -0
- package/dist/components/OffCanvas/OffCanvas.d.ts +3 -0
- package/dist/components/OffCanvas/OffCanvas.js +2266 -0
- package/dist/components/OffCanvas/index.d.ts +1 -0
- package/dist/components/OffCanvas/index.js +4 -0
- package/dist/components/Overlay/Overlay.d.ts +3 -0
- package/dist/components/Overlay/index.d.ts +1 -0
- package/dist/components/Overlay/index.js +4 -0
- package/dist/components/Popout/Popout.d.ts +22 -0
- package/dist/components/Popout/Popout.js +72 -0
- package/dist/components/Popout/Popout.types.d.ts +36 -0
- package/dist/components/Popout/Popout.types.js +1 -0
- package/dist/components/Popout/index.d.ts +1 -0
- package/dist/components/Popout/index.js +4 -0
- package/dist/components/Spinner/Spinner.d.ts +4 -0
- package/dist/components/Spinner/Spinner.js +9 -0
- package/dist/components/Spinner/Spinner.types.d.ts +7 -0
- package/dist/components/Spinner/Spinner.types.js +1 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/Spinner/index.js +4 -0
- package/dist/components/Table/Table.d.ts +4 -0
- package/dist/components/Table/Table.js +9 -0
- package/dist/components/Table/Table.types.d.ts +7 -0
- package/dist/components/Table/Table.types.js +1 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Table/index.js +4 -0
- package/dist/components/Tabs/Tabs.d.ts +9 -0
- package/dist/components/Tabs/Tabs.js +77 -0
- package/dist/components/Tabs/Tabs.types.d.ts +35 -0
- package/dist/components/Tabs/Tabs.types.js +1 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Tabs/index.js +4 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +9 -0
- package/dist/components/ToggleButton/ToggleButton.js +11 -0
- package/dist/components/ToggleButton/ToggleButton.types.d.ts +0 -0
- package/dist/components/ToggleButton/ToggleButton.types.js +1 -0
- package/dist/components/ToggleButton/index.d.ts +1 -0
- package/dist/components/ToggleButton/index.js +4 -0
- package/dist/components/index.d.ts +19 -0
- package/dist/components/index.js +19 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19 -0
- package/dist/types.d.ts +2 -0
- package/package.json +18 -4
- package/dist/Button/index.d.ts +0 -9
- package/dist/Card/index.d.ts +0 -92
- package/dist/Card/index.js +0 -18
- package/dist/FloatingLabel/index.js +0 -13
- package/dist/Form/index.d.ts +0 -61
- package/dist/InputGroup/index.js +0 -7
- package/dist/Modal/index.js +0 -85
- package/dist/Nav/index.js +0 -14
- package/dist/NavBar/index.js +0 -16
- package/dist/NavDropdown/index.js +0 -850
- package/dist/Popout/index.js +0 -85
- package/dist/Tabs/index.js +0 -69
- package/dist/ToggleButton/index.js +0 -11
- package/dist/main.js +0 -30
- package/dist/stylesheets/stargazerui.css +0 -3759
- package/dist/stylesheets/stargazerui.css.map +0 -1
- /package/dist/{Button/index.js → components/Button/Button.js} +0 -0
- /package/dist/{CloseButton/index.js → components/CloseButton/CloseButton.js} +0 -0
- /package/dist/{Overlay/index.js → components/Overlay/Overlay.js} +0 -0
package/dist/BaseTypes.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export type BaseAnchorType = React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
|
|
3
3
|
export type BaseButtonType = React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
4
|
+
export type BaseDialogType = React.DetailedHTMLProps<React.DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>;
|
|
4
5
|
export type BaseDivType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
5
6
|
export type BaseFormType = React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
|
|
6
7
|
export type BaseHeadingType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
|
|
@@ -8,8 +9,11 @@ export type BaseInputType = React.DetailedHTMLProps<React.InputHTMLAttributes<HT
|
|
|
8
9
|
export type BaseHrType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>;
|
|
9
10
|
export type BaseLabelType = React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
|
|
10
11
|
export type BaseLItemType = React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>;
|
|
12
|
+
export type BaseNavType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
11
13
|
export type BaseParagraphType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>;
|
|
12
14
|
export type BaseSelectType = React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
|
|
13
15
|
export type BaseSmallType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14
16
|
export type BaseSpanType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
|
|
17
|
+
export type BaseTableType = React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>;
|
|
15
18
|
export type BaseUListType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>;
|
|
19
|
+
export type BaseElementType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("react-dom");const s=t.forwardRef((({children:t,variant:r="primary",className:s,...n},o)=>e.jsx("button",{ref:o,type:"button",className:`sg-button sg-button-${r}${null==s?"":" "+s}`,...n,children:t}))),n=t.forwardRef((({children:t,className:r,...s},n)=>e.jsx("div",{ref:n,className:"sg-card "+r,...s,children:t}))),o=t.forwardRef((({as:t="div",className:r,children:s,...n},o)=>{let a=["div","span","h1","h2","h3","h4","h5","h6"].find((e=>e===t))?t:"div";return e.jsx(a,{ref:o,className:`sg-card-header ${r}`,...n,children:s})})),a=t.forwardRef((({as:t="h5",className:r,children:s,...n},o)=>{let a=["h1","h2","h3","h4","h5","h6"].find((e=>e===t))?t:"h5";return e.jsx(a,{ref:o,className:r,...n,children:s})})),l=t.forwardRef((({children:t,className:r,...s},n)=>e.jsx("div",{ref:n,className:`sg-card-body ${r}`,...s,children:t}))),c=t.forwardRef((({children:t,className:r,...s},n)=>e.jsx("p",{ref:n,className:`sg-card-text ${r}`,...s,children:t}))),d=t.forwardRef((({children:t,className:r,...s},n)=>e.jsx("div",{ref:n,className:`sg-card-footer ${r}`,...s,children:t})));Object.assign(n,{Header:o,Body:l,Title:a,Text:c,Footer:d});const i=t.forwardRef((({className:t,variant:r=!1,...s},n)=>e.jsx("button",{ref:n,className:`sg-button-close${r?" sg-button-close-white":""} ${t}`,...s,children:e.jsx("span",{className:"sg-close-visually-hidden-label",children:"Close"})}))),u=(e,t="")=>{let r=e.target,s=!0,n=!1;for(;s;)r.id!=t+"-menu"?r=r.parentElement:(n=!0,s=!1),"root"===r.id&&(s=!1,n=!1);return n},f=t.createContext(null),h=({children:t,value:r})=>e.jsx(f.Provider,{value:r,children:t}),m=()=>{const e=t.useContext(f);if(!e)throw new Error("useDropdownContext has to be used within DropdownContextProvider!");return e},g=t.forwardRef((({children:r,className:s,onSelect:n,onToggle:o,controlId:a,drop:l="down",align:c="start",autoClose:d=!0,show:i="default",...u},f)=>{const[m,g]=t.useState("default"!==i&&i),[p,b]=t.useState({case:""}),w=e=>{e.stopPropagation(),g((e=>!e))},v=((e,t,r=!1)=>{let s=e?r?"bottom-start":"bottom-end":r?"bottom-end":"bottom-start";return"up"===t?s=e?r?"top-start":"top-end":r?"top-end":"top-start":"end"===t?s=e?r?"left-end":"right-end":r?"left-start":"right-start":"start"===t?s=e?r?"right-end":"left-end":r?"right-start":"left-start":"down-centered"===t?s="bottom":"up-centered"===t&&(s="top"),s})("end"===c,l),x=t.useMemo((()=>({align:c,drop:l,showInternal:"default"!=i&&o?i:m,handleToggle:"default"!=i&&o?o:w,placement:v,directionClasses:{down:"dropdown","down-centered":"dropdown-center",up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"},controlId:a,activeDescendant:p,setActiveDescendant:b})),[c,l,i,m,o,v,a,p,b]);return e.jsx("div",{id:a+"-wrapper",ref:f,className:"sg-dropdown"+(s?" "+s:""),...u,children:e.jsx(h,{value:x,children:r})})})),p=t.forwardRef((({children:r,className:s,navDropdown:n=!1,as:o="button",variant:a="primary",...l},c)=>{const{controlId:d,handleToggle:i,setActiveDescendant:f,showInternal:h}=m(),g=o,p=e=>{let t=!1;switch(console.log(e.key),e.key){case"ArrowDown":t=!0,h?f((e=>({...e,case:"next"}))):(i(e),f((e=>({...e,case:"first"}))));break;case"ArrowUp":t=!0,h?f((e=>({...e,case:"previous"}))):(i(e),f((e=>({...e,case:"last"}))));break;case"Home":t=!0,h&&f((e=>({...e,case:"first"})));break;case"End":t=!0,h&&f((e=>({...e,case:"last"})));break;case"Tab":h&&i(e);break;case"Escape":t=!0,h&&i(e);break;case"Enter":case" ":if(h){t=!0;document.querySelector(".sg-dropdown-item-visual-focus").click(),i(e);break}f((e=>({...e,case:"first"})))}t&&(e.stopPropagation(),e.preventDefault())},b=e=>{if(h&&e.target.id!==d)if(u(e,d)){if(u(e,d)){i(e);const t=document.getElementById(d);t?.focus()}}else i(e)};t.useEffect((()=>{const e=document.getElementById(d);return e.addEventListener("keydown",p,!0),document.addEventListener("mouseup",b,!0),function(){e.removeEventListener("keydown",p,!0),document.removeEventListener("mouseup",b,!0)}}),[p,d]);let w=`sg-button sg-button${a?"-"+a:"-primary"} sg-dropdown-toggle${s?" "+s:""}`;return("a"===g||n)&&(w="sg-nav-dropdown-toggle sg-dropdown-toggle"+(s?" "+s:"")),e.jsx(g,{tabIndex:"0",type:"button","aria-haspopup":"true","aria-controls":d+"-menu","aria-expanded":h,id:d,ref:c,className:w,onClick:e=>(e=>{i(e),h||f((e=>({...e,case:"first"})))})(e),...l,children:r})})),b=t.forwardRef((({children:r,className:s,style:n={},...o},a)=>{const{controlId:l,showInternal:c,activeDescendant:d}=m(),[i,u]=t.useState(n);t.useLayoutEffect((()=>{if(c){const e=document.getElementById(l+"-menu");let t={};e.getBoundingClientRect().right>window.innerWidth?t={...t,right:0}:e.getBoundingClientRect().left<0?t={...t,left:0}:e.getBoundingClientRect().top<0?t={...t,top:0}:e.getBoundingClientRect().bottom>window.innerHeight&&(t={...t,bottom:0}),u((e=>({...e,...t})))}}),[c]),t.useEffect((()=>{if(c){const e=document.getElementById(l+"-menu"),t=document.getElementById(l+"-menu").children,r=t.length-1,s=document.querySelector(".sg-dropdown-item-visual-focus");let n=0,o=t[0].children[0];if(null!=s){s.classList.remove("sg-dropdown-item-visual-focus");for(let e=0;e<t.length;e++)if(t[e]===s.parentElement){n=e;break}}switch(d.case){case"first":o=t[0].children[0],n=0;break;case"last":o=t[r].children[0],n=r;break;case"next":n=n===r?0:n+1,o=t[n].children[0];break;case"previous":n=0===n?r:n-1,o=t[n].children[0]}e.setAttribute("aria-activedescendant",o.id),t[n].children[0].classList.add("sg-dropdown-item-visual-focus")}else{document.getElementById(l+"-menu").setAttribute("aria-activedescendant","")}}),[l,c,d]);const f=e=>{const t=e.target;let r=t.classList.contains("sg-dropdown-item-visual-focus");const s=document.getElementById(l+"-menu");r||(document.querySelector(".sg-dropdown-item-visual-focus")?.classList.remove("sg-dropdown-item-visual-focus"),s.setAttribute("aria-activedescendant",""),t.classList.add("sg-dropdown-item-visual-focus"),s.setAttribute("aria-activedescendant",t.id))};return t.useEffect((()=>{const e=document.getElementById(l+"-menu");for(let t of e.children)t.addEventListener("mouseover",f,!0);return function(){for(let t of e.children)t.removeEventListener("mouseover",f,!0)}}),[]),e.jsx("ul",{id:l+"-menu",role:"menu",tabIndex:-1,"aria-labelledby":l,ref:a,className:`sg-dropdown-list${s?" "+s:""}${c?" show":""}`,style:i,...o,children:r})})),w=t.forwardRef((({children:t,as:r="button",className:s,...n},o)=>{const a=r;return e.jsx("li",{role:"none",children:e.jsx(a,{ref:o,role:"menuitem",tabIndex:"-1",className:"sg-dropdown-item"+(s?" "+s:""),...n,children:t})})})),v=t.forwardRef((({className:t="",...r},s)=>e.jsx("hr",{ref:s,className:`.sg-dropdown-divider${t}`,...r})));var x=Object.assign(g,{Toggle:p,Menu:b,Item:w,Divider:v});const N=t.createContext(null),j=({children:t,value:r})=>e.jsx(N.Provider,{value:r,children:t}),y=()=>{const e=t.useContext(N);if(!e)throw new Error("useFormContext has to be used within a FormContextProvider!");return e},R=t.forwardRef((({children:t,...r},s)=>e.jsx("form",{ref:s,...r,children:t}))),C=t.forwardRef((({as:t="input",className:r="",plaintext:s=!1,id:n="",type:o="text",autoFocus:a=!1,...l},c)=>{let d=t;const{controlId:i}=y();let u=i||n,f=(s?"sg-form-control-plaintext":"sg-form-control")+(""!=r?" "+r:"")+("color"==o?" sg-form-control-color":"");return e.jsx(d,{autoFocus:a,ref:c,id:u,type:o,className:f,...l})})),k=t.forwardRef((({children:t,className:r,id:s,...n},o)=>{const{controlId:a}=y();let l=a||s;return e.jsx("select",{ref:o,className:"sg-form-select"+(r?" "+r:""),id:l,...n,children:t})})),I=t.forwardRef((({children:r,className:s,controlId:n,...o},a)=>{const l=t.useMemo((()=>({controlId:n})),[n]);return e.jsx("div",{ref:a,className:"sg-from-group"+(s?" "+s:""),...o,children:e.jsx(j,{value:l,children:r})})})),E=t.forwardRef((({children:t,className:r,htmlFor:s},n)=>{const{controlId:o}=y();let a=s||o;return e.jsx("label",{ref:n,htmlFor:a,className:"sg-form-label"+(r?" "+r:""),children:t})})),T=t.forwardRef((({classNameContainer:t,containerRef:r,containerId:s,style:n,classNameLabel:o,labelRef:a,label:l,labelId:c,className:d,type:i,id:u,controlId:f,reverse:h=!1,checkStyle:m,...g},p)=>{let b=f||u,w="switch"===i?"checkbox":i;return e.jsx("div",{ref:r,id:s,style:n,className:`sg-form-check${h?"-reverse":""}${t?" "+t:""}${"switch"===i?" sg-form-switch":""}`,children:h?e.jsxs(e.Fragment,{children:[e.jsx("input",{ref:p,type:w,id:b,className:"sg-form-check-input"+(d?" "+d:""),...g}),e.jsx("label",{ref:a,id:c,htmlFor:b,className:"sg-form-check-label"+(o?" "+o:""),children:l})]}):e.jsxs(e.Fragment,{children:[e.jsx("label",{ref:a,id:c,htmlFor:b,className:"sg-form-check-label"+(o?" "+o:""),children:l}),e.jsx("input",{ref:p,type:w,id:b,className:"sg-form-check-input"+(d?" "+d:""),style:m,...g})]})})})),$=t.forwardRef((({children:t,className:r,...s},n)=>e.jsx("small",{ref:n,className:"sg-form-text"+(r?" "+r:""),...s,children:t})));Object.assign(R,{Control:C,Select:k,Group:I,Label:E,Check:T,Text:$}),t.forwardRef((({children:r,label:s,controlId:n,className:o,htmlFor:a,...l},c)=>{const d=t.useMemo((()=>({controlId:n})),[n]);return e.jsx(j,{value:d,children:e.jsxs("div",{className:"sg-form-floating",children:[r,e.jsx("label",{ref:c,htmlFor:n,className:"sg-form-floating-label",...l,children:s})]})})}));const S=t.forwardRef((({children:t,className:r,...s},n)=>e.jsx("div",{ref:n,className:"sg-input-group"+(r?" "+r:""),...s,children:t}))),L=t.forwardRef((({children:t,className:r,...s},n)=>e.jsx("span",{ref:n,className:"sg-input-group-text"+(r?" "+r:""),...s,children:t})));Object.assign(S,{Text:L});const P=t.createContext(null),D=({children:t,value:r})=>e.jsx(P.Provider,{value:r,children:t}),B=t.forwardRef((({children:r,as:s="",className:n="",closeButton:o=!1,onClick:a,...l},c)=>{let d=["div","span","h1","h2","h3","h4","h5","h6"].find((e=>e===s))?s:"div";const u=(()=>{const e=t.useContext(P);if(!e)throw new Error("useModalContext has to be used within ModalContextProvider!");return e})();return e.jsxs(d,{ref:c,className:`sg-modal-header ${n}`,...l,children:[r,o?e.jsx(i,{variant:!0,onClick:e=>(e=>{a&&a(e),u()})(e)}):null]})})),A=t.forwardRef((({children:t,as:r="h4",className:s,...n},o)=>{let a=["div","span","h1","h2","h3","h4","h5","h6"].find((e=>e===r))?r:"h4";return e.jsx(a,{ref:o,className:`sg-modal-title ${s}`,...n,children:t})})),F=t.forwardRef((({children:t,className:r,...s},n)=>e.jsx("div",{ref:n,className:`sg-modal-body ${r}`,...s,children:t}))),H=t.forwardRef((({children:t,className:r,...s},n)=>e.jsx("div",{ref:n,className:`sg-modal-footer ${r}`,...s,children:t})));Object.assign((({children:s,centered:n=!1,size:o="md",show:a,backdrop:l="static",onHide:c,className:d,id:i,...u})=>{const[f,h]=t.useState(a);t.useEffect((()=>{h(a)}),[a]);const m=t.useRef(null);M(m);let g="boolean"==typeof a&&"function"==typeof c?void 0:{show:"boolean"==typeof a,onHide:"function"==typeof c};g&&console.error(g.show?null:"The variable 'show' must be used and must be a boolean used to decide when to show the modal!",g.onHide?null:"The variable 'onHide' must be used and must be a function which is used to set 'show' as the modal gets closed!");const p=()=>{c&&c(),h(!1)};t.useEffect((()=>{const e=m.current;e&&(f?(e.classList.remove("close"),e.showModal()):e.close())}),[f]);let b=`sg-modal-tag sg-modal-${o}`;d&&(b+=" "+d),"static"!==l&&"true"!==l||(b+=" sg-modal-static");return r.createPortal(e.jsx("dialog",{ref:m,className:b,onKeyDown:e=>(e=>{if("Escape"!=e.key)return;e.preventDefault();const t=m.current;t.classList.add("close"),t.addEventListener("animationend",(()=>{p()}),{once:!0})})(e),...u,children:e.jsx(D,{value:c,children:g?e.jsx(O,{typeCheck:g,closeModal:p}):s})}),document.body)}),{Header:B,Title:A,Body:F,Footer:H});const M=function(e){t.useEffect((()=>{const t=t=>{const r='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',s=e.current;if(s){const e=s.querySelectorAll(r)[0],n=s.querySelectorAll(r),o=n[n.length-1];if(!("Tab"===t.key))return;t.shiftKey?document.activeElement===e&&(o.focus(),t.preventDefault()):document.activeElement===o&&(e.focus(),t.preventDefault())}};return document.addEventListener("keydown",t,!0),function(){document.removeEventListener("keydown",t,!0)}}),[e])},O=({typeCheck:t,closeModal:r})=>e.jsxs(e.Fragment,{children:[e.jsx(B,{closeButton:!0,children:e.jsx(A,{children:"An Error ocurred!"})}),e.jsx(F,{children:e.jsxs("p",{children:[t.show?null:"The variable 'show' must be used and must be a boolean used to decide when to show the modal!",t.onHide?null:"The variable 'onHide' must be used and must be a function which is used to set 'show' as the modal gets closed!"]})}),e.jsx(H,{children:e.jsx(s,{variant:"danger",type:"button",onClick:()=>r(),children:"Close"})})]}),q=t.createContext(null),z=({children:t,value:r})=>e.jsx(q.Provider,{value:r,children:t}),W=t.forwardRef((({children:r,className:s,navbarPrefix:n="sg-navbar-",...o},a)=>{const l=t.useMemo((()=>n),[n]);return e.jsx("nav",{ref:a,className:"sg-navbar"+(s?" "+s:""),...o,children:e.jsx(z,{value:l,children:r})})})),X=t.forwardRef((({children:t,className:r,href:s="#",as:n="a",...o},a)=>{const l=n||(s&&"Link"!=n?"a":"span");return e.jsx(l,{ref:a,href:s,className:"sg-navbar-brand"+(r?" "+r:""),...o,children:t})})),Y=t.forwardRef((({children:t,className:r,as:s="span",...n},o)=>{const a=s;return e.jsx(a,{ref:o,className:"sg-navbar-text"+(r?" "+r:""),...n,children:t})}));Object.assign(W,{Brand:X,Text:Y});const K=t.forwardRef((({children:r,className:s,as:n="ul",...o},a)=>{const l=n,c=t.useContext(q),d=c||"sg-navbar-";return e.jsx(l,{ref:a,className:`${s} ${d}nav`,...o,children:r})})),G=t.forwardRef((({children:t,className:r,as:s="li",...n},o)=>{const a=s;return e.jsx(a,{role:"none",ref:o,className:"sg-nav-item"+(r?" "+r:""),...n,children:t})})),U=t.forwardRef((({children:t,className:r,as:s="a",...n},o)=>{const a=s;return e.jsx(a,{role:"menuitem",ref:o,className:"sg-nav-link"+(r?" "+r:""),...n,children:t})}));Object.assign(K,{Item:G,Link:U});const J=t.forwardRef((({children:r,className:s,onSelect:n,onToggle:o,controlId:a,toggleProps:l,title:c,menuProps:d,drop:i="down",align:u="start",autoClose:f=!0,show:m="default",...g},p)=>{const[b,w]=t.useState("default"!==m&&m),[v,N]=t.useState({case:""}),j=t.useCallback((e=>{e.stopPropagation(),w((e=>!e))}),[]),y=((e,t,r=!1)=>{let s=e?r?"bottom-start":"bottom-end":r?"bottom-end":"bottom-start";return"up"===t?s=e?r?"top-start":"top-end":r?"top-end":"top-start":"end"===t?s=e?r?"left-end":"right-end":r?"left-start":"right-start":"start"===t?s=e?r?"right-end":"left-end":r?"right-start":"left-start":"down-centered"===t?s="bottom":"up-centered"===t&&(s="top"),s})("end"===u,i),R={down:"dropdown","down-centered":"dropdown-center",up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"},C=a,k=t.useMemo((()=>({align:u,drop:i,showInternal:"default"!=m&&o?m:b,handleToggle:"default"!=m&&o?o:j,placement:y,directionClasses:{down:"dropdown","down-centered":"dropdown-center",up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"},controlId:C,activeDescendant:v,setActiveDescendant:N})),[u,i,m,b,o,j,y,R,a,v,N]);return e.jsx("div",{ref:p,id:a+"-wrapper",className:`sg-dropdown${s?" "+s:""} sg-nav-item`,...g,children:e.jsxs(h,{value:k,children:[e.jsx(x.Toggle,{navDropdown:!0,...l,children:c}),e.jsx(x.Menu,{...d,children:r})]})})}));Object.assign(J,{Toggle:x.Toggle,Menu:x.Menu,Item:x.Item,Divider:x.Divider});const Q=t.forwardRef((({children:s,initialPosition:n={top:0,left:0},id:o,resize:a=!1,move:l=!1,className:c,style:d,...i},u)=>{const[f,h]=t.useState({offSetTop:0,offSetLeft:0,...n}),m=a?"true":"false",g=l?"true":"false",p=t.useRef(u),b=t.useRef(null),[w,v]=t.useState(!1),x=t.useRef(w);t.useEffect((()=>{x.current=w}),[w]);const N=()=>{l&&(b.current.style.removeProperty("user-select"),v(!1))};return t.useEffect((()=>(document.body.addEventListener("pointerup",(()=>N()),!0),function(){document.body.removeEventListener("pointerup",(()=>N()),!0)})),[]),r.createPortal(e.jsx("dialog",{"data-resize":m,"data-move":g,"data-passedRef":p,ref:b,id:o,className:"sg-moveable-popout"+(c?" "+c:""),style:{...d,top:f.top,left:f.left,bottom:f.bottom,right:f.right},onPointerDown:e=>{const t=e.target;if(l&&t.className.includes("sg-popout-title")||t.className.includes("sg-popout-header")){const{top:t,left:r}=b.current.getBoundingClientRect();h((s=>({...s,offSetTop:e.clientY-t,offSetLeft:e.clientX-r}))),b.current.style.setProperty("user-select","none"),b.current.setPointerCapture(e.pointerId),v(!0)}},onPointerMove:e=>(e=>{if(l&&x.current&&b.current){const t=e.clientY-f.offSetTop<0,r=window.innerHeight-(e.clientY-f.offSetTop+b.current.offsetHeight)<0,s=e.clientX-f.offSetLeft<0,n=window.innerWidth-(e.clientX-f.offSetLeft+b.current.offsetWidth)<0;let o=t?0:e.clientY-f.offSetTop;o=r?window.innerHeight-b.current.offsetHeight:o;let a=s?0:e.clientX-f.offSetLeft;a=n?window.innerWidth-b.current.offsetWidth:a,h((e=>({...e,top:o,left:a})))}})(e),...i,children:s}),document.body)})),V=t.forwardRef((({children:t,className:r,as:s="div",...n},o)=>{let a=["div","span","h1","h2","h3","h4","h5","h6"].find((e=>e===s))?s:"div";return e.jsx(a,{ref:o,className:`sg-popout-header ${r}`,...n,children:t})})),Z=t.forwardRef((({as:t="h4",className:r,children:s,...n},o)=>{let a=["h1","h2","h3","h4","h5","h6"].find((e=>e===t))?t:"h5";return e.jsx(a,{ref:o,className:`sg-popout-title ${r}`,...n,children:s})})),_=t.forwardRef((({children:t,className:r,...s},n)=>e.jsx("div",{ref:n,className:`sg-popout-body ${r}`,...s,children:t}))),ee=t.forwardRef((({children:t,className:r,...s},n)=>e.jsx("p",{ref:n,className:`sg-popout-text ${r}`,...s,children:t}))),te=t.forwardRef((({children:t,className:r,...s},n)=>e.jsx("div",{ref:n,className:`sg-popout-footer ${r}`,...s,children:t})));Object.assign(Q,{Header:V,Title:Z,Body:_,Text:ee,Footer:te}),t.forwardRef((({size:t="1em",color:r="white",label:s,className:n,controlId:o,...a},l)=>e.jsxs(e.Fragment,{children:[e.jsx("div",{"aria-labelledby":o,role:"status",ref:l,className:"sg-spinner"+(n?" "+n:""),style:{width:t,height:t,borderColor:r},...a}),e.jsx("label",{id:o,className:"sg-visually-hidden",children:s})]}))),t.forwardRef((({children:t,size:r="lg",className:s,...n},o)=>{let a=`sg-table${s?" "+s:""}${"sm"===r?" sg-table-sm":""}`;return e.jsx("table",{ref:o,className:a,...n,children:t})}));const re=t.createContext(null),se=({children:t,value:r})=>e.jsx(re.Provider,{value:r,children:t}),ne=()=>{const e=t.useContext(re);if(!e)throw new Error("useTabContext has to be used within a TabContextProvider!");return e},oe=t.forwardRef((({children:r,className:s,controlId:n,activeClassName:o,defaultActive:a,...l},c)=>{const[d,i]=t.useState(a),u=o||"sg-active",f=t.useMemo((()=>({activeTab:d,setActiveTab:i,controlId:n,activeClass:u})),[d,i,n]);return e.jsx(se,{value:f,children:e.jsx("div",{ref:c,id:n+"-tab-wrapper",className:"sg-tabs"+(s?" "+s:""),...l,children:r})})})),ae=t.forwardRef((({children:t,className:r,...s},n)=>{const{controlId:o,activeClass:a}=ne();return e.jsx("div",{onKeyDown:e=>(e=>{const t=e.key,r=document.getElementById(o+"-tab-controls");if(r){const s=Array.from(r.children);if("ArrowRight"===t||"ArrowLeft"===t){e.preventDefault();const r=document.querySelector(".sg-tabs-button."+a),n=s.indexOf(r),o="ArrowRight"===t?1:-1,l=n+o<0?s.length-1:n+o>=s.length?0:n+o;s[l].focus(),s[l].click()}else if("Home"===t||"End"===t){e.preventDefault();const r="Home"===t?0:s.length-1;s[r].focus(),s[r].click()}}})(e),role:"tablist",id:o+"-tab-controls",ref:n,className:"sg-tabs-controls"+(r?" "+r:""),...s,children:t})})),le=t.forwardRef((({children:t,className:r,onClick:s,tabId:n,id:o,...a},l)=>{const{activeTab:c,setActiveTab:d,activeClass:i}=ne(),u="sg-tabs-button"+(r?" "+r:"")+(c===n?" "+i:""),f=c===n;return e.jsx("button",{role:"tab",type:"button",id:n+"-button",ref:l,onClick:e=>(e=>{d(n),s&&s(e)})(e),className:u,...a,tabIndex:f?0:-1,"aria-selected":f?"true":"false","aria-controls":n+"-page",children:t})})),ce=t.forwardRef((({children:t,className:r,...s},n)=>e.jsx("div",{role:"none",ref:n,className:"sg-tabs-content"+(r?" "+r:""),...s,children:t}))),de=t.forwardRef((({children:t,className:r,tabId:s,...n},o)=>{const{activeTab:a,activeClass:l}=ne(),c="sg-tabs-page"+(r?" "+r:"")+(a===s?" "+l:"");return e.jsx("div",{role:"tabpanel",id:s+"-page","aria-labelledby":s+"-button",ref:o,className:c,...n,children:t})}));Object.assign(oe,{Controls:ae,Button:le,Content:ce,Page:de}),t.forwardRef((({children:r,toggled:s="false",onClick:n,...o},a)=>{const[l,c]=t.useState("true"===s);return e.jsx("button",{onClick:e=>(e=>{c((e=>!e)),n&&n(e)})(e),"data-toggled":l,...o,children:r})}));
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -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","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","elementId","computedClassName","Select","Group","Label","htmlFor","elementHtmlFor","Check","classNameContainer","containerRef","containerId","classNameLabel","labelRef","label","labelId","reverse","checkStyle","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","jsxs","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","Fragment","width","height","borderColor","classesComputed","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":"0FAIA,MAAMA,EAASC,EAAAA,YAA2C,EAAEC,WAAUC,UAAQ,UAAWC,eAAcC,GAAOC,IAItGC,EAAAC,IAAA,SAAA,CAAQF,IAAKA,EAAKG,KAAK,SAASL,UAAW,uBAAuBD,IAAuBO,MAAbN,EAAyB,GAAK,IAAIA,OAAiBC,EAAIH,SAC9HA,MCLPS,EAAOV,EAAUA,YAA4B,EAAEC,WAAUE,eAAcQ,GAAYN,IAkBjFC,EAAKC,IAAA,MAAA,CAAAF,IAAKA,EAAKF,UAAW,WAAkBA,KAAeQ,WACtDV,MAKPW,EAASZ,EAAAA,YAAmF,EAAEa,KAAG,MAAOV,YAAWF,cAAaU,GAAYN,KAC9I,IACIS,EADU,CAAC,MAAO,OAAQ,KAAM,KAAM,KAAM,KAAM,KAAM,MACpCC,MAAKC,GAASA,IAAUH,IAAMA,EAAK,MAE3D,OACIP,EAACC,IAAAO,GAAUT,IAAKA,EAAKF,UAAW,kBAAkBA,OAAiBQ,WAC9DV,GAER,IAGCgB,EAAQ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4K,KAAuBpK,EAASV,SAEpDA,GAER,IAGWoB,OAAOC,OAAOoO,GAAM,CAChCM,SAAUA,GACVjQ,OAAQA,GACR4Q,QAASA,GACTC,KAAMA,KC5GW5Q,EAAAA,YAAiD,EAAEC,WAAU4Q,UAAQ,QAASlL,aAAYhF,GAAYN,KACvH,MAAQyQ,EAAiBC,GAAuB5N,EAAAA,SAA8B,SAAZ0N,GAOlE,OACIvQ,EAAAA,cAAQqF,QAAUlE,GAPF,CAACA,IACjBsP,GAAmBtN,IAASA,IACzBkC,GACCA,EAAQlE,EACX,EAG2ByD,CAAYzD,kBAAsBqP,KAAqBnQ,EAC9EV,SAAAA,GAER"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Button";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CardBodyType, CardFooterType, CardTextType, CardType } from "./Card.types";
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<CardType, "ref"> & React.RefAttributes<HTMLDivElement>> & {
|
|
4
|
+
Header: React.ForwardRefExoticComponent<(Omit<{
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
className?: string | undefined;
|
|
7
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
8
|
+
} & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, "ref"> | Omit<{
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
className?: string | undefined;
|
|
11
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
12
|
+
} & React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement>, "ref"> | Omit<{
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
className?: string | undefined;
|
|
15
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
16
|
+
} & React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement>, "ref">) & React.RefAttributes<HTMLDivElement | HTMLHeadingElement | HTMLSpanElement>>;
|
|
17
|
+
Body: React.ForwardRefExoticComponent<Omit<CardBodyType, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
Title: React.ForwardRefExoticComponent<(Omit<{
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
className?: string | undefined;
|
|
21
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
22
|
+
} & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, "ref"> | Omit<{
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
className?: string | undefined;
|
|
25
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
26
|
+
} & React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement>, "ref"> | Omit<{
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
className?: string | undefined;
|
|
29
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
30
|
+
} & React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement>, "ref">) & React.RefAttributes<HTMLHeadingElement>>;
|
|
31
|
+
Text: React.ForwardRefExoticComponent<Omit<CardTextType, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
32
|
+
Footer: React.ForwardRefExoticComponent<Omit<CardFooterType, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
};
|
|
34
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d } from "react";
|
|
3
|
+
const h = d(({ children: e, className: r, ...t }, s) => /* @__PURE__ */ a("div", { ref: s, className: "sg-card " + r, ...t, children: e })), l = d(({ as: e = "div", className: r, children: t, ...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 ${r}`, ...s, children: t });
|
|
6
|
+
}), m = d(({ as: e = "h5", className: r, children: t, ...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: r, ...s, children: t });
|
|
9
|
+
}), v = d(({ children: e, className: r, ...t }, s) => /* @__PURE__ */ a("div", { ref: s, className: `sg-card-body ${r}`, ...t, children: e })), f = d(({ children: e, className: r, ...t }, s) => /* @__PURE__ */ a("p", { ref: s, className: `sg-card-text ${r}`, ...t, children: e })), p = d(({ children: e, className: r, ...t }, s) => /* @__PURE__ */ a("div", { ref: s, className: `sg-card-footer ${r}`, ...t, children: e })), N = Object.assign(h, {
|
|
10
|
+
Header: l,
|
|
11
|
+
Body: v,
|
|
12
|
+
Title: m,
|
|
13
|
+
Text: f,
|
|
14
|
+
Footer: p
|
|
15
|
+
});
|
|
16
|
+
export {
|
|
17
|
+
N as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { BaseDivType, BaseHeadingType, BaseSpanType, BaseParagraphType } from "../../BaseTypes";
|
|
3
|
+
export type CardType = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
} & BaseDivType;
|
|
7
|
+
export type CardHeaderPossible = BaseDivType | BaseSpanType | BaseHeadingType;
|
|
8
|
+
export type CardHeaderType = {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
as?: React.ElementType;
|
|
12
|
+
} & CardHeaderPossible;
|
|
13
|
+
export type CardBodyType = {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
} & BaseDivType;
|
|
17
|
+
export type CardTextType = {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
} & BaseParagraphType;
|
|
21
|
+
export type CardFooterType = {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
} & BaseDivType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Card";
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export type CloseButtonType = {
|
|
4
|
-
className?: string;
|
|
5
|
-
variant?: boolean;
|
|
6
|
-
} & BaseButtonType;
|
|
2
|
+
import { CloseButtonType } from "./CloseButton.types";
|
|
7
3
|
declare const CloseButton: import("react").ForwardRefExoticComponent<Omit<CloseButtonType, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
4
|
export default CloseButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./CloseButton";
|
|
@@ -1,47 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
export type DropdownContextType = {
|
|
4
|
-
align: string;
|
|
5
|
-
drop: string;
|
|
6
|
-
showInternal: boolean;
|
|
7
|
-
handleToggle: Function;
|
|
8
|
-
placement: string;
|
|
9
|
-
directionClasses?: {
|
|
10
|
-
down?: string;
|
|
11
|
-
'down-centered'?: string;
|
|
12
|
-
up?: string;
|
|
13
|
-
'up-centered'?: string;
|
|
14
|
-
end?: string;
|
|
15
|
-
start?: string;
|
|
16
|
-
};
|
|
17
|
-
controlId: string;
|
|
18
|
-
activeDescendant: {
|
|
19
|
-
case: string;
|
|
20
|
-
};
|
|
21
|
-
setActiveDescendant: React.Dispatch<React.SetStateAction<{
|
|
22
|
-
case: string;
|
|
23
|
-
}>>;
|
|
24
|
-
};
|
|
2
|
+
import { DropdownContextType, DropdownDividerType, DropdownMenuType, DropdownType } from "./Dropdown.types";
|
|
25
3
|
export declare const DropdownContext: React.Context<DropdownContextType | null>;
|
|
26
|
-
export declare const
|
|
27
|
-
export type DropdownType = {
|
|
4
|
+
export declare const DropdownContextProvider: ({ children, value }: {
|
|
28
5
|
children: React.ReactNode;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
controlId: string;
|
|
33
|
-
drop?: string;
|
|
34
|
-
align?: string;
|
|
35
|
-
autoClose?: boolean;
|
|
36
|
-
show?: boolean;
|
|
37
|
-
} & BaseDivType;
|
|
38
|
-
export type DropdownToggleType = {
|
|
39
|
-
children: React.ReactNode;
|
|
40
|
-
className?: string;
|
|
41
|
-
navDropdown?: boolean;
|
|
42
|
-
as?: React.ElementType;
|
|
43
|
-
variant?: string;
|
|
44
|
-
} & (BaseAnchorType | BaseButtonType);
|
|
6
|
+
value: DropdownContextType;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const useDropdownContext: () => DropdownContextType;
|
|
45
9
|
export declare const Toggle: React.ForwardRefExoticComponent<(Omit<{
|
|
46
10
|
children: React.ReactNode;
|
|
47
11
|
className?: string | undefined;
|
|
@@ -54,18 +18,14 @@ export declare const Toggle: React.ForwardRefExoticComponent<(Omit<{
|
|
|
54
18
|
navDropdown?: boolean | undefined;
|
|
55
19
|
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
56
20
|
variant?: string | undefined;
|
|
57
|
-
} & React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement>, "ref">
|
|
58
|
-
export type DropdownMenuType = {
|
|
21
|
+
} & React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement>, "ref"> | Omit<{
|
|
59
22
|
children: React.ReactNode;
|
|
60
|
-
className?: string;
|
|
61
|
-
|
|
62
|
-
|
|
23
|
+
className?: string | undefined;
|
|
24
|
+
navDropdown?: boolean | undefined;
|
|
25
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
26
|
+
variant?: string | undefined;
|
|
27
|
+
} & React.ClassAttributes<HTMLElement> & React.HTMLAttributes<HTMLElement>, "ref">) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
63
28
|
export declare const Menu: React.ForwardRefExoticComponent<Omit<DropdownMenuType, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
64
|
-
export type DropdownItemType = {
|
|
65
|
-
children: React.ReactNode;
|
|
66
|
-
as?: React.ElementType;
|
|
67
|
-
className?: string;
|
|
68
|
-
} & (BaseAnchorType | BaseButtonType);
|
|
69
29
|
export declare const Item: React.ForwardRefExoticComponent<(Omit<{
|
|
70
30
|
children: React.ReactNode;
|
|
71
31
|
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
@@ -75,9 +35,6 @@ export declare const Item: React.ForwardRefExoticComponent<(Omit<{
|
|
|
75
35
|
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
76
36
|
className?: string | undefined;
|
|
77
37
|
} & React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement>, "ref">) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
78
|
-
export type DropdownDividerType = {
|
|
79
|
-
className?: string;
|
|
80
|
-
} & BaseHrType;
|
|
81
38
|
export declare const Divider: React.ForwardRefExoticComponent<Omit<DropdownDividerType, "ref"> & React.RefAttributes<HTMLHRElement>>;
|
|
82
39
|
declare const _default: React.ForwardRefExoticComponent<Omit<DropdownType, "ref"> & React.RefAttributes<HTMLDivElement>> & {
|
|
83
40
|
Toggle: React.ForwardRefExoticComponent<(Omit<{
|
|
@@ -92,7 +49,13 @@ declare const _default: React.ForwardRefExoticComponent<Omit<DropdownType, "ref"
|
|
|
92
49
|
navDropdown?: boolean | undefined;
|
|
93
50
|
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
94
51
|
variant?: string | undefined;
|
|
95
|
-
} & React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement>, "ref">
|
|
52
|
+
} & React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement>, "ref"> | Omit<{
|
|
53
|
+
children: React.ReactNode;
|
|
54
|
+
className?: string | undefined;
|
|
55
|
+
navDropdown?: boolean | undefined;
|
|
56
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
57
|
+
variant?: string | undefined;
|
|
58
|
+
} & React.ClassAttributes<HTMLElement> & React.HTMLAttributes<HTMLElement>, "ref">) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
96
59
|
Menu: React.ForwardRefExoticComponent<Omit<DropdownMenuType, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
97
60
|
Item: React.ForwardRefExoticComponent<(Omit<{
|
|
98
61
|
children: React.ReactNode;
|