Skip to content

Commit

Permalink
Merge pull request #637 from umbraco/release/1.5.0
Browse files Browse the repository at this point in the history
Release/1.5.0
  • Loading branch information
iOvergaard authored Oct 30, 2023
2 parents 0943742 + 4ae6e8f commit 80279d9
Show file tree
Hide file tree
Showing 367 changed files with 18,711 additions and 13,054 deletions.
36 changes: 36 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm install",
"customizations": {
"vscode": {
"extensions": [
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker"
]
}
},
"portsAttributes": {
"6006": {
"label": "Storybook",
"onAutoForward": "notify"
}
}

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
ignorePatterns: ['vite.*.js', 'packages/**/*.js', 'src/**/*'],
root: true,
plugins: ['html', 'import'],
plugins: ['html', 'import', 'eslint-plugin-local-rules'],
overrides: [
{
files: ['*.ts', '*.tsx'],
Expand All @@ -25,6 +25,8 @@ module.exports = {
'@typescript-eslint/ban-types': 'off', //TODO: Remove (maybe)
'lit/no-useless-template-literals': 'error',
'lit/prefer-nothing': 'error',
'local-rules/uui-class-prefix': 'warn',
'local-rules/prefer-static-styles-last': 'warn',
},
parserOptions: {
project: './tsconfig.json',
Expand Down
5 changes: 5 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ changelog:
- title: 🏠 Internal
labels:
- internal
- title: 📦 Dependencies
labels:
- dependencies
- title: 📄 Documentation
labels:
- documentation
- title: Other Changes
labels:
- '*'
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# pulls all commits (needed for chromatic to find baselines)
fetch-depth: '0'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# pulls all commits (needed for lerna / semantic release to correctly version)
fetch-depth: '0'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
node-version: [18.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand All @@ -42,7 +42,7 @@ jobs:
node-version: [18.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"cSpell.words": ["combobox", "Umbraco"]
"cSpell.words": ["combobox", "cssprop", "noopener", "noreferrer", "Umbraco"],
"npm.enableRunFromFolder": true
}
16 changes: 16 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"label": "npm: build",
"detail": "Builds each package"
}
]
}
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,56 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [1.5.0](https://github.com/umbraco/Umbraco.UI/compare/v1.5.0-rc.3...v1.5.0) (2023-10-30)

**Note:** Version bump only for package uui-monorepo

# [1.5.0-rc.3](https://github.com/umbraco/Umbraco.UI/compare/v1.5.0-rc.2...v1.5.0-rc.3) (2023-10-18)

**Note:** Version bump only for package uui-monorepo

# [1.5.0-rc.2](https://github.com/umbraco/Umbraco.UI/compare/v1.5.0-rc.1...v1.5.0-rc.2) (2023-10-18)

**Note:** Version bump only for package uui-monorepo

# [1.5.0-rc.1](https://github.com/umbraco/Umbraco.UI/compare/v1.5.0-rc.0...v1.5.0-rc.1) (2023-10-17)

### Bug Fixes

- fixing imports + story for hrefs ([#614](https://github.com/umbraco/Umbraco.UI/issues/614)) ([4bfb6a1](https://github.com/umbraco/Umbraco.UI/commit/4bfb6a1d866830b67139ed5f3ed8be09d60d28ac))
- Modal close-end event, no more bubbling modal events ([#598](https://github.com/umbraco/Umbraco.UI/issues/598)) ([825d722](https://github.com/umbraco/Umbraco.UI/commit/825d722fd30d210a9363ed14c47cccd96811575f))
- small bugfix for auto width not rendering ([#578](https://github.com/umbraco/Umbraco.UI/issues/578)) ([af8b738](https://github.com/umbraco/Umbraco.UI/commit/af8b738d7fdb4e819b6bc13fd31a881515b45cf8))

### Features

- Add HSV as accepted color format ([#610](https://github.com/umbraco/Umbraco.UI/issues/610)) ([61c62e4](https://github.com/umbraco/Umbraco.UI/commit/61c62e43f03ff0b660d78035f369d3723386c841))
- horizontal padding for uui-tab ([#579](https://github.com/umbraco/Umbraco.UI/issues/579)) ([8459fdb](https://github.com/umbraco/Umbraco.UI/commit/8459fdb5dca949680be3097fdf510966caaf78ce))
- **uui-icon:** Set aria-hidden if no label has been set ([#612](https://github.com/umbraco/Umbraco.UI/issues/612)) ([ac11819](https://github.com/umbraco/Umbraco.UI/commit/ac118190aead6ccb586cc9de7de62bcb9d56201a))
- Visually hidden component ([#593](https://github.com/umbraco/Umbraco.UI/issues/593)) ([875d46e](https://github.com/umbraco/Umbraco.UI/commit/875d46ed4c2b3224affb98cfd3a7d270e63349e8))

# [1.5.0-rc.0](https://github.com/umbraco/Umbraco.UI/compare/v1.4.0-rc.2...v1.5.0-rc.0) (2023-09-21)

### Bug Fixes

- add ifDefined() to remove attributes if not defined ([cf1b454](https://github.com/umbraco/Umbraco.UI/commit/cf1b454771f81850034c4bc6cfd1ff00536e3b83))
- all codepaths should return a value ([19393d2](https://github.com/umbraco/Umbraco.UI/commit/19393d2cd39a8b9808c5580f1c51ef00082a2e45))
- allow TouchEvents to be read for move() function ([0e6a6e8](https://github.com/umbraco/Umbraco.UI/commit/0e6a6e82dccfff8f9362bf5f76b9bcadd46b18f1))
- Button text color hover not taking effect ([#520](https://github.com/umbraco/Umbraco.UI/issues/520)) ([e55274e](https://github.com/umbraco/Umbraco.UI/commit/e55274ef3e92efe43b96f9224284592cf9629d73))
- check that coordinates are actual numbers before proceeding with syncing values ([e747ad0](https://github.com/umbraco/Umbraco.UI/commit/e747ad04aa77418c3517958896293579a0574b5f))
- correct base card requestUpdate on selectable ([#563](https://github.com/umbraco/Umbraco.UI/issues/563)) ([8641d98](https://github.com/umbraco/Umbraco.UI/commit/8641d98b5646a5b9ff8384def3c46203115f56e9))
- **uui-input:** inputmode property renamed to inputMode to follow its inherited property ([170651e](https://github.com/umbraco/Umbraco.UI/commit/170651e061c158edc37537923c7246c3d44d97f4))
- **uui-input:** messages should be string not boolean ([ec16fd5](https://github.com/umbraco/Umbraco.UI/commit/ec16fd5c029e5858d3c3b6095061a67ebe2d5996))
- **uui-input:** treat autoWidth as bool attribute ([a1bf741](https://github.com/umbraco/Umbraco.UI/commit/a1bf741d76ea7cfe8765daecce57d86694fa22eb))
- **uui-input:** validators should convert to string ([8457c0b](https://github.com/umbraco/Umbraco.UI/commit/8457c0bb946d324bc504d32a2ec74373e63bb0f3))

### Features

- tab group priority navigation ([#573](https://github.com/umbraco/Umbraco.UI/issues/573)) ([e6a2cd8](https://github.com/umbraco/Umbraco.UI/commit/e6a2cd8f3ce00ea128844ae74068171481a6e8ef))
- **uui-box:** add a property to control the headline variant ([#521](https://github.com/umbraco/Umbraco.UI/issues/521)) ([bda766c](https://github.com/umbraco/Umbraco.UI/commit/bda766cda1d65b6b9711a4cf2c137f2f66e3030d))
- **uui-button:** content align css variable ([#548](https://github.com/umbraco/Umbraco.UI/issues/548)) ([24b2ac5](https://github.com/umbraco/Umbraco.UI/commit/24b2ac58503792a8e2aa4cbd3481821c74729443))
- **uui-input:** Add support for auto-width ([#526](https://github.com/umbraco/Umbraco.UI/issues/526)) ([d8504ec](https://github.com/umbraco/Umbraco.UI/commit/d8504eca80717fefc99b02115f06352bf30de5fc))
- **uui-input:** autofocus and inputmode ([#549](https://github.com/umbraco/Umbraco.UI/issues/549)) ([f9fdbd2](https://github.com/umbraco/Umbraco.UI/commit/f9fdbd26798598e404d641359da4cf105664a734))

# [1.4.0](https://github.com/umbraco/Umbraco.UI/compare/v1.4.0-rc.2...v1.4.0) (2023-09-21)

**Note:** Version bump only for package uui-monorepo
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# [Umbraco UI Library](https://uui.umbraco.com/)

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](../LICENSE.md) [![Twitter](https://img.shields.io/twitter/follow/umbraco.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=umbraco)
[![Build](https://github.com/umbraco/Umbraco.UI/actions/workflows/tests.yml/badge.svg)](https://github.com/umbraco/Umbraco.UI/actions/workflows/tests.yml) [![Storybook](https://github.com/umbraco/Umbraco.UI/actions/workflows/azure-static-web-apps-delightful-beach-055ecb503.yml/badge.svg)](https://github.com/umbraco/Umbraco.UI/actions/workflows/azure-static-web-apps-delightful-beach-055ecb503.yml) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](../LICENSE.md) [![Twitter](https://img.shields.io/twitter/follow/umbraco.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=umbraco)

This is a UI-library for [Umbraco CMS](https://umbraco.com/) and friends. It is a collection of user interface components that can be used to build Umbraco style interfaces.

Expand Down Expand Up @@ -67,6 +67,7 @@ If you want to develop a component or contribute to the repository go to ["Get s
| [`<uui-modal>`](packages/uui-modal) | [![npm](https://img.shields.io/npm/v/@umbraco-ui/uui-modal?logoColor=%231B264F)](https://www.npmjs.com/package/@umbraco-ui/uui-modal) |
| [`<uui-pagination>`](packages/uui-pagination) | [![npm](https://img.shields.io/npm/v/@umbraco-ui/uui-pagination?logoColor=%231B264F)](https://www.npmjs.com/package/@umbraco-ui/uui-pagination) |
| [`<uui-popover>`](packages/uui-popover) | [![npm](https://img.shields.io/npm/v/@umbraco-ui/uui-popover?logoColor=%231B264F)](https://www.npmjs.com/package/@umbraco-ui/uui-popover) |
| [`<uui-popover-container>`](packages/uui-popover-container) | [![npm](https://img.shields.io/npm/v/@umbraco-ui/uui-popover-container?logoColor=%231B264F)](https://www.npmjs.com/package/@umbraco-ui/uui-popover-container) |
| [`<uui-progress-bar>`](packages/uui-progress-bar) | [![npm](https://img.shields.io/npm/v/@umbraco-ui/uui-progress-bar?logoColor=%231B264F)](https://www.npmjs.com/package/@umbraco-ui/uui-progress-bar) |
| [`<uui-range-slider>`](packages/uui-range-slider) | [![npm](https://img.shields.io/npm/v/@umbraco-ui/uui-range-slider?logoColor=%231B264F)](https://www.npmjs.com/package/@umbraco-ui/uui-range-slider) |
| [`<uui-radio>`](packages/uui-radio) | [![npm](https://img.shields.io/npm/v/@umbraco-ui/uui-radio?logoColor=%231B264F)](https://www.npmjs.com/package/@umbraco-ui/uui-radio) |
Expand Down Expand Up @@ -98,6 +99,7 @@ If you want to develop a component or contribute to the repository go to ["Get s
| [`<uui-toast-notification-container>`](packages/uui-toast-notification-container) | [![npm](https://img.shields.io/npm/v/@umbraco-ui/uui-toast-notification-container?logoColor=%231B264F)](https://www.npmjs.com/package/@umbraco-ui/uui-toast-notification-container) |
| [`<uui-toast-notification-layout>`](packages/uui-toast-notification-layout) | [![npm](https://img.shields.io/npm/v/@umbraco-ui/uui-toast-notification-layout?logoColor=%231B264F)](https://www.npmjs.com/package/@umbraco-ui/uui-toast-notification-layout) |
| [`<uui-toggle>`](packages/uui-toggle) | [![npm](https://img.shields.io/npm/v/@umbraco-ui/uui-toggle?logoColor=%231B264F)](https://www.npmjs.com/package/@umbraco-ui/uui-toggle) |
| [`<uui-visually-hidden>`](packages/uui-visually-hidden) | [![npm](https://img.shields.io/npm/v/@umbraco-ui/uui-visually-hidden?logoColor=%231B264F)](https://www.npmjs.com/package/@umbraco-ui/uui-visually-hidden) |

## Get started

Expand Down Expand Up @@ -140,3 +142,6 @@ See the rest of [the scripts here](docs/SCRIPTS.md).

- 📥 Pull requests and 🌟 Stars are always welcome.
- Read our [contributing guide](docs/CONTRIBUTING.md) to get started.
- Please report bugs and feature requests in the [issue tracker](
- The main branch is the latest development branch. Please make your pull requests against this branch: `v1/contrib`
- You can see the latest features in the Storybook attached to this branch: [v1/contrib](https://delightful-beach-055ecb503-v1contrib.westeurope.azurestaticapps.net/)
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Using Typescript is mandatory when contributing to this repository, although it
### How to get started

1. Make sure you have the recommended version of node.js and npm installed
1. Currently we use node.js v16 and npm v8
1. Currently we use node.js v18.16.0 and npm v9.5.0
2. Run `npm install`
3. Run `npm run storybook` to start the storybook server, which we also use for development

Expand Down
88 changes: 88 additions & 0 deletions eslint-local-rules.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
'use strict';

// eslint-disable-next-line no-undef
module.exports = {
/** @type {import('eslint').Rule.RuleModule} */
'uui-class-prefix': {
meta: {
type: 'problem',
docs: {
description:
'Ensure that all class declarations are prefixed with "UUI"',
category: 'Best Practices',
recommended: true,
},
schema: [],
},
create: function (context) {
function checkClassName(node) {
if (node.id && node.id.name && !node.id.name.startsWith('UUI')) {
context.report({
node: node.id,
message: 'Class declaration should be prefixed with "UUI"',
});
}
}

return {
ClassDeclaration: checkClassName,
};
},
},

/** @type {import('eslint').Rule.RuleModule}*/
'prefer-static-styles-last': {
meta: {
type: 'suggestion',
docs: {
description:
'Enforce the "styles" property with the static modifier to be the last property of a class that ends with "Element".',
category: 'Best Practices',
recommended: true,
},
fixable: 'code',
schema: [],
},
create: function (context) {
return {
ClassDeclaration(node) {
const className = node.id.name;
if (className.endsWith('Element')) {
const staticStylesProperty = node.body.body.find(bodyNode => {
return (
bodyNode.type === 'PropertyDefinition' &&
bodyNode.key.name === 'styles' &&
bodyNode.static
);
});
if (staticStylesProperty) {
const lastProperty = node.body.body[node.body.body.length - 1];
if (lastProperty.key.name !== staticStylesProperty.key.name) {
context.report({
node: staticStylesProperty,
message:
'The "styles" property should be the last property of a class declaration.',
data: {
className: className,
},
fix: function (fixer) {
const sourceCode = context.getSourceCode();
const staticStylesPropertyText =
sourceCode.getText(staticStylesProperty);
return [
fixer.replaceTextRange(staticStylesProperty.range, ''),
fixer.insertTextAfterRange(
lastProperty.range,
'\n \n ' + staticStylesPropertyText
),
];
},
});
}
}
}
},
};
},
},
};
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packages": ["packages/*"],
"version": "1.4.0",
"version": "1.5.0",
"npmClient": "npm",
"useWorkspaces": true,
"command": {
Expand Down
Loading

0 comments on commit 80279d9

Please sign in to comment.