@openedx/paragon 22.0.0-alpha.22 → 22.0.0-alpha.24
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/bin/paragon-scripts.js +12 -1
- package/dist/Button/index.js +2 -2
- package/dist/Button/index.js.map +1 -1
- package/dist/Button/index.scss +3 -3
- package/dist/ColorPicker/index.js +48 -18
- package/dist/ColorPicker/index.js.map +1 -1
- package/dist/Container/index.js +6 -2
- package/dist/Container/index.js.map +1 -1
- package/dist/DataTable/index.js +2 -1
- package/dist/DataTable/index.js.map +1 -1
- package/dist/DataTable/selection/BaseSelectionStatus.js +3 -2
- package/dist/DataTable/selection/BaseSelectionStatus.js.map +1 -1
- package/dist/Dropdown/index.js.map +1 -1
- package/dist/Dropzone/index.js +2 -3
- package/dist/Dropzone/index.js.map +1 -1
- package/dist/Form/FormAutosuggest.js +9 -4
- package/dist/Form/FormAutosuggest.js.map +1 -1
- package/dist/Form/FormSwitch.js +3 -0
- package/dist/Form/FormSwitch.js.map +1 -1
- package/dist/Hyperlink/index.js +7 -6
- package/dist/Hyperlink/index.js.map +1 -1
- package/dist/Icon/index.js +18 -11
- package/dist/Icon/index.js.map +1 -1
- package/dist/IconButton/index.js +1 -1
- package/dist/IconButton/index.js.map +1 -1
- package/dist/Layout/index.js.map +1 -1
- package/dist/Menu/MenuItem.js +2 -2
- package/dist/Menu/MenuItem.js.map +1 -1
- package/dist/Modal/ModalDialog.js +3 -0
- package/dist/Modal/ModalDialog.js.map +1 -1
- package/dist/Modal/_ModalDialog.scss +12 -20
- package/dist/Popover/index.js +8 -8
- package/dist/Popover/index.js.map +1 -1
- package/dist/ProductTour/Checkpoint.js +10 -8
- package/dist/ProductTour/Checkpoint.js.map +1 -1
- package/dist/ProductTour/messages.js +16 -0
- package/dist/SearchField/SearchFieldAdvanced.js +12 -7
- package/dist/SearchField/SearchFieldAdvanced.js.map +1 -1
- package/dist/SearchField/SearchFieldLabel.js +3 -3
- package/dist/SearchField/SearchFieldLabel.js.map +1 -1
- package/dist/SearchField/index.js +0 -1
- package/dist/SearchField/index.js.map +1 -1
- package/dist/SelectableBox/index.js +9 -5
- package/dist/SelectableBox/index.js.map +1 -1
- package/dist/Tabs/index.js +13 -13
- package/dist/Tabs/index.js.map +1 -1
- package/dist/core.css +17 -18
- package/dist/core.css.map +1 -1
- package/dist/core.min.css +1 -1
- package/dist/hooks/useIndexOfLastVisibleChild.js +33 -38
- package/dist/hooks/useIndexOfLastVisibleChild.js.map +1 -1
- package/dist/i18n/messages/ar.json +2 -1
- package/dist/i18n/messages/ca.json +2 -1
- package/dist/i18n/messages/es_419.json +2 -1
- package/dist/i18n/messages/es_AR.json +2 -1
- package/dist/i18n/messages/es_ES.json +2 -1
- package/dist/i18n/messages/fr.json +2 -1
- package/dist/i18n/messages/he.json +2 -1
- package/dist/i18n/messages/id.json +2 -1
- package/dist/i18n/messages/it_IT.json +2 -1
- package/dist/i18n/messages/ko_KR.json +2 -1
- package/dist/i18n/messages/pl.json +2 -1
- package/dist/i18n/messages/pt_BR.json +2 -1
- package/dist/i18n/messages/pt_PT.json +2 -1
- package/dist/i18n/messages/ru.json +2 -1
- package/dist/i18n/messages/th.json +2 -1
- package/dist/i18n/messages/tr_TR.json +2 -1
- package/dist/i18n/messages/uk.json +2 -1
- package/dist/i18n/messages/zh_CN.json +2 -1
- package/dist/light.css +11 -11
- package/dist/light.css.map +1 -1
- package/dist/light.min.css +1 -1
- package/icons/.svgrrc.js +1 -1
- package/icons/es5/Accessible.js +2 -1
- package/icons/es5/AccessibleForward.js +2 -1
- package/icons/es5/AssistWalker.js +2 -1
- package/icons/es5/Attribution.js +2 -1
- package/icons/es5/Bathtub.js +2 -1
- package/icons/es5/Biotech.js +2 -1
- package/icons/es5/Blind.js +2 -1
- package/icons/es5/BlurOff.js +16 -8
- package/icons/es5/Brightness1.js +2 -1
- package/icons/es5/BubbleChart.js +6 -3
- package/icons/es5/CameraAlt.js +2 -1
- package/icons/es5/Category.js +2 -1
- package/icons/es5/CheckCircleLightOutline.js +12 -17
- package/icons/es5/ChildCare.js +4 -2
- package/icons/es5/CoPresent.js +2 -1
- package/icons/es5/CoffeeMaker.js +2 -1
- package/icons/es5/CompassCalibration.js +2 -1
- package/icons/es5/ControlCamera.js +2 -1
- package/icons/es5/Deblur.js +24 -12
- package/icons/es5/Diversity1.js +4 -2
- package/icons/es5/EmojiPeople.js +2 -1
- package/icons/es5/EmojiSymbols.js +4 -2
- package/icons/es5/Face2.js +4 -2
- package/icons/es5/Face3.js +4 -2
- package/icons/es5/Face4.js +4 -2
- package/icons/es5/Face5.js +44 -22
- package/icons/es5/Face6.js +4 -2
- package/icons/es5/FaceRetouchingNatural.js +4 -2
- package/icons/es5/FaceRetouchingOff.js +2 -1
- package/icons/es5/FiberManualRecord.js +2 -1
- package/icons/es5/FiberSmartRecord.js +2 -1
- package/icons/es5/FireHydrantAlt.js +2 -1
- package/icons/es5/Garage.js +4 -2
- package/icons/es5/GolfCourse.js +2 -1
- package/icons/es5/HotTub.js +2 -1
- package/icons/es5/LinkedCamera.js +2 -1
- package/icons/es5/LocalSee.js +2 -1
- package/icons/es5/Man.js +2 -1
- package/icons/es5/Man2.js +2 -1
- package/icons/es5/Man4.js +2 -1
- package/icons/es5/ManageAccounts.js +2 -1
- package/icons/es5/MarkUnreadChatAlt.js +2 -1
- package/icons/es5/NoiseAware.js +2 -1
- package/icons/es5/NoiseControlOff.js +2 -1
- package/icons/es5/PeopleAlt.js +2 -1
- package/icons/es5/PersonSearch.js +2 -1
- package/icons/es5/Pets.js +8 -4
- package/icons/es5/Plagiarism.js +2 -1
- package/icons/es5/Policy.js +2 -1
- package/icons/es5/Pool.js +2 -1
- package/icons/es5/PriorityHigh.js +2 -1
- package/icons/es5/RecordVoiceOver.js +2 -1
- package/icons/es5/RememberMe.js +2 -1
- package/icons/es5/ReportGmailerrorred.js +2 -1
- package/icons/es5/RightSidebarFilled.js +15 -0
- package/icons/es5/RightSidebarOutlined.js +15 -0
- package/icons/es5/RssFeed.js +2 -1
- package/icons/es5/ScatterPlot.js +6 -3
- package/icons/es5/ScreenSearchDesktop.js +2 -1
- package/icons/es5/SelfImprovement.js +2 -1
- package/icons/es5/SentimentDissatisfied.js +4 -2
- package/icons/es5/SentimentSatisfied.js +4 -2
- package/icons/es5/SentimentSatisfiedAlt.js +4 -2
- package/icons/es5/SentimentSlightlyDissatisfied.js +4 -2
- package/icons/es5/SettingsApplications.js +2 -1
- package/icons/es5/Shower.js +12 -6
- package/icons/es5/SpatialAudio.js +2 -1
- package/icons/es5/SpatialAudioOff.js +2 -1
- package/icons/es5/SpatialTracking.js +2 -1
- package/icons/es5/SpeakerGroup.js +2 -1
- package/icons/es5/Sports.js +2 -1
- package/icons/es5/SportsCricket.js +2 -1
- package/icons/es5/SportsGolf.js +6 -3
- package/icons/es5/SportsKabaddi.js +2 -1
- package/icons/es5/SportsMartialArts.js +2 -1
- package/icons/es5/Stream.js +8 -4
- package/icons/es5/Streetview.js +2 -1
- package/icons/es5/Subway.js +4 -2
- package/icons/es5/SupportAgent.js +4 -2
- package/icons/es5/WindPower.js +2 -1
- package/icons/es5/Woman.js +2 -1
- package/icons/es5/Woman2.js +2 -1
- package/icons/es5/Yard.js +2 -1
- package/icons/es5/index.js +4 -2
- package/icons/jsx/Accessible.jsx +1 -1
- package/icons/jsx/AccessibleForward.jsx +1 -1
- package/icons/jsx/AssistWalker.jsx +1 -1
- package/icons/jsx/Attribution.jsx +1 -1
- package/icons/jsx/Bathtub.jsx +1 -1
- package/icons/jsx/Biotech.jsx +1 -1
- package/icons/jsx/Blind.jsx +1 -1
- package/icons/jsx/BlurOff.jsx +8 -8
- package/icons/jsx/Brightness1.jsx +1 -1
- package/icons/jsx/BubbleChart.jsx +3 -3
- package/icons/jsx/CameraAlt.jsx +1 -1
- package/icons/jsx/Category.jsx +1 -1
- package/icons/jsx/CheckCircleLightOutline.jsx +9 -16
- package/icons/jsx/ChildCare.jsx +2 -2
- package/icons/jsx/CoPresent.jsx +1 -1
- package/icons/jsx/CoffeeMaker.jsx +1 -1
- package/icons/jsx/CompassCalibration.jsx +1 -1
- package/icons/jsx/ControlCamera.jsx +1 -1
- package/icons/jsx/Deblur.jsx +12 -12
- package/icons/jsx/Diversity1.jsx +2 -2
- package/icons/jsx/EmojiPeople.jsx +1 -1
- package/icons/jsx/EmojiSymbols.jsx +2 -2
- package/icons/jsx/Face2.jsx +2 -2
- package/icons/jsx/Face3.jsx +2 -2
- package/icons/jsx/Face4.jsx +2 -2
- package/icons/jsx/Face5.jsx +22 -22
- package/icons/jsx/Face6.jsx +2 -2
- package/icons/jsx/FaceRetouchingNatural.jsx +2 -2
- package/icons/jsx/FaceRetouchingOff.jsx +1 -1
- package/icons/jsx/FiberManualRecord.jsx +1 -1
- package/icons/jsx/FiberSmartRecord.jsx +1 -1
- package/icons/jsx/FireHydrantAlt.jsx +1 -1
- package/icons/jsx/Garage.jsx +2 -2
- package/icons/jsx/GolfCourse.jsx +1 -1
- package/icons/jsx/HotTub.jsx +1 -1
- package/icons/jsx/LinkedCamera.jsx +1 -1
- package/icons/jsx/LocalSee.jsx +1 -1
- package/icons/jsx/Man.jsx +1 -1
- package/icons/jsx/Man2.jsx +1 -1
- package/icons/jsx/Man4.jsx +1 -1
- package/icons/jsx/ManageAccounts.jsx +1 -1
- package/icons/jsx/MarkUnreadChatAlt.jsx +1 -1
- package/icons/jsx/NoiseAware.jsx +1 -1
- package/icons/jsx/NoiseControlOff.jsx +1 -1
- package/icons/jsx/PeopleAlt.jsx +1 -1
- package/icons/jsx/PersonSearch.jsx +1 -1
- package/icons/jsx/Pets.jsx +4 -4
- package/icons/jsx/Plagiarism.jsx +1 -1
- package/icons/jsx/Policy.jsx +1 -1
- package/icons/jsx/Pool.jsx +1 -1
- package/icons/jsx/PriorityHigh.jsx +1 -1
- package/icons/jsx/RecordVoiceOver.jsx +1 -1
- package/icons/jsx/RememberMe.jsx +1 -1
- package/icons/jsx/ReportGmailerrorred.jsx +1 -1
- package/icons/jsx/RightSidebarFilled.jsx +19 -0
- package/icons/jsx/RightSidebarOutlined.jsx +19 -0
- package/icons/jsx/RssFeed.jsx +1 -1
- package/icons/jsx/ScatterPlot.jsx +3 -3
- package/icons/jsx/ScreenSearchDesktop.jsx +1 -1
- package/icons/jsx/SelfImprovement.jsx +1 -1
- package/icons/jsx/SentimentDissatisfied.jsx +2 -2
- package/icons/jsx/SentimentSatisfied.jsx +2 -2
- package/icons/jsx/SentimentSatisfiedAlt.jsx +2 -2
- package/icons/jsx/SentimentSlightlyDissatisfied.jsx +2 -2
- package/icons/jsx/SettingsApplications.jsx +1 -1
- package/icons/jsx/Shower.jsx +6 -6
- package/icons/jsx/SpatialAudio.jsx +1 -1
- package/icons/jsx/SpatialAudioOff.jsx +1 -1
- package/icons/jsx/SpatialTracking.jsx +1 -1
- package/icons/jsx/SpeakerGroup.jsx +1 -1
- package/icons/jsx/Sports.jsx +1 -1
- package/icons/jsx/SportsCricket.jsx +1 -1
- package/icons/jsx/SportsGolf.jsx +3 -3
- package/icons/jsx/SportsKabaddi.jsx +1 -1
- package/icons/jsx/SportsMartialArts.jsx +1 -1
- package/icons/jsx/Stream.jsx +4 -4
- package/icons/jsx/Streetview.jsx +1 -1
- package/icons/jsx/Subway.jsx +2 -2
- package/icons/jsx/SupportAgent.jsx +2 -2
- package/icons/jsx/WindPower.jsx +1 -1
- package/icons/jsx/Woman.jsx +1 -1
- package/icons/jsx/Woman2.jsx +1 -1
- package/icons/jsx/Yard.jsx +1 -1
- package/icons/jsx/index.jsx +2 -0
- package/icons/svg/check_circle_light_outline.svg +13 -0
- package/icons/svg/right_sidebar_filled.svg +3 -0
- package/icons/svg/right_sidebar_outlined.svg +3 -0
- package/lib/version.js +9 -0
- package/package.json +3 -3
- package/src/Button/README.md +99 -92
- package/src/Button/index.jsx +2 -2
- package/src/Button/index.scss +3 -3
- package/src/ColorPicker/ColorPicker.test.jsx +24 -2
- package/src/ColorPicker/index.jsx +56 -16
- package/src/Container/index.jsx +4 -0
- package/src/DataTable/README.md +4 -4
- package/src/DataTable/index.jsx +2 -1
- package/src/DataTable/selection/BaseSelectionStatus.jsx +2 -2
- package/src/DataTable/tablefilters.mdx +3 -3
- package/src/DataTable/tests/DataTable.test.jsx +31 -0
- package/src/Dropdown/index.jsx +4 -0
- package/src/Dropzone/index.jsx +2 -3
- package/src/Form/FormAutosuggest.jsx +11 -5
- package/src/Form/FormSwitch.jsx +3 -0
- package/src/Form/form-autosuggest.mdx +80 -72
- package/src/Form/tests/FormAutosuggest.test.jsx +21 -0
- package/src/Hyperlink/index.jsx +7 -6
- package/src/Icon/index.jsx +18 -11
- package/src/IconButton/index.jsx +1 -1
- package/src/Layout/index.jsx +1 -4
- package/src/Menu/MenuItem.jsx +2 -2
- package/src/Modal/ModalDialog.jsx +3 -0
- package/src/Modal/_ModalDialog.scss +12 -20
- package/src/Overlay/README.md +1 -1
- package/src/Popover/README.md +0 -1
- package/src/Popover/index.jsx +11 -11
- package/src/ProductTour/Checkpoint.jsx +9 -6
- package/src/ProductTour/messages.js +16 -0
- package/src/SearchField/SearchFieldAdvanced.jsx +12 -7
- package/src/SearchField/SearchFieldLabel.jsx +3 -3
- package/src/SearchField/index.jsx +0 -1
- package/src/SelectableBox/README.md +103 -71
- package/src/SelectableBox/index.jsx +5 -1
- package/src/SelectableBox/tests/SelectableBox.test.jsx +7 -0
- package/src/SelectableBox/tests/SelectableBoxSet.test.jsx +1 -1
- package/src/Tabs/README.md +76 -0
- package/src/Tabs/index.jsx +19 -13
- package/src/hooks/tests/useIndexOfLastVisibleChild.test.jsx +3 -3
- package/src/hooks/useIndexOfLastVisibleChild.jsx +36 -38
- package/src/hooks/useIndexOfLastVisibleChild.mdx +3 -3
- package/src/i18n/messages/ar.json +2 -1
- package/src/i18n/messages/ca.json +2 -1
- package/src/i18n/messages/es_419.json +2 -1
- package/src/i18n/messages/es_AR.json +2 -1
- package/src/i18n/messages/es_ES.json +2 -1
- package/src/i18n/messages/fr.json +2 -1
- package/src/i18n/messages/he.json +2 -1
- package/src/i18n/messages/id.json +2 -1
- package/src/i18n/messages/it_IT.json +2 -1
- package/src/i18n/messages/ko_KR.json +2 -1
- package/src/i18n/messages/pl.json +2 -1
- package/src/i18n/messages/pt_BR.json +2 -1
- package/src/i18n/messages/pt_PT.json +2 -1
- package/src/i18n/messages/ru.json +2 -1
- package/src/i18n/messages/th.json +2 -1
- package/src/i18n/messages/tr_TR.json +2 -1
- package/src/i18n/messages/uk.json +2 -1
- package/src/i18n/messages/zh_CN.json +2 -1
- package/styles/css/core/variables.css +5 -3
- package/styles/css/themes/light/variables.css +11 -11
- package/tokens/src/core/components/Button/core.json +8 -4
- package/tokens/src/themes/light/alias/color.json +10 -10
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
width="57"
|
|
3
|
+
height="57"
|
|
4
|
+
viewBox="0 0 57 57"
|
|
5
|
+
fill="none"
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
7
|
+
<path
|
|
8
|
+
d="m 28.5,0.5 c -15.446191,0 -28,12.553809 -28,28 0,15.446191 12.553809,28 28,28 15.446191,0 28,-12.553809 28,-28 0,-15.446191 -12.553809,-28 -28,-28 z m 0,3 c 13.824872,0 25,11.175128 25,25 0,13.824872 -11.175128,25 -25,25 -13.824872,0 -25,-11.175128 -25,-25 0,-13.824872 11.175128,-25 25,-25 z"
|
|
9
|
+
/>
|
|
10
|
+
<path
|
|
11
|
+
d="M 43.28125,16.386719 22.236328,37.431641 13.71875,28.912109 11.597656,31.035156 22.236328,41.673828 45.402344,18.507812 Z"
|
|
12
|
+
/>
|
|
13
|
+
</svg>
|
package/lib/version.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openedx/paragon",
|
|
3
|
-
"version": "22.0.0-alpha.
|
|
3
|
+
"version": "22.0.0-alpha.24",
|
|
4
4
|
"description": "Accessible, responsive UI component library based on Bootstrap.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -116,11 +116,11 @@
|
|
|
116
116
|
"@formatjs/cli": "^5.0.2",
|
|
117
117
|
"@semantic-release/changelog": "^6.0.1",
|
|
118
118
|
"@semantic-release/git": "^10.0.1",
|
|
119
|
-
"@testing-library/jest-dom": "^
|
|
119
|
+
"@testing-library/jest-dom": "^6.1.4",
|
|
120
120
|
"@testing-library/react": "^12.1.4",
|
|
121
121
|
"@testing-library/react-hooks": "^8.0.1",
|
|
122
122
|
"@testing-library/user-event": "^13.5.0",
|
|
123
|
-
"@types/jest": "^
|
|
123
|
+
"@types/jest": "^29.5.10",
|
|
124
124
|
"@types/react": "17.0.0",
|
|
125
125
|
"@types/react-dom": "17.0.11",
|
|
126
126
|
"@types/react-test-renderer": "^18.0.0",
|
package/src/Button/README.md
CHANGED
|
@@ -20,11 +20,11 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi
|
|
|
20
20
|
|
|
21
21
|
return (
|
|
22
22
|
<Stack gap={2} direction={ isExtraSmall ? "vertical" : "horizontal" }>
|
|
23
|
-
<Button variant="brand"
|
|
24
|
-
<Button variant="outline-brand"
|
|
25
|
-
<Button variant="primary"
|
|
26
|
-
<Button variant="outline-primary"
|
|
27
|
-
<Button variant="tertiary"
|
|
23
|
+
<Button variant="brand">Brand</Button>
|
|
24
|
+
<Button variant="outline-brand">Outline Brand</Button>
|
|
25
|
+
<Button variant="primary">Primary</Button>
|
|
26
|
+
<Button variant="outline-primary">Outline Primary</Button>
|
|
27
|
+
<Button variant="tertiary">Tertiary</Button>
|
|
28
28
|
</Stack>
|
|
29
29
|
)}
|
|
30
30
|
```
|
|
@@ -41,11 +41,11 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi
|
|
|
41
41
|
gap={2}
|
|
42
42
|
direction={ isExtraSmall ? "vertical" : "horizontal" }
|
|
43
43
|
>
|
|
44
|
-
<Button variant="inverse-brand"
|
|
45
|
-
<Button variant="inverse-outline-brand"
|
|
46
|
-
<Button variant="inverse-primary"
|
|
47
|
-
<Button variant="inverse-outline-primary"
|
|
48
|
-
<Button variant="inverse-tertiary"
|
|
44
|
+
<Button variant="inverse-brand">Brand</Button>
|
|
45
|
+
<Button variant="inverse-outline-brand">Outline Brand</Button>
|
|
46
|
+
<Button variant="inverse-primary">Primary</Button>
|
|
47
|
+
<Button variant="inverse-outline-primary">Outline Primary</Button>
|
|
48
|
+
<Button variant="inverse-tertiary">Tertiary</Button>
|
|
49
49
|
</Stack>
|
|
50
50
|
)}
|
|
51
51
|
```
|
|
@@ -63,20 +63,20 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi
|
|
|
63
63
|
gap={2}
|
|
64
64
|
direction={ isExtraSmall ? "vertical" : "horizontal" }
|
|
65
65
|
>
|
|
66
|
-
<Button variant="success"
|
|
67
|
-
<Button variant="danger"
|
|
68
|
-
<Button variant="outline-success"
|
|
69
|
-
<Button variant="outline-danger"
|
|
66
|
+
<Button variant="success">Success</Button>
|
|
67
|
+
<Button variant="danger">Danger</Button>
|
|
68
|
+
<Button variant="outline-success">Success</Button>
|
|
69
|
+
<Button variant="outline-danger">Danger</Button>
|
|
70
70
|
</Stack>
|
|
71
71
|
<Stack
|
|
72
72
|
gap={2}
|
|
73
73
|
direction={ isExtraSmall ? "vertical" : "horizontal" }
|
|
74
74
|
>
|
|
75
|
-
<Button variant="link"
|
|
76
|
-
<Button variant="light"
|
|
77
|
-
<Button variant="dark"
|
|
78
|
-
<Button variant="outline-light"
|
|
79
|
-
<Button variant="outline-dark"
|
|
75
|
+
<Button variant="link">Link</Button>
|
|
76
|
+
<Button variant="light">Light</Button>
|
|
77
|
+
<Button variant="dark">Dark</Button>
|
|
78
|
+
<Button variant="outline-light">Light</Button>
|
|
79
|
+
<Button variant="outline-dark">Dark</Button>
|
|
80
80
|
</Stack>
|
|
81
81
|
</>
|
|
82
82
|
)}
|
|
@@ -90,34 +90,41 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi
|
|
|
90
90
|
|
|
91
91
|
return (
|
|
92
92
|
<>
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
93
|
+
<Stack
|
|
94
|
+
className="mb-2"
|
|
95
|
+
gap={2}
|
|
96
|
+
direction={ isExtraSmall ? "vertical" : "horizontal" }
|
|
97
|
+
>
|
|
98
|
+
<Button variant="primary" size="lg">
|
|
99
|
+
Large button
|
|
100
|
+
</Button>
|
|
101
|
+
<Button variant="outline-primary" size="lg">
|
|
102
|
+
Large button
|
|
103
|
+
</Button>
|
|
104
|
+
</Stack>
|
|
105
|
+
<Stack
|
|
106
|
+
className="mb-2"
|
|
107
|
+
gap={2}
|
|
108
|
+
direction={ isExtraSmall ? "vertical" : "horizontal" }
|
|
109
|
+
>
|
|
110
|
+
<Button variant="primary" size="sm">
|
|
111
|
+
Small button
|
|
112
|
+
</Button>
|
|
113
|
+
<Button variant="outline-primary" size="sm">
|
|
114
|
+
Small button
|
|
115
|
+
</Button>
|
|
116
|
+
</Stack>
|
|
117
|
+
<Stack
|
|
118
|
+
className="mb-2"
|
|
119
|
+
gap={2}
|
|
120
|
+
direction={ isExtraSmall ? "vertical" : "horizontal" }
|
|
121
|
+
>
|
|
122
|
+
<Button variant="link" size="inline">Inline button</Button>
|
|
123
|
+
<Button variant="link" size="inline">Inline button</Button>
|
|
124
|
+
</Stack>
|
|
119
125
|
</>
|
|
120
|
-
)
|
|
126
|
+
)
|
|
127
|
+
}
|
|
121
128
|
```
|
|
122
129
|
|
|
123
130
|
### When to use the inline size
|
|
@@ -125,13 +132,11 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi
|
|
|
125
132
|
Use inline size buttons for when a button sits with a line of text.
|
|
126
133
|
|
|
127
134
|
```jsx live
|
|
128
|
-
|
|
129
|
-
<
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
</p>
|
|
134
|
-
</>
|
|
135
|
+
<p>
|
|
136
|
+
<span className="mr-1">2 items selected.</span>
|
|
137
|
+
<Button variant="link" size="inline" className="mr-1">Select all</Button>
|
|
138
|
+
<Button variant="link" size="inline">Clear</Button>
|
|
139
|
+
</p>
|
|
135
140
|
```
|
|
136
141
|
|
|
137
142
|
## Block Buttons
|
|
@@ -150,21 +155,41 @@ Use inline size buttons for when a button sits with a line of text.
|
|
|
150
155
|
### Disabled
|
|
151
156
|
|
|
152
157
|
```jsx live
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
+
() => {
|
|
159
|
+
const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.extraSmall.maxWidth });
|
|
160
|
+
|
|
161
|
+
return (
|
|
162
|
+
<Stack
|
|
163
|
+
className="mb-2"
|
|
164
|
+
gap={2}
|
|
165
|
+
direction={ isExtraSmall ? "vertical" : "horizontal" }
|
|
166
|
+
>
|
|
167
|
+
<Button variant="primary" disabled>Primary disabled</Button>
|
|
168
|
+
<Button variant="secondary" disabled>Secondary disabled</Button>
|
|
169
|
+
<Button as="a" href="https://edx.org" disabled>Link disabled</Button>
|
|
170
|
+
</Stack>
|
|
171
|
+
)
|
|
172
|
+
}
|
|
158
173
|
```
|
|
159
174
|
|
|
160
175
|
### With empty href
|
|
161
176
|
For link to be `disabled`, it must have href defined with some value.
|
|
162
177
|
|
|
163
178
|
```jsx live
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
179
|
+
() => {
|
|
180
|
+
const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.extraSmall.maxWidth });
|
|
181
|
+
|
|
182
|
+
return (
|
|
183
|
+
<Stack
|
|
184
|
+
className="mb-2"
|
|
185
|
+
gap={2}
|
|
186
|
+
direction={ isExtraSmall ? "vertical" : "horizontal" }
|
|
187
|
+
>
|
|
188
|
+
<Button as="a" disabled>No href</Button>
|
|
189
|
+
<Button as="a" href="" disabled>Empty string href</Button>
|
|
190
|
+
</Stack>
|
|
191
|
+
)
|
|
192
|
+
}
|
|
168
193
|
```
|
|
169
194
|
|
|
170
195
|
### With Icons before or after
|
|
@@ -179,46 +204,28 @@ For link to be `disabled`, it must have href defined with some value.
|
|
|
179
204
|
gap={2}
|
|
180
205
|
direction={ isExtraSmall ? "vertical" : "horizontal" }
|
|
181
206
|
>
|
|
182
|
-
<Button variant="brand" iconBefore={ArrowBack}
|
|
207
|
+
<Button variant="brand" iconBefore={ArrowBack}>
|
|
183
208
|
Brand
|
|
184
209
|
</Button>
|
|
185
|
-
<Button variant="outline-brand" iconAfter={ArrowDropDown}
|
|
210
|
+
<Button variant="outline-brand" iconAfter={ArrowDropDown}>
|
|
186
211
|
Outline Brand
|
|
187
212
|
</Button>
|
|
188
|
-
<Button variant="primary" iconBefore={Remove} iconAfter={Add}
|
|
213
|
+
<Button variant="primary" iconBefore={Remove} iconAfter={Add}>
|
|
189
214
|
Primary
|
|
190
215
|
</Button>
|
|
191
|
-
<Button variant="outline-primary" iconBefore={Highlight}
|
|
216
|
+
<Button variant="outline-primary" iconBefore={Highlight}>
|
|
192
217
|
Outline Primary
|
|
193
218
|
</Button>
|
|
194
|
-
<Button variant="tertiary" iconAfter={Add}
|
|
219
|
+
<Button variant="tertiary" iconAfter={Add}>
|
|
195
220
|
Tertiary
|
|
196
221
|
</Button>
|
|
197
222
|
</Stack>
|
|
198
|
-
)
|
|
223
|
+
)
|
|
224
|
+
}
|
|
199
225
|
```
|
|
200
226
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
<Spinner animation="border" />
|
|
207
|
-
</Button>
|
|
208
|
-
<Button variant="brand" className="mb-2 mr-2 mb-sm-0" aria-label="Loading some stuff">
|
|
209
|
-
<Spinner animation="border" />
|
|
210
|
-
</Button>
|
|
211
|
-
<Button variant="outline-primary" className="mb-2 mr-2 mb-sm-0" aria-label="Loading some stuff">
|
|
212
|
-
<Spinner animation="border" />
|
|
213
|
-
</Button>
|
|
214
|
-
<Button variant="outline-brand" className="mb-2 mr-2 mb-sm-0" aria-label="Loading some stuff">
|
|
215
|
-
<Spinner animation="border" />
|
|
216
|
-
</Button>
|
|
217
|
-
<Button variant="inverse-primary" className="mb-2 mr-2 mb-sm-0" aria-label="Loading some stuff">
|
|
218
|
-
<Spinner animation="border" />
|
|
219
|
-
</Button>
|
|
220
|
-
<Button variant="inverse-brand" className="mb-2 mr-2 mb-sm-0" aria-label="Loading some stuff">
|
|
221
|
-
<Spinner animation="border" />
|
|
222
|
-
</Button>
|
|
223
|
-
</>
|
|
224
|
-
```
|
|
227
|
+
## Stateful buttons
|
|
228
|
+
To implement loading state using a `Button` component, the [StatefulButton](https://paragon-openedx.netlify.app/components/statefulbutton/) component
|
|
229
|
+
is available for use. <br/>
|
|
230
|
+
This specialized component is designed to seamlessly manage and display boot states, providing a more efficient and
|
|
231
|
+
user-friendly experience.
|
package/src/Button/index.jsx
CHANGED
|
@@ -51,10 +51,10 @@ Button.propTypes = {
|
|
|
51
51
|
variant: PropTypes.string,
|
|
52
52
|
/** An icon component to render.
|
|
53
53
|
* Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` */
|
|
54
|
-
iconBefore: PropTypes.oneOfType([PropTypes.
|
|
54
|
+
iconBefore: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]),
|
|
55
55
|
/** An icon component to render.
|
|
56
56
|
* Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` */
|
|
57
|
-
iconAfter: PropTypes.oneOfType([PropTypes.
|
|
57
|
+
iconAfter: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]),
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
Button.defaultProps = {
|
package/src/Button/index.scss
CHANGED
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
bottom: calc(var(--pgn-spacing-btn-focus-distance-to-border) * -1);
|
|
42
42
|
left: calc(var(--pgn-spacing-btn-focus-distance-to-border) * -1);
|
|
43
43
|
border: solid var(--pgn-size-btn-focus-width) var(--pgn-btn-focus-outline-color, var(--pgn-color-body-base));
|
|
44
|
-
border-radius: var(--pgn-size-btn-focus-border-radius);
|
|
44
|
+
border-radius: var(--pgn-size-btn-focus-border-radius-base);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
&.btn-lg::before {
|
|
48
|
-
border-radius: var(--pgn-size-btn-focus-border-radius);
|
|
48
|
+
border-radius: var(--pgn-size-btn-focus-border-radius-lg);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
&.btn-sm::before {
|
|
52
|
-
border-radius: var(--pgn-size-btn-focus-border-radius);
|
|
52
|
+
border-radius: var(--pgn-size-btn-focus-border-radius-sm);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
&:active,
|
|
@@ -29,13 +29,35 @@ describe('picker works as expected', () => {
|
|
|
29
29
|
const color = 'wassap';
|
|
30
30
|
const setColor = jest.fn();
|
|
31
31
|
it('validates hex color', async () => {
|
|
32
|
-
|
|
32
|
+
render(<ColorPicker color={color} setColor={setColor} />);
|
|
33
|
+
|
|
33
34
|
await act(async () => {
|
|
34
35
|
await userEvent.click(screen.getByRole('button'));
|
|
35
36
|
});
|
|
37
|
+
expect(screen.queryByTestId('hex-input').value).toEqual('#wassap');
|
|
36
38
|
expect(screen.queryByText('Colors must be in hexadecimal format.')).toBeInTheDocument();
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
await act(async () => {
|
|
41
|
+
await userEvent.clear(screen.getByTestId('hex-input'));
|
|
42
|
+
await userEvent.paste(screen.getByTestId('hex-input'), '32116c');
|
|
43
|
+
});
|
|
44
|
+
expect(screen.queryByTestId('hex-input').value).toEqual('#32116c');
|
|
45
|
+
expect(screen.queryByText('Colors must be in hexadecimal format.')).not.toBeInTheDocument();
|
|
46
|
+
|
|
47
|
+
await act(async () => {
|
|
48
|
+
await userEvent.clear(screen.getByTestId('hex-input'));
|
|
49
|
+
await userEvent.paste(screen.getByTestId('hex-input'), 'yuk');
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
expect(screen.queryByTestId('hex-input').value).toEqual('#yuk');
|
|
53
|
+
expect(screen.queryByText('Colors must be in hexadecimal format.')).toBeInTheDocument();
|
|
54
|
+
|
|
55
|
+
await act(async () => {
|
|
56
|
+
await userEvent.clear(screen.getByTestId('hex-input'));
|
|
57
|
+
await userEvent.paste(screen.getByTestId('hex-input'), '#fad');
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
expect(screen.queryByTestId('hex-input').value).toEqual('#fad');
|
|
39
61
|
expect(screen.queryByText('Colors must be in hexadecimal format.')).not.toBeInTheDocument();
|
|
40
62
|
});
|
|
41
63
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { HexColorPicker } from 'react-colorful';
|
|
@@ -15,24 +15,63 @@ function ColorPicker({
|
|
|
15
15
|
}) {
|
|
16
16
|
const [isOpen, open, close] = useToggle(false);
|
|
17
17
|
const [target, setTarget] = React.useState(null);
|
|
18
|
-
const [hexValid, setHexValid] = React.useState(true);
|
|
19
18
|
|
|
20
|
-
const
|
|
19
|
+
const colorIsValid = (colorToValidate) => {
|
|
21
20
|
const hexRegex = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
return hexRegex.test(colorToValidate);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const formatHexColorString = (colorString) => {
|
|
25
|
+
if (!colorString.startsWith('#')) {
|
|
26
|
+
return `#${colorString}`.slice(0, 7);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return colorString.slice(0, 7);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const [hexValid, setHexValid] = React.useState(() => (color === '' || colorIsValid(formatHexColorString(color))));
|
|
33
|
+
|
|
34
|
+
const [hexColorString, setHexColorString] = React.useState(() => {
|
|
35
|
+
if (color === '') {
|
|
36
|
+
return '';
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return formatHexColorString(color);
|
|
40
|
+
});
|
|
41
|
+
const [colorToDisplay, setColorToDisplay] = React.useState(() => {
|
|
42
|
+
const formattedColor = formatHexColorString(color);
|
|
43
|
+
if (colorIsValid(formattedColor)) {
|
|
44
|
+
return formattedColor;
|
|
26
45
|
}
|
|
27
|
-
|
|
46
|
+
|
|
47
|
+
return '#fff';
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const setValidatedColor = (newColor) => {
|
|
51
|
+
if (newColor === '') {
|
|
28
52
|
setHexValid(true);
|
|
29
|
-
|
|
30
|
-
|
|
53
|
+
setColor('');
|
|
54
|
+
setHexColorString('');
|
|
55
|
+
setColorToDisplay('#fff');
|
|
56
|
+
return;
|
|
31
57
|
}
|
|
32
|
-
}, [setColor]);
|
|
33
58
|
|
|
34
|
-
|
|
35
|
-
|
|
59
|
+
const formattedColor = formatHexColorString(newColor);
|
|
60
|
+
|
|
61
|
+
if (colorIsValid(formattedColor)) {
|
|
62
|
+
setHexValid(true);
|
|
63
|
+
setColor(formattedColor);
|
|
64
|
+
setHexColorString(formattedColor);
|
|
65
|
+
setColorToDisplay(formattedColor);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
setHexValid(false);
|
|
70
|
+
setHexColorString(formattedColor);
|
|
71
|
+
|
|
72
|
+
// ensure the picker value stays in sync with the textbox
|
|
73
|
+
setColor(formattedColor);
|
|
74
|
+
};
|
|
36
75
|
|
|
37
76
|
return (
|
|
38
77
|
<>
|
|
@@ -65,16 +104,17 @@ function ColorPicker({
|
|
|
65
104
|
className="pgn__color-modal rounded shadow"
|
|
66
105
|
style={{ textAlign: 'start' }}
|
|
67
106
|
>
|
|
68
|
-
<HexColorPicker color={
|
|
107
|
+
<HexColorPicker color={colorToDisplay} onChange={setValidatedColor} />
|
|
69
108
|
<Form.Group className="pgn__hex-form" size="sm">
|
|
70
109
|
<div>
|
|
71
110
|
<Form.Label className="pgn__hex-label">Hex</Form.Label>
|
|
72
111
|
<Form.Control
|
|
73
112
|
className="pgn__hex-field"
|
|
74
113
|
isInvalid={!hexValid}
|
|
75
|
-
value={
|
|
76
|
-
onChange={(e) =>
|
|
114
|
+
value={hexColorString}
|
|
115
|
+
onChange={(e) => setValidatedColor(e.target.value)}
|
|
77
116
|
data-testid="hex-input"
|
|
117
|
+
spellCheck="false"
|
|
78
118
|
/>
|
|
79
119
|
</div>
|
|
80
120
|
{!hexValid && (
|
package/src/Container/index.jsx
CHANGED
|
@@ -28,11 +28,14 @@ Container.propTypes = {
|
|
|
28
28
|
...RBContainer.propTypes,
|
|
29
29
|
/** Override the base element */
|
|
30
30
|
as: PropTypes.elementType,
|
|
31
|
+
/** Specifies the contents of the container */
|
|
31
32
|
children: PropTypes.node,
|
|
32
33
|
/** Fill all available space at any breakpoint */
|
|
33
34
|
fluid: PropTypes.bool,
|
|
34
35
|
/** Set the maximum width for the container */
|
|
35
36
|
size: PropTypes.oneOf(Object.keys(SIZE_CLASS_NAMES)),
|
|
37
|
+
/** Overrides underlying component base CSS class name */
|
|
38
|
+
bsPrefix: PropTypes.string,
|
|
36
39
|
};
|
|
37
40
|
|
|
38
41
|
Container.defaultProps = {
|
|
@@ -40,6 +43,7 @@ Container.defaultProps = {
|
|
|
40
43
|
children: undefined,
|
|
41
44
|
fluid: true,
|
|
42
45
|
size: undefined,
|
|
46
|
+
bsPrefix: 'container',
|
|
43
47
|
};
|
|
44
48
|
|
|
45
49
|
export default Container;
|
package/src/DataTable/README.md
CHANGED
|
@@ -28,11 +28,11 @@ designStatus: 'Done'
|
|
|
28
28
|
devStatus: 'In progress'
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
-
The DataTable component is a wrapper that uses the <a href="https://
|
|
31
|
+
The DataTable component is a wrapper that uses the <a href="https://github.com/TanStack/table/tree/v7/docs/src/pages/docs" target="_blank" rel="noopener noreferrer">react-table</a> library to
|
|
32
32
|
create tables. It can be used as is, or its subcomponents can be used on their own, allowing the developer full control.
|
|
33
33
|
|
|
34
34
|
Paragon also exports all React hooks from ``react-table`` allowing the developers to use them and make customizations more freely without adding ``react-table`` as a separate dependency to their project.
|
|
35
|
-
For full list of available hooks view <a href="https://
|
|
35
|
+
For full list of available hooks view <a href="https://github.com/TanStack/table/tree/v7/docs/src/pages/docs/api" target="_blank" rel="noopener noreferrer">react-table API reference</a>.
|
|
36
36
|
|
|
37
37
|
## How children get information
|
|
38
38
|
|
|
@@ -49,7 +49,7 @@ const instance = useContext(DataTableContext)
|
|
|
49
49
|
For small tables (less than ~10,000 rows), filtering, sorting and pagination can be done quickly and easily on the frontend.
|
|
50
50
|
|
|
51
51
|
In this example, a default TextFilter component is used for all columns. A default filter can be passed in,
|
|
52
|
-
or a filter component can be defined on the column. See <a href="https://
|
|
52
|
+
or a filter component can be defined on the column. See <a href="https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/useFilters.md" target="_blank" rel="noopener noreferrer">react-table filters documentation</a>
|
|
53
53
|
for more information.
|
|
54
54
|
|
|
55
55
|
```jsx live
|
|
@@ -436,7 +436,7 @@ See ``dataViewToggleOptions`` props documentation for all supported props.
|
|
|
436
436
|
}}
|
|
437
437
|
isSortable
|
|
438
438
|
defaultColumnValues={{ Filter: TextFilter }}
|
|
439
|
-
itemCount={
|
|
439
|
+
itemCount={3}
|
|
440
440
|
data={[
|
|
441
441
|
{
|
|
442
442
|
name: 'Lil Bub',
|
package/src/DataTable/index.jsx
CHANGED
|
@@ -187,6 +187,7 @@ function DataTable({
|
|
|
187
187
|
|
|
188
188
|
const enhancedInstance = {
|
|
189
189
|
...instance,
|
|
190
|
+
manualFilters,
|
|
190
191
|
itemCount,
|
|
191
192
|
numBreakoutFilters,
|
|
192
193
|
bulkActions,
|
|
@@ -329,7 +330,7 @@ DataTable.propTypes = {
|
|
|
329
330
|
/** Function that will fetch table data. Called when page size, page index or filters change.
|
|
330
331
|
* Meant to be used with manual filters and pagination */
|
|
331
332
|
fetchData: PropTypes.func,
|
|
332
|
-
/** Initial state passed to react-table's documentation https://
|
|
333
|
+
/** Initial state passed to react-table's documentation https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/useTable.md */
|
|
333
334
|
initialState: PropTypes.shape({
|
|
334
335
|
pageSize: requiredWhen(PropTypes.number, 'isPaginated'),
|
|
335
336
|
pageIndex: requiredWhen(PropTypes.number, 'isPaginated'),
|
|
@@ -22,11 +22,11 @@ function BaseSelectionStatus({
|
|
|
22
22
|
}) {
|
|
23
23
|
const {
|
|
24
24
|
itemCount, filteredRows, isPaginated, state,
|
|
25
|
-
isSelectable, maxSelectedRows,
|
|
25
|
+
isSelectable, maxSelectedRows, manualFilters,
|
|
26
26
|
} = useContext(DataTableContext);
|
|
27
27
|
const hasAppliedFilters = state?.filters?.length > 0;
|
|
28
28
|
const isAllRowsSelected = numSelectedRows === itemCount;
|
|
29
|
-
const filteredItems = filteredRows?.length || itemCount;
|
|
29
|
+
const filteredItems = manualFilters ? itemCount : (filteredRows?.length || itemCount);
|
|
30
30
|
const hasMaxSelectedRows = isSelectable && maxSelectedRows;
|
|
31
31
|
|
|
32
32
|
const intlAllSelectedText = allSelectedText || (
|
|
@@ -14,18 +14,18 @@ devStatus: 'In progress'
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
The ``DataTable`` component is a wrapper that uses the <a href="https://
|
|
17
|
+
The ``DataTable`` component is a wrapper that uses the <a href="https://github.com/TanStack/table/tree/v7/docs/src/pages/docs" target="_blank" rel="noopener noreferrer">react-table</a> library to
|
|
18
18
|
create tables. It can be used as is, or its subcomponents can be used on their own, allowing the developer full control.
|
|
19
19
|
|
|
20
20
|
## Filtering and sorting
|
|
21
21
|
Paragon currently provides a variety of filter types, and you can also define your own filter types.
|
|
22
22
|
|
|
23
23
|
In the example below, a default ``TextFilter`` component is used as the default filter for all columns. A default filter can be passed in,
|
|
24
|
-
or a filter component can be defined on the column using the ``Filter`` attribute. See <a href="https://
|
|
24
|
+
or a filter component can be defined on the column using the ``Filter`` attribute. See <a href="https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/useFilters.md" target="_blank" rel="noopener noreferrer">react-table filters documentation</a>
|
|
25
25
|
for more information.
|
|
26
26
|
|
|
27
27
|
## Available filter functions
|
|
28
|
-
A filtering function can be defined on the column as well as the filter component. Custom filtering functions can also be defined, see <a href="https://
|
|
28
|
+
A filtering function can be defined on the column as well as the filter component. Custom filtering functions can also be defined, see <a href="https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/useFilters.md#column-options" target="_blank" rel="noopener noreferrer">react-table filters documentation</a>
|
|
29
29
|
for more information.
|
|
30
30
|
Filter functions are defined on the column as the ``filter`` attribute.
|
|
31
31
|
<dl>
|