@nextui-org/react 1.0.0-beta.10 → 1.0.0-beta.11-dbg1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/cjs/avatar/avatar.js +1 -1
- package/cjs/backdrop/backdrop.styles.js +1 -1
- package/cjs/button/button-icon.js +1 -1
- package/cjs/button/utils.js +1 -1
- package/cjs/card/card.styles.js +1 -1
- package/cjs/checkbox/checkbox.js +1 -1
- package/cjs/checkbox/checkbox.styles.js +1 -1
- package/cjs/checkbox/use-checkbox.js +1 -1
- package/cjs/divider/divider.js +1 -1
- package/cjs/dropdown/dropdown-menu.js +1 -1
- package/cjs/dropdown/dropdown.js +1 -1
- package/cjs/grid/grid.js +1 -1
- package/cjs/input/index.js +1 -1
- package/cjs/input/input.js +1 -1
- package/cjs/input/input.styles.js +1 -1
- package/cjs/link/link.styles.js +1 -1
- package/cjs/loading/loading.js +1 -1
- package/cjs/navbar/navbar-link.js +1 -1
- package/cjs/navbar/navbar.styles.js +1 -1
- package/cjs/popover/popover-content.js +1 -1
- package/cjs/popover/popover.styles.js +1 -1
- package/cjs/popover/use-popover.js +1 -1
- package/cjs/radio/radio.js +1 -1
- package/cjs/radio/use-radio-group.js +1 -1
- package/cjs/radio/use-radio.js +1 -1
- package/cjs/spacer/spacer.js +1 -1
- package/cjs/switch/switch.js +1 -1
- package/cjs/table/table-body.js +1 -1
- package/cjs/table/table-cell.js +1 -1
- package/cjs/table/table.js +1 -1
- package/cjs/table/table.styles.js +1 -1
- package/cjs/textarea/textarea.js +1 -1
- package/cjs/theme/utils.js +1 -1
- package/cjs/tooltip/tooltip.js +1 -1
- package/cjs/use-pagination/index.js +1 -1
- package/cjs/user/user.js +1 -1
- package/cjs/user/user.styles.js +1 -1
- package/cjs/utils/checkmark.js +1 -1
- package/cjs/utils/css-transition.js +1 -1
- package/esm/avatar/avatar.js +1 -1
- package/esm/backdrop/backdrop.styles.js +1 -1
- package/esm/button/button-icon.js +1 -1
- package/esm/button/utils.js +1 -1
- package/esm/card/card.styles.js +1 -1
- package/esm/checkbox/checkbox.js +1 -1
- package/esm/checkbox/checkbox.styles.js +1 -1
- package/esm/checkbox/use-checkbox.js +1 -1
- package/esm/divider/divider.js +1 -1
- package/esm/dropdown/dropdown-menu.js +1 -1
- package/esm/dropdown/dropdown.js +1 -1
- package/esm/grid/grid.js +1 -1
- package/esm/input/index.js +1 -1
- package/esm/input/input.js +1 -1
- package/esm/input/input.styles.js +1 -1
- package/esm/link/link.styles.js +1 -1
- package/esm/loading/loading.js +1 -1
- package/esm/navbar/navbar-link.js +1 -1
- package/esm/navbar/navbar.styles.js +1 -1
- package/esm/popover/popover-content.js +1 -1
- package/esm/popover/popover.styles.js +1 -1
- package/esm/popover/use-popover.js +1 -1
- package/esm/radio/radio.js +1 -1
- package/esm/radio/use-radio-group.js +1 -1
- package/esm/radio/use-radio.js +1 -1
- package/esm/spacer/spacer.js +1 -1
- package/esm/switch/switch.js +1 -1
- package/esm/table/table-body.js +1 -1
- package/esm/table/table-cell.js +1 -1
- package/esm/table/table.js +1 -1
- package/esm/table/table.styles.js +1 -1
- package/esm/textarea/textarea.js +1 -1
- package/esm/theme/utils.js +1 -1
- package/esm/tooltip/tooltip.js +1 -1
- package/esm/use-pagination/index.js +1 -1
- package/esm/user/user.js +1 -1
- package/esm/user/user.styles.js +1 -1
- package/esm/utils/checkmark.js +1 -1
- package/esm/utils/css-transition.js +1 -1
- package/package.json +30 -28
- package/types/avatar/avatar.d.ts +3 -1
- package/types/backdrop/backdrop.d.ts +3 -2
- package/types/backdrop/backdrop.styles.d.ts +1 -1
- package/types/button/button-group.d.ts +8 -1
- package/types/button/button-icon.d.ts +33 -2
- package/types/button/button.d.ts +1 -1
- package/types/button/utils.d.ts +3 -51
- package/types/card/card.d.ts +1 -1
- package/types/card/card.styles.d.ts +28 -0
- package/types/checkbox/checkbox.styles.d.ts +1 -1
- package/types/checkbox/use-checkbox.d.ts +3 -0
- package/types/code/code.d.ts +25 -1
- package/types/col/col.d.ts +27 -2
- package/types/collapse/collapse-group.d.ts +2 -1
- package/types/collapse/collapse.d.ts +1 -0
- package/types/container/container.d.ts +2 -1
- package/types/divider/divider.d.ts +26 -2
- package/types/dropdown/dropdown-menu.d.ts +2 -1
- package/types/grid/grid-container.d.ts +2 -1
- package/types/grid/grid-item.d.ts +2 -1
- package/types/image/image.d.ts +1 -1
- package/types/image/image.skeleton.d.ts +1 -1
- package/types/input/input-password.d.ts +2 -1
- package/types/input/input.d.ts +1 -3
- package/types/loading/loading.d.ts +32 -2
- package/types/loading/spinner.d.ts +2 -1
- package/types/modal/modal-footer.d.ts +31 -2
- package/types/modal/modal-header.d.ts +31 -2
- package/types/modal/modal-wrapper.d.ts +2 -1
- package/types/modal/modal.d.ts +1 -0
- package/types/navbar/navbar.styles.d.ts +199 -196
- package/types/pagination/pagination-highlight.d.ts +1 -1
- package/types/pagination/pagination-item.d.ts +2 -1
- package/types/pagination/pagination.d.ts +1 -0
- package/types/popover/popover-content.d.ts +1 -1
- package/types/popover/popover-context.d.ts +2 -2
- package/types/popover/popover.styles.d.ts +11 -0
- package/types/popover/use-popover.d.ts +1 -1
- package/types/progress/progress.d.ts +1 -1
- package/types/radio/index.d.ts +2 -0
- package/types/radio/use-radio.d.ts +1 -0
- package/types/row/row.d.ts +26 -2
- package/types/snippet/snippet.d.ts +37 -1
- package/types/spacer/spacer.d.ts +1 -1
- package/types/switch/switch.d.ts +1 -0
- package/types/table/table-body.d.ts +4 -2
- package/types/table/table-cell.d.ts +1 -0
- package/types/table/table-column-header.d.ts +3 -3
- package/types/table/table-context.d.ts +1 -1
- package/types/table/table-footer.d.ts +5 -4
- package/types/table/table-header-row.d.ts +1 -2
- package/types/table/table-row-group.d.ts +2 -1
- package/types/table/table-row.d.ts +1 -2
- package/types/table/table.d.ts +1 -1
- package/types/table/table.styles.d.ts +14 -7
- package/types/text/child.d.ts +1 -1
- package/types/textarea/textarea.d.ts +1 -1
- package/types/theme/theme-provider.d.ts +2 -1
- package/types/tooltip/tooltip-content.d.ts +3 -2
- package/types/tooltip/tooltip.d.ts +6 -2
- package/types/user/user.d.ts +1 -1
- package/types/utils/css-transition.d.ts +6 -20
- package/types/utils/expand.d.ts +2 -1
- package/umd/nextui.js +3640 -4506
- package/umd/nextui.min.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as r}from"../theme/stitches.config";import{cssFocusVisible as a,cssHideShowIn as t}from"../theme/shared-css";const o={default:{$$navbarItemActiveColor:"$colors$link",$$navbarItemHighlightBackgroundColor:"$colors$primaryLight",$$navbarItemHighlightTextColor:"$colors$primaryLightContrast",$$navbarItemHighlightSolidBackgroundColor:"$colors$primary",$$navbarItemHighlightSolidTextColor:"$colors$primarySolidContrast"},neutral:{$$navbarItemActiveColor:"$colors$neutral",$$navbarItemHighlightBackgroundColor:"$colors$neutralLight",$$navbarItemHighlightTextColor:"$colors$text",$$navbarItemHighlightSolidBackgroundColor:"$colors$neutral",$$navbarItemHighlightSolidTextColor:"$colors$neutralSolidContrast"},primary:{$$navbarItemActiveColor:"$colors$primary",$$navbarItemHighlightBackgroundColor:"$colors$primaryLight",$$navbarItemHighlightTextColor:"$colors$primaryLightContrast",$$navbarItemHighlightSolidBackgroundColor:"$colors$primary",$$navbarItemHighlightSolidTextColor:"$colors$primarySolidContrast"},secondary:{$$navbarItemActiveColor:"$colors$secondary",$$navbarItemHighlightBackgroundColor:"$colors$secondaryLight",$$navbarItemHighlightTextColor:"$colors$secondaryLightContrast",$$navbarItemHighlightSolidBackgroundColor:"$colors$secondary",$$navbarItemHighlightSolidTextColor:"$colors$secondarySolidContrast"},success:{$$navbarItemActiveColor:"$colors$success",$$navbarItemHighlightBackgroundColor:"$colors$successLight",$$navbarItemHighlightTextColor:"$colors$successLightContrast",$$navbarItemHighlightSolidBackgroundColor:"$colors$success",$$navbarItemHighlightSolidTextColor:"$colors$successSolidContrast"},warning:{$$navbarItemActiveColor:"$colors$warning",$$navbarItemHighlightBackgroundColor:"$colors$warningLight",$$navbarItemHighlightTextColor:"$colors$warningLightContrast",$$navbarItemHighlightSolidBackgroundColor:"$colors$warning",$$navbarItemHighlightSolidTextColor:"$colors$warningSolidContrast"},error:{$$navbarItemActiveColor:"$colors$error",$$navbarItemHighlightBackgroundColor:"$colors$errorLight",$$navbarItemHighlightTextColor:"$colors$errorLightContrast",$$navbarItemHighlightSolidBackgroundColor:"$colors$error",$$navbarItemHighlightSolidTextColor:"$colors$errorSolidContrast"}};export const StyledBaseNavbarItem=r("li",{mb:0,display:"flex",alignItems:"center",listStyleType:"none",lineHeight:"inherit"});export const StyledBaseNavbarList=r("ul",{m:0,listStyle:"none",lineHeight:"$xs",li:{mb:0}});export const StyledNavbarCollapseItem=r(StyledBaseNavbarItem,{opacity:0,paddingBottom:"$6",fontSize:"$lg",lineHeight:"$lg",fontWeight:"$normal",transformOrigin:"top",variants:{activeColor:o,isActive:{true:{color:"$$navbarItemActiveColor",fontWeight:"$semibold"}},disableAnimation:{true:{transition:"none"}}},defaultVariants:{activeColor:"default"}});export const StyledNavbarCollapseWrapper=r(StyledBaseNavbarList,{py:"$8",px:"$$navbarPadding",overflowY:"scroll",maxHeight:"100%"});export const StyledNavbarCollapse=r("div",{$$navbarListColor:"$colors$text",$$navbarListBackgroundColor:"$colors$background",$$navbarListBlurBackgroundColor:"$colors$backgroundAlpha",$$navbarListBlur:"16px",position:"absolute",top:0,left:0,right:0,background:"$$navbarListBackgroundColor",width:"100%",height:"0px",zIndex:"$4",boxSizing:"border-box",overflow:"hidden",variants:{isOpen:{true:{top:"$$navbarHeight",pb:"$$navbarHeight",height:"100vh"}},disableBlur:{false:{"@supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none))":{bg:"$$navbarListBlurBackgroundColor",backdropFilter:"saturate(180%) blur($$navbarListBlur)","@safari":{[`& ${StyledNavbarCollapseWrapper}`]:{bg:"$$navbarListBlurBackgroundColor",backdropFilter:"saturate(180%) blur($$navbarListBlur)"}}}}},disableAnimation:{true:{[`& ${StyledNavbarCollapseItem}`]:{transition:"none"}}}},defaultVariants:{disableBlur:"false"}},t);export const StyledNavbarToggleIconContainer=r("div",{dflex:"center",flexDirection:"column",pointerEvents:"none",size:"22px","& .line":{height:"1px",width:"100%",backgroundColor:"$$navbarTextColor",transition:"transform 0.3s ease","&.top":{transform:"translateY(-4px) rotate(0deg)"},"&.bottom":{transform:"translateY(4px) rotate(0deg)"}},variants:{isExpanded:{true:{"& .line":{"&.top":{transform:"translateY(1px) rotate(45deg)"},"&.bottom":{transform:"translateY(0px) rotate(-45deg)"}}}}}});export const StyledNavbarToggle=r("button",{appearance:"none",background:"transparent",border:"none",cursor:"pointer",p:"$2",transition:"box-shadow 0.25s ease 0s, opacity 0.25s ease 0s",variants:{isPressed:{true:{opacity:.7}}}},t,a);export const StyledNavbarBrand=r("span",{display:"flex",flexWrap:"nowrap",flexDirection:"row",justifyContent:"flex-start",bg:"transparent",alignItems:"center",textDecoration:"none",fontSize:"$base",whiteSpace:"nowrap",boxSizing:"border-box"},t);export const StyledNavbarItem=r(StyledBaseNavbarItem,{$$navbarItemFontSize:"inherit",$$navbarItemFontWeight:"$fontWeights$normal",fontSize:"$$navbarItemFontSize",fontWeight:"$$navbarItemFontWeight",position:"relative","> *":{zIndex:"$2",fontSize:"inherit !important",fontWeight:"inherit !important"},"&:before":{opacity:0,zIndex:"$1",content:'""',display:"block",position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:"$sm"},"&:after":{opacity:0,zIndex:"$1",content:'""',display:"block",position:"absolute",left:"0",right:"0",bottom:"0",height:"$$navbarItemUnderlineHeight",borderRadius:"0px",background:"$$navbarItemActiveColor"},variants:{activeColor:o,isActive:{true:{color:"$$navbarItemActiveColor",$$navbarItemFontWeight:"$fontWeights$semibold"}},variant:{default:{},underline:{color:"inherit",height:"100%"},"underline-rounded":{color:"inherit",height:"100%"},highlight:{},"highlight-solid":{},"highlight-rounded":{},"highlight-solid-rounded":{}},underlineHeight:{light:{$$navbarItemUnderlineHeight:"2px"},normal:{$$navbarItemUnderlineHeight:"4px"},bold:{$$navbarItemUnderlineHeight:"6px"},extrabold:{$$navbarItemUnderlineHeight:"8px"},black:{$$navbarItemUnderlineHeight:"10px"}},isDisabled:{true:{opacity:.5,cursor:"not-allowed"}}},compoundVariants:[{isActive:!0,variant:"underline",css:{color:"inherit","&:after":{opacity:1}}},{isActive:!0,variant:"underline-rounded",css:{color:"inherit","&:after":{opacity:1,borderRadius:"calc($$navbarItemUnderlineHeight / 2)"}}},{isActive:!0,variant:"highlight",css:{color:"$$navbarItemHighlightTextColor","*:first-child":{color:"inherit"},"&:before":{opacity:1,background:"$$navbarItemHighlightBackgroundColor"}}},{isActive:!0,variant:"highlight-solid",css:{color:"$$navbarItemHighlightSolidTextColor","*:first-child":{color:"inherit"},"&:before":{opacity:1,background:"$$navbarItemHighlightSolidBackgroundColor"}}},{isActive:!0,variant:"highlight-rounded",css:{color:"$$navbarItemHighlightTextColor","*:first-child":{color:"inherit"},"&:before":{opacity:1,background:"$$navbarItemHighlightBackgroundColor"}}},{isActive:!0,variant:"highlight-solid-rounded",css:{color:"$$navbarItemHighlightSolidTextColor","*:first-child":{color:"inherit"},"&:before":{opacity:1,background:"$$navbarItemHighlightSolidBackgroundColor"}}}],defaultVariants:{variant:"default",activeColor:"default",underlineHeight:"normal"}},t);export const StyledCursorHighlight=r(StyledBaseNavbarItem,{position:"absolute",top:"calc(50% - $$navbarItemMaxHeight * 0.5)",height:"$$navbarItemMaxHeight",background:"$neutralLight",borderRadius:"$sm",transition:"width 0.2s ease 0s, transform 0.2s ease 0s, opacity 0.2s ease 0s",variants:{color:o,isHighlightVariant:{true:{background:"$$navbarItemHighlightBackgroundColor"}},isHighlightSolidVariant:{true:{background:"$$navbarItemHighlightSolidBackgroundColor"}},isRounded:{true:{borderRadius:"$pill"}}}});export const StyledNavbarContent=r(StyledBaseNavbarList,{$$navbarContentItemGap:"$space$10",$$navbarContentItemHorizontalPadding:"$space$10",d:"flex",height:"100%",flexWrap:"nowrap",alignItems:"center",gap:"$$navbarContentItemGap",color:"inherit",variants:{enableCursorHighlight:{true:{zIndex:"$2",position:"relative"}}}},t);export const StyledNavbarContainer=r("div",{width:"100%",height:"$$navbarHeight",minHeight:"$$navbarHeight",display:"flex",flexWrap:"nowrap",justifyContent:"space-between",alignItems:"center",position:"relative",boxSizing:"border-box",color:"inherit",px:"$$navbarPadding",bg:"$$navbarBackgroundColor",maxW:"$$navbarContainerMaxWidth",zIndex:"$5","@xsMax":{$$navbarPadding:"$space$6",$$navbarFloatingMargin:"$space$6"}});export const StyledNavbar=r("nav",{width:"100%",dflex:"center",position:"relative",height:"auto",color:"$$navbarTextColor",zIndex:"$2",variants:{variant:{static:{position:"static"},sticky:{top:0,right:0,left:0,position:"sticky"},floating:{top:0,right:0,left:0,position:"sticky","@safari":{top:"-5px"},[`& ${StyledNavbarContainer}`]:{mt:"calc($$navbarFloatingMargin * 0.5)",mx:"$$navbarFloatingMargin",borderRadius:"$$navbarBorderRadius"},[`& ${StyledNavbarCollapseWrapper}`]:{px:"calc($$navbarFloatingMargin + $space$4)"}}},maxWidth:{xs:{$$navbarContainerMaxWidth:"$breakpoints$xs"},sm:{$$navbarContainerMaxWidth:"$breakpoints$sm"},md:{$$navbarContainerMaxWidth:"$breakpoints$md"},lg:{$$navbarContainerMaxWidth:"$breakpoints$lg"},xl:{$$navbarContainerMaxWidth:"$breakpoints$xl"},fluid:{$$navbarContainerMaxWidth:"100%"}},isBordered:{true:{[`& ${StyledNavbarContainer}`]:{borderBottom:"$$navbarBorderWeight solid $$navbarBorderColor"}}},isCompact:{true:{$$navbarHeight:"$$navbarCompactHeight",$$navbarItemMaxHeight:"$$navbarCompactItemMaxHeight",$$navbarBorderRadius:"$radii$md"}},disableShadow:{false:{boxShadow:"$$navbarShadow"}},disableBlur:{false:{"@supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none))":{[`& ${StyledNavbarContainer}`]:{bg:"$$navbarBlurBackgroundColor",backdropFilter:"saturate(180%) blur($$navbarBlur)"}}}}},compoundVariants:[{isBordered:!0,variant:"floating",css:{[`& ${StyledNavbarContainer}`]:{border:"$$navbarBorderWeight solid $$navbarBorderColor"}}},{variant:"floating",disableShadow:!1,css:{boxShadow:"none",[`& ${StyledNavbarContainer}`]:{boxShadow:"$$navbarShadow"}}}],defaultVariants:{variant:"static",maxWidth:"lg",isBordered:!1,disableShadow:!1,disableBlur:!1}});
|
|
1
|
+
import{styled as r}from"../theme/stitches.config";import{cssFocusVisible as a,cssHideShowIn as t}from"../theme/shared-css";const o={default:{$$navbarItemActiveColor:"$colors$link",$$navbarItemHighlightBackgroundColor:"$colors$primaryLight",$$navbarItemHighlightTextColor:"$colors$primaryLightContrast",$$navbarItemHighlightSolidBackgroundColor:"$colors$primary",$$navbarItemHighlightSolidTextColor:"$colors$primarySolidContrast"},neutral:{$$navbarItemActiveColor:"$colors$neutral",$$navbarItemHighlightBackgroundColor:"$colors$neutralLight",$$navbarItemHighlightTextColor:"$colors$text",$$navbarItemHighlightSolidBackgroundColor:"$colors$neutral",$$navbarItemHighlightSolidTextColor:"$colors$neutralSolidContrast"},primary:{$$navbarItemActiveColor:"$colors$primary",$$navbarItemHighlightBackgroundColor:"$colors$primaryLight",$$navbarItemHighlightTextColor:"$colors$primaryLightContrast",$$navbarItemHighlightSolidBackgroundColor:"$colors$primary",$$navbarItemHighlightSolidTextColor:"$colors$primarySolidContrast"},secondary:{$$navbarItemActiveColor:"$colors$secondary",$$navbarItemHighlightBackgroundColor:"$colors$secondaryLight",$$navbarItemHighlightTextColor:"$colors$secondaryLightContrast",$$navbarItemHighlightSolidBackgroundColor:"$colors$secondary",$$navbarItemHighlightSolidTextColor:"$colors$secondarySolidContrast"},success:{$$navbarItemActiveColor:"$colors$success",$$navbarItemHighlightBackgroundColor:"$colors$successLight",$$navbarItemHighlightTextColor:"$colors$successLightContrast",$$navbarItemHighlightSolidBackgroundColor:"$colors$success",$$navbarItemHighlightSolidTextColor:"$colors$successSolidContrast"},warning:{$$navbarItemActiveColor:"$colors$warning",$$navbarItemHighlightBackgroundColor:"$colors$warningLight",$$navbarItemHighlightTextColor:"$colors$warningLightContrast",$$navbarItemHighlightSolidBackgroundColor:"$colors$warning",$$navbarItemHighlightSolidTextColor:"$colors$warningSolidContrast"},error:{$$navbarItemActiveColor:"$colors$error",$$navbarItemHighlightBackgroundColor:"$colors$errorLight",$$navbarItemHighlightTextColor:"$colors$errorLightContrast",$$navbarItemHighlightSolidBackgroundColor:"$colors$error",$$navbarItemHighlightSolidTextColor:"$colors$errorSolidContrast"}};export const StyledBaseNavbarItem=r("li",{mb:0,display:"flex",alignItems:"center",listStyleType:"none",lineHeight:"inherit"});export const StyledBaseNavbarList=r("ul",{m:0,listStyle:"none",lineHeight:"$xs",li:{mb:0}});export const StyledNavbarCollapseItem=r(StyledBaseNavbarItem,{opacity:0,paddingBottom:"$6",fontSize:"$lg",lineHeight:"$lg",fontWeight:"$normal",transformOrigin:"top",variants:{activeColor:o,isActive:{true:{color:"$$navbarItemActiveColor",fontWeight:"$semibold"}},disableAnimation:{true:{transition:"none"}}},defaultVariants:{activeColor:"default"}});export const StyledNavbarCollapseWrapper=r(StyledBaseNavbarList,{py:"$8",px:"$$navbarPadding",overflowY:"scroll",maxHeight:"100%"});export const StyledNavbarCollapse=r("div",{$$navbarListColor:"$colors$text",$$navbarListBackgroundColor:"$colors$background",$$navbarListBlurBackgroundColor:"$colors$backgroundAlpha",$$navbarListBlur:"16px",position:"absolute",top:0,left:0,right:0,background:"$$navbarListBackgroundColor",width:"100%",height:"0px",zIndex:"$4",boxSizing:"border-box",overflow:"hidden",variants:{isOpen:{true:{top:"$$navbarHeight",pb:"$$navbarHeight",height:"100vh"}},disableBlur:{false:{"@supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none))":{bg:"$$navbarListBlurBackgroundColor",backdropFilter:"saturate(180%) blur($$navbarListBlur)","@media screen and (-webkit-min-device-pixel-ratio:0)":{[`& ${StyledNavbarCollapseWrapper}`]:{bg:"$$navbarListBlurBackgroundColor",backdropFilter:"saturate(180%) blur($$navbarListBlur)"}}}}},disableAnimation:{true:{[`& ${StyledNavbarCollapseItem}`]:{transition:"none"}}}},defaultVariants:{disableBlur:"false"}},t);export const StyledNavbarToggleIconContainer=r("div",{dflex:"center",flexDirection:"column",pointerEvents:"none",size:"22px","& .line":{height:"1px",width:"100%",backgroundColor:"$$navbarTextColor",transition:"transform 0.3s ease","&.top":{transform:"translateY(-4px) rotate(0deg)"},"&.bottom":{transform:"translateY(4px) rotate(0deg)"}},variants:{isExpanded:{true:{"& .line":{"&.top":{transform:"translateY(1px) rotate(45deg)"},"&.bottom":{transform:"translateY(0px) rotate(-45deg)"}}}}}});export const StyledNavbarToggle=r("button",{appearance:"none",background:"transparent",border:"none",cursor:"pointer",p:"$2",transition:"box-shadow 0.25s ease 0s, opacity 0.25s ease 0s",variants:{isPressed:{true:{opacity:.7}}}},t,a);export const StyledNavbarBrand=r("span",{display:"flex",flexWrap:"nowrap",flexDirection:"row",justifyContent:"flex-start",bg:"transparent",alignItems:"center",textDecoration:"none",fontSize:"$base",whiteSpace:"nowrap",boxSizing:"border-box"},t);export const StyledNavbarItem=r(StyledBaseNavbarItem,{$$navbarItemFontSize:"inherit",$$navbarItemFontWeight:"$fontWeights$normal",fontSize:"$$navbarItemFontSize",fontWeight:"$$navbarItemFontWeight",position:"relative","> *":{zIndex:"$2",fontSize:"inherit !important",fontWeight:"inherit !important"},":first-child":{boxSizing:"content-box"},"&:before":{opacity:0,zIndex:"$1",content:'""',display:"block",position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:"$sm"},"&:after":{opacity:0,zIndex:"$1",content:'""',display:"block",position:"absolute",left:"0",right:"0",bottom:"0",height:"$$navbarItemUnderlineHeight",borderRadius:"0px",background:"$$navbarItemActiveColor"},variants:{activeColor:o,isActive:{true:{color:"$$navbarItemActiveColor",$$navbarItemFontWeight:"$fontWeights$semibold"}},variant:{default:{},underline:{color:"inherit",height:"100%"},"underline-rounded":{color:"inherit",height:"100%"},highlight:{},"highlight-solid":{},"highlight-rounded":{},"highlight-solid-rounded":{}},underlineHeight:{light:{$$navbarItemUnderlineHeight:"2px"},normal:{$$navbarItemUnderlineHeight:"4px"},bold:{$$navbarItemUnderlineHeight:"6px"},extrabold:{$$navbarItemUnderlineHeight:"8px"},black:{$$navbarItemUnderlineHeight:"10px"}},isDisabled:{true:{opacity:.5,cursor:"not-allowed"}}},compoundVariants:[{isActive:!0,variant:"underline",css:{color:"inherit","&:after":{opacity:1}}},{isActive:!0,variant:"underline-rounded",css:{color:"inherit","&:after":{opacity:1,borderRadius:"calc($$navbarItemUnderlineHeight / 2)"}}},{isActive:!0,variant:"highlight",css:{color:"$$navbarItemHighlightTextColor","*:first-child":{color:"inherit"},"&:before":{opacity:1,background:"$$navbarItemHighlightBackgroundColor"}}},{isActive:!0,variant:"highlight-solid",css:{color:"$$navbarItemHighlightSolidTextColor","*:first-child":{color:"inherit"},"&:before":{opacity:1,background:"$$navbarItemHighlightSolidBackgroundColor"}}},{isActive:!0,variant:"highlight-rounded",css:{color:"$$navbarItemHighlightTextColor","*:first-child":{color:"inherit"},"&:before":{opacity:1,background:"$$navbarItemHighlightBackgroundColor"}}},{isActive:!0,variant:"highlight-solid-rounded",css:{color:"$$navbarItemHighlightSolidTextColor","*:first-child":{color:"inherit"},"&:before":{opacity:1,background:"$$navbarItemHighlightSolidBackgroundColor"}}}],defaultVariants:{variant:"default",activeColor:"default",underlineHeight:"normal"}},t);export const StyledCursorHighlight=r(StyledBaseNavbarItem,{position:"absolute",top:"calc(50% - $$navbarItemMaxHeight * 0.5)",height:"$$navbarItemMaxHeight",background:"$neutralLight",borderRadius:"$sm",transition:"width 0.2s ease 0s, transform 0.2s ease 0s, opacity 0.2s ease 0s",variants:{color:o,isHighlightVariant:{true:{background:"$$navbarItemHighlightBackgroundColor"}},isHighlightSolidVariant:{true:{background:"$$navbarItemHighlightSolidBackgroundColor"}},isRounded:{true:{borderRadius:"$pill"}}}});export const StyledNavbarContent=r(StyledBaseNavbarList,{$$navbarContentItemGap:"$space$10",$$navbarContentItemHorizontalPadding:"$space$10",d:"flex",height:"100%",flexWrap:"nowrap",alignItems:"center",gap:"$$navbarContentItemGap",color:"inherit",variants:{enableCursorHighlight:{true:{zIndex:"$2",position:"relative"}}}},t);export const StyledNavbarContainer=r("div",{width:"100%",height:"$$navbarHeight",minHeight:"$$navbarHeight",display:"flex",flexWrap:"nowrap",justifyContent:"space-between",alignItems:"center",position:"relative",boxSizing:"border-box",color:"inherit",px:"$$navbarPadding",bg:"$$navbarBackgroundColor",maxW:"$$navbarContainerMaxWidth",zIndex:"$5","@xsMax":{$$navbarPadding:"$space$6",$$navbarFloatingMargin:"$space$6"}});export const StyledNavbar=r("nav",{width:"100%",dflex:"center",position:"relative",height:"auto",color:"$$navbarTextColor",zIndex:"$2",variants:{variant:{static:{position:"static"},sticky:{top:0,right:0,left:0,position:"sticky"},floating:{top:0,right:0,left:0,position:"sticky","@safari":{top:"-5px"},[`& ${StyledNavbarContainer}`]:{mt:"calc($$navbarFloatingMargin * 0.5)",mx:"$$navbarFloatingMargin",borderRadius:"$$navbarBorderRadius"},[`& ${StyledNavbarCollapseWrapper}`]:{px:"calc($$navbarFloatingMargin + $space$4)"}}},maxWidth:{xs:{$$navbarContainerMaxWidth:"$breakpoints$xs"},sm:{$$navbarContainerMaxWidth:"$breakpoints$sm"},md:{$$navbarContainerMaxWidth:"$breakpoints$md"},lg:{$$navbarContainerMaxWidth:"$breakpoints$lg"},xl:{$$navbarContainerMaxWidth:"$breakpoints$xl"},fluid:{$$navbarContainerMaxWidth:"100%"}},isBordered:{true:{[`& ${StyledNavbarContainer}`]:{borderBottom:"$$navbarBorderWeight solid $$navbarBorderColor"}}},isCompact:{true:{$$navbarHeight:"$$navbarCompactHeight",$$navbarItemMaxHeight:"$$navbarCompactItemMaxHeight",$$navbarBorderRadius:"$radii$md"}},disableShadow:{false:{boxShadow:"$$navbarShadow"}},disableBlur:{false:{"@supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none))":{[`& ${StyledNavbarContainer}`]:{bg:"$$navbarBlurBackgroundColor",backdropFilter:"saturate(180%) blur($$navbarBlur)"}}}}},compoundVariants:[{isBordered:!0,variant:"floating",css:{[`& ${StyledNavbarContainer}`]:{border:"$$navbarBorderWeight solid $$navbarBorderColor"}}},{variant:"floating",disableShadow:!1,css:{boxShadow:"none",[`& ${StyledNavbarContainer}`]:{boxShadow:"$$navbarShadow"}}}],defaultVariants:{variant:"static",maxWidth:"lg",isBordered:!1,disableShadow:!1,disableBlur:!1}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{useModal as
|
|
1
|
+
import e,{useMemo as o}from"react";import{useModal as s,useOverlay as r,DismissButton as i}from"@react-aria/overlays";import{useDialog as t}from"@react-aria/dialog";import{FocusScope as a,useFocusRing as n}from"@react-aria/focus";import{mergeProps as l}from"@react-aria/utils";import m from"../utils/css-transition";import{__DEV__ as p}from"../utils/assertion";import{mergeRefs as d}from"../utils/refs";import c from"../utils/clsx";import{StyledPopoverContentContainer as u,StyledPopoverContent as f}from"./popover.styles";import{usePopoverContext as b}from"./popover-context";import{getTransformOrigin as x}from"./utils";import{jsx as h}from"react/jsx-runtime";import{jsxs as v}from"react/jsx-runtime";import{Fragment as O}from"react/jsx-runtime";const g=e.forwardRef(((e,p)=>{const{children:g,as:D,css:y,className:C,...P}=e,{state:j,placement:N,overlayRef:B,disableAnimation:E,disableShadow:F,shouldCloseOnBlur:w,isDismissable:I,isKeyboardDismissDisabled:S,shouldCloseOnInteractOutside:T,getPopoverProps:A,isBordered:K,borderWeight:R,onClose:V,onEntered:W,onExited:U}=b(),k=x(N),q=o((()=>({transformOrigin:k,...y})),[k,y]),{modalProps:z}=s({isDisabled:!0}),{dialogProps:G}=t({role:"dialog"},B),{overlayProps:H}=r({onClose:V,isOpen:j.isOpen,isDismissable:I&&j.isOpen,shouldCloseOnBlur:w,isKeyboardDismissDisabled:S,shouldCloseOnInteractOutside:T},B),J=l({isBordered:K,disableShadow:F,borderWeight:R},P),{isFocusVisible:L,focusProps:M}=n(),Q=o((()=>({clearTime:E?0:300,enterTime:E?0:20,leaveTime:E?0:60,name:"nextui-popover-content",visible:j.isOpen,onEntered:W,onExited:U})),[E,j.isOpen]),X=v(u,{ref:d(B,p),...A(l(H,z,G,M,J),q),as:D,className:c("nextui-popover-content-container",C),disableAnimation:E,isFocusVisible:L,children:[h(i,{onDismiss:V}),h(f,{className:"nextui-popover-content",children:g}),h(i,{onDismiss:V})]});return h(O,{children:h(a,{restoreFocus:!0,children:h(m,{...Q,children:X})})})}));p&&(g.displayName="NextUI.PopoverContent"),g.toString=()=>".nextui-popover-content";export default g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as o,keyframes as e}from"../theme/stitches.config";import{cssFocusVisible as r}from"../theme/shared-css";export const appearanceIn=e({"0%":{opacity:0,transform:"scale(0.95)"},"60%":{opacity:.75,backfaceVisibility:"hidden",webkitFontSmoothing:"antialiased",transform:"translateZ(0) scale(1.05)"},"100%":{opacity:1}});export const appearanceOut=e({"0%":{opacity:1,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(0.5)"}});export const StyledPopoverContentContainer=o("div",{$$popoverMinWidth:"$space$
|
|
1
|
+
import{styled as o,keyframes as e}from"../theme/stitches.config";import{cssFocusVisible as r}from"../theme/shared-css";export const appearanceIn=e({"0%":{opacity:0,transform:"translateZ(0) scale(0.95)"},"60%":{opacity:.75,backfaceVisibility:"hidden",webkitFontSmoothing:"antialiased",transform:"translateZ(0) scale(1.05)"},"100%":{opacity:1,transform:"translateZ(0) scale(1)"}});export const appearanceOut=e({"0%":{opacity:1,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(0.5)"}});export const StyledPopoverContentContainer=o("div",{$$popoverMinWidth:"$space$fit",$$popoverMinHeight:"$space$fit",$$popoverBorderRadius:"$radii$lg",$$popoverBackground:"$colors$backgroundContrast",$$popoverBoxShadow:"$shadows$md",$$popoverBorderColor:"$colors$border",boxShadow:"$$popoverBoxShadow",outline:"none",overflow:"hidden auto",bg:"$$popoverBackground",display:"inline-flex",flexDirection:"column",boxSizing:"border-box",minWidth:"$$popoverMinWidth",minHeight:"$$popoverMinHeight",maxWidth:"calc(100% - $$popoverMinWidth)",maxHeight:"calc(100% - $$popoverMinWidth)",borderRadius:"$$popoverBorderRadius",animationFillMode:"forwards",willChange:"transform, opacity","@motion":{transition:"none"},"&.nextui-popover-content-enter":{animationName:appearanceIn,animationTimingFunction:"ease-out",animationDirection:"normal",animationDuration:"300ms"},"&.nextui-popover-content-leave":{animationName:appearanceOut,animationTimingFunction:"ease-in",animationDuration:"60ms"},variants:{disableShadow:{true:{boxShadow:"none"}},isBordered:{true:{borderStyle:"solid",borderColor:"$$popoverBorderColor"}},borderWeight:{light:{bw:"$light",$$popoverBorderWeight:"$borderWeights$light"},normal:{bw:"$normal",$$popoverBorderWeight:"$borderWeights$normal"},bold:{bw:"$bold",$$popoverBorderWeight:"$borderWeights$bold"},extrabold:{bw:"$extrabold",$$popoverBorderWeight:"$borderWeights$extrabold"},black:{bw:"$black",$$popoverBorderWeight:"$borderWeights$black"}},disableAnimation:{true:{transition:"none","&.nextui-popover-content-enter":{animation:"none"},"&.nextui-popover-content-leave":{animation:"none"}}}},defaultVariants:{isBordered:!1,borderWeight:"light"}},r);export const StyledPopoverContent=o("div",{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRef as e,useMemo as
|
|
1
|
+
import{useRef as e,useMemo as s,useState as o,useCallback as r}from"react";import{mergeProps as t}from"@react-aria/utils";import{useOverlayPosition as l,useOverlayTrigger as i}from"@react-aria/overlays";import{useOverlayTriggerState as n}from"@react-stately/overlays";import{mergeRefs as a}from"../utils/refs";import{isObject as p}from"../utils/object";import{getAriaPlacement as d}from"./utils";export function usePopover(u={}){const{ref:c,triggerRef:f,scrollRef:m,isOpen:g,defaultOpen:O,onOpenChange:y,isBordered:b,borderWeight:h,disableShadow:P,shouldFlip:v=!0,offset:C=12,placement:R="bottom",onClose:D,triggerType:B="dialog",isDismissable:j=!0,shouldCloseOnBlur:x=!1,isKeyboardDismissDisabled:E=!1,disableAnimation:k=!1,shouldCloseOnInteractOutside:w}=u,A=e(null),F=e(null),I=c||A,K=f||F,S=n({isOpen:g,defaultOpen:O,onOpenChange:y}),[T,W]=o(!S.isOpen),q=s((()=>S.isOpen?"open":"closed"),[S.isOpen]),z=r((()=>{null==D||D(),S.close()}),[S,D]),G=r((()=>{W(!1)}),[]),H=r((()=>{W(!0)}),[]),{triggerProps:J,overlayProps:L}=i({type:B},S,K),M=s((()=>d(R)),[R]),{overlayProps:N}=l({isOpen:S.isOpen,targetRef:K,scrollRef:m,placement:M,overlayRef:I,shouldFlip:v,offset:C}),Q=r(((e={},s=null)=>({...null!=f&&f.current?t(J,e):t(e,J),ref:a(K,s)})),[K,f,J]),U=r(((e={},s={})=>{const o=N.style?Object.keys(N.style):[];let r={};o.forEach((e=>{const o=p(s)&&s[e];o&&(r={...r,[e]:o})}));const t=Object.keys(r).length>0?{...N,style:{...N.style,...r}}:N;return{css:s,...e,...L,...t,"data-state":q,"data-placement":R}}),[q,N,L,R]);return{state:S,exited:T,overlayRef:I,triggerRef:K,placement:R,disableShadow:P,disableAnimation:k,shouldCloseOnBlur:x,isDismissable:j,isBordered:b,borderWeight:h,isKeyboardDismissDisabled:E,shouldCloseOnInteractOutside:w,isOpen:S.isOpen,onClose:z,onExited:H,onEntered:G,triggerProps:J,overlayProps:L,positionProps:N,getTriggerProps:Q,getPopoverProps:U}}
|
package/esm/radio/radio.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import i,{useMemo as e}from"react";import{mergeProps as s}from"@react-aria/utils";import{useFocusRing as r}from"@react-aria/focus";import{VisuallyHidden as a}from"@react-aria/visually-hidden";import o from"../utils/clsx";import{__DEV__ as t}from"../utils/assertion";import{useFocusableRef as d}from"../utils/dom";import{useRadio as l}from"./use-radio";import{StyledRadioText as c,StyledRadioPoint as n,StyledRadioLabel as
|
|
1
|
+
import i,{useMemo as e}from"react";import{mergeProps as s}from"@react-aria/utils";import{useFocusRing as r}from"@react-aria/focus";import{VisuallyHidden as a}from"@react-aria/visually-hidden";import o from"../utils/clsx";import{__DEV__ as t}from"../utils/assertion";import{useFocusableRef as d}from"../utils/dom";import{useRadio as l}from"./use-radio";import{StyledRadioText as c,StyledRadioPoint as n,StyledRadioLabel as u,StyledRadioDescription as m,StyledRadioContainer as p}from"./radio.styles";import{jsx as f}from"react/jsx-runtime";import{jsxs as h}from"react/jsx-runtime";export const Radio=i.forwardRef(((i,t)=>{const{className:x,as:b,css:v,children:N,label:R,description:k,...I}=i,{size:j,color:q,inputRef:D,labelColor:F,isHovered:y,isSquared:P,isInvalid:S,isDisabled:z,autoFocus:A,disableAnimation:C,hoverProps:H,inputProps:V,isRequired:g}=l({...I,children:null!=N?N:R}),w=d(t,D),{focusProps:U,isFocusVisible:$}=r({autoFocus:A}),B=e((()=>y?"is-hovered":z?"is-disabled":V.checked?"checked":"uncheked"),[z,V.checked,y]);return h(u,{ref:w,...H,as:b,className:o("nextui-radio-label",`nextui-radio--${B}`,x),color:q,css:v,"data-state":B,disableAnimation:C,isChecked:V.checked,isDisabled:z,isHovered:y,isInvalid:S,isSquared:P,size:j,children:[h(p,{className:"nextui-radio-container",children:[f(n,{className:"nextui-radio-point",isFocusVisible:$,...U,children:f(a,{children:f("input",{ref:D,className:"nextui-radio-input",required:g,...s(V,U)})})}),f(c,{className:"nextui-radio-text",color:F,isDisabled:z,isInvalid:S,children:N})]}),k&&f(m,{className:"nextui-radio-description",isDisabled:z,isInvalid:S,children:k})]})}));t&&(Radio.displayName="NextUI.Radio"),Radio.toString=()=>".nextui-radio";export default Radio;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMemo as o}from"react";import{useRadioGroupState as r}from"@react-stately/radio";import{useRadioGroup as a}from"@react-aria/radio";export const useRadioGroup=
|
|
1
|
+
import{useMemo as o}from"react";import{useRadioGroupState as r}from"@react-stately/radio";import{useRadioGroup as a}from"@react-aria/radio";export const useRadioGroup=i=>{const{size:e="md",color:t="default",labelColor:l="default",orientation:d="vertical",isRequired:s,validationState:p,...u}=i,n=o((()=>({...u,isRequired:s,orientation:d})),[u]),c=r(n),{radioGroupProps:m,labelProps:f}=a(n,c);return{size:e,color:t,orientation:d,labelColor:l,isRequired:s,validationState:p,radioGroupState:c,radioGroupProps:m,labelProps:f}};
|
package/esm/radio/use-radio.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRef as
|
|
1
|
+
import{useRef as i,useMemo as o}from"react";import{useRadio as e}from"@react-aria/radio";import{useHover as r}from"@react-aria/interactions";import{warn as a}from"../utils/console";import{__DEV__ as s}from"../utils/assertion";import{useRadioGroupContext as l}from"./radio-context";export const useRadio=t=>{var d,u,n;const p=l(),{size:c=(null!=(d=p.size)?d:"md"),color:m=(null!=(u=p.color)?u:"default"),labelColor:v=(null!=(n=p.labelColor)?n:"default"),autoFocus:b,isSquared:f=!1,isDisabled:R=!1,disableAnimation:h=!1,...q}=t;p&&s&&(void 0!==q.checked&&a('Remove props "checked" if in the Radio.Group.',"Radio"),void 0===q.value&&a('Props "value" must be defined if in the Radio.Group.',"Radio"));const P=i(null),{inputProps:S}=e({...q,...p,isDisabled:R},p.radioGroupState,P),D=o((()=>{var i;return null!=(i=S.disabled)&&i}),[S.disabled]),{hoverProps:z,isHovered:C}=r({isDisabled:D});return{size:c,color:m,inputRef:P,autoFocus:b,isDisabled:D,labelColor:v,isInvalid:o((()=>"invalid"===p.validationState),[p.validationState]),isHovered:C,isSquared:f,isRequired:o((()=>{var i;return null!=(i=p.isRequired)&&i}),[p.isRequired]),disableAnimation:h,inputProps:S,hoverProps:z}};
|
package/esm/spacer/spacer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"react";import r from"../utils/with-defaults";import{getMargin as
|
|
1
|
+
import t from"react";import r from"../utils/with-defaults";import{getMargin as o}from"../utils/dimensions";import{StyledSpacer as i}from"./spacer.styles";import{jsx as s}from"react/jsx-runtime";const m=({x:t,y:r,css:m,...e})=>{const n=o(t),a=o(r);return s(i,{"aria-hidden":"true",css:{marginLeft:`${n} !important`,marginTop:`${a} !important`,...m},...e})};m.toString=()=>".nextui-spacer";const e=t.memo(m);export default r(e,{x:1,y:1});
|
package/esm/switch/switch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useCallback as t,useEffect as a,useMemo as i,useState as o}from"react";import r from"../utils/with-defaults";import{warn as n}from"../utils/console";import s,{KeyCode as d}from"../use-keyboard";import c from"../utils/clsx";import{__DEV__ as l}from"../utils/assertion";import{StyledSwitch as m,StyledSwitchContainer as h,StyledSwitchInput as u,StyledSwitchCircle as p}from"./switch.styles";import{jsx as f}from"react/jsx-runtime";import{jsxs as b}from"react/jsx-runtime";const k="nextui-switch",x=({initialChecked:e,checked:r,disabled:x,onChange:v,squared:w,bordered:g,shadow:$,icon:D,iconOn:j,iconOff:C,animated:O,preventDefault:q,...
|
|
1
|
+
import e,{useCallback as t,useEffect as a,useMemo as i,useState as o}from"react";import r from"../utils/with-defaults";import{warn as n}from"../utils/console";import s,{KeyCode as d}from"../use-keyboard";import c from"../utils/clsx";import{__DEV__ as l}from"../utils/assertion";import{StyledSwitch as m,StyledSwitchContainer as h,StyledSwitchInput as u,StyledSwitchCircle as p}from"./switch.styles";import{jsx as f}from"react/jsx-runtime";import{jsxs as b}from"react/jsx-runtime";const k="nextui-switch",x=({initialChecked:e,checked:r,disabled:x,onChange:v,squared:w,bordered:g,shadow:$,icon:D,iconOn:j,iconOff:C,animated:O,preventDefault:q,name:y,...E})=>{const[N,S]=o(e);D&&l&&(j||C)&&n('Remove props "icon" if iconOn or iconOff exists.',"Switch");const B=t((e=>{if(x)return;const t={target:{checked:!N},stopPropagation:e.stopPropagation,preventDefault:e.preventDefault,nativeEvent:e};S(!N),v&&v(t)}),[x,N,v]),{bindings:I}=s((e=>{B(e)}),[d.Enter,d.Space],{disableGlobalEvent:!0,preventDefault:q}),P=i((()=>{const e=D||j||C,t=Boolean(j),a=Boolean(C);return e?t&&N?j:a&&!N?C:e:null}),[N,D,j,C]);a((()=>{void 0!==r&&S(r)}),[r]);const G=i((()=>N?"checked":"unchecked"),[N]);return b(h,{animated:O,"data-state":G,disabled:x,...E,children:[f(u,{animated:O,bordered:g,checked:N,className:c(`${k}-input`),"data-state":G,disabled:x,tabIndex:-1,type:"checkbox",onChange:B,name:y}),f(m,{animated:O,"aria-checked":N,"aria-disabled":x,bordered:g,checked:N,className:c(k,`${k}--${G}`,{[`${k}-checked`]:N,[`${k}-disabled`]:x}),"data-state":G,disabled:x,role:"switch",shadow:$,squared:w,tabIndex:x?-1:0,...I,children:f(p,{className:`${k}-circle`,children:P})})]})};x.toString=()=>".nextui-switch";const v=e.memo(x);export default r(v,{disabled:!1,bordered:!1,shadow:!1,squared:!1,animated:!0,preventDefault:!0,initialChecked:!1});
|
package/esm/table/table-body.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import l,{useMemo as e}from"react";import{mergeProps as o}from"@react-aria/utils";import{Loading as t}from"../index";import r from"../utils/clsx";import{StyledBaseTableCell as i,StyledTableLoadingRow as
|
|
1
|
+
import l,{useMemo as e}from"react";import{mergeProps as o}from"@react-aria/utils";import{Loading as t}from"../index";import r from"../utils/clsx";import{StyledBaseTableCell as i,StyledTableLoadingRow as a}from"./table.styles";import n from"./table-row-group";import s from"./table-row";import d from"./table-cell";import c from"./table-checkbox-cell";import{useTableContext as u}from"./table-context";import{isInfinityScroll as m}from"./utils";import{jsx as p}from"react/jsx-runtime";import{jsxs as h}from"react/jsx-runtime";const b=({children:l,collection:b,state:y,animated:g,color:x,hasPagination:f,hideLoading:v,isStatic:S,...N})=>{var w,C,j,k,H,P;const{currentPage:B,rowsPerPage:E}=u(),L=e((()=>m(b)),[b.body.props]),M="loading"===(null==(w=b.body)||null==(C=w.props)?void 0:C.loadingState)||"loadingMore"===(null==(j=b.body)||null==(k=j.props)?void 0:k.loadingState),A=e((()=>{const l=[...b.body.childNodes];return f?null==l?void 0:l.slice((B-1)*E,B*E):l}),[f,b,B,E]),I=e((()=>{const l=A.length;return l>=E&&!L?null:p("tr",{"aria-hidden":"true",className:"nextui-table-hidden-row",role:"row",children:p(i,{"aria-hidden":"true",colSpan:b.columnCount,css:{height:"var(--nextui--tableBodyEmptySpaceHeight)"},style:o({"--nextui--tableBodyEmptySpaceHeight":L?"var(--nextui-space-10)":`calc(${E-l} * var(--nextui-space-14))`},(null==N?void 0:N.style)||{})})})}),[b.columnCount,A,E,L]);return h(n,{as:"tbody",className:r("nextui-table-body",N.className),css:{position:"relative",...N.css,...null==(H=b.body)||null==(P=H.props)?void 0:P.css},isInfinityScroll:L,onScroll:l=>{if(!L)return;const e=l.target;var o,t;e.scrollHeight-(e.scrollTop+40)<=e.clientHeight&&!M&&(null==(o=b.body)||null==(t=o.props)||null==t.onLoadMore||t.onLoadMore())},...N,children:[l,null==A?void 0:A.map((l=>l.hasChildNodes?p(s,{"aria-hidden":"false",item:l,state:y,children:[...l.childNodes].map((l=>{var e;return null!=l&&null!=(e=l.props)&&e.isSelectionCell?p(c,{animated:g,cell:l,color:x,state:y},null==l?void 0:l.key):p(d,{cell:l,isStatic:S,state:y},null==l?void 0:l.key)}))},null==l?void 0:l.key):null)),!v&&M&&p(a,{"aria-hidden":"true",className:"nextui-table-hidden-row",isAbsolute:!L,isAtEnd:A.length>0,role:"row",children:p(i,{"aria-hidden":"true",colSpan:b.columnCount,children:p(t,{color:x})})}),I]})};b.displayName="NextUI.TableBody",b.toString=()=>".nextui-table-body";export default b;
|
package/esm/table/table-cell.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from"react";import{useTableCell as o}from"@react-aria/table";import{useFocusRing as r}from"@react-aria/focus";import{mergeProps as e}from"@react-aria/utils";import s from"../utils/clsx";import{useDOMRef as i}from"../utils/dom";import{StyledTableCell as a}from"./table.styles";import{jsx as l}from"react/jsx-runtime";const c=t.forwardRef((({cell:t,state:c,isStatic:m,...p},n)=>{const f=i(n),{gridCellProps:u}=o({node:t},c,f),{isFocusVisible:d,focusProps:b}=r(),x=m?{...u,onMouseDown:t=>t.stopPropagation(),onPointerDown:t=>t.stopPropagation()}:u;return l(a,{ref:f,className:s("nextui-table-cell",p.className),css:t.props.css,isFocusVisible:d,isStatic:m,...e(x,b,p),children:t.rendered})}));c.displayName="NextUI.TableCell",c.toString=()=>".nextui-table-cell";export default c;
|
package/esm/table/table.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{
|
|
1
|
+
import e,{useMemo as o}from"react";import{useTable as t}from"@react-aria/table";import{useTableState as r}from"@react-stately/table";import{mergeProps as i}from"@react-aria/utils";import{Spacer as a}from"../index";import{pickSingleChild as l}from"../utils/collections";import n from"../utils/with-defaults";import s from"../utils/clsx";import{useDOMRef as m}from"../utils/dom";import c from"./table-row-group";import d from"./table-column-header";import h from"./table-header-row";import p from"./table-select-all-checkbox";import u from"./table-pagination";import b from"./table-footer";import f from"./table-body";import{StyledTable as x,StyledTableContainer as g}from"./table.styles";import w from"./table-context";import{isInfinityScroll as v,hasPaginationChild as y}from"./utils";import{jsx as P}from"react/jsx-runtime";import{jsxs as k}from"react/jsx-runtime";const N=e.forwardRef(((n,N)=>{const{css:S,selectionMode:C,selectionBehavior:j,hideLoading:M,children:L,shadow:B,color:I,animated:R,borderWeight:W,bordered:F,hoverable:T,sticked:U,containerCss:V,className:q,...z}=n,[A,D]=l(L,u),{hasPagination:E,rowsPerPage:G}=y(L,u),H=r({...n,children:A,showSelectionCheckboxes:void 0!==n.showSelectionCheckboxes?n.showSelectionCheckboxes:"multiple"===C&&"replace"!==j}),J=m(N),{collection:K}=H,{gridProps:O}=t(n,H,J),Q=e.useMemo((()=>({collection:K,color:I,animated:R,rowsPerPage:G})),[K,R,I,G]),X=o((()=>!("none"===C&&!T)),[C,T]);return P(w.Provider,{defaultValues:Q,children:P(g,{borderWeight:W,bordered:F,className:"nextui-table-container",css:V,shadow:B,children:k(x,{ref:J,animated:R,className:s("nextui-table",q),color:I,css:S,hasPagination:E,hoverable:X,isMultiple:"multiple"===C,shadow:B,...i(O,z),children:[k(c,{as:"thead",isFixed:v(K),children:[K.headerRows.map((e=>P(h,{item:e,state:H,children:[...e.childNodes].map((e=>{var o;return null!=e&&null!=(o=e.props)&&o.isSelectionCell?P(p,{animated:R,color:I,column:e,state:H},null==e?void 0:e.key):P(d,{animated:R,column:e,state:H},null==e?void 0:e.key)}))},null==e?void 0:e.key))),!U&&P(a,{as:"tr",className:"nextui-table-hidden-row",y:.4})]}),P(f,{animated:R,collection:K,color:I,hasPagination:E,hideLoading:M,isStatic:!X,state:H}),E&&k(b,{children:[P(a,{as:"tr",className:"nextui-table-hidden-row",y:.6}),P("tr",{role:"row",children:P("th",{colSpan:K.columnCount,role:"columnheader",tabIndex:-1,children:D})})]})]})})})}));N.displayName="NextUI.Table",N.toString=()=>".nextui-table";export default n(N,{animated:!0,hideLoading:!1,selectionMode:"none",selectionBehavior:"toggle"});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as e}from"../theme/stitches.config";import{cssFocusVisible as t}from"../theme/shared-css";export const StyledTableHeaderRow=e("tr",{ov:"visible"});export const StyledTableColumnHeader=e("th",{height:"$14",cursor:"default",bg:"$accents0",color:"$accents7",fontSize:"$xs",textAlign:"left",position:"relative","@motion":{transition:"none"},"&:first-child":{pl:"$8",btlr:"$md",bblr:"$md"},"&:last-child":{pr:"$8",btrr:"$md",bbrr:"$md"},variants:{align:{start:{textAlign:"left"},center:{textAlign:"center"},end:{textAlign:"right"}},animated:{false:{transition:"none"}},allowsSorting:{true:{transition:"background 0.25s ease 0s, color 0.25s ease 0s",cursor:"pointer","@motion":{transition:"none"},"&:hover":{color:"$accents8",bg:"$accents1"}}}},defaultVariants:{align:"left",animated:!0},compoundVariants:[{animated:!1,allowsSorting:!0,css:{transition:"none"}}]},t);export const StyledTableHeaderCell=e(StyledTableColumnHeader,t);export const StyledTableFooter=e("tfoot",{height:"$14",variants:{align:{start:{textAlign:"left"},center:{textAlign:"center"},end:{textAlign:"right"}}},defaultVariants:{align:"right"}});export const StyledBaseTableCell=e("td",{});export const StyledTableCell=e(StyledBaseTableCell,{position:"relative",userSelect:"none",py:"$5",pr:"$5",zIndex:"$2",ov:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&:first-child":{pl:"$8"},"&:last-child":{pr:"$8"},"&:before":{zIndex:"-$1",transition:"background 0.25s ease 0s, opacity 0.25s ease 0s",content:'""',position:"absolute",size:"100%",top:0,left:0,opacity:0,transform:"translateZ(0)",backfaceVisibility:"hidden"},variants:{align:{start:{textAlign:"left"},center:{textAlign:"center"},end:{textAlign:"right"}}}},t);export const StyledTableRow=e("tr",{ov:"visible",color:"$text",variants:{isDisabled:{true:{color:"$accents3",pointerEvents:"none",cursor:"not-allowed"}},isSelected:{true:{color:"$$tableRowTextColor",[`& ${StyledTableCell}:before`]:{opacity:1,bg:"$$tableRowColor"}}}}},t);export const StyledTableRowGroup=e("thead",{variants:{isFixed:{true:{display:"table",width:"100%",tableLayout:"fixed"}},isInfinityScroll:{true:{display:"block",height:"100%",overflow:"auto",[`& ${StyledTableRow}`]:{display:"table",width:"100%",tableLayout:"fixed"}}}},defaultVariants:{isInfinityScroll:!1}});export const StyledTableLoadingRow=e("tr",{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",height:"calc(100% - $space$14)",variants:{isAtEnd:{true:{height:"$space$18"}},isAbsolute:{true:{position:"absolute",left:"0",top:"$10"}}}});export const StyledTable=e("table",{borderCollapse:"separate",borderSpacing:0,width:"100%",p:"$md $sm","@motion":{[`& ${StyledTableCell}:before`]:{transition:"none"}},variants:{animated:{false:{[`& ${StyledTableCell}:before`]:{transition:"none"}}},color:{primary:{$$tableRowColor:"$colors$primaryLight",$$tableRowTextColor:"$colors$primaryLightContrast"},secondary:{$$tableRowColor:"$colors$secondaryLight",$$tableRowTextColor:"$colors$secondaryLightContrast"},success:{$$tableRowColor:"$colors$successLight",$$tableRowTextColor:"$colors$successLightContrast"},warning:{$$tableRowColor:"$colors$warningLight",$$tableRowTextColor:"$colors$warningLightContrast"},error:{$$tableRowColor:"$colors$errorLight",$$tableRowTextColor:"$colors$errorLightContrast"}},striped:{true:{[`& ${StyledTableRow}[aria-selected=false]:nth-child(even)`]:{[`& ${StyledTableCell}`]:{bg:"$accents0"}},[`& ${StyledTableRow}:nth-child(even)`]:{[`& ${StyledTableCell}:first-child`]:{br:"$lg 0 0 $lg"},[`& ${StyledTableCell}:last-child`]:{br:"0 $lg $lg 0"}}}},sticked:{true:{p:0,[`& ${StyledTableColumnHeader}:first-child`]:{br:"$lg 0 0 0"},[`& ${StyledTableColumnHeader}:last-child`]:{br:"0 $lg 0 0"}}},lineWeight:{light:{$$tableLineWeight:"$borderWeights$light"},normal:{$$tableLineWeight:"$borderWeights$normal"},bold:{$$tableLineWeight:"$borderWeights$bold"},extrabold:{$$tableLineWeight:"$borderWeights$extrabold"},black:{$$tableLineWeight:"$borderWeights$black"}},headerLined:{true:{[`& ${StyledTableColumnHeader}`]:{position:"relative",bg:"transparent","&:after":{content:"",position:"absolute",left:0,right:0,bottom:0,height:"calc($$tableLineWeight * 1.5)",bg:"$accents1"},"&:first-child":{ml:"$12",br:"0","&:after":{left:"$space$md"}},"&:last-child":{br:"0","&:after":{right:"$space$md"}}}}},lined:{true:{[`& ${StyledTableRow}:not(:last-child)`]:{position:"relative",[`& ${StyledTableCell}:after`]:{content:"",position:"absolute",bottom:0,left:0,right:0,height:"$$tableLineWeight",bg:"$border"},[`& ${StyledTableCell}:first-child`]:{"&:after":{left:"$space$md"}},[`& ${StyledTableCell}:last-child`]:{"&:after":{right:"$space$md"}}},[`& ${StyledTableRow}[aria-selected=true]:not(last-child)`]:{[`& ${StyledTableCell}:after`]:{bg:"$$tableRowTextColor",opacity:.3}}}},fixed:{true:{tableLayout:"fixed"}},hoverable:{true:{[`& ${StyledTableCell}:first-child`]:{br:"$md 0 0 $md"},[`& ${StyledTableCell}:last-child`]:{br:"0 $md $md 0"},[`& ${StyledTableRow}`]:{cursor:"pointer"},[`& ${StyledTableRow}[aria-selected=false]`]:{"&:hover":{[`& ${StyledTableCell}:before`]:{opacity:1,bg:"$accents0"}}},[`& ${StyledTableRow}[aria-selected=true]`]:{"&:hover":{[`& ${StyledTableCell}:before`]:{opacity:.8}}}}
|
|
1
|
+
import{styled as e}from"../theme/stitches.config";import{cssFocusVisible as t}from"../theme/shared-css";export const StyledTableHeaderRow=e("tr",{ov:"visible"});export const StyledTableColumnHeader=e("th",{height:"$14",cursor:"default",bg:"$accents0",color:"$accents7",fontSize:"$xs",textAlign:"left",position:"relative","@motion":{transition:"none"},"&:first-child":{pl:"$8",btlr:"$md",bblr:"$md"},"&:last-child":{pr:"$8",btrr:"$md",bbrr:"$md"},variants:{align:{start:{textAlign:"left"},center:{textAlign:"center"},end:{textAlign:"right"}},animated:{false:{transition:"none"}},allowsSorting:{true:{transition:"background 0.25s ease 0s, color 0.25s ease 0s",cursor:"pointer","@motion":{transition:"none"},"&:hover":{color:"$accents8",bg:"$accents1"}}}},defaultVariants:{align:"left",animated:!0},compoundVariants:[{animated:!1,allowsSorting:!0,css:{transition:"none"}}]},t);export const StyledTableHeaderCell=e(StyledTableColumnHeader,t);export const StyledTableFooter=e("tfoot",{height:"$14",variants:{align:{start:{textAlign:"left"},center:{textAlign:"center"},end:{textAlign:"right"}}},defaultVariants:{align:"right"}});export const StyledBaseTableCell=e("td",{});export const StyledTableCell=e(StyledBaseTableCell,{position:"relative",userSelect:"none",cursor:"default",py:"$5",pr:"$5",zIndex:"$2",ov:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&:first-child":{pl:"$8"},"&:last-child":{pr:"$8"},"&:before":{zIndex:"-$1",transition:"background 0.25s ease 0s, opacity 0.25s ease 0s",content:'""',position:"absolute",size:"100%",top:0,left:0,opacity:0,transform:"translateZ(0)",backfaceVisibility:"hidden"},variants:{align:{start:{textAlign:"left"},center:{textAlign:"center"},end:{textAlign:"right"}},isStatic:{true:{cursor:"text",userSelect:"text"}}}},t);export const StyledTableRow=e("tr",{ov:"visible",color:"$text",variants:{isDisabled:{true:{color:"$accents3",pointerEvents:"none",cursor:"not-allowed"}},isSelected:{true:{color:"$$tableRowTextColor",[`& ${StyledTableCell}:before`]:{opacity:1,bg:"$$tableRowColor"}}}}},t);export const StyledTableRowGroup=e("thead",{variants:{isFixed:{true:{display:"table",width:"100%",tableLayout:"fixed"}},isInfinityScroll:{true:{display:"block",height:"100%",overflow:"auto",pb:"$10",[`& ${StyledTableRow}`]:{display:"table",width:"100%",tableLayout:"fixed"}}}},defaultVariants:{isInfinityScroll:!1}});export const StyledTableLoadingRow=e("tr",{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",height:"calc(100% - $space$14)",variants:{isAtEnd:{true:{height:"$space$18"}},isAbsolute:{true:{position:"absolute",left:"0",top:"$10"}}}});export const StyledTable=e("table",{borderCollapse:"separate",borderSpacing:0,width:"100%",p:"$md $sm","@motion":{[`& ${StyledTableCell}:before`]:{transition:"none"}},variants:{animated:{false:{[`& ${StyledTableCell}:before`]:{transition:"none"}}},color:{primary:{$$tableRowColor:"$colors$primaryLight",$$tableRowTextColor:"$colors$primaryLightContrast"},secondary:{$$tableRowColor:"$colors$secondaryLight",$$tableRowTextColor:"$colors$secondaryLightContrast"},success:{$$tableRowColor:"$colors$successLight",$$tableRowTextColor:"$colors$successLightContrast"},warning:{$$tableRowColor:"$colors$warningLight",$$tableRowTextColor:"$colors$warningLightContrast"},error:{$$tableRowColor:"$colors$errorLight",$$tableRowTextColor:"$colors$errorLightContrast"}},striped:{true:{[`& ${StyledTableRow}[aria-selected=false]:nth-child(even)`]:{[`& ${StyledTableCell}`]:{bg:"$accents0"}},[`& ${StyledTableRow}:nth-child(even)`]:{[`& ${StyledTableCell}:first-child`]:{br:"$lg 0 0 $lg"},[`& ${StyledTableCell}:last-child`]:{br:"0 $lg $lg 0"}}}},sticked:{true:{p:0,[`& ${StyledTableColumnHeader}:first-child`]:{br:"$lg 0 0 0"},[`& ${StyledTableColumnHeader}:last-child`]:{br:"0 $lg 0 0"}}},lineWeight:{light:{$$tableLineWeight:"$borderWeights$light"},normal:{$$tableLineWeight:"$borderWeights$normal"},bold:{$$tableLineWeight:"$borderWeights$bold"},extrabold:{$$tableLineWeight:"$borderWeights$extrabold"},black:{$$tableLineWeight:"$borderWeights$black"}},headerLined:{true:{[`& ${StyledTableColumnHeader}`]:{position:"relative",bg:"transparent","&:after":{content:"",position:"absolute",left:0,right:0,bottom:0,height:"calc($$tableLineWeight * 1.5)",bg:"$accents1"},"&:first-child":{ml:"$12",br:"0","&:after":{left:"$space$md"}},"&:last-child":{br:"0","&:after":{right:"$space$md"}}}}},lined:{true:{[`& ${StyledTableRow}:not(:last-child)`]:{position:"relative",[`& ${StyledTableCell}:after`]:{content:"",position:"absolute",bottom:0,left:0,right:0,height:"$$tableLineWeight",bg:"$border"},[`& ${StyledTableCell}:first-child`]:{"&:after":{left:"$space$md"}},[`& ${StyledTableCell}:last-child`]:{"&:after":{right:"$space$md"}}},[`& ${StyledTableRow}[aria-selected=true]:not(last-child)`]:{[`& ${StyledTableCell}:after`]:{bg:"$$tableRowTextColor",opacity:.3}}}},fixed:{true:{tableLayout:"fixed"}},hoverable:{true:{[`& ${StyledTableCell}:first-child`]:{br:"$md 0 0 $md"},[`& ${StyledTableCell}:last-child`]:{br:"0 $md $md 0"},[`& ${StyledTableRow}`]:{cursor:"pointer"},[`& ${StyledTableRow}[aria-selected=false]`]:{"&:hover":{[`& ${StyledTableCell}:before`]:{opacity:1,bg:"$accents0"}}},[`& ${StyledTableRow}[aria-selected=true]`]:{"&:hover":{[`& ${StyledTableCell}:before`]:{opacity:.8}}}}},isMultiple:{true:{}},hasPagination:{true:{}},shadow:{true:{}},compact:{true:{[`& ${StyledTableCell}`]:{py:"$1"},[`& ${StyledTableColumnHeader}`]:{height:"$12","&:first-child":{br:"$sm 0 0 $sm"},"&:last-child":{br:"0 $sm $sm 0"}}}}},compoundVariants:[{isMultiple:!0,hoverable:!0,css:{[`& ${StyledTableRow}:not(:first-child):not(:last-child)`]:{[`& ${StyledTableCell}:first-child`]:{br:0},[`& ${StyledTableCell}:last-child`]:{br:0}},[`& ${StyledTableRow}:first-child`]:{[`& ${StyledTableCell}:first-child`]:{br:"$md 0 0 0"},[`& ${StyledTableCell}:last-child`]:{br:"0 $md 0 0"}},[`& ${StyledTableRow}:last-child`]:{[`& ${StyledTableCell}:first-child`]:{br:"0 0 0 $md"},[`& ${StyledTableCell}:last-child`]:{br:"0 0 $md 0"}}}},{isMultiple:!0,hoverable:!0,sticked:!0,css:{[`& ${StyledTableRow}:first-child`]:{[`& ${StyledTableCell}:first-child`]:{br:"0"},[`& ${StyledTableCell}:last-child`]:{br:"0"}}}},{compact:!0,shadow:!0,css:{p:"$md $sm"}},{compact:!0,sticked:!0,css:{p:0}},{sticked:!0,isMultiple:!1,hoverable:!0,hasPagination:!1,css:{[`& ${StyledTableRow}:not(:last-child)`]:{[`& ${StyledTableCell}`]:{br:"0"}},[`& ${StyledTableRow}:last-child`]:{[`& ${StyledTableCell}:first-child`]:{br:"0 0 0 $md"},[`& ${StyledTableCell}:last-child`]:{br:"0 0 $md 0"}}}},{sticked:!0,isMultiple:!1,hoverable:!0,hasPagination:!0,css:{[`& ${StyledTableRow}`]:{[`& ${StyledTableCell}`]:{br:"0"}}}},{sticked:!0,hasPagination:!0,css:{pb:"$5"}},{sticked:!0,hasPagination:!0,isMultiple:!0,hoverable:!0,css:{[`& ${StyledTableRow}:last-child`]:{[`& ${StyledTableCell}:first-child`]:{br:"0"},[`& ${StyledTableCell}:last-child`]:{br:"0"}}}}],defaultVariants:{sticked:!1,color:"primary",lineWeight:"light"}});export const StyledTableContainer=e("div",{display:"flex",flexDirection:"column",br:"$xl",overflowX:"auto",overflowY:"hidden",variants:{shadow:{true:{bs:"$md"}},bordered:{true:{borderStyle:"solid",borderColor:"$border"},false:{bw:0}},borderWeight:{light:{bw:"$light"},normal:{bw:"$normal"},bold:{bw:"$bold"},extrabold:{bw:"$extrabold"},black:{bw:"$black"}}},defaultVariants:{shadow:!0,borderWeight:"normal"}});
|
package/esm/textarea/textarea.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useRef as t,useImperativeHandle as r,useLayoutEffect as s}from"react";import o from"../utils/with-defaults";import i from"../input";import n from"../use-resize";import{warn as a}from"../utils/console";import{excludedInputPropsForTextarea as m}from"../utils/prop-types";import{__DEV__ as u}from"../utils/assertion";import{calculateNodeHeight as c,getSizingData as l}from"./utils";import{jsx as p}from"react/jsx-runtime";const f=e.forwardRef(((o,f)=>{const x=t(null),h=e.useRef(0),d=e.useRef(),{cacheMeasurements:g,rows:y,maxRows:w,minRows:R,onChange:H,onHeightChange:j,css:v,...C}=o;Object.keys(C).forEach((e=>{m.indexOf(e)>-1&&delete C[e]}));const P=void 0!==C.value;u&&C.style&&("maxHeight"in C.style&&a("Using `style.maxHeight` for <Textarea/> is not supported. Please use `maxRows`."),"minHeight"in C.style&&a("Using `style.minHeight` for <Textarea/> is not supported. Please use `minRows`.")),r(f,(()=>x.current));const T=()=>{const e=x.current,t=g&&d.current?d.current:l(e);if(!t)return;d.current=t;const[r,s]=c(t,e.value||e.placeholder||"x",y||R,y||w);h.current!==r&&(h.current=r,e.style.setProperty("height",`${r}px`,"important"),j&&j(r,{rowHeight:s}))};return"undefined"!=typeof document&&(s(T),n(T)),p(i,{ref:x,as:"textarea",css:
|
|
1
|
+
import e,{useRef as t,useImperativeHandle as r,useLayoutEffect as s}from"react";import o from"../utils/with-defaults";import i from"../input";import n from"../use-resize";import{warn as a}from"../utils/console";import{excludedInputPropsForTextarea as m}from"../utils/prop-types";import{__DEV__ as u}from"../utils/assertion";import{calculateNodeHeight as c,getSizingData as l}from"./utils";import{jsx as p}from"react/jsx-runtime";const f=e.forwardRef(((o,f)=>{const x=t(null),h=e.useRef(0),d=e.useRef(),{cacheMeasurements:g,rows:y,maxRows:w,minRows:R,onChange:H,onHeightChange:j,css:v,...C}=o;Object.keys(C).forEach((e=>{m.indexOf(e)>-1&&delete C[e]}));const P=void 0!==C.value;u&&C.style&&("maxHeight"in C.style&&a("Using `style.maxHeight` for <Textarea/> is not supported. Please use `maxRows`."),"minHeight"in C.style&&a("Using `style.minHeight` for <Textarea/> is not supported. Please use `minRows`.")),r(f,(()=>x.current));const T=()=>{const e=x.current,t=g&&d.current?d.current:l(e);if(!t)return;d.current=t;const[r,s]=c(t,e.value||e.placeholder||"x",y||R,y||w);h.current!==r&&(h.current=r,e.style.setProperty("height",`${r}px`,"important"),j&&j(r,{rowHeight:s}))};return"undefined"!=typeof document&&(s(T),n(T)),p(i,{ref:x,as:"textarea",css:v,onChange:e=>{P||T(),H&&H(e)},...C})}));u&&(f.displayName="NextUI.Textarea"),f.toString=()=>".nextui-textarea";export default o(f,{minRows:3,maxRows:6,cacheMeasurements:!0,initialValue:""});
|
package/esm/theme/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../utils/clsx";import{rgbToRgba as t,hexToRGBA as l}from"../utils/color";import o from"./common";import r from"./light-theme";export const getTokenValue=(e,r,n=1)=>{if("undefined"==typeof document||!e)return"";let s=getComputedStyle(document.documentElement);const c=`--${o.prefix}-${e}-${r}`,u=s.getPropertyValue(c);if(u&&u.includes("var")&&getTokenValue(e,u),u&&1!==n){if(u.includes("rgb"))return t(u,n);if(u.includes("#"))return l(u,n)}return u};export const getDocumentCSSTokens=()=>{const e=[...Object.keys(o.theme.colors),...Object.keys(r.colors)],t=Object.keys(r.shadows);return{colors:e.reduce(((e,t)=>{const l=getTokenValue("colors",t);return l&&(e[t]={prefix:o.prefix,scale:"colors",token:t,value:l}),e}),{}),shadows:t.reduce(((e,t)=>{const l=getTokenValue("shadows",t);return l&&(e[t]={prefix:o.prefix,scale:"shadows",token:t,value:l}),e}),{})}};export const getDocumentTheme=e=>{var t;const l=(null==e||null==(t=e.getAttribute("style"))?void 0:t.split(";").map((e=>e.trim())).filter((e=>e.includes("color-scheme"))))||[],o=l.length>0?l[0].replace("color-scheme: ","").replace(";",""):"";return(null==e?void 0:e.getAttribute("data-theme"))||o};export const getThemeName=e=>"string"==typeof e&&null!=e&&e.includes("-theme")?null==e?void 0:e.replace("-theme",""):e;export const changeTheme=t=>{var l,o;if(!document)return;const r=document.documentElement,n=(null==r||null==(l=r.getAttribute("class"))?void 0:l.split(" ").filter((e=>!e.includes("theme")&&!e.includes("light")&&!e.includes("dark"))))||[],s=(null==r||null==(o=r.getAttribute("style"))?void 0:o.split(";").filter((e=>!e.includes("color-scheme")&&e.length)).map((e=>`${e};`)))||[];null==r||r.setAttribute("class",e(n,`${
|
|
1
|
+
import e from"../utils/clsx";import{rgbToRgba as t,hexToRGBA as l}from"../utils/color";import o from"./common";import r from"./light-theme";export const getTokenValue=(e,r,n=1)=>{if("undefined"==typeof document||!e)return"";let s=getComputedStyle(document.documentElement);const c=`--${o.prefix}-${e}-${r}`,u=s.getPropertyValue(c);if(u&&u.includes("var")&&getTokenValue(e,u),u&&1!==n){if(u.includes("rgb"))return t(u,n);if(u.includes("#"))return l(u,n)}return u};export const getDocumentCSSTokens=()=>{const e=[...Object.keys(o.theme.colors),...Object.keys(r.colors)],t=Object.keys(r.shadows);return{colors:e.reduce(((e,t)=>{const l=getTokenValue("colors",t);return l&&(e[t]={prefix:o.prefix,scale:"colors",token:t,value:l}),e}),{}),shadows:t.reduce(((e,t)=>{const l=getTokenValue("shadows",t);return l&&(e[t]={prefix:o.prefix,scale:"shadows",token:t,value:l}),e}),{})}};export const getDocumentTheme=e=>{var t;const l=(null==e||null==(t=e.getAttribute("style"))?void 0:t.split(";").map((e=>e.trim())).filter((e=>e.includes("color-scheme"))))||[],o=l.length>0?l[0].replace("color-scheme: ","").replace(";",""):"";return(null==e?void 0:e.getAttribute("data-theme"))||o};export const getThemeName=e=>"string"==typeof e&&null!=e&&e.includes("-theme")?null==e?void 0:e.replace("-theme",""):e;export const changeTheme=t=>{var l,o;if(!document)return;const r=document.documentElement,n=(null==r||null==(l=r.getAttribute("class"))?void 0:l.split(" ").filter((e=>!e.includes("theme")&&!e.includes("light")&&!e.includes("dark"))))||[],s=(null==r||null==(o=r.getAttribute("style"))?void 0:o.split(";").filter((e=>!e.includes("color-scheme")&&e.length)).map((e=>`${e};`)))||[],c=getThemeName(t);null==r||r.setAttribute("class",e(n,`${c}-theme`)),null==r||r.setAttribute("style",e(s,`color-scheme: ${c};`))};
|
package/esm/tooltip/tooltip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useEffect as o,useRef as t,useState as
|
|
1
|
+
import e,{useEffect as o,useRef as t,useState as i}from"react";import r from"../utils/with-defaults";import n from"../use-click-away";import l from"./tooltip-content";import{StyledTooltipTrigger as s}from"./tooltip.styles";import{jsx as a}from"react/jsx-runtime";import{jsxs as c}from"react/jsx-runtime";const m=({children:e,initialVisible:r,content:m,offset:d,placement:u,portalClassName:p,enterDelay:f,leaveDelay:h,trigger:w,rounded:b,animated:g,shadow:v,className:C,color:x,contentColor:k,onVisibleChange:y,hideArrow:D,css:N,triggerCss:j,onClick:M,keepMounted:V,visible:A,isDisabled:T,...B})=>{const E=t(),F=t(null),[I,K]=i(r),L={animated:g,visible:I,css:N,shadow:v,offset:d,placement:u,rounded:b,color:x,contentColor:k,hideArrow:D,parent:F,className:p},S=e=>{const o=()=>{clearTimeout(E.current),E.current=void 0},t=e=>{K(e),y(e),o()};o(),E.current=e?window.setTimeout((()=>t(!0)),f):window.setTimeout((()=>t(!1)),h)},U=e=>{"hover"===w&&S(e)};return n(F,(()=>"click"===w&&!V&&S(!1))),o((()=>{void 0!==A&&S(A)}),[A]),c(s,{ref:F,className:`nextui-tooltip-button ${C}`,css:j,role:"button",tabIndex:-1,onBlur:()=>U(!1),onClick:()=>{"click"===w&&S(!I),null==M||M()},onFocus:()=>U(!0),onKeyUp:()=>U(!0),onMouseEnter:()=>U(!0),onMouseLeave:()=>U(!1),...B,children:[e,m&&!T?a(l,{...L,children:m}):null]})};m.toString=()=>".nextui-tooltip";export default r(m,{initialVisible:!1,hideArrow:!1,animated:!0,shadow:!0,rounded:!1,keepMounted:!1,isDisabled:!1,trigger:"hover",enterDelay:0,leaveDelay:0,className:"",portalClassName:"",onVisibleChange:()=>{}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMemo as t,useCallback as r,useState as e,useEffect as n}from"react";import{range as i}from"../utils/numbers";export const DOTS="dots";export default({page:o,total:a,siblings:s=1,boundaries:u=1,initialPage:c=1,onChange:f})=>{const[m,g]=e(o||c),l=t=>{g(t),f&&f(t)};n((()=>{o&&o!==m&&g(o)}),[o]);const p=r((t=>{l(t<=0?1:t>a?a:t)}),[a]);return{range:t((()=>{if(2*s+3+2*u>=a)return i(1,a);const t=Math.max(m-s,u),r=Math.min(m+s,a-u),e=t>u+2,n=r<a-(u+1);if(!e&&n){return[...i(1,2*s+u+2),DOTS,...i(a-(u-1),a)]}if(e&&!n){const t=u+1+2*s;return[...i(1,u),DOTS,...i(a-t,a)]}return[...i(1,u),DOTS,...i(t,r),DOTS,...i(a-u+1,a)]}),[a,s,m]),active:m,setPage:p,next:()=>p(m+1),previous:()=>p(m-1),first:()=>p(1),last:()=>p(a)}};
|
|
1
|
+
import{useMemo as t,useCallback as r,useState as e,useEffect as n}from"react";import{range as i}from"../utils/numbers";export const DOTS="dots";export default({page:o,total:a,siblings:s=1,boundaries:u=1,initialPage:c=1,onChange:f})=>{const[m,g]=e(o||c),l=t=>{g(t),f&&f(t)};n((()=>{o&&o!==m&&g(o)}),[o]);const p=r((t=>{l(t<=0?1:t>a?a:t)}),[a,m]);return{range:t((()=>{if(2*s+3+2*u>=a)return i(1,a);const t=Math.max(m-s,u),r=Math.min(m+s,a-u),e=t>u+2,n=r<a-(u+1);if(!e&&n){return[...i(1,2*s+u+2),DOTS,...i(a-(u-1),a)]}if(e&&!n){const t=u+1+2*s;return[...i(1,u),DOTS,...i(a-t,a)]}return[...i(1,u),DOTS,...i(t,r),DOTS,...i(a-u+1,a)]}),[a,s,m]),active:m,setPage:p,next:()=>p(m+1),previous:()=>p(m-1),first:()=>p(1),last:()=>p(a)}};
|
package/esm/user/user.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useFocusRing as r}from"@react-aria/focus";import e from"react";import{mergeProps as
|
|
1
|
+
import{useFocusRing as r}from"@react-aria/focus";import e,{useMemo as s}from"react";import{mergeProps as o}from"@react-aria/utils";import{Avatar as t}from"../index";import{useDOMRef as i}from"../utils/dom";import{__DEV__ as a}from"../utils/assertion";import{StyledUser as n,StyledUserInfo as c,StyledUserName as m,StyledUserDesc as u}from"./user.styles";import{jsx as d}from"react/jsx-runtime";import{jsxs as l}from"react/jsx-runtime";export const User=e.forwardRef(((e,a)=>{const{as:p,css:f,src:x,text:b,name:N,children:U,altText:h,color:j,squared:z,bordered:g,size:q,description:y,zoomed:F,pointer:R,...V}=e,k=i(a),{isFocusVisible:v,focusProps:w}=r(),I=s((()=>{if("button"===p)return{borderRadius:"$xs",background:"none",appearance:"none",p:0,m:0,outline:"none",border:"none",cursor:"pointer"}}),[p]);return l(n,{ref:k,as:p,...o(V,w),css:{...I,...f},isFocusVisible:v,children:[d(t,{alt:h,bordered:g,className:"nextui-user-avatar",color:j,pointer:R,size:q,squared:z,src:x,text:b,zoomed:F}),l(c,{className:"nextui-user-info",children:[d(m,{className:"nextui-user-name",children:N}),d(u,{className:"nextui-user-desc",children:y||U})]})]})}));a&&(User.displayName="NextUI.User"),User.toString=()=>".nextui-user";export default User;
|
package/esm/user/user.styles.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as e}from"../theme/stitches.config";import{cssFocusVisible as t}from"../theme/shared-css";export const StyledUser=e("div",{d:"inline-flex",p:"0 $sm",jc:"center",ai:"center",w:"max-content",maxWidth:"100%",transition:"transform 250ms ease 0ms, box-shadow 0.25s ease 0s","@motion":{transition:"none"}},t);export const StyledUserInfo=e("div",{ml:"$sm",d:"inline-flex",fd:"column",alignItems:"flex-start",whiteSpace:"nowrap"});export const StyledUserName=e("span",{fontSize:"$sm",color:"$text",lh:"$sm",
|
|
1
|
+
import{styled as e}from"../theme/stitches.config";import{cssFocusVisible as t}from"../theme/shared-css";export const StyledUser=e("div",{d:"inline-flex",p:"0 $sm",jc:"center",ai:"center",w:"max-content",maxWidth:"100%",transition:"transform 250ms ease 0ms, box-shadow 0.25s ease 0s","@motion":{transition:"none"}},t);export const StyledUserInfo=e("div",{ml:"$sm",d:"inline-flex",fd:"column",alignItems:"flex-start",whiteSpace:"nowrap"});export const StyledUserName=e("span",{fontSize:"$sm",color:"$text",lh:"$sm",fontWeight:"$medium",maxW:"$60",to:"ellipsis",ov:"hidden"});export const StyledUserDesc=e("span",{fontSize:"$xs",color:"$accents7","*:first-child":{mt:0},"*:last-child":{mb:0}});
|
package/esm/utils/checkmark.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"react";import{styled as r,keyframes as e}from"../theme/stitches.config";import s from"./clsx";import{__DEV__ as o}from"./assertion";import{jsx as i}from"react/jsx-runtime";export const stroke=e({"100%":{strokeDashoffset:0}});const a=r("svg",{d:"block",path:{transformOrigin:"50% 50%",strokeDasharray:48,strokeDashoffset:48,animation:`${stroke} .25s cubic-bezier(0.650, 0.000, 0.450, 1.000) forwards`}}),c=t=>{const{width:r=24,height:e=24,size:o,strokeWidth:c=3,fill:m="currentColor",css:h,className:n}=t;return i(a,{className:s("nextui-checkmark",n),css:
|
|
1
|
+
import t from"react";import{styled as r,keyframes as e}from"../theme/stitches.config";import s from"./clsx";import{__DEV__ as o}from"./assertion";import{jsx as i}from"react/jsx-runtime";export const stroke=e({"100%":{strokeDashoffset:0}});const a=r("svg",{d:"block",path:{transformOrigin:"50% 50%",strokeDasharray:48,strokeDashoffset:48,animation:`${stroke} .25s cubic-bezier(0.650, 0.000, 0.450, 1.000) forwards`}}),c=t=>{const{width:r=24,height:e=24,size:o,strokeWidth:c=3,fill:m="currentColor",css:h,className:n}=t;return i(a,{className:s("nextui-checkmark",n),css:h,height:o||e,role:"img",viewBox:"0 0 52 52",width:o||r,xmlns:"http://www.w3.org/2000/svg",children:i("path",{d:"M14.1 27.2l7.1 7.2 16.7-16.8",fill:"none",stroke:m,strokeWidth:c})})};o&&(c.displayName="NextUI.Checkmark"),c.toString=()=>".nextui-checkmark";export default c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useEffect as
|
|
1
|
+
import e,{useEffect as t,useState as r,isValidElement as l,cloneElement as n}from"react";import{flushSync as c}from"react-dom";import i from"./clsx";const a=e=>{const{children:a,onExited:m,onEntered:o,className:s,childrenRef:u,enterTime:T=60,leaveTime:p=60,clearTime:d=60,visible:f=!1,name:$="transition",...v}=e,[N,x]=r(""),[h,E]=r(f);return t((()=>{const e=f?"enter":"leave",t=f?T:p;f&&!h&&E(!0),c((()=>x(`${$}-${e}`)));const r=setTimeout((()=>{x(`${$}-${e} ${$}-${e}-active`),"leave"===e?null==m||m():null==o||o(),clearTimeout(r)}),t),l=setTimeout((()=>{f||(x(""),E(!1)),clearTimeout(l)}),t+d);return()=>{clearTimeout(r),clearTimeout(l)}}),[f,h]),t((()=>{if(null==u||!u.current)return;const e=N.split(" "),t=u.current.className.split(" ").filter((e=>!e.includes($)));u.current.className=i(t,e)}),[u,N]),l(a)&&h?n(a,{...v,className:i(a.props.className,s,!(null!=u&&u.current)&&N)}):null};export default e.memo(a);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextui-org/react",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.11-dbg1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "🚀 Beautiful and modern React UI library.",
|
|
6
6
|
"homepage": "https://nextui.org",
|
|
@@ -31,35 +31,37 @@
|
|
|
31
31
|
"sideEffects": false,
|
|
32
32
|
"scripts": {},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@babel/runtime": "^7.
|
|
35
|
-
"@react-aria/button": "3.6.
|
|
36
|
-
"@react-aria/checkbox": "3.
|
|
37
|
-
"@react-aria/dialog": "3.
|
|
34
|
+
"@babel/runtime": "^7.20.1",
|
|
35
|
+
"@react-aria/button": "3.6.2",
|
|
36
|
+
"@react-aria/checkbox": "3.6.0",
|
|
37
|
+
"@react-aria/dialog": "3.4.0",
|
|
38
38
|
"@react-aria/focus": "3.7.0",
|
|
39
|
-
"@react-aria/i18n": "3.
|
|
40
|
-
"@react-aria/interactions": "3.
|
|
41
|
-
"@react-aria/label": "3.4.
|
|
42
|
-
"@react-aria/link": "3.3.
|
|
43
|
-
"@react-aria/menu": "3.6.
|
|
44
|
-
"@react-aria/overlays": "3.
|
|
45
|
-
"@react-aria/radio": "3.
|
|
39
|
+
"@react-aria/i18n": "3.6.1",
|
|
40
|
+
"@react-aria/interactions": "3.12.0",
|
|
41
|
+
"@react-aria/label": "3.4.2",
|
|
42
|
+
"@react-aria/link": "3.3.4",
|
|
43
|
+
"@react-aria/menu": "3.6.2",
|
|
44
|
+
"@react-aria/overlays": "3.11.0",
|
|
45
|
+
"@react-aria/radio": "3.4.0",
|
|
46
46
|
"@react-aria/ssr": "3.3.0",
|
|
47
|
-
"@react-aria/table": "3.
|
|
48
|
-
"@react-aria/utils": "3.
|
|
49
|
-
"@react-aria/visually-hidden": "3.
|
|
50
|
-
"@react-stately/checkbox": "3.
|
|
51
|
-
"@react-stately/
|
|
52
|
-
"@react-stately/
|
|
53
|
-
"@react-stately/
|
|
54
|
-
"@react-stately/
|
|
55
|
-
"@react-stately/
|
|
56
|
-
"@react-stately/
|
|
57
|
-
"@react-
|
|
58
|
-
"@react-
|
|
59
|
-
"@react-types/
|
|
60
|
-
"@react-types/
|
|
61
|
-
"@react-types/
|
|
62
|
-
"@react-types/
|
|
47
|
+
"@react-aria/table": "3.5.0",
|
|
48
|
+
"@react-aria/utils": "3.14.0",
|
|
49
|
+
"@react-aria/visually-hidden": "3.5.0",
|
|
50
|
+
"@react-stately/checkbox": "3.3.0",
|
|
51
|
+
"@react-stately/collections": "3.4.4",
|
|
52
|
+
"@react-stately/data": "3.7.0",
|
|
53
|
+
"@react-stately/menu": "3.4.2",
|
|
54
|
+
"@react-stately/overlays": "3.4.2",
|
|
55
|
+
"@react-stately/radio": "3.6.0",
|
|
56
|
+
"@react-stately/table": "3.5.0",
|
|
57
|
+
"@react-stately/toggle": "3.4.2",
|
|
58
|
+
"@react-stately/tree": "3.3.4",
|
|
59
|
+
"@react-types/button": "^3.6.2",
|
|
60
|
+
"@react-types/checkbox": "3.4.0",
|
|
61
|
+
"@react-types/grid": "3.1.4",
|
|
62
|
+
"@react-types/menu": "3.7.2",
|
|
63
|
+
"@react-types/overlays": "3.6.4",
|
|
64
|
+
"@react-types/shared": "3.15.0",
|
|
63
65
|
"@stitches/react": "1.2.8"
|
|
64
66
|
},
|
|
65
67
|
"peerDependencies": {
|
package/types/avatar/avatar.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { CSS } from "../theme/stitches.config";
|
|
1
2
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
+
import { ReactRef } from "../utils/refs";
|
|
3
4
|
import { AvatarVariantsProps } from "./avatar.styles";
|
|
4
5
|
import AvatarGroup from "./avatar-group";
|
|
5
6
|
interface Props {
|
|
@@ -8,6 +9,7 @@ interface Props {
|
|
|
8
9
|
icon?: React.ReactNode;
|
|
9
10
|
alt?: string;
|
|
10
11
|
className?: string;
|
|
12
|
+
imgRef?: ReactRef<HTMLImageElement>;
|
|
11
13
|
as?: keyof JSX.IntrinsicElements;
|
|
12
14
|
}
|
|
13
15
|
declare type NativeAttrs = Omit<Partial<React.ImgHTMLAttributes<unknown> & React.HTMLAttributes<unknown>>, keyof Props | "sizes">;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { CSS } from "../theme/stitches.config";
|
|
1
2
|
import React, { MouseEvent } from "react";
|
|
2
|
-
import { CSS } from "../theme/stitches.config";
|
|
3
3
|
import { BackdropVariantsProps } from "./backdrop.styles";
|
|
4
4
|
interface Props {
|
|
5
5
|
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
@@ -13,6 +13,7 @@ interface Props {
|
|
|
13
13
|
css?: CSS;
|
|
14
14
|
className?: string;
|
|
15
15
|
as?: keyof JSX.IntrinsicElements;
|
|
16
|
+
children?: React.ReactNode;
|
|
16
17
|
}
|
|
17
18
|
declare const defaultProps: {
|
|
18
19
|
onClick: () => void;
|
|
@@ -33,5 +34,5 @@ declare const _default: React.ComponentType<Partial<{
|
|
|
33
34
|
preventDefault: boolean;
|
|
34
35
|
opacity: number;
|
|
35
36
|
className: string;
|
|
36
|
-
}> & Omit<
|
|
37
|
+
}> & Omit<BackdropProps, "blur" | "opacity" | "visible" | "className" | "preventDefault" | "onClick" | "animated">>;
|
|
37
38
|
export default _default;
|
|
@@ -1075,7 +1075,7 @@ export declare const StyledBackdropContent: import("@stitches/react/types/styled
|
|
|
1075
1075
|
}>>;
|
|
1076
1076
|
export declare const StyledBackdropLayer: import("@stitches/react/types/styled-component").StyledComponent<"div", {
|
|
1077
1077
|
blur?: boolean | "true" | "false" | undefined;
|
|
1078
|
-
animated?: boolean | "false" | undefined;
|
|
1078
|
+
animated?: boolean | "true" | "false" | undefined;
|
|
1079
1079
|
}, {
|
|
1080
1080
|
xs: string;
|
|
1081
1081
|
sm: string;
|
|
@@ -16,6 +16,7 @@ interface Props {
|
|
|
16
16
|
borderWeight?: NormalWeights;
|
|
17
17
|
size?: NormalSizes;
|
|
18
18
|
color?: NormalColors;
|
|
19
|
+
children?: React.ReactNode;
|
|
19
20
|
}
|
|
20
21
|
declare const defaultProps: {
|
|
21
22
|
borderWeight: "light" | "normal" | "bold" | "extrabold" | "black" | undefined;
|
|
@@ -30,5 +31,11 @@ declare const _default: React.ComponentType<Partial<{
|
|
|
30
31
|
borderWeight: "light" | "normal" | "bold" | "extrabold" | "black" | undefined;
|
|
31
32
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
32
33
|
color: "default" | "primary" | "secondary" | "success" | "warning" | "error" | "gradient";
|
|
33
|
-
}> & Omit<
|
|
34
|
+
}> & Omit<Props & ButtonGroupVariantsProps & NativeAttrs & {
|
|
35
|
+
borderWeight: "light" | "normal" | "bold" | "extrabold" | "black" | undefined;
|
|
36
|
+
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
37
|
+
color: "default" | "primary" | "secondary" | "success" | "warning" | "error" | "gradient";
|
|
38
|
+
} & {
|
|
39
|
+
css?: CSS | undefined;
|
|
40
|
+
}, "color" | "size" | "borderWeight">>;
|
|
34
41
|
export default _default;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { VariantProps, CSS } from "../theme/stitches.config";
|
|
1
2
|
import React from "react";
|
|
2
|
-
import { VariantProps, CSS } from "../theme/stitches.config";
|
|
3
3
|
interface Props {
|
|
4
4
|
isRight?: boolean;
|
|
5
5
|
isSingle?: boolean;
|
|
6
6
|
className?: string;
|
|
7
|
+
children?: React.ReactNode;
|
|
7
8
|
}
|
|
8
9
|
declare const defaultProps: {
|
|
9
10
|
className: string;
|
|
@@ -1091,5 +1092,35 @@ export declare type ButtonIconProps = Props & typeof defaultProps & ButtonIconVa
|
|
|
1091
1092
|
};
|
|
1092
1093
|
declare const _default: React.ComponentType<Partial<{
|
|
1093
1094
|
className: string;
|
|
1094
|
-
}> & Omit<
|
|
1095
|
+
}> & Omit<Props & {
|
|
1096
|
+
className: string;
|
|
1097
|
+
} & import("@stitches/react/types/styled-component").TransformProps<{
|
|
1098
|
+
isAuto?: boolean | "true" | undefined;
|
|
1099
|
+
isRight?: boolean | "true" | undefined;
|
|
1100
|
+
isSingle?: boolean | "true" | undefined;
|
|
1101
|
+
isGradientButtonBorder?: boolean | "true" | undefined;
|
|
1102
|
+
}, {
|
|
1103
|
+
xs: string;
|
|
1104
|
+
sm: string;
|
|
1105
|
+
md: string;
|
|
1106
|
+
lg: string;
|
|
1107
|
+
xl: string;
|
|
1108
|
+
xsMin: string;
|
|
1109
|
+
smMin: string;
|
|
1110
|
+
mdMin: string;
|
|
1111
|
+
lgMin: string;
|
|
1112
|
+
xlMin: string;
|
|
1113
|
+
xsMax: string;
|
|
1114
|
+
smMax: string;
|
|
1115
|
+
mdMax: string;
|
|
1116
|
+
lgMax: string;
|
|
1117
|
+
xlMax: string;
|
|
1118
|
+
motion: string;
|
|
1119
|
+
safari: string;
|
|
1120
|
+
hover: string;
|
|
1121
|
+
dark: string;
|
|
1122
|
+
light: string;
|
|
1123
|
+
}> & {
|
|
1124
|
+
css?: CSS | undefined;
|
|
1125
|
+
}, "className">>;
|
|
1095
1126
|
export default _default;
|
package/types/button/button.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AriaButtonProps } from "@react-types/button";
|
|
2
|
+
import type { CSS } from "../theme/stitches.config";
|
|
2
3
|
import React, { PropsWithoutRef, RefAttributes } from "react";
|
|
3
|
-
import { CSS } from "../theme/stitches.config";
|
|
4
4
|
import { NormalColors } from "../utils/prop-types";
|
|
5
5
|
import { HTMLNextUIProps } from "../utils/system";
|
|
6
6
|
import ButtonGroup from "./button-group";
|