@react-fabric/core 1.0.0-beta.0
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 +10 -0
- package/css/flags.rect.css +1607 -0
- package/css/flags.wavy.css +1606 -0
- package/css/index.js +250 -0
- package/css/reset/_gradients.css +51 -0
- package/css/reset/_reset.css +407 -0
- package/css/reset/_text.css +179 -0
- package/css/reset/_theme.css +110 -0
- package/css/reset/index.css +27 -0
- package/css/styles.css +31 -0
- package/css/tailwind/colors.ts +158 -0
- package/dist/cjs/components/actionLabel/ActionLabel.js +56 -0
- package/dist/cjs/components/actionLabel/ActionLabel.module.css +1 -0
- package/dist/cjs/components/animations/Animations.js +135 -0
- package/dist/cjs/components/animations/Animations.module.css +1 -0
- package/dist/cjs/components/avatar/Avatar.js +144 -0
- package/dist/cjs/components/avatar/Avatar.module.css +1 -0
- package/dist/cjs/components/avatar/AvatarGroup.js +74 -0
- package/dist/cjs/components/badge/Badge.js +82 -0
- package/dist/cjs/components/badge/Badge.module.css +1 -0
- package/dist/cjs/components/breadcrumbs/Breadcrumbs.js +71 -0
- package/dist/cjs/components/breadcrumbs/Breadcrumbs.module.css +1 -0
- package/dist/cjs/components/button/Button.js +170 -0
- package/dist/cjs/components/button/Button.module.css +1 -0
- package/dist/cjs/components/button/ButtonGroup.js +41 -0
- package/dist/cjs/components/button/ConfirmButton.js +166 -0
- package/dist/cjs/components/button/ToggleButtonGroup.js +68 -0
- package/dist/cjs/components/callout/Callout.js +54 -0
- package/dist/cjs/components/card/Card.js +62 -0
- package/dist/cjs/components/card/Card.module.css +1 -0
- package/dist/cjs/components/card/CardCover.js +48 -0
- package/dist/cjs/components/chip/Chip.js +94 -0
- package/dist/cjs/components/chip/Chip.module.css +1 -0
- package/dist/cjs/components/collapsable/Collapsable.js +84 -0
- package/dist/cjs/components/collapsable/Collapsable.module.css +1 -0
- package/dist/cjs/components/divider/Divider.js +65 -0
- package/dist/cjs/components/dropdown/Dropdown.js +180 -0
- package/dist/cjs/components/dropdown/Dropdown.module.css +1 -0
- package/dist/cjs/components/dropdown/DropdownTool.js +26 -0
- package/dist/cjs/components/empty/EmptyContent.js +92 -0
- package/dist/cjs/components/icon/Icon.js +106 -0
- package/dist/cjs/components/icon/Icon.module.css +1 -0
- package/dist/cjs/components/media/Media.js +149 -0
- package/dist/cjs/components/media/Media.module.css +1 -0
- package/dist/cjs/components/menu/ContextMenu.js +84 -0
- package/dist/cjs/components/menu/Menu.js +204 -0
- package/dist/cjs/components/menu/Menu.module.css +1 -0
- package/dist/cjs/components/menu/MenuItem.js +119 -0
- package/dist/cjs/components/meter/Meter.js +41 -0
- package/dist/cjs/components/meter/Meter.module.css +1 -0
- package/dist/cjs/components/navigator/Navigator.js +54 -0
- package/dist/cjs/components/panel/Panel.js +125 -0
- package/dist/cjs/components/panel/Panel.module.css +1 -0
- package/dist/cjs/components/panel/PanelGroup.js +50 -0
- package/dist/cjs/components/panel/PanelStack.js +85 -0
- package/dist/cjs/components/progress/Progress.module.css +1 -0
- package/dist/cjs/components/progress/ProgressBar.js +62 -0
- package/dist/cjs/components/progress/ProgressCircle.js +96 -0
- package/dist/cjs/components/tabpanel/Tab.js +78 -0
- package/dist/cjs/components/tabpanel/TabPanel.js +77 -0
- package/dist/cjs/components/tabpanel/TabPanel.module.css +1 -0
- package/dist/cjs/context/Global.js +169 -0
- package/dist/cjs/context/NotificationCenter.js +254 -0
- package/dist/cjs/core/aside/Aside.js +152 -0
- package/dist/cjs/core/aside/Aside.module.css +1 -0
- package/dist/cjs/core/boundary/ErrorBoundary.js +140 -0
- package/dist/cjs/core/boundary/ErrorBoundary.module.css +1 -0
- package/dist/cjs/core/boundary/ErrorIcon.js +51 -0
- package/dist/cjs/core/content/Content.js +70 -0
- package/dist/cjs/core/content/Content.module.css +1 -0
- package/dist/cjs/core/headfoot/HeadFoot.js +62 -0
- package/dist/cjs/core/headfoot/HeadFoot.module.css +1 -0
- package/dist/cjs/core/page/Page.js +65 -0
- package/dist/cjs/core/page/Page.module.css +1 -0
- package/dist/cjs/core/responsive/Responsive.js +64 -0
- package/dist/cjs/core/responsive/Responsive.module.css +1 -0
- package/dist/cjs/core/section/Section.js +44 -0
- package/dist/cjs/core/section/Section.module.css +1 -0
- package/dist/cjs/core/theme/Theme.module.css +1 -0
- package/dist/cjs/core/theme/ThemeProvider.js +74 -0
- package/dist/cjs/core/viewport/Viewport.js +39 -0
- package/dist/cjs/core/viewport/Viewport.module.css +1 -0
- package/dist/cjs/hooks/useClientService.js +30 -0
- package/dist/cjs/hooks/useControlledValue.js +22 -0
- package/dist/cjs/hooks/useDebounce.js +56 -0
- package/dist/cjs/hooks/useEffectDebugger.js +113 -0
- package/dist/cjs/hooks/useIsDark.js +33 -0
- package/dist/cjs/hooks/useIsRtl.js +27 -0
- package/dist/cjs/hooks/useNavigator.js +36 -0
- package/dist/cjs/hooks/useOverlayService.js +55 -0
- package/dist/cjs/hooks/usePropToggle.js +40 -0
- package/dist/cjs/hooks/useResize.js +75 -0
- package/dist/cjs/hooks/useResizeObserver.js +38 -0
- package/dist/cjs/hooks/useStorage.js +44 -0
- package/dist/cjs/hotkeys/HotKey.js +47 -0
- package/dist/cjs/hotkeys/HotKeyLabel.js +52 -0
- package/dist/cjs/hotkeys/HotKeyWrapper.js +98 -0
- package/dist/cjs/hotkeys/commons.js +56 -0
- package/dist/cjs/i18n/ar.json.js +31 -0
- package/dist/cjs/i18n/en.json.js +46 -0
- package/dist/cjs/i18n/index.js +55 -0
- package/dist/cjs/index.js +162 -0
- package/dist/cjs/overlays/alert/Alert.js +163 -0
- package/dist/cjs/overlays/alert/Alert.module.css +1 -0
- package/dist/cjs/overlays/flyout/Flyout.js +152 -0
- package/dist/cjs/overlays/flyout/Flyout.module.css +1 -0
- package/dist/cjs/overlays/message/Message.js +84 -0
- package/dist/cjs/overlays/message/Message.module.css +1 -0
- package/dist/cjs/overlays/modal/Modal.js +132 -0
- package/dist/cjs/overlays/modal/Modal.module.css +1 -0
- package/dist/cjs/overlays/toast/Toast.js +166 -0
- package/dist/cjs/overlays/toast/Toast.module.css +1 -0
- package/dist/cjs/overlays/tooltip/Tooltip.js +133 -0
- package/dist/cjs/overlays/tooltip/Tooltip.module.css +1 -0
- package/dist/cjs/types/icons.js +197 -0
- package/dist/cjs/typography/Abbr.js +108 -0
- package/dist/cjs/typography/Copy.js +59 -0
- package/dist/cjs/typography/Link.js +55 -0
- package/dist/cjs/typography/Mark.js +86 -0
- package/dist/cjs/typography/Text.js +121 -0
- package/dist/cjs/typography/Title.js +58 -0
- package/dist/cjs/typography/Typography.module.css +1 -0
- package/dist/cjs/typography/types.js +42 -0
- package/dist/cjs/utils/calculateDimensions.js +51 -0
- package/dist/cjs/utils/getColor.js +52 -0
- package/dist/cjs/utils/nodeCheck.js +35 -0
- package/dist/esm/components/actionLabel/ActionLabel.js +56 -0
- package/dist/esm/components/actionLabel/ActionLabel.module.css +1 -0
- package/dist/esm/components/animations/Animations.js +131 -0
- package/dist/esm/components/animations/Animations.module.css +1 -0
- package/dist/esm/components/avatar/Avatar.js +144 -0
- package/dist/esm/components/avatar/Avatar.module.css +1 -0
- package/dist/esm/components/avatar/AvatarGroup.js +74 -0
- package/dist/esm/components/badge/Badge.js +81 -0
- package/dist/esm/components/badge/Badge.module.css +1 -0
- package/dist/esm/components/breadcrumbs/Breadcrumbs.js +71 -0
- package/dist/esm/components/breadcrumbs/Breadcrumbs.module.css +1 -0
- package/dist/esm/components/button/Button.js +170 -0
- package/dist/esm/components/button/Button.module.css +1 -0
- package/dist/esm/components/button/ButtonGroup.js +41 -0
- package/dist/esm/components/button/ConfirmButton.js +166 -0
- package/dist/esm/components/button/ToggleButtonGroup.js +68 -0
- package/dist/esm/components/callout/Callout.js +54 -0
- package/dist/esm/components/card/Card.js +62 -0
- package/dist/esm/components/card/Card.module.css +1 -0
- package/dist/esm/components/card/CardCover.js +48 -0
- package/dist/esm/components/chip/Chip.js +94 -0
- package/dist/esm/components/chip/Chip.module.css +1 -0
- package/dist/esm/components/collapsable/Collapsable.js +84 -0
- package/dist/esm/components/collapsable/Collapsable.module.css +1 -0
- package/dist/esm/components/divider/Divider.js +65 -0
- package/dist/esm/components/dropdown/Dropdown.js +179 -0
- package/dist/esm/components/dropdown/Dropdown.module.css +1 -0
- package/dist/esm/components/dropdown/DropdownTool.js +26 -0
- package/dist/esm/components/empty/EmptyContent.js +92 -0
- package/dist/esm/components/icon/Icon.js +106 -0
- package/dist/esm/components/icon/Icon.module.css +1 -0
- package/dist/esm/components/media/Media.js +148 -0
- package/dist/esm/components/media/Media.module.css +1 -0
- package/dist/esm/components/menu/ContextMenu.js +84 -0
- package/dist/esm/components/menu/Menu.js +204 -0
- package/dist/esm/components/menu/Menu.module.css +1 -0
- package/dist/esm/components/menu/MenuItem.js +119 -0
- package/dist/esm/components/meter/Meter.js +41 -0
- package/dist/esm/components/meter/Meter.module.css +1 -0
- package/dist/esm/components/navigator/Navigator.js +54 -0
- package/dist/esm/components/panel/Panel.js +125 -0
- package/dist/esm/components/panel/Panel.module.css +1 -0
- package/dist/esm/components/panel/PanelGroup.js +50 -0
- package/dist/esm/components/panel/PanelStack.js +85 -0
- package/dist/esm/components/progress/Progress.module.css +1 -0
- package/dist/esm/components/progress/ProgressBar.js +62 -0
- package/dist/esm/components/progress/ProgressCircle.js +96 -0
- package/dist/esm/components/tabpanel/Tab.js +78 -0
- package/dist/esm/components/tabpanel/TabPanel.js +77 -0
- package/dist/esm/components/tabpanel/TabPanel.module.css +1 -0
- package/dist/esm/context/Global.js +165 -0
- package/dist/esm/context/NotificationCenter.js +254 -0
- package/dist/esm/core/aside/Aside.js +152 -0
- package/dist/esm/core/aside/Aside.module.css +1 -0
- package/dist/esm/core/boundary/ErrorBoundary.js +140 -0
- package/dist/esm/core/boundary/ErrorBoundary.module.css +1 -0
- package/dist/esm/core/boundary/ErrorIcon.js +51 -0
- package/dist/esm/core/content/Content.js +70 -0
- package/dist/esm/core/content/Content.module.css +1 -0
- package/dist/esm/core/headfoot/HeadFoot.js +61 -0
- package/dist/esm/core/headfoot/HeadFoot.module.css +1 -0
- package/dist/esm/core/page/Page.js +65 -0
- package/dist/esm/core/page/Page.module.css +1 -0
- package/dist/esm/core/responsive/Responsive.js +62 -0
- package/dist/esm/core/responsive/Responsive.module.css +1 -0
- package/dist/esm/core/section/Section.js +44 -0
- package/dist/esm/core/section/Section.module.css +1 -0
- package/dist/esm/core/theme/Theme.module.css +1 -0
- package/dist/esm/core/theme/ThemeProvider.js +74 -0
- package/dist/esm/core/viewport/Viewport.js +39 -0
- package/dist/esm/core/viewport/Viewport.module.css +1 -0
- package/dist/esm/hooks/useClientService.js +30 -0
- package/dist/esm/hooks/useControlledValue.js +22 -0
- package/dist/esm/hooks/useDebounce.js +56 -0
- package/dist/esm/hooks/useEffectDebugger.js +111 -0
- package/dist/esm/hooks/useIsDark.js +33 -0
- package/dist/esm/hooks/useIsRtl.js +27 -0
- package/dist/esm/hooks/useNavigator.js +36 -0
- package/dist/esm/hooks/useOverlayService.js +55 -0
- package/dist/esm/hooks/usePropToggle.js +40 -0
- package/dist/esm/hooks/useResize.js +75 -0
- package/dist/esm/hooks/useResizeObserver.js +38 -0
- package/dist/esm/hooks/useStorage.js +43 -0
- package/dist/esm/hotkeys/HotKey.js +47 -0
- package/dist/esm/hotkeys/HotKeyLabel.js +52 -0
- package/dist/esm/hotkeys/HotKeyWrapper.js +96 -0
- package/dist/esm/hotkeys/commons.js +56 -0
- package/dist/esm/i18n/ar.json.js +27 -0
- package/dist/esm/i18n/en.json.js +41 -0
- package/dist/esm/i18n/index.js +55 -0
- package/dist/esm/index.js +75 -0
- package/dist/esm/overlays/alert/Alert.js +163 -0
- package/dist/esm/overlays/alert/Alert.module.css +1 -0
- package/dist/esm/overlays/flyout/Flyout.js +152 -0
- package/dist/esm/overlays/flyout/Flyout.module.css +1 -0
- package/dist/esm/overlays/message/Message.js +84 -0
- package/dist/esm/overlays/message/Message.module.css +1 -0
- package/dist/esm/overlays/modal/Modal.js +132 -0
- package/dist/esm/overlays/modal/Modal.module.css +1 -0
- package/dist/esm/overlays/toast/Toast.js +166 -0
- package/dist/esm/overlays/toast/Toast.module.css +1 -0
- package/dist/esm/overlays/tooltip/Tooltip.js +132 -0
- package/dist/esm/overlays/tooltip/Tooltip.module.css +1 -0
- package/dist/esm/types/icons.js +199 -0
- package/dist/esm/typography/Abbr.js +108 -0
- package/dist/esm/typography/Copy.js +59 -0
- package/dist/esm/typography/Link.js +55 -0
- package/dist/esm/typography/Mark.js +86 -0
- package/dist/esm/typography/Text.js +121 -0
- package/dist/esm/typography/Title.js +58 -0
- package/dist/esm/typography/Typography.module.css +1 -0
- package/dist/esm/typography/types.js +41 -0
- package/dist/esm/utils/calculateDimensions.js +50 -0
- package/dist/esm/utils/getColor.js +49 -0
- package/dist/esm/utils/nodeCheck.js +35 -0
- package/dist/types/components/actionLabel/ActionLabel.d.ts +21 -0
- package/dist/types/components/animations/Animations.d.ts +23 -0
- package/dist/types/components/avatar/Avatar.d.ts +48 -0
- package/dist/types/components/avatar/AvatarGroup.d.ts +24 -0
- package/dist/types/components/badge/Badge.d.ts +25 -0
- package/dist/types/components/breadcrumbs/Breadcrumbs.d.ts +17 -0
- package/dist/types/components/button/Button.d.ts +94 -0
- package/dist/types/components/button/ButtonGroup.d.ts +34 -0
- package/dist/types/components/button/ConfirmButton.d.ts +27 -0
- package/dist/types/components/button/ToggleButtonGroup.d.ts +56 -0
- package/dist/types/components/callout/Callout.d.ts +28 -0
- package/dist/types/components/card/Card.d.ts +39 -0
- package/dist/types/components/card/CardCover.d.ts +16 -0
- package/dist/types/components/chip/Chip.d.ts +41 -0
- package/dist/types/components/collapsable/Collapsable.d.ts +43 -0
- package/dist/types/components/divider/Divider.d.ts +20 -0
- package/dist/types/components/dropdown/Dropdown.d.ts +50 -0
- package/dist/types/components/dropdown/DropdownTool.d.ts +8 -0
- package/dist/types/components/empty/EmptyContent.d.ts +21 -0
- package/dist/types/components/icon/Icon.d.ts +44 -0
- package/dist/types/components/index.d.ts +33 -0
- package/dist/types/components/media/Media.d.ts +37 -0
- package/dist/types/components/menu/ContextMenu.d.ts +7 -0
- package/dist/types/components/menu/Menu.d.ts +2 -0
- package/dist/types/components/menu/MenuItem.d.ts +4 -0
- package/dist/types/components/menu/types.d.ts +59 -0
- package/dist/types/components/meter/Meter.d.ts +12 -0
- package/dist/types/components/navigator/Navigator.d.ts +12 -0
- package/dist/types/components/panel/Panel.d.ts +59 -0
- package/dist/types/components/panel/PanelGroup.d.ts +12 -0
- package/dist/types/components/panel/PanelStack.d.ts +16 -0
- package/dist/types/components/progress/ProgressBar.d.ts +24 -0
- package/dist/types/components/progress/ProgressCircle.d.ts +16 -0
- package/dist/types/components/tabpanel/Tab.d.ts +41 -0
- package/dist/types/components/tabpanel/TabPanel.d.ts +41 -0
- package/dist/types/context/Global.d.ts +81 -0
- package/dist/types/context/NotificationCenter.d.ts +11 -0
- package/dist/types/core/aside/Aside.d.ts +52 -0
- package/dist/types/core/boundary/ErrorBoundary.d.ts +26 -0
- package/dist/types/core/boundary/ErrorIcon.d.ts +1 -0
- package/dist/types/core/content/Content.d.ts +15 -0
- package/dist/types/core/headfoot/HeadFoot.d.ts +24 -0
- package/dist/types/core/index.d.ts +9 -0
- package/dist/types/core/page/Page.d.ts +23 -0
- package/dist/types/core/responsive/Responsive.d.ts +53 -0
- package/dist/types/core/section/Section.d.ts +7 -0
- package/dist/types/core/theme/ThemeProvider.d.ts +37 -0
- package/dist/types/core/viewport/Viewport.d.ts +5 -0
- package/dist/types/hooks/useClientService.d.ts +1 -0
- package/dist/types/hooks/useControlledValue.d.ts +5 -0
- package/dist/types/hooks/useDebounce.d.ts +4 -0
- package/dist/types/hooks/useEffectDebugger.d.ts +4 -0
- package/dist/types/hooks/useIsDark.d.ts +1 -0
- package/dist/types/hooks/useIsRtl.d.ts +1 -0
- package/dist/types/hooks/useNavigator.d.ts +7 -0
- package/dist/types/hooks/useOverlayService.d.ts +10 -0
- package/dist/types/hooks/usePropToggle.d.ts +9 -0
- package/dist/types/hooks/useResize.d.ts +27 -0
- package/dist/types/hooks/useResizeObserver.d.ts +3 -0
- package/dist/types/hooks/useStorage.d.ts +2 -0
- package/dist/types/hotkeys/HotKey.d.ts +2 -0
- package/dist/types/hotkeys/HotKeyLabel.d.ts +2 -0
- package/dist/types/hotkeys/HotKeyWrapper.d.ts +11 -0
- package/dist/types/hotkeys/commons.d.ts +28 -0
- package/dist/types/i18n/index.d.ts +6 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/types/overlays/alert/Alert.d.ts +33 -0
- package/dist/types/overlays/flyout/Flyout.d.ts +57 -0
- package/dist/types/overlays/index.d.ts +6 -0
- package/dist/types/overlays/message/Message.d.ts +21 -0
- package/dist/types/overlays/modal/Modal.d.ts +53 -0
- package/dist/types/overlays/toast/Toast.d.ts +33 -0
- package/dist/types/overlays/tooltip/Tooltip.d.ts +18 -0
- package/dist/types/types/icons.d.ts +194 -0
- package/dist/types/types/index.d.ts +140 -0
- package/dist/types/typography/Abbr.d.ts +22 -0
- package/dist/types/typography/Copy.d.ts +9 -0
- package/dist/types/typography/Link.d.ts +24 -0
- package/dist/types/typography/Mark.d.ts +18 -0
- package/dist/types/typography/Text.d.ts +35 -0
- package/dist/types/typography/Title.d.ts +29 -0
- package/dist/types/typography/index.d.ts +6 -0
- package/dist/types/typography/types.d.ts +2 -0
- package/dist/types/utils/calculateDimensions.d.ts +6 -0
- package/dist/types/utils/getColor.d.ts +4 -0
- package/dist/types/utils/index.d.ts +3 -0
- package/dist/types/utils/nodeCheck.d.ts +2 -0
- package/package.json +60 -0
- package/src/components/actionLabel/ActionLabel.module.css +38 -0
- package/src/components/actionLabel/ActionLabel.tsx +97 -0
- package/src/components/animations/Animations.module.css +253 -0
- package/src/components/animations/Animations.tsx +190 -0
- package/src/components/avatar/Avatar.module.css +90 -0
- package/src/components/avatar/Avatar.tsx +218 -0
- package/src/components/avatar/AvatarGroup.tsx +140 -0
- package/src/components/badge/Badge.module.css +165 -0
- package/src/components/badge/Badge.tsx +148 -0
- package/src/components/breadcrumbs/Breadcrumbs.module.css +189 -0
- package/src/components/breadcrumbs/Breadcrumbs.tsx +109 -0
- package/src/components/button/Button.module.css +375 -0
- package/src/components/button/Button.tsx +323 -0
- package/src/components/button/ButtonGroup.tsx +112 -0
- package/src/components/button/ConfirmButton.tsx +221 -0
- package/src/components/button/ToggleButtonGroup.tsx +161 -0
- package/src/components/callout/Callout.tsx +104 -0
- package/src/components/card/Card.module.css +152 -0
- package/src/components/card/Card.tsx +154 -0
- package/src/components/card/CardCover.tsx +87 -0
- package/src/components/chip/Chip.module.css +118 -0
- package/src/components/chip/Chip.tsx +201 -0
- package/src/components/collapsable/Collapsable.module.css +30 -0
- package/src/components/collapsable/Collapsable.tsx +153 -0
- package/src/components/divider/Divider.tsx +105 -0
- package/src/components/dropdown/Dropdown.module.css +39 -0
- package/src/components/dropdown/Dropdown.tsx +307 -0
- package/src/components/dropdown/DropdownTool.tsx +56 -0
- package/src/components/empty/EmptyContent.tsx +141 -0
- package/src/components/icon/Icon.module.css +71 -0
- package/src/components/icon/Icon.tsx +188 -0
- package/src/components/index.ts +61 -0
- package/src/components/media/Media.module.css +112 -0
- package/src/components/media/Media.tsx +224 -0
- package/src/components/menu/ContextMenu.tsx +116 -0
- package/src/components/menu/Menu.module.css +109 -0
- package/src/components/menu/Menu.tsx +278 -0
- package/src/components/menu/MenuItem.tsx +162 -0
- package/src/components/menu/types.ts +100 -0
- package/src/components/meter/Meter.module.css +116 -0
- package/src/components/meter/Meter.tsx +80 -0
- package/src/components/navigator/Navigator.tsx +77 -0
- package/src/components/panel/Panel.module.css +86 -0
- package/src/components/panel/Panel.tsx +254 -0
- package/src/components/panel/PanelGroup.tsx +99 -0
- package/src/components/panel/PanelStack.tsx +133 -0
- package/src/components/progress/Progress.module.css +70 -0
- package/src/components/progress/ProgressBar.tsx +122 -0
- package/src/components/progress/ProgressCircle.tsx +118 -0
- package/src/components/tabpanel/Tab.tsx +175 -0
- package/src/components/tabpanel/TabPanel.module.css +200 -0
- package/src/components/tabpanel/TabPanel.tsx +155 -0
- package/src/context/Global.tsx +241 -0
- package/src/context/NotificationCenter.tsx +223 -0
- package/src/core/aside/Aside.module.css +231 -0
- package/src/core/aside/Aside.tsx +262 -0
- package/src/core/boundary/ErrorBoundary.module.css +65 -0
- package/src/core/boundary/ErrorBoundary.tsx +146 -0
- package/src/core/boundary/ErrorIcon.tsx +50 -0
- package/src/core/content/Content.module.css +40 -0
- package/src/core/content/Content.tsx +91 -0
- package/src/core/headfoot/HeadFoot.module.css +38 -0
- package/src/core/headfoot/HeadFoot.tsx +114 -0
- package/src/core/index.ts +32 -0
- package/src/core/page/Page.module.css +46 -0
- package/src/core/page/Page.tsx +100 -0
- package/src/core/responsive/Responsive.module.css +85 -0
- package/src/core/responsive/Responsive.tsx +172 -0
- package/src/core/section/Section.module.css +28 -0
- package/src/core/section/Section.tsx +48 -0
- package/src/core/theme/Theme.module.css +30 -0
- package/src/core/theme/ThemeProvider.tsx +112 -0
- package/src/core/viewport/Viewport.module.css +32 -0
- package/src/core/viewport/Viewport.tsx +43 -0
- package/src/hooks/useClientService.tsx +29 -0
- package/src/hooks/useControlledValue.tsx +43 -0
- package/src/hooks/useDebounce.ts +52 -0
- package/src/hooks/useEffectDebugger.ts +154 -0
- package/src/hooks/useIsDark.ts +50 -0
- package/src/hooks/useIsRtl.ts +46 -0
- package/src/hooks/useNavigator.tsx +54 -0
- package/src/hooks/useOverlayService.tsx +51 -0
- package/src/hooks/usePropToggle.ts +61 -0
- package/src/hooks/useResize.ts +90 -0
- package/src/hooks/useResizeObserver.ts +55 -0
- package/src/hooks/useStorage.ts +76 -0
- package/src/hotkeys/HotKey.tsx +39 -0
- package/src/hotkeys/HotKeyLabel.tsx +61 -0
- package/src/hotkeys/HotKeyWrapper.tsx +137 -0
- package/src/hotkeys/commons.ts +74 -0
- package/src/i18n/ar.json +21 -0
- package/src/i18n/en.json +34 -0
- package/src/i18n/index.ts +50 -0
- package/src/index.ts +51 -0
- package/src/overlays/alert/Alert.module.css +44 -0
- package/src/overlays/alert/Alert.tsx +229 -0
- package/src/overlays/flyout/Flyout.module.css +52 -0
- package/src/overlays/flyout/Flyout.tsx +283 -0
- package/src/overlays/index.ts +29 -0
- package/src/overlays/message/Message.module.css +37 -0
- package/src/overlays/message/Message.tsx +107 -0
- package/src/overlays/modal/Modal.module.css +53 -0
- package/src/overlays/modal/Modal.tsx +244 -0
- package/src/overlays/toast/Toast.module.css +37 -0
- package/src/overlays/toast/Toast.tsx +216 -0
- package/src/overlays/tooltip/Tooltip.module.css +53 -0
- package/src/overlays/tooltip/Tooltip.tsx +200 -0
- package/src/types/global.d.ts +83 -0
- package/src/types/icons.ts +420 -0
- package/src/types/index.ts +238 -0
- package/src/typography/Abbr.tsx +152 -0
- package/src/typography/Copy.tsx +61 -0
- package/src/typography/Link.tsx +110 -0
- package/src/typography/Mark.tsx +122 -0
- package/src/typography/Text.tsx +194 -0
- package/src/typography/Title.tsx +126 -0
- package/src/typography/Typography.module.css +68 -0
- package/src/typography/index.ts +29 -0
- package/src/typography/types.ts +38 -0
- package/src/utils/calculateDimensions.ts +72 -0
- package/src/utils/getColor.ts +49 -0
- package/src/utils/index.ts +28 -0
- package/src/utils/nodeCheck.ts +34 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type ElementType } from "react";
|
|
2
|
+
import { type AriaProps, type BadgeType, type CallbackReturn, type ChildrenProp, type ColorType, type CssProp, type IconProps, type TestProps } from "../../types";
|
|
3
|
+
export interface MenuItemProps extends CssProp, AriaProps, TestProps, IconProps {
|
|
4
|
+
/**
|
|
5
|
+
* menu id passed via menu.onClick
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* item label
|
|
10
|
+
*/
|
|
11
|
+
label: string;
|
|
12
|
+
/**
|
|
13
|
+
* append label badge text
|
|
14
|
+
*/
|
|
15
|
+
appendLabel?: string | false;
|
|
16
|
+
/**
|
|
17
|
+
* menu color
|
|
18
|
+
*/
|
|
19
|
+
color?: ColorType;
|
|
20
|
+
/**
|
|
21
|
+
* item active
|
|
22
|
+
*/
|
|
23
|
+
active?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* item disabled
|
|
26
|
+
*/
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* badge
|
|
30
|
+
*/
|
|
31
|
+
badge?: string | number | BadgeType;
|
|
32
|
+
/**
|
|
33
|
+
* keyboard shortcut label
|
|
34
|
+
*/
|
|
35
|
+
hotKey?: string;
|
|
36
|
+
/**
|
|
37
|
+
* alternate icon align end (caret, arrow)
|
|
38
|
+
*/
|
|
39
|
+
altIcon?: string;
|
|
40
|
+
/**
|
|
41
|
+
* click handler
|
|
42
|
+
*/
|
|
43
|
+
onClick?: () => CallbackReturn;
|
|
44
|
+
}
|
|
45
|
+
export interface MenuRootProps extends CssProp {
|
|
46
|
+
label?: never;
|
|
47
|
+
minimal?: boolean;
|
|
48
|
+
menuClassName?: never;
|
|
49
|
+
onClick?: (id: string) => CallbackReturn;
|
|
50
|
+
}
|
|
51
|
+
export interface MenuInnerProps extends MenuItemProps {
|
|
52
|
+
label: string;
|
|
53
|
+
minimal?: never;
|
|
54
|
+
/**
|
|
55
|
+
* floating menu className
|
|
56
|
+
*/
|
|
57
|
+
menuClassName?: string;
|
|
58
|
+
}
|
|
59
|
+
export type MenuProps = ChildrenProp<ElementType<MenuItemProps>> & (MenuRootProps | MenuInnerProps);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type AriaProps, type CssProp, type TestProps } from "../../types";
|
|
2
|
+
export interface MeterProps extends CssProp, AriaProps, TestProps {
|
|
3
|
+
/**
|
|
4
|
+
* meter value (0-100)
|
|
5
|
+
*/
|
|
6
|
+
value: number;
|
|
7
|
+
/**
|
|
8
|
+
* hide value label
|
|
9
|
+
*/
|
|
10
|
+
hideLabel?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const Meter: ({ value, hideLabel, className, ...aria }: MeterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type AriaProps, type ColorType, type CssProp, type TestProps } from "../../types";
|
|
2
|
+
export interface NavigatorProps extends CssProp, AriaProps, TestProps {
|
|
3
|
+
/**
|
|
4
|
+
* navigator button color
|
|
5
|
+
*/
|
|
6
|
+
color?: ColorType | string;
|
|
7
|
+
/**
|
|
8
|
+
* navigation handler
|
|
9
|
+
*/
|
|
10
|
+
onNavigate: (dir: -1 | 1) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const Navigator: ({ className, onNavigate, color, ...aria }: NavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type ContentProps } from "../../core/content/Content";
|
|
3
|
+
import { type HeadFootProps } from "../../core/headfoot/HeadFoot";
|
|
4
|
+
import { type AriaProps, type ChildrenProp, type CollapseProps, type CssProp, type ExpandProps, type IconProps, type TestProps } from "../../types";
|
|
5
|
+
export interface PanelProps extends CssProp, AriaProps, TestProps, IconProps, ExpandProps, CollapseProps, ChildrenProp<HeadFootProps | ContentProps> {
|
|
6
|
+
/**
|
|
7
|
+
* panel id used by panel stack
|
|
8
|
+
*/
|
|
9
|
+
panelId?: string;
|
|
10
|
+
/**
|
|
11
|
+
* panel title
|
|
12
|
+
*/
|
|
13
|
+
title?: string;
|
|
14
|
+
/**
|
|
15
|
+
* header actions
|
|
16
|
+
*/
|
|
17
|
+
actions?: JSX.Element;
|
|
18
|
+
/**
|
|
19
|
+
* header css classname(s)
|
|
20
|
+
*/
|
|
21
|
+
headerClassName?: string;
|
|
22
|
+
/**
|
|
23
|
+
* title css classname(s)
|
|
24
|
+
*/
|
|
25
|
+
titleClassName?: string;
|
|
26
|
+
/**
|
|
27
|
+
* loading state
|
|
28
|
+
*/
|
|
29
|
+
loading?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* height
|
|
32
|
+
*/
|
|
33
|
+
height?: string | number;
|
|
34
|
+
/**
|
|
35
|
+
* width
|
|
36
|
+
*/
|
|
37
|
+
width?: string | number;
|
|
38
|
+
/**
|
|
39
|
+
* minimum height
|
|
40
|
+
*/
|
|
41
|
+
minHeight?: string | number;
|
|
42
|
+
/**
|
|
43
|
+
* minimum width
|
|
44
|
+
*/
|
|
45
|
+
minWidth?: string | number;
|
|
46
|
+
/**
|
|
47
|
+
* maximum height
|
|
48
|
+
*/
|
|
49
|
+
maxHeight?: string | number;
|
|
50
|
+
/**
|
|
51
|
+
* maximum width
|
|
52
|
+
*/
|
|
53
|
+
maxWidth?: string | number;
|
|
54
|
+
/**
|
|
55
|
+
* close handler
|
|
56
|
+
*/
|
|
57
|
+
onClose?: () => void;
|
|
58
|
+
}
|
|
59
|
+
export declare const Panel: ({ children, className, titleClassName, headerClassName, title, actions, icon, iconBg, iconColor, rtlFlip, panelId, height, width, minHeight, minWidth, maxHeight, maxWidth, loading, expandable, expanded: _expanded, onExpand, collapsable, collapsed: _collapsed, onCollapse, onClose, onBack, ...aria }: PanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ChildrenProp } from "../../types";
|
|
2
|
+
export interface PanelGroupProps extends ChildrenProp {
|
|
3
|
+
/**
|
|
4
|
+
* active panel id / index
|
|
5
|
+
*/
|
|
6
|
+
activePanel?: string | number;
|
|
7
|
+
/**
|
|
8
|
+
* active change callback
|
|
9
|
+
*/
|
|
10
|
+
onActiveChange?: (panelId: string) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const PanelGroup: ({ children, activePanel, onActiveChange, }: PanelGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ChildrenProp, type CssProp } from "../../types";
|
|
2
|
+
export interface PanelStackProps extends CssProp, ChildrenProp {
|
|
3
|
+
/**
|
|
4
|
+
* active panel id
|
|
5
|
+
*/
|
|
6
|
+
active?: string;
|
|
7
|
+
/**
|
|
8
|
+
* panel change event callback
|
|
9
|
+
*/
|
|
10
|
+
onPanelChange?: (panelId: string) => void;
|
|
11
|
+
/**
|
|
12
|
+
* navigate to previous panel in history
|
|
13
|
+
*/
|
|
14
|
+
onBack?: (panelId: string, nextPanelId: string) => boolean | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare const PanelStack: ({ active, children, className, onPanelChange, onBack, ...rest }: PanelStackProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ColorType } from "../../types";
|
|
2
|
+
export interface ProgressProps {
|
|
3
|
+
/**
|
|
4
|
+
* progress value (0-100)
|
|
5
|
+
*/
|
|
6
|
+
value: number;
|
|
7
|
+
/**
|
|
8
|
+
* size
|
|
9
|
+
*/
|
|
10
|
+
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
11
|
+
/**
|
|
12
|
+
* color
|
|
13
|
+
*/
|
|
14
|
+
color?: ColorType;
|
|
15
|
+
/**
|
|
16
|
+
* animate
|
|
17
|
+
*/
|
|
18
|
+
animate?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* progress label
|
|
21
|
+
*/
|
|
22
|
+
label?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const ProgressBar: ({ value, size, color, label, animate, }: ProgressProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ColorType } from "../../types";
|
|
2
|
+
export interface ProgressProps {
|
|
3
|
+
/**
|
|
4
|
+
* progress value (0-100)
|
|
5
|
+
*/
|
|
6
|
+
value: number;
|
|
7
|
+
/**
|
|
8
|
+
* size
|
|
9
|
+
*/
|
|
10
|
+
size?: "sm" | "md" | "lg" | "xl";
|
|
11
|
+
/**
|
|
12
|
+
* color
|
|
13
|
+
*/
|
|
14
|
+
color?: ColorType;
|
|
15
|
+
}
|
|
16
|
+
export declare const ProgressCircle: ({ value, size, color, }: ProgressProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { type AriaProps, type BadgeType, type CallbackReturn, type ChildrenProp, type ColorType, type CssProp, type IconProps, type PolymorphicProps, type RefProp, type TestProps } from "../../types";
|
|
3
|
+
export interface TabProps extends Partial<ChildrenProp>, CssProp, RefProp, AriaProps, TestProps, IconProps {
|
|
4
|
+
/**
|
|
5
|
+
* tab id
|
|
6
|
+
*/
|
|
7
|
+
id: string;
|
|
8
|
+
/**
|
|
9
|
+
* tab label
|
|
10
|
+
*/
|
|
11
|
+
label?: string;
|
|
12
|
+
/**
|
|
13
|
+
* tab color
|
|
14
|
+
*/
|
|
15
|
+
color?: ColorType;
|
|
16
|
+
/**
|
|
17
|
+
* tab badge
|
|
18
|
+
*/
|
|
19
|
+
badge?: BadgeType;
|
|
20
|
+
/**
|
|
21
|
+
* disabled
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* tab flex to fill button
|
|
26
|
+
*/
|
|
27
|
+
tabFlex?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* className for active state
|
|
30
|
+
*/
|
|
31
|
+
activeClassName?: string;
|
|
32
|
+
/**
|
|
33
|
+
* action dropdown body
|
|
34
|
+
*/
|
|
35
|
+
actions?: ReactElement;
|
|
36
|
+
/**
|
|
37
|
+
* close handler
|
|
38
|
+
*/
|
|
39
|
+
onClose?: () => CallbackReturn;
|
|
40
|
+
}
|
|
41
|
+
export declare const Tab: <Tag extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "button">({ ref, as, id, className, label, icon, iconBg, iconColor, rtlFlip, badge, disabled, onClose, active, minimal, onClick, tabFlex, color, actions, activeClassName, ...aria }: TabProps & PolymorphicProps<Tag>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type CallbackReturn, type ChildrenProp } from "../../types";
|
|
2
|
+
import { Tab } from "./Tab";
|
|
3
|
+
export interface TabPanelProps extends ChildrenProp<typeof Tab> {
|
|
4
|
+
/**
|
|
5
|
+
* tab list orientation
|
|
6
|
+
*/
|
|
7
|
+
orientation?: "top" | "bottom" | "start" | "end";
|
|
8
|
+
/**
|
|
9
|
+
* justify buttons
|
|
10
|
+
*/
|
|
11
|
+
justify?: "start" | "center" | "end";
|
|
12
|
+
/**
|
|
13
|
+
* tab variations
|
|
14
|
+
*/
|
|
15
|
+
variant?: "soft" | "solid" | "outline";
|
|
16
|
+
/**
|
|
17
|
+
* tab button flex to fill tabs
|
|
18
|
+
*/
|
|
19
|
+
tabFlex?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* tab button gap
|
|
22
|
+
*/
|
|
23
|
+
gap?: number;
|
|
24
|
+
/**
|
|
25
|
+
* current active tab
|
|
26
|
+
*/
|
|
27
|
+
activeTab?: string;
|
|
28
|
+
/**
|
|
29
|
+
* tab list className
|
|
30
|
+
*/
|
|
31
|
+
headerClassName?: string;
|
|
32
|
+
/**
|
|
33
|
+
* change handler
|
|
34
|
+
*/
|
|
35
|
+
onChange?: (id: string) => void;
|
|
36
|
+
/**
|
|
37
|
+
* before close handler, return false to prevent change
|
|
38
|
+
*/
|
|
39
|
+
onBeforeChange?: (nextTab: string, currentTab?: string) => CallbackReturn;
|
|
40
|
+
}
|
|
41
|
+
export declare const TabPanel: ({ children, headerClassName, orientation, activeTab, justify, variant, tabFlex, gap, onBeforeChange, onChange, }: TabPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type ComponentType, type FC, type PropsWithChildren } from "react";
|
|
2
|
+
import { type NotificationManagerRef } from "./NotificationCenter";
|
|
3
|
+
interface State {
|
|
4
|
+
locale: string;
|
|
5
|
+
colorScheme: "light" | "dark";
|
|
6
|
+
calendar: "gregorian" | "hijri";
|
|
7
|
+
}
|
|
8
|
+
export interface GlobalProps extends PropsWithChildren {
|
|
9
|
+
/**
|
|
10
|
+
* application default error display
|
|
11
|
+
*/
|
|
12
|
+
errorElement?: ComponentType<{
|
|
13
|
+
error?: string;
|
|
14
|
+
}>;
|
|
15
|
+
defaultLocale?: string;
|
|
16
|
+
defaultCalendar?: State["calendar"];
|
|
17
|
+
defaultColorScheme?: State["colorScheme"];
|
|
18
|
+
}
|
|
19
|
+
interface GlobalContextType {
|
|
20
|
+
/**
|
|
21
|
+
* change language locale
|
|
22
|
+
* @param locale
|
|
23
|
+
*/
|
|
24
|
+
changeLocale: (locale: string) => string;
|
|
25
|
+
/**
|
|
26
|
+
* change date calendat
|
|
27
|
+
* @param locale
|
|
28
|
+
*/
|
|
29
|
+
changeCalendar: (calendar: State["calendar"]) => State["calendar"];
|
|
30
|
+
/**
|
|
31
|
+
* toggle theme between light and dark
|
|
32
|
+
* or force to theme provided
|
|
33
|
+
* @param theme
|
|
34
|
+
*/
|
|
35
|
+
toggleColorScheme: (colorScheme?: State["colorScheme"]) => State["colorScheme"];
|
|
36
|
+
/**
|
|
37
|
+
* application default error display
|
|
38
|
+
*/
|
|
39
|
+
errorElement: GlobalProps["errorElement"];
|
|
40
|
+
currentLocale: string;
|
|
41
|
+
currentCalendar: State["calendar"];
|
|
42
|
+
currentColorScheme: State["colorScheme"];
|
|
43
|
+
notificationManager: NotificationManagerRef;
|
|
44
|
+
}
|
|
45
|
+
export declare const GlobalContext: import("react").Context<GlobalContextType>;
|
|
46
|
+
/**
|
|
47
|
+
* global context provider
|
|
48
|
+
*/
|
|
49
|
+
export declare const ApplicationProvider: FC<GlobalProps>;
|
|
50
|
+
/**
|
|
51
|
+
* internal usage only
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
export declare const useGlobals: () => GlobalContextType;
|
|
55
|
+
/**
|
|
56
|
+
* global application context
|
|
57
|
+
*/
|
|
58
|
+
export declare const useApplicationContext: () => {
|
|
59
|
+
/**
|
|
60
|
+
* change language locale
|
|
61
|
+
* @param locale
|
|
62
|
+
*/
|
|
63
|
+
changeLocale: (locale: string) => string;
|
|
64
|
+
/**
|
|
65
|
+
* change date calendat
|
|
66
|
+
* @param locale
|
|
67
|
+
*/
|
|
68
|
+
changeCalendar: (calendar: State["calendar"]) => State["calendar"];
|
|
69
|
+
/**
|
|
70
|
+
* toggle theme between light and dark
|
|
71
|
+
* or force to theme provided
|
|
72
|
+
* @param theme
|
|
73
|
+
*/
|
|
74
|
+
toggleColorScheme: (colorScheme?: State["colorScheme"]) => State["colorScheme"];
|
|
75
|
+
currentLocale: string;
|
|
76
|
+
currentCalendar: State["calendar"];
|
|
77
|
+
currentColorScheme: State["colorScheme"];
|
|
78
|
+
notificationManager: NotificationManagerRef;
|
|
79
|
+
};
|
|
80
|
+
export declare const useNotificationService: () => NotificationManagerRef;
|
|
81
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type AlertProps } from "../overlays/alert/Alert";
|
|
2
|
+
import { type MessageProps } from "../overlays/message/Message";
|
|
3
|
+
import { type ToastProps } from "../overlays/toast/Toast";
|
|
4
|
+
export interface NotificationManagerRef {
|
|
5
|
+
showMessage: (props: string | MessageProps, timeout?: number) => Promise<boolean | string>;
|
|
6
|
+
showToast: (props: string | ToastProps, timeout?: number) => Promise<boolean | string>;
|
|
7
|
+
showAlert: (props: string | AlertProps) => Promise<boolean | string>;
|
|
8
|
+
showError: (props: string | Omit<ToastProps, "color">) => Promise<boolean | string>;
|
|
9
|
+
closeAll: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const NotificationManager: ({ onLoad }: KeyValue) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type ChildrenProp, type CollapseProps, type Elements, type IconProps, type TestProps } from "../../types";
|
|
3
|
+
export interface AsideProps extends IconProps, ChildrenProp, CollapseProps, TestProps {
|
|
4
|
+
/**
|
|
5
|
+
* page title
|
|
6
|
+
*/
|
|
7
|
+
title?: string;
|
|
8
|
+
/**
|
|
9
|
+
* align inline-end
|
|
10
|
+
*/
|
|
11
|
+
align?: "start" | "end";
|
|
12
|
+
/**
|
|
13
|
+
* header actions
|
|
14
|
+
*/
|
|
15
|
+
actions?: Elements<JSX.Element>;
|
|
16
|
+
/**
|
|
17
|
+
* header class
|
|
18
|
+
*/
|
|
19
|
+
headerClassName?: string;
|
|
20
|
+
/**
|
|
21
|
+
* show loading indicator
|
|
22
|
+
*/
|
|
23
|
+
loading?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* allow resize
|
|
26
|
+
*/
|
|
27
|
+
resizeable?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* allow flyout with collapsed
|
|
30
|
+
*/
|
|
31
|
+
flyout?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* event handler when shown
|
|
34
|
+
*/
|
|
35
|
+
onFlyout?: () => void;
|
|
36
|
+
/**
|
|
37
|
+
* fixed width
|
|
38
|
+
*/
|
|
39
|
+
width?: number | string;
|
|
40
|
+
/**
|
|
41
|
+
* max width
|
|
42
|
+
*/
|
|
43
|
+
maxWidth?: number | string;
|
|
44
|
+
/**
|
|
45
|
+
* min width
|
|
46
|
+
*/
|
|
47
|
+
minWidth?: number | string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Side panel
|
|
51
|
+
*/
|
|
52
|
+
export declare const Aside: ({ children, title, icon, iconBg, iconColor, rtlFlip, headerClassName, resizeable, flyout, onFlyout, collapsed, collapsable, onCollapse, actions, loading, align, width: wd, minWidth, maxWidth, "data-testid": testId, "data-test-value": testValue, }: AsideProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Component } from "react";
|
|
2
|
+
import { type ChildrenProp } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* An error boundary wrapper higher-order component designed to provide consistent error display across the application will trap runtime errors
|
|
5
|
+
*/
|
|
6
|
+
export declare class ErrorBoundary extends Component<{
|
|
7
|
+
/**
|
|
8
|
+
* custom error display
|
|
9
|
+
*/
|
|
10
|
+
errorElement?: React.ComponentType<{
|
|
11
|
+
error?: string;
|
|
12
|
+
}>;
|
|
13
|
+
} & ChildrenProp, {
|
|
14
|
+
hasError: boolean;
|
|
15
|
+
error?: string;
|
|
16
|
+
stack?: AnyObject;
|
|
17
|
+
}> {
|
|
18
|
+
static getDerivedStateFromError(error: Error): {
|
|
19
|
+
hasError: boolean;
|
|
20
|
+
error: string;
|
|
21
|
+
stack: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
constructor(props: AnyObject);
|
|
24
|
+
componentDidCatch(error: Error): void;
|
|
25
|
+
render(): string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ErrorIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ChildrenProp, type CssProp, type PositionObject, type RefProp, type SizeObject, type TestProps } from "../../types";
|
|
2
|
+
export interface ContentProps extends ChildrenProp, CssProp, RefProp, TestProps {
|
|
3
|
+
/**
|
|
4
|
+
* scroll vevent handler
|
|
5
|
+
*/
|
|
6
|
+
onScroll?: (event: PositionObject) => void;
|
|
7
|
+
/**
|
|
8
|
+
* scroll vevent handler
|
|
9
|
+
*/
|
|
10
|
+
onResize?: (event: SizeObject) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Scrollable content element
|
|
14
|
+
*/
|
|
15
|
+
export declare const Content: ({ ref, children, className, onScroll, onResize, "data-testid": testId, "data-test-value": testValue, }: ContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type AriaProps, type ChildrenProp, type ColorWithGrays, type CssProp, type TestProps } from "../../types";
|
|
2
|
+
interface BaseProps extends CssProp, AriaProps, ChildrenProp, TestProps {
|
|
3
|
+
dir?: "ltr" | "rtl";
|
|
4
|
+
/**
|
|
5
|
+
* background color
|
|
6
|
+
*/
|
|
7
|
+
bg?: ColorWithGrays | string;
|
|
8
|
+
/**
|
|
9
|
+
* background color
|
|
10
|
+
*/
|
|
11
|
+
color?: ColorWithGrays | string;
|
|
12
|
+
}
|
|
13
|
+
type DefaultProps = BaseProps & {
|
|
14
|
+
flex?: false;
|
|
15
|
+
};
|
|
16
|
+
type FlexProps = BaseProps & {
|
|
17
|
+
flex: true;
|
|
18
|
+
align?: "start" | "end" | "center" | "stretch";
|
|
19
|
+
justify?: "start" | "end" | "center" | "between";
|
|
20
|
+
};
|
|
21
|
+
export type HeadFootProps = DefaultProps | FlexProps;
|
|
22
|
+
export declare const Header: (props: HeadFootProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const Footer: (props: HeadFootProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { Aside } from "./aside/Aside";
|
|
2
|
+
export { ErrorBoundary } from "./boundary/ErrorBoundary";
|
|
3
|
+
export { Content } from "./content/Content";
|
|
4
|
+
export { Footer, Header } from "./headfoot/HeadFoot";
|
|
5
|
+
export { Page } from "./page/Page";
|
|
6
|
+
export { Col, Container, Row } from "./responsive/Responsive";
|
|
7
|
+
export { Section } from "./section/Section";
|
|
8
|
+
export { ThemeProvider } from "./theme/ThemeProvider";
|
|
9
|
+
export { Viewport } from "./viewport/Viewport";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ChildrenProp, type IconProps, type TestProps } from "../../types";
|
|
2
|
+
export interface PageProps extends IconProps, ChildrenProp, TestProps {
|
|
3
|
+
/**
|
|
4
|
+
* page title
|
|
5
|
+
*/
|
|
6
|
+
title?: string;
|
|
7
|
+
/**
|
|
8
|
+
* title element className
|
|
9
|
+
*/
|
|
10
|
+
titleClassName?: string;
|
|
11
|
+
/**
|
|
12
|
+
* paper style drop shadow
|
|
13
|
+
*/
|
|
14
|
+
paper?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* loading indicator
|
|
17
|
+
*/
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The page component used typically for routes, is a structured layout used within an application to organize and display content in a sectioned format, ensuring a consistent and intuitive user experience.
|
|
22
|
+
*/
|
|
23
|
+
export declare const Page: ({ children, paper, title, titleClassName, icon, rtlFlip, iconBg, iconColor, loading, "data-testid": testId, "data-test-value": testValue, }: PageProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type AriaProps, type ChildrenProp, type CssProp, type SizeTypeWithZero, type TestProps } from "../../types";
|
|
2
|
+
export interface ContainerProps extends AriaProps, CssProp, ChildrenProp, TestProps {
|
|
3
|
+
/**
|
|
4
|
+
* use full width
|
|
5
|
+
*/
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* gutter size
|
|
9
|
+
*/
|
|
10
|
+
gutter?: SizeTypeWithZero;
|
|
11
|
+
}
|
|
12
|
+
export interface RowProps extends AriaProps, CssProp, ChildrenProp, TestProps {
|
|
13
|
+
/**
|
|
14
|
+
* no wrapping
|
|
15
|
+
*/
|
|
16
|
+
noWrap?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* gutter size
|
|
19
|
+
*/
|
|
20
|
+
gutter?: SizeTypeWithZero;
|
|
21
|
+
/**
|
|
22
|
+
* flex orientation
|
|
23
|
+
*/
|
|
24
|
+
orient?: "row" | "row-reverse" | "col" | "col-reverse";
|
|
25
|
+
/**
|
|
26
|
+
* align items
|
|
27
|
+
*/
|
|
28
|
+
align?: "start" | "end" | "center" | "stretch";
|
|
29
|
+
/**
|
|
30
|
+
* justify items
|
|
31
|
+
*/
|
|
32
|
+
justify?: "start" | "end" | "center" | "between";
|
|
33
|
+
}
|
|
34
|
+
export interface ColProps extends AriaProps, CssProp, TestProps, Partial<ChildrenProp> {
|
|
35
|
+
/**
|
|
36
|
+
* align items
|
|
37
|
+
*/
|
|
38
|
+
align?: "start" | "end" | "center" | "stretch";
|
|
39
|
+
/**
|
|
40
|
+
* column flex
|
|
41
|
+
*/
|
|
42
|
+
flex?: "auto" | "fill" | "full";
|
|
43
|
+
/**
|
|
44
|
+
* stretch inner content
|
|
45
|
+
*/
|
|
46
|
+
stretchContent?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Responsive layout container
|
|
50
|
+
*/
|
|
51
|
+
export declare const Container: ({ children, fullWidth, className, gutter, ...aria }: ContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare const Row: ({ children, gutter, noWrap, orient, align, justify, className, ...aria }: RowProps) => import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export declare const Col: ({ children, flex, align, className, stretchContent, ...aria }: ColProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ChildrenProp } from "../../types";
|
|
2
|
+
/**
|
|
3
|
+
* The section component provides a structured layout used within a page to organize and display content in a sectioned format, ensuring a consistent and intuitive user experience.
|
|
4
|
+
*/
|
|
5
|
+
export declare const Section: ({ children, dir, }: ChildrenProp & {
|
|
6
|
+
dir?: "ltr" | "rtl";
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ChildrenProp } from "../../types";
|
|
2
|
+
export interface ThemeProps {
|
|
3
|
+
/**
|
|
4
|
+
* light/dark color scheme
|
|
5
|
+
*/
|
|
6
|
+
colorScheme?: "light" | "dark";
|
|
7
|
+
/**
|
|
8
|
+
* branding css className
|
|
9
|
+
*
|
|
10
|
+
* .branding {
|
|
11
|
+
* --primary: #color;
|
|
12
|
+
* --accent: #color;
|
|
13
|
+
* --tint: #color;
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
16
|
+
branding?: string;
|
|
17
|
+
/**
|
|
18
|
+
* primary color
|
|
19
|
+
*/
|
|
20
|
+
primaryColor?: string;
|
|
21
|
+
/**
|
|
22
|
+
* accent color
|
|
23
|
+
*/
|
|
24
|
+
accentColor?: string;
|
|
25
|
+
/**
|
|
26
|
+
* tint mix color
|
|
27
|
+
*/
|
|
28
|
+
tintColor?: string;
|
|
29
|
+
/**
|
|
30
|
+
* component rounding
|
|
31
|
+
*/
|
|
32
|
+
rounding?: "minimal" | "normal" | "full";
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Theme override
|
|
36
|
+
*/
|
|
37
|
+
export declare const ThemeProvider: ({ children, branding, primaryColor, accentColor, tintColor, colorScheme, rounding, }: ThemeProps & ChildrenProp) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type PropsWithChildren } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The application viewport is the main container that defines the visible area where content is displayed and interacted with.
|
|
4
|
+
*/
|
|
5
|
+
export declare const Viewport: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useClientService: (clientApi: AnyObject, serverMock?: AnyObject) => any;
|