Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial pre-release - Carbon v11 styles #1881

Merged
merged 44 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
8b982d6
chore: depend on @carbon/styles instead of carbon-components
gregorw Sep 24, 2022
8d5bf35
chore: use v11 styles for docs
gregorw Oct 11, 2022
f4ac33c
chore: stick to `bx` instead of `cds` class prefix
gregorw Oct 11, 2022
f70c7d5
chore: migrate layout spacing to v11
gregorw Nov 3, 2022
789a200
chore: migrate type tokens to v11
gregorw Nov 3, 2022
7f84c57
chore: keep flex-grid instead of css grid for the moment
gregorw Nov 4, 2022
1628f56
chore: v11 Tabs
gregorw Nov 4, 2022
d649fd3
chore: use @ibm/plex fonts
gregorw Jan 14, 2023
96805c2
chore: v11 Button
gregorw Mar 26, 2023
cafa258
dependency: @carbon/styles update
gregorw Mar 26, 2023
8cf61bd
chore: v11 ComboBox
gregorw Mar 26, 2023
ee32859
chore: v11 ContentSwitcher
gregorw Mar 27, 2023
e1bd0aa
chore: remove legacy v10 css files
gregorw Mar 27, 2023
6203e1d
chore: v11 DatePicker
gregorw Mar 27, 2023
6be8d3f
chore: v11 Dropdown
gregorw Mar 27, 2023
ee55f2b
chore: v11 ExpandableTile
gregorw Mar 27, 2023
85bbaed
chore: v11 FileUploader
gregorw Mar 27, 2023
9a0a790
chore: v11 Toggle
gregorw Mar 27, 2023
c23782b
chore: v11 MultiSelect
gregorw Mar 28, 2023
9f32d57
chore: v11 NumberInput
gregorw Mar 28, 2023
ff8d54b
chore: v11 OverflowMenu
gregorw Mar 28, 2023
a583453
chore: v11 PasswordInput
gregorw Mar 28, 2023
019f977
chore: v11 Search
gregorw Mar 28, 2023
a3f577b
chore: v11 Select
gregorw Mar 28, 2023
b279d14
chore: v11 AspectRatio
gregorw Mar 31, 2023
2ca2833
chore: v11 TextArea
gregorw Mar 31, 2023
9285c72
chore: v11 TextInput
gregorw Mar 31, 2023
b20fc59
chore: v11 TimePicker
gregorw Mar 31, 2023
90a0baf
chore: v11 TreeView
gregorw Mar 31, 2023
5833536
chore: remove Truncate since it does not exist in Carbon v11
gregorw Mar 31, 2023
068f00b
chore: v11 UIShell
gregorw Mar 31, 2023
9e4be99
chore: v11 Accordion
gregorw Apr 2, 2023
b480219
tmp: v11 PopoverContent
gregorw Apr 2, 2023
b63a076
Revert "chore: remove Truncate since it does not exist in Carbon v11"
theetrain Jan 4, 2024
0aa38ec
chore: use truncate mixins
theetrain Jan 5, 2024
bebf220
docs: add truncate mixins
theetrain Jan 5, 2024
465f35c
chore: use `cds` class prefix in v11 styles
theetrain Jan 8, 2024
23d4bde
build: switch to npm
theetrain Jan 9, 2024
fc0d37c
chore: set up all component styles, fonts, and themes
theetrain Jan 10, 2024
21847da
chore: add individual theme css
theetrain Jan 10, 2024
3ae53de
feat: migrate Theme component to v11
theetrain Jan 10, 2024
aeb0520
chore: use bx css prefixes for now
theetrain Jan 11, 2024
ede0f3d
chore: resolve peerDependencies
theetrain Jan 11, 2024
6cb1eb5
chore: fix type errors and tests
theetrain Jan 11, 2024
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
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
id: yarn-cache
id: npm-cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies, build, test, and lint the codebase
run: |
yarn
yarn build:lib
yarn test:types
yarn lint
npm i
npm run build:lib
npm run test:types
npm run lint

- name: Trigger deploy
if: github.ref == 'refs/heads/master'
Expand Down
161 changes: 74 additions & 87 deletions COMPONENT_INDEX.md

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Before submitting a pull request (PR), consider [filing an issue](https://github
- [Component Format](#component-format)
- [Editing a component](#editing-a-component)
- [Creating a component](#creating-a-component)
- [Run `yarn build:docs`](#run-yarn-builddocs)
- [Run `npm run build:docs`](#run-npm-run-builddocs)
- [Submit a Pull Request](#submit-a-pull-request)
- [Sync Your Fork](#sync-your-fork)
- [Submit a PR](#submit-a-pr)

## Prerequisites

- [Node.js](https://nodejs.org/en/download/package-manager/) (version >=12)
- [Yarn](https://classic.yarnpkg.com/en/docs/install)
- [Node.js](https://nodejs.org/en/download/package-manager/) (version >=18)
- [npm](https://docs.npmjs.com/cli) (bundled with Node.js)

## Project set-up

Expand All @@ -43,7 +43,7 @@ Install the project dependencies:

```sh
# carbon-components-svelte/
yarn install
npm install
```

## Documentation set-up
Expand All @@ -54,7 +54,7 @@ First, create a symbolic link at the root of the project folder:

```sh
# carbon-components-svelte/
yarn link
npm link
```

Go into the `docs` folder:
Expand All @@ -66,8 +66,8 @@ cd docs
Link `"carbon-components-svelte"`:

```sh
yarn link "carbon-components-svelte"
yarn install
npm link "carbon-components-svelte"
npm install
```

If linked correctly, any change to a component in the `src` folder should be reflected in the `docs` site.
Expand All @@ -87,7 +87,7 @@ Preview changes to components from the `src` folder in the documentation website
In the `docs` folder, run:

```sh
yarn dev
npm run dev
```

The site should be served at `http://localhost:3000/` (or the next available port).
Expand Down Expand Up @@ -134,13 +134,13 @@ export {
} from "./ComposedModal";
```

### Run `yarn build:docs`
### Run `npm run build:docs`

Run the following command to re-generate TypeScript definitions and documentation.

```sh
# carbon-components-svelte/
yarn build:docs
npm run build:docs
```

## Submit a Pull Request
Expand Down Expand Up @@ -171,11 +171,11 @@ The workflow is automatically triggered when pushing a tag that begins with `v`

However, maintainers must perform a few things in preparation for a release.

Locally, while on `master` and the branch is clean, run `yarn release`. This command will:
Locally, while on `master` and the branch is clean, run `npm run release`. This command will:

- Bump the semantic version in `package.json`
- Generate notes in `CHANGELOG.md`
- Run `yarn build:docs` to update the generated documentation
- Run `npm run build:docs` to update the generated documentation

This command will not create a commit nor tag. Afterwards, perform the following manually:

Expand Down
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ pnpm i -D carbon-components-svelte

### Styling

Before importing components, you will need to first apply Carbon component styles. The Carbon Design System supports five themes (2 light, 3 dark).
Before importing components, you will need to first apply Carbon component styles. The Carbon Design System supports four themes (2 light, 2 dark).

- **white.css**: Default Carbon theme (light)
- **g10.css**: Gray 10 theme (light)
- **g80.css**: Gray 80 theme (dark)
- **g90.css**: Gray 90 theme (dark)
- **g100.css**: Gray 100 theme (dark)
- **all.css**: All themes (White, Gray 10, Gray 90, Gray 100) using [CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties)
Expand All @@ -60,7 +59,6 @@ The compiled CSS is generated from the following `.scss` files:

- [css/white.scss](css/white.scss)
- [css/g10.scss](css/g10.scss)
- [css/g80.scss](css/g80.scss)
- [css/g90.scss](css/g90.scss)
- [css/g100.scss](css/g100.scss)
- [css/all.scss](css/all.scss)
Expand All @@ -74,9 +72,6 @@ import "carbon-components-svelte/css/white.css";
// Gray 10 theme
import "carbon-components-svelte/css/g10.css";

// Gray 80 theme
import "carbon-components-svelte/css/g80.css";

// Gray 90 theme
import "carbon-components-svelte/css/g90.css";

Expand Down Expand Up @@ -147,7 +142,7 @@ Programmatically switch between each of the five Carbon themes by setting the "t

```html
<script>
let theme = "white"; // "white" | "g10" | "g80" | "g90" | "g100"
let theme = "white"; // "white" | "g10" | "g90" | "g100"

$: document.documentElement.setAttribute("theme", theme);
</script>
Expand Down
Loading