Commit graph

279 commits

Author SHA1 Message Date
Sam
5031d0b40e feat(layer): first pass at Layer component (#1932)
Closes #1892
2024-03-23 16:48:13 -07:00
Sam
9efe5255d2 feat!: TextInput v11 Styles (#1889)
* Initial commit

* Fixes [FluidForm] TextInput error icon is misplaced #1667

* Contributes to [TextInput] helperText enhancements #1633

* Adopts Standardize props and events #1621

* Added slots for Standardize props and events #1621

* Added pointer events, updated skeleton TextInput v11 #1888

* Address a bug in the word counter regex

* Update src/TextInput/TextInput.svelte

Correcting type attribute definition for HTML attributes

Co-authored-by: Enrico Sacchetti <esacchetti@gmail.com>

* Update src/TextInput/TextInput.svelte

Correcting type attribute definition for HTML attributes

Co-authored-by: Enrico Sacchetti <esacchetti@gmail.com>

* Update src/TextInput/TextInput.svelte

Explicitly define default value for `size`

Co-authored-by: Enrico Sacchetti <esacchetti@gmail.com>

* Adopted suggested changes

* Updated `TextInput.test`; added forgotten files from previous

---------

Co-authored-by: Samuel Janda <hi@simpleprogramming.com.au>
Co-authored-by: Enrico Sacchetti <esacchetti@gmail.com>
2024-03-23 16:47:54 -07:00
Enrico Sacchetti
4dabb827ee 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-03-23 16:46:40 -07:00
Eric Liu
acd08cde5c docs(ui-shell): remove unused imports 2024-03-18 14:31:28 -07:00
spburtsev
d8bc65163e
feat(ui-shell): support button tooltip in HeaderGlobalAction (#1894)
Closes #1893
2024-03-07 20:37:58 -08:00
metonym
91c27d48bf
docs(tag): add "Tooltip in a tag" example (#1922) 2024-03-05 20:55:06 -08:00
Eric Liu
15f0e03c43 docs(button): add description to "Custom element" 2024-02-25 14:11:51 -08:00
Eric Liu
e8d4ed0382 docs(button): add "Link button with icon" example 2024-02-25 14:11:51 -08:00
Eric Liu
ced9673681 docs(toast-notification): add "Autoclose" example 2024-02-25 13:38:46 -08:00
Eric Liu
c6af8bdafe docs(image-loader): add "Dynamic image source" example 2024-02-24 13:40:02 -08:00
metonym
4e6bfd0612
docs(code-snippet): add "Custom show more/less text" example (#1918) 2024-02-24 10:39:14 -08:00
Eric Liu
1901bcddb6 docs(code-snippet): add "Hidden copy, show more buttons" example 2024-02-24 10:24:59 -08:00
Eric Liu
79b0f8dbf0 docs(code-snippet): add "Hidden show more button" example
Related #1536
2024-02-24 10:24:59 -08:00
Gregor Wassmann
3bd943d12c
chore: linting (#1885) 2024-01-11 06:55:39 -08:00
metonym
1600775968
style(docs): color-scheme reflects theme (#1874) 2023-12-30 10:35:44 -08:00
metonym
d4e590fb07
docs: rework keyboard shortcuts to focus search bar (#1854) 2023-11-21 11:48:22 -08:00
metonym
b0b51a818a
docs: "/" or "CMD+K" should focus search bar (#1852) 2023-11-21 10:16:21 -08:00
metonym
e5e13a9e78
docs: implement rudimentary full-text search (#1849) 2023-11-20 13:39:06 -08:00
metonym
4a3c697d82 docs: bump number of icons/pictograms [ci skip] 2023-11-17 09:13:25 -08:00
metonym
7b46d9b059
docs: add link rel="canonical" to pages (#1845) 2023-11-12 14:48:38 -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
001d2afb78
docs(form): fix typo in "Form" example (#1841)
Closes #1813
2023-11-05 19:39:38 -08:00
Enrico Sacchetti
7ba52df3a1
fix(multi-select): render checkboxes for form data (#1835)
* chore: downgrade docs to svelte 3 for compatibility
* chore(multi-select): keep checkboxes rendered in DOM
* Display ListBox via CSS

See #1742
2023-10-26 21:21:37 -04:00
Eric Liu
a828625c66
docs(button): add "Programmatic focus" example (#1834)
Related #1830
2023-10-23 09:55:00 -07:00
Eric Liu
836b360b9b
fix(tile-group): add name and required props (#1818) 2023-10-03 11:20:16 -07:00
Eric Liu
5ef4dc1a72
docs(radio-button): use name in examples (#1817) 2023-10-03 09:34:01 -04:00
Eric Liu
a1c7d9bd7c
docs(pictograms): update number of pictograms (#1787) 2023-07-27 12:26:53 -07:00
Eric Liu
51c281de4a
feat(file-uploader): add size prop to FileUploaderButton (#1786) 2023-07-24 06:33:53 -07:00
Eric Liu
709322c281
feat(file-uploader-button): support danger-tertiary, danger-ghost button variants (#1784) 2023-07-23 14:34:08 -07:00
Eric Liu
baff07e012
feat(slider): add hideLabel prop (#1777)
Closes #1682

Co-authored-by: siaikin <abc1310054026@outlook.com>
2023-07-23 12:04:39 -07:00
Eric Liu
a369962fdf
fix(expandable-tile): set tile height using resize observer (#1738)
* fix(expandable-tile): set tile max height using Resize Observer

* docs(expandable-tile): update and re-work examples
2023-06-02 13:08:25 -04:00
Sam
60a796ea48
feat(pagination-nav): add tooltipPosition prop (#1733)
* Add `tooltipPosition` to `PaginationNav` per #1656

* Rebuild test

* Update description in documentation

Co-authored-by: Enrico Sacchetti <esacchetti@gmail.com>

* chore: update docs

---------

Co-authored-by: Samuel Janda <hi@simpleprogramming.com.au>
Co-authored-by: Enrico Sacchetti <esacchetti@gmail.com>
Co-authored-by: Enrico Sacchetti <enrico@theetrain.ca>
2023-05-21 13:59:53 -04:00
metonym
8b57f235f2
docs(slider): add label text, value (#1716)
docs(slider): add label text
2023-04-08 15:21:24 -04:00
Hyunseung
4c5d8cd1ed
docs(tag): fix typo (#1705) 2023-03-25 13:18:42 -07:00
Gregor Wassmann
aa2e97f110
docs(theme): use Theme component from library (#1700) 2023-03-24 16:10:50 -07:00
gabrielleecredera
42349ebc61
fix(1684): hide helper text container in password input when not used (#1685) 2023-03-11 14:38:44 -05:00
Jonathan Quintin
7ddbf17cbb
feat(progress-bar): add status prop (#1560)
* ProgressBar status feature added

* ProgressBar: Removed the css variables and use carbon-css instead.
The way of assigning the ProgressBar value has change. It is now a style
variable and scale-x is calculated in the css. This way prevent the
override of carbon css.

* Removed an unessacery span.

* Removed an unnecessary span.

* Added the status for the ProgressBarUx

* Remove `style css` and update docs.

* - Fixed the `capped` variable for more readability
- Updated docs `label` and `helperText`
- Updated docs and css

* fix: finished/error states cannot be indeterminate

* Run "yarn build:css"

* Re-run "yarn build:docs"

* test(progress-bar): assert `status` prop

* chore: add aria-busy and set valuenow to 0 when not active

---------

Co-authored-by: Eric Liu <ericyl.us@gmail.com>
Co-authored-by: Enrico Sacchetti <enrico@theetrain.ca>
2023-02-19 12:34:41 -05:00
metonym
2a8fc00a09
docs(button): add example of disabled, icon-only button (#1651) 2023-02-06 22:26:24 -05:00
metonym
ec867c46ba
fix(tree-view)!: remove expanded property from TreeNode interface (#1631)
* fix(tree-view)!: remove `expanded` property from `TreeNode`

* fix(tree-view-node-list)!: remove unused `expanded` prop

* docs(tree-view): remove `expanded` as a property

#1630
2023-01-17 20:55:46 -05:00
Enrico Sacchetti
50066966da
feat(notification)!: replace iconDescription prop with statusIconDescription, closeButtonDescription (#1591)
Fixes #672, fixes #1563

* breaking: remove `iconDescription` prop from `InlineNotification`, `ToastNotification`

* breaking: require `iconDescription` prop in `NotificationIcon`

* feat: add new `statusIconDescription` and `closeButtonDescription` to `InlineNotification`, `ToastNotification`
2022-12-18 15:28:23 -08:00
Enrico Sacchetti
8d55752a18
fix(pagination-nav)!: use 1-indexing to be consistent with Pagination (#1518)
Fixes #1513
2022-12-13 10:23:04 -08:00
Enrico Sacchetti
9198ed5474
feat!: dispatch "change" event in Pagination, rename "change" to "update" in Select (#1497)
Closes #1491

* feat(pagination): dispatch "change" event when interacting with previous/next buttons, page/page size dropdowns

* breaking(select): rename dispatched "change" event to "update"

* breaking(select): forward `change` event to `Select`
2022-12-13 10:22:17 -08:00
metonym
27da2a0f8b
docs: link source code to folder for multiple components (#1582)
* docs: link source code to folder for multiple components

* chore(docs): remove unused `source` from frontmatter
2022-12-10 20:49:42 -05:00
DetachHead
948b5a1488 docs: fix link to carbon-components (#1571) 2022-12-07 20:25:47 -08:00
Eric Liu
a3204cc131 docs(popover): simplify external element example 2022-12-07 20:13:13 -08:00
Maxime Fafard
0f8a57b9d2
fix(popover): fire "click:outside" event when clicking sibling elements (#1570) 2022-12-07 20:10:45 -08:00
Jonathan Quintin
e6f5766e46
fix(number-input): support floating point values (#1555)
Fixes #233, fixes #486, fixes #1554
2022-12-07 20:06:29 -08:00
metonym
b5b392963e
docs(pagination-nav): add more examples (#1514)
Adds "Reactive example," "Total," "Shown," and "Custom button text."
2022-10-08 13:38:11 -07:00
metonym
59c02c9a92
docs: update README, links (#1509)
* docs: add note on using `optimizeImports` with `svelte-preprocess` (Closes #1500)

* docs: point link to SASS guide to v10 (#1489)

* docs: remove note on minimum Svelte version as it's been almost half a year since 3.48 was released
2022-10-03 20:32:48 -07:00