Commit graph

845 commits

Author SHA1 Message Date
metonym
fd42cb3891
fix(ui-shell): remove Content left margin if SideNav is collapsed (#1428)
Fixes #1145
Alternative to #1406
2022-08-06 08:27:45 -07:00
metonym
45f14f160e
refactor: use class directive in TextInput, DatePickerInput (#1426)
Dynamically-formed class names should be avoided for easier static analysis. The Svelte `class:` directive should be used instead.
2022-08-05 05:21:49 -07:00
metonym
d2cc75d883
fix(notification): avoid dynamic class names in NotificationButton, NotificationIcon (#1425)
Fixes https://github.com/carbon-design-system/carbon-preprocess-svelte/issues/39
2022-08-05 05:20:21 -07:00
metonym
7fe9b39436
fix(number-input): forward keydown, keyup events (#1424)
Fixes #1421

`NumberInput` should forward the keydown and keyup events like other input components.
2022-08-05 04:50:40 -07:00
István Pató
de81ef99af
fix(combo-box): correctly select item in a non-filterable ComboBox (#1419)
Fixes #1222

A non-filterable ComboBox will select the item that matches the typed value when pressing "Enter." An unknown (unmatched) value will select the first item.
2022-08-04 09:58:32 -07:00
metonym
8a40191c76
fix(toggle): override margin top if hideLabel is true (#1417)
Fixes #1413
2022-07-26 08:19:49 -07:00
metonym
7f7bf51f56
fix(pagination): correctly pluralize default item text (#1416)
Fixes #1412
2022-07-26 07:59:40 -07:00
metonym
a3264bd667
fix(toggle): labelText should not be selectable (#1415)
This adds a `user-select: none` rule to avoid selecting the `Toggle` label text when rapidly clicking it.
2022-07-26 07:21:19 -07:00
metonym
f4d12b805a
fix(toggle): add missing hideLabel prop (#1414)
* fix(toggle): add missing hideLabel prop

* Run "yarn build:docs"

* test(toggle): assert hideLabel prop

* docs(toggle): add "Hidden label text" example
2022-07-26 07:12:57 -07:00
Johannes
8bd615b250
fix(combobox): value should call itemToString with filtered item (#1411)
Fixes #1405

When using the `shouldFilterItem` prop, the `ComboBox` does not display the custom label set with `itemToString` in the input after a selection.
2022-07-23 06:15:11 -07:00
metonym
638a43714f
fix(side-nav): set high z-index on open overlay (#1388)
Fixes #786

The UI Shell `SideNav` overlay can sometimes be superseded by other elements. This applies a `z-index` value of `6000` to the overlay when open.
2022-07-12 19:43:45 -07:00
metonym
aee7f3ba76
Revert "Revert "fix(notification): on:close should be cancellable (#1379)" (#1381)" (#1382)
This reverts commit 052acfc2ce.
2022-06-29 11:11:33 -07:00
metonym
052acfc2ce
Revert "fix(notification): on:close should be cancellable (#1379)" (#1381)
This reverts commit 924b6d352e.
2022-06-29 10:57:37 -07:00
tlkh40
924b6d352e
fix(notification): on:close should be cancellable (#1379)
Fixes #927
2022-06-29 07:08:51 -07:00
metonym
5a8bd9ca57
chore(code-snippet): preserve custom copy event type (#1375) 2022-06-27 05:44:05 -07:00
metonym
c346b8edc0
fix(side-nav-menu): remove title attribute from menu icon (#1373) 2022-06-26 13:56:08 -07:00
metonym
d5d6294b02
refactor(code-snippet): pass required text prop to CopyButton (#1372)
This also passes the `copy` prop to `CopyButton` instead of wrapping it in another function.
2022-06-25 16:26:27 -07:00
metonym
6a3614bf55
fix(password-input): support invalid state when used in a FluidForm (#1371)
* fix(password-input): support invalid state when used in a `FluidForm`

* docs(fluid-form): add example "Invalid state"
2022-06-25 08:17:19 -07:00
metonym
83c11fd460
fix(side-nav-menu): chevron icon should not be focusable (#1369) 2022-06-23 05:55:01 -07:00
metonym
388a05c290
fix(side-nav-menu): expanded SideNavMenu should not have a max-height (#1368)
* fix(side-nav-menu): expanded `SideNavMenu` should not have a max-height (fixes #1361)

* chore(docs): remove max-height override
2022-06-23 05:52:02 -07:00
metonym
9fcf9855e6
fix(composed-modal): node to focus is possibly null (#1364)
Fixes #1360
2022-06-22 06:24:02 -07:00
metonym
1ccdf64504
feat(slider): add fullWidth prop (#1354)
The `bx--slider` class in the `Slider` component has max-width of `40rem`. Because `$$restProps` is spread to the top-level `div` element in `Slider`, the only way to override the style is to do so globally:

```css
:global(.bx--slider-container) {
  width: 100%;
}

:global(.bx--slider) {
  max-width: none;
}
```

This adds a `fullWidth` prop that sets a full width style using inline style attributes.
2022-06-18 12:47:10 -07:00
metonym
511d7c24e6
fix(select): do not dispatch "change" event on initial load (#1356)
Follow-up to #1353

If `selected` is `undefined` or not provided, the "change" event will be dispatched since the first `SelectItem` value will be set as the default.

The "change" event should only be dispatched when the value is actually changed.
2022-06-18 12:27:27 -07:00
metonym
b4d0205080
chore(select): update dispatched change event type (#1357)
Follow-up to #1355
2022-06-18 12:26:46 -07:00
metonym
78d3f1328a
feat(select): support selected prop number type (#1355)
* feat(select): support number type

* Run "yarn build:docs"

* refactor(pagination): do not coerce `pageSize`, `page` to be numbers

* test(select): assert selected prop number type
2022-06-18 11:09:41 -07:00
metonym
f8b1c8a23a
fix(select): use first SelectItem value as default if selected is undefined (#1353)
Fixes #570
2022-06-18 10:13:42 -07:00
metonym
eb381190c9
fix(tree-view): fix type error when keyboard navigating an expanded node (#1350)
Fixes #1349
2022-06-15 07:14:09 -07:00
jorgebv
0f060ea035
fix(data-table): table header keys should be reactive (#1346)
Fixes #1345

Co-authored-by: Jorge Vergara <jbvergara@bethel.jw.org>
2022-06-12 18:09:33 -07:00
metonym
b21718ccfd
fix(time-picker): use native binding for value prop (#1344) 2022-06-12 08:09:43 -07:00
metonym
8e52e13ee9
fix: use native binding for value prop in ComboBox, MultiSelect (#1343)
* fix(combo-box): use native binding for value prop (fixes #1262)

* fix(multi-select): use native binding for value prop
2022-06-12 07:12:11 -07:00
metonym
e56ee83dc4
hotfix(data-table): column sort direction order should be independent (#1342)
Fixes #1341
2022-06-09 11:14:14 -07:00
brunnerh
37aa207c85
refactor(modal): simply nested modals logic (#1339)
Cleans up #1331 to reuse shared logic between `Modal`, `ComposedModal`.
2022-06-07 07:43:02 -07:00
metonym
95b32937d6
perf(data-table): save rows reference when reducing (#1338)
d2cdb8eb0f (r75383503)
2022-06-05 14:24:37 -07:00
metonym
72c24b83b2
feat(data-table): support programmatic sorting (#1337)
* refactor(data-table): pass down sortable props instead of using context

* feat(data-table): support programmatic sorting

* test(data-table): assert new props

* docs(data-table): add "Programmatic sorting" example

* refactor(data-table): remove unused tableSortable store

* refactor(data-table): remove unused indices
2022-06-05 13:37:50 -07:00
metonym
d2cdb8eb0f
fix(data-table): do not overwrite row.cells property (#1336)
* refactor(data-table): remove unneeded third argument from resolvePath call

* fix(data-table): do not overwrite `cells` property (#667)

* perf(data-table): early return if path in object when resolving path
2022-06-05 13:29:58 -07:00
metonym
260bf4e040
breaking(types): type arrays as read-only (#1335)
Closes #1259

* breaking(types): type arrays as read-only

* Run "yarn build:docs"

* test: assert read-only arrays
2022-06-05 13:25:43 -07:00
metonym
e62bea38aa
refactor(modal): set alert dialog attributes in markup (#1333) 2022-06-02 18:41:18 -07:00
metonym
e230db8115
feat: forward paste event to input/textarea elements (#1332)
* chore(deps-dev): upgrade sveld, svelte-check

* feat: forward paste event to input/textarea elements

* Run "yarn build:docs"

* test: assert paste event
2022-06-02 18:39:49 -07:00
metonym
f25a10c9c4
feat: support item.disabled key for Dropdown, MultiSelect, ComboBox (#1328)
Closes #1326

* feat: support item.disabled key for `Dropdown`, `MultiSelect`, `ComboBox`

* Run "yarn build:docs"

* test: assert disabled property

* docs: add "Disabled items" examples
2022-06-02 17:56:30 -07:00
metonym
22f93ee675
fix(modal): nested modals should correctly toggle the body class (#1331)
Fixes #1324
2022-06-02 17:56:07 -07:00
metonym
0063c01beb
breaking(dropdown): remove useless inline prop (#1329)
* breaking(dropdown): remove useless `inline` prop

* Run "yarn build:docs"
2022-06-02 17:36:46 -07:00
metonym
66c96612bf
fix(dropdown): remove redundant role/id (#1327)
* fix(list-box): list box item should have a role and `aria-selected` attribute

* fix(dropdown): remove redundant role/id
2022-06-01 18:55:27 -07:00
metonym
c90594002a
fix(checkbox): do not set title attribute if already provided (#1323)
* fix(checkbox): do not set title attribute if already provided

* Run "yarn build:docs"
2022-05-29 10:42:36 -07:00
metonym
0f621c2545
fix(tabs): selected tab should not steal focus if updated programmatically (#1320)
Fixes #572
2022-05-29 10:12:55 -07:00
metonym
0801e1d078
refactor: prefer class directive over class attribute (#1318) 2022-05-29 08:16:27 -07:00
metonym
40e18fbc88
feat: set title attribute in CheckBox, MultiSelect, Dropdown, ComboBox if label is truncated (#1317)
* feat(checkbox): set title attribute if label is truncated

* feat(list-box-menu-item): set title attribute if label is truncated
2022-05-29 08:16:17 -07:00
metonym
31dacd53ab
fix(data-table): apply custom widths to empty columns (#1314)
Fixes #1313
2022-05-25 18:50:55 -07:00
metonym
04d758f869
fix: CopyButton text prop and Dropdown selectedId prop should be required (#1311)
* chore(deps-dev): upgrade sveld to v0.17.0

* fix(copy-button): text prop is required

* fix(dropdown): selectedId prop is required

* Run "yarn build:docs"

* docs: display "Required" tag for required props
2022-05-22 12:39:53 -07:00
metonym
003ab653eb
fix(theme): use @see tag for link in tokens prop description (#1309)
* fix(theme): use `@see` tag for link in tokens prop description

* Run "yarn build:docs"
2022-05-18 19:28:38 -07:00
metonym
cae1f1939e
fix(modal): remove close button title attribute, add aria-hidden to icons (#1308)
* fix(modal): close button should not have a title

* fix(modal): close icon should not have aria-label

* fix(modal): close button icons should have `aria-hidden="true"
2022-05-18 19:00:21 -07:00