@wallarm-org/design-system 0.71.4 → 0.72.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/README.md +1 -3
- package/dist/components/Attribute/AttributeValue.js +1 -1
- package/dist/components/Calendar/Calendar.js +14 -4
- package/dist/components/Calendar/CalendarContext.d.ts +19 -2
- package/dist/components/Calendar/CalendarHeader.js +2 -1
- package/dist/components/Calendar/CalendarInputHeader.js +27 -27
- package/dist/components/Calendar/dateValue.d.ts +18 -0
- package/dist/components/Calendar/dateValue.js +7 -0
- package/dist/components/Calendar/useCalendarTime.d.ts +25 -0
- package/dist/components/Calendar/useCalendarTime.js +38 -0
- package/dist/components/DropdownMenu/DropdownMenuInput.d.ts +1 -1
- package/dist/components/InlineEdit/InlineEdit.d.ts +52 -0
- package/dist/components/InlineEdit/InlineEdit.js +223 -0
- package/dist/components/InlineEdit/InlineEditContext.d.ts +43 -0
- package/dist/components/InlineEdit/InlineEditContext.js +16 -0
- package/dist/components/InlineEdit/InlineEditControl.d.ts +14 -0
- package/dist/components/InlineEdit/InlineEditControl.js +72 -0
- package/dist/components/InlineEdit/InlineEditDate.d.ts +19 -0
- package/dist/components/InlineEdit/InlineEditDate.js +22 -0
- package/dist/components/InlineEdit/InlineEditDateTime.d.ts +21 -0
- package/dist/components/InlineEdit/InlineEditDateTime.js +23 -0
- package/dist/components/InlineEdit/InlineEditError.d.ts +6 -0
- package/dist/components/InlineEdit/InlineEditError.js +32 -0
- package/dist/components/InlineEdit/InlineEditInput.d.ts +4 -0
- package/dist/components/InlineEdit/InlineEditInput.js +18 -0
- package/dist/components/InlineEdit/InlineEditNumber.d.ts +11 -0
- package/dist/components/InlineEdit/InlineEditNumber.js +18 -0
- package/dist/components/InlineEdit/InlineEditPreview.d.ts +23 -0
- package/dist/components/InlineEdit/InlineEditPreview.js +105 -0
- package/dist/components/InlineEdit/InlineEditPreviewIcon.d.ts +12 -0
- package/dist/components/InlineEdit/InlineEditPreviewIcon.js +43 -0
- package/dist/components/InlineEdit/InlineEditPreviewValue.d.ts +11 -0
- package/dist/components/InlineEdit/InlineEditPreviewValue.js +25 -0
- package/dist/components/InlineEdit/InlineEditSelect.d.ts +39 -0
- package/dist/components/InlineEdit/InlineEditSelect.js +42 -0
- package/dist/components/InlineEdit/InlineEditTextarea.d.ts +4 -0
- package/dist/components/InlineEdit/InlineEditTextarea.js +18 -0
- package/dist/components/InlineEdit/InlineEditTime.d.ts +12 -0
- package/dist/components/InlineEdit/InlineEditTime.js +21 -0
- package/dist/components/InlineEdit/classes.d.ts +5 -0
- package/dist/components/InlineEdit/classes.js +35 -0
- package/dist/components/InlineEdit/dateValueCast.d.ts +25 -0
- package/dist/components/InlineEdit/dateValueCast.js +9 -0
- package/dist/components/InlineEdit/index.d.ts +15 -0
- package/dist/components/InlineEdit/index.js +16 -0
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +4 -3
- package/dist/components/Input/classes.d.ts +1 -0
- package/dist/components/Input/classes.js +8 -0
- package/dist/components/NumberInput/NumberInput.d.ts +4 -1
- package/dist/components/NumberInput/NumberInput.js +17 -7
- package/dist/components/NumberInput/classes.d.ts +12 -0
- package/dist/components/NumberInput/classes.js +51 -0
- package/dist/components/Select/SelectButton.d.ts +2 -1
- package/dist/components/Select/SelectButton.js +7 -2
- package/dist/components/Select/SelectInput/SelectInput.d.ts +1 -0
- package/dist/components/Select/SelectInput/SelectInput.js +21 -7
- package/dist/components/Select/SelectInput/SelectInputItemRenderer.d.ts +4 -0
- package/dist/components/Select/SelectInput/SelectInputItemRenderer.js +8 -3
- package/dist/components/Select/SelectInput/SelectInputOverflowRenderer.d.ts +1 -1
- package/dist/components/Select/SelectInput/SelectInputOverflowRenderer.js +28 -27
- package/dist/components/Slider/SliderInput.d.ts +1 -1
- package/dist/components/Textarea/classes.js +2 -2
- package/dist/components/Toast/Toast.js +6 -6
- package/dist/components/Toast/Toaster.js +1 -1
- package/dist/components/Tree/TreeContext.d.ts +1 -9
- package/dist/components/Tree/TreeContext.js +2 -18
- package/dist/components/Tree/TreeItemContent.js +5 -8
- package/dist/components/TreeView/TreeView.d.ts +19 -0
- package/dist/components/TreeView/TreeView.js +82 -0
- package/dist/components/TreeView/TreeViewContext.d.ts +12 -0
- package/dist/components/TreeView/TreeViewContext.js +9 -0
- package/dist/components/TreeView/TreeViewItem.d.ts +24 -0
- package/dist/components/TreeView/TreeViewItem.js +168 -0
- package/dist/components/TreeView/classes.d.ts +5 -0
- package/dist/components/TreeView/classes.js +30 -0
- package/dist/components/TreeView/index.d.ts +9 -0
- package/dist/components/TreeView/index.js +5 -0
- package/dist/index.d.ts +7 -5
- package/dist/index.js +4 -2
- package/dist/metadata/components.json +6122 -2828
- package/dist/theme/fonts/Geist-Variable.woff2 +0 -0
- package/dist/theme/fonts/GeistMono-Variable.woff2 +0 -0
- package/dist/theme/fonts/geist.css +21 -0
- package/dist/theme/index.css +1 -0
- package/dist/theme/typography.css +5 -3
- package/dist/utils/Collapse.d.ts +18 -0
- package/dist/utils/Collapse.js +15 -0
- package/dist/utils/treeDepth.d.ts +11 -0
- package/dist/utils/treeDepth.js +18 -0
- package/package.json +1 -3
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
const inlineEditPreviewVariants = cva('group flex w-full min-w-0 gap-4 rounded-8 border border-transparent px-6 -ml-7 font-sans text-sm text-text-primary transition-colors', {
|
|
3
|
+
variants: {
|
|
4
|
+
multiline: {
|
|
5
|
+
true: 'items-start py-0',
|
|
6
|
+
false: 'items-center py-2 h-24'
|
|
7
|
+
},
|
|
8
|
+
activatable: {
|
|
9
|
+
true: '',
|
|
10
|
+
false: ''
|
|
11
|
+
},
|
|
12
|
+
invalid: {
|
|
13
|
+
true: '',
|
|
14
|
+
false: ''
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
compoundVariants: [
|
|
18
|
+
{
|
|
19
|
+
activatable: true,
|
|
20
|
+
invalid: false,
|
|
21
|
+
className: 'cursor-pointer hover:bg-states-primary-hover active:bg-states-primary-pressed focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-focus-primary'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
activatable: true,
|
|
25
|
+
invalid: true,
|
|
26
|
+
className: 'cursor-pointer bg-component-input-bg hover:border-border-strong-danger hover:ring-3 hover:ring-focus-destructive focus-visible:border-border-strong-danger focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-focus-destructive'
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
multiline: false,
|
|
31
|
+
activatable: false,
|
|
32
|
+
invalid: false
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
export { inlineEditPreviewVariants };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { DateValue as ReactAriaDateValue } from '@react-aria/datepicker';
|
|
2
|
+
import type { DateValue } from '../Calendar';
|
|
3
|
+
/**
|
|
4
|
+
* Calendar's `DateValue` (Ark) and DateInput's `DateValue` (react-aria) are
|
|
5
|
+
* structurally identical `@internationalized/date` classes from different
|
|
6
|
+
* package copies — the story-documented interop hazard (Ark values fail an
|
|
7
|
+
* `instanceof` check against react-aria's copy, and vice versa). Cast across
|
|
8
|
+
* the boundary rather than validate, mirroring `toDateValue`/
|
|
9
|
+
* `toReactAriaDateValue` in Calendar/dateValue.ts. Use these when composing a
|
|
10
|
+
* `DateInput` trigger inside `InlineEditDate`/`InlineEditDateTime`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const toReactAriaDateValue: (date: DateValue | null) => ReactAriaDateValue | null;
|
|
13
|
+
export declare const toCalendarDateValue: (date: ReactAriaDateValue | null) => DateValue | null;
|
|
14
|
+
/**
|
|
15
|
+
* `DateInput` at `granularity='minute'` requires an hour/minute component —
|
|
16
|
+
* react-aria's `useDateFieldState` throws "Invalid granularity" otherwise. A
|
|
17
|
+
* committed value can be day-only (e.g. a consumer's initial `CalendarDate`,
|
|
18
|
+
* before any time has been picked), so promote it to midnight, mirroring
|
|
19
|
+
* Calendar's own date-only → `CalendarDateTime` promotion in `useCalendarTime`
|
|
20
|
+
* / `withTime` (Calendar/dateValue.ts). The cast crosses the same
|
|
21
|
+
* `@internationalized/date` package-instance boundary as the casts above.
|
|
22
|
+
* Use this when composing a minute-granularity `DateInput` trigger inside
|
|
23
|
+
* `InlineEditDateTime`.
|
|
24
|
+
*/
|
|
25
|
+
export declare const withMinuteGranularity: (date: DateValue | null) => DateValue | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CalendarDateTime } from "@internationalized/date";
|
|
2
|
+
const toReactAriaDateValue = (date)=>date;
|
|
3
|
+
const toCalendarDateValue = (date)=>date;
|
|
4
|
+
const withMinuteGranularity = (date)=>{
|
|
5
|
+
if (!date) return null;
|
|
6
|
+
if ('hour' in date) return date;
|
|
7
|
+
return new CalendarDateTime(date.year, date.month, date.day, 0, 0);
|
|
8
|
+
};
|
|
9
|
+
export { toCalendarDateValue, toReactAriaDateValue, withMinuteGranularity };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { toCalendarDateValue, toReactAriaDateValue, withMinuteGranularity } from './dateValueCast';
|
|
2
|
+
export { InlineEdit, type InlineEditProps } from './InlineEdit';
|
|
3
|
+
export { type InlineEditActivationMode, type InlineEditContextValue, type InlineEditStatus, type InlineEditSubmitMode, useInlineEdit, useInlineEditSubmitMode, } from './InlineEditContext';
|
|
4
|
+
export { InlineEditControl, type InlineEditControlProps } from './InlineEditControl';
|
|
5
|
+
export { InlineEditDate, type InlineEditDateProps } from './InlineEditDate';
|
|
6
|
+
export { InlineEditDateTime, type InlineEditDateTimeProps } from './InlineEditDateTime';
|
|
7
|
+
export { InlineEditError, type InlineEditErrorProps } from './InlineEditError';
|
|
8
|
+
export { InlineEditInput, type InlineEditInputProps } from './InlineEditInput';
|
|
9
|
+
export { InlineEditNumber, type InlineEditNumberProps } from './InlineEditNumber';
|
|
10
|
+
export { InlineEditPreview, type InlineEditPreviewProps } from './InlineEditPreview';
|
|
11
|
+
export { InlineEditPreviewIcon, type InlineEditPreviewIconProps } from './InlineEditPreviewIcon';
|
|
12
|
+
export { InlineEditPreviewValue, type InlineEditPreviewValueProps } from './InlineEditPreviewValue';
|
|
13
|
+
export { InlineEditSelect, type InlineEditSelectProps } from './InlineEditSelect';
|
|
14
|
+
export { InlineEditTextarea, type InlineEditTextareaProps } from './InlineEditTextarea';
|
|
15
|
+
export { InlineEditTime, type InlineEditTimeProps } from './InlineEditTime';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { toCalendarDateValue, toReactAriaDateValue, withMinuteGranularity } from "./dateValueCast.js";
|
|
2
|
+
import { InlineEdit } from "./InlineEdit.js";
|
|
3
|
+
import { useInlineEdit, useInlineEditSubmitMode } from "./InlineEditContext.js";
|
|
4
|
+
import { InlineEditControl } from "./InlineEditControl.js";
|
|
5
|
+
import { InlineEditDate } from "./InlineEditDate.js";
|
|
6
|
+
import { InlineEditDateTime } from "./InlineEditDateTime.js";
|
|
7
|
+
import { InlineEditError } from "./InlineEditError.js";
|
|
8
|
+
import { InlineEditInput } from "./InlineEditInput.js";
|
|
9
|
+
import { InlineEditNumber } from "./InlineEditNumber.js";
|
|
10
|
+
import { InlineEditPreview } from "./InlineEditPreview.js";
|
|
11
|
+
import { InlineEditPreviewIcon } from "./InlineEditPreviewIcon.js";
|
|
12
|
+
import { InlineEditPreviewValue } from "./InlineEditPreviewValue.js";
|
|
13
|
+
import { InlineEditSelect } from "./InlineEditSelect.js";
|
|
14
|
+
import { InlineEditTextarea } from "./InlineEditTextarea.js";
|
|
15
|
+
import { InlineEditTime } from "./InlineEditTime.js";
|
|
16
|
+
export { InlineEdit, InlineEditControl, InlineEditDate, InlineEditDateTime, InlineEditError, InlineEditInput, InlineEditNumber, InlineEditPreview, InlineEditPreviewIcon, InlineEditPreviewValue, InlineEditSelect, InlineEditTextarea, InlineEditTime, toCalendarDateValue, toReactAriaDateValue, useInlineEdit, useInlineEditSubmitMode, withMinuteGranularity };
|
|
@@ -2,7 +2,7 @@ import type { FC, InputHTMLAttributes, Ref } from 'react';
|
|
|
2
2
|
import type { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import type { TestableProps } from '../../utils/testId';
|
|
4
4
|
import { inputVariants } from './classes';
|
|
5
|
-
type InputNativeProps = InputHTMLAttributes<HTMLInputElement>;
|
|
5
|
+
type InputNativeProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>;
|
|
6
6
|
type InputVariantsProps = VariantProps<typeof inputVariants>;
|
|
7
7
|
export type InputProps = InputNativeProps & InputVariantsProps & TestableProps & {
|
|
8
8
|
ref?: Ref<HTMLInputElement>;
|
|
@@ -3,14 +3,15 @@ import { useFieldContext } from "@ark-ui/react/field";
|
|
|
3
3
|
import { mergeProps } from "@ark-ui/react/utils";
|
|
4
4
|
import { cn } from "../../utils/cn.js";
|
|
5
5
|
import { inputVariants } from "./classes.js";
|
|
6
|
-
const Input = ({ className, error = false, disabled = false, ref, ...props })=>{
|
|
6
|
+
const Input = ({ className, error = false, size = 'default', disabled = false, ref, ...props })=>{
|
|
7
7
|
const field = useFieldContext();
|
|
8
8
|
const mergedProps = mergeProps(field?.getInputProps(), props);
|
|
9
9
|
return /*#__PURE__*/ jsx("input", {
|
|
10
10
|
...mergedProps,
|
|
11
11
|
...props,
|
|
12
|
-
className: cn(
|
|
13
|
-
error
|
|
12
|
+
className: cn(inputVariants({
|
|
13
|
+
error,
|
|
14
|
+
size
|
|
14
15
|
}), className),
|
|
15
16
|
disabled: disabled,
|
|
16
17
|
"aria-invalid": Boolean(error),
|
|
@@ -5,7 +5,15 @@ const inputVariants = cva(cn('flex w-full px-12 rounded-8 border bg-component-in
|
|
|
5
5
|
error: {
|
|
6
6
|
true: cn('border-border-strong-danger', 'hover:not-disabled:border-border-strong-danger', 'hover:not-disabled:outline-none', 'hover:not-disabled:ring-3', 'hover:not-disabled:ring-focus-destructive-hover', 'focus-visible:ring-focus-destructive'),
|
|
7
7
|
false: cn('border-border-primary', 'hover:not-disabled:border-component-border-input-hover', 'focus-visible:not-disabled:border-border-strong-primary', 'focus-visible:ring-focus-primary')
|
|
8
|
+
},
|
|
9
|
+
size: {
|
|
10
|
+
default: 'h-36 py-8',
|
|
11
|
+
medium: 'h-32 py-6',
|
|
12
|
+
small: 'h-24 py-2'
|
|
8
13
|
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
size: 'default'
|
|
9
17
|
}
|
|
10
18
|
});
|
|
11
19
|
export { inputVariants };
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { FC, Ref } from 'react';
|
|
2
2
|
import { NumberInput as ArkUiNumberInput } from '@ark-ui/react/number-input';
|
|
3
|
+
import type { VariantProps } from 'class-variance-authority';
|
|
3
4
|
import type { TestableProps } from '../../utils/testId';
|
|
5
|
+
import { numberInputRootVariants } from './classes';
|
|
4
6
|
type NumberInputNativeProps = Omit<ArkUiNumberInput.RootProps, 'className' | 'invalid'>;
|
|
7
|
+
type NumberInputVariantsProps = VariantProps<typeof numberInputRootVariants>;
|
|
5
8
|
interface NumberInputBaseProps {
|
|
6
9
|
error?: boolean;
|
|
7
10
|
ref?: Ref<HTMLDivElement>;
|
|
8
11
|
}
|
|
9
|
-
export type NumberInputProps = NumberInputNativeProps & NumberInputBaseProps & TestableProps;
|
|
12
|
+
export type NumberInputProps = NumberInputNativeProps & NumberInputVariantsProps & NumberInputBaseProps & TestableProps;
|
|
10
13
|
export declare const NumberInput: FC<NumberInputProps>;
|
|
11
14
|
export {};
|
|
@@ -2,25 +2,35 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { NumberInput } from "@ark-ui/react/number-input";
|
|
3
3
|
import { ChevronDown, ChevronUp } from "../../icons/index.js";
|
|
4
4
|
import { cn } from "../../utils/cn.js";
|
|
5
|
-
|
|
6
|
-
const NumberInput_NumberInput = ({ error = false, defaultValue = '0', ...props })=>/*#__PURE__*/ jsxs(NumberInput.Root, {
|
|
5
|
+
import { numberInputControlVariants, numberInputFieldVariants, numberInputRootVariants, numberInputTriggerVariants } from "./classes.js";
|
|
6
|
+
const NumberInput_NumberInput = ({ error = false, size = 'default', defaultValue = '0', ...props })=>/*#__PURE__*/ jsxs(NumberInput.Root, {
|
|
7
7
|
...props,
|
|
8
8
|
invalid: error,
|
|
9
9
|
defaultValue: defaultValue,
|
|
10
|
-
className:
|
|
10
|
+
className: numberInputRootVariants({
|
|
11
|
+
size
|
|
12
|
+
}),
|
|
11
13
|
children: [
|
|
12
14
|
/*#__PURE__*/ jsx(NumberInput.Input, {
|
|
13
|
-
className:
|
|
15
|
+
className: numberInputFieldVariants({
|
|
16
|
+
size
|
|
17
|
+
})
|
|
14
18
|
}),
|
|
15
19
|
/*#__PURE__*/ jsxs(NumberInput.Control, {
|
|
16
|
-
className: cn(
|
|
20
|
+
className: cn(numberInputControlVariants({
|
|
21
|
+
size
|
|
22
|
+
}), '[&_svg]:text-icon-secondary'),
|
|
17
23
|
children: [
|
|
18
24
|
/*#__PURE__*/ jsx(NumberInput.IncrementTrigger, {
|
|
19
|
-
className:
|
|
25
|
+
className: numberInputTriggerVariants({
|
|
26
|
+
size
|
|
27
|
+
}),
|
|
20
28
|
children: /*#__PURE__*/ jsx(ChevronUp, {})
|
|
21
29
|
}),
|
|
22
30
|
/*#__PURE__*/ jsx(NumberInput.DecrementTrigger, {
|
|
23
|
-
className:
|
|
31
|
+
className: numberInputTriggerVariants({
|
|
32
|
+
size
|
|
33
|
+
}),
|
|
24
34
|
children: /*#__PURE__*/ jsx(ChevronDown, {})
|
|
25
35
|
})
|
|
26
36
|
]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const numberInputRootVariants: (props?: ({
|
|
2
|
+
size?: "small" | "medium" | "default" | null | undefined;
|
|
3
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
4
|
+
export declare const numberInputFieldVariants: (props?: ({
|
|
5
|
+
size?: "small" | "medium" | "default" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export declare const numberInputControlVariants: (props?: ({
|
|
8
|
+
size?: "small" | "medium" | "default" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
export declare const numberInputTriggerVariants: (props?: ({
|
|
11
|
+
size?: "small" | "medium" | "default" | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
|
+
const numberInputRootVariants = cva(cn('flex items-stretch border rounded-8 bg-component-input-bg relative w-full has-[>textarea]:h-auto', 'border border-border-primary outline-none shadow-xs transition-[color,border,box-shadow]', '[&:not([data-disabled]):not([data-focus])]:hover:border-component-border-input-hover ', '[&[data-focus]:not([data-disabled])]:ring-3', '[&[data-focus]:not([data-disabled]):not([data-invalid])]:ring-focus-primary', '[&[data-focus]:not([data-disabled]):not([data-invalid])]:border-border-strong-primary', 'data-invalid:border-border-strong-danger data-invalid:ring-focus-destructive', '[&[data-invalid]:not([data-disabled])]:hover:border-border-strong-danger', '[&[data-invalid]:not([data-disabled]):not([data-focus])]:hover:ring-3', '[&[data-invalid]:not([data-disabled]):not([data-focus])]:hover:ring-focus-destructive-hover', '[&[data-invalid]:not([data-disabled])]:[&>input]:hover:ring-0', 'data-disabled:opacity-50', 'data-disabled:cursor-not-allowed', 'data-disabled:*:cursor-not-allowed'), {
|
|
4
|
+
variants: {
|
|
5
|
+
size: {
|
|
6
|
+
default: 'h-36',
|
|
7
|
+
medium: 'h-32',
|
|
8
|
+
small: 'h-24'
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
defaultVariants: {
|
|
12
|
+
size: 'default'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
const numberInputFieldVariants = cva(cn('flex-1 h-full rounded-none border-0 bg-transparent shadow-none outline-none', 'font-sans font-normal text-sm text-text-primary placeholder:text-text-secondary'), {
|
|
16
|
+
variants: {
|
|
17
|
+
size: {
|
|
18
|
+
default: 'px-12 py-8',
|
|
19
|
+
medium: 'px-12 py-6',
|
|
20
|
+
small: 'px-12 py-2'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
size: 'default'
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const numberInputControlVariants = cva(cn('flex flex-col justify-center', 'bg-states-primary-default-alt border-l border-border-primary', '[&_svg]:pointer-events-none'), {
|
|
28
|
+
variants: {
|
|
29
|
+
size: {
|
|
30
|
+
default: 'px-4 py-2 [&_svg]:icon-sm',
|
|
31
|
+
medium: 'px-3 py-1 [&_svg]:icon-sm',
|
|
32
|
+
small: 'px-2 py-0 [&_svg]:icon-xs'
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
size: 'default'
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
const numberInputTriggerVariants = cva(cn('flex items-center justify-center rounded-2 transition-colors cursor-pointer', 'hover:bg-states-primary-hover', '[&[data-disabled]]:cursor-not-allowed [&[data-disabled]]:pointer-events-none'), {
|
|
40
|
+
variants: {
|
|
41
|
+
size: {
|
|
42
|
+
default: 'w-16 h-14 px-2 py-1',
|
|
43
|
+
medium: 'w-14 h-12 px-2 py-1',
|
|
44
|
+
small: 'w-12 h-10 px-1 py-0'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
defaultVariants: {
|
|
48
|
+
size: 'default'
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
export { numberInputControlVariants, numberInputFieldVariants, numberInputRootVariants, numberInputTriggerVariants };
|
|
@@ -2,10 +2,11 @@ import type { FC } from 'react';
|
|
|
2
2
|
import { type ButtonProps } from '../Button';
|
|
3
3
|
import { type SelectValueTextProps } from './SelectValueText';
|
|
4
4
|
type SelectButtonBaseProps = Omit<ButtonProps, 'variant' | 'color' | 'size' | 'disabled'>;
|
|
5
|
+
export type SelectButtonSize = 'small' | 'medium' | 'default';
|
|
5
6
|
export interface SelectButtonVariantProps {
|
|
6
7
|
variant?: Exclude<ButtonProps['variant'], 'primary'>;
|
|
7
8
|
color?: Exclude<ButtonProps['color'], 'destructive'>;
|
|
8
|
-
size?:
|
|
9
|
+
size?: SelectButtonSize;
|
|
9
10
|
}
|
|
10
11
|
type SelectButtonProps = SelectButtonBaseProps & SelectButtonVariantProps & SelectValueTextProps;
|
|
11
12
|
export declare const SelectButton: FC<SelectButtonProps>;
|
|
@@ -6,7 +6,12 @@ import { SelectArrow } from "./SelectArrow.js";
|
|
|
6
6
|
import { useSelectSharedContext } from "./SelectSharedContext/index.js";
|
|
7
7
|
import { SelectValueIcon } from "./SelectValueIcon.js";
|
|
8
8
|
import { SelectValueText } from "./SelectValueText.js";
|
|
9
|
-
const
|
|
9
|
+
const SELECT_BUTTON_SIZE_MAP = {
|
|
10
|
+
small: 'small',
|
|
11
|
+
medium: 'medium',
|
|
12
|
+
default: 'large'
|
|
13
|
+
};
|
|
14
|
+
const SelectButton = ({ placeholder = 'Choose...', variant = 'outline', color = 'neutral', size = 'default', 'data-testid': testIdProp, ...props })=>{
|
|
10
15
|
const testId = useTestId('button', testIdProp);
|
|
11
16
|
const { loading } = useSelectSharedContext();
|
|
12
17
|
const { disabled } = useSelectContext();
|
|
@@ -18,7 +23,7 @@ const SelectButton = ({ placeholder = 'Choose...', variant = 'outline', color =
|
|
|
18
23
|
"data-testid": testId,
|
|
19
24
|
variant: variant,
|
|
20
25
|
color: color,
|
|
21
|
-
size: size,
|
|
26
|
+
size: SELECT_BUTTON_SIZE_MAP[size],
|
|
22
27
|
loading: loading,
|
|
23
28
|
disabled: disabled,
|
|
24
29
|
fullWidth: true,
|
|
@@ -2,6 +2,7 @@ import type { FC } from 'react';
|
|
|
2
2
|
import { type SelectValueTextProps } from '../SelectValueText';
|
|
3
3
|
interface SelectInputBaseProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'color'> {
|
|
4
4
|
'data-testid'?: string;
|
|
5
|
+
size?: 'small' | 'medium' | 'default';
|
|
5
6
|
}
|
|
6
7
|
type SelectInputProps = SelectInputBaseProps & Pick<SelectValueTextProps, 'placeholder'>;
|
|
7
8
|
export declare const SelectInput: FC<SelectInputProps>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
2
3
|
import { Select, useSelectContext } from "@ark-ui/react/select";
|
|
3
4
|
import { cva } from "class-variance-authority";
|
|
4
5
|
import { cn } from "../../../utils/cn.js";
|
|
@@ -7,9 +8,9 @@ import { SelectArrow } from "../SelectArrow.js";
|
|
|
7
8
|
import { SelectValueText } from "../SelectValueText.js";
|
|
8
9
|
import { SelectInputClear } from "./SelectInputClear.js";
|
|
9
10
|
import { SelectInputItemRenderer } from "./SelectInputItemRenderer.js";
|
|
10
|
-
import {
|
|
11
|
+
import { createSelectInputOverflowRenderer } from "./SelectInputOverflowRenderer.js";
|
|
11
12
|
const selectInputVariants = cva([
|
|
12
|
-
'flex items-center gap-4 w-fit
|
|
13
|
+
'flex items-center gap-4 w-fit pr-12 rounded-8 border bg-component-input-bg shadow-xs transition-[colors,border,box-shadow]',
|
|
13
14
|
'font-sans text-sm text-text-primary placeholder:text-text-secondary',
|
|
14
15
|
'focus-visible:outline-none focus-visible:ring-3',
|
|
15
16
|
'data-disabled:cursor-not-allowed',
|
|
@@ -40,6 +41,11 @@ const selectInputVariants = cva([
|
|
|
40
41
|
},
|
|
41
42
|
empty: {
|
|
42
43
|
true: 'text-text-secondary'
|
|
44
|
+
},
|
|
45
|
+
size: {
|
|
46
|
+
default: 'h-36',
|
|
47
|
+
medium: 'h-32',
|
|
48
|
+
small: 'h-24'
|
|
43
49
|
}
|
|
44
50
|
},
|
|
45
51
|
compoundVariants: [
|
|
@@ -48,11 +54,17 @@ const selectInputVariants = cva([
|
|
|
48
54
|
empty: true,
|
|
49
55
|
className: 'pl-12'
|
|
50
56
|
}
|
|
51
|
-
]
|
|
57
|
+
],
|
|
58
|
+
defaultVariants: {
|
|
59
|
+
size: 'default'
|
|
60
|
+
}
|
|
52
61
|
});
|
|
53
|
-
const SelectInput = ({ placeholder = 'Choose...', className, ...rest })=>{
|
|
62
|
+
const SelectInput = ({ placeholder = 'Choose...', size = 'default', className, ...rest })=>{
|
|
54
63
|
const { selectedItems, disabled, multiple } = useSelectContext();
|
|
55
64
|
const isEmpty = selectedItems.length <= 0;
|
|
65
|
+
const overflowRenderer = useMemo(()=>createSelectInputOverflowRenderer(size), [
|
|
66
|
+
size
|
|
67
|
+
]);
|
|
56
68
|
return /*#__PURE__*/ jsx(Select.Control, {
|
|
57
69
|
className: "w-full max-w-full",
|
|
58
70
|
children: /*#__PURE__*/ jsx(Select.Trigger, {
|
|
@@ -61,7 +73,8 @@ const SelectInput = ({ placeholder = 'Choose...', className, ...rest })=>{
|
|
|
61
73
|
...rest,
|
|
62
74
|
className: cn(selectInputVariants({
|
|
63
75
|
empty: isEmpty,
|
|
64
|
-
multiple
|
|
76
|
+
multiple,
|
|
77
|
+
size
|
|
65
78
|
}), 'w-full max-w-full gap-8', className),
|
|
66
79
|
tabIndex: disabled ? -1 : 0,
|
|
67
80
|
children: [
|
|
@@ -69,9 +82,10 @@ const SelectInput = ({ placeholder = 'Choose...', className, ...rest })=>{
|
|
|
69
82
|
className: "flex items-center gap-4 flex-1 h-full pl-6 overflow-hidden",
|
|
70
83
|
items: selectedItems,
|
|
71
84
|
itemRenderer: (item)=>/*#__PURE__*/ jsx(SelectInputItemRenderer, {
|
|
72
|
-
item: item
|
|
85
|
+
item: item,
|
|
86
|
+
size: size
|
|
73
87
|
}, item.value),
|
|
74
|
-
overflowRenderer:
|
|
88
|
+
overflowRenderer: overflowRenderer
|
|
75
89
|
}) : /*#__PURE__*/ jsx(SelectValueText, {
|
|
76
90
|
placeholder: placeholder
|
|
77
91
|
}),
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
+
import { type TagProps } from '../../Tag';
|
|
2
3
|
import type { SelectDataItem } from '../types';
|
|
3
4
|
type SelectInputItemRendererProps = {
|
|
4
5
|
item: SelectDataItem;
|
|
6
|
+
/** `SelectInput`'s own size — chips scale down with it, see `TAG_SIZE_BY_SELECT_SIZE`. */
|
|
7
|
+
size?: 'small' | 'medium' | 'default';
|
|
5
8
|
};
|
|
9
|
+
export declare const TAG_SIZE_BY_SELECT_SIZE: Record<'small' | 'medium' | 'default', TagProps['size']>;
|
|
6
10
|
export declare const SelectInputItemRenderer: FC<SelectInputItemRendererProps>;
|
|
7
11
|
export {};
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useSelectContext } from "@ark-ui/react/select";
|
|
3
3
|
import { Tag, TagClose } from "../../Tag/index.js";
|
|
4
|
-
const
|
|
4
|
+
const TAG_SIZE_BY_SELECT_SIZE = {
|
|
5
|
+
small: 'medium',
|
|
6
|
+
medium: 'large',
|
|
7
|
+
default: 'large'
|
|
8
|
+
};
|
|
9
|
+
const SelectInputItemRenderer = ({ item, size = 'default' })=>{
|
|
5
10
|
const { value, setValue } = useSelectContext();
|
|
6
11
|
const handleRemove = ()=>{
|
|
7
12
|
const nextValue = value.filter((v)=>v !== item.value);
|
|
@@ -9,7 +14,7 @@ const SelectInputItemRenderer = ({ item })=>{
|
|
|
9
14
|
};
|
|
10
15
|
const Icon = item.icon;
|
|
11
16
|
return /*#__PURE__*/ jsxs(Tag, {
|
|
12
|
-
size:
|
|
17
|
+
size: TAG_SIZE_BY_SELECT_SIZE[size],
|
|
13
18
|
children: [
|
|
14
19
|
Icon && /*#__PURE__*/ jsx(Icon, {}),
|
|
15
20
|
item.label,
|
|
@@ -19,4 +24,4 @@ const SelectInputItemRenderer = ({ item })=>{
|
|
|
19
24
|
]
|
|
20
25
|
});
|
|
21
26
|
};
|
|
22
|
-
export { SelectInputItemRenderer };
|
|
27
|
+
export { SelectInputItemRenderer, TAG_SIZE_BY_SELECT_SIZE };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { SelectDataItem } from '../types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const createSelectInputOverflowRenderer: (size: "small" | "medium" | "default") => (items: SelectDataItem[]) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,32 +3,33 @@ import { cn } from "../../../utils/cn.js";
|
|
|
3
3
|
import { Popover, PopoverContent, PopoverTrigger } from "../../Popover/index.js";
|
|
4
4
|
import { HStack } from "../../Stack/index.js";
|
|
5
5
|
import { Tag } from "../../Tag/index.js";
|
|
6
|
+
import { TAG_SIZE_BY_SELECT_SIZE } from "./SelectInputItemRenderer.js";
|
|
6
7
|
const POPOVER_MAX_WIDTH = '256px';
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
const createSelectInputOverflowRenderer = (size)=>(items)=>/*#__PURE__*/ jsxs(Popover, {
|
|
9
|
+
children: [
|
|
10
|
+
/*#__PURE__*/ jsx(PopoverTrigger, {
|
|
11
|
+
className: cn('**:data-[slot=tag]:cursor-help'),
|
|
12
|
+
asChild: true,
|
|
13
|
+
children: /*#__PURE__*/ jsxs(Tag, {
|
|
14
|
+
size: TAG_SIZE_BY_SELECT_SIZE[size],
|
|
15
|
+
children: [
|
|
16
|
+
"+",
|
|
17
|
+
items.length
|
|
18
|
+
]
|
|
19
|
+
})
|
|
20
|
+
}),
|
|
21
|
+
/*#__PURE__*/ jsx(PopoverContent, {
|
|
22
|
+
minHeight: "auto",
|
|
23
|
+
maxWidth: POPOVER_MAX_WIDTH,
|
|
24
|
+
children: /*#__PURE__*/ jsx(HStack, {
|
|
25
|
+
gap: 4,
|
|
26
|
+
wrap: "wrap",
|
|
27
|
+
children: items.map((item)=>/*#__PURE__*/ jsx(Tag, {
|
|
28
|
+
size: "large",
|
|
29
|
+
children: item.label
|
|
30
|
+
}, item.value))
|
|
31
|
+
})
|
|
18
32
|
})
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
maxWidth: POPOVER_MAX_WIDTH,
|
|
23
|
-
children: /*#__PURE__*/ jsx(HStack, {
|
|
24
|
-
gap: 4,
|
|
25
|
-
wrap: "wrap",
|
|
26
|
-
children: items.map((item)=>/*#__PURE__*/ jsx(Tag, {
|
|
27
|
-
size: "large",
|
|
28
|
-
children: item.label
|
|
29
|
-
}, item.value))
|
|
30
|
-
})
|
|
31
|
-
})
|
|
32
|
-
]
|
|
33
|
-
});
|
|
34
|
-
export { SelectInputOverflowRenderer };
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
export { createSelectInputOverflowRenderer };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FC, type InputHTMLAttributes, type Ref } from 'react';
|
|
2
|
-
export interface SliderInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue'> {
|
|
2
|
+
export interface SliderInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'size'> {
|
|
3
3
|
/** Which thumb this box is bound to (0 = single/low, 1 = high). */
|
|
4
4
|
index?: number;
|
|
5
5
|
/** Ref to the real `<input>` node (analytics / focus management). */
|
|
@@ -8,10 +8,10 @@ const textareaPaddingVariants = cva('', {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const textareaHeightVariants = cva('min-h-[
|
|
11
|
+
const textareaHeightVariants = cva('min-h-[64px]', {
|
|
12
12
|
variants: {
|
|
13
13
|
size: {
|
|
14
|
-
small: 'min-h-[
|
|
14
|
+
small: 'min-h-[64px]',
|
|
15
15
|
medium: 'min-h-[72px]',
|
|
16
16
|
default: 'min-h-[76px]'
|
|
17
17
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { cloneElement, isValidElement } from "react";
|
|
3
3
|
import { Toast } from "@ark-ui/react/toast";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
|
-
import {
|
|
5
|
+
import { CircleCheck, Info, OctagonAlert, TriangleAlert } from "../../icons/index.js";
|
|
6
6
|
import { cn } from "../../utils/cn.js";
|
|
7
7
|
import { TestIdProvider } from "../../utils/testId.js";
|
|
8
8
|
import { Loader } from "../Loader/index.js";
|
|
@@ -24,20 +24,20 @@ const toastVariants = cva('group relative flex min-w-[256px] max-w-[560px] items
|
|
|
24
24
|
});
|
|
25
25
|
const toastIconMap = {
|
|
26
26
|
success: {
|
|
27
|
-
component:
|
|
28
|
-
className: 'text-
|
|
27
|
+
component: CircleCheck,
|
|
28
|
+
className: 'text-component-toast-ic-success'
|
|
29
29
|
},
|
|
30
30
|
error: {
|
|
31
31
|
component: OctagonAlert,
|
|
32
|
-
className: 'text-
|
|
32
|
+
className: 'text-component-toast-ic-destructive'
|
|
33
33
|
},
|
|
34
34
|
warning: {
|
|
35
35
|
component: TriangleAlert,
|
|
36
|
-
className: 'text-
|
|
36
|
+
className: 'text-component-toast-ic-warning'
|
|
37
37
|
},
|
|
38
38
|
info: {
|
|
39
39
|
component: Info,
|
|
40
|
-
className: 'text-
|
|
40
|
+
className: 'text-component-toast-ic-info'
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
const SIMPLE_TOAST_DURATION_MS = 5000;
|
|
@@ -22,7 +22,7 @@ const Toaster_Toaster = ()=>{
|
|
|
22
22
|
return /*#__PURE__*/ jsx(Portal, {
|
|
23
23
|
children: /*#__PURE__*/ jsx(Toaster, {
|
|
24
24
|
toaster: arkToasterInstance,
|
|
25
|
-
className: cn('fixed bottom-0 right-0 !z-[50] flex flex-col gap-12 p-24
|
|
25
|
+
className: cn('fixed bottom-0 right-0 !z-[50] flex flex-col gap-12 p-24 max-w-[560px] mx-auto', '[&_[data-scope=toast][data-part=root]]:[translate:var(--x)_var(--y)] [&_[data-scope=toast][data-part=root]]:scale-[var(--scale)] [&_[data-scope=toast][data-part=root]]:z-[var(--z-index)] [&_[data-scope=toast][data-part=root]]:h-[var(--height)] [&_[data-scope=toast][data-part=root]]:opacity-[var(--opacity)] [&_[data-scope=toast][data-part=root]]:[will-change:translate,opacity,scale]', '[&_[data-scope=toast][data-part=root]]:[transition-property:translate,scale,opacity,height,box-shadow] [&_[data-scope=toast][data-part=root]]:[transition-timing-function:ease] [&_[data-scope=toast][data-part=root]]:[transition-duration:300ms]', '[&_[data-scope=toast][data-part=root][data-state=closed]]:[transition-property:translate,scale,opacity] [&_[data-scope=toast][data-part=root][data-state=closed]]:[transition-timing-function:ease] [&_[data-scope=toast][data-part=root][data-state=closed]]:[transition-duration:150ms]', '[&_[data-scope=toast][data-part=root]:nth-child(n+4)]:hidden', '[&_[data-scope=toast][data-part=root]]:after:content-[""] [&_[data-scope=toast][data-part=root]]:after:absolute [&_[data-scope=toast][data-part=root]]:after:inset-0 [&_[data-scope=toast][data-part=root]]:after:rounded-[inherit] [&_[data-scope=toast][data-part=root]]:after:pointer-events-none [&_[data-scope=toast][data-part=root]]:after:z-[1] [&_[data-scope=toast][data-part=root]]:after:opacity-0 [&_[data-scope=toast][data-part=root]]:after:[transition:opacity_300ms_ease]', '[&_[data-scope=toast][data-part=root][data-state=closed]]:after:[transition:opacity_150ms_ease]', '[&_[data-scope=toast][data-part=root]:not([data-first]):not([data-stack])]:after:[background:--alpha(var(--color-white)/50%)] [&_[data-scope=toast][data-part=root]:not([data-first]):not([data-stack])]:after:opacity-100', '[&_[data-scope=toast][data-part=root]:nth-child(2):not([data-stack])]:after:[background:--alpha(var(--color-white)/20%)] [&_[data-scope=toast][data-part=root]:nth-child(2):not([data-stack])]:after:opacity-100'),
|
|
26
26
|
children: (toast)=>/*#__PURE__*/ jsx(Toast, {
|
|
27
27
|
toast: toast
|
|
28
28
|
}, toast.id)
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
+
export { TREE_DEFAULT_INDENT, type TreeDepthContextValue, TreeDepthProvider, useTreeDepth, useTreeGap, useTreeIndent, } from '../../utils/treeDepth';
|
|
1
2
|
declare const TREE_BASE_PADDING = 8;
|
|
2
|
-
interface TreeDepthContextValue {
|
|
3
|
-
depth: number;
|
|
4
|
-
indent: number;
|
|
5
|
-
gap: number | undefined;
|
|
6
|
-
}
|
|
7
|
-
export declare const TreeDepthProvider: import("react").Provider<TreeDepthContextValue>;
|
|
8
|
-
export declare function useTreeDepth(): number;
|
|
9
|
-
export declare function useTreeIndent(): number;
|
|
10
|
-
export declare function useTreeGap(): number | undefined;
|
|
11
3
|
export { TREE_BASE_PADDING };
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TREE_DEFAULT_INDENT, TreeDepthProvider, useTreeDepth, useTreeGap, useTreeIndent } from "../../utils/treeDepth.js";
|
|
2
2
|
const TREE_BASE_PADDING = 8;
|
|
3
|
-
|
|
4
|
-
const TreeDepthContext = createContext({
|
|
5
|
-
depth: 0,
|
|
6
|
-
indent: TREE_DEFAULT_INDENT,
|
|
7
|
-
gap: void 0
|
|
8
|
-
});
|
|
9
|
-
const TreeDepthProvider = TreeDepthContext.Provider;
|
|
10
|
-
function useTreeDepth() {
|
|
11
|
-
return useContext(TreeDepthContext).depth;
|
|
12
|
-
}
|
|
13
|
-
function useTreeIndent() {
|
|
14
|
-
return useContext(TreeDepthContext).indent;
|
|
15
|
-
}
|
|
16
|
-
function useTreeGap() {
|
|
17
|
-
return useContext(TreeDepthContext).gap;
|
|
18
|
-
}
|
|
19
|
-
export { TREE_BASE_PADDING, TreeDepthProvider, useTreeDepth, useTreeGap, useTreeIndent };
|
|
3
|
+
export { TREE_BASE_PADDING, TREE_DEFAULT_INDENT, TreeDepthProvider, useTreeDepth, useTreeGap, useTreeIndent };
|