Skip to content

Commit 609948e

Browse files
committed
Merge branch 'next' of github.com:klaascuvelier/carbon-components-angular into cca6-eslint-migration
* 'next' of github.com:klaascuvelier/carbon-components-angular: fix: set id to popover content and aria-live attribute (carbon-design-system#3110) feat: add new menu based components (carbon-design-system#3106) feat: convert components to use OnPush change detection strategy 2 (carbon-design-system#3100) docs: add updated getting started steps (carbon-design-system#3107) chore(deps-dev): bump serialize-javascript from 6.0.1 to 6.0.2 (carbon-design-system#3104) chore(deps-dev): bump store2 from 2.14.2 to 2.14.4 (carbon-design-system#3095) chore(deps-dev): bump serialize-javascript from 6.0.1 to 6.0.2 in /integration/ng17 (carbon-design-system#3103) fix: pass autoAlign property to icon button (carbon-design-system#3101) ci: bump deprecated version of GH action and resolve integration test build issue (carbon-design-system#3102) fix: set publish config access to 'public' (carbon-design-system#3098) fix: add publish config to library (dist) package.json (carbon-design-system#3097) feat: create npmrc file to enable publishing with provenance ci: bump github actions to latest version fix: typing for loading translation strings (carbon-design-system#3077)
2 parents 0f09bb6 + 789b47a commit 609948e

40 files changed

+1414
-3208
lines changed

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414

1515
steps:
1616
- name: Checkout repository
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818

1919
# Initializes the CodeQL tools for scanning.
2020
- name: Initialize CodeQL
21-
uses: github/codeql-action/init@v2
21+
uses: github/codeql-action/init@v3
2222
with:
23-
languages: javascript
23+
languages: javascript-typescript
2424

2525
- name: Perform CodeQL Analysis
26-
uses: github/codeql-action/analyze@v2
26+
uses: github/codeql-action/analyze@v3

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ jobs:
2525
steps:
2626
# Checkout to branch
2727
- name: Checkout
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929

3030
# Set up node to use v20
3131
- name: Setup Node
32-
uses: actions/setup-node@v3
32+
uses: actions/setup-node@v4
3333
with:
3434
node-version: "20"
3535
cache: "npm"

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
node-version: [20.x]
1717

1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020
- name: Use Node.js ${{ matrix.node-version }}
21-
uses: actions/setup-node@v3
21+
uses: actions/setup-node@v4
2222
with:
2323
node-version: ${{ matrix.node-version }}
2424
- run: npm i

README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,37 @@ Assuming we're starting with a new @angular/cli project:
2929
```shell
3030
$ npx @angular/cli new my-project --style=scss
3131
$ cd my-project
32-
$ npm i --save carbon-components-angular @carbon/styles
32+
$ npm i --save carbon-components-angular @carbon/styles @carbon/icons
3333
```
3434

35-
Then we need to include carbon-components in `src/styles.scss`:
35+
Next, we need to include carbon styles in `src/styles.scss`:
3636

3737
```scss
38-
@use "@carbon/styles";
38+
@use '@carbon/styles/scss/config' with (
39+
// Use flexbox for grid - stick to CSS Grid or Flexbox
40+
// CSS Grid has become the default grid system in v11
41+
$use-flexbox-grid: true,
42+
// Update path of fonts to exclude tilde, required for vite (Angular 16+)
43+
$font-path: '@ibm/plex'
44+
);
45+
46+
@use '@carbon/styles';
47+
48+
// Import css variables in root
49+
html {
50+
@include styles.theme(styles.$white);
51+
}
3952
```
4053

41-
> *Note:* For offline usage we'll need to set `$font-path: '~carbon-components/src/globals/fonts';` at the very top of our `src/styles.scss`. This will copy the fonts to our `dist` folder upon successful build. If you like the fonts to be a part of your `assets` folder and not pollute the `dist` folder then copy the fonts from `node_modules/carbon-components/src/globals/fonts` into our app's `src/assets/fonts` folder and add `$font-path: '/assets/fonts/';` at the very top of our `src/styles.scss`.
54+
Then we need to declare `@carbon/icons` as a module by creating a `module.d.ts` file (or use any existing declaration file - has `.d.ts` suffix) in your src directory:
55+
56+
```ts
57+
declare module '@carbon/icons/*';
58+
```
4259

4360
That's it! Now we can run `npm start` and start building out our application!
4461

45-
> *Note:* This isn't the only way to bootstrap a `carbon-components-angular` application, but the combination of `@angular/cli` and the `carbon-components` scss is our recommended setup.
62+
> *Note:* This isn't the only way to bootstrap a `carbon-components-angular` application, but the combination of `@angular/cli` and the `@carbon/styles` scss is our recommended setup.
4663
4764
[![Edit Carbon Components Angular](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/edit/stackblitz-starters-exxkq4?file=src%2Fmain.ts)
4865

@@ -172,4 +189,4 @@ This package uses IBM Telemetry to collect de-identified and anonymized metrics
172189
this package as a dependency you are agreeing to telemetry collection. To opt out, see
173190
[Opting out of IBM Telemetry data collection](https://github.com/ibm-telemetry/telemetry-js/tree/main#opting-out-of-ibm-telemetry-data-collection).
174191
For more information on the data being collected, please see the
175-
[IBM Telemetry documentation](https://github.com/ibm-telemetry/telemetry-js/tree/main#ibm-telemetry-collection-basics).
192+
[IBM Telemetry documentation](https://github.com/ibm-telemetry/telemetry-js/tree/main#ibm-telemetry-collection-basics).

0 commit comments

Comments
 (0)