@rebasepro/ui 0.0.1-canary.f81da60 → 0.1.0

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.umd.js CHANGED
@@ -970,18 +970,18 @@
970
970
  "border border-primary bg-primary focus:ring-primary shadow-sm hover:shadow-md hover:brightness-110 text-white hover:text-white": t8,
971
971
  "border border-secondary bg-secondary focus:ring-secondary shadow-sm hover:shadow-md hover:brightness-110 text-white hover:text-white": t9,
972
972
  "border border-red-500 bg-red-500 hover:bg-red-600 focus:ring-red-500 shadow-sm hover:shadow-md text-white hover:text-white": t10,
973
- "border border-surface-accent-200 bg-surface-accent-200 hover:bg-surface-accent-300 focus:ring-surface-accent-400 shadow-sm hover:shadow-md text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark": t11,
974
- "border border-transparent bg-surface-100 hover:bg-surface-accent-200 text-text-primary dark:bg-surface-700 dark:hover:bg-surface-accent-600 dark:text-text-primary-dark hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark": t12,
973
+ "border border-surface-accent-200 bg-surface-accent-200 hover:bg-surface-accent-300 focus:ring-surface-accent-400 shadow-sm hover:shadow-md text-text-primary hover:text-text-primary dark:border-surface-accent-700 dark:bg-surface-accent-700 dark:hover:bg-surface-accent-600 dark:text-text-primary-dark hover:dark:text-text-primary-dark": t11,
974
+ "border border-transparent bg-surface-100 hover:bg-surface-accent-200 text-text-primary dark:bg-surface-700 dark:hover:bg-surface-accent-700 dark:text-text-primary-dark hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark": t12,
975
975
  "border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800": t13,
976
976
  "border border-transparent text-secondary hover:text-secondary hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800": t14,
977
977
  "border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10 hover:bg-red-500/10": t15,
978
- "border border-transparent text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark hover:bg-surface-accent-200 hover:dark:bg-surface-700": t16,
979
- "border border-transparent text-text-primary hover:text-text-primary hover:bg-surface-accent-200 dark:text-text-primary-dark dark:hover:text-text-primary-dark dark:hover:bg-surface-accent-700": t17,
978
+ "border border-transparent text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800": t16,
979
+ "border border-transparent text-text-primary hover:text-text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:text-text-primary-dark dark:hover:text-text-primary-dark dark:hover:bg-surface-accent-800": t17,
980
980
  "border border-primary text-primary hover:text-primary hover:bg-primary-bg hover:bg-primary/10": t18,
981
981
  "border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": t19,
982
982
  "border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": t20,
983
- "border border-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:bg-surface-accent-200": t21,
984
- "border border-surface-300 text-text-primary hover:bg-surface-accent-200 dark:border-surface-600 dark:text-text-primary-dark dark:hover:bg-surface-accent-700": t22,
983
+ "border border-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark dark:border-surface-accent-600 hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800": t21,
984
+ "border border-surface-300 text-text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:border-surface-600 dark:text-text-primary-dark dark:hover:bg-surface-accent-800": t22,
985
985
  "text-text-disabled dark:text-text-disabled-dark": disabled,
986
986
  "border border-transparent opacity-50": t23,
987
987
  "border border-surface-500 opacity-50": t24,
@@ -1782,7 +1782,7 @@
1782
1782
  return t11;
1783
1783
  }
1784
1784
  const Tooltip = (t0) => {
1785
- const $ = reactCompilerRuntime.c(28);
1785
+ const $ = reactCompilerRuntime.c(30);
1786
1786
  const {
1787
1787
  open,
1788
1788
  defaultOpen,
@@ -1830,61 +1830,72 @@
1830
1830
  }
1831
1831
  const trigger = t4;
1832
1832
  let t5;
1833
- if ($[7] !== tooltipClassName) {
1834
- t5 = cls("TooltipContent", "max-w-lg leading-relaxed", "z-50 rounded px-3 py-2 text-xs leading-none bg-surface-accent-700 dark:bg-surface-accent-800 bg-opacity-90 bg-surface-accent-700/90 dark:bg-surface-accent-800/90 font-medium text-surface-accent-50 shadow-2xl select-none duration-400 ease-in transform opacity-100", tooltipClassName);
1835
- $[7] = tooltipClassName;
1836
- $[8] = t5;
1833
+ if ($[7] !== onOpenChange || $[8] !== open) {
1834
+ t5 = open !== void 0 ? {
1835
+ open,
1836
+ onOpenChange
1837
+ } : {};
1838
+ $[7] = onOpenChange;
1839
+ $[8] = open;
1840
+ $[9] = t5;
1837
1841
  } else {
1838
- t5 = $[8];
1842
+ t5 = $[9];
1839
1843
  }
1840
- const t6 = sideOffset === void 0 ? 4 : sideOffset;
1841
- let t7;
1842
- if ($[9] !== align || $[10] !== side || $[11] !== t5 || $[12] !== t6 || $[13] !== title || $[14] !== tooltipStyle) {
1843
- t7 = /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Content, { className: t5, style: tooltipStyle, sideOffset: t6, align, side, children: title });
1844
- $[9] = align;
1845
- $[10] = side;
1846
- $[11] = t5;
1847
- $[12] = t6;
1848
- $[13] = title;
1849
- $[14] = tooltipStyle;
1850
- $[15] = t7;
1844
+ let t6;
1845
+ if ($[10] !== tooltipClassName) {
1846
+ t6 = cls("TooltipContent", "max-w-lg leading-relaxed", "z-50 rounded px-3 py-2 text-xs leading-none bg-surface-accent-700 dark:bg-surface-accent-800 bg-opacity-90 bg-surface-accent-700/90 dark:bg-surface-accent-800/90 font-medium text-surface-accent-50 shadow-2xl select-none duration-400 ease-in transform opacity-100", tooltipClassName);
1847
+ $[10] = tooltipClassName;
1848
+ $[11] = t6;
1851
1849
  } else {
1852
- t7 = $[15];
1850
+ t6 = $[11];
1853
1851
  }
1852
+ const t7 = sideOffset === void 0 ? 4 : sideOffset;
1854
1853
  let t8;
1855
- if ($[16] !== finalContainer || $[17] !== t7) {
1856
- t8 = /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { container: finalContainer, children: t7 });
1857
- $[16] = finalContainer;
1858
- $[17] = t7;
1854
+ if ($[12] !== align || $[13] !== side || $[14] !== t6 || $[15] !== t7 || $[16] !== title || $[17] !== tooltipStyle) {
1855
+ t8 = /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Content, { className: t6, style: tooltipStyle, sideOffset: t7, align, side, children: title });
1856
+ $[12] = align;
1857
+ $[13] = side;
1858
+ $[14] = t6;
1859
+ $[15] = t7;
1860
+ $[16] = title;
1861
+ $[17] = tooltipStyle;
1859
1862
  $[18] = t8;
1860
1863
  } else {
1861
1864
  t8 = $[18];
1862
1865
  }
1863
1866
  let t9;
1864
- if ($[19] !== defaultOpen || $[20] !== onOpenChange || $[21] !== open || $[22] !== t8 || $[23] !== trigger) {
1865
- t9 = /* @__PURE__ */ jsxRuntime.jsxs(TooltipPrimitive__namespace.Root, { open, onOpenChange, defaultOpen, children: [
1867
+ if ($[19] !== finalContainer || $[20] !== t8) {
1868
+ t9 = /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { container: finalContainer, children: t8 });
1869
+ $[19] = finalContainer;
1870
+ $[20] = t8;
1871
+ $[21] = t9;
1872
+ } else {
1873
+ t9 = $[21];
1874
+ }
1875
+ let t10;
1876
+ if ($[22] !== defaultOpen || $[23] !== t5 || $[24] !== t9 || $[25] !== trigger) {
1877
+ t10 = /* @__PURE__ */ jsxRuntime.jsxs(TooltipPrimitive__namespace.Root, { ...t5, defaultOpen, children: [
1866
1878
  trigger,
1867
- t8
1879
+ t9
1868
1880
  ] });
1869
- $[19] = defaultOpen;
1870
- $[20] = onOpenChange;
1871
- $[21] = open;
1872
- $[22] = t8;
1873
- $[23] = trigger;
1881
+ $[22] = defaultOpen;
1882
+ $[23] = t5;
1874
1883
  $[24] = t9;
1884
+ $[25] = trigger;
1885
+ $[26] = t10;
1875
1886
  } else {
1876
- t9 = $[24];
1887
+ t10 = $[26];
1877
1888
  }
1878
- let t10;
1879
- if ($[25] !== delayDuration || $[26] !== t9) {
1880
- t10 = /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Provider, { delayDuration, children: t9 });
1881
- $[25] = delayDuration;
1882
- $[26] = t9;
1883
- $[27] = t10;
1889
+ let t11;
1890
+ if ($[27] !== delayDuration || $[28] !== t10) {
1891
+ t11 = /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Provider, { delayDuration, children: t10 });
1892
+ $[27] = delayDuration;
1893
+ $[28] = t10;
1894
+ $[29] = t11;
1884
1895
  } else {
1885
- t10 = $[27];
1896
+ t11 = $[29];
1886
1897
  }
1887
- return t10;
1898
+ return t11;
1888
1899
  };
1889
1900
  const styles$2 = `
1890
1901
 
@@ -2340,7 +2351,7 @@
2340
2351
  /* @__PURE__ */ jsxRuntime.jsx(IconButton, { onClick: (e_2) => {
2341
2352
  e_2.stopPropagation();
2342
2353
  inputRef.current?.showPicker();
2343
- }, className: "absolute right-3 top-1/2 transform -translate-y-1/2 text-surface-accent-500!", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { color: "disabled" }) }),
2354
+ }, className: "absolute right-3 top-1/2 transform -translate-y-1/2 text-surface-accent-500!", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, {}) }),
2344
2355
  clearable && value && /* @__PURE__ */ jsxRuntime.jsx(IconButton, { onClick: handleClear, className: "absolute right-14 top-1/2 transform -translate-y-1/2 text-surface-accent-400 ", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, {}) })
2345
2356
  ] }),
2346
2357
  invalidValue && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center m-2", children: [
@@ -5052,12 +5063,13 @@
5052
5063
  autoFocus,
5053
5064
  disabled,
5054
5065
  loading,
5055
- inputRef
5066
+ inputRef,
5067
+ initialValue
5056
5068
  } = t0;
5057
5069
  const placeholder = t1 === void 0 ? "Search" : t1;
5058
5070
  const expandable = t2 === void 0 ? false : t2;
5059
5071
  const size = t3 === void 0 ? "medium" : t3;
5060
- const [searchText, setSearchText] = React.useState("");
5072
+ const [searchText, setSearchText] = React.useState(initialValue ?? "");
5061
5073
  const [active, setActive] = React.useState(false);
5062
5074
  const deferredValues = useDebounceValue(searchText, 200);
5063
5075
  let t4;
@@ -8104,7 +8116,7 @@
8104
8116
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
8105
8117
  position: "sticky",
8106
8118
  top: 0,
8107
- zIndex: 10
8119
+ zIndex: 20
8108
8120
  }, children: /* @__PURE__ */ jsxRuntime.jsx(VirtualTableHeaderRow, { ...virtualTableProps }) }),
8109
8121
  !customView && children
8110
8122
  ] }) }),
@@ -8297,7 +8309,7 @@
8297
8309
  const customView = error ? /* @__PURE__ */ jsxRuntime.jsxs(CenteredView, { maxWidth: "2xl", className: "flex flex-col gap-2", children: [
8298
8310
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h6", children: "Error" }),
8299
8311
  error?.message && /* @__PURE__ */ jsxRuntime.jsx(SafeLinkRenderer, { text: error.message })
8300
- ] }) : empty ? loading ? /* @__PURE__ */ jsxRuntime.jsx(CircularProgressCenter, {}) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col overflow-auto items-center justify-center p-8 h-full", children: emptyComponent }) : void 0;
8312
+ ] }) : empty ? loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-12 px-8", children: /* @__PURE__ */ jsxRuntime.jsx(CircularProgress, { size: "small" }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col overflow-auto items-center justify-center py-12 px-8", children: emptyComponent }) : void 0;
8301
8313
  const virtualListController = React.useMemo(() => ({
8302
8314
  data,
8303
8315
  rowHeight,