@octavius2929-personal/design-system 0.23.0 → 0.23.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.js CHANGED
@@ -1832,7 +1832,17 @@ function useStyles18({
1832
1832
 
1833
1833
  // src/components/select/index.tsx
1834
1834
  import { jsx as jsx31, jsxs as jsxs18 } from "react/jsx-runtime";
1835
- var Select = forwardRef20(function Select2({ options, value, onChange, placeholder: placeholder2, label: label7, disabled: disabled3, ...rest }, ref) {
1835
+ var Select = forwardRef20(function Select2({
1836
+ options,
1837
+ value,
1838
+ onChange,
1839
+ placeholder: placeholder2,
1840
+ label: label7,
1841
+ disabled: disabled3,
1842
+ "aria-label": ariaLabel,
1843
+ "aria-labelledby": ariaLabelledBy,
1844
+ ...rest
1845
+ }, ref) {
1836
1846
  const [open, setOpen] = useState6(false);
1837
1847
  const [activeIndex, setActiveIndex] = useState6(0);
1838
1848
  const rootRef = useRef3(null);
@@ -1844,6 +1854,7 @@ var Select = forwardRef20(function Select2({ options, value, onChange, placehold
1844
1854
  const baseId = useId3();
1845
1855
  const labelId = `${baseId}-label`;
1846
1856
  const optionId = (index) => `${baseId}-option-${index}`;
1857
+ const triggerLabelledBy = [label7 ? labelId : null, ariaLabelledBy].filter(Boolean).join(" ") || void 0;
1847
1858
  const {
1848
1859
  root: root24,
1849
1860
  label: labelClass,
@@ -1923,7 +1934,8 @@ var Select = forwardRef20(function Select2({ options, value, onChange, placehold
1923
1934
  disabled: disabled3,
1924
1935
  "aria-haspopup": "listbox",
1925
1936
  "aria-expanded": open,
1926
- "aria-labelledby": label7 ? labelId : void 0,
1937
+ "aria-label": ariaLabel,
1938
+ "aria-labelledby": triggerLabelledBy,
1927
1939
  "aria-activedescendant": open ? optionId(activeIndex) : void 0,
1928
1940
  onClick: () => {
1929
1941
  if (disabled3) return;