@okam/stack-ui 0.0.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/components/Accordion/index.d.ts +3 -0
- package/components/Accordion/interface.d.ts +16 -0
- package/components/Button/index.d.ts +5 -0
- package/components/Button/interface.d.ts +15 -0
- package/components/Icon/index.d.ts +3 -0
- package/components/Icon/interface.d.ts +6 -0
- package/components/Lightbox/hooks/overlay/index.d.ts +12 -0
- package/components/Lightbox/hooks/overlay/interface.d.ts +2 -0
- package/components/Lightbox/index.d.ts +3 -0
- package/components/Lightbox/interface.d.ts +19 -0
- package/components/Modal/Dialog.d.ts +3 -0
- package/components/Modal/index.d.ts +3 -0
- package/components/Modal/interface.d.ts +11 -0
- package/components/Popover/index.d.ts +10 -0
- package/components/Popover/interface.d.ts +11 -0
- package/components/ShareButton/index.d.ts +4 -0
- package/components/ShareButton/interface.d.ts +23 -0
- package/components/ShareButton/utils/generateUtmTags.d.ts +2 -0
- package/components/ShareButton/utils/useFacebookShareUrl.d.ts +2 -0
- package/components/ShareButton/utils/useMailToShareUrl.d.ts +2 -0
- package/components/ShareButton/utils/useTwitterShareUrl.d.ts +2 -0
- package/components/ShareButton/utils/useWindow.d.ts +5 -0
- package/components/SidePanel/index.d.ts +4 -0
- package/components/SidePanel/interface.d.ts +9 -0
- package/components/Typography/index.d.ts +5 -0
- package/components/Typography/interface.d.ts +10 -0
- package/components/WysiwygBlock/index.d.ts +3 -0
- package/components/WysiwygBlock/interface.d.ts +5 -0
- package/components/icons/ArrowRight.d.ts +3 -0
- package/components/icons/IconFallback.d.ts +3 -0
- package/index.d.ts +20 -0
- package/index.js +3 -0
- package/index.mjs +5815 -0
- package/package.json +18 -0
- package/providers/SidePanel/index.d.ts +4 -0
- package/providers/SidePanel/interface.d.ts +17 -0
- package/providers/Theme/hooks.d.ts +3 -0
- package/providers/Theme/index.d.ts +9 -0
- package/providers/Theme/interface.d.ts +23 -0
- package/providers/Theme/utils.d.ts +2 -0
- package/transitions/ModalTransition.d.ts +7 -0
- package/transitions/RenderWithSlide.d.ts +7 -0
- package/transitions/SidePanelTransition.d.ts +7 -0
- package/types/components.d.ts +23 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { TToken } from '../../providers/Theme/interface';
|
|
3
|
+
import type { TDefaultComponent } from '../../types/components';
|
|
4
|
+
export interface TAccordionProps extends TDefaultComponent<TAccordionTokens> {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
ariaLabel: string;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
onClick?: (isOpen: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
interface TAccordionTokens extends TToken {
|
|
13
|
+
titleBold: boolean;
|
|
14
|
+
textAlign: 'center' | 'left';
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TButtonProps } from './interface';
|
|
3
|
+
export declare const ButtonWithForwardRef: React.ForwardRefExoticComponent<TButtonProps & React.RefAttributes<HTMLButtonElement & HTMLAnchorElement>>;
|
|
4
|
+
declare const _default: React.MemoExoticComponent<(props: TButtonProps) => import("react/jsx-runtime").JSX.Element>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PressEvent } from '@react-types/shared';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { TDefaultComponent } from '../../types/components';
|
|
4
|
+
export interface TButtonProps extends TDefaultComponent {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
id?: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
download?: boolean;
|
|
10
|
+
target?: string;
|
|
11
|
+
rel?: string;
|
|
12
|
+
handlePress?: ((e: PressEvent) => void) | undefined;
|
|
13
|
+
tabIndex?: number;
|
|
14
|
+
role?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TOnCloseCallback, TOnOpenCallback } from './interface';
|
|
3
|
+
declare const useOverlayHook: (isOpen?: boolean, onOpenCallBack?: TOnOpenCallback, onCloseCallBack?: TOnCloseCallback) => {
|
|
4
|
+
state: import("@react-stately/overlays").OverlayTriggerState;
|
|
5
|
+
openButtonProps: React.HTMLAttributes<HTMLDivElement>;
|
|
6
|
+
closeButtonProps: React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
7
|
+
handleOpen: () => void;
|
|
8
|
+
handleClose: () => void;
|
|
9
|
+
openButtonRef: React.MutableRefObject<null>;
|
|
10
|
+
closeButtonRef: React.MutableRefObject<null>;
|
|
11
|
+
};
|
|
12
|
+
export default useOverlayHook;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AriaOverlayProps } from '@react-aria/overlays';
|
|
2
|
+
import type { AriaDialogProps } from '@react-types/dialog';
|
|
3
|
+
import type { HTMLAttributes } from 'react';
|
|
4
|
+
import type React from 'react';
|
|
5
|
+
import type { TDefaultComponent } from '../../types/components';
|
|
6
|
+
export interface ModalProps {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface ILightboxProps extends HTMLAttributes<HTMLElement> {
|
|
10
|
+
id: string;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
thumbnailContent?: React.ReactNode;
|
|
13
|
+
lightboxContent?: React.ReactNode;
|
|
14
|
+
isOpen?: boolean;
|
|
15
|
+
onOpenCallBack?: (bool: boolean) => void;
|
|
16
|
+
onCloseCallBack?: () => void;
|
|
17
|
+
}
|
|
18
|
+
export type LightboxProps = ILightboxProps & TDefaultComponent;
|
|
19
|
+
export type ModalDialogProps = AriaOverlayProps & AriaDialogProps & ModalProps;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { OverlayTriggerState } from '@react-stately/overlays';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
export interface TModalProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
state: OverlayTriggerState;
|
|
6
|
+
transitionComponent?: (props: {
|
|
7
|
+
isVisible: boolean;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}) => JSX.Element;
|
|
10
|
+
onCloseCallBack?: () => void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Placement } from '@react-types/overlays';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { TButtonProps } from '../Button/interface';
|
|
4
|
+
declare function PopoverButton({ children, buttonProps, placement, offset, }: {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
buttonProps: TButtonProps;
|
|
7
|
+
placement: Placement;
|
|
8
|
+
offset: number;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default PopoverButton;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DOMAttributes } from '@react-types/shared';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { CSSProperties } from 'react';
|
|
4
|
+
export interface IPopoverProps {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
export type TPopoverProps = DOMAttributes & IPopoverProps;
|
|
11
|
+
export type PopoverOrientation = 'left' | 'right';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TIconsContainerProps, TShareButtonProps } from './interface';
|
|
2
|
+
export declare const IconsContainer: (props: TIconsContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const ShareButton: (props: TShareButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default ShareButton;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TToken } from '../../providers/Theme/interface';
|
|
2
|
+
import type { TDefaultComponent } from '../../types/components';
|
|
3
|
+
export interface TShareButtonProps extends TDefaultComponent<TShareButtonTokens> {
|
|
4
|
+
id: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
ariaLabel: string;
|
|
7
|
+
sharingLinksList: TShareButtonLink[];
|
|
8
|
+
onShare?: (sharingMedium: string) => void;
|
|
9
|
+
}
|
|
10
|
+
interface TShareButtonTokens extends TToken {
|
|
11
|
+
listDirection: 'row' | 'column';
|
|
12
|
+
}
|
|
13
|
+
export interface TIconsContainerProps extends Omit<TShareButtonProps, 'ariaLabel' | 'icon'> {
|
|
14
|
+
isOpen: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface TShareButtonLink {
|
|
17
|
+
ariaLabel: string;
|
|
18
|
+
icon: string;
|
|
19
|
+
key: string;
|
|
20
|
+
onClick?: (linkKey: string) => void;
|
|
21
|
+
href?: string;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { TDefaultComponent } from '../../types/components';
|
|
4
|
+
export interface ISidePanelProps extends HTMLAttributes<HTMLElement> {
|
|
5
|
+
id: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
closeBtnRender?: () => React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export type TSidePanelProps = ISidePanelProps & TDefaultComponent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TTypographyProps } from './interface';
|
|
3
|
+
declare const Typography: ({ as: Component, themeName, tokens, customTheme, children, ...rest }: TTypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const TypographyWithForwardRef: React.ForwardRefExoticComponent<TTypographyProps<import("../..").TToken> & React.RefAttributes<HTMLElement>>;
|
|
5
|
+
export default Typography;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="trusted-types" />
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { TToken } from '../../providers/Theme/interface';
|
|
4
|
+
import type { TDefaultComponent } from '../../types/components';
|
|
5
|
+
export interface TTypographyProps<T = TToken> extends TDefaultComponent<T> {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
dangerouslySetInnerHTML?: {
|
|
8
|
+
__html: string | TrustedHTML;
|
|
9
|
+
};
|
|
10
|
+
}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export { default as Typography } from './components/Typography';
|
|
2
|
+
export { default as Accordion } from './components/Accordion';
|
|
3
|
+
export { default as Button } from './components/Button';
|
|
4
|
+
export { default as ShareButton } from './components/ShareButton';
|
|
5
|
+
export { default as SidePanel } from './components/SidePanel';
|
|
6
|
+
export { default as Lightbox } from './components/Lightbox';
|
|
7
|
+
export { default as Popover } from './components/Popover';
|
|
8
|
+
export { default as WysiwygBlock } from './components/WysiwygBlock';
|
|
9
|
+
export { default as ArrowRight } from './components/icons/ArrowRight';
|
|
10
|
+
export { default as Icon } from './components/Icon';
|
|
11
|
+
export { useTheme, ThemeContextProvider } from './providers/Theme';
|
|
12
|
+
export { makeTheme, createThemeProvider } from './providers/Theme';
|
|
13
|
+
export type { TButtonProps } from './components/Button/interface';
|
|
14
|
+
export type { TTypographyProps } from './components/Typography/interface';
|
|
15
|
+
export type { TTheme, TToken, TCustomTheme, TStyle, TDefaultTheme, TStyleCollection, TStyleValue, } from './providers/Theme/interface';
|
|
16
|
+
export { default as generateUtmTags } from './components/ShareButton/utils/generateUtmTags';
|
|
17
|
+
export { default as useWindow } from './components/ShareButton/utils/useWindow';
|
|
18
|
+
export { default as useFacebookShareUrl } from './components/ShareButton/utils/useFacebookShareUrl';
|
|
19
|
+
export { default as useMailToShareUrl } from './components/ShareButton/utils/useMailToShareUrl';
|
|
20
|
+
export { default as useTwitterShareUrl } from './components/ShareButton/utils/useTwitterShareUrl';
|