@utrecht/button-css
Version:
Button component for the Municipality of Utrecht based on the NL Design System architecture
153 lines (91 loc) • 3.82 kB
Markdown
# @utrecht/button-css
## 3.0.1
### Patch Changes
- 9b3cb1e: Release with npm provenance.
## 3.0.0
### Major Changes
- 77438bb: # BREAKING CHANGE: Migrate from SCSS @import to @use/@forward
Migrated all SCSS files from the legacy `@import` syntax to the modern `@use` and `@forward` module system.
## Breaking Changes
- **Import syntax changed**: `@import` statements replaced with `@use`/`@forward`
- **Namespace requirements**: Some imports now require explicit namespaces
- **File structure**: Added `_forward.scss` files for mixin exports
- **Module loading**: Modules are now loaded once and cached
## Migration Guide
### For CSS Classes
```scss
// Before
@import "~@utrecht/button-css/src/index";
// After (recommended)
@use "~@utrecht/button-css/src/index";
// Note: @import still works for CSS-only files but @use is recommended
```
### For Mixins
```scss
// Before
@import "~@utrecht/button-css/src/mixin";
@include utrecht-button;
// After
@use "~@utrecht/button-css/src/forward" as *;
@include utrecht-button;
```
### With Namespaces
```scss
@use "~@utrecht/focus-ring-css/src/forward" as focus-ring;
@include focus-ring.utrecht-focus-visible;
```
## Benefits
- Better performance through module caching
- Namespace safety prevents naming conflicts
- Explicit dependencies improve maintainability
- Future-proof with modern SCSS standards
See `SCSS_MIGRATION.md` for detailed migration instructions.
## 2.3.1
### Patch Changes
- e20f33c: Provide `.d.mts` file for `.mjs` files in CSS components.
## 2.3.0
### Minor Changes
- 729f698: Restore vanilla HTML implementations to the npm packages of CSS components, with the following files:
- `dist/html/index.css`
- `dist/html/index.min.css`
- `dist/html/index.mjs`
## 2.2.0
### Minor Changes
- 725617a: Add `tokens.mjs` and `tokens.d.mts` files to CSS packages.
## 2.1.0
### Minor Changes
- e497b08: Export CSS string as default export in `dist/index.mjs`.
## 2.0.0
### Major Changes
- c3660c1: Rename design token `utrecht.button.icon.gap` to `utrecht.button.column-gap`
### Minor Changes
- 24b4813: Add an optional element class `utrecht-button__label` to support other inline styling without a gap
### Patch Changes
- e177ced: Start using `:focus-visible`, Safari support has caught up.
## 1.4.0
### Minor Changes
- 9ba581f: - Added metadata for button tokens.
- Fixed wrong design token metadata syntax for border-width.
### Patch Changes
- 9aa2be4: Fix regression in `utrecht.button.font-family` support.
- 2b97820: Changed `utrecht.button. text-transform` setting `"nl.nldesignsystem.figma.supports-token"` from `true` to `false` as it's not used for the Figma component within the 'Voorbeeld' library.
## 1.3.0
### Minor Changes
- fb371f4: Split the `README.md` for the button component into multiple Markdown documentation files.
## 1.2.0
### Minor Changes
- c0fa489: Add `utrecht-button-appearance-properties` mixin, to generate the custom properties for a button variant without the selector.
- 5299695: Button now support two new design tokens for each appearance: `font-size` and a matching `line-height`. These are optional, by default the button still uses `utrecht.button.font-size` and `utrecht.button.line-height`.
These are the 6 new design tokens:
- `utrecht.button.primary-action.font-size`
- `utrecht.button.primary-action.line-height`
- `utrecht.button.secondary-action.font-size`
- `utrecht.button.secondary-action.line-height`
- `utrecht.button.subtle.font-size`
- `utrecht.button.subtle.line-height`
## 1.1.0
### Minor Changes
- 62f1157: Add SCSS files to `src/` directory of CSS component packages.
## 1.0.0
### Major Changes
- 856d996: Switch from alpha releases to semantic versioning.