panelui-native 0.22.6 → 0.28.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 +1 -0
- package/lib/module/components/accordion/index.js +8 -8
- package/lib/module/components/accordion/index.js.map +1 -1
- package/lib/module/components/alert/index.js +2 -2
- package/lib/module/components/alert/index.js.map +1 -1
- package/lib/module/components/area-chart/index.js +958 -0
- package/lib/module/components/area-chart/index.js.map +1 -0
- package/lib/module/components/attachment/index.js +2 -1
- package/lib/module/components/attachment/index.js.map +1 -1
- package/lib/module/components/avatar/index.js +4 -4
- package/lib/module/components/avatar/index.js.map +1 -1
- package/lib/module/components/badge/index.js +4 -4
- package/lib/module/components/badge/index.js.map +1 -1
- package/lib/module/components/bar-chart/index.js +994 -0
- package/lib/module/components/bar-chart/index.js.map +1 -0
- package/lib/module/components/bottom-sheet/index.js +213 -24
- package/lib/module/components/bottom-sheet/index.js.map +1 -1
- package/lib/module/components/breadcrumb/index.js +275 -0
- package/lib/module/components/breadcrumb/index.js.map +1 -0
- package/lib/module/components/button/index.js +11 -6
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/calendar/index.js +557 -0
- package/lib/module/components/calendar/index.js.map +1 -0
- package/lib/module/components/carousel/index.js +680 -0
- package/lib/module/components/carousel/index.js.map +1 -0
- package/lib/module/components/chip/index.js +6 -6
- package/lib/module/components/chip/index.js.map +1 -1
- package/lib/module/components/date-picker/index.js +158 -0
- package/lib/module/components/date-picker/index.js.map +1 -0
- package/lib/module/components/dialog/index.js +7 -2
- package/lib/module/components/dialog/index.js.map +1 -1
- package/lib/module/components/direction/index.js +15 -20
- package/lib/module/components/direction/index.js.map +1 -1
- package/lib/module/components/empty-state/index.js +2 -2
- package/lib/module/components/empty-state/index.js.map +1 -1
- package/lib/module/components/field/index.js +5 -5
- package/lib/module/components/field/index.js.map +1 -1
- package/lib/module/components/flow/index.js +3 -3
- package/lib/module/components/flow/index.js.map +1 -1
- package/lib/module/components/frame/index.js +22 -5
- package/lib/module/components/frame/index.js.map +1 -1
- package/lib/module/components/heatmap-chart/index.js +28 -8
- package/lib/module/components/heatmap-chart/index.js.map +1 -1
- package/lib/module/components/input-group/index.js +5 -4
- package/lib/module/components/input-group/index.js.map +1 -1
- package/lib/module/components/item/index.js +9 -9
- package/lib/module/components/item/index.js.map +1 -1
- package/lib/module/components/label/index.js +4 -4
- package/lib/module/components/label/index.js.map +1 -1
- package/lib/module/components/line-chart/index.js +165 -184
- package/lib/module/components/line-chart/index.js.map +1 -1
- package/lib/module/components/loader/index.js +758 -0
- package/lib/module/components/loader/index.js.map +1 -0
- package/lib/module/components/map/basemap.js +265 -0
- package/lib/module/components/map/basemap.js.map +1 -0
- package/lib/module/components/map/index.js +850 -0
- package/lib/module/components/map/index.js.map +1 -0
- package/lib/module/components/map/maplibre.js +87 -0
- package/lib/module/components/map/maplibre.js.map +1 -0
- package/lib/module/components/marker/index.js +3 -3
- package/lib/module/components/marker/index.js.map +1 -1
- package/lib/module/components/message/index.js +15 -14
- package/lib/module/components/message/index.js.map +1 -1
- package/lib/module/components/message-scroller/index.js +5 -4
- package/lib/module/components/message-scroller/index.js.map +1 -1
- package/lib/module/components/otp-input/index.js +2 -2
- package/lib/module/components/popover/index.js +39 -7
- package/lib/module/components/popover/index.js.map +1 -1
- package/lib/module/components/progress/index.js +8 -2
- package/lib/module/components/progress/index.js.map +1 -1
- package/lib/module/components/radio-group/index.js +2 -2
- package/lib/module/components/radio-group/index.js.map +1 -1
- package/lib/module/components/ring-chart/index.js +423 -0
- package/lib/module/components/ring-chart/index.js.map +1 -0
- package/lib/module/components/section-rail/index.js +6 -6
- package/lib/module/components/section-rail/index.js.map +1 -1
- package/lib/module/components/select/index.js +10 -4
- package/lib/module/components/select/index.js.map +1 -1
- package/lib/module/components/separator/index.js +76 -22
- package/lib/module/components/separator/index.js.map +1 -1
- package/lib/module/components/shimmer/index.js +10 -1
- package/lib/module/components/shimmer/index.js.map +1 -1
- package/lib/module/components/slider/index.js +19 -5
- package/lib/module/components/slider/index.js.map +1 -1
- package/lib/module/components/steps/index.js +5 -5
- package/lib/module/components/steps/index.js.map +1 -1
- package/lib/module/components/switch/index.js +6 -1
- package/lib/module/components/switch/index.js.map +1 -1
- package/lib/module/components/tabs/index.js +7 -7
- package/lib/module/components/tabs/index.js.map +1 -1
- package/lib/module/components/timeline/index.js +4 -4
- package/lib/module/components/timeline/index.js.map +1 -1
- package/lib/module/components/toast/index.js +2 -2
- package/lib/module/components/toast/index.js.map +1 -1
- package/lib/module/components/toggle-button/index.js +5 -5
- package/lib/module/components/toggle-button/index.js.map +1 -1
- package/lib/module/components/tooltip/index.js +492 -0
- package/lib/module/components/tooltip/index.js.map +1 -0
- package/lib/module/components/typography/index.js +7 -2
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/module/hooks/index.js +1 -0
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/use-back-handler.js +37 -0
- package/lib/module/hooks/use-back-handler.js.map +1 -0
- package/lib/module/hooks/use-direction.js +43 -0
- package/lib/module/hooks/use-direction.js.map +1 -0
- package/lib/module/icons/index.js +180 -2
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +12 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/primitives/keyboard-avoider.js +2 -1
- package/lib/module/primitives/keyboard-avoider.js.map +1 -1
- package/lib/module/primitives/text.js +55 -11
- package/lib/module/primitives/text.js.map +1 -1
- package/lib/module/utils/chart.js +279 -0
- package/lib/module/utils/chart.js.map +1 -0
- package/lib/module/utils/date.js +386 -0
- package/lib/module/utils/date.js.map +1 -0
- package/lib/typescript/src/components/accordion/index.d.ts.map +1 -1
- package/lib/typescript/src/components/alert/index.d.ts.map +1 -1
- package/lib/typescript/src/components/area-chart/index.d.ts +237 -0
- package/lib/typescript/src/components/area-chart/index.d.ts.map +1 -0
- package/lib/typescript/src/components/attachment/index.d.ts.map +1 -1
- package/lib/typescript/src/components/bar-chart/index.d.ts +270 -0
- package/lib/typescript/src/components/bar-chart/index.d.ts.map +1 -0
- package/lib/typescript/src/components/bottom-sheet/index.d.ts +75 -4
- package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
- package/lib/typescript/src/components/breadcrumb/index.d.ts +100 -0
- package/lib/typescript/src/components/breadcrumb/index.d.ts.map +1 -0
- package/lib/typescript/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/calendar/index.d.ts +108 -0
- package/lib/typescript/src/components/calendar/index.d.ts.map +1 -0
- package/lib/typescript/src/components/carousel/index.d.ts +179 -0
- package/lib/typescript/src/components/carousel/index.d.ts.map +1 -0
- package/lib/typescript/src/components/chip/index.d.ts.map +1 -1
- package/lib/typescript/src/components/date-picker/index.d.ts +91 -0
- package/lib/typescript/src/components/date-picker/index.d.ts.map +1 -0
- package/lib/typescript/src/components/dialog/index.d.ts.map +1 -1
- package/lib/typescript/src/components/direction/index.d.ts +11 -10
- package/lib/typescript/src/components/direction/index.d.ts.map +1 -1
- package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -1
- package/lib/typescript/src/components/field/index.d.ts.map +1 -1
- package/lib/typescript/src/components/frame/index.d.ts +17 -0
- package/lib/typescript/src/components/frame/index.d.ts.map +1 -1
- package/lib/typescript/src/components/heatmap-chart/index.d.ts +22 -3
- package/lib/typescript/src/components/heatmap-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/input-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/item/index.d.ts.map +1 -1
- package/lib/typescript/src/components/label/index.d.ts.map +1 -1
- package/lib/typescript/src/components/line-chart/index.d.ts +42 -2
- package/lib/typescript/src/components/line-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/loader/index.d.ts +38 -0
- package/lib/typescript/src/components/loader/index.d.ts.map +1 -0
- package/lib/typescript/src/components/map/basemap.d.ts +76 -0
- package/lib/typescript/src/components/map/basemap.d.ts.map +1 -0
- package/lib/typescript/src/components/map/index.d.ts +367 -0
- package/lib/typescript/src/components/map/index.d.ts.map +1 -0
- package/lib/typescript/src/components/map/maplibre.d.ts +193 -0
- package/lib/typescript/src/components/map/maplibre.d.ts.map +1 -0
- package/lib/typescript/src/components/marker/index.d.ts.map +1 -1
- package/lib/typescript/src/components/message/index.d.ts.map +1 -1
- package/lib/typescript/src/components/message-scroller/index.d.ts.map +1 -1
- package/lib/typescript/src/components/popover/index.d.ts.map +1 -1
- package/lib/typescript/src/components/progress/index.d.ts.map +1 -1
- package/lib/typescript/src/components/ring-chart/index.d.ts +156 -0
- package/lib/typescript/src/components/ring-chart/index.d.ts.map +1 -0
- package/lib/typescript/src/components/select/index.d.ts.map +1 -1
- package/lib/typescript/src/components/separator/index.d.ts +36 -1
- package/lib/typescript/src/components/separator/index.d.ts.map +1 -1
- package/lib/typescript/src/components/shimmer/index.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/index.d.ts.map +1 -1
- package/lib/typescript/src/components/steps/index.d.ts.map +1 -1
- package/lib/typescript/src/components/switch/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
- package/lib/typescript/src/components/timeline/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toggle-button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tooltip/index.d.ts +125 -0
- package/lib/typescript/src/components/tooltip/index.d.ts.map +1 -0
- package/lib/typescript/src/components/typography/index.d.ts +6 -0
- package/lib/typescript/src/components/typography/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/index.d.ts +1 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-back-handler.d.ts +19 -0
- package/lib/typescript/src/hooks/use-back-handler.d.ts.map +1 -0
- package/lib/typescript/src/hooks/use-direction.d.ts +20 -0
- package/lib/typescript/src/hooks/use-direction.d.ts.map +1 -0
- package/lib/typescript/src/icons/index.d.ts +8 -0
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +14 -4
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/primitives/keyboard-avoider.d.ts.map +1 -1
- package/lib/typescript/src/primitives/text.d.ts +20 -0
- package/lib/typescript/src/primitives/text.d.ts.map +1 -1
- package/lib/typescript/src/utils/chart.d.ts +96 -0
- package/lib/typescript/src/utils/chart.d.ts.map +1 -0
- package/lib/typescript/src/utils/date.d.ts +116 -0
- package/lib/typescript/src/utils/date.d.ts.map +1 -0
- package/package.json +9 -1
- package/src/components/accordion/index.tsx +8 -12
- package/src/components/alert/index.tsx +2 -2
- package/src/components/area-chart/index.tsx +1147 -0
- package/src/components/attachment/index.tsx +2 -2
- package/src/components/avatar/index.tsx +4 -4
- package/src/components/badge/index.tsx +6 -6
- package/src/components/bar-chart/index.tsx +1208 -0
- package/src/components/bottom-sheet/index.tsx +282 -21
- package/src/components/breadcrumb/index.tsx +363 -0
- package/src/components/button/index.tsx +12 -8
- package/src/components/calendar/index.tsx +703 -0
- package/src/components/carousel/index.tsx +788 -0
- package/src/components/chip/index.tsx +6 -8
- package/src/components/date-picker/index.tsx +237 -0
- package/src/components/dialog/index.tsx +7 -2
- package/src/components/direction/index.tsx +22 -22
- package/src/components/empty-state/index.tsx +2 -2
- package/src/components/field/index.tsx +3 -5
- package/src/components/flow/index.tsx +3 -3
- package/src/components/frame/index.tsx +22 -7
- package/src/components/heatmap-chart/index.tsx +58 -11
- package/src/components/input-group/index.tsx +5 -4
- package/src/components/item/index.tsx +9 -9
- package/src/components/label/index.tsx +2 -2
- package/src/components/line-chart/index.tsx +194 -223
- package/src/components/loader/index.tsx +812 -0
- package/src/components/map/basemap.ts +304 -0
- package/src/components/map/index.tsx +1116 -0
- package/src/components/map/maplibre.ts +201 -0
- package/src/components/marker/index.tsx +3 -3
- package/src/components/message/index.tsx +15 -14
- package/src/components/message-scroller/index.tsx +5 -4
- package/src/components/otp-input/index.tsx +2 -2
- package/src/components/popover/index.tsx +43 -7
- package/src/components/progress/index.tsx +10 -2
- package/src/components/radio-group/index.tsx +2 -2
- package/src/components/ring-chart/index.tsx +543 -0
- package/src/components/section-rail/index.tsx +6 -6
- package/src/components/select/index.tsx +10 -4
- package/src/components/separator/index.tsx +77 -19
- package/src/components/shimmer/index.tsx +10 -1
- package/src/components/slider/index.tsx +20 -5
- package/src/components/steps/index.tsx +5 -5
- package/src/components/switch/index.tsx +6 -1
- package/src/components/tabs/index.tsx +7 -9
- package/src/components/timeline/index.tsx +4 -4
- package/src/components/toast/index.tsx +2 -2
- package/src/components/toggle-button/index.tsx +5 -7
- package/src/components/tooltip/index.tsx +610 -0
- package/src/components/typography/index.tsx +7 -2
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-back-handler.ts +37 -0
- package/src/hooks/use-direction.ts +45 -0
- package/src/icons/index.tsx +111 -0
- package/src/index.ts +129 -0
- package/src/primitives/keyboard-avoider.tsx +2 -1
- package/src/primitives/text.tsx +53 -8
- package/src/utils/chart.ts +355 -0
- package/src/utils/date.ts +446 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Breadcrumb — the trail of where you are in a hierarchy.
|
|
5
|
+
*
|
|
6
|
+
* A row of links back up the tree, ending in the page you are on. The last
|
|
7
|
+
* crumb is not a link: you cannot navigate to where you already are, so it is
|
|
8
|
+
* a plain, current-marked label rather than a dead tappable target.
|
|
9
|
+
*
|
|
10
|
+
* The separators are the component's job, not yours. `Breadcrumb.List` drops a
|
|
11
|
+
* chevron between each crumb it holds, so a trail is just its items — there is
|
|
12
|
+
* no separator to forget, mis-order, or leave dangling at the end. Change the
|
|
13
|
+
* glyph once with `separator` on the root and every gap follows.
|
|
14
|
+
*
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <Breadcrumb>
|
|
17
|
+
* <Breadcrumb.List>
|
|
18
|
+
* <Breadcrumb.Item>
|
|
19
|
+
* <Breadcrumb.Link onPress={goHome}>Home</Breadcrumb.Link>
|
|
20
|
+
* </Breadcrumb.Item>
|
|
21
|
+
* <Breadcrumb.Item>
|
|
22
|
+
* <Breadcrumb.Link onPress={goProjects}>Projects</Breadcrumb.Link>
|
|
23
|
+
* </Breadcrumb.Item>
|
|
24
|
+
* <Breadcrumb.Item>
|
|
25
|
+
* <Breadcrumb.Page>PanelUI</Breadcrumb.Page>
|
|
26
|
+
* </Breadcrumb.Item>
|
|
27
|
+
* </Breadcrumb.List>
|
|
28
|
+
* </Breadcrumb>
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* A deep trail on a narrow phone does not wrap into a paragraph: give the list
|
|
32
|
+
* a `maxItems` and it keeps the first and last crumbs, folding the middle into
|
|
33
|
+
* a single ellipsis. Hand the ellipsis an `onEllipsisPress` and it becomes the
|
|
34
|
+
* handle for a menu of the hidden steps.
|
|
35
|
+
*/
|
|
36
|
+
import { Children, createContext, forwardRef, isValidElement, useContext } from 'react';
|
|
37
|
+
import { View } from 'react-native';
|
|
38
|
+
import { tv } from 'tailwind-variants';
|
|
39
|
+
import { useCSSVariable } from 'uniwind';
|
|
40
|
+
import { ChevronRightIcon, EllipsisIcon } from "../../icons/index.js";
|
|
41
|
+
import { AnimatedPressable } from "../../primitives/animated-pressable.js";
|
|
42
|
+
import { Text, textChildren } from "../../primitives/text.js";
|
|
43
|
+
import { cn } from "../../utils/cn.js";
|
|
44
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
45
|
+
const crumbText = tv({
|
|
46
|
+
base: '',
|
|
47
|
+
variants: {
|
|
48
|
+
size: {
|
|
49
|
+
sm: 'text-xs',
|
|
50
|
+
default: 'text-sm'
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
defaultVariants: {
|
|
54
|
+
size: 'default'
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Sub-parts read the density and the shared separator glyph from here, so the
|
|
60
|
+
* trail is configured once on the root rather than repeated per crumb.
|
|
61
|
+
*/
|
|
62
|
+
const BreadcrumbContext = /*#__PURE__*/createContext({
|
|
63
|
+
size: 'default',
|
|
64
|
+
separator: null
|
|
65
|
+
});
|
|
66
|
+
const useBreadcrumb = () => useContext(BreadcrumbContext);
|
|
67
|
+
/**
|
|
68
|
+
* The trail's landmark. Labelled for assistive tech so the row is announced as
|
|
69
|
+
* "Breadcrumb" rather than an anonymous run of links.
|
|
70
|
+
*/
|
|
71
|
+
const BreadcrumbRoot = /*#__PURE__*/forwardRef(({
|
|
72
|
+
className,
|
|
73
|
+
size = 'default',
|
|
74
|
+
separator,
|
|
75
|
+
children,
|
|
76
|
+
...props
|
|
77
|
+
}, ref) => /*#__PURE__*/_jsx(BreadcrumbContext.Provider, {
|
|
78
|
+
value: {
|
|
79
|
+
size,
|
|
80
|
+
separator: separator ?? null
|
|
81
|
+
},
|
|
82
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
83
|
+
ref: ref,
|
|
84
|
+
accessibilityLabel: "Breadcrumb",
|
|
85
|
+
className: cn('w-full', className),
|
|
86
|
+
...props,
|
|
87
|
+
children: textChildren(children)
|
|
88
|
+
})
|
|
89
|
+
}));
|
|
90
|
+
BreadcrumbRoot.displayName = 'Breadcrumb';
|
|
91
|
+
/** A private marker: the slot the collapsed middle crumbs fold into. */
|
|
92
|
+
const COLLAPSE = Symbol('breadcrumb-collapse');
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The crumb row. It owns the separators — one between every pair of crumbs and
|
|
96
|
+
* none at the ends — and the collapsing, so a caller only ever lists items.
|
|
97
|
+
*/
|
|
98
|
+
const BreadcrumbList = /*#__PURE__*/forwardRef(({
|
|
99
|
+
className,
|
|
100
|
+
maxItems,
|
|
101
|
+
itemsBeforeCollapse = 1,
|
|
102
|
+
itemsAfterCollapse = 1,
|
|
103
|
+
onEllipsisPress,
|
|
104
|
+
children,
|
|
105
|
+
...props
|
|
106
|
+
}, ref) => {
|
|
107
|
+
const crumbs = Children.toArray(children).filter(isValidElement);
|
|
108
|
+
|
|
109
|
+
// Fold the middle only when hiding something actually shortens the row:
|
|
110
|
+
// keeping N-1 of N crumbs plus an ellipsis saves nothing.
|
|
111
|
+
let sequence = crumbs;
|
|
112
|
+
if (maxItems !== undefined && crumbs.length > maxItems && itemsBeforeCollapse + itemsAfterCollapse < crumbs.length) {
|
|
113
|
+
const head = crumbs.slice(0, Math.max(0, itemsBeforeCollapse));
|
|
114
|
+
const tail = itemsAfterCollapse > 0 ? crumbs.slice(crumbs.length - itemsAfterCollapse) : [];
|
|
115
|
+
sequence = [...head, COLLAPSE, ...tail];
|
|
116
|
+
}
|
|
117
|
+
return /*#__PURE__*/_jsx(View, {
|
|
118
|
+
ref: ref,
|
|
119
|
+
accessibilityRole: "list",
|
|
120
|
+
className: cn('flex-row flex-wrap items-center gap-1.5', className),
|
|
121
|
+
...props,
|
|
122
|
+
children: sequence.map((node, i) => /*#__PURE__*/_jsxs(View, {
|
|
123
|
+
className: "flex-row items-center gap-1.5",
|
|
124
|
+
children: [i > 0 ? /*#__PURE__*/_jsx(BreadcrumbSeparator, {}) : null, node === COLLAPSE ? /*#__PURE__*/_jsx(BreadcrumbEllipsis, {
|
|
125
|
+
onPress: onEllipsisPress
|
|
126
|
+
}) : node]
|
|
127
|
+
}, i))
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
BreadcrumbList.displayName = 'Breadcrumb.List';
|
|
131
|
+
/** One crumb: wraps a link or the current page. */
|
|
132
|
+
const BreadcrumbItem = /*#__PURE__*/forwardRef(({
|
|
133
|
+
className,
|
|
134
|
+
children,
|
|
135
|
+
...props
|
|
136
|
+
}, ref) => /*#__PURE__*/_jsx(View, {
|
|
137
|
+
ref: ref,
|
|
138
|
+
className: cn('flex-row items-center', className),
|
|
139
|
+
...props,
|
|
140
|
+
children: textChildren(children)
|
|
141
|
+
}));
|
|
142
|
+
BreadcrumbItem.displayName = 'Breadcrumb.Item';
|
|
143
|
+
/**
|
|
144
|
+
* A navigable crumb — an ancestor you can jump back to. Muted until pressed,
|
|
145
|
+
* so the current page (which is not a link) reads as the emphasised end of the
|
|
146
|
+
* trail. A string child is wrapped in the crumb text style; anything else
|
|
147
|
+
* renders as given.
|
|
148
|
+
*/
|
|
149
|
+
const BreadcrumbLink = /*#__PURE__*/forwardRef(({
|
|
150
|
+
className,
|
|
151
|
+
textClassName,
|
|
152
|
+
children,
|
|
153
|
+
...props
|
|
154
|
+
}, ref) => {
|
|
155
|
+
const {
|
|
156
|
+
size
|
|
157
|
+
} = useBreadcrumb();
|
|
158
|
+
return /*#__PURE__*/_jsx(AnimatedPressable, {
|
|
159
|
+
ref: ref,
|
|
160
|
+
accessibilityRole: "link",
|
|
161
|
+
pressScale: 1,
|
|
162
|
+
pressOpacity: 0.6,
|
|
163
|
+
className: cn('flex-row items-center', className),
|
|
164
|
+
...props,
|
|
165
|
+
children: textChildren(children, text => /*#__PURE__*/_jsx(Text, {
|
|
166
|
+
className: crumbText({
|
|
167
|
+
size,
|
|
168
|
+
className: cn('text-muted-foreground', textClassName)
|
|
169
|
+
}),
|
|
170
|
+
children: text
|
|
171
|
+
}))
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
BreadcrumbLink.displayName = 'Breadcrumb.Link';
|
|
175
|
+
/**
|
|
176
|
+
* The trailing crumb: where you are now. Not a link — `aria-current="page"`
|
|
177
|
+
* marks it as the destination, and it is painted in the full foreground so the
|
|
178
|
+
* trail resolves to it.
|
|
179
|
+
*/
|
|
180
|
+
const BreadcrumbPage = /*#__PURE__*/forwardRef(({
|
|
181
|
+
className,
|
|
182
|
+
...props
|
|
183
|
+
}, ref) => {
|
|
184
|
+
const {
|
|
185
|
+
size
|
|
186
|
+
} = useBreadcrumb();
|
|
187
|
+
return /*#__PURE__*/_jsx(Text, {
|
|
188
|
+
ref: ref,
|
|
189
|
+
"aria-current": "page",
|
|
190
|
+
accessibilityRole: "text",
|
|
191
|
+
weight: "medium",
|
|
192
|
+
className: crumbText({
|
|
193
|
+
size,
|
|
194
|
+
className: cn('text-foreground', className)
|
|
195
|
+
}),
|
|
196
|
+
...props
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
BreadcrumbPage.displayName = 'Breadcrumb.Page';
|
|
200
|
+
/**
|
|
201
|
+
* The glyph between crumbs. `Breadcrumb.List` inserts it for you; it is public
|
|
202
|
+
* only for the rare hand-assembled trail. Hidden from screen readers — the
|
|
203
|
+
* order of the crumbs already conveys the hierarchy.
|
|
204
|
+
*/
|
|
205
|
+
const BreadcrumbSeparator = /*#__PURE__*/forwardRef(({
|
|
206
|
+
className,
|
|
207
|
+
children,
|
|
208
|
+
...props
|
|
209
|
+
}, ref) => {
|
|
210
|
+
const {
|
|
211
|
+
separator
|
|
212
|
+
} = useBreadcrumb();
|
|
213
|
+
const rawTint = useCSSVariable('--color-muted-foreground');
|
|
214
|
+
const tint = typeof rawTint === 'string' ? rawTint : undefined;
|
|
215
|
+
const glyph = children ?? separator;
|
|
216
|
+
return /*#__PURE__*/_jsx(View, {
|
|
217
|
+
ref: ref,
|
|
218
|
+
"aria-hidden": true,
|
|
219
|
+
accessibilityElementsHidden: true,
|
|
220
|
+
importantForAccessibility: "no-hide-descendants",
|
|
221
|
+
className: cn('items-center justify-center', className),
|
|
222
|
+
...props,
|
|
223
|
+
children: glyph ?? /*#__PURE__*/_jsx(ChevronRightIcon, {
|
|
224
|
+
size: 14,
|
|
225
|
+
color: tint
|
|
226
|
+
})
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
BreadcrumbSeparator.displayName = 'Breadcrumb.Separator';
|
|
230
|
+
/**
|
|
231
|
+
* Stands in for the crumbs a collapsed trail hides. Static by default; give it
|
|
232
|
+
* an `onPress` (via the list's `onEllipsisPress`) and it becomes the trigger
|
|
233
|
+
* for a menu of the hidden steps. Labelled "Show more" so the collapse is not
|
|
234
|
+
* silent to assistive tech.
|
|
235
|
+
*/
|
|
236
|
+
const BreadcrumbEllipsis = /*#__PURE__*/forwardRef(({
|
|
237
|
+
className,
|
|
238
|
+
onPress,
|
|
239
|
+
...props
|
|
240
|
+
}, ref) => {
|
|
241
|
+
const rawTint = useCSSVariable('--color-muted-foreground');
|
|
242
|
+
const tint = typeof rawTint === 'string' ? rawTint : undefined;
|
|
243
|
+
const glyph = /*#__PURE__*/_jsx(EllipsisIcon, {
|
|
244
|
+
size: 16,
|
|
245
|
+
color: tint
|
|
246
|
+
});
|
|
247
|
+
if (!onPress) {
|
|
248
|
+
return /*#__PURE__*/_jsx(View, {
|
|
249
|
+
ref: ref,
|
|
250
|
+
accessibilityLabel: "More",
|
|
251
|
+
className: cn('h-5 items-center justify-center px-0.5', className),
|
|
252
|
+
children: glyph
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
return /*#__PURE__*/_jsx(AnimatedPressable, {
|
|
256
|
+
ref: ref,
|
|
257
|
+
accessibilityRole: "button",
|
|
258
|
+
accessibilityLabel: "Show more",
|
|
259
|
+
pressScale: 0.92,
|
|
260
|
+
onPress: onPress,
|
|
261
|
+
className: cn('h-5 items-center justify-center px-0.5', className),
|
|
262
|
+
...props,
|
|
263
|
+
children: glyph
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
BreadcrumbEllipsis.displayName = 'Breadcrumb.Ellipsis';
|
|
267
|
+
export const Breadcrumb = Object.assign(BreadcrumbRoot, {
|
|
268
|
+
List: BreadcrumbList,
|
|
269
|
+
Item: BreadcrumbItem,
|
|
270
|
+
Link: BreadcrumbLink,
|
|
271
|
+
Page: BreadcrumbPage,
|
|
272
|
+
Separator: BreadcrumbSeparator,
|
|
273
|
+
Ellipsis: BreadcrumbEllipsis
|
|
274
|
+
});
|
|
275
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Children","createContext","forwardRef","isValidElement","useContext","View","tv","useCSSVariable","ChevronRightIcon","EllipsisIcon","AnimatedPressable","Text","textChildren","cn","jsx","_jsx","jsxs","_jsxs","crumbText","base","variants","size","sm","default","defaultVariants","BreadcrumbContext","separator","useBreadcrumb","BreadcrumbRoot","className","children","props","ref","Provider","value","accessibilityLabel","displayName","COLLAPSE","Symbol","BreadcrumbList","maxItems","itemsBeforeCollapse","itemsAfterCollapse","onEllipsisPress","crumbs","toArray","filter","sequence","undefined","length","head","slice","Math","max","tail","accessibilityRole","map","node","i","BreadcrumbSeparator","BreadcrumbEllipsis","onPress","BreadcrumbItem","BreadcrumbLink","textClassName","pressScale","pressOpacity","text","BreadcrumbPage","weight","rawTint","tint","glyph","accessibilityElementsHidden","importantForAccessibility","color","Breadcrumb","Object","assign","List","Item","Link","Page","Separator","Ellipsis"],"sourceRoot":"../../../../src","sources":["components/breadcrumb/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEA,QAAQ,EACRC,aAAa,EACbC,UAAU,EACVC,cAAc,EACdC,UAAU,QAEL,OAAO;AACd,SAASC,IAAI,QAAwB,cAAc;AACnD,SAASC,EAAE,QAA2B,mBAAmB;AACzD,SAASC,cAAc,QAAQ,SAAS;AACxC,SAASC,gBAAgB,EAAEC,YAAY,QAAQ,sBAAa;AAC5D,SACEC,iBAAiB,QAEZ,wCAAqC;AAC5C,SAASC,IAAI,EAAkBC,YAAY,QAAQ,0BAAuB;AAC1E,SAASC,EAAE,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAIpC,MAAMC,SAAS,GAAGZ,EAAE,CAAC;EACnBa,IAAI,EAAE,EAAE;EACRC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,SAAS;MACbC,OAAO,EAAE;IACX;EACF,CAAC;EACDC,eAAe,EAAE;IAAEH,IAAI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;EACzC,MAAMsC,OAAO,GAAG/D,cAAc,CAAC,0BAA0B,CAAC;EAC1D,MAAMgE,IAAI,GAAG,OAAOD,OAAO,KAAK,QAAQ,GAAGA,OAAO,GAAGtB,SAAS;EAC9D,MAAMwB,KAAK,gBAAGzD,IAAA,CAACN,YAAY;IAACY,IAAI,EAAE,EAAG;IAACsD,KAAK,EAAEJ;EAAK,CAAE,CAAC;EAErD,IAAI,CAACV,OAAO,EAAE;IACZ,oBACE9C,IAAA,CAACV,IAAI;MACH2B,GAAG,EAAEA,GAAI;MACTG,kBAAkB,EAAC,MAAM;MACzBN,SAAS,EAAEhB,EAAE,CAAC,wCAAwC,EAAEgB,SAAS,CAAE;MAAAC,QAAA,EAElE0C;IAAK,CACF,CAAC;EAEX;EAEA,oBACEzD,IAAA,CAACL,iBAAiB;IAChBsB,GAAG,EAAEA,GAAI;IACTuB,iBAAiB,EAAC,QAAQ;IAC1BpB,kBAAkB,EAAC,WAAW;IAC9B8B,UAAU,EAAE,IAAK;IACjBJ,OAAO,EAAEA,OAAQ;IACjBhC,SAAS,EAAEhB,EAAE,CAAC,wCAAwC,EAAEgB,SAAS,CAAE;IAAA,GAC/DE,KAAK;IAAAD,QAAA,EAER0C;EAAK,CACW,CAAC;AAExB,CACF,CAAC;AACDZ,kBAAkB,CAACxB,WAAW,GAAG,qBAAqB;AAEtD,OAAO,MAAMwC,UAAU,GAAGC,MAAM,CAACC,MAAM,CAAClD,cAAc,EAAE;EACtDmD,IAAI,EAAExC,cAAc;EACpByC,IAAI,EAAElB,cAAc;EACpBmB,IAAI,EAAElB,cAAc;EACpBmB,IAAI,EAAEd,cAAc;EACpBe,SAAS,EAAExB,mBAAmB;EAC9ByB,QAAQ,EAAExB;AACZ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -4,11 +4,11 @@ import { forwardRef } from 'react';
|
|
|
4
4
|
import { tv } from 'tailwind-variants';
|
|
5
5
|
import { useCSSVariable } from 'uniwind';
|
|
6
6
|
import { AnimatedPressable } from "../../primitives/animated-pressable.js";
|
|
7
|
-
import { Text } from "../../primitives/text.js";
|
|
7
|
+
import { Text, textChildren } from "../../primitives/text.js";
|
|
8
8
|
import { IconColorProvider } from "../../icons/index.js";
|
|
9
9
|
import { getNativeUI } from "../../native/index.js";
|
|
10
10
|
import { Spinner } from "../spinner/index.js";
|
|
11
|
-
import {
|
|
11
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
const buttonVariants = tv({
|
|
13
13
|
slots: {
|
|
14
14
|
root: 'flex-row items-center justify-center gap-2 rounded-lg border border-transparent',
|
|
@@ -182,7 +182,12 @@ export const Button = /*#__PURE__*/forwardRef(({
|
|
|
182
182
|
children: isStringLabel ? undefined : /*#__PURE__*/_jsx(RNHostView, {
|
|
183
183
|
matchContents: true,
|
|
184
184
|
children: /*#__PURE__*/_jsx(_Fragment, {
|
|
185
|
-
children: children
|
|
185
|
+
children: textChildren(children, text => /*#__PURE__*/_jsx(Text, {
|
|
186
|
+
className: label({
|
|
187
|
+
className: labelClassName
|
|
188
|
+
}),
|
|
189
|
+
children: text
|
|
190
|
+
}))
|
|
186
191
|
})
|
|
187
192
|
})
|
|
188
193
|
})
|
|
@@ -205,12 +210,12 @@ export const Button = /*#__PURE__*/forwardRef(({
|
|
|
205
210
|
children: [loading ? /*#__PURE__*/_jsx(Spinner, {
|
|
206
211
|
size: SPINNER_SIZE[size ?? 'md'],
|
|
207
212
|
className: spinner()
|
|
208
|
-
}) : startContent,
|
|
213
|
+
}) : startContent, textChildren(children, text => /*#__PURE__*/_jsx(Text, {
|
|
209
214
|
className: label({
|
|
210
215
|
className: labelClassName
|
|
211
216
|
}),
|
|
212
|
-
children:
|
|
213
|
-
})
|
|
217
|
+
children: text
|
|
218
|
+
})), endContent]
|
|
214
219
|
})
|
|
215
220
|
});
|
|
216
221
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","tv","useCSSVariable","AnimatedPressable","Text","IconColorProvider","getNativeUI","Spinner","
|
|
1
|
+
{"version":3,"names":["forwardRef","tv","useCSSVariable","AnimatedPressable","Text","textChildren","IconColorProvider","getNativeUI","Spinner","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","buttonVariants","slots","root","label","spinner","variants","variant","primary","secondary","outline","ghost","destructive","social","size","sm","md","lg","icon","fullWidth","true","disabled","defaultVariants","SPINNER_SIZE","CONTENT_COLOR_VAR","NATIVE_HEIGHT","NATIVE_VARIANT","Button","children","className","labelClassName","loading","startContent","endContent","native","props","ref","isDisabled","nativeUI","themedColor","contentColor","undefined","Host","NativeButton","RNHostView","isStringLabel","matchContents","style","height","onPress","text","color","accessibilityRole","accessibilityState","busy","displayName"],"sourceRoot":"../../../../src","sources":["components/button/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAElD,SAASC,EAAE,QAA2B,mBAAmB;AACzD,SAASC,cAAc,QAAQ,SAAS;AACxC,SACEC,iBAAiB,QAEZ,wCAAqC;AAC5C,SAASC,IAAI,EAAEC,YAAY,QAAQ,0BAAuB;AAC1D,SAASC,iBAAiB,QAAQ,sBAAa;AAC/C,SAASC,WAAW,QAAQ,uBAAc;AAC1C,SAASC,OAAO,QAAQ,qBAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAErC,MAAMC,cAAc,GAAGd,EAAE,CAAC;EACxBe,KAAK,EAAE;IACLC,IAAI,EAAE,iFAAiF;IACvFC,KAAK,EAAE,aAAa;IACpBC,OAAO,EAAE;EACX,CAAC;EACDC,QAAQ,EAAE;IACRC,OAAO,EAAE;MACPC,OAAO,EAAE;QACPL,IAAI,EAAE,qCAAqC;QAC3CC,KAAK,EAAE,yBAAyB;QAChCC,OAAO,EAAE;MACX,CAAC;MACDI,SAAS,EAAE;QACTN,IAAI,EAAE,cAAc;QACpBC,KAAK,EAAE,2BAA2B;QAClCC,O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