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.
- package/README.md +258 -0
- package/lib/module/components/accordion/index.js +312 -0
- package/lib/module/components/accordion/index.js.map +1 -0
- package/lib/module/components/alert/index.js +106 -13
- package/lib/module/components/alert/index.js.map +1 -1
- package/lib/module/components/avatar/index.js +58 -17
- package/lib/module/components/avatar/index.js.map +1 -1
- package/lib/module/components/badge/index.js +29 -8
- package/lib/module/components/badge/index.js.map +1 -1
- package/lib/module/components/button/index.js +87 -26
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/checkbox/index.js +59 -18
- package/lib/module/components/checkbox/index.js.map +1 -1
- package/lib/module/components/empty-state/index.js +178 -0
- package/lib/module/components/empty-state/index.js.map +1 -0
- package/lib/module/components/frame/index.js +64 -13
- package/lib/module/components/frame/index.js.map +1 -1
- package/lib/module/components/input-group/index.js +132 -0
- package/lib/module/components/input-group/index.js.map +1 -0
- package/lib/module/components/label/index.js +117 -0
- package/lib/module/components/label/index.js.map +1 -0
- package/lib/module/components/progress/index.js +138 -0
- package/lib/module/components/progress/index.js.map +1 -0
- package/lib/module/components/steps/index.js +354 -0
- package/lib/module/components/steps/index.js.map +1 -0
- package/lib/module/components/tabs/index.js +9 -3
- package/lib/module/components/tabs/index.js.map +1 -1
- package/lib/module/components/timeline/index.js +633 -0
- package/lib/module/components/timeline/index.js.map +1 -0
- package/lib/module/components/toast/index.js +569 -0
- package/lib/module/components/toast/index.js.map +1 -0
- package/lib/module/components/toast/toast-store.js +81 -0
- package/lib/module/components/toast/toast-store.js.map +1 -0
- package/lib/module/components/typography/index.js +126 -0
- package/lib/module/components/typography/index.js.map +1 -0
- package/lib/module/icons/index.js +590 -8
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +11 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/providers/panel-ui-provider.js +2 -1
- package/lib/module/providers/panel-ui-provider.js.map +1 -1
- package/lib/module/theme/use-theme.js +90 -3
- package/lib/module/theme/use-theme.js.map +1 -1
- package/lib/typescript/src/components/accordion/index.d.ts +56 -0
- package/lib/typescript/src/components/accordion/index.d.ts.map +1 -0
- package/lib/typescript/src/components/alert/index.d.ts +56 -4
- package/lib/typescript/src/components/alert/index.d.ts.map +1 -1
- package/lib/typescript/src/components/avatar/index.d.ts +8 -1
- package/lib/typescript/src/components/avatar/index.d.ts.map +1 -1
- package/lib/typescript/src/components/badge/index.d.ts +38 -0
- package/lib/typescript/src/components/badge/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button/index.d.ts +57 -0
- package/lib/typescript/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/checkbox/index.d.ts +50 -0
- package/lib/typescript/src/components/checkbox/index.d.ts.map +1 -1
- package/lib/typescript/src/components/empty-state/index.d.ts +73 -0
- package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -0
- package/lib/typescript/src/components/frame/index.d.ts +39 -5
- package/lib/typescript/src/components/frame/index.d.ts.map +1 -1
- package/lib/typescript/src/components/input-group/index.d.ts +34 -0
- package/lib/typescript/src/components/input-group/index.d.ts.map +1 -0
- package/lib/typescript/src/components/label/index.d.ts +28 -0
- package/lib/typescript/src/components/label/index.d.ts.map +1 -0
- package/lib/typescript/src/components/progress/index.d.ts +132 -0
- package/lib/typescript/src/components/progress/index.d.ts.map +1 -0
- package/lib/typescript/src/components/steps/index.d.ts +62 -0
- package/lib/typescript/src/components/steps/index.d.ts.map +1 -0
- package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
- package/lib/typescript/src/components/timeline/index.d.ts +96 -0
- package/lib/typescript/src/components/timeline/index.d.ts.map +1 -0
- package/lib/typescript/src/components/toast/index.d.ts +176 -0
- package/lib/typescript/src/components/toast/index.d.ts.map +1 -0
- package/lib/typescript/src/components/toast/toast-store.d.ts +65 -0
- package/lib/typescript/src/components/toast/toast-store.d.ts.map +1 -0
- package/lib/typescript/src/components/typography/index.d.ts +77 -0
- package/lib/typescript/src/components/typography/index.d.ts.map +1 -0
- package/lib/typescript/src/icons/index.d.ts +60 -0
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +13 -4
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/providers/panel-ui-provider.d.ts.map +1 -1
- package/lib/typescript/src/theme/use-theme.d.ts +64 -4
- package/lib/typescript/src/theme/use-theme.d.ts.map +1 -1
- package/package.json +22 -4
- package/src/components/accordion/index.tsx +344 -0
- package/src/components/alert/index.tsx +102 -16
- package/src/components/avatar/index.tsx +68 -20
- package/src/components/badge/index.tsx +38 -9
- package/src/components/button/index.tsx +102 -19
- package/src/components/checkbox/index.tsx +64 -12
- package/src/components/empty-state/index.tsx +136 -0
- package/src/components/frame/index.tsx +101 -31
- package/src/components/input-group/index.tsx +164 -0
- package/src/components/label/index.tsx +128 -0
- package/src/components/progress/index.tsx +147 -0
- package/src/components/steps/index.tsx +343 -0
- package/src/components/tabs/index.tsx +10 -2
- package/src/components/timeline/index.tsx +456 -0
- package/src/components/toast/index.tsx +568 -0
- package/src/components/toast/toast-store.ts +120 -0
- package/src/components/typography/index.tsx +121 -0
- package/src/icons/index.tsx +423 -7
- package/src/index.ts +114 -4
- package/src/providers/panel-ui-provider.tsx +3 -0
- package/src/theme/use-theme.ts +119 -4
- package/theme.css +330 -7
package/lib/module/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export { PanelUIProvider } from "./providers/panel-ui-provider.js";
|
|
5
5
|
|
|
6
6
|
// Theme
|
|
7
|
-
export { useTheme } from "./theme/use-theme.js";
|
|
7
|
+
export { useTheme, useThemeMode, PANEL_THEMES, PANEL_THEME_NAMES, PANEL_EXTRA_THEMES } from "./theme/use-theme.js";
|
|
8
8
|
|
|
9
9
|
// Primitives
|
|
10
10
|
export { Portal, PortalHost, PortalProvider } from "./primitives/portal.js";
|
|
@@ -12,6 +12,7 @@ export { Text } from "./primitives/text.js";
|
|
|
12
12
|
export { AnimatedPressable } from "./primitives/animated-pressable.js";
|
|
13
13
|
|
|
14
14
|
// Components
|
|
15
|
+
export { Accordion } from "./components/accordion/index.js";
|
|
15
16
|
export { Alert } from "./components/alert/index.js";
|
|
16
17
|
export { Avatar } from "./components/avatar/index.js";
|
|
17
18
|
export { Badge } from "./components/badge/index.js";
|
|
@@ -24,14 +25,22 @@ export { Select } from "./components/select/index.js";
|
|
|
24
25
|
export { Tabs } from "./components/tabs/index.js";
|
|
25
26
|
export { Card } from "./components/card/index.js";
|
|
26
27
|
export { Checkbox } from "./components/checkbox/index.js";
|
|
28
|
+
export { EmptyState } from "./components/empty-state/index.js";
|
|
27
29
|
export { Input } from "./components/input/index.js";
|
|
30
|
+
export { InputGroup } from "./components/input-group/index.js";
|
|
31
|
+
export { Label } from "./components/label/index.js";
|
|
32
|
+
export { Progress } from "./components/progress/index.js";
|
|
28
33
|
export { RadioGroup } from "./components/radio-group/index.js";
|
|
29
34
|
export { Skeleton } from "./components/skeleton/index.js";
|
|
30
35
|
export { Spinner } from "./components/spinner/index.js";
|
|
36
|
+
export { Steps } from "./components/steps/index.js";
|
|
31
37
|
export { Switch } from "./components/switch/index.js";
|
|
38
|
+
export { Timeline } from "./components/timeline/index.js";
|
|
39
|
+
export { Toast, ToastViewport, toast, useToast } from "./components/toast/index.js";
|
|
40
|
+
export { Typography } from "./components/typography/index.js";
|
|
32
41
|
|
|
33
42
|
// Icons
|
|
34
|
-
export { CheckIcon, ChevronDownIcon, XIcon } from "./icons/index.js";
|
|
43
|
+
export { AlertTriangleIcon, AppleIcon, ArrowUpRightIcon, BellIcon, CardIcon, CheckCircleIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, FacebookIcon, GoogleIcon, IconColorProvider, InfoIcon, MoonIcon, PackageIcon, PlusSquareIcon, ReceiptIcon, SearchIcon, SendIcon, ShareNodesIcon, ShieldAlertIcon, ShieldCheckIcon, SunIcon, XIcon, useIconColor } from "./icons/index.js";
|
|
35
44
|
|
|
36
45
|
// Utils
|
|
37
46
|
export { cn } from "./utils/cn.js";
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PanelUIProvider","useTheme","Portal","PortalHost","PortalProvider","Text","AnimatedPressable","Alert","Avatar","Badge","BottomSheet","Button","Dialog","Frame","InlineSelect","Select","Tabs","Card","Checkbox","Input","RadioGroup","Skeleton","Spinner","Switch","CheckIcon","ChevronDownIcon","XIcon","cn"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA,SAASA,eAAe,QAAmC,kCAA+B;;AAE1F;AACA,
|
|
1
|
+
{"version":3,"names":["PanelUIProvider","useTheme","useThemeMode","PANEL_THEMES","PANEL_THEME_NAMES","PANEL_EXTRA_THEMES","Portal","PortalHost","PortalProvider","Text","AnimatedPressable","Accordion","Alert","Avatar","Badge","BottomSheet","Button","Dialog","Frame","InlineSelect","Select","Tabs","Card","Checkbox","EmptyState","Input","InputGroup","Label","Progress","RadioGroup","Skeleton","Spinner","Steps","Switch","Timeline","Toast","ToastViewport","toast","useToast","Typography","AlertTriangleIcon","AppleIcon","ArrowUpRightIcon","BellIcon","CardIcon","CheckCircleIcon","CheckIcon","ChevronDownIcon","ChevronLeftIcon","ChevronRightIcon","FacebookIcon","GoogleIcon","IconColorProvider","InfoIcon","MoonIcon","PackageIcon","PlusSquareIcon","ReceiptIcon","SearchIcon","SendIcon","ShareNodesIcon","ShieldAlertIcon","ShieldCheckIcon","SunIcon","XIcon","useIconColor","cn"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA,SAASA,eAAe,QAAmC,kCAA+B;;AAE1F;AACA,SACEC,QAAQ,EACRC,YAAY,EACZC,YAAY,EACZC,iBAAiB,EACjBC,kBAAkB,QAKb,sBAAmB;;AAE1B;AACA,SAASC,MAAM,EAAEC,UAAU,EAAEC,cAAc,QAAQ,wBAAqB;AACxE,SAAS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ACXC,UAAU,EACVC,QAAQ,EACRC,cAAc,EACdC,eAAe,EACfC,eAAe,EACfC,OAAO,EACPC,KAAK,EACLC,YAAY,QAEP,kBAAS;;AAEhB;AACA,SAASC,EAAE,QAAQ,eAAY","ignoreList":[]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { StyleSheet, View } from 'react-native';
|
|
4
4
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
5
5
|
import { PortalHost, PortalProvider } from "../primitives/portal.js";
|
|
6
|
+
import { ToastViewport } from "../components/toast/index.js";
|
|
6
7
|
import { cn } from "../utils/cn.js";
|
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
9
|
/**
|
|
@@ -27,7 +28,7 @@ export function PanelUIProvider({
|
|
|
27
28
|
children: /*#__PURE__*/_jsx(View, {
|
|
28
29
|
className: cn('flex-1', background && 'bg-background', className),
|
|
29
30
|
children: /*#__PURE__*/_jsxs(PortalProvider, {
|
|
30
|
-
children: [children, /*#__PURE__*/_jsx(PortalHost, {})]
|
|
31
|
+
children: [children, /*#__PURE__*/_jsx(ToastViewport, {}), /*#__PURE__*/_jsx(PortalHost, {})]
|
|
31
32
|
})
|
|
32
33
|
})
|
|
33
34
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","View","GestureHandlerRootView","PortalHost","PortalProvider","cn","jsx","_jsx","jsxs","_jsxs","PanelUIProvider","children","className","background","style","styles","root","create","flex"],"sourceRoot":"../../../src","sources":["providers/panel-ui-provider.tsx"],"mappings":";;AACA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,UAAU,EAAEC,cAAc,QAAQ,yBAAsB;AACjE,SAASC,EAAE,QAAQ,gBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAgBjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAAC;EAC9BC,QAAQ;EACRC,SAAS;EACTC,UAAU,GAAG;AACO,CAAC,EAAE;EACvB,oBACEN,IAAA,
|
|
1
|
+
{"version":3,"names":["StyleSheet","View","GestureHandlerRootView","PortalHost","PortalProvider","ToastViewport","cn","jsx","_jsx","jsxs","_jsxs","PanelUIProvider","children","className","background","style","styles","root","create","flex"],"sourceRoot":"../../../src","sources":["providers/panel-ui-provider.tsx"],"mappings":";;AACA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,UAAU,EAAEC,cAAc,QAAQ,yBAAsB;AACjE,SAASC,aAAa,QAAQ,8BAAqB;AACnD,SAASC,EAAE,QAAQ,gBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAgBjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAAC;EAC9BC,QAAQ;EACRC,SAAS;EACTC,UAAU,GAAG;AACO,CAAC,EAAE;EACvB,oBACEN,IAAA,CAACN,sBAAsB;IAACa,KAAK,EAAEC,MAAM,CAACC,IAAK;IAAAL,QAAA,eACzCJ,IAAA,CAACP,IAAI;MAACY,SAAS,EAAEP,EAAE,CAAC,QAAQ,EAAEQ,UAAU,IAAI,eAAe,EAAED,SAAS,CAAE;MAAAD,QAAA,eACtEF,KAAA,CAACN,cAAc;QAAAQ,QAAA,GACZA,QAAQ,eAETJ,IAAA,CAACH,aAAa,IAAE,CAAC,eACjBG,IAAA,CAACL,UAAU,IAAE,CAAC;MAAA,CACA;IAAC,CACb;EAAC,CACe,CAAC;AAE7B;AAEA,MAAMa,MAAM,GAAGhB,UAAU,CAACkB,MAAM,CAAC;EAC/BD,IAAI,EAAE;IAAEE,IAAI,EAAE;EAAE;AAClB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { Uniwind, useUniwind } from 'uniwind';
|
|
4
|
+
|
|
5
|
+
/** Themes shipped in `panelui-native/theme.css`. */
|
|
6
|
+
|
|
7
|
+
/** Light/dark mode within a theme family. */
|
|
8
|
+
|
|
9
|
+
/** A theme family — one look, in its light and dark form. */
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The theme families PanelUI ships. Each sets its own palette *and* its own
|
|
13
|
+
* radius scale, so switching family changes the shape of the UI as well as
|
|
14
|
+
* its colour — Panel is the Coss default, Moon is sharp and monochrome,
|
|
15
|
+
* Grass is soft and green.
|
|
16
|
+
*
|
|
17
|
+
* Everything beyond `panel` must be registered in your metro config, or
|
|
18
|
+
* `setTheme` throws "it was not registered":
|
|
19
|
+
*
|
|
20
|
+
* ```js
|
|
21
|
+
* withUniwindConfig(config, {
|
|
22
|
+
* cssEntryFile: './global.css',
|
|
23
|
+
* extraThemes: ['moon', 'moon-dark', 'grass', 'grass-dark'],
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export const PANEL_THEMES = [{
|
|
28
|
+
id: 'panel',
|
|
29
|
+
name: 'Panel',
|
|
30
|
+
light: 'light',
|
|
31
|
+
dark: 'dark',
|
|
32
|
+
swatch: ['#262626', '#f5f5f5']
|
|
33
|
+
}, {
|
|
34
|
+
id: 'moon',
|
|
35
|
+
name: 'Moon',
|
|
36
|
+
light: 'moon',
|
|
37
|
+
dark: 'moon-dark',
|
|
38
|
+
swatch: ['#0070f3', '#0070f3']
|
|
39
|
+
}, {
|
|
40
|
+
id: 'grass',
|
|
41
|
+
name: 'Grass',
|
|
42
|
+
light: 'grass',
|
|
43
|
+
dark: 'grass-dark',
|
|
44
|
+
swatch: ['#24b47e', '#3ecf8e']
|
|
45
|
+
}];
|
|
46
|
+
|
|
47
|
+
/** Every concrete theme name, in registration order. */
|
|
48
|
+
export const PANEL_THEME_NAMES = PANEL_THEMES.flatMap(family => [family.light, family.dark]);
|
|
49
|
+
|
|
50
|
+
/** The names to pass as `extraThemes` in your metro config. */
|
|
51
|
+
export const PANEL_EXTRA_THEMES = PANEL_THEME_NAMES.filter(name => name !== 'light' && name !== 'dark');
|
|
52
|
+
function findFamily(theme) {
|
|
53
|
+
return PANEL_THEMES.find(family => family.light === theme || family.dark === theme) ?? PANEL_THEMES[0];
|
|
54
|
+
}
|
|
55
|
+
|
|
4
56
|
/**
|
|
5
57
|
* Reactive access to the current Uniwind theme plus a setter.
|
|
6
58
|
* Theme changes are applied natively by Uniwind without re-rendering the tree.
|
|
@@ -10,10 +62,45 @@ export function useTheme() {
|
|
|
10
62
|
theme
|
|
11
63
|
} = useUniwind();
|
|
12
64
|
return {
|
|
13
|
-
/**
|
|
14
|
-
theme,
|
|
15
|
-
/** Switch theme
|
|
65
|
+
/** The active theme name, e.g. `'dark'` or `'moon-dark'`. */
|
|
66
|
+
theme: theme,
|
|
67
|
+
/** Switch theme by name, or `'system'` to follow the device. */
|
|
16
68
|
setTheme: name => Uniwind.setTheme(name)
|
|
17
69
|
};
|
|
18
70
|
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Theme family and light/dark mode as two separate axes — what a picker like
|
|
74
|
+
* "choose a brand, then toggle the sun" actually needs.
|
|
75
|
+
*
|
|
76
|
+
* Named themes are not adaptive in Uniwind, so each brand ships as a
|
|
77
|
+
* light/dark pair. Toggling the mode keeps the current family, so a user in
|
|
78
|
+
* Moon dark lands in Moon light rather than the default theme.
|
|
79
|
+
*
|
|
80
|
+
* ```tsx
|
|
81
|
+
* const { family, mode, setFamily, toggleMode } = useThemeMode();
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
export function useThemeMode() {
|
|
85
|
+
const {
|
|
86
|
+
theme
|
|
87
|
+
} = useUniwind();
|
|
88
|
+
const family = findFamily(theme);
|
|
89
|
+
const mode = theme === family.dark ? 'dark' : 'light';
|
|
90
|
+
return {
|
|
91
|
+
/** The active theme family. */
|
|
92
|
+
family,
|
|
93
|
+
/** `'light'` or `'dark'` within that family. */
|
|
94
|
+
mode,
|
|
95
|
+
/** Switch brand, staying in the current light/dark mode. */
|
|
96
|
+
setFamily: id => {
|
|
97
|
+
const next = PANEL_THEMES.find(candidate => candidate.id === id);
|
|
98
|
+
if (next) Uniwind.setTheme(next[mode]);
|
|
99
|
+
},
|
|
100
|
+
/** Set the mode, staying in the current family. */
|
|
101
|
+
setMode: next => Uniwind.setTheme(family[next]),
|
|
102
|
+
/** Flip light ↔ dark within the current family. */
|
|
103
|
+
toggleMode: () => Uniwind.setTheme(mode === 'dark' ? family.light : family.dark)
|
|
104
|
+
};
|
|
105
|
+
}
|
|
19
106
|
//# sourceMappingURL=use-theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Uniwind","useUniwind","
|
|
1
|
+
{"version":3,"names":["Uniwind","useUniwind","PANEL_THEMES","id","name","light","dark","swatch","PANEL_THEME_NAMES","flatMap","family","PANEL_EXTRA_THEMES","filter","findFamily","theme","find","useTheme","setTheme","useThemeMode","mode","setFamily","next","candidate","setMode","toggleMode"],"sourceRoot":"../../../src","sources":["theme/use-theme.ts"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,UAAU,QAAQ,SAAS;;AAE7C;;AAWA;;AAGA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAyC,GAAG,CACvD;EACEC,EAAE,EAAE,OAAO;EACXC,IAAI,EAAE,OAAO;EACbC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS;AAC/B,CAAC,EACD;EACEJ,EAAE,EAAE,MAAM;EACVC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE,MAAM;EACbC,IAAI,EAAE,WAAW;E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G,OAAO;EAEhE,OAAO;IACL;IACAI,MAAM;IACN;IACAS,IAAI;IACJ;IACAC,SAAS,EAAGjB,EAAU,IAAK;MACzB,MAAMkB,IAAI,GAAGnB,YAAY,CAACa,IAAI,CAAEO,SAAS,IAAKA,SAAS,CAACnB,EAAE,KAAKA,EAAE,CAAC;MAClE,IAAIkB,IAAI,EAAErB,OAAO,CAACiB,QAAQ,CAACI,IAAI,CAACF,IAAI,CAAC,CAAC;IACxC,CAAC;IACD;IACAI,OAAO,EAAGF,IAAe,IAAKrB,OAAO,CAACiB,QAAQ,CAACP,MAAM,CAACW,IAAI,CAAC,CAAC;IAC5D;IACAG,UAAU,EAAEA,CAAA,KAAMxB,OAAO,CAACiB,QAAQ,CAACE,IAAI,KAAK,MAAM,GAAGT,MAAM,CAACL,KAAK,GAAGK,MAAM,CAACJ,IAAI;EACjF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accordion — collapsible sections.
|
|
3
|
+
*
|
|
4
|
+
* Adapted from: heroui-inc/heroui-native src/components/accordion/
|
|
5
|
+
* (the Item / Trigger / Indicator / Content anatomy, single vs multiple
|
|
6
|
+
* selection, the rotating chevron indicator, and layout-transition expand).
|
|
7
|
+
*
|
|
8
|
+
* Upstream ships `default` and `surface`; the extra variants here follow the
|
|
9
|
+
* same slot structure.
|
|
10
|
+
*/
|
|
11
|
+
import { type ReactNode } from 'react';
|
|
12
|
+
import { View, type Text as RNText, type ViewProps } from 'react-native';
|
|
13
|
+
import { type TextProps } from '../../primitives/text.js';
|
|
14
|
+
export type AccordionVariant = 'default' | 'surface' | 'separated' | 'bordered' | 'ghost';
|
|
15
|
+
export type AccordionSelectionMode = 'single' | 'multiple';
|
|
16
|
+
export interface AccordionProps extends ViewProps {
|
|
17
|
+
className?: string;
|
|
18
|
+
variant?: AccordionVariant;
|
|
19
|
+
/** `single` collapses the open item when another opens. */
|
|
20
|
+
selectionMode?: AccordionSelectionMode;
|
|
21
|
+
/** Expanded item value(s), controlled. */
|
|
22
|
+
value?: string | string[];
|
|
23
|
+
defaultValue?: string | string[];
|
|
24
|
+
onValueChange?: (value: string | string[]) => void;
|
|
25
|
+
/** Hide the hairlines drawn between items. */
|
|
26
|
+
hideSeparator?: boolean;
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export interface AccordionItemProps extends ViewProps {
|
|
30
|
+
className?: string;
|
|
31
|
+
/** Identifies this item in the accordion's value. */
|
|
32
|
+
value: string;
|
|
33
|
+
isDisabled?: boolean;
|
|
34
|
+
children?: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
export interface AccordionTriggerProps extends ViewProps {
|
|
37
|
+
className?: string;
|
|
38
|
+
children?: ReactNode;
|
|
39
|
+
}
|
|
40
|
+
export interface AccordionIndicatorProps extends ViewProps {
|
|
41
|
+
className?: string;
|
|
42
|
+
/** Replaces the default chevron. */
|
|
43
|
+
children?: ReactNode;
|
|
44
|
+
}
|
|
45
|
+
export interface AccordionContentProps extends ViewProps {
|
|
46
|
+
className?: string;
|
|
47
|
+
children?: ReactNode;
|
|
48
|
+
}
|
|
49
|
+
export declare const Accordion: import("react").ForwardRefExoticComponent<AccordionProps & import("react").RefAttributes<View>> & {
|
|
50
|
+
Item: import("react").ForwardRefExoticComponent<AccordionItemProps & import("react").RefAttributes<View>>;
|
|
51
|
+
Trigger: import("react").ForwardRefExoticComponent<AccordionTriggerProps & import("react").RefAttributes<View>>;
|
|
52
|
+
Title: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<RNText>>;
|
|
53
|
+
Indicator: import("react").ForwardRefExoticComponent<AccordionIndicatorProps & import("react").RefAttributes<View>>;
|
|
54
|
+
Content: import("react").ForwardRefExoticComponent<AccordionContentProps & import("react").RefAttributes<View>>;
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","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,WAAW,uBAAwB,SAAQ,SAAS;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA4BD,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAmCD,eAAO,MAAM,SAAS;;;;;;CAMpB,CAAC"}
|
|
@@ -1,83 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Alert — a status message with an optional leading status icon.
|
|
3
|
+
*
|
|
4
|
+
* Adapted from: heroui-inc/heroui-native src/components/alert/alert.tsx
|
|
5
|
+
* (Indicator / Content / Title / Description anatomy, status-driven icon and
|
|
6
|
+
* title colour), restyled with Coss UI tokens.
|
|
7
|
+
*
|
|
8
|
+
* The `variant` prop name is kept from PanelUI v0.2 rather than renamed to
|
|
9
|
+
* HeroUI's `status`, so existing code keeps working.
|
|
10
|
+
*/
|
|
1
11
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { View, type ViewProps } from 'react-native';
|
|
12
|
+
import { View, type Text as RNText, type ViewProps } from 'react-native';
|
|
3
13
|
import { type VariantProps } from 'tailwind-variants';
|
|
4
14
|
import { type TextProps } from '../../primitives/text.js';
|
|
5
15
|
declare const alertVariants: import("tailwind-variants").TVReturnType<{
|
|
6
16
|
variant: {
|
|
7
17
|
default: {
|
|
8
18
|
root: string;
|
|
19
|
+
title: string;
|
|
9
20
|
};
|
|
10
21
|
info: {
|
|
11
22
|
root: string;
|
|
23
|
+
title: string;
|
|
12
24
|
};
|
|
13
25
|
success: {
|
|
14
26
|
root: string;
|
|
27
|
+
title: string;
|
|
15
28
|
};
|
|
16
29
|
warning: {
|
|
17
30
|
root: string;
|
|
31
|
+
title: string;
|
|
18
32
|
};
|
|
19
33
|
destructive: {
|
|
20
34
|
root: string;
|
|
35
|
+
title: string;
|
|
21
36
|
};
|
|
22
37
|
};
|
|
23
38
|
}, {
|
|
24
39
|
root: string;
|
|
40
|
+
indicator: string;
|
|
41
|
+
content: string;
|
|
25
42
|
title: string;
|
|
26
43
|
description: string;
|
|
27
44
|
}, undefined, {
|
|
28
45
|
variant: {
|
|
29
46
|
default: {
|
|
30
47
|
root: string;
|
|
48
|
+
title: string;
|
|
31
49
|
};
|
|
32
50
|
info: {
|
|
33
51
|
root: string;
|
|
52
|
+
title: string;
|
|
34
53
|
};
|
|
35
54
|
success: {
|
|
36
55
|
root: string;
|
|
56
|
+
title: string;
|
|
37
57
|
};
|
|
38
58
|
warning: {
|
|
39
59
|
root: string;
|
|
60
|
+
title: string;
|
|
40
61
|
};
|
|
41
62
|
destructive: {
|
|
42
63
|
root: string;
|
|
64
|
+
title: string;
|
|
43
65
|
};
|
|
44
66
|
};
|
|
45
67
|
}, {
|
|
46
68
|
root: string;
|
|
69
|
+
indicator: string;
|
|
70
|
+
content: string;
|
|
47
71
|
title: string;
|
|
48
72
|
description: string;
|
|
49
73
|
}, import("tailwind-variants").TVReturnType<{
|
|
50
74
|
variant: {
|
|
51
75
|
default: {
|
|
52
76
|
root: string;
|
|
77
|
+
title: string;
|
|
53
78
|
};
|
|
54
79
|
info: {
|
|
55
80
|
root: string;
|
|
81
|
+
title: string;
|
|
56
82
|
};
|
|
57
83
|
success: {
|
|
58
84
|
root: string;
|
|
85
|
+
title: string;
|
|
59
86
|
};
|
|
60
87
|
warning: {
|
|
61
88
|
root: string;
|
|
89
|
+
title: string;
|
|
62
90
|
};
|
|
63
91
|
destructive: {
|
|
64
92
|
root: string;
|
|
93
|
+
title: string;
|
|
65
94
|
};
|
|
66
95
|
};
|
|
67
96
|
}, {
|
|
68
97
|
root: string;
|
|
98
|
+
indicator: string;
|
|
99
|
+
content: string;
|
|
69
100
|
title: string;
|
|
70
101
|
description: string;
|
|
71
102
|
}, undefined, unknown, unknown, undefined>>;
|
|
72
103
|
export interface AlertProps extends ViewProps, VariantProps<typeof alertVariants> {
|
|
73
104
|
className?: string;
|
|
74
|
-
/**
|
|
105
|
+
/**
|
|
106
|
+
* Leading element rendered before the content.
|
|
107
|
+
*
|
|
108
|
+
* @deprecated Prefer `<Alert.Indicator>`, which picks a status icon for you.
|
|
109
|
+
* Still honoured so v0.2 call sites keep rendering.
|
|
110
|
+
*/
|
|
75
111
|
icon?: ReactNode;
|
|
76
112
|
children?: ReactNode;
|
|
77
113
|
}
|
|
114
|
+
export interface AlertIndicatorProps extends ViewProps {
|
|
115
|
+
className?: string;
|
|
116
|
+
/** Overrides the size/colour of the default status icon. */
|
|
117
|
+
iconProps?: {
|
|
118
|
+
size?: number;
|
|
119
|
+
color?: string;
|
|
120
|
+
};
|
|
121
|
+
/** Replaces the default status icon entirely. */
|
|
122
|
+
children?: ReactNode;
|
|
123
|
+
}
|
|
78
124
|
export declare const Alert: import("react").ForwardRefExoticComponent<AlertProps & import("react").RefAttributes<View>> & {
|
|
79
|
-
|
|
80
|
-
|
|
125
|
+
/** @optional Status icon rendered as the leading visual element. */
|
|
126
|
+
Indicator: import("react").ForwardRefExoticComponent<AlertIndicatorProps & import("react").RefAttributes<View>>;
|
|
127
|
+
/** @optional Wrapper for title and description. */
|
|
128
|
+
Content: import("react").ForwardRefExoticComponent<ViewProps & {
|
|
129
|
+
className?: string;
|
|
130
|
+
} & import("react").RefAttributes<View>>;
|
|
131
|
+
Title: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<RNText>>;
|
|
132
|
+
Description: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<RNText>>;
|
|
81
133
|
};
|
|
82
134
|
export {};
|
|
83
135
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/alert/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/alert/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAG7D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAmCjB,CAAC;AAuBH,MAAM,WAAW,UAAW,SAAQ,SAAS,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA6BD,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,SAAS,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,iDAAiD;IACjD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAqDD,eAAO,MAAM,KAAK;IAChB,oEAAoE;;IAEpE,mDAAmD;;oBA9BW,MAAM;;;;CAkCpE,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
1
2
|
import { View, type ImageProps, type ImageSourcePropType, type ViewProps } from 'react-native';
|
|
2
3
|
import { type VariantProps } from 'tailwind-variants';
|
|
3
4
|
declare const avatarVariants: import("tailwind-variants").TVReturnType<{
|
|
@@ -78,6 +79,12 @@ export interface AvatarProps extends ViewProps, VariantProps<typeof avatarVarian
|
|
|
78
79
|
fallback?: string;
|
|
79
80
|
imageProps?: Omit<ImageProps, 'source'>;
|
|
80
81
|
}
|
|
81
|
-
export
|
|
82
|
+
export interface AvatarBadgeProps extends ViewProps {
|
|
83
|
+
className?: string;
|
|
84
|
+
children?: ReactNode;
|
|
85
|
+
}
|
|
86
|
+
export declare const Avatar: import("react").ForwardRefExoticComponent<AvatarProps & import("react").RefAttributes<View>> & {
|
|
87
|
+
Badge: import("react").ForwardRefExoticComponent<AvatarBadgeProps & import("react").RefAttributes<View>>;
|
|
88
|
+
};
|
|
82
89
|
export {};
|
|
83
90
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/avatar/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/avatar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAEL,IAAI,EACJ,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAI1D,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAiBlB,CAAC;AAEH,MAAM,WAAW,WAAY,SAAQ,SAAS,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;CACzC;AAgDD,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAwBD,eAAO,MAAM,MAAM;;CAEjB,CAAC"}
|
|
@@ -2,6 +2,17 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
import { View, type ViewProps } from 'react-native';
|
|
3
3
|
import { type VariantProps } from 'tailwind-variants';
|
|
4
4
|
declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
shape: {
|
|
6
|
+
default: {};
|
|
7
|
+
/** A bare status dot, no label. */
|
|
8
|
+
dot: {
|
|
9
|
+
root: string;
|
|
10
|
+
};
|
|
11
|
+
/** Circular, for a count sitting over an avatar or an icon. */
|
|
12
|
+
count: {
|
|
13
|
+
root: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
5
16
|
variant: {
|
|
6
17
|
default: {
|
|
7
18
|
root: string;
|
|
@@ -36,6 +47,17 @@ declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
36
47
|
root: string;
|
|
37
48
|
label: string;
|
|
38
49
|
}, undefined, {
|
|
50
|
+
shape: {
|
|
51
|
+
default: {};
|
|
52
|
+
/** A bare status dot, no label. */
|
|
53
|
+
dot: {
|
|
54
|
+
root: string;
|
|
55
|
+
};
|
|
56
|
+
/** Circular, for a count sitting over an avatar or an icon. */
|
|
57
|
+
count: {
|
|
58
|
+
root: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
39
61
|
variant: {
|
|
40
62
|
default: {
|
|
41
63
|
root: string;
|
|
@@ -70,6 +92,17 @@ declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
70
92
|
root: string;
|
|
71
93
|
label: string;
|
|
72
94
|
}, import("tailwind-variants").TVReturnType<{
|
|
95
|
+
shape: {
|
|
96
|
+
default: {};
|
|
97
|
+
/** A bare status dot, no label. */
|
|
98
|
+
dot: {
|
|
99
|
+
root: string;
|
|
100
|
+
};
|
|
101
|
+
/** Circular, for a count sitting over an avatar or an icon. */
|
|
102
|
+
count: {
|
|
103
|
+
root: string;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
73
106
|
variant: {
|
|
74
107
|
default: {
|
|
75
108
|
root: string;
|
|
@@ -108,6 +141,11 @@ export interface BadgeProps extends ViewProps, VariantProps<typeof badgeVariants
|
|
|
108
141
|
children?: ReactNode;
|
|
109
142
|
className?: string;
|
|
110
143
|
labelClassName?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Renders a number instead of children, clamped to "99+". Implies the
|
|
146
|
+
* `count` shape unless you set one.
|
|
147
|
+
*/
|
|
148
|
+
count?: number;
|
|
111
149
|
}
|
|
112
150
|
export declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<View>>;
|
|
113
151
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/badge/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/badge/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D,QAAA,MAAM,aAAa;;;QAQb,mCAAmC;;;;QAEnC,+DAA+D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAF/D,mCAAmC;;;;QAEnC,+DAA+D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAF/D,mCAAmC;;;;QAEnC,+DAA+D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAiBnE,CAAC;AAKH,MAAM,WAAW,UACf,SAAQ,SAAS,EACf,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,KAAK,6FA2BjB,CAAC"}
|