@tipp/ui 1.4.15 → 1.4.17

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 (72) hide show
  1. package/dist/atoms/index.cjs +130 -97
  2. package/dist/atoms/index.cjs.map +1 -1
  3. package/dist/atoms/index.d.cts +3 -1
  4. package/dist/atoms/index.d.ts +3 -1
  5. package/dist/atoms/index.js +32 -32
  6. package/dist/atoms/pagination.js +2 -2
  7. package/dist/atoms/text-area.cjs +47 -1
  8. package/dist/atoms/text-area.cjs.map +1 -1
  9. package/dist/atoms/text-area.d.cts +11 -1
  10. package/dist/atoms/text-area.d.ts +11 -1
  11. package/dist/atoms/text-area.js +1 -1
  12. package/dist/atoms/text-field.cjs +43 -1
  13. package/dist/atoms/text-field.cjs.map +1 -1
  14. package/dist/atoms/text-field.d.cts +15 -1
  15. package/dist/atoms/text-field.d.ts +15 -1
  16. package/dist/atoms/text-field.js +1 -1
  17. package/dist/chunk-2LJ7CD62.js +340 -0
  18. package/dist/chunk-2LJ7CD62.js.map +1 -0
  19. package/dist/chunk-3ADRZ7OH.js +27 -0
  20. package/dist/chunk-3ADRZ7OH.js.map +1 -0
  21. package/dist/chunk-3KFECMWE.js +97 -0
  22. package/dist/chunk-3KFECMWE.js.map +1 -0
  23. package/dist/chunk-7UNNTQPU.js +28 -0
  24. package/dist/chunk-7UNNTQPU.js.map +1 -0
  25. package/dist/chunk-AP2MXJOW.js +164 -0
  26. package/dist/chunk-AP2MXJOW.js.map +1 -0
  27. package/dist/chunk-CJDUEQIT.js +169 -0
  28. package/dist/chunk-CJDUEQIT.js.map +1 -0
  29. package/dist/chunk-DDBXZ3IQ.js +28 -0
  30. package/dist/chunk-DDBXZ3IQ.js.map +1 -0
  31. package/dist/chunk-EXC5RUGV.js +20 -0
  32. package/dist/chunk-EXC5RUGV.js.map +1 -0
  33. package/dist/chunk-EZEZH6DF.js +29 -0
  34. package/dist/chunk-EZEZH6DF.js.map +1 -0
  35. package/dist/chunk-GJ6NEBI5.js +340 -0
  36. package/dist/chunk-GJ6NEBI5.js.map +1 -0
  37. package/dist/chunk-KQDTZZMT.js +29 -0
  38. package/dist/chunk-KQDTZZMT.js.map +1 -0
  39. package/dist/chunk-LZYIGZTE.js +164 -0
  40. package/dist/chunk-LZYIGZTE.js.map +1 -0
  41. package/dist/chunk-R4JVUEWZ.js +32 -0
  42. package/dist/chunk-R4JVUEWZ.js.map +1 -0
  43. package/dist/chunk-RJIYLM7M.js +32 -0
  44. package/dist/chunk-RJIYLM7M.js.map +1 -0
  45. package/dist/chunk-RT5L7IEL.js +29 -0
  46. package/dist/chunk-RT5L7IEL.js.map +1 -0
  47. package/dist/chunk-SHFRE4AI.js +340 -0
  48. package/dist/chunk-SHFRE4AI.js.map +1 -0
  49. package/dist/chunk-TTYPIX4R.js +32 -0
  50. package/dist/chunk-TTYPIX4R.js.map +1 -0
  51. package/dist/chunk-VIXDNPET.js +28 -0
  52. package/dist/chunk-VIXDNPET.js.map +1 -0
  53. package/dist/chunk-YY45YYJE.js +28 -0
  54. package/dist/chunk-YY45YYJE.js.map +1 -0
  55. package/dist/index.cjs +287 -254
  56. package/dist/index.cjs.map +1 -1
  57. package/dist/index.d.cts +3 -1
  58. package/dist/index.d.ts +3 -1
  59. package/dist/index.js +62 -62
  60. package/dist/molecules/date-picker/index.js +3 -3
  61. package/dist/molecules/expand-table/index.js +18 -18
  62. package/dist/molecules/expand-table/row.js +15 -15
  63. package/dist/molecules/form.d.cts +1 -1
  64. package/dist/molecules/form.d.ts +1 -1
  65. package/dist/molecules/index.js +24 -24
  66. package/dist/molecules/learning-post.js +5 -5
  67. package/dist/molecules/navigation.js +16 -16
  68. package/dist/molecules/stepper.js +2 -2
  69. package/dist/molecules/tag-selector.js +16 -16
  70. package/package.json +3 -3
  71. package/src/atoms/text-area.tsx +32 -1
  72. package/src/atoms/text-field.tsx +29 -1
@@ -1,14 +1,15 @@
1
1
  import {
2
2
  TagSelector
3
- } from "../chunk-IKUXA6XG.js";
3
+ } from "../chunk-OKN5AK5Z.js";
4
4
  import "../chunk-KTVZ4KLX.js";
5
+ import "../chunk-OHBL3CTQ.js";
5
6
  import "../chunk-FR2GDOU2.js";
6
7
  import "../chunk-74DX4CU7.js";
7
8
  import "../chunk-OYM4XCHQ.js";
8
9
  import "../chunk-YJ7ZFOYL.js";
9
10
  import "../chunk-5ZITU5L7.js";
10
- import "../chunk-ILRUXI2E.js";
11
- import "../chunk-JPIZP2PZ.js";
11
+ import "../chunk-TTYPIX4R.js";
12
+ import "../chunk-YY45YYJE.js";
12
13
  import "../chunk-CYYWMYE7.js";
13
14
  import "../chunk-6DJOIRMF.js";
14
15
  import "../chunk-FPD73OHW.js";
@@ -21,13 +22,16 @@ import "../chunk-5H3YPCZK.js";
21
22
  import "../chunk-XQOL7UBI.js";
22
23
  import "../chunk-TULWX7D6.js";
23
24
  import "../chunk-SIM6HKVI.js";
24
- import "../chunk-VKEZRJ2L.js";
25
+ import "../chunk-G6ITJNH2.js";
25
26
  import "../chunk-5AVBYDPB.js";
26
27
  import "../chunk-365QMK4D.js";
27
28
  import "../chunk-YO3BQW6S.js";
28
29
  import "../chunk-6IVCARWS.js";
29
30
  import "../chunk-2DZ2Y3JI.js";
30
31
  import "../chunk-DJN2IEY6.js";
32
+ import "../chunk-25HMMI7R.js";
33
+ import "../chunk-EGEQY3KT.js";
34
+ import "../chunk-HK224ADT.js";
31
35
  import "../chunk-O3T3TM3V.js";
32
36
  import "../chunk-O3DNDMV3.js";
33
37
  import "../chunk-OHMOP5PV.js";
@@ -39,27 +43,23 @@ import "../chunk-UC627KGO.js";
39
43
  import "../chunk-4WFMOFN2.js";
40
44
  import "../chunk-WKFZ5MMN.js";
41
45
  import "../chunk-ACVANQJ4.js";
46
+ import "../chunk-52MVZ6AN.js";
47
+ import "../chunk-4Y5BEXVN.js";
48
+ import "../chunk-U7JPP7WJ.js";
49
+ import "../chunk-LQY4RKWI.js";
42
50
  import "../chunk-ZD7MNMED.js";
43
51
  import "../chunk-B6XJN6EC.js";
44
52
  import "../chunk-UVKNLJDZ.js";
45
53
  import "../chunk-MIMJ7LON.js";
46
54
  import "../chunk-IQEEPHOY.js";
47
55
  import "../chunk-LHCDPZ5E.js";
56
+ import "../chunk-FWNTKFWE.js";
48
57
  import "../chunk-J242TTFH.js";
49
- import "../chunk-YJCCE5WP.js";
50
- import "../chunk-YGL6SWKN.js";
51
- import "../chunk-OHBL3CTQ.js";
52
- import "../chunk-EGEQY3KT.js";
53
- import "../chunk-4Y5BEXVN.js";
54
- import "../chunk-U7JPP7WJ.js";
55
58
  import "../chunk-EAXUQEO5.js";
56
- import "../chunk-EWD4AO5N.js";
57
- import "../chunk-HK224ADT.js";
59
+ import "../chunk-YJCCE5WP.js";
58
60
  import "../chunk-3SSSCLJ5.js";
59
- import "../chunk-25HMMI7R.js";
60
- import "../chunk-52MVZ6AN.js";
61
- import "../chunk-LQY4RKWI.js";
62
- import "../chunk-FWNTKFWE.js";
61
+ import "../chunk-EWD4AO5N.js";
62
+ import "../chunk-YGL6SWKN.js";
63
63
  import "../chunk-N552FDTV.js";
64
64
  export {
65
65
  TagSelector
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tipp/ui",
3
- "version": "1.4.15",
3
+ "version": "1.4.17",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -58,8 +58,8 @@
58
58
  "ts-node": "^10.9.2",
59
59
  "tsup": "^8.0.2",
60
60
  "typescript": "^5.3.3",
61
- "@tipp/typescript-config": "1.0.0",
62
- "@tipp/eslint-config": "1.0.0"
61
+ "@tipp/eslint-config": "1.0.0",
62
+ "@tipp/typescript-config": "1.0.0"
63
63
  },
64
64
  "scripts": {
65
65
  "build": "pnpm run build:js && pnpm run build:css",
@@ -1 +1,32 @@
1
- export { TextArea, type TextAreaProps } from '@radix-ui/themes';
1
+ import {
2
+ TextArea as RTextArea,
3
+ type TextAreaProps as RTextAreaProps,
4
+ } from '@radix-ui/themes';
5
+ import { forwardRef, useMemo } from 'react';
6
+
7
+ type TextAreaProps = RTextAreaProps & {
8
+ error?: boolean;
9
+ };
10
+
11
+ const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(
12
+ (props, ref) => {
13
+ const { error, style, ...rest } = props;
14
+ const fieldStyle = useMemo(() => {
15
+ if (!style && !error) return undefined;
16
+ const errorStyle = error
17
+ ? {
18
+ boxShadow:
19
+ 'inset 0 0 0 var(--text-area-border-width) var(--error-11)',
20
+ }
21
+ : {};
22
+
23
+ return { ...(style || {}), ...errorStyle };
24
+ }, [error, style]);
25
+
26
+ return <RTextArea {...rest} ref={ref} style={fieldStyle} />;
27
+ }
28
+ );
29
+
30
+ TextArea.displayName = 'TextArea';
31
+
32
+ export { TextArea, type TextAreaProps };
@@ -1 +1,29 @@
1
- export { TextField } from '@radix-ui/themes';
1
+ import { TextField as RTextField } from '@radix-ui/themes';
2
+ import { forwardRef, useMemo } from 'react';
3
+
4
+ type RSlotProps = RTextField.SlotProps;
5
+
6
+ type RootProps = RTextField.RootProps & { error?: boolean };
7
+
8
+ const Root = forwardRef<
9
+ HTMLInputElement,
10
+ RTextField.RootProps & { error?: boolean }
11
+ >((props, ref) => {
12
+ const { error, style, ...rest } = props;
13
+ const fieldStyle = useMemo(() => {
14
+ if (!style && !error) return undefined;
15
+ const errorStyle = {
16
+ boxShadow: 'inset 0 0 0 var(--text-field-border-width) var(--error-11)',
17
+ };
18
+
19
+ return { ...(style || {}), ...errorStyle };
20
+ }, [error, style]);
21
+ return <RTextField.Root ref={ref} style={fieldStyle} {...rest} />;
22
+ });
23
+
24
+ Root.displayName = 'TextField.Root';
25
+
26
+ const TextField = { Root, Slot: RTextField.Slot };
27
+
28
+ export { TextField };
29
+ export type { RootProps, RSlotProps as SlotProps };