@cratis/scene.primereact 3.2.0 → 3.3.1

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 (228) hide show
  1. package/dist/cjs/button/PrimeButton.js.map +1 -1
  2. package/dist/cjs/button/PrimeButtonGroup.js.map +1 -1
  3. package/dist/cjs/button/PrimeSpeedDial.js.map +1 -1
  4. package/dist/cjs/button/PrimeSplitButton.js.map +1 -1
  5. package/dist/cjs/button/SplitButton.js.map +1 -1
  6. package/dist/cjs/data/Column.js.map +1 -1
  7. package/dist/cjs/data/Pagination.js.map +1 -1
  8. package/dist/cjs/data/PrimeColumn.js.map +1 -1
  9. package/dist/cjs/data/PrimeDataTable.js.map +1 -1
  10. package/dist/cjs/data/PrimeDataView.js.map +1 -1
  11. package/dist/cjs/data/PrimeOrderList.js.map +1 -1
  12. package/dist/cjs/data/PrimeOrganizationChart.js.map +1 -1
  13. package/dist/cjs/data/PrimePaginator.js.map +1 -1
  14. package/dist/cjs/data/PrimePickList.js.map +1 -1
  15. package/dist/cjs/data/PrimeTimeline.js.map +1 -1
  16. package/dist/cjs/data/PrimeTree.js.map +1 -1
  17. package/dist/cjs/data/columnDefinitions.js.map +1 -1
  18. package/dist/cjs/data/primeTreeNodes.js.map +1 -1
  19. package/dist/cjs/data/selectOptions.js.map +1 -1
  20. package/dist/cjs/form/PrimeAutoComplete.js.map +1 -1
  21. package/dist/cjs/form/PrimeCalendar.js.map +1 -1
  22. package/dist/cjs/form/PrimeCheckbox.js.map +1 -1
  23. package/dist/cjs/form/PrimeChips.js.map +1 -1
  24. package/dist/cjs/form/PrimeColorPicker.js.map +1 -1
  25. package/dist/cjs/form/PrimeDropdown.js.map +1 -1
  26. package/dist/cjs/form/PrimeFloatLabel.js.map +1 -1
  27. package/dist/cjs/form/PrimeIconField.js.map +1 -1
  28. package/dist/cjs/form/PrimeInputNumber.js.map +1 -1
  29. package/dist/cjs/form/PrimeInputText.js.map +1 -1
  30. package/dist/cjs/form/PrimeInputTextarea.js.map +1 -1
  31. package/dist/cjs/form/PrimeKnob.js.map +1 -1
  32. package/dist/cjs/form/PrimeListBox.js.map +1 -1
  33. package/dist/cjs/form/PrimeMultiSelect.js.map +1 -1
  34. package/dist/cjs/form/PrimePassword.js.map +1 -1
  35. package/dist/cjs/form/PrimeRadioButton.js.map +1 -1
  36. package/dist/cjs/form/PrimeRating.js.map +1 -1
  37. package/dist/cjs/form/PrimeSelectButton.js.map +1 -1
  38. package/dist/cjs/form/PrimeSlider.js.map +1 -1
  39. package/dist/cjs/form/PrimeToggleSwitch.js.map +1 -1
  40. package/dist/cjs/form/PrimeTreeSelect.js.map +1 -1
  41. package/dist/cjs/form/TreeSelect.js.map +1 -1
  42. package/dist/cjs/media/Image.js.map +1 -1
  43. package/dist/cjs/media/PrimeCarousel.js.map +1 -1
  44. package/dist/cjs/media/PrimeGalleria.js.map +1 -1
  45. package/dist/cjs/media/PrimeImage.js.map +1 -1
  46. package/dist/cjs/menu/Dock.js.map +1 -1
  47. package/dist/cjs/menu/DockPosition.js.map +1 -1
  48. package/dist/cjs/menu/MegaMenu.js.map +1 -1
  49. package/dist/cjs/menu/MenuItemAction.js.map +1 -1
  50. package/dist/cjs/menu/MenuItemContent.js.map +1 -1
  51. package/dist/cjs/menu/Menubar.js.map +1 -1
  52. package/dist/cjs/menu/PanelMenu.js.map +1 -1
  53. package/dist/cjs/menu/PrimeBreadcrumb.js.map +1 -1
  54. package/dist/cjs/menu/PrimeContextMenu.js.map +1 -1
  55. package/dist/cjs/menu/PrimeDock.js.map +1 -1
  56. package/dist/cjs/menu/PrimeMegaMenu.js.map +1 -1
  57. package/dist/cjs/menu/PrimeMenu.js.map +1 -1
  58. package/dist/cjs/menu/PrimeMenubar.js.map +1 -1
  59. package/dist/cjs/menu/PrimePanelMenu.js.map +1 -1
  60. package/dist/cjs/menu/PrimeSteps.js.map +1 -1
  61. package/dist/cjs/menu/PrimeTabMenu.js.map +1 -1
  62. package/dist/cjs/menu/PrimeTieredMenu.js.map +1 -1
  63. package/dist/cjs/menu/Steps.js.map +1 -1
  64. package/dist/cjs/menu/TabMenu.js.map +1 -1
  65. package/dist/cjs/menu/TieredMenu.js.map +1 -1
  66. package/dist/cjs/menuItems.js.map +1 -1
  67. package/dist/cjs/messages/PrimeInlineMessage.js.map +1 -1
  68. package/dist/cjs/messages/PrimeMessage.js.map +1 -1
  69. package/dist/cjs/messages/PrimeToast.js.map +1 -1
  70. package/dist/cjs/misc/BlockUI.js.map +1 -1
  71. package/dist/cjs/misc/PrimeAvatar.js.map +1 -1
  72. package/dist/cjs/misc/PrimeBadge.js.map +1 -1
  73. package/dist/cjs/misc/PrimeBlockUI.js.map +1 -1
  74. package/dist/cjs/misc/PrimeChip.js.map +1 -1
  75. package/dist/cjs/misc/PrimeInplace.js.map +1 -1
  76. package/dist/cjs/misc/PrimeProgressBar.js.map +1 -1
  77. package/dist/cjs/misc/PrimeProgressSpinner.js.map +1 -1
  78. package/dist/cjs/misc/PrimeScrollTop.js.map +1 -1
  79. package/dist/cjs/misc/PrimeSkeleton.js.map +1 -1
  80. package/dist/cjs/misc/PrimeTag.js.map +1 -1
  81. package/dist/cjs/misc/PrimeTerminal.js.map +1 -1
  82. package/dist/cjs/misc/ScrollTop.js.map +1 -1
  83. package/dist/cjs/overlay/ConfirmDialog.js.map +1 -1
  84. package/dist/cjs/overlay/PrimeConfirmDialog.js.map +1 -1
  85. package/dist/cjs/overlay/PrimeDialog.js.map +1 -1
  86. package/dist/cjs/overlay/PrimeOverlayPanel.js.map +1 -1
  87. package/dist/cjs/overlay/PrimeSidebar.js.map +1 -1
  88. package/dist/cjs/overlay/PrimeTooltip.js.map +1 -1
  89. package/dist/cjs/panel/PrimeAccordion.js.map +1 -1
  90. package/dist/cjs/panel/PrimeCard.js.map +1 -1
  91. package/dist/cjs/panel/PrimeDivider.js.map +1 -1
  92. package/dist/cjs/panel/PrimeFieldset.js.map +1 -1
  93. package/dist/cjs/panel/PrimePanel.js.map +1 -1
  94. package/dist/cjs/panel/PrimeScrollPanel.js.map +1 -1
  95. package/dist/cjs/panel/PrimeSplitter.js.map +1 -1
  96. package/dist/cjs/panel/PrimeStepper.js.map +1 -1
  97. package/dist/cjs/panel/PrimeTabView.js.map +1 -1
  98. package/dist/cjs/panel/PrimeToolbar.js.map +1 -1
  99. package/dist/cjs/primeReactComponents.js.map +1 -1
  100. package/dist/cjs/primeReactPackage.js.map +1 -1
  101. package/dist/cjs/properties.js.map +1 -1
  102. package/dist/cjs/screen/PrimeAction.js.map +1 -1
  103. package/dist/cjs/screen/PrimeField.js.map +1 -1
  104. package/dist/cjs/screen/PrimeSection.js.map +1 -1
  105. package/dist/cjs/screen/PrimeSummary.js.map +1 -1
  106. package/dist/cjs/screen/PrimeText.js.map +1 -1
  107. package/dist/cjs/screen/PrimeTitle.js.map +1 -1
  108. package/dist/cjs/theme/PrimeReactThemeFamily.js.map +1 -1
  109. package/dist/cjs/theme/primeReactThemePreset.js.map +1 -1
  110. package/dist/cjs/theme/primeReactThemes.js.map +1 -1
  111. package/dist/cjs/theme/themePresets.js.map +1 -1
  112. package/dist/cjs/theme/usePrimeReactTheme.js.map +1 -1
  113. package/dist/cjs/treeNodes.js.map +1 -1
  114. package/dist/esm/button/PrimeButton.js.map +1 -1
  115. package/dist/esm/button/PrimeButtonGroup.js.map +1 -1
  116. package/dist/esm/button/PrimeSpeedDial.js.map +1 -1
  117. package/dist/esm/button/PrimeSplitButton.js.map +1 -1
  118. package/dist/esm/button/SplitButton.js.map +1 -1
  119. package/dist/esm/data/Column.js.map +1 -1
  120. package/dist/esm/data/Pagination.js.map +1 -1
  121. package/dist/esm/data/PrimeColumn.js.map +1 -1
  122. package/dist/esm/data/PrimeDataTable.js.map +1 -1
  123. package/dist/esm/data/PrimeDataView.js.map +1 -1
  124. package/dist/esm/data/PrimeOrderList.js.map +1 -1
  125. package/dist/esm/data/PrimeOrganizationChart.js.map +1 -1
  126. package/dist/esm/data/PrimePaginator.js.map +1 -1
  127. package/dist/esm/data/PrimePickList.js.map +1 -1
  128. package/dist/esm/data/PrimeTimeline.js.map +1 -1
  129. package/dist/esm/data/PrimeTree.js.map +1 -1
  130. package/dist/esm/data/columnDefinitions.js.map +1 -1
  131. package/dist/esm/data/primeTreeNodes.js.map +1 -1
  132. package/dist/esm/data/selectOptions.js.map +1 -1
  133. package/dist/esm/form/PrimeAutoComplete.js.map +1 -1
  134. package/dist/esm/form/PrimeCalendar.js.map +1 -1
  135. package/dist/esm/form/PrimeCheckbox.js.map +1 -1
  136. package/dist/esm/form/PrimeChips.js.map +1 -1
  137. package/dist/esm/form/PrimeColorPicker.js.map +1 -1
  138. package/dist/esm/form/PrimeDropdown.js.map +1 -1
  139. package/dist/esm/form/PrimeFloatLabel.js.map +1 -1
  140. package/dist/esm/form/PrimeIconField.js.map +1 -1
  141. package/dist/esm/form/PrimeInputNumber.js.map +1 -1
  142. package/dist/esm/form/PrimeInputText.js.map +1 -1
  143. package/dist/esm/form/PrimeInputTextarea.js.map +1 -1
  144. package/dist/esm/form/PrimeKnob.js.map +1 -1
  145. package/dist/esm/form/PrimeListBox.js.map +1 -1
  146. package/dist/esm/form/PrimeMultiSelect.js.map +1 -1
  147. package/dist/esm/form/PrimePassword.js.map +1 -1
  148. package/dist/esm/form/PrimeRadioButton.js.map +1 -1
  149. package/dist/esm/form/PrimeRating.js.map +1 -1
  150. package/dist/esm/form/PrimeSelectButton.js.map +1 -1
  151. package/dist/esm/form/PrimeSlider.js.map +1 -1
  152. package/dist/esm/form/PrimeToggleSwitch.js.map +1 -1
  153. package/dist/esm/form/PrimeTreeSelect.js.map +1 -1
  154. package/dist/esm/form/TreeSelect.js.map +1 -1
  155. package/dist/esm/media/Image.js.map +1 -1
  156. package/dist/esm/media/PrimeCarousel.js.map +1 -1
  157. package/dist/esm/media/PrimeGalleria.js.map +1 -1
  158. package/dist/esm/media/PrimeImage.js.map +1 -1
  159. package/dist/esm/menu/Dock.js.map +1 -1
  160. package/dist/esm/menu/DockPosition.js.map +1 -1
  161. package/dist/esm/menu/MegaMenu.js.map +1 -1
  162. package/dist/esm/menu/MenuItemAction.js.map +1 -1
  163. package/dist/esm/menu/MenuItemContent.js.map +1 -1
  164. package/dist/esm/menu/Menubar.js.map +1 -1
  165. package/dist/esm/menu/PanelMenu.js.map +1 -1
  166. package/dist/esm/menu/PrimeBreadcrumb.js.map +1 -1
  167. package/dist/esm/menu/PrimeContextMenu.js.map +1 -1
  168. package/dist/esm/menu/PrimeDock.js.map +1 -1
  169. package/dist/esm/menu/PrimeMegaMenu.js.map +1 -1
  170. package/dist/esm/menu/PrimeMenu.js.map +1 -1
  171. package/dist/esm/menu/PrimeMenubar.js.map +1 -1
  172. package/dist/esm/menu/PrimePanelMenu.js.map +1 -1
  173. package/dist/esm/menu/PrimeSteps.js.map +1 -1
  174. package/dist/esm/menu/PrimeTabMenu.js.map +1 -1
  175. package/dist/esm/menu/PrimeTieredMenu.js.map +1 -1
  176. package/dist/esm/menu/Steps.js.map +1 -1
  177. package/dist/esm/menu/TabMenu.js.map +1 -1
  178. package/dist/esm/menu/TieredMenu.js.map +1 -1
  179. package/dist/esm/menuItems.js.map +1 -1
  180. package/dist/esm/messages/PrimeInlineMessage.js.map +1 -1
  181. package/dist/esm/messages/PrimeMessage.js.map +1 -1
  182. package/dist/esm/messages/PrimeToast.js.map +1 -1
  183. package/dist/esm/misc/BlockUI.js.map +1 -1
  184. package/dist/esm/misc/PrimeAvatar.js.map +1 -1
  185. package/dist/esm/misc/PrimeBadge.js.map +1 -1
  186. package/dist/esm/misc/PrimeBlockUI.js.map +1 -1
  187. package/dist/esm/misc/PrimeChip.js.map +1 -1
  188. package/dist/esm/misc/PrimeInplace.js.map +1 -1
  189. package/dist/esm/misc/PrimeProgressBar.js.map +1 -1
  190. package/dist/esm/misc/PrimeProgressSpinner.js.map +1 -1
  191. package/dist/esm/misc/PrimeScrollTop.js.map +1 -1
  192. package/dist/esm/misc/PrimeSkeleton.js.map +1 -1
  193. package/dist/esm/misc/PrimeTag.js.map +1 -1
  194. package/dist/esm/misc/PrimeTerminal.js.map +1 -1
  195. package/dist/esm/misc/ScrollTop.js.map +1 -1
  196. package/dist/esm/overlay/ConfirmDialog.js.map +1 -1
  197. package/dist/esm/overlay/PrimeConfirmDialog.js.map +1 -1
  198. package/dist/esm/overlay/PrimeDialog.js.map +1 -1
  199. package/dist/esm/overlay/PrimeOverlayPanel.js.map +1 -1
  200. package/dist/esm/overlay/PrimeSidebar.js.map +1 -1
  201. package/dist/esm/overlay/PrimeTooltip.js.map +1 -1
  202. package/dist/esm/panel/PrimeAccordion.js.map +1 -1
  203. package/dist/esm/panel/PrimeCard.js.map +1 -1
  204. package/dist/esm/panel/PrimeDivider.js.map +1 -1
  205. package/dist/esm/panel/PrimeFieldset.js.map +1 -1
  206. package/dist/esm/panel/PrimePanel.js.map +1 -1
  207. package/dist/esm/panel/PrimeScrollPanel.js.map +1 -1
  208. package/dist/esm/panel/PrimeSplitter.js.map +1 -1
  209. package/dist/esm/panel/PrimeStepper.js.map +1 -1
  210. package/dist/esm/panel/PrimeTabView.js.map +1 -1
  211. package/dist/esm/panel/PrimeToolbar.js.map +1 -1
  212. package/dist/esm/primeReactComponents.js.map +1 -1
  213. package/dist/esm/primeReactPackage.js.map +1 -1
  214. package/dist/esm/properties.js.map +1 -1
  215. package/dist/esm/screen/PrimeAction.js.map +1 -1
  216. package/dist/esm/screen/PrimeField.js.map +1 -1
  217. package/dist/esm/screen/PrimeSection.js.map +1 -1
  218. package/dist/esm/screen/PrimeSummary.js.map +1 -1
  219. package/dist/esm/screen/PrimeText.js.map +1 -1
  220. package/dist/esm/screen/PrimeTitle.js.map +1 -1
  221. package/dist/esm/theme/PrimeReactThemeFamily.js.map +1 -1
  222. package/dist/esm/theme/primeReactThemePreset.js.map +1 -1
  223. package/dist/esm/theme/primeReactThemes.js.map +1 -1
  224. package/dist/esm/theme/themePresets.js.map +1 -1
  225. package/dist/esm/theme/usePrimeReactTheme.js.map +1 -1
  226. package/dist/esm/treeNodes.js.map +1 -1
  227. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  228. package/package.json +14 -14
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeCalendar.js","sources":["../../../form/PrimeCalendar.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { DatePicker } from 'primereact/datepicker';\nimport { InputText } from 'primereact/inputtext';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:calendar` component - a date picker, named `DatePicker` by PrimeReact 11.\n *\n * The seed value is parsed from an ISO date string because that is what survives a round trip through a\n * Scene model's JSON properties; an unparseable one leaves the field empty rather than showing\n * \"Invalid Date\".\n *\n * v11's `DatePicker` is a composition, and the grid is the bulk of it: `Calendar` holds a `Header` (the\n * month/year title flanked by the two navigation buttons) and a `Table` whose three `TableBody` views are\n * what makes clicking the title drill from days to months to years. That whole calendar is built once\n * here and then placed one of two ways, which is how `inline` survives a version that has no `inline`\n * prop: either inside a `Panel`, which simply renders where it stands, or behind a `Portal` and a\n * `Positioner`, which anchors it to the field and escapes any clipping ancestor.\n */\nexport function PrimeCalendar({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<Date | undefined>(() => {\n const seed = stringProperty(element, 'value');\n if (seed === undefined) return undefined;\n const parsed = new Date(seed);\n return Number.isNaN(parsed.getTime()) ? undefined : parsed;\n });\n\n const inline = booleanProperty(element, 'inline', false);\n const showTime = booleanProperty(element, 'showTime', false);\n const calendar = (\n <>\n <DatePicker.Calendar>\n <DatePicker.Header>\n <DatePicker.Prev>\n <i className='pi pi-chevron-left' />\n </DatePicker.Prev>\n <DatePicker.Title>\n <DatePicker.SelectMonth />\n <DatePicker.SelectYear />\n <DatePicker.Decade />\n </DatePicker.Title>\n <DatePicker.Next>\n <i className='pi pi-chevron-right' />\n </DatePicker.Next>\n </DatePicker.Header>\n <DatePicker.Table>\n <DatePicker.TableHead />\n <DatePicker.TableBody />\n <DatePicker.TableBody view='month' />\n <DatePicker.TableBody view='year' />\n </DatePicker.Table>\n </DatePicker.Calendar>\n {showTime && <DatePicker.Time />}\n </>\n );\n\n return (\n <DatePicker.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value instanceof Date ? event.value : undefined)}\n dateFormat={stringProperty(element, 'dateFormat')}\n showTime={showTime}\n disabled={booleanProperty(element, 'disabled', false)}>\n {inline ? (\n <DatePicker.Panel>{calendar}</DatePicker.Panel>\n ) : (\n <>\n <DatePicker.Input as={InputText} placeholder={stringProperty(element, 'placeholder')} />\n {booleanProperty(element, 'showIcon', true) && (\n <DatePicker.Trigger>\n <i className='pi pi-calendar' />\n </DatePicker.Trigger>\n )}\n <DatePicker.Portal>\n <DatePicker.Positioner align='start'>\n <DatePicker.Popup>{calendar}</DatePicker.Popup>\n </DatePicker.Positioner>\n </DatePicker.Portal>\n </>\n )}\n </DatePicker.Root>\n );\n}\n"],"names":["PrimeCalendar","element","value","setValue","useState","seed","stringProperty","undefined","parsed","Date","Number","isNaN","getTime","inline","booleanProperty","showTime","calendar","_jsxs","_Fragment","DatePicker","Calendar","Header","_jsx","Prev","i","className","Title","SelectMonth","SelectYear","Decade","Next","Table","TableHead","TableBody","view","Time","Root","data-scene-id","id","onValueChange","event","dateFormat","disabled","Panel","Input","as","InputText","placeholder","Trigger","Portal","Positioner","align","Popup"],"mappings":";;;;;;;;AASA;;;;;;;;;;;;;AAaC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAA2B,IAAA;QACjD,MAAMC,IAAAA,GAAOC,0BAAeL,OAAAA,EAAS,OAAA,CAAA;QACrC,IAAII,IAAAA,KAASE,WAAW,OAAOA,SAAAA;QAC/B,MAAMC,MAAAA,GAAS,IAAI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/PrimeCalendar.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { DatePicker } from 'primereact/datepicker';\nimport { InputText } from 'primereact/inputtext';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:calendar` component - a date picker, named `DatePicker` by PrimeReact 11.\n *\n * The seed value is parsed from an ISO date string because that is what survives a round trip through a\n * Scene model's JSON properties; an unparseable one leaves the field empty rather than showing\n * \"Invalid Date\".\n *\n * v11's `DatePicker` is a composition, and the grid is the bulk of it: `Calendar` holds a `Header` (the\n * month/year title flanked by the two navigation buttons) and a `Table` whose three `TableBody` views are\n * what makes clicking the title drill from days to months to years. That whole calendar is built once\n * here and then placed one of two ways, which is how `inline` survives a version that has no `inline`\n * prop: either inside a `Panel`, which simply renders where it stands, or behind a `Portal` and a\n * `Positioner`, which anchors it to the field and escapes any clipping ancestor.\n */\nexport function PrimeCalendar({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<Date | undefined>(() => {\n const seed = stringProperty(element, 'value');\n if (seed === undefined) return undefined;\n const parsed = new Date(seed);\n return Number.isNaN(parsed.getTime()) ? undefined : parsed;\n });\n\n const inline = booleanProperty(element, 'inline', false);\n const showTime = booleanProperty(element, 'showTime', false);\n const calendar = (\n <>\n <DatePicker.Calendar>\n <DatePicker.Header>\n <DatePicker.Prev>\n <i className='pi pi-chevron-left' />\n </DatePicker.Prev>\n <DatePicker.Title>\n <DatePicker.SelectMonth />\n <DatePicker.SelectYear />\n <DatePicker.Decade />\n </DatePicker.Title>\n <DatePicker.Next>\n <i className='pi pi-chevron-right' />\n </DatePicker.Next>\n </DatePicker.Header>\n <DatePicker.Table>\n <DatePicker.TableHead />\n <DatePicker.TableBody />\n <DatePicker.TableBody view='month' />\n <DatePicker.TableBody view='year' />\n </DatePicker.Table>\n </DatePicker.Calendar>\n {showTime && <DatePicker.Time />}\n </>\n );\n\n return (\n <DatePicker.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value instanceof Date ? event.value : undefined)}\n dateFormat={stringProperty(element, 'dateFormat')}\n showTime={showTime}\n disabled={booleanProperty(element, 'disabled', false)}>\n {inline ? (\n <DatePicker.Panel>{calendar}</DatePicker.Panel>\n ) : (\n <>\n <DatePicker.Input as={InputText} placeholder={stringProperty(element, 'placeholder')} />\n {booleanProperty(element, 'showIcon', true) && (\n <DatePicker.Trigger>\n <i className='pi pi-calendar' />\n </DatePicker.Trigger>\n )}\n <DatePicker.Portal>\n <DatePicker.Positioner align='start'>\n <DatePicker.Popup>{calendar}</DatePicker.Popup>\n </DatePicker.Positioner>\n </DatePicker.Portal>\n </>\n )}\n </DatePicker.Root>\n );\n}\n"],"names":["PrimeCalendar","element","value","setValue","useState","seed","stringProperty","undefined","parsed","Date","Number","isNaN","getTime","inline","booleanProperty","showTime","calendar","_jsxs","_Fragment","DatePicker","Calendar","Header","_jsx","Prev","i","className","Title","SelectMonth","SelectYear","Decade","Next","Table","TableHead","TableBody","view","Time","Root","data-scene-id","id","onValueChange","event","dateFormat","disabled","Panel","Input","as","InputText","placeholder","Trigger","Portal","Positioner","align","Popup"],"mappings":";;;;;;;;AASA;;;;;;;;;;;;;AAaC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAA2B,IAAA;QACjD,MAAMC,IAAAA,GAAOC,0BAAeL,OAAAA,EAAS,OAAA,CAAA;QACrC,IAAII,IAAAA,KAASE,WAAW,OAAOA,SAAAA;QAC/B,MAAMC,MAAAA,GAAS,IAAIC,IAAAA,CAAKJ,IAAAA,CAAAA;AACxB,QAAA,OAAOK,OAAOC,KAAK,CAACH,MAAAA,CAAOI,OAAO,MAAML,SAAAA,GAAYC,MAAAA;AACxD,IAAA,CAAA,CAAA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AAA,eAAAA,EAAepC,QAAQqC,EAAE;QACzBpC,KAAAA,EAAOA,KAAAA;QACPqC,aAAAA,EAAe,CAACC,QAAUrC,QAAAA,CAASqC,KAAAA,CAAMtC,KAAK,YAAYO,IAAAA,GAAO+B,KAAAA,CAAMtC,KAAK,GAAGK,SAAAA,CAAAA;AAC/EkC,QAAAA,UAAAA,EAAYnC,0BAAeL,OAAAA,EAAS,YAAA,CAAA;QACpCc,QAAAA,EAAUA,QAAAA;QACV2B,QAAAA,EAAU5B,0BAAAA,CAAgBb,SAAS,UAAA,EAAY,KAAA,CAAA;kBAC9CY,MAAAA,iBACGS,cAAA,CAACH,sBAAWwB,KAAK,EAAA;AAAE3B,YAAAA,QAAAA,EAAAA;AAEnB,SAAA,CAAA,iBAAAC,eAAA,CAAAC,mBAAA,EAAA;;AACI,8BAAAI,cAAA,CAACH,sBAAWyB,KAAK,EAAA;oBAACC,EAAAA,EAAIC,mBAAAA;AAAWC,oBAAAA,WAAAA,EAAazC,0BAAeL,OAAAA,EAAS,aAAA;;AACrEa,gBAAAA,0BAAAA,CAAgBb,OAAAA,EAAS,UAAA,EAAY,IAAA,CAAA,kBAClCqB,cAAA,CAACH,sBAAW6B,OAAO,EAAA;AACf,oBAAA,QAAA,gBAAA1B,cAAA,CAACE,GAAAA,EAAAA;wBAAEC,SAAAA,EAAU;;;AAGrB,8BAAAH,cAAA,CAACH,sBAAW8B,MAAM,EAAA;4CACd3B,cAAA,CAACH,sBAAW+B,UAAU,EAAA;wBAACC,KAAAA,EAAM,OAAA;gDACzB7B,cAAA,CAACH,sBAAWiC,KAAK,EAAA;AAAEpC,4BAAAA,QAAAA,EAAAA;;;;;;;AAO/C;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeCheckbox.js","sources":["../../../form/PrimeCheckbox.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Checkbox } from 'primereact/checkbox';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:checkbox` component.\n *\n * Rendered with its label rather than bare: an unlabeled checkbox has no accessible name and nothing to\n * click but a 20-pixel box, which is a defect in every screen that would ever use one.\n *\n * PrimeReact 11 makes the tick its own part: `Root` renders the real (visually hidden) input and owns the\n * state, `Box` is the square, and `Indicator` is what appears inside it when checked. The `checked` state\n * now arrives as `onCheckedChange` with a boolean rather than a change event whose `checked` might be\n * `undefined`, so the defensive `=== true` the v10 adapter needed is gone.\n */\nexport function PrimeCheckbox({ element }: RegisteredComponentProps) {\n const [checked, setChecked] = useState(booleanProperty(element, 'checked', false));\n const label = stringProperty(element, 'label');\n return (\n <div data-scene-id={element.id} className='flex items-center gap-2'>\n <Checkbox.Root\n inputId={element.id}\n checked={checked}\n onCheckedChange={(event) => setChecked(event.checked)}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Checkbox.Box>\n <Checkbox.Indicator />\n </Checkbox.Box>\n </Checkbox.Root>\n {label !== undefined && <label htmlFor={element.id}>{label}</label>}\n </div>\n );\n}\n"],"names":["PrimeCheckbox","element","checked","setChecked","useState","booleanProperty","label","stringProperty","_jsxs","div","data-scene-id","id","className","_jsx","Checkbox","Root","inputId","onCheckedChange","event","disabled","Box","Indicator","undefined","htmlFor"],"mappings":";;;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,OAAAA,EAASC,UAAAA,CAAW,GAAGC,cAAAA,CAASC,0BAAAA,CAAgBJ,SAAS,SAAA,EAAW,KAAA,CAAA,CAAA;IAC3E,MAAMK,KAAAA,GAAQC,0BAAeN,OAAAA,EAAS,OAAA,CAAA;AACtC,IAAA,qBACIO,eAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeT,QAAQU,EAAE;QAAEC,SAAAA,EAAU,yBAAA;;AACtC,0BAAAC,cAAA,CAACC,kBAASC,IAAI,EAAA;AACVC,gBAAAA,OAAAA,EAASf,QAAQU,EAAE;gBACnBT,OAAAA,EAASA,OAAAA;AACTe,gBAAAA,eAAAA,EAAiB,CAACC,KAAAA,GAAUf,UAAAA,CAAWe,KAAAA,CAAMhB,OAAO,CAAA;gBACpDiB,QAAAA,EAAUd,0BAAAA,CAAgBJ,SAAS,UAAA,EAAY,KAAA,CAAA;wCAC/CY,cAAA,CAACC,kBAASM,GAAG,EAAA;4CACTP,cAAA,CAACC,kBAASO,SAAS,EAAA,EAAA;;;AAG1Bf,YAAAA,KAAAA,KAAUgB,2BAAaT,cAAA,CAACP,OAAAA,EAAAA;AAAMiB,gBAAAA,OAAAA,EAAStB,QAAQU,EAAE;AAAGL,gBAAAA,QAAAA,EAAAA;;;;AAGjE;;;;"}
1
+ {"version":3,"file":"PrimeCheckbox.js","sources":["../../../form/PrimeCheckbox.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Checkbox } from 'primereact/checkbox';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:checkbox` component.\n *\n * Rendered with its label rather than bare: an unlabeled checkbox has no accessible name and nothing to\n * click but a 20-pixel box, which is a defect in every screen that would ever use one.\n *\n * PrimeReact 11 makes the tick its own part: `Root` renders the real (visually hidden) input and owns the\n * state, `Box` is the square, and `Indicator` is what appears inside it when checked. The `checked` state\n * now arrives as `onCheckedChange` with a boolean rather than a change event whose `checked` might be\n * `undefined`, so the defensive `=== true` the v10 adapter needed is gone.\n */\nexport function PrimeCheckbox({ element }: RegisteredComponentProps) {\n const [checked, setChecked] = useState(booleanProperty(element, 'checked', false));\n const label = stringProperty(element, 'label');\n return (\n <div data-scene-id={element.id} className='flex items-center gap-2'>\n <Checkbox.Root\n inputId={element.id}\n checked={checked}\n onCheckedChange={(event) => setChecked(event.checked)}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Checkbox.Box>\n <Checkbox.Indicator />\n </Checkbox.Box>\n </Checkbox.Root>\n {label !== undefined && <label htmlFor={element.id}>{label}</label>}\n </div>\n );\n}\n"],"names":["PrimeCheckbox","element","checked","setChecked","useState","booleanProperty","label","stringProperty","_jsxs","div","data-scene-id","id","className","_jsx","Checkbox","Root","inputId","onCheckedChange","event","disabled","Box","Indicator","undefined","htmlFor"],"mappings":";;;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,OAAAA,EAASC,UAAAA,CAAW,GAAGC,cAAAA,CAASC,0BAAAA,CAAgBJ,SAAS,SAAA,EAAW,KAAA,CAAA,CAAA;IAC3E,MAAMK,KAAAA,GAAQC,0BAAeN,OAAAA,EAAS,OAAA,CAAA;AACtC,IAAA,qBACIO,eAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeT,QAAQU,EAAE;QAAEC,SAAAA,EAAU,yBAAA;;AACtC,0BAAAC,cAAA,CAACC,kBAASC,IAAI,EAAA;AACVC,gBAAAA,OAAAA,EAASf,QAAQU,EAAE;gBACnBT,OAAAA,EAASA,OAAAA;AACTe,gBAAAA,eAAAA,EAAiB,CAACC,KAAAA,GAAUf,UAAAA,CAAWe,KAAAA,CAAMhB,OAAO,CAAA;gBACpDiB,QAAAA,EAAUd,0BAAAA,CAAgBJ,SAAS,UAAA,EAAY,KAAA,CAAA;wCAC/CY,cAAA,CAACC,kBAASM,GAAG,EAAA;4CACTP,cAAA,CAACC,kBAASO,SAAS,EAAA,EAAA;;;AAG1Bf,YAAAA,KAAAA,KAAUgB,2BAAaT,cAAA,CAACP,OAAAA,EAAAA;AAAMiB,gBAAAA,OAAAA,EAAStB,QAAQU,EAAE;AAAGL,gBAAAA,QAAAA,EAAAA;;;;AAGjE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeChips.js","sources":["../../../form/PrimeChips.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { InputTags } from 'primereact/inputtags';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, stringArrayProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:chips` component - free-form entry of a list of short values, each shown as a chip.\n * PrimeReact 11 calls it `InputTags`.\n *\n * The chips and the text field are both render-prop slots in v11 rather than markup the component\n * chooses, which is why this file draws a chip and its remove button by hand: `Items` hands over one tag\n * at a time along with the props that make it removable, and `Control` hands over the props for the\n * input. It is more code than the v10 one-liner and it is the reason the chip is stylable at all.\n *\n * A tag is committed per Enter, and pasted text arrives as one tag rather than being split. That is v11's\n * default and the adapter keeps it: v10's `separator` property is not read, because splitting on a\n * character is a data-entry policy that belongs to the screen collecting the data, not to a preview of it.\n */\nexport function PrimeChips({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<string[]>(stringArrayProperty(element, 'value'));\n return (\n <InputTags.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value ?? [])}\n max={numberProperty(element, 'max')}\n disabled={booleanProperty(element, 'disabled', false)}>\n <InputTags.Items>\n {({ item, index, remove, itemProps }) => (\n <span {...itemProps} key={`${item}-${index}`}>\n <span>{item}</span>\n <button type='button' aria-label={`Remove ${item}`} onClick={remove}>\n <i className='pi pi-times-circle' />\n </button>\n </span>\n )}\n </InputTags.Items>\n <InputTags.Control>\n {({ controlProps }) => <input {...controlProps} placeholder={stringProperty(element, 'placeholder')} />}\n </InputTags.Control>\n </InputTags.Root>\n );\n}\n"],"names":["PrimeChips","element","value","setValue","useState","stringArrayProperty","_jsxs","InputTags","Root","data-scene-id","id","onValueChange","event","max","numberProperty","disabled","booleanProperty","_jsx","Items","item","index","remove","itemProps","_createElement","span","key","button","type","aria-label","onClick","i","className","Control","controlProps","input","placeholder","stringProperty"],"mappings":";;;;;;;AAQA;;;;;;;;;;;;AAYC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAA4B,EAAA;AAC5D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAAmBC,+BAAoBJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IAC1E,qBACIK,eAAA,CAACC,oBAAUC,IAAI,EAAA;AACXC,QAAAA,eAAAA,EAAeR,QAAQS,EAAE;QACzBR,KAAAA,EAAOA,KAAAA;AACPS,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUT,QAAAA,CAASS,KAAAA,CAAMV,KAAK,IAAI,EAAE,CAAA;AACpDW,QAAAA,GAAAA,EAAKC,0BAAeb,OAAAA,EAAS,KAAA,CAAA;QAC7Bc,QAAAA,EAAUC,0BAAAA,CAAgBf,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,0BAAAgB,cAAA,CAACV,oBAAUW,KAAK,EAAA;0BACX,CAAC,EAAEC,IAAI,EAAEC,KAAK,EAAEC,MAAM,EAAEC,SAAS,EAAE,iBAChCC,mBAAA,CAACC,MAAAA,EAAAA;AAAM,wBAAA,GAAGF,SAAS;AAAEG,wBAAAA,GAAAA,EAAK,CAAA,EAAGN,IAAAA,CAAK,CAAC,EAAEC,KAAAA,CAAAA,CAAO;;0CACxCH,cAAA,CAACO,MAAAA,EAAAA;AAAML,gCAAAA,QAAAA,EAAAA;;0CACPF,cAAA,CAACS,QAAAA,EAAAA;gCAAOC,IAAAA,EAAK,QAAA;gCAASC,YAAAA,EAAY,CAAC,OAAO,EAAET,IAAAA,CAAAA,CAAM;gCAAEU,OAAAA,EAASR,MAAAA;AACzD,gCAAA,QAAA,gBAAAJ,cAAA,CAACa,GAAAA,EAAAA;oCAAEC,SAAAA,EAAU;;;;;;AAK7B,0BAAAd,cAAA,CAACV,oBAAUyB,OAAO,EAAA;AACb,gBAAA,QAAA,EAAA,CAAC,EAAEC,YAAY,EAAE,iBAAKhB,cAAA,CAACiB,OAAAA,EAAAA;AAAO,wBAAA,GAAGD,YAAY;AAAEE,wBAAAA,WAAAA,EAAaC,0BAAenC,OAAAA,EAAS,aAAA;;;;;AAIrG;;;;"}
1
+ {"version":3,"file":"PrimeChips.js","sources":["../../../form/PrimeChips.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { InputTags } from 'primereact/inputtags';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, stringArrayProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:chips` component - free-form entry of a list of short values, each shown as a chip.\n * PrimeReact 11 calls it `InputTags`.\n *\n * The chips and the text field are both render-prop slots in v11 rather than markup the component\n * chooses, which is why this file draws a chip and its remove button by hand: `Items` hands over one tag\n * at a time along with the props that make it removable, and `Control` hands over the props for the\n * input. It is more code than the v10 one-liner and it is the reason the chip is stylable at all.\n *\n * A tag is committed per Enter, and pasted text arrives as one tag rather than being split. That is v11's\n * default and the adapter keeps it: v10's `separator` property is not read, because splitting on a\n * character is a data-entry policy that belongs to the screen collecting the data, not to a preview of it.\n */\nexport function PrimeChips({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<string[]>(stringArrayProperty(element, 'value'));\n return (\n <InputTags.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value ?? [])}\n max={numberProperty(element, 'max')}\n disabled={booleanProperty(element, 'disabled', false)}>\n <InputTags.Items>\n {({ item, index, remove, itemProps }) => (\n <span {...itemProps} key={`${item}-${index}`}>\n <span>{item}</span>\n <button type='button' aria-label={`Remove ${item}`} onClick={remove}>\n <i className='pi pi-times-circle' />\n </button>\n </span>\n )}\n </InputTags.Items>\n <InputTags.Control>\n {({ controlProps }) => <input {...controlProps} placeholder={stringProperty(element, 'placeholder')} />}\n </InputTags.Control>\n </InputTags.Root>\n );\n}\n"],"names":["PrimeChips","element","value","setValue","useState","stringArrayProperty","_jsxs","InputTags","Root","data-scene-id","id","onValueChange","event","max","numberProperty","disabled","booleanProperty","_jsx","Items","item","index","remove","itemProps","_createElement","span","key","button","type","aria-label","onClick","i","className","Control","controlProps","input","placeholder","stringProperty"],"mappings":";;;;;;;AAQA;;;;;;;;;;;;AAYC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAA4B,EAAA;AAC5D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAAmBC,+BAAoBJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IAC1E,qBACIK,eAAA,CAACC,oBAAUC,IAAI,EAAA;AACXC,QAAAA,eAAAA,EAAeR,QAAQS,EAAE;QACzBR,KAAAA,EAAOA,KAAAA;AACPS,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUT,QAAAA,CAASS,KAAAA,CAAMV,KAAK,IAAI,EAAE,CAAA;AACpDW,QAAAA,GAAAA,EAAKC,0BAAeb,OAAAA,EAAS,KAAA,CAAA;QAC7Bc,QAAAA,EAAUC,0BAAAA,CAAgBf,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,0BAAAgB,cAAA,CAACV,oBAAUW,KAAK,EAAA;0BACX,CAAC,EAAEC,IAAI,EAAEC,KAAK,EAAEC,MAAM,EAAEC,SAAS,EAAE,iBAChCC,mBAAA,CAACC,MAAAA,EAAAA;AAAM,wBAAA,GAAGF,SAAS;AAAEG,wBAAAA,GAAAA,EAAK,CAAA,EAAGN,IAAAA,CAAK,CAAC,EAAEC,KAAAA,CAAAA,CAAO;;0CACxCH,cAAA,CAACO,MAAAA,EAAAA;AAAML,gCAAAA,QAAAA,EAAAA;;0CACPF,cAAA,CAACS,QAAAA,EAAAA;gCAAOC,IAAAA,EAAK,QAAA;gCAASC,YAAAA,EAAY,CAAC,OAAO,EAAET,IAAAA,CAAAA,CAAM;gCAAEU,OAAAA,EAASR,MAAAA;AACzD,gCAAA,QAAA,gBAAAJ,cAAA,CAACa,GAAAA,EAAAA;oCAAEC,SAAAA,EAAU;;;;;;AAK7B,0BAAAd,cAAA,CAACV,oBAAUyB,OAAO,EAAA;AACb,gBAAA,QAAA,EAAA,CAAC,EAAEC,YAAY,EAAE,iBAAKhB,cAAA,CAACiB,OAAAA,EAAAA;AAAO,wBAAA,GAAGD,YAAY;AAAEE,wBAAAA,WAAAA,EAAaC,0BAAenC,OAAAA,EAAS,aAAA;;;;;AAIrG;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeColorPicker.js","sources":["../../../form/PrimeColorPicker.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { InputColor, parseColor } from 'primereact/inputcolor';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The color an unauthored - or unparseable - picker falls back to, so an element with no `value` and an\n * element with a broken one look alike rather than one of them looking broken.\n */\nconst fallbackColor = '6366f1';\n\n/**\n * Parses a hex string with no leading `#` into the color object PrimeReact 11 works in.\n *\n * A Scene element's properties are authored, not validated: `value: 'red'` or a half-typed hex is an\n * ordinary state on a screen under construction, and `parseColor` throws on both. Swallowing that here\n * renders a picker the author can immediately correct instead of taking the surrounding screen down -\n * and it lives in a function rather than inline because a `try` inside JSX would force the whole\n * composition into a statement body for one expression's sake.\n *\n * @param hex The authored hex digits, without a leading `#`.\n * @returns The parsed color, or {@link fallbackColor} when the string is not a color.\n */\nfunction toColor(hex: string) {\n try {\n return parseColor(`#${hex}`);\n } catch {\n return parseColor(`#${fallbackColor}`);\n }\n}\n\n/**\n * The `PrimeReact:colorPicker` component, named `InputColor` by PrimeReact 11.\n *\n * The value is kept as a hex string without the leading `#`, which is what a Scene model round-trips\n * cleanly and what the v10 component expected; a screen writing `#6366f1` therefore still works. v11\n * models its value as a parsed color object rather than a string, so this adapter is the translation\n * layer - {@link toColor} on the way in, `toString('hex')` on the way out - and the authored property\n * keeps the shape it always had.\n *\n * v10's `inline` property is not read. It chose between a swatch that opened a panel and the panel shown\n * in place; v11's `InputColor` is only ever the panel - saturation area, hue slider and swatch, with no\n * overlay mode to switch to - so there is no longer a choice to express.\n */\nexport function PrimeColorPicker({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', fallbackColor).replace('#', ''));\n return (\n <div data-scene-id={element.id}>\n <InputColor.Root\n value={toColor(value)}\n onValueChange={(event) => setValue(event.value.toString('hex').replace('#', ''))}\n disabled={booleanProperty(element, 'disabled', false)}>\n <InputColor.Area>\n <InputColor.AreaBackground />\n <InputColor.AreaHandle />\n </InputColor.Area>\n <InputColor.Slider>\n <InputColor.SliderTrack />\n <InputColor.SliderHandle />\n </InputColor.Slider>\n <InputColor.Swatch>\n <InputColor.SwatchBackground />\n </InputColor.Swatch>\n </InputColor.Root>\n </div>\n );\n}\n"],"names":["fallbackColor","toColor","hex","parseColor","PrimeColorPicker","element","value","setValue","useState","stringProperty","replace","_jsx","div","data-scene-id","id","_jsxs","InputColor","Root","onValueChange","event","toString","disabled","booleanProperty","Area","AreaBackground","AreaHandle","Slider","SliderTrack","SliderHandle","Swatch","SwatchBackground"],"mappings":";;;;;;;AAQA;;;AAGC,IACD,MAAMA,aAAAA,GAAgB,QAAA;AAEtB;;;;;;;;;;;IAYA,SAASC,QAAQC,GAAW,EAAA;IACxB,IAAI;AACA,QAAA,OAAOC,qBAAAA,CAAW,CAAC,CAAC,EAAED,GAAAA,CAAAA,CAAK,CAAA;AAC/B,IAAA,CAAA,CAAE,OAAM;AACJ,QAAA,OAAOC,qBAAAA,CAAW,CAAC,CAAC,EAAEH,aAAAA,CAAAA,CAAe,CAAA;AACzC,IAAA;AACJ;AAEA;;;;;;;;;;;;AAYC,IACM,SAASI,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;IAClE,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAASC,yBAAAA,CAAeJ,OAAAA,EAAS,OAAA,EAASL,aAAAA,CAAAA,CAAeU,OAAO,CAAC,GAAA,EAAK,EAAA,CAAA,CAAA;AAChG,IAAA,qBACIC,cAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeR,QAAQS,EAAE;gCAC1BC,eAAA,CAACC,sBAAWC,IAAI,EAAA;AACZX,YAAAA,KAAAA,EAAOL,OAAAA,CAAQK,KAAAA,CAAAA;YACfY,aAAAA,EAAe,CAACC,KAAAA,GAAUZ,QAAAA,CAASY,KAAAA,CAAMb,KAAK,CAACc,QAAQ,CAAC,KAAA,CAAA,CAAOV,OAAO,CAAC,GAAA,EAAK,EAAA,CAAA,CAAA;YAC5EW,QAAAA,EAAUC,0BAAAA,CAAgBjB,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,8BAAAU,eAAA,CAACC,sBAAWO,IAAI,EAAA;;AACZ,sCAAAZ,cAAA,CAACK,sBAAWQ,cAAc,EAAA,EAAA,CAAA;AAC1B,sCAAAb,cAAA,CAACK,sBAAWS,UAAU,EAAA,EAAA;;;AAE1B,8BAAAV,eAAA,CAACC,sBAAWU,MAAM,EAAA;;AACd,sCAAAf,cAAA,CAACK,sBAAWW,WAAW,EAAA,EAAA,CAAA;AACvB,sCAAAhB,cAAA,CAACK,sBAAWY,YAAY,EAAA,EAAA;;;AAE5B,8BAAAjB,cAAA,CAACK,sBAAWa,MAAM,EAAA;4CACdlB,cAAA,CAACK,sBAAWc,gBAAgB,EAAA,EAAA;;;;;AAKhD;;;;"}
1
+ {"version":3,"file":"PrimeColorPicker.js","sources":["../../../form/PrimeColorPicker.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { InputColor, parseColor } from 'primereact/inputcolor';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The color an unauthored - or unparseable - picker falls back to, so an element with no `value` and an\n * element with a broken one look alike rather than one of them looking broken.\n */\nconst fallbackColor = '6366f1';\n\n/**\n * Parses a hex string with no leading `#` into the color object PrimeReact 11 works in.\n *\n * A Scene element's properties are authored, not validated: `value: 'red'` or a half-typed hex is an\n * ordinary state on a screen under construction, and `parseColor` throws on both. Swallowing that here\n * renders a picker the author can immediately correct instead of taking the surrounding screen down -\n * and it lives in a function rather than inline because a `try` inside JSX would force the whole\n * composition into a statement body for one expression's sake.\n *\n * @param hex The authored hex digits, without a leading `#`.\n * @returns The parsed color, or {@link fallbackColor} when the string is not a color.\n */\nfunction toColor(hex: string) {\n try {\n return parseColor(`#${hex}`);\n } catch {\n return parseColor(`#${fallbackColor}`);\n }\n}\n\n/**\n * The `PrimeReact:colorPicker` component, named `InputColor` by PrimeReact 11.\n *\n * The value is kept as a hex string without the leading `#`, which is what a Scene model round-trips\n * cleanly and what the v10 component expected; a screen writing `#6366f1` therefore still works. v11\n * models its value as a parsed color object rather than a string, so this adapter is the translation\n * layer - {@link toColor} on the way in, `toString('hex')` on the way out - and the authored property\n * keeps the shape it always had.\n *\n * v10's `inline` property is not read. It chose between a swatch that opened a panel and the panel shown\n * in place; v11's `InputColor` is only ever the panel - saturation area, hue slider and swatch, with no\n * overlay mode to switch to - so there is no longer a choice to express.\n */\nexport function PrimeColorPicker({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', fallbackColor).replace('#', ''));\n return (\n <div data-scene-id={element.id}>\n <InputColor.Root\n value={toColor(value)}\n onValueChange={(event) => setValue(event.value.toString('hex').replace('#', ''))}\n disabled={booleanProperty(element, 'disabled', false)}>\n <InputColor.Area>\n <InputColor.AreaBackground />\n <InputColor.AreaHandle />\n </InputColor.Area>\n <InputColor.Slider>\n <InputColor.SliderTrack />\n <InputColor.SliderHandle />\n </InputColor.Slider>\n <InputColor.Swatch>\n <InputColor.SwatchBackground />\n </InputColor.Swatch>\n </InputColor.Root>\n </div>\n );\n}\n"],"names":["fallbackColor","toColor","hex","parseColor","PrimeColorPicker","element","value","setValue","useState","stringProperty","replace","_jsx","div","data-scene-id","id","_jsxs","InputColor","Root","onValueChange","event","toString","disabled","booleanProperty","Area","AreaBackground","AreaHandle","Slider","SliderTrack","SliderHandle","Swatch","SwatchBackground"],"mappings":";;;;;;;AAQA;;;AAGC,IACD,MAAMA,aAAAA,GAAgB,QAAA;AAEtB;;;;;;;;;;;IAYA,SAASC,QAAQC,GAAW,EAAA;IACxB,IAAI;AACA,QAAA,OAAOC,qBAAAA,CAAW,CAAC,CAAC,EAAED,GAAAA,CAAAA,CAAK,CAAA;AAC/B,IAAA,CAAA,CAAE,OAAM;AACJ,QAAA,OAAOC,qBAAAA,CAAW,CAAC,CAAC,EAAEH,aAAAA,CAAAA,CAAe,CAAA;AACzC,IAAA;AACJ;AAEA;;;;;;;;;;;;AAYC,IACM,SAASI,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;IAClE,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAASC,yBAAAA,CAAeJ,OAAAA,EAAS,OAAA,EAASL,aAAAA,CAAAA,CAAeU,OAAO,CAAC,GAAA,EAAK,EAAA,CAAA,CAAA;AAChG,IAAA,qBACIC,cAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeR,QAAQS,EAAE;gCAC1BC,eAAA,CAACC,sBAAWC,IAAI,EAAA;AACZX,YAAAA,KAAAA,EAAOL,OAAAA,CAAQK,KAAAA,CAAAA;YACfY,aAAAA,EAAe,CAACC,KAAAA,GAAUZ,QAAAA,CAASY,KAAAA,CAAMb,KAAK,CAACc,QAAQ,CAAC,KAAA,CAAA,CAAOV,OAAO,CAAC,GAAA,EAAK,EAAA,CAAA,CAAA;YAC5EW,QAAAA,EAAUC,0BAAAA,CAAgBjB,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,8BAAAU,eAAA,CAACC,sBAAWO,IAAI,EAAA;;AACZ,sCAAAZ,cAAA,CAACK,sBAAWQ,cAAc,EAAA,EAAA,CAAA;AAC1B,sCAAAb,cAAA,CAACK,sBAAWS,UAAU,EAAA,EAAA;;;AAE1B,8BAAAV,eAAA,CAACC,sBAAWU,MAAM,EAAA;;AACd,sCAAAf,cAAA,CAACK,sBAAWW,WAAW,EAAA,EAAA,CAAA;AACvB,sCAAAhB,cAAA,CAACK,sBAAWY,YAAY,EAAA,EAAA;;;AAE5B,8BAAAjB,cAAA,CAACK,sBAAWa,MAAM,EAAA;4CACdlB,cAAA,CAACK,sBAAWc,gBAAgB,EAAA,EAAA;;;;;AAKhD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeDropdown.js","sources":["../../../form/PrimeDropdown.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Select } from 'primereact/select';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, optionsProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:dropdown` component - a single-choice select.\n *\n * Options are normalized by `optionsProperty`, so a screen may write either bare strings or\n * `{ label, value }` records and get the same result.\n *\n * PrimeReact calls this `Select`, and it is a composition rather than one component: `Root` owns the\n * value and the option model, `Trigger` is what the user clicks, and the list lives behind a `Portal` so\n * it escapes any clipping ancestor. `Select.List` renders `options` itself - there is no option mapping\n * here, and adding one would only duplicate what `optionLabel` / `optionValue` already say. The `appendTo`\n * and z-index juggling a dropdown inside a dialog used to need is gone with it: the portal stacks\n * correctly on its own.\n */\nexport function PrimeDropdown({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<unknown>(stringProperty(element, 'value'));\n const placeholder = stringProperty(element, 'placeholder', 'Select');\n const filter = booleanProperty(element, 'filter', false);\n const showClear = booleanProperty(element, 'showClear', false);\n return (\n <Select.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value)}\n options={optionsProperty(element, 'options')}\n optionLabel='label'\n optionValue='value'\n filter={filter}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Select.Trigger>\n <Select.Value placeholder={placeholder} />\n {showClear && <Select.Clear />}\n <Select.Arrow />\n </Select.Trigger>\n <Select.Portal>\n <Select.Positioner>\n <Select.Popup>\n {filter && <Select.Filter placeholder={placeholder} />}\n <Select.List />\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n );\n}\n"],"names":["PrimeDropdown","element","value","setValue","useState","stringProperty","placeholder","filter","booleanProperty","showClear","_jsxs","Select","Root","data-scene-id","id","onValueChange","event","options","optionsProperty","optionLabel","optionValue","disabled","Trigger","_jsx","Value","Clear","Arrow","Portal","Positioner","Popup","Filter","List"],"mappings":";;;;;;;AAQA;;;;;;;;;;;;AAYC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAAkBC,0BAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IACpE,MAAMK,WAAAA,GAAcD,yBAAAA,CAAeJ,OAAAA,EAAS,aAAA,EAAe,QAAA,CAAA;IAC3D,MAAMM,MAAAA,GAASC,0BAAAA,CAAgBP,OAAAA,EAAS,QAAA,EAAU,KAAA,CAAA;IAClD,MAAMQ,SAAAA,GAAYD,0BAAAA,CAAgBP,OAAAA,EAAS,WAAA,EAAa,KAAA,CAAA;IACxD,qBACIS,eAAA,CAACC,cAAOC,IAAI,EAAA;AACRC,QAAAA,eAAAA,EAAeZ,QAAQa,EAAE;QACzBZ,KAAAA,EAAOA,KAAAA;AACPa,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUb,QAAAA,CAASa,KAAAA,CAAMd,KAAK,CAAA;AAC9Ce,QAAAA,OAAAA,EAASC,2BAAgBjB,OAAAA,EAAS,SAAA,CAAA;QAClCkB,WAAAA,EAAY,OAAA;QACZC,WAAAA,EAAY,OAAA;QACZb,MAAAA,EAAQA,MAAAA;QACRc,QAAAA,EAAUb,0BAAAA,CAAgBP,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,0BAAAS,eAAA,CAACC,cAAOW,OAAO,EAAA;;AACX,kCAAAC,cAAA,CAACZ,cAAOa,KAAK,EAAA;wBAAClB,WAAAA,EAAaA;;oBAC1BG,SAAAA,kBAAac,cAAA,CAACZ,cAAOc,KAAK,EAAA,EAAA,CAAA;AAC3B,kCAAAF,cAAA,CAACZ,cAAOe,KAAK,EAAA,EAAA;;;AAEjB,0BAAAH,cAAA,CAACZ,cAAOgB,MAAM,EAAA;wCACVJ,cAAA,CAACZ,cAAOiB,UAAU,EAAA;4CACdlB,eAAA,CAACC,cAAOkB,KAAK,EAAA;;4BACRtB,MAAAA,kBAAUgB,cAAA,CAACZ,cAAOmB,MAAM,EAAA;gCAACxB,WAAAA,EAAaA;;AACvC,0CAAAiB,cAAA,CAACZ,cAAOoB,IAAI,EAAA,EAAA;;;;;;;AAMpC;;;;"}
1
+ {"version":3,"file":"PrimeDropdown.js","sources":["../../../form/PrimeDropdown.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Select } from 'primereact/select';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, optionsProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:dropdown` component - a single-choice select.\n *\n * Options are normalized by `optionsProperty`, so a screen may write either bare strings or\n * `{ label, value }` records and get the same result.\n *\n * PrimeReact calls this `Select`, and it is a composition rather than one component: `Root` owns the\n * value and the option model, `Trigger` is what the user clicks, and the list lives behind a `Portal` so\n * it escapes any clipping ancestor. `Select.List` renders `options` itself - there is no option mapping\n * here, and adding one would only duplicate what `optionLabel` / `optionValue` already say. The `appendTo`\n * and z-index juggling a dropdown inside a dialog used to need is gone with it: the portal stacks\n * correctly on its own.\n */\nexport function PrimeDropdown({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<unknown>(stringProperty(element, 'value'));\n const placeholder = stringProperty(element, 'placeholder', 'Select');\n const filter = booleanProperty(element, 'filter', false);\n const showClear = booleanProperty(element, 'showClear', false);\n return (\n <Select.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value)}\n options={optionsProperty(element, 'options')}\n optionLabel='label'\n optionValue='value'\n filter={filter}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Select.Trigger>\n <Select.Value placeholder={placeholder} />\n {showClear && <Select.Clear />}\n <Select.Arrow />\n </Select.Trigger>\n <Select.Portal>\n <Select.Positioner>\n <Select.Popup>\n {filter && <Select.Filter placeholder={placeholder} />}\n <Select.List />\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n );\n}\n"],"names":["PrimeDropdown","element","value","setValue","useState","stringProperty","placeholder","filter","booleanProperty","showClear","_jsxs","Select","Root","data-scene-id","id","onValueChange","event","options","optionsProperty","optionLabel","optionValue","disabled","Trigger","_jsx","Value","Clear","Arrow","Portal","Positioner","Popup","Filter","List"],"mappings":";;;;;;;AAQA;;;;;;;;;;;;AAYC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAAkBC,0BAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IACpE,MAAMK,WAAAA,GAAcD,yBAAAA,CAAeJ,OAAAA,EAAS,aAAA,EAAe,QAAA,CAAA;IAC3D,MAAMM,MAAAA,GAASC,0BAAAA,CAAgBP,OAAAA,EAAS,QAAA,EAAU,KAAA,CAAA;IAClD,MAAMQ,SAAAA,GAAYD,0BAAAA,CAAgBP,OAAAA,EAAS,WAAA,EAAa,KAAA,CAAA;IACxD,qBACIS,eAAA,CAACC,cAAOC,IAAI,EAAA;AACRC,QAAAA,eAAAA,EAAeZ,QAAQa,EAAE;QACzBZ,KAAAA,EAAOA,KAAAA;AACPa,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUb,QAAAA,CAASa,KAAAA,CAAMd,KAAK,CAAA;AAC9Ce,QAAAA,OAAAA,EAASC,2BAAgBjB,OAAAA,EAAS,SAAA,CAAA;QAClCkB,WAAAA,EAAY,OAAA;QACZC,WAAAA,EAAY,OAAA;QACZb,MAAAA,EAAQA,MAAAA;QACRc,QAAAA,EAAUb,0BAAAA,CAAgBP,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,0BAAAS,eAAA,CAACC,cAAOW,OAAO,EAAA;;AACX,kCAAAC,cAAA,CAACZ,cAAOa,KAAK,EAAA;wBAAClB,WAAAA,EAAaA;;oBAC1BG,SAAAA,kBAAac,cAAA,CAACZ,cAAOc,KAAK,EAAA,EAAA,CAAA;AAC3B,kCAAAF,cAAA,CAACZ,cAAOe,KAAK,EAAA,EAAA;;;AAEjB,0BAAAH,cAAA,CAACZ,cAAOgB,MAAM,EAAA;wCACVJ,cAAA,CAACZ,cAAOiB,UAAU,EAAA;4CACdlB,eAAA,CAACC,cAAOkB,KAAK,EAAA;;4BACRtB,MAAAA,kBAAUgB,cAAA,CAACZ,cAAOmB,MAAM,EAAA;gCAACxB,WAAAA,EAAaA;;AACvC,0CAAAiB,cAAA,CAACZ,cAAOoB,IAAI,EAAA,EAAA;;;;;;;AAMpC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeFloatLabel.js","sources":["../../../form/PrimeFloatLabel.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { FloatLabel } from 'primereact/floatlabel';\nimport { InputText } from 'primereact/inputtext';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:floatLabel` component - a label that starts inside its field and floats above it once\n * the field has focus or a value.\n *\n * FloatLabel is a wrapper, not a field, so the field it decorates comes from the `content` slot. An\n * empty slot falls back to a plain text input rather than rendering a label attached to nothing, which\n * would look like a styling bug rather than a missing child.\n */\nexport function PrimeFloatLabel({ element, slots }: RegisteredComponentProps) {\n const label = stringProperty(element, 'label', 'Label');\n return (\n <FloatLabel data-scene-id={element.id}>\n {slots.content?.length ? slots.content : <InputText id={element.id} />}\n <label htmlFor={element.id}>{label}</label>\n </FloatLabel>\n );\n}\n"],"names":["PrimeFloatLabel","element","slots","label","stringProperty","_jsxs","FloatLabel","data-scene-id","id","content","length","_jsx","InputText","htmlFor"],"mappings":";;;;;;;AAQA;;;;;;;AAOC,IACM,SAASA,eAAAA,CAAgB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACxE,MAAMC,KAAAA,GAAQC,yBAAAA,CAAeH,OAAAA,EAAS,OAAA,EAAS,OAAA,CAAA;AAC/C,IAAA,qBACII,eAAA,CAACC,qBAAAA,EAAAA;AAAWC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;;AAChCN,YAAAA,KAAAA,CAAMO,OAAO,EAAEC,MAAAA,GAASR,KAAAA,CAAMO,OAAO,iBAAGE,cAAA,CAACC,mBAAAA,EAAAA;AAAUJ,gBAAAA,EAAAA,EAAIP,QAAQO;;0BAChEG,cAAA,CAACR,OAAAA,EAAAA;AAAMU,gBAAAA,OAAAA,EAASZ,QAAQO,EAAE;AAAGL,gBAAAA,QAAAA,EAAAA;;;;AAGzC;;;;"}
1
+ {"version":3,"file":"PrimeFloatLabel.js","sources":["../../../form/PrimeFloatLabel.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { FloatLabel } from 'primereact/floatlabel';\nimport { InputText } from 'primereact/inputtext';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:floatLabel` component - a label that starts inside its field and floats above it once\n * the field has focus or a value.\n *\n * FloatLabel is a wrapper, not a field, so the field it decorates comes from the `content` slot. An\n * empty slot falls back to a plain text input rather than rendering a label attached to nothing, which\n * would look like a styling bug rather than a missing child.\n */\nexport function PrimeFloatLabel({ element, slots }: RegisteredComponentProps) {\n const label = stringProperty(element, 'label', 'Label');\n return (\n <FloatLabel data-scene-id={element.id}>\n {slots.content?.length ? slots.content : <InputText id={element.id} />}\n <label htmlFor={element.id}>{label}</label>\n </FloatLabel>\n );\n}\n"],"names":["PrimeFloatLabel","element","slots","label","stringProperty","_jsxs","FloatLabel","data-scene-id","id","content","length","_jsx","InputText","htmlFor"],"mappings":";;;;;;;AAQA;;;;;;;AAOC,IACM,SAASA,eAAAA,CAAgB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACxE,MAAMC,KAAAA,GAAQC,yBAAAA,CAAeH,OAAAA,EAAS,OAAA,EAAS,OAAA,CAAA;AAC/C,IAAA,qBACII,eAAA,CAACC,qBAAAA,EAAAA;AAAWC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;;AAChCN,YAAAA,KAAAA,CAAMO,OAAO,EAAEC,MAAAA,GAASR,KAAAA,CAAMO,OAAO,iBAAGE,cAAA,CAACC,mBAAAA,EAAAA;AAAUJ,gBAAAA,EAAAA,EAAIP,QAAQO;;0BAChEG,cAAA,CAACR,OAAAA,EAAAA;AAAMU,gBAAAA,OAAAA,EAASZ,QAAQO,EAAE;AAAGL,gBAAAA,QAAAA,EAAAA;;;;AAGzC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeIconField.js","sources":["../../../form/PrimeIconField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { IconField } from 'primereact/iconfield';\nimport { InputText } from 'primereact/inputtext';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:iconField` component - a field with an icon rendered inside it.\n *\n * Like {@link PrimeFloatLabel} this decorates a field rather than being one, so the field comes from the\n * `content` slot with a plain text input as the fallback.\n *\n * PrimeReact 11 has no `primereact/inputicon` module; the icon slot is `IconField.Inset`, a part of\n * `iconfield` itself. With it went the `iconPosition` prop - v11 gives the root a single class and reads\n * the side off the DOM instead - so `iconPosition` is honored here by placing the inset before or after\n * the field rather than by naming a side. Same authored property, same result, decided one level up.\n */\nexport function PrimeIconField({ element, slots }: RegisteredComponentProps) {\n const icon = <IconField.Inset className={stringProperty(element, 'icon', 'pi pi-search')} />;\n const field = slots.content?.length ? slots.content : <InputText placeholder={stringProperty(element, 'placeholder')} />;\n const iconLast = stringProperty(element, 'iconPosition', 'left') === 'right';\n return (\n <IconField.Root data-scene-id={element.id}>\n {iconLast ? field : icon}\n {iconLast ? icon : field}\n </IconField.Root>\n );\n}\n"],"names":["PrimeIconField","element","slots","icon","_jsx","IconField","Inset","className","stringProperty","field","content","length","InputText","placeholder","iconLast","_jsxs","Root","data-scene-id","id"],"mappings":";;;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACvE,MAAMC,IAAAA,iBAAOC,cAAA,CAACC,mBAAAA,CAAUC,KAAK,EAAA;QAACC,SAAAA,EAAWC,yBAAAA,CAAeP,SAAS,MAAA,EAAQ,cAAA;;IACzE,MAAMQ,KAAAA,GAAQP,MAAMQ,OAAO,EAAEC,SAAST,KAAAA,CAAMQ,OAAO,iBAAGN,cAAA,CAACQ,mBAAAA,EAAAA;AAAUC,QAAAA,WAAAA,EAAaL,0BAAeP,OAAAA,EAAS,aAAA;;AACtG,IAAA,MAAMa,QAAAA,GAAWN,yBAAAA,CAAeP,OAAAA,EAAS,cAAA,EAAgB,MAAA,CAAA,KAAY,OAAA;IACrE,qBACIc,eAAA,CAACV,oBAAUW,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAehB,QAAQiB,EAAE;;AACpCJ,YAAAA,QAAAA,GAAWL,KAAAA,GAAQN,IAAAA;AACnBW,YAAAA,QAAAA,GAAWX,IAAAA,GAAOM;;;AAG/B;;;;"}
1
+ {"version":3,"file":"PrimeIconField.js","sources":["../../../form/PrimeIconField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { IconField } from 'primereact/iconfield';\nimport { InputText } from 'primereact/inputtext';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:iconField` component - a field with an icon rendered inside it.\n *\n * Like {@link PrimeFloatLabel} this decorates a field rather than being one, so the field comes from the\n * `content` slot with a plain text input as the fallback.\n *\n * PrimeReact 11 has no `primereact/inputicon` module; the icon slot is `IconField.Inset`, a part of\n * `iconfield` itself. With it went the `iconPosition` prop - v11 gives the root a single class and reads\n * the side off the DOM instead - so `iconPosition` is honored here by placing the inset before or after\n * the field rather than by naming a side. Same authored property, same result, decided one level up.\n */\nexport function PrimeIconField({ element, slots }: RegisteredComponentProps) {\n const icon = <IconField.Inset className={stringProperty(element, 'icon', 'pi pi-search')} />;\n const field = slots.content?.length ? slots.content : <InputText placeholder={stringProperty(element, 'placeholder')} />;\n const iconLast = stringProperty(element, 'iconPosition', 'left') === 'right';\n return (\n <IconField.Root data-scene-id={element.id}>\n {iconLast ? field : icon}\n {iconLast ? icon : field}\n </IconField.Root>\n );\n}\n"],"names":["PrimeIconField","element","slots","icon","_jsx","IconField","Inset","className","stringProperty","field","content","length","InputText","placeholder","iconLast","_jsxs","Root","data-scene-id","id"],"mappings":";;;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACvE,MAAMC,IAAAA,iBAAOC,cAAA,CAACC,mBAAAA,CAAUC,KAAK,EAAA;QAACC,SAAAA,EAAWC,yBAAAA,CAAeP,SAAS,MAAA,EAAQ,cAAA;;IACzE,MAAMQ,KAAAA,GAAQP,MAAMQ,OAAO,EAAEC,SAAST,KAAAA,CAAMQ,OAAO,iBAAGN,cAAA,CAACQ,mBAAAA,EAAAA;AAAUC,QAAAA,WAAAA,EAAaL,0BAAeP,OAAAA,EAAS,aAAA;;AACtG,IAAA,MAAMa,QAAAA,GAAWN,yBAAAA,CAAeP,OAAAA,EAAS,cAAA,EAAgB,MAAA,CAAA,KAAY,OAAA;IACrE,qBACIc,eAAA,CAACV,oBAAUW,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAehB,QAAQiB,EAAE;;AACpCJ,YAAAA,QAAAA,GAAWL,KAAAA,GAAQN,IAAAA;AACnBW,YAAAA,QAAAA,GAAWX,IAAAA,GAAOM;;;AAG/B;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeInputNumber.js","sources":["../../../form/PrimeInputNumber.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { InputNumber } from 'primereact/inputnumber';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputNumber` component - a numeric field with locale-aware formatting.\n *\n * `mode` and `currency` are passed straight through because that is where InputNumber earns its keep\n * over a plain text field: it formats and parses in the user's locale rather than making a screen do it.\n *\n * PrimeReact 11 splits the component in two: `Root` holds the number model and `Input` is the field it\n * formats into, which is also why `placeholder` moved onto the input rather than the root. `showButtons`\n * is no longer a flag the component interprets - the spinner is a `Group` of `Increment` and `Decrement`\n * you either render or do not - so the property now decides whether that group exists at all.\n */\nexport function PrimeInputNumber({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<number | undefined>(numberProperty(element, 'value'));\n const currency = stringProperty(element, 'currency');\n return (\n <InputNumber.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(typeof event.value === 'number' ? event.value : undefined)}\n mode={currency === undefined ? 'decimal' : 'currency'}\n currency={currency}\n min={numberProperty(element, 'min')}\n max={numberProperty(element, 'max')}\n disabled={booleanProperty(element, 'disabled', false)}>\n <InputNumber.Input placeholder={stringProperty(element, 'placeholder')} />\n {booleanProperty(element, 'showButtons', false) && (\n <InputNumber.Group>\n <InputNumber.Increment>\n <i className='pi pi-chevron-up' />\n </InputNumber.Increment>\n <InputNumber.Decrement>\n <i className='pi pi-chevron-down' />\n </InputNumber.Decrement>\n </InputNumber.Group>\n )}\n </InputNumber.Root>\n );\n}\n"],"names":["PrimeInputNumber","element","value","setValue","useState","numberProperty","currency","stringProperty","_jsxs","InputNumber","Root","data-scene-id","id","onValueChange","event","undefined","mode","min","max","disabled","booleanProperty","_jsx","Input","placeholder","Group","Increment","i","className","Decrement"],"mappings":";;;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAA6BC,0BAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IAC/E,MAAMK,QAAAA,GAAWC,0BAAeN,OAAAA,EAAS,UAAA,CAAA;IACzC,qBACIO,eAAA,CAACC,wBAAYC,IAAI,EAAA;AACbC,QAAAA,eAAAA,EAAeV,QAAQW,EAAE;QACzBV,KAAAA,EAAOA,KAAAA;QACPW,aAAAA,EAAe,CAACC,KAAAA,GAAUX,QAAAA,CAAS,OAAOW,KAAAA,CAAMZ,KAAK,KAAK,QAAA,GAAWY,KAAAA,CAAMZ,KAAK,GAAGa,SAAAA,CAAAA;QACnFC,IAAAA,EAAMV,QAAAA,KAAaS,YAAY,SAAA,GAAY,UAAA;QAC3CT,QAAAA,EAAUA,QAAAA;AACVW,QAAAA,GAAAA,EAAKZ,0BAAeJ,OAAAA,EAAS,KAAA,CAAA;AAC7BiB,QAAAA,GAAAA,EAAKb,0BAAeJ,OAAAA,EAAS,KAAA,CAAA;QAC7BkB,QAAAA,EAAUC,0BAAAA,CAAgBnB,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,0BAAAoB,cAAA,CAACZ,wBAAYa,KAAK,EAAA;AAACC,gBAAAA,WAAAA,EAAahB,0BAAeN,OAAAA,EAAS,aAAA;;AACvDmB,YAAAA,0BAAAA,CAAgBnB,OAAAA,EAAS,aAAA,EAAe,KAAA,CAAA,kBACrCO,eAAA,CAACC,wBAAYe,KAAK,EAAA;;AACd,kCAAAH,cAAA,CAACZ,wBAAYgB,SAAS,EAAA;AAClB,wBAAA,QAAA,gBAAAJ,cAAA,CAACK,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU;;;AAEjB,kCAAAN,cAAA,CAACZ,wBAAYmB,SAAS,EAAA;AAClB,wBAAA,QAAA,gBAAAP,cAAA,CAACK,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU;;;;;;;AAMrC;;;;"}
1
+ {"version":3,"file":"PrimeInputNumber.js","sources":["../../../form/PrimeInputNumber.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { InputNumber } from 'primereact/inputnumber';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputNumber` component - a numeric field with locale-aware formatting.\n *\n * `mode` and `currency` are passed straight through because that is where InputNumber earns its keep\n * over a plain text field: it formats and parses in the user's locale rather than making a screen do it.\n *\n * PrimeReact 11 splits the component in two: `Root` holds the number model and `Input` is the field it\n * formats into, which is also why `placeholder` moved onto the input rather than the root. `showButtons`\n * is no longer a flag the component interprets - the spinner is a `Group` of `Increment` and `Decrement`\n * you either render or do not - so the property now decides whether that group exists at all.\n */\nexport function PrimeInputNumber({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<number | undefined>(numberProperty(element, 'value'));\n const currency = stringProperty(element, 'currency');\n return (\n <InputNumber.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(typeof event.value === 'number' ? event.value : undefined)}\n mode={currency === undefined ? 'decimal' : 'currency'}\n currency={currency}\n min={numberProperty(element, 'min')}\n max={numberProperty(element, 'max')}\n disabled={booleanProperty(element, 'disabled', false)}>\n <InputNumber.Input placeholder={stringProperty(element, 'placeholder')} />\n {booleanProperty(element, 'showButtons', false) && (\n <InputNumber.Group>\n <InputNumber.Increment>\n <i className='pi pi-chevron-up' />\n </InputNumber.Increment>\n <InputNumber.Decrement>\n <i className='pi pi-chevron-down' />\n </InputNumber.Decrement>\n </InputNumber.Group>\n )}\n </InputNumber.Root>\n );\n}\n"],"names":["PrimeInputNumber","element","value","setValue","useState","numberProperty","currency","stringProperty","_jsxs","InputNumber","Root","data-scene-id","id","onValueChange","event","undefined","mode","min","max","disabled","booleanProperty","_jsx","Input","placeholder","Group","Increment","i","className","Decrement"],"mappings":";;;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAA6BC,0BAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IAC/E,MAAMK,QAAAA,GAAWC,0BAAeN,OAAAA,EAAS,UAAA,CAAA;IACzC,qBACIO,eAAA,CAACC,wBAAYC,IAAI,EAAA;AACbC,QAAAA,eAAAA,EAAeV,QAAQW,EAAE;QACzBV,KAAAA,EAAOA,KAAAA;QACPW,aAAAA,EAAe,CAACC,KAAAA,GAAUX,QAAAA,CAAS,OAAOW,KAAAA,CAAMZ,KAAK,KAAK,QAAA,GAAWY,KAAAA,CAAMZ,KAAK,GAAGa,SAAAA,CAAAA;QACnFC,IAAAA,EAAMV,QAAAA,KAAaS,YAAY,SAAA,GAAY,UAAA;QAC3CT,QAAAA,EAAUA,QAAAA;AACVW,QAAAA,GAAAA,EAAKZ,0BAAeJ,OAAAA,EAAS,KAAA,CAAA;AAC7BiB,QAAAA,GAAAA,EAAKb,0BAAeJ,OAAAA,EAAS,KAAA,CAAA;QAC7BkB,QAAAA,EAAUC,0BAAAA,CAAgBnB,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,0BAAAoB,cAAA,CAACZ,wBAAYa,KAAK,EAAA;AAACC,gBAAAA,WAAAA,EAAahB,0BAAeN,OAAAA,EAAS,aAAA;;AACvDmB,YAAAA,0BAAAA,CAAgBnB,OAAAA,EAAS,aAAA,EAAe,KAAA,CAAA,kBACrCO,eAAA,CAACC,wBAAYe,KAAK,EAAA;;AACd,kCAAAH,cAAA,CAACZ,wBAAYgB,SAAS,EAAA;AAClB,wBAAA,QAAA,gBAAAJ,cAAA,CAACK,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU;;;AAEjB,kCAAAN,cAAA,CAACZ,wBAAYmB,SAAS,EAAA;AAClB,wBAAA,QAAA,gBAAAP,cAAA,CAACK,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU;;;;;;;AAMrC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeInputText.js","sources":["../../../form/PrimeInputText.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { InputText } from 'primereact/inputtext';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputText` component - a single-line text field.\n *\n * PrimeReact inputs are controlled, and a Scene element has nowhere to put \"what the user has typed so\n * far\" - `properties` is authored design-time configuration, not live state. The adapter therefore owns\n * that state locally, seeded from the `value` property. The consequence is deliberate and worth knowing:\n * a preview is genuinely typeable instead of frozen, and the typed value is local to the rendered\n * component rather than pushed back into the model.\n */\nexport function PrimeInputText({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n return (\n <InputText\n data-scene-id={element.id}\n value={value}\n onChange={(event) => setValue(event.target.value)}\n placeholder={stringProperty(element, 'placeholder')}\n disabled={booleanProperty(element, 'disabled', false)}\n readOnly={booleanProperty(element, 'readOnly', false)}\n invalid={booleanProperty(element, 'invalid', false)}\n />\n );\n}\n"],"names":["PrimeInputText","element","value","setValue","useState","stringProperty","_jsx","InputText","data-scene-id","id","onChange","event","target","placeholder","disabled","booleanProperty","readOnly","invalid"],"mappings":";;;;;;;AAQA;;;;;;;;AAQC,IACM,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAA4B,EAAA;AAChE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAASC,yBAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,cAAA,CAACC,mBAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,QAAAA,EAAU,CAACC,KAAAA,GAAUR,QAAAA,CAASQ,KAAAA,CAAMC,MAAM,CAACV,KAAK,CAAA;AAChDW,QAAAA,WAAAA,EAAaR,0BAAeJ,OAAAA,EAAS,aAAA,CAAA;QACrCa,QAAAA,EAAUC,0BAAAA,CAAgBd,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/Ce,QAAAA,EAAUD,0BAAAA,CAAgBd,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/CgB,OAAAA,EAASF,0BAAAA,CAAgBd,SAAS,SAAA,EAAW,KAAA;;AAGzD;;;;"}
1
+ {"version":3,"file":"PrimeInputText.js","sources":["../../../form/PrimeInputText.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { InputText } from 'primereact/inputtext';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputText` component - a single-line text field.\n *\n * PrimeReact inputs are controlled, and a Scene element has nowhere to put \"what the user has typed so\n * far\" - `properties` is authored design-time configuration, not live state. The adapter therefore owns\n * that state locally, seeded from the `value` property. The consequence is deliberate and worth knowing:\n * a preview is genuinely typeable instead of frozen, and the typed value is local to the rendered\n * component rather than pushed back into the model.\n */\nexport function PrimeInputText({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n return (\n <InputText\n data-scene-id={element.id}\n value={value}\n onChange={(event) => setValue(event.target.value)}\n placeholder={stringProperty(element, 'placeholder')}\n disabled={booleanProperty(element, 'disabled', false)}\n readOnly={booleanProperty(element, 'readOnly', false)}\n invalid={booleanProperty(element, 'invalid', false)}\n />\n );\n}\n"],"names":["PrimeInputText","element","value","setValue","useState","stringProperty","_jsx","InputText","data-scene-id","id","onChange","event","target","placeholder","disabled","booleanProperty","readOnly","invalid"],"mappings":";;;;;;;AAQA;;;;;;;;AAQC,IACM,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAA4B,EAAA;AAChE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAASC,yBAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,cAAA,CAACC,mBAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,QAAAA,EAAU,CAACC,KAAAA,GAAUR,QAAAA,CAASQ,KAAAA,CAAMC,MAAM,CAACV,KAAK,CAAA;AAChDW,QAAAA,WAAAA,EAAaR,0BAAeJ,OAAAA,EAAS,aAAA,CAAA;QACrCa,QAAAA,EAAUC,0BAAAA,CAAgBd,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/Ce,QAAAA,EAAUD,0BAAAA,CAAgBd,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/CgB,OAAAA,EAASF,0BAAAA,CAAgBd,SAAS,SAAA,EAAW,KAAA;;AAGzD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeInputTextarea.js","sources":["../../../form/PrimeInputTextarea.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ChangeEvent, useState } from 'react';\nimport { Textarea } from 'primereact/textarea';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputTextarea` component - a multi-line text field, named `Textarea` by PrimeReact 11.\n *\n * One of the few components the version change left alone beyond its name: it is still a single element\n * rather than a composition, and `rows`, `cols` and `placeholder` still reach the underlying `<textarea>`\n * untouched. Holds the typed value locally for the same reason {@link PrimeInputText} does.\n */\nexport function PrimeInputTextarea({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n return (\n <Textarea\n data-scene-id={element.id}\n value={value}\n onChange={(event: ChangeEvent<HTMLTextAreaElement>) => setValue(event.target.value)}\n rows={numberProperty(element, 'rows', 4)}\n cols={numberProperty(element, 'cols')}\n autoResize={booleanProperty(element, 'autoResize', false)}\n placeholder={stringProperty(element, 'placeholder')}\n disabled={booleanProperty(element, 'disabled', false)}\n />\n );\n}\n"],"names":["PrimeInputTextarea","element","value","setValue","useState","stringProperty","_jsx","Textarea","data-scene-id","id","onChange","event","target","rows","numberProperty","cols","autoResize","booleanProperty","placeholder","disabled"],"mappings":";;;;;;;AAQA;;;;;;AAMC,IACM,SAASA,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAASC,yBAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,cAAA,CAACC,iBAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,QAAAA,EAAU,CAACC,KAAAA,GAA4CR,QAAAA,CAASQ,KAAAA,CAAMC,MAAM,CAACV,KAAK,CAAA;QAClFW,IAAAA,EAAMC,yBAAAA,CAAeb,SAAS,MAAA,EAAQ,CAAA,CAAA;AACtCc,QAAAA,IAAAA,EAAMD,0BAAeb,OAAAA,EAAS,MAAA,CAAA;QAC9Be,UAAAA,EAAYC,0BAAAA,CAAgBhB,SAAS,YAAA,EAAc,KAAA,CAAA;AACnDiB,QAAAA,WAAAA,EAAab,0BAAeJ,OAAAA,EAAS,aAAA,CAAA;QACrCkB,QAAAA,EAAUF,0BAAAA,CAAgBhB,SAAS,UAAA,EAAY,KAAA;;AAG3D;;;;"}
1
+ {"version":3,"file":"PrimeInputTextarea.js","sources":["../../../form/PrimeInputTextarea.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ChangeEvent, useState } from 'react';\nimport { Textarea } from 'primereact/textarea';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputTextarea` component - a multi-line text field, named `Textarea` by PrimeReact 11.\n *\n * One of the few components the version change left alone beyond its name: it is still a single element\n * rather than a composition, and `rows`, `cols` and `placeholder` still reach the underlying `<textarea>`\n * untouched. Holds the typed value locally for the same reason {@link PrimeInputText} does.\n */\nexport function PrimeInputTextarea({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n return (\n <Textarea\n data-scene-id={element.id}\n value={value}\n onChange={(event: ChangeEvent<HTMLTextAreaElement>) => setValue(event.target.value)}\n rows={numberProperty(element, 'rows', 4)}\n cols={numberProperty(element, 'cols')}\n autoResize={booleanProperty(element, 'autoResize', false)}\n placeholder={stringProperty(element, 'placeholder')}\n disabled={booleanProperty(element, 'disabled', false)}\n />\n );\n}\n"],"names":["PrimeInputTextarea","element","value","setValue","useState","stringProperty","_jsx","Textarea","data-scene-id","id","onChange","event","target","rows","numberProperty","cols","autoResize","booleanProperty","placeholder","disabled"],"mappings":";;;;;;;AAQA;;;;;;AAMC,IACM,SAASA,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAASC,yBAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,cAAA,CAACC,iBAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,QAAAA,EAAU,CAACC,KAAAA,GAA4CR,QAAAA,CAASQ,KAAAA,CAAMC,MAAM,CAACV,KAAK,CAAA;QAClFW,IAAAA,EAAMC,yBAAAA,CAAeb,SAAS,MAAA,EAAQ,CAAA,CAAA;AACtCc,QAAAA,IAAAA,EAAMD,0BAAeb,OAAAA,EAAS,MAAA,CAAA;QAC9Be,UAAAA,EAAYC,0BAAAA,CAAgBhB,SAAS,YAAA,EAAc,KAAA,CAAA;AACnDiB,QAAAA,WAAAA,EAAab,0BAAeJ,OAAAA,EAAS,aAAA,CAAA;QACrCkB,QAAAA,EAAUF,0BAAAA,CAAgBhB,SAAS,UAAA,EAAY,KAAA;;AAG3D;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeKnob.js","sources":["../../../form/PrimeKnob.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Knob } from 'primereact/knob';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty } from '../properties';\n\n/**\n * The `PrimeReact:knob` component - a circular value picker that doubles as a readout.\n *\n * `Knob.Root` draws the `<svg>` and its children are what goes inside it: `Range` is the full arc,\n * `Value` the filled portion of it, and `Text` the number in the middle. All three are required for the\n * knob to look like one - the root contributes only the canvas and the pointer handling - and `Text`\n * prints the current value when given no children, which is exactly what a readout wants.\n */\nexport function PrimeKnob({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(numberProperty(element, 'value', 0));\n return (\n <Knob.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value ?? 0)}\n min={numberProperty(element, 'min', 0)}\n max={numberProperty(element, 'max', 100)}\n step={numberProperty(element, 'step', 1)}\n size={numberProperty(element, 'size', 100)}\n readOnly={booleanProperty(element, 'readOnly', false)}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Knob.Range />\n <Knob.Value />\n <Knob.Text />\n </Knob.Root>\n );\n}\n"],"names":["PrimeKnob","element","value","setValue","useState","numberProperty","_jsxs","Knob","Root","data-scene-id","id","onValueChange","event","min","max","step","size","readOnly","booleanProperty","disabled","_jsx","Range","Value","Text"],"mappings":";;;;;;;AAQA;;;;;;;AAOC,IACM,SAASA,SAAAA,CAAU,EAAEC,OAAO,EAA4B,EAAA;AAC3D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAASC,yBAAAA,CAAeJ,SAAS,OAAA,EAAS,CAAA,CAAA,CAAA;IACpE,qBACIK,eAAA,CAACC,UAAKC,IAAI,EAAA;AACNC,QAAAA,eAAAA,EAAeR,QAAQS,EAAE;QACzBR,KAAAA,EAAOA,KAAAA;AACPS,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUT,QAAAA,CAASS,KAAAA,CAAMV,KAAK,IAAI,CAAA,CAAA;QAClDW,GAAAA,EAAKR,yBAAAA,CAAeJ,SAAS,KAAA,EAAO,CAAA,CAAA;QACpCa,GAAAA,EAAKT,yBAAAA,CAAeJ,SAAS,KAAA,EAAO,GAAA,CAAA;QACpCc,IAAAA,EAAMV,yBAAAA,CAAeJ,SAAS,MAAA,EAAQ,CAAA,CAAA;QACtCe,IAAAA,EAAMX,yBAAAA,CAAeJ,SAAS,MAAA,EAAQ,GAAA,CAAA;QACtCgB,QAAAA,EAAUC,0BAAAA,CAAgBjB,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/CkB,QAAAA,EAAUD,0BAAAA,CAAgBjB,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,0BAAAmB,cAAA,CAACb,UAAKc,KAAK,EAAA,EAAA,CAAA;AACX,0BAAAD,cAAA,CAACb,UAAKe,KAAK,EAAA,EAAA,CAAA;AACX,0BAAAF,cAAA,CAACb,UAAKgB,IAAI,EAAA,EAAA;;;AAGtB;;;;"}
1
+ {"version":3,"file":"PrimeKnob.js","sources":["../../../form/PrimeKnob.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Knob } from 'primereact/knob';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty } from '../properties';\n\n/**\n * The `PrimeReact:knob` component - a circular value picker that doubles as a readout.\n *\n * `Knob.Root` draws the `<svg>` and its children are what goes inside it: `Range` is the full arc,\n * `Value` the filled portion of it, and `Text` the number in the middle. All three are required for the\n * knob to look like one - the root contributes only the canvas and the pointer handling - and `Text`\n * prints the current value when given no children, which is exactly what a readout wants.\n */\nexport function PrimeKnob({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(numberProperty(element, 'value', 0));\n return (\n <Knob.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value ?? 0)}\n min={numberProperty(element, 'min', 0)}\n max={numberProperty(element, 'max', 100)}\n step={numberProperty(element, 'step', 1)}\n size={numberProperty(element, 'size', 100)}\n readOnly={booleanProperty(element, 'readOnly', false)}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Knob.Range />\n <Knob.Value />\n <Knob.Text />\n </Knob.Root>\n );\n}\n"],"names":["PrimeKnob","element","value","setValue","useState","numberProperty","_jsxs","Knob","Root","data-scene-id","id","onValueChange","event","min","max","step","size","readOnly","booleanProperty","disabled","_jsx","Range","Value","Text"],"mappings":";;;;;;;AAQA;;;;;;;AAOC,IACM,SAASA,SAAAA,CAAU,EAAEC,OAAO,EAA4B,EAAA;AAC3D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAASC,yBAAAA,CAAeJ,SAAS,OAAA,EAAS,CAAA,CAAA,CAAA;IACpE,qBACIK,eAAA,CAACC,UAAKC,IAAI,EAAA;AACNC,QAAAA,eAAAA,EAAeR,QAAQS,EAAE;QACzBR,KAAAA,EAAOA,KAAAA;AACPS,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUT,QAAAA,CAASS,KAAAA,CAAMV,KAAK,IAAI,CAAA,CAAA;QAClDW,GAAAA,EAAKR,yBAAAA,CAAeJ,SAAS,KAAA,EAAO,CAAA,CAAA;QACpCa,GAAAA,EAAKT,yBAAAA,CAAeJ,SAAS,KAAA,EAAO,GAAA,CAAA;QACpCc,IAAAA,EAAMV,yBAAAA,CAAeJ,SAAS,MAAA,EAAQ,CAAA,CAAA;QACtCe,IAAAA,EAAMX,yBAAAA,CAAeJ,SAAS,MAAA,EAAQ,GAAA,CAAA;QACtCgB,QAAAA,EAAUC,0BAAAA,CAAgBjB,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/CkB,QAAAA,EAAUD,0BAAAA,CAAgBjB,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,0BAAAmB,cAAA,CAACb,UAAKc,KAAK,EAAA,EAAA,CAAA;AACX,0BAAAD,cAAA,CAACb,UAAKe,KAAK,EAAA,EAAA,CAAA;AACX,0BAAAF,cAAA,CAACb,UAAKgB,IAAI,EAAA,EAAA;;;AAGtB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeListBox.js","sources":["../../../form/PrimeListBox.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Listbox } from 'primereact/listbox';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, optionsProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:listBox` component - an always-visible list of choices.\n *\n * The alternative to a dropdown when the choices matter enough to stay on screen; `multiple` switches it\n * between one and many. `Listbox.List` renders `options` itself, so `optionLabel` / `optionValue` remain\n * the whole of the mapping and there is no per-option markup here.\n *\n * v10's `filter` property is not read. PrimeReact 11 ships a `Listbox.Filter` part, but it is only an\n * input wired for keyboard navigation - the root does no filtering of `options` at all, so switching it\n * on would render a search box that searches nothing. Filtering a list is the caller's to do, and a\n * design-time preview has no list long enough to need it.\n */\nexport function PrimeListBox({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<unknown>(stringProperty(element, 'value'));\n return (\n <Listbox.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value)}\n options={optionsProperty(element, 'options')}\n optionLabel='label'\n optionValue='value'\n multiple={booleanProperty(element, 'multiple', false)}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Listbox.List />\n </Listbox.Root>\n );\n}\n"],"names":["PrimeListBox","element","value","setValue","useState","stringProperty","_jsx","Listbox","Root","data-scene-id","id","onValueChange","event","options","optionsProperty","optionLabel","optionValue","multiple","booleanProperty","disabled","List"],"mappings":";;;;;;;AAQA;;;;;;;;;;;AAWC,IACM,SAASA,YAAAA,CAAa,EAAEC,OAAO,EAA4B,EAAA;AAC9D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAAkBC,0BAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IACpE,qBACIK,cAAA,CAACC,gBAAQC,IAAI,EAAA;AACTC,QAAAA,eAAAA,EAAeR,QAAQS,EAAE;QACzBR,KAAAA,EAAOA,KAAAA;AACPS,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUT,QAAAA,CAASS,KAAAA,CAAMV,KAAK,CAAA;AAC9CW,QAAAA,OAAAA,EAASC,2BAAgBb,OAAAA,EAAS,SAAA,CAAA;QAClCc,WAAAA,EAAY,OAAA;QACZC,WAAAA,EAAY,OAAA;QACZC,QAAAA,EAAUC,0BAAAA,CAAgBjB,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/CkB,QAAAA,EAAUD,0BAAAA,CAAgBjB,SAAS,UAAA,EAAY,KAAA,CAAA;gCAC/CK,cAAA,CAACC,gBAAQa,IAAI,EAAA,EAAA;;AAGzB;;;;"}
1
+ {"version":3,"file":"PrimeListBox.js","sources":["../../../form/PrimeListBox.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Listbox } from 'primereact/listbox';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, optionsProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:listBox` component - an always-visible list of choices.\n *\n * The alternative to a dropdown when the choices matter enough to stay on screen; `multiple` switches it\n * between one and many. `Listbox.List` renders `options` itself, so `optionLabel` / `optionValue` remain\n * the whole of the mapping and there is no per-option markup here.\n *\n * v10's `filter` property is not read. PrimeReact 11 ships a `Listbox.Filter` part, but it is only an\n * input wired for keyboard navigation - the root does no filtering of `options` at all, so switching it\n * on would render a search box that searches nothing. Filtering a list is the caller's to do, and a\n * design-time preview has no list long enough to need it.\n */\nexport function PrimeListBox({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<unknown>(stringProperty(element, 'value'));\n return (\n <Listbox.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value)}\n options={optionsProperty(element, 'options')}\n optionLabel='label'\n optionValue='value'\n multiple={booleanProperty(element, 'multiple', false)}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Listbox.List />\n </Listbox.Root>\n );\n}\n"],"names":["PrimeListBox","element","value","setValue","useState","stringProperty","_jsx","Listbox","Root","data-scene-id","id","onValueChange","event","options","optionsProperty","optionLabel","optionValue","multiple","booleanProperty","disabled","List"],"mappings":";;;;;;;AAQA;;;;;;;;;;;AAWC,IACM,SAASA,YAAAA,CAAa,EAAEC,OAAO,EAA4B,EAAA;AAC9D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAAkBC,0BAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IACpE,qBACIK,cAAA,CAACC,gBAAQC,IAAI,EAAA;AACTC,QAAAA,eAAAA,EAAeR,QAAQS,EAAE;QACzBR,KAAAA,EAAOA,KAAAA;AACPS,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUT,QAAAA,CAASS,KAAAA,CAAMV,KAAK,CAAA;AAC9CW,QAAAA,OAAAA,EAASC,2BAAgBb,OAAAA,EAAS,SAAA,CAAA;QAClCc,WAAAA,EAAY,OAAA;QACZC,WAAAA,EAAY,OAAA;QACZC,QAAAA,EAAUC,0BAAAA,CAAgBjB,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/CkB,QAAAA,EAAUD,0BAAAA,CAAgBjB,SAAS,UAAA,EAAY,KAAA,CAAA;gCAC/CK,cAAA,CAACC,gBAAQa,IAAI,EAAA,EAAA;;AAGzB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeMultiSelect.js","sources":["../../../form/PrimeMultiSelect.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Select } from 'primereact/select';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, optionsProperty, stringArrayProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:multiSelect` component - a multiple-choice select.\n *\n * There is no `MultiSelect` in PrimeReact 11; the capability moved onto `Select`, which takes a\n * `multiple` prop. Keeping the abstract name and re-expressing it over `Select` is the whole point of\n * having an abstract name: a screen that says `multiSelect` keeps working, and only this file knows the\n * component behind it changed.\n *\n * Two v10 properties have nowhere to go and are deliberately dropped rather than silently ignored.\n * `display` chose between a comma-separated summary and a row of chips, and `maxSelectedLabels` collapsed\n * a long selection into an \"n items selected\" label - both were features of v10's own selection renderer.\n * v11 renders the selection through `Select.Value`, which joins the selected labels with commas and\n * offers no chip mode and no collapse threshold, so honoring either property would mean reimplementing\n * the value slot rather than configuring it.\n */\nexport function PrimeMultiSelect({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<unknown>(stringArrayProperty(element, 'value'));\n const placeholder = stringProperty(element, 'placeholder', 'Select');\n const filter = booleanProperty(element, 'filter', false);\n return (\n <Select.Root\n data-scene-id={element.id}\n multiple\n value={value}\n onValueChange={(event) => setValue(event.value)}\n options={optionsProperty(element, 'options')}\n optionLabel='label'\n optionValue='value'\n filter={filter}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Select.Trigger>\n <Select.Value placeholder={placeholder} />\n <Select.Arrow />\n </Select.Trigger>\n <Select.Portal>\n <Select.Positioner>\n <Select.Popup>\n {filter && <Select.Filter placeholder={placeholder} />}\n <Select.List />\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n );\n}\n"],"names":["PrimeMultiSelect","element","value","setValue","useState","stringArrayProperty","placeholder","stringProperty","filter","booleanProperty","_jsxs","Select","Root","data-scene-id","id","multiple","onValueChange","event","options","optionsProperty","optionLabel","optionValue","disabled","Trigger","_jsx","Value","Arrow","Portal","Positioner","Popup","Filter","List"],"mappings":";;;;;;;AAQA;;;;;;;;;;;;;;AAcC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAAkBC,+BAAoBJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IACzE,MAAMK,WAAAA,GAAcC,yBAAAA,CAAeN,OAAAA,EAAS,aAAA,EAAe,QAAA,CAAA;IAC3D,MAAMO,MAAAA,GAASC,0BAAAA,CAAgBR,OAAAA,EAAS,QAAA,EAAU,KAAA,CAAA;IAClD,qBACIS,eAAA,CAACC,cAAOC,IAAI,EAAA;AACRC,QAAAA,eAAAA,EAAeZ,QAAQa,EAAE;QACzBC,QAAQ,EAAA,IAAA;QACRb,KAAAA,EAAOA,KAAAA;AACPc,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUd,QAAAA,CAASc,KAAAA,CAAMf,KAAK,CAAA;AAC9CgB,QAAAA,OAAAA,EAASC,2BAAgBlB,OAAAA,EAAS,SAAA,CAAA;QAClCmB,WAAAA,EAAY,OAAA;QACZC,WAAAA,EAAY,OAAA;QACZb,MAAAA,EAAQA,MAAAA;QACRc,QAAAA,EAAUb,0BAAAA,CAAgBR,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,0BAAAS,eAAA,CAACC,cAAOY,OAAO,EAAA;;AACX,kCAAAC,cAAA,CAACb,cAAOc,KAAK,EAAA;wBAACnB,WAAAA,EAAaA;;AAC3B,kCAAAkB,cAAA,CAACb,cAAOe,KAAK,EAAA,EAAA;;;AAEjB,0BAAAF,cAAA,CAACb,cAAOgB,MAAM,EAAA;wCACVH,cAAA,CAACb,cAAOiB,UAAU,EAAA;4CACdlB,eAAA,CAACC,cAAOkB,KAAK,EAAA;;4BACRrB,MAAAA,kBAAUgB,cAAA,CAACb,cAAOmB,MAAM,EAAA;gCAACxB,WAAAA,EAAaA;;AACvC,0CAAAkB,cAAA,CAACb,cAAOoB,IAAI,EAAA,EAAA;;;;;;;AAMpC;;;;"}
1
+ {"version":3,"file":"PrimeMultiSelect.js","sources":["../../../form/PrimeMultiSelect.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Select } from 'primereact/select';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, optionsProperty, stringArrayProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:multiSelect` component - a multiple-choice select.\n *\n * There is no `MultiSelect` in PrimeReact 11; the capability moved onto `Select`, which takes a\n * `multiple` prop. Keeping the abstract name and re-expressing it over `Select` is the whole point of\n * having an abstract name: a screen that says `multiSelect` keeps working, and only this file knows the\n * component behind it changed.\n *\n * Two v10 properties have nowhere to go and are deliberately dropped rather than silently ignored.\n * `display` chose between a comma-separated summary and a row of chips, and `maxSelectedLabels` collapsed\n * a long selection into an \"n items selected\" label - both were features of v10's own selection renderer.\n * v11 renders the selection through `Select.Value`, which joins the selected labels with commas and\n * offers no chip mode and no collapse threshold, so honoring either property would mean reimplementing\n * the value slot rather than configuring it.\n */\nexport function PrimeMultiSelect({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<unknown>(stringArrayProperty(element, 'value'));\n const placeholder = stringProperty(element, 'placeholder', 'Select');\n const filter = booleanProperty(element, 'filter', false);\n return (\n <Select.Root\n data-scene-id={element.id}\n multiple\n value={value}\n onValueChange={(event) => setValue(event.value)}\n options={optionsProperty(element, 'options')}\n optionLabel='label'\n optionValue='value'\n filter={filter}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Select.Trigger>\n <Select.Value placeholder={placeholder} />\n <Select.Arrow />\n </Select.Trigger>\n <Select.Portal>\n <Select.Positioner>\n <Select.Popup>\n {filter && <Select.Filter placeholder={placeholder} />}\n <Select.List />\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n );\n}\n"],"names":["PrimeMultiSelect","element","value","setValue","useState","stringArrayProperty","placeholder","stringProperty","filter","booleanProperty","_jsxs","Select","Root","data-scene-id","id","multiple","onValueChange","event","options","optionsProperty","optionLabel","optionValue","disabled","Trigger","_jsx","Value","Arrow","Portal","Positioner","Popup","Filter","List"],"mappings":";;;;;;;AAQA;;;;;;;;;;;;;;AAcC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,MAAM,CAACC,KAAA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yright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { InputPassword } from 'primereact/inputpassword';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:password` component - a masked field, named `InputPassword` by PrimeReact 11.\n *\n * v11 pared this back to what a password field actually is: an input that renders as `type=\"password\"`\n * until something flips `mask`. The v10 `feedback` strength meter and the `toggleMask` eye button are\n * both gone from the component - there is no prompt/weak/medium/strong panel and no built-in reveal\n * control to switch on - so neither property is read here. `mask` is exposed instead, which is the one\n * knob that survived and the one an authored screen can actually mean: a preview that starts revealed.\n * A screen that needs a reveal button now owns that button, because only the screen knows where it goes.\n */\nexport function PrimePassword({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n return (\n <InputPassword\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value ?? '')}\n mask={booleanProperty(element, 'mask', true)}\n placeholder={stringProperty(element, 'placeholder')}\n disabled={booleanProperty(element, 'disabled', false)}\n />\n );\n}\n"],"names":["PrimePassword","element","value","setValue","useState","stringProperty","_jsx","InputPassword","data-scene-id","id","onValueChange","event","mask","booleanProperty","placeholder","disabled"],"mappings":";;;;;;;AAQA;;;;;;;;;AASC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAASC,yBAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,cAAA,CAACC,2BAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUR,QAAAA,CAASQ,KAAAA,CAAMT,KAAK,IAAI,EAAA,CAAA;QAClDU,IAAAA,EAAMC,0BAAAA,CAAgBZ,SAAS,MAAA,EAAQ,IAAA,CAAA;AACvCa,QAAAA,WAAAA,EAAaT,0BAAeJ,OAAAA,EAAS,aAAA,CAAA;QACrCc,QAAAA,EAAUF,0BAAAA,CAAgBZ,SAAS,UAAA,EAAY,KAAA;;AAG3D;;;;"}
1
+ {"version":3,"file":"PrimePassword.js","sources":["../../../form/PrimePassword.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { InputPassword } from 'primereact/inputpassword';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:password` component - a masked field, named `InputPassword` by PrimeReact 11.\n *\n * v11 pared this back to what a password field actually is: an input that renders as `type=\"password\"`\n * until something flips `mask`. The v10 `feedback` strength meter and the `toggleMask` eye button are\n * both gone from the component - there is no prompt/weak/medium/strong panel and no built-in reveal\n * control to switch on - so neither property is read here. `mask` is exposed instead, which is the one\n * knob that survived and the one an authored screen can actually mean: a preview that starts revealed.\n * A screen that needs a reveal button now owns that button, because only the screen knows where it goes.\n */\nexport function PrimePassword({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n return (\n <InputPassword\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value ?? '')}\n mask={booleanProperty(element, 'mask', true)}\n placeholder={stringProperty(element, 'placeholder')}\n disabled={booleanProperty(element, 'disabled', false)}\n />\n );\n}\n"],"names":["PrimePassword","element","value","setValue","useState","stringProperty","_jsx","InputPassword","data-scene-id","id","onValueChange","event","mask","booleanProperty","placeholder","disabled"],"mappings":";;;;;;;AAQA;;;;;;;;;AASC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAASC,yBAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,cAAA,CAACC,2BAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUR,QAAAA,CAASQ,KAAAA,CAAMT,KAAK,IAAI,EAAA,CAAA;QAClDU,IAAAA,EAAMC,0BAAAA,CAAgBZ,SAAS,MAAA,EAAQ,IAAA,CAAA;AACvCa,QAAAA,WAAAA,EAAaT,0BAAeJ,OAAAA,EAAS,aAAA,CAAA;QACrCc,QAAAA,EAAUF,0BAAAA,CAAgBZ,SAAS,UAAA,EAAY,KAAA;;AAG3D;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeRadioButton.js","sources":["../../../form/PrimeRadioButton.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { RadioButton } from 'primereact/radiobutton';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, optionsProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:radioButton` component - one exclusive choice out of several.\n *\n * PrimeReact's RadioButton is a single button, but a lone radio button is never what a screen means: the\n * choice is the group. The adapter therefore renders the whole group from `options`, sharing one\n * `name` so the browser enforces exclusivity, and falls back to a single button when only a `label` was\n * given.\n *\n * PrimeReact 11 splits each button into `Root` (the real radio input and its state), `Box` and\n * `Indicator`, and reports selection as `onCheckedChange`. Only the transition *into* checked is acted\n * on: the browser also fires the sibling losing its check, and treating that as a selection would clear\n * the value a moment after the user set it.\n */\nexport function PrimeRadioButton({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<string | undefined>(stringProperty(element, 'value'));\n const options = optionsProperty(element, 'options');\n const choices = options.length > 0 ? options : [{ label: stringProperty(element, 'label', 'Option'), value: element.id }];\n const disabled = booleanProperty(element, 'disabled', false);\n return (\n <div data-scene-id={element.id} className='flex flex-col gap-2'>\n {choices.map((choice) => (\n <div key={choice.value} className='flex items-center gap-2'>\n <RadioButton.Root\n inputId={`${element.id}-${choice.value}`}\n name={element.id}\n value={choice.value}\n checked={value === choice.value}\n onCheckedChange={(event) => {\n if (event.checked) setValue(choice.value);\n }}\n disabled={disabled}>\n <RadioButton.Box>\n <RadioButton.Indicator />\n </RadioButton.Box>\n </RadioButton.Root>\n <label htmlFor={`${element.id}-${choice.value}`}>{choice.label}</label>\n </div>\n ))}\n </div>\n );\n}\n"],"names":["PrimeRadioButton","element","value","setValue","useState","stringProperty","options","optionsProperty","choices","length","label","id","disabled","booleanProperty","_jsx","div","data-scene-id","className","map","choice","_jsxs","RadioButton","Root","inputId","name","checked","onCheckedChange","event","Box","Indicator","htmlFor"],"mappings":";;;;;;;AAQA;;;;;;;;;;;;AAYC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAA6BC,0BAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IAC/E,MAAMK,OAAAA,GAAUC,2BAAgBN,OAAAA,EAAS,SAAA,CAAA;AACzC,IAAA,MAAMO,OAAAA,GAAUF,OAAAA,CAAQG,MAAM,GAAG,IAAIH,OAAAA,GAAU;AAAC,QAAA;YAAEI,KAAAA,EAAOL,yBAAAA,CAAeJ,SAAS,OAAA,EAAS,QAAA,CAAA;AAAWC,YAAAA,KAAAA,EAAOD,QAAQU;AAAG;AAAE,KAAA;IACzH,MAAMC,QAAAA,GAAWC,0BAAAA,CAAgBZ,OAAAA,EAAS,UAAA,EAAY,KAAA,CAAA;AACtD,IAAA,qBACIa,cAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAef,QAAQU,EAAE;QAAEM,SAAAA,EAAU,qBAAA;AACrCT,QAAAA,QAAAA,EAAAA,OAAAA,CAAQU,GAAG,CAAC,CAACC,MAAAA,iBACVC,eAAA,CAACL,KAAAA,EAAAA;gBAAuBE,SAAAA,EAAU,yBAAA;;AAC9B,kCAAAH,cAAA,CAACO,wBAAYC,IAAI,EAAA;wBACbC,OAAAA,EAAS,CAAA,EAAGtB,QAAQU,EAAE,CAAC,CAAC,EAAEQ,MAAAA,CAAOjB,KAAK,CAAA,CAAE;AACxCsB,wBAAAA,IAAAA,EAAMvB,QAAQU,EAAE;AAChBT,wBAAAA,KAAAA,EAAOiB,OAAOjB,KAAK;wBACnBuB,OAAAA,EAASvB,KAAAA,KAAUiB,OAAOjB,KAAK;AAC/BwB,wBAAAA,eAAAA,EAAiB,CAACC,KAAAA,GAAAA;AACd,4BAAA,IAAIA,KAAAA,CAAMF,OAAO,EAAEtB,QAAAA,CAASgB,OAAOjB,KAAK,CAAA;AAC5C,wBAAA,CAAA;wBACAU,QAAAA,EAAUA,QAAAA;gDACVE,cAAA,CAACO,wBAAYO,GAAG,EAAA;oDACZd,cAAA,CAACO,wBAAYQ,SAAS,EAAA,EAAA;;;kCAG9Bf,cAAA,CAACJ,OAAAA,EAAAA;wBAAMoB,OAAAA,EAAS,CAAA,EAAG7B,QAAQU,EAAE,CAAC,CAAC,EAAEQ,MAAAA,CAAOjB,KAAK,CAAA,CAAE;AAAGiB,wBAAAA,QAAAA,EAAAA,MAAAA,CAAOT;;;AAdnDS,aAAAA,EAAAA,MAAAA,CAAOjB,KAAK,CAAA;;AAmBtC;;;;"}
1
+ {"version":3,"file":"PrimeRadioButton.js","sources":["../../../form/PrimeRadioButton.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { RadioButton } from 'primereact/radiobutton';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, optionsProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:radioButton` component - one exclusive choice out of several.\n *\n * PrimeReact's RadioButton is a single button, but a lone radio button is never what a screen means: the\n * choice is the group. The adapter therefore renders the whole group from `options`, sharing one\n * `name` so the browser enforces exclusivity, and falls back to a single button when only a `label` was\n * given.\n *\n * PrimeReact 11 splits each button into `Root` (the real radio input and its state), `Box` and\n * `Indicator`, and reports selection as `onCheckedChange`. Only the transition *into* checked is acted\n * on: the browser also fires the sibling losing its check, and treating that as a selection would clear\n * the value a moment after the user set it.\n */\nexport function PrimeRadioButton({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<string | undefined>(stringProperty(element, 'value'));\n const options = optionsProperty(element, 'options');\n const choices = options.length > 0 ? options : [{ label: stringProperty(element, 'label', 'Option'), value: element.id }];\n const disabled = booleanProperty(element, 'disabled', false);\n return (\n <div data-scene-id={element.id} className='flex flex-col gap-2'>\n {choices.map((choice) => (\n <div key={choice.value} className='flex items-center gap-2'>\n <RadioButton.Root\n inputId={`${element.id}-${choice.value}`}\n name={element.id}\n value={choice.value}\n checked={value === choice.value}\n onCheckedChange={(event) => {\n if (event.checked) setValue(choice.value);\n }}\n disabled={disabled}>\n <RadioButton.Box>\n <RadioButton.Indicator />\n </RadioButton.Box>\n </RadioButton.Root>\n <label htmlFor={`${element.id}-${choice.value}`}>{choice.label}</label>\n </div>\n ))}\n </div>\n );\n}\n"],"names":["PrimeRadioButton","element","value","setValue","useState","stringProperty","options","optionsProperty","choices","length","label","id","disabled","booleanProperty","_jsx","div","data-scene-id","className","map","choice","_jsxs","RadioButton","Root","inputId","name","checked","onCheckedChange","event","Box","Indicator","htmlFor"],"mappings":";;;;;;;AAQA;;;;;;;;;;;;AAYC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAA6BC,0BAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IAC/E,MAAMK,OAAAA,GAAUC,2BAAgBN,OAAAA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AAC,EAAEQ,MAAAA,CAAOjB,KAAK,CAAA,CAAE;AAAGiB,wBAAAA,QAAAA,EAAAA,MAAAA,CAAOT;;;AAdnDS,aAAAA,EAAAA,MAAAA,CAAOjB,KAAK,CAAA;;AAmBtC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeRating.js","sources":["../../../form/PrimeRating.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Rating } from 'primereact/rating';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty } from '../properties';\n\n/**\n * The `PrimeReact:rating` component - a star rating.\n *\n * `stars` is no longer a prop the component reads: PrimeReact 11 takes the stars as children, so the\n * count is what this adapter builds the `Rating.Option` list from, and the icons are ours to name -\n * `On` and `Off` are the filled and empty faces of one star. The upside of the change is that a rating\n * of hearts or flames is now a different icon class rather than a different component.\n *\n * v10's `cancel` property is not read. It rendered an extra leading icon that reset the rating to none;\n * v11 has no such part and no \"clear\" affordance, so there is nothing left to switch on.\n */\nexport function PrimeRating({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<number | undefined>(numberProperty(element, 'value'));\n const stars = numberProperty(element, 'stars', 5);\n return (\n <Rating.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value)}\n readOnly={booleanProperty(element, 'readOnly', false)}\n disabled={booleanProperty(element, 'disabled', false)}>\n {Array.from({ length: stars }, (_, index) => (\n <Rating.Option key={index} index={index} aria-label={`${index + 1} of ${stars}`}>\n <Rating.On>\n <i className='pi pi-star-fill' />\n </Rating.On>\n <Rating.Off>\n <i className='pi pi-star' />\n </Rating.Off>\n </Rating.Option>\n ))}\n </Rating.Root>\n );\n}\n"],"names":["PrimeRating","element","value","setValue","useState","numberProperty","stars","_jsx","Rating","Root","data-scene-id","id","onValueChange","event","readOnly","booleanProperty","disabled","Array","from","length","_","index","_jsxs","Option","aria-label","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;AAWpC;;;;"}
1
+ {"version":3,"file":"PrimeRating.js","sources":["../../../form/PrimeRating.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Rating } from 'primereact/rating';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty } from '../properties';\n\n/**\n * The `PrimeReact:rating` component - a star rating.\n *\n * `stars` is no longer a prop the component reads: PrimeReact 11 takes the stars as children, so the\n * count is what this adapter builds the `Rating.Option` list from, and the icons are ours to name -\n * `On` and `Off` are the filled and empty faces of one star. The upside of the change is that a rating\n * of hearts or flames is now a different icon class rather than a different component.\n *\n * v10's `cancel` property is not read. It rendered an extra leading icon that reset the rating to none;\n * v11 has no such part and no \"clear\" affordance, so there is nothing left to switch on.\n */\nexport function PrimeRating({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<number | undefined>(numberProperty(element, 'value'));\n const stars = numberProperty(element, 'stars', 5);\n return (\n <Rating.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value)}\n readOnly={booleanProperty(element, 'readOnly', false)}\n disabled={booleanProperty(element, 'disabled', false)}>\n {Array.from({ length: stars }, (_, index) => (\n <Rating.Option key={index} index={index} aria-label={`${index + 1} of ${stars}`}>\n <Rating.On>\n <i className='pi pi-star-fill' />\n </Rating.On>\n <Rating.Off>\n <i className='pi pi-star' />\n </Rating.Off>\n </Rating.Option>\n ))}\n </Rating.Root>\n );\n}\n"],"names":["PrimeRating","element","value","setValue","useState","numberProperty","stars","_jsx","Rating","Root","data-scene-id","id","onValueChange","event","readOnly","booleanProperty","disabled","Array","from","length","_","index","_jsxs","Option","aria-label","On","i","className","Off"],"mappings":";;;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,WAAAA,CAAY,EAAEC,OAAO,EAA4B,EAAA;AAC7D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAA6BC,0BAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IAC/E,MAAMK,KAAAA,GAAQD,yBAAAA,CAAeJ,OAAAA,EAAS,OAAA,EAAS,CAAA,CAAA;IAC/C,qBACIM,cAAA,CAACC,cAAOC,IAAI,EAAA;AACRC,QAAAA,eAAAA,EAAeT,QAAQU,EAAE;QACzBT,KAAAA,EAAOA,KAAAA;AACPU,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUV,QAAAA,CAASU,KAAAA,CAAMX,KAAK,CAAA;QAC9CY,QAAAA,EAAUC,0BAAAA,CAAgBd,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/Ce,QAAAA,EAAUD,0BAAAA,CAAgBd,SAAS,UAAA,EAAY,KAAA,CAAA;AAC9CgB,QAAAA,QAAAA,EAAAA,KAAAA,CAAMC,IAAI,CAAC;YAAEC,MAAAA,EAAQb;AAAM,SAAA,EAAG,CAACc,CAAAA,EAAGC,KAAAA,iBAC/BC,eAAA,CAACd,cAAOe,MAAM,EAAA;gBAAaF,KAAAA,EAAOA,KAAAA;AAAOG,gBAAAA,YAAAA,EAAY,CAAA,EAAGH,KAAAA,GAAQ,CAAA,CAAE,IAAI,EAAEf,KAAAA,CAAAA,CAAO;;AAC3E,kCAAAC,cAAA,CAACC,cAAOiB,EAAE,EAAA;AACN,wBAAA,QAAA,gBAAAlB,cAAA,CAACmB,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU;;;AAEjB,kCAAApB,cAAA,CAACC,cAAOoB,GAAG,EAAA;AACP,wBAAA,QAAA,gBAAArB,cAAA,CAACmB,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU;;;;AALDN,aAAAA,EAAAA,KAAAA,CAAAA;;AAWpC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeSelectButton.js","sources":["../../../form/PrimeSelectButton.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { ToggleButton } from 'primereact/togglebutton';\nimport { ToggleButtonGroup } from 'primereact/togglebuttongroup';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, optionsProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:selectButton` component - a small set of choices shown as joined toggle buttons.\n * PrimeReact 11 calls it `ToggleButtonGroup`.\n *\n * v10 took the choices as an `options` array and rendered the buttons itself; v11 takes them as children,\n * so the mapping that used to be `optionLabel` / `optionValue` is a `map` here. The group still owns the\n * selection - each `ToggleButton` only declares its `value` and reads its pressed state from the group's\n * context - which is what keeps `multiple` a single prop on the group rather than a rule every button\n * would otherwise have to agree on.\n */\nexport function PrimeSelectButton({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<unknown>(stringProperty(element, 'value'));\n return (\n <ToggleButtonGroup\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value)}\n multiple={booleanProperty(element, 'multiple', false)}\n disabled={booleanProperty(element, 'disabled', false)}>\n {optionsProperty(element, 'options').map((option) => (\n <ToggleButton.Root key={option.value} value={option.value}>\n {option.label}\n </ToggleButton.Root>\n ))}\n </ToggleButtonGroup>\n );\n}\n"],"names":["PrimeSelectButton","element","value","setValue","useState","stringProperty","_jsx","ToggleButtonGroup","data-scene-id","id","onValueChange","event","multiple","booleanProperty","disabled","optionsProperty","map","option","ToggleButton","Root","label"],"mappings":";;;;;;;;AASA;;;;;;;;;AASC,IACM,SAASA,iBAAAA,CAAkB,EAAEC,OAAO,EAA4B,EAAA;AACnE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAAkBC,0BAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,cAAA,CAACC,mCAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUR,QAAAA,CAASQ,KAAAA,CAAMT,KAAK,CAAA;QAC9CU,QAAAA,EAAUC,0BAAAA,CAAgBZ,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/Ca,QAAAA,EAAUD,0BAAAA,CAAgBZ,SAAS,UAAA,EAAY,KAAA,CAAA;kBAC9Cc,0BAAAA,CAAgBd,OAAAA,EAAS,WAAWe,GAAG,CAAC,CAACC,MAAAA,iBACtCX,cAAA,CAACY,0BAAaC,IAAI,EAAA;AAAoBjB,gBAAAA,KAAAA,EAAOe,OAAOf,KAAK;AACpDe,gBAAAA,QAAAA,EAAAA,MAAAA,CAAOG;AADYH,aAAAA,EAAAA,MAAAA,CAAOf,KAAK,CAAA;;AAMpD;;;;"}
1
+ {"version":3,"file":"PrimeSelectButton.js","sources":["../../../form/PrimeSelectButton.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { ToggleButton } from 'primereact/togglebutton';\nimport { ToggleButtonGroup } from 'primereact/togglebuttongroup';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, optionsProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:selectButton` component - a small set of choices shown as joined toggle buttons.\n * PrimeReact 11 calls it `ToggleButtonGroup`.\n *\n * v10 took the choices as an `options` array and rendered the buttons itself; v11 takes them as children,\n * so the mapping that used to be `optionLabel` / `optionValue` is a `map` here. The group still owns the\n * selection - each `ToggleButton` only declares its `value` and reads its pressed state from the group's\n * context - which is what keeps `multiple` a single prop on the group rather than a rule every button\n * would otherwise have to agree on.\n */\nexport function PrimeSelectButton({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<unknown>(stringProperty(element, 'value'));\n return (\n <ToggleButtonGroup\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value)}\n multiple={booleanProperty(element, 'multiple', false)}\n disabled={booleanProperty(element, 'disabled', false)}>\n {optionsProperty(element, 'options').map((option) => (\n <ToggleButton.Root key={option.value} value={option.value}>\n {option.label}\n </ToggleButton.Root>\n ))}\n </ToggleButtonGroup>\n );\n}\n"],"names":["PrimeSelectButton","element","value","setValue","useState","stringProperty","_jsx","ToggleButtonGroup","data-scene-id","id","onValueChange","event","multiple","booleanProperty","disabled","optionsProperty","map","option","ToggleButton","Root","label"],"mappings":";;;;;;;;AASA;;;;;;;;;AASC,IACM,SAASA,iBAAAA,CAAkB,EAAEC,OAAO,EAA4B,EAAA;AACnE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAAkBC,0BAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,cAAA,CAACC,mCAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUR,QAAAA,CAASQ,KAAAA,CAAMT,KAAK,CAAA;QAC9CU,QAAAA,EAAUC,0BAAAA,CAAgBZ,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/Ca,QAAAA,EAAUD,0BAAAA,CAAgBZ,SAAS,UAAA,EAAY,KAAA,CAAA;kBAC9Cc,0BAAAA,CAAgBd,OAAAA,EAAS,WAAWe,GAAG,CAAC,CAACC,MAAAA,iBACtCX,cAAA,CAACY,0BAAaC,IAAI,EAAA;AAAoBjB,gBAAAA,KAAAA,EAAOe,OAAOf,KAAK;AACpDe,gBAAAA,QAAAA,EAAAA,MAAAA,CAAOG;AADYH,aAAAA,EAAAA,MAAAA,CAAOf,KAAK,CAAA;;AAMpD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeSlider.js","sources":["../../../form/PrimeSlider.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Slider } from 'primereact/slider';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty } from '../properties';\n\n/**\n * The `PrimeReact:slider` component - a value picked along a track.\n *\n * Given a width because Slider renders as a zero-height track that collapses to nothing in an\n * auto-sized container - the one piece of layout it cannot supply for itself.\n *\n * PrimeReact 11 exposes the track, the filled range and the handle as separate parts, which is what makes\n * a range slider a matter of rendering a second `Handle` rather than a `range` prop. This adapter renders\n * one, so the value stays a single number; `onValueChange` still reports `number[]` for the range case,\n * hence the narrowing on the way back in.\n */\nexport function PrimeSlider({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(numberProperty(element, 'value', 50));\n return (\n <div data-scene-id={element.id} className='w-64'>\n <Slider.Root\n value={value}\n onValueChange={(event) => setValue(typeof event.value === 'number' ? event.value : value)}\n min={numberProperty(element, 'min', 0)}\n max={numberProperty(element, 'max', 100)}\n step={numberProperty(element, 'step', 1)}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Slider.Track>\n <Slider.Range />\n </Slider.Track>\n <Slider.Handle />\n </Slider.Root>\n </div>\n );\n}\n"],"names":["PrimeSlider","element","value","setValue","useState","numberProperty","_jsx","div","data-scene-id","id","className","_jsxs","Slider","Root","onValueChange","event","min","max","step","disabled","booleanProperty","Track","Range","Handle"],"mappings":";;;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,WAAAA,CAAY,EAAEC,OAAO,EAA4B,EAAA;AAC7D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAASC,yBAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,cAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QAAEC,SAAAA,EAAU,MAAA;gCACtCC,eAAA,CAACC,cAAOC,IAAI,EAAA;YACRX,KAAAA,EAAOA,KAAAA;YACPY,aAAAA,EAAe,CAACC,KAAAA,GAAUZ,QAAAA,CAAS,OAAOY,KAAAA,CAAMb,KAAK,KAAK,QAAA,GAAWa,KAAAA,CAAMb,KAAK,GAAGA,KAAAA,CAAAA;YACnFc,GAAAA,EAAKX,yBAAAA,CAAeJ,SAAS,KAAA,EAAO,CAAA,CAAA;YACpCgB,GAAAA,EAAKZ,yBAAAA,CAAeJ,SAAS,KAAA,EAAO,GAAA,CAAA;YACpCiB,IAAAA,EAAMb,yBAAAA,CAAeJ,SAAS,MAAA,EAAQ,CAAA,CAAA;YACtCkB,QAAAA,EAAUC,0BAAAA,CAAgBnB,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,8BAAAK,cAAA,CAACM,cAAOS,KAAK,EAAA;4CACTf,cAAA,CAACM,cAAOU,KAAK,EAAA,EAAA;;AAEjB,8BAAAhB,cAAA,CAACM,cAAOW,MAAM,EAAA,EAAA;;;;AAI9B;;;;"}
1
+ {"version":3,"file":"PrimeSlider.js","sources":["../../../form/PrimeSlider.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Slider } from 'primereact/slider';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty } from '../properties';\n\n/**\n * The `PrimeReact:slider` component - a value picked along a track.\n *\n * Given a width because Slider renders as a zero-height track that collapses to nothing in an\n * auto-sized container - the one piece of layout it cannot supply for itself.\n *\n * PrimeReact 11 exposes the track, the filled range and the handle as separate parts, which is what makes\n * a range slider a matter of rendering a second `Handle` rather than a `range` prop. This adapter renders\n * one, so the value stays a single number; `onValueChange` still reports `number[]` for the range case,\n * hence the narrowing on the way back in.\n */\nexport function PrimeSlider({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(numberProperty(element, 'value', 50));\n return (\n <div data-scene-id={element.id} className='w-64'>\n <Slider.Root\n value={value}\n onValueChange={(event) => setValue(typeof event.value === 'number' ? event.value : value)}\n min={numberProperty(element, 'min', 0)}\n max={numberProperty(element, 'max', 100)}\n step={numberProperty(element, 'step', 1)}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Slider.Track>\n <Slider.Range />\n </Slider.Track>\n <Slider.Handle />\n </Slider.Root>\n </div>\n );\n}\n"],"names":["PrimeSlider","element","value","setValue","useState","numberProperty","_jsx","div","data-scene-id","id","className","_jsxs","Slider","Root","onValueChange","event","min","max","step","disabled","booleanProperty","Track","Range","Handle"],"mappings":";;;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,WAAAA,CAAY,EAAEC,OAAO,EAA4B,EAAA;AAC7D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAASC,yBAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,cAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QAAEC,SAAAA,EAAU,MAAA;gCACtCC,eAAA,CAACC,cAAOC,IAAI,EAAA;YACRX,KAAAA,EAAOA,KAAAA;YACPY,aAAAA,EAAe,CAACC,KAAAA,GAAUZ,QAAAA,CAAS,OAAOY,KAAAA,CAAMb,KAAK,KAAK,QAAA,GAAWa,KAAAA,CAAMb,KAAK,GAAGA,KAAAA,CAAAA;YACnFc,GAAAA,EAAKX,yBAAAA,CAAeJ,SAAS,KAAA,EAAO,CAAA,CAAA;YACpCgB,GAAAA,EAAKZ,yBAAAA,CAAeJ,SAAS,KAAA,EAAO,GAAA,CAAA;YACpCiB,IAAAA,EAAMb,yBAAAA,CAAeJ,SAAS,MAAA,EAAQ,CAAA,CAAA;YACtCkB,QAAAA,EAAUC,0BAAAA,CAAgBnB,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,8BAAAK,cAAA,CAACM,cAAOS,KAAK,EAAA;4CACTf,cAAA,CAACM,cAAOU,KAAK,EAAA,EAAA;;AAEjB,8BAAAhB,cAAA,CAACM,cAAOW,MAAM,EAAA,EAAA;;;;AAI9B;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeToggleSwitch.js","sources":["../../../form/PrimeToggleSwitch.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { ToggleSwitch } from 'primereact/toggleswitch';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:toggleSwitch` component.\n *\n * The abstract name has always been `toggleSwitch` even while PrimeReact 10 called the component\n * `InputSwitch` - a Scene name follows what the thing is rather than what one library happens to call it\n * this major version - and v11 renaming it `ToggleSwitch` is the library catching up rather than the\n * package moving.\n *\n * `Root` renders the hidden checkbox that carries the state and the accessible name, and the visible\n * switch is `Control` plus the `Handle` that slides inside it. That is why `inputId` and not `id` is what\n * the label points at: the label has to reach the input, not the wrapper.\n */\nexport function PrimeToggleSwitch({ element }: RegisteredComponentProps) {\n const [checked, setChecked] = useState(booleanProperty(element, 'checked', false));\n const label = stringProperty(element, 'label');\n return (\n <div data-scene-id={element.id} className='flex items-center gap-2'>\n <ToggleSwitch.Root\n inputId={element.id}\n checked={checked}\n onCheckedChange={(event) => setChecked(event.checked)}\n disabled={booleanProperty(element, 'disabled', false)}>\n <ToggleSwitch.Control>\n <ToggleSwitch.Handle />\n </ToggleSwitch.Control>\n </ToggleSwitch.Root>\n {label !== undefined && <label htmlFor={element.id}>{label}</label>}\n </div>\n );\n}\n"],"names":["PrimeToggleSwitch","element","checked","setChecked","useState","booleanProperty","label","stringProperty","_jsxs","div","data-scene-id","id","className","_jsx","ToggleSwitch","Root","inputId","onCheckedChange","event","disabled","Control","Handle","undefined","htmlFor"],"mappings":";;;;;;;AAQA;;;;;;;;;;;AAWC,IACM,SAASA,iBAAAA,CAAkB,EAAEC,OAAO,EAA4B,EAAA;AACnE,IAAA,MAAM,CAACC,OAAAA,EAASC,UAAAA,CAAW,GAAGC,cAAAA,CAASC,0BAAAA,CAAgBJ,SAAS,SAAA,EAAW,KAAA,CAAA,CAAA;IAC3E,MAAMK,KAAAA,GAAQC,0BAAeN,OAAAA,EAAS,OAAA,CAAA;AACtC,IAAA,qBACIO,eAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeT,QAAQU,EAAE;QAAEC,SAAAA,EAAU,yBAAA;;AACtC,0BAAAC,cAAA,CAACC,0BAAaC,IAAI,EAAA;AACdC,gBAAAA,OAAAA,EAASf,QAAQU,EAAE;gBACnBT,OAAAA,EAASA,OAAAA;AACTe,gBAAAA,eAAAA,EAAiB,CAACC,KAAAA,GAAUf,UAAAA,CAAWe,KAAAA,CAAMhB,OAAO,CAAA;gBACpDiB,QAAAA,EAAUd,0BAAAA,CAAgBJ,SAAS,UAAA,EAAY,KAAA,CAAA;wCAC/CY,cAAA,CAACC,0BAAaM,OAAO,EAAA;4CACjBP,cAAA,CAACC,0BAAaO,MAAM,EAAA,EAAA;;;AAG3Bf,YAAAA,KAAAA,KAAUgB,2BAAaT,cAAA,CAACP,OAAAA,EAAAA;AAAMiB,gBAAAA,OAAAA,EAAStB,QAAQU,EAAE;AAAGL,gBAAAA,QAAAA,EAAAA;;;;AAGjE;;;;"}
1
+ {"version":3,"file":"PrimeToggleSwitch.js","sources":["../../../form/PrimeToggleSwitch.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { ToggleSwitch } from 'primereact/toggleswitch';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:toggleSwitch` component.\n *\n * The abstract name has always been `toggleSwitch` even while PrimeReact 10 called the component\n * `InputSwitch` - a Scene name follows what the thing is rather than what one library happens to call it\n * this major version - and v11 renaming it `ToggleSwitch` is the library catching up rather than the\n * package moving.\n *\n * `Root` renders the hidden checkbox that carries the state and the accessible name, and the visible\n * switch is `Control` plus the `Handle` that slides inside it. That is why `inputId` and not `id` is what\n * the label points at: the label has to reach the input, not the wrapper.\n */\nexport function PrimeToggleSwitch({ element }: RegisteredComponentProps) {\n const [checked, setChecked] = useState(booleanProperty(element, 'checked', false));\n const label = stringProperty(element, 'label');\n return (\n <div data-scene-id={element.id} className='flex items-center gap-2'>\n <ToggleSwitch.Root\n inputId={element.id}\n checked={checked}\n onCheckedChange={(event) => setChecked(event.checked)}\n disabled={booleanProperty(element, 'disabled', false)}>\n <ToggleSwitch.Control>\n <ToggleSwitch.Handle />\n </ToggleSwitch.Control>\n </ToggleSwitch.Root>\n {label !== undefined && <label htmlFor={element.id}>{label}</label>}\n </div>\n );\n}\n"],"names":["PrimeToggleSwitch","element","checked","setChecked","useState","booleanProperty","label","stringProperty","_jsxs","div","data-scene-id","id","className","_jsx","ToggleSwitch","Root","inputId","onCheckedChange","event","disabled","Control","Handle","undefined","htmlFor"],"mappings":";;;;;;;AAQA;;;;;;;;;;;AAWC,IACM,SAASA,iBAAAA,CAAkB,EAAEC,OAAO,EAA4B,EAAA;AACnE,IAAA,MAAM,CAACC,OAAAA,EAASC,UAAAA,CAAW,GAAGC,cAAAA,CAASC,0BAAAA,CAAgBJ,SAAS,SAAA,EAAW,KAAA,CAAA,CAAA;IAC3E,MAAMK,KAAAA,GAAQC,0BAAeN,OAAAA,EAAS,OAAA,CAAA;AACtC,IAAA,qBACIO,eAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeT,QAAQU,EAAE;QAAEC,SAAAA,EAAU,yBAAA;;AACtC,0BAAAC,cAAA,CAACC,0BAAaC,IAAI,EAAA;AACdC,gBAAAA,OAAAA,EAASf,QAAQU,EAAE;gBACnBT,OAAAA,EAASA,OAAAA;AACTe,gBAAAA,eAAAA,EAAiB,CAACC,KAAAA,GAAUf,UAAAA,CAAWe,KAAAA,CAAMhB,OAAO,CAAA;gBACpDiB,QAAAA,EAAUd,0BAAAA,CAAgBJ,SAAS,UAAA,EAAY,KAAA,CAAA;wCAC/CY,cAAA,CAACC,0BAAaM,OAAO,EAAA;4CACjBP,cAAA,CAACC,0BAAaO,MAAM,EAAA,EAAA;;;AAG3Bf,YAAAA,KAAAA,KAAUgB,2BAAaT,cAAA,CAACP,OAAAA,EAAAA;AAAMiB,gBAAAA,OAAAA,EAAStB,QAAQU,EAAE;AAAGL,gBAAAA,QAAAA,EAAAA;;;;AAGjE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeTreeSelect.js","sources":["../../../form/PrimeTreeSelect.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { TreeSelect } from './TreeSelect';\nimport { booleanProperty, stringProperty } from '../properties';\nimport { treeNodesProperty } from '../treeNodes';\n\n/**\n * The `PrimeReact:treeSelect` component - a dropdown whose choices are a hierarchy.\n *\n * The abstract name outlived the component: PrimeReact 11 removed `TreeSelect` with no replacement and no\n * headless hook, so what this adapts is {@link TreeSelect}, this package's own, built from v11's\n * `Popover` and `Tree`. Keeping the name is the point - a screen that already says `treeSelect` neither\n * knows nor needs to know that the thing behind it changed owner.\n *\n * v10's `filter` property is not read, because the replacement does not filter; see {@link TreeSelect}\n * for what else was left out and why.\n */\nexport function PrimeTreeSelect({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<string | undefined>(stringProperty(element, 'value'));\n return (\n <div data-scene-id={element.id}>\n <TreeSelect\n value={value}\n onChange={setValue}\n options={treeNodesProperty(element, 'options')}\n placeholder={stringProperty(element, 'placeholder', 'Select')}\n disabled={booleanProperty(element, 'disabled', false)}\n />\n </div>\n );\n}\n"],"names":["PrimeTreeSelect","element","value","setValue","useState","stringProperty","_jsx","div","data-scene-id","id","TreeSelect","onChange","options","treeNodesProperty","placeholder","disabled","booleanProperty"],"mappings":";;;;;;;;AASA;;;;;;;;;;AAUC,IACM,SAASA,eAAAA,CAAgB,EAAEC,OAAO,EAA4B,EAAA;AACjE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAA6BC,0BAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;AAC/E,IAAA,qBACIK,cAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;AAC1B,QAAA,QAAA,gBAAAH,cAAA,CAACI,qBAAAA,EAAAA;YACGR,KAAAA,EAAOA,KAAAA;YACPS,QAAAA,EAAUR,QAAAA;AACVS,YAAAA,OAAAA,EAASC,4BAAkBZ,OAAAA,EAAS,SAAA,CAAA;YACpCa,WAAAA,EAAaT,yBAAAA,CAAeJ,SAAS,aAAA,EAAe,QAAA,CAAA;YACpDc,QAAAA,EAAUC,0BAAAA,CAAgBf,SAAS,UAAA,EAAY,KAAA;;;AAI/D;;;;"}
1
+ {"version":3,"file":"PrimeTreeSelect.js","sources":["../../../form/PrimeTreeSelect.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { TreeSelect } from './TreeSelect';\nimport { booleanProperty, stringProperty } from '../properties';\nimport { treeNodesProperty } from '../treeNodes';\n\n/**\n * The `PrimeReact:treeSelect` component - a dropdown whose choices are a hierarchy.\n *\n * The abstract name outlived the component: PrimeReact 11 removed `TreeSelect` with no replacement and no\n * headless hook, so what this adapts is {@link TreeSelect}, this package's own, built from v11's\n * `Popover` and `Tree`. Keeping the name is the point - a screen that already says `treeSelect` neither\n * knows nor needs to know that the thing behind it changed owner.\n *\n * v10's `filter` property is not read, because the replacement does not filter; see {@link TreeSelect}\n * for what else was left out and why.\n */\nexport function PrimeTreeSelect({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<string | undefined>(stringProperty(element, 'value'));\n return (\n <div data-scene-id={element.id}>\n <TreeSelect\n value={value}\n onChange={setValue}\n options={treeNodesProperty(element, 'options')}\n placeholder={stringProperty(element, 'placeholder', 'Select')}\n disabled={booleanProperty(element, 'disabled', false)}\n />\n </div>\n );\n}\n"],"names":["PrimeTreeSelect","element","value","setValue","useState","stringProperty","_jsx","div","data-scene-id","id","TreeSelect","onChange","options","treeNodesProperty","placeholder","disabled","booleanProperty"],"mappings":";;;;;;;;AASA;;;;;;;;;;AAUC,IACM,SAASA,eAAAA,CAAgB,EAAEC,OAAO,EAA4B,EAAA;AACjE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,cAAAA,CAA6BC,0BAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;AAC/E,IAAA,qBACIK,cAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;AAC1B,QAAA,QAAA,gBAAAH,cAAA,CAACI,qBAAAA,EAAAA;YACGR,KAAAA,EAAOA,KAAAA;YACPS,QAAAA,EAAUR,QAAAA;AACVS,YAAAA,OAAAA,EAASC,4BAAkBZ,OAAAA,EAAS,SAAA,CAAA;YACpCa,WAAAA,EAAaT,yBAAAA,CAAeJ,SAAS,aAAA,EAAe,QAAA,CAAA;YACpDc,QAAAA,EAAUC,0BAAAA,CAAgBf,SAAS,UAAA,EAAY,KAAA;;;AAI/D;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TreeSelect.js","sources":["../../../form/TreeSelect.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactNode, useMemo, useState } from 'react';\nimport { Popover } from 'primereact/popover';\nimport { Tree, type TreeNodeData } from 'primereact/tree';\nimport { TreeNode } from '../TreeNode';\n\n/**\n * What a {@link TreeSelect} needs from its host.\n *\n * Deliberately the small subset of PrimeReact 10's `TreeSelect` that a Scene element can actually author.\n * The component is Cratis-owned (see {@link TreeSelect}), so this is a promise this package has to keep\n * on its own - every prop added here is one more thing to implement, and a hierarchy picker earns its\n * keep long before it grows options.\n */\nexport interface TreeSelectProps {\n /**\n * The key of the selected node. Controlled, because the only thing worth selecting from a tree is a\n * node's identity and the host is what knows what to do with it.\n */\n value?: string;\n\n /**\n * The hierarchy to choose from, in Scene's own {@link TreeNode} shape rather than PrimeReact's -\n * `TreeNode` is this package's type since v11 removed `primereact/treenode`, and translating it is\n * this component's job rather than every caller's.\n */\n options: TreeNode[];\n\n /**\n * What the trigger shows when nothing is selected.\n */\n placeholder?: string;\n\n /**\n * Whether the trigger refuses to open.\n */\n disabled?: boolean;\n\n /**\n * Called with the newly selected node's key. Selecting also closes the panel, because a single-select\n * picker has nothing left to ask once it has an answer.\n */\n onChange?: (value: string) => void;\n}\n\n/**\n * A dropdown whose choices are a hierarchy - Cratis-owned, because PrimeReact 11 removed `TreeSelect`\n * outright and left neither a replacement component nor a headless hook to build one from.\n *\n * It is assembled from the two v11 pieces that did survive and together cover the behavior: `Popover`\n * provides the trigger, the portal and the outside-click and Escape handling, and `Tree` provides the\n * node list, the expand/collapse state and keyboard navigation. Nothing here re-implements either - the\n * component is the seam between them, plus the translation from Scene's {@link TreeNode} to the\n * `TreeNodeData` the tree wants.\n *\n * What it deliberately does not carry over from v10, so that no caller is misled into expecting it:\n * **checkbox multi-select** - selection is single, `onChange` yields one key, and there is no partial or\n * \"n selected\" state to reason about; and **filtering** - v10's `filter` prop searched the node labels\n * and rebuilt the visible tree around the matches, which is a real amount of behavior (match, keep\n * ancestors, force-expand, restore on clear) and belongs in the component only once something actually\n * needs it.\n */\nexport function TreeSelect({ value, options, placeholder, disabled, onChange }: TreeSelectProps) {\n const [open, setOpen] = useState(false);\n const nodes = useMemo(() => toTreeNodeData(options), [options]);\n const label = findLabel(nodes, value);\n\n return (\n <Popover.Root open={open} onOpenChange={(event) => setOpen(event.value === true)}>\n <Popover.Trigger disabled={disabled}>\n <span>{label ?? placeholder}</span>\n <i className='pi pi-chevron-down' />\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Positioner>\n <Popover.Popup>\n <Popover.Content>\n <Tree.Root\n value={nodes}\n selectionMode='single'\n selectionKeys={value === undefined ? {} : { [value]: true }}\n onSelectionChange={(event) => {\n const selected = Object.keys(event.value).find((key) => event.value[key] === true);\n if (selected === undefined) return;\n onChange?.(selected);\n setOpen(false);\n }}>\n <Tree.Nodes>\n {(row) => (\n <Tree.Node uKey={row.node.key}>\n <Tree.Content>\n <Tree.Toggle>\n <Tree.ToggleIndicator>\n <i className={row.expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'} />\n </Tree.ToggleIndicator>\n </Tree.Toggle>\n <Tree.Label>{row.node.label}</Tree.Label>\n </Tree.Content>\n </Tree.Node>\n )}\n </Tree.Nodes>\n </Tree.Root>\n </Popover.Content>\n </Popover.Popup>\n </Popover.Positioner>\n </Popover.Portal>\n </Popover.Root>\n );\n}\n\n/**\n * Converts Scene's {@link TreeNode} model into the one PrimeReact 11's `Tree` reads.\n *\n * The two shapes agree on everything that matters except one thing: `key` is optional on a Scene node and\n * required on a PrimeReact one, because the tree keys expansion and selection off it. A missing key is\n * synthesized from the node's position, which is unique and stable across re-renders - the same rule\n * `toTreeNodes` applies, repeated here so this component is correct even when handed nodes that did not\n * come through it.\n *\n * @param nodes The Scene nodes to convert.\n * @param parentKey The key of the node these belong to, used to build unique child keys.\n * @returns The converted nodes, in order.\n */\nfunction toTreeNodeData(nodes: TreeNode[], parentKey = ''): TreeNodeData[] {\n return nodes.map((node, index) => {\n const key = node.key ?? (parentKey === '' ? `${index}` : `${parentKey}-${index}`);\n return {\n key,\n label: node.label,\n icon: node.icon,\n children: node.children === undefined ? undefined : toTreeNodeData(node.children, key),\n };\n });\n}\n\n/**\n * Finds the label to show on the trigger for a selected key.\n *\n * The selection is a key rather than a node because that is all the tree reports, so the label has to be\n * looked back up - and it has to search the whole hierarchy, since the selected node is very rarely a\n * root one.\n *\n * @param nodes The converted nodes to search.\n * @param key The selected key, or `undefined` when nothing is selected.\n * @returns The node's label, or `undefined` when nothing is selected or the key matches no node.\n */\nfunction findLabel(nodes: TreeNodeData[], key: string | undefined): ReactNode {\n if (key === undefined) return undefined;\n for (const node of nodes) {\n if (node.key === key) return node.label;\n const found = node.children === undefined ? undefined : findLabel(node.children, key);\n if (found !== undefined) return found;\n }\n\n return undefined;\n}\n"],"names":["TreeSelect","value","options","placeholder","disabled","onChange","open","setOpen","useState","nodes","useMemo","toTreeNodeData","label","findLabel","_jsxs","Popover","Root","onOpenChange","event","Trigger","_jsx","span","i","className","Portal","Positioner","Popup","Content","Tree","selectionMode","selectionKeys","undefined","onSelectionChange","selected","Object","keys","find","key","Nodes","row","Node","uKey","node","Toggle","ToggleIndicator","expanded","Label","parentKey","map","index","icon","children","found"],"mappings":";;;;;;;AA+CA;;;;;;;;;;;;;;;;AAgBC,IACM,SAASA,UAAAA,CAAW,EAAEC,KAAK,EAAEC,OAAO,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,QAAQ,EAAmB,EAAA;AAC3F,IAAA,MAAM,CAACC,IAAAA,EAAMC,OAAAA,CAAQ,GAAGC,cAAAA,CAAS,KAAA,CAAA;AACjC,IAAA,MAAMC,KAAAA,GAAQC,aAAAA,CAAQ,IAAMC,cAAAA,CAAeT,OAAAA,CAAAA,EAAU;AAACA,QAAAA;AAAQ,KAAA,CAAA;IAC9D,MAAMU,KAAAA,GAAQC,UAAUJ,KAAAA,EAAOR,KAAAA,CAAAA;IAE/B,qBACIa,eAAA,CAACC,gBAAQC,IAAI,EAAA;QAACV,IAAAA,EAAMA,IAAAA;AAAMW,QAAAA,YAAAA,EAAc,CAACC,KAAAA,GAAUX,OAAAA,CAAQW,KAAAA,CAAMjB,KAAK,KAAK,IAAA,CAAA;;AACvE,0BAAAa,eAAA,CAACC,gBAAQI,OAAO,EAAA;gBAACf,QAAAA,EAAUA,QAAAA;;kCACvBgB,cAAA,CAACC,MAAAA,EAAAA;kCAAMT,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{"version":3,"file":"TreeSelect.js","sources":["../../../form/TreeSelect.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactNode, useMemo, useState } from 'react';\nimport { Popover } from 'primereact/popover';\nimport { Tree, type TreeNodeData } from 'primereact/tree';\nimport { TreeNode } from '../TreeNode';\n\n/**\n * What a {@link TreeSelect} needs from its host.\n *\n * Deliberately the small subset of PrimeReact 10's `TreeSelect` that a Scene element can actually author.\n * The component is Cratis-owned (see {@link TreeSelect}), so this is a promise this package has to keep\n * on its own - every prop added here is one more thing to implement, and a hierarchy picker earns its\n * keep long before it grows options.\n */\nexport interface TreeSelectProps {\n /**\n * The key of the selected node. Controlled, because the only thing worth selecting from a tree is a\n * node's identity and the host is what knows what to do with it.\n */\n value?: string;\n\n /**\n * The hierarchy to choose from, in Scene's own {@link TreeNode} shape rather than PrimeReact's -\n * `TreeNode` is this package's type since v11 removed `primereact/treenode`, and translating it is\n * this component's job rather than every caller's.\n */\n options: TreeNode[];\n\n /**\n * What the trigger shows when nothing is selected.\n */\n placeholder?: string;\n\n /**\n * Whether the trigger refuses to open.\n */\n disabled?: boolean;\n\n /**\n * Called with the newly selected node's key. Selecting also closes the panel, because a single-select\n * picker has nothing left to ask once it has an answer.\n */\n onChange?: (value: string) => void;\n}\n\n/**\n * A dropdown whose choices are a hierarchy - Cratis-owned, because PrimeReact 11 removed `TreeSelect`\n * outright and left neither a replacement component nor a headless hook to build one from.\n *\n * It is assembled from the two v11 pieces that did survive and together cover the behavior: `Popover`\n * provides the trigger, the portal and the outside-click and Escape handling, and `Tree` provides the\n * node list, the expand/collapse state and keyboard navigation. Nothing here re-implements either - the\n * component is the seam between them, plus the translation from Scene's {@link TreeNode} to the\n * `TreeNodeData` the tree wants.\n *\n * What it deliberately does not carry over from v10, so that no caller is misled into expecting it:\n * **checkbox multi-select** - selection is single, `onChange` yields one key, and there is no partial or\n * \"n selected\" state to reason about; and **filtering** - v10's `filter` prop searched the node labels\n * and rebuilt the visible tree around the matches, which is a real amount of behavior (match, keep\n * ancestors, force-expand, restore on clear) and belongs in the component only once something actually\n * needs it.\n */\nexport function TreeSelect({ value, options, placeholder, disabled, onChange }: TreeSelectProps) {\n const [open, setOpen] = useState(false);\n const nodes = useMemo(() => toTreeNodeData(options), [options]);\n const label = findLabel(nodes, value);\n\n return (\n <Popover.Root open={open} onOpenChange={(event) => setOpen(event.value === true)}>\n <Popover.Trigger disabled={disabled}>\n <span>{label ?? placeholder}</span>\n <i className='pi pi-chevron-down' />\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Positioner>\n <Popover.Popup>\n <Popover.Content>\n <Tree.Root\n value={nodes}\n selectionMode='single'\n selectionKeys={value === undefined ? {} : { [value]: true }}\n onSelectionChange={(event) => {\n const selected = Object.keys(event.value).find((key) => event.value[key] === true);\n if (selected === undefined) return;\n onChange?.(selected);\n setOpen(false);\n }}>\n <Tree.Nodes>\n {(row) => (\n <Tree.Node uKey={row.node.key}>\n <Tree.Content>\n <Tree.Toggle>\n <Tree.ToggleIndicator>\n <i className={row.expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'} />\n </Tree.ToggleIndicator>\n </Tree.Toggle>\n <Tree.Label>{row.node.label}</Tree.Label>\n </Tree.Content>\n </Tree.Node>\n )}\n </Tree.Nodes>\n </Tree.Root>\n </Popover.Content>\n </Popover.Popup>\n </Popover.Positioner>\n </Popover.Portal>\n </Popover.Root>\n );\n}\n\n/**\n * Converts Scene's {@link TreeNode} model into the one PrimeReact 11's `Tree` reads.\n *\n * The two shapes agree on everything that matters except one thing: `key` is optional on a Scene node and\n * required on a PrimeReact one, because the tree keys expansion and selection off it. A missing key is\n * synthesized from the node's position, which is unique and stable across re-renders - the same rule\n * `toTreeNodes` applies, repeated here so this component is correct even when handed nodes that did not\n * come through it.\n *\n * @param nodes The Scene nodes to convert.\n * @param parentKey The key of the node these belong to, used to build unique child keys.\n * @returns The converted nodes, in order.\n */\nfunction toTreeNodeData(nodes: TreeNode[], parentKey = ''): TreeNodeData[] {\n return nodes.map((node, index) => {\n const key = node.key ?? (parentKey === '' ? `${index}` : `${parentKey}-${index}`);\n return {\n key,\n label: node.label,\n icon: node.icon,\n children: node.children === undefined ? undefined : toTreeNodeData(node.children, key),\n };\n });\n}\n\n/**\n * Finds the label to show on the trigger for a selected key.\n *\n * The selection is a key rather than a node because that is all the tree reports, so the label has to be\n * looked back up - and it has to search the whole hierarchy, since the selected node is very rarely a\n * root one.\n *\n * @param nodes The converted nodes to search.\n * @param key The selected key, or `undefined` when nothing is selected.\n * @returns The node's label, or `undefined` when nothing is selected or the key matches no node.\n */\nfunction findLabel(nodes: TreeNodeData[], key: string | undefined): ReactNode {\n if (key === undefined) return undefined;\n for (const node of nodes) {\n if (node.key === key) return node.label;\n const found = node.children === undefined ? undefined : findLabel(node.children, key);\n if (found !== undefined) return found;\n }\n\n return undefined;\n}\n"],"names":["TreeSelect","value","options","placeholder","disabled","onChange","open","setOpen","useState","nodes","useMemo","toTreeNodeData","label","findLabel","_jsxs","Popover","Root","onOpenChange","event","Trigger","_jsx","span","i","className","Portal","Positioner","Popup","Content","Tree","selectionMode","selectionKeys","undefined","onSelectionChange","selected","Object","keys","find","key","Nodes","row","Node","uKey","node","Toggle","ToggleIndicator","expanded","Label","parentKey","map","index","icon","children","found"],"mappings":";;;;;;;AA+CA;;;;;;;;;;;;;;;;AAgBC,IACM,SAASA,UAAAA,CAAW,EAAEC,KAAK,EAAEC,OAAO,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,QAAQ,EAAmB,EAAA;AAC3F,IAAA,MAAM,CAACC,IAAAA,EAAMC,OAAAA,CAAQ,GAAGC,cAAAA,CAAS,KAAA,CAAA;AACjC,IAAA,MAAMC,KAAAA,GAAQC,aAAAA,CAAQ,IAAMC,cAAAA,CAAeT,OAAAA,CAAAA,EAAU;AAACA,QAAAA;AAAQ,KAAA,CAAA;IAC9D,MAAMU,KAAAA,GAAQC,U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MW,QAAQjC,KAAAA,CAAO;AACtB,QAAA,IAAIiC,KAAKL,GAAG,KAAKA,GAAAA,EAAK,OAAOK,KAAK9B,KAAK;QACvC,MAAMwC,KAAAA,GAAQV,KAAKS,QAAQ,KAAKpB,YAAYA,SAAAA,GAAYlB,SAAAA,CAAU6B,IAAAA,CAAKS,QAAQ,EAAEd,GAAAA,CAAAA;QACjF,IAAIe,KAAAA,KAAUrB,WAAW,OAAOqB,KAAAA;AACpC,IAAA;IAEA,OAAOrB,SAAAA;AACX;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Image.js","sources":["../../../media/Image.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { HTMLAttributes, useState } from 'react';\nimport { Dialog } from 'primereact/dialog';\n\n/**\n * Configuration for {@link Image}.\n */\nexport interface ImageProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {\n /**\n * Where the picture comes from. Optional because a screen under construction routinely names an image\n * before it has one, and that is not a failure worth taking a page down for.\n */\n src?: string;\n\n /**\n * The alternative text. Defaults to empty, which marks the image decorative - an image with no\n * authored alternative is decorative until someone says otherwise, and inventing text from the file\n * name would put a URL fragment in front of a screen reader.\n */\n alt?: string;\n\n /**\n * The rendered width, as any CSS length or a bare pixel count.\n */\n width?: string;\n\n /**\n * The rendered height, as any CSS length or a bare pixel count.\n */\n height?: string;\n\n /**\n * Whether clicking the image opens it full size in an overlay. Off by default: a picture that grows\n * when clicked is a promise, and one made on every thumbnail in a layout is usually a mistake.\n */\n preview?: boolean;\n}\n\n/**\n * A picture, optionally openable full size in an overlay.\n *\n * Cratis owns this component. PrimeReact 10 had `Image`; PrimeReact 11 removed it with no replacement and\n * no headless hook, while `image` remains a name this package's manifest publishes. The plain case is a\n * plain `img` - there was never much to a themed image - and the preview reuses PrimeReact 11's `Dialog`,\n * which survived, so the overlay keeps the application's focus trapping, escape handling and stacking\n * rather than growing a second, worse implementation of all three here.\n *\n * With no `src`, an empty element is rendered rather than a broken `img`. That keeps whatever identifying\n * attributes the caller passed in the document, which is what lets a design-time tool still find and\n * select the element it has not finished authoring.\n *\n * What it deliberately does not carry over from v10: the preview toolbar - zoom in and out, rotate, flip,\n * download - which is a viewer rather than an image and is exactly what the `galleria` component is for;\n * `indicatorIcon` and the hover indicator overlay; the `imageStyle` / `previewStyle` prop pairs, since\n * `className` and `style` already reach the element; and `zoomInDisabled` / `zoomOutDisabled`, which only\n * ever meant anything to that toolbar.\n */\nexport function Image({ src, alt = '', width, height, preview = false, className, ...rest }: ImageProps) {\n const [open, setOpen] = useState(false);\n\n if (src === undefined || src === '') return <span {...rest} className={className} />;\n\n const image = <img src={src} alt={alt} width={width} height={height} className='max-w-full' />;\n\n if (!preview) {\n return (\n <span {...rest} className={className}>\n {image}\n </span>\n );\n }\n\n return (\n <span {...rest} className={className}>\n <button\n type='button'\n className='cursor-zoom-in border-0 bg-transparent p-0'\n aria-label={alt === '' ? 'Open image preview' : `Open preview of ${alt}`}\n onClick={() => setOpen(true)}>\n {image}\n </button>\n <Dialog.Root open={open} onOpenChange={(event) => setOpen(event.value === true)} modal dismissable>\n <Dialog.Portal>\n <Dialog.Backdrop />\n <Dialog.Positioner>\n <Dialog.Popup>\n <Dialog.Header>\n <Dialog.Title>{alt === '' ? 'Preview' : alt}</Dialog.Title>\n <Dialog.Close aria-label='Close preview'>\n <i className='pi pi-times' aria-hidden='true' />\n </Dialog.Close>\n </Dialog.Header>\n <Dialog.Content>\n <img src={src} alt={alt} className='max-h-[80vh] max-w-[80vw]' />\n </Dialog.Content>\n </Dialog.Popup>\n </Dialog.Positioner>\n </Dialog.Portal>\n </Dialog.Root>\n </span>\n );\n}\n"],"names":["Image","src","alt","width","height","preview","className","rest","open","setOpen","useState","undefined","_jsx","span","image","img","_jsxs","button","type","aria-label","onClick","Dialog","Root","onOpenChange","event","value","modal","dismissable","Portal","Backdrop","Positioner","Popup","Header","Title","Close","i","aria-hidden","Content"],"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ACS,cAAOC,IAAI,EAAA;gBAACd,IAAAA,EAAMA,IAAAA;AAAMe,gBAAAA,YAAAA,EAAc,CAACC,KAAAA,GAAUf,OAAAA,CAAQe,KAAAA,CAAMC,KAAK,KAAK,IAAA,CAAA;gBAAOC,KAAK,EAAA,IAAA;gBAACC,WAAW,EAAA,IAAA;wCAC9FX,eAAA,CAACK,cAAOO,MAAM,EAAA;;AACV,sCAAAhB,cAAA,CAACS,cAAOQ,QAAQ,EAAA,EAAA,CAAA;AAChB,sCAAAjB,cAAA,CAACS,cAAOS,UAAU,EAAA;oDACdd,eAAA,CAACK,cAAOU,KAAK,EAAA;;AACT,kDAAAf,eAAA,CAACK,cAAOW,MAAM,EAAA;;AACV,0DAAApB,cAAA,CAACS,cAAOY,KAAK,EAAA;AAAE/B,gDAAAA,QAAAA,EAAAA,GAAAA,KAAQ,KAAK,SAAA,GAAYA;;AACxC,0DAAAU,cAAA,CAACS,cAAOa,KAAK,EAAA;gDAACf,YAAAA,EAAW,eAAA;AACrB,gDAAA,QAAA,gBAAAP,cAAA,CAACuB,GAAAA,EAAAA;oDAAE7B,SAAAA,EAAU,aAAA;oDAAc8B,aAAAA,EAAY;;;;;AAG/C,kDAAAxB,cAAA,CAACS,cAAOgB,OAAO,EAAA;AACX,wCAAA,QAAA,gBAAAzB,cAAA,CAACG,KAAAA,EAAAA;4CAAId,GAAAA,EAAKA,GAAAA;4CAAKC,GAAAA,EAAKA,GAAAA;4CAAKI,SAAAA,EAAU;;;;;;;;;;;AAQnE;;;;"}
1
+ {"version":3,"file":"Image.js","sources":["../../../media/Image.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { HTMLAttributes, useState } from 'react';\nimport { Dialog } from 'primereact/dialog';\n\n/**\n * Configuration for {@link Image}.\n */\nexport interface ImageProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {\n /**\n * Where the picture comes from. Optional because a screen under construction routinely names an image\n * before it has one, and that is not a failure worth taking a page down for.\n */\n src?: string;\n\n /**\n * The alternative text. Defaults to empty, which marks the image decorative - an image with no\n * authored alternative is decorative until someone says otherwise, and inventing text from the file\n * name would put a URL fragment in front of a screen reader.\n */\n alt?: string;\n\n /**\n * The rendered width, as any CSS length or a bare pixel count.\n */\n width?: string;\n\n /**\n * The rendered height, as any CSS length or a bare pixel count.\n */\n height?: string;\n\n /**\n * Whether clicking the image opens it full size in an overlay. Off by default: a picture that grows\n * when clicked is a promise, and one made on every thumbnail in a layout is usually a mistake.\n */\n preview?: boolean;\n}\n\n/**\n * A picture, optionally openable full size in an overlay.\n *\n * Cratis owns this component. PrimeReact 10 had `Image`; PrimeReact 11 removed it with no replacement and\n * no headless hook, while `image` remains a name this package's manifest publishes. The plain case is a\n * plain `img` - there was never much to a themed image - and the preview reuses PrimeReact 11's `Dialog`,\n * which survived, so the overlay keeps the application's focus trapping, escape handling and stacking\n * rather than growing a second, worse implementation of all three here.\n *\n * With no `src`, an empty element is rendered rather than a broken `img`. That keeps whatever identifying\n * attributes the caller passed in the document, which is what lets a design-time tool still find and\n * select the element it has not finished authoring.\n *\n * What it deliberately does not carry over from v10: the preview toolbar - zoom in and out, rotate, flip,\n * download - which is a viewer rather than an image and is exactly what the `galleria` component is for;\n * `indicatorIcon` and the hover indicator overlay; the `imageStyle` / `previewStyle` prop pairs, since\n * `className` and `style` already reach the element; and `zoomInDisabled` / `zoomOutDisabled`, which only\n * ever meant anything to that toolbar.\n */\nexport function Image({ src, alt = '', width, height, preview = false, className, ...rest }: ImageProps) {\n const [open, setOpen] = useState(false);\n\n if (src === undefined || src === '') return <span {...rest} className={className} />;\n\n const image = <img src={src} alt={alt} width={width} height={height} className='max-w-full' />;\n\n if (!preview) {\n return (\n <span {...rest} className={className}>\n {image}\n </span>\n );\n }\n\n return (\n <span {...rest} className={className}>\n <button\n type='button'\n className='cursor-zoom-in border-0 bg-transparent p-0'\n aria-label={alt === '' ? 'Open image preview' : `Open preview of ${alt}`}\n onClick={() => setOpen(true)}>\n {image}\n </button>\n <Dialog.Root open={open} onOpenChange={(event) => setOpen(event.value === true)} modal dismissable>\n <Dialog.Portal>\n <Dialog.Backdrop />\n <Dialog.Positioner>\n <Dialog.Popup>\n <Dialog.Header>\n <Dialog.Title>{alt === '' ? 'Preview' : alt}</Dialog.Title>\n <Dialog.Close aria-label='Close preview'>\n <i className='pi pi-times' aria-hidden='true' />\n </Dialog.Close>\n </Dialog.Header>\n <Dialog.Content>\n <img src={src} alt={alt} className='max-h-[80vh] max-w-[80vw]' />\n </Dialog.Content>\n </Dialog.Popup>\n </Dialog.Positioner>\n </Dialog.Portal>\n </Dialog.Root>\n </span>\n );\n}\n"],"names":["Image","src","alt","width","height","preview","className","rest","open","setOpen","useState","undefined","_jsx","span","image","img","_jsxs","button","type","aria-label","onClick","Dialog","Root","onOpenChange","event","value","modal","dismissable","Portal","Backdrop","Positioner","Popup","Header","Title","Close","i","aria-hidden","Content"],"mappings":";;;;;;AAwCA;;;;;;;;;;;;;;;;;;AAkBC,IACM,SAASA,KAAAA,CAAM,EAAEC,GAAG,EAAEC,MAAM,EAAE,EAAEC,KAAK,EAAEC,MAAM,EAAEC,OAAAA,GAAU,KAAK,EAAEC,SAAS,EAAE,GAAGC,IAAAA,EAAkB,EAAA;AACnG,IAAA,MAAM,CAACC,IAAAA,EAAMC,OAAAA,CAAQ,GAAGC,cAAAA,CAAS,KAAA,CAAA;AAEjC,IAAA,IAAIT,GAAAA,KAAQU,SAAAA,IAAaV,GAAAA,KAAQ,EAAA,EAAI,qBAAOW,cAAA,CAACC,MAAAA,EAAAA;AAAM,QAAA,GAAGN,IAAI;QAAED,SAAAA,EAAWA;;AAEvE,IAAA,MAAMQ,sBAAQF,cAAA,CAACG,KAAAA,EAAAA;QAAId,GAAAA,EAAKA,GAAAA;QAAKC,GAAAA,EAAKA,GAAAA;QAAKC,KAAAA,EAAOA,KAAAA;QAAOC,MAAAA,EAAQA,MAAAA;QAAQE,SAA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,gDAAA,QAAA,gBAAAP,cAAA,CAACuB,GAAAA,EAAAA;oDAAE7B,SAAAA,EAAU,aAAA;oDAAc8B,aAAAA,EAAY;;;;;AAG/C,kDAAAxB,cAAA,CAACS,cAAOgB,OAAO,EAAA;AACX,wCAAA,QAAA,gBAAAzB,cAAA,CAACG,KAAAA,EAAAA;4CAAId,GAAAA,EAAKA,GAAAA;4CAAKC,GAAAA,EAAKA,GAAAA;4CAAKI,SAAAA,EAAU;;;;;;;;;;;AAQnE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeCarousel.js","sources":["../../../media/PrimeCarousel.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Carousel } from 'primereact/carousel';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, recordArrayProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:carousel` component - a row of items paged through horizontally.\n *\n * The item body is built from the `titleField` and `descriptionField` properties, for the same reason\n * `dataView` does it: the element carries records, not markup, and something has to decide which two\n * fields a reader sees. PrimeReact 11 takes that as children rather than as an `itemTemplate` callback,\n * which is why the mapping is written out here instead of passed in.\n *\n * v10's `numScroll` has no v11 counterpart and is not read: the new carousel scrolls by a page, and a page\n * is `numVisible` items. Honoring a `numScroll` that differs from it would mean re-implementing paging\n * against a component that has its own.\n *\n * Navigation and page indicators appear only when there is more than one page's worth of items. A control\n * that cannot do anything is worse than an absent one - it invites a click and answers with nothing.\n */\nexport function PrimeCarousel({ element }: RegisteredComponentProps) {\n const items = recordArrayProperty(element, 'items');\n const titleField = stringProperty(element, 'titleField', 'title');\n const descriptionField = stringProperty(element, 'descriptionField', 'description');\n const numVisible = numberProperty(element, 'numVisible', 3);\n return (\n <Carousel.Root data-scene-id={element.id} slidesPerPage={numVisible} loop={booleanProperty(element, 'circular', false)}>\n <Carousel.Content>\n {items.map((item, index) => (\n <Carousel.Item key={index}>\n <div className='m-2 flex flex-col gap-1 border p-3'>\n <span className='font-semibold'>{String(item[titleField] ?? '')}</span>\n <span className='text-sm opacity-75'>{String(item[descriptionField] ?? '')}</span>\n </div>\n </Carousel.Item>\n ))}\n </Carousel.Content>\n {items.length > numVisible && (\n <>\n <Carousel.Prev aria-label='Previous items'>\n <i className='pi pi-chevron-left' aria-hidden='true' />\n </Carousel.Prev>\n <Carousel.Next aria-label='Next items'>\n <i className='pi pi-chevron-right' aria-hidden='true' />\n </Carousel.Next>\n <Carousel.Indicators />\n </>\n )}\n </Carousel.Root>\n );\n}\n"],"names":["PrimeCarousel","element","items","recordArrayProperty","titleField","stringProperty","descriptionField","numVisible","numberProperty","_jsxs","Carousel","Root","data-scene-id","id","slidesPerPage","loop","booleanProperty","_jsx","Content","map","item","index","Item","div","className","span","String","length","_Fragment","Prev","aria-label","i","aria-hidden","Next","Indicators"],"mappings":";;;;;;AAOA;;;;;;;;;;;;;;AAcC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;IAC/D,MAAMC,KAAAA,GAAQC,+BAAoBF,OAAAA,EAAS,OAAA,CAAA;IAC3C,MAAMG,UAAAA,GAAaC,yBAAAA,CAAeJ,OAAAA,EAAS,YAAA,EAAc,OAAA,CAAA;IACzD,MAAMK,gBAAAA,GAAmBD,yBAAAA,CAAeJ,OAAAA,EAAS,kBAAA,EAAoB,aAAA,CAAA;IACrE,MAAMM,UAAAA,GAAaC,yBAAAA,CAAeP,OAAAA,EAAS,YAAA,EAAc,CAAA,CAAA;IACzD,qBACIQ,eAAA,CAACC,kBAASC,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAeX,QAAQY,EAAE;QAAEC,aAAAA,EAAeP,UAAAA;QAAYQ,IAAAA,EAAMC,0BAAAA,CAAgBf,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC5G,0BAAAgB,cAAA,CAACP,kBAASQ,OAAO,EAAA;AACZhB,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMiB,GAAG,CAAC,CAACC,MAAMC,KAAAA,iBACdJ,cAAA,CAACP,kBAASY,IAAI,EAAA;AACV,wBAAA,QAAA,gBAAAb,eAAA,CAACc,KAAAA,EAAAA;4BAAIC,SAAAA,EAAU,oCAAA;;8CACXP,cAAA,CAACQ,MAAAA,EAAAA;oCAAKD,SAAAA,EAAU,eAAA;8CAAiBE,MAAAA,CAAON,IAAI,CAAChB,UAAAA,CAAW,IAAI,EAAA;;8CAC5Da,cAAA,CAACQ,MAAAA,EAAAA;oCAAKD,SAAAA,EAAU,oBAAA;8CAAsBE,MAAAA,CAAON,IAAI,CAACd,gBAAAA,CAAiB,IAAI,EAAA;;;;AAH3De,qBAAAA,EAAAA,KAAAA,CAAAA;;YAQ3BnB,KAAAA,CAAMyB,MAAM,GAAGpB,UAAAA,kBACZE,eAAA,CAAAmB,mBAAA,EAAA;;AACI,kCAAAX,cAAA,CAACP,kBAASmB,IAAI,EAAA;wBAACC,YAAAA,EAAW,gBAAA;AACtB,wBAAA,QAAA,gBAAAb,cAAA,CAACc,GAAAA,EAAAA;4BAAEP,SAAAA,EAAU,oBAAA;4BAAqBQ,aAAAA,EAAY;;;AAElD,kCAAAf,cAAA,CAACP,kBAASuB,IAAI,EAAA;wBAACH,YAAAA,EAAW,YAAA;AACtB,wBAAA,QAAA,gBAAAb,cAAA,CAACc,GAAAA,EAAAA;4BAAEP,SAAAA,EAAU,qBAAA;4BAAsBQ,aAAAA,EAAY;;;AAEnD,kCAAAf,cAAA,CAACP,kBAASwB,UAAU,EAAA,EAAA;;;;;AAKxC;;;;"}
1
+ {"version":3,"file":"PrimeCarousel.js","sources":["../../../media/PrimeCarousel.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Carousel } from 'primereact/carousel';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, recordArrayProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:carousel` component - a row of items paged through horizontally.\n *\n * The item body is built from the `titleField` and `descriptionField` properties, for the same reason\n * `dataView` does it: the element carries records, not markup, and something has to decide which two\n * fields a reader sees. PrimeReact 11 takes that as children rather than as an `itemTemplate` callback,\n * which is why the mapping is written out here instead of passed in.\n *\n * v10's `numScroll` has no v11 counterpart and is not read: the new carousel scrolls by a page, and a page\n * is `numVisible` items. Honoring a `numScroll` that differs from it would mean re-implementing paging\n * against a component that has its own.\n *\n * Navigation and page indicators appear only when there is more than one page's worth of items. A control\n * that cannot do anything is worse than an absent one - it invites a click and answers with nothing.\n */\nexport function PrimeCarousel({ element }: RegisteredComponentProps) {\n const items = recordArrayProperty(element, 'items');\n const titleField = stringProperty(element, 'titleField', 'title');\n const descriptionField = stringProperty(element, 'descriptionField', 'description');\n const numVisible = numberProperty(element, 'numVisible', 3);\n return (\n <Carousel.Root data-scene-id={element.id} slidesPerPage={numVisible} loop={booleanProperty(element, 'circular', false)}>\n <Carousel.Content>\n {items.map((item, index) => (\n <Carousel.Item key={index}>\n <div className='m-2 flex flex-col gap-1 border p-3'>\n <span className='font-semibold'>{String(item[titleField] ?? '')}</span>\n <span className='text-sm opacity-75'>{String(item[descriptionField] ?? '')}</span>\n </div>\n </Carousel.Item>\n ))}\n </Carousel.Content>\n {items.length > numVisible && (\n <>\n <Carousel.Prev aria-label='Previous items'>\n <i className='pi pi-chevron-left' aria-hidden='true' />\n </Carousel.Prev>\n <Carousel.Next aria-label='Next items'>\n <i className='pi pi-chevron-right' aria-hidden='true' />\n </Carousel.Next>\n <Carousel.Indicators />\n </>\n )}\n </Carousel.Root>\n );\n}\n"],"names":["PrimeCarousel","element","items","recordArrayProperty","titleField","stringProperty","descriptionField","numVisible","numberProperty","_jsxs","Carousel","Root","data-scene-id","id","slidesPerPage","loop","booleanProperty","_jsx","Content","map","item","index","Item","div","className","span","String","length","_Fragment","Prev","aria-label","i","aria-hidden","Next","Indicators"],"mappings":";;;;;;AAOA;;;;;;;;;;;;;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