achery-ui 0.5.5 → 0.5.7

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
@@ -713,13 +713,14 @@ function Tooltip({
713
713
 
714
714
  // src/components/Sidebar/Sidebar.css.ts
715
715
  var backdrop = "Sidebar_backdrop__1n0xxfc2";
716
+ var bottomSlot = "Sidebar_bottomSlot__1n0xxfc9";
716
717
  var collapseToggle = "Sidebar_collapseToggle__1n0xxfc3";
717
- var countAccent = "Sidebar_countAccent__1n0xxfcb";
718
+ var countAccent = "Sidebar_countAccent__1n0xxfcc";
718
719
  var footer = "Sidebar_footer__1n0xxfc8";
719
720
  var group = "Sidebar_group__1n0xxfc4";
720
721
  var groupLabel = "Sidebar_groupLabel__1n0xxfc5";
721
- var mobileSearch = "Sidebar_mobileSearch__1n0xxfc9";
722
- var mobileSearchInput = "Sidebar_mobileSearchInput__1n0xxfca";
722
+ var mobileSearch = "Sidebar_mobileSearch__1n0xxfca";
723
+ var mobileSearchInput = "Sidebar_mobileSearchInput__1n0xxfcb";
723
724
  var navItem = "Sidebar_navItem__1n0xxfc6";
724
725
  var navItemCount = "Sidebar_navItemCount__1n0xxfc7";
725
726
  var sidebar = "Sidebar_sidebar__1n0xxfc0";
@@ -772,24 +773,26 @@ function Sidebar({
772
773
  },
773
774
  i
774
775
  )),
775
- searchConfig && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: mobileSearch, children: [
776
- /* @__PURE__ */ jsxRuntime.jsx(Glyph, { name: "compass", size: 12, "aria-hidden": "true" }),
777
- /* @__PURE__ */ jsxRuntime.jsx(
778
- "input",
779
- {
780
- type: "search",
781
- placeholder: searchConfig.placeholder,
782
- className: mobileSearchInput,
783
- "aria-label": "Search",
784
- onFocus: () => searchConfig.onSearchFocus?.(),
785
- onKeyDown: (e) => {
786
- if (e.key === "Enter") searchConfig.onSearch?.(e.target.value);
776
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: bottomSlot, children: [
777
+ searchConfig && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: mobileSearch, children: [
778
+ /* @__PURE__ */ jsxRuntime.jsx(Glyph, { name: "compass", size: 12, "aria-hidden": "true" }),
779
+ /* @__PURE__ */ jsxRuntime.jsx(
780
+ "input",
781
+ {
782
+ type: "search",
783
+ placeholder: searchConfig.placeholder,
784
+ className: mobileSearchInput,
785
+ "aria-label": "Search",
786
+ onFocus: () => searchConfig.onSearchFocus?.(),
787
+ onKeyDown: (e) => {
788
+ if (e.key === "Enter") searchConfig.onSearch?.(e.target.value);
789
+ }
787
790
  }
788
- }
789
- ),
790
- searchConfig.kbd && /* @__PURE__ */ jsxRuntime.jsx("span", { children: searchConfig.kbd })
791
- ] }),
792
- footer3 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: footer, children: footer3 })
791
+ ),
792
+ searchConfig.kbd && /* @__PURE__ */ jsxRuntime.jsx("span", { children: searchConfig.kbd })
793
+ ] }),
794
+ footer3 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: footer, children: footer3 })
795
+ ] })
793
796
  ]
794
797
  }
795
798
  );
@@ -1009,18 +1012,19 @@ function AppBar({
1009
1012
  }
1010
1013
 
1011
1014
  // src/components/Table/Table.css.ts
1012
- var emptyState = "Table_emptyState__1a2tbysa";
1013
- var pagination = "Table_pagination__1a2tbysb";
1014
- var sortIndicator = "Table_sortIndicator__1a2tbys5";
1015
- var table = "Table_table__1a2tbys1";
1015
+ var emptyState = "Table_emptyState__1a2tbysb";
1016
+ var pagination = "Table_pagination__1a2tbysc";
1017
+ var sortIndicator = "Table_sortIndicator__1a2tbys6";
1018
+ var table = "Table_table__1a2tbys2";
1019
+ var tableScroll = "Table_tableScroll__1a2tbys1";
1016
1020
  var tableWrapper = "Table_tableWrapper__1a2tbys0";
1017
- var td = "Table_td__1a2tbys7";
1018
- var tdMono = "Table_tdMono__1a2tbys8 Table_td__1a2tbys7";
1019
- var th = "Table_th__1a2tbys3";
1020
- var thSortable = "Table_thSortable__1a2tbys4 Table_th__1a2tbys3";
1021
- var thead = "Table_thead__1a2tbys2";
1022
- var toolbar = "Table_toolbar__1a2tbys9";
1023
- var tr = "Table_tr__1a2tbys6";
1021
+ var td = "Table_td__1a2tbys8";
1022
+ var tdMono = "Table_tdMono__1a2tbys9 Table_td__1a2tbys8";
1023
+ var th = "Table_th__1a2tbys4";
1024
+ var thSortable = "Table_thSortable__1a2tbys5 Table_th__1a2tbys4";
1025
+ var thead = "Table_thead__1a2tbys3";
1026
+ var toolbar = "Table_toolbar__1a2tbysa";
1027
+ var tr = "Table_tr__1a2tbys7";
1024
1028
  function Table({
1025
1029
  columns,
1026
1030
  data,
@@ -1073,37 +1077,44 @@ function Table({
1073
1077
  const isLastPage = totalPages !== null ? pageIndex >= totalPages - 1 : true;
1074
1078
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: [tableWrapper, className].filter(Boolean).join(" "), children: [
1075
1079
  toolbar2 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: toolbar, children: toolbar2 }),
1076
- /* @__PURE__ */ jsxRuntime.jsxs("table", { className: table, children: [
1077
- /* @__PURE__ */ jsxRuntime.jsx("thead", { className: thead, children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: columns.map((col) => /* @__PURE__ */ jsxRuntime.jsxs(
1078
- "th",
1079
- {
1080
- className: col.sortable ? thSortable : th,
1081
- style: col.width ? { width: col.width } : void 0,
1082
- onClick: col.sortable ? () => handleSort(col.key) : void 0,
1083
- "aria-sort": activeSortKey === col.key ? activeSortDir === "asc" ? "ascending" : "descending" : void 0,
1084
- children: [
1085
- col.label,
1086
- col.sortable && activeSortKey === col.key && activeSortDir && /* @__PURE__ */ jsxRuntime.jsx("span", { className: sortIndicator, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(Glyph, { name: activeSortDir === "asc" ? "arrow-up" : "arrow-right", size: 10 }) })
1087
- ]
1088
- },
1089
- col.key
1090
- )) }) }),
1091
- /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: data.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: columns.length, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: emptyState, children: emptyState2 ?? "No data." }) }) }) : sortedData.map((row) => {
1092
- const key = rowKey(row);
1093
- const isSelected = selectedKeys?.includes(key) ?? false;
1094
- return /* @__PURE__ */ jsxRuntime.jsx(
1095
- "tr",
1096
- {
1097
- className: tr,
1098
- "data-selected": isSelected,
1099
- onClick: onRowClick ? () => onRowClick(key, row) : void 0,
1100
- style: onRowClick ? { cursor: "pointer" } : void 0,
1101
- children: columns.map((col) => /* @__PURE__ */ jsxRuntime.jsx("td", { className: col.mono ? tdMono : td, children: col.render ? col.render(row) : String(row[col.key] ?? "") }, col.key))
1102
- },
1103
- key
1104
- );
1105
- }) })
1106
- ] }),
1080
+ /* @__PURE__ */ jsxRuntime.jsx(
1081
+ "div",
1082
+ {
1083
+ className: tableScroll,
1084
+ style: pageSize ? { minHeight: 37 + pageSize * 38 } : void 0,
1085
+ children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: table, children: [
1086
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { className: thead, children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: columns.map((col) => /* @__PURE__ */ jsxRuntime.jsxs(
1087
+ "th",
1088
+ {
1089
+ className: col.sortable ? thSortable : th,
1090
+ style: col.width ? { width: col.width } : void 0,
1091
+ onClick: col.sortable ? () => handleSort(col.key) : void 0,
1092
+ "aria-sort": activeSortKey === col.key ? activeSortDir === "asc" ? "ascending" : "descending" : void 0,
1093
+ children: [
1094
+ col.label,
1095
+ col.sortable && activeSortKey === col.key && activeSortDir && /* @__PURE__ */ jsxRuntime.jsx("span", { className: sortIndicator, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(Glyph, { name: activeSortDir === "asc" ? "arrow-up" : "arrow-right", size: 10 }) })
1096
+ ]
1097
+ },
1098
+ col.key
1099
+ )) }) }),
1100
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: data.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: columns.length, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: emptyState, children: emptyState2 ?? "No data." }) }) }) : sortedData.map((row) => {
1101
+ const key = rowKey(row);
1102
+ const isSelected = selectedKeys?.includes(key) ?? false;
1103
+ return /* @__PURE__ */ jsxRuntime.jsx(
1104
+ "tr",
1105
+ {
1106
+ className: tr,
1107
+ "data-selected": isSelected,
1108
+ onClick: onRowClick ? () => onRowClick(key, row) : void 0,
1109
+ style: onRowClick ? { cursor: "pointer" } : void 0,
1110
+ children: columns.map((col) => /* @__PURE__ */ jsxRuntime.jsx("td", { className: col.mono ? tdMono : td, children: col.render ? col.render(row) : String(row[col.key] ?? "") }, col.key))
1111
+ },
1112
+ key
1113
+ );
1114
+ }) })
1115
+ ] })
1116
+ }
1117
+ ),
1107
1118
  pageSize && totalPages !== null && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: pagination, children: [
1108
1119
  /* @__PURE__ */ jsxRuntime.jsx(
1109
1120
  Button,