@kanso-labs/react-native-kanso-ui 0.1.0 → 0.2.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/dist/button/index.d.ts +24 -2
- package/dist/button/index.js.map +1 -1
- package/dist/button/pending.js +144 -0
- package/dist/button/pending.js.map +1 -0
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/button/index.js +154 -112
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/icon-button/index.d.ts +1 -1
- package/dist/components/icon-button/index.js +160 -110
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/meter/index.d.ts +73 -0
- package/dist/components/meter/index.js +179 -0
- package/dist/components/meter/index.js.map +1 -0
- package/dist/components/number-field/index.js +1 -9
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/progress-indicator/index.d.ts +113 -0
- package/dist/components/progress-indicator/index.js +1024 -0
- package/dist/components/progress-indicator/index.js.map +1 -0
- package/dist/components/snackbar/index.d.ts +120 -0
- package/dist/components/snackbar/index.js +540 -0
- package/dist/components/snackbar/index.js.map +1 -0
- package/dist/glyphs/hidden.js +13 -0
- package/dist/glyphs/hidden.js.map +1 -0
- package/dist/glyphs/index.js +2 -8
- package/dist/glyphs/index.js.map +1 -1
- package/dist/i18n/index.js +23 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/messages.js +41 -0
- package/dist/i18n/messages.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +6 -3
- package/dist/indicator/index.d.ts +15 -0
- package/dist/indicator/index.js +256 -0
- package/dist/indicator/index.js.map +1 -0
- package/dist/indicator/motion.js +86 -0
- package/dist/indicator/motion.js.map +1 -0
- package/dist/indicator/paths.js +72 -0
- package/dist/indicator/paths.js.map +1 -0
- package/dist/indicator/styles.js +62 -0
- package/dist/indicator/styles.js.map +1 -0
- package/dist/number/locale.js +14 -0
- package/dist/number/locale.js.map +1 -0
- package/dist/overlay/host.js +65 -2
- package/dist/overlay/host.js.map +1 -1
- package/dist/press/index.js +10 -9
- package/dist/press/index.js.map +1 -1
- package/dist/theme/resolve.js +1 -1
- package/dist/theme/resolve.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { IndicatorTone } from "../../indicator/index.js";
|
|
2
|
+
import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
3
|
+
import { Ref } from "react";
|
|
4
|
+
//#region src/components/progress-indicator/index.d.ts
|
|
5
|
+
type ProgressIndicatorProps = Omit<ViewProps, 'children' | 'style'> & {
|
|
6
|
+
/**
|
|
7
|
+
* How far the work is loaded ahead of the value, a video's buffered
|
|
8
|
+
* seconds or a queue's fetched pages. Read on the same scale as `value`:
|
|
9
|
+
* the track is solid up to it and dotted beyond. Ignored while the
|
|
10
|
+
* indicator is indeterminate and by the ring, and left out for work with
|
|
11
|
+
* nothing to buffer.
|
|
12
|
+
*/
|
|
13
|
+
readonly buffer?: number;
|
|
14
|
+
/**
|
|
15
|
+
* How wide the ring is drawn, as a CSS length read the way a theme's
|
|
16
|
+
* lengths are. Everything inside scales with it, so a ring in a button can
|
|
17
|
+
* take the button's icon size. The length is in px, since a relative unit
|
|
18
|
+
* has nothing on native to be relative to. Ignored by the line, which fills
|
|
19
|
+
* the width it is given.
|
|
20
|
+
* @default '40px', or '48px' for the wavy ring
|
|
21
|
+
*/
|
|
22
|
+
readonly diameter?: `${number}px`;
|
|
23
|
+
/**
|
|
24
|
+
* How the value reads.
|
|
25
|
+
* @default { style: 'percent' }
|
|
26
|
+
*/
|
|
27
|
+
readonly formatOptions?: Intl.NumberFormatOptions;
|
|
28
|
+
/**
|
|
29
|
+
* For work whose length is not known: the indicator runs on its own, and
|
|
30
|
+
* has no value to show or announce.
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
readonly isIndeterminate?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* What the work is, shown above the indicator. A screen reader reads it as
|
|
36
|
+
* the indicator's name; an indicator whose surroundings name it takes
|
|
37
|
+
* `aria-label` instead and leaves this out.
|
|
38
|
+
*/
|
|
39
|
+
readonly label?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The BCP 47 locale the value is written in. Defaults to the device's.
|
|
42
|
+
*/
|
|
43
|
+
readonly locale?: string;
|
|
44
|
+
/**
|
|
45
|
+
* The value at which the work is done.
|
|
46
|
+
* @default 100
|
|
47
|
+
*/
|
|
48
|
+
readonly maxValue?: number;
|
|
49
|
+
/**
|
|
50
|
+
* The value at which the work starts.
|
|
51
|
+
* @default 0
|
|
52
|
+
*/
|
|
53
|
+
readonly minValue?: number;
|
|
54
|
+
readonly ref?: Ref<View>;
|
|
55
|
+
/**
|
|
56
|
+
* The page's two shapes. `wavy` draws the active indicator as a wave, which
|
|
57
|
+
* lies flat near either end of a determinate value, and leaves the track
|
|
58
|
+
* and the stop flat; the wavy ring is 48dp across rather than 40. Under
|
|
59
|
+
* reduced motion a wavy indicator is drawn flat.
|
|
60
|
+
* @default 'flat'
|
|
61
|
+
*/
|
|
62
|
+
readonly shape?: ProgressIndicatorShape;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the value is shown beside the label. Ignored while the indicator
|
|
65
|
+
* is indeterminate, which has no value to show.
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
68
|
+
readonly showValue?: boolean;
|
|
69
|
+
readonly style?: StyleProp<ViewStyle>;
|
|
70
|
+
/**
|
|
71
|
+
* Which colours it is drawn in. `primary` is the page's own pair, the active
|
|
72
|
+
* indicator in primary over a secondary container track, and `inherit`
|
|
73
|
+
* takes the colour of the slot it sits in, for an indicator inside something
|
|
74
|
+
* that already has one, such as a button, where primary would be the fill.
|
|
75
|
+
* @default 'primary'
|
|
76
|
+
*/
|
|
77
|
+
readonly tone?: ProgressIndicatorTone;
|
|
78
|
+
/**
|
|
79
|
+
* How far the work has gone, between `minValue` and `maxValue`.
|
|
80
|
+
* @default 0
|
|
81
|
+
*/
|
|
82
|
+
readonly value?: number;
|
|
83
|
+
/** The value as words, in place of the number `formatOptions` writes. */
|
|
84
|
+
readonly valueLabel?: string;
|
|
85
|
+
/**
|
|
86
|
+
* The line the page draws, or the ring: `linear` fills the width it is
|
|
87
|
+
* given, `circular` is 40dp across.
|
|
88
|
+
* @default 'linear'
|
|
89
|
+
*/
|
|
90
|
+
readonly variant?: ProgressIndicatorVariant;
|
|
91
|
+
};
|
|
92
|
+
type ProgressIndicatorShape = 'flat' | 'wavy';
|
|
93
|
+
type ProgressIndicatorTone = Extract<IndicatorTone, 'inherit' | 'primary'>;
|
|
94
|
+
type ProgressIndicatorVariant = 'circular' | 'linear';
|
|
95
|
+
/**
|
|
96
|
+
* Progress through a task, as a line or a ring. Pass `value` between
|
|
97
|
+
* `minValue` and `maxValue`, or set `isIndeterminate` for work whose length is
|
|
98
|
+
* not known. `formatOptions` says how the value reads, in `locale`, and
|
|
99
|
+
* `buffer` marks how far the work is loaded ahead of it.
|
|
100
|
+
*
|
|
101
|
+
* ```tsx
|
|
102
|
+
* <ProgressIndicator label="Label" showValue value={40} />
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* A screen reader hears it as a progress bar named by its label, with its
|
|
106
|
+
* value as `formatOptions` writes it, and no value while it is indeterminate.
|
|
107
|
+
* `style`, `ref` and `testID` land on the indicator as a whole, which is the
|
|
108
|
+
* view a layout positions.
|
|
109
|
+
*/
|
|
110
|
+
declare function ProgressIndicator({ 'aria-label': ariaLabel, buffer, diameter, formatOptions, isIndeterminate, label, locale, maxValue, minValue, shape, showValue, style, tone, value, valueLabel, variant, ...props }: ProgressIndicatorProps): import("react").JSX.Element;
|
|
111
|
+
//#endregion
|
|
112
|
+
export { ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorShape, type ProgressIndicatorTone, type ProgressIndicatorVariant };
|
|
113
|
+
//# sourceMappingURL=index.d.ts.map
|