@mechane-ai/elements 0.0.0-stage → 0.4.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/LICENSE +202 -0
- package/NOTICE +32 -0
- package/README.md +119 -2
- package/dist/accessibility-C-aIZ1Yx.js +15 -0
- package/dist/ai.js +323 -0
- package/dist/assets/stylex.css +2664 -0
- package/dist/categorical-values-cMX7Mykq.js +58 -0
- package/dist/chart-frame-bX0VLC_W.js +152 -0
- package/dist/chart-input-qnM44oen.js +21 -0
- package/dist/charts/cartesian.js +1040 -0
- package/dist/charts/distribution.js +610 -0
- package/dist/charts/graph.js +231 -0
- package/dist/charts/hierarchy.js +109 -0
- package/dist/charts/matrix.js +439 -0
- package/dist/charts/timeline.js +198 -0
- package/dist/charts.js +1 -0
- package/dist/code-block-BiMcfdlB.js +175 -0
- package/dist/collections.js +466 -0
- package/dist/content/code.js +1 -0
- package/dist/content/diff.js +96 -0
- package/dist/content/link.js +1 -0
- package/dist/content/markdown.js +155 -0
- package/dist/content/tree.js +77 -0
- package/dist/content-link-Bm-Td5wm.js +26 -0
- package/dist/content.js +318 -0
- package/dist/feedback.js +1 -0
- package/dist/forms/dates.js +168 -0
- package/dist/forms.js +1 -0
- package/dist/index.js +1 -0
- package/dist/layout.js +379 -0
- package/dist/navigation/commands.js +80 -0
- package/dist/navigation-yxK3iQXo.js +39 -0
- package/dist/navigation.js +58 -0
- package/dist/overlays.js +1 -0
- package/dist/packages/ai/src/approval.d.ts +29 -0
- package/dist/packages/ai/src/conversation.d.ts +34 -0
- package/dist/packages/ai/src/index.d.ts +10 -0
- package/dist/packages/ai/src/message.d.ts +19 -0
- package/dist/packages/ai/src/prompt-input.d.ts +25 -0
- package/dist/packages/ai/src/sources.d.ts +17 -0
- package/dist/packages/charts/src/cartesian/bar-chart.d.ts +24 -0
- package/dist/packages/charts/src/cartesian/breakdown-bar.d.ts +12 -0
- package/dist/packages/charts/src/cartesian/index.d.ts +12 -0
- package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +37 -0
- package/dist/packages/charts/src/cartesian/sparkline.d.ts +11 -0
- package/dist/packages/charts/src/cartesian/time-series-data.d.ts +54 -0
- package/dist/packages/charts/src/cartesian/time-series-line.d.ts +9 -0
- package/dist/packages/charts/src/cartesian/time-series.d.ts +29 -0
- package/dist/packages/charts/src/categorical-values.d.ts +24 -0
- package/dist/packages/charts/src/chart-frame.d.ts +34 -0
- package/dist/packages/charts/src/chart-input.d.ts +10 -0
- package/dist/packages/charts/src/chart-theme.d.ts +48 -0
- package/dist/packages/charts/src/distribution/distribution-input.d.ts +14 -0
- package/dist/packages/charts/src/distribution/distribution-plot.d.ts +135 -0
- package/dist/packages/charts/src/distribution/ecdf.d.ts +23 -0
- package/dist/packages/charts/src/distribution/histogram.d.ts +26 -0
- package/dist/packages/charts/src/distribution/index.d.ts +8 -0
- package/dist/packages/charts/src/distribution/interval-plot.d.ts +24 -0
- package/dist/packages/charts/src/distribution/ranked-bars.d.ts +22 -0
- package/dist/packages/charts/src/graph/index.d.ts +2 -0
- package/dist/packages/charts/src/graph/relation-graph.d.ts +45 -0
- package/dist/packages/charts/src/hierarchy/index.d.ts +2 -0
- package/dist/packages/charts/src/hierarchy/treemap.d.ts +12 -0
- package/dist/packages/charts/src/index.d.ts +4 -0
- package/dist/packages/charts/src/matrix/color-legend.d.ts +7 -0
- package/dist/packages/charts/src/matrix/heatmap-scale.d.ts +8 -0
- package/dist/packages/charts/src/matrix/index.d.ts +7 -0
- package/dist/packages/charts/src/matrix/matrix.d.ts +34 -0
- package/dist/packages/charts/src/matrix/token-heatmap.d.ts +20 -0
- package/dist/packages/charts/src/plot-width.d.ts +5 -0
- package/dist/packages/charts/src/timeline/index.d.ts +2 -0
- package/dist/packages/charts/src/timeline/waterfall.d.ts +34 -0
- package/dist/packages/collections/src/collection-controls.d.ts +41 -0
- package/dist/packages/collections/src/data-table.d.ts +49 -0
- package/dist/packages/collections/src/index.d.ts +10 -0
- package/dist/packages/collections/src/inspector.d.ts +16 -0
- package/dist/packages/collections/src/list-footer.d.ts +6 -0
- package/dist/packages/collections/src/metrics.d.ts +9 -0
- package/dist/packages/collections/src/table.d.ts +17 -0
- package/dist/packages/collections/src/timestamp.d.ts +7 -0
- package/dist/packages/content/src/code/code-block.d.ts +22 -0
- package/dist/packages/content/src/code/index.d.ts +2 -0
- package/dist/packages/content/src/code/use-highlighted-code.d.ts +9 -0
- package/dist/packages/content/src/content-link.d.ts +8 -0
- package/dist/packages/content/src/diff/diff-source.d.ts +32 -0
- package/dist/packages/content/src/diff/diff-viewer.d.ts +3 -0
- package/dist/packages/content/src/diff/index.d.ts +2 -0
- package/dist/packages/content/src/diff/pierre-diff.d.ts +14 -0
- package/dist/packages/content/src/index.d.ts +8 -0
- package/dist/packages/content/src/json-viewer.d.ts +11 -0
- package/dist/packages/content/src/link.d.ts +2 -0
- package/dist/packages/content/src/log-viewer.d.ts +9 -0
- package/dist/packages/content/src/markdown/index.d.ts +2 -0
- package/dist/packages/content/src/markdown/markdown.d.ts +7 -0
- package/dist/packages/content/src/pierre-theme.d.ts +36 -0
- package/dist/packages/content/src/stack-trace.d.ts +16 -0
- package/dist/packages/content/src/trace.d.ts +35 -0
- package/dist/packages/content/src/tree/file-tree-types.d.ts +12 -0
- package/dist/packages/content/src/tree/file-tree.d.ts +3 -0
- package/dist/packages/content/src/tree/index.d.ts +2 -0
- package/dist/packages/content/src/tree/pierre-tree.d.ts +3 -0
- package/dist/packages/core/src/actions.d.ts +31 -0
- package/dist/packages/core/src/avatar.d.ts +10 -0
- package/dist/packages/core/src/copy-value.d.ts +9 -0
- package/dist/packages/core/src/disclosure.d.ts +33 -0
- package/dist/packages/core/src/index.d.ts +7 -0
- package/dist/packages/core/src/surfaces.d.ts +18 -0
- package/dist/packages/core/src/text.d.ts +30 -0
- package/dist/packages/feedback/src/feedback.d.ts +11 -0
- package/dist/packages/feedback/src/index.d.ts +7 -0
- package/dist/packages/feedback/src/loading.d.ts +7 -0
- package/dist/packages/feedback/src/progress.d.ts +10 -0
- package/dist/packages/feedback/src/skeleton.d.ts +18 -0
- package/dist/packages/feedback/src/toast.d.ts +28 -0
- package/dist/packages/forms/src/combobox.d.ts +81 -0
- package/dist/packages/forms/src/dates/calendar.d.ts +32 -0
- package/dist/packages/forms/src/dates/date-range-picker.d.ts +16 -0
- package/dist/packages/forms/src/dates/index.d.ts +4 -0
- package/dist/packages/forms/src/field-styles.d.ts +66 -0
- package/dist/packages/forms/src/form-controls.d.ts +81 -0
- package/dist/packages/forms/src/forms.d.ts +32 -0
- package/dist/packages/forms/src/index.d.ts +7 -0
- package/dist/packages/forms/src/select.d.ts +44 -0
- package/dist/packages/forms/src/selection-styles.d.ts +110 -0
- package/dist/packages/forms/src/selection.d.ts +57 -0
- package/dist/packages/forms/src/settings-row.d.ts +8 -0
- package/dist/packages/foundations/src/accessibility.d.ts +14 -0
- package/dist/packages/foundations/src/control-state.d.ts +67 -0
- package/dist/packages/foundations/src/overlay-styles.d.ts +46 -0
- package/dist/packages/foundations/src/popup-styles.d.ts +84 -0
- package/dist/packages/foundations/src/style-composition.d.ts +22 -0
- package/dist/packages/foundations/src/theme.d.ts +16 -0
- package/dist/packages/foundations/src/tokens.stylex.d.ts +143 -0
- package/dist/packages/layout/src/app-shell.d.ts +9 -0
- package/dist/packages/layout/src/detail-page.d.ts +6 -0
- package/dist/packages/layout/src/frame.stylex.d.ts +23 -0
- package/dist/packages/layout/src/index.d.ts +6 -0
- package/dist/packages/layout/src/page-toolbar.d.ts +14 -0
- package/dist/packages/layout/src/resizable.d.ts +27 -0
- package/dist/packages/layout/src/sidebar.d.ts +46 -0
- package/dist/packages/navigation/src/commands/command.d.ts +37 -0
- package/dist/packages/navigation/src/commands/index.d.ts +2 -0
- package/dist/packages/navigation/src/index.d.ts +3 -0
- package/dist/packages/navigation/src/navigation.d.ts +24 -0
- package/dist/packages/navigation/src/skip-link.d.ts +6 -0
- package/dist/packages/navigation/src/tabs.d.ts +19 -0
- package/dist/packages/overlays/src/alert-dialog.d.ts +18 -0
- package/dist/packages/overlays/src/dialog.d.ts +27 -0
- package/dist/packages/overlays/src/drawer.d.ts +33 -0
- package/dist/packages/overlays/src/index.d.ts +7 -0
- package/dist/packages/overlays/src/menu.d.ts +51 -0
- package/dist/packages/overlays/src/popover.d.ts +24 -0
- package/dist/packages/overlays/src/preview.d.ts +17 -0
- package/dist/packages/overlays/src/tooltip.d.ts +18 -0
- package/dist/pierre-diff-CZdzgiYm.js +66 -0
- package/dist/pierre-theme-BpESNIsV.js +96 -0
- package/dist/pierre-tree-qZVvI5c1.js +106 -0
- package/dist/plot-width--OgdohB5.js +18 -0
- package/dist/popup-styles-CvtZDE2t.js +135 -0
- package/dist/src-BfvOOeA3.js +272 -0
- package/dist/src-CbYaLvhD.js +671 -0
- package/dist/src-CfDf8TY8.js +466 -0
- package/dist/src-CvpS9XIR.js +1077 -0
- package/dist/style-composition-uYlczSsB.js +9 -0
- package/dist/theme.js +7 -0
- package/dist/tokens.js +138 -0
- package/package.json +148 -3
- package/packages/foundations/src/tokens.stylex.ts +145 -0
- package/styles.css +2 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
export declare const fieldStyles: Readonly<{
|
|
3
|
+
readonly root: Readonly<{
|
|
4
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
5
|
+
readonly flexDirection: stylex.StyleXClassNameFor<"flexDirection", "column">;
|
|
6
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
7
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
8
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
|
|
9
|
+
}>;
|
|
10
|
+
readonly label: Readonly<{
|
|
11
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
12
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
13
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
14
|
+
}>;
|
|
15
|
+
readonly description: Readonly<{
|
|
16
|
+
readonly margin: stylex.StyleXClassNameFor<"margin", 0>;
|
|
17
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
18
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
19
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
20
|
+
}>;
|
|
21
|
+
readonly error: Readonly<{
|
|
22
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
23
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
24
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
25
|
+
}>;
|
|
26
|
+
readonly input: Readonly<{
|
|
27
|
+
readonly display: stylex.StyleXClassNameFor<"display", "block">;
|
|
28
|
+
readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
|
|
29
|
+
readonly width: stylex.StyleXClassNameFor<"width", "100%">;
|
|
30
|
+
readonly minHeight: stylex.StyleXClassNameFor<"minHeight", string>;
|
|
31
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
32
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
33
|
+
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 1>;
|
|
34
|
+
readonly borderStyle: stylex.StyleXClassNameFor<"borderStyle", "solid">;
|
|
35
|
+
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", string>;
|
|
36
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
37
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
|
|
38
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
|
|
39
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
|
|
40
|
+
readonly WebkitFontSmoothing: stylex.StyleXClassNameFor<"WebkitFontSmoothing", "antialiased">;
|
|
41
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
42
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
43
|
+
readonly ':focus-visible': stylex.StyleXClassNameFor<":focus-visible", {
|
|
44
|
+
readonly outlineWidth: stylex.StyleXVar<string>;
|
|
45
|
+
readonly outlineStyle: "solid";
|
|
46
|
+
readonly outlineColor: stylex.StyleXVar<string>;
|
|
47
|
+
readonly outlineOffset: 1;
|
|
48
|
+
}>;
|
|
49
|
+
readonly ':is([data-invalid], [aria-invalid="true"])': stylex.StyleXClassNameFor<":is([data-invalid], [aria-invalid=\"true\"])", {
|
|
50
|
+
readonly borderColor: stylex.StyleXVar<string>;
|
|
51
|
+
}>;
|
|
52
|
+
readonly ':disabled': stylex.StyleXClassNameFor<":disabled", {
|
|
53
|
+
readonly color: stylex.StyleXVar<string>;
|
|
54
|
+
readonly backgroundColor: stylex.StyleXVar<string>;
|
|
55
|
+
readonly cursor: "not-allowed";
|
|
56
|
+
}>;
|
|
57
|
+
readonly '::placeholder': stylex.StyleXClassNameFor<"::placeholder", {
|
|
58
|
+
readonly color: stylex.StyleXVar<string>;
|
|
59
|
+
}>;
|
|
60
|
+
}>;
|
|
61
|
+
readonly textarea: Readonly<{
|
|
62
|
+
readonly minHeight: stylex.StyleXClassNameFor<"minHeight", 144>;
|
|
63
|
+
readonly resize: stylex.StyleXClassNameFor<"resize", "vertical">;
|
|
64
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
65
|
+
}>;
|
|
66
|
+
}>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Fieldset as BaseFieldset } from '@base-ui/react/fieldset';
|
|
2
|
+
import { Input as BaseInput } from '@base-ui/react/input';
|
|
3
|
+
import { NumberField as BaseNumberField } from '@base-ui/react/number-field';
|
|
4
|
+
import { Slider as BaseSlider } from '@base-ui/react/slider';
|
|
5
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
6
|
+
import type { ReadOnlyValueProperties, ValueStateProperties } from '../../foundations/src/control-state.ts';
|
|
7
|
+
import type { PlacementStyle } from '../../foundations/src/style-composition.ts';
|
|
8
|
+
import type { InputProps } from './forms.tsx';
|
|
9
|
+
type FieldsetRootProps = ComponentProps<typeof BaseFieldset.Root> & {
|
|
10
|
+
readonly xstyle?: PlacementStyle;
|
|
11
|
+
};
|
|
12
|
+
type FieldsetLegendProps = ComponentProps<typeof BaseFieldset.Legend>;
|
|
13
|
+
type InputGroupRootProps = ComponentProps<'div'> & {
|
|
14
|
+
readonly xstyle?: PlacementStyle;
|
|
15
|
+
};
|
|
16
|
+
type InputGroupAddonProps = ComponentProps<'span'>;
|
|
17
|
+
type NumberFieldRootProps = Omit<ComponentProps<typeof BaseNumberField.Root>, 'value' | 'defaultValue' | 'onValueChange' | 'locale'> & (ValueStateProperties<number | null, NonNullable<BaseNumberField.Root.Props['onValueChange']>, number> | ReadOnlyValueProperties<number | null, NonNullable<BaseNumberField.Root.Props['onValueChange']>>) & {
|
|
18
|
+
readonly locale: string;
|
|
19
|
+
readonly xstyle?: PlacementStyle;
|
|
20
|
+
};
|
|
21
|
+
type NumberFieldGroupProps = ComponentProps<typeof BaseNumberField.Group>;
|
|
22
|
+
type NumberFieldInputProps = ComponentProps<typeof BaseNumberField.Input>;
|
|
23
|
+
type NumberFieldIncrementProps = ComponentProps<typeof BaseNumberField.Increment>;
|
|
24
|
+
type NumberFieldDecrementProps = ComponentProps<typeof BaseNumberField.Decrement>;
|
|
25
|
+
type SliderRootProps<Value extends number | ReadonlyArray<number>> = Omit<BaseSlider.Root.Props<Value>, 'value' | 'defaultValue' | 'onValueChange' | 'locale'> & ValueStateProperties<Value, NonNullable<BaseSlider.Root.Props<Value>['onValueChange']>> & {
|
|
26
|
+
readonly locale: string;
|
|
27
|
+
readonly xstyle?: PlacementStyle;
|
|
28
|
+
};
|
|
29
|
+
type SliderControlProps = ComponentProps<typeof BaseSlider.Control>;
|
|
30
|
+
type SliderTrackProps = ComponentProps<typeof BaseSlider.Track>;
|
|
31
|
+
type SliderIndicatorProps = ComponentProps<typeof BaseSlider.Indicator>;
|
|
32
|
+
type SliderThumbProps = ComponentProps<typeof BaseSlider.Thumb>;
|
|
33
|
+
type SliderLabelProps = ComponentProps<typeof BaseSlider.Label>;
|
|
34
|
+
type SliderValueProps = ComponentProps<typeof BaseSlider.Value>;
|
|
35
|
+
type FilePickerProps = Omit<ComponentProps<typeof BaseInput>, 'type' | 'value' | 'defaultValue' | 'onValueChange'> & {
|
|
36
|
+
readonly xstyle?: PlacementStyle;
|
|
37
|
+
};
|
|
38
|
+
declare function FieldsetRoot({ className, style, xstyle, ...props }: FieldsetRootProps): ReactNode;
|
|
39
|
+
declare function FieldsetLegend({ className, style, ...props }: FieldsetLegendProps): ReactNode;
|
|
40
|
+
declare function InputGroupRoot({ xstyle, ...props }: InputGroupRootProps): ReactNode;
|
|
41
|
+
declare function InputGroupAddon(props: InputGroupAddonProps): ReactNode;
|
|
42
|
+
declare function InputGroupInput({ className, style, xstyle, ...props }: InputProps): ReactNode;
|
|
43
|
+
declare function NumberFieldRoot({ className, style, xstyle, ...props }: NumberFieldRootProps): ReactNode;
|
|
44
|
+
declare function NumberFieldGroup({ className, style, ...props }: NumberFieldGroupProps): ReactNode;
|
|
45
|
+
declare function NumberFieldInput({ className, style, ...props }: NumberFieldInputProps): ReactNode;
|
|
46
|
+
declare function NumberFieldIncrement({ children, 'aria-label': label, className, style, ...props }: NumberFieldIncrementProps): ReactNode;
|
|
47
|
+
declare function NumberFieldDecrement({ children, 'aria-label': label, className, style, ...props }: NumberFieldDecrementProps): ReactNode;
|
|
48
|
+
declare function SliderRoot<Value extends number | ReadonlyArray<number>>({ className, style, xstyle, ...props }: SliderRootProps<Value>): ReactNode;
|
|
49
|
+
declare function SliderControl({ className, style, ...props }: SliderControlProps): ReactNode;
|
|
50
|
+
declare function SliderTrack({ className, style, ...props }: SliderTrackProps): ReactNode;
|
|
51
|
+
declare function SliderIndicator({ className, style, ...props }: SliderIndicatorProps): ReactNode;
|
|
52
|
+
declare function SliderThumb({ className, style, ...props }: SliderThumbProps): ReactNode;
|
|
53
|
+
declare function SliderLabel({ className, style, ...props }: SliderLabelProps): ReactNode;
|
|
54
|
+
declare function SliderValue({ className, style, ...props }: SliderValueProps): ReactNode;
|
|
55
|
+
export declare function FilePicker({ className, style, xstyle, ...props }: FilePickerProps): ReactNode;
|
|
56
|
+
export declare const Fieldset: {
|
|
57
|
+
Root: typeof FieldsetRoot;
|
|
58
|
+
Legend: typeof FieldsetLegend;
|
|
59
|
+
};
|
|
60
|
+
export declare const InputGroup: {
|
|
61
|
+
Root: typeof InputGroupRoot;
|
|
62
|
+
Addon: typeof InputGroupAddon;
|
|
63
|
+
Input: typeof InputGroupInput;
|
|
64
|
+
};
|
|
65
|
+
export declare const NumberField: {
|
|
66
|
+
Root: typeof NumberFieldRoot;
|
|
67
|
+
Group: typeof NumberFieldGroup;
|
|
68
|
+
Input: typeof NumberFieldInput;
|
|
69
|
+
Increment: typeof NumberFieldIncrement;
|
|
70
|
+
Decrement: typeof NumberFieldDecrement;
|
|
71
|
+
};
|
|
72
|
+
export declare const Slider: {
|
|
73
|
+
Root: typeof SliderRoot;
|
|
74
|
+
Label: typeof SliderLabel;
|
|
75
|
+
Value: typeof SliderValue;
|
|
76
|
+
Control: typeof SliderControl;
|
|
77
|
+
Track: typeof SliderTrack;
|
|
78
|
+
Indicator: typeof SliderIndicator;
|
|
79
|
+
Thumb: typeof SliderThumb;
|
|
80
|
+
};
|
|
81
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Field as BaseField } from '@base-ui/react/field';
|
|
2
|
+
import { Input as BaseInput } from '@base-ui/react/input';
|
|
3
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
4
|
+
import type { TextValueProperties } from '../../foundations/src/control-state.ts';
|
|
5
|
+
import type { PlacementStyle } from '../../foundations/src/style-composition.ts';
|
|
6
|
+
type FieldRootProps = ComponentProps<typeof BaseField.Root> & {
|
|
7
|
+
readonly xstyle?: PlacementStyle;
|
|
8
|
+
};
|
|
9
|
+
type FieldLabelProps = ComponentProps<typeof BaseField.Label>;
|
|
10
|
+
type FieldDescriptionProps = ComponentProps<typeof BaseField.Description>;
|
|
11
|
+
type FieldErrorProps = ComponentProps<typeof BaseField.Error>;
|
|
12
|
+
type BaseInputProps = ComponentProps<typeof BaseInput>;
|
|
13
|
+
export type InputProps = Omit<BaseInputProps, 'value' | 'defaultValue' | 'onChange' | 'onValueChange' | 'readOnly'> & TextValueProperties<NonNullable<BaseInputProps['value']>, NonNullable<BaseInputProps['onChange']>, NonNullable<BaseInputProps['onValueChange']>> & {
|
|
14
|
+
readonly xstyle?: PlacementStyle;
|
|
15
|
+
};
|
|
16
|
+
type NativeTextareaProps = ComponentProps<'textarea'>;
|
|
17
|
+
type TextareaProps = Omit<NativeTextareaProps, 'value' | 'defaultValue' | 'onChange' | 'readOnly'> & TextValueProperties<NonNullable<NativeTextareaProps['value']>, NonNullable<NativeTextareaProps['onChange']>, NonNullable<BaseInputProps['onValueChange']>> & {
|
|
18
|
+
readonly xstyle?: PlacementStyle;
|
|
19
|
+
};
|
|
20
|
+
declare function FieldRoot({ className, style, xstyle, ...props }: FieldRootProps): ReactNode;
|
|
21
|
+
declare function FieldLabel({ className, style, ...props }: FieldLabelProps): ReactNode;
|
|
22
|
+
declare function FieldDescription({ className, style, ...props }: FieldDescriptionProps): ReactNode;
|
|
23
|
+
declare function FieldError({ className, style, ...props }: FieldErrorProps): ReactNode;
|
|
24
|
+
export declare const Field: {
|
|
25
|
+
Root: typeof FieldRoot;
|
|
26
|
+
Label: typeof FieldLabel;
|
|
27
|
+
Description: typeof FieldDescription;
|
|
28
|
+
Error: typeof FieldError;
|
|
29
|
+
};
|
|
30
|
+
export declare function Input({ className, style, xstyle, ...props }: InputProps): ReactNode;
|
|
31
|
+
export declare function Textarea({ value, defaultValue, onValueChange, name, disabled, readOnly, required, className, style, xstyle, ...props }: TextareaProps): ReactNode;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Combobox } from './combobox.tsx';
|
|
2
|
+
export { FilePicker, Fieldset, InputGroup, NumberField, Slider } from './form-controls.tsx';
|
|
3
|
+
export { Field, Input, Textarea } from './forms.tsx';
|
|
4
|
+
export { Select } from './select.tsx';
|
|
5
|
+
export { Checkbox, RadioGroup, Switch, ToggleGroup } from './selection.tsx';
|
|
6
|
+
export type { SettingsRowProps } from './settings-row.tsx';
|
|
7
|
+
export { SettingsRow } from './settings-row.tsx';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Select as BaseSelect } from '@base-ui/react/select';
|
|
2
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import type { OpenStateProperties, ReadOnlyValueProperties, ValueStateProperties } from '../../foundations/src/control-state.ts';
|
|
4
|
+
import type { ControlStyle, PlacementStyle } from '../../foundations/src/style-composition.ts';
|
|
5
|
+
type SelectVariant = 'outline' | 'ghost';
|
|
6
|
+
type SelectRootProps<Value, Multiple extends boolean | undefined> = Omit<BaseSelect.Root.Props<Value, Multiple>, 'value' | 'defaultValue' | 'onValueChange' | 'open' | 'defaultOpen' | 'onOpenChange'> & OpenStateProperties<NonNullable<BaseSelect.Root.Props<Value, Multiple>['onOpenChange']>> & (ValueStateProperties<Exclude<BaseSelect.Root.Props<Value, Multiple>['value'], undefined>, NonNullable<BaseSelect.Root.Props<Value, Multiple>['onValueChange']>> | ReadOnlyValueProperties<Exclude<BaseSelect.Root.Props<Value, Multiple>['value'], undefined>, NonNullable<BaseSelect.Root.Props<Value, Multiple>['onValueChange']>>);
|
|
7
|
+
type SelectTriggerProps = ComponentProps<typeof BaseSelect.Trigger> & {
|
|
8
|
+
readonly variant?: SelectVariant;
|
|
9
|
+
readonly xstyle?: ControlStyle;
|
|
10
|
+
};
|
|
11
|
+
type SelectValueProps = ComponentProps<typeof BaseSelect.Value> & {
|
|
12
|
+
readonly xstyle?: PlacementStyle;
|
|
13
|
+
};
|
|
14
|
+
type SelectIconProps = ComponentProps<typeof BaseSelect.Icon>;
|
|
15
|
+
type SelectPositionerProps = ComponentProps<typeof BaseSelect.Positioner> & {
|
|
16
|
+
readonly xstyle?: PlacementStyle;
|
|
17
|
+
};
|
|
18
|
+
type SelectPopupProps = ComponentProps<typeof BaseSelect.Popup>;
|
|
19
|
+
type SelectItemProps = ComponentProps<typeof BaseSelect.Item>;
|
|
20
|
+
type SelectItemTextProps = ComponentProps<typeof BaseSelect.ItemText>;
|
|
21
|
+
type SelectItemIndicatorProps = ComponentProps<typeof BaseSelect.ItemIndicator>;
|
|
22
|
+
declare function SelectRoot<Value, Multiple extends boolean | undefined = false>(props: SelectRootProps<Value, Multiple>): ReactNode;
|
|
23
|
+
declare function SelectTrigger({ variant, className, style, xstyle, ...props }: SelectTriggerProps): ReactNode;
|
|
24
|
+
declare function SelectValue({ className, style, xstyle, ...props }: SelectValueProps): ReactNode;
|
|
25
|
+
declare function SelectIcon({ className, style, ...props }: SelectIconProps): ReactNode;
|
|
26
|
+
declare function SelectPositioner({ className, style, xstyle, sideOffset, alignItemWithTrigger, ...props }: SelectPositionerProps): ReactNode;
|
|
27
|
+
declare function SelectPopup({ className, style, ...props }: SelectPopupProps): ReactNode;
|
|
28
|
+
declare function SelectItem({ className, style, ...props }: SelectItemProps): ReactNode;
|
|
29
|
+
declare function SelectItemText({ className, style, ...props }: SelectItemTextProps): ReactNode;
|
|
30
|
+
declare function SelectItemIndicator({ className, style, ...props }: SelectItemIndicatorProps): ReactNode;
|
|
31
|
+
export declare const Select: {
|
|
32
|
+
Root: typeof SelectRoot;
|
|
33
|
+
Trigger: typeof SelectTrigger;
|
|
34
|
+
Value: typeof SelectValue;
|
|
35
|
+
Icon: typeof SelectIcon;
|
|
36
|
+
Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
37
|
+
Positioner: typeof SelectPositioner;
|
|
38
|
+
Popup: typeof SelectPopup;
|
|
39
|
+
List: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectListProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
40
|
+
Item: typeof SelectItem;
|
|
41
|
+
ItemText: typeof SelectItemText;
|
|
42
|
+
ItemIndicator: typeof SelectItemIndicator;
|
|
43
|
+
};
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
import { conditions } from '../../foundations/src/tokens.stylex.ts';
|
|
3
|
+
export declare const selectionStyles: Readonly<{
|
|
4
|
+
readonly trigger: Readonly<{
|
|
5
|
+
readonly display: stylex.StyleXClassNameFor<"display", "inline-flex">;
|
|
6
|
+
readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
|
|
7
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
8
|
+
readonly justifyContent: stylex.StyleXClassNameFor<"justifyContent", "space-between">;
|
|
9
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
10
|
+
readonly minHeight: stylex.StyleXClassNameFor<"minHeight", string>;
|
|
11
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", 0>;
|
|
12
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
|
|
13
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
14
|
+
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 1>;
|
|
15
|
+
readonly borderStyle: stylex.StyleXClassNameFor<"borderStyle", "solid">;
|
|
16
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
17
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
|
|
18
|
+
readonly WebkitFontSmoothing: stylex.StyleXClassNameFor<"WebkitFontSmoothing", "antialiased">;
|
|
19
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
20
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
21
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "left">;
|
|
22
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
23
|
+
readonly cursor: stylex.StyleXClassNameFor<"cursor", "pointer">;
|
|
24
|
+
readonly ':hover:not([data-disabled])': stylex.StyleXClassNameFor<":hover:not([data-disabled])", {
|
|
25
|
+
readonly backgroundColor: {
|
|
26
|
+
readonly [conditions.hoverPointer]: stylex.StyleXVar<string>;
|
|
27
|
+
};
|
|
28
|
+
}>;
|
|
29
|
+
readonly ':is([data-disabled])': stylex.StyleXClassNameFor<":is([data-disabled])", {
|
|
30
|
+
readonly opacity: stylex.StyleXVar<string>;
|
|
31
|
+
readonly cursor: "default";
|
|
32
|
+
}>;
|
|
33
|
+
readonly ':is([data-invalid])': stylex.StyleXClassNameFor<":is([data-invalid])", {
|
|
34
|
+
readonly borderColor: stylex.StyleXVar<string>;
|
|
35
|
+
}>;
|
|
36
|
+
readonly ':focus-visible': stylex.StyleXClassNameFor<":focus-visible", {
|
|
37
|
+
readonly outlineWidth: stylex.StyleXVar<string>;
|
|
38
|
+
readonly outlineStyle: "solid";
|
|
39
|
+
readonly outlineColor: stylex.StyleXVar<string>;
|
|
40
|
+
readonly outlineOffset: `calc(0px - ${stylex.StyleXVar<string>})`;
|
|
41
|
+
}>;
|
|
42
|
+
}>;
|
|
43
|
+
readonly outlined: Readonly<{
|
|
44
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
45
|
+
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", string>;
|
|
46
|
+
}>;
|
|
47
|
+
readonly ghost: Readonly<{
|
|
48
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "transparent">;
|
|
49
|
+
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", "transparent">;
|
|
50
|
+
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 0>;
|
|
51
|
+
}>;
|
|
52
|
+
readonly value: Readonly<{
|
|
53
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
54
|
+
readonly flex: stylex.StyleXClassNameFor<"flex", 1>;
|
|
55
|
+
readonly overflow: stylex.StyleXClassNameFor<"overflow", "hidden">;
|
|
56
|
+
readonly textOverflow: stylex.StyleXClassNameFor<"textOverflow", "ellipsis">;
|
|
57
|
+
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "nowrap">;
|
|
58
|
+
}>;
|
|
59
|
+
readonly icon: Readonly<{
|
|
60
|
+
readonly display: stylex.StyleXClassNameFor<"display", "inline-flex">;
|
|
61
|
+
readonly flexShrink: stylex.StyleXClassNameFor<"flexShrink", 0>;
|
|
62
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
63
|
+
}>;
|
|
64
|
+
readonly positioner: Readonly<{
|
|
65
|
+
readonly zIndex: stylex.StyleXClassNameFor<"zIndex", string>;
|
|
66
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", "var(--anchor-width)">;
|
|
67
|
+
readonly maxWidth: stylex.StyleXClassNameFor<"maxWidth", "calc(100vw - 16px)">;
|
|
68
|
+
}>;
|
|
69
|
+
readonly popup: Readonly<{
|
|
70
|
+
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 1>;
|
|
71
|
+
readonly borderStyle: stylex.StyleXClassNameFor<"borderStyle", "solid">;
|
|
72
|
+
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", string>;
|
|
73
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
74
|
+
readonly padding: stylex.StyleXClassNameFor<"padding", string>;
|
|
75
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
76
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
77
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
|
|
78
|
+
readonly WebkitFontSmoothing: stylex.StyleXClassNameFor<"WebkitFontSmoothing", "antialiased">;
|
|
79
|
+
readonly boxShadow: stylex.StyleXClassNameFor<"boxShadow", string>;
|
|
80
|
+
readonly maxHeight: stylex.StyleXClassNameFor<"maxHeight", "var(--available-height)">;
|
|
81
|
+
readonly overflowY: stylex.StyleXClassNameFor<"overflowY", "auto">;
|
|
82
|
+
readonly overscrollBehavior: stylex.StyleXClassNameFor<"overscrollBehavior", "contain">;
|
|
83
|
+
}>;
|
|
84
|
+
readonly option: Readonly<{
|
|
85
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
86
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
87
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
88
|
+
readonly minHeight: stylex.StyleXClassNameFor<"minHeight", string>;
|
|
89
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
|
|
90
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
91
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
|
|
92
|
+
readonly WebkitFontSmoothing: stylex.StyleXClassNameFor<"WebkitFontSmoothing", "antialiased">;
|
|
93
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
94
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
95
|
+
readonly cursor: stylex.StyleXClassNameFor<"cursor", "pointer">;
|
|
96
|
+
readonly outlineWidth: stylex.StyleXClassNameFor<"outlineWidth", 0>;
|
|
97
|
+
readonly ':is([data-highlighted])': stylex.StyleXClassNameFor<":is([data-highlighted])", {
|
|
98
|
+
readonly backgroundColor: stylex.StyleXVar<string>;
|
|
99
|
+
}>;
|
|
100
|
+
readonly ':is([data-disabled])': stylex.StyleXClassNameFor<":is([data-disabled])", {
|
|
101
|
+
readonly color: stylex.StyleXVar<string>;
|
|
102
|
+
readonly cursor: "default";
|
|
103
|
+
}>;
|
|
104
|
+
}>;
|
|
105
|
+
readonly optionText: Readonly<{
|
|
106
|
+
readonly flex: stylex.StyleXClassNameFor<"flex", 1>;
|
|
107
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
108
|
+
readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "anywhere">;
|
|
109
|
+
}>;
|
|
110
|
+
}>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Checkbox as BaseCheckbox } from '@base-ui/react/checkbox';
|
|
2
|
+
import { Radio as BaseRadio } from '@base-ui/react/radio';
|
|
3
|
+
import { RadioGroup as BaseRadioGroup } from '@base-ui/react/radio-group';
|
|
4
|
+
import { Switch as BaseSwitch } from '@base-ui/react/switch';
|
|
5
|
+
import { Toggle as BaseToggle } from '@base-ui/react/toggle';
|
|
6
|
+
import { ToggleGroup as BaseToggleGroup } from '@base-ui/react/toggle-group';
|
|
7
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
8
|
+
import type { CheckedStateProperties, ReadOnlyValueProperties, ValueStateProperties } from '../../foundations/src/control-state.ts';
|
|
9
|
+
import type { PlacementStyle } from '../../foundations/src/style-composition.ts';
|
|
10
|
+
type CheckboxRootProps = Omit<ComponentProps<typeof BaseCheckbox.Root>, 'checked' | 'defaultChecked' | 'onCheckedChange' | 'readOnly'> & CheckedStateProperties<NonNullable<BaseCheckbox.Root.Props['onCheckedChange']>> & {
|
|
11
|
+
readonly xstyle?: PlacementStyle;
|
|
12
|
+
};
|
|
13
|
+
type CheckboxIndicatorProps = ComponentProps<typeof BaseCheckbox.Indicator>;
|
|
14
|
+
type RadioGroupRootProps<Value> = Omit<BaseRadioGroup.Props<Value>, 'value' | 'defaultValue' | 'onValueChange'> & (ValueStateProperties<Value, NonNullable<BaseRadioGroup.Props<Value>['onValueChange']>> | ReadOnlyValueProperties<Value, NonNullable<BaseRadioGroup.Props<Value>['onValueChange']>>) & {
|
|
15
|
+
readonly xstyle?: PlacementStyle;
|
|
16
|
+
};
|
|
17
|
+
type RadioItemProps<Value> = BaseRadio.Root.Props<Value> & {
|
|
18
|
+
readonly xstyle?: PlacementStyle;
|
|
19
|
+
};
|
|
20
|
+
type RadioIndicatorProps = ComponentProps<typeof BaseRadio.Indicator>;
|
|
21
|
+
type SwitchRootProps = Omit<ComponentProps<typeof BaseSwitch.Root>, 'checked' | 'defaultChecked' | 'onCheckedChange' | 'readOnly'> & CheckedStateProperties<NonNullable<BaseSwitch.Root.Props['onCheckedChange']>> & {
|
|
22
|
+
readonly xstyle?: PlacementStyle;
|
|
23
|
+
};
|
|
24
|
+
type SwitchThumbProps = ComponentProps<typeof BaseSwitch.Thumb>;
|
|
25
|
+
type ToggleGroupRootProps<Value extends string> = Omit<BaseToggleGroup.Props<Value>, 'value' | 'defaultValue' | 'onValueChange'> & ValueStateProperties<ReadonlyArray<Value>, NonNullable<BaseToggleGroup.Props<Value>['onValueChange']>> & {
|
|
26
|
+
readonly xstyle?: PlacementStyle;
|
|
27
|
+
};
|
|
28
|
+
type ToggleItemProps<Value extends string> = Omit<BaseToggle.Props<Value>, 'value' | 'pressed' | 'defaultPressed' | 'onPressedChange'> & {
|
|
29
|
+
readonly value: Value;
|
|
30
|
+
};
|
|
31
|
+
declare function CheckboxRoot({ className, style, xstyle, ...props }: CheckboxRootProps): ReactNode;
|
|
32
|
+
declare function CheckboxIndicator({ children, className, style, ...props }: CheckboxIndicatorProps): ReactNode;
|
|
33
|
+
declare function RadioGroupRoot<Value>({ className, style, xstyle, ...props }: RadioGroupRootProps<Value>): ReactNode;
|
|
34
|
+
declare function RadioItem<Value>({ className, style, xstyle, ...props }: RadioItemProps<Value>): ReactNode;
|
|
35
|
+
declare function RadioIndicator({ className, style, ...props }: RadioIndicatorProps): ReactNode;
|
|
36
|
+
declare function SwitchRoot({ className, style, xstyle, ...props }: SwitchRootProps): ReactNode;
|
|
37
|
+
declare function SwitchThumb({ className, style, ...props }: SwitchThumbProps): ReactNode;
|
|
38
|
+
declare function ToggleGroupRoot<Value extends string>({ className, style, xstyle, ...props }: ToggleGroupRootProps<Value>): ReactNode;
|
|
39
|
+
declare function ToggleItem<Value extends string>({ className, style, ...props }: ToggleItemProps<Value>): ReactNode;
|
|
40
|
+
export declare const Checkbox: {
|
|
41
|
+
Root: typeof CheckboxRoot;
|
|
42
|
+
Indicator: typeof CheckboxIndicator;
|
|
43
|
+
};
|
|
44
|
+
export declare const RadioGroup: {
|
|
45
|
+
Root: typeof RadioGroupRoot;
|
|
46
|
+
Item: typeof RadioItem;
|
|
47
|
+
Indicator: typeof RadioIndicator;
|
|
48
|
+
};
|
|
49
|
+
export declare const Switch: {
|
|
50
|
+
Root: typeof SwitchRoot;
|
|
51
|
+
Thumb: typeof SwitchThumb;
|
|
52
|
+
};
|
|
53
|
+
export declare const ToggleGroup: {
|
|
54
|
+
Root: typeof ToggleGroupRoot;
|
|
55
|
+
Item: typeof ToggleItem;
|
|
56
|
+
};
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type SettingsRowProps = {
|
|
3
|
+
readonly label: string;
|
|
4
|
+
readonly description?: string;
|
|
5
|
+
readonly controlId: string;
|
|
6
|
+
readonly children: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export declare function SettingsRow({ label, description, controlId, children }: SettingsRowProps): ReactNode;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
export declare const accessibility: Readonly<{
|
|
3
|
+
readonly hidden: Readonly<{
|
|
4
|
+
readonly position: stylex.StyleXClassNameFor<"position", "absolute">;
|
|
5
|
+
readonly width: stylex.StyleXClassNameFor<"width", 1>;
|
|
6
|
+
readonly height: stylex.StyleXClassNameFor<"height", 1>;
|
|
7
|
+
readonly padding: stylex.StyleXClassNameFor<"padding", 0>;
|
|
8
|
+
readonly margin: stylex.StyleXClassNameFor<"margin", -1>;
|
|
9
|
+
readonly overflow: stylex.StyleXClassNameFor<"overflow", "hidden">;
|
|
10
|
+
readonly clipPath: stylex.StyleXClassNameFor<"clipPath", "inset(50%)">;
|
|
11
|
+
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "nowrap">;
|
|
12
|
+
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 0>;
|
|
13
|
+
}>;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { Dialog } from '@base-ui/react/dialog';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
export type OpenStateProperties<Change> = {
|
|
4
|
+
readonly open: NonNullable<Dialog.Root.Props['open']>;
|
|
5
|
+
readonly defaultOpen?: never;
|
|
6
|
+
readonly onOpenChange: Change;
|
|
7
|
+
} | {
|
|
8
|
+
readonly open?: never;
|
|
9
|
+
readonly defaultOpen?: Dialog.Root.Props['defaultOpen'];
|
|
10
|
+
readonly onOpenChange?: Change;
|
|
11
|
+
};
|
|
12
|
+
export type ValueStateProperties<Value, Change, DefaultValue = Value> = {
|
|
13
|
+
readonly value: Value;
|
|
14
|
+
readonly defaultValue?: never;
|
|
15
|
+
readonly onValueChange: Change;
|
|
16
|
+
} | {
|
|
17
|
+
readonly value?: never;
|
|
18
|
+
readonly defaultValue?: DefaultValue;
|
|
19
|
+
readonly onValueChange?: Change;
|
|
20
|
+
};
|
|
21
|
+
export type ReadOnlyValueProperties<Value, Change> = {
|
|
22
|
+
readonly value: Value;
|
|
23
|
+
readonly defaultValue?: never;
|
|
24
|
+
readonly onValueChange?: Change;
|
|
25
|
+
readonly readOnly: true;
|
|
26
|
+
};
|
|
27
|
+
export type CheckedStateProperties<Change> = {
|
|
28
|
+
readonly checked: boolean;
|
|
29
|
+
readonly defaultChecked?: never;
|
|
30
|
+
readonly onCheckedChange: Change;
|
|
31
|
+
readonly readOnly?: boolean;
|
|
32
|
+
} | {
|
|
33
|
+
readonly checked: boolean;
|
|
34
|
+
readonly defaultChecked?: never;
|
|
35
|
+
readonly onCheckedChange?: Change;
|
|
36
|
+
readonly readOnly: true;
|
|
37
|
+
} | {
|
|
38
|
+
readonly checked?: never;
|
|
39
|
+
readonly defaultChecked?: boolean;
|
|
40
|
+
readonly onCheckedChange?: Change;
|
|
41
|
+
readonly readOnly?: boolean;
|
|
42
|
+
};
|
|
43
|
+
export type TextValueProperties<Value, Change, ValueChange> = {
|
|
44
|
+
readonly value: Value;
|
|
45
|
+
readonly defaultValue?: never;
|
|
46
|
+
readonly onChange: Change;
|
|
47
|
+
readonly onValueChange?: ValueChange;
|
|
48
|
+
readonly readOnly?: ComponentProps<'input'>['readOnly'];
|
|
49
|
+
} | {
|
|
50
|
+
readonly value: Value;
|
|
51
|
+
readonly defaultValue?: never;
|
|
52
|
+
readonly onChange?: Change;
|
|
53
|
+
readonly onValueChange: ValueChange;
|
|
54
|
+
readonly readOnly?: ComponentProps<'input'>['readOnly'];
|
|
55
|
+
} | {
|
|
56
|
+
readonly value: Value;
|
|
57
|
+
readonly defaultValue?: never;
|
|
58
|
+
readonly onChange?: Change;
|
|
59
|
+
readonly onValueChange?: ValueChange;
|
|
60
|
+
readonly readOnly: true;
|
|
61
|
+
} | {
|
|
62
|
+
readonly value?: never;
|
|
63
|
+
readonly defaultValue?: Value;
|
|
64
|
+
readonly onChange?: Change;
|
|
65
|
+
readonly onValueChange?: ValueChange;
|
|
66
|
+
readonly readOnly?: ComponentProps<'input'>['readOnly'];
|
|
67
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
export declare const overlayStyles: Readonly<{
|
|
3
|
+
readonly transition: Readonly<{
|
|
4
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity, transform">;
|
|
5
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", string>;
|
|
6
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", string>;
|
|
7
|
+
}>;
|
|
8
|
+
readonly backdrop: Readonly<{
|
|
9
|
+
readonly position: stylex.StyleXClassNameFor<"position", "fixed">;
|
|
10
|
+
readonly top: stylex.StyleXClassNameFor<"top", 0>;
|
|
11
|
+
readonly right: stylex.StyleXClassNameFor<"right", 0>;
|
|
12
|
+
readonly bottom: stylex.StyleXClassNameFor<"bottom", 0>;
|
|
13
|
+
readonly left: stylex.StyleXClassNameFor<"left", 0>;
|
|
14
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
15
|
+
readonly zIndex: stylex.StyleXClassNameFor<"zIndex", string>;
|
|
16
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 1>;
|
|
17
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
18
|
+
readonly ':is([data-starting-style], [data-ending-style])': stylex.StyleXClassNameFor<":is([data-starting-style], [data-ending-style])", {
|
|
19
|
+
readonly opacity: 0;
|
|
20
|
+
}>;
|
|
21
|
+
}>;
|
|
22
|
+
readonly title: Readonly<{
|
|
23
|
+
readonly margin: stylex.StyleXClassNameFor<"margin", 0>;
|
|
24
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
|
|
25
|
+
readonly WebkitFontSmoothing: stylex.StyleXClassNameFor<"WebkitFontSmoothing", "antialiased">;
|
|
26
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
27
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
28
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", 600>;
|
|
29
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
30
|
+
}>;
|
|
31
|
+
readonly description: Readonly<{
|
|
32
|
+
readonly margin: stylex.StyleXClassNameFor<"margin", 0>;
|
|
33
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
|
|
34
|
+
readonly WebkitFontSmoothing: stylex.StyleXClassNameFor<"WebkitFontSmoothing", "antialiased">;
|
|
35
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
36
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
37
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
38
|
+
readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "anywhere">;
|
|
39
|
+
}>;
|
|
40
|
+
readonly content: Readonly<{
|
|
41
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
42
|
+
readonly flexDirection: stylex.StyleXClassNameFor<"flexDirection", "column">;
|
|
43
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
44
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
45
|
+
}>;
|
|
46
|
+
}>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
export declare const popupStyles: Readonly<{
|
|
3
|
+
readonly positioner: Readonly<{
|
|
4
|
+
readonly zIndex: stylex.StyleXClassNameFor<"zIndex", string>;
|
|
5
|
+
readonly outlineWidth: stylex.StyleXClassNameFor<"outlineWidth", 0>;
|
|
6
|
+
}>;
|
|
7
|
+
readonly surface: Readonly<{
|
|
8
|
+
readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
|
|
9
|
+
readonly maxWidth: stylex.StyleXClassNameFor<"maxWidth", "min(360px, calc(100vw - 24px))">;
|
|
10
|
+
readonly maxHeight: stylex.StyleXClassNameFor<"maxHeight", "var(--available-height)">;
|
|
11
|
+
readonly overflowY: stylex.StyleXClassNameFor<"overflowY", "auto">;
|
|
12
|
+
readonly overscrollBehavior: stylex.StyleXClassNameFor<"overscrollBehavior", "contain">;
|
|
13
|
+
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 1>;
|
|
14
|
+
readonly borderStyle: stylex.StyleXClassNameFor<"borderStyle", "solid">;
|
|
15
|
+
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", string>;
|
|
16
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
17
|
+
readonly boxShadow: stylex.StyleXClassNameFor<"boxShadow", string>;
|
|
18
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
19
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
20
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
|
|
21
|
+
readonly WebkitFontSmoothing: stylex.StyleXClassNameFor<"WebkitFontSmoothing", "antialiased">;
|
|
22
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
23
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
24
|
+
readonly outlineWidth: stylex.StyleXClassNameFor<"outlineWidth", 0>;
|
|
25
|
+
}>;
|
|
26
|
+
readonly content: Readonly<{
|
|
27
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
28
|
+
readonly flexDirection: stylex.StyleXClassNameFor<"flexDirection", "column">;
|
|
29
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
30
|
+
readonly padding: stylex.StyleXClassNameFor<"padding", string>;
|
|
31
|
+
}>;
|
|
32
|
+
readonly menu: Readonly<{
|
|
33
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 192>;
|
|
34
|
+
readonly padding: stylex.StyleXClassNameFor<"padding", string>;
|
|
35
|
+
}>;
|
|
36
|
+
readonly item: Readonly<{
|
|
37
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
38
|
+
readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
|
|
39
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
40
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
41
|
+
readonly minHeight: stylex.StyleXClassNameFor<"minHeight", string>;
|
|
42
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
|
|
43
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
|
|
44
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
45
|
+
readonly cursor: stylex.StyleXClassNameFor<"cursor", "pointer">;
|
|
46
|
+
readonly textDecorationLine: stylex.StyleXClassNameFor<"textDecorationLine", "none">;
|
|
47
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
48
|
+
readonly outlineWidth: stylex.StyleXClassNameFor<"outlineWidth", 0>;
|
|
49
|
+
readonly ':is([data-highlighted])': stylex.StyleXClassNameFor<":is([data-highlighted])", {
|
|
50
|
+
readonly backgroundColor: stylex.StyleXVar<string>;
|
|
51
|
+
}>;
|
|
52
|
+
readonly ':is([data-disabled])': stylex.StyleXClassNameFor<":is([data-disabled])", {
|
|
53
|
+
readonly opacity: stylex.StyleXVar<string>;
|
|
54
|
+
readonly cursor: "default";
|
|
55
|
+
}>;
|
|
56
|
+
readonly ':focus-visible': stylex.StyleXClassNameFor<":focus-visible", {
|
|
57
|
+
readonly outlineWidth: stylex.StyleXVar<string>;
|
|
58
|
+
readonly outlineStyle: "solid";
|
|
59
|
+
readonly outlineColor: stylex.StyleXVar<string>;
|
|
60
|
+
readonly outlineOffset: "-2px";
|
|
61
|
+
}>;
|
|
62
|
+
}>;
|
|
63
|
+
readonly label: Readonly<{
|
|
64
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
|
|
65
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
|
|
66
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
67
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
68
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
69
|
+
}>;
|
|
70
|
+
readonly separator: Readonly<{
|
|
71
|
+
readonly height: stylex.StyleXClassNameFor<"height", 1>;
|
|
72
|
+
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 0>;
|
|
73
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
74
|
+
readonly marginBlock: stylex.StyleXClassNameFor<"marginBlock", string>;
|
|
75
|
+
}>;
|
|
76
|
+
readonly indicator: Readonly<{
|
|
77
|
+
readonly width: stylex.StyleXClassNameFor<"width", string>;
|
|
78
|
+
readonly height: stylex.StyleXClassNameFor<"height", string>;
|
|
79
|
+
readonly display: stylex.StyleXClassNameFor<"display", "inline-flex">;
|
|
80
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
81
|
+
readonly justifyContent: stylex.StyleXClassNameFor<"justifyContent", "center">;
|
|
82
|
+
readonly flexShrink: stylex.StyleXClassNameFor<"flexShrink", 0>;
|
|
83
|
+
}>;
|
|
84
|
+
}>;
|