@nextui-org/react 1.0.0-beta.11 → 1.0.0-beta.12

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 CHANGED
@@ -7,7 +7,7 @@
7
7
  </br>
8
8
  <p align="center">
9
9
  <a href="https://github.com/jrgarciadev/nextui/blob/main/LICENSE">
10
- <img src="https://img.shields.io/apm/l/atomic-design-ui.svg?style=flat" alt="License">
10
+ <img src="https://img.shields.io/npm/l/@nextui-org/react?style=flat" alt="License">
11
11
  </a>
12
12
  <a href="https://codecov.io/gh/jrgarciadev/nextui">
13
13
  <img src="https://codecov.io/gh/jrgarciadev/nextui/branch/main/graph/badge.svg?token=QJF2QKR5N4" alt="codecov badge">
@@ -1 +1 @@
1
- exports.__esModule=!0,exports.default=exports.StyledButton=void 0;var r=require("../theme/stitches.config"),o=require("../theme/shared-css"),t=require("../utils/drip");const e=(0,r.styled)("button",{$$buttonBorderRadius:"$radii$md",$$buttonPressedScale:.97,dflex:"center",appearance:"none",boxSizing:"border-box",fontWeight:"$medium",us:"none",lineHeight:"$sm",ta:"center",whiteSpace:"nowrap",transition:"$button",position:"relative",overflow:"hidden",border:"none",cursor:"pointer",pe:"auto",p:0,br:"$$buttonBorderRadius","@motion":{transition:"none"},".nextui-button-text":{dflex:"center",zIndex:"$2","p, pre, div":{margin:0}},[`& ${t.StyledDrip}`]:{zIndex:"$1",".nextui-drip-filler":{opacity:.25,fill:"$accents2"}},variants:{bordered:{true:{bg:"transparent",borderStyle:"solid",color:"$text"}},ghost:{true:{}},color:{default:{bg:"$primary",color:"$primarySolidContrast"},primary:{bg:"$primary",color:"$primarySolidContrast"},secondary:{bg:"$secondary",color:"$secondarySolidContrast"},success:{bg:"$success",color:"$successSolidContrast"},warning:{bg:"$warning",color:"$warningSolidContrast"},error:{bg:"$error",color:"$errorSolidContrast"},gradient:{bg:"$gradient",color:"$primarySolidContrast"}},size:{xs:{$$buttonPadding:"$space$3",$$buttonBorderRadius:"$radii$xs",$$buttonHeight:"$space$10",px:"$3",height:"$$buttonHeight",lh:"$space$10",width:"auto",minWidth:"$20",fontSize:"$xs"},sm:{$$buttonPadding:"$space$5",$$buttonBorderRadius:"$radii$sm",$$buttonHeight:"$space$12",px:"$5",height:"$$buttonHeight",lh:"$space$14",width:"auto",minWidth:"$36",fontSize:"$sm"},md:{$$buttonPadding:"$space$7",$$buttonBorderRadius:"$radii$md",$$buttonHeight:"$space$14",px:"$7",height:"$$buttonHeight",lh:"$space$14",width:"auto",minWidth:"$48",fontSize:"$sm"},lg:{$$buttonPadding:"$space$9",$$buttonBorderRadius:"$radii$base",$$buttonHeight:"$space$16",px:"$9",height:"$$buttonHeight",lh:"$space$15",width:"auto",minWidth:"$60",fontSize:"$md"},xl:{$$buttonPadding:"$space$10",$$buttonBorderRadius:"$radii$xl",$$buttonHeight:"$space$18",px:"$10",height:"$$buttonHeight",lh:"$space$17",width:"auto",minWidth:"$72",fontSize:"$lg"}},borderWeight:{light:{bw:"$light",$$buttonBorderWeight:"$borderWeights$light"},normal:{bw:"$normal",$$buttonBorderWeight:"$borderWeights$normal"},bold:{bw:"$bold",$$buttonBorderWeight:"$borderWeights$bold"},extrabold:{bw:"$extrabold",$$buttonBorderWeight:"$borderWeights$extrabold"},black:{bw:"$black",$$buttonBorderWeight:"$borderWeights$black"}},flat:{true:{color:"$text"}},light:{true:{bg:"transparent",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{opacity:.8,fill:"$accents2"}}}},shadow:{true:{bs:"$sm"}},animated:{false:{transition:"none"}},auto:{true:{width:"auto",minWidth:"min-content"}},rounded:{true:{$$buttonBorderRadius:"$radii$pill"}},isPressed:{true:{}},isHovered:{true:{}},isChildLess:{true:{p:0,width:"$$buttonHeight",height:"$$buttonHeight"}}},compoundVariants:[{isPressed:!0,animated:!0,css:{transform:"scale($$buttonPressedScale)"}},{auto:!0,isChildLess:!1,size:"xs",css:{px:"$5",minWidth:"min-content"}},{auto:!0,isChildLess:!1,size:"sm",css:{px:"$8",minWidth:"min-content"}},{auto:!0,isChildLess:!1,size:"md",css:{px:"$9",minWidth:"min-content"}},{auto:!0,isChildLess:!1,size:"lg",css:{px:"$10",minWidth:"min-content"}},{auto:!0,isChildLess:!1,size:"xl",css:{px:"$11",minWidth:"min-content"}},{shadow:!0,color:"default",css:{normalShadow:"$primaryShadow"}},{shadow:!0,color:"primary",css:{normalShadow:"$primaryShadow"}},{shadow:!0,color:"secondary",css:{normalShadow:"$secondaryShadow"}},{shadow:!0,color:"warning",css:{normalShadow:"$warningShadow"}},{shadow:!0,color:"success",css:{normalShadow:"$successShadow"}},{shadow:!0,color:"error",css:{normalShadow:"$errorShadow"}},{shadow:!0,color:"gradient",css:{normalShadow:"$primaryShadow"}},{light:!0,color:"default",css:{bg:"transparent",color:"$text",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{opacity:.8,fill:"$primaryLightActive"}}}},{light:!0,color:"primary",css:{bg:"transparent",color:"$primary",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{opacity:.8,fill:"$primaryLightActive"}}}},{light:!0,color:"secondary",css:{bg:"transparent",color:"$secondary",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{opacity:.8,fill:"$secondaryLightActive"}}}},{light:!0,color:"warning",css:{bg:"transparent",color:"$warning",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{opacity:.8,fill:"$warningLightActive"}}}},{light:!0,color:"success",css:{bg:"transparent",color:"$success",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{opacity:.8,fill:"$successLightActive"}}}},{light:!0,color:"error",css:{bg:"transparent",color:"$error",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{opacity:.8,fill:"$errorLightActive"}}}},{bordered:!0,color:"default",css:{bg:"transparent",borderColor:"$primary",color:"$primary",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{fill:"$primary"}}}},{bordered:!0,color:"primary",css:{bg:"transparent",borderColor:"$primary",color:"$primary",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{fill:"$primary"}}}},{bordered:!0,color:"secondary",css:{bg:"transparent",borderColor:"$secondary",color:"$secondary",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{fill:"$secondary"}}}},{bordered:!0,color:"success",css:{bg:"transparent",borderColor:"$success",color:"$success",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{fill:"$success"}}}},{bordered:!0,color:"warning",css:{bg:"transparent",borderColor:"$warning",color:"$warning",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{fill:"$warning"}}}},{bordered:!0,color:"error",css:{bg:"transparent",borderColor:"$error",color:"$error",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{fill:"$error"}}}},{bordered:!0,color:"gradient",css:{bg:"transparent",color:"$text",padding:"$$buttonBorderWeight",bgClip:"content-box, border-box",borderColor:"$primary",backgroundImage:"linear-gradient($background, $background), $gradient",border:"none",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{fill:"$secondary"}}}},{ghost:!0,isHovered:!0,color:"default",css:{bg:"$primary",color:"$primarySolidContrast"}},{ghost:!0,isHovered:!0,color:"primary",css:{bg:"$primary",color:"$primarySolidContrast"}},{ghost:!0,isHovered:!0,color:"secondary",css:{bg:"$secondary",color:"$secondarySolidContrast"}},{ghost:!0,isHovered:!0,color:"success",css:{bg:"$success",color:"$successSolidContrast"}},{ghost:!0,isHovered:!0,color:"warning",css:{bg:"$warning",color:"$warningSolidContrast"}},{ghost:!0,isHovered:!0,color:"error",css:{bg:"$error",color:"$errorSolidContrast"}},{ghost:!0,color:"gradient",isHovered:!0,css:{bg:"$gradient",color:"$white"}},{flat:!0,color:"default",css:{bg:"$primaryLight",color:"$primaryLightContrast",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{opacity:.4,fill:"$primary"}}}},{flat:!0,color:"primary",css:{bg:"$primaryLight",color:"$primaryLightContrast",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{opacity:.4,fill:"$primary"}}}},{flat:!0,color:"secondary",css:{bg:"$secondaryLight",color:"$secondaryLightContrast",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{opacity:.4,fill:"$secondary"}}}},{flat:!0,color:"success",css:{bg:"$successLight",color:"$successLightContrast",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{opacity:.4,fill:"$success"}}}},{flat:!0,color:"warning",css:{bg:"$warningLight",color:"$warningLightContrast",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{opacity:.4,fill:"$warning"}}}},{flat:!0,color:"error",css:{bg:"$errorLight",color:"$errorLightContrast",[`& ${t.StyledDrip}`]:{".nextui-drip-filler":{opacity:.4,fill:"$error"}}}},{flat:!0,isHovered:!0,color:"default",css:{bg:"$primaryLightHover"}},{flat:!0,isHovered:!0,color:"primary",css:{bg:"$primaryLightHover"}},{flat:!0,isHovered:!0,color:"secondary",css:{bg:"$secondaryLightHover"}},{flat:!0,isHovered:!0,color:"success",css:{bg:"$successLightHover"}},{flat:!0,isHovered:!0,color:"warning",css:{bg:"$warningLightHover"}},{flat:!0,isHovered:!0,color:"error",css:{bg:"$errorLightHover"}},{flat:!0,isPressed:!0,color:"default",css:{bg:"$primaryLightActive"}},{flat:!0,isPressed:!0,color:"primary",css:{bg:"$primaryLightActive"}},{flat:!0,isPressed:!0,color:"secondary",css:{bg:"$secondaryLightActive"}},{flat:!0,isPressed:!0,color:"success",css:{bg:"$successLightActive"}},{flat:!0,isPressed:!0,color:"warning",css:{bg:"$warningLightActive"}},{flat:!0,isPressed:!0,color:"error",css:{bg:"$errorLightActive"}},{auto:!0,color:"gradient",bordered:!0,css:{".nextui-button-text":{px:"$$buttonPadding"},".nextui-button-icon":{ml:"$$buttonPadding"},".nextui-button-icon-right":{mr:"$$buttonPadding"},".nextui-button-text-left":{pl:0},".nextui-button-text-right":{pr:0}}},{rounded:!0,size:"xs",css:{br:"$pill"}},{rounded:!0,size:"sm",css:{br:"$pill"}},{rounded:!0,size:"md",css:{br:"$pill"}},{rounded:!0,size:"lg",css:{br:"$pill"}},{rounded:!0,size:"xl",css:{br:"$pill"}}],defaultVariants:{color:"default",borderWeight:"normal",animated:!0,size:"md"}},o.cssFocusVisible);exports.StyledButton=e;var i=e;exports.default=i;
1
+ exports.__esModule=!0,exports.default=exports.StyledButton=void 0;var r=require("../theme/stitches.config"),o=require("../theme/shared-css"),i=require("../utils/drip");const t=(0,r.styled)("button",{$$buttonBorderRadius:"$radii$md",$$buttonPressedScale:.97,dflex:"center",appearance:"none",boxSizing:"border-box",fontWeight:"$medium",us:"none",lineHeight:"$sm",ta:"center",whiteSpace:"nowrap",transition:"$button",position:"relative",overflow:"hidden",border:"none",cursor:"pointer",pe:"auto",p:0,br:"$$buttonBorderRadius","@motion":{transition:"none"},".nextui-button-text":{dflex:"center",zIndex:"$2","p, pre, div":{margin:0}},[`& ${i.StyledDrip}`]:{zIndex:"$1",".nextui-drip-filler":{opacity:.25,fill:"$accents2"}},variants:{bordered:{true:{bg:"transparent",borderStyle:"solid",color:"$text"}},ghost:{true:{}},color:{default:{bg:"$primary",color:"$primarySolidContrast"},primary:{bg:"$primary",color:"$primarySolidContrast"},secondary:{bg:"$secondary",color:"$secondarySolidContrast"},success:{bg:"$success",color:"$successSolidContrast"},warning:{bg:"$warning",color:"$warningSolidContrast"},error:{bg:"$error",color:"$errorSolidContrast"},gradient:{bg:"$gradient",color:"$primarySolidContrast"}},size:{xs:{$$buttonPadding:"$space$3",$$buttonBorderRadius:"$radii$xs",$$buttonHeight:"$space$10",px:"$3",height:"$$buttonHeight",lh:"$space$10",width:"auto",minWidth:"$20",fontSize:"$xs"},sm:{$$buttonPadding:"$space$5",$$buttonBorderRadius:"$radii$sm",$$buttonHeight:"$space$12",px:"$5",height:"$$buttonHeight",lh:"$space$14",width:"auto",minWidth:"$36",fontSize:"$sm"},md:{$$buttonPadding:"$space$7",$$buttonBorderRadius:"$radii$md",$$buttonHeight:"$space$14",px:"$7",height:"$$buttonHeight",lh:"$space$14",width:"auto",minWidth:"$48",fontSize:"$sm"},lg:{$$buttonPadding:"$space$9",$$buttonBorderRadius:"$radii$base",$$buttonHeight:"$space$16",px:"$9",height:"$$buttonHeight",lh:"$space$15",width:"auto",minWidth:"$60",fontSize:"$md"},xl:{$$buttonPadding:"$space$10",$$buttonBorderRadius:"$radii$xl",$$buttonHeight:"$space$18",px:"$10",height:"$$buttonHeight",lh:"$space$17",width:"auto",minWidth:"$72",fontSize:"$lg"}},borderWeight:{light:{bw:"$light",$$buttonBorderWeight:"$borderWeights$light"},normal:{bw:"$normal",$$buttonBorderWeight:"$borderWeights$normal"},bold:{bw:"$bold",$$buttonBorderWeight:"$borderWeights$bold"},extrabold:{bw:"$extrabold",$$buttonBorderWeight:"$borderWeights$extrabold"},black:{bw:"$black",$$buttonBorderWeight:"$borderWeights$black"}},flat:{true:{color:"$text"}},light:{true:{bg:"transparent",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{opacity:.8,fill:"$accents2"}}}},shadow:{true:{bs:"$sm"}},animated:{false:{transition:"none"}},auto:{true:{width:"auto",minWidth:"min-content"}},rounded:{true:{$$buttonBorderRadius:"$radii$pill"}},isPressed:{true:{}},isHovered:{true:{}},isChildLess:{true:{p:0,width:"$$buttonHeight",height:"$$buttonHeight"}},isFocusVisible:{true:{},false:{}}},compoundVariants:[{isPressed:!0,animated:!0,css:{transform:"scale($$buttonPressedScale)"}},{auto:!0,isChildLess:!1,size:"xs",css:{px:"$5",minWidth:"min-content"}},{auto:!0,isChildLess:!1,size:"sm",css:{px:"$8",minWidth:"min-content"}},{auto:!0,isChildLess:!1,size:"md",css:{px:"$9",minWidth:"min-content"}},{auto:!0,isChildLess:!1,size:"lg",css:{px:"$10",minWidth:"min-content"}},{auto:!0,isChildLess:!1,size:"xl",css:{px:"$11",minWidth:"min-content"}},{shadow:!0,isFocusVisible:!1,color:"default",css:{normalShadow:"$primaryShadow"}},{shadow:!0,isFocusVisible:!1,color:"primary",css:{normalShadow:"$primaryShadow"}},{shadow:!0,isFocusVisible:!1,color:"secondary",css:{normalShadow:"$secondaryShadow"}},{shadow:!0,isFocusVisible:!1,color:"warning",css:{normalShadow:"$warningShadow"}},{shadow:!0,isFocusVisible:!1,color:"success",css:{normalShadow:"$successShadow"}},{shadow:!0,isFocusVisible:!1,color:"error",css:{normalShadow:"$errorShadow"}},{shadow:!0,isFocusVisible:!1,color:"gradient",css:{normalShadow:"$primaryShadow"}},{light:!0,color:"default",css:{bg:"transparent",color:"$text",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{opacity:.8,fill:"$primaryLightActive"}}}},{light:!0,color:"primary",css:{bg:"transparent",color:"$primary",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{opacity:.8,fill:"$primaryLightActive"}}}},{light:!0,color:"secondary",css:{bg:"transparent",color:"$secondary",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{opacity:.8,fill:"$secondaryLightActive"}}}},{light:!0,color:"warning",css:{bg:"transparent",color:"$warning",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{opacity:.8,fill:"$warningLightActive"}}}},{light:!0,color:"success",css:{bg:"transparent",color:"$success",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{opacity:.8,fill:"$successLightActive"}}}},{light:!0,color:"error",css:{bg:"transparent",color:"$error",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{opacity:.8,fill:"$errorLightActive"}}}},{bordered:!0,color:"default",css:{bg:"transparent",borderColor:"$primary",color:"$primary",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{fill:"$primary"}}}},{bordered:!0,color:"primary",css:{bg:"transparent",borderColor:"$primary",color:"$primary",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{fill:"$primary"}}}},{bordered:!0,color:"secondary",css:{bg:"transparent",borderColor:"$secondary",color:"$secondary",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{fill:"$secondary"}}}},{bordered:!0,color:"success",css:{bg:"transparent",borderColor:"$success",color:"$success",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{fill:"$success"}}}},{bordered:!0,color:"warning",css:{bg:"transparent",borderColor:"$warning",color:"$warning",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{fill:"$warning"}}}},{bordered:!0,color:"error",css:{bg:"transparent",borderColor:"$error",color:"$error",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{fill:"$error"}}}},{bordered:!0,color:"gradient",css:{bg:"transparent",color:"$text",padding:"$$buttonBorderWeight",bgClip:"content-box, border-box",borderColor:"$primary",backgroundImage:"linear-gradient($background, $background), $gradient",border:"none",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{fill:"$secondary"}}}},{ghost:!0,isHovered:!0,color:"default",css:{bg:"$primary",color:"$primarySolidContrast"}},{ghost:!0,isHovered:!0,color:"primary",css:{bg:"$primary",color:"$primarySolidContrast"}},{ghost:!0,isHovered:!0,color:"secondary",css:{bg:"$secondary",color:"$secondarySolidContrast"}},{ghost:!0,isHovered:!0,color:"success",css:{bg:"$success",color:"$successSolidContrast"}},{ghost:!0,isHovered:!0,color:"warning",css:{bg:"$warning",color:"$warningSolidContrast"}},{ghost:!0,isHovered:!0,color:"error",css:{bg:"$error",color:"$errorSolidContrast"}},{ghost:!0,color:"gradient",isHovered:!0,css:{bg:"$gradient",color:"$white"}},{flat:!0,color:"default",css:{bg:"$primaryLight",color:"$primaryLightContrast",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{opacity:.4,fill:"$primary"}}}},{flat:!0,color:"primary",css:{bg:"$primaryLight",color:"$primaryLightContrast",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{opacity:.4,fill:"$primary"}}}},{flat:!0,color:"secondary",css:{bg:"$secondaryLight",color:"$secondaryLightContrast",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{opacity:.4,fill:"$secondary"}}}},{flat:!0,color:"success",css:{bg:"$successLight",color:"$successLightContrast",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{opacity:.4,fill:"$success"}}}},{flat:!0,color:"warning",css:{bg:"$warningLight",color:"$warningLightContrast",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{opacity:.4,fill:"$warning"}}}},{flat:!0,color:"error",css:{bg:"$errorLight",color:"$errorLightContrast",[`& ${i.StyledDrip}`]:{".nextui-drip-filler":{opacity:.4,fill:"$error"}}}},{flat:!0,isHovered:!0,color:"default",css:{bg:"$primaryLightHover"}},{flat:!0,isHovered:!0,color:"primary",css:{bg:"$primaryLightHover"}},{flat:!0,isHovered:!0,color:"secondary",css:{bg:"$secondaryLightHover"}},{flat:!0,isHovered:!0,color:"success",css:{bg:"$successLightHover"}},{flat:!0,isHovered:!0,color:"warning",css:{bg:"$warningLightHover"}},{flat:!0,isHovered:!0,color:"error",css:{bg:"$errorLightHover"}},{flat:!0,isPressed:!0,color:"default",css:{bg:"$primaryLightActive"}},{flat:!0,isPressed:!0,color:"primary",css:{bg:"$primaryLightActive"}},{flat:!0,isPressed:!0,color:"secondary",css:{bg:"$secondaryLightActive"}},{flat:!0,isPressed:!0,color:"success",css:{bg:"$successLightActive"}},{flat:!0,isPressed:!0,color:"warning",css:{bg:"$warningLightActive"}},{flat:!0,isPressed:!0,color:"error",css:{bg:"$errorLightActive"}},{auto:!0,color:"gradient",bordered:!0,css:{".nextui-button-text":{px:"$$buttonPadding"},".nextui-button-icon":{ml:"$$buttonPadding"},".nextui-button-icon-right":{mr:"$$buttonPadding"},".nextui-button-text-left":{pl:0},".nextui-button-text-right":{pr:0}}},{rounded:!0,size:"xs",css:{br:"$pill"}},{rounded:!0,size:"sm",css:{br:"$pill"}},{rounded:!0,size:"md",css:{br:"$pill"}},{rounded:!0,size:"lg",css:{br:"$pill"}},{rounded:!0,size:"xl",css:{br:"$pill"}}],defaultVariants:{color:"default",borderWeight:"normal",animated:!0,size:"md"}},o.cssFocusVisible);exports.StyledButton=t;var e=t;exports.default=e;
@@ -1 +1 @@
1
- var e=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.default=void 0;var t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=c(t);if(a&&a.has(e))return a.get(e);var r={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var i=l?Object.getOwnPropertyDescriptor(e,n):null;i&&(i.get||i.set)?Object.defineProperty(r,n,i):r[n]=e[n]}r.default=e,a&&a.set(e,r);return r}(require("react")),a=require("@react-aria/label"),r=e(require("../use-theme")),l=require("../utils/console"),n=e(require("../utils/clear-icon")),i=e(require("../utils/clsx")),o=require("../utils/assertion"),d=require("./input.styles"),s=require("./input-props"),u=require("react/jsx-runtime");function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,a=new WeakMap;return(c=function(e){return e?a:t})(e)}const p="nextui-input",f=t.default.forwardRef((({as:e="input",label:s,labelPlaceholder:c,labelLeft:f,labelRight:h,size:b,helperText:m,color:y,helperColor:x,status:$,contentLeft:g,contentRight:C,contentClickable:v,contentLeftStyling:w,contentRightStyling:S,onContentClick:j,initialValue:k,onChange:N,readOnly:q,value:I,onClearClick:P,clearable:M,shadow:O,animated:R,required:D,width:L,className:T,onBlur:_,onFocus:W,autoComplete:B,placeholder:F,fullWidth:V,borderWeight:E,disabled:H,bordered:U,underlined:z,rounded:A,css:G,...J},K)=>{const Q=(0,t.useRef)(null);(0,t.useImperativeHandle)(K,(()=>Q.current));const[X,Y]=(0,t.useState)(k),[Z,ee]=(0,t.useState)(!1),{isDark:te}=(0,r.default)(),ae=(0,t.useMemo)((()=>void 0!==I),[I]),re=(0,t.useMemo)((()=>s||c),[s,c]),le=(0,t.useMemo)((()=>c?"":F),[F,c]),ne=(0,t.useMemo)((()=>V?"100%":L||"initial"),[V,L]);z&&o.__DEV__&&(U&&(0,l.warn)("Using underlined and bordered at the same time will have no effect."),A&&(0,l.warn)("Using underlined and rounded at the same time will have no effect."));const ie=(e,t)=>{H||j&&j(e,t)};(0,t.useEffect)((()=>{ae&&Y(I)}),[ae,I]);const oe=(0,t.useMemo)((()=>"textarea"===e),[e]),de={...J,...ae?{value:X}:{defaultValue:k}},{labelProps:se,fieldProps:ue}=(0,a.useLabel)({...de,label:re}),ce=(0,t.useMemo)((()=>Z?"hover":H?"disabled":q?"read-only":X?"with-value":"normal"),[Z,H,q,X]);return(0,u.jsxs)(d.StyledInputMainContainer,{borderWeight:E,className:(0,i.default)(`${p}-main-container`,`${p}-main-container--${ce}`),color:y,css:{width:ne,...G},"data-state":ce,disabled:H,helperColor:x,rounded:A,size:b,status:$,children:[re&&(0,u.jsx)(d.StyledInputBlockLabel,{animated:R,asPlaceholder:!!c,bordered:U,className:`${p}-block-label`,focused:Z,hasContentLeft:!!g,htmlFor:"htmlFor"in se?se.htmlFor:"",id:se.id,isTextarea:oe,rounded:A,underlined:z,withValue:!!X,children:re}),(0,u.jsx)(d.StyledInputContainer,{animated:R,className:(0,i.default)(`${p}-container`,`${p}-container--${ce}`,{[`${p}-container--input`]:!oe,[`${p}-container--textarea`]:oe,[`${p}-container--read-only`]:q},T),focused:Z,isReadOnly:q,isTextarea:oe,underlined:z,children:(0,u.jsxs)(d.StyledInputWrapper,{animated:R,as:re?"div":"label",bordered:U,className:(0,i.default)(`${p}-wrapper`,`${p}-wrapper--${ce}`,{[`${p}-wrapper--bordered`]:U,[`${p}-wrapper--underlined`]:z,[`${p}-wrapper--shadow`]:O}),disabled:H,focused:Z,isReadOnly:q,isTextarea:oe,shadow:O,underlined:z,children:[!re&&F&&(0,u.jsx)(d.StyledInputPlaceholder,{className:`${p}-placeholder`,children:F}),f&&(0,u.jsx)(d.StyledInputLabel,{bordered:U,className:`${p}-label--left`,isDark:te,isDefaultStatus:"default"===$,underlined:z,children:f}),g&&(0,u.jsx)(d.StyledInputContent,{applyStyles:w,className:(0,i.default)(`${p}-content`,`${p}-content--left`),clickable:v,onClick:e=>ie("left",e),children:g}),(0,u.jsx)(d.StyledInput,{ref:Q,"aria-multiline":oe,"aria-placeholder":le,"aria-readonly":q,"aria-required":D,as:e,autoComplete:B,bordered:U,className:(0,i.default)({[`${p}`]:!oe,[`${p}-textarea`]:oe,[`${p}-disabled`]:H,[`${p}-rounded`]:A,[`${p}-${p}-right-content`]:C,[`${p}-left-content`]:g}),"data-state":ce,disabled:H,focused:Z,hasLeftContent:!!g,hasRightContent:!!C,isTextarea:oe,placeholder:le,readOnly:q,required:D,type:"text",onBlur:e=>{ee(!1),_&&_(e)},onChange:e=>{H||q||(ae||Y(e.target.value),N&&N(e))},onFocus:e=>{ee(!0),W&&W(e)},...de,...ue}),M&&(0,u.jsx)(d.StyledInputClearButton,{animated:R,className:`${p}-clear-button`,disabled:H||q,hasContentRight:!!C,type:"button",underlined:z,visible:Boolean(X),onClick:e=>{if(e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),ae||Y(""),P&&P(e),!Q.current)return;const t=((e,t)=>({...t,target:e,currentTarget:e}))(Q.current,e);t.target.value="",N&&N(t),Q.current.focus()},children:(0,u.jsx)(n.default,{fill:"currentColor"})}),C&&(0,u.jsx)(d.StyledInputContent,{applyStyles:S,className:(0,i.default)(`${p}-content`,`${p}-content--right`),clickable:v,onClick:e=>ie("right",e),children:C}),h&&(0,u.jsx)(d.StyledInputLabel,{bordered:U,className:`${p}-label--right`,isDark:te,isDefaultStatus:"default"===$,isRight:!0,underlined:z,children:h})]})}),(0,u.jsx)(d.StyledHelperTextContainer,{className:`${p}-helper-text-container`,withValue:!!m,children:m&&(0,u.jsx)(d.StyledHelperText,{className:`${p}-helper-text`,children:m})})]})}));f.displayName="NextUI.Input",f.defaultProps=s.defaultProps,f.toString=()=>".nextui-input";var h=f;exports.default=h,module.exports=exports.default;
1
+ var e=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.default=void 0;var t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=p(t);if(a&&a.has(e))return a.get(e);var r={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var i=l?Object.getOwnPropertyDescriptor(e,n):null;i&&(i.get||i.set)?Object.defineProperty(r,n,i):r[n]=e[n]}r.default=e,a&&a.set(e,r);return r}(require("react")),a=require("@react-aria/label"),r=require("@react-aria/focus"),l=e(require("../use-theme")),n=require("../utils/console"),i=e(require("../utils/clear-icon")),o=e(require("../utils/clsx")),s=require("../utils/assertion"),d=require("./input.styles"),u=require("./input-props"),c=require("react/jsx-runtime");function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,a=new WeakMap;return(p=function(e){return e?a:t})(e)}const f="nextui-input",h=t.default.forwardRef((({as:e="input",label:u,labelPlaceholder:p,labelLeft:h,labelRight:b,size:m,helperText:y,color:x,helperColor:$,status:g,contentLeft:C,contentRight:v,contentClickable:w,contentLeftStyling:S,contentRightStyling:j,onContentClick:I,initialValue:k,onChange:q,readOnly:N,value:P,onClearClick:M,clearable:O,shadow:R,animated:D,required:L,width:F,className:T,onBlur:W,onFocus:_,autoComplete:V,placeholder:B,fullWidth:E,borderWeight:H,disabled:U,bordered:z,underlined:A,rounded:G,css:J,...K},Q)=>{const X=(0,t.useRef)(null);(0,t.useImperativeHandle)(Q,(()=>X.current));const[Y,Z]=(0,t.useState)(k),[ee,te]=(0,t.useState)(!1),{isDark:ae}=(0,l.default)(),re=(0,t.useMemo)((()=>void 0!==P),[P]),le=(0,t.useMemo)((()=>u||p),[u,p]),ne=(0,t.useMemo)((()=>p?"":B),[B,p]),ie=(0,t.useMemo)((()=>E?"100%":F||"initial"),[E,F]);A&&s.__DEV__&&(z&&(0,n.warn)("Using underlined and bordered at the same time will have no effect."),G&&(0,n.warn)("Using underlined and rounded at the same time will have no effect."));const oe=(e,t)=>{U||I&&I(e,t)};(0,t.useEffect)((()=>{re&&Z(P)}),[re,P]);const se=(0,t.useMemo)((()=>"textarea"===e),[e]),de={...K,...re?{value:Y}:{defaultValue:k}},{isFocusVisible:ue,focusProps:ce}=(0,r.useFocusRing)(),{labelProps:pe,fieldProps:fe}=(0,a.useLabel)({...de,label:le}),he=(0,t.useMemo)((()=>ee?"hover":U?"disabled":N?"read-only":Y?"with-value":"normal"),[ee,U,N,Y]);return(0,c.jsxs)(d.StyledInputMainContainer,{borderWeight:H,className:(0,o.default)(`${f}-main-container`,`${f}-main-container--${he}`),color:x,css:{width:ie,...J},"data-state":he,disabled:U,helperColor:$,rounded:G,size:m,status:g,children:[le&&(0,c.jsx)(d.StyledInputBlockLabel,{animated:D,asPlaceholder:!!p,bordered:z,className:`${f}-block-label`,focused:ee,hasContentLeft:!!C,htmlFor:"htmlFor"in pe?pe.htmlFor:"",id:pe.id,isTextarea:se,rounded:G,underlined:A,withValue:!!Y,children:le}),(0,c.jsx)(d.StyledInputContainer,{animated:D,className:(0,o.default)(`${f}-container`,`${f}-container--${he}`,{[`${f}-container--input`]:!se,[`${f}-container--textarea`]:se,[`${f}-container--read-only`]:N},T),focused:ee,isReadOnly:N,isTextarea:se,underlined:A,children:(0,c.jsxs)(d.StyledInputWrapper,{animated:D,as:le?"div":"label",bordered:z,className:(0,o.default)(`${f}-wrapper`,`${f}-wrapper--${he}`,{[`${f}-wrapper--bordered`]:z,[`${f}-wrapper--underlined`]:A,[`${f}-wrapper--shadow`]:R}),disabled:U,focused:ee,isReadOnly:N,isTextarea:se,shadow:R,underlined:A,children:[!le&&B&&(0,c.jsx)(d.StyledInputPlaceholder,{className:`${f}-placeholder`,children:B}),h&&(0,c.jsx)(d.StyledInputLabel,{bordered:z,className:`${f}-label--left`,isDark:ae,isDefaultStatus:"default"===g,underlined:A,children:h}),C&&(0,c.jsx)(d.StyledInputContent,{applyStyles:S,className:(0,o.default)(`${f}-content`,`${f}-content--left`),clickable:w,onClick:e=>oe("left",e),children:C}),(0,c.jsx)(d.StyledInput,{ref:X,"aria-multiline":se,"aria-placeholder":ne,"aria-readonly":N,"aria-required":L,as:e,autoComplete:V,bordered:z,className:(0,o.default)({[`${f}`]:!se,[`${f}-textarea`]:se,[`${f}-disabled`]:U,[`${f}-rounded`]:G,[`${f}-${f}-right-content`]:v,[`${f}-left-content`]:C}),"data-state":he,disabled:U,focused:ee,hasLeftContent:!!C,hasRightContent:!!v,isTextarea:se,placeholder:ne,readOnly:N,required:L,type:"text",onBlur:e=>{te(!1),W&&W(e)},onChange:e=>{U||N||(re||Z(e.target.value),q&&q(e))},onFocus:e=>{te(!0),_&&_(e)},...de,...fe}),O&&(0,c.jsx)(d.StyledInputClearButton,{animated:D,"aria-label":"clear",className:`${f}-clear-button`,disabled:U||N,hasContentRight:!!v,lang:"en",type:"button",underlined:A,visible:Boolean(Y),onClick:e=>{if(e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),re||Z(""),M&&M(e),!X.current)return;const t=((e,t)=>({...t,target:e,currentTarget:e}))(X.current,e);t.target.value="",q&&q(t),X.current.focus()},...ce,children:(0,c.jsx)(d.StyledInputClearButtonIconWrapper,{isFocusVisible:ue,children:(0,c.jsx)(i.default,{fill:"currentColor"})})}),v&&(0,c.jsx)(d.StyledInputContent,{applyStyles:j,className:(0,o.default)(`${f}-content`,`${f}-content--right`),clickable:w,onClick:e=>oe("right",e),children:v}),b&&(0,c.jsx)(d.StyledInputLabel,{bordered:z,className:`${f}-label--right`,isDark:ae,isDefaultStatus:"default"===g,isRight:!0,underlined:A,children:b})]})}),(0,c.jsx)(d.StyledHelperTextContainer,{className:`${f}-helper-text-container`,withValue:!!y,children:y&&(0,c.jsx)(d.StyledHelperText,{className:`${f}-helper-text`,children:y})})]})}));h.displayName="NextUI.Input",h.defaultProps=u.defaultProps,h.toString=()=>".nextui-input";var b=h;exports.default=b,module.exports=exports.default;
@@ -1 +1 @@
1
- exports.__esModule=!0,exports.StyledInputWrapper=exports.StyledInputPlaceholder=exports.StyledInputMainContainer=exports.StyledInputLabel=exports.StyledInputContent=exports.StyledInputContainer=exports.StyledInputClearButton=exports.StyledInputBlockLabel=exports.StyledInput=exports.StyledHelperTextContainer=exports.StyledHelperText=void 0;var e=require("../theme/stitches.config"),o=require("../theme/shared-css");const t=(0,e.styled)("div",{$$inputColor:"$colors$accents0",$$inputTextColor:"$colors$text",$$inputPlaceholderColor:"$colors$accents6",$$inputShadow:"$shadows$sm",$$inputBorderColor:"$colors$border",$$inputHoverBorderColor:"$colors$foreground",$$inputLabelColor:"$$inputHoverBorderColor",display:"inline-flex",flexDirection:"column",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitBoxAlign:"center",variants:{color:{default:{},primary:{$$inputHoverBorderColor:"$colors$primary",$$inputLabelColor:"$colors$primary"},secondary:{$$inputHoverBorderColor:"$colors$secondary",$$inputLabelColor:"$colors$secondary"},success:{$$inputHoverBorderColor:"$colors$success",$$inputLabelColor:"$colors$success"},warning:{$$inputHoverBorderColor:"$colors$warning",$$inputLabelColor:"$colors$warning"},error:{$$inputHoverBorderColor:"$colors$error",$$inputLabelColor:"$colors$error"}},status:{default:{},primary:{$$inputColor:"$colors$primaryLight",$$inputPlaceholderColor:"$colors$primaryLightContrast",$$inputTextColor:"$colors$primaryLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$primary"},secondary:{$$inputColor:"$colors$secondaryLight",$$inputPlaceholderColor:"$colors$secondaryLightContrast",$$inputTextColor:"$colors$secondaryLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$secondary"},success:{$$inputColor:"$colors$successLight",$$inputPlaceholderColor:"$colors$successLightContrast",$$inputTextColor:"$colors$successLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$success"},warning:{$$inputColor:"$colors$warningLight",$$inputPlaceholderColor:"$colors$warningLightContrast",$$inputTextColor:"$colors$warningLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$warning"},error:{$$inputColor:"$colors$errorLight",$$inputPlaceholderColor:"$colors$errorLightContrast",$$inputTextColor:"$colors$errorLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$error"}},helperColor:{default:{$$inputHelperColor:"$colors$text"},primary:{$$inputHelperColor:"$colors$primary"},secondary:{$$inputHelperColor:"$colors$secondary"},success:{$$inputHelperColor:"$colors$success"},warning:{$$inputHelperColor:"$colors$warning"},error:{$$inputHelperColor:"$colors$error"}},borderWeight:{light:{$$inputBorderWeight:"$borderWeights$light"},normal:{$$inputBorderWeight:"$borderWeights$normal"},bold:{$$inputBorderWeight:"$borderWeights$bold"},extrabold:{$$inputBorderWeight:"$borderWeights$extrabold"},black:{$$inputBorderWeight:"$borderWeights$black"}},size:{xs:{$$inputBorderRadius:"$space$3",$$inputFontSize:"$fontSizes$xs",$$inputHeightRatio:"1.2",br:"$$inputBorderRadius"},sm:{$$inputBorderRadius:"$space$4",$$inputFontSize:"$fontSizes$xs",$$inputHeightRatio:"1.6",br:"$$inputBorderRadius"},md:{$$inputBorderRadius:"$space$6",$$inputFontSize:"$fontSizes$sm",$$inputHeightRatio:"2",br:"$$inputBorderRadius"},lg:{$$inputBorderRadius:"$space$7",$$inputFontSize:"$fontSizes$md",$$inputHeightRatio:"2.2",br:"$$inputBorderRadius"},xl:{$$inputBorderRadius:"$space$8",$$inputFontSize:"$fontSizes$lg",$$inputHeightRatio:"2.6",br:"$$inputBorderRadius"}},rounded:{true:{$$inputBorderRadius:"$radii$pill"}},disabled:{true:{$$inputColor:"$colors$accents1",$$inputTextColor:"$colors$accents7",$$inputPlaceholderColor:"$colors$accents7",$$inputShadow:"$shadows$sm"}}}});exports.StyledInputMainContainer=t;const r={WebkitTextFillColor:"$$inputTextColor",WebkitBackgroundClip:"text !important",caretColor:"$$inputTextColor"},i=(0,e.styled)("div",{width:"100%",br:"$$inputBorderRadius",input:{"&:-webkit-autofill":{...r,"&:hover":r,"&:focus":r,"&:active":r}},"@motion":{transition:"none"},variants:{isTextarea:{false:{display:"inline-flex",alignItems:"center",height:"calc($$inputHeightRatio * $9)"}},focused:{true:{}},isReadOnly:{false:{}},underlined:{true:{}},animated:{true:{transition:"$default"},false:{transition:"none"}}},compoundVariants:[{isReadOnly:!1,underlined:!0,css:{transform:"none"}},{focused:!0,animated:!0,isReadOnly:!1,underlined:!1,css:{transform:"translateY(-$space$1)"}}]});exports.StyledInputContainer=i;const n=(0,e.styled)("input",{padding:0,fontSize:"$$inputFontSize",bg:"transparent",border:"none",color:"$$inputTextColor",br:0,outline:"none",size:"100%",minWidth:0,WebkitAppearance:"none","::placeholder":{color:"$$inputPlaceholderColor",transition:"opacity 0.25s ease 0s",MozTransition:"opacity 0.25s ease 0s",MsTransition:"opacity 0.25s ease 0s",WebkitTransition:"opacity 0.25s ease 0s"},"@motion":{transition:"none","&::placeholder":{transition:"none"}},"&:disabled":{pe:"none",color:"$accents4",cursor:"not-allowed"},variants:{isTextarea:{true:{boxShadow:"none",display:"block",size:"100%",resize:"none",border:"none",outline:"none"}},focused:{true:{"&::placeholder":{opacity:0,transition:"opacity 0.25s ease 0s"}}},bordered:{true:{padding:"0 $3"}},rounded:{true:{padding:"0 $3"}},animated:{false:{transition:"none","::placeholder":{transition:"none"}}},hasLeftContent:{true:{ml:0}},hasRightContent:{true:{mr:0}}}});exports.StyledInput=n;const s=(0,e.styled)("div",{flex:1,position:"relative",br:"$$inputBorderRadius",bg:"$$inputColor",display:"inline-flex",verticalAlign:"middle",alignItems:"center",userSelect:"none","@motion":{transition:"none","&:before":{transition:"none"},"&:after":{transition:"none"}},variants:{focused:{true:{}},isReadOnly:{true:{}},bordered:{true:{bg:"transparent",border:"none",boxShadow:"0 0 0 $$inputBorderWeight $$inputBorderColor",transition:"box-shadow 0.25s ease"}},shadow:{true:{transition:"$default"}},disabled:{true:{cursor:"not-allowed"}},underlined:{true:{bg:"transparent",[`& ${n}`]:{margin:"$2 $3"},"&:before":{content:"",position:"absolute",zIndex:"$2",width:0,bottom:0,height:"$1",left:"50%",transform:"translate(-50%)",background:"$$inputHoverBorderColor",transition:"width 0.25s ease"},"&:after":{content:"",position:"absolute",zIndex:"$1",bottom:0,width:"100%",height:"$$inputBorderWeight",bg:"$$inputBorderColor"}},false:{[`& ${n}`]:{margin:"$2 $5"}}},animated:{false:{transition:"none","&:before":{transition:"none"},"&:after":{transition:"none"}}},isTextarea:{true:{boxSizing:"border-box",width:"100%",maxWidth:"100%",height:"auto"},false:{height:"100%"}}},compoundVariants:[{bordered:!0,underlined:!0,css:{boxShadow:"0 0 0 0px $$inputBorderColor"}},{focused:!0,underlined:!0,css:{"&:before":{width:"100%"}}},{focused:!0,shadow:!0,isReadOnly:!1,underlined:!1,css:{boxShadow:"$$inputShadow"}},{focused:!0,bordered:!0,isReadOnly:!1,underlined:!1,css:{boxShadow:"0 0 0 $$inputBorderWeight $$inputHoverBorderColor"}},{bordered:!0,isReadOnly:!1,underlined:!1,css:{"&:hover":{boxShadow:"0 0 0 $$inputBorderWeight $$inputHoverBorderColor"}}},{isTextarea:!0,underlined:!1,css:{[`& ${n}`]:{margin:"$xs $sm"}}}]});exports.StyledInputWrapper=s;const a=(0,e.styled)("div",{position:"absolute",opacity:0,bottom:"calc($$inputHeightRatio * -$space$5)","@motion":{transition:"none"},variants:{animated:{true:{transition:"opacity 0.25s ease"},false:{transition:"none"}},withValue:{true:{opacity:1}}}});exports.StyledHelperTextContainer=a;const l=(0,e.styled)("p",{margin:"$1 0 0 $5",fontSize:"$space$5",color:"$$inputHelperColor"});exports.StyledHelperText=l;const $=(0,e.styled)("span",{},o.sharedVisuallyHidden);exports.StyledInputPlaceholder=$;const d=(0,e.styled)("label",{d:"block",fontWeight:"$normal",color:"$$inputLabelColor",p:"0 0 0 $2",mb:"$3",fs:"$$inputFontSize",lh:"$md",WebkitTouchCallout:"none",WebkitUserSelect:"none",KhtmlUserSelect:"none",MozUserSelect:"none",MsUserSelect:"none",us:"none","> *:first-child":{marginTop:0},"> *:last-child":{mb:0},"@motion":{transition:"none"},variants:{rounded:{true:{padding:"0 0 0 $3"}},asPlaceholder:{true:{position:"absolute",padding:0,zIndex:"$1",left:"$space$6",top:"20%",mb:0,cursor:"text",color:"$$inputPlaceholderColor",transition:"left 0.25s ease 0s, color 0.25s ease 0s, top 0.25s ease 0s"}},animated:{false:{transition:"none"}},focused:{true:{color:"$$inputHoverBorderColor"}},underlined:{true:{}},withValue:{true:{}},isTextarea:{true:{}},bordered:{true:{}},hasContentLeft:{true:{}}},compoundVariants:[{underlined:!0,asPlaceholder:!0,css:{left:"$space$2"}},{asPlaceholder:!0,focused:!0,underlined:!1,isTextarea:!1,css:{top:"-72%",left:"$2",cursor:"inherit"}},{asPlaceholder:!0,focused:!0,underlined:!0,isTextarea:!1,css:{top:"-72%",left:"0px",cursor:"inherit"}},{asPlaceholder:!0,withValue:!0,underlined:!1,isTextarea:!1,css:{color:"$$inputTextColor",top:"-72%",left:"$2",cursor:"inherit"}},{asPlaceholder:!0,withValue:!0,underlined:!0,isTextarea:!1,css:{color:"$$inputTextColor",top:"-72%",left:"0px",cursor:"inherit"}},{asPlaceholder:!0,isTextarea:!0,css:{top:"$5"}},{asPlaceholder:!0,hasContentLeft:!0,css:{left:"calc($space$6 + $$inputHeightRatio * $space$7)"}},{asPlaceholder:!0,isTextarea:!0,focused:!0,css:{top:"calc(-$space$10 - $space$3)",left:"$2"}},{asPlaceholder:!0,isTextarea:!0,withValue:!0,css:{top:"-$11"}},{asPlaceholder:!0,focused:!0,isTextarea:!0,bordered:!0,css:{top:"-$12"}}],defaultVariants:{asPlaceholder:!1}});exports.StyledInputBlockLabel=d;const u=(0,e.styled)("span",{position:"relative",display:"inline-flex",width:"initial",height:"100%",fontWeight:"$medium",ai:"center",pe:"none",margin:0,padding:"0 $sm",color:"$$inputPlaceholderColor",fontSize:"$$inputFontSize",lineHeight:"$xs",variants:{isRight:{true:{btrr:"$$inputBorderRadius",bbrr:"$$inputBorderRadius"},false:{btlr:"$$inputBorderRadius",bblr:"$$inputBorderRadius"}},isDark:{true:{}},isDefaultStatus:{true:{}},underlined:{true:{bg:"transparent"}},bordered:{true:{"&:after":{display:"none"},"&:before":{display:"none"}}}},compoundVariants:[{isRight:!0,underlined:!0,css:{borderLeftColor:"$$inputPlaceholderColor",borderLeftStyle:"solid",marginLeft:"$2",borderLeftWidth:"calc($$inputBorderWeight / 2)",height:"40%"}},{isRight:!1,underlined:!0,css:{borderRightColor:"$$inputPlaceholderColor",borderRightStyle:"solid",marginRight:"$2",borderRightWidth:"calc($$inputBorderWeight / 1)",height:"40%"}},{isDefaultStatus:!0,bordered:!1,underlined:!1,css:{bg:"$accents2"}},{isDefaultStatus:!0,bordered:!1,underlined:!1,isDark:!0,css:{color:"$accents6"}},{isDefaultStatus:!1,bordered:!0,underlined:!1,css:{bg:"$$inputColor"}},{bordered:!0,isRight:!0,css:{peddingRight:"$sm",paddingLeft:0}},{bordered:!0,isRight:!1,css:{peddingLeft:"$sm",paddingRight:0}}],defaultVariants:{isRight:!1}});exports.StyledInputLabel=u;const p=(0,e.styled)("span",{variants:{applyStyles:{true:{display:"flex",boxSizing:"content-box",width:"calc($$inputHeightRatio * $space$4)",height:"100%",alignItems:"center",verticalAlign:"center",margin:0,padding:"0 calc($$inputHeightRatio * $3)",color:"$$inputTextColor",lineHeight:"$xs",position:"relative",cursor:"default",pe:"none"}},clickable:{true:{cursor:"pointer",pe:"auto"}}}});exports.StyledInputContent=p;const c=(0,e.styled)("button",{position:"absolute",right:0,margin:0,d:"inline-flex",ai:"center",border:"none",bg:"transparent",width:"auto",height:"auto",cursor:"pointer",boxSizing:"border-box",transition:"color 250ms ease 0s, transform 250ms ease 0s, opacity 250ms ease 0s",color:"$$inputPlaceholderColor",visibility:"hidden",transform:"translateX(20%)",opacity:0,"&:hover":{opacity:.85},svg:{color:"currentColor",size:"calc($space$5 * $$inputHeightRatio)"},"@motion":{transition:"none"},variants:{visible:{true:{visibility:"visible",transform:"translateX(0)",opacity:1}},underlined:{true:{padding:"0 $1"}},animated:{false:{transition:"none"}},hasContentRight:{true:{padding:0,position:"relative",transform:"translateX(30%)"}},disabled:{true:{cursor:"not-allowed","&:hover":{color:"$accents3"}}}}});exports.StyledInputClearButton=c;
1
+ exports.__esModule=!0,exports.StyledInputWrapper=exports.StyledInputPlaceholder=exports.StyledInputMainContainer=exports.StyledInputLabel=exports.StyledInputContent=exports.StyledInputContainer=exports.StyledInputClearButtonIconWrapper=exports.StyledInputClearButton=exports.StyledInputBlockLabel=exports.StyledInput=exports.StyledHelperTextContainer=exports.StyledHelperText=void 0;var e=require("../theme/stitches.config"),o=require("../theme/shared-css");const t=(0,e.styled)("div",{$$inputColor:"$colors$accents0",$$inputTextColor:"$colors$text",$$inputPlaceholderColor:"$colors$accents6",$$inputShadow:"$shadows$sm",$$inputBorderColor:"$colors$border",$$inputHoverBorderColor:"$colors$foreground",$$inputLabelColor:"$$inputHoverBorderColor",display:"inline-flex",flexDirection:"column",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitBoxAlign:"center",variants:{color:{default:{},primary:{$$inputHoverBorderColor:"$colors$primary",$$inputLabelColor:"$colors$primary"},secondary:{$$inputHoverBorderColor:"$colors$secondary",$$inputLabelColor:"$colors$secondary"},success:{$$inputHoverBorderColor:"$colors$success",$$inputLabelColor:"$colors$success"},warning:{$$inputHoverBorderColor:"$colors$warning",$$inputLabelColor:"$colors$warning"},error:{$$inputHoverBorderColor:"$colors$error",$$inputLabelColor:"$colors$error"}},status:{default:{},primary:{$$inputColor:"$colors$primaryLight",$$inputPlaceholderColor:"$colors$primaryLightContrast",$$inputTextColor:"$colors$primaryLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$primary"},secondary:{$$inputColor:"$colors$secondaryLight",$$inputPlaceholderColor:"$colors$secondaryLightContrast",$$inputTextColor:"$colors$secondaryLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$secondary"},success:{$$inputColor:"$colors$successLight",$$inputPlaceholderColor:"$colors$successLightContrast",$$inputTextColor:"$colors$successLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$success"},warning:{$$inputColor:"$colors$warningLight",$$inputPlaceholderColor:"$colors$warningLightContrast",$$inputTextColor:"$colors$warningLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$warning"},error:{$$inputColor:"$colors$errorLight",$$inputPlaceholderColor:"$colors$errorLightContrast",$$inputTextColor:"$colors$errorLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$error"}},helperColor:{default:{$$inputHelperColor:"$colors$text"},primary:{$$inputHelperColor:"$colors$primary"},secondary:{$$inputHelperColor:"$colors$secondary"},success:{$$inputHelperColor:"$colors$success"},warning:{$$inputHelperColor:"$colors$warning"},error:{$$inputHelperColor:"$colors$error"}},borderWeight:{light:{$$inputBorderWeight:"$borderWeights$light"},normal:{$$inputBorderWeight:"$borderWeights$normal"},bold:{$$inputBorderWeight:"$borderWeights$bold"},extrabold:{$$inputBorderWeight:"$borderWeights$extrabold"},black:{$$inputBorderWeight:"$borderWeights$black"}},size:{xs:{$$inputBorderRadius:"$space$3",$$inputFontSize:"$fontSizes$xs",$$inputHeightRatio:"1.2",br:"$$inputBorderRadius"},sm:{$$inputBorderRadius:"$space$4",$$inputFontSize:"$fontSizes$xs",$$inputHeightRatio:"1.6",br:"$$inputBorderRadius"},md:{$$inputBorderRadius:"$space$6",$$inputFontSize:"$fontSizes$sm",$$inputHeightRatio:"2",br:"$$inputBorderRadius"},lg:{$$inputBorderRadius:"$space$7",$$inputFontSize:"$fontSizes$md",$$inputHeightRatio:"2.2",br:"$$inputBorderRadius"},xl:{$$inputBorderRadius:"$space$8",$$inputFontSize:"$fontSizes$lg",$$inputHeightRatio:"2.6",br:"$$inputBorderRadius"}},rounded:{true:{$$inputBorderRadius:"$radii$pill"}},disabled:{true:{$$inputColor:"$colors$accents1",$$inputTextColor:"$colors$accents7",$$inputPlaceholderColor:"$colors$accents7",$$inputShadow:"$shadows$sm"}}}});exports.StyledInputMainContainer=t;const r={WebkitTextFillColor:"$$inputTextColor",WebkitBackgroundClip:"text !important",caretColor:"$$inputTextColor"},n=(0,e.styled)("div",{width:"100%",br:"$$inputBorderRadius",input:{"&:-webkit-autofill":{...r,"&:hover":r,"&:focus":r,"&:active":r}},"@motion":{transition:"none"},variants:{isTextarea:{false:{display:"inline-flex",alignItems:"center",height:"calc($$inputHeightRatio * $9)"}},focused:{true:{}},isReadOnly:{false:{}},underlined:{true:{}},animated:{true:{transition:"$default"},false:{transition:"none"}}},compoundVariants:[{isReadOnly:!1,underlined:!0,css:{transform:"none"}},{focused:!0,animated:!0,isReadOnly:!1,underlined:!1,css:{transform:"translateY(-$space$1)"}}]});exports.StyledInputContainer=n;const i=(0,e.styled)("input",{padding:0,fontSize:"$$inputFontSize",bg:"transparent",border:"none",color:"$$inputTextColor",br:0,outline:"none",size:"100%",minWidth:0,WebkitAppearance:"none","::placeholder":{color:"$$inputPlaceholderColor",transition:"opacity 0.25s ease 0s",MozTransition:"opacity 0.25s ease 0s",MsTransition:"opacity 0.25s ease 0s",WebkitTransition:"opacity 0.25s ease 0s"},"@motion":{transition:"none","&::placeholder":{transition:"none"}},"&:disabled":{pe:"none",color:"$accents4",cursor:"not-allowed"},variants:{isTextarea:{true:{boxShadow:"none",display:"block",size:"100%",resize:"none",border:"none",outline:"none"}},focused:{true:{"&::placeholder":{opacity:0,transition:"opacity 0.25s ease 0s"}}},bordered:{true:{padding:"0 $3"}},rounded:{true:{padding:"0 $3"}},animated:{false:{transition:"none","::placeholder":{transition:"none"}}},hasLeftContent:{true:{ml:0}},hasRightContent:{true:{mr:0}}}});exports.StyledInput=i;const s=(0,e.styled)("div",{flex:1,position:"relative",br:"$$inputBorderRadius",bg:"$$inputColor",display:"inline-flex",verticalAlign:"middle",alignItems:"center",userSelect:"none","@motion":{transition:"none","&:before":{transition:"none"},"&:after":{transition:"none"}},variants:{focused:{true:{}},isReadOnly:{true:{}},bordered:{true:{bg:"transparent",border:"none",boxShadow:"0 0 0 $$inputBorderWeight $$inputBorderColor",transition:"box-shadow 0.25s ease"}},shadow:{true:{transition:"$default"}},disabled:{true:{cursor:"not-allowed"}},underlined:{true:{bg:"transparent",[`& ${i}`]:{margin:"$2 $3"},"&:before":{content:"",position:"absolute",zIndex:"$2",width:0,bottom:0,height:"$1",left:"50%",transform:"translate(-50%)",background:"$$inputHoverBorderColor",transition:"width 0.25s ease"},"&:after":{content:"",position:"absolute",zIndex:"$1",bottom:0,width:"100%",height:"$$inputBorderWeight",bg:"$$inputBorderColor"}},false:{[`& ${i}`]:{margin:"$2 $5"}}},animated:{false:{transition:"none","&:before":{transition:"none"},"&:after":{transition:"none"}}},isTextarea:{true:{boxSizing:"border-box",width:"100%",maxWidth:"100%",height:"auto"},false:{height:"100%"}}},compoundVariants:[{bordered:!0,underlined:!0,css:{boxShadow:"0 0 0 0px $$inputBorderColor"}},{focused:!0,underlined:!0,css:{"&:before":{width:"100%"}}},{focused:!0,shadow:!0,isReadOnly:!1,underlined:!1,css:{boxShadow:"$$inputShadow"}},{focused:!0,bordered:!0,isReadOnly:!1,underlined:!1,css:{boxShadow:"0 0 0 $$inputBorderWeight $$inputHoverBorderColor"}},{bordered:!0,isReadOnly:!1,underlined:!1,css:{"&:hover":{boxShadow:"0 0 0 $$inputBorderWeight $$inputHoverBorderColor"}}},{isTextarea:!0,underlined:!1,css:{[`& ${i}`]:{margin:"$xs $sm"}}}]});exports.StyledInputWrapper=s;const a=(0,e.styled)("div",{position:"absolute",opacity:0,bottom:"calc($$inputHeightRatio * -$space$5)","@motion":{transition:"none"},variants:{animated:{true:{transition:"opacity 0.25s ease"},false:{transition:"none"}},withValue:{true:{opacity:1}}}});exports.StyledHelperTextContainer=a;const l=(0,e.styled)("p",{margin:"$1 0 0 $5",fontSize:"$space$5",color:"$$inputHelperColor"});exports.StyledHelperText=l;const $=(0,e.styled)("span",{},o.sharedVisuallyHidden);exports.StyledInputPlaceholder=$;const d=(0,e.styled)("label",{d:"block",fontWeight:"$normal",color:"$$inputLabelColor",p:"0 0 0 $2",mb:"$3",fs:"$$inputFontSize",lh:"$md",WebkitTouchCallout:"none",WebkitUserSelect:"none",KhtmlUserSelect:"none",MozUserSelect:"none",MsUserSelect:"none",us:"none","> *:first-child":{marginTop:0},"> *:last-child":{mb:0},"@motion":{transition:"none"},variants:{rounded:{true:{padding:"0 0 0 $3"}},asPlaceholder:{true:{position:"absolute",padding:0,zIndex:"$1",left:"$space$6",top:"20%",mb:0,cursor:"text",color:"$$inputPlaceholderColor",transition:"left 0.25s ease 0s, color 0.25s ease 0s, top 0.25s ease 0s"}},animated:{false:{transition:"none"}},focused:{true:{color:"$$inputHoverBorderColor"}},underlined:{true:{}},withValue:{true:{}},isTextarea:{true:{}},bordered:{true:{}},hasContentLeft:{true:{}}},compoundVariants:[{underlined:!0,asPlaceholder:!0,css:{left:"$space$2"}},{asPlaceholder:!0,focused:!0,underlined:!1,isTextarea:!1,css:{top:"-72%",left:"$2",cursor:"inherit"}},{asPlaceholder:!0,focused:!0,underlined:!0,isTextarea:!1,css:{top:"-72%",left:"0px",cursor:"inherit"}},{asPlaceholder:!0,withValue:!0,underlined:!1,isTextarea:!1,css:{color:"$$inputTextColor",top:"-72%",left:"$2",cursor:"inherit"}},{asPlaceholder:!0,withValue:!0,underlined:!0,isTextarea:!1,css:{color:"$$inputTextColor",top:"-72%",left:"0px",cursor:"inherit"}},{asPlaceholder:!0,isTextarea:!0,css:{top:"$5"}},{asPlaceholder:!0,hasContentLeft:!0,css:{left:"calc($space$6 + $$inputHeightRatio * $space$7)"}},{asPlaceholder:!0,isTextarea:!0,focused:!0,css:{top:"calc(-$space$10 - $space$3)",left:"$2"}},{asPlaceholder:!0,isTextarea:!0,withValue:!0,css:{top:"-$11"}},{asPlaceholder:!0,focused:!0,isTextarea:!0,bordered:!0,css:{top:"-$12"}}],defaultVariants:{asPlaceholder:!1}});exports.StyledInputBlockLabel=d;const u=(0,e.styled)("span",{position:"relative",display:"inline-flex",width:"initial",height:"100%",fontWeight:"$medium",ai:"center",pe:"none",margin:0,padding:"0 $sm",color:"$$inputPlaceholderColor",fontSize:"$$inputFontSize",lineHeight:"$xs",variants:{isRight:{true:{btrr:"$$inputBorderRadius",bbrr:"$$inputBorderRadius"},false:{btlr:"$$inputBorderRadius",bblr:"$$inputBorderRadius"}},isDark:{true:{}},isDefaultStatus:{true:{}},underlined:{true:{bg:"transparent"}},bordered:{true:{"&:after":{display:"none"},"&:before":{display:"none"}}}},compoundVariants:[{isRight:!0,underlined:!0,css:{borderLeftColor:"$$inputPlaceholderColor",borderLeftStyle:"solid",marginLeft:"$2",borderLeftWidth:"calc($$inputBorderWeight / 2)",height:"40%"}},{isRight:!1,underlined:!0,css:{borderRightColor:"$$inputPlaceholderColor",borderRightStyle:"solid",marginRight:"$2",borderRightWidth:"calc($$inputBorderWeight / 1)",height:"40%"}},{isDefaultStatus:!0,bordered:!1,underlined:!1,css:{bg:"$accents2"}},{isDefaultStatus:!0,bordered:!1,underlined:!1,isDark:!0,css:{color:"$accents6"}},{isDefaultStatus:!1,bordered:!0,underlined:!1,css:{bg:"$$inputColor"}},{bordered:!0,isRight:!0,css:{peddingRight:"$sm",paddingLeft:0}},{bordered:!0,isRight:!1,css:{peddingLeft:"$sm",paddingRight:0}}],defaultVariants:{isRight:!1}});exports.StyledInputLabel=u;const p=(0,e.styled)("span",{variants:{applyStyles:{true:{display:"flex",boxSizing:"content-box",width:"calc($$inputHeightRatio * $space$4)",height:"100%",alignItems:"center",verticalAlign:"center",margin:0,padding:"0 calc($$inputHeightRatio * $3)",color:"$$inputTextColor",lineHeight:"$xs",position:"relative",cursor:"default",pe:"none"}},clickable:{true:{cursor:"pointer",pe:"auto"}}}});exports.StyledInputContent=p;const c=(0,e.styled)("button",{position:"absolute",right:0,margin:0,d:"inline-flex",ai:"center",border:"none",bg:"transparent",width:"auto",height:"auto",cursor:"pointer",boxSizing:"border-box",transition:"color 250ms ease 0s, transform 250ms ease 0s, opacity 250ms ease 0s",color:"$$inputPlaceholderColor",visibility:"hidden",transform:"translateX(20%)",opacity:0,"&:hover":{opacity:.85},svg:{color:"currentColor",size:"calc($space$5 * $$inputHeightRatio)"},"@motion":{transition:"none"},variants:{visible:{true:{visibility:"visible",transform:"translateX(0)",opacity:1}},underlined:{true:{padding:"0 $1"}},animated:{false:{transition:"none"}},hasContentRight:{true:{padding:0,position:"relative",transform:"translateX(30%)"}},disabled:{true:{cursor:"not-allowed","&:hover":{color:"$accents3"}}}}});exports.StyledInputClearButton=c;const h=(0,e.styled)("span",{display:"flex",br:"100%"},o.cssFocusVisible);exports.StyledInputClearButtonIconWrapper=h;
@@ -1 +1 @@
1
- exports.__esModule=!0,exports.default=void 0;var e=function(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a(r);if(t&&t.has(e))return t.get(e);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var u=n?Object.getOwnPropertyDescriptor(e,s):null;u&&(u.get||u.set)?Object.defineProperty(o,s,u):o[s]=e[s]}o.default=e,t&&t.set(e,o);return o}(require("react")),r=require("@react-aria/button"),t=require("@react-aria/utils"),o=require("../index"),n=require("../utils/collections"),s=require("../utils/assertion"),u=require("./popover-context"),i=require("react/jsx-runtime");function a(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(a=function(e){return e?t:r})(e)}const p=e.default.forwardRef(((s,a)=>{const{state:p,triggerRef:l,getTriggerProps:f}=(0,u.usePopoverContext)(),{children:c,...d}=s,g=(0,e.useMemo)((()=>"string"==typeof c?(0,i.jsx)(o.Text,{children:c}):e.Children.only(c)),[c]),{onPress:P,onPressStart:v,...x}=(0,e.useMemo)((()=>f((0,t.mergeProps)(g.props,d),g.ref)),[f,g.props,d,g.ref]),{buttonProps:y}=(0,r.useButton)({onPress:P,onPressStart:v,...x},l),[,m]=(0,n.pickChild)(s.children,o.Button),M=(0,e.useMemo)((()=>void 0!==(null==m?void 0:m[0])),[m]),b=(0,e.useMemo)((()=>({...x,onPressStart:v,onPress:()=>p.open()})),[x,v,p.open]);return(0,e.cloneElement)(g,(0,t.mergeProps)(x,M?b:y))}));s.__DEV__&&(p.displayName="NextUI.PopoverTrigger"),p.toString=()=>".nextui-popover-trigger";var l=p;exports.default=l,module.exports=exports.default;
1
+ exports.__esModule=!0,exports.default=void 0;var e=function(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a(r);if(t&&t.has(e))return t.get(e);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=n?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(o,u,i):o[u]=e[u]}o.default=e,t&&t.set(e,o);return o}(require("react")),r=require("@react-aria/button"),t=require("@react-aria/utils"),o=require("../index"),n=require("../utils/collections"),u=require("../utils/assertion"),i=require("./popover-context"),s=require("react/jsx-runtime");function a(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(a=function(e){return e?t:r})(e)}const p=e.default.forwardRef(((u,a)=>{const{triggerRef:p,getTriggerProps:l}=(0,i.usePopoverContext)(),{children:f,...c}=u,d=(0,e.useMemo)((()=>"string"==typeof f?(0,s.jsx)(o.Text,{children:f}):e.Children.only(f)),[f]),{onPress:g,onKeyDown:P,onPressStart:y,...v}=(0,e.useMemo)((()=>l((0,t.mergeProps)(d.props,c),d.ref)),[l,d.props,c,d.ref]),{buttonProps:x}=(0,r.useButton)({onPress:g,onKeyDown:P,onPressStart:y,...v},p),[,m]=(0,n.pickChild)(u.children,o.Button),w=(0,e.useMemo)((()=>void 0!==(null==m?void 0:m[0])),[m]),M=(0,e.useMemo)((()=>({...v,onPress:g,onKeyDown:P,onPressStart:y})),[v,g,P,y]);return(0,e.cloneElement)(d,(0,t.mergeProps)(v,w?M:x))}));u.__DEV__&&(p.displayName="NextUI.PopoverTrigger"),p.toString=()=>".nextui-popover-trigger";var l=p;exports.default=l,module.exports=exports.default;
@@ -1 +1 @@
1
- var e=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.default=void 0;var r=function(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l(r);if(t&&t.has(e))return t.get(e);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var n=i?Object.getOwnPropertyDescriptor(e,s):null;n&&(n.get||n.set)?Object.defineProperty(a,s,n):a[s]=e[s]}a.default=e,t&&t.set(e,a);return a}(require("react")),t=e(require("../utils/css-transition")),a=e(require("../utils/with-defaults")),i=require("../utils/numbers"),s=e(require("../utils/clsx")),n=require("../utils/assertion"),u=require("./progress.styles"),o=require("react/jsx-runtime");function l(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(l=function(e){return e?t:r})(e)}const d="nextui-progress",p=({value:e,max:a,min:n,striped:l,animated:p,shadow:c,indeterminated:f,css:m,...v})=>{const x=(0,r.useMemo)((()=>e>a?a:e<n?n:e),[e,n,a]),y=(0,r.useMemo)((()=>(0,i.valueToPercent)(x,n,a)),[x,n,a]);return(0,o.jsx)(u.StyledProgress,{css:{"nextui-progress-wrapper-enter":{opacity:0},".nextui-progress-wrapper-enter-active":{opacity:1,width:`${y}%`},...m},indeterminated:f,role:"progressbar",...v,children:(0,o.jsx)(t.default,{visible:!0,clearTime:300,enterTime:10,leaveTime:20,name:`${d}-wrapper`,children:(0,o.jsx)(u.StyledProgressBar,{animated:p,"aria-valuemax":a,"aria-valuemin":n,"aria-valuenow":x,className:(0,s.default)(`${d}-bar`,{[`${d}-striped`]:l,[`${d}-indeterminated`]:f}),indeterminated:f,shadow:c,striped:l,...v})})})};n.__DEV__&&(p.displayName="NextUI.Progress"),p.toString=()=>".nextui-progress";const c=r.default.memo(p);var f=(0,a.default)(c,{striped:!1,animated:!0,shadow:!1,indeterminated:!1,value:0,min:0,max:100});exports.default=f,module.exports=exports.default;
1
+ var e=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.default=void 0;var r=function(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l(r);if(t&&t.has(e))return t.get(e);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var n=i?Object.getOwnPropertyDescriptor(e,s):null;n&&(n.get||n.set)?Object.defineProperty(a,s,n):a[s]=e[s]}a.default=e,t&&t.set(e,a);return a}(require("react")),t=e(require("../utils/css-transition")),a=e(require("../utils/with-defaults")),i=require("../utils/numbers"),s=e(require("../utils/clsx")),n=require("../utils/assertion"),u=require("./progress.styles"),o=require("react/jsx-runtime");function l(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(l=function(e){return e?t:r})(e)}const d="nextui-progress",p=({value:e,max:a,min:n,striped:l,animated:p,shadow:c,indeterminated:f,css:m,...v})=>{const x=(0,r.useMemo)((()=>e>a?a:e<n?n:e),[e,n,a]),g=(0,r.useMemo)((()=>(0,i.valueToPercent)(x,n,a)),[x,n,a]);return(0,o.jsx)(u.StyledProgress,{"aria-label":"progress","aria-valuemax":a,"aria-valuemin":n,"aria-valuenow":x,css:{"nextui-progress-wrapper-enter":{opacity:0},".nextui-progress-wrapper-enter-active":{opacity:1,width:`${g}%`},...m},indeterminated:f,role:"progressbar",...v,children:(0,o.jsx)(t.default,{visible:!0,clearTime:300,enterTime:10,leaveTime:20,name:`${d}-wrapper`,children:(0,o.jsx)(u.StyledProgressBar,{animated:p,className:(0,s.default)(`${d}-bar`,{[`${d}-striped`]:l,[`${d}-indeterminated`]:f}),indeterminated:f,shadow:c,striped:l,...v})})})};n.__DEV__&&(p.displayName="NextUI.Progress"),p.toString=()=>".nextui-progress";const c=r.default.memo(p);var f=(0,a.default)(c,{striped:!1,animated:!0,shadow:!1,indeterminated:!1,value:0,min:0,max:100});exports.default=f,module.exports=exports.default;
@@ -1 +1 @@
1
- exports.__esModule=!0,exports.StyledProgressBar=exports.StyledProgress=void 0;var r=require("../theme/stitches.config");const o=(0,r.keyframes)({"0%":{left:"-40%"},"100%":{left:"100%"}}),s=(0,r.styled)("div",{margin:0,padding:0,width:"100%",position:"relative",overflow:"visible",variants:{color:{default:{$$progressColor:"$colors$primary",$$progressShadowColor:"$colors$primaryShadow"},primary:{$$progressColor:"$colors$primary",$$progressShadowColor:"$colors$primaryShadow"},secondary:{$$progressColor:"$colors$secondary",$$progressShadowColor:"$colors$secondaryShadow"},success:{$$progressColor:"$colors$success",$$progressShadowColor:"$colors$successShadow"},warning:{$$progressColor:"$colors$warning",$$progressShadowColor:"$colors$warningShadow"},error:{$$progressColor:"$colors$error",$$progressShadowColor:"$colors$errorShadow"},gradient:{$$progressColor:"$colors$gradient",$$progressShadowColor:"$colors$primaryShadow"}},status:{default:{bg:"$accents2"},primary:{bg:"$primaryLight"},secondary:{bg:"$secondaryLight"},success:{bg:"$successLight"},warning:{bg:"$warningLight"},error:{bg:"$errorLight"}},size:{xs:{$$progressHeight:"$space$2",height:"$$progressHeight",br:"$$progressHeight"},sm:{$$progressHeight:"$space$4",height:"$$progressHeight",br:"$$progressHeight"},md:{$$progressHeight:"$space$8",height:"$$progressHeight",br:"$$progressHeight"},lg:{$$progressHeight:"$space$10",height:"$$progressHeight",br:"$$progressHeight"},xl:{$$progressHeight:"$space$11",height:"$$progressHeight",br:"$$progressHeight"}},indeterminated:{true:{overflow:"hidden"}},squared:{true:{br:"calc($$progressHeight * 0.25)"}}},defaultVariants:{color:"default",status:"default",size:"md"}});exports.StyledProgress=s;const e=(0,r.styled)("div",{margin:0,padding:0,width:0,opacity:0,height:"100%",minWidth:"inherit",bg:"$$progressColor",br:"inherit",transition:"width 0.5s cubic-bezier(0.4, 0, 0.2, 1)","@motion":{transition:"none"},variants:{animated:{false:{transition:"none"}},shadow:{true:{normalShadowVar:"$$progressShadowColor"}},striped:{true:{backgroundImage:"linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 75%, transparent 75%, transparent)",backgroundSize:"$space$lg $space$lg"}},indeterminated:{true:{position:"absolute",width:"0%",transitionProperty:"background-color, width, left, border-color,opacity, shadow, transform",transitionDuration:"300ms",willChange:"left",minWidth:"50%",animation:`1s ease 0s infinite normal none running ${o}`}}}});exports.StyledProgressBar=e;
1
+ exports.__esModule=!0,exports.StyledProgressBar=exports.StyledProgress=void 0;var r=require("../theme/stitches.config");const o=(0,r.keyframes)({"0%":{left:"-40%"},"100%":{left:"100%"}}),s=(0,r.styled)("div",{margin:0,padding:0,width:"100%",position:"relative",overflow:"hidden",variants:{color:{default:{$$progressColor:"$colors$primary",$$progressShadowColor:"$colors$primaryShadow"},primary:{$$progressColor:"$colors$primary",$$progressShadowColor:"$colors$primaryShadow"},secondary:{$$progressColor:"$colors$secondary",$$progressShadowColor:"$colors$secondaryShadow"},success:{$$progressColor:"$colors$success",$$progressShadowColor:"$colors$successShadow"},warning:{$$progressColor:"$colors$warning",$$progressShadowColor:"$colors$warningShadow"},error:{$$progressColor:"$colors$error",$$progressShadowColor:"$colors$errorShadow"},gradient:{$$progressColor:"$colors$gradient",$$progressShadowColor:"$colors$primaryShadow"}},status:{default:{bg:"$accents2"},primary:{bg:"$primaryLight"},secondary:{bg:"$secondaryLight"},success:{bg:"$successLight"},warning:{bg:"$warningLight"},error:{bg:"$errorLight"}},size:{xs:{$$progressHeight:"$space$2",height:"$$progressHeight",br:"$$progressHeight"},sm:{$$progressHeight:"$space$4",height:"$$progressHeight",br:"$$progressHeight"},md:{$$progressHeight:"$space$8",height:"$$progressHeight",br:"$$progressHeight"},lg:{$$progressHeight:"$space$10",height:"$$progressHeight",br:"$$progressHeight"},xl:{$$progressHeight:"$space$11",height:"$$progressHeight",br:"$$progressHeight"}},indeterminated:{true:{overflow:"hidden"}},squared:{true:{br:"calc($$progressHeight * 0.25)"}}},defaultVariants:{color:"default",status:"default",size:"md"}});exports.StyledProgress=s;const e=(0,r.styled)("div",{margin:0,padding:0,width:0,opacity:0,height:"100%",minWidth:"inherit",bg:"$$progressColor",br:"inherit",transition:"width 0.5s cubic-bezier(0.4, 0, 0.2, 1)","@motion":{transition:"none"},variants:{animated:{false:{transition:"none"}},shadow:{true:{normalShadowVar:"$$progressShadowColor"}},striped:{true:{backgroundImage:"linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 75%, transparent 75%, transparent)",backgroundSize:"$space$lg $space$lg"}},indeterminated:{true:{position:"absolute",width:"0%",transitionProperty:"background-color, width, left, border-color,opacity, shadow, transform",transitionDuration:"300ms",willChange:"left",minWidth:"50%",animation:`1s ease 0s infinite normal none running ${o}`}}}});exports.StyledProgressBar=e;
@@ -1 +1 @@
1
- var e=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.default=void 0;var t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,r&&r.set(e,o);return o}(require("react")),r=e(require("../utils/with-defaults")),o=e(require("../use-click-away")),n=e(require("./tooltip-content")),i=require("./tooltip.styles"),l=require("react/jsx-runtime");function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const s=({children:e,initialVisible:r,content:a,offset:s,placement:u,portalClassName:c,enterDelay:d,leaveDelay:f,trigger:p,rounded:b,animated:v,shadow:h,className:m,color:w,contentColor:y,onVisibleChange:g,hideArrow:x,css:k,triggerCss:j,onClick:C,keepMounted:D,visible:M,isDisabled:q,...O})=>{const N=(0,t.useRef)(),P=(0,t.useRef)(null),[T,V]=(0,t.useState)(r),_={animated:v,visible:T,css:k,shadow:h,offset:s,placement:u,rounded:b,color:w,contentColor:y,hideArrow:x,parent:P,className:c},A=e=>{const t=()=>{clearTimeout(N.current),N.current=void 0},r=e=>{V(e),g(e),t()};t(),N.current=e?window.setTimeout((()=>r(!0)),d):window.setTimeout((()=>r(!1)),f)},R=e=>{"hover"===p&&A(e)};return(0,o.default)(P,(()=>"click"===p&&!D&&A(!1))),(0,t.useEffect)((()=>{void 0!==M&&A(M)}),[M]),(0,l.jsxs)(i.StyledTooltipTrigger,{ref:P,className:`nextui-tooltip-button ${m}`,css:j,role:"button",tabIndex:-1,onBlur:()=>R(!1),onClick:()=>{"click"===p&&A(!T),null==C||C()},onFocus:()=>R(!0),onKeyUp:()=>R(!0),onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),...O,children:[e,a&&!q?(0,l.jsx)(n.default,{..._,children:a}):null]})};s.toString=()=>".nextui-tooltip";var u=(0,r.default)(s,{initialVisible:!1,hideArrow:!1,animated:!0,shadow:!0,rounded:!1,keepMounted:!1,isDisabled:!1,trigger:"hover",enterDelay:0,leaveDelay:0,className:"",portalClassName:"",onVisibleChange:()=>{}});exports.default=u,module.exports=exports.default;
1
+ var e=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.default=void 0;var t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,r&&r.set(e,o);return o}(require("react")),r=e(require("../utils/with-defaults")),o=e(require("../use-click-away")),n=e(require("./tooltip-content")),i=require("./tooltip.styles"),l=require("react/jsx-runtime");function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const s=({children:e,initialVisible:r,content:a,offset:s,placement:u,portalClassName:c,enterDelay:d,leaveDelay:f,trigger:p,rounded:b,animated:v,shadow:h,className:m,color:w,contentColor:y,onVisibleChange:g,hideArrow:x,css:k,triggerCss:C,onClick:j,keepMounted:D,visible:M,isDisabled:q,...O})=>{const N=(0,t.useRef)(),P=(0,t.useRef)(null),[T,V]=(0,t.useState)(r),_={animated:v,visible:T,css:k,shadow:h,offset:s,placement:u,rounded:b,color:w,contentColor:y,hideArrow:x,parent:P,className:c},A=e=>{const t=()=>{clearTimeout(N.current),N.current=void 0},r=e=>{V(e),g(e),t()};t(),N.current=e?window.setTimeout((()=>r(!0)),d):window.setTimeout((()=>r(!1)),f)},R=e=>{"hover"===p&&A(e)};return(0,o.default)(P,(()=>"click"===p&&!D&&A(!1))),(0,t.useEffect)((()=>{void 0!==M&&A(M)}),[M]),(0,l.jsxs)(i.StyledTooltipTrigger,{ref:P,className:`nextui-tooltip-button ${m}`,css:C,role:"button",tabIndex:-1,onBlur:()=>R(!1),onClickCapture:()=>{"click"===p&&A(!T),null==j||j()},onFocus:()=>R(!0),onKeyUp:()=>R(!0),onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),...O,children:[e,a&&!q?(0,l.jsx)(n.default,{..._,children:a}):null]})};s.toString=()=>".nextui-tooltip";var u=(0,r.default)(s,{initialVisible:!1,hideArrow:!1,animated:!0,shadow:!0,rounded:!1,keepMounted:!1,isDisabled:!1,trigger:"hover",enterDelay:0,leaveDelay:0,className:"",portalClassName:"",onVisibleChange:()=>{}});exports.default=u,module.exports=exports.default;
@@ -1 +1 @@
1
- import{styled as r}from"../theme/stitches.config";import{cssFocusVisible as o}from"../theme/shared-css";import{StyledDrip as t}from"../utils/drip";export const StyledButton=r("button",{$$buttonBorderRadius:"$radii$md",$$buttonPressedScale:.97,dflex:"center",appearance:"none",boxSizing:"border-box",fontWeight:"$medium",us:"none",lineHeight:"$sm",ta:"center",whiteSpace:"nowrap",transition:"$button",position:"relative",overflow:"hidden",border:"none",cursor:"pointer",pe:"auto",p:0,br:"$$buttonBorderRadius","@motion":{transition:"none"},".nextui-button-text":{dflex:"center",zIndex:"$2","p, pre, div":{margin:0}},[`& ${t}`]:{zIndex:"$1",".nextui-drip-filler":{opacity:.25,fill:"$accents2"}},variants:{bordered:{true:{bg:"transparent",borderStyle:"solid",color:"$text"}},ghost:{true:{}},color:{default:{bg:"$primary",color:"$primarySolidContrast"},primary:{bg:"$primary",color:"$primarySolidContrast"},secondary:{bg:"$secondary",color:"$secondarySolidContrast"},success:{bg:"$success",color:"$successSolidContrast"},warning:{bg:"$warning",color:"$warningSolidContrast"},error:{bg:"$error",color:"$errorSolidContrast"},gradient:{bg:"$gradient",color:"$primarySolidContrast"}},size:{xs:{$$buttonPadding:"$space$3",$$buttonBorderRadius:"$radii$xs",$$buttonHeight:"$space$10",px:"$3",height:"$$buttonHeight",lh:"$space$10",width:"auto",minWidth:"$20",fontSize:"$xs"},sm:{$$buttonPadding:"$space$5",$$buttonBorderRadius:"$radii$sm",$$buttonHeight:"$space$12",px:"$5",height:"$$buttonHeight",lh:"$space$14",width:"auto",minWidth:"$36",fontSize:"$sm"},md:{$$buttonPadding:"$space$7",$$buttonBorderRadius:"$radii$md",$$buttonHeight:"$space$14",px:"$7",height:"$$buttonHeight",lh:"$space$14",width:"auto",minWidth:"$48",fontSize:"$sm"},lg:{$$buttonPadding:"$space$9",$$buttonBorderRadius:"$radii$base",$$buttonHeight:"$space$16",px:"$9",height:"$$buttonHeight",lh:"$space$15",width:"auto",minWidth:"$60",fontSize:"$md"},xl:{$$buttonPadding:"$space$10",$$buttonBorderRadius:"$radii$xl",$$buttonHeight:"$space$18",px:"$10",height:"$$buttonHeight",lh:"$space$17",width:"auto",minWidth:"$72",fontSize:"$lg"}},borderWeight:{light:{bw:"$light",$$buttonBorderWeight:"$borderWeights$light"},normal:{bw:"$normal",$$buttonBorderWeight:"$borderWeights$normal"},bold:{bw:"$bold",$$buttonBorderWeight:"$borderWeights$bold"},extrabold:{bw:"$extrabold",$$buttonBorderWeight:"$borderWeights$extrabold"},black:{bw:"$black",$$buttonBorderWeight:"$borderWeights$black"}},flat:{true:{color:"$text"}},light:{true:{bg:"transparent",[`& ${t}`]:{".nextui-drip-filler":{opacity:.8,fill:"$accents2"}}}},shadow:{true:{bs:"$sm"}},animated:{false:{transition:"none"}},auto:{true:{width:"auto",minWidth:"min-content"}},rounded:{true:{$$buttonBorderRadius:"$radii$pill"}},isPressed:{true:{}},isHovered:{true:{}},isChildLess:{true:{p:0,width:"$$buttonHeight",height:"$$buttonHeight"}}},compoundVariants:[{isPressed:!0,animated:!0,css:{transform:"scale($$buttonPressedScale)"}},{auto:!0,isChildLess:!1,size:"xs",css:{px:"$5",minWidth:"min-content"}},{auto:!0,isChildLess:!1,size:"sm",css:{px:"$8",minWidth:"min-content"}},{auto:!0,isChildLess:!1,size:"md",css:{px:"$9",minWidth:"min-content"}},{auto:!0,isChildLess:!1,size:"lg",css:{px:"$10",minWidth:"min-content"}},{auto:!0,isChildLess:!1,size:"xl",css:{px:"$11",minWidth:"min-content"}},{shadow:!0,color:"default",css:{normalShadow:"$primaryShadow"}},{shadow:!0,color:"primary",css:{normalShadow:"$primaryShadow"}},{shadow:!0,color:"secondary",css:{normalShadow:"$secondaryShadow"}},{shadow:!0,color:"warning",css:{normalShadow:"$warningShadow"}},{shadow:!0,color:"success",css:{normalShadow:"$successShadow"}},{shadow:!0,color:"error",css:{normalShadow:"$errorShadow"}},{shadow:!0,color:"gradient",css:{normalShadow:"$primaryShadow"}},{light:!0,color:"default",css:{bg:"transparent",color:"$text",[`& ${t}`]:{".nextui-drip-filler":{opacity:.8,fill:"$primaryLightActive"}}}},{light:!0,color:"primary",css:{bg:"transparent",color:"$primary",[`& ${t}`]:{".nextui-drip-filler":{opacity:.8,fill:"$primaryLightActive"}}}},{light:!0,color:"secondary",css:{bg:"transparent",color:"$secondary",[`& ${t}`]:{".nextui-drip-filler":{opacity:.8,fill:"$secondaryLightActive"}}}},{light:!0,color:"warning",css:{bg:"transparent",color:"$warning",[`& ${t}`]:{".nextui-drip-filler":{opacity:.8,fill:"$warningLightActive"}}}},{light:!0,color:"success",css:{bg:"transparent",color:"$success",[`& ${t}`]:{".nextui-drip-filler":{opacity:.8,fill:"$successLightActive"}}}},{light:!0,color:"error",css:{bg:"transparent",color:"$error",[`& ${t}`]:{".nextui-drip-filler":{opacity:.8,fill:"$errorLightActive"}}}},{bordered:!0,color:"default",css:{bg:"transparent",borderColor:"$primary",color:"$primary",[`& ${t}`]:{".nextui-drip-filler":{fill:"$primary"}}}},{bordered:!0,color:"primary",css:{bg:"transparent",borderColor:"$primary",color:"$primary",[`& ${t}`]:{".nextui-drip-filler":{fill:"$primary"}}}},{bordered:!0,color:"secondary",css:{bg:"transparent",borderColor:"$secondary",color:"$secondary",[`& ${t}`]:{".nextui-drip-filler":{fill:"$secondary"}}}},{bordered:!0,color:"success",css:{bg:"transparent",borderColor:"$success",color:"$success",[`& ${t}`]:{".nextui-drip-filler":{fill:"$success"}}}},{bordered:!0,color:"warning",css:{bg:"transparent",borderColor:"$warning",color:"$warning",[`& ${t}`]:{".nextui-drip-filler":{fill:"$warning"}}}},{bordered:!0,color:"error",css:{bg:"transparent",borderColor:"$error",color:"$error",[`& ${t}`]:{".nextui-drip-filler":{fill:"$error"}}}},{bordered:!0,color:"gradient",css:{bg:"transparent",color:"$text",padding:"$$buttonBorderWeight",bgClip:"content-box, border-box",borderColor:"$primary",backgroundImage:"linear-gradient($background, $background), $gradient",border:"none",[`& ${t}`]:{".nextui-drip-filler":{fill:"$secondary"}}}},{ghost:!0,isHovered:!0,color:"default",css:{bg:"$primary",color:"$primarySolidContrast"}},{ghost:!0,isHovered:!0,color:"primary",css:{bg:"$primary",color:"$primarySolidContrast"}},{ghost:!0,isHovered:!0,color:"secondary",css:{bg:"$secondary",color:"$secondarySolidContrast"}},{ghost:!0,isHovered:!0,color:"success",css:{bg:"$success",color:"$successSolidContrast"}},{ghost:!0,isHovered:!0,color:"warning",css:{bg:"$warning",color:"$warningSolidContrast"}},{ghost:!0,isHovered:!0,color:"error",css:{bg:"$error",color:"$errorSolidContrast"}},{ghost:!0,color:"gradient",isHovered:!0,css:{bg:"$gradient",color:"$white"}},{flat:!0,color:"default",css:{bg:"$primaryLight",color:"$primaryLightContrast",[`& ${t}`]:{".nextui-drip-filler":{opacity:.4,fill:"$primary"}}}},{flat:!0,color:"primary",css:{bg:"$primaryLight",color:"$primaryLightContrast",[`& ${t}`]:{".nextui-drip-filler":{opacity:.4,fill:"$primary"}}}},{flat:!0,color:"secondary",css:{bg:"$secondaryLight",color:"$secondaryLightContrast",[`& ${t}`]:{".nextui-drip-filler":{opacity:.4,fill:"$secondary"}}}},{flat:!0,color:"success",css:{bg:"$successLight",color:"$successLightContrast",[`& ${t}`]:{".nextui-drip-filler":{opacity:.4,fill:"$success"}}}},{flat:!0,color:"warning",css:{bg:"$warningLight",color:"$warningLightContrast",[`& ${t}`]:{".nextui-drip-filler":{opacity:.4,fill:"$warning"}}}},{flat:!0,color:"error",css:{bg:"$errorLight",color:"$errorLightContrast",[`& ${t}`]:{".nextui-drip-filler":{opacity:.4,fill:"$error"}}}},{flat:!0,isHovered:!0,color:"default",css:{bg:"$primaryLightHover"}},{flat:!0,isHovered:!0,color:"primary",css:{bg:"$primaryLightHover"}},{flat:!0,isHovered:!0,color:"secondary",css:{bg:"$secondaryLightHover"}},{flat:!0,isHovered:!0,color:"success",css:{bg:"$successLightHover"}},{flat:!0,isHovered:!0,color:"warning",css:{bg:"$warningLightHover"}},{flat:!0,isHovered:!0,color:"error",css:{bg:"$errorLightHover"}},{flat:!0,isPressed:!0,color:"default",css:{bg:"$primaryLightActive"}},{flat:!0,isPressed:!0,color:"primary",css:{bg:"$primaryLightActive"}},{flat:!0,isPressed:!0,color:"secondary",css:{bg:"$secondaryLightActive"}},{flat:!0,isPressed:!0,color:"success",css:{bg:"$successLightActive"}},{flat:!0,isPressed:!0,color:"warning",css:{bg:"$warningLightActive"}},{flat:!0,isPressed:!0,color:"error",css:{bg:"$errorLightActive"}},{auto:!0,color:"gradient",bordered:!0,css:{".nextui-button-text":{px:"$$buttonPadding"},".nextui-button-icon":{ml:"$$buttonPadding"},".nextui-button-icon-right":{mr:"$$buttonPadding"},".nextui-button-text-left":{pl:0},".nextui-button-text-right":{pr:0}}},{rounded:!0,size:"xs",css:{br:"$pill"}},{rounded:!0,size:"sm",css:{br:"$pill"}},{rounded:!0,size:"md",css:{br:"$pill"}},{rounded:!0,size:"lg",css:{br:"$pill"}},{rounded:!0,size:"xl",css:{br:"$pill"}}],defaultVariants:{color:"default",borderWeight:"normal",animated:!0,size:"md"}},o);export default StyledButton;
1
+ import{styled as r}from"../theme/stitches.config";import{cssFocusVisible as o}from"../theme/shared-css";import{StyledDrip as i}from"../utils/drip";export const StyledButton=r("button",{$$buttonBorderRadius:"$radii$md",$$buttonPressedScale:.97,dflex:"center",appearance:"none",boxSizing:"border-box",fontWeight:"$medium",us:"none",lineHeight:"$sm",ta:"center",whiteSpace:"nowrap",transition:"$button",position:"relative",overflow:"hidden",border:"none",cursor:"pointer",pe:"auto",p:0,br:"$$buttonBorderRadius","@motion":{transition:"none"},".nextui-button-text":{dflex:"center",zIndex:"$2","p, pre, div":{margin:0}},[`& ${i}`]:{zIndex:"$1",".nextui-drip-filler":{opacity:.25,fill:"$accents2"}},variants:{bordered:{true:{bg:"transparent",borderStyle:"solid",color:"$text"}},ghost:{true:{}},color:{default:{bg:"$primary",color:"$primarySolidContrast"},primary:{bg:"$primary",color:"$primarySolidContrast"},secondary:{bg:"$secondary",color:"$secondarySolidContrast"},success:{bg:"$success",color:"$successSolidContrast"},warning:{bg:"$warning",color:"$warningSolidContrast"},error:{bg:"$error",color:"$errorSolidContrast"},gradient:{bg:"$gradient",color:"$primarySolidContrast"}},size:{xs:{$$buttonPadding:"$space$3",$$buttonBorderRadius:"$radii$xs",$$buttonHeight:"$space$10",px:"$3",height:"$$buttonHeight",lh:"$space$10",width:"auto",minWidth:"$20",fontSize:"$xs"},sm:{$$buttonPadding:"$space$5",$$buttonBorderRadius:"$radii$sm",$$buttonHeight:"$space$12",px:"$5",height:"$$buttonHeight",lh:"$space$14",width:"auto",minWidth:"$36",fontSize:"$sm"},md:{$$buttonPadding:"$space$7",$$buttonBorderRadius:"$radii$md",$$buttonHeight:"$space$14",px:"$7",height:"$$buttonHeight",lh:"$space$14",width:"auto",minWidth:"$48",fontSize:"$sm"},lg:{$$buttonPadding:"$space$9",$$buttonBorderRadius:"$radii$base",$$buttonHeight:"$space$16",px:"$9",height:"$$buttonHeight",lh:"$space$15",width:"auto",minWidth:"$60",fontSize:"$md"},xl:{$$buttonPadding:"$space$10",$$buttonBorderRadius:"$radii$xl",$$buttonHeight:"$space$18",px:"$10",height:"$$buttonHeight",lh:"$space$17",width:"auto",minWidth:"$72",fontSize:"$lg"}},borderWeight:{light:{bw:"$light",$$buttonBorderWeight:"$borderWeights$light"},normal:{bw:"$normal",$$buttonBorderWeight:"$borderWeights$normal"},bold:{bw:"$bold",$$buttonBorderWeight:"$borderWeights$bold"},extrabold:{bw:"$extrabold",$$buttonBorderWeight:"$borderWeights$extrabold"},black:{bw:"$black",$$buttonBorderWeight:"$borderWeights$black"}},flat:{true:{color:"$text"}},light:{true:{bg:"transparent",[`& ${i}`]:{".nextui-drip-filler":{opacity:.8,fill:"$accents2"}}}},shadow:{true:{bs:"$sm"}},animated:{false:{transition:"none"}},auto:{true:{width:"auto",minWidth:"min-content"}},rounded:{true:{$$buttonBorderRadius:"$radii$pill"}},isPressed:{true:{}},isHovered:{true:{}},isChildLess:{true:{p:0,width:"$$buttonHeight",height:"$$buttonHeight"}},isFocusVisible:{true:{},false:{}}},compoundVariants:[{isPressed:!0,animated:!0,css:{transform:"scale($$buttonPressedScale)"}},{auto:!0,isChildLess:!1,size:"xs",css:{px:"$5",minWidth:"min-content"}},{auto:!0,isChildLess:!1,size:"sm",css:{px:"$8",minWidth:"min-content"}},{auto:!0,isChildLess:!1,size:"md",css:{px:"$9",minWidth:"min-content"}},{auto:!0,isChildLess:!1,size:"lg",css:{px:"$10",minWidth:"min-content"}},{auto:!0,isChildLess:!1,size:"xl",css:{px:"$11",minWidth:"min-content"}},{shadow:!0,isFocusVisible:!1,color:"default",css:{normalShadow:"$primaryShadow"}},{shadow:!0,isFocusVisible:!1,color:"primary",css:{normalShadow:"$primaryShadow"}},{shadow:!0,isFocusVisible:!1,color:"secondary",css:{normalShadow:"$secondaryShadow"}},{shadow:!0,isFocusVisible:!1,color:"warning",css:{normalShadow:"$warningShadow"}},{shadow:!0,isFocusVisible:!1,color:"success",css:{normalShadow:"$successShadow"}},{shadow:!0,isFocusVisible:!1,color:"error",css:{normalShadow:"$errorShadow"}},{shadow:!0,isFocusVisible:!1,color:"gradient",css:{normalShadow:"$primaryShadow"}},{light:!0,color:"default",css:{bg:"transparent",color:"$text",[`& ${i}`]:{".nextui-drip-filler":{opacity:.8,fill:"$primaryLightActive"}}}},{light:!0,color:"primary",css:{bg:"transparent",color:"$primary",[`& ${i}`]:{".nextui-drip-filler":{opacity:.8,fill:"$primaryLightActive"}}}},{light:!0,color:"secondary",css:{bg:"transparent",color:"$secondary",[`& ${i}`]:{".nextui-drip-filler":{opacity:.8,fill:"$secondaryLightActive"}}}},{light:!0,color:"warning",css:{bg:"transparent",color:"$warning",[`& ${i}`]:{".nextui-drip-filler":{opacity:.8,fill:"$warningLightActive"}}}},{light:!0,color:"success",css:{bg:"transparent",color:"$success",[`& ${i}`]:{".nextui-drip-filler":{opacity:.8,fill:"$successLightActive"}}}},{light:!0,color:"error",css:{bg:"transparent",color:"$error",[`& ${i}`]:{".nextui-drip-filler":{opacity:.8,fill:"$errorLightActive"}}}},{bordered:!0,color:"default",css:{bg:"transparent",borderColor:"$primary",color:"$primary",[`& ${i}`]:{".nextui-drip-filler":{fill:"$primary"}}}},{bordered:!0,color:"primary",css:{bg:"transparent",borderColor:"$primary",color:"$primary",[`& ${i}`]:{".nextui-drip-filler":{fill:"$primary"}}}},{bordered:!0,color:"secondary",css:{bg:"transparent",borderColor:"$secondary",color:"$secondary",[`& ${i}`]:{".nextui-drip-filler":{fill:"$secondary"}}}},{bordered:!0,color:"success",css:{bg:"transparent",borderColor:"$success",color:"$success",[`& ${i}`]:{".nextui-drip-filler":{fill:"$success"}}}},{bordered:!0,color:"warning",css:{bg:"transparent",borderColor:"$warning",color:"$warning",[`& ${i}`]:{".nextui-drip-filler":{fill:"$warning"}}}},{bordered:!0,color:"error",css:{bg:"transparent",borderColor:"$error",color:"$error",[`& ${i}`]:{".nextui-drip-filler":{fill:"$error"}}}},{bordered:!0,color:"gradient",css:{bg:"transparent",color:"$text",padding:"$$buttonBorderWeight",bgClip:"content-box, border-box",borderColor:"$primary",backgroundImage:"linear-gradient($background, $background), $gradient",border:"none",[`& ${i}`]:{".nextui-drip-filler":{fill:"$secondary"}}}},{ghost:!0,isHovered:!0,color:"default",css:{bg:"$primary",color:"$primarySolidContrast"}},{ghost:!0,isHovered:!0,color:"primary",css:{bg:"$primary",color:"$primarySolidContrast"}},{ghost:!0,isHovered:!0,color:"secondary",css:{bg:"$secondary",color:"$secondarySolidContrast"}},{ghost:!0,isHovered:!0,color:"success",css:{bg:"$success",color:"$successSolidContrast"}},{ghost:!0,isHovered:!0,color:"warning",css:{bg:"$warning",color:"$warningSolidContrast"}},{ghost:!0,isHovered:!0,color:"error",css:{bg:"$error",color:"$errorSolidContrast"}},{ghost:!0,color:"gradient",isHovered:!0,css:{bg:"$gradient",color:"$white"}},{flat:!0,color:"default",css:{bg:"$primaryLight",color:"$primaryLightContrast",[`& ${i}`]:{".nextui-drip-filler":{opacity:.4,fill:"$primary"}}}},{flat:!0,color:"primary",css:{bg:"$primaryLight",color:"$primaryLightContrast",[`& ${i}`]:{".nextui-drip-filler":{opacity:.4,fill:"$primary"}}}},{flat:!0,color:"secondary",css:{bg:"$secondaryLight",color:"$secondaryLightContrast",[`& ${i}`]:{".nextui-drip-filler":{opacity:.4,fill:"$secondary"}}}},{flat:!0,color:"success",css:{bg:"$successLight",color:"$successLightContrast",[`& ${i}`]:{".nextui-drip-filler":{opacity:.4,fill:"$success"}}}},{flat:!0,color:"warning",css:{bg:"$warningLight",color:"$warningLightContrast",[`& ${i}`]:{".nextui-drip-filler":{opacity:.4,fill:"$warning"}}}},{flat:!0,color:"error",css:{bg:"$errorLight",color:"$errorLightContrast",[`& ${i}`]:{".nextui-drip-filler":{opacity:.4,fill:"$error"}}}},{flat:!0,isHovered:!0,color:"default",css:{bg:"$primaryLightHover"}},{flat:!0,isHovered:!0,color:"primary",css:{bg:"$primaryLightHover"}},{flat:!0,isHovered:!0,color:"secondary",css:{bg:"$secondaryLightHover"}},{flat:!0,isHovered:!0,color:"success",css:{bg:"$successLightHover"}},{flat:!0,isHovered:!0,color:"warning",css:{bg:"$warningLightHover"}},{flat:!0,isHovered:!0,color:"error",css:{bg:"$errorLightHover"}},{flat:!0,isPressed:!0,color:"default",css:{bg:"$primaryLightActive"}},{flat:!0,isPressed:!0,color:"primary",css:{bg:"$primaryLightActive"}},{flat:!0,isPressed:!0,color:"secondary",css:{bg:"$secondaryLightActive"}},{flat:!0,isPressed:!0,color:"success",css:{bg:"$successLightActive"}},{flat:!0,isPressed:!0,color:"warning",css:{bg:"$warningLightActive"}},{flat:!0,isPressed:!0,color:"error",css:{bg:"$errorLightActive"}},{auto:!0,color:"gradient",bordered:!0,css:{".nextui-button-text":{px:"$$buttonPadding"},".nextui-button-icon":{ml:"$$buttonPadding"},".nextui-button-icon-right":{mr:"$$buttonPadding"},".nextui-button-text-left":{pl:0},".nextui-button-text-right":{pr:0}}},{rounded:!0,size:"xs",css:{br:"$pill"}},{rounded:!0,size:"sm",css:{br:"$pill"}},{rounded:!0,size:"md",css:{br:"$pill"}},{rounded:!0,size:"lg",css:{br:"$pill"}},{rounded:!0,size:"xl",css:{br:"$pill"}}],defaultVariants:{color:"default",borderWeight:"normal",animated:!0,size:"md"}},o);export default StyledButton;
@@ -1 +1 @@
1
- import{useCallback as r}from"react";import{useFocusRing as i}from"@react-aria/focus";import{mergeProps as e}from"@react-aria/utils";import{usePress as s}from"@react-aria/interactions";import{useHover as o}from"@react-aria/interactions";import a from"../use-drip";import{useDOMRef as t}from"../utils/dom";export const useCard=l=>{const{ref:n,disableAnimation:c=!1,disableRipple:p=!1,variant:d="shadow",isHoverable:u=!1,borderWeight:m="light",isPressable:b=!1,onClick:P,onPress:f,autoFocus:v,allowTextSelectionOnPress:C=!0,...g}=l,h=t(n),{onClick:k,...F}=a(!1,h),H=r=>{c||p||!h.current||k(r)},{isPressed:T,pressProps:w}=s({isDisabled:!b,onPress:r=>{"keyboard"!==r.pointerType&&"virtual"!==r.pointerType||(H(r),null==P||P(r)),null==f||f(r)},allowTextSelectionOnPress:C,...g}),{hoverProps:x,isHovered:y}=o({isDisabled:!u,...g}),{isFocusVisible:D,focusProps:R}=i({autoFocus:v});w.onClick=r=>{b&&(H(r),null==P||P(r))};const A=r(((r={})=>({...e(b?{...w,...R}:{},u?x:{},g,r)})),[b,u,w,R,x,g]);return{cardRef:h,variant:d,borderWeight:m,isPressable:b,isHovered:y,isPressed:T,disableAnimation:c,disableRipple:p,dripBindings:F,onDripClickHandler:k,isFocusVisible:D,getCardProps:A}};
1
+ import{useCallback as r}from"react";import{useFocusRing as e}from"@react-aria/focus";import{mergeProps as i}from"@react-aria/utils";import{usePress as s,useHover as o}from"@react-aria/interactions";import a from"../use-drip";import{useDOMRef as t}from"../utils/dom";export const useCard=l=>{const{ref:n,disableAnimation:p=!1,disableRipple:c=!1,variant:d="shadow",isHoverable:u=!1,borderWeight:m="light",isPressable:b=!1,onClick:P,onPress:f,autoFocus:v,allowTextSelectionOnPress:C=!0,...g}=l,h=t(n),{onClick:k,...F}=a(!1,h),H=r=>{p||c||!h.current||k(r)},{isPressed:T,pressProps:w}=s({isDisabled:!b,onPress:r=>{"keyboard"!==r.pointerType&&"virtual"!==r.pointerType||(H(r),null==P||P(r)),null==f||f(r)},allowTextSelectionOnPress:C,...g}),{hoverProps:x,isHovered:y}=o({isDisabled:!u,...g}),{isFocusVisible:D,focusProps:R}=e({autoFocus:v});w.onClick=r=>{b&&(H(r),null==P||P(r))};const A=r(((r={})=>({...i(b?{...w,...R}:{},u?x:{},g,r)})),[b,u,w,R,x,g]);return{cardRef:h,variant:d,borderWeight:m,isPressable:b,isHovered:y,isPressed:T,disableAnimation:p,disableRipple:c,dripBindings:F,onDripClickHandler:k,isFocusVisible:D,getCardProps:A}};
@@ -1 +1 @@
1
- import e,{useMemo as i}from"react";import{mergeProps as s}from"@react-aria/utils";import{useFocusRing as c}from"@react-aria/focus";import{useHover as a}from"@react-aria/interactions";import{usePress as o}from"@react-aria/interactions";import{VisuallyHidden as r}from"@react-aria/visually-hidden";import t from"../utils/clsx";import{__DEV__ as n}from"../utils/assertion";import{useFocusableRef as d}from"../utils/dom";import{useCheckbox as l}from"./use-checkbox";import{StyledCheckboxLabel as m,StyledCheckboxContainer as h,StyledCheckboxMask as u,StyledIconCheck as b,StyledIconCheckFirstLine as k,StyledIconCheckSecondLine as x,StyledCheckboxText as p}from"./checkbox.styles";import{jsx as f}from"react/jsx-runtime";import{jsxs as N}from"react/jsx-runtime";const A=e.forwardRef(((e,n)=>{const{className:A,as:C,css:I,children:v,label:D,...j}=e,{size:F,color:P,labelColor:R,isRounded:g,lineThrough:y,disableAnimation:z,isIndeterminate:H,inputRef:T,inputProps:V,containerCss:w}=l({...j,children:null!=v?v:D}),S=d(n,T),{hoverProps:U,isHovered:$}=a({isDisabled:V.disabled}),{pressProps:q}=o({isDisabled:V.disabled}),{focusProps:B,isFocusVisible:E}=c({autoFocus:V.autoFocus}),G=i((()=>$?"hovered":H&&V.checked?"mixed":V.checked?"checked":"uncheked"),[$,H,V.checked]);return N(m,{ref:S,...s(U,q,j),as:C,className:t("nextui-checkbox-label",`nextui-checkbox--${G}`,A),css:I,disableAnimation:z,isDisabled:V.disabled,size:F,children:[N(h,{className:"nextui-checkbox-container",color:P,css:w,disableAnimation:z,isDisabled:V.disabled,isFocusVisible:E,isHovered:$,isRounded:g,...B,children:[f(r,{children:f("input",{ref:T,className:"nextui-checkbox-input",...s(V,B)})}),f(u,{className:"nextui-checkbox-mask",disableAnimation:z,isChecked:V.checked,isIndeterminate:H,children:N(b,{className:"nextui-icon-check",disableAnimation:z,isChecked:V.checked,isIndeterminate:H,size:F,children:[f(k,{className:"nextui-icon-check-line1",disableAnimation:z,isChecked:V.checked,isIndeterminate:H}),f(x,{className:"nextui-icon-check-line2",disableAnimation:z,isChecked:V.checked,isIndeterminate:H})]})})]}),(v||D)&&f(p,{className:"nextui-checkbox-text",color:R,disableAnimation:z,isChecked:V.checked,isDisabled:V.disabled,lineThrough:y,children:v||D})]})}));n&&(A.displayName="NextUI.Checkbox"),A.toString=()=>".nextui-checkbox";export default A;
1
+ import e,{useMemo as i}from"react";import{mergeProps as s}from"@react-aria/utils";import{useFocusRing as c}from"@react-aria/focus";import{useHover as a,usePress as o}from"@react-aria/interactions";import{VisuallyHidden as r}from"@react-aria/visually-hidden";import t from"../utils/clsx";import{__DEV__ as n}from"../utils/assertion";import{useFocusableRef as d}from"../utils/dom";import{useCheckbox as l}from"./use-checkbox";import{StyledCheckboxLabel as m,StyledCheckboxContainer as h,StyledCheckboxMask as u,StyledIconCheck as b,StyledIconCheckFirstLine as k,StyledIconCheckSecondLine as x,StyledCheckboxText as p}from"./checkbox.styles";import{jsx as f}from"react/jsx-runtime";import{jsxs as N}from"react/jsx-runtime";const A=e.forwardRef(((e,n)=>{const{className:A,as:C,css:I,children:v,label:D,...j}=e,{size:F,color:P,labelColor:R,isRounded:g,lineThrough:y,disableAnimation:z,isIndeterminate:H,inputRef:T,inputProps:V,containerCss:w}=l({...j,children:null!=v?v:D}),S=d(n,T),{hoverProps:U,isHovered:$}=a({isDisabled:V.disabled}),{pressProps:q}=o({isDisabled:V.disabled}),{focusProps:B,isFocusVisible:E}=c({autoFocus:V.autoFocus}),G=i((()=>$?"hovered":H&&V.checked?"mixed":V.checked?"checked":"uncheked"),[$,H,V.checked]);return N(m,{ref:S,...s(U,q,j),as:C,className:t("nextui-checkbox-label",`nextui-checkbox--${G}`,A),css:I,disableAnimation:z,isDisabled:V.disabled,size:F,children:[N(h,{className:"nextui-checkbox-container",color:P,css:w,disableAnimation:z,isDisabled:V.disabled,isFocusVisible:E,isHovered:$,isRounded:g,...B,children:[f(r,{children:f("input",{ref:T,className:"nextui-checkbox-input",...s(V,B)})}),f(u,{className:"nextui-checkbox-mask",disableAnimation:z,isChecked:V.checked,isIndeterminate:H,children:N(b,{className:"nextui-icon-check",disableAnimation:z,isChecked:V.checked,isIndeterminate:H,size:F,children:[f(k,{className:"nextui-icon-check-line1",disableAnimation:z,isChecked:V.checked,isIndeterminate:H}),f(x,{className:"nextui-icon-check-line2",disableAnimation:z,isChecked:V.checked,isIndeterminate:H})]})})]}),(v||D)&&f(p,{className:"nextui-checkbox-text",color:R,disableAnimation:z,isChecked:V.checked,isDisabled:V.disabled,lineThrough:y,children:v||D})]})}));n&&(A.displayName="NextUI.Checkbox"),A.toString=()=>".nextui-checkbox";export default A;
@@ -1 +1 @@
1
- import e,{useEffect as t,useImperativeHandle as a,useMemo as r,useRef as l,useState as n}from"react";import{useLabel as i}from"@react-aria/label";import o from"../use-theme";import{warn as d}from"../utils/console";import s from"../utils/clear-icon";import c from"../utils/clsx";import{__DEV__ as u}from"../utils/assertion";import{StyledInput as p,StyledInputMainContainer as m,StyledInputContainer as h,StyledHelperTextContainer as f,StyledHelperText as b,StyledInputWrapper as $,StyledInputPlaceholder as g,StyledInputClearButton as y,StyledInputBlockLabel as C,StyledInputLabel as x,StyledInputContent as w}from"./input.styles";import{defaultProps as N}from"./input-props";import{jsx as v}from"react/jsx-runtime";import{jsxs as k}from"react/jsx-runtime";const S="nextui-input",R=e.forwardRef((({as:e="input",label:N,labelPlaceholder:R,labelLeft:I,labelRight:L,size:P,helperText:D,color:T,helperColor:B,status:F,contentLeft:j,contentRight:O,contentClickable:V,contentLeftStyling:q,contentRightStyling:U,onContentClick:W,initialValue:z,onChange:E,readOnly:A,value:G,onClearClick:H,clearable:J,shadow:K,animated:M,required:Q,width:X,className:Y,onBlur:Z,onFocus:_,autoComplete:ee,placeholder:te,fullWidth:ae,borderWeight:re,disabled:le,bordered:ne,underlined:ie,rounded:oe,css:de,...se},ce)=>{const ue=l(null);a(ce,(()=>ue.current));const[pe,me]=n(z),[he,fe]=n(!1),{isDark:be}=o(),$e=r((()=>void 0!==G),[G]),ge=r((()=>N||R),[N,R]),ye=r((()=>R?"":te),[te,R]),Ce=r((()=>ae?"100%":X||"initial"),[ae,X]);ie&&u&&(ne&&d("Using underlined and bordered at the same time will have no effect."),oe&&d("Using underlined and rounded at the same time will have no effect."));const xe=(e,t)=>{le||W&&W(e,t)};t((()=>{$e&&me(G)}),[$e,G]);const we=r((()=>"textarea"===e),[e]),Ne={...se,...$e?{value:pe}:{defaultValue:z}},{labelProps:ve,fieldProps:ke}=i({...Ne,label:ge}),Se=r((()=>he?"hover":le?"disabled":A?"read-only":pe?"with-value":"normal"),[he,le,A,pe]);return k(m,{borderWeight:re,className:c(`${S}-main-container`,`${S}-main-container--${Se}`),color:T,css:{width:Ce,...de},"data-state":Se,disabled:le,helperColor:B,rounded:oe,size:P,status:F,children:[ge&&v(C,{animated:M,asPlaceholder:!!R,bordered:ne,className:`${S}-block-label`,focused:he,hasContentLeft:!!j,htmlFor:"htmlFor"in ve?ve.htmlFor:"",id:ve.id,isTextarea:we,rounded:oe,underlined:ie,withValue:!!pe,children:ge}),v(h,{animated:M,className:c(`${S}-container`,`${S}-container--${Se}`,{[`${S}-container--input`]:!we,[`${S}-container--textarea`]:we,[`${S}-container--read-only`]:A},Y),focused:he,isReadOnly:A,isTextarea:we,underlined:ie,children:k($,{animated:M,as:ge?"div":"label",bordered:ne,className:c(`${S}-wrapper`,`${S}-wrapper--${Se}`,{[`${S}-wrapper--bordered`]:ne,[`${S}-wrapper--underlined`]:ie,[`${S}-wrapper--shadow`]:K}),disabled:le,focused:he,isReadOnly:A,isTextarea:we,shadow:K,underlined:ie,children:[!ge&&te&&v(g,{className:`${S}-placeholder`,children:te}),I&&v(x,{bordered:ne,className:`${S}-label--left`,isDark:be,isDefaultStatus:"default"===F,underlined:ie,children:I}),j&&v(w,{applyStyles:q,className:c(`${S}-content`,`${S}-content--left`),clickable:V,onClick:e=>xe("left",e),children:j}),v(p,{ref:ue,"aria-multiline":we,"aria-placeholder":ye,"aria-readonly":A,"aria-required":Q,as:e,autoComplete:ee,bordered:ne,className:c({[`${S}`]:!we,[`${S}-textarea`]:we,[`${S}-disabled`]:le,[`${S}-rounded`]:oe,[`${S}-${S}-right-content`]:O,[`${S}-left-content`]:j}),"data-state":Se,disabled:le,focused:he,hasLeftContent:!!j,hasRightContent:!!O,isTextarea:we,placeholder:ye,readOnly:A,required:Q,type:"text",onBlur:e=>{fe(!1),Z&&Z(e)},onChange:e=>{le||A||($e||me(e.target.value),E&&E(e))},onFocus:e=>{fe(!0),_&&_(e)},...Ne,...ke}),J&&v(y,{animated:M,className:`${S}-clear-button`,disabled:le||A,hasContentRight:!!O,type:"button",underlined:ie,visible:Boolean(pe),onClick:e=>{if(e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),$e||me(""),H&&H(e),!ue.current)return;const t=((e,t)=>({...t,target:e,currentTarget:e}))(ue.current,e);t.target.value="",E&&E(t),ue.current.focus()},children:v(s,{fill:"currentColor"})}),O&&v(w,{applyStyles:U,className:c(`${S}-content`,`${S}-content--right`),clickable:V,onClick:e=>xe("right",e),children:O}),L&&v(x,{bordered:ne,className:`${S}-label--right`,isDark:be,isDefaultStatus:"default"===F,isRight:!0,underlined:ie,children:L})]})}),v(f,{className:`${S}-helper-text-container`,withValue:!!D,children:D&&v(b,{className:`${S}-helper-text`,children:D})})]})}));R.displayName="NextUI.Input",R.defaultProps=N,R.toString=()=>".nextui-input";export default R;
1
+ import e,{useEffect as t,useImperativeHandle as a,useMemo as r,useRef as l,useState as n}from"react";import{useLabel as i}from"@react-aria/label";import{useFocusRing as o}from"@react-aria/focus";import s from"../use-theme";import{warn as d}from"../utils/console";import c from"../utils/clear-icon";import u from"../utils/clsx";import{__DEV__ as p}from"../utils/assertion";import{StyledInput as m,StyledInputMainContainer as h,StyledInputContainer as f,StyledHelperTextContainer as b,StyledHelperText as $,StyledInputWrapper as g,StyledInputPlaceholder as y,StyledInputClearButtonIconWrapper as C,StyledInputClearButton as x,StyledInputBlockLabel as w,StyledInputLabel as N,StyledInputContent as v}from"./input.styles";import{defaultProps as k}from"./input-props";import{jsx as S}from"react/jsx-runtime";import{jsxs as I}from"react/jsx-runtime";const R="nextui-input",P=e.forwardRef((({as:e="input",label:k,labelPlaceholder:P,labelLeft:F,labelRight:L,size:B,helperText:D,color:T,helperColor:V,status:j,contentLeft:O,contentRight:W,contentClickable:q,contentLeftStyling:U,contentRightStyling:z,onContentClick:E,initialValue:A,onChange:G,readOnly:H,value:J,onClearClick:K,clearable:M,shadow:Q,animated:X,required:Y,width:Z,className:_,onBlur:ee,onFocus:te,autoComplete:ae,placeholder:re,fullWidth:le,borderWeight:ne,disabled:ie,bordered:oe,underlined:se,rounded:de,css:ce,...ue},pe)=>{const me=l(null);a(pe,(()=>me.current));const[he,fe]=n(A),[be,$e]=n(!1),{isDark:ge}=s(),ye=r((()=>void 0!==J),[J]),Ce=r((()=>k||P),[k,P]),xe=r((()=>P?"":re),[re,P]),we=r((()=>le?"100%":Z||"initial"),[le,Z]);se&&p&&(oe&&d("Using underlined and bordered at the same time will have no effect."),de&&d("Using underlined and rounded at the same time will have no effect."));const Ne=(e,t)=>{ie||E&&E(e,t)};t((()=>{ye&&fe(J)}),[ye,J]);const ve=r((()=>"textarea"===e),[e]),ke={...ue,...ye?{value:he}:{defaultValue:A}},{isFocusVisible:Se,focusProps:Ie}=o(),{labelProps:Re,fieldProps:Pe}=i({...ke,label:Ce}),Fe=r((()=>be?"hover":ie?"disabled":H?"read-only":he?"with-value":"normal"),[be,ie,H,he]);return I(h,{borderWeight:ne,className:u(`${R}-main-container`,`${R}-main-container--${Fe}`),color:T,css:{width:we,...ce},"data-state":Fe,disabled:ie,helperColor:V,rounded:de,size:B,status:j,children:[Ce&&S(w,{animated:X,asPlaceholder:!!P,bordered:oe,className:`${R}-block-label`,focused:be,hasContentLeft:!!O,htmlFor:"htmlFor"in Re?Re.htmlFor:"",id:Re.id,isTextarea:ve,rounded:de,underlined:se,withValue:!!he,children:Ce}),S(f,{animated:X,className:u(`${R}-container`,`${R}-container--${Fe}`,{[`${R}-container--input`]:!ve,[`${R}-container--textarea`]:ve,[`${R}-container--read-only`]:H},_),focused:be,isReadOnly:H,isTextarea:ve,underlined:se,children:I(g,{animated:X,as:Ce?"div":"label",bordered:oe,className:u(`${R}-wrapper`,`${R}-wrapper--${Fe}`,{[`${R}-wrapper--bordered`]:oe,[`${R}-wrapper--underlined`]:se,[`${R}-wrapper--shadow`]:Q}),disabled:ie,focused:be,isReadOnly:H,isTextarea:ve,shadow:Q,underlined:se,children:[!Ce&&re&&S(y,{className:`${R}-placeholder`,children:re}),F&&S(N,{bordered:oe,className:`${R}-label--left`,isDark:ge,isDefaultStatus:"default"===j,underlined:se,children:F}),O&&S(v,{applyStyles:U,className:u(`${R}-content`,`${R}-content--left`),clickable:q,onClick:e=>Ne("left",e),children:O}),S(m,{ref:me,"aria-multiline":ve,"aria-placeholder":xe,"aria-readonly":H,"aria-required":Y,as:e,autoComplete:ae,bordered:oe,className:u({[`${R}`]:!ve,[`${R}-textarea`]:ve,[`${R}-disabled`]:ie,[`${R}-rounded`]:de,[`${R}-${R}-right-content`]:W,[`${R}-left-content`]:O}),"data-state":Fe,disabled:ie,focused:be,hasLeftContent:!!O,hasRightContent:!!W,isTextarea:ve,placeholder:xe,readOnly:H,required:Y,type:"text",onBlur:e=>{$e(!1),ee&&ee(e)},onChange:e=>{ie||H||(ye||fe(e.target.value),G&&G(e))},onFocus:e=>{$e(!0),te&&te(e)},...ke,...Pe}),M&&S(x,{animated:X,"aria-label":"clear",className:`${R}-clear-button`,disabled:ie||H,hasContentRight:!!W,lang:"en",type:"button",underlined:se,visible:Boolean(he),onClick:e=>{if(e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),ye||fe(""),K&&K(e),!me.current)return;const t=((e,t)=>({...t,target:e,currentTarget:e}))(me.current,e);t.target.value="",G&&G(t),me.current.focus()},...Ie,children:S(C,{isFocusVisible:Se,children:S(c,{fill:"currentColor"})})}),W&&S(v,{applyStyles:z,className:u(`${R}-content`,`${R}-content--right`),clickable:q,onClick:e=>Ne("right",e),children:W}),L&&S(N,{bordered:oe,className:`${R}-label--right`,isDark:ge,isDefaultStatus:"default"===j,isRight:!0,underlined:se,children:L})]})}),S(b,{className:`${R}-helper-text-container`,withValue:!!D,children:D&&S($,{className:`${R}-helper-text`,children:D})})]})}));P.displayName="NextUI.Input",P.defaultProps=k,P.toString=()=>".nextui-input";export default P;
@@ -1 +1 @@
1
- import{styled as e}from"../theme/stitches.config";import{sharedVisuallyHidden as o}from"../theme/shared-css";export const StyledInputMainContainer=e("div",{$$inputColor:"$colors$accents0",$$inputTextColor:"$colors$text",$$inputPlaceholderColor:"$colors$accents6",$$inputShadow:"$shadows$sm",$$inputBorderColor:"$colors$border",$$inputHoverBorderColor:"$colors$foreground",$$inputLabelColor:"$$inputHoverBorderColor",display:"inline-flex",flexDirection:"column",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitBoxAlign:"center",variants:{color:{default:{},primary:{$$inputHoverBorderColor:"$colors$primary",$$inputLabelColor:"$colors$primary"},secondary:{$$inputHoverBorderColor:"$colors$secondary",$$inputLabelColor:"$colors$secondary"},success:{$$inputHoverBorderColor:"$colors$success",$$inputLabelColor:"$colors$success"},warning:{$$inputHoverBorderColor:"$colors$warning",$$inputLabelColor:"$colors$warning"},error:{$$inputHoverBorderColor:"$colors$error",$$inputLabelColor:"$colors$error"}},status:{default:{},primary:{$$inputColor:"$colors$primaryLight",$$inputPlaceholderColor:"$colors$primaryLightContrast",$$inputTextColor:"$colors$primaryLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$primary"},secondary:{$$inputColor:"$colors$secondaryLight",$$inputPlaceholderColor:"$colors$secondaryLightContrast",$$inputTextColor:"$colors$secondaryLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$secondary"},success:{$$inputColor:"$colors$successLight",$$inputPlaceholderColor:"$colors$successLightContrast",$$inputTextColor:"$colors$successLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$success"},warning:{$$inputColor:"$colors$warningLight",$$inputPlaceholderColor:"$colors$warningLightContrast",$$inputTextColor:"$colors$warningLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$warning"},error:{$$inputColor:"$colors$errorLight",$$inputPlaceholderColor:"$colors$errorLightContrast",$$inputTextColor:"$colors$errorLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$error"}},helperColor:{default:{$$inputHelperColor:"$colors$text"},primary:{$$inputHelperColor:"$colors$primary"},secondary:{$$inputHelperColor:"$colors$secondary"},success:{$$inputHelperColor:"$colors$success"},warning:{$$inputHelperColor:"$colors$warning"},error:{$$inputHelperColor:"$colors$error"}},borderWeight:{light:{$$inputBorderWeight:"$borderWeights$light"},normal:{$$inputBorderWeight:"$borderWeights$normal"},bold:{$$inputBorderWeight:"$borderWeights$bold"},extrabold:{$$inputBorderWeight:"$borderWeights$extrabold"},black:{$$inputBorderWeight:"$borderWeights$black"}},size:{xs:{$$inputBorderRadius:"$space$3",$$inputFontSize:"$fontSizes$xs",$$inputHeightRatio:"1.2",br:"$$inputBorderRadius"},sm:{$$inputBorderRadius:"$space$4",$$inputFontSize:"$fontSizes$xs",$$inputHeightRatio:"1.6",br:"$$inputBorderRadius"},md:{$$inputBorderRadius:"$space$6",$$inputFontSize:"$fontSizes$sm",$$inputHeightRatio:"2",br:"$$inputBorderRadius"},lg:{$$inputBorderRadius:"$space$7",$$inputFontSize:"$fontSizes$md",$$inputHeightRatio:"2.2",br:"$$inputBorderRadius"},xl:{$$inputBorderRadius:"$space$8",$$inputFontSize:"$fontSizes$lg",$$inputHeightRatio:"2.6",br:"$$inputBorderRadius"}},rounded:{true:{$$inputBorderRadius:"$radii$pill"}},disabled:{true:{$$inputColor:"$colors$accents1",$$inputTextColor:"$colors$accents7",$$inputPlaceholderColor:"$colors$accents7",$$inputShadow:"$shadows$sm"}}}});const r={WebkitTextFillColor:"$$inputTextColor",WebkitBackgroundClip:"text !important",caretColor:"$$inputTextColor"};export const StyledInputContainer=e("div",{width:"100%",br:"$$inputBorderRadius",input:{"&:-webkit-autofill":{...r,"&:hover":r,"&:focus":r,"&:active":r}},"@motion":{transition:"none"},variants:{isTextarea:{false:{display:"inline-flex",alignItems:"center",height:"calc($$inputHeightRatio * $9)"}},focused:{true:{}},isReadOnly:{false:{}},underlined:{true:{}},animated:{true:{transition:"$default"},false:{transition:"none"}}},compoundVariants:[{isReadOnly:!1,underlined:!0,css:{transform:"none"}},{focused:!0,animated:!0,isReadOnly:!1,underlined:!1,css:{transform:"translateY(-$space$1)"}}]});export const StyledInput=e("input",{padding:0,fontSize:"$$inputFontSize",bg:"transparent",border:"none",color:"$$inputTextColor",br:0,outline:"none",size:"100%",minWidth:0,WebkitAppearance:"none","::placeholder":{color:"$$inputPlaceholderColor",transition:"opacity 0.25s ease 0s",MozTransition:"opacity 0.25s ease 0s",MsTransition:"opacity 0.25s ease 0s",WebkitTransition:"opacity 0.25s ease 0s"},"@motion":{transition:"none","&::placeholder":{transition:"none"}},"&:disabled":{pe:"none",color:"$accents4",cursor:"not-allowed"},variants:{isTextarea:{true:{boxShadow:"none",display:"block",size:"100%",resize:"none",border:"none",outline:"none"}},focused:{true:{"&::placeholder":{opacity:0,transition:"opacity 0.25s ease 0s"}}},bordered:{true:{padding:"0 $3"}},rounded:{true:{padding:"0 $3"}},animated:{false:{transition:"none","::placeholder":{transition:"none"}}},hasLeftContent:{true:{ml:0}},hasRightContent:{true:{mr:0}}}});export const StyledInputWrapper=e("div",{flex:1,position:"relative",br:"$$inputBorderRadius",bg:"$$inputColor",display:"inline-flex",verticalAlign:"middle",alignItems:"center",userSelect:"none","@motion":{transition:"none","&:before":{transition:"none"},"&:after":{transition:"none"}},variants:{focused:{true:{}},isReadOnly:{true:{}},bordered:{true:{bg:"transparent",border:"none",boxShadow:"0 0 0 $$inputBorderWeight $$inputBorderColor",transition:"box-shadow 0.25s ease"}},shadow:{true:{transition:"$default"}},disabled:{true:{cursor:"not-allowed"}},underlined:{true:{bg:"transparent",[`& ${StyledInput}`]:{margin:"$2 $3"},"&:before":{content:"",position:"absolute",zIndex:"$2",width:0,bottom:0,height:"$1",left:"50%",transform:"translate(-50%)",background:"$$inputHoverBorderColor",transition:"width 0.25s ease"},"&:after":{content:"",position:"absolute",zIndex:"$1",bottom:0,width:"100%",height:"$$inputBorderWeight",bg:"$$inputBorderColor"}},false:{[`& ${StyledInput}`]:{margin:"$2 $5"}}},animated:{false:{transition:"none","&:before":{transition:"none"},"&:after":{transition:"none"}}},isTextarea:{true:{boxSizing:"border-box",width:"100%",maxWidth:"100%",height:"auto"},false:{height:"100%"}}},compoundVariants:[{bordered:!0,underlined:!0,css:{boxShadow:"0 0 0 0px $$inputBorderColor"}},{focused:!0,underlined:!0,css:{"&:before":{width:"100%"}}},{focused:!0,shadow:!0,isReadOnly:!1,underlined:!1,css:{boxShadow:"$$inputShadow"}},{focused:!0,bordered:!0,isReadOnly:!1,underlined:!1,css:{boxShadow:"0 0 0 $$inputBorderWeight $$inputHoverBorderColor"}},{bordered:!0,isReadOnly:!1,underlined:!1,css:{"&:hover":{boxShadow:"0 0 0 $$inputBorderWeight $$inputHoverBorderColor"}}},{isTextarea:!0,underlined:!1,css:{[`& ${StyledInput}`]:{margin:"$xs $sm"}}}]});export const StyledHelperTextContainer=e("div",{position:"absolute",opacity:0,bottom:"calc($$inputHeightRatio * -$space$5)","@motion":{transition:"none"},variants:{animated:{true:{transition:"opacity 0.25s ease"},false:{transition:"none"}},withValue:{true:{opacity:1}}}});export const StyledHelperText=e("p",{margin:"$1 0 0 $5",fontSize:"$space$5",color:"$$inputHelperColor"});export const StyledInputPlaceholder=e("span",{},o);export const StyledInputBlockLabel=e("label",{d:"block",fontWeight:"$normal",color:"$$inputLabelColor",p:"0 0 0 $2",mb:"$3",fs:"$$inputFontSize",lh:"$md",WebkitTouchCallout:"none",WebkitUserSelect:"none",KhtmlUserSelect:"none",MozUserSelect:"none",MsUserSelect:"none",us:"none","> *:first-child":{marginTop:0},"> *:last-child":{mb:0},"@motion":{transition:"none"},variants:{rounded:{true:{padding:"0 0 0 $3"}},asPlaceholder:{true:{position:"absolute",padding:0,zIndex:"$1",left:"$space$6",top:"20%",mb:0,cursor:"text",color:"$$inputPlaceholderColor",transition:"left 0.25s ease 0s, color 0.25s ease 0s, top 0.25s ease 0s"}},animated:{false:{transition:"none"}},focused:{true:{color:"$$inputHoverBorderColor"}},underlined:{true:{}},withValue:{true:{}},isTextarea:{true:{}},bordered:{true:{}},hasContentLeft:{true:{}}},compoundVariants:[{underlined:!0,asPlaceholder:!0,css:{left:"$space$2"}},{asPlaceholder:!0,focused:!0,underlined:!1,isTextarea:!1,css:{top:"-72%",left:"$2",cursor:"inherit"}},{asPlaceholder:!0,focused:!0,underlined:!0,isTextarea:!1,css:{top:"-72%",left:"0px",cursor:"inherit"}},{asPlaceholder:!0,withValue:!0,underlined:!1,isTextarea:!1,css:{color:"$$inputTextColor",top:"-72%",left:"$2",cursor:"inherit"}},{asPlaceholder:!0,withValue:!0,underlined:!0,isTextarea:!1,css:{color:"$$inputTextColor",top:"-72%",left:"0px",cursor:"inherit"}},{asPlaceholder:!0,isTextarea:!0,css:{top:"$5"}},{asPlaceholder:!0,hasContentLeft:!0,css:{left:"calc($space$6 + $$inputHeightRatio * $space$7)"}},{asPlaceholder:!0,isTextarea:!0,focused:!0,css:{top:"calc(-$space$10 - $space$3)",left:"$2"}},{asPlaceholder:!0,isTextarea:!0,withValue:!0,css:{top:"-$11"}},{asPlaceholder:!0,focused:!0,isTextarea:!0,bordered:!0,css:{top:"-$12"}}],defaultVariants:{asPlaceholder:!1}});export const StyledInputLabel=e("span",{position:"relative",display:"inline-flex",width:"initial",height:"100%",fontWeight:"$medium",ai:"center",pe:"none",margin:0,padding:"0 $sm",color:"$$inputPlaceholderColor",fontSize:"$$inputFontSize",lineHeight:"$xs",variants:{isRight:{true:{btrr:"$$inputBorderRadius",bbrr:"$$inputBorderRadius"},false:{btlr:"$$inputBorderRadius",bblr:"$$inputBorderRadius"}},isDark:{true:{}},isDefaultStatus:{true:{}},underlined:{true:{bg:"transparent"}},bordered:{true:{"&:after":{display:"none"},"&:before":{display:"none"}}}},compoundVariants:[{isRight:!0,underlined:!0,css:{borderLeftColor:"$$inputPlaceholderColor",borderLeftStyle:"solid",marginLeft:"$2",borderLeftWidth:"calc($$inputBorderWeight / 2)",height:"40%"}},{isRight:!1,underlined:!0,css:{borderRightColor:"$$inputPlaceholderColor",borderRightStyle:"solid",marginRight:"$2",borderRightWidth:"calc($$inputBorderWeight / 1)",height:"40%"}},{isDefaultStatus:!0,bordered:!1,underlined:!1,css:{bg:"$accents2"}},{isDefaultStatus:!0,bordered:!1,underlined:!1,isDark:!0,css:{color:"$accents6"}},{isDefaultStatus:!1,bordered:!0,underlined:!1,css:{bg:"$$inputColor"}},{bordered:!0,isRight:!0,css:{peddingRight:"$sm",paddingLeft:0}},{bordered:!0,isRight:!1,css:{peddingLeft:"$sm",paddingRight:0}}],defaultVariants:{isRight:!1}});export const StyledInputContent=e("span",{variants:{applyStyles:{true:{display:"flex",boxSizing:"content-box",width:"calc($$inputHeightRatio * $space$4)",height:"100%",alignItems:"center",verticalAlign:"center",margin:0,padding:"0 calc($$inputHeightRatio * $3)",color:"$$inputTextColor",lineHeight:"$xs",position:"relative",cursor:"default",pe:"none"}},clickable:{true:{cursor:"pointer",pe:"auto"}}}});export const StyledInputClearButton=e("button",{position:"absolute",right:0,margin:0,d:"inline-flex",ai:"center",border:"none",bg:"transparent",width:"auto",height:"auto",cursor:"pointer",boxSizing:"border-box",transition:"color 250ms ease 0s, transform 250ms ease 0s, opacity 250ms ease 0s",color:"$$inputPlaceholderColor",visibility:"hidden",transform:"translateX(20%)",opacity:0,"&:hover":{opacity:.85},svg:{color:"currentColor",size:"calc($space$5 * $$inputHeightRatio)"},"@motion":{transition:"none"},variants:{visible:{true:{visibility:"visible",transform:"translateX(0)",opacity:1}},underlined:{true:{padding:"0 $1"}},animated:{false:{transition:"none"}},hasContentRight:{true:{padding:0,position:"relative",transform:"translateX(30%)"}},disabled:{true:{cursor:"not-allowed","&:hover":{color:"$accents3"}}}}});
1
+ import{styled as e}from"../theme/stitches.config";import{sharedVisuallyHidden as o,cssFocusVisible as r}from"../theme/shared-css";export const StyledInputMainContainer=e("div",{$$inputColor:"$colors$accents0",$$inputTextColor:"$colors$text",$$inputPlaceholderColor:"$colors$accents6",$$inputShadow:"$shadows$sm",$$inputBorderColor:"$colors$border",$$inputHoverBorderColor:"$colors$foreground",$$inputLabelColor:"$$inputHoverBorderColor",display:"inline-flex",flexDirection:"column",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitBoxAlign:"center",variants:{color:{default:{},primary:{$$inputHoverBorderColor:"$colors$primary",$$inputLabelColor:"$colors$primary"},secondary:{$$inputHoverBorderColor:"$colors$secondary",$$inputLabelColor:"$colors$secondary"},success:{$$inputHoverBorderColor:"$colors$success",$$inputLabelColor:"$colors$success"},warning:{$$inputHoverBorderColor:"$colors$warning",$$inputLabelColor:"$colors$warning"},error:{$$inputHoverBorderColor:"$colors$error",$$inputLabelColor:"$colors$error"}},status:{default:{},primary:{$$inputColor:"$colors$primaryLight",$$inputPlaceholderColor:"$colors$primaryLightContrast",$$inputTextColor:"$colors$primaryLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$primary"},secondary:{$$inputColor:"$colors$secondaryLight",$$inputPlaceholderColor:"$colors$secondaryLightContrast",$$inputTextColor:"$colors$secondaryLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$secondary"},success:{$$inputColor:"$colors$successLight",$$inputPlaceholderColor:"$colors$successLightContrast",$$inputTextColor:"$colors$successLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$success"},warning:{$$inputColor:"$colors$warningLight",$$inputPlaceholderColor:"$colors$warningLightContrast",$$inputTextColor:"$colors$warningLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$warning"},error:{$$inputColor:"$colors$errorLight",$$inputPlaceholderColor:"$colors$errorLightContrast",$$inputTextColor:"$colors$errorLightContrast",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$error"}},helperColor:{default:{$$inputHelperColor:"$colors$text"},primary:{$$inputHelperColor:"$colors$primary"},secondary:{$$inputHelperColor:"$colors$secondary"},success:{$$inputHelperColor:"$colors$success"},warning:{$$inputHelperColor:"$colors$warning"},error:{$$inputHelperColor:"$colors$error"}},borderWeight:{light:{$$inputBorderWeight:"$borderWeights$light"},normal:{$$inputBorderWeight:"$borderWeights$normal"},bold:{$$inputBorderWeight:"$borderWeights$bold"},extrabold:{$$inputBorderWeight:"$borderWeights$extrabold"},black:{$$inputBorderWeight:"$borderWeights$black"}},size:{xs:{$$inputBorderRadius:"$space$3",$$inputFontSize:"$fontSizes$xs",$$inputHeightRatio:"1.2",br:"$$inputBorderRadius"},sm:{$$inputBorderRadius:"$space$4",$$inputFontSize:"$fontSizes$xs",$$inputHeightRatio:"1.6",br:"$$inputBorderRadius"},md:{$$inputBorderRadius:"$space$6",$$inputFontSize:"$fontSizes$sm",$$inputHeightRatio:"2",br:"$$inputBorderRadius"},lg:{$$inputBorderRadius:"$space$7",$$inputFontSize:"$fontSizes$md",$$inputHeightRatio:"2.2",br:"$$inputBorderRadius"},xl:{$$inputBorderRadius:"$space$8",$$inputFontSize:"$fontSizes$lg",$$inputHeightRatio:"2.6",br:"$$inputBorderRadius"}},rounded:{true:{$$inputBorderRadius:"$radii$pill"}},disabled:{true:{$$inputColor:"$colors$accents1",$$inputTextColor:"$colors$accents7",$$inputPlaceholderColor:"$colors$accents7",$$inputShadow:"$shadows$sm"}}}});const t={WebkitTextFillColor:"$$inputTextColor",WebkitBackgroundClip:"text !important",caretColor:"$$inputTextColor"};export const StyledInputContainer=e("div",{width:"100%",br:"$$inputBorderRadius",input:{"&:-webkit-autofill":{...t,"&:hover":t,"&:focus":t,"&:active":t}},"@motion":{transition:"none"},variants:{isTextarea:{false:{display:"inline-flex",alignItems:"center",height:"calc($$inputHeightRatio * $9)"}},focused:{true:{}},isReadOnly:{false:{}},underlined:{true:{}},animated:{true:{transition:"$default"},false:{transition:"none"}}},compoundVariants:[{isReadOnly:!1,underlined:!0,css:{transform:"none"}},{focused:!0,animated:!0,isReadOnly:!1,underlined:!1,css:{transform:"translateY(-$space$1)"}}]});export const StyledInput=e("input",{padding:0,fontSize:"$$inputFontSize",bg:"transparent",border:"none",color:"$$inputTextColor",br:0,outline:"none",size:"100%",minWidth:0,WebkitAppearance:"none","::placeholder":{color:"$$inputPlaceholderColor",transition:"opacity 0.25s ease 0s",MozTransition:"opacity 0.25s ease 0s",MsTransition:"opacity 0.25s ease 0s",WebkitTransition:"opacity 0.25s ease 0s"},"@motion":{transition:"none","&::placeholder":{transition:"none"}},"&:disabled":{pe:"none",color:"$accents4",cursor:"not-allowed"},variants:{isTextarea:{true:{boxShadow:"none",display:"block",size:"100%",resize:"none",border:"none",outline:"none"}},focused:{true:{"&::placeholder":{opacity:0,transition:"opacity 0.25s ease 0s"}}},bordered:{true:{padding:"0 $3"}},rounded:{true:{padding:"0 $3"}},animated:{false:{transition:"none","::placeholder":{transition:"none"}}},hasLeftContent:{true:{ml:0}},hasRightContent:{true:{mr:0}}}});export const StyledInputWrapper=e("div",{flex:1,position:"relative",br:"$$inputBorderRadius",bg:"$$inputColor",display:"inline-flex",verticalAlign:"middle",alignItems:"center",userSelect:"none","@motion":{transition:"none","&:before":{transition:"none"},"&:after":{transition:"none"}},variants:{focused:{true:{}},isReadOnly:{true:{}},bordered:{true:{bg:"transparent",border:"none",boxShadow:"0 0 0 $$inputBorderWeight $$inputBorderColor",transition:"box-shadow 0.25s ease"}},shadow:{true:{transition:"$default"}},disabled:{true:{cursor:"not-allowed"}},underlined:{true:{bg:"transparent",[`& ${StyledInput}`]:{margin:"$2 $3"},"&:before":{content:"",position:"absolute",zIndex:"$2",width:0,bottom:0,height:"$1",left:"50%",transform:"translate(-50%)",background:"$$inputHoverBorderColor",transition:"width 0.25s ease"},"&:after":{content:"",position:"absolute",zIndex:"$1",bottom:0,width:"100%",height:"$$inputBorderWeight",bg:"$$inputBorderColor"}},false:{[`& ${StyledInput}`]:{margin:"$2 $5"}}},animated:{false:{transition:"none","&:before":{transition:"none"},"&:after":{transition:"none"}}},isTextarea:{true:{boxSizing:"border-box",width:"100%",maxWidth:"100%",height:"auto"},false:{height:"100%"}}},compoundVariants:[{bordered:!0,underlined:!0,css:{boxShadow:"0 0 0 0px $$inputBorderColor"}},{focused:!0,underlined:!0,css:{"&:before":{width:"100%"}}},{focused:!0,shadow:!0,isReadOnly:!1,underlined:!1,css:{boxShadow:"$$inputShadow"}},{focused:!0,bordered:!0,isReadOnly:!1,underlined:!1,css:{boxShadow:"0 0 0 $$inputBorderWeight $$inputHoverBorderColor"}},{bordered:!0,isReadOnly:!1,underlined:!1,css:{"&:hover":{boxShadow:"0 0 0 $$inputBorderWeight $$inputHoverBorderColor"}}},{isTextarea:!0,underlined:!1,css:{[`& ${StyledInput}`]:{margin:"$xs $sm"}}}]});export const StyledHelperTextContainer=e("div",{position:"absolute",opacity:0,bottom:"calc($$inputHeightRatio * -$space$5)","@motion":{transition:"none"},variants:{animated:{true:{transition:"opacity 0.25s ease"},false:{transition:"none"}},withValue:{true:{opacity:1}}}});export const StyledHelperText=e("p",{margin:"$1 0 0 $5",fontSize:"$space$5",color:"$$inputHelperColor"});export const StyledInputPlaceholder=e("span",{},o);export const StyledInputBlockLabel=e("label",{d:"block",fontWeight:"$normal",color:"$$inputLabelColor",p:"0 0 0 $2",mb:"$3",fs:"$$inputFontSize",lh:"$md",WebkitTouchCallout:"none",WebkitUserSelect:"none",KhtmlUserSelect:"none",MozUserSelect:"none",MsUserSelect:"none",us:"none","> *:first-child":{marginTop:0},"> *:last-child":{mb:0},"@motion":{transition:"none"},variants:{rounded:{true:{padding:"0 0 0 $3"}},asPlaceholder:{true:{position:"absolute",padding:0,zIndex:"$1",left:"$space$6",top:"20%",mb:0,cursor:"text",color:"$$inputPlaceholderColor",transition:"left 0.25s ease 0s, color 0.25s ease 0s, top 0.25s ease 0s"}},animated:{false:{transition:"none"}},focused:{true:{color:"$$inputHoverBorderColor"}},underlined:{true:{}},withValue:{true:{}},isTextarea:{true:{}},bordered:{true:{}},hasContentLeft:{true:{}}},compoundVariants:[{underlined:!0,asPlaceholder:!0,css:{left:"$space$2"}},{asPlaceholder:!0,focused:!0,underlined:!1,isTextarea:!1,css:{top:"-72%",left:"$2",cursor:"inherit"}},{asPlaceholder:!0,focused:!0,underlined:!0,isTextarea:!1,css:{top:"-72%",left:"0px",cursor:"inherit"}},{asPlaceholder:!0,withValue:!0,underlined:!1,isTextarea:!1,css:{color:"$$inputTextColor",top:"-72%",left:"$2",cursor:"inherit"}},{asPlaceholder:!0,withValue:!0,underlined:!0,isTextarea:!1,css:{color:"$$inputTextColor",top:"-72%",left:"0px",cursor:"inherit"}},{asPlaceholder:!0,isTextarea:!0,css:{top:"$5"}},{asPlaceholder:!0,hasContentLeft:!0,css:{left:"calc($space$6 + $$inputHeightRatio * $space$7)"}},{asPlaceholder:!0,isTextarea:!0,focused:!0,css:{top:"calc(-$space$10 - $space$3)",left:"$2"}},{asPlaceholder:!0,isTextarea:!0,withValue:!0,css:{top:"-$11"}},{asPlaceholder:!0,focused:!0,isTextarea:!0,bordered:!0,css:{top:"-$12"}}],defaultVariants:{asPlaceholder:!1}});export const StyledInputLabel=e("span",{position:"relative",display:"inline-flex",width:"initial",height:"100%",fontWeight:"$medium",ai:"center",pe:"none",margin:0,padding:"0 $sm",color:"$$inputPlaceholderColor",fontSize:"$$inputFontSize",lineHeight:"$xs",variants:{isRight:{true:{btrr:"$$inputBorderRadius",bbrr:"$$inputBorderRadius"},false:{btlr:"$$inputBorderRadius",bblr:"$$inputBorderRadius"}},isDark:{true:{}},isDefaultStatus:{true:{}},underlined:{true:{bg:"transparent"}},bordered:{true:{"&:after":{display:"none"},"&:before":{display:"none"}}}},compoundVariants:[{isRight:!0,underlined:!0,css:{borderLeftColor:"$$inputPlaceholderColor",borderLeftStyle:"solid",marginLeft:"$2",borderLeftWidth:"calc($$inputBorderWeight / 2)",height:"40%"}},{isRight:!1,underlined:!0,css:{borderRightColor:"$$inputPlaceholderColor",borderRightStyle:"solid",marginRight:"$2",borderRightWidth:"calc($$inputBorderWeight / 1)",height:"40%"}},{isDefaultStatus:!0,bordered:!1,underlined:!1,css:{bg:"$accents2"}},{isDefaultStatus:!0,bordered:!1,underlined:!1,isDark:!0,css:{color:"$accents6"}},{isDefaultStatus:!1,bordered:!0,underlined:!1,css:{bg:"$$inputColor"}},{bordered:!0,isRight:!0,css:{peddingRight:"$sm",paddingLeft:0}},{bordered:!0,isRight:!1,css:{peddingLeft:"$sm",paddingRight:0}}],defaultVariants:{isRight:!1}});export const StyledInputContent=e("span",{variants:{applyStyles:{true:{display:"flex",boxSizing:"content-box",width:"calc($$inputHeightRatio * $space$4)",height:"100%",alignItems:"center",verticalAlign:"center",margin:0,padding:"0 calc($$inputHeightRatio * $3)",color:"$$inputTextColor",lineHeight:"$xs",position:"relative",cursor:"default",pe:"none"}},clickable:{true:{cursor:"pointer",pe:"auto"}}}});export const StyledInputClearButton=e("button",{position:"absolute",right:0,margin:0,d:"inline-flex",ai:"center",border:"none",bg:"transparent",width:"auto",height:"auto",cursor:"pointer",boxSizing:"border-box",transition:"color 250ms ease 0s, transform 250ms ease 0s, opacity 250ms ease 0s",color:"$$inputPlaceholderColor",visibility:"hidden",transform:"translateX(20%)",opacity:0,"&:hover":{opacity:.85},svg:{color:"currentColor",size:"calc($space$5 * $$inputHeightRatio)"},"@motion":{transition:"none"},variants:{visible:{true:{visibility:"visible",transform:"translateX(0)",opacity:1}},underlined:{true:{padding:"0 $1"}},animated:{false:{transition:"none"}},hasContentRight:{true:{padding:0,position:"relative",transform:"translateX(30%)"}},disabled:{true:{cursor:"not-allowed","&:hover":{color:"$accents3"}}}}});export const StyledInputClearButtonIconWrapper=e("span",{display:"flex",br:"100%"},r);
@@ -1 +1 @@
1
- import i,{useMemo as e,useEffect as t}from"react";import{useHover as r}from"@react-aria/interactions";import{mergeProps as l}from"@react-aria/utils";import{useId as n}from"@react-aria/utils";import{forwardRef as o}from"../utils/system";import{useDOMRef as a}from"../utils/dom";import{arrayToObject as s}from"../utils/object";import u from"../utils/clsx";import{Text as d}from"../index";import{__DEV__ as h}from"../utils/assertion";import{useNavbarContentContext as c}from"./navbar-content-context";import{StyledNavbarItem as m}from"./navbar.styles";import{jsx as g}from"react/jsx-runtime";const v=o(((o,h)=>{var v;const{id:p,css:b,children:f,variant:$,activeColor:H,isActive:C,underlineHeight:x,onMouseEnter:I,onMouseLeave:y,isDisabled:M,className:N,...A}=o,j=c(),z=a(h),E=$||(null==j?void 0:j.variant),P=null==E?void 0:E.toString(),S=null==P.includes?void 0:P.includes("highlight"),D=null==P.includes?void 0:P.includes("highlight-solid"),{hoverProps:L,isHovered:T}=r({isDisabled:M}),W=n(p);t((()=>{z.current&&j&&null!=j&&j.enableCursorHighlight&&C&&S&&j.updateActiveItem(null==z?void 0:z.current)}),[z,S,C]);const F=e((()=>{var i;return!!j&&(null==(i=j.highlightedItem)?void 0:i.id)===W}),[W,j]),G=e((()=>{var i;return!(F||null==j||!j.enableCursorHighlight||!D||W!==(null==j||null==(i=j.activeItem)?void 0:i.id))}),[j,W,F,D]),R=e((()=>{const i=[],e="string"==typeof f,t=null==P.includes?void 0:P.includes("highlight-solid");j||i.push({$$navbarContentItemGap:"$space$8"}),S&&(i.push({dflex:"center",height:"$$navbarItemMaxHeight"}),e?i.push({px:"calc($$navbarContentItemHorizontalPadding * 0.5)"}):i.push({"*:first-child":{size:"100%",px:"calc($$navbarContentItemHorizontalPadding * 0.5)"}})),S&&null!=P.includes&&P.includes("rounded")&&!j.enableCursorHighlight&&i.push({"&:before":{borderRadius:"$pill"}}),j.enableCursorHighlight&&i.push({"&:before":{display:"none"}}),C&&!S&&i.push({$$navbarItemFontWeight:"$fontWeights$semibold"}),T&&j.enableCursorHighlight&&(S&&i.push({color:"$$navbarItemHighlightTextColor"}),t&&i.push({color:"$$navbarItemHighlightSolidTextColor"})),G&&i.push({color:"$$navbarItemActiveColor"});return{...s(i),...b}}),[f,b,j,P,G,C,T,S]),U="string"==typeof f?g(d,{children:f}):i.Children.only(f),k=i.cloneElement(U,{id:(null==(v=U.props)?void 0:v.id)||W,onMouseEnter:i=>{var e;if(null==j||!j.repositionHighlight)return void(null==I||I(i));(null==(e=i.target)?void 0:e.id)===W&&j.repositionHighlight(i,null==z?void 0:z.current),null==I||I(i)},onMouseLeave:i=>{null!=j&&j.resetHighlight&&j.enableCursorHighlight&&S?(j.resetHighlight(),null==y||y(i)):null==y||y(i)}});return g(m,{ref:z,activeColor:H||(null==j?void 0:j.activeColor),className:u("nextui-navbar-item",N),css:R,id:W,isActive:C,underlineHeight:x||(null==j?void 0:j.underlineHeight),variant:E,...l(L,A),children:k})}));h&&(v.displayName="NextUI.NavbarItem"),v.toString=()=>".nextui-navbar-item";export default v;
1
+ import i,{useMemo as e,useEffect as t}from"react";import{useHover as r}from"@react-aria/interactions";import{mergeProps as l,useId as n}from"@react-aria/utils";import{forwardRef as o}from"../utils/system";import{useDOMRef as s}from"../utils/dom";import{arrayToObject as a}from"../utils/object";import u from"../utils/clsx";import{Text as d}from"../index";import{__DEV__ as h}from"../utils/assertion";import{useNavbarContentContext as c}from"./navbar-content-context";import{StyledNavbarItem as g}from"./navbar.styles";import{jsx as m}from"react/jsx-runtime";const v=o(((o,h)=>{var v;const{id:p,css:b,children:f,variant:$,activeColor:H,isActive:C,underlineHeight:x,onMouseEnter:I,onMouseLeave:y,isDisabled:M,className:N,...A}=o,j=c(),z=s(h),E=$||(null==j?void 0:j.variant),P=null==E?void 0:E.toString(),S=null==P.includes?void 0:P.includes("highlight"),D=null==P.includes?void 0:P.includes("highlight-solid"),{hoverProps:L,isHovered:T}=r({isDisabled:M}),W=n(p);t((()=>{z.current&&j&&null!=j&&j.enableCursorHighlight&&C&&S&&j.updateActiveItem(null==z?void 0:z.current)}),[z,S,C]);const F=e((()=>{var i;return!!j&&(null==(i=j.highlightedItem)?void 0:i.id)===W}),[W,j]),G=e((()=>{var i;return!(F||null==j||!j.enableCursorHighlight||!D||W!==(null==j||null==(i=j.activeItem)?void 0:i.id))}),[j,W,F,D]),R=e((()=>{const i=[],e="string"==typeof f,t=null==P.includes?void 0:P.includes("highlight-solid");j||i.push({$$navbarContentItemGap:"$space$8"}),S&&(i.push({dflex:"center",height:"$$navbarItemMaxHeight"}),e?i.push({px:"calc($$navbarContentItemHorizontalPadding * 0.5)"}):i.push({"*:first-child":{size:"100%",px:"calc($$navbarContentItemHorizontalPadding * 0.5)"}})),S&&null!=P.includes&&P.includes("rounded")&&!j.enableCursorHighlight&&i.push({"&:before":{borderRadius:"$pill"}}),j.enableCursorHighlight&&i.push({"&:before":{display:"none"}}),C&&!S&&i.push({$$navbarItemFontWeight:"$fontWeights$semibold"}),T&&j.enableCursorHighlight&&(S&&i.push({color:"$$navbarItemHighlightTextColor"}),t&&i.push({color:"$$navbarItemHighlightSolidTextColor"})),G&&i.push({color:"$$navbarItemActiveColor"});return{...a(i),...b}}),[f,b,j,P,G,C,T,S]),U="string"==typeof f?m(d,{children:f}):i.Children.only(f),k=i.cloneElement(U,{id:(null==(v=U.props)?void 0:v.id)||W,onMouseEnter:i=>{var e;if(null==j||!j.repositionHighlight)return void(null==I||I(i));(null==(e=i.target)?void 0:e.id)===W&&j.repositionHighlight(i,null==z?void 0:z.current),null==I||I(i)},onMouseLeave:i=>{null!=j&&j.resetHighlight&&j.enableCursorHighlight&&S?(j.resetHighlight(),null==y||y(i)):null==y||y(i)}});return m(g,{ref:z,activeColor:H||(null==j?void 0:j.activeColor),className:u("nextui-navbar-item",N),css:R,id:W,isActive:C,underlineHeight:x||(null==j?void 0:j.underlineHeight),variant:E,...l(L,A),children:k})}));h&&(v.displayName="NextUI.NavbarItem"),v.toString=()=>".nextui-navbar-item";export default v;
@@ -1 +1 @@
1
- import r,{Children as o,cloneElement as t,useMemo as e}from"react";import{useButton as i}from"@react-aria/button";import{mergeProps as s}from"@react-aria/utils";import{Button as n,Text as p}from"../index";import{pickChild as a}from"../utils/collections";import{__DEV__ as m}from"../utils/assertion";import{usePopoverContext as f}from"./popover-context";import{jsx as l}from"react/jsx-runtime";const c=r.forwardRef(((r,m)=>{const{state:c,triggerRef:g,getTriggerProps:u}=f(),{children:d,...P}=r,x=e((()=>"string"==typeof d?l(p,{children:d}):o.only(d)),[d]),{onPress:v,onPressStart:S,...h}=e((()=>u(s(x.props,P),x.ref)),[u,x.props,P,x.ref]),{buttonProps:y}=i({onPress:v,onPressStart:S,...h},g),[,b]=a(r.children,n),j=e((()=>void 0!==(null==b?void 0:b[0])),[b]),N=e((()=>({...h,onPressStart:S,onPress:()=>c.open()})),[h,S,c.open]);return t(x,s(h,j?N:y))}));m&&(c.displayName="NextUI.PopoverTrigger"),c.toString=()=>".nextui-popover-trigger";export default c;
1
+ import r,{Children as o,cloneElement as t,useMemo as e}from"react";import{useButton as i}from"@react-aria/button";import{mergeProps as n}from"@react-aria/utils";import{Button as s,Text as p}from"../index";import{pickChild as m}from"../utils/collections";import{__DEV__ as a}from"../utils/assertion";import{usePopoverContext as f}from"./popover-context";import{jsx as l}from"react/jsx-runtime";const c=r.forwardRef(((r,a)=>{const{triggerRef:c,getTriggerProps:g}=f(),{children:u,...d}=r,P=e((()=>"string"==typeof u?l(p,{children:u}):o.only(u)),[u]),{onPress:x,onKeyDown:y,onPressStart:v,...w}=e((()=>g(n(P.props,d),P.ref)),[g,P.props,d,P.ref]),{buttonProps:S}=i({onPress:x,onKeyDown:y,onPressStart:v,...w},c),[,h]=m(r.children,s),D=e((()=>void 0!==(null==h?void 0:h[0])),[h]),K=e((()=>({...w,onPress:x,onKeyDown:y,onPressStart:v})),[w,x,y,v]);return t(P,n(w,D?K:S))}));a&&(c.displayName="NextUI.PopoverTrigger"),c.toString=()=>".nextui-popover-trigger";export default c;
@@ -1 +1 @@
1
- import e,{useMemo as r}from"react";import t from"../utils/css-transition";import i from"../utils/with-defaults";import{valueToPercent as a}from"../utils/numbers";import s from"../utils/clsx";import{__DEV__ as m}from"../utils/assertion";import{StyledProgress as o,StyledProgressBar as n}from"./progress.styles";import{jsx as p}from"react/jsx-runtime";const d="nextui-progress",l=({value:e,max:i,min:m,striped:l,animated:u,shadow:c,indeterminated:x,css:f,...w})=>{const g=r((()=>e>i?i:e<m?m:e),[e,m,i]),v=r((()=>a(g,m,i)),[g,m,i]);return p(o,{css:{"nextui-progress-wrapper-enter":{opacity:0},".nextui-progress-wrapper-enter-active":{opacity:1,width:`${v}%`},...f},indeterminated:x,role:"progressbar",...w,children:p(t,{visible:!0,clearTime:300,enterTime:10,leaveTime:20,name:`${d}-wrapper`,children:p(n,{animated:u,"aria-valuemax":i,"aria-valuemin":m,"aria-valuenow":g,className:s(`${d}-bar`,{[`${d}-striped`]:l,[`${d}-indeterminated`]:x}),indeterminated:x,shadow:c,striped:l,...w})})})};m&&(l.displayName="NextUI.Progress"),l.toString=()=>".nextui-progress";const u=e.memo(l);export default i(u,{striped:!1,animated:!0,shadow:!1,indeterminated:!1,value:0,min:0,max:100});
1
+ import e,{useMemo as r}from"react";import i from"../utils/css-transition";import t from"../utils/with-defaults";import{valueToPercent as a}from"../utils/numbers";import s from"../utils/clsx";import{__DEV__ as m}from"../utils/assertion";import{StyledProgress as o,StyledProgressBar as n}from"./progress.styles";import{jsx as p}from"react/jsx-runtime";const d="nextui-progress",l=({value:e,max:t,min:m,striped:l,animated:u,shadow:c,indeterminated:x,css:f,...g})=>{const w=r((()=>e>t?t:e<m?m:e),[e,m,t]),v=r((()=>a(w,m,t)),[w,m,t]);return p(o,{"aria-label":"progress","aria-valuemax":t,"aria-valuemin":m,"aria-valuenow":w,css:{"nextui-progress-wrapper-enter":{opacity:0},".nextui-progress-wrapper-enter-active":{opacity:1,width:`${v}%`},...f},indeterminated:x,role:"progressbar",...g,children:p(i,{visible:!0,clearTime:300,enterTime:10,leaveTime:20,name:`${d}-wrapper`,children:p(n,{animated:u,className:s(`${d}-bar`,{[`${d}-striped`]:l,[`${d}-indeterminated`]:x}),indeterminated:x,shadow:c,striped:l,...g})})})};m&&(l.displayName="NextUI.Progress"),l.toString=()=>".nextui-progress";const u=e.memo(l);export default t(u,{striped:!1,animated:!0,shadow:!1,indeterminated:!1,value:0,min:0,max:100});
@@ -1 +1 @@
1
- import{styled as r,keyframes as o}from"../theme/stitches.config";const s=o({"0%":{left:"-40%"},"100%":{left:"100%"}});export const StyledProgress=r("div",{margin:0,padding:0,width:"100%",position:"relative",overflow:"visible",variants:{color:{default:{$$progressColor:"$colors$primary",$$progressShadowColor:"$colors$primaryShadow"},primary:{$$progressColor:"$colors$primary",$$progressShadowColor:"$colors$primaryShadow"},secondary:{$$progressColor:"$colors$secondary",$$progressShadowColor:"$colors$secondaryShadow"},success:{$$progressColor:"$colors$success",$$progressShadowColor:"$colors$successShadow"},warning:{$$progressColor:"$colors$warning",$$progressShadowColor:"$colors$warningShadow"},error:{$$progressColor:"$colors$error",$$progressShadowColor:"$colors$errorShadow"},gradient:{$$progressColor:"$colors$gradient",$$progressShadowColor:"$colors$primaryShadow"}},status:{default:{bg:"$accents2"},primary:{bg:"$primaryLight"},secondary:{bg:"$secondaryLight"},success:{bg:"$successLight"},warning:{bg:"$warningLight"},error:{bg:"$errorLight"}},size:{xs:{$$progressHeight:"$space$2",height:"$$progressHeight",br:"$$progressHeight"},sm:{$$progressHeight:"$space$4",height:"$$progressHeight",br:"$$progressHeight"},md:{$$progressHeight:"$space$8",height:"$$progressHeight",br:"$$progressHeight"},lg:{$$progressHeight:"$space$10",height:"$$progressHeight",br:"$$progressHeight"},xl:{$$progressHeight:"$space$11",height:"$$progressHeight",br:"$$progressHeight"}},indeterminated:{true:{overflow:"hidden"}},squared:{true:{br:"calc($$progressHeight * 0.25)"}}},defaultVariants:{color:"default",status:"default",size:"md"}});export const StyledProgressBar=r("div",{margin:0,padding:0,width:0,opacity:0,height:"100%",minWidth:"inherit",bg:"$$progressColor",br:"inherit",transition:"width 0.5s cubic-bezier(0.4, 0, 0.2, 1)","@motion":{transition:"none"},variants:{animated:{false:{transition:"none"}},shadow:{true:{normalShadowVar:"$$progressShadowColor"}},striped:{true:{backgroundImage:"linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 75%, transparent 75%, transparent)",backgroundSize:"$space$lg $space$lg"}},indeterminated:{true:{position:"absolute",width:"0%",transitionProperty:"background-color, width, left, border-color,opacity, shadow, transform",transitionDuration:"300ms",willChange:"left",minWidth:"50%",animation:`1s ease 0s infinite normal none running ${s}`}}}});
1
+ import{styled as r,keyframes as o}from"../theme/stitches.config";const s=o({"0%":{left:"-40%"},"100%":{left:"100%"}});export const StyledProgress=r("div",{margin:0,padding:0,width:"100%",position:"relative",overflow:"hidden",variants:{color:{default:{$$progressColor:"$colors$primary",$$progressShadowColor:"$colors$primaryShadow"},primary:{$$progressColor:"$colors$primary",$$progressShadowColor:"$colors$primaryShadow"},secondary:{$$progressColor:"$colors$secondary",$$progressShadowColor:"$colors$secondaryShadow"},success:{$$progressColor:"$colors$success",$$progressShadowColor:"$colors$successShadow"},warning:{$$progressColor:"$colors$warning",$$progressShadowColor:"$colors$warningShadow"},error:{$$progressColor:"$colors$error",$$progressShadowColor:"$colors$errorShadow"},gradient:{$$progressColor:"$colors$gradient",$$progressShadowColor:"$colors$primaryShadow"}},status:{default:{bg:"$accents2"},primary:{bg:"$primaryLight"},secondary:{bg:"$secondaryLight"},success:{bg:"$successLight"},warning:{bg:"$warningLight"},error:{bg:"$errorLight"}},size:{xs:{$$progressHeight:"$space$2",height:"$$progressHeight",br:"$$progressHeight"},sm:{$$progressHeight:"$space$4",height:"$$progressHeight",br:"$$progressHeight"},md:{$$progressHeight:"$space$8",height:"$$progressHeight",br:"$$progressHeight"},lg:{$$progressHeight:"$space$10",height:"$$progressHeight",br:"$$progressHeight"},xl:{$$progressHeight:"$space$11",height:"$$progressHeight",br:"$$progressHeight"}},indeterminated:{true:{overflow:"hidden"}},squared:{true:{br:"calc($$progressHeight * 0.25)"}}},defaultVariants:{color:"default",status:"default",size:"md"}});export const StyledProgressBar=r("div",{margin:0,padding:0,width:0,opacity:0,height:"100%",minWidth:"inherit",bg:"$$progressColor",br:"inherit",transition:"width 0.5s cubic-bezier(0.4, 0, 0.2, 1)","@motion":{transition:"none"},variants:{animated:{false:{transition:"none"}},shadow:{true:{normalShadowVar:"$$progressShadowColor"}},striped:{true:{backgroundImage:"linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 75%, transparent 75%, transparent)",backgroundSize:"$space$lg $space$lg"}},indeterminated:{true:{position:"absolute",width:"0%",transitionProperty:"background-color, width, left, border-color,opacity, shadow, transform",transitionDuration:"300ms",willChange:"left",minWidth:"50%",animation:`1s ease 0s infinite normal none running ${s}`}}}});
@@ -1 +1 @@
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
+ 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:u,placement:d,portalClassName:p,enterDelay:f,leaveDelay:h,trigger:w,rounded:b,animated:C,shadow:g,className:v,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:C,visible:I,css:N,shadow:g,offset:u,placement:d,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 ${v}`,css:j,role:"button",tabIndex:-1,onBlur:()=>U(!1),onClickCapture:()=>{"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:()=>{}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextui-org/react",
3
- "version": "1.0.0-beta.11",
3
+ "version": "1.0.0-beta.12",
4
4
  "license": "MIT",
5
5
  "description": "🚀 Beautiful and modern React UI library.",
6
6
  "homepage": "https://nextui.org",