@mechane-ai/elements 0.35.1 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.js +4 -4
- package/dist/chart-frame-C0UBu4ku.js +213 -0
- package/dist/{chart-input-CN8PMrni.js → chart-input-Ccr2NJ6J.js} +2 -2
- package/dist/{categorical-values-DpnNvPkc.js → chart-theme-Bwr9YSP1.js} +56 -5
- package/dist/charts/cartesian.js +613 -616
- package/dist/charts/distribution.js +77 -76
- package/dist/charts/graph.js +29 -28
- package/dist/charts/hierarchy.js +32 -31
- package/dist/charts/matrix.js +48 -47
- package/dist/charts/timeline.js +2 -2
- package/dist/charts.js +3 -1
- package/dist/collections.js +314 -267
- package/dist/elements.css +14 -0
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +86 -63
- package/dist/forms.js +2 -2
- package/dist/packages/charts/src/cartesian/bar-data.d.ts +1 -1
- package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +1 -1
- package/dist/packages/charts/src/cartesian/time-series-data.d.ts +1 -1
- package/dist/packages/charts/src/categorical-values.d.ts +1 -1
- package/dist/packages/charts/src/chart-series-marker.d.ts +7 -0
- package/dist/packages/charts/src/chart-theme.d.ts +1 -2
- package/dist/packages/charts/src/distribution/ecdf.d.ts +1 -1
- package/dist/packages/charts/src/distribution/histogram.d.ts +1 -1
- package/dist/packages/charts/src/distribution/interval-plot.d.ts +1 -1
- package/dist/packages/charts/src/distribution/ranked-bars.d.ts +1 -1
- package/dist/packages/charts/src/graph/relation-graph.d.ts +1 -1
- package/dist/packages/charts/src/index.d.ts +4 -2
- package/dist/packages/collections/src/data-table.d.ts +6 -4
- package/dist/packages/feedback/src/progress.d.ts +8 -2
- package/dist/packages/forms/src/dates/civil.d.ts +6 -4
- package/dist/packages/forms/src/dates/index.d.ts +1 -0
- package/dist/packages/forms/src/index.d.ts +2 -0
- package/dist/packages/forms/src/select-control.d.ts +26 -0
- package/dist/packages/foundations/src/chart-tones.d.ts +2 -0
- package/dist/{src-BYKjPC-0.js → src-CoFxE4Cj.js} +282 -227
- package/dist/{src-BHllGfI8.js → src-DXdsMc_Z.js} +415 -307
- package/package.json +1 -1
- package/dist/chart-frame-BV0IPZtQ.js +0 -270
|
@@ -18,10 +18,12 @@ export type MonthRange = {
|
|
|
18
18
|
export declare function isMonth(value: CalendarMonth): boolean;
|
|
19
19
|
export declare function isDate(value: CalendarDate): boolean;
|
|
20
20
|
export declare function monthOrder(value: CalendarMonth): number;
|
|
21
|
-
export declare function
|
|
22
|
-
export declare function
|
|
23
|
-
export declare function
|
|
24
|
-
export declare function
|
|
21
|
+
export declare function serializeCalendarDate(value: CalendarDate): string;
|
|
22
|
+
export declare function serializeCalendarMonth(value: CalendarMonth): string;
|
|
23
|
+
export declare function parseCalendarDate(value: string): CalendarDate | undefined;
|
|
24
|
+
export declare function parseCalendarMonth(value: string): CalendarMonth | undefined;
|
|
25
|
+
export declare function addCalendarDays(value: CalendarDate, amount: number): CalendarDate;
|
|
26
|
+
export declare function addCalendarMonths(value: CalendarMonth, amount: number): CalendarMonth;
|
|
25
27
|
export declare function formatDate(value: CalendarDate, locale: string): string;
|
|
26
28
|
export declare function formatMonth(value: CalendarMonth, locale: string): string;
|
|
27
29
|
export declare function dateValidation(value: CalendarDate, minimum?: CalendarDate, maximum?: CalendarDate): string | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export type { CalendarDate, CalendarRange, CalendarEnvironment, CalendarProps } from './calendar.tsx';
|
|
2
2
|
export { Calendar } from './calendar.tsx';
|
|
3
3
|
export type { CalendarMonth, DateRange, MonthRange } from './civil.ts';
|
|
4
|
+
export { parseCalendarDate, parseCalendarMonth, serializeCalendarDate, serializeCalendarMonth, addCalendarDays, addCalendarMonths, } from './civil.ts';
|
|
4
5
|
export type { DatePickerProps } from './date-picker.tsx';
|
|
5
6
|
export { DatePicker } from './date-picker.tsx';
|
|
6
7
|
export type { DateRangePreset, DateRangePickerProps } from './date-range-picker.tsx';
|
|
@@ -6,6 +6,8 @@ export type { FormActionsProps } from './form-actions.tsx';
|
|
|
6
6
|
export { FormActions } from './form-actions.tsx';
|
|
7
7
|
export { Field, Input, Textarea } from './forms.tsx';
|
|
8
8
|
export { Select } from './select.tsx';
|
|
9
|
+
export type { SelectControlProps, SelectOption } from './select-control.tsx';
|
|
10
|
+
export { SelectControl } from './select-control.tsx';
|
|
9
11
|
export { Checkbox, RadioGroup, Switch, ToggleGroup } from './selection.tsx';
|
|
10
12
|
export type { SettingsRowProps } from './settings-row.tsx';
|
|
11
13
|
export { SettingsRow } from './settings-row.tsx';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { Select } from './select.tsx';
|
|
3
|
+
export type SelectOption<Value extends string> = Pick<ComponentProps<typeof Select.Item>, 'disabled'> & {
|
|
4
|
+
readonly value: Value;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
};
|
|
7
|
+
type SelectValueChange<Value extends string> = NonNullable<ComponentProps<typeof Select.Root<Value>>['onValueChange']>;
|
|
8
|
+
type SelectControlValueProps<Value extends string> = {
|
|
9
|
+
readonly value: Value | null;
|
|
10
|
+
} & ({
|
|
11
|
+
readonly readOnly?: false;
|
|
12
|
+
readonly onValueChange: SelectValueChange<Value>;
|
|
13
|
+
} | {
|
|
14
|
+
readonly readOnly: true;
|
|
15
|
+
readonly onValueChange?: never;
|
|
16
|
+
});
|
|
17
|
+
type SelectFormProps<Value extends string> = Pick<ComponentProps<typeof Select.Root<Value>>, 'name' | 'form' | 'required' | 'autoComplete' | 'inputRef'>;
|
|
18
|
+
type SelectControlTriggerProps = Omit<ComponentProps<typeof Select.Trigger>, 'children' | 'render' | 'nativeButton' | 'type' | 'value' | 'defaultValue' | 'name' | 'form' | 'autoComplete' | 'required' | 'readOnly' | 'aria-label' | 'className' | 'style'>;
|
|
19
|
+
export type SelectControlProps<Value extends string> = SelectControlValueProps<Value> & SelectFormProps<Value> & SelectControlTriggerProps & {
|
|
20
|
+
readonly label: string;
|
|
21
|
+
readonly items: ReadonlyArray<SelectOption<Value>>;
|
|
22
|
+
readonly placeholder?: string;
|
|
23
|
+
readonly align?: 'start' | 'end';
|
|
24
|
+
};
|
|
25
|
+
export declare function SelectControl<Value extends string>({ label, items, placeholder, align, value, readOnly, onValueChange, name, form, required, autoComplete, inputRef, disabled, id, onKeyDown, ...triggerProps }: SelectControlProps<Value>): ReactNode;
|
|
26
|
+
export {};
|