revotech-ui-kit 0.0.6-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 +3 -3
- 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,130 +0,0 @@
|
|
1
|
-
import { LitElement, html, css, nothing } from 'lit';
|
2
|
-
import { property, customElement } from 'lit/decorators.js';
|
3
|
-
import { cn } from '../../../helpers';
|
4
|
-
import { TWStyles } from '../../../styles';
|
5
|
-
import { CommandItem, CommandSeparator } from '../../../components';
|
6
|
-
|
7
|
-
@customElement('rtg-command-input')
|
8
|
-
export class CommandInput extends LitElement {
|
9
|
-
@property({ type: String }) placeholder = 'Type a command or search...';
|
10
|
-
|
11
|
-
@property({ attribute: 'value', type: String }) _value = '';
|
12
|
-
|
13
|
-
static styles = [css``, TWStyles];
|
14
|
-
|
15
|
-
private get identifier() {
|
16
|
-
const parent =
|
17
|
-
this.parentElement?.shadowRoot?.querySelector('div[rtgcmd-root]');
|
18
|
-
if (parent) {
|
19
|
-
return `${parent.getAttribute('id')}i`;
|
20
|
-
}
|
21
|
-
return `rtgcmdrxi`;
|
22
|
-
}
|
23
|
-
|
24
|
-
private filterItems() {
|
25
|
-
const parent = this.parentElement;
|
26
|
-
if (parent) {
|
27
|
-
let isEmpty = true;
|
28
|
-
const groups = parent.querySelectorAll(
|
29
|
-
'rtg-command-list > rtg-command-group'
|
30
|
-
);
|
31
|
-
if (groups) {
|
32
|
-
groups.forEach(group => {
|
33
|
-
let hidden = true;
|
34
|
-
const items = group.querySelectorAll('rtg-command-item');
|
35
|
-
if (items) {
|
36
|
-
items.forEach(item => {
|
37
|
-
const value = (item as CommandItem)?.value || '';
|
38
|
-
if (value.toLowerCase().includes(this._value.toLowerCase())) {
|
39
|
-
hidden = false;
|
40
|
-
isEmpty = false;
|
41
|
-
item.setAttribute('aria-hidden', 'false');
|
42
|
-
} else {
|
43
|
-
item.setAttribute('aria-hidden', 'true');
|
44
|
-
}
|
45
|
-
});
|
46
|
-
}
|
47
|
-
group.setAttribute('aria-hidden', hidden ? 'true' : 'false');
|
48
|
-
let separator = group.previousElementSibling as CommandSeparator;
|
49
|
-
if (separator) {
|
50
|
-
separator.setAttribute(
|
51
|
-
'aria-hidden',
|
52
|
-
hidden ||
|
53
|
-
separator.previousElementSibling?.getAttribute(
|
54
|
-
'aria-hidden'
|
55
|
-
) === 'true'
|
56
|
-
? 'true'
|
57
|
-
: 'false'
|
58
|
-
);
|
59
|
-
}
|
60
|
-
separator = group.nextElementSibling as CommandSeparator;
|
61
|
-
if (separator) {
|
62
|
-
separator.setAttribute(
|
63
|
-
'aria-hidden',
|
64
|
-
hidden ||
|
65
|
-
separator.nextElementSibling?.getAttribute('aria-hidden') ===
|
66
|
-
'true'
|
67
|
-
? 'true'
|
68
|
-
: 'false'
|
69
|
-
);
|
70
|
-
}
|
71
|
-
});
|
72
|
-
}
|
73
|
-
|
74
|
-
const empty = parent.querySelector('rtg-command-empty');
|
75
|
-
if (empty) {
|
76
|
-
empty.setAttribute('aria-hidden', isEmpty ? 'false' : 'true');
|
77
|
-
}
|
78
|
-
}
|
79
|
-
}
|
80
|
-
|
81
|
-
private handleChange(e: Event) {
|
82
|
-
const input = e.target as HTMLInputElement;
|
83
|
-
if (input) {
|
84
|
-
this._value = input.value;
|
85
|
-
this.filterItems();
|
86
|
-
}
|
87
|
-
}
|
88
|
-
|
89
|
-
render() {
|
90
|
-
return html`
|
91
|
-
<div
|
92
|
-
class="${cn('flex items-center border-b px-3', this.className)}"
|
93
|
-
name="rtgcmd-input-container"
|
94
|
-
>
|
95
|
-
<svg
|
96
|
-
xmlns="http://www.w3.org/2000/svg"
|
97
|
-
width="24"
|
98
|
-
height="24"
|
99
|
-
viewBox="0 0 24 24"
|
100
|
-
fill="none"
|
101
|
-
stroke="currentColor"
|
102
|
-
stroke-width="2"
|
103
|
-
stroke-linecap="round"
|
104
|
-
stroke-linejoin="round"
|
105
|
-
class="mr-2 h-4 w-4 shrink-0 opacity-50"
|
106
|
-
>
|
107
|
-
<circle cx="11" cy="11" r="8"></circle>
|
108
|
-
<path d="m21 21-4.3-4.3"></path>
|
109
|
-
</svg>
|
110
|
-
<input
|
111
|
-
class="flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"
|
112
|
-
placeholder="${this.placeholder}"
|
113
|
-
rtgcmd-input
|
114
|
-
@input="${this.handleChange}"
|
115
|
-
autocomplete="off"
|
116
|
-
autocorrect="off"
|
117
|
-
spellcheck="false"
|
118
|
-
aria-autocomplete="list"
|
119
|
-
role="combobox"
|
120
|
-
aria-expanded="true"
|
121
|
-
aria-controls=":r1oe:"
|
122
|
-
aria-labelledby=":r1of:"
|
123
|
-
id="${this.identifier}"
|
124
|
-
type="text"
|
125
|
-
data-value="${this._value}"
|
126
|
-
/>
|
127
|
-
</div>
|
128
|
-
`;
|
129
|
-
}
|
130
|
-
}
|
File without changes
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './command/command.molecules';
|