panelui-native 0.38.0 → 0.41.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.
- package/README.md +3 -1
- package/lib/module/components/card/index.js +172 -3
- package/lib/module/components/card/index.js.map +1 -1
- package/lib/module/components/drawer/index.js +13 -4
- package/lib/module/components/drawer/index.js.map +1 -1
- package/lib/module/components/heatmap-chart/index.js +113 -6
- package/lib/module/components/heatmap-chart/index.js.map +1 -1
- package/lib/module/components/map/index.js +72 -12
- package/lib/module/components/map/index.js.map +1 -1
- package/lib/module/components/pagination/index.js +529 -0
- package/lib/module/components/pagination/index.js.map +1 -0
- package/lib/module/components/panelside/index.js +68 -18
- package/lib/module/components/panelside/index.js.map +1 -1
- package/lib/module/components/ring-chart/index.js +183 -45
- package/lib/module/components/ring-chart/index.js.map +1 -1
- package/lib/module/components/steps/index.js +8 -6
- package/lib/module/components/steps/index.js.map +1 -1
- package/lib/module/components/table/index.js +100 -26
- package/lib/module/components/table/index.js.map +1 -1
- package/lib/module/components/text-animation/index.js +857 -0
- package/lib/module/components/text-animation/index.js.map +1 -0
- package/lib/module/components/timeline/index.js +8 -7
- package/lib/module/components/timeline/index.js.map +1 -1
- package/lib/module/icons/index.js +25 -7
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/components/card/index.d.ts +20 -0
- package/lib/typescript/src/components/card/index.d.ts.map +1 -1
- package/lib/typescript/src/components/drawer/index.d.ts +13 -1
- package/lib/typescript/src/components/drawer/index.d.ts.map +1 -1
- package/lib/typescript/src/components/heatmap-chart/index.d.ts +51 -3
- package/lib/typescript/src/components/heatmap-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/map/index.d.ts +37 -2
- package/lib/typescript/src/components/map/index.d.ts.map +1 -1
- package/lib/typescript/src/components/pagination/index.d.ts +285 -0
- package/lib/typescript/src/components/pagination/index.d.ts.map +1 -0
- package/lib/typescript/src/components/panelside/index.d.ts +50 -4
- package/lib/typescript/src/components/panelside/index.d.ts.map +1 -1
- package/lib/typescript/src/components/ring-chart/index.d.ts +75 -8
- package/lib/typescript/src/components/ring-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/steps/index.d.ts +8 -6
- package/lib/typescript/src/components/steps/index.d.ts.map +1 -1
- package/lib/typescript/src/components/table/index.d.ts +59 -17
- package/lib/typescript/src/components/table/index.d.ts.map +1 -1
- package/lib/typescript/src/components/text-animation/index.d.ts +268 -0
- package/lib/typescript/src/components/text-animation/index.d.ts.map +1 -0
- package/lib/typescript/src/components/timeline/index.d.ts +8 -7
- package/lib/typescript/src/components/timeline/index.d.ts.map +1 -1
- package/lib/typescript/src/icons/index.d.ts +6 -0
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +6 -4
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/card/index.tsx +227 -2
- package/src/components/drawer/index.tsx +31 -9
- package/src/components/heatmap-chart/index.tsx +147 -5
- package/src/components/map/index.tsx +158 -14
- package/src/components/pagination/index.tsx +603 -0
- package/src/components/panelside/index.tsx +134 -19
- package/src/components/ring-chart/index.tsx +269 -47
- package/src/components/steps/index.tsx +8 -6
- package/src/components/table/index.tsx +146 -30
- package/src/components/text-animation/index.tsx +1093 -0
- package/src/components/timeline/index.tsx +8 -7
- package/src/icons/index.tsx +23 -4
- package/src/index.ts +28 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Timeline — a vertical sequence of events.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* One `value` on the root says how far the sequence has got, and every item
|
|
5
|
+
* resolves its own state from its `step` against it — completed below, active
|
|
6
|
+
* at, inactive above. Stating it once is the point: a timeline whose items each
|
|
7
|
+
* carried their own state would let you write two active items, or none.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* `
|
|
9
|
+
* State is resolved in JS and handed down through context into `tv()` variants
|
|
10
|
+
* rather than being read off the element, because React Native has no
|
|
11
|
+
* attribute selectors for a stylesheet to key off. `Steps` resolves its states
|
|
12
|
+
* the same way, so the two read as siblings.
|
|
12
13
|
*
|
|
13
14
|
* Vertical only — a horizontal timeline gives each item roughly a fifth of a
|
|
14
15
|
* phone's width, which is not enough for a date and a title.
|
package/src/icons/index.tsx
CHANGED
|
@@ -15,6 +15,12 @@
|
|
|
15
15
|
*
|
|
16
16
|
* Brand marks (Google, Facebook, Apple) are the exception: they carry their
|
|
17
17
|
* own colours and ignore the context.
|
|
18
|
+
*
|
|
19
|
+
* A glyph whose *meaning* is a horizontal direction mirrors in a right-to-left
|
|
20
|
+
* subtree — the chevrons, the outward arrow, the send plane. Everything else
|
|
21
|
+
* is drawn once and left alone, including the vertical arrows, since the
|
|
22
|
+
* vertical axis does not mirror, and including asymmetric glyphs that are not
|
|
23
|
+
* directions (a magnifier, a pencil, a play triangle).
|
|
18
24
|
*/
|
|
19
25
|
import { createContext, useContext, type ReactNode } from 'react';
|
|
20
26
|
import Svg, { Circle, G, Path, type SvgProps } from 'react-native-svg';
|
|
@@ -226,11 +232,20 @@ export function ChevronDownIcon({ size = 16, color, ...props }: IconProps) {
|
|
|
226
232
|
*
|
|
227
233
|
* Only for glyphs whose meaning *is* a direction. An icon that happens to be
|
|
228
234
|
* asymmetric — a pencil, a magnifier — means the same thing either way round,
|
|
229
|
-
* and flipping it is just a wrong drawing.
|
|
235
|
+
* and flipping it is just a wrong drawing. The vertical axis never mirrors, so
|
|
236
|
+
* the up and down glyphs stay as they are drawn.
|
|
237
|
+
*
|
|
238
|
+
* Left-to-right gets an identity transform rather than no transform at all.
|
|
239
|
+
* Dropping the prop leaves the last matrix the view was given in place, so a
|
|
240
|
+
* glyph mirrored once stays mirrored when the direction flips back — the
|
|
241
|
+
* arrows in an app that can switch direction at runtime end up pointing at the
|
|
242
|
+
* text one toggle in, and never recover.
|
|
230
243
|
*/
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
244
|
+
const IDENTITY = 'translate(0 0)';
|
|
245
|
+
const MIRROR = 'scale(-1 1) translate(-24 0)';
|
|
246
|
+
|
|
247
|
+
function useFlip(): { transform: string } {
|
|
248
|
+
return { transform: useDirection() === 'rtl' ? MIRROR : IDENTITY };
|
|
234
249
|
}
|
|
235
250
|
|
|
236
251
|
export function ChevronLeftIcon({ size = 16, color, ...props }: IconProps) {
|
|
@@ -325,6 +340,7 @@ export function SearchIcon({ size = 16, color, ...props }: IconProps) {
|
|
|
325
340
|
|
|
326
341
|
export function ArrowUpRightIcon({ size = 20, color, ...props }: IconProps) {
|
|
327
342
|
const resolved = useResolvedColor(color, '#fff');
|
|
343
|
+
const flip = useFlip();
|
|
328
344
|
return (
|
|
329
345
|
<Svg width={size} height={size} viewBox="0 0 24 24" fill="none" {...props}>
|
|
330
346
|
<Path
|
|
@@ -333,6 +349,7 @@ export function ArrowUpRightIcon({ size = 20, color, ...props }: IconProps) {
|
|
|
333
349
|
strokeWidth={2}
|
|
334
350
|
strokeLinecap="round"
|
|
335
351
|
strokeLinejoin="round"
|
|
352
|
+
{...flip}
|
|
336
353
|
/>
|
|
337
354
|
</Svg>
|
|
338
355
|
);
|
|
@@ -618,6 +635,7 @@ export function ReceiptIcon({ size = 16, color, ...props }: IconProps) {
|
|
|
618
635
|
/** Paper plane — sent, submitted, approved-and-forwarded. */
|
|
619
636
|
export function SendIcon({ size = 16, color, ...props }: IconProps) {
|
|
620
637
|
const resolved = useResolvedColor(color, '#737373');
|
|
638
|
+
const flip = useFlip();
|
|
621
639
|
return (
|
|
622
640
|
<Svg width={size} height={size} viewBox="0 0 24 24" fill="none" {...props}>
|
|
623
641
|
<Path
|
|
@@ -625,6 +643,7 @@ export function SendIcon({ size = 16, color, ...props }: IconProps) {
|
|
|
625
643
|
stroke={resolved}
|
|
626
644
|
strokeWidth={2}
|
|
627
645
|
strokeLinejoin="round"
|
|
646
|
+
{...flip}
|
|
628
647
|
/>
|
|
629
648
|
</Svg>
|
|
630
649
|
);
|
package/src/index.ts
CHANGED
|
@@ -267,6 +267,7 @@ export {
|
|
|
267
267
|
type TableCellProps,
|
|
268
268
|
type TableCaptionProps,
|
|
269
269
|
type TableEmptyProps,
|
|
270
|
+
type TableColumn,
|
|
270
271
|
type TableSortDirection,
|
|
271
272
|
} from './components/table';
|
|
272
273
|
export {
|
|
@@ -295,7 +296,7 @@ export {
|
|
|
295
296
|
type CalendarSelection,
|
|
296
297
|
type DateRange,
|
|
297
298
|
} from './components/calendar';
|
|
298
|
-
export { Card, type CardProps } from './components/card';
|
|
299
|
+
export { Card, type CardProps, type CardWashProps } from './components/card';
|
|
299
300
|
export { Checkbox, type CheckboxProps } from './components/checkbox';
|
|
300
301
|
export {
|
|
301
302
|
Chip,
|
|
@@ -325,6 +326,7 @@ export {
|
|
|
325
326
|
type DrawerCloseProps,
|
|
326
327
|
type DrawerSide,
|
|
327
328
|
type DrawerSize,
|
|
329
|
+
type DrawerCloseSide,
|
|
328
330
|
} from './components/drawer';
|
|
329
331
|
export {
|
|
330
332
|
EmptyState,
|
|
@@ -389,8 +391,24 @@ export {
|
|
|
389
391
|
type PanelsideTriggerProps,
|
|
390
392
|
type PanelsideMode,
|
|
391
393
|
type PanelsideSwipeFrom,
|
|
394
|
+
type PanelsideItemSize,
|
|
395
|
+
type PanelsideCtaSize,
|
|
392
396
|
type UsePanelsideResult,
|
|
393
397
|
} from './components/panelside';
|
|
398
|
+
export {
|
|
399
|
+
Pagination,
|
|
400
|
+
paginationRange,
|
|
401
|
+
type PaginationProps,
|
|
402
|
+
type PaginationItemProps,
|
|
403
|
+
type PaginationPreviousProps,
|
|
404
|
+
type PaginationNextProps,
|
|
405
|
+
type PaginationEllipsisProps,
|
|
406
|
+
type PaginationSummaryProps,
|
|
407
|
+
type PaginationStatusProps,
|
|
408
|
+
type PaginationVariant,
|
|
409
|
+
type PaginationSize,
|
|
410
|
+
type PaginationItemValue,
|
|
411
|
+
} from './components/pagination';
|
|
394
412
|
export { Textarea, type TextareaProps } from './components/textarea';
|
|
395
413
|
export {
|
|
396
414
|
Item,
|
|
@@ -606,6 +624,15 @@ export {
|
|
|
606
624
|
type ScrollTextEffect,
|
|
607
625
|
type ScrollTextSplit,
|
|
608
626
|
} from './components/scroll-text';
|
|
627
|
+
export {
|
|
628
|
+
TextAnimation,
|
|
629
|
+
type TextAnimationProps,
|
|
630
|
+
type TextAnimationTypingProps,
|
|
631
|
+
type TextAnimationRotatingProps,
|
|
632
|
+
type TextAnimationCountingProps,
|
|
633
|
+
type TextAnimationSlidingProps,
|
|
634
|
+
type TextAnimationScrollingProps,
|
|
635
|
+
} from './components/text-animation';
|
|
609
636
|
export {
|
|
610
637
|
ScrollCanvas,
|
|
611
638
|
type ScrollCanvasProps,
|