Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

Commit e4df7c9

Browse files
Updating config and move package to organization
1 parent d40845b commit e4df7c9

File tree

17 files changed

+3754
-3327
lines changed

17 files changed

+3754
-3327
lines changed

.babelrc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
2-
"presets": [
3-
"@babel/env",
4-
"@babel/preset-typescript"
5-
],
2+
"presets": ["@babel/env", "@babel/preset-typescript"],
63
"plugins": ["@babel/plugin-transform-typescript"]
74
}

.eslintrc.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
// https://eslint.org/docs/user-guide/configuring
22

33
module.exports = {
4+
root: true,
5+
parser: "@typescript-eslint/parser",
46
env: {
57
browser: true,
68
node: true,
79
es6: true,
8-
jest: true
9-
}
10+
},
11+
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
12+
extends: ["standard", "prettier"],
13+
plugins: ["@typescript-eslint"],
1014
}

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
- uses: actions/checkout@v2
1010
- uses: actions/setup-node@v2
1111
with:
12-
node-version-file: '.node-version'
13-
cache: 'yarn'
12+
node-version-file: ".node-version"
13+
cache: "yarn"
1414
- run: |
1515
yarn install --silent --non-interactive
1616
yarn lint

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
20

.npmignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ index.html
66
netlify.toml
77
.node-version
88
.eslintrc.js
9-
src
109
specs
1110
tsconfig.json
12-
vite.config.js
11+
vite.config.mjs
1312
.prettierignore
1413
postcss.config.js
1514
tailwind.config.js

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"printWidth": 120
2+
"printWidth": 120,
3+
"semi": false
34
}

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
# Changelog
2+
23
All notable changes to this project will be documented in this file.
34

45
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
56
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
67

78
## [Unreleased]
89

10+
## [6.0.0] - 2024-02-25
11+
12+
- **Breaking** Upgrading Swiper to `11.x`.
13+
- Renaming the component from `stimulus-carousel` to `@stimulus-components/carousel`
14+
- Upgrading dependencies
15+
- Exporting Typescript Types
16+
- Updating demo UI
17+
- Add [Stimulus LSP](https://github.com/marcoroth/stimulus-lsp) compatibility
18+
919
## [5.0.1] - 2022-12-27
1020

1121
### Fixed
@@ -43,7 +53,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4353
- Moving to TypeScript
4454
- Upgrading Node to 14.17.6
4555

46-
4756
## [2.0.0] - 2020-12-05
4857

4958
### Added
@@ -62,11 +71,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6271
## [1.0.2] - 2020-11-13
6372

6473
### Changed
74+
6575
- Don't import css in the js file.
6676

6777
## [1.0.1] - 2020-11-12
6878

6979
### Changed
80+
7081
- Destroy the `swiper` instance on disconnect.
7182

7283
## [1.0.0] - 2020-11-11

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Guillaume Briday
3+
Copyright (c) Guillaume Briday
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
[![](https://img.shields.io/npm/v/stimulus-carousel.svg)](https://www.npmjs.com/package/stimulus-carousel)
55
[![](https://github.com/stimulus-components/stimulus-carousel/workflows/Lint/badge.svg)](https://github.com/stimulus-components/stimulus-carousel)
66
[![](https://img.shields.io/github/license/stimulus-components/stimulus-carousel.svg)](https://github.com/stimulus-components/stimulus-carousel)
7-
[![Netlify Status](https://api.netlify.com/api/v1/badges/ea47f6e3-99fb-46f3-a567-4ec122ab92ed/deploy-status)](https://stimulus-carousel.netlify.com)
87

98
## Getting started
109

1110
A Stimulus controller to deal with carousel.
1211

1312
## 📚 Documentation
1413

15-
See [stimulus-carousel documentation](https://stimulus-components.netlify.app/docs/components/stimulus-carousel/).
14+
See [stimulus-carousel documentation](https://www.stimulus-components.com/docs/stimulus-carousel/).
1615

1716
## 👷‍♂️ Contributing
1817

index.html

Lines changed: 42 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
@@ -8,63 +8,46 @@
88
<title>Stimulus Carousel</title>
99

1010
<script type="module" defer>
11-
import './src/app.css'
12-
import { Application } from '@hotwired/stimulus'
13-
import Carousel from './src/index'
14-
import 'swiper/css/bundle'
11+
import "./src/app.css"
12+
import { Application } from "@hotwired/stimulus"
13+
import Carousel from "./src/index"
14+
import "swiper/css/bundle"
1515

1616
const application = Application.start()
17-
application.register('carousel', Carousel)
17+
application.register("carousel", Carousel)
1818
</script>
1919
</head>
2020

2121
<body>
22-
<!-- This example requires Tailwind CSS v2.0+ -->
23-
<div class="relative bg-gray-50 overflow-hidden">
24-
<div class="hidden sm:block sm:absolute sm:inset-y-0 sm:h-full sm:w-full" aria-hidden="true">
25-
<div class="relative h-full max-w-7xl mx-auto">
26-
<svg
27-
class="absolute right-full transform translate-y-1/4 translate-x-1/4 lg:translate-x-1/2"
28-
width="404"
29-
height="784"
30-
fill="none"
31-
viewBox="0 0 404 784"
32-
>
33-
<defs>
34-
<pattern
35-
id="f210dbf6-a58d-4871-961e-36d5016a0f49"
36-
x="0"
37-
y="0"
38-
width="20"
39-
height="20"
40-
patternUnits="userSpaceOnUse"
41-
>
42-
<rect x="0" y="0" width="4" height="4" class="text-gray-200" fill="currentColor" />
43-
</pattern>
44-
</defs>
45-
<rect width="404" height="784" fill="url(#f210dbf6-a58d-4871-961e-36d5016a0f49)" />
46-
</svg>
47-
<svg
48-
class="absolute left-full transform -translate-y-3/4 -translate-x-1/4 md:-translate-y-1/2 lg:-translate-x-1/2"
49-
width="404"
50-
height="784"
51-
fill="none"
52-
viewBox="0 0 404 784"
53-
>
54-
<defs>
55-
<pattern
56-
id="5d0dd344-b041-4d26-bec4-8d33ea57ec9b"
57-
x="0"
58-
y="0"
59-
width="20"
60-
height="20"
61-
patternUnits="userSpaceOnUse"
62-
>
63-
<rect x="0" y="0" width="4" height="4" class="text-gray-200" fill="currentColor" />
64-
</pattern>
65-
</defs>
66-
<rect width="404" height="784" fill="url(#5d0dd344-b041-4d26-bec4-8d33ea57ec9b)" />
67-
</svg>
22+
<div class="relative bg-white overflow-hidden">
23+
<div class="relative isolate pt-14">
24+
<div
25+
class="absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]"
26+
aria-hidden="true"
27+
>
28+
<div
29+
class="relative left-[calc(50%+3rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 bg-gradient-to-tr from-yellow-500 to-orange-500 opacity-30 sm:left-[calc(50%+36rem)] sm:w-[72.1875rem]"
30+
style="
31+
clip-path: polygon(
32+
74.1% 44.1%,
33+
100% 61.6%,
34+
97.5% 26.9%,
35+
85.5% 0.1%,
36+
80.7% 2%,
37+
72.5% 32.5%,
38+
60.2% 62.4%,
39+
52.4% 68.1%,
40+
47.5% 58.3%,
41+
45.2% 34.5%,
42+
27.5% 76.7%,
43+
0.1% 64.9%,
44+
17.9% 100%,
45+
27.6% 76.8%,
46+
76.1% 97.7%,
47+
74.1% 44.1%
48+
);
49+
"
50+
></div>
6851
</div>
6952
</div>
7053

@@ -95,17 +78,12 @@ <h1 class="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:t
9578
class="inline-block"
9679
src="https://img.shields.io/github/license/stimulus-components/stimulus-carousel.svg"
9780
/>
98-
99-
<img
100-
class="inline-block"
101-
src="https://api.netlify.com/api/v1/badges/ea47f6e3-99fb-46f3-a567-4ec122ab92ed/deploy-status"
102-
/>
10381
</p>
10482

10583
<div class="mt-5 max-w-md mx-auto sm:flex sm:justify-center md:mt-8">
10684
<div class="rounded-md shadow">
10785
<a
108-
href="https://www.stimulus-components.com/docs/stimulus-carousel"
86+
href="https://www.stimulus-components.com/docs/stimulus-carousel/"
10987
class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-gradient-to-r from-yellow-500 to-orange-500 md:py-4 md:text-lg md:px-10"
11088
>
11189
Documentation &rarr;
@@ -116,7 +94,7 @@ <h1 class="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:t
11694
href="https://github.com/stimulus-components/stimulus-carousel"
11795
class="w-full flex items-center justify-center gap-1 px-8 py-3 border border-transparent text-base font-medium rounded-md bg-white hover:bg-gray-50 md:py-4 md:text-lg md:px-10"
11896
>
119-
<svg fill="currentColor" viewBox="0 0 24 24" aria-hidden="true" class="h-6 w-6">
97+
<svg fill="currentColor" viewBox="0 0 24 24" aria-hidden="true" class="size-6">
12098
<path
12199
fill-rule="evenodd"
122100
d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"
@@ -159,7 +137,6 @@ <h1 class="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:t
159137
</section>
160138
</div>
161139

162-
<!-- This example requires Tailwind CSS v2.0+ -->
163140
<footer class="bg-white">
164141
<div class="max-w-7xl mx-auto py-12 px-4 overflow-hidden sm:px-6 lg:px-8">
165142
<div class="-mx-5 -my-2 flex flex-wrap justify-center" aria-label="Footer">
@@ -182,9 +159,11 @@ <h1 class="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:t
182159
class="text-gray-400 hover:text-gray-500"
183160
>
184161
<span class="sr-only">Twitter</span>
185-
<svg class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
162+
<svg class="size-6" fill="currentColor" viewBox="0 0 512 512">
186163
<path
187-
d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84"
164+
fill-rule="evenodd"
165+
d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"
166+
clip-rule="evenodd"
188167
/>
189168
</svg>
190169
</a>
@@ -196,7 +175,7 @@ <h1 class="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:t
196175
class="text-gray-400 hover:text-gray-500"
197176
>
198177
<span class="sr-only">GitHub</span>
199-
<svg class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
178+
<svg class="size-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
200179
<path
201180
fill-rule="evenodd"
202181
d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"

0 commit comments

Comments
 (0)