@kanso-labs/react-native-kanso-ui 0.9.0 → 0.11.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 (217) 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 +1358 -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/chip/index.d.ts +4 -1
  42. package/dist/components/chip/index.js +229 -161
  43. package/dist/components/chip/index.js.map +1 -1
  44. package/dist/components/color-area/index.d.ts +85 -0
  45. package/dist/components/color-area/index.js +630 -0
  46. package/dist/components/color-area/index.js.map +1 -0
  47. package/dist/components/color-field/index.d.ts +144 -0
  48. package/dist/components/color-field/index.js +516 -0
  49. package/dist/components/color-field/index.js.map +1 -0
  50. package/dist/components/color-picker/index.d.ts +74 -0
  51. package/dist/components/color-picker/index.js +317 -0
  52. package/dist/components/color-picker/index.js.map +1 -0
  53. package/dist/components/color-slider/index.d.ts +82 -0
  54. package/dist/components/color-slider/index.js +456 -0
  55. package/dist/components/color-slider/index.js.map +1 -0
  56. package/dist/components/color-swatch/index.d.ts +46 -0
  57. package/dist/components/color-swatch/index.js +127 -0
  58. package/dist/components/color-swatch/index.js.map +1 -0
  59. package/dist/components/color-swatch-picker/index.d.ts +81 -0
  60. package/dist/components/color-swatch-picker/index.js +287 -0
  61. package/dist/components/color-swatch-picker/index.js.map +1 -0
  62. package/dist/components/color-wheel/index.d.ts +71 -0
  63. package/dist/components/color-wheel/index.js +407 -0
  64. package/dist/components/color-wheel/index.js.map +1 -0
  65. package/dist/components/combo-box/index.d.ts +193 -0
  66. package/dist/components/combo-box/index.js +616 -0
  67. package/dist/components/combo-box/index.js.map +1 -0
  68. package/dist/components/date-field/index.d.ts +120 -0
  69. package/dist/components/date-field/index.js +111 -0
  70. package/dist/components/date-field/index.js.map +1 -0
  71. package/dist/components/date-picker/index.d.ts +130 -0
  72. package/dist/components/date-picker/index.js +310 -0
  73. package/dist/components/date-picker/index.js.map +1 -0
  74. package/dist/components/date-range-picker/index.d.ts +139 -0
  75. package/dist/components/date-range-picker/index.js +421 -0
  76. package/dist/components/date-range-picker/index.js.map +1 -0
  77. package/dist/components/dialog/index.d.ts +5 -5
  78. package/dist/components/dialog/index.js +5 -5
  79. package/dist/components/dialog/index.js.map +1 -1
  80. package/dist/components/disclosure/index.d.ts +94 -0
  81. package/dist/components/disclosure/index.js +365 -0
  82. package/dist/components/disclosure/index.js.map +1 -0
  83. package/dist/components/disclosure-group/index.d.ts +61 -0
  84. package/dist/components/disclosure-group/index.js +100 -0
  85. package/dist/components/disclosure-group/index.js.map +1 -0
  86. package/dist/components/drop-zone/index.d.ts +113 -0
  87. package/dist/components/drop-zone/index.js +304 -0
  88. package/dist/components/drop-zone/index.js.map +1 -0
  89. package/dist/components/fab/index.d.ts +1 -1
  90. package/dist/components/fab/index.js +91 -76
  91. package/dist/components/fab/index.js.map +1 -1
  92. package/dist/components/form/index.d.ts +3 -2
  93. package/dist/components/form/index.js.map +1 -1
  94. package/dist/components/icon-button/index.d.ts +4 -2
  95. package/dist/components/icon-button/index.js +204 -171
  96. package/dist/components/icon-button/index.js.map +1 -1
  97. package/dist/components/list/index.d.ts +15 -158
  98. package/dist/components/list/index.js +21 -1047
  99. package/dist/components/list/index.js.map +1 -1
  100. package/dist/components/list-box/index.d.ts +73 -0
  101. package/dist/components/list-box/index.js +82 -0
  102. package/dist/components/list-box/index.js.map +1 -0
  103. package/dist/components/loading-indicator/index.d.ts +32 -0
  104. package/dist/components/loading-indicator/index.js +174 -0
  105. package/dist/components/loading-indicator/index.js.map +1 -0
  106. package/dist/components/menu/index.d.ts +3 -3
  107. package/dist/components/menu/index.js +3 -3
  108. package/dist/components/menu/index.js.map +1 -1
  109. package/dist/components/navigation-tree/index.d.ts +117 -0
  110. package/dist/components/navigation-tree/index.js +135 -0
  111. package/dist/components/navigation-tree/index.js.map +1 -0
  112. package/dist/components/number-field/index.js +132 -143
  113. package/dist/components/number-field/index.js.map +1 -1
  114. package/dist/components/popover/index.d.ts +2 -2
  115. package/dist/components/popover/index.js +2 -2
  116. package/dist/components/popover/index.js.map +1 -1
  117. package/dist/components/range-calendar/index.d.ts +69 -0
  118. package/dist/components/range-calendar/index.js +144 -0
  119. package/dist/components/range-calendar/index.js.map +1 -0
  120. package/dist/components/search-view/index.d.ts +79 -0
  121. package/dist/components/search-view/index.js +571 -0
  122. package/dist/components/search-view/index.js.map +1 -0
  123. package/dist/components/select/index.d.ts +152 -0
  124. package/dist/components/select/index.js +419 -0
  125. package/dist/components/select/index.js.map +1 -0
  126. package/dist/components/sheet/index.d.ts +16 -7
  127. package/dist/components/sheet/index.js +157 -152
  128. package/dist/components/sheet/index.js.map +1 -1
  129. package/dist/components/slider/index.d.ts +111 -0
  130. package/dist/components/slider/index.js +673 -0
  131. package/dist/components/slider/index.js.map +1 -0
  132. package/dist/components/split-button/index.d.ts +77 -0
  133. package/dist/components/split-button/index.js +354 -0
  134. package/dist/components/split-button/index.js.map +1 -0
  135. package/dist/components/table/index.d.ts +391 -0
  136. package/dist/components/table/index.js +1708 -0
  137. package/dist/components/table/index.js.map +1 -0
  138. package/dist/components/tabs/index.d.ts +196 -0
  139. package/dist/components/tabs/index.js +1137 -0
  140. package/dist/components/tabs/index.js.map +1 -0
  141. package/dist/components/time-field/index.d.ts +43 -0
  142. package/dist/components/time-field/index.js +107 -0
  143. package/dist/components/time-field/index.js.map +1 -0
  144. package/dist/components/time-picker/index.d.ts +65 -0
  145. package/dist/components/time-picker/index.js +1168 -0
  146. package/dist/components/time-picker/index.js.map +1 -0
  147. package/dist/components/token-field/index.d.ts +105 -0
  148. package/dist/components/token-field/index.js +574 -0
  149. package/dist/components/token-field/index.js.map +1 -0
  150. package/dist/components/tooltip/index.d.ts +102 -0
  151. package/dist/components/tooltip/index.js +223 -0
  152. package/dist/components/tooltip/index.js.map +1 -0
  153. package/dist/components/tree/index.d.ts +112 -0
  154. package/dist/components/tree/index.js +157 -0
  155. package/dist/components/tree/index.js.map +1 -0
  156. package/dist/disclosure/chevron.js +75 -0
  157. package/dist/disclosure/chevron.js.map +1 -0
  158. package/dist/disclosure/index.js +7 -0
  159. package/dist/disclosure/index.js.map +1 -0
  160. package/dist/drop/index.d.ts +54 -0
  161. package/dist/drop/index.js +161 -0
  162. package/dist/drop/index.js.map +1 -0
  163. package/dist/field/chevron.js +74 -0
  164. package/dist/field/chevron.js.map +1 -0
  165. package/dist/field/index.d.ts +2 -1
  166. package/dist/field/index.js +359 -154
  167. package/dist/field/index.js.map +1 -1
  168. package/dist/field/styles.js +18 -1
  169. package/dist/field/styles.js.map +1 -1
  170. package/dist/files/index.d.ts +18 -0
  171. package/dist/files/index.js +107 -0
  172. package/dist/files/index.js.map +1 -0
  173. package/dist/form/index.d.ts +5 -2
  174. package/dist/form/index.js +64 -85
  175. package/dist/form/index.js.map +1 -1
  176. package/dist/glyphs/index.js +128 -1
  177. package/dist/glyphs/index.js.map +1 -1
  178. package/dist/i18n/index.js +36 -1
  179. package/dist/i18n/index.js.map +1 -1
  180. package/dist/i18n/messages.js +1734 -34
  181. package/dist/i18n/messages.js.map +1 -1
  182. package/dist/index.d.ts +37 -3
  183. package/dist/index.js +36 -3
  184. package/dist/indicator/paths.js +23 -1
  185. package/dist/indicator/paths.js.map +1 -1
  186. package/dist/modal/index.js +92 -77
  187. package/dist/modal/index.js.map +1 -1
  188. package/dist/number/keyboard.js +16 -0
  189. package/dist/number/keyboard.js.map +1 -0
  190. package/dist/overlay/anchored.js +68 -38
  191. package/dist/overlay/anchored.js.map +1 -1
  192. package/dist/overlay/keyboard.js +57 -0
  193. package/dist/overlay/keyboard.js.map +1 -0
  194. package/dist/overlay/panel.js +173 -19
  195. package/dist/overlay/panel.js.map +1 -1
  196. package/dist/overlay/placement.js +13 -1
  197. package/dist/overlay/placement.js.map +1 -1
  198. package/dist/picker/index.js +322 -0
  199. package/dist/picker/index.js.map +1 -0
  200. package/dist/press/index.d.ts +2 -0
  201. package/dist/press/index.js +102 -100
  202. package/dist/press/index.js.map +1 -1
  203. package/dist/row/index.js +77 -69
  204. package/dist/row/index.js.map +1 -1
  205. package/dist/row/styles.js +13 -2
  206. package/dist/row/styles.js.map +1 -1
  207. package/dist/segments/field.js +277 -0
  208. package/dist/segments/field.js.map +1 -0
  209. package/dist/segments/index.js +574 -0
  210. package/dist/segments/index.js.map +1 -0
  211. package/dist/segments/styles.js +24 -0
  212. package/dist/segments/styles.js.map +1 -0
  213. package/dist/slider/index.js +145 -0
  214. package/dist/slider/index.js.map +1 -0
  215. package/dist/swatch/index.js +56 -0
  216. package/dist/swatch/index.js.map +1 -0
  217. package/package.json +11 -2
@@ -2,12 +2,14 @@ import { IconStyleContext } from "../../glyphs/icon-style.js";
2
2
  import { useTheme } from "../../theme/scope.js";
3
3
  import { composeStyles, themedStyles } from "../../theme/styles.js";
4
4
  import { hitSlop, usePressFeedback } from "../../press/index.js";
5
- import { AnimatedPressable, HEIGHTS, OUTLINE_WIDTHS, PRESSED_CORNERS, buttonStyles, toggleState, useButtonAction, useCorner, useSlotTrigger } from "../../button/index.js";
5
+ import { AnimatedPressable, HEIGHTS, OUTLINE_WIDTHS, PRESSED_CORNERS, buttonStyles, pressThen, toggleState, useButtonAction, useCorner, useSlotTrigger } from "../../button/index.js";
6
+ import { ButtonGroupItemContext, groupCornersOf, groupPressHandlers, groupSelectionOf, groupStyles, groupWidthThen, useGroupShift } from "../../button/group.js";
6
7
  import { palettesOf } from "../../button/palettes.js";
7
8
  import { BUSY, PendingContent, PendingRing, usePending } from "../../button/pending.js";
8
9
  import { c } from "react/compiler-runtime";
9
10
  import { StyleSheet } from "react-native";
10
- import Animated from "react-native-reanimated";
11
+ import Animated, { useSharedValue } from "react-native-reanimated";
12
+ import { use } from "react";
11
13
  import { jsx, jsxs } from "react/jsx-runtime";
12
14
  //#region src/components/icon-button/index.tsx
13
15
  const DISABLED = {
@@ -88,11 +90,13 @@ const sizesOf = themedStyles(({ sizing }) => {
88
90
  * `style`, `ref` and `testID` land on the `Pressable`.
89
91
  */
90
92
  function IconButton(t0) {
91
- const $ = c(91);
93
+ const $ = c(101);
94
+ let accessibilityHint;
92
95
  let children;
93
96
  let defaultSelected;
94
97
  let delayLongPress;
95
98
  let href;
99
+ let id;
96
100
  let isSelected;
97
101
  let onBlur;
98
102
  let onChange;
@@ -105,6 +109,7 @@ function IconButton(t0) {
105
109
  let onPressIn;
106
110
  let onPressOut;
107
111
  let ownHitSlop;
112
+ let ownSize;
108
113
  let pendingLabel;
109
114
  let props;
110
115
  let ref;
@@ -114,139 +119,160 @@ function IconButton(t0) {
114
119
  let t2;
115
120
  let t3;
116
121
  let t4;
117
- let t5;
118
122
  let type;
119
123
  if ($[0] !== t0) {
120
- ({children, defaultSelected, delayLongPress, disableRipple: t1, hitSlop: ownHitSlop, href, isDisabled: t2, isPending: t3, isSelected, onBlur, onChange, onFocus, onHoverIn, onHoverOut, onLayout, onLongPress, onPress, onPressIn, onPressOut, pendingLabel, ref, size: t4, slot, style, type, variant: t5, ...props} = t0);
124
+ ({accessibilityHint, children, defaultSelected, delayLongPress, disableRipple: t1, hitSlop: ownHitSlop, href, id, isDisabled: t2, isPending: t3, isSelected, onBlur, onChange, onFocus, onHoverIn, onHoverOut, onLayout, onLongPress, onPress, onPressIn, onPressOut, pendingLabel, ref, size: ownSize, slot, style, type, variant: t4, ...props} = t0);
121
125
  $[0] = t0;
122
- $[1] = children;
123
- $[2] = defaultSelected;
124
- $[3] = delayLongPress;
125
- $[4] = href;
126
- $[5] = isSelected;
127
- $[6] = onBlur;
128
- $[7] = onChange;
129
- $[8] = onFocus;
130
- $[9] = onHoverIn;
131
- $[10] = onHoverOut;
132
- $[11] = onLayout;
133
- $[12] = onLongPress;
134
- $[13] = onPress;
135
- $[14] = onPressIn;
136
- $[15] = onPressOut;
137
- $[16] = ownHitSlop;
138
- $[17] = pendingLabel;
139
- $[18] = props;
140
- $[19] = ref;
141
- $[20] = slot;
142
- $[21] = style;
143
- $[22] = t1;
144
- $[23] = t2;
145
- $[24] = t3;
146
- $[25] = t4;
147
- $[26] = t5;
148
- $[27] = type;
126
+ $[1] = accessibilityHint;
127
+ $[2] = children;
128
+ $[3] = defaultSelected;
129
+ $[4] = delayLongPress;
130
+ $[5] = href;
131
+ $[6] = id;
132
+ $[7] = isSelected;
133
+ $[8] = onBlur;
134
+ $[9] = onChange;
135
+ $[10] = onFocus;
136
+ $[11] = onHoverIn;
137
+ $[12] = onHoverOut;
138
+ $[13] = onLayout;
139
+ $[14] = onLongPress;
140
+ $[15] = onPress;
141
+ $[16] = onPressIn;
142
+ $[17] = onPressOut;
143
+ $[18] = ownHitSlop;
144
+ $[19] = ownSize;
145
+ $[20] = pendingLabel;
146
+ $[21] = props;
147
+ $[22] = ref;
148
+ $[23] = slot;
149
+ $[24] = style;
150
+ $[25] = t1;
151
+ $[26] = t2;
152
+ $[27] = t3;
153
+ $[28] = t4;
154
+ $[29] = type;
149
155
  } else {
150
- children = $[1];
151
- defaultSelected = $[2];
152
- delayLongPress = $[3];
153
- href = $[4];
154
- isSelected = $[5];
155
- onBlur = $[6];
156
- onChange = $[7];
157
- onFocus = $[8];
158
- onHoverIn = $[9];
159
- onHoverOut = $[10];
160
- onLayout = $[11];
161
- onLongPress = $[12];
162
- onPress = $[13];
163
- onPressIn = $[14];
164
- onPressOut = $[15];
165
- ownHitSlop = $[16];
166
- pendingLabel = $[17];
167
- props = $[18];
168
- ref = $[19];
169
- slot = $[20];
170
- style = $[21];
171
- t1 = $[22];
172
- t2 = $[23];
173
- t3 = $[24];
174
- t4 = $[25];
175
- t5 = $[26];
176
- type = $[27];
156
+ accessibilityHint = $[1];
157
+ children = $[2];
158
+ defaultSelected = $[3];
159
+ delayLongPress = $[4];
160
+ href = $[5];
161
+ id = $[6];
162
+ isSelected = $[7];
163
+ onBlur = $[8];
164
+ onChange = $[9];
165
+ onFocus = $[10];
166
+ onHoverIn = $[11];
167
+ onHoverOut = $[12];
168
+ onLayout = $[13];
169
+ onLongPress = $[14];
170
+ onPress = $[15];
171
+ onPressIn = $[16];
172
+ onPressOut = $[17];
173
+ ownHitSlop = $[18];
174
+ ownSize = $[19];
175
+ pendingLabel = $[20];
176
+ props = $[21];
177
+ ref = $[22];
178
+ slot = $[23];
179
+ style = $[24];
180
+ t1 = $[25];
181
+ t2 = $[26];
182
+ t3 = $[27];
183
+ t4 = $[28];
184
+ type = $[29];
177
185
  }
178
186
  const disableRipple = t1 === void 0 ? false : t1;
179
- const isDisabled = t2 === void 0 ? false : t2;
187
+ const ownDisabled = t2 === void 0 ? false : t2;
180
188
  const isPending = t3 === void 0 ? false : t3;
181
- const size = t4 === void 0 ? "md" : t4;
182
- const variant = t5 === void 0 ? "standard" : t5;
189
+ const variant = t4 === void 0 ? "standard" : t4;
183
190
  const theme = useTheme();
191
+ const group = use(ButtonGroupItemContext);
192
+ const size = ownSize ?? group?.size ?? "md";
193
+ const isDisabled = ownDisabled || group?.isDisabled === true;
194
+ const membership = groupSelectionOf(group, id);
184
195
  const pending = href === void 0 && isPending;
185
196
  const ringLabel = usePending(pending, pendingLabel);
186
- const isToggle = defaultSelected !== void 0 || isSelected !== void 0 || onChange !== void 0;
187
- const t6 = slot ?? "default";
188
- let t7;
189
- if ($[28] !== defaultSelected || $[29] !== href || $[30] !== isSelected || $[31] !== isToggle || $[32] !== onChange || $[33] !== onPress || $[34] !== t6 || $[35] !== type) {
190
- t7 = {
197
+ const isToggle = membership === void 0 && (defaultSelected !== void 0 || isSelected !== void 0 || onChange !== void 0);
198
+ const t5 = slot ?? "default";
199
+ let t6;
200
+ if ($[30] !== defaultSelected || $[31] !== href || $[32] !== isSelected || $[33] !== isToggle || $[34] !== onChange || $[35] !== onPress || $[36] !== t5 || $[37] !== type) {
201
+ t6 = {
191
202
  defaultSelected,
192
203
  href,
193
204
  isSelected,
194
205
  isToggle,
195
206
  onChange,
196
207
  onPress,
197
- slot: t6,
208
+ slot: t5,
198
209
  type
199
210
  };
200
- $[28] = defaultSelected;
201
- $[29] = href;
202
- $[30] = isSelected;
203
- $[31] = isToggle;
204
- $[32] = onChange;
205
- $[33] = onPress;
206
- $[34] = t6;
207
- $[35] = type;
208
- $[36] = t7;
209
- } else t7 = $[36];
210
- const action = useButtonAction(t7);
211
- let t8;
212
- if ($[37] !== delayLongPress || $[38] !== href || $[39] !== onHoverIn || $[40] !== onHoverOut || $[41] !== onLongPress || $[42] !== ref || $[43] !== slot) {
213
- t8 = {
211
+ $[30] = defaultSelected;
212
+ $[31] = href;
213
+ $[32] = isSelected;
214
+ $[33] = isToggle;
215
+ $[34] = onChange;
216
+ $[35] = onPress;
217
+ $[36] = t5;
218
+ $[37] = type;
219
+ $[38] = t6;
220
+ } else t6 = $[38];
221
+ const action = useButtonAction(t6);
222
+ let t7;
223
+ if ($[39] !== accessibilityHint || $[40] !== delayLongPress || $[41] !== href || $[42] !== onHoverIn || $[43] !== onHoverOut || $[44] !== onLongPress || $[45] !== onPressIn || $[46] !== onPressOut || $[47] !== ref || $[48] !== slot) {
224
+ t7 = {
225
+ accessibilityHint,
214
226
  delayLongPress,
215
227
  href,
216
228
  onHoverIn,
217
229
  onHoverOut,
218
230
  onLongPress,
231
+ onPressIn,
232
+ onPressOut,
219
233
  ref,
220
234
  slot
221
235
  };
222
- $[37] = delayLongPress;
223
- $[38] = href;
224
- $[39] = onHoverIn;
225
- $[40] = onHoverOut;
226
- $[41] = onLongPress;
227
- $[42] = ref;
228
- $[43] = slot;
229
- $[44] = t8;
230
- } else t8 = $[44];
231
- const t9 = useSlotTrigger(t8);
236
+ $[39] = accessibilityHint;
237
+ $[40] = delayLongPress;
238
+ $[41] = href;
239
+ $[42] = onHoverIn;
240
+ $[43] = onHoverOut;
241
+ $[44] = onLongPress;
242
+ $[45] = onPressIn;
243
+ $[46] = onPressOut;
244
+ $[47] = ref;
245
+ $[48] = slot;
246
+ $[49] = t7;
247
+ } else t7 = $[49];
248
+ const t8 = useSlotTrigger(t7);
232
249
  let hoverIn;
233
250
  let hoverOut;
234
251
  let longPress;
252
+ let pressIn;
253
+ let pressOut;
235
254
  let triggerProps;
236
- if ($[45] !== t9) {
237
- ({onHoverIn: hoverIn, onHoverOut: hoverOut, onLongPress: longPress, ...triggerProps} = t9);
238
- $[45] = t9;
239
- $[46] = hoverIn;
240
- $[47] = hoverOut;
241
- $[48] = longPress;
242
- $[49] = triggerProps;
255
+ if ($[50] !== t8) {
256
+ ({onHoverIn: hoverIn, onHoverOut: hoverOut, onLongPress: longPress, onPressIn: pressIn, onPressOut: pressOut, ...triggerProps} = t8);
257
+ $[50] = t8;
258
+ $[51] = hoverIn;
259
+ $[52] = hoverOut;
260
+ $[53] = longPress;
261
+ $[54] = pressIn;
262
+ $[55] = pressOut;
263
+ $[56] = triggerProps;
243
264
  } else {
244
- hoverIn = $[46];
245
- hoverOut = $[47];
246
- longPress = $[48];
247
- triggerProps = $[49];
265
+ hoverIn = $[51];
266
+ hoverOut = $[52];
267
+ longPress = $[53];
268
+ pressIn = $[54];
269
+ pressOut = $[55];
270
+ triggerProps = $[56];
248
271
  }
249
- const colors = palettesOf(theme)[isDisabled ? DISABLED[variant] : isToggle ? TOGGLE_PALETTES[variant][action.selected ? "selected" : "unselected"] : variant];
272
+ const toggles = isToggle || membership !== void 0;
273
+ const selected = membership?.selected ?? action.selected;
274
+ const colors = palettesOf(theme)[isDisabled ? DISABLED[variant] : toggles ? TOGGLE_PALETTES[variant][selected ? "selected" : "unselected"] : variant];
275
+ const width = useSharedValue(0);
250
276
  const feedback = usePressFeedback({
251
277
  color: colors.content,
252
278
  disabled: isDisabled,
@@ -255,93 +281,98 @@ function IconButton(t0) {
255
281
  onFocus,
256
282
  onHoverIn: hoverIn,
257
283
  onHoverOut: hoverOut,
258
- onPressIn,
259
- onPressOut,
284
+ ...groupPressHandlers(group, width, pressIn, pressOut),
260
285
  pending
261
286
  });
262
287
  const { radii, sizing } = theme;
263
288
  const edge = sizing[HEIGHTS[size]];
264
- const shaped = useCorner(feedback.pressed || action.selected ? radii[PRESSED_CORNERS[size]] : radii.pill, onLayout);
289
+ const shaped = useCorner(groupCornersOf(group, feedback, selected) ?? (feedback.pressed || selected ? radii[PRESSED_CORNERS[size]] : radii.pill), groupWidthThen(group, width, onLayout));
290
+ const shift = useGroupShift(group, edge, "width");
291
+ const keepsTarget = group?.keepsTarget === true;
265
292
  const T0 = AnimatedPressable;
266
- const t10 = href === void 0 ? "button" : "link";
267
- let t11;
268
- if ($[50] !== action || $[51] !== isToggle) {
269
- t11 = isToggle ? toggleState(action.selected) : void 0;
270
- $[50] = action;
271
- $[51] = isToggle;
272
- $[52] = t11;
273
- } else t11 = $[52];
293
+ const t9 = href === void 0 ? "button" : "link";
294
+ let t10;
295
+ if ($[57] !== action || $[58] !== isToggle) {
296
+ t10 = isToggle ? toggleState(action.selected) : void 0;
297
+ $[57] = action;
298
+ $[58] = isToggle;
299
+ $[59] = t10;
300
+ } else t10 = $[59];
301
+ const t11 = membership?.accessibility;
274
302
  const t12 = pending ? BUSY : void 0;
275
303
  const t13 = feedback.handlers;
276
304
  let t14;
277
- if ($[53] !== edge || $[54] !== ownHitSlop) {
278
- t14 = ownHitSlop ?? hitSlop(edge, edge);
279
- $[53] = edge;
280
- $[54] = ownHitSlop;
281
- $[55] = t14;
282
- } else t14 = $[55];
305
+ if ($[60] !== edge || $[61] !== keepsTarget || $[62] !== ownHitSlop) {
306
+ t14 = ownHitSlop ?? hitSlop(edge, keepsTarget ? Math.max(edge, 48) : edge);
307
+ $[60] = edge;
308
+ $[61] = keepsTarget;
309
+ $[62] = ownHitSlop;
310
+ $[63] = t14;
311
+ } else t14 = $[63];
283
312
  const t15 = shaped.onLayout;
284
313
  const t16 = pending ? void 0 : longPress;
285
- const t17 = pending ? void 0 : action.onPress;
286
- const t18 = composeStyles(styles.base, sizesOf(theme)[size], variant === "outlined" ? outlineWidths[size] : void 0, colors.container, shaped.corner, feedback.ring, style);
314
+ const t17 = pending ? void 0 : membership === void 0 ? action.onPress : pressThen(action.onPress, membership.toggle);
315
+ const t18 = composeStyles(styles.base, sizesOf(theme)[size], variant === "outlined" ? outlineWidths[size] : void 0, colors.container, shaped.corner, shift, keepsTarget ? groupStyles.target : void 0, feedback.ring, style);
287
316
  let t19;
288
- if ($[56] !== shaped.corner) {
317
+ if ($[64] !== shaped.corner) {
289
318
  t19 = composeStyles(buttonStyles.clip, shaped.corner);
290
- $[56] = shaped.corner;
291
- $[57] = t19;
292
- } else t19 = $[57];
319
+ $[64] = shaped.corner;
320
+ $[65] = t19;
321
+ } else t19 = $[65];
293
322
  let t20;
294
- if ($[58] !== feedback.layer || $[59] !== t19) {
323
+ if ($[66] !== feedback.layer || $[67] !== t19) {
295
324
  t20 = /* @__PURE__ */ jsx(Animated.View, {
296
325
  style: t19,
297
326
  children: feedback.layer
298
327
  });
299
- $[58] = feedback.layer;
300
- $[59] = t19;
301
- $[60] = t20;
302
- } else t20 = $[60];
328
+ $[66] = feedback.layer;
329
+ $[67] = t19;
330
+ $[68] = t20;
331
+ } else t20 = $[68];
303
332
  const T1 = PendingContent;
304
333
  const T2 = IconStyleContext;
305
334
  const t21 = iconStyleOf(colors.content, size);
306
335
  let t22;
307
- if ($[61] !== T2 || $[62] !== children || $[63] !== t21) {
336
+ if ($[69] !== T2 || $[70] !== children || $[71] !== t21) {
308
337
  t22 = /* @__PURE__ */ jsx(T2, {
309
338
  value: t21,
310
339
  children
311
340
  });
312
- $[61] = T2;
313
- $[62] = children;
314
- $[63] = t21;
315
- $[64] = t22;
316
- } else t22 = $[64];
341
+ $[69] = T2;
342
+ $[70] = children;
343
+ $[71] = t21;
344
+ $[72] = t22;
345
+ } else t22 = $[72];
317
346
  let t23;
318
- if ($[65] !== T1 || $[66] !== pending || $[67] !== t22) {
347
+ if ($[73] !== T1 || $[74] !== pending || $[75] !== t22) {
319
348
  t23 = /* @__PURE__ */ jsx(T1, {
320
349
  isPending: pending,
321
350
  children: t22
322
351
  });
323
- $[65] = T1;
324
- $[66] = pending;
325
- $[67] = t22;
326
- $[68] = t23;
327
- } else t23 = $[68];
352
+ $[73] = T1;
353
+ $[74] = pending;
354
+ $[75] = t22;
355
+ $[76] = t23;
356
+ } else t23 = $[76];
328
357
  let t24;
329
- if ($[69] !== colors || $[70] !== pending || $[71] !== ringLabel || $[72] !== size) {
358
+ if ($[77] !== colors || $[78] !== pending || $[79] !== ringLabel || $[80] !== size) {
330
359
  t24 = pending ? /* @__PURE__ */ jsx(PendingRing, {
331
360
  color: colors.content,
332
361
  diameter: ICON_SIZES[size],
333
362
  label: ringLabel
334
363
  }) : null;
335
- $[69] = colors;
336
- $[70] = pending;
337
- $[71] = ringLabel;
338
- $[72] = size;
339
- $[73] = t24;
340
- } else t24 = $[73];
364
+ $[77] = colors;
365
+ $[78] = pending;
366
+ $[79] = ringLabel;
367
+ $[80] = size;
368
+ $[81] = t24;
369
+ } else t24 = $[81];
341
370
  let t25;
342
- if ($[74] !== T0 || $[75] !== feedback.handlers || $[76] !== isDisabled || $[77] !== props || $[78] !== shaped.onLayout || $[79] !== t10 || $[80] !== t11 || $[81] !== t12 || $[82] !== t14 || $[83] !== t16 || $[84] !== t17 || $[85] !== t18 || $[86] !== t20 || $[87] !== t23 || $[88] !== t24 || $[89] !== triggerProps) {
371
+ if ($[82] !== T0 || $[83] !== feedback.handlers || $[84] !== id || $[85] !== isDisabled || $[86] !== props || $[87] !== shaped.onLayout || $[88] !== t10 || $[89] !== t11 || $[90] !== t12 || $[91] !== t14 || $[92] !== t16 || $[93] !== t17 || $[94] !== t18 || $[95] !== t20 || $[96] !== t23 || $[97] !== t24 || $[98] !== t9 || $[99] !== triggerProps) {
343
372
  t25 = /* @__PURE__ */ jsxs(T0, {
344
- role: t10,
373
+ id,
374
+ role: t9,
375
+ ...t10,
345
376
  ...t11,
346
377
  ...t12,
347
378
  ...props,
@@ -359,24 +390,26 @@ function IconButton(t0) {
359
390
  t24
360
391
  ]
361
392
  });
362
- $[74] = T0;
363
- $[75] = feedback.handlers;
364
- $[76] = isDisabled;
365
- $[77] = props;
366
- $[78] = shaped.onLayout;
367
- $[79] = t10;
368
- $[80] = t11;
369
- $[81] = t12;
370
- $[82] = t14;
371
- $[83] = t16;
372
- $[84] = t17;
373
- $[85] = t18;
374
- $[86] = t20;
375
- $[87] = t23;
376
- $[88] = t24;
377
- $[89] = triggerProps;
378
- $[90] = t25;
379
- } else t25 = $[90];
393
+ $[82] = T0;
394
+ $[83] = feedback.handlers;
395
+ $[84] = id;
396
+ $[85] = isDisabled;
397
+ $[86] = props;
398
+ $[87] = shaped.onLayout;
399
+ $[88] = t10;
400
+ $[89] = t11;
401
+ $[90] = t12;
402
+ $[91] = t14;
403
+ $[92] = t16;
404
+ $[93] = t17;
405
+ $[94] = t18;
406
+ $[95] = t20;
407
+ $[96] = t23;
408
+ $[97] = t24;
409
+ $[98] = t9;
410
+ $[99] = triggerProps;
411
+ $[100] = t25;
412
+ } else t25 = $[100];
380
413
  return t25;
381
414
  }
382
415
  function iconStyleOf(color, size) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","PressableProps","StyleProp","View","ViewStyle","AnimatedStyle","StyleSheet","Animated","ButtonLinkForm","ButtonPressForm","ButtonToggleForm","PaletteName","IconStyle","AnimatedPressable","buttonStyles","HEIGHTS","OUTLINE_WIDTHS","PRESSED_CORNERS","toggleState","useButtonAction","useCorner","useSlotTrigger","palettesOf","BUSY","PendingContent","PendingRing","usePending","IconStyleContext","hitSlop","usePressFeedback","useTheme","composeStyles","themedStyles","IconButtonProps","Omit","children","disableRipple","isDisabled","ref","size","IconButtonSize","style","variant","IconButtonVariant","DISABLED","Readonly","Record","filled","outlined","standard","tonal","ICON_SIZES","lg","md","xl","xs","xxl","TOGGLE_PALETTES","selected","unselected","styles","create","base","alignItems","flexShrink","justifyContent","outlineWidths","borderWidth","sizesOf","sizing","square","edge","height","width","IconButton","t0","$","_c","defaultSelected","delayLongPress","href","isSelected","onBlur","onChange","onFocus","onHoverIn","onHoverOut","onLayout","onLongPress","onPress","onPressIn","onPressOut","ownHitSlop","pendingLabel","props","slot","t1","t2","t3","t4","t5","type","isPending","undefined","theme","pending","ringLabel","isToggle","t6","t7","action","t8","t9","hoverIn","hoverOut","longPress","triggerProps","colors","feedback","color","content","disabled","radii","shaped","pressed","pill","T0","t10","t11","t12","t13","handlers","t14","t15","t16","t17","t18","container","corner","ring","t19","clip","t20","layer","T1","T2","t21","iconStyleOf","t22","t23","t24","t25","_c"],"sources":["../../../src/components/icon-button/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref } from 'react'\nimport type { PressableProps, StyleProp, View, ViewStyle } from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\n\nimport { StyleSheet } from 'react-native'\nimport Animated from 'react-native-reanimated'\n\nimport type {\n ButtonLinkForm,\n ButtonPressForm,\n ButtonToggleForm,\n} from '../../button'\nimport type { PaletteName } from '../../button/palettes'\nimport type { IconStyle } from '../../glyphs/icon-style'\n\nimport {\n AnimatedPressable,\n buttonStyles,\n HEIGHTS,\n OUTLINE_WIDTHS,\n PRESSED_CORNERS,\n toggleState,\n useButtonAction,\n useCorner,\n useSlotTrigger,\n} from '../../button'\nimport { palettesOf } from '../../button/palettes'\nimport {\n BUSY,\n PendingContent,\n PendingRing,\n usePending,\n} from '../../button/pending'\nimport { IconStyleContext } from '../../glyphs/icon-style'\nimport { hitSlop, usePressFeedback } from '../../press'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\n\n// The icon buttons spec page's four styles at its five sizes, as kanso-ui's\n// IconButton draws them: Button's chrome around a single icon. The pairs are\n// the page's: filled on primary, tonal on secondary container, outlined with\n// an outline-variant rule and an on-surface-variant icon, and standard,\n// transparent, with the same icon over whatever it sits on. Disabled is\n// Button's, on-surface at the two disabled opacities, and a standard button\n// takes the text button's colour since neither has a container.\n//\n// The sizes are the page's XS to XL at Button's five heights, so the two line\n// up in a row: a square of 32, 40, 56, 96 or 136dp holding an icon of 20, 24,\n// 24, 32 or 40dp. The two middle sizes share one icon, and the container\n// alone grows between them. The two smallest take presses over a 48dp target\n// through `hitSlop`, which is the page's floor for them.\n//\n// **A toggle is the same button reporting a state.** Given `isSelected`,\n// `defaultSelected` or `onChange` it takes the page's second pair of colour\n// roles for its variant: a filled toggle rests on surface container with an\n// on-surface-variant icon and takes primary once selected, a tonal one moves\n// from the secondary container pair to secondary, a standard one stays\n// transparent while its icon moves to primary, and an outlined one swaps its\n// rule for the inverse surface pair. So a selected filled toggle looks like a\n// plain filled button, and an unselected one does not.\n//\n// **A pending button keeps its place**, as Button's does: the icon is hidden\n// where it stands and an indeterminate ring is drawn over it, in the icon's\n// colour and at the icon's size, which is what web's `1em` reads there. The\n// button keeps its focus and its ring, reports itself busy and takes no\n// press until it clears, and src/button's pending.tsx says the change out\n// loud.\n//\n// **The corner morphs from a circle to a rounded square.** A press tightens\n// it to the size's pressed corner, 8dp for the two small sizes, 12dp at\n// `lg` and 16dp at the two large, and a selected toggle rests there, which is\n// the page's round-to-square morph. It eases as Button's does.\n//\n// The forms, the toggle's state, what a press does and the corner's ease are\n// src/button's, shared with Button.\n\ntype IconButtonProps = (ButtonLinkForm | ButtonPressForm | ButtonToggleForm) &\n Omit<PressableProps, 'aria-label' | 'children' | 'disabled' | 'style'> & {\n /**\n * What the button does, in words. Required rather than optional: an icon\n * on its own has no accessible name, so without this the control\n * announces nothing at all.\n */\n readonly 'aria-label': string\n /**\n * The icon. The button hands it its colour and the page's icon size for\n * the button's size through `useIconStyle()`.\n */\n readonly children?: ReactNode\n /**\n * Draws no press ripple. The state layer is unaffected.\n * @default false\n */\n readonly disableRipple?: boolean\n /**\n * Draws the button disabled, and takes no presses.\n * @default false\n */\n readonly isDisabled?: boolean\n readonly ref?: Ref<ComponentRef<typeof View>>\n /**\n * Control size: `xs` 32dp, `md` 40dp, `lg` 56dp, `xl` 96dp, `xxl` 136dp,\n * the icon buttons spec page's XS to XL, and the same heights `Button`\n * uses, so the two line up beside each other in a row. The icon is 20dp,\n * 24dp, 24dp, 32dp and 40dp in turn.\n * @default 'md'\n */\n readonly size?: IconButtonSize\n readonly style?: StyleProp<ViewStyle>\n /**\n * `standard` is transparent and tints what it sits on; `outlined` is\n * transparent with a rule around it; `filled` and `tonal` carry a\n * container of their own.\n * @default 'standard'\n */\n readonly variant?: IconButtonVariant\n }\n\ntype IconButtonSize = 'lg' | 'md' | 'xl' | 'xs' | 'xxl'\n\ntype IconButtonVariant = 'filled' | 'outlined' | 'standard' | 'tonal'\n\n// The disabled container each variant draws. Filled and tonal share the\n// page's one disabled container, and standard draws the text button's\n// colour, which is the icon alone.\nconst DISABLED: Readonly<Record<IconButtonVariant, PaletteName>> = {\n filled: 'filledDisabled',\n outlined: 'outlinedDisabled',\n standard: 'textDisabled',\n tonal: 'filledDisabled',\n}\n\n// The icon each size holds, from the page's size token sets. Literals, as on\n// web: they are icon sizes, which the theme has no scale for.\nconst ICON_SIZES: Readonly<Record<IconButtonSize, number>> = {\n lg: 24,\n md: 24,\n xl: 32,\n xs: 20,\n xxl: 40,\n}\n\n// Which container a toggle draws, selected and not. An unselected outlined,\n// standard or tonal toggle is the plain button of that variant.\nconst TOGGLE_PALETTES: Readonly<\n Record<\n IconButtonVariant,\n Readonly<Record<'selected' | 'unselected', PaletteName>>\n >\n> = {\n filled: { selected: 'filledToggleSelected', unselected: 'filledToggle' },\n outlined: { selected: 'outlinedToggleSelected', unselected: 'outlined' },\n standard: { selected: 'standardToggleSelected', unselected: 'standard' },\n tonal: { selected: 'tonalToggleSelected', unselected: 'tonal' },\n}\n\nconst styles = StyleSheet.create({\n // The icon sits in the middle of a square that a row never squeezes.\n base: {\n alignItems: 'center',\n flexShrink: 0,\n justifyContent: 'center',\n },\n})\n\n// The outlined rule's width at each size, Button's.\nconst outlineWidths = StyleSheet.create({\n lg: { borderWidth: OUTLINE_WIDTHS.lg },\n md: { borderWidth: OUTLINE_WIDTHS.md },\n xl: { borderWidth: OUTLINE_WIDTHS.xl },\n xs: { borderWidth: OUTLINE_WIDTHS.xs },\n xxl: { borderWidth: OUTLINE_WIDTHS.xxl },\n})\n\n// Square, so one control height sets both edges.\nconst sizesOf = themedStyles(({ sizing }) => {\n function square(size: IconButtonSize): ViewStyle {\n const edge = sizing[HEIGHTS[size]]\n\n return { height: edge, width: edge }\n }\n\n return StyleSheet.create({\n lg: square('lg'),\n md: square('md'),\n xl: square('xl'),\n xs: square('xs'),\n xxl: square('xxl'),\n })\n})\n\n/**\n * A button that is an icon, at five control heights, with web's props and\n * values. Given `href` it is a link with the same appearance, and given\n * `isSelected`, `defaultSelected` or `onChange` it is a toggle, which reports\n * its state to a screen reader and draws the page's second pair of colour\n * roles for its variant. The three forms are exclusive, so a toggle given\n * `href` does not compile.\n *\n * ```tsx\n * <IconButton aria-label=\"Label\" defaultSelected variant=\"tonal\">\n * <Icon />\n * </IconButton>\n * ```\n *\n * The two sizes under 48dp, `xs` and `md`, take presses over a 48dp target\n * through `hitSlop`, which a `hitSlop` of the call site's own replaces.\n * `style`, `ref` and `testID` land on the `Pressable`.\n */\nfunction IconButton({\n children,\n defaultSelected,\n delayLongPress,\n disableRipple = false,\n hitSlop: ownHitSlop,\n href,\n isDisabled = false,\n isPending = false,\n isSelected,\n onBlur,\n onChange,\n onFocus,\n onHoverIn,\n onHoverOut,\n onLayout,\n onLongPress,\n onPress,\n onPressIn,\n onPressOut,\n pendingLabel,\n ref,\n size = 'md',\n slot,\n style,\n type,\n variant = 'standard',\n ...props\n}: IconButtonProps) {\n const theme = useTheme()\n // A link is never pending, as on web, where its props have no such state.\n const pending = href === undefined && isPending\n const ringLabel = usePending(pending, pendingLabel)\n\n // The three props that make this a toggle, read as web reads them.\n const isToggle =\n defaultSelected !== undefined ||\n isSelected !== undefined ||\n onChange !== undefined\n const action = useButtonAction({\n defaultSelected,\n href,\n isSelected,\n isToggle,\n onChange,\n onPress,\n slot: slot ?? 'default',\n type,\n })\n const {\n onHoverIn: hoverIn,\n onHoverOut: hoverOut,\n onLongPress: longPress,\n ...triggerProps\n } = useSlotTrigger({\n delayLongPress,\n href,\n onHoverIn,\n onHoverOut,\n onLongPress,\n ref,\n slot,\n })\n const colors =\n palettesOf(theme)[\n isDisabled\n ? DISABLED[variant]\n : isToggle\n ? TOGGLE_PALETTES[variant][\n action.selected ? 'selected' : 'unselected'\n ]\n : variant\n ]\n\n const feedback = usePressFeedback({\n color: colors.content,\n disabled: isDisabled,\n disableRipple,\n onBlur,\n onFocus,\n onHoverIn: hoverIn,\n onHoverOut: hoverOut,\n onPressIn,\n onPressOut,\n pending,\n })\n\n const { radii, sizing } = theme\n const edge = sizing[HEIGHTS[size]]\n const shaped = useCorner(\n feedback.pressed || action.selected\n ? radii[PRESSED_CORNERS[size]]\n : radii.pill,\n onLayout,\n )\n\n return (\n <AnimatedPressable\n role={href === undefined ? 'button' : 'link'}\n {...(isToggle ? toggleState(action.selected) : undefined)}\n {...(pending ? BUSY : undefined)}\n {...props}\n {...triggerProps}\n {...feedback.handlers}\n disabled={isDisabled}\n hitSlop={ownHitSlop ?? hitSlop(edge, edge)}\n onLayout={shaped.onLayout}\n onLongPress={pending ? undefined : longPress}\n onPress={pending ? undefined : action.onPress}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.base,\n sizesOf(theme)[size],\n variant === 'outlined' ? outlineWidths[size] : undefined,\n colors.container,\n shaped.corner,\n feedback.ring,\n style,\n )}\n >\n <Animated.View\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n buttonStyles.clip,\n shaped.corner,\n )}\n >\n {feedback.layer}\n </Animated.View>\n <PendingContent isPending={pending}>\n <IconStyleContext value={iconStyleOf(colors.content, size)}>\n {children}\n </IconStyleContext>\n </PendingContent>\n {pending ? (\n <PendingRing\n color={colors.content}\n diameter={ICON_SIZES[size]}\n label={ringLabel}\n />\n ) : null}\n </AnimatedPressable>\n )\n}\n\nfunction iconStyleOf(color: string, size: IconButtonSize): IconStyle {\n return { color, size: ICON_SIZES[size] }\n}\n\nexport { IconButton }\nexport type { IconButtonProps, IconButtonSize, IconButtonVariant }\n"],"mappings":";;;;;;;;;;;;AA6HA,MAAM8C,WAA6D;CACjEG,QAAQ;CACRC,UAAU;CACVC,UAAU;CACVC,OAAO;AACT;AAIA,MAAMC,aAAuD;CAC3DC,IAAI;CACJC,IAAI;CACJC,IAAI;CACJC,IAAI;CACJC,KAAK;AACP;AAIA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zE,EAAA,MAAA0E;EAAA1E,EAAA,MAAAwC;EAAAxC,EAAA,MAAA2E;CAAA,OAAAA,MAAA3E,EAAA;CAAA,OA1CpB2E;AA0CoB;AAIxB,SAASJ,YAAY5B,OAAehF,MAAiC;CACnE,OAAO;EAAEgF;EAAOhF,MAAMY,WAAWZ;CAAM;AACzC"}
1
+ {"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","PressableProps","StyleProp","View","ViewStyle","AnimatedStyle","use","StyleSheet","Animated","useSharedValue","ButtonLinkForm","ButtonPressForm","ButtonToggleForm","PaletteName","IconStyle","AnimatedPressable","buttonStyles","HEIGHTS","OUTLINE_WIDTHS","PRESSED_CORNERS","pressThen","toggleState","useButtonAction","useCorner","useSlotTrigger","ButtonGroupItemContext","groupCornersOf","groupPressHandlers","groupSelectionOf","groupStyles","groupWidthThen","useGroupShift","palettesOf","BUSY","PendingContent","PendingRing","usePending","IconStyleContext","hitSlop","TARGET_SIZE","usePressFeedback","useTheme","composeStyles","themedStyles","IconButtonProps","Omit","children","disableRipple","id","isDisabled","ref","size","IconButtonSize","style","variant","IconButtonVariant","DISABLED","Readonly","Record","filled","outlined","standard","tonal","ICON_SIZES","lg","md","xl","xs","xxl","TOGGLE_PALETTES","selected","unselected","styles","create","base","alignItems","flexShrink","justifyContent","outlineWidths","borderWidth","sizesOf","sizing","square","edge","height","width","IconButton","t0","$","_c","accessibilityHint","defaultSelected","delayLongPress","href","isSelected","onBlur","onChange","onFocus","onHoverIn","onHoverOut","onLayout","onLongPress","onPress","onPressIn","onPressOut","ownHitSlop","ownSize","pendingLabel","props","slot","t1","t2","t3","t4","type","isPending","undefined","ownDisabled","theme","group","membership","pending","ringLabel","isToggle","t5","t6","action","t7","t8","hoverIn","hoverOut","longPress","pressIn","pressOut","triggerProps","toggles","colors","feedback","color","content","disabled","radii","shaped","pressed","pill","shift","keepsTarget","T0","t9","t10","t11","accessibility","t12","t13","handlers","t14","Math","max","t15","t16","t17","toggle","t18","container","corner","target","ring","t19","clip","t20","layer","T1","T2","t21","iconStyleOf","t22","t23","t24","t25","_c"],"sources":["../../../src/components/icon-button/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref } from 'react'\nimport type { PressableProps, StyleProp, View, ViewStyle } from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\n\nimport { use } from 'react'\nimport { StyleSheet } from 'react-native'\nimport Animated, { useSharedValue } from 'react-native-reanimated'\n\nimport type {\n ButtonLinkForm,\n ButtonPressForm,\n ButtonToggleForm,\n} from '../../button'\nimport type { PaletteName } from '../../button/palettes'\nimport type { IconStyle } from '../../glyphs/icon-style'\n\nimport {\n AnimatedPressable,\n buttonStyles,\n HEIGHTS,\n OUTLINE_WIDTHS,\n PRESSED_CORNERS,\n pressThen,\n toggleState,\n useButtonAction,\n useCorner,\n useSlotTrigger,\n} from '../../button'\nimport {\n ButtonGroupItemContext,\n groupCornersOf,\n groupPressHandlers,\n groupSelectionOf,\n groupStyles,\n groupWidthThen,\n useGroupShift,\n} from '../../button/group'\nimport { palettesOf } from '../../button/palettes'\nimport {\n BUSY,\n PendingContent,\n PendingRing,\n usePending,\n} from '../../button/pending'\nimport { IconStyleContext } from '../../glyphs/icon-style'\nimport { hitSlop, TARGET_SIZE, usePressFeedback } from '../../press'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\n\n// The icon buttons spec page's four styles at its five sizes, as kanso-ui's\n// IconButton draws them: Button's chrome around a single icon. The pairs are\n// the page's: filled on primary, tonal on secondary container, outlined with\n// an outline-variant rule and an on-surface-variant icon, and standard,\n// transparent, with the same icon over whatever it sits on. Disabled is\n// Button's, on-surface at the two disabled opacities, and a standard button\n// takes the text button's colour since neither has a container.\n//\n// The sizes are the page's XS to XL at Button's five heights, so the two line\n// up in a row: a square of 32, 40, 56, 96 or 136dp holding an icon of 20, 24,\n// 24, 32 or 40dp. The two middle sizes share one icon, and the container\n// alone grows between them. The two smallest take presses over a 48dp target\n// through `hitSlop`, which is the page's floor for them.\n//\n// **A toggle is the same button reporting a state.** Given `isSelected`,\n// `defaultSelected` or `onChange` it takes the page's second pair of colour\n// roles for its variant: a filled toggle rests on surface container with an\n// on-surface-variant icon and takes primary once selected, a tonal one moves\n// from the secondary container pair to secondary, a standard one stays\n// transparent while its icon moves to primary, and an outlined one swaps its\n// rule for the inverse surface pair. So a selected filled toggle looks like a\n// plain filled button, and an unselected one does not.\n//\n// **A pending button keeps its place**, as Button's does: the icon is hidden\n// where it stands and an indeterminate ring is drawn over it, in the icon's\n// colour and at the icon's size, which is what web's `1em` reads there. The\n// button keeps its focus and its ring, reports itself busy and takes no\n// press until it clears, and src/button's pending.tsx says the change out\n// loud.\n//\n// **The corner morphs from a circle to a rounded square.** A press tightens\n// it to the size's pressed corner, 8dp for the two small sizes, 12dp at\n// `lg` and 16dp at the two large, and a selected toggle rests there, which is\n// the page's round-to-square morph. It eases as Button's does.\n//\n// **A ButtonGroup around it hands it what the group decides**, as it does a\n// Button, through src/button's group.ts: its size, whether it is disabled, a\n// connected group's corners, and a standard group's widening while it or a\n// neighbour is pressed, which the button takes as width. In a group that\n// selects it is a toggle of the group's, by its `id`.\n//\n// The forms, the toggle's state, what a press does and the corner's ease are\n// src/button's, shared with Button.\n\ntype IconButtonProps = (ButtonLinkForm | ButtonPressForm | ButtonToggleForm) &\n Omit<PressableProps, 'aria-label' | 'children' | 'disabled' | 'style'> & {\n /**\n * What the button does, in words. Required rather than optional: an icon\n * on its own has no accessible name, so without this the control\n * announces nothing at all.\n */\n readonly 'aria-label': string\n /**\n * The icon. The button hands it its colour and the page's icon size for\n * the button's size through `useIconStyle()`.\n */\n readonly children?: ReactNode\n /**\n * Draws no press ripple. The state layer is unaffected.\n * @default false\n */\n readonly disableRipple?: boolean\n /** The key a ButtonGroup that selects reports the button by. */\n readonly id?: string\n /**\n * Draws the button disabled, and takes no presses.\n * @default false\n */\n readonly isDisabled?: boolean\n readonly ref?: Ref<ComponentRef<typeof View>>\n /**\n * Control size: `xs` 32dp, `md` 40dp, `lg` 56dp, `xl` 96dp, `xxl` 136dp,\n * the icon buttons spec page's XS to XL, and the same heights `Button`\n * uses, so the two line up beside each other in a row. The icon is 20dp,\n * 24dp, 24dp, 32dp and 40dp in turn.\n * @default the size of the ButtonGroup around it, else 'md'\n */\n readonly size?: IconButtonSize\n readonly style?: StyleProp<ViewStyle>\n /**\n * `standard` is transparent and tints what it sits on; `outlined` is\n * transparent with a rule around it; `filled` and `tonal` carry a\n * container of their own.\n * @default 'standard'\n */\n readonly variant?: IconButtonVariant\n }\n\ntype IconButtonSize = 'lg' | 'md' | 'xl' | 'xs' | 'xxl'\n\ntype IconButtonVariant = 'filled' | 'outlined' | 'standard' | 'tonal'\n\n// The disabled container each variant draws. Filled and tonal share the\n// page's one disabled container, and standard draws the text button's\n// colour, which is the icon alone.\nconst DISABLED: Readonly<Record<IconButtonVariant, PaletteName>> = {\n filled: 'filledDisabled',\n outlined: 'outlinedDisabled',\n standard: 'textDisabled',\n tonal: 'filledDisabled',\n}\n\n// The icon each size holds, from the page's size token sets. Literals, as on\n// web: they are icon sizes, which the theme has no scale for.\nconst ICON_SIZES: Readonly<Record<IconButtonSize, number>> = {\n lg: 24,\n md: 24,\n xl: 32,\n xs: 20,\n xxl: 40,\n}\n\n// Which container a toggle draws, selected and not. An unselected outlined,\n// standard or tonal toggle is the plain button of that variant.\nconst TOGGLE_PALETTES: Readonly<\n Record<\n IconButtonVariant,\n Readonly<Record<'selected' | 'unselected', PaletteName>>\n >\n> = {\n filled: { selected: 'filledToggleSelected', unselected: 'filledToggle' },\n outlined: { selected: 'outlinedToggleSelected', unselected: 'outlined' },\n standard: { selected: 'standardToggleSelected', unselected: 'standard' },\n tonal: { selected: 'tonalToggleSelected', unselected: 'tonal' },\n}\n\nconst styles = StyleSheet.create({\n // The icon sits in the middle of a square that a row never squeezes.\n base: {\n alignItems: 'center',\n flexShrink: 0,\n justifyContent: 'center',\n },\n})\n\n// The outlined rule's width at each size, Button's.\nconst outlineWidths = StyleSheet.create({\n lg: { borderWidth: OUTLINE_WIDTHS.lg },\n md: { borderWidth: OUTLINE_WIDTHS.md },\n xl: { borderWidth: OUTLINE_WIDTHS.xl },\n xs: { borderWidth: OUTLINE_WIDTHS.xs },\n xxl: { borderWidth: OUTLINE_WIDTHS.xxl },\n})\n\n// Square, so one control height sets both edges.\nconst sizesOf = themedStyles(({ sizing }) => {\n function square(size: IconButtonSize): ViewStyle {\n const edge = sizing[HEIGHTS[size]]\n\n return { height: edge, width: edge }\n }\n\n return StyleSheet.create({\n lg: square('lg'),\n md: square('md'),\n xl: square('xl'),\n xs: square('xs'),\n xxl: square('xxl'),\n })\n})\n\n/**\n * A button that is an icon, at five control heights, with web's props and\n * values. Given `href` it is a link with the same appearance, and given\n * `isSelected`, `defaultSelected` or `onChange` it is a toggle, which reports\n * its state to a screen reader and draws the page's second pair of colour\n * roles for its variant. The three forms are exclusive, so a toggle given\n * `href` does not compile.\n *\n * ```tsx\n * <IconButton aria-label=\"Label\" defaultSelected variant=\"tonal\">\n * <Icon />\n * </IconButton>\n * ```\n *\n * The two sizes under 48dp, `xs` and `md`, take presses over a 48dp target\n * through `hitSlop`, which a `hitSlop` of the call site's own replaces.\n * `style`, `ref` and `testID` land on the `Pressable`.\n */\nfunction IconButton({\n accessibilityHint,\n children,\n defaultSelected,\n delayLongPress,\n disableRipple = false,\n hitSlop: ownHitSlop,\n href,\n id,\n isDisabled: ownDisabled = false,\n isPending = false,\n isSelected,\n onBlur,\n onChange,\n onFocus,\n onHoverIn,\n onHoverOut,\n onLayout,\n onLongPress,\n onPress,\n onPressIn,\n onPressOut,\n pendingLabel,\n ref,\n size: ownSize,\n slot,\n style,\n type,\n variant = 'standard',\n ...props\n}: IconButtonProps) {\n const theme = useTheme()\n // A ButtonGroup around the button hands it a size, which one named here\n // still beats, and its part in the group; src/button's group.ts sets it out.\n const group = use(ButtonGroupItemContext)\n const size = ownSize ?? group?.size ?? 'md'\n const isDisabled = ownDisabled || group?.isDisabled === true\n const membership = groupSelectionOf(group, id)\n // A link is never pending, as on web, where its props have no such state.\n const pending = href === undefined && isPending\n const ringLabel = usePending(pending, pendingLabel)\n\n // The three props that make this a toggle, read as web reads them. A group\n // that selects keeps the selection itself, so they mean nothing there.\n const isToggle =\n membership === undefined &&\n (defaultSelected !== undefined ||\n isSelected !== undefined ||\n onChange !== undefined)\n const action = useButtonAction({\n defaultSelected,\n href,\n isSelected,\n isToggle,\n onChange,\n onPress,\n slot: slot ?? 'default',\n type,\n })\n const {\n onHoverIn: hoverIn,\n onHoverOut: hoverOut,\n onLongPress: longPress,\n onPressIn: pressIn,\n onPressOut: pressOut,\n ...triggerProps\n } = useSlotTrigger({\n accessibilityHint,\n delayLongPress,\n href,\n onHoverIn,\n onHoverOut,\n onLongPress,\n onPressIn,\n onPressOut,\n ref,\n slot,\n })\n const toggles = isToggle || membership !== undefined\n const selected = membership?.selected ?? action.selected\n const colors =\n palettesOf(theme)[\n isDisabled\n ? DISABLED[variant]\n : toggles\n ? TOGGLE_PALETTES[variant][selected ? 'selected' : 'unselected']\n : variant\n ]\n\n // The width a standard group widens the button from, recorded as it is\n // laid out, before the press feedback that tells the group of a press.\n const width = useSharedValue(0)\n const feedback = usePressFeedback({\n color: colors.content,\n disabled: isDisabled,\n disableRipple,\n onBlur,\n onFocus,\n onHoverIn: hoverIn,\n onHoverOut: hoverOut,\n ...groupPressHandlers(group, width, pressIn, pressOut),\n pending,\n })\n\n const { radii, sizing } = theme\n const edge = sizing[HEIGHTS[size]]\n const shaped = useCorner(\n groupCornersOf(group, feedback, selected) ??\n (feedback.pressed || selected\n ? radii[PRESSED_CORNERS[size]]\n : radii.pill),\n groupWidthThen(group, width, onLayout),\n )\n const shift = useGroupShift(group, edge, 'width')\n // A connected group's two smallest sizes are 48dp wide, which leaves the\n // target nothing to add across.\n const keepsTarget = group?.keepsTarget === true\n\n return (\n <AnimatedPressable\n id={id}\n role={href === undefined ? 'button' : 'link'}\n {...(isToggle ? toggleState(action.selected) : undefined)}\n {...membership?.accessibility}\n {...(pending ? BUSY : undefined)}\n {...props}\n {...triggerProps}\n {...feedback.handlers}\n disabled={isDisabled}\n hitSlop={\n ownHitSlop ??\n hitSlop(edge, keepsTarget ? Math.max(edge, TARGET_SIZE) : edge)\n }\n onLayout={shaped.onLayout}\n onLongPress={pending ? undefined : longPress}\n onPress={\n pending\n ? undefined\n : membership === undefined\n ? action.onPress\n : pressThen(action.onPress, membership.toggle)\n }\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.base,\n sizesOf(theme)[size],\n variant === 'outlined' ? outlineWidths[size] : undefined,\n colors.container,\n shaped.corner,\n shift,\n keepsTarget ? groupStyles.target : undefined,\n feedback.ring,\n style,\n )}\n >\n <Animated.View\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n buttonStyles.clip,\n shaped.corner,\n )}\n >\n {feedback.layer}\n </Animated.View>\n <PendingContent isPending={pending}>\n <IconStyleContext value={iconStyleOf(colors.content, size)}>\n {children}\n </IconStyleContext>\n </PendingContent>\n {pending ? (\n <PendingRing\n color={colors.content}\n diameter={ICON_SIZES[size]}\n label={ringLabel}\n />\n ) : null}\n </AnimatedPressable>\n )\n}\n\nfunction iconStyleOf(color: string, size: IconButtonSize): IconStyle {\n return { color, size: ICON_SIZES[size] }\n}\n\nexport { IconButton }\nexport type { IconButtonProps, IconButtonSize, IconButtonVariant }\n"],"mappings":";;;;;;;;;;;;;;AAgJA,MAAM0D,WAA6D;CACjEG,QAAQ;CACRC,UAAU;CACVC,UAAU;CACVC,OAAO;AACT;AAIA,MAAMC,aAAuD;CAC3DC,IAAI;CACJC,IAAI;CACJC,IAAI;CACJC,IAAI;CACJC,KAAK;AACP;AAIA,MAAMC,kBAKF;CACFV,QAAQ;EAAEW,UAAU;EAAwBC,YAAY;CAAe;CACvEX,UAAU;EAAEU,UAAU;EAA0BC,YAAY;CAAW;CACvEV,UAAU;EAAES,UAAU;EAA0BC,YAAY;CAAW;CACvET,OA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