@beaubrain/web-design-system 0.1.2 → 0.1.4

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.
Files changed (49) hide show
  1. package/dist/assets/web-design-system.css +1 -1
  2. package/dist/components/Checkbox/checkbox.base.d.ts +42 -0
  3. package/dist/components/Checkbox/checkbox.defs.d.ts +15 -0
  4. package/dist/components/Checkbox/index.d.ts +23 -0
  5. package/dist/components/CheckboxGroup/checkboxGroup.base.d.ts +35 -0
  6. package/dist/components/CheckboxGroup/checkboxGroup.defs.d.ts +18 -0
  7. package/dist/components/CheckboxGroup/index.d.ts +16 -0
  8. package/dist/components/Radio/index.d.ts +12 -0
  9. package/dist/components/Radio/radio.base.d.ts +24 -0
  10. package/dist/components/Radio/radio.defs.d.ts +15 -0
  11. package/dist/components/RadioGroup/index.d.ts +21 -0
  12. package/dist/components/RadioGroup/radioGroup.base.d.ts +34 -0
  13. package/dist/components/RadioGroup/radioGroup.defs.d.ts +60 -0
  14. package/dist/components/Switch/index.d.ts +11 -0
  15. package/dist/components/Switch/switch.base.d.ts +17 -0
  16. package/dist/components/Switch/switch.defs.d.ts +51 -0
  17. package/dist/components/TextField/index.d.ts +19 -0
  18. package/dist/components/TextField/textField.defs.d.ts +87 -0
  19. package/dist/components/__internal/collection.d.ts +21 -0
  20. package/dist/components/__internal/index.d.ts +7 -0
  21. package/dist/components/__internal/remain.d.ts +12 -0
  22. package/dist/components/__internal/reset.d.ts +6 -0
  23. package/dist/components/__internal/roving-focus-group.d.ts +31 -0
  24. package/dist/components/index.d.ts +6 -3
  25. package/dist/core/native/compose-event-handlers.d.ts +6 -0
  26. package/dist/core/native/index.d.ts +1 -0
  27. package/dist/core/react/create-context.d.ts +20 -0
  28. package/dist/core/react/index.d.ts +10 -0
  29. package/dist/core/react/input-attributes.d.ts +6 -0
  30. package/dist/core/react/ref.d.ts +2 -1
  31. package/dist/core/react/require-react-element.d.ts +3 -0
  32. package/dist/core/react/use-callback-ref.d.ts +2 -0
  33. package/dist/core/react/use-controllable-state.d.ts +11 -0
  34. package/dist/core/react/use-finite-state-machine.d.ts +10 -0
  35. package/dist/core/react/use-previous.d.ts +2 -0
  36. package/dist/core/react/use-safe-id.d.ts +2 -0
  37. package/dist/core/react/use-safe-layout-effect.d.ts +3 -0
  38. package/dist/core/react/use-size.d.ts +5 -0
  39. package/dist/icons/CheckLineIcon.d.ts +4 -0
  40. package/dist/icons/IndeterminateLineIcon.d.ts +4 -0
  41. package/dist/icons/icon.props.d.ts +5 -0
  42. package/dist/icons/index.d.ts +3 -0
  43. package/dist/index.d.ts +1 -0
  44. package/dist/index.js +1673 -300
  45. package/package.json +2 -3
  46. /package/dist/components/{Base/index.d.ts → __internal/base.d.ts} +0 -0
  47. /package/dist/components/{Outlet/index.d.ts → __internal/outlet.d.ts} +0 -0
  48. /package/dist/components/{Outlet/Outlet.test.d.ts → __internal/outlet.test.d.ts} +0 -0
  49. /package/dist/components/{VisuallyHidden/index.d.ts → __internal/visually-hidden.d.ts} +0 -0
@@ -0,0 +1,60 @@
1
+ declare const RadioGroupRootPropDefs: {
2
+ m: {
3
+ type: "enum | string";
4
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
5
+ className: string;
6
+ customProperties: "--m"[];
7
+ };
8
+ mx: {
9
+ type: "enum | string";
10
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
11
+ className: string;
12
+ customProperties: ("--ml" | "--mr")[];
13
+ };
14
+ my: {
15
+ type: "enum | string";
16
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
17
+ className: string;
18
+ customProperties: ("--mt" | "--mb")[];
19
+ };
20
+ mt: {
21
+ type: "enum | string";
22
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
23
+ className: string;
24
+ customProperties: "--mt"[];
25
+ };
26
+ mr: {
27
+ type: "enum | string";
28
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
29
+ className: string;
30
+ customProperties: "--mr"[];
31
+ };
32
+ mb: {
33
+ type: "enum | string";
34
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
35
+ className: string;
36
+ customProperties: "--mb"[];
37
+ };
38
+ ml: {
39
+ type: "enum | string";
40
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
41
+ className: string;
42
+ customProperties: "--ml"[];
43
+ };
44
+ size: {
45
+ type: "enum";
46
+ className: string;
47
+ values: readonly ["1", "2", "3"];
48
+ default: "2";
49
+ };
50
+ variant: {
51
+ type: "enum";
52
+ className: string;
53
+ values: readonly ["classic", "outline"];
54
+ default: "classic";
55
+ };
56
+ asChild: {
57
+ type: "boolean";
58
+ };
59
+ };
60
+ export { RadioGroupRootPropDefs };
@@ -0,0 +1,11 @@
1
+ import { GetPropDefTypes } from '../../core/defs';
2
+ import { ComponentPropsWithout } from '../../core/react';
3
+ import { SwitchBase } from './switch.base';
4
+ import { SwitchPropDefs } from './switch.defs';
5
+ import * as React from 'react';
6
+ type SwitchPropDefsType = GetPropDefTypes<typeof SwitchPropDefs>;
7
+ interface SwitchProps extends ComponentPropsWithout<typeof SwitchBase, 'asChild' | 'color' | 'defaultValue' | 'children'>, SwitchPropDefsType {
8
+ }
9
+ declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
10
+ export default Switch;
11
+ export type { SwitchProps };
@@ -0,0 +1,17 @@
1
+ import { Base } from '../__internal';
2
+ import * as React from 'react';
3
+ declare const createSwitchScope: import('../../core/react').CreateScope;
4
+ type BaseButtonProps = React.ComponentPropsWithoutRef<typeof Base.button>;
5
+ interface SwitchProps extends BaseButtonProps {
6
+ checked?: boolean;
7
+ defaultChecked?: boolean;
8
+ required?: boolean;
9
+ onCheckedChange?(checked: boolean): void;
10
+ }
11
+ declare const SwitchBase: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
12
+ type BaseSpanProps = React.ComponentPropsWithoutRef<typeof Base.span>;
13
+ interface SwitchThumbProps extends BaseSpanProps {
14
+ }
15
+ declare const SwitchBaseThumb: React.ForwardRefExoticComponent<SwitchThumbProps & React.RefAttributes<HTMLSpanElement>>;
16
+ export { createSwitchScope, SwitchBase, SwitchBaseThumb };
17
+ export type { SwitchProps, SwitchThumbProps };
@@ -0,0 +1,51 @@
1
+ declare const SwitchPropDefs: {
2
+ m: {
3
+ type: "enum | string";
4
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
5
+ className: string;
6
+ customProperties: "--m"[];
7
+ };
8
+ mx: {
9
+ type: "enum | string";
10
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
11
+ className: string;
12
+ customProperties: ("--ml" | "--mr")[];
13
+ };
14
+ my: {
15
+ type: "enum | string";
16
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
17
+ className: string;
18
+ customProperties: ("--mt" | "--mb")[];
19
+ };
20
+ mt: {
21
+ type: "enum | string";
22
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
23
+ className: string;
24
+ customProperties: "--mt"[];
25
+ };
26
+ mr: {
27
+ type: "enum | string";
28
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
29
+ className: string;
30
+ customProperties: "--mr"[];
31
+ };
32
+ mb: {
33
+ type: "enum | string";
34
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
35
+ className: string;
36
+ customProperties: "--mb"[];
37
+ };
38
+ ml: {
39
+ type: "enum | string";
40
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
41
+ className: string;
42
+ customProperties: "--ml"[];
43
+ };
44
+ size: {
45
+ type: "enum";
46
+ className: string;
47
+ values: readonly ["1", "2", "3"];
48
+ default: "2";
49
+ };
50
+ };
51
+ export { SwitchPropDefs };
@@ -0,0 +1,19 @@
1
+ import { GetPropDefTypes } from '../../core/defs';
2
+ import { ComponentPropsWithout, DefaultRemovedProps, NotInputTextualAttributes } from '../../core/react';
3
+ import { TextFieldRootPropDefs, TextFieldSlotPropDefs } from './textField.defs';
4
+ import * as React from 'react';
5
+ type TextFieldRootPropDefsType = GetPropDefTypes<typeof TextFieldRootPropDefs>;
6
+ type TextFieldInputProps = ComponentPropsWithout<'input', NotInputTextualAttributes | 'color' | 'defaultValue' | 'size' | 'type' | 'value'>;
7
+ interface TextFieldRootProps extends TextFieldInputProps, TextFieldRootPropDefsType {
8
+ defaultValue?: string | number;
9
+ value?: string | number;
10
+ type?: 'email' | 'hidden' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url';
11
+ }
12
+ type TextFieldSlotPropDefsType = GetPropDefTypes<typeof TextFieldSlotPropDefs>;
13
+ interface TextFieldSlotProps extends ComponentPropsWithout<'div', DefaultRemovedProps>, TextFieldSlotPropDefsType {
14
+ }
15
+ declare const TextField: React.ForwardRefExoticComponent<TextFieldRootProps & React.RefAttributes<HTMLInputElement>> & {
16
+ Slot: React.ForwardRefExoticComponent<TextFieldSlotProps & React.RefAttributes<HTMLDivElement>>;
17
+ };
18
+ export default TextField;
19
+ export type { TextFieldRootProps, TextFieldSlotProps };
@@ -0,0 +1,87 @@
1
+ declare const TextFieldRootPropDefs: {
2
+ m: {
3
+ type: "enum | string";
4
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
5
+ className: string;
6
+ customProperties: "--m"[];
7
+ };
8
+ mx: {
9
+ type: "enum | string";
10
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
11
+ className: string;
12
+ customProperties: ("--ml" | "--mr")[];
13
+ };
14
+ my: {
15
+ type: "enum | string";
16
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
17
+ className: string;
18
+ customProperties: ("--mt" | "--mb")[];
19
+ };
20
+ mt: {
21
+ type: "enum | string";
22
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
23
+ className: string;
24
+ customProperties: "--mt"[];
25
+ };
26
+ mr: {
27
+ type: "enum | string";
28
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
29
+ className: string;
30
+ customProperties: "--mr"[];
31
+ };
32
+ mb: {
33
+ type: "enum | string";
34
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
35
+ className: string;
36
+ customProperties: "--mb"[];
37
+ };
38
+ ml: {
39
+ type: "enum | string";
40
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
41
+ className: string;
42
+ customProperties: "--ml"[];
43
+ };
44
+ size: {
45
+ type: "enum";
46
+ className: string;
47
+ values: readonly ["1", "2", "3", "4", "5"];
48
+ default: "2";
49
+ };
50
+ variant: {
51
+ type: "enum";
52
+ className: string;
53
+ values: readonly ["classic", "underlined", "rounded"];
54
+ default: "classic";
55
+ };
56
+ };
57
+ declare const TextFieldSlotPropDefs: {
58
+ side: {
59
+ type: "enum";
60
+ values: readonly ["left", "right"];
61
+ };
62
+ gap: {
63
+ type: "enum | string";
64
+ className: string;
65
+ customProperties: "--gap"[];
66
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
67
+ };
68
+ px: {
69
+ type: "enum | string";
70
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
71
+ className: string;
72
+ customProperties: "--px"[];
73
+ };
74
+ pl: {
75
+ type: "enum | string";
76
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
77
+ className: string;
78
+ customProperties: "--pl"[];
79
+ };
80
+ pr: {
81
+ type: "enum | string";
82
+ values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
83
+ className: string;
84
+ customProperties: "--pr"[];
85
+ };
86
+ };
87
+ export { TextFieldRootPropDefs, TextFieldSlotPropDefs };
@@ -0,0 +1,21 @@
1
+ import { OutletUI } from './outlet';
2
+ import * as React from 'react';
3
+ type OutletProps = React.ComponentPropsWithoutRef<typeof OutletUI>;
4
+ interface CollectionProps extends OutletProps {
5
+ scope: any;
6
+ }
7
+ declare function createCollection<ItemElement extends HTMLElement, ItemData = object>(name: string): readonly [{
8
+ readonly Provider: React.FC<{
9
+ children?: React.ReactNode;
10
+ scope: any;
11
+ }>;
12
+ readonly Outlet: React.ForwardRefExoticComponent<CollectionProps & React.RefAttributes<HTMLElement>>;
13
+ readonly ItemOutlet: React.ForwardRefExoticComponent<React.PropsWithoutRef<ItemData & {
14
+ scope: any;
15
+ children: React.ReactNode;
16
+ }> & React.RefAttributes<ItemElement>>;
17
+ }, (scope: any) => () => ({
18
+ ref: React.RefObject<ItemElement | null>;
19
+ } & ItemData)[], import('../../core/react').CreateScope];
20
+ export { createCollection };
21
+ export type { CollectionProps };
@@ -0,0 +1,7 @@
1
+ export * from './outlet';
2
+ export * from './base';
3
+ export * from './collection';
4
+ export * from './remain';
5
+ export * from './visually-hidden';
6
+ export * from './reset';
7
+ export * from './roving-focus-group';
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ interface RemainProps {
3
+ remain: boolean;
4
+ children: React.ReactElement | ((props: {
5
+ remain: boolean;
6
+ }) => React.ReactElement);
7
+ }
8
+ declare function Remain(props: RemainProps): React.ReactElement<{
9
+ ref?: React.Ref<HTMLElement>;
10
+ }, string | React.JSXElementConstructor<any>> | null;
11
+ export { Remain };
12
+ export type { RemainProps };
@@ -0,0 +1,6 @@
1
+ import { ComponentPropsWithout, DefaultRemovedProps } from '../../core/react';
2
+ import { OutletUI } from './outlet';
3
+ import * as React from 'react';
4
+ type ResetProps = ComponentPropsWithout<typeof OutletUI, DefaultRemovedProps>;
5
+ declare const Reset: React.ForwardRefExoticComponent<ResetProps & React.RefAttributes<HTMLElement>>;
6
+ export { Reset };
@@ -0,0 +1,31 @@
1
+ import { Base } from './base';
2
+ import * as React from 'react';
3
+ declare const createRovingFocusGroupScope: import('../../core/react').CreateScope;
4
+ type Orientation = React.AriaAttributes['aria-orientation'];
5
+ interface RovingFocusGroupOptions {
6
+ orientation?: Orientation;
7
+ loop?: boolean;
8
+ }
9
+ type RovingFocusGroupProps = RovingFocusGroupImplProps;
10
+ declare const RovingFocusGroup: React.ForwardRefExoticComponent<RovingFocusGroupImplProps & React.RefAttributes<HTMLDivElement>>;
11
+ type BaseDivProps = React.ComponentPropsWithoutRef<typeof Base.div>;
12
+ interface RovingFocusGroupImplProps extends Omit<BaseDivProps, 'dir'>, RovingFocusGroupOptions {
13
+ currentTabStopId?: string | null;
14
+ defaultCurrentTabStopId?: string;
15
+ preventScrollOnEntryFocus?: boolean;
16
+ onCurrentTabStopIdChange?: (tabStopId: string | null) => void;
17
+ onEntryFocus?: (event: Event) => void;
18
+ }
19
+ type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Base.span>;
20
+ interface RovingFocusItemProps extends Omit<PrimitiveSpanProps, 'children'> {
21
+ tabStopId?: string;
22
+ focusable?: boolean;
23
+ active?: boolean;
24
+ children?: React.ReactNode | ((props: {
25
+ hasTabStop: boolean;
26
+ isCurrentTabStop: boolean;
27
+ }) => React.ReactNode);
28
+ }
29
+ declare const RovingFocusGroupItem: React.ForwardRefExoticComponent<RovingFocusItemProps & React.RefAttributes<HTMLSpanElement>>;
30
+ export { createRovingFocusGroupScope, RovingFocusGroup, RovingFocusGroupItem };
31
+ export type { RovingFocusGroupProps, RovingFocusItemProps };
@@ -2,6 +2,9 @@ export { default as Text, type TextProps } from './Text/index.js';
2
2
  export { default as Flex, type FlexProps } from './Flex/index.js';
3
3
  export { default as Button, type ButtonProps } from './Button/index.js';
4
4
  export { default as Spinner, type SpinnerProps } from './Spinner/index.js';
5
- export { OutletUI, type OutletProps } from './Outlet/index.js';
6
- export { Base } from './Base/index.js';
7
- export { VisuallyHidden, VISUALLY_HIDDEN_STYLES } from './VisuallyHidden/index.js';
5
+ export { default as Checkbox, type CheckboxProps } from './Checkbox/index.js';
6
+ export { default as CheckboxGroup, type CheckboxGroupRootProps, type CheckboxGroupItemProps, } from './CheckboxGroup';
7
+ export { default as Radio, type RadioProps } from './Radio/index.js';
8
+ export { default as RadioGroup, type RadioGroupRootProps, type RadioGroupItemProps, } from './RadioGroup';
9
+ export { default as Switch, type SwitchProps } from './Switch/index.js';
10
+ export { default as TextField, type TextFieldRootProps, type TextFieldSlotProps, } from './TextField/index.js';
@@ -0,0 +1,6 @@
1
+ declare const composeEventHandlers: <E extends {
2
+ defaultPrevented: boolean;
3
+ }>(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: {
4
+ checkForDefaultPrevented?: boolean | undefined;
5
+ }) => (event: E) => void;
6
+ export { composeEventHandlers };
@@ -0,0 +1 @@
1
+ export * from './compose-event-handlers';
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ declare const createContext: <ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType) => readonly [React.FC<ContextValueType & {
3
+ children: React.ReactNode;
4
+ }>, (consumerName: string) => ContextValueType];
5
+ type Scope<C = any> = {
6
+ [scopeName: string]: React.Context<C>[];
7
+ } | undefined;
8
+ type ScopeHook = (scope: Scope) => {
9
+ [__scopeProp: string]: Scope;
10
+ };
11
+ interface CreateScope {
12
+ scopeName: string;
13
+ (): ScopeHook;
14
+ }
15
+ declare const createContextScope: (scopeName: string, createContextScopeDeps?: CreateScope[]) => readonly [<ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType) => readonly [React.FC<ContextValueType & {
16
+ scope: Scope<ContextValueType>;
17
+ children: React.ReactNode;
18
+ }>, (consumerName: string, scope: Scope<ContextValueType | undefined>) => ContextValueType], CreateScope];
19
+ export { createContext, createContextScope };
20
+ export type { CreateScope, Scope };
@@ -2,3 +2,13 @@ export * from './props';
2
2
  export * from './ref';
3
3
  export * from './extract-props';
4
4
  export * from './component-props';
5
+ export * from './require-react-element';
6
+ export * from './create-context';
7
+ export * from './input-attributes';
8
+ export * from './use-safe-layout-effect';
9
+ export * from './use-safe-id';
10
+ export * from './use-callback-ref';
11
+ export * from './use-controllable-state';
12
+ export * from './use-previous';
13
+ export * from './use-size';
14
+ export * from './use-finite-state-machine';
@@ -0,0 +1,6 @@
1
+ type InputAttributes = 'accept' | 'alt' | 'autocapitalize' | 'autocomplete' | 'capture' | 'checked' | 'defaultChecked' | 'defaultValue' | 'disabled' | 'form' | 'formaction' | 'formenctype' | 'formmethod' | 'formnovalidate' | 'formtarget' | 'height' | 'list' | 'max' | 'maxlength' | 'min' | 'minlength' | 'multiple' | 'name' | 'pattern' | 'placeholder' | 'popovertarget' | 'popovertargetaction' | 'readonly' | 'required' | 'size' | 'src' | 'step' | 'type' | 'value' | 'width';
2
+ type InputTextualAttributes = 'autoCapitalize' | 'autoComplete' | 'defaultValue' | 'disabled' | 'form' | 'list' | 'maxLength' | 'minLength' | 'min' | 'multiple' | 'max' | 'name' | 'pattern' | 'placeholder' | 'readOnly' | 'required' | 'size' | 'step' | 'type' | 'value';
3
+ type InputRadioAttributes = 'checked' | 'defaultChecked' | 'defaultValue' | 'disabled' | 'form' | 'name' | 'required' | 'value';
4
+ type NotInputRadioAttributes = Exclude<InputAttributes, InputRadioAttributes>;
5
+ type NotInputTextualAttributes = Exclude<InputAttributes, InputTextualAttributes>;
6
+ export type { InputAttributes, InputRadioAttributes, NotInputRadioAttributes, InputTextualAttributes, NotInputTextualAttributes, };
@@ -2,4 +2,5 @@ import { default as React } from 'react';
2
2
  type PossibleRef<T> = React.Ref<T> | undefined;
3
3
  declare const composeRefs: <T>(...refs: PossibleRef<T>[]) => React.RefCallback<T>;
4
4
  declare const getElementRef: (element: React.ReactElement) => any;
5
- export { composeRefs, getElementRef };
5
+ declare function useComposedRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T>;
6
+ export { composeRefs, getElementRef, useComposedRefs };
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ declare const requireReactElement: <T extends React.ReactNode>(children: T) => T;
3
+ export { requireReactElement };
@@ -0,0 +1,2 @@
1
+ declare function useCallbackRef<T extends (...args: any[]) => any>(callback: T | undefined): T;
2
+ export { useCallbackRef };
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ type ChangeHandler<T> = (state: T) => void;
3
+ type SetStateFn<T> = React.Dispatch<React.SetStateAction<T>>;
4
+ interface UseControllableStateParams<T> {
5
+ prop?: T | undefined;
6
+ defaultProp: T;
7
+ onChange?: ChangeHandler<T>;
8
+ caller?: string;
9
+ }
10
+ declare function useControllableState<T>({ prop, defaultProp, onChange, caller, }: UseControllableStateParams<T>): [T, SetStateFn<T>];
11
+ export { useControllableState };
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ type Machine<S> = {
3
+ [k: string]: {
4
+ [k: string]: S;
5
+ };
6
+ };
7
+ type MachineState<T> = keyof T;
8
+ type UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any ? R : never;
9
+ declare function useFiniteStateMachine<M>(initialState: MachineState<M>, machine: M & Machine<MachineState<M>>): readonly [keyof M, React.ActionDispatch<[action: keyof UnionToIntersection<M[keyof M]>]>];
10
+ export { useFiniteStateMachine };
@@ -0,0 +1,2 @@
1
+ declare function usePrevious<T>(value: T): T;
2
+ export { usePrevious };
@@ -0,0 +1,2 @@
1
+ declare function useSafeId(deterministicId?: string): string;
2
+ export { useSafeId };
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ declare const useSafeLayoutEffect: typeof React.useLayoutEffect;
3
+ export { useSafeLayoutEffect };
@@ -0,0 +1,5 @@
1
+ declare function useSize(element: HTMLElement | null): {
2
+ width: number;
3
+ height: number;
4
+ } | undefined;
5
+ export { useSize };
@@ -0,0 +1,4 @@
1
+ import { IconProps } from './icon.props';
2
+ import * as React from 'react';
3
+ declare const CheckLineIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
4
+ export { CheckLineIcon };
@@ -0,0 +1,4 @@
1
+ import { IconProps } from './icon.props';
2
+ import * as React from 'react';
3
+ declare const IndeterminateLineIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
4
+ export { IndeterminateLineIcon };
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ interface IconProps extends React.SVGAttributes<SVGSVGElement> {
3
+ color?: string;
4
+ }
5
+ export type { IconProps };
@@ -0,0 +1,3 @@
1
+ export * from './CheckLineIcon';
2
+ export * from './IndeterminateLineIcon';
3
+ export type { IconProps } from './icon.props';
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './components/index.js';
2
+ export * from './icons/index.js';