@rebasepro/ui 0.9.1-canary.ff338b5 → 0.10.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/components/Chip.d.ts +2 -10
- package/dist/components/DebouncedTextField.d.ts +1 -1
- package/dist/components/VirtualTable/VirtualTableProps.d.ts +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/util/chip_colors.d.ts +9 -1
- package/package.json +1 -1
- package/src/components/Chip.tsx +2 -10
- package/src/components/DebouncedTextField.tsx +1 -1
- package/src/components/SearchBar.tsx +2 -1
- package/src/components/VirtualTable/VirtualTable.tsx +3 -1
- package/src/components/VirtualTable/VirtualTableProps.tsx +1 -1
- package/src/util/chip_colors.ts +11 -1
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
export type ChipColorScheme = {
|
|
2
|
+
color: string;
|
|
3
|
+
text: string;
|
|
4
|
+
/** Background color override for dark mode */
|
|
5
|
+
darkColor?: string;
|
|
6
|
+
/** Text color override for dark mode */
|
|
7
|
+
darkText?: string;
|
|
8
|
+
};
|
|
2
9
|
export declare const CHIP_COLORS: Record<string, ChipColorScheme>;
|
|
10
|
+
export type ChipColorKey = keyof typeof CHIP_COLORS;
|
|
3
11
|
export declare function getColorSchemeForKey(key: ChipColorKey): ChipColorScheme;
|
|
4
12
|
export declare function getColorSchemeForSeed(seed: string): ChipColorScheme;
|
package/package.json
CHANGED
package/src/components/Chip.tsx
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { CHIP_COLORS, cls, getColorSchemeForKey } from "../util";
|
|
3
|
+
import type { ChipColorKey, ChipColorScheme } from "../util/chip_colors";
|
|
3
4
|
|
|
4
|
-
export type ChipColorScheme
|
|
5
|
-
color: string;
|
|
6
|
-
text: string;
|
|
7
|
-
/** Background color override for dark mode */
|
|
8
|
-
darkColor?: string;
|
|
9
|
-
/** Text color override for dark mode */
|
|
10
|
-
darkText?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type ChipColorKey = keyof typeof CHIP_COLORS;
|
|
5
|
+
export type { ChipColorKey, ChipColorScheme };
|
|
14
6
|
|
|
15
7
|
export interface ChipProps {
|
|
16
8
|
className?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
-
import { TextField, TextFieldProps } from "./
|
|
3
|
+
import { TextField, TextFieldProps } from "./TextField";
|
|
4
4
|
|
|
5
5
|
type TextFieldChangeEvent = React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>;
|
|
6
6
|
|
|
@@ -5,7 +5,8 @@ import { iconSize } from "../icons/Icon";
|
|
|
5
5
|
import React, { useCallback, useState } from "react";
|
|
6
6
|
|
|
7
7
|
import { defaultBorderMixin } from "../styles";
|
|
8
|
-
import { CircularProgress
|
|
8
|
+
import { CircularProgress } from "./CircularProgress";
|
|
9
|
+
import { IconButton } from "./IconButton";
|
|
9
10
|
|
|
10
11
|
import { cls } from "../util";
|
|
11
12
|
import { useDebounceValue } from "../hooks";
|
|
@@ -20,7 +20,9 @@ import { VirtualTableContextProps } from "./types";
|
|
|
20
20
|
import { VirtualTableHeaderRow } from "./VirtualTableHeaderRow";
|
|
21
21
|
import { VirtualTableRow } from "./VirtualTableRow";
|
|
22
22
|
import { VirtualTableCell } from "./VirtualTableCell";
|
|
23
|
-
import { CenteredView
|
|
23
|
+
import { CenteredView } from "../CenteredView";
|
|
24
|
+
import { Typography } from "../Typography";
|
|
25
|
+
import { cls } from "../../util/cls";
|
|
24
26
|
import { useDebounceCallback } from "../../hooks/useDebounceCallback";
|
|
25
27
|
import {
|
|
26
28
|
closestCenter,
|
package/src/util/chip_colors.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { ChipColorKey, ChipColorScheme } from "../components";
|
|
2
1
|
import { hashString } from "./hash";
|
|
3
2
|
|
|
3
|
+
export type ChipColorScheme = {
|
|
4
|
+
color: string;
|
|
5
|
+
text: string;
|
|
6
|
+
/** Background color override for dark mode */
|
|
7
|
+
darkColor?: string;
|
|
8
|
+
/** Text color override for dark mode */
|
|
9
|
+
darkText?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
4
12
|
export const CHIP_COLORS: Record<string, ChipColorScheme> = {
|
|
5
13
|
blue: { color: "#cfdfff",
|
|
6
14
|
text: "#102046",
|
|
@@ -64,6 +72,8 @@ darkColor: "#059669",
|
|
|
64
72
|
darkText: "#d1fae5" }
|
|
65
73
|
};
|
|
66
74
|
|
|
75
|
+
export type ChipColorKey = keyof typeof CHIP_COLORS;
|
|
76
|
+
|
|
67
77
|
export function getColorSchemeForKey(key: ChipColorKey): ChipColorScheme {
|
|
68
78
|
return CHIP_COLORS[key];
|
|
69
79
|
}
|