idea-react 3.0.0-rc.0 → 3.0.0-rc.2

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": "idea-react",
3
- "version": "3.0.0-rc.0",
3
+ "version": "3.0.0-rc.2",
4
4
  "license": "LGPL-3.0-or-later",
5
5
  "author": "shiy2008@gmail.com",
6
6
  "description": "A React advanced components library based on TypeScript & Bootstrap, built by idea2app remote developers team.",
@@ -36,7 +36,7 @@
36
36
  "html2canvas": "^1.4.1",
37
37
  "iterable-observer": "^1.1.1",
38
38
  "lodash": "^4.18.1",
39
- "marked": "^18.1.3",
39
+ "marked": "^18.2.0",
40
40
  "mobx-react-helper": "^0.5.4",
41
41
  "react-live": "^5.0.1",
42
42
  "shiki": "^4.6.0",
@@ -51,8 +51,6 @@
51
51
  "react-element-to-jsx-string": ">=15"
52
52
  },
53
53
  "devDependencies": {
54
- "@cspell/eslint-plugin": "^10.4.1",
55
- "@eslint/js": "^10.0.1",
56
54
  "@parcel/config-default": "~2.16.4",
57
55
  "@parcel/packager-ts": "~2.16.4",
58
56
  "@parcel/transformer-less": "2.16.4",
@@ -69,21 +67,18 @@
69
67
  "@types/react-dom": "^19.3.0",
70
68
  "buffer": "^6.0.3",
71
69
  "eslint": "^10.14.0",
72
- "eslint-config-prettier": "^10.1.8",
73
- "eslint-plugin-react": "^7.37.5",
74
- "eslint-plugin-simple-import-sort": "^14.0.0",
75
- "globals": "^17.14.0",
70
+ "eslint-idea2app-next-js": "^0.1.1",
76
71
  "happy-dom": "^21.0.4",
77
72
  "husky": "^9.1.7",
78
73
  "jiti": "^2.7.0",
79
74
  "koapache": "^3.0.0",
80
75
  "less": "^4.9.1",
81
76
  "lint-staged": "^17.6.0",
82
- "mobx": "^7.1.5",
77
+ "mobx": "^7.1.6",
83
78
  "mobx-react": "^10.0.3",
84
79
  "parcel": "~2.16.4",
85
80
  "postcss": "^8.5.32",
86
- "prettier": "^3.9.10",
81
+ "prettier": "^3.10.0",
87
82
  "prettier-plugin-css-order": "^2.2.0",
88
83
  "process": "^0.11.10",
89
84
  "prop-types": "15.8.1",
@@ -95,7 +90,6 @@
95
90
  "typedoc": "^0.28.20",
96
91
  "typedoc-plugin-mdn-links": "^5.1.1",
97
92
  "typescript": "~6.0.3",
98
- "typescript-eslint": "^8.72.1",
99
93
  "unplugin-swc": "^2.0.0",
100
94
  "unrun": "^0.3.1"
101
95
  },
@@ -53,7 +53,7 @@ export const AccordionHeader = polymorphic<AccordionHeaderProps>(
53
53
  ({ as: Root = 'summary', icon = 'chevron-down', className, children, ...props }) => (
54
54
  <Root {...props} className={classNames('accordion-header', className)}>
55
55
  {children}
56
- {icon && <Icon name={icon} className="accordion-icon" aria-hidden="true" />}
56
+ {icon && <Icon name={icon} className="accordion-icon" />}
57
57
  </Root>
58
58
  )
59
59
  );
@@ -10,9 +10,21 @@ export const Breadcrumb = polymorphic<ComponentPropsWithRef<'ol'>>(
10
10
  );
11
11
  Breadcrumb.displayName = 'Breadcrumb';
12
12
 
13
- export const BreadcrumbItem = polymorphic<ComponentPropsWithRef<'li'>>(
14
- ({ as: Root = 'li', ...props }) => (
15
- <Root {...props} className={classNames('breadcrumb-item', props.className)} />
13
+ export type BreadcrumbItemProps = ComponentPropsWithRef<'li'> & { active?: boolean };
14
+
15
+ export const BreadcrumbItem = polymorphic<BreadcrumbItemProps>(
16
+ ({
17
+ as: Root = 'li',
18
+ active,
19
+ className,
20
+ 'aria-current': current = active ? 'page' : undefined,
21
+ ...props
22
+ }) => (
23
+ <Root
24
+ {...props}
25
+ className={classNames('breadcrumb-item', { active }, className)}
26
+ aria-current={current}
27
+ />
16
28
  )
17
29
  );
18
30
  BreadcrumbItem.displayName = 'BreadcrumbItem';
@@ -26,7 +26,9 @@ interface ButtonStyleProps {
26
26
  }
27
27
 
28
28
  type ButtonLinkAttributes = ComponentPropsWithRef<'a'> & { href: string };
29
+
29
30
  type ButtonAttributes = ComponentPropsWithRef<'button'> & { href?: never };
31
+
30
32
  type ButtonElementAttributes = ButtonAttributes | ButtonLinkAttributes;
31
33
 
32
34
  export type ButtonProps = ButtonStyleProps & ButtonElementAttributes;
@@ -42,6 +44,7 @@ export const Button = polymorphic<ButtonProps>(
42
44
  const link = isButtonLink(attributes);
43
45
  const Root = RootAs ?? (link ? 'a' : 'button');
44
46
  const nativeButton = Root === 'button';
47
+ const role = attributes.role ?? (link ? 'link' : 'button');
45
48
  const onClick =
46
49
  !nativeButton && disabled
47
50
  ? typeof Root === 'string'
@@ -60,12 +63,13 @@ export const Button = polymorphic<ButtonProps>(
60
63
  <Root
61
64
  {...attributes}
62
65
  className={classes}
66
+ role={role}
63
67
  type={nativeButton ? attributes.type || 'button' : attributes.type}
64
68
  href={disabled ? undefined : attributes.href}
65
69
  disabled={nativeButton || typeof Root !== 'string' ? disabled : undefined}
66
70
  aria-disabled={(!nativeButton && disabled) || undefined}
67
71
  aria-pressed={
68
- !link || attributes.role === 'button'
72
+ !link || role === 'button'
69
73
  ? (active ?? attributes['aria-pressed'])
70
74
  : attributes['aria-pressed']
71
75
  }
@@ -264,7 +264,6 @@ export class Carousel<T extends ElementType | undefined = 'div'> extends Compone
264
264
 
265
265
  return (
266
266
  <Button
267
- type="button"
268
267
  variant={overlay ? 'subtle' : undefined}
269
268
  theme={overlay ? 'secondary' : undefined}
270
269
  size="sm"
@@ -273,11 +272,7 @@ export class Carousel<T extends ElementType | undefined = 'div'> extends Compone
273
272
  disabled={ends === 'stop' && atEnd}
274
273
  icon
275
274
  >
276
- <Icon
277
- name={previous ? 'chevron-left' : 'chevron-right'}
278
- size={1}
279
- aria-hidden="true"
280
- />
275
+ <Icon name={previous ? 'chevron-left' : 'chevron-right'} size={1} />
281
276
  <span className="visually-hidden">{label}</span>
282
277
  </Button>
283
278
  );
@@ -304,7 +299,6 @@ export class Carousel<T extends ElementType | undefined = 'div'> extends Compone
304
299
  renderPlayPause = () =>
305
300
  (this.props.playPause || this.props.autoplay) && (
306
301
  <Button
307
- type="button"
308
302
  className={classNames('carousel-control-play-pause', {
309
303
  paused: !this.store.playing
310
304
  })}
@@ -313,11 +307,7 @@ export class Carousel<T extends ElementType | undefined = 'div'> extends Compone
313
307
  aria-label={this.store.playing ? 'Pause' : 'Play'}
314
308
  icon
315
309
  >
316
- <Icon
317
- name={this.store.playing ? 'pause-fill' : 'play-fill'}
318
- size={1}
319
- aria-hidden="true"
320
- />
310
+ <Icon name={this.store.playing ? 'pause-fill' : 'play-fill'} size={1} />
321
311
  </Button>
322
312
  );
323
313
 
@@ -134,6 +134,7 @@ export interface CollapseToggleProps
134
134
  target: string;
135
135
  href?: string;
136
136
  type?: 'button' | 'submit' | 'reset';
137
+ navbarToggler?: boolean;
137
138
  }
138
139
 
139
140
  @observer
@@ -201,16 +202,28 @@ export class CollapseToggle<T extends ElementType | undefined = 'button'> extend
201
202
  disabled,
202
203
  icon,
203
204
  styled,
205
+ navbarToggler,
204
206
  className,
207
+ children,
205
208
  ...props
206
209
  } = this.componentProps;
207
210
  const Root: ElementType = RootAs ?? (href ? 'a' : 'button');
208
211
  const nativeButton = Root === 'button';
212
+ const content = navbarToggler ? (
213
+ <span className="navbar-toggler-icon" aria-hidden="true" />
214
+ ) : (
215
+ children
216
+ );
209
217
  const rootClassName = classNames(
210
218
  variant === false ? undefined : variant ? `btn-${variant}` : icon ? undefined : 'btn',
211
219
  theme && `theme-${theme}`,
212
220
  size && `btn-${size}`,
213
- { 'btn-icon': icon, 'btn-styled': styled, disabled },
221
+ {
222
+ 'btn-icon': icon || navbarToggler,
223
+ 'btn-styled': styled,
224
+ disabled,
225
+ 'navbar-toggler': navbarToggler
226
+ },
214
227
  className
215
228
  );
216
229
 
@@ -227,7 +240,9 @@ export class CollapseToggle<T extends ElementType | undefined = 'button'> extend
227
240
  aria-controls={this.controls || undefined}
228
241
  aria-expanded={this.expanded}
229
242
  onClick={this.handleClick}
230
- />
243
+ >
244
+ {content}
245
+ </Root>
231
246
  );
232
247
  }
233
248
  }
@@ -0,0 +1,15 @@
1
+ import classNames from 'classnames';
2
+ import { cloneElement, FC, ReactElement } from 'react';
3
+
4
+ export interface FadeProps {
5
+ className?: string;
6
+ in?: boolean;
7
+ // eslint-disable-next-line no-restricted-syntax
8
+ children: ReactElement<{ className?: string }>;
9
+ }
10
+
11
+ export const Fade: FC<FadeProps> = ({ children, in: show = false, className = '' }) =>
12
+ cloneElement(children, {
13
+ className: classNames('fade', className, children.props.className, show && 'show')
14
+ });
15
+ Fade.displayName = 'Fade';
@@ -8,6 +8,8 @@ import type { ComponentTheme } from './Button';
8
8
  export type ListGroupHorizontal = boolean | Breakpoint;
9
9
 
10
10
  interface ListGroupStyleProps {
11
+ radio?: boolean;
12
+ checkable?: boolean;
11
13
  flush?: boolean;
12
14
  numbered?: boolean;
13
15
  horizontal?: ListGroupHorizontal;
@@ -21,10 +23,15 @@ export type ListGroupProps = ListGroupStyleProps &
21
23
  );
22
24
 
23
25
  export const ListGroup = polymorphic<ListGroupStyleProps & ComponentPropsWithRef<'ul'>>(
24
- ({ as: Root = 'ul', flush, numbered, horizontal, className, ...props }) => {
26
+ ({ as: Root = 'ul', flush, numbered, horizontal, checkable, radio, className, ...props }) => {
25
27
  const classes = classNames(
26
28
  'list-group',
27
- { 'list-group-flush': flush, 'list-group-numbered': numbered },
29
+ {
30
+ 'list-group-checkable': checkable,
31
+ 'list-group-radio': radio,
32
+ 'list-group-flush': flush,
33
+ 'list-group-numbered': numbered
34
+ },
28
35
  horizontal &&
29
36
  (horizontal === true
30
37
  ? 'list-group-horizontal'
@@ -45,8 +52,11 @@ interface ListGroupItemStyleProps {
45
52
  }
46
53
 
47
54
  type ListGroupItemLinkAttributes = ComponentPropsWithRef<'a'> & { href: string };
55
+
48
56
  type ListGroupItemButtonAttributes = ComponentPropsWithRef<'button'> & { href?: never };
57
+
49
58
  type ListGroupItemAttributes = ComponentPropsWithRef<'li'> & { href?: never; type?: never };
59
+
50
60
  type ListGroupItemElementAttributes =
51
61
  ListGroupItemLinkAttributes | ListGroupItemButtonAttributes | ListGroupItemAttributes;
52
62
 
@@ -60,12 +60,7 @@ export const MenuPanel = polymorphic<MenuPanelProps>(
60
60
  MenuPanel.displayName = 'MenuPanel';
61
61
 
62
62
  export const MenuItemIcon = polymorphic<IconProps>(({ as: RootAs, className, ...props }) => (
63
- <Icon
64
- as={RootAs}
65
- aria-hidden="true"
66
- {...props}
67
- className={classNames('menu-item-icon', className)}
68
- />
63
+ <Icon as={RootAs} {...props} className={classNames('menu-item-icon', className)} />
69
64
  ));
70
65
  MenuItemIcon.displayName = 'MenuItemIcon';
71
66
 
@@ -73,7 +68,6 @@ export const MenuItemCheck = polymorphic<Omit<IconProps, 'name'>>(
73
68
  ({ as: RootAs, className, ...props }) => (
74
69
  <Icon
75
70
  as={RootAs}
76
- aria-hidden="true"
77
71
  {...props}
78
72
  name="check"
79
73
  className={classNames('menu-item-check', className)}
@@ -8,6 +8,7 @@ export interface NavProps extends ComponentPropsWithRef<'nav'> {
8
8
  vertical?: boolean;
9
9
  fill?: boolean;
10
10
  justified?: boolean;
11
+ flush?: boolean;
11
12
  cardHeader?: boolean;
12
13
  navbar?: boolean;
13
14
  }
@@ -19,6 +20,7 @@ export const Nav = polymorphic<NavProps>(
19
20
  vertical,
20
21
  fill,
21
22
  justified,
23
+ flush,
22
24
  cardHeader,
23
25
  navbar,
24
26
  className,
@@ -32,7 +34,7 @@ export const Nav = polymorphic<NavProps>(
32
34
  variant && `nav-${variant}`,
33
35
  cardHeader && variant === 'tabs' && 'card-header-tabs',
34
36
  vertical && (variant === 'pills' ? 'nav-pills-vertical' : 'flex-column'),
35
- { 'nav-fill': fill, 'nav-justified': justified },
37
+ { 'nav-fill': fill, 'nav-justified': justified, 'nav-flush': flush },
36
38
  className
37
39
  )}
38
40
  />
@@ -255,7 +255,7 @@ export class NavOverflow<T extends ElementType | undefined = 'div'> extends Comp
255
255
  : vertical === 'left'
256
256
  ? ['end-100', horizontal === 'end' ? 'bottom-0' : 'top-0']
257
257
  : ['start-100', horizontal === 'end' ? 'bottom-0' : 'top-0'];
258
- const icon = moreIcon ?? <Icon name="three-dots" aria-hidden="true" />;
258
+ const icon = moreIcon ?? <Icon name="three-dots" />;
259
259
  const text = moreText === false ? null : moreText;
260
260
 
261
261
  return (
@@ -68,6 +68,8 @@ export interface NavbarTogglerProps extends Omit<
68
68
  'children' | 'type'
69
69
  > {
70
70
  expanded?: boolean;
71
+ commandfor?: string;
72
+ command?: string;
71
73
  }
72
74
 
73
75
  export const NavbarToggler = polymorphic<NavbarTogglerProps>(
@@ -77,18 +79,22 @@ export const NavbarToggler = polymorphic<NavbarTogglerProps>(
77
79
  className,
78
80
  'aria-label': ariaLabel = 'Toggle navigation',
79
81
  ...props
80
- }) => (
81
- <Button
82
- as={RootAs}
83
- {...props}
84
- type="button"
85
- className={classNames('navbar-toggler', className)}
86
- aria-label={ariaLabel}
87
- aria-expanded={expanded}
88
- icon
89
- >
90
- <span className="navbar-toggler-icon" aria-hidden="true" />
91
- </Button>
92
- )
82
+ }) => {
83
+ const icon = <span className="navbar-toggler-icon" aria-hidden="true" />;
84
+ const togglerClassName = classNames('navbar-toggler', className);
85
+
86
+ return (
87
+ <Button
88
+ as={RootAs}
89
+ {...props}
90
+ className={togglerClassName}
91
+ aria-label={ariaLabel}
92
+ aria-expanded={expanded}
93
+ icon
94
+ >
95
+ {icon}
96
+ </Button>
97
+ );
98
+ }
93
99
  );
94
100
  NavbarToggler.displayName = 'NavbarToggler';
@@ -26,45 +26,31 @@ export const Placeholder = polymorphic<PlaceholderProps>(
26
26
  <Root
27
27
  {...props}
28
28
  className={classNames(
29
- 'placeholder',
30
- size && `placeholder-${size}`,
31
- animation && `placeholder-${animation}`,
32
- theme && `bg-${theme}`,
29
+ animation ? `placeholder-${animation}` : 'placeholder',
30
+ !animation && size && `placeholder-${size}`,
31
+ !animation && theme && `bg-${theme}`,
33
32
  className
34
33
  )}
35
- style={{ width, ...style }}
34
+ style={{ width: animation ? undefined : width, ...style }}
36
35
  aria-hidden={hidden}
37
36
  />
38
37
  )
39
38
  );
40
39
  Placeholder.displayName = 'Placeholder';
41
40
 
42
- export interface PlaceholderAnimationProps extends ComponentPropsWithRef<'div'> {
43
- animation?: PlaceholderProps['animation'];
44
- }
45
-
46
- export const PlaceholderAnimation = polymorphic<PlaceholderAnimationProps>(
47
- ({ as: Root = 'div', animation = 'wave', className, ...props }) => (
48
- <Root
49
- {...props}
50
- className={classNames(`placeholder-${animation}`, className)}
51
- aria-hidden="true"
52
- />
53
- )
54
- );
55
- PlaceholderAnimation.displayName = 'PlaceholderAnimation';
56
-
57
41
  export type PlaceholderButtonProps = ButtonProps;
58
42
 
59
43
  export const PlaceholderButton = polymorphic<PlaceholderButtonProps>(
60
- ({ as: RootAs, className, ...props }) => (
44
+ ({ as: RootAs, className, children = '\u00a0', ...props }) => (
61
45
  <Button
62
46
  as={RootAs}
63
47
  {...props}
64
48
  className={classNames('placeholder', className)}
65
49
  aria-hidden="true"
66
50
  disabled
67
- />
51
+ >
52
+ {children}
53
+ </Button>
68
54
  )
69
55
  );
70
56
  PlaceholderButton.displayName = 'PlaceholderButton';
@@ -10,6 +10,7 @@ export * from './Carousel';
10
10
  export * from './CloseButton';
11
11
  export * from './Collapse';
12
12
  export * from './Drawer';
13
+ export * from './Fade';
13
14
  export * from './ListGroup';
14
15
  export * from './Menu';
15
16
  export * from './NativeDialog';
@@ -0,0 +1,26 @@
1
+ import classNames from 'classnames';
2
+ import { ComponentPropsWithRef } from 'react';
3
+
4
+ import { polymorphic } from '../Helper/Polymorphic';
5
+ import { Image, ImageProps } from './Images';
6
+
7
+ export type FigureProps = ComponentPropsWithRef<'figure'>;
8
+
9
+ export const Figure = polymorphic<FigureProps>(({ as: Root = 'figure', className, ...props }) => (
10
+ <Root {...props} className={classNames('figure', className)} />
11
+ ));
12
+ Figure.displayName = 'Figure';
13
+
14
+ export const FigureImage = polymorphic<ImageProps>(
15
+ ({ as: Root = 'img', fluid = true, ...props }) => <Image as={Root} {...props} fluid={fluid} />
16
+ );
17
+ FigureImage.displayName = 'FigureImage';
18
+
19
+ export type FigureCaptionProps = ComponentPropsWithRef<'figcaption'>;
20
+
21
+ export const FigureCaption = polymorphic<FigureCaptionProps>(
22
+ ({ as: Root = 'figcaption', className, ...props }) => (
23
+ <Root {...props} className={classNames('figure-caption', className)} />
24
+ )
25
+ );
26
+ FigureCaption.displayName = 'FigureCaption';
@@ -10,26 +10,35 @@ export interface TableProps extends ComponentPropsWithRef<'table'> {
10
10
  hover?: boolean;
11
11
  bordered?: boolean;
12
12
  borderless?: boolean;
13
+ card?: boolean;
13
14
  small?: boolean;
14
15
  responsive?: boolean | Breakpoint;
16
+ stacked?: boolean | Breakpoint;
17
+ verticalAlign?: 'baseline' | 'top' | 'middle' | 'bottom' | 'text-top' | 'text-bottom';
18
+ captionTop?: boolean;
15
19
  }
16
20
 
17
21
  export const Table = polymorphic<TableProps>(
18
22
  ({
19
23
  as: RootAs,
24
+ className,
25
+ children,
20
26
  striped,
21
27
  stripedColumns,
22
28
  hover,
23
29
  bordered,
24
30
  borderless,
31
+ card,
25
32
  small,
26
33
  responsive,
27
- className,
28
- children,
34
+ stacked,
35
+ verticalAlign,
36
+ captionTop,
29
37
  ...props
30
38
  }) => {
31
39
  const Root = RootAs ?? 'div';
32
40
  const TableRoot = !responsive && RootAs ? RootAs : 'table';
41
+ const hasWrapper = !!responsive || !!card;
33
42
 
34
43
  const table = (
35
44
  <TableRoot
@@ -44,6 +53,10 @@ export const Table = polymorphic<TableProps>(
44
53
  'table-borderless': borderless,
45
54
  'table-sm': small
46
55
  },
56
+ stacked === true && 'table-stacked',
57
+ typeof stacked === 'string' && `${stacked}:table-stacked`,
58
+ verticalAlign && `align-${verticalAlign}`,
59
+ captionTop && 'caption-top',
47
60
  responsive && RootAs ? undefined : className
48
61
  )}
49
62
  >
@@ -51,15 +64,16 @@ export const Table = polymorphic<TableProps>(
51
64
  </TableRoot>
52
65
  );
53
66
 
54
- return !responsive ? (
67
+ return !hasWrapper ? (
55
68
  table
56
69
  ) : (
57
70
  <Root
58
- {...(RootAs ? props : {})}
71
+ {...(responsive && RootAs ? props : {})}
59
72
  className={classNames(
60
- 'table-responsive',
61
- responsive !== true && `${responsive}:table-responsive`,
62
- RootAs && className
73
+ responsive && 'table-responsive',
74
+ responsive && responsive !== true && `${responsive}:table-responsive`,
75
+ card && 'table-card',
76
+ responsive && RootAs && className
63
77
  )}
64
78
  >
65
79
  {table}
@@ -1,2 +1,3 @@
1
+ export * from './Figure';
1
2
  export * from './Images';
2
3
  export * from './Tables';
@@ -8,11 +8,24 @@ export type IconProps = ComponentPropsWithRef<'span'> & {
8
8
  size?: number;
9
9
  };
10
10
  export const Icon = polymorphic<IconProps>(
11
- ({ as: Root = 'span', className, style, name, size, ...props }) => (
11
+ ({
12
+ as: Root = 'span',
13
+ className,
14
+ style,
15
+ name,
16
+ size,
17
+ 'aria-hidden': ariaHidden,
18
+ 'aria-label': ariaLabel,
19
+ 'aria-labelledby': ariaLabelledBy,
20
+ ...props
21
+ }) => (
12
22
  <Root
23
+ {...props}
13
24
  className={classNames(`bi-${name}`, className)}
14
25
  style={{ fontSize: size && `${size}rem`, ...style }}
15
- {...props}
26
+ aria-hidden={ariaHidden ?? (ariaLabel || ariaLabelledBy ? undefined : true)}
27
+ aria-label={ariaLabel}
28
+ aria-labelledby={ariaLabelledBy}
16
29
  />
17
30
  )
18
31
  );
@@ -1,10 +1,11 @@
1
+ import classNames from 'classnames';
1
2
  import { ElementType } from 'react';
2
3
 
3
4
  import { Nav, NavProps } from '../../Base/Nav';
4
5
  import { polymorphic } from '../../Helper/Polymorphic';
5
6
  import { ScrollNavScroller } from './Scroller';
6
7
 
7
- export type ScrollNavProps = NavProps;
8
+ export type ScrollNavProps = NavProps & { navClassName?: string };
8
9
 
9
10
  /**
10
11
  * A horizontal scrolling navigation bar based on Bootstrap's `nav-scroller` pattern.
@@ -16,6 +17,7 @@ export const ScrollNav = polymorphic<ScrollNavProps>(
16
17
  ({
17
18
  as: RootAs,
18
19
  className = '',
20
+ navClassName,
19
21
  children,
20
22
  ref,
21
23
  variant,
@@ -35,7 +37,7 @@ export const ScrollNav = polymorphic<ScrollNavProps>(
35
37
  <Nav
36
38
  {...(RootAs ? {} : props)}
37
39
  ref={RootAs ? undefined : ref}
38
- className="flex-nowrap"
40
+ className={classNames('flex-nowrap', navClassName)}
39
41
  {...{ variant, vertical, fill, justified, cardHeader, navbar }}
40
42
  >
41
43
  {children}
@@ -24,7 +24,7 @@ export interface UserRankViewProps extends HTMLAttributes<HTMLDivElement> {
24
24
  export const UserRankView = polymorphic<UserRankViewProps>(
25
25
  ({ as: RootAs, className = '', title, rank = [], linkOf, ...props }) => {
26
26
  const renderMedal = (user: UserRank) => (
27
- <li key={user.id} className="col">
27
+ <Col key={user.id} as="li">
28
28
  <div className={`shadow-lg overflow-hidden rounded-circle m-auto ${style.image}`}>
29
29
  <Image src={user.avatar} alt={user.name} loading="lazy" fluid />
30
30
  </div>
@@ -38,7 +38,7 @@ export const UserRankView = polymorphic<UserRankViewProps>(
38
38
  </div>
39
39
  <UserAddress {...user} />
40
40
  </div>
41
- </li>
41
+ </Col>
42
42
  );
43
43
  const renderRow = (user: UserRank, index: number, { length }: UserRank[]) => (
44
44
  <tr key={user.id} className="position-relative">
@@ -87,11 +87,12 @@ export const UserRankView = polymorphic<UserRankViewProps>(
87
87
  {title}
88
88
  </h3>
89
89
  </div>
90
- <ul
91
- className={`row mt-2 g-0 align-items-end text-center ps-0 pt-2 list-unstyled ${style.topUsers}`}
90
+ <Row
91
+ as="ul"
92
+ className={`mt-2 g-0 align-items-end text-center ps-0 pt-2 list-unstyled ${style.topUsers}`}
92
93
  >
93
94
  {rank.slice(0, 3).map(renderMedal)}
94
- </ul>
95
+ </Row>
95
96
  </Col>
96
97
  <Col xs={12} lg={5}>
97
98
  <Table className={`my-3 pt-2 ${style.restUsers}`} responsive>