@mijn-ui/react-select 0.3.0 → 0.4.1
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 +22 -11
- package/dist/metafile-esm.json +1 -1
- package/package.json +3 -3
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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/select.tsx
|
|
4
4
|
import {
|
|
5
|
+
cn,
|
|
5
6
|
createContext,
|
|
6
7
|
useTVUnstyled
|
|
7
8
|
} from "@mijn-ui/react-core";
|
|
@@ -11,7 +12,7 @@ import {
|
|
|
11
12
|
ChevronUpIcon
|
|
12
13
|
} from "@mijn-ui/shared-icons";
|
|
13
14
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
14
|
-
import {
|
|
15
|
+
import { tv } from "tailwind-variants";
|
|
15
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
17
|
var selectStyles = tv({
|
|
17
18
|
slots: {
|
|
@@ -33,8 +34,8 @@ var selectStyles = tv({
|
|
|
33
34
|
content: [
|
|
34
35
|
"data-[state=open]:zoom-in-95 data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
35
36
|
"data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
36
|
-
"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",
|
|
37
|
-
"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"
|
|
38
39
|
],
|
|
39
40
|
viewport: "",
|
|
40
41
|
label: "py-1.5 pl-2 pr-8 text-sm font-semibold",
|
|
@@ -79,6 +80,8 @@ var Select = ({ classNames, unstyled = false, ...props }) => {
|
|
|
79
80
|
return /* @__PURE__ */ jsx(SelectProvider, { value: { unstyled, styles, classNames }, children: /* @__PURE__ */ jsx(SelectPrimitive.Root, { ...props }) });
|
|
80
81
|
};
|
|
81
82
|
var SelectTrigger = ({
|
|
83
|
+
hideIcon,
|
|
84
|
+
icon,
|
|
82
85
|
unstyled,
|
|
83
86
|
className,
|
|
84
87
|
children,
|
|
@@ -89,16 +92,23 @@ var SelectTrigger = ({
|
|
|
89
92
|
SelectPrimitive.Trigger,
|
|
90
93
|
{
|
|
91
94
|
className: trigger({
|
|
92
|
-
className:
|
|
95
|
+
className: cn(classNames?.trigger, className)
|
|
93
96
|
}),
|
|
94
97
|
...props,
|
|
95
98
|
children: [
|
|
96
99
|
children,
|
|
97
|
-
/* @__PURE__ */ jsx(
|
|
100
|
+
!hideIcon && /* @__PURE__ */ jsx(SelectTriggerIcon, { children: icon })
|
|
98
101
|
]
|
|
99
102
|
}
|
|
100
103
|
);
|
|
101
104
|
};
|
|
105
|
+
var SelectTriggerIcon = ({
|
|
106
|
+
children,
|
|
107
|
+
asChild = true,
|
|
108
|
+
...props
|
|
109
|
+
}) => {
|
|
110
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild, ...props, children: children ? children : /* @__PURE__ */ jsx(ChevronDownIcon, {}) });
|
|
111
|
+
};
|
|
102
112
|
var SelectScrollUpButton = ({
|
|
103
113
|
unstyled,
|
|
104
114
|
className,
|
|
@@ -109,7 +119,7 @@ var SelectScrollUpButton = ({
|
|
|
109
119
|
SelectPrimitive.ScrollUpButton,
|
|
110
120
|
{
|
|
111
121
|
className: scrollUpBtn({
|
|
112
|
-
className:
|
|
122
|
+
className: cn(classNames?.scrollUpBtn, className)
|
|
113
123
|
}),
|
|
114
124
|
...props,
|
|
115
125
|
children: /* @__PURE__ */ jsx(ChevronUpIcon, {})
|
|
@@ -126,7 +136,7 @@ var SelectScrollDownButton = ({
|
|
|
126
136
|
SelectPrimitive.ScrollDownButton,
|
|
127
137
|
{
|
|
128
138
|
className: scrollDownBtn({
|
|
129
|
-
className:
|
|
139
|
+
className: cn(classNames?.scrollDownBtn, className)
|
|
130
140
|
}),
|
|
131
141
|
...props,
|
|
132
142
|
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
@@ -145,7 +155,7 @@ var SelectContent = ({
|
|
|
145
155
|
SelectPrimitive.Content,
|
|
146
156
|
{
|
|
147
157
|
className: content({
|
|
148
|
-
className:
|
|
158
|
+
className: cn(classNames?.content, className),
|
|
149
159
|
position
|
|
150
160
|
}),
|
|
151
161
|
position,
|
|
@@ -173,7 +183,7 @@ var SelectLabel = ({ unstyled, className, ...props }) => {
|
|
|
173
183
|
SelectPrimitive.Label,
|
|
174
184
|
{
|
|
175
185
|
className: label({
|
|
176
|
-
className:
|
|
186
|
+
className: cn(classNames?.label, className)
|
|
177
187
|
}),
|
|
178
188
|
...props
|
|
179
189
|
}
|
|
@@ -190,7 +200,7 @@ var SelectItem = ({
|
|
|
190
200
|
SelectPrimitive.Item,
|
|
191
201
|
{
|
|
192
202
|
className: item({
|
|
193
|
-
className:
|
|
203
|
+
className: cn(classNames?.item, className)
|
|
194
204
|
}),
|
|
195
205
|
...props,
|
|
196
206
|
children: [
|
|
@@ -218,7 +228,7 @@ var SelectSeparator = ({
|
|
|
218
228
|
SelectPrimitive.Separator,
|
|
219
229
|
{
|
|
220
230
|
className: separator({
|
|
221
|
-
className:
|
|
231
|
+
className: cn(classNames?.separator, className)
|
|
222
232
|
}),
|
|
223
233
|
...props
|
|
224
234
|
}
|
|
@@ -234,6 +244,7 @@ export {
|
|
|
234
244
|
SelectScrollUpButton,
|
|
235
245
|
SelectSeparator,
|
|
236
246
|
SelectTrigger,
|
|
247
|
+
SelectTriggerIcon,
|
|
237
248
|
SelectValue,
|
|
238
249
|
selectStyles,
|
|
239
250
|
useSelectStyles
|
package/dist/metafile-esm.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/select.tsx":{"bytes":
|
|
1
|
+
{"inputs":{"src/select.tsx":{"bytes":11373,"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":7019},"src/index.ts":{"bytesInOutput":0}},"bytes":7291}}}
|
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
|
+
"version": "0.4.1",
|
|
5
5
|
"homepage": "https://mijn-ui.vercel.app",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -25,7 +25,7 @@
|
|
|
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
|
},
|