gd-bs 6.6.48 → 6.6.49

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "6.6.48",
3
+ "version": "6.6.49",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -25,7 +25,7 @@ class _CardGroup extends Base<ICardGroupProps> implements ICardGroup {
25
25
  let isGrid = false;
26
26
 
27
27
  // See if we are rendering columns
28
- if (typeof (this.props.colSize) === "number") {
28
+ if (typeof (this.props.colSize) === "number" || this.props.colSize == "auto") {
29
29
  // Update the flag
30
30
  isGrid = true;
31
31
 
@@ -33,9 +33,15 @@ class _CardGroup extends Base<ICardGroupProps> implements ICardGroup {
33
33
  (this.el as HTMLElement).classList.remove("card-group");
34
34
  (this.el as HTMLElement).classList.add("row");
35
35
 
36
- // Determine the column class to use
37
- let colSize = this.props.colSize > 0 && this.props.colSize <= 12 ? this.props.colSize : 4;
38
- (this.el as HTMLElement).classList.add("row-cols-" + colSize);
36
+ // See if the column size is a number
37
+ if (this.props.colSize == "auto") {
38
+ // Set the column to auto size
39
+ (this.el as HTMLElement).classList.add("row-cols-auto");
40
+ } else {
41
+ // Determine the column class to use
42
+ let colSize = this.props.colSize > 0 && this.props.colSize <= 12 ? this.props.colSize : 4;
43
+ (this.el as HTMLElement).classList.add("row-cols-" + colSize);
44
+ }
39
45
  }
40
46
 
41
47
  // Parse the cards
@@ -107,7 +107,7 @@ export interface ICardGroup {
107
107
  */
108
108
  export interface ICardGroupProps extends IBaseProps<ICardGroup> {
109
109
  cards?: Array<ICardProps>;
110
- colSize?: number;
110
+ colSize?: number | string;
111
111
  onCardRender?: (el?: HTMLElement, props?: ICardProps) => void;
112
112
  onColRender?: (el?: HTMLElement, props?: ICardProps) => void;
113
113
  onRender?: (el?: HTMLElement, props?: ICardGroupProps) => void;