@webority/mobile-ui 0.127.0 → 0.129.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 (206) hide show
  1. package/dist/canvas-kit/kit.js +8170 -7898
  2. package/dist/canvas-kit/manifest.json +218 -6
  3. package/dist/canvas-kit/release.json +6 -6
  4. package/lib/commonjs/components/Accordion/Accordion.js +1 -1
  5. package/lib/commonjs/components/AppBar/AppBar.js +1 -1
  6. package/lib/commonjs/components/AppIcon/AppIcon.js +1 -1
  7. package/lib/commonjs/components/AppIcon/catalog.g.js +1 -1
  8. package/lib/commonjs/components/AppIcon/glyphs.g.js +1 -1
  9. package/lib/commonjs/components/AppIcon/variants.g.js +1 -1
  10. package/lib/commonjs/components/Banner/Banner.js +1 -1
  11. package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
  12. package/lib/commonjs/components/Box/Box.js +1 -1
  13. package/lib/commonjs/components/Button/Button.js +1 -1
  14. package/lib/commonjs/components/Card/Card.js +1 -1
  15. package/lib/commonjs/components/Composer/Composer.js +1 -1
  16. package/lib/commonjs/components/DatePicker/DatePicker.js +1 -1
  17. package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +1 -1
  18. package/lib/commonjs/components/Descriptions/Descriptions.js +1 -1
  19. package/lib/commonjs/components/FieldBase/ChoiceText.js +1 -1
  20. package/lib/commonjs/components/FieldBase/FieldBase.js +1 -1
  21. package/lib/commonjs/components/FieldBase/useFloatingLabel.js +1 -1
  22. package/lib/commonjs/components/FileViewer/FileViewer.js +1 -1
  23. package/lib/commonjs/components/FileViewer/FileViewerImage.js +1 -0
  24. package/lib/commonjs/components/FileViewer/fileSource.js +1 -0
  25. package/lib/commonjs/components/FormField/FormField.js +1 -1
  26. package/lib/commonjs/components/Input/Input.js +1 -1
  27. package/lib/commonjs/components/Markdown/Markdown.js +1 -1
  28. package/lib/commonjs/components/Menu/MenuSurface.js +1 -1
  29. package/lib/commonjs/components/Modal/Modal.js +1 -1
  30. package/lib/commonjs/components/Notation/Notation.js +1 -1
  31. package/lib/commonjs/components/NumberInput/NumberInput.js +1 -1
  32. package/lib/commonjs/components/OTPInput/OTPResendRow.js +1 -0
  33. package/lib/commonjs/components/OTPInput/index.js +1 -1
  34. package/lib/commonjs/components/ProgressBar/ProgressBar.js +1 -1
  35. package/lib/commonjs/components/Radio/Radio.js +1 -1
  36. package/lib/commonjs/components/Rating/Rating.js +1 -1
  37. package/lib/commonjs/components/SectionHeader/SectionHeader.js +1 -1
  38. package/lib/commonjs/components/Select/Select.js +1 -1
  39. package/lib/commonjs/components/Text/Text.js +1 -1
  40. package/lib/commonjs/components/Text/textInk.js +1 -0
  41. package/lib/commonjs/components/TimePicker/TimePicker.js +1 -1
  42. package/lib/commonjs/components/Tooltip/Tooltip.js +1 -1
  43. package/lib/commonjs/components/index.js +1 -1
  44. package/lib/commonjs/components/not-drawn.json +2 -0
  45. package/lib/commonjs/form/HookFormField.js +1 -1
  46. package/lib/commonjs/hooks/index.js +1 -1
  47. package/lib/commonjs/hooks/useFieldErrorScroll.js +1 -0
  48. package/lib/commonjs/hooks/useResendCountdown.js +1 -0
  49. package/lib/commonjs/index.js +1 -1
  50. package/lib/commonjs/navigation/index.js +1 -1
  51. package/lib/commonjs/navigation/useNavigationTheme.js +1 -0
  52. package/lib/commonjs/utils/feedback.js +1 -1
  53. package/lib/commonjs/utils/hapticUtils.js +1 -1
  54. package/lib/module/components/Accordion/Accordion.js +1 -1
  55. package/lib/module/components/AppBar/AppBar.js +1 -1
  56. package/lib/module/components/AppIcon/AppIcon.js +1 -1
  57. package/lib/module/components/AppIcon/catalog.g.js +1 -1
  58. package/lib/module/components/AppIcon/glyphs.g.js +1 -1
  59. package/lib/module/components/AppIcon/variants.g.js +1 -1
  60. package/lib/module/components/Banner/Banner.js +1 -1
  61. package/lib/module/components/BottomSheet/BottomSheet.js +1 -1
  62. package/lib/module/components/Box/Box.js +1 -1
  63. package/lib/module/components/Button/Button.js +1 -1
  64. package/lib/module/components/Card/Card.js +1 -1
  65. package/lib/module/components/Composer/Composer.js +1 -1
  66. package/lib/module/components/DatePicker/DatePicker.js +1 -1
  67. package/lib/module/components/DateRangePicker/DateRangePicker.js +1 -1
  68. package/lib/module/components/Descriptions/Descriptions.js +1 -1
  69. package/lib/module/components/FieldBase/ChoiceText.js +1 -1
  70. package/lib/module/components/FieldBase/FieldBase.js +1 -1
  71. package/lib/module/components/FieldBase/useFloatingLabel.js +1 -1
  72. package/lib/module/components/FileViewer/FileViewer.js +1 -1
  73. package/lib/module/components/FileViewer/FileViewerImage.js +1 -0
  74. package/lib/module/components/FileViewer/fileSource.js +1 -0
  75. package/lib/module/components/FormField/FormField.js +1 -1
  76. package/lib/module/components/Input/Input.js +1 -1
  77. package/lib/module/components/Markdown/Markdown.js +1 -1
  78. package/lib/module/components/Menu/MenuSurface.js +1 -1
  79. package/lib/module/components/Modal/Modal.js +1 -1
  80. package/lib/module/components/Notation/Notation.js +1 -1
  81. package/lib/module/components/NumberInput/NumberInput.js +1 -1
  82. package/lib/module/components/OTPInput/OTPResendRow.js +1 -0
  83. package/lib/module/components/OTPInput/index.js +1 -1
  84. package/lib/module/components/ProgressBar/ProgressBar.js +1 -1
  85. package/lib/module/components/Radio/Radio.js +1 -1
  86. package/lib/module/components/Rating/Rating.js +1 -1
  87. package/lib/module/components/SectionHeader/SectionHeader.js +1 -1
  88. package/lib/module/components/Select/Select.js +1 -1
  89. package/lib/module/components/Text/Text.js +1 -1
  90. package/lib/module/components/Text/textInk.js +1 -0
  91. package/lib/module/components/TimePicker/TimePicker.js +1 -1
  92. package/lib/module/components/Tooltip/Tooltip.js +1 -1
  93. package/lib/module/components/index.js +1 -1
  94. package/lib/module/components/not-drawn.json +2 -0
  95. package/lib/module/form/HookFormField.js +1 -1
  96. package/lib/module/hooks/index.js +1 -1
  97. package/lib/module/hooks/useFieldErrorScroll.js +1 -0
  98. package/lib/module/hooks/useResendCountdown.js +1 -0
  99. package/lib/module/index.js +1 -1
  100. package/lib/module/navigation/index.js +1 -1
  101. package/lib/module/navigation/useNavigationTheme.js +1 -0
  102. package/lib/module/utils/feedback.js +1 -1
  103. package/lib/module/utils/hapticUtils.js +1 -1
  104. package/lib/typescript/commonjs/components/Accordion/Accordion.d.ts +2 -1
  105. package/lib/typescript/commonjs/components/AppBar/AppBar.d.ts +2 -1
  106. package/lib/typescript/commonjs/components/AppIcon/AppIcon.d.ts +6 -3
  107. package/lib/typescript/commonjs/components/AppIcon/catalog.g.d.ts +1 -1
  108. package/lib/typescript/commonjs/components/AppIcon/glyphs.g.d.ts +1 -0
  109. package/lib/typescript/commonjs/components/AppIcon/index.d.ts +1 -1
  110. package/lib/typescript/commonjs/components/Banner/Banner.d.ts +2 -1
  111. package/lib/typescript/commonjs/components/Box/Box.d.ts +2 -2
  112. package/lib/typescript/commonjs/components/Button/Button.d.ts +3 -0
  113. package/lib/typescript/commonjs/components/Calendar/calendarStyles.d.ts +4 -4
  114. package/lib/typescript/commonjs/components/Card/Card.d.ts +5 -4
  115. package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +2 -1
  116. package/lib/typescript/commonjs/components/Chip/Chip.d.ts +2 -1
  117. package/lib/typescript/commonjs/components/Composer/Composer.d.ts +4 -0
  118. package/lib/typescript/commonjs/components/DatePicker/DatePicker.d.ts +4 -14
  119. package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +4 -14
  120. package/lib/typescript/commonjs/components/FileViewer/FileViewer.d.ts +5 -33
  121. package/lib/typescript/commonjs/components/FileViewer/FileViewerImage.d.ts +5 -0
  122. package/lib/typescript/commonjs/components/FileViewer/fileSource.d.ts +24 -0
  123. package/lib/typescript/commonjs/components/FileViewer/index.d.ts +1 -1
  124. package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +3 -0
  125. package/lib/typescript/commonjs/components/Markdown/Markdown.d.ts +3 -1
  126. package/lib/typescript/commonjs/components/Modal/Modal.d.ts +10 -0
  127. package/lib/typescript/commonjs/components/Notation/Notation.d.ts +5 -15
  128. package/lib/typescript/commonjs/components/NumberInput/NumberInput.d.ts +2 -0
  129. package/lib/typescript/commonjs/components/OTPInput/OTPResendRow.d.ts +25 -0
  130. package/lib/typescript/commonjs/components/OTPInput/index.d.ts +2 -0
  131. package/lib/typescript/commonjs/components/PickerTrigger/PickerTrigger.d.ts +5 -0
  132. package/lib/typescript/commonjs/components/PickerTrigger/index.d.ts +1 -1
  133. package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +2 -0
  134. package/lib/typescript/commonjs/components/Radio/Radio.d.ts +2 -0
  135. package/lib/typescript/commonjs/components/Rating/Rating.d.ts +2 -0
  136. package/lib/typescript/commonjs/components/SectionHeader/SectionHeader.d.ts +2 -0
  137. package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +2 -0
  138. package/lib/typescript/commonjs/components/Slider/Slider.d.ts +2 -0
  139. package/lib/typescript/commonjs/components/Stepper/Stepper.d.ts +2 -0
  140. package/lib/typescript/commonjs/components/Switch/Switch.d.ts +2 -0
  141. package/lib/typescript/commonjs/components/Text/Text.d.ts +2 -0
  142. package/lib/typescript/commonjs/components/Text/textInk.d.ts +14 -0
  143. package/lib/typescript/commonjs/components/TimePicker/TimePicker.d.ts +4 -15
  144. package/lib/typescript/commonjs/components/Tooltip/Tooltip.d.ts +2 -1
  145. package/lib/typescript/commonjs/components/index.d.ts +5 -4
  146. package/lib/typescript/commonjs/form/HookFormField.d.ts +4 -4
  147. package/lib/typescript/commonjs/hooks/index.d.ts +4 -0
  148. package/lib/typescript/commonjs/hooks/useFieldErrorScroll.d.ts +28 -0
  149. package/lib/typescript/commonjs/hooks/useResendCountdown.d.ts +16 -0
  150. package/lib/typescript/commonjs/index.d.ts +3 -3
  151. package/lib/typescript/commonjs/navigation/index.d.ts +1 -0
  152. package/lib/typescript/commonjs/navigation/useNavigationTheme.d.ts +7 -0
  153. package/lib/typescript/commonjs/utils/feedback.d.ts +2 -2
  154. package/lib/typescript/commonjs/utils/hapticUtils.d.ts +2 -0
  155. package/lib/typescript/module/components/Accordion/Accordion.d.ts +2 -1
  156. package/lib/typescript/module/components/AppBar/AppBar.d.ts +2 -1
  157. package/lib/typescript/module/components/AppIcon/AppIcon.d.ts +6 -3
  158. package/lib/typescript/module/components/AppIcon/catalog.g.d.ts +1 -1
  159. package/lib/typescript/module/components/AppIcon/glyphs.g.d.ts +1 -0
  160. package/lib/typescript/module/components/AppIcon/index.d.ts +1 -1
  161. package/lib/typescript/module/components/Banner/Banner.d.ts +2 -1
  162. package/lib/typescript/module/components/Box/Box.d.ts +2 -2
  163. package/lib/typescript/module/components/Button/Button.d.ts +3 -0
  164. package/lib/typescript/module/components/Calendar/calendarStyles.d.ts +4 -4
  165. package/lib/typescript/module/components/Card/Card.d.ts +5 -4
  166. package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +2 -1
  167. package/lib/typescript/module/components/Chip/Chip.d.ts +2 -1
  168. package/lib/typescript/module/components/Composer/Composer.d.ts +4 -0
  169. package/lib/typescript/module/components/DatePicker/DatePicker.d.ts +4 -14
  170. package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +4 -14
  171. package/lib/typescript/module/components/FileViewer/FileViewer.d.ts +5 -33
  172. package/lib/typescript/module/components/FileViewer/FileViewerImage.d.ts +5 -0
  173. package/lib/typescript/module/components/FileViewer/fileSource.d.ts +24 -0
  174. package/lib/typescript/module/components/FileViewer/index.d.ts +1 -1
  175. package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +3 -0
  176. package/lib/typescript/module/components/Markdown/Markdown.d.ts +3 -1
  177. package/lib/typescript/module/components/Modal/Modal.d.ts +10 -0
  178. package/lib/typescript/module/components/Notation/Notation.d.ts +5 -15
  179. package/lib/typescript/module/components/NumberInput/NumberInput.d.ts +2 -0
  180. package/lib/typescript/module/components/OTPInput/OTPResendRow.d.ts +25 -0
  181. package/lib/typescript/module/components/OTPInput/index.d.ts +2 -0
  182. package/lib/typescript/module/components/PickerTrigger/PickerTrigger.d.ts +5 -0
  183. package/lib/typescript/module/components/PickerTrigger/index.d.ts +1 -1
  184. package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +2 -0
  185. package/lib/typescript/module/components/Radio/Radio.d.ts +2 -0
  186. package/lib/typescript/module/components/Rating/Rating.d.ts +2 -0
  187. package/lib/typescript/module/components/SectionHeader/SectionHeader.d.ts +2 -0
  188. package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +2 -0
  189. package/lib/typescript/module/components/Slider/Slider.d.ts +2 -0
  190. package/lib/typescript/module/components/Stepper/Stepper.d.ts +2 -0
  191. package/lib/typescript/module/components/Switch/Switch.d.ts +2 -0
  192. package/lib/typescript/module/components/Text/Text.d.ts +2 -0
  193. package/lib/typescript/module/components/Text/textInk.d.ts +14 -0
  194. package/lib/typescript/module/components/TimePicker/TimePicker.d.ts +4 -15
  195. package/lib/typescript/module/components/Tooltip/Tooltip.d.ts +2 -1
  196. package/lib/typescript/module/components/index.d.ts +5 -4
  197. package/lib/typescript/module/form/HookFormField.d.ts +4 -4
  198. package/lib/typescript/module/hooks/index.d.ts +4 -0
  199. package/lib/typescript/module/hooks/useFieldErrorScroll.d.ts +28 -0
  200. package/lib/typescript/module/hooks/useResendCountdown.d.ts +16 -0
  201. package/lib/typescript/module/index.d.ts +3 -3
  202. package/lib/typescript/module/navigation/index.d.ts +1 -0
  203. package/lib/typescript/module/navigation/useNavigationTheme.d.ts +7 -0
  204. package/lib/typescript/module/utils/feedback.d.ts +2 -2
  205. package/lib/typescript/module/utils/hapticUtils.d.ts +2 -0
  206. package/package.json +7 -7
@@ -2,7 +2,7 @@
2
2
  "kind": "WeborityPhone",
3
3
  "library": {
4
4
  "name": "@webority/mobile-ui",
5
- "version": "0.127.0"
5
+ "version": "0.129.0"
6
6
  },
7
7
  "rendererProtocolVersion": 13,
8
8
  "platform": "Phone",
@@ -854,7 +854,7 @@
854
854
  "name": "color",
855
855
  "type": "string",
856
856
  "required": false,
857
- "description": "Any colour value; it defaults to the primary text colour."
857
+ "description": "A text role or tone name (such as tertiary, success or brand) or any colour value; it defaults to the primary text colour."
858
858
  },
859
859
  {
860
860
  "name": "name",
@@ -3538,7 +3538,7 @@
3538
3538
  "name": "bg",
3539
3539
  "type": "string",
3540
3540
  "required": false,
3541
- "description": "The background: a background colour name or any colour value. It replaces the variant surface."
3541
+ "description": "The background: a background colour name (including primary-wash) or any colour value. It replaces the variant surface."
3542
3542
  },
3543
3543
  {
3544
3544
  "name": "borderRadius",
@@ -4810,6 +4810,13 @@
4810
4810
  "description": "The placeholder text shown while the box is empty.",
4811
4811
  "default": "Message"
4812
4812
  },
4813
+ {
4814
+ "name": "ring",
4815
+ "type": "boolean",
4816
+ "required": false,
4817
+ "description": "Draws a ring on the box that moves between two theme colours, for a typing or loading state. Holds still under reduced motion.",
4818
+ "default": false
4819
+ },
4813
4820
  {
4814
4821
  "name": "safeArea",
4815
4822
  "type": "boolean",
@@ -4817,6 +4824,17 @@
4817
4824
  "description": "Pad the bar for the bottom safe area, or turn off above a tab bar.",
4818
4825
  "default": true
4819
4826
  },
4827
+ {
4828
+ "name": "sendReveal",
4829
+ "type": "enum",
4830
+ "enum": [
4831
+ "always",
4832
+ "onText"
4833
+ ],
4834
+ "required": false,
4835
+ "description": "onText shows the send button only while there is something to send or stop.",
4836
+ "default": "always"
4837
+ },
4820
4838
  {
4821
4839
  "name": "stopLabel",
4822
4840
  "type": "string",
@@ -5085,6 +5103,12 @@
5085
5103
  "marker": null,
5086
5104
  "acceptsChildren": false,
5087
5105
  "props": [
5106
+ {
5107
+ "name": "accessibilityLabel",
5108
+ "type": "string",
5109
+ "required": false,
5110
+ "description": "The screen reader name of the trigger."
5111
+ },
5088
5112
  {
5089
5113
  "name": "clearable",
5090
5114
  "type": "boolean",
@@ -5109,6 +5133,12 @@
5109
5133
  "required": false,
5110
5134
  "description": "Error message shown below the field; true shows the error state with no message."
5111
5135
  },
5136
+ {
5137
+ "name": "help",
5138
+ "type": "node",
5139
+ "required": false,
5140
+ "description": "Content drawn beside the label, outside the trigger, such as an info button."
5141
+ },
5112
5142
  {
5113
5143
  "name": "helperText",
5114
5144
  "type": "string",
@@ -5134,6 +5164,12 @@
5134
5164
  "required": false,
5135
5165
  "description": "Override the built-in copy: title, confirm, cancel, dismiss, previousMonth, nextMonth, previousYears, nextYears, previousDecades, nextDecades, switchToYears, switchToDecades, year, decade."
5136
5166
  },
5167
+ {
5168
+ "name": "leadingIcon",
5169
+ "type": "node",
5170
+ "required": false,
5171
+ "description": "Icon slot before the text, such as a calendar."
5172
+ },
5137
5173
  {
5138
5174
  "name": "locale",
5139
5175
  "type": "string",
@@ -5183,6 +5219,18 @@
5183
5219
  "description": "The heading of the calendar sheet.",
5184
5220
  "default": "Select Date"
5185
5221
  },
5222
+ {
5223
+ "name": "trailing",
5224
+ "type": "node",
5225
+ "required": false,
5226
+ "description": "Slot at the end of the trigger, a chevron when left out."
5227
+ },
5228
+ {
5229
+ "name": "triggerLabels",
5230
+ "type": "object",
5231
+ "required": false,
5232
+ "description": "Copy for the trigger field: placeholder, selection, noSelection, clear. Separate from labels, which is the copy of the sheet."
5233
+ },
5186
5234
  {
5187
5235
  "name": "value",
5188
5236
  "type": "string",
@@ -5280,6 +5328,12 @@
5280
5328
  "marker": null,
5281
5329
  "acceptsChildren": false,
5282
5330
  "props": [
5331
+ {
5332
+ "name": "accessibilityLabel",
5333
+ "type": "string",
5334
+ "required": false,
5335
+ "description": "The screen reader name of the trigger."
5336
+ },
5283
5337
  {
5284
5338
  "name": "clearable",
5285
5339
  "type": "boolean",
@@ -5304,6 +5358,12 @@
5304
5358
  "required": false,
5305
5359
  "description": "An error message that replaces the helper text. true shows the error state without a message."
5306
5360
  },
5361
+ {
5362
+ "name": "help",
5363
+ "type": "node",
5364
+ "required": false,
5365
+ "description": "Content drawn beside the label, outside the trigger, such as an info button."
5366
+ },
5307
5367
  {
5308
5368
  "name": "helperText",
5309
5369
  "type": "string",
@@ -5352,6 +5412,12 @@
5352
5412
  "required": false,
5353
5413
  "description": "Copy of the sheet: title, confirm, cancel and dismiss. Unset keys use the defaults."
5354
5414
  },
5415
+ {
5416
+ "name": "leadingIcon",
5417
+ "type": "node",
5418
+ "required": false,
5419
+ "description": "Icon slot before the text, such as a calendar or clock."
5420
+ },
5355
5421
  {
5356
5422
  "name": "locale",
5357
5423
  "type": "string",
@@ -5440,6 +5506,18 @@
5440
5506
  "required": false,
5441
5507
  "description": "Heading shown at the top of the sheet; overrides labels.title."
5442
5508
  },
5509
+ {
5510
+ "name": "trailing",
5511
+ "type": "node",
5512
+ "required": false,
5513
+ "description": "Slot at the end, a chevron when left out."
5514
+ },
5515
+ {
5516
+ "name": "triggerLabels",
5517
+ "type": "object",
5518
+ "required": false,
5519
+ "description": "Copy for the field (placeholder, selection, noSelection, clear), apart from labels, which is the sheet copy."
5520
+ },
5443
5521
  {
5444
5522
  "name": "value",
5445
5523
  "type": "object",
@@ -6856,6 +6934,18 @@
6856
6934
  "required": false,
6857
6935
  "description": "Spoken name for the viewer."
6858
6936
  },
6937
+ {
6938
+ "name": "kind",
6939
+ "type": "enum",
6940
+ "enum": [
6941
+ "auto",
6942
+ "image",
6943
+ "pdf"
6944
+ ],
6945
+ "required": false,
6946
+ "description": "Whether the file is drawn as a PDF or as one zoomable picture. Auto reads the file name.",
6947
+ "default": "auto"
6948
+ },
6859
6949
  {
6860
6950
  "name": "maxZoom",
6861
6951
  "type": "number",
@@ -6876,7 +6966,7 @@
6876
6966
  "source": "@webority/mobile-ui",
6877
6967
  "usage": {
6878
6968
  "when": [
6879
- "Showing a PDF inside the app, from a link or a saved file."
6969
+ "Showing a PDF or a single picture inside the app, from a link or a saved file."
6880
6970
  ],
6881
6971
  "whenNot": [
6882
6972
  {
@@ -6884,7 +6974,7 @@
6884
6974
  "instead": "Open it with the system viewer."
6885
6975
  },
6886
6976
  {
6887
- "text": "The file is a picture or a set of pictures.",
6977
+ "text": "The files are a set of pictures to swipe through.",
6888
6978
  "instead": "ImageGallery"
6889
6979
  }
6890
6980
  ],
@@ -10062,6 +10152,13 @@
10062
10152
  "description": "Whether tapping the dimmed backdrop closes the modal.",
10063
10153
  "default": true
10064
10154
  },
10155
+ {
10156
+ "name": "bare",
10157
+ "type": "boolean",
10158
+ "required": false,
10159
+ "description": "Draws no card around the content, the children are the card. For a sheet or surface that draws its own.",
10160
+ "default": false
10161
+ },
10065
10162
  {
10066
10163
  "name": "hardwareBackPress",
10067
10164
  "type": "boolean",
@@ -10678,6 +10775,76 @@
10678
10775
  ]
10679
10776
  }
10680
10777
  },
10778
+ {
10779
+ "name": "OTPResendRow",
10780
+ "marker": null,
10781
+ "acceptsChildren": false,
10782
+ "props": [
10783
+ {
10784
+ "name": "expirySecondsLeft",
10785
+ "type": "number",
10786
+ "required": false,
10787
+ "description": "Seconds until the sent code expires. Leave it out when the code has no expiry to show."
10788
+ },
10789
+ {
10790
+ "name": "resendSecondsLeft",
10791
+ "type": "number",
10792
+ "required": true,
10793
+ "description": "Seconds until a new code may be asked for. At 0 the resend button is enabled."
10794
+ },
10795
+ {
10796
+ "name": "resending",
10797
+ "type": "boolean",
10798
+ "required": false,
10799
+ "description": "Shows the resend button busy while a new code is being sent.",
10800
+ "default": false
10801
+ }
10802
+ ],
10803
+ "itemsTakeAction": [],
10804
+ "takesAction": [],
10805
+ "source": "@webority/mobile-ui",
10806
+ "usage": {
10807
+ "when": [
10808
+ "Under a one-time code field, to show when the code expires and when a new one may be sent."
10809
+ ],
10810
+ "whenNot": [
10811
+ {
10812
+ "text": "The person types the code.",
10813
+ "instead": "OTPInput"
10814
+ }
10815
+ ],
10816
+ "do": [
10817
+ {
10818
+ "note": "Place it directly under the code field it belongs to.",
10819
+ "example": [
10820
+ {
10821
+ "component": "OTPResendRow",
10822
+ "props": {
10823
+ "resendSecondsLeft": 25,
10824
+ "expirySecondsLeft": 240
10825
+ }
10826
+ }
10827
+ ]
10828
+ }
10829
+ ],
10830
+ "dont": [
10831
+ {
10832
+ "note": "Leaving the expiry out when the code does expire hides the deadline from the person.",
10833
+ "example": [
10834
+ {
10835
+ "component": "OTPResendRow",
10836
+ "props": {
10837
+ "resendSecondsLeft": 25
10838
+ }
10839
+ }
10840
+ ]
10841
+ }
10842
+ ],
10843
+ "a11y": [
10844
+ "While the resend button waits, its spoken name says how many seconds remain."
10845
+ ]
10846
+ }
10847
+ },
10681
10848
  {
10682
10849
  "name": "OnboardingPager",
10683
10850
  "marker": null,
@@ -13822,6 +13989,13 @@
13822
13989
  "description": "Drops the room above, for the first heading of a block.",
13823
13990
  "default": false
13824
13991
  },
13992
+ {
13993
+ "name": "flushBottom",
13994
+ "type": "boolean",
13995
+ "required": false,
13996
+ "description": "Drops the room below the heading, for a heading that sits tight on the content under it.",
13997
+ "default": false
13998
+ },
13825
13999
  {
13826
14000
  "name": "required",
13827
14001
  "type": "boolean",
@@ -18336,7 +18510,7 @@
18336
18510
  "warning"
18337
18511
  ],
18338
18512
  "required": false,
18339
- "description": "A text role, a tone or brand; the variant's own colour when left out."
18513
+ "description": "A text role, a tone or brand (the readable brand ink); the variant's own colour when left out."
18340
18514
  },
18341
18515
  {
18342
18516
  "name": "italic",
@@ -18371,6 +18545,13 @@
18371
18545
  "required": false,
18372
18546
  "description": "The text step; the variant's own size when left out."
18373
18547
  },
18548
+ {
18549
+ "name": "strikethrough",
18550
+ "type": "boolean",
18551
+ "required": false,
18552
+ "description": "Draws a line through the text, for a done or reversed item.",
18553
+ "default": false
18554
+ },
18374
18555
  {
18375
18556
  "name": "underline",
18376
18557
  "type": "boolean",
@@ -18500,6 +18681,12 @@
18500
18681
  "marker": null,
18501
18682
  "acceptsChildren": false,
18502
18683
  "props": [
18684
+ {
18685
+ "name": "accessibilityLabel",
18686
+ "type": "string",
18687
+ "required": false,
18688
+ "description": "The screen reader name of the field."
18689
+ },
18503
18690
  {
18504
18691
  "name": "clearable",
18505
18692
  "type": "boolean",
@@ -18529,6 +18716,12 @@
18529
18716
  "description": "Wheel labelling and whether an AM or PM wheel shows.",
18530
18717
  "default": "12h"
18531
18718
  },
18719
+ {
18720
+ "name": "help",
18721
+ "type": "node",
18722
+ "required": false,
18723
+ "description": "Content drawn beside the label, outside the trigger, such as an info button."
18724
+ },
18532
18725
  {
18533
18726
  "name": "helperText",
18534
18727
  "type": "string",
@@ -18547,6 +18740,12 @@
18547
18740
  "required": false,
18548
18741
  "description": "Replaces the sheet title, button texts and spoken names."
18549
18742
  },
18743
+ {
18744
+ "name": "leadingIcon",
18745
+ "type": "node",
18746
+ "required": false,
18747
+ "description": "Icon slot before the text, such as a clock."
18748
+ },
18550
18749
  {
18551
18750
  "name": "minuteStep",
18552
18751
  "type": "enum",
@@ -18583,6 +18782,18 @@
18583
18782
  "required": false,
18584
18783
  "description": "Field size."
18585
18784
  },
18785
+ {
18786
+ "name": "trailing",
18787
+ "type": "node",
18788
+ "required": false,
18789
+ "description": "Slot at the end of the trigger, a chevron when left out."
18790
+ },
18791
+ {
18792
+ "name": "triggerLabels",
18793
+ "type": "object",
18794
+ "required": false,
18795
+ "description": "Copy for the field (placeholder, selection, noSelection, clear), apart from labels, which is the sheet copy."
18796
+ },
18586
18797
  {
18587
18798
  "name": "value",
18588
18799
  "type": "object",
@@ -21413,6 +21624,7 @@
21413
21624
  "gemini-2",
21414
21625
  "ghost",
21415
21626
  "gift",
21627
+ "github",
21416
21628
  "glass",
21417
21629
  "global",
21418
21630
  "global-edit",
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "webority-phone",
3
- "version": "0.127.0",
3
+ "version": "0.129.0",
4
4
  "platform": "Phone",
5
5
  "kitModuleVersion": 2,
6
6
  "rendererProtocolVersion": 13,
7
7
  "library": {
8
8
  "name": "@webority/mobile-ui",
9
- "version": "0.127.0"
9
+ "version": "0.129.0"
10
10
  },
11
11
  "files": {
12
12
  "manifest.json": {
13
- "sha256": "fdf6c6555e52e1429147d83038546a28bd4336d96f9e0548fa4ddb1d7d6fbbd8",
14
- "bytes": 641456
13
+ "sha256": "6c521dab092616b790e7c3458495745d5448b7ca2e13b6d578586878184cca2d",
14
+ "bytes": 648392
15
15
  },
16
16
  "kit.js": {
17
- "sha256": "97951ceea76d5d3efe947069a23780985238d7417813150fd24aece94e392953",
18
- "bytes": 6078619
17
+ "sha256": "a7e236fa37d7d7ed4fc000f77fa63fea1e1d869ac3cbcb934538909e5a6c31d8",
18
+ "bytes": 6091296
19
19
  },
20
20
  "kit.css": {
21
21
  "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.AccordionGroup=exports.Accordion=void 0;var _react=require("react"),_reactNative=require("react-native"),_usePresenceMotion=require("../../hooks/usePresenceMotion.js"),_index=require("../../theme/index.js"),_corners=require("../../utils/corners.js"),_hapticUtils=require("../../utils/hapticUtils.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_defaultIcons=require("../AppIcon/defaultIcons.js"),_index2=require("../Skeleton/index.js"),_index3=require("../Text/index.js"),_jsxRuntime=require("react/jsx-runtime");const AccordionGroupContext=(0,_react.createContext)(null),useAccordionGroup=()=>(0,_react.useContext)(AccordionGroupContext),AccordionGroup=({children:e,allowMultiple:t=!1,defaultExpandedKeys:i,expandedKeys:r,onChange:a,style:n,testID:o})=>{const s=void 0!==r,[c,l]=(0,_react.useState)(i??[]),d=s?r:c,u=(0,_react.useCallback)(e=>{s||l(e),a?.(e)},[s,a]),p=(0,_react.useCallback)(e=>{let i;i=d.includes(e)?d.filter(t=>t!==e):t?[...d,e]:[e],u(i)},[d,t,u]),_=(0,_react.useCallback)(e=>d.includes(e),[d]),x=(0,_react.useMemo)(()=>({isExpanded:_,toggle:p,allowMultiple:t}),[_,p,t]);return(0,_jsxRuntime.jsx)(AccordionGroupContext.Provider,{value:x,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:n,testID:o,children:e})})};exports.AccordionGroup=AccordionGroup,AccordionGroup.displayName="AccordionGroup";const Chevron=({rotate:e,color:t})=>{const i=(0,_index.useTheme)();return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[chevronStyles.icon,{transform:[{rotate:e}]}],accessible:!1,children:(i.settings.icons.chevronDown??_defaultIcons.defaultIcons.chevronDown)({size:16,color:t})})},chevronStyles=_reactNative.StyleSheet.create({icon:{width:16,height:16,alignItems:"center",justifyContent:"center"}}),Accordion=e=>{const{title:t,children:i,id:r,expanded:a,defaultExpanded:n=!1,onChange:o,icon:s,disabled:c=!1,variant:l="plain",accessibilityLabel:d,style:u,headerStyle:p,contentStyle:_,contentWrapperStyle:x,containerStyle:m,testID:h,loading:v=!1,haptic:y}=e;(0,_warnInvalidValue.warnInvalidValue)("Accordion","variant",e.variant,["plain","card"]);const g=(0,_index.useTheme)(),j=(0,_usePresenceMotion.usePresenceMotion)(),A=j.duration("default"),b=(0,_react.useMemo)(()=>buildStyles(g),[g]),f=useAccordionGroup(),R=void 0!==a,[N,w]=(0,_react.useState)(n),S=f&&r?f.isExpanded(r):null,V=null!==S?S:R?!!a:N,[C,k]=(0,_react.useState)(null),I=(0,_react.useRef)((0,_index.createAnimatedValue)(V?1:0)).current,q=(0,_react.useRef)((0,_index.createAnimatedValue)(V?1:0)).current,D=(0,_react.useRef)((0,_index.createAnimatedValue)(V?1:0)).current,G=(0,_react.useRef)(V);(0,_react.useEffect)(()=>{if(G.current===V)return;G.current=V;const e=V?1:0,t=_reactNative.Easing.bezier(...g.motion.ease["in-out"]),i=_reactNative.Animated.timing(I,{toValue:e,duration:g.motion.duration.default,easing:t,useNativeDriver:!1}),r=_reactNative.Animated.timing(q,{toValue:e,duration:A,easing:t,useNativeDriver:!1}),a=_reactNative.Animated.timing(D,{toValue:e,duration:g.motion.duration.default,easing:t,useNativeDriver:!1}),n=j.reduced&&!V?_reactNative.Animated.sequence([r,_reactNative.Animated.parallel([i,a])]):_reactNative.Animated.parallel([i,r,a]);return n.start(),()=>n.stop()},[V,I,q,D,A,j.reduced,g.motion]);const L=(0,_react.useCallback)(e=>{const t=e.nativeEvent.layout.height;t>0&&t!==C&&k(t)},[C]),M=(0,_react.useCallback)(()=>{if(c)return;const e=(0,_hapticUtils.resolveHaptic)(y,"selection");if(e&&(0,_hapticUtils.triggerHaptic)(e),f&&r)return f.toggle(r),void o?.(!V);R||w(!V),o?.(!V)},[c,f,r,V,R,o,y]),E=D.interpolate({inputRange:[0,1],outputRange:["0deg","180deg"]}),P=null===C?void 0:I.interpolate({inputRange:[0,1],outputRange:[0,C]}),z="card"===l?[b.card,g.shadow.card,{backgroundColor:g.colors.surface,borderRadius:g.radius.md,..._corners.smoothCorners}]:null;return v?(0,_jsxRuntime.jsx)(AccordionSkeleton,{...e}):(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[z,u,m],testID:h,children:[(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{onPress:M,disabled:c,accessibilityRole:"button",accessibilityLabel:d??t,accessibilityState:{expanded:V,disabled:c},"aria-expanded":V,"aria-disabled":c,style:({pressed:e})=>[b.header,p,{opacity:c?.55:e?.85:1}],children:[s?(0,_jsxRuntime.jsx)(_reactNative.View,{style:b.iconLeft,children:s}):null,(0,_jsxRuntime.jsx)(_index3.Text,{variant:"body",weight:"semibold",color:c?"disabled":"primary",numberOfLines:2,style:b.title,children:t}),(0,_jsxRuntime.jsx)(Chevron,{rotate:E,color:c?g.colors["text-disabled"]:g.colors["text-muted"]})]}),null===C?(0,_jsxRuntime.jsx)(_reactNative.View,{style:b.measurer,pointerEvents:"none",onLayout:L,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[b.content,_],children:i})}):null,(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[b.contentWrapper,null===C?{height:0,opacity:0}:{height:P,opacity:q},x],children:(0,_jsxRuntime.jsx)(_reactNative.View,{onLayout:L,style:[b.content,_],children:i})})]})};exports.Accordion=Accordion,Accordion.displayName="Accordion";const AccordionSkeleton=({variant:e="plain",style:t})=>{const i=(0,_index.useTheme)(),r="card"===e;return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[r?{paddingHorizontal:i.space.md,paddingVertical:i.space.sm,backgroundColor:i.colors.surface,borderRadius:i.radius.md,..._corners.smoothCorners}:{paddingVertical:i.space.sm},t],accessibilityRole:"progressbar",accessibilityState:{busy:!0},"aria-busy":!0,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{flexDirection:"row",alignItems:"center"},children:[(0,_jsxRuntime.jsx)(_index2.Skeleton,{shape:"text",width:"60%",height:18,style:{flex:1}}),(0,_jsxRuntime.jsx)(_index2.Skeleton,{width:16,height:16,radius:"sm",style:{marginLeft:i.space.sm}})]})})};AccordionSkeleton.displayName="AccordionSkeleton",Accordion.Skeleton=AccordionSkeleton,_reactNative.LayoutAnimation;const buildStyles=e=>_reactNative.StyleSheet.create({card:{paddingHorizontal:e.space.md,paddingVertical:e.space.xs,marginVertical:e.space.xs},header:{flexDirection:"row",alignItems:"center",paddingVertical:e.space.sm},iconLeft:{marginRight:e.space.sm},title:{flex:1},contentWrapper:{overflow:"hidden"},content:{paddingBottom:e.space.sm},measurer:{position:"absolute",opacity:0,left:0,right:0,top:0,zIndex:-1}});var _default=exports.default=Accordion;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.AccordionGroup=exports.Accordion=void 0;var _react=require("react"),_reactNative=require("react-native"),_usePresenceMotion=require("../../hooks/usePresenceMotion.js"),_index=require("../../theme/index.js"),_corners=require("../../utils/corners.js"),_hapticUtils=require("../../utils/hapticUtils.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_defaultIcons=require("../AppIcon/defaultIcons.js"),_index2=require("../Skeleton/index.js"),_index3=require("../Text/index.js"),_jsxRuntime=require("react/jsx-runtime");const AccordionGroupContext=(0,_react.createContext)(null),useAccordionGroup=()=>(0,_react.useContext)(AccordionGroupContext),AccordionGroup=({children:e,allowMultiple:t=!1,defaultExpandedKeys:i,expandedKeys:r,onChange:a,style:n,testID:o})=>{const s=void 0!==r,[c,l]=(0,_react.useState)(i??[]),d=s?r:c,u=(0,_react.useCallback)(e=>{s||l(e),a?.(e)},[s,a]),p=(0,_react.useCallback)(e=>{let i;i=d.includes(e)?d.filter(t=>t!==e):t?[...d,e]:[e],u(i)},[d,t,u]),_=(0,_react.useCallback)(e=>d.includes(e),[d]),x=(0,_react.useMemo)(()=>({isExpanded:_,toggle:p,allowMultiple:t}),[_,p,t]);return(0,_jsxRuntime.jsx)(AccordionGroupContext.Provider,{value:x,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:n,testID:o,children:e})})};exports.AccordionGroup=AccordionGroup,AccordionGroup.displayName="AccordionGroup";const Chevron=({rotate:e,color:t})=>{const i=(0,_index.useTheme)();return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[chevronStyles.icon,{transform:[{rotate:e}]}],accessible:!1,children:(i.settings.icons.chevronDown??_defaultIcons.defaultIcons.chevronDown)({size:16,color:t})})},chevronStyles=_reactNative.StyleSheet.create({icon:{width:16,height:16,alignItems:"center",justifyContent:"center"}}),Accordion=e=>{const{title:t,children:i,id:r,expanded:a,defaultExpanded:n=!1,onChange:o,icon:s,disabled:c=!1,variant:l="plain",accessibilityLabel:d,style:u,headerStyle:p,contentStyle:_,contentWrapperStyle:x,containerStyle:m,testID:h,loading:v=!1,haptic:y}=e;(0,_warnInvalidValue.warnInvalidValue)("Accordion","variant",e.variant,["plain","card"]);const g=(0,_index.useTheme)(),j=(0,_usePresenceMotion.usePresenceMotion)(),A=j.duration("default"),b=(0,_react.useMemo)(()=>buildStyles(g),[g]),f=useAccordionGroup(),R=void 0!==a,[N,w]=(0,_react.useState)(n),S=f&&r?f.isExpanded(r):null,V=null!==S?S:R?!!a:N,[C,k]=(0,_react.useState)(null),I=(0,_react.useRef)((0,_index.createAnimatedValue)(V?1:0)).current,q=(0,_react.useRef)((0,_index.createAnimatedValue)(V?1:0)).current,D=(0,_react.useRef)((0,_index.createAnimatedValue)(V?1:0)).current,G=(0,_react.useRef)(V);(0,_react.useEffect)(()=>{if(G.current===V)return;G.current=V;const e=V?1:0,t=_reactNative.Easing.bezier(...g.motion.ease["in-out"]),i=_reactNative.Animated.timing(I,{toValue:e,duration:g.motion.duration.default,easing:t,useNativeDriver:!1}),r=_reactNative.Animated.timing(q,{toValue:e,duration:A,easing:t,useNativeDriver:!1}),a=_reactNative.Animated.timing(D,{toValue:e,duration:g.motion.duration.default,easing:t,useNativeDriver:!1}),n=j.reduced&&!V?_reactNative.Animated.sequence([r,_reactNative.Animated.parallel([i,a])]):_reactNative.Animated.parallel([i,r,a]);return n.start(),()=>n.stop()},[V,I,q,D,A,j.reduced,g.motion]);const L=(0,_react.useCallback)(e=>{const t=e.nativeEvent.layout.height;t>0&&t!==C&&k(t)},[C]),M=(0,_react.useCallback)(()=>{if(c)return;const e=(0,_hapticUtils.resolveHaptic)(y,"selection");if(e&&(0,_hapticUtils.triggerHaptic)(e),f&&r)return f.toggle(r),void o?.(!V);R||w(!V),o?.(!V)},[c,f,r,V,R,o,y]),E=D.interpolate({inputRange:[0,1],outputRange:["0deg","180deg"]}),P=null===C?void 0:I.interpolate({inputRange:[0,1],outputRange:[0,C]}),z="card"===l?[b.card,g.shadow.card,{backgroundColor:g.colors.surface,borderRadius:g.radius.md,..._corners.smoothCorners}]:null;return v?(0,_jsxRuntime.jsx)(AccordionSkeleton,{...e}):(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[z,m,u],testID:h,children:[(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{onPress:M,disabled:c,accessibilityRole:"button",accessibilityLabel:d??t,accessibilityState:{expanded:V,disabled:c},"aria-expanded":V,"aria-disabled":c,style:({pressed:e})=>[b.header,p,{opacity:c?.55:e?.85:1}],children:[s?(0,_jsxRuntime.jsx)(_reactNative.View,{style:b.iconLeft,children:s}):null,(0,_jsxRuntime.jsx)(_index3.Text,{variant:"body",weight:"semibold",color:c?"disabled":"primary",numberOfLines:2,style:b.title,children:t}),(0,_jsxRuntime.jsx)(Chevron,{rotate:E,color:c?g.colors["text-disabled"]:g.colors["text-muted"]})]}),null===C?(0,_jsxRuntime.jsx)(_reactNative.View,{style:b.measurer,pointerEvents:"none",onLayout:L,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[b.content,_],children:i})}):null,(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[b.contentWrapper,null===C?{height:0,opacity:0}:{height:P,opacity:q},x],children:(0,_jsxRuntime.jsx)(_reactNative.View,{onLayout:L,style:[b.content,_],children:i})})]})};exports.Accordion=Accordion,Accordion.displayName="Accordion";const AccordionSkeleton=({variant:e="plain",style:t})=>{const i=(0,_index.useTheme)(),r="card"===e;return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[r?{paddingHorizontal:i.space.md,paddingVertical:i.space.sm,backgroundColor:i.colors.surface,borderRadius:i.radius.md,..._corners.smoothCorners}:{paddingVertical:i.space.sm},t],accessibilityRole:"progressbar",accessibilityState:{busy:!0},"aria-busy":!0,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{flexDirection:"row",alignItems:"center"},children:[(0,_jsxRuntime.jsx)(_index2.Skeleton,{shape:"text",width:"60%",height:18,style:{flex:1}}),(0,_jsxRuntime.jsx)(_index2.Skeleton,{width:16,height:16,radius:"sm",style:{marginLeft:i.space.sm}})]})})};AccordionSkeleton.displayName="AccordionSkeleton",Accordion.Skeleton=AccordionSkeleton,_reactNative.LayoutAnimation;const buildStyles=e=>_reactNative.StyleSheet.create({card:{paddingHorizontal:e.space.md,paddingVertical:e.space.xs,marginVertical:e.space.xs},header:{flexDirection:"row",alignItems:"center",paddingVertical:e.space.sm},iconLeft:{marginRight:e.space.sm},title:{flex:1},contentWrapper:{overflow:"hidden"},content:{paddingBottom:e.space.sm},measurer:{position:"absolute",opacity:0,left:0,right:0,top:0,zIndex:-1}});var _default=exports.default=Accordion;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.DEFAULT_APP_BAR_LABELS=exports.AppBar=void 0;var _react=require("react"),_reactNative=require("react-native"),_reactNativeSafeAreaContext=require("react-native-safe-area-context"),_usePressAnimation=require("../../hooks/usePressAnimation.js"),_index=require("../../theme/index.js"),_corners=require("../../utils/corners.js"),_hapticUtils=require("../../utils/hapticUtils.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_AppIcon=require("../AppIcon/AppIcon.js"),_index2=require("../Menu/index.js"),_Text=require("../Text/Text.js"),_jsxRuntime=require("react/jsx-runtime");const ACTION_BUTTON_SIZE=44,DOT_OFFSET=10,DOT_SIZE=8,BADGE_OFFSET=4,DEFAULT_APP_BAR_LABELS=exports.DEFAULT_APP_BAR_LABELS=Object.freeze({back:"Back"}),variantSize=(e,t)=>{switch(t){case"compact":return{height:44,titleSize:e.text.lg.size,titleWeight:"semibold",alignBottom:!1,subtitleLines:1};case"large":return{height:96,titleSize:e.text["2xl"].size,titleWeight:"bold",alignBottom:!0,subtitleLines:2};default:return{height:56,titleSize:e.text.lg.size,titleWeight:"semibold",alignBottom:!1,subtitleLines:1}}},ActionButton=(0,_react.forwardRef)(({action:e,side:t,badgeStyle:i,haptic:n,flush:a,onPress:r},l)=>{const s=(0,_index.useTheme)(),{style:o,pressIn:c,pressOut:d}=(0,_usePressAnimation.usePressAnimation)({enabled:!0}),u=(0,_react.useMemo)(()=>buildActionStyles(s),[s]),p=e.badge,m=void 0!==p&&0!==p,x=void 0!==e.label;return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:o,children:(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{ref:l,onPress:t=>{const i=(0,_hapticUtils.resolveHaptic)(n,"selection");i&&(0,_hapticUtils.triggerHaptic)(i),"onPress"in e&&e.onPress(),r?.(t)},onPressIn:c,onPressOut:d,accessibilityRole:"button",accessibilityLabel:e.accessibilityLabel??e.label,testID:e.testID,android_ripple:{color:s.colors["surface-pressed"],borderless:!x},style:({pressed:e})=>[x?u.textButton:u.actionButton,a?null:"left"===t?u.actionLeft:u.actionRight,e&&!x?u.actionPressed:null,e&&x?u.textPressed:null],children:[x?(0,_jsxRuntime.jsx)(_Text.Text,{variant:"body",weight:"semibold",color:"link",numberOfLines:1,children:e.label}):(0,_jsxRuntime.jsx)(_reactNative.View,{style:u.iconWrap,children:e.icon}),m?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[u.badge,i],pointerEvents:"none",children:(0,_jsxRuntime.jsx)(_Text.Text,{variant:"caption",weight:"semibold",numberOfLines:1,style:u.badgeText,children:String(p)})}):null,e.dot?(0,_jsxRuntime.jsx)(_reactNative.View,{testID:e.testID?`${e.testID}-dot`:"appbar-action-dot",style:u.dot,pointerEvents:"none"}):null]})})}),COLLAPSE_RANGE=60,LARGE_TITLE_SCALE_END=.71,AppBar=exports.AppBar=(0,_react.forwardRef)((e,t)=>{const{title:i,subtitle:n,titleAlignment:a="left",leftAction:r,rightActions:l,leading:s,trailing:o,onBack:c,gutter:d,titleVariant:u,titleOffset:p,height:m,divider:x,variant:g="default",transparent:h=!1,scrollY:_,style:b,containerStyle:f,titleStyle:j,subtitleStyle:A,badgeStyle:v,haptic:y,labels:R,testID:S}=e;(0,_warnInvalidValue.warnInvalidValue)("AppBar","variant",e.variant,["default","large","compact"]),(0,_warnInvalidValue.warnInvalidValue)("AppBar","titleAlignment",e.titleAlignment,["left","center"]);const B=(0,_react.useMemo)(()=>({...DEFAULT_APP_BAR_LABELS,...R}),[R]),w=(0,_index.useTheme)(),I=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)(),L=(0,_react.useMemo)(()=>variantSize(w,g),[w,g]),N=(0,_react.useMemo)(()=>buildStyles(w),[w]),T="large"===g&&void 0!==_,C=r??(c?{icon:(0,_jsxRuntime.jsx)(_AppIcon.AppIcon,{name:"arrow-left",size:24,color:w.colors["text-body"]}),onPress:c,accessibilityLabel:B.back}:void 0),P=o?void 0:l?.[l.length-1],opticalInset=e=>void 0===e?0:void 0!==e.label?w.space.sm:Math.max((44-(e.glyphSize??24))/2,0),V=void 0===d?null:{paddingLeft:Math.max(d-opticalInset(C),0),paddingRight:Math.max(d-opticalInset(P),0)},E=void 0!==p,z=Boolean(C)||Boolean(s),O=x??!h,D=_reactNative.StyleSheet.hairlineWidth,W=(0,_react.useMemo)(()=>{if(!_)return null;const e={inputRange:[0,60],extrapolate:"clamp"};return{titleScale:_.interpolate({...e,outputRange:[1,.71]}),titleTranslateY:_.interpolate({...e,outputRange:[0,-20]}),titleTranslateX:_.interpolate({...e,outputRange:"center"===a?[0,0]:[0,8]}),subtitleOpacity:_.interpolate({inputRange:[0,30],outputRange:[1,0],extrapolate:"clamp"}),barHeight:_.interpolate({...e,outputRange:[96,56]}),borderOpacity:_.interpolate({...e,outputRange:[0,1]})}},[_,a]),q=T&&W?{transform:[{translateX:W.titleTranslateX},{translateY:W.titleTranslateY},{scale:W.titleScale}]}:null,k=i?u?(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:q,children:(0,_jsxRuntime.jsx)(_Text.Text,{variant:u,align:"center"===a?"center":"left",accessibilityRole:"header",numberOfLines:1,style:[N.titleVariant,j],children:i})}):(0,_jsxRuntime.jsx)(_reactNative.Animated.Text,{accessibilityRole:"header",style:[N.title,{fontSize:L.titleSize,fontWeight:w.weight[L.titleWeight],textAlign:"center"===a?"center":"left"},q,j],numberOfLines:1,children:i}):null,M=n?(0,_jsxRuntime.jsx)(_reactNative.Animated.Text,{style:[N.subtitle,{textAlign:"center"===a?"center":"left"},T&&W?{opacity:W.subtitleOpacity}:null,A],numberOfLines:L.subtitleLines,children:n}):null,F=(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[N.titleColumn,"center"===a?N.titleColumnCenter:null,L.alignBottom?N.titleColumnBottom:null],children:[k,M]}),H=T?_reactNative.Animated.View:_reactNative.View,U=T&&W?{height:_reactNative.Animated.add(W.barHeight,new _reactNative.Animated.Value(I.top))}:{height:(m??L.height)+I.top};return(0,_jsxRuntime.jsxs)(H,{ref:t,testID:S,style:[N.root,{paddingTop:I.top,backgroundColor:h?"transparent":w.colors.surface},U,!T&&O?{borderBottomWidth:D,borderBottomColor:w.colors.border}:null,b,f],children:[T&&W&&O?(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{pointerEvents:"none",style:[N.animatedBorder,{backgroundColor:w.colors.border,opacity:W.borderOpacity}]}):null,(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[N.row,L.alignBottom?N.rowAlignBottom:null,V,{flex:1}],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[N.sideSlot,E?N.sideSlotCompact:null],children:[C?(0,_jsxRuntime.jsx)(ActionButton,{action:C,side:"left",haptic:y,flush:E}):null,null!=s&&!1!==s?(0,_jsxRuntime.jsx)(_reactNative.View,{style:N.slotNode,children:s}):null]}),(0,_jsxRuntime.jsx)(_reactNative.View,{pointerEvents:"none",style:[N.center,"center"===a?N.centerAligned:N.centerLeft,E?{paddingLeft:z?p:w.space.none,paddingRight:w.space.none}:null],children:F}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[N.sideSlot,N.sideSlotRight,E?N.sideSlotCompact:null],children:[l?.map((e,t)=>(0,_jsxRuntime.jsx)(_react.Fragment,{children:"menu"in e?(0,_jsxRuntime.jsx)(_index2.Menu,{items:e.menu,title:e.menuTitle,haptic:y,trigger:(0,_jsxRuntime.jsx)(ActionButton,{action:e,side:"right",badgeStyle:v,haptic:y,flush:E})}):(0,_jsxRuntime.jsx)(ActionButton,{action:e,side:"right",badgeStyle:v,haptic:y,flush:E})},`appbar-right-${t}`)),null!=o&&!1!==o?(0,_jsxRuntime.jsx)(_reactNative.View,{style:N.slotNode,children:o}):null]})]})]})});AppBar.displayName="AppBar";const buildStyles=e=>_reactNative.StyleSheet.create({root:{width:"100%"},row:{flexDirection:"row",alignItems:"center",paddingHorizontal:e.space.xs},rowAlignBottom:{alignItems:"flex-end",paddingBottom:e.space.sm},sideSlot:{flexDirection:"row",alignItems:"center",minWidth:48},sideSlotRight:{justifyContent:"flex-end"},sideSlotCompact:{minWidth:0},slotNode:{flexDirection:"row",alignItems:"center"},center:{flex:1,minWidth:0,paddingHorizontal:e.space.xs},centerAligned:{alignItems:"center"},centerLeft:{alignItems:"flex-start"},titleColumn:{flexDirection:"column",maxWidth:"100%"},titleColumnCenter:{alignItems:"center"},titleColumnBottom:{justifyContent:"flex-end"},title:{color:e.colors["text-body"]},titleVariant:{includeFontPadding:!1,textAlignVertical:"center"},subtitle:{marginTop:e.space.xxs,color:e.colors["text-subtle"],fontSize:e.text.sm.size,fontWeight:e.weight.normal},animatedBorder:{position:"absolute",left:0,right:0,bottom:0,height:_reactNative.StyleSheet.hairlineWidth}}),buildActionStyles=e=>_reactNative.StyleSheet.create({actionButton:{width:44,height:44,borderRadius:e.radius.pill,..._corners.smoothCorners,alignItems:"center",justifyContent:"center"},actionLeft:{marginRight:e.space.xs},actionRight:{marginLeft:e.space.xs},actionPressed:{backgroundColor:e.colors["surface-pressed"]},textButton:{minWidth:44,minHeight:44,paddingHorizontal:e.space.sm,alignItems:"center",justifyContent:"center"},textPressed:{opacity:.6},dot:{position:"absolute",top:10,right:10,width:8,height:8,borderRadius:e.radius.pill,backgroundColor:e.colors.danger},iconWrap:{alignItems:"center",justifyContent:"center"},badge:{position:"absolute",top:4,right:4,minWidth:16,height:16,paddingHorizontal:e.space.xs,borderRadius:e.radius.pill,..._corners.smoothCorners,backgroundColor:e.colors.danger,alignItems:"center",justifyContent:"center"},badgeText:{color:e.colors["on-danger"],fontSize:e.text.xs.size,fontWeight:e.weight.semibold,lineHeight:13}});var _default=exports.default=AppBar;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.DEFAULT_APP_BAR_LABELS=exports.AppBar=void 0;var _react=require("react"),_reactNative=require("react-native"),_reactNativeSafeAreaContext=require("react-native-safe-area-context"),_usePressAnimation=require("../../hooks/usePressAnimation.js"),_index=require("../../theme/index.js"),_corners=require("../../utils/corners.js"),_hapticUtils=require("../../utils/hapticUtils.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_AppIcon=require("../AppIcon/AppIcon.js"),_index2=require("../Menu/index.js"),_Text=require("../Text/Text.js"),_jsxRuntime=require("react/jsx-runtime");const ACTION_BUTTON_SIZE=44,DOT_OFFSET=10,DOT_SIZE=8,BADGE_OFFSET=4,DEFAULT_APP_BAR_LABELS=exports.DEFAULT_APP_BAR_LABELS=Object.freeze({back:"Back"}),variantSize=(e,t)=>{switch(t){case"compact":return{height:44,titleSize:e.text.lg.size,titleWeight:"semibold",alignBottom:!1,subtitleLines:1};case"large":return{height:96,titleSize:e.text["2xl"].size,titleWeight:"bold",alignBottom:!0,subtitleLines:2};default:return{height:56,titleSize:e.text.lg.size,titleWeight:"semibold",alignBottom:!1,subtitleLines:1}}},ActionButton=(0,_react.forwardRef)(({action:e,side:t,badgeStyle:i,haptic:n,flush:a,onPress:r},l)=>{const s=(0,_index.useTheme)(),{style:o,pressIn:c,pressOut:d}=(0,_usePressAnimation.usePressAnimation)({enabled:!0}),u=(0,_react.useMemo)(()=>buildActionStyles(s),[s]),p=e.badge,m=void 0!==p&&0!==p,x=void 0!==e.label;return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:o,children:(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{ref:l,onPress:t=>{const i=(0,_hapticUtils.resolveHaptic)(n,"selection");i&&(0,_hapticUtils.triggerHaptic)(i),"onPress"in e&&e.onPress(),r?.(t)},onPressIn:c,onPressOut:d,accessibilityRole:"button",accessibilityLabel:e.accessibilityLabel??e.label,testID:e.testID,android_ripple:{color:s.colors["surface-pressed"],borderless:!x},style:({pressed:e})=>[x?u.textButton:u.actionButton,a?null:"left"===t?u.actionLeft:u.actionRight,e&&!x?u.actionPressed:null,e&&x?u.textPressed:null],children:[x?(0,_jsxRuntime.jsx)(_Text.Text,{variant:"body",weight:"semibold",color:"link",numberOfLines:1,children:e.label}):(0,_jsxRuntime.jsx)(_reactNative.View,{style:u.iconWrap,children:e.icon}),m?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[u.badge,i],pointerEvents:"none",children:(0,_jsxRuntime.jsx)(_Text.Text,{variant:"caption",weight:"semibold",numberOfLines:1,style:u.badgeText,children:String(p)})}):null,e.dot?(0,_jsxRuntime.jsx)(_reactNative.View,{testID:e.testID?`${e.testID}-dot`:"appbar-action-dot",style:u.dot,pointerEvents:"none"}):null]})})}),COLLAPSE_RANGE=60,LARGE_TITLE_SCALE_END=.71,AppBar=exports.AppBar=(0,_react.forwardRef)((e,t)=>{const{title:i,subtitle:n,titleAlignment:a="left",leftAction:r,rightActions:l,leading:s,trailing:o,onBack:c,gutter:d,titleVariant:u,titleOffset:p,height:m,divider:x,variant:g="default",transparent:h=!1,scrollY:_,style:b,containerStyle:f,titleStyle:j,subtitleStyle:A,badgeStyle:v,haptic:y,labels:R,testID:S}=e;(0,_warnInvalidValue.warnInvalidValue)("AppBar","variant",e.variant,["default","large","compact"]),(0,_warnInvalidValue.warnInvalidValue)("AppBar","titleAlignment",e.titleAlignment,["left","center"]);const B=(0,_react.useMemo)(()=>({...DEFAULT_APP_BAR_LABELS,...R}),[R]),w=(0,_index.useTheme)(),I=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)(),L=(0,_react.useMemo)(()=>variantSize(w,g),[w,g]),N=(0,_react.useMemo)(()=>buildStyles(w),[w]),T="large"===g&&void 0!==_,C=r??(c?{icon:(0,_jsxRuntime.jsx)(_AppIcon.AppIcon,{name:"arrow-left",size:24,color:w.colors["text-body"]}),onPress:c,accessibilityLabel:B.back}:void 0),P=o?void 0:l?.[l.length-1],opticalInset=e=>void 0===e?0:void 0!==e.label?w.space.sm:Math.max((44-(e.glyphSize??24))/2,0),V=void 0===d?null:{paddingLeft:Math.max(d-opticalInset(C),0),paddingRight:Math.max(d-opticalInset(P),0)},E=void 0!==p,z=Boolean(C)||Boolean(s),O=x??!h,D=_reactNative.StyleSheet.hairlineWidth,W=(0,_react.useMemo)(()=>{if(!_)return null;const e={inputRange:[0,60],extrapolate:"clamp"};return{titleScale:_.interpolate({...e,outputRange:[1,.71]}),titleTranslateY:_.interpolate({...e,outputRange:[0,-20]}),titleTranslateX:_.interpolate({...e,outputRange:"center"===a?[0,0]:[0,8]}),subtitleOpacity:_.interpolate({inputRange:[0,30],outputRange:[1,0],extrapolate:"clamp"}),barHeight:_.interpolate({...e,outputRange:[96,56]}),borderOpacity:_.interpolate({...e,outputRange:[0,1]})}},[_,a]),q=T&&W?{transform:[{translateX:W.titleTranslateX},{translateY:W.titleTranslateY},{scale:W.titleScale}]}:null,k=i?u?(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:q,children:(0,_jsxRuntime.jsx)(_Text.Text,{variant:u,align:"center"===a?"center":"left",accessibilityRole:"header",numberOfLines:1,style:[N.titleVariant,j],children:i})}):(0,_jsxRuntime.jsx)(_reactNative.Animated.Text,{accessibilityRole:"header",style:[N.title,{fontSize:L.titleSize,fontWeight:w.weight[L.titleWeight],textAlign:"center"===a?"center":"left"},q,j],numberOfLines:1,children:i}):null,M=n?(0,_jsxRuntime.jsx)(_reactNative.Animated.Text,{style:[N.subtitle,{textAlign:"center"===a?"center":"left"},T&&W?{opacity:W.subtitleOpacity}:null,A],numberOfLines:L.subtitleLines,children:n}):null,F=(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[N.titleColumn,"center"===a?N.titleColumnCenter:null,L.alignBottom?N.titleColumnBottom:null],children:[k,M]}),H=T?_reactNative.Animated.View:_reactNative.View,U=T&&W?{height:_reactNative.Animated.add(W.barHeight,new _reactNative.Animated.Value(I.top))}:{height:(m??L.height)+I.top};return(0,_jsxRuntime.jsxs)(H,{ref:t,testID:S,style:[N.root,{paddingTop:I.top,backgroundColor:h?"transparent":w.colors.surface},U,!T&&O?{borderBottomWidth:D,borderBottomColor:w.colors.border}:null,f,b],children:[T&&W&&O?(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{pointerEvents:"none",style:[N.animatedBorder,{backgroundColor:w.colors.border,opacity:W.borderOpacity}]}):null,(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[N.row,L.alignBottom?N.rowAlignBottom:null,V,{flex:1}],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[N.sideSlot,E?N.sideSlotCompact:null],children:[C?(0,_jsxRuntime.jsx)(ActionButton,{action:C,side:"left",haptic:y,flush:E}):null,null!=s&&!1!==s?(0,_jsxRuntime.jsx)(_reactNative.View,{style:N.slotNode,children:s}):null]}),(0,_jsxRuntime.jsx)(_reactNative.View,{pointerEvents:"none",style:[N.center,"center"===a?N.centerAligned:N.centerLeft,E?{paddingLeft:z?p:w.space.none,paddingRight:w.space.none}:null],children:F}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[N.sideSlot,N.sideSlotRight,E?N.sideSlotCompact:null],children:[l?.map((e,t)=>(0,_jsxRuntime.jsx)(_react.Fragment,{children:"menu"in e?(0,_jsxRuntime.jsx)(_index2.Menu,{items:e.menu,title:e.menuTitle,haptic:y,trigger:(0,_jsxRuntime.jsx)(ActionButton,{action:e,side:"right",badgeStyle:v,haptic:y,flush:E})}):(0,_jsxRuntime.jsx)(ActionButton,{action:e,side:"right",badgeStyle:v,haptic:y,flush:E})},`appbar-right-${t}`)),null!=o&&!1!==o?(0,_jsxRuntime.jsx)(_reactNative.View,{style:N.slotNode,children:o}):null]})]})]})});AppBar.displayName="AppBar";const buildStyles=e=>_reactNative.StyleSheet.create({root:{width:"100%"},row:{flexDirection:"row",alignItems:"center",paddingHorizontal:e.space.xs},rowAlignBottom:{alignItems:"flex-end",paddingBottom:e.space.sm},sideSlot:{flexDirection:"row",alignItems:"center",minWidth:48},sideSlotRight:{justifyContent:"flex-end"},sideSlotCompact:{minWidth:0},slotNode:{flexDirection:"row",alignItems:"center"},center:{flex:1,minWidth:0,paddingHorizontal:e.space.xs},centerAligned:{alignItems:"center"},centerLeft:{alignItems:"flex-start"},titleColumn:{flexDirection:"column",maxWidth:"100%"},titleColumnCenter:{alignItems:"center"},titleColumnBottom:{justifyContent:"flex-end"},title:{color:e.colors["text-body"]},titleVariant:{includeFontPadding:!1,textAlignVertical:"center"},subtitle:{marginTop:e.space.xxs,color:e.colors["text-subtle"],fontSize:e.text.sm.size,fontWeight:e.weight.normal},animatedBorder:{position:"absolute",left:0,right:0,bottom:0,height:_reactNative.StyleSheet.hairlineWidth}}),buildActionStyles=e=>_reactNative.StyleSheet.create({actionButton:{width:44,height:44,borderRadius:e.radius.pill,..._corners.smoothCorners,alignItems:"center",justifyContent:"center"},actionLeft:{marginRight:e.space.xs},actionRight:{marginLeft:e.space.xs},actionPressed:{backgroundColor:e.colors["surface-pressed"]},textButton:{minWidth:44,minHeight:44,paddingHorizontal:e.space.sm,alignItems:"center",justifyContent:"center"},textPressed:{opacity:.6},dot:{position:"absolute",top:10,right:10,width:8,height:8,borderRadius:e.radius.pill,backgroundColor:e.colors.danger},iconWrap:{alignItems:"center",justifyContent:"center"},badge:{position:"absolute",top:4,right:4,minWidth:16,height:16,paddingHorizontal:e.space.xs,borderRadius:e.radius.pill,..._corners.smoothCorners,backgroundColor:e.colors.danger,alignItems:"center",justifyContent:"center"},badgeText:{color:e.colors["on-danger"],fontSize:e.text.xs.size,fontWeight:e.weight.semibold,lineHeight:13}});var _default=exports.default=AppBar;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppIcon=exports.APP_ICON_SIZES=void 0,Object.defineProperty(exports,"CURATED_ICON_NAMES",{enumerable:!0,get:function(){return _glyphsG.CURATED_ICON_NAMES}}),exports.ICONSAX_SUFFIX=void 0,Object.defineProperty(exports,"ICON_NAMES",{enumerable:!0,get:function(){return _catalogG.ICON_NAMES}}),exports.resolveGlyph=exports.default=exports.buildIconXml=void 0;var _mobileCore=require("@webority/mobile-core"),_react=require("react"),_reactNativeSvg=require("react-native-svg"),_index=require("../../theme/index.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_catalogG=require("./catalog.g.js"),_glyphsG=require("./glyphs.g.js"),_jsxRuntime=require("react/jsx-runtime");const ICONSAX_SUFFIX=exports.ICONSAX_SUFFIX="-iconsax",APP_ICON_SIZES=exports.APP_ICON_SIZES={xs:14,sm:18,md:22,lg:28,xl:36},tryRequire=e=>{try{return e()}catch{return null}};let curatedVariants=null;const loadCuratedVariants=()=>(curatedVariants||(curatedVariants=tryRequire(()=>require("./variants.g").VARIANT_GLYPHS)??{}),curatedVariants),shardCache=new Map,loadShard=(e,r)=>{const t=r[0]?.toLowerCase()??"",n=`${e}:${t}`,a=shardCache.get(n);if(void 0!==a)return a;const l=_catalogG.CATALOG_LOADERS[e]?.[t],o=l?tryRequire(l):null;return shardCache.set(n,o),o},warned=new Set,resolveCatalogue=(e,r)=>{const t=loadShard(r,e)?.[e];return t||("linear"===r?null:loadShard("linear",e)?.[e]??null)},resolveGlyph=(e,r="linear")=>{if(e.endsWith(ICONSAX_SUFFIX)){const t=e.slice(0,-ICONSAX_SUFFIX.length);return t in _glyphsG.GLYPHS?resolveCatalogue(t,r):null}const t=_glyphsG.GLYPHS[e];return t?"linear"===r?t:loadCuratedVariants()[r]?.[e]??t:resolveCatalogue(e,r)};exports.resolveGlyph=resolveGlyph;const buildIconXml=(e,r,t)=>`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 24 24" fill="none">${e.replace(/currentColor/g,t)}</svg>`;exports.buildIconXml=buildIconXml;const iconXmlCache=new Map,AppIcon=({name:e,size:r="md",color:t,variant:n="linear",style:a,accessibilityLabel:l,testID:o})=>{const i=(0,_index.useTheme)();"string"==typeof r&&(0,_warnInvalidValue.warnInvalidValue)("AppIcon","size",r,Object.keys(APP_ICON_SIZES)),(0,_warnInvalidValue.warnInvalidValue)("AppIcon","variant",n,["linear","bold","bulk","broken","outline","twotone"]);const s="number"==typeof r?r:APP_ICON_SIZES[r]??APP_ICON_SIZES.md,c=t??i.colors["text-body"],u=resolveGlyph(e,n),d=(0,_react.useMemo)(()=>{if(!u)return null;const r=`${e}|${n}|${s}|${c}`,t=iconXmlCache.get(r);if(void 0!==t)return t;iconXmlCache.size>=500&&iconXmlCache.clear();const a=buildIconXml(u,s,c);return iconXmlCache.set(r,a),a},[e,n,u,s,c]);return d?(0,_jsxRuntime.jsx)(_reactNativeSvg.SvgXml,{xml:d,width:s,height:s,style:a,accessible:null!=l,accessibilityLabel:l,accessibilityRole:null!=l?"image":void 0,testID:o}):(__DEV__&&!warned.has(e)&&(warned.add(e),_mobileCore.Logger.warn(`[@webority/mobile-ui] AppIcon: Unknown icon "${e}". Names come from webority-ui's icon map and the Iconsax catalogue; run scripts/sync-icons.mjs after adding one there.`)),null)};exports.AppIcon=AppIcon,AppIcon.displayName="AppIcon";var _default=exports.default=AppIcon;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppIcon=exports.APP_ICON_SIZES=void 0,Object.defineProperty(exports,"CURATED_ICON_NAMES",{enumerable:!0,get:function(){return _glyphsG.CURATED_ICON_NAMES}}),exports.ICONSAX_SUFFIX=void 0,Object.defineProperty(exports,"ICON_NAMES",{enumerable:!0,get:function(){return _catalogG.ICON_NAMES}}),exports.resolveGlyph=exports.default=exports.buildIconXml=void 0;var _mobileCore=require("@webority/mobile-core"),_react=require("react"),_reactNativeSvg=require("react-native-svg"),_index=require("../../theme/index.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_Text=require("../Text/Text.js"),_catalogG=require("./catalog.g.js"),_glyphsG=require("./glyphs.g.js"),_jsxRuntime=require("react/jsx-runtime");const ICONSAX_SUFFIX=exports.ICONSAX_SUFFIX="-iconsax",APP_ICON_SIZES=exports.APP_ICON_SIZES={xs:14,sm:18,md:22,lg:28,xl:36},tryRequire=e=>{try{return e()}catch{return null}};let curatedVariants=null;const loadCuratedVariants=()=>(curatedVariants||(curatedVariants=tryRequire(()=>require("./variants.g").VARIANT_GLYPHS)??{}),curatedVariants),shardCache=new Map,loadShard=(e,r)=>{const t=r[0]?.toLowerCase()??"",n=`${e}:${t}`,a=shardCache.get(n);if(void 0!==a)return a;const o=_catalogG.CATALOG_LOADERS[e]?.[t],l=o?tryRequire(o):null;return shardCache.set(n,l),l},warned=new Set,resolveCatalogue=(e,r)=>{const t=loadShard(r,e)?.[e];return t||("linear"===r?null:loadShard("linear",e)?.[e]??null)},resolveGlyph=(e,r="linear")=>{if(e.endsWith(ICONSAX_SUFFIX)){const t=e.slice(0,-ICONSAX_SUFFIX.length);return t in _glyphsG.GLYPHS?resolveCatalogue(t,r):null}const t=_glyphsG.GLYPHS[e];return t?"linear"===r?t:loadCuratedVariants()[r]?.[e]??t:resolveCatalogue(e,r)};exports.resolveGlyph=resolveGlyph;const buildIconXml=(e,r,t)=>`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 24 24" fill="none">${e.replace(/currentColor/g,t)}</svg>`;exports.buildIconXml=buildIconXml;const iconXmlCache=new Map,AppIcon=({name:e,size:r="md",color:t,variant:n="linear",style:a,accessibilityLabel:o,testID:l})=>{const i=(0,_index.useTheme)();"string"==typeof r&&(0,_warnInvalidValue.warnInvalidValue)("AppIcon","size",r,Object.keys(APP_ICON_SIZES)),(0,_warnInvalidValue.warnInvalidValue)("AppIcon","variant",n,["linear","bold","bulk","broken","outline","twotone"]);const s="number"==typeof r?r:APP_ICON_SIZES[r]??APP_ICON_SIZES.md,c=void 0===t?i.colors["text-body"]:(0,_Text.resolveColor)(i,t),u=resolveGlyph(e,n),d=(0,_react.useMemo)(()=>{if(!u)return null;const r=`${e}|${n}|${s}|${c}`,t=iconXmlCache.get(r);if(void 0!==t)return t;iconXmlCache.size>=500&&iconXmlCache.clear();const a=buildIconXml(u,s,c);return iconXmlCache.set(r,a),a},[e,n,u,s,c]);return d?(0,_jsxRuntime.jsx)(_reactNativeSvg.SvgXml,{xml:d,width:s,height:s,style:a,accessible:null!=o,accessibilityLabel:o,accessibilityRole:null!=o?"image":void 0,testID:l}):(__DEV__&&!warned.has(e)&&(warned.add(e),_mobileCore.Logger.warn(`[@webority/mobile-ui] AppIcon: Unknown icon "${e}". Names come from webority-ui's icon map and the Iconsax catalogue; run node scripts/gen-icons.mjs after adding one there.`)),null)};exports.AppIcon=AppIcon,AppIcon.displayName="AppIcon";var _default=exports.default=AppIcon;