datocms-react-ui 3.1.0-next.6 → 4.0.0-next.7

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 (222) hide show
  1. package/README.md +2 -1
  2. package/dist/DateInput.d.ts +2 -0
  3. package/dist/DateInput.js +2 -0
  4. package/dist/DateTimeInput.d.ts +2 -0
  5. package/dist/DateTimeInput.js +2 -0
  6. package/dist/DateTimeRangeInput.d.ts +2 -0
  7. package/dist/DateTimeRangeInput.js +2 -0
  8. package/dist/FilterBuilder.d.ts +2 -0
  9. package/dist/FilterBuilder.js +2 -0
  10. package/dist/RecordRow.d.ts +2 -0
  11. package/dist/RecordRow.js +2 -0
  12. package/dist/UploadCard.js +2 -2
  13. package/dist/UploadPreview.d.ts +2 -2
  14. package/dist/UploadPreview.js +1 -1
  15. package/dist/UserRow.d.ts +2 -0
  16. package/dist/UserRow.js +2 -0
  17. package/dist/react-ui/src/Canvas.d.ts +7 -1
  18. package/dist/react-ui/src/Canvas.js +26 -4
  19. package/dist/react-ui/src/ctxAnswer.js +21 -0
  20. package/dist/react-ui/src/ctxDateSettings.js +7 -5
  21. package/dist/react-ui/src/ctxRecordPresentation.js +34 -0
  22. package/dist/react-ui/src/ctxUploads.js +23 -0
  23. package/dist/styles.css +592 -11
  24. package/dist/ui-public/icons/index.js +79 -81
  25. package/dist/ui-public/locales/en.js +43 -5
  26. package/dist/ui-public/src/Message.d.ts +3 -4
  27. package/dist/ui-public/src/UiTextKey.d.ts +1 -1
  28. package/dist/ui-public/src/actions/Actions/ActionTooltip.js +1 -1
  29. package/dist/ui-public/src/actions/Actions/registry.d.ts +2 -2
  30. package/dist/ui-public/src/actions/Actions/registry.js +2 -2
  31. package/dist/ui-public/src/actions/Button.d.ts +10 -10
  32. package/dist/ui-public/src/actions/Button.js +1 -1
  33. package/dist/ui-public/src/actions/Dropdown/Menu.d.ts +2 -2
  34. package/dist/ui-public/src/actions/Dropdown/Option.d.ts +7 -7
  35. package/dist/ui-public/src/actions/Dropdown/index.d.ts +1 -1
  36. package/dist/ui-public/src/actions/Dropdown/triggers/ButtonTrigger.d.ts +5 -5
  37. package/dist/ui-public/src/actions/Dropdown/triggers/DropdownTriggerButton.d.ts +2 -2
  38. package/dist/ui-public/src/actions/Dropdown/triggers/IconTrigger.d.ts +6 -6
  39. package/dist/ui-public/src/actions/Dropdown/triggers/IconTrigger.js +1 -1
  40. package/dist/ui-public/src/actions/EditorToolbar/Button.d.ts +1 -1
  41. package/dist/ui-public/src/actions/MultipleSelectionActionBar.d.ts +1 -1
  42. package/dist/ui-public/src/actions/SplitButton/Caret.js +2 -2
  43. package/dist/ui-public/src/actions/SplitButton/Halves.js +1 -1
  44. package/dist/ui-public/src/actions/SplitButton/index.d.ts +3 -3
  45. package/dist/ui-public/src/actions/disabledReason.d.ts +4 -4
  46. package/dist/ui-public/src/content/Avatar.d.ts +3 -3
  47. package/dist/ui-public/src/content/Avatar.js +2 -2
  48. package/dist/ui-public/src/content/CodeSnippet.d.ts +1 -1
  49. package/dist/ui-public/src/content/CopyableValue.d.ts +1 -1
  50. package/dist/ui-public/src/content/EnvironmentPill.d.ts +1 -1
  51. package/dist/ui-public/src/content/EnvironmentPill.js +1 -1
  52. package/dist/ui-public/src/content/IconAvatar.d.ts +1 -1
  53. package/dist/ui-public/src/content/ItemStatus.d.ts +1 -1
  54. package/dist/ui-public/src/content/Pill.d.ts +1 -1
  55. package/dist/ui-public/src/content/SmartDate.d.ts +1 -1
  56. package/dist/ui-public/src/content/UploadPreview/asset.js +200 -0
  57. package/dist/ui-public/src/content/UploadPreview/audio.js +120 -0
  58. package/dist/ui-public/src/content/{UploadPreview.d.ts → UploadPreview/box.d.ts} +10 -10
  59. package/dist/ui-public/src/content/{UploadPreview.js → UploadPreview/box.js} +7 -7
  60. package/dist/ui-public/src/content/{uploadPreviewFit.d.ts → UploadPreview/fit.d.ts} +2 -2
  61. package/dist/ui-public/src/content/{uploadPreviewFit.js → UploadPreview/fit.js} +3 -3
  62. package/dist/ui-public/src/content/UploadPreview/index.d.ts +61 -0
  63. package/dist/ui-public/src/content/UploadPreview/index.js +36 -0
  64. package/dist/ui-public/src/content/UploadPreview/presentation.js +63 -0
  65. package/dist/ui-public/src/content/UploadPreview/thumbhash.js +91 -0
  66. package/dist/ui-public/src/content/UploadPreview/upload.d.ts +104 -0
  67. package/dist/ui-public/src/content/UploadPreview/upload.js +112 -0
  68. package/dist/ui-public/src/content/UsageMeter.d.ts +1 -1
  69. package/dist/ui-public/src/content/ValidityTriangles.d.ts +1 -1
  70. package/dist/ui-public/src/feedback/BlankSlate.d.ts +5 -5
  71. package/dist/ui-public/src/feedback/Callout.d.ts +5 -5
  72. package/dist/ui-public/src/feedback/Callout.js +1 -1
  73. package/dist/ui-public/src/feedback/ProgressBar.d.ts +4 -4
  74. package/dist/ui-public/src/feedback/Spinner.d.ts +6 -6
  75. package/dist/ui-public/src/feedback/Spinner.js +1 -1
  76. package/dist/ui-public/src/form/DateInput.d.ts +13 -0
  77. package/dist/ui-public/src/form/DateInput.js +16 -0
  78. package/dist/ui-public/src/form/DateTimeInput/Base.d.ts +89 -0
  79. package/dist/ui-public/src/form/DateTimeInput/Base.js +330 -0
  80. package/dist/ui-public/src/form/DateTimeInput/CalendarGrid.d.ts +29 -0
  81. package/dist/ui-public/src/form/DateTimeInput/CalendarGrid.js +195 -0
  82. package/dist/ui-public/src/form/DateTimeInput/dateText.js +38 -0
  83. package/dist/ui-public/src/form/DateTimeInput/index.d.ts +10 -0
  84. package/dist/ui-public/src/form/DateTimeInput/index.js +18 -0
  85. package/dist/ui-public/src/form/DateTimeInput/value.js +31 -0
  86. package/dist/ui-public/src/form/DateTimeRangeInput/Panel.js +167 -0
  87. package/dist/ui-public/src/form/DateTimeRangeInput/index.d.ts +123 -0
  88. package/dist/ui-public/src/form/DateTimeRangeInput/index.js +186 -0
  89. package/dist/ui-public/src/form/DateTimeRangeInput/rangeLabel.js +46 -0
  90. package/dist/ui-public/src/form/FieldHint.d.ts +2 -2
  91. package/dist/ui-public/src/form/FieldWrapper.d.ts +9 -9
  92. package/dist/ui-public/src/form/FieldWrapper.js +3 -3
  93. package/dist/ui-public/src/form/FilterBuilder/Editor.js +123 -0
  94. package/dist/ui-public/src/form/FilterBuilder/index.d.ts +9 -0
  95. package/dist/ui-public/src/form/FilterBuilder/index.js +294 -0
  96. package/dist/ui-public/src/form/FilterBuilder/types.d.ts +188 -0
  97. package/dist/ui-public/src/form/FilterBuilder/values.js +86 -0
  98. package/dist/ui-public/src/form/InputGroup.d.ts +2 -2
  99. package/dist/ui-public/src/form/InputGroup.js +1 -1
  100. package/dist/ui-public/src/form/KeyValueList.d.ts +1 -1
  101. package/dist/ui-public/src/form/Label.d.ts +2 -2
  102. package/dist/ui-public/src/form/RadioGroupInput.d.ts +2 -2
  103. package/dist/ui-public/src/form/RadioGroupInput.js +1 -1
  104. package/dist/ui-public/src/form/SelectInput/SelectMenu.d.ts +2 -2
  105. package/dist/ui-public/src/form/SelectInput/index.d.ts +3 -3
  106. package/dist/ui-public/src/form/SwitchInput.d.ts +2 -2
  107. package/dist/ui-public/src/form/SwitchList.d.ts +1 -1
  108. package/dist/ui-public/src/form/SwitchList.js +1 -1
  109. package/dist/ui-public/src/form/TableList.d.ts +2 -2
  110. package/dist/ui-public/src/form/TextareaInput.js +1 -1
  111. package/dist/ui-public/src/form/inputProps.d.ts +6 -6
  112. package/dist/ui-public/src/hooks/useAsyncSelectOptions.d.ts +1 -1
  113. package/dist/ui-public/src/hooks/useSmartRowClick.d.ts +1 -1
  114. package/dist/ui-public/src/hooks/useSmartRowClick.js +1 -1
  115. package/dist/ui-public/src/layout/Page/PageGroup.d.ts +2 -2
  116. package/dist/ui-public/src/layout/Page/PageGroup.js +1 -1
  117. package/dist/ui-public/src/layout/Pane/FormHeader.d.ts +1 -1
  118. package/dist/ui-public/src/layout/Pane/FormHeader.js +1 -1
  119. package/dist/ui-public/src/layout/Pane/ListFilter.d.ts +1 -1
  120. package/dist/ui-public/src/layout/Pane/ListPresets.d.ts +1 -1
  121. package/dist/ui-public/src/layout/Pane/PaneHeader.d.ts +1 -1
  122. package/dist/ui-public/src/layout/Pane/index.d.ts +2 -2
  123. package/dist/ui-public/src/layout/SidebarPanel.d.ts +1 -1
  124. package/dist/ui-public/src/layout/SplitPane/Rail.js +1 -1
  125. package/dist/ui-public/src/layout/SplitPane/index.d.ts +6 -6
  126. package/dist/ui-public/src/layout/Toolbar/AddNewButton.d.ts +2 -2
  127. package/dist/ui-public/src/layout/Toolbar/Help.d.ts +3 -3
  128. package/dist/ui-public/src/layout/Toolbar/Help.js +2 -2
  129. package/dist/ui-public/src/layout/Toolbar/Note.d.ts +1 -1
  130. package/dist/ui-public/src/layout/Toolbar/Note.js +1 -1
  131. package/dist/ui-public/src/layout/Toolbar/Pagination.d.ts +1 -1
  132. package/dist/ui-public/src/layout/Toolbar/Pagination.js +1 -1
  133. package/dist/ui-public/src/layout/Toolbar/PresetsTitle.d.ts +3 -3
  134. package/dist/ui-public/src/layout/Toolbar/PresetsTitle.js +2 -2
  135. package/dist/ui-public/src/layout/Toolbar/PrimaryButton.d.ts +3 -3
  136. package/dist/ui-public/src/layout/Toolbar/Root.d.ts +1 -1
  137. package/dist/ui-public/src/layout/Toolbar/Root.js +4 -1
  138. package/dist/ui-public/src/layout/Toolbar/ToolbarTitleTrigger.js +1 -1
  139. package/dist/ui-public/src/lists/CardList.d.ts +3 -3
  140. package/dist/ui-public/src/lists/EmptySlot.d.ts +1 -1
  141. package/dist/ui-public/src/lists/InfoList/User.d.ts +1 -1
  142. package/dist/ui-public/src/lists/InfoList/Value.d.ts +1 -1
  143. package/dist/ui-public/src/lists/InfoList/Value.js +1 -1
  144. package/dist/ui-public/src/lists/InfoList/index.d.ts +3 -3
  145. package/dist/ui-public/src/lists/InfoList/index.js +1 -1
  146. package/dist/ui-public/src/lists/MediaCard.d.ts +7 -7
  147. package/dist/ui-public/src/lists/RecordRow/Image.d.ts +24 -0
  148. package/dist/ui-public/src/lists/RecordRow/Image.js +22 -0
  149. package/dist/ui-public/src/lists/RecordRow/List.d.ts +26 -0
  150. package/dist/ui-public/src/lists/RecordRow/List.js +30 -0
  151. package/dist/ui-public/src/lists/RecordRow/context.js +31 -0
  152. package/dist/ui-public/src/lists/RecordRow/index.d.ts +94 -0
  153. package/dist/ui-public/src/lists/RecordRow/index.js +122 -0
  154. package/dist/ui-public/src/lists/RecordRow/presentation.js +73 -0
  155. package/dist/ui-public/src/lists/RecordRow/types.d.ts +58 -0
  156. package/dist/ui-public/src/lists/RowList.d.ts +5 -5
  157. package/dist/ui-public/src/lists/SettingsList.d.ts +3 -3
  158. package/dist/ui-public/src/lists/SettingsList.js +2 -2
  159. package/dist/ui-public/src/lists/Table/Row.d.ts +5 -5
  160. package/dist/ui-public/src/lists/Table/Table.d.ts +3 -3
  161. package/dist/ui-public/src/lists/Table/TreeToggle.d.ts +2 -2
  162. package/dist/ui-public/src/lists/Table/TreeToggle.js +1 -1
  163. package/dist/ui-public/src/lists/Table/cells/LinkCell.d.ts +1 -1
  164. package/dist/ui-public/src/lists/TreeRow/Action.d.ts +1 -1
  165. package/dist/ui-public/src/lists/TreeRow/Action.js +1 -1
  166. package/dist/ui-public/src/lists/TreeRow/Link.d.ts +1 -1
  167. package/dist/ui-public/src/lists/TreeRow/Link.js +1 -1
  168. package/dist/ui-public/src/lists/UploadCard.d.ts +66 -3
  169. package/dist/ui-public/src/lists/UploadCard.js +116 -7
  170. package/dist/ui-public/src/lists/UserRow.d.ts +122 -0
  171. package/dist/ui-public/src/lists/UserRow.js +104 -0
  172. package/dist/ui-public/src/lists/dnd/DragHandle.d.ts +2 -2
  173. package/dist/ui-public/src/lists/dnd/SortableList.d.ts +1 -1
  174. package/dist/ui-public/src/lists/dnd/dropTargetClassName.d.ts +1 -1
  175. package/dist/ui-public/src/lists/dnd/tree/SortableTree.d.ts +2 -2
  176. package/dist/ui-public/src/navigation/Chevron.d.ts +4 -4
  177. package/dist/ui-public/src/navigation/Chevron.js +1 -1
  178. package/dist/ui-public/src/navigation/Link.d.ts +5 -5
  179. package/dist/ui-public/src/navigation/Link.js +1 -1
  180. package/dist/ui-public/src/navigation/NavList.d.ts +1 -1
  181. package/dist/ui-public/src/navigation/NavList.js +1 -1
  182. package/dist/ui-public/src/navigation/NavigationProvider.d.ts +1 -1
  183. package/dist/ui-public/src/navigation/SegmentedControl.d.ts +2 -2
  184. package/dist/ui-public/src/navigation/SettingsMenu.d.ts +8 -8
  185. package/dist/ui-public/src/navigation/SettingsMenu.js +1 -1
  186. package/dist/ui-public/src/navigation/SidebarTree/SidebarTreeNode.d.ts +4 -4
  187. package/dist/ui-public/src/overlays/FullscreenModal/TitleContext.d.ts +1 -1
  188. package/dist/ui-public/src/overlays/FullscreenModal/TitleContext.js +1 -1
  189. package/dist/ui-public/src/overlays/NewZIndex.d.ts +1 -1
  190. package/dist/ui-public/src/overlays/NewZIndex.js +1 -1
  191. package/dist/ui-public/src/overlays/Popover.d.ts +1 -1
  192. package/dist/ui-public/src/overlays/PortalWrapper.js +1 -1
  193. package/dist/ui-public/src/overlays/useModalClose.js +3 -3
  194. package/dist/ui-public/src/patterns/ListDetail/FloatingDetail.js +2 -2
  195. package/dist/ui-public/src/patterns/ListDetail/Page.d.ts +8 -9
  196. package/dist/ui-public/src/patterns/ListDetail/Page.js +4 -5
  197. package/dist/ui-public/src/patterns/ListDetail/Panel.d.ts +2 -2
  198. package/dist/ui-public/src/patterns/ListDetail/Panel.js +1 -1
  199. package/dist/ui-public/src/patterns/ListDetail/Split.d.ts +9 -10
  200. package/dist/ui-public/src/patterns/ListDetail/Split.js +5 -5
  201. package/dist/ui-public/src/patterns/ListFormPage.d.ts +3 -3
  202. package/dist/ui-public/src/patterns/ListFormPage.js +1 -1
  203. package/dist/ui-public/src/semantic/Heading.d.ts +1 -1
  204. package/dist/ui-public/src/semantic/Heading.js +1 -1
  205. package/dist/ui-public/src/semantic/Image.js +1 -1
  206. package/dist/ui-public/src/semantic/Nav.d.ts +3 -3
  207. package/dist/ui-public/src/semantic/Nav.js +3 -3
  208. package/dist/ui-public/src/semantic/RawButton.d.ts +3 -3
  209. package/dist/ui-public/src/semantic/RawButton.js +1 -1
  210. package/dist/ui-public/src/semantic/Search.d.ts +1 -1
  211. package/dist/ui-public/src/semantic/Search.js +1 -1
  212. package/dist/ui-public/src/utils/format.d.ts +21 -0
  213. package/dist/ui-public/src/utils/format.js +20 -0
  214. package/dist/ui-public/src/utils/formatDate.d.ts +10 -2
  215. package/dist/ui-public/src/utils/formatDate.js +4 -4
  216. package/dist/ui-public/src/utils/tickBatcher.js +44 -0
  217. package/dist/ui-public/src/utils/timezones.js +277 -0
  218. package/dist/ui-public/src/utils/weekStartForLocale.js +25 -0
  219. package/dist/utils/format.d.ts +1 -0
  220. package/dist/utils/format.js +2 -0
  221. package/package.json +2 -2
  222. package/dist/ui-public/icons/lucide/receipt.js +0 -26
package/dist/styles.css CHANGED
@@ -126,8 +126,6 @@
126
126
  /* Code is a little smaller than the text around it, because the
127
127
  monospaced font looks larger. For inline code and for code blocks. */
128
128
  --monospaced-font-size: 0.9em;
129
- --cursive-font-family:
130
- "Pangolin", "noto-script-fallback", "noto-script-fallback-static", cursive;
131
129
  /* The weight of the text. */
132
130
  --font-weight-regular: 340;
133
131
  /* The weight of titles, labels and words with emphasis. */
@@ -253,8 +251,8 @@
253
251
  :root {
254
252
  --z-index-notifications: 10500;
255
253
  }
256
- /* The plugins use ABC Oracle and Geist Mono, as the cms. Geist, Pangolin
257
- and the noto-script-fallback families do not ship, thus the stacks go to
254
+ /* The plugins use ABC Oracle and Geist Mono, as the cms. Geist and the
255
+ noto-script-fallback families do not ship, thus the stacks go to
258
256
  the system fonts after them. The weights are the ones of
259
257
  ../../ui-public/styles/_css-variables.css. */
260
258
  :root {
@@ -263,7 +261,6 @@
263
261
  --monospaced-font-family:
264
262
  "Geist Mono Variable", "Menlo", "Bitstream Vera Sans Mono", Consolas,
265
263
  Courier, monospace;
266
- --cursive-font-family: cursive;
267
264
  }
268
265
  /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css*/
269
266
 
@@ -2520,7 +2517,9 @@ button.EmptySlot {
2520
2517
  .form__label__icon {
2521
2518
  display: inline-block;
2522
2519
  margin-left: var(--spacing-s);
2523
- vertical-align: text-top;
2520
+ /* The same alignment as the buttons in the label (FieldValidations of the
2521
+ cms), thus the icons are on one line */
2522
+ vertical-align: middle;
2524
2523
 
2525
2524
  svg {
2526
2525
  display: block;
@@ -3145,16 +3144,19 @@ textarea:focus {
3145
3144
  --Page__group-tint: var(--color--warning-soft--surface);
3146
3145
  --Page__group-outline: var(--color--warning-soft--outline);
3147
3146
  }
3148
- /* The content before a group can have no margin under it (a CardList). The
3149
- margins collapse, thus between two groups the space stays the same. */
3147
+ /* The content before a group can have no margin under it (a CardList or a
3148
+ switch). The margins collapse, thus between two groups the space stays
3149
+ the same. */
3150
3150
  .Page__content > * + .Page__group,
3151
- .Page__content > * + :has(> .Page__group:first-child) {
3151
+ .Page__content > * + :has(> .Page__group:first-child),
3152
+ .Page__content__section > * + .Page__group {
3152
3153
  margin-top: var(--spacing-l);
3153
3154
  }
3154
3155
  /* A form can be around one group (the group is its last child), thus only
3155
- the last group of the content loses the space under it */
3156
+ the last group of the content or of a section loses the space under it */
3156
3157
  .Page__content > .Page__group:last-child,
3157
- .Page__content > :last-child > .Page__group:last-child {
3158
+ .Page__content > :last-child > .Page__group:last-child,
3159
+ .Page__content__section > .Page__group:last-child {
3158
3160
  margin-bottom: 0;
3159
3161
  }
3160
3162
  /* When the title and the actions do not fit on one line, the actions go
@@ -4755,6 +4757,13 @@ span.SidebarTree__node__toggle {
4755
4757
  width: 100%;
4756
4758
  height: 100%;
4757
4759
  }
4760
+
4761
+ /* The rule above has the specificity of .UploadPreview, thus without this
4762
+ rule the import order of the two blocks decides if the asset is in the
4763
+ center. Keep the display of .UploadPreview (_UploadPreview.css). */
4764
+ > .UploadPreview {
4765
+ display: flex;
4766
+ }
4758
4767
  }
4759
4768
  .EntityRow--inline .EntityRow__image {
4760
4769
  border-radius: var(--radius-xs);
@@ -4830,6 +4839,26 @@ span.SidebarTree__node__toggle {
4830
4839
  display: none;
4831
4840
  }
4832
4841
  }
4842
+ /* See RecordRow/Image.tsx. Its container gives the size of the square. */
4843
+ .RecordRow__image {
4844
+ width: 100%;
4845
+ height: 100%;
4846
+ background-repeat: no-repeat;
4847
+ background-position: center center;
4848
+ background-size: cover;
4849
+ }
4850
+ .RecordRow__image--placeholder {
4851
+ background-color: var(--color--surface-muted);
4852
+ }
4853
+ .RecordRow__loading {
4854
+ display: inline-block;
4855
+ width: 8em;
4856
+ max-width: 100%;
4857
+ height: 0.8em;
4858
+ vertical-align: middle;
4859
+ background-color: var(--color--surface-muted);
4860
+ border-radius: var(--radius-s);
4861
+ }
4833
4862
  /* RowList, and NavList that renders a RowList */
4834
4863
  .RowList {
4835
4864
  display: flex;
@@ -7635,6 +7664,21 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7635
7664
  display: flex;
7636
7665
  flex: 1;
7637
7666
  }
7667
+ /* The parts of a filter row are bare (see the Filter section of the Toolbar
7668
+ page), thus the row gives them the gap of a toolbar. */
7669
+ .Toolbar--fields > .Toolbar__fill {
7670
+ gap: var(--spacing-m);
7671
+ align-items: flex-start;
7672
+
7673
+ /* Each part is at least as tall as a field of one line, and centers its
7674
+ own content in that height. Thus the parts stay on the first line of the
7675
+ tiles when the tiles wrap. Toolbar.Divider stretches to the full height
7676
+ of the row. */
7677
+ > * {
7678
+ box-sizing: border-box;
7679
+ min-height: var(--control-height);
7680
+ }
7681
+ }
7638
7682
  /* The widths of the two edge fades of .Toolbar__tabs. They must be
7639
7683
  registered: an animation cannot interpolate a custom property that is not
7640
7684
  registered. */
@@ -7839,6 +7883,132 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7839
7883
  .Toolbar__spinner {
7840
7884
  margin-left: var(--spacing-m);
7841
7885
  }
7886
+ .FilterBuilder {
7887
+ display: flex;
7888
+ flex: 3;
7889
+ gap: var(--spacing-m);
7890
+ align-items: flex-start;
7891
+ min-width: 0;
7892
+ }
7893
+ /* The funnel and the clear button stay on the first line of the tiles when
7894
+ the tiles wrap */
7895
+ .FilterBuilder__icon,
7896
+ .FilterBuilder__clear {
7897
+ display: flex;
7898
+ flex: none;
7899
+ align-items: center;
7900
+ min-height: var(--control-height);
7901
+ }
7902
+ .FilterBuilder__icon svg {
7903
+ display: block;
7904
+ color: var(--color--ink-subtle);
7905
+ }
7906
+ /* The padding and the row gap keep a space of 4px around each line of
7907
+ tiles. With one line, the line fills the min-height and its tiles are in
7908
+ the center. */
7909
+ .FilterBuilder__box {
7910
+ box-sizing: border-box;
7911
+ display: flex;
7912
+ flex: 1;
7913
+ flex-wrap: wrap;
7914
+ gap: 4px var(--spacing-m);
7915
+ align-items: center;
7916
+ min-width: 0;
7917
+ min-height: var(--control-height);
7918
+ padding-block: 4px;
7919
+ }
7920
+ .FilterBuilder__empty {
7921
+ color: var(--color--ink-subtle);
7922
+ }
7923
+ .FilterBuilder__add {
7924
+ display: flex;
7925
+ }
7926
+ .FilterBuilder__tile {
7927
+ position: relative;
7928
+ display: flex;
7929
+ align-items: stretch;
7930
+ max-width: 100%;
7931
+ background-color: var(--color--surface-raised);
7932
+ border: 1px solid var(--color--primary-soft--border);
7933
+ border-radius: var(--radius-s);
7934
+ transition:
7935
+ border-color 0.1s ease-out,
7936
+ box-shadow 0.1s ease-out;
7937
+
7938
+ &:hover {
7939
+ border-color: var(--color--focus--border);
7940
+ }
7941
+ /* The small selects of the tile draw no focus ring, thus the tile draws
7942
+ it for all its inputs */
7943
+ &:focus-within {
7944
+ border-color: var(--color--focus--border);
7945
+ box-shadow: var(--focus-ring);
7946
+ }
7947
+ /* A read-only tile has no hover look, as the other read-only inputs */
7948
+ .FilterBuilder.is-read-only &:hover:not(:focus-within) {
7949
+ border-color: var(--color--primary-soft--border);
7950
+ }
7951
+ }
7952
+ .FilterBuilder__field,
7953
+ .FilterBuilder__operator {
7954
+ position: relative;
7955
+ border-right: 1px solid var(--color--primary-soft--border);
7956
+ }
7957
+ /* The tile has a border of 1px, thus the inner radius is 1px smaller */
7958
+ .FilterBuilder__field {
7959
+ border-radius: calc(var(--radius-s) - 1px) 0 0 calc(var(--radius-s) - 1px);
7960
+ }
7961
+ .FilterBuilder__operator--static {
7962
+ display: flex;
7963
+ align-items: center;
7964
+ padding: 0 10px;
7965
+ font-size: var(--font-size-xs);
7966
+ color: var(--color--ink-subtle);
7967
+ }
7968
+ /* The value keeps a minimum width, even when it is empty, thus the user can
7969
+ find it and click it */
7970
+ .FilterBuilder__value {
7971
+ display: flex;
7972
+ align-items: stretch;
7973
+ min-width: 80px;
7974
+
7975
+ > * {
7976
+ flex: 1 0 auto;
7977
+ }
7978
+ }
7979
+ .FilterBuilder__argument {
7980
+ display: flex;
7981
+ align-items: center;
7982
+ margin-inline: 10px;
7983
+ }
7984
+ .FilterBuilder__argument-label {
7985
+ padding-right: 8px;
7986
+ font-size: var(--font-size-xs);
7987
+ }
7988
+ /* The text inputs have no field look: the tile is the field */
7989
+ .FilterBuilder__value > .AutosizeInput,
7990
+ .FilterBuilder__argument > .AutosizeInput {
7991
+ --autosize-input-padding-inline: 10px;
7992
+ --autosize-input-border-inline: 0px;
7993
+ min-width: 80px;
7994
+ max-width: 30vw;
7995
+ font-size: var(--font-size-xs);
7996
+
7997
+ > input[type="text"] {
7998
+ padding-block: 5px;
7999
+ appearance: none;
8000
+ background-color: transparent;
8001
+ border: none;
8002
+
8003
+ &:focus {
8004
+ box-shadow: none;
8005
+ }
8006
+ }
8007
+ }
8008
+ .FilterBuilder__remove {
8009
+ align-self: center;
8010
+ margin-right: 4px;
8011
+ }
7842
8012
  .UploadPreview {
7843
8013
  position: relative;
7844
8014
  box-sizing: border-box;
@@ -7874,6 +8044,69 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
7874
8044
  font-size: var(--font-size-m);
7875
8045
  color: var(--color--ink-subtle);
7876
8046
  }
8047
+ /* The waveform is always the same picture, not the sound of the file */
8048
+
8049
+ /* A registered percentage, so the played part grows smoothly between two
8050
+ updates of the time */
8051
+ @property --AudioPlayPause-progress {
8052
+ syntax: "<percentage>";
8053
+ inherits: false;
8054
+ initial-value: 0%;
8055
+ }
8056
+ .AudioPlayPause {
8057
+ position: relative;
8058
+ display: flex;
8059
+ align-items: center;
8060
+ justify-content: center;
8061
+ }
8062
+ /* The picture is a mask: the background gives the colors of the bars */
8063
+ .AudioPlayPause__wave {
8064
+ width: 80%;
8065
+ aspect-ratio: 174 / 40;
8066
+ /* token-audit-disable-next-line mismatch -- the mask makes the background the bars of a picture, so it's foreground */
8067
+ background: linear-gradient(
8068
+ to right,
8069
+ var(--color--progress--fill) var(--AudioPlayPause-progress),
8070
+ var(--color--ink-placeholder) var(--AudioPlayPause-progress)
8071
+ );
8072
+ mask:
8073
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 174 40'%3E%3Crect x='0' y='15.9' width='2' height='8.2' rx='1'/%3E%3Crect x='4' y='16.15' width='2' height='7.7' rx='1'/%3E%3Crect x='8' y='15.25' width='2' height='9.5' rx='1'/%3E%3Crect x='12' y='11.05' width='2' height='17.9' rx='1'/%3E%3Crect x='16' y='10' width='2' height='20' rx='1'/%3E%3Crect x='20' y='11.85' width='2' height='16.3' rx='1'/%3E%3Crect x='24' y='7.5' width='2' height='25' rx='1'/%3E%3Crect x='28' y='6.15' width='2' height='27.7' rx='1'/%3E%3Crect x='32' y='12.25' width='2' height='15.5' rx='1'/%3E%3Crect x='36' y='14.35' width='2' height='11.3' rx='1'/%3E%3Crect x='40' y='11.65' width='2' height='16.7' rx='1'/%3E%3Crect x='44' y='6' width='2' height='28' rx='1'/%3E%3Crect x='48' y='2.2' width='2' height='35.6' rx='1'/%3E%3Crect x='52' y='6.95' width='2' height='26.1' rx='1'/%3E%3Crect x='56' y='15.35' width='2' height='9.3' rx='1'/%3E%3Crect x='60' y='16.6' width='2' height='6.8' rx='1'/%3E%3Crect x='64' y='11.45' width='2' height='17.1' rx='1'/%3E%3Crect x='68' y='6.3' width='2' height='27.4' rx='1'/%3E%3Crect x='72' y='8.25' width='2' height='23.5' rx='1'/%3E%3Crect x='76' y='14.1' width='2' height='11.8' rx='1'/%3E%3Crect x='80' y='15.2' width='2' height='9.6' rx='1'/%3E%3Crect x='84' y='12.8' width='2' height='14.4' rx='1'/%3E%3Crect x='88' y='10.1' width='2' height='19.8' rx='1'/%3E%3Crect x='92' y='5.65' width='2' height='28.7' rx='1'/%3E%3Crect x='96' y='6.15' width='2' height='27.7' rx='1'/%3E%3Crect x='100' y='6.5' width='2' height='27' rx='1'/%3E%3Crect x='104' y='3.35' width='2' height='33.3' rx='1'/%3E%3Crect x='108' y='3.85' width='2' height='32.3' rx='1'/%3E%3Crect x='112' y='5.65' width='2' height='28.7' rx='1'/%3E%3Crect x='116' y='8.7' width='2' height='22.6' rx='1'/%3E%3Crect x='120' y='11.35' width='2' height='17.3' rx='1'/%3E%3Crect x='124' y='9.85' width='2' height='20.3' rx='1'/%3E%3Crect x='128' y='9.4' width='2' height='21.2' rx='1'/%3E%3Crect x='132' y='10.95' width='2' height='18.1' rx='1'/%3E%3Crect x='136' y='8.25' width='2' height='23.5' rx='1'/%3E%3Crect x='140' y='6.7' width='2' height='26.6' rx='1'/%3E%3Crect x='144' y='11.2' width='2' height='17.6' rx='1'/%3E%3Crect x='148' y='15.45' width='2' height='9.1' rx='1'/%3E%3Crect x='152' y='14' width='2' height='12' rx='1'/%3E%3Crect x='156' y='10.15' width='2' height='19.7' rx='1'/%3E%3Crect x='160' y='11.65' width='2' height='16.7' rx='1'/%3E%3Crect x='164' y='15.8' width='2' height='8.4' rx='1'/%3E%3Crect x='168' y='16.6' width='2' height='6.8' rx='1'/%3E%3Crect x='172' y='14.65' width='2' height='10.7' rx='1'/%3E%3C/svg%3E")
8074
+ center / 100% 100% no-repeat;
8075
+ transition: --AudioPlayPause-progress 0.3s linear;
8076
+ }
8077
+ .AudioPlayPause__button {
8078
+ position: absolute;
8079
+ }
8080
+ /* The audio play button is the only button with fully round corners (see
8081
+ also AudioPlayer) */
8082
+ .AudioPlayPause.big .AudioPlayPause__button {
8083
+ top: 50%;
8084
+ left: 50%;
8085
+ border-radius: var(--radius-full);
8086
+ transform: translate(-50%, -50%);
8087
+ }
8088
+ /* A small preview (a row of a table) has no room for a round button: all
8089
+ the preview is the button, and the icon is on the waveform */
8090
+ .AudioPlayPause.small {
8091
+ .AudioPlayPause__wave {
8092
+ opacity: 0.5;
8093
+ }
8094
+ .AudioPlayPause__button {
8095
+ inset: 0;
8096
+ display: flex;
8097
+ align-items: center;
8098
+ justify-content: center;
8099
+ font-size: 15px;
8100
+
8101
+ svg {
8102
+ color: var(--color--ink-subtle);
8103
+ }
8104
+ &:hover svg,
8105
+ &:focus-visible svg {
8106
+ color: var(--color--ink-link);
8107
+ }
8108
+ }
8109
+ }
7877
8110
  /* The button and the dropdown are also in the balloon toolbar of the
7878
8111
  structured text editor. */
7879
8112
  .EditorToolbar {
@@ -8225,6 +8458,354 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
8225
8458
  color: var(--color--disabled-field--ink-placeholder);
8226
8459
  }
8227
8460
  }
8461
+ .DateTimeInput {
8462
+ position: relative;
8463
+ display: flex;
8464
+ width: 100%;
8465
+ }
8466
+ .DateTimeInput--autosize {
8467
+ display: inline-flex;
8468
+ width: auto;
8469
+ max-width: 100%;
8470
+ }
8471
+ .DateTimeInput__field {
8472
+ flex: 1;
8473
+ padding: 0 4px;
8474
+
8475
+ /* The timezone select is not an InputFrame__input, but its focus also
8476
+ shows the focus ring of the frame */
8477
+ &:has(.DateTimeInput__timezone :focus) {
8478
+ border-color: var(--color--focus--border);
8479
+ box-shadow: var(--focus-ring);
8480
+ }
8481
+ /* A disabled or read-only field has no focus ring. These rules have the
8482
+ specificity of the focus rules of _InputFrame.css, and they come after
8483
+ them, thus they win. */
8484
+ .DateTimeInput.is-disabled &,
8485
+ .DateTimeInput.is-read-only & {
8486
+ border-color: var(--color--border);
8487
+ box-shadow: none;
8488
+ }
8489
+ }
8490
+ /* The date and the time have the width of their text (see sizerText in
8491
+ src/form/DateTimeInput/Base.tsx). Thus no empty space comes between the time and
8492
+ the timezone, and a long format does not get cut. The date, the time and
8493
+ the timezone read as one value: no line separates them. */
8494
+ .DateTimeInput__sizer {
8495
+ --autosize-input-padding-inline: 6px;
8496
+ --autosize-input-border-inline: 0px;
8497
+ flex: none;
8498
+ font-variant-numeric: tabular-nums;
8499
+ }
8500
+ /* The rules of the timezone have three classes, thus they are stronger than
8501
+ the styles of react-select */
8502
+ .DateTimeInput__timezone {
8503
+ flex: none;
8504
+ }
8505
+ /* When the field is wider than its parts, the empty space comes before the
8506
+ clear button. Thus the button stays at the right
8507
+ end, and the value stays together at the left. */
8508
+ .DateTimeInput__clear {
8509
+ margin-left: auto;
8510
+ }
8511
+ .DateTimeInput__field
8512
+ .DateTimeInput__timezone
8513
+ .DateTimeInput__timezone__control {
8514
+ min-height: 0;
8515
+ padding: 2px 4px 2px 8px;
8516
+ color: var(--color--ink-subtle);
8517
+ cursor: pointer;
8518
+ background-color: transparent;
8519
+ border-radius: var(--radius-s);
8520
+ box-shadow: none;
8521
+ transition: background-color 0.2s var(--material-ease);
8522
+
8523
+ &:hover,
8524
+ &.DateTimeInput__timezone__control--menu-is-open {
8525
+ color: var(--color--ink);
8526
+ background-color: var(--color--surface-hover);
8527
+ }
8528
+ /* A disabled timezone is a value, not a button */
8529
+ &.DateTimeInput__timezone__control--is-disabled {
8530
+ color: var(--color--disabled-field--ink);
8531
+ cursor: default;
8532
+ background-color: transparent;
8533
+ }
8534
+ }
8535
+ /* The timezone is at the right end of the field, and its menu is wider than
8536
+ it. Thus the menu aligns with the right edge of the timezone and opens to
8537
+ the left: when the field is near the right edge of the screen, the menu
8538
+ stays in the screen. */
8539
+ .DateTimeInput__field .DateTimeInput__timezone .DateTimeInput__timezone__menu {
8540
+ right: 0;
8541
+ left: auto;
8542
+ }
8543
+ .DateTimeInput__field
8544
+ .DateTimeInput__timezone
8545
+ .DateTimeInput__timezone__single-value {
8546
+ font-variant-numeric: tabular-nums;
8547
+ color: inherit;
8548
+ }
8549
+ .DateTimeInput__field
8550
+ .DateTimeInput__timezone
8551
+ .DateTimeInput__timezone__value-container {
8552
+ padding: 0;
8553
+ }
8554
+ .DateTimeInput__field
8555
+ .DateTimeInput__timezone
8556
+ .DateTimeInput__timezone__dropdown-indicator {
8557
+ padding: 0 0 0 4px;
8558
+ color: inherit;
8559
+
8560
+ svg {
8561
+ width: 14px;
8562
+ height: 14px;
8563
+ }
8564
+ }
8565
+
8566
+ .DateTimeInput--smaller {
8567
+ .DateTimeInput__field {
8568
+ padding: 0;
8569
+ background-color: transparent;
8570
+ border: 0;
8571
+ box-shadow: none;
8572
+ }
8573
+ .DateTimeInput__sizer {
8574
+ --autosize-input-padding-inline: 5px;
8575
+ font-size: var(--font-size-xs);
8576
+ }
8577
+ .DateTimeInput__date,
8578
+ .DateTimeInput__time {
8579
+ padding-block: 5px;
8580
+ }
8581
+ }
8582
+
8583
+ .DateTimeInput__date-popper {
8584
+ box-sizing: border-box;
8585
+ width: 272px;
8586
+ padding: 8px;
8587
+ background-color: var(--color--surface-raised);
8588
+ border: 1px solid var(--color--border-raised);
8589
+ border-radius: var(--radius-m);
8590
+ box-shadow: var(--shadow--floating);
8591
+ }
8592
+ .DateTimeInput__CalendarHeader {
8593
+ display: flex;
8594
+ align-items: center;
8595
+ margin-bottom: 4px;
8596
+ }
8597
+ .DateTimeInput__CalendarHeader__title {
8598
+ flex: 1;
8599
+ padding-left: 6px;
8600
+ font-weight: var(--font-weight-strong);
8601
+ }
8602
+ .DateTimeInput__CalendarHeader__actions {
8603
+ display: flex;
8604
+ }
8605
+ .DateTimeInput__CalendarHeader__action--today svg {
8606
+ font-size: 0.8em;
8607
+ }
8608
+ .DateTimeInput__CalendarGrid {
8609
+ display: grid;
8610
+ grid-template-columns: repeat(7, 1fr);
8611
+ gap: 2px;
8612
+ text-align: center;
8613
+ }
8614
+ /* The rows and the cells of the grid role give no box: the days are the
8615
+ items of the CSS grid */
8616
+ .DateTimeInput__CalendarRow,
8617
+ .DateTimeInput__CalendarCell {
8618
+ display: contents;
8619
+ }
8620
+ .DateTimeInput__CalendarWeekDay {
8621
+ padding: 6px 0;
8622
+ font-size: var(--font-size-xs);
8623
+ color: var(--color--ink-subtle);
8624
+ }
8625
+ .DateTimeInput__CalendarDayCell {
8626
+ position: relative;
8627
+ height: 32px;
8628
+ padding: 0;
8629
+ font-variant-numeric: tabular-nums;
8630
+ color: var(--color--ink);
8631
+ cursor: pointer;
8632
+ background: none;
8633
+ border: 0;
8634
+ border-radius: var(--radius-s);
8635
+
8636
+ &:hover {
8637
+ background-color: var(--color--surface-hover);
8638
+ }
8639
+ &:focus-visible {
8640
+ box-shadow: var(--focus-ring);
8641
+ }
8642
+ &[disabled],
8643
+ &[aria-disabled="true"] {
8644
+ color: var(--color--ink-disabled);
8645
+ cursor: not-allowed;
8646
+
8647
+ &:hover {
8648
+ background: none;
8649
+ }
8650
+ }
8651
+ }
8652
+ .DateTimeInput__CalendarDayCell--inAdjacentMonth {
8653
+ color: var(--color--ink-subtle);
8654
+ }
8655
+ .DateTimeInput__CalendarDayCell--isToday {
8656
+ font-weight: var(--font-weight-strong);
8657
+ box-shadow: inset 0 0 0 1px var(--color--selected--border);
8658
+ }
8659
+ .DateTimeInput__CalendarDayCell--inRange {
8660
+ background-color: var(--color--selected--surface);
8661
+ }
8662
+ .DateTimeInput__CalendarDayCell--isSelected {
8663
+ font-weight: var(--font-weight-strong);
8664
+ color: var(--color--primary--ink);
8665
+ background-color: var(--color--primary--surface);
8666
+ box-shadow: none;
8667
+
8668
+ &:hover {
8669
+ background-color: var(--color--primary--surface);
8670
+ }
8671
+ }
8672
+ .DateTimeRangeInput {
8673
+ position: relative;
8674
+ display: flex;
8675
+ width: 100%;
8676
+ }
8677
+ .DateTimeRangeInput--autosize {
8678
+ display: inline-flex;
8679
+ width: auto;
8680
+ max-width: 100%;
8681
+ }
8682
+ .DateTimeRangeInput__dropdown {
8683
+ display: flex;
8684
+ flex: 1;
8685
+ min-width: 0;
8686
+ }
8687
+
8688
+ /* The trigger has the look of a field, so it has the height of a field (see
8689
+ --control-height) */
8690
+ .DateTimeRangeInput__trigger {
8691
+ box-sizing: border-box;
8692
+ display: flex;
8693
+ flex: 1;
8694
+ gap: 8px;
8695
+ align-items: center;
8696
+ min-width: 0;
8697
+ min-height: var(--control-height);
8698
+ padding: 10px;
8699
+ font-size: var(--font-size-m);
8700
+ color: var(--color--ink);
8701
+ cursor: pointer;
8702
+ background: var(--color--surface-raised);
8703
+ border: 1px solid var(--color--border);
8704
+ border-radius: var(--radius-s);
8705
+ transition: border-color 0.15s ease;
8706
+
8707
+ &:hover {
8708
+ border-color: var(--color--border-hover);
8709
+ }
8710
+ &[aria-expanded="true"] {
8711
+ border-color: var(--color--focus--border);
8712
+ }
8713
+ &:focus-visible {
8714
+ border-color: var(--color--focus--border);
8715
+ box-shadow: var(--focus-ring);
8716
+ }
8717
+
8718
+ svg {
8719
+ color: var(--color--ink-subtle);
8720
+ }
8721
+
8722
+ /* A locked trigger is a field that the user cannot change: the value stays
8723
+ readable */
8724
+ .DateTimeRangeInput.is-disabled &,
8725
+ .DateTimeRangeInput.is-read-only & {
8726
+ cursor: default;
8727
+ border-color: var(--color--border);
8728
+ }
8729
+ .DateTimeRangeInput.is-disabled & {
8730
+ color: var(--color--disabled-field--ink);
8731
+ background: var(--color--disabled-field--surface);
8732
+ }
8733
+ }
8734
+ .DateTimeRangeInput__trigger-icon {
8735
+ flex-shrink: 0;
8736
+ width: 14px;
8737
+ height: 14px;
8738
+ }
8739
+ .DateTimeRangeInput__trigger-label {
8740
+ flex: 1;
8741
+ overflow: hidden;
8742
+ text-overflow: ellipsis;
8743
+ text-align: left;
8744
+ white-space: nowrap;
8745
+ }
8746
+
8747
+ /* The clear button is over the right end of the trigger, where the chevron
8748
+ is in the other states. The trigger keeps space for it, so the label does
8749
+ not go below it. */
8750
+ .DateTimeRangeInput--clearable .DateTimeRangeInput__trigger {
8751
+ padding-right: calc(10px + 1lh + 2 * 0.3em);
8752
+ }
8753
+ .DateTimeRangeInput__clear {
8754
+ position: absolute;
8755
+ top: 50%;
8756
+ right: 6px;
8757
+ transform: translateY(-50%);
8758
+ }
8759
+
8760
+ /* The box around a filter draws the focus ring, as for the other inputs of
8761
+ the filter look */
8762
+ .DateTimeRangeInput--filter .DateTimeRangeInput__trigger {
8763
+ min-height: 0;
8764
+ padding: 5px;
8765
+ font-size: var(--font-size-xs);
8766
+ background: transparent;
8767
+ border: 0;
8768
+ box-shadow: none;
8769
+ }
8770
+
8771
+ .DateTimeRangeInput__panel {
8772
+ box-sizing: border-box;
8773
+ width: 280px;
8774
+ padding: 12px;
8775
+ background: var(--color--surface-raised);
8776
+ border: 1px solid var(--color--border-raised);
8777
+ border-radius: var(--radius-m);
8778
+ box-shadow: var(--shadow--floating);
8779
+ }
8780
+ .DateTimeRangeInput__edges {
8781
+ display: flex;
8782
+ flex-direction: column;
8783
+ gap: 8px;
8784
+ margin-top: 12px;
8785
+ }
8786
+ .DateTimeRangeInput__edge-label {
8787
+ display: block;
8788
+ margin-bottom: 4px;
8789
+ font-weight: var(--font-weight-strong);
8790
+ color: var(--color--ink-subtle);
8791
+ }
8792
+ .DateTimeRangeInput__edge-inputs {
8793
+ display: flex;
8794
+ gap: 6px;
8795
+ }
8796
+ .DateTimeRangeInput__edge-date {
8797
+ flex: 1.3;
8798
+ min-width: 0;
8799
+
8800
+ /* The next pick in the calendar sets the end of this text */
8801
+ &.is-active {
8802
+ border-color: var(--color--focus--border);
8803
+ }
8804
+ }
8805
+ .DateTimeRangeInput__edge-time {
8806
+ flex: 0.7;
8807
+ min-width: 0;
8808
+ }
8228
8809
  /* All are kbd elements: the normalize sheet gives a kbd the monospace font */
8229
8810
  .Shortcut,
8230
8811
  .Shortcut__key {