asta-ui 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base/checkbox-aui-052.d.ts +2 -0
- package/dist/base/checkbox-aui-052.js +9 -0
- package/dist/base/checkbox-aui-053.d.ts +2 -0
- package/dist/base/checkbox-aui-053.js +9 -0
- package/dist/base/checkbox-aui-054.d.ts +2 -0
- package/dist/base/checkbox-aui-054.js +9 -0
- package/dist/base/combobox-aui-046.d.ts +2 -0
- package/dist/base/combobox-aui-046.js +9 -0
- package/dist/base/combobox-aui-047.d.ts +2 -0
- package/dist/base/combobox-aui-047.js +9 -0
- package/dist/base/date-picker-aui-050.d.ts +2 -0
- package/dist/base/date-picker-aui-050.js +9 -0
- package/dist/base/date-picker-aui-051.d.ts +2 -0
- package/dist/base/date-picker-aui-051.js +9 -0
- package/dist/base/input-aui-029.d.ts +2 -0
- package/dist/base/input-aui-029.js +9 -0
- package/dist/base/input-aui-030.d.ts +2 -0
- package/dist/base/input-aui-030.js +9 -0
- package/dist/base/input-aui-031.d.ts +2 -0
- package/dist/base/input-aui-031.js +9 -0
- package/dist/base/input-aui-032.d.ts +2 -0
- package/dist/base/input-aui-032.js +11 -0
- package/dist/base/input-aui-033.d.ts +2 -0
- package/dist/base/input-aui-033.js +11 -0
- package/dist/base/input-aui-034.d.ts +2 -0
- package/dist/base/input-aui-034.js +9 -0
- package/dist/base/otp-input-aui-041.d.ts +2 -0
- package/dist/base/otp-input-aui-041.js +9 -0
- package/dist/base/otp-input-aui-042.d.ts +2 -0
- package/dist/base/otp-input-aui-042.js +9 -0
- package/dist/base/password-input-aui-039.d.ts +2 -0
- package/dist/base/password-input-aui-039.js +9 -0
- package/dist/base/password-input-aui-040.d.ts +2 -0
- package/dist/base/password-input-aui-040.js +11 -0
- package/dist/base/radio-group-aui-055.d.ts +2 -0
- package/dist/base/radio-group-aui-055.js +9 -0
- package/dist/base/radio-group-aui-056.d.ts +2 -0
- package/dist/base/radio-group-aui-056.js +9 -0
- package/dist/base/radio-group-aui-057.d.ts +2 -0
- package/dist/base/radio-group-aui-057.js +9 -0
- package/dist/base/select-aui-043.d.ts +2 -0
- package/dist/base/select-aui-043.js +9 -0
- package/dist/base/select-aui-044.d.ts +2 -0
- package/dist/base/select-aui-044.js +9 -0
- package/dist/base/select-aui-045.d.ts +2 -0
- package/dist/base/select-aui-045.js +9 -0
- package/dist/base/slider-aui-061.d.ts +2 -0
- package/dist/base/slider-aui-061.js +9 -0
- package/dist/base/slider-aui-062.d.ts +2 -0
- package/dist/base/slider-aui-062.js +9 -0
- package/dist/base/slider-aui-063.d.ts +2 -0
- package/dist/base/slider-aui-063.js +9 -0
- package/dist/base/switch-aui-058.d.ts +2 -0
- package/dist/base/switch-aui-058.js +9 -0
- package/dist/base/switch-aui-059.d.ts +2 -0
- package/dist/base/switch-aui-059.js +9 -0
- package/dist/base/switch-aui-060.d.ts +2 -0
- package/dist/base/switch-aui-060.js +9 -0
- package/dist/base/tag-input-aui-048.d.ts +2 -0
- package/dist/base/tag-input-aui-048.js +9 -0
- package/dist/base/tag-input-aui-049.d.ts +2 -0
- package/dist/base/tag-input-aui-049.js +9 -0
- package/dist/base/textarea-aui-035.d.ts +2 -0
- package/dist/base/textarea-aui-035.js +9 -0
- package/dist/base/textarea-aui-036.d.ts +2 -0
- package/dist/base/textarea-aui-036.js +9 -0
- package/dist/base/textarea-aui-037.d.ts +2 -0
- package/dist/base/textarea-aui-037.js +9 -0
- package/dist/base/textarea-aui-038.d.ts +2 -0
- package/dist/base/textarea-aui-038.js +11 -0
- package/dist/base.js +239 -21
- package/dist/checkbox-aui-052.d.ts +2 -0
- package/dist/checkbox-aui-052.js +9 -0
- package/dist/checkbox-aui-053.d.ts +2 -0
- package/dist/checkbox-aui-053.js +9 -0
- package/dist/checkbox-aui-054.d.ts +2 -0
- package/dist/checkbox-aui-054.js +9 -0
- package/dist/chunk-2LSUWI2Z.js +180 -0
- package/dist/chunk-3XMVXIOF.js +267 -0
- package/dist/chunk-4YNUJFTL.js +165 -0
- package/dist/chunk-5OHHGQV6.js +175 -0
- package/dist/chunk-5TMFFW3Y.js +149 -0
- package/dist/chunk-ANZANDQM.js +107 -0
- package/dist/chunk-BIYNJDPD.js +158 -0
- package/dist/chunk-BV5HEXB5.js +339 -0
- package/dist/chunk-CDQNLDO6.js +156 -0
- package/dist/chunk-CZCZB5YP.js +142 -0
- package/dist/chunk-D6LGKFZH.js +140 -0
- package/dist/chunk-EKPTPTKK.js +93 -0
- package/dist/chunk-EVCUN45S.js +167 -0
- package/dist/chunk-FGQPCDXI.js +136 -0
- package/dist/chunk-GERWW3CA.js +311 -0
- package/dist/chunk-GJ3R6IZL.js +232 -0
- package/dist/chunk-HVFB44HO.js +219 -0
- package/dist/chunk-I2WXKWTQ.js +151 -0
- package/dist/chunk-J6GK2V2C.js +252 -0
- package/dist/chunk-JVTDNOHQ.js +173 -0
- package/dist/chunk-K5PWBSVO.js +200 -0
- package/dist/chunk-KQCXQY5K.js +155 -0
- package/dist/chunk-KXWC2UHE.js +308 -0
- package/dist/chunk-NICNFGHT.js +138 -0
- package/dist/chunk-P3USWDWR.js +331 -0
- package/dist/chunk-QYI7LQBQ.js +208 -0
- package/dist/chunk-U6N7CZYN.js +305 -0
- package/dist/chunk-UMDVPRJW.js +117 -0
- package/dist/chunk-VPZP6TCT.js +155 -0
- package/dist/chunk-VVAL2JZJ.js +332 -0
- package/dist/chunk-VWYHP4SB.js +154 -0
- package/dist/chunk-W7RITVDV.js +182 -0
- package/dist/chunk-WSTQ6WZO.js +193 -0
- package/dist/chunk-Z5GNX2S3.js +171 -0
- package/dist/chunk-ZBF2UYXP.js +225 -0
- package/dist/combobox-aui-046.d.ts +2 -0
- package/dist/combobox-aui-046.js +9 -0
- package/dist/combobox-aui-047.d.ts +2 -0
- package/dist/combobox-aui-047.js +9 -0
- package/dist/date-picker-aui-050.d.ts +2 -0
- package/dist/date-picker-aui-050.js +9 -0
- package/dist/date-picker-aui-051.d.ts +2 -0
- package/dist/date-picker-aui-051.js +9 -0
- package/dist/index.js +239 -21
- package/dist/input-aui-029.d.ts +2 -0
- package/dist/input-aui-029.js +9 -0
- package/dist/input-aui-030.d.ts +2 -0
- package/dist/input-aui-030.js +9 -0
- package/dist/input-aui-031.d.ts +2 -0
- package/dist/input-aui-031.js +9 -0
- package/dist/input-aui-032.d.ts +2 -0
- package/dist/input-aui-032.js +11 -0
- package/dist/input-aui-033.d.ts +2 -0
- package/dist/input-aui-033.js +11 -0
- package/dist/input-aui-034.d.ts +2 -0
- package/dist/input-aui-034.js +9 -0
- package/dist/otp-input-aui-041.d.ts +2 -0
- package/dist/otp-input-aui-041.js +9 -0
- package/dist/otp-input-aui-042.d.ts +2 -0
- package/dist/otp-input-aui-042.js +9 -0
- package/dist/password-input-aui-039.d.ts +2 -0
- package/dist/password-input-aui-039.js +9 -0
- package/dist/password-input-aui-040.d.ts +2 -0
- package/dist/password-input-aui-040.js +11 -0
- package/dist/radio-group-aui-055.d.ts +2 -0
- package/dist/radio-group-aui-055.js +9 -0
- package/dist/radio-group-aui-056.d.ts +2 -0
- package/dist/radio-group-aui-056.js +9 -0
- package/dist/radio-group-aui-057.d.ts +2 -0
- package/dist/radio-group-aui-057.js +9 -0
- package/dist/select-aui-043.d.ts +2 -0
- package/dist/select-aui-043.js +9 -0
- package/dist/select-aui-044.d.ts +2 -0
- package/dist/select-aui-044.js +9 -0
- package/dist/select-aui-045.d.ts +2 -0
- package/dist/select-aui-045.js +9 -0
- package/dist/slider-aui-061.d.ts +2 -0
- package/dist/slider-aui-061.js +9 -0
- package/dist/slider-aui-062.d.ts +2 -0
- package/dist/slider-aui-062.js +9 -0
- package/dist/slider-aui-063.d.ts +2 -0
- package/dist/slider-aui-063.js +9 -0
- package/dist/switch-aui-058.d.ts +2 -0
- package/dist/switch-aui-058.js +9 -0
- package/dist/switch-aui-059.d.ts +2 -0
- package/dist/switch-aui-059.js +9 -0
- package/dist/switch-aui-060.d.ts +2 -0
- package/dist/switch-aui-060.js +9 -0
- package/dist/tag-input-aui-048.d.ts +2 -0
- package/dist/tag-input-aui-048.js +9 -0
- package/dist/tag-input-aui-049.d.ts +2 -0
- package/dist/tag-input-aui-049.js +9 -0
- package/dist/textarea-aui-035.d.ts +2 -0
- package/dist/textarea-aui-035.js +9 -0
- package/dist/textarea-aui-036.d.ts +2 -0
- package/dist/textarea-aui-036.js +9 -0
- package/dist/textarea-aui-037.d.ts +2 -0
- package/dist/textarea-aui-037.js +9 -0
- package/dist/textarea-aui-038.d.ts +2 -0
- package/dist/textarea-aui-038.js +11 -0
- package/dist/types/components/kit/variants/checkbox-aui-052.d.ts +29 -0
- package/dist/types/components/kit/variants/checkbox-aui-053.d.ts +24 -0
- package/dist/types/components/kit/variants/checkbox-aui-054.d.ts +33 -0
- package/dist/types/components/kit/variants/combobox-aui-046.d.ts +23 -0
- package/dist/types/components/kit/variants/combobox-aui-047.d.ts +24 -0
- package/dist/types/components/kit/variants/date-picker-aui-050.d.ts +26 -0
- package/dist/types/components/kit/variants/date-picker-aui-051.d.ts +23 -0
- package/dist/types/components/kit/variants/input-aui-029.d.ts +21 -0
- package/dist/types/components/kit/variants/input-aui-030.d.ts +29 -0
- package/dist/types/components/kit/variants/input-aui-031.d.ts +24 -0
- package/dist/types/components/kit/variants/input-aui-032.d.ts +36 -0
- package/dist/types/components/kit/variants/input-aui-033.d.ts +23 -0
- package/dist/types/components/kit/variants/input-aui-034.d.ts +29 -0
- package/dist/types/components/kit/variants/otp-input-aui-041.d.ts +20 -0
- package/dist/types/components/kit/variants/otp-input-aui-042.d.ts +23 -0
- package/dist/types/components/kit/variants/password-input-aui-039.d.ts +16 -0
- package/dist/types/components/kit/variants/password-input-aui-040.d.ts +24 -0
- package/dist/types/components/kit/variants/radio-group-aui-055.d.ts +27 -0
- package/dist/types/components/kit/variants/radio-group-aui-056.d.ts +28 -0
- package/dist/types/components/kit/variants/radio-group-aui-057.d.ts +26 -0
- package/dist/types/components/kit/variants/select-aui-043.d.ts +29 -0
- package/dist/types/components/kit/variants/select-aui-044.d.ts +24 -0
- package/dist/types/components/kit/variants/select-aui-045.d.ts +29 -0
- package/dist/types/components/kit/variants/slider-aui-061.d.ts +20 -0
- package/dist/types/components/kit/variants/slider-aui-062.d.ts +24 -0
- package/dist/types/components/kit/variants/slider-aui-063.d.ts +17 -0
- package/dist/types/components/kit/variants/switch-aui-058.d.ts +24 -0
- package/dist/types/components/kit/variants/switch-aui-059.d.ts +20 -0
- package/dist/types/components/kit/variants/switch-aui-060.d.ts +15 -0
- package/dist/types/components/kit/variants/tag-input-aui-048.d.ts +16 -0
- package/dist/types/components/kit/variants/tag-input-aui-049.d.ts +15 -0
- package/dist/types/components/kit/variants/textarea-aui-035.d.ts +19 -0
- package/dist/types/components/kit/variants/textarea-aui-036.d.ts +23 -0
- package/dist/types/components/kit/variants/textarea-aui-037.d.ts +30 -0
- package/dist/types/components/kit/variants/textarea-aui-038.d.ts +28 -0
- package/dist/types/packages/asta-ui/src/base/checkbox-aui-052.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/checkbox-aui-053.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/checkbox-aui-054.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/combobox-aui-046.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/combobox-aui-047.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/date-picker-aui-050.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/date-picker-aui-051.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/input-aui-029.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/input-aui-030.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/input-aui-031.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/input-aui-032.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/input-aui-033.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/input-aui-034.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/otp-input-aui-041.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/otp-input-aui-042.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/password-input-aui-039.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/password-input-aui-040.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/radio-group-aui-055.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/radio-group-aui-056.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/radio-group-aui-057.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/select-aui-043.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/select-aui-044.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/select-aui-045.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/slider-aui-061.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/slider-aui-062.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/slider-aui-063.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/switch-aui-058.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/switch-aui-059.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/switch-aui-060.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/tag-input-aui-048.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/tag-input-aui-049.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/textarea-aui-035.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/textarea-aui-036.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/textarea-aui-037.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/textarea-aui-038.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base.d.ts +70 -0
- package/dist/types/packages/asta-ui/src/checkbox-aui-052.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/checkbox-aui-053.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/checkbox-aui-054.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/combobox-aui-046.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/combobox-aui-047.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/date-picker-aui-050.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/date-picker-aui-051.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/index.d.ts +70 -0
- package/dist/types/packages/asta-ui/src/input-aui-029.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/input-aui-030.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/input-aui-031.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/input-aui-032.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/input-aui-033.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/input-aui-034.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/otp-input-aui-041.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/otp-input-aui-042.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/password-input-aui-039.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/password-input-aui-040.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/radio-group-aui-055.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/radio-group-aui-056.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/radio-group-aui-057.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/select-aui-043.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/select-aui-044.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/select-aui-045.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/slider-aui-061.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/slider-aui-062.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/slider-aui-063.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/switch-aui-058.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/switch-aui-059.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/switch-aui-060.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/tag-input-aui-048.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/tag-input-aui-049.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/textarea-aui-035.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/textarea-aui-036.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/textarea-aui-037.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/textarea-aui-038.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface CheckboxCardItem {
|
|
3
|
+
value: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
/** Monthly price, added to the total when picked. */
|
|
7
|
+
price: number;
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface CheckboxCardProps {
|
|
12
|
+
items?: CheckboxCardItem[];
|
|
13
|
+
value?: string[];
|
|
14
|
+
defaultValue?: string[];
|
|
15
|
+
onChange?: (value: string[]) => void;
|
|
16
|
+
eyebrow?: string;
|
|
17
|
+
title?: string;
|
|
18
|
+
/** Price before add-ons. */
|
|
19
|
+
base?: number;
|
|
20
|
+
currency?: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* aui-052 · Add-on cards you tick on and off. Signature: the check pops and draws itself in, the card lifts a
|
|
26
|
+
* brand ring and the monthly total rolls digit by digit.
|
|
27
|
+
*/
|
|
28
|
+
export declare function CheckboxCard({ items, value, defaultValue, onChange, eyebrow, title, base, currency, name, className, }: CheckboxCardProps): import("react").JSX.Element;
|
|
29
|
+
export default CheckboxCard;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface TaskItem {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
/** Small line under the title, e.g. a due time. */
|
|
5
|
+
meta?: string;
|
|
6
|
+
/** Initials of the owner, shown as an avatar. */
|
|
7
|
+
owner?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface TaskCheckboxProps {
|
|
10
|
+
tasks?: TaskItem[];
|
|
11
|
+
/** Ids of finished tasks (controlled). */
|
|
12
|
+
done?: string[];
|
|
13
|
+
defaultDone?: string[];
|
|
14
|
+
onChange?: (done: string[]) => void;
|
|
15
|
+
eyebrow?: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* aui-053 · A task list. Signature: ticking a task sweeps a line through it, then the row glides down to the
|
|
21
|
+
* done pile (FLIP, transform only) while the progress bar and count catch up.
|
|
22
|
+
*/
|
|
23
|
+
export declare function TaskCheckbox({ tasks, done: doneProp, defaultDone, onChange, eyebrow, title, className }: TaskCheckboxProps): import("react").JSX.Element;
|
|
24
|
+
export default TaskCheckbox;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface PermissionGroup {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
children: {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}[];
|
|
9
|
+
}
|
|
10
|
+
export interface RolePreset {
|
|
11
|
+
name: string;
|
|
12
|
+
/** Leaf ids that make up this role. */
|
|
13
|
+
ids: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface TreeCheckboxProps {
|
|
16
|
+
groups?: PermissionGroup[];
|
|
17
|
+
presets?: RolePreset[];
|
|
18
|
+
value?: string[];
|
|
19
|
+
defaultValue?: string[];
|
|
20
|
+
onChange?: (value: string[]) => void;
|
|
21
|
+
/** Group ids open on mount. */
|
|
22
|
+
defaultOpen?: string[];
|
|
23
|
+
title?: string;
|
|
24
|
+
/** Who the permissions are for. */
|
|
25
|
+
subject?: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* aui-054 · Nested permissions with tri-state parents. Signature: role presets and the tree stay in sync, the
|
|
30
|
+
* role name rolls to match and each parent box morphs between empty, dash and tick.
|
|
31
|
+
*/
|
|
32
|
+
export declare function TreeCheckbox({ groups, presets, value, defaultValue, onChange, defaultOpen, title, subject, className, }: TreeCheckboxProps): import("react").JSX.Element;
|
|
33
|
+
export default TreeCheckbox;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface AssignPerson {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
/** Muted line under the name, e.g. a role or an email. */
|
|
5
|
+
detail?: string;
|
|
6
|
+
/** Avatar photo. Initials are used without one. */
|
|
7
|
+
src?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface AssignComboboxProps {
|
|
10
|
+
people?: AssignPerson[];
|
|
11
|
+
value?: string[];
|
|
12
|
+
defaultValue?: string[];
|
|
13
|
+
onChange?: (ids: string[]) => void;
|
|
14
|
+
label?: string;
|
|
15
|
+
/** Most avatars shown in the stack before "+N". */
|
|
16
|
+
maxStack?: number;
|
|
17
|
+
name?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
/** aui-046 · Multi assign: pick people from a searchable list, they spring into an avatar stack and the count rolls. */
|
|
22
|
+
export declare function AssignCombobox({ people, value, defaultValue, onChange, label, maxStack, name, disabled, className }: AssignComboboxProps): import("react").JSX.Element;
|
|
23
|
+
export default AssignCombobox;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface CreatableLabel {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
/** Index into the six brand and ink tints. */
|
|
5
|
+
tint?: number;
|
|
6
|
+
/** Muted count on the right, e.g. open issues. */
|
|
7
|
+
count?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface CreatableComboboxProps {
|
|
10
|
+
options?: CreatableLabel[];
|
|
11
|
+
value?: string[];
|
|
12
|
+
defaultValue?: string[];
|
|
13
|
+
onChange?: (ids: string[]) => void;
|
|
14
|
+
/** Called with the new label after "Create" so you can save it. */
|
|
15
|
+
onCreate?: (label: CreatableLabel) => void;
|
|
16
|
+
label?: string;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/** aui-047 · Create on enter: filter labels, or press Enter to create a new one with a picked tint that drops into the field. */
|
|
23
|
+
export declare function CreatableCombobox({ options, value, defaultValue, onChange, onCreate, label, placeholder, name, disabled, className }: CreatableComboboxProps): import("react").JSX.Element;
|
|
24
|
+
export default CreatableCombobox;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface RangeValue {
|
|
2
|
+
start: Date | null;
|
|
3
|
+
end: Date | null;
|
|
4
|
+
}
|
|
5
|
+
export interface TwoMonthRangeProps {
|
|
6
|
+
value?: RangeValue;
|
|
7
|
+
defaultValue?: RangeValue;
|
|
8
|
+
onChange?: (value: RangeValue) => void;
|
|
9
|
+
/** Days before this can't be picked. Defaults to today. Pass `null` to allow any day. */
|
|
10
|
+
min?: Date | null;
|
|
11
|
+
max?: Date;
|
|
12
|
+
locale?: string;
|
|
13
|
+
/** 0 = Sunday, 1 = Monday. */
|
|
14
|
+
weekStartsOn?: 0 | 1;
|
|
15
|
+
startLabel?: string;
|
|
16
|
+
endLabel?: string;
|
|
17
|
+
/** Singular unit for the count, e.g. "night" or "day". */
|
|
18
|
+
unit?: string;
|
|
19
|
+
/** Count the end day too (days), or not (nights). */
|
|
20
|
+
inclusive?: boolean;
|
|
21
|
+
name?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
/** aui-050 · Two-month range: a band previews the stay as you hover, a tip counts the nights and the active field slides between start and end. */
|
|
25
|
+
export declare function RangeDatePicker({ value, defaultValue, onChange, min, max, locale, weekStartsOn, startLabel, endLabel, unit, inclusive, name, className, }: TwoMonthRangeProps): import("react").JSX.Element;
|
|
26
|
+
export default RangeDatePicker;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface DatePreset {
|
|
2
|
+
label: string;
|
|
3
|
+
/** Returns the date for this preset, or null for "no date". Gets today at midnight. */
|
|
4
|
+
get: (today: Date) => Date | null;
|
|
5
|
+
}
|
|
6
|
+
export interface PresetDatePickerProps {
|
|
7
|
+
value?: Date | null;
|
|
8
|
+
defaultValue?: Date | null;
|
|
9
|
+
onChange?: (value: Date | null) => void;
|
|
10
|
+
presets?: DatePreset[];
|
|
11
|
+
/** Small text before the date on the trigger. */
|
|
12
|
+
label?: string;
|
|
13
|
+
locale?: string;
|
|
14
|
+
weekStartsOn?: 0 | 1;
|
|
15
|
+
/** Start open (opens downward, does not take focus). */
|
|
16
|
+
defaultOpen?: boolean;
|
|
17
|
+
name?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
/** aui-051 · Quick presets: a dark picker with presets beside a calendar, number keys pick a preset and the date label rolls in character by character. */
|
|
22
|
+
export declare function PresetDatePicker({ value, defaultValue, onChange, presets, label, locale, weekStartsOn, defaultOpen, name, disabled, className }: PresetDatePickerProps): import("react").JSX.Element;
|
|
23
|
+
export default PresetDatePicker;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type InputHTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
export interface FloatingInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "children"> {
|
|
3
|
+
label?: string;
|
|
4
|
+
/** Help text under the field. */
|
|
5
|
+
hint?: ReactNode;
|
|
6
|
+
/** A message in ink, not red. Replaces the hint while set. */
|
|
7
|
+
error?: ReactNode;
|
|
8
|
+
/** Shown before the text, e.g. an icon. */
|
|
9
|
+
start?: ReactNode;
|
|
10
|
+
/** Shown after the text, e.g. a unit or a button. */
|
|
11
|
+
end?: ReactNode;
|
|
12
|
+
/** Shows a live count next to the floated label while focused. Needs `maxLength`. */
|
|
13
|
+
counter?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* aui-029 · Floating label. Signature: the label lifts out of the field and settles into the border,
|
|
18
|
+
* cutting a notch in the hairline, while a brand line sweeps in along the bottom edge.
|
|
19
|
+
*/
|
|
20
|
+
export declare function FloatingInput({ label, hint, error, start, end, counter, className, id: idProp, placeholder, ...rest }: FloatingInputProps): import("react").JSX.Element;
|
|
21
|
+
export default FloatingInput;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface SearchFieldItem {
|
|
2
|
+
label: string;
|
|
3
|
+
/** Right-aligned meta, e.g. a section or a date. */
|
|
4
|
+
meta?: string;
|
|
5
|
+
/** "recent" rows get a clock and can be removed, "page" rows get an arrow. */
|
|
6
|
+
kind?: "recent" | "page";
|
|
7
|
+
}
|
|
8
|
+
export interface SearchFieldProps {
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
/** Past searches, newest first. Picking a query adds it here. */
|
|
11
|
+
recent?: string[];
|
|
12
|
+
/** Places you can jump to. Filtered as you type. */
|
|
13
|
+
pages?: SearchFieldItem[];
|
|
14
|
+
/** Called with the query when you press Enter or pick a row. */
|
|
15
|
+
onSearch?: (query: string, item?: SearchFieldItem) => void;
|
|
16
|
+
/** Focus the field with "/" or ⌘K / Ctrl K from anywhere on the page. */
|
|
17
|
+
shortcut?: boolean;
|
|
18
|
+
/** Start with the list open (for previews). */
|
|
19
|
+
defaultOpen?: boolean;
|
|
20
|
+
/** Dark field on an ink bar, or light on paper. */
|
|
21
|
+
tone?: "dark" | "light";
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* aui-030 · Search with recents. Signature: the "/" shortcut chip turns into a clear button as you type,
|
|
26
|
+
* and one highlight glides between rows of recent searches and pages.
|
|
27
|
+
*/
|
|
28
|
+
export declare function SearchField({ placeholder, recent: recentProp, pages, onSearch, shortcut, defaultOpen, tone, className, }: SearchFieldProps): import("react").JSX.Element;
|
|
29
|
+
export default SearchField;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type InputHTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
export interface AffixInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "prefix" | "children"> {
|
|
3
|
+
/** Accessible name when there is no visible label pointing at the input. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Text or an icon in a chip before the value, e.g. "https://" or "$". */
|
|
6
|
+
prefix?: ReactNode;
|
|
7
|
+
/** Text in a chip after the value, e.g. "USD". */
|
|
8
|
+
suffix?: ReactNode;
|
|
9
|
+
/** Let the suffix ride right after the text, so the whole thing reads as one string (e.g. a subdomain). */
|
|
10
|
+
ride?: boolean;
|
|
11
|
+
/** Units the suffix chip rolls through on click, e.g. ["min", "hours", "days"]. Replaces `suffix`. */
|
|
12
|
+
units?: string[];
|
|
13
|
+
unit?: string;
|
|
14
|
+
onUnitChange?: (unit: string) => void;
|
|
15
|
+
/** Adds a copy button. Copies this string, or prefix + value + suffix when `true`. */
|
|
16
|
+
copy?: boolean | string;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* aui-031 · Prefix and suffix. Signature: the suffix can ride right behind your text so a subdomain reads
|
|
21
|
+
* as one address, and unit chips roll to the next unit like a counter.
|
|
22
|
+
*/
|
|
23
|
+
export declare function AffixInput({ label, prefix, suffix, ride, units, unit: unitProp, onUnitChange, copy, className, placeholder, id, ...rest }: AffixInputProps): import("react").JSX.Element;
|
|
24
|
+
export default AffixInput;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type InputHTMLAttributes } from "react";
|
|
2
|
+
export type ValidatedInputStatus = {
|
|
3
|
+
kind: "idle";
|
|
4
|
+
text: string;
|
|
5
|
+
} | {
|
|
6
|
+
kind: "invalid";
|
|
7
|
+
text: string;
|
|
8
|
+
} | {
|
|
9
|
+
kind: "suggest";
|
|
10
|
+
text: string;
|
|
11
|
+
suggestion: string;
|
|
12
|
+
} | {
|
|
13
|
+
kind: "valid";
|
|
14
|
+
text: string;
|
|
15
|
+
};
|
|
16
|
+
/** The default check: an email address, with a nudge when the domain looks like a typo of a common one. */
|
|
17
|
+
export declare function checkWorkEmail(raw: string): ValidatedInputStatus;
|
|
18
|
+
export interface ValidatedInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "children" | "onChange"> {
|
|
19
|
+
label?: string;
|
|
20
|
+
value?: string;
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
onChange?: (value: string) => void;
|
|
23
|
+
/** Returns a status for the current text. Defaults to an email check with typo suggestions. */
|
|
24
|
+
validate?: (value: string) => ValidatedInputStatus;
|
|
25
|
+
/** Quiet time after the last key before the message updates. */
|
|
26
|
+
delay?: number;
|
|
27
|
+
/** Called whenever the shown status changes. */
|
|
28
|
+
onStatus?: (status: ValidatedInputStatus) => void;
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* aui-032 · Live validation. Signature: a calm ink message that rolls up to the next one as you type,
|
|
33
|
+
* a one-tap fix for typos and a check that draws itself in once the value is good.
|
|
34
|
+
*/
|
|
35
|
+
export declare function ValidatedInput({ label, value: valueProp, defaultValue, onChange, validate, delay, onStatus, className, id: idProp, placeholder, ...rest }: ValidatedInputProps): import("react").JSX.Element;
|
|
36
|
+
export default ValidatedInput;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Lowercase, strip accents, dashes between words, at most 60 characters. */
|
|
2
|
+
export declare const slugFromTitle: (s: string, keepTrailing?: boolean) => string;
|
|
3
|
+
export interface SlugInputProps {
|
|
4
|
+
/** Visible label for the title. */
|
|
5
|
+
label?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
defaultTitle?: string;
|
|
8
|
+
onTitleChange?: (title: string) => void;
|
|
9
|
+
/** Called with the current slug. */
|
|
10
|
+
onSlugChange?: (slug: string) => void;
|
|
11
|
+
/** Shown in front of the slug, without the protocol. */
|
|
12
|
+
base?: string;
|
|
13
|
+
/** Resolve true when the slug is free. Defaults to a fake check against a few taken slugs. */
|
|
14
|
+
check?: (slug: string) => Promise<boolean>;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* aui-033 · Title to slug. Signature: the URL preview rewrites itself letter by letter as you type the title,
|
|
20
|
+
* then a tiny spinner checks the address and settles on Available or a one-tap free alternative.
|
|
21
|
+
*/
|
|
22
|
+
export declare function SlugInput({ label, title: titleProp, defaultTitle, onTitleChange, onSlugChange, base, check, placeholder, className, }: SlugInputProps): import("react").JSX.Element;
|
|
23
|
+
export default SlugInput;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface AmountCurrency {
|
|
2
|
+
code: string;
|
|
3
|
+
symbol: string;
|
|
4
|
+
/** Units per 1 of the first currency, used to convert when you switch. */
|
|
5
|
+
rate: number;
|
|
6
|
+
}
|
|
7
|
+
export interface AmountInputProps {
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Controlled amount. */
|
|
10
|
+
value?: number;
|
|
11
|
+
defaultValue?: number;
|
|
12
|
+
onChange?: (value: number, currency: string) => void;
|
|
13
|
+
currencies?: AmountCurrency[];
|
|
14
|
+
currency?: string;
|
|
15
|
+
onCurrencyChange?: (code: string) => void;
|
|
16
|
+
/** One-tap amounts in the selected currency. */
|
|
17
|
+
quick?: number[];
|
|
18
|
+
/** The highest amount allowed. Typing past it clamps with a calm note. */
|
|
19
|
+
max?: number;
|
|
20
|
+
/** Line under the amount, e.g. fees or arrival time. */
|
|
21
|
+
note?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* aui-034 · Amount. Signature: a big dark money field whose digits roll into place, a currency switch that
|
|
26
|
+
* converts the amount with a roll, and quick-amount chips.
|
|
27
|
+
*/
|
|
28
|
+
export declare function AmountInput({ label, value, defaultValue, onChange, currencies, currency: currencyProp, onCurrencyChange, quick, max, note, className, }: AmountInputProps): import("react").JSX.Element;
|
|
29
|
+
export default AmountInput;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface SplitOtpProps {
|
|
2
|
+
value?: string;
|
|
3
|
+
defaultValue?: string;
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
/** Called once all six digits are in. */
|
|
6
|
+
onComplete?: (code: string) => void;
|
|
7
|
+
/** Mark the code as wrong. The halves shake each time this turns true. */
|
|
8
|
+
error?: boolean;
|
|
9
|
+
/** Show the "Paste code" button. */
|
|
10
|
+
pasteButton?: boolean;
|
|
11
|
+
label?: string;
|
|
12
|
+
autoFocus?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* aui-041 · A six-digit code split 3 + 3. Signature: one focus frame with a caret glides from box to box as digits drop in,
|
|
17
|
+
* and when the code is complete the two halves slide together into one block. Paste works anywhere or from the button.
|
|
18
|
+
*/
|
|
19
|
+
export declare function SplitOtp({ value, defaultValue, onChange, onComplete, error, pasteButton, label, autoFocus, className }: SplitOtpProps): import("react").JSX.Element;
|
|
20
|
+
export default SplitOtp;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface VerifyOtpProps {
|
|
2
|
+
length?: number;
|
|
3
|
+
/** Who the code was sent to, shown in the copy. */
|
|
4
|
+
destination?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
/** Resolve if the code is right, reject (optionally with a message) if not. Defaults to accepting `demoCode`. */
|
|
7
|
+
onVerify?: (code: string) => Promise<void>;
|
|
8
|
+
/** Used when no onVerify is given. */
|
|
9
|
+
demoCode?: string;
|
|
10
|
+
/** Seconds before "Resend" unlocks. */
|
|
11
|
+
resendAfter?: number;
|
|
12
|
+
onResend?: () => void;
|
|
13
|
+
onContinue?: () => void;
|
|
14
|
+
/** Code to start with, e.g. from a magic link. Verifies once it is complete. */
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* aui-042 · A dark two-step verification card. Signature: the boxes ripple while the code is checked, then fold into the
|
|
20
|
+
* centre and morph into a blue badge with a ring pulse, while the resend timer counts down second by second.
|
|
21
|
+
*/
|
|
22
|
+
export declare function VerifyOtp({ length, destination, title, onVerify, demoCode, resendAfter, onResend, onContinue, defaultValue, className, }: VerifyOtpProps): import("react").JSX.Element;
|
|
23
|
+
export default VerifyOtp;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type InputHTMLAttributes } from "react";
|
|
2
|
+
export interface StrengthPasswordProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "size"> {
|
|
3
|
+
value?: string;
|
|
4
|
+
defaultValue?: string;
|
|
5
|
+
onChange?: (value: string, score: number) => void;
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Show the rough time-to-crack line. */
|
|
8
|
+
estimate?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* aui-039 · A password field with a strength dial. Signature: four arcs around a padlock light up one by one as the
|
|
13
|
+
* password gets stronger, the lock clicks shut and pulses blue at full strength, next to a rolling verdict and a crack-time estimate.
|
|
14
|
+
*/
|
|
15
|
+
export declare function StrengthPassword({ value, defaultValue, onChange, label, estimate, placeholder, autoComplete, className, id, ...rest }: StrengthPasswordProps): import("react").JSX.Element;
|
|
16
|
+
export default StrengthPassword;
|