@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.cjs CHANGED
@@ -2003,7 +2003,17 @@ function useStyles18({
2003
2003
 
2004
2004
  // src/components/select/index.tsx
2005
2005
  var import_jsx_runtime31 = require("react/jsx-runtime");
2006
- var Select = (0, import_react43.forwardRef)(function Select2({ options, value, onChange, placeholder: placeholder2, label: label7, disabled: disabled3, ...rest }, ref) {
2006
+ var Select = (0, import_react43.forwardRef)(function Select2({
2007
+ options,
2008
+ value,
2009
+ onChange,
2010
+ placeholder: placeholder2,
2011
+ label: label7,
2012
+ disabled: disabled3,
2013
+ "aria-label": ariaLabel,
2014
+ "aria-labelledby": ariaLabelledBy,
2015
+ ...rest
2016
+ }, ref) {
2007
2017
  const [open, setOpen] = (0, import_react43.useState)(false);
2008
2018
  const [activeIndex, setActiveIndex] = (0, import_react43.useState)(0);
2009
2019
  const rootRef = (0, import_react43.useRef)(null);
@@ -2015,6 +2025,7 @@ var Select = (0, import_react43.forwardRef)(function Select2({ options, value, o
2015
2025
  const baseId = (0, import_react43.useId)();
2016
2026
  const labelId = `${baseId}-label`;
2017
2027
  const optionId = (index) => `${baseId}-option-${index}`;
2028
+ const triggerLabelledBy = [label7 ? labelId : null, ariaLabelledBy].filter(Boolean).join(" ") || void 0;
2018
2029
  const {
2019
2030
  root: root24,
2020
2031
  label: labelClass,
@@ -2094,7 +2105,8 @@ var Select = (0, import_react43.forwardRef)(function Select2({ options, value, o
2094
2105
  disabled: disabled3,
2095
2106
  "aria-haspopup": "listbox",
2096
2107
  "aria-expanded": open,
2097
- "aria-labelledby": label7 ? labelId : void 0,
2108
+ "aria-label": ariaLabel,
2109
+ "aria-labelledby": triggerLabelledBy,
2098
2110
  "aria-activedescendant": open ? optionId(activeIndex) : void 0,
2099
2111
  onClick: () => {
2100
2112
  if (disabled3) return;