panelui-native 0.2.0 → 0.4.0

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 (84) hide show
  1. package/README.md +251 -0
  2. package/lib/module/components/alert/index.js +106 -13
  3. package/lib/module/components/alert/index.js.map +1 -1
  4. package/lib/module/components/badge/index.js +3 -3
  5. package/lib/module/components/badge/index.js.map +1 -1
  6. package/lib/module/components/button/index.js +44 -15
  7. package/lib/module/components/button/index.js.map +1 -1
  8. package/lib/module/components/checkbox/index.js +20 -7
  9. package/lib/module/components/checkbox/index.js.map +1 -1
  10. package/lib/module/components/empty-state/index.js +178 -0
  11. package/lib/module/components/empty-state/index.js.map +1 -0
  12. package/lib/module/components/input-group/index.js +132 -0
  13. package/lib/module/components/input-group/index.js.map +1 -0
  14. package/lib/module/components/label/index.js +117 -0
  15. package/lib/module/components/label/index.js.map +1 -0
  16. package/lib/module/components/progress/index.js +138 -0
  17. package/lib/module/components/progress/index.js.map +1 -0
  18. package/lib/module/components/steps/index.js +354 -0
  19. package/lib/module/components/steps/index.js.map +1 -0
  20. package/lib/module/components/tabs/index.js +9 -3
  21. package/lib/module/components/tabs/index.js.map +1 -1
  22. package/lib/module/components/toast/index.js +479 -0
  23. package/lib/module/components/toast/index.js.map +1 -0
  24. package/lib/module/components/toast/toast-store.js +81 -0
  25. package/lib/module/components/toast/toast-store.js.map +1 -0
  26. package/lib/module/components/typography/index.js +126 -0
  27. package/lib/module/components/typography/index.js.map +1 -0
  28. package/lib/module/icons/index.js +223 -2
  29. package/lib/module/icons/index.js.map +1 -1
  30. package/lib/module/index.js +9 -2
  31. package/lib/module/index.js.map +1 -1
  32. package/lib/module/providers/panel-ui-provider.js +2 -1
  33. package/lib/module/providers/panel-ui-provider.js.map +1 -1
  34. package/lib/module/theme/use-theme.js +90 -3
  35. package/lib/module/theme/use-theme.js.map +1 -1
  36. package/lib/typescript/src/components/alert/index.d.ts +56 -4
  37. package/lib/typescript/src/components/alert/index.d.ts.map +1 -1
  38. package/lib/typescript/src/components/button/index.d.ts +39 -0
  39. package/lib/typescript/src/components/button/index.d.ts.map +1 -1
  40. package/lib/typescript/src/components/checkbox/index.d.ts +8 -0
  41. package/lib/typescript/src/components/checkbox/index.d.ts.map +1 -1
  42. package/lib/typescript/src/components/empty-state/index.d.ts +73 -0
  43. package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -0
  44. package/lib/typescript/src/components/input-group/index.d.ts +34 -0
  45. package/lib/typescript/src/components/input-group/index.d.ts.map +1 -0
  46. package/lib/typescript/src/components/label/index.d.ts +28 -0
  47. package/lib/typescript/src/components/label/index.d.ts.map +1 -0
  48. package/lib/typescript/src/components/progress/index.d.ts +132 -0
  49. package/lib/typescript/src/components/progress/index.d.ts.map +1 -0
  50. package/lib/typescript/src/components/steps/index.d.ts +62 -0
  51. package/lib/typescript/src/components/steps/index.d.ts.map +1 -0
  52. package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
  53. package/lib/typescript/src/components/toast/index.d.ts +176 -0
  54. package/lib/typescript/src/components/toast/index.d.ts.map +1 -0
  55. package/lib/typescript/src/components/toast/toast-store.d.ts +65 -0
  56. package/lib/typescript/src/components/toast/toast-store.d.ts.map +1 -0
  57. package/lib/typescript/src/components/typography/index.d.ts +77 -0
  58. package/lib/typescript/src/components/typography/index.d.ts.map +1 -0
  59. package/lib/typescript/src/icons/index.d.ts +25 -0
  60. package/lib/typescript/src/icons/index.d.ts.map +1 -1
  61. package/lib/typescript/src/index.d.ts +10 -3
  62. package/lib/typescript/src/index.d.ts.map +1 -1
  63. package/lib/typescript/src/providers/panel-ui-provider.d.ts.map +1 -1
  64. package/lib/typescript/src/theme/use-theme.d.ts +64 -4
  65. package/lib/typescript/src/theme/use-theme.d.ts.map +1 -1
  66. package/package.json +22 -4
  67. package/src/components/alert/index.tsx +102 -16
  68. package/src/components/badge/index.tsx +3 -3
  69. package/src/components/button/index.tsx +47 -7
  70. package/src/components/checkbox/index.tsx +17 -3
  71. package/src/components/empty-state/index.tsx +136 -0
  72. package/src/components/input-group/index.tsx +164 -0
  73. package/src/components/label/index.tsx +128 -0
  74. package/src/components/progress/index.tsx +147 -0
  75. package/src/components/steps/index.tsx +343 -0
  76. package/src/components/tabs/index.tsx +10 -2
  77. package/src/components/toast/index.tsx +447 -0
  78. package/src/components/toast/toast-store.ts +120 -0
  79. package/src/components/typography/index.tsx +121 -0
  80. package/src/icons/index.tsx +152 -1
  81. package/src/index.ts +76 -3
  82. package/src/providers/panel-ui-provider.tsx +3 -0
  83. package/src/theme/use-theme.ts +119 -4
  84. package/theme.css +330 -7
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Steps — a stepper for multi-step flows.
3
+ *
4
+ * Adapted from: origin-space/originui apps/origin/registry/default/ui/stepper.tsx
5
+ * (the Stepper / Item / Trigger / Indicator / Title / Description / Separator
6
+ * anatomy, and the completed | active | inactive | loading state resolution).
7
+ *
8
+ * Upstream drives all styling through `data-*` attributes, which React Native
9
+ * has no equivalent for. Here the state is resolved in JS and passed down
10
+ * through context into `tv()` variants — the same approach Alert uses.
11
+ *
12
+ * Steps does not own your flow: it reflects whatever step your app says is
13
+ * active. Pass `value` to control it, or `defaultValue` to let it manage
14
+ * its own.
15
+ */
16
+ import { type ReactNode } from 'react';
17
+ import { View, type Text as RNText, type ViewProps } from 'react-native';
18
+ import { type TextProps } from '../../primitives/text.js';
19
+ export type StepState = 'active' | 'completed' | 'inactive' | 'loading';
20
+ export type StepsOrientation = 'horizontal' | 'vertical';
21
+ export interface StepsProps extends ViewProps {
22
+ className?: string;
23
+ /** Active step when uncontrolled. */
24
+ defaultValue?: number;
25
+ /** Active step, controlled. */
26
+ value?: number;
27
+ onValueChange?: (value: number) => void;
28
+ orientation?: StepsOrientation;
29
+ children?: ReactNode;
30
+ }
31
+ export interface StepsItemProps extends ViewProps {
32
+ className?: string;
33
+ /** This item's position in the flow, zero-based by convention. */
34
+ step: number;
35
+ /** Force the completed state, regardless of the active step. */
36
+ completed?: boolean;
37
+ disabled?: boolean;
38
+ /** Shows a spinner in place of the number while this step is active. */
39
+ loading?: boolean;
40
+ children?: ReactNode;
41
+ }
42
+ export interface StepsTriggerProps extends ViewProps {
43
+ className?: string;
44
+ children?: ReactNode;
45
+ }
46
+ export interface StepsIndicatorProps extends ViewProps {
47
+ className?: string;
48
+ /** Replaces the number / check / spinner entirely. */
49
+ children?: ReactNode;
50
+ }
51
+ export interface StepsSeparatorProps extends ViewProps {
52
+ className?: string;
53
+ }
54
+ export declare const Steps: import("react").ForwardRefExoticComponent<StepsProps & import("react").RefAttributes<View>> & {
55
+ Item: import("react").ForwardRefExoticComponent<StepsItemProps & import("react").RefAttributes<View>>;
56
+ Trigger: import("react").ForwardRefExoticComponent<StepsTriggerProps & import("react").RefAttributes<View>>;
57
+ Indicator: import("react").ForwardRefExoticComponent<StepsIndicatorProps & import("react").RefAttributes<View>>;
58
+ Title: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<RNText>>;
59
+ Description: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<RNText>>;
60
+ Separator: import("react").ForwardRefExoticComponent<StepsSeparatorProps & import("react").RefAttributes<View>>;
61
+ };
62
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/steps/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAa,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpF,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAG7D,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC;AACxE,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,UAAU,CA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,EAAE,MAAM,cAAc,CAAC;AAkCvF,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,KAAK,EACL,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,SAAS,+BAoCX;AAyCD,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,+BAWjE;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,gBAAgB,+BAiCpE;AAED,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,sCAS9E;AAED,eAAO,MAAM,IAAI;;;;CAIf,CAAC"}
@@ -0,0 +1,176 @@
1
+ /**
2
+ * Toast — transient notification.
3
+ *
4
+ * Adapted from: heroui-inc/heroui-native src/components/toast/
5
+ * (the three usage patterns — string, config object, custom component — the
6
+ * Title / Description / Action / Close anatomy, placement, and swipe-to-
7
+ * dismiss). Styled with Coss UI tokens and PanelUI's Alert status palette.
8
+ *
9
+ * The viewport is mounted for you by PanelUIProvider; `useToast()` works
10
+ * anywhere below it.
11
+ */
12
+ import { type ReactNode } from 'react';
13
+ import { type ViewProps } from 'react-native';
14
+ import { type VariantProps } from 'tailwind-variants';
15
+ import { type TextProps } from '../../primitives/text.js';
16
+ import { type ButtonProps } from '../button/index.js';
17
+ import { toast, type ToastHandle, type ToastItem, type ToastPlacement, type ToastVariant } from './toast-store.js';
18
+ declare const toastVariants: import("tailwind-variants").TVReturnType<{
19
+ variant: {
20
+ default: {
21
+ root: string;
22
+ title: string;
23
+ };
24
+ info: {
25
+ root: string;
26
+ title: string;
27
+ };
28
+ success: {
29
+ root: string;
30
+ title: string;
31
+ };
32
+ warning: {
33
+ root: string;
34
+ title: string;
35
+ };
36
+ destructive: {
37
+ root: string;
38
+ title: string;
39
+ };
40
+ };
41
+ }, {
42
+ root: string;
43
+ indicator: string;
44
+ content: string;
45
+ title: string;
46
+ description: string;
47
+ }, undefined, {
48
+ variant: {
49
+ default: {
50
+ root: string;
51
+ title: string;
52
+ };
53
+ info: {
54
+ root: string;
55
+ title: string;
56
+ };
57
+ success: {
58
+ root: string;
59
+ title: string;
60
+ };
61
+ warning: {
62
+ root: string;
63
+ title: string;
64
+ };
65
+ destructive: {
66
+ root: string;
67
+ title: string;
68
+ };
69
+ };
70
+ }, {
71
+ root: string;
72
+ indicator: string;
73
+ content: string;
74
+ title: string;
75
+ description: string;
76
+ }, import("tailwind-variants").TVReturnType<{
77
+ variant: {
78
+ default: {
79
+ root: string;
80
+ title: string;
81
+ };
82
+ info: {
83
+ root: string;
84
+ title: string;
85
+ };
86
+ success: {
87
+ root: string;
88
+ title: string;
89
+ };
90
+ warning: {
91
+ root: string;
92
+ title: string;
93
+ };
94
+ destructive: {
95
+ root: string;
96
+ title: string;
97
+ };
98
+ };
99
+ }, {
100
+ root: string;
101
+ indicator: string;
102
+ content: string;
103
+ title: string;
104
+ description: string;
105
+ }, undefined, unknown, unknown, undefined>>;
106
+ export interface ToastProps extends ViewProps, VariantProps<typeof toastVariants> {
107
+ className?: string;
108
+ /** Called when the close button is pressed or the toast is swiped away. */
109
+ onHide?: () => void;
110
+ children?: ReactNode;
111
+ }
112
+ export interface ToastIndicatorProps extends ViewProps {
113
+ className?: string;
114
+ iconProps?: {
115
+ size?: number;
116
+ color?: string;
117
+ };
118
+ children?: ReactNode;
119
+ }
120
+ export interface ToastCloseProps extends ViewProps {
121
+ className?: string;
122
+ }
123
+ export declare const Toast: {
124
+ ({ className, variant, onHide, children, ...props }: ToastProps): import("react").JSX.Element;
125
+ displayName: string;
126
+ } & {
127
+ Indicator: {
128
+ ({ className, iconProps, children, ...props }: ToastIndicatorProps): import("react").JSX.Element;
129
+ displayName: string;
130
+ };
131
+ Content: {
132
+ ({ className, ...props }: ViewProps & {
133
+ className?: string;
134
+ }): import("react").JSX.Element;
135
+ displayName: string;
136
+ };
137
+ Title: {
138
+ ({ className, ...props }: TextProps): import("react").JSX.Element;
139
+ displayName: string;
140
+ };
141
+ Description: {
142
+ ({ className, ...props }: TextProps): import("react").JSX.Element;
143
+ displayName: string;
144
+ };
145
+ Action: {
146
+ ({ variant, size, onPress, ...props }: ButtonProps): import("react").JSX.Element;
147
+ displayName: string;
148
+ };
149
+ Close: {
150
+ ({ className, ...props }: ToastCloseProps): import("react").JSX.Element;
151
+ displayName: string;
152
+ };
153
+ };
154
+ /**
155
+ * Renders the toast queue. PanelUIProvider mounts this automatically — you
156
+ * only need it directly if you build your own provider.
157
+ */
158
+ export declare function ToastViewport(): import("react").JSX.Element | null;
159
+ /**
160
+ * Access the toast API.
161
+ *
162
+ * ```tsx
163
+ * const { toast } = useToast();
164
+ * toast.show({ variant: 'success', label: 'Saved' });
165
+ * ```
166
+ */
167
+ export declare function useToast(): {
168
+ toast: {
169
+ show: (options: import("./toast-store.js").ToastOptions | string) => string;
170
+ hide: (id: string) => void;
171
+ hideAll: () => void;
172
+ };
173
+ };
174
+ export { toast, type ToastItem, type ToastPlacement, type ToastVariant, type ToastHandle };
175
+ export type { ToastOptions } from './toast-store.js';
176
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/toast/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAiBpD,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAG7D,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,oBAAW,CAAC;AACrD,OAAO,EACL,KAAK,EAEL,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,kBAAe,CAAC;AA4CvB,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAuBjB,CAAC;AA4BH,MAAM,WAAW,UAAW,SAAQ,SAAS,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAuBD,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAuDD,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAsBD,eAAO,MAAM,KAAK;yDApGiE,UAAU;;;;uDAuBvB,mBAAmB;;;;kCAe1C,SAAS,GAAG;YAAE,SAAS,CAAC,EAAE,MAAM,CAAA;SAAE;;;;kCAOpC,SAAS;;;;kCAOH,SAAS;;;;+CAQoB,WAAW;;;;kCAoB9C,eAAe;;;CA2B1D,CAAC;AAsJH;;;GAGG;AACH,wBAAgB,aAAa,uCAc5B;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ;;;;;;EAEvB;AAED,OAAO,EAAE,KAAK,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,CAAC;AAC3F,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAe,CAAC"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Toast queue.
3
+ *
4
+ * A module-level store rather than React state, so `toast.show()` works from
5
+ * anywhere — event handlers, API clients, code outside the component tree —
6
+ * without threading a context through. The viewport subscribes with
7
+ * `useSyncExternalStore`.
8
+ */
9
+ import type { ReactNode } from 'react';
10
+ export type ToastVariant = 'default' | 'info' | 'success' | 'warning' | 'destructive';
11
+ export type ToastPlacement = 'top' | 'bottom';
12
+ /** Handle given to action callbacks so they can dismiss their own toast. */
13
+ export interface ToastHandle {
14
+ id: string;
15
+ hide: () => void;
16
+ }
17
+ export interface ToastOptions {
18
+ variant?: ToastVariant;
19
+ placement?: ToastPlacement;
20
+ /** Title line. */
21
+ label?: string;
22
+ description?: string;
23
+ /** Overrides the variant's default status icon. Pass `null` for no icon. */
24
+ icon?: ReactNode;
25
+ /** Renders a trailing action button when set. */
26
+ actionLabel?: string;
27
+ onActionPress?: (handle: ToastHandle) => void;
28
+ /** Show a close button. Defaults to true when there is no action. */
29
+ closable?: boolean;
30
+ /** Milliseconds before auto-dismiss. `0` keeps it up until dismissed. */
31
+ duration?: number;
32
+ /** Fully custom rendering. Receives the same handle as action callbacks. */
33
+ component?: (handle: ToastHandle) => ReactNode;
34
+ }
35
+ export interface ToastItem extends ToastOptions {
36
+ id: string;
37
+ }
38
+ declare class ToastStore {
39
+ private items;
40
+ private snapshot;
41
+ private listeners;
42
+ private timers;
43
+ subscribe: (listener: () => void) => () => void;
44
+ getSnapshot: () => readonly ToastItem[];
45
+ show: (options: ToastOptions | string) => string;
46
+ hide: (id: string) => void;
47
+ hideAll: () => void;
48
+ private emit;
49
+ }
50
+ export declare const toastStore: ToastStore;
51
+ /**
52
+ * Imperative toast API. Also returned from `useToast()`.
53
+ *
54
+ * ```ts
55
+ * toast.show('Saved');
56
+ * toast.show({ variant: 'success', label: 'Deployed', actionLabel: 'View' });
57
+ * ```
58
+ */
59
+ export declare const toast: {
60
+ show: (options: ToastOptions | string) => string;
61
+ hide: (id: string) => void;
62
+ hideAll: () => void;
63
+ };
64
+ export {};
65
+ //# sourceMappingURL=toast-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast-store.d.ts","sourceRoot":"","sources":["../../../../../src/components/toast/toast-store.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAC;AACtF,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE9C,4EAA4E;AAC5E,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,SAAS,CAAC;CAChD;AAED,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,EAAE,EAAE,MAAM,CAAC;CACZ;AAMD,cAAM,UAAU;IACd,OAAO,CAAC,KAAK,CAAmB;IAChC,OAAO,CAAC,QAAQ,CAAoC;IACpD,OAAO,CAAC,SAAS,CAAyB;IAC1C,OAAO,CAAC,MAAM,CAAoD;IAElE,SAAS,GAAI,UAAU,MAAM,IAAI,gBAK/B;IAEF,WAAW,QAAO,SAAS,SAAS,EAAE,CAAkB;IAExD,IAAI,GAAI,SAAS,YAAY,GAAG,MAAM,KAAG,MAAM,CAiB7C;IAEF,IAAI,GAAI,IAAI,MAAM,UAShB;IAEF,OAAO,aAML;IAEF,OAAO,CAAC,IAAI;CAIb;AAED,eAAO,MAAM,UAAU,YAAmB,CAAC;AAE3C;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK;oBAtDC,YAAY,GAAG,MAAM,KAAG,MAAM;eAmBnC,MAAM;;CAuCnB,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { View, type Text as RNText, type ViewProps } from 'react-native';
2
+ import { type VariantProps } from 'tailwind-variants';
3
+ import { type TextProps } from '../../primitives/text.js';
4
+ declare const typographyVariants: import("tailwind-variants").TVReturnType<{
5
+ type: {
6
+ h1: string;
7
+ h2: string;
8
+ h3: string;
9
+ h4: string;
10
+ h5: string;
11
+ h6: string;
12
+ body: string;
13
+ 'body-sm': string;
14
+ 'body-xs': string;
15
+ code: string;
16
+ };
17
+ muted: {
18
+ true: string;
19
+ };
20
+ }, undefined, "text-foreground", {
21
+ type: {
22
+ h1: string;
23
+ h2: string;
24
+ h3: string;
25
+ h4: string;
26
+ h5: string;
27
+ h6: string;
28
+ body: string;
29
+ 'body-sm': string;
30
+ 'body-xs': string;
31
+ code: string;
32
+ };
33
+ muted: {
34
+ true: string;
35
+ };
36
+ }, undefined, import("tailwind-variants").TVReturnType<{
37
+ type: {
38
+ h1: string;
39
+ h2: string;
40
+ h3: string;
41
+ h4: string;
42
+ h5: string;
43
+ h6: string;
44
+ body: string;
45
+ 'body-sm': string;
46
+ 'body-xs': string;
47
+ code: string;
48
+ };
49
+ muted: {
50
+ true: string;
51
+ };
52
+ }, undefined, "text-foreground", unknown, unknown, undefined>>;
53
+ export type TypographyType = NonNullable<VariantProps<typeof typographyVariants>['type']>;
54
+ export interface TypographyProps extends Omit<TextProps, 'size' | 'weight'>, VariantProps<typeof typographyVariants> {
55
+ className?: string;
56
+ }
57
+ /** Heading levels, for `Typography.Heading`. */
58
+ type HeadingType = Extract<TypographyType, 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;
59
+ /** Body sizes, for `Typography.Paragraph`. */
60
+ type ParagraphType = Extract<TypographyType, 'body' | 'body-sm' | 'body-xs'>;
61
+ export interface TypographyHeadingProps extends Omit<TypographyProps, 'type'> {
62
+ type?: HeadingType;
63
+ }
64
+ export interface TypographyParagraphProps extends Omit<TypographyProps, 'type'> {
65
+ type?: ParagraphType;
66
+ }
67
+ export interface TypographyCodeProps extends Omit<TypographyProps, 'type'> {
68
+ /** Classes for the surface behind the code text. */
69
+ containerClassName?: string;
70
+ }
71
+ export declare const Typography: import("react").ForwardRefExoticComponent<TypographyProps & import("react").RefAttributes<RNText>> & {
72
+ Heading: import("react").ForwardRefExoticComponent<TypographyHeadingProps & import("react").RefAttributes<RNText>>;
73
+ Paragraph: import("react").ForwardRefExoticComponent<TypographyParagraphProps & import("react").RefAttributes<RNText>>;
74
+ Code: import("react").ForwardRefExoticComponent<TypographyCodeProps & Pick<ViewProps, "testID"> & import("react").RefAttributes<View>>;
75
+ };
76
+ export {};
77
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/typography/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAE7D,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAsBtB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,WAAW,CACtC,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAChD,CAAC;AAEF,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAC,EACxC,YAAY,CAAC,OAAO,kBAAkB,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,gDAAgD;AAChD,KAAK,WAAW,GAAG,OAAO,CAAC,cAAc,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AACpF,8CAA8C;AAC9C,KAAK,aAAa,GAAG,OAAO,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC,CAAC;AAmB7E,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC;IAC3E,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAgBD,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC;IAC7E,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AASD,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC;IACxE,oDAAoD;IACpD,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAgBD,eAAO,MAAM,UAAU;;;;CAIrB,CAAC"}
@@ -1,3 +1,16 @@
1
+ /**
2
+ * Icon set.
3
+ *
4
+ * Two families live here:
5
+ * - Stroked 24×24 icons (Lucide geometry, as used by shadcn-ui/ui) for chrome
6
+ * such as chevrons and the close button.
7
+ * - Filled 16×16 status icons for Alert and Toast indicators.
8
+ * Adapted from: heroui-inc/heroui-native src/components/alert/{default,success,warning}-icon.tsx
9
+ *
10
+ * `color` has no default on the status icons on purpose — callers resolve it
11
+ * from the active theme with `useCSSVariable`, so icons follow the theme
12
+ * instead of a hardcoded hex.
13
+ */
1
14
  import { type SvgProps } from 'react-native-svg';
2
15
  export interface IconProps extends SvgProps {
3
16
  size?: number;
@@ -5,5 +18,17 @@ export interface IconProps extends SvgProps {
5
18
  }
6
19
  export declare function CheckIcon({ size, color, ...props }: IconProps): import("react").JSX.Element;
7
20
  export declare function ChevronDownIcon({ size, color, ...props }: IconProps): import("react").JSX.Element;
21
+ export declare function ChevronLeftIcon({ size, color, ...props }: IconProps): import("react").JSX.Element;
22
+ export declare function ChevronRightIcon({ size, color, ...props }: IconProps): import("react").JSX.Element;
8
23
  export declare function XIcon({ size, color, ...props }: IconProps): import("react").JSX.Element;
24
+ export declare function SearchIcon({ size, color, ...props }: IconProps): import("react").JSX.Element;
25
+ export declare function ArrowUpRightIcon({ size, color, ...props }: IconProps): import("react").JSX.Element;
26
+ export declare function SunIcon({ size, color, ...props }: IconProps): import("react").JSX.Element;
27
+ export declare function MoonIcon({ size, color, ...props }: IconProps): import("react").JSX.Element;
28
+ /** Info circle. Used for `default`, `info` and `destructive` status. */
29
+ export declare function InfoIcon({ size, color, ...props }: IconProps): import("react").JSX.Element;
30
+ /** Check circle. Used for `success` status. */
31
+ export declare function CheckCircleIcon({ size, color, ...props }: IconProps): import("react").JSX.Element;
32
+ /** Warning triangle. Used for `warning` status. */
33
+ export declare function AlertTriangleIcon({ size, color, ...props }: IconProps): import("react").JSX.Element;
9
34
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/icons/index.tsx"],"names":[],"mappings":"AAAA,OAAY,EAAQ,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5D,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAS,EAAE,KAAc,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAY3E;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAS,EAAE,KAAiB,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAYpF;AAED,wBAAgB,KAAK,CAAC,EAAE,IAAS,EAAE,KAAiB,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAY1E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/icons/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAY,EAAgB,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEpE,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAYD,wBAAgB,SAAS,CAAC,EAAE,IAAS,EAAE,KAAc,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAY3E;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAS,EAAE,KAAiB,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAYpF;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAS,EAAE,KAAiB,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAYpF;AAED,wBAAgB,gBAAgB,CAAC,EAAE,IAAS,EAAE,KAAiB,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAYrF;AAED,wBAAgB,KAAK,CAAC,EAAE,IAAS,EAAE,KAAiB,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAY1E;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAS,EAAE,KAAiB,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAa/E;AAED,wBAAgB,gBAAgB,CAAC,EAAE,IAAS,EAAE,KAAc,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAYlF;AAED,wBAAgB,OAAO,CAAC,EAAE,IAAS,EAAE,KAAiB,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAY5E;AAED,wBAAgB,QAAQ,CAAC,EAAE,IAAS,EAAE,KAAiB,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAY7E;AAMD,wEAAwE;AACxE,wBAAgB,QAAQ,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAUjE;AAED,+CAA+C;AAC/C,wBAAgB,eAAe,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAUxE;AAED,mDAAmD;AACnD,wBAAgB,iBAAiB,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAU1E"}
@@ -1,9 +1,9 @@
1
1
  export { PanelUIProvider, type PanelUIProviderProps } from './providers/panel-ui-provider.js';
2
- export { useTheme, type ThemeName } from './theme/use-theme.js';
2
+ export { useTheme, useThemeMode, PANEL_THEMES, PANEL_THEME_NAMES, PANEL_EXTRA_THEMES, type ThemeName, type ThemeMode, type PanelTheme, type PanelThemeFamily, } from './theme/use-theme.js';
3
3
  export { Portal, PortalHost, PortalProvider } from './primitives/portal.js';
4
4
  export { Text, type TextProps } from './primitives/text.js';
5
5
  export { AnimatedPressable, type AnimatedPressableProps, } from './primitives/animated-pressable.js';
6
- export { Alert, type AlertProps } from './components/alert/index.js';
6
+ export { Alert, type AlertProps, type AlertIndicatorProps, } from './components/alert/index.js';
7
7
  export { Avatar, type AvatarProps } from './components/avatar/index.js';
8
8
  export { Badge, type BadgeProps } from './components/badge/index.js';
9
9
  export { BottomSheet, type BottomSheetProps, type BottomSheetContentProps, } from './components/bottom-sheet/index.js';
@@ -15,11 +15,18 @@ export { Select, type SelectProps, type SelectItemProps } from './components/sel
15
15
  export { Tabs, type TabsProps, type TabsListProps, type TabsTriggerProps, type TabsContentProps, } from './components/tabs/index.js';
16
16
  export { Card, type CardProps } from './components/card/index.js';
17
17
  export { Checkbox, type CheckboxProps } from './components/checkbox/index.js';
18
+ export { EmptyState, type EmptyStateProps, type EmptyStateMediaProps, } from './components/empty-state/index.js';
18
19
  export { Input, type InputProps } from './components/input/index.js';
20
+ export { InputGroup, type InputGroupProps, type InputGroupInputProps, type InputGroupDecoratorProps, } from './components/input-group/index.js';
21
+ export { Label, type LabelProps, type LabelTextProps } from './components/label/index.js';
22
+ export { Progress, type ProgressProps } from './components/progress/index.js';
19
23
  export { RadioGroup, type RadioGroupProps, type RadioGroupItemProps, } from './components/radio-group/index.js';
20
24
  export { Skeleton, type SkeletonProps } from './components/skeleton/index.js';
21
25
  export { Spinner, type SpinnerProps } from './components/spinner/index.js';
26
+ export { Steps, type StepsProps, type StepsItemProps, type StepsTriggerProps, type StepsIndicatorProps, type StepsSeparatorProps, type StepState, type StepsOrientation, } from './components/steps/index.js';
22
27
  export { Switch, type SwitchProps } from './components/switch/index.js';
23
- export { CheckIcon, ChevronDownIcon, XIcon, type IconProps } from './icons/index.js';
28
+ export { Toast, ToastViewport, toast, useToast, type ToastProps, type ToastOptions, type ToastItem, type ToastVariant, type ToastPlacement, type ToastHandle, type ToastIndicatorProps, type ToastCloseProps, } from './components/toast/index.js';
29
+ export { Typography, type TypographyProps, type TypographyType, type TypographyHeadingProps, type TypographyParagraphProps, type TypographyCodeProps, } from './components/typography/index.js';
30
+ export { AlertTriangleIcon, ArrowUpRightIcon, CheckCircleIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, InfoIcon, MoonIcon, SearchIcon, SunIcon, XIcon, type IconProps, } from './icons/index.js';
24
31
  export { cn } from './utils/cn.js';
25
32
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,kCAA+B,CAAC;AAG3F,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAmB,CAAC;AAG7D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,wBAAqB,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAmB,CAAC;AACzD,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,GAC5B,MAAM,oCAAiC,CAAC;AAGzC,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,6BAAoB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,8BAAqB,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,6BAAoB,CAAC;AAC5D,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,GAC7B,MAAM,oCAA2B,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,8BAAqB,CAAC;AAC/D,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,kBAAkB,GACx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AAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,GACzB,MAAM,kCAAyB,CAAC;AAGjC,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAO,EACP,KAAK,EACL,KAAK,SAAS,GACf,MAAM,kBAAS,CAAC;AAGjB,OAAO,EAAE,EAAE,EAAE,MAAM,eAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"panel-ui-provider.d.ts","sourceRoot":"","sources":["../../../../src/providers/panel-ui-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,SAAS,EACT,UAAiB,GAClB,EAAE,oBAAoB,+BAWtB"}
1
+ {"version":3,"file":"panel-ui-provider.d.ts","sourceRoot":"","sources":["../../../../src/providers/panel-ui-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,SAAS,EACT,UAAiB,GAClB,EAAE,oBAAoB,+BAatB"}
@@ -1,12 +1,72 @@
1
- export type ThemeName = 'light' | 'dark' | 'system';
1
+ /** Themes shipped in `panelui-native/theme.css`. */
2
+ export type PanelTheme = 'light' | 'dark' | 'moon' | 'moon-dark' | 'grass' | 'grass-dark';
3
+ export type ThemeName = PanelTheme | 'system';
4
+ /** Light/dark mode within a theme family. */
5
+ export type ThemeMode = 'light' | 'dark';
6
+ /** A theme family — one look, in its light and dark form. */
7
+ export interface PanelThemeFamily {
8
+ /** Stable id, e.g. `'moon'`. */
9
+ id: string;
10
+ /** Short display name, for a theme picker. */
11
+ name: string;
12
+ light: PanelTheme;
13
+ dark: PanelTheme;
14
+ /** Representative colour for a swatch, as `[light, dark]`. */
15
+ swatch: [string, string];
16
+ }
17
+ /**
18
+ * The theme families PanelUI ships. Each sets its own palette *and* its own
19
+ * radius scale, so switching family changes the shape of the UI as well as
20
+ * its colour — Panel is the Coss default, Moon is sharp and monochrome,
21
+ * Grass is soft and green.
22
+ *
23
+ * Everything beyond `panel` must be registered in your metro config, or
24
+ * `setTheme` throws "it was not registered":
25
+ *
26
+ * ```js
27
+ * withUniwindConfig(config, {
28
+ * cssEntryFile: './global.css',
29
+ * extraThemes: ['moon', 'moon-dark', 'grass', 'grass-dark'],
30
+ * });
31
+ * ```
32
+ */
33
+ export declare const PANEL_THEMES: readonly PanelThemeFamily[];
34
+ /** Every concrete theme name, in registration order. */
35
+ export declare const PANEL_THEME_NAMES: readonly PanelTheme[];
36
+ /** The names to pass as `extraThemes` in your metro config. */
37
+ export declare const PANEL_EXTRA_THEMES: readonly string[];
2
38
  /**
3
39
  * Reactive access to the current Uniwind theme plus a setter.
4
40
  * Theme changes are applied natively by Uniwind without re-rendering the tree.
5
41
  */
6
42
  export declare function useTheme(): {
7
- /** Currently resolved theme ('light' or 'dark'). */
8
- theme: string;
9
- /** Switch theme: 'light', 'dark', or 'system' (follows device). */
43
+ /** The active theme name, e.g. `'dark'` or `'moon-dark'`. */
44
+ theme: PanelTheme;
45
+ /** Switch theme by name, or `'system'` to follow the device. */
10
46
  setTheme: (name: ThemeName) => void;
11
47
  };
48
+ /**
49
+ * Theme family and light/dark mode as two separate axes — what a picker like
50
+ * "choose a brand, then toggle the sun" actually needs.
51
+ *
52
+ * Named themes are not adaptive in Uniwind, so each brand ships as a
53
+ * light/dark pair. Toggling the mode keeps the current family, so a user in
54
+ * Moon dark lands in Moon light rather than the default theme.
55
+ *
56
+ * ```tsx
57
+ * const { family, mode, setFamily, toggleMode } = useThemeMode();
58
+ * ```
59
+ */
60
+ export declare function useThemeMode(): {
61
+ /** The active theme family. */
62
+ family: PanelThemeFamily;
63
+ /** `'light'` or `'dark'` within that family. */
64
+ mode: ThemeMode;
65
+ /** Switch brand, staying in the current light/dark mode. */
66
+ setFamily: (id: string) => void;
67
+ /** Set the mode, staying in the current family. */
68
+ setMode: (next: ThemeMode) => void;
69
+ /** Flip light ↔ dark within the current family. */
70
+ toggleMode: () => void;
71
+ };
12
72
  //# sourceMappingURL=use-theme.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-theme.d.ts","sourceRoot":"","sources":["../../../../src/theme/use-theme.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEpD;;;GAGG;AACH,wBAAgB,QAAQ;IAIpB,oDAAoD;;IAEpD,mEAAmE;qBAClD,SAAS;EAE7B"}
1
+ {"version":3,"file":"use-theme.d.ts","sourceRoot":"","sources":["../../../../src/theme/use-theme.ts"],"names":[],"mappings":"AAEA,oDAAoD;AACpD,MAAM,MAAM,UAAU,GAClB,OAAO,GACP,MAAM,GACN,MAAM,GACN,WAAW,GACX,OAAO,GACP,YAAY,CAAC;AAEjB,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE9C,6CAA6C;AAC7C,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzC,6DAA6D;AAC7D,MAAM,WAAW,gBAAgB;IAC/B,gCAAgC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,8DAA8D;IAC9D,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,gBAAgB,EAsBnD,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,iBAAiB,EAAE,SAAS,UAAU,EAElD,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAE/C,CAAC;AASF;;;GAGG;AACH,wBAAgB,QAAQ;IAIpB,6DAA6D;WAC7C,UAAU;IAC1B,gEAAgE;qBAC/C,SAAS;EAE7B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY;IAMxB,+BAA+B;;IAE/B,gDAAgD;;IAEhD,4DAA4D;oBAC5C,MAAM;IAItB,mDAAmD;oBACnC,SAAS;IACzB,mDAAmD;;EAGtD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "panelui-native",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "High-performance React Native UI components for Expo. Coss UI design language, powered by Uniwind (Tailwind v4) and Reanimated.",
5
5
  "main": "./lib/module/index.js",
6
6
  "module": "./lib/module/index.js",
@@ -19,6 +19,7 @@
19
19
  "src",
20
20
  "lib",
21
21
  "theme.css",
22
+ "README.md",
22
23
  "!**/__tests__",
23
24
  "!**/*.tsbuildinfo"
24
25
  ],
@@ -32,19 +33,36 @@
32
33
  "react-native",
33
34
  "expo",
34
35
  "ui",
36
+ "ui-library",
37
+ "ui-components",
35
38
  "components",
39
+ "component-library",
36
40
  "tailwind",
41
+ "tailwindcss",
37
42
  "uniwind",
43
+ "nativewind",
44
+ "reanimated",
38
45
  "design-system",
39
- "shadcn"
46
+ "shadcn",
47
+ "dark-mode",
48
+ "theming",
49
+ "accessibility",
50
+ "typescript",
51
+ "ios",
52
+ "android",
53
+ "mobile"
40
54
  ],
41
55
  "repository": {
42
56
  "type": "git",
43
- "url": "git+https://github.com/Khalidabdi1/PanelUI.git"
57
+ "url": "git+https://github.com/panel-ui/PanelUI.git",
58
+ "directory": "packages/panelui"
59
+ },
60
+ "bugs": {
61
+ "url": "https://github.com/panel-ui/PanelUI/issues"
44
62
  },
45
63
  "author": "Khalid Abdi",
46
64
  "license": "MIT",
47
- "homepage": "https://github.com/Khalidabdi1/PanelUI#readme",
65
+ "homepage": "https://github.com/panel-ui/PanelUI#readme",
48
66
  "peerDependencies": {
49
67
  "react": "*",
50
68
  "react-native": "*",