@tempots/beatui 0.0.6 → 0.1.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.
Files changed (72) hide show
  1. package/README.md +30 -2
  2. package/dist/beatui.css +1 -1
  3. package/dist/index.es.js +3942 -2851
  4. package/dist/index.umd.js +100 -5
  5. package/dist/types/components/data/icon.d.ts +5 -1
  6. package/dist/types/components/data/tag.d.ts +4 -2
  7. package/dist/types/components/form/control/control-input-wrapper.d.ts +1 -1
  8. package/dist/types/components/form/control/control-options.d.ts +2 -2
  9. package/dist/types/components/form/control/date-control.d.ts +2 -1
  10. package/dist/types/components/form/control/date-time-control.d.ts +2 -1
  11. package/dist/types/components/form/control/email-control.d.ts +2 -1
  12. package/dist/types/components/form/control/ensure-control.d.ts +3 -0
  13. package/dist/types/components/form/control/lazy-native-select-control.d.ts +2 -2
  14. package/dist/types/components/form/control/list-control.d.ts +14 -0
  15. package/dist/types/components/form/control/native-select-control.d.ts +2 -2
  16. package/dist/types/components/form/control/nullable-date-control.d.ts +2 -1
  17. package/dist/types/components/form/control/nullable-date-time-control.d.ts +2 -1
  18. package/dist/types/components/form/control/nullable-string-date-control.d.ts +2 -1
  19. package/dist/types/components/form/control/nullable-string-date-time-control.d.ts +2 -1
  20. package/dist/types/components/form/control/nullable-text-area-control.d.ts +2 -2
  21. package/dist/types/components/form/control/nullable-text-control.d.ts +2 -1
  22. package/dist/types/components/form/control/number-control.d.ts +2 -2
  23. package/dist/types/components/form/control/password-control.d.ts +2 -1
  24. package/dist/types/components/form/control/segmented-control.d.ts +6 -8
  25. package/dist/types/components/form/control/string-date-control.d.ts +2 -1
  26. package/dist/types/components/form/control/tags-control.d.ts +2 -1
  27. package/dist/types/components/form/control/text-area-control.d.ts +2 -2
  28. package/dist/types/components/form/control/text-control.d.ts +7 -6
  29. package/dist/types/components/form/controller/controller.d.ts +50 -0
  30. package/dist/types/components/form/controller/index.d.ts +3 -4
  31. package/dist/types/components/form/controller/validation-result.d.ts +3 -2
  32. package/dist/types/components/form/input/appearance-selector.d.ts +8 -0
  33. package/dist/types/components/form/input/index.d.ts +2 -1
  34. package/dist/types/components/form/input/input-options.d.ts +3 -3
  35. package/dist/types/components/form/input/{toggle.d.ts → switch.d.ts} +3 -2
  36. package/dist/types/components/form/use-form.d.ts +16 -5
  37. package/dist/types/components/layout/app-shell.d.ts +3 -3
  38. package/dist/types/components/layout/collapse.d.ts +5 -0
  39. package/dist/types/components/layout/index.d.ts +2 -0
  40. package/dist/types/components/layout/scrollable-panel.d.ts +8 -0
  41. package/dist/types/components/layout/with-breakpoint.d.ts +4 -4
  42. package/dist/types/components/navigation/flyout.d.ts +44 -0
  43. package/dist/types/components/navigation/index.d.ts +3 -0
  44. package/dist/types/components/navigation/menu/menu.d.ts +6 -0
  45. package/dist/types/components/navigation/sidebar/collapsible-sidebar-group.d.ts +8 -0
  46. package/dist/types/components/navigation/sidebar/index.d.ts +3 -0
  47. package/dist/types/components/navigation/sidebar/sidebar-group.d.ts +5 -0
  48. package/dist/types/components/navigation/sidebar/sidebar-link.d.ts +19 -0
  49. package/dist/types/components/overlay/drawer.d.ts +29 -0
  50. package/dist/types/components/overlay/index.d.ts +3 -0
  51. package/dist/types/components/overlay/modal.d.ts +40 -0
  52. package/dist/types/components/overlay/overlay.d.ts +6 -9
  53. package/dist/types/components/overlay/tooltip.d.ts +37 -0
  54. package/dist/types/components/theme/theme.d.ts +1 -1
  55. package/dist/types/components/theme/types.d.ts +2 -89
  56. package/dist/types/index.d.ts +1 -1
  57. package/dist/types/tokens/colors.d.ts +91 -0
  58. package/dist/types/tokens/index.d.ts +1 -0
  59. package/dist/types/tokens/shadows.d.ts +21 -0
  60. package/dist/types/tokens/spacing.d.ts +2 -1
  61. package/dist/types/tokens/text-shadows.d.ts +12 -0
  62. package/dist/types/tokens/typography.d.ts +8 -1
  63. package/dist/types/tokens/z-index.d.ts +16 -0
  64. package/dist/types/utils/types.d.ts +1 -0
  65. package/dist/types/utils/use-animated-toggle.d.ts +25 -8
  66. package/package.json +7 -18
  67. package/dist/types/components/form/controller/form-controller.d.ts +0 -4
  68. package/dist/types/components/form/controller/group-controller.d.ts +0 -15
  69. package/dist/types/components/form/controller/list-controller.d.ts +0 -22
  70. package/dist/types/components/form/controller/value-controller.d.ts +0 -27
  71. package/dist/types/theme/beatui-theme.d.ts +0 -20
  72. package/dist/types/theme/index.d.ts +0 -1
@@ -1,12 +1,11 @@
1
1
  import { BackgroundColorName, ThemeColorName } from '@/tokens';
2
- import { RadiusName } from '@/tokens/radius';
3
2
  import { Signal } from '@tempots/dom';
4
3
  export type ButtonVariant = 'filled' | 'light' | 'outline' | 'default' | 'text';
5
4
  export type ControlSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
6
5
  export type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
7
- export type OverlayEffect = 'transparent' | 'visible';
6
+ export type OverlayEffect = 'transparent' | 'opaque' | 'none';
8
7
  export type OverlayMode = 'capturing' | 'non-capturing';
9
- export type FadeTranstionState = 'initial' | 'entering' | 'entered' | 'exiting' | 'exited';
8
+ export type FadeTransitionState = 'initial' | 'entering' | 'entered' | 'exiting' | 'exited';
10
9
  export type Side = 'left' | 'right' | 'top' | 'bottom' | 'none' | 'all' | ('left' | 'right' | 'top' | 'bottom')[];
11
10
  export type PanelColor = BackgroundColorName | ThemeColorName | 'white' | 'black' | 'transparent';
12
11
  export type PanelShadow = 'none' | 'sm' | 'md' | 'lg';
@@ -17,99 +16,13 @@ export type JustifySelf = 'auto' | 'start' | 'center' | 'safe center' | 'end' |
17
16
  export type AlignContent = 'normal' | 'center' | 'flex-start' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly' | 'baseline' | 'stretch';
18
17
  export type AlignItems = 'flex-start' | 'flex-end' | 'safe flex-end' | 'center' | 'safe-center' | 'baseline' | 'last-baseline' | 'stretch';
19
18
  export type AlignSelf = 'auto' | 'flex-start' | 'flex-end' | 'safe flex-end' | 'center' | 'safe center' | 'stretch' | 'baseline' | 'last baseline';
20
- export type ButtonStyleOptions = {
21
- variant: ButtonVariant;
22
- size: ControlSize;
23
- color: string;
24
- roundedness: RadiusName;
25
- };
26
- export type OverlayStyleOptions = {
27
- effect: OverlayEffect;
28
- mode: OverlayMode;
29
- };
30
- export type PanelStyleOptions = {
31
- side: Side;
32
- color: PanelColor;
33
- shadow: PanelShadow;
34
- };
35
- export type LabelStyleOptions = {
36
- type: LabelType;
37
- };
38
- export type IconStyleOptions = {
39
- size: IconSize;
40
- color?: string;
41
- };
42
- export type InputContainerStyleOptions = {
43
- disabled?: boolean;
44
- hasError?: boolean;
45
- };
46
- export type ControlInputWrapperStyleOptions = {
47
- hasError?: boolean;
48
- disabled?: boolean;
49
- };
50
- export type TagStyleOptions = {
51
- disabled?: boolean;
52
- color?: string;
53
- };
54
- export type CheckboxInputStyleOptions = {
55
- disabled?: boolean;
56
- };
57
- export type EditableTextStyleOptions = {
58
- isEditing?: boolean;
59
- };
60
- export type NumberInputStyleOptions = {
61
- disabled?: boolean;
62
- };
63
- export type ToggleStyleOptions = {
64
- disabled?: boolean;
65
- size?: ControlSize;
66
- };
67
- export type FadeInOutStyleOptions = {
68
- state: FadeTranstionState;
69
- };
70
19
  export type CardVariant = 'default' | 'elevated' | 'flat' | 'outlined';
71
- export type CardStyleOptions = {
72
- variant?: CardVariant;
73
- size?: ControlSize;
74
- roundedness?: RadiusName;
75
- };
76
20
  export type CenterGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
77
- export type CenterStyleOptions = {
78
- gap?: CenterGap;
79
- };
80
21
  export type SinkVariant = 'default' | 'deep' | 'shallow' | 'flat';
81
- export type SinkStyleOptions = {
82
- variant?: SinkVariant;
83
- size?: ControlSize;
84
- roundedness?: RadiusName;
85
- };
86
- export type SegmentedControlStyleOptions = {
87
- size?: ControlSize;
88
- };
89
- export interface ThemeDefinition {
90
- button: (options: ButtonStyleOptions) => string;
91
- overlay: (options: OverlayStyleOptions) => string;
92
- icon: (options: IconStyleOptions) => string;
93
- panel: (options: PanelStyleOptions) => string;
94
- label: (options: LabelStyleOptions) => string;
95
- inputContainer: (options: InputContainerStyleOptions) => string;
96
- controlInputWrapper: (options: ControlInputWrapperStyleOptions) => string;
97
- controlInputWrapperLabelText: (options: ControlInputWrapperStyleOptions) => string;
98
- tag: (options: TagStyleOptions) => string;
99
- checkboxInput: (options: CheckboxInputStyleOptions) => string;
100
- editableText: (options: EditableTextStyleOptions) => string;
101
- numberInput: (options: NumberInputStyleOptions) => string;
102
- card: (options: CardStyleOptions) => string;
103
- center: (options: CenterStyleOptions) => string;
104
- sink: (options: SinkStyleOptions) => string;
105
- segmentedControl: (options: SegmentedControlStyleOptions) => string;
106
- toggle: (options: ToggleStyleOptions) => string;
107
- }
108
22
  export type AppearancePreference = 'light' | 'dark' | 'system';
109
23
  export type Appearance = 'light' | 'dark';
110
24
  export interface ThemeValue {
111
25
  setAppearancePreference: (appearance: AppearancePreference) => void;
112
26
  appearancePreference: Signal<AppearancePreference>;
113
27
  appearance: Signal<Appearance>;
114
- theme: ThemeDefinition;
115
28
  }
@@ -4,9 +4,9 @@ export * from './components/data';
4
4
  export * from './components/form';
5
5
  export * from './components/layout';
6
6
  export * from './components/misc';
7
+ export * from './components/navigation';
7
8
  export * from './components/overlay';
8
9
  export * from './components/theme';
9
10
  export * from './components/typography';
10
- export * from './theme';
11
11
  export * from './tokens';
12
12
  export * from './utils';
@@ -22,7 +22,98 @@ export declare const borderColors: {
22
22
  light: Record<BorderColorName, [ThemeColorName, ColorShade]>;
23
23
  dark: Record<BorderColorName, [ThemeColorName, ColorShade]>;
24
24
  };
25
+ export type InteractiveColorName = 'focus' | 'hover' | 'active';
26
+ export declare const interactiveColors: {
27
+ light: Record<InteractiveColorName, [ThemeColorName, ColorShade]>;
28
+ dark: Record<InteractiveColorName, [ThemeColorName, ColorShade]>;
29
+ };
25
30
  export declare function normalizeColorName(color: ThemeColorName): ThemeColorName;
26
31
  export declare function getColorVarName(color: ThemeColorName, shade: ColorShade): `--color-${ThemeColorName}-${ColorShade}`;
27
32
  export declare function getColorVar(color: ThemeColorName, shade: ColorShade): string;
33
+ export type BackgroundVariant = 'solid' | 'light' | 'lighter';
34
+ export declare const backgroundConfig: {
35
+ readonly special: {
36
+ readonly inherit: {
37
+ readonly backgroundColor: "inherit";
38
+ readonly color: "inherit";
39
+ };
40
+ readonly white: {
41
+ readonly backgroundColor: "var(--color-white)";
42
+ readonly color: "var(--color-base-900)";
43
+ };
44
+ readonly black: {
45
+ readonly backgroundColor: "black";
46
+ readonly color: "var(--color-white)";
47
+ };
48
+ readonly transparent: {
49
+ readonly backgroundColor: "transparent";
50
+ readonly color: "inherit";
51
+ };
52
+ };
53
+ readonly variants: {
54
+ readonly solid: {
55
+ readonly light: {
56
+ readonly bgShade: 500;
57
+ readonly textColor: "var(--color-white)";
58
+ };
59
+ readonly dark: {
60
+ readonly bgShade: 600;
61
+ readonly textColor: "var(--color-black)";
62
+ };
63
+ };
64
+ readonly light: {
65
+ readonly light: {
66
+ readonly bgShade: 200;
67
+ readonly textColor: "var(--text-normal-light)";
68
+ };
69
+ readonly dark: {
70
+ readonly bgShade: 800;
71
+ readonly textColor: "var(--text-normal-dark)";
72
+ };
73
+ };
74
+ readonly lighter: {
75
+ readonly light: {
76
+ readonly bgShade: 100;
77
+ readonly textColor: "var(--text-normal-light)";
78
+ };
79
+ readonly dark: {
80
+ readonly bgShade: 900;
81
+ readonly textColor: "var(--text-normal-dark)";
82
+ };
83
+ };
84
+ };
85
+ readonly overrides: {
86
+ readonly white: {
87
+ readonly light: {
88
+ readonly backgroundColor: "var(--color-white)";
89
+ readonly color: "var(--color-base-900)";
90
+ };
91
+ readonly dark: {
92
+ readonly backgroundColor: "var(--color-black)";
93
+ readonly color: "var(--color-base-100)";
94
+ };
95
+ };
96
+ readonly black: {
97
+ readonly light: {
98
+ readonly backgroundColor: "black";
99
+ readonly color: "var(--color-white)";
100
+ };
101
+ readonly dark: {
102
+ readonly backgroundColor: "black";
103
+ readonly color: "var(--color-white)";
104
+ };
105
+ };
106
+ readonly transparent: {
107
+ readonly light: {
108
+ readonly backgroundColor: "transparent";
109
+ readonly color: "inherit";
110
+ };
111
+ readonly dark: {
112
+ readonly backgroundColor: "transparent";
113
+ readonly color: "inherit";
114
+ };
115
+ };
116
+ };
117
+ };
118
+ export declare function generateBackgroundUtilities(): string;
28
119
  export declare function generateColorVariables(): Record<string, string>;
@@ -4,5 +4,6 @@ export * from './colors';
4
4
  export * from './radius';
5
5
  export * from './spacing';
6
6
  export * from './typography';
7
+ export * from './z-index';
7
8
  export declare function generateAllTokenVariables(): Record<string, string>;
8
9
  export declare function getTokenValue(tokenName: string, element?: HTMLElement): string;
@@ -0,0 +1,21 @@
1
+ export declare const shadows: {
2
+ readonly none: "none";
3
+ readonly '2xs': "0 1px rgb(0 0 0 / 0.05)";
4
+ readonly xs: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
5
+ readonly sm: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)";
6
+ readonly md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
7
+ readonly lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
8
+ readonly xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
9
+ readonly '2xl': "0 25px 50px -12px rgb(0 0 0 / 0.25)";
10
+ readonly 'top-2xs': "0 -1px rgb(0 0 0 / 0.05)";
11
+ readonly 'top-xs': "0 -1px 2px 0 rgb(0 0 0 / 0.05)";
12
+ readonly 'top-sm': "0 -1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)";
13
+ readonly 'top-md': "0 -4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
14
+ readonly 'top-lg': "0 -10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
15
+ readonly 'top-xl': "0 -20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
16
+ readonly 'top-2xl': "0 -25px 50px -12px rgb(0 0 0 / 0.25)";
17
+ };
18
+ export type ShadowSize = keyof typeof shadows;
19
+ export declare function getShadowVarName(size: ShadowSize): string;
20
+ export declare function getShadowVar(size: ShadowSize): string;
21
+ export declare function generateShadowVariables(): Record<string, string>;
@@ -10,7 +10,8 @@ export declare const spacing: {
10
10
  readonly xl: "calc(var(--spacing-base) * 3)";
11
11
  readonly '2xl': "calc(var(--spacing-base) * 4)";
12
12
  readonly '3xl': "calc(var(--spacing-base) * 6)";
13
- readonly full: "9999px";
13
+ readonly '4xl': "calc(var(--spacing-base) * 8)";
14
+ readonly full: "2000px";
14
15
  };
15
16
  export type SpacingName = keyof typeof spacing;
16
17
  export declare function getSpacingVarName(size: SpacingName): string;
@@ -0,0 +1,12 @@
1
+ export declare const textShadows: {
2
+ readonly none: "none";
3
+ readonly '2xs': "0px 1px 0px rgb(0 0 0 / 0.15)";
4
+ readonly xs: "0px 1px 1px rgb(0 0 0 / 0.2)";
5
+ readonly sm: "0px 1px 0px rgb(0 0 0 / 0.075), 0px 1px 1px rgb(0 0 0 / 0.075), 0px 2px 2px rgb(0 0 0 / 0.075)";
6
+ readonly md: "0px 1px 1px rgb(0 0 0 / 0.1), 0px 1px 2px rgb(0 0 0 / 0.1), 0px 2px 4px rgb(0 0 0 / 0.1)";
7
+ readonly lg: "0px 1px 2px rgb(0 0 0 / 0.1), 0px 3px 2px rgb(0 0 0 / 0.1), 0px 4px 8px rgb(0 0 0 / 0.1)";
8
+ };
9
+ export type TextShadowSize = keyof typeof textShadows;
10
+ export declare function getTextShadowVarName(size: TextShadowSize): string;
11
+ export declare function getTextShadowVar(size: TextShadowSize): string;
12
+ export declare function generateTextShadowVariables(): Record<string, string>;
@@ -1,11 +1,17 @@
1
1
  export declare const fontSize: {
2
+ readonly '3xs': readonly ["0.5rem", {
3
+ readonly lineHeight: "0.75rem";
4
+ }];
5
+ readonly '2xs': readonly ["0.625rem", {
6
+ readonly lineHeight: "0.75rem";
7
+ }];
2
8
  readonly xs: readonly ["0.75rem", {
3
9
  readonly lineHeight: "1rem";
4
10
  }];
5
11
  readonly sm: readonly ["0.875rem", {
6
12
  readonly lineHeight: "1.25rem";
7
13
  }];
8
- readonly base: readonly ["1rem", {
14
+ readonly md: readonly ["1rem", {
9
15
  readonly lineHeight: "1.5rem";
10
16
  }];
11
17
  readonly lg: readonly ["1.125rem", {
@@ -39,6 +45,7 @@ export declare const fontSize: {
39
45
  readonly lineHeight: "1";
40
46
  }];
41
47
  };
48
+ export declare function changeFontSize(size: FontSize, steps: number): "sm" | "md" | "lg" | "xl" | "2xl" | "xs" | "3xl" | "4xl" | "3xs" | "2xs" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
42
49
  export type FontSize = keyof typeof fontSize;
43
50
  export declare const fontWeight: {
44
51
  readonly thin: "100";
@@ -0,0 +1,16 @@
1
+ export declare const zIndex: {
2
+ readonly base: 0;
3
+ readonly raised: 10;
4
+ readonly navigation: 20;
5
+ readonly sidebar: 20;
6
+ readonly overlay: 50;
7
+ readonly modal: 60;
8
+ readonly tooltip: 70;
9
+ readonly popover: 80;
10
+ readonly notification: 90;
11
+ readonly maximum: 100;
12
+ };
13
+ export type ZIndexName = keyof typeof zIndex;
14
+ export declare function getZIndexVarName(level: ZIndexName): string;
15
+ export declare function getZIndexVar(level: ZIndexName): string;
16
+ export declare function generateZIndexVariables(): Record<string, string>;
@@ -0,0 +1 @@
1
+ export type IsUnion<T, U = T> = T extends any ? [U] extends [T] ? false : true : never;
@@ -1,5 +1,5 @@
1
- import { type Signal } from '@tempots/dom';
2
- export type ToggleStatus = 'closed' | 'start-opening' | 'opening' | 'open' | 'closing';
1
+ import { Value, type Signal } from '@tempots/dom';
2
+ export type ToggleStatus = 'closed' | 'start-opening' | 'opening' | 'opened' | 'closing' | 'start-closing';
3
3
  export type AnimatedToggleOptions = {
4
4
  initialStatus?: Exclude<ToggleStatus, 'start-opening'>;
5
5
  openedAfter: (cb: () => void) => () => void;
@@ -11,8 +11,13 @@ export declare function useAnimatedToggle({ initialStatus, openedAfter, closedAf
11
11
  close: () => void;
12
12
  toggle: () => void;
13
13
  setOpen: (v: boolean) => void;
14
- isOpen: import("@tempots/dom").Computed<boolean>;
15
- displayOpen: import("@tempots/dom").Computed<boolean>;
14
+ display: import("@tempots/dom").Computed<boolean>;
15
+ isClosed: import("@tempots/dom").Computed<boolean>;
16
+ isStartOpening: import("@tempots/dom").Computed<boolean>;
17
+ isOpening: import("@tempots/dom").Computed<boolean>;
18
+ isOpened: import("@tempots/dom").Computed<boolean>;
19
+ isClosing: import("@tempots/dom").Computed<boolean>;
20
+ isStartClosing: import("@tempots/dom").Computed<boolean>;
16
21
  dispose: () => void;
17
22
  onClosed: (fn: () => void) => () => void;
18
23
  };
@@ -28,8 +33,13 @@ export declare function useTimedToggle({ initialStatus, duration, openDuration,
28
33
  close: () => void;
29
34
  toggle: () => void;
30
35
  setOpen: (v: boolean) => void;
31
- isOpen: import("@tempots/dom").Computed<boolean>;
32
- displayOpen: import("@tempots/dom").Computed<boolean>;
36
+ display: import("@tempots/dom").Computed<boolean>;
37
+ isClosed: import("@tempots/dom").Computed<boolean>;
38
+ isStartOpening: import("@tempots/dom").Computed<boolean>;
39
+ isOpening: import("@tempots/dom").Computed<boolean>;
40
+ isOpened: import("@tempots/dom").Computed<boolean>;
41
+ isClosing: import("@tempots/dom").Computed<boolean>;
42
+ isStartClosing: import("@tempots/dom").Computed<boolean>;
33
43
  dispose: () => void;
34
44
  onClosed: (fn: () => void) => () => void;
35
45
  };
@@ -43,9 +53,16 @@ export declare function useAnimatedElementToggle({ initialStatus, element, }?: A
43
53
  close: () => void;
44
54
  toggle: () => void;
45
55
  setOpen: (v: boolean) => void;
46
- isOpen: import("@tempots/dom").Computed<boolean>;
47
- displayOpen: import("@tempots/dom").Computed<boolean>;
56
+ display: import("@tempots/dom").Computed<boolean>;
57
+ isClosed: import("@tempots/dom").Computed<boolean>;
58
+ isStartOpening: import("@tempots/dom").Computed<boolean>;
59
+ isOpening: import("@tempots/dom").Computed<boolean>;
60
+ isOpened: import("@tempots/dom").Computed<boolean>;
61
+ isClosing: import("@tempots/dom").Computed<boolean>;
62
+ isStartClosing: import("@tempots/dom").Computed<boolean>;
48
63
  dispose: () => void;
49
64
  onClosed: (fn: () => void) => () => void;
50
65
  setElement: (value: HTMLElement) => void;
51
66
  };
67
+ export type Animation = 'none' | 'slide-right' | 'slide-left' | 'slide-up' | 'slide-down' | 'fade' | 'fade-slide-right' | 'fade-slide-left' | 'fade-slide-up' | 'fade-slide-down' | 'scale' | 'scale-fade' | 'flyout-top' | 'flyout-bottom' | 'flyout-left' | 'flyout-right';
68
+ export declare function AnimatedToggleClass(animation: Value<Animation>, status: Signal<ToggleStatus>): import("@tempots/dom").Renderable;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tempots/beatui",
3
- "version": "0.0.6",
3
+ "version": "0.1.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.umd.js",
6
6
  "module": "dist/index.es.js",
@@ -54,9 +54,9 @@
54
54
  "registry": "https://registry.npmjs.org/"
55
55
  },
56
56
  "peerDependencies": {
57
- "@tempots/dom": ">=26.11.0",
58
- "@tempots/std": ">=0.18.0",
59
- "@tempots/ui": ">=3.1.0"
57
+ "@tempots/dom": "28.1.5",
58
+ "@tempots/std": "0.20.0",
59
+ "@tempots/ui": "5.0.0"
60
60
  },
61
61
  "peerDependenciesMeta": {
62
62
  "@tempots/dom": {
@@ -70,8 +70,6 @@
70
70
  }
71
71
  },
72
72
  "devDependencies": {
73
- "@playwright/test": "1.52.0",
74
- "@storybook/html-vite": "9.0.4",
75
73
  "@testing-library/dom": "10.4.0",
76
74
  "@types/node": "22.15.18",
77
75
  "@typescript-eslint/eslint-plugin": "8.32.1",
@@ -79,11 +77,8 @@
79
77
  "eslint": "9.27.0",
80
78
  "eslint-config-prettier": "10.1.5",
81
79
  "eslint-plugin-prettier": "5.4.0",
82
- "eslint-plugin-storybook": "9.0.4",
83
80
  "jsdom": "26.1.0",
84
81
  "prettier": "3.5.3",
85
- "start-server-and-test": "^2.0.12",
86
- "storybook": "9.0.4",
87
82
  "tsx": "^4.19.4",
88
83
  "typescript": "5.8.3",
89
84
  "typescript-eslint": "8.32.1",
@@ -92,19 +87,13 @@
92
87
  "zod": "^3.25.32"
93
88
  },
94
89
  "scripts": {
95
- "dev": "vite",
96
90
  "build": "vite build && tsc -p tsconfig.build.json",
91
+ "build:watch": "vite build --watch",
97
92
  "test": "vitest run",
98
93
  "test:watch": "vitest",
99
- "test:e2e": "playwright test",
100
- "test:e2e:ci": "PLAYWRIGHT_TEST_BASE_URL=http://localhost:6006 playwright test --project=chromium",
101
- "test:all": "pnpm test && pnpm storybook:ci && pnpm test:e2e",
102
- "storybook:ci": "start-server-and-test storybook http://localhost:6006 test:e2e:ci",
103
94
  "lint": "eslint . --ext .ts",
104
- "format": "prettier --write \"src/**/*.ts\" \"stories/**/*.ts\"",
105
- "storybook": "storybook dev -p 6006",
106
- "storybook:build": "storybook build",
107
- "clean": "rm -rf dist storybook-static",
95
+ "format": "prettier --write \"src/**/*.ts\"",
96
+ "clean": "rm -rf dist",
108
97
  "release:patch": "pnpm run release:prepare && pnpm version patch && pnpm run release:publish && pnpm run release:commit",
109
98
  "release:minor": "pnpm run release:prepare && pnpm version minor && pnpm run release:publish && pnpm run release:commit",
110
99
  "release:major": "pnpm run release:prepare && pnpm version major && pnpm run release:publish && pnpm run release:commit",
@@ -1,4 +0,0 @@
1
- import { GroupController } from './group-controller';
2
- export declare class FormController<In extends Record<string, any>> extends GroupController<In> {
3
- dispose(): void;
4
- }
@@ -1,15 +0,0 @@
1
- import { ValidationResult } from './validation-result';
2
- import { ValueController } from './value-controller';
3
- import { ListController } from './list-controller';
4
- import { Signal } from '@tempots/dom';
5
- import { Path } from './path';
6
- export declare class GroupController<In extends Record<string, any>> extends ValueController<In> {
7
- #private;
8
- constructor(path: Path, change: (value: In) => void, value: Signal<In>, status: Signal<ValidationResult>, parent: {
9
- disabled: Signal<boolean>;
10
- });
11
- readonly field: <K extends keyof In & string>(field: In[K] extends any[] | Record<string, any> ? never : K) => ValueController<In[K]>;
12
- readonly list: <K extends keyof In & string>(field: In[K] extends any[] ? K : never) => ListController<In[K]>;
13
- readonly group: <K extends keyof In & string>(field: In[K] extends Record<string, any> ? K : never) => GroupController<In[K]>;
14
- dispose(): void;
15
- }
@@ -1,22 +0,0 @@
1
- import { Signal } from '@tempots/dom';
2
- import { Path } from './path';
3
- import { ValidationResult } from './validation-result';
4
- import { ValueController } from './value-controller';
5
- import { GroupController } from './group-controller';
6
- export declare class ListController<In extends any[]> extends ValueController<In> {
7
- #private;
8
- constructor(path: Path, change: (value: In) => void, value: Signal<In>, status: Signal<ValidationResult>, parent: {
9
- disabled: Signal<boolean>;
10
- });
11
- readonly length: import("@tempots/dom").Computed<number>;
12
- readonly item: (index: In[number] extends Record<string, any> | any[] ? never : number) => ValueController<In[number]>;
13
- readonly list: (index: In[number] extends In[number] ? number : never) => ListController<In[number]>;
14
- readonly group: (index: In[number] extends Record<string, any> ? number : never) => GroupController<In[number]>;
15
- dispose(): void;
16
- readonly push: (...value: In[number][]) => void;
17
- readonly pop: () => void;
18
- readonly shift: () => void;
19
- readonly unshift: (...value: In[number]) => void;
20
- readonly removeAt: (index: number) => void;
21
- readonly splice: (start: number, deleteCount?: number) => void;
22
- }
@@ -1,27 +0,0 @@
1
- import { Signal } from '@tempots/dom';
2
- import { Path } from './path';
3
- import { InvalidDependencies, ValidationResult } from './validation-result';
4
- export declare class ValueController<In> {
5
- #private;
6
- readonly path: Path;
7
- readonly change: (value: In) => void;
8
- readonly value: Signal<In>;
9
- readonly status: Signal<ValidationResult>;
10
- readonly error: Signal<undefined | string>;
11
- readonly hasError: Signal<boolean>;
12
- readonly dependencyErrors: Signal<undefined | Record<string | number, InvalidDependencies>>;
13
- protected readonly parent: {
14
- disabled: Signal<boolean>;
15
- };
16
- readonly disabled: Signal<boolean>;
17
- constructor(path: Path, change: (value: In) => void, value: Signal<In>, status: Signal<ValidationResult>, parent: {
18
- disabled: Signal<boolean>;
19
- });
20
- get name(): string;
21
- dispose(): void;
22
- readonly disable: () => void;
23
- readonly enable: () => void;
24
- }
25
- export type CreateController<In, VC extends ValueController<In>> = (path: Path, onChange: (value: In) => void, value: Signal<In>, status: Signal<ValidationResult>, parent: {
26
- disabled: Signal<boolean>;
27
- }) => VC;
@@ -1,20 +0,0 @@
1
- import { ButtonStyleOptions, CardStyleOptions, CenterStyleOptions, CheckboxInputStyleOptions, ControlInputWrapperStyleOptions, EditableTextStyleOptions, IconStyleOptions, InputContainerStyleOptions, LabelStyleOptions, NumberInputStyleOptions, OverlayStyleOptions, PanelStyleOptions, SegmentedControlStyleOptions, SinkStyleOptions, TagStyleOptions, ThemeDefinition, ToggleStyleOptions } from '@/components/theme';
2
- export declare class BeatUITheme implements ThemeDefinition {
3
- button({ variant, size, color, roundedness }: ButtonStyleOptions): string;
4
- overlay({ effect, mode }: OverlayStyleOptions): string;
5
- icon({ size, color }: IconStyleOptions): string;
6
- panel({ side, color, shadow }: PanelStyleOptions): string;
7
- label(options: LabelStyleOptions): string;
8
- inputContainer({ disabled, hasError }: InputContainerStyleOptions): string;
9
- controlInputWrapper(_options?: ControlInputWrapperStyleOptions): string;
10
- controlInputWrapperLabelText({ hasError, disabled, }: ControlInputWrapperStyleOptions): string;
11
- tag({ disabled, color }: TagStyleOptions): string;
12
- checkboxInput(_options: CheckboxInputStyleOptions): string;
13
- editableText(_options: EditableTextStyleOptions): string;
14
- numberInput(_options: NumberInputStyleOptions): string;
15
- card({ variant, size, roundedness, }: CardStyleOptions): string;
16
- center({ gap }: CenterStyleOptions): string;
17
- sink({ variant, size, roundedness, }: SinkStyleOptions): string;
18
- segmentedControl({ size }: SegmentedControlStyleOptions): string;
19
- toggle({ disabled, size }: ToggleStyleOptions): string;
20
- }
@@ -1 +0,0 @@
1
- export * from './beatui-theme';