funda-ui 1.0.313 → 1.0.317
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 +6 -70
- package/{publish/Scrollbar → Scrollbar}/index.d.ts +1 -0
- package/{publish/Scrollbar → Scrollbar}/index.js +27 -2
- package/lib/cjs/Scrollbar/index.d.ts +1 -0
- package/lib/cjs/Scrollbar/index.js +27 -2
- package/lib/esm/Scrollbar/index.tsx +42 -6
- package/package.json +44 -41
- package/.gitattributes +0 -2
- package/README_PUBLISH.md +0 -108
- package/publish/README.md +0 -108
- package/publish/lib/cjs/BackToTop/index.d.ts +0 -11
- package/publish/lib/cjs/BackToTop/index.js +0 -458
- package/publish/lib/cjs/CascadingSelect/index.d.ts +0 -56
- package/publish/lib/cjs/CascadingSelect/index.js +0 -938
- package/publish/lib/cjs/CascadingSelectE2E/index.d.ts +0 -60
- package/publish/lib/cjs/CascadingSelectE2E/index.js +0 -1106
- package/publish/lib/cjs/Checkbox/index.d.ts +0 -30
- package/publish/lib/cjs/Checkbox/index.js +0 -226
- package/publish/lib/cjs/ColorPicker/index.d.ts +0 -27
- package/publish/lib/cjs/ColorPicker/index.js +0 -226
- package/publish/lib/cjs/DigitalClock/index.d.ts +0 -7
- package/publish/lib/cjs/DigitalClock/index.js +0 -208
- package/publish/lib/cjs/DropdownMenu/index.d.ts +0 -37
- package/publish/lib/cjs/DropdownMenu/index.js +0 -237
- package/publish/lib/cjs/DynamicFields/index.d.ts +0 -29
- package/publish/lib/cjs/DynamicFields/index.js +0 -269
- package/publish/lib/cjs/File/index.d.ts +0 -37
- package/publish/lib/cjs/File/index.js +0 -474
- package/publish/lib/cjs/Input/index.d.ts +0 -42
- package/publish/lib/cjs/Input/index.js +0 -266
- package/publish/lib/cjs/LiveSearch/index.d.ts +0 -37
- package/publish/lib/cjs/LiveSearch/index.js +0 -1195
- package/publish/lib/cjs/ModalDialog/index.d.ts +0 -60
- package/publish/lib/cjs/ModalDialog/index.js +0 -725
- package/publish/lib/cjs/ModeSwitch/index.d.ts +0 -17
- package/publish/lib/cjs/ModeSwitch/index.js +0 -202
- package/publish/lib/cjs/MultiFuncSelect/index.d.ts +0 -67
- package/publish/lib/cjs/MultiFuncSelect/index.js +0 -1800
- package/publish/lib/cjs/MultilevelDropdownMenu/index.d.ts +0 -25
- package/publish/lib/cjs/MultilevelDropdownMenu/index.js +0 -464
- package/publish/lib/cjs/Pagination/index.d.ts +0 -49
- package/publish/lib/cjs/Pagination/index.js +0 -341
- package/publish/lib/cjs/Radio/index.d.ts +0 -31
- package/publish/lib/cjs/Radio/index.js +0 -246
- package/publish/lib/cjs/RangeSlider/index.d.ts +0 -21
- package/publish/lib/cjs/RangeSlider/index.js +0 -687
- package/publish/lib/cjs/ScrollReveal/index.d.ts +0 -21
- package/publish/lib/cjs/ScrollReveal/index.js +0 -216
- package/publish/lib/cjs/Scrollbar/index.d.ts +0 -16
- package/publish/lib/cjs/Scrollbar/index.js +0 -602
- package/publish/lib/cjs/SearchBar/index.d.ts +0 -32
- package/publish/lib/cjs/SearchBar/index.js +0 -246
- package/publish/lib/cjs/Select/index.d.ts +0 -34
- package/publish/lib/cjs/Select/index.js +0 -331
- package/publish/lib/cjs/ShowMoreLess/index.d.ts +0 -30
- package/publish/lib/cjs/ShowMoreLess/index.js +0 -202
- package/publish/lib/cjs/Switch/index.d.ts +0 -29
- package/publish/lib/cjs/Switch/index.js +0 -211
- package/publish/lib/cjs/Table/index.d.ts +0 -25
- package/publish/lib/cjs/Table/index.js +0 -2113
- package/publish/lib/cjs/Tabs/index.d.ts +0 -3
- package/publish/lib/cjs/Tabs/index.js +0 -323
- package/publish/lib/cjs/TagInput/index.d.ts +0 -28
- package/publish/lib/cjs/TagInput/index.js +0 -350
- package/publish/lib/cjs/Textarea/index.d.ts +0 -30
- package/publish/lib/cjs/Textarea/index.js +0 -222
- package/publish/lib/cjs/Toast/index.d.ts +0 -37
- package/publish/lib/cjs/Toast/index.js +0 -362
- package/publish/lib/cjs/Tooltip/index.d.ts +0 -19
- package/publish/lib/cjs/Tooltip/index.js +0 -200
- package/publish/lib/cjs/Tree/index.d.ts +0 -37
- package/publish/lib/cjs/Tree/index.js +0 -1406
- package/publish/lib/cjs/index.d.ts +0 -33
- package/publish/lib/cjs/index.js +0 -35
- package/publish/lib/css/BackToTop/index.css +0 -34
- package/publish/lib/css/CascadingSelect/index.css +0 -159
- package/publish/lib/css/CascadingSelectE2E/index.css +0 -159
- package/publish/lib/css/ColorPicker/index.css +0 -38
- package/publish/lib/css/DropdownMenu/index.css +0 -127
- package/publish/lib/css/MultiFuncSelect/index.css +0 -178
- package/publish/lib/css/MultilevelDropdownMenu/index.css +0 -35
- package/publish/lib/css/RangeSlider/index.css +0 -149
- package/publish/lib/css/ScrollReveal/index.css +0 -23
- package/publish/lib/css/Scrollbar/index.css +0 -176
- package/publish/lib/css/ShowMoreLess/index.css +0 -23
- package/publish/lib/css/Table/index.css +0 -533
- package/publish/lib/css/TagInput/index.css +0 -90
- package/publish/lib/css/Toast/index.css +0 -107
- package/publish/lib/css/Tooltip/index.css +0 -240
- package/publish/lib/css/Tree/index.css +0 -225
- package/publish/lib/esm/BackToTop/index.scss +0 -47
- package/publish/lib/esm/BackToTop/index.tsx +0 -182
- package/publish/lib/esm/BackToTop/utils/easing.js +0 -200
- package/publish/lib/esm/BackToTop/utils/performance.js +0 -52
- package/publish/lib/esm/CascadingSelect/Group.tsx +0 -39
- package/publish/lib/esm/CascadingSelect/index.scss +0 -214
- package/publish/lib/esm/CascadingSelect/index.tsx +0 -901
- package/publish/lib/esm/CascadingSelect/utils/performance.js +0 -52
- package/publish/lib/esm/CascadingSelectE2E/Group.tsx +0 -39
- package/publish/lib/esm/CascadingSelectE2E/index.scss +0 -214
- package/publish/lib/esm/CascadingSelectE2E/index.tsx +0 -1070
- package/publish/lib/esm/CascadingSelectE2E/utils/performance.js +0 -52
- package/publish/lib/esm/Checkbox/index.tsx +0 -160
- package/publish/lib/esm/ColorPicker/index.scss +0 -48
- package/publish/lib/esm/ColorPicker/index.tsx +0 -166
- package/publish/lib/esm/DigitalClock/index.tsx +0 -72
- package/publish/lib/esm/DigitalClock/utils/useInterval.js +0 -43
- package/publish/lib/esm/DropdownMenu/Option.tsx +0 -27
- package/publish/lib/esm/DropdownMenu/index.scss +0 -180
- package/publish/lib/esm/DropdownMenu/index.tsx +0 -148
- package/publish/lib/esm/DynamicFields/index.tsx +0 -204
- package/publish/lib/esm/File/index.tsx +0 -305
- package/publish/lib/esm/Input/index.tsx +0 -211
- package/publish/lib/esm/LiveSearch/index.tsx +0 -582
- package/publish/lib/esm/LiveSearch/utils/performance.js +0 -52
- package/publish/lib/esm/LiveSearch/utils/useThrottle.js +0 -36
- package/publish/lib/esm/ModalDialog/index.tsx +0 -479
- package/publish/lib/esm/ModalDialog/plugins/BSL/bodyScrollLock.es6.js +0 -262
- package/publish/lib/esm/ModalDialog/plugins/BSL/index.ts +0 -2
- package/publish/lib/esm/ModeSwitch/index.tsx +0 -82
- package/publish/lib/esm/MultiFuncSelect/index.scss +0 -269
- package/publish/lib/esm/MultiFuncSelect/index.tsx +0 -1570
- package/publish/lib/esm/MultiFuncSelect/utils/performance.js +0 -52
- package/publish/lib/esm/MultiFuncSelect/utils/tree.js +0 -103
- package/publish/lib/esm/MultiFuncSelect/utils/useThrottle.js +0 -36
- package/publish/lib/esm/MultilevelDropdownMenu/MenuList.tsx +0 -230
- package/publish/lib/esm/MultilevelDropdownMenu/index.scss +0 -75
- package/publish/lib/esm/MultilevelDropdownMenu/index.tsx +0 -71
- package/publish/lib/esm/MultilevelDropdownMenu/utils/dom.js +0 -81
- package/publish/lib/esm/Pagination/index.tsx +0 -230
- package/publish/lib/esm/Pagination/pagination-navigators.tsx +0 -60
- package/publish/lib/esm/Radio/index.tsx +0 -201
- package/publish/lib/esm/RangeSlider/index.scss +0 -184
- package/publish/lib/esm/RangeSlider/index.tsx +0 -199
- package/publish/lib/esm/ScrollReveal/index.scss +0 -27
- package/publish/lib/esm/ScrollReveal/index.tsx +0 -146
- package/publish/lib/esm/Scrollbar/index.scss +0 -221
- package/publish/lib/esm/Scrollbar/index.tsx +0 -512
- package/publish/lib/esm/Scrollbar/utils/performance.js +0 -52
- package/publish/lib/esm/SearchBar/index.tsx +0 -181
- package/publish/lib/esm/Select/index.tsx +0 -276
- package/publish/lib/esm/ShowMoreLess/index.scss +0 -27
- package/publish/lib/esm/ShowMoreLess/index.tsx +0 -144
- package/publish/lib/esm/Switch/index.tsx +0 -143
- package/publish/lib/esm/Table/TableColgroup.tsx +0 -29
- package/publish/lib/esm/Table/TableField.tsx +0 -40
- package/publish/lib/esm/Table/TableFieldRow.tsx +0 -212
- package/publish/lib/esm/Table/TableHeaders.tsx +0 -146
- package/publish/lib/esm/Table/TableRow.tsx +0 -127
- package/publish/lib/esm/Table/TableSummaries.tsx +0 -36
- package/publish/lib/esm/Table/index.scss +0 -364
- package/publish/lib/esm/Table/index.tsx +0 -576
- package/publish/lib/esm/Table/table-utils.ts +0 -65
- package/publish/lib/esm/Table/utils/dom.js +0 -81
- package/publish/lib/esm/Table/utils/performance.js +0 -52
- package/publish/lib/esm/Tabs/TabList.tsx +0 -42
- package/publish/lib/esm/Tabs/TabPanel.tsx +0 -34
- package/publish/lib/esm/Tabs/Tabs.tsx +0 -232
- package/publish/lib/esm/Tabs/index.tsx +0 -3
- package/publish/lib/esm/TagInput/index.scss +0 -125
- package/publish/lib/esm/TagInput/index.tsx +0 -291
- package/publish/lib/esm/Textarea/index.tsx +0 -156
- package/publish/lib/esm/Toast/Item.tsx +0 -78
- package/publish/lib/esm/Toast/index.scss +0 -142
- package/publish/lib/esm/Toast/index.tsx +0 -267
- package/publish/lib/esm/Tooltip/index.scss +0 -327
- package/publish/lib/esm/Tooltip/index.tsx +0 -142
- package/publish/lib/esm/Tree/TreeList.tsx +0 -503
- package/publish/lib/esm/Tree/index.scss +0 -375
- package/publish/lib/esm/Tree/index.tsx +0 -301
- package/publish/lib/esm/Tree/init-height.tsx +0 -27
- package/publish/lib/esm/Tree/utils/convert-tree.js +0 -29
- package/publish/lib/esm/Tree/utils/dom.js +0 -81
- package/publish/lib/esm/index.js +0 -31
- package/publish/package.json +0 -1
- /package/{publish/BackToTop → BackToTop}/index.css +0 -0
- /package/{publish/BackToTop → BackToTop}/index.d.ts +0 -0
- /package/{publish/BackToTop → BackToTop}/index.js +0 -0
- /package/{publish/CascadingSelect → CascadingSelect}/index.css +0 -0
- /package/{publish/CascadingSelect → CascadingSelect}/index.d.ts +0 -0
- /package/{publish/CascadingSelect → CascadingSelect}/index.js +0 -0
- /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.css +0 -0
- /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.d.ts +0 -0
- /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.js +0 -0
- /package/{publish/Checkbox → Checkbox}/index.d.ts +0 -0
- /package/{publish/Checkbox → Checkbox}/index.js +0 -0
- /package/{publish/ColorPicker → ColorPicker}/index.css +0 -0
- /package/{publish/ColorPicker → ColorPicker}/index.d.ts +0 -0
- /package/{publish/ColorPicker → ColorPicker}/index.js +0 -0
- /package/{publish/DigitalClock → DigitalClock}/index.d.ts +0 -0
- /package/{publish/DigitalClock → DigitalClock}/index.js +0 -0
- /package/{publish/DropdownMenu → DropdownMenu}/index.css +0 -0
- /package/{publish/DropdownMenu → DropdownMenu}/index.d.ts +0 -0
- /package/{publish/DropdownMenu → DropdownMenu}/index.js +0 -0
- /package/{publish/DynamicFields → DynamicFields}/index.d.ts +0 -0
- /package/{publish/DynamicFields → DynamicFields}/index.js +0 -0
- /package/{publish/File → File}/index.d.ts +0 -0
- /package/{publish/File → File}/index.js +0 -0
- /package/{publish/Input → Input}/index.d.ts +0 -0
- /package/{publish/Input → Input}/index.js +0 -0
- /package/{publish/LiveSearch → LiveSearch}/index.d.ts +0 -0
- /package/{publish/LiveSearch → LiveSearch}/index.js +0 -0
- /package/{publish/ModalDialog → ModalDialog}/index.d.ts +0 -0
- /package/{publish/ModalDialog → ModalDialog}/index.js +0 -0
- /package/{publish/ModeSwitch → ModeSwitch}/index.d.ts +0 -0
- /package/{publish/ModeSwitch → ModeSwitch}/index.js +0 -0
- /package/{publish/MultiFuncSelect → MultiFuncSelect}/index.css +0 -0
- /package/{publish/MultiFuncSelect → MultiFuncSelect}/index.d.ts +0 -0
- /package/{publish/MultiFuncSelect → MultiFuncSelect}/index.js +0 -0
- /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.css +0 -0
- /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.d.ts +0 -0
- /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.js +0 -0
- /package/{publish/Pagination → Pagination}/index.d.ts +0 -0
- /package/{publish/Pagination → Pagination}/index.js +0 -0
- /package/{publish/Radio → Radio}/index.d.ts +0 -0
- /package/{publish/Radio → Radio}/index.js +0 -0
- /package/{publish/RangeSlider → RangeSlider}/index.css +0 -0
- /package/{publish/RangeSlider → RangeSlider}/index.d.ts +0 -0
- /package/{publish/RangeSlider → RangeSlider}/index.js +0 -0
- /package/{publish/ScrollReveal → ScrollReveal}/index.css +0 -0
- /package/{publish/ScrollReveal → ScrollReveal}/index.d.ts +0 -0
- /package/{publish/ScrollReveal → ScrollReveal}/index.js +0 -0
- /package/{publish/Scrollbar → Scrollbar}/index.css +0 -0
- /package/{publish/SearchBar → SearchBar}/index.d.ts +0 -0
- /package/{publish/SearchBar → SearchBar}/index.js +0 -0
- /package/{publish/Select → Select}/index.d.ts +0 -0
- /package/{publish/Select → Select}/index.js +0 -0
- /package/{publish/ShowMoreLess → ShowMoreLess}/index.css +0 -0
- /package/{publish/ShowMoreLess → ShowMoreLess}/index.d.ts +0 -0
- /package/{publish/ShowMoreLess → ShowMoreLess}/index.js +0 -0
- /package/{publish/Switch → Switch}/index.d.ts +0 -0
- /package/{publish/Switch → Switch}/index.js +0 -0
- /package/{publish/Table → Table}/index.css +0 -0
- /package/{publish/Table → Table}/index.d.ts +0 -0
- /package/{publish/Table → Table}/index.js +0 -0
- /package/{publish/Tabs → Tabs}/index.d.ts +0 -0
- /package/{publish/Tabs → Tabs}/index.js +0 -0
- /package/{publish/TagInput → TagInput}/index.css +0 -0
- /package/{publish/TagInput → TagInput}/index.d.ts +0 -0
- /package/{publish/TagInput → TagInput}/index.js +0 -0
- /package/{publish/Textarea → Textarea}/index.d.ts +0 -0
- /package/{publish/Textarea → Textarea}/index.js +0 -0
- /package/{publish/Toast → Toast}/index.css +0 -0
- /package/{publish/Toast → Toast}/index.d.ts +0 -0
- /package/{publish/Toast → Toast}/index.js +0 -0
- /package/{publish/Tooltip → Tooltip}/index.css +0 -0
- /package/{publish/Tooltip → Tooltip}/index.d.ts +0 -0
- /package/{publish/Tooltip → Tooltip}/index.js +0 -0
- /package/{publish/Tree → Tree}/index.css +0 -0
- /package/{publish/Tree → Tree}/index.d.ts +0 -0
- /package/{publish/Tree → Tree}/index.js +0 -0
- /package/{publish/all.d.ts → all.d.ts} +0 -0
- /package/{publish/all.js → all.js} +0 -0
package/README.md
CHANGED
|
@@ -6,6 +6,7 @@ React components using pure Bootstrap 5+ which does not contain any external sty
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
## Key Features
|
|
10
11
|
|
|
11
12
|
1. Simplify the assignment method of diversified data.
|
|
@@ -14,11 +15,13 @@ React components using pure Bootstrap 5+ which does not contain any external sty
|
|
|
14
15
|
4. Introduce appropriate component `.css` files as needed, only for some components with special needs. Most of them can directly use Bootstrap's official style sheet.
|
|
15
16
|
|
|
16
17
|
|
|
18
|
+
|
|
17
19
|
## Components List
|
|
18
20
|
|
|
19
21
|
Here is a table of the components and their status.
|
|
20
22
|
|
|
21
23
|
|
|
24
|
+
|
|
22
25
|
| WEB ELEMENTS | FORMS | INTERACTION | NAVIGATION |
|
|
23
26
|
| --- | --- | --- | --- |
|
|
24
27
|
| [Accordion ❏](packages/Accordion/README.md) | [Input ✅](packages/Input/README.md) | [Infinite Scroll ❏](packages/InfiniteScroll/README.md) |[Multilevel Dropdown Menu ✅](packages/MultilevelDropdownMenu/README.md) |
|
|
@@ -50,6 +53,9 @@ Here is a table of the components and their status.
|
|
|
50
53
|
|
|
51
54
|
|
|
52
55
|
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
53
59
|
## Usage
|
|
54
60
|
|
|
55
61
|
First, you need to install it:
|
|
@@ -94,76 +100,6 @@ import 'funda-ui/CascadingSelect/index.css';
|
|
|
94
100
|
```
|
|
95
101
|
|
|
96
102
|
|
|
97
|
-
## Getting Started
|
|
98
|
-
|
|
99
|
-
Make sure if Node 14+ is installed on your computer.
|
|
100
|
-
|
|
101
|
-
### Step 1: Create a new Lerna workspace by running:
|
|
102
|
-
|
|
103
|
-
```sh
|
|
104
|
-
$ cd /{your_directory}/funda-ui
|
|
105
|
-
$ npx lerna init
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
### Step 2: Install dependencies (Required)
|
|
110
|
-
|
|
111
|
-
It will automatically install the dependencies of all resources in `packages/` without duplication.
|
|
112
|
-
|
|
113
|
-
```sh
|
|
114
|
-
$ npm install
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
### Step 3: To open the visualization, run:
|
|
119
|
-
|
|
120
|
-
```sh
|
|
121
|
-
$ npx nx graph
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### Step 4: To build all projects, run
|
|
125
|
-
|
|
126
|
-
```sh
|
|
127
|
-
$ npx lerna run build
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
or Build the package you want (recommend):
|
|
131
|
-
|
|
132
|
-
```sh
|
|
133
|
-
$ npx lerna run build --scope=plugin-1 --scope=plugin-2
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Please do not install **lerna** globally to use `lerna run build`
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
### Step 5: (optional) Use a custom script like:
|
|
140
|
-
|
|
141
|
-
```sh
|
|
142
|
-
$ npx lerna exec npm run export --scope=plugin-2
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
## Publish the lib of components, it will hang on NPM:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
```sh
|
|
150
|
-
$ npm run build:lib
|
|
151
|
-
$ npm run build:publish
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
> **(Optional) Manually generate `.d.ts` files, you can execute**
|
|
155
|
-
>
|
|
156
|
-
> ```sh
|
|
157
|
-
> $ npx -p typescript tsc lib/cjs/*.js --declaration --allowJs --emitDeclarationOnly
|
|
158
|
-
> ```
|
|
159
|
-
>
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
## Contributing
|
|
163
|
-
|
|
164
|
-
- [Lerna](https://github.com/lerna/lerna)
|
|
165
|
-
- [Bootstrap](https://getbootstrap.com/)
|
|
166
|
-
- [React](https://react.dev/)
|
|
167
103
|
|
|
168
104
|
|
|
169
105
|
## Licensing
|
|
@@ -5,6 +5,7 @@ declare type ScrollbarProps = {
|
|
|
5
5
|
arrowIcons?: React.ReactNode[];
|
|
6
6
|
disableArrow?: boolean;
|
|
7
7
|
horizontallyWithWheel?: boolean;
|
|
8
|
+
autoScrollTo?: boolean | string;
|
|
8
9
|
/** Incoming data, changes in the `data` value will cause the component to re-render. */
|
|
9
10
|
data?: any;
|
|
10
11
|
onMove?: (data: any) => void;
|
|
@@ -165,6 +165,7 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
165
165
|
arrowIcons = props.arrowIcons,
|
|
166
166
|
disableArrow = props.disableArrow,
|
|
167
167
|
horizontallyWithWheel = props.horizontallyWithWheel,
|
|
168
|
+
autoScrollTo = props.autoScrollTo,
|
|
168
169
|
data = props.data,
|
|
169
170
|
onMove = props.onMove,
|
|
170
171
|
id = props.id,
|
|
@@ -173,6 +174,7 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
173
174
|
var idRes = id || uniqueID;
|
|
174
175
|
var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
175
176
|
var contentRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
177
|
+
var AUTO_SCROLL_TO_DIR = typeof autoScrollTo === 'undefined' ? false : autoScrollTo;
|
|
176
178
|
var icons = typeof arrowIcons === 'undefined' || !arrowIcons ? [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
177
179
|
width: "10px",
|
|
178
180
|
height: "10px",
|
|
@@ -276,15 +278,22 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
276
278
|
|
|
277
279
|
function contentScrollTo(dir) {
|
|
278
280
|
var smooth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
281
|
+
var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
279
282
|
var current = contentRef.current;
|
|
280
283
|
if (current) {
|
|
281
|
-
var
|
|
284
|
+
var pivot = current.scrollHeight / 10;
|
|
285
|
+
var speed = pivot >= 200 ? 200 : pivot;
|
|
286
|
+
speed = !max ? speed : current.scrollHeight;
|
|
287
|
+
var scrollAmount = dir === 'down' ? speed : -speed;
|
|
282
288
|
current.scrollBy({
|
|
283
289
|
top: scrollAmount,
|
|
284
290
|
behavior: smooth ? 'smooth' : 'auto'
|
|
285
291
|
});
|
|
286
292
|
}
|
|
287
293
|
}
|
|
294
|
+
function contentScrollToMax(dir) {
|
|
295
|
+
contentScrollTo(dir, true, true);
|
|
296
|
+
}
|
|
288
297
|
function handleResize(ref, trackSize) {
|
|
289
298
|
var clientHeight = ref.clientHeight,
|
|
290
299
|
scrollHeight = ref.scrollHeight;
|
|
@@ -366,10 +375,12 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
366
375
|
|
|
367
376
|
function horizontalContentScrollTo(dir) {
|
|
368
377
|
var smooth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
378
|
+
var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
369
379
|
var current = contentRef.current;
|
|
370
380
|
if (current) {
|
|
371
|
-
var pivot = current.
|
|
381
|
+
var pivot = current.scrollWidth / 10;
|
|
372
382
|
var speed = pivot >= 200 ? 200 : pivot;
|
|
383
|
+
speed = !max ? speed : current.scrollWidth;
|
|
373
384
|
var scrollAmount = dir === 'right' ? speed : -speed;
|
|
374
385
|
current.scrollBy({
|
|
375
386
|
left: scrollAmount,
|
|
@@ -377,6 +388,9 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
377
388
|
});
|
|
378
389
|
}
|
|
379
390
|
}
|
|
391
|
+
function horizontalContentScrollToMax(dir) {
|
|
392
|
+
horizontalContentScrollTo(dir, true, true);
|
|
393
|
+
}
|
|
380
394
|
function handleHorizontalResize(ref, trackSize) {
|
|
381
395
|
var clientWidth = ref.clientWidth,
|
|
382
396
|
scrollWidth = ref.scrollWidth;
|
|
@@ -455,6 +469,7 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
455
469
|
|
|
456
470
|
// If the content and the scrollbar track exist, use a ResizeObserver to adjust height of thumb and listen for scroll event to move the thumb
|
|
457
471
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
472
|
+
//
|
|
458
473
|
if (contentRef.current && scrollTrackRef.current && scrollTrackHorizontalRef.current) {
|
|
459
474
|
// Vertical
|
|
460
475
|
var ref = contentRef.current;
|
|
@@ -473,6 +488,16 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
473
488
|
});
|
|
474
489
|
horizontalObserver.current.observe(horizontalRef);
|
|
475
490
|
horizontalRef.addEventListener('scroll', handleHorizontalThumbPosition);
|
|
491
|
+
|
|
492
|
+
// auto scroll to some position
|
|
493
|
+
setTimeout(function () {
|
|
494
|
+
if (AUTO_SCROLL_TO_DIR !== false && (AUTO_SCROLL_TO_DIR == 'down' || AUTO_SCROLL_TO_DIR == 'up')) {
|
|
495
|
+
contentScrollToMax(AUTO_SCROLL_TO_DIR);
|
|
496
|
+
}
|
|
497
|
+
if (AUTO_SCROLL_TO_DIR !== false && (AUTO_SCROLL_TO_DIR == 'left' || AUTO_SCROLL_TO_DIR == 'right')) {
|
|
498
|
+
horizontalContentScrollToMax(AUTO_SCROLL_TO_DIR);
|
|
499
|
+
}
|
|
500
|
+
}, 50);
|
|
476
501
|
return function () {
|
|
477
502
|
var _observer$current, _horizontalObserver$c;
|
|
478
503
|
(_observer$current = observer.current) === null || _observer$current === void 0 ? void 0 : _observer$current.unobserve(ref);
|
|
@@ -5,6 +5,7 @@ declare type ScrollbarProps = {
|
|
|
5
5
|
arrowIcons?: React.ReactNode[];
|
|
6
6
|
disableArrow?: boolean;
|
|
7
7
|
horizontallyWithWheel?: boolean;
|
|
8
|
+
autoScrollTo?: boolean | string;
|
|
8
9
|
/** Incoming data, changes in the `data` value will cause the component to re-render. */
|
|
9
10
|
data?: any;
|
|
10
11
|
onMove?: (data: any) => void;
|
|
@@ -165,6 +165,7 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
165
165
|
arrowIcons = props.arrowIcons,
|
|
166
166
|
disableArrow = props.disableArrow,
|
|
167
167
|
horizontallyWithWheel = props.horizontallyWithWheel,
|
|
168
|
+
autoScrollTo = props.autoScrollTo,
|
|
168
169
|
data = props.data,
|
|
169
170
|
onMove = props.onMove,
|
|
170
171
|
id = props.id,
|
|
@@ -173,6 +174,7 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
173
174
|
var idRes = id || uniqueID;
|
|
174
175
|
var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
175
176
|
var contentRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
177
|
+
var AUTO_SCROLL_TO_DIR = typeof autoScrollTo === 'undefined' ? false : autoScrollTo;
|
|
176
178
|
var icons = typeof arrowIcons === 'undefined' || !arrowIcons ? [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
177
179
|
width: "10px",
|
|
178
180
|
height: "10px",
|
|
@@ -276,15 +278,22 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
276
278
|
|
|
277
279
|
function contentScrollTo(dir) {
|
|
278
280
|
var smooth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
281
|
+
var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
279
282
|
var current = contentRef.current;
|
|
280
283
|
if (current) {
|
|
281
|
-
var
|
|
284
|
+
var pivot = current.scrollHeight / 10;
|
|
285
|
+
var speed = pivot >= 200 ? 200 : pivot;
|
|
286
|
+
speed = !max ? speed : current.scrollHeight;
|
|
287
|
+
var scrollAmount = dir === 'down' ? speed : -speed;
|
|
282
288
|
current.scrollBy({
|
|
283
289
|
top: scrollAmount,
|
|
284
290
|
behavior: smooth ? 'smooth' : 'auto'
|
|
285
291
|
});
|
|
286
292
|
}
|
|
287
293
|
}
|
|
294
|
+
function contentScrollToMax(dir) {
|
|
295
|
+
contentScrollTo(dir, true, true);
|
|
296
|
+
}
|
|
288
297
|
function handleResize(ref, trackSize) {
|
|
289
298
|
var clientHeight = ref.clientHeight,
|
|
290
299
|
scrollHeight = ref.scrollHeight;
|
|
@@ -366,10 +375,12 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
366
375
|
|
|
367
376
|
function horizontalContentScrollTo(dir) {
|
|
368
377
|
var smooth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
378
|
+
var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
369
379
|
var current = contentRef.current;
|
|
370
380
|
if (current) {
|
|
371
|
-
var pivot = current.
|
|
381
|
+
var pivot = current.scrollWidth / 10;
|
|
372
382
|
var speed = pivot >= 200 ? 200 : pivot;
|
|
383
|
+
speed = !max ? speed : current.scrollWidth;
|
|
373
384
|
var scrollAmount = dir === 'right' ? speed : -speed;
|
|
374
385
|
current.scrollBy({
|
|
375
386
|
left: scrollAmount,
|
|
@@ -377,6 +388,9 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
377
388
|
});
|
|
378
389
|
}
|
|
379
390
|
}
|
|
391
|
+
function horizontalContentScrollToMax(dir) {
|
|
392
|
+
horizontalContentScrollTo(dir, true, true);
|
|
393
|
+
}
|
|
380
394
|
function handleHorizontalResize(ref, trackSize) {
|
|
381
395
|
var clientWidth = ref.clientWidth,
|
|
382
396
|
scrollWidth = ref.scrollWidth;
|
|
@@ -455,6 +469,7 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
455
469
|
|
|
456
470
|
// If the content and the scrollbar track exist, use a ResizeObserver to adjust height of thumb and listen for scroll event to move the thumb
|
|
457
471
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
472
|
+
//
|
|
458
473
|
if (contentRef.current && scrollTrackRef.current && scrollTrackHorizontalRef.current) {
|
|
459
474
|
// Vertical
|
|
460
475
|
var ref = contentRef.current;
|
|
@@ -473,6 +488,16 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
473
488
|
});
|
|
474
489
|
horizontalObserver.current.observe(horizontalRef);
|
|
475
490
|
horizontalRef.addEventListener('scroll', handleHorizontalThumbPosition);
|
|
491
|
+
|
|
492
|
+
// auto scroll to some position
|
|
493
|
+
setTimeout(function () {
|
|
494
|
+
if (AUTO_SCROLL_TO_DIR !== false && (AUTO_SCROLL_TO_DIR == 'down' || AUTO_SCROLL_TO_DIR == 'up')) {
|
|
495
|
+
contentScrollToMax(AUTO_SCROLL_TO_DIR);
|
|
496
|
+
}
|
|
497
|
+
if (AUTO_SCROLL_TO_DIR !== false && (AUTO_SCROLL_TO_DIR == 'left' || AUTO_SCROLL_TO_DIR == 'right')) {
|
|
498
|
+
horizontalContentScrollToMax(AUTO_SCROLL_TO_DIR);
|
|
499
|
+
}
|
|
500
|
+
}, 50);
|
|
476
501
|
return function () {
|
|
477
502
|
var _observer$current, _horizontalObserver$c;
|
|
478
503
|
(_observer$current = observer.current) === null || _observer$current === void 0 ? void 0 : _observer$current.unobserve(ref);
|
|
@@ -8,6 +8,7 @@ type ScrollbarProps = {
|
|
|
8
8
|
arrowIcons?: React.ReactNode[];
|
|
9
9
|
disableArrow?: boolean;
|
|
10
10
|
horizontallyWithWheel?: boolean;
|
|
11
|
+
autoScrollTo?: boolean | string;
|
|
11
12
|
/** Incoming data, changes in the `data` value will cause the component to re-render. */
|
|
12
13
|
data?: any;
|
|
13
14
|
onMove?: (data: any) => void;
|
|
@@ -25,6 +26,7 @@ const Scrollbar = (props: ScrollbarProps) => {
|
|
|
25
26
|
arrowIcons,
|
|
26
27
|
disableArrow,
|
|
27
28
|
horizontallyWithWheel,
|
|
29
|
+
autoScrollTo,
|
|
28
30
|
data,
|
|
29
31
|
onMove,
|
|
30
32
|
id,
|
|
@@ -36,6 +38,7 @@ const Scrollbar = (props: ScrollbarProps) => {
|
|
|
36
38
|
const idRes = id || uniqueID;
|
|
37
39
|
const rootRef = useRef<HTMLDivElement>(null);
|
|
38
40
|
const contentRef = useRef<HTMLDivElement>(null);
|
|
41
|
+
const AUTO_SCROLL_TO_DIR = typeof autoScrollTo === 'undefined' ? false : autoScrollTo;
|
|
39
42
|
const icons = typeof arrowIcons === 'undefined' || !arrowIcons ? [
|
|
40
43
|
<><svg width="10px" height="10px" viewBox="0 0 24 24" fill="none"> <path d="M18.2929 15.2893C18.6834 14.8988 18.6834 14.2656 18.2929 13.8751L13.4007 8.98766C12.6195 8.20726 11.3537 8.20757 10.5729 8.98835L5.68257 13.8787C5.29205 14.2692 5.29205 14.9024 5.68257 15.2929C6.0731 15.6835 6.70626 15.6835 7.09679 15.2929L11.2824 11.1073C11.673 10.7168 12.3061 10.7168 12.6966 11.1073L16.8787 15.2893C17.2692 15.6798 17.9024 15.6798 18.2929 15.2893Z"/> </svg></>,
|
|
41
44
|
<><svg width="10px" height="10px" viewBox="0 0 24 24" fill="none"> <path d="M5.70711 9.71069C5.31658 10.1012 5.31658 10.7344 5.70711 11.1249L10.5993 16.0123C11.3805 16.7927 12.6463 16.7924 13.4271 16.0117L18.3174 11.1213C18.708 10.7308 18.708 10.0976 18.3174 9.70708C17.9269 9.31655 17.2937 9.31655 16.9032 9.70708L12.7176 13.8927C12.3271 14.2833 11.6939 14.2832 11.3034 13.8927L7.12132 9.71069C6.7308 9.32016 6.09763 9.32016 5.70711 9.71069Z" /> </svg></>,
|
|
@@ -95,15 +98,22 @@ const Scrollbar = (props: ScrollbarProps) => {
|
|
|
95
98
|
// Vertical --> functions
|
|
96
99
|
//========================================
|
|
97
100
|
|
|
98
|
-
function contentScrollTo(dir: string, smooth: boolean = true) {
|
|
101
|
+
function contentScrollTo(dir: string, smooth: boolean = true, max: boolean = false) {
|
|
99
102
|
const { current } = contentRef;
|
|
100
103
|
if (current) {
|
|
101
|
-
const
|
|
104
|
+
const pivot = current.scrollHeight/10;
|
|
105
|
+
let speed = pivot >= 200 ? 200 : pivot;
|
|
106
|
+
speed = !max ? speed : current.scrollHeight;
|
|
107
|
+
const scrollAmount = dir === 'down' ? speed : -speed;
|
|
102
108
|
current.scrollBy({ top: scrollAmount, behavior: smooth ? 'smooth' : 'auto' });
|
|
103
109
|
}
|
|
104
110
|
}
|
|
105
111
|
|
|
106
112
|
|
|
113
|
+
function contentScrollToMax(dir: string) {
|
|
114
|
+
contentScrollTo(dir, true, true);
|
|
115
|
+
}
|
|
116
|
+
|
|
107
117
|
|
|
108
118
|
function handleResize(ref: HTMLDivElement, trackSize: number) {
|
|
109
119
|
const { clientHeight, scrollHeight } = ref;
|
|
@@ -212,16 +222,22 @@ const Scrollbar = (props: ScrollbarProps) => {
|
|
|
212
222
|
// Horizontal --> functions
|
|
213
223
|
//========================================
|
|
214
224
|
|
|
215
|
-
function horizontalContentScrollTo(dir: string, smooth: boolean = true) {
|
|
225
|
+
function horizontalContentScrollTo(dir: string, smooth: boolean = true, max: boolean = false) {
|
|
216
226
|
const { current } = contentRef;
|
|
217
227
|
if (current) {
|
|
218
|
-
const pivot = current.
|
|
219
|
-
|
|
228
|
+
const pivot = current.scrollWidth/10;
|
|
229
|
+
let speed = pivot >= 200 ? 200 : pivot;
|
|
230
|
+
speed = !max ? speed : current.scrollWidth;
|
|
220
231
|
const scrollAmount = dir === 'right' ? speed : -speed;
|
|
221
232
|
current.scrollBy({ left: scrollAmount, behavior: smooth ? 'smooth' : 'auto' });
|
|
222
233
|
}
|
|
223
234
|
}
|
|
224
235
|
|
|
236
|
+
function horizontalContentScrollToMax(dir: string) {
|
|
237
|
+
horizontalContentScrollTo(dir, true, true);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
|
|
225
241
|
|
|
226
242
|
function handleHorizontalResize(ref: HTMLDivElement, trackSize: number) {
|
|
227
243
|
const { clientWidth, scrollWidth } = ref;
|
|
@@ -332,7 +348,8 @@ const Scrollbar = (props: ScrollbarProps) => {
|
|
|
332
348
|
// If the content and the scrollbar track exist, use a ResizeObserver to adjust height of thumb and listen for scroll event to move the thumb
|
|
333
349
|
useEffect(() => {
|
|
334
350
|
|
|
335
|
-
|
|
351
|
+
|
|
352
|
+
//
|
|
336
353
|
if (contentRef.current && scrollTrackRef.current && scrollTrackHorizontalRef.current) {
|
|
337
354
|
|
|
338
355
|
// Vertical
|
|
@@ -355,6 +372,25 @@ const Scrollbar = (props: ScrollbarProps) => {
|
|
|
355
372
|
horizontalRef.addEventListener('scroll', handleHorizontalThumbPosition);
|
|
356
373
|
|
|
357
374
|
|
|
375
|
+
// auto scroll to some position
|
|
376
|
+
setTimeout(() => {
|
|
377
|
+
if (
|
|
378
|
+
AUTO_SCROLL_TO_DIR !== false &&
|
|
379
|
+
(AUTO_SCROLL_TO_DIR == 'down' || AUTO_SCROLL_TO_DIR == 'up')
|
|
380
|
+
) {
|
|
381
|
+
contentScrollToMax(AUTO_SCROLL_TO_DIR);
|
|
382
|
+
}
|
|
383
|
+
if (
|
|
384
|
+
AUTO_SCROLL_TO_DIR !== false &&
|
|
385
|
+
(AUTO_SCROLL_TO_DIR == 'left' || AUTO_SCROLL_TO_DIR == 'right')
|
|
386
|
+
) {
|
|
387
|
+
horizontalContentScrollToMax(AUTO_SCROLL_TO_DIR);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
}, 50);
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
358
394
|
return () => {
|
|
359
395
|
observer.current?.unobserve(ref);
|
|
360
396
|
ref.removeEventListener('scroll', handleThumbPosition);
|
package/package.json
CHANGED
|
@@ -1,42 +1,45 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
2
|
+
"author": "UIUX Lab",
|
|
3
|
+
"email": "uiuxlab@gmail.com",
|
|
4
|
+
"name": "funda-ui",
|
|
5
|
+
"version": "1.0.317",
|
|
6
|
+
"description": "React components using pure Bootstrap 5+ which does not contain any external style and script libraries.",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/xizon/funda-ui.git"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"bootstrap",
|
|
16
|
+
"react-bootstrap",
|
|
17
|
+
"react-components",
|
|
18
|
+
"components",
|
|
19
|
+
"components-react",
|
|
20
|
+
"react-bootstrap-components",
|
|
21
|
+
"react",
|
|
22
|
+
"funda-ui",
|
|
23
|
+
"fundaui",
|
|
24
|
+
"uikit",
|
|
25
|
+
"ui-kit",
|
|
26
|
+
"ui-components"
|
|
27
|
+
],
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/xizon/funda-ui/issues"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/xizon/funda-ui#readme",
|
|
32
|
+
"main": "all.js",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"react": "^18.2.0",
|
|
36
|
+
"react-dom": "^18.2.0"
|
|
37
|
+
},
|
|
38
|
+
"types": "all.d.ts",
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"directory": "lib"
|
|
41
|
+
},
|
|
42
|
+
"directories": {
|
|
43
|
+
"lib": "lib"
|
|
44
|
+
}
|
|
45
|
+
}
|
package/.gitattributes
DELETED
package/README_PUBLISH.md
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
# Funda UI
|
|
2
|
-
|
|
3
|
-
React components using pure Bootstrap 5+ which does not contain any external style and script libraries. You can load Bootstrap css libraries separately in your project.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## Key Features
|
|
11
|
-
|
|
12
|
-
1. Simplify the assignment method of diversified data.
|
|
13
|
-
2. Components are compatible with `gRPC`, `REST APIs`, `GraphQL` self-packaging, uniformly use [Classes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) and their methods to introduce interfaces
|
|
14
|
-
3. Enhanced user interaction, flexible use in asynchronous and synchronous states
|
|
15
|
-
4. Introduce appropriate component `.css` files as needed, only for some components with special needs. Most of them can directly use Bootstrap's official style sheet.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
## Components List
|
|
20
|
-
|
|
21
|
-
Here is a table of the components and their status.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
| WEB ELEMENTS | FORMS | INTERACTION | NAVIGATION |
|
|
26
|
-
| --- | --- | --- | --- |
|
|
27
|
-
| [Accordion ❏](packages/Accordion/README.md) | [Input ✅](packages/Input/README.md) | [Infinite Scroll ❏](packages/InfiniteScroll/README.md) |[Multilevel Dropdown Menu ✅](packages/MultilevelDropdownMenu/README.md) |
|
|
28
|
-
| [Accordion Slider ❏](packages/AccordionSlider/README.md) | [Password Input ❏](packages/PasswordInput/README.md) | [Image Perspective Hover ❏](packages/ImagePerspectiveHover/README.md) | [Dropdown Menu ✅](packages/DropdownMenu/README.md) |
|
|
29
|
-
| [Back To Top ✅](packages/BackToTop/README.md) | [Merge Input ❏](packages/MergeInput/README.md) | [Mousewheel Interaction ❏](packages/MousewheelInteraction/README.md) | |
|
|
30
|
-
| [Button ❏](packages/Button/README.md) | [Tag Input ✅](packages/TagInput/README.md) | [Parallax ❏](packages/Parallax/README.md) | |
|
|
31
|
-
| [Card ❏](packages/Card/README.md) | [Textarea ✅](packages/Textarea/README.md) | [Scroll Reveal ✅](packages/ScrollReveal/README.md) | |
|
|
32
|
-
| [Content Placeholder ❏](packages/ContentPlaceholder/README.md) | [Select ✅](packages/Select/README.md) | [Sticky Elements ❏](packages/StickyElements/README.md) | |
|
|
33
|
-
| [Counter ❏](packages/Counter/README.md) | [Cascading Select ✅](packages/CascadingSelect/README.md) | [Mode Switch ✅](packages/ModeSwitch/README.md) | |
|
|
34
|
-
| [Hybrid Content Slider ❏](packages/HybridContentSlider/README.md) | [Cascading Select End-to-end ✅🔥](packages/CascadingSelectE2E/README.md) | [Custom Scrollbar ✅](packages/Scrollbar/README.md) | |
|
|
35
|
-
| [Image Shapes ❏](packages/ImageShapes/README.md) | [Radio ✅](packages/Radio/README.md) | | |
|
|
36
|
-
| [Lightbox ❏](packages/Lightbox/README.md) | [Checkbox ✅](packages/Checkbox/README.md) | | |
|
|
37
|
-
| [List Bulleted ❏](packages/ListBulleted/README.md) | [Multifunction Select ✅🔥](packages/MultiFuncSelect/README.md) | | |
|
|
38
|
-
| [Modal Dialog ✅🔥](packages/ModalDialog/README.md) | [LiveSearch ✅](packages/LiveSearch/README.md) | | |
|
|
39
|
-
| [Pagination ✅](packages/Pagination/README.md) | [Number ❏](packages/Number/README.md) | | |
|
|
40
|
-
| [Table ✅](packages/Table/README.md) | [SearchBar ✅](packages/SearchBar/README.md) | | |
|
|
41
|
-
| [Periodical Scroll ❏](packages/PeriodicalScroll/README.md) | [Switch ✅](packages/Switch/README.md) | | |
|
|
42
|
-
| [Progress Bar ❏](packages/ProgressBar/README.md) | [Dynamic Fields ✅🔥](packages/DynamicFields/README.md) | | |
|
|
43
|
-
| [Rating ❏](packages/Rating/README.md) | [File ✅](packages/File/README.md) | | |
|
|
44
|
-
| [Seamless Scrolling Element ❏](packages/SeamlessScrollingElement/README.md) | [File Field ❏](packages/FileField/README.md) | | |
|
|
45
|
-
| [Show More Less ✅](packages/ShowMoreLess/README.md) | [Range Slider ✅](packages/RangeSlider/README.md) | | |
|
|
46
|
-
| [Slideshow ❏](packages/Slideshow/README.md) | [Color Picker ✅](packages/ColorPicker/README.md) | | |
|
|
47
|
-
| [Tabs ✅](packages/Tabs/README.md) | | | |
|
|
48
|
-
| [Timeline ❏](packages/Timeline/README.md) | | | |
|
|
49
|
-
| [Toast ✅](packages/Toast/README.md) | | | |
|
|
50
|
-
| [Tooltip ✅](packages/Tooltip/README.md) | | | |
|
|
51
|
-
| [Digital Clock ✅](packages/DigitalClock/README.md) | | | |
|
|
52
|
-
| [Tree ✅🔥](packages/Tree/README.md) | | | |
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
## Usage
|
|
60
|
-
|
|
61
|
-
First, you need to install it:
|
|
62
|
-
|
|
63
|
-
```sh
|
|
64
|
-
$ npm i funda-ui
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Next, import required components as required
|
|
68
|
-
|
|
69
|
-
```js
|
|
70
|
-
import Input from 'funda-ui/Input';
|
|
71
|
-
import Textarea from 'funda-ui/Textarea';
|
|
72
|
-
import CascadingSelect from 'funda-ui/CascadingSelect';
|
|
73
|
-
|
|
74
|
-
// component styles
|
|
75
|
-
import 'funda-ui/CascadingSelect/index.css';
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
or
|
|
79
|
-
|
|
80
|
-
```js
|
|
81
|
-
import {
|
|
82
|
-
Input,
|
|
83
|
-
Textarea,
|
|
84
|
-
CascadingSelect
|
|
85
|
-
} from 'funda-ui';
|
|
86
|
-
|
|
87
|
-
// component styles
|
|
88
|
-
import 'funda-ui/CascadingSelect/index.css';
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
or
|
|
92
|
-
|
|
93
|
-
```js
|
|
94
|
-
const Input = require('funda-ui').Input;
|
|
95
|
-
const Textarea = require('funda-ui').Textarea;
|
|
96
|
-
const CascadingSelect = require('funda-ui').CascadingSelect;
|
|
97
|
-
|
|
98
|
-
// component styles
|
|
99
|
-
import 'funda-ui/CascadingSelect/index.css';
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
## Licensing
|
|
106
|
-
|
|
107
|
-
Licensed under the [MIT](https://opensource.org/licenses/MIT).
|
|
108
|
-
|