Skip to content

Commit bdecb22

Browse files
authored
Merge branch 'next' into selector-update
2 parents 4e3dd54 + 1bc0d23 commit bdecb22

19 files changed

+54
-24
lines changed

.storybook/preview.js

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,22 @@ import {
1717
* This is to prevent properties like `onTouched = () => {...}` & `propagateChange = () => {}`
1818
* from being rewritten as string by storybook.
1919
*/
20-
components = components.map(comp => {
21-
return {
22-
...comp,
23-
// Removes properties
24-
propertiesClass: [],
25-
outputsClass: comp.outputsClass.map((output) => {
26-
return {
27-
...output,
28-
// Prevents control type appearing as `string`
29-
defaultValue: undefined
30-
}
31-
})
32-
}
33-
});
20+
components = components.map(comp => ({
21+
...comp,
22+
inputsClass: comp.inputsClass.map((input) => ({
23+
...input,
24+
// Storybook does not seem to display deprecated message currently
25+
// Bypassing this by updating rawdescription
26+
rawdescription: input.deprecated ? `**@Deprecatated**\n\n${input.deprecationMessage}` : input.rawdescription
27+
})),
28+
// Removes properties
29+
propertiesClass: [],
30+
outputsClass: comp.outputsClass.map((output) => ({
31+
...output,
32+
// Prevents control type appearing as `string`
33+
defaultValue: undefined
34+
}))
35+
}));
3436

3537
// Integrate compodoc documentation with storybook
3638
setCompodocJson({

src/code-snippet/code-snippet.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ export class CodeSnippet extends BaseIconButton implements OnInit, AfterViewInit
182182
*/
183183
@HostBinding("class.cds--snippet--wraptext") @Input() wrapText = false;
184184
/**
185-
* Set to `"light"` to apply the light style on the code snippet.
185+
* @deprecated since v5 - Use `ibmLayer` directive instead
186+
* Set to `"light"` to apply the light style
186187
*/
187188
@Input() theme: "light" | "dark" = "dark";
188189
/**

src/combobox/combobox.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ export class ComboBox implements OnChanges, AfterViewInit, AfterContentInit, OnD
325325
*/
326326
@Input() maxLength: number = null;
327327
/**
328-
* `light` or `dark` dropdown theme
328+
* @deprecated since v5 - Use `ibmLayer` directive instead
329329
*/
330330
@Input() theme: "light" | "dark" = "dark";
331331
/**

src/datepicker-input/datepicker-input.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ export class DatePickerInput {
119119

120120
@Output() valueChange: EventEmitter<string> = new EventEmitter();
121121

122+
/**
123+
* @deprecated since v5 - Use `ibmLayer` directive instead
124+
* Set to `"light"` to apply the light style
125+
*/
122126
@Input() theme: "light" | "dark" = "dark";
123127

124128
@Input() disabled = false;

src/datepicker/datepicker.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ export class DatePicker implements
155155
return this._value;
156156
}
157157

158+
/**
159+
* @deprecated since v5 - Use `ibmLayer` directive instead
160+
* Set to `"light"` to apply the light style
161+
*/
158162
@Input() theme: "light" | "dark" = "dark";
159163

160164
@Input() disabled = false;

src/dropdown/dropdown.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ export class Dropdown implements OnInit, AfterContentInit, AfterViewInit, OnDest
203203
*/
204204
@Input() type: "single" | "multi" = "single";
205205
/**
206+
* @deprecated since v5 - Use `ibmLayer` directive instead
206207
* `light` or `dark` dropdown theme
207208
*/
208209
@Input() theme: "light" | "dark" = "dark";

src/input/input.directive.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Directive, HostBinding, Input } from "@angular/core";
1616
})
1717
export class TextInput {
1818
/**
19+
* @deprecated since v5 - Use `ibmLayer` directive instead
1920
* `light` or `dark` input theme
2021
*/
2122
@Input() theme: "light" | "dark" = "dark";

src/input/text-area.directive.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Directive, HostBinding, Input } from "@angular/core";
1616
})
1717
export class TextArea {
1818
/**
19+
* @deprecated since v5 - Use `ibmLayer` directive instead
1920
* `light` or `dark` input theme
2021
*/
2122
@Input() theme: "light" | "dark" = "dark";

src/modal/modal-header.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { ExperimentalService } from "carbon-components-angular/experimental";
2121
@Component({
2222
selector: "cds-modal-header, ibm-modal-header",
2323
template: `
24-
<header class="{{theme}} cds--modal-header">
24+
<header class="cds--modal-header {{theme}}">
2525
<ng-content></ng-content>
2626
<button
2727
*ngIf="showCloseButton"
@@ -37,6 +37,7 @@ import { ExperimentalService } from "carbon-components-angular/experimental";
3737
})
3838
export class ModalHeader {
3939
/**
40+
* @deprecated since v5
4041
* Sets the style on the modal heading based on its category.
4142
*/
4243
@Input() theme = "default";

src/number-input/number.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export class NumberComponent implements ControlValueAccessor {
144144
@HostBinding("class.cds--form-item") containerClass = true;
145145

146146
/**
147+
* @deprecated since v5 - Use `ibmLayer` directive instead
147148
* `light` or `dark` number input theme.
148149
*/
149150
@Input() theme: "light" | "dark" = "dark";

0 commit comments

Comments
 (0)