@mijn-ui/react-select 0.4.0 → 0.4.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/dist/index.d.ts +7 -2
- package/dist/index.js +33 -7
- package/dist/metafile-esm.json +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -109,8 +109,13 @@ type SelectProps = React.ComponentProps<typeof SelectPrimitive.Root> & SelectBas
|
|
|
109
109
|
declare const Select: ({ classNames, unstyled, ...props }: SelectProps) => react_jsx_runtime.JSX.Element;
|
|
110
110
|
type SelectTriggerProps = React.ComponentPropsWithRef<typeof SelectPrimitive.Trigger> & {
|
|
111
111
|
unstyled?: boolean;
|
|
112
|
+
hideIcon?: boolean;
|
|
113
|
+
icon?: React.ReactNode;
|
|
112
114
|
};
|
|
113
|
-
declare const SelectTrigger: ({ unstyled, className, children, ...props }: SelectTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
115
|
+
declare const SelectTrigger: ({ hideIcon, icon, unstyled, className, children, ...props }: SelectTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
116
|
+
declare const SelectTriggerIcon: ({ children, asChild, ...props }: React.ComponentProps<typeof SelectPrimitive.Icon> & {
|
|
117
|
+
children?: React.ReactNode;
|
|
118
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
114
119
|
type SelectScrollUpButtonProps = React.ComponentPropsWithRef<typeof SelectPrimitive.ScrollUpButton> & {
|
|
115
120
|
unstyled?: boolean;
|
|
116
121
|
};
|
|
@@ -136,4 +141,4 @@ type SelectSeparatorProps = React.ComponentPropsWithRef<typeof SelectPrimitive.S
|
|
|
136
141
|
};
|
|
137
142
|
declare const SelectSeparator: ({ unstyled, className, ...props }: SelectSeparatorProps) => react_jsx_runtime.JSX.Element;
|
|
138
143
|
|
|
139
|
-
export { Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, type SelectProps, SelectScrollDownButton, type SelectScrollDownButtonProps, SelectScrollUpButton, type SelectScrollUpButtonProps, SelectSeparator, type SelectSeparatorProps, type SelectSlots, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectVariantProps, selectStyles, useSelectStyles };
|
|
144
|
+
export { Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, type SelectProps, SelectScrollDownButton, type SelectScrollDownButtonProps, SelectScrollUpButton, type SelectScrollUpButtonProps, SelectSeparator, type SelectSeparatorProps, type SelectSlots, SelectTrigger, SelectTriggerIcon, type SelectTriggerProps, SelectValue, type SelectVariantProps, selectStyles, useSelectStyles };
|
package/dist/index.js
CHANGED
|
@@ -34,8 +34,8 @@ var selectStyles = tv({
|
|
|
34
34
|
content: [
|
|
35
35
|
"data-[state=open]:zoom-in-95 data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
36
36
|
"data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
37
|
-
"data-[side=bottom]:slide-in-from-bottom-6 data-[side=left]:slide-in-from-left-6 data-[side=right]:slide-in-from-right-6 data-[side=top]:slide-in-from-top-6",
|
|
38
|
-
"border-outline-default bg-bg-default-alt text-fg-default relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-sm
|
|
37
|
+
"data-[side=bottom]:slide-in-from-bottom-6 data-[side=left]:slide-in-from-left-6 data-[side=right]:slide-in-from-right-6 data-[side=top]:slide-in-from-top-6 duration-300",
|
|
38
|
+
"border-outline-default bg-bg-default-alt text-fg-default relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-sm w-60"
|
|
39
39
|
],
|
|
40
40
|
viewport: "",
|
|
41
41
|
label: "py-1.5 pl-2 pr-8 text-sm font-semibold",
|
|
@@ -77,9 +77,11 @@ var SelectGroup = SelectPrimitive.Group;
|
|
|
77
77
|
var SelectValue = SelectPrimitive.Value;
|
|
78
78
|
var Select = ({ classNames, unstyled = false, ...props }) => {
|
|
79
79
|
const styles = selectStyles();
|
|
80
|
-
return /* @__PURE__ */ jsx(SelectProvider, { value: { unstyled, styles, classNames }, children: /* @__PURE__ */ jsx(SelectPrimitive.Root, { ...props }) });
|
|
80
|
+
return /* @__PURE__ */ jsx(SelectProvider, { value: { unstyled, styles, classNames }, children: /* @__PURE__ */ jsx(SelectPrimitive.Root, { "data-slot": "select", ...props }) });
|
|
81
81
|
};
|
|
82
82
|
var SelectTrigger = ({
|
|
83
|
+
hideIcon,
|
|
84
|
+
icon,
|
|
83
85
|
unstyled,
|
|
84
86
|
className,
|
|
85
87
|
children,
|
|
@@ -89,17 +91,33 @@ var SelectTrigger = ({
|
|
|
89
91
|
return /* @__PURE__ */ jsxs(
|
|
90
92
|
SelectPrimitive.Trigger,
|
|
91
93
|
{
|
|
94
|
+
"data-slot": "select-trigger",
|
|
92
95
|
className: trigger({
|
|
93
96
|
className: cn(classNames?.trigger, className)
|
|
94
97
|
}),
|
|
95
98
|
...props,
|
|
96
99
|
children: [
|
|
97
100
|
children,
|
|
98
|
-
/* @__PURE__ */ jsx(
|
|
101
|
+
!hideIcon && /* @__PURE__ */ jsx(SelectTriggerIcon, { children: icon })
|
|
99
102
|
]
|
|
100
103
|
}
|
|
101
104
|
);
|
|
102
105
|
};
|
|
106
|
+
var SelectTriggerIcon = ({
|
|
107
|
+
children,
|
|
108
|
+
asChild = true,
|
|
109
|
+
...props
|
|
110
|
+
}) => {
|
|
111
|
+
return /* @__PURE__ */ jsx(
|
|
112
|
+
SelectPrimitive.Icon,
|
|
113
|
+
{
|
|
114
|
+
"data-slot": "select-trigger-icon",
|
|
115
|
+
asChild,
|
|
116
|
+
...props,
|
|
117
|
+
children: children ? children : /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
};
|
|
103
121
|
var SelectScrollUpButton = ({
|
|
104
122
|
unstyled,
|
|
105
123
|
className,
|
|
@@ -109,6 +127,7 @@ var SelectScrollUpButton = ({
|
|
|
109
127
|
return /* @__PURE__ */ jsx(
|
|
110
128
|
SelectPrimitive.ScrollUpButton,
|
|
111
129
|
{
|
|
130
|
+
"data-slot": "select-scroll-up-button",
|
|
112
131
|
className: scrollUpBtn({
|
|
113
132
|
className: cn(classNames?.scrollUpBtn, className)
|
|
114
133
|
}),
|
|
@@ -126,6 +145,7 @@ var SelectScrollDownButton = ({
|
|
|
126
145
|
return /* @__PURE__ */ jsx(
|
|
127
146
|
SelectPrimitive.ScrollDownButton,
|
|
128
147
|
{
|
|
148
|
+
"data-slot": "select-scroll-down-button",
|
|
129
149
|
className: scrollDownBtn({
|
|
130
150
|
className: cn(classNames?.scrollDownBtn, className)
|
|
131
151
|
}),
|
|
@@ -142,9 +162,10 @@ var SelectContent = ({
|
|
|
142
162
|
...props
|
|
143
163
|
}) => {
|
|
144
164
|
const { content, viewport, classNames } = useSelectStyles(unstyled);
|
|
145
|
-
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
165
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { "data-slot": "select-portal", children: /* @__PURE__ */ jsxs(
|
|
146
166
|
SelectPrimitive.Content,
|
|
147
167
|
{
|
|
168
|
+
"data-slot": "select-content",
|
|
148
169
|
className: content({
|
|
149
170
|
className: cn(classNames?.content, className),
|
|
150
171
|
position
|
|
@@ -156,6 +177,7 @@ var SelectContent = ({
|
|
|
156
177
|
/* @__PURE__ */ jsx(
|
|
157
178
|
SelectPrimitive.Viewport,
|
|
158
179
|
{
|
|
180
|
+
"data-slot": "select-viewport",
|
|
159
181
|
className: viewport({
|
|
160
182
|
className: classNames?.viewport,
|
|
161
183
|
position
|
|
@@ -173,6 +195,7 @@ var SelectLabel = ({ unstyled, className, ...props }) => {
|
|
|
173
195
|
return /* @__PURE__ */ jsx(
|
|
174
196
|
SelectPrimitive.Label,
|
|
175
197
|
{
|
|
198
|
+
"data-slot": "select-label",
|
|
176
199
|
className: label({
|
|
177
200
|
className: cn(classNames?.label, className)
|
|
178
201
|
}),
|
|
@@ -190,19 +213,20 @@ var SelectItem = ({
|
|
|
190
213
|
return /* @__PURE__ */ jsxs(
|
|
191
214
|
SelectPrimitive.Item,
|
|
192
215
|
{
|
|
216
|
+
"data-slot": "select-item",
|
|
193
217
|
className: item({
|
|
194
218
|
className: cn(classNames?.item, className)
|
|
195
219
|
}),
|
|
196
220
|
...props,
|
|
197
221
|
children: [
|
|
198
|
-
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children }),
|
|
222
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { "data-slot": "select-item-text", children }),
|
|
199
223
|
/* @__PURE__ */ jsx(
|
|
200
224
|
"span",
|
|
201
225
|
{
|
|
202
226
|
className: itemIndicator({
|
|
203
227
|
className: classNames?.itemIndicator
|
|
204
228
|
}),
|
|
205
|
-
children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
229
|
+
children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { "data-slot": "select-item-indicator", children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
206
230
|
}
|
|
207
231
|
)
|
|
208
232
|
]
|
|
@@ -218,6 +242,7 @@ var SelectSeparator = ({
|
|
|
218
242
|
return /* @__PURE__ */ jsx(
|
|
219
243
|
SelectPrimitive.Separator,
|
|
220
244
|
{
|
|
245
|
+
"data-slot": "select-separator",
|
|
221
246
|
className: separator({
|
|
222
247
|
className: cn(classNames?.separator, className)
|
|
223
248
|
}),
|
|
@@ -235,6 +260,7 @@ export {
|
|
|
235
260
|
SelectScrollUpButton,
|
|
236
261
|
SelectSeparator,
|
|
237
262
|
SelectTrigger,
|
|
263
|
+
SelectTriggerIcon,
|
|
238
264
|
SelectValue,
|
|
239
265
|
selectStyles,
|
|
240
266
|
useSelectStyles
|
package/dist/metafile-esm.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/select.tsx":{"bytes":
|
|
1
|
+
{"inputs":{"src/select.tsx":{"bytes":11840,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@mijn-ui/react-core","kind":"import-statement","external":true},{"path":"@mijn-ui/shared-icons","kind":"import-statement","external":true},{"path":"@radix-ui/react-select","kind":"import-statement","external":true},{"path":"tailwind-variants","kind":"import-statement","external":true},{"path":"react/jsx-runtime","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":25,"imports":[{"path":"src/select.tsx","kind":"import-statement","original":"./select"}],"format":"esm"}},"outputs":{"dist/index.js":{"imports":[{"path":"@mijn-ui/react-core","kind":"import-statement","external":true},{"path":"@mijn-ui/shared-icons","kind":"import-statement","external":true},{"path":"@radix-ui/react-select","kind":"import-statement","external":true},{"path":"tailwind-variants","kind":"import-statement","external":true},{"path":"react/jsx-runtime","kind":"import-statement","external":true}],"exports":["Select","SelectContent","SelectGroup","SelectItem","SelectLabel","SelectScrollDownButton","SelectScrollUpButton","SelectSeparator","SelectTrigger","SelectTriggerIcon","SelectValue","selectStyles","useSelectStyles"],"entryPoint":"src/index.ts","inputs":{"src/select.tsx":{"bytesInOutput":7539},"src/index.ts":{"bytesInOutput":0}},"bytes":7811}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mijn-ui/react-select",
|
|
3
3
|
"author": "Htet Aung Lin<htetaunglin.coder@gmail.com>",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.2",
|
|
5
5
|
"homepage": "https://mijn-ui.vercel.app",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"exports": "./dist/index.js",
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"react": "19.0.
|
|
24
|
-
"react-dom": "19.0.
|
|
23
|
+
"react": "19.0.1",
|
|
24
|
+
"react-dom": "19.0.1",
|
|
25
25
|
"@next/eslint-plugin-next": "^15.0.3",
|
|
26
26
|
"@types/react": "^19.0.0",
|
|
27
27
|
"@types/react-dom": "^19.0.0",
|
|
28
|
-
"@mijn-ui/react-core": "0.
|
|
28
|
+
"@mijn-ui/react-core": "0.5.0",
|
|
29
29
|
"eslint-config-custom": "0.0.1",
|
|
30
30
|
"tsconfig": "0.0.0",
|
|
31
31
|
"tsup-config": "0.0.0"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"react": "^19.0",
|
|
39
39
|
"react-dom": "^19.0",
|
|
40
|
-
"@mijn-ui/react-core": "^0.
|
|
40
|
+
"@mijn-ui/react-core": "^0.5.0",
|
|
41
41
|
"tailwind-merge": "^3.0.0",
|
|
42
42
|
"tailwind-variants": "^3.0.0"
|
|
43
43
|
},
|