pixelon 0.9.2 → 0.9.4

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 (225) hide show
  1. package/dist/components/atoms/lumi/PhoneInput/PhoneInput.d.ts +29 -0
  2. package/dist/components/atoms/lumi/PhoneInput/index.d.ts +3 -0
  3. package/dist/components/atoms/lumi/PhoneInput/phone-countries.d.ts +19 -0
  4. package/dist/components/atoms/lumi/SheetSelect/SheetSelect.d.ts +32 -0
  5. package/dist/components/atoms/lumi/SheetSelect/index.d.ts +2 -0
  6. package/dist/components/molecules/chat/StructuredContent/components/LocationField/types.d.ts +2 -0
  7. package/dist/components/molecules/chat/StructuredContent/components/MapView/types.d.ts +7 -0
  8. package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/types.d.ts +23 -1
  9. package/dist/components/organisms/lumi/DynamicForm/helpers/sanitizers.d.ts +28 -0
  10. package/dist/components/organisms/lumi/DynamicForm/types.d.ts +4 -0
  11. package/dist/components/templates/lumi/Crud/types.d.ts +6 -0
  12. package/dist/index.d.ts +3 -0
  13. package/dist/index.esm.js +702 -263
  14. package/dist/index.js +709 -262
  15. package/dist/styles.css +1 -1
  16. package/dist/styles.css.map +1 -1
  17. package/package.json +1 -1
  18. package/src/styles/index.scss +2 -0
  19. package/dist/components/atoms/chat/AudioWaves/AudioWaves(1).d.ts +0 -21
  20. package/dist/components/atoms/chat/AudioWaves/index(1).d.ts +0 -2
  21. package/dist/components/atoms/chat/DateDivider/DateDivider(1).d.ts +0 -7
  22. package/dist/components/atoms/chat/Loader/Loader(1).d.ts +0 -10
  23. package/dist/components/atoms/chat/Loader/index(1).d.ts +0 -2
  24. package/dist/components/atoms/chat/Select/index(1).d.ts +0 -2
  25. package/dist/components/atoms/lumi/Button/Button(1).d.ts +0 -17
  26. package/dist/components/atoms/lumi/Checkbox/Checkbox(1).d.ts +0 -5
  27. package/dist/components/atoms/lumi/Checkbox/index(1).d.ts +0 -2
  28. package/dist/components/atoms/lumi/Checkbox/index(2).d.ts +0 -2
  29. package/dist/components/atoms/lumi/Checkbox/types(1).d.ts +0 -93
  30. package/dist/components/atoms/lumi/CurrencyDisplay/index(1).d.ts +0 -2
  31. package/dist/components/atoms/lumi/DateDisplay/index(1).d.ts +0 -2
  32. package/dist/components/atoms/lumi/DateDisplay/index(2).d.ts +0 -2
  33. package/dist/components/atoms/lumi/DateInput/DateInput(1).d.ts +0 -27
  34. package/dist/components/atoms/lumi/DateInput/WebDatePicker(1).d.ts +0 -19
  35. package/dist/components/atoms/lumi/DateInput/WebDatePicker(2).d.ts +0 -19
  36. package/dist/components/atoms/lumi/Icon/Icon(1).d.ts +0 -52
  37. package/dist/components/atoms/lumi/Input/index(1).d.ts +0 -3
  38. package/dist/components/atoms/lumi/Popover/index(1).d.ts +0 -2
  39. package/dist/components/atoms/lumi/Popover/types(1).d.ts +0 -62
  40. package/dist/components/atoms/lumi/TextArea/index(1).d.ts +0 -2
  41. package/dist/components/atoms/lumi/TextArea/types(1).d.ts +0 -35
  42. package/dist/components/atoms/lumi/TimeInput/TimeInput(1).d.ts +0 -27
  43. package/dist/components/atoms/lumi/TimeInput/TimeInput(2).d.ts +0 -27
  44. package/dist/components/molecules/chat/FullscreenViewer/hooks/useSwipeGestures(1).d.ts +0 -12
  45. package/dist/components/molecules/chat/StructuredContent/StructuredContent(1).d.ts +0 -10
  46. package/dist/components/molecules/chat/StructuredContent/components/Cart/Cart.d.ts +0 -3
  47. package/dist/components/molecules/chat/StructuredContent/components/ProductCard/ProductCard.d.ts +0 -3
  48. package/dist/components/molecules/chat/StructuredContent/components/ProductCarousel/ProductCarousel.d.ts +0 -3
  49. package/dist/components/molecules/chat/StructuredContent/components/ProductManager/ProductManager.d.ts +0 -3
  50. package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/PriceNegotiationChat.d.ts +0 -4
  51. package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/DynamicField(1).d.ts +0 -13
  52. package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/buildYupSchema(1).d.ts +0 -4
  53. package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/types(1).d.ts +0 -91
  54. package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/useReactiveEndpoints(1).d.ts +0 -17
  55. package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/useReactiveEndpoints(2).d.ts +0 -23
  56. package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/useReactiveForm(1).d.ts +0 -38
  57. package/dist/components/molecules/chat/StructuredContent/components/ReactiveMap/ReactiveMap.d.ts +0 -12
  58. package/dist/components/molecules/chat/StructuredContent/components/ReactiveMap/ReactiveMapChat.d.ts +0 -3
  59. package/dist/components/molecules/chat/StructuredContent/components/ReactiveMap/types.d.ts +0 -36
  60. package/dist/components/molecules/chat/StructuredContent/components/ServiceShortcuts/ServiceShortcutsChat.d.ts +0 -3
  61. package/dist/components/molecules/chat/StructuredContent/helpers/contentParser(1).d.ts +0 -7
  62. package/dist/components/molecules/chat/StructuredContent/index(1).d.ts +0 -2
  63. package/dist/components/molecules/lumi/Breadcrumb/Breadcrumb(1).d.ts +0 -10
  64. package/dist/components/molecules/lumi/Breadcrumb/Breadcrumb(2).d.ts +0 -10
  65. package/dist/components/molecules/lumi/Breadcrumb/types(1).d.ts +0 -105
  66. package/dist/components/molecules/lumi/Checkbox/Checkbox(1).d.ts +0 -11
  67. package/dist/components/molecules/lumi/Checkbox/index(1).d.ts +0 -4
  68. package/dist/components/molecules/lumi/Checkbox/use-cases/index(1).d.ts +0 -1
  69. package/dist/components/molecules/lumi/Checkbox/validation-helpers(1).d.ts +0 -151
  70. package/dist/components/molecules/lumi/DateInput/FormDateInput(1).d.ts +0 -12
  71. package/dist/components/molecules/lumi/DateInput/index(1).d.ts +0 -2
  72. package/dist/components/molecules/lumi/DateInput/use-cases/FormDateInputClearWithResetUseCase(1).d.ts +0 -21
  73. package/dist/components/molecules/lumi/DateInput/use-cases/FormDateInputErrorVisibilityUseCase(1).d.ts +0 -21
  74. package/dist/components/molecules/lumi/Drawer/Drawer(1).d.ts +0 -39
  75. package/dist/components/molecules/lumi/Drawer/index(1).d.ts +0 -2
  76. package/dist/components/molecules/lumi/DropdownMenu/DropdownMenu(1).d.ts +0 -22
  77. package/dist/components/molecules/lumi/DropdownMenu/index(1).d.ts +0 -2
  78. package/dist/components/molecules/lumi/DropdownMenu/types(1).d.ts +0 -29
  79. package/dist/components/molecules/lumi/Filter/FilterRow(1).d.ts +0 -13
  80. package/dist/components/molecules/lumi/Filter/helpers/conditionHelpers(1).d.ts +0 -14
  81. package/dist/components/molecules/lumi/Filter/index(1).d.ts +0 -5
  82. package/dist/components/molecules/lumi/Filter/types(1).d.ts +0 -115
  83. package/dist/components/molecules/lumi/Input/Input(1).d.ts +0 -12
  84. package/dist/components/molecules/lumi/Menu/Menu(1).d.ts +0 -18
  85. package/dist/components/molecules/lumi/Menu/MenuContext(1).d.ts +0 -41
  86. package/dist/components/molecules/lumi/Menu/MenuItem(1).d.ts +0 -6
  87. package/dist/components/molecules/lumi/Menu/MenuItem(2).d.ts +0 -6
  88. package/dist/components/molecules/lumi/Menu/MenuItemGroup(1).d.ts +0 -6
  89. package/dist/components/molecules/lumi/Menu/SubMenu(1).d.ts +0 -6
  90. package/dist/components/molecules/lumi/Menu/iconHelper(1).d.ts +0 -15
  91. package/dist/components/molecules/lumi/Menu/index(1).d.ts +0 -8
  92. package/dist/components/molecules/lumi/Menu/index(2).d.ts +0 -8
  93. package/dist/components/molecules/lumi/Menu/types(1).d.ts +0 -119
  94. package/dist/components/molecules/lumi/Pagination/Pagination(1).d.ts +0 -4
  95. package/dist/components/molecules/lumi/Pagination/index(1).d.ts +0 -2
  96. package/dist/components/molecules/lumi/Select/Select(1).d.ts +0 -14
  97. package/dist/components/molecules/lumi/Select/Select(2).d.ts +0 -14
  98. package/dist/components/molecules/lumi/Select/Select(3).d.ts +0 -14
  99. package/dist/components/molecules/lumi/Select/index(1).d.ts +0 -2
  100. package/dist/components/molecules/lumi/Select/index(2).d.ts +0 -2
  101. package/dist/components/molecules/lumi/Select/use-cases/FormSelectClearWithResetUseCase(1).d.ts +0 -21
  102. package/dist/components/molecules/lumi/Select/use-cases/FormSelectClearWithResetUseCase(2).d.ts +0 -21
  103. package/dist/components/molecules/lumi/Select/use-cases/index(1).d.ts +0 -2
  104. package/dist/components/molecules/lumi/Select/use-cases/index(2).d.ts +0 -2
  105. package/dist/components/molecules/lumi/SessionExpiryPrompt/SessionExpiryPrompt.d.ts +0 -25
  106. package/dist/components/molecules/lumi/SessionExpiryPrompt/index.d.ts +0 -1
  107. package/dist/components/molecules/lumi/Table/Table(1).d.ts +0 -6
  108. package/dist/components/molecules/lumi/Table/Table(2).d.ts +0 -6
  109. package/dist/components/molecules/lumi/Table/index(1).d.ts +0 -2
  110. package/dist/components/molecules/lumi/Table/types(1).d.ts +0 -177
  111. package/dist/components/molecules/lumi/Table/types(2).d.ts +0 -177
  112. package/dist/components/molecules/lumi/Tabs/Tabs(1).d.ts +0 -4
  113. package/dist/components/molecules/lumi/Tabs/Tabs(2).d.ts +0 -4
  114. package/dist/components/molecules/lumi/Tabs/index(1).d.ts +0 -2
  115. package/dist/components/molecules/lumi/Tabs/index(2).d.ts +0 -2
  116. package/dist/components/molecules/lumi/TimeInput/FormTimeInput(1).d.ts +0 -12
  117. package/dist/components/molecules/lumi/TimeInput/use-cases/FormTimeInputClearWithResetUseCase(1).d.ts +0 -21
  118. package/dist/components/molecules/lumi/TimeInput/use-cases/FormTimeInputErrorVisibilityUseCase(1).d.ts +0 -21
  119. package/dist/components/molecules/lumi/TimeInput/use-cases/index(1).d.ts +0 -4
  120. package/dist/components/organisms/chat/Chat/Chat(1).d.ts +0 -12
  121. package/dist/components/organisms/chat/Chat/hooks/useChatHandlers(1).d.ts +0 -15
  122. package/dist/components/organisms/chat/Chat/hooks/useKeyboardLock(1).d.ts +0 -15
  123. package/dist/components/organisms/chat/Chat/index(1).d.ts +0 -3
  124. package/dist/components/organisms/chat/Chat/store/index(1).d.ts +0 -4
  125. package/dist/components/organisms/chat/Chat/use-cases/GroupMessagesByDateUseCase(1).d.ts +0 -20
  126. package/dist/components/organisms/chat/index(1).d.ts +0 -3
  127. package/dist/components/organisms/chat/index(2).d.ts +0 -3
  128. package/dist/components/organisms/lumi/ActionBar/ActionBar(1).d.ts +0 -18
  129. package/dist/components/organisms/lumi/ActionBar/types(1).d.ts +0 -57
  130. package/dist/components/organisms/lumi/BaseNavbar/types(1).d.ts +0 -34
  131. package/dist/components/organisms/lumi/BaseWorkspace/BaseWorkspace(1).d.ts +0 -28
  132. package/dist/components/organisms/lumi/BaseWorkspace/index(1).d.ts +0 -2
  133. package/dist/components/organisms/lumi/Calendar/components/CalendarEvent(1).d.ts +0 -18
  134. package/dist/components/organisms/lumi/Calendar/components/CalendarEvent(2).d.ts +0 -18
  135. package/dist/components/organisms/lumi/Calendar/components/CalendarEvent(3).d.ts +0 -18
  136. package/dist/components/organisms/lumi/Calendar/components/CalendarHeader(1).d.ts +0 -14
  137. package/dist/components/organisms/lumi/Calendar/components/TimeGutter(1).d.ts +0 -10
  138. package/dist/components/organisms/lumi/Calendar/components/TimeGutter(2).d.ts +0 -10
  139. package/dist/components/organisms/lumi/Calendar/hooks/index(1).d.ts +0 -4
  140. package/dist/components/organisms/lumi/Calendar/hooks/useCalendarHeight(1).d.ts +0 -58
  141. package/dist/components/organisms/lumi/Calendar/hooks/useCalendarHeight(2).d.ts +0 -58
  142. package/dist/components/organisms/lumi/Calendar/hooks/useEventLayout(1).d.ts +0 -21
  143. package/dist/components/organisms/lumi/Calendar/hooks/useEventLayout(2).d.ts +0 -21
  144. package/dist/components/organisms/lumi/Calendar/hooks/useTimeSlots(1).d.ts +0 -14
  145. package/dist/components/organisms/lumi/Calendar/hooks/useTimeSlots(2).d.ts +0 -14
  146. package/dist/components/organisms/lumi/Calendar/hooks/useTimeSlots(3).d.ts +0 -14
  147. package/dist/components/organisms/lumi/Calendar/i18n/index(1).d.ts +0 -1
  148. package/dist/components/organisms/lumi/Calendar/i18n/index(2).d.ts +0 -1
  149. package/dist/components/organisms/lumi/Calendar/i18n/translations(1).d.ts +0 -34
  150. package/dist/components/organisms/lumi/Calendar/index(1).d.ts +0 -2
  151. package/dist/components/organisms/lumi/Calendar/utils/dateUtils(1).d.ts +0 -140
  152. package/dist/components/organisms/lumi/Calendar/utils/dateUtils(2).d.ts +0 -140
  153. package/dist/components/organisms/lumi/Calendar/utils/index(1).d.ts +0 -2
  154. package/dist/components/organisms/lumi/Calendar/utils/multiDayUtils(1).d.ts +0 -73
  155. package/dist/components/organisms/lumi/Calendar/views/DayView(1).d.ts +0 -17
  156. package/dist/components/organisms/lumi/Calendar/views/DayView(2).d.ts +0 -17
  157. package/dist/components/organisms/lumi/Calendar/views/MonthView(1).d.ts +0 -17
  158. package/dist/components/organisms/lumi/Calendar/views/MonthView(2).d.ts +0 -17
  159. package/dist/components/organisms/lumi/Calendar/views/WeekView(1).d.ts +0 -19
  160. package/dist/components/organisms/lumi/Calendar/views/WeekView(2).d.ts +0 -19
  161. package/dist/components/organisms/lumi/Calendar/views/YearView(1).d.ts +0 -13
  162. package/dist/components/organisms/lumi/Calendar/views/index(1).d.ts +0 -4
  163. package/dist/components/organisms/lumi/Calendar/views/index(2).d.ts +0 -4
  164. package/dist/components/organisms/lumi/DashboardNavbar/index(1).d.ts +0 -7
  165. package/dist/components/organisms/lumi/DashboardNavbar/types(1).d.ts +0 -52
  166. package/dist/components/organisms/lumi/DashboardWorkspace/DashboardWorkspace(1).d.ts +0 -23
  167. package/dist/components/organisms/lumi/DashboardWorkspace/DashboardWorkspace(2).d.ts +0 -23
  168. package/dist/components/organisms/lumi/DashboardWorkspace/index(1).d.ts +0 -7
  169. package/dist/components/organisms/lumi/DashboardWorkspace/index(2).d.ts +0 -7
  170. package/dist/components/organisms/lumi/DashboardWorkspace/types(1).d.ts +0 -60
  171. package/dist/components/organisms/lumi/DashboardWorkspace/types(2).d.ts +0 -60
  172. package/dist/components/organisms/lumi/DynamicForm/DynamicForm(1).d.ts +0 -21
  173. package/dist/components/organisms/lumi/DynamicForm/helpers/fieldMapper(1).d.ts +0 -17
  174. package/dist/components/organisms/lumi/DynamicForm/helpers/fieldMapper(2).d.ts +0 -17
  175. package/dist/components/organisms/lumi/DynamicForm/helpers/fieldRenderer(1).d.ts +0 -6
  176. package/dist/components/organisms/lumi/DynamicForm/helpers/fieldRenderer(2).d.ts +0 -6
  177. package/dist/components/organisms/lumi/DynamicForm/index(1).d.ts +0 -2
  178. package/dist/components/organisms/lumi/DynamicForm/index(2).d.ts +0 -2
  179. package/dist/components/organisms/lumi/DynamicForm/types(1).d.ts +0 -96
  180. package/dist/components/organisms/lumi/DynamicForm/types(2).d.ts +0 -96
  181. package/dist/components/organisms/lumi/FormDrawer/FormDrawer(1).d.ts +0 -5
  182. package/dist/components/organisms/lumi/FormDrawer/index(1).d.ts +0 -3
  183. package/dist/components/organisms/lumi/FormDrawer/types(1).d.ts +0 -61
  184. package/dist/components/organisms/lumi/FormDrawer/types(2).d.ts +0 -61
  185. package/dist/components/organisms/lumi/Stepper/StepIndicator(1).d.ts +0 -4
  186. package/dist/components/organisms/lumi/Stepper/Stepper(1).d.ts +0 -5
  187. package/dist/components/organisms/lumi/Stepper/index(1).d.ts +0 -3
  188. package/dist/components/organisms/lumi/Stepper/types(1).d.ts +0 -96
  189. package/dist/components/organisms/lumi/Stepper/types(2).d.ts +0 -96
  190. package/dist/components/organisms/lumi/index(1).d.ts +0 -10
  191. package/dist/components/organisms/lumi/index(2).d.ts +0 -10
  192. package/dist/components/templates/chat/ChatWidget/ChatWidget(1).d.ts +0 -10
  193. package/dist/components/templates/chat/ChatWidget/hooks/index(1).d.ts +0 -1
  194. package/dist/components/templates/chat/ChatWidget/index(1).d.ts +0 -2
  195. package/dist/components/templates/chat/ChatWidget/index(2).d.ts +0 -2
  196. package/dist/components/templates/chat/ChatWidget/types(1).d.ts +0 -90
  197. package/dist/components/templates/lumi/Base/hooks/index(1).d.ts +0 -2
  198. package/dist/components/templates/lumi/Base/hooks/useAppHeight(1).d.ts +0 -21
  199. package/dist/components/templates/lumi/Base/index(1).d.ts +0 -2
  200. package/dist/components/templates/lumi/Base/types(1).d.ts +0 -54
  201. package/dist/components/templates/lumi/Crud/Crud(1).d.ts +0 -6
  202. package/dist/components/templates/lumi/Crud/Crud(2).d.ts +0 -6
  203. package/dist/components/templates/lumi/Crud/ScrollToEnd.d.ts +0 -18
  204. package/dist/components/templates/lumi/Crud/helpers/fieldMapper(1).d.ts +0 -13
  205. package/dist/components/templates/lumi/Crud/hooks/useCrudActions(1).d.ts +0 -11
  206. package/dist/components/templates/lumi/Crud/index(1).d.ts +0 -2
  207. package/dist/components/templates/lumi/Crud/store/actions(1).d.ts +0 -45
  208. package/dist/components/templates/lumi/Crud/store/crudStore(1).d.ts +0 -8
  209. package/dist/components/templates/lumi/Crud/store/index(1).d.ts +0 -5
  210. package/dist/components/templates/lumi/Crud/store/types(1).d.ts +0 -71
  211. package/dist/components/templates/lumi/Dashboard/Dashboard(1).d.ts +0 -25
  212. package/dist/components/templates/lumi/Dashboard/hooks/index(1).d.ts +0 -12
  213. package/dist/components/templates/lumi/Dashboard/hooks/index(2).d.ts +0 -12
  214. package/dist/components/templates/lumi/Dashboard/hooks/useDashboardStore(1).d.ts +0 -34
  215. package/dist/components/templates/lumi/Dashboard/hooks/useScrollToTop(1).d.ts +0 -47
  216. package/dist/components/templates/lumi/Dashboard/index(1).d.ts +0 -10
  217. package/dist/components/templates/lumi/Dashboard/store/storeKeys(1).d.ts +0 -13
  218. package/dist/components/templates/lumi/Dashboard/store/types(1).d.ts +0 -73
  219. package/dist/components/templates/lumi/Dashboard/store/types(2).d.ts +0 -73
  220. package/dist/components/templates/lumi/Dashboard/types(1).d.ts +0 -114
  221. package/dist/components/templates/lumi/Dashboard/types(2).d.ts +0 -114
  222. package/dist/components/templates/lumi/index(1).d.ts +0 -3
  223. package/dist/core/chat/ChatConfigContext(1).d.ts +0 -36
  224. package/dist/index(1).esm.js +0 -19378
  225. package/dist/index(1).js +0 -19487
package/dist/index.js CHANGED
@@ -7364,6 +7364,7 @@ const Input$1 = React.forwardRef(
7364
7364
  );
7365
7365
  Input$1.displayName = "Input";
7366
7366
 
7367
+ const sinTildes$2 = (s) => s.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "");
7367
7368
  const Select$1 = React.forwardRef(
7368
7369
  ({
7369
7370
  options = [],
@@ -7412,7 +7413,7 @@ const Select$1 = React.forwardRef(
7412
7413
  const selectorRef = React.useRef(null);
7413
7414
  const [dropdownPosition, setDropdownPosition] = React.useState(null);
7414
7415
  const filteredOptions = showSearch && searchValue ? options.filter(
7415
- (option) => filterOption ? filterOption(searchValue, option) : option.label.toLowerCase().includes(searchValue.toLowerCase())
7416
+ (option) => filterOption ? filterOption(searchValue, option) : sinTildes$2(option.label).includes(sinTildes$2(searchValue))
7416
7417
  ) : options;
7417
7418
  const isOptionSelected = (option) => {
7418
7419
  if (mode === "multiple") {
@@ -12340,6 +12341,442 @@ const CurrencyDisplay = ({
12340
12341
  };
12341
12342
  CurrencyDisplay.displayName = "CurrencyDisplay";
12342
12343
 
12344
+ const CARD_VARIANTS = {
12345
+ /** Con sombra: flota sobre el contenido (hojas, diálogos, paneles). */
12346
+ ELEVATED: "elevated"};
12347
+ const CARD_PADDINGS = {
12348
+ MEDIUM: "medium",
12349
+ LARGE: "large"
12350
+ };
12351
+ const CARD_RADII = {
12352
+ NONE: "none",
12353
+ LARGE: "large"
12354
+ };
12355
+
12356
+ const BASE = `${COMPONENT_PREFIX}card`;
12357
+ const Card = React.forwardRef(
12358
+ ({
12359
+ variant = CARD_VARIANTS.ELEVATED,
12360
+ padding = CARD_PADDINGS.MEDIUM,
12361
+ radius = CARD_RADII.LARGE,
12362
+ fullWidth = false,
12363
+ className = "",
12364
+ children,
12365
+ ...rest
12366
+ }, ref) => {
12367
+ const classes = [
12368
+ BASE,
12369
+ `${BASE}--${variant}`,
12370
+ `${BASE}--padding-${padding}`,
12371
+ `${BASE}--radius-${radius}`,
12372
+ fullWidth ? `${BASE}--full-width` : "",
12373
+ className
12374
+ ].filter(Boolean).join(" ");
12375
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: classes, ...rest, children });
12376
+ }
12377
+ );
12378
+ Card.displayName = "Card";
12379
+
12380
+ const CLASS$j = "px-lumi-bottom-sheet";
12381
+ const BottomSheet = ({
12382
+ open,
12383
+ children,
12384
+ onClose,
12385
+ showGrabber = true,
12386
+ closeOnBackdrop = false,
12387
+ closeOnEscape = true,
12388
+ ariaLabelledBy,
12389
+ className = ""
12390
+ }) => {
12391
+ React.useEffect(() => {
12392
+ if (!open) return;
12393
+ const onKey = (e) => {
12394
+ if (e.key !== "Escape" || !closeOnEscape) return;
12395
+ e.stopPropagation();
12396
+ onClose?.();
12397
+ };
12398
+ document.addEventListener("keydown", onKey, true);
12399
+ const previous = document.body.style.overflow;
12400
+ document.body.style.overflow = "hidden";
12401
+ return () => {
12402
+ document.removeEventListener("keydown", onKey, true);
12403
+ document.body.style.overflow = previous;
12404
+ };
12405
+ }, [open, closeOnEscape, onClose]);
12406
+ if (!open) return null;
12407
+ return ReactDOM.createPortal(
12408
+ /* @__PURE__ */ jsxRuntime.jsxs(
12409
+ "div",
12410
+ {
12411
+ className: [CLASS$j, className].filter(Boolean).join(" "),
12412
+ role: "dialog",
12413
+ "aria-modal": "true",
12414
+ "aria-labelledby": ariaLabelledBy,
12415
+ children: [
12416
+ /* @__PURE__ */ jsxRuntime.jsx(
12417
+ "div",
12418
+ {
12419
+ className: `${CLASS$j}__backdrop`,
12420
+ "aria-hidden": "true",
12421
+ onClick: closeOnBackdrop ? onClose : void 0
12422
+ }
12423
+ ),
12424
+ /* @__PURE__ */ jsxRuntime.jsxs(
12425
+ Card,
12426
+ {
12427
+ className: `${CLASS$j}__sheet`,
12428
+ padding: CARD_PADDINGS.LARGE,
12429
+ radius: CARD_RADII.NONE,
12430
+ fullWidth: true,
12431
+ children: [
12432
+ showGrabber && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$j}__grabber`, "aria-hidden": "true" }),
12433
+ children
12434
+ ]
12435
+ }
12436
+ )
12437
+ ]
12438
+ }
12439
+ ),
12440
+ document.body
12441
+ );
12442
+ };
12443
+ BottomSheet.displayName = "BottomSheet";
12444
+
12445
+ const PHONE_COUNTRIES = [
12446
+ { code: "CO", name: "Colombia", dialCode: "+57", digits: 10 },
12447
+ { code: "EC", name: "Ecuador", dialCode: "+593", digits: 9 },
12448
+ { code: "PE", name: "Per\xFA", dialCode: "+51", digits: 9 },
12449
+ { code: "VE", name: "Venezuela", dialCode: "+58", digits: 10 },
12450
+ { code: "PA", name: "Panam\xE1", dialCode: "+507", digits: 8 },
12451
+ { code: "MX", name: "M\xE9xico", dialCode: "+52", digits: 10 },
12452
+ { code: "AR", name: "Argentina", dialCode: "+54", digits: 10 },
12453
+ { code: "CL", name: "Chile", dialCode: "+56", digits: 9 },
12454
+ { code: "BR", name: "Brasil", dialCode: "+55", digits: 11 },
12455
+ { code: "CR", name: "Costa Rica", dialCode: "+506", digits: 8 },
12456
+ { code: "US", name: "Estados Unidos", dialCode: "+1", digits: 10 },
12457
+ { code: "ES", name: "Espa\xF1a", dialCode: "+34", digits: 9 }
12458
+ ];
12459
+ const DEFAULT_PHONE_COUNTRY = "CO";
12460
+ function flagOf(code) {
12461
+ const c = (code || "").toUpperCase();
12462
+ if (!/^[A-Z]{2}$/.test(c)) return "";
12463
+ return [...c].map((ch) => String.fromCodePoint(127462 + ch.charCodeAt(0) - 65)).join("");
12464
+ }
12465
+ function splitPhone(value, countries, defaultCountry) {
12466
+ const porDefecto = countries.find((c) => c.code === defaultCountry) ?? countries[0];
12467
+ const v = (value ?? "").replace(/[^0-9+]/g, "");
12468
+ if (v.startsWith("+")) {
12469
+ const d = v.slice(1);
12470
+ const match = countries.filter((c) => d.startsWith(c.dialCode.slice(1))).sort((a, b) => b.dialCode.length - a.dialCode.length)[0];
12471
+ if (match) return { country: match, digits: d.slice(match.dialCode.length - 1) };
12472
+ }
12473
+ return { country: porDefecto, digits: v.replace(/\D/g, "") };
12474
+ }
12475
+
12476
+ const CLASS$i = "px-lumi-phone-input";
12477
+ function sinTildes$1(s) {
12478
+ return s.normalize("NFD").replace(/[̀-ͯ]/g, "").toLowerCase();
12479
+ }
12480
+ const PhoneInput = React.forwardRef(
12481
+ ({
12482
+ value,
12483
+ onChange,
12484
+ onBlur,
12485
+ label,
12486
+ placeholder,
12487
+ disabled,
12488
+ readOnly,
12489
+ error,
12490
+ countries = PHONE_COUNTRIES,
12491
+ defaultCountry = DEFAULT_PHONE_COUNTRY,
12492
+ name,
12493
+ id,
12494
+ className,
12495
+ labels
12496
+ }, ref) => {
12497
+ const [paisElegido, setPaisElegido] = React.useState(defaultCountry);
12498
+ const [abierto, setAbierto] = React.useState(false);
12499
+ const [busqueda, setBusqueda] = React.useState("");
12500
+ const { country, digits } = splitPhone(value, countries, value ? defaultCountry : paisElegido);
12501
+ const pais = value ? country : countries.find((c) => c.code === paisElegido) ?? country;
12502
+ const tope = pais.digits ?? 15;
12503
+ const bloqueado = disabled || readOnly;
12504
+ React.useEffect(() => {
12505
+ if (!abierto) setBusqueda("");
12506
+ }, [abierto]);
12507
+ const visibles = React.useMemo(() => {
12508
+ const q = sinTildes$1(busqueda.trim());
12509
+ if (!q) return countries;
12510
+ return countries.filter(
12511
+ (c) => sinTildes$1(c.name).includes(q) || c.dialCode.includes(q) || c.code.toLowerCase() === q
12512
+ );
12513
+ }, [busqueda, countries]);
12514
+ const emitir = (c, d) => {
12515
+ onChange?.(d ? `${c.dialCode}${d}` : "");
12516
+ };
12517
+ const handleDigits = (e) => {
12518
+ const d = e.target.value.replace(/\D/g, "").slice(0, tope);
12519
+ emitir(pais, d);
12520
+ };
12521
+ const elegir = (c) => {
12522
+ setPaisElegido(c.code);
12523
+ emitir(c, digits.slice(0, c.digits ?? 15));
12524
+ setAbierto(false);
12525
+ };
12526
+ const tituloId = `${id ?? name ?? "phone"}-pais-titulo`;
12527
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: [CLASS$i, error && `${CLASS$i}--error`, bloqueado && `${CLASS$i}--disabled`, className].filter(Boolean).join(" "), children: [
12528
+ /* @__PURE__ */ jsxRuntime.jsxs(
12529
+ "button",
12530
+ {
12531
+ type: "button",
12532
+ className: `${CLASS$i}__country`,
12533
+ "aria-label": `${labels?.pickCountry ?? "Pa\xEDs del celular"}: ${pais.name} ${pais.dialCode}`,
12534
+ "aria-haspopup": "dialog",
12535
+ "aria-expanded": abierto,
12536
+ disabled: bloqueado,
12537
+ onClick: () => setAbierto(true),
12538
+ children: [
12539
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$i}__flag`, "aria-hidden": "true", children: flagOf(pais.code) }),
12540
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$i}__code`, children: pais.dialCode }),
12541
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$i}__caret`, "aria-hidden": "true", children: "\u25BE" })
12542
+ ]
12543
+ }
12544
+ ),
12545
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$i}__digits`, children: /* @__PURE__ */ jsxRuntime.jsx(
12546
+ Input$1,
12547
+ {
12548
+ ref,
12549
+ id,
12550
+ name,
12551
+ type: "tel",
12552
+ inputMode: "numeric",
12553
+ autoComplete: "tel-national",
12554
+ label,
12555
+ placeholder,
12556
+ value: digits,
12557
+ onChange: handleDigits,
12558
+ onBlur,
12559
+ disabled,
12560
+ readOnly,
12561
+ error
12562
+ }
12563
+ ) }),
12564
+ /* @__PURE__ */ jsxRuntime.jsxs(
12565
+ BottomSheet,
12566
+ {
12567
+ open: abierto,
12568
+ onClose: () => setAbierto(false),
12569
+ showGrabber: true,
12570
+ closeOnBackdrop: true,
12571
+ ariaLabelledBy: tituloId,
12572
+ className: `${CLASS$i}__sheet`,
12573
+ children: [
12574
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$i}__sheet-head`, children: [
12575
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { id: tituloId, className: `${CLASS$i}__sheet-title`, children: labels?.pickCountry ?? "Pa\xEDs del celular" }),
12576
+ /* @__PURE__ */ jsxRuntime.jsx(
12577
+ "input",
12578
+ {
12579
+ className: `${CLASS$i}__search`,
12580
+ type: "search",
12581
+ value: busqueda,
12582
+ onChange: (e) => setBusqueda(e.target.value),
12583
+ placeholder: labels?.searchPlaceholder ?? "Buscar pa\xEDs o indicativo",
12584
+ autoComplete: "off",
12585
+ "aria-label": labels?.searchPlaceholder ?? "Buscar pa\xEDs o indicativo"
12586
+ }
12587
+ )
12588
+ ] }),
12589
+ /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: `${CLASS$i}__list`, role: "listbox", "aria-labelledby": tituloId, children: [
12590
+ visibles.map((c) => {
12591
+ const activo = c.code === pais.code;
12592
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { role: "option", "aria-selected": activo, children: /* @__PURE__ */ jsxRuntime.jsxs(
12593
+ "button",
12594
+ {
12595
+ type: "button",
12596
+ className: [`${CLASS$i}__option`, activo && `${CLASS$i}__option--selected`].filter(Boolean).join(" "),
12597
+ onClick: () => elegir(c),
12598
+ children: [
12599
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$i}__flag`, "aria-hidden": "true", children: flagOf(c.code) }),
12600
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$i}__option-name`, children: c.name }),
12601
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$i}__option-code`, children: c.dialCode })
12602
+ ]
12603
+ }
12604
+ ) }, c.code);
12605
+ }),
12606
+ visibles.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("li", { className: `${CLASS$i}__empty`, children: labels?.noResults ?? "Ning\xFAn pa\xEDs coincide." })
12607
+ ] })
12608
+ ]
12609
+ }
12610
+ )
12611
+ ] });
12612
+ }
12613
+ );
12614
+ PhoneInput.displayName = "PhoneInput";
12615
+
12616
+ const CLASS$h = "px-lumi-sheet-select";
12617
+ function sinTildes(s) {
12618
+ return s.normalize("NFD").replace(/[̀-ͯ]/g, "").toLowerCase();
12619
+ }
12620
+ const SheetSelect = React.forwardRef(
12621
+ ({
12622
+ value,
12623
+ onChange,
12624
+ onBlur,
12625
+ options,
12626
+ label,
12627
+ placeholder,
12628
+ disabled,
12629
+ readOnly,
12630
+ error,
12631
+ searchable,
12632
+ notFoundContent,
12633
+ sheetTitle,
12634
+ searchPlaceholder,
12635
+ name,
12636
+ id,
12637
+ className
12638
+ }, ref) => {
12639
+ const [abierto, setAbierto] = React.useState(false);
12640
+ const [busqueda, setBusqueda] = React.useState("");
12641
+ const bloqueado = disabled || readOnly;
12642
+ const elegida = options.find((o) => String(o.value) === String(value ?? ""));
12643
+ const conBuscador = searchable ?? true;
12644
+ React.useEffect(() => {
12645
+ if (!abierto) setBusqueda("");
12646
+ }, [abierto]);
12647
+ const visibles = React.useMemo(() => {
12648
+ const q = sinTildes(busqueda.trim());
12649
+ if (!q) return options;
12650
+ return options.filter((o) => sinTildes(o.label).includes(q) || sinTildes(o.hint ?? "").includes(q));
12651
+ }, [busqueda, options]);
12652
+ const abrir = () => {
12653
+ if (!bloqueado) setAbierto(true);
12654
+ };
12655
+ const elegir = (o) => {
12656
+ onChange?.(o.value);
12657
+ setAbierto(false);
12658
+ onBlur?.();
12659
+ };
12660
+ const tituloId = `${id ?? name ?? "sheet-select"}-titulo`;
12661
+ const titulo = sheetTitle ?? label?.replace(/\s\*$/, "") ?? "";
12662
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: [CLASS$h, bloqueado && `${CLASS$h}--disabled`, className].filter(Boolean).join(" "), children: [
12663
+ /* @__PURE__ */ jsxRuntime.jsx(
12664
+ Input$1,
12665
+ {
12666
+ ref,
12667
+ id,
12668
+ name,
12669
+ label,
12670
+ placeholder: placeholder ?? "Seleccionar...",
12671
+ value: elegida?.label ?? "",
12672
+ readOnly: true,
12673
+ disabled,
12674
+ error,
12675
+ onClick: abrir,
12676
+ onKeyDown: (e) => {
12677
+ if (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") {
12678
+ e.preventDefault();
12679
+ abrir();
12680
+ }
12681
+ },
12682
+ role: "combobox",
12683
+ "aria-haspopup": "dialog",
12684
+ "aria-expanded": abierto,
12685
+ className: `${CLASS$h}__field`,
12686
+ suffix: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 9l6 6 6-6" }) }),
12687
+ onSuffixClick: abrir,
12688
+ suffixAriaLabel: titulo ? `Elegir ${titulo}` : "Elegir"
12689
+ }
12690
+ ),
12691
+ /* @__PURE__ */ jsxRuntime.jsxs(
12692
+ BottomSheet,
12693
+ {
12694
+ open: abierto,
12695
+ onClose: () => setAbierto(false),
12696
+ showGrabber: true,
12697
+ closeOnBackdrop: true,
12698
+ ariaLabelledBy: tituloId,
12699
+ className: `${CLASS$h}__sheet`,
12700
+ children: [
12701
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$h}__sheet-head`, children: [
12702
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { id: tituloId, className: `${CLASS$h}__sheet-title`, children: titulo }),
12703
+ conBuscador && /* @__PURE__ */ jsxRuntime.jsx(
12704
+ "input",
12705
+ {
12706
+ className: `${CLASS$h}__search`,
12707
+ type: "search",
12708
+ value: busqueda,
12709
+ onChange: (e) => setBusqueda(e.target.value),
12710
+ placeholder: searchPlaceholder ?? "Buscar",
12711
+ autoComplete: "off",
12712
+ "aria-label": searchPlaceholder ?? "Buscar"
12713
+ }
12714
+ )
12715
+ ] }),
12716
+ /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: `${CLASS$h}__list`, role: "listbox", "aria-labelledby": tituloId, children: [
12717
+ visibles.map((o) => {
12718
+ const activo = elegida?.value === o.value;
12719
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { role: "option", "aria-selected": activo, children: /* @__PURE__ */ jsxRuntime.jsxs(
12720
+ "button",
12721
+ {
12722
+ type: "button",
12723
+ className: [`${CLASS$h}__option`, activo && `${CLASS$h}__option--selected`].filter(Boolean).join(" "),
12724
+ onClick: () => elegir(o),
12725
+ children: [
12726
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$h}__option-text`, children: [
12727
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$h}__option-label`, children: o.label }),
12728
+ o.hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$h}__option-hint`, children: o.hint })
12729
+ ] }),
12730
+ activo && /* @__PURE__ */ jsxRuntime.jsx("svg", { className: `${CLASS$h}__check`, width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 6L9 17l-5-5" }) })
12731
+ ]
12732
+ }
12733
+ ) }, o.value);
12734
+ }),
12735
+ visibles.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("li", { className: `${CLASS$h}__empty`, children: options.length === 0 ? notFoundContent ?? "No hay opciones disponibles." : "Nada coincide." })
12736
+ ] })
12737
+ ]
12738
+ }
12739
+ )
12740
+ ] });
12741
+ }
12742
+ );
12743
+ SheetSelect.displayName = "SheetSelect";
12744
+
12745
+ const SANITIZE_PRESETS = {
12746
+ /** «abc-123 » → «ABC123». */
12747
+ plate: ["noControl", "alnum", "upper", { maxLength: 8 }],
12748
+ /** «+57 (300) 123-4567» → «573001234567». */
12749
+ phone: ["digits", { maxLength: 15 }],
12750
+ /** «1.000.000» → «1000000». */
12751
+ id: ["digits", { maxLength: 15 }],
12752
+ /** Un nombre: sin control, espacios colapsados, recortado al enviar. */
12753
+ name: ["noControl", "collapseSpaces", { maxLength: 150 }, "trim"],
12754
+ /** Una nota corta. */
12755
+ note: ["noControl", "collapseSpaces", { maxLength: 80 }, "trim"]
12756
+ };
12757
+ const CONTROL = /[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;
12758
+ function expandir(spec) {
12759
+ const lista = Array.isArray(spec) ? spec : [spec];
12760
+ return lista.flatMap((r) => typeof r === "object" && "preset" in r ? SANITIZE_PRESETS[r.preset] ?? [] : [r]);
12761
+ }
12762
+ function aplicar(s, r, live) {
12763
+ if (r === "trim") return live ? s : s.trim();
12764
+ if (r === "upper") return s.toUpperCase();
12765
+ if (r === "lower") return s.toLowerCase();
12766
+ if (r === "digits") return s.replace(/[^0-9]/g, "");
12767
+ if (r === "alnum") return s.replace(/[^A-Za-z0-9]/g, "");
12768
+ if (r === "noControl") return s.replace(CONTROL, "");
12769
+ if (r === "collapseSpaces") return s.replace(/\s{2,}/g, " ");
12770
+ if ("maxLength" in r) return s.slice(0, r.maxLength);
12771
+ if ("strip" in r) return s.replace(new RegExp(r.strip, "g"), "");
12772
+ return s;
12773
+ }
12774
+ function sanitize(value, spec, options = {}) {
12775
+ if (!spec || value === null || value === void 0) return value;
12776
+ if (typeof value !== "string") return value;
12777
+ return expandir(spec).reduce((s, r) => aplicar(s, r, !!options.live), value);
12778
+ }
12779
+
12343
12780
  const renderField = ({
12344
12781
  field,
12345
12782
  control,
@@ -12427,10 +12864,14 @@ const renderField = ({
12427
12864
  }, children: formatValue() })
12428
12865
  ] });
12429
12866
  }
12867
+ const onChangeLimpio = field.sanitize ? (e) => {
12868
+ const crudo = e && typeof e === "object" && "target" in e ? e.target.value : e;
12869
+ onChange(sanitize(crudo, field.sanitize, { live: true }));
12870
+ } : onChange;
12430
12871
  const commonProps = {
12431
12872
  ...getCommonProps(),
12432
12873
  value: value ?? "",
12433
- onChange,
12874
+ onChange: onChangeLimpio,
12434
12875
  onBlur,
12435
12876
  ref,
12436
12877
  error: error?.message
@@ -12455,8 +12896,26 @@ const renderField = ({
12455
12896
  return /* @__PURE__ */ jsxRuntime.jsx(Input$1, { ...commonProps, type: "email" });
12456
12897
  case "INPUT_PASSWORD":
12457
12898
  return /* @__PURE__ */ jsxRuntime.jsx(Input$1, { ...commonProps, type: "password" });
12458
- case "INPUT_PHONE":
12459
- return /* @__PURE__ */ jsxRuntime.jsx(Input$1, { ...commonProps, type: "tel" });
12899
+ case "INPUT_PHONE": {
12900
+ const { countries, defaultCountry } = uiProps ?? {};
12901
+ return /* @__PURE__ */ jsxRuntime.jsx(
12902
+ PhoneInput,
12903
+ {
12904
+ ref,
12905
+ name,
12906
+ label: fieldLabel,
12907
+ placeholder,
12908
+ disabled: isReadOnly,
12909
+ readOnly: isReadOnly,
12910
+ error: error?.message,
12911
+ value: typeof value === "string" ? value : "",
12912
+ onChange: (v) => onChange(v),
12913
+ onBlur,
12914
+ countries,
12915
+ defaultCountry
12916
+ }
12917
+ );
12918
+ }
12460
12919
  case "INPUT_CURRENCY":
12461
12920
  return /* @__PURE__ */ jsxRuntime.jsx(
12462
12921
  Input$1,
@@ -12482,6 +12941,30 @@ const renderField = ({
12482
12941
  case "TEXTAREA":
12483
12942
  return /* @__PURE__ */ jsxRuntime.jsx(Input$1, { ...commonProps, type: "textarea" });
12484
12943
  case "SELECT":
12944
+ if (uiProps?.picker === "sheet") {
12945
+ return /* @__PURE__ */ jsxRuntime.jsx(
12946
+ SheetSelect,
12947
+ {
12948
+ ref,
12949
+ name,
12950
+ label: fieldLabel,
12951
+ placeholder,
12952
+ disabled: isReadOnly,
12953
+ readOnly: isReadOnly,
12954
+ error: error?.message,
12955
+ value: value == null ? "" : String(value),
12956
+ onChange: (v) => onChange(v),
12957
+ onBlur,
12958
+ options: (options || []).map((o) => ({
12959
+ value: String(o.value),
12960
+ label: String(o.label),
12961
+ hint: o.hint
12962
+ })),
12963
+ searchable: uiProps?.showSearch,
12964
+ notFoundContent: uiProps?.notFoundContent
12965
+ }
12966
+ );
12967
+ }
12485
12968
  return /* @__PURE__ */ jsxRuntime.jsx(
12486
12969
  Select$1,
12487
12970
  {
@@ -12611,8 +13094,11 @@ const transformIncomingValues = (values, fields) => {
12611
13094
  const transformOutgoingValues = (values, fields) => {
12612
13095
  const transformed = { ...values };
12613
13096
  fields.forEach((field) => {
13097
+ if (field.sanitize && values[field.name] !== void 0) {
13098
+ transformed[field.name] = sanitize(values[field.name], field.sanitize);
13099
+ }
12614
13100
  if (field.transformOnSubmit && values[field.name] !== void 0) {
12615
- transformed[field.name] = field.transformOnSubmit(values[field.name]);
13101
+ transformed[field.name] = field.transformOnSubmit(transformed[field.name]);
12616
13102
  }
12617
13103
  });
12618
13104
  return transformed;
@@ -13201,24 +13687,28 @@ function mapFieldsToFormFields(fields, mode) {
13201
13687
  placeholder: field.placeholder,
13202
13688
  uiProps: field.uiProps,
13203
13689
  transformOnSubmit: field.parseValue,
13204
- gridSpan: field.gridSpan
13690
+ gridSpan: field.gridSpan,
13205
13691
  // SPEC-131 T7
13692
+ showIf: field.showIf,
13693
+ // SPEC-181
13694
+ sanitize: field.sanitize
13695
+ // SPEC-183
13206
13696
  }));
13207
13697
  }
13208
13698
 
13209
- const CLASS$h = `${COMPONENT_PREFIX}field-value`;
13699
+ const CLASS$g = `${COMPONENT_PREFIX}field-value`;
13210
13700
  const FieldValue = ({
13211
13701
  label,
13212
13702
  children,
13213
13703
  layout = "inline",
13214
13704
  className
13215
- }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: [CLASS$h, `${CLASS$h}--${layout}`, className].filter(Boolean).join(" "), children: [
13216
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$h}__label`, children: label }),
13217
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$h}__value`, children })
13705
+ }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: [CLASS$g, `${CLASS$g}--${layout}`, className].filter(Boolean).join(" "), children: [
13706
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$g}__label`, children: label }),
13707
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$g}__value`, children })
13218
13708
  ] });
13219
13709
  FieldValue.displayName = "FieldValue";
13220
13710
 
13221
- const CLASS$g = `${COMPONENT_PREFIX}record-card`;
13711
+ const CLASS$f = `${COMPONENT_PREFIX}record-card`;
13222
13712
  const RecordCard = ({
13223
13713
  title,
13224
13714
  summary,
@@ -13230,20 +13720,20 @@ const RecordCard = ({
13230
13720
  className
13231
13721
  }) => {
13232
13722
  const cuerpoId = React.useId();
13233
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: [CLASS$g, open ? `${CLASS$g}--open` : "", className].filter(Boolean).join(" "), children: [
13723
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: [CLASS$f, open ? `${CLASS$f}--open` : "", className].filter(Boolean).join(" "), children: [
13234
13724
  /* @__PURE__ */ jsxRuntime.jsxs(
13235
13725
  "button",
13236
13726
  {
13237
13727
  type: "button",
13238
- className: `${CLASS$g}__header`,
13728
+ className: `${CLASS$f}__header`,
13239
13729
  "aria-expanded": open,
13240
13730
  "aria-controls": cuerpoId,
13241
13731
  "aria-label": ariaLabel,
13242
13732
  onClick: onToggle,
13243
13733
  children: [
13244
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$g}__heading`, children: [
13245
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$g}__title`, children: title }),
13246
- summary && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$g}__summary`, children: summary })
13734
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$f}__heading`, children: [
13735
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$f}__title`, children: title }),
13736
+ summary && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$f}__summary`, children: summary })
13247
13737
  ] }),
13248
13738
  /* @__PURE__ */ jsxRuntime.jsx(
13249
13739
  Icon,
@@ -13251,22 +13741,22 @@ const RecordCard = ({
13251
13741
  type: open ? "chevron-up" : "chevron-down",
13252
13742
  width: 18,
13253
13743
  height: 18,
13254
- className: `${CLASS$g}__chevron`,
13744
+ className: `${CLASS$f}__chevron`,
13255
13745
  "aria-hidden": true
13256
13746
  }
13257
13747
  )
13258
13748
  ]
13259
13749
  }
13260
13750
  ),
13261
- open && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$g}__body`, id: cuerpoId, children: [
13751
+ open && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$f}__body`, id: cuerpoId, children: [
13262
13752
  children,
13263
- actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$g}__actions`, children: actions })
13753
+ actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$f}__actions`, children: actions })
13264
13754
  ] })
13265
13755
  ] });
13266
13756
  };
13267
13757
  RecordCard.displayName = "RecordCard";
13268
13758
 
13269
- const CLASS$f = `${COMPONENT_PREFIX}crud-cards`;
13759
+ const CLASS$e = `${COMPONENT_PREFIX}crud-cards`;
13270
13760
  function summaryFields(fields) {
13271
13761
  const visibles = fields.filter((f) => f.showInTable !== false);
13272
13762
  const marcados = visibles.filter((f) => f.summary);
@@ -13285,13 +13775,13 @@ function CardList({
13285
13775
  const claveResumen = new Set(resumen.map((f) => f.key));
13286
13776
  const cuerpo = fields.filter((f) => f.showInTable !== false && !claveResumen.has(f.key));
13287
13777
  if (loading && rows.length === 0) {
13288
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$f}__estado`, children: "Cargando..." });
13778
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$e}__estado`, children: "Cargando..." });
13289
13779
  }
13290
13780
  if (rows.length === 0) {
13291
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$f}__estado`, children: emptyText });
13781
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$e}__estado`, children: emptyText });
13292
13782
  }
13293
13783
  const [principal, ...secundarios] = resumen;
13294
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: CLASS$f, children: rows.map((row) => {
13784
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: CLASS$e, children: rows.map((row) => {
13295
13785
  const key = rowKey(row);
13296
13786
  const opciones = buildOptions?.(row) ?? [];
13297
13787
  const titulo = principal ? renderFieldValue(principal, row) : key;
@@ -13308,14 +13798,14 @@ function CardList({
13308
13798
  {
13309
13799
  type: "button",
13310
13800
  className: [
13311
- `${CLASS$f}__accion`,
13801
+ `${CLASS$e}__accion`,
13312
13802
  o.disabled && o.disabledReason ? "is-con-motivo" : ""
13313
13803
  ].filter(Boolean).join(" "),
13314
13804
  disabled: o.disabled,
13315
13805
  onClick: () => void o.onClick(),
13316
13806
  children: [
13317
13807
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: o.label }),
13318
- o.disabled && o.disabledReason && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$f}__motivo`, children: o.disabledReason })
13808
+ o.disabled && o.disabledReason && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$e}__motivo`, children: o.disabledReason })
13319
13809
  ]
13320
13810
  },
13321
13811
  o.label
@@ -13330,7 +13820,7 @@ function CardList({
13330
13820
  }
13331
13821
  CardList.displayName = "CardList";
13332
13822
 
13333
- const CLASS$e = `${COMPONENT_PREFIX}crud-scroll-end`;
13823
+ const CLASS$d = `${COMPONENT_PREFIX}crud-scroll-end`;
13334
13824
  const MARGEN = 24;
13335
13825
  const SELECTOR_CRUD = `.${COMPONENT_PREFIX}table-container, .${COMPONENT_PREFIX}crud-cards`;
13336
13826
  const ScrollToEnd = ({
@@ -13374,7 +13864,7 @@ const ScrollToEnd = ({
13374
13864
  s.scrollTo({ top: s.scrollHeight, behavior: "smooth" });
13375
13865
  }, []);
13376
13866
  if (!visible) return null;
13377
- return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: CLASS$e, onClick: alFinal, "aria-label": label, title: label, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "chevron-down", width: 18, height: 18, "aria-hidden": true }) });
13867
+ return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: CLASS$d, onClick: alFinal, "aria-label": label, title: label, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "chevron-down", width: 18, height: 18, "aria-hidden": true }) });
13378
13868
  };
13379
13869
  ScrollToEnd.displayName = "ScrollToEnd";
13380
13870
 
@@ -14059,7 +14549,7 @@ function Crud({
14059
14549
  }
14060
14550
  Crud.displayName = "Crud";
14061
14551
 
14062
- const CLASS$d = "px-chat-reactive-crud__chat-link";
14552
+ const CLASS$c = "px-chat-reactive-crud__chat-link";
14063
14553
  function Burbuja() {
14064
14554
  return /* @__PURE__ */ jsxRuntime.jsx(
14065
14555
  "svg",
@@ -14086,7 +14576,7 @@ const ChatLinkCell = ({
14086
14576
  if (targets.length === 1) {
14087
14577
  const t = targets[0];
14088
14578
  const texto = t.label ? `Abrir chat ${t.label}` : "Abrir chat";
14089
- return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: CLASS$d, "aria-label": texto, title: texto, onClick: () => abrir(t.id), children: /* @__PURE__ */ jsxRuntime.jsx(Burbuja, {}) });
14579
+ return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: CLASS$c, "aria-label": texto, title: texto, onClick: () => abrir(t.id), children: /* @__PURE__ */ jsxRuntime.jsx(Burbuja, {}) });
14090
14580
  }
14091
14581
  return /* @__PURE__ */ jsxRuntime.jsx(
14092
14582
  DropdownMenu,
@@ -14100,7 +14590,7 @@ const ChatLinkCell = ({
14100
14590
  "button",
14101
14591
  {
14102
14592
  type: "button",
14103
- className: CLASS$d,
14593
+ className: CLASS$c,
14104
14594
  "aria-label": `Abrir chat (${targets.length} conversaciones)`,
14105
14595
  title: "Abrir chat",
14106
14596
  children: /* @__PURE__ */ jsxRuntime.jsx(Burbuja, {})
@@ -14113,6 +14603,18 @@ const ChatLinkCell = ({
14113
14603
  };
14114
14604
  ChatLinkCell.displayName = "ChatLinkCell";
14115
14605
 
14606
+ function obligatorioSiSeVe(s, f, requiredMsg) {
14607
+ if (!f.visibleWhen) return s.required(requiredMsg);
14608
+ const conds = Array.isArray(f.visibleWhen) ? f.visibleWhen : [f.visibleWhen];
14609
+ return s.when(
14610
+ conds.map((c) => c.field),
14611
+ {
14612
+ is: (...vals) => conds.every((c, i) => c.in.includes(String(vals[i]))),
14613
+ then: (sch) => sch.required(requiredMsg),
14614
+ otherwise: (sch) => sch.notRequired()
14615
+ }
14616
+ );
14617
+ }
14116
14618
  function buildCrudYupSchema(fields) {
14117
14619
  const shape = {};
14118
14620
  for (const f of fields) {
@@ -14142,19 +14644,17 @@ function buildCrudYupSchema(fields) {
14142
14644
  }
14143
14645
  if (f.moleculeType === "INPUT_NUMBER" || f.moleculeType === "INPUT_CURRENCY") {
14144
14646
  let s2 = yup__namespace.number().transform((val, orig) => orig === "" || orig === null ? void 0 : val).typeError(`${f.label}: n\xFAmero inv\xE1lido`);
14145
- if (requiredMsg) s2 = s2.required(requiredMsg);
14146
14647
  if (v?.min) s2 = s2.min(Number(v.min.value), v.min.message);
14147
14648
  if (v?.max) s2 = s2.max(Number(v.max.value), v.max.message);
14148
- shape[f.name] = s2;
14649
+ shape[f.name] = requiredMsg ? obligatorioSiSeVe(s2, f, requiredMsg) : s2;
14149
14650
  continue;
14150
14651
  }
14151
14652
  let s = yup__namespace.string();
14152
- if (requiredMsg) s = s.required(requiredMsg);
14153
- if (v?.pattern) s = s.matches(new RegExp(v.pattern.value), v.pattern.message);
14653
+ if (v?.pattern) s = s.matches(new RegExp(v.pattern.value), { message: v.pattern.message, excludeEmptyString: true });
14154
14654
  if (v?.email) s = s.email(v.email);
14155
14655
  if (v?.min) s = s.min(Number(v.min.value), v.min.message);
14156
14656
  if (v?.max) s = s.max(Number(v.max.value), v.max.message);
14157
- shape[f.name] = s;
14657
+ shape[f.name] = requiredMsg ? obligatorioSiSeVe(s, f, requiredMsg) : s;
14158
14658
  }
14159
14659
  return yup__namespace.object().shape(shape);
14160
14660
  }
@@ -14164,9 +14664,11 @@ const currency = (value) => {
14164
14664
  if (isNaN(n)) return String(value ?? "");
14165
14665
  return n.toLocaleString("es-CO", { style: "currency", currency: "COP", maximumFractionDigits: 0 });
14166
14666
  };
14667
+ const SOLO_FECHA = /^(\d{4})-(\d{2})-(\d{2})$/;
14167
14668
  const date = (value) => {
14168
14669
  if (!value) return "";
14169
- const d = new Date(String(value));
14670
+ const m = SOLO_FECHA.exec(String(value));
14671
+ const d = m ? new Date(Number(m[1]), Number(m[2]) - 1, Number(m[3])) : new Date(String(value));
14170
14672
  if (isNaN(d.getTime())) return String(value);
14171
14673
  return d.toLocaleDateString("es-CO", { year: "numeric", month: "2-digit", day: "2-digit" });
14172
14674
  };
@@ -14182,7 +14684,14 @@ const datetime = (value) => {
14182
14684
  minute: "2-digit"
14183
14685
  });
14184
14686
  };
14185
- const CRUD_FORMATTERS = { currency, date, datetime };
14687
+ const phone = (value) => {
14688
+ const s = String(value ?? "").trim();
14689
+ const m = /^\+(\d{1,3})(\d{10})$/.exec(s);
14690
+ if (!m) return s;
14691
+ const [, cc, n] = m;
14692
+ return `+${cc} ${n.slice(0, 3)} ${n.slice(3, 6)} ${n.slice(6)}`;
14693
+ };
14694
+ const CRUD_FORMATTERS = { currency, date, datetime, phone };
14186
14695
  function getFormatter(key) {
14187
14696
  return key ? CRUD_FORMATTERS[key] : void 0;
14188
14697
  }
@@ -14417,7 +14926,7 @@ function uploadViaEventBus(eventBus, file, fileType) {
14417
14926
  });
14418
14927
  }
14419
14928
 
14420
- const CLASS$c = `${COMPONENT_PREFIX$1}file-field`;
14929
+ const CLASS$b = `${COMPONENT_PREFIX$1}file-field`;
14421
14930
  function iconoPorNombre(nombre) {
14422
14931
  const ext = nombre.split(".").pop()?.toLowerCase() ?? "";
14423
14932
  if (["png", "jpg", "jpeg", "gif", "webp", "heic", "heif"].includes(ext)) return ICON_TYPES.IMAGE;
@@ -14448,18 +14957,18 @@ const FileField = ({
14448
14957
  const elegir = () => {
14449
14958
  if (!disabled) inputRef.current?.click();
14450
14959
  };
14451
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$c}${error ? ` ${CLASS$c}--error` : ""}`, children: [
14452
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$c}__label`, children: [
14960
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$b}${error ? ` ${CLASS$b}--error` : ""}`, children: [
14961
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$b}__label`, children: [
14453
14962
  label,
14454
14963
  required ? " *" : "",
14455
14964
  multiple && hechos > 0 ? ` (${hechos})` : ""
14456
14965
  ] }),
14457
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$c}__box`, children: [
14966
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$b}__box`, children: [
14458
14967
  /* @__PURE__ */ jsxRuntime.jsx(
14459
14968
  "input",
14460
14969
  {
14461
14970
  ref: inputRef,
14462
- className: `${CLASS$c}__native`,
14971
+ className: `${CLASS$b}__native`,
14463
14972
  type: "file",
14464
14973
  accept,
14465
14974
  multiple,
@@ -14470,14 +14979,14 @@ const FileField = ({
14470
14979
  }
14471
14980
  }
14472
14981
  ),
14473
- /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: `${CLASS$c}__pick`, onClick: elegir, disabled, children: [
14982
+ /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: `${CLASS$b}__pick`, onClick: elegir, disabled, children: [
14474
14983
  /* @__PURE__ */ jsxRuntime.jsx(Icon$1, { type: ICON_TYPES.UPLOAD, size: "small" }),
14475
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$c}__pick-text`, children: entries.length === 0 ? multiple ? "Toca para elegir archivos" : "Toca para elegir un archivo" : multiple ? "A\xF1adir m\xE1s" : "Cambiar archivo" })
14984
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$b}__pick-text`, children: entries.length === 0 ? multiple ? "Toca para elegir archivos" : "Toca para elegir un archivo" : multiple ? "A\xF1adir m\xE1s" : "Cambiar archivo" })
14476
14985
  ] }),
14477
- entries.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$c}__list`, children: entries.map((e, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: `${CLASS$c}__item ${CLASS$c}__item--${e.status}`, children: [
14478
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$c}__kind`, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(Icon$1, { type: iconoPorNombre(e.name), size: "small" }) }),
14479
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$c}__name`, children: e.name }),
14480
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$c}__state`, children: [
14986
+ entries.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$b}__list`, children: entries.map((e, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: `${CLASS$b}__item ${CLASS$b}__item--${e.status}`, children: [
14987
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$b}__kind`, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(Icon$1, { type: iconoPorNombre(e.name), size: "small" }) }),
14988
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$b}__name`, children: e.name }),
14989
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$b}__state`, children: [
14481
14990
  e.status === "uploading" && "Subiendo\u2026",
14482
14991
  e.status === "done" && (pesoLegible(e.size) || "Listo"),
14483
14992
  e.status === "error" && "No se pudo subir"
@@ -14486,7 +14995,7 @@ const FileField = ({
14486
14995
  "button",
14487
14996
  {
14488
14997
  type: "button",
14489
- className: `${CLASS$c}__remove`,
14998
+ className: `${CLASS$b}__remove`,
14490
14999
  onClick: () => onRemove(i),
14491
15000
  "aria-label": `Quitar ${e.name}`,
14492
15001
  disabled,
@@ -14495,8 +15004,8 @@ const FileField = ({
14495
15004
  )
14496
15005
  ] }, `${e.name}-${i}`)) })
14497
15006
  ] }),
14498
- error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$c}__error`, children: error }),
14499
- !error && subiendo && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$c}__hint`, children: "Espera a que terminen de subir." })
15007
+ error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$b}__error`, children: error }),
15008
+ !error && subiendo && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$b}__hint`, children: "Espera a que terminen de subir." })
14500
15009
  ] });
14501
15010
  };
14502
15011
 
@@ -14656,7 +15165,13 @@ function ActionFormDrawer({ action, row, idField, eventBus, onExecute, onClose }
14656
15165
  options: f.options ?? optionsByField[f.name],
14657
15166
  // SPEC-106 T8 — `uiProps` llega tal cual a la molécula, así que el desplegable dice lo
14658
15167
  // que pasó de verdad en vez del «no hay» de siempre. Sin error, se queda el de siempre.
14659
- ...optionsErrorByField[f.name] ? { uiProps: { notFoundContent: optionsErrorByField[f.name] } } : {},
15168
+ ...optionsErrorByField[f.name] || f.searchable ? {
15169
+ uiProps: {
15170
+ ...optionsErrorByField[f.name] ? { notFoundContent: optionsErrorByField[f.name] } : {},
15171
+ ...f.searchable ? { showSearch: true } : {}
15172
+ // SPEC-174
15173
+ }
15174
+ } : {},
14660
15175
  // SPEC-128 — el dinero se escribe como se escribe AQUÍ.
14661
15176
  //
14662
15177
  // Los campos de moneda caían a `thousandSeparator ?? ','`, un valor por defecto en formato
@@ -15652,7 +16167,7 @@ function buildMarkerIcon(name, color = "#dc2626", heading = 0) {
15652
16167
  return `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(svg)}`;
15653
16168
  }
15654
16169
 
15655
- const CLASS$b = `${COMPONENT_PREFIX$1}map-view`;
16170
+ const CLASS$a = `${COMPONENT_PREFIX$1}map-view`;
15656
16171
  const DEFAULT_CENTER = { lat: 4.711, lng: -74.0721 };
15657
16172
  const DEFAULT_ZOOM = 12;
15658
16173
  const DEFAULT_HEIGHT$1 = 320;
@@ -15722,6 +16237,8 @@ const MapView = ({
15722
16237
  eventBus,
15723
16238
  expandable = true,
15724
16239
  fullBleed = false,
16240
+ interactive = true,
16241
+ expandIcon = "expand",
15725
16242
  animateMs,
15726
16243
  className
15727
16244
  }) => {
@@ -15777,7 +16294,12 @@ const MapView = ({
15777
16294
  mapTypeControl: false,
15778
16295
  streetViewControl: false,
15779
16296
  fullscreenControl: false,
15780
- styles: leerEstiloDelTema()
16297
+ styles: leerEstiloDelTema(),
16298
+ // SPEC-182 — un mapa solo para mirar no se queda con el gesto: `none` es la forma oficial
16299
+ // de Google de que el dedo y la rueda sigan desplazando la página. Se fija al crear el mapa
16300
+ // porque el modo no cambia en caliente: quien quiera el otro monta otra instancia (la de
16301
+ // pantalla completa lo es).
16302
+ ...interactive ? {} : { gestureHandling: "none", zoomControl: false, keyboardShortcuts: false }
15781
16303
  });
15782
16304
  mapRef.current.addListener("dragstart", () => {
15783
16305
  followSuspendedRef.current = true;
@@ -15795,7 +16317,7 @@ const MapView = ({
15795
16317
  React.useEffect(() => {
15796
16318
  if (!mapReady || !mapRef.current) return;
15797
16319
  const maps = window.google.maps;
15798
- const editable = !!onMoveRef.current;
16320
+ const editable = interactive && !!onMoveRef.current;
15799
16321
  const alive = new Set(list.map((p) => p.id));
15800
16322
  markersRef.current.forEach((entry, id) => {
15801
16323
  if (alive.has(id)) return;
@@ -15867,7 +16389,7 @@ const MapView = ({
15867
16389
  } else {
15868
16390
  mapRef.current.fitBounds(bounds);
15869
16391
  }
15870
- }, [mapReady, list, animateMs]);
16392
+ }, [mapReady, list, animateMs, interactive]);
15871
16393
  React.useEffect(() => {
15872
16394
  if (!mapReady || !mapRef.current) return;
15873
16395
  const maps = window.google.maps;
@@ -15917,7 +16439,7 @@ const MapView = ({
15917
16439
  if (!mapReady || !mapRef.current) return;
15918
16440
  clickListenerRef.current?.remove?.();
15919
16441
  clickListenerRef.current = null;
15920
- if (!onPointMove || list.length !== 1) return;
16442
+ if (!interactive || !onPointMove || list.length !== 1) return;
15921
16443
  const pointId = list[0].id;
15922
16444
  clickListenerRef.current = mapRef.current.addListener("click", (e) => {
15923
16445
  onMoveRef.current?.(pointId, e.latLng.lat(), e.latLng.lng());
@@ -15926,7 +16448,7 @@ const MapView = ({
15926
16448
  clickListenerRef.current?.remove?.();
15927
16449
  clickListenerRef.current = null;
15928
16450
  };
15929
- }, [mapReady, list, onPointMove]);
16451
+ }, [mapReady, list, onPointMove, interactive]);
15930
16452
  React.useEffect(
15931
16453
  () => () => {
15932
16454
  markersRef.current.forEach((entry) => {
@@ -15953,31 +16475,34 @@ const MapView = ({
15953
16475
  document.body.style.overflow = prev;
15954
16476
  };
15955
16477
  }, [expanded]);
15956
- const rootClass = [CLASS$b, fullBleed && `${CLASS$b}--full-bleed`, className].filter(Boolean).join(" ");
16478
+ const rootClass = [CLASS$a, fullBleed && `${CLASS$a}--full-bleed`, className].filter(Boolean).join(" ");
15957
16479
  if (overQuota) {
15958
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: rootClass, style: { height }, children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$b}__state ${CLASS$b}__state--error`, children: labels?.quotaText ?? "Se alcanz\xF3 el l\xEDmite diario de uso del mapa. Intenta ma\xF1ana." }) });
16480
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: rootClass, style: { height }, children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__state ${CLASS$a}__state--error`, children: labels?.quotaText ?? "Se alcanz\xF3 el l\xEDmite diario de uso del mapa. Intenta ma\xF1ana." }) });
15959
16481
  }
15960
16482
  if (status === "error") {
15961
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: rootClass, style: { height }, children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$b}__state ${CLASS$b}__state--error`, children: labels?.errorText ?? "No se pudo cargar el mapa." }) });
16483
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: rootClass, style: { height }, children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__state ${CLASS$a}__state--error`, children: labels?.errorText ?? "No se pudo cargar el mapa." }) });
15962
16484
  }
15963
16485
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: rootClass, style: fullBleed ? void 0 : { height }, children: [
15964
- status !== "ready" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$b}__state`, children: labels?.loadingText ?? "Cargando mapa\u2026" }),
15965
- /* @__PURE__ */ jsxRuntime.jsx("div", { ref: nodeRef, className: `${CLASS$b}__canvas`, "aria-label": "Mapa", role: "application" }),
15966
- status === "ready" && list.length === 0 && allRoutes.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$b}__empty`, children: labels?.emptyText ?? "Sin ubicaciones para mostrar" }),
15967
- status === "ready" && onPointMove && list.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$b}__empty`, children: labels?.moveHint ?? "Arrastra el pin o toca el mapa para ajustar" }),
16486
+ status !== "ready" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__state`, children: labels?.loadingText ?? "Cargando mapa\u2026" }),
16487
+ /* @__PURE__ */ jsxRuntime.jsx("div", { ref: nodeRef, className: `${CLASS$a}__canvas`, "aria-label": "Mapa", role: "application" }),
16488
+ status === "ready" && list.length === 0 && allRoutes.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__empty`, children: labels?.emptyText ?? "Sin ubicaciones para mostrar" }),
16489
+ status === "ready" && interactive && onPointMove && list.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__empty`, children: labels?.moveHint ?? "Arrastra el pin o toca el mapa para ajustar" }),
15968
16490
  status === "ready" && expandable && !fullBleed && /* @__PURE__ */ jsxRuntime.jsx(
15969
16491
  "button",
15970
16492
  {
15971
16493
  type: "button",
15972
- className: `${CLASS$b}__expand`,
15973
- "aria-label": labels?.expandAria ?? "Ver el mapa en pantalla completa",
15974
- title: labels?.expandAria ?? "Pantalla completa",
16494
+ className: `${CLASS$a}__expand`,
16495
+ "aria-label": labels?.expandAria ?? (expandIcon === "edit" ? "Ajustar el punto en el mapa" : "Ver el mapa en pantalla completa"),
16496
+ title: labels?.expandAria ?? (expandIcon === "edit" ? "Ajustar el punto" : "Pantalla completa"),
15975
16497
  onClick: () => setExpanded(true),
15976
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7" }) })
16498
+ children: expandIcon === "edit" ? /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
16499
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 20h9" }),
16500
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" })
16501
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7" }) })
15977
16502
  }
15978
16503
  ),
15979
16504
  expanded && ReactDOM.createPortal(
15980
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$b}-fs`, role: "dialog", "aria-modal": "true", "aria-label": "Mapa", children: [
16505
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$a}-fs`, role: "dialog", "aria-modal": "true", "aria-label": "Mapa", children: [
15981
16506
  /* @__PURE__ */ jsxRuntime.jsx(
15982
16507
  MapView,
15983
16508
  {
@@ -15991,7 +16516,7 @@ const MapView = ({
15991
16516
  "button",
15992
16517
  {
15993
16518
  type: "button",
15994
- className: `${CLASS$b}-fs__close`,
16519
+ className: `${CLASS$a}-fs__close`,
15995
16520
  "aria-label": labels?.closeAria ?? "Cerrar el mapa",
15996
16521
  onClick: () => setExpanded(false),
15997
16522
  children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
@@ -16107,7 +16632,7 @@ function reverseGeocode(lat, lng) {
16107
16632
  });
16108
16633
  }
16109
16634
 
16110
- const CLASS$a = `${COMPONENT_PREFIX$1}location-field`;
16635
+ const CLASS$9 = `${COMPONENT_PREFIX$1}location-field`;
16111
16636
  const GPS_TIMEOUT_MS = 1e4;
16112
16637
  const CONFIRM_MAP_HEIGHT = 180;
16113
16638
  const LocationField = ({
@@ -16180,16 +16705,16 @@ const LocationField = ({
16180
16705
  }
16181
16706
  };
16182
16707
  const hasPoint = value?.lat != null && value?.lng != null;
16183
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$a}${error ? ` ${CLASS$a}--error` : ""}`, ref: boxRef, children: [
16184
- label && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$a}__label`, children: [
16708
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$9}${error ? ` ${CLASS$9}--error` : ""}`, ref: boxRef, children: [
16709
+ label && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$9}__label`, children: [
16185
16710
  label,
16186
16711
  required ? " *" : ""
16187
16712
  ] }),
16188
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$a}__row`, children: [
16713
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$9}__row`, children: [
16189
16714
  /* @__PURE__ */ jsxRuntime.jsx(
16190
16715
  "input",
16191
16716
  {
16192
- className: `${CLASS$a}__input`,
16717
+ className: `${CLASS$9}__input`,
16193
16718
  type: "text",
16194
16719
  value: text,
16195
16720
  disabled,
@@ -16203,7 +16728,7 @@ const LocationField = ({
16203
16728
  "button",
16204
16729
  {
16205
16730
  type: "button",
16206
- className: `${CLASS$a}__gps`,
16731
+ className: `${CLASS$9}__gps`,
16207
16732
  onClick: useMyLocation,
16208
16733
  disabled: disabled || gps === "locating",
16209
16734
  title: labels?.useMyLocation ?? "Enviar mi ubicaci\xF3n",
@@ -16217,21 +16742,24 @@ const LocationField = ({
16217
16742
  }
16218
16743
  )
16219
16744
  ] }),
16220
- open && suggestions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$a}__suggestions`, children: suggestions.map((s) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => void pickSuggestion(s.id, s.description), children: s.description }) }, s.id)) }),
16221
- error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__error`, children: error }),
16222
- gps === "denied" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__hint ${CLASS$a}__hint--warn`, children: labels?.permissionDenied ?? "No diste permiso de ubicaci\xF3n. Puedes escribir la direcci\xF3n." }),
16223
- gps === "unavailable" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__hint ${CLASS$a}__hint--warn`, children: labels?.unavailable ?? "No pudimos obtener tu ubicaci\xF3n. Puedes escribir la direcci\xF3n." }),
16224
- hasPoint && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$a}__confirm`, children: [
16745
+ open && suggestions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$9}__suggestions`, children: suggestions.map((s) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => void pickSuggestion(s.id, s.description), children: s.description }) }, s.id)) }),
16746
+ error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__error`, children: error }),
16747
+ gps === "denied" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__hint ${CLASS$9}__hint--warn`, children: labels?.permissionDenied ?? "No diste permiso de ubicaci\xF3n. Puedes escribir la direcci\xF3n." }),
16748
+ gps === "unavailable" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__hint ${CLASS$9}__hint--warn`, children: labels?.unavailable ?? "No pudimos obtener tu ubicaci\xF3n. Puedes escribir la direcci\xF3n." }),
16749
+ hasPoint && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$9}__confirm`, children: [
16225
16750
  /* @__PURE__ */ jsxRuntime.jsx(
16226
16751
  MapView,
16227
16752
  {
16228
16753
  apiKey,
16229
16754
  points: [{ id: "sel", lat: value.lat, lng: value.lng, label: value?.address }],
16230
16755
  height: CONFIRM_MAP_HEIGHT,
16231
- onPointMove: (id, lat, lng) => void movePoint(id, lat, lng)
16756
+ onPointMove: (id, lat, lng) => void movePoint(id, lat, lng),
16757
+ interactive: false,
16758
+ expandIcon: "edit",
16759
+ labels: { expandAria: labels?.editAria ?? "Ajustar el punto en el mapa" }
16232
16760
  }
16233
16761
  ),
16234
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__hint`, children: labels?.confirmHint ?? "Verifica que el punto sea correcto." })
16762
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__hint`, children: labels?.confirmHint ?? "El pin marca d\xF3nde est\xE1 el veh\xEDculo. Si no es el punto exacto, toca el l\xE1piz: en el mapa grande puedes arrastrar el pin o tocar el lugar correcto." })
16235
16763
  ] })
16236
16764
  ] });
16237
16765
  };
@@ -16263,6 +16791,8 @@ function toRenderField(f, loaded, eventBus, mapsApiKey, loadError) {
16263
16791
  // y, a media fila, su campo hermano se quedaba con ~400px de blanco al lado. Medido entre
16264
16792
  // «¿En qué situación está?» y «¿A dónde lo llevamos?» del formulario de solicitud.
16265
16793
  gridSpan: 2,
16794
+ showIf: showIfDe(f),
16795
+ // SPEC-181
16266
16796
  uiProps: {
16267
16797
  // SPEC-074 — `error` viene del render de CUSTOM (DynamicForm ya lo pasaba) y aquí se
16268
16798
  // desechaba: el campo obligatorio más importante era el único mudo.
@@ -16295,14 +16825,22 @@ function toRenderField(f, loaded, eventBus, mapsApiKey, loadError) {
16295
16825
  columnWidth: f.columnWidth,
16296
16826
  fixed: f.fixed,
16297
16827
  align: f.align,
16828
+ showIf: showIfDe(f),
16829
+ // SPEC-181
16830
+ sanitize: f.sanitize,
16831
+ // SPEC-183
16298
16832
  // SPEC-106 T8 — con un fallo de carga, el desplegable dice que no se pudo preguntar en vez
16299
16833
  // de «no hay opciones disponibles», que es una respuesta y no la tenemos.
16300
- uiProps: loadError ? { options: options ?? [], notFoundContent: loadError } : options ? { options } : void 0,
16834
+ uiProps: loadError ? { options: options ?? [], notFoundContent: loadError, ...f.searchable ? { showSearch: true } : {}, ...f.picker ? { picker: f.picker } : {} } : options ? { options, ...f.searchable ? { showSearch: true } : {}, ...f.picker ? { picker: f.picker } : {} } : f.picker ? { picker: f.picker } : void 0,
16301
16835
  formatValue
16302
16836
  };
16303
16837
  }
16304
16838
  const cumpleCondicion = (c, row) => c.in.includes(String(row[c.field]));
16305
16839
  const cumplenTodas = (c, row) => (Array.isArray(c) ? c : [c]).every((x) => cumpleCondicion(x, row));
16840
+ function showIfDe(f) {
16841
+ const cond = f.visibleWhen;
16842
+ return cond ? (values) => cumplenTodas(cond, values) : void 0;
16843
+ }
16306
16844
  function matchesVisibleWhen(a, row) {
16307
16845
  if (a.hiddenWhen && cumplenTodas(a.hiddenWhen, row)) return false;
16308
16846
  if (!a.visibleWhen) return true;
@@ -16854,7 +17392,7 @@ function markFitOutliers(points, radiusKm = FIT_RADIUS_KM) {
16854
17392
  return { points: marcados, outside };
16855
17393
  }
16856
17394
 
16857
- const CLASS$9 = `${COMPONENT_PREFIX$1}services-map`;
17395
+ const CLASS$8 = `${COMPONENT_PREFIX$1}services-map`;
16858
17396
  const DEFAULT_HEIGHT = 340;
16859
17397
  function readNumber(row, field) {
16860
17398
  if (!field) return void 0;
@@ -16980,7 +17518,7 @@ const ServicesMap = ({ config, eventBus, apiKey, filter, fill }) => {
16980
17518
  [livePoints]
16981
17519
  );
16982
17520
  const nadaQueDibujar = rows !== null && allPoints.length === 0 && route.length === 0;
16983
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: fill ? `${CLASS$9} ${CLASS$9}--fill` : CLASS$9, children: rows === null ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__state`, children: labels.loadingText ?? "Cargando ubicaciones\u2026" }) : nadaQueDibujar ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__state`, children: lineaSinMapa(labels, missing, failed) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
17521
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: fill ? `${CLASS$8} ${CLASS$8}--fill` : CLASS$8, children: rows === null ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$8}__state`, children: labels.loadingText ?? "Cargando ubicaciones\u2026" }) : nadaQueDibujar ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$8}__state`, children: lineaSinMapa(labels, missing, failed) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16984
17522
  /* @__PURE__ */ jsxRuntime.jsx(
16985
17523
  MapView,
16986
17524
  {
@@ -16994,20 +17532,20 @@ const ServicesMap = ({ config, eventBus, apiKey, filter, fill }) => {
16994
17532
  labels: { emptyText: labels.emptyText }
16995
17533
  }
16996
17534
  ),
16997
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$9}__notes`, children: [
16998
- livePoints.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: `${CLASS$9}__note ${CLASS$9}__note--live`, children: [
17535
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$8}__notes`, children: [
17536
+ livePoints.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: `${CLASS$8}__note ${CLASS$8}__note--live`, children: [
16999
17537
  (config.live?.labels?.liveText ?? "{n} en movimiento").replace(
17000
17538
  "{n}",
17001
17539
  String(livePoints.length)
17002
17540
  ),
17003
17541
  simulated > 0 && ` \xB7 ${config.live?.labels?.simulatedText ?? "incluye posiciones simuladas"}`
17004
17542
  ] }),
17005
- missing > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__note`, children: ((missing === 1 ? labels.missingTextOne : void 0) ?? labels.missingText ?? "{n} sin ubicaci\xF3n registrada").replace("{n}", String(missing)) }),
17006
- outside > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__note`, children: (labels.outsideText ?? "{n} fuera de la zona (aleja el mapa para verlos)").replace(
17543
+ missing > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$8}__note`, children: ((missing === 1 ? labels.missingTextOne : void 0) ?? labels.missingText ?? "{n} sin ubicaci\xF3n registrada").replace("{n}", String(missing)) }),
17544
+ outside > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$8}__note`, children: (labels.outsideText ?? "{n} fuera de la zona (aleja el mapa para verlos)").replace(
17007
17545
  "{n}",
17008
17546
  String(outside)
17009
17547
  ) }),
17010
- failed && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__note`, children: "No se pudieron cargar las ubicaciones." })
17548
+ failed && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$8}__note`, children: "No se pudieron cargar las ubicaciones." })
17011
17549
  ] })
17012
17550
  ] }) });
17013
17551
  };
@@ -17023,7 +17561,7 @@ function lineaSinMapa(labels, missing, failed) {
17023
17561
  return labels.emptyText ?? "Sin ubicaciones para mostrar";
17024
17562
  }
17025
17563
 
17026
- const CLASS$8 = `${COMPONENT_PREFIX$1}service-shortcuts`;
17564
+ const CLASS$7 = `${COMPONENT_PREFIX$1}service-shortcuts`;
17027
17565
  const ICONS = {
17028
17566
  // SPEC-126 — quien DESPACHA tambien necesita sus puertas, y una de ellas son las conversaciones
17029
17567
  // de sus servicios. Los cinco iconos que habia eran todos de quien PIDE una grua.
@@ -17077,16 +17615,16 @@ const ServiceShortcuts = ({
17077
17615
  }) => {
17078
17616
  if (!options?.length) return null;
17079
17617
  const elegido = !!selectedId;
17080
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: [CLASS$8, elegido ? `${CLASS$8}--used` : ""].filter(Boolean).join(" "), children: options.map((o) => {
17618
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: [CLASS$7, elegido ? `${CLASS$7}--used` : ""].filter(Boolean).join(" "), children: options.map((o) => {
17081
17619
  const esElegido = o.id === selectedId;
17082
17620
  return /* @__PURE__ */ jsxRuntime.jsxs(
17083
17621
  "button",
17084
17622
  {
17085
17623
  type: "button",
17086
17624
  className: [
17087
- `${CLASS$8}__item`,
17088
- elegido ? `${CLASS$8}__item--off` : "",
17089
- esElegido ? `${CLASS$8}__item--chosen` : ""
17625
+ `${CLASS$7}__item`,
17626
+ elegido ? `${CLASS$7}__item--off` : "",
17627
+ esElegido ? `${CLASS$7}__item--chosen` : ""
17090
17628
  ].filter(Boolean).join(" "),
17091
17629
  disabled: elegido,
17092
17630
  "aria-disabled": elegido,
@@ -17098,12 +17636,12 @@ const ServiceShortcuts = ({
17098
17636
  else if (o.route) eventBus?.emit(CHAT_EVENT.NAVIGATE, { route: o.route });
17099
17637
  },
17100
17638
  children: [
17101
- o.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$8}__icon`, children: ICONS[o.icon] }),
17102
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$8}__text`, children: [
17103
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$8}__label`, children: o.label }),
17104
- o.hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$8}__hint`, children: o.hint })
17639
+ o.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$7}__icon`, children: ICONS[o.icon] }),
17640
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$7}__text`, children: [
17641
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$7}__label`, children: o.label }),
17642
+ o.hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$7}__hint`, children: o.hint })
17105
17643
  ] }),
17106
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$8}__arrow`, children: esElegido ? CHECK : elegido ? null : /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "9 18 15 12 9 6" }) }) })
17644
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$7}__arrow`, children: esElegido ? CHECK : elegido ? null : /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "9 18 15 12 9 6" }) }) })
17107
17645
  ]
17108
17646
  },
17109
17647
  o.id
@@ -17672,19 +18210,19 @@ function ChatNavigatorChat({ component, eventBus }) {
17672
18210
  ] });
17673
18211
  }
17674
18212
 
17675
- const CLASS$7 = `${COMPONENT_PREFIX$1}user-tools`;
18213
+ const CLASS$6 = `${COMPONENT_PREFIX$1}user-tools`;
17676
18214
  const UserTools = ({ config, onChange, onAction, className }) => {
17677
18215
  const { title, description, items } = config;
17678
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: [CLASS$7, className].filter(Boolean).join(" "), children: [
17679
- title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: `${CLASS$7}__title`, children: title }),
17680
- description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$7}__description`, children: description }),
17681
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$7}__list`, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: `${CLASS$7}__item`, children: item.kind === "action" ? (
18216
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: [CLASS$6, className].filter(Boolean).join(" "), children: [
18217
+ title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: `${CLASS$6}__title`, children: title }),
18218
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$6}__description`, children: description }),
18219
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$6}__list`, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: `${CLASS$6}__item`, children: item.kind === "action" ? (
17682
18220
  // SPEC-139 T9 — un ajuste que se pulsa: mismo renglón (etiqueta y pista), y en vez
17683
18221
  // de la caja, un botón que dice lo que hace.
17684
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$7}__action`, children: [
17685
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$7}__text`, children: [
17686
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$7}__label`, children: item.label }),
17687
- item.hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$7}__hint`, children: item.hint })
18222
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$6}__action`, children: [
18223
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$6}__text`, children: [
18224
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$6}__label`, children: item.label }),
18225
+ item.hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$6}__hint`, children: item.hint })
17688
18226
  ] }),
17689
18227
  /* @__PURE__ */ jsxRuntime.jsx(
17690
18228
  Button,
@@ -17703,13 +18241,13 @@ const UserTools = ({ config, onChange, onAction, className }) => {
17703
18241
  checked: Boolean(item.value),
17704
18242
  disabled: item.disabled,
17705
18243
  onChange: (checked) => onChange?.(item.id, checked),
17706
- label: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$7}__text`, children: [
17707
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$7}__label`, children: item.label }),
17708
- item.hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$7}__hint`, children: item.hint })
18244
+ label: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$6}__text`, children: [
18245
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$6}__label`, children: item.label }),
18246
+ item.hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$6}__hint`, children: item.hint })
17709
18247
  ] })
17710
18248
  }
17711
18249
  ) }, item.id)) }),
17712
- items.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$7}__empty`, children: "No hay herramientas disponibles por ahora." })
18250
+ items.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$6}__empty`, children: "No hay herramientas disponibles por ahora." })
17713
18251
  ] });
17714
18252
  };
17715
18253
  UserTools.displayName = "UserTools";
@@ -18319,7 +18857,7 @@ const ChatHeader = ({
18319
18857
  ] });
18320
18858
  };
18321
18859
 
18322
- const CLASS$6 = `${COMPONENT_PREFIX$1}floating-actions`;
18860
+ const CLASS$5 = `${COMPONENT_PREFIX$1}floating-actions`;
18323
18861
  const ICON_VALUES = new Set(Object.values(ICON_TYPES));
18324
18862
  function renderIcon(icon) {
18325
18863
  if (typeof icon === "string" && ICON_VALUES.has(icon)) {
@@ -18328,23 +18866,23 @@ function renderIcon(icon) {
18328
18866
  return icon;
18329
18867
  }
18330
18868
  function Side({ buttons, align, eventBus }) {
18331
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$6}__group ${CLASS$6}__group--${align}`, children: buttons.map((b) => {
18869
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$5}__group ${CLASS$5}__group--${align}`, children: buttons.map((b) => {
18332
18870
  const emit = () => {
18333
18871
  if (b.disabled) return;
18334
18872
  eventBus.emit(b.event, b.payload);
18335
18873
  };
18336
18874
  if (b.custom) {
18337
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$6}__slot`, children: [
18875
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$5}__slot`, children: [
18338
18876
  b.custom,
18339
- b.panel && b.open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$6}__panel ${CLASS$6}__panel--${align}`, children: b.panel })
18877
+ b.panel && b.open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$5}__panel ${CLASS$5}__panel--${align}`, children: b.panel })
18340
18878
  ] }, b.id);
18341
18879
  }
18342
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$6}__slot`, children: [
18880
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$5}__slot`, children: [
18343
18881
  /* @__PURE__ */ jsxRuntime.jsxs(
18344
18882
  "button",
18345
18883
  {
18346
18884
  type: "button",
18347
- className: [`${CLASS$6}__button`, b.active ? `${CLASS$6}__button--active` : ""].filter(Boolean).join(" "),
18885
+ className: [`${CLASS$5}__button`, b.active ? `${CLASS$5}__button--active` : ""].filter(Boolean).join(" "),
18348
18886
  "aria-label": b.ariaLabel,
18349
18887
  title: b.ariaLabel,
18350
18888
  "aria-pressed": b.active,
@@ -18352,16 +18890,16 @@ function Side({ buttons, align, eventBus }) {
18352
18890
  onClick: emit,
18353
18891
  children: [
18354
18892
  renderIcon(b.icon),
18355
- b.badge != null && b.badge !== "" && b.badge !== 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$6}__badge`, children: b.badge })
18893
+ b.badge != null && b.badge !== "" && b.badge !== 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$5}__badge`, children: b.badge })
18356
18894
  ]
18357
18895
  }
18358
18896
  ),
18359
- b.panel && b.open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$6}__panel ${CLASS$6}__panel--${align}`, children: b.panel })
18897
+ b.panel && b.open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$5}__panel ${CLASS$5}__panel--${align}`, children: b.panel })
18360
18898
  ] }, b.id);
18361
18899
  }) });
18362
18900
  }
18363
18901
  const ChatFloatingActions = ({ eventBus, left = [], right = [], offset = 12, glass = false }) => {
18364
- const cls = [CLASS$6, glass ? `${CLASS$6}--glass` : ""].filter(Boolean).join(" ");
18902
+ const cls = [CLASS$5, glass ? `${CLASS$5}--glass` : ""].filter(Boolean).join(" ");
18365
18903
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cls, style: { paddingLeft: offset, paddingRight: offset }, children: [
18366
18904
  /* @__PURE__ */ jsxRuntime.jsx(Side, { buttons: left, align: "left", eventBus }),
18367
18905
  /* @__PURE__ */ jsxRuntime.jsx(Side, { buttons: right, align: "right", eventBus })
@@ -18794,7 +19332,7 @@ const UserMessage = ({
18794
19332
  ] }) });
18795
19333
  };
18796
19334
 
18797
- const CLASS$5 = `${COMPONENT_PREFIX$1}photo-picker`;
19335
+ const CLASS$4 = `${COMPONENT_PREFIX$1}photo-picker`;
18798
19336
  const PhotoPicker = ({
18799
19337
  label,
18800
19338
  hint,
@@ -18819,8 +19357,8 @@ const PhotoPicker = ({
18819
19357
  void onFiles(e.target.files);
18820
19358
  e.target.value = "";
18821
19359
  };
18822
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$5}${error ? ` ${CLASS$5}--error` : ""}`, children: [
18823
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$5}__label`, children: [
19360
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$4}${error ? ` ${CLASS$4}--error` : ""}`, children: [
19361
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$4}__label`, children: [
18824
19362
  label,
18825
19363
  required ? " *" : "",
18826
19364
  hechas > 0 ? ` (${hechas}${max ? `/${max}` : ""})` : ""
@@ -18829,7 +19367,7 @@ const PhotoPicker = ({
18829
19367
  "input",
18830
19368
  {
18831
19369
  ref: galeriaRef,
18832
- className: `${CLASS$5}__native`,
19370
+ className: `${CLASS$4}__native`,
18833
19371
  type: "file",
18834
19372
  accept: "image/*",
18835
19373
  multiple: max !== 1,
@@ -18842,7 +19380,7 @@ const PhotoPicker = ({
18842
19380
  "input",
18843
19381
  {
18844
19382
  ref: camaraRef,
18845
- className: `${CLASS$5}__native`,
19383
+ className: `${CLASS$4}__native`,
18846
19384
  type: "file",
18847
19385
  accept: "image/*",
18848
19386
  capture: "environment",
@@ -18851,15 +19389,15 @@ const PhotoPicker = ({
18851
19389
  "data-testid": "photo-picker-camera"
18852
19390
  }
18853
19391
  ),
18854
- entries.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$5}__grid`, children: entries.map((e, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: `${CLASS$5}__thumb ${CLASS$5}__thumb--${e.status}`, children: [
18855
- e.previewUrl ? /* @__PURE__ */ jsxRuntime.jsx("img", { className: `${CLASS$5}__img`, src: e.previewUrl, alt: e.name }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$5}__placeholder`, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(Icon$1, { type: ICON_TYPES.IMAGE }) }),
18856
- e.status === "uploading" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$5}__state`, children: "Subiendo\u2026" }),
18857
- e.status === "error" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$5}__state ${CLASS$5}__state--error`, children: "No se pudo subir" }),
19392
+ entries.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$4}__grid`, children: entries.map((e, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: `${CLASS$4}__thumb ${CLASS$4}__thumb--${e.status}`, children: [
19393
+ e.previewUrl ? /* @__PURE__ */ jsxRuntime.jsx("img", { className: `${CLASS$4}__img`, src: e.previewUrl, alt: e.name }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$4}__placeholder`, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(Icon$1, { type: ICON_TYPES.IMAGE }) }),
19394
+ e.status === "uploading" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$4}__state`, children: "Subiendo\u2026" }),
19395
+ e.status === "error" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$4}__state ${CLASS$4}__state--error`, children: "No se pudo subir" }),
18858
19396
  onRemove && e.status !== "uploading" && /* @__PURE__ */ jsxRuntime.jsx(
18859
19397
  "button",
18860
19398
  {
18861
19399
  type: "button",
18862
- className: `${CLASS$5}__remove`,
19400
+ className: `${CLASS$4}__remove`,
18863
19401
  onClick: () => onRemove(i),
18864
19402
  "aria-label": `Quitar ${e.name}`,
18865
19403
  disabled,
@@ -18867,12 +19405,12 @@ const PhotoPicker = ({
18867
19405
  }
18868
19406
  )
18869
19407
  ] }, `${e.name}-${i}`)) }),
18870
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$5}__actions`, children: [
19408
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$4}__actions`, children: [
18871
19409
  capture && /* @__PURE__ */ jsxRuntime.jsxs(
18872
19410
  "button",
18873
19411
  {
18874
19412
  type: "button",
18875
- className: `${CLASS$5}__pick`,
19413
+ className: `${CLASS$4}__pick`,
18876
19414
  onClick: () => elegir(camaraRef),
18877
19415
  disabled: disabled || lleno,
18878
19416
  children: [
@@ -18885,7 +19423,7 @@ const PhotoPicker = ({
18885
19423
  "button",
18886
19424
  {
18887
19425
  type: "button",
18888
- className: `${CLASS$5}__pick ${CLASS$5}__pick--secondary`,
19426
+ className: `${CLASS$4}__pick ${CLASS$4}__pick--secondary`,
18889
19427
  onClick: () => elegir(galeriaRef),
18890
19428
  disabled: disabled || lleno,
18891
19429
  children: [
@@ -18895,13 +19433,13 @@ const PhotoPicker = ({
18895
19433
  }
18896
19434
  )
18897
19435
  ] }),
18898
- error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$5}__error`, children: error }),
18899
- !error && subiendo && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$5}__hint`, children: "Espera a que terminen de subir." }),
18900
- !error && !subiendo && hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$5}__hint`, children: hint })
19436
+ error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$4}__error`, children: error }),
19437
+ !error && subiendo && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$4}__hint`, children: "Espera a que terminen de subir." }),
19438
+ !error && !subiendo && hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$4}__hint`, children: hint })
18901
19439
  ] });
18902
19440
  };
18903
19441
 
18904
- const CLASS$4 = `${COMPONENT_PREFIX$1}credentials-card`;
19442
+ const CLASS$3 = `${COMPONENT_PREFIX$1}credentials-card`;
18905
19443
  async function copiar(texto) {
18906
19444
  try {
18907
19445
  await navigator.clipboard.writeText(texto);
@@ -18918,15 +19456,15 @@ const Fila = ({ row }) => {
18918
19456
  const t = setTimeout(() => setCopiado(false), 1800);
18919
19457
  return () => clearTimeout(t);
18920
19458
  }, [copiado]);
18921
- return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: `${CLASS$4}__row`, children: [
18922
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$4}__label`, children: row.label }),
18923
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$4}__value`, "data-testid": `credential-${row.label}`, children: visible ? row.value : "\u2022".repeat(Math.min(row.value.length, 12)) }),
18924
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$4}__tools`, children: [
19459
+ return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: `${CLASS$3}__row`, children: [
19460
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$3}__label`, children: row.label }),
19461
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$3}__value`, "data-testid": `credential-${row.label}`, children: visible ? row.value : "\u2022".repeat(Math.min(row.value.length, 12)) }),
19462
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$3}__tools`, children: [
18925
19463
  row.masked && /* @__PURE__ */ jsxRuntime.jsx(
18926
19464
  "button",
18927
19465
  {
18928
19466
  type: "button",
18929
- className: `${CLASS$4}__tool`,
19467
+ className: `${CLASS$3}__tool`,
18930
19468
  onClick: () => setVisible((v) => !v),
18931
19469
  "aria-label": visible ? `Ocultar ${row.label}` : `Ver ${row.label}`,
18932
19470
  children: visible ? "Ocultar" : "Ver"
@@ -18936,7 +19474,7 @@ const Fila = ({ row }) => {
18936
19474
  "button",
18937
19475
  {
18938
19476
  type: "button",
18939
- className: `${CLASS$4}__tool`,
19477
+ className: `${CLASS$3}__tool`,
18940
19478
  onClick: async () => setCopiado(await copiar(row.value)),
18941
19479
  "aria-label": `Copiar ${row.label}`,
18942
19480
  children: copiado ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -18955,12 +19493,12 @@ const CredentialsCard = ({
18955
19493
  note,
18956
19494
  action,
18957
19495
  className
18958
- }) => /* @__PURE__ */ jsxRuntime.jsxs("section", { className: [CLASS$4, className].filter(Boolean).join(" "), "aria-label": title, children: [
18959
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: `${CLASS$4}__title`, children: title }),
18960
- intro && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$4}__intro`, children: intro }),
18961
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$4}__rows`, children: rows.map((r) => /* @__PURE__ */ jsxRuntime.jsx(Fila, { row: r }, r.label)) }),
18962
- note && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$4}__note`, children: note }),
18963
- action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$4}__action`, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { fullWidth: true, onClick: action.onClick, disabled: action.disabled, children: action.label }) })
19496
+ }) => /* @__PURE__ */ jsxRuntime.jsxs("section", { className: [CLASS$3, className].filter(Boolean).join(" "), "aria-label": title, children: [
19497
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: `${CLASS$3}__title`, children: title }),
19498
+ intro && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$3}__intro`, children: intro }),
19499
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$3}__rows`, children: rows.map((r) => /* @__PURE__ */ jsxRuntime.jsx(Fila, { row: r }, r.label)) }),
19500
+ note && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$3}__note`, children: note }),
19501
+ action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$3}__action`, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { fullWidth: true, onClick: action.onClick, disabled: action.disabled, children: action.label }) })
18964
19502
  ] });
18965
19503
  CredentialsCard.displayName = "CredentialsCard";
18966
19504
 
@@ -19132,7 +19670,7 @@ const TextArea = React.forwardRef(
19132
19670
  );
19133
19671
  TextArea.displayName = "TextArea";
19134
19672
 
19135
- const CLASS$3 = `${COMPONENT_PREFIX$1}support-request-form`;
19673
+ const CLASS$2 = `${COMPONENT_PREFIX$1}support-request-form`;
19136
19674
  const VACIO = { name: "", email: "", phone: "", subject: "", message: "" };
19137
19675
  function faltantes(v) {
19138
19676
  if (v.name.trim().length < 2) return "Escribe tu nombre.";
@@ -19177,14 +19715,14 @@ const SupportRequestForm = ({
19177
19715
  return /* @__PURE__ */ jsxRuntime.jsxs(
19178
19716
  "form",
19179
19717
  {
19180
- className: [CLASS$3, sent ? `${CLASS$3}--sent` : "", className].filter(Boolean).join(" "),
19718
+ className: [CLASS$2, sent ? `${CLASS$2}--sent` : "", className].filter(Boolean).join(" "),
19181
19719
  onSubmit: enviar,
19182
19720
  noValidate: true,
19183
19721
  children: [
19184
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: `${CLASS$3}__title`, children: title }),
19185
- intro && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$3}__intro`, children: intro }),
19186
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$3}__fields`, children: [
19187
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$3}__row`, children: [
19722
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: `${CLASS$2}__title`, children: title }),
19723
+ intro && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$2}__intro`, children: intro }),
19724
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$2}__fields`, children: [
19725
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$2}__row`, children: [
19188
19726
  /* @__PURE__ */ jsxRuntime.jsx(Input$1, { label: "Nombre", value: values.name, onChange: set("name"), fullWidth: true, disabled: sent, autoComplete: "name" }),
19189
19727
  /* @__PURE__ */ jsxRuntime.jsx(Input$1, { label: "Tel\xE9fono (opcional)", value: values.phone, onChange: set("phone"), fullWidth: true, disabled: sent, inputMode: "tel", autoComplete: "tel" })
19190
19728
  ] }),
@@ -19192,13 +19730,13 @@ const SupportRequestForm = ({
19192
19730
  /* @__PURE__ */ jsxRuntime.jsx(Input$1, { label: "Asunto", value: values.subject, onChange: set("subject"), fullWidth: true, disabled: sent }),
19193
19731
  /* @__PURE__ */ jsxRuntime.jsx(TextArea, { label: "Mensaje", value: values.message, onChange: set("message"), fullWidth: true, disabled: sent, minRows: 3, maxLength: 4e3, showCount: true })
19194
19732
  ] }),
19195
- error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$3}__error`, role: "alert", children: error }),
19196
- sent ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: `${CLASS$3}__done`, role: "status", children: [
19733
+ error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$2}__error`, role: "alert", children: error }),
19734
+ sent ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: `${CLASS$2}__done`, role: "status", children: [
19197
19735
  /* @__PURE__ */ jsxRuntime.jsx(Icon$1, { type: ICON_TYPES.CHECK, size: "small" }),
19198
19736
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: sentLabel })
19199
19737
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
19200
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$3}__actions`, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", variant: "primary", isLoading: enviando, disabled: enviando, children: submitLabel }) }),
19201
- note && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$3}__note`, children: note })
19738
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$2}__actions`, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", variant: "primary", isLoading: enviando, disabled: enviando, children: submitLabel }) }),
19739
+ note && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$2}__note`, children: note })
19202
19740
  ] })
19203
19741
  ]
19204
19742
  }
@@ -22131,105 +22669,6 @@ const Notification = ({
22131
22669
  };
22132
22670
  Notification.displayName = "Notification";
22133
22671
 
22134
- const CARD_VARIANTS = {
22135
- /** Con sombra: flota sobre el contenido (hojas, diálogos, paneles). */
22136
- ELEVATED: "elevated"};
22137
- const CARD_PADDINGS = {
22138
- MEDIUM: "medium",
22139
- LARGE: "large"
22140
- };
22141
- const CARD_RADII = {
22142
- NONE: "none",
22143
- LARGE: "large"
22144
- };
22145
-
22146
- const BASE = `${COMPONENT_PREFIX}card`;
22147
- const Card = React.forwardRef(
22148
- ({
22149
- variant = CARD_VARIANTS.ELEVATED,
22150
- padding = CARD_PADDINGS.MEDIUM,
22151
- radius = CARD_RADII.LARGE,
22152
- fullWidth = false,
22153
- className = "",
22154
- children,
22155
- ...rest
22156
- }, ref) => {
22157
- const classes = [
22158
- BASE,
22159
- `${BASE}--${variant}`,
22160
- `${BASE}--padding-${padding}`,
22161
- `${BASE}--radius-${radius}`,
22162
- fullWidth ? `${BASE}--full-width` : "",
22163
- className
22164
- ].filter(Boolean).join(" ");
22165
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: classes, ...rest, children });
22166
- }
22167
- );
22168
- Card.displayName = "Card";
22169
-
22170
- const CLASS$2 = "px-lumi-bottom-sheet";
22171
- const BottomSheet = ({
22172
- open,
22173
- children,
22174
- onClose,
22175
- showGrabber = true,
22176
- closeOnBackdrop = false,
22177
- closeOnEscape = true,
22178
- ariaLabelledBy,
22179
- className = ""
22180
- }) => {
22181
- React.useEffect(() => {
22182
- if (!open) return;
22183
- const onKey = (e) => {
22184
- if (e.key === "Escape" && closeOnEscape) onClose?.();
22185
- };
22186
- document.addEventListener("keydown", onKey);
22187
- const previous = document.body.style.overflow;
22188
- document.body.style.overflow = "hidden";
22189
- return () => {
22190
- document.removeEventListener("keydown", onKey);
22191
- document.body.style.overflow = previous;
22192
- };
22193
- }, [open, closeOnEscape, onClose]);
22194
- if (!open) return null;
22195
- return ReactDOM.createPortal(
22196
- /* @__PURE__ */ jsxRuntime.jsxs(
22197
- "div",
22198
- {
22199
- className: [CLASS$2, className].filter(Boolean).join(" "),
22200
- role: "dialog",
22201
- "aria-modal": "true",
22202
- "aria-labelledby": ariaLabelledBy,
22203
- children: [
22204
- /* @__PURE__ */ jsxRuntime.jsx(
22205
- "div",
22206
- {
22207
- className: `${CLASS$2}__backdrop`,
22208
- "aria-hidden": "true",
22209
- onClick: closeOnBackdrop ? onClose : void 0
22210
- }
22211
- ),
22212
- /* @__PURE__ */ jsxRuntime.jsxs(
22213
- Card,
22214
- {
22215
- className: `${CLASS$2}__sheet`,
22216
- padding: CARD_PADDINGS.LARGE,
22217
- radius: CARD_RADII.NONE,
22218
- fullWidth: true,
22219
- children: [
22220
- showGrabber && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$2}__grabber`, "aria-hidden": "true" }),
22221
- children
22222
- ]
22223
- }
22224
- )
22225
- ]
22226
- }
22227
- ),
22228
- document.body
22229
- );
22230
- };
22231
- BottomSheet.displayName = "BottomSheet";
22232
-
22233
22672
  const CLASS$1 = `${COMPONENT_PREFIX}live-indicator`;
22234
22673
  const LiveIndicator = ({
22235
22674
  label,
@@ -25426,6 +25865,7 @@ exports.ChatUserAttachments = UserAttachments;
25426
25865
  exports.ChatUserMessage = UserMessage;
25427
25866
  exports.ChatWidget = ChatWidget;
25428
25867
  exports.CredentialsCard = CredentialsCard;
25868
+ exports.DEFAULT_PHONE_COUNTRY = DEFAULT_PHONE_COUNTRY;
25429
25869
  exports.FileField = FileField;
25430
25870
  exports.LUMI_BADGE_VARIANTS = BADGE_VARIANTS;
25431
25871
  exports.LUMI_DEFAULT_TITLES = DEFAULT_TITLES;
@@ -25472,10 +25912,12 @@ exports.LumiMenuItem = MenuItem;
25472
25912
  exports.LumiMenuItemGroup = MenuItemGroup;
25473
25913
  exports.LumiNotification = Notification;
25474
25914
  exports.LumiPagination = Pagination;
25915
+ exports.LumiPhoneInput = PhoneInput;
25475
25916
  exports.LumiPopover = Popover;
25476
25917
  exports.LumiQRCode = QRCode;
25477
25918
  exports.LumiRecordCard = RecordCard;
25478
25919
  exports.LumiSelect = Select$1;
25920
+ exports.LumiSheetSelect = SheetSelect;
25479
25921
  exports.LumiStepIndicator = StepIndicator;
25480
25922
  exports.LumiStepper = Stepper;
25481
25923
  exports.LumiSubMenu = SubMenu;
@@ -25485,8 +25927,10 @@ exports.LumiTextArea = TextArea;
25485
25927
  exports.LumiTimeInput = TimeInput$1;
25486
25928
  exports.LumiTooltip = Tooltip;
25487
25929
  exports.MapView = MapView;
25930
+ exports.PHONE_COUNTRIES = PHONE_COUNTRIES;
25488
25931
  exports.PhotoPicker = PhotoPicker;
25489
25932
  exports.ReactiveCrud = ReactiveCrud;
25933
+ exports.SANITIZE_PRESETS = SANITIZE_PRESETS;
25490
25934
  exports.ServiceShortcuts = ServiceShortcuts;
25491
25935
  exports.ServicesMap = ServicesMap;
25492
25936
  exports.SessionExpiryPrompt = SessionExpiryPrompt;
@@ -25501,11 +25945,14 @@ exports.createStoreMerger = createStoreMerger;
25501
25945
  exports.deepMerge = deepMerge;
25502
25946
  exports.disabledReasonFor = disabledReasonFor;
25503
25947
  exports.fetchViaEventBus = fetchViaEventBus;
25948
+ exports.flagOf = flagOf;
25504
25949
  exports.getLastFleetSnapshot = getLastFleetSnapshot;
25505
25950
  exports.matchesDisabledWhen = matchesDisabledWhen;
25506
25951
  exports.matchesDoneWhen = matchesDoneWhen;
25507
25952
  exports.matchesVisibleWhen = matchesVisibleWhen;
25508
25953
  exports.registerChatComponents = registerChatComponents;
25954
+ exports.sanitize = sanitize;
25509
25955
  exports.setLastFleetSnapshot = setLastFleetSnapshot;
25956
+ exports.splitPhone = splitPhone;
25510
25957
  exports.useChatConfig = useChatConfig;
25511
25958
  exports.useReactiveCrud = useReactiveCrud;