@a13y/react 0.1.4 → 0.1.5

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.
@@ -1306,7 +1306,7 @@ var AccessibleAccordion = ({
1306
1306
  const headerStyles = {
1307
1307
  width: "100%",
1308
1308
  padding: "16px",
1309
- backgroundColor: "#fff",
1309
+ backgroundColor: "rgba(128, 128, 128, 0.08)",
1310
1310
  border: "none",
1311
1311
  textAlign: "left",
1312
1312
  fontSize: "16px",
@@ -1315,11 +1315,13 @@ var AccessibleAccordion = ({
1315
1315
  display: "flex",
1316
1316
  justifyContent: "space-between",
1317
1317
  alignItems: "center",
1318
- transition: "background-color 0.2s"
1318
+ transition: "background-color 0.2s",
1319
+ color: "inherit"
1319
1320
  };
1320
1321
  const contentStyles = {
1321
1322
  padding: "16px",
1322
- backgroundColor: "#f9fafb"
1323
+ backgroundColor: "rgba(128, 128, 128, 0.05)",
1324
+ color: "inherit"
1323
1325
  };
1324
1326
  const iconStyles = (isOpen) => ({
1325
1327
  transition: "transform 0.2s",
@@ -1354,8 +1356,8 @@ var AccessibleAccordion = ({
1354
1356
  },
1355
1357
  "data-accordion-button": true,
1356
1358
  "data-index": index,
1357
- onMouseEnter: (e) => !item.disabled && (e.currentTarget.style.backgroundColor = "#f9fafb"),
1358
- onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "#fff",
1359
+ onMouseEnter: (e) => !item.disabled && (e.currentTarget.style.backgroundColor = "rgba(128, 128, 128, 0.15)"),
1360
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "rgba(128, 128, 128, 0.08)",
1359
1361
  children: [
1360
1362
  /* @__PURE__ */ jsx("span", { children: item.title }),
1361
1363
  /* @__PURE__ */ jsx("span", { "aria-hidden": "true", style: iconStyles(isOpen), children: "\u25BC" })
@@ -2028,8 +2030,8 @@ var AccessiblePagination = ({
2028
2030
  minWidth: "40px",
2029
2031
  height: "40px",
2030
2032
  padding: "8px 12px",
2031
- border: "1px solid #e5e7eb",
2032
- backgroundColor: "#fff",
2033
+ border: "1px solid #d1d5db",
2034
+ backgroundColor: "#f9fafb",
2033
2035
  borderRadius: "6px",
2034
2036
  fontSize: "14px",
2035
2037
  fontWeight: 500,
@@ -2037,7 +2039,8 @@ var AccessiblePagination = ({
2037
2039
  transition: "all 0.2s",
2038
2040
  display: "flex",
2039
2041
  alignItems: "center",
2040
- justifyContent: "center"
2042
+ justifyContent: "center",
2043
+ color: "#374151"
2041
2044
  };
2042
2045
  const activeButtonStyles = {
2043
2046
  ...buttonBaseStyles,
@@ -2074,12 +2077,12 @@ var AccessiblePagination = ({
2074
2077
  style: currentPage === 1 ? disabledButtonStyles : buttonBaseStyles,
2075
2078
  onMouseEnter: (e) => {
2076
2079
  if (currentPage !== 1) {
2077
- e.currentTarget.style.backgroundColor = "#f3f4f6";
2080
+ e.currentTarget.style.backgroundColor = "#e5e7eb";
2078
2081
  }
2079
2082
  },
2080
2083
  onMouseLeave: (e) => {
2081
2084
  if (currentPage !== 1) {
2082
- e.currentTarget.style.backgroundColor = "#fff";
2085
+ e.currentTarget.style.backgroundColor = "#f9fafb";
2083
2086
  }
2084
2087
  },
2085
2088
  children: "\xAB\xAB"
@@ -2095,12 +2098,12 @@ var AccessiblePagination = ({
2095
2098
  style: currentPage === 1 ? disabledButtonStyles : buttonBaseStyles,
2096
2099
  onMouseEnter: (e) => {
2097
2100
  if (currentPage !== 1) {
2098
- e.currentTarget.style.backgroundColor = "#f3f4f6";
2101
+ e.currentTarget.style.backgroundColor = "#e5e7eb";
2099
2102
  }
2100
2103
  },
2101
2104
  onMouseLeave: (e) => {
2102
2105
  if (currentPage !== 1) {
2103
- e.currentTarget.style.backgroundColor = "#fff";
2106
+ e.currentTarget.style.backgroundColor = "#f9fafb";
2104
2107
  }
2105
2108
  },
2106
2109
  children: "\xAB"
@@ -2122,12 +2125,12 @@ var AccessiblePagination = ({
2122
2125
  style: isActive ? activeButtonStyles : buttonBaseStyles,
2123
2126
  onMouseEnter: (e) => {
2124
2127
  if (!isActive) {
2125
- e.currentTarget.style.backgroundColor = "#f3f4f6";
2128
+ e.currentTarget.style.backgroundColor = "#e5e7eb";
2126
2129
  }
2127
2130
  },
2128
2131
  onMouseLeave: (e) => {
2129
2132
  if (!isActive) {
2130
- e.currentTarget.style.backgroundColor = "#fff";
2133
+ e.currentTarget.style.backgroundColor = "#f9fafb";
2131
2134
  }
2132
2135
  },
2133
2136
  children: pageNumber
@@ -2144,12 +2147,12 @@ var AccessiblePagination = ({
2144
2147
  style: currentPage === totalPages ? disabledButtonStyles : buttonBaseStyles,
2145
2148
  onMouseEnter: (e) => {
2146
2149
  if (currentPage !== totalPages) {
2147
- e.currentTarget.style.backgroundColor = "#f3f4f6";
2150
+ e.currentTarget.style.backgroundColor = "#e5e7eb";
2148
2151
  }
2149
2152
  },
2150
2153
  onMouseLeave: (e) => {
2151
2154
  if (currentPage !== totalPages) {
2152
- e.currentTarget.style.backgroundColor = "#fff";
2155
+ e.currentTarget.style.backgroundColor = "#f9fafb";
2153
2156
  }
2154
2157
  },
2155
2158
  children: "\xBB"
@@ -2165,12 +2168,12 @@ var AccessiblePagination = ({
2165
2168
  style: currentPage === totalPages ? disabledButtonStyles : buttonBaseStyles,
2166
2169
  onMouseEnter: (e) => {
2167
2170
  if (currentPage !== totalPages) {
2168
- e.currentTarget.style.backgroundColor = "#f3f4f6";
2171
+ e.currentTarget.style.backgroundColor = "#e5e7eb";
2169
2172
  }
2170
2173
  },
2171
2174
  onMouseLeave: (e) => {
2172
2175
  if (currentPage !== totalPages) {
2173
- e.currentTarget.style.backgroundColor = "#fff";
2176
+ e.currentTarget.style.backgroundColor = "#f9fafb";
2174
2177
  }
2175
2178
  },
2176
2179
  children: "\xBB\xBB"
@@ -2308,7 +2311,8 @@ function AccessibleCombobox({
2308
2311
  display: "block",
2309
2312
  fontWeight: 600,
2310
2313
  fontSize: "14px",
2311
- marginBottom: "6px"
2314
+ marginBottom: "6px",
2315
+ color: "inherit"
2312
2316
  };
2313
2317
  const inputContainerStyles = {
2314
2318
  position: "relative",
@@ -2320,9 +2324,10 @@ function AccessibleCombobox({
2320
2324
  border: `1px solid ${error ? "#ef4444" : "#e5e7eb"}`,
2321
2325
  borderRadius: "6px",
2322
2326
  fontSize: "14px",
2323
- backgroundColor: disabled ? "#f9fafb" : "#fff",
2327
+ backgroundColor: "rgba(128, 128, 128, 0.08)",
2324
2328
  cursor: disabled ? "not-allowed" : "pointer",
2325
- outline: "none"
2329
+ outline: "none",
2330
+ color: "inherit"
2326
2331
  };
2327
2332
  const iconStyles = {
2328
2333
  position: "absolute",
@@ -2340,22 +2345,24 @@ function AccessibleCombobox({
2340
2345
  marginTop: "4px",
2341
2346
  maxHeight: "240px",
2342
2347
  overflowY: "auto",
2343
- backgroundColor: "#fff",
2348
+ backgroundColor: "#ffffff",
2344
2349
  border: "1px solid #e5e7eb",
2345
2350
  borderRadius: "6px",
2346
2351
  boxShadow: "0 4px 6px rgba(0, 0, 0, 0.1)",
2347
2352
  zIndex: 1e3,
2348
2353
  listStyle: "none",
2349
2354
  margin: 0,
2350
- padding: "4px"
2355
+ padding: "4px",
2356
+ color: "#1f2937"
2351
2357
  };
2352
2358
  const optionStyles = (isHighlighted, isSelected, isDisabled) => ({
2353
2359
  padding: "10px 12px",
2354
2360
  cursor: isDisabled ? "not-allowed" : "pointer",
2355
- backgroundColor: isHighlighted ? "#f3f4f6" : isSelected ? "#e5e7eb" : "transparent",
2361
+ backgroundColor: isHighlighted ? "#e5e7eb" : isSelected ? "#f3f4f6" : "transparent",
2356
2362
  borderRadius: "4px",
2357
2363
  fontSize: "14px",
2358
- opacity: isDisabled ? 0.5 : 1
2364
+ opacity: isDisabled ? 0.5 : 1,
2365
+ color: "#1f2937"
2359
2366
  });
2360
2367
  const errorStyles = {
2361
2368
  marginTop: "6px",
@@ -2602,7 +2609,8 @@ var AccessibleDatePicker = ({
2602
2609
  display: "block",
2603
2610
  fontWeight: 600,
2604
2611
  fontSize: "14px",
2605
- marginBottom: "6px"
2612
+ marginBottom: "6px",
2613
+ color: "inherit"
2606
2614
  };
2607
2615
  const buttonStyles = {
2608
2616
  width: "100%",
@@ -2610,23 +2618,25 @@ var AccessibleDatePicker = ({
2610
2618
  border: `1px solid ${error ? "#ef4444" : "#e5e7eb"}`,
2611
2619
  borderRadius: "6px",
2612
2620
  fontSize: "14px",
2613
- backgroundColor: disabled ? "#f9fafb" : "#fff",
2621
+ backgroundColor: "rgba(128, 128, 128, 0.08)",
2614
2622
  cursor: disabled ? "not-allowed" : "pointer",
2615
2623
  textAlign: "left",
2616
- position: "relative"
2624
+ position: "relative",
2625
+ color: "inherit"
2617
2626
  };
2618
2627
  const calendarStyles = {
2619
2628
  position: "absolute",
2620
2629
  top: "100%",
2621
2630
  left: 0,
2622
2631
  marginTop: "4px",
2623
- backgroundColor: "#fff",
2632
+ backgroundColor: "#ffffff",
2624
2633
  border: "1px solid #e5e7eb",
2625
2634
  borderRadius: "8px",
2626
2635
  boxShadow: "0 4px 6px rgba(0, 0, 0, 0.1)",
2627
2636
  padding: "16px",
2628
2637
  zIndex: 1e3,
2629
- minWidth: "280px"
2638
+ minWidth: "280px",
2639
+ color: "#1f2937"
2630
2640
  };
2631
2641
  const headerStyles = {
2632
2642
  display: "flex",
@@ -2638,9 +2648,10 @@ var AccessibleDatePicker = ({
2638
2648
  padding: "6px 12px",
2639
2649
  border: "1px solid #e5e7eb",
2640
2650
  borderRadius: "4px",
2641
- backgroundColor: "#fff",
2651
+ backgroundColor: "#f3f4f6",
2642
2652
  cursor: "pointer",
2643
- fontSize: "14px"
2653
+ fontSize: "14px",
2654
+ color: "#1f2937"
2644
2655
  };
2645
2656
  const gridStyles = {
2646
2657
  display: "grid",
@@ -2661,7 +2672,7 @@ var AccessibleDatePicker = ({
2661
2672
  fontSize: "14px",
2662
2673
  cursor: isDisabled ? "not-allowed" : "pointer",
2663
2674
  backgroundColor: isSelected ? "#3b82f6" : isToday ? "#e5e7eb" : "transparent",
2664
- color: isSelected ? "#fff" : !isCurrentMonth ? "#9ca3af" : isDisabled ? "#d1d5db" : "#1f2937",
2675
+ color: isSelected ? "#ffffff" : !isCurrentMonth ? "#9ca3af" : isDisabled ? "#d1d5db" : "#1f2937",
2665
2676
  fontWeight: isSelected || isToday ? 600 : 400,
2666
2677
  opacity: isDisabled ? 0.5 : 1
2667
2678
  });
@@ -2907,7 +2918,8 @@ function AccessibleTreeView({
2907
2918
  cursor: node.disabled ? "not-allowed" : "pointer",
2908
2919
  backgroundColor: isSelected ? "#e5e7eb" : "transparent",
2909
2920
  borderRadius: "4px",
2910
- opacity: node.disabled ? 0.5 : 1
2921
+ opacity: node.disabled ? 0.5 : 1,
2922
+ color: "inherit"
2911
2923
  };
2912
2924
  const iconStyles = {
2913
2925
  width: "16px",
@@ -3045,7 +3057,8 @@ function AccessibleTable({
3045
3057
  textAlign: "left",
3046
3058
  borderBottom: "2px solid #e5e7eb",
3047
3059
  fontWeight: 600,
3048
- backgroundColor: "#f9fafb"
3060
+ backgroundColor: "rgba(128, 128, 128, 0.08)",
3061
+ color: "inherit"
3049
3062
  };
3050
3063
  const sortButtonStyles = {
3051
3064
  background: "none",
@@ -3057,11 +3070,13 @@ function AccessibleTable({
3057
3070
  font: "inherit",
3058
3071
  fontWeight: 600,
3059
3072
  padding: 0,
3060
- width: "100%"
3073
+ width: "100%",
3074
+ color: "inherit"
3061
3075
  };
3062
3076
  const tdStyles = {
3063
3077
  padding: "12px",
3064
- borderBottom: "1px solid #e5e7eb"
3078
+ borderBottom: "1px solid #e5e7eb",
3079
+ color: "inherit"
3065
3080
  };
3066
3081
  const rowStyles = (isSelected) => ({
3067
3082
  backgroundColor: isSelected ? "#eff6ff" : "transparent"