aravint-ui-navigation 1.0.40 → 1.0.41
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
|
@@ -217,4 +217,146 @@ const steps = [
|
|
|
217
217
|
- The first step is treated as the starting point.
|
|
218
218
|
- Completed steps display a check icon.
|
|
219
219
|
- `date` and `time` are optional for each step.
|
|
220
|
-
- When `showTime={false}`, only the date is displayed.
|
|
220
|
+
- When `showTime={false}`, only the date is displayed.
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
-----------------------------------------------------------------
|
|
224
|
+
# SummaryDetailsCard
|
|
225
|
+
|
|
226
|
+
Reusable, responsive summary card — rows of label/value fields separated
|
|
227
|
+
by dividers (e.g. PNC/RDR detail header, ticket summary, order details).
|
|
228
|
+
|
|
229
|
+
## Usage
|
|
230
|
+
|
|
231
|
+
```tsx
|
|
232
|
+
import { DetailRow, SummaryDetailsCard } from "@digitus-fci-oa/navigation";
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
## Import Styles
|
|
237
|
+
|
|
238
|
+
Import the stylesheet once in your application's global CSS file (e.g. `index.css` or `App.css`).
|
|
239
|
+
|
|
240
|
+
```css
|
|
241
|
+
@import "@digitus-fci-oa/navigation/dist/navigation.css";
|
|
242
|
+
|
|
243
|
+
const rows: DetailRow[] = [
|
|
244
|
+
[
|
|
245
|
+
{ label: 'Title', value: 'Title will be show here' },
|
|
246
|
+
{ label: 'Remark', value: 'Remark will be show here...'},
|
|
247
|
+
],
|
|
248
|
+
[
|
|
249
|
+
{ label: 'PNC Number', value: 'PNC-2026-0001' },
|
|
250
|
+
{ label: 'PNC Date', value: '26-06-2026 11:00AM' },
|
|
251
|
+
{ label: 'Requester', value: 'Prakash Kumar' },
|
|
252
|
+
{ label: 'Flag Name', value: 'M/L, F' },
|
|
253
|
+
],
|
|
254
|
+
[
|
|
255
|
+
{ label: 'Pending With', value: 'RoHS Team' },
|
|
256
|
+
{ label: 'Created On', value: '26-06-2026 11:00AM' },
|
|
257
|
+
{ label: 'Last Updated', value: '27-06-2026 10:00 AM' },
|
|
258
|
+
],
|
|
259
|
+
];
|
|
260
|
+
|
|
261
|
+
<SummaryDetailsCard rows={rows} />
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## Props
|
|
265
|
+
|
|
266
|
+
| Prop | Type | Default | Description |
|
|
267
|
+
| ----------- | ------------- | -------------- | ----------------------------------------------- |
|
|
268
|
+
| `rows` | `DetailRow[]` | — | Rows of fields, top to bottom, each row on its own divider-separated line |
|
|
269
|
+
| `className` | `string` | `'mt-2 mx-2'` | Extra classes on the outer card |
|
|
270
|
+
|
|
271
|
+
### Field (`DetailRow` = `DetailField[]`)
|
|
272
|
+
|
|
273
|
+
| Prop | Type | Default | Description |
|
|
274
|
+
| ------- | ------------------- | ----------- | ------------------------------------------------------------------------------------ |
|
|
275
|
+
| `label` | `string` | — | Small uppercase label |
|
|
276
|
+
| `value` | `ReactNode` | — | The value to display |
|
|
277
|
+
| `size` | `'default' \| 'lg'` | `'default'` | `'lg'` for hero fields like Title/Remark |
|
|
278
|
+
| `span` | `1 \| 2 \| 3 \| 4` | `1` | How many of the 4 grid columns this field occupies (desktop/tablet — mobile is always full width) |
|
|
279
|
+
|
|
280
|
+
## Layout
|
|
281
|
+
|
|
282
|
+
- Every row uses the same fixed 4-column grid, so fields stay aligned
|
|
283
|
+
across rows regardless of how many fields a row has.
|
|
284
|
+
- Below 640px, the grid collapses to a single column and every field
|
|
285
|
+
goes full width, regardless of its `span`.
|
|
286
|
+
- Styled with plain CSS (`SummaryDetailsCard.css`), not Tailwind
|
|
287
|
+
utilities, so it renders correctly no matter what the consuming app's
|
|
288
|
+
Tailwind (or non-Tailwind) setup looks like. Colors/spacing are
|
|
289
|
+
theme-able via CSS variables on `.summary-detail-card`.
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
------------------------------------------------------------------
|
|
294
|
+
# EmptyState
|
|
295
|
+
|
|
296
|
+
A reusable component for displaying an empty state message when no data or content is available.
|
|
297
|
+
|
|
298
|
+
## Features
|
|
299
|
+
|
|
300
|
+
- Reusable and customizable
|
|
301
|
+
- Optional icon support
|
|
302
|
+
- Custom title and description
|
|
303
|
+
- Supports additional CSS classes
|
|
304
|
+
- Responsive design using Tailwind CSS
|
|
305
|
+
|
|
306
|
+
## Props
|
|
307
|
+
|
|
308
|
+
| Prop | Type | Required | Description |
|
|
309
|
+
|------|------|----------|-------------|
|
|
310
|
+
| `title` | `string` | Yes | Title displayed in the empty state. |
|
|
311
|
+
| `description` | `string \| React.ReactNode` | Yes | Description displayed below the title. |
|
|
312
|
+
| `icon` | `React.ReactNode` | No | Optional icon or illustration. |
|
|
313
|
+
| `className` | `string` | No | Additional CSS classes for the container. |
|
|
314
|
+
|
|
315
|
+
## Usage
|
|
316
|
+
|
|
317
|
+
```tsx
|
|
318
|
+
import { EmptyState } from "@your-package/navigation";
|
|
319
|
+
|
|
320
|
+
<EmptyState
|
|
321
|
+
title="No Confirmation Received"
|
|
322
|
+
description="No confirmation has been received for this request yet. Once the respective team confirms the action, the details will be displayed here."
|
|
323
|
+
/>
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### With an Icon
|
|
327
|
+
|
|
328
|
+
```tsx
|
|
329
|
+
import { EmptyState } from "@digitus-fci-oa/navigation";
|
|
330
|
+
import { InfoIcon } from "./InfoIcon";
|
|
331
|
+
|
|
332
|
+
<EmptyState
|
|
333
|
+
icon={<InfoIcon />}
|
|
334
|
+
title="No Data Found"
|
|
335
|
+
description="There are no records available."
|
|
336
|
+
/>
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
## Example
|
|
340
|
+
|
|
341
|
+
```tsx
|
|
342
|
+
<EmptyState
|
|
343
|
+
title="No Confirmation Received"
|
|
344
|
+
description={
|
|
345
|
+
<>
|
|
346
|
+
No confirmation has been received for this request yet.
|
|
347
|
+
<br />
|
|
348
|
+
Once the respective team confirms the action, the details will be displayed here.
|
|
349
|
+
</>
|
|
350
|
+
}
|
|
351
|
+
/>
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
## Output
|
|
355
|
+
|
|
356
|
+
Displays a centered empty state containing:
|
|
357
|
+
- Optional icon
|
|
358
|
+
- Title
|
|
359
|
+
- Description
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
-----------------------------------------------------------------
|
package/dist/navigation.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),f=require("react");function E(s){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),f=require("react");function E(s){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(a,t,i.get?i:{enumerable:!0,get:()=>s[t]})}}return a.default=s,Object.freeze(a)}const k=E(f),D=({tabs:s,defaultValue:a,value:t,onValueChange:i,className:r="",tabListClassName:n="",tabButtonClassName:b="",contentClassName:p="",showTabNumbers:o=!0,showContent:c=!0,animated:h=!0})=>{var F;const d=t!==void 0,[_,y]=f.useState(a||((F=s[0])==null?void 0:F.id)||""),g=d?t:_,j=l=>{d||y(l),i==null||i(l)},v=s.find(l=>l.id===g),w={display:"flex",alignItems:"flex-end",borderBottom:"1px solid #059669",position:"sticky",top:0,zIndex:100,flexShrink:0},N={display:"flex",alignItems:"center",fontFamily:"inherit",background:"transparent",cursor:"pointer",outline:"none",transition:"all .2s ease",position:"relative"},x={background:"#E8F7F1",color:"#059669",fontWeight:700,borderTop:"3px solid #059669",borderLeft:"1px solid #059669",borderRight:"1px solid #059669",borderBottom:"1px solid #E8F7F1",borderTopLeftRadius:8,borderTopRightRadius:8,marginBottom:-1,zIndex:2},u={background:"transparent",color:"#2D3748",borderTop:"3px solid transparent",borderLeft:"1px solid transparent",borderRight:"1px solid transparent",borderBottom:"1px solid transparent",borderTopLeftRadius:8,borderTopRightRadius:8},m={background:"#ECFDF5",color:"#059669",fontWeight:700,border:"1px solid #059669"},R={background:"#FFFFFF",color:"#1F2937",fontWeight:"500",border:"1px solid #1F2937"},z={background:"#FFFFFF",border:"1px solid #D9E1E7",borderTop:"none",borderBottomLeftRadius:12,borderBottomRightRadius:12,boxShadow:"0 2px 6px rgba(0,0,0,.05)",transition:h?"opacity .2s ease":void 0,opacity:1,flex:1,overflowY:"auto",minHeight:0};return e.jsxs("div",{className:r,style:{display:"flex",flexDirection:"column",width:"100%",height:"100%",minHeight:0,overflow:"hidden"},children:[e.jsx("style",{children:`
|
|
2
2
|
.ctabs-list {
|
|
3
3
|
padding: 0 10px;
|
|
4
4
|
gap: 0px;
|
|
@@ -72,4 +72,4 @@
|
|
|
72
72
|
font-size: 10px;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
`}),e.jsx("div",{style:w,className:`ctabs-list ${n}`,children:s.map((l,B)=>{const S=g===l.id;return e.jsxs("button",{role:"tab","aria-selected":S,disabled:l.disabled,onClick:()=>!l.disabled&&j(l.id),style:{...N,...S?x:u,opacity:l.disabled?.5:1,cursor:l.disabled?"not-allowed":"pointer"},className:`ctabs-btn ${b}`,children:[o&&e.jsx("span",{className:"ctabs-badge",style:S?m:R,children:B+1}),l.icon,e.jsx("span",{className:"ctabs-label",children:l.label})]},l.id)})}),c&&v&&e.jsx("div",{style:z,className:p,children:v.content})]})},L=s=>k.createElement("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},k.createElement("path",{d:"M2 6.2L4.6 8.8L10 3",stroke:"#ffffff",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),T=f.memo(({computed:s,showTime:a})=>{const{step:t,index:
|
|
75
|
+
`}),e.jsx("div",{style:w,className:`ctabs-list ${n}`,children:s.map((l,B)=>{const S=g===l.id;return e.jsxs("button",{role:"tab","aria-selected":S,disabled:l.disabled,onClick:()=>!l.disabled&&j(l.id),style:{...N,...S?x:u,opacity:l.disabled?.5:1,cursor:l.disabled?"not-allowed":"pointer"},className:`ctabs-btn ${b}`,children:[o&&e.jsx("span",{className:"ctabs-badge",style:S?m:R,children:B+1}),l.icon,e.jsx("span",{className:"ctabs-label",children:l.label})]},l.id)})}),c&&v&&e.jsx("div",{style:z,className:p,children:v.content})]})},L=s=>k.createElement("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},k.createElement("path",{d:"M2 6.2L4.6 8.8L10 3",stroke:"#ffffff",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),T=f.memo(({computed:s,showTime:a})=>{const{step:t,index:i,status:r}=s,n=["rs-stepper__circle",r==="completed"?"rs-stepper__circle--completed":"",r==="active"?"rs-stepper__circle--active":""].filter(Boolean).join(" "),b=["rs-stepper__title",r==="pending"?"rs-stepper__title--pending":"",r==="active"?"rs-stepper__title--active":""].filter(Boolean).join(" "),p=i!==0;return e.jsxs("div",{className:"rs-stepper__step",children:[e.jsxs("div",{className:"rs-stepper__circle-wrap",children:[e.jsx("div",{className:n,children:p?i:null}),r==="completed"&&e.jsx("span",{className:"rs-stepper__check","aria-hidden":"true",children:e.jsx(L,{})})]}),e.jsx("div",{className:b,children:t.title}),t.date&&e.jsx("div",{className:"rs-stepper__date",children:t.date}),a&&t.time&&e.jsx("div",{className:"rs-stepper__time",children:t.time})]})});T.displayName="StepCircle";const C=({steps:s,currentStep:a,completedColor:t="#059669",pendingColor:i="#9ca3af",activeColor:r="#059669",lineColor:n="#e5e7eb",showTime:b=!0,orientation:p="responsive"})=>{const o=s.length,c=a>o,h=Math.max(1,Math.min(a,o)),d=c?Math.max(0,o-1):Math.max(0,Math.min(o-1,h-1)),_=f.useMemo(()=>s.map((x,u)=>{let m="pending";return c||u<d?m="completed":u===d&&(m="active"),{step:x,index:u,status:m}}),[s,d,c]),y=o>0?100/o/2:0,g=o>1?c?100:d/(o-1)*100:0,j=c||h>1?t:n,v=c||h>o?t:n,w={"--rs-completed-color":t,"--rs-pending-color":i,"--rs-active-color":r,"--rs-line-color":n,"--rs-half-step":`${y}%`,"--rs-progress":`${g}%`,"--rs-left-side-color":j,"--rs-right-side-color":v};if(o===0)return null;const N=p==="vertical"?"rs-stepper--vertical":p==="horizontal"?"rs-stepper--horizontal":"rs-stepper--responsive";return e.jsxs("div",{className:"border border-[#E5E7EB] py-2 mx-2 rounded-lg bg-[#F9FAFB] shadow-[0px_2px_4px_-1px_#00000008,0px_4px_6px_-1px_#0000000D]",children:[e.jsx("div",{className:"pl-2 pt-2 pb-3 text-[14px] font-bold",children:"Workflow Progress"}),e.jsx("div",{className:`rs-stepper ${N}`,style:w,children:e.jsx("div",{className:"rs-stepper__scroll",children:e.jsxs("div",{className:"rs-stepper__row",children:[e.jsx("div",{className:"rs-stepper__track",children:e.jsx("div",{className:"rs-stepper__progress"})}),_.map(x=>e.jsx(T,{computed:x,showTime:b},x.step.id))]})})})]})},M=f.memo(C),I=({rows:s,className:a="mt-2 mx-2"})=>e.jsx("div",{className:`summary-detail-card ${a}`.trim(),children:s.map((t,i)=>e.jsx("div",{className:"summary-detail-card__row",children:t.map((r,n)=>e.jsxs("div",{className:"summary-detail-card__field",style:{"--dc-span":r.span??1},children:[e.jsx("p",{className:"summary-detail-card__label",children:r.label}),e.jsx("p",{className:`summary-detail-card__value${r.size==="lg"?" summary-detail-card__value--lg":""}`,children:r.value})]},n))},i))}),$=({title:s,description:a,icon:t,className:i="",children:r})=>e.jsxs("div",{className:`flex flex-col items-center justify-center py-4 px-4 text-center ${i}`,children:[t&&e.jsx("div",{className:"mb-2",children:t}),e.jsx("div",{className:"text-[14px] font-semibold text-[#34343F]",children:s}),(a||r)&&e.jsx("p",{className:"mt-2 max-w-[650px] text-[12px] leading-relaxed text-[#A19D9D]",children:r??a})]});exports.CustomTabs=D;exports.EmptyState=$;exports.Stepper=M;exports.SummaryDetailsCard=I;
|
package/dist/navigation.es.js
CHANGED
|
@@ -2,24 +2,24 @@ import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import * as T from "react";
|
|
3
3
|
import { useState as C, memo as B, useMemo as D } from "react";
|
|
4
4
|
const W = ({
|
|
5
|
-
tabs:
|
|
6
|
-
defaultValue:
|
|
5
|
+
tabs: r,
|
|
6
|
+
defaultValue: o,
|
|
7
7
|
value: t,
|
|
8
8
|
onValueChange: i,
|
|
9
|
-
className:
|
|
9
|
+
className: s = "",
|
|
10
10
|
tabListClassName: n = "",
|
|
11
11
|
tabButtonClassName: h = "",
|
|
12
12
|
contentClassName: b = "",
|
|
13
|
-
showTabNumbers:
|
|
13
|
+
showTabNumbers: l = !0,
|
|
14
14
|
showContent: d = !0,
|
|
15
15
|
animated: f = !0
|
|
16
16
|
}) => {
|
|
17
17
|
var k;
|
|
18
18
|
const p = t !== void 0, [_, y] = C(
|
|
19
|
-
|
|
19
|
+
o || ((k = r[0]) == null ? void 0 : k.id) || ""
|
|
20
20
|
), u = p ? t : _, w = (a) => {
|
|
21
21
|
p || y(a), i == null || i(a);
|
|
22
|
-
}, v =
|
|
22
|
+
}, v = r.find((a) => a.id === u), N = {
|
|
23
23
|
display: "flex",
|
|
24
24
|
alignItems: "flex-end",
|
|
25
25
|
borderBottom: "1px solid #059669",
|
|
@@ -84,7 +84,7 @@ const W = ({
|
|
|
84
84
|
return /* @__PURE__ */ c(
|
|
85
85
|
"div",
|
|
86
86
|
{
|
|
87
|
-
className:
|
|
87
|
+
className: s,
|
|
88
88
|
style: {
|
|
89
89
|
display: "flex",
|
|
90
90
|
flexDirection: "column",
|
|
@@ -174,7 +174,7 @@ const W = ({
|
|
|
174
174
|
{
|
|
175
175
|
style: N,
|
|
176
176
|
className: `ctabs-list ${n}`,
|
|
177
|
-
children:
|
|
177
|
+
children: r.map((a, L) => {
|
|
178
178
|
const F = u === a.id;
|
|
179
179
|
return /* @__PURE__ */ c(
|
|
180
180
|
"button",
|
|
@@ -191,7 +191,7 @@ const W = ({
|
|
|
191
191
|
},
|
|
192
192
|
className: `ctabs-btn ${h}`,
|
|
193
193
|
children: [
|
|
194
|
-
|
|
194
|
+
l && /* @__PURE__ */ e(
|
|
195
195
|
"span",
|
|
196
196
|
{
|
|
197
197
|
className: "ctabs-badge",
|
|
@@ -212,54 +212,54 @@ const W = ({
|
|
|
212
212
|
]
|
|
213
213
|
}
|
|
214
214
|
);
|
|
215
|
-
}, I = (
|
|
216
|
-
const { step: t, index: i, status:
|
|
215
|
+
}, I = (r) => /* @__PURE__ */ T.createElement("svg", { viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...r }, /* @__PURE__ */ T.createElement("path", { d: "M2 6.2L4.6 8.8L10 3", stroke: "#ffffff", strokeWidth: 1.6, strokeLinecap: "round", strokeLinejoin: "round" })), z = B(({ computed: r, showTime: o }) => {
|
|
216
|
+
const { step: t, index: i, status: s } = r, n = [
|
|
217
217
|
"rs-stepper__circle",
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
s === "completed" ? "rs-stepper__circle--completed" : "",
|
|
219
|
+
s === "active" ? "rs-stepper__circle--active" : ""
|
|
220
220
|
].filter(Boolean).join(" "), h = [
|
|
221
221
|
"rs-stepper__title",
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
s === "pending" ? "rs-stepper__title--pending" : "",
|
|
223
|
+
s === "active" ? "rs-stepper__title--active" : ""
|
|
224
224
|
].filter(Boolean).join(" ");
|
|
225
225
|
return /* @__PURE__ */ c("div", { className: "rs-stepper__step", children: [
|
|
226
226
|
/* @__PURE__ */ c("div", { className: "rs-stepper__circle-wrap", children: [
|
|
227
227
|
/* @__PURE__ */ e("div", { className: n, children: i !== 0 ? i : null }),
|
|
228
|
-
|
|
228
|
+
s === "completed" && /* @__PURE__ */ e("span", { className: "rs-stepper__check", "aria-hidden": "true", children: /* @__PURE__ */ e(I, {}) })
|
|
229
229
|
] }),
|
|
230
230
|
/* @__PURE__ */ e("div", { className: h, children: t.title }),
|
|
231
231
|
t.date && /* @__PURE__ */ e("div", { className: "rs-stepper__date", children: t.date }),
|
|
232
|
-
|
|
232
|
+
o && t.time && /* @__PURE__ */ e("div", { className: "rs-stepper__time", children: t.time })
|
|
233
233
|
] });
|
|
234
234
|
});
|
|
235
235
|
z.displayName = "StepCircle";
|
|
236
236
|
const $ = ({
|
|
237
|
-
steps:
|
|
238
|
-
currentStep:
|
|
237
|
+
steps: r,
|
|
238
|
+
currentStep: o,
|
|
239
239
|
completedColor: t = "#059669",
|
|
240
240
|
pendingColor: i = "#9ca3af",
|
|
241
|
-
activeColor:
|
|
241
|
+
activeColor: s = "#059669",
|
|
242
242
|
lineColor: n = "#e5e7eb",
|
|
243
243
|
showTime: h = !0,
|
|
244
244
|
orientation: b = "responsive"
|
|
245
245
|
}) => {
|
|
246
|
-
const
|
|
247
|
-
() =>
|
|
246
|
+
const l = r.length, d = o > l, f = Math.max(1, Math.min(o, l)), p = d ? Math.max(0, l - 1) : Math.max(0, Math.min(l - 1, f - 1)), _ = D(
|
|
247
|
+
() => r.map((m, g) => {
|
|
248
248
|
let x = "pending";
|
|
249
249
|
return d || g < p ? x = "completed" : g === p && (x = "active"), { step: m, index: g, status: x };
|
|
250
250
|
}),
|
|
251
|
-
[
|
|
252
|
-
), y =
|
|
251
|
+
[r, p, d]
|
|
252
|
+
), y = l > 0 ? 100 / l / 2 : 0, u = l > 1 ? d ? 100 : p / (l - 1) * 100 : 0, w = d || f > 1 ? t : n, v = d || f > l ? t : n, N = {
|
|
253
253
|
"--rs-completed-color": t,
|
|
254
254
|
"--rs-pending-color": i,
|
|
255
|
-
"--rs-active-color":
|
|
255
|
+
"--rs-active-color": s,
|
|
256
256
|
"--rs-line-color": n,
|
|
257
257
|
"--rs-half-step": `${y}%`,
|
|
258
258
|
"--rs-progress": `${u}%`,
|
|
259
259
|
"--rs-left-side-color": w,
|
|
260
260
|
"--rs-right-side-color": v
|
|
261
261
|
};
|
|
262
|
-
return
|
|
262
|
+
return l === 0 ? null : /* @__PURE__ */ c("div", { className: "border border-[#E5E7EB] py-2 mx-2 rounded-lg bg-[#F9FAFB] shadow-[0px_2px_4px_-1px_#00000008,0px_4px_6px_-1px_#0000000D]", children: [
|
|
263
263
|
/* @__PURE__ */ e("div", { className: "pl-2 pt-2 pb-3 text-[14px] font-bold", children: "Workflow Progress" }),
|
|
264
264
|
/* @__PURE__ */ e("div", { className: `rs-stepper ${b === "vertical" ? "rs-stepper--vertical" : b === "horizontal" ? "rs-stepper--horizontal" : "rs-stepper--responsive"}`, style: N, children: /* @__PURE__ */ e("div", { className: "rs-stepper__scroll", children: /* @__PURE__ */ c("div", { className: "rs-stepper__row", children: [
|
|
265
265
|
/* @__PURE__ */ e("div", { className: "rs-stepper__track", children: /* @__PURE__ */ e("div", { className: "rs-stepper__progress" }) }),
|
|
@@ -274,41 +274,39 @@ const $ = ({
|
|
|
274
274
|
] }) }) })
|
|
275
275
|
] });
|
|
276
276
|
}, P = B($), A = ({
|
|
277
|
-
rows:
|
|
278
|
-
className:
|
|
279
|
-
}) => (
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
"
|
|
283
|
-
{
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
"
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
), H = ({
|
|
300
|
-
title: s,
|
|
301
|
-
description: l,
|
|
277
|
+
rows: r,
|
|
278
|
+
className: o = "mt-2 mx-2"
|
|
279
|
+
}) => /* @__PURE__ */ e("div", { className: `summary-detail-card ${o}`.trim(), children: r.map((t, i) => /* @__PURE__ */ e("div", { className: "summary-detail-card__row", children: t.map((s, n) => /* @__PURE__ */ c(
|
|
280
|
+
"div",
|
|
281
|
+
{
|
|
282
|
+
className: "summary-detail-card__field",
|
|
283
|
+
style: { "--dc-span": s.span ?? 1 },
|
|
284
|
+
children: [
|
|
285
|
+
/* @__PURE__ */ e("p", { className: "summary-detail-card__label", children: s.label }),
|
|
286
|
+
/* @__PURE__ */ e(
|
|
287
|
+
"p",
|
|
288
|
+
{
|
|
289
|
+
className: `summary-detail-card__value${s.size === "lg" ? " summary-detail-card__value--lg" : ""}`,
|
|
290
|
+
children: s.value
|
|
291
|
+
}
|
|
292
|
+
)
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
n
|
|
296
|
+
)) }, i)) }), H = ({
|
|
297
|
+
title: r,
|
|
298
|
+
description: o,
|
|
302
299
|
icon: t,
|
|
303
|
-
className: i = ""
|
|
300
|
+
className: i = "",
|
|
301
|
+
children: s
|
|
304
302
|
}) => /* @__PURE__ */ c(
|
|
305
303
|
"div",
|
|
306
304
|
{
|
|
307
305
|
className: `flex flex-col items-center justify-center py-4 px-4 text-center ${i}`,
|
|
308
306
|
children: [
|
|
309
307
|
t && /* @__PURE__ */ e("div", { className: "mb-2", children: t }),
|
|
310
|
-
/* @__PURE__ */ e("div", { className: "text-[14px] font-semibold text-[#34343F]", children:
|
|
311
|
-
/* @__PURE__ */ e("p", { className: "mt-2 max-w-[650px] text-[12px] leading-
|
|
308
|
+
/* @__PURE__ */ e("div", { className: "text-[14px] font-semibold text-[#34343F]", children: r }),
|
|
309
|
+
(o || s) && /* @__PURE__ */ e("p", { className: "mt-2 max-w-[650px] text-[12px] leading-relaxed text-[#A19D9D]", children: s ?? o })
|
|
312
310
|
]
|
|
313
311
|
}
|
|
314
312
|
);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface EmptyStateProps {
|
|
3
3
|
title: string;
|
|
4
|
-
description
|
|
4
|
+
description?: string | React.ReactNode;
|
|
5
5
|
icon?: React.ReactNode;
|
|
6
6
|
className?: string;
|
|
7
|
+
children?: React.ReactNode;
|
|
7
8
|
}
|
|
8
9
|
declare const EmptyState: React.FC<EmptyStateProps>;
|
|
9
10
|
export default EmptyState;
|
|
@@ -1,23 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SummaryDetailsCardProps } from '../types/SummaryDetailsCard';
|
|
3
3
|
import './SummaryDetailsCard.css';
|
|
4
|
-
/**
|
|
5
|
-
* SummaryDetailsCard
|
|
6
|
-
*
|
|
7
|
-
* A reusable, responsive "record summary" card: stacked rows of
|
|
8
|
-
* label/value fields separated by dividers, used for things like
|
|
9
|
-
* RDR / PNC detail headers, ticket summaries, order details, etc.
|
|
10
|
-
*
|
|
11
|
-
* Every row shares the same fixed 4-column grid, so fields stay
|
|
12
|
-
* vertically aligned across rows regardless of how many fields a given
|
|
13
|
-
* row has (a 3-field row doesn't stretch to fill the space differently
|
|
14
|
-
* than a 4-field row above/below it). Each field can opt into spanning
|
|
15
|
-
* more than 1 column via `field.span`. On mobile the grid collapses to
|
|
16
|
-
* a single column and every field goes full width.
|
|
17
|
-
*
|
|
18
|
-
* Styled with plain CSS (SummaryDetailsCard.css) rather than Tailwind utility
|
|
19
|
-
* classes, so it renders correctly regardless of the consuming app's
|
|
20
|
-
* Tailwind content-scan config — safe to use across projects/packages.
|
|
21
|
-
*/
|
|
22
4
|
export declare const SummaryDetailsCard: React.FC<SummaryDetailsCardProps>;
|
|
23
5
|
export default SummaryDetailsCard;
|