@rebasepro/ui 0.12.0 → 0.12.1-canary.g009ed95
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/components/Button.d.ts +2 -1
- package/dist/components/Menubar.d.ts +9 -2
- package/dist/components/SearchBar.d.ts +1 -1
- package/dist/components/VirtualTable/VirtualTable.d.ts +12 -6
- package/dist/components/VirtualTable/fields/VirtualTableDateField.d.ts +1 -0
- package/dist/components/index.d.ts +0 -1
- package/dist/icons/GitHubIcon.d.ts +1 -1
- package/dist/icons/HandleIcon.d.ts +3 -1
- package/dist/index.css +29 -61
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +484 -298
- package/dist/index.es.js.map +1 -1
- package/dist/src/index.css +29 -61
- package/dist/src/theme.css +109 -0
- package/dist/styles.d.ts +28 -0
- package/dist/theme.css +109 -0
- package/dist/util/chip_colors.d.ts +29 -3
- package/dist/views/CollectionView/index.d.ts +0 -6
- package/dist/views/Kanban/BoardColumn.d.ts +1 -0
- package/dist/views/Kanban/BoardSortableList.d.ts +2 -1
- package/dist/views/Kanban/board_types.d.ts +10 -0
- package/dist/views/Kanban/placement.d.ts +26 -0
- package/dist/views/index.d.ts +0 -1
- package/package.json +31 -29
- package/src/components/BooleanSwitch.tsx +44 -17
- package/src/components/BooleanSwitchWithLabel.tsx +6 -6
- package/src/components/Button.tsx +9 -13
- package/src/components/Checkbox.tsx +16 -6
- package/src/components/Chip.tsx +5 -2
- package/src/components/ColorPicker.tsx +56 -43
- package/src/components/DateTimeField.tsx +18 -6
- package/src/components/DialogActions.tsx +3 -1
- package/src/components/IconButton.tsx +35 -6
- package/src/components/Menubar.tsx +19 -3
- package/src/components/MultiSelect.tsx +9 -5
- package/src/components/SearchBar.tsx +6 -4
- package/src/components/Select.tsx +6 -6
- package/src/components/TextField.tsx +17 -7
- package/src/components/VirtualTable/VirtualTable.performance.test.tsx +35 -341
- package/src/components/VirtualTable/VirtualTable.tsx +19 -1
- package/src/components/VirtualTable/fields/VirtualTableDateField.tsx +6 -1
- package/src/components/index.tsx +2 -1
- package/src/icons/GitHubIcon.tsx +11 -5
- package/src/icons/HandleIcon.tsx +15 -2
- package/src/index.css +29 -61
- package/src/index.ts +2 -1
- package/src/styles.ts +47 -0
- package/src/theme.css +109 -0
- package/src/util/chip_colors.ts +109 -67
- package/src/views/CollectionView/index.ts +6 -11
- package/src/views/Kanban/Board.tsx +80 -117
- package/src/views/Kanban/BoardColumn.tsx +3 -0
- package/src/views/Kanban/BoardSortableList.tsx +16 -4
- package/src/views/Kanban/board_types.ts +10 -0
- package/src/views/Kanban/placement.ts +62 -0
- package/src/views/index.ts +1 -1
- package/dist/views/TableView.d.ts +0 -6
- package/src/views/TableView.tsx +0 -7
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { type ButtonSize } from "../styles";
|
|
2
3
|
export type ButtonProps<C extends React.ElementType = "button"> = {
|
|
3
4
|
children?: React.ReactNode;
|
|
4
5
|
variant?: "filled" | "outlined" | "text";
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
color?: "primary" | "secondary" | "text" | "error" | "neutral";
|
|
7
|
-
size?:
|
|
8
|
+
size?: ButtonSize;
|
|
8
9
|
startIcon?: React.ReactNode;
|
|
9
10
|
fullWidth?: boolean;
|
|
10
11
|
className?: string;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export declare function Menubar({ children, onSelect, className }: {
|
|
2
|
+
export declare function Menubar({ children, onSelect, value, defaultValue, onValueChange, className }: {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
onSelect?: (event: React.SyntheticEvent) => void;
|
|
5
|
+
/** Value of the open menu, controlled. Pair with `onValueChange`. */
|
|
6
|
+
value?: string;
|
|
7
|
+
/** Value of the menu open on mount, uncontrolled. */
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
onValueChange?: (value: string) => void;
|
|
5
10
|
className?: string;
|
|
6
11
|
}): React.JSX.Element;
|
|
7
|
-
export declare function MenubarMenu({ children }: {
|
|
12
|
+
export declare function MenubarMenu({ children, value }: {
|
|
8
13
|
children: React.ReactNode;
|
|
14
|
+
/** Identifies this menu to the parent Menubar's `value`/`defaultValue`. */
|
|
15
|
+
value?: string;
|
|
9
16
|
}): React.JSX.Element;
|
|
10
17
|
export declare function MenubarTrigger({ children, onSelect, className }: {
|
|
11
18
|
children: React.ReactNode;
|
|
@@ -10,7 +10,7 @@ interface SearchBarProps {
|
|
|
10
10
|
* - "medium": 44px height (matches TextField medium)
|
|
11
11
|
* @default "medium"
|
|
12
12
|
*/
|
|
13
|
-
size?: "smallest" | "small" | "medium";
|
|
13
|
+
size?: "smallest" | "small" | "medium" | "large";
|
|
14
14
|
innerClassName?: string;
|
|
15
15
|
className?: string;
|
|
16
16
|
autoFocus?: boolean;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { VirtualTableProps } from "./VirtualTableProps";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* `React.memo` is not generic-preserving: it takes the props type as its own
|
|
5
|
+
* type argument, so annotating the call with
|
|
6
|
+
* `VirtualTableProps<Record<string, unknown>>` pinned `T` at the boundary and
|
|
7
|
+
* discarded the `<T>` the inner function declares. The exported component was
|
|
8
|
+
* therefore not generic at all — every consumer got `Record<string, unknown>`,
|
|
9
|
+
* `columns` and `cellRenderer` were unrelated to `data`, and a caller writing
|
|
10
|
+
* `<VirtualTable<Post> …>` was told the component expects no type arguments.
|
|
8
11
|
*
|
|
9
|
-
*
|
|
12
|
+
* Re-asserting the call signature is the standard way to carry a type parameter
|
|
13
|
+
* across `memo`; it is the only cast here, and it restores the generic the
|
|
14
|
+
* implementation always had. Runtime behaviour is unchanged — this is the same
|
|
15
|
+
* memoized component under a type that describes it.
|
|
10
16
|
*/
|
|
11
|
-
export declare const VirtualTable:
|
|
17
|
+
export declare const VirtualTable: <T extends Record<string, unknown>>(props: VirtualTableProps<T>) => React.ReactElement | null;
|
|
@@ -8,6 +8,7 @@ export declare function VirtualTableDateField(props: {
|
|
|
8
8
|
updateValue: (newValue: (Date | null)) => void;
|
|
9
9
|
focused: boolean;
|
|
10
10
|
disabled: boolean;
|
|
11
|
+
small?: boolean;
|
|
11
12
|
locale?: string;
|
|
12
13
|
onBlur?: React.FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
13
14
|
}): React.JSX.Element;
|
package/dist/index.css
CHANGED
|
@@ -1,57 +1,15 @@
|
|
|
1
|
-
@theme
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
70
|
+
@apply text-sm font-headers font-medium tracking-heading;
|
|
103
71
|
}
|
|
104
72
|
|
|
105
73
|
.typography-subtitle2 {
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ export * from "./views";
|
|
|
3
3
|
export * from "./icons";
|
|
4
4
|
export * from "./styles";
|
|
5
5
|
export { cls } from "./util/cls";
|
|
6
|
-
export { CHIP_COLORS, getColorSchemeForKey, getColorSchemeForSeed } from "./util/chip_colors";
|
|
6
|
+
export { CHIP_COLORS, CHIP_HUES, CHIP_SEED_KEYS, getColorSchemeForKey, getColorSchemeForSeed } from "./util/chip_colors";
|
|
7
|
+
export type { ChipHue, ChipTone } from "./util/chip_colors";
|
|
7
8
|
export { useOutsideAlerter } from "./hooks/useOutsideAlerter";
|
|
8
9
|
export { useDebouncedCallback } from "./hooks/useDebouncedCallback";
|
|
9
10
|
export { useDebounceCallback } from "./hooks/useDebounceCallback";
|