@phis/ui 0.4.3 → 0.4.5

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 (282) hide show
  1. package/README.md +9 -3
  2. package/cms/plugins.d.ts +1 -0
  3. package/cms/plugins.js +2 -0
  4. package/components/cms/phi-cms-root-layout.js +30 -1
  5. package/components/controls/phi-anchor-nav-control.js +4 -1
  6. package/components/controls/phi-background-control.d.ts +6 -1
  7. package/components/controls/phi-background-control.js +30 -7
  8. package/components/controls/phi-bullet-list-control.d.ts +7 -2
  9. package/components/controls/phi-bullet-list-control.js +4 -3
  10. package/components/controls/phi-button-control.d.ts +13 -1
  11. package/components/controls/phi-button-control.js +21 -3
  12. package/components/controls/phi-color-control.js +4 -2
  13. package/components/controls/phi-drawer-control-adapter.js +3 -2
  14. package/components/controls/phi-dropdown-control.js +2 -2
  15. package/components/controls/phi-inline-text-editor.js +7 -1
  16. package/components/controls/phi-length-control.js +1 -1
  17. package/components/controls/phi-media-asset-tile-control.js +10 -10
  18. package/components/controls/phi-progress-control.d.ts +10 -2
  19. package/components/controls/phi-progress-control.js +6 -2
  20. package/components/controls/phi-ribbon-control.d.ts +16 -4
  21. package/components/controls/phi-ribbon-control.js +14 -8
  22. package/components/controls/phi-ribbon-wrap-control.d.ts +32 -0
  23. package/components/controls/phi-ribbon-wrap-control.js +31 -0
  24. package/components/controls/phi-segmented-control.d.ts +4 -1
  25. package/components/controls/phi-segmented-control.js +13 -2
  26. package/components/controls/phi-select-control.js +5 -2
  27. package/components/controls/phi-series-chart-control.d.ts +48 -0
  28. package/components/controls/phi-series-chart-control.js +82 -0
  29. package/components/controls/phi-surface-control.d.ts +2 -0
  30. package/components/controls/phi-surface-control.js +16 -1
  31. package/components/controls/phi-switch-control.d.ts +4 -1
  32. package/components/controls/phi-switch-control.js +8 -2
  33. package/components/controls/phi-tag-control.d.ts +4 -1
  34. package/components/controls/phi-tag-control.js +11 -3
  35. package/components/controls/phi-text-control.js +57 -3
  36. package/components/controls/phi-tree-control.js +1 -1
  37. package/components/controls/phi-truncated-hover-text.d.ts +15 -0
  38. package/components/controls/phi-truncated-hover-text.js +25 -0
  39. package/components/forms/link-target-form-control.d.ts +1 -1
  40. package/components/forms/link-target-form-control.js +2 -45
  41. package/components/forms/phi-form-widget-frame.js +4 -2
  42. package/components/layouts/clients/phi-three-column-layout-client.js +10 -1
  43. package/components/layouts/phi-layout-view-model.js +10 -1
  44. package/components/navigation/phi-link.js +6 -1
  45. package/components/regions/clients/cms-region-container-client.js +16 -1
  46. package/components/regions/phi-cms-region-container.js +7 -0
  47. package/components/regions/phi-cms-region-shell.d.ts +22 -1
  48. package/components/regions/phi-cms-region-shell.js +131 -23
  49. package/components/root/phi-config-provider.d.ts +13 -0
  50. package/components/root/phi-config-provider.js +12 -1
  51. package/components/root/phi-root-background.d.ts +7 -0
  52. package/components/root/phi-root-background.js +20 -1
  53. package/components/root/phi-root-layout.d.ts +1 -0
  54. package/components/root/phi-root-layout.js +1 -0
  55. package/components/root/phi-root-theme-resolver.js +15 -1
  56. package/components/root/phi-shell-chrome-overlay.d.ts +18 -1
  57. package/components/root/phi-shell-chrome-overlay.js +26 -4
  58. package/components/runtime/runtime-module-context.d.ts +12 -1
  59. package/components/runtime/runtime-module-context.js +6 -1
  60. package/components/shell/phi-antd-icon.d.ts +1 -0
  61. package/components/shell/phi-antd-icon.js +3 -0
  62. package/components/shell/phi-cms-shell.d.ts +7 -1
  63. package/components/shell/phi-cms-shell.js +4 -2
  64. package/components/shell/use-phi-shell-header-bands.d.ts +5 -0
  65. package/components/shell/use-phi-shell-header-bands.js +64 -0
  66. package/components/shell/use-phi-shell-sticky-bottom.d.ts +18 -0
  67. package/components/shell/use-phi-shell-sticky-bottom.js +54 -0
  68. package/components/shell/use-phi-shell-sticky-top.js +61 -16
  69. package/components/surface/phi-surface-tone.d.ts +13 -0
  70. package/components/surface/phi-surface-tone.js +21 -0
  71. package/components/tables/client/phi-table-binding.d.ts +1 -0
  72. package/components/tables/client/phi-table-binding.js +22 -3
  73. package/components/trees/client/phi-tree-binding.d.ts +1 -0
  74. package/components/trees/client/phi-tree-binding.js +11 -2
  75. package/components/widgets/client/bullet-list-entries-editor.js +7 -1
  76. package/components/widgets/client/html-editor.js +1 -1
  77. package/components/widgets/client/shared/phi-collection-provider.js +4 -3
  78. package/components/widgets/client/shared/phi-collection-view-binding.d.ts +1 -0
  79. package/components/widgets/client/shared/phi-collection-view-binding.js +16 -2
  80. package/components/widgets/client/shared/phi-command-buttons.js +6 -2
  81. package/components/widgets/client/shared/use-page-reference-options.d.ts +17 -0
  82. package/components/widgets/client/shared/use-page-reference-options.js +57 -0
  83. package/components/widgets/config/background.d.ts +52 -1
  84. package/components/widgets/config/background.js +85 -4
  85. package/components/widgets/config/button-variant.d.ts +22 -4
  86. package/components/widgets/config/button-variant.js +24 -5
  87. package/components/widgets/config/common-action-field.d.ts +1 -1
  88. package/components/widgets/config/parser-primitives.js +4 -2
  89. package/components/widgets/config/theme-gradient.d.ts +11 -0
  90. package/components/widgets/config/theme-gradient.js +12 -0
  91. package/components/widgets/label-sets/background.js +4 -0
  92. package/components/widgets/label-sets/geometry.js +2 -0
  93. package/components/widgets/label-sets/inspector.js +4 -0
  94. package/components/widgets/label-types/background.d.ts +2 -0
  95. package/components/widgets/label-types/background.js +2 -0
  96. package/components/widgets/label-types/common-controls.js +2 -2
  97. package/components/widgets/label-types/geometry.d.ts +1 -0
  98. package/components/widgets/label-types/geometry.js +1 -0
  99. package/components/widgets/label-types/inspector.d.ts +4 -0
  100. package/components/widgets/label-types/inspector.js +2 -0
  101. package/components/widgets/shared/bullet-list-vocabulary.d.ts +10 -0
  102. package/components/widgets/shared/bullet-list-vocabulary.js +5 -2
  103. package/components/widgets/shared/card-body-client.d.ts +16 -3
  104. package/components/widgets/shared/card-body-client.js +79 -8
  105. package/components/widgets/shared/card-vocabulary.d.ts +12 -2
  106. package/components/widgets/shared/card-vocabulary.js +7 -0
  107. package/components/widgets/shared/collection-source-failure.d.ts +26 -0
  108. package/components/widgets/shared/collection-source-failure.js +42 -0
  109. package/components/widgets/shared/markdown-body-client.js +39 -10
  110. package/components/widgets/shared/markdown-render.js +16 -3
  111. package/components/widgets/shared/widget-failure-client.d.ts +10 -0
  112. package/components/widgets/shared/widget-failure-client.js +20 -0
  113. package/components/widgets/shared/widget-failure.d.ts +31 -0
  114. package/components/widgets/shared/widget-failure.js +20 -0
  115. package/components/widgets/shared/widget-failure.server.d.ts +9 -0
  116. package/components/widgets/shared/widget-failure.server.js +12 -0
  117. package/gateway/dashboard-card-memo.d.ts +3 -0
  118. package/gateway/dashboard-card-memo.js +25 -0
  119. package/helpers/cms-container-chrome.js +6 -1
  120. package/helpers/cms-region-keys.d.ts +1 -1
  121. package/helpers/layout-style.d.ts +8 -4
  122. package/helpers/layout-style.js +3 -2
  123. package/helpers/locale.d.ts +8 -0
  124. package/helpers/locale.js +18 -0
  125. package/helpers/mode-paint.d.ts +4 -0
  126. package/helpers/mode-paint.js +47 -0
  127. package/helpers/shell-region-style.js +2 -1
  128. package/helpers/surface-style.d.ts +12 -1
  129. package/helpers/surface-style.js +60 -12
  130. package/module-dashboard-cards.d.ts +2 -1
  131. package/module-dashboard-cards.js +2 -1
  132. package/module-records.d.ts +7 -0
  133. package/module-records.js +6 -0
  134. package/package.json +1 -1
  135. package/plugins/runtime-modules/area-definitions.d.ts +0 -42
  136. package/plugins/runtime-modules/area-definitions.js +3 -8
  137. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +21 -2
  138. package/plugins/runtime-modules/builder/clients/inspector-surface-labels.js +1 -0
  139. package/plugins/runtime-modules/builder/clients/layout-scaffold-overlays.js +10 -5
  140. package/plugins/runtime-modules/builder/clients/region-inspector.js +47 -2
  141. package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +1 -1
  142. package/plugins/runtime-modules/builder/controller/draft-command-controller.js +7 -4
  143. package/plugins/runtime-modules/builder/controller/page-controller.js +7 -0
  144. package/plugins/runtime-modules/builder/edit-scaffold-drawer.js +3 -2
  145. package/plugins/runtime-modules/builder/persistence.d.ts +3 -0
  146. package/plugins/runtime-modules/builder/persistence.js +9 -1
  147. package/plugins/runtime-modules/builder/render-root-node-scaffold.js +25 -15
  148. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +4 -0
  149. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +15 -4
  150. package/plugins/runtime-modules/client-authoring-module.d.ts +8 -1
  151. package/plugins/runtime-modules/client-authoring-module.js +13 -3
  152. package/plugins/runtime-modules/core/content-entries/record-source.server.d.ts +3 -1
  153. package/plugins/runtime-modules/core/content-entries/record-source.server.js +7 -4
  154. package/plugins/runtime-modules/core/widgets/brand/client.d.ts +12 -3
  155. package/plugins/runtime-modules/core/widgets/brand/client.js +3 -11
  156. package/plugins/runtime-modules/core/widgets/brand/home.d.ts +15 -0
  157. package/plugins/runtime-modules/core/widgets/brand/home.js +18 -0
  158. package/plugins/runtime-modules/core/widgets/brand/plugin.js +3 -2
  159. package/plugins/runtime-modules/core/widgets/brand/server.d.ts +2 -2
  160. package/plugins/runtime-modules/core/widgets/brand/server.js +2 -2
  161. package/plugins/runtime-modules/core/widgets/button/client.js +2 -2
  162. package/plugins/runtime-modules/core/widgets/button/config.d.ts +40 -4
  163. package/plugins/runtime-modules/core/widgets/button/config.js +12 -0
  164. package/plugins/runtime-modules/core/widgets/card/config.d.ts +100 -1
  165. package/plugins/runtime-modules/core/widgets/card/config.js +57 -3
  166. package/plugins/runtime-modules/core/widgets/card/editor.js +21 -4
  167. package/plugins/runtime-modules/core/widgets/card/server.js +5 -0
  168. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.d.ts +4 -1
  169. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +10 -3
  170. package/plugins/runtime-modules/core/widgets/collection-view/authoring.js +1 -1
  171. package/plugins/runtime-modules/core/widgets/collection-view/client.d.ts +3 -0
  172. package/plugins/runtime-modules/core/widgets/collection-view/client.js +47 -11
  173. package/plugins/runtime-modules/core/widgets/collection-view/image-preview-grid.d.ts +4 -1
  174. package/plugins/runtime-modules/core/widgets/collection-view/image-preview-grid.js +2 -2
  175. package/plugins/runtime-modules/core/widgets/collection-view/plugin.js +3 -2
  176. package/plugins/runtime-modules/core/widgets/collection-view/server.d.ts +6 -1
  177. package/plugins/runtime-modules/core/widgets/collection-view/server.js +21 -3
  178. package/plugins/runtime-modules/core/widgets/description/client.js +3 -3
  179. package/plugins/runtime-modules/core/widgets/description/config.d.ts +1 -0
  180. package/plugins/runtime-modules/core/widgets/description/editor.js +3 -2
  181. package/plugins/runtime-modules/core/widgets/description/server.js +3 -2
  182. package/plugins/runtime-modules/core/widgets/entry-detail/plugin.js +1 -1
  183. package/plugins/runtime-modules/core/widgets/entry-detail/server.d.ts +3 -1
  184. package/plugins/runtime-modules/core/widgets/entry-detail/server.js +5 -2
  185. package/plugins/runtime-modules/core/widgets/entry-header/plugin.js +1 -1
  186. package/plugins/runtime-modules/core/widgets/entry-header/server.d.ts +3 -1
  187. package/plugins/runtime-modules/core/widgets/entry-header/server.js +5 -2
  188. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +1 -0
  189. package/plugins/runtime-modules/core/widgets/entry-list/plugin.js +1 -1
  190. package/plugins/runtime-modules/core/widgets/entry-list/server.d.ts +6 -3
  191. package/plugins/runtime-modules/core/widgets/entry-list/server.js +13 -6
  192. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +1 -0
  193. package/plugins/runtime-modules/core/widgets/gallery/plugin.js +1 -1
  194. package/plugins/runtime-modules/core/widgets/gallery/server.d.ts +5 -3
  195. package/plugins/runtime-modules/core/widgets/gallery/server.js +8 -6
  196. package/plugins/runtime-modules/core/widgets/header-navigation/client.js +2 -2
  197. package/plugins/runtime-modules/core/widgets/html/client.js +1 -1
  198. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +320 -2
  199. package/plugins/runtime-modules/core/widgets/markdown/config.js +18 -4
  200. package/plugins/runtime-modules/core/widgets/markdown/editor.js +9 -1
  201. package/plugins/runtime-modules/core/widgets/markdown-toc/client.js +6 -1
  202. package/plugins/runtime-modules/core/widgets/markdown-toc/config.d.ts +14 -0
  203. package/plugins/runtime-modules/core/widgets/markdown-toc/config.js +14 -2
  204. package/plugins/runtime-modules/core/widgets/quick-links/authoring.js +7 -2
  205. package/plugins/runtime-modules/core/widgets/quick-links/client.js +2 -2
  206. package/plugins/runtime-modules/core/widgets/quick-links/items.d.ts +0 -2
  207. package/plugins/runtime-modules/core/widgets/quick-links/items.js +0 -15
  208. package/plugins/runtime-modules/core/widgets/record/client.d.ts +4 -1
  209. package/plugins/runtime-modules/core/widgets/record/client.js +8 -3
  210. package/plugins/runtime-modules/core/widgets/record/plugin.js +3 -2
  211. package/plugins/runtime-modules/core/widgets/record/server.d.ts +3 -1
  212. package/plugins/runtime-modules/core/widgets/record/server.js +2 -2
  213. package/plugins/runtime-modules/core/widgets/result/config.d.ts +1 -0
  214. package/plugins/runtime-modules/core/widgets/segmented/client.js +1 -1
  215. package/plugins/runtime-modules/core/widgets/segmented/config.d.ts +21 -1
  216. package/plugins/runtime-modules/core/widgets/segmented/config.js +11 -1
  217. package/plugins/runtime-modules/core/widgets/sidebar-navigation/authoring.js +1 -1
  218. package/plugins/runtime-modules/core/widgets/sidebar-navigation/client.js +1 -1
  219. package/plugins/runtime-modules/core/widgets/simple-text/client.js +8 -3
  220. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +1 -0
  221. package/plugins/runtime-modules/core/widgets/simple-text/editor.js +2 -2
  222. package/plugins/runtime-modules/core/widgets/switch/client.js +1 -1
  223. package/plugins/runtime-modules/core/widgets/switch/config.d.ts +19 -0
  224. package/plugins/runtime-modules/core/widgets/switch/config.js +11 -0
  225. package/plugins/runtime-modules/core/widgets/table/authoring.js +1 -1
  226. package/plugins/runtime-modules/core/widgets/table/client.d.ts +4 -1
  227. package/plugins/runtime-modules/core/widgets/table/client.js +16 -3
  228. package/plugins/runtime-modules/core/widgets/table/config.d.ts +3 -0
  229. package/plugins/runtime-modules/core/widgets/table/plugin.js +3 -2
  230. package/plugins/runtime-modules/core/widgets/table/server.d.ts +3 -1
  231. package/plugins/runtime-modules/core/widgets/table/server.js +2 -2
  232. package/plugins/runtime-modules/core/widgets/table/static-resource-editor.js +2 -1
  233. package/plugins/runtime-modules/core/widgets/timeline/authoring.js +1 -1
  234. package/plugins/runtime-modules/core/widgets/timeline/client.d.ts +1 -3
  235. package/plugins/runtime-modules/core/widgets/timeline/client.js +14 -4
  236. package/plugins/runtime-modules/core/widgets/tree/authoring.js +1 -1
  237. package/plugins/runtime-modules/core/widgets/tree/client.d.ts +4 -1
  238. package/plugins/runtime-modules/core/widgets/tree/client.js +13 -2
  239. package/plugins/runtime-modules/core/widgets/tree/plugin.js +3 -2
  240. package/plugins/runtime-modules/core/widgets/tree/server.d.ts +3 -1
  241. package/plugins/runtime-modules/core/widgets/tree/server.js +2 -2
  242. package/plugins/runtime-modules/dashboard/card-rows.d.ts +3 -1
  243. package/plugins/runtime-modules/dashboard/card-rows.js +30 -2
  244. package/plugins/runtime-modules/dashboard/clients/dashboard-card-view.js +29 -7
  245. package/plugins/runtime-modules/dashboard/trees/phi-default-builder-dashboard-page-tree.js +5 -40
  246. package/plugins/runtime-modules/theme/presets.d.ts +9 -1
  247. package/plugins/runtime-modules/theme/tour.d.ts +9 -1
  248. package/plugins/runtime-modules/theme/tour.js +10 -1
  249. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +157 -22
  250. package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +5 -9
  251. package/runtime-data-provider-client.d.ts +2 -0
  252. package/runtime-data-provider-client.js +7 -0
  253. package/server-helpers/cms-link-targets.js +6 -0
  254. package/styles/controls.css +74 -7
  255. package/styles/gradients.css +101 -0
  256. package/styles/layout.css +45 -2
  257. package/styles/root.css +18 -0
  258. package/styles/shell.css +137 -0
  259. package/theme/phi-antd-token-resolver.js +20 -1
  260. package/theme/phi-button-shadow.d.ts +6 -0
  261. package/theme/phi-theme-gradients.d.ts +96 -0
  262. package/theme/phi-theme-gradients.js +245 -0
  263. package/theme/phi-theme-presets.d.ts +3 -0
  264. package/theme/phi-theme-presets.js +3 -0
  265. package/theme/phi-theme-tokens.d.ts +6 -2
  266. package/theme/phi-theme-tokens.js +15 -0
  267. package/theme/phi-theme.d.ts +5 -0
  268. package/theme/phi-theme.js +21 -0
  269. package/theme/phi-tokens.d.ts +16 -15
  270. package/theme/phi-tokens.js +16 -15
  271. package/types/cms-plugins.d.ts +2 -0
  272. package/types/cms-presets.d.ts +7 -0
  273. package/types/core-widget-placements.d.ts +3 -0
  274. package/types/dashboard-cards.d.ts +39 -4
  275. package/types/dashboard-cards.js +6 -0
  276. package/types/layout-style.d.ts +9 -8
  277. package/types/layout-style.js +9 -8
  278. package/types/site-theme.d.ts +10 -2
  279. package/types/surface.d.ts +4 -0
  280. package/types/surface.js +4 -0
  281. package/types.d.ts +1 -1
  282. package/types.js +1 -1
package/README.md CHANGED
@@ -50,7 +50,11 @@ It does not own:
50
50
  `createPhiNextStaticAreaLayout`, and the Area bridges in `@phis/ui/next/areas/<area>`). They hold no CMS,
51
51
  locale, or access logic. Behavior fixes arrive by updating the package, not by editing the Site.
52
52
  - Install Module packages with `phis module add --site <site key> --package <name>`, rebuild, and enable
53
- the Module per Area in the Builder.
53
+ the Module per Area in the Builder. `--spec <version or workspace:*>` also writes the package into the
54
+ Site's dependencies (without it the package must already resolve; nothing is fetched), and `--path
55
+ <site root>` names the Site when it is not the Site's configured source path. A package resolves through
56
+ its `exports`, which point into `dist`, so a local or workspace package must be built (`pnpm build`)
57
+ before it is added, and rebuilt after every change for the Site to see it.
54
58
  - The Site boundary, the route graph, fonts, and metadata are [NEXT_INTEGRATION.md](./NEXT_INTEGRATION.md).
55
59
 
56
60
  ## For Module authors
@@ -68,9 +72,9 @@ The root export (`@phis/ui`) is not an integration surface; import from the grou
68
72
 
69
73
  | Group | Entry points |
70
74
  | --- | --- |
71
- | Next.js Site | `next/area-route`, `next/areas/<area>`, `next/areas/<area>-client`, `next/root-route`, `next/root-error-page`, `next/global-error`, `next/site-bridge`, `next/site-proxy`, `next/proxy-runtime`, `next/route-handlers`, `next/seo-routes`, `next/overlay-zones`, `next/overlay-zones-client`, `next/cache-handler`, `next/runtime-module-client-boundary` |
75
+ | Next.js Site | `next/config` (`withPhiNextConfig` for the Site's `next.config`), `next/area-route`, `next/areas/<area>`, `next/areas/<area>-client`, `next/root-route`, `next/root-error-page`, `next/global-error`, `next/site-bridge`, `next/site-proxy`, `next/proxy-runtime`, `next/route-handlers`, `next/seo-routes`, `next/overlay-zones`, `next/overlay-zones-client`, `next/cache-handler`, `next/runtime-module-client-boundary` |
72
76
  | CMS rendering | `cms`, `cms/root-layout`, `cms/root-page`, `cms/root-slot-page`, `cms/error-page`, `cms/request`, `cms/plugins`, `cms/plugins/<area>` |
73
- | Module packages | `module`, `module/client`, `module/authoring-client`, `module/labels`, `module/dashboard-cards`, `module/projection`, `module/projection/client`, `module/projection/authoring-client`, `module/site-modules`, `module/site-modules-client` |
77
+ | Module packages | `module`, `module/client`, `module/authoring-client`, `module/labels`, `module/dashboard-cards`, `module/records`, `module/projection`, `module/projection/client`, `module/projection/authoring-client`, `module/site-modules`, `module/site-modules-client` |
74
78
  | Runtime Clients | `runtime`, `runtime/controller-client`, `runtime/render-client`, `runtime/signal-client`, `runtime/data-provider-client`, `runtime/authoring-client`, `runtime/authoring-manifest-client`, `runtime/calendar-adapter-client`, `runtime/user-state-client`, `runtime/client-manifests/<area>` |
75
79
  | UI | `widgets`, `core-widgets`, `widget-config`, `controls`, `controls/config`, `controls/date-time`, `layouts`, `shells`, `root`, `navigation`, `forms`, `forms/client`, `media`, `references`, `state`, `theme` |
76
80
  | Builder | `builder-api-route` |
@@ -99,6 +103,8 @@ graph.
99
103
  | Tables, Trees, Collections | [TABLES.md](./TABLES.md), [TREES.md](./TREES.md), [COLLECTIONS.md](./COLLECTIONS.md) |
100
104
  | Overlays | [OVERLAYS.md](./OVERLAYS.md) |
101
105
  | Conversation surfaces | [THREADS.md](./THREADS.md) |
106
+ | Area Dashboards and Module cards | [DASHBOARD.md](./DASHBOARD.md) |
107
+ | Content entries (blog, news) and their Pages | [CONTENT_ENTRIES.md](./CONTENT_ENTRIES.md) |
102
108
  | Builder | [BUILDER.md](./BUILDER.md) |
103
109
  | Settings | [SETTINGS.md](./SETTINGS.md) |
104
110
  | Access and visibility | [ACCESS.md](./ACCESS.md) |
package/cms/plugins.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export type { PhiCmsSiteBridge } from "../types/cms-plugins";
2
+ export { definePhiPassiveWidgetRenderers } from "../plugins/factories/widget-renderers";
2
3
  export { assertPhiCmsPresetTreeContract, buildPhiCmsPresetIdentityKey, compilePhiCmsActiveRouteTable, compilePhiCmsDescriptorCatalog, instantiatePhiCmsAreaShellPreset, instantiatePhiCmsRoutePreset, instantiatePhiCmsThemePreset, instantiatePhiCmsThemePresets, normalizePhiCmsRoutePath, resolvePhiCmsAreaShellPresetBinding, resolvePhiCmsDescriptorCatalog, resolvePhiCmsRoutePreset, resolvePhiCmsRoutePresetByPageId, resolvePhiCmsRoutePresetByIdentity, resolvePhiCmsThemePresetBinding, } from "../plugins/runtime-modules/descriptor-compiler";
3
4
  export { buildPhiRuntimeModulePackageRoutePrefix, readPhiRuntimeModulePackageRouteParts, } from "../helpers/runtime-module-route-path";
4
5
  export { assertPhiRuntimeModuleCatalog, createPhiRuntimeModuleCatalog, buildPhiRuntimeModuleControllerDescriptor, buildPhiRuntimeModuleDataProviderDescriptor, extendPhiRuntimeModuleCatalog, } from "../plugins/runtime-modules/contracts";
package/cms/plugins.js CHANGED
@@ -1,3 +1,5 @@
1
+ // A package's Widget draws its Preview inert the way a Core Widget does, rather than live.
2
+ export { definePhiPassiveWidgetRenderers } from "../plugins/factories/widget-renderers";
1
3
  export { assertPhiCmsPresetTreeContract, buildPhiCmsPresetIdentityKey, compilePhiCmsActiveRouteTable, compilePhiCmsDescriptorCatalog, instantiatePhiCmsAreaShellPreset, instantiatePhiCmsRoutePreset, instantiatePhiCmsThemePreset, instantiatePhiCmsThemePresets, normalizePhiCmsRoutePath, resolvePhiCmsAreaShellPresetBinding, resolvePhiCmsDescriptorCatalog, resolvePhiCmsRoutePreset, resolvePhiCmsRoutePresetByPageId, resolvePhiCmsRoutePresetByIdentity, resolvePhiCmsThemePresetBinding, } from "../plugins/runtime-modules/descriptor-compiler";
2
4
  export { buildPhiRuntimeModulePackageRoutePrefix, readPhiRuntimeModulePackageRouteParts, } from "../helpers/runtime-module-route-path";
3
5
  export { assertPhiRuntimeModuleCatalog, createPhiRuntimeModuleCatalog, buildPhiRuntimeModuleControllerDescriptor, buildPhiRuntimeModuleDataProviderDescriptor, extendPhiRuntimeModuleCatalog, } from "../plugins/runtime-modules/contracts";
@@ -255,8 +255,37 @@ export async function PhiCmsAreaShell({ root, cmsBridge, children, chrome = "she
255
255
  extent: headerTopExtent,
256
256
  stack: headerTopReveal === "scroll-up" ? headerTopExtent : 0,
257
257
  };
258
+ /*
259
+ * The room the two Area bands hold, where their configs state a height: what a Hero stands behind on
260
+ * the first paint (`styles/shell.css`, "Hero at the top"). A `header_top` the browser decides holds
261
+ * what it was just resolved to hold.
262
+ */
263
+ const headerTopBandRoom = !hasRenderableHeaderTop
264
+ ? 0
265
+ : headerTopBehaviour != null
266
+ ? headerTopRoom.extent
267
+ : readPhiShellChromePanePixels(headerTopBand?.height);
268
+ const headerMainBandRoom = hasRenderableHeaderMain
269
+ ? readPhiShellChromePanePixels(readPhiShellChromePaneBand(headerMainRegion?.config)?.height)
270
+ : 0;
271
+ /*
272
+ * The Page's own `header_bottom` where it states a height, so a Hero's words start below it on the first
273
+ * paint too; a band sized by its content is the browser's to measure.
274
+ */
275
+ const resolvedPage = scope.rootScope.resolvedRequest?.page;
276
+ const pageHeaderBottom = resolvedPage?.regions.find((region) => region.regionType === PhiCmsRegionType.HeaderBottom);
277
+ const headerBottomBandRoom = !resolvedPage
278
+ ? null
279
+ : pageHeaderBottom
280
+ ? readPhiShellChromePanePixels(readPhiShellChromePaneBand(pageHeaderBottom.config)?.height)
281
+ : 0;
282
+ const headerBandRoom = {
283
+ ...(headerTopBandRoom == null ? {} : { "--phi-shell-band-top": `${headerTopBandRoom}px` }),
284
+ ...(headerMainBandRoom == null ? {} : { "--phi-shell-band-main": `${headerMainBandRoom}px` }),
285
+ ...(headerBottomBandRoom == null ? {} : { "--phi-shell-band-bottom": `${headerBottomBandRoom}px` }),
286
+ };
258
287
  const headerPaneStickyTop = resolvePhiShellHeaderPaneStickyTop(headerTopBand, hasRenderableHeaderMain ? readPhiShellChromePaneBand(headerMainRegion?.config) : null, headerTopBehaviour, headerTopRoom);
259
- return (_jsx(PhiCmsShell, { content: children, headerPaneStickyTop: headerPaneStickyTop, headerTopRoom: headerTopBehaviour == null ? undefined : {
288
+ return (_jsx(PhiCmsShell, { content: children, headerPaneStickyTop: headerPaneStickyTop, headerBandRoom: headerBandRoom, headerTopRoom: headerTopBehaviour == null ? undefined : {
260
289
  [PHI_SHELL_HEADER_TOP_EXTENT_PROPERTY]: `${headerTopRoom.extent}px`,
261
290
  [PHI_SHELL_HEADER_TOP_STACK_PROPERTY]: `${headerTopRoom.stack}px`,
262
291
  }, headerTop: hasRenderableHeaderTop ? (_jsx(PhiCmsLayoutRenderer, { tree: filteredLayoutTree, runtime: runtime, regionClassName: "phi-shell-region header_top", regionTypes: [PhiCmsRegionType.HeaderTop], registry: runtimeRegistry })) : undefined, headerMain: hasRenderableHeaderMain ? (_jsx(PhiCmsLayoutRenderer, { tree: filteredLayoutTree, runtime: runtime, regionClassName: "phi-shell-region header_main", regionTypes: [PhiCmsRegionType.HeaderMain], registry: runtimeRegistry })) : undefined, headerBottom: headerBottom, hero: hero, siderLeft: hasRenderableSiderLeft ? (_jsx(PhiCmsLayoutRenderer, { tree: filteredLayoutTree, runtime: runtime, regionClassName: "sider_left", regionTypes: [PhiCmsRegionType.SiderLeft], stackGap: 0, registry: runtimeRegistry })) : undefined, siderRight: siderRight, siderLeftFullHeight: hasPhiConfigFlag(siderLeftRegion?.config, PhiCmsFlags.FullHeight) && hasRenderableSiderLeft, footerTop: footerTop, drawer: drawer, footerMain: hasRenderableFooterMain ? (_jsx(PhiCmsLayoutRenderer, { tree: filteredLayoutTree, runtime: runtime, regionClassName: "phi-shell-region footer_main", regionTypes: [PhiCmsRegionType.Footer], registry: runtimeRegistry })) : undefined, footerBottom: hasRenderableFooterBottom ? (_jsx(PhiCmsLayoutRenderer, { tree: filteredLayoutTree, runtime: runtime, regionClassName: "phi-shell-region footer_bottom", regionTypes: [PhiCmsRegionType.FooterBottom], registry: runtimeRegistry })) : undefined }));
@@ -8,5 +8,8 @@ import { Anchor } from "antd";
8
8
  * page, the shape a table of contents takes. It stays where it is drawn and never pins itself.
9
9
  */
10
10
  export function PhiAnchorNavControl({ items, offsetTop = 0, style }) {
11
- return _jsx(Anchor, { affix: false, offsetTop: offsetTop, items: [...items], style: style });
11
+ return (_jsx(Anchor, { affix: false, offsetTop: offsetTop, items: [...items], className: "phi-anchor-nav-control",
12
+ // As wide as its slot and no wider: Ant Design sizes the list to its longest title, which in a
13
+ // narrow sider ran past the edge. Within the slot a long title ends in an ellipsis, Ant Design's own.
14
+ style: { maxWidth: "100%", minWidth: 0, ...style } }));
12
15
  }
@@ -54,6 +54,11 @@ export type PhiBackgroundControlProps = {
54
54
  * for it.
55
55
  */
56
56
  baseKinds?: readonly PhiCmsBackgroundWidgetConfig["base"]["kind"][];
57
+ /**
58
+ * Whether the surface draws an Overlay over its Base. A Theme gradient slot is one run and nothing
59
+ * over it, so it offers none; absent is offered.
60
+ */
61
+ overlay?: boolean;
57
62
  renderMediaPicker?: (props: {
58
63
  purpose: "preview" | "field";
59
64
  value?: number | null;
@@ -75,4 +80,4 @@ export type PhiBackgroundControlProps = {
75
80
  editTransaction?: PhiBackgroundEditTransaction;
76
81
  onChange?: (value: PhiCmsBackgroundWidgetConfig) => void;
77
82
  };
78
- export declare function PhiBackgroundControl({ value, config, disabled, mode, labels, colorPickerLabels, colorPickerPlacement, motionModes, filters, imageSourceKinds, baseKinds, renderMediaPicker, editTransaction, onChange, }: PhiBackgroundControlProps): import("react").JSX.Element;
83
+ export declare function PhiBackgroundControl({ value, config, disabled, mode, labels, colorPickerLabels, colorPickerPlacement, motionModes, filters, imageSourceKinds, baseKinds, overlay: overlayOffered, renderMediaPicker, editTransaction, onChange, }: PhiBackgroundControlProps): import("react").JSX.Element;
@@ -50,7 +50,7 @@ const BACKGROUND_IMAGE_VARIANT_OPTIONS = [
50
50
  ];
51
51
  function toPickerValue(background) {
52
52
  const normalized = normalizePhiBackgroundWidgetConfig(background ?? null);
53
- if (normalized.base.kind === "none") {
53
+ if (normalized.base.kind === "none" || normalized.base.kind === "theme") {
54
54
  return "rgba(255, 255, 255, 0)";
55
55
  }
56
56
  if (normalized.base.kind === "image") {
@@ -61,7 +61,7 @@ function toPickerValue(background) {
61
61
  function resolveStoredSolidColor(color) {
62
62
  return color;
63
63
  }
64
- export function PhiBackgroundControl({ value, config, disabled = false, mode = "control", labels = PHI_BACKGROUND_WIDGET_DEFAULT_LABELS, colorPickerLabels = PHI_COLOR_PICKER_DEFAULT_LABELS, colorPickerPlacement, motionModes = PHI_BACKGROUND_MOTION_MODES, filters = PHI_BACKGROUND_FILTERS, imageSourceKinds = PHI_BACKGROUND_IMAGE_SOURCE_KINDS, baseKinds = PHI_BACKGROUND_BASE_KINDS, renderMediaPicker, editTransaction, onChange, }) {
64
+ export function PhiBackgroundControl({ value, config, disabled = false, mode = "control", labels = PHI_BACKGROUND_WIDGET_DEFAULT_LABELS, colorPickerLabels = PHI_COLOR_PICKER_DEFAULT_LABELS, colorPickerPlacement, motionModes = PHI_BACKGROUND_MOTION_MODES, filters = PHI_BACKGROUND_FILTERS, imageSourceKinds = PHI_BACKGROUND_IMAGE_SOURCE_KINDS, baseKinds = PHI_BACKGROUND_BASE_KINDS, overlay: overlayOffered = true, renderMediaPicker, editTransaction, onChange, }) {
65
65
  const { token } = theme.useToken();
66
66
  const colorPickerPresets = usePhiColorControlPresets({ labels: colorPickerLabels });
67
67
  const currentValue = useMemo(() => normalizePhiBackgroundWidgetConfig(value ?? config ?? null), [value, config]);
@@ -126,6 +126,7 @@ export function PhiBackgroundControl({ value, config, disabled = false, mode = "
126
126
  { value: "color", label: labels.base.color },
127
127
  { value: "gradient", label: labels.base.gradient },
128
128
  { value: "image", label: labels.base.image },
129
+ { value: "theme", label: labels.base.theme },
129
130
  ];
130
131
  const baseKindOptions = baseKindCatalog.filter((option) => baseKinds.includes(option.value));
131
132
  const backgroundPositionOptions = [
@@ -210,6 +211,7 @@ export function PhiBackgroundControl({ value, config, disabled = false, mode = "
210
211
  ];
211
212
  const filterKindCatalog = [
212
213
  { value: "none", label: labels.common.none },
214
+ { value: "clear", label: labels.filter.clear },
213
215
  { value: "glass", label: labels.filter.glass },
214
216
  { value: "haze", label: labels.filter.haze },
215
217
  { value: "blur", label: labels.filter.blur },
@@ -223,7 +225,13 @@ export function PhiBackgroundControl({ value, config, disabled = false, mode = "
223
225
  const isOfferedFilter = (filter) => filters.includes(filter) && phiBackgroundSupportsFilter(currentValue, filter);
224
226
  const filterKindOptions = filterKindCatalog.filter((option) => option.value === "none" || isOfferedFilter(option.value));
225
227
  const activeFilterKind = currentValue.filter && isOfferedFilter(currentValue.filter) ? currentValue.filter : "none";
226
- const canOpenPreview = currentValue.base.kind !== "none";
228
+ // The Theme's Overlay is edited in the Theme workspace; here it has nothing to open.
229
+ const canOpenPreview = currentValue.base.kind !== "none" && currentValue.base.kind !== "theme";
230
+ /*
231
+ * A `theme` Base is the Theme's Overlay whole -- its own Overlay and pane included -- so the Background
232
+ * offers nothing to lay over it, and the Filter segment has nothing to offer either.
233
+ */
234
+ const offersOverlay = overlayOffered && currentValue.base.kind !== "theme";
227
235
  useEffect(() => {
228
236
  if (currentValue.base.kind === "color") {
229
237
  lastColorBaseRef.current = currentValue.base;
@@ -298,6 +306,11 @@ export function PhiBackgroundControl({ value, config, disabled = false, mode = "
298
306
  if (kind === currentValue.base.kind) {
299
307
  return;
300
308
  }
309
+ // The last colour, gradient and picture stay remembered (the effect above), so switching back finds them.
310
+ if (kind === "theme") {
311
+ emit({ base: { kind: "theme" }, overlay: null, filter: null, motion: null });
312
+ return;
313
+ }
301
314
  if (kind === "none") {
302
315
  emit({
303
316
  ...currentValue,
@@ -650,7 +663,17 @@ export function PhiBackgroundControl({ value, config, disabled = false, mode = "
650
663
  return (_jsx(ConfigPreviewShell, { expanded: canOpenPreview, children: renderPreviewPicker() }));
651
664
  }
652
665
  const showPreview = mode !== "config";
653
- return (_jsxs(PhiFlexControl, { vertical: true, gap: 12, style: { width: "100%" }, children: [showPreview ? (_jsx(ConfigPreviewShell, { expanded: canOpenPreview, children: renderPreviewPicker() })) : null, _jsxs("div", { style: { display: "flex", flexDirection: "column", gap: token.paddingXS, width: "100%" }, children: [_jsx(Typography.Text, { children: labels.sections.base }), _jsx(PhiSegmentedControl, { block: true, disabled: isDisabled, value: currentValue.base.kind, options: baseKindOptions, onChange: (next) => updateBaseKind(next) })] }), currentValue.base.kind === "image" ? (_jsxs("div", { style: { display: "flex", flexDirection: "column", gap: token.paddingSM, width: "100%" }, children: [_jsxs(Flex, { align: "center", justify: "space-between", gap: token.paddingXS, wrap: false, style: { width: "100%" }, children: [_jsx(Typography.Text, { children: labels.sections.image }), currentValue.base.sourceKind === "asset" && currentValue.base.assetId != null ? (_jsx(Typography.Text, { type: "secondary", style: { fontSize: token.fontSizeSM, textAlign: "right" }, children: currentValue.base.assetId })) : null] }), _jsxs("div", { style: {
666
+ /*
667
+ * Only what can be changed is shown. One Base kind is no choice, so its Select goes; and where the
668
+ * preview is drawn, a click on it opens the colour or gradient picker, so the second picker beside it
669
+ * would only repeat it.
670
+ */
671
+ const soleBaseKind = baseKinds.length === 1;
672
+ const basePickerInPreview = soleBaseKind && showPreview;
673
+ return (_jsxs(PhiFlexControl, { vertical: true, gap: 12, style: { width: "100%" }, children: [showPreview ? (_jsx(ConfigPreviewShell, { expanded: canOpenPreview, children: renderPreviewPicker() })) : null, soleBaseKind ? null : _jsxs("div", { style: { display: "flex", flexDirection: "column", gap: token.paddingXS, width: "100%" }, children: [_jsx(Typography.Text, { children: labels.sections.base }), _jsx(PhiSelectControl, { ariaLabel: labels.sections.base, disabled: isDisabled, value: currentValue.base.kind, options: baseKindOptions, style: { width: "100%" }, onChange: (next) => {
674
+ if (next != null)
675
+ updateBaseKind(next);
676
+ } })] }), currentValue.base.kind === "image" ? (_jsxs("div", { style: { display: "flex", flexDirection: "column", gap: token.paddingSM, width: "100%" }, children: [_jsxs(Flex, { align: "center", justify: "space-between", gap: token.paddingXS, wrap: false, style: { width: "100%" }, children: [_jsx(Typography.Text, { children: labels.sections.image }), currentValue.base.sourceKind === "asset" && currentValue.base.assetId != null ? (_jsx(Typography.Text, { type: "secondary", style: { fontSize: token.fontSizeSM, textAlign: "right" }, children: currentValue.base.assetId })) : null] }), _jsxs("div", { style: {
654
677
  display: "grid",
655
678
  gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
656
679
  gap: token.paddingSM,
@@ -676,13 +699,13 @@ export function PhiBackgroundControl({ value, config, disabled = false, mode = "
676
699
  }, children: [_jsx(Select, { value: currentValue.base.position ?? "center", disabled: isDisabled, style: { width: "100%" }, options: backgroundPositionOptions, onChange: (next) => updateImageField("position", next) }), _jsx(Select, { value: currentValue.base.size ?? "cover", disabled: isDisabled, style: { width: "100%" }, options: backgroundSizeOptions, onChange: (next) => updateImageField("size", next) }), _jsx(Select, { value: currentValue.base.repeat ?? "no-repeat", disabled: isDisabled, style: { width: "100%" }, options: backgroundRepeatOptions, onChange: (next) => updateImageField("repeat", next) })] }), backgroundMotionOptions.length > 1 ? (_jsxs("div", { style: { display: "flex", flexDirection: "column", gap: token.paddingXS, width: "100%" }, children: [_jsx(Typography.Text, { children: labels.sections.motion }), _jsx(PhiSegmentedControl, { block: true, value: activeMotionMode, options: backgroundMotionOptions, disabled: isDisabled, onChange: updateMotionMode }), activeParallaxMotion ? (_jsxs(_Fragment, { children: [_jsx(Typography.Text, { children: labels.motion.strength }), _jsx(PhiSliderControl, { min: 0, max: 1, step: 0.05, ariaLabel: labels.motion.strength, value: activeParallaxMotion.strength ?? resolvePhiBackgroundParallaxDefaultStrength(activeParallaxMotion.travel), disabled: isDisabled, tooltipSuffix: "\u00D7", style: { width: "100%" }, onChange: (strength) => {
677
700
  beginSliderEdit();
678
701
  updateParallaxMotion({ strength });
679
- }, onChangeComplete: commitSliderEdit }), _jsx(Typography.Text, { children: labels.motion.direction }), _jsx(PhiSegmentedControl, { block: true, value: activeParallaxMotion.direction ?? "natural", options: backgroundMotionDirectionOptions, disabled: isDisabled, onChange: (direction) => updateParallaxMotion({ direction }) }), _jsx(Typography.Text, { children: labels.motion.travel }), _jsx(PhiSegmentedControl, { block: true, value: activeParallaxMotion.travel ?? "rate", options: backgroundMotionTravelOptions, disabled: isDisabled, onChange: (travel) => updateParallaxMotion({ travel }) })] })) : null] })) : null] })) : currentValue.base.kind !== "none" ? (_jsxs("div", { style: { display: "flex", flexDirection: "column", gap: token.paddingSM, width: "100%" }, children: [currentValue.base.kind === "color" ? (_jsxs(Flex, { align: "center", justify: "space-between", gap: token.paddingSM, wrap: "wrap", children: [_jsx(Typography.Text, { children: labels.base.color }), _jsx(PhiColorControl, { ...colorPickerTransaction, value: currentValue.base.color, disabled: isDisabled, presets: colorPickerPresets, placement: colorPickerPlacement, onChange: (value) => {
702
+ }, onChangeComplete: commitSliderEdit }), _jsx(Typography.Text, { children: labels.motion.direction }), _jsx(PhiSegmentedControl, { block: true, value: activeParallaxMotion.direction ?? "natural", options: backgroundMotionDirectionOptions, disabled: isDisabled, onChange: (direction) => updateParallaxMotion({ direction }) }), _jsx(Typography.Text, { children: labels.motion.travel }), _jsx(PhiSegmentedControl, { block: true, value: activeParallaxMotion.travel ?? "rate", options: backgroundMotionTravelOptions, disabled: isDisabled, onChange: (travel) => updateParallaxMotion({ travel }) })] })) : null] })) : null] })) : currentValue.base.kind === "color" || currentValue.base.kind === "gradient" ? (_jsxs("div", { style: { display: "flex", flexDirection: "column", gap: token.paddingSM, width: "100%" }, children: [basePickerInPreview ? null : currentValue.base.kind === "color" ? (_jsxs(Flex, { align: "center", justify: "space-between", gap: token.paddingSM, wrap: "wrap", children: [_jsx(Typography.Text, { children: labels.base.color }), _jsx(PhiColorControl, { ...colorPickerTransaction, value: currentValue.base.color, disabled: isDisabled, presets: colorPickerPresets, placement: colorPickerPlacement, onChange: (value) => {
680
703
  if (value != null)
681
704
  updateBaseFromCss(value);
682
705
  } })] })) : (_jsxs(Flex, { align: "center", justify: "space-between", gap: token.paddingSM, wrap: "wrap", children: [_jsx(Typography.Text, { children: labels.base.gradient }), _jsx(PhiColorControl, { ...colorPickerTransaction, mode: "gradient", value: derivedPickerValue, disabled: isDisabled, presets: colorPickerPresets, placement: colorPickerPlacement, onChange: (value) => {
683
706
  if (value != null)
684
707
  updateBaseFromCss(value);
685
- } })] })), currentValue.base.kind === "gradient" ? (renderDirectionEditor(labels.gradient.direction, currentValue.base.direction, updateGradientDirection)) : null] })) : null, _jsx(Divider, { dashed: true, size: "small" }), _jsxs(PhiFlexControl, { vertical: true, gap: 8, style: { width: "100%" }, children: [_jsx(Typography.Text, { children: labels.sections.overlay }), _jsx(PhiSegmentedControl, { block: true, disabled: isDisabled, value: currentValue.overlay?.kind ?? "none", options: overlayKindOptions, onChange: (next) => updateOverlayKind(next) }), currentValue.overlay ? (_jsxs(PhiFlexControl, { vertical: true, gap: 8, style: { width: "100%" }, children: [currentValue.overlay.kind === "pattern" ? (_jsxs(Flex, { align: "center", justify: "space-between", gap: token.paddingSM, wrap: "wrap", children: [_jsx(Typography.Text, { children: labels.overlay.pattern }), _jsx(PhiSelectControl, { value: currentValue.overlay.patternKey, options: resolvedPatternOptions, disabled: isDisabled, style: { width: fieldControlWidth }, onChange: (patternKey) => {
708
+ } })] })), currentValue.base.kind === "gradient" ? (renderDirectionEditor(labels.gradient.direction, currentValue.base.direction, updateGradientDirection)) : null] })) : null, offersOverlay ? _jsx(Divider, { dashed: true, size: "small" }) : null, offersOverlay ? _jsxs(PhiFlexControl, { vertical: true, gap: 8, style: { width: "100%" }, children: [_jsx(Typography.Text, { children: labels.sections.overlay }), _jsx(PhiSegmentedControl, { block: true, disabled: isDisabled, value: currentValue.overlay?.kind ?? "none", options: overlayKindOptions, onChange: (next) => updateOverlayKind(next) }), currentValue.overlay ? (_jsxs(PhiFlexControl, { vertical: true, gap: 8, style: { width: "100%" }, children: [currentValue.overlay.kind === "pattern" ? (_jsxs(Flex, { align: "center", justify: "space-between", gap: token.paddingSM, wrap: "wrap", children: [_jsx(Typography.Text, { children: labels.overlay.pattern }), _jsx(PhiSelectControl, { value: currentValue.overlay.patternKey, options: resolvedPatternOptions, disabled: isDisabled, style: { width: fieldControlWidth }, onChange: (patternKey) => {
686
709
  const provider = resolvePhiBackgroundPatternProvider(patternKey);
687
710
  if (!provider)
688
711
  return;
@@ -762,5 +785,5 @@ export function PhiBackgroundControl({ value, config, disabled = false, mode = "
762
785
  });
763
786
  }, style: { width: fieldControlWidth } })] }, field.key));
764
787
  })
765
- : null] })) : null] }), filterKindOptions.length > 1 ? (_jsxs(_Fragment, { children: [_jsx(Divider, { dashed: true, size: "small" }), _jsxs(PhiFlexControl, { vertical: true, gap: 8, style: { width: "100%" }, children: [_jsx(Typography.Text, { children: labels.sections.filter }), _jsx(PhiSegmentedControl, { block: true, disabled: isDisabled, value: activeFilterKind, options: filterKindOptions, onChange: (next) => updateFilterKind(next) })] })] })) : null] }));
788
+ : null] })) : null] }) : null, filterKindOptions.length > 1 ? (_jsxs(_Fragment, { children: [_jsx(Divider, { dashed: true, size: "small" }), _jsxs(PhiFlexControl, { vertical: true, gap: 8, style: { width: "100%" }, children: [_jsx(Typography.Text, { children: labels.sections.filter }), _jsx(PhiSegmentedControl, { block: true, disabled: isDisabled, value: activeFilterKind, options: filterKindOptions, onChange: (next) => updateFilterKind(next) })] })] })) : null] }));
766
789
  }
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from "react";
1
+ import type { CSSProperties, ReactNode } from "react";
2
2
  import { type PhiBulletListNode, type PhiResolvedBulletListStyle } from "../widgets/shared/bullet-list-vocabulary";
3
3
  export type PhiBulletListControlProps = {
4
4
  items: readonly PhiBulletListNode<ReactNode>[];
@@ -15,6 +15,11 @@ export type PhiBulletListControlProps = {
15
15
  * an entry that is a text field has the field's height instead.
16
16
  */
17
17
  markerLineHeight?: string;
18
+ /**
19
+ * The space the list keeps around it as a block among blocks -- a Markdown text's list takes its
20
+ * paragraphs' spacing, so the block after the last entry stands as far off as after a paragraph.
21
+ */
22
+ blockSpacing?: Pick<CSSProperties, "marginBlockStart" | "marginBlockEnd">;
18
23
  };
19
24
  /**
20
25
  * A list, as the house draws one: a marker per level, entries with a box of their own or none, lines
@@ -29,4 +34,4 @@ export type PhiBulletListControlProps = {
29
34
  * blocks. An entry's children are the list one level below it, drawn inside the entry under its content,
30
35
  * so they are indented by the marker and keep to the entry's box.
31
36
  */
32
- export declare function PhiBulletListControl({ items, listStyle, depth, ordered, start, markerLineHeight, }: PhiBulletListControlProps): import("react").JSX.Element;
37
+ export declare function PhiBulletListControl({ items, listStyle, depth, ordered, start, markerLineHeight, blockSpacing, }: PhiBulletListControlProps): import("react").JSX.Element;
@@ -66,7 +66,7 @@ function renderMarker(marker, icon, number) {
66
66
  * blocks. An entry's children are the list one level below it, drawn inside the entry under its content,
67
67
  * so they are indented by the marker and keep to the entry's box.
68
68
  */
69
- export function PhiBulletListControl({ items, listStyle = resolvePhiBulletListStyle(null), depth = 1, ordered = false, start = 1, markerLineHeight = "1lh", }) {
69
+ export function PhiBulletListControl({ items, listStyle = resolvePhiBulletListStyle(null), depth = 1, ordered = false, start = 1, markerLineHeight = "1lh", blockSpacing, }) {
70
70
  const level = resolvePhiBulletListLevel(depth);
71
71
  const marker = ordered ? "number" : listStyle.markers[level];
72
72
  const gap = resolvePhiSpacingScaleValue(listStyle.gap);
@@ -75,11 +75,12 @@ export function PhiBulletListControl({ items, listStyle = resolvePhiBulletListSt
75
75
  // A line between entries that have edges of their own would only double them.
76
76
  const divided = !boxed && hasPhiFlag(listStyle.flags, PhiBulletListFlag.Dividers);
77
77
  const ListTag = marker === "number" ? "ol" : "ul";
78
- const listCss = { display: "grid", gap, margin: 0, padding: 0, listStyle: "none", width: "100%", minWidth: 0 };
78
+ const listCss = { display: "grid", gap, margin: 0, padding: 0, listStyle: "none", width: "100%", minWidth: 0, ...blockSpacing };
79
79
  return (_jsx(ListTag, { style: listCss, ...(ListTag === "ol" && start !== 1 ? { start } : {}), children: items.map((item, index) => (_jsxs("li", { className: surface.className, style: {
80
80
  display: "flex",
81
81
  alignItems: "flex-start",
82
- gap: PHI_SPACE.sm,
82
+ // A marker belongs to its words: one small step between them, not the space between blocks.
83
+ gap: PHI_SPACE.xs,
83
84
  minWidth: 0,
84
85
  ...surface.style,
85
86
  ...(boxed ? { padding: `${PHI_SPACE.sm} ${PHI_SPACE.md}` } : {}),
@@ -1,6 +1,7 @@
1
1
  import { type ReactNode, type Ref } from "react";
2
2
  import type { ButtonProps } from "antd";
3
3
  import type { PhiControlSize } from "../../types/control";
4
+ import { type PhiThemeGradientKey } from "../../theme/phi-theme-gradients";
4
5
  import type { PhiButtonType } from "./phi-button-types";
5
6
  export type PhiControlBadgePresentation = {
6
7
  enabled?: boolean;
@@ -54,6 +55,17 @@ export type PhiButtonControlProps = {
54
55
  * not a kind of button -- it is any kind of button, drawn for a background it does not own.
55
56
  */
56
57
  ghost?: boolean;
58
+ /**
59
+ * Fills the button with one of the Theme's gradient slots (theme/phi-theme-gradients.ts), whatever
60
+ * `type` says: it is drawn as a primary button with the run over it (`styles/gradients.css`), so the
61
+ * primary colour stays its edge and where the run is not drawn -- a disabled button -- its fallback.
62
+ */
63
+ gradient?: PhiThemeGradientKey;
64
+ /**
65
+ * Draws the button as a frosted pane of the ground of the mode it stands in, for a button over a picture
66
+ * or a gradient -- where `ghost` keeps the outline and loses the words in a busy background.
67
+ */
68
+ glass?: boolean;
57
69
  disabled?: boolean;
58
70
  /**
59
71
  * Shown as it is and answering nothing: no hover, no press, no click -- where `disabled` greys it out.
@@ -80,4 +92,4 @@ export type PhiButtonControlProps = {
80
92
  ref?: Ref<HTMLButtonElement | HTMLAnchorElement>;
81
93
  onClick?: () => void;
82
94
  };
83
- export declare function PhiButtonControl({ label, ariaLabel, ariaPressed, href, newTab, external, tooltip, icon, type, shape, danger, ghost, disabled, readOnly, loading, htmlType, block, size, style, badge, className, ref, onClick, }: PhiButtonControlProps): import("react").JSX.Element;
95
+ export declare function PhiButtonControl({ label, ariaLabel, ariaPressed, href, newTab, external, tooltip, icon, type, shape, danger, ghost, gradient, glass, disabled, readOnly, loading, htmlType, block, size, style, badge, className, ref, onClick, }: PhiButtonControlProps): import("react").JSX.Element;
@@ -2,6 +2,7 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { lazy, Suspense } from "react";
4
4
  import { Button } from "antd";
5
+ import { PHI_THEME_GRADIENT_CSS_VARS, } from "../../theme/phi-theme-gradients";
5
6
  import { PhiLink } from "../navigation/phi-link";
6
7
  import { PhiHoverText } from "./phi-hover-text";
7
8
  /*
@@ -10,14 +11,31 @@ import { PhiHoverText } from "./phi-hover-text";
10
11
  * that draws a Button.
11
12
  */
12
13
  const PhiLazyBadge = lazy(() => import("antd/es/badge"));
13
- export function PhiButtonControl({ label, ariaLabel, ariaPressed, href, newTab, external, tooltip, icon, type = "default", shape, danger, ghost, disabled, readOnly, loading, htmlType, block, size, style, badge, className, ref, onClick, }) {
14
+ const PHI_GLASS_BUTTON_FILTER = "blur(12px) saturate(140%)";
15
+ export function PhiButtonControl({ label, ariaLabel, ariaPressed, href, newTab, external, tooltip, icon, type = "default", shape, danger, ghost, gradient, glass, disabled, readOnly, loading, htmlType, block, size, style, badge, className, ref, onClick, }) {
14
16
  const visibleTooltip = typeof label === "string" && typeof tooltip === "string" && label === tooltip
15
17
  ? null
16
18
  : tooltip;
17
19
  const inert = disabled || (!readOnly && !onClick && !href && htmlType !== "submit");
18
- const button = (_jsx(Button, { ref: ref, className: className, "aria-label": ariaLabel, "aria-pressed": ariaPressed, type: type, shape: shape, danger: danger, ghost: ghost, disabled: inert, loading: loading, htmlType: htmlType, block: block, size: size,
20
+ const gradientVars = gradient ? PHI_THEME_GRADIENT_CSS_VARS[gradient] : null;
21
+ const paintedStyle = gradientVars
22
+ ? {
23
+ ...style,
24
+ "--phi-control-gradient": `var(${gradientVars.paint})`,
25
+ "--phi-control-gradient-text": `var(${gradientVars.text})`,
26
+ }
27
+ : glass
28
+ /* Inline, as the Shell's panes frost: a `backdrop-filter` in a stylesheet does not survive the build. */
29
+ ? { ...style, backdropFilter: PHI_GLASS_BUTTON_FILTER, WebkitBackdropFilter: PHI_GLASS_BUTTON_FILTER }
30
+ : style;
31
+ const paintedClassName = [
32
+ className,
33
+ gradientVars ? "phi-btn-gradient" : null,
34
+ glass && !gradientVars ? "phi-btn-glass" : null,
35
+ ].filter(Boolean).join(" ") || undefined;
36
+ const button = (_jsx(Button, { ref: ref, className: paintedClassName, "aria-label": ariaLabel, "aria-pressed": ariaPressed, type: gradientVars ? "primary" : glass ? "default" : type, shape: shape, danger: danger, ghost: ghost, disabled: inert, loading: loading, htmlType: htmlType, block: block, size: size,
19
37
  /* Not a pointer target at all, so the Button's own hover and press states never start. */
20
- style: readOnly ? { ...style, pointerEvents: "none" } : style, "aria-disabled": readOnly || undefined, icon: icon, onClick: readOnly ? undefined : onClick, children: label }));
38
+ style: readOnly ? { ...paintedStyle, pointerEvents: "none" } : paintedStyle, "aria-disabled": readOnly || undefined, icon: icon, onClick: readOnly ? undefined : onClick, children: label }));
21
39
  /*
22
40
  * Through `PhiLink`, which is where this house decides between a client navigation and a plain
23
41
  * anchor -- and where `target="_blank"` and `rel` are one decision rather than two props that can
@@ -82,8 +82,10 @@ export function PhiColorControl({ value = null, defaultValue = "#f0f0f0", disabl
82
82
  */
83
83
  ...(children == null ? { width: "fit-content" } : {}),
84
84
  },
85
- popupOverlayInner: {
86
- padding: 12,
85
+ popup: {
86
+ container: {
87
+ padding: 12,
88
+ },
87
89
  },
88
90
  }, panelRender: (_, extra) => {
89
91
  const { Picker } = extra.components;
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  */
7
7
  import { useSyncExternalStore } from "react";
8
8
  import { Drawer } from "antd";
9
- import { PHI_SPACE } from "../../theme/antd-css-var-contract";
9
+ import { PHI_FONT_SIZE, PHI_SPACE } from "../../theme/antd-css-var-contract";
10
10
  import { PHI_OVERLAY_DEFAULT_MASK, resolvePhiOverlayDismissSource, resolvePhiOverlayMaskPresentation, } from "./phi-overlay-control-contract";
11
11
  const subscribeHydration = () => () => undefined;
12
12
  const PHI_DRAWER_HEADER_MIN_BLOCK_SIZE = `calc(var(--ant-control-height) + ${PHI_SPACE.xs} + ${PHI_SPACE.xs})`;
@@ -51,7 +51,8 @@ export function PhiDrawerControlAdapter({ open, title, header, body, footer, clo
51
51
  padding: 0,
52
52
  background: "transparent",
53
53
  },
54
- title: { width: "100%", minWidth: 0 },
54
+ // The title in the body's size, as a Modal's is (theme/phi-theme.ts); Ant Design sets a Drawer's at `lg`.
55
+ title: { width: "100%", minWidth: 0, fontSize: PHI_FONT_SIZE.base, lineHeight: "var(--ant-line-height)" },
55
56
  close: {
56
57
  position: "absolute",
57
58
  top: "50%",
@@ -71,7 +71,7 @@ export function PhiPillDropdownControl({ items, selectedKeys, open, onOpenChange
71
71
  return (_jsx(PhiDropdownControl, { items: items, selectedKeys: selectedKeys, open: open, onOpenChange: onOpenChange, children: _jsxs("button", { ref: triggerRef, type: "button", className: ["phi-dropdown-control", className].filter(Boolean).join(" "), style: {
72
72
  display: "inline-flex",
73
73
  alignItems: "center",
74
- gap: 8,
74
+ gap: "var(--ant-padding-xs)",
75
75
  fontSize: "inherit",
76
76
  color: "inherit",
77
77
  background: "transparent",
@@ -79,5 +79,5 @@ export function PhiPillDropdownControl({ items, selectedKeys, open, onOpenChange
79
79
  padding: 0,
80
80
  cursor: canOpen ? "pointer" : "default",
81
81
  ...style,
82
- }, "aria-haspopup": canOpen ? "menu" : undefined, onMouseEnter: onIntent, onFocus: onIntent, onClick: onIntent, children: [leading, hasLabel && pill ? (_jsx("span", { className: "phi-dropdown-control__pill", children: _jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: 5 }, children: [_jsx("span", { children: label }), chevron] }) })) : (_jsxs(_Fragment, { children: [hasLabel ? _jsx("span", { children: label }) : null, chevron] }))] }) }));
82
+ }, "aria-haspopup": canOpen ? "menu" : undefined, onMouseEnter: onIntent, onFocus: onIntent, onClick: onIntent, children: [leading, hasLabel && pill ? (_jsx("span", { className: "phi-dropdown-control__pill", children: _jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: "var(--ant-padding-xxs)" }, children: [_jsx("span", { children: label }), chevron] }) })) : (_jsxs(_Fragment, { children: [hasLabel ? _jsx("span", { children: label }) : null, chevron] }))] }) }));
83
83
  }
@@ -46,7 +46,13 @@ export function PhiInlineTextEditor({ value, onChange, onCommit, onCancel, onFoc
46
46
  * At one column it is the smallest thing in the box and the text is the widest, which is the
47
47
  * order this field is built on; it is also the width an empty field keeps.
48
48
  */
49
- cols: fitContent ? 1 : undefined, style: fitContent ? { width: "100%", overflow: "hidden" } : { width: "100%" }, inputStyle: inputStyle, onChange: (nextValue) => onChange(nextValue ?? ""), onFocus: onFocus, onBlur: (event) => {
49
+ cols: fitContent ? 1 : undefined,
50
+ /*
51
+ * `overflowX` and `overflowY`, not the `overflow` shorthand: while it measures, the text area's
52
+ * `autoSize` sets both longhands and takes them away again, and React warns when a longhand
53
+ * leaves beside its shorthand -- the shorthand would not be written back.
54
+ */
55
+ style: fitContent ? { width: "100%", overflowX: "hidden", overflowY: "hidden" } : { width: "100%" }, inputStyle: inputStyle, onChange: (nextValue) => onChange(nextValue ?? ""), onFocus: onFocus, onBlur: (event) => {
50
56
  const shouldCommit = !cancelPendingRef.current;
51
57
  cancelPendingRef.current = false;
52
58
  if (shouldCommit) {
@@ -20,7 +20,7 @@ export function PhiLengthControl({ value, label, placeholder, min, max, step, pr
20
20
  * is kept shut and its change ignored instead.
21
21
  */
22
22
  const controlDisabled = disabled || (!onChange && !readOnly);
23
- const control = (_jsxs(PhiCompactGroupControl, { block: true, size: size, style: { width: "100%", minWidth: 0, ...style }, children: [_jsx(InputNumber, { "aria-label": placeholder ?? label ?? "Length", controls: false, disabled: controlDisabled, readOnly: readOnly, min: min, max: max, step: step, precision: precision, placeholder: placeholder, value: part?.value ?? null, style: { flex: "1 1 0", minWidth: 0 }, onChange: (nextValue) => onChange?.(typeof nextValue === "number" ? serializePhiCssLength(nextValue, unit) : null) }), _jsx(Select, { "aria-label": `${placeholder ?? label ?? "Length"} unit`, disabled: controlDisabled, open: readOnly ? false : undefined, options: PHI_CSS_LENGTH_UNITS.map((option) => ({ value: option, label: option })), popupMatchSelectWidth: false, getPopupContainer: getPopupContainer, showSearch: false, suffixIcon: null, variant: "filled", value: unit, style: { flex: "0 0 38px", width: 38 }, styles: {
23
+ const control = (_jsxs(PhiCompactGroupControl, { block: true, size: size, style: { width: "100%", minWidth: 0, ...style }, children: [_jsx(InputNumber, { "aria-label": placeholder ?? label ?? "Length", controls: false, disabled: controlDisabled, readOnly: readOnly, min: min, max: max, step: step, precision: precision, placeholder: placeholder, value: part?.value ?? null, style: { flex: "1 1 0", minWidth: 0 }, onChange: (nextValue) => onChange?.(typeof nextValue === "number" ? serializePhiCssLength(nextValue, unit) : null) }), _jsx(Select, { "aria-label": `${placeholder ?? label ?? "Length"} unit`, disabled: controlDisabled, open: readOnly ? false : undefined, options: PHI_CSS_LENGTH_UNITS.map((option) => ({ value: option, label: option })), popupMatchSelectWidth: false, getPopupContainer: getPopupContainer, showSearch: false, suffix: null, variant: "filled", value: unit, style: { flex: "0 0 38px", width: 38 }, styles: {
24
24
  root: { paddingInline: 4 },
25
25
  content: { justifyContent: "center", textAlign: "center" },
26
26
  }, onChange: (nextUnit) => {
@@ -17,7 +17,8 @@ export function PhiMediaAssetTileControl({ asset, minColumnWidth, selected = fal
17
17
  const { token } = usePhiConfig();
18
18
  const compact = size === "small";
19
19
  const assetTileIconSize = compact ? 20 : 24;
20
- const assetTileLabelFontSize = compact ? token.fontSizeSM : token.fontSize;
20
+ // A tile's captions are labels, not body text: the small step of the scale at either tile size.
21
+ const assetTileLabelFontSize = token.fontSizeSM;
21
22
  const isSelectable = Boolean(onSelect) && !disabled;
22
23
  const isPublic = isPhiMediaAssetPublic(asset.deliveryPolicy, asset.lifecycleStatus);
23
24
  const isRestricted = !isPublic;
@@ -61,7 +62,7 @@ export function PhiMediaAssetTileControl({ asset, minColumnWidth, selected = fal
61
62
  position: "absolute",
62
63
  left: "0.375rem",
63
64
  top: "0.375rem",
64
- color: "#fff",
65
+ color: token.colorTextLightSolid,
65
66
  fontSize: assetTileLabelFontSize,
66
67
  lineHeight: 1,
67
68
  textShadow: "0 1px 2px rgba(0, 0, 0, 0.95), 0 0 4px rgba(0, 0, 0, 0.85)",
@@ -70,7 +71,7 @@ export function PhiMediaAssetTileControl({ asset, minColumnWidth, selected = fal
70
71
  position: "absolute",
71
72
  top: "0.375rem",
72
73
  right: "0.375rem",
73
- color: "#fff",
74
+ color: token.colorTextLightSolid,
74
75
  fontSize: assetTileLabelFontSize,
75
76
  lineHeight: 1,
76
77
  textShadow: "0 1px 2px rgba(0, 0, 0, 0.95), 0 0 4px rgba(0, 0, 0, 0.85)",
@@ -89,16 +90,16 @@ export function PhiMediaAssetTileControl({ asset, minColumnWidth, selected = fal
89
90
  color: token.colorTextLightSolid,
90
91
  fontSize: assetTileLabelFontSize,
91
92
  lineHeight: 1,
92
- }, children: asset.title ?? asset.originalName }) })] }), showTypeLabel || showDeleteAction ? (_jsxs(Flex, { align: "center", justify: "space-between", gap: token.paddingXS, wrap: true, style: {
93
+ }, children: asset.title ?? asset.originalName }) })] }), showTypeLabel || showDeleteAction ? (_jsxs(Flex, { align: "center", justify: "space-between", gap: token.paddingXS, style: {
93
94
  minHeight: token.controlHeightSM,
94
95
  paddingInline: compact ? token.paddingXS : token.paddingSM,
95
- background: "rgba(255, 255, 255, 0.78)",
96
- }, children: [showTypeLabel ? (_jsx(Typography.Text, { ellipsis: true, style: {
96
+ }, children: [showTypeLabel ? (_jsx(Typography.Text, { ellipsis: { tooltip: resolvePhiMediaAssetTypeLabel(asset.kind, asset.contentType, asset.originalName) }, style: {
97
97
  display: "block",
98
+ flex: "1 1 auto",
98
99
  minWidth: 0,
99
- color: "rgba(0, 0, 0, 0.88)",
100
+ color: token.colorText,
100
101
  fontSize: assetTileLabelFontSize,
101
- }, children: resolvePhiMediaAssetTypeLabel(asset.kind, asset.contentType, asset.originalName) })) : _jsx("span", {}), showDeleteAction && onDelete ? (_jsx("span", { onClick: (event) => event.stopPropagation(), onKeyDown: (event) => event.stopPropagation(), children: _jsx(PhiButtonControl, { ariaLabel: deleteLabel, icon: _jsx(PhiIcon, { name: "delete", size: "inherit" }), type: "text", size: "small", danger: true, loading: deleting, disabled: disabled, onClick: () => onDelete(asset) }) })) : null] })) : null] }));
102
+ }, children: resolvePhiMediaAssetTypeLabel(asset.kind, asset.contentType, asset.originalName) })) : _jsx("span", {}), showDeleteAction && onDelete ? (_jsx("span", { style: { flex: "none" }, onClick: (event) => event.stopPropagation(), onKeyDown: (event) => event.stopPropagation(), children: _jsx(PhiButtonControl, { ariaLabel: deleteLabel, icon: _jsx(PhiIcon, { name: "delete", size: "inherit" }), type: "text", size: "small", danger: true, loading: deleting, disabled: disabled, onClick: () => onDelete(asset) }) })) : null] })) : null] }));
102
103
  }
103
104
  export function PhiMediaAssetCollectionSkeletonControl({ mode, gap, minColumnWidth, active = true, count = 10, size = "medium", }) {
104
105
  const { token } = usePhiConfig();
@@ -120,11 +121,10 @@ export function PhiMediaAssetCollectionSkeletonControl({ mode, gap, minColumnWid
120
121
  }, children: _jsx(PhiSkeletonControl, { presentation: "input", active: active, fill: true, style: { display: "block", maxWidth: "100%", borderRadius: 0 } }) }), _jsxs(Flex, { style: {
121
122
  minHeight: token.controlHeightSM,
122
123
  paddingInline: compact ? token.paddingXS : token.paddingSM,
123
- background: "rgba(255, 255, 255, 0.78)",
124
124
  }, align: "center", justify: "space-between", gap: token.paddingXS, children: [_jsx(PhiSkeletonControl, { presentation: "input", active: active, size: "small", style: {
125
125
  width: "55%",
126
126
  minWidth: 0,
127
- height: token.fontSize * token.lineHeight,
127
+ height: token.fontSizeSM * token.lineHeightSM,
128
128
  } }), _jsx(PhiSkeletonControl, { presentation: "button", active: active, size: "small", shape: "circle", style: {
129
129
  width: token.controlHeightSM,
130
130
  minWidth: token.controlHeightSM,
@@ -1,4 +1,5 @@
1
1
  import type { ProgressProps } from "antd";
2
+ import { type PhiThemeGradientKey } from "../../theme/phi-theme-gradients";
2
3
  /**
3
4
  * How far along something is.
4
5
  *
@@ -11,5 +12,12 @@ import type { ProgressProps } from "antd";
11
12
  * about a percentage is specific to uploading, and the next caller that shows one of something else
12
13
  * would have had to widen it or write a second one.
13
14
  */
14
- export type PhiProgressControlProps = ProgressProps;
15
- export declare function PhiProgressControl(props: PhiProgressControlProps): import("react").JSX.Element;
15
+ export type PhiProgressControlProps = ProgressProps & {
16
+ /**
17
+ * A Theme gradient slot the bar is filled with. A line bar only: Ant Design paints a line's stroke as a
18
+ * CSS background, which takes the slot's custom property, while a circle draws an SVG stroke that can
19
+ * take a colour only -- there the bar keeps the colour it is given.
20
+ */
21
+ gradient?: PhiThemeGradientKey;
22
+ };
23
+ export declare function PhiProgressControl({ gradient, ...props }: PhiProgressControlProps): import("react").JSX.Element;
@@ -1,6 +1,10 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { Progress } from "antd";
4
- export function PhiProgressControl(props) {
5
- return _jsx(Progress, { ...props });
4
+ import { PHI_THEME_GRADIENT_CSS_VARS } from "../../theme/phi-theme-gradients";
5
+ export function PhiProgressControl({ gradient, ...props }) {
6
+ const lineGradient = gradient && (props.type ?? "line") === "line"
7
+ ? `var(${PHI_THEME_GRADIENT_CSS_VARS[gradient].paint})`
8
+ : undefined;
9
+ return _jsx(Progress, { ...props, ...(lineGradient ? { strokeColor: lineGradient } : {}) });
6
10
  }
@@ -1,14 +1,25 @@
1
- import type { CSSProperties, ReactNode } from "react";
1
+ import type { CSSProperties, MouseEventHandler, ReactNode } from "react";
2
+ import { type PhiThemeGradientKey } from "../../theme/phi-theme-gradients";
2
3
  export type PhiRibbonControlProps = {
3
4
  children: ReactNode;
4
5
  /** The band's ground; absent, the Theme's primary. Its words are the light text on any ground. */
5
6
  color?: string;
7
+ /** A Theme gradient slot to fill the band with instead; its words then take the slot's text colour. */
8
+ gradient?: PhiThemeGradientKey;
6
9
  /**
7
10
  * Where the band stands: `corner` flush with the box's top and end edge, its top end corner the box's
8
11
  * own; `edge` a small padding down the end edge. Either way it floats: nothing in the box moves for it.
9
12
  */
10
13
  placement?: "corner" | "edge";
11
14
  style?: CSSProperties;
15
+ /**
16
+ * The band's whole words, shown on hover when its ellipsis cut them short (`PhiTruncatedHoverText`).
17
+ * A band with a hover text takes the pointer, so it needs `onClick` to hand a click on to what lies
18
+ * under it.
19
+ */
20
+ fullText?: string;
21
+ /** What a click on the band does, for a band that takes the pointer: the box's own click, passed on. */
22
+ onClick?: MouseEventHandler<HTMLSpanElement>;
12
23
  };
13
24
  /**
14
25
  * A band of words at the end edge of a box: "Popular", "New", "-20 %".
@@ -23,7 +34,8 @@ export type PhiRibbonControlProps = {
23
34
  * box's top inset it was too thin to read. In the corner it stands over the inset and a little into the
24
35
  * first line's end, which a long eyebrow in a narrow box can reach.
25
36
  *
26
- * It sits above what the box draws, the highlight's ring included, and takes no clicks, so a card that
27
- * is a link stays one under its band.
37
+ * It sits above what the box draws, the highlight's ring included. Without a hover text it takes no
38
+ * clicks, so a card that is a link stays one under its band; with one it has to take the pointer to be
39
+ * pointed at, and hands a click on through `onClick`.
28
40
  */
29
- export declare function PhiRibbonControl({ children, color, placement, style }: PhiRibbonControlProps): import("react").JSX.Element;
41
+ export declare function PhiRibbonControl({ children, color, gradient, placement, style, fullText, onClick }: PhiRibbonControlProps): import("react").JSX.Element;