@apipass/design-system 1.15.0 → 1.17.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/lib/embedded-styles.js +1 -1
- package/dist/lib/index.cjs +4 -4
- package/dist/lib/index.cjs.map +1 -1
- package/dist/lib/index.js +2316 -1913
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/style.css +1 -1
- package/dist/types/ui/primitives/Checkbox/Checkbox.d.ts +4 -2
- package/dist/types/ui/primitives/DateRangePicker/DateRangePicker.d.ts +47 -0
- package/dist/types/ui/primitives/DateRangePicker/dateRangePresets.d.ts +10 -0
- package/dist/types/ui/primitives/Radio/Radio.d.ts +4 -2
- package/dist/types/ui/primitives/index.d.ts +2 -0
- package/package.json +2 -1
|
@@ -5,7 +5,9 @@ export interface CheckboxGroupProps extends Omit<RACCheckboxGroupProps, "childre
|
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
}
|
|
7
7
|
export declare function CheckboxGroup({ className, label, description, errorMessage, children, ...props }: CheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export type CheckboxFieldProps = RACCheckboxProps & SharedFieldProps
|
|
9
|
-
|
|
8
|
+
export type CheckboxFieldProps = RACCheckboxProps & SharedFieldProps & {
|
|
9
|
+
inline?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function CheckboxField({ children, className, label, description, errorMessage, inline, ...props }: CheckboxFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export type CheckboxProps = React.ComponentPropsWithoutRef<"div">;
|
|
11
13
|
export declare function Checkbox({ className, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type DateValue } from "@internationalized/date";
|
|
2
|
+
import { type DateRangePresetKey } from "./dateRangePresets";
|
|
3
|
+
import "./daterangepicker.css";
|
|
4
|
+
export interface DateRangePreset {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
getValue: () => {
|
|
8
|
+
start: DateValue;
|
|
9
|
+
end: DateValue;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface DateRangePickerValue {
|
|
13
|
+
preset?: DateRangePreset;
|
|
14
|
+
start: DateValue | null;
|
|
15
|
+
end: DateValue | null;
|
|
16
|
+
}
|
|
17
|
+
export interface DateRangePickerLabels {
|
|
18
|
+
placeholder: string;
|
|
19
|
+
relativeLabel: string;
|
|
20
|
+
absoluteLabel: string;
|
|
21
|
+
startDateLabel: string;
|
|
22
|
+
endDateLabel: string;
|
|
23
|
+
cancelLabel?: string | null;
|
|
24
|
+
applyLabel?: string | null;
|
|
25
|
+
}
|
|
26
|
+
export interface DateRangePickerProps {
|
|
27
|
+
className?: string;
|
|
28
|
+
locale?: string;
|
|
29
|
+
label?: string;
|
|
30
|
+
"aria-label"?: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
errorMessage?: string;
|
|
33
|
+
labels: DateRangePickerLabels;
|
|
34
|
+
intervals?: DateRangePreset[];
|
|
35
|
+
presetKeys?: DateRangePresetKey[];
|
|
36
|
+
presetLabels?: Record<DateRangePresetKey, string>;
|
|
37
|
+
hideTime?: boolean;
|
|
38
|
+
minValue?: DateValue;
|
|
39
|
+
maxValue?: DateValue;
|
|
40
|
+
timezone?: string;
|
|
41
|
+
isDisabled?: boolean;
|
|
42
|
+
isRequired?: boolean;
|
|
43
|
+
value?: DateRangePickerValue;
|
|
44
|
+
defaultValue?: DateRangePickerValue;
|
|
45
|
+
onChange?: (value: DateRangePickerValue) => void;
|
|
46
|
+
}
|
|
47
|
+
export declare function DateRangePicker({ className, locale: localeProp, label, "aria-label": ariaLabel, description, errorMessage, labels, intervals: intervalsProp, presetKeys, presetLabels, hideTime, minValue, maxValue, timezone: timezoneProp, isDisabled, isRequired, value, defaultValue, onChange, }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DateRangePreset } from "./DateRangePicker";
|
|
2
|
+
export type DateRangePresetKey = "last5m" | "last15m" | "last30m" | "last1h" | "last3h" | "last6h" | "last12h" | "last24h" | "today" | "yesterday" | "last7d" | "last30d" | "thisWeek" | "lastWeek" | "thisMonth" | "lastMonth" | "thisYear" | "lastYear";
|
|
3
|
+
export declare const DATE_RANGE_PRESET_ORDER: DateRangePresetKey[];
|
|
4
|
+
export interface CreateDateRangePresetsOptions {
|
|
5
|
+
labels: Record<DateRangePresetKey, string>;
|
|
6
|
+
timezone?: string;
|
|
7
|
+
locale?: string;
|
|
8
|
+
include?: DateRangePresetKey[];
|
|
9
|
+
}
|
|
10
|
+
export declare function createDateRangePresets(options: CreateDateRangePresetsOptions): DateRangePreset[];
|
|
@@ -5,7 +5,9 @@ export interface RadioGroupProps extends Omit<RACRadioGroupProps, "children">, S
|
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
}
|
|
7
7
|
export declare function RadioGroup({ className, label, description, errorMessage, children, ...props }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export type RadioFieldProps = RACRadioProps & SharedFieldProps
|
|
9
|
-
|
|
8
|
+
export type RadioFieldProps = RACRadioProps & SharedFieldProps & {
|
|
9
|
+
inline?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function RadioField({ children, className, label, description, errorMessage, inline, ...props }: RadioFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export type RadioProps = React.ComponentPropsWithoutRef<"div">;
|
|
11
13
|
export declare function Radio({ className, ...props }: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,6 +5,8 @@ export * from "./CodeEditor/CodeEditor";
|
|
|
5
5
|
export * from "./Avatar/Avatar";
|
|
6
6
|
export * from "./Button/Button";
|
|
7
7
|
export * from "./Checkbox/Checkbox";
|
|
8
|
+
export * from "./DateRangePicker/DateRangePicker";
|
|
9
|
+
export * from "./DateRangePicker/dateRangePresets";
|
|
8
10
|
export * from "./Dialog/Dialog";
|
|
9
11
|
export * from "./Divider/Divider";
|
|
10
12
|
export * from "./Fieldset/Fieldset";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apipass/design-system",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "APIPass React Design System",
|
|
6
6
|
"sideEffects": [
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
+
"@internationalized/date": "^3.10.0",
|
|
70
71
|
"clsx": "^2.1.1",
|
|
71
72
|
"react-toastify": "^11.1.0"
|
|
72
73
|
},
|