Skip to content

Commit 8ba7b71

Browse files
committed
release: version 2025.1.6
1 parent 1e4604c commit 8ba7b71

22 files changed

+705
-508
lines changed

.browserslistrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
> 0.1%
2+
last 2 versions
3+
not dead
4+
IE > 5

.github/workflows/notify.yml

-34
This file was deleted.

.github/workflows/publish.yml

-28
This file was deleted.

.github/workflows/release.yml

+19-52
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: Release
22

33
on:
4-
push:
5-
tags:
6-
- 'v*.*.*'
4+
pull_request:
5+
types: [closed]
6+
branches:
7+
- main
78

89
permissions:
910
contents: write
10-
pull-requests: write
1111

1212
jobs:
1313
release:
@@ -23,60 +23,27 @@ jobs:
2323
node-version: 20
2424
cache: yarn
2525

26-
- name: Install dependencies
27-
run: yarn install --frozen-lockfile
28-
2926
- name: Configure Git
3027
run: |
31-
git config --global user.name 'github-actions'
32-
git config --global user.email 'github-actions@github.com'
33-
34-
- name: Fetch all tags
35-
run: git fetch --tags
28+
git config user.name "github-actions"
29+
git config user.email "github-actions@github.com"
3630
37-
- name: Extract version and previous tag
38-
id: extract_info
31+
- name: Extract version from package.json
32+
id: extract_version
3933
run: |
40-
VERSION=${GITHUB_REF#refs/tags/v}
41-
PREVIOUS_TAG=$(git describe --tags $(git rev-list --tags --skip=1 --max-count=1))
34+
VERSION=$(jq -r '.version' package.json)
4235
echo "VERSION=$VERSION" >> $GITHUB_ENV
43-
echo "PREVIOUS_TAG=$PREVIOUS_TAG" >> $GITHUB_ENV
36+
echo "Extracted version: $VERSION"
4437
45-
- name: Determine update type
46-
id: determine_update_type
38+
- name: Create Git tag
4739
run: |
48-
IFS='.' read -r -a NEW_VERSION_PARTS <<< "${VERSION}"
49-
IFS='.' read -r -a OLD_VERSION_PARTS <<< "${PREVIOUS_TAG#v}"
40+
git tag -a "${{ env.VERSION }}" -m "Release ${{ env.VERSION }}"
41+
git push origin "${{ env.VERSION }}"
5042
51-
if [ "${NEW_VERSION_PARTS[0]}" != "${OLD_VERSION_PARTS[0]}" ]; then
52-
UPDATE_TYPE=major
53-
elif [ "${NEW_VERSION_PARTS[1]}" != "${OLD_VERSION_PARTS[1]}" ]; then
54-
UPDATE_TYPE=minor
55-
else
56-
UPDATE_TYPE=patch
57-
fi
58-
echo "UPDATE_TYPE=$UPDATE_TYPE" >> $GITHUB_ENV
59-
60-
- name: Create and push new branch
61-
run: |
62-
NEW_BRANCH=release-v${VERSION}
63-
git checkout -b ${NEW_BRANCH}
64-
git push origin ${NEW_BRANCH}
65-
echo "NEW_BRANCH=$NEW_BRANCH" >> $GITHUB_ENV
43+
- name: Set up NPM auth
44+
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
6645

67-
- name: Update version in package.json
68-
run: jq --arg new_version "$VERSION" '.version = $new_version' package.json > temp.json && mv temp.json package.json
69-
70-
- name: Build the package
71-
run: yarn build
72-
73-
- name: Create Pull Request
74-
uses: peter-evans/create-pull-request@v6
75-
with:
76-
token: ${{ secrets.GITHUB_TOKEN }}
77-
commit-message: "Update version to ${{ env.VERSION }} [${{ env.UPDATE_TYPE }}] and upgrade dependencies"
78-
branch: ${{ env.NEW_BRANCH }}
79-
base: main
80-
title: "Release ${{ env.VERSION }}"
81-
body: "This PR updates the version to ${{ env.VERSION }} and upgrades dependencies."
82-
labels: release
46+
- name: Publish to npm
47+
run: yarn publish --non-interactive
48+
env:
49+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
![npm](https://img.shields.io/npm/v/style-forge.form)
55
![license](https://img.shields.io/npm/l/style-forge.form)
66
![npm](https://img.shields.io/npm/dm/style-forge.form)
7-
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/255f15046ef744fcac1eefd4495b4a71)](https://app.codacy.com/gh/Style-Forge/form/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
8-
![build](https://github.com/Style-Forge/form/actions/workflows/publish.yml/badge.svg)
7+
![build](https://github.com/Style-Forge/form/actions/workflows/release.yml/badge.svg)
98

109
`Style-Forge.Form` package is a versatile and easy-to-use library designed to streamline the creation and management of forms in web applications. It offers a robust set of tools to handle form validation, styling, and submission processes, enhancing user experience and developer productivity.
1110

builder.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@ import fs from 'fs'
22
import postcss from 'postcss'
33

44
import pImport from 'postcss-import'
5+
import pDuplicated from 'postcss-combine-duplicated-selectors'
6+
import pComments from 'postcss-discard-comments'
57
import pAutoprefixer from 'autoprefixer'
68
import pMinify from 'postcss-minify'
79

810
const [from, to] = ['src/all.css', 'form.css']
911
const css = fs.readFileSync(from, 'utf8')
1012

1113
const packageFile = JSON.parse(fs.readFileSync('package.json', 'utf8'))
12-
const title = packageFile.name + ' v' + packageFile.version
14+
const title = packageFile.name + ' ' + packageFile.version
1315
const license = packageFile.license + ' License'
1416
const link = packageFile.repository.url.replace('git+', '').replace('.git', '')
1517
const header = '/*! ' + [title, license, link].join(' | ') + ' */'
1618

17-
const plugins = [pImport, pAutoprefixer, pMinify]
19+
const plugins = [pImport, pAutoprefixer, pDuplicated({ removeDuplicatedProperties: true }), pComments, pMinify]
1820

1921
postcss(plugins)
2022
.process(css, { from })

form.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "style-forge.form",
3-
"version": "4.0.4",
3+
"version": "2025.1.6",
44
"description": "Style-Forge.Form: versatile library for easy form creation, validation, styling, and submission in web apps.",
55
"type": "module",
66
"main": "form.css",
@@ -31,8 +31,11 @@
3131
"build": "node builder.js"
3232
},
3333
"devDependencies": {
34-
"autoprefixer": "^10.4.19",
35-
"postcss": "^8.4.39",
34+
"autoprefixer": "^10.4.20",
35+
"caniuse-lite": "^1.0.30001690",
36+
"postcss": "^8.4.49",
37+
"postcss-combine-duplicated-selectors": "^10.0.3",
38+
"postcss-discard-comments": "^7.0.3",
3639
"postcss-import": "^16.1.0",
3740
"postcss-minify": "^1.1.0"
3841
},

src/all.css

+1-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
@import 'color.css';
1111
@import 'file.css';
1212

13-
/* Custom inputs */
1413
@import 'switch.css';
15-
16-
/* Loader */
1714
@import 'loading.css';
18-
19-
/* Validation */
2015
@import 'validate.css';
16+
@import 'theme.css';

src/button.css

+41-24
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1-
.sf-button:is(a, button, input[type='button'], input[type='submit'], input[type='reset']) { box-sizing: border-box }
2-
3-
.sf-button:is(a, button, input[type='button'], input[type='submit'], input[type='reset']) *,
4-
.sf-button:is(a, button, input[type='button'], input[type='submit'], input[type='reset']) *::before,
5-
.sf-button:is(a, button, input[type='button'], input[type='submit'], input[type='reset']) *::after
6-
{ box-sizing: inherit }
7-
8-
.sf-button:is(button, input[type='button'], input[type='submit'], input[type='reset']) {
9-
appearance: auto;
10-
touch-action: manipulation;
1+
:root {
2+
--sf-form-ff: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
3+
--sf-form-fz: 0.9375rem;
4+
--sf-disabled: 0.4;
5+
--sf-form-radius: 3px;
6+
--sf-form-p-input-block: 0.5em;
7+
--sf-form-p-input-inline: 0.5em;
118
}
129

13-
.sf-button:where(a, button, input[type='button'], input[type='submit'], input[type='reset']) { cursor: pointer }
10+
.sf-button {
11+
cursor: pointer;
1412

15-
.sf-button:is(a, button, input[type='button'], input[type='submit'], input[type='reset']),
16-
.sf-button:is(a, button, input[type='button'], input[type='submit'], input[type='reset']):hover
17-
{
1813
display: inline-block;
1914

2015
font-size: var(--sf-form-fz);
@@ -32,24 +27,46 @@
3227

3328
border-radius: var(--sf-form-radius);
3429

30+
height: 32px;
31+
3532
padding: var(--sf-form-p-input-block) var(--sf-form-p-input-inline);
36-
}
3733

38-
a.sf-button:not([href]) {
39-
cursor: not-allowed;
40-
text-decoration: none;
41-
opacity: var(--sf-disabled);
42-
-webkit-tap-highlight-color: transparent;
34+
box-sizing: border-box;
35+
36+
vertical-align: baseline;
4337
}
44-
a.sf-button:not([href]):hover { color: inherit }
4538

46-
.sf-button:where(button, input[type='button'], input[type='submit'], input[type='reset']):disabled {
39+
a.sf-button:not([href]),
40+
.sf-button:disabled
41+
{
4742
cursor: not-allowed;
48-
-webkit-tap-highlight-color: transparent;
4943
opacity: var(--sf-disabled);
5044
}
5145

52-
.sf-button:where(a, button, input[type='button'], input[type='submit'], input[type='reset']):focus-visible {
46+
.sf-button:focus-visible
47+
{
5348
outline: 1px solid hsl(var(--sf-form-c-info));
5449
outline-offset: -1px;
5550
}
51+
52+
/* /// */
53+
54+
html.var .sf-button
55+
{
56+
font-size: 15px;
57+
font-family: Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
58+
59+
color: hsl(0, 0%, 10%);
60+
background: hsla(0, 0%, 100%, 0.2);
61+
border: 1px solid hsla(0, 0%, 10%, 0.2);
62+
63+
border-radius: 3px;
64+
65+
padding: 8px;
66+
}
67+
68+
html.var a.sf-button:not([href]),
69+
html.var .sf-button:disabled
70+
{ opacity: 0.4 }
71+
72+
html.var .sf-button:focus-visible { outline: 1px solid hsl(200, 100%, 60%) }

0 commit comments

Comments
 (0)