@phis/ui 0.8.2 → 0.8.3

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 (151) hide show
  1. package/components/calendar/gregory-calendar-adapter-client.js +1 -0
  2. package/components/controls/phi-accordion-control.d.ts +6 -0
  3. package/components/controls/phi-accordion-control.js +8 -13
  4. package/components/controls/phi-background-control.js +2 -5
  5. package/components/controls/phi-builder-insert-picker-control-labels.d.ts +2 -0
  6. package/components/controls/phi-builder-insert-picker-control-labels.js +1 -0
  7. package/components/controls/phi-builder-insert-picker-control.js +10 -11
  8. package/components/controls/phi-cascader-control.d.ts +9 -3
  9. package/components/controls/phi-cascader-control.js +38 -10
  10. package/components/controls/phi-checkbox-group-control.d.ts +3 -1
  11. package/components/controls/phi-checkbox-group-control.js +2 -2
  12. package/components/controls/phi-collapse-control.d.ts +9 -2
  13. package/components/controls/phi-collapse-control.js +14 -2
  14. package/components/controls/phi-color-control.d.ts +3 -1
  15. package/components/controls/phi-color-control.js +2 -2
  16. package/components/controls/phi-color-field-control.d.ts +6 -1
  17. package/components/controls/phi-color-field-control.js +2 -2
  18. package/components/controls/phi-confirm-control.d.ts +1 -1
  19. package/components/controls/phi-confirm-control.js +71 -2
  20. package/components/controls/phi-confirm-dialog.js +2 -1
  21. package/components/controls/phi-date-picker-control.js +1 -1
  22. package/components/controls/phi-dimension-control.d.ts +3 -1
  23. package/components/controls/phi-dimension-control.js +2 -2
  24. package/components/controls/phi-geometry-control.js +1 -1
  25. package/components/controls/phi-length-control.d.ts +6 -1
  26. package/components/controls/phi-length-control.js +3 -2
  27. package/components/controls/phi-multi-select-control.d.ts +6 -1
  28. package/components/controls/phi-multi-select-control.js +3 -3
  29. package/components/controls/phi-segmented-control.d.ts +6 -1
  30. package/components/controls/phi-segmented-control.js +3 -3
  31. package/components/controls/phi-switch-control.d.ts +3 -1
  32. package/components/controls/phi-switch-control.js +3 -3
  33. package/components/controls/phi-table-control.d.ts +8 -1
  34. package/components/controls/phi-table-control.js +8 -2
  35. package/components/forms/compound-form-controls.js +16 -1
  36. package/components/layouts/clients/phi-collapsible-layout-client.js +2 -6
  37. package/components/media/media-widget-labels.d.ts +2 -0
  38. package/components/media/media-widget-labels.js +2 -0
  39. package/components/media/phi-asset-inspector-section.js +19 -1
  40. package/components/regions/presets/phi-area-shell-preset-nodes.js +2 -0
  41. package/components/shell/phi-builder-icon.js +9 -1
  42. package/components/tables/phi-table-surface.d.ts +25 -0
  43. package/components/tables/phi-table-surface.js +25 -0
  44. package/components/widgets/builder/phi-static-rows-editor.js +4 -1
  45. package/components/widgets/client/shared/phi-choice-controller.d.ts +8 -1
  46. package/components/widgets/client/shared/phi-choice-controller.js +16 -1
  47. package/components/widgets/config/choice-shared.d.ts +2 -0
  48. package/components/widgets/config/choice-shared.js +1 -0
  49. package/components/widgets/config/image-variant-options.d.ts +4 -1
  50. package/components/widgets/config/image-variant-options.js +27 -14
  51. package/components/widgets/inspector-field-row.d.ts +14 -1
  52. package/components/widgets/inspector-field-row.js +21 -1
  53. package/components/widgets/label-sets/builder-chrome.js +2 -0
  54. package/components/widgets/label-sets/inspector.js +10 -0
  55. package/components/widgets/label-sets/security.js +2 -0
  56. package/components/widgets/label-types/inspector.d.ts +5 -0
  57. package/components/widgets/label-types/inspector.js +5 -0
  58. package/components/widgets/label-types/security.d.ts +2 -0
  59. package/components/widgets/signals/signal-endpoint-list.js +4 -1
  60. package/helpers/cms-inspector-drawer.d.ts +15 -0
  61. package/helpers/cms-inspector-drawer.js +37 -0
  62. package/helpers/cms-layout-defaults.js +1 -1
  63. package/helpers/preset-tree-contract-check.js +56 -0
  64. package/helpers/text-source.js +2 -0
  65. package/package.json +4 -4
  66. package/plugins/runtime-modules/accounting/definition.d.ts +1 -1
  67. package/plugins/runtime-modules/accounting/definition.js +0 -1
  68. package/plugins/runtime-modules/accounting/ids.d.ts +4 -4
  69. package/plugins/runtime-modules/accounting/ids.js +4 -2
  70. package/plugins/runtime-modules/accounting/module.d.ts +1 -1
  71. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +2 -1
  72. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +5 -4
  73. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +80 -38
  74. package/plugins/runtime-modules/admin/definition.d.ts +1 -1
  75. package/plugins/runtime-modules/admin/definition.js +0 -1
  76. package/plugins/runtime-modules/admin/module.d.ts +1 -1
  77. package/plugins/runtime-modules/app/definition.d.ts +1 -1
  78. package/plugins/runtime-modules/app/definition.js +0 -1
  79. package/plugins/runtime-modules/app/module.d.ts +1 -1
  80. package/plugins/runtime-modules/area-base-definition.d.ts +19 -1
  81. package/plugins/runtime-modules/area-base-definition.js +18 -0
  82. package/plugins/runtime-modules/area-definitions.d.ts +8 -8
  83. package/plugins/runtime-modules/area-definitions.js +4 -3
  84. package/plugins/runtime-modules/area-root-route.d.ts +8 -0
  85. package/plugins/runtime-modules/area-root-route.js +11 -1
  86. package/plugins/runtime-modules/asset/labels.js +4 -0
  87. package/plugins/runtime-modules/asset/metadata-form.d.ts +0 -28
  88. package/plugins/runtime-modules/asset/metadata-form.js +6 -10
  89. package/plugins/runtime-modules/asset/services/options.d.ts +3 -2
  90. package/plugins/runtime-modules/asset/services/options.js +4 -3
  91. package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +2 -1
  92. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +3 -3
  93. package/plugins/runtime-modules/auth/widgets/security/client.js +2 -2
  94. package/plugins/runtime-modules/builder/addresses.d.ts +1 -1
  95. package/plugins/runtime-modules/builder/addresses.js +1 -1
  96. package/plugins/runtime-modules/builder/area-settings-form.js +1 -1
  97. package/plugins/runtime-modules/builder/clients/inspector-condition-group.d.ts +16 -0
  98. package/plugins/runtime-modules/builder/clients/inspector-condition-group.js +9 -0
  99. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +97 -10
  100. package/plugins/runtime-modules/builder/clients/pages-header.js +7 -6
  101. package/plugins/runtime-modules/builder/clients/region-visibility-fields.js +1 -1
  102. package/plugins/runtime-modules/builder/controller/workspace-controller.js +7 -4
  103. package/plugins/runtime-modules/builder/definition.d.ts +1 -1
  104. package/plugins/runtime-modules/builder/definition.js +0 -1
  105. package/plugins/runtime-modules/builder/offered-page-catalog.d.ts +10 -4
  106. package/plugins/runtime-modules/builder/offered-page-catalog.js +35 -8
  107. package/plugins/runtime-modules/builder/page-meta-form.js +5 -2
  108. package/plugins/runtime-modules/builder/plugin-meta-labels.js +8 -0
  109. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +4 -2
  110. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +20 -13
  111. package/plugins/runtime-modules/builder/workspace-catalog-actions.js +8 -1
  112. package/plugins/runtime-modules/cdn/trees/phi-default-admin-cdn-page-tree.js +26 -14
  113. package/plugins/runtime-modules/core/authoring-widgets.js +2 -1
  114. package/plugins/runtime-modules/core/messaging/label-defaults.d.ts +49 -0
  115. package/plugins/runtime-modules/core/messaging/label-defaults.js +48 -0
  116. package/plugins/runtime-modules/core/messaging/labels.d.ts +2 -28
  117. package/plugins/runtime-modules/core/messaging/labels.js +52 -23
  118. package/plugins/runtime-modules/core/widgets/card/config.d.ts +14 -0
  119. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +14 -0
  120. package/plugins/runtime-modules/core/widgets/description/config.d.ts +14 -0
  121. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +14 -0
  122. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +14 -0
  123. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +14 -0
  124. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +14 -0
  125. package/plugins/runtime-modules/core/widgets/result/config.d.ts +14 -0
  126. package/plugins/runtime-modules/core/widgets/select-box/client.js +13 -4
  127. package/plugins/runtime-modules/core/widgets/select-box/config.js +1 -0
  128. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +14 -0
  129. package/plugins/runtime-modules/core/widgets/table/client.js +11 -4
  130. package/plugins/runtime-modules/core/widgets/table/config.d.ts +1 -1143
  131. package/plugins/runtime-modules/core/widgets/table/config.js +144 -125
  132. package/plugins/runtime-modules/core/widgets/thread-conversation/authoring.d.ts +2 -0
  133. package/plugins/runtime-modules/core/widgets/thread-conversation/authoring.js +76 -0
  134. package/plugins/runtime-modules/core/widgets/thread-conversation/client.d.ts +44 -1
  135. package/plugins/runtime-modules/core/widgets/thread-conversation/client.js +28 -13
  136. package/plugins/runtime-modules/editor/definition.d.ts +1 -1
  137. package/plugins/runtime-modules/editor/definition.js +0 -1
  138. package/plugins/runtime-modules/editor/module.d.ts +1 -1
  139. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +16 -8
  140. package/plugins/runtime-modules/public/definition.d.ts +1 -1
  141. package/plugins/runtime-modules/public/definition.js +0 -1
  142. package/plugins/runtime-modules/public/module.d.ts +1 -1
  143. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +109 -86
  144. package/plugins/runtime-modules/threads/controller/client.js +10 -12
  145. package/plugins/runtime-modules/threads/controller/definition.d.ts +6 -0
  146. package/plugins/runtime-modules/threads/controller/definition.js +17 -6
  147. package/styles/controls.css +49 -1
  148. package/styles/layout.css +3 -2
  149. package/types/calendar.d.ts +5 -0
  150. package/types/cms-plugins.d.ts +30 -10
  151. package/types/table-widget.d.ts +6 -0
@@ -428,9 +428,31 @@ h5.phi-typography, .phi-typography h5 {
428
428
  font-size: var(--phi-font-size);
429
429
  }
430
430
 
431
- /* The cover runs to the frame's outer edge and takes its upper corners when nothing sits above it. */
431
+ /*
432
+ * The arrow stands at the first line of an accordion section's title, whatever else the title holds: a
433
+ * swatch or a field beside the words makes the row taller than a line and centres the words in it, and a
434
+ * long title wraps. Neither the top (Ant Design's `flex-start`) nor the middle (`center`) is that line in
435
+ * both cases; the first baseline is. The arrow's box gets a baseline of its own from a zero-width space,
436
+ * so it lines up as a line of text would rather than by its bottom edge. Ant Design sets the alignment on
437
+ * `.ant-collapse > .ant-collapse-item > .ant-collapse-header`, which a single class loses to, so the rule
438
+ * names that path with the header's own class on it.
439
+ */
440
+ .ant-collapse > .ant-collapse-item > .ant-collapse-header.phi-accordion-control__header {
441
+ align-items: first baseline;
442
+ }
443
+
444
+ .phi-accordion-control__header > .ant-collapse-expand-icon::before {
445
+ content: "\200b";
446
+ }
447
+
448
+ /*
449
+ * The cover runs to the frame's outer edge and takes its upper corners when nothing sits above it. It
450
+ * clips what it holds: a picture is a box with an image inside, and a corner set on the box alone leaves
451
+ * the image square above it.
452
+ */
432
453
  .phi-card-control__cover {
433
454
  margin: calc(var(--phi-line-width) * -1) calc(var(--phi-line-width) * -1) 0;
455
+ overflow: hidden;
434
456
  }
435
457
 
436
458
  .phi-card-control__cover > * {
@@ -625,6 +647,32 @@ h5.phi-typography, .phi-typography h5 {
625
647
  background: var(--phi-table-footer-bg, var(--phi-color-fill-alter));
626
648
  }
627
649
 
650
+ /*
651
+ * A Table that states its Surface stands on that ground and on nothing of its own
652
+ * (`components/tables/phi-table-surface.ts`): the Table's box, its header, its footer, a summary row, the
653
+ * sticky header and a fixed column all take `--phi-table-surface-ground` -- `transparent` for "None", so
654
+ * only the row lines are left. The header and footer fills are Table variables and are set here, on the
655
+ * Table and on every element inside it that states the Table's variables again: a nested Theme scope does
656
+ * that on the wrapper and on the loading container by `.<scope>.ant-table-css-var`, which a single class
657
+ * here would tie with and lose to. The container ground is not a Table variable -- the Controls in the
658
+ * cells read it too -- so the elements that paint it are named. Row hover and selection keep their own
659
+ * fills: they answer the pointer, they are not the ground.
660
+ */
661
+ .phi-table-control.phi-table-control--surface[class~="ant-table-wrapper"],
662
+ .phi-table-control.phi-table-control--surface [class~="ant-table-css-var"] {
663
+ --phi-table-header-bg: var(--phi-table-surface-ground);
664
+ --phi-table-footer-bg: var(--phi-table-surface-ground);
665
+ }
666
+
667
+ .phi-table-control.phi-table-control--surface :is(
668
+ [class~="ant-table"],
669
+ [class~="ant-table-sticky-holder"],
670
+ [class~="ant-table-cell-fix"],
671
+ [class~="ant-table-placeholder"]:hover > td
672
+ ) {
673
+ background: var(--phi-table-surface-ground);
674
+ }
675
+
628
676
  .phi-table-control [class~="ant-table-pagination"][class~="ant-pagination"] {
629
677
  margin-block: var(--phi-padding-sm) 0 !important;
630
678
  }
package/styles/layout.css CHANGED
@@ -356,8 +356,9 @@
356
356
  /*
357
357
  * A label breaks inside a word rather than run past its cell. The cell keeps to its tracks (`min-width:
358
358
  * 0`), but the label's words are a flex item of their own, which is never narrower than its longest
359
- * word: in the label column of a one-column dialog -- a third of 377px -- "Type the Area key to
360
- * confirm" left the input a few pixels, and a longer word of a translation ran under the input.
359
+ * word: in the label column of a one-column dialog -- then a third of 377px, ten twenty-fourths now --
360
+ * "Type the Area key to confirm" left the input a few pixels, and a longer word of a translation ran
361
+ * under the input.
361
362
  */
362
363
  .phi-form-cell--label {
363
364
  display: flex;
@@ -144,6 +144,11 @@ export type PhiCalendarAdapterDatePickerProps = {
144
144
  * by the Control around the picker, so the adapter cannot know it otherwise.
145
145
  */
146
146
  ariaLabelledBy?: string;
147
+ /**
148
+ * The picker's accessible name where no visible label stands beside it, for its input's `aria-label`.
149
+ * The Control passes `ariaLabelledBy` only where this is absent.
150
+ */
151
+ ariaLabel?: string;
147
152
  onChange?: (selection: PhiTemporalSelection) => void;
148
153
  };
149
154
  export type PhiCalendarAdapterCalendarProps = {
@@ -77,22 +77,24 @@ export type PhiCmsConfigFieldChoicePresentation = "select" | "segmented" | "tabs
77
77
  /**
78
78
  * Where a collection is edited.
79
79
  *
80
- * `inline` stacks the entries down the Inspector column, which is right for as long as an entry is two
81
- * or three short fields.
82
- *
83
- * `overlay` leaves only what is in the collection at the field's place and opens an Overlay to edit it.
84
- * That is not a matter of taste: the Inspector column is narrow, and an entry carrying half a dozen
85
- * fields -- a table column with a key, a provider field, a title, a renderer, a width, an alignment --
86
- * becomes a column of truncated Controls in it. Which of the two a collection needs is known by the
87
- * collection and by nothing else, which is why it is declared here rather than decided by the Inspector
88
- * from the Widget type.
80
+ * A list is always edited in a dialog, never in the Inspector column (owner, 2026-11-25). `overlay`
81
+ * leaves a row at the field's place -- its label and an Edit button -- and opens an Overlay to edit the
82
+ * entries; what the collection holds is read there. The Inspector column is narrow, and an entry
83
+ * carrying half a dozen fields -- a table column with a key, a provider field, a title, a renderer, a
84
+ * width, an alignment -- becomes a column of truncated Controls in it; even a list of two short fields
85
+ * pushes every row under it down by its length. A collection inside an entry of an Overlay is edited
86
+ * in that Overlay, in place under its entry, and declares no presentation of its own.
89
87
  *
90
88
  * `select` shows one entry at a time: a select names the entry, and its fields stand under it. It adds
91
89
  * and removes nothing -- it is for a collection whose length is decided elsewhere, as a Command
92
90
  * Toolbar's buttons are counted on its scaffold -- and it keeps a column of identical cards from
93
91
  * growing with every entry when each one has the same handful of settings.
92
+ *
93
+ * A collection the Inspector shows declares one of the two; one edited on the canvas
94
+ * (`editorPlacement: "toolbar"`) declares neither. `scripts/validate-inspector-collections.ts` holds
95
+ * every first-party Widget and Layout to that.
94
96
  */
95
- export type PhiCmsConfigFieldCollectionPresentation = "inline" | "overlay" | "select";
97
+ export type PhiCmsConfigFieldCollectionPresentation = "overlay" | "select";
96
98
  export type PhiCmsConfigFieldChoiceMode = "single" | "multiple";
97
99
  /**
98
100
  * What a `choice` stores. A text or a list of texts is the rule; `number` is a closed list of numbers --
@@ -313,6 +315,24 @@ export type PhiCmsConfigField = (PhiCmsConfigFieldBase & {
313
315
  presentation?: PhiCmsConfigFieldCollectionPresentation;
314
316
  /** What the button that opens the Overlay says. */
315
317
  editLabel?: string;
318
+ }) | (PhiCmsConfigFieldBase & {
319
+ /**
320
+ * A group of conditions stored under `key` as one `PhiRuntimeConditionExpression` group,
321
+ * `{ match, conditions }`, edited as one field: its label and an Edit button, the group in an
322
+ * Overlay (inside another Overlay's entry, in place there). The Inspector writes only what the
323
+ * strict reader (`readPhiRuntimeConditionExpression`) accepts: the first condition added writes
324
+ * `match: "all"` with it, removing the last one removes `key` altogether, and a group the reader
325
+ * refuses -- a Controller condition without its address -- stays in the dialog, marked as not
326
+ * saved, until it is complete. Two separate fields for `match` and `conditions` wrote half-groups
327
+ * the reader refused, and the Widget failed to draw.
328
+ */
329
+ type: "condition-group";
330
+ /** The fields of one condition. */
331
+ conditionFields: PhiCmsConfigField[];
332
+ /** What a condition starts as when one is added. */
333
+ defaultCondition: Record<string, unknown>;
334
+ addLabel?: string;
335
+ emptyLabel?: string;
316
336
  }) | (PhiCmsConfigFieldBase & {
317
337
  /**
318
338
  * A Surface (`types/surface.ts`) of something the Widget draws inside itself -- each entry of a
@@ -6,6 +6,7 @@ import type { PhiRuntimeDataProviderKey } from "./runtime-data-provider";
6
6
  import type { PhiProviderDropMode, PhiProviderDropTargetCapability, PhiSignalRouteSet } from "./signals";
7
7
  import type { PhiRuntimeConditionExpression } from "./runtime-condition";
8
8
  import type { PhiLinkTarget } from "./references";
9
+ import type { PhiTableSurface } from "../components/tables/phi-table-surface";
9
10
  export type PhiTableRowIdentity = string | number;
10
11
  export type PhiTableSortDirection = "ascending" | "descending";
11
12
  export declare const PHI_TABLE_TAG_COLORS: readonly ["default", "success", "processing", "warning", "error", "magenta", "red", "volcano", "orange", "gold", "lime", "green", "cyan", "blue", "geekblue", "purple"];
@@ -379,6 +380,11 @@ export type PhiTableWidgetPresentation = PhiControlPresentationConfig & {
379
380
  };
380
381
  /** Lines around and between the cells. */
381
382
  borders?: boolean;
383
+ /**
384
+ * The Table's ground, from the Surface vocabulary (TABLES.md "Surface"): absent the Table's own, `null`
385
+ * none -- the row lines on whatever the Table stands on -- or a Surface of one ground colour.
386
+ */
387
+ surface?: PhiTableSurface;
382
388
  /** The header row; shown unless this says `false`. */
383
389
  header?: boolean;
384
390
  /** Whether the header row stays at the top while the rows scroll under it; on unless this says `false`. */