Skip to content

Commit bd16e5a

Browse files
committed
feat(progress-bar): update interfaces
1 parent 535cc52 commit bd16e5a

1 file changed

Lines changed: 26 additions & 21 deletions

File tree

core/src/components/progress-bar/progress-bar.interfaces.ts

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,33 @@
11
export type IonProgressBarRecipe = {
22
height?: string | number;
33

4-
// Indeterminate type (animated, no specific value)
54
indeterminate?: {
65
progress?: {
76
default?: {
87
background?: string;
98
};
9+
10+
/** Any of the semantic colors like primary, secondary, etc. */
1011
semantic?: {
11-
// Default state of the semantic color (not hover, focus, activated, etc.)
1212
default?: {
1313
background?: string;
1414
};
1515
};
1616
};
17+
1718
buffer?: {
1819
bar?: {
1920
default?: {
2021
background?: string;
2122
};
23+
24+
/** Any of the semantic colors like primary, secondary, etc. */
2225
semantic?: {
2326
default?: {
2427
background?: string;
2528
};
2629
};
30+
2731
solid?: {
2832
default?: {
2933
background?: string;
@@ -33,50 +37,54 @@ export type IonProgressBarRecipe = {
3337
};
3438
};
3539

36-
// Determinate type (has a specific value, optional buffer)
37-
// it has three parts:
38-
// - progress: the progress bar which represents the current value
39-
// - buffer-bar: the buffer bar which represents the buffer value
40-
// - buffer-circles: the buffer circles which are displayed when there is a buffer value but no progress value (value = 0, buffer > 0), this is optional
4140
determinate?: {
4241
progress?: {
4342
default?: {
4443
background?: string;
4544
};
45+
46+
/** Any of the semantic colors like primary, secondary, etc. */
4647
semantic?: {
47-
// Default state of the semantic color (not hover, focus, activated, etc.)
4848
default?: {
4949
background?: string;
5050
};
5151
};
5252
};
53+
5354
buffer?: {
5455
bar?: {
5556
default?: {
5657
background?: string;
5758
};
59+
60+
/** Any of the semantic colors like primary, secondary, etc. */
5861
semantic?: {
5962
default?: {
6063
background?: string;
6164
};
6265
};
63-
// When progress bar is solid (buffer = 1)
66+
67+
/* When progress bar is solid (buffer = 1) */
6468
solid?: {
6569
default?: {
6670
background?: string;
6771
};
6872
};
6973
};
74+
7075
circles?: {
7176
default?: {
7277
background?: string;
7378
};
79+
80+
/** Any of the semantic colors like primary, secondary, etc. */
7481
semantic?: {
7582
default?: {
7683
background?: string;
7784
};
7885
};
79-
// When progress bar is solid (buffer = 1)
86+
87+
/** When progress bar is solid (buffer = 1) */
8088
solid?: {
8189
default?: {
8290
background?: string;
@@ -86,18 +94,15 @@ export type IonProgressBarRecipe = {
8694
};
8795
};
8896

89-
// Shape variants
97+
// Shapes
9098
shape?: {
91-
round?: {
92-
border?: {
93-
radius?: string | number;
94-
};
95-
};
96-
rectangular?: {
97-
border?: {
98-
radius?: string | number;
99-
};
100-
};
99+
[K in IonProgressBarShape]?: IonProgressBarShapeDefinition;
100+
};
101+
};
102+
103+
type IonProgressBarShapeDefinition = {
104+
border?: {
105+
radius?: string | number;
101106
};
102107
};
103108

0 commit comments

Comments
 (0)