revotech-ui-kit 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (255) hide show
  1. package/dist/src/components/atoms/alert/alert.atom.d.ts +7 -0
  2. package/dist/src/components/atoms/card/card.atom.d.ts +10 -0
  3. package/dist/src/components/atoms/checkbox/checkbox.atom.d.ts +5 -0
  4. package/dist/src/components/atoms/combo-box/combo-box.atom.d.ts +5 -0
  5. package/dist/src/components/atoms/combo-box/combo-box.stories.d.ts +5 -6
  6. package/dist/src/components/atoms/command/command.stories.d.ts +11 -0
  7. package/dist/src/components/atoms/dialog/dialog-close.d.ts +5 -0
  8. package/dist/src/components/atoms/dialog/dialog.atom.d.ts +17 -1
  9. package/dist/src/components/atoms/dropdownMenu/dropdown-menu.atom.d.ts +19 -3
  10. package/dist/src/components/atoms/dropdownMenu/dropdownMenu.stories.d.ts +1 -0
  11. package/dist/src/components/atoms/index.d.ts +11 -5
  12. package/dist/src/components/atoms/label/label.atom.d.ts +5 -0
  13. package/dist/src/components/atoms/popover/popover.atom.d.ts +11 -1
  14. package/dist/src/components/atoms/textarea/textarea.atom.d.ts +16 -0
  15. package/dist/src/components/atoms/textarea/textarea.stories.d.ts +7 -0
  16. package/dist/src/components/atoms/textarea/textarea.styles.d.ts +1 -0
  17. package/dist/src/components/atoms/textarea/textarea.type.d.ts +11 -0
  18. package/dist/src/components/atoms/toggle/toggle.stories.d.ts +5 -6
  19. package/dist/src/components/molecules/breadCrumb/Breadcrumb-link.d.ts +7 -0
  20. package/dist/src/components/molecules/breadCrumb/breadCrumb.stories.d.ts +16 -0
  21. package/dist/src/components/molecules/breadCrumb/breadcrumb-ellipsis.d.ts +6 -0
  22. package/dist/src/components/molecules/breadCrumb/breadcrumb-item.d.ts +6 -0
  23. package/dist/src/components/molecules/breadCrumb/breadcrumb-list.d.ts +6 -0
  24. package/dist/src/components/molecules/breadCrumb/breadcrumb-separator.d.ts +6 -0
  25. package/dist/src/components/molecules/breadCrumb/breadcrumb-text.d.ts +6 -0
  26. package/dist/src/components/molecules/breadCrumb/breadcrumb.molecules.d.ts +6 -0
  27. package/dist/src/components/molecules/breadCrumb/breadcrumb.styles.d.ts +6 -0
  28. package/dist/src/components/molecules/index.d.ts +7 -1
  29. package/dist/src/components/molecules/toggle-group/defs.d.ts +37 -0
  30. package/dist/src/components/molecules/toggle-group/toggle-group-item.d.ts +17 -0
  31. package/dist/src/components/molecules/toggle-group/toggle-group.molecules.d.ts +19 -0
  32. package/dist/src/components/molecules/toggle-group/toggle-group.stories.d.ts +5 -0
  33. package/dist/src/components/molecules/toggle-group/toggle-group.style.d.ts +4 -0
  34. package/dist/src/index.d.ts +2 -4
  35. package/dist/tsconfig.tsbuildinfo +1 -1
  36. package/package.json +1 -1
  37. package/dist/revotech-ui-kit.cjs +0 -2293
  38. package/dist/revotech-ui-kit.js +0 -5608
  39. package/dist/src/assets/icons/arrows.icon.js +0 -20
  40. package/dist/src/assets/icons/arrows.icon.js.map +0 -1
  41. package/dist/src/assets/icons/index.js +0 -4
  42. package/dist/src/assets/icons/index.js.map +0 -1
  43. package/dist/src/assets/icons/search.icon.js +0 -19
  44. package/dist/src/assets/icons/search.icon.js.map +0 -1
  45. package/dist/src/assets/icons/tick.icon.js +0 -20
  46. package/dist/src/assets/icons/tick.icon.js.map +0 -1
  47. package/dist/src/components/atoms/alert/alert-description.js +0 -18
  48. package/dist/src/components/atoms/alert/alert-description.js.map +0 -1
  49. package/dist/src/components/atoms/alert/alert-title.js +0 -20
  50. package/dist/src/components/atoms/alert/alert-title.js.map +0 -1
  51. package/dist/src/components/atoms/alert/alert.atom.js +0 -55
  52. package/dist/src/components/atoms/alert/alert.atom.js.map +0 -1
  53. package/dist/src/components/atoms/alert/alert.stories.js +0 -62
  54. package/dist/src/components/atoms/alert/alert.stories.js.map +0 -1
  55. package/dist/src/components/atoms/alert/alert.styles.js +0 -21
  56. package/dist/src/components/atoms/alert/alert.styles.js.map +0 -1
  57. package/dist/src/components/atoms/alert/alert.types.js +0 -2
  58. package/dist/src/components/atoms/alert/alert.types.js.map +0 -1
  59. package/dist/src/components/atoms/badge/badge.atom.js +0 -43
  60. package/dist/src/components/atoms/badge/badge.atom.js.map +0 -1
  61. package/dist/src/components/atoms/badge/badge.stories.js +0 -110
  62. package/dist/src/components/atoms/badge/badge.stories.js.map +0 -1
  63. package/dist/src/components/atoms/badge/badge.style.js +0 -17
  64. package/dist/src/components/atoms/badge/badge.style.js.map +0 -1
  65. package/dist/src/components/atoms/badge/badge.type.js +0 -2
  66. package/dist/src/components/atoms/badge/badge.type.js.map +0 -1
  67. package/dist/src/components/atoms/button/button.atom.js +0 -67
  68. package/dist/src/components/atoms/button/button.atom.js.map +0 -1
  69. package/dist/src/components/atoms/button/button.stories.js +0 -204
  70. package/dist/src/components/atoms/button/button.stories.js.map +0 -1
  71. package/dist/src/components/atoms/button/button.style.js +0 -24
  72. package/dist/src/components/atoms/button/button.style.js.map +0 -1
  73. package/dist/src/components/atoms/button/button.type.js +0 -2
  74. package/dist/src/components/atoms/button/button.type.js.map +0 -1
  75. package/dist/src/components/atoms/card/card-content.js +0 -17
  76. package/dist/src/components/atoms/card/card-content.js.map +0 -1
  77. package/dist/src/components/atoms/card/card-description.js +0 -17
  78. package/dist/src/components/atoms/card/card-description.js.map +0 -1
  79. package/dist/src/components/atoms/card/card-footer.js +0 -17
  80. package/dist/src/components/atoms/card/card-footer.js.map +0 -1
  81. package/dist/src/components/atoms/card/card-header.js +0 -17
  82. package/dist/src/components/atoms/card/card-header.js.map +0 -1
  83. package/dist/src/components/atoms/card/card-title.js +0 -17
  84. package/dist/src/components/atoms/card/card-title.js.map +0 -1
  85. package/dist/src/components/atoms/card/card.atom.js +0 -25
  86. package/dist/src/components/atoms/card/card.atom.js.map +0 -1
  87. package/dist/src/components/atoms/card/card.stories.js +0 -136
  88. package/dist/src/components/atoms/card/card.stories.js.map +0 -1
  89. package/dist/src/components/atoms/checkbox/checkbox.atom.js +0 -87
  90. package/dist/src/components/atoms/checkbox/checkbox.atom.js.map +0 -1
  91. package/dist/src/components/atoms/checkbox/checkbox.stories.js +0 -244
  92. package/dist/src/components/atoms/checkbox/checkbox.stories.js.map +0 -1
  93. package/dist/src/components/atoms/checkbox/checkbox.style.js +0 -3
  94. package/dist/src/components/atoms/checkbox/checkbox.style.js.map +0 -1
  95. package/dist/src/components/atoms/checkbox/checkbox.type.js +0 -2
  96. package/dist/src/components/atoms/checkbox/checkbox.type.js.map +0 -1
  97. package/dist/src/components/atoms/combo-box/combo-box-input.js +0 -47
  98. package/dist/src/components/atoms/combo-box/combo-box-input.js.map +0 -1
  99. package/dist/src/components/atoms/combo-box/combo-box-item.js +0 -85
  100. package/dist/src/components/atoms/combo-box/combo-box-item.js.map +0 -1
  101. package/dist/src/components/atoms/combo-box/combo-box-list.js +0 -67
  102. package/dist/src/components/atoms/combo-box/combo-box-list.js.map +0 -1
  103. package/dist/src/components/atoms/combo-box/combo-box.atom.js +0 -199
  104. package/dist/src/components/atoms/combo-box/combo-box.atom.js.map +0 -1
  105. package/dist/src/components/atoms/combo-box/combo-box.stories.js +0 -86
  106. package/dist/src/components/atoms/combo-box/combo-box.stories.js.map +0 -1
  107. package/dist/src/components/atoms/command-empty/command-empty.atom.js +0 -53
  108. package/dist/src/components/atoms/command-empty/command-empty.atom.js.map +0 -1
  109. package/dist/src/components/atoms/command-group/command-group.atom.js +0 -70
  110. package/dist/src/components/atoms/command-group/command-group.atom.js.map +0 -1
  111. package/dist/src/components/atoms/command-item/command-item.atom.js +0 -78
  112. package/dist/src/components/atoms/command-item/command-item.atom.js.map +0 -1
  113. package/dist/src/components/atoms/command-list/command-list.atom.js +0 -35
  114. package/dist/src/components/atoms/command-list/command-list.atom.js.map +0 -1
  115. package/dist/src/components/atoms/command-separator/command-separator.atom.js +0 -51
  116. package/dist/src/components/atoms/command-separator/command-separator.atom.js.map +0 -1
  117. package/dist/src/components/atoms/dialog/dialog-close.js +0 -46
  118. package/dist/src/components/atoms/dialog/dialog-close.js.map +0 -1
  119. package/dist/src/components/atoms/dialog/dialog-content.js +0 -72
  120. package/dist/src/components/atoms/dialog/dialog-content.js.map +0 -1
  121. package/dist/src/components/atoms/dialog/dialog-footer.js +0 -22
  122. package/dist/src/components/atoms/dialog/dialog-footer.js.map +0 -1
  123. package/dist/src/components/atoms/dialog/dialog-header.js +0 -40
  124. package/dist/src/components/atoms/dialog/dialog-header.js.map +0 -1
  125. package/dist/src/components/atoms/dialog/dialog-overly.js +0 -20
  126. package/dist/src/components/atoms/dialog/dialog-overly.js.map +0 -1
  127. package/dist/src/components/atoms/dialog/dialog-trigger.js +0 -53
  128. package/dist/src/components/atoms/dialog/dialog-trigger.js.map +0 -1
  129. package/dist/src/components/atoms/dialog/dialog.atom.js +0 -78
  130. package/dist/src/components/atoms/dialog/dialog.atom.js.map +0 -1
  131. package/dist/src/components/atoms/dialog/dialog.stories.js +0 -88
  132. package/dist/src/components/atoms/dialog/dialog.stories.js.map +0 -1
  133. package/dist/src/components/atoms/dropdownMenu/dropdown-menu-checkbox-Item.js +0 -115
  134. package/dist/src/components/atoms/dropdownMenu/dropdown-menu-checkbox-Item.js.map +0 -1
  135. package/dist/src/components/atoms/dropdownMenu/dropdown-menu-content.js +0 -80
  136. package/dist/src/components/atoms/dropdownMenu/dropdown-menu-content.js.map +0 -1
  137. package/dist/src/components/atoms/dropdownMenu/dropdown-menu-group.js +0 -70
  138. package/dist/src/components/atoms/dropdownMenu/dropdown-menu-group.js.map +0 -1
  139. package/dist/src/components/atoms/dropdownMenu/dropdown-menu-item.js +0 -78
  140. package/dist/src/components/atoms/dropdownMenu/dropdown-menu-item.js.map +0 -1
  141. package/dist/src/components/atoms/dropdownMenu/dropdown-menu-radio-item.js +0 -116
  142. package/dist/src/components/atoms/dropdownMenu/dropdown-menu-radio-item.js.map +0 -1
  143. package/dist/src/components/atoms/dropdownMenu/dropdown-menu-seperator.js +0 -51
  144. package/dist/src/components/atoms/dropdownMenu/dropdown-menu-seperator.js.map +0 -1
  145. package/dist/src/components/atoms/dropdownMenu/dropdown-menu-shortcut.js +0 -20
  146. package/dist/src/components/atoms/dropdownMenu/dropdown-menu-shortcut.js.map +0 -1
  147. package/dist/src/components/atoms/dropdownMenu/dropdown-menu.atom.js +0 -77
  148. package/dist/src/components/atoms/dropdownMenu/dropdown-menu.atom.js.map +0 -1
  149. package/dist/src/components/atoms/dropdownMenu/dropdownMenu.stories.js +0 -211
  150. package/dist/src/components/atoms/dropdownMenu/dropdownMenu.stories.js.map +0 -1
  151. package/dist/src/components/atoms/dropdownMenu/dropdownMenu.style.js +0 -4
  152. package/dist/src/components/atoms/dropdownMenu/dropdownMenu.style.js.map +0 -1
  153. package/dist/src/components/atoms/index.js +0 -14
  154. package/dist/src/components/atoms/index.js.map +0 -1
  155. package/dist/src/components/atoms/input/input.atom.js +0 -93
  156. package/dist/src/components/atoms/input/input.atom.js.map +0 -1
  157. package/dist/src/components/atoms/input/input.stories.js +0 -382
  158. package/dist/src/components/atoms/input/input.stories.js.map +0 -1
  159. package/dist/src/components/atoms/input/input.styles.js +0 -2
  160. package/dist/src/components/atoms/input/input.styles.js.map +0 -1
  161. package/dist/src/components/atoms/input/input.type.js +0 -2
  162. package/dist/src/components/atoms/input/input.type.js.map +0 -1
  163. package/dist/src/components/atoms/label/label.atom.js +0 -67
  164. package/dist/src/components/atoms/label/label.atom.js.map +0 -1
  165. package/dist/src/components/atoms/label/label.stories.js +0 -85
  166. package/dist/src/components/atoms/label/label.stories.js.map +0 -1
  167. package/dist/src/components/atoms/label/label.style.js +0 -3
  168. package/dist/src/components/atoms/label/label.style.js.map +0 -1
  169. package/dist/src/components/atoms/popover/popover-content.js +0 -62
  170. package/dist/src/components/atoms/popover/popover-content.js.map +0 -1
  171. package/dist/src/components/atoms/popover/popover-trigger.js +0 -50
  172. package/dist/src/components/atoms/popover/popover-trigger.js.map +0 -1
  173. package/dist/src/components/atoms/popover/popover.atom.js +0 -40
  174. package/dist/src/components/atoms/popover/popover.atom.js.map +0 -1
  175. package/dist/src/components/atoms/popover/popover.stories.js +0 -69
  176. package/dist/src/components/atoms/popover/popover.stories.js.map +0 -1
  177. package/dist/src/components/atoms/popover/popover.style.js +0 -21
  178. package/dist/src/components/atoms/popover/popover.style.js.map +0 -1
  179. package/dist/src/components/atoms/popover/popover.types.js +0 -4
  180. package/dist/src/components/atoms/popover/popover.types.js.map +0 -1
  181. package/dist/src/components/atoms/toggle/defs.js +0 -30
  182. package/dist/src/components/atoms/toggle/defs.js.map +0 -1
  183. package/dist/src/components/atoms/toggle/toggle.atom.js +0 -72
  184. package/dist/src/components/atoms/toggle/toggle.atom.js.map +0 -1
  185. package/dist/src/components/atoms/toggle/toggle.stories.js +0 -189
  186. package/dist/src/components/atoms/toggle/toggle.stories.js.map +0 -1
  187. package/dist/src/components/atoms/toggle/toggle.style.js +0 -19
  188. package/dist/src/components/atoms/toggle/toggle.style.js.map +0 -1
  189. package/dist/src/components/command/command.d.ts +0 -56
  190. package/dist/src/components/command/command.js +0 -402
  191. package/dist/src/components/command/command.js.map +0 -1
  192. package/dist/src/components/command/command.stories.d.ts +0 -5
  193. package/dist/src/components/command/command.stories.js +0 -153
  194. package/dist/src/components/command/command.stories.js.map +0 -1
  195. package/dist/src/components/index.js +0 -3
  196. package/dist/src/components/index.js.map +0 -1
  197. package/dist/src/components/molecules/command/command.molecules.js +0 -27
  198. package/dist/src/components/molecules/command/command.molecules.js.map +0 -1
  199. package/dist/src/components/molecules/command-input/command-input.atom.js +0 -125
  200. package/dist/src/components/molecules/command-input/command-input.atom.js.map +0 -1
  201. package/dist/src/components/molecules/dropdownMenu/dropdownMenu.molecules.js +0 -2
  202. package/dist/src/components/molecules/dropdownMenu/dropdownMenu.molecules.js.map +0 -1
  203. package/dist/src/components/molecules/index.js +0 -2
  204. package/dist/src/components/molecules/index.js.map +0 -1
  205. package/dist/src/helpers/base-element.js +0 -62
  206. package/dist/src/helpers/base-element.js.map +0 -1
  207. package/dist/src/helpers/index.js +0 -4
  208. package/dist/src/helpers/index.js.map +0 -1
  209. package/dist/src/helpers/mouse-conroller.helper.js +0 -33
  210. package/dist/src/helpers/mouse-conroller.helper.js.map +0 -1
  211. package/dist/src/helpers/style.helpers.js +0 -6
  212. package/dist/src/helpers/style.helpers.js.map +0 -1
  213. package/dist/src/index.js +0 -5
  214. package/dist/src/index.js.map +0 -1
  215. package/dist/src/interfaces/actionable.interface.js +0 -2
  216. package/dist/src/interfaces/actionable.interface.js.map +0 -1
  217. package/dist/src/interfaces/atomic.interface.js +0 -2
  218. package/dist/src/interfaces/atomic.interface.js.map +0 -1
  219. package/dist/src/interfaces/changeable.interface.js +0 -2
  220. package/dist/src/interfaces/changeable.interface.js.map +0 -1
  221. package/dist/src/interfaces/child-support-atomic.interface.js +0 -2
  222. package/dist/src/interfaces/child-support-atomic.interface.js.map +0 -1
  223. package/dist/src/interfaces/index.js +0 -7
  224. package/dist/src/interfaces/index.js.map +0 -1
  225. package/dist/src/interfaces/intractable.interface.js +0 -2
  226. package/dist/src/interfaces/intractable.interface.js.map +0 -1
  227. package/dist/src/interfaces/variant.interface.js +0 -2
  228. package/dist/src/interfaces/variant.interface.js.map +0 -1
  229. package/dist/src/lib/index.js +0 -2
  230. package/dist/src/lib/index.js.map +0 -1
  231. package/dist/src/lib/next/next.lib.js +0 -2
  232. package/dist/src/lib/next/next.lib.js.map +0 -1
  233. package/dist/src/lib/react/react.lib.js +0 -16
  234. package/dist/src/lib/react/react.lib.js.map +0 -1
  235. package/dist/src/lib/tw-styles.js +0 -1956
  236. package/dist/src/lib/tw-styles.js.map +0 -1
  237. package/dist/src/styles/index.js +0 -2
  238. package/dist/src/styles/index.js.map +0 -1
  239. package/dist/src/styles/tw.styles.js +0 -2218
  240. package/dist/src/styles/tw.styles.js.map +0 -1
  241. package/dist/src/wc-ui-app.js +0 -88
  242. package/dist/src/wc-ui-app.js.map +0 -1
  243. package/dist/test/wc-ui-app.test.d.ts +0 -0
  244. package/dist/test/wc-ui-app.test.js +0 -18
  245. package/dist/test/wc-ui-app.test.js.map +0 -1
  246. package/dist/vite.config.d.ts +0 -2
  247. package/dist/vite.config.js +0 -29
  248. package/dist/vite.config.js.map +0 -1
  249. /package/dist/src/components/atoms/{command-empty → command}/command-empty.atom.d.ts +0 -0
  250. /package/dist/src/components/atoms/{command-group → command}/command-group.atom.d.ts +0 -0
  251. /package/dist/src/components/{molecules/command-input → atoms/command}/command-input.atom.d.ts +0 -0
  252. /package/dist/src/components/atoms/{command-item → command}/command-item.atom.d.ts +0 -0
  253. /package/dist/src/components/atoms/{command-list → command}/command-list.atom.d.ts +0 -0
  254. /package/dist/src/components/atoms/{command-separator → command}/command-separator.atom.d.ts +0 -0
  255. /package/dist/src/components/{molecules/command/command.molecules.d.ts → atoms/command/command.atom.d.ts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"toggle.style.js","sourceRoot":"","sources":["../../../../../src/components/atoms/toggle/toggle.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAC5B,gWAAgW,EAChW;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,6CAA6C;YACtD,OAAO,EAAE,mEAAmE;SAC7E;QACD,IAAI,EAAE;YACJ,EAAE,EAAE,YAAY;YAChB,EAAE,EAAE,WAAW;YACf,EAAE,EAAE,WAAW;SAChB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,IAAI;KACX;CACF,CACF,CAAC","sourcesContent":["import { cva } from 'class-variance-authority';\n\nexport const toggleStyle = cva(\n 'inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground bg-transparent h-10 px-3',\n {\n variants: {\n variant: {\n default: ` hover:bg-muted hover:text-muted-foreground`,\n outline: ` border border-input hover:bg-accent hover:text-accent-foreground`,\n },\n size: {\n sm: 'h-9 px-2.5',\n md: 'h-10 px-3',\n lg: 'h-11 px-5',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'sm',\n },\n }\n);\n"]}
@@ -1,56 +0,0 @@
1
- import { LitElement } from 'lit';
2
- export declare class Command extends LitElement {
3
- static styles: import("lit").CSSResult[];
4
- _input: Array<HTMLElement>;
5
- render(): import("lit-html").TemplateResult<1>;
6
- }
7
- export declare class CommandList extends LitElement {
8
- static styles: import("lit").CSSResult[];
9
- private get identifier();
10
- render(): import("lit-html").TemplateResult<1>;
11
- }
12
- export declare class CommandGroup extends LitElement {
13
- heading: string;
14
- _id: string;
15
- _hidden: string;
16
- private static _counter;
17
- static styles: import("lit").CSSResult[];
18
- private get identifier();
19
- render(): import("lit-html").TemplateResult<1>;
20
- }
21
- export declare class CommandSeparator extends LitElement {
22
- _id: string;
23
- _hidden: string;
24
- private static _counter;
25
- static styles: import("lit").CSSResult[];
26
- private get identifier();
27
- render(): import("lit-html").TemplateResult<1>;
28
- }
29
- export declare class CommandEmpty extends LitElement {
30
- _id: string;
31
- _hidden: string;
32
- private static _counter;
33
- static styles: import("lit").CSSResult[];
34
- private get identifier();
35
- render(): import("lit-html").TemplateResult<1>;
36
- }
37
- export declare class CommandItem extends LitElement {
38
- _id: string;
39
- _hidden: string;
40
- private static _counter;
41
- static styles: import("lit").CSSResult[];
42
- private get identifier();
43
- get value(): string;
44
- selected: boolean;
45
- private handleMouseEvent;
46
- render(): import("lit-html").TemplateResult<1>;
47
- }
48
- export declare class CommandInput extends LitElement {
49
- placeholder: string;
50
- _value: string;
51
- static styles: import("lit").CSSResult[];
52
- private get identifier();
53
- private filterItems;
54
- private handleChange;
55
- render(): import("lit-html").TemplateResult<1>;
56
- }
@@ -1,402 +0,0 @@
1
- var CommandGroup_1, CommandSeparator_1, CommandEmpty_1, CommandItem_1;
2
- import { __decorate } from "tslib";
3
- import { LitElement, html, css, nothing } from 'lit';
4
- import { property, customElement, queryAssignedElements, } from 'lit/decorators.js';
5
- import { cn } from '../../helpers';
6
- import { TWStyles } from '../../styles';
7
- let Command = class Command extends LitElement {
8
- render() {
9
- return html `
10
- <div
11
- class="${cn('flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground border shadow-md', this.className)}"
12
- id="rtgcmdr1"
13
- rtgcmd-root
14
- >
15
- <slot></slot>
16
- </div>
17
- `;
18
- }
19
- };
20
- Command.styles = [css ``, TWStyles];
21
- __decorate([
22
- queryAssignedElements({ selector: 'input[rtgcmd-input]' })
23
- ], Command.prototype, "_input", void 0);
24
- Command = __decorate([
25
- customElement('rtg-command')
26
- ], Command);
27
- export { Command };
28
- let CommandList = class CommandList extends LitElement {
29
- get identifier() {
30
- const parent = this.parentElement?.shadowRoot?.querySelector('div[rtgcmd-root]');
31
- if (parent) {
32
- return `${parent.getAttribute('id')}l`;
33
- }
34
- return `rtgcmdrxl`;
35
- }
36
- render() {
37
- return html `
38
- <div
39
- class="${cn('max-h-[300px] overflow-y-auto overflow-x-hidden', this.className)}"
40
- role="listbox"
41
- id="${this.identifier}"
42
- style="--rtgcmd-list-height: 265.0px;"
43
- rtgcmd-list
44
- >
45
- <div>
46
- <slot></slot>
47
- </div>
48
- </div>
49
- `;
50
- }
51
- };
52
- CommandList.styles = [css ``, TWStyles];
53
- CommandList = __decorate([
54
- customElement('rtg-command-list')
55
- ], CommandList);
56
- export { CommandList };
57
- let CommandGroup = CommandGroup_1 = class CommandGroup extends LitElement {
58
- constructor() {
59
- super(...arguments);
60
- this.heading = '';
61
- this._id = '';
62
- this._hidden = '';
63
- }
64
- get identifier() {
65
- if (this._id !== '') {
66
- return this._id;
67
- }
68
- const parent = this.parentElement?.shadowRoot?.querySelector('div[rtgcmd-list]');
69
- if (parent) {
70
- this._id = `${parent.getAttribute('id')}g${CommandGroup_1._counter++}`;
71
- }
72
- else {
73
- this._id = `rtgcmdrxlxg${CommandGroup_1._counter++}`;
74
- }
75
- return this._id;
76
- }
77
- render() {
78
- // eslint-disable-next-line lit/attribute-value-entities
79
- const c = 'overflow-hidden p-1 text-foreground [&_[rtgcmd-group-heading]]:px-2 [&_[rtgcmd-group-heading]]:py-1.5 [&_[rtgcmd-group-heading]]:text-xs [&_[rtgcmd-group-heading]]:font-medium [&_[rtgcmd-group-heading]]:text-muted-foreground';
80
- return html `${this._hidden === 'true'
81
- ? nothing
82
- : html `
83
- <div
84
- class="${c}"
85
- rtgcmd-group
86
- role="presentation"
87
- id="${this.identifier}"
88
- >
89
- <div
90
- rtgcmd-group-heading
91
- aria-hidden="true"
92
- id="${this.identifier}h"
93
- >
94
- ${this.heading}
95
- </div>
96
- <div
97
- rtgcmd-group-items
98
- role="group"
99
- aria-labelledby="${this.identifier}h"
100
- >
101
- <slot></slot>
102
- </div>
103
- </div>
104
- `}`;
105
- }
106
- };
107
- CommandGroup._counter = 0;
108
- CommandGroup.styles = [css ``, TWStyles];
109
- __decorate([
110
- property({ type: String })
111
- ], CommandGroup.prototype, "heading", void 0);
112
- __decorate([
113
- property({ attribute: 'id', type: String })
114
- ], CommandGroup.prototype, "_id", void 0);
115
- __decorate([
116
- property({ attribute: 'aria-hidden', type: String })
117
- ], CommandGroup.prototype, "_hidden", void 0);
118
- CommandGroup = CommandGroup_1 = __decorate([
119
- customElement('rtg-command-group')
120
- ], CommandGroup);
121
- export { CommandGroup };
122
- let CommandSeparator = CommandSeparator_1 = class CommandSeparator extends LitElement {
123
- constructor() {
124
- super(...arguments);
125
- this._id = '';
126
- this._hidden = '';
127
- }
128
- get identifier() {
129
- if (this._id !== '') {
130
- return this._id;
131
- }
132
- const parent = this.parentElement?.shadowRoot?.querySelector('div[rtgcmd-list]');
133
- if (parent) {
134
- this._id = `${parent.getAttribute('id')}s${CommandSeparator_1._counter++}`;
135
- }
136
- else {
137
- this._id = `rtgcmdrxlxs${CommandSeparator_1._counter++}`;
138
- }
139
- return this._id;
140
- }
141
- render() {
142
- return html `${this._hidden === 'true'
143
- ? nothing
144
- : html `
145
- <div
146
- class="${cn('-mx-1 h-px bg-border', this.className)}"
147
- rtgcmd-separator
148
- role="separator"
149
- id="${this.identifier}"
150
- ></div>
151
- `}`;
152
- }
153
- };
154
- CommandSeparator._counter = 0;
155
- CommandSeparator.styles = [css ``, TWStyles];
156
- __decorate([
157
- property({ type: String })
158
- ], CommandSeparator.prototype, "_id", void 0);
159
- __decorate([
160
- property({ attribute: 'aria-hidden', type: String })
161
- ], CommandSeparator.prototype, "_hidden", void 0);
162
- CommandSeparator = CommandSeparator_1 = __decorate([
163
- customElement('rtg-command-separator')
164
- ], CommandSeparator);
165
- export { CommandSeparator };
166
- let CommandEmpty = CommandEmpty_1 = class CommandEmpty extends LitElement {
167
- constructor() {
168
- super(...arguments);
169
- this._id = '';
170
- this._hidden = 'true';
171
- }
172
- get identifier() {
173
- if (this._id !== '') {
174
- return this._id;
175
- }
176
- const parent = this.parentElement?.shadowRoot?.querySelector('div[rtgcmd-list]');
177
- if (parent) {
178
- this._id = `${parent.getAttribute('id')}e${CommandEmpty_1._counter++}`;
179
- }
180
- else {
181
- this._id = `rtgcmdrxlxe${CommandEmpty_1._counter++}`;
182
- }
183
- return this._id;
184
- }
185
- render() {
186
- return html `${this._hidden === 'true'
187
- ? nothing
188
- : html `
189
- <div
190
- class="${cn('py-6 text-center text-sm', this.className)}"
191
- rtgcmd-empty
192
- role="presentation"
193
- id="${this.identifier}"
194
- >
195
- <slot></slot>
196
- </div>
197
- `}`;
198
- }
199
- };
200
- CommandEmpty._counter = 0;
201
- CommandEmpty.styles = [css ``, TWStyles];
202
- __decorate([
203
- property({ type: String })
204
- ], CommandEmpty.prototype, "_id", void 0);
205
- __decorate([
206
- property({ attribute: 'aria-hidden', type: String })
207
- ], CommandEmpty.prototype, "_hidden", void 0);
208
- CommandEmpty = CommandEmpty_1 = __decorate([
209
- customElement('rtg-command-empty')
210
- ], CommandEmpty);
211
- export { CommandEmpty };
212
- let CommandItem = CommandItem_1 = class CommandItem extends LitElement {
213
- constructor() {
214
- super(...arguments);
215
- this._id = '';
216
- this._hidden = '';
217
- this.selected = false;
218
- }
219
- get identifier() {
220
- if (this._id !== '') {
221
- return this._id;
222
- }
223
- const parent = this.parentElement?.shadowRoot?.querySelector('div[rtgcmd-group]');
224
- if (parent) {
225
- this._id = `${parent.getAttribute('id')}li${CommandItem_1._counter++}`;
226
- }
227
- else {
228
- this._id = `rtgcmdrxgxli${CommandItem_1._counter++}`;
229
- }
230
- return this._id;
231
- }
232
- get value() {
233
- return this.textContent?.trim() || '';
234
- }
235
- handleMouseEvent(e) {
236
- if (e.type === 'mouseover' || e.type === 'focus') {
237
- this.selected = true;
238
- }
239
- if (e.type === 'mouseleave') {
240
- this.selected = false;
241
- }
242
- }
243
- render() {
244
- return html ` ${this._hidden === 'true'
245
- ? nothing
246
- : html `
247
- <div
248
- class="${cn('relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', this.className)}"
249
- @mouseover="${this.handleMouseEvent}"
250
- @mouseleave="${this.handleMouseEvent}"
251
- @focus="${this.handleMouseEvent}"
252
- rtgcmd-item
253
- role="option"
254
- aria-selected="${this.selected}"
255
- data-selected="${this.selected}"
256
- data-value="${this.value}"
257
- id="${this.identifier}"
258
- aria-hidden="${this.hidden}"
259
- >
260
- <slot></slot>
261
- </div>
262
- `}`;
263
- }
264
- };
265
- CommandItem._counter = 0;
266
- CommandItem.styles = [css ``, TWStyles];
267
- __decorate([
268
- property({ type: String })
269
- ], CommandItem.prototype, "_id", void 0);
270
- __decorate([
271
- property({ attribute: 'aria-hidden', type: String })
272
- ], CommandItem.prototype, "_hidden", void 0);
273
- __decorate([
274
- property({ attribute: 'data-value', type: String })
275
- ], CommandItem.prototype, "value", null);
276
- __decorate([
277
- property({ type: Boolean })
278
- ], CommandItem.prototype, "selected", void 0);
279
- CommandItem = CommandItem_1 = __decorate([
280
- customElement('rtg-command-item')
281
- ], CommandItem);
282
- export { CommandItem };
283
- let CommandInput = class CommandInput extends LitElement {
284
- constructor() {
285
- super(...arguments);
286
- this.placeholder = 'Type a command or search...';
287
- this._value = '';
288
- }
289
- get identifier() {
290
- const parent = this.parentElement?.shadowRoot?.querySelector('div[rtgcmd-root]');
291
- if (parent) {
292
- return `${parent.getAttribute('id')}i`;
293
- }
294
- return `rtgcmdrxi`;
295
- }
296
- filterItems() {
297
- const parent = this.parentElement;
298
- if (parent) {
299
- let isEmpty = true;
300
- const groups = parent.querySelectorAll('rtg-command-list > rtg-command-group');
301
- if (groups) {
302
- groups.forEach(group => {
303
- let hidden = true;
304
- const items = group.querySelectorAll('rtg-command-item');
305
- if (items) {
306
- items.forEach(item => {
307
- const value = item?.value || '';
308
- if (value.toLowerCase().includes(this._value.toLowerCase())) {
309
- hidden = false;
310
- isEmpty = false;
311
- item.setAttribute('aria-hidden', 'false');
312
- }
313
- else {
314
- item.setAttribute('aria-hidden', 'true');
315
- }
316
- });
317
- }
318
- group.setAttribute('aria-hidden', hidden ? 'true' : 'false');
319
- let separator = group.previousElementSibling;
320
- if (separator) {
321
- separator.setAttribute('aria-hidden', hidden ||
322
- separator.previousElementSibling?.getAttribute('aria-hidden') === 'true'
323
- ? 'true'
324
- : 'false');
325
- }
326
- separator = group.nextElementSibling;
327
- if (separator) {
328
- separator.setAttribute('aria-hidden', hidden ||
329
- separator.nextElementSibling?.getAttribute('aria-hidden') ===
330
- 'true'
331
- ? 'true'
332
- : 'false');
333
- }
334
- });
335
- }
336
- const empty = parent.querySelector('rtg-command-empty');
337
- if (empty) {
338
- empty.setAttribute('aria-hidden', isEmpty ? 'false' : 'true');
339
- }
340
- }
341
- }
342
- handleChange(e) {
343
- const input = e.target;
344
- if (input) {
345
- this._value = input.value;
346
- this.filterItems();
347
- }
348
- }
349
- render() {
350
- return html `
351
- <div
352
- class="${cn('flex items-center border-b px-3', this.className)}"
353
- name="rtgcmd-input-container"
354
- >
355
- <svg
356
- xmlns="http://www.w3.org/2000/svg"
357
- width="24"
358
- height="24"
359
- viewBox="0 0 24 24"
360
- fill="none"
361
- stroke="currentColor"
362
- stroke-width="2"
363
- stroke-linecap="round"
364
- stroke-linejoin="round"
365
- class="mr-2 h-4 w-4 shrink-0 opacity-50"
366
- >
367
- <circle cx="11" cy="11" r="8"></circle>
368
- <path d="m21 21-4.3-4.3"></path>
369
- </svg>
370
- <input
371
- 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"
372
- placeholder="${this.placeholder}"
373
- rtgcmd-input
374
- @input="${this.handleChange}"
375
- autocomplete="off"
376
- autocorrect="off"
377
- spellcheck="false"
378
- aria-autocomplete="list"
379
- role="combobox"
380
- aria-expanded="true"
381
- aria-controls=":r1oe:"
382
- aria-labelledby=":r1of:"
383
- id="${this.identifier}"
384
- type="text"
385
- data-value="${this._value}"
386
- />
387
- </div>
388
- `;
389
- }
390
- };
391
- CommandInput.styles = [css ``, TWStyles];
392
- __decorate([
393
- property({ type: String })
394
- ], CommandInput.prototype, "placeholder", void 0);
395
- __decorate([
396
- property({ attribute: 'value', type: String })
397
- ], CommandInput.prototype, "_value", void 0);
398
- CommandInput = __decorate([
399
- customElement('rtg-command-input')
400
- ], CommandInput);
401
- export { CommandInput };
402
- //# sourceMappingURL=command.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../src/components/command/command.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EACL,QAAQ,EACR,aAAa,EACb,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGjC,IAAM,OAAO,GAA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;4CAAa;AAHjD,YAAY;IADxB,aAAa,CAAC,mBAAmB,CAAC;GACtB,YAAY,CA0HxB","sourcesContent":["import { LitElement, html, css, nothing } from 'lit';\nimport {\n property,\n customElement,\n queryAssignedElements,\n} from 'lit/decorators.js';\nimport { cn } from '../../helpers';\nimport { TWStyles } from '../../styles';\n\n@customElement('rtg-command')\nexport class Command extends LitElement {\n static styles = [css``, TWStyles];\n\n @queryAssignedElements({ selector: 'input[rtgcmd-input]' })\n _input!: Array<HTMLElement>;\n\n render() {\n return html`\n <div\n class=\"${cn(\n 'flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground border shadow-md',\n this.className\n )}\"\n id=\"rtgcmdr1\"\n rtgcmd-root\n >\n <slot></slot>\n </div>\n `;\n }\n}\n\n@customElement('rtg-command-list')\nexport class CommandList extends LitElement {\n static styles = [css``, TWStyles];\n\n private get identifier() {\n const parent =\n this.parentElement?.shadowRoot?.querySelector('div[rtgcmd-root]');\n if (parent) {\n return `${parent.getAttribute('id')}l`;\n }\n return `rtgcmdrxl`;\n }\n\n render() {\n return html`\n <div\n class=\"${cn(\n 'max-h-[300px] overflow-y-auto overflow-x-hidden',\n this.className\n )}\"\n role=\"listbox\"\n id=\"${this.identifier}\"\n style=\"--rtgcmd-list-height: 265.0px;\"\n rtgcmd-list\n >\n <div>\n <slot></slot>\n </div>\n </div>\n `;\n }\n}\n\n@customElement('rtg-command-group')\nexport class CommandGroup extends LitElement {\n @property({ type: String }) heading = '';\n\n @property({ attribute: 'id', type: String }) _id = '';\n\n @property({ attribute: 'aria-hidden', type: String }) _hidden = '';\n\n private static _counter = 0;\n\n static styles = [css``, TWStyles];\n\n private get identifier() {\n if (this._id !== '') {\n return this._id;\n }\n const parent =\n this.parentElement?.shadowRoot?.querySelector('div[rtgcmd-list]');\n if (parent) {\n this._id = `${parent.getAttribute('id')}g${CommandGroup._counter++}`;\n } else {\n this._id = `rtgcmdrxlxg${CommandGroup._counter++}`;\n }\n return this._id;\n }\n\n render() {\n // eslint-disable-next-line lit/attribute-value-entities\n const c =\n 'overflow-hidden p-1 text-foreground [&_[rtgcmd-group-heading]]:px-2 [&_[rtgcmd-group-heading]]:py-1.5 [&_[rtgcmd-group-heading]]:text-xs [&_[rtgcmd-group-heading]]:font-medium [&_[rtgcmd-group-heading]]:text-muted-foreground';\n return html`${this._hidden === 'true'\n ? nothing\n : html`\n <div\n class=\"${c}\"\n rtgcmd-group\n role=\"presentation\"\n id=\"${this.identifier}\"\n >\n <div\n rtgcmd-group-heading\n aria-hidden=\"true\"\n id=\"${this.identifier}h\"\n >\n ${this.heading}\n </div>\n <div\n rtgcmd-group-items\n role=\"group\"\n aria-labelledby=\"${this.identifier}h\"\n >\n <slot></slot>\n </div>\n </div>\n `}`;\n }\n}\n\n@customElement('rtg-command-separator')\nexport class CommandSeparator extends LitElement {\n @property({ type: String }) _id = '';\n\n @property({ attribute: 'aria-hidden', type: String }) _hidden = '';\n\n private static _counter = 0;\n\n static styles = [css``, TWStyles];\n\n private get identifier() {\n if (this._id !== '') {\n return this._id;\n }\n const parent =\n this.parentElement?.shadowRoot?.querySelector('div[rtgcmd-list]');\n if (parent) {\n this._id = `${parent.getAttribute('id')}s${CommandSeparator._counter++}`;\n } else {\n this._id = `rtgcmdrxlxs${CommandSeparator._counter++}`;\n }\n return this._id;\n }\n\n render() {\n return html`${this._hidden === 'true'\n ? nothing\n : html`\n <div\n class=\"${cn('-mx-1 h-px bg-border', this.className)}\"\n rtgcmd-separator\n role=\"separator\"\n id=\"${this.identifier}\"\n ></div>\n `}`;\n }\n}\n\n@customElement('rtg-command-empty')\nexport class CommandEmpty extends LitElement {\n @property({ type: String }) _id = '';\n\n @property({ attribute: 'aria-hidden', type: String }) _hidden = 'true';\n\n private static _counter = 0;\n\n static styles = [css``, TWStyles];\n\n private get identifier() {\n if (this._id !== '') {\n return this._id;\n }\n const parent =\n this.parentElement?.shadowRoot?.querySelector('div[rtgcmd-list]');\n if (parent) {\n this._id = `${parent.getAttribute('id')}e${CommandEmpty._counter++}`;\n } else {\n this._id = `rtgcmdrxlxe${CommandEmpty._counter++}`;\n }\n return this._id;\n }\n\n render() {\n return html`${this._hidden === 'true'\n ? nothing\n : html`\n <div\n class=\"${cn('py-6 text-center text-sm', this.className)}\"\n rtgcmd-empty\n role=\"presentation\"\n id=\"${this.identifier}\"\n >\n <slot></slot>\n </div>\n `}`;\n }\n}\n\n@customElement('rtg-command-item')\nexport class CommandItem extends LitElement {\n @property({ type: String }) _id = '';\n\n @property({ attribute: 'aria-hidden', type: String }) _hidden = '';\n\n private static _counter = 0;\n\n static styles = [css``, TWStyles];\n\n private get identifier() {\n if (this._id !== '') {\n return this._id;\n }\n const parent =\n this.parentElement?.shadowRoot?.querySelector('div[rtgcmd-group]');\n if (parent) {\n this._id = `${parent.getAttribute('id')}li${CommandItem._counter++}`;\n } else {\n this._id = `rtgcmdrxgxli${CommandItem._counter++}`;\n }\n return this._id;\n }\n\n @property({ attribute: 'data-value', type: String })\n public get value() {\n return this.textContent?.trim() || '';\n }\n\n @property({ type: Boolean }) selected = false;\n\n private handleMouseEvent(e: Event) {\n if (e.type === 'mouseover' || e.type === 'focus') {\n this.selected = true;\n }\n if (e.type === 'mouseleave') {\n this.selected = false;\n }\n }\n\n render() {\n return html` ${this._hidden === 'true'\n ? nothing\n : html`\n <div\n class=\"${cn(\n 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n this.className\n )}\"\n @mouseover=\"${this.handleMouseEvent}\"\n @mouseleave=\"${this.handleMouseEvent}\"\n @focus=\"${this.handleMouseEvent}\"\n rtgcmd-item\n role=\"option\"\n aria-selected=\"${this.selected}\"\n data-selected=\"${this.selected}\"\n data-value=\"${this.value}\"\n id=\"${this.identifier}\"\n aria-hidden=\"${this.hidden}\"\n >\n <slot></slot>\n </div>\n `}`;\n }\n}\n\n@customElement('rtg-command-input')\nexport class CommandInput extends LitElement {\n @property({ type: String }) placeholder = 'Type a command or search...';\n\n @property({ attribute: 'value', type: String }) _value = '';\n\n static styles = [css``, TWStyles];\n\n private get identifier() {\n const parent =\n this.parentElement?.shadowRoot?.querySelector('div[rtgcmd-root]');\n if (parent) {\n return `${parent.getAttribute('id')}i`;\n }\n return `rtgcmdrxi`;\n }\n\n private filterItems() {\n const parent = this.parentElement;\n if (parent) {\n let isEmpty = true;\n const groups = parent.querySelectorAll(\n 'rtg-command-list > rtg-command-group'\n );\n if (groups) {\n groups.forEach(group => {\n let hidden = true;\n const items = group.querySelectorAll('rtg-command-item');\n if (items) {\n items.forEach(item => {\n const value = (item as CommandItem)?.value || '';\n if (value.toLowerCase().includes(this._value.toLowerCase())) {\n hidden = false;\n isEmpty = false;\n item.setAttribute('aria-hidden', 'false');\n } else {\n item.setAttribute('aria-hidden', 'true');\n }\n });\n }\n group.setAttribute('aria-hidden', hidden ? 'true' : 'false');\n let separator = group.previousElementSibling as CommandSeparator;\n if (separator) {\n separator.setAttribute(\n 'aria-hidden',\n hidden ||\n separator.previousElementSibling?.getAttribute(\n 'aria-hidden'\n ) === 'true'\n ? 'true'\n : 'false'\n );\n }\n separator = group.nextElementSibling as CommandSeparator;\n if (separator) {\n separator.setAttribute(\n 'aria-hidden',\n hidden ||\n separator.nextElementSibling?.getAttribute('aria-hidden') ===\n 'true'\n ? 'true'\n : 'false'\n );\n }\n });\n }\n\n const empty = parent.querySelector('rtg-command-empty');\n if (empty) {\n empty.setAttribute('aria-hidden', isEmpty ? 'false' : 'true');\n }\n }\n }\n\n private handleChange(e: Event) {\n const input = e.target as HTMLInputElement;\n if (input) {\n this._value = input.value;\n this.filterItems();\n }\n }\n\n render() {\n return html`\n <div\n class=\"${cn('flex items-center border-b px-3', this.className)}\"\n name=\"rtgcmd-input-container\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"mr-2 h-4 w-4 shrink-0 opacity-50\"\n >\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <path d=\"m21 21-4.3-4.3\"></path>\n </svg>\n <input\n 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\"\n placeholder=\"${this.placeholder}\"\n rtgcmd-input\n @input=\"${this.handleChange}\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n spellcheck=\"false\"\n aria-autocomplete=\"list\"\n role=\"combobox\"\n aria-expanded=\"true\"\n aria-controls=\":r1oe:\"\n aria-labelledby=\":r1of:\"\n id=\"${this.identifier}\"\n type=\"text\"\n data-value=\"${this._value}\"\n />\n </div>\n `;\n }\n}\n"]}
@@ -1,5 +0,0 @@
1
- import './command';
2
- import { Meta } from '@storybook/web-components';
3
- declare const _default: Meta;
4
- export default _default;
5
- export declare const Default: () => import("lit-html").TemplateResult<1>;
@@ -1,153 +0,0 @@
1
- import { html } from 'lit';
2
- // eslint-disable-next-line import/extensions
3
- import './command';
4
- export default {
5
- title: 'Components/command',
6
- component: 'rtg-command',
7
- tags: ['autodocs'],
8
- };
9
- export const Default = () => html `
10
- <rtg-command class="w-full max-w-md">
11
- <rtg-command-input placeholder="Search ...."></rtg-command-input>
12
- <rtg-command-list>
13
- <rtg-command-empty>No items found!</rtg-command-empty>
14
- <rtg-command-group heading="Suggestions">
15
- <rtg-command-item>
16
- <svg
17
- xmlns="http://www.w3.org/2000/svg"
18
- width="24"
19
- height="24"
20
- viewBox="0 0 24 24"
21
- fill="none"
22
- stroke="currentColor"
23
- stroke-width="2"
24
- stroke-linecap="round"
25
- stroke-linejoin="round"
26
- class="mr-2 h-4 w-4"
27
- >
28
- <rect width="18" height="18" x="3" y="4" rx="2" ry="2"></rect>
29
- <line x1="16" x2="16" y1="2" y2="6"></line>
30
- <line x1="8" x2="8" y1="2" y2="6"></line>
31
- <line x1="3" x2="21" y1="10" y2="10"></line>
32
- </svg>
33
- <span>Calendar</span>
34
- </rtg-command-item>
35
- <rtg-command-item>
36
- <svg
37
- xmlns="http://www.w3.org/2000/svg"
38
- width="24"
39
- height="24"
40
- viewBox="0 0 24 24"
41
- fill="none"
42
- stroke="currentColor"
43
- stroke-width="2"
44
- stroke-linecap="round"
45
- stroke-linejoin="round"
46
- class="mr-2 h-4 w-4"
47
- >
48
- <circle cx="12" cy="12" r="10"></circle>
49
- <path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
50
- <line x1="9" x2="9.01" y1="9" y2="9"></line>
51
- <line x1="15" x2="15.01" y1="9" y2="9"></line>
52
- </svg>
53
- <span>Search Emoji</span>
54
- </rtg-command-item>
55
- <rtg-command-item>
56
- <svg
57
- xmlns="http://www.w3.org/2000/svg"
58
- width="24"
59
- height="24"
60
- viewBox="0 0 24 24"
61
- fill="none"
62
- stroke="currentColor"
63
- stroke-width="2"
64
- stroke-linecap="round"
65
- stroke-linejoin="round"
66
- class="mr-2 h-4 w-4"
67
- >
68
- <rect width="16" height="20" x="4" y="2" rx="2"></rect>
69
- <line x1="8" x2="16" y1="6" y2="6"></line>
70
- <line x1="16" x2="16" y1="14" y2="18"></line>
71
- <path d="M16 10h.01"></path>
72
- <path d="M12 10h.01"></path>
73
- <path d="M8 10h.01"></path>
74
- <path d="M12 14h.01"></path>
75
- <path d="M8 14h.01"></path>
76
- <path d="M12 18h.01"></path>
77
- <path d="M8 18h.01"></path>
78
- </svg>
79
- <span>Calculator</span>
80
- </rtg-command-item>
81
- </rtg-command-group>
82
- <rtg-command-separator></rtg-command-separator>
83
- <rtg-command-group heading="Settings">
84
- <rtg-command-item onclick="javascript:alert('Profile Clicked!')">
85
- <svg
86
- xmlns="http://www.w3.org/2000/svg"
87
- width="24"
88
- height="24"
89
- viewBox="0 0 24 24"
90
- fill="none"
91
- stroke="currentColor"
92
- stroke-width="2"
93
- stroke-linecap="round"
94
- stroke-linejoin="round"
95
- class="mr-2 h-4 w-4"
96
- >
97
- <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"></path>
98
- <circle cx="12" cy="7" r="4"></circle>
99
- </svg>
100
- <span>Profile</span>
101
- <span class="ml-auto text-xs tracking-widest text-muted-foreground"
102
- >⌘P</span
103
- >
104
- </rtg-command-item>
105
- <rtg-command-item>
106
- <svg
107
- xmlns="http://www.w3.org/2000/svg"
108
- width="24"
109
- height="24"
110
- viewBox="0 0 24 24"
111
- fill="none"
112
- stroke="currentColor"
113
- stroke-width="2"
114
- stroke-linecap="round"
115
- stroke-linejoin="round"
116
- class="mr-2 h-4 w-4"
117
- >
118
- <rect width="20" height="14" x="2" y="5" rx="2"></rect>
119
- <line x1="2" x2="22" y1="10" y2="10"></line>
120
- </svg>
121
- <span>Billing</span
122
- ><span class="ml-auto text-xs tracking-widest text-muted-foreground"
123
- >⌘B</span
124
- >
125
- </rtg-command-item>
126
- <rtg-command-item>
127
- <svg
128
- xmlns="http://www.w3.org/2000/svg"
129
- width="24"
130
- height="24"
131
- viewBox="0 0 24 24"
132
- fill="none"
133
- stroke="currentColor"
134
- stroke-width="2"
135
- stroke-linecap="round"
136
- stroke-linejoin="round"
137
- class="mr-2 h-4 w-4"
138
- >
139
- <path
140
- d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"
141
- ></path>
142
- <circle cx="12" cy="12" r="3"></circle>
143
- </svg>
144
- <span>Settings</span>
145
- <span class="ml-auto text-xs tracking-widest text-muted-foreground">
146
- ⌘S</span
147
- >
148
- </rtg-command-item>
149
- </rtg-command-group></rtg-command-list
150
- >
151
- </rtg-command>
152
- `;
153
- //# sourceMappingURL=command.stories.js.map