@kanso-labs/react-native-kanso-ui 0.9.0 → 0.10.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 (196) hide show
  1. package/README.md +4 -3
  2. package/dist/autocomplete/index.js +15 -1
  3. package/dist/autocomplete/index.js.map +1 -1
  4. package/dist/button/group.d.ts +5 -0
  5. package/dist/button/group.js +115 -0
  6. package/dist/button/group.js.map +1 -0
  7. package/dist/button/index.d.ts +4 -1
  8. package/dist/button/index.js +44 -22
  9. package/dist/button/index.js.map +1 -1
  10. package/dist/button/slots.js +2 -1
  11. package/dist/button/slots.js.map +1 -1
  12. package/dist/calendar/index.js +351 -182
  13. package/dist/calendar/index.js.map +1 -1
  14. package/dist/calendar/styles.js +33 -2
  15. package/dist/calendar/styles.js.map +1 -1
  16. package/dist/carousel/arrangement.d.ts +5 -0
  17. package/dist/carousel/arrangement.js +123 -0
  18. package/dist/carousel/arrangement.js.map +1 -0
  19. package/dist/chequer/index.js +95 -0
  20. package/dist/chequer/index.js.map +1 -0
  21. package/dist/collection/index.d.ts +157 -0
  22. package/dist/collection/index.js +1331 -0
  23. package/dist/collection/index.js.map +1 -0
  24. package/dist/color-thumb/index.js +56 -0
  25. package/dist/color-thumb/index.js.map +1 -0
  26. package/dist/components/button/index.d.ts +4 -2
  27. package/dist/components/button/index.js +227 -188
  28. package/dist/components/button/index.js.map +1 -1
  29. package/dist/components/button-group/index.d.ts +87 -0
  30. package/dist/components/button-group/index.js +275 -0
  31. package/dist/components/button-group/index.js.map +1 -0
  32. package/dist/components/calendar/index.d.ts +11 -3
  33. package/dist/components/calendar/index.js +60 -45
  34. package/dist/components/calendar/index.js.map +1 -1
  35. package/dist/components/carousel/index.d.ts +72 -0
  36. package/dist/components/carousel/index.js +496 -0
  37. package/dist/components/carousel/index.js.map +1 -0
  38. package/dist/components/checkbox-group/index.d.ts +3 -4
  39. package/dist/components/checkbox-group/index.js +1 -1
  40. package/dist/components/checkbox-group/index.js.map +1 -1
  41. package/dist/components/color-area/index.d.ts +85 -0
  42. package/dist/components/color-area/index.js +630 -0
  43. package/dist/components/color-area/index.js.map +1 -0
  44. package/dist/components/color-field/index.d.ts +144 -0
  45. package/dist/components/color-field/index.js +516 -0
  46. package/dist/components/color-field/index.js.map +1 -0
  47. package/dist/components/color-picker/index.d.ts +74 -0
  48. package/dist/components/color-picker/index.js +317 -0
  49. package/dist/components/color-picker/index.js.map +1 -0
  50. package/dist/components/color-slider/index.d.ts +82 -0
  51. package/dist/components/color-slider/index.js +456 -0
  52. package/dist/components/color-slider/index.js.map +1 -0
  53. package/dist/components/color-swatch/index.d.ts +46 -0
  54. package/dist/components/color-swatch/index.js +127 -0
  55. package/dist/components/color-swatch/index.js.map +1 -0
  56. package/dist/components/color-swatch-picker/index.d.ts +81 -0
  57. package/dist/components/color-swatch-picker/index.js +287 -0
  58. package/dist/components/color-swatch-picker/index.js.map +1 -0
  59. package/dist/components/color-wheel/index.d.ts +71 -0
  60. package/dist/components/color-wheel/index.js +407 -0
  61. package/dist/components/color-wheel/index.js.map +1 -0
  62. package/dist/components/combo-box/index.d.ts +193 -0
  63. package/dist/components/combo-box/index.js +616 -0
  64. package/dist/components/combo-box/index.js.map +1 -0
  65. package/dist/components/date-field/index.d.ts +120 -0
  66. package/dist/components/date-field/index.js +111 -0
  67. package/dist/components/date-field/index.js.map +1 -0
  68. package/dist/components/date-picker/index.d.ts +130 -0
  69. package/dist/components/date-picker/index.js +310 -0
  70. package/dist/components/date-picker/index.js.map +1 -0
  71. package/dist/components/date-range-picker/index.d.ts +139 -0
  72. package/dist/components/date-range-picker/index.js +421 -0
  73. package/dist/components/date-range-picker/index.js.map +1 -0
  74. package/dist/components/disclosure/index.d.ts +94 -0
  75. package/dist/components/disclosure/index.js +365 -0
  76. package/dist/components/disclosure/index.js.map +1 -0
  77. package/dist/components/disclosure-group/index.d.ts +61 -0
  78. package/dist/components/disclosure-group/index.js +100 -0
  79. package/dist/components/disclosure-group/index.js.map +1 -0
  80. package/dist/components/drop-zone/index.d.ts +113 -0
  81. package/dist/components/drop-zone/index.js +304 -0
  82. package/dist/components/drop-zone/index.js.map +1 -0
  83. package/dist/components/fab/index.d.ts +1 -1
  84. package/dist/components/fab/index.js +91 -76
  85. package/dist/components/fab/index.js.map +1 -1
  86. package/dist/components/form/index.d.ts +3 -2
  87. package/dist/components/form/index.js.map +1 -1
  88. package/dist/components/icon-button/index.d.ts +4 -2
  89. package/dist/components/icon-button/index.js +204 -171
  90. package/dist/components/icon-button/index.js.map +1 -1
  91. package/dist/components/list/index.d.ts +15 -158
  92. package/dist/components/list/index.js +21 -1047
  93. package/dist/components/list/index.js.map +1 -1
  94. package/dist/components/list-box/index.d.ts +73 -0
  95. package/dist/components/list-box/index.js +82 -0
  96. package/dist/components/list-box/index.js.map +1 -0
  97. package/dist/components/loading-indicator/index.d.ts +32 -0
  98. package/dist/components/loading-indicator/index.js +174 -0
  99. package/dist/components/loading-indicator/index.js.map +1 -0
  100. package/dist/components/navigation-tree/index.d.ts +117 -0
  101. package/dist/components/navigation-tree/index.js +135 -0
  102. package/dist/components/navigation-tree/index.js.map +1 -0
  103. package/dist/components/number-field/index.js +132 -143
  104. package/dist/components/number-field/index.js.map +1 -1
  105. package/dist/components/range-calendar/index.d.ts +69 -0
  106. package/dist/components/range-calendar/index.js +144 -0
  107. package/dist/components/range-calendar/index.js.map +1 -0
  108. package/dist/components/search-view/index.d.ts +78 -0
  109. package/dist/components/search-view/index.js +570 -0
  110. package/dist/components/search-view/index.js.map +1 -0
  111. package/dist/components/select/index.d.ts +152 -0
  112. package/dist/components/select/index.js +419 -0
  113. package/dist/components/select/index.js.map +1 -0
  114. package/dist/components/slider/index.d.ts +111 -0
  115. package/dist/components/slider/index.js +673 -0
  116. package/dist/components/slider/index.js.map +1 -0
  117. package/dist/components/split-button/index.d.ts +77 -0
  118. package/dist/components/split-button/index.js +354 -0
  119. package/dist/components/split-button/index.js.map +1 -0
  120. package/dist/components/tabs/index.d.ts +196 -0
  121. package/dist/components/tabs/index.js +1137 -0
  122. package/dist/components/tabs/index.js.map +1 -0
  123. package/dist/components/time-field/index.d.ts +43 -0
  124. package/dist/components/time-field/index.js +107 -0
  125. package/dist/components/time-field/index.js.map +1 -0
  126. package/dist/components/time-picker/index.d.ts +65 -0
  127. package/dist/components/time-picker/index.js +1168 -0
  128. package/dist/components/time-picker/index.js.map +1 -0
  129. package/dist/components/tooltip/index.d.ts +101 -0
  130. package/dist/components/tooltip/index.js +223 -0
  131. package/dist/components/tooltip/index.js.map +1 -0
  132. package/dist/components/tree/index.d.ts +112 -0
  133. package/dist/components/tree/index.js +157 -0
  134. package/dist/components/tree/index.js.map +1 -0
  135. package/dist/disclosure/chevron.js +75 -0
  136. package/dist/disclosure/chevron.js.map +1 -0
  137. package/dist/disclosure/index.js +7 -0
  138. package/dist/disclosure/index.js.map +1 -0
  139. package/dist/drop/index.d.ts +54 -0
  140. package/dist/drop/index.js +161 -0
  141. package/dist/drop/index.js.map +1 -0
  142. package/dist/field/chevron.js +74 -0
  143. package/dist/field/chevron.js.map +1 -0
  144. package/dist/field/index.d.ts +2 -1
  145. package/dist/field/index.js +310 -154
  146. package/dist/field/index.js.map +1 -1
  147. package/dist/field/styles.js +9 -0
  148. package/dist/field/styles.js.map +1 -1
  149. package/dist/files/index.d.ts +18 -0
  150. package/dist/files/index.js +107 -0
  151. package/dist/files/index.js.map +1 -0
  152. package/dist/form/index.d.ts +5 -2
  153. package/dist/form/index.js +64 -85
  154. package/dist/form/index.js.map +1 -1
  155. package/dist/glyphs/index.js +92 -1
  156. package/dist/glyphs/index.js.map +1 -1
  157. package/dist/i18n/index.js +20 -1
  158. package/dist/i18n/index.js.map +1 -1
  159. package/dist/i18n/messages.js +1394 -34
  160. package/dist/i18n/messages.js.map +1 -1
  161. package/dist/index.d.ts +35 -3
  162. package/dist/index.js +34 -3
  163. package/dist/indicator/paths.js +23 -1
  164. package/dist/indicator/paths.js.map +1 -1
  165. package/dist/modal/index.js +92 -77
  166. package/dist/modal/index.js.map +1 -1
  167. package/dist/number/keyboard.js +16 -0
  168. package/dist/number/keyboard.js.map +1 -0
  169. package/dist/overlay/anchored.js +68 -38
  170. package/dist/overlay/anchored.js.map +1 -1
  171. package/dist/overlay/keyboard.js +57 -0
  172. package/dist/overlay/keyboard.js.map +1 -0
  173. package/dist/overlay/panel.js +173 -19
  174. package/dist/overlay/panel.js.map +1 -1
  175. package/dist/overlay/placement.js +13 -1
  176. package/dist/overlay/placement.js.map +1 -1
  177. package/dist/picker/index.js +322 -0
  178. package/dist/picker/index.js.map +1 -0
  179. package/dist/press/index.d.ts +2 -0
  180. package/dist/press/index.js +102 -100
  181. package/dist/press/index.js.map +1 -1
  182. package/dist/row/index.js +77 -69
  183. package/dist/row/index.js.map +1 -1
  184. package/dist/row/styles.js +13 -2
  185. package/dist/row/styles.js.map +1 -1
  186. package/dist/segments/field.js +277 -0
  187. package/dist/segments/field.js.map +1 -0
  188. package/dist/segments/index.js +574 -0
  189. package/dist/segments/index.js.map +1 -0
  190. package/dist/segments/styles.js +24 -0
  191. package/dist/segments/styles.js.map +1 -0
  192. package/dist/slider/index.js +145 -0
  193. package/dist/slider/index.js.map +1 -0
  194. package/dist/swatch/index.js +56 -0
  195. package/dist/swatch/index.js.map +1 -0
  196. package/package.json +11 -2
@@ -0,0 +1,113 @@
1
+ import { PickedFile } from "../../files/index.js";
2
+ import { DragTypes, DropEnterEvent, DropEvent, DropExitEvent, DropOperation } from "../../drop/index.js";
3
+ import { StyleProp, View, ViewStyle } from "react-native";
4
+ import { ComponentRef, ReactNode, Ref } from "react";
5
+ //#region src/components/drop-zone/index.d.ts
6
+ type DropZoneProps = {
7
+ /**
8
+ * Names the target without drawing anything, for a page that already says
9
+ * what it takes. Beats `label` as the name.
10
+ */
11
+ readonly 'aria-label'?: string;
12
+ /** What the target holds beside its label, such as a FileTrigger. */
13
+ readonly children?: ReactNode;
14
+ /**
15
+ * What a drop of these types would do, from the operations the drag
16
+ * allows: `cancel` refuses it. A pick on iOS and Android allows `copy`
17
+ * alone. Left out, the first the drag allows.
18
+ */
19
+ readonly getDropOperation?: (types: DragTypes, allowedOperations: readonly DropOperation[]) => DropOperation;
20
+ /**
21
+ * Takes nothing: no drop, and on iOS and Android no press, drawn faded.
22
+ * @default false
23
+ */
24
+ readonly isDisabled?: boolean;
25
+ /**
26
+ * What the target says it is for, drawn inside it and used as its name. A
27
+ * string rather than a node, since it is what names the target; anything
28
+ * richer goes in `children`.
29
+ */
30
+ readonly label?: string;
31
+ /**
32
+ * Called with what landed: what was dropped under React Native Web, what
33
+ * was picked on iOS and Android.
34
+ */
35
+ readonly onDrop?: (event: DropEvent) => void;
36
+ /** Called once something the target takes comes over it. Under React Native Web alone. */
37
+ readonly onDropEnter?: (event: DropEnterEvent) => void;
38
+ /** Called once what came over it leaves, or lands. Under React Native Web alone. */
39
+ readonly onDropExit?: (event: DropExitEvent) => void;
40
+ readonly ref?: Ref<ComponentRef<typeof View>>;
41
+ readonly style?: StyleProp<ViewStyle>;
42
+ readonly testID?: string;
43
+ };
44
+ type FileTriggerProps = {
45
+ /** The MIME types the chooser offers, such as `image/png` or `image/*`. Every type when left out. */
46
+ readonly acceptedFileTypes?: readonly string[];
47
+ /** Whether more than one file can be picked. @default false */
48
+ readonly allowsMultiple?: boolean;
49
+ /** The Button, IconButton or Fab that opens the chooser. */
50
+ readonly children?: ReactNode;
51
+ /**
52
+ * Opens the camera rather than the chooser, facing away from the person
53
+ * for `environment` or towards them for `user`, as web's `capture` does.
54
+ * It takes one photo, or a video where `acceptedFileTypes` names a video
55
+ * type.
56
+ */
57
+ readonly defaultCamera?: 'environment' | 'user';
58
+ /** Called with what was picked. Not called when the person backs out. */
59
+ readonly onSelect?: (files: readonly PickedFile[]) => void;
60
+ };
61
+ /**
62
+ * A place to drop files. Under React Native Web it takes HTML5 drag and drop,
63
+ * as kanso-ui's does; on iOS and Android, which hand an app no drag from
64
+ * another, pressing it opens the file chooser, and `onDrop` is handed what
65
+ * was picked. Either way `onDrop` is handed the items, which
66
+ * `isFileDropItem` and `isTextDropItem` pick apart.
67
+ *
68
+ * ```tsx
69
+ * <DropZone label="Drop here" onDrop={handleDrop}>
70
+ * <FileTrigger onSelect={handleSelect}>
71
+ * <Button variant="outlined">Label</Button>
72
+ * </FileTrigger>
73
+ * </DropZone>
74
+ * ```
75
+ *
76
+ * It is drawn from the outlined card, with a dashed rule rather than a solid
77
+ * one, and fills with the primary container while something is over it.
78
+ * `label` both draws the words and names the target; `aria-label` names it
79
+ * without drawing anything.
80
+ *
81
+ * The chooser is expo-document-picker's, which an app installs alongside the
82
+ * library. Without it a press writes to the console that the package is
83
+ * missing, and nothing opens.
84
+ *
85
+ * `style`, `ref` and `testID` land on the target itself, which is what a
86
+ * layout places.
87
+ */
88
+ declare function DropZone({ 'aria-label': ariaLabel, children, getDropOperation, isDisabled, label, onDrop, onDropEnter, onDropExit, ref, style, testID }: DropZoneProps): import("react").JSX.Element;
89
+ /**
90
+ * Opens the file chooser from the button it wraps, and hands `onSelect`
91
+ * what was picked.
92
+ *
93
+ * ```tsx
94
+ * <FileTrigger acceptedFileTypes={['image/*']} onSelect={handleSelect}>
95
+ * <Button>Label</Button>
96
+ * </FileTrigger>
97
+ * ```
98
+ *
99
+ * It renders nothing of its own, so it takes no `style`: what is seen is the
100
+ * Button, IconButton or Fab it wraps, which opens the chooser after its own
101
+ * `onPress`. `allowsMultiple` takes more than one file, and `defaultCamera`
102
+ * opens the camera instead. kanso-ui's `acceptDirectory` is not here, since
103
+ * neither iOS's chooser nor Android's picks a folder.
104
+ *
105
+ * The chooser is expo-document-picker's and the camera expo-image-picker's,
106
+ * which an app installs alongside the library, the second only for
107
+ * `defaultCamera`. Without the one it needs, a press writes to the console
108
+ * which package is missing, and nothing opens.
109
+ */
110
+ declare function FileTrigger({ acceptedFileTypes, allowsMultiple, children, defaultCamera, onSelect }: FileTriggerProps): import("react").JSX.Element;
111
+ //#endregion
112
+ export { DropZone, type DropZoneProps, FileTrigger, type FileTriggerProps };
113
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,304 @@
1
+ import { useTheme } from "../../theme/scope.js";
2
+ import { composeStyles, themedStyles } from "../../theme/styles.js";
3
+ import { usePressFeedback } from "../../press/index.js";
4
+ import { useTypeRole } from "../../typography/roles.js";
5
+ import { withOpacity } from "../../theme/color.js";
6
+ import { refsOf } from "../../ref/index.js";
7
+ import { ButtonSlotContext } from "../../button/slots.js";
8
+ import { fileItemOf, isDropTarget, operationOf, typesOf, watchDrops } from "../../drop/index.js";
9
+ import { pickThen, preparePicker } from "../../files/index.js";
10
+ import { c } from "react/compiler-runtime";
11
+ import { Platform, Pressable, StyleSheet, Text, View } from "react-native";
12
+ import { useEffect, useEffectEvent, useRef, useState } from "react";
13
+ import { jsx, jsxs } from "react/jsx-runtime";
14
+ //#region src/components/drop-zone/index.tsx
15
+ const MIN_HEIGHT = 160;
16
+ const stylesOf = themedStyles(({ colors, radii, spacing, stateLayerOpacity }) => {
17
+ const disabled = withOpacity(colors.onSurface, stateLayerOpacity.disabledContent);
18
+ return StyleSheet.create({
19
+ label: {
20
+ color: colors.onSurfaceVariant,
21
+ textAlign: "center"
22
+ },
23
+ labelBox: { pointerEvents: "none" },
24
+ labelDisabled: { color: disabled },
25
+ labelOver: { color: colors.onPrimaryContainer },
26
+ press: { borderRadius: radii.md },
27
+ ring: { outlineOffset: -1 },
28
+ root: {
29
+ alignItems: "center",
30
+ backgroundColor: colors.surface,
31
+ borderColor: colors.outlineVariant,
32
+ borderRadius: radii.md,
33
+ borderStyle: "dashed",
34
+ borderWidth: 1,
35
+ boxSizing: "border-box",
36
+ gap: spacing.md,
37
+ justifyContent: "center",
38
+ minHeight: MIN_HEIGHT,
39
+ padding: spacing.xl
40
+ },
41
+ rootDisabled: { borderColor: disabled },
42
+ rootOver: {
43
+ backgroundColor: colors.primaryContainer,
44
+ borderColor: colors.primary,
45
+ borderStyle: "solid"
46
+ }
47
+ });
48
+ });
49
+ /**
50
+ * A place to drop files. Under React Native Web it takes HTML5 drag and drop,
51
+ * as kanso-ui's does; on iOS and Android, which hand an app no drag from
52
+ * another, pressing it opens the file chooser, and `onDrop` is handed what
53
+ * was picked. Either way `onDrop` is handed the items, which
54
+ * `isFileDropItem` and `isTextDropItem` pick apart.
55
+ *
56
+ * ```tsx
57
+ * <DropZone label="Drop here" onDrop={handleDrop}>
58
+ * <FileTrigger onSelect={handleSelect}>
59
+ * <Button variant="outlined">Label</Button>
60
+ * </FileTrigger>
61
+ * </DropZone>
62
+ * ```
63
+ *
64
+ * It is drawn from the outlined card, with a dashed rule rather than a solid
65
+ * one, and fills with the primary container while something is over it.
66
+ * `label` both draws the words and names the target; `aria-label` names it
67
+ * without drawing anything.
68
+ *
69
+ * The chooser is expo-document-picker's, which an app installs alongside the
70
+ * library. Without it a press writes to the console that the package is
71
+ * missing, and nothing opens.
72
+ *
73
+ * `style`, `ref` and `testID` land on the target itself, which is what a
74
+ * layout places.
75
+ */
76
+ function DropZone(t0) {
77
+ const $ = c(30);
78
+ const { "aria-label": ariaLabel, children, getDropOperation, isDisabled: t1, label, onDrop, onDropEnter, onDropExit, ref, style, testID } = t0;
79
+ const isDisabled = t1 === void 0 ? false : t1;
80
+ const theme = useTheme();
81
+ const { colors, radii } = theme;
82
+ const styles = stylesOf(theme);
83
+ const bodyMedium = useTypeRole("bodyMedium");
84
+ const [isOver, setOver] = useState(false);
85
+ const node = useRef(null);
86
+ const web = Platform.OS === "web";
87
+ let t2;
88
+ if ($[0] !== radii.md) {
89
+ t2 = { borderRadius: radii.md };
90
+ $[0] = radii.md;
91
+ $[1] = t2;
92
+ } else t2 = $[1];
93
+ let t3;
94
+ if ($[2] !== colors.onSurface || $[3] !== isDisabled || $[4] !== t2) {
95
+ t3 = {
96
+ color: colors.onSurface,
97
+ corners: t2,
98
+ disabled: isDisabled
99
+ };
100
+ $[2] = colors.onSurface;
101
+ $[3] = isDisabled;
102
+ $[4] = t2;
103
+ $[5] = t3;
104
+ } else t3 = $[5];
105
+ const feedback = usePressFeedback(t3);
106
+ let t4;
107
+ if ($[6] !== getDropOperation || $[7] !== onDrop || $[8] !== onDropEnter || $[9] !== onDropExit) {
108
+ t4 = () => ({
109
+ getDropOperation,
110
+ onDrop,
111
+ onDropEnter,
112
+ onDropExit
113
+ });
114
+ $[6] = getDropOperation;
115
+ $[7] = onDrop;
116
+ $[8] = onDropEnter;
117
+ $[9] = onDropExit;
118
+ $[10] = t4;
119
+ } else t4 = $[10];
120
+ const handlersNow = useEffectEvent(t4);
121
+ let t5;
122
+ if ($[11] !== isDisabled) {
123
+ t5 = () => isDisabled;
124
+ $[11] = isDisabled;
125
+ $[12] = t5;
126
+ } else t5 = $[12];
127
+ const disabledNow = useEffectEvent(t5);
128
+ const name = ariaLabel ?? label;
129
+ const over = isOver && !isDisabled;
130
+ let t6;
131
+ if ($[13] !== disabledNow || $[14] !== handlersNow) {
132
+ t6 = () => {
133
+ if (!web) {
134
+ preparePicker({});
135
+ return;
136
+ }
137
+ const target = node.current;
138
+ if (!isDropTarget(target)) return;
139
+ return watchDrops(target, () => handlersNow(), () => disabledNow(), setOver);
140
+ };
141
+ $[13] = disabledNow;
142
+ $[14] = handlersNow;
143
+ $[15] = t6;
144
+ } else t6 = $[15];
145
+ let t7;
146
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
147
+ t7 = [web];
148
+ $[16] = t7;
149
+ } else t7 = $[16];
150
+ useEffect(t6, t7);
151
+ const T0 = View;
152
+ const t8 = web && isDisabled ? true : void 0;
153
+ const t9 = web ? name : void 0;
154
+ let t10;
155
+ if ($[17] !== ref) {
156
+ t10 = refsOf(ref, node);
157
+ $[17] = ref;
158
+ $[18] = t10;
159
+ } else t10 = $[18];
160
+ const t11 = web && name !== void 0 ? "group" : void 0;
161
+ const t12 = composeStyles(styles.root, over ? styles.rootOver : void 0, isDisabled ? styles.rootDisabled : void 0, style);
162
+ const t13 = web ? null : /* @__PURE__ */ jsx(Pressable, {
163
+ ...feedback.handlers,
164
+ "aria-label": name,
165
+ disabled: isDisabled,
166
+ onPress: pressOf(getDropOperation, onDrop),
167
+ role: "button",
168
+ style: composeStyles(StyleSheet.absoluteFill, styles.press, feedback.ring, feedback.ring === void 0 ? void 0 : styles.ring),
169
+ children: feedback.layer
170
+ });
171
+ const t14 = label === void 0 ? null : /* @__PURE__ */ jsx(View, {
172
+ "aria-hidden": true,
173
+ style: styles.labelBox,
174
+ children: /* @__PURE__ */ jsx(Text, {
175
+ style: composeStyles(bodyMedium, styles.label, over ? styles.labelOver : void 0, isDisabled ? styles.labelDisabled : void 0),
176
+ children: label
177
+ })
178
+ });
179
+ let t15;
180
+ if ($[19] !== T0 || $[20] !== children || $[21] !== t10 || $[22] !== t11 || $[23] !== t12 || $[24] !== t13 || $[25] !== t14 || $[26] !== t8 || $[27] !== t9 || $[28] !== testID) {
181
+ t15 = /* @__PURE__ */ jsxs(T0, {
182
+ "aria-disabled": t8,
183
+ "aria-label": t9,
184
+ ref: t10,
185
+ role: t11,
186
+ style: t12,
187
+ testID,
188
+ children: [
189
+ t13,
190
+ t14,
191
+ children
192
+ ]
193
+ });
194
+ $[19] = T0;
195
+ $[20] = children;
196
+ $[21] = t10;
197
+ $[22] = t11;
198
+ $[23] = t12;
199
+ $[24] = t13;
200
+ $[25] = t14;
201
+ $[26] = t8;
202
+ $[27] = t9;
203
+ $[28] = testID;
204
+ $[29] = t15;
205
+ } else t15 = $[29];
206
+ return t15;
207
+ }
208
+ /**
209
+ * Opens the file chooser from the button it wraps, and hands `onSelect`
210
+ * what was picked.
211
+ *
212
+ * ```tsx
213
+ * <FileTrigger acceptedFileTypes={['image/*']} onSelect={handleSelect}>
214
+ * <Button>Label</Button>
215
+ * </FileTrigger>
216
+ * ```
217
+ *
218
+ * It renders nothing of its own, so it takes no `style`: what is seen is the
219
+ * Button, IconButton or Fab it wraps, which opens the chooser after its own
220
+ * `onPress`. `allowsMultiple` takes more than one file, and `defaultCamera`
221
+ * opens the camera instead. kanso-ui's `acceptDirectory` is not here, since
222
+ * neither iOS's chooser nor Android's picks a folder.
223
+ *
224
+ * The chooser is expo-document-picker's and the camera expo-image-picker's,
225
+ * which an app installs alongside the library, the second only for
226
+ * `defaultCamera`. Without the one it needs, a press writes to the console
227
+ * which package is missing, and nothing opens.
228
+ */
229
+ function FileTrigger(t0) {
230
+ const $ = c(13);
231
+ const { acceptedFileTypes, allowsMultiple, children, defaultCamera, onSelect } = t0;
232
+ let t1;
233
+ let t2;
234
+ if ($[0] !== defaultCamera) {
235
+ t1 = () => {
236
+ preparePicker({ defaultCamera });
237
+ };
238
+ t2 = [defaultCamera];
239
+ $[0] = defaultCamera;
240
+ $[1] = t1;
241
+ $[2] = t2;
242
+ } else {
243
+ t1 = $[1];
244
+ t2 = $[2];
245
+ }
246
+ useEffect(t1, t2);
247
+ let t3;
248
+ if ($[3] !== acceptedFileTypes || $[4] !== allowsMultiple || $[5] !== defaultCamera || $[6] !== onSelect) {
249
+ t3 = () => {
250
+ pickThen({
251
+ acceptedFileTypes,
252
+ allowsMultiple,
253
+ defaultCamera
254
+ }, (files) => {
255
+ onSelect?.(files);
256
+ });
257
+ };
258
+ $[3] = acceptedFileTypes;
259
+ $[4] = allowsMultiple;
260
+ $[5] = defaultCamera;
261
+ $[6] = onSelect;
262
+ $[7] = t3;
263
+ } else t3 = $[7];
264
+ const pick = t3;
265
+ let t4;
266
+ if ($[8] !== pick) {
267
+ t4 = slotsOf(pick);
268
+ $[8] = pick;
269
+ $[9] = t4;
270
+ } else t4 = $[9];
271
+ let t5;
272
+ if ($[10] !== children || $[11] !== t4) {
273
+ t5 = /* @__PURE__ */ jsx(ButtonSlotContext, {
274
+ value: t4,
275
+ children
276
+ });
277
+ $[10] = children;
278
+ $[11] = t4;
279
+ $[12] = t5;
280
+ } else t5 = $[12];
281
+ return t5;
282
+ }
283
+ function pressOf(getDropOperation, onDrop) {
284
+ return (event) => {
285
+ const { locationX: x, locationY: y } = event.nativeEvent;
286
+ pickThen({ allowsMultiple: true }, (files) => {
287
+ const dropOperation = operationOf({ getDropOperation }, typesOf(files.map((file) => file.type)), ["copy"]);
288
+ if (dropOperation !== "cancel") onDrop?.({
289
+ dropOperation,
290
+ items: files.map(fileItemOf),
291
+ type: "drop",
292
+ x,
293
+ y
294
+ });
295
+ });
296
+ };
297
+ }
298
+ function slotsOf(pick) {
299
+ return { default: pick };
300
+ }
301
+ //#endregion
302
+ export { DropZone, FileTrigger };
303
+
304
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","GestureResponderEvent","HostInstance","StyleProp","TextStyle","ViewStyle","View","ViewType","useEffect","useEffectEvent","useRef","useState","Platform","Pressable","StyleSheet","Text","ButtonSlots","DragTypes","DropEnterEvent","DropEvent","DropExitEvent","DropOperation","PickedFile","ButtonSlotContext","fileItemOf","isDropTarget","operationOf","typesOf","watchDrops","pickThen","preparePicker","usePressFeedback","refsOf","withOpacity","useTheme","composeStyles","themedStyles","useTypeRole","MIN_HEIGHT","stylesOf","colors","radii","spacing","stateLayerOpacity","disabled","onSurface","disabledContent","create","label","color","onSurfaceVariant","textAlign","labelBox","pointerEvents","labelDisabled","labelOver","onPrimaryContainer","press","borderRadius","md","ring","outlineOffset","root","alignItems","backgroundColor","surface","borderColor","outlineVariant","borderStyle","borderWidth","boxSizing","gap","justifyContent","minHeight","padding","xl","rootDisabled","rootOver","primaryContainer","primary","DropZoneProps","children","getDropOperation","types","allowedOperations","isDisabled","onDrop","event","onDropEnter","onDropExit","ref","style","testID","FileTriggerProps","acceptedFileTypes","allowsMultiple","defaultCamera","onSelect","files","DropZone","t0","$","_c","ariaLabel","t1","undefined","theme","styles","bodyMedium","isOver","setOver","node","web","OS","t2","t3","corners","feedback","t4","handlersNow","t5","disabledNow","name","over","t6","target","current","t7","Symbol","for","T0","t8","t9","t10","t11","t12","t13","handlers","pressOf","absoluteFill","layer","t14","t15","FileTrigger","pick","slotsOf","locationX","x","locationY","y","nativeEvent","dropOperation","map","file","type","items","default","_c"],"sources":["../../../src/components/drop-zone/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref } from 'react'\nimport type {\n GestureResponderEvent,\n HostInstance,\n StyleProp,\n TextStyle,\n ViewStyle,\n View as ViewType,\n} from 'react-native'\n\nimport { useEffect, useEffectEvent, useRef, useState } from 'react'\nimport { Platform, Pressable, StyleSheet, Text, View } from 'react-native'\n\nimport type { ButtonSlots } from '../../button/slots'\nimport type {\n DragTypes,\n DropEnterEvent,\n DropEvent,\n DropExitEvent,\n DropOperation,\n} from '../../drop'\nimport type { PickedFile } from '../../files'\n\nimport { ButtonSlotContext } from '../../button/slots'\nimport {\n fileItemOf,\n isDropTarget,\n operationOf,\n typesOf,\n watchDrops,\n} from '../../drop'\nimport { pickThen, preparePicker } from '../../files'\nimport { usePressFeedback } from '../../press'\nimport { refsOf } from '../../ref'\nimport { withOpacity } from '../../theme/color'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\n\n// A place to drop files, and a way to open the file chooser from a button, as\n// kanso-ui's DropZone and FileTrigger are. Material Design carries no page for\n// either, so the target is drawn from the nearest thing it does carry, the\n// outlined card: the same surface, 1dp outline variant rule and medium\n// corner, at least 160dp tall with 24dp of padding and its label centred in\n// body medium. Web's two departures from that card are kept. **The rule is\n// dashed**, since a solid one reads as a card holding content and a dashed one\n// as a place to put something. **Something over it fills it** with primary\n// container, the rule turning primary and solid, the pair a selected row\n// takes, so \"this is the target\" looks like \"this is the one chosen\". It\n// switches at once rather than over web's short transition, as a card's\n// press colours do.\n//\n// What a drop is depends on the platform, since neither iOS nor Android hands\n// React Native a drag from another app. **Under React Native Web it is HTML5\n// drag and drop**, as on web, through src/drop. **On iOS and Android the\n// target is a press target** that opens the chooser and hands `onDrop` what\n// was picked, as file drop items, so a call site writes one handler for both.\n// The drop operation it reports is `copy`, which is true of a pick as it is\n// of a drop from the desktop: the chooser hands the app a copy in its cache,\n// and the person's own file stays where it was. So a call site reading the\n// operation is told nothing a pick does not do. The press target lies under\n// what the target holds, so a button inside it still takes its own presses,\n// and VoiceOver reaches both rather than one.\n//\n// Disabled is web's: the rule and the label in on surface at the disabled\n// content opacity, over the surface, so a dashed rule at full strength stops\n// reading as somewhere to aim at, and nothing is taken.\n//\n// FileTrigger renders nothing of its own. The Button, IconButton or Fab it\n// wraps opens the chooser through src/button's default slot, the way a\n// button opens the overlay around it, as web's React Aria hands its\n// FileTrigger's press to whatever it wraps.\n\n// The least height a target takes, from web: room enough to aim at.\nconst MIN_HEIGHT = 160\n\nconst stylesOf = themedStyles(\n ({ colors, radii, spacing, stateLayerOpacity }) => {\n const disabled = withOpacity(\n colors.onSurface,\n stateLayerOpacity.disabledContent,\n )\n\n return StyleSheet.create({\n // The label, in the muted role, centred under the target's content.\n label: {\n color: colors.onSurfaceVariant,\n textAlign: 'center',\n },\n labelBox: {\n pointerEvents: 'none',\n },\n labelDisabled: {\n color: disabled,\n },\n labelOver: {\n color: colors.onPrimaryContainer,\n },\n // The press target fills the target under its content, inside the\n // rule. Its ring is drawn over the target's edge rather than around\n // it, as web's is, so a parent clipping its children never cuts the\n // outer half away: set 1dp into the press target, it covers the rule\n // and the 1dp inside it.\n press: {\n borderRadius: radii.md,\n },\n ring: {\n outlineOffset: -1,\n },\n root: {\n alignItems: 'center',\n backgroundColor: colors.surface,\n borderColor: colors.outlineVariant,\n borderRadius: radii.md,\n borderStyle: 'dashed',\n borderWidth: 1,\n boxSizing: 'border-box',\n gap: spacing.md,\n justifyContent: 'center',\n minHeight: MIN_HEIGHT,\n padding: spacing.xl,\n },\n rootDisabled: {\n borderColor: disabled,\n },\n rootOver: {\n backgroundColor: colors.primaryContainer,\n borderColor: colors.primary,\n borderStyle: 'solid',\n },\n })\n },\n)\n\ntype DropZoneProps = {\n /**\n * Names the target without drawing anything, for a page that already says\n * what it takes. Beats `label` as the name.\n */\n readonly 'aria-label'?: string\n /** What the target holds beside its label, such as a FileTrigger. */\n readonly children?: ReactNode\n /**\n * What a drop of these types would do, from the operations the drag\n * allows: `cancel` refuses it. A pick on iOS and Android allows `copy`\n * alone. Left out, the first the drag allows.\n */\n readonly getDropOperation?: (\n types: DragTypes,\n allowedOperations: readonly DropOperation[],\n ) => DropOperation\n /**\n * Takes nothing: no drop, and on iOS and Android no press, drawn faded.\n * @default false\n */\n readonly isDisabled?: boolean\n /**\n * What the target says it is for, drawn inside it and used as its name. A\n * string rather than a node, since it is what names the target; anything\n * richer goes in `children`.\n */\n readonly label?: string\n /**\n * Called with what landed: what was dropped under React Native Web, what\n * was picked on iOS and Android.\n */\n readonly onDrop?: (event: DropEvent) => void\n /** Called once something the target takes comes over it. Under React Native Web alone. */\n readonly onDropEnter?: (event: DropEnterEvent) => void\n /** Called once what came over it leaves, or lands. Under React Native Web alone. */\n readonly onDropExit?: (event: DropExitEvent) => void\n readonly ref?: Ref<ComponentRef<typeof ViewType>>\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\ntype FileTriggerProps = {\n /** The MIME types the chooser offers, such as `image/png` or `image/*`. Every type when left out. */\n readonly acceptedFileTypes?: readonly string[]\n /** Whether more than one file can be picked. @default false */\n readonly allowsMultiple?: boolean\n /** The Button, IconButton or Fab that opens the chooser. */\n readonly children?: ReactNode\n /**\n * Opens the camera rather than the chooser, facing away from the person\n * for `environment` or towards them for `user`, as web's `capture` does.\n * It takes one photo, or a video where `acceptedFileTypes` names a video\n * type.\n */\n readonly defaultCamera?: 'environment' | 'user'\n /** Called with what was picked. Not called when the person backs out. */\n readonly onSelect?: (files: readonly PickedFile[]) => void\n}\n\n/**\n * A place to drop files. Under React Native Web it takes HTML5 drag and drop,\n * as kanso-ui's does; on iOS and Android, which hand an app no drag from\n * another, pressing it opens the file chooser, and `onDrop` is handed what\n * was picked. Either way `onDrop` is handed the items, which\n * `isFileDropItem` and `isTextDropItem` pick apart.\n *\n * ```tsx\n * <DropZone label=\"Drop here\" onDrop={handleDrop}>\n * <FileTrigger onSelect={handleSelect}>\n * <Button variant=\"outlined\">Label</Button>\n * </FileTrigger>\n * </DropZone>\n * ```\n *\n * It is drawn from the outlined card, with a dashed rule rather than a solid\n * one, and fills with the primary container while something is over it.\n * `label` both draws the words and names the target; `aria-label` names it\n * without drawing anything.\n *\n * The chooser is expo-document-picker's, which an app installs alongside the\n * library. Without it a press writes to the console that the package is\n * missing, and nothing opens.\n *\n * `style`, `ref` and `testID` land on the target itself, which is what a\n * layout places.\n */\nfunction DropZone({\n 'aria-label': ariaLabel,\n children,\n getDropOperation,\n isDisabled = false,\n label,\n onDrop,\n onDropEnter,\n onDropExit,\n ref,\n style,\n testID,\n}: DropZoneProps) {\n const theme = useTheme()\n const { colors, radii } = theme\n const styles = stylesOf(theme)\n const bodyMedium = useTypeRole('bodyMedium')\n const [isOver, setOver] = useState(false)\n const node = useRef<HostInstance | null>(null)\n const web = Platform.OS === 'web'\n const feedback = usePressFeedback({\n color: colors.onSurface,\n corners: { borderRadius: radii.md },\n disabled: isDisabled,\n })\n const handlersNow = useEffectEvent(() => ({\n getDropOperation,\n onDrop,\n onDropEnter,\n onDropExit,\n }))\n const disabledNow = useEffectEvent(() => isDisabled)\n const name = ariaLabel ?? label\n const over = isOver && !isDisabled\n\n useEffect(() => {\n if (!web) {\n preparePicker({})\n return undefined\n }\n\n const target = node.current\n\n if (!isDropTarget(target)) {\n return undefined\n }\n return watchDrops(\n target,\n () => handlersNow(),\n () => disabledNow(),\n setOver,\n )\n }, [web])\n\n return (\n <View\n // Under React Native Web the target names itself, as a group, and says\n // it is disabled, since there is no press target to carry either.\n aria-disabled={web && isDisabled ? true : undefined}\n aria-label={web ? name : undefined}\n ref={refsOf<HostInstance>(ref, node)}\n role={web && name !== undefined ? 'group' : undefined}\n style={composeStyles<ViewStyle>(\n styles.root,\n over ? styles.rootOver : undefined,\n isDisabled ? styles.rootDisabled : undefined,\n style,\n )}\n testID={testID}\n >\n {web ? null : (\n <Pressable\n {...feedback.handlers}\n aria-label={name}\n disabled={isDisabled}\n onPress={pressOf(getDropOperation, onDrop)}\n role=\"button\"\n style={composeStyles<ViewStyle>(\n StyleSheet.absoluteFill,\n styles.press,\n feedback.ring,\n feedback.ring === undefined ? undefined : styles.ring,\n )}\n >\n {feedback.layer}\n </Pressable>\n )}\n {label === undefined ? null : (\n // Hidden from a screen reader, which hears it as the target's name,\n // and from touches, which land on the press target under it.\n <View aria-hidden style={styles.labelBox}>\n <Text\n style={composeStyles<TextStyle>(\n bodyMedium,\n styles.label,\n over ? styles.labelOver : undefined,\n isDisabled ? styles.labelDisabled : undefined,\n )}\n >\n {label}\n </Text>\n </View>\n )}\n {children}\n </View>\n )\n}\n\n/**\n * Opens the file chooser from the button it wraps, and hands `onSelect`\n * what was picked.\n *\n * ```tsx\n * <FileTrigger acceptedFileTypes={['image/*']} onSelect={handleSelect}>\n * <Button>Label</Button>\n * </FileTrigger>\n * ```\n *\n * It renders nothing of its own, so it takes no `style`: what is seen is the\n * Button, IconButton or Fab it wraps, which opens the chooser after its own\n * `onPress`. `allowsMultiple` takes more than one file, and `defaultCamera`\n * opens the camera instead. kanso-ui's `acceptDirectory` is not here, since\n * neither iOS's chooser nor Android's picks a folder.\n *\n * The chooser is expo-document-picker's and the camera expo-image-picker's,\n * which an app installs alongside the library, the second only for\n * `defaultCamera`. Without the one it needs, a press writes to the console\n * which package is missing, and nothing opens.\n */\nfunction FileTrigger({\n acceptedFileTypes,\n allowsMultiple,\n children,\n defaultCamera,\n onSelect,\n}: FileTriggerProps) {\n useEffect(() => {\n preparePicker({ defaultCamera })\n }, [defaultCamera])\n\n const pick = () => {\n void pickThen(\n { acceptedFileTypes, allowsMultiple, defaultCamera },\n (files) => {\n onSelect?.(files)\n },\n )\n }\n\n return <ButtonSlotContext value={slotsOf(pick)}>{children}</ButtonSlotContext>\n}\n\n// What pressing the target does on iOS and Android: opens the chooser and\n// hands `onDrop` what was picked, as a drop that copies, where the call site\n// takes the copy. Built by a call rather than inline at the prop, which is\n// what react-perf's jsx-no-new-function-as-prop is after; the React Compiler\n// memoises the result on its inputs.\nfunction pressOf(\n getDropOperation: DropZoneProps['getDropOperation'],\n onDrop: DropZoneProps['onDrop'],\n) {\n return (event: GestureResponderEvent) => {\n const { locationX: x, locationY: y } = event.nativeEvent\n\n void pickThen({ allowsMultiple: true }, (files) => {\n const dropOperation = operationOf(\n { getDropOperation },\n typesOf(files.map((file) => file.type)),\n ['copy'],\n )\n\n if (dropOperation !== 'cancel') {\n onDrop?.({\n dropOperation,\n items: files.map(fileItemOf),\n type: 'drop',\n x,\n y,\n })\n }\n })\n }\n}\n\n// The slots a FileTrigger hands its button: its press in the default slot,\n// in place of any overlay's around it. Built by a call rather than inline at\n// the prop, which is what react-perf's jsx-no-new-object-as-prop is after;\n// the React Compiler memoises the result on its inputs.\nfunction slotsOf(pick: () => void): ButtonSlots {\n return { default: pick }\n}\n\nexport { DropZone, FileTrigger }\nexport type { DropZoneProps, FileTriggerProps }\n"],"mappings":";;;;;;;;;;;;;;AA0EA,MAAMwC,aAAa;AAEnB,MAAMC,WAAWH,cACd,EAAEI,QAAQC,OAAOC,SAASC,wBAAwB;CACjD,MAAMC,WAAWX,YACfO,OAAOK,WACPF,kBAAkBG,eACpB;CAEA,OAAOhC,WAAWiC,OAAO;EAEvBC,OAAO;GACLC,OAAOT,OAAOU;GACdC,WAAW;EACb;EACAC,UAAU,EACRC,eAAe,OACjB;EACAC,eAAe,EACbL,OAAOL,SACT;EACAW,WAAW,EACTN,OAAOT,OAAOgB,mBAChB;EAMAC,OAAO,EACLC,cAAcjB,MAAMkB,GACtB;EACAC,MAAM,EACJC,eAAe,GACjB;EACAC,MAAM;GACJC,YAAY;GACZC,iBAAiBxB,OAAOyB;GACxBC,aAAa1B,OAAO2B;GACpBT,cAAcjB,MAAMkB;GACpBS,aAAa;GACbC,aAAa;GACbC,WAAW;GACXC,KAAK7B,QAAQiB;GACba,gBAAgB;GAChBC,WAAWnC;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AAA2C,MAAA;EAEgC1B,KAAA2B,QAAQD,IAAI;EAAC3C,EAAA,KAAA2C;EAAA3C,EAAA,KAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,IAAAmB;CAAA,IAAAnB,EAAA,QAAApB,YAAAoB,EAAA,QAAAiB,IAAA;EAAvCE,KAAA,oBAAC,mBAAD;GAA0B,OAAAF;GAAgBrC;EAAxB,CAAA;EAAqDoB,EAAA,MAAApB;EAAAoB,EAAA,MAAAiB;EAAAjB,EAAA,MAAAmB;CAAA,OAAAA,KAAAnB,EAAA;CAAA,OAAvEmB;AAAuE;AAQhF,SAASkB,QACPxD,kBACAI,QACA;CACA,QAAQC,UAAiC;EACvC,MAAM,EAAE2D,WAAWC,GAAGC,WAAWC,MAAM9D,MAAM+D;EAE7C,SAAc,EAAEvD,gBAAgB,KAAK,IAAIG,UAAU;GACjD,MAAMqD,gBAAgB7H,YACpB,EAAEwD,iBAAiB,GACnBvD,QAAQuE,MAAMsD,KAAKC,SAASA,KAAKC,IAAI,CAAC,GACtC,CAAC,MAAM,CACT;GAEA,IAAIH,kBAAkB,UACpBjE,SAAS;IACPiE;IACAI,OAAOzD,MAAMsD,IAAIhI,UAAU;IAC3BkI,MAAM;IACNP;IACAE;GACF,CAAC;EAEL,CAAC;CACH;AACF;AAMA,SAASJ,QAAQD,MAA+B;CAC9C,OAAO,EAAEY,SAASZ,KAAK;AACzB"}
@@ -74,7 +74,7 @@ type FabProps = (ButtonLinkForm | FabPressForm) & FabNaming & Omit<PressableProp
74
74
  * `style`, `ref` and `testID` land on the `Pressable`, which is what a call
75
75
  * site positions over its screen.
76
76
  */
77
- declare function Fab({ children, delayLongPress, disableRipple, href, isDisabled, label, onBlur, onFocus, onHoverIn, onHoverOut, onLongPress, onPress, onPressIn, onPressOut, ref, size, slot, style, tone, type, variant, ...props }: FabProps): import("react").JSX.Element;
77
+ declare function Fab({ accessibilityHint, children, delayLongPress, disableRipple, href, isDisabled, label, onBlur, onFocus, onHoverIn, onHoverOut, onLongPress, onPress, onPressIn, onPressOut, ref, size, slot, style, tone, type, variant, ...props }: FabProps): import("react").JSX.Element;
78
78
  //#endregion
79
79
  export { Fab, type FabProps, type FabSize, type FabTone, type FabVariant };
80
80
  //# sourceMappingURL=index.d.ts.map