@mijn-ui/react-select 0.4.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 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 !duration-300 w-60"
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",
@@ -80,6 +80,8 @@ var Select = ({ classNames, unstyled = false, ...props }) => {
80
80
  return /* @__PURE__ */ jsx(SelectProvider, { value: { unstyled, styles, classNames }, children: /* @__PURE__ */ jsx(SelectPrimitive.Root, { ...props }) });
81
81
  };
82
82
  var SelectTrigger = ({
83
+ hideIcon,
84
+ icon,
83
85
  unstyled,
84
86
  className,
85
87
  children,
@@ -95,11 +97,18 @@ var SelectTrigger = ({
95
97
  ...props,
96
98
  children: [
97
99
  children,
98
- /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })
100
+ !hideIcon && /* @__PURE__ */ jsx(SelectTriggerIcon, { children: icon })
99
101
  ]
100
102
  }
101
103
  );
102
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
+ };
103
112
  var SelectScrollUpButton = ({
104
113
  unstyled,
105
114
  className,
@@ -235,6 +244,7 @@ export {
235
244
  SelectScrollUpButton,
236
245
  SelectSeparator,
237
246
  SelectTrigger,
247
+ SelectTriggerIcon,
238
248
  SelectValue,
239
249
  selectStyles,
240
250
  useSelectStyles
@@ -1 +1 @@
1
- {"inputs":{"src/select.tsx":{"bytes":10756,"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","SelectValue","selectStyles","useSelectStyles"],"entryPoint":"src/index.ts","inputs":{"src/select.tsx":{"bytesInOutput":6813},"src/index.ts":{"bytesInOutput":0}},"bytes":7064}}}
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.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.4.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.4.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
  },