Socket
Socket
Sign inDemoInstall

svelte-tabs-scrollable

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

utils/debounce.d.ts

30

package.json
{
"name": "svelte-tabs-scrollable",
"version": "0.0.1",
"version": "0.0.2",
"description": "a simple svelte scrollable tabs with a lot of additional features and with fully supporting of RTL mode",
"author": "Mohammed Aliwi",
"license": "MIT",
"repository": "Mohammed Aliwi/svelte-tabs-scrollable",
"main": "dist/index.js",
"module": "dist/index.modern.js",
"source": "src/index.js",
"keywords": [
"svelte",
"svelte-tabs",
"tabs",
"scrollable",
"rtl",
"menu",
"tab",
"scroll",
"navigation"
],
"homepage": "https://github.com/Mood-al/svelte-tabs-scrollable#readme",
"bugs": {
"url": "https://github.com/Mood-al/svelte-tabs-scrollable/issues",
"email": "aliwi299@gmail.com"
},
"funding": "https://www.buymeacoffee.com/Mooder",
"devDependencies": {

@@ -8,2 +32,3 @@ "@sveltejs/adapter-auto": "next",

"@sveltejs/package": "^1.0.0-next.1",
"@sveltejs/adapter-node": "next",
"eslint": "^8.16.0",

@@ -29,2 +54,3 @@ "eslint-config-prettier": "^8.3.0",

"./utils/animate": "./utils/animate.js",
"./utils/debounce": "./utils/debounce.js",
"./utils/getNormalizedScrollLeft": "./utils/getNormalizedScrollLeft.js",

@@ -34,2 +60,2 @@ "./utils/scroll": "./utils/scroll.js"

"svelte": "./index.js"
}
}

68

README.md

@@ -1,38 +0,54 @@

# create-svelte
# usage
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
```javascript
<script>
// @ts-nocheck
## Creating a project
import Tabs from '$lib/Tabs.svelte';
import Tab from '$lib/Tab.svelte';
If you're seeing this, you've probably already done this step. Congrats!
let isRTL = false;
const onClick = () => {
isRTL = !isRTL;
};
let activeTab = 13;
const onTabClick = (e, index) => {
console.log(e, index);
};
$: {
if (typeof window !== 'undefined') {
const body = window.document.body;
isRTL ? (body.dir = 'rtl') : (body.dir = 'ltr');
}
}
let goToEnd;
let goToStart;
</script>
```bash
# create a new project in the current directory
npm create svelte@latest
<Tabs {activeTab} {onTabClick} bind:goToEnd bind:goToStart {isRTL}>
{#each [...Array(33).keys()] as item}
<Tab>
tab {item}
</Tab>
{/each}
</Tabs>
# create a new project in my-app
npm create svelte@latest my-app
```
<button on:click={() => goToEnd()}>go to end</button>
<button on:click={() => goToStart()}>go to start</button>
<button on:click={onClick}>{isRTL ? 'rtl' : 'ltr'}</button>
## Developing
<h3>
I'm working now on the demo and on adding the API to the component. if you want to see demos on
react-tabs-scrollable please visit this <a nopo href="https://react-tabs-scrollable.vercel.app/"
><h2>Website</h2></a
> until i can finish the svelte one, they both have the same features and functionality.
</h3>
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
```bash
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
```
## Building
## installation
To create a production version of your app:
```bash
npm run build
# create a new project in the current directory
npm i svelte-tabs-scroll-tabs
```
You can preview the production build with `npm run preview`.
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.

@@ -5,3 +5,3 @@ /** @typedef {typeof __propDef.props} TabProps */

export default class Tab extends SvelteComponentTyped<{
dd: any;
[x: string]: never;
}, {

@@ -19,3 +19,3 @@ [evt: string]: CustomEvent<any>;

props: {
dd: any;
[x: string]: never;
};

@@ -22,0 +22,0 @@ events: {

@@ -8,8 +8,11 @@ /** @typedef {typeof __propDef.props} TabsProps */

onTabClick: any;
scrollSelectedToCenterOfView?: boolean;
scrollSelectedToEndOfView?: boolean;
tabsScrollAmount?: number;
goToStart?: () => void;
goToEnd?: () => void;
}, {
[evt: string]: CustomEvent<any>;
}, {
default: {
dd: string;
};
default: {};
}> {

@@ -26,2 +29,7 @@ }

onTabClick: any;
scrollSelectedToCenterOfView?: boolean;
scrollSelectedToEndOfView?: boolean;
tabsScrollAmount?: number;
goToStart?: () => void;
goToEnd?: () => void;
};

@@ -32,7 +40,5 @@ events: {

slots: {
default: {
dd: string;
};
default: {};
};
};
export {};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc