@moontra/moonui 6.15.0 → 6.16.0

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.js CHANGED
@@ -6087,36 +6087,41 @@ var selectTriggerVariants = classVarianceAuthority.cva(
6087
6087
  }
6088
6088
  }
6089
6089
  );
6090
- var SelectTrigger = React12__namespace.forwardRef(({ className, children, variant, size, error, success, loading, leftIcon, rightIcon, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
6091
- SelectPrimitive__namespace.Trigger,
6092
- {
6093
- ref,
6094
- className: cn(
6095
- selectTriggerVariants({
6096
- variant,
6097
- size,
6098
- state: error ? "error" : success ? "success" : "none"
6099
- }),
6100
- className
6101
- ),
6102
- ...props,
6103
- disabled: props.disabled || loading,
6104
- "aria-invalid": error ? true : void 0,
6105
- "data-error": error ? true : void 0,
6106
- "data-success": success ? true : void 0,
6107
- "data-loading": loading ? true : void 0,
6108
- children: [
6109
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center flex-1 gap-2", children: [
6110
- leftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center justify-center text-muted-foreground", children: leftIcon }),
6111
- loading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
6112
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" }),
6113
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Loading..." })
6114
- ] }) : children
6115
- ] }),
6116
- !loading && /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: rightIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "opacity-60", children: rightIcon }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180" }) })
6117
- ]
6118
- }
6119
- ));
6090
+ var SelectTrigger = React12__namespace.forwardRef(({ className, children, variant, size, error, success, loading, leftIcon, rightIcon, ...props }, ref) => {
6091
+ const icerikId = React12__namespace.useId();
6092
+ const adVerilmis = props["aria-label"] != null || props["aria-labelledby"] != null;
6093
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6094
+ SelectPrimitive__namespace.Trigger,
6095
+ {
6096
+ ref,
6097
+ className: cn(
6098
+ selectTriggerVariants({
6099
+ variant,
6100
+ size,
6101
+ state: error ? "error" : success ? "success" : "none"
6102
+ }),
6103
+ className
6104
+ ),
6105
+ ...props,
6106
+ disabled: props.disabled || loading,
6107
+ "aria-invalid": error ? true : void 0,
6108
+ "data-error": error ? true : void 0,
6109
+ "data-success": success ? true : void 0,
6110
+ "data-loading": loading ? true : void 0,
6111
+ "aria-labelledby": adVerilmis ? props["aria-labelledby"] : icerikId,
6112
+ children: [
6113
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { id: icerikId, className: "flex items-center flex-1 gap-2", children: [
6114
+ leftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center justify-center text-muted-foreground", children: leftIcon }),
6115
+ loading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
6116
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" }),
6117
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Loading..." })
6118
+ ] }) : children
6119
+ ] }),
6120
+ !loading && /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: rightIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "opacity-60", children: rightIcon }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180" }) })
6121
+ ]
6122
+ }
6123
+ );
6124
+ });
6120
6125
  SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
6121
6126
  var SelectScrollUpButton = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6122
6127
  SelectPrimitive__namespace.ScrollUpButton,