@sekiui/elements 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +42 -0
- package/README.md +5 -0
- package/package.json +13 -0
- package/packages/elements/LICENSE +21 -0
- package/packages/elements/README.md +25 -0
- package/packages/elements/package.json +19 -0
- package/packages/elements/src/button.ts +18 -0
- package/packages/elements/src/card.ts +18 -0
- package/packages/elements/src/index.ts +11 -0
- package/packages/elements/tsconfig.json +21 -0
- package/pnpm-workspace.yaml +2 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"] # e.g. v0.0.3
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
publish:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v5
|
|
16
|
+
|
|
17
|
+
- uses: pnpm/action-setup@v4
|
|
18
|
+
|
|
19
|
+
- uses: actions/setup-node@v5
|
|
20
|
+
with:
|
|
21
|
+
node-version: 20
|
|
22
|
+
registry-url: https://registry.npmjs.org
|
|
23
|
+
cache: pnpm
|
|
24
|
+
always-auth: true
|
|
25
|
+
|
|
26
|
+
- name: Install deps
|
|
27
|
+
run: pnpm i --frozen-lockfile
|
|
28
|
+
|
|
29
|
+
# ⬇️ auto-bump package.json version from the tag (vX.Y.Z => X.Y.Z)
|
|
30
|
+
- name: Sync version from tag
|
|
31
|
+
run: |
|
|
32
|
+
VERSION="${GITHUB_REF#refs/tags/v}"
|
|
33
|
+
echo "Version from tag: $VERSION"
|
|
34
|
+
npm version "$VERSION" --no-git-tag-version
|
|
35
|
+
|
|
36
|
+
- name: Build
|
|
37
|
+
run: pnpm run build
|
|
38
|
+
|
|
39
|
+
- name: Publish to npm
|
|
40
|
+
env:
|
|
41
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
42
|
+
run: pnpm publish --access public --no-git-checks
|
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sekiui/elements",
|
|
3
|
+
"description": "sekiui web components UI library",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"devDependencies": {
|
|
6
|
+
"rimraf": "^6.0.0"
|
|
7
|
+
},
|
|
8
|
+
"version": "0.0.11",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "pnpm -r build",
|
|
11
|
+
"clean": "rimraf packages/**/dist"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @sekiui/elements
|
|
2
|
+
|
|
3
|
+
**Seki UI** — short, rock-solid web components with the `seki-` prefix.
|
|
4
|
+
|
|
5
|
+
## Quick start
|
|
6
|
+
```html
|
|
7
|
+
<script type="module">
|
|
8
|
+
import "@sekiui/elements"; // registers <seki-button> and <seki-card>
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<seki-card>
|
|
12
|
+
<seki-button>Click me</seki-button>
|
|
13
|
+
</seki-card>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Per-component imports
|
|
17
|
+
```js
|
|
18
|
+
import "@sekiui/elements/button"; // defines <seki-button> only
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Theming
|
|
22
|
+
Use CSS parts and custom properties (e.g. `part="button"`).
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
MIT
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sekiui/elements",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Sekiui UI web components library",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "echo 'Build script not configured yet'"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"ui",
|
|
15
|
+
"components",
|
|
16
|
+
"web components"
|
|
17
|
+
],
|
|
18
|
+
"license": "MIT"
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export class SekiButton extends HTMLElement {
|
|
2
|
+
connectedCallback() {
|
|
3
|
+
if (!this.shadowRoot) {
|
|
4
|
+
const root = this.attachShadow({ mode: "open" });
|
|
5
|
+
root.innerHTML = `
|
|
6
|
+
<button part="button" style="border:1px solid currentColor;padding:.5rem .75rem;border-radius:.5rem;background:transparent;">
|
|
7
|
+
<slot></slot>
|
|
8
|
+
</button>
|
|
9
|
+
`;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function defineSekiButton() {
|
|
15
|
+
if (!customElements.get("seki-button")) {
|
|
16
|
+
customElements.define("seki-button", SekiButton);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export class SekiCard extends HTMLElement {
|
|
2
|
+
connectedCallback() {
|
|
3
|
+
if (!this.shadowRoot) {
|
|
4
|
+
const root = this.attachShadow({ mode: "open" });
|
|
5
|
+
root.innerHTML = `
|
|
6
|
+
<div part="card" style="border:1px solid currentColor;padding:1rem;border-radius:.75rem;display:block">
|
|
7
|
+
<slot></slot>
|
|
8
|
+
</div>
|
|
9
|
+
`;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function defineSekiCard() {
|
|
15
|
+
if (!customElements.get("seki-card")) {
|
|
16
|
+
customElements.define("seki-card", SekiCard);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { SekiButton, defineSekiButton } from "./button";
|
|
2
|
+
export { SekiCard, defineSekiCard } from "./card";
|
|
3
|
+
|
|
4
|
+
export function defineAllSeki() {
|
|
5
|
+
defineSekiButton();
|
|
6
|
+
defineSekiCard();
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// Auto-register all by default to make the placeholder easy to try.
|
|
10
|
+
// If you prefer opt-in registration, comment out the next line.
|
|
11
|
+
defineAllSeki();
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ES2022",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationMap": false,
|
|
8
|
+
"sourceMap": false,
|
|
9
|
+
"outDir": "dist",
|
|
10
|
+
"strict": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"lib": [
|
|
13
|
+
"ES2022",
|
|
14
|
+
"DOM",
|
|
15
|
+
"DOM.Iterable"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"include": [
|
|
19
|
+
"src"
|
|
20
|
+
]
|
|
21
|
+
}
|