@ctlyst.id/voila-ui 1.0.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 +201 -0
- package/README.md +1 -0
- package/dist/index.js +160 -0
- package/dist/index.mjs +14225 -0
- package/dist/style.css +1 -0
- package/dist/types/@types/vanilla-sprinkles.d.ts +17 -0
- package/dist/types/assets/Spinner.d.ts +8 -0
- package/dist/types/assets/index.d.ts +1 -0
- package/dist/types/components/badge/badge.css.d.ts +40 -0
- package/dist/types/components/badge/badge.d.ts +15 -0
- package/dist/types/components/badge/index.d.ts +2 -0
- package/dist/types/components/button/button.css.d.ts +121 -0
- package/dist/types/components/button/button.d.ts +19 -0
- package/dist/types/components/button/index.d.ts +2 -0
- package/dist/types/components/close-button/close-button.css.d.ts +2 -0
- package/dist/types/components/close-button/close-button.d.ts +14 -0
- package/dist/types/components/close-button/index.d.ts +2 -0
- package/dist/types/components/form/common/action-icon.d.ts +3 -0
- package/dist/types/components/form/common/add-on.d.ts +10 -0
- package/dist/types/components/form/common/label.d.ts +10 -0
- package/dist/types/components/form/field.d.ts +15 -0
- package/dist/types/components/form/form.type.d.ts +1 -0
- package/dist/types/components/form/index.d.ts +4 -0
- package/dist/types/components/form/input.d.ts +24 -0
- package/dist/types/components/form/styles/addon.css.d.ts +29 -0
- package/dist/types/components/form/styles/common.css.d.ts +4 -0
- package/dist/types/components/form/styles/field.css.d.ts +37 -0
- package/dist/types/components/form/styles/index.d.ts +6 -0
- package/dist/types/components/form/styles/input.css.d.ts +2 -0
- package/dist/types/components/form/styles/label.css.d.ts +20 -0
- package/dist/types/components/form/styles/textarea.css.d.ts +2 -0
- package/dist/types/components/form/textarea.d.ts +18 -0
- package/dist/types/components/form/utils/resolve-form-state.d.ts +8 -0
- package/dist/types/components/icon-button/icon-button.css.d.ts +101 -0
- package/dist/types/components/icon-button/icon-button.d.ts +15 -0
- package/dist/types/components/icon-button/index.d.ts +2 -0
- package/dist/types/components/image/image.css.d.ts +21 -0
- package/dist/types/components/image/image.d.ts +34 -0
- package/dist/types/components/image/index.d.ts +2 -0
- package/dist/types/components/index.d.ts +10 -0
- package/dist/types/components/list/index.d.ts +4 -0
- package/dist/types/components/list/list-item.css.d.ts +14 -0
- package/dist/types/components/list/list-item.d.ts +16 -0
- package/dist/types/components/list/list.css.d.ts +2 -0
- package/dist/types/components/list/list.d.ts +11 -0
- package/dist/types/components/tabs/index.d.ts +4 -0
- package/dist/types/components/tabs/tab-item.css.d.ts +10 -0
- package/dist/types/components/tabs/tab-item.d.ts +13 -0
- package/dist/types/components/tabs/tabs.css.d.ts +20 -0
- package/dist/types/components/tabs/tabs.d.ts +23 -0
- package/dist/types/components/tooltip/index.d.ts +2 -0
- package/dist/types/components/tooltip/tooltip.css.d.ts +2 -0
- package/dist/types/components/tooltip/tooltip.d.ts +20 -0
- package/dist/types/components/utils/hooks/use-ripple/index.d.ts +2 -0
- package/dist/types/components/utils/hooks/use-ripple/ripple.css.d.ts +2 -0
- package/dist/types/components/utils/hooks/use-ripple/use-ripple.d.ts +6 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/layouts/box/box.d.ts +6979 -0
- package/dist/types/layouts/box/index.d.ts +2 -0
- package/dist/types/layouts/flex/flex.d.ts +366 -0
- package/dist/types/layouts/flex/index.d.ts +2 -0
- package/dist/types/layouts/grid/grid.d.ts +666 -0
- package/dist/types/layouts/grid/index.d.ts +2 -0
- package/dist/types/layouts/index.d.ts +5 -0
- package/dist/types/layouts/stack/index.d.ts +2 -0
- package/dist/types/layouts/stack/stack.d.ts +17 -0
- package/dist/types/layouts/stack/utils.d.ts +10 -0
- package/dist/types/layouts/text/index.d.ts +2 -0
- package/dist/types/layouts/text/text.css.d.ts +72 -0
- package/dist/types/layouts/text/text.d.ts +13959 -0
- package/dist/types/provider/index.d.ts +1 -0
- package/dist/types/provider/provider.d.ts +3 -0
- package/dist/types/provider/radix-provider.d.ts +3 -0
- package/dist/types/theme/index.d.ts +2 -0
- package/dist/types/theme/styles/atoms/border.css.d.ts +1575 -0
- package/dist/types/theme/styles/atoms/common.css.d.ts +721 -0
- package/dist/types/theme/styles/atoms/constants.d.ts +3 -0
- package/dist/types/theme/styles/atoms/flex.css.d.ts +362 -0
- package/dist/types/theme/styles/atoms/grid.css.d.ts +661 -0
- package/dist/types/theme/styles/atoms/index.d.ts +8 -0
- package/dist/types/theme/styles/atoms/position.css.d.ts +778 -0
- package/dist/types/theme/styles/atoms/sizes.css.d.ts +1313 -0
- package/dist/types/theme/styles/atoms/space.css.d.ts +1943 -0
- package/dist/types/theme/styles/atoms/typography.css.d.ts +329 -0
- package/dist/types/theme/styles/globals.css.d.ts +3 -0
- package/dist/types/theme/styles/index.d.ts +3 -0
- package/dist/types/theme/styles/normalize.css.d.ts +0 -0
- package/dist/types/theme/styles/theme.css.d.ts +240 -0
- package/dist/types/theme/styles/utils.d.ts +17 -0
- package/dist/types/theme/tokens/animation.d.ts +21 -0
- package/dist/types/theme/tokens/border.d.ts +9 -0
- package/dist/types/theme/tokens/breakpoints.d.ts +9 -0
- package/dist/types/theme/tokens/color.d.ts +125 -0
- package/dist/types/theme/tokens/index.d.ts +241 -0
- package/dist/types/theme/tokens/opacity.d.ts +8 -0
- package/dist/types/theme/tokens/radii.d.ts +6 -0
- package/dist/types/theme/tokens/shadows.d.ts +6 -0
- package/dist/types/theme/tokens/space.d.ts +72 -0
- package/dist/types/theme/tokens/typography.d.ts +123 -0
- package/dist/types/theme/tokens/z-indices.d.ts +16 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/merge-atoms.d.ts +7 -0
- package/package.json +77 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes } from 'react';
|
|
2
|
+
import type { ImageRecipe } from './image.css';
|
|
3
|
+
type ImgHTMLAttributes = Omit<HTMLAttributes<HTMLImageElement>, 'as' | 'src' | 'width' | 'height' | 'loading' | 'fallback' | 'onError' | 'onLoad'>;
|
|
4
|
+
export type ImageProps = ImgHTMLAttributes & ImageRecipe & {
|
|
5
|
+
as?: ElementType;
|
|
6
|
+
src: string;
|
|
7
|
+
fit?: string;
|
|
8
|
+
width?: string | number;
|
|
9
|
+
height?: string | number;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
loading?: 'lazy' | 'eager';
|
|
12
|
+
fallback?: React.ReactElement;
|
|
13
|
+
onLoad?: React.ImgHTMLAttributes<HTMLImageElement>['onLoad'];
|
|
14
|
+
onError?: React.ImgHTMLAttributes<HTMLImageElement>['onError'];
|
|
15
|
+
'data-test-id'?: string;
|
|
16
|
+
};
|
|
17
|
+
declare const Image: import("react").ForwardRefExoticComponent<ImgHTMLAttributes & {
|
|
18
|
+
fit?: "fill" | "none" | "contain" | "cover" | "scale-down" | undefined;
|
|
19
|
+
} & {
|
|
20
|
+
as?: ElementType<any> | undefined;
|
|
21
|
+
src: string;
|
|
22
|
+
fit?: string | undefined;
|
|
23
|
+
width?: string | number | undefined;
|
|
24
|
+
height?: string | number | undefined;
|
|
25
|
+
isLoading?: boolean | undefined;
|
|
26
|
+
loading?: "lazy" | "eager" | undefined;
|
|
27
|
+
fallback?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
28
|
+
onLoad?: React.ImgHTMLAttributes<HTMLImageElement>['onLoad'];
|
|
29
|
+
onError?: React.ImgHTMLAttributes<HTMLImageElement>['onError'];
|
|
30
|
+
'data-test-id'?: string | undefined;
|
|
31
|
+
} & {
|
|
32
|
+
children?: import("react").ReactNode;
|
|
33
|
+
} & import("react").RefAttributes<ImgHTMLAttributes>>;
|
|
34
|
+
export default Image;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './badge';
|
|
2
|
+
export * from './button';
|
|
3
|
+
export * from './image';
|
|
4
|
+
export * from './close-button';
|
|
5
|
+
export * from './form';
|
|
6
|
+
export * from './icon-button';
|
|
7
|
+
export * from './list';
|
|
8
|
+
export * from './tabs';
|
|
9
|
+
export * from './tooltip';
|
|
10
|
+
export * from '@radix-ui/react-portal';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RecipeVariants } from '@vanilla-extract/recipes';
|
|
2
|
+
export declare const listItemRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
3
|
+
isLeftIcon: {
|
|
4
|
+
true: {
|
|
5
|
+
paddingLeft: string;
|
|
6
|
+
};
|
|
7
|
+
false: {
|
|
8
|
+
paddingLeft: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
12
|
+
export declare const styleItem: string;
|
|
13
|
+
export declare const styleListWrapper: string;
|
|
14
|
+
export type ListItemRecipe = RecipeVariants<typeof listItemRecipe>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ElementType, LiHTMLAttributes } from 'react';
|
|
2
|
+
type ListItemProperties = Omit<LiHTMLAttributes<HTMLLIElement>, 'as'>;
|
|
3
|
+
declare const ListItem: import("react").ForwardRefExoticComponent<{
|
|
4
|
+
'data-test-id'?: string | undefined;
|
|
5
|
+
leftIcon?: JSX.Element | undefined;
|
|
6
|
+
rightIcon?: JSX.Element | undefined;
|
|
7
|
+
href?: string | undefined;
|
|
8
|
+
target?: "_blank" | "_self" | "_parent" | "_top" | "framename" | undefined;
|
|
9
|
+
as?: ElementType<any> | undefined;
|
|
10
|
+
} & ListItemProperties & {
|
|
11
|
+
isLeftIcon?: boolean | undefined;
|
|
12
|
+
} & {
|
|
13
|
+
children?: import("react").ReactNode;
|
|
14
|
+
} & import("react").RefAttributes<ListItemProperties>>;
|
|
15
|
+
export type ListItemProps = Parameters<typeof ListItem>[0];
|
|
16
|
+
export default ListItem;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type ListProperties = Omit<HTMLAttributes<HTMLUListElement>, 'as'>;
|
|
3
|
+
declare const List: import("react").ForwardRefExoticComponent<ListProperties & {
|
|
4
|
+
divider?: boolean | ReactNode;
|
|
5
|
+
'data-test-id'?: string | undefined;
|
|
6
|
+
as?: ElementType<any> | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
} & import("react").RefAttributes<ListProperties>>;
|
|
10
|
+
export type ListProps = Parameters<typeof List>[0];
|
|
11
|
+
export default List;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RecipeVariants } from '@vanilla-extract/recipes';
|
|
2
|
+
export declare const tabItemRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
3
|
+
isActive: {
|
|
4
|
+
true: {
|
|
5
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
6
|
+
borderBottom: `${string} ${string} var(--${string})` | `${string} ${string} var(--${string}, ${string})` | `${string} ${string} var(--${string}, ${number})`;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
}>;
|
|
10
|
+
export type TabItemRecipe = RecipeVariants<typeof tabItemRecipe>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ElementType, LiHTMLAttributes } from 'react';
|
|
2
|
+
export type TabItemProperties = Omit<LiHTMLAttributes<HTMLLIElement>, 'as' | 'ref'>;
|
|
3
|
+
declare const TabItem: import("react").ForwardRefExoticComponent<TabItemProperties & {
|
|
4
|
+
isActive?: boolean | undefined;
|
|
5
|
+
} & {
|
|
6
|
+
as?: ElementType<any> | undefined;
|
|
7
|
+
'data-index'?: number | undefined;
|
|
8
|
+
'data-test-id'?: string | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
children?: import("react").ReactNode;
|
|
11
|
+
} & import("react").RefAttributes<TabItemProperties>>;
|
|
12
|
+
export type TabItemProps = Parameters<typeof TabItem>[0];
|
|
13
|
+
export default TabItem;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RecipeVariants } from '@vanilla-extract/recipes';
|
|
2
|
+
export declare const tabsRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
3
|
+
withShadow: {
|
|
4
|
+
true: {
|
|
5
|
+
boxShadow: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
align: {
|
|
9
|
+
left: {
|
|
10
|
+
justifyContent: "left";
|
|
11
|
+
};
|
|
12
|
+
center: {
|
|
13
|
+
justifyContent: "center";
|
|
14
|
+
};
|
|
15
|
+
right: {
|
|
16
|
+
justifyContent: "right";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}>;
|
|
20
|
+
export type TabsRecipe = RecipeVariants<typeof tabsRecipe>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes } from 'react';
|
|
2
|
+
export type TabsProperties = Omit<HTMLAttributes<HTMLUListElement>, 'as' | 'ref'>;
|
|
3
|
+
export type TabsContextProps = {
|
|
4
|
+
index?: number;
|
|
5
|
+
setIndex?: (index: number) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const TabsContext: import("react").Context<TabsContextProps>;
|
|
8
|
+
declare const Tabs: import("react").ForwardRefExoticComponent<TabsProperties & {
|
|
9
|
+
withShadow?: boolean | undefined;
|
|
10
|
+
align?: "center" | "left" | "right" | undefined;
|
|
11
|
+
} & {
|
|
12
|
+
as?: ElementType<any> | undefined;
|
|
13
|
+
defaultIndex?: number | undefined;
|
|
14
|
+
index?: number | undefined;
|
|
15
|
+
align?: string | undefined;
|
|
16
|
+
'data-test-id'?: string | undefined;
|
|
17
|
+
withShadow?: boolean | undefined;
|
|
18
|
+
onChange?: ((index: number) => void) | undefined;
|
|
19
|
+
} & {
|
|
20
|
+
children?: import("react").ReactNode;
|
|
21
|
+
} & import("react").RefAttributes<TabsProperties>>;
|
|
22
|
+
export type TabsProps = Parameters<typeof Tabs>[0];
|
|
23
|
+
export default Tabs;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as RadixTooltip from '@radix-ui/react-tooltip';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { CommonAtoms } from '../../theme';
|
|
4
|
+
declare const Tooltip: import("react").ForwardRefExoticComponent<{
|
|
5
|
+
align?: RadixTooltip.PopperContentProps['align'];
|
|
6
|
+
alignOffset?: RadixTooltip.PopperContentProps['alignOffset'];
|
|
7
|
+
content: ReactNode;
|
|
8
|
+
defaultOpen?: boolean | undefined;
|
|
9
|
+
delayDuration?: number | undefined;
|
|
10
|
+
disableHoverableContent?: boolean | undefined;
|
|
11
|
+
onOpenChange?: RadixTooltip.TooltipProps['onOpenChange'];
|
|
12
|
+
open?: boolean | undefined;
|
|
13
|
+
position?: RadixTooltip.PopperContentProps['side'];
|
|
14
|
+
positionOffset?: RadixTooltip.PopperContentProps['sideOffset'];
|
|
15
|
+
bgColor?: CommonAtoms['bgColor'];
|
|
16
|
+
} & Pick<import("@radix-ui/react-popper").PopperContentProps & import("react").RefAttributes<HTMLDivElement>, "color" | "className" | "id" | "lang" | "style" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "slot" | "title" | "sticky" | "translate" | "hidden" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "nonce" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "align" | "asChild" | "side" | "sideOffset" | "alignOffset" | "arrowPadding" | "collisionBoundary" | "collisionPadding" | "hideWhenDetached" | "avoidCollisions" | "onPlaced"> & {
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
export type TooltipProps = Parameters<typeof Tooltip>[0];
|
|
20
|
+
export default Tooltip;
|