@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 +1,45 @@
1
- export { Card, type CardProps } from '@radix-ui/themes';
1
+ import { forwardRef, useMemo } from 'react';
2
+ import {
3
+ Card as RadixCard,
4
+ type CardProps as RadixCardProps,
5
+ } from '@radix-ui/themes';
6
+
7
+ export type CardProps = RadixCardProps & {
8
+ borderRadius?: 'none';
9
+ borderDisable?: {
10
+ left?: boolean;
11
+ right?: boolean;
12
+ top?: boolean;
13
+ bottom?: boolean;
14
+ };
15
+ };
16
+
17
+ export const Card = forwardRef<HTMLDivElement, CardProps>(
18
+ (props, forwardedRef) => {
19
+ const { borderDisable, borderRadius, ...rest } = props;
20
+
21
+ const borderInsetClassName = useMemo(() => {
22
+ if (!borderDisable) return '';
23
+ const { left, right, top, bottom } = borderDisable;
24
+ return [
25
+ left && 'disable-inset-left',
26
+ right && 'disable-inset-right',
27
+ top && 'disable-inset-top',
28
+ bottom && 'disable-inset-bottom',
29
+ ]
30
+ .filter(Boolean)
31
+ .join(' ');
32
+ }, [borderDisable]);
33
+
34
+ return (
35
+ <RadixCard
36
+ {...rest}
37
+ className={`${borderInsetClassName} ${rest.className}`}
38
+ data-radius={borderRadius}
39
+ ref={forwardedRef}
40
+ />
41
+ );
42
+ }
43
+ );
44
+
45
+ Card.displayName = 'Card';