@devup-ui/components 0.1.7 → 0.1.9
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/dist/components/Select/Select.stories.d.ts +1 -0
- package/dist/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/components/Select/index.cjs +1 -1
- package/dist/components/Select/index.d.ts +16 -15
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +153 -137
- package/dist/contexts/useSelect.cjs +2 -0
- package/dist/contexts/useSelect.d.ts +21 -0
- package/dist/contexts/useSelect.d.ts.map +1 -0
- package/dist/contexts/useSelect.js +12 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -12
- package/dist/types/select.d.ts +3 -0
- package/dist/types/select.d.ts.map +1 -0
- package/package.json +11 -10
|
@@ -5,5 +5,6 @@ declare const meta: Meta<typeof Select>;
|
|
|
5
5
|
export declare const DefaultStory: Story;
|
|
6
6
|
export declare const ControlledRadioStory: Story;
|
|
7
7
|
export declare const ControlledCheckboxStory: Story;
|
|
8
|
+
export declare const SelectWithOptionsStory: Story;
|
|
8
9
|
export default meta;
|
|
9
10
|
//# sourceMappingURL=Select.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAGtD,OAAO,EACL,MAAM,EAKP,MAAM,GAAG,CAAA;AAGV,MAAM,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAGzC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAU7B,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAK1B,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAGlC,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,KAGrC,CAAA;AAED,eAAe,IAAI,CAAA"}
|
|
1
|
+
{"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAGtD,OAAO,EACL,MAAM,EAKP,MAAM,GAAG,CAAA;AAGV,MAAM,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAGzC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAU7B,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAK1B,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAGlC,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,KAGrC,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,KAGpC,CAAA;AAED,eAAe,IAAI,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),m=require("react"),u=require("@devup-ui/react"),A=require("clsx"),v=require("../../contexts/useSelect.cjs"),E=require("../Button/index.cjs"),F=require("./IconCheck.cjs");function O({type:i="default",children:o,defaultValue:f,value:s,onChange:l,defaultOpen:g,open:b,onOpenChange:x,colors:e,typography:p,options:a,...k}){const r=m.useRef(null),[h,d]=m.useState(g??!1),[c,y]=m.useState(f??(i==="checkbox"?[]:""));m.useEffect(()=>{const n=S=>{r.current&&r.current.contains(S.target)||d(!1)};return document.addEventListener("click",n),()=>document.removeEventListener("click",n)},[h,d]);const B=n=>{x==null||x(n),d(n)},C=n=>{if(l==null||l(n),i!=="default"){if(i==="radio"){y(n);return}Array.isArray(c)&&c.includes(n)?y(c.filter(S=>S!==n)):y([...c,n])}};return t.jsx(v.SelectContext.Provider,{value:{open:b??h,setOpen:B,value:s??c,setValue:C,type:i,ref:r},children:t.jsx(u.Box,{ref:r,display:"inline-block",h:"fit-content",selectors:{"&, & *":{boxSizing:"border-box"}},styleOrder:1,styleVars:{primary:e==null?void 0:e.primary,border:e==null?void 0:e.border,inputBackground:e==null?void 0:e.inputBackground,base10:e==null?void 0:e.base10,title:e==null?void 0:e.title,selectDisabled:e==null?void 0:e.selectDisabled,primaryBg:e==null?void 0:e.primaryBg,inputDisabledBackground:e==null?void 0:e.inputDisabledBackground,inputDisabledText:e==null?void 0:e.inputDisabledText},typography:p,...k,children:a?t.jsxs(t.Fragment,{children:[t.jsx(j,{children:o}),t.jsx(w,{children:a==null?void 0:a.map(n=>m.createElement(D,{...n,key:"option-"+n.value},n.label??n.value))})]}):o})})}function j({className:i,children:o,asChild:f,...s}){const{open:l,setOpen:g}=v.useSelect(),b=()=>{g(!l)};if(f){const x=m.Children.only(o),e=x.type;return t.jsx(e,{"aria-expanded":l,"aria-label":"Select toggle",onClick:b,...x.props})}return t.jsx(E.Button,{"aria-expanded":l,"aria-label":"Select toggle",className:A(u.css({borderRadius:"8px",styleOrder:2}),i),onClick:b,...s,children:o})}function w({children:i,showConfirmButton:o,confirmButtonText:f="완료",x:s=0,y:l=0,...g}){const{open:b,setOpen:x,type:e,ref:p}=v.useSelect();return b?t.jsxs(u.VStack,{ref:a=>{if(!p.current||!a)return;const k=p.current,r=()=>{const{height:h,x:d,y:c}=k.getBoundingClientRect();a.offsetHeight+c+l>window.innerHeight?a.style.bottom=`${window.innerHeight-c+10}px`:a.style.top=`${c+h+10+l}px`,a.offsetWidth+d+s>window.innerWidth?a.style.left=`${d-a.offsetWidth+k.offsetWidth+s}px`:a.style.left=`${d+s}px`};return r(),window.addEventListener("scroll",r,!0),window.addEventListener("resize",r),()=>{window.removeEventListener("scroll",r,!0),window.removeEventListener("resize",r)}},"aria-label":"Select container",bg:"var(--inputBg, light-dark(#FFF,#2E2E2E))",border:"1px solid var(--border, light-dark(#E4E4E4,#434343))",borderRadius:"8px",bottom:"-4px",boxShadow:"0 2px 2px 0 var(--base10, light-dark(#0000001A,#FFFFFF1A))",boxSize:"fit-content",gap:"6px",minW:"232px",p:"10px",pos:"fixed",styleOrder:1,userSelect:"none",zIndex:1,...g,children:[i,o&&e==="checkbox"&&t.jsx(u.Flex,{justifyContent:"end",w:"100%",children:t.jsx(E.Button,{"aria-label":"Select confirm button",className:u.css({textAlign:"end",bg:"var(--primary, light-dark(#674DC7, #8163E1))",borderRadius:"8px",w:"fit-content",px:"30px",py:"10px",color:"#FFF",typography:"buttonS"}),onClick:()=>x(!1),variant:"primary",children:f})})]}):null}function D({disabled:i,onClick:o,children:f,value:s,showCheck:l=!0,...g}){const{setOpen:b,setValue:x,value:e,type:p}=v.useSelect(),a=()=>{p!=="checkbox"&&b(!1)},k=(d,c)=>{if(o){o(d,c);return}typeof d=="string"&&x(d),a()},r={default:!1,radio:e===s,checkbox:Array.isArray(e)&&s&&e.includes(s)}[p],h=!i&&!(p==="radio"&&r);return t.jsxs(u.Flex,{_hover:h&&{bg:"var(--primaryBg, light-dark(#F4F3FA, #F4F3FA0D))"},alignItems:"center",borderRadius:"6px",color:i?"var(--selectDisabled, light-dark(#C4C5D1, #45464D))":r?"var(--primary, light-dark(#674DC7, #8163E1)":"var(--title, light-dark(#1A1A1A,#FAFAFA))",cursor:h?"pointer":"default","data-value":s,fontWeight:r?"700":"400",gap:{checkbox:"10px",radio:"6px",default:"0"}[p],h:"40px",onClick:i?void 0:d=>k(s,d),px:"10px",styleOrder:1,transition:"background-color 0.1s ease-in-out",...g,children:[l&&{checkbox:t.jsx(u.Box,{bg:i?"var(--inputDisabledBackground, light-dark(#F0F0F3, #414244))":r?"var(--primary, light-dark(#674DC7, #8163E1)":"var(--border, light-dark(#E4E4E4, #434343))",borderRadius:"4px",boxSize:"18px",pos:"relative",transition:"background-color 0.1s ease-in-out",children:r&&t.jsx(F.IconCheck,{className:u.css({color:i?"var(--inputDisabledText, light-dark(#E5E5E5, #373737))":"#FFF",position:"absolute",top:"55%",left:"50%",transform:"translate(-50%, -50%)"})})}),radio:t.jsx(t.Fragment,{children:r&&t.jsx(u.Box,{borderRadius:"4px",boxSize:"18px",pos:"relative",transition:"background-color 0.1s ease-in-out",children:t.jsx(F.IconCheck,{className:u.css({position:"absolute",top:"55%",left:"50%",transform:"translate(-50%, -50%)",color:"inherit"})})})}),default:null}[p],f]})}function R({...i}){return t.jsx(u.Box,{bg:"var(--border, light-dark(#E4E4E4,#434343)",h:"1px",styleOrder:1,w:"100%",...i})}exports.Select=O;exports.SelectContainer=w;exports.SelectDivider=R;exports.SelectOption=D;exports.SelectTrigger=j;
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
import { DevupThemeTypography } from '@devup-ui/react';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
|
+
import { SelectType, SelectValue } from '../../types/select';
|
|
3
4
|
import { Button } from '../Button';
|
|
4
|
-
|
|
5
|
-
type SelectValue<T extends SelectType> = T extends 'radio' ? string : string[];
|
|
6
|
-
export declare const useSelect: () => {
|
|
7
|
-
open: boolean;
|
|
8
|
-
setOpen: (open: boolean) => void;
|
|
9
|
-
value: SelectValue<SelectType>;
|
|
10
|
-
setValue: (value: string) => void;
|
|
11
|
-
type: SelectType;
|
|
12
|
-
};
|
|
13
|
-
interface SelectProps extends ComponentProps<'div'> {
|
|
5
|
+
interface SelectProps extends Omit<ComponentProps<'div'>, 'onChange'> {
|
|
14
6
|
defaultValue?: SelectValue<SelectType>;
|
|
15
7
|
value?: SelectValue<SelectType>;
|
|
16
|
-
|
|
8
|
+
onChange?: (value: string) => void;
|
|
17
9
|
defaultOpen?: boolean;
|
|
18
10
|
open?: boolean;
|
|
19
11
|
onOpenChange?: (open: boolean) => void;
|
|
@@ -31,8 +23,15 @@ interface SelectProps extends ComponentProps<'div'> {
|
|
|
31
23
|
primaryBg?: string;
|
|
32
24
|
};
|
|
33
25
|
typography?: keyof DevupThemeTypography;
|
|
26
|
+
options?: {
|
|
27
|
+
label?: string;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
onClick?: (value: string | undefined, e?: React.MouseEvent<HTMLDivElement>) => void;
|
|
30
|
+
showCheck?: boolean;
|
|
31
|
+
value: string;
|
|
32
|
+
}[];
|
|
34
33
|
}
|
|
35
|
-
export declare function Select({ type, children, defaultValue, value: valueProp,
|
|
34
|
+
export declare function Select({ type, children, defaultValue, value: valueProp, onChange, defaultOpen, open: openProp, onOpenChange, colors, typography, options, ...props }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
36
35
|
interface SelectTriggerProps extends ComponentProps<typeof Button> {
|
|
37
36
|
asChild?: boolean;
|
|
38
37
|
}
|
|
@@ -40,12 +39,14 @@ export declare function SelectTrigger({ className, children, asChild, ...props }
|
|
|
40
39
|
interface SelectContainerProps extends ComponentProps<'div'> {
|
|
41
40
|
showConfirmButton?: boolean;
|
|
42
41
|
confirmButtonText?: string;
|
|
42
|
+
x?: number;
|
|
43
|
+
y?: number;
|
|
43
44
|
}
|
|
44
|
-
export declare function SelectContainer({ children, showConfirmButton, confirmButtonText, ...props }: SelectContainerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
45
|
+
export declare function SelectContainer({ children, showConfirmButton, confirmButtonText, x, y, ...props }: SelectContainerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
45
46
|
interface SelectOptionProps extends Omit<ComponentProps<'div'>, 'onClick'> {
|
|
46
|
-
onClick?: (value: string | undefined, e?: React.MouseEvent<HTMLDivElement>) => void;
|
|
47
|
-
disabled?: boolean;
|
|
48
47
|
value?: string;
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
onClick?: (value: string | undefined, e?: React.MouseEvent<HTMLDivElement>) => void;
|
|
49
50
|
showCheck?: boolean;
|
|
50
51
|
}
|
|
51
52
|
export declare function SelectOption({ disabled, onClick, children, value, showCheck, ...props }: SelectOptionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,oBAAoB,EAAgB,MAAM,iBAAiB,CAAA;AAE9E,OAAO,EAEL,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,65 +1,62 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import {
|
|
2
|
+
import { jsx as a, jsxs as F, Fragment as D } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as R, useState as S, useEffect as z, createElement as L, Children as W } from "react";
|
|
4
|
+
import { Box as m, VStack as H, Flex as A, css as k } from "@devup-ui/react";
|
|
4
5
|
import N from "clsx";
|
|
5
|
-
import {
|
|
6
|
-
import { Button as
|
|
7
|
-
import { IconCheck as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
defaultValue: c,
|
|
18
|
-
value: i,
|
|
19
|
-
onValueChange: a,
|
|
20
|
-
defaultOpen: o,
|
|
21
|
-
open: p,
|
|
22
|
-
onOpenChange: u,
|
|
6
|
+
import { SelectContext as T, useSelect as E } from "../../contexts/useSelect.js";
|
|
7
|
+
import { Button as C } from "../Button/index.js";
|
|
8
|
+
import { IconCheck as w } from "./IconCheck.js";
|
|
9
|
+
function J({
|
|
10
|
+
type: r = "default",
|
|
11
|
+
children: c,
|
|
12
|
+
defaultValue: b,
|
|
13
|
+
value: d,
|
|
14
|
+
onChange: s,
|
|
15
|
+
defaultOpen: x,
|
|
16
|
+
open: f,
|
|
17
|
+
onOpenChange: p,
|
|
23
18
|
colors: e,
|
|
24
|
-
typography:
|
|
25
|
-
|
|
19
|
+
typography: o,
|
|
20
|
+
options: n,
|
|
21
|
+
...g
|
|
26
22
|
}) {
|
|
27
|
-
const
|
|
28
|
-
|
|
23
|
+
const t = R(null), [h, l] = S(x ?? !1), [u, v] = S(
|
|
24
|
+
b ?? (r === "checkbox" ? [] : "")
|
|
29
25
|
);
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
26
|
+
z(() => {
|
|
27
|
+
const i = (y) => {
|
|
28
|
+
t.current && t.current.contains(y.target) || l(!1);
|
|
33
29
|
};
|
|
34
|
-
return document.addEventListener("click",
|
|
35
|
-
}, [
|
|
36
|
-
const B = (
|
|
37
|
-
|
|
38
|
-
}, O = (
|
|
39
|
-
if (
|
|
40
|
-
if (
|
|
41
|
-
|
|
30
|
+
return document.addEventListener("click", i), () => document.removeEventListener("click", i);
|
|
31
|
+
}, [h, l]);
|
|
32
|
+
const B = (i) => {
|
|
33
|
+
p == null || p(i), l(i);
|
|
34
|
+
}, O = (i) => {
|
|
35
|
+
if (s == null || s(i), r !== "default") {
|
|
36
|
+
if (r === "radio") {
|
|
37
|
+
v(i);
|
|
42
38
|
return;
|
|
43
39
|
}
|
|
44
|
-
Array.isArray(
|
|
40
|
+
Array.isArray(u) && u.includes(i) ? v(u.filter((y) => y !== i)) : v([...u, i]);
|
|
45
41
|
}
|
|
46
42
|
};
|
|
47
|
-
return /* @__PURE__ */
|
|
48
|
-
|
|
43
|
+
return /* @__PURE__ */ a(
|
|
44
|
+
T.Provider,
|
|
49
45
|
{
|
|
50
46
|
value: {
|
|
51
|
-
open:
|
|
47
|
+
open: f ?? h,
|
|
52
48
|
setOpen: B,
|
|
53
|
-
value:
|
|
49
|
+
value: d ?? u,
|
|
54
50
|
setValue: O,
|
|
55
|
-
type:
|
|
51
|
+
type: r,
|
|
52
|
+
ref: t
|
|
56
53
|
},
|
|
57
|
-
children: /* @__PURE__ */
|
|
58
|
-
|
|
54
|
+
children: /* @__PURE__ */ a(
|
|
55
|
+
m,
|
|
59
56
|
{
|
|
60
|
-
ref:
|
|
57
|
+
ref: t,
|
|
61
58
|
display: "inline-block",
|
|
62
|
-
|
|
59
|
+
h: "fit-content",
|
|
63
60
|
selectors: {
|
|
64
61
|
"&, & *": {
|
|
65
62
|
boxSizing: "border-box"
|
|
@@ -77,81 +74,101 @@ function G({
|
|
|
77
74
|
inputDisabledBackground: e == null ? void 0 : e.inputDisabledBackground,
|
|
78
75
|
inputDisabledText: e == null ? void 0 : e.inputDisabledText
|
|
79
76
|
},
|
|
80
|
-
typography:
|
|
81
|
-
...
|
|
82
|
-
children:
|
|
77
|
+
typography: o,
|
|
78
|
+
...g,
|
|
79
|
+
children: n ? /* @__PURE__ */ F(D, { children: [
|
|
80
|
+
/* @__PURE__ */ a($, { children: c }),
|
|
81
|
+
/* @__PURE__ */ a(j, { children: n == null ? void 0 : n.map((i) => /* @__PURE__ */ L(I, { ...i, key: "option-" + i.value }, i.label ?? i.value)) })
|
|
82
|
+
] }) : c
|
|
83
83
|
}
|
|
84
84
|
)
|
|
85
85
|
}
|
|
86
86
|
);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
className:
|
|
90
|
-
children:
|
|
91
|
-
asChild:
|
|
92
|
-
...
|
|
88
|
+
function $({
|
|
89
|
+
className: r,
|
|
90
|
+
children: c,
|
|
91
|
+
asChild: b,
|
|
92
|
+
...d
|
|
93
93
|
}) {
|
|
94
|
-
const { open:
|
|
95
|
-
|
|
94
|
+
const { open: s, setOpen: x } = E(), f = () => {
|
|
95
|
+
x(!s);
|
|
96
96
|
};
|
|
97
|
-
if (
|
|
98
|
-
const
|
|
99
|
-
return /* @__PURE__ */
|
|
97
|
+
if (b) {
|
|
98
|
+
const p = W.only(c), e = p.type;
|
|
99
|
+
return /* @__PURE__ */ a(
|
|
100
100
|
e,
|
|
101
101
|
{
|
|
102
|
-
"aria-expanded":
|
|
102
|
+
"aria-expanded": s,
|
|
103
103
|
"aria-label": "Select toggle",
|
|
104
|
-
onClick:
|
|
105
|
-
...
|
|
104
|
+
onClick: f,
|
|
105
|
+
...p.props
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
108
|
}
|
|
109
|
-
return /* @__PURE__ */
|
|
110
|
-
|
|
109
|
+
return /* @__PURE__ */ a(
|
|
110
|
+
C,
|
|
111
111
|
{
|
|
112
|
-
"aria-expanded":
|
|
112
|
+
"aria-expanded": s,
|
|
113
113
|
"aria-label": "Select toggle",
|
|
114
114
|
className: N(
|
|
115
115
|
k({
|
|
116
|
-
borderRadius: "8px"
|
|
116
|
+
borderRadius: "8px",
|
|
117
|
+
styleOrder: 2
|
|
117
118
|
}),
|
|
118
|
-
|
|
119
|
+
r
|
|
119
120
|
),
|
|
120
|
-
onClick:
|
|
121
|
-
...
|
|
122
|
-
children:
|
|
121
|
+
onClick: f,
|
|
122
|
+
...d,
|
|
123
|
+
children: c
|
|
123
124
|
}
|
|
124
125
|
);
|
|
125
126
|
}
|
|
126
|
-
function
|
|
127
|
-
children:
|
|
128
|
-
showConfirmButton:
|
|
129
|
-
confirmButtonText:
|
|
130
|
-
|
|
127
|
+
function j({
|
|
128
|
+
children: r,
|
|
129
|
+
showConfirmButton: c,
|
|
130
|
+
confirmButtonText: b = "완료",
|
|
131
|
+
x: d = 0,
|
|
132
|
+
y: s = 0,
|
|
133
|
+
...x
|
|
131
134
|
}) {
|
|
132
|
-
const { open:
|
|
133
|
-
return
|
|
134
|
-
|
|
135
|
+
const { open: f, setOpen: p, type: e, ref: o } = E();
|
|
136
|
+
return f ? /* @__PURE__ */ F(
|
|
137
|
+
H,
|
|
135
138
|
{
|
|
139
|
+
ref: (n) => {
|
|
140
|
+
if (!o.current || !n) return;
|
|
141
|
+
const g = o.current, t = () => {
|
|
142
|
+
const {
|
|
143
|
+
height: h,
|
|
144
|
+
x: l,
|
|
145
|
+
y: u
|
|
146
|
+
} = g.getBoundingClientRect();
|
|
147
|
+
n.offsetHeight + u + s > window.innerHeight ? n.style.bottom = `${window.innerHeight - u + 10}px` : n.style.top = `${u + h + 10 + s}px`, n.offsetWidth + l + d > window.innerWidth ? n.style.left = `${l - n.offsetWidth + g.offsetWidth + d}px` : n.style.left = `${l + d}px`;
|
|
148
|
+
};
|
|
149
|
+
return t(), window.addEventListener("scroll", t, !0), window.addEventListener("resize", t), () => {
|
|
150
|
+
window.removeEventListener("scroll", t, !0), window.removeEventListener("resize", t);
|
|
151
|
+
};
|
|
152
|
+
},
|
|
136
153
|
"aria-label": "Select container",
|
|
137
154
|
bg: "var(--inputBg, light-dark(#FFF,#2E2E2E))",
|
|
138
155
|
border: "1px solid var(--border, light-dark(#E4E4E4,#434343))",
|
|
139
156
|
borderRadius: "8px",
|
|
140
157
|
bottom: "-4px",
|
|
141
158
|
boxShadow: "0 2px 2px 0 var(--base10, light-dark(#0000001A,#FFFFFF1A))",
|
|
159
|
+
boxSize: "fit-content",
|
|
142
160
|
gap: "6px",
|
|
143
|
-
|
|
161
|
+
minW: "232px",
|
|
144
162
|
p: "10px",
|
|
145
|
-
pos: "
|
|
163
|
+
pos: "fixed",
|
|
146
164
|
styleOrder: 1,
|
|
147
|
-
transform: "translateY(100%)",
|
|
148
165
|
userSelect: "none",
|
|
149
|
-
|
|
150
|
-
...
|
|
166
|
+
zIndex: 1,
|
|
167
|
+
...x,
|
|
151
168
|
children: [
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
169
|
+
r,
|
|
170
|
+
c && e === "checkbox" && /* @__PURE__ */ a(A, { justifyContent: "end", w: "100%", children: /* @__PURE__ */ a(
|
|
171
|
+
C,
|
|
155
172
|
{
|
|
156
173
|
"aria-label": "Select confirm button",
|
|
157
174
|
className: k({
|
|
@@ -164,74 +181,74 @@ function K({
|
|
|
164
181
|
color: "#FFF",
|
|
165
182
|
typography: "buttonS"
|
|
166
183
|
}),
|
|
167
|
-
onClick: () =>
|
|
184
|
+
onClick: () => p(!1),
|
|
168
185
|
variant: "primary",
|
|
169
|
-
children:
|
|
186
|
+
children: b
|
|
170
187
|
}
|
|
171
188
|
) })
|
|
172
189
|
]
|
|
173
190
|
}
|
|
174
191
|
) : null;
|
|
175
192
|
}
|
|
176
|
-
function
|
|
177
|
-
disabled:
|
|
178
|
-
onClick:
|
|
179
|
-
children:
|
|
180
|
-
value:
|
|
181
|
-
showCheck:
|
|
182
|
-
...
|
|
193
|
+
function I({
|
|
194
|
+
disabled: r,
|
|
195
|
+
onClick: c,
|
|
196
|
+
children: b,
|
|
197
|
+
value: d,
|
|
198
|
+
showCheck: s = !0,
|
|
199
|
+
...x
|
|
183
200
|
}) {
|
|
184
|
-
const { setOpen:
|
|
185
|
-
|
|
186
|
-
},
|
|
187
|
-
if (
|
|
188
|
-
l
|
|
201
|
+
const { setOpen: f, setValue: p, value: e, type: o } = E(), n = () => {
|
|
202
|
+
o !== "checkbox" && f(!1);
|
|
203
|
+
}, g = (l, u) => {
|
|
204
|
+
if (c) {
|
|
205
|
+
c(l, u);
|
|
189
206
|
return;
|
|
190
207
|
}
|
|
191
|
-
typeof
|
|
192
|
-
},
|
|
208
|
+
typeof l == "string" && p(l), n();
|
|
209
|
+
}, t = {
|
|
193
210
|
default: !1,
|
|
194
|
-
radio: e ===
|
|
195
|
-
checkbox: Array.isArray(e) &&
|
|
196
|
-
}[
|
|
197
|
-
return /* @__PURE__ */
|
|
198
|
-
|
|
211
|
+
radio: e === d,
|
|
212
|
+
checkbox: Array.isArray(e) && d && e.includes(d)
|
|
213
|
+
}[o], h = !r && !(o === "radio" && t);
|
|
214
|
+
return /* @__PURE__ */ F(
|
|
215
|
+
A,
|
|
199
216
|
{
|
|
200
|
-
_hover:
|
|
217
|
+
_hover: h && {
|
|
201
218
|
bg: "var(--primaryBg, light-dark(#F4F3FA, #F4F3FA0D))"
|
|
202
219
|
},
|
|
203
220
|
alignItems: "center",
|
|
204
221
|
borderRadius: "6px",
|
|
205
|
-
color:
|
|
206
|
-
cursor:
|
|
207
|
-
"data-value":
|
|
208
|
-
fontWeight:
|
|
222
|
+
color: r ? "var(--selectDisabled, light-dark(#C4C5D1, #45464D))" : t ? "var(--primary, light-dark(#674DC7, #8163E1)" : "var(--title, light-dark(#1A1A1A,#FAFAFA))",
|
|
223
|
+
cursor: h ? "pointer" : "default",
|
|
224
|
+
"data-value": d,
|
|
225
|
+
fontWeight: t ? "700" : "400",
|
|
209
226
|
gap: {
|
|
210
227
|
checkbox: "10px",
|
|
211
228
|
radio: "6px",
|
|
212
229
|
default: "0"
|
|
213
|
-
}[
|
|
230
|
+
}[o],
|
|
214
231
|
h: "40px",
|
|
215
|
-
onClick:
|
|
232
|
+
onClick: r ? void 0 : (l) => g(d, l),
|
|
216
233
|
px: "10px",
|
|
217
234
|
styleOrder: 1,
|
|
218
235
|
transition: "background-color 0.1s ease-in-out",
|
|
219
|
-
...
|
|
236
|
+
...x,
|
|
220
237
|
children: [
|
|
221
|
-
|
|
222
|
-
checkbox: /* @__PURE__ */
|
|
223
|
-
|
|
238
|
+
s && {
|
|
239
|
+
checkbox: /* @__PURE__ */ a(
|
|
240
|
+
m,
|
|
224
241
|
{
|
|
225
|
-
bg:
|
|
242
|
+
bg: r ? "var(--inputDisabledBackground, light-dark(#F0F0F3, #414244))" : t ? "var(--primary, light-dark(#674DC7, #8163E1)" : "var(--border, light-dark(#E4E4E4, #434343))",
|
|
226
243
|
borderRadius: "4px",
|
|
227
244
|
boxSize: "18px",
|
|
228
245
|
pos: "relative",
|
|
229
246
|
transition: "background-color 0.1s ease-in-out",
|
|
230
|
-
children:
|
|
231
|
-
|
|
247
|
+
children: t && /* @__PURE__ */ a(
|
|
248
|
+
w,
|
|
232
249
|
{
|
|
233
250
|
className: k({
|
|
234
|
-
color:
|
|
251
|
+
color: r ? "var(--inputDisabledText, light-dark(#E5E5E5, #373737))" : "#FFF",
|
|
235
252
|
position: "absolute",
|
|
236
253
|
top: "55%",
|
|
237
254
|
left: "50%",
|
|
@@ -241,15 +258,15 @@ function M({
|
|
|
241
258
|
)
|
|
242
259
|
}
|
|
243
260
|
),
|
|
244
|
-
radio: /* @__PURE__ */
|
|
245
|
-
|
|
261
|
+
radio: /* @__PURE__ */ a(D, { children: t && /* @__PURE__ */ a(
|
|
262
|
+
m,
|
|
246
263
|
{
|
|
247
264
|
borderRadius: "4px",
|
|
248
265
|
boxSize: "18px",
|
|
249
266
|
pos: "relative",
|
|
250
267
|
transition: "background-color 0.1s ease-in-out",
|
|
251
|
-
children: /* @__PURE__ */
|
|
252
|
-
|
|
268
|
+
children: /* @__PURE__ */ a(
|
|
269
|
+
w,
|
|
253
270
|
{
|
|
254
271
|
className: k({
|
|
255
272
|
position: "absolute",
|
|
@@ -263,29 +280,28 @@ function M({
|
|
|
263
280
|
}
|
|
264
281
|
) }),
|
|
265
282
|
default: null
|
|
266
|
-
}[
|
|
267
|
-
|
|
283
|
+
}[o],
|
|
284
|
+
b
|
|
268
285
|
]
|
|
269
286
|
}
|
|
270
287
|
);
|
|
271
288
|
}
|
|
272
|
-
function
|
|
273
|
-
return /* @__PURE__ */
|
|
274
|
-
|
|
289
|
+
function K({ ...r }) {
|
|
290
|
+
return /* @__PURE__ */ a(
|
|
291
|
+
m,
|
|
275
292
|
{
|
|
276
293
|
bg: "var(--border, light-dark(#E4E4E4,#434343)",
|
|
277
294
|
h: "1px",
|
|
278
295
|
styleOrder: 1,
|
|
279
296
|
w: "100%",
|
|
280
|
-
...
|
|
297
|
+
...r
|
|
281
298
|
}
|
|
282
299
|
);
|
|
283
300
|
}
|
|
284
301
|
export {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
v as useSelect
|
|
302
|
+
J as Select,
|
|
303
|
+
j as SelectContainer,
|
|
304
|
+
K as SelectDivider,
|
|
305
|
+
I as SelectOption,
|
|
306
|
+
$ as SelectTrigger
|
|
291
307
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),c=t.createContext(null),n=()=>{const e=t.useContext(c);if(!e)throw new Error("useSelect must be used within a Select");return e};exports.SelectContext=c;exports.useSelect=n;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Context } from 'react';
|
|
2
|
+
type SelectType = 'default' | 'radio' | 'checkbox';
|
|
3
|
+
type SelectValue<T extends SelectType> = T extends 'radio' ? string : string[];
|
|
4
|
+
export declare const SelectContext: Context<{
|
|
5
|
+
open: boolean;
|
|
6
|
+
setOpen: (open: boolean) => void;
|
|
7
|
+
value: SelectValue<SelectType>;
|
|
8
|
+
setValue: (value: string) => void;
|
|
9
|
+
type: SelectType;
|
|
10
|
+
ref: React.RefObject<HTMLDivElement | null>;
|
|
11
|
+
} | null>;
|
|
12
|
+
export declare const useSelect: () => {
|
|
13
|
+
open: boolean;
|
|
14
|
+
setOpen: (open: boolean) => void;
|
|
15
|
+
value: SelectValue<SelectType>;
|
|
16
|
+
setValue: (value: string) => void;
|
|
17
|
+
type: SelectType;
|
|
18
|
+
ref: React.RefObject<HTMLDivElement | null>;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=useSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSelect.d.ts","sourceRoot":"","sources":["../../src/contexts/useSelect.ts"],"names":[],"mappings":";AAGA,KAAK,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAA;AAClD,KAAK,WAAW,CAAC,CAAC,SAAS,UAAU,IAAI,CAAC,SAAS,OAAO,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;AAE9E,eAAO,MAAM,aAAa;UAClB,OAAO;aACJ,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI;WACzB,WAAW,CAAC,UAAU,CAAC;cACpB,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;UAC3B,UAAU;SACX,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC;SAC9B,CAAA;AAEf,eAAO,MAAM,SAAS;UARd,OAAO;aACJ,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI;WACzB,WAAW,CAAC,UAAU,CAAC;cACpB,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;UAC3B,UAAU;SACX,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC;CAS5C,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext as t, useContext as o } from "react";
|
|
3
|
+
const n = t(null), c = () => {
|
|
4
|
+
const e = o(n);
|
|
5
|
+
if (!e)
|
|
6
|
+
throw new Error("useSelect must be used within a Select");
|
|
7
|
+
return e;
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
n as SelectContext,
|
|
11
|
+
c as useSelect
|
|
12
|
+
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./components/Button/index.cjs"),p=require("./components/Input/index.cjs"),t=require("./components/Select/index.cjs"),e=require("./components/Stepper/index.cjs"),r=require("./contexts/useSelect.cjs");exports.Button=n.Button;exports.Input=p.Input;exports.Select=t.Select;exports.SelectContainer=t.SelectContainer;exports.SelectDivider=t.SelectDivider;exports.SelectOption=t.SelectOption;exports.SelectTrigger=t.SelectTrigger;exports.Stepper=e.Stepper;exports.StepperContainer=e.StepperContainer;exports.StepperDecreaseButton=e.StepperDecreaseButton;exports.StepperIncreaseButton=e.StepperIncreaseButton;exports.StepperInput=e.StepperInput;exports.useStepper=e.useStepper;exports.SelectContext=r.SelectContext;exports.useSelect=r.useSelect;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { Button } from './components/Button';
|
|
2
2
|
export { Input } from './components/Input';
|
|
3
|
-
export { Select, SelectContainer, SelectDivider, SelectOption, SelectTrigger,
|
|
3
|
+
export { Select, SelectContainer, SelectDivider, SelectOption, SelectTrigger, } from './components/Select';
|
|
4
4
|
export { Stepper, StepperContainer, StepperDecreaseButton, StepperIncreaseButton, StepperInput, useStepper, } from './components/Stepper';
|
|
5
|
+
export { SelectContext, useSelect } from './contexts/useSelect';
|
|
6
|
+
export type { SelectType, SelectValue } from './types/select';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
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;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EACL,MAAM,EACN,eAAe,EACf,aAAa,EACb,YAAY,EACZ,aAAa,
|
|
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;AAC1C,OAAO,EACL,MAAM,EACN,eAAe,EACf,aAAa,EACb,YAAY,EACZ,aAAa,GACd,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,OAAO,EACP,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,YAAY,EACZ,UAAU,GACX,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAC/D,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { Button as r } from "./components/Button/index.js";
|
|
2
2
|
import { Input as o } from "./components/Input/index.js";
|
|
3
|
-
import { Select as n, SelectContainer as c, SelectDivider as
|
|
4
|
-
import { Stepper as
|
|
3
|
+
import { Select as n, SelectContainer as c, SelectDivider as l, SelectOption as u, SelectTrigger as i } from "./components/Select/index.js";
|
|
4
|
+
import { Stepper as f, StepperContainer as m, StepperDecreaseButton as a, StepperIncreaseButton as s, StepperInput as B, useStepper as C } from "./components/Stepper/index.js";
|
|
5
|
+
import { SelectContext as g, useSelect as D } from "./contexts/useSelect.js";
|
|
5
6
|
export {
|
|
6
7
|
r as Button,
|
|
7
8
|
o as Input,
|
|
8
9
|
n as Select,
|
|
9
10
|
c as SelectContainer,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
g as SelectContext,
|
|
12
|
+
l as SelectDivider,
|
|
13
|
+
u as SelectOption,
|
|
14
|
+
i as SelectTrigger,
|
|
15
|
+
f as Stepper,
|
|
16
|
+
m as StepperContainer,
|
|
17
|
+
a as StepperDecreaseButton,
|
|
18
|
+
s as StepperIncreaseButton,
|
|
19
|
+
B as StepperInput,
|
|
20
|
+
D as useSelect,
|
|
21
|
+
C as useStepper
|
|
20
22
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/types/select.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAA;AACzD,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,UAAU,IAAI,CAAC,SAAS,OAAO,GAC7D,MAAM,GACN,MAAM,EAAE,CAAA"}
|
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.9",
|
|
20
20
|
"type": "module",
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"access": "public"
|
|
@@ -41,18 +41,18 @@
|
|
|
41
41
|
"@devup-ui/react": "1.0.15"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@storybook/addon-docs": "^9.1.
|
|
45
|
-
"@storybook/addon-onboarding": "^9.1.
|
|
46
|
-
"@storybook/react-vite": "^9.1.
|
|
47
|
-
"@types/react": "^19.1.
|
|
48
|
-
"eslint-plugin-storybook": "^9.1.
|
|
44
|
+
"@storybook/addon-docs": "^9.1.2",
|
|
45
|
+
"@storybook/addon-onboarding": "^9.1.2",
|
|
46
|
+
"@storybook/react-vite": "^9.1.2",
|
|
47
|
+
"@types/react": "^19.1.10",
|
|
48
|
+
"eslint-plugin-storybook": "^9.1.2",
|
|
49
49
|
"rollup-plugin-preserve-directives": "^0.4.0",
|
|
50
|
-
"storybook": "^9.1.
|
|
50
|
+
"storybook": "^9.1.2",
|
|
51
51
|
"typescript": "^5.9.2",
|
|
52
|
-
"vite": "^7.1.
|
|
52
|
+
"vite": "^7.1.3",
|
|
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.29"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"csstype": "*",
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
"lint": "eslint",
|
|
64
64
|
"build": "tsc && vite build",
|
|
65
65
|
"storybook": "storybook dev -p 6006",
|
|
66
|
-
"build-storybook": "storybook build"
|
|
66
|
+
"build-storybook": "storybook build",
|
|
67
|
+
"package": "pnpm pack --pack-destination \"../../dist\""
|
|
67
68
|
}
|
|
68
69
|
}
|