@devup-ui/components 0.1.0 → 0.1.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 +17 -21
- package/dist/components/Button/index.cjs +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Input/Controlled.d.ts +2 -0
- package/dist/components/Input/Controlled.d.ts.map +1 -0
- package/dist/components/Input/GlassIcon.d.ts +3 -0
- package/dist/components/Input/GlassIcon.d.ts.map +1 -0
- package/dist/components/Input/Input.stories.d.ts +11 -0
- package/dist/components/Input/Input.stories.d.ts.map +1 -0
- package/dist/components/Input/index.cjs +2 -0
- package/dist/components/Input/index.d.ts +30 -0
- package/dist/components/Input/index.d.ts.map +1 -0
- package/dist/components/Input/index.js +180 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -82,31 +82,28 @@ Devup UI is a CSS in JS preprocessor that does not require runtime.
|
|
|
82
82
|
Devup UI eliminates the performance degradation of the browser through the CSS in JS preprocessor.
|
|
83
83
|
We develop a preprocessor that considers all grammatical cases.
|
|
84
84
|
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<Box className={"d0"}/>
|
|
85
|
+
```typescript
|
|
86
|
+
const before = <Box bg={"red"}/>
|
|
87
|
+
|
|
88
|
+
const after = <div className="d0"/>
|
|
90
89
|
```
|
|
91
90
|
|
|
92
91
|
Variables are fully supported.
|
|
93
92
|
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
<Box className={"d0"} style={{
|
|
93
|
+
```typescript
|
|
94
|
+
const before = <Box bg={colorVariable}/>
|
|
95
|
+
|
|
96
|
+
const after = <div className="d0" style={{
|
|
99
97
|
"--d0": colorVariable
|
|
100
98
|
}}/>
|
|
101
99
|
```
|
|
102
100
|
|
|
103
101
|
Various expressions and responsiveness are also fully supported.
|
|
104
102
|
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
<Box className={`d0 d1 ${a > b ? "d2" : "d3"}`} style={{
|
|
103
|
+
```typescript
|
|
104
|
+
const before = <Box bg={["red", "blue", a > b ? "yellow" : variable]}/>
|
|
105
|
+
|
|
106
|
+
const after = <div className={`d0 d1 ${a > b ? "d2" : "d3"}`} style={{
|
|
110
107
|
"--d2": variable
|
|
111
108
|
}}/>
|
|
112
109
|
```
|
|
@@ -130,7 +127,7 @@ Support Theme with Typing
|
|
|
130
127
|
}
|
|
131
128
|
```
|
|
132
129
|
|
|
133
|
-
```
|
|
130
|
+
```typescript
|
|
134
131
|
// Type Safe
|
|
135
132
|
<Text color="$text"/>
|
|
136
133
|
```
|
|
@@ -139,11 +136,10 @@ Support Responsive And Pseudo Selector
|
|
|
139
136
|
|
|
140
137
|
You can use responsive and pseudo selector.
|
|
141
138
|
|
|
142
|
-
```
|
|
139
|
+
```typescript
|
|
143
140
|
// Responsive with Selector
|
|
144
|
-
<Box _hover={{bg: ["red", "blue"]}}/>
|
|
145
|
-
|
|
146
|
-
// Another way
|
|
147
|
-
<Box _hover={[{bg: "red"}, {bg: "blue"}]}/>
|
|
141
|
+
const box = <Box _hover={{bg: ["red", "blue"]}}/>
|
|
148
142
|
|
|
143
|
+
// Same
|
|
144
|
+
const box = <Box _hover={[{bg: "red"}, {bg: "blue"}]}/>
|
|
149
145
|
```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),a=require("@devup-ui/react"),d=require("clsx"),y=a.css({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"});function f({variant:e="default",type:u="button",colors:r,danger:t=!1,children:n,size:o="md",className:m,icon:i,ellipsis:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),a=require("@devup-ui/react"),d=require("clsx"),y=a.css({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"});function f({variant:e="default",type:u="button",colors:r,danger:t=!1,children:n,size:o="md",className:m,icon:i,ellipsis:x=!1,typography:s,disabled:p,...b}){return l.jsx(a.Button,{_active:{primary:{bg:"color-mix(in srgb, var(--primary, #674DC7) 100%, #000 30%)"},default:{bg:{true:"var(--error, #D52B2E)",false:"color-mix(in srgb, var(--primary, #8163E1) 20%, #FFF 80%)"}[t.toString()],border:{true:"1px solid var(--error, #D52B2E)",false:"1px solid var(--primary, #8163E1)"}[t.toString()],color:"var(--text, #272727)"}}[e],_disabled:{primary:{color:"#D6D7DE",bgColor:"#F0F0F3",cursor:"not-allowed"},default:{color:"#D6D7DE",bgColor:"#F0F0F3",cursor:"not-allowed",borderColor:"var(--border, #E4E4E4)"}}[e],_focusVisible:{outline:"2px solid",outlineColor:{primary:"var(--primaryFocus, #9385D3)",default:{true:"var(--error, #FF5B5E)",false:"var(--primaryFocus, #9385D3)"}[t.toString()]}[e]},_hover:{primary:{bg:"color-mix(in srgb, var(--primary, #674DC7) 100%, #000 15%)"},default:{borderColor:{true:"var(--error, #D52B2E)",false:"var(--primary, #8163E1)"}[t.toString()],bg:!t&&"color-mix(in srgb, var(--primary, #8163E1) 10%, #FFF 90%)"}}[e],_themeDark:{_active:{primary:{bg:"color-mix(in srgb, var(--primary, #8163E1) 100%, #FFF 30%);"},default:{bg:{true:"var(--error, #FF5B5E)",false:"var(--primary, #8163E1)"}[t.toString()],color:"var(--text, #F6F6F6)"}}[e],_disabled:{primary:{color:"#373737",bgColor:"#47474A",borderColor:"transparent"},default:{color:"#373737",bgColor:"#47474A",borderColor:"transparent"}}[e],_hover:{primary:{bg:"color-mix(in srgb, var(--primary, #8163E1) 100%, #FFF 15%);",outlineColor:"var(--primary, #674DC7)"},default:{borderColor:{true:"var(--error, #FF5B5E)",false:"var(--primary, #8163E1)"}[t.toString()],bg:!t&&"color-mix(in srgb, var(--primary, #674DC7) 10%, var(--inputBackground, #2E2E2E) 90%)"}}[e],_focusVisible:{outlineColor:{primary:"var(--primaryFocus, #927CE4)",default:{true:"var(--error, #D52B2E)",false:"var(--primaryFocus, #927CE4)"}[t.toString()]}[e]},bg:{primary:"var(--primary, #8163E1)",default:"var(--inputBackground, #2E2E2E)"}[e]},"aria-disabled":p,"aria-label":"button",bg:{primary:"var(--primary, #8163E1)",default:"var(--inputBackground, #FFF)"}[e],border:{primary:"none",default:"1px solid var(--border, #E4E4E4)"}[e],borderRadius:{primary:"8px",default:"10px"}[e],boxSizing:"border-box",className:m,color:{primary:"#FFF",default:{true:"var(--error, #D52B2E)",false:"var(--text, #272727)"}[t.toString()]}[e],cursor:"pointer",disabled:p,fontSize:{default:["14px",null,null,null,"15px"],primary:["15px",null,null,null,"16px"]}[e],fontWeight:700,letterSpacing:{default:["-0.02em",null,null,null,"-0.03em"],primary:["0px",null,null,null,"-0.01em"]}[e],outlineOffset:"2px",pos:"relative",px:{false:{sm:"12px",md:"16px",lg:"20px"}[o],true:{sm:"24px",md:"28px",lg:"32px"}[o]}[(!!i).toString()],py:{sm:"8px",md:"10px",lg:"12px"}[o],styleOrder:1,styleVars:{primary:r==null?void 0:r.primary,error:r==null?void 0:r.error,text:r==null?void 0:r.text,border:r==null?void 0:r.border,inputBackground:r==null?void 0:r.inputBackground,primaryFocus:r==null?void 0:r.primaryFocus},transition:".25s",type:u,typography:s,...b,children:l.jsxs(a.Box,{maxW:"100%",mx:"auto",pos:"relative",w:"fit-content",children:[i&&l.jsx(a.Center,{boxSize:"24px",left:"4px",pos:"absolute",role:"presentation",selectors:{"&>svg":{color:"inherit"}},top:"50%",transform:"translate(-100%, -50%)",children:i}),l.jsx(a.Box,{className:d.clsx(x&&y),lineHeight:"1.2",minH:"1.2em",transform:!!i&&"translateX(8px)",children:n})]})})}exports.Button=f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Controlled.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Controlled.tsx"],"names":[],"mappings":"AAIA,wBAAgB,UAAU,4CAIzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlassIcon.d.ts","sourceRoot":"","sources":["../../../src/components/Input/GlassIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAEtC,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,2CAkBrD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Input } from './index';
|
|
3
|
+
type Story = StoryObj<typeof meta>;
|
|
4
|
+
declare const meta: Meta<typeof Input>;
|
|
5
|
+
export declare const Default: Story;
|
|
6
|
+
export declare const ControlledInput: Story;
|
|
7
|
+
export declare const Error: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
9
|
+
export declare const WithIcon: Story;
|
|
10
|
+
export default meta;
|
|
11
|
+
//# sourceMappingURL=Input.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAItD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAGlC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAU5B,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAA;AAED,eAAe,IAAI,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("@devup-ui/react"),f=require("react");function C({defaultValue:a,value:v,onChange:n,typography:k,error:o=!1,errorMessage:p,allowClear:l=!0,icon:d,colors:e,disabled:u,className:F,classNames:r,ref:B,...y}){const[b,x]=f.useState(a||""),D=g=>{x(g.target.value),n==null||n(g)},E=()=>{x("")},j=b&&!u&&l;return t.jsxs(i.Box,{display:"inline-block",pos:"relative",selectors:{"&,&>*":{boxSizing:"border-box"}},children:[d&&t.jsx(i.Center,{"aria-label":"icon",boxSize:"24px",className:r==null?void 0:r.icon,color:u?"var(--inputDisabledText, light-dark(#D6D7DE, #373737))":"var(--iconBold, light-dark(#8D8C9A, #666577))",left:"12px",pos:"absolute",styleOrder:1,top:"50%",transform:"translateY(-50%)",children:d}),t.jsx(i.Input,{ref:B,_disabled:{_placeholder:{color:"var(--inputDisabledText, light-dark(#D6D7DE, #373737))"},bg:"var(--inputDisabledBg, light-dark(#F0F0F3, #414244))",border:"1px solid var(--border, light-dark(#E4E4E4, #434343))",color:"var(--inputDisabledText, light-dark(#D6D7DE, #373737))"},_focus:{bg:"var(--primaryBg, light-dark(#F4F3FA, #F4F3FA0D))",border:"1px solid var(--primary, light-dark(#674DC7, #8163E1))",outline:"none"},_hover:{border:"1px solid var(--primary, light-dark(red, blue))"},_placeholder:{color:"var(--inputPlaceholder, light-dark(#A9A8AB, #CBCBCB))"},"aria-label":"input",bg:"var(--inputBg, light-dark(#FFFFFF, #2E2E2E))",borderColor:o?"var(--error, light-dark(#D52B2E, #FF5B5E))":"var(--border, light-dark(#E4E4E4, #434343))",borderRadius:"8px",borderStyle:"solid",borderWidth:"1px",className:`${F||""} ${(r==null?void 0:r.input)||""}`.trim(),disabled:u,onChange:D,pl:d?"36px":"12px",pr:l?"36px":"12px",py:"12px",styleOrder:1,styleVars:{primary:e==null?void 0:e.primary,error:e==null?void 0:e.error,text:e==null?void 0:e.text,base:e==null?void 0:e.base,iconBold:e==null?void 0:e.iconBold,border:e==null?void 0:e.border,inputBackground:e==null?void 0:e.inputBackground,primaryFocus:e==null?void 0:e.primaryFocus,negative20:e==null?void 0:e.negative20},transition:"all 0.1s ease-in-out",typography:k,value:v??b,...y}),j&&t.jsx(h,{onClick:E}),p&&t.jsx(i.Text,{"aria-label":"error-message",bottom:"-8px",className:r==null?void 0:r.errorMessage,color:"var(--error, light-dark(#D52B2E, #FF5B5E))",left:"0",pos:"absolute",styleOrder:1,transform:"translateY(100%)",typography:"inputPlaceholder",children:p})]})}function h(a){return t.jsx(i.Button,{alignItems:"center","aria-label":"clear-button",bg:"var(--negative20, light-dark(#0003, #FFF6))",border:"none",borderRadius:"50%",boxSize:"20px",color:"var(--base, light-dark(#FFF, #000))",cursor:"pointer",display:"flex",justifyContent:"center",p:"2px",pos:"absolute",right:"12px",styleOrder:1,top:"50%",transform:"translateY(-50%)",...a,children:t.jsxs("svg",{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M18 6L6 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),t.jsx("path",{d:"M6 6L18 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})]})})}exports.ClearButton=h;exports.Input=C;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DevupThemeTypography } from '@devup-ui/react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
interface InputProps extends Omit<ComponentProps<'input'>, 'type'> {
|
|
4
|
+
type?: Exclude<ComponentProps<'input'>['type'], 'file'>;
|
|
5
|
+
typography?: keyof DevupThemeTypography;
|
|
6
|
+
error?: boolean;
|
|
7
|
+
errorMessage?: string;
|
|
8
|
+
allowClear?: boolean;
|
|
9
|
+
classNames?: {
|
|
10
|
+
input?: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
};
|
|
14
|
+
colors?: {
|
|
15
|
+
primary?: string;
|
|
16
|
+
error?: string;
|
|
17
|
+
text?: string;
|
|
18
|
+
base?: string;
|
|
19
|
+
iconBold?: string;
|
|
20
|
+
border?: string;
|
|
21
|
+
inputBackground?: string;
|
|
22
|
+
primaryFocus?: string;
|
|
23
|
+
negative20?: string;
|
|
24
|
+
};
|
|
25
|
+
icon?: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
export declare function Input({ defaultValue, value: valueProp, onChange: onChangeProp, typography, error, errorMessage, allowClear, icon, colors, disabled, className, classNames, ref, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function ClearButton(props: ComponentProps<'button'>): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Input/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,oBAAoB,EAGrB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAA;AAEhD,UAAU,UAAW,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAChE,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAA;IACvD,UAAU,CAAC,EAAE,MAAM,oBAAoB,CAAA;IACvC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE;QACX,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,YAAY,CAAC,EAAE,MAAM,CAAA;KACtB,CAAA;IACD,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,eAAe,CAAC,EAAE,MAAM,CAAA;QACxB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB,CAAA;IACD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,wBAAgB,KAAK,CAAC,EACpB,YAAY,EACZ,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,YAAY,EACtB,UAAU,EACV,KAAa,EACb,YAAY,EACZ,UAAiB,EACjB,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,EACV,GAAG,EACH,GAAG,KAAK,EACT,EAAE,UAAU,2CA4GZ;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,QAAQ,CAAC,2CA6C1D"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as g, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { Box as f, Center as C, Input as m, Text as A, Button as L } from "@devup-ui/react";
|
|
4
|
+
import { useState as j } from "react";
|
|
5
|
+
function O({
|
|
6
|
+
defaultValue: i,
|
|
7
|
+
value: x,
|
|
8
|
+
onChange: a,
|
|
9
|
+
typography: k,
|
|
10
|
+
error: v = !1,
|
|
11
|
+
errorMessage: p,
|
|
12
|
+
allowClear: u = !0,
|
|
13
|
+
icon: n,
|
|
14
|
+
colors: r,
|
|
15
|
+
disabled: d,
|
|
16
|
+
className: o,
|
|
17
|
+
classNames: t,
|
|
18
|
+
ref: F,
|
|
19
|
+
...B
|
|
20
|
+
}) {
|
|
21
|
+
const [l, b] = j(i || ""), y = (h) => {
|
|
22
|
+
b(h.target.value), a == null || a(h);
|
|
23
|
+
}, D = () => {
|
|
24
|
+
b("");
|
|
25
|
+
}, E = l && !d && u;
|
|
26
|
+
return /* @__PURE__ */ g(
|
|
27
|
+
f,
|
|
28
|
+
{
|
|
29
|
+
display: "inline-block",
|
|
30
|
+
pos: "relative",
|
|
31
|
+
selectors: { "&,&>*": { boxSizing: "border-box" } },
|
|
32
|
+
children: [
|
|
33
|
+
n && /* @__PURE__ */ e(
|
|
34
|
+
C,
|
|
35
|
+
{
|
|
36
|
+
"aria-label": "icon",
|
|
37
|
+
boxSize: "24px",
|
|
38
|
+
className: t == null ? void 0 : t.icon,
|
|
39
|
+
color: d ? "var(--inputDisabledText, light-dark(#D6D7DE, #373737))" : "var(--iconBold, light-dark(#8D8C9A, #666577))",
|
|
40
|
+
left: "12px",
|
|
41
|
+
pos: "absolute",
|
|
42
|
+
styleOrder: 1,
|
|
43
|
+
top: "50%",
|
|
44
|
+
transform: "translateY(-50%)",
|
|
45
|
+
children: n
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ e(
|
|
49
|
+
m,
|
|
50
|
+
{
|
|
51
|
+
ref: F,
|
|
52
|
+
_disabled: {
|
|
53
|
+
_placeholder: {
|
|
54
|
+
color: "var(--inputDisabledText, light-dark(#D6D7DE, #373737))"
|
|
55
|
+
},
|
|
56
|
+
bg: "var(--inputDisabledBg, light-dark(#F0F0F3, #414244))",
|
|
57
|
+
border: "1px solid var(--border, light-dark(#E4E4E4, #434343))",
|
|
58
|
+
color: "var(--inputDisabledText, light-dark(#D6D7DE, #373737))"
|
|
59
|
+
},
|
|
60
|
+
_focus: {
|
|
61
|
+
bg: "var(--primaryBg, light-dark(#F4F3FA, #F4F3FA0D))",
|
|
62
|
+
border: "1px solid var(--primary, light-dark(#674DC7, #8163E1))",
|
|
63
|
+
outline: "none"
|
|
64
|
+
},
|
|
65
|
+
_hover: {
|
|
66
|
+
border: "1px solid var(--primary, light-dark(red, blue))"
|
|
67
|
+
},
|
|
68
|
+
_placeholder: {
|
|
69
|
+
color: "var(--inputPlaceholder, light-dark(#A9A8AB, #CBCBCB))"
|
|
70
|
+
},
|
|
71
|
+
"aria-label": "input",
|
|
72
|
+
bg: "var(--inputBg, light-dark(#FFFFFF, #2E2E2E))",
|
|
73
|
+
borderColor: v ? "var(--error, light-dark(#D52B2E, #FF5B5E))" : "var(--border, light-dark(#E4E4E4, #434343))",
|
|
74
|
+
borderRadius: "8px",
|
|
75
|
+
borderStyle: "solid",
|
|
76
|
+
borderWidth: "1px",
|
|
77
|
+
className: `${o || ""} ${(t == null ? void 0 : t.input) || ""}`.trim(),
|
|
78
|
+
disabled: d,
|
|
79
|
+
onChange: y,
|
|
80
|
+
pl: n ? "36px" : "12px",
|
|
81
|
+
pr: u ? "36px" : "12px",
|
|
82
|
+
py: "12px",
|
|
83
|
+
styleOrder: 1,
|
|
84
|
+
styleVars: {
|
|
85
|
+
primary: r == null ? void 0 : r.primary,
|
|
86
|
+
error: r == null ? void 0 : r.error,
|
|
87
|
+
text: r == null ? void 0 : r.text,
|
|
88
|
+
base: r == null ? void 0 : r.base,
|
|
89
|
+
iconBold: r == null ? void 0 : r.iconBold,
|
|
90
|
+
border: r == null ? void 0 : r.border,
|
|
91
|
+
inputBackground: r == null ? void 0 : r.inputBackground,
|
|
92
|
+
primaryFocus: r == null ? void 0 : r.primaryFocus,
|
|
93
|
+
negative20: r == null ? void 0 : r.negative20
|
|
94
|
+
},
|
|
95
|
+
transition: "all 0.1s ease-in-out",
|
|
96
|
+
typography: k,
|
|
97
|
+
value: x ?? l,
|
|
98
|
+
...B
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
E && /* @__PURE__ */ e(w, { onClick: D }),
|
|
102
|
+
p && /* @__PURE__ */ e(
|
|
103
|
+
A,
|
|
104
|
+
{
|
|
105
|
+
"aria-label": "error-message",
|
|
106
|
+
bottom: "-8px",
|
|
107
|
+
className: t == null ? void 0 : t.errorMessage,
|
|
108
|
+
color: "var(--error, light-dark(#D52B2E, #FF5B5E))",
|
|
109
|
+
left: "0",
|
|
110
|
+
pos: "absolute",
|
|
111
|
+
styleOrder: 1,
|
|
112
|
+
transform: "translateY(100%)",
|
|
113
|
+
typography: "inputPlaceholder",
|
|
114
|
+
children: p
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
function w(i) {
|
|
122
|
+
return /* @__PURE__ */ e(
|
|
123
|
+
L,
|
|
124
|
+
{
|
|
125
|
+
alignItems: "center",
|
|
126
|
+
"aria-label": "clear-button",
|
|
127
|
+
bg: "var(--negative20, light-dark(#0003, #FFF6))",
|
|
128
|
+
border: "none",
|
|
129
|
+
borderRadius: "50%",
|
|
130
|
+
boxSize: "20px",
|
|
131
|
+
color: "var(--base, light-dark(#FFF, #000))",
|
|
132
|
+
cursor: "pointer",
|
|
133
|
+
display: "flex",
|
|
134
|
+
justifyContent: "center",
|
|
135
|
+
p: "2px",
|
|
136
|
+
pos: "absolute",
|
|
137
|
+
right: "12px",
|
|
138
|
+
styleOrder: 1,
|
|
139
|
+
top: "50%",
|
|
140
|
+
transform: "translateY(-50%)",
|
|
141
|
+
...i,
|
|
142
|
+
children: /* @__PURE__ */ g(
|
|
143
|
+
"svg",
|
|
144
|
+
{
|
|
145
|
+
fill: "none",
|
|
146
|
+
height: "24",
|
|
147
|
+
viewBox: "0 0 24 24",
|
|
148
|
+
width: "24",
|
|
149
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
150
|
+
children: [
|
|
151
|
+
/* @__PURE__ */ e(
|
|
152
|
+
"path",
|
|
153
|
+
{
|
|
154
|
+
d: "M18 6L6 18",
|
|
155
|
+
stroke: "currentColor",
|
|
156
|
+
strokeLinecap: "round",
|
|
157
|
+
strokeLinejoin: "round",
|
|
158
|
+
strokeWidth: "2"
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
/* @__PURE__ */ e(
|
|
162
|
+
"path",
|
|
163
|
+
{
|
|
164
|
+
d: "M6 6L18 18",
|
|
165
|
+
stroke: "currentColor",
|
|
166
|
+
strokeLinecap: "round",
|
|
167
|
+
strokeLinejoin: "round",
|
|
168
|
+
strokeWidth: "2"
|
|
169
|
+
}
|
|
170
|
+
)
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
export {
|
|
178
|
+
w as ClearButton,
|
|
179
|
+
O as Input
|
|
180
|
+
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components/Button/index.cjs");exports.Button=t.Button;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components/Button/index.cjs"),e=require("./components/Input/index.cjs");exports.Button=t.Button;exports.Input=e.Input;
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA"}
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"css-in-js-framework",
|
|
17
17
|
"react"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.1.
|
|
19
|
+
"version": "0.1.2",
|
|
20
20
|
"type": "module",
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"access": "public"
|
|
@@ -36,28 +36,28 @@
|
|
|
36
36
|
"types": "./dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"csstype": "^3.1.3",
|
|
39
|
-
"react": "^19.1.
|
|
39
|
+
"react": "^19.1.1",
|
|
40
40
|
"clsx": "^2.1",
|
|
41
|
-
"@devup-ui/react": "1.0.
|
|
41
|
+
"@devup-ui/react": "1.0.15"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@storybook/addon-docs": "9.
|
|
45
|
-
"@storybook/addon-onboarding": "^9.
|
|
46
|
-
"@storybook/react-vite": "^9.
|
|
47
|
-
"@types/react": "^19.1.
|
|
48
|
-
"eslint-plugin-storybook": "9.
|
|
44
|
+
"@storybook/addon-docs": "^9.1.1",
|
|
45
|
+
"@storybook/addon-onboarding": "^9.1.1",
|
|
46
|
+
"@storybook/react-vite": "^9.1.1",
|
|
47
|
+
"@types/react": "^19.1.9",
|
|
48
|
+
"eslint-plugin-storybook": "^9.1.1",
|
|
49
49
|
"rollup-plugin-preserve-directives": "^0.4.0",
|
|
50
|
-
"storybook": "^9.
|
|
51
|
-
"typescript": "^5.
|
|
52
|
-
"vite": "^
|
|
50
|
+
"storybook": "^9.1.1",
|
|
51
|
+
"typescript": "^5.9.2",
|
|
52
|
+
"vite": "^7.0.6",
|
|
53
53
|
"vite-plugin-dts": "^4.5.4",
|
|
54
54
|
"vitest": "^3.2.4",
|
|
55
|
-
"@devup-ui/vite-plugin": "1.0.
|
|
55
|
+
"@devup-ui/vite-plugin": "1.0.26"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"csstype": "*",
|
|
59
59
|
"react": "*",
|
|
60
|
-
"@devup-ui/react": "1.0.
|
|
60
|
+
"@devup-ui/react": "1.0.15"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"lint": "eslint",
|