Commit graph

1868 commits

Author SHA1 Message Date
Enrico Sacchetti
a581231d16 chore: adjust types
- Fix ButtonSkeleton sizes
- Apply v11 `size` props
2024-01-19 16:30:40 -05:00
Enrico Sacchetti
c51c40c9f4 chore: adjust size type 2024-01-19 16:00:01 -05:00
Enrico Sacchetti
018d780bc3 fix: only apply v11 change to button 2024-01-19 15:50:47 -05:00
Enrico Sacchetti
997cc1fa5e feat: upgrade Button to v11 styles
Button changes

##BREAKING CHANGES

- `skeleton` prop has been removed. Use `ButtonSkeleton` component instead
- `size` prop has new values
- `kind` prop has new values
- `isSelected` is now `selected
- `on:mouseover`, `on:mouseenter`, and `on:mouseleave` forwarded events were replaced with `on:pointerover`, `on:pointerenter`, and `on:pointerleave`
- `as` no longer accepts boolean types

## Features

- New `2xl` size
- `expressive` styles now apply to all button sizes
- `as` accepts a string to specify a desired HTML element
2024-01-16 16:30:06 -05:00
Enrico Sacchetti
50f24b882a fix: regenerate css
- Using all component tokens and styles that were previously-missing
2024-01-15 16:45:54 -05:00
Enrico Sacchetti
962d37d22e chore: clean up lockfile 2024-01-15 16:45:30 -05:00
Enrico Sacchetti
559701ec86 v1.0.0-next.0 2024-01-12 13:45:09 -05:00
Enrico Sacchetti
c0d037dfca feat!: initial pre-release - Carbon v11 styles (#1881)
**carbon-components-svelte has unstable styles and interactions during this pre-release phase. See #1872 for details.**

Breaking changes

- Overall, this is a major style change the will impact the appearance and features of many components. Use caution when upgrading and test your applications.

Components

- Button has new prop values for size and kind
- Theme follows v11 conventions: g80 theme isn't supported, toggled themes adjust data-carbon-theme attribute in <html> tag (for now, tokens use bx prefix, but that may change)
- Tabs has a contained prop instead of type, and a new mobile appearance (scrolling tabs)
- ContentSwitcher size prop no longer supports size="xl"; md is the new default
- MultiSelect no longer supports xl size
- OverflowMenu no longer supports xl size
- Search no longer supports xl size
- TreeView no longer supports compact size
- UIShell has a new light theme

CSS

- Several class names have been changed due to the v11 overhaul. If you're targeting or overriding component classes, be sure to test your code
- Many tokens and CSS variables have been renamed. Details: https://carbondesignsystem.com/migrating/guide/develop
- Themes are applied to the <html> element as data-carbon-theme="g10" instead of theme="g10"
- The g80 theme no longer exists

General

- Codebase uses npm instead of yarn

--- Commit notes

* chore: depend on @carbon/styles instead of carbon-components

See upgrade guide here: https://carbondesignsystem.com/migrating/guide/develop

* chore: use v11 styles for docs

* chore: stick to `bx` instead of `cds` class prefix

* chore: migrate layout spacing to v11

See [@carbon/layout](https://github.com/carbon-design-system/carbon/blob/main/docs/migration/v11.md#carbonlayout) migration guide:

    $layout-01 	Removed, use $spacing-05 instead
    $layout-02 	Removed, use $spacing-06 instead
    $layout-03 	Removed, use $spacing-07 instead
    $layout-04 	Removed, use $spacing-09 instead
    $layout-05 	Removed, use $spacing-10 instead
    $layout-06 	Removed, use $spacing-12 instead
    $layout-07 	Removed, use $spacing-13 instead

* chore: migrate type tokens to v11

See https://github.com/carbon-design-system/carbon/blob/main/docs/migration/v11.md#type-tokens

* chore: keep flex-grid instead of css grid for the moment

Upgrading to css-grid should be separate.

* chore: v11 Tabs

In v11 [Tabs](https://carbondesignsystem.com/migrating/guide/design/#tabs-breaking) received some additional modifiers. In this commit we only want to make sure that the Svelte v10 tabs still work using v11 styles. This probably needs additional testing.

* chore: use @ibm/plex fonts

* chore: v11 Button

* dependency: @carbon/styles update

* chore: v11 ComboBox

Size `xl` changed to `lg`. For better compatibility with existing codebases size `xl` is still supported.

* chore: v11 ContentSwitcher

For better compatibility with existing code bases size `xl` is still supported.

* chore: remove legacy v10 css files

Note that further work is needed here in order to make theming work again.
Also documentation needs updating.

* chore: v11 DatePicker

For better compatibility with existing codebases size xl is still supported.

* chore: v11 Dropdown

For better compatibility with existing codebases size xl is still supported.

* chore: v11 ExpandableTile

Note that state labels `tileCollapsedLabel` and `tileExpandedLabel` are no longer supported.

* chore: v11 FileUploader

For better compatibility with existing codebases sizes `field` and `small` are still supported. Note that flagship implementation does the same thing.

* chore: v11 Toggle

This removes legacy `ToggleSkeleton`.

* chore: v11 MultiSelect

Size `xl` changed to `lg`.

* chore: v11 NumberInput

For better compatibility with existing codebases size `xl` is still supported.

* chore: v11 OverflowMenu

Size `xl` changed to `lg`. For better compatibility with existing codebases size `xl` is still supported.

* chore: v11 PasswordInput

Size `xl` changed to `lg`. For better compatibility with existing codebases size `xl` is still supported.

* chore: v11 Search

* chore: v11 Select

Size `xl` changed to `lg`. For better compatibility with existing codebases size `xl` is still supported.

* chore: v11 AspectRatio

The `bx--aspect-ratio--object` class is gone and needs to be replaced manually.

* chore: v11 TextArea

`cols` no longer has a defaults to 50 but remains at 100% width by default.

* chore: v11 TextInput

Size `xl` changed to `lg`. For better compatibility with existing codebases size `xl` is still supported.

* chore: v11 TimePicker

Size `xl` changed to `lg`. For better compatibility with existing codebases size `xl` is still supported.

* chore: v11 TreeView

Size `compact` changed to `xs`. For better compatibility with existing codebases size `compact` is still supported.

* chore: remove Truncate since it does not exist in Carbon v11

* chore: v11 UIShell

* chore: v11 Accordion

Size `xl` changed to `lg`. For better compatibility with existing codebases size `xl` is still supported.

* tmp: v11 PopoverContent

* Revert "chore: remove Truncate since it does not exist in Carbon v11"

This reverts commit 5833536199.

* chore: use truncate mixins

* docs: add truncate mixins

* chore: use `cds` class prefix in v11 styles

* build: switch to npm

* chore: set up all component styles, fonts, and themes

- Adapt documentation to new styles

* chore: add individual theme css

* feat: migrate Theme component to v11

- remove g80 theme option everywhere
- utilize new `data-carbon-theme` attribute when applying theme
- use cds instead of bx in places

* chore: use bx css prefixes for now

* chore: resolve peerDependencies

- Leaving out latest prettier for now
- Ignoring Sveld warnings for now

* chore: fix type errors and tests

---------

Co-authored-by: Gregor Wassmann <gregor.wassmann@gmail.com>
2024-01-12 13:45:09 -05:00
Enrico Sacchetti
f1cafd4959
build: set up separate publish jobs (#1887) 2024-01-12 13:44:20 -05:00
Gregor Wassmann
3bd943d12c
chore: linting (#1885) 2024-01-11 06:55:39 -08:00
Eric Liu
6aa0ef61ad v0.82.8 2024-01-09 20:19:40 -08:00
Eric Liu
d3e5b3dd54 chore: re-install sveld and run yarn build:docs 2024-01-09 20:15:04 -08:00
Ryan Marx
59018728df
fix(button): forward on:focus event (#1878)
Fixes #1830
2024-01-09 20:09:11 -08:00
metonym
1600775968
style(docs): color-scheme reflects theme (#1874) 2023-12-30 10:35:44 -08:00
Eric Liu
fe0b0c2b18 v0.82.7 2023-12-17 09:45:39 -08:00
metonym
479225711a
fix(radio-button): allow value type to be a number (#1868) 2023-12-17 09:42:28 -08:00
Eric Liu
1d82eb67a0 v0.82.6 2023-12-16 17:43:52 -08:00
metonym
053beeef7c
fix(package): include types in exports map (#1865)
Fixes #1863
2023-12-16 17:42:57 -08:00
metonym
42519690b7 chore(docs): upgrade deps
Modernize the docs set-up to use Vite 5 so that the exports map works.
2023-12-16 14:06:46 -08:00
metonym
64b39be524 chore(examples): bump deps 2023-12-16 13:39:25 -08:00
Eric Liu
2dde45a831 v0.82.5 2023-12-16 09:24:44 -08:00
Hyunseung
7bef3fae62
chore: add exports field to package.json (#1864)
Add an `exports` field to resolve a Vite development warning. The `package.json#svelte` entry field is deprecated and will eventually no longer be used.
2023-12-16 09:19:57 -08:00
Eric Liu
292881dc3e chore: remove types/README.md [ci skip]
Avoid publishing this file as part of the package since this is not relevant to consumers of the library.
2023-12-07 19:08:00 -08:00
metonym
6c9cf9e043
fix(header-search): blur input when active is false (#1857) 2023-11-23 07:41:22 -08:00
Eric Liu
decf966dd7 v0.82.4 2023-11-21 11:59:20 -08:00
metonym
192f6a775c
fix(header-search): blur input when deactivating (#1855) 2023-11-21 11:55:32 -08:00
metonym
d4e590fb07
docs: rework keyboard shortcuts to focus search bar (#1854) 2023-11-21 11:48:22 -08:00
metonym
f630007220 v0.82.3 2023-11-21 10:18:02 -08:00
metonym
e667352329
fix(header-search): "Escape" should close empty search bar (#1853) 2023-11-21 10:17:19 -08:00
metonym
b0b51a818a
docs: "/" or "CMD+K" should focus search bar (#1852) 2023-11-21 10:16:21 -08:00
Eric Liu
5d8e9aceb4 v0.82.2 2023-11-20 13:44:58 -08:00
metonym
e5e13a9e78
docs: implement rudimentary full-text search (#1849) 2023-11-20 13:39:06 -08:00
metonym
6da4572c26
fix(header-search): "Escape" should clear search query (#1851) 2023-11-20 13:37:34 -08:00
metonym
d68dc18266
fix(header-search): vertically center button icons (#1850) 2023-11-20 13:36:59 -08:00
metonym
6b80f10a4c v0.82.1 2023-11-18 10:21:43 -08:00
metonym
bed073c2f7
fix(pagination-nav): set button type="button" to prevent form submission (#1846) 2023-11-18 10:18:42 -08:00
metonym
4a3c697d82 docs: bump number of icons/pictograms [ci skip] 2023-11-17 09:13:25 -08:00
metonym
116c7bf245 v0.82.0 2023-11-13 07:59:15 -08:00
metonym
7b46d9b059
docs: add link rel="canonical" to pages (#1845) 2023-11-12 14:48:38 -08:00
metonym
0fdb9aa9e2
docs: update CONTRIBUTING.md (#1842) 2023-11-12 14:25:37 -08:00
metonym
1ad4e3d385
feat(tree-view): add showNode accessor (#1844)
Closes #1377
2023-11-12 14:25:15 -08:00
metonym
6a55fef62e
feat(tree-view): make node slottable (#1843)
Closes #1660
2023-11-12 14:15:28 -08:00
Eric Liu
417102d01f v0.81.3 2023-11-07 19:27:07 -08:00
Eric Liu
c70c49a4f2 ci: use --force install and add build permissions 2023-11-07 19:27:07 -08:00
Eric Liu
30b325f81f ci: add workflow to publish to npm 2023-11-07 19:01:46 -08:00
Eric Liu
a9460e944d
fix(select-item): export class and style props (#1840)
Closes #1839
2023-11-07 18:58:45 -08:00
Eric Liu
8d5ef9c93e
chore: create SECURITY.md
#1837
2023-11-07 18:42:46 -08:00
Eric Liu
001d2afb78
docs(form): fix typo in "Form" example (#1841)
Closes #1813
2023-11-05 19:39:38 -08:00
Eric Liu
fee236194b
chore: update docs site link with new URL (#1838) 2023-11-03 18:18:34 -07:00
Eric Liu
a6231d4b99 ci: deploy should be a step, not a job 2023-10-29 10:22:09 -07:00