@tipp/ui 1.0.37 → 1.0.39

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 (50) hide show
  1. package/dist/atoms/card.cjs +57 -1
  2. package/dist/atoms/card.cjs.map +1 -1
  3. package/dist/atoms/card.d.cts +23 -1
  4. package/dist/atoms/card.d.ts +23 -1
  5. package/dist/atoms/card.js +1 -1
  6. package/dist/atoms/field-error-wrapper.js +2 -2
  7. package/dist/atoms/index.cjs +107 -80
  8. package/dist/atoms/index.cjs.map +1 -1
  9. package/dist/atoms/index.d.cts +2 -1
  10. package/dist/atoms/index.d.ts +2 -1
  11. package/dist/atoms/index.js +53 -53
  12. package/dist/atoms/pagination.js +3 -3
  13. package/dist/chunk-2UMG6ERT.js +29 -0
  14. package/dist/chunk-2UMG6ERT.js.map +1 -0
  15. package/dist/chunk-2WPHYT3E.js +119 -0
  16. package/dist/chunk-2WPHYT3E.js.map +1 -0
  17. package/dist/chunk-34C3EN6V.js +30 -0
  18. package/dist/chunk-34C3EN6V.js.map +1 -0
  19. package/dist/chunk-3RZUYZ77.js +39 -0
  20. package/dist/chunk-3RZUYZ77.js.map +1 -0
  21. package/dist/chunk-CAIVA7UA.js +42 -0
  22. package/dist/chunk-CAIVA7UA.js.map +1 -0
  23. package/dist/chunk-MCCH6NN7.js +28 -0
  24. package/dist/chunk-MCCH6NN7.js.map +1 -0
  25. package/dist/chunk-MV7J3V5O.js +31 -0
  26. package/dist/chunk-MV7J3V5O.js.map +1 -0
  27. package/dist/chunk-QYJNB7TS.js +43 -0
  28. package/dist/chunk-QYJNB7TS.js.map +1 -0
  29. package/dist/chunk-RDMWH747.js +119 -0
  30. package/dist/chunk-RDMWH747.js.map +1 -0
  31. package/dist/chunk-REVQ5LF7.js +29 -0
  32. package/dist/chunk-REVQ5LF7.js.map +1 -0
  33. package/dist/chunk-SXYLPM76.js +119 -0
  34. package/dist/chunk-SXYLPM76.js.map +1 -0
  35. package/dist/chunk-WXMFYTVG.js +28 -0
  36. package/dist/chunk-WXMFYTVG.js.map +1 -0
  37. package/dist/index.cjs +158 -131
  38. package/dist/index.cjs.map +1 -1
  39. package/dist/index.css +26 -2
  40. package/dist/index.css.map +1 -1
  41. package/dist/index.d.cts +2 -1
  42. package/dist/index.d.ts +2 -1
  43. package/dist/index.js +69 -69
  44. package/dist/molecules/date-picker/index.js +2 -2
  45. package/dist/molecules/expand-table/index.js +24 -24
  46. package/dist/molecules/expand-table/row.js +22 -22
  47. package/dist/molecules/index.js +28 -28
  48. package/dist/molecules/navigation.js +23 -23
  49. package/package.json +1 -1
  50. package/src/atoms/card.tsx +45 -1
@@ -1,8 +1,37 @@
1
1
  "use strict";
2
2
  var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ var __objRest = (source, exclude) => {
24
+ var target = {};
25
+ for (var prop in source)
26
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
+ target[prop] = source[prop];
28
+ if (source != null && __getOwnPropSymbols)
29
+ for (var prop of __getOwnPropSymbols(source)) {
30
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
+ target[prop] = source[prop];
32
+ }
33
+ return target;
34
+ };
6
35
  var __export = (target, all) => {
7
36
  for (var name in all)
8
37
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -20,10 +49,37 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
49
  // src/atoms/card.tsx
21
50
  var card_exports = {};
22
51
  __export(card_exports, {
23
- Card: () => import_themes.Card
52
+ Card: () => Card
24
53
  });
25
54
  module.exports = __toCommonJS(card_exports);
55
+ var import_react = require("react");
26
56
  var import_themes = require("@radix-ui/themes");
57
+ var import_jsx_runtime = require("react/jsx-runtime");
58
+ var Card = (0, import_react.forwardRef)(
59
+ (props, forwardedRef) => {
60
+ const _a = props, { borderDisable, borderRadius } = _a, rest = __objRest(_a, ["borderDisable", "borderRadius"]);
61
+ const borderInsetClassName = (0, import_react.useMemo)(() => {
62
+ if (!borderDisable)
63
+ return "";
64
+ const { left, right, top, bottom } = borderDisable;
65
+ return [
66
+ left && "disable-inset-left",
67
+ right && "disable-inset-right",
68
+ top && "disable-inset-top",
69
+ bottom && "disable-inset-bottom"
70
+ ].filter(Boolean).join(" ");
71
+ }, [borderDisable]);
72
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
73
+ import_themes.Card,
74
+ __spreadProps(__spreadValues({}, rest), {
75
+ className: `${borderInsetClassName} ${rest.className}`,
76
+ "data-radius": borderRadius,
77
+ ref: forwardedRef
78
+ })
79
+ );
80
+ }
81
+ );
82
+ Card.displayName = "Card";
27
83
  // Annotate the CommonJS export names for ESM import in node:
28
84
  0 && (module.exports = {
29
85
  Card
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/atoms/card.tsx"],"sourcesContent":["export { Card, type CardProps } from '@radix-ui/themes';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAqC;","names":[]}
1
+ {"version":3,"sources":["../../src/atoms/card.tsx"],"sourcesContent":["import { forwardRef, useMemo } from 'react';\nimport {\n Card as RadixCard,\n type CardProps as RadixCardProps,\n} from '@radix-ui/themes';\n\nexport type CardProps = RadixCardProps & {\n borderRadius?: 'none';\n borderDisable?: {\n left?: boolean;\n right?: boolean;\n top?: boolean;\n bottom?: boolean;\n };\n};\n\nexport const Card = forwardRef<HTMLDivElement, CardProps>(\n (props, forwardedRef) => {\n const { borderDisable, borderRadius, ...rest } = props;\n\n const borderInsetClassName = useMemo(() => {\n if (!borderDisable) return '';\n const { left, right, top, bottom } = borderDisable;\n return [\n left && 'disable-inset-left',\n right && 'disable-inset-right',\n top && 'disable-inset-top',\n bottom && 'disable-inset-bottom',\n ]\n .filter(Boolean)\n .join(' ');\n }, [borderDisable]);\n\n return (\n <RadixCard\n {...rest}\n className={`${borderInsetClassName} ${rest.className}`}\n data-radius={borderRadius}\n ref={forwardedRef}\n />\n );\n }\n);\n\nCard.displayName = 'Card';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAoC;AACpC,oBAGO;AA8BD;AAlBC,IAAM,WAAO;AAAA,EAClB,CAAC,OAAO,iBAAiB;AACvB,UAAiD,YAAzC,iBAAe,aAlB3B,IAkBqD,IAAT,iBAAS,IAAT,CAAhC,iBAAe;AAEvB,UAAM,2BAAuB,sBAAQ,MAAM;AACzC,UAAI,CAAC;AAAe,eAAO;AAC3B,YAAM,EAAE,MAAM,OAAO,KAAK,OAAO,IAAI;AACrC,aAAO;AAAA,QACL,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,OAAO;AAAA,QACP,UAAU;AAAA,MACZ,EACG,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,IACb,GAAG,CAAC,aAAa,CAAC;AAElB,WACE;AAAA,MAAC,cAAAA;AAAA,MAAA,iCACK,OADL;AAAA,QAEC,WAAW,GAAG,oBAAoB,IAAI,KAAK,SAAS;AAAA,QACpD,eAAa;AAAA,QACb,KAAK;AAAA;AAAA,IACP;AAAA,EAEJ;AACF;AAEA,KAAK,cAAc;","names":["RadixCard"]}
@@ -1 +1,23 @@
1
- export { Card, CardProps } from '@radix-ui/themes';
1
+ import * as React from 'react';
2
+ import { CardProps as CardProps$1 } from '@radix-ui/themes';
3
+
4
+ type CardProps = CardProps$1 & {
5
+ borderRadius?: 'none';
6
+ borderDisable?: {
7
+ left?: boolean;
8
+ right?: boolean;
9
+ top?: boolean;
10
+ bottom?: boolean;
11
+ };
12
+ };
13
+ declare const Card: React.ForwardRefExoticComponent<CardProps$1 & {
14
+ borderRadius?: "none" | undefined;
15
+ borderDisable?: {
16
+ left?: boolean | undefined;
17
+ right?: boolean | undefined;
18
+ top?: boolean | undefined;
19
+ bottom?: boolean | undefined;
20
+ } | undefined;
21
+ } & React.RefAttributes<HTMLDivElement>>;
22
+
23
+ export { Card, type CardProps };
@@ -1 +1,23 @@
1
- export { Card, CardProps } from '@radix-ui/themes';
1
+ import * as React from 'react';
2
+ import { CardProps as CardProps$1 } from '@radix-ui/themes';
3
+
4
+ type CardProps = CardProps$1 & {
5
+ borderRadius?: 'none';
6
+ borderDisable?: {
7
+ left?: boolean;
8
+ right?: boolean;
9
+ top?: boolean;
10
+ bottom?: boolean;
11
+ };
12
+ };
13
+ declare const Card: React.ForwardRefExoticComponent<CardProps$1 & {
14
+ borderRadius?: "none" | undefined;
15
+ borderDisable?: {
16
+ left?: boolean | undefined;
17
+ right?: boolean | undefined;
18
+ top?: boolean | undefined;
19
+ bottom?: boolean | undefined;
20
+ } | undefined;
21
+ } & React.RefAttributes<HTMLDivElement>>;
22
+
23
+ export { Card, type CardProps };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Card
3
- } from "../chunk-FYEASFUU.js";
3
+ } from "../chunk-CAIVA7UA.js";
4
4
  import "../chunk-N552FDTV.js";
5
5
  export {
6
6
  Card
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  FieldErrorWrapper
3
- } from "../chunk-CHHLIPDN.js";
4
- import "../chunk-25HMMI7R.js";
3
+ } from "../chunk-CNQ7RNNY.js";
5
4
  import "../chunk-O3XTRD7R.js";
5
+ import "../chunk-25HMMI7R.js";
6
6
  import "../chunk-N552FDTV.js";
7
7
  export {
8
8
  FieldErrorWrapper
@@ -67,7 +67,7 @@ __export(atoms_exports, {
67
67
  Box: () => import_themes6.Box,
68
68
  Button: () => Button,
69
69
  Callout: () => import_themes8.Callout,
70
- Card: () => import_themes9.Card,
70
+ Card: () => Card,
71
71
  Checkbox: () => Checkbox,
72
72
  CheckboxCards: () => import_themes11.CheckboxCards,
73
73
  CheckboxGroup: () => CheckboxGroup,
@@ -221,16 +221,43 @@ Button.displayName = "Button";
221
221
  var import_themes8 = require("@radix-ui/themes");
222
222
 
223
223
  // src/atoms/card.tsx
224
+ var import_react4 = require("react");
224
225
  var import_themes9 = require("@radix-ui/themes");
226
+ var import_jsx_runtime4 = require("react/jsx-runtime");
227
+ var Card = (0, import_react4.forwardRef)(
228
+ (props, forwardedRef) => {
229
+ const _a = props, { borderDisable, borderRadius } = _a, rest = __objRest(_a, ["borderDisable", "borderRadius"]);
230
+ const borderInsetClassName = (0, import_react4.useMemo)(() => {
231
+ if (!borderDisable)
232
+ return "";
233
+ const { left, right, top, bottom } = borderDisable;
234
+ return [
235
+ left && "disable-inset-left",
236
+ right && "disable-inset-right",
237
+ top && "disable-inset-top",
238
+ bottom && "disable-inset-bottom"
239
+ ].filter(Boolean).join(" ");
240
+ }, [borderDisable]);
241
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
242
+ import_themes9.Card,
243
+ __spreadProps(__spreadValues({}, rest), {
244
+ className: `${borderInsetClassName} ${rest.className}`,
245
+ "data-radius": borderRadius,
246
+ ref: forwardedRef
247
+ })
248
+ );
249
+ }
250
+ );
251
+ Card.displayName = "Card";
225
252
 
226
253
  // src/atoms/check-box.tsx
227
254
  var import_themes10 = require("@radix-ui/themes");
228
- var import_react4 = require("react");
229
- var import_jsx_runtime4 = require("react/jsx-runtime");
230
- var Checkbox = (0, import_react4.forwardRef)(
255
+ var import_react5 = require("react");
256
+ var import_jsx_runtime5 = require("react/jsx-runtime");
257
+ var Checkbox = (0, import_react5.forwardRef)(
231
258
  (props, ref) => {
232
259
  const _a = props, { size = "medium" } = _a, rest = __objRest(_a, ["size"]);
233
- const radixSize = (0, import_react4.useMemo)(() => {
260
+ const radixSize = (0, import_react5.useMemo)(() => {
234
261
  switch (size) {
235
262
  case "small":
236
263
  return "1";
@@ -240,7 +267,7 @@ var Checkbox = (0, import_react4.forwardRef)(
240
267
  return "3";
241
268
  }
242
269
  }, [size]);
243
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_themes10.Checkbox, __spreadProps(__spreadValues({}, rest), { ref, size: radixSize }));
270
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_themes10.Checkbox, __spreadProps(__spreadValues({}, rest), { ref, size: radixSize }));
244
271
  }
245
272
  );
246
273
  Checkbox.displayName = "Checkbox";
@@ -250,11 +277,11 @@ var import_themes11 = require("@radix-ui/themes");
250
277
 
251
278
  // src/atoms/check-box-group.tsx
252
279
  var import_themes12 = require("@radix-ui/themes");
253
- var import_react5 = require("react");
254
- var import_jsx_runtime5 = require("react/jsx-runtime");
255
- var Root = (0, import_react5.forwardRef)((props, ref) => {
280
+ var import_react6 = require("react");
281
+ var import_jsx_runtime6 = require("react/jsx-runtime");
282
+ var Root = (0, import_react6.forwardRef)((props, ref) => {
256
283
  const _a = props, { children, size } = _a, rest = __objRest(_a, ["children", "size"]);
257
- const groupSize = (0, import_react5.useMemo)(() => {
284
+ const groupSize = (0, import_react6.useMemo)(() => {
258
285
  switch (size) {
259
286
  case "small":
260
287
  return "1";
@@ -265,7 +292,7 @@ var Root = (0, import_react5.forwardRef)((props, ref) => {
265
292
  return "2";
266
293
  }
267
294
  }, [size]);
268
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_themes12.CheckboxGroup.Root, __spreadProps(__spreadValues({}, rest), { ref, size: groupSize, children }));
295
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_themes12.CheckboxGroup.Root, __spreadProps(__spreadValues({}, rest), { ref, size: groupSize, children }));
269
296
  });
270
297
  Root.displayName = "CheckboxGroup.Root";
271
298
  var CheckboxGroup = {
@@ -299,12 +326,12 @@ var import_themes20 = require("@radix-ui/themes");
299
326
 
300
327
  // src/atoms/heading.tsx
301
328
  var import_themes21 = require("@radix-ui/themes");
302
- var import_react6 = require("react");
329
+ var import_react7 = require("react");
303
330
  var import_themes22 = require("@radix-ui/themes");
304
- var import_jsx_runtime6 = require("react/jsx-runtime");
331
+ var import_jsx_runtime7 = require("react/jsx-runtime");
305
332
  function Heading2(props) {
306
333
  const _a = props, { size, children, variant } = _a, rest = __objRest(_a, ["size", "children", "variant"]);
307
- const radixSize = (0, import_react6.useMemo)(() => {
334
+ const radixSize = (0, import_react7.useMemo)(() => {
308
335
  switch (variant) {
309
336
  case "subtitle1":
310
337
  return "4";
@@ -318,7 +345,7 @@ function Heading2(props) {
318
345
  return size;
319
346
  }
320
347
  }, [size, variant]);
321
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_themes21.Heading, __spreadProps(__spreadValues({}, rest), { size: radixSize, children }));
348
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_themes21.Heading, __spreadProps(__spreadValues({}, rest), { size: radixSize, children }));
322
349
  }
323
350
 
324
351
  // src/atoms/hover-card.tsx
@@ -335,12 +362,12 @@ var import_themes26 = require("@radix-ui/themes");
335
362
 
336
363
  // src/atoms/link.tsx
337
364
  var import_themes27 = require("@radix-ui/themes");
338
- var import_react7 = require("react");
365
+ var import_react8 = require("react");
339
366
  var import_themes28 = require("@radix-ui/themes");
340
- var import_jsx_runtime7 = require("react/jsx-runtime");
367
+ var import_jsx_runtime8 = require("react/jsx-runtime");
341
368
  function Link(props) {
342
369
  const _a = props, { size, children, variant } = _a, rest = __objRest(_a, ["size", "children", "variant"]);
343
- const radixSize = (0, import_react7.useMemo)(() => {
370
+ const radixSize = (0, import_react8.useMemo)(() => {
344
371
  switch (variant) {
345
372
  case "caption":
346
373
  return "1";
@@ -352,7 +379,7 @@ function Link(props) {
352
379
  return size;
353
380
  }
354
381
  }, [size, variant]);
355
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_themes27.Link, __spreadProps(__spreadValues({}, rest), { size: radixSize, children }));
382
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_themes27.Link, __spreadProps(__spreadValues({}, rest), { size: radixSize, children }));
356
383
  }
357
384
 
358
385
  // src/atoms/popover.tsx
@@ -408,12 +435,12 @@ var import_themes45 = require("@radix-ui/themes");
408
435
 
409
436
  // src/atoms/typo.tsx
410
437
  var import_themes46 = require("@radix-ui/themes");
411
- var import_react8 = require("react");
412
- var import_jsx_runtime8 = require("react/jsx-runtime");
413
- var Typo = (0, import_react8.forwardRef)(
438
+ var import_react9 = require("react");
439
+ var import_jsx_runtime9 = require("react/jsx-runtime");
440
+ var Typo = (0, import_react9.forwardRef)(
414
441
  (props, ref) => {
415
442
  const _a = props, { size, variant, children } = _a, rest = __objRest(_a, ["size", "variant", "children"]);
416
- const radixSize = (0, import_react8.useMemo)(() => {
443
+ const radixSize = (0, import_react9.useMemo)(() => {
417
444
  if (size !== void 0)
418
445
  return size;
419
446
  switch (variant) {
@@ -426,7 +453,7 @@ var Typo = (0, import_react8.forwardRef)(
426
453
  return "2";
427
454
  }
428
455
  }, [size, variant]);
429
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_themes46.Text, __spreadProps(__spreadValues({}, rest), { ref, size: radixSize, children }));
456
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_themes46.Text, __spreadProps(__spreadValues({}, rest), { ref, size: radixSize, children }));
430
457
  }
431
458
  );
432
459
  Typo.displayName = "Typo";
@@ -438,43 +465,43 @@ var import_themes47 = require("@radix-ui/themes");
438
465
  var import_themes48 = require("@radix-ui/themes");
439
466
 
440
467
  // src/atoms/collapse.tsx
441
- var import_react9 = require("react");
442
- var import_jsx_runtime9 = require("react/jsx-runtime");
468
+ var import_react10 = require("react");
469
+ var import_jsx_runtime10 = require("react/jsx-runtime");
443
470
  function Collapse(props) {
444
471
  const { children, closedHeight = "0" } = props;
445
- const [open, setOpen] = (0, import_react9.useState)(() => {
472
+ const [open, setOpen] = (0, import_react10.useState)(() => {
446
473
  return props.open || props.defaultOpen || false;
447
474
  });
448
- (0, import_react9.useEffect)(() => {
475
+ (0, import_react10.useEffect)(() => {
449
476
  if (props.open === void 0)
450
477
  return;
451
478
  setOpen(props.open);
452
479
  }, [props.open]);
453
- const ref = (0, import_react9.useRef)(null);
454
- (0, import_react9.useEffect)(() => {
480
+ const ref = (0, import_react10.useRef)(null);
481
+ (0, import_react10.useEffect)(() => {
455
482
  if (!ref.current)
456
483
  return;
457
484
  ref.current.style.maxHeight = open ? `${ref.current.scrollHeight}px` : closedHeight;
458
485
  }, [closedHeight, open]);
459
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "collapse", ref, children });
486
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "collapse", ref, children });
460
487
  }
461
488
 
462
489
  // src/atoms/spinner.tsx
463
490
  var import_themes49 = require("@radix-ui/themes");
464
491
 
465
492
  // src/atoms/pagination.tsx
466
- var import_react10 = require("react");
493
+ var import_react11 = require("react");
467
494
 
468
495
  // src/icon.ts
469
496
  var import_react_icons = require("@radix-ui/react-icons");
470
497
 
471
498
  // src/atoms/pagination.tsx
472
- var import_jsx_runtime10 = require("react/jsx-runtime");
499
+ var import_jsx_runtime11 = require("react/jsx-runtime");
473
500
  function Pagination(props) {
474
501
  const { onChange, count = 0 } = props;
475
502
  const siblingCount = 2;
476
- const [page, setPage] = (0, import_react10.useState)(() => props.page || props.defaultPage || 1);
477
- const visibleItems = (0, import_react10.useMemo)(() => {
503
+ const [page, setPage] = (0, import_react11.useState)(() => props.page || props.defaultPage || 1);
504
+ const visibleItems = (0, import_react11.useMemo)(() => {
478
505
  let start = Math.max(1, page - siblingCount);
479
506
  let end = Math.min(count, page + siblingCount);
480
507
  if (page - siblingCount <= 0 && end < count) {
@@ -484,18 +511,18 @@ function Pagination(props) {
484
511
  }
485
512
  return Array.from({ length: end - start + 1 }, (_, i) => i + start);
486
513
  }, [count, page]);
487
- (0, import_react10.useEffect)(() => {
514
+ (0, import_react11.useEffect)(() => {
488
515
  onChange == null ? void 0 : onChange(page);
489
516
  }, [onChange, page]);
490
- (0, import_react10.useEffect)(() => {
517
+ (0, import_react11.useEffect)(() => {
491
518
  if (props.page) {
492
519
  setPage(props.page);
493
520
  }
494
521
  }, [props.page]);
495
- const onClickPrev = (0, import_react10.useCallback)(() => {
522
+ const onClickPrev = (0, import_react11.useCallback)(() => {
496
523
  setPage((prev) => Math.max(1, prev - 1));
497
524
  }, []);
498
- const onClickNext = (0, import_react10.useCallback)(() => {
525
+ const onClickNext = (0, import_react11.useCallback)(() => {
499
526
  setPage((prev) => Math.min(count, prev + 1));
500
527
  }, [count]);
501
528
  const moveButtonProps = {
@@ -507,24 +534,24 @@ function Pagination(props) {
507
534
  height: 24,
508
535
  width: 24
509
536
  };
510
- const prevDisabled = (0, import_react10.useMemo)(() => {
537
+ const prevDisabled = (0, import_react11.useMemo)(() => {
511
538
  return page - siblingCount <= 1;
512
539
  }, [page]);
513
- const nextDisabled = (0, import_react10.useMemo)(() => {
540
+ const nextDisabled = (0, import_react11.useMemo)(() => {
514
541
  return page + siblingCount >= count;
515
542
  }, [count, page]);
516
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_themes19.Flex, { align: "center", className: "tipp-pagination", gap: "4", children: [
517
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
543
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_themes19.Flex, { align: "center", className: "tipp-pagination", gap: "4", children: [
544
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
518
545
  import_themes24.IconButton,
519
546
  __spreadProps(__spreadValues({
520
547
  disabled: prevDisabled,
521
548
  onClick: onClickPrev
522
549
  }, moveButtonProps), {
523
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_icons.ChevronLeftIcon, __spreadValues({}, iconSize))
550
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_icons.ChevronLeftIcon, __spreadValues({}, iconSize))
524
551
  })
525
552
  ),
526
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_themes19.Flex, { gap: "1", children: visibleItems.map((item) => {
527
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
553
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_themes19.Flex, { gap: "1", children: visibleItems.map((item) => {
554
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
528
555
  "button",
529
556
  {
530
557
  className: `page-button ${item === page ? "active" : ""}`,
@@ -532,45 +559,45 @@ function Pagination(props) {
532
559
  setPage(item);
533
560
  },
534
561
  type: "button",
535
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Typo, { variant: "body", children: item })
562
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Typo, { variant: "body", children: item })
536
563
  },
537
564
  item
538
565
  );
539
566
  }) }),
540
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
567
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
541
568
  import_themes24.IconButton,
542
569
  __spreadProps(__spreadValues({
543
570
  disabled: nextDisabled,
544
571
  onClick: onClickNext
545
572
  }, moveButtonProps), {
546
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_icons.ChevronRightIcon, __spreadValues({}, iconSize))
573
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_icons.ChevronRightIcon, __spreadValues({}, iconSize))
547
574
  })
548
575
  )
549
576
  ] });
550
577
  }
551
578
 
552
579
  // src/atoms/field-error-wrapper.tsx
553
- var import_jsx_runtime11 = require("react/jsx-runtime");
580
+ var import_jsx_runtime12 = require("react/jsx-runtime");
554
581
  function FieldErrorWrapper({
555
582
  children,
556
583
  error
557
584
  }) {
558
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_themes19.Flex, { direction: "column", gap: "1", children: [
585
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_themes19.Flex, { direction: "column", gap: "1", children: [
559
586
  children,
560
- error ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Typo, { color: "red", variant: "caption", children: error }) : null
587
+ error ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Typo, { color: "red", variant: "caption", children: error }) : null
561
588
  ] });
562
589
  }
563
590
 
564
591
  // src/atoms/ellipsis-tooltip.tsx
565
- var import_react11 = require("react");
566
- var import_jsx_runtime12 = require("react/jsx-runtime");
592
+ var import_react12 = require("react");
593
+ var import_jsx_runtime13 = require("react/jsx-runtime");
567
594
  function EllipsisTooltip(props) {
568
595
  const _a = props, { children, style, lineClamp = 2 } = _a, rest = __objRest(_a, ["children", "style", "lineClamp"]);
569
- const ref = (0, import_react11.useRef)(null);
570
- const [tooltipDisplay, setTooltipDisplay] = (0, import_react11.useState)(
596
+ const ref = (0, import_react12.useRef)(null);
597
+ const [tooltipDisplay, setTooltipDisplay] = (0, import_react12.useState)(
571
598
  "none"
572
599
  );
573
- (0, import_react11.useEffect)(() => {
600
+ (0, import_react12.useEffect)(() => {
574
601
  if (ref.current) {
575
602
  const typo = ref.current;
576
603
  const mouseOver = () => {
@@ -585,7 +612,7 @@ function EllipsisTooltip(props) {
585
612
  ref.current.addEventListener("mouseleave", mouseOut);
586
613
  }
587
614
  }, [children]);
588
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_themes48.Tooltip, { content: children, style: { display: tooltipDisplay }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
615
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_themes48.Tooltip, { content: children, style: { display: tooltipDisplay }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
589
616
  Typo,
590
617
  __spreadProps(__spreadValues({}, rest), {
591
618
  ref,
@@ -608,21 +635,21 @@ var Dialog2 = __toESM(require("@radix-ui/react-dialog"), 1);
608
635
 
609
636
  // src/theme/theme-provider.tsx
610
637
  var import_themes50 = require("@radix-ui/themes");
611
- var import_jsx_runtime13 = require("react/jsx-runtime");
638
+ var import_jsx_runtime14 = require("react/jsx-runtime");
612
639
  function ThemeProvider(props) {
613
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_themes50.Theme, __spreadValues({ accentColor: "iris", radius: "large" }, props));
640
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_themes50.Theme, __spreadValues({ accentColor: "iris", radius: "large" }, props));
614
641
  }
615
642
 
616
643
  // src/atoms/toast.tsx
617
644
  var import_react_icons2 = require("@radix-ui/react-icons");
618
645
  var import_react_toastify = require("react-toastify");
619
646
  var import_react_toastify2 = require("react-toastify");
620
- var import_jsx_runtime14 = require("react/jsx-runtime");
647
+ var import_jsx_runtime15 = require("react/jsx-runtime");
621
648
  function CloseButton({ closeToast }) {
622
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_themes24.IconButton, { color: "gray", onClick: closeToast, variant: "ghost", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_icons2.Cross1Icon, {}) });
649
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_themes24.IconButton, { color: "gray", onClick: closeToast, variant: "ghost", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_icons2.Cross1Icon, {}) });
623
650
  }
624
651
  function ToastContainer(props) {
625
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
652
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
626
653
  import_react_toastify.ToastContainer,
627
654
  __spreadValues({
628
655
  autoClose: 5e3,
@@ -640,25 +667,25 @@ function ToastContainer(props) {
640
667
  }
641
668
 
642
669
  // src/atoms/drawer.tsx
643
- var import_jsx_runtime15 = require("react/jsx-runtime");
670
+ var import_jsx_runtime16 = require("react/jsx-runtime");
644
671
  function Root3(props) {
645
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Dialog2.Root, __spreadValues({}, props));
672
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Dialog2.Root, __spreadValues({}, props));
646
673
  }
647
674
  function Content2(props) {
648
675
  const _a = props, { position = "right", className } = _a, rest = __objRest(_a, ["position", "className"]);
649
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Dialog2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(ThemeProvider, { children: [
650
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Dialog2.Overlay, { className: "DrawerOverlay" }),
651
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
676
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Dialog2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(ThemeProvider, { children: [
677
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Dialog2.Overlay, { className: "DrawerOverlay" }),
678
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
652
679
  Dialog2.Content,
653
680
  __spreadValues({
654
681
  className: `DrawerContent ${position} ${className || ""}`
655
682
  }, rest)
656
683
  ),
657
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ToastContainer, {})
684
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ToastContainer, {})
658
685
  ] }) });
659
686
  }
660
687
  function Trigger2(props) {
661
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Dialog2.Trigger, __spreadValues({ asChild: true }, props));
688
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Dialog2.Trigger, __spreadValues({ asChild: true }, props));
662
689
  }
663
690
  var Drawer = {
664
691
  Root: Dialog2.Root,
@@ -671,12 +698,12 @@ var Drawer = {
671
698
 
672
699
  // src/atoms/form.tsx
673
700
  var RadixForm = __toESM(require("@radix-ui/react-form"), 1);
674
- var import_react12 = require("react");
675
- var import_jsx_runtime16 = require("react/jsx-runtime");
676
- var Root5 = (0, import_react12.forwardRef)(
701
+ var import_react13 = require("react");
702
+ var import_jsx_runtime17 = require("react/jsx-runtime");
703
+ var Root5 = (0, import_react13.forwardRef)(
677
704
  (_a, ref) => {
678
705
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
679
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
706
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
680
707
  RadixForm.Root,
681
708
  __spreadProps(__spreadValues({}, rest), {
682
709
  className: `FormRoot ${className || ""}`,
@@ -687,10 +714,10 @@ var Root5 = (0, import_react12.forwardRef)(
687
714
  }
688
715
  );
689
716
  Root5.displayName = "FORM_ROOT";
690
- var Field2 = (0, import_react12.forwardRef)(
717
+ var Field2 = (0, import_react13.forwardRef)(
691
718
  (_a, ref) => {
692
719
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
693
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
720
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
694
721
  RadixForm.Field,
695
722
  __spreadProps(__spreadValues({}, rest), {
696
723
  className: `FormField ${className || ""}`,
@@ -701,10 +728,10 @@ var Field2 = (0, import_react12.forwardRef)(
701
728
  }
702
729
  );
703
730
  Field2.displayName = "FORM_FIELD";
704
- var Label2 = (0, import_react12.forwardRef)(
731
+ var Label2 = (0, import_react13.forwardRef)(
705
732
  (_a, ref) => {
706
733
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
707
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
734
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
708
735
  RadixForm.Label,
709
736
  __spreadProps(__spreadValues({}, rest), {
710
737
  className: `FormLabel ${className || ""}`,
@@ -715,10 +742,10 @@ var Label2 = (0, import_react12.forwardRef)(
715
742
  }
716
743
  );
717
744
  Label2.displayName = "FORM_Label";
718
- var Message2 = (0, import_react12.forwardRef)(
745
+ var Message2 = (0, import_react13.forwardRef)(
719
746
  (_a, ref) => {
720
747
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
721
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
748
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
722
749
  RadixForm.Message,
723
750
  __spreadProps(__spreadValues({}, rest), {
724
751
  className: `FormMessage ${className || ""}`,