@coreui/react 4.0.0-rc.4 → 4.0.1
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/README.md +37 -24
- package/dist/components/form/CFormCheck.d.ts +4 -0
- package/dist/components/form/CFormSelect.d.ts +13 -0
- package/dist/components/popover/CPopover.d.ts +1 -1
- package/dist/components/tooltip/CTooltip.d.ts +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.es.js +49 -50
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +48 -51
- package/dist/index.js.map +1 -1
- package/package.json +39 -77
- package/src/components/alert/CAlert.tsx +0 -1
- package/src/components/dropdown/CDropdown.tsx +18 -16
- package/src/components/form/CFormCheck.tsx +30 -3
- package/src/components/form/CFormSelect.tsx +28 -2
- package/src/components/popover/CPopover.tsx +24 -11
- package/src/components/tooltip/CTooltip.tsx +22 -12
- package/src/index.ts +0 -4
- package/dist/components/carousel/CCarouselControl.d.ts +0 -16
- package/dist/components/carousel/CCarouselIndicators.d.ts +0 -12
- package/dist/components/carousel/CCarouselInner.d.ts +0 -8
- package/dist/components/popover/CPopoverContent.d.ts +0 -10
- package/dist/components/tooltip/CTooltipContent.d.ts +0 -10
- package/dist/docs/components/CodeBlock copy.d.ts +0 -3
- package/dist/docs/components/CodeBlock.d.ts +0 -3
- package/dist/docs/components/Example.d.ts +0 -6
- package/dist/docs/components/Footer.d.ts +0 -3
- package/dist/docs/components/Header.d.ts +0 -3
- package/dist/docs/components/Seo.d.ts +0 -22
- package/dist/docs/components/Sidebar.d.ts +0 -6
- package/dist/docs/components/SidebarNav.d.ts +0 -24
- package/dist/docs/components/index.d.ts +0 -9
- package/dist/docs/index.d.ts +0 -1
- package/dist/docs/nav.d.ts +0 -20
- package/dist/docs/templates/Docs.d.ts +0 -6
- package/dist/docs/templates/Layout.d.ts +0 -4
- package/dist/pages/404.d.ts +0 -2
- package/src/components/popover/CPopoverContent.tsx +0 -41
- package/src/components/tooltip/CTooltipContent.tsx +0 -37
- package/tsconfig.json +0 -25
package/README.md
CHANGED
|
@@ -8,20 +8,18 @@
|
|
|
8
8
|
</a>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
<h3 align="center">CoreUI</h3>
|
|
11
|
+
<h3 align="center">CoreUI for React.js</h3>
|
|
12
12
|
|
|
13
13
|
<p align="center">
|
|
14
14
|
React.js Components Library built on top of Bootstrap 5 and TypeScript.
|
|
15
15
|
<br>
|
|
16
|
-
<a href="https://coreui.io/react/docs/
|
|
16
|
+
<a href="https://coreui.io/react/docs/getting-started/introduction"><strong>Explore CoreUI for React.js docs »</strong></a>
|
|
17
17
|
<br>
|
|
18
18
|
<br>
|
|
19
19
|
<a href="https://github.com/coreui/coreui-react/issues/new?template=bug_report.md">Report bug</a>
|
|
20
20
|
·
|
|
21
21
|
<a href="https://github.com/coreui/coreui-react/issues/new?template=feature_request.md">Request feature</a>
|
|
22
22
|
·
|
|
23
|
-
<a href="https://community.coreui.io/">Community</a>
|
|
24
|
-
·
|
|
25
23
|
<a href="https://blog.coreui.io/">Blog</a>
|
|
26
24
|
</p>
|
|
27
25
|
|
|
@@ -45,29 +43,35 @@
|
|
|
45
43
|
|
|
46
44
|
Several quick start options are available:
|
|
47
45
|
|
|
48
|
-
- [Download the latest release](https://github.com/coreui/coreui-react/archive/v4.0.
|
|
46
|
+
- [Download the latest release](https://github.com/coreui/coreui-react/archive/v4.0.1.zip)
|
|
49
47
|
- Clone the repo: `git clone https://github.com/coreui/coreui-react.git`
|
|
50
|
-
- Install with [npm](https://www.npmjs.com/): `npm install @coreui/react
|
|
51
|
-
- Install with [yarn](https://yarnpkg.com/): `yarn add @coreui/react
|
|
48
|
+
- Install with [npm](https://www.npmjs.com/): `npm install @coreui/react`
|
|
49
|
+
- Install with [yarn](https://yarnpkg.com/): `yarn add @coreui/react`
|
|
52
50
|
|
|
53
|
-
Read the [Getting started page](https://coreui.io/react/docs/
|
|
51
|
+
Read the [Getting started page](https://coreui.io/react/docs/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
|
|
54
52
|
|
|
55
53
|
### Stylesheets
|
|
56
54
|
|
|
57
|
-
React components are styled using `@coreui/coreui` CSS library, but you can use them also with bootstrap CSS library. That is possible because `@coreui/coreui` library is compatible with bootstrap, it just extends its functionalities. The only exception
|
|
55
|
+
React components are styled using `@coreui/coreui` CSS library, but you can use them also with bootstrap CSS library. That is possible because `@coreui/coreui` library is compatible with bootstrap, it just extends its functionalities. The only exception are custom CoreUI components, which don't exist in the Bootstrap ecosystem.
|
|
58
56
|
|
|
59
57
|
#### CoreUI CSS files
|
|
60
58
|
|
|
61
59
|
##### Installation
|
|
62
60
|
|
|
63
61
|
```bash
|
|
64
|
-
|
|
62
|
+
yarn add @coreui/coreui
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
or
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm install @coreui/coreui --save
|
|
65
69
|
```
|
|
66
70
|
|
|
67
71
|
##### Basic usage
|
|
68
72
|
|
|
69
73
|
```js
|
|
70
|
-
import
|
|
74
|
+
import '@coreui/coreui/dist/css/coreui.min.css'
|
|
71
75
|
```
|
|
72
76
|
|
|
73
77
|
#### Bootstrap CSS files
|
|
@@ -75,7 +79,13 @@ import "@coreui/dist/css/coreui.min.css";
|
|
|
75
79
|
##### Installation
|
|
76
80
|
|
|
77
81
|
```bash
|
|
78
|
-
|
|
82
|
+
yarn add bootstrap
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
or
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npm install bootstrap
|
|
79
89
|
```
|
|
80
90
|
|
|
81
91
|
##### Basic usage
|
|
@@ -90,35 +100,34 @@ import "bootstrap/dist/css/bootstrap.min.css";
|
|
|
90
100
|
[](https://www.npmjs.com/package/@coreui/react)
|
|
91
101
|
[](https://david-dm.org/coreui/coreui?type=peer)
|
|
92
102
|
[](https://david-dm.org/coreui/coreui?type=dev)
|
|
93
|
-
[](https://coveralls.io/github/coreui/coreui-react?branch=v4)
|
|
94
104
|
|
|
95
105
|
## Bugs and feature requests
|
|
96
106
|
|
|
97
|
-
Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/coreui/coreui-react/blob/v4
|
|
107
|
+
Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/coreui/coreui-react/blob/v4/.github/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/coreui/coreui-react/issues/new).
|
|
98
108
|
|
|
99
109
|
## Documentation
|
|
100
110
|
|
|
101
|
-
The documentation for the CoreUI & CoreUI PRO is hosted at our website [CoreUI for React](https://coreui.io/react/docs/
|
|
111
|
+
The documentation for the CoreUI & CoreUI PRO is hosted at our website [CoreUI for React](https://coreui.io/react/docs/getting-started/introduction)
|
|
102
112
|
|
|
103
113
|
### Running documentation locally
|
|
104
114
|
|
|
105
|
-
1. Run `yarn install` to install the Node.js dependencies
|
|
106
|
-
2. Run `yarn
|
|
107
|
-
3. From the root directory, run `yarn
|
|
108
|
-
4. Open `http://localhost:
|
|
115
|
+
1. Run `yarn install` or `npm install` to install the Node.js dependencies.
|
|
116
|
+
2. Run `yarn bootstrap` or `npm run bootstrap` to link local packages together and install remaining package dependencies.
|
|
117
|
+
3. From the root directory, run `yarn docs:dev` or `npm run docs:dev` (or a specific npm script) to rebuild distributed CSS and JavaScript files, as well as our docs assets.
|
|
118
|
+
4. Open `http://localhost:8000/` in your browser, and voilà.
|
|
109
119
|
|
|
110
120
|
## Contributing
|
|
111
121
|
|
|
112
|
-
Please read through our [contributing guidelines](https://github.com/coreui/coreui-react/blob/v4
|
|
122
|
+
Please read through our [contributing guidelines](https://github.com/coreui/coreui-react/blob/v4/.github/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
|
|
113
123
|
|
|
114
|
-
Editor preferences are available in the [editor config](https://github.com/coreui/coreui-react/blob/v4
|
|
124
|
+
Editor preferences are available in the [editor config](https://github.com/coreui/coreui-react/blob/v4/.editorconfig) for easy use in common text editors. Read more and download plugins at <https://editorconfig.org/>.
|
|
115
125
|
|
|
116
126
|
## Community
|
|
117
127
|
|
|
118
128
|
Stay up to date on the development of CoreUI and reach out to the community with these helpful resources.
|
|
119
129
|
|
|
120
|
-
- Read and subscribe to [The Official CoreUI Blog](https://coreui.io/
|
|
121
|
-
- Join [the official Community](https://community.coreui.io/).
|
|
130
|
+
- Read and subscribe to [The Official CoreUI Blog](https://blog.coreui.io/).
|
|
122
131
|
|
|
123
132
|
You can also follow [@core_ui on Twitter](https://twitter.com/core_ui).
|
|
124
133
|
|
|
@@ -139,6 +148,10 @@ See [the Releases section of our project](https://github.com/coreui/coreui-react
|
|
|
139
148
|
|
|
140
149
|
- <https://github.com/xidedix>
|
|
141
150
|
|
|
151
|
+
**The CoreUI Team**
|
|
152
|
+
|
|
153
|
+
- <https://github.com/orgs/coreui/people>
|
|
154
|
+
|
|
142
155
|
## Copyright and license
|
|
143
156
|
|
|
144
|
-
Copyright 2021 creativeLabs Łukasz Holeczek. Code released under the [MIT License](https://github.com/coreui/coreui-react/blob/
|
|
157
|
+
Copyright 2021 creativeLabs Łukasz Holeczek. Code released under the [MIT License](https://github.com/coreui/coreui-react/blob/main/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/).
|
|
@@ -39,6 +39,10 @@ export interface CFormCheckProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
39
39
|
* The id global attribute defines an identifier (ID) that must be unique in the whole document.
|
|
40
40
|
*/
|
|
41
41
|
id?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Input Checkbox indeterminate Property.
|
|
44
|
+
*/
|
|
45
|
+
indeterminate?: boolean;
|
|
42
46
|
/**
|
|
43
47
|
* Group checkboxes or radios on the same horizontal row by adding.
|
|
44
48
|
*/
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import React, { ChangeEventHandler, InputHTMLAttributes } from 'react';
|
|
2
|
+
declare type Option = {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
label?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
};
|
|
2
7
|
export interface CFormSelectProps extends Omit<InputHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
3
8
|
/**
|
|
4
9
|
* A string of all className you want applied to the component.
|
|
@@ -16,6 +21,13 @@ export interface CFormSelectProps extends Omit<InputHTMLAttributes<HTMLSelectEle
|
|
|
16
21
|
* Method called immediately after the `value` prop changes.
|
|
17
22
|
*/
|
|
18
23
|
onChange?: ChangeEventHandler<HTMLSelectElement>;
|
|
24
|
+
/**
|
|
25
|
+
* Options list of the select component. Available keys: `label`, `value`, `disabled`.
|
|
26
|
+
* Examples:
|
|
27
|
+
* - `options={[{ value: 'js', label: 'JavaScript' }, { value: 'html', label: 'HTML', disabled: true }]}`
|
|
28
|
+
* - `options={['js', 'html']}`
|
|
29
|
+
*/
|
|
30
|
+
options?: Option[] | string[];
|
|
19
31
|
/**
|
|
20
32
|
* Size the component small or large.
|
|
21
33
|
*/
|
|
@@ -32,3 +44,4 @@ export interface CFormSelectProps extends Omit<InputHTMLAttributes<HTMLSelectEle
|
|
|
32
44
|
value?: string | string[] | number;
|
|
33
45
|
}
|
|
34
46
|
export declare const CFormSelect: React.ForwardRefExoticComponent<CFormSelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
47
|
+
export {};
|
|
@@ -31,7 +31,7 @@ export interface CPopoverProps {
|
|
|
31
31
|
/**
|
|
32
32
|
* Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property.
|
|
33
33
|
*/
|
|
34
|
-
placement?: 'top' | 'right' | 'bottom' | 'left';
|
|
34
|
+
placement?: 'auto' | 'top' | 'right' | 'bottom' | 'left';
|
|
35
35
|
/**
|
|
36
36
|
* Toggle the visibility of popover component.
|
|
37
37
|
*/
|
|
@@ -23,7 +23,7 @@ export interface CTooltipProps {
|
|
|
23
23
|
/**
|
|
24
24
|
* Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property.
|
|
25
25
|
*/
|
|
26
|
-
placement?: 'top' | 'right' | 'bottom' | 'left';
|
|
26
|
+
placement?: 'auto' | 'top' | 'right' | 'bottom' | 'left';
|
|
27
27
|
/**
|
|
28
28
|
* Toggle the visibility of popover component.
|
|
29
29
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -87,7 +87,6 @@ import { CNavbarToggler } from './components/navbar/CNavbarToggler';
|
|
|
87
87
|
import { CPagination } from './components/pagination/CPagination';
|
|
88
88
|
import { CPaginationItem } from './components/pagination/CPaginationItem';
|
|
89
89
|
import { CPopover } from './components/popover/CPopover';
|
|
90
|
-
import { CPopoverContent } from './components/popover/CPopoverContent';
|
|
91
90
|
import { CProgress } from './components/progress/CProgress';
|
|
92
91
|
import { CProgressBar } from './components/progress/CProgressBar';
|
|
93
92
|
import { CSidebar } from './components/sidebar/CSidebar';
|
|
@@ -117,6 +116,5 @@ import { CToastClose } from './components/toast/CToastClose';
|
|
|
117
116
|
import { CToastHeader } from './components/toast/CToastHeader';
|
|
118
117
|
import { CToaster } from './components/toast/CToaster';
|
|
119
118
|
import { CTooltip } from './components/tooltip/CTooltip';
|
|
120
|
-
|
|
121
|
-
export { CAccordion, CAccordionBody, CAccordionButton, CAccordionCollapse, CAccordionHeader, CAccordionItem, CAlert, CAlertHeading, CAlertLink, CAvatar, CBadge, CBackdrop, CBreadcrumb, CBreadcrumbItem, CButton, CButtonGroup, CButtonToolbar, CCallout, CCard, CCardBody, CCardFooter, CCardHeader, CCardImage, CCardImageOverlay, CCardLink, CCardSubtitle, CCardText, CCardTitle, CCarousel, CCarouselCaption, CCarouselItem, CCloseButton, CCollapse, CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownItemPlain, CDropdownMenu, CDropdownToggle, CCol, CContainer, CRow, CFooter, CCardGroup, CForm, CFormCheck, CFormFeedback, CFormFloating, CFormInput, CFormLabel, CFormRange, CFormSelect, CFormSwitch, CFormText, CFormTextarea, CImage, CInputGroup, CInputGroupText, CHeader, CHeaderBrand, CHeaderDivider, CHeaderNav, CHeaderText, CHeaderToggler, CLink, CListGroup, CListGroupItem, CModal, CModalBody, CModalContent, CModalDialog, CModalFooter, CModalHeader, CModalTitle, CNav, CNavGroup, CNavGroupItems, CNavItem, CNavLink, CNavTitle, CNavbar, CNavbarBrand, CNavbarNav, CNavbarText, CNavbarToggler, CPagination, CPaginationItem, CPopover, CPopoverContent, CProgress, CProgressBar, COffcanvas, COffcanvasBody, COffcanvasHeader, COffcanvasTitle, CSidebar, CSidebarBrand, CSidebarFooter, CSidebarToggler, CSidebarHeader, CSidebarNav, CSpinner, CTable, CTableBody, CTableCaption, CTableDataCell, CTableFoot, CTableHead, CTableHeaderCell, CTableRow, CTabContent, CTabPane, CToast, CToastBody, CToastClose, CToastHeader, CToaster, CTooltip, CTooltipContent, };
|
|
119
|
+
export { CAccordion, CAccordionBody, CAccordionButton, CAccordionCollapse, CAccordionHeader, CAccordionItem, CAlert, CAlertHeading, CAlertLink, CAvatar, CBadge, CBackdrop, CBreadcrumb, CBreadcrumbItem, CButton, CButtonGroup, CButtonToolbar, CCallout, CCard, CCardBody, CCardFooter, CCardHeader, CCardImage, CCardImageOverlay, CCardLink, CCardSubtitle, CCardText, CCardTitle, CCarousel, CCarouselCaption, CCarouselItem, CCloseButton, CCollapse, CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownItemPlain, CDropdownMenu, CDropdownToggle, CCol, CContainer, CRow, CFooter, CCardGroup, CForm, CFormCheck, CFormFeedback, CFormFloating, CFormInput, CFormLabel, CFormRange, CFormSelect, CFormSwitch, CFormText, CFormTextarea, CImage, CInputGroup, CInputGroupText, CHeader, CHeaderBrand, CHeaderDivider, CHeaderNav, CHeaderText, CHeaderToggler, CLink, CListGroup, CListGroupItem, CModal, CModalBody, CModalContent, CModalDialog, CModalFooter, CModalHeader, CModalTitle, CNav, CNavGroup, CNavGroupItems, CNavItem, CNavLink, CNavTitle, CNavbar, CNavbarBrand, CNavbarNav, CNavbarText, CNavbarToggler, CPagination, CPaginationItem, CPopover, CProgress, CProgressBar, COffcanvas, COffcanvasBody, COffcanvasHeader, COffcanvasTitle, CSidebar, CSidebarBrand, CSidebarFooter, CSidebarToggler, CSidebarHeader, CSidebarNav, CSpinner, CTable, CTableBody, CTableCaption, CTableDataCell, CTableFoot, CTableHead, CTableHeaderCell, CTableRow, CTabContent, CTabPane, CToast, CToastBody, CToastClose, CToastHeader, CToaster, CTooltip, };
|
|
122
120
|
export * from './components/';
|
package/dist/index.es.js
CHANGED
|
@@ -2563,7 +2563,6 @@ var CAlert = forwardRef(function (_a, ref) {
|
|
|
2563
2563
|
}, [visible]);
|
|
2564
2564
|
var _className = classNames('alert', variant === 'solid' ? "bg-" + color + " text-white" : "alert-" + color, {
|
|
2565
2565
|
'alert-dismissible fade': dismissible,
|
|
2566
|
-
// show: _visible,
|
|
2567
2566
|
}, className);
|
|
2568
2567
|
var getTransitionClass = function (state) {
|
|
2569
2568
|
return state === 'entered' && 'show';
|
|
@@ -5543,13 +5542,16 @@ var CDropdown = forwardRef(function (_a, ref) {
|
|
|
5543
5542
|
show: _visible,
|
|
5544
5543
|
}, direction, className);
|
|
5545
5544
|
useEffect(function () {
|
|
5546
|
-
|
|
5547
|
-
|
|
5545
|
+
_visible &&
|
|
5546
|
+
setTimeout(function () {
|
|
5547
|
+
window.addEventListener('click', handleClickOutside);
|
|
5548
|
+
window.addEventListener('keyup', handleKeyup);
|
|
5549
|
+
});
|
|
5548
5550
|
return function () {
|
|
5549
5551
|
window.removeEventListener('click', handleClickOutside);
|
|
5550
5552
|
window.removeEventListener('keyup', handleKeyup);
|
|
5551
5553
|
};
|
|
5552
|
-
});
|
|
5554
|
+
}, [_visible]);
|
|
5553
5555
|
useEffect(function () {
|
|
5554
5556
|
setVisible(visible);
|
|
5555
5557
|
}, [visible]);
|
|
@@ -5569,9 +5571,11 @@ var CDropdown = forwardRef(function (_a, ref) {
|
|
|
5569
5571
|
setVisible(false);
|
|
5570
5572
|
}
|
|
5571
5573
|
};
|
|
5574
|
+
var dropdownContent = function () {
|
|
5575
|
+
return variant === 'input-group' ? (React__default.createElement(React__default.Fragment, null, children)) : (React__default.createElement(Component, __assign({ className: _className }, rest, { ref: forkedRef }), children));
|
|
5576
|
+
};
|
|
5572
5577
|
return popper ? (React__default.createElement(CDropdownContext.Provider, { value: contextValues },
|
|
5573
|
-
React__default.createElement(Manager, null,
|
|
5574
|
-
React__default.createElement(Component, __assign({ className: _className }, rest, { ref: forkedRef }), children)));
|
|
5578
|
+
React__default.createElement(Manager, null, dropdownContent()))) : (React__default.createElement(CDropdownContext.Provider, { value: contextValues }, dropdownContent()));
|
|
5575
5579
|
});
|
|
5576
5580
|
var alignmentDirection = PropTypes.oneOf(['start', 'end']);
|
|
5577
5581
|
CDropdown.propTypes = {
|
|
@@ -5924,7 +5928,14 @@ CFormLabel.displayName = 'CFormLabel';
|
|
|
5924
5928
|
|
|
5925
5929
|
var CFormCheck = forwardRef(function (_a, ref) {
|
|
5926
5930
|
var _b;
|
|
5927
|
-
var className = _a.className, button = _a.button, hitArea = _a.hitArea, id = _a.id, inline = _a.inline, invalid = _a.invalid, label = _a.label, _c = _a.type, type = _c === void 0 ? 'checkbox' : _c, valid = _a.valid, rest = __rest(_a, ["className", "button", "hitArea", "id", "inline", "invalid", "label", "type", "valid"]);
|
|
5931
|
+
var className = _a.className, button = _a.button, hitArea = _a.hitArea, id = _a.id, indeterminate = _a.indeterminate, inline = _a.inline, invalid = _a.invalid, label = _a.label, _c = _a.type, type = _c === void 0 ? 'checkbox' : _c, valid = _a.valid, rest = __rest(_a, ["className", "button", "hitArea", "id", "indeterminate", "inline", "invalid", "label", "type", "valid"]);
|
|
5932
|
+
var inputRef = useRef(null);
|
|
5933
|
+
var forkedRef = useForkedRef(ref, inputRef);
|
|
5934
|
+
useEffect(function () {
|
|
5935
|
+
if (inputRef.current && indeterminate) {
|
|
5936
|
+
inputRef.current.indeterminate = indeterminate;
|
|
5937
|
+
}
|
|
5938
|
+
}, [indeterminate]);
|
|
5928
5939
|
var _className = classNames('form-check', {
|
|
5929
5940
|
'form-check-inline': inline,
|
|
5930
5941
|
'is-invalid': invalid,
|
|
@@ -5941,7 +5952,7 @@ var CFormCheck = forwardRef(function (_a, ref) {
|
|
|
5941
5952
|
_b), "" + button.shape)
|
|
5942
5953
|
: 'form-check-label');
|
|
5943
5954
|
var formControl = function () {
|
|
5944
|
-
return React__default.createElement("input", __assign({ type: type, className: inputClassName, id: id }, rest, { ref:
|
|
5955
|
+
return React__default.createElement("input", __assign({ type: type, className: inputClassName, id: id }, rest, { ref: forkedRef }));
|
|
5945
5956
|
};
|
|
5946
5957
|
var formLabel = function () {
|
|
5947
5958
|
return (React__default.createElement(CFormLabel, __assign({ customClassName: labelClassName }, (id && { htmlFor: id })), label));
|
|
@@ -5959,6 +5970,7 @@ CFormCheck.propTypes = {
|
|
|
5959
5970
|
className: PropTypes.string,
|
|
5960
5971
|
hitArea: PropTypes.oneOf(['full']),
|
|
5961
5972
|
id: PropTypes.string,
|
|
5973
|
+
indeterminate: PropTypes.bool,
|
|
5962
5974
|
inline: PropTypes.bool,
|
|
5963
5975
|
invalid: PropTypes.bool,
|
|
5964
5976
|
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
@@ -6031,19 +6043,25 @@ CFormRange.displayName = 'CFormRange';
|
|
|
6031
6043
|
|
|
6032
6044
|
var CFormSelect = forwardRef(function (_a, ref) {
|
|
6033
6045
|
var _b;
|
|
6034
|
-
var children = _a.children, className = _a.className, htmlSize = _a.htmlSize, invalid = _a.invalid, size = _a.size, valid = _a.valid, rest = __rest(_a, ["children", "className", "htmlSize", "invalid", "size", "valid"]);
|
|
6046
|
+
var children = _a.children, className = _a.className, htmlSize = _a.htmlSize, invalid = _a.invalid, options = _a.options, size = _a.size, valid = _a.valid, rest = __rest(_a, ["children", "className", "htmlSize", "invalid", "options", "size", "valid"]);
|
|
6035
6047
|
var _className = classNames('form-select', (_b = {},
|
|
6036
6048
|
_b["form-select-" + size] = size,
|
|
6037
6049
|
_b['is-invalid'] = invalid,
|
|
6038
6050
|
_b['is-valid'] = valid,
|
|
6039
6051
|
_b), className);
|
|
6040
|
-
return (React__default.createElement("select", __assign({ className: _className, size: htmlSize }, rest, { ref: ref }),
|
|
6052
|
+
return (React__default.createElement("select", __assign({ className: _className, size: htmlSize }, rest, { ref: ref }), options
|
|
6053
|
+
? options.map(function (option, index) {
|
|
6054
|
+
return (React__default.createElement("option", __assign({}, (typeof option === 'object' &&
|
|
6055
|
+
option.disabled && { disabled: option.disabled }), (typeof option === 'object' && option.value && { value: option.value }), { key: index }), typeof option === 'string' ? option : option.label));
|
|
6056
|
+
})
|
|
6057
|
+
: children));
|
|
6041
6058
|
});
|
|
6042
6059
|
CFormSelect.propTypes = {
|
|
6043
6060
|
children: PropTypes.node,
|
|
6044
6061
|
className: PropTypes.string,
|
|
6045
6062
|
htmlSize: PropTypes.number,
|
|
6046
6063
|
invalid: PropTypes.bool,
|
|
6064
|
+
options: PropTypes.array,
|
|
6047
6065
|
size: PropTypes.oneOf(['sm', 'lg']),
|
|
6048
6066
|
valid: PropTypes.bool,
|
|
6049
6067
|
};
|
|
@@ -6762,26 +6780,8 @@ CPaginationItem.propTypes = {
|
|
|
6762
6780
|
};
|
|
6763
6781
|
CPaginationItem.displayName = 'CPaginationItem';
|
|
6764
6782
|
|
|
6765
|
-
var CPopoverContent = forwardRef(function (_a, ref) {
|
|
6766
|
-
var content = _a.content, title = _a.title, placementClassNamePostfix = _a.placementClassNamePostfix, arrowProps = _a.arrowProps, style = _a.style, transitionClass = _a.transitionClass;
|
|
6767
|
-
return (React__default.createElement(React__default.Fragment, null,
|
|
6768
|
-
React__default.createElement("div", { className: classNames("popover bs-popover-" + placementClassNamePostfix, transitionClass), ref: ref, style: style, role: "tooltip" },
|
|
6769
|
-
React__default.createElement("div", __assign({ className: "popover-arrow" }, arrowProps)),
|
|
6770
|
-
React__default.createElement("div", { className: "popover-header" }, title),
|
|
6771
|
-
React__default.createElement("div", { className: "popover-body" }, content))));
|
|
6772
|
-
});
|
|
6773
|
-
CPopoverContent.propTypes = {
|
|
6774
|
-
arrowProps: PropTypes.any,
|
|
6775
|
-
content: PropTypes.node,
|
|
6776
|
-
placementClassNamePostfix: PropTypes.string,
|
|
6777
|
-
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
|
|
6778
|
-
title: PropTypes.string,
|
|
6779
|
-
transitionClass: PropTypes.string,
|
|
6780
|
-
};
|
|
6781
|
-
CPopoverContent.displayName = 'CPopoverContent';
|
|
6782
|
-
|
|
6783
6783
|
var CPopover = function (_a) {
|
|
6784
|
-
var children = _a.children, _b = _a.placement, placement = _b === void 0 ? 'top' : _b, _c = _a.offset, offset = _c === void 0 ? [0, 8] : _c, onHide = _a.onHide, onShow = _a.onShow, _d = _a.trigger, trigger = _d === void 0 ? 'click' : _d, visible = _a.visible, rest = __rest(_a, ["children", "placement", "offset", "onHide", "onShow", "trigger", "visible"]);
|
|
6784
|
+
var children = _a.children, content = _a.content, _b = _a.placement, placement = _b === void 0 ? 'top' : _b, _c = _a.offset, offset = _c === void 0 ? [0, 8] : _c, onHide = _a.onHide, onShow = _a.onShow, title = _a.title, _d = _a.trigger, trigger = _d === void 0 ? 'click' : _d, visible = _a.visible, rest = __rest(_a, ["children", "content", "placement", "offset", "onHide", "onShow", "title", "trigger", "visible"]);
|
|
6785
6785
|
var _e = useState(visible), _visible = _e[0], setVisible = _e[1];
|
|
6786
6786
|
var getTransitionClass = function (state) {
|
|
6787
6787
|
return state === 'entering'
|
|
@@ -6818,15 +6818,23 @@ var CPopover = function (_a) {
|
|
|
6818
6818
|
offset: offset,
|
|
6819
6819
|
},
|
|
6820
6820
|
},
|
|
6821
|
-
] }, function (
|
|
6821
|
+
] }, function (_a) {
|
|
6822
|
+
var arrowProps = _a.arrowProps, style = _a.style, ref = _a.ref;
|
|
6823
|
+
return (React__default.createElement("div", __assign({ className: classNames("popover bs-popover-" + (placement === 'left' ? 'start' : placement === 'right' ? 'end' : placement), transitionClass), ref: ref, role: "tooltip", style: style }, rest),
|
|
6824
|
+
React__default.createElement("div", __assign({ className: "popover-arrow" }, arrowProps)),
|
|
6825
|
+
React__default.createElement("div", { className: "popover-header" }, title),
|
|
6826
|
+
React__default.createElement("div", { className: "popover-body" }, content)));
|
|
6827
|
+
}));
|
|
6822
6828
|
}), document.body)));
|
|
6823
6829
|
};
|
|
6824
6830
|
CPopover.propTypes = {
|
|
6825
6831
|
children: PropTypes.any,
|
|
6826
|
-
|
|
6832
|
+
content: PropTypes.node,
|
|
6833
|
+
placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
6827
6834
|
offset: PropTypes.any,
|
|
6828
6835
|
onHide: PropTypes.func,
|
|
6829
6836
|
onShow: PropTypes.func,
|
|
6837
|
+
title: PropTypes.string,
|
|
6830
6838
|
trigger: triggerPropType,
|
|
6831
6839
|
visible: PropTypes.bool,
|
|
6832
6840
|
};
|
|
@@ -7475,23 +7483,8 @@ CToaster.propTypes = {
|
|
|
7475
7483
|
};
|
|
7476
7484
|
CToaster.displayName = 'CToaster';
|
|
7477
7485
|
|
|
7478
|
-
var CTooltipContent = forwardRef(function (_a, ref) {
|
|
7479
|
-
var content = _a.content, placementClassNamePostfix = _a.placementClassNamePostfix, arrowProps = _a.arrowProps, transitionClass = _a.transitionClass, style = _a.style;
|
|
7480
|
-
return (React__default.createElement("div", { className: classNames("tooltip bs-tooltip-" + placementClassNamePostfix, transitionClass), ref: ref, style: style, role: "tooltip" },
|
|
7481
|
-
React__default.createElement("div", __assign({ className: "tooltip-arrow" }, arrowProps)),
|
|
7482
|
-
React__default.createElement("div", { className: "tooltip-inner" }, content)));
|
|
7483
|
-
});
|
|
7484
|
-
CTooltipContent.propTypes = {
|
|
7485
|
-
arrowProps: PropTypes.any,
|
|
7486
|
-
content: PropTypes.node,
|
|
7487
|
-
placementClassNamePostfix: PropTypes.string,
|
|
7488
|
-
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
|
|
7489
|
-
transitionClass: PropTypes.string,
|
|
7490
|
-
};
|
|
7491
|
-
CTooltipContent.displayName = 'CTooltipContent';
|
|
7492
|
-
|
|
7493
7486
|
var CTooltip = function (_a) {
|
|
7494
|
-
var children = _a.children, _b = _a.placement, placement = _b === void 0 ? 'top' : _b, onHide = _a.onHide, onShow = _a.onShow, _c = _a.trigger, trigger = _c === void 0 ? 'hover' : _c, visible = _a.visible, rest = __rest(_a, ["children", "placement", "onHide", "onShow", "trigger", "visible"]);
|
|
7487
|
+
var children = _a.children, content = _a.content, _b = _a.placement, placement = _b === void 0 ? 'top' : _b, onHide = _a.onHide, onShow = _a.onShow, _c = _a.trigger, trigger = _c === void 0 ? 'hover' : _c, visible = _a.visible, rest = __rest(_a, ["children", "content", "placement", "onHide", "onShow", "trigger", "visible"]);
|
|
7495
7488
|
var _d = useState(visible), _visible = _d[0], setVisible = _d[1];
|
|
7496
7489
|
var getTransitionClass = function (state) {
|
|
7497
7490
|
return state === 'entering'
|
|
@@ -7521,12 +7514,18 @@ var CTooltip = function (_a) {
|
|
|
7521
7514
|
exit: 200,
|
|
7522
7515
|
}, unmountOnExit: true }, function (state) {
|
|
7523
7516
|
var transitionClass = getTransitionClass(state);
|
|
7524
|
-
return (React__default.createElement(Popper, { placement: placement }, function (
|
|
7517
|
+
return (React__default.createElement(Popper, { placement: placement }, function (_a) {
|
|
7518
|
+
var arrowProps = _a.arrowProps, style = _a.style, ref = _a.ref;
|
|
7519
|
+
return (React__default.createElement("div", __assign({ className: classNames("tooltip bs-tooltip-" + (placement === 'left' ? 'start' : placement === 'right' ? 'end' : placement), transitionClass), ref: ref, role: "tooltip", style: style }, rest),
|
|
7520
|
+
React__default.createElement("div", __assign({ className: "tooltip-arrow" }, arrowProps)),
|
|
7521
|
+
React__default.createElement("div", { className: "tooltip-inner" }, content)));
|
|
7522
|
+
}));
|
|
7525
7523
|
}), document.body)));
|
|
7526
7524
|
};
|
|
7527
7525
|
CTooltip.propTypes = {
|
|
7528
7526
|
children: PropTypes.any,
|
|
7529
|
-
|
|
7527
|
+
content: PropTypes.node,
|
|
7528
|
+
placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
7530
7529
|
onHide: PropTypes.func,
|
|
7531
7530
|
onShow: PropTypes.func,
|
|
7532
7531
|
trigger: triggerPropType,
|
|
@@ -7665,5 +7664,5 @@ CWidgetStatsF.propTypes = {
|
|
|
7665
7664
|
};
|
|
7666
7665
|
CWidgetStatsF.displayName = 'CWidgetStatsF';
|
|
7667
7666
|
|
|
7668
|
-
export { CAccordion, CAccordionBody, CAccordionButton, CAccordionCollapse, CAccordionHeader, CAccordionItem, CAlert, CAlertHeading, CAlertLink, CAvatar, CBackdrop, CBadge, CBreadcrumb, CBreadcrumbItem, CButton, CButtonGroup, CButtonToolbar, CCallout, CCard, CCardBody, CCardFooter, CCardGroup, CCardHeader, CCardImage, CCardImageOverlay, CCardLink, CCardSubtitle, CCardText, CCardTitle, CCarousel, CCarouselCaption, CCarouselItem, CCloseButton, CCol, CCollapse, CContainer, CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownItemPlain, CDropdownMenu, CDropdownToggle, CFooter, CForm, CFormCheck, CFormFeedback, CFormFloating, CFormInput, CFormLabel, CFormRange, CFormSelect, CFormSwitch, CFormText, CFormTextarea, CHeader, CHeaderBrand, CHeaderDivider, CHeaderNav, CHeaderText, CHeaderToggler, CImage, CInputGroup, CInputGroupText, CLink, CListGroup, CListGroupItem, CModal, CModalBody, CModalContent, CModalDialog, CModalFooter, CModalHeader, CModalTitle, CNav, CNavGroup, CNavGroupItems, CNavItem, CNavLink, CNavTitle, CNavbar, CNavbarBrand, CNavbarNav, CNavbarText, CNavbarToggler, COffcanvas, COffcanvasBody, COffcanvasHeader, COffcanvasTitle, CPagination, CPaginationItem, CPopover,
|
|
7667
|
+
export { CAccordion, CAccordionBody, CAccordionButton, CAccordionCollapse, CAccordionHeader, CAccordionItem, CAlert, CAlertHeading, CAlertLink, CAvatar, CBackdrop, CBadge, CBreadcrumb, CBreadcrumbItem, CButton, CButtonGroup, CButtonToolbar, CCallout, CCard, CCardBody, CCardFooter, CCardGroup, CCardHeader, CCardImage, CCardImageOverlay, CCardLink, CCardSubtitle, CCardText, CCardTitle, CCarousel, CCarouselCaption, CCarouselItem, CCloseButton, CCol, CCollapse, CContainer, CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownItemPlain, CDropdownMenu, CDropdownToggle, CFooter, CForm, CFormCheck, CFormFeedback, CFormFloating, CFormInput, CFormLabel, CFormRange, CFormSelect, CFormSwitch, CFormText, CFormTextarea, CHeader, CHeaderBrand, CHeaderDivider, CHeaderNav, CHeaderText, CHeaderToggler, CImage, CInputGroup, CInputGroupText, CLink, CListGroup, CListGroupItem, CModal, CModalBody, CModalContent, CModalDialog, CModalFooter, CModalHeader, CModalTitle, CNav, CNavGroup, CNavGroupItems, CNavItem, CNavLink, CNavTitle, CNavbar, CNavbarBrand, CNavbarNav, CNavbarText, CNavbarToggler, COffcanvas, COffcanvasBody, COffcanvasHeader, COffcanvasTitle, CPagination, CPaginationItem, CPopover, CProgress, CProgressBar, CRow, CSidebar, CSidebarBrand, CSidebarFooter, CSidebarHeader, CSidebarNav, CSidebarToggler, CSpinner, CTabContent, CTabPane, CTable, CTableBody, CTableCaption, CTableDataCell, CTableFoot, CTableHead, CTableHeaderCell, CTableRow, CToast, CToastBody, CToastClose, CToastHeader, CToaster, CTooltip, CWidgetStatsA, CWidgetStatsB, CWidgetStatsC, CWidgetStatsD, CWidgetStatsE, CWidgetStatsF };
|
|
7669
7668
|
//# sourceMappingURL=index.es.js.map
|