@selectwin/kit 0.1.241 → 0.1.243

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,4 +1,4 @@
1
- export type SelectBrand = 'pipedrive' | 'rdstation' | 'hubspot' | 'meta' | 'tiktok' | 'googletagmanager' | 'googleanalytics' | 'snapchat' | 'whatsapp' | 'notazz' | 'enotas' | 'gmail' | 'yahoo' | 'apple' | 'shopify' | 'woocommerce' | 'hotmart' | 'kiwify' | 'ticto' | 'n8n' | 'selectwin' | 'claude' | 'chatgpt' | 'cursor' | 'vscode';
1
+ export type SelectBrand = 'pipedrive' | 'rdstation' | 'hubspot' | 'meta' | 'tiktok' | 'googletagmanager' | 'googleanalytics' | 'snapchat' | 'whatsapp' | 'notazz' | 'enotas' | 'gmail' | 'yahoo' | 'apple' | 'shopify' | 'woocommerce' | 'hotmart' | 'kiwify' | 'ticto' | 'n8n' | 'selectwin' | 'claude' | 'chatgpt' | 'cursor' | 'vscode' | 'facebook' | 'instagram' | 'google' | 'googleads' | 'youtube' | 'pinterest' | 'x' | 'telegram' | 'messenger' | 'threads';
2
2
  /** O nome de cada marca — o rótulo para leitor de tela quando quem chama não passa outro. */
3
3
  export declare const SELECT_BRAND_NAMES: Record<SelectBrand, string>;
4
4
  export interface SelectBrandIconProps {
@@ -26,7 +26,17 @@ var n = {
26
26
  claude: "Claude",
27
27
  chatgpt: "ChatGPT",
28
28
  cursor: "Cursor",
29
- vscode: "VS Code"
29
+ vscode: "VS Code",
30
+ facebook: "Facebook",
31
+ instagram: "Instagram",
32
+ google: "Google",
33
+ googleads: "Google Ads",
34
+ youtube: "YouTube",
35
+ pinterest: "Pinterest",
36
+ x: "X",
37
+ telegram: "Telegram",
38
+ messenger: "Messenger",
39
+ threads: "Threads"
30
40
  };
31
41
  function r({ brand: n }) {
32
42
  switch (n) {
@@ -307,6 +317,86 @@ function r({ brand: n }) {
307
317
  d: "M23.15 2.587L18.21.21a1.494 1.494 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a.999.999 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a.999.999 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.492 1.492 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352zm-5.146 14.861L10.826 12l7.178-5.448v10.896z"
308
318
  })
309
319
  });
320
+ case "facebook": return /* @__PURE__ */ e("svg", {
321
+ viewBox: "0 0 24 24",
322
+ "aria-hidden": "true",
323
+ children: /* @__PURE__ */ e("path", {
324
+ fill: "#0866FF",
325
+ d: "M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z"
326
+ })
327
+ });
328
+ case "instagram": return /* @__PURE__ */ e("svg", {
329
+ viewBox: "0 0 24 24",
330
+ "aria-hidden": "true",
331
+ children: /* @__PURE__ */ e("path", {
332
+ fill: "#FF0069",
333
+ d: "M7.0301.084c-1.2768.0602-2.1487.264-2.911.5634-.7888.3075-1.4575.72-2.1228 1.3877-.6652.6677-1.075 1.3368-1.3802 2.127-.2954.7638-.4956 1.6365-.552 2.914-.0564 1.2775-.0689 1.6882-.0626 4.947.0062 3.2586.0206 3.6671.0825 4.9473.061 1.2765.264 2.1482.5635 2.9107.308.7889.72 1.4573 1.388 2.1228.6679.6655 1.3365 1.0743 2.1285 1.38.7632.295 1.6361.4961 2.9134.552 1.2773.056 1.6884.069 4.9462.0627 3.2578-.0062 3.668-.0207 4.9478-.0814 1.28-.0607 2.147-.2652 2.9098-.5633.7889-.3086 1.4578-.72 2.1228-1.3881.665-.6682 1.0745-1.3378 1.3795-2.1284.2957-.7632.4966-1.636.552-2.9124.056-1.2809.0692-1.6898.063-4.948-.0063-3.2583-.021-3.6668-.0817-4.9465-.0607-1.2797-.264-2.1487-.5633-2.9117-.3084-.7889-.72-1.4568-1.3876-2.1228C21.2982 1.33 20.628.9208 19.8378.6165 19.074.321 18.2017.1197 16.9244.0645 15.6471.0093 15.236-.005 11.977.0014 8.718.0076 8.31.0215 7.0301.0839m.1402 21.6932c-1.17-.0509-1.8053-.2453-2.2287-.408-.5606-.216-.96-.4771-1.3819-.895-.422-.4178-.6811-.8186-.9-1.378-.1644-.4234-.3624-1.058-.4171-2.228-.0595-1.2645-.072-1.6442-.079-4.848-.007-3.2037.0053-3.583.0607-4.848.05-1.169.2456-1.805.408-2.2282.216-.5613.4762-.96.895-1.3816.4188-.4217.8184-.6814 1.3783-.9003.423-.1651 1.0575-.3614 2.227-.4171 1.2655-.06 1.6447-.072 4.848-.079 3.2033-.007 3.5835.005 4.8495.0608 1.169.0508 1.8053.2445 2.228.408.5608.216.96.4754 1.3816.895.4217.4194.6816.8176.9005 1.3787.1653.4217.3617 1.056.4169 2.2263.0602 1.2655.0739 1.645.0796 4.848.0058 3.203-.0055 3.5834-.061 4.848-.051 1.17-.245 1.8055-.408 2.2294-.216.5604-.4763.96-.8954 1.3814-.419.4215-.8181.6811-1.3783.9-.4224.1649-1.0577.3617-2.2262.4174-1.2656.0595-1.6448.072-4.8493.079-3.2045.007-3.5825-.006-4.848-.0608M16.953 5.5864A1.44 1.44 0 1 0 18.39 4.144a1.44 1.44 0 0 0-1.437 1.4424M5.8385 12.012c.0067 3.4032 2.7706 6.1557 6.173 6.1493 3.4026-.0065 6.157-2.7701 6.1506-6.1733-.0065-3.4032-2.771-6.1565-6.174-6.1498-3.403.0067-6.156 2.771-6.1496 6.1738M8 12.0077a4 4 0 1 1 4.008 3.9921A3.9996 3.9996 0 0 1 8 12.0077"
334
+ })
335
+ });
336
+ case "google": return /* @__PURE__ */ e("svg", {
337
+ viewBox: "0 0 24 24",
338
+ "aria-hidden": "true",
339
+ children: /* @__PURE__ */ e("path", {
340
+ fill: "#4285F4",
341
+ d: "M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z"
342
+ })
343
+ });
344
+ case "googleads": return /* @__PURE__ */ e("svg", {
345
+ viewBox: "0 0 24 24",
346
+ "aria-hidden": "true",
347
+ children: /* @__PURE__ */ e("path", {
348
+ fill: "#4285F4",
349
+ d: "M3.9998 22.9291C1.7908 22.9291 0 21.1383 0 18.9293s1.7908-3.9998 3.9998-3.9998 3.9998 1.7908 3.9998 3.9998-1.7908 3.9998-3.9998 3.9998zm19.4643-6.0004L15.4632 3.072C14.3586 1.1587 11.9121.5028 9.9988 1.6074S7.4295 5.1585 8.5341 7.0718l8.0009 13.8567c1.1046 1.9133 3.5511 2.5679 5.4644 1.4646 1.9134-1.1046 2.568-3.5511 1.4647-5.4644zM7.5137 4.8438L1.5645 15.1484A4.5 4.5 0 0 1 4 14.4297c2.5597-.0075 4.6248 2.1585 4.4941 4.7148l3.2168-5.5723-3.6094-6.25c-.4499-.7793-.6322-1.6394-.5878-2.4784z"
350
+ })
351
+ });
352
+ case "youtube": return /* @__PURE__ */ e("svg", {
353
+ viewBox: "0 0 24 24",
354
+ "aria-hidden": "true",
355
+ children: /* @__PURE__ */ e("path", {
356
+ fill: "#FF0000",
357
+ d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"
358
+ })
359
+ });
360
+ case "pinterest": return /* @__PURE__ */ e("svg", {
361
+ viewBox: "0 0 24 24",
362
+ "aria-hidden": "true",
363
+ children: /* @__PURE__ */ e("path", {
364
+ fill: "#BD081C",
365
+ d: "M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026L12.017 0z"
366
+ })
367
+ });
368
+ case "x": return /* @__PURE__ */ e("svg", {
369
+ viewBox: "0 0 24 24",
370
+ "aria-hidden": "true",
371
+ children: /* @__PURE__ */ e("path", {
372
+ className: "select-brandicon__ink",
373
+ d: "M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"
374
+ })
375
+ });
376
+ case "telegram": return /* @__PURE__ */ e("svg", {
377
+ viewBox: "0 0 24 24",
378
+ "aria-hidden": "true",
379
+ children: /* @__PURE__ */ e("path", {
380
+ fill: "#26A5E4",
381
+ d: "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"
382
+ })
383
+ });
384
+ case "messenger": return /* @__PURE__ */ e("svg", {
385
+ viewBox: "0 0 24 24",
386
+ "aria-hidden": "true",
387
+ children: /* @__PURE__ */ e("path", {
388
+ fill: "#0866FF",
389
+ d: "M12 0C5.24 0 0 4.952 0 11.64c0 3.499 1.434 6.521 3.769 8.61a.96.96 0 0 1 .323.683l.065 2.135a.96.96 0 0 0 1.347.85l2.381-1.053a.96.96 0 0 1 .641-.046A13 13 0 0 0 12 23.28c6.76 0 12-4.952 12-11.64S18.76 0 12 0m6.806 7.44c.522-.03.971.567.63 1.094l-4.178 6.457a.707.707 0 0 1-.977.208l-3.87-2.504a.44.44 0 0 0-.49.007l-4.363 3.01c-.637.438-1.415-.317-.995-.966l4.179-6.457a.706.706 0 0 1 .977-.21l3.87 2.505c.15.097.344.094.491-.007l4.362-3.008a.7.7 0 0 1 .364-.13"
390
+ })
391
+ });
392
+ case "threads": return /* @__PURE__ */ e("svg", {
393
+ viewBox: "0 0 24 24",
394
+ "aria-hidden": "true",
395
+ children: /* @__PURE__ */ e("path", {
396
+ className: "select-brandicon__ink",
397
+ d: "M18.263 11.097c-.03-3.486-1.92-5.586-5.111-5.586-2.13 0-3.922.963-4.863 2.499l2.062 1.438c.535-.843 1.272-1.543 2.628-1.543 1.528 0 2.318.85 2.544 2.431a15 15 0 0 0-2.236-.173c-4.125 0-6.068 1.867-6.068 4.336s1.943 3.99 4.804 3.99c3.139 0 5.013-2.115 5.781-4.735.798.361 1.348 1.204 1.348 2.47 0 3.387-3.907 5.232-7.22 5.232-4.885 0-8.077-3.207-8.077-8.424 0-6.392 4.223-10.487 9.9-10.487 3.808 0 5.69 1.671 6.97 3.914l2.108-1.475C21.44 2.078 18.331 0 13.663 0 6.227 0 1.168 5.277 1.168 12.934c0 7 4.953 11.066 10.856 11.066 4.878 0 9.809-2.846 9.809-7.716 0-2.545-1.46-4.231-3.569-5.187m-6.33 4.855c-1.077 0-2.026-.512-2.026-1.453 0-1.483 1.822-1.934 3.606-1.934.678 0 1.34.045 1.927.173-.422 1.927-1.671 3.215-3.508 3.214Z"
398
+ })
399
+ });
310
400
  }
311
401
  }
312
402
  function i({ brand: t, size: i = 32, label: a, bare: o = !1 }) {
@@ -3,7 +3,10 @@ type SelectKpiBandOwnProps = {
3
3
  children: ReactNode;
4
4
  /** 0.1.210: `dl` para a faixa de números só de leitura (os `SelectKpiCard` viram `<dt>` e `<dd>`). Padrão `div`. */
5
5
  as?: 'div' | 'dl';
6
- /** 0.1.230: as colunas da faixa (4 → 4/2/1, 3 → 3/1, 2 → 2/1), sem o buraco da grade. Padrão: quebra sozinha. */
6
+ /**
7
+ * 0.1.230: as colunas da faixa (4 → 4/2/1, 3 → 3/1, 2 → 2/1), sem o buraco da grade. Padrão: quebra sozinha — desde a
8
+ * 0.1.242 em flex, esticando a última linha (5 números numa largura média viram 4 + 1 sem células vazias).
9
+ */
7
10
  columns?: 2 | 3 | 4;
8
11
  /** 0.1.235: os painéis embaixo dos números, no mesmo card (`SelectKpiBandPanel`). Só na faixa `div`. */
9
12
  panels?: ReactNode;
@@ -89,6 +89,9 @@ export interface SelectKitMessages {
89
89
  setupGuide: Record<'done' | 'todo' | 'next' | 'skipped' | 'waiting', string> & {
90
90
  progressLabel: string;
91
91
  progress: (done: string, total: string) => string;
92
+ /** 0.1.243: o botão do guia (`onMinimizedChange`). */
93
+ show: string;
94
+ minimize: string;
92
95
  };
93
96
  /** 0.1.230: os textos dos gráficos — a linha da dica da rosca (`SelectDonut`). */
94
97
  chart: {
@@ -91,7 +91,9 @@ var r = {
91
91
  skipped: "pulado",
92
92
  waiting: "aguardando",
93
93
  progressLabel: "Progresso",
94
- progress: (e, t) => `${e} de ${t}`
94
+ progress: (e, t) => `${e} de ${t}`,
95
+ show: "Mostrar",
96
+ minimize: "Minimizar"
95
97
  },
96
98
  chart: { value: "Valor" },
97
99
  sideNav: { pending: (e) => `${e} (com pendências)` },
@@ -267,7 +269,9 @@ var r = {
267
269
  skipped: "skipped",
268
270
  waiting: "waiting",
269
271
  progressLabel: "Progress",
270
- progress: (e, t) => `${e} of ${t}`
272
+ progress: (e, t) => `${e} of ${t}`,
273
+ show: "Show",
274
+ minimize: "Minimize"
271
275
  },
272
276
  chart: { value: "Value" },
273
277
  sideNav: { pending: (e) => `${e} (pending)` },
@@ -40,6 +40,12 @@ type SelectSetupGuideOwnProps = {
40
40
  groups: SelectSetupGroup[];
41
41
  /** Só a cabeça: o guia vira uma faixa. */
42
42
  minimized?: boolean;
43
+ /**
44
+ * 0.1.243: com ela, o guia desenha o botão de mostrar/minimizar — UM controle só, de largura fixa, com a seta que vira,
45
+ * antes das `actions`. Antes cada tela trocava um botão ("Mostrar") por um link ("Minimizar"), de tamanhos diferentes: o
46
+ * cabeçalho mudava de altura e a barra de progresso deslizava enquanto o corpo abria (dono, 10/11/2026, o Club).
47
+ */
48
+ onMinimizedChange?: (minimized: boolean) => void;
43
49
  /** Cor da barra — `sandbox` quando o guia acompanha o ambiente de teste. */
44
50
  tone?: 'default' | 'sandbox';
45
51
  /**
@@ -1,23 +1,25 @@
1
1
  /* empty css */
2
- import { safeHref as e } from "./internal/safeHref.js";
3
- import { formatSelectNumber as t, useSelectLocale as n, useSelectMessages as r } from "./SelectLocale.js";
4
- import { useInsideFrame as i } from "./internal/frame.js";
5
- import { inertProps as a } from "./internal/inert.js";
6
- import { SelectRing as o } from "./SelectRing.js";
7
- import { forwardRef as s, useEffect as c, useRef as l, useState as u } from "react";
8
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
9
- import { Link as m } from "react-router-dom";
2
+ import { SelectButton as e } from "./SelectButton.js";
3
+ import { safeHref as t } from "./internal/safeHref.js";
4
+ import { ChevronDownIcon as n } from "./icons.js";
5
+ import { formatSelectNumber as r, useSelectLocale as i, useSelectMessages as a } from "./SelectLocale.js";
6
+ import { useInsideFrame as o } from "./internal/frame.js";
7
+ import { inertProps as s } from "./internal/inert.js";
8
+ import { SelectRing as c } from "./SelectRing.js";
9
+ import { forwardRef as l, useEffect as u, useRef as d, useState as f } from "react";
10
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
11
+ import { Link as g } from "react-router-dom";
10
12
  //#region src/SelectSetupGuide.tsx
11
- function h({ status: e }) {
12
- return /* @__PURE__ */ f("span", {
13
+ function _({ status: e }) {
14
+ return /* @__PURE__ */ m("span", {
13
15
  className: `select-setupguide__icon select-setupguide__icon--${e}`,
14
16
  "aria-hidden": "true",
15
- children: e === "done" && /* @__PURE__ */ f("svg", {
17
+ children: e === "done" && /* @__PURE__ */ m("svg", {
16
18
  viewBox: "0 0 16 16",
17
19
  width: "10",
18
20
  height: "10",
19
21
  fill: "none",
20
- children: /* @__PURE__ */ f("path", {
22
+ children: /* @__PURE__ */ m("path", {
21
23
  d: "M3.5 8.5l3 3 6-7",
22
24
  stroke: "currentColor",
23
25
  strokeWidth: "2",
@@ -27,7 +29,7 @@ function h({ status: e }) {
27
29
  })
28
30
  });
29
31
  }
30
- var g = /* @__PURE__ */ f("svg", {
32
+ var v = /* @__PURE__ */ m("svg", {
31
33
  viewBox: "0 0 20 20",
32
34
  width: "16",
33
35
  height: "16",
@@ -37,178 +39,187 @@ var g = /* @__PURE__ */ f("svg", {
37
39
  strokeLinecap: "round",
38
40
  strokeLinejoin: "round",
39
41
  "aria-hidden": "true",
40
- children: /* @__PURE__ */ f("path", { d: "M8 5l5 5-5 5" })
42
+ children: /* @__PURE__ */ m("path", { d: "M8 5l5 5-5 5" })
41
43
  });
42
- function _({ group: t, justDone: n }) {
43
- let i = r().setupGuide, [o, s] = u(!!(t.collapsible && t.defaultCollapsed)), c = !t.collapsible || !o;
44
- return /* @__PURE__ */ p("div", {
44
+ function y({ group: e, justDone: n }) {
45
+ let r = a().setupGuide, [i, o] = f(!!(e.collapsible && e.defaultCollapsed)), c = !e.collapsible || !i;
46
+ return /* @__PURE__ */ h("div", {
45
47
  className: `select-setupguide__group${c ? "" : " is-collapsed"}`,
46
- children: [t.collapsible ? /* @__PURE__ */ p("button", {
48
+ children: [e.collapsible ? /* @__PURE__ */ h("button", {
47
49
  type: "button",
48
50
  className: "select-setupguide__grouptitle select-setupguide__grouptoggle",
49
51
  "aria-expanded": c,
50
- onClick: () => s((e) => !e),
51
- children: [/* @__PURE__ */ f("span", { children: t.title }), g]
52
- }) : /* @__PURE__ */ f("div", {
52
+ onClick: () => o((e) => !e),
53
+ children: [/* @__PURE__ */ m("span", { children: e.title }), v]
54
+ }) : /* @__PURE__ */ m("div", {
53
55
  className: "select-setupguide__grouptitle",
54
- children: t.title
55
- }), /* @__PURE__ */ f("div", {
56
+ children: e.title
57
+ }), /* @__PURE__ */ m("div", {
56
58
  className: "select-setupguide__collapse",
57
- ...a(!c),
58
- children: /* @__PURE__ */ f("ul", {
59
+ ...s(!c),
60
+ children: /* @__PURE__ */ m("ul", {
59
61
  className: "select-setupguide__list",
60
- children: t.steps.map((t) => {
61
- let r = t.to != null || t.href != null ? e(t.to ?? t.href) : void 0, a = r !== void 0, o = /* @__PURE__ */ p(d, { children: [t.title, /* @__PURE__ */ p("span", {
62
+ children: e.steps.map((e) => {
63
+ let i = e.to != null || e.href != null ? t(e.to ?? e.href) : void 0, a = i !== void 0, o = /* @__PURE__ */ h(p, { children: [e.title, /* @__PURE__ */ h("span", {
62
64
  className: "select-setupguide__sr",
63
- children: [" — ", i[t.status]]
65
+ children: [" — ", r[e.status]]
64
66
  })] });
65
- return /* @__PURE__ */ p("li", {
66
- className: `select-setupguide__step is-${t.status}${t.onSelect || a ? " is-link" : ""}${n.has(t.id) ? " is-just-done" : ""}`,
67
+ return /* @__PURE__ */ h("li", {
68
+ className: `select-setupguide__step is-${e.status}${e.onSelect || a ? " is-link" : ""}${n.has(e.id) ? " is-just-done" : ""}`,
67
69
  children: [
68
- /* @__PURE__ */ f(h, { status: t.status }),
69
- /* @__PURE__ */ p("span", {
70
+ /* @__PURE__ */ m(_, { status: e.status }),
71
+ /* @__PURE__ */ h("span", {
70
72
  className: "select-setupguide__text",
71
- children: [a && t.to != null ? /* @__PURE__ */ f(m, {
72
- to: r,
73
+ children: [a && e.to != null ? /* @__PURE__ */ m(g, {
74
+ to: i,
73
75
  className: "select-setupguide__steptitle select-setupguide__go",
74
76
  children: o
75
- }) : a ? /* @__PURE__ */ f("a", {
76
- href: r,
77
+ }) : a ? /* @__PURE__ */ m("a", {
78
+ href: i,
77
79
  className: "select-setupguide__steptitle select-setupguide__go",
78
80
  children: o
79
- }) : t.onSelect ? /* @__PURE__ */ p("button", {
81
+ }) : e.onSelect ? /* @__PURE__ */ h("button", {
80
82
  type: "button",
81
83
  className: "select-setupguide__steptitle select-setupguide__go",
82
- onClick: t.onSelect,
83
- children: [t.title, /* @__PURE__ */ p("span", {
84
+ onClick: e.onSelect,
85
+ children: [e.title, /* @__PURE__ */ h("span", {
84
86
  className: "select-setupguide__sr",
85
- children: [" — ", i[t.status]]
87
+ children: [" — ", r[e.status]]
86
88
  })]
87
- }) : /* @__PURE__ */ p("span", {
89
+ }) : /* @__PURE__ */ h("span", {
88
90
  className: "select-setupguide__steptitle",
89
- children: [t.title, /* @__PURE__ */ p("span", {
91
+ children: [e.title, /* @__PURE__ */ h("span", {
90
92
  className: "select-setupguide__sr",
91
- children: [" — ", i[t.status]]
93
+ children: [" — ", r[e.status]]
92
94
  })]
93
- }), t.description && /* @__PURE__ */ f("span", {
95
+ }), e.description && /* @__PURE__ */ m("span", {
94
96
  className: "select-setupguide__stepdesc",
95
- children: t.description
97
+ children: e.description
96
98
  })]
97
99
  }),
98
- t.trailing ? /* @__PURE__ */ f("span", {
100
+ e.trailing ? /* @__PURE__ */ m("span", {
99
101
  className: "select-setupguide__trailing",
100
- children: t.trailing
101
- }) : (t.onSelect || a) && t.status !== "done" ? /* @__PURE__ */ f("span", {
102
+ children: e.trailing
103
+ }) : (e.onSelect || a) && e.status !== "done" ? /* @__PURE__ */ m("span", {
102
104
  className: "select-setupguide__chevron",
103
- children: g
105
+ children: v
104
106
  }) : null
105
107
  ]
106
- }, t.id);
108
+ }, e.id);
107
109
  })
108
110
  })
109
111
  })]
110
112
  });
111
113
  }
112
- var v = s(function({ title: e, description: s, progress: u, actions: d, next: m, groups: h, minimized: g = !1, tone: v = "default", variant: y = "default", className: b, ...x }, S) {
113
- let C = r().setupGuide, w = n(), T = u && u.total > 0 ? Math.round(u.done / u.total * 100) : 0, E = y === "strip", D = i(), O = l(null), k = /* @__PURE__ */ new Set(), A = h.flatMap((e) => e.steps);
114
- if (O.current) for (let e of A) e.status === "done" && O.current.get(e.id) !== "done" && k.add(e.id);
115
- return c(() => {
116
- O.current = new Map(A.map((e) => [e.id, e.status]));
117
- }), /* @__PURE__ */ p("section", {
118
- ref: S,
119
- ...x,
120
- className: `select-setupguide${D ? " select-setupguide--nested" : ""}${g ? " is-minimized" : ""}${v === "sandbox" ? " select-setupguide--sandbox" : ""}${E ? " select-setupguide--strip" : ""}${b ? " " + b : ""}`,
121
- children: [/* @__PURE__ */ p("div", {
114
+ var b = l(function({ title: t, description: l, progress: f, actions: p, next: g, groups: _, minimized: v = !1, onMinimizedChange: b, tone: x = "default", variant: S = "default", className: C, ...w }, T) {
115
+ let E = a().setupGuide, D = i(), O = f && f.total > 0 ? Math.round(f.done / f.total * 100) : 0, k = S === "strip", A = o(), j = d(null), M = /* @__PURE__ */ new Set(), N = _.flatMap((e) => e.steps);
116
+ if (j.current) for (let e of N) e.status === "done" && j.current.get(e.id) !== "done" && M.add(e.id);
117
+ return u(() => {
118
+ j.current = new Map(N.map((e) => [e.id, e.status]));
119
+ }), /* @__PURE__ */ h("section", {
120
+ ref: T,
121
+ ...w,
122
+ className: `select-setupguide${A ? " select-setupguide--nested" : ""}${v ? " is-minimized" : ""}${x === "sandbox" ? " select-setupguide--sandbox" : ""}${k ? " select-setupguide--strip" : ""}${C ? " " + C : ""}`,
123
+ children: [/* @__PURE__ */ h("div", {
122
124
  className: "select-setupguide__head",
123
125
  children: [
124
- E && u && /* @__PURE__ */ f(o, {
126
+ k && f && /* @__PURE__ */ m(c, {
125
127
  className: "select-setupguide__ring",
126
- value: u.done,
127
- max: Math.max(u.total, 1),
128
+ value: f.done,
129
+ max: Math.max(f.total, 1),
128
130
  size: 40,
129
131
  thickness: 4,
130
- tone: v === "sandbox" ? "brand" : "success",
131
- label: `${t(u.done, w)}/${t(u.total, w)}`,
132
- ariaLabel: `${C.progressLabel}: ${typeof u.label == "string" ? u.label : C.progress(t(u.done, w), t(u.total, w))}`
132
+ tone: x === "sandbox" ? "brand" : "success",
133
+ label: `${r(f.done, D)}/${r(f.total, D)}`,
134
+ ariaLabel: `${E.progressLabel}: ${typeof f.label == "string" ? f.label : E.progress(r(f.done, D), r(f.total, D))}`
133
135
  }),
134
- /* @__PURE__ */ p("div", {
136
+ /* @__PURE__ */ h("div", {
135
137
  className: "select-setupguide__heading",
136
- children: [/* @__PURE__ */ f("h2", {
138
+ children: [/* @__PURE__ */ m("h2", {
137
139
  className: "select-setupguide__title",
138
- children: e
139
- }), s && /* @__PURE__ */ f("p", {
140
+ children: t
141
+ }), l && /* @__PURE__ */ m("p", {
140
142
  className: "select-setupguide__desc",
141
- children: s
143
+ children: l
142
144
  })]
143
145
  }),
144
- u && !E && /* @__PURE__ */ p("div", {
146
+ f && !k && /* @__PURE__ */ h("div", {
145
147
  className: "select-setupguide__progress",
146
- children: [/* @__PURE__ */ f("div", {
148
+ children: [/* @__PURE__ */ m("div", {
147
149
  className: "select-setupguide__bar",
148
150
  role: "progressbar",
149
151
  "aria-valuemin": 0,
150
- "aria-valuemax": u.total,
151
- "aria-valuenow": u.done,
152
- "aria-label": C.progressLabel,
153
- children: /* @__PURE__ */ f("span", {
152
+ "aria-valuemax": f.total,
153
+ "aria-valuenow": f.done,
154
+ "aria-label": E.progressLabel,
155
+ children: /* @__PURE__ */ m("span", {
154
156
  className: "select-setupguide__fill",
155
- style: { width: `${Math.max(T, 3)}%` }
157
+ style: { width: `${Math.max(O, 3)}%` }
156
158
  })
157
- }), /* @__PURE__ */ f("span", {
159
+ }), /* @__PURE__ */ m("span", {
158
160
  className: "select-setupguide__count",
159
- children: u.label ?? C.progress(t(u.done, w), t(u.total, w))
161
+ children: f.label ?? E.progress(r(f.done, D), r(f.total, D))
160
162
  })]
161
163
  }),
162
- d && /* @__PURE__ */ f("div", {
164
+ (p || b) && /* @__PURE__ */ h("div", {
163
165
  className: "select-setupguide__actions",
164
- children: d
166
+ children: [b && /* @__PURE__ */ m(e, {
167
+ variant: "secondary",
168
+ size: "sm",
169
+ inline: !0,
170
+ className: "select-setupguide__toggle",
171
+ trailingIcon: /* @__PURE__ */ m(n, {}),
172
+ "aria-expanded": !v,
173
+ onClick: () => b(!v),
174
+ children: v ? E.show : E.minimize
175
+ }), p]
165
176
  })
166
177
  ]
167
- }), /* @__PURE__ */ f("div", {
178
+ }), /* @__PURE__ */ m("div", {
168
179
  className: "select-setupguide__fold",
169
- ...a(g),
170
- children: /* @__PURE__ */ p("div", {
180
+ ...s(v),
181
+ children: /* @__PURE__ */ h("div", {
171
182
  className: "select-setupguide__body",
172
- children: [m && /* @__PURE__ */ f("div", {
183
+ children: [g && /* @__PURE__ */ m("div", {
173
184
  className: "select-setupguide__next",
174
- children: m
175
- }), /* @__PURE__ */ f("div", {
185
+ children: g
186
+ }), /* @__PURE__ */ m("div", {
176
187
  className: "select-setupguide__steps",
177
- children: h.map((e, t) => /* @__PURE__ */ f(_, {
188
+ children: _.map((e, t) => /* @__PURE__ */ m(y, {
178
189
  group: e,
179
- justDone: k
190
+ justDone: M
180
191
  }, t))
181
192
  })]
182
193
  })
183
194
  })]
184
195
  });
185
196
  });
186
- function y({ eyebrow: e, title: t, children: n, actions: r }) {
187
- return /* @__PURE__ */ p("div", {
197
+ function x({ eyebrow: e, title: t, children: n, actions: r }) {
198
+ return /* @__PURE__ */ h("div", {
188
199
  className: "select-setupnext",
189
- children: [/* @__PURE__ */ p("div", {
200
+ children: [/* @__PURE__ */ h("div", {
190
201
  className: "select-setupnext__text",
191
202
  children: [
192
- e && /* @__PURE__ */ f("div", {
203
+ e && /* @__PURE__ */ m("div", {
193
204
  className: "select-setupnext__eyebrow",
194
205
  children: e
195
206
  }),
196
- /* @__PURE__ */ f("h3", {
207
+ /* @__PURE__ */ m("h3", {
197
208
  className: "select-setupnext__title",
198
209
  children: t
199
210
  }),
200
- n && /* @__PURE__ */ f("div", {
211
+ n && /* @__PURE__ */ m("div", {
201
212
  className: "select-setupnext__body",
202
213
  children: n
203
214
  })
204
215
  ]
205
- }), r && /* @__PURE__ */ f("div", {
216
+ }), r && /* @__PURE__ */ m("div", {
206
217
  className: "select-setupnext__actions",
207
218
  children: r
208
219
  })]
209
220
  });
210
221
  }
211
222
  //#endregion
212
- export { v as SelectSetupGuide, y as SelectSetupNext };
223
+ export { b as SelectSetupGuide, x as SelectSetupNext };
213
224
 
214
225
  //# sourceMappingURL=SelectSetupGuide.js.map