revotech-ui-kit 0.0.5-beta → 0.0.7-beta
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.ts +1 -1
- package/dist/rollup-plugin-html-noop.js +1 -0
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/package.json +5 -4
- package/.editorconfig +0 -29
- package/.eslintrc +0 -10
- package/.github/workflows/deploy-storybook.yml +0 -107
- package/.storybook/main.ts +0 -17
- package/.storybook/preview-head.html +0 -1
- package/.storybook/preview.ts +0 -17
- 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 +0 -92
- package/assets/open-wc-logo.svg +0 -29
- package/assume_role.sh +0 -18
- package/index.html +0 -314
- package/rollup.config.js +0 -83
- package/src/assets/icons/arrows.icon.ts +0 -20
- package/src/assets/icons/index.ts +0 -3
- package/src/assets/icons/search.icon.ts +0 -19
- package/src/assets/icons/tick.icon.ts +0 -20
- package/src/chai-custom.d.ts +0 -0
- package/src/components/atoms/alert/alert-description.ts +0 -15
- package/src/components/atoms/alert/alert-title.ts +0 -17
- package/src/components/atoms/alert/alert.atom.ts +0 -55
- package/src/components/atoms/alert/alert.stories.ts +0 -71
- package/src/components/atoms/alert/alert.styles.ts +0 -21
- package/src/components/atoms/alert/alert.types.ts +0 -1
- package/src/components/atoms/badge/badge.atom.ts +0 -40
- package/src/components/atoms/badge/badge.stories.ts +0 -118
- package/src/components/atoms/badge/badge.style.ts +0 -24
- package/src/components/atoms/badge/badge.type.ts +0 -7
- package/src/components/atoms/button/button.atom.ts +0 -59
- package/src/components/atoms/button/button.stories.ts +0 -224
- package/src/components/atoms/button/button.style.ts +0 -31
- package/src/components/atoms/button/button.type.ts +0 -10
- package/src/components/atoms/card/card-content.ts +0 -15
- package/src/components/atoms/card/card-description.ts +0 -15
- package/src/components/atoms/card/card-footer.ts +0 -15
- package/src/components/atoms/card/card-header.ts +0 -15
- package/src/components/atoms/card/card-title.ts +0 -15
- package/src/components/atoms/card/card.atom.ts +0 -31
- package/src/components/atoms/card/card.stories.ts +0 -149
- package/src/components/atoms/checkbox/checkbox.atom.ts +0 -76
- package/src/components/atoms/checkbox/checkbox.stories.ts +0 -309
- package/src/components/atoms/checkbox/checkbox.style.ts +0 -5
- package/src/components/atoms/checkbox/checkbox.type.ts +0 -24
- package/src/components/atoms/combo-box/combo-box-input.ts +0 -33
- package/src/components/atoms/combo-box/combo-box-item.ts +0 -59
- package/src/components/atoms/combo-box/combo-box-list.ts +0 -57
- package/src/components/atoms/combo-box/combo-box.atom.ts +0 -187
- package/src/components/atoms/combo-box/combo-box.stories.ts +0 -95
- package/src/components/atoms/command-empty/command-empty.atom.ts +0 -44
- package/src/components/atoms/command-group/command-group.atom.ts +0 -60
- package/src/components/atoms/command-item/command-item.atom.ts +0 -74
- package/src/components/atoms/command-list/command-list.atom.ts +0 -37
- package/src/components/atoms/command-separator/command-separator.atom.ts +0 -42
- package/src/components/atoms/dialog/dialog-close.ts +0 -50
- package/src/components/atoms/dialog/dialog-content.ts +0 -71
- package/src/components/atoms/dialog/dialog-footer.ts +0 -22
- package/src/components/atoms/dialog/dialog-header.ts +0 -36
- package/src/components/atoms/dialog/dialog-overly.ts +0 -20
- package/src/components/atoms/dialog/dialog-trigger.ts +0 -54
- package/src/components/atoms/dialog/dialog.atom.ts +0 -78
- package/src/components/atoms/dialog/dialog.stories.ts +0 -93
- package/src/components/atoms/dropdownMenu/dropdown-menu-checkbox-Item.ts +0 -106
- package/src/components/atoms/dropdownMenu/dropdown-menu-content.ts +0 -79
- package/src/components/atoms/dropdownMenu/dropdown-menu-group.ts +0 -60
- package/src/components/atoms/dropdownMenu/dropdown-menu-item.ts +0 -74
- package/src/components/atoms/dropdownMenu/dropdown-menu-radio-item.ts +0 -107
- package/src/components/atoms/dropdownMenu/dropdown-menu-seperator.ts +0 -44
- package/src/components/atoms/dropdownMenu/dropdown-menu-shortcut.ts +0 -17
- package/src/components/atoms/dropdownMenu/dropdown-menu.atom.ts +0 -84
- package/src/components/atoms/dropdownMenu/dropdownMenu.stories.ts +0 -220
- package/src/components/atoms/dropdownMenu/dropdownMenu.style.ts +0 -7
- package/src/components/atoms/index.ts +0 -13
- package/src/components/atoms/input/input.atom.ts +0 -88
- package/src/components/atoms/input/input.stories.ts +0 -451
- package/src/components/atoms/input/input.styles.ts +0 -2
- package/src/components/atoms/input/input.type.ts +0 -58
- package/src/components/atoms/label/label.atom.ts +0 -64
- package/src/components/atoms/label/label.stories.ts +0 -102
- package/src/components/atoms/label/label.style.ts +0 -5
- package/src/components/atoms/popover/popover-content.ts +0 -58
- package/src/components/atoms/popover/popover-trigger.ts +0 -50
- package/src/components/atoms/popover/popover.atom.ts +0 -34
- package/src/components/atoms/popover/popover.stories.ts +0 -79
- package/src/components/atoms/popover/popover.style.ts +0 -25
- package/src/components/atoms/popover/popover.types.ts +0 -3
- package/src/components/atoms/toggle/defs.ts +0 -29
- package/src/components/atoms/toggle/toggle.atom.ts +0 -58
- package/src/components/atoms/toggle/toggle.stories.ts +0 -204
- package/src/components/atoms/toggle/toggle.style.ts +0 -22
- package/src/components/command/command.stories.ts +0 -154
- package/src/components/command/command.ts +0 -391
- package/src/components/index.ts +0 -2
- package/src/components/molecules/command/command.molecules.ts +0 -31
- package/src/components/molecules/command-input/command-input.atom.ts +0 -130
- package/src/components/molecules/dropdownMenu/dropdownMenu.molecules.ts +0 -0
- package/src/components/molecules/index.ts +0 -1
- package/src/globals.css +0 -2215
- package/src/helpers/base-element.ts +0 -79
- package/src/helpers/index.ts +0 -3
- package/src/helpers/mouse-conroller.helper.ts +0 -42
- package/src/helpers/style.helpers.ts +0 -6
- package/src/index.d.ts +0 -1
- package/src/index.ts +0 -1
- package/src/interfaces/actionable.interface.ts +0 -6
- package/src/interfaces/atomic.interface.ts +0 -6
- package/src/interfaces/changeable.interface.ts +0 -14
- package/src/interfaces/child-support-atomic.interface.ts +0 -5
- package/src/interfaces/index.ts +0 -6
- package/src/interfaces/intractable.interface.ts +0 -6
- package/src/interfaces/variant.interface.ts +0 -3
- package/src/lib/index.ts +0 -0
- package/src/lib/next/next.lib.ts +0 -0
- package/src/lib/react/react.lib.ts +0 -18
- package/src/lib/tw-styles.ts +0 -1957
- package/src/styles/index.ts +0 -1
- package/src/styles/tw.styles.ts +0 -2219
- package/src/tailwind-lib.css +0 -115
- package/src/wc-ui-app.ts +0 -81
- package/tailwind.config.js +0 -217
- package/test/wc-ui-app.test.ts +0 -22
- package/tsconfig.json +0 -30
- package/web-dev-server.config.mjs +0 -26
- package/web-test-runner.config.mjs +0 -41
@@ -1,79 +0,0 @@
|
|
1
|
-
import { LitElement } from 'lit';
|
2
|
-
|
3
|
-
export abstract class BaseElement extends LitElement {
|
4
|
-
constructor() {
|
5
|
-
super();
|
6
|
-
}
|
7
|
-
|
8
|
-
protected abstract getAttributesToExclude(): string[];
|
9
|
-
|
10
|
-
// Helper method to filter attributes based on exclusion rules
|
11
|
-
protected getFilteredAttributes(): { [key: string]: string } {
|
12
|
-
const attributes: { [key: string]: string } = {};
|
13
|
-
Array.from(this.attributes).forEach(attr => {
|
14
|
-
if (!this.getAttributesToExclude().includes(attr.name)) {
|
15
|
-
attributes[attr.name] = attr.value ?? '';
|
16
|
-
}
|
17
|
-
});
|
18
|
-
return attributes;
|
19
|
-
}
|
20
|
-
protected isCustomPropertySet(property: string): boolean {
|
21
|
-
const value = getComputedStyle(this).getPropertyValue(property).trim();
|
22
|
-
return value !== 'inherit' && value.length > 0;
|
23
|
-
}
|
24
|
-
|
25
|
-
protected applyCustomClass(
|
26
|
-
variables: string[],
|
27
|
-
selector: string,
|
28
|
-
className = ''
|
29
|
-
): void {
|
30
|
-
let customClass = '';
|
31
|
-
|
32
|
-
if (variables.some(variable => this.isCustomPropertySet(variable))) {
|
33
|
-
customClass = className;
|
34
|
-
}
|
35
|
-
if (customClass)
|
36
|
-
this.shadowRoot?.querySelector(selector)?.classList.add(customClass);
|
37
|
-
}
|
38
|
-
}
|
39
|
-
|
40
|
-
// usage
|
41
|
-
|
42
|
-
// import {
|
43
|
-
// html,
|
44
|
-
// PropertyValues,
|
45
|
-
|
46
|
-
// } from "lit";
|
47
|
-
// import { customElement, property } from "lit/decorators.js";
|
48
|
-
// import { TWStyles} from "../styles/shared-style";
|
49
|
-
// import { BaseElement } from "./base-element";
|
50
|
-
|
51
|
-
// @customElement("biopass-label")
|
52
|
-
// export class Label extends BaseElement {
|
53
|
-
// constructor() {
|
54
|
-
// super();
|
55
|
-
// this.attachShadow({mode: 'open'});
|
56
|
-
// }
|
57
|
-
// @property({ type: String }) customClass: string ="";
|
58
|
-
// static styles = [ TWStyles];
|
59
|
-
|
60
|
-
// protected firstUpdated(_changedProperties: PropertyValues): void {
|
61
|
-
// const variables = [
|
62
|
-
// "--button-bg-color",
|
63
|
-
// "--button-text-color",
|
64
|
-
// "--button-border-radius",
|
65
|
-
// "--button-padding"
|
66
|
-
// ];
|
67
|
-
|
68
|
-
// this.applyCustomClass(variables, "label","label-base");
|
69
|
-
// }
|
70
|
-
// render() {
|
71
|
-
|
72
|
-
// return html`
|
73
|
-
// <label class="text-3xl font-bold underline bg-secondary text-primary label-base">
|
74
|
-
// <slot></slot>
|
75
|
-
// </label>
|
76
|
-
|
77
|
-
// `;
|
78
|
-
// }
|
79
|
-
// }
|
package/src/helpers/index.ts
DELETED
@@ -1,42 +0,0 @@
|
|
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
|
-
}
|
package/src/index.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
declare module 'revotech-ui-kit';
|
package/src/index.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export { Button } from './components/atoms/button/button.atom';
|
@@ -1,14 +0,0 @@
|
|
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/interfaces/index.ts
DELETED
package/src/lib/index.ts
DELETED
File without changes
|
package/src/lib/next/next.lib.ts
DELETED
File without changes
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { createComponent } from '@lit-labs/react';
|
2
|
-
import { Button } from '@/components/atoms/button/button.atom';
|
3
|
-
import { Checkbox } from '@/components/atoms/checkbox/checkbox.atom';
|
4
|
-
import React from 'react';
|
5
|
-
|
6
|
-
const ButtonReact = createComponent({
|
7
|
-
tagName: 'rtg-button',
|
8
|
-
elementClass: Button,
|
9
|
-
react: React,
|
10
|
-
});
|
11
|
-
|
12
|
-
const CheckboxReact = createComponent({
|
13
|
-
tagName: 'rtg-checkbox',
|
14
|
-
elementClass: Checkbox,
|
15
|
-
react: React,
|
16
|
-
});
|
17
|
-
|
18
|
-
export { ButtonReact, CheckboxReact };
|