@factorialco/rjsf-f0 3.2.1 → 3.3.1

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -4,11 +4,9 @@ import { PairingTableProps } from './types';
4
4
  * The f0 drawing of a `ui:field: "pairing"` object. The SDK owns the rows,
5
5
  * the filter and the submitted values; this only lays them out: a header with
6
6
  * the counts, the "Needs a choice" filter (filled while on) and "Accept N
7
- * suggestions" (while any is pending), the table (Factorial record, a
8
- * searchable select of the other system's records, or a text input on a
9
- * free-text row, a status tag, and an
10
- * "Accept" action on rows showing a suggestion), and a footer with the select to add rows
11
- * not listed beside the note explaining which rows are.
7
+ * suggestions" (while any is pending), a table that takes the width it is
8
+ * given (the record's name wraps rather than being cut), and a footer with the
9
+ * select to add rows not listed beside the note explaining which rows are.
12
10
  * F0Button renders a `<button>` with no `type`, so its clicks must prevent the
13
11
  * default or they would submit the form.
14
12
  */
@@ -0,0 +1,14 @@
1
+ import { default as React } from '../../node_modules/@types/react';
2
+ import { PairingLabels, PairingTableRow } from './types';
3
+ /** The labels, choices and rows the pairing table tests share. */
4
+ export declare const labels: PairingLabels;
5
+ export declare const options: {
6
+ value: string;
7
+ label: string;
8
+ }[];
9
+ /** A row as the SDK hands it, needing a choice unless `extra` says otherwise. */
10
+ export declare const row: (id: string, extra?: Partial<PairingTableRow>) => PairingTableRow;
11
+ /** f0 draws nothing without its provider. */
12
+ export declare const InF0: ({ children }: {
13
+ children: React.ReactNode;
14
+ }) => React.JSX.Element;
package/dist/styles.css CHANGED
@@ -1059,8 +1059,9 @@
1059
1059
 
1060
1060
  /*
1061
1061
  * The pairing table (`ui:field: "pairing"`): a header with the counts and the
1062
- * bulk actions, an optional note, the f0 editable table, and the select that
1063
- * adds rows not listed.
1062
+ * bulk actions, the package's own table (`.rjsf-f0-pairing-table`, or the
1063
+ * empty note in its place), and a footer with the select that adds rows not
1064
+ * listed beside the optional in-use note.
1064
1065
  */
1065
1066
  /* `margin-top` parts the table from the section description above it. */
1066
1067
  .rjsf-f0-pairing {
@@ -1117,6 +1118,100 @@
1117
1118
  flex: 1 1 16rem;
1118
1119
  }
1119
1120
 
1121
+ /*
1122
+ * The table takes the width it is given: the record's name wraps instead of
1123
+ * being cut, the other system's select gets the most room, and the status
1124
+ * column holds the tag with its "Accept" beside it. Below ~40rem it scrolls
1125
+ * sideways rather than squeezing the controls.
1126
+ */
1127
+ .rjsf-f0-pairing-table-wrap {
1128
+ overflow-x: auto;
1129
+ border: 1px solid hsl(var(--neutral-10, 217 96% 11% / 0.1));
1130
+ border-radius: 0.75rem;
1131
+ }
1132
+
1133
+ .rjsf-f0-pairing-table {
1134
+ width: 100%;
1135
+ min-width: 40rem;
1136
+ border-collapse: collapse;
1137
+ table-layout: auto;
1138
+ font-size: 0.875rem;
1139
+ line-height: 1.25rem;
1140
+ }
1141
+
1142
+ .rjsf-f0-pairing-table th,
1143
+ .rjsf-f0-pairing-table td {
1144
+ padding: 0.5rem 1rem;
1145
+ text-align: left;
1146
+ vertical-align: middle;
1147
+ border-bottom: 1px solid hsl(var(--neutral-10, 217 96% 11% / 0.1));
1148
+ }
1149
+
1150
+ .rjsf-f0-pairing-table tbody tr:last-child th,
1151
+ .rjsf-f0-pairing-table tbody tr:last-child td {
1152
+ border-bottom: none;
1153
+ }
1154
+
1155
+ .rjsf-f0-pairing-table thead th {
1156
+ padding-block: 0.625rem;
1157
+ font-weight: 500;
1158
+ color: hsl(var(--neutral-50, 217 96% 11% / 0.61));
1159
+ white-space: nowrap;
1160
+ }
1161
+
1162
+ /* The record: f0's body text, wrapping on long names. */
1163
+ .rjsf-f0-pairing-table .rjsf-f0-pairing-record {
1164
+ width: 34%;
1165
+ font-weight: 500;
1166
+ overflow-wrap: anywhere;
1167
+ }
1168
+
1169
+ .rjsf-f0-pairing-value {
1170
+ width: 42%;
1171
+ min-width: 14rem;
1172
+ }
1173
+
1174
+ .rjsf-f0-pairing-control {
1175
+ display: flex;
1176
+ align-items: center;
1177
+ gap: 0.5rem;
1178
+ }
1179
+
1180
+ .rjsf-f0-pairing-hint {
1181
+ display: inline-flex;
1182
+ flex: none;
1183
+ width: 1.25rem;
1184
+ cursor: help;
1185
+ }
1186
+
1187
+ /* The hint takes focus so the keyboard opens its tooltip too. */
1188
+ .rjsf-f0-pairing-hint:focus-visible {
1189
+ outline: 2px solid hsl(var(--selected-50, 184 92% 35%));
1190
+ outline-offset: 1px;
1191
+ border-radius: 0.25rem;
1192
+ }
1193
+
1194
+ .rjsf-f0-pairing-input {
1195
+ flex: 1 1 auto;
1196
+ min-width: 0;
1197
+ }
1198
+
1199
+ /* The status and, on a suggested row, its "Accept" right beside it. */
1200
+ .rjsf-f0-pairing-state {
1201
+ white-space: nowrap;
1202
+ }
1203
+
1204
+ .rjsf-f0-pairing-state-inner {
1205
+ display: flex;
1206
+ align-items: center;
1207
+ gap: 0.5rem;
1208
+ }
1209
+
1210
+ .rjsf-f0-pairing-tag {
1211
+ display: inline-flex;
1212
+ cursor: help;
1213
+ }
1214
+
1120
1215
  /* The launch-one button, with its collapse toggle, a link, beside it. */
1121
1216
  .rjsf-f0-launch-assistant {
1122
1217
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/rjsf-f0",
3
- "version": "3.2.1",
3
+ "version": "3.3.1",
4
4
  "description": "Factorial f0 theme for react-jsonschema-form: renders RJSF forms with f0 components.",
5
5
  "type": "module",
6
6
  "homepage": "https://code.factorialhr.com/docs/forms/",