diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 206cd8f8a..0ccbe9826 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -40,12 +40,15 @@ jobs: cache: yarn # or pnpm / yarn - name: Setup Pages uses: actions/configure-pages@v3 - - name: Install dependencies - run: yarn install # or pnpm install / yarn install / bun install + # - name: Install dependencies + # run: yarn install # or pnpm install / yarn install / bun install - name: Build with VitePress run: | - yarn docs:build - touch docs/.vitepress/dist/.nojekyll + # npm install -g pnpm + cd docs + yarn install + yarn build + touch .vitepress/dist/.nojekyll - name: Upload artifact uses: actions/upload-pages-artifact@v2 with: diff --git a/.storybook/main.js b/.storybook/main.js index 4a8df7d8a..69be25cdc 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -19,9 +19,20 @@ module.exports = { options: {} }, + // viteFinal: (config) => { + // return mergeConfig(config, { + // plugins: [ + // vuePlugin({ + // script: { + // defineModel: true, + // propsDestructure: true, + // }, + // }), + // ] + // }); + // }, features: { storyStoreV7: true, - legacyMdx1: true, // 👈 Enables MDX v1 support }, docs: { diff --git a/.storybook/preview.js b/.storybook/preview.js index 6ccddbb6f..ee83e4835 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -1,6 +1,19 @@ +import {createMemoryHistory, createRouter} from 'vue-router'; import '../packages/tailwind-config/tailwind.css'; import '../packages/themes/src/morpheme/main.scss'; import '../packages/themes/src/morpheme/main.dark.scss'; +import { setup } from '@storybook/vue3' +import {FloatingVuePlugin} from '../packages/tooltip/src/floating-vue' + +const router = createRouter({ + history: createMemoryHistory(), + routes: [], +}); + +setup((app) => { + app.use(router) + app.use(FloatingVuePlugin); +}); export const parameters = { actions: { argTypesRegex: '^on[A-Z].*' }, @@ -17,4 +30,4 @@ export const parameters = { // locales: '', }, }, -}; +}; \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b5abdcc3e..6f6c37382 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,55 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.0.0-rc.3](https://github.com/gitsindonesia/ui-component/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2023-10-27) + + +### Bug Fixes + +* change default `noDataText` value ([13c9abb](https://github.com/gitsindonesia/ui-component/commit/13c9abb767a3b4446cfa404e6da14ae7e374de96)) +* **DataTable:** fix hover+striped dark mode ([4501e0b](https://github.com/gitsindonesia/ui-component/commit/4501e0b5ff6f0ddeb5c1295b378fbd3926ad8311)) +* **nuxt:** change DevTools icon ([eb1cdf3](https://github.com/gitsindonesia/ui-component/commit/eb1cdf35f36c58cddcabf2473fd82d9a0ca50402)) +* **Tabs:** fix import type ([c33a674](https://github.com/gitsindonesia/ui-component/commit/c33a6747f36eb7d505a4c7bde8ea92b879637836)) +* **Themes:** fix duplicate `display` ([97679cc](https://github.com/gitsindonesia/ui-component/commit/97679ccb123da46ac569a8bdde34f0ce0dbcbd02)) +* **ui:** register `VAvatarGroup` ([3399090](https://github.com/gitsindonesia/ui-component/commit/3399090ad1d8f6437139f55b8707c23997bd2ead)) + + +### Features + +* add custom floating-vue tooltip plugin ([1dc3c77](https://github.com/gitsindonesia/ui-component/commit/1dc3c77af3b160e40f76330d51ba64ec7ed158a1)) +* add new props: `rowClass` and `itemClass` ([46376e9](https://github.com/gitsindonesia/ui-component/commit/46376e92800a34dcac1a1ea05f561e860cc50a8e)) +* add new slots: `header`, `body` and `item` ([71acca3](https://github.com/gitsindonesia/ui-component/commit/71acca3a580af90c229713d237115b115a3bf08a)) +* add row color variants ([6a8072c](https://github.com/gitsindonesia/ui-component/commit/6a8072c2a44cb1477ba70d4453b34f832591dc8c)) +* **Editor:** upgrade CKEditor ([99123a3](https://github.com/gitsindonesia/ui-component/commit/99123a35970a702d1ded2fa9598851bd5352f72a)) +* **experimental/primitives/accordion:** add accordion animation ([481f4de](https://github.com/gitsindonesia/ui-component/commit/481f4ded2897c974ce335c1ee9434e00aac22f8b)) +* **experimental/primitives/accordion:** apply aria and data attributes ([29b3838](https://github.com/gitsindonesia/ui-component/commit/29b3838592ae7ba3cbe41f67a8ff8f38cc0e17ad)) +* **experimental/primitives/accordion:** implement default open ([f930812](https://github.com/gitsindonesia/ui-component/commit/f930812ab48911b825f8bae19f7a97a56f21e5f6)) +* **experimental/primitives/alert:** add support for renderless component ([fb5c2ab](https://github.com/gitsindonesia/ui-component/commit/fb5c2ab750e9fe7791ae3717e3c8a9e5d6d4c01b)) +* **experimental/primitives/collapsible:** add collapse transition ([25bfc1e](https://github.com/gitsindonesia/ui-component/commit/25bfc1ede4d0d7c3d4111660cc65d9e212311c4f)) +* **experimental/primitives/menu:** hide dropdown when clicking outside ([9131f1e](https://github.com/gitsindonesia/ui-component/commit/9131f1ebe48dfeb0e97b21efa10f01a6f77d810c)) +* **experimental/primitives/switch:** add hidden input, switch thumb & remove switch group ([3f27736](https://github.com/gitsindonesia/ui-component/commit/3f27736634502fe41434b3a8b9a40a3a049700d8)) +* **experimental/primitives:** accordion primitives ([6d22d4b](https://github.com/gitsindonesia/ui-component/commit/6d22d4b40ee1cc7ca7f8cb65679fab296b739389)) +* **experimental/primitives:** add alert primitive component ([03855b8](https://github.com/gitsindonesia/ui-component/commit/03855b8572dac485c4eb09b53ad5274acd71c7ef)) +* **experimental/primitives:** collapsible component ([fc63592](https://github.com/gitsindonesia/ui-component/commit/fc63592f1213e00f0d5c8a35e867181486594c12)) +* **experimental/primitives:** dialog primitives ([d3fe469](https://github.com/gitsindonesia/ui-component/commit/d3fe46903efbf4e45a3753f3b150623ae4ef7063)) +* **experimental/primitives:** improve accordion logic ([9625886](https://github.com/gitsindonesia/ui-component/commit/9625886b58f2a6fc7f2043be5dc91987e2eed9d2)) +* **experimental/primitives:** menu (dropdown) primitives ([7e93678](https://github.com/gitsindonesia/ui-component/commit/7e93678052c0172c1d444328496adfce1515a937)) +* **experimental/primitives:** switch primitives ([f6f3182](https://github.com/gitsindonesia/ui-component/commit/f6f31820c5a1f681ad79326f217fa8e980908e85)) +* **Nuxt:** upgrade to Nuxt 3.8 ([296c6e7](https://github.com/gitsindonesia/ui-component/commit/296c6e7e487e609cd7467ad2082baeeb6bc07a57)) +* **Select:** alias `Select` as `SelectMenu` ([e2c5dd0](https://github.com/gitsindonesia/ui-component/commit/e2c5dd0d96eddc85e3dc62a892656c0207ec6086)) +* **SelectMenu:** implement generic type and dynamic `ModelValue` types ([43aebe4](https://github.com/gitsindonesia/ui-component/commit/43aebe4d55940bd9f1c45ac4050b24537eb88ccf)) +* **starter:** add new Astro starter ([208f55c](https://github.com/gitsindonesia/ui-component/commit/208f55c926c75bb241413e0d4b74169bb30040a2)) +* **ui:** add custom Floating Vue plugin for tooltip ([870994d](https://github.com/gitsindonesia/ui-component/commit/870994d253da8de0e169c93fd4142dccac8712cc)) + + +### Reverts + +* Revert "Revert "Merge branches 'main' and 'main' of github.com:gitsindonesia/ui-component" ([1927a7c](https://github.com/gitsindonesia/ui-component/commit/1927a7cf7703c2d36cc17ebbe7a04cf5a67cf556)) + + + + + # [1.0.0-rc.2](https://github.com/gitsindonesia/ui-component/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2023-10-02) diff --git a/README.md b/README.md index 8eb96f3e9..8b85e075e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Morpheme UI ![npm](https://img.shields.io/npm/v/@morpheme/ui) -![npm](https://img.shields.io/npm/dw/@morpheme/ui) +![npm](https://img.shields.io/npm/dm/@morpheme/ui) [![Coverage](https://sonar.gits.id/api/project_badges/measure?project=gits-ui&metric=coverage&token=4eb076c49cd76f7e9ec5834aae3c1eee57160330)](https://sonar.gits.id/dashboard?id=gits-ui) [![Quality Gate Status](https://sonar.gits.id/api/project_badges/measure?project=gits-ui&metric=alert_status&token=4eb076c49cd76f7e9ec5834aae3c1eee57160330)](https://sonar.gits.id/dashboard?id=gits-ui) @@ -30,17 +30,17 @@ Detailed documentation can be found [here](https://gitsindonesia.github.io/ui-co Checkout starter of Morpheme UI in the [starter](/starter/) directory. -### [Vue 3](/starter/vue/) +### [Nuxt 3 + Minimal Starter](/starter/nuxt-minimal/) -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/gitsindonesia/ui-component/tree/main/starter/vue) +[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/fork/github/gitsindonesia/ui-component/tree/main/starter/nuxt-minimal) -### [Nuxt 3 + Minimal Starter](/starter/nuxt-minimal/) +### [Nuxt 3 + App Starter](https://github.com/gitsindonesia/nuxt-starter) -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/gitsindonesia/ui-component/tree/main/starter/nuxt-minimal) +[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/fork/github/gitsindonesia/nuxt-starter) -### Nuxt 3 + Complete Starter +### [Vue 3](/starter/vue/) -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/gitsindonesia/nuxt-starter) +[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/gitsindonesia/ui-component/tree/main/starter/vue) ## Development @@ -69,13 +69,15 @@ To set up Morpheme UI for development: To run the documentation locally: ``` -yarn docs:dev +cd docs +yarn dev ``` To build the documentation for production: ``` -yarn docs:build +cd docs +yarn build ``` ## License diff --git a/docs/.npmrc b/docs/.npmrc new file mode 100644 index 000000000..7afe320ff --- /dev/null +++ b/docs/.npmrc @@ -0,0 +1,3 @@ +message="chore(release): %s :tada:" +shamefully-hoist=true +strict-peer-dependencies=false diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index 867ef6fd2..a022f7cac 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -1,9 +1,9 @@ -import { defineConfig } from 'vitepress'; +import {defineConfig} from 'vitepress'; export default defineConfig({ - title: 'Morpheme UI', + title: 'Morpheme', description: - 'A free and open-source Vue UI Library based on Morpheme Design System', + 'Morpheme UI is a free and open-source Vue UI Library based on Morpheme Design System', ignoreDeadLinks: true, // base: '/ui-component/', base: '/', @@ -13,9 +13,9 @@ export default defineConfig({ }, logo: '/morpheme-logo.png', nav: [ - { text: 'Guide', link: '/guide/getting-started' }, - { text: 'Playground', link: '/playground' }, - { text: 'Storybook', link: 'https://gits-ui.web.app' }, + {text: 'Guide', link: '/guide/getting-started'}, + {text: 'Primitives', link: '/primitives/'}, + {text: 'Storybook', link: 'https://gits-ui.web.app'}, // { // text: 'Ecosystem', // items: [ @@ -30,66 +30,66 @@ export default defineConfig({ text: 'Getting Started', collapsed: false, items: [ - { text: 'Introduction', link: '/guide/introduction' }, - { text: 'Quick Start', link: '/guide/getting-started' }, - { text: 'Installation', link: '/guide/installation' }, - { text: 'Vue Usage', link: '/guide/vue' }, - { text: 'Nuxt Usage', link: '/guide/nuxt' }, - { text: 'Starter', link: '/guide/starter' }, + {text: 'Introduction', link: '/guide/introduction'}, + {text: 'Quick Start', link: '/guide/getting-started'}, + {text: 'Installation', link: '/guide/installation'}, + {text: 'Vue Usage', link: '/guide/vue'}, + {text: 'Nuxt Usage', link: '/guide/nuxt'}, + {text: 'Starter', link: '/guide/starter'}, ], }, { text: 'Releases', collapsed: false, items: [ - { text: 'Migration', link: '/guide/migration' }, - { text: 'Changelog', link: '/guide/changelog' }, - { text: 'Roadmap', link: '/roadmap' }, + {text: 'Migration', link: '/guide/migration'}, + {text: 'Changelog', link: '/guide/changelog'}, + {text: 'Roadmap', link: '/roadmap'}, ], }, { text: 'Customization', collapsed: false, items: [ - { text: 'Themes', link: '/guide/themes' }, - { text: 'Default Theme', link: '/guide/theme' }, - { text: 'Dark Mode', link: '/guide/dark-mode' }, - { text: 'Customization', link: '/guide/customization' }, + {text: 'Themes', link: '/guide/themes'}, + {text: 'Default Theme', link: '/guide/theme'}, + {text: 'Dark Mode', link: '/guide/dark-mode'}, + {text: 'Customization', link: '/guide/customization'}, ], }, { text: 'Tools', collapsed: false, - items: [{ text: 'CLI', link: '/tools/cli' }], + items: [{text: 'CLI', link: '/tools/cli'}], }, { text: 'Templates', collapsed: false, items: [ - { text: 'nuxt-auth', link: '/templates/nuxt-auth' }, - { text: 'nuxt-admin', link: '/templates/nuxt-admin' }, + {text: 'nuxt-auth', link: '/templates/nuxt-auth'}, + {text: 'nuxt-admin', link: '/templates/nuxt-admin'}, ], }, { text: 'Components', collapsed: false, items: [ - { text: 'Alert', link: '/components/alert' }, - { text: 'AppBar', link: '/components/app-bar' }, - { text: 'AppShell', link: '/components/app-shell' }, - { text: 'Autocomplete', link: '/components/autocomplete' }, - { text: 'Avatar', link: '/components/avatar' }, - { text: 'Badge', link: '/components/badge' }, - { text: 'Banner', link: '/components/banner' }, - { text: 'BottomNavigation', link: '/components/bottom-navigation' }, - { text: 'BottomSheet', link: '/components/bottom-sheet' }, - { text: 'Breadcrumbs', link: '/components/breadcrumbs' }, - { text: 'Card', link: '/components/card' }, - { text: 'Collapse', link: '/components/collapse' }, - { text: 'Collapsible', link: '/components/collapsible' }, - { text: 'Command', link: '/components/command' }, - { text: 'Container', link: '/components/container' }, - { text: 'DataTable', link: '/components/data-table' }, + {text: 'Alert', link: '/components/alert'}, + {text: 'AppBar', link: '/components/app-bar'}, + {text: 'AppShell', link: '/components/app-shell'}, + {text: 'Autocomplete', link: '/components/autocomplete'}, + {text: 'Avatar', link: '/components/avatar'}, + {text: 'Badge', link: '/components/badge'}, + {text: 'Banner', link: '/components/banner'}, + {text: 'BottomNavigation', link: '/components/bottom-navigation'}, + {text: 'BottomSheet', link: '/components/bottom-sheet'}, + {text: 'Breadcrumbs', link: '/components/breadcrumbs'}, + {text: 'Card', link: '/components/card'}, + {text: 'Collapse', link: '/components/collapse'}, + {text: 'Collapsible', link: '/components/collapsible'}, + {text: 'Command', link: '/components/command'}, + {text: 'Container', link: '/components/container'}, + {text: 'DataTable', link: '/components/data-table'}, { text: 'DataTablePagination', link: '/components/data-table-pagination', @@ -248,10 +248,58 @@ export default defineConfig({ text: 'TextArea', link: '/components/textarea', }, + ], + }, + { + text: 'Standalone Forms', + collapsed: false, + items: [ { - text: 'Standalone Components', + text: 'Introduction', link: '/components/standalone-form-components', }, + { + text: 'Checkbox', + link: '/forms/checkbox', + }, + { + text: 'FileInput', + link: '/forms/file-input', + }, + { + text: 'Input', + link: '/forms/input', + }, + { + text: 'Radio', + link: '/forms/radio', + }, + { + text: 'Select', + link: '/forms/select', + }, + { + text: 'Switch', + link: '/forms/switch', + }, + { + text: 'Textarea', + link: '/forms/textarea', + }, + ], + }, + { + text: 'Experimental', + collapsed: false, + items: [ + { + text: 'Select', + link: '/experimental/select', + }, + { + text: 'Autocomplete', + link: '/experimental/autocomplete', + }, ], }, { @@ -270,7 +318,7 @@ export default defineConfig({ }, ], socialLinks: [ - { icon: 'github', link: 'https://github.com/gitsindonesia/ui-component' }, + {icon: 'github', link: 'https://github.com/gitsindonesia/ui-component'}, ], }, }); diff --git a/docs/.vitepress/theme/components/LivePreview.vue b/docs/.vitepress/theme/components/LivePreview.vue index 367587c3c..1f3385648 100644 --- a/docs/.vitepress/theme/components/LivePreview.vue +++ b/docs/.vitepress/theme/components/LivePreview.vue @@ -7,7 +7,9 @@ const props = withDefaults( src: string; width?: string | number; height?: string | number; - withCode?: boolean; + hideCode?: boolean; + hideNav?: boolean; + hideStorybookLink?: boolean; }>(), { height: 400, @@ -18,13 +20,22 @@ const source = computed(() => { return `https://gits-ui.web.app/iframe.html?args=&id=${props.src}&viewMode=story`; }); +const storyLink = computed(() => { + return `https://gits-ui.web.app/?path=/story/${props.src}`; +}); + const tabs = ref(['preview', 'code']); const selectedTab = ref('preview'); diff --git a/docs/.vitepress/theme/index.js b/docs/.vitepress/theme/index.js index a4ab31b49..bf4e4dd15 100644 --- a/docs/.vitepress/theme/index.js +++ b/docs/.vitepress/theme/index.js @@ -1,13 +1,23 @@ // .vitepress/theme/index.js import DefaultTheme from 'vitepress/theme'; import './theme.css'; +import './tailwind.css'; import VueGtag from "vue-gtag"; import LivePreview from './components/LivePreview.vue'; import StackblitzEmbed from './components/StackblitzEmbed.vue'; +import Morpheme from '@morpheme/ui' +import '@morpheme/themes/dist/morpheme/main.css' +import '@morpheme/themes/dist/morpheme/main.dark.css' +import MorphemeShowcase from './components/MorphemeShowcase.vue'; export default { ...DefaultTheme, - enhanceApp({ app, router }) { + enhanceApp({ app }) { + // use Morpheme UI + app.use(Morpheme) + + // custom components + app.component('MorphemeShowcase', MorphemeShowcase); app.component('LivePreview', LivePreview); app.component('StackblitzEmbed', StackblitzEmbed); diff --git a/docs/.vitepress/theme/tailwind.css b/docs/.vitepress/theme/tailwind.css new file mode 100644 index 000000000..b5c61c956 --- /dev/null +++ b/docs/.vitepress/theme/tailwind.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/docs/components/button.md b/docs/components/button.md index 27f063c30..b749428b4 100644 --- a/docs/components/button.md +++ b/docs/components/button.md @@ -80,6 +80,26 @@ Use `text` prop to apply text style. +### Soft + +Use `soft` prop to apply soft style. + + + +```vue + +``` + + + ### Flush - **Prop**: `flush` diff --git a/docs/components/data-table.md b/docs/components/data-table.md index 371014381..388fc6239 100644 --- a/docs/components/data-table.md +++ b/docs/components/data-table.md @@ -501,48 +501,48 @@ const search = ref(''); ## Props -| Name | Type | Default | -| --------------------------------------------- | --------------------------------------- | ------------------------ | -| [`modelValue`](#modelValue) | `Array` | `[]` | -| [`value`](#value) | `Array` | `[]` | -| [`headers`](#headers) | `Array as PropType` | `[]` | -| [`items`](#items) | `Array as PropType` | `[]` | -| [`itemsPerPage`](#itemsPerPage) | `Number` | `10` | -| [`disableSorting`](#disableSorting) | `Boolean` | `false` | -| [`pagination`](#pagination) | `Object` | `{}` | -| [`loading`](#loading) | `Boolean` | `false` | -| [`search`](#search) | `String` | `''` | -| [`searchBy`](#searchBy) | `[String, Array] as PropType` | `string[]` | -| [`loadingText`](#loadingText) | `String` | `'Loading...'` | -| [`noDataText`](#noDataText) | `String` | `'Data tidak ditemukan'` | -| [`footerColor`](#footerColor) | `String` | `''` | -| [`serverSide`](#serverSide) | `Boolean` | `false` | -| [`sortBy`](#sortBy) | `String` | `''` | -| [`sortDirection`](#sortDirection) | `String as PropType` | `''` | -| [`hover`](#hover) | `Boolean` | `false` | -| [`striped`](#striped) | `Boolean` | `false` | -| [`dense`](#dense) | `Boolean` | `false` | -| [`hideFooter`](#hideFooter) | `Boolean` | `false` | -| [`totalItems`](#totalItems) | `Number` | `0` | -| [`page`](#page) | `Number` | `1` | -| [`mustSort`](#mustSort) | `Boolean` | `false` | -| [`multiSort`](#multiSort) | `Boolean` | `false` | -| [`noShadow`](#noShadow) | `Boolean` | `false` | -| [`selectable`](#selectable) | `Boolean` | `false` | -| [`headerClass`](#headerClass) | `String` | `''` | -| [`bodyClass`](#bodyClass) | `String` | `''` | -| [`footerClass`](#footerClass) | `String` | `''` | -| [`columnActiveClass`](#columnActiveClass) | `String` | `''` | -| [`columnInactiveClass`](#columnInactiveClass) | `String` | `''` | -| [`hoverClass`](#hoverClass) | `String` | `''` | -| [`stripedClass`](#stripedClass) | `String` | `''` | -| [`tdClass`](#tdClass) | `String` | `''` | -| [`trClass`](#trClass) | `String` | `''` | -| [`wrapperClass`](#wrapperClass) | `String` | `''` | -| [`flat`](#flat) | `Boolean` | `false` | -| [`roundedClass`](#roundedClass) | `String` | `''` | -| [`bordered`](#bordered) | `Boolean` | `false` | -| [`tile`](#tile) | `Boolean` | `false` | +| Name | Type | Default | +| --------------------------------------------- | --------------------------------------- | -------------- | +| [`bodyClass`](#bodyClass) | `String` | `''` | +| [`bordered`](#bordered) | `Boolean` | `false` | +| [`columnActiveClass`](#columnActiveClass) | `String` | `''` | +| [`columnInactiveClass`](#columnInactiveClass) | `String` | `''` | +| [`dense`](#dense) | `Boolean` | `false` | +| [`disableSorting`](#disableSorting) | `Boolean` | `false` | +| [`flat`](#flat) | `Boolean` | `false` | +| [`footerClass`](#footerClass) | `String` | `''` | +| [`footerColor`](#footerColor) | `String` | `''` | +| [`headerClass`](#headerClass) | `String` | `''` | +| [`headers`](#headers) | `Array as PropType` | `[]` | +| [`hideFooter`](#hideFooter) | `Boolean` | `false` | +| [`hover`](#hover) | `Boolean` | `false` | +| [`hoverClass`](#hoverClass) | `String` | `''` | +| [`items`](#items) | `Array as PropType` | `[]` | +| [`itemsPerPage`](#itemsPerPage) | `Number` | `10` | +| [`loading`](#loading) | `Boolean` | `false` | +| [`loadingText`](#loadingText) | `String` | `'Loading...'` | +| [`modelValue`](#modelValue) | `Array` | `[]` | +| [`multiSort`](#multiSort) | `Boolean` | `false` | +| [`mustSort`](#mustSort) | `Boolean` | `false` | +| [`noDataText`](#noDataText) | `String` | `'No results'` | +| [`noShadow`](#noShadow) | `Boolean` | `false` | +| [`page`](#page) | `Number` | `1` | +| [`pagination`](#pagination) | `Object` | `{}` | +| [`rowClass`](#rowClass) | `(item: T, index: number) => string;` | `undefined` | +| [`search`](#search) | `String` | `''` | +| [`searchBy`](#searchBy) | `[String, Array] as PropType` | `string[]` | +| [`selectable`](#selectable) | `Boolean` | `false` | +| [`serverSide`](#serverSide) | `Boolean` | `false` | +| [`sortBy`](#sortBy) | `String` | `''` | +| [`sortDirection`](#sortDirection) | `String as PropType` | `''` | +| [`striped`](#striped) | `Boolean` | `false` | +| [`stripedClass`](#stripedClass) | `String` | `''` | +| [`tdClass`](#tdClass) | `String` | `''` | +| [`tile`](#tile) | `Boolean` | `false` | +| [`totalItems`](#totalItems) | `Number` | `0` | +| [`trClass`](#trClass) | `String` | `''` | +| [`value`](#value) | `Array` | `[]` | +| [`wrapperClass`](#wrapperClass) | `String` | `''` | ## Events @@ -682,6 +682,14 @@ Type: The `loading` slot allows you to customize the content shown when the table is loading data. +Type: + +```ts +loading?: (props: {}) => any; +``` + +Example: + ```vue