Skip to content

Commit

Permalink
Merge branch 'main' into update-banner-button-styles
Browse files Browse the repository at this point in the history
  • Loading branch information
mollykreis committed May 24, 2024
2 parents 3539e96 + 1cbdc2c commit 9b1d6c3
Show file tree
Hide file tree
Showing 225 changed files with 2,289 additions and 581 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"validate:test:sequential": "npm run test --workspaces --if-present",
"validate:lint-concurrent:nimble-components": "npm run lint-concurrent -w packages/nimble-components",
"validate:test-concurrent:nimble-components": "npm run test-concurrent -w packages/nimble-components",
"storybook": "concurrently -n nimble,spright,storybook \"npm run build-components:watch -w @ni/nimble-components\" \"npm run build-components:watch -w @ni/spright-components\" \"npm run start -w @ni-private/storybook\""
"storybook": "npm run start -w @ni-private/storybook"
},
"repository": {
"type": "git",
Expand Down
30 changes: 30 additions & 0 deletions packages/angular-workspace/nimble-angular/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
{
"name": "@ni/nimble-angular",
"entries": [
{
"date": "Wed, 22 May 2024 18:32:15 GMT",
"version": "24.3.2",
"tag": "@ni/nimble-angular_v24.3.2",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v29.1.5",
"commit": "not available"
}
]
}
},
{
"date": "Tue, 21 May 2024 22:53:18 GMT",
"version": "24.3.1",
"tag": "@ni/nimble-angular_v24.3.1",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v29.1.4",
"commit": "not available"
}
]
}
},
{
"date": "Tue, 21 May 2024 15:50:01 GMT",
"version": "24.3.0",
Expand Down
18 changes: 17 additions & 1 deletion packages/angular-workspace/nimble-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# Change Log - @ni/nimble-angular

This log was last generated on Tue, 21 May 2024 15:50:01 GMT and should not be manually modified.
This log was last generated on Wed, 22 May 2024 18:32:15 GMT and should not be manually modified.

<!-- Start content -->

## 24.3.2

Wed, 22 May 2024 18:32:15 GMT

### Patches

- Bump @ni/nimble-components to v29.1.5

## 24.3.1

Tue, 21 May 2024 22:53:18 GMT

### Patches

- Bump @ni/nimble-components to v29.1.4

## 24.3.0

Tue, 21 May 2024 15:50:01 GMT
Expand Down
4 changes: 2 additions & 2 deletions packages/angular-workspace/nimble-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ni/nimble-angular",
"version": "24.3.0",
"version": "24.3.2",
"description": "Angular components for the NI Nimble Design System",
"scripts": {
"invoke-publish": "npm run invoke-publish:setup && cd ../dist/nimble-angular && npm publish",
Expand Down Expand Up @@ -32,7 +32,7 @@
"@angular/forms": "^16.2.12",
"@angular/localize": "^16.2.12",
"@angular/router": "^16.2.12",
"@ni/nimble-components": "^29.1.3"
"@ni/nimble-components": "^29.1.5"
},
"dependencies": {
"tslib": "^2.2.0"
Expand Down
30 changes: 30 additions & 0 deletions packages/angular-workspace/spright-angular/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
{
"name": "@ni/spright-angular",
"entries": [
{
"date": "Wed, 22 May 2024 18:32:15 GMT",
"version": "1.0.6",
"tag": "@ni/spright-angular_v1.0.6",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/spright-angular",
"comment": "Bump @ni/spright-components to v1.0.6",
"commit": "not available"
}
]
}
},
{
"date": "Tue, 21 May 2024 22:53:18 GMT",
"version": "1.0.5",
"tag": "@ni/spright-angular_v1.0.5",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/spright-angular",
"comment": "Bump @ni/spright-components to v1.0.5",
"commit": "not available"
}
]
}
},
{
"date": "Mon, 20 May 2024 15:39:22 GMT",
"version": "1.0.4",
Expand Down
18 changes: 17 additions & 1 deletion packages/angular-workspace/spright-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# Change Log - @ni/spright-angular

This log was last generated on Mon, 20 May 2024 15:39:22 GMT and should not be manually modified.
This log was last generated on Wed, 22 May 2024 18:32:15 GMT and should not be manually modified.

<!-- Start content -->

## 1.0.6

Wed, 22 May 2024 18:32:15 GMT

### Patches

- Bump @ni/spright-components to v1.0.6

## 1.0.5

Tue, 21 May 2024 22:53:18 GMT

### Patches

- Bump @ni/spright-components to v1.0.5

## 1.0.4

Mon, 20 May 2024 15:39:22 GMT
Expand Down
4 changes: 2 additions & 2 deletions packages/angular-workspace/spright-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ni/spright-angular",
"version": "1.0.4",
"version": "1.0.6",
"description": "Angular components for NI Spright",
"scripts": {
"invoke-publish": "npm run invoke-publish:setup && cd ../dist/spright-angular && npm publish",
Expand All @@ -24,7 +24,7 @@
"peerDependencies": {
"@angular/common": "^16.2.12",
"@angular/core": "^16.2.12",
"@ni/spright-components": "^1.0.4"
"@ni/spright-components": "^1.0.6"
},
"dependencies": {
"tslib": "^2.2.0"
Expand Down
9 changes: 9 additions & 0 deletions packages/eslint-config-nimble/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@ module.exports = {
]
}
},
{
files: ['*.foundation.spec.ts'],
rules: {
'no-restricted-imports': [
'error',
{ paths: restrictedImportsPaths() }
]
}
},
{
files: ['styles.ts'],
rules: {
Expand Down
45 changes: 45 additions & 0 deletions packages/nimble-components/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,51 @@
{
"name": "@ni/nimble-components",
"entries": [
{
"date": "Wed, 22 May 2024 18:32:15 GMT",
"version": "29.1.5",
"tag": "@ni/nimble-components_v29.1.5",
"comments": {
"patch": [
{
"author": "7282195+m-akinc@users.noreply.github.com",
"package": "@ni/nimble-components",
"commit": "5e4882a41568361919fc96a91243fc37cd831208",
"comment": "Fix anchor focus styling"
}
]
}
},
{
"date": "Wed, 22 May 2024 17:46:25 GMT",
"version": "29.1.4",
"tag": "@ni/nimble-components_v29.1.4",
"comments": {
"none": [
{
"author": "rajsite@users.noreply.github.com",
"package": "@ni/nimble-components",
"commit": "699ce37952cf27977915aeb8f9b9341ce701002e",
"comment": "Update build time global type extensions"
}
]
}
},
{
"date": "Tue, 21 May 2024 22:53:18 GMT",
"version": "29.1.4",
"tag": "@ni/nimble-components_v29.1.4",
"comments": {
"patch": [
{
"author": "7282195+m-akinc@users.noreply.github.com",
"package": "@ni/nimble-components",
"commit": "32fcfaf36e8b7383defe891dcb51664f3069a725",
"comment": "Support tabindex overriding for Button, MenuButton, ToggleButton, Checkbox, and Anchor"
}
]
}
},
{
"date": "Mon, 20 May 2024 15:39:22 GMT",
"version": "29.1.3",
Expand Down
18 changes: 17 additions & 1 deletion packages/nimble-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# Change Log - @ni/nimble-components

This log was last generated on Mon, 20 May 2024 15:39:22 GMT and should not be manually modified.
This log was last generated on Wed, 22 May 2024 18:32:15 GMT and should not be manually modified.

<!-- Start content -->

## 29.1.5

Wed, 22 May 2024 18:32:15 GMT

### Patches

- Fix anchor focus styling ([ni/nimble@5e4882a](https://github.com/ni/nimble/commit/5e4882a41568361919fc96a91243fc37cd831208))

## 29.1.4

Tue, 21 May 2024 22:53:18 GMT

### Patches

- Support tabindex overriding for Button, MenuButton, ToggleButton, Checkbox, and Anchor ([ni/nimble@32fcfaf](https://github.com/ni/nimble/commit/32fcfaf36e8b7383defe891dcb51664f3069a725))

## 29.1.3

Mon, 20 May 2024 15:39:22 GMT
Expand Down
29 changes: 29 additions & 0 deletions packages/nimble-components/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,35 @@ const nimbleButton = Button.compose({
});
```

If delegating focus, you must forward the `tabindex` attribute to any focusable elements in the shadow DOM. While some browsers (e.g. Chrome) will work properly without forwarding, others (e.g. Firefox) won't. Override the `tabIndex` property and mark it as an attribute:

```ts
export class MyComponent {
...
@attr({ attribute: 'tabindex', converter: nullableNumberConverter })
public override tabIndex!: number;
}
```

Then in the template, bind the focusable elements' `tabindex` to the host component's property:

<!-- prettier-ignore -->
```html
html<MyComponent>`
<nimble-button
...
tabindex="${x => x.tabIndex}">
</nimble-button>
// or for an element that isn't focusable by default:
<div
...
tabindex="${x => {
const tabindex = x.tabIndex ?? 0;
return x.disabled ? undefined : `${tabindex}`;
}">
</div>`;
```

### Leverage mixins for shared APIs across components

TypeScript and the FAST library each offer patterns and/or mechanisms to alter the APIs for a component via a mixin.
Expand Down
2 changes: 1 addition & 1 deletion packages/nimble-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ni/nimble-components",
"version": "29.1.3",
"version": "29.1.5",
"description": "Styled web components for the NI Nimble Design System",
"scripts": {
"build": "npm run generate-icons && npm run generate-workers && npm run build-components && npm run bundle-components && npm run generate-scss",
Expand Down
10 changes: 9 additions & 1 deletion packages/nimble-components/src/anchor/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { attr } from '@microsoft/fast-element';
import { attr, nullableNumberConverter } from '@microsoft/fast-element';
import {
DesignSystem,
Anchor as FoundationAnchor,
Expand Down Expand Up @@ -35,6 +35,14 @@ export class Anchor extends AnchorBase {
@attr
public appearance: AnchorAppearance;

/**
* @public
* @remarks
* HTML Attribute: tabindex
*/
@attr({ attribute: 'tabindex', converter: nullableNumberConverter })
public override tabIndex!: number;

/**
* @public
* @remarks
Expand Down
Loading

0 comments on commit 9b1d6c3

Please sign in to comment.