Skip to content

Commit b58c49d

Browse files
committed
Merge branch 'master' into bpachilova/range-editable-date-input & get it to a compiling state
1 parent 3a366f7 commit b58c49d

18 files changed

Lines changed: 128 additions & 89 deletions

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/date-range-picker/date-range-input.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ export default class IgcDateRangeInputComponent extends IgcDateTimeInputBaseComp
7171
const partType = part?.type as string as DatePart;
7272

7373
if (partType) {
74-
result = { part: partType, position: part?.position! };
74+
result = {
75+
part: partType,
76+
position: part?.position as DateRangePosition,
77+
};
7578
}
7679
} else {
7780
result = {

src/components/date-range-picker/date-range-picker.common.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ describe('Date range picker - common tests for single and two inputs mode', () =
391391
);
392392
}
393393

394-
const chipElements = predefinedArea?.shadowRoot!.querySelectorAll(
394+
const chipElements = predefinedArea!.shadowRoot!.querySelectorAll(
395395
'igc-chip'
396396
) as NodeListOf<IgcChipComponent>;
397397
for (const test of tests) {
@@ -430,7 +430,7 @@ describe('Date range picker - common tests for single and two inputs mode', () =
430430
);
431431
}
432432

433-
const chipElements = predefinedArea?.shadowRoot!.querySelectorAll(
433+
const chipElements = predefinedArea!.shadowRoot!.querySelectorAll(
434434
'igc-chip'
435435
) as NodeListOf<IgcChipComponent>;
436436
for (const test of tests) {
@@ -729,7 +729,7 @@ describe('Date range picker - common tests for single and two inputs mode', () =
729729
}
730730

731731
function getRangeChips() {
732-
return getPredefinedArea()?.renderRoot.querySelectorAll(
732+
return getPredefinedArea()!.renderRoot.querySelectorAll(
733733
IgcChipComponent.tagName
734734
)!;
735735
}

src/components/date-range-picker/date-range-picker.utils.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ export const checkSelectedRange = (
6969
}
7070

7171
if (expectedValue?.start) {
72-
checkDatesEqual(calendar.values[0], expectedValue?.start!);
72+
checkDatesEqual(calendar.values[0], expectedValue?.start);
7373
}
7474
if (expectedValue?.end) {
7575
const length = calendar.values.length;
76-
checkDatesEqual(calendar.values[length - 1], expectedValue?.end!);
76+
checkDatesEqual(calendar.values[length - 1], expectedValue?.end);
7777
}
7878
if (!(expectedValue?.start || expectedValue?.end)) {
7979
expect(calendar.values).to.deep.equal([]);

src/components/tile-manager/tile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ export default class IgcTileComponent extends EventEmitterMixin<
169169
}
170170

171171
/** Returns the tile manager internal CSS grid container. */
172-
private get _cssContainer(): HTMLElement {
173-
return this._tileManagerCtx?.grid.value!;
172+
private get _cssContainer(): HTMLElement | undefined {
173+
return this._tileManagerCtx?.grid.value;
174174
}
175175

176176
/** Returns the tile manager current resize mode. */

stories/badge.stories.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const metadata: Meta<IgcBadgeComponent> = {
2626
argTypes: {
2727
variant: {
2828
type: '"primary" | "info" | "success" | "warning" | "danger"',
29-
description: 'The type of badge.',
29+
description: 'The type (style variant) of the badge.',
3030
options: ['primary', 'info', 'success', 'warning', 'danger'],
3131
control: { type: 'select' },
3232
table: { defaultValue: { summary: 'primary' } },
@@ -44,19 +44,31 @@ const metadata: Meta<IgcBadgeComponent> = {
4444
control: { type: 'inline-radio' },
4545
table: { defaultValue: { summary: 'rounded' } },
4646
},
47+
dot: {
48+
type: 'boolean',
49+
description:
50+
'Sets whether to render a dot type badge.\nWhen enabled, the badge appears as a small dot without any content.',
51+
control: 'boolean',
52+
table: { defaultValue: { summary: 'false' } },
53+
},
4754
},
48-
args: { variant: 'primary', outlined: false, shape: 'rounded' },
55+
args: { variant: 'primary', outlined: false, shape: 'rounded', dot: false },
4956
};
5057

5158
export default metadata;
5259

5360
interface IgcBadgeArgs {
54-
/** The type of badge. */
61+
/** The type (style variant) of the badge. */
5562
variant: 'primary' | 'info' | 'success' | 'warning' | 'danger';
5663
/** Sets whether to draw an outlined version of the badge. */
5764
outlined: boolean;
5865
/** The shape of the badge. */
5966
shape: 'rounded' | 'square';
67+
/**
68+
* Sets whether to render a dot type badge.
69+
* When enabled, the badge appears as a small dot without any content.
70+
*/
71+
dot: boolean;
6072
}
6173
type Story = StoryObj<IgcBadgeArgs>;
6274

stories/card.stories.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ const metadata: Meta<IgcCardComponent> = {
3636
docs: {
3737
description: {
3838
component:
39-
'A container which wraps different elements related to a single subject',
39+
'A container component that wraps different elements related to a single subject.\nThe card component provides a flexible container for organizing content such as headers,\nmedia, text content, and actions.',
4040
},
4141
},
4242
},
4343
argTypes: {
4444
elevated: {
4545
type: 'boolean',
46-
description: 'Sets card elevated style, otherwise card looks outlined.',
46+
description:
47+
'Sets the card to have an elevated appearance with shadow.\nWhen false, the card uses an outlined style with a border.',
4748
control: 'boolean',
4849
table: { defaultValue: { summary: 'false' } },
4950
},
@@ -54,7 +55,10 @@ const metadata: Meta<IgcCardComponent> = {
5455
export default metadata;
5556

5657
interface IgcCardArgs {
57-
/** Sets card elevated style, otherwise card looks outlined. */
58+
/**
59+
* Sets the card to have an elevated appearance with shadow.
60+
* When false, the card uses an outlined style with a border.
61+
*/
5862
elevated: boolean;
5963
}
6064
type Story = StoryObj<IgcCardArgs>;

stories/carousel.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const metadata: Meta<IgcCarouselComponent> = {
109109
locale: {
110110
type: 'string',
111111
description:
112-
'Gets/Sets the locale used for formatting and displaying the dates in the component.',
112+
'Gets/Sets the locale used for getting language, affecting resource strings.',
113113
control: 'text',
114114
},
115115
},
@@ -158,7 +158,7 @@ interface IgcCarouselArgs {
158158
maximumIndicatorsCount: number;
159159
/** The animation type. */
160160
animationType: 'slide' | 'fade' | 'none';
161-
/** Gets/Sets the locale used for formatting and displaying the dates in the component. */
161+
/** Gets/Sets the locale used for getting language, affecting resource strings. */
162162
locale: string;
163163
}
164164
type Story = StoryObj<IgcCarouselArgs>;

stories/chip.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const metadata: Meta<IgcChipComponent> = {
5454
locale: {
5555
type: 'string',
5656
description:
57-
'Gets/Sets the locale used for formatting and displaying the dates in the component.',
57+
'Gets/Sets the locale used for getting language, affecting resource strings.',
5858
control: 'text',
5959
},
6060
},
@@ -79,7 +79,7 @@ interface IgcChipArgs {
7979
selected: boolean;
8080
/** A property that sets the color variant of the chip component. */
8181
variant: 'primary' | 'info' | 'success' | 'warning' | 'danger';
82-
/** Gets/Sets the locale used for formatting and displaying the dates in the component. */
82+
/** Gets/Sets the locale used for getting language, affecting resource strings. */
8383
locale: string;
8484
}
8585
type Story = StoryObj<IgcChipArgs>;

stories/combo.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const metadata: Meta<IgcComboComponent> = {
7272
locale: {
7373
type: 'string',
7474
description:
75-
'Gets/Sets the locale used for formatting and displaying the dates in the component.',
75+
'Gets/Sets the locale used for getting language, affecting resource strings.',
7676
control: 'text',
7777
},
7878
label: {
@@ -192,7 +192,7 @@ interface IgcComboArgs {
192192
autofocus: boolean;
193193
/** Focuses the list of options when the menu opens. */
194194
autofocusList: boolean;
195-
/** Gets/Sets the locale used for formatting and displaying the dates in the component. */
195+
/** Gets/Sets the locale used for getting language, affecting resource strings. */
196196
locale: string;
197197
/** The label attribute of the control. */
198198
label: string;

0 commit comments

Comments
 (0)