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