Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-transform-class-properties",
"@babel/plugin-transform-export-namespace-from",
"@babel/plugin-transform-object-rest-spread",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-runtime",
Expand Down
66 changes: 33 additions & 33 deletions .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,48 @@ name: Build Metronome

on:
push:
branches: [ main, v1.1.x ]
branches: [main, v1.1.x]
pull_request:
branches: [ main, v1.1.x ]
branches: [main, v1.1.x]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout 🛎️
uses: actions/checkout@master
- name: Setup Node 🔧
uses: actions/setup-node@v3
with:
node-version: '10'

- name: Run lint
run: |
yarn
make lint
- name: Checkout 🛎️
uses: actions/checkout@master

- name: Setup Node 🔧
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Run lint
run: |
yarn
make lint

build:
runs-on: ubuntu-latest

steps:
- name: Checkout 🛎️
uses: actions/checkout@master
- name: Setup Node 🔧
uses: actions/setup-node@v3
with:
node-version: '10'
- name: Install and Build 🔧
run: |
yarn install
yarn build

- name: Deploy 🚀
if: github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to. It should be any branch other than `main`
folder: dist # The folder the action should deploy.
- name: Checkout 🛎️
uses: actions/checkout@master

- name: Setup Node 🔧
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install and Build 🔧
run: |
yarn install
yarn build

- name: Deploy 🚀
if: github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to. It should be any branch other than `main`
folder: dist # The folder the action should deploy.
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# for more info: https://docs.npmjs.com/trusted-publishers#prefer-trusted-publishing-over-tokens
name: Publish Package

on:
push:
tags:
- 'v*'

permissions:
id-token: write # Required for OIDC
contents: read

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'

- name: Update npm
run: npm install -g npm@latest
- run: npm publish
7 changes: 7 additions & 0 deletions components/form/button-group/ButtonGroup.es6.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react'
import PropTypes from 'prop-types'
import classnames from 'classnames'

function ButtonGroup ({ vertical, className, children }) {
Expand All @@ -12,4 +13,10 @@ function ButtonGroup ({ vertical, className, children }) {
)
}

ButtonGroup.propTypes = {
vertical: PropTypes.bool,
className: PropTypes.string,
children: PropTypes.node
}

export default ButtonGroup
11 changes: 11 additions & 0 deletions components/form/checkbox/Checkbox.es6.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react'
import PropTypes from 'prop-types'
import classnames from 'classnames'

import { Checkmark } from '../../Icons.es6.js'
Expand Down Expand Up @@ -34,6 +35,16 @@ function Checkbox ({ disabled, checked, indeterminate, label, name, onChange, ha
)
}

Checkbox.propTypes = {
disabled: PropTypes.bool,
checked: PropTypes.bool,
indeterminate: PropTypes.bool,
label: PropTypes.string,
name: PropTypes.string,
onChange: PropTypes.func,
hasError: PropTypes.bool
}

Checkbox.defaultProps = {
label: '',
name: '',
Expand Down
11 changes: 11 additions & 0 deletions components/form/checkbox/CheckboxSelect.es6.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react'
import PropTypes from 'prop-types'
import { isEqual } from 'lodash'

import Checkbox from '../checkbox/Checkbox.es6.js'
Expand Down Expand Up @@ -47,6 +48,16 @@ function CheckboxSelect ({ checked, disabled, label, onChange, onSelectChange,
)
}

CheckboxSelect.propTypes = {
checked: PropTypes.bool,
disabled: PropTypes.bool,
label: PropTypes.string,
onChange: PropTypes.func,
onSelectChange: PropTypes.func,
selectOptions: PropTypes.array,
selectedOption: PropTypes.object
}

CheckboxSelect.defaultProps = {
checked: false,
disabled: false,
Expand Down
32 changes: 18 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
{
"name": "@b12/metronome",
"version": "1.1.32",
"version": "1.1.33",
"description": "",
"main": "index.es6.js",
"repository": {
"url": "https://github.com/b12io/metronome"
},
"scripts": {
"test": "jest",
"start": "webpack-dev-server --mode development",
"build": "webpack --mode production",
"styleguide": "styleguidist server",
"styleguide:build": "styleguidist build",
"start": "NODE_OPTIONS=--openssl-legacy-provider webpack-dev-server --mode development",
"build": "NODE_OPTIONS=--openssl-legacy-provider webpack --mode production",
"styleguide": "NODE_OPTIONS=--openssl-legacy-provider styleguidist server",
"styleguide:build": "NODE_OPTIONS=--openssl-legacy-provider styleguidist build",
"prettier": "prettier --ignore-path .prettierignore --config .prettierrc.json --ignore-unknown --write",
"lint-fix": "eslint --config .eslintrc.js --fix"
},
"author": "B12 <[email protected]> (https://b12.io/)",
"license": "Apache-2.0",
"engines": {
"npm": ">=3.0.0"
"node": ">=20.0.0",
"npm": ">=11.5.1"
},
"jest": {
"collectCoverage": false,
Expand Down Expand Up @@ -43,9 +47,9 @@
"@babel/cli": "7.2.0",
"@babel/core": "7.2.0",
"@babel/node": "7.2.0",
"@babel/plugin-proposal-class-properties": "7.2.1",
"@babel/plugin-proposal-export-namespace-from": "7.2.0",
"@babel/plugin-proposal-object-rest-spread": "7.2.0",
"@babel/plugin-transform-class-properties": "7.24.7",
"@babel/plugin-transform-export-namespace-from": "7.24.7",
"@babel/plugin-transform-object-rest-spread": "7.24.7",
"@babel/plugin-proposal-throw-expressions": "7.2.0",
"@babel/plugin-syntax-dynamic-import": "7.2.0",
"@babel/plugin-transform-runtime": "7.2.0",
Expand Down Expand Up @@ -79,7 +83,7 @@
"file-loader": "1.1.11",
"html-webpack-plugin": "3.2.0",
"jest": "24.1.0",
"node-sass": "4.13.1",
"sass": "1.77.8",
"popper.js": "1.14.3",
"prettier": "2.7.1",
"prop-types": "15.6.2",
Expand All @@ -88,12 +92,12 @@
"react-styleguidist": "10.6.1",
"react-syntax-highlighter": "7.0.4",
"react-test-renderer": "16.3.2",
"sass-loader": "7.0.1",
"sass-loader": "10.5.2",
"style-loader": "0.21.0",
"uuid": "3.2.1",
"webpack": "4.6.0",
"webpack-cli": "2.0.15",
"webpack-dev-server": "3.1.3"
"webpack": "4.46.0",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.3"
},
"dependencies": {
"bootstrap": "4.6.1",
Expand Down
Loading
Loading