@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.
Files changed (103) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +1 -0
  3. package/dist/index.js +160 -0
  4. package/dist/index.mjs +14225 -0
  5. package/dist/style.css +1 -0
  6. package/dist/types/@types/vanilla-sprinkles.d.ts +17 -0
  7. package/dist/types/assets/Spinner.d.ts +8 -0
  8. package/dist/types/assets/index.d.ts +1 -0
  9. package/dist/types/components/badge/badge.css.d.ts +40 -0
  10. package/dist/types/components/badge/badge.d.ts +15 -0
  11. package/dist/types/components/badge/index.d.ts +2 -0
  12. package/dist/types/components/button/button.css.d.ts +121 -0
  13. package/dist/types/components/button/button.d.ts +19 -0
  14. package/dist/types/components/button/index.d.ts +2 -0
  15. package/dist/types/components/close-button/close-button.css.d.ts +2 -0
  16. package/dist/types/components/close-button/close-button.d.ts +14 -0
  17. package/dist/types/components/close-button/index.d.ts +2 -0
  18. package/dist/types/components/form/common/action-icon.d.ts +3 -0
  19. package/dist/types/components/form/common/add-on.d.ts +10 -0
  20. package/dist/types/components/form/common/label.d.ts +10 -0
  21. package/dist/types/components/form/field.d.ts +15 -0
  22. package/dist/types/components/form/form.type.d.ts +1 -0
  23. package/dist/types/components/form/index.d.ts +4 -0
  24. package/dist/types/components/form/input.d.ts +24 -0
  25. package/dist/types/components/form/styles/addon.css.d.ts +29 -0
  26. package/dist/types/components/form/styles/common.css.d.ts +4 -0
  27. package/dist/types/components/form/styles/field.css.d.ts +37 -0
  28. package/dist/types/components/form/styles/index.d.ts +6 -0
  29. package/dist/types/components/form/styles/input.css.d.ts +2 -0
  30. package/dist/types/components/form/styles/label.css.d.ts +20 -0
  31. package/dist/types/components/form/styles/textarea.css.d.ts +2 -0
  32. package/dist/types/components/form/textarea.d.ts +18 -0
  33. package/dist/types/components/form/utils/resolve-form-state.d.ts +8 -0
  34. package/dist/types/components/icon-button/icon-button.css.d.ts +101 -0
  35. package/dist/types/components/icon-button/icon-button.d.ts +15 -0
  36. package/dist/types/components/icon-button/index.d.ts +2 -0
  37. package/dist/types/components/image/image.css.d.ts +21 -0
  38. package/dist/types/components/image/image.d.ts +34 -0
  39. package/dist/types/components/image/index.d.ts +2 -0
  40. package/dist/types/components/index.d.ts +10 -0
  41. package/dist/types/components/list/index.d.ts +4 -0
  42. package/dist/types/components/list/list-item.css.d.ts +14 -0
  43. package/dist/types/components/list/list-item.d.ts +16 -0
  44. package/dist/types/components/list/list.css.d.ts +2 -0
  45. package/dist/types/components/list/list.d.ts +11 -0
  46. package/dist/types/components/tabs/index.d.ts +4 -0
  47. package/dist/types/components/tabs/tab-item.css.d.ts +10 -0
  48. package/dist/types/components/tabs/tab-item.d.ts +13 -0
  49. package/dist/types/components/tabs/tabs.css.d.ts +20 -0
  50. package/dist/types/components/tabs/tabs.d.ts +23 -0
  51. package/dist/types/components/tooltip/index.d.ts +2 -0
  52. package/dist/types/components/tooltip/tooltip.css.d.ts +2 -0
  53. package/dist/types/components/tooltip/tooltip.d.ts +20 -0
  54. package/dist/types/components/utils/hooks/use-ripple/index.d.ts +2 -0
  55. package/dist/types/components/utils/hooks/use-ripple/ripple.css.d.ts +2 -0
  56. package/dist/types/components/utils/hooks/use-ripple/use-ripple.d.ts +6 -0
  57. package/dist/types/index.d.ts +7 -0
  58. package/dist/types/layouts/box/box.d.ts +6979 -0
  59. package/dist/types/layouts/box/index.d.ts +2 -0
  60. package/dist/types/layouts/flex/flex.d.ts +366 -0
  61. package/dist/types/layouts/flex/index.d.ts +2 -0
  62. package/dist/types/layouts/grid/grid.d.ts +666 -0
  63. package/dist/types/layouts/grid/index.d.ts +2 -0
  64. package/dist/types/layouts/index.d.ts +5 -0
  65. package/dist/types/layouts/stack/index.d.ts +2 -0
  66. package/dist/types/layouts/stack/stack.d.ts +17 -0
  67. package/dist/types/layouts/stack/utils.d.ts +10 -0
  68. package/dist/types/layouts/text/index.d.ts +2 -0
  69. package/dist/types/layouts/text/text.css.d.ts +72 -0
  70. package/dist/types/layouts/text/text.d.ts +13959 -0
  71. package/dist/types/provider/index.d.ts +1 -0
  72. package/dist/types/provider/provider.d.ts +3 -0
  73. package/dist/types/provider/radix-provider.d.ts +3 -0
  74. package/dist/types/theme/index.d.ts +2 -0
  75. package/dist/types/theme/styles/atoms/border.css.d.ts +1575 -0
  76. package/dist/types/theme/styles/atoms/common.css.d.ts +721 -0
  77. package/dist/types/theme/styles/atoms/constants.d.ts +3 -0
  78. package/dist/types/theme/styles/atoms/flex.css.d.ts +362 -0
  79. package/dist/types/theme/styles/atoms/grid.css.d.ts +661 -0
  80. package/dist/types/theme/styles/atoms/index.d.ts +8 -0
  81. package/dist/types/theme/styles/atoms/position.css.d.ts +778 -0
  82. package/dist/types/theme/styles/atoms/sizes.css.d.ts +1313 -0
  83. package/dist/types/theme/styles/atoms/space.css.d.ts +1943 -0
  84. package/dist/types/theme/styles/atoms/typography.css.d.ts +329 -0
  85. package/dist/types/theme/styles/globals.css.d.ts +3 -0
  86. package/dist/types/theme/styles/index.d.ts +3 -0
  87. package/dist/types/theme/styles/normalize.css.d.ts +0 -0
  88. package/dist/types/theme/styles/theme.css.d.ts +240 -0
  89. package/dist/types/theme/styles/utils.d.ts +17 -0
  90. package/dist/types/theme/tokens/animation.d.ts +21 -0
  91. package/dist/types/theme/tokens/border.d.ts +9 -0
  92. package/dist/types/theme/tokens/breakpoints.d.ts +9 -0
  93. package/dist/types/theme/tokens/color.d.ts +125 -0
  94. package/dist/types/theme/tokens/index.d.ts +241 -0
  95. package/dist/types/theme/tokens/opacity.d.ts +8 -0
  96. package/dist/types/theme/tokens/radii.d.ts +6 -0
  97. package/dist/types/theme/tokens/shadows.d.ts +6 -0
  98. package/dist/types/theme/tokens/space.d.ts +72 -0
  99. package/dist/types/theme/tokens/typography.d.ts +123 -0
  100. package/dist/types/theme/tokens/z-indices.d.ts +16 -0
  101. package/dist/types/utils/index.d.ts +1 -0
  102. package/dist/types/utils/merge-atoms.d.ts +7 -0
  103. 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,2 @@
1
+ export { default as Image } from './image';
2
+ export * from './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,4 @@
1
+ export { default as List } from './list';
2
+ export * from './list';
3
+ export { default as ListItem } from './list-item';
4
+ export * from './list-item';
@@ -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,2 @@
1
+ export declare const styleList: string;
2
+ export declare const styleListDivider: string;
@@ -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,4 @@
1
+ export { default as TabItem } from './tab-item';
2
+ export * from './tab-item';
3
+ export { default as Tabs } from './tabs';
4
+ export * from './tabs';
@@ -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,2 @@
1
+ export { default as Tooltip } from './tooltip';
2
+ export * from './tooltip';
@@ -0,0 +1,2 @@
1
+ export declare const tooltipContentRecipe: string;
2
+ export declare const tooltipArrowStyle: string;
@@ -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;
@@ -0,0 +1,2 @@
1
+ export { default as useRipple } from './use-ripple';
2
+ export * from './use-ripple';
@@ -0,0 +1,2 @@
1
+ export declare const rippleSpan: string;
2
+ export default rippleSpan;
@@ -0,0 +1,6 @@
1
+ import type { ButtonRecipe } from '../../../button/button.css';
2
+ export type UseRipple = ButtonRecipe & {
3
+ ref: React.RefObject<any>;
4
+ };
5
+ declare const useRipple: ({ ref, colorScheme }: UseRipple) => JSX.Element[];
6
+ export default useRipple;
@@ -0,0 +1,7 @@
1
+ /** MUST BE FIRST */
2
+ /** DO NOT MOVE */
3
+ export * from './components';
4
+ export * from './layouts';
5
+ export * from './provider';
6
+ export { theme } from './theme/styles';
7
+ export { tokens } from './theme/tokens';