Skip to content

Commit

Permalink
Merge branch 'v1/contrib' of https://github.com/umbraco/Umbraco.UI in…
Browse files Browse the repository at this point in the history
…to feature/tab-panel

# Conflicts:
#	packages/uui-tabs/lib/uui-tab.element.ts
  • Loading branch information
bjarnef committed Oct 18, 2023
2 parents 6055135 + 01643d2 commit f95e416
Show file tree
Hide file tree
Showing 271 changed files with 6,286 additions and 5,701 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
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", "cssprop", "noopener", "noreferrer", "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"
}
]
}
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [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
Expand Down
6 changes: 5 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 @@ -99,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 @@ -141,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.5.0-rc.0",
"version": "1.5.0-rc.1",
"npmClient": "npm",
"useWorkspaces": true,
"command": {
Expand Down
Loading

0 comments on commit f95e416

Please sign in to comment.