@rebasepro/ui 0.16.0 → 0.16.1-canary.g0d7af95
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/BooleanSwitchWithLabel.d.ts +1 -1
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Chip.d.ts +1 -1
- package/dist/components/CircularProgressCenter.d.ts +1 -1
- package/dist/components/ColorPicker.d.ts +1 -1
- package/dist/components/DebouncedTextField.d.ts +1 -1
- package/dist/components/DialogTitle.d.ts +1 -1
- package/dist/components/LoadingButton.d.ts +1 -1
- package/dist/components/VirtualTable/VirtualTable.d.ts +1 -1
- package/dist/components/VirtualTable/VirtualTableCell.d.ts +1 -1
- package/dist/components/VirtualTable/VirtualTableHeader.d.ts +1 -1
- package/dist/components/VirtualTable/VirtualTableHeaderRow.d.ts +1 -1
- package/dist/components/VirtualTable/VirtualTableProps.d.ts +1 -1
- package/dist/components/VirtualTable/VirtualTableRow.d.ts +1 -1
- package/dist/components/VirtualTable/index.d.ts +10 -10
- package/dist/components/VirtualTable/selection/SelectionContext.d.ts +1 -1
- package/dist/components/VirtualTable/types.d.ts +2 -2
- package/dist/components/common/SelectInputLabel.d.ts +14 -0
- package/dist/components/index.d.ts +53 -53
- package/dist/hooks/index.d.ts +6 -6
- package/dist/icons/GitHubIcon.d.ts +1 -1
- package/dist/icons/HandleIcon.d.ts +1 -1
- package/dist/icons/index.d.ts +6 -6
- package/dist/index.css +19 -7
- package/dist/index.d.ts +17 -17
- package/dist/index.es.js +61 -15
- package/dist/index.es.js.map +1 -1
- package/dist/src/index.css +19 -7
- package/dist/src/theme.css +51 -3
- package/dist/styles.d.ts +36 -4
- package/dist/theme.css +51 -3
- package/dist/util/index.d.ts +4 -4
- package/dist/views/CardView.d.ts +1 -1
- package/dist/views/CollectionView/CollectionCardView.d.ts +1 -1
- package/dist/views/CollectionView/CollectionKanbanView.d.ts +1 -1
- package/dist/views/CollectionView/CollectionListView.d.ts +1 -1
- package/dist/views/CollectionView/CollectionTableView.d.ts +1 -1
- package/dist/views/CollectionView/CollectionView.d.ts +1 -1
- package/dist/views/CollectionView/CollectionViewToolbar.d.ts +1 -1
- package/dist/views/CollectionView/CollectionViewTypes.d.ts +1 -1
- package/dist/views/CollectionView/DefaultCellRenderer.d.ts +1 -1
- package/dist/views/CollectionView/index.d.ts +8 -8
- package/dist/views/CollectionView/resolveTitleProperty.d.ts +1 -1
- package/dist/views/Kanban/Board.d.ts +1 -1
- package/dist/views/Kanban/BoardColumn.d.ts +1 -1
- package/dist/views/Kanban/BoardSortableList.d.ts +1 -1
- package/dist/views/Kanban/index.d.ts +5 -5
- package/dist/views/Kanban/placement.d.ts +1 -1
- package/dist/views/KanbanView.d.ts +1 -1
- package/dist/views/index.d.ts +4 -4
- package/package.json +2 -2
- package/src/components/TextField.tsx +10 -1
- package/src/components/common/SelectInputLabel.tsx +15 -1
- package/src/index.css +19 -7
- package/src/styles.ts +40 -4
- package/src/theme.css +51 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { ChipColorKey, ChipColorScheme } from "../util/chip_colors";
|
|
2
|
+
import type { ChipColorKey, ChipColorScheme } from "../util/chip_colors.js";
|
|
3
3
|
export type { ChipColorKey, ChipColorScheme };
|
|
4
4
|
export interface ChipProps {
|
|
5
5
|
className?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { TypographyProps, TypographyVariant } from "./Typography";
|
|
2
|
+
import { TypographyProps, TypographyVariant } from "./Typography.js";
|
|
3
3
|
export type DialogContentProps = TypographyProps & {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
hidden?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { VirtualTableProps } from "./VirtualTableProps";
|
|
2
|
+
import { VirtualTableProps } from "./VirtualTableProps.js";
|
|
3
3
|
/**
|
|
4
4
|
* `React.memo` is not generic-preserving: it takes the props type as its own
|
|
5
5
|
* type argument, so annotating the call with
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { CellRendererParams, VirtualTableColumn } from "./VirtualTableProps";
|
|
2
|
+
import { CellRendererParams, VirtualTableColumn } from "./VirtualTableProps.js";
|
|
3
3
|
type VirtualTableCellProps<T> = {
|
|
4
4
|
dataKey: string;
|
|
5
5
|
column: VirtualTableColumn;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { VirtualTableColumn, VirtualTableSort, VirtualTableWhereFilterOp } from "./VirtualTableProps";
|
|
2
|
+
import { VirtualTableColumn, VirtualTableSort, VirtualTableWhereFilterOp } from "./VirtualTableProps.js";
|
|
3
3
|
export type FilterFormFieldProps<CustomProps> = {
|
|
4
4
|
id: React.Key;
|
|
5
5
|
filterValue: [VirtualTableWhereFilterOp, unknown] | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { VirtualTableContextProps } from "./types";
|
|
2
|
+
import { VirtualTableContextProps } from "./types.js";
|
|
3
3
|
export declare const VirtualTableHeaderRow: ({ columns, sortIndex, onColumnSort, onFilterUpdate, filter, onColumnResize, onColumnResizeEnd, createFilterField, AddColumnComponent, onColumnsOrderChange, data, cellRenderer: CellRenderer, rowHeight, draggingColumnId, headerHeight }: VirtualTableContextProps<Record<string, unknown>>) => React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { FilterFormFieldProps } from "./VirtualTableHeader";
|
|
2
|
+
import type { FilterFormFieldProps } from "./VirtualTableHeader.js";
|
|
3
3
|
/** One sort key: the column, and which way it runs. */
|
|
4
4
|
export type VirtualTableSortKey = [string, "asc" | "desc"];
|
|
5
5
|
export type OnRowClickParams<T extends Record<string, unknown>> = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { VirtualTable } from "./VirtualTable";
|
|
2
|
-
export * from "./VirtualTableProps";
|
|
3
|
-
export type { FilterFormFieldProps } from "./VirtualTableHeader";
|
|
4
|
-
export * from "./selection/SelectionStore";
|
|
5
|
-
export * from "./selection/SelectionContext";
|
|
6
|
-
export * from "./fields/VirtualTableInput";
|
|
7
|
-
export * from "./fields/VirtualTableNumberInput";
|
|
8
|
-
export * from "./fields/VirtualTableSwitch";
|
|
9
|
-
export * from "./fields/VirtualTableDateField";
|
|
10
|
-
export * from "./fields/VirtualTableSelect";
|
|
1
|
+
export { VirtualTable } from "./VirtualTable.js";
|
|
2
|
+
export * from "./VirtualTableProps.js";
|
|
3
|
+
export type { FilterFormFieldProps } from "./VirtualTableHeader.js";
|
|
4
|
+
export * from "./selection/SelectionStore.js";
|
|
5
|
+
export * from "./selection/SelectionContext.js";
|
|
6
|
+
export * from "./fields/VirtualTableInput.js";
|
|
7
|
+
export * from "./fields/VirtualTableNumberInput.js";
|
|
8
|
+
export * from "./fields/VirtualTableSwitch.js";
|
|
9
|
+
export * from "./fields/VirtualTableDateField.js";
|
|
10
|
+
export * from "./fields/VirtualTableSelect.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { VirtualTableSelectionStore, SelectedCell } from "./SelectionStore";
|
|
2
|
+
import { VirtualTableSelectionStore, SelectedCell } from "./SelectionStore.js";
|
|
3
3
|
export interface VirtualTableSelectionContextProps<T extends SelectedCell = SelectedCell> {
|
|
4
4
|
selectionStore: VirtualTableSelectionStore<T>;
|
|
5
5
|
select: (cell: T | undefined) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { CellRendererParams, OnRowClickParams, OnVirtualTableColumnResizeParams, VirtualTableColumn, VirtualTableFilterValues, VirtualTableWhereFilterOp } from "./VirtualTableProps";
|
|
3
|
-
import { FilterFormFieldProps } from "./VirtualTableHeader";
|
|
2
|
+
import { CellRendererParams, OnRowClickParams, OnVirtualTableColumnResizeParams, VirtualTableColumn, VirtualTableFilterValues, VirtualTableWhereFilterOp } from "./VirtualTableProps.js";
|
|
3
|
+
import { FilterFormFieldProps } from "./VirtualTableHeader.js";
|
|
4
4
|
export type VirtualTableRowProps<T extends Record<string, unknown>> = {
|
|
5
5
|
style: React.CSSProperties;
|
|
6
6
|
rowHeight: number;
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The label above a Select or MultiSelect.
|
|
4
|
+
*
|
|
5
|
+
* It used `text-surface-accent-500` — a SURFACE scale, borrowed for type. The
|
|
6
|
+
* label above a TextField has always used `text-text-secondary`, and the two are
|
|
7
|
+
* the same role, so a form mixing the components showed two different label
|
|
8
|
+
* colours: `#64748b` blue-grey over a Select, `#757575` neutral over a TextField.
|
|
9
|
+
* Measured side by side on /debug/ui, which is where it is most obvious, because
|
|
10
|
+
* the reference puts them in adjacent columns.
|
|
11
|
+
*
|
|
12
|
+
* The text tokens are also the tuned ones: `--color-surface-500` was moved to
|
|
13
|
+
* #797979 precisely so muted type clears AA on both grounds. The slate scale
|
|
14
|
+
* carries no such guarantee — it is for surfaces.
|
|
15
|
+
*/
|
|
2
16
|
export declare function SelectInputLabel({ children, error }: {
|
|
3
17
|
children: React.ReactNode;
|
|
4
18
|
error?: boolean;
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
export * from "./Autocomplete";
|
|
2
|
-
export * from "./Alert";
|
|
3
|
-
export * from "./Avatar";
|
|
4
|
-
export * from "./BooleanSwitch";
|
|
5
|
-
export * from "./BooleanSwitchWithLabel";
|
|
6
|
-
export * from "./Button";
|
|
7
|
-
export * from "./Card";
|
|
8
|
-
export * from "./CenteredView";
|
|
9
|
-
export * from "./Container";
|
|
10
|
-
export * from "./Collapse";
|
|
11
|
-
export * from "./CircularProgress";
|
|
12
|
-
export * from "./CircularProgressCenter";
|
|
13
|
-
export * from "./ErrorBoundary";
|
|
14
|
-
export * from "./Checkbox";
|
|
15
|
-
export * from "./Chip";
|
|
16
|
-
export * from "./ColorPicker";
|
|
17
|
-
export * from "./DateTimeField";
|
|
18
|
-
export * from "./Dialog";
|
|
19
|
-
export * from "./DialogActions";
|
|
20
|
-
export * from "./DialogContent";
|
|
21
|
-
export * from "./DialogTitle";
|
|
22
|
-
export * from "./ExpandablePanel";
|
|
23
|
-
export * from "./FileUpload";
|
|
24
|
-
export * from "./FilterChip";
|
|
25
|
-
export * from "./IconButton";
|
|
26
|
-
export * from "./InputLabel";
|
|
27
|
-
export * from "./InfoLabel";
|
|
28
|
-
export * from "./Label";
|
|
29
|
-
export * from "./LoadingButton";
|
|
30
|
-
export * from "./Markdown";
|
|
31
|
-
export * from "./Menu";
|
|
32
|
-
export * from "./Menubar";
|
|
33
|
-
export * from "./MultiSelect";
|
|
34
|
-
export * from "./Paper";
|
|
35
|
-
export * from "./RadioGroup";
|
|
36
|
-
export * from "./ResizablePanels";
|
|
37
|
-
export * from "./SearchBar";
|
|
38
|
-
export * from "./Select";
|
|
39
|
-
export * from "./Separator";
|
|
40
|
-
export * from "./Slider";
|
|
41
|
-
export * from "./Sheet";
|
|
42
|
-
export * from "./TextareaAutosize";
|
|
43
|
-
export * from "./TextField";
|
|
44
|
-
export * from "./Tooltip";
|
|
45
|
-
export * from "./Typography";
|
|
46
|
-
export * from "./Tabs";
|
|
47
|
-
export * from "./Table";
|
|
48
|
-
export * from "./Popover";
|
|
49
|
-
export * from "./Badge";
|
|
50
|
-
export * from "./DebouncedTextField";
|
|
51
|
-
export * from "./Skeleton";
|
|
52
|
-
export * from "./ToggleButtonGroup";
|
|
53
|
-
export * from "./VirtualTable";
|
|
1
|
+
export * from "./Autocomplete.js";
|
|
2
|
+
export * from "./Alert.js";
|
|
3
|
+
export * from "./Avatar.js";
|
|
4
|
+
export * from "./BooleanSwitch.js";
|
|
5
|
+
export * from "./BooleanSwitchWithLabel.js";
|
|
6
|
+
export * from "./Button.js";
|
|
7
|
+
export * from "./Card.js";
|
|
8
|
+
export * from "./CenteredView.js";
|
|
9
|
+
export * from "./Container.js";
|
|
10
|
+
export * from "./Collapse.js";
|
|
11
|
+
export * from "./CircularProgress.js";
|
|
12
|
+
export * from "./CircularProgressCenter.js";
|
|
13
|
+
export * from "./ErrorBoundary.js";
|
|
14
|
+
export * from "./Checkbox.js";
|
|
15
|
+
export * from "./Chip.js";
|
|
16
|
+
export * from "./ColorPicker.js";
|
|
17
|
+
export * from "./DateTimeField.js";
|
|
18
|
+
export * from "./Dialog.js";
|
|
19
|
+
export * from "./DialogActions.js";
|
|
20
|
+
export * from "./DialogContent.js";
|
|
21
|
+
export * from "./DialogTitle.js";
|
|
22
|
+
export * from "./ExpandablePanel.js";
|
|
23
|
+
export * from "./FileUpload.js";
|
|
24
|
+
export * from "./FilterChip.js";
|
|
25
|
+
export * from "./IconButton.js";
|
|
26
|
+
export * from "./InputLabel.js";
|
|
27
|
+
export * from "./InfoLabel.js";
|
|
28
|
+
export * from "./Label.js";
|
|
29
|
+
export * from "./LoadingButton.js";
|
|
30
|
+
export * from "./Markdown.js";
|
|
31
|
+
export * from "./Menu.js";
|
|
32
|
+
export * from "./Menubar.js";
|
|
33
|
+
export * from "./MultiSelect.js";
|
|
34
|
+
export * from "./Paper.js";
|
|
35
|
+
export * from "./RadioGroup.js";
|
|
36
|
+
export * from "./ResizablePanels.js";
|
|
37
|
+
export * from "./SearchBar.js";
|
|
38
|
+
export * from "./Select.js";
|
|
39
|
+
export * from "./Separator.js";
|
|
40
|
+
export * from "./Slider.js";
|
|
41
|
+
export * from "./Sheet.js";
|
|
42
|
+
export * from "./TextareaAutosize.js";
|
|
43
|
+
export * from "./TextField.js";
|
|
44
|
+
export * from "./Tooltip.js";
|
|
45
|
+
export * from "./Typography.js";
|
|
46
|
+
export * from "./Tabs.js";
|
|
47
|
+
export * from "./Table.js";
|
|
48
|
+
export * from "./Popover.js";
|
|
49
|
+
export * from "./Badge.js";
|
|
50
|
+
export * from "./DebouncedTextField.js";
|
|
51
|
+
export * from "./Skeleton.js";
|
|
52
|
+
export * from "./ToggleButtonGroup.js";
|
|
53
|
+
export * from "./VirtualTable/index.js";
|
|
54
54
|
import * as Portal from "@radix-ui/react-portal";
|
|
55
55
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
56
56
|
export { Portal, PopoverPrimitive };
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./useInjectStyles";
|
|
2
|
-
export * from "./useOutsideAlerter";
|
|
3
|
-
export * from "./useDebouncedCallback";
|
|
4
|
-
export * from "./useDebounceCallback";
|
|
5
|
-
export * from "./useDebounceValue";
|
|
6
|
-
export * from "./PortalContainerContext";
|
|
1
|
+
export * from "./useInjectStyles.js";
|
|
2
|
+
export * from "./useOutsideAlerter.js";
|
|
3
|
+
export * from "./useDebouncedCallback.js";
|
|
4
|
+
export * from "./useDebounceCallback.js";
|
|
5
|
+
export * from "./useDebounceValue.js";
|
|
6
|
+
export * from "./PortalContainerContext.js";
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from "./icon_keys";
|
|
2
|
-
export * from "./cool_icon_keys";
|
|
3
|
-
export * from "./Icon";
|
|
4
|
-
export * from "./GitHubIcon";
|
|
5
|
-
export * from "./HandleIcon";
|
|
1
|
+
export * from "./icon_keys.js";
|
|
2
|
+
export * from "./cool_icon_keys.js";
|
|
3
|
+
export * from "./Icon.js";
|
|
4
|
+
export * from "./GitHubIcon.js";
|
|
5
|
+
export * from "./HandleIcon.js";
|
|
6
6
|
export type { LucideProps, LucideIcon } from "lucide-react";
|
|
7
|
-
export * from "./LucideIconByName";
|
|
7
|
+
export * from "./LucideIconByName.js";
|
|
8
8
|
/**
|
|
9
9
|
* lucide's full `icons` map, keyed by PascalCase name.
|
|
10
10
|
*
|
package/dist/index.css
CHANGED
|
@@ -48,17 +48,29 @@ html.dark {
|
|
|
48
48
|
|
|
49
49
|
With a single face carrying both headings and body, weight and tracking are
|
|
50
50
|
the only things separating a heading from the copy around it — so the tiers
|
|
51
|
-
have to actually differ, rather than all sitting at 600.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
have to actually differ, rather than all sitting at 600.
|
|
52
|
+
|
|
53
|
+
REVISED 2026-08-24. The ladder above described weight falling with size, but
|
|
54
|
+
the code ran 500/500/600/600/500/500 — a hump, where the LARGEST headings
|
|
55
|
+
were the LIGHTEST and h3 outweighed h1. Two rules were in play and neither
|
|
56
|
+
won cleanly. It is now monotonic: 600 for headings of consequence (h1-h4),
|
|
57
|
+
500 for small labels (h5/h6), 400 body. The display end still separates
|
|
58
|
+
itself by SIZE and tracking, which is what the paragraph above asks of it;
|
|
59
|
+
what it no longer does is separate itself by being *lighter* than the
|
|
60
|
+
smaller headings beneath it. 600 remains the ceiling. */
|
|
61
|
+
|
|
62
|
+
/* 600. This reverses the earlier "500, not 700" setting — not back toward 700,
|
|
63
|
+
which stays banned, but up to the ceiling the ladder already used for h3/h4.
|
|
64
|
+
The 500 was only ever visible in production: the dev-only TypeDevPanel has
|
|
65
|
+
shipped a `wd: 600` default that overrode this with !important, so every
|
|
66
|
+
local preview of this site has been 600 while rebase.pro rendered 500. The
|
|
67
|
+
panel's constant is now telling the truth. */
|
|
56
68
|
.typography-h1 {
|
|
57
|
-
@apply text-4xl font-headers font-
|
|
69
|
+
@apply text-4xl font-headers font-semibold tracking-display;
|
|
58
70
|
}
|
|
59
71
|
|
|
60
72
|
.typography-h2 {
|
|
61
|
-
@apply text-3xl font-headers font-
|
|
73
|
+
@apply text-3xl font-headers font-semibold tracking-display;
|
|
62
74
|
}
|
|
63
75
|
|
|
64
76
|
.typography-h3 {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export * from "./components";
|
|
2
|
-
export * from "./views";
|
|
3
|
-
export * from "./icons";
|
|
4
|
-
export * from "./styles";
|
|
5
|
-
export { cls } from "./util/cls";
|
|
6
|
-
export { lazyChunk, loadChunk, isChunkLoadError } from "./util/lazy_chunk";
|
|
7
|
-
export { CHIP_COLORS, CHIP_HUES, CHIP_SEED_KEYS, getColorSchemeForKey, getColorSchemeForSeed } from "./util/chip_colors";
|
|
8
|
-
export type { ChipHue, ChipTone } from "./util/chip_colors";
|
|
9
|
-
export { useOutsideAlerter } from "./hooks/useOutsideAlerter";
|
|
10
|
-
export { useDebouncedCallback } from "./hooks/useDebouncedCallback";
|
|
11
|
-
export { useDebounceCallback } from "./hooks/useDebounceCallback";
|
|
12
|
-
export { useDebounceValue } from "./hooks/useDebounceValue";
|
|
13
|
-
export { useInjectStyles } from "./hooks/useInjectStyles";
|
|
14
|
-
export { PortalContainerProvider, usePortalContainer } from "./hooks/PortalContainerContext";
|
|
15
|
-
export type { PortalContainerContextType, PortalContainerProviderProps } from "./hooks/PortalContainerContext";
|
|
16
|
-
export { debounce } from "./util/debounce";
|
|
17
|
-
export type { Cancelable } from "./util/debounce";
|
|
1
|
+
export * from "./components/index.js";
|
|
2
|
+
export * from "./views/index.js";
|
|
3
|
+
export * from "./icons/index.js";
|
|
4
|
+
export * from "./styles.js";
|
|
5
|
+
export { cls } from "./util/cls.js";
|
|
6
|
+
export { lazyChunk, loadChunk, isChunkLoadError } from "./util/lazy_chunk.js";
|
|
7
|
+
export { CHIP_COLORS, CHIP_HUES, CHIP_SEED_KEYS, getColorSchemeForKey, getColorSchemeForSeed } from "./util/chip_colors.js";
|
|
8
|
+
export type { ChipHue, ChipTone } from "./util/chip_colors.js";
|
|
9
|
+
export { useOutsideAlerter } from "./hooks/useOutsideAlerter.js";
|
|
10
|
+
export { useDebouncedCallback } from "./hooks/useDebouncedCallback.js";
|
|
11
|
+
export { useDebounceCallback } from "./hooks/useDebounceCallback.js";
|
|
12
|
+
export { useDebounceValue } from "./hooks/useDebounceValue.js";
|
|
13
|
+
export { useInjectStyles } from "./hooks/useInjectStyles.js";
|
|
14
|
+
export { PortalContainerProvider, usePortalContainer } from "./hooks/PortalContainerContext.js";
|
|
15
|
+
export type { PortalContainerContextType, PortalContainerProviderProps } from "./hooks/PortalContainerContext.js";
|
|
16
|
+
export { debounce } from "./util/debounce.js";
|
|
17
|
+
export type { Cancelable } from "./util/debounce.js";
|
package/dist/index.es.js
CHANGED
|
@@ -61,12 +61,44 @@ var controlPaddingMixin = {
|
|
|
61
61
|
};
|
|
62
62
|
var focusedDisabled = "focus-visible:ring-0 focus-visible:ring-offset-0";
|
|
63
63
|
var focusedInvisibleMixin = "focus:bg-opacity-70 focus:bg-surface-accent-100 focus:dark:bg-white/[0.07] focus:bg-surface-accent-100/70";
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
/**
|
|
65
|
+
* The focus ring — the single most-seen interaction state in the product, and
|
|
66
|
+
* until now the least tended.
|
|
67
|
+
*
|
|
68
|
+
* Three dead declarations were removed rather than reshuffled:
|
|
69
|
+
* `outline-hidden` + `outline-none` — the same instruction twice.
|
|
70
|
+
* `ring-primary` + `ring-primary/50` — the first could never win.
|
|
71
|
+
* `ring-opacity-50` — Tailwind v3 syntax. v4 expresses
|
|
72
|
+
* opacity with the `/50` slash form, so
|
|
73
|
+
* this generated nothing at all.
|
|
74
|
+
*
|
|
75
|
+
* What is left is the ring that was actually rendering, at 60% rather than 50%:
|
|
76
|
+
* on `surface-900` the old value sat close enough to the field's own border to
|
|
77
|
+
* be missed at a glance, which is the one thing a focus ring may not be.
|
|
78
|
+
* `ring-offset-0` + a transparent offset stay — without them the ring draws a
|
|
79
|
+
* white halo on dark surfaces.
|
|
80
|
+
*/
|
|
81
|
+
var focusedClasses = "z-30 outline-none ring-2 ring-primary/60 ring-offset-0 ring-offset-transparent";
|
|
82
|
+
/**
|
|
83
|
+
* Field surfaces.
|
|
84
|
+
*
|
|
85
|
+
* The inset top hairline is the whole difference between a field that reads as
|
|
86
|
+
* a filled rectangle and one that reads as recessed into the surface. It is a
|
|
87
|
+
* 1px inset highlight, not a gradient — the same device `.frame` already uses
|
|
88
|
+
* on the marketing site, and the flat-surface rule stands.
|
|
89
|
+
*
|
|
90
|
+
* Light mode gets none: on a white page the highlight has nothing to catch.
|
|
91
|
+
*/
|
|
92
|
+
var fieldBackgroundMixin = "bg-surface-accent-200/50 dark:bg-white/[0.055] dark:shadow-[inset_0_1px_0_rgb(255_255_255/0.045)]";
|
|
66
93
|
var fieldBackgroundInvisibleMixin = "bg-surface-accent-200/0 dark:bg-white/0";
|
|
67
94
|
var fieldBackgroundDisabledMixin = "bg-surface-accent-200/50 dark:bg-white/[0.03]";
|
|
68
|
-
|
|
69
|
-
|
|
95
|
+
/**
|
|
96
|
+
* `transition-colors` here, because every other interactive surface in the kit
|
|
97
|
+
* has it and fields did not — `cardClickableMixin` eases, a TextField snapped.
|
|
98
|
+
* On a form of eight fields that difference is the whole feel of the screen.
|
|
99
|
+
*/
|
|
100
|
+
var fieldBackgroundHoverMixin = "transition-colors duration-150 hover:bg-surface-accent-200/70 hover:dark:bg-white/[0.09]";
|
|
101
|
+
var defaultBorderMixin = "border-surface-200 dark:border-surface-700/60";
|
|
70
102
|
var paperMixin = "bg-white rounded-lg dark:bg-surface-900 border border-surface-200 dark:border-surface-700";
|
|
71
103
|
var cardMixin = "bg-white dark:bg-surface-900 rounded-xl border border-surface-200 dark:border-surface-700/60";
|
|
72
104
|
/**
|
|
@@ -2966,7 +2998,7 @@ var BooleanSwitchWithLabel = function BooleanSwitchWithLabel({ value, position =
|
|
|
2966
2998
|
"aria-disabled": disabled || void 0,
|
|
2967
2999
|
"aria-labelledby": label ? switchLabelId : void 0,
|
|
2968
3000
|
tabIndex: -1,
|
|
2969
|
-
className: cls(!invisible && "bg-surface-accent-200/50 dark:bg-white/[0.055]", !invisible && (disabled ? "bg-surface-accent-200/50 dark:bg-white/[0.03]" : "hover:bg-surface-accent-200/70 hover:dark:bg-white/[0.09]"), disabled ? "cursor-default" : "cursor-pointer", "rounded-lg max-w-full justify-between box-border relative inline-flex items-center", !invisible && focus && !disabled ? focusedClasses : "", error ? "text-red-500 dark:text-red-600" : focus && !disabled ? "text-primary" : !disabled ? "text-text-primary dark:text-text-primary-dark" : "text-text-secondary dark:text-text-secondary-dark", controlHeightMixin[size], size === "small" || size === "smallest" ? "pl-2" : "pl-4", size === "small" || size === "smallest" ? "pr-4" : "pr-6", position === "end" ? "flex-row-reverse" : "flex-row", fullWidth ? "w-full" : "", className),
|
|
3001
|
+
className: cls(!invisible && "bg-surface-accent-200/50 dark:bg-white/[0.055] dark:shadow-[inset_0_1px_0_rgb(255_255_255/0.045)]", !invisible && (disabled ? "bg-surface-accent-200/50 dark:bg-white/[0.03]" : "transition-colors duration-150 hover:bg-surface-accent-200/70 hover:dark:bg-white/[0.09]"), disabled ? "cursor-default" : "cursor-pointer", "rounded-lg max-w-full justify-between box-border relative inline-flex items-center", !invisible && focus && !disabled ? focusedClasses : "", error ? "text-red-500 dark:text-red-600" : focus && !disabled ? "text-primary" : !disabled ? "text-text-primary dark:text-text-primary-dark" : "text-text-secondary dark:text-text-secondary-dark", controlHeightMixin[size], size === "small" || size === "smallest" ? "pl-2" : "pl-4", size === "small" || size === "smallest" ? "pr-4" : "pr-6", position === "end" ? "flex-row-reverse" : "flex-row", fullWidth ? "w-full" : "", className),
|
|
2970
3002
|
onClick: disabled ? void 0 : (e) => {
|
|
2971
3003
|
if (props.allowIndeterminate) {
|
|
2972
3004
|
const onChange = onValueChange;
|
|
@@ -3928,7 +3960,7 @@ var DateTimeField = ({ value, label, onChange, disabled, clearable, mode = "date
|
|
|
3928
3960
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3929
3961
|
/* @__PURE__ */ jsx("style", { children: inputStyles }),
|
|
3930
3962
|
/* @__PURE__ */ jsxs("div", {
|
|
3931
|
-
className: cls("rounded-lg relative max-w-full", !invisible && "bg-surface-accent-200/50 dark:bg-white/[0.055]", disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, {
|
|
3963
|
+
className: cls("rounded-lg relative max-w-full", !invisible && "bg-surface-accent-200/50 dark:bg-white/[0.055] dark:shadow-[inset_0_1px_0_rgb(255_255_255/0.045)]", disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, {
|
|
3932
3964
|
"min-h-[28px]": size === "smallest",
|
|
3933
3965
|
"min-h-[32px]": size === "small",
|
|
3934
3966
|
"min-h-[40px]": size === "medium",
|
|
@@ -4164,7 +4196,7 @@ function ExpandablePanel({ title, children, invisible = false, expanded, onExpan
|
|
|
4164
4196
|
if (expanded !== void 0) setOpen(expanded);
|
|
4165
4197
|
}, [expanded]);
|
|
4166
4198
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Collapsible.Root, {
|
|
4167
|
-
className: cls(!invisible && "border-surface-200 dark:border-surface-700/60
|
|
4199
|
+
className: cls(!invisible && "border-surface-200 dark:border-surface-700/60 border", "rounded-lg", "w-full", className),
|
|
4168
4200
|
open,
|
|
4169
4201
|
onOpenChange: (updatedOpen) => {
|
|
4170
4202
|
onExpandedChange?.(updatedOpen);
|
|
@@ -4173,7 +4205,7 @@ function ExpandablePanel({ title, children, invisible = false, expanded, onExpan
|
|
|
4173
4205
|
children: [/* @__PURE__ */ jsx(Collapsible.Trigger, {
|
|
4174
4206
|
asChild: true,
|
|
4175
4207
|
children: /* @__PURE__ */ jsxs("div", {
|
|
4176
|
-
className: cls("rounded-t-lg flex items-center justify-between w-full min-h-[52px]", "hover:bg-surface-accent-200 hover:bg-opacity-40 hover:bg-surface-accent-200/40 dark:hover:bg-surface-800 dark:hover:bg-opacity-40 dark:hover:bg-surface-800/40 active:bg-surface-accent-300/50 dark:active:bg-surface-700/50", invisible ? "border-b px-2" : "p-4", open ? "py-6" : "py-4", "transition-all duration-200", invisible && "border-surface-200 dark:border-surface-700/60
|
|
4208
|
+
className: cls("rounded-t-lg flex items-center justify-between w-full min-h-[52px]", "hover:bg-surface-accent-200 hover:bg-opacity-40 hover:bg-surface-accent-200/40 dark:hover:bg-surface-800 dark:hover:bg-opacity-40 dark:hover:bg-surface-800/40 active:bg-surface-accent-300/50 dark:active:bg-surface-700/50", invisible ? "border-b px-2" : "p-4", open ? "py-6" : "py-4", "transition-all duration-200", invisible && "border-surface-200 dark:border-surface-700/60", asField && "bg-surface-accent-200/50 dark:bg-white/[0.055] dark:shadow-[inset_0_1px_0_rgb(255_255_255/0.045)]", titleClassName, "cursor-pointer"),
|
|
4177
4209
|
role: "button",
|
|
4178
4210
|
tabIndex: 0,
|
|
4179
4211
|
"aria-expanded": open,
|
|
@@ -4519,9 +4551,23 @@ function Separator({ orientation, decorative, className }) {
|
|
|
4519
4551
|
}
|
|
4520
4552
|
//#endregion
|
|
4521
4553
|
//#region src/components/common/SelectInputLabel.tsx
|
|
4554
|
+
/**
|
|
4555
|
+
* The label above a Select or MultiSelect.
|
|
4556
|
+
*
|
|
4557
|
+
* It used `text-surface-accent-500` — a SURFACE scale, borrowed for type. The
|
|
4558
|
+
* label above a TextField has always used `text-text-secondary`, and the two are
|
|
4559
|
+
* the same role, so a form mixing the components showed two different label
|
|
4560
|
+
* colours: `#64748b` blue-grey over a Select, `#757575` neutral over a TextField.
|
|
4561
|
+
* Measured side by side on /debug/ui, which is where it is most obvious, because
|
|
4562
|
+
* the reference puts them in adjacent columns.
|
|
4563
|
+
*
|
|
4564
|
+
* The text tokens are also the tuned ones: `--color-surface-500` was moved to
|
|
4565
|
+
* #797979 precisely so muted type clears AA on both grounds. The slate scale
|
|
4566
|
+
* carries no such guarantee — it is for surfaces.
|
|
4567
|
+
*/
|
|
4522
4568
|
function SelectInputLabel({ children, error }) {
|
|
4523
4569
|
return /* @__PURE__ */ jsx("div", {
|
|
4524
|
-
className: cls("text-sm font-medium ml-3.5 mb-1", error ? "text-red-600 dark:text-red-500" : "text-
|
|
4570
|
+
className: cls("text-sm font-medium ml-3.5 mb-1", error ? "text-red-600 dark:text-red-500" : "text-text-secondary dark:text-text-secondary-dark"),
|
|
4525
4571
|
children
|
|
4526
4572
|
});
|
|
4527
4573
|
}
|
|
@@ -4863,7 +4909,7 @@ function ResizablePanels({ firstPanel, secondPanel, showFirstPanel = true, showS
|
|
|
4863
4909
|
children: firstPanel
|
|
4864
4910
|
}),
|
|
4865
4911
|
!stacked && showFirstPanel && showSecondPanel && /* @__PURE__ */ jsx("div", {
|
|
4866
|
-
className: cls("relative z-10 flex flex-shrink-0 items-center justify-center", "border-surface-200 dark:border-surface-700/60
|
|
4912
|
+
className: cls("relative z-10 flex flex-shrink-0 items-center justify-center", "border-surface-200 dark:border-surface-700/60", isHorizontal ? "border-l w-px h-full cursor-col-resize" : "border-t h-px w-full cursor-row-resize"),
|
|
4867
4913
|
onMouseDown: handleResizeStart,
|
|
4868
4914
|
children: /* @__PURE__ */ jsx("div", {
|
|
4869
4915
|
className: cls("absolute flex items-center justify-center group", isHorizontal ? "w-4 h-full cursor-col-resize top-0" : "h-4 w-full cursor-row-resize left-0"),
|
|
@@ -5449,7 +5495,7 @@ var TextField = forwardRef(({ value, onChange, label, type = "text", multiline =
|
|
|
5449
5495
|
label && /* @__PURE__ */ jsx(InputLabel, {
|
|
5450
5496
|
id: labelId,
|
|
5451
5497
|
htmlFor: inputId,
|
|
5452
|
-
className: cls("pointer-events-none absolute", size === "large" ? "top-1" : "top-[-1px]", !error ? focused ? "text-primary dark:text-primary" : "text-text-secondary dark:text-text-secondary-dark" : "text-red-500 dark:text-red-600", disabled ? "
|
|
5498
|
+
className: cls("pointer-events-none absolute", size === "large" ? "top-1" : "top-[-1px]", !error ? focused ? "text-primary dark:text-primary" : "text-text-secondary dark:text-text-secondary-dark" : "text-red-500 dark:text-red-600", disabled ? "text-text-disabled dark:text-text-disabled-dark" : ""),
|
|
5453
5499
|
shrink: hasValue || focused,
|
|
5454
5500
|
children: label
|
|
5455
5501
|
}),
|
|
@@ -5520,7 +5566,7 @@ function Tabs({ value, onValueChange, className, innerClassName, variant = "stan
|
|
|
5520
5566
|
disabled: !showLeftScroll,
|
|
5521
5567
|
"aria-label": "Scroll tabs left",
|
|
5522
5568
|
onClick: () => scroll("left"),
|
|
5523
|
-
className: cls("absolute left-0 top-1/2 -translate-y-1/2 z-10 flex items-center justify-center rounded-md transition-all h-8 w-6", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-surface-400", !showLeftScroll ? "pointer-events-none opacity-0" : "text-surface-600 dark:text-surface-400 hover:bg-surface-accent-200 dark:hover:bg-surface-accent-800", "bg-surface-50 dark:bg-surface-900 border shadow-sm", "border-surface-200 dark:border-surface-700/60
|
|
5569
|
+
className: cls("absolute left-0 top-1/2 -translate-y-1/2 z-10 flex items-center justify-center rounded-md transition-all h-8 w-6", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-surface-400", !showLeftScroll ? "pointer-events-none opacity-0" : "text-surface-600 dark:text-surface-400 hover:bg-surface-accent-200 dark:hover:bg-surface-accent-800", "bg-surface-50 dark:bg-surface-900 border shadow-sm", "border-surface-200 dark:border-surface-700/60"),
|
|
5524
5570
|
children: /* @__PURE__ */ jsx(ChevronLeftIcon$1, { size: iconSize.smallest })
|
|
5525
5571
|
}),
|
|
5526
5572
|
/* @__PURE__ */ jsx("div", {
|
|
@@ -5532,7 +5578,7 @@ function Tabs({ value, onValueChange, className, innerClassName, variant = "stan
|
|
|
5532
5578
|
msOverflowStyle: "none"
|
|
5533
5579
|
},
|
|
5534
5580
|
children: /* @__PURE__ */ jsx(TabsPrimitive.List, {
|
|
5535
|
-
className: cls(variant === "standard" && "inline-flex h-9 items-center justify-start rounded-md bg-surface-50 p-1 text-surface-600 dark:bg-surface-900 dark:text-surface-400 gap-2 border", variant === "standard" && "border-surface-200 dark:border-surface-700/60
|
|
5581
|
+
className: cls(variant === "standard" && "inline-flex h-9 items-center justify-start rounded-md bg-surface-50 p-1 text-surface-600 dark:bg-surface-900 dark:text-surface-400 gap-2 border", variant === "standard" && "border-surface-200 dark:border-surface-700/60", variant === "boxy" && "flex items-center h-full", variant === "pill" && "flex items-center gap-0.5", innerClassName),
|
|
5536
5582
|
children
|
|
5537
5583
|
})
|
|
5538
5584
|
}),
|
|
@@ -5541,7 +5587,7 @@ function Tabs({ value, onValueChange, className, innerClassName, variant = "stan
|
|
|
5541
5587
|
disabled: !showRightScroll,
|
|
5542
5588
|
"aria-label": "Scroll tabs right",
|
|
5543
5589
|
onClick: () => scroll("right"),
|
|
5544
|
-
className: cls("absolute right-0 top-1/2 -translate-y-1/2 z-10 flex items-center justify-center rounded-md transition-all h-8 w-6", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-surface-400", !showRightScroll ? "pointer-events-none opacity-0" : "text-surface-600 dark:text-surface-400 hover:bg-surface-accent-200 dark:hover:bg-surface-accent-800", "bg-surface-50 dark:bg-surface-900 border shadow-sm", "border-surface-200 dark:border-surface-700/60
|
|
5590
|
+
className: cls("absolute right-0 top-1/2 -translate-y-1/2 z-10 flex items-center justify-center rounded-md transition-all h-8 w-6", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-surface-400", !showRightScroll ? "pointer-events-none opacity-0" : "text-surface-600 dark:text-surface-400 hover:bg-surface-accent-200 dark:hover:bg-surface-accent-800", "bg-surface-50 dark:bg-surface-900 border shadow-sm", "border-surface-200 dark:border-surface-700/60"),
|
|
5545
5591
|
children: /* @__PURE__ */ jsx(ChevronRightIcon$1, { size: iconSize.smallest })
|
|
5546
5592
|
})
|
|
5547
5593
|
]
|
|
@@ -8465,7 +8511,7 @@ function CollectionCardView({ dataController, properties, propertiesOrder, idPro
|
|
|
8465
8511
|
src: imageValue,
|
|
8466
8512
|
alt: "",
|
|
8467
8513
|
className: "w-full h-32 object-cover rounded-t-lg"
|
|
8468
|
-
}) : /* @__PURE__ */ jsx("div", { className: cls("h-24 rounded-t-lg", "bg-surface-accent-200/50 dark:bg-white/[0.055]") })),
|
|
8514
|
+
}) : /* @__PURE__ */ jsx("div", { className: cls("h-24 rounded-t-lg", "bg-surface-accent-200/50 dark:bg-white/[0.055] dark:shadow-[inset_0_1px_0_rgb(255_255_255/0.045)]") })),
|
|
8469
8515
|
selectionEnabled && /* @__PURE__ */ jsx("div", {
|
|
8470
8516
|
className: "absolute top-2 right-2",
|
|
8471
8517
|
onClick: (e) => e.stopPropagation(),
|