@threadlabs/looma 0.50.2 → 0.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (373) hide show
  1. package/components/shared/binding-inputs.js +5 -0
  2. package/components/shared/calendar-model.js +84 -0
  3. package/components/shared/date-input-segments.js +25 -0
  4. package/components/shared/date-navigation.js +35 -0
  5. package/components/shared/date-picker.js +38 -0
  6. package/components/shared/date-range.js +61 -0
  7. package/components/shared/date-time.js +273 -0
  8. package/components/shared/external-value.js +12 -0
  9. package/components/shared/form-reset.js +1 -1
  10. package/components/shared/icons.js +2 -0
  11. package/components/shared/initial-field-value.js +14 -0
  12. package/components/shared/input-segments.js +190 -0
  13. package/components/shared/prepared-module.js +19 -0
  14. package/components/ui-button/ui-button.html +31 -10
  15. package/components/ui-calendar/calendar-source.js +34 -0
  16. package/components/ui-calendar/ui-calendar.html +221 -0
  17. package/components/ui-calendar/ui-calendar.js +185 -0
  18. package/components/ui-cluster/ui-cluster.html +5 -2
  19. package/components/ui-date-field/ui-date-field.html +143 -0
  20. package/components/ui-date-field/ui-date-field.js +258 -0
  21. package/components/ui-date-picker/ui-date-picker.html +213 -0
  22. package/components/ui-date-picker/ui-date-picker.js +153 -0
  23. package/components/ui-date-range-picker/ui-date-range-picker.html +202 -0
  24. package/components/ui-date-range-picker/ui-date-range-picker.js +224 -0
  25. package/components/ui-file-input/files.js +15 -0
  26. package/components/ui-file-input/ui-file-input.html +79 -0
  27. package/components/ui-file-input/ui-file-input.js +108 -0
  28. package/components/ui-form-field/ui-form-field.js +2 -2
  29. package/components/ui-grid/ui-grid.html +68 -5
  30. package/components/ui-icon/ui-icon.html +8 -0
  31. package/components/ui-icon-button/ui-icon-button.html +22 -7
  32. package/components/ui-input/ui-input.html +10 -1
  33. package/components/ui-input/ui-input.js +11 -5
  34. package/components/ui-input-group/ui-input-group.html +2 -2
  35. package/components/ui-input-group/ui-input-group.js +6 -5
  36. package/components/ui-popover/ui-popover.html +2 -0
  37. package/components/ui-popover/ui-popover.js +5 -1
  38. package/components/ui-select/ui-select.html +8 -3
  39. package/components/ui-time-field/ui-time-field.html +62 -0
  40. package/components/ui-time-field/ui-time-field.js +21 -0
  41. package/components/ui-time-picker/time-options.js +25 -0
  42. package/components/ui-time-picker/ui-time-picker.html +160 -0
  43. package/components/ui-time-picker/ui-time-picker.js +132 -0
  44. package/dist/index.js +68 -61
  45. package/docs/README.md +2 -2
  46. package/docs/catalog.json +14225 -6225
  47. package/docs/documentation.css +1 -1
  48. package/docs/framework-examples.mjs +13 -2
  49. package/docs/site.mjs +1 -1
  50. package/editor/components.css +62 -29
  51. package/editor/icons.d.ts +2 -0
  52. package/editor/index.js +602 -141
  53. package/package.json +6 -4
  54. package/styles/ui-action-bar.css +1 -1
  55. package/styles/ui-affordance-scope.css +1 -1
  56. package/styles/ui-avatar-group.css +1 -1
  57. package/styles/ui-avatar.css +1 -1
  58. package/styles/ui-badge.css +1 -1
  59. package/styles/ui-breadcrumb-item.css +1 -1
  60. package/styles/ui-breadcrumbs.css +1 -1
  61. package/styles/ui-button.css +19 -7
  62. package/styles/ui-calendar.css +1 -0
  63. package/styles/ui-callout.css +1 -1
  64. package/styles/ui-card-group.css +1 -1
  65. package/styles/ui-card.css +1 -1
  66. package/styles/ui-checkbox.css +1 -1
  67. package/styles/ui-cluster.css +4 -1
  68. package/styles/ui-color-picker.css +1 -1
  69. package/styles/ui-combobox.css +1 -1
  70. package/styles/ui-compact-content.css +1 -1
  71. package/styles/ui-compact-editor.css +1 -1
  72. package/styles/ui-compact-mark.css +1 -1
  73. package/styles/ui-compact-node.css +1 -1
  74. package/styles/ui-container.css +1 -1
  75. package/styles/ui-context-menu.css +1 -1
  76. package/styles/ui-cover.css +1 -1
  77. package/styles/ui-curve-editor.css +1 -1
  78. package/styles/ui-cycle-button.css +1 -1
  79. package/styles/ui-date-field.css +1 -0
  80. package/styles/ui-date-picker.css +1 -0
  81. package/styles/ui-date-range-picker.css +1 -0
  82. package/styles/ui-description-item.css +1 -1
  83. package/styles/ui-description-list.css +1 -1
  84. package/styles/ui-dialog.css +1 -1
  85. package/styles/ui-disclosure.css +1 -1
  86. package/styles/ui-editable.css +1 -1
  87. package/styles/ui-editor-block-actions.css +1 -1
  88. package/styles/ui-editor-chip-editor.css +1 -1
  89. package/styles/ui-editor-code-language.css +1 -1
  90. package/styles/ui-editor-footnote-editor.css +1 -1
  91. package/styles/ui-editor-formatting-tools.css +1 -1
  92. package/styles/ui-editor-image-toolbar.css +1 -1
  93. package/styles/ui-editor-insert-table-grid.css +1 -1
  94. package/styles/ui-editor-link-card.css +1 -1
  95. package/styles/ui-editor-link-form.css +1 -1
  96. package/styles/ui-editor-mention-menu-item.css +1 -1
  97. package/styles/ui-editor-mention-menu.css +1 -1
  98. package/styles/ui-editor-slash-menu-group.css +1 -1
  99. package/styles/ui-editor-slash-menu-item.css +1 -1
  100. package/styles/ui-editor-slash-menu.css +1 -1
  101. package/styles/ui-editor-surface.css +1 -1
  102. package/styles/ui-editor-table-context-menu.css +1 -1
  103. package/styles/ui-editor-table-overlay.css +1 -1
  104. package/styles/ui-editor-table-toolbar.css +1 -1
  105. package/styles/ui-editor-toolbar.css +1 -1
  106. package/styles/ui-editor.css +1 -1
  107. package/styles/ui-file-input.css +1 -0
  108. package/styles/ui-floating-action-button.css +1 -1
  109. package/styles/ui-form-field.css +1 -1
  110. package/styles/ui-grid.css +38 -1
  111. package/styles/ui-icon-button.css +19 -5
  112. package/styles/ui-icon.css +5 -1
  113. package/styles/ui-image.css +1 -1
  114. package/styles/ui-input-group.css +3 -3
  115. package/styles/ui-input.css +1 -1
  116. package/styles/ui-light-editor.css +1 -1
  117. package/styles/ui-list-item.css +1 -1
  118. package/styles/ui-list.css +1 -1
  119. package/styles/ui-listbox.css +1 -1
  120. package/styles/ui-menu-group.css +1 -1
  121. package/styles/ui-menu-item.css +1 -1
  122. package/styles/ui-menu.css +1 -1
  123. package/styles/ui-meter.css +1 -1
  124. package/styles/ui-nav-item.css +1 -1
  125. package/styles/ui-number-input.css +1 -1
  126. package/styles/ui-page-header.css +1 -1
  127. package/styles/ui-pagination.css +1 -1
  128. package/styles/ui-popover.css +1 -1
  129. package/styles/ui-radio-group.css +1 -1
  130. package/styles/ui-radio.css +1 -1
  131. package/styles/ui-reel.css +1 -1
  132. package/styles/ui-scroll-area.css +1 -1
  133. package/styles/ui-search-result-row.css +1 -1
  134. package/styles/ui-search-shell.css +1 -1
  135. package/styles/ui-section.css +1 -1
  136. package/styles/ui-select.css +9 -4
  137. package/styles/ui-separator.css +1 -1
  138. package/styles/ui-sidebar.css +1 -1
  139. package/styles/ui-site-header.css +19 -19
  140. package/styles/ui-skeleton.css +1 -1
  141. package/styles/ui-slider.css +1 -1
  142. package/styles/ui-spinner.css +1 -1
  143. package/styles/ui-stack.css +1 -1
  144. package/styles/ui-status-message.css +1 -1
  145. package/styles/ui-swatch.css +1 -1
  146. package/styles/ui-switch.css +1 -1
  147. package/styles/ui-switcher.css +1 -1
  148. package/styles/ui-table.css +1 -1
  149. package/styles/ui-tabs.css +1 -1
  150. package/styles/ui-text.css +1 -1
  151. package/styles/ui-textarea.css +1 -1
  152. package/styles/ui-time-field.css +1 -0
  153. package/styles/ui-time-picker.css +1 -0
  154. package/styles/ui-toast-region.css +1 -1
  155. package/styles/ui-toast.css +1 -1
  156. package/styles/ui-tooltip.css +1 -1
  157. package/styles/ui-top-bar.css +1 -1
  158. package/styles/ui-tree-item.css +1 -1
  159. package/styles/ui-tree.css +1 -1
  160. package/tokens.css +4 -0
  161. package/vanilla/UiActionBar.d.ts +1 -1
  162. package/vanilla/UiActionBar.js +1 -1
  163. package/vanilla/UiAffordanceScope.d.ts +1 -1
  164. package/vanilla/UiAffordanceScope.js +1 -1
  165. package/vanilla/UiAvatar.d.ts +1 -1
  166. package/vanilla/UiAvatar.js +1 -1
  167. package/vanilla/UiAvatarGroup.d.ts +1 -1
  168. package/vanilla/UiAvatarGroup.js +1 -1
  169. package/vanilla/UiBadge.d.ts +1 -1
  170. package/vanilla/UiBadge.js +1 -1
  171. package/vanilla/UiBreadcrumbItem.d.ts +1 -1
  172. package/vanilla/UiBreadcrumbItem.js +1 -1
  173. package/vanilla/UiBreadcrumbs.d.ts +1 -1
  174. package/vanilla/UiBreadcrumbs.js +1 -1
  175. package/vanilla/UiButton.d.ts +2 -1
  176. package/vanilla/UiButton.js +128 -108
  177. package/vanilla/UiCalendar.d.ts +50 -0
  178. package/vanilla/UiCalendar.js +477 -0
  179. package/vanilla/UiCallout.d.ts +1 -1
  180. package/vanilla/UiCallout.js +1 -1
  181. package/vanilla/UiCard.d.ts +1 -1
  182. package/vanilla/UiCard.js +1 -1
  183. package/vanilla/UiCardGroup.d.ts +1 -1
  184. package/vanilla/UiCardGroup.js +1 -1
  185. package/vanilla/UiCheckbox.d.ts +1 -1
  186. package/vanilla/UiCheckbox.js +1 -1
  187. package/vanilla/UiCluster.d.ts +2 -2
  188. package/vanilla/UiCluster.js +2 -2
  189. package/vanilla/UiColorPicker.d.ts +1 -1
  190. package/vanilla/UiColorPicker.js +1 -1
  191. package/vanilla/UiCombobox.d.ts +1 -1
  192. package/vanilla/UiCombobox.js +1 -1
  193. package/vanilla/UiCompactContent.d.ts +1 -1
  194. package/vanilla/UiCompactContent.js +1 -1
  195. package/vanilla/UiCompactEditor.d.ts +1 -1
  196. package/vanilla/UiCompactEditor.js +1 -1
  197. package/vanilla/UiCompactMark.d.ts +1 -1
  198. package/vanilla/UiCompactMark.js +1 -1
  199. package/vanilla/UiCompactNode.d.ts +1 -1
  200. package/vanilla/UiCompactNode.js +1 -1
  201. package/vanilla/UiContainer.d.ts +1 -1
  202. package/vanilla/UiContainer.js +1 -1
  203. package/vanilla/UiContextMenu.d.ts +1 -1
  204. package/vanilla/UiContextMenu.js +1 -1
  205. package/vanilla/UiCover.d.ts +1 -1
  206. package/vanilla/UiCover.js +1 -1
  207. package/vanilla/UiCurveEditor.d.ts +1 -1
  208. package/vanilla/UiCurveEditor.js +1 -1
  209. package/vanilla/UiCycleButton.d.ts +1 -1
  210. package/vanilla/UiCycleButton.js +1 -1
  211. package/vanilla/UiDateField.d.ts +52 -0
  212. package/vanilla/UiDateField.js +208 -0
  213. package/vanilla/UiDatePicker.d.ts +63 -0
  214. package/vanilla/UiDatePicker.js +360 -0
  215. package/vanilla/UiDateRangePicker.d.ts +60 -0
  216. package/vanilla/UiDateRangePicker.js +418 -0
  217. package/vanilla/UiDescriptionItem.d.ts +1 -1
  218. package/vanilla/UiDescriptionItem.js +1 -1
  219. package/vanilla/UiDescriptionList.d.ts +1 -1
  220. package/vanilla/UiDescriptionList.js +1 -1
  221. package/vanilla/UiDialog.d.ts +1 -1
  222. package/vanilla/UiDialog.js +1 -1
  223. package/vanilla/UiDisclosure.d.ts +1 -1
  224. package/vanilla/UiDisclosure.js +1 -1
  225. package/vanilla/UiEditable.d.ts +1 -1
  226. package/vanilla/UiEditable.js +1 -1
  227. package/vanilla/UiEditor.d.ts +1 -1
  228. package/vanilla/UiEditor.js +1 -1
  229. package/vanilla/UiEditorBlockActions.d.ts +1 -1
  230. package/vanilla/UiEditorBlockActions.js +1 -1
  231. package/vanilla/UiEditorChipEditor.d.ts +1 -1
  232. package/vanilla/UiEditorChipEditor.js +1 -1
  233. package/vanilla/UiEditorCodeLanguage.d.ts +1 -1
  234. package/vanilla/UiEditorCodeLanguage.js +1 -1
  235. package/vanilla/UiEditorFootnoteEditor.d.ts +1 -1
  236. package/vanilla/UiEditorFootnoteEditor.js +1 -1
  237. package/vanilla/UiEditorFormattingTools.d.ts +1 -1
  238. package/vanilla/UiEditorFormattingTools.js +1 -1
  239. package/vanilla/UiEditorImageToolbar.d.ts +1 -1
  240. package/vanilla/UiEditorImageToolbar.js +1 -1
  241. package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
  242. package/vanilla/UiEditorInsertTableGrid.js +1 -1
  243. package/vanilla/UiEditorLinkCard.d.ts +1 -1
  244. package/vanilla/UiEditorLinkCard.js +1 -1
  245. package/vanilla/UiEditorLinkForm.d.ts +1 -1
  246. package/vanilla/UiEditorLinkForm.js +1 -1
  247. package/vanilla/UiEditorMentionMenu.d.ts +1 -1
  248. package/vanilla/UiEditorMentionMenu.js +1 -1
  249. package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
  250. package/vanilla/UiEditorMentionMenuItem.js +1 -1
  251. package/vanilla/UiEditorSlashMenu.d.ts +1 -1
  252. package/vanilla/UiEditorSlashMenu.js +1 -1
  253. package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
  254. package/vanilla/UiEditorSlashMenuGroup.js +1 -1
  255. package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
  256. package/vanilla/UiEditorSlashMenuItem.js +1 -1
  257. package/vanilla/UiEditorSurface.d.ts +1 -1
  258. package/vanilla/UiEditorSurface.js +1 -1
  259. package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
  260. package/vanilla/UiEditorTableContextMenu.js +1 -1
  261. package/vanilla/UiEditorTableOverlay.d.ts +1 -1
  262. package/vanilla/UiEditorTableOverlay.js +1 -1
  263. package/vanilla/UiEditorTableToolbar.d.ts +1 -1
  264. package/vanilla/UiEditorTableToolbar.js +1 -1
  265. package/vanilla/UiEditorToolbar.d.ts +1 -1
  266. package/vanilla/UiEditorToolbar.js +1 -1
  267. package/vanilla/UiFileInput.d.ts +36 -0
  268. package/vanilla/UiFileInput.js +209 -0
  269. package/vanilla/UiFloatingActionButton.d.ts +1 -1
  270. package/vanilla/UiFloatingActionButton.js +1 -1
  271. package/vanilla/UiFormField.d.ts +1 -1
  272. package/vanilla/UiFormField.js +1 -1
  273. package/vanilla/UiGrid.d.ts +7 -2
  274. package/vanilla/UiGrid.js +85 -19
  275. package/vanilla/UiIcon.d.ts +2 -1
  276. package/vanilla/UiIcon.js +10 -10
  277. package/vanilla/UiIconButton.d.ts +2 -2
  278. package/vanilla/UiIconButton.js +2 -2
  279. package/vanilla/UiImage.d.ts +1 -1
  280. package/vanilla/UiImage.js +1 -1
  281. package/vanilla/UiInput.d.ts +2 -1
  282. package/vanilla/UiInput.js +11 -11
  283. package/vanilla/UiInputGroup.d.ts +1 -1
  284. package/vanilla/UiInputGroup.js +1 -1
  285. package/vanilla/UiLightEditor.d.ts +1 -1
  286. package/vanilla/UiLightEditor.js +1 -1
  287. package/vanilla/UiList.d.ts +1 -1
  288. package/vanilla/UiList.js +1 -1
  289. package/vanilla/UiListItem.d.ts +1 -1
  290. package/vanilla/UiListItem.js +1 -1
  291. package/vanilla/UiListbox.d.ts +1 -1
  292. package/vanilla/UiListbox.js +1 -1
  293. package/vanilla/UiMenu.d.ts +1 -1
  294. package/vanilla/UiMenu.js +1 -1
  295. package/vanilla/UiMenuGroup.d.ts +1 -1
  296. package/vanilla/UiMenuGroup.js +1 -1
  297. package/vanilla/UiMenuItem.d.ts +1 -1
  298. package/vanilla/UiMenuItem.js +1 -1
  299. package/vanilla/UiMeter.d.ts +1 -1
  300. package/vanilla/UiMeter.js +1 -1
  301. package/vanilla/UiNavItem.d.ts +1 -1
  302. package/vanilla/UiNavItem.js +1 -1
  303. package/vanilla/UiNumberInput.d.ts +1 -1
  304. package/vanilla/UiNumberInput.js +1 -1
  305. package/vanilla/UiPageHeader.d.ts +1 -1
  306. package/vanilla/UiPageHeader.js +1 -1
  307. package/vanilla/UiPagination.d.ts +1 -1
  308. package/vanilla/UiPagination.js +1 -1
  309. package/vanilla/UiPopover.d.ts +2 -1
  310. package/vanilla/UiPopover.js +4 -4
  311. package/vanilla/UiRadio.d.ts +1 -1
  312. package/vanilla/UiRadio.js +1 -1
  313. package/vanilla/UiRadioGroup.d.ts +1 -1
  314. package/vanilla/UiRadioGroup.js +1 -1
  315. package/vanilla/UiReel.d.ts +1 -1
  316. package/vanilla/UiReel.js +1 -1
  317. package/vanilla/UiScrollArea.d.ts +1 -1
  318. package/vanilla/UiScrollArea.js +1 -1
  319. package/vanilla/UiSearchResultRow.d.ts +1 -1
  320. package/vanilla/UiSearchResultRow.js +1 -1
  321. package/vanilla/UiSearchShell.d.ts +1 -1
  322. package/vanilla/UiSearchShell.js +1 -1
  323. package/vanilla/UiSection.d.ts +1 -1
  324. package/vanilla/UiSection.js +1 -1
  325. package/vanilla/UiSelect.d.ts +1 -1
  326. package/vanilla/UiSelect.js +1 -1
  327. package/vanilla/UiSeparator.d.ts +1 -1
  328. package/vanilla/UiSeparator.js +1 -1
  329. package/vanilla/UiSidebar.d.ts +1 -1
  330. package/vanilla/UiSidebar.js +1 -1
  331. package/vanilla/UiSiteHeader.d.ts +1 -1
  332. package/vanilla/UiSiteHeader.js +1 -1
  333. package/vanilla/UiSkeleton.d.ts +1 -1
  334. package/vanilla/UiSkeleton.js +1 -1
  335. package/vanilla/UiSlider.d.ts +1 -1
  336. package/vanilla/UiSlider.js +1 -1
  337. package/vanilla/UiSpinner.d.ts +1 -1
  338. package/vanilla/UiSpinner.js +1 -1
  339. package/vanilla/UiStack.d.ts +1 -1
  340. package/vanilla/UiStack.js +1 -1
  341. package/vanilla/UiStatusMessage.d.ts +1 -1
  342. package/vanilla/UiStatusMessage.js +1 -1
  343. package/vanilla/UiSwatch.d.ts +1 -1
  344. package/vanilla/UiSwatch.js +1 -1
  345. package/vanilla/UiSwitch.d.ts +1 -1
  346. package/vanilla/UiSwitch.js +1 -1
  347. package/vanilla/UiSwitcher.d.ts +1 -1
  348. package/vanilla/UiSwitcher.js +1 -1
  349. package/vanilla/UiTable.d.ts +1 -1
  350. package/vanilla/UiTable.js +1 -1
  351. package/vanilla/UiTabs.d.ts +1 -1
  352. package/vanilla/UiTabs.js +1 -1
  353. package/vanilla/UiText.d.ts +1 -1
  354. package/vanilla/UiText.js +1 -1
  355. package/vanilla/UiTextarea.d.ts +1 -1
  356. package/vanilla/UiTextarea.js +1 -1
  357. package/vanilla/UiTimeField.d.ts +42 -0
  358. package/vanilla/UiTimeField.js +112 -0
  359. package/vanilla/UiTimePicker.d.ts +48 -0
  360. package/vanilla/UiTimePicker.js +372 -0
  361. package/vanilla/UiToast.d.ts +1 -1
  362. package/vanilla/UiToast.js +1 -1
  363. package/vanilla/UiToastRegion.d.ts +1 -1
  364. package/vanilla/UiToastRegion.js +1 -1
  365. package/vanilla/UiTooltip.d.ts +1 -1
  366. package/vanilla/UiTooltip.js +1 -1
  367. package/vanilla/UiTopBar.d.ts +1 -1
  368. package/vanilla/UiTopBar.js +1 -1
  369. package/vanilla/UiTree.d.ts +1 -1
  370. package/vanilla/UiTree.js +1 -1
  371. package/vanilla/UiTreeItem.d.ts +1 -1
  372. package/vanilla/UiTreeItem.js +1 -1
  373. package/vanilla/index.js +7 -0
@@ -13,9 +13,10 @@
13
13
  cleared.</prop>
14
14
  <prop name="pending" type="boolean" default="false">Deprecated alias for loading.</prop>
15
15
  <prop name="label" type="string">Accessible name for the icon.</prop>
16
- <prop name="size" type="keyword" values="sm, md, lg" default="md"
17
- >Button and icon size together: sm is 1.75rem with a small icon, md is 2rem, and lg is 2.5rem with a large icon. Touch can use an invisible hit area sized
18
- by the adjustable control target preference.</prop>
16
+ <prop name="size" type="keyword" values="xs, sm, md, lg" default="md"
17
+ >Button and icon size together: xs is the compact control height (1.5rem), matching Button xs for inline actions; sm is 1.75rem with a small icon, md is
18
+ 2rem, and lg is 2.5rem with a large icon. Touch uses the adjustable control target preference; xs uses --ui-inline-control-min-block-size so dense inline
19
+ actions keep independent targets.</prop>
19
20
  <prop name="matchButton" type="boolean" default="false"
20
21
  >Matches a boxed Button of the same size when the two share a flex row. Uses the control-size theme tokens and stretches to the row's height, on mouse and
21
22
  touch alike. Touch expansion stays vertical so an adjacent action keeps its own horizontal boundary. Leave it off for compact toolbar and inline icon
@@ -318,6 +319,7 @@
318
319
  :host {
319
320
  /* The size prop resolves here; --ui-icon-button-size overrides it on an element. */
320
321
  --_size: 2rem;
322
+ --_icon-button-hit-size: var(--ui-control-min-block-size);
321
323
  appearance: none;
322
324
  inline-size: var(--ui-icon-button-size, var(--_size));
323
325
  block-size: var(--ui-icon-button-size, var(--_size));
@@ -358,8 +360,8 @@
358
360
  content: "";
359
361
  position: absolute;
360
362
  inset: 50% auto auto 50%;
361
- inline-size: max(100%, var(--ui-control-min-block-size));
362
- block-size: max(100%, var(--ui-control-min-block-size));
363
+ inline-size: max(100%, var(--_icon-button-hit-size));
364
+ block-size: max(100%, var(--_icon-button-hit-size));
363
365
  transform: translate(-50%, -50%);
364
366
  }
365
367
  }
@@ -372,11 +374,16 @@
372
374
  content: "";
373
375
  position: absolute;
374
376
  inset: 50% auto auto 50%;
375
- inline-size: max(100%, var(--ui-control-min-block-size));
376
- block-size: max(100%, var(--ui-control-min-block-size));
377
+ inline-size: max(100%, var(--_icon-button-hit-size));
378
+ block-size: max(100%, var(--_icon-button-hit-size));
377
379
  transform: translate(-50%, -50%);
378
380
  }
379
381
 
382
+ :host([size="xs"]) {
383
+ --_size: var(--ui-control-size-xs);
384
+ --_icon-button-hit-size: var(--ui-inline-control-min-block-size);
385
+ }
386
+
380
387
  :host([size="sm"]) {
381
388
  --_size: 1.75rem;
382
389
  inline-size: var(--ui-icon-button-size, var(--_size));
@@ -406,6 +413,10 @@
406
413
  inline-size: 100%;
407
414
  }
408
415
 
416
+ :host([matchButton][size="xs"]) {
417
+ --_size: var(--ui-control-size-xs);
418
+ }
419
+
409
420
  :host([matchButton][size="sm"]) {
410
421
  --_size: var(--ui-control-size-sm);
411
422
  }
@@ -589,6 +600,10 @@
589
600
  --_ui-default-icon-stroke-width: var(--_ui-icon-button-icon-stroke-width, 1.75);
590
601
  }
591
602
 
603
+ :host([size="xs"]) {
604
+ --_icon-button-icon-default: var(--ui-icon-size-xs);
605
+ }
606
+
592
607
  :host([size="sm"]) {
593
608
  --_icon-button-icon-default: var(--ui-icon-size-sm);
594
609
  }
@@ -27,7 +27,16 @@
27
27
  <prop name="value" type="input-value"
28
28
  >The input's value: text, or a number for type="number" and type="range" fields. Setting or changing it replaces the live text; between changes the user's
29
29
  typing stands, so follow input events to keep it in step. A number field keeps text that means the same number, such as 1.0 for 1. It is also the input's
30
- default, so a form reset returns to it.</prop>
30
+ default, so a form reset returns to it. Native edits made before the first browser connection stay live when that external value is unchanged.</prop>
31
+ <prop name="segments" type="list">Optional text-entry blocks. A placeholder defines an editable block’s maximum length; pattern matches one allowed Unicode
32
+ character. A literal is skipped automatically or by typing it. Focus selects the first block; arrows and deletion move between blocks. Native paste,
33
+ composition and autofill remain available. Placeholder text is never inserted into the value; empty fields use the native placeholder attribute. Applies
34
+ to text, tel and search inputs.
35
+ <prop type="object"><prop name="placeholder" type="string"></prop><prop name="pattern" type="string"></prop><prop
36
+ name="literal"
37
+ type="string"
38
+ ></prop></prop>
39
+ </prop>
31
40
  <prop name="disabled" type="boolean" default="false">Prevents editing and form submission.</prop>
32
41
  <prop name="invalid" type="boolean" default="false">Exposes invalid state to assistive technology and styling.</prop>
33
42
  <prop name="readonly" type="boolean" default="false">Allows selection without allowing edits.</prop>
@@ -1,16 +1,22 @@
1
- // The value attribute only sets the default; a controlled value is applied to the live input. The
2
- // value is also made the native default, so a form reset returns to it.
1
+ import { inputSegments } from "../shared/input-segments.js";
2
+ import { externalValueTracker } from "../shared/external-value.js";
3
+
4
+ /** Retain native edits between external value changes, including the first browser connection. */
3
5
  export function connect(host) {
4
- return host.effect(() => {
6
+ const input = host.element;
7
+ const changed = externalValueTracker(input, { initialValue: host.props.value.value });
8
+ const stopSegments = inputSegments(input, () => host.props.segments.value, () => host.props.value.value);
9
+ const stop = host.effect(() => {
5
10
  const value = host.props.value.value;
11
+ const replace = changed(value);
6
12
  if (value === undefined || value === null) return;
7
- const input = host.element;
8
13
  const text = String(value);
9
14
  input.defaultValue = text;
10
- if (input.value === text) return;
15
+ if (!replace || input.value === text) return;
11
16
  // A number field's text can differ from the number it means (1.0 is 1, and Chromium reads 12. as
12
17
  // 12). Writing the value would erase what the user is typing, so a field that means it stays.
13
18
  if (input.type === "number" && input.value !== "" && Number(input.value) === Number(value)) return;
14
19
  input.value = text;
15
20
  });
21
+ return () => { stop(); stopSegments(); };
16
22
  }
@@ -89,7 +89,7 @@
89
89
  min-block-size: var(--ui-control-size-lg);
90
90
  }
91
91
 
92
- :host:hover:not(:has(:is(input, textarea):focus, :is(input, textarea):disabled, :is(input, textarea):read-only, [aria-invalid="true"], :user-invalid)) {
92
+ :host:hover:not(:has(:is(input, textarea):focus, :is(input:not([type="hidden"]), textarea):not([hidden]):disabled, :is(input:not([type="hidden"]), textarea):not([hidden]):read-only, [aria-invalid="true"], :user-invalid)) {
93
93
  border-color: var(--ui-control-border-hover, var(--ui-text-secondary));
94
94
  }
95
95
 
@@ -127,7 +127,7 @@
127
127
  }
128
128
 
129
129
  :host([disabled]),
130
- :host:has(:is(input, textarea):disabled) {
130
+ :host:has(:is(input:not([type="hidden"]), textarea):not([hidden]):disabled) {
131
131
  background: var(--ui-control-surface-disabled, var(--ui-surface-muted));
132
132
  box-shadow: none;
133
133
  cursor: not-allowed;
@@ -3,6 +3,7 @@ import { DEV, duplicateId, warnOnce } from "../shared/authoring.js";
3
3
  let nextAffixId = 0;
4
4
  // An affix holding a control keeps it: its clicks are its own, and it is not hidden or described.
5
5
  const INTERACTIVE = "a[href], button, input, select, textarea, [tabindex], [contenteditable]";
6
+ const FIELD = ".field :is(input:not([type=hidden]), textarea):not([hidden])";
6
7
 
7
8
  function descriptionIds(input) {
8
9
  return (input.getAttribute("aria-describedby") ?? "").split(/\s+/).filter(Boolean);
@@ -36,7 +37,7 @@ export function connect(host) {
36
37
  if (action) actionObserver.observe(action);
37
38
  }
38
39
  measureAction();
39
- const input = element.querySelector(".field :is(input, textarea)");
40
+ const input = element.querySelector(FIELD);
40
41
  const affixes = Array.from(element.querySelectorAll(":scope > .affix")).filter((affix) => {
41
42
  const text = affix.textContent.trim() !== "" && !affix.querySelector(INTERACTIVE);
42
43
  if (text) affix.setAttribute("aria-hidden", "true");
@@ -65,14 +66,14 @@ export function connect(host) {
65
66
  };
66
67
  // Click, not pointerdown: a tap's click is a user activation, so a touch keyboard opens.
67
68
  const onClick = (event) => {
68
- if (pressedAround(event) && !host.props.disabled.value) element.querySelector(".field :is(input, textarea)")?.focus();
69
+ if (pressedAround(event) && !host.props.disabled.value) element.querySelector(FIELD)?.focus();
69
70
  };
70
71
  element.addEventListener("mousedown", onMousedown);
71
72
  element.addEventListener("click", onClick);
72
- // Re-link when the input, an affix, or a description set elsewhere changes. Only aria-describedby
73
- // is watched, and it is written only when it differs, so this settles.
73
+ // Re-link when a composed field switches its visible input, an affix changes,
74
+ // or an external description changes. Description writes settle when unchanged.
74
75
  const observer = new MutationObserver(() => queueMicrotask(wire));
75
- observer.observe(element, { childList: true, characterData: true, subtree: true, attributes: true, attributeFilter: ["aria-describedby"] });
76
+ observer.observe(element, { childList: true, characterData: true, subtree: true, attributes: true, attributeFilter: ["aria-describedby", "hidden"] });
76
77
  wire();
77
78
  return () => {
78
79
  observer.disconnect();
@@ -7,6 +7,8 @@
7
7
  surface separation adapts to popover purpose and rendered size.</prop>
8
8
  <prop name="open" type="boolean" default="false">Whether the popover is open initially or when set externally.</prop>
9
9
  <prop name="for" type="string" default="">ID of the control that toggles and anchors the popover.</prop>
10
+ <prop name="trigger" type="keyword" values="click, manual" default="click"
11
+ >Click toggles the popover from its for control. Manual retains anchoring, aria-expanded, Escape and light dismissal while the caller controls open.</prop>
10
12
  <prop
11
13
  name="placement"
12
14
  type="keyword"
@@ -17,6 +17,7 @@ export function connect(host) {
17
17
  let surface = null;
18
18
  let lastFor;
19
19
  let lastPlacement;
20
+ let lastTrigger;
20
21
  let lastOpen;
21
22
  let lastExternalOpen = Boolean(host.props.open.value);
22
23
  host.state.internalOpen = lastExternalOpen;
@@ -50,15 +51,18 @@ export function connect(host) {
50
51
  const setup = () => {
51
52
  const nextFor = String(host.props.for.value ?? "");
52
53
  const nextPlacement = String(host.props.placement.value ?? "bottom-start");
54
+ const nextTrigger = host.props.trigger.value;
53
55
  if (surface && nextFor === lastFor && nextPlacement === lastPlacement
56
+ && nextTrigger === lastTrigger
54
57
  && (!nextFor || anchor === document.getElementById(nextFor))) return;
55
58
  lastFor = nextFor;
56
59
  lastPlacement = nextPlacement;
60
+ lastTrigger = nextTrigger;
57
61
  surface?.destroy();
58
62
  releaseAnchor();
59
63
  anchor = ids.get(nextFor);
60
64
  if (anchor) anchorExpanded = anchor.getAttribute("aria-expanded");
61
- anchor?.addEventListener("click", onAnchorClick);
65
+ if (nextTrigger !== "manual") anchor?.addEventListener("click", onAnchorClick);
62
66
  surface = createAnchoredSurface(element, { anchor, placement: nextPlacement, gap: offset, materialRole: "popover" });
63
67
  };
64
68
  const apply = () => {
@@ -20,6 +20,7 @@
20
20
  :host {
21
21
  --_ui-select-size: var(--ui-control-size-md);
22
22
  --_ui-select-inset-block: var(--ui-control-inset-block-md, var(--ui-space-2));
23
+ --_ui-select-chevron-inset: var(--ui-space-3);
23
24
  box-sizing: border-box !important;
24
25
  display: inline-block !important;
25
26
  inline-size: var(--ui-select-inline-size, 100%);
@@ -55,10 +56,14 @@
55
56
  ),
56
57
  var(--_ui-select-highlight);
57
58
  background-repeat: no-repeat;
58
- background-position: right var(--ui-space-3) center, center;
59
+ background-position: right var(--_ui-select-chevron-inset) center, center;
59
60
  background-size: 1.125rem 1.125rem, 100% 100%;
60
61
  }
61
62
 
63
+ :host:dir(rtl) {
64
+ background-position: left var(--_ui-select-chevron-inset) center, center;
65
+ }
66
+
62
67
  :host([muted]) {
63
68
  color: var(--ui-text-secondary);
64
69
  }
@@ -110,7 +115,7 @@
110
115
  min-block-size: var(--ui-control-size-sm);
111
116
  padding: var(--_ui-select-inset-block) var(--ui-space-2) !important;
112
117
  padding-inline-end: calc(var(--ui-space-2) + var(--ui-icon-size-sm) + var(--ui-space-1)) !important;
113
- background-position: right var(--ui-space-2) center, center;
118
+ --_ui-select-chevron-inset: var(--ui-space-2);
114
119
  background-size:
115
120
  var(--ui-icon-size-sm) var(--ui-icon-size-sm),
116
121
  100% 100%;
@@ -123,7 +128,7 @@
123
128
  min-block-size: var(--ui-control-size-lg);
124
129
  padding: var(--_ui-select-inset-block) var(--ui-space-4) !important;
125
130
  padding-inline-end: calc(var(--ui-space-4) + 1.5rem) !important;
126
- background-position: right var(--ui-space-4) center, center;
131
+ --_ui-select-chevron-inset: var(--ui-space-4);
127
132
  font-size: var(--ui-font-size-md);
128
133
  }
129
134
 
@@ -0,0 +1,62 @@
1
+ <link rel="component" href="../ui-date-field/ui-date-field.html">
2
+ <template component="ui-time-field" module="./ui-time-field.js">
3
+ <defs>
4
+ <prop name="value" type="string" default=""
5
+ >Initial ISO time, replaced when changed externally. Live edits emit input/change; reset restores this value.</prop>
6
+ <prop name="locale" type="string" default="en-US">Intl locale for digits and 12/24-hour conventions. ISO time paste is always accepted.</prop>
7
+ <prop name="hourCycle" type="keyword" values="h11, h12, h23, h24">Hour cycle; omission follows the locale.</prop>
8
+ <prop name="granularity" type="keyword" values="minute, second" default="minute"
9
+ >Smallest displayed unit. Nonzero seconds and fractions are preserved.</prop>
10
+ <prop name="min" type="string" default="">Inclusive earliest permitted time.</prop>
11
+ <prop name="max" type="string" default=""
12
+ >Inclusive latest permitted time. A maximum before the minimum wraps across midnight, matching native time inputs.</prop>
13
+ <prop name="name" type="string" default="">Native form field name for the canonical time.</prop>
14
+ <prop name="form" type="string" default="">Optional ID of a form outside this component’s ancestor tree.</prop>
15
+ <prop name="inputId" type="string" default="">ID of the active native input, for an authored label.</prop>
16
+ <prop name="label" type="string" default="">Optional accessible input name; prefer a visible label associated with input-id.</prop>
17
+ <prop name="size" type="keyword" values="sm, md, lg" default="md">Input's shared size scale.</prop>
18
+ <prop name="placeholder" type="string" default="">Optional hint inside the empty input.</prop>
19
+ <prop name="disabled" type="boolean" default="false">Prevents editing and omits submission.</prop>
20
+ <prop name="readonly" type="boolean" default="false">Preserves selection and submission while preventing edits.</prop>
21
+ <prop name="required" type="boolean" default="false">Requires a complete time.</prop>
22
+ <prop name="invalid" type="boolean" default="false">External invalid state supplied by the application.</prop>
23
+ <event name="input" type="object"><prop name="value" type="string" required></prop><prop
24
+ name="trigger"
25
+ type="keyword"
26
+ values="keyboard, pointer, programmatic"
27
+ required
28
+ ></prop></event>
29
+ <event name="change" type="object"><prop name="value" type="string" required></prop><prop
30
+ name="trigger"
31
+ type="keyword"
32
+ values="keyboard, pointer, programmatic"
33
+ required
34
+ ></prop></event>
35
+ <event name="query-change" type="object"><prop name="query" type="string" required></prop></event>
36
+ <event name="validation-change" type="object"><prop name="invalid" type="boolean" required></prop><prop
37
+ name="message"
38
+ type="string"
39
+ required
40
+ ></prop></event>
41
+ </defs>
42
+ <span><ui-date-field
43
+ data-time-field
44
+ type="time"
45
+ from:value="$value"
46
+ from:locale="$locale"
47
+ from:hour-cycle="$hourCycle"
48
+ from:granularity="$granularity"
49
+ from:min="$min"
50
+ from:max="$max"
51
+ from:name="$name"
52
+ from:form="$form"
53
+ from:input-id="$inputId"
54
+ from:label="$label"
55
+ from:size="$size"
56
+ from:placeholder="$placeholder"
57
+ from:disabled="$disabled"
58
+ from:readonly="$readonly"
59
+ from:required="$required"
60
+ from:invalid="$invalid"
61
+ ></ui-date-field></span>
62
+ </template>
@@ -0,0 +1,21 @@
1
+ /** Forward the composed field's events once through the same contract in HTML and adapters. */
2
+ export function connect(host) {
3
+ const field = host.element.querySelector("[data-time-field]");
4
+ const events = ["input", "change", "query-change", "validation-change"];
5
+ const forward = event => {
6
+ if (event.detail === undefined) return;
7
+ event.stopPropagation();
8
+ host.dispatch(event.type, event.detail);
9
+ };
10
+ const request = event => {
11
+ if (event.target !== host.element) return;
12
+ const accepted = field.dispatchEvent(event instanceof CustomEvent ? new CustomEvent(event.type, { detail: event.detail, cancelable: event.cancelable }) : new Event(event.type));
13
+ if (!accepted) event.preventDefault();
14
+ };
15
+ for (const name of events) field.addEventListener(name, forward);
16
+ for (const name of ["validate", "set-value"]) host.element.addEventListener(name, request);
17
+ return () => {
18
+ for (const name of events) field.removeEventListener(name, forward);
19
+ for (const name of ["validate", "set-value"]) host.element.removeEventListener(name, request);
20
+ };
21
+ }
@@ -0,0 +1,25 @@
1
+ import { Temporal, canonicalValue } from "../shared/date-time.js";
2
+
3
+ const second = 1_000_000_000;
4
+ const dayEnd = 86400 * second - 1;
5
+ const scalar = time => time.since("00:00").total({ unit: "nanoseconds" });
6
+
7
+ /** Mark choices that cannot produce an allowed time, including overnight bounds and retained fractions. */
8
+ export function timeOptions(value, options = {}) {
9
+ const time = Temporal.PlainTime.from(canonicalValue(value, { type: "time" }));
10
+ const min = options.min ? scalar(Temporal.PlainTime.from(canonicalValue(options.min, { type: "time" }))) : 0;
11
+ const max = options.max ? scalar(Temporal.PlainTime.from(canonicalValue(options.max, { type: "time" }))) : dayEnd;
12
+ const intervals = min <= max ? [[min, max]] : [[0, max], [min, dayEnd]];
13
+ const fraction = time.millisecond * 1_000_000 + time.microsecond * 1000 + time.nanosecond;
14
+ const available = (begin, end, step) => intervals.some(([lower, upper]) => {
15
+ const first = begin + Math.max(0, Math.ceil((lower - begin) / step)) * step;
16
+ return first <= Math.min(end, upper);
17
+ });
18
+ const choices = (length, interval) => Array.from({ length }, (_, value) => ({ value: String(value), disabled: !available(...interval(value)) }));
19
+ const seconds = options.showSeconds;
20
+ return {
21
+ hours: choices(24, hour => [hour * 3600 * second + fraction, (hour * 3600 + (seconds ? 3599 : 3540)) * second + fraction, (seconds ? 1 : 60) * second]),
22
+ minutes: choices(60, minute => [(time.hour * 3600 + minute * 60) * second + fraction, (time.hour * 3600 + minute * 60 + (seconds ? 59 : 0)) * second + fraction, second]),
23
+ seconds: choices(60, value => [(time.hour * 3600 + time.minute * 60 + value) * second + fraction, (time.hour * 3600 + time.minute * 60 + value) * second + fraction, second]),
24
+ };
25
+ }
@@ -0,0 +1,160 @@
1
+ <link rel="component" href="../ui-time-field/ui-time-field.html">
2
+ <link rel="component" href="../ui-input-group/ui-input-group.html">
3
+ <link rel="component" href="../ui-icon-button/ui-icon-button.html">
4
+ <link rel="component" href="../ui-icon/ui-icon.html">
5
+ <link rel="component" href="../ui-popover/ui-popover.html">
6
+ <link rel="component" href="../ui-stack/ui-stack.html">
7
+ <link rel="component" href="../ui-cluster/ui-cluster.html">
8
+ <link rel="component" href="../ui-select/ui-select.html">
9
+ <link rel="component" href="../ui-text/ui-text.html">
10
+ <template component="ui-time-picker" module="./ui-time-picker.js">
11
+ <defs>
12
+ <prop name="value" type="string" default="">Initial canonical time, replaced when changed externally. Reset restores this external value.</prop>
13
+ <prop name="locale" type="string" default="en-US">Intl locale for typed time and display. ISO time paste is always accepted.</prop>
14
+ <prop name="hourCycle" type="keyword" values="h11, h12, h23, h24">Hour cycle for the field and picker choices; omission follows the locale.</prop>
15
+ <prop name="granularity" type="keyword" values="minute, second" default="minute"
16
+ >Smallest displayed time unit. Existing seconds and fractions are preserved.</prop>
17
+ <prop name="min" type="string" default="">Inclusive earliest time. Bounds may wrap midnight when max precedes min.</prop>
18
+ <prop name="max" type="string" default="">Inclusive latest permitted time, in canonical ISO time format.</prop>
19
+ <prop name="name" type="string" default="">Native form field name for the canonical time.</prop>
20
+ <prop name="form" type="string" default="">Optional external form ID.</prop>
21
+ <prop name="inputId" type="string" default="">ID of the active native input for an authored label.</prop>
22
+ <prop name="label" type="string" default="">Optional accessible field name; prefer an authored visible label.</prop>
23
+ <prop name="size" type="keyword" values="sm, md, lg" default="md">Shared field and trigger size.</prop>
24
+ <prop name="placeholder" type="string" default="">Optional hint inside the empty field.</prop>
25
+ <prop name="pickerLabel" type="string" default="Choose time">Accessible name of the trigger and picker dialog.</prop>
26
+ <prop name="hourLabel" type="string" default="Hour">Visible hour editor label.</prop>
27
+ <prop name="minuteLabel" type="string" default="Minute">Visible minute editor label.</prop>
28
+ <prop name="secondLabel" type="string" default="Second">Visible second editor label.</prop>
29
+ <prop name="disabled" type="boolean" default="false">Prevents editing/opening and omits native submission.</prop>
30
+ <prop name="readonly" type="boolean" default="false">Prevents editing/opening while retaining selection and submission.</prop>
31
+ <prop name="required" type="boolean" default="false">Requires a complete time.</prop>
32
+ <prop name="invalid" type="boolean" default="false">External invalid appearance supplied by the application, independent of parsed validity.</prop>
33
+ <state name="current" type="string" from="$value"></state>
34
+ <state name="enhanced" type="boolean" value="false"></state>
35
+ <state name="anchorId" type="string" value=""></state>
36
+ <state name="opened" type="boolean" value="false"></state>
37
+ <state name="fieldBlocked" type="boolean" value="false"></state>
38
+ <state name="hourFormat" type="object({ hour: string, timeZone: string, hourCycle?: string })" value="{ hour: 'numeric', timeZone: 'UTC' }"></state>
39
+ <computed name="hourValues" from="[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]"></computed>
40
+ <computed
41
+ name="ticks"
42
+ from="[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59]"
43
+ ></computed>
44
+ <state name="showSeconds" type="boolean" value="false"></state>
45
+ <state name="error" type="string" value=""></state>
46
+ <event name="input" type="object"><prop name="value" type="string" required></prop><prop
47
+ name="trigger"
48
+ type="keyword"
49
+ values="keyboard, pointer, programmatic"
50
+ required
51
+ ></prop></event>
52
+ <event name="change" type="object"><prop name="value" type="string" required></prop><prop
53
+ name="trigger"
54
+ type="keyword"
55
+ values="keyboard, pointer, programmatic"
56
+ required
57
+ ></prop></event>
58
+ <event name="query-change" type="object"><prop name="query" type="string" required></prop></event>
59
+ <event name="validation-change" type="object"><prop name="invalid" type="boolean" required></prop><prop
60
+ name="message"
61
+ type="string"
62
+ required
63
+ ></prop></event>
64
+ <event name="open" type="object"><prop name="open" type="boolean" required></prop><prop
65
+ name="reason"
66
+ type="keyword"
67
+ values="action, programmatic, light-dismiss, escape"
68
+ required
69
+ ></prop><prop name="trigger" type="keyword" values="keyboard, pointer, programmatic" required></prop></event>
70
+ <event name="close" type="object"><prop name="open" type="boolean" required></prop><prop
71
+ name="reason"
72
+ type="keyword"
73
+ values="action, programmatic, light-dismiss, escape"
74
+ required
75
+ ></prop><prop name="trigger" type="keyword" values="keyboard, pointer, programmatic" required></prop></event>
76
+ </defs>
77
+ <span>
78
+ <ui-input-group from:disabled="$disabled">
79
+ <ui-time-field
80
+ data-time-field
81
+ from:value="$current"
82
+ from:locale="$locale"
83
+ from:hour-cycle="$hourCycle"
84
+ from:granularity="$granularity"
85
+ from:min="$min"
86
+ from:max="$max"
87
+ from:name="$name"
88
+ from:form="$form"
89
+ from:input-id="$inputId"
90
+ from:label="$label"
91
+ from:size="$size"
92
+ from:placeholder="$placeholder"
93
+ from:disabled="$disabled"
94
+ from:readonly="$readonly"
95
+ from:required="$required"
96
+ from:invalid="$invalid"
97
+ ></ui-time-field>
98
+ <ui-icon-button
99
+ data-time-trigger
100
+ slot="action"
101
+ from:id="$anchorId"
102
+ from:hidden="not $enhanced"
103
+ from:size="$size"
104
+ variant="ghost"
105
+ from:label="$pickerLabel"
106
+ from:disabled="$disabled or $readonly or $fieldBlocked"
107
+ aria-haspopup="dialog"
108
+ ><ui-icon name="clock"></ui-icon></ui-icon-button>
109
+ </ui-input-group>
110
+ <ui-popover data-time-popover from:for="$anchorId" from:open="$opened" role="dialog" from:aria-label="$pickerLabel">
111
+ <ui-stack gap="s">
112
+ <ui-cluster gap="xs" align="start">
113
+ <ui-stack gap="xs"><ui-text
114
+ as="label"
115
+ variant="label"
116
+ tone="secondary"
117
+ from:for="{ true: concat($anchorId, '-hour'), false: null }[concat($anchorId != '')]"
118
+ >{$hourLabel}</ui-text><ui-select
119
+ data-time-hour
120
+ size="sm"
121
+ from:id="{ true: concat($anchorId, '-hour'), false: null }[concat($anchorId != '')]"
122
+ from:aria-label="$hourLabel"
123
+ from:disabled="not $opened"
124
+ ><template $each="hour of $hourValues"><option from:value="concat($hour)">
125
+ {format($hour * 3600000, 'time', $hourFormat, $locale)}
126
+ </option></template></ui-select></ui-stack>
127
+ <ui-stack gap="xs"><ui-text
128
+ as="label"
129
+ variant="label"
130
+ tone="secondary"
131
+ from:for="{ true: concat($anchorId, '-minute'), false: null }[concat($anchorId != '')]"
132
+ >{$minuteLabel}</ui-text><ui-select
133
+ data-time-minute
134
+ size="sm"
135
+ from:id="{ true: concat($anchorId, '-minute'), false: null }[concat($anchorId != '')]"
136
+ from:aria-label="$minuteLabel"
137
+ from:disabled="not $opened"
138
+ ><template $each="tick of $ticks"><option from:value="concat($tick)">
139
+ {format($tick, 'number', { minimumIntegerDigits: 2 }, $locale)}
140
+ </option></template></ui-select></ui-stack>
141
+ <ui-stack gap="xs" from:hidden="not $showSeconds"><ui-text
142
+ as="label"
143
+ variant="label"
144
+ tone="secondary"
145
+ from:for="{ true: concat($anchorId, '-second'), false: null }[concat($anchorId != '')]"
146
+ >{$secondLabel}</ui-text><ui-select
147
+ data-time-second
148
+ size="sm"
149
+ from:id="{ true: concat($anchorId, '-second'), false: null }[concat($anchorId != '')]"
150
+ from:aria-label="$secondLabel"
151
+ from:disabled="not $opened or not $showSeconds"
152
+ ><template $each="tick of $ticks"><option from:value="concat($tick)">
153
+ {format($tick, 'number', { minimumIntegerDigits: 2 }, $locale)}
154
+ </option></template></ui-select></ui-stack>
155
+ </ui-cluster>
156
+ <ui-text tone="danger" role="alert" from:hidden="$error = ''">{$error}</ui-text>
157
+ </ui-stack>
158
+ </ui-popover>
159
+ </span>
160
+ </template>