@moontra/moonui 6.15.0 → 6.17.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.mjs CHANGED
@@ -6049,36 +6049,41 @@ var selectTriggerVariants = cva(
6049
6049
  }
6050
6050
  }
6051
6051
  );
6052
- var SelectTrigger = React12.forwardRef(({ className, children, variant, size, error, success, loading, leftIcon, rightIcon, ...props }, ref) => /* @__PURE__ */ jsxs(
6053
- SelectPrimitive.Trigger,
6054
- {
6055
- ref,
6056
- className: cn(
6057
- selectTriggerVariants({
6058
- variant,
6059
- size,
6060
- state: error ? "error" : success ? "success" : "none"
6061
- }),
6062
- className
6063
- ),
6064
- ...props,
6065
- disabled: props.disabled || loading,
6066
- "aria-invalid": error ? true : void 0,
6067
- "data-error": error ? true : void 0,
6068
- "data-success": success ? true : void 0,
6069
- "data-loading": loading ? true : void 0,
6070
- children: [
6071
- /* @__PURE__ */ jsxs("div", { className: "flex items-center flex-1 gap-2", children: [
6072
- leftIcon && /* @__PURE__ */ jsx("span", { className: "flex items-center justify-center text-muted-foreground", children: leftIcon }),
6073
- loading ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
6074
- /* @__PURE__ */ jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" }),
6075
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Loading..." })
6076
- ] }) : children
6077
- ] }),
6078
- !loading && /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: rightIcon ? /* @__PURE__ */ jsx("span", { className: "opacity-60", children: rightIcon }) : /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180" }) })
6079
- ]
6080
- }
6081
- ));
6052
+ var SelectTrigger = React12.forwardRef(({ className, children, variant, size, error, success, loading, leftIcon, rightIcon, ...props }, ref) => {
6053
+ const icerikId = React12.useId();
6054
+ const adVerilmis = props["aria-label"] != null || props["aria-labelledby"] != null;
6055
+ return /* @__PURE__ */ jsxs(
6056
+ SelectPrimitive.Trigger,
6057
+ {
6058
+ ref,
6059
+ className: cn(
6060
+ selectTriggerVariants({
6061
+ variant,
6062
+ size,
6063
+ state: error ? "error" : success ? "success" : "none"
6064
+ }),
6065
+ className
6066
+ ),
6067
+ ...props,
6068
+ disabled: props.disabled || loading,
6069
+ "aria-invalid": error ? true : void 0,
6070
+ "data-error": error ? true : void 0,
6071
+ "data-success": success ? true : void 0,
6072
+ "data-loading": loading ? true : void 0,
6073
+ "aria-labelledby": adVerilmis ? props["aria-labelledby"] : icerikId,
6074
+ children: [
6075
+ /* @__PURE__ */ jsxs("div", { id: icerikId, className: "flex items-center flex-1 gap-2", children: [
6076
+ leftIcon && /* @__PURE__ */ jsx("span", { className: "flex items-center justify-center text-muted-foreground", children: leftIcon }),
6077
+ loading ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
6078
+ /* @__PURE__ */ jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" }),
6079
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Loading..." })
6080
+ ] }) : children
6081
+ ] }),
6082
+ !loading && /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: rightIcon ? /* @__PURE__ */ jsx("span", { className: "opacity-60", children: rightIcon }) : /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180" }) })
6083
+ ]
6084
+ }
6085
+ );
6086
+ });
6082
6087
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
6083
6088
  var SelectScrollUpButton = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6084
6089
  SelectPrimitive.ScrollUpButton,