aravint-ui-navigation 1.0.67 → 1.0.69

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.
package/Readme.md CHANGED
@@ -265,16 +265,7 @@ by dividers (e.g. PNC/RDR detail header, ticket summary, order details).
265
265
  ## Usage
266
266
 
267
267
  ```tsx
268
- import { DetailRow, SummaryDetailsCard } from "@digitus-fci-oa/navigation";
269
-
270
-
271
-
272
- ## Import Styles
273
-
274
- Import the stylesheet once in your application's global CSS file (e.g. `index.css` or `App.css`).
275
-
276
- ```css
277
- @import "@digitus-fci-oa/navigation/dist/navigation.css";
268
+ import { DetailRow, SummaryDetailsCard } from "@digitus-fci-oa/navigation";
278
269
 
279
270
  const rows: DetailRow[] = [
280
271
  [
@@ -303,6 +294,60 @@ const rows: DetailRow[] = [
303
294
  />
304
295
  ```
305
296
 
297
+ `value` accepts a `ReactNode`, so a field can render client-provided JSX such as a table. Use `span` to control the field width; with four columns, a one-column summary field beside a three-column table matches layouts such as a charge summary:
298
+
299
+ ```tsx
300
+ const charges = [
301
+ { range: 'From 1kg to 44 Kg', rate: '1.31' },
302
+ { range: 'From 45kg to 99kg', rate: '1.31' },
303
+ { range: 'From 100kg to 249kg', rate: '1.31' },
304
+ ];
305
+
306
+ const airFreightRows: DetailRow[] = [
307
+ [
308
+ { label: 'Minimum Charge', value: '150.00' },
309
+ {
310
+ label: '',
311
+ span: 3,
312
+ value: (
313
+ <div className="air-freight-table-wrap">
314
+ <table className="air-freight-table">
315
+ <tbody>
316
+ {charges.map(({ range, rate }) => (
317
+ <tr key={range}>
318
+ <td>{range}</td>
319
+ <td>{rate}</td>
320
+ </tr>
321
+ ))}
322
+ </tbody>
323
+ </table>
324
+ </div>
325
+ ),
326
+ },
327
+ ],
328
+ ];
329
+
330
+ <SummaryDetailsCard rows={airFreightRows} columns={4} title="Air Freight Charges" />
331
+ ```
332
+
333
+ Style custom content in the consuming app. For example:
334
+
335
+ ```css
336
+ .air-freight-table-wrap {
337
+ overflow-x: auto;
338
+ }
339
+
340
+ .air-freight-table {
341
+ width: 100%;
342
+ border-collapse: collapse;
343
+ }
344
+
345
+ .air-freight-table td {
346
+ border: 1px solid #e5e7eb;
347
+ padding: 0.5rem;
348
+ }
349
+ ```
350
+
306
351
  ## Props
307
352
 
308
353
  | Prop | Type | Default | Description |
@@ -320,7 +365,7 @@ const rows: DetailRow[] = [
320
365
  | Prop | Type | Default | Description |
321
366
  | ------- | ------------------- | ----------- | ------------------------------------------------------------------------------------ |
322
367
  | `label` | `string` | — | Small uppercase label |
323
- | `value` | `ReactNode` | — | The value to display |
368
+ | `value` | `ReactNode` | — | Value to display. Strings/numbers use the component's text behavior; JSX such as tables renders directly. |
324
369
  | `valueColor` | `CSSProperties['color']` | — | Optional CSS color for this field's value |
325
370
  | `size` | `'default' \| 'lg'` | `'default'` | `'lg'` for hero fields like Title/Remark |
326
371
  | `span` | `1 \| 2 \| 3 \| 4` | `1` | How many of the 4 grid columns this field occupies (desktop/tablet — mobile is always full width) |