carbon-components-svelte 0.89.7 → 0.89.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/css/_checkbox-readonly.scss +54 -0
- package/css/_text-area-warn.scss +46 -0
- package/css/all.css +1 -1
- package/css/all.scss +2 -0
- package/css/g10.css +1 -1
- package/css/g10.scss +2 -0
- package/css/g100.css +1 -1
- package/css/g100.scss +2 -0
- package/css/g80.css +1 -1
- package/css/g80.scss +2 -0
- package/css/g90.css +1 -1
- package/css/g90.scss +2 -0
- package/css/white.css +1 -1
- package/css/white.scss +2 -0
- package/package.json +2 -3
- package/src/Button/Button.svelte +11 -2
- package/src/Checkbox/Checkbox.svelte +23 -2
- package/src/ComboBox/ComboBox.svelte +37 -5
- package/src/ComposedModal/ComposedModal.svelte +21 -4
- package/src/ComposedModal/ModalFooter.svelte +1 -1
- package/src/ContextMenu/ContextMenuOption.svelte +123 -4
- package/src/DataTable/DataTable.svelte +77 -30
- package/src/DataTable/ToolbarBatchActions.svelte +31 -10
- package/src/DatePicker/DatePicker.svelte +21 -4
- package/src/DatePicker/DatePickerInput.svelte +1 -1
- package/src/Dropdown/Dropdown.svelte +8 -20
- package/src/FileUploader/FileUploader.svelte +1 -0
- package/src/FileUploader/FileUploaderButton.svelte +15 -4
- package/src/FileUploader/FileUploaderDropContainer.svelte +4 -2
- package/src/ListBox/ListBox.svelte +1 -1
- package/src/LocalStorage/LocalStorage.svelte +20 -0
- package/src/Modal/Modal.svelte +22 -5
- package/src/MultiSelect/MultiSelect.svelte +104 -82
- package/src/NumberInput/NumberInput.svelte +129 -35
- package/src/Pagination/Pagination.svelte +3 -8
- package/src/RadioButton/RadioButton.svelte +9 -2
- package/src/RadioButtonGroup/RadioButtonGroup.svelte +11 -0
- package/src/Select/Select.svelte +5 -3
- package/src/Slider/Slider.svelte +3 -1
- package/src/TextArea/TextArea.svelte +34 -5
- package/src/TextInput/PasswordInput.svelte +1 -1
- package/src/TextInput/TextInput.svelte +2 -3
- package/src/Toggle/Toggle.svelte +7 -4
- package/src/Tooltip/Tooltip.svelte +14 -3
- package/src/UIShell/Header.svelte +15 -1
- package/src/UIShell/HeaderNavItem.svelte +49 -2
- package/src/UIShell/HeaderNavMenu.svelte +51 -5
- package/src/UIShell/SideNav.svelte +1 -0
- package/types/Button/Button.svelte.d.ts +8 -0
- package/types/Checkbox/Checkbox.svelte.d.ts +6 -0
- package/types/ComboBox/ComboBox.svelte.d.ts +18 -1
- package/types/ComposedModal/ComposedModal.svelte.d.ts +3 -1
- package/types/ComposedModal/ModalFooter.svelte.d.ts +1 -1
- package/types/DataTable/DataTable.svelte.d.ts +17 -5
- package/types/DataTable/ToolbarBatchActions.svelte.d.ts +7 -0
- package/types/DatePicker/DatePickerInput.svelte.d.ts +1 -1
- package/types/Dropdown/Dropdown.svelte.d.ts +1 -1
- package/types/ListBox/ListBox.svelte.d.ts +1 -1
- package/types/Modal/Modal.svelte.d.ts +3 -1
- package/types/MultiSelect/MultiSelect.svelte.d.ts +1 -1
- package/types/NumberInput/NumberInput.svelte.d.ts +8 -1
- package/types/RadioButtonGroup/RadioButtonGroup.svelte.d.ts +6 -0
- package/types/Select/Select.svelte.d.ts +2 -2
- package/types/TextArea/TextArea.svelte.d.ts +16 -2
- package/types/TextInput/PasswordInput.svelte.d.ts +1 -1
- package/types/TextInput/TextInput.svelte.d.ts +2 -3
- package/types/Toggle/Toggle.svelte.d.ts +6 -0
- package/types/UIShell/Header.svelte.d.ts +7 -0
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Design systems facilitate design and development through reuse, consistency, and
|
|
|
14
14
|
The Carbon Svelte portfolio also includes:
|
|
15
15
|
|
|
16
16
|
- **[Carbon Icons Svelte](https://github.com/carbon-design-system/carbon-icons-svelte)**: 2,500+ Carbon icons as Svelte components
|
|
17
|
-
- **[Carbon Pictograms Svelte](https://github.com/carbon-design-system/carbon-pictograms-svelte)**: 1,
|
|
17
|
+
- **[Carbon Pictograms Svelte](https://github.com/carbon-design-system/carbon-pictograms-svelte)**: 1,400+ Carbon pictograms as Svelte components
|
|
18
18
|
- **[Carbon Charts Svelte](https://github.com/carbon-design-system/carbon-charts/tree/master/packages/svelte)**: 25+ charts, powered by d3
|
|
19
19
|
- **[Carbon Preprocess Svelte](https://github.com/carbon-design-system/carbon-preprocess-svelte)**: Collection of Svelte preprocessors for Carbon
|
|
20
20
|
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// This file backports readonly checkbox styles from carbon-components v11+
|
|
2
|
+
// to ensure compatibility with carbon-components v10.58.12.
|
|
3
|
+
// The readonly checkbox feature was added to Carbon Design System in Nov 2022.
|
|
4
|
+
|
|
5
|
+
//
|
|
6
|
+
// Copyright IBM Corp. 2016, 2023
|
|
7
|
+
//
|
|
8
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
9
|
+
// LICENSE file in the root directory of this source tree.
|
|
10
|
+
//
|
|
11
|
+
|
|
12
|
+
@import 'carbon-components/scss/globals/scss/vars';
|
|
13
|
+
@import 'carbon-components/scss/globals/scss/helper-mixins';
|
|
14
|
+
@import 'carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/import-once/import-once';
|
|
15
|
+
|
|
16
|
+
/// Readonly checkbox styles
|
|
17
|
+
/// @access private
|
|
18
|
+
/// @group checkbox
|
|
19
|
+
@mixin checkbox-readonly {
|
|
20
|
+
//----------------------------------------------
|
|
21
|
+
// Read-only
|
|
22
|
+
// ---------------------------------------------
|
|
23
|
+
.#{$prefix}--checkbox-wrapper--readonly .#{$prefix}--checkbox-label {
|
|
24
|
+
cursor: default;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.#{$prefix}--checkbox-wrapper--readonly .#{$prefix}--checkbox-label-text {
|
|
28
|
+
cursor: text;
|
|
29
|
+
user-select: text;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.#{$prefix}--checkbox-wrapper--readonly
|
|
33
|
+
.#{$prefix}--checkbox
|
|
34
|
+
+ .#{$prefix}--checkbox-label::before {
|
|
35
|
+
border-color: $disabled-02;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.#{$prefix}--checkbox-wrapper--readonly
|
|
39
|
+
.#{$prefix}--checkbox:checked
|
|
40
|
+
+ .#{$prefix}--checkbox-label::before {
|
|
41
|
+
border: 1px solid $disabled-02;
|
|
42
|
+
background: transparent;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.#{$prefix}--checkbox-wrapper--readonly
|
|
46
|
+
.#{$prefix}--checkbox:checked
|
|
47
|
+
+ .#{$prefix}--checkbox-label::after {
|
|
48
|
+
border-color: $text-01;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@include exports('checkbox-readonly') {
|
|
53
|
+
@include checkbox-readonly;
|
|
54
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// This file backports textarea warning styles from carbon-components v11+
|
|
2
|
+
// to ensure compatibility with carbon-components v10.58.12.
|
|
3
|
+
// The warning state feature provides consistency with other input components.
|
|
4
|
+
|
|
5
|
+
//
|
|
6
|
+
// Copyright IBM Corp. 2016, 2023
|
|
7
|
+
//
|
|
8
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
9
|
+
// LICENSE file in the root directory of this source tree.
|
|
10
|
+
//
|
|
11
|
+
|
|
12
|
+
@import 'carbon-components/scss/globals/scss/vars';
|
|
13
|
+
@import 'carbon-components/scss/globals/scss/helper-mixins';
|
|
14
|
+
@import 'carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/import-once/import-once';
|
|
15
|
+
|
|
16
|
+
/// Textarea warning styles
|
|
17
|
+
/// @access private
|
|
18
|
+
/// @group text-area
|
|
19
|
+
@mixin text-area-warn {
|
|
20
|
+
//----------------------------------------------
|
|
21
|
+
// Warning state
|
|
22
|
+
// ---------------------------------------------
|
|
23
|
+
.#{$prefix}--text-area--warning {
|
|
24
|
+
padding-right: $carbon--spacing-08;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.#{$prefix}--text-area__invalid-icon.#{$prefix}--text-area__invalid-icon--warning {
|
|
28
|
+
fill: $support-warning;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.#{$prefix}--text-area__invalid-icon.#{$prefix}--text-area__invalid-icon--warning path[fill] {
|
|
32
|
+
fill: $inverse-01;
|
|
33
|
+
opacity: 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.#{$prefix}--text-area__wrapper[data-warn]~.#{$prefix}--form-requirement {
|
|
37
|
+
display: block;
|
|
38
|
+
overflow: visible;
|
|
39
|
+
max-height: rem(200px);
|
|
40
|
+
font-weight: 400;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@include exports('text-area-warn') {
|
|
45
|
+
@include text-area-warn;
|
|
46
|
+
}
|