Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup Node.js environment
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 22.21.0
node-version: 22.21.1
cache: yarn

- name: Install Dependencies
Expand All @@ -50,12 +50,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup Node.js environment
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 22.21.0
node-version: 22.21.1

- name: Install Dependencies
run: yarn --network-timeout 100000
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.21.0
22.21.1
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,27 +103,27 @@
"@testing-library/dom": "^10.4.1",
"@testing-library/react": "^16.3.0",
"@types/invariant": "^2.2.37",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"@types/warning": "^3.0.3",
"@vitejs/plugin-react": "^4.7.0",
"@vitest/browser": "^3.2.4",
"@vitest/coverage-istanbul": "^3.2.4",
"eslint": "^9.38.0",
"eslint": "^9.39.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"globals": "^16.4.0",
"globals": "^16.5.0",
"husky": "^9.1.7",
"lint-staged": "^15.5.2",
"playwright": "^1.55.0",
"prettier": "^3.6.2",
"lint-staged": "^16.2.7",
"playwright": "^1.57.0",
"prettier": "^3.7.3",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"rimraf": "^6.0.1",
"rimraf": "^6.1.2",
"typescript": "^5.9.3",
"typescript-eslint": "^8.46.2",
"typescript-eslint": "^8.48.0",
"vitest": "^3.2.4"
},
"peerDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions src/AbstractModalHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import useEventCallback from '@restart/hooks/useEventCallback';
import CloseButton, { type CloseButtonVariant } from './CloseButton.js';
import ModalContext from './ModalContext.js';

export interface AbstractModalHeaderProps
extends React.HTMLAttributes<HTMLDivElement> {
export interface AbstractModalHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
/**
* Provides an accessible label for the close
* button. It is used for Assistive Technology when the label text is not
Expand Down
6 changes: 4 additions & 2 deletions src/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ import AccordionContext, {
import AccordionHeader from './AccordionHeader.js';
import AccordionItem from './AccordionItem.js';

export interface AccordionProps
extends Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> {
export interface AccordionProps extends Omit<
React.HTMLAttributes<HTMLElement>,
'onSelect'
> {
/**
* Element used to render the component.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/AccordionBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import AccordionItemContext from './AccordionItemContext.js';
import type { TransitionCallbacks } from './types.js';

export interface AccordionBodyProps
extends TransitionCallbacks,
React.HTMLAttributes<HTMLElement> {
extends TransitionCallbacks, React.HTMLAttributes<HTMLElement> {
/**
* Element used to render the component.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/AccordionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import AccordionItemContext from './AccordionItemContext.js';
import { useBootstrapPrefix } from './ThemeProvider.js';
import useAccordionButton from './useAccordionButton.js';

export interface AccordionButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
export interface AccordionButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
/**
* Element used to render the component.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/AccordionHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import type { DynamicRefForwardingComponent } from '@restart/ui/types';
import { useBootstrapPrefix } from './ThemeProvider.js';
import AccordionButton from './AccordionButton.js';

export interface AccordionHeaderProps
extends React.HTMLAttributes<HTMLElement> {
export interface AccordionHeaderProps extends React.HTMLAttributes<HTMLElement> {
/**
* Element used to render the component.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/AlertLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import Anchor from '@restart/ui/Anchor';
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
import { useBootstrapPrefix } from './ThemeProvider.js';

export interface AlertLinkProps
extends React.AnchorHTMLAttributes<HTMLElement> {
export interface AlertLinkProps extends React.AnchorHTMLAttributes<HTMLElement> {
/**
* Element used to render the component.
*/
Expand Down
6 changes: 4 additions & 2 deletions src/BreadcrumbItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import type { DynamicRefForwardingComponent } from '@restart/ui/types';
import Anchor from '@restart/ui/Anchor';
import { useBootstrapPrefix } from './ThemeProvider.js';

export interface BreadcrumbItemProps
extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
export interface BreadcrumbItemProps extends Omit<
React.HTMLAttributes<HTMLElement>,
'title'
> {
/**
* Element used to render the component.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/CardImg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import * as React from 'react';
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
import { useBootstrapPrefix } from './ThemeProvider.js';

export interface CardImgProps
extends React.ImgHTMLAttributes<HTMLImageElement> {
export interface CardImgProps extends React.ImgHTMLAttributes<HTMLImageElement> {
/**
* Element used to render the component.
*/
Expand Down
6 changes: 4 additions & 2 deletions src/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ export interface CarouselRef {
next: (e?: React.SyntheticEvent) => void;
}

export interface CarouselProps
extends Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> {
export interface CarouselProps extends Omit<
React.HTMLAttributes<HTMLElement>,
'onSelect'
> {
/**
* Element used to render the component.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/CarouselCaption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import clsx from 'clsx';
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
import { useBootstrapPrefix } from './ThemeProvider.js';

export interface CarouselCaptionProps
extends React.HTMLAttributes<HTMLElement> {
export interface CarouselCaptionProps extends React.HTMLAttributes<HTMLElement> {
/**
* Element used to render the component.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/CloseButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import clsx from 'clsx';

export type CloseButtonVariant = 'white' | string;

export interface CloseButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
export interface CloseButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
/**
* An accessible label indicating the relevant information about the Close Button.
*/
Expand Down
3 changes: 2 additions & 1 deletion src/Collapse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import type { TransitionCallbacks } from './types.js';
type Dimension = 'height' | 'width';

export interface CollapseProps
extends TransitionCallbacks,
extends
TransitionCallbacks,
Pick<React.HTMLAttributes<HTMLElement>, 'className' | 'role'> {
/**
* Show the component; triggers the expand or collapse animation
Expand Down
3 changes: 2 additions & 1 deletion src/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import { useBootstrapPrefix, useIsRTL } from './ThemeProvider.js';
import type { BsDropdownProps } from './types.js';

export interface DropdownProps
extends BsDropdownProps,
extends
BsDropdownProps,
Omit<
React.HTMLAttributes<HTMLElement>,
'onSelect' | 'children' | 'onToggle'
Expand Down
3 changes: 2 additions & 1 deletion src/DropdownButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import DropdownMenu, { type DropdownMenuVariant } from './DropdownMenu.js';
import type { BsDropdownProps } from './types.js';

export interface DropdownButtonProps
extends BsDropdownProps,
extends
BsDropdownProps,
PropsFromToggle,
Omit<
React.HTMLAttributes<HTMLElement>,
Expand Down
3 changes: 1 addition & 2 deletions src/DropdownDivider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import clsx from 'clsx';
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
import { useBootstrapPrefix } from './ThemeProvider.js';

export interface DropdownDividerProps
extends React.HTMLAttributes<HTMLElement> {
export interface DropdownDividerProps extends React.HTMLAttributes<HTMLElement> {
/**
* Element used to render the component.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/DropdownItemText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import clsx from 'clsx';
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
import { useBootstrapPrefix } from './ThemeProvider.js';

export interface DropdownItemTextProps
extends React.HTMLAttributes<HTMLElement> {
export interface DropdownItemTextProps extends React.HTMLAttributes<HTMLElement> {
/**
* Element used to render the component.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/FormCheck.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import { hasChildOfType } from './ElementChildren.js';

export type FormCheckType = 'checkbox' | 'radio' | 'switch';

export interface FormCheckProps
extends React.InputHTMLAttributes<HTMLInputElement> {
export interface FormCheckProps extends React.InputHTMLAttributes<HTMLInputElement> {
/**
* Element used to render the component.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/FormCheckInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import { useBootstrapPrefix } from './ThemeProvider.js';

type FormCheckInputType = 'checkbox' | 'radio';

export interface FormCheckInputProps
extends React.InputHTMLAttributes<HTMLInputElement> {
export interface FormCheckInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
/**
* Element used to render the component.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/FormCheckLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { useContext } from 'react';
import FormContext from './FormContext.js';
import { useBootstrapPrefix } from './ThemeProvider.js';

export interface FormCheckLabelProps
extends React.LabelHTMLAttributes<HTMLLabelElement> {
export interface FormCheckLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
/**
* @default 'form-check-label'
*/
Expand Down
6 changes: 4 additions & 2 deletions src/FormControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import { useBootstrapPrefix } from './ThemeProvider.js';

type FormControlElement = HTMLInputElement | HTMLTextAreaElement;

export interface FormControlProps
extends Omit<React.InputHTMLAttributes<FormControlElement>, 'size'> {
export interface FormControlProps extends Omit<
React.InputHTMLAttributes<FormControlElement>,
'size'
> {
/**
* Element used to render the component.
*/
Expand Down
6 changes: 4 additions & 2 deletions src/FormRange.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import { useContext } from 'react';
import { useBootstrapPrefix } from './ThemeProvider.js';
import FormContext from './FormContext.js';

export interface FormRangeProps
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
export interface FormRangeProps extends Omit<
React.InputHTMLAttributes<HTMLInputElement>,
'type'
> {
/**
* Element used to render the component.
*/
Expand Down
6 changes: 4 additions & 2 deletions src/FormSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import { useContext } from 'react';
import { useBootstrapPrefix } from './ThemeProvider.js';
import FormContext from './FormContext.js';

export interface FormSelectProps
extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
export interface FormSelectProps extends Omit<
React.SelectHTMLAttributes<HTMLSelectElement>,
'size'
> {
/**
* @default 'form-select'
*/
Expand Down
3 changes: 2 additions & 1 deletion src/NavDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import NavLink from './NavLink.js';
import type { BsDropdownProps } from './types.js';

export interface NavDropdownProps
extends BsDropdownProps,
extends
BsDropdownProps,
Omit<
React.HTMLAttributes<HTMLElement>,
'onSelect' | 'children' | 'onToggle' | 'title'
Expand Down
6 changes: 4 additions & 2 deletions src/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ import { useBootstrapPrefix } from './ThemeProvider.js';
import NavbarContext, { type NavbarContextType } from './NavbarContext.js';
import NavbarText from './NavbarText.js';

export interface NavbarProps
extends Omit<React.HTMLAttributes<HTMLElement>, 'onSelect' | 'onToggle'> {
export interface NavbarProps extends Omit<
React.HTMLAttributes<HTMLElement>,
'onSelect' | 'onToggle'
> {
/**
* Element used to render the component.
*/
Expand Down
3 changes: 2 additions & 1 deletion src/NavbarCollapse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { useBootstrapPrefix } from './ThemeProvider.js';
import NavbarContext from './NavbarContext.js';

export interface NavbarCollapseProps
extends Omit<CollapseProps, 'children'>,
extends
Omit<CollapseProps, 'children'>,
React.HTMLAttributes<HTMLDivElement> {
/**
* @default 'navbar-collapse'
Expand Down
6 changes: 4 additions & 2 deletions src/OverlayTrigger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ export type OverlayTriggerRenderProps = OverlayInjectedProps & {
ref: React.Ref<any>;
};

export interface OverlayTriggerProps
extends Omit<OverlayProps, 'children' | 'target' | 'onHide'> {
export interface OverlayTriggerProps extends Omit<
OverlayProps,
'children' | 'target' | 'onHide'
> {
children:
| React.ReactElement
| ((props: OverlayTriggerRenderProps) => React.ReactNode);
Expand Down
3 changes: 1 addition & 2 deletions src/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import * as React from 'react';
import { useBootstrapPrefix } from './ThemeProvider.js';
import PageItem, { Ellipsis, First, Last, Next, Prev } from './PageItem.js';

export interface PaginationProps
extends React.HTMLAttributes<HTMLUListElement> {
export interface PaginationProps extends React.HTMLAttributes<HTMLUListElement> {
/**
* Element used to render the component.
*/
Expand Down
3 changes: 2 additions & 1 deletion src/SplitButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import type { PropsFromToggle } from './DropdownToggle.js';
import { BsDropdownProps } from './types.js';

export interface SplitButtonProps
extends BsDropdownProps,
extends
BsDropdownProps,
PropsFromToggle,
Omit<
React.HTMLAttributes<HTMLElement>,
Expand Down
3 changes: 1 addition & 2 deletions src/TabPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import type { TransitionType } from './helpers.js';
import type { TransitionCallbacks } from './types.js';

export interface TabPaneProps
extends TransitionCallbacks,
React.HTMLAttributes<HTMLElement> {
extends TransitionCallbacks, React.HTMLAttributes<HTMLElement> {
/**
* Element used to render the component.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import clsx from 'clsx';
import * as React from 'react';
import { useBootstrapPrefix } from './ThemeProvider.js';

export interface TableProps
extends React.TableHTMLAttributes<HTMLTableElement> {
export interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {
/**
* @default 'table'
*/
Expand Down
Loading