@homecode/ui 4.11.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/LICENSE +21 -0
- package/README.md +29 -0
- package/dist/esm/index.js +78 -0
- package/dist/esm/node_modules/style-inject/dist/style-inject.es.js +28 -0
- package/dist/esm/src/components/AssistiveText/AssistiveText.js +10 -0
- package/dist/esm/src/components/AssistiveText/AssistiveText.styl.js +7 -0
- package/dist/esm/src/components/Button/Button.helpers.js +12 -0
- package/dist/esm/src/components/Button/Button.js +38 -0
- package/dist/esm/src/components/Button/Button.styl.js +7 -0
- package/dist/esm/src/components/ButtonGroup/ButtonGroup.js +10 -0
- package/dist/esm/src/components/ButtonGroup/ButtonGroup.styl.js +7 -0
- package/dist/esm/src/components/Checkbox/Checkbox.js +48 -0
- package/dist/esm/src/components/Checkbox/Checkbox.styl.js +7 -0
- package/dist/esm/src/components/Container/Container.js +12 -0
- package/dist/esm/src/components/Container/Container.styl.js +7 -0
- package/dist/esm/src/components/DateTime/DateTime.js +17 -0
- package/dist/esm/src/components/Draggable/Draggable.js +136 -0
- package/dist/esm/src/components/Draggable/Draggable.styl.js +7 -0
- package/dist/esm/src/components/Expand/Expand.js +24 -0
- package/dist/esm/src/components/Expand/Expand.styl.js +7 -0
- package/dist/esm/src/components/Form/Form.helpers.js +42 -0
- package/dist/esm/src/components/Form/Form.js +286 -0
- package/dist/esm/src/components/Form/Form.styl.js +7 -0
- package/dist/esm/src/components/Form/Form.types.js +1 -0
- package/dist/esm/src/components/Form/SubmitButtons/SubmitButtons.js +8 -0
- package/dist/esm/src/components/Form/SubmitButtons/SubmitButtons.styl.js +7 -0
- package/dist/esm/src/components/Form/Validator.js +36 -0
- package/dist/esm/src/components/Gallery/Dots/Dots.js +9 -0
- package/dist/esm/src/components/Gallery/Dots/Dots.styl.js +7 -0
- package/dist/esm/src/components/Gallery/Gallery.js +180 -0
- package/dist/esm/src/components/Gallery/Gallery.styl.js +7 -0
- package/dist/esm/src/components/Heading/Heading.js +37 -0
- package/dist/esm/src/components/Heading/Heading.styl.js +7 -0
- package/dist/esm/src/components/Icon/Icon.js +27 -0
- package/dist/esm/src/components/Icon/Icon.styl.js +7 -0
- package/dist/esm/src/components/Icon/icons/avatar.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/brokenImage.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/check.svg.js +19 -0
- package/dist/esm/src/components/Icon/icons/chevronDown.svg.js +20 -0
- package/dist/esm/src/components/Icon/icons/chevronLeft.svg.js +20 -0
- package/dist/esm/src/components/Icon/icons/chevronRight.svg.js +20 -0
- package/dist/esm/src/components/Icon/icons/chevronUp.svg.js +20 -0
- package/dist/esm/src/components/Icon/icons/close.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/colors.svg.js +60 -0
- package/dist/esm/src/components/Icon/icons/copy.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/delete.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/draft.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/edit.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/externalLink.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/fullscreen.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/fullscreenExit.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/gear.svg.js +20 -0
- package/dist/esm/src/components/Icon/icons/history.svg.js +17 -0
- package/dist/esm/src/components/Icon/icons/home.svg.js +19 -0
- package/dist/esm/src/components/Icon/icons/index.js +41 -0
- package/dist/esm/src/components/Icon/icons/loader.svg.js +45 -0
- package/dist/esm/src/components/Icon/icons/menu.svg.js +18 -0
- package/dist/esm/src/components/Icon/icons/mic.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/minus.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/moreHorizontal.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/moreVertical.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/plus.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/redo.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/requiredStar.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/save.svg.js +17 -0
- package/dist/esm/src/components/Icon/icons/send.svg.js +16 -0
- package/dist/esm/src/components/Icon/icons/settings.svg.js +52 -0
- package/dist/esm/src/components/Icon/icons/shoppingBag.svg.js +17 -0
- package/dist/esm/src/components/Icon/icons/social_email.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/social_instagram.svg.js +15 -0
- package/dist/esm/src/components/Icon/icons/social_telegram.svg.js +19 -0
- package/dist/esm/src/components/Icon/icons/undo.svg.js +15 -0
- package/dist/esm/src/components/Input/Input.js +331 -0
- package/dist/esm/src/components/Input/Input.styl.js +7 -0
- package/dist/esm/src/components/InputFile/InputFile.js +292 -0
- package/dist/esm/src/components/InputFile/InputFile.styl.js +7 -0
- package/dist/esm/src/components/InputFile/InputFile.types.js +1 -0
- package/dist/esm/src/components/InputFile/Item/Item.js +18 -0
- package/dist/esm/src/components/InputFile/Item/Item.styl.js +7 -0
- package/dist/esm/src/components/Label/Label.constants.json.js +8 -0
- package/dist/esm/src/components/Label/Label.helpers.js +35 -0
- package/dist/esm/src/components/Label/Label.js +58 -0
- package/dist/esm/src/components/Label/Label.styl.js +7 -0
- package/dist/esm/src/components/Lazy/Lazy.js +65 -0
- package/dist/esm/src/components/LightBox/LightBox.js +28 -0
- package/dist/esm/src/components/LightBox/LightBox.styl.js +7 -0
- package/dist/esm/src/components/Notifications/Notifications.constants.json.js +6 -0
- package/dist/esm/src/components/Notifications/Notifications.js +67 -0
- package/dist/esm/src/components/Notifications/Notifications.styl.js +7 -0
- package/dist/esm/src/components/Notifications/store.js +62 -0
- package/dist/esm/src/components/Paranja/Paranja.js +14 -0
- package/dist/esm/src/components/Paranja/Paranja.styl.js +7 -0
- package/dist/esm/src/components/Popup/Popup.helpers.js +31 -0
- package/dist/esm/src/components/Popup/Popup.js +396 -0
- package/dist/esm/src/components/Popup/Popup.styl.js +7 -0
- package/dist/esm/src/components/PopupMenu/PopupMenu.js +15 -0
- package/dist/esm/src/components/PopupMenu/PopupMenu.styl.js +7 -0
- package/dist/esm/src/components/Portal/Portal.js +19 -0
- package/dist/esm/src/components/RequiredStar/RequiredStar.js +12 -0
- package/dist/esm/src/components/RequiredStar/RequiredStar.styl.js +7 -0
- package/dist/esm/src/components/Router/Link/Link.js +61 -0
- package/dist/esm/src/components/Router/Link/Link.styl.js +7 -0
- package/dist/esm/src/components/Router/Redirect.js +12 -0
- package/dist/esm/src/components/Router/Route.js +4 -0
- package/dist/esm/src/components/Router/Router.helpers.js +33 -0
- package/dist/esm/src/components/Router/Router.js +68 -0
- package/dist/esm/src/components/Router/context.js +5 -0
- package/dist/esm/src/components/Router/store.js +55 -0
- package/dist/esm/src/components/Scroll/Scroll.js +274 -0
- package/dist/esm/src/components/Scroll/Scroll.styl.js +7 -0
- package/dist/esm/src/components/Select/Select.helpers.js +37 -0
- package/dist/esm/src/components/Select/Select.js +583 -0
- package/dist/esm/src/components/Select/Select.styl.js +7 -0
- package/dist/esm/src/components/Spinner/Spinner.js +11 -0
- package/dist/esm/src/components/Spinner/Spinner.styl.js +7 -0
- package/dist/esm/src/components/Spinner/spinner.svg.js +24 -0
- package/dist/esm/src/components/Table/Table.js +24 -0
- package/dist/esm/src/components/Table/Table.styl.js +7 -0
- package/dist/esm/src/components/Tabs/Tabs.js +43 -0
- package/dist/esm/src/components/Tabs/Tabs.styl.js +7 -0
- package/dist/esm/src/components/Text/Text.js +44 -0
- package/dist/esm/src/components/Text/Text.styl.js +7 -0
- package/dist/esm/src/components/Theme/Theme.defaults.js +50 -0
- package/dist/esm/src/components/Theme/Theme.helpers.js +67 -0
- package/dist/esm/src/components/Theme/Theme.js +13 -0
- package/dist/esm/src/components/VH/VH.js +33 -0
- package/dist/esm/src/components/Virtualized/List/List.js +124 -0
- package/dist/esm/src/components/Virtualized/List/List.styl.js +7 -0
- package/dist/esm/src/components/Virtualized/List/ListScroll.js +21 -0
- package/dist/esm/src/components/Virtualized/List/ListScroll.styl.js +7 -0
- package/dist/esm/src/components/Virtualized/Virtualized.helpers.js +14 -0
- package/dist/esm/src/components/Virtualized/Virtualized.js +200 -0
- package/dist/esm/src/components/Virtualized/Virtualized.styl.js +7 -0
- package/dist/esm/src/components/Virtualized/Virtualized.types.js +1 -0
- package/dist/esm/src/services/i18n.js +68 -0
- package/dist/esm/src/tools/array.js +60 -0
- package/dist/esm/src/tools/config.js +9 -0
- package/dist/esm/src/tools/debounce.js +11 -0
- package/dist/esm/src/tools/dom.js +46 -0
- package/dist/esm/src/tools/env.js +3 -0
- package/dist/esm/src/tools/file.js +11 -0
- package/dist/esm/src/tools/localStorage.js +31 -0
- package/dist/esm/src/tools/number.js +27 -0
- package/dist/esm/src/tools/object.js +5 -0
- package/dist/esm/src/tools/queryParams.js +20 -0
- package/dist/esm/src/tools/rangeMap.js +3 -0
- package/dist/esm/src/tools/resizeObserver.js +64 -0
- package/dist/esm/src/tools/scroll.js +41 -0
- package/dist/esm/src/tools/string.js +7 -0
- package/dist/esm/src/tools/throttle.js +30 -0
- package/dist/esm/src/tools/uid.js +7 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/src/components/AssistiveText/AssistiveText.d.ts +3 -0
- package/dist/esm/types/src/components/AssistiveText/AssistiveText.types.d.ts +7 -0
- package/dist/esm/types/src/components/Button/Button.d.ts +4 -0
- package/dist/esm/types/src/components/Button/Button.helpers.d.ts +1 -0
- package/dist/esm/types/src/components/Button/Button.types.d.ts +14 -0
- package/dist/esm/types/src/components/ButtonGroup/ButtonGroup.d.ts +3 -0
- package/dist/esm/types/src/components/ButtonGroup/ButtonGroup.types.d.ts +5 -0
- package/dist/esm/types/src/components/Checkbox/Checkbox.d.ts +18 -0
- package/dist/esm/types/src/components/Checkbox/Checkbox.types.d.ts +10 -0
- package/dist/esm/types/src/components/Container/Container.d.ts +3 -0
- package/dist/esm/types/src/components/Container/Container.types.d.ts +13 -0
- package/dist/esm/types/src/components/DateTime/DateTime.d.ts +8 -0
- package/dist/esm/types/src/components/DateTime/DateTime.types.d.ts +6 -0
- package/dist/esm/types/src/components/Draggable/Draggable.d.ts +24 -0
- package/dist/esm/types/src/components/Draggable/Draggable.types.d.ts +11 -0
- package/dist/esm/types/src/components/Expand/Expand.d.ts +3 -0
- package/dist/esm/types/src/components/Expand/Expand.types.d.ts +16 -0
- package/dist/esm/types/src/components/Form/Form.d.ts +32 -0
- package/dist/esm/types/src/components/Form/Form.helpers.d.ts +6 -0
- package/dist/esm/types/src/components/Form/Form.types.d.ts +71 -0
- package/dist/esm/types/src/components/Form/SubmitButtons/SubmitButtons.d.ts +13 -0
- package/dist/esm/types/src/components/Form/Validator.d.ts +2 -0
- package/dist/esm/types/src/components/Form/index.d.ts +2 -0
- package/dist/esm/types/src/components/Gallery/Dots/Dots.d.ts +5 -0
- package/dist/esm/types/src/components/Gallery/Gallery.d.ts +36 -0
- package/dist/esm/types/src/components/Gallery/Gallery.types.d.ts +12 -0
- package/dist/esm/types/src/components/Heading/Heading.d.ts +3 -0
- package/dist/esm/types/src/components/Heading/Heading.types.d.ts +5 -0
- package/dist/esm/types/src/components/Icon/Icon.d.ts +45 -0
- package/dist/esm/types/src/components/Icon/Icon.example.d.ts +3 -0
- package/dist/esm/types/src/components/Icon/Icon.helpers.d.ts +1 -0
- package/dist/esm/types/src/components/Icon/Icon.types.d.ts +8 -0
- package/dist/esm/types/src/components/Icon/icons/index.d.ts +39 -0
- package/dist/esm/types/src/components/Input/Input.d.ts +42 -0
- package/dist/esm/types/src/components/Input/Input.types.d.ts +21 -0
- package/dist/esm/types/src/components/InputFile/InputFile.d.ts +48 -0
- package/dist/esm/types/src/components/InputFile/InputFile.types.d.ts +22 -0
- package/dist/esm/types/src/components/InputFile/Item/Item.d.ts +16 -0
- package/dist/esm/types/src/components/Label/Label.d.ts +19 -0
- package/dist/esm/types/src/components/Label/Label.helpers.d.ts +1 -0
- package/dist/esm/types/src/components/Label/Label.types.d.ts +8 -0
- package/dist/esm/types/src/components/Lazy/Lazy.d.ts +18 -0
- package/dist/esm/types/src/components/Lazy/Lazy.types.d.ts +15 -0
- package/dist/esm/types/src/components/LightBox/LightBox.d.ts +3 -0
- package/dist/esm/types/src/components/LightBox/LightBox.types.d.ts +7 -0
- package/dist/esm/types/src/components/Notifications/Notifications.d.ts +2 -0
- package/dist/esm/types/src/components/Notifications/Notifications.types.d.ts +19 -0
- package/dist/esm/types/src/components/Notifications/store.d.ts +2 -0
- package/dist/esm/types/src/components/Paranja/Paranja.d.ts +3 -0
- package/dist/esm/types/src/components/Paranja/Paranja.types.d.ts +8 -0
- package/dist/esm/types/src/components/Popup/Popup.d.ts +73 -0
- package/dist/esm/types/src/components/Popup/Popup.helpers.d.ts +8 -0
- package/dist/esm/types/src/components/Popup/Popup.types.d.ts +34 -0
- package/dist/esm/types/src/components/PopupMenu/PopupMenu.d.ts +3 -0
- package/dist/esm/types/src/components/PopupMenu/PopupMenu.types.d.ts +13 -0
- package/dist/esm/types/src/components/Portal/Portal.d.ts +7 -0
- package/dist/esm/types/src/components/RequiredStar/RequiredStar.d.ts +3 -0
- package/dist/esm/types/src/components/RequiredStar/RequiredStar.types.d.ts +6 -0
- package/dist/esm/types/src/components/Router/Link/Link.d.ts +1 -0
- package/dist/esm/types/src/components/Router/Link/Link.types.d.ts +12 -0
- package/dist/esm/types/src/components/Router/Redirect.d.ts +5 -0
- package/dist/esm/types/src/components/Router/Route.d.ts +5 -0
- package/dist/esm/types/src/components/Router/Router.d.ts +7 -0
- package/dist/esm/types/src/components/Router/Router.helpers.d.ts +2 -0
- package/dist/esm/types/src/components/Router/Router.types.d.ts +18 -0
- package/dist/esm/types/src/components/Router/context.d.ts +6 -0
- package/dist/esm/types/src/components/Router/store.d.ts +2 -0
- package/dist/esm/types/src/components/Scroll/Scroll.d.ts +67 -0
- package/dist/esm/types/src/components/Scroll/Scroll.types.d.ts +27 -0
- package/dist/esm/types/src/components/Select/Select.d.ts +94 -0
- package/dist/esm/types/src/components/Select/Select.helpers.d.ts +14 -0
- package/dist/esm/types/src/components/Select/Select.types.d.ts +74 -0
- package/dist/esm/types/src/components/Spinner/Spinner.d.ts +3 -0
- package/dist/esm/types/src/components/Spinner/Spinner.types.d.ts +4 -0
- package/dist/esm/types/src/components/Table/Table.d.ts +8 -0
- package/dist/esm/types/src/components/Table/Table.types.d.ts +19 -0
- package/dist/esm/types/src/components/Tabs/Tabs.d.ts +3 -0
- package/dist/esm/types/src/components/Tabs/Tabs.types.d.ts +27 -0
- package/dist/esm/types/src/components/Text/Text.d.ts +7 -0
- package/dist/esm/types/src/components/Theme/Theme.d.ts +5 -0
- package/dist/esm/types/src/components/Theme/Theme.defaults.d.ts +32 -0
- package/dist/esm/types/src/components/Theme/Theme.helpers.d.ts +15 -0
- package/dist/esm/types/src/components/Theme/Theme.types.d.ts +6 -0
- package/dist/esm/types/src/components/VH/VH.d.ts +12 -0
- package/dist/esm/types/src/components/Virtualized/Cards/Cards.d.ts +26 -0
- package/dist/esm/types/src/components/Virtualized/List/List.d.ts +44 -0
- package/dist/esm/types/src/components/Virtualized/List/ListScroll.d.ts +8 -0
- package/dist/esm/types/src/components/Virtualized/Table/Table.d.ts +26 -0
- package/dist/esm/types/src/components/Virtualized/Virtualized.d.ts +34 -0
- package/dist/esm/types/src/components/Virtualized/Virtualized.helpers.d.ts +18 -0
- package/dist/esm/types/src/components/Virtualized/Virtualized.types.d.ts +53 -0
- package/dist/esm/types/src/components/Virtualized/index.d.ts +4 -0
- package/dist/esm/types/src/components/index.d.ts +33 -0
- package/dist/esm/types/src/index.d.ts +3 -0
- package/dist/esm/types/src/services/i18n.d.ts +16 -0
- package/dist/esm/types/src/services/index.d.ts +1 -0
- package/dist/esm/types/src/tools/array.d.ts +8 -0
- package/dist/esm/types/src/tools/config.d.ts +10 -0
- package/dist/esm/types/src/tools/debounce.d.ts +1 -0
- package/dist/esm/types/src/tools/dom.d.ts +12 -0
- package/dist/esm/types/src/tools/env.d.ts +1 -0
- package/dist/esm/types/src/tools/file.d.ts +1 -0
- package/dist/esm/types/src/tools/index.d.ts +16 -0
- package/dist/esm/types/src/tools/localStorage.d.ts +12 -0
- package/dist/esm/types/src/tools/number.d.ts +5 -0
- package/dist/esm/types/src/tools/object.d.ts +1 -0
- package/dist/esm/types/src/tools/queryParams.d.ts +3 -0
- package/dist/esm/types/src/tools/rangeMap.d.ts +2 -0
- package/dist/esm/types/src/tools/resizeObserver.d.ts +2 -0
- package/dist/esm/types/src/tools/scroll.d.ts +5 -0
- package/dist/esm/types/src/tools/string.d.ts +1 -0
- package/dist/esm/types/src/tools/throttle.d.ts +6 -0
- package/dist/esm/types/src/tools/uid.d.ts +1 -0
- package/dist/esm/types/src/types.d.ts +15 -0
- package/package.json +117 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Component, ReactElement, ReactNode, RefObject } from 'react';
|
|
2
|
+
import * as T from '../Virtualized.types';
|
|
3
|
+
type CustomWrapElemParams = {
|
|
4
|
+
component: typeof Component;
|
|
5
|
+
props: object;
|
|
6
|
+
getRef: (ref: RefObject<ReactElement>) => Element;
|
|
7
|
+
};
|
|
8
|
+
export type Props = Omit<T.ViewProps, 'wrapElem' | 'children'> & {
|
|
9
|
+
contentBefore?: ReactNode;
|
|
10
|
+
contentAfter?: ReactNode;
|
|
11
|
+
customWrapElem?: CustomWrapElemParams;
|
|
12
|
+
};
|
|
13
|
+
declare class List extends Component<Props> {
|
|
14
|
+
store: any;
|
|
15
|
+
wrapElem: Element;
|
|
16
|
+
contentBeforeElem: any;
|
|
17
|
+
contentAfterElem: any;
|
|
18
|
+
timers: any;
|
|
19
|
+
unsubscribeContentBeforeResize: any;
|
|
20
|
+
constructor(props: any);
|
|
21
|
+
componentDidMount(): void;
|
|
22
|
+
componentDidUpdate(prevProps: any): void;
|
|
23
|
+
subscribeContentBeforeResize(): void;
|
|
24
|
+
checkContentBeforeHeight: () => void;
|
|
25
|
+
getProps(): any;
|
|
26
|
+
getItemProps: ({ index, offsetBefore, offsetAfter }: {
|
|
27
|
+
index: any;
|
|
28
|
+
offsetBefore: any;
|
|
29
|
+
offsetAfter: any;
|
|
30
|
+
}) => {
|
|
31
|
+
className: string;
|
|
32
|
+
style: {
|
|
33
|
+
top: any;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
onWrapRef: (ref: Element) => void;
|
|
37
|
+
renderLayout: ({ state, items, ...rest }: {
|
|
38
|
+
[x: string]: any;
|
|
39
|
+
state: any;
|
|
40
|
+
items: any;
|
|
41
|
+
}) => JSX.Element;
|
|
42
|
+
render(): JSX.Element;
|
|
43
|
+
}
|
|
44
|
+
export default List;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Props as ScrollProps } from '../../Scroll/Scroll.types';
|
|
3
|
+
import type { Props as ListProps } from './List';
|
|
4
|
+
type Props = ListProps & {
|
|
5
|
+
scrollProps: ScrollProps;
|
|
6
|
+
};
|
|
7
|
+
export default function ListScroll({ scrollProps, ...rest }: Props): JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Component, ReactNode } from 'react';
|
|
2
|
+
import { ViewProps } from '../Virtualized.types';
|
|
3
|
+
type Props = ViewProps & {
|
|
4
|
+
thead?: ReactNode;
|
|
5
|
+
tfoot?: ReactNode;
|
|
6
|
+
maxHeight?: string | number;
|
|
7
|
+
};
|
|
8
|
+
declare class Table extends Component<Props> {
|
|
9
|
+
wrapElem: import("react").RefObject<HTMLDivElement>;
|
|
10
|
+
gapBeforeElem: import("react").RefObject<HTMLTableRowElement>;
|
|
11
|
+
gapAfterElem: import("react").RefObject<HTMLTableRowElement>;
|
|
12
|
+
state: {
|
|
13
|
+
colsWidth: any[];
|
|
14
|
+
};
|
|
15
|
+
statesLog: any[];
|
|
16
|
+
componentDidUpdate(prevProps: any): void;
|
|
17
|
+
fixColWidth(): void;
|
|
18
|
+
renderLayout: ({ state, items, onScroll, ...props }: {
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
state: any;
|
|
21
|
+
items: any;
|
|
22
|
+
onScroll: any;
|
|
23
|
+
}) => JSX.Element;
|
|
24
|
+
render(): JSX.Element;
|
|
25
|
+
}
|
|
26
|
+
export default Table;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Component, ReactNode } from 'react';
|
|
2
|
+
import * as T from './Virtualized.types';
|
|
3
|
+
declare class Virtualized extends Component<T.Props, T.State> {
|
|
4
|
+
clearUnfreezeTimer: any;
|
|
5
|
+
scrollTopInited: boolean;
|
|
6
|
+
scrollElem: Element;
|
|
7
|
+
lastScrollEndIndex: number;
|
|
8
|
+
static defaultProps: {
|
|
9
|
+
overlapCount: number;
|
|
10
|
+
pageSize: number;
|
|
11
|
+
};
|
|
12
|
+
constructor(props: any);
|
|
13
|
+
static getDerivedStateFromProps(props: any, { height }: {
|
|
14
|
+
height: any;
|
|
15
|
+
}): {
|
|
16
|
+
height: number;
|
|
17
|
+
};
|
|
18
|
+
componentDidMount(): void;
|
|
19
|
+
getSnapshotBeforeUpdate(prevProps: any): number;
|
|
20
|
+
shouldComponentUpdate(nextProps: Readonly<T.Props>, nextState: Readonly<T.State>): boolean;
|
|
21
|
+
componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
|
|
22
|
+
componentWillUnmount(): void;
|
|
23
|
+
needUpdateIndexes(prevProps: any): boolean;
|
|
24
|
+
needUpdateHeight(prevProps: any): boolean;
|
|
25
|
+
getNewScrollTop(prevProps: any, snapshot: any): number;
|
|
26
|
+
getIndexes(): T.IndexesType | null;
|
|
27
|
+
onScroll: (e: any) => void;
|
|
28
|
+
checkIfEnd: () => void;
|
|
29
|
+
unfreeze: () => void;
|
|
30
|
+
getItemProps: (index: number) => T.ItemProps;
|
|
31
|
+
renderItems(): ReactNode[];
|
|
32
|
+
render(): ReactNode;
|
|
33
|
+
}
|
|
34
|
+
export default Virtualized;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare function getLastIndex(scrollTop: any, clientHeight: any, itemHeight: any, overlapCount: any, totalCount: any): number;
|
|
2
|
+
export declare function getIndexes({ scrollTop, clientHeight, itemHeight, itemsCount, totalCount, overlapCount, }: {
|
|
3
|
+
scrollTop: any;
|
|
4
|
+
clientHeight: any;
|
|
5
|
+
itemHeight: any;
|
|
6
|
+
itemsCount: any;
|
|
7
|
+
totalCount: any;
|
|
8
|
+
overlapCount: any;
|
|
9
|
+
}): {
|
|
10
|
+
first: number;
|
|
11
|
+
last: number;
|
|
12
|
+
};
|
|
13
|
+
export declare function getHeight({ itemsCount, itemHeight, offsetBefore, offsetAfter, }: {
|
|
14
|
+
itemsCount: any;
|
|
15
|
+
itemHeight: any;
|
|
16
|
+
offsetBefore?: number;
|
|
17
|
+
offsetAfter?: number;
|
|
18
|
+
}): number;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { ComponentType } from 'uilib/types';
|
|
3
|
+
export type IndexesType = {
|
|
4
|
+
first: number;
|
|
5
|
+
last: number;
|
|
6
|
+
};
|
|
7
|
+
export type ItemProps = ComponentType & {
|
|
8
|
+
style?: any;
|
|
9
|
+
key: number;
|
|
10
|
+
};
|
|
11
|
+
export type DefaultProps = {
|
|
12
|
+
overlapCount: number;
|
|
13
|
+
};
|
|
14
|
+
export type State = IndexesType & {
|
|
15
|
+
id: string;
|
|
16
|
+
height: number;
|
|
17
|
+
isFreezed: boolean;
|
|
18
|
+
};
|
|
19
|
+
type RenderProps = ComponentType & {
|
|
20
|
+
state: IndexesType & {
|
|
21
|
+
height: number;
|
|
22
|
+
};
|
|
23
|
+
items: ReactNode[];
|
|
24
|
+
onScroll: (e: MouseEvent) => void;
|
|
25
|
+
};
|
|
26
|
+
type GetItemPropsParams = {
|
|
27
|
+
index: number;
|
|
28
|
+
offsetBefore?: number;
|
|
29
|
+
offsetAfter?: number;
|
|
30
|
+
};
|
|
31
|
+
type ScrollCallbackState = IndexesType & {
|
|
32
|
+
scrollTop: number;
|
|
33
|
+
};
|
|
34
|
+
export type Props = Readonly<DefaultProps> & ComponentType & {
|
|
35
|
+
id?: any;
|
|
36
|
+
wrapElem: Element | null;
|
|
37
|
+
itemHeight: number;
|
|
38
|
+
itemsCount: number;
|
|
39
|
+
totalCount: number;
|
|
40
|
+
overlapCount?: number;
|
|
41
|
+
pageSize?: number;
|
|
42
|
+
offsetBefore?: number;
|
|
43
|
+
offsetAfter?: number;
|
|
44
|
+
initialScrollTop?: number;
|
|
45
|
+
scrollTop?: number;
|
|
46
|
+
onScroll?: (args: ScrollCallbackState) => void;
|
|
47
|
+
onScrollEnd?: () => void;
|
|
48
|
+
children: (props: RenderProps) => ReactNode;
|
|
49
|
+
renderItem: (props: ItemProps) => ReactElement;
|
|
50
|
+
getItemProps: (params: GetItemPropsParams) => Record<string, any>;
|
|
51
|
+
};
|
|
52
|
+
export type ViewProps = Omit<Props, 'children' | 'wrapElem' | 'getItemProps'>;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export * from './AssistiveText/AssistiveText';
|
|
2
|
+
export * from './Button/Button';
|
|
3
|
+
export * from './ButtonGroup/ButtonGroup';
|
|
4
|
+
export * from './Checkbox/Checkbox';
|
|
5
|
+
export * from './Container/Container';
|
|
6
|
+
export * from './DateTime/DateTime';
|
|
7
|
+
export * from './Draggable/Draggable';
|
|
8
|
+
export * from './Expand/Expand';
|
|
9
|
+
export * from './Form/Form';
|
|
10
|
+
export * from './Gallery/Gallery';
|
|
11
|
+
export * from './Heading/Heading';
|
|
12
|
+
export * from './Icon/Icon';
|
|
13
|
+
export * from './Input/Input';
|
|
14
|
+
export * from './InputFile/InputFile';
|
|
15
|
+
export * from './Label/Label';
|
|
16
|
+
export * from './Lazy/Lazy';
|
|
17
|
+
export * from './LightBox/LightBox';
|
|
18
|
+
export * from './Notifications/Notifications';
|
|
19
|
+
export * from './Paranja/Paranja';
|
|
20
|
+
export * from './Popup/Popup';
|
|
21
|
+
export * from './Portal/Portal';
|
|
22
|
+
export * from './PopupMenu/PopupMenu';
|
|
23
|
+
export * from './Router/Router';
|
|
24
|
+
export * from './RequiredStar/RequiredStar';
|
|
25
|
+
export * from './Select/Select';
|
|
26
|
+
export * from './Scroll/Scroll';
|
|
27
|
+
export * from './Spinner/Spinner';
|
|
28
|
+
export * from './Table/Table';
|
|
29
|
+
export * from './Tabs/Tabs';
|
|
30
|
+
export * from './Text/Text';
|
|
31
|
+
export * from './Theme/Theme';
|
|
32
|
+
export * from './VH/VH';
|
|
33
|
+
export * from './Virtualized';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type LangLoader = () => Promise<{
|
|
3
|
+
default: object;
|
|
4
|
+
}>;
|
|
5
|
+
type RegisterConfig = {
|
|
6
|
+
[lang: string]: LangLoader;
|
|
7
|
+
};
|
|
8
|
+
export declare const store: any;
|
|
9
|
+
export declare function init(config: RegisterConfig): {
|
|
10
|
+
storeName: string;
|
|
11
|
+
componentStore: any;
|
|
12
|
+
withI18N: (Component: any) => any;
|
|
13
|
+
i18n: (key: any, props?: any) => any;
|
|
14
|
+
I18N: import("react").MemoExoticComponent<any>;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as i18n from './i18n';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function indexWhere(arr: any, val: any, fieldName?: any): any;
|
|
2
|
+
export declare function sliceWhere([...arr]: Iterable<any>, val: any, fieldName?: any): any[];
|
|
3
|
+
export declare function spliceWhere(arr: any, val: any, fieldName?: any): void;
|
|
4
|
+
export declare function addUniq(arr: any, val: any | any[], fieldName?: any): void;
|
|
5
|
+
export declare function unshiftUniq(arr: any, val: any, fieldName: any): void;
|
|
6
|
+
export declare function insert(baseArr: any[], targetArr: any[], startIndex: number): any[];
|
|
7
|
+
export declare function getIndexCircular(arr: any[], index: number): any;
|
|
8
|
+
export declare function circularSlice(arr: any[], startIndex: number, count: number): any[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function debounce(fn: (...args: unknown[]) => any, ms: number): any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function getCoords(elem: any): {
|
|
2
|
+
top: any;
|
|
3
|
+
left: any;
|
|
4
|
+
};
|
|
5
|
+
export declare function hasParent(elem: any, parentElem: any): any;
|
|
6
|
+
export declare enum INTERACTION_MODE {
|
|
7
|
+
POINTER = "pointer",
|
|
8
|
+
KEYBOARD = "keyboard"
|
|
9
|
+
}
|
|
10
|
+
export declare const getInteractionMode: () => INTERACTION_MODE;
|
|
11
|
+
export declare function watchControllerFlag(): void;
|
|
12
|
+
export declare const isTouch: () => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isBrowser: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function toBase64(file: any): Promise<string>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * as env from './env';
|
|
2
|
+
export { config } from './config';
|
|
3
|
+
export * as array from './array';
|
|
4
|
+
export * as string from './string';
|
|
5
|
+
export * as number from './number';
|
|
6
|
+
export * as object from './object';
|
|
7
|
+
export * as file from './file';
|
|
8
|
+
export * as uid from './uid';
|
|
9
|
+
export * as dom from './dom';
|
|
10
|
+
export { default as rangeMap } from './rangeMap';
|
|
11
|
+
export * as scroll from './scroll';
|
|
12
|
+
export { default as throttle } from './throttle';
|
|
13
|
+
export { default as debounce } from './debounce';
|
|
14
|
+
export { default as LS } from './localStorage';
|
|
15
|
+
export * as resizeObserver from './resizeObserver';
|
|
16
|
+
export * as queryParams from './queryParams';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function clone(obj: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function capitalize(str?: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function generateUID(): any;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
export type Size = 's' | 'm' | 'l';
|
|
3
|
+
export type ComponentType = {
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
export type FormFieldChangeHandler = (e: ChangeEvent | null, value: any) => void | boolean;
|
|
7
|
+
export type FormControl<T> = {
|
|
8
|
+
value: T;
|
|
9
|
+
onChange?: (e: ChangeEvent | null, value: T) => void | boolean;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
error?: string | boolean;
|
|
13
|
+
name?: string;
|
|
14
|
+
label?: string;
|
|
15
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@homecode/ui",
|
|
3
|
+
"version": "4.11.1",
|
|
4
|
+
"description": "React UI components library",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
7
|
+
"ts": "tsc --noUnusedLocals",
|
|
8
|
+
"dev": "NODE_OPTIONS='--loader ts-node/esm' NODE_ENV=development webpack-dev-server --mode=development --config ./src/docs/config/webpack.config.js --progress",
|
|
9
|
+
"build": "rollup -c rollup.config.ts --configPlugin @rollup/plugin-typescript",
|
|
10
|
+
"build:compress": "COMPRESS=true yarn build",
|
|
11
|
+
"release": "standard-version",
|
|
12
|
+
"release:patch": "yarn release -- --release-as patch",
|
|
13
|
+
"release:minor": "yarn release -- --release-as minor",
|
|
14
|
+
"release:major": "yarn release -- --release-as major",
|
|
15
|
+
"release:as": "yarn release -- --release-as",
|
|
16
|
+
"docs:build": "NODE_OPTIONS='--loader ts-node/esm' NODE_ENV=production webpack --mode=production --config ./src/docs/config/webpack.config.js --progress",
|
|
17
|
+
"docs:deploy": "./bin/deploy",
|
|
18
|
+
"docs": "yarn docs:build && yarn docs:deploy"
|
|
19
|
+
},
|
|
20
|
+
"standard-version": {
|
|
21
|
+
"scripts": {
|
|
22
|
+
"postchangelog": "replace ' (SB-\\d+)' ' [`$1`](https://tracker.yandex.ru/$1)' CHANGELOG.md"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"author": "Oleg Apostol",
|
|
26
|
+
"license": "ISC",
|
|
27
|
+
"keywords": [
|
|
28
|
+
"react",
|
|
29
|
+
"ui",
|
|
30
|
+
"components",
|
|
31
|
+
"library"
|
|
32
|
+
],
|
|
33
|
+
"homepage": "https://uilib.apostol.space",
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "git+https://github.com/foreverido/uilib.git"
|
|
37
|
+
},
|
|
38
|
+
"main": "dist/cjs",
|
|
39
|
+
"module": "dist/esm",
|
|
40
|
+
"types": "dist/esm/types/index.d.ts",
|
|
41
|
+
"type": "module",
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
|
|
44
|
+
"@rollup/plugin-typescript": "^11.0.0",
|
|
45
|
+
"classnames": "^2.3.2",
|
|
46
|
+
"compareq": "^1.2.2",
|
|
47
|
+
"fastest-validator": "^1.16.0",
|
|
48
|
+
"favicons": "^7.1.3",
|
|
49
|
+
"favicons-webpack-plugin": "^6.0.0",
|
|
50
|
+
"justorm": "^2.1.3",
|
|
51
|
+
"lodash.omit": "^4.5.0",
|
|
52
|
+
"lodash.pick": "^4.4.0",
|
|
53
|
+
"moment": "^2.29.4",
|
|
54
|
+
"react": "^18.2.0",
|
|
55
|
+
"react-dom": "^18.2.0",
|
|
56
|
+
"react-live": "^3.1.2",
|
|
57
|
+
"react-refresh": "^0.14.0",
|
|
58
|
+
"roddeh-i18n": "^1.2.1",
|
|
59
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
60
|
+
"rollup-plugin-uglify": "^6.0.4",
|
|
61
|
+
"timen": "^0.1.0"
|
|
62
|
+
},
|
|
63
|
+
"bugs": {
|
|
64
|
+
"url": "https://github.com/apostololeg/uilib/issues"
|
|
65
|
+
},
|
|
66
|
+
"directories": {
|
|
67
|
+
"dist": "./dist"
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@babel/core": "^7.20.12",
|
|
71
|
+
"@babel/plugin-proposal-optional-chaining": "^7.20.7",
|
|
72
|
+
"@babel/preset-typescript": "^7.21.0",
|
|
73
|
+
"@codesandbox/sandpack-react": "^2.0.6",
|
|
74
|
+
"@rollup/plugin-commonjs": "^24.0.1",
|
|
75
|
+
"@rollup/plugin-json": "^6.0.0",
|
|
76
|
+
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
77
|
+
"@svgr/rollup": "^6.5.1",
|
|
78
|
+
"@types/jest": "^29.4.0",
|
|
79
|
+
"@types/node": "^18.14.0",
|
|
80
|
+
"@types/react": "^18.0.28",
|
|
81
|
+
"@types/react-dom": "^18.0.11",
|
|
82
|
+
"babel-loader": "8",
|
|
83
|
+
"babel-preset-react-app": "^10.0.1",
|
|
84
|
+
"clean-webpack-plugin": "^4.0.0",
|
|
85
|
+
"copy-webpack-plugin": "^11.0.0",
|
|
86
|
+
"css-loader": "^6.7.3",
|
|
87
|
+
"css-modules-typescript-loader": "^4.0.1",
|
|
88
|
+
"file-loader": "^6.2.0",
|
|
89
|
+
"fs": "^0.0.2",
|
|
90
|
+
"html-webpack-partials-plugin": "^0.8.0",
|
|
91
|
+
"html-webpack-plugin": "^5.5.0",
|
|
92
|
+
"mini-css-extract-plugin": "^2.7.2",
|
|
93
|
+
"postcss-loader": "^7.0.2",
|
|
94
|
+
"postcss-preset-env": "^8.0.1",
|
|
95
|
+
"raw-loader": "^4.0.2",
|
|
96
|
+
"react-hot-loader": "^4.13.1",
|
|
97
|
+
"react-svg-loader": "^3.0.3",
|
|
98
|
+
"replace": "^1.2.2",
|
|
99
|
+
"rollup": "^3.17.1",
|
|
100
|
+
"rollup-plugin-delete": "^2.0.0",
|
|
101
|
+
"rollup-plugin-dts": "^5.2.0",
|
|
102
|
+
"rollup-plugin-node-externals": "^5.1.2",
|
|
103
|
+
"rollup-plugin-styles": "^4.0.0",
|
|
104
|
+
"rollup-plugin-typescript2": "^0.34.1",
|
|
105
|
+
"standard-version": "^9.5.0",
|
|
106
|
+
"style-loader": "^3.3.1",
|
|
107
|
+
"stylus": "^0.59.0",
|
|
108
|
+
"stylus-loader": "^7.1.0",
|
|
109
|
+
"ts-node": "^10.9.1",
|
|
110
|
+
"ts-to-json": "^1.22.11",
|
|
111
|
+
"typescript": "^4.9.5",
|
|
112
|
+
"webpack": "^5.75.0",
|
|
113
|
+
"webpack-cli": "^5.0.1",
|
|
114
|
+
"webpack-dev-server": "^4.11.1",
|
|
115
|
+
"webpack-merge": "^5.8.0"
|
|
116
|
+
}
|
|
117
|
+
}
|