anvilui 0.2.0 → 0.3.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/AGENTS.md +29 -29
- package/README.md +42 -89
- package/dist/components/Combobox/Combobox.d.ts +8 -2
- package/dist/components/DateInput/DateInput.d.ts +5 -3
- package/dist/components/IconButton/IconButton.d.ts +5 -3
- package/dist/components/Input/Input.d.ts +5 -3
- package/dist/components/PinInput/PinInput.d.ts +5 -3
- package/dist/components/Progress/Progress.d.ts +4 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
- package/dist/components/Search/Search.d.ts +22 -6
- package/dist/components/Select/Select.d.ts +6 -2
- package/dist/components/Slider/Slider.d.ts +2 -1
- package/dist/components/SquigglyWave/SquigglyWave.d.ts +26 -4
- package/dist/components/Textarea/Textarea.d.ts +6 -3
- package/dist/components/TimePicker/TimePicker.d.ts +7 -5
- package/dist/components/Toggle/Toggle.d.ts +2 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +2 -2
- package/dist/index.cjs +302 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +48 -25
- package/dist/index.css.map +1 -1
- package/dist/index.js +336 -88
- package/dist/index.js.map +1 -1
- package/dist/themes/types.d.ts +0 -4
- package/dist/utils.d.ts +4 -0
- package/docs/badge.md +41 -41
- package/docs/combobox.md +2 -1
- package/docs/composition.md +1 -1
- package/docs/date-input.md +4 -3
- package/docs/forms.md +1 -1
- package/docs/icon-button.md +3 -2
- package/docs/input.md +1 -0
- package/docs/morph.md +4 -1
- package/docs/pin-input.md +1 -1
- package/docs/progress.md +37 -37
- package/docs/radio-group.md +17 -0
- package/docs/search.md +7 -7
- package/docs/select.md +3 -2
- package/docs/slider.md +49 -49
- package/docs/textarea.md +1 -1
- package/docs/theming.md +2 -1
- package/docs/time-picker.md +3 -2
- package/docs/toggle-group.md +1 -1
- package/docs/toggle.md +2 -2
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { type ReactNode, type Ref } from 'react';
|
|
2
2
|
import { type PopoverProps } from '../Popover/Popover';
|
|
3
3
|
import '../Input/input.css';
|
|
4
4
|
import '../Select/select.css';
|
|
5
5
|
import './time-picker.css';
|
|
6
|
-
export type TimePickerProps = Omit<React.ComponentProps<'div'>, 'children' | 'defaultValue'> & Pick<PopoverProps, 'open' | 'defaultOpen' | 'onOpenChange'> & {
|
|
6
|
+
export type TimePickerProps = Omit<React.ComponentProps<'div'>, 'children' | 'defaultValue' | 'ref'> & Pick<PopoverProps, 'open' | 'defaultOpen' | 'onOpenChange'> & {
|
|
7
7
|
/**
|
|
8
8
|
* `dial`: tap or drag a clock face, hour then minute.
|
|
9
9
|
* `input`: type into the hour and minute boxes. @default 'dial'
|
|
@@ -13,8 +13,8 @@ export type TimePickerProps = Omit<React.ComponentProps<'div'>, 'children' | 'de
|
|
|
13
13
|
value?: string | null;
|
|
14
14
|
/** Starting time when `value` isn't controlled. @default null */
|
|
15
15
|
defaultValue?: string | null;
|
|
16
|
-
/** Called with the new `"HH:mm"` on every change. */
|
|
17
|
-
onValueChange?: (value: string) => void;
|
|
16
|
+
/** Called with the new `"HH:mm"` on every change, or `null` once it's cleared. */
|
|
17
|
+
onValueChange?: (value: string | null) => void;
|
|
18
18
|
/** 12 shows AM/PM. @default the user's locale */
|
|
19
19
|
hourCycle?: 12 | 24;
|
|
20
20
|
/** @default false */
|
|
@@ -26,6 +26,8 @@ export type TimePickerProps = Omit<React.ComponentProps<'div'>, 'children' | 'de
|
|
|
26
26
|
size?: 'small' | 'normal';
|
|
27
27
|
/** Submits the value with a form, as `"HH:mm"`. */
|
|
28
28
|
name?: string;
|
|
29
|
+
/** The field's button (the part that opens the picker). */
|
|
30
|
+
ref?: Ref<HTMLButtonElement>;
|
|
29
31
|
} & ({
|
|
30
32
|
/** Floating label, like Input's. */
|
|
31
33
|
label: ReactNode;
|
|
@@ -42,4 +44,4 @@ export type TimePickerProps = Omit<React.ComponentProps<'div'>, 'children' | 'de
|
|
|
42
44
|
* @example
|
|
43
45
|
* <TimePicker label="Alarm" defaultValue="07:30" onValueChange={setTime} />
|
|
44
46
|
*/
|
|
45
|
-
export declare function TimePicker({ type, value: valueProp, defaultValue, onValueChange, hourCycle, label, 'aria-label': ariaLabel, disabled, size, name, open, defaultOpen, onOpenChange, className, ...
|
|
47
|
+
export declare function TimePicker({ type, value: valueProp, defaultValue, onValueChange, hourCycle, label, 'aria-label': ariaLabel, disabled, size, name, open, defaultOpen, onOpenChange, className, ref, id, ...allProps }: TimePickerProps): import("react").JSX.Element;
|
|
@@ -28,7 +28,8 @@ export type ToggleProps = Omit<BaseToggle.Props, 'children'> & ColorProps & {
|
|
|
28
28
|
children?: never;
|
|
29
29
|
startIcon?: never;
|
|
30
30
|
endIcon?: never;
|
|
31
|
-
|
|
31
|
+
/** 32px, 40px or 48px, like `IconButton`. @default 'normal' */
|
|
32
|
+
size?: 'small' | 'normal' | 'big';
|
|
32
33
|
});
|
|
33
34
|
/**
|
|
34
35
|
* A button that stays on or off, like Bold or Favorite. Holds its state
|
|
@@ -8,7 +8,7 @@ type ToggleGroupCommonProps = ColorProps & {
|
|
|
8
8
|
/** Same heights as `Button`. @default 'normal' */
|
|
9
9
|
size?: 'small' | 'normal' | 'big';
|
|
10
10
|
};
|
|
11
|
-
export type ToggleGroupProps<Value =
|
|
11
|
+
export type ToggleGroupProps<Value = unknown> = ToggleGroupCommonProps & ((BaseRadioGroup.Props<Value> & {
|
|
12
12
|
/**
|
|
13
13
|
* Let several segments be on at once. `value` is then an array
|
|
14
14
|
* of strings. Without it, `value` is a single value, not an
|
|
@@ -36,7 +36,7 @@ export type ToggleGroupProps<Value = any> = ToggleGroupCommonProps & ((BaseRadio
|
|
|
36
36
|
* </ToggleGroup>
|
|
37
37
|
*/
|
|
38
38
|
export declare function ToggleGroup<Value>({ size, color, fillType, multiple, children, className, ref, ...props }: ToggleGroupProps<Value>): import("react").JSX.Element;
|
|
39
|
-
export type ToggleGroupItemProps<Value =
|
|
39
|
+
export type ToggleGroupItemProps<Value = unknown> = BaseRadio.Root.Props<Value> & {
|
|
40
40
|
/** Material Symbol shown before the label. */
|
|
41
41
|
startIcon?: MaterialSymbol;
|
|
42
42
|
/** Material Symbol shown after the label. */
|