Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refactor composables #4391

Open
wants to merge 86 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
0e196e6
feat: ts types for colors (#3957) (#4270)
Fsss126 Jun 27, 2024
69e3ab2
feat(sticky-scrollbar): init component (#4286)
m0ksem Jun 27, 2024
de9a907
Color css variables must be rendered on app root element, not body (#…
Fsss126 Jun 27, 2024
4aac12a
feat: remove lodash (#4316)
m0ksem Jun 27, 2024
e91f248
feat: remove colortranslator (#4310)
m0ksem Jun 27, 2024
3d770cd
chore(storybook): fix add text method
m0ksem Jun 27, 2024
0d65f7e
fix(data-table): correct start case
m0ksem Jun 27, 2024
df62c4b
fix(utils/merge): create empty object if object is undefined
m0ksem Jun 27, 2024
999ee9e
fix(resize-observer): correctly normalize observed elements
m0ksem Jun 27, 2024
288c611
fix(VaConfig): correctly copy regex values
m0ksem Jun 27, 2024
cf3d2d1
Added ability to apply multiple presets (#4303)
Fsss126 Jun 27, 2024
30e739e
chore(deps): bump ws from 6.2.2 to 6.2.3 (#4328)
dependabot[bot] Jun 27, 2024
b8eb22d
feat: use custom color names in button
m0ksem Jun 27, 2024
e87e580
feat(icon): icon name extendable type (#4045)
m0ksem Jun 27, 2024
fa49653
feat: masks (#4332)
m0ksem Jul 1, 2024
eaee0ee
docs(sticky-scrollbar): add example with data table
m0ksem Jul 3, 2024
a6a80f0
feat(sticky-headers): init sticky table headers composable
m0ksem Jul 3, 2024
6541335
fix: remove empty changelogs
m0ksem Jul 3, 2024
3d483b6
docs: add changelogs
m0ksem Jul 3, 2024
24b642c
docs: add more changelogs for services
m0ksem Jul 3, 2024
8a2c4bb
fix: improve docs SSR
m0ksem Jul 4, 2024
513af47
fix: render css colors on body root
m0ksem Jul 4, 2024
666dfc6
fix: correctly split numbers in color names
m0ksem Jul 8, 2024
d471eb6
chore: remove cleave (#4334)
m0ksem Jul 8, 2024
c53bce9
Feat/devtools and compiler (#4340)
m0ksem Jul 8, 2024
6d752d9
feat(devtools): improve dx and component tree parsing and docs (#4345)
m0ksem Jul 15, 2024
440da3e
fix(input/stories): correctly handle input query selector
m0ksem Jul 16, 2024
217bbf2
fix(compiler): fix build
m0ksem Jul 16, 2024
900cbfc
chore(compiler): release beta3
m0ksem Jul 16, 2024
fc5a0f1
docs(compiler/css-layers): added css layers docs page
m0ksem Jul 16, 2024
61c1ba5
feat(compiler): add config support
m0ksem Jul 17, 2024
a90bfcb
docs: added compiler/vuestic-config docs
m0ksem Jul 17, 2024
2f170b1
fix(compiler): resolve virtual vuestic-config
m0ksem Jul 17, 2024
28629bf
chore: bump @vuestic/compiler
m0ksem Jul 17, 2024
5541a16
fix(devtools): correct file path for windows
m0ksem Jul 23, 2024
c6c47ed
chore: update yarn.lock
m0ksem Jul 23, 2024
ddb052c
bump(compiler): 0.0.1-beta5
m0ksem Jul 23, 2024
91127bc
fix(masks): correctly handle months (feb) (#4347)
m0ksem Jul 29, 2024
573a927
fix(VaColorInput): added full length color input (#4348)
ahmadJT Aug 6, 2024
9a0f6fc
fix(input): correct placeholder color for textarea
m0ksem Aug 6, 2024
0660438
docs: correct components config code examples
m0ksem Aug 6, 2024
c6b0b3c
chore: improve select breaking layout
m0ksem Aug 6, 2024
8d7bf76
fix(badge): center content by default
m0ksem Aug 6, 2024
f390a98
chore: indicate compatibility with new v4 major (#4323)
danielroe Aug 19, 2024
653cecd
fix: augment `vue` rather than `@vue/runtime-core` (#4354)
danielroe Aug 19, 2024
48a4e6b
chore: improve select option render time (#4355)
padinko Aug 19, 2024
6882d6d
chore(deps): bump @nuxt/devtools from 1.1.5 to 1.3.9 (#4350)
dependabot[bot] Aug 19, 2024
f0f84d1
fix(nuxt): store config in runtime config for plugin instead of JSON
m0ksem Aug 19, 2024
086787a
chore(nuxt): bump 1.0.21
m0ksem Aug 19, 2024
eb93b68
Add Support & Consulting page to docs (#4359)
raichev-dima Aug 21, 2024
5241e0f
Update the "Support & Consulting" page links (#4360)
raichev-dima Aug 22, 2024
d23e8a9
Update readme with "Support & Consulting" page info (#4362)
raichev-dima Aug 22, 2024
0a30532
minor
asvae Aug 23, 2024
9d2b125
chore: rename inconsistent mask names
m0ksem Aug 25, 2024
b7983ed
chore(docs): reorder sidebar items
m0ksem Aug 25, 2024
ab414f9
feat(sticky-scroll): add offset prop
m0ksem Aug 25, 2024
8794018
chore(deps): bump nuxt from 3.11.1 to 3.12.4 (#4349)
dependabot[bot] Aug 26, 2024
c1eb7f8
feat(devtools): init layout editor (#4363)
m0ksem Aug 26, 2024
682fc16
chore(compiler): disabled devtools by default and turn on config
m0ksem Aug 26, 2024
cee8f9d
chore: use docker compose instead of deprecated docker-compose
m0ksem Aug 26, 2024
61f9657
chore: bump version to v1.10.0
m0ksem Aug 26, 2024
3d07e7c
chore: add Netlify link to README.md (#4365)
raichev-dima Aug 28, 2024
435c85e
chore(compiler): bump 0.1.0
m0ksem Aug 26, 2024
3f35953
Basic set up for Netlify (#4368)
raichev-dima Aug 29, 2024
a003dfc
chore: set up Netlify config for the monorepo (#4369)
raichev-dima Sep 2, 2024
56efd30
fix: enable the build information under Netlify environment
raichev-dima Sep 5, 2024
66709a0
fix(tree-view): react on expanded prop for nested children
m0ksem Sep 10, 2024
b11491d
fix(#4346): throw warn and error if observable target is not element
m0ksem Sep 11, 2024
15c6691
feat(toast#4373): add bottom-center and top-center positions
m0ksem Sep 11, 2024
3f1a17a
Fix#4374/allow-more-types-for-select-clear-value (#4375)
m0ksem Sep 11, 2024
ff822e7
feat(input): add native autocomplete attribute support (#4370)
padinko Sep 13, 2024
4f00151
chore: bump version to v1.10.1
m0ksem Sep 13, 2024
280534b
fix(useForm): remove extra computed from formData
m0ksem Sep 23, 2024
5b53670
feat(VaToast #4373): add bottom-center, top-center position options (…
tom00502 Sep 23, 2024
cdf8654
fix: create-vuestic crossplatform paths (#4379)
shpingalet007 Sep 23, 2024
db2644d
chore: bump version to v1.10.2
m0ksem Sep 24, 2024
f3191f7
chore: remove unused and duplicated composables
m0ksem Oct 8, 2024
04aeaba
chore: move some composables to std
m0ksem Oct 10, 2024
06ab2ff
chore: update useChildComponents
m0ksem Oct 11, 2024
f592bd7
fix: broken story
m0ksem Oct 11, 2024
284c4a2
chore: remove useFocus
m0ksem Oct 12, 2024
c95c71b
feat: create useFormControl
m0ksem Oct 22, 2024
5832fad
fix: useClientOnly
m0ksem Oct 22, 2024
bcaea05
chore: remove useSyncProp
m0ksem Oct 22, 2024
38de278
chore: move useFocusable composable to std
m0ksem Oct 22, 2024
ed9cae8
chore: move useFocusOutside to std
m0ksem Oct 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ assignees: ''

---

**Vuestic-ui version:** 1.9.12
**Vuestic-ui version:** 1.10.2

### Description

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ yarn-error.log*
*.njsproj
*.sln
*.sw?

# Local Netlify folder
.netlify
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.20.2
v18.20.2
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ Documentation, guides, examples and tutorials are available on [ui.vuestic.dev](

<br />

<a href="https://www.netlify.com"> <img src="https://www.netlify.com/v3/img/components/netlify-light.svg" alt="Deploys by Netlify" /> </a>

Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test using all possible browsers.

Thanks to [Chromatic](https://www.chromatic.com/) for providing the visual testing platform that helps us review UI changes and prevent visual regressions.
Expand Down Expand Up @@ -107,7 +109,12 @@ Say hi: <a href="mailto:[email protected]">[email protected]</a>. We will be happy

[Other work](https://epicmax.co) we’ve done 🤘

[Meet the Team](https://vuestic.dev/team)
[Meet the Team](https://ui.vuestic.dev/introduction/team)

### Premium Support and Consulting
Get Premium Support & Consulting services through our official development partner, Epicmax. As the main contributor to Vuestic UI and Vuestic Admin, Epicmax brings a wealth of expertise and experience to help you achieve your project goals efficiently and effectively.

[Get a quote](https://www.epicmax.co/?ref=vuestic-consulting)

### Follow us

Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@
},
"resolutions": {
"vue": "^3.4.21",
"@vue/shared": "^3.4.21",
"@vue/compiler-sfc": "^3.4.21",
"@vue/runtime-core": "^3.4.21",
"@vue/runtime-dom": "^3.4.21",
"@vue/reactivity": "^3.4.21",
"@vue/server-renderer": "^3.4.21",
"@vue/compiler-dom": "^3.4.21"
"@vue/shared": "3.4.21",
"@vue/compiler-sfc": "3.4.21",
"@vue/compiler-core": "3.4.21",
"@vue/runtime-core": "3.4.21",
"@vue/runtime-dom": "3.4.21",
"@vue/reactivity": "3.4.21",
"@vue/server-renderer": "3.4.21",
"@vue/compiler-dom": "3.4.21"
}
}
24 changes: 12 additions & 12 deletions packages/bundlers-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
"private": true,
"version": "0.0.0",
"scripts": {
"build:local-packages-18": "docker image prune -f && docker container prune -f && docker-compose --profile local-packages-18 build --no-cache",
"build:local-packages-lts": "docker image prune -f && docker container prune -f && docker-compose --profile local-packages-lts build --no-cache",
"build:local-packages-18": "docker image prune -f && docker container prune -f && docker compose --profile local-packages-18 build --no-cache",
"build:local-packages-lts": "docker image prune -f && docker container prune -f && docker compose --profile local-packages-lts build --no-cache",
"build:test-page": "tsx ./kitchensink-builder/create-test-page.ts",
"run:vite": "docker-compose --profile run-vite up",
"run:webpack": "docker-compose --profile run-webpack up",
"run:nuxt-ssr": "docker-compose --profile nuxt-ssr up",
"run:nuxt-spa": "docker-compose --profile nuxt-spa up",
"test:vite": "docker-compose --profile vite up --build --exit-code-from cypress_vite",
"test:vite-cjs": "docker-compose --profile vite-cjs up --build --exit-code-from cypress_vite_cjs",
"test:cli": "docker-compose --profile cli up --build --exit-code-from cypress_cli",
"run:vite": "docker compose --profile run-vite up",
"run:webpack": "docker compose --profile run-webpack up",
"run:nuxt-ssr": "docker compose --profile nuxt-ssr up",
"run:nuxt-spa": "docker compose --profile nuxt-spa up",
"test:vite": "docker compose --profile vite up --build --exit-code-from cypress_vite",
"test:vite-cjs": "docker compose --profile vite-cjs up --build --exit-code-from cypress_vite_cjs",
"test:cli": "docker compose --profile cli up --build --exit-code-from cypress_cli",
"test:nuxt": "yarn test:nuxt-ssr",
"test:webpack": "docker-compose --profile webpack up --build --exit-code-from cypress_webpack",
"test:nuxt-ssr": "docker-compose --profile nuxt-ssr up --build --exit-code-from cypress_nuxt_ssr",
"test:nuxt-spa": "docker-compose --profile nuxt-spa up --build --exit-code-from cypress_nuxt_spa",
"test:webpack": "docker compose --profile webpack up --build --exit-code-from cypress_webpack",
"test:nuxt-ssr": "docker compose --profile nuxt-ssr up --build --exit-code-from cypress_nuxt_ssr",
"test:nuxt-spa": "docker compose --profile nuxt-spa up --build --exit-code-from cypress_nuxt_spa",
"test": "yarn build:test-page && yarn build:local-packages-18 && yarn build:local-packages-lts && yarn test:nuxt && yarn test:vite && yarn test:18",
"test:18": "yarn build:local-packages-18 && yarn test:vite"
}
Expand Down
59 changes: 59 additions & 0 deletions packages/compiler/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Vuestic Plugin

Combination of bundling tools focusing on improving development experience when working with Vuestic UI

## Installation

1. Install package

```bash
npm i @vuestic/compiler@latest
```

2. Add `vuestic` plugin to vite config.

`vite.config.ts` or `vite.config.js`
```js
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { vuestic } from '@vuestic/compiler/vite'

export default defineConfig({
plugins: [
vuestic(),
vue(),
],
})
```

> Make sure to register vuestic plugin before `vue`

## List of features

### Devtools

Devtools designed for intuitive visual control over application with Vuestic components

#### Usages

Run vite project in dev mode
Press ALT/Option + F12 in browser

#### Plans

- [x] Edit component props
- [x] Edit component slot content
- [] Add new slots
- [] Add new components
- [] Control layout
- [] Add event listeners

### CSS layers

Build plugin that allows controlling CSS order

### Typescript auto-completion from config

UNDER DEVELOPMENT

Adds TS global types for colors, icons, etc.
1 change: 1 addition & 0 deletions packages/compiler/css-layers/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { cssLayers } from './plugin'
29 changes: 29 additions & 0 deletions packages/compiler/css-layers/plugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Plugin } from 'vite'
import MagicString from 'magic-string'

const addLayer = (ms: MagicString, layer: string) => {
ms.prepend(`@layer ${layer} {\n`)
ms.append(`\n}`)
return {
code: ms.toString(),
map: ms.generateMap()
}
}

/** Add css layers to Vuestic files */
export const cssLayers: Plugin = {
name: 'vuestic:css-layer',

transform(code, id) {
// Only transform CSS files
if (!id.endsWith('.css')) return null

if (id.includes('vuestic-ui/dist/styles/')) {
return addLayer(new MagicString(code), 'vuestic.styles')
}

if (id.includes('vuestic-ui/dist/es/')) {
return addLayer(new MagicString(code), 'vuestic.components')
}
}
}
5 changes: 5 additions & 0 deletions packages/compiler/devtools/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Vuestic Devtools

Client - UI for devtools, injected to user code in DEV mode only providing utilities to work visually with Vuestic components
Server - used to update user's file trough client
Plugin - adds vuestic devtools vue plugin to dev bundle and run server
36 changes: 36 additions & 0 deletions packages/compiler/devtools/client/build/append-style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { Plugin } from "vite";
import { writeFile, readFile } from 'fs/promises'
import { resolve } from 'path'

const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms))

export const appendStyle = (outFile: string): Plugin => {
let outDir = ''

const onBundleClose = async () => {
await sleep(1000)
const filePath = resolve(`${outDir}/${outFile}`)
const fileContent = (await readFile(filePath, 'utf8')).toString()

const stylePath = `./style.css`
const styleImport = `import './${stylePath}'`

if (!fileContent.includes(styleImport)) {
await writeFile(filePath, `${styleImport}\n${fileContent}`)
}
}

return {
name: 'vuestic:append-style',

enforce: 'post',

configResolved(config) {
outDir = config.build.outDir
},

async closeBundle() {
onBundleClose()
}
}
}
1 change: 1 addition & 0 deletions packages/compiler/devtools/client/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
1 change: 1 addition & 0 deletions packages/compiler/devtools/client/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { createVuesticDevtools } from './ui'
Loading