Skip to content

Commit

Permalink
Merge pull request #250 from LUI-UI/fix-ts-export
Browse files Browse the repository at this point in the history
refactor: struct
  • Loading branch information
rhmkstk committed Jan 30, 2024
2 parents 3371e99 + 0678198 commit b50d2bb
Show file tree
Hide file tree
Showing 144 changed files with 9,161 additions and 4,452 deletions.
53 changes: 32 additions & 21 deletions .commitlintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
// 'scope-enum': [
// 2,
// 'always',
// [
// "style", "lint", "review", "uiux", "deps", "build",
// "release", "flags", "logs", "security", "perf",
// "a11y", "i18n", "typos", "literals", "analytics",
// "seo", "linux", "windows", "osx", "android", "ios"
// ],
// ],
'type-enum': [
2,
'always',
[
'wip', 'feat', 'fix', 'config', 'refactor', 'revert',
'chore', 'ci', 'assets', 'test', 'docs', 'init'
],
extends: ['@commitlint/config-conventional'],
rules: {
// 'scope-enum': [
// 2,
// 'always',
// [
// "style", "lint", "review", "uiux", "deps", "build",
// "release", "flags", "logs", "security", "perf",
// "a11y", "i18n", "typos", "literals", "analytics",
// "seo", "linux", "windows", "osx", "android", "ios"
// ],
// ],
'type-enum': [
2,
'always',
[
'wip',
'feat',
'fix',
'config',
'refactor',
'revert',
'chore',
'ci',
'assets',
'test',
'docs',
'init',
'version',
],
},
}
],
},
}
9 changes: 0 additions & 9 deletions .eslintrc

This file was deleted.

8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ body:
attributes:
label: Do you know how to fix the issue
options:
- 'Yes'
- 'No'
- Yes
- No
- type: dropdown
id: participate
attributes:
label: Are you willing to participate in fixing this issue and create a pull request with the fix
options:
- 'Yes'
- 'No'
- Yes
- No
- type: textarea
id: possibleFix
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

**Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?)

**Other information**:
**Other information**:
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ permissions:
on:
pull_request:


jobs:
client-ci:
name: 📚 Main
Expand Down
38 changes: 19 additions & 19 deletions .storybook/global-story-argtypes.ts
Original file line number Diff line number Diff line change
@@ -1,75 +1,75 @@
const descriptions = {
variant: "Controls the component's appearance",
narrowedVariant: "Controls the component's appearance",
variant: 'Controls the component\'s appearance',
narrowedVariant: 'Controls the component\'s appearance',
block: 'Renders a full width component (expands to the width of its parent container)',
color: "Controls the component's color",
color: 'Controls the component\'s color',
text: 'Used to add a text in the component',
rounded: "Controls the rounding of the component's corners",
size: "Controls the component's width, height and inline spacing options",
rounded: 'Controls the rounding of the component\'s corners',
size: 'Controls the component\'s width, height and inline spacing options',
stateIcon:
'Provides a state icon inside the component and is used for validation and error handling',
state:
'Provides a colored border around the component and is used for validation and error handling',
filter: "Controls the tone of the component's color",
filter: 'Controls the tone of the component\'s color',
description: 'Used to add a description to the component',
border: "Controls the component's border"
border: 'Controls the component\'s border',
}

export const variant = {
control: 'select',
options: ['solid', 'outline', 'text', 'link'],
description: descriptions.variant
description: descriptions.variant,
}
export const narrowedVariant = {
control: 'select',
options: ['solid', 'outline'],
description: descriptions.narrowedVariant
description: descriptions.narrowedVariant,
}
export const block = {
control: 'boolean',
options: [true, false],
description: descriptions.block
description: descriptions.block,
}
export const border = {
control: 'boolean',
options: [true, false],
description: descriptions.block
description: descriptions.block,
}
export const color = {
control: 'select',
options: ['primary', 'secondary', 'info', 'success', 'warning', 'danger'],
description: descriptions.color
description: descriptions.color,
}
export const rounded = {
control: 'select',
options: [true, false, 'full'],
description: descriptions.rounded
description: descriptions.rounded,
}
export const size = {
control: 'select',
options: ['xs', 'sm', 'md', 'lg', 'xl'],
description: descriptions.size
description: descriptions.size,
}
export const stateIcon = {
control: 'boolean',
options: [true, false],
description: descriptions.stateIcon
description: descriptions.stateIcon,
}
export const state = {
control: 'select',
options: ['warning', true, false, null],
description: descriptions.state
description: descriptions.state,
}
export const filter = {
control: 'select',
options: ['lighten', 'darken', 'none'],
description: descriptions.filter
description: descriptions.filter,
}
export const description = {
control: 'text',
description: descriptions.description
description: descriptions.description,
}
export const text = {
control: 'text',
description: descriptions.text
description: descriptions.text,
}
20 changes: 10 additions & 10 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@ import type { StorybookConfig } from '@storybook/vue3-vite'
import remarkGfm from 'remark-gfm'

const config: StorybookConfig = {
stories: ['../src/components/**/*.stories.@(js|ts)'],
staticDirs: ['../src'],
stories: ['../packages/vue/src/components/**/*.stories.@(js|ts)'],
staticDirs: ['../packages/vue/src'],
addons: [
{
name: '@storybook/addon-docs',
options: {
mdxPluginOptions: {
mdxCompileOptions: {
remarkPlugins: [remarkGfm]
}
}
}
remarkPlugins: [remarkGfm],
},
},
},
},
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'storybook-darkmode-vue/register'
'storybook-darkmode-vue/register',
],
docs: {
autodocs: true
autodocs: true,
},
framework: {
name: '@storybook/vue3-vite',
options: {}
}
options: {},
},
}

export default config
36 changes: 18 additions & 18 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import colors from 'tailwindcss/colors'
import { addons } from '@storybook/preview-api'
import type { Preview } from '@storybook/vue3'
import DocumentationTemplate from './documentationTemplate.mdx'

const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
Expand All @@ -13,50 +14,50 @@ const preview: Preview = {
values: [
{
name: 'white',
value: '#FFFFFF'
value: '#FFFFFF',
},
{
name: 'black',
value: '#000000'
value: '#000000',
},
{
name: 'dark',
value: colors.gray[800]
value: colors.gray[800],
},
{
name: 'light',
value: colors.gray[100]
value: colors.gray[100],
},
{
name: 'warning',
value: colors.yellow[500]
value: colors.yellow[500],
},
{
name: 'danger',
value: colors.red[500]
value: colors.red[500],
},
{
name: 'primary',
value: colors.blue[500]
value: colors.blue[500],
},
{
name: 'success',
value: colors.green[500]
value: colors.green[500],
},
{
name: 'info',
value: colors.cyan[500]
value: colors.cyan[500],
},
{
name: 'secondary',
value: colors.gray[500]
}
]
value: colors.gray[500],
},
],
},
docs: {
page: DocumentationTemplate
}
}
page: DocumentationTemplate,
},
},
}

export default preview
Expand All @@ -67,9 +68,8 @@ const channel = addons.getChannel()

// switch body class for story along with interface theme
channel.on('STORYBOOK_DARK_MODE_VUE', (isDark) => {
if (isDark) {
if (isDark)
document.body.classList.add('dark')
} else {
else
document.body.classList.remove('dark')
}
})
37 changes: 37 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import antfu from '@antfu/eslint-config'

export default antfu(
{},
{
ignores: [
'dist',
'.github',
'node_modules',
'public',
'coverage',
'storybook-static',
'.nuxt',
'*.md',
'*.d.ts',
'.nx',
'.vitest-cache',
'**/shims-vue.d.ts',
],
},
{
rules: {
'node/prefer-global/process': 'off',
'ts/consistent-type-definitions': 'off',
},
},
{
files: [
'**/*.vue',
],
rules: {
'import/first': 'off',
'import/order': 'off',
'vue/block-tag-newline': 'off',
},
},
)

0 comments on commit b50d2bb

Please sign in to comment.