revotech-ui-kit 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. package/.editorconfig +29 -0
  2. package/.eslintrc +10 -0
  3. package/.storybook/main.ts +17 -0
  4. package/.storybook/preview-head.html +1 -0
  5. package/.storybook/preview.ts +17 -0
  6. package/LICENSE +21 -0
  7. package/README.md +30 -0
  8. package/assets/fonts/Geist/Geist-Black.otf +0 -0
  9. package/assets/fonts/Geist/Geist-Black.woff2 +0 -0
  10. package/assets/fonts/Geist/Geist-Bold.otf +0 -0
  11. package/assets/fonts/Geist/Geist-Bold.woff2 +0 -0
  12. package/assets/fonts/Geist/Geist-Light.otf +0 -0
  13. package/assets/fonts/Geist/Geist-Light.woff2 +0 -0
  14. package/assets/fonts/Geist/Geist-Medium.otf +0 -0
  15. package/assets/fonts/Geist/Geist-Medium.woff2 +0 -0
  16. package/assets/fonts/Geist/Geist-Regular.otf +0 -0
  17. package/assets/fonts/Geist/Geist-Regular.woff2 +0 -0
  18. package/assets/fonts/Geist/Geist-SemiBold.otf +0 -0
  19. package/assets/fonts/Geist/Geist-SemiBold.woff2 +0 -0
  20. package/assets/fonts/Geist/Geist-Thin.otf +0 -0
  21. package/assets/fonts/Geist/Geist-Thin.woff2 +0 -0
  22. package/assets/fonts/Geist/Geist-UltraBlack.otf +0 -0
  23. package/assets/fonts/Geist/Geist-UltraBlack.woff2 +0 -0
  24. package/assets/fonts/Geist/Geist-UltraLight.otf +0 -0
  25. package/assets/fonts/Geist/Geist-UltraLight.woff2 +0 -0
  26. package/assets/fonts/Geist/GeistVariableVF.ttf +0 -0
  27. package/assets/fonts/Geist/GeistVariableVF.woff2 +0 -0
  28. package/assets/fonts/Geist/LICENSE.TXT +92 -0
  29. package/assets/open-wc-logo.svg +29 -0
  30. package/index.html +362 -0
  31. package/package.json +117 -0
  32. package/rollup.config.js +71 -0
  33. package/src/components/atoms/button/button.atom.ts +39 -0
  34. package/src/components/atoms/button/button.stories.ts +186 -0
  35. package/src/components/atoms/button/button.style.ts +31 -0
  36. package/src/components/atoms/button/button.type.ts +10 -0
  37. package/src/components/atoms/checkbox/checkbox.atom.ts +62 -0
  38. package/src/components/atoms/checkbox/checkbox.stories.ts +42 -0
  39. package/src/components/atoms/command-empty/command-empty.atom.ts +44 -0
  40. package/src/components/atoms/command-group/command-group.atom.ts +60 -0
  41. package/src/components/atoms/command-item/command-item.atom.ts +74 -0
  42. package/src/components/atoms/command-list/command-list.atom.ts +37 -0
  43. package/src/components/atoms/command-separator/command-separator.atom.ts +42 -0
  44. package/src/components/atoms/dialog/dialog.atom.ts +301 -0
  45. package/src/components/atoms/dialog/dialog.stories.ts +86 -0
  46. package/src/components/atoms/index.ts +10 -0
  47. package/src/components/atoms/input/input.atom.ts +34 -0
  48. package/src/components/atoms/input/input.stories.ts +89 -0
  49. package/src/components/atoms/input/input.type.ts +24 -0
  50. package/src/components/atoms/label/label.atom.ts +40 -0
  51. package/src/components/atoms/label/label.stories.ts +18 -0
  52. package/src/components/atoms/label/label.style.ts +5 -0
  53. package/src/components/command/command.stories.ts +154 -0
  54. package/src/components/command/command.ts +391 -0
  55. package/src/components/index.ts +2 -0
  56. package/src/components/molecules/command/command.molecules.ts +31 -0
  57. package/src/components/molecules/command-input/command-input.atom.ts +130 -0
  58. package/src/components/molecules/index.ts +1 -0
  59. package/src/components/popover.ts +247 -0
  60. package/src/globals.css +1806 -0
  61. package/src/helpers/index.ts +2 -0
  62. package/src/helpers/mouse-conroller.helper.ts +42 -0
  63. package/src/helpers/style.helpers.ts +6 -0
  64. package/src/interfaces/actionable.interface.ts +6 -0
  65. package/src/interfaces/atomic.interface.ts +6 -0
  66. package/src/interfaces/changeable.interface.ts +14 -0
  67. package/src/interfaces/child-support-atomic.interface.ts +5 -0
  68. package/src/interfaces/index.ts +6 -0
  69. package/src/interfaces/intractable.interface.ts +6 -0
  70. package/src/interfaces/variant.interface.ts +3 -0
  71. package/src/lib/index.ts +0 -0
  72. package/src/lib/next/next.lib.ts +0 -0
  73. package/src/lib/react/react.lib.ts +0 -0
  74. package/src/styles/index.ts +1 -0
  75. package/src/styles/tw.styles.ts +1867 -0
  76. package/src/tailwind-lib.css +95 -0
  77. package/src/wc-ui-app.ts +81 -0
  78. package/tailwind.config.js +81 -0
  79. package/test/wc-ui-app.test.ts +22 -0
  80. package/tsconfig.json +25 -0
  81. package/web-dev-server.config.mjs +26 -0
  82. package/web-test-runner.config.mjs +41 -0
@@ -0,0 +1,2 @@
1
+ export * from './mouse-conroller.helper';
2
+ export * from './style.helpers';
@@ -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,6 @@
1
+ import { clsx, type ClassValue } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+
4
+ export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs));
6
+ }
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+
3
+ export type ActionableProps = Partial<{
4
+ onClick: (event?: React.MouseEvent<HTMLElement, MouseEvent>) => void;
5
+ onSubmit: (event?: React.FormEvent<HTMLFormElement>) => void;
6
+ }>;
@@ -0,0 +1,6 @@
1
+ export type AtomicProps = Partial<{
2
+ id: string;
3
+ className: string;
4
+ name: string;
5
+ title: string;
6
+ }>;
@@ -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
+ >;
@@ -0,0 +1,5 @@
1
+ import { AtomicProps } from './atomic.interface';
2
+
3
+ export type AtomicComponentWithChildren = {
4
+ children: React.ReactNode;
5
+ } & AtomicProps;
@@ -0,0 +1,6 @@
1
+ export * from './actionable.interface';
2
+ export * from './atomic.interface';
3
+ export * from './child-support-atomic.interface';
4
+ export * from './changeable.interface';
5
+ export * from './intractable.interface';
6
+ export * from './variant.interface';
@@ -0,0 +1,6 @@
1
+ export type IntractableProps<T = string> = Partial<{
2
+ isDisabled: boolean;
3
+ isChecked: boolean;
4
+ isReadOnly: boolean;
5
+ type: T;
6
+ }>;
@@ -0,0 +1,3 @@
1
+ export type VariantProps<T> = Partial<{
2
+ variant: T;
3
+ }>;
File without changes
File without changes
File without changes
@@ -0,0 +1 @@
1
+ export * from './tw.styles';