revotech-ui-kit 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.editorconfig +29 -0
- package/.eslintrc +10 -0
- package/.storybook/main.ts +17 -0
- package/.storybook/preview-head.html +1 -0
- package/.storybook/preview.ts +17 -0
- package/LICENSE +21 -0
- package/README.md +30 -0
- package/assets/fonts/Geist/Geist-Black.otf +0 -0
- package/assets/fonts/Geist/Geist-Black.woff2 +0 -0
- package/assets/fonts/Geist/Geist-Bold.otf +0 -0
- package/assets/fonts/Geist/Geist-Bold.woff2 +0 -0
- package/assets/fonts/Geist/Geist-Light.otf +0 -0
- package/assets/fonts/Geist/Geist-Light.woff2 +0 -0
- package/assets/fonts/Geist/Geist-Medium.otf +0 -0
- package/assets/fonts/Geist/Geist-Medium.woff2 +0 -0
- package/assets/fonts/Geist/Geist-Regular.otf +0 -0
- package/assets/fonts/Geist/Geist-Regular.woff2 +0 -0
- package/assets/fonts/Geist/Geist-SemiBold.otf +0 -0
- package/assets/fonts/Geist/Geist-SemiBold.woff2 +0 -0
- package/assets/fonts/Geist/Geist-Thin.otf +0 -0
- package/assets/fonts/Geist/Geist-Thin.woff2 +0 -0
- package/assets/fonts/Geist/Geist-UltraBlack.otf +0 -0
- package/assets/fonts/Geist/Geist-UltraBlack.woff2 +0 -0
- package/assets/fonts/Geist/Geist-UltraLight.otf +0 -0
- package/assets/fonts/Geist/Geist-UltraLight.woff2 +0 -0
- package/assets/fonts/Geist/GeistVariableVF.ttf +0 -0
- package/assets/fonts/Geist/GeistVariableVF.woff2 +0 -0
- package/assets/fonts/Geist/LICENSE.TXT +92 -0
- package/assets/open-wc-logo.svg +29 -0
- package/index.html +362 -0
- package/package.json +117 -0
- package/rollup.config.js +71 -0
- package/src/components/atoms/button/button.atom.ts +39 -0
- package/src/components/atoms/button/button.stories.ts +186 -0
- package/src/components/atoms/button/button.style.ts +31 -0
- package/src/components/atoms/button/button.type.ts +10 -0
- package/src/components/atoms/checkbox/checkbox.atom.ts +62 -0
- package/src/components/atoms/checkbox/checkbox.stories.ts +42 -0
- package/src/components/atoms/command-empty/command-empty.atom.ts +44 -0
- package/src/components/atoms/command-group/command-group.atom.ts +60 -0
- package/src/components/atoms/command-item/command-item.atom.ts +74 -0
- package/src/components/atoms/command-list/command-list.atom.ts +37 -0
- package/src/components/atoms/command-separator/command-separator.atom.ts +42 -0
- package/src/components/atoms/dialog/dialog.atom.ts +301 -0
- package/src/components/atoms/dialog/dialog.stories.ts +86 -0
- package/src/components/atoms/index.ts +10 -0
- package/src/components/atoms/input/input.atom.ts +34 -0
- package/src/components/atoms/input/input.stories.ts +89 -0
- package/src/components/atoms/input/input.type.ts +24 -0
- package/src/components/atoms/label/label.atom.ts +40 -0
- package/src/components/atoms/label/label.stories.ts +18 -0
- package/src/components/atoms/label/label.style.ts +5 -0
- package/src/components/command/command.stories.ts +154 -0
- package/src/components/command/command.ts +391 -0
- package/src/components/index.ts +2 -0
- package/src/components/molecules/command/command.molecules.ts +31 -0
- package/src/components/molecules/command-input/command-input.atom.ts +130 -0
- package/src/components/molecules/index.ts +1 -0
- package/src/components/popover.ts +247 -0
- package/src/globals.css +1806 -0
- package/src/helpers/index.ts +2 -0
- package/src/helpers/mouse-conroller.helper.ts +42 -0
- package/src/helpers/style.helpers.ts +6 -0
- package/src/interfaces/actionable.interface.ts +6 -0
- package/src/interfaces/atomic.interface.ts +6 -0
- package/src/interfaces/changeable.interface.ts +14 -0
- package/src/interfaces/child-support-atomic.interface.ts +5 -0
- package/src/interfaces/index.ts +6 -0
- package/src/interfaces/intractable.interface.ts +6 -0
- package/src/interfaces/variant.interface.ts +3 -0
- package/src/lib/index.ts +0 -0
- package/src/lib/next/next.lib.ts +0 -0
- package/src/lib/react/react.lib.ts +0 -0
- package/src/styles/index.ts +1 -0
- package/src/styles/tw.styles.ts +1867 -0
- package/src/tailwind-lib.css +95 -0
- package/src/wc-ui-app.ts +81 -0
- package/tailwind.config.js +81 -0
- package/test/wc-ui-app.test.ts +22 -0
- package/tsconfig.json +25 -0
- package/web-dev-server.config.mjs +26 -0
- package/web-test-runner.config.mjs +41 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
import { ReactiveControllerHost } from 'lit';
|
2
|
+
|
3
|
+
export class MouseController {
|
4
|
+
private host: ReactiveControllerHost;
|
5
|
+
|
6
|
+
pos = { x: 0, y: 0 };
|
7
|
+
|
8
|
+
_onMouseMove = ({ clientX, clientY }: MouseEvent) => {
|
9
|
+
this.pos = { x: clientX, y: clientY };
|
10
|
+
this.host.requestUpdate();
|
11
|
+
};
|
12
|
+
|
13
|
+
_onClick = (e: MouseEvent) => {
|
14
|
+
console.log(`click: ${e.target}`);
|
15
|
+
console.log(`pos: ${this.pos.x}`);
|
16
|
+
this.host.requestUpdate();
|
17
|
+
};
|
18
|
+
|
19
|
+
_onScroll = (e: Event) => {
|
20
|
+
console.log(`scroll: ${e.target}`);
|
21
|
+
console.log(`pos: ${this.pos.y}`);
|
22
|
+
console.log(`pos: ${window.scrollY} ${window.innerHeight}`);
|
23
|
+
this.host.requestUpdate();
|
24
|
+
};
|
25
|
+
|
26
|
+
constructor(host: ReactiveControllerHost) {
|
27
|
+
this.host = host;
|
28
|
+
host.addController(this);
|
29
|
+
}
|
30
|
+
|
31
|
+
hostConnected() {
|
32
|
+
window.addEventListener('mousemove', this._onMouseMove);
|
33
|
+
window.addEventListener('click', this._onClick);
|
34
|
+
window.addEventListener('scroll', this._onScroll);
|
35
|
+
}
|
36
|
+
|
37
|
+
hostDisconnected() {
|
38
|
+
window.removeEventListener('mousemove', this._onMouseMove);
|
39
|
+
window.removeEventListener('click', this._onClick);
|
40
|
+
window.removeEventListener('scroll', this._onScroll);
|
41
|
+
}
|
42
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
|
3
|
+
import { IntractableProps } from './intractable.interface';
|
4
|
+
|
5
|
+
export type ChangeableProps<
|
6
|
+
T = React.ChangeEvent<HTMLInputElement> | string | number,
|
7
|
+
K = unknown
|
8
|
+
> = Partial<
|
9
|
+
IntractableProps & {
|
10
|
+
onChange: (event?: T, value?: K) => void;
|
11
|
+
onBlur: (event?: T) => void;
|
12
|
+
onPaste: (event?: T) => void;
|
13
|
+
}
|
14
|
+
>;
|
package/src/lib/index.ts
ADDED
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './tw.styles';
|