Commit graph

845 commits

Author SHA1 Message Date
Eric Liu
36f6a327b2
hotfix: fix remaining imports from carbon-icons-svelte (#905) 2021-11-12 13:09:43 -08:00
Eric Liu
040e3d3372
Inline carbon icons, remove carbon-icons-svelte from dependencies (#904)
* feat(icons): inline carbon icons used by components

* feat(icons): update svelte components to use inlined carbon icons

* breaking(deps): remove carbon-icons-svelte

* chore(deps-dev): install carbon-icons-svelte as a devDependency
2021-11-11 08:54:45 -08:00
Eric Liu
4df812bc3f
fix(date-picker): set calendar to null (#903)
Fixes #878
2021-11-11 08:04:06 -08:00
Eric Liu
ea6757d020
Add autoWidth prop to Tabs (#901)
* feat(tabs): support auto width tabs

Closes #899

* docs(tabs): add auto width example
2021-11-10 19:46:20 -08:00
Eric Liu
08402e54bf
feat(form): add ref prop (#900)
Closes #877
2021-11-10 19:46:14 -08:00
Eric Liu
32beeac85b
fix(text-input): coerce TextInput value to number if type is numerical (#902)
Fixes #898
2021-11-10 14:45:13 -08:00
Paweł Malinowski
7e76cbc8a9
fix(Tooltip): fix two way binding in cases where icon is in focus (#895) 2021-11-09 14:52:40 -08:00
Eric Liu
b22058f54e hotfix(expandable-tile): set relative position in tile 2021-11-07 12:09:51 -08:00
Paweł Malinowski
f32f8fb9dc
fix(ToolTip): better toggling logic (#885)
* fix(ToolTip): better toggling logic

* fix(ToolTip): remove redundant click handler

* fix(ToolTip): ensure at most one ToolTip is open at the same time

- a click event closes the tooltip if the target is not the tooltip or
  the tooltip icon.
- the event is registered in the capture phase and a `setTimeout` is used to
  deal with edge cases in which a button is used to toggle the tooltip
  on or off.
2021-11-07 12:03:32 -08:00
Eric Liu
b3a73cf80c
fix(data-table): avoid triggering click:row when clicking expandable row chevron (#890)
Fixes #889
2021-11-06 10:33:33 -07:00
Eric Liu
fb7ebb93cb
fix(data-table): expand batch expansion chevron if all rows are expanded #867 (#873)
Fixes #867
2021-10-22 07:18:03 -07:00
Daniel Miedzik
51cd4ec342
fix #869 (#870) 2021-10-21 08:26:47 -07:00
Eric Liu
2aeeb728a2
fix(data-table): collapse batch expansion button if one or more rows collapsed #867 (#868) 2021-10-20 17:45:53 -07:00
Eric Liu
7b65a15345
Omit explicit "from carbon-icons-svelte" from icon prop definitions (#866)
* fix(types): update description for icon props #865

* docs(component-api): remove hardcoded Carbon Svelte icon description
2021-10-20 13:48:52 -07:00
Eric Liu
c64075acbe
fix(data-table): include border style for non-expandable rows (#864)
* fix(data-table): include border style for non-expandable rows

Fixes #861

* docs(data-table): use batchExpansion for non-expandable rows example [ci skip]
2021-10-20 10:02:10 -07:00
Eric Liu
96d848e9ef
feat(data-table): add nonExpandableRowIds prop (#862)
* feat(data-table): add nonExpandableRowIds prop #861

* test(data-table): validate nonExpandableRowIds prop

* docs(data-table): add Non-expandable rows example
2021-10-19 07:25:22 -07:00
Eric Liu
b616243b7f
fix(date-picker-input): avoid opening calendar if input is descendant of disabled fieldset #857 (#860) 2021-10-17 12:50:21 -07:00
Eric Liu
3203e7a61f
Upgrade sveld to v0.10 (#856)
* chore(deps-dev): upgrade sveld to v0.10.2

* feat(types): regenerate types using sveld@0.10.2

* fix(types): update @extends to use .svelte extension
2021-10-16 12:34:29 -07:00
Eric Liu
c6fc8548d3
Align v10.46 (#854)
* chore(deps-dev): upgrade carbon-components to v10.46.0

* feat(tag): support outline type

* feat(multi-select): add hideLabel prop

* chore: delete unused publish-examples.js

* chore(deps-dev): remove gh-pages

* chore: remove publish-examples script

* chore(deps-dev): upgrade carbon-components to v10.46.0

* feat(tag): support outline type

* feat(multi-select): add hideLabel prop

* chore: delete unused publish-examples.js

* chore(deps-dev): remove gh-pages

* chore: remove publish-examples script

* chore: rebuild component index
2021-10-15 17:03:45 -07:00
Eric Liu
b21600c9d6
feat(types): loosen icon prop type to allow any Svelte component #806 (#853)
* feat(types): loosen type for Carbon icons #806

* Add closeIcon option and remove stopPropagation on:click in HeaderAction (#840)

* Remove stopPropagation on:click

Remove stopPropagation on:click helps when you have more then one acction to switch between actions tabs

* fix bug for default icon

* add closeIcon attribute to HeaderAction

* feat(types): loosen type for Carbon icons #806

* chore: update TreeView, HeaderAction icon types

Co-authored-by: Daniel Miedzik <daniel.miedzik@gmail.com>
2021-10-15 16:40:23 -07:00
Daniel Miedzik
1581bc0122
Add closeIcon option and remove stopPropagation on:click in HeaderAction (#840)
* Remove stopPropagation on:click

Remove stopPropagation on:click helps when you have more then one acction to switch between actions tabs

* fix bug for default icon

* add closeIcon attribute to HeaderAction
2021-10-15 16:23:34 -07:00
Eric Liu
6759d3e8a0
fix(progress-indicator): prevent keyboard navigation for incomplete steps #851 (#852) 2021-10-15 07:21:47 -07:00
Eric Liu
c4413636a4
Programmatically expand/collapse TreeView nodes (#850)
* feat(tree-view): add accessors to programmatically expand/collapse nodes

* feat(tree-view): update docs/types

* test(tree-view): test updated TreeView accessors

* docs(tree-view): document TreeView accessors
2021-10-13 08:54:37 -07:00
KoichiKiyokawa
fed34e40ed
fix: add a value prop to Checkbox (#849) 2021-10-13 07:38:51 -07:00
Paweł Malinowski
d3eb146fb5
fix(DataTable): handle null/undefined values when sorting (#846) 2021-10-11 10:11:59 -07:00
KoichiKiyokawa
05f9d2afb3
fix: menuOptionsClass in OverflowMenu (#836) 2021-10-04 09:18:48 -07:00
Eric Liu
ee9bb22768
fix(clickable-tile): explicitly type restProps (#831) 2021-09-28 08:55:16 -07:00
Florian-Schoenherr
dbf1f225dc
fix(DataTable): useStaticWidth fix for title/description (#824)
* fix(DataTable): useStaticWidth title/description

Signed-off-by: Florian-Schoenherr <florian.schoenherr99@gmail.com>

* docs(DataTable): useStaticWidth title/description

Signed-off-by: Florian-Schoenherr <florian.schoenherr99@gmail.com>

* chore(deps-dev): upgrade carbon-components, sass

Co-authored-by: metonym <ericyl.us@gmail.com>
2021-09-23 08:55:06 -07:00
Eric Liu
70163b36f8
fix(combo-box): remove redundant clear events #817 (#818)
Fixes #817
2021-09-14 09:56:32 -07:00
Eric Liu
e4e75e5859
Fixes (#814)
* fix(combo-box): clicking chevron should not open the combo box if disabled

Fixes #776

* fix(toolbar-batch-actions): cancel text should be slottable

Fixes #782
2021-09-11 12:29:26 -07:00
metonym
f2a445cb7e feat(date-picker): type flatpickrProps 2021-09-07 08:39:46 -07:00
stilet
bc0b048e30
added the staticProp property for the DatePicker component to work correctly (#794)
* added the staticProp property for the Modal component to work correctly

* Update src/DatePicker/DatePicker.svelte

Co-authored-by: Eric Liu <ericyl.us@gmail.com>

* Update src/DatePicker/DatePicker.svelte

Co-authored-by: Eric Liu <ericyl.us@gmail.com>

Co-authored-by: Leonid <leo@garantum.ru>
Co-authored-by: Eric Liu <ericyl.us@gmail.com>
2021-09-07 08:18:46 -07:00
Eric Liu
e39efc5668 feat: rebuild types, component api 2021-09-06 09:52:00 -07:00
Rafael Dessotti
dfc00f6668
Clear ComboBox Programaticaly (#804)
* Added clear function

* Dispatching clear event

* Exporting function clear

* Added example
2021-09-06 09:47:48 -07:00
airedwin
c1bf34964d
fix: radiobutton slot not working (#799) (#808)
Co-authored-by: Edwin Leong <leong_edwin@bah.com>
2021-09-05 15:34:10 -07:00
Bilux
892c19a8dd
Set a condition for showing legend in FormGroup (#785)
We shouldn't add a <legend> If the the legend text specified.
2021-09-05 13:25:32 -07:00
Eric
d24c60856f
fix(combo-box): fix reactivity regression #768 (#769)
* fix(combo-box): fix reactivity regression #768

Fixes #768

* fix(combo-box): if selectedItem is not defined, default selectedIndex to 0

* fix(combo-box): do not reset selectedIndex to 0, fallback to empty string

* fix(combo-box): reset selectedIndex
2021-07-29 10:09:55 -07:00
Eric
6db4112b40
Fix a11y-mouse-events warning, update docs (#765)
* docs: update number of available Carbon icons

* docs: add svelte:head example for loading CDN styles

* chore(deps-dev): upgrade svelte to 3.40.1

* fix(a11y): disable a11y-mouse-events-have-key-events warning #760

* fix(deps): upgrade carbon-icons-svelte to v10.36.0 to avoid a11y warnings #760

* refactor(overflow-menu): remove formatStyle utility

* docs: links in paragraphs should be inline

* docs: add note on using all styles for dynamic theming
2021-07-26 08:40:05 -07:00
Eric Liu
9114298f76
Align 10.40 (#763)
* docs: fix typo [ci skip]

* docs(tree-view): update expanded nodes guidance

* chore(deps-dev): upgrade carbon-components to v10.40.0

* build(css): omit treeview SCSS import

treeview.scss is included in global styles.css by default in v10.40.0

* feat(date-picker): add helperText prop

Ref: 4b5b5fdf8
2021-07-22 16:56:51 -07:00
Phil Mayer
af26bdb10a
fix: close overlays on window click (#761) 2021-07-22 09:44:23 -07:00
Eric Liu
793ecd8dc2
fix(button): only set disabled attribute if true #755 (#757)
* fix(button): only set disabled attribute if true #755

Fixes #755

* Improve docs (#756)

* docs: remove Theme from new components

* docs: add styling instructions

* docs: add styling instructions

* docs: update copy

* fix(button): only set disabled attribute if true #755

Fixes #755

* docs(button): use inline notification for note [ci skip]
2021-07-18 05:53:56 -07:00
Eric Liu
d01995e11e
feat(tree-view): add expandedIds #750 (#751) 2021-07-15 07:49:25 -07:00
Nguyễn Trường Minh
89513fb4cb
fix(DataTable): undefined cell value fallback (#745)
* fix(DataTable): undefined cell value fallback

* Update DataTable.svelte

* fix(data-table): remove "" as the default value for table cells

Co-authored-by: Eric Y Liu <ericyl.us@gmail.com>
2021-07-15 06:37:42 -07:00
Eric Liu
a1e56bd135
Fixes (#749)
* fix(data-table): type DataTableRowId as "any" #530

Fixes #530

* fix(tree-view): make first node focusable if activeId does not match selected

* fix(overflow-menu): set type="button" to prevent default submit behavior #554

Fixes #554

* fix(overflow-menu): update semantic attributes in OverflowMenuItem

* fix(number-input): do not dispatch change event on initialization #561

Fixes #561

* fix(tree-view): make first focusable node tabbable regardless of active/selected states

* fix(date-picker): load rangePlugin dynamically

* build(rollup): enable inlineDynamicImports

* build(rollup): remove "clipboard-copy" global

* fix(overflow-menu): do not render title if using a slot #537

Fixes #537

* fix(select): forward missing focus, input events #501

Fixes #501
2021-07-14 13:48:23 -07:00
Eric Liu
ed395e42b7
fix(tree-view): TreeView should be tab focusable if no active id is provided #747 (#748)
Fixes #747
2021-07-14 08:47:08 -07:00
Eric Liu
fac78ee4aa
feat(theme): add Theme (#741)
* feat(theme): add Theme

* fix(theme): fix broken type test

* docs(theme): add examples

* docs(theme): add description, update carbon theme link [ci skip]

* docs: pre-wrap type code snippet [ci skip]
2021-07-10 16:00:03 -07:00
Eric Liu
b6fa25c3e7
Align v10.39 (#738)
* chore(deps-dev): upgrade carbon-components to v10.39.0

* fix(data-table): deprecate Table shouldShowBorder prop

Ref: 0f7324156

* fix(form-group): add legendId

Ref: 4fc56c30b

* feat(number-input): support readonly variant

Ref: d0bd8eddb

* feat(multi-select): export multiSelectRef, fieldRef, selectionRef

* feat(local-storage): add clearItem, clearAll instance methods

* docs(local-storage): simplify clear example

* docs(local-storage): add instructions [ci skip]

* chore(local-storage): reset value on clear [ci skip]

* chore(local-storage): revert value clear [ci skip]
2021-07-09 13:40:25 -07:00
Eric Liu
edefd6429b
DatePicker rework (#737)
* fix(date-picker): append calendar to date picker element #345

Fixes #345

* fix(date-picker): do not import rangePlugin from esm folder

* fix(date-picker): correctly type change event for single/range types

* feat(date-picker): add valueFrom, valueTo for range datepicker

* docs(date-picker): add range type example

* docs(date-picker): extract range example to iframe

* docs(date-picker): extract single type to iframe
2021-07-08 16:33:03 -07:00
Eric Liu
19dbad1f76
fix(data-table-skeleton): every row should animate text #734 (#736)
* fix(data-table-skeleton): every row should animate text #734

Fixes #734

* fix(data-table-skeleton): revert unkeyed each
2021-07-08 07:58:26 -07:00
Eric Liu
f31ab25e0a
Breakpoint (#733)
* feat(breakpoint): add Breakpoint

* docs(breakpoint): update docs

* refactor(breakpoint): add prop descriptions, type slot

* docs: add missing semicolon to last typedef

* docs: decrease margin bottom for inline snippet

* docs: add Breakpoint to new components [ci skip]

* docs(config): use "scripts-markup-styles" for svelteSortOrder [ci skip]

* docs(breakpoint): label on:match event [ci skip]
2021-07-07 12:40:06 -07:00