@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.
- package/.eslintrc.cjs +79 -0
- package/.gitattributes +2 -0
- package/.github/workflows/chromatic.yml +28 -0
- package/.github/workflows/publish-storybook.yml +41 -0
- package/.husky/pre-commit +4 -0
- package/.prettierrc.cjs +10 -0
- package/.storybook/Theme.js +17 -0
- package/.storybook/main.ts +20 -0
- package/.storybook/manager-head.html +3 -0
- package/.storybook/manager.js +8 -0
- package/.storybook/preview-head.html +3 -0
- package/.storybook/preview.ts +36 -0
- package/.storybook/source-panel/manager.js +28 -0
- package/.storybook/withSource.js +91 -0
- package/.vscode/extensions.json +11 -0
- package/.vscode/settings.json +20 -0
- package/index.html +13 -0
- package/lib/main.ts +48 -0
- package/package.json +2 -8
- package/postcss.config.cjs +9 -0
- package/resources/rocket-ui-logo-dark.svg +27 -0
- package/resources/rocket-ui-logo-light.svg +27 -0
- package/shims-rocketui.d.ts +9 -0
- package/src/App.vue +15 -0
- package/src/assets/blank-avatar.svg +3 -0
- package/src/assets/icons/mdi.js +7302 -0
- package/src/assets/logo.svg +1 -0
- package/src/components/Accordion/Accordion.mdx +88 -0
- package/src/components/Accordion/Accordion.stories.ts +257 -0
- package/src/components/Accordion/RAccordion.vue +73 -0
- package/src/components/Accordion/accordion.css +75 -0
- package/src/components/Accordion/accordion.spec.ts +123 -0
- package/src/components/Alert/Alert.mdx +120 -0
- package/src/components/Alert/Alert.stories.ts +118 -0
- package/src/components/Alert/RAlert.vue +119 -0
- package/src/components/Alert/alert.css +136 -0
- package/src/components/Alert/alert.spec.ts +32 -0
- package/src/components/Avatar/Avatar.mdx +96 -0
- package/src/components/Avatar/Avatar.stories.ts +65 -0
- package/src/components/Avatar/RAvatar.vue +115 -0
- package/src/components/Avatar/avatar.css +82 -0
- package/src/components/Avatar/avatar.spec.ts +38 -0
- package/src/components/Badge/Badge.mdx +112 -0
- package/src/components/Badge/Badge.stories.ts +99 -0
- package/src/components/Badge/RBadge.vue +89 -0
- package/src/components/Badge/badge.css +63 -0
- package/src/components/Badge/badge.spec.ts +20 -0
- package/src/components/Box/Box.mdx +20 -0
- package/src/components/Box/Box.stories.ts +56 -0
- package/src/components/Box/RBox.vue +97 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.ts +115 -0
- package/src/components/Breadcrumb/RBreadcrumb.vue +43 -0
- package/src/components/Breadcrumb/breadcrumb.css +29 -0
- package/src/components/Button/Button.mdx +148 -0
- package/src/components/Button/Button.spec.ts +29 -0
- package/src/components/Button/Button.stories.ts +118 -0
- package/src/components/Button/RButton.vue +179 -0
- package/src/components/Button/button.css +146 -0
- package/src/components/Checkbox/Checkbox.mdx +100 -0
- package/src/components/Checkbox/Checkbox.stories.ts +67 -0
- package/src/components/Checkbox/RCheckbox.vue +195 -0
- package/src/components/Checkbox/checkbox.css +67 -0
- package/src/components/Checkbox/checkbox.spec.ts +60 -0
- package/src/components/Chips/Chip.mdx +113 -0
- package/src/components/Chips/Chip.stories.ts +122 -0
- package/src/components/Chips/RChip.vue +125 -0
- package/src/components/Chips/chip.css +62 -0
- package/src/components/Chips/chip.spec.ts +40 -0
- package/src/components/Dropdown/Dropdown.mdx +135 -0
- package/src/components/Dropdown/Dropdown.stories.ts +84 -0
- package/src/components/Dropdown/RDropdown.vue +392 -0
- package/src/components/Dropdown/dropdown.css +113 -0
- package/src/components/Dropdown/dropdown.spec.ts +98 -0
- package/src/components/Flex/Flex.mdx +20 -0
- package/src/components/Flex/Flex.stories.js +127 -0
- package/src/components/Flex/RFlex.vue +91 -0
- package/src/components/Grid/Grid.mdx +20 -0
- package/src/components/Grid/Grid.stories.js +107 -0
- package/src/components/Grid/RGrid.vue +138 -0
- package/src/components/Icon/Icon.mdx +68 -0
- package/src/components/Icon/Icon.stories.ts +33 -0
- package/src/components/Icon/RIcon.vue +56 -0
- package/src/components/Icon/icon.spec.ts +25 -0
- package/src/components/ItemGroup/ItemGroup.stories.ts +91 -0
- package/src/components/ItemGroup/RItem.vue +74 -0
- package/src/components/ItemGroup/RItemGroup.vue +122 -0
- package/src/components/ItemGroup/__snapshots__/itemgroup.spec.ts.snap +13 -0
- package/src/components/ItemGroup/itemgroup.spec.ts +67 -0
- package/src/components/Label/Label.mdx +50 -0
- package/src/components/Label/Label.stories.ts +38 -0
- package/src/components/Label/RLabel.vue +42 -0
- package/src/components/Label/label.css +0 -0
- package/src/components/Modal/Modal.mdx +91 -0
- package/src/components/Modal/Modal.stories.ts +125 -0
- package/src/components/Modal/RModal.vue +130 -0
- package/src/components/Modal/modal.css +41 -0
- package/src/components/Modal/modal.spec.ts +25 -0
- package/src/components/Pagination/Pagination.stories.ts +24 -0
- package/src/components/Pagination/RPagination.vue +103 -0
- package/src/components/Pagination/pagination.css +47 -0
- package/src/components/Pagination/pagination.spec.ts +17 -0
- package/src/components/ProgressBar/ProgressBar.stories.ts +34 -0
- package/src/components/ProgressBar/RProgressBar.vue +21 -0
- package/src/components/ProgressBar/progressbar.css +24 -0
- package/src/components/ProgressBar/progressbar.spec.ts +17 -0
- package/src/components/Shared/Enums.ts +1 -0
- package/src/components/Sidebar/RSidebar.vue +27 -0
- package/src/components/Sidebar/Sidebar.mdx +31 -0
- package/src/components/Sidebar/Sidebar.stories.ts +34 -0
- package/src/components/Sidebar/sidebar.css +18 -0
- package/src/components/Sidebar/sidebar.spec.ts +33 -0
- package/src/components/Snackbar/RSnackbar.vue +136 -0
- package/src/components/Snackbar/Snackbar.mdx +126 -0
- package/src/components/Snackbar/Snackbar.stories.ts +93 -0
- package/src/components/Snackbar/snackbar.css +99 -0
- package/src/components/Snackbar/snackbar.spec.ts +56 -0
- package/src/components/Switch/RSwitch.vue +147 -0
- package/src/components/Switch/Switch.mdx +102 -0
- package/src/components/Switch/Switch.stories.ts +79 -0
- package/src/components/Switch/switch.css +102 -0
- package/src/components/Switch/switch.spec.ts +31 -0
- package/src/components/TabItem/RTabItem.vue +175 -0
- package/src/components/TabItem/TabItem.mdx +95 -0
- package/src/components/TabItem/TabItem.spec.ts +29 -0
- package/src/components/TabItem/TabItem.stories.ts +97 -0
- package/src/components/TabItem/common.ts +6 -0
- package/src/components/TabItem/tab-item.css +29 -0
- package/src/components/Tabs/RTabs.vue +94 -0
- package/src/components/Tabs/Tabs.mdx +78 -0
- package/src/components/Tabs/Tabs.spec.ts +28 -0
- package/src/components/Tabs/Tabs.stories.ts +191 -0
- package/src/components/Tabs/tabs.css +13 -0
- package/src/components/Tabs/types.ts +11 -0
- package/src/components/TextArea/RTextArea.vue +142 -0
- package/src/components/TextArea/TextArea.mdx +108 -0
- package/src/components/TextArea/TextArea.stories.ts +55 -0
- package/src/components/TextArea/textarea.css +51 -0
- package/src/components/TextArea/textarea.spec.ts +36 -0
- package/src/components/Textfield/RTextfield.vue +372 -0
- package/src/components/Textfield/Textfield.mdx +159 -0
- package/src/components/Textfield/Textfield.stories.ts +121 -0
- package/src/components/Textfield/textfield.css +81 -0
- package/src/components/Textfield/textfield.spec.ts +34 -0
- package/src/components/Tooltip/RTooltip.vue +325 -0
- package/src/components/Tooltip/Tooltip.mdx +111 -0
- package/src/components/Tooltip/Tooltip.stories.ts +203 -0
- package/src/components/Tooltip/common.ts +91 -0
- package/src/components/Tooltip/tooltip.css +34 -0
- package/src/components/Tooltip/tooltip.spec.ts +81 -0
- package/src/components/Typography/Typography.mdx +109 -0
- package/src/components/Typography/typography.css +128 -0
- package/src/directives/index.ts +19 -0
- package/src/index.css +241 -0
- package/src/main.ts +5 -0
- package/src/scripts/buildIcons.js +21 -0
- package/src/stories/Colors.mdx +355 -0
- package/src/stories/GettingStarted.mdx +121 -0
- package/src/stories/Layout.mdx +15 -0
- package/tailwind.config.cjs +16 -0
- package/tsconfig.json +24 -0
- package/vite.config.ts +39 -0
- package/vitest.config.ts +12 -0
- package/dist/rocket-ui-vue.js +0 -9381
- package/dist/rocket-ui-vue.umd.cjs +0 -1
- package/dist/style.css +0 -2
- package/dist/types/main.d.ts +0 -25
- /package/{dist → public}/design-tokens.source.json +0 -0
- /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
|
+

|
|
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,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
|
+
});
|
package/vitest.config.ts
ADDED