@dilipod/ui 0.4.20 → 0.4.21

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.
@@ -1 +1 @@
1
- {"version":3,"file":"scenarios-manager.d.ts","sourceRoot":"","sources":["../../src/components/scenarios-manager.tsx"],"names":[],"mappings":"AAmBA,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,kBAAkB,GAAG,eAAe,GAAG,WAAW,CAAA;AAE5F,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,YAAY,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,YAAY,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,QAAQ,EAAE,CAAA;IACrB,KAAK,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACxD,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACvE,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACvC,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAChC,WAAW,CAAC,EAAE,kBAAkB,EAAE,CAAA;IAClC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,0CAA0C;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,SAAS,CA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,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,0CAA0C;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA+ND,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,WAAgB,EAChB,SAAS,EACT,UAAkB,EAClB,sBAA0B,EAC1B,eAAsB,EACtB,SAAS,GACV,EAAE,qBAAqB,2CAgMvB"}
package/dist/index.js CHANGED
@@ -4257,17 +4257,16 @@ function ScenarioCard({
4257
4257
  }) {
4258
4258
  const config = typeConfig[scenario.type];
4259
4259
  const Icon = config.icon;
4260
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "group relative border border-border rounded-sm p-4 hover:border-[var(--cyan)]/30 hover:bg-[var(--cyan)]/[0.02] transition-all", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
4260
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group relative flex items-start justify-between gap-3 py-3 border-b border-border/50 last:border-b-0", children: [
4261
4261
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3 flex-1 min-w-0", children: [
4262
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-9 h-9 rounded-sm flex items-center justify-center shrink-0", config.bgColor), children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 18, weight: "fill", className: config.color }) }),
4263
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
4264
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 mb-1.5", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", size: "sm", className: "font-medium", children: config.label }) }),
4262
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-8 h-8 rounded-full flex items-center justify-center shrink-0", config.bgColor), children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 16, weight: "fill", className: config.color }) }),
4263
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 pt-0.5", children: [
4265
4264
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-[var(--black)]", children: [
4266
4265
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: "When:" }),
4267
4266
  " ",
4268
4267
  scenario.situation
4269
4268
  ] }),
4270
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground mt-1", children: [
4269
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground mt-0.5", children: [
4271
4270
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[var(--black)] font-medium", children: "Action:" }),
4272
4271
  " ",
4273
4272
  scenario.action
@@ -4280,9 +4279,9 @@ function ScenarioCard({
4280
4279
  {
4281
4280
  variant: "ghost",
4282
4281
  size: "icon",
4283
- className: "h-8 w-8 text-muted-foreground hover:text-[var(--black)]",
4282
+ className: "h-7 w-7 text-muted-foreground hover:text-[var(--black)]",
4284
4283
  onClick: onEdit,
4285
- children: /* @__PURE__ */ jsxRuntime.jsx(react_star.PencilSimple, { size: 16 })
4284
+ children: /* @__PURE__ */ jsxRuntime.jsx(react_star.PencilSimple, { size: 14 })
4286
4285
  }
4287
4286
  ),
4288
4287
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -4290,13 +4289,13 @@ function ScenarioCard({
4290
4289
  {
4291
4290
  variant: "ghost",
4292
4291
  size: "icon",
4293
- className: "h-8 w-8 text-muted-foreground hover:text-red-600 hover:bg-red-50",
4292
+ className: "h-7 w-7 text-muted-foreground hover:text-red-600 hover:bg-red-50",
4294
4293
  onClick: onDelete,
4295
- children: /* @__PURE__ */ jsxRuntime.jsx(react_star.Trash, { size: 16 })
4294
+ children: /* @__PURE__ */ jsxRuntime.jsx(react_star.Trash, { size: 14 })
4296
4295
  }
4297
4296
  )
4298
4297
  ] })
4299
- ] }) });
4298
+ ] });
4300
4299
  }
4301
4300
  function SuggestionChip({
4302
4301
  suggestion,
@@ -4475,10 +4474,10 @@ function ScenariosManager({
4475
4474
  {
4476
4475
  type: "button",
4477
4476
  onClick: () => setIsExpanded(!isExpanded),
4478
- className: "w-full flex items-center justify-between bg-muted/30 border border-border/50 px-4 py-3 rounded-lg hover:bg-muted/50 transition-colors",
4477
+ className: "w-full flex items-center justify-between border border-border/50 px-4 py-3 rounded-lg hover:bg-muted/30 transition-colors",
4479
4478
  children: [
4480
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
4481
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-12 h-12 rounded-lg bg-[var(--cyan)]/10 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(react_star.Lightning, { size: 24, weight: "fill", className: "text-[var(--cyan)]" }) }),
4479
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
4480
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-10 h-10 rounded-lg bg-[var(--cyan)]/10 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(react_star.Lightning, { size: 20, weight: "fill", className: "text-[var(--cyan)]" }) }),
4482
4481
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-left", children: [
4483
4482
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
4484
4483
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-[var(--black)]", children: "Scenarios" }),
@@ -4487,19 +4486,15 @@ function ScenariosManager({
4487
4486
  "Complete"
4488
4487
  ] })
4489
4488
  ] }),
4490
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: scenarios.length === 0 ? "Define rules for edge cases and escalations" : `${scenarios.length} scenario${scenarios.length === 1 ? "" : "s"} defined` })
4489
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: scenarios.length === 0 ? "Define rules for edge cases" : `${scenarios.length} scenario${scenarios.length === 1 ? "" : "s"} defined` })
4491
4490
  ] })
4492
4491
  ] }),
4493
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-3", children: isExpanded ? /* @__PURE__ */ jsxRuntime.jsx(react_star.CaretUp, { size: 20, className: "text-muted-foreground" }) : /* @__PURE__ */ jsxRuntime.jsx(react_star.CaretDown, { size: 20, className: "text-muted-foreground" }) })
4492
+ isExpanded ? /* @__PURE__ */ jsxRuntime.jsx(react_star.CaretUp, { size: 20, className: "text-muted-foreground" }) : /* @__PURE__ */ jsxRuntime.jsx(react_star.CaretDown, { size: 20, className: "text-muted-foreground" })
4494
4493
  ]
4495
4494
  }
4496
4495
  ),
4497
4496
  isExpanded && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4498
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", onClick: handleAddClick, children: [
4499
- /* @__PURE__ */ jsxRuntime.jsx(react_star.Plus, { size: 16, className: "mr-1" }),
4500
- "Add scenario"
4501
- ] }) }),
4502
- scenarios.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-3", children: scenarios.map((scenario) => /* @__PURE__ */ jsxRuntime.jsx(
4497
+ scenarios.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4", children: scenarios.map((scenario) => /* @__PURE__ */ jsxRuntime.jsx(
4503
4498
  ScenarioCard,
4504
4499
  {
4505
4500
  scenario,
@@ -4508,15 +4503,18 @@ function ScenariosManager({
4508
4503
  },
4509
4504
  scenario.id
4510
4505
  )) }),
4511
- scenarios.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border border-dashed border-border rounded-sm p-8 text-center", children: [
4512
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-12 h-12 rounded-sm bg-muted flex items-center justify-center mx-auto mb-3", children: /* @__PURE__ */ jsxRuntime.jsx(react_star.Lightning, { size: 24, className: "text-muted-foreground" }) }),
4506
+ scenarios.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-6 text-center", children: [
4513
4507
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mb-4", children: "No scenarios yet. Add rules for how the worker should handle edge cases." }),
4514
4508
  /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", onClick: handleAddClick, children: [
4515
4509
  /* @__PURE__ */ jsxRuntime.jsx(react_star.Plus, { size: 16, className: "mr-1.5" }),
4516
4510
  "Add your first scenario"
4517
4511
  ] })
4518
4512
  ] }),
4519
- filteredSuggestions.length > 0 && !isComplete && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-2", children: [
4513
+ scenarios.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 pt-2", children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", onClick: handleAddClick, className: "text-muted-foreground hover:text-[var(--black)]", children: [
4514
+ /* @__PURE__ */ jsxRuntime.jsx(react_star.Plus, { size: 16, className: "mr-1.5" }),
4515
+ "Add scenario"
4516
+ ] }) }),
4517
+ filteredSuggestions.length > 0 && !isComplete && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 pt-2", children: [
4520
4518
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mb-2", children: "Suggested scenarios:" }),
4521
4519
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: filteredSuggestions.map((suggestion, index) => /* @__PURE__ */ jsxRuntime.jsx(
4522
4520
  SuggestionChip,
@@ -4528,11 +4526,8 @@ function ScenariosManager({
4528
4526
  index
4529
4527
  )) })
4530
4528
  ] }),
4531
- canComplete && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-4 border-t border-border", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4 bg-[var(--cyan)]/5 rounded-sm p-4 -mx-1", children: [
4532
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4533
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-[var(--black)]", children: "Ready to proceed?" }),
4534
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-0.5", children: "Mark your scenarios as complete to continue with the onboarding." })
4535
- ] }),
4529
+ canComplete && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 pt-4 mt-2 border-t border-border/50", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
4530
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Mark your scenarios as complete to continue." }),
4536
4531
  /* @__PURE__ */ jsxRuntime.jsxs(
4537
4532
  Button,
4538
4533
  {
@@ -4548,7 +4543,7 @@ function ScenariosManager({
4548
4543
  }
4549
4544
  )
4550
4545
  ] }) }),
4551
- isComplete && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-4 border-t border-border", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "You can still add or edit scenarios while we build your worker." }) })
4546
+ isComplete && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 pt-3 mt-2 border-t border-border/50", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "You can still add or edit scenarios while we build your worker." }) })
4552
4547
  ] }),
4553
4548
  /* @__PURE__ */ jsxRuntime.jsx(
4554
4549
  ScenarioDialog,