@rocketui/vue 0.0.46 → 0.0.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/.eslintrc.cjs +79 -0
  2. package/.gitattributes +2 -0
  3. package/.github/workflows/chromatic.yml +28 -0
  4. package/.github/workflows/publish-storybook.yml +41 -0
  5. package/.husky/pre-commit +4 -0
  6. package/.prettierrc.cjs +10 -0
  7. package/.storybook/Theme.js +17 -0
  8. package/.storybook/main.ts +20 -0
  9. package/.storybook/manager-head.html +3 -0
  10. package/.storybook/manager.js +8 -0
  11. package/.storybook/preview-head.html +3 -0
  12. package/.storybook/preview.ts +36 -0
  13. package/.storybook/source-panel/manager.js +28 -0
  14. package/.storybook/withSource.js +91 -0
  15. package/.vscode/extensions.json +11 -0
  16. package/.vscode/settings.json +20 -0
  17. package/index.html +13 -0
  18. package/lib/main.ts +48 -0
  19. package/package.json +2 -8
  20. package/postcss.config.cjs +9 -0
  21. package/resources/rocket-ui-logo-dark.svg +27 -0
  22. package/resources/rocket-ui-logo-light.svg +27 -0
  23. package/shims-rocketui.d.ts +9 -0
  24. package/src/App.vue +15 -0
  25. package/src/assets/blank-avatar.svg +3 -0
  26. package/src/assets/icons/mdi.js +7302 -0
  27. package/src/assets/logo.svg +1 -0
  28. package/src/components/Accordion/Accordion.mdx +88 -0
  29. package/src/components/Accordion/Accordion.stories.ts +257 -0
  30. package/src/components/Accordion/RAccordion.vue +73 -0
  31. package/src/components/Accordion/accordion.css +75 -0
  32. package/src/components/Accordion/accordion.spec.ts +123 -0
  33. package/src/components/Alert/Alert.mdx +120 -0
  34. package/src/components/Alert/Alert.stories.ts +118 -0
  35. package/src/components/Alert/RAlert.vue +119 -0
  36. package/src/components/Alert/alert.css +136 -0
  37. package/src/components/Alert/alert.spec.ts +32 -0
  38. package/src/components/Avatar/Avatar.mdx +96 -0
  39. package/src/components/Avatar/Avatar.stories.ts +65 -0
  40. package/src/components/Avatar/RAvatar.vue +115 -0
  41. package/src/components/Avatar/avatar.css +82 -0
  42. package/src/components/Avatar/avatar.spec.ts +38 -0
  43. package/src/components/Badge/Badge.mdx +112 -0
  44. package/src/components/Badge/Badge.stories.ts +99 -0
  45. package/src/components/Badge/RBadge.vue +89 -0
  46. package/src/components/Badge/badge.css +63 -0
  47. package/src/components/Badge/badge.spec.ts +20 -0
  48. package/src/components/Box/Box.mdx +20 -0
  49. package/src/components/Box/Box.stories.ts +56 -0
  50. package/src/components/Box/RBox.vue +97 -0
  51. package/src/components/Breadcrumb/Breadcrumb.stories.ts +115 -0
  52. package/src/components/Breadcrumb/RBreadcrumb.vue +43 -0
  53. package/src/components/Breadcrumb/breadcrumb.css +29 -0
  54. package/src/components/Button/Button.mdx +148 -0
  55. package/src/components/Button/Button.spec.ts +29 -0
  56. package/src/components/Button/Button.stories.ts +118 -0
  57. package/src/components/Button/RButton.vue +179 -0
  58. package/src/components/Button/button.css +146 -0
  59. package/src/components/Checkbox/Checkbox.mdx +100 -0
  60. package/src/components/Checkbox/Checkbox.stories.ts +67 -0
  61. package/src/components/Checkbox/RCheckbox.vue +195 -0
  62. package/src/components/Checkbox/checkbox.css +67 -0
  63. package/src/components/Checkbox/checkbox.spec.ts +60 -0
  64. package/src/components/Chips/Chip.mdx +113 -0
  65. package/src/components/Chips/Chip.stories.ts +122 -0
  66. package/src/components/Chips/RChip.vue +125 -0
  67. package/src/components/Chips/chip.css +62 -0
  68. package/src/components/Chips/chip.spec.ts +40 -0
  69. package/src/components/Dropdown/Dropdown.mdx +135 -0
  70. package/src/components/Dropdown/Dropdown.stories.ts +84 -0
  71. package/src/components/Dropdown/RDropdown.vue +392 -0
  72. package/src/components/Dropdown/dropdown.css +113 -0
  73. package/src/components/Dropdown/dropdown.spec.ts +98 -0
  74. package/src/components/Flex/Flex.mdx +20 -0
  75. package/src/components/Flex/Flex.stories.js +127 -0
  76. package/src/components/Flex/RFlex.vue +91 -0
  77. package/src/components/Grid/Grid.mdx +20 -0
  78. package/src/components/Grid/Grid.stories.js +107 -0
  79. package/src/components/Grid/RGrid.vue +138 -0
  80. package/src/components/Icon/Icon.mdx +68 -0
  81. package/src/components/Icon/Icon.stories.ts +33 -0
  82. package/src/components/Icon/RIcon.vue +56 -0
  83. package/src/components/Icon/icon.spec.ts +25 -0
  84. package/src/components/ItemGroup/ItemGroup.stories.ts +91 -0
  85. package/src/components/ItemGroup/RItem.vue +74 -0
  86. package/src/components/ItemGroup/RItemGroup.vue +122 -0
  87. package/src/components/ItemGroup/__snapshots__/itemgroup.spec.ts.snap +13 -0
  88. package/src/components/ItemGroup/itemgroup.spec.ts +67 -0
  89. package/src/components/Label/Label.mdx +50 -0
  90. package/src/components/Label/Label.stories.ts +38 -0
  91. package/src/components/Label/RLabel.vue +42 -0
  92. package/src/components/Label/label.css +0 -0
  93. package/src/components/Modal/Modal.mdx +91 -0
  94. package/src/components/Modal/Modal.stories.ts +125 -0
  95. package/src/components/Modal/RModal.vue +130 -0
  96. package/src/components/Modal/modal.css +41 -0
  97. package/src/components/Modal/modal.spec.ts +25 -0
  98. package/src/components/Pagination/Pagination.stories.ts +24 -0
  99. package/src/components/Pagination/RPagination.vue +103 -0
  100. package/src/components/Pagination/pagination.css +47 -0
  101. package/src/components/Pagination/pagination.spec.ts +17 -0
  102. package/src/components/ProgressBar/ProgressBar.stories.ts +34 -0
  103. package/src/components/ProgressBar/RProgressBar.vue +21 -0
  104. package/src/components/ProgressBar/progressbar.css +24 -0
  105. package/src/components/ProgressBar/progressbar.spec.ts +17 -0
  106. package/src/components/Shared/Enums.ts +1 -0
  107. package/src/components/Sidebar/RSidebar.vue +27 -0
  108. package/src/components/Sidebar/Sidebar.mdx +31 -0
  109. package/src/components/Sidebar/Sidebar.stories.ts +34 -0
  110. package/src/components/Sidebar/sidebar.css +18 -0
  111. package/src/components/Sidebar/sidebar.spec.ts +33 -0
  112. package/src/components/Snackbar/RSnackbar.vue +136 -0
  113. package/src/components/Snackbar/Snackbar.mdx +126 -0
  114. package/src/components/Snackbar/Snackbar.stories.ts +93 -0
  115. package/src/components/Snackbar/snackbar.css +99 -0
  116. package/src/components/Snackbar/snackbar.spec.ts +56 -0
  117. package/src/components/Switch/RSwitch.vue +147 -0
  118. package/src/components/Switch/Switch.mdx +102 -0
  119. package/src/components/Switch/Switch.stories.ts +79 -0
  120. package/src/components/Switch/switch.css +102 -0
  121. package/src/components/Switch/switch.spec.ts +31 -0
  122. package/src/components/TabItem/RTabItem.vue +175 -0
  123. package/src/components/TabItem/TabItem.mdx +95 -0
  124. package/src/components/TabItem/TabItem.spec.ts +29 -0
  125. package/src/components/TabItem/TabItem.stories.ts +97 -0
  126. package/src/components/TabItem/common.ts +6 -0
  127. package/src/components/TabItem/tab-item.css +29 -0
  128. package/src/components/Tabs/RTabs.vue +94 -0
  129. package/src/components/Tabs/Tabs.mdx +78 -0
  130. package/src/components/Tabs/Tabs.spec.ts +28 -0
  131. package/src/components/Tabs/Tabs.stories.ts +191 -0
  132. package/src/components/Tabs/tabs.css +13 -0
  133. package/src/components/Tabs/types.ts +11 -0
  134. package/src/components/TextArea/RTextArea.vue +142 -0
  135. package/src/components/TextArea/TextArea.mdx +108 -0
  136. package/src/components/TextArea/TextArea.stories.ts +55 -0
  137. package/src/components/TextArea/textarea.css +51 -0
  138. package/src/components/TextArea/textarea.spec.ts +36 -0
  139. package/src/components/Textfield/RTextfield.vue +372 -0
  140. package/src/components/Textfield/Textfield.mdx +159 -0
  141. package/src/components/Textfield/Textfield.stories.ts +121 -0
  142. package/src/components/Textfield/textfield.css +81 -0
  143. package/src/components/Textfield/textfield.spec.ts +34 -0
  144. package/src/components/Tooltip/RTooltip.vue +325 -0
  145. package/src/components/Tooltip/Tooltip.mdx +111 -0
  146. package/src/components/Tooltip/Tooltip.stories.ts +203 -0
  147. package/src/components/Tooltip/common.ts +91 -0
  148. package/src/components/Tooltip/tooltip.css +34 -0
  149. package/src/components/Tooltip/tooltip.spec.ts +81 -0
  150. package/src/components/Typography/Typography.mdx +109 -0
  151. package/src/components/Typography/typography.css +128 -0
  152. package/src/directives/index.ts +19 -0
  153. package/src/index.css +241 -0
  154. package/src/main.ts +5 -0
  155. package/src/scripts/buildIcons.js +21 -0
  156. package/src/stories/Colors.mdx +355 -0
  157. package/src/stories/GettingStarted.mdx +121 -0
  158. package/src/stories/Layout.mdx +15 -0
  159. package/tailwind.config.cjs +16 -0
  160. package/tsconfig.json +24 -0
  161. package/vite.config.ts +39 -0
  162. package/vitest.config.ts +12 -0
  163. package/dist/rocket-ui-vue.js +0 -9381
  164. package/dist/rocket-ui-vue.umd.cjs +0 -1
  165. package/dist/style.css +0 -2
  166. package/dist/types/main.d.ts +0 -25
  167. /package/{dist → public}/design-tokens.source.json +0 -0
  168. /package/{dist → public}/favicon.ico +0 -0
@@ -0,0 +1,121 @@
1
+ import { Meta } from '@storybook/addon-docs';
2
+
3
+ <Meta
4
+ title="Getting Started"
5
+ parameters={{
6
+ viewMode: 'docs',
7
+ previewTabs: {
8
+ canvas: { hidden: true },
9
+ },
10
+ }}
11
+ />
12
+
13
+ # Getting Started
14
+
15
+ ![Logo](./resources/rocket-ui-logo-light.svg#gh-light-mode-only)
16
+
17
+ ## Installation
18
+
19
+ ```sh
20
+ yarn add @rocketui/vue
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ Your `main.{js,ts}` file should look like this:
26
+
27
+ ```js
28
+ import { createApp } from 'vue';
29
+ import App from './App.vue';
30
+
31
+ // Import the Styles
32
+ import '@rocketui/vue/dist/style.css';
33
+
34
+ createApp(App).mount('#app');
35
+ ```
36
+
37
+ Then you can use the components in your `App.vue` file:
38
+
39
+ ```js
40
+ <script setup>
41
+ import { RButton } from '@rocketui/vue';
42
+ </script>
43
+
44
+ <template>
45
+ <RButton>Rocket UI Button</RButton>
46
+ </template>
47
+ ```
48
+
49
+ ## Development
50
+
51
+ ### Recommended IDE Setup
52
+
53
+ [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
54
+
55
+ ## Type Support for `.vue` Imports in TS
56
+
57
+ TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
58
+
59
+ If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
60
+
61
+ 1. Disable the built-in TypeScript Extension
62
+ 1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
63
+ 2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
64
+ 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
65
+
66
+ ### Customize configuration
67
+
68
+ See [Vite Configuration Reference](https://vitejs.dev/config/).
69
+
70
+ ### Project Setup
71
+
72
+ ```sh
73
+ yarn install
74
+ ```
75
+
76
+ #### Compile and Hot-Reload for Development
77
+
78
+ ```sh
79
+ yarn dev
80
+ ```
81
+
82
+ #### Type-Check, Compile and Minify for Production
83
+
84
+ ```sh
85
+ yarn build
86
+ ```
87
+
88
+ #### Run Unit Tests with [Vitest](https://vitest.dev/)
89
+
90
+ ```sh
91
+ yarn test:unit
92
+ ```
93
+
94
+ #### Lint with [ESLint](https://eslint.org/)
95
+
96
+ ```sh
97
+ yarn lint
98
+ ```
99
+
100
+ ## Contribution
101
+
102
+ We welcome contributions of any kind including documentation, bug reports, bug fixes, feature requests, feature implementations, and pull requests. If you're interested in contributing to this project, please follow these guidelines:
103
+
104
+ - Fork this repository to your own GitHub account and then clone it to your local device.
105
+ - Install the dependencies by running `yarn install`.
106
+ - Run `yarn dev` to start the dev server and see your changes in real-time as you edit the source files.
107
+ - Create a new branch for your changes, e.g. `git checkout -b my-feature`.
108
+ - Make your changes and commit them with a descriptive message.
109
+ - Push your changes to your forked repository, e.g. `git push -u origin my-feature`.
110
+ - Create a pull request from your forked repository to this repository, and describe the changes you've made and why they should be merged.
111
+ - Before submitting a pull request, please make sure that your changes pass the following checks:
112
+
113
+ The unit tests pass by running `yarn test:unit`.
114
+ The code passes the ESLint check by running `yarn lint`.
115
+ The code builds without errors by running `yarn build`.
116
+
117
+ We aim to respond to all pull requests and issues within 48 hours. Thank you for your interest in contributing to Rocket UI Vue!
118
+
119
+ ## License
120
+
121
+ MIT. See [LICENSE](https://github.com/Teknasyon/rocket-ui/blob/master/LICENSE) for more details.
@@ -0,0 +1,15 @@
1
+ import { Meta } from '@storybook/addon-docs';
2
+
3
+ <Meta
4
+ title="Layouts"
5
+ parameters={{
6
+ viewMode: 'docs',
7
+ previewTabs: {
8
+ canvas: { hidden: true },
9
+ },
10
+ }}
11
+ />
12
+
13
+ # Setting Layout
14
+
15
+ Hello world
@@ -0,0 +1,16 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ const defaultTheme = require('tailwindcss/defaultTheme');
3
+ /* eslint-env node */
4
+ module.exports = {
5
+ mode: 'jit',
6
+ content: ['./src/**/*.{vue,js,ts,jsx,tsx}'],
7
+ theme: {
8
+ extend: {
9
+ fontFamily: {
10
+ sans: ['Albert Sans', ...defaultTheme.fontFamily.sans],
11
+ serif: ['Roboto', ...defaultTheme.fontFamily.serif],
12
+ },
13
+ },
14
+ },
15
+ plugins: [],
16
+ };
package/tsconfig.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "esnext",
4
+ "module": "esnext",
5
+ "moduleResolution": "node",
6
+ "jsx": "preserve",
7
+ "types": ["vitest/globals", "vite/client", "node", "jsdom"],
8
+ "composite": true,
9
+ "lib": ["esnext", "dom"],
10
+ "importHelpers": true,
11
+ "outDir": "dist",
12
+ "strict": true,
13
+ "allowJs": true,
14
+ "sourceMap": true,
15
+ "resolveJsonModule": true,
16
+ "esModuleInterop": true,
17
+ "skipLibCheck": true,
18
+ "experimentalDecorators": true,
19
+ "baseUrl": ".",
20
+ "paths": {
21
+ "@/*": ["./src"]
22
+ }
23
+ }
24
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,39 @@
1
+ import { defineConfig } from 'vite';
2
+ import vue from '@vitejs/plugin-vue';
3
+ import { resolve } from 'path';
4
+ import dts from 'vite-plugin-dts';
5
+
6
+ // https://vitejs.dev/config/
7
+ export default defineConfig({
8
+ plugins: [
9
+ vue(),
10
+ dts({
11
+ copyDtsFiles: true,
12
+ outDir: ['dist', 'types'],
13
+ // include: ['src/index.ts'],
14
+ exclude: ['src/**/*.stories.ts', 'src/**/*.spec.ts'],
15
+ staticImport: true,
16
+ rollupTypes: true,
17
+ // insertTypesEntry: true,
18
+ compilerOptions: {
19
+ declarationMap: true,
20
+ },
21
+ }),
22
+ ],
23
+ resolve: {
24
+ alias: {
25
+ '@': resolve(__dirname, 'src/'),
26
+ },
27
+ },
28
+ build: {
29
+ lib: {
30
+ entry: resolve(__dirname, 'lib/main.ts'),
31
+ name: 'rocket-ui-vue',
32
+ fileName: 'rocket-ui-vue',
33
+ formats: ['es'],
34
+ },
35
+ rollupOptions: {
36
+ external: ['vue'],
37
+ },
38
+ },
39
+ });
@@ -0,0 +1,12 @@
1
+ /// <reference types="vitest" />
2
+
3
+ import { defineConfig } from 'vite';
4
+ import Vue from '@vitejs/plugin-vue';
5
+
6
+ export default defineConfig({
7
+ plugins: [Vue()],
8
+ test: {
9
+ globals: true,
10
+ environment: 'jsdom',
11
+ },
12
+ });