@wallarm-org/design-system 0.87.1 → 0.88.1-rc-fix-status-code-zero-value.1
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/Alert/Alert.d.ts +1 -1
- package/dist/components/AnimatedBackground/pixel/module/celebration.d.ts +2 -2
- package/dist/components/AnimatedBackground/pixel/module/game-logic.d.ts +1 -1
- package/dist/components/AppShell/story-content/_storyLib.d.ts +1 -1
- package/dist/components/Badge/classes.d.ts +2 -2
- package/dist/components/Badge/constants.d.ts +26 -26
- package/dist/components/Banner/classes.d.ts +4 -4
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/ButtonBase/classes.d.ts +1 -1
- package/dist/components/Calendar/CalendarContext.d.ts +4 -4
- package/dist/components/Calendar/CalendarTrigger.d.ts +4 -12
- package/dist/components/Calendar/const.d.ts +2 -2
- package/dist/components/Checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/components/Code/Code.d.ts +3 -3
- package/dist/components/CodeSnippet/CodeSnippetRoot.d.ts +5 -8
- package/dist/components/CodeSnippet/lib/httpFolds.d.ts +2 -2
- package/dist/components/Country/Country.d.ts +1 -1
- package/dist/components/Country/CountryFlag.d.ts +1 -1
- package/dist/components/Country/countries.d.ts +497 -497
- package/dist/components/DropdownMenu/classes.d.ts +1 -1
- package/dist/components/DropdownMenu/classes.js +1 -1
- package/dist/components/Field/Field.d.ts +1 -1
- package/dist/components/FilterInput/FilterInputField/FilterInputChip/classes.d.ts +1 -1
- package/dist/components/FilterInput/FilterInputField/FilterInputChip/segmentVariant.d.ts +3 -3
- package/dist/components/FilterInput/FilterInputMenu/FilterInputValueMenu/FlatValueMenu.js +1 -0
- package/dist/components/FilterInput/FilterInputMenu/FilterInputValueMenu/NestedValueMenuItem.js +1 -26
- package/dist/components/FilterInput/FilterInputMenu/FilterInputValueMenu/ValueMenuItem.d.ts +2 -0
- package/dist/components/FilterInput/FilterInputMenu/FilterInputValueMenu/ValueMenuItem.js +4 -3
- package/dist/components/FilterInput/FilterInputMenu/FilterInputValueMenu/highlightMatch.d.ts +11 -0
- package/dist/components/FilterInput/FilterInputMenu/FilterInputValueMenu/highlightMatch.js +28 -0
- package/dist/components/FilterInput/FilterInputMenu/FilterInputValueMenu/useNestedValueMenuState.js +2 -2
- package/dist/components/FilterInput/FilterInputMenu/FilterInputValueMenu/valueOptionSearchText.d.ts +1 -1
- package/dist/components/FilterInput/hooks/useFilterInputAutocomplete/lib/valueResolution.d.ts +1 -1
- package/dist/components/FilterInput/hooks/useFilterInputAutocomplete/useChipCascade.d.ts +1 -1
- package/dist/components/FilterInput/hooks/useFilterInputAutocomplete/useFilterInputAutocomplete.d.ts +2 -2
- package/dist/components/FilterInput/hooks/useFilterInputAutocomplete/useMenuPositioning.d.ts +1 -1
- package/dist/components/FilterInput/hooks/useFilterInputExpression/buildChips.d.ts +1 -1
- package/dist/components/FilterInput/hooks/useFilterInputExpression/buildChips.js +1 -1
- package/dist/components/FilterInput/hooks/useFilterInputExpression/expression.d.ts +2 -2
- package/dist/components/FilterInput/hooks/useFilterInputExpression/useFilterInputExpression.d.ts +2 -2
- package/dist/components/FilterInput/hooks/useFilterInputPositioning.d.ts +1 -1
- package/dist/components/FilterInput/hooks/useFilterInputSelection/lib/serialize.d.ts +1 -1
- package/dist/components/FilterInput/lib/applyKnownFieldHelpers.d.ts +1 -1
- package/dist/components/FilterInput/lib/collapseValuesToLabels.d.ts +20 -18
- package/dist/components/FilterInput/lib/collapseValuesToLabels.js +12 -19
- package/dist/components/FilterInput/lib/conditions.d.ts +2 -2
- package/dist/components/FilterInput/lib/constants.d.ts +6 -3
- package/dist/components/FilterInput/lib/constants.js +1 -1
- package/dist/components/FilterInput/lib/index.d.ts +1 -1
- package/dist/components/FilterInput/lib/index.js +1 -1
- package/dist/components/FilterInput/lib/statusCode/createStatusCodeNormalizer.d.ts +3 -1
- package/dist/components/FilterInput/lib/statusCode/createStatusCodeNormalizer.js +2 -0
- package/dist/components/FilterInput/lib/statusCode/createStatusCodeSerializer.d.ts +3 -1
- package/dist/components/FilterInput/lib/statusCode/createStatusCodeSerializer.js +2 -0
- package/dist/components/FilterInput/lib/statusCode/createStatusCodeSuggestions.js +2 -2
- package/dist/components/FilterInput/lib/statusCode/createStatusCodeValidator.d.ts +4 -0
- package/dist/components/FilterInput/lib/statusCode/createStatusCodeValidator.js +2 -1
- package/dist/components/FilterInput/lib/statusCode/utils/constants.d.ts +6 -0
- package/dist/components/FilterInput/lib/statusCode/utils/constants.js +2 -1
- package/dist/components/FilterInput/lib/statusCode/utils/index.d.ts +1 -1
- package/dist/components/FilterInput/lib/statusCode/utils/index.js +1 -1
- package/dist/components/FilterInput/lib/statusCode/utils/makeMask.d.ts +3 -1
- package/dist/components/FilterInput/lib/statusCode/utils/makeMask.js +12 -1
- package/dist/components/FilterInput/lib/validation.d.ts +1 -1
- package/dist/components/Flex/Flex.d.ts +6 -6
- package/dist/components/Heading/Heading.d.ts +3 -3
- package/dist/components/InlineEdit/InlineEditSelect.d.ts +4 -4
- package/dist/components/Input/classes.d.ts +1 -1
- package/dist/components/InputGroup/InputGroup.d.ts +1 -1
- package/dist/components/InputGroup/InputGroupAddon.d.ts +2 -2
- package/dist/components/Ip/constants.d.ts +21 -21
- package/dist/components/Kbd/Kbd.d.ts +1 -1
- package/dist/components/Link/classes.d.ts +3 -3
- package/dist/components/Loader/Loader.d.ts +2 -2
- package/dist/components/Logo/classes.d.ts +1 -1
- package/dist/components/NumberInput/classes.d.ts +4 -4
- package/dist/components/NumericBadge/classes.d.ts +2 -2
- package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +4 -8
- package/dist/components/OverflowTooltip/OverflowTooltipContent.d.ts +4 -7
- package/dist/components/Pagination/classes.d.ts +2 -2
- package/dist/components/ParameterPath/constants.d.ts +7 -7
- package/dist/components/Progress/classes.d.ts +2 -2
- package/dist/components/Progress/constants.d.ts +22 -22
- package/dist/components/Radio/RadioGroup.d.ts +1 -1
- package/dist/components/SegmentedControl/SegmentedControlSeparator.d.ts +1 -1
- package/dist/components/Select/Select.d.ts +4 -4
- package/dist/components/Select/SelectInput/SelectInputOverflowRenderer.d.ts +1 -1
- package/dist/components/Selection/Selection.d.ts +4 -4
- package/dist/components/Separator/Separator.d.ts +1 -1
- package/dist/components/SimpleCharts/BarList/classes.d.ts +3 -3
- package/dist/components/SimpleCharts/LineChart/constants.d.ts +2 -2
- package/dist/components/SimpleCharts/PieChart/classes.d.ts +2 -2
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/SplashScreen/classes.d.ts +4 -4
- package/dist/components/Stack/Stack.d.ts +5 -5
- package/dist/components/Table/EditableCell/EditableSelectCell.d.ts +28 -0
- package/dist/components/Table/EditableCell/EditableSelectCell.js +66 -0
- package/dist/components/Table/EditableCell/EditableTextCell.d.ts +22 -0
- package/dist/components/Table/EditableCell/EditableTextCell.js +78 -0
- package/dist/components/Table/EditableCell/classes.d.ts +11 -0
- package/dist/components/Table/EditableCell/classes.js +17 -0
- package/dist/components/Table/EditableCell/constants.d.ts +19 -0
- package/dist/components/Table/EditableCell/constants.js +4 -0
- package/dist/components/Table/EditableCell/index.d.ts +4 -0
- package/dist/components/Table/EditableCell/index.js +4 -0
- package/dist/components/Table/Table.d.ts +4 -4
- package/dist/components/Table/TableBody/TableBodyCell.d.ts +4 -4
- package/dist/components/Table/TableColumnMenu/TableColumnMenu.d.ts +4 -16
- package/dist/components/Table/TableHeadCell.d.ts +4 -4
- package/dist/components/Table/TableImperativeBridge.d.ts +4 -9
- package/dist/components/Table/TableMasterCellActions.d.ts +4 -4
- package/dist/components/Table/TableResizeHandler.d.ts +4 -4
- package/dist/components/Table/TableRow.d.ts +1 -1
- package/dist/components/Table/TableRowExpanded.d.ts +4 -4
- package/dist/components/Table/TableSettingsMenu/TableSettingsMenuItem.d.ts +4 -4
- package/dist/components/Table/TableSortHandler.d.ts +4 -4
- package/dist/components/Table/TableSortTrigger.d.ts +4 -19
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Table/index.js +1 -0
- package/dist/components/Table/lib/detectDataChange.d.ts +1 -1
- package/dist/components/Table/lib/isLastPinnedLeft.d.ts +2 -2
- package/dist/components/Tabs/classes.d.ts +1 -1
- package/dist/components/Text/Text.d.ts +5 -5
- package/dist/components/Textarea/classes.d.ts +2 -2
- package/dist/components/Toast/Toast.d.ts +4 -4
- package/dist/components/Toast/ToastClose.d.ts +4 -4
- package/dist/components/Toast/useToast.d.ts +4 -4
- package/dist/components/ToggleButton/ToggleButton.d.ts +1 -1
- package/dist/components/Tour/lib/waitForStepEvent.d.ts +1 -1
- package/dist/components/WallyIcon/classes.d.ts +1 -1
- package/dist/icons/SvgIcon.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/metadata/components.json +627 -13
- package/dist/utils/hasNonTextEnd.d.ts +1 -1
- package/dist/utils/isIconOnly.d.ts +1 -1
- package/package.json +15 -17
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { Select } from "@ark-ui/react/select";
|
|
4
|
+
import { cn } from "../../../utils/cn.js";
|
|
5
|
+
import { useTestId } from "../../../utils/testId.js";
|
|
6
|
+
import { Select as index_js_Select, SelectContent, SelectOption, SelectOptionIndicator, SelectOptionText, SelectPositioner, createListCollection } from "../../Select/index.js";
|
|
7
|
+
import { editableCellPlaceholder, editableCellValue, editableCellVariants } from "./classes.js";
|
|
8
|
+
const EditableSelectCell = ({ value, onCommit, items, children, placeholder = 'Select…', className, ref, 'data-testid': testIdProp, ...rest })=>{
|
|
9
|
+
const testId = useTestId(void 0, testIdProp);
|
|
10
|
+
const collection = useMemo(()=>createListCollection({
|
|
11
|
+
items
|
|
12
|
+
}), [
|
|
13
|
+
items
|
|
14
|
+
]);
|
|
15
|
+
const hasValue = null != value && '' !== value;
|
|
16
|
+
return /*#__PURE__*/ jsxs(index_js_Select, {
|
|
17
|
+
className: "h-full",
|
|
18
|
+
collection: collection,
|
|
19
|
+
value: hasValue ? [
|
|
20
|
+
value
|
|
21
|
+
] : [],
|
|
22
|
+
"data-testid": testId,
|
|
23
|
+
onValueChange: (details)=>{
|
|
24
|
+
const next = details.value[0];
|
|
25
|
+
if (next && next !== value) onCommit(next);
|
|
26
|
+
},
|
|
27
|
+
children: [
|
|
28
|
+
/*#__PURE__*/ jsx(Select.Control, {
|
|
29
|
+
className: "h-full",
|
|
30
|
+
children: /*#__PURE__*/ jsx(Select.Trigger, {
|
|
31
|
+
asChild: true,
|
|
32
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
33
|
+
...rest,
|
|
34
|
+
ref: ref,
|
|
35
|
+
"data-slot": "editable-select-cell",
|
|
36
|
+
className: cn(editableCellVariants({
|
|
37
|
+
state: 'idle'
|
|
38
|
+
}), 'data-[state=open]:border-border-strong-brand data-[state=open]:bg-bg-surface-1 data-[state=open]:hover:bg-bg-surface-1', className),
|
|
39
|
+
children: hasValue ? /*#__PURE__*/ jsx("span", {
|
|
40
|
+
className: editableCellValue,
|
|
41
|
+
children: children
|
|
42
|
+
}) : /*#__PURE__*/ jsx("span", {
|
|
43
|
+
className: editableCellPlaceholder,
|
|
44
|
+
children: placeholder
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ jsx(SelectPositioner, {
|
|
50
|
+
children: /*#__PURE__*/ jsx(SelectContent, {
|
|
51
|
+
children: items.map((item)=>/*#__PURE__*/ jsxs(SelectOption, {
|
|
52
|
+
item: item,
|
|
53
|
+
children: [
|
|
54
|
+
/*#__PURE__*/ jsx(SelectOptionText, {
|
|
55
|
+
children: item.label
|
|
56
|
+
}),
|
|
57
|
+
/*#__PURE__*/ jsx(SelectOptionIndicator, {})
|
|
58
|
+
]
|
|
59
|
+
}, item.value))
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
EditableSelectCell.displayName = 'EditableSelectCell';
|
|
66
|
+
export { EditableSelectCell };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { FC, HTMLAttributes, Ref } from 'react';
|
|
2
|
+
import { type TestableProps } from '../../../utils/testId';
|
|
3
|
+
type NativeProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
|
|
4
|
+
export interface EditableTextCellProps extends NativeProps, TestableProps {
|
|
5
|
+
/** Current committed value. */
|
|
6
|
+
value: string;
|
|
7
|
+
/** Called with the new value on Enter / blur (only when it actually changed). */
|
|
8
|
+
onCommit: (value: string) => void;
|
|
9
|
+
ref?: Ref<HTMLDivElement>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Inline-editable text cell for the DataTable. Idle it reads as text (the whole
|
|
13
|
+
* cell highlights on hover); click / Enter / Space swaps in a borderless input
|
|
14
|
+
* in the exact same position (brand-orange border, no layout shift). Enter or
|
|
15
|
+
* blur commits, Escape reverts.
|
|
16
|
+
*
|
|
17
|
+
* Analytics-ready: arbitrary `data-*` / `aria-*` / `id` / event props (e.g.
|
|
18
|
+
* `data-analytics-id`) land on the persistent cell element, so they resolve via
|
|
19
|
+
* `closest()` whether the read view or the input is the active target.
|
|
20
|
+
*/
|
|
21
|
+
export declare const EditableTextCell: FC<EditableTextCellProps>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Pencil } from "../../../icons/index.js";
|
|
4
|
+
import { cn } from "../../../utils/cn.js";
|
|
5
|
+
import { useTestId } from "../../../utils/testId.js";
|
|
6
|
+
import { editableCellIcon, editableCellInput, editableCellValue, editableCellVariants } from "./classes.js";
|
|
7
|
+
const EditableTextCell = ({ value, onCommit, className, ref, 'data-testid': testIdProp, 'aria-label': ariaLabel, onClick, onKeyDown, ...rest })=>{
|
|
8
|
+
const testId = useTestId(void 0, testIdProp);
|
|
9
|
+
const [isEditing, setIsEditing] = useState(false);
|
|
10
|
+
const [draft, setDraft] = useState(value);
|
|
11
|
+
const start = ()=>{
|
|
12
|
+
setDraft(value);
|
|
13
|
+
setIsEditing(true);
|
|
14
|
+
};
|
|
15
|
+
const commit = ()=>{
|
|
16
|
+
setIsEditing(false);
|
|
17
|
+
if (draft !== value) onCommit(draft);
|
|
18
|
+
};
|
|
19
|
+
const cancel = ()=>{
|
|
20
|
+
setIsEditing(false);
|
|
21
|
+
setDraft(value);
|
|
22
|
+
};
|
|
23
|
+
return /*#__PURE__*/ jsx("div", {
|
|
24
|
+
...rest,
|
|
25
|
+
ref: ref,
|
|
26
|
+
"data-slot": "editable-text-cell",
|
|
27
|
+
"data-testid": testId,
|
|
28
|
+
"data-editing": isEditing || void 0,
|
|
29
|
+
className: cn(editableCellVariants({
|
|
30
|
+
state: isEditing ? 'active' : 'idle'
|
|
31
|
+
}), className),
|
|
32
|
+
role: isEditing ? void 0 : 'button',
|
|
33
|
+
tabIndex: isEditing ? void 0 : 0,
|
|
34
|
+
"aria-label": isEditing ? void 0 : ariaLabel,
|
|
35
|
+
onClick: (event)=>{
|
|
36
|
+
onClick?.(event);
|
|
37
|
+
if (!isEditing) start();
|
|
38
|
+
},
|
|
39
|
+
onKeyDown: (event)=>{
|
|
40
|
+
onKeyDown?.(event);
|
|
41
|
+
if (!isEditing && ('Enter' === event.key || ' ' === event.key)) {
|
|
42
|
+
event.preventDefault();
|
|
43
|
+
start();
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
children: isEditing ? /*#__PURE__*/ jsx("input", {
|
|
47
|
+
autoFocus: true,
|
|
48
|
+
"aria-label": ariaLabel,
|
|
49
|
+
value: draft,
|
|
50
|
+
"data-testid": testId ? `${testId}--input` : void 0,
|
|
51
|
+
onChange: (event)=>setDraft(event.currentTarget.value),
|
|
52
|
+
onFocus: (event)=>event.currentTarget.select(),
|
|
53
|
+
onBlur: commit,
|
|
54
|
+
onKeyDown: (event)=>{
|
|
55
|
+
if ('Enter' === event.key) {
|
|
56
|
+
event.preventDefault();
|
|
57
|
+
commit();
|
|
58
|
+
} else if ('Escape' === event.key) {
|
|
59
|
+
event.preventDefault();
|
|
60
|
+
cancel();
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
className: editableCellInput
|
|
64
|
+
}) : /*#__PURE__*/ jsxs(Fragment, {
|
|
65
|
+
children: [
|
|
66
|
+
/*#__PURE__*/ jsx("span", {
|
|
67
|
+
className: editableCellValue,
|
|
68
|
+
children: value
|
|
69
|
+
}),
|
|
70
|
+
/*#__PURE__*/ jsx(Pencil, {
|
|
71
|
+
className: cn(editableCellIcon, 'opacity-0 transition-opacity group-hover/cell:opacity-100')
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
})
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
EditableTextCell.displayName = 'EditableTextCell';
|
|
78
|
+
export { EditableTextCell };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const editableCellVariants: (props?: ({
|
|
2
|
+
state?: "active" | "idle" | null | undefined;
|
|
3
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
4
|
+
/** Value slot — truncates, takes the free space, leaves room for the trailing icon. */
|
|
5
|
+
export declare const editableCellValue = "min-w-0 flex-1 truncate";
|
|
6
|
+
/** Same as the value slot but muted, for the empty-state placeholder. */
|
|
7
|
+
export declare const editableCellPlaceholder = "min-w-0 flex-1 truncate text-text-secondary";
|
|
8
|
+
/** Trailing affordance icon (pencil / chevron). */
|
|
9
|
+
export declare const editableCellIcon = "size-16 shrink-0 text-text-secondary";
|
|
10
|
+
/** Borderless in-place text editor — inherits the cell's typography and inset. */
|
|
11
|
+
export declare const editableCellInput = "min-w-0 flex-1 bg-transparent p-0 text-sm text-text-primary outline-none";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
const editableCellVariants = cva("group/cell flex h-full w-full items-center gap-8 px-16 py-8 border border-transparent text-left text-sm text-text-primary cursor-pointer outline-none transition-colors", {
|
|
3
|
+
variants: {
|
|
4
|
+
state: {
|
|
5
|
+
idle: 'hover:bg-states-primary-hover active:bg-states-primary-pressed',
|
|
6
|
+
active: 'border-border-strong-brand bg-bg-surface-1'
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
defaultVariants: {
|
|
10
|
+
state: 'idle'
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
const editableCellValue = 'min-w-0 flex-1 truncate';
|
|
14
|
+
const editableCellPlaceholder = 'min-w-0 flex-1 truncate text-text-secondary';
|
|
15
|
+
const editableCellIcon = 'size-16 shrink-0 text-text-secondary';
|
|
16
|
+
const editableCellInput = 'min-w-0 flex-1 bg-transparent p-0 text-sm text-text-primary outline-none';
|
|
17
|
+
export { editableCellIcon, editableCellInput, editableCellPlaceholder, editableCellValue, editableCellVariants };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spread onto an editable column's `meta` so `EditableTextCell` /
|
|
3
|
+
* `EditableSelectCell` can own the whole body cell:
|
|
4
|
+
*
|
|
5
|
+
* - `p-0` removes the body-cell padding (the shell re-applies its own), so the
|
|
6
|
+
* hover fill and the editing border reach the cell edges.
|
|
7
|
+
* - `h-[1px]` gives the cell a definite height. A percentage height (`h-full`
|
|
8
|
+
* on the shell) only resolves against a parent with a resolvable height; a
|
|
9
|
+
* bare table cell is `height: auto`, so the shell would sit top-aligned and
|
|
10
|
+
* leave a gap. The `1px` acts as a minimum the row grows past, and the
|
|
11
|
+
* shell's `h-full` then resolves against the real row height (the standard
|
|
12
|
+
* "fill a table-cell height" trick).
|
|
13
|
+
*
|
|
14
|
+
* Use on a NON-master column — the first/master column is pinned, cut and
|
|
15
|
+
* truncated by the Table and is not a clean host for a full-bleed editable cell.
|
|
16
|
+
*/
|
|
17
|
+
export declare const EDITABLE_CELL_COLUMN_META: {
|
|
18
|
+
readonly cellClassName: 'h-[1px] p-0';
|
|
19
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { editableCellVariants } from './classes';
|
|
2
|
+
export { EDITABLE_CELL_COLUMN_META } from './constants';
|
|
3
|
+
export { EditableSelectCell, type EditableSelectCellProps } from './EditableSelectCell';
|
|
4
|
+
export { EditableTextCell, type EditableTextCellProps } from './EditableTextCell';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TableProps } from './types';
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
displayName: string;
|
|
5
|
-
}
|
|
2
|
+
export declare function Table<T>(props: TableProps<T>): import("react").JSX.Element;
|
|
3
|
+
export declare namespace Table {
|
|
4
|
+
var displayName: string;
|
|
5
|
+
}
|
|
@@ -5,8 +5,8 @@ interface TableBodyCellProps<T> {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
disablePinnedShadow?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export declare
|
|
9
|
-
|
|
10
|
-
displayName: string;
|
|
11
|
-
}
|
|
8
|
+
export declare function TableBodyCell<T>({ cell, colSpan, className, disablePinnedShadow, }: TableBodyCellProps<T>): import("react").JSX.Element;
|
|
9
|
+
export declare namespace TableBodyCell {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
12
12
|
export {};
|
|
@@ -18,20 +18,8 @@ export interface TableColumnMenuProps<T = unknown> extends Omit<ButtonHTMLAttrib
|
|
|
18
18
|
*/
|
|
19
19
|
children?: ReactNode;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* `children`) plus `TestableProps`, so `data-analytics-id`,
|
|
26
|
-
* `data-analytics-props`, `aria-*`, `id`, `ref`, and any `data-*` reach the
|
|
27
|
-
* underlying DOM node directly.
|
|
28
|
-
*
|
|
29
|
-
* The menu collapses to `null` when no action is available for the column
|
|
30
|
-
* (sorting disabled, pinning disabled, hiding disabled, and DnD disabled) —
|
|
31
|
-
* matching the behavior of the legacy `TableHeadCellMenu` it replaces.
|
|
32
|
-
*/
|
|
33
|
-
export declare const TableColumnMenu: {
|
|
34
|
-
<T>({ column, children, className, "data-testid": testIdProp, ...rest }: TableColumnMenuProps<T>): import("react").JSX.Element | null;
|
|
35
|
-
displayName: string;
|
|
36
|
-
};
|
|
21
|
+
export declare function TableColumnMenu<T>({ column, children, className, 'data-testid': testIdProp, ...rest }: TableColumnMenuProps<T>): import("react").JSX.Element | null;
|
|
22
|
+
export declare namespace TableColumnMenu {
|
|
23
|
+
var displayName: string;
|
|
24
|
+
}
|
|
37
25
|
export {};
|
|
@@ -3,8 +3,8 @@ interface TableHeadCellProps<T> {
|
|
|
3
3
|
header: Header<T, unknown>;
|
|
4
4
|
hasTextDescription?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare
|
|
7
|
-
|
|
8
|
-
displayName: string;
|
|
9
|
-
}
|
|
6
|
+
export declare function TableHeadCell<T>({ header, hasTextDescription }: TableHeadCellProps<T>): import("react").JSX.Element;
|
|
7
|
+
export declare namespace TableHeadCell {
|
|
8
|
+
var displayName: string;
|
|
9
|
+
}
|
|
10
10
|
export {};
|
|
@@ -3,13 +3,8 @@ import type { TableHandle } from './types';
|
|
|
3
3
|
interface TableImperativeBridgeProps {
|
|
4
4
|
handleRef: Ref<TableHandle>;
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
export declare const TableImperativeBridge: {
|
|
12
|
-
({ handleRef }: TableImperativeBridgeProps): null;
|
|
13
|
-
displayName: string;
|
|
14
|
-
};
|
|
6
|
+
export declare function TableImperativeBridge({ handleRef }: TableImperativeBridgeProps): null;
|
|
7
|
+
export declare namespace TableImperativeBridge {
|
|
8
|
+
var displayName: string;
|
|
9
|
+
}
|
|
15
10
|
export {};
|
|
@@ -2,8 +2,8 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
interface TableMasterCellActionsProps {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
6
|
-
|
|
7
|
-
displayName: string;
|
|
8
|
-
}
|
|
5
|
+
export declare function TableMasterCellActions({ children }: TableMasterCellActionsProps): import("react").JSX.Element;
|
|
6
|
+
export declare namespace TableMasterCellActions {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
9
9
|
export {};
|
|
@@ -2,8 +2,8 @@ import type { Header } from '@tanstack/react-table';
|
|
|
2
2
|
interface TableResizeHandlerProps<T> {
|
|
3
3
|
header: Header<T, unknown>;
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
6
|
-
|
|
7
|
-
displayName: string;
|
|
8
|
-
}
|
|
5
|
+
export declare function TableResizeHandler<T>({ header }: TableResizeHandlerProps<T>): import("react").JSX.Element;
|
|
6
|
+
export declare namespace TableResizeHandler {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
9
9
|
export {};
|
|
@@ -6,7 +6,7 @@ interface TableRowProps<T> {
|
|
|
6
6
|
'data-index'?: number;
|
|
7
7
|
}
|
|
8
8
|
declare const TableRowInner: {
|
|
9
|
-
<T>({ row, ref,
|
|
9
|
+
<T>({ row, ref, 'data-index': dataIndex }: TableRowProps<T>): import("react").JSX.Element;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
12
12
|
export declare const TableRow: typeof TableRowInner;
|
|
@@ -2,8 +2,8 @@ import type { Row } from '@tanstack/react-table';
|
|
|
2
2
|
interface TableRowExpandedProps<T> {
|
|
3
3
|
row: Row<T>;
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
6
|
-
|
|
7
|
-
displayName: string;
|
|
8
|
-
}
|
|
5
|
+
export declare function TableRowExpanded<T>({ row }: TableRowExpandedProps<T>): import("react").JSX.Element | null;
|
|
6
|
+
export declare namespace TableRowExpanded {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
9
9
|
export {};
|
|
@@ -3,7 +3,7 @@ export interface TableSettingsMenuItemProps extends Omit<SwitchProps, 'checked'
|
|
|
3
3
|
/** Column id from the table's column definitions. */
|
|
4
4
|
columnId: string;
|
|
5
5
|
}
|
|
6
|
-
export declare
|
|
7
|
-
|
|
8
|
-
displayName: string;
|
|
9
|
-
}
|
|
6
|
+
export declare function TableSettingsMenuItem({ columnId, className, 'data-testid': testIdProp, ...rest }: TableSettingsMenuItemProps): import("react").JSX.Element | null;
|
|
7
|
+
export declare namespace TableSettingsMenuItem {
|
|
8
|
+
var displayName: string;
|
|
9
|
+
}
|
|
@@ -2,8 +2,8 @@ import type { Header } from '@tanstack/react-table';
|
|
|
2
2
|
interface TableSortHandler<T> {
|
|
3
3
|
header: Header<T, unknown>;
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
6
|
-
|
|
7
|
-
displayName: string;
|
|
8
|
-
}
|
|
5
|
+
export declare function TableSortHandler<T>({ header }: TableSortHandler<T>): import("react").JSX.Element;
|
|
6
|
+
export declare namespace TableSortHandler {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
9
9
|
export {};
|
|
@@ -18,22 +18,7 @@ export interface TableSortTriggerProps<T = unknown> extends Omit<ButtonHTMLAttri
|
|
|
18
18
|
/** Label rendered next to the sort icon. Visual styling matches the default header text. */
|
|
19
19
|
children?: ReactNode;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* does not wrap the label in its own `<Text>`.
|
|
26
|
-
*
|
|
27
|
-
* All native button attributes (including `data-analytics-id`,
|
|
28
|
-
* `data-analytics-props`, `aria-*`, `id`, `ref`, and any `data-*`) reach the
|
|
29
|
-
* underlying `<button>` so analytics SDKs that walk up via
|
|
30
|
-
* `closest('[data-analytics-id]')` resolve clicks on the icon to the
|
|
31
|
-
* consumer-supplied id.
|
|
32
|
-
*
|
|
33
|
-
* Consumer-passed `onClick` runs first; if it calls `event.preventDefault()`,
|
|
34
|
-
* the internal `toggleSorting` is skipped.
|
|
35
|
-
*/
|
|
36
|
-
export declare const TableSortTrigger: {
|
|
37
|
-
<T>({ column, children, "data-testid": testIdProp, className, onClick, ...rest }: TableSortTriggerProps<T>): import("react").JSX.Element;
|
|
38
|
-
displayName: string;
|
|
39
|
-
};
|
|
21
|
+
export declare function TableSortTrigger<T>({ column, children, 'data-testid': testIdProp, className, onClick, ...rest }: TableSortTriggerProps<T>): import("react").JSX.Element;
|
|
22
|
+
export declare namespace TableSortTrigger {
|
|
23
|
+
var displayName: string;
|
|
24
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { BulkBarSummary, BulkBarSummaryClear, type BulkBarSummaryClearProps, BulkBarSummaryCount, type BulkBarSummaryCountProps, type BulkBarSummaryProps, BulkBarSummarySelectAll, type BulkBarSummarySelectAllProps, BulkBarSummarySeparator, } from '../BulkBar';
|
|
2
|
+
export { EDITABLE_CELL_COLUMN_META, EditableSelectCell, type EditableSelectCellProps, EditableTextCell, type EditableTextCellProps, editableCellVariants, } from './EditableCell';
|
|
2
3
|
export { createTableColumnHelper } from './lib';
|
|
3
4
|
export type { TableColumnHelper } from './lib/createTableColumnHelper';
|
|
4
5
|
export { Table } from './Table';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { BulkBarSummary, BulkBarSummaryClear, BulkBarSummaryCount, BulkBarSummarySelectAll, BulkBarSummarySeparator } from "../BulkBar/index.js";
|
|
2
|
+
export { EDITABLE_CELL_COLUMN_META, EditableSelectCell, EditableTextCell, editableCellVariants } from "./EditableCell/index.js";
|
|
2
3
|
export { createTableColumnHelper } from "./lib/index.js";
|
|
3
4
|
export { Table } from "./Table.js";
|
|
4
5
|
export { TableActionBar, TableActionBarSelection } from "./TableActionBar/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** Classifies a data change by comparing the previous first/last row ids to the new rows. */
|
|
2
2
|
export declare const detectDataChange: (prevFirstRowId: string | undefined, rows: {
|
|
3
3
|
id: string;
|
|
4
|
-
}[], prevLastRowId?: string) =>
|
|
4
|
+
}[], prevLastRowId?: string) => 'prepend' | 'replace' | 'none';
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Checks if a column is the last pinned column on the left side.
|
|
3
3
|
*/
|
|
4
4
|
export declare const isLastPinnedLeft: (column: {
|
|
5
|
-
getIsPinned: () => false |
|
|
5
|
+
getIsPinned: () => false | 'left' | 'right';
|
|
6
6
|
}, allColumns: {
|
|
7
|
-
getIsPinned: () => false |
|
|
7
|
+
getIsPinned: () => false | 'left' | 'right';
|
|
8
8
|
id: string;
|
|
9
9
|
}[], columnId: string) => boolean;
|
|
@@ -2,16 +2,16 @@ import type { FC, HTMLAttributes, PropsWithChildren, Ref } from 'react';
|
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
import type { TestableProps } from '../../utils/testId';
|
|
4
4
|
declare const textVariants: (props?: ({
|
|
5
|
-
size?: "
|
|
6
|
-
weight?: "bold" | "light" | "
|
|
7
|
-
color?: "
|
|
5
|
+
size?: "lg" | "md" | "sm" | "xl" | "xs" | null | undefined;
|
|
6
|
+
weight?: "bold" | "light" | "medium" | "regular" | null | undefined;
|
|
7
|
+
color?: "danger" | "inherit" | "primary" | "primary-alt" | "secondary" | "secondary-alt" | "tertiary-alt" | null | undefined;
|
|
8
8
|
align?: "center" | "left" | "right" | null | undefined;
|
|
9
9
|
inline?: boolean | null | undefined;
|
|
10
10
|
grow?: boolean | null | undefined;
|
|
11
11
|
truncate?: boolean | null | undefined;
|
|
12
12
|
decoration?: "dashed" | null | undefined;
|
|
13
|
-
lineHeight?: "none" | "normal" | "
|
|
14
|
-
textTransform?: "
|
|
13
|
+
lineHeight?: "none" | "normal" | "relaxed" | "snug" | "tight" | null | undefined;
|
|
14
|
+
textTransform?: "capitalize" | "lowercase" | "none" | "uppercase" | null | undefined;
|
|
15
15
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
16
|
type TextNativeProps = Omit<HTMLAttributes<HTMLParagraphElement>, 'className' | 'color'>;
|
|
17
17
|
type TextVariantProps = VariantProps<typeof textVariants>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const textareaPaddingVariants: (props?: ({
|
|
2
|
-
size?: "
|
|
2
|
+
size?: "default" | "inline-edit" | "medium" | "small" | null | undefined;
|
|
3
3
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
4
4
|
export declare const textareaHeightVariants: (props?: ({
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "default" | "inline-edit" | "medium" | "small" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -14,7 +14,7 @@ export interface ToastData {
|
|
|
14
14
|
export interface ToastProps {
|
|
15
15
|
toast: ToastData;
|
|
16
16
|
}
|
|
17
|
-
export declare
|
|
18
|
-
|
|
19
|
-
displayName: string;
|
|
20
|
-
}
|
|
17
|
+
export declare function Toast({ toast }: ToastProps): import("react").JSX.Element;
|
|
18
|
+
export declare namespace Toast {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
displayName: string;
|
|
4
|
-
}
|
|
1
|
+
export declare function ToastClose(): import("react").JSX.Element;
|
|
2
|
+
export declare namespace ToastClose {
|
|
3
|
+
var displayName: string;
|
|
4
|
+
}
|
|
@@ -11,7 +11,7 @@ export interface UseToastReturn {
|
|
|
11
11
|
update: (options: UpdateToastOptions) => string;
|
|
12
12
|
dismiss: (options?: DismissToastOptions) => void;
|
|
13
13
|
}
|
|
14
|
-
export declare
|
|
15
|
-
|
|
16
|
-
displayName: string;
|
|
17
|
-
}
|
|
14
|
+
export declare function useToast(): UseToastReturn;
|
|
15
|
+
export declare namespace useToast {
|
|
16
|
+
var displayName: string;
|
|
17
|
+
}
|
|
@@ -3,7 +3,7 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
import type { TestableProps } from '../../utils/testId';
|
|
4
4
|
import { type ButtonBaseProps } from '../ButtonBase';
|
|
5
5
|
declare const toggleButtonVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "ghost" | "outline" | null | undefined;
|
|
7
7
|
color?: "brand" | "neutral" | null | undefined;
|
|
8
8
|
active?: boolean | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -12,6 +12,6 @@ import type { TourStepEffectArgs, WaitForStepEventOptions } from '../types';
|
|
|
12
12
|
*
|
|
13
13
|
* Returns a cleanup function for early teardown (e.g. dismiss / Back).
|
|
14
14
|
*/
|
|
15
|
-
export declare const waitForStepEvent: <T extends HTMLElement = HTMLElement>(event: keyof HTMLElementEventMap, args: Pick<TourStepEffectArgs,
|
|
15
|
+
export declare const waitForStepEvent: <T extends HTMLElement = HTMLElement>(event: keyof HTMLElementEventMap, args: Pick<TourStepEffectArgs, 'show' | 'next'> & {
|
|
16
16
|
target?: (() => T | null) | undefined;
|
|
17
17
|
}, options?: WaitForStepEventOptions<T>) => VoidFunction;
|
package/dist/icons/SvgIcon.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FC, ReactNode, Ref, SVGProps } from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const iconVariants: (props?: ({
|
|
4
|
-
size?: "
|
|
4
|
+
size?: "2xl" | "inherit" | "lg" | "md" | "sm" | "xl" | "xs" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
type SvgIconNativeProps = SVGProps<SVGSVGElement>;
|
|
7
7
|
type SvgIconVariantProps = VariantProps<typeof iconVariants>;
|
package/dist/index.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ export { SplashScreen, type SplashScreenProps } from './components/SplashScreen'
|
|
|
71
71
|
export { SplitButton, type SplitButtonProps } from './components/SplitButton';
|
|
72
72
|
export { HStack, type HStackProps, Stack, type StackProps, VStack, type VStackProps, } from './components/Stack';
|
|
73
73
|
export { Switch, SwitchControl, SwitchDescription, type SwitchDescriptionProps, SwitchLabel, type SwitchLabelProps, type SwitchProps, } from './components/Switch';
|
|
74
|
-
export { createTableColumnHelper, Table, type TableAccessorColumnDef, TableActionBar, type TableCellContext, type TableColumnBase, type TableColumnDef, type TableColumnHelper, TableColumnMenu, TableColumnMenuHideItem, type TableColumnMenuHideItemProps, TableColumnMenuMoveLeftItem, type TableColumnMenuMoveLeftItemProps, TableColumnMenuMoveRightItem, type TableColumnMenuMoveRightItemProps, TableColumnMenuPinItem, type TableColumnMenuPinItemProps, type TableColumnMenuProps, TableColumnMenuSortItem, type TableColumnMenuSortItemProps, type TableColumnMeta, type TableColumnPinningState, type TableColumnSizingState, type TableDisplayColumnDef, TableEmptyState, type TableExpandedState, type TableGroupingState, type TableHandle, type TableOnChangeFn, type TableProps, type TableRow, type TableRowSelectionState, type TableScrollToRowOptions, TableSettingsMenu, type TableSortingState, TableSortTrigger, type TableSortTriggerProps, type TableUpdater, type TableVisibilityState, } from './components/Table';
|
|
74
|
+
export { createTableColumnHelper, EDITABLE_CELL_COLUMN_META, EditableSelectCell, type EditableSelectCellProps, EditableTextCell, type EditableTextCellProps, editableCellVariants, Table, type TableAccessorColumnDef, TableActionBar, type TableCellContext, type TableColumnBase, type TableColumnDef, type TableColumnHelper, TableColumnMenu, TableColumnMenuHideItem, type TableColumnMenuHideItemProps, TableColumnMenuMoveLeftItem, type TableColumnMenuMoveLeftItemProps, TableColumnMenuMoveRightItem, type TableColumnMenuMoveRightItemProps, TableColumnMenuPinItem, type TableColumnMenuPinItemProps, type TableColumnMenuProps, TableColumnMenuSortItem, type TableColumnMenuSortItemProps, type TableColumnMeta, type TableColumnPinningState, type TableColumnSizingState, type TableDisplayColumnDef, TableEmptyState, type TableExpandedState, type TableGroupingState, type TableHandle, type TableOnChangeFn, type TableProps, type TableRow, type TableRowSelectionState, type TableScrollToRowOptions, TableSettingsMenu, type TableSortingState, TableSortTrigger, type TableSortTriggerProps, type TableUpdater, type TableVisibilityState, } from './components/Table';
|
|
75
75
|
export { Tabs, TabsButton, TabsContent, TabsLineActions, TabsList, TabsSeparator, TabsTrigger, } from './components/Tabs';
|
|
76
76
|
export { Tag, TagClose, type TagProps } from './components/Tag';
|
|
77
77
|
export { Text, type TextProps } from './components/Text';
|
package/dist/index.js
CHANGED
|
@@ -60,7 +60,7 @@ export { SplashScreen } from "./components/SplashScreen/index.js";
|
|
|
60
60
|
export { SplitButton } from "./components/SplitButton/index.js";
|
|
61
61
|
export { HStack, Stack, VStack } from "./components/Stack/index.js";
|
|
62
62
|
export { Switch, SwitchControl, SwitchDescription, SwitchLabel } from "./components/Switch/index.js";
|
|
63
|
-
export { Table, TableActionBar, TableColumnMenu, TableColumnMenuHideItem, TableColumnMenuMoveLeftItem, TableColumnMenuMoveRightItem, TableColumnMenuPinItem, TableColumnMenuSortItem, TableEmptyState, TableSettingsMenu, TableSortTrigger, createTableColumnHelper } from "./components/Table/index.js";
|
|
63
|
+
export { EDITABLE_CELL_COLUMN_META, EditableSelectCell, EditableTextCell, Table, TableActionBar, TableColumnMenu, TableColumnMenuHideItem, TableColumnMenuMoveLeftItem, TableColumnMenuMoveRightItem, TableColumnMenuPinItem, TableColumnMenuSortItem, TableEmptyState, TableSettingsMenu, TableSortTrigger, createTableColumnHelper, editableCellVariants } from "./components/Table/index.js";
|
|
64
64
|
export { Tabs, TabsButton, TabsContent, TabsLineActions, TabsList, TabsSeparator, TabsTrigger } from "./components/Tabs/index.js";
|
|
65
65
|
export { Tag, TagClose } from "./components/Tag/index.js";
|
|
66
66
|
export { Text } from "./components/Text/index.js";
|