oneslash-design-system 1.0.6 → 1.0.8

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.
@@ -0,0 +1,33 @@
1
+ 'use client'
2
+ import React from 'react';
3
+ import { ExclamationCircleIcon } from '@heroicons/react/24/outline';
4
+
5
+ interface EmptyBoxProps{
6
+ text: string;
7
+ size: "small" | "large";
8
+ }
9
+
10
+ export default function EmptyBox ({
11
+ text,
12
+ size,
13
+ }: EmptyBoxProps) {
14
+
15
+ const color = 'text-light-text-disabled dark:text-dark-text-disabled';
16
+
17
+ const height = size === 'small'
18
+ ? 'py-6'
19
+ : 'h-full';
20
+
21
+ const iconSize = 'size-6' ;
22
+
23
+ return (
24
+ <div className={`flex flex-col space-y-2 justify-center items-center w-full ${height}`}>
25
+ <ExclamationCircleIcon
26
+ className={`${iconSize} ${color}`}
27
+ />
28
+ <p className={`text-body1 ${color}`} text-center>
29
+ {text}
30
+ </p>
31
+ </div>
32
+ );
33
+ }
@@ -0,0 +1,18 @@
1
+ 'use client';
2
+ import React from 'react';
3
+
4
+ export default function LoadingScreen() {
5
+ return (
6
+ <div className="flex justify-center items-center h-full w-full min-h-[200px]">
7
+ <div className="w-12 h-12 border-4 border-t-transparent border-light-accent-main rounded-full animate-spin"></div>
8
+ </div>
9
+ );
10
+ };
11
+
12
+ export function LoadingSmall() {
13
+ return (
14
+ <div className="flex justify-center items-center h-[40px] w-[40px]">
15
+ <div className="w-[40px] h-[40px] border-4 border-t-transparent border-light-accent-main rounded-full animate-spin"></div>
16
+ </div>
17
+ );
18
+ };
package/index.ts CHANGED
@@ -1,15 +1,18 @@
1
1
  import './index.css';
2
2
  import './designTokens';
3
- export * from './components/button';
3
+
4
4
  export * from './components/alert';
5
5
  export * from './components/button';
6
6
  export * from './components/checkBox';
7
+ export * from './components/emptyBox';
7
8
  export * from './components/iconButton';
9
+ export * from './components/loadingScreen';
8
10
  export * from './components/menuItem';
9
11
  export * from './components/modal';
10
12
  export * from './components/popover';
11
13
  export * from './components/tab';
12
14
  export * from './components/tag';
13
15
  export * from './components/textField';
16
+ export * from './components/timeStamp'
14
17
  export * from './components/tooltip';
15
18
  export * from './components/userImage';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oneslash-design-system",
3
3
  "description": "A design system for the Oneslash projects",
4
- "version": "1.0.6",
4
+ "version": "1.0.8",
5
5
  "private": false,
6
6
  "scripts": {
7
7
  "dev": "next dev",
package/global.d.ts DELETED
@@ -1,155 +0,0 @@
1
- // types/global.d.ts
2
- export {}
3
- declare global {
4
-
5
- interface CommentReactionProps {
6
- reactions: any;
7
- isArchiveComment?: boolean;
8
- }
9
-
10
- interface TimeStampProps{
11
- createdAt: string | number | Date;
12
- dateFormat: 'absolute' | 'relative';
13
- }
14
-
15
- interface CheckboxProps {
16
- label?: string;
17
- checked?: boolean;
18
- onChange?: (checked: boolean) => void;
19
- }
20
-
21
- interface ReactionIconButtonProps {
22
- size?: "small" | "medium" | "large";
23
- color?: "inherit" | "default" | "primary" | "secondary" | "error" | "info" | "success" | "warning";
24
- figmaCommentId: string;
25
- fileKey?: string;
26
- accountId: string;
27
- selectedHeadCommentId?: any;
28
- associatedAccountId?: any;
29
- }
30
-
31
- interface CheckIconButtonProps {
32
- size: "small" | "medium" | "large";
33
- color?: "inherit" | "default" | "primary" | "secondary" | "error" | "info" | "success" | "warning";
34
- }
35
-
36
- interface UncheckIconButtonProps {
37
- size: "small" | "medium" | "large";
38
- color?: "inherit" | "default" | "primary" | "secondary" | "error" | "info" | "success" | "warning";
39
- }
40
-
41
- interface ButtonProps{
42
- size: 'large' | 'medium' | 'small';
43
- type: 'primary' | 'secondary' | 'tertiary' | 'textOnly';
44
- state: 'enabled' | 'hovered' | 'selected' | 'focused' | 'disabled';
45
- label: string;
46
- iconLeftName?: keyof typeof HeroIcons;
47
- iconRightName?: keyof typeof HeroIcons;
48
- onClick?: any;
49
- }
50
-
51
- interface IconButtonProps{
52
- variant: "contained" | "iconOnly";
53
- color: "primary" | "secondary";
54
- state: "enabled" | "selected" | "disabled";
55
- iconName: keyof typeof HeroIcons;
56
- onClick?: any;
57
- }
58
-
59
- interface TagProps{
60
- key?: any;
61
- variant: "contained" | "textOnly";
62
- size: "medium" | "small";
63
- state?: "enabled" | "selected" ;
64
- label: any;
65
- iconName?: keyof typeof HeroIcons;
66
- isDeletable?: keyof typeof HeroIcons;
67
- onClick?: any;
68
- color?: 'default' | 'info';
69
- }
70
-
71
- interface EmptyBoxProps{
72
- text: string;
73
- size: "small" | "large";
74
- }
75
-
76
- interface TabPanelProps {
77
- children?: React.ReactNode;
78
- index: number;
79
- value: number;
80
- }
81
-
82
- interface TextFieldProps {
83
- id: string;
84
- label?: string;
85
- value: string;
86
- onChange: any;
87
- iconLeft?: any;
88
- iconRight?: React.ReactNode | React.ComponentType<any>;
89
- multiline?: boolean;
90
- maxRows?: number;
91
- disabled?: boolean;
92
- error?: boolean;
93
- }
94
-
95
- interface ModalProps {
96
- isOpen: boolean;
97
- title: string;
98
- children: React.ReactNode;
99
- onClose: () => void;
100
- actions?: React.ReactNode;
101
- }
102
-
103
- interface MenuItemProps {
104
- href?: string;
105
- iconName?: string;
106
- label: string;
107
- isSelected?: boolean;
108
- onClick: any;
109
- }
110
-
111
- type IconType = React.ComponentType<React.SVGProps<SVGSVGElement>>;
112
-
113
- interface TooltipProps {
114
- title: string;
115
- children: React.ReactElement;
116
- }
117
-
118
- interface UserImageProps {
119
- userHandle: string;
120
- userImgUrl?: string;
121
- }
122
-
123
- interface AlertProps {
124
- open: boolean;
125
- type: 'success' | 'warning' | 'error' | 'info';
126
- message: string;
127
- onClose: () => void;
128
- }
129
-
130
- interface PopoverProps {
131
- id?: string;
132
- anchorEl: HTMLElement | null;
133
- open: boolean;
134
- onClose: () => void;
135
- children: ReactNode;
136
- }
137
-
138
- interface ScrapTagProps{
139
- comment?: any;
140
- }
141
-
142
- type TabProps = {
143
- label: string;
144
- href?: string;
145
- isSelected: boolean;
146
- onClick: () => void;
147
- iconName?: string;
148
- };
149
-
150
- }
151
-
152
- declare module '@heroicons/react/*' {
153
- const content: any;
154
- export default content;
155
- }