@jamsrui/input 0.0.13 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/index.d.mts +2 -15
  2. package/dist/index.mjs +1 -1
  3. package/dist/input.d.mts +10 -14
  4. package/dist/input.mjs +1 -1
  5. package/dist/styles.d.mts +70 -133
  6. package/dist/styles.mjs +1 -1
  7. package/dist/use-input.d.mts +15 -16
  8. package/dist/use-input.mjs +1 -1
  9. package/package.json +6 -7
  10. package/dist/chunk-3JAB5TM5.mjs +0 -1
  11. package/dist/chunk-3T5HYT35.mjs +0 -1
  12. package/dist/chunk-744J4KCN.mjs +0 -1
  13. package/dist/chunk-D4PQ7L52.mjs +0 -1
  14. package/dist/chunk-DXYJK6Z2.mjs +0 -1
  15. package/dist/chunk-I23VLZM2.mjs +0 -1
  16. package/dist/chunk-IJYNHO5F.mjs +0 -1
  17. package/dist/chunk-JZ5MUM6R.mjs +0 -1
  18. package/dist/chunk-LCBLRGH5.mjs +0 -1
  19. package/dist/chunk-M46PIXLU.mjs +0 -1
  20. package/dist/chunk-QA6KD5QS.mjs +0 -1
  21. package/dist/chunk-U25JGUU3.mjs +0 -1
  22. package/dist/chunk-VU73JURM.mjs +0 -1
  23. package/dist/chunk-XHCBRMBJ.mjs +0 -1
  24. package/dist/chunk-ZNAJDFMD.mjs +0 -1
  25. package/dist/input-B2ew93BT.d.mts +0 -73
  26. package/dist/input-clear-button.d.mts +0 -10
  27. package/dist/input-clear-button.mjs +0 -1
  28. package/dist/input-config.d.mts +0 -29
  29. package/dist/input-config.mjs +0 -1
  30. package/dist/input-content-wrapper.d.mts +0 -10
  31. package/dist/input-content-wrapper.mjs +0 -1
  32. package/dist/input-content.d.mts +0 -10
  33. package/dist/input-content.mjs +0 -1
  34. package/dist/input-context.d.mts +0 -25
  35. package/dist/input-context.mjs +0 -1
  36. package/dist/input-description.d.mts +0 -10
  37. package/dist/input-description.mjs +0 -1
  38. package/dist/input-end-content.d.mts +0 -10
  39. package/dist/input-end-content.mjs +0 -1
  40. package/dist/input-error-message.d.mts +0 -10
  41. package/dist/input-error-message.mjs +0 -1
  42. package/dist/input-field.d.mts +0 -10
  43. package/dist/input-field.mjs +0 -1
  44. package/dist/input-label.d.mts +0 -10
  45. package/dist/input-label.mjs +0 -1
  46. package/dist/input-root.d.mts +0 -10
  47. package/dist/input-root.mjs +0 -1
  48. package/dist/input-start-content.d.mts +0 -10
  49. package/dist/input-start-content.mjs +0 -1
  50. package/dist/input-wrapper.d.mts +0 -10
  51. package/dist/input-wrapper.mjs +0 -1
package/dist/index.d.mts CHANGED
@@ -1,18 +1,5 @@
1
- export { I as Input } from './input-B2ew93BT.mjs';
2
- export { InputConfig, useInputConfig } from './input-config.mjs';
1
+ export { Input } from './input.mjs';
3
2
  import 'react/jsx-runtime';
4
- import 'react';
3
+ import './use-input.mjs';
5
4
  import '@jamsrui/utils';
6
- import './input-clear-button.mjs';
7
- import './input-content.mjs';
8
- import './input-content-wrapper.mjs';
9
- import './input-description.mjs';
10
- import './input-end-content.mjs';
11
- import './input-error-message.mjs';
12
- import './input-field.mjs';
13
- import './input-label.mjs';
14
- import './input-root.mjs';
15
- import './input-start-content.mjs';
16
- import './input-wrapper.mjs';
17
5
  import './styles.mjs';
18
- import '@jamsrui/core';
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- "use client";import{a as t}from"./chunk-XHCBRMBJ.mjs";import"./chunk-3T5HYT35.mjs";import"./chunk-DXYJK6Z2.mjs";import"./chunk-U25JGUU3.mjs";import"./chunk-744J4KCN.mjs";import"./chunk-IJYNHO5F.mjs";import"./chunk-LCBLRGH5.mjs";import"./chunk-QA6KD5QS.mjs";import"./chunk-I23VLZM2.mjs";import{a as n,b as o}from"./chunk-ZNAJDFMD.mjs";import"./chunk-M46PIXLU.mjs";import"./chunk-VU73JURM.mjs";import"./chunk-3JAB5TM5.mjs";import"./chunk-JZ5MUM6R.mjs";import"./chunk-D4PQ7L52.mjs";export{t as Input,n as InputConfig,o as useInputConfig};
1
+ "use client";import{Input as n}from"./input.mjs";export{n as Input};
package/dist/input.d.mts CHANGED
@@ -1,16 +1,12 @@
1
- import 'react/jsx-runtime';
2
- export { I as Input } from './input-B2ew93BT.mjs';
3
- import 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { useInput } from './use-input.mjs';
4
3
  import '@jamsrui/utils';
5
- import './input-clear-button.mjs';
6
- import './input-content.mjs';
7
- import './input-content-wrapper.mjs';
8
- import './input-description.mjs';
9
- import './input-end-content.mjs';
10
- import './input-error-message.mjs';
11
- import './input-field.mjs';
12
- import './input-label.mjs';
13
- import './input-root.mjs';
14
- import './input-start-content.mjs';
15
- import './input-wrapper.mjs';
16
4
  import './styles.mjs';
5
+
6
+ declare const Input: (props: Input.Props) => react_jsx_runtime.JSX.Element;
7
+ declare namespace Input {
8
+ interface Props extends useInput.Props {
9
+ }
10
+ }
11
+
12
+ export { Input };
package/dist/input.mjs CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-XHCBRMBJ.mjs";import"./chunk-3T5HYT35.mjs";import"./chunk-DXYJK6Z2.mjs";import"./chunk-U25JGUU3.mjs";import"./chunk-744J4KCN.mjs";import"./chunk-IJYNHO5F.mjs";import"./chunk-LCBLRGH5.mjs";import"./chunk-QA6KD5QS.mjs";import"./chunk-I23VLZM2.mjs";import"./chunk-ZNAJDFMD.mjs";import"./chunk-M46PIXLU.mjs";import"./chunk-VU73JURM.mjs";import"./chunk-3JAB5TM5.mjs";import"./chunk-JZ5MUM6R.mjs";import"./chunk-D4PQ7L52.mjs";export{a as Input};
1
+ import{jsx as e}from"react/jsx-runtime";import{useInput as n}from"./use-input.mjs";const r=p=>{const{getInputProps:t}=n(p);return e("input",{...t({})})};export{r as Input};
package/dist/styles.d.mts CHANGED
@@ -2,154 +2,91 @@ import * as _jamsrui_utils from '@jamsrui/utils';
2
2
  import { VariantProps } from '@jamsrui/utils';
3
3
 
4
4
  declare const inputVariants: _jamsrui_utils.TVReturnType<{
5
- fullWidth: {
6
- true: {
7
- root: string;
8
- };
5
+ variant: {
6
+ bordered: string;
7
+ solid: string;
9
8
  };
10
9
  size: {
11
- sm: {
12
- root: string;
13
- input: string;
14
- };
15
- md: {
16
- root: string;
17
- input: string;
18
- };
19
- lg: {
20
- root: string;
21
- input: string;
22
- };
23
- };
24
- isInvalid: {
25
- true: {
26
- root: string;
27
- contentWrapper: string;
28
- label: string;
29
- };
10
+ sm: string;
11
+ md: string;
12
+ lg: string;
30
13
  };
31
14
  radius: {
32
- sm: {};
33
- md: {};
34
- lg: {};
35
- xl: {};
36
- "2xl": {};
37
- "3xl": {};
38
- full: {};
39
- none: {};
15
+ readonly sm: "rounded";
16
+ readonly md: "rounded-md";
17
+ readonly lg: "rounded-lg";
18
+ readonly xl: "rounded-xl";
19
+ readonly "2xl": "rounded-2xl";
20
+ readonly "3xl": "rounded-3xl";
21
+ readonly full: "rounded-full";
22
+ readonly none: "rounded-none";
40
23
  };
41
- }, {
42
- root: string;
43
- label: string;
44
- description: string;
45
- errorMessage: string;
46
- input: string[];
47
- wrapper: string;
48
- content: string;
49
- contentWrapper: string[];
50
- startContent: string;
51
- endContent: string;
52
- clearButton: string;
53
- }, undefined, {
54
- fullWidth: {
55
- true: {
56
- root: string;
57
- };
24
+ isInvalid: {
25
+ true: string;
58
26
  };
59
- size: {
60
- sm: {
61
- root: string;
62
- input: string;
63
- };
64
- md: {
65
- root: string;
66
- input: string;
67
- };
68
- lg: {
69
- root: string;
70
- input: string;
71
- };
27
+ }, undefined, string[], {
28
+ variant: {
29
+ bordered: string;
30
+ solid: string;
72
31
  };
73
- isInvalid: {
74
- true: {
75
- root: string;
76
- contentWrapper: string;
77
- label: string;
78
- };
32
+ size: {
33
+ sm: string;
34
+ md: string;
35
+ lg: string;
79
36
  };
80
37
  radius: {
81
- sm: {};
82
- md: {};
83
- lg: {};
84
- xl: {};
85
- "2xl": {};
86
- "3xl": {};
87
- full: {};
88
- none: {};
38
+ readonly sm: "rounded";
39
+ readonly md: "rounded-md";
40
+ readonly lg: "rounded-lg";
41
+ readonly xl: "rounded-xl";
42
+ readonly "2xl": "rounded-2xl";
43
+ readonly "3xl": "rounded-3xl";
44
+ readonly full: "rounded-full";
45
+ readonly none: "rounded-none";
89
46
  };
90
- }, {
91
- root: string;
92
- label: string;
93
- description: string;
94
- errorMessage: string;
95
- input: string[];
96
- wrapper: string;
97
- content: string;
98
- contentWrapper: string[];
99
- startContent: string;
100
- endContent: string;
101
- clearButton: string;
102
- }, _jamsrui_utils.TVReturnType<{
103
- fullWidth: {
104
- true: {
105
- root: string;
106
- };
47
+ isInvalid: {
48
+ true: string;
49
+ };
50
+ }, undefined, _jamsrui_utils.TVReturnType<{
51
+ variant: {
52
+ bordered: string;
53
+ solid: string;
107
54
  };
108
55
  size: {
109
- sm: {
110
- root: string;
111
- input: string;
112
- };
113
- md: {
114
- root: string;
115
- input: string;
116
- };
117
- lg: {
118
- root: string;
119
- input: string;
120
- };
56
+ sm: string;
57
+ md: string;
58
+ lg: string;
59
+ };
60
+ radius: {
61
+ readonly sm: "rounded";
62
+ readonly md: "rounded-md";
63
+ readonly lg: "rounded-lg";
64
+ readonly xl: "rounded-xl";
65
+ readonly "2xl": "rounded-2xl";
66
+ readonly "3xl": "rounded-3xl";
67
+ readonly full: "rounded-full";
68
+ readonly none: "rounded-none";
121
69
  };
122
70
  isInvalid: {
123
- true: {
124
- root: string;
125
- contentWrapper: string;
126
- label: string;
127
- };
71
+ true: string;
128
72
  };
129
- radius: {
130
- sm: {};
131
- md: {};
132
- lg: {};
133
- xl: {};
134
- "2xl": {};
135
- "3xl": {};
136
- full: {};
137
- none: {};
73
+ }, undefined, string[], unknown, unknown, undefined>>;
74
+ declare const inputGroupVariants: _jamsrui_utils.TVReturnType<{
75
+ variant: {
76
+ bordered: string;
77
+ solid: string;
78
+ };
79
+ }, undefined, "input-group__input w-full px-3 py-2 text-sm placeholder:text-sm focus:outline-none", {
80
+ variant: {
81
+ bordered: string;
82
+ solid: string;
83
+ };
84
+ }, undefined, _jamsrui_utils.TVReturnType<{
85
+ variant: {
86
+ bordered: string;
87
+ solid: string;
138
88
  };
139
- }, {
140
- root: string;
141
- label: string;
142
- description: string;
143
- errorMessage: string;
144
- input: string[];
145
- wrapper: string;
146
- content: string;
147
- contentWrapper: string[];
148
- startContent: string;
149
- endContent: string;
150
- clearButton: string;
151
- }, undefined, unknown, unknown, undefined>>;
89
+ }, undefined, "input-group__input w-full px-3 py-2 text-sm placeholder:text-sm focus:outline-none", unknown, unknown, undefined>>;
152
90
  type InputVariantProps = VariantProps<typeof inputVariants>;
153
- type InputSlots = keyof ReturnType<typeof inputVariants>;
154
91
 
155
- export { type InputSlots, type InputVariantProps, inputVariants };
92
+ export { type InputVariantProps, inputGroupVariants, inputVariants };
package/dist/styles.mjs CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-I23VLZM2.mjs";export{a as inputVariants};
1
+ import{radiusBaseVariant as e,tv as r}from"@jamsrui/utils";const a=r({base:["input focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 placeholder:text-foreground-secondary bg-transparent font-normal"],variants:{variant:{bordered:"border border-divider hover:border-divider-light focus:border-focus",solid:"bg-surface hover:bg-surface/90"},size:{sm:"input--sm px-3 py-1.5 text-sm placeholder:text-sm",md:"input--md px-3 py-2 text-sm placeholder:text-sm",lg:"input--lg px-3 py-2 text-base placeholder:text-base"},radius:e,isInvalid:{true:"border-danger!"}},defaultVariants:{radius:"md",size:"md",variant:"bordered"}}),o=r({base:"input-group__input w-full px-3 py-2 text-sm placeholder:text-sm focus:outline-none",variants:{variant:{bordered:"border border-divider focus:border-focus",solid:"bg-surface hover:bg-surface/90"}}});export{o as inputGroupVariants,a as inputVariants};
@@ -1,16 +1,15 @@
1
- import 'react';
2
- import '@jamsrui/utils';
3
- export { u as useInput } from './input-B2ew93BT.mjs';
4
- import './input-clear-button.mjs';
5
- import './input-content.mjs';
6
- import './input-content-wrapper.mjs';
7
- import './input-description.mjs';
8
- import './input-end-content.mjs';
9
- import './input-error-message.mjs';
10
- import './input-field.mjs';
11
- import './input-label.mjs';
12
- import './input-root.mjs';
13
- import './input-start-content.mjs';
14
- import './input-wrapper.mjs';
15
- import './styles.mjs';
16
- import 'react/jsx-runtime';
1
+ import { PropGetter, UIProps } from '@jamsrui/utils';
2
+ import { InputVariantProps } from './styles.mjs';
3
+
4
+ declare const useInput: (props: useInput.Props) => {
5
+ getInputProps: PropGetter<UIProps<"input">>;
6
+ };
7
+ declare namespace useInput {
8
+ interface Props extends UIProps<"input">, InputVariantProps {
9
+ value?: string;
10
+ defaultValue?: string;
11
+ onValueChange?: (value: string) => void;
12
+ }
13
+ }
14
+
15
+ export { useInput };
@@ -1 +1 @@
1
- import{a}from"./chunk-3T5HYT35.mjs";import"./chunk-I23VLZM2.mjs";export{a as useInput};
1
+ import{useCallback as m,useMemo as v}from"react";import{useFieldA11yContext as V}from"@jamsrui/context";import{useControlledState as d}from"@jamsrui/hooks";import{useInputGroupContextOpt as x}from"@jamsrui/input-group";import{cn as h,mapPropsVariants as y}from"@jamsrui/utils";import{inputGroupVariants as G,inputVariants as P}from"./styles.mjs";const j=c=>{const[f,e]=y(c,P.variantKeys),o=x(),r=V(),{value:I,defaultValue:g,onValueChange:C,className:n,...p}=f,[a="",s]=d({defaultProp:g,onChange:C,prop:I}),u=o?G({...o.variantProps,...e}):P(e),i=m(t=>{s(t.target.value)},[s]),l=m(t=>({...r?.getInputProps(),...p,...t,className:h(u,n),value:a,onChange:i}),[r,p,u,n,a,i]);return v(()=>({getInputProps:l}),[l])};export{j as useInput};
package/package.json CHANGED
@@ -1,16 +1,15 @@
1
1
  {
2
2
  "name": "@jamsrui/input",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "peerDependencies": {
5
5
  "react": ">=19"
6
6
  },
7
7
  "dependencies": {
8
- "@jamsrui/field-error": "^0.0.5",
9
- "@jamsrui/label": "^0.0.5",
10
- "@jamsrui/core": "^0.0.10",
11
- "@jamsrui/utils": "^0.0.12",
12
- "@jamsrui/description": "^0.0.5",
13
- "@jamsrui/hooks": "^0.0.12"
8
+ "@jamsrui/context": "^0.0.3",
9
+ "@jamsrui/input-group": "^0.0.3",
10
+ "@jamsrui/hooks": "^0.0.14",
11
+ "@jamsrui/textfield": "^0.0.3",
12
+ "@jamsrui/utils": "^0.0.14"
14
13
  },
15
14
  "exports": {
16
15
  ".": {
@@ -1 +0,0 @@
1
- import{b as t}from"./chunk-D4PQ7L52.mjs";import{Description as s}from"@jamsrui/description";import{jsx as i}from"react/jsx-runtime";var m=o=>{let{children:p,...r}=o,{getDescriptionProps:e}=t();return i(s,{...e(r),children:p})};export{m as a};
@@ -1 +0,0 @@
1
- import{a as N}from"./chunk-I23VLZM2.mjs";import{useCallback as a,useId as C,useMemo as _}from"react";import{useControlledState as tt,useFocus as et,useFocusVisible as nt,useHover as ot,useMergeRefs as at}from"@jamsrui/hooks";import{cn as r,dataAttr as c,dataAttrDev as s,mapPropsVariants as st,mergeProps as p}from"@jamsrui/utils";var mt=k=>{let[K,g]=st(k,N.variantKeys),{startContent:f,endContent:b,classNames:n,label:v,isClearable:rt,isDisabled:l=!1,isReadonly:M,description:y,errorMessage:R,value:q,defaultValue:z,onValueChange:J,onClearInput:E,ref:Q,slotProps:e,...W}=K,[B="",i]=tt({defaultProp:z,onChange:J,prop:q}),o=N(g),u=g.isInvalid,m=C(),d=C(),P=C(),I=C(),{isFocused:G,ref:X}=et({isDisabled:l}),{isFocusVisible:V,ref:Y}=nt({isDisabled:l}),{isHovered:h,ref:Z}=ot({isDisabled:l}),L=at([Q,X,Y,Z]),pt=a(t=>{E?.(t),i("")},[E,i]),w=a(t=>{i(t.target.value)},[i]),S=a(t=>({...p(e?.root,t),"data-component":s("input"),"data-slot":s("root"),"data-focused":c(G),"data-focus-visible":c(V),"data-hovered":c(h),"data-disabled":c(l),"aria-disabled":c(l),"data-invalid":c(u),className:o.root({className:r(e?.root?.className,n?.root,t.className)})}),[n?.root,l,V,G,h,u,e?.root,o]),D=a(t=>({id:P,disabled:l,readOnly:M,"aria-labelledby":m,"aria-describedby":`${d} ${I}`,...W,...t,ref:L,"data-slot":s("input"),className:o.input({className:r(n?.input,t.className)}),value:B,onChange:w}),[P,l,M,m,d,I,W,L,o,n?.input,B,w]),H=a(t=>({...p(e?.wrapper,t),"data-slot":s("inputWrapper"),className:o.wrapper({className:r(e?.wrapper?.className,n?.wrapper,t.className)})}),[n?.wrapper,e?.wrapper,o]),T=a(t=>({...p(e?.content,t),"data-slot":s("content"),className:o.content({className:r(e?.content?.className,n?.content,t.className)})}),[n?.content,e?.content,o]),F=a(t=>({...p(e?.contentWrapper,t),"data-slot":s("contentWrapper"),className:o.contentWrapper({className:r(e?.contentWrapper?.className,n?.contentWrapper,t.className)})}),[n?.contentWrapper,e?.contentWrapper,o]),x=a(t=>({...p(e?.startContent,t),"data-slot":s("startContent"),className:o.startContent({className:r(e?.startContent?.className,n?.startContent,t.className)})}),[n?.startContent,e?.startContent,o]),$=a(t=>({...p(e?.endContent,t),"data-slot":s("endContent"),className:o.endContent({className:r(e?.endContent?.className,n?.endContent,t.className)})}),[n?.endContent,e?.endContent,o]),A=a(t=>({id:d,...p(e?.description,t),"data-slot":s("description"),className:o.description({className:r(e?.description?.className,n?.description,t.className)})}),[n?.description,d,e?.description,o]),O=a(t=>({id:I,...p(e?.errorMessage,t),"data-slot":s("errorMessage"),className:o.errorMessage({className:r(e?.errorMessage?.className,n?.errorMessage,t.className)})}),[n?.errorMessage,I,e?.errorMessage,o]),U=a(t=>({...p(e?.clearButton,t),"data-slot":s("clearButton"),className:o.clearButton({className:r(e?.clearButton?.className,n?.clearButton,t.className)})}),[n?.clearButton,e?.clearButton,o]),j=a(t=>({htmlFor:P,id:m,...p(e?.label,t),"data-slot":s("label"),className:o.label({className:r(e?.label?.className,n?.label,t.className)})}),[n?.label,P,m,e?.label,o]);return _(()=>({getRootProps:S,getClearButtonProps:U,getStartContentProps:x,getEndContentProps:$,getInputProps:D,getLabelProps:j,getDescriptionProps:A,getErrorMessageProps:O,label:v,description:y,errorMessage:R,isInvalid:u,getWrapperProps:H,getContentProps:T,getContentWrapperProps:F,startContent:f,endContent:b}),[S,U,x,$,D,j,A,O,v,y,R,u,H,T,F,f,b])};export{mt as a};
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk-D4PQ7L52.mjs";import{Label as s}from"@jamsrui/label";import{jsx as n}from"react/jsx-runtime";var b=t=>{let{children:o,...r}=t,{getLabelProps:p}=e();return n(s,{...p(r),children:o})};export{b as a};
@@ -1 +0,0 @@
1
- import{createContext as e,use as n}from"react";var o=e(null),r=()=>{let t=n(o);if(!t)throw new Error("useInputContext must be used within InputContextProvider");return t};export{o as a,r as b};
@@ -1 +0,0 @@
1
- import{b as r}from"./chunk-D4PQ7L52.mjs";import{FieldError as p}from"@jamsrui/field-error";import{jsx as n}from"react/jsx-runtime";var m=o=>{let{children:e,...s}=o,{getErrorMessageProps:t}=r();return n(p,{...t(s),children:e})};export{m as a};
@@ -1 +0,0 @@
1
- import{radiusVariant as t,tv as r}from"@jamsrui/utils";var o=r({slots:{root:"input__root flex flex-col gap-1.5 group",label:"input__label",description:"input__description",errorMessage:"input__error_message",input:["input__control grow bg-transparent font-normal","placeholder:text-foreground-secondary read-only:cursor-not-allowed focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"],wrapper:"input__wrapper",content:"input__content grow flex",contentWrapper:["input__content_wrapper border flex items-center border-divider","uig-disabled:cursor-not-allowed uig-disabled:opacity-60","not-uig-invalid:uig-focus:border-primary uig-focus:ring-primary","not-uig-invalid:uig-hover:border-divider-dark"],startContent:"input__start_content pl-2 text-sm text-foreground-secondary",endContent:"input__end_content pr-2 text-sm text-foreground-secondary",clearButton:"input__clear_button"},variants:{fullWidth:{true:{root:"w-full"}},size:{sm:{root:"input--sm",input:"px-3 py-1.5 text-sm placeholder:text-sm"},md:{root:"input--md",input:"px-3 py-2 text-sm placeholder:text-sm"},lg:{root:"input--lg",input:"px-3 py-2 text-base placeholder:text-base"}},isInvalid:{true:{root:"input--invalid",contentWrapper:"border-danger",label:"text-danger"}},radius:t("contentWrapper")},defaultVariants:{fullWidth:!1,isInvalid:!1,radius:"md",size:"md"}});export{o as a};
@@ -1 +0,0 @@
1
- import{b as t}from"./chunk-D4PQ7L52.mjs";import{useRenderElement as r}from"@jamsrui/hooks";var m=e=>{let{getRootProps:o}=t();return r("div",{props:[o(e)]})};export{m as a};
@@ -1 +0,0 @@
1
- import{b as t}from"./chunk-D4PQ7L52.mjs";import{useRenderElement as p}from"@jamsrui/hooks";var u=e=>{let{getEndContentProps:r,endContent:n}=t(),o=p("div",{props:[r(e),{children:n}]});return n?o:null};export{u as a};
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk-D4PQ7L52.mjs";import{useRenderElement as p}from"@jamsrui/hooks";var i=r=>{let{getStartContentProps:n,startContent:t}=e(),o=p("div",{props:[n(r),{children:t}]});return t?o:null};export{i as a};
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk-D4PQ7L52.mjs";import{useRenderElement as p}from"@jamsrui/hooks";var m=r=>{let{getContentWrapperProps:t}=e();return p("div",{props:[t(r)]})};export{m as a};
@@ -1 +0,0 @@
1
- import{b as r}from"./chunk-D4PQ7L52.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var m=e=>{let{getWrapperProps:p}=r();return t("div",{props:[p(e)]})};export{m as a};
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk-D4PQ7L52.mjs";import{useRenderElement as p}from"@jamsrui/hooks";var u=t=>{let{getInputProps:r}=e();return p("input",{props:[r(t)]})};export{u as a};
@@ -1 +0,0 @@
1
- import{b as t}from"./chunk-D4PQ7L52.mjs";import{useRenderElement as r}from"@jamsrui/hooks";var m=e=>{let{getContentProps:n}=t();return r("div",{props:[n(e)]})};export{m as a};
@@ -1 +0,0 @@
1
- import{a as P}from"./chunk-3T5HYT35.mjs";import{a as c}from"./chunk-DXYJK6Z2.mjs";import{a as C}from"./chunk-U25JGUU3.mjs";import{a as g}from"./chunk-744J4KCN.mjs";import{a as l}from"./chunk-IJYNHO5F.mjs";import{a as x}from"./chunk-LCBLRGH5.mjs";import{a as d}from"./chunk-QA6KD5QS.mjs";import{b as u}from"./chunk-ZNAJDFMD.mjs";import{a as s}from"./chunk-M46PIXLU.mjs";import{a as i}from"./chunk-VU73JURM.mjs";import{a as f}from"./chunk-3JAB5TM5.mjs";import{a}from"./chunk-JZ5MUM6R.mjs";import{a as I}from"./chunk-D4PQ7L52.mjs";import{mergeConfigProps as E}from"@jamsrui/utils";import{jsx as t,jsxs as o}from"react/jsx-runtime";var B=W=>{let r=u(),b=E(r,r,W),p=P(b),{label:n,description:e,errorMessage:m}=p;return t(I,{value:p,children:o(l,{children:[o(d,{children:[!!n&&t(g,{children:n}),o(s,{children:[t(x,{}),t(i,{children:t(C,{})}),t(a,{})]})]}),!!e&&t(f,{children:e}),!!m&&t(c,{children:m})]})})};export{B as a};
@@ -1 +0,0 @@
1
- import{createConfigContext as o}from"@jamsrui/utils";var[t,n]=o({displayName:"InputConfig"});export{t as a,n as b};
@@ -1,73 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as react from 'react';
3
- import { PropGetter, UIProps, SlotsToClassNames } from '@jamsrui/utils';
4
- import { InputClearButton } from './input-clear-button.mjs';
5
- import { InputContent } from './input-content.mjs';
6
- import { InputContentWrapper } from './input-content-wrapper.mjs';
7
- import { InputDescription } from './input-description.mjs';
8
- import { InputEndContent } from './input-end-content.mjs';
9
- import { InputErrorMessage } from './input-error-message.mjs';
10
- import { InputField } from './input-field.mjs';
11
- import { InputLabel } from './input-label.mjs';
12
- import { InputRoot } from './input-root.mjs';
13
- import { InputStartContent } from './input-start-content.mjs';
14
- import { InputWrapper } from './input-wrapper.mjs';
15
- import { InputVariantProps, InputSlots } from './styles.mjs';
16
-
17
- declare const useInput: (props: useInput.Props) => {
18
- getRootProps: PropGetter<InputRoot.Props>;
19
- getClearButtonProps: PropGetter<InputClearButton.Props>;
20
- getStartContentProps: PropGetter<InputStartContent.Props>;
21
- getEndContentProps: PropGetter<InputEndContent.Props>;
22
- getInputProps: PropGetter<InputField.Props>;
23
- getLabelProps: PropGetter<InputLabel.Props>;
24
- getDescriptionProps: PropGetter<InputDescription.Props>;
25
- getErrorMessageProps: PropGetter<InputErrorMessage.Props>;
26
- label: string | undefined;
27
- description: react.ReactNode;
28
- errorMessage: react.ReactNode;
29
- isInvalid: boolean | undefined;
30
- getWrapperProps: PropGetter<InputWrapper.Props>;
31
- getContentProps: PropGetter<InputContent.Props>;
32
- getContentWrapperProps: PropGetter<InputContentWrapper.Props>;
33
- startContent: react.ReactNode;
34
- endContent: react.ReactNode;
35
- };
36
- declare namespace useInput {
37
- interface Props extends UIProps<"input">, InputVariantProps {
38
- startContent?: React.ReactNode;
39
- endContent?: React.ReactNode;
40
- classNames?: SlotsToClassNames<InputSlots>;
41
- label?: string;
42
- isClearable?: boolean;
43
- description?: React.ReactNode;
44
- errorMessage?: React.ReactNode;
45
- isInvalid?: boolean;
46
- value?: string;
47
- defaultValue?: string;
48
- onValueChange?: (value: string) => void;
49
- onClearInput?: (e: React.MouseEvent<HTMLButtonElement>) => void;
50
- isDisabled?: boolean;
51
- isReadonly?: boolean;
52
- slotProps?: {
53
- root?: Omit<Input.Props, "classNames" | "slotProps">;
54
- wrapper?: InputWrapper.Props;
55
- content?: InputContent.Props;
56
- contentWrapper?: InputContentWrapper.Props;
57
- startContent?: InputStartContent.Props;
58
- endContent?: InputEndContent.Props;
59
- label?: InputLabel.Props;
60
- description?: InputDescription.Props;
61
- errorMessage?: InputErrorMessage.Props;
62
- clearButton?: InputClearButton.Props;
63
- };
64
- }
65
- }
66
-
67
- declare const Input: (props: Input.Props) => react_jsx_runtime.JSX.Element;
68
- declare namespace Input {
69
- interface Props extends useInput.Props {
70
- }
71
- }
72
-
73
- export { Input as I, useInput as u };
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import { UIProps } from '@jamsrui/utils';
3
-
4
- declare const InputClearButton: (props: InputClearButton.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
5
- declare namespace InputClearButton {
6
- interface Props extends UIProps<"button"> {
7
- }
8
- }
9
-
10
- export { InputClearButton };
@@ -1 +0,0 @@
1
- import{b as t}from"./chunk-D4PQ7L52.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var u=e=>{let{getClearButtonProps:r}=t();return o("button",{props:[r(e)]})};export{u as InputClearButton};
@@ -1,29 +0,0 @@
1
- import { I as Input } from './input-B2ew93BT.mjs';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { GlobalConfigProps } from '@jamsrui/core';
4
- import 'react';
5
- import '@jamsrui/utils';
6
- import './input-clear-button.mjs';
7
- import './input-content.mjs';
8
- import './input-content-wrapper.mjs';
9
- import './input-description.mjs';
10
- import './input-end-content.mjs';
11
- import './input-error-message.mjs';
12
- import './input-field.mjs';
13
- import './input-label.mjs';
14
- import './input-root.mjs';
15
- import './input-start-content.mjs';
16
- import './input-wrapper.mjs';
17
- import './styles.mjs';
18
-
19
- declare const useInputConfig: () => Record<string, any>;
20
- declare const InputConfig: (props: Omit<Partial<Record<string, any>>, "children"> & {
21
- merge?: boolean;
22
- children: React.ReactNode;
23
- }) => react_jsx_runtime.JSX.Element;
24
- declare namespace InputConfig {
25
- interface Props extends Input.Props, GlobalConfigProps<Input.Props> {
26
- }
27
- }
28
-
29
- export { InputConfig, useInputConfig };
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-ZNAJDFMD.mjs";export{a as InputConfig,b as useInputConfig};
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import { UIProps } from '@jamsrui/utils';
3
-
4
- declare const InputContentWrapper: (props: InputContentWrapper.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
5
- declare namespace InputContentWrapper {
6
- interface Props extends UIProps<"div"> {
7
- }
8
- }
9
-
10
- export { InputContentWrapper };
@@ -1 +0,0 @@
1
- import{a}from"./chunk-M46PIXLU.mjs";import"./chunk-D4PQ7L52.mjs";export{a as InputContentWrapper};
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import { UIProps } from '@jamsrui/utils';
3
-
4
- declare const InputContent: (props: InputContent.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
5
- declare namespace InputContent {
6
- interface Props extends UIProps<"div"> {
7
- }
8
- }
9
-
10
- export { InputContent };
@@ -1 +0,0 @@
1
- import{a}from"./chunk-VU73JURM.mjs";import"./chunk-D4PQ7L52.mjs";export{a as InputContent};
@@ -1,25 +0,0 @@
1
- import * as react from 'react';
2
- import { u as useInput } from './input-B2ew93BT.mjs';
3
- import 'react/jsx-runtime';
4
- import '@jamsrui/utils';
5
- import './input-clear-button.mjs';
6
- import './input-content.mjs';
7
- import './input-content-wrapper.mjs';
8
- import './input-description.mjs';
9
- import './input-end-content.mjs';
10
- import './input-error-message.mjs';
11
- import './input-field.mjs';
12
- import './input-label.mjs';
13
- import './input-root.mjs';
14
- import './input-start-content.mjs';
15
- import './input-wrapper.mjs';
16
- import './styles.mjs';
17
-
18
- declare const useInputContext: () => InputContext.Props;
19
- declare const InputContext: react.Context<InputContext.Props | null>;
20
- declare namespace InputContext {
21
- interface Props extends ReturnType<typeof useInput> {
22
- }
23
- }
24
-
25
- export { InputContext, useInputContext };
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-D4PQ7L52.mjs";export{a as InputContext,b as useInputContext};
@@ -1,10 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { UIProps } from '@jamsrui/utils';
3
-
4
- declare const InputDescription: (props: InputDescription.Props) => react_jsx_runtime.JSX.Element;
5
- declare namespace InputDescription {
6
- interface Props extends UIProps<"p"> {
7
- }
8
- }
9
-
10
- export { InputDescription };
@@ -1 +0,0 @@
1
- import{a}from"./chunk-3JAB5TM5.mjs";import"./chunk-D4PQ7L52.mjs";export{a as InputDescription};
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import { UIProps } from '@jamsrui/utils';
3
-
4
- declare const InputEndContent: (props: InputEndContent.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
5
- declare namespace InputEndContent {
6
- interface Props extends UIProps<"div"> {
7
- }
8
- }
9
-
10
- export { InputEndContent };
@@ -1 +0,0 @@
1
- import{a}from"./chunk-JZ5MUM6R.mjs";import"./chunk-D4PQ7L52.mjs";export{a as InputEndContent};
@@ -1,10 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { UIProps } from '@jamsrui/utils';
3
-
4
- declare const InputErrorMessage: (props: InputErrorMessage.Props) => react_jsx_runtime.JSX.Element;
5
- declare namespace InputErrorMessage {
6
- interface Props extends UIProps<"span"> {
7
- }
8
- }
9
-
10
- export { InputErrorMessage };
@@ -1 +0,0 @@
1
- import{a}from"./chunk-DXYJK6Z2.mjs";import"./chunk-D4PQ7L52.mjs";export{a as InputErrorMessage};
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import { UIProps } from '@jamsrui/utils';
3
-
4
- declare const InputField: (props: InputField.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
5
- declare namespace InputField {
6
- interface Props extends UIProps<"input"> {
7
- }
8
- }
9
-
10
- export { InputField };
@@ -1 +0,0 @@
1
- import{a}from"./chunk-U25JGUU3.mjs";import"./chunk-D4PQ7L52.mjs";export{a as InputField};
@@ -1,10 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { UIProps } from '@jamsrui/utils';
3
-
4
- declare const InputLabel: (props: InputLabel.Props) => react_jsx_runtime.JSX.Element;
5
- declare namespace InputLabel {
6
- interface Props extends UIProps<"label"> {
7
- }
8
- }
9
-
10
- export { InputLabel };
@@ -1 +0,0 @@
1
- import{a}from"./chunk-744J4KCN.mjs";import"./chunk-D4PQ7L52.mjs";export{a as InputLabel};
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import { UIProps } from '@jamsrui/utils';
3
-
4
- declare const InputRoot: (props: InputRoot.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
5
- declare namespace InputRoot {
6
- interface Props extends UIProps<"div"> {
7
- }
8
- }
9
-
10
- export { InputRoot };
@@ -1 +0,0 @@
1
- import{a}from"./chunk-IJYNHO5F.mjs";import"./chunk-D4PQ7L52.mjs";export{a as InputRoot};
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import { UIProps } from '@jamsrui/utils';
3
-
4
- declare const InputStartContent: (props: InputStartContent.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
5
- declare namespace InputStartContent {
6
- interface Props extends UIProps<"div"> {
7
- }
8
- }
9
-
10
- export { InputStartContent };
@@ -1 +0,0 @@
1
- import{a}from"./chunk-LCBLRGH5.mjs";import"./chunk-D4PQ7L52.mjs";export{a as InputStartContent};
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import { UIProps } from '@jamsrui/utils';
3
-
4
- declare const InputWrapper: (props: InputWrapper.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
5
- declare namespace InputWrapper {
6
- interface Props extends UIProps<"div"> {
7
- }
8
- }
9
-
10
- export { InputWrapper };
@@ -1 +0,0 @@
1
- import{a}from"./chunk-QA6KD5QS.mjs";import"./chunk-D4PQ7L52.mjs";export{a as InputWrapper};