panelui-native 0.2.0 → 0.5.1

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 (106) hide show
  1. package/README.md +258 -0
  2. package/lib/module/components/accordion/index.js +312 -0
  3. package/lib/module/components/accordion/index.js.map +1 -0
  4. package/lib/module/components/alert/index.js +106 -13
  5. package/lib/module/components/alert/index.js.map +1 -1
  6. package/lib/module/components/avatar/index.js +58 -17
  7. package/lib/module/components/avatar/index.js.map +1 -1
  8. package/lib/module/components/badge/index.js +29 -8
  9. package/lib/module/components/badge/index.js.map +1 -1
  10. package/lib/module/components/button/index.js +87 -26
  11. package/lib/module/components/button/index.js.map +1 -1
  12. package/lib/module/components/checkbox/index.js +59 -18
  13. package/lib/module/components/checkbox/index.js.map +1 -1
  14. package/lib/module/components/empty-state/index.js +178 -0
  15. package/lib/module/components/empty-state/index.js.map +1 -0
  16. package/lib/module/components/frame/index.js +64 -13
  17. package/lib/module/components/frame/index.js.map +1 -1
  18. package/lib/module/components/input-group/index.js +132 -0
  19. package/lib/module/components/input-group/index.js.map +1 -0
  20. package/lib/module/components/label/index.js +117 -0
  21. package/lib/module/components/label/index.js.map +1 -0
  22. package/lib/module/components/progress/index.js +138 -0
  23. package/lib/module/components/progress/index.js.map +1 -0
  24. package/lib/module/components/steps/index.js +354 -0
  25. package/lib/module/components/steps/index.js.map +1 -0
  26. package/lib/module/components/tabs/index.js +9 -3
  27. package/lib/module/components/tabs/index.js.map +1 -1
  28. package/lib/module/components/timeline/index.js +633 -0
  29. package/lib/module/components/timeline/index.js.map +1 -0
  30. package/lib/module/components/toast/index.js +569 -0
  31. package/lib/module/components/toast/index.js.map +1 -0
  32. package/lib/module/components/toast/toast-store.js +81 -0
  33. package/lib/module/components/toast/toast-store.js.map +1 -0
  34. package/lib/module/components/typography/index.js +126 -0
  35. package/lib/module/components/typography/index.js.map +1 -0
  36. package/lib/module/icons/index.js +590 -8
  37. package/lib/module/icons/index.js.map +1 -1
  38. package/lib/module/index.js +11 -2
  39. package/lib/module/index.js.map +1 -1
  40. package/lib/module/providers/panel-ui-provider.js +2 -1
  41. package/lib/module/providers/panel-ui-provider.js.map +1 -1
  42. package/lib/module/theme/use-theme.js +90 -3
  43. package/lib/module/theme/use-theme.js.map +1 -1
  44. package/lib/typescript/src/components/accordion/index.d.ts +56 -0
  45. package/lib/typescript/src/components/accordion/index.d.ts.map +1 -0
  46. package/lib/typescript/src/components/alert/index.d.ts +56 -4
  47. package/lib/typescript/src/components/alert/index.d.ts.map +1 -1
  48. package/lib/typescript/src/components/avatar/index.d.ts +8 -1
  49. package/lib/typescript/src/components/avatar/index.d.ts.map +1 -1
  50. package/lib/typescript/src/components/badge/index.d.ts +38 -0
  51. package/lib/typescript/src/components/badge/index.d.ts.map +1 -1
  52. package/lib/typescript/src/components/button/index.d.ts +57 -0
  53. package/lib/typescript/src/components/button/index.d.ts.map +1 -1
  54. package/lib/typescript/src/components/checkbox/index.d.ts +50 -0
  55. package/lib/typescript/src/components/checkbox/index.d.ts.map +1 -1
  56. package/lib/typescript/src/components/empty-state/index.d.ts +73 -0
  57. package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -0
  58. package/lib/typescript/src/components/frame/index.d.ts +39 -5
  59. package/lib/typescript/src/components/frame/index.d.ts.map +1 -1
  60. package/lib/typescript/src/components/input-group/index.d.ts +34 -0
  61. package/lib/typescript/src/components/input-group/index.d.ts.map +1 -0
  62. package/lib/typescript/src/components/label/index.d.ts +28 -0
  63. package/lib/typescript/src/components/label/index.d.ts.map +1 -0
  64. package/lib/typescript/src/components/progress/index.d.ts +132 -0
  65. package/lib/typescript/src/components/progress/index.d.ts.map +1 -0
  66. package/lib/typescript/src/components/steps/index.d.ts +62 -0
  67. package/lib/typescript/src/components/steps/index.d.ts.map +1 -0
  68. package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
  69. package/lib/typescript/src/components/timeline/index.d.ts +96 -0
  70. package/lib/typescript/src/components/timeline/index.d.ts.map +1 -0
  71. package/lib/typescript/src/components/toast/index.d.ts +176 -0
  72. package/lib/typescript/src/components/toast/index.d.ts.map +1 -0
  73. package/lib/typescript/src/components/toast/toast-store.d.ts +65 -0
  74. package/lib/typescript/src/components/toast/toast-store.d.ts.map +1 -0
  75. package/lib/typescript/src/components/typography/index.d.ts +77 -0
  76. package/lib/typescript/src/components/typography/index.d.ts.map +1 -0
  77. package/lib/typescript/src/icons/index.d.ts +60 -0
  78. package/lib/typescript/src/icons/index.d.ts.map +1 -1
  79. package/lib/typescript/src/index.d.ts +13 -4
  80. package/lib/typescript/src/index.d.ts.map +1 -1
  81. package/lib/typescript/src/providers/panel-ui-provider.d.ts.map +1 -1
  82. package/lib/typescript/src/theme/use-theme.d.ts +64 -4
  83. package/lib/typescript/src/theme/use-theme.d.ts.map +1 -1
  84. package/package.json +22 -4
  85. package/src/components/accordion/index.tsx +344 -0
  86. package/src/components/alert/index.tsx +102 -16
  87. package/src/components/avatar/index.tsx +68 -20
  88. package/src/components/badge/index.tsx +38 -9
  89. package/src/components/button/index.tsx +102 -19
  90. package/src/components/checkbox/index.tsx +64 -12
  91. package/src/components/empty-state/index.tsx +136 -0
  92. package/src/components/frame/index.tsx +101 -31
  93. package/src/components/input-group/index.tsx +164 -0
  94. package/src/components/label/index.tsx +128 -0
  95. package/src/components/progress/index.tsx +147 -0
  96. package/src/components/steps/index.tsx +343 -0
  97. package/src/components/tabs/index.tsx +10 -2
  98. package/src/components/timeline/index.tsx +456 -0
  99. package/src/components/toast/index.tsx +568 -0
  100. package/src/components/toast/toast-store.ts +120 -0
  101. package/src/components/typography/index.tsx +121 -0
  102. package/src/icons/index.tsx +423 -7
  103. package/src/index.ts +114 -4
  104. package/src/providers/panel-ui-provider.tsx +3 -0
  105. package/src/theme/use-theme.ts +119 -4
  106. package/theme.css +330 -7
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Typography — semantic text presets.
5
+ *
6
+ * Adapted from: heroui-inc/heroui-native (Typography `type` scale and the
7
+ * Heading / Paragraph / Code compound parts), built on PanelUI's Text
8
+ * primitive so every preset keeps `className` passthrough and theme colours.
9
+ */
10
+ import { forwardRef } from 'react';
11
+ import { View } from 'react-native';
12
+ import { tv } from 'tailwind-variants';
13
+ import { Text } from "../../primitives/text.js";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ const typographyVariants = tv({
16
+ base: 'text-foreground',
17
+ variants: {
18
+ type: {
19
+ h1: 'text-4xl font-bold tracking-tight',
20
+ h2: 'text-3xl font-semibold tracking-tight',
21
+ h3: 'text-2xl font-semibold tracking-tight',
22
+ h4: 'text-xl font-semibold',
23
+ h5: 'text-lg font-semibold',
24
+ h6: 'text-base font-semibold',
25
+ body: 'text-base font-normal',
26
+ 'body-sm': 'text-sm font-normal',
27
+ 'body-xs': 'text-xs font-normal',
28
+ code: 'font-mono text-sm text-foreground'
29
+ },
30
+ muted: {
31
+ true: 'text-muted-foreground'
32
+ }
33
+ },
34
+ defaultVariants: {
35
+ type: 'body'
36
+ }
37
+ });
38
+
39
+ /** Heading levels, for `Typography.Heading`. */
40
+
41
+ /** Body sizes, for `Typography.Paragraph`. */
42
+
43
+ /** Maps a heading preset to its accessibility heading level. */
44
+ const HEADING_LEVEL = {
45
+ h1: 1,
46
+ h2: 2,
47
+ h3: 3,
48
+ h4: 4,
49
+ h5: 5,
50
+ h6: 6
51
+ };
52
+ const TypographyRoot = /*#__PURE__*/forwardRef(({
53
+ className,
54
+ type,
55
+ muted,
56
+ ...props
57
+ }, ref) => /*#__PURE__*/_jsx(Text, {
58
+ ref: ref,
59
+ className: typographyVariants({
60
+ type,
61
+ muted,
62
+ className
63
+ }),
64
+ ...props
65
+ }));
66
+ TypographyRoot.displayName = 'Typography';
67
+ /** Heading text, wired up with the matching accessibility heading level. */
68
+ const TypographyHeading = /*#__PURE__*/forwardRef(({
69
+ className,
70
+ type = 'h2',
71
+ muted,
72
+ ...props
73
+ }, ref) => /*#__PURE__*/_jsx(Text, {
74
+ ref: ref,
75
+ accessibilityRole: "header",
76
+ "aria-level": HEADING_LEVEL[type],
77
+ className: typographyVariants({
78
+ type,
79
+ muted,
80
+ className
81
+ }),
82
+ ...props
83
+ }));
84
+ TypographyHeading.displayName = 'Typography.Heading';
85
+ const TypographyParagraph = /*#__PURE__*/forwardRef(({
86
+ className,
87
+ type = 'body',
88
+ muted,
89
+ ...props
90
+ }, ref) => /*#__PURE__*/_jsx(Text, {
91
+ ref: ref,
92
+ className: typographyVariants({
93
+ type,
94
+ muted,
95
+ className
96
+ }),
97
+ ...props
98
+ }));
99
+ TypographyParagraph.displayName = 'Typography.Paragraph';
100
+ /** Inline code on a muted surface. */
101
+ const TypographyCode = /*#__PURE__*/forwardRef(({
102
+ className,
103
+ containerClassName,
104
+ muted,
105
+ testID,
106
+ ...props
107
+ }, ref) => /*#__PURE__*/_jsx(View, {
108
+ ref: ref,
109
+ testID: testID,
110
+ className: `self-start rounded-md bg-muted px-1.5 py-1 ${containerClassName ?? ''}`,
111
+ children: /*#__PURE__*/_jsx(Text, {
112
+ className: typographyVariants({
113
+ type: 'code',
114
+ muted,
115
+ className
116
+ }),
117
+ ...props
118
+ })
119
+ }));
120
+ TypographyCode.displayName = 'Typography.Code';
121
+ export const Typography = Object.assign(TypographyRoot, {
122
+ Heading: TypographyHeading,
123
+ Paragraph: TypographyParagraph,
124
+ Code: TypographyCode
125
+ });
126
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","View","tv","Text","jsx","_jsx","typographyVariants","base","variants","type","h1","h2","h3","h4","h5","h6","body","code","muted","true","defaultVariants","HEADING_LEVEL","TypographyRoot","className","props","ref","displayName","TypographyHeading","accessibilityRole","TypographyParagraph","TypographyCode","containerClassName","testID","children","Typography","Object","assign","Heading","Paragraph","Code"],"sourceRoot":"../../../../src","sources":["components/typography/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,UAAU,QAA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