diff --git a/package.json b/package.json index 82d02a2..91d5695 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@fontsource/geist-mono": "^5.0.3", "@fontsource/geist-sans": "^5.0.3", "@poppanator/sveltekit-svg": "4.2.1", + "@pyncz/tailwind-mask-image": "^2.0.0", "@sveltejs/adapter-static": "^3.0.2", "@sveltejs/kit": "^2.5.18", "@sveltejs/vite-plugin-svelte": "^3.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 165c468..e1b7b35 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,6 +39,9 @@ importers: '@poppanator/sveltekit-svg': specifier: 4.2.1 version: 4.2.1(rollup@4.19.0)(svelte@4.2.18)(svgo@3.3.2)(vite@5.3.4) + '@pyncz/tailwind-mask-image': + specifier: ^2.0.0 + version: 2.0.0 '@sveltejs/adapter-static': specifier: ^3.0.2 version: 3.0.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.4))(svelte@4.2.18)(vite@5.3.4)) @@ -319,6 +322,9 @@ packages: svgo: '>=3.x' vite: '>=4.x' + '@pyncz/tailwind-mask-image@2.0.0': + resolution: {integrity: sha512-BN52RPSp56VIA25ZpLD3SEigwADTrQ6a3Kq8x94rbhU6YP1HpvRjSYtnFenEfGw2nzESvFsNdYT6KKP+JuS73w==} + '@rollup/pluginutils@5.1.0': resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} @@ -1747,6 +1753,8 @@ snapshots: transitivePeerDependencies: - rollup + '@pyncz/tailwind-mask-image@2.0.0': {} + '@rollup/pluginutils@5.1.0(rollup@4.19.0)': dependencies: '@types/estree': 1.0.5 diff --git a/src/lib/components/shared/demo.svelte b/src/lib/components/shared/demo.svelte index 2c040bb..bfacafa 100644 --- a/src/lib/components/shared/demo.svelte +++ b/src/lib/components/shared/demo.svelte @@ -70,7 +70,7 @@

{/if}
diff --git a/src/lib/components/ui/tabs/tabs-list.svelte b/src/lib/components/ui/tabs/tabs-list.svelte index b207642..0bd9620 100644 --- a/src/lib/components/ui/tabs/tabs-list.svelte +++ b/src/lib/components/ui/tabs/tabs-list.svelte @@ -1,24 +1,66 @@ - + + + - + diff --git a/src/routes/tabs/+page.svelte b/src/routes/tabs/+page.svelte index 9f7e5f4..999d4f4 100644 --- a/src/routes/tabs/+page.svelte +++ b/src/routes/tabs/+page.svelte @@ -5,6 +5,8 @@ import default_code from './default.svelte?raw'; import DisableSpecificTabs from './disable-specific-tabs.svelte'; import disable_specific_tabs_code from './disable-specific-tabs.svelte?raw'; + import Overflow from './overflow-tabs.svelte'; + import overflow_code from './overflow-tabs.svelte?raw'; import Secondary from './secondary.svelte'; import secondary_code from './secondary.svelte?raw'; import WithIcons from './with-icons.svelte'; @@ -29,4 +31,8 @@ + + + + diff --git a/src/routes/tabs/overflow-tabs.svelte b/src/routes/tabs/overflow-tabs.svelte new file mode 100644 index 0000000..1869860 --- /dev/null +++ b/src/routes/tabs/overflow-tabs.svelte @@ -0,0 +1,29 @@ + + + + + {#each tabs as { title, value }} + {title} + {/each} + + diff --git a/tailwind.config.ts b/tailwind.config.ts index d46a88f..5dd801d 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -1,3 +1,4 @@ +import mask from '@pyncz/tailwind-mask-image'; import typography from '@tailwindcss/typography'; import type { Config } from 'tailwindcss'; import { fontFamily } from 'tailwindcss/defaultTheme'; @@ -156,7 +157,22 @@ const config: Config = { } } }, - plugins: [typography] + plugins: [ + typography, + mask, + function ({ addUtilities }) { + const newUtilities = { + '.no-scrollbar': { + '-ms-overflow-style': 'none', + 'scrollbar-width': 'none', + '&::-webkit-scrollbar': { + display: 'none' + } + } + }; + addUtilities(newUtilities); + } + ] }; export default config;