@jamsrui/input-group 0.0.2
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 +40 -0
- package/dist/chunk-DI2Q7SWM.mjs +1 -0
- package/dist/chunk-HOCCJTBA.mjs +1 -0
- package/dist/chunk-INXP3MXO.mjs +1 -0
- package/dist/chunk-JC45OFBY.mjs +1 -0
- package/dist/chunk-OA76GBK6.mjs +1 -0
- package/dist/chunk-PKC446O7.mjs +1 -0
- package/dist/chunk-VOXCJOHF.mjs +1 -0
- package/dist/index.d.mts +18 -0
- package/dist/index.mjs +1 -0
- package/dist/input-group-context.d.mts +17 -0
- package/dist/input-group-context.mjs +1 -0
- package/dist/input-group-prefix.d.mts +10 -0
- package/dist/input-group-prefix.mjs +1 -0
- package/dist/input-group-root.d.mts +10 -0
- package/dist/input-group-root.mjs +1 -0
- package/dist/input-group-suffix.d.mts +10 -0
- package/dist/input-group-suffix.mjs +1 -0
- package/dist/input-group.d.mts +16 -0
- package/dist/input-group.mjs +1 -0
- package/dist/styles.d.mts +95 -0
- package/dist/styles.mjs +1 -0
- package/dist/use-input-group.d.mts +19 -0
- package/dist/use-input-group.mjs +1 -0
- package/package.json +50 -0
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# π **JamsrUI**
|
|
2
|
+
|
|
3
|
+
**A comprehensive React UI component library designed for developers, with Tailwind CSS integration for seamless styling.**
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## π **Overview**
|
|
7
|
+
|
|
8
|
+
[JamsrUI](https://jamsr-ui.jamsrworld.com) is designed to help developers build modern, fast and visually appealing web applications with ease.
|
|
9
|
+
|
|
10
|
+
## π Getting Started
|
|
11
|
+
|
|
12
|
+
Boost & Build your websites using [JamsrUI](https://jamsr-ui.jamsrworld.com).
|
|
13
|
+
|
|
14
|
+
## β¨ Features
|
|
15
|
+
|
|
16
|
+
- π **Production-Ready**: Optimized for modern React projects.
|
|
17
|
+
- π¨ **Customizable**: Easily override styles and themes.
|
|
18
|
+
- π οΈ **Reusable Components**: Save time with prebuilt, efficient UI elements.
|
|
19
|
+
- β‘ **Developer-Friendly**: Simple API and well-documented usage.
|
|
20
|
+
- π¦ **Lightweight**: Minimal dependencies for fast performance.
|
|
21
|
+
- π₯οΈ **Modern Design**: Clean, responsive, and user-friendly components.
|
|
22
|
+
|
|
23
|
+
## π± Community
|
|
24
|
+
|
|
25
|
+
Weβre thrilled to see the community actively engage with **JamsrUI**! Whether you're sharing feedback, reporting bugs, requesting features, or showcasing projects built with JamsrUI, your involvement helps us grow and improve.
|
|
26
|
+
|
|
27
|
+
### How to Engage
|
|
28
|
+
|
|
29
|
+
- π¬ **Report Bugs**: [GitHub Issues](https://github.com/jamsrworld/jamsr-ui/issues)
|
|
30
|
+
- π **Request Features**: Share ideas for new components.
|
|
31
|
+
- π€ **Showcase Projects**: Let us know how you use JamsrUI.
|
|
32
|
+
|
|
33
|
+
## Contributing
|
|
34
|
+
|
|
35
|
+
We welcome contributions from developers of all skill levels!
|
|
36
|
+
|
|
37
|
+
## β Support the Project
|
|
38
|
+
|
|
39
|
+
If you find **JamsrUI** helpful, consider giving it a β on [GitHub](https://github.com/jamsrworld/jamsr-ui).
|
|
40
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{radiusVariant as r,tv as o}from"@jamsrui/utils";var t=o({slots:{root:["input-group flex items-center group overflow-hidden","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"],prefix:"input__prefix pl-3 text-sm text-foreground-secondary select-none",suffix:"input__suffix pr-3 text-sm text-foreground-secondary select-none"},variants:{variant:{bordered:{root:"border border-divider focus-within:border-focus"},solid:{root:"bg-surface hover:bg-surface/90"}},isInvalid:{true:{root:"input--invalid",input:"border-danger"}},radius:r("root")},defaultVariants:{isInvalid:!1,radius:"md",variant:"bordered"}});export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./chunk-VOXCJOHF.mjs";import{a as p}from"./chunk-PKC446O7.mjs";import{a as u}from"./chunk-INXP3MXO.mjs";import{jsx as r}from"react/jsx-runtime";var s=o=>{let n=u(o);return r(p,{value:n,children:r(t,{children:o.children})})};export{s as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as p}from"./chunk-DI2Q7SWM.mjs";import{useCallback as n,useMemo as T}from"react";import{useFocus as b,useFocusVisible as E,useHover as y,useMergeRefs as D}from"@jamsrui/hooks";import{cn as u,dataAttr as o,dataAttrDev as a,mapPropsVariants as L}from"@jamsrui/utils";var j=I=>{let[v,r]=L(I,p.variantKeys),{ref:G,className:V,...M}=v,e=p(r),i=r.isInvalid,s=!1,{isFocused:c,ref:g}=b({isDisabled:s}),{isFocusVisible:f,ref:N}=E({isDisabled:s}),{isHovered:l,ref:H}=y({isDisabled:s}),F=D([G,g,N,H]),R=t=>{if(t.target.closest("input, textarea"))return;let x=t.currentTarget.querySelector("input, textarea");x&&(x.focus(),t.preventDefault())},m=n(t=>({"data-component":a("input-group"),"data-slot":a("root"),"data-focused":o(c),"data-focus-visible":o(f),"data-hovered":o(l),"data-disabled":o(s),"aria-disabled":o(s),"data-invalid":o(i),onMouseDown:R,...M,className:e.root({className:u(t.className)})}),[s,f,c,l,i,e]),d=n(t=>({"data-slot":a("prefix"),...t,className:e.prefix({className:u(t.className)})}),[e]),P=n(t=>({"data-slot":a("suffix"),...t,className:e.suffix({className:u(t.className)})}),[e]);return T(()=>({getRootProps:m,getPrefixProps:d,getSuffixProps:P,variantProps:r}),[m,d,P,r])};export{j as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-PKC446O7.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var s=r=>{let{getSuffixProps:t}=e();return o("div",{props:[t(r)]})};export{s as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-PKC446O7.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var u=r=>{let{getPrefixProps:t}=e();return o("div",{props:[t(r)]})};export{u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext as n,use as e}from"react";var o=n(null),u=()=>{let t=e(o);if(!t)throw new Error("useInputGroupContext must be used within InputGroupContextProvider");return t},p=()=>e(o);export{o as a,u as b,p as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as o}from"./chunk-PKC446O7.mjs";import{useRenderElement as e}from"@jamsrui/hooks";var u=r=>{let{getRootProps:t}=o();return e("div",{props:[t(r)]})};export{u as a};
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import { InputGroup as InputGroup$1 } from './input-group.mjs';
|
|
4
|
+
import { InputGroupPrefix } from './input-group-prefix.mjs';
|
|
5
|
+
import { InputGroupSuffix } from './input-group-suffix.mjs';
|
|
6
|
+
export { useInputGroup } from './use-input-group.mjs';
|
|
7
|
+
export { InputGroupContext, useInputGroupContext, useInputGroupContextOpt } from './input-group-context.mjs';
|
|
8
|
+
import '@jamsrui/utils';
|
|
9
|
+
import './input-group-root.mjs';
|
|
10
|
+
import './styles.mjs';
|
|
11
|
+
|
|
12
|
+
declare const InputGroup: ((props: InputGroup$1.Props) => react_jsx_runtime.JSX.Element) & {
|
|
13
|
+
Root: (props: InputGroup$1.Props) => react_jsx_runtime.JSX.Element;
|
|
14
|
+
Prefix: (props: InputGroupPrefix.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
15
|
+
Suffix: (props: InputGroupSuffix.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { InputGroup };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as p}from"./chunk-OA76GBK6.mjs";import{a as t}from"./chunk-JC45OFBY.mjs";import{a as o}from"./chunk-HOCCJTBA.mjs";import"./chunk-VOXCJOHF.mjs";import{a as u,b as r,c as n}from"./chunk-PKC446O7.mjs";import{a as e}from"./chunk-INXP3MXO.mjs";import"./chunk-DI2Q7SWM.mjs";var I=Object.assign(o,{Root:o,Prefix:p,Suffix:t});export{I as InputGroup,u as InputGroupContext,e as useInputGroup,r as useInputGroupContext,n as useInputGroupContextOpt};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { useInputGroup } from './use-input-group.mjs';
|
|
3
|
+
import '@jamsrui/utils';
|
|
4
|
+
import './input-group-prefix.mjs';
|
|
5
|
+
import './input-group-root.mjs';
|
|
6
|
+
import './input-group-suffix.mjs';
|
|
7
|
+
import './styles.mjs';
|
|
8
|
+
|
|
9
|
+
declare const useInputGroupContext: () => InputGroupContext.Props;
|
|
10
|
+
declare const useInputGroupContextOpt: () => InputGroupContext.Props | null;
|
|
11
|
+
declare const InputGroupContext: react.Context<InputGroupContext.Props | null>;
|
|
12
|
+
declare namespace InputGroupContext {
|
|
13
|
+
interface Props extends ReturnType<typeof useInputGroup> {
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { InputGroupContext, useInputGroupContext, useInputGroupContextOpt };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{a,b,c}from"./chunk-PKC446O7.mjs";export{a as InputGroupContext,b as useInputGroupContext,c as useInputGroupContextOpt};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { UIProps } from '@jamsrui/utils';
|
|
3
|
+
|
|
4
|
+
declare const InputGroupPrefix: (props: InputGroupPrefix.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
+
declare namespace InputGroupPrefix {
|
|
6
|
+
interface Props extends UIProps<"div"> {
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { InputGroupPrefix };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{a}from"./chunk-OA76GBK6.mjs";import"./chunk-PKC446O7.mjs";export{a as InputGroupPrefix};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { UIProps } from '@jamsrui/utils';
|
|
3
|
+
|
|
4
|
+
declare const InputGroupRoot: (props: InputGroupRoot.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
+
declare namespace InputGroupRoot {
|
|
6
|
+
interface Props extends UIProps<"div"> {
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { InputGroupRoot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-VOXCJOHF.mjs";import"./chunk-PKC446O7.mjs";export{a as InputGroupRoot};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { UIProps } from '@jamsrui/utils';
|
|
3
|
+
|
|
4
|
+
declare const InputGroupSuffix: (props: InputGroupSuffix.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
+
declare namespace InputGroupSuffix {
|
|
6
|
+
interface Props extends UIProps<"div"> {
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { InputGroupSuffix };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{a}from"./chunk-JC45OFBY.mjs";import"./chunk-PKC446O7.mjs";export{a as InputGroupSuffix};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { useInputGroup } from './use-input-group.mjs';
|
|
3
|
+
import '@jamsrui/utils';
|
|
4
|
+
import './input-group-prefix.mjs';
|
|
5
|
+
import 'react';
|
|
6
|
+
import './input-group-root.mjs';
|
|
7
|
+
import './input-group-suffix.mjs';
|
|
8
|
+
import './styles.mjs';
|
|
9
|
+
|
|
10
|
+
declare const InputGroup: (props: InputGroup.Props) => react_jsx_runtime.JSX.Element;
|
|
11
|
+
declare namespace InputGroup {
|
|
12
|
+
interface Props extends useInputGroup.Props {
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { InputGroup };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{a}from"./chunk-HOCCJTBA.mjs";import"./chunk-VOXCJOHF.mjs";import"./chunk-PKC446O7.mjs";import"./chunk-INXP3MXO.mjs";import"./chunk-DI2Q7SWM.mjs";export{a as InputGroup};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as _jamsrui_utils from '@jamsrui/utils';
|
|
2
|
+
import { VariantProps } from '@jamsrui/utils';
|
|
3
|
+
|
|
4
|
+
declare const inputGroupVariants: _jamsrui_utils.TVReturnType<{
|
|
5
|
+
variant: {
|
|
6
|
+
bordered: {
|
|
7
|
+
root: string;
|
|
8
|
+
};
|
|
9
|
+
solid: {
|
|
10
|
+
root: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
isInvalid: {
|
|
14
|
+
true: {
|
|
15
|
+
root: string;
|
|
16
|
+
input: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
radius: {
|
|
20
|
+
sm: {};
|
|
21
|
+
md: {};
|
|
22
|
+
lg: {};
|
|
23
|
+
xl: {};
|
|
24
|
+
"2xl": {};
|
|
25
|
+
"3xl": {};
|
|
26
|
+
full: {};
|
|
27
|
+
none: {};
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
root: string[];
|
|
31
|
+
prefix: string;
|
|
32
|
+
suffix: string;
|
|
33
|
+
}, undefined, {
|
|
34
|
+
variant: {
|
|
35
|
+
bordered: {
|
|
36
|
+
root: string;
|
|
37
|
+
};
|
|
38
|
+
solid: {
|
|
39
|
+
root: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
isInvalid: {
|
|
43
|
+
true: {
|
|
44
|
+
root: string;
|
|
45
|
+
input: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
radius: {
|
|
49
|
+
sm: {};
|
|
50
|
+
md: {};
|
|
51
|
+
lg: {};
|
|
52
|
+
xl: {};
|
|
53
|
+
"2xl": {};
|
|
54
|
+
"3xl": {};
|
|
55
|
+
full: {};
|
|
56
|
+
none: {};
|
|
57
|
+
};
|
|
58
|
+
}, {
|
|
59
|
+
root: string[];
|
|
60
|
+
prefix: string;
|
|
61
|
+
suffix: string;
|
|
62
|
+
}, _jamsrui_utils.TVReturnType<{
|
|
63
|
+
variant: {
|
|
64
|
+
bordered: {
|
|
65
|
+
root: string;
|
|
66
|
+
};
|
|
67
|
+
solid: {
|
|
68
|
+
root: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
isInvalid: {
|
|
72
|
+
true: {
|
|
73
|
+
root: string;
|
|
74
|
+
input: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
radius: {
|
|
78
|
+
sm: {};
|
|
79
|
+
md: {};
|
|
80
|
+
lg: {};
|
|
81
|
+
xl: {};
|
|
82
|
+
"2xl": {};
|
|
83
|
+
"3xl": {};
|
|
84
|
+
full: {};
|
|
85
|
+
none: {};
|
|
86
|
+
};
|
|
87
|
+
}, {
|
|
88
|
+
root: string[];
|
|
89
|
+
prefix: string;
|
|
90
|
+
suffix: string;
|
|
91
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
92
|
+
type InputGroupVariantProps = VariantProps<typeof inputGroupVariants>;
|
|
93
|
+
type InputGroupSlots = keyof ReturnType<typeof inputGroupVariants>;
|
|
94
|
+
|
|
95
|
+
export { type InputGroupSlots, type InputGroupVariantProps, inputGroupVariants };
|
package/dist/styles.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-DI2Q7SWM.mjs";export{a as inputGroupVariants};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PropGetter, UIProps } from '@jamsrui/utils';
|
|
2
|
+
import { InputGroupPrefix } from './input-group-prefix.mjs';
|
|
3
|
+
import { InputGroupRoot } from './input-group-root.mjs';
|
|
4
|
+
import { InputGroupSuffix } from './input-group-suffix.mjs';
|
|
5
|
+
import { InputGroupVariantProps } from './styles.mjs';
|
|
6
|
+
import 'react';
|
|
7
|
+
|
|
8
|
+
declare const useInputGroup: (props: useInputGroup.Props) => {
|
|
9
|
+
getRootProps: PropGetter<InputGroupRoot.Props>;
|
|
10
|
+
getPrefixProps: PropGetter<InputGroupPrefix.Props>;
|
|
11
|
+
getSuffixProps: PropGetter<InputGroupSuffix.Props>;
|
|
12
|
+
variantProps: Pick<useInputGroup.Props, "radius" | "isInvalid" | "variant">;
|
|
13
|
+
};
|
|
14
|
+
declare namespace useInputGroup {
|
|
15
|
+
interface Props extends UIProps<"div">, InputGroupVariantProps {
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { useInputGroup };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{a}from"./chunk-INXP3MXO.mjs";import"./chunk-DI2Q7SWM.mjs";export{a as useInputGroup};
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jamsrui/input-group",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"react": ">=19"
|
|
6
|
+
},
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@jamsrui/core": "^0.0.11",
|
|
9
|
+
"@jamsrui/field-error": "^0.0.6",
|
|
10
|
+
"@jamsrui/description": "^0.0.6",
|
|
11
|
+
"@jamsrui/utils": "^0.0.13",
|
|
12
|
+
"@jamsrui/hooks": "^0.0.13",
|
|
13
|
+
"@jamsrui/label": "^0.0.6"
|
|
14
|
+
},
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.mjs"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"description": "A modern and beautiful Next.js UI components library.",
|
|
22
|
+
"keywords": [
|
|
23
|
+
"react",
|
|
24
|
+
"ui",
|
|
25
|
+
"UI components",
|
|
26
|
+
"Next.js",
|
|
27
|
+
"React",
|
|
28
|
+
"JamsrUI",
|
|
29
|
+
"jamsr-ui",
|
|
30
|
+
"TypeScript"
|
|
31
|
+
],
|
|
32
|
+
"sideEffects": false,
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"author": "@jamsrworld",
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://github.com/jamsrworld/jamsr-ui"
|
|
38
|
+
},
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/jamsrworld/jamsr-ui/issues"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://jamsr-ui.jamsrworld.com",
|
|
43
|
+
"files": [
|
|
44
|
+
"dist",
|
|
45
|
+
"README",
|
|
46
|
+
"README.md",
|
|
47
|
+
"package.json",
|
|
48
|
+
"LICENSE"
|
|
49
|
+
]
|
|
50
|
+
}
|