@fulate/components 1.0.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/README.md +37 -0
- package/dist/components/button/button.d.ts +81 -0
- package/dist/components/button/style.d.ts +18 -0
- package/dist/components/button/types.d.ts +1 -0
- package/dist/components/checkbox/checkbox.d.ts +106 -0
- package/dist/components/dialog/dialog.d.ts +64 -0
- package/dist/components/field/border.d.ts +9 -0
- package/dist/components/field/field.d.ts +149 -0
- package/dist/components/field/style.d.ts +18 -0
- package/dist/components/input/input.d.ts +80 -0
- package/dist/components/message/message.d.ts +44 -0
- package/dist/components/message/types.d.ts +19 -0
- package/dist/components/popover/popover.d.ts +114 -0
- package/dist/components/popover/types.d.ts +1 -0
- package/dist/components/radio/radio.d.ts +105 -0
- package/dist/components/select/select.d.ts +91 -0
- package/dist/components/select/types.d.ts +4 -0
- package/dist/components/switch/switch.d.ts +52 -0
- package/dist/components/tooltip/tooltip.d.ts +58 -0
- package/dist/composables/context.d.ts +9 -0
- package/dist/composables/index.d.ts +3 -0
- package/dist/composables/outside-click.d.ts +6 -0
- package/dist/composables/overlay-position.d.ts +10 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +2263 -0
- package/dist/internal/control-size.d.ts +14 -0
- package/dist/internal/interaction.d.ts +14 -0
- package/dist/internal/ripple.d.ts +5 -0
- package/dist/internal/state-layer.d.ts +9 -0
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/md3.d.ts +25 -0
- package/dist/types/control.d.ts +1 -0
- package/dist/types/floating.d.ts +4 -0
- package/package.json +31 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PropType } from "@vue/runtime-core";
|
|
2
|
+
import type { ControlSize } from "../types/control";
|
|
3
|
+
export type SizeScale<T> = Readonly<Record<ControlSize, Readonly<T>>>;
|
|
4
|
+
export declare const controlSizeProp: {
|
|
5
|
+
type: PropType<ControlSize>;
|
|
6
|
+
default: ControlSize;
|
|
7
|
+
};
|
|
8
|
+
export declare const inheritedControlSizeProp: {
|
|
9
|
+
type: PropType<ControlSize>;
|
|
10
|
+
default: any;
|
|
11
|
+
};
|
|
12
|
+
export declare const CONTROL_STATE_LAYER_SIZE: SizeScale<number>;
|
|
13
|
+
export declare const CONTROL_GROUP_GAP: SizeScale<number>;
|
|
14
|
+
export declare const CONTROL_LABEL_FONT_SIZE: SizeScale<number>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type InteractionState = "rest" | "hover" | "press";
|
|
2
|
+
export interface InteractionHandlers {
|
|
3
|
+
onMouseenter(): void;
|
|
4
|
+
onMouseleave(): void;
|
|
5
|
+
onPointerdown(): void;
|
|
6
|
+
onPointerup(): void;
|
|
7
|
+
onPointercancel(): void;
|
|
8
|
+
}
|
|
9
|
+
interface InteractionController {
|
|
10
|
+
handlers: InteractionHandlers;
|
|
11
|
+
refresh(duration?: number): void;
|
|
12
|
+
}
|
|
13
|
+
export declare function useInteractionState(disabled: () => boolean, apply: (state: InteractionState, duration: number) => void): InteractionController;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ShallowRef } from "@vue/runtime-core";
|
|
2
|
+
import type { Shape } from "@fulate/core";
|
|
3
|
+
import { type InteractionHandlers } from "./interaction";
|
|
4
|
+
interface StateLayerController {
|
|
5
|
+
layerRef: ShallowRef<Shape | null>;
|
|
6
|
+
handlers: InteractionHandlers;
|
|
7
|
+
}
|
|
8
|
+
export declare function useStateLayer(disabled: () => boolean, color?: () => string): StateLayerController;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MD3 } from "./md3";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const MD3: {
|
|
2
|
+
primary: string;
|
|
3
|
+
onPrimary: string;
|
|
4
|
+
primaryContainer: string;
|
|
5
|
+
surface: string;
|
|
6
|
+
surfaceDim: string;
|
|
7
|
+
surfaceContainer: string;
|
|
8
|
+
onSurface: string;
|
|
9
|
+
onSurfaceVariant: string;
|
|
10
|
+
outline: string;
|
|
11
|
+
outlineVariant: string;
|
|
12
|
+
error: string;
|
|
13
|
+
onError: string;
|
|
14
|
+
stateHoverOpacity: number;
|
|
15
|
+
statePressOpacity: number;
|
|
16
|
+
stateFocusOpacity: number;
|
|
17
|
+
rippleOpacity: number;
|
|
18
|
+
radiusFull: number;
|
|
19
|
+
radiusLg: number;
|
|
20
|
+
radiusMd: number;
|
|
21
|
+
radiusSm: number;
|
|
22
|
+
fontSize: number;
|
|
23
|
+
fontFamily: string;
|
|
24
|
+
iconFamily: string;
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ControlSize = "small" | "medium" | "large";
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fulate/components",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"scripts": {
|
|
18
|
+
"test": "vitest run",
|
|
19
|
+
"test:watch": "vitest",
|
|
20
|
+
"typecheck": "tsc --noEmit -p tsconfig.tests.json"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@fulate/core": "*",
|
|
24
|
+
"@fulate/ui": "*",
|
|
25
|
+
"@fulate/share": "*",
|
|
26
|
+
"@fulate/vue": "*",
|
|
27
|
+
"@fulate/yoga": "*",
|
|
28
|
+
"@vue/runtime-core": "^3.5.0",
|
|
29
|
+
"lodash-es": "^4.17.22"
|
|
30
|
+
}
|
|
31
|
+
}
|