@optigrit/optigrit-ui 0.0.2 → 0.0.4

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.
@@ -8,6 +8,7 @@ type PopoverProps = HTMLAttributes<HTMLDivElement> & {
8
8
  open?: boolean;
9
9
  onClose?: () => void;
10
10
  onOpen?: (node: HTMLDivElement) => void;
11
+ closeOnClickOutside?: boolean;
11
12
  };
12
13
 
13
14
  type InputProps = {
@@ -40,6 +40,7 @@ function calculatePopoverStyle(container, defaultPosition) {
40
40
  }
41
41
 
42
42
  // src/core/Popover/Popover.tsx
43
+ import { createPortal } from "react-dom";
43
44
  import { jsx, jsxs } from "react/jsx-runtime";
44
45
  function Popover(props) {
45
46
  const {
@@ -49,6 +50,7 @@ function Popover(props) {
49
50
  onClose,
50
51
  position: _position = "bottom-center",
51
52
  onOpen,
53
+ closeOnClickOutside = true,
52
54
  ...popoverProps
53
55
  } = props;
54
56
  const popoverRef = useRef(null);
@@ -120,37 +122,43 @@ function Popover(props) {
120
122
  if (open) showPopover();
121
123
  else hidePopover();
122
124
  }, [open]);
123
- return /* @__PURE__ */ jsxs(Fragment, { children: [
124
- /* @__PURE__ */ jsx(
125
- "div",
126
- {
127
- className: "fixed w-[100dvw] h-[100dvh] left-0 top-0",
128
- style: { display: open ? "block" : "none" },
129
- onClick: handleClickOutside
130
- }
131
- ),
132
- /* @__PURE__ */ jsx(
133
- "div",
134
- {
135
- ...popoverProps,
136
- ref: popoverRef,
137
- style: {
138
- display: "flex",
139
- position: "fixed",
140
- transition: "all 200ms",
141
- opacity: 0,
142
- scale: 0.8,
143
- ...popoverProps.style
144
- },
145
- children
146
- }
147
- )
148
- ] });
125
+ if (!targetRef.current) return null;
126
+ return createPortal(
127
+ /* @__PURE__ */ jsxs(Fragment, { children: [
128
+ /* @__PURE__ */ jsx(Show, { when: !!closeOnClickOutside, children: /* @__PURE__ */ jsx(
129
+ "div",
130
+ {
131
+ className: "fixed w-[100dvw] h-[100dvh] left-0 top-0 z-[1] bg-red-600/10",
132
+ style: { display: open ? "block" : "none" },
133
+ onClick: handleClickOutside
134
+ }
135
+ ) }),
136
+ /* @__PURE__ */ jsx(
137
+ "div",
138
+ {
139
+ ...popoverProps,
140
+ ref: popoverRef,
141
+ style: {
142
+ display: "flex",
143
+ position: "fixed",
144
+ transition: "all 200ms",
145
+ opacity: 0,
146
+ scale: 0.8,
147
+ zIndex: 2,
148
+ ...popoverProps.style
149
+ },
150
+ children
151
+ }
152
+ )
153
+ ] }),
154
+ document.body
155
+ );
149
156
  }
150
157
 
151
158
  // src/shared/utils/helper.ts
152
- function cn(...classes) {
153
- return classes.filter(Boolean).join(" ");
159
+ import { twMerge } from "tailwind-merge";
160
+ function cn(...inputs) {
161
+ return twMerge(inputs.filter(Boolean).join(" "));
154
162
  }
155
163
 
156
164
  // src/core/Input/Input.tsx
@@ -164,10 +172,10 @@ var Input = forwardRef((props, ref) => {
164
172
  required,
165
173
  fullWidth = false,
166
174
  labelShrink = false,
167
- bgColor = "white",
168
- textColor = "black",
169
- borderColor = "black",
170
- primaryColor = "royalblue",
175
+ bgColor = "var(--bg, white)",
176
+ textColor = "var(--text, black)",
177
+ borderColor = "var(--border, black)",
178
+ primaryColor = "var(--primary, royalblue)",
171
179
  inputContainerProps = {},
172
180
  ...inputProps
173
181
  } = props;
@@ -1,24 +1,35 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { ButtonHTMLAttributes, ReactNode, HTMLAttributes, RefObject, TableHTMLAttributes } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { P as PopoverProps, a as InputProps } from '../Input-CL3wQvR_.js';
4
+ import { P as PopoverProps, a as InputProps } from '../Input-CWxBHfX8.js';
5
5
 
6
- type ButtonVariant = "primary" | "secondary" | "outline" | "ghost" | "destructive" | "link";
6
+ type ButtonVariant = "contained" | "outlined" | "soft" | "text";
7
+ type ButtonColor = "primary" | "secondary" | "error" | "success" | "warning" | "info";
7
8
  type ButtonSize = "xs" | "sm" | "md" | "lg" | "xl";
8
9
  type ButtonRoundness = "none" | "sm" | "md" | "lg" | "full";
9
10
  interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
10
11
  variant?: ButtonVariant;
12
+ color?: ButtonColor;
11
13
  size?: ButtonSize;
12
14
  roundness?: ButtonRoundness;
13
15
  fullWidth?: boolean;
14
16
  loading?: boolean;
15
17
  leftIcon?: ReactNode;
16
18
  rightIcon?: ReactNode;
17
- iconOnly?: boolean;
18
19
  disableRipple?: boolean;
19
20
  }
20
21
  declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
21
22
 
23
+ interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
24
+ variant?: ButtonVariant;
25
+ color?: ButtonColor;
26
+ size?: ButtonSize;
27
+ roundness?: ButtonRoundness;
28
+ loading?: boolean;
29
+ disableRipple?: boolean;
30
+ }
31
+ declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
32
+
22
33
  type SIZE = "xs" | "sm" | "md" | "lg" | "xl";
23
34
 
24
35
  type TooltipProps = HTMLAttributes<HTMLDivElement> & {
@@ -158,4 +169,4 @@ type DrawerFooterProps = {
158
169
  };
159
170
  declare function DrawerFooter({ children, className, style }: DrawerFooterProps): react_jsx_runtime.JSX.Element;
160
171
 
161
- export { Button, type ButtonProps, type ButtonRoundness, type ButtonSize, type ButtonVariant, Dialog, DialogContent, DialogFooter, DialogHeader, type DialogProps, Drawer, DrawerContent, DrawerFooter, DrawerHeader, type DrawerProps, InputField, type InputFieldProps, MultiSelect, type MultiSelectProps, Select, type SelectProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableContainer, type TableContainerProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tooltip, type TooltipProps };
172
+ export { Button, type ButtonColor, type ButtonProps, type ButtonRoundness, type ButtonSize, type ButtonVariant, Dialog, DialogContent, DialogFooter, DialogHeader, type DialogProps, Drawer, DrawerContent, DrawerFooter, DrawerHeader, type DrawerProps, IconButton, type IconButtonProps, InputField, type InputFieldProps, MultiSelect, type MultiSelectProps, Select, type SelectProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableContainer, type TableContainerProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tooltip, type TooltipProps };
@@ -6,7 +6,7 @@ import {
6
6
  ShowWithAnimation,
7
7
  Spinner,
8
8
  cn
9
- } from "../chunk-EUAKUHDG.js";
9
+ } from "../chunk-F6GWYCMR.js";
10
10
  import "../chunk-MCQS3QNN.js";
11
11
  import {
12
12
  useKeyboardShortcuts
@@ -19,15 +19,54 @@ import {
19
19
  useCallback,
20
20
  useRef
21
21
  } from "react";
22
- import { jsx, jsxs } from "react/jsx-runtime";
23
- var variantClasses = {
24
- primary: "bg-primary text-white shadow-xl",
25
- secondary: "bg-secondary text-white shadow-xl",
26
- outline: "border border-primary/70 text-primary hover:border-primary hover:bg-primary/[0.04]",
27
- ghost: "text-primary hover:bg-primary/[0.04]",
28
- destructive: "bg-error text-white shadow-lg",
29
- link: "text-primary underline-offset-4 hover:underline"
22
+
23
+ // src/components/Buttons/utils.ts
24
+ var getVariantClasses = (variant, color) => {
25
+ const styles = {
26
+ contained: {
27
+ primary: "bg-primary text-primary-contrastText shadow-sm hover:shadow",
28
+ secondary: "bg-secondary text-secondary-contrastText shadow-sm hover:shadow",
29
+ error: "bg-error text-error-contrastText shadow-sm hover:shadow",
30
+ success: "bg-success text-success-contrastText shadow-sm hover:shadow",
31
+ warning: "bg-warning text-warning-contrastText shadow-sm hover:shadow",
32
+ info: "bg-info text-info-contrastText shadow-sm hover:shadow"
33
+ },
34
+ outlined: {
35
+ primary: "border border-[color-mix(in_srgb,var(--primary-main)_50%,transparent)] text-primary hover:border-primary hover:bg-[color-mix(in_srgb,var(--primary-main)_4%,transparent)]",
36
+ secondary: "border border-[color-mix(in_srgb,var(--secondary-main)_50%,transparent)] text-secondary hover:border-secondary hover:bg-[color-mix(in_srgb,var(--secondary-main)_4%,transparent)]",
37
+ error: "border border-[color-mix(in_srgb,var(--error-main)_50%,transparent)] text-error hover:border-error hover:bg-[color-mix(in_srgb,var(--error-main)_4%,transparent)]",
38
+ success: "border border-[color-mix(in_srgb,var(--success-main)_50%,transparent)] text-success hover:border-success hover:bg-[color-mix(in_srgb,var(--success-main)_4%,transparent)]",
39
+ warning: "border border-[color-mix(in_srgb,var(--warning-main)_50%,transparent)] text-warning hover:border-warning hover:bg-[color-mix(in_srgb,var(--warning-main)_4%,transparent)]",
40
+ info: "border border-[color-mix(in_srgb,var(--info-main)_50%,transparent)] text-info hover:border-info hover:bg-[color-mix(in_srgb,var(--info-main)_4%,transparent)]"
41
+ },
42
+ soft: {
43
+ primary: "bg-[color-mix(in_srgb,var(--primary-main)_10%,transparent)] text-primary hover:bg-[color-mix(in_srgb,var(--primary-main)_15%,transparent)]",
44
+ secondary: "bg-[color-mix(in_srgb,var(--secondary-main)_10%,transparent)] text-secondary hover:bg-[color-mix(in_srgb,var(--secondary-main)_15%,transparent)]",
45
+ error: "bg-[color-mix(in_srgb,var(--error-main)_10%,transparent)] text-error hover:bg-[color-mix(in_srgb,var(--error-main)_15%,transparent)]",
46
+ success: "bg-[color-mix(in_srgb,var(--success-main)_10%,transparent)] text-success hover:bg-[color-mix(in_srgb,var(--success-main)_15%,transparent)]",
47
+ warning: "bg-[color-mix(in_srgb,var(--warning-main)_10%,transparent)] text-warning hover:bg-[color-mix(in_srgb,var(--warning-main)_15%,transparent)]",
48
+ info: "bg-[color-mix(in_srgb,var(--info-main)_10%,transparent)] text-info hover:bg-[color-mix(in_srgb,var(--info-main)_15%,transparent)]"
49
+ },
50
+ text: {
51
+ primary: "text-primary hover:bg-[color-mix(in_srgb,var(--primary-main)_4%,transparent)]",
52
+ secondary: "text-secondary hover:bg-[color-mix(in_srgb,var(--secondary-main)_4%,transparent)]",
53
+ error: "text-error hover:bg-[color-mix(in_srgb,var(--error-main)_4%,transparent)]",
54
+ success: "text-success hover:bg-[color-mix(in_srgb,var(--success-main)_4%,transparent)]",
55
+ warning: "text-warning hover:bg-[color-mix(in_srgb,var(--warning-main)_4%,transparent)]",
56
+ info: "text-info hover:bg-[color-mix(in_srgb,var(--info-main)_4%,transparent)]"
57
+ }
58
+ };
59
+ return styles[variant][color];
60
+ };
61
+ var getRippleColor = (variant, color) => {
62
+ if (variant === "contained") {
63
+ return "rgba(255, 255, 255, 0.3)";
64
+ }
65
+ return `color-mix(in srgb, var(--${color}-main) 30%, transparent)`;
30
66
  };
67
+
68
+ // src/components/Buttons/Button/index.tsx
69
+ import { jsx, jsxs } from "react/jsx-runtime";
31
70
  var sizeClasses = {
32
71
  xs: "h-7 px-[10px] text-[13px] gap-[8px]",
33
72
  sm: "h-[30px] px-[10px] text-[13px] gap-[8px]",
@@ -35,13 +74,6 @@ var sizeClasses = {
35
74
  lg: "h-11 px-[22px] text-[16px] gap-[8px]",
36
75
  xl: "h-14 px-[22px] text-[16px] gap-[8px]"
37
76
  };
38
- var iconOnlySizeClasses = {
39
- xs: "text-xs h-7 w-7",
40
- sm: "text-sm h-9 w-9",
41
- md: "text-base h-11 w-11",
42
- lg: "text-base h-13 w-13",
43
- xl: "text-lg h-15 w-15"
44
- };
45
77
  var roundnessClasses = {
46
78
  none: "rounded-none",
47
79
  sm: "rounded-[2px]",
@@ -49,27 +81,16 @@ var roundnessClasses = {
49
81
  lg: "rounded-[16px]",
50
82
  full: "rounded-full"
51
83
  };
52
- function cn2(...classes) {
53
- return classes.filter(Boolean).join(" ");
54
- }
55
- var rippleColor = {
56
- primary: "rgba(255, 255, 255, 0.3)",
57
- secondary: "rgba(255, 255, 255, 0.3)",
58
- outline: "rgba(25, 118, 210, 0.1)",
59
- ghost: "rgba(25, 118, 210, 0.1)",
60
- destructive: "rgba(255, 255, 255, 0.3)",
61
- link: "rgba(25, 118, 210, 0.1)"
62
- };
63
84
  var Button = forwardRef(
64
85
  ({
65
- variant = "primary",
86
+ variant = "contained",
87
+ color = "primary",
66
88
  size = "md",
67
89
  roundness = "md",
68
90
  fullWidth = false,
69
91
  loading = false,
70
92
  leftIcon,
71
93
  rightIcon,
72
- iconOnly = false,
73
94
  disableRipple = false,
74
95
  disabled,
75
96
  className,
@@ -104,18 +125,18 @@ var Button = forwardRef(
104
125
  disabled: isDisabled,
105
126
  "aria-busy": loading || void 0,
106
127
  onClick: handleClick,
107
- className: cn2(
128
+ className: cn(
108
129
  "relative overflow-hidden inline-flex items-center justify-center font-medium transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
109
130
  isDisabled && "pointer-events-none opacity-50",
110
- variantClasses[variant],
111
- iconOnly ? iconOnlySizeClasses[size] : sizeClasses[size],
131
+ getVariantClasses(variant, color),
132
+ sizeClasses[size],
112
133
  roundnessClasses[roundness],
113
134
  fullWidth && "w-full",
114
135
  className
115
136
  ),
116
137
  ...rest,
117
138
  children: [
118
- /* @__PURE__ */ jsx(Ripple, { ref: rippleRef, color: rippleColor[variant] }),
139
+ /* @__PURE__ */ jsx(Ripple, { ref: rippleRef, color: getRippleColor(variant, color) }),
119
140
  loading && /* @__PURE__ */ jsx(Spinner, { size: spinnerSize[size], color: "inherit" }),
120
141
  !loading && leftIcon && /* @__PURE__ */ jsx("span", { className: "inline-flex shrink-0 z-10", children: leftIcon }),
121
142
  /* @__PURE__ */ jsx("span", { className: "z-10", children }),
@@ -128,9 +149,91 @@ var Button = forwardRef(
128
149
  Button.displayName = "Button";
129
150
  var Button_default = Button;
130
151
 
131
- // src/components/Feedback/Tooltip/Tooltip.tsx
132
- import { useRef as useRef2, useState } from "react";
152
+ // src/components/Buttons/IconButton/index.tsx
153
+ import {
154
+ forwardRef as forwardRef2,
155
+ useCallback as useCallback2,
156
+ useRef as useRef2
157
+ } from "react";
133
158
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
159
+ var iconOnlySizeClasses = {
160
+ xs: "text-xs h-7 w-7",
161
+ sm: "text-sm h-9 w-9",
162
+ md: "text-base h-11 w-11",
163
+ lg: "text-base h-13 w-13",
164
+ xl: "text-lg h-15 w-15"
165
+ };
166
+ var roundnessClasses2 = {
167
+ none: "rounded-none",
168
+ sm: "rounded-[2px]",
169
+ md: "rounded-[12px]",
170
+ lg: "rounded-[16px]",
171
+ full: "rounded-full"
172
+ };
173
+ var IconButton = forwardRef2(
174
+ ({
175
+ variant = "contained",
176
+ color = "primary",
177
+ size = "md",
178
+ roundness = "full",
179
+ loading = false,
180
+ disableRipple = false,
181
+ disabled,
182
+ className,
183
+ children,
184
+ type = "button",
185
+ onClick,
186
+ ...rest
187
+ }, ref) => {
188
+ const rippleRef = useRef2(null);
189
+ const isDisabled = disabled || loading;
190
+ const spinnerSize = {
191
+ xs: 12,
192
+ sm: 14,
193
+ md: 16,
194
+ lg: 20,
195
+ xl: 24
196
+ };
197
+ const handleClick = useCallback2(
198
+ (e) => {
199
+ if (!disableRipple && !isDisabled) {
200
+ rippleRef.current?.addRipple(e);
201
+ }
202
+ onClick?.(e);
203
+ },
204
+ [disableRipple, isDisabled, onClick]
205
+ );
206
+ return /* @__PURE__ */ jsxs2(
207
+ "button",
208
+ {
209
+ ref,
210
+ type,
211
+ disabled: isDisabled,
212
+ "aria-busy": loading || void 0,
213
+ onClick: handleClick,
214
+ className: cn(
215
+ "relative overflow-hidden inline-flex items-center justify-center font-medium transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
216
+ isDisabled && "pointer-events-none opacity-50",
217
+ getVariantClasses(variant, color),
218
+ iconOnlySizeClasses[size],
219
+ roundnessClasses2[roundness],
220
+ className
221
+ ),
222
+ ...rest,
223
+ children: [
224
+ /* @__PURE__ */ jsx2(Ripple, { ref: rippleRef, color: getRippleColor(variant, color) }),
225
+ loading ? /* @__PURE__ */ jsx2(Spinner, { size: spinnerSize[size], color: "inherit" }) : /* @__PURE__ */ jsx2("span", { className: "z-10 inline-flex items-center justify-center shrink-0", children })
226
+ ]
227
+ }
228
+ );
229
+ }
230
+ );
231
+ IconButton.displayName = "IconButton";
232
+ var IconButton_default = IconButton;
233
+
234
+ // src/components/Feedback/Tooltip/Tooltip.tsx
235
+ import { Fragment, useRef as useRef3, useState } from "react";
236
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
134
237
  function Tooltip(props) {
135
238
  const {
136
239
  label,
@@ -142,56 +245,57 @@ function Tooltip(props) {
142
245
  popoverProps = {},
143
246
  ...containerProps
144
247
  } = props;
145
- const container = useRef2(null);
248
+ const container = useRef3(null);
146
249
  const [open, setOpen] = useState(false);
147
- return /* @__PURE__ */ jsxs2(
148
- "div",
149
- {
150
- ...containerProps,
151
- ref: container,
152
- className: cn("cursor-pointer", className),
153
- onMouseEnter: () => setOpen(true),
154
- onMouseLeave: () => setOpen(false),
155
- children: [
156
- children,
157
- /* @__PURE__ */ jsx2(
158
- Popover,
250
+ return /* @__PURE__ */ jsxs3(Fragment, { children: [
251
+ /* @__PURE__ */ jsx3(
252
+ "div",
253
+ {
254
+ ...containerProps,
255
+ ref: container,
256
+ className: cn("cursor-pointer", className),
257
+ onMouseEnter: () => setOpen(true),
258
+ onMouseLeave: () => setOpen(false),
259
+ children
260
+ }
261
+ ),
262
+ /* @__PURE__ */ jsx3(
263
+ Popover,
264
+ {
265
+ ...popoverProps,
266
+ open,
267
+ targetRef: container,
268
+ position: labelPosition,
269
+ closeOnClickOutside: false,
270
+ className: cn("p-1", popoverProps.className),
271
+ children: /* @__PURE__ */ jsx3(
272
+ "div",
159
273
  {
160
- ...popoverProps,
161
- open,
162
- targetRef: container,
163
- position: labelPosition,
164
- className: cn("p-1", popoverProps.className),
165
- children: /* @__PURE__ */ jsx2(
166
- "div",
274
+ ...labelContainerProps,
275
+ className: cn(
276
+ "bg-bg-secondary text-text",
277
+ size !== "none" ? `text-${size} rounded-${size}` : "",
167
278
  {
168
- ...labelContainerProps,
169
- className: cn(
170
- "bg-black text-white",
171
- size !== "none" ? `text-${size} rounded-${size}` : "",
172
- {
173
- xs: "py-1 px-2",
174
- sm: "py-2 px-4",
175
- md: "py-3 px-6",
176
- lg: "py-4 px-8",
177
- xl: "py-5 px-10",
178
- none: "py-0 px-0"
179
- }[size],
180
- labelContainerProps.className
181
- ),
182
- children: label
183
- }
184
- )
279
+ xs: "py-1 px-2",
280
+ sm: "py-2 px-4",
281
+ md: "py-3 px-6",
282
+ lg: "py-4 px-8",
283
+ xl: "py-5 px-10",
284
+ none: "py-0 px-0"
285
+ }[size],
286
+ labelContainerProps.className
287
+ ),
288
+ children: label
185
289
  }
186
290
  )
187
- ]
188
- }
189
- );
291
+ }
292
+ )
293
+ ] });
190
294
  }
191
295
 
192
296
  // src/components/Forms/InputField/InputField.tsx
193
- import { useLayoutEffect, useRef as useRef3, useState as useState2 } from "react";
194
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
297
+ import { useLayoutEffect, useRef as useRef4, useState as useState2 } from "react";
298
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
195
299
  function InputField(props) {
196
300
  const {
197
301
  validateValue,
@@ -200,7 +304,7 @@ function InputField(props) {
200
304
  errorColor = "rgb(240, 70, 70)",
201
305
  ...inputProps
202
306
  } = props;
203
- const initRef = useRef3({ isUserTyped: false });
307
+ const initRef = useRef4({ isUserTyped: false });
204
308
  const [error, setError] = useState2("");
205
309
  function handleError(value) {
206
310
  if (!initRef.current.isUserTyped) return;
@@ -231,8 +335,8 @@ function InputField(props) {
231
335
  handleError(props.value);
232
336
  }
233
337
  }, [props.value]);
234
- return /* @__PURE__ */ jsxs3("div", { ...containerProps, children: [
235
- /* @__PURE__ */ jsx3(
338
+ return /* @__PURE__ */ jsxs4("div", { ...containerProps, children: [
339
+ /* @__PURE__ */ jsx4(
236
340
  Input,
237
341
  {
238
342
  ...inputProps,
@@ -244,13 +348,13 @@ function InputField(props) {
244
348
  onBlur: handleOnBlur
245
349
  }
246
350
  ),
247
- /* @__PURE__ */ jsx3("p", { className: "pl-1 text-xs", style: { color: errorColor, display: error ? "block" : "none" }, children: error })
351
+ /* @__PURE__ */ jsx4("p", { className: "pl-1 text-xs", style: { color: errorColor, display: error ? "block" : "none" }, children: error })
248
352
  ] });
249
353
  }
250
354
 
251
355
  // src/components/Forms/Select/index.tsx
252
- import { Fragment, useRef as useRef4, useState as useState3 } from "react";
253
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
356
+ import { Fragment as Fragment2, useRef as useRef5, useState as useState3 } from "react";
357
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
254
358
  function Select(props) {
255
359
  const {
256
360
  options = [{ label: "None", value: "" }],
@@ -258,8 +362,8 @@ function Select(props) {
258
362
  optionsPosition = "bottom-start",
259
363
  ...inputProps
260
364
  } = props;
261
- const container = useRef4(null);
262
- const optionsContainer = useRef4(null);
365
+ const container = useRef5(null);
366
+ const optionsContainer = useRef5(null);
263
367
  const [isOpen, setIsOpen] = useState3(false);
264
368
  const [activeOption, setActiveOption] = useState3("");
265
369
  useKeyboardShortcuts([
@@ -315,8 +419,8 @@ function Select(props) {
315
419
  const input = container.current?.querySelector("input");
316
420
  if (input) input.value = options2.label;
317
421
  }
318
- return /* @__PURE__ */ jsxs4(Fragment, { children: [
319
- /* @__PURE__ */ jsx4(
422
+ return /* @__PURE__ */ jsxs5(Fragment2, { children: [
423
+ /* @__PURE__ */ jsx5(
320
424
  InputField,
321
425
  {
322
426
  ...inputProps,
@@ -331,13 +435,13 @@ function Select(props) {
331
435
  setIsOpen(false);
332
436
  inputProps.onBlur?.(event);
333
437
  },
334
- endIcon: props.endIcon ? props.endIcon : /* @__PURE__ */ jsx4("div", { className: "relative h-full aspect-square pr-1 flex items-center justify-center", children: /* @__PURE__ */ jsx4("div", { className: cn(
438
+ endIcon: props.endIcon ? props.endIcon : /* @__PURE__ */ jsx5("div", { className: "relative h-full aspect-square pr-1 flex items-center justify-center", children: /* @__PURE__ */ jsx5("div", { className: cn(
335
439
  "w-0 h-0 border-l-[5px] border-r-[5px] border-t-[5px] border-l-transparent border-r-transparent border-t-gray-600",
336
440
  isOpen ? "rotate-180" : ""
337
441
  ) }) })
338
442
  }
339
443
  ),
340
- /* @__PURE__ */ jsx4(
444
+ /* @__PURE__ */ jsx5(
341
445
  Popover,
342
446
  {
343
447
  open: isOpen,
@@ -350,23 +454,23 @@ function Select(props) {
350
454
  onOpen: (node) => {
351
455
  node.style.minWidth = `${container.current?.offsetWidth ?? 0}px`;
352
456
  },
353
- children: /* @__PURE__ */ jsx4(
457
+ children: /* @__PURE__ */ jsx5(
354
458
  "div",
355
459
  {
356
460
  ref: optionsContainer,
357
- className: "w-full max-h-[200px] overflow-y-scroll scrollbar-hide [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden bg-zinc-200 p-1 rounded-md flex flex-col gap-1",
461
+ className: "w-full max-h-[200px] overflow-y-scroll scrollbar-hide [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden bg-bg-secondary shadow-md border-2 border-border text-text p-1 rounded-md flex flex-col gap-1",
358
462
  onMouseDown: (event) => {
359
463
  event.preventDefault();
360
464
  },
361
- children: options.map((option) => renderOption ? renderOption(option, activeOption === option.value) : /* @__PURE__ */ jsx4(
465
+ children: options.map((option) => renderOption ? renderOption(option, activeOption === option.value) : /* @__PURE__ */ jsx5(
362
466
  "div",
363
467
  {
364
468
  id: option.value,
365
469
  onClick: () => handleOnChange(option),
366
470
  className: cn(
367
- "p-2 hover:bg-gray-100 rounded cursor-pointer w-full",
368
- activeOption === option.value ? "border-2 border-blue-500" : "",
369
- option.value === props.value ? "bg-white" : ""
471
+ "p-2 hover:bg-bg rounded cursor-pointer w-full",
472
+ activeOption === option.value ? "border-2 border-primary" : "",
473
+ option.value === props.value ? "bg-bg" : ""
370
474
  ),
371
475
  children: option.label
372
476
  },
@@ -380,8 +484,8 @@ function Select(props) {
380
484
  }
381
485
 
382
486
  // src/components/Forms/MultiSelect/index.tsx
383
- import { Fragment as Fragment2, useRef as useRef5, useState as useState4 } from "react";
384
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
487
+ import { Fragment as Fragment3, useRef as useRef6, useState as useState4 } from "react";
488
+ import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
385
489
  function MultiSelect(props) {
386
490
  const {
387
491
  renderOption,
@@ -392,8 +496,8 @@ function MultiSelect(props) {
392
496
  ...inputProps
393
497
  } = props;
394
498
  const labelMap = new Map(options.map((option) => [option.value, option.label]));
395
- const container = useRef5(null);
396
- const optionsContainer = useRef5(null);
499
+ const container = useRef6(null);
500
+ const optionsContainer = useRef6(null);
397
501
  const [isOpen, setIsOpen] = useState4(false);
398
502
  const [activeOption, setActiveOption] = useState4("");
399
503
  useKeyboardShortcuts([
@@ -456,8 +560,8 @@ function MultiSelect(props) {
456
560
  const input = container.current?.querySelector("input");
457
561
  if (input) input.value = newValue.map((value2) => labelMap.get(value2)).join(", ") || "";
458
562
  }
459
- return /* @__PURE__ */ jsxs5(Fragment2, { children: [
460
- /* @__PURE__ */ jsx5(
563
+ return /* @__PURE__ */ jsxs6(Fragment3, { children: [
564
+ /* @__PURE__ */ jsx6(
461
565
  InputField,
462
566
  {
463
567
  ...inputProps,
@@ -472,13 +576,13 @@ function MultiSelect(props) {
472
576
  setIsOpen(false);
473
577
  inputProps.onBlur?.(event);
474
578
  },
475
- endIcon: props.endIcon ? props.endIcon : /* @__PURE__ */ jsx5("div", { className: "relative h-full aspect-square pr-1 flex items-center justify-center", children: /* @__PURE__ */ jsx5("div", { className: cn(
579
+ endIcon: props.endIcon ? props.endIcon : /* @__PURE__ */ jsx6("div", { className: "relative h-full aspect-square pr-1 flex items-center justify-center", children: /* @__PURE__ */ jsx6("div", { className: cn(
476
580
  "w-0 h-0 border-l-[5px] border-r-[5px] border-t-[5px] border-l-transparent border-r-transparent border-t-gray-600",
477
581
  isOpen ? "rotate-180" : ""
478
582
  ) }) })
479
583
  }
480
584
  ),
481
- /* @__PURE__ */ jsx5(
585
+ /* @__PURE__ */ jsx6(
482
586
  Popover,
483
587
  {
484
588
  open: isOpen,
@@ -491,23 +595,23 @@ function MultiSelect(props) {
491
595
  onOpen: (node) => {
492
596
  node.style.minWidth = `${container.current?.offsetWidth ?? 0}px`;
493
597
  },
494
- children: /* @__PURE__ */ jsx5(
598
+ children: /* @__PURE__ */ jsx6(
495
599
  "div",
496
600
  {
497
601
  ref: optionsContainer,
498
- className: "w-full max-h-[200px] overflow-y-scroll scrollbar-hide [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden bg-zinc-200 p-1 rounded-md flex flex-col gap-1",
602
+ className: "w-full max-h-[200px] overflow-y-scroll scrollbar-hide [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden bg-bg-secondary p-1 rounded-md flex flex-col gap-1 border-border border-2",
499
603
  onMouseDown: (event) => {
500
604
  event.preventDefault();
501
605
  },
502
- children: options.map((option) => renderOption ? renderOption(option, activeOption === option.value) : /* @__PURE__ */ jsx5(
606
+ children: options.map((option) => renderOption ? renderOption(option, activeOption === option.value) : /* @__PURE__ */ jsx6(
503
607
  "div",
504
608
  {
505
609
  id: option.value,
506
610
  onClick: () => handleOnChange(option),
507
611
  className: cn(
508
- "p-2 hover:bg-gray-100 rounded cursor-pointer w-full",
509
- activeOption === option.value ? "border-2 border-blue-500" : "",
510
- props.value?.includes(option.value) ? "bg-white" : ""
612
+ "p-2 hover:bg-bg rounded cursor-pointer w-full",
613
+ activeOption === option.value ? "border-2 border-primary" : "",
614
+ props.value?.includes(option.value) ? "bg-bg" : ""
511
615
  ),
512
616
  children: option.label
513
617
  },
@@ -521,7 +625,7 @@ function MultiSelect(props) {
521
625
  }
522
626
 
523
627
  // src/components/DataDisplay/Table/Table.tsx
524
- import { forwardRef as forwardRef2, useMemo } from "react";
628
+ import { forwardRef as forwardRef3, useMemo } from "react";
525
629
 
526
630
  // src/components/DataDisplay/Table/TableContext.tsx
527
631
  import { createContext, useContext } from "react";
@@ -532,15 +636,15 @@ var TableContext = createContext({
532
636
  var useTableContext = () => useContext(TableContext);
533
637
 
534
638
  // src/components/DataDisplay/Table/Table.tsx
535
- import { jsx as jsx6 } from "react/jsx-runtime";
536
- var Table = forwardRef2(
639
+ import { jsx as jsx7 } from "react/jsx-runtime";
640
+ var Table = forwardRef3(
537
641
  ({ className = "", children, stickyHeader = false, size = "medium", ...props }, ref) => {
538
642
  const value = useMemo(() => ({ size, stickyHeader }), [size, stickyHeader]);
539
- return /* @__PURE__ */ jsx6(TableContext.Provider, { value, children: /* @__PURE__ */ jsx6(
643
+ return /* @__PURE__ */ jsx7(TableContext.Provider, { value, children: /* @__PURE__ */ jsx7(
540
644
  "table",
541
645
  {
542
646
  ref,
543
- className: `w-full caption-bottom text-sm border-collapse ${stickyHeader ? "relative" : ""} ${className}`,
647
+ className: `w-full caption-bottom text-sm border-collapse text-text ${stickyHeader ? "relative" : ""} ${className}`,
544
648
  ...props,
545
649
  children
546
650
  }
@@ -551,15 +655,15 @@ Table.displayName = "Table";
551
655
  var Table_default = Table;
552
656
 
553
657
  // src/components/DataDisplay/Table/TableBody.tsx
554
- import { forwardRef as forwardRef3 } from "react";
555
- import { jsx as jsx7 } from "react/jsx-runtime";
556
- var TableBody = forwardRef3(
658
+ import { forwardRef as forwardRef4 } from "react";
659
+ import { jsx as jsx8 } from "react/jsx-runtime";
660
+ var TableBody = forwardRef4(
557
661
  ({ className = "", children, ...props }, ref) => {
558
- return /* @__PURE__ */ jsx7(
662
+ return /* @__PURE__ */ jsx8(
559
663
  "tbody",
560
664
  {
561
665
  ref,
562
- className: `[&_tr:last-child]:border-0 ${className}`,
666
+ className: `[&_tr:last-child]:border-0 [&_tr]:border-border ${className}`,
563
667
  ...props,
564
668
  children
565
669
  }
@@ -570,9 +674,9 @@ TableBody.displayName = "TableBody";
570
674
  var TableBody_default = TableBody;
571
675
 
572
676
  // src/components/DataDisplay/Table/TableCell.tsx
573
- import { forwardRef as forwardRef4 } from "react";
574
- import { jsx as jsx8 } from "react/jsx-runtime";
575
- var TableCell = forwardRef4(
677
+ import { forwardRef as forwardRef5 } from "react";
678
+ import { jsx as jsx9 } from "react/jsx-runtime";
679
+ var TableCell = forwardRef5(
576
680
  ({ className = "", align = "left", padding, variant, component, children, ...props }, ref) => {
577
681
  const { size, stickyHeader } = useTableContext();
578
682
  const isHead = variant === "head";
@@ -590,11 +694,11 @@ var TableCell = forwardRef4(
590
694
  checkbox: "p-0 w-[48px] text-center"
591
695
  };
592
696
  const effectivePadding = padding || "normal";
593
- return /* @__PURE__ */ jsx8(
697
+ return /* @__PURE__ */ jsx9(
594
698
  Component,
595
699
  {
596
700
  ref,
597
- className: `align-middle transition-colors [&:has([role=checkbox])]:pr-0 ${isHead ? "font-semibold text-slate-700 bg-slate-50" : "text-slate-600"} ${stickyHeader && isHead ? "sticky top-0 z-10 shadow-[inset_0_-1px_0_rgba(226,232,240,1)]" : ""} ${alignClasses[align]} ${paddingClasses[effectivePadding]} ${className}`,
701
+ className: `align-middle transition-colors [&:has([role=checkbox])]:pr-0 ${isHead ? "font-semibold text-text bg-bg-secondary" : "text-text-secondary"} ${stickyHeader && isHead ? "sticky top-0 z-10 shadow-[inset_0_-1px_0_var(--border)]" : ""} ${alignClasses[align]} ${paddingClasses[effectivePadding]} ${className}`,
598
702
  ...props,
599
703
  children
600
704
  }
@@ -605,15 +709,15 @@ TableCell.displayName = "TableCell";
605
709
  var TableCell_default = TableCell;
606
710
 
607
711
  // src/components/DataDisplay/Table/TableContainer.tsx
608
- import { forwardRef as forwardRef5 } from "react";
609
- import { jsx as jsx9 } from "react/jsx-runtime";
610
- var TableContainer = forwardRef5(
712
+ import { forwardRef as forwardRef6 } from "react";
713
+ import { jsx as jsx10 } from "react/jsx-runtime";
714
+ var TableContainer = forwardRef6(
611
715
  ({ className = "", children, ...props }, ref) => {
612
- return /* @__PURE__ */ jsx9(
716
+ return /* @__PURE__ */ jsx10(
613
717
  "div",
614
718
  {
615
719
  ref,
616
- className: `w-full overflow-auto rounded-lg border border-slate-200 bg-white shadow-sm ${className}`,
720
+ className: `w-full overflow-auto rounded-lg border border-border bg-bg-secondary shadow-sm ${className}`,
617
721
  ...props,
618
722
  children
619
723
  }
@@ -624,15 +728,15 @@ TableContainer.displayName = "TableContainer";
624
728
  var TableContainer_default = TableContainer;
625
729
 
626
730
  // src/components/DataDisplay/Table/TableFooter.tsx
627
- import { forwardRef as forwardRef6 } from "react";
628
- import { jsx as jsx10 } from "react/jsx-runtime";
629
- var TableFooter = forwardRef6(
731
+ import { forwardRef as forwardRef7 } from "react";
732
+ import { jsx as jsx11 } from "react/jsx-runtime";
733
+ var TableFooter = forwardRef7(
630
734
  ({ className = "", children, ...props }, ref) => {
631
- return /* @__PURE__ */ jsx10(
735
+ return /* @__PURE__ */ jsx11(
632
736
  "tfoot",
633
737
  {
634
738
  ref,
635
- className: `border-t bg-slate-50/50 font-medium [&>tr]:last:border-b-0 ${className}`,
739
+ className: `border-t border-border bg-bg-secondary/50 font-medium [&>tr]:last:border-b-0 ${className}`,
636
740
  ...props,
637
741
  children
638
742
  }
@@ -643,15 +747,15 @@ TableFooter.displayName = "TableFooter";
643
747
  var TableFooter_default = TableFooter;
644
748
 
645
749
  // src/components/DataDisplay/Table/TableHead.tsx
646
- import { forwardRef as forwardRef7 } from "react";
647
- import { jsx as jsx11 } from "react/jsx-runtime";
648
- var TableHead = forwardRef7(
750
+ import { forwardRef as forwardRef8 } from "react";
751
+ import { jsx as jsx12 } from "react/jsx-runtime";
752
+ var TableHead = forwardRef8(
649
753
  ({ className = "", children, ...props }, ref) => {
650
- return /* @__PURE__ */ jsx11(
754
+ return /* @__PURE__ */ jsx12(
651
755
  "thead",
652
756
  {
653
757
  ref,
654
- className: `[&_tr]:border-b bg-slate-50/50 ${className}`,
758
+ className: `[&_tr]:border-b [&_tr]:border-border bg-bg-secondary/50 ${className}`,
655
759
  ...props,
656
760
  children
657
761
  }
@@ -662,15 +766,15 @@ TableHead.displayName = "TableHead";
662
766
  var TableHead_default = TableHead;
663
767
 
664
768
  // src/components/DataDisplay/Table/TableRow.tsx
665
- import { forwardRef as forwardRef8 } from "react";
666
- import { jsx as jsx12 } from "react/jsx-runtime";
667
- var TableRow = forwardRef8(
769
+ import { forwardRef as forwardRef9 } from "react";
770
+ import { jsx as jsx13 } from "react/jsx-runtime";
771
+ var TableRow = forwardRef9(
668
772
  ({ className = "", children, hover = false, selected = false, ...props }, ref) => {
669
- return /* @__PURE__ */ jsx12(
773
+ return /* @__PURE__ */ jsx13(
670
774
  "tr",
671
775
  {
672
776
  ref,
673
- className: `border-b transition-colors ${hover ? "hover:bg-slate-100/50" : ""} ${selected ? "bg-slate-100/80" : ""} ${className}`,
777
+ className: `border-b border-border transition-colors ${hover ? "hover:bg-bg/50" : ""} ${selected ? "bg-bg/80" : ""} ${className}`,
674
778
  ...props,
675
779
  children
676
780
  }
@@ -682,7 +786,7 @@ var TableRow_default = TableRow;
682
786
 
683
787
  // src/components/Overlay/Dialog/Dialog.tsx
684
788
  import { createPortal } from "react-dom";
685
- import { jsx as jsx13 } from "react/jsx-runtime";
789
+ import { jsx as jsx14 } from "react/jsx-runtime";
686
790
  function Dialog(props) {
687
791
  const {
688
792
  open,
@@ -714,14 +818,14 @@ function Dialog(props) {
714
818
  ]);
715
819
  if (typeof window === "undefined") return null;
716
820
  return createPortal(
717
- /* @__PURE__ */ jsx13(
821
+ /* @__PURE__ */ jsx14(
718
822
  ShowWithAnimation,
719
823
  {
720
824
  when: open,
721
825
  removeOnHide: true,
722
826
  containerProps: {
723
827
  style: { position: "fixed" },
724
- className: "fixed inset-0 w-screen h-screen flex items-center justify-center"
828
+ className: "fixed inset-0 w-screen h-screen flex items-center justify-center z-[9999]"
725
829
  },
726
830
  animationDuration: 1.5 * animationDuration,
727
831
  animationStyle: {
@@ -742,7 +846,7 @@ function Dialog(props) {
742
846
  onClose?.();
743
847
  }
744
848
  },
745
- children: /* @__PURE__ */ jsx13(
849
+ children: /* @__PURE__ */ jsx14(
746
850
  ShowWithAnimation,
747
851
  {
748
852
  when: open,
@@ -750,10 +854,13 @@ function Dialog(props) {
750
854
  role: "dialog",
751
855
  "aria-modal": "true",
752
856
  className: cn(
753
- "relative z-10 w-full mx-4 bg-white rounded-lg shadow-lg overflow-hidden",
857
+ "relative z-10 w-full mx-4 bg-bg rounded-lg shadow-lg overflow-hidden",
754
858
  sizeClasses2[size],
755
859
  className
756
860
  ),
861
+ containerProps: {
862
+ className: "w-full"
863
+ },
757
864
  children
758
865
  }
759
866
  )
@@ -764,31 +871,31 @@ function Dialog(props) {
764
871
  }
765
872
 
766
873
  // src/components/Overlay/Dialog/DialogHeader.tsx
767
- import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
874
+ import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
768
875
  function DialogHeader(props) {
769
876
  const { title, children, ...rest } = props;
770
- return /* @__PURE__ */ jsxs6("div", { ...rest, className: "px-6 py-4 border-b", children: [
771
- /* @__PURE__ */ jsx14(Show, { when: !!title, children: /* @__PURE__ */ jsx14("h1", { className: "text-lg font-medium", children: title }) }),
877
+ return /* @__PURE__ */ jsxs7("div", { ...rest, className: "px-6 py-4 border-b border-border", children: [
878
+ /* @__PURE__ */ jsx15(Show, { when: !!title, children: /* @__PURE__ */ jsx15("h1", { className: "text-lg font-medium", children: title }) }),
772
879
  children
773
880
  ] });
774
881
  }
775
882
 
776
883
  // src/components/Overlay/Dialog/DialogFooter.tsx
777
- import { jsx as jsx15 } from "react/jsx-runtime";
884
+ import { jsx as jsx16 } from "react/jsx-runtime";
778
885
  function DialogFooter(props) {
779
- return /* @__PURE__ */ jsx15(
886
+ return /* @__PURE__ */ jsx16(
780
887
  "div",
781
888
  {
782
889
  ...props,
783
- className: cn("px-6 py-4 border-t flex items-center justify-end", props.className)
890
+ className: cn("px-6 py-4 border-t flex items-center justify-end border-border", props.className)
784
891
  }
785
892
  );
786
893
  }
787
894
 
788
895
  // src/components/Overlay/Dialog/DialogContent.tsx
789
- import { jsx as jsx16 } from "react/jsx-runtime";
896
+ import { jsx as jsx17 } from "react/jsx-runtime";
790
897
  function DialogContent(props) {
791
- return /* @__PURE__ */ jsx16(
898
+ return /* @__PURE__ */ jsx17(
792
899
  "div",
793
900
  {
794
901
  ...props,
@@ -799,7 +906,7 @@ function DialogContent(props) {
799
906
 
800
907
  // src/components/Overlay/Drawer/Drawer.tsx
801
908
  import { createPortal as createPortal2 } from "react-dom";
802
- import { jsx as jsx17 } from "react/jsx-runtime";
909
+ import { jsx as jsx18 } from "react/jsx-runtime";
803
910
  function Drawer(props) {
804
911
  const {
805
912
  open,
@@ -834,7 +941,7 @@ function Drawer(props) {
834
941
  }[_size] + (isHorizontal ? "vw" : "vh");
835
942
  })();
836
943
  return createPortal2(
837
- /* @__PURE__ */ jsx17(
944
+ /* @__PURE__ */ jsx18(
838
945
  ShowWithAnimation,
839
946
  {
840
947
  when: open,
@@ -864,7 +971,7 @@ function Drawer(props) {
864
971
  onClose?.();
865
972
  }
866
973
  },
867
- children: /* @__PURE__ */ jsx17(
974
+ children: /* @__PURE__ */ jsx18(
868
975
  ShowWithAnimation,
869
976
  {
870
977
  when: open,
@@ -877,7 +984,7 @@ function Drawer(props) {
877
984
  maxHeight: !isHorizontal ? size : "100%"
878
985
  }
879
986
  },
880
- className: "w-full h-full bg-white flex flex-col overflow-hidden",
987
+ className: "w-full h-full bg-bg flex flex-col overflow-hidden",
881
988
  style: {
882
989
  borderRadius: {
883
990
  left: `0 ${rounded}px ${rounded}px 0`,
@@ -911,9 +1018,9 @@ function Drawer(props) {
911
1018
  }
912
1019
 
913
1020
  // src/components/Overlay/Drawer/DrawerContent.tsx
914
- import { jsx as jsx18 } from "react/jsx-runtime";
1021
+ import { jsx as jsx19 } from "react/jsx-runtime";
915
1022
  function DrawerContent({ children, className, style }) {
916
- return /* @__PURE__ */ jsx18(
1023
+ return /* @__PURE__ */ jsx19(
917
1024
  "div",
918
1025
  {
919
1026
  className: cn("overflow-auto flex-1 p-4 relative hide-scrollbar", className),
@@ -924,12 +1031,12 @@ function DrawerContent({ children, className, style }) {
924
1031
  }
925
1032
 
926
1033
  // src/components/Overlay/Drawer/DrawerHeader.tsx
927
- import { jsx as jsx19 } from "react/jsx-runtime";
1034
+ import { jsx as jsx20 } from "react/jsx-runtime";
928
1035
  function DrawerHeader({ children, className, style }) {
929
- return /* @__PURE__ */ jsx19(
1036
+ return /* @__PURE__ */ jsx20(
930
1037
  "div",
931
1038
  {
932
- className: cn("sticky top-0 z-20 backdrop-blur-sm bg-white/60 px-4 py-3 border-b", className),
1039
+ className: cn("sticky top-0 z-20 backdrop-blur-sm bg-white/60 px-4 py-3 border-b border-border", className),
933
1040
  style,
934
1041
  children
935
1042
  }
@@ -937,12 +1044,12 @@ function DrawerHeader({ children, className, style }) {
937
1044
  }
938
1045
 
939
1046
  // src/components/Overlay/Drawer/DrawerFooter.tsx
940
- import { jsx as jsx20 } from "react/jsx-runtime";
1047
+ import { jsx as jsx21 } from "react/jsx-runtime";
941
1048
  function DrawerFooter({ children, className, style }) {
942
- return /* @__PURE__ */ jsx20(
1049
+ return /* @__PURE__ */ jsx21(
943
1050
  "div",
944
1051
  {
945
- className: cn("sticky bottom-0 z-20 backdrop-blur-sm bg-white/60 px-4 py-3 border-t", className),
1052
+ className: cn("sticky bottom-0 z-20 backdrop-blur-sm bg-white/60 px-4 py-3 border-t border-border", className),
946
1053
  style,
947
1054
  children
948
1055
  }
@@ -958,6 +1065,7 @@ export {
958
1065
  DrawerContent,
959
1066
  DrawerFooter,
960
1067
  DrawerHeader,
1068
+ IconButton_default as IconButton,
961
1069
  InputField,
962
1070
  MultiSelect,
963
1071
  Select,
@@ -1,10 +1,10 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { P as PopoverProps } from '../Input-CL3wQvR_.js';
3
- export { I as Input, a as InputProps } from '../Input-CL3wQvR_.js';
4
1
  import * as react from 'react';
5
2
  import { ReactNode, CSSProperties, HTMLAttributes } from 'react';
3
+ import { P as PopoverProps } from '../Input-CWxBHfX8.js';
4
+ export { I as Input, a as InputProps } from '../Input-CWxBHfX8.js';
5
+ import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
 
7
- declare function Popover(props: PopoverProps): react_jsx_runtime.JSX.Element;
7
+ declare function Popover(props: PopoverProps): react.ReactPortal | null;
8
8
 
9
9
  interface RippleRef {
10
10
  /**
@@ -5,7 +5,7 @@ import {
5
5
  Show,
6
6
  ShowWithAnimation,
7
7
  Spinner
8
- } from "../chunk-EUAKUHDG.js";
8
+ } from "../chunk-F6GWYCMR.js";
9
9
  import "../chunk-MCQS3QNN.js";
10
10
  import "../chunk-U65NGM6F.js";
11
11
  export {
package/index.css CHANGED
@@ -15,129 +15,39 @@
15
15
 
16
16
  @layer base {
17
17
  :root {
18
- --primary-main: #2563eb;
19
- --primary-light: #60a5fa;
20
- --primary-dark: #1d4ed8;
21
- --primary-contrast: #ffffff;
18
+ --bg: #f1f5ff;
19
+ --bg-secondary: #ffffff;
22
20
 
23
- --secondary-main: #64748b;
24
- --secondary-light: #94a3b8;
25
- --secondary-dark: #475569;
26
- --secondary-contrast: #ffffff;
27
-
28
- --grey-50: #f9fafb;
29
- --grey-100: #f3f4f6;
30
- --grey-200: #e5e7eb;
31
- --grey-300: #d1d5db;
32
- --grey-400: #9ca3af;
33
- --grey-500: #6b7280;
34
- --grey-600: #4b5563;
35
- --grey-700: #374151;
36
- --grey-800: #1f2937;
37
- --grey-900: #111827;
38
- --grey-A100: #f5f5f5;
39
- --grey-A200: #eeeeee;
40
- --grey-A400: #bdbdbd;
41
- --grey-A700: #616161;
42
-
43
- --error-main: #ef4444;
44
- --error-light: #fef2f2;
45
- --error-dark: #dc2626;
46
- --error-contrast: #ffffff;
47
-
48
- --warning-main: #f59e0b;
49
- --warning-light: #fbbf24;
50
- --warning-dark: #d97706;
51
- --warning-contrast: #ffffff;
52
-
53
- --info-main: #3b82f6;
54
- --info-light: #60a5fa;
55
- --info-dark: #2563eb;
56
- --info-contrast: #ffffff;
57
-
58
- --success-main: #10b981;
59
- --success-light: #34d399;
60
- --success-dark: #059669;
61
- --success-contrast: #ffffff;
62
-
63
- --background-default: #f5f5f5;
64
- --background-paper: #ffffff;
65
-
66
- --text-primary: #0f172a;
21
+ --text: #0f172a;
67
22
  --text-secondary: #475569;
68
- --text-disabled: #94a3b8;
69
23
 
70
- --divider: #e5e7eb;
24
+ --primary: #2563eb;
25
+ --primary-secondary: #64748b;
71
26
 
72
- --action-active: rgba(0, 0, 0, 0.54);
73
- --action-hover: rgba(0, 0, 0, 0.04);
74
- --action-selected: rgba(0, 0, 0, 0.08);
75
- --action-disabled: rgba(0, 0, 0, 0.26);
76
- --action-disabled-bg: rgba(0, 0, 0, 0.12);
77
- --action-focus: #93c5fd;
27
+ --success: #10b981;
28
+ --error: #ef4444;
29
+ --warning: #f59e0b;
30
+ --info: #3b82f6;
31
+
32
+ --border: #e5e7eb;
78
33
  }
79
34
 
80
35
  .dark {
81
- --primary-main: #60a5fa;
82
- --primary-light: #93c5fd;
83
- --primary-dark: #3b82f6;
84
- --primary-contrast: #0f172a;
85
-
86
- --secondary-main: #94a3b8;
87
- --secondary-light: #cbd5e1;
88
- --secondary-dark: #64748b;
89
- --secondary-contrast: #0f172a;
90
-
91
- --grey-50: #1f2937;
92
- --grey-100: #374151;
93
- --grey-200: #4b5563;
94
- --grey-300: #6b7280;
95
- --grey-400: #9ca3af;
96
- --grey-500: #d1d5db;
97
- --grey-600: #e5e7eb;
98
- --grey-700: #f3f4f6;
99
- --grey-800: #f9fafb;
100
- --grey-900: #ffffff;
101
- --grey-A100: #374151;
102
- --grey-A200: #4b5563;
103
- --grey-A400: #9ca3af;
104
- --grey-A700: #d1d5db;
105
-
106
- --error-main: #f87171;
107
- --error-light: #fef2f2;
108
- --error-dark: #ef4444;
109
- --error-contrast: #0f172a;
110
-
111
- --warning-main: #fbbf24;
112
- --warning-light: #fcd34d;
113
- --warning-dark: #f59e0b;
114
- --warning-contrast: #0f172a;
115
-
116
- --info-main: #60a5fa;
117
- --info-light: #93c5fd;
118
- --info-dark: #3b82f6;
119
- --info-contrast: #0f172a;
120
-
121
- --success-main: #34d399;
122
- --success-light: #6ee7b7;
123
- --success-dark: #10b981;
124
- --success-contrast: #0f172a;
36
+ --bg: #1f2937;
37
+ --bg-secondary: #111827;
125
38
 
126
- --background-default: #0f172a;
127
- --background-paper: #1e293b;
39
+ --text: #f9fafb;
40
+ --text-secondary: #d1d5db;
128
41
 
129
- --text-primary: #f8fafc;
130
- --text-secondary: #94a3b8;
131
- --text-disabled: #64748b;
42
+ --primary: #60a5fa;
43
+ --primary-secondary: #94a3b8;
132
44
 
133
- --divider: #334155;
45
+ --success: #34d399;
46
+ --error: #fef2f2;
47
+ --warning: #fbbf24;
48
+ --info: #60a5fa;
134
49
 
135
- --action-active: rgba(255, 255, 255, 0.56);
136
- --action-hover: rgba(255, 255, 255, 0.08);
137
- --action-selected: rgba(255, 255, 255, 0.16);
138
- --action-disabled: rgba(255, 255, 255, 0.3);
139
- --action-disabled-bg: rgba(255, 255, 255, 0.12);
140
- --action-focus: #60a5fa;
50
+ --border: #374151;
141
51
  }
142
52
  }
143
53
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optigrit/optigrit-ui",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "UI components library for optigrit apps",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -80,12 +80,13 @@
80
80
  "yalc": "^1.0.0-pre.53"
81
81
  },
82
82
  "peerDependencies": {
83
- "react": "^19.2.5",
84
- "react-dom": "^19.2.5",
83
+ "react": ">=18.3.0",
84
+ "react-dom": ">=18.3.0",
85
85
  "tailwindcss": "^3.4.19"
86
86
  },
87
87
  "dependencies": {
88
88
  "magicast": "^0.5.2",
89
- "prompts": "^2.4.2"
89
+ "prompts": "^2.4.2",
90
+ "tailwind-merge": "^3.6.0"
90
91
  }
91
92
  }
@@ -4,84 +4,52 @@ export default {
4
4
  extend: {
5
5
  colors: {
6
6
  primary: {
7
- DEFAULT: "var(--primary-main)",
8
- main: "var(--primary-main)",
9
- light: "var(--primary-light)",
10
- dark: "var(--primary-dark)",
11
- contrastText: "var(--primary-contrast)",
7
+ ...generateShades('var(--primary)'),
8
+ secondary: generateShades('var(--primary-secondary)'),
12
9
  },
13
- secondary: {
14
- DEFAULT: "var(--secondary-main)",
15
- main: "var(--secondary-main)",
16
- light: "var(--secondary-light)",
17
- dark: "var(--secondary-dark)",
18
- contrastText: "var(--secondary-contrast)",
19
- },
20
- error: {
21
- DEFAULT: "var(--error-main)",
22
- main: "var(--error-main)",
23
- light: "var(--error-light)",
24
- dark: "var(--error-dark)",
25
- contrastText: "var(--error-contrast)",
26
- },
27
- warning: {
28
- DEFAULT: "var(--warning-main)",
29
- main: "var(--warning-main)",
30
- light: "var(--warning-light)",
31
- dark: "var(--warning-dark)",
32
- contrastText: "var(--warning-contrast)",
33
- },
34
- info: {
35
- DEFAULT: "var(--info-main)",
36
- main: "var(--info-main)",
37
- light: "var(--info-light)",
38
- dark: "var(--info-dark)",
39
- contrastText: "var(--info-contrast)",
40
- },
41
- success: {
42
- DEFAULT: "var(--success-main)",
43
- main: "var(--success-main)",
44
- light: "var(--success-light)",
45
- dark: "var(--success-dark)",
46
- contrastText: "var(--success-contrast)",
47
- },
48
- grey: {
49
- 50: "var(--grey-50)",
50
- 100: "var(--grey-100)",
51
- 200: "var(--grey-200)",
52
- 300: "var(--grey-300)",
53
- 400: "var(--grey-400)",
54
- 500: "var(--grey-500)",
55
- 600: "var(--grey-600)",
56
- 700: "var(--grey-700)",
57
- 800: "var(--grey-800)",
58
- 900: "var(--grey-900)",
59
- A100: "var(--grey-A100)",
60
- A200: "var(--grey-A200)",
61
- A400: "var(--grey-A400)",
62
- A700: "var(--grey-A700)",
63
- },
64
- background: {
65
- DEFAULT: "var(--background-default)",
66
- default: "var(--background-default)",
67
- paper: "var(--background-paper)",
10
+ bg: {
11
+ ...generateShades('var(--bg)'),
12
+ secondary: generateShades('var(--bg-secondary)'),
68
13
  },
69
14
  text: {
70
- DEFAULT: "var(--text-primary)",
71
- primary: "var(--text-primary)",
72
- secondary: "var(--text-secondary)",
73
- disabled: "var(--text-disabled)",
74
- },
75
- divider: "var(--divider)",
76
- action: {
77
- active: "var(--action-active)",
78
- hover: "var(--action-hover)",
79
- selected: "var(--action-selected)",
80
- disabled: "var(--action-disabled)",
81
- disabledBackground: "var(--action-disabled-bg)",
82
- focus: "var(--action-focus)",
83
- },
15
+ ...generateShades('var(--text)'),
16
+ secondary: generateShades('var(--text-secondary)'),
17
+ },
18
+ border: generateShades('var(--border)'),
19
+ error: generateShades('var(--error)'),
20
+ success: generateShades('var(--success)'),
21
+ info: generateShades('var(--info)'),
22
+ warning: generateShades('var(--warning)'),
84
23
  }
85
24
  }
86
25
  }
26
+ }
27
+
28
+
29
+ function generateShades(color) {
30
+ const shades = {
31
+ DEFAULT: '',
32
+ 100: '',
33
+ 200: '',
34
+ 300: '',
35
+ 400: '',
36
+ 500: '',
37
+ 600: '',
38
+ 700: '',
39
+ 800: '',
40
+ 900: ''
41
+ };
42
+
43
+ for(let shadeKey in shades) {
44
+ const ratio = shadeKey === 'DEFAULT' ? 100 : parseInt(shadeKey) / 10;
45
+ shades[shadeKey] = `
46
+ rgb(
47
+ from color-mix(
48
+ in srgb, ${color} ${ratio}%, var(--bg, white) ${100 - ratio}%
49
+ ) r g b / <alpha-value>
50
+ )
51
+ `;
52
+ }
53
+
54
+ return shades;
87
55
  }