@bergetai/ui 0.2.3 → 0.2.4

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
@@ -1128,7 +1128,18 @@ var checkboxVariants = cva8(
1128
1128
  }
1129
1129
  );
1130
1130
  var Checkbox2 = React18.forwardRef(
1131
- ({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
1131
+ ({
1132
+ "aria-label": ariaLabel,
1133
+ className,
1134
+ variant,
1135
+ size,
1136
+ label,
1137
+ description,
1138
+ error,
1139
+ id,
1140
+ disabled,
1141
+ ...props
1142
+ }, ref) => {
1132
1143
  const generatedId = React18.useId();
1133
1144
  const checkboxId = id || generatedId;
1134
1145
  const errorId = `${checkboxId}-error`;
@@ -1141,6 +1152,7 @@ var Checkbox2 = React18.forwardRef(
1141
1152
  disabled,
1142
1153
  "aria-invalid": !!error,
1143
1154
  "aria-describedby": error ? errorId : void 0,
1155
+ "aria-label": ariaLabel || label || void 0,
1144
1156
  className: cn(
1145
1157
  checkboxVariants({ variant, size }),
1146
1158
  "cursor-pointer",
@@ -1220,7 +1232,18 @@ var switchThumbVariants = cva9(
1220
1232
  }
1221
1233
  );
1222
1234
  var Switch = React19.forwardRef(
1223
- ({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
1235
+ ({
1236
+ "aria-label": ariaLabel,
1237
+ className,
1238
+ variant,
1239
+ size,
1240
+ label,
1241
+ description,
1242
+ error,
1243
+ id,
1244
+ disabled,
1245
+ ...props
1246
+ }, ref) => {
1224
1247
  const generatedId = React19.useId();
1225
1248
  const switchId = id || generatedId;
1226
1249
  const errorId = `${switchId}-error`;
@@ -1233,6 +1256,7 @@ var Switch = React19.forwardRef(
1233
1256
  disabled,
1234
1257
  "aria-invalid": !!error,
1235
1258
  "aria-describedby": error ? errorId : void 0,
1259
+ "aria-label": ariaLabel || label || void 0,
1236
1260
  className: cn(
1237
1261
  switchRootVariants({ variant, size }),
1238
1262
  disabled && "cursor-not-allowed pointer-events-none",
@@ -2646,7 +2670,7 @@ import { Globe as Globe2 } from "lucide-react";
2646
2670
  import { jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
2647
2671
  var LanguageSelect = React35.forwardRef(({ className, options, value, onValueChange }, ref) => {
2648
2672
  return /* @__PURE__ */ jsxs16(SelectPrimitive2.Root, { value, onValueChange, children: [
2649
- /* @__PURE__ */ jsx38(
2673
+ /* @__PURE__ */ jsxs16(
2650
2674
  SelectPrimitive2.Trigger,
2651
2675
  {
2652
2676
  ref,
@@ -2668,7 +2692,10 @@ var LanguageSelect = React35.forwardRef(({ className, options, value, onValueCha
2668
2692
  "disabled:cursor-not-allowed disabled:opacity-50",
2669
2693
  className
2670
2694
  ),
2671
- children: /* @__PURE__ */ jsx38(Icon2, { icon: Globe2, size: 16 })
2695
+ children: [
2696
+ /* @__PURE__ */ jsx38("span", { className: "sr-only", children: "Select language" }),
2697
+ /* @__PURE__ */ jsx38(Icon2, { icon: Globe2, size: 16, "aria-hidden": true })
2698
+ ]
2672
2699
  }
2673
2700
  ),
2674
2701
  /* @__PURE__ */ jsx38(SelectPrimitive2.Portal, { children: /* @__PURE__ */ jsx38(