@drawbridge/components 0.1.23 → 0.1.24

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 (79) hide show
  1. package/dist/bridge/form-subdomain-embed.js +1 -0
  2. package/dist/bridge/form-subdomain-embed.mjs +1 -0
  3. package/dist/bridge/form-subdomain.js +5 -2
  4. package/dist/bridge/form-subdomain.mjs +5 -2
  5. package/dist/bridge/template-modal.js +2 -2
  6. package/dist/bridge/template-modal.mjs +2 -2
  7. package/dist/dashboard/buttons-subscription.js +27 -66
  8. package/dist/dashboard/buttons-subscription.mjs +27 -65
  9. package/dist/dashboard/card-payment-method.js +1 -1
  10. package/dist/dashboard/card-payment-method.mjs +1 -1
  11. package/dist/dashboard/card-section.js +2 -2
  12. package/dist/dashboard/card-section.mjs +2 -2
  13. package/dist/dashboard/card-setting.js +3 -4
  14. package/dist/dashboard/card-setting.mjs +3 -4
  15. package/dist/dashboard/card-task.js +4 -22
  16. package/dist/dashboard/card-task.mjs +4 -22
  17. package/dist/dashboard/card-tile.js +6 -6
  18. package/dist/dashboard/card-tile.mjs +6 -6
  19. package/dist/dashboard/drawer.js +2 -7
  20. package/dist/dashboard/drawer.mjs +3 -8
  21. package/dist/dashboard/form-organization-campaign.js +1 -1
  22. package/dist/dashboard/form-organization-campaign.mjs +1 -1
  23. package/dist/dashboard/form-organization-identity.js +3 -3
  24. package/dist/dashboard/form-organization-identity.mjs +3 -3
  25. package/dist/dashboard/form-organization-workflow.js +9 -7
  26. package/dist/dashboard/form-organization-workflow.mjs +9 -7
  27. package/dist/dashboard/form-organization.js +40 -3
  28. package/dist/dashboard/form-organization.mjs +40 -3
  29. package/dist/dashboard/guide.js +238 -0
  30. package/dist/dashboard/guide.mjs +209 -0
  31. package/dist/dashboard/input-combobox.js +2 -7
  32. package/dist/dashboard/input-combobox.mjs +2 -7
  33. package/dist/dashboard/list.js +1 -1
  34. package/dist/dashboard/list.mjs +1 -1
  35. package/dist/dashboard/menu.js +96 -188
  36. package/dist/dashboard/menu.mjs +97 -189
  37. package/dist/dashboard/modal.js +3 -9
  38. package/dist/dashboard/modal.mjs +4 -10
  39. package/dist/dashboard/notice.js +3 -5
  40. package/dist/dashboard/notice.mjs +3 -5
  41. package/dist/dashboard/table-cell-title.js +0 -2
  42. package/dist/dashboard/table-cell-title.mjs +0 -2
  43. package/dist/dashboard/table.js +20 -61
  44. package/dist/dashboard/table.mjs +20 -61
  45. package/dist/dashboard/template-dashboard.js +133 -35
  46. package/dist/dashboard/template-dashboard.mjs +134 -36
  47. package/dist/dashboard/template-socket.js +3 -19
  48. package/dist/dashboard/template-socket.mjs +3 -19
  49. package/dist/dashboard/template-ui.js +186 -150
  50. package/dist/dashboard/template-ui.mjs +187 -151
  51. package/dist/shared/lib/helpers.js +2 -9
  52. package/dist/shared/lib/helpers.mjs +2 -9
  53. package/dist/shared/overlay.js +3 -5
  54. package/dist/shared/overlay.mjs +3 -5
  55. package/package.json +13 -28
  56. package/types/dashboard/card-task.d.ts +1 -5
  57. package/types/dashboard/guide.d.ts +23 -0
  58. package/types/dashboard/table.d.ts +1 -3
  59. package/types/dashboard/template-dashboard.d.ts +1 -4
  60. package/types/dashboard/template-ui.d.ts +2 -2
  61. package/dist/dashboard/lib/escape.js +0 -48
  62. package/dist/dashboard/lib/escape.mjs +0 -25
  63. package/dist/dashboard/lib/rail.js +0 -75
  64. package/dist/dashboard/lib/rail.mjs +0 -46
  65. package/dist/dashboard/lib/throttle.js +0 -57
  66. package/dist/dashboard/lib/throttle.mjs +0 -34
  67. package/dist/dashboard/template-rail.js +0 -674
  68. package/dist/dashboard/template-rail.mjs +0 -640
  69. package/dist/icons/book-open.js +0 -46
  70. package/dist/icons/book-open.mjs +0 -27
  71. package/dist/icons/task.js +0 -46
  72. package/dist/icons/task.mjs +0 -27
  73. package/dist/shared/lib/motion.js +0 -27
  74. package/dist/shared/lib/motion.mjs +0 -4
  75. package/types/dashboard/lib/rail.d.ts +0 -32
  76. package/types/dashboard/lib/throttle.d.ts +0 -5
  77. package/types/dashboard/template-rail.d.ts +0 -36
  78. package/types/icons/book-open.d.ts +0 -5
  79. package/types/icons/task.d.ts +0 -5
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { Fragment, useContext, useMemo } from "react";
3
+ import { Fragment, useContext, useMemo, useState } from "react";
4
4
  import { useParams, usePathname } from "next/navigation";
5
5
  import { useQuery, useQueryClient } from "@tanstack/react-query";
6
6
  import { useModal } from "./lib/hooks.mjs";
7
7
  import WrapperGradient from "../wrapper-gradient.mjs";
8
- import TemplateRail, { TemplateRailBook } from "./template-rail.mjs";
8
+ import Guide from "./guide.mjs";
9
9
  import { MenuAccount, MenuAccountDropdown, MenuAdmin, MenuApp, MenuCampaign, MenuOrganization } from "./menu.mjs";
10
10
  import MenuIcon from "../icons/menu.mjs";
11
11
  import Switch from "../icons/switch.mjs";
@@ -20,6 +20,7 @@ const offsets = {
20
20
  paddingTop: "pt-16 md:pt-0"
21
21
  };
22
22
  const isAccountPath = (path) => path === "/account" || path.startsWith("/account/");
23
+ let timeout;
23
24
  const TemplateUIHeaderBack = ({
24
25
  href,
25
26
  icon: Icon = ArrowLeft,
@@ -91,7 +92,6 @@ const TemplateUiHeader = ({
91
92
  active,
92
93
  campaign = {},
93
94
  className,
94
- guide,
95
95
  organization = {},
96
96
  params,
97
97
  path
@@ -155,14 +155,6 @@ const TemplateUiHeader = ({
155
155
  }
156
156
  }
157
157
  ),
158
- /* @__PURE__ */ jsx(
159
- TemplateRailBook,
160
- {
161
- ...{
162
- guide
163
- }
164
- }
165
- ),
166
158
  /* @__PURE__ */ jsx(
167
159
  "div",
168
160
  {
@@ -263,11 +255,21 @@ const TemplateUi = ({
263
255
  queryKey: ["campaign", params.campaign]
264
256
  });
265
257
  const guide = (_b = (_a = account == null ? void 0 : account.data) == null ? void 0 : _a.guide) == null ? void 0 : _b[guideId];
258
+ const [run, setRun] = useState(false);
266
259
  const modal = useModal({
267
260
  queryClient
268
261
  });
269
262
  const actions = useMemo(
270
263
  () => {
264
+ const reset = () => {
265
+ modal.close();
266
+ queryClient.setQueryData(
267
+ ["menu"],
268
+ {
269
+ active: false
270
+ }
271
+ );
272
+ };
271
273
  const menu2 = () => {
272
274
  queryClient.setQueryData(
273
275
  ["menu"],
@@ -277,6 +279,10 @@ const TemplateUi = ({
277
279
  );
278
280
  };
279
281
  return {
282
+ guide: () => {
283
+ reset();
284
+ setRun(true);
285
+ },
280
286
  signout: () => {
281
287
  modal.open({
282
288
  message: /* @__PURE__ */ jsxs(
@@ -313,159 +319,189 @@ const TemplateUi = ({
313
319
  },
314
320
  [queryClient, modal]
315
321
  );
316
- return /* @__PURE__ */ jsxs(
317
- "div",
318
- {
319
- ...{
320
- className: "flex flex-col h-dvh overflow-hidden md:flex-row " + offsets.paddingTop
321
- },
322
- children: [
323
- /* @__PURE__ */ jsx(
324
- TemplateUiHeader,
325
- {
326
- ...{
327
- actions,
328
- active: (_c = menu == null ? void 0 : menu.data) == null ? void 0 : _c.active,
329
- campaign: campaign == null ? void 0 : campaign.data,
330
- className: "z-30 fixed top-0 left-0 md:hidden",
331
- guide,
332
- organization: organization == null ? void 0 : organization.data,
333
- params,
334
- path
322
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
323
+ guide && /* @__PURE__ */ jsx(
324
+ Guide,
325
+ {
326
+ ...{
327
+ ...guide,
328
+ callback: async ({ action, step, type }) => {
329
+ var _a2, _b2, _c2, _d2, _e2, _f, _g, _h, _i, _j;
330
+ const key = action + "." + type;
331
+ if ((_a2 = step == null ? void 0 : step.data) == null ? void 0 : _a2[key]) {
332
+ clearTimeout(timeout);
333
+ setRun(false);
334
+ if (Array.isArray((_c2 = (_b2 = step == null ? void 0 : step.data) == null ? void 0 : _b2[key]) == null ? void 0 : _c2.state) && ((_f = (_e2 = (_d2 = step == null ? void 0 : step.data) == null ? void 0 : _d2[key]) == null ? void 0 : _e2.state) == null ? void 0 : _f.length) > 0) {
335
+ const promises = [];
336
+ (_h = (_g = step == null ? void 0 : step.data) == null ? void 0 : _g[key]) == null ? void 0 : _h.state.map((args) => promises.push(queryClient.setQueryData(...args)));
337
+ await Promise.all(promises);
338
+ }
339
+ if ((_j = (_i = step == null ? void 0 : step.data) == null ? void 0 : _i[key]) == null ? void 0 : _j.timeout) {
340
+ timeout = setTimeout(
341
+ () => {
342
+ setRun(true);
343
+ },
344
+ step.data[key].timeout
345
+ );
346
+ }
335
347
  }
336
- }
337
- ),
338
- /* @__PURE__ */ jsxs(
339
- "div",
340
- {
341
- ...{
342
- className: "z-[25] fixed top-0 left-0 w-full flex flex-col justify-between bg-black h-full transition duration-200 ease-out motion-reduce:transition-none md:z-0 md:relative md:w-1/3 lg:w-1/4 xl:w-1/5 " + (((_d = menu == null ? void 0 : menu.data) == null ? void 0 : _d.active) ? "translate-y-0 " + offsets.paddingTop : "-translate-y-full md:translate-y-0")
343
- },
344
- children: [
345
- /* @__PURE__ */ jsx(
346
- TemplateUiHeader,
347
- {
348
- ...{
349
- actions,
350
- active: (_e = menu == null ? void 0 : menu.data) == null ? void 0 : _e.active,
351
- campaign: campaign == null ? void 0 : campaign.data,
352
- className: "hidden md:flex border-b border-gray-dark relative z-[3]",
353
- organization: organization == null ? void 0 : organization.data,
354
- params,
355
- path
348
+ if (type === "tour:end") {
349
+ setRun(false);
350
+ }
351
+ },
352
+ run
353
+ }
354
+ }
355
+ ),
356
+ /* @__PURE__ */ jsxs(
357
+ "div",
358
+ {
359
+ ...{
360
+ className: "flex flex-col h-dvh overflow-hidden md:flex-row " + offsets.paddingTop
361
+ },
362
+ children: [
363
+ /* @__PURE__ */ jsx(
364
+ TemplateUiHeader,
365
+ {
366
+ ...{
367
+ actions,
368
+ active: (_c = menu == null ? void 0 : menu.data) == null ? void 0 : _c.active,
369
+ campaign: campaign == null ? void 0 : campaign.data,
370
+ className: "z-30 fixed top-0 left-0 md:hidden",
371
+ organization: organization == null ? void 0 : organization.data,
372
+ params,
373
+ path
374
+ }
375
+ }
376
+ ),
377
+ /* @__PURE__ */ jsxs(
378
+ "div",
379
+ {
380
+ ...{
381
+ className: "z-[25] fixed top-0 left-0 w-full flex flex-col justify-between bg-black h-full transition duration-200 ease-in md:z-0 md:relative md:w-1/3 lg:w-1/4 xl:w-1/5 " + (((_d = menu == null ? void 0 : menu.data) == null ? void 0 : _d.active) ? "translate-y-0 " + offsets.paddingTop : "-translate-y-full md:translate-y-0")
382
+ },
383
+ children: [
384
+ /* @__PURE__ */ jsx(
385
+ TemplateUiHeader,
386
+ {
387
+ ...{
388
+ actions,
389
+ active: (_e = menu == null ? void 0 : menu.data) == null ? void 0 : _e.active,
390
+ campaign: campaign == null ? void 0 : campaign.data,
391
+ className: "hidden md:flex border-b border-gray-dark relative z-[3]",
392
+ organization: organization == null ? void 0 : organization.data,
393
+ params,
394
+ path
395
+ }
356
396
  }
357
- }
358
- ),
359
- (params == null ? void 0 : params.organization) && !isAccountPath(path) && !path.includes("/admin") && /* @__PURE__ */ jsx(
360
- TemplateUiBand,
361
- {
362
- ...{
363
- record: params.campaign ? campaign == null ? void 0 : campaign.data : organization == null ? void 0 : organization.data
397
+ ),
398
+ (params == null ? void 0 : params.organization) && !isAccountPath(path) && !path.includes("/admin") && /* @__PURE__ */ jsx(
399
+ TemplateUiBand,
400
+ {
401
+ ...{
402
+ record: params.campaign ? campaign == null ? void 0 : campaign.data : organization == null ? void 0 : organization.data
403
+ }
364
404
  }
365
- }
366
- ),
367
- /* @__PURE__ */ jsxs(
368
- WrapperGradient,
369
- {
370
- ...{
371
- className: "flex-1 min-h-0",
372
- classNameGradient: "from-black to-transparent h-10",
373
- classNameScroll: "h-full"
374
- },
375
- children: [
376
- (params == null ? void 0 : params.organization) && !(organization == null ? void 0 : organization.isLoading) && (organization == null ? void 0 : organization.data) && !isAccountPath(path) && !path.includes("/admin") && /* @__PURE__ */ jsx(Fragment, { children: params.organization && params.campaign ? /* @__PURE__ */ jsx(
377
- MenuCampaign,
378
- {
379
- ...{
380
- campaign: params.campaign,
381
- onClick: actions.menu,
382
- organization: params.organization,
383
- path
384
- }
385
- },
386
- params.organization + "-" + params.campaign
387
- ) : /* @__PURE__ */ jsx(
388
- MenuOrganization,
389
- {
390
- ...{
391
- onClick: actions.menu,
392
- organization: params.organization,
393
- path
405
+ ),
406
+ /* @__PURE__ */ jsxs(
407
+ WrapperGradient,
408
+ {
409
+ ...{
410
+ className: "flex-1 min-h-0",
411
+ classNameGradient: "from-black to-transparent h-10",
412
+ classNameScroll: "h-full"
413
+ },
414
+ children: [
415
+ (params == null ? void 0 : params.organization) && !(organization == null ? void 0 : organization.isLoading) && (organization == null ? void 0 : organization.data) && !isAccountPath(path) && !path.includes("/admin") && /* @__PURE__ */ jsx(Fragment, { children: params.organization && params.campaign ? /* @__PURE__ */ jsx(
416
+ MenuCampaign,
417
+ {
418
+ ...{
419
+ campaign: params.campaign,
420
+ onClick: actions.menu,
421
+ organization: params.organization,
422
+ path
423
+ }
424
+ },
425
+ params.organization + "-" + params.campaign
426
+ ) : /* @__PURE__ */ jsx(
427
+ MenuOrganization,
428
+ {
429
+ ...{
430
+ onClick: actions.menu,
431
+ organization: params.organization,
432
+ path
433
+ }
434
+ },
435
+ params.organization
436
+ ) }),
437
+ !(params == null ? void 0 : params.organization) && !isAccountPath(path) && !path.includes("/admin") && /* @__PURE__ */ jsx(
438
+ MenuApp,
439
+ {
440
+ ...{
441
+ onClick: actions.menu,
442
+ path
443
+ }
394
444
  }
395
- },
396
- params.organization
397
- ) }),
398
- !(params == null ? void 0 : params.organization) && !isAccountPath(path) && !path.includes("/admin") && /* @__PURE__ */ jsx(
399
- MenuApp,
400
- {
401
- ...{
402
- onClick: actions.menu,
403
- path
445
+ ),
446
+ path.includes("/admin") && /* @__PURE__ */ jsx(
447
+ MenuAdmin,
448
+ {
449
+ ...{
450
+ onClick: actions.menu,
451
+ path
452
+ }
404
453
  }
405
- }
406
- ),
407
- path.includes("/admin") && /* @__PURE__ */ jsx(
408
- MenuAdmin,
409
- {
410
- ...{
411
- onClick: actions.menu,
412
- path
454
+ ),
455
+ isAccountPath(path) && /* @__PURE__ */ jsx(
456
+ MenuAccount,
457
+ {
458
+ ...{
459
+ onClick: actions.menu,
460
+ path
461
+ }
413
462
  }
414
- }
415
- ),
416
- isAccountPath(path) && /* @__PURE__ */ jsx(
417
- MenuAccount,
463
+ )
464
+ ]
465
+ }
466
+ ),
467
+ !isAccountPath(path) && /* @__PURE__ */ jsx(
468
+ "div",
469
+ {
470
+ ...{
471
+ className: "relative z-[3]"
472
+ },
473
+ children: /* @__PURE__ */ jsx(
474
+ MenuAccountDropdown,
418
475
  {
419
476
  ...{
477
+ actions,
478
+ account,
479
+ balance,
480
+ guide,
481
+ modal,
420
482
  onClick: actions.menu,
421
483
  path
422
484
  }
423
485
  }
424
486
  )
425
- ]
426
- }
427
- ),
428
- !isAccountPath(path) && /* @__PURE__ */ jsx(
429
- "div",
430
- {
431
- ...{
432
- className: "relative z-[3]"
433
- },
434
- children: /* @__PURE__ */ jsx(
435
- MenuAccountDropdown,
436
- {
437
- ...{
438
- actions,
439
- account,
440
- balance,
441
- modal,
442
- onClick: actions.menu,
443
- path
444
- }
445
- }
446
- )
447
- }
448
- )
449
- ]
450
- }
451
- ),
452
- /* @__PURE__ */ jsx(
453
- TemplateRail,
454
- {
455
- ...{
456
- account: account == null ? void 0 : account.data,
457
- campaign: campaign == null ? void 0 : campaign.data,
458
- guide,
459
- organization: organization == null ? void 0 : organization.data,
460
- params,
461
- path
462
- },
463
- children
464
- }
465
- )
466
- ]
467
- }
468
- );
487
+ }
488
+ )
489
+ ]
490
+ }
491
+ ),
492
+ /* @__PURE__ */ jsx(
493
+ "div",
494
+ {
495
+ ...{
496
+ className: "flex flex-col h-full w-full md:w-3/4 lg:w-4/5"
497
+ },
498
+ children
499
+ }
500
+ )
501
+ ]
502
+ }
503
+ )
504
+ ] });
469
505
  };
470
506
  var template_ui_default = TemplateUi;
471
507
  export {
@@ -170,8 +170,8 @@ const formatUserName = (user) => {
170
170
  const grid = (count) => {
171
171
  const grids = {
172
172
  1: "grid grid-cols-1",
173
- 2: "grid grid-cols-1 gap-6 @[976px]:grid-cols-2",
174
- 3: "grid grid-cols-1 gap-6 @[976px]:grid-cols-3"
173
+ 2: "grid grid-cols-1 gap-6 xl:grid-cols-2",
174
+ 3: "grid grid-cols-1 gap-6 xl:grid-cols-3"
175
175
  };
176
176
  if (count > 3) {
177
177
  return grids["3"];
@@ -318,14 +318,7 @@ const statuses = {
318
318
  denied: { text: "Denied", type: "error" }
319
319
  },
320
320
  // pending is a member who has been invited and not yet accepted: yellow, like every pending.
321
- // @story members/reactivate
322
- // Inactive is someone who lost access when the plan ended or shrank, waiting
323
- // on the owner's Reactivate: yellow, like a workflow's Inactive. Declined is
324
- // final and neutral, gray on the white card the table sits in. Accepted is a
325
- // member's normal state, so it shows none.
326
321
  member: {
327
- declined: { text: "Declined", type: "secondary" },
328
- inactive: { text: "Inactive", type: "warning" },
329
322
  pending: { text: "Invited", type: "warning" }
330
323
  },
331
324
  // @story campaigns/manage-order
@@ -110,8 +110,8 @@ const formatUserName = (user) => {
110
110
  const grid = (count) => {
111
111
  const grids = {
112
112
  1: "grid grid-cols-1",
113
- 2: "grid grid-cols-1 gap-6 @[976px]:grid-cols-2",
114
- 3: "grid grid-cols-1 gap-6 @[976px]:grid-cols-3"
113
+ 2: "grid grid-cols-1 gap-6 xl:grid-cols-2",
114
+ 3: "grid grid-cols-1 gap-6 xl:grid-cols-3"
115
115
  };
116
116
  if (count > 3) {
117
117
  return grids["3"];
@@ -258,14 +258,7 @@ const statuses = {
258
258
  denied: { text: "Denied", type: "error" }
259
259
  },
260
260
  // pending is a member who has been invited and not yet accepted: yellow, like every pending.
261
- // @story members/reactivate
262
- // Inactive is someone who lost access when the plan ended or shrank, waiting
263
- // on the owner's Reactivate: yellow, like a workflow's Inactive. Declined is
264
- // final and neutral, gray on the white card the table sits in. Accepted is a
265
- // member's normal state, so it shows none.
266
261
  member: {
267
- declined: { text: "Declined", type: "secondary" },
268
- inactive: { text: "Inactive", type: "warning" },
269
262
  pending: { text: "Invited", type: "warning" }
270
263
  },
271
264
  // @story campaigns/manage-order
@@ -33,12 +33,11 @@ __export(overlay_exports, {
33
33
  module.exports = __toCommonJS(overlay_exports);
34
34
  var import_jsx_runtime = require("react/jsx-runtime");
35
35
  var import_react = require("@headlessui/react");
36
- var import_motion = require("./lib/motion");
37
36
  var import_button = __toESM(require("./button"));
38
37
  var import_styles = require("../styles");
39
38
  const Overlay = ({
40
39
  className = "z-40 fixed inset-0",
41
- // linger: the tint stays 100ms on leave, so the panel above animates out first.
40
+ // linger: the tint stays 300ms on leave, so the panel above animates out first.
42
41
  linger = false,
43
42
  onClick,
44
43
  show = false,
@@ -51,9 +50,8 @@ const Overlay = ({
51
50
  as: "div",
52
51
  className: [
53
52
  className,
54
- "flex data-[closed]:opacity-0 " + import_motion.motion,
55
- // The panel's 150 ms leave runs first, then the backdrop fades.
56
- linger && "data-[leave]:data-[closed]:delay-100",
53
+ "flex transition duration-200 ease-in data-[closed]:opacity-0",
54
+ linger && "data-[leave]:data-[closed]:delay-300",
57
55
  !style && "bg-black/50"
58
56
  ].filter(Boolean).join(" "),
59
57
  show: Boolean(show),
@@ -1,12 +1,11 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { Transition } from "@headlessui/react";
4
- import { motion } from "./lib/motion.mjs";
5
4
  import Button from "./button.mjs";
6
5
  import { textStyle } from "../styles.mjs";
7
6
  const Overlay = ({
8
7
  className = "z-40 fixed inset-0",
9
- // linger: the tint stays 100ms on leave, so the panel above animates out first.
8
+ // linger: the tint stays 300ms on leave, so the panel above animates out first.
10
9
  linger = false,
11
10
  onClick,
12
11
  show = false,
@@ -19,9 +18,8 @@ const Overlay = ({
19
18
  as: "div",
20
19
  className: [
21
20
  className,
22
- "flex data-[closed]:opacity-0 " + motion,
23
- // The panel's 150 ms leave runs first, then the backdrop fades.
24
- linger && "data-[leave]:data-[closed]:delay-100",
21
+ "flex transition duration-200 ease-in data-[closed]:opacity-0",
22
+ linger && "data-[leave]:data-[closed]:delay-300",
25
23
  !style && "bg-black/50"
26
24
  ].filter(Boolean).join(" "),
27
25
  show: Boolean(show),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drawbridge/components",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "exports": {
5
5
  "./advertisement": {
6
6
  "types": "./types/advertisement.d.ts",
@@ -677,6 +677,11 @@
677
677
  "import": "./dist/dashboard/guard-navigation.mjs",
678
678
  "default": "./dist/dashboard/guard-navigation.js"
679
679
  },
680
+ "./dashboard/guide": {
681
+ "types": "./types/dashboard/guide.d.ts",
682
+ "import": "./dist/dashboard/guide.mjs",
683
+ "default": "./dist/dashboard/guide.js"
684
+ },
680
685
  "./dashboard/input-address-saved": {
681
686
  "types": "./types/dashboard/input-address-saved.d.ts",
682
687
  "import": "./dist/dashboard/input-address-saved.mjs",
@@ -807,11 +812,6 @@
807
812
  "import": "./dist/dashboard/lib/overage.mjs",
808
813
  "default": "./dist/dashboard/lib/overage.js"
809
814
  },
810
- "./dashboard/lib/rail": {
811
- "types": "./types/dashboard/lib/rail.d.ts",
812
- "import": "./dist/dashboard/lib/rail.mjs",
813
- "default": "./dist/dashboard/lib/rail.js"
814
- },
815
815
  "./dashboard/lib/sms": {
816
816
  "types": "./types/dashboard/lib/sms.d.ts",
817
817
  "import": "./dist/dashboard/lib/sms.mjs",
@@ -822,11 +822,6 @@
822
822
  "import": "./dist/dashboard/lib/table-actions.mjs",
823
823
  "default": "./dist/dashboard/lib/table-actions.js"
824
824
  },
825
- "./dashboard/lib/throttle": {
826
- "types": "./types/dashboard/lib/throttle.d.ts",
827
- "import": "./dist/dashboard/lib/throttle.mjs",
828
- "default": "./dist/dashboard/lib/throttle.js"
829
- },
830
825
  "./dashboard/lib/time-slots": {
831
826
  "types": "./types/dashboard/lib/time-slots.d.ts",
832
827
  "import": "./dist/dashboard/lib/time-slots.mjs",
@@ -967,11 +962,6 @@
967
962
  "import": "./dist/dashboard/template-not-found.mjs",
968
963
  "default": "./dist/dashboard/template-not-found.js"
969
964
  },
970
- "./dashboard/template-rail": {
971
- "types": "./types/dashboard/template-rail.d.ts",
972
- "import": "./dist/dashboard/template-rail.mjs",
973
- "default": "./dist/dashboard/template-rail.js"
974
- },
975
965
  "./dashboard/template-socket": {
976
966
  "types": "./types/dashboard/template-socket.d.ts",
977
967
  "import": "./dist/dashboard/template-socket.mjs",
@@ -1032,11 +1022,6 @@
1032
1022
  "import": "./dist/icons/bolt.mjs",
1033
1023
  "default": "./dist/icons/bolt.js"
1034
1024
  },
1035
- "./icons/book-open": {
1036
- "types": "./types/icons/book-open.d.ts",
1037
- "import": "./dist/icons/book-open.mjs",
1038
- "default": "./dist/icons/book-open.js"
1039
- },
1040
1025
  "./icons/calendar": {
1041
1026
  "types": "./types/icons/calendar.d.ts",
1042
1027
  "import": "./dist/icons/calendar.mjs",
@@ -1367,11 +1352,6 @@
1367
1352
  "import": "./dist/icons/tablet.mjs",
1368
1353
  "default": "./dist/icons/tablet.js"
1369
1354
  },
1370
- "./icons/task": {
1371
- "types": "./types/icons/task.d.ts",
1372
- "import": "./dist/icons/task.mjs",
1373
- "default": "./dist/icons/task.js"
1374
- },
1375
1355
  "./icons/threads": {
1376
1356
  "types": "./types/icons/threads.d.ts",
1377
1357
  "import": "./dist/icons/threads.mjs",
@@ -1713,6 +1693,7 @@
1713
1693
  "react-day-picker": ">=9.14.0",
1714
1694
  "react-google-recaptcha-v3": ">=1.10.1",
1715
1695
  "react-hook-form": ">=7.62.0",
1696
+ "react-joyride": ">=2.9.3",
1716
1697
  "react-share": ">=5.3.0",
1717
1698
  "recharts": ">=2.15.1",
1718
1699
  "socket.io-client": ">=4.8.3",
@@ -1782,6 +1763,9 @@
1782
1763
  "react-day-picker": {
1783
1764
  "optional": true
1784
1765
  },
1766
+ "react-joyride": {
1767
+ "optional": true
1768
+ },
1785
1769
  "react-share": {
1786
1770
  "optional": true
1787
1771
  },
@@ -1797,9 +1781,9 @@
1797
1781
  },
1798
1782
  "devDependencies": {
1799
1783
  "@analytics/google-tag-manager": "0.5.5",
1800
- "@drawbridge/drawbridge-agents": "0.1.104",
1784
+ "@drawbridge/drawbridge-agents": "0.1.102",
1801
1785
  "@drawbridge/drawbridge-telemetry": "0.0.19",
1802
- "@drawbridge/drawbridge-utils": "0.0.230",
1786
+ "@drawbridge/drawbridge-utils": "0.0.232",
1803
1787
  "@headlessui/react": "2.2.9",
1804
1788
  "@hookform/resolvers": "3.1.1",
1805
1789
  "@sentry/nextjs": "10.58.0",
@@ -1838,6 +1822,7 @@
1838
1822
  "react-dom": "18.3.1",
1839
1823
  "react-google-recaptcha-v3": "1.10.1",
1840
1824
  "react-hook-form": "7.62.0",
1825
+ "react-joyride": "2.9.3",
1841
1826
  "react-share": "5.3.0",
1842
1827
  "react-test-renderer": "18.3.1",
1843
1828
  "recharts": "2.15.1",
@@ -19,17 +19,13 @@ export interface CardTaskButton {
19
19
  }
20
20
 
21
21
  export interface CardTaskProps {
22
- // A small badge at the card's top right, naming its area.
23
- badge?: ReactNode;
24
22
  // Rendered only with an href or onClick.
25
23
  button?: CardTaskButton;
26
24
  className?: string;
27
25
  'data-guide'?: string;
28
26
  message?: ReactNode;
29
- // The button under the words, for a card too narrow to sit them side by side.
30
- stack?: boolean;
31
27
  title?: ReactNode;
32
- type?: 'default' | 'error' | 'recommended' | 'success' | 'warning';
28
+ type?: 'default' | 'error' | 'success' | 'warning';
33
29
  [ key: string ]: unknown;
34
30
  }
35
31