dce-reactkit 3.1.2 → 3.1.5
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/dist/cjs/index.js +199 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/CheckboxButton.d.ts +1 -0
- package/dist/cjs/types/components/ItemPicker/NestableItemList.d.ts +17 -0
- package/dist/cjs/types/components/ItemPicker/index.d.ts +18 -0
- package/dist/cjs/types/components/ItemPicker/types/PickableItem.d.ts +16 -0
- package/dist/cjs/types/helpers/onlyKeepLetters.d.ts +8 -0
- package/dist/cjs/types/index.d.ts +3 -1
- package/dist/esm/index.js +199 -12
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/CheckboxButton.d.ts +1 -0
- package/dist/esm/types/components/ItemPicker/NestableItemList.d.ts +17 -0
- package/dist/esm/types/components/ItemPicker/index.d.ts +18 -0
- package/dist/esm/types/components/ItemPicker/types/PickableItem.d.ts +16 -0
- package/dist/esm/types/helpers/onlyKeepLetters.d.ts +8 -0
- package/dist/esm/types/index.d.ts +3 -1
- package/dist/index.d.ts +69 -27
- package/package.json +1 -1
- package/src/components/CheckboxButton.tsx +4 -1
- package/src/components/ItemPicker/NestableItemList.tsx +288 -0
- package/src/components/ItemPicker/index.tsx +85 -0
- package/src/components/ItemPicker/types/PickableItem.tsx +30 -0
- package/src/helpers/onlyKeepLetters.ts +11 -0
- package/src/index.ts +4 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Given a string, only keep the letters inside it
|
|
3
|
+
* @author Gabe Abrams
|
|
4
|
+
* @param str the string to parse
|
|
5
|
+
* @returns only the letters inside of the string
|
|
6
|
+
*/
|
|
7
|
+
const onlyKeepLetters = (str: string): string => {
|
|
8
|
+
return str.replace(/[^a-zA-Z]+/g, '');
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default onlyKeepLetters;
|
package/src/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ import PopSuccessMark from './components/PopSuccessMark';
|
|
|
13
13
|
import PopFailureMark from './components/PopFailureMark';
|
|
14
14
|
import PopPendingMark from './components/PopPendingMark';
|
|
15
15
|
import CopiableBox from './components/CopiableBox';
|
|
16
|
+
import ItemPicker from './components/ItemPicker';
|
|
16
17
|
|
|
17
18
|
// Import errors
|
|
18
19
|
import ErrorWithCode from './errors/ErrorWithCode';
|
|
@@ -45,6 +46,7 @@ import startMinWait from './helpers/startMinWait';
|
|
|
45
46
|
import getHumanReadableDate from './helpers/getHumanReadableDate';
|
|
46
47
|
import getPartOfDay from './helpers/getPartOfDay';
|
|
47
48
|
import stringsToHumanReadableList from './helpers/stringsToHumanReadableList';
|
|
49
|
+
import onlyKeepLetters from './helpers/onlyKeepLetters';
|
|
48
50
|
|
|
49
51
|
// Import types
|
|
50
52
|
import ModalButtonType from './types/ModalButtonType';
|
|
@@ -72,6 +74,7 @@ export {
|
|
|
72
74
|
PopFailureMark,
|
|
73
75
|
PopPendingMark,
|
|
74
76
|
CopiableBox,
|
|
77
|
+
ItemPicker,
|
|
75
78
|
// Global functions
|
|
76
79
|
alert,
|
|
77
80
|
confirm,
|
|
@@ -100,6 +103,7 @@ export {
|
|
|
100
103
|
getHumanReadableDate,
|
|
101
104
|
getPartOfDay,
|
|
102
105
|
stringsToHumanReadableList,
|
|
106
|
+
onlyKeepLetters,
|
|
103
107
|
// Client helpers
|
|
104
108
|
visitServerEndpoint,
|
|
105
109
|
// Server helpers
|