@rebasepro/ui 0.12.0 → 0.12.1-canary.g35be8cb

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.css CHANGED
@@ -1,57 +1,15 @@
1
- @theme {
2
- /* Font Families */
3
- --font-sans: 'Rubik', 'Roboto', 'Helvetica', 'Arial', sans-serif;
4
- --font-headers: 'Rubik', 'Roboto', 'Helvetica', 'Arial', sans-serif;
5
- --font-mono: 'JetBrains Mono', 'Space Mono', 'Lucida Console', monospace;
6
-
7
- /* Colors */
8
- --color-primary: #0070F4;
9
- --color-primary-light: oklch(from var(--color-primary) calc(l + 0.15) c h);
10
- --color-primary-dark: oklch(from var(--color-primary) calc(l - 0.15) c h);
11
- --color-secondary: #FF5B79;
12
- --color-secondary-light: oklch(from var(--color-secondary) calc(l + 0.15) c h);
13
- --color-secondary-dark: oklch(from var(--color-secondary) calc(l - 0.15) c h);
14
-
15
- --color-primary-bg: oklch(from var(--color-primary) l c h / 0.1);
16
- --color-secondary-bg: oklch(from var(--color-secondary) l c h / 0.1);
17
-
18
- /* Field Colors */
19
- --color-field-disabled: rgb(224 224 226);
20
- --color-field-disabled-dark: rgb(35 35 37);
21
-
22
- /* Text Colors — using opaque values so icon strokes render solidly */
23
- --color-text-primary: #212121;
24
- --color-text-secondary: #757575;
25
- --color-text-disabled: #9e9e9e;
26
- --color-text-primary-dark: #ffffff;
27
- --color-text-secondary-dark: #a0a0a9;
28
- --color-text-disabled-dark: #757580;
29
-
30
- /* Surface Colors */
31
- --color-surface-50: #fafafa;
32
- --color-surface-100: #f5f5f5;
33
- --color-surface-200: #e5e5e5;
34
- --color-surface-300: #d4d4d4;
35
- --color-surface-400: #a3a3a3;
36
- --color-surface-500: #737373;
37
- --color-surface-600: #404040;
38
- --color-surface-700: #262626;
39
- --color-surface-800: #111111;
40
- --color-surface-900: #0a0a0a;
41
- --color-surface-950: #000000;
42
-
43
- /* Surface Accent Colors */
44
- --color-surface-accent-50: #f8fafc;
45
- --color-surface-accent-100: #f1f5f9;
46
- --color-surface-accent-200: #e2e8f0;
47
- --color-surface-accent-300: #cbd5e1;
48
- --color-surface-accent-400: #94a3b8;
49
- --color-surface-accent-500: #64748b;
50
- --color-surface-accent-600: #475569;
51
- --color-surface-accent-700: #334155;
52
- --color-surface-accent-800: #1e293b;
53
- --color-surface-accent-900: #172033;
54
- --color-surface-accent-950: #0f172a;
1
+ @import "./theme.css";
2
+
3
+ /* Grayscale antialiasing, not macOS's subpixel default.
4
+ This is the single largest reason the same typeface can look like a
5
+ different one between two pages: subpixel-antialiased text renders visibly
6
+ heavier and slightly fuzzier, and the effect is worst for light text on dark
7
+ backgrounds which is most of this product and all of the marketing site.
8
+ Design comps that set this and shipped pages that do not will never match,
9
+ no matter how carefully the font, size, weight and tracking are aligned. */
10
+ html {
11
+ -webkit-font-smoothing: antialiased;
12
+ -moz-osx-font-smoothing: grayscale;
55
13
  }
56
14
 
57
15
  /* Native UI (scrollbars, form controls) must follow the active theme,
@@ -74,32 +32,42 @@ html.dark {
74
32
  scrollbar-width: none; /* Firefox */
75
33
  }
76
34
 
35
+ /* Optical ladder: weight comes down as size comes down, tracking tightens as
36
+ size goes up. Seven consecutive levels of semibold was a Rubik-era setting,
37
+ and holding 600 all the way down to text-sm made every heading shout equally
38
+ — a heading stops being a headline somewhere, and the scale should say where.
39
+ 600 is display-scale only; the small end carries 500.
40
+
41
+ With a single face carrying both headings and body, weight and tracking are
42
+ the only things separating a heading from the copy around it — so the tiers
43
+ have to actually differ, rather than all sitting at 600. */
44
+
77
45
  .typography-h1 {
78
- @apply text-4xl font-headers font-semibold tracking-tight;
46
+ @apply text-4xl font-headers font-semibold tracking-display;
79
47
  }
80
48
 
81
49
  .typography-h2 {
82
- @apply text-3xl font-headers font-semibold tracking-tight;
50
+ @apply text-3xl font-headers font-semibold tracking-display;
83
51
  }
84
52
 
85
53
  .typography-h3 {
86
- @apply text-2xl font-headers font-semibold tracking-tight;
54
+ @apply text-2xl font-headers font-semibold tracking-title;
87
55
  }
88
56
 
89
57
  .typography-h4 {
90
- @apply text-xl font-headers font-semibold tracking-[-0.01em];
58
+ @apply text-xl font-headers font-medium tracking-title;
91
59
  }
92
60
 
93
61
  .typography-h5 {
94
- @apply text-lg font-headers font-semibold tracking-[-0.01em];
62
+ @apply text-lg font-headers font-medium tracking-heading;
95
63
  }
96
64
 
97
65
  .typography-h6 {
98
- @apply text-base font-headers font-semibold tracking-[-0.01em];
66
+ @apply text-base font-headers font-medium tracking-heading;
99
67
  }
100
68
 
101
69
  .typography-subtitle1 {
102
- @apply text-sm font-headers font-semibold tracking-[-0.01em];
70
+ @apply text-sm font-headers font-medium tracking-heading;
103
71
  }
104
72
 
105
73
  .typography-subtitle2 {
package/dist/index.es.js CHANGED
@@ -3455,7 +3455,8 @@ var DateTimeField = ({ value, label, onChange, disabled, clearable, mode = "date
3455
3455
  let resultDate;
3456
3456
  if (!timezone) resultDate = new Date(year, month - 1, day, hours, minutes);
3457
3457
  else {
3458
- const offsetMinutes = getTimezoneOffsetMinutes(new Date(Date.UTC(year, month - 1, day, hours, minutes)), timezone);
3458
+ const refUtcDate = new Date(Date.UTC(year, month - 1, day, hours, minutes));
3459
+ const offsetMinutes = getTimezoneOffsetMinutes(refUtcDate, timezone);
3459
3460
  resultDate = /* @__PURE__ */ new Date(Date.UTC(year, month - 1, day, hours, minutes) - offsetMinutes * 6e4);
3460
3461
  }
3461
3462
  if (isNaN(resultDate.getTime())) throw new Error("Invalid date");
@@ -4092,7 +4093,8 @@ var MultiSelect = React$1.forwardRef(({ value, size = "large", label, error, onV
4092
4093
  }
4093
4094
  };
4094
4095
  const toggleOption = (value) => {
4095
- updateValues(selectedValues.some((v) => String(v) === String(value)) ? selectedValues.filter((v) => String(v) !== String(value)) : [...selectedValues, value]);
4096
+ const newSelectedValues = selectedValues.some((v) => String(v) === String(value)) ? selectedValues.filter((v) => String(v) !== String(value)) : [...selectedValues, value];
4097
+ updateValues(newSelectedValues);
4096
4098
  };
4097
4099
  const handleClear = () => {
4098
4100
  updateValues([]);
@@ -4930,7 +4932,7 @@ var TextField = forwardRef(({ value, onChange, label, type = "text", multiline =
4930
4932
  "min-h-[32px]": size === "small",
4931
4933
  "min-h-[44px]": size === "medium",
4932
4934
  "min-h-[64px]": size === "large"
4933
- }, label ? size === "large" ? "pt-8 pb-2" : "pt-4 pb-2" : size === "smallest" ? "py-0.5" : size === "small" ? "py-1" : "py-2", endAdornment ? "pr-12" : "pr-3", disabled && "outline-none opacity-65 dark:opacity-60 text-surface-accent-800 dark:text-white", inputClassName),
4935
+ }, label ? size === "large" ? "pt-8 pb-2" : "pt-5 pb-1.5" : size === "smallest" ? "py-0.5" : size === "small" ? "py-1" : "py-2", endAdornment ? "pr-12" : "pr-3", disabled && "outline-none opacity-65 dark:opacity-60 text-surface-accent-800 dark:text-white", inputClassName),
4934
4936
  placeholder: focused || hasValue || !label ? placeholder : void 0,
4935
4937
  autoFocus,
4936
4938
  onFocus: () => setFocused(true),
@@ -5676,6 +5678,7 @@ var VirtualTableHeaderRow = ({ columns, currentSort, onColumnSort, onFilterUpdat
5676
5678
  const columnFilter = column && filter && filter[column.key] ? filter[column.key] : void 0;
5677
5679
  const filterForThisProperty = columnFilter ? Array.isArray(columnFilter[0]) ? columnFilter[0] : columnFilter : void 0;
5678
5680
  const isDraggable = !column.frozen && !!onColumnsOrderChange;
5681
+ const isDragging = draggingColumnId === column.key;
5679
5682
  return /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(SortableColumnHeader, {
5680
5683
  column,
5681
5684
  columnIndex,
@@ -5688,7 +5691,7 @@ var VirtualTableHeaderRow = ({ columns, currentSort, onColumnSort, onFilterUpdat
5688
5691
  onColumnSort,
5689
5692
  onClickResizeColumn,
5690
5693
  createFilterField,
5691
- isDragging: draggingColumnId === column.key,
5694
+ isDragging,
5692
5695
  isDraggable
5693
5696
  }) }, "header_" + column.key);
5694
5697
  }), AddColumnComponent && /* @__PURE__ */ jsx(AddColumnComponent, {})]
@@ -6332,7 +6335,10 @@ function VirtualTableSelect(props) {
6332
6335
  });
6333
6336
  if (isNumber) updateValue(newValue);
6334
6337
  else updateValue(newValue);
6335
- } else updateValue(typeof options.find((o) => String(o.value) === updatedValue)?.value === "number" ? parseFloat(updatedValue) : updatedValue || null);
6338
+ } else {
6339
+ const opt = options.find((o) => String(o.value) === updatedValue);
6340
+ updateValue(typeof opt?.value === "number" ? parseFloat(updatedValue) : updatedValue || null);
6341
+ }
6336
6342
  }, [
6337
6343
  multiple,
6338
6344
  updateValue,
@@ -7670,7 +7676,7 @@ var SIZE_TO_ROW_HEIGHT = {
7670
7676
  l: 64,
7671
7677
  xl: 80
7672
7678
  };
7673
- var SORTABLE_TYPES = new Set([
7679
+ var SORTABLE_TYPES = /* @__PURE__ */ new Set([
7674
7680
  "string",
7675
7681
  "number",
7676
7682
  "date"
@@ -7809,7 +7815,7 @@ function resolveTitlePropertyKey(order, properties, idProperty, titleProperty) {
7809
7815
  PLAIN_TEXT: 60,
7810
7816
  NAMED: 100
7811
7817
  };
7812
- const titleLikeKeys = new Set([
7818
+ const titleLikeKeys = /* @__PURE__ */ new Set([
7813
7819
  "name",
7814
7820
  "fullname",
7815
7821
  "displayname",