@pixstella/components 0.3.0 → 0.3.1

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 (38) hide show
  1. package/COPY-PASTE.md +109 -0
  2. package/README.md +9 -75
  3. package/dist/app/components/Dashboard/dashboardRegistry.cjs +1 -1
  4. package/dist/app/components/Dashboard/dashboardRegistry.mjs +202 -201
  5. package/dist/app/components/Table/DataTable.cjs +1 -1
  6. package/dist/app/components/Table/DataTable.mjs +46 -49
  7. package/dist/app/components/ai/ConfidenceSuggestions/ConfidenceSuggestions.cjs +1 -1
  8. package/dist/app/components/ai/ConfidenceSuggestions/ConfidenceSuggestions.mjs +53 -53
  9. package/dist/app/components/ai/ProposalCard/ProposalCard.cjs +1 -1
  10. package/dist/app/components/ai/ProposalCard/ProposalCard.mjs +227 -227
  11. package/dist/app/components/ai/ReviewTable/ReviewTable.cjs +1 -1
  12. package/dist/app/components/ai/ReviewTable/ReviewTable.mjs +81 -81
  13. package/dist/app/components/ai/SuggestionChecklist/SuggestionChecklist.cjs +1 -1
  14. package/dist/app/components/ai/SuggestionChecklist/SuggestionChecklist.mjs +15 -14
  15. package/dist/app/components/ui/AuthSection/AuthSection.cjs +1 -1
  16. package/dist/app/components/ui/AuthSection/AuthSection.mjs +19 -18
  17. package/dist/app/components/ui/Checkbox/Checkbox.cjs +1 -0
  18. package/dist/app/components/ui/Checkbox/Checkbox.css +1 -0
  19. package/dist/app/components/ui/Checkbox/Checkbox.mjs +87 -0
  20. package/dist/app/components/ui/DataGrid/DataGrid.cjs +1 -1
  21. package/dist/app/components/ui/DataGrid/DataGrid.mjs +196 -199
  22. package/dist/app/components/ui/PreviewConfirmDialog/PreviewConfirmDialog.cjs +1 -1
  23. package/dist/app/components/ui/PreviewConfirmDialog/PreviewConfirmDialog.mjs +47 -48
  24. package/dist/browser/pixstella.esm.js +70 -70
  25. package/dist/browser/pixstella.standalone.js +72 -72
  26. package/dist/index.cjs +1 -1
  27. package/dist/index.d.cts +32 -1
  28. package/dist/index.d.ts +32 -1
  29. package/dist/index.mjs +2886 -2884
  30. package/dist/registry/files/174512e8f294ad2f +101 -0
  31. package/dist/registry/files/4c7e419c8caf02c3 +119 -0
  32. package/dist/registry/files/{f23e788832b45fc0 → 67ac8b4abe3fc564} +2 -1
  33. package/dist/registry/files/{e84f443f3fc3f261 → 995feaa023211faf} +4 -8
  34. package/dist/registry/files/{5ba71aa83263995e → a27872a7d58aeb58} +4 -5
  35. package/dist/registry/files/{162078d04cb26276 → df919b524be27e88} +4 -5
  36. package/dist/registry/index.json +1 -1
  37. package/dist/styles.css +3 -0
  38. package/package.json +3 -10
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),d=require("react"),K=require("../../ui/Button/Button.cjs");;/* empty css */const W={region:"Rows to review",selectAll:"Select all",selectRow:n=>`Select ${n}`,exists:"exists",create:n=>`Create ${n}`,apply:n=>`Apply ${n}`,working:"Working…",selected:(n,o)=>`${n} of ${o} selected`,fillMissing:n=>`Fill in ${n} missing ${n===1?"value":"values"} to continue`,missingLabel:(n,o)=>`${n} for ${o}`,missingPlaceholder:"Missing",done:n=>`Done: ${n} ${n===1?"row":"rows"}.`,error:"Couldn't finish. Nothing was lost; try again.",now:n=>s.jsxs(s.Fragment,{children:["now ",n]}),inFile:n=>s.jsxs(s.Fragment,{children:["in file ",n]}),fileName:n=>`in the file: ${n}`,change:"Change"},ee=(n,o,u)=>typeof n=="function"?n(o,u):o?.[n]??u,se=n=>n==null||String(n).trim()==="";function ne({rows:n=[],columns:o=[],rowKey:u="id",rowLabel:S,isDisabled:$,disabledNote:q,defaultSelected:E,missing:R,onCreate:A,mode:T="create",diff:P,maxHeight:_=420,caption:B,labels:z,className:V=""}){const i={...W,...z},C=d.useId(),k=d.useRef(null),F=e=>S?S(e):String(e?.[o[0]?.key]??""),b=d.useMemo(()=>n.map((e,l)=>{const t=ee(u,e,l),r=!!$?.(e);return{row:e,key:t,off:r,missing:r?[]:(R?.(e)??[]).map(String)}}),[n,u,$,R]),c=b.filter(e=>!e.off),[m,w]=d.useState(()=>new Set(c.filter(e=>E?E(e.row):!0).map(e=>e.key))),[D,G]=d.useState({}),[h,L]=d.useState(!1),[v,x]=d.useState(null);d.useEffect(()=>{w(e=>{const l=new Set(c.map(r=>r.key)),t=new Set([...e].filter(r=>l.has(r)));return t.size===e.size?e:t})},[b]);const p=c.filter(e=>m.has(e.key)).length,j=c.length>0&&p===c.length,M=p>0&&!j;d.useEffect(()=>{k.current&&(k.current.indeterminate=M)},[M]);const N=(e,l)=>D[e.key]?.[l]??"",y=c.filter(e=>m.has(e.key)).reduce((e,l)=>e+l.missing.filter(t=>se(N(l,t))).length,0),J=e=>{x(null),w(l=>{const t=new Set(l);return t.has(e)?t.delete(e):t.add(e),t})},Q=()=>{x(null),w(j?new Set:new Set(c.map(e=>e.key)))},U=async()=>{if(!p||y||h)return;const e=c.filter(l=>m.has(l.key)).map(l=>{const t={};for(const r of l.missing){const a=o.find(I=>I.key===r),f=N(l,r);t[r]=a?.input==="number"?Number(String(f).replace(",",".")):f}return{...l.row,...t}});L(!0),x(null);try{const l=await A?.(e);w(new Set),x({ok:!0,text:typeof l=="string"||l&&typeof l=="object"?l:i.done(e.length)})}catch(l){x({ok:!1,text:l instanceof Error&&l.message?l.message:i.error})}finally{L(!1)}},g=T==="diff",X=g?i.apply(p):i.create(p);return s.jsxs("div",{className:`px-review ${V}`.trim(),children:[s.jsx("div",{className:"px-review__scroll",role:"region","aria-labelledby":C,tabIndex:0,style:{"--px-review-max-h":typeof _=="number"?`${_}px`:_},children:s.jsxs("table",{className:"px-review__table",children:[s.jsx("caption",{id:C,style:B?{textAlign:"left",padding:"10px 12px",fontWeight:600}:le,children:B??i.region}),s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",className:"px-review__check",children:s.jsx("input",{ref:k,type:"checkbox",className:"px-review__checkbox","aria-label":i.selectAll,checked:j,disabled:!c.length||h,onChange:Q})}),o.map(e=>s.jsx("th",{scope:"col",className:e.align==="right"?"is-num":void 0,children:e.label},e.key)),g?s.jsx("th",{scope:"col",children:i.change}):null]})}),s.jsx("tbody",{children:b.map(e=>{const l=m.has(e.key),t=g?P?.(e.row):null,r=e.off?"px-review__row--disabled":l?void 0:"px-review__row--off";return s.jsxs("tr",{className:r,"aria-disabled":e.off||void 0,children:[s.jsx("td",{className:"px-review__check",children:s.jsx("input",{type:"checkbox",className:"px-review__checkbox","aria-label":i.selectRow(F(e.row)),checked:!e.off&&l,disabled:e.off||h,onChange:()=>J(e.key)})}),o.map((a,f)=>{const Y=e.missing.includes(String(a.key))?s.jsx("input",{type:"text",inputMode:a.input==="number"?"decimal":void 0,className:"px-review__missing-input",placeholder:a.placeholder??i.missingPlaceholder,"aria-label":i.missingLabel(typeof a.label=="string"?a.label:a.key,F(e.row)),value:N(e,a.key),disabled:!l||h,onChange:H=>G(O=>({...O,[e.key]:{...O[e.key],[a.key]:H.target.value}}))}):a.render?a.render(e.row):e.row?.[a.key],Z=f===0?"th":"td";return s.jsxs(Z,{scope:f===0?"row":void 0,className:a.align==="right"?"is-num":void 0,style:f===0?{fontWeight:550}:void 0,children:[Y,f===0&&g&&t?.fileName?s.jsx("span",{className:"px-review__aka",children:i.fileName(t.fileName)}):null,f===0&&e.off?s.jsx("span",{className:"px-review__exists",children:q??i.exists}):null]},a.key)}),g?s.jsx("td",{children:t?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"px-review__now",children:i.now(t.now)}),s.jsx("span",{className:"px-review__file",children:i.inFile(t.file)})]}):null}):null]},e.key)})})]})}),s.jsxs("div",{className:"px-review__footer",children:[s.jsx("div",{"aria-live":"polite",children:v?s.jsx("p",{className:v.ok?"px-review__done":"px-review__error",role:v.ok?"status":"alert",children:v.text}):y>0&&p>0?s.jsx("p",{className:"px-review__hint",children:i.fillMissing(y)}):s.jsx("p",{className:"px-review__count",children:i.selected(p,c.length)})}),A?s.jsx(K.default,{variant:"primary",className:"px-review__create",disabled:!p||y>0||h,"aria-busy":h||void 0,onClick:U,children:h?i.working:X}):null]})]})}const le={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0};exports.REVIEW_TABLE_LABELS=W;exports.default=ne;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),d=require("react"),ee=require("../../ui/Button/Button.cjs");;/* empty css */const O=require("../../ui/Checkbox/Checkbox.cjs"),W={region:"Rows to review",selectAll:"Select all",selectRow:n=>`Select ${n}`,exists:"exists",create:n=>`Create ${n}`,apply:n=>`Apply ${n}`,working:"Working…",selected:(n,o)=>`${n} of ${o} selected`,fillMissing:n=>`Fill in ${n} missing ${n===1?"value":"values"} to continue`,missingLabel:(n,o)=>`${n} for ${o}`,missingPlaceholder:"Missing",done:n=>`Done: ${n} ${n===1?"row":"rows"}.`,error:"Couldn't finish. Nothing was lost; try again.",now:n=>s.jsxs(s.Fragment,{children:["now ",n]}),inFile:n=>s.jsxs(s.Fragment,{children:["in file ",n]}),fileName:n=>`in the file: ${n}`,change:"Change"},se=(n,o,u)=>typeof n=="function"?n(o,u):o?.[n]??u,ne=n=>n==null||String(n).trim()==="";function le({rows:n=[],columns:o=[],rowKey:u="id",rowLabel:$,isDisabled:E,disabledNote:T,defaultSelected:C,missing:R,onCreate:A,mode:P="create",diff:z,maxHeight:y=420,caption:B,labels:V,className:D=""}){const i={...W,...V},F=d.useId(),k=d.useRef(null),L=e=>$?$(e):String(e?.[o[0]?.key]??""),b=d.useMemo(()=>n.map((e,l)=>{const t=se(u,e,l),r=!!E?.(e);return{row:e,key:t,off:r,missing:r?[]:(R?.(e)??[]).map(String)}}),[n,u,E,R]),c=b.filter(e=>!e.off),[m,w]=d.useState(()=>new Set(c.filter(e=>C?C(e.row):!0).map(e=>e.key))),[G,J]=d.useState({}),[p,M]=d.useState(!1),[v,x]=d.useState(null);d.useEffect(()=>{w(e=>{const l=new Set(c.map(r=>r.key)),t=new Set([...e].filter(r=>l.has(r)));return t.size===e.size?e:t})},[b]);const h=c.filter(e=>m.has(e.key)).length,j=c.length>0&&h===c.length,N=h>0&&!j;d.useEffect(()=>{k.current&&(k.current.indeterminate=N)},[N]);const S=(e,l)=>G[e.key]?.[l]??"",_=c.filter(e=>m.has(e.key)).reduce((e,l)=>e+l.missing.filter(t=>ne(S(l,t))).length,0),Q=e=>{x(null),w(l=>{const t=new Set(l);return t.has(e)?t.delete(e):t.add(e),t})},U=()=>{x(null),w(j?new Set:new Set(c.map(e=>e.key)))},X=async()=>{if(!h||_||p)return;const e=c.filter(l=>m.has(l.key)).map(l=>{const t={};for(const r of l.missing){const a=o.find(q=>q.key===r),f=S(l,r);t[r]=a?.input==="number"?Number(String(f).replace(",",".")):f}return{...l.row,...t}});M(!0),x(null);try{const l=await A?.(e);w(new Set),x({ok:!0,text:typeof l=="string"||l&&typeof l=="object"?l:i.done(e.length)})}catch(l){x({ok:!1,text:l instanceof Error&&l.message?l.message:i.error})}finally{M(!1)}},g=P==="diff",Y=g?i.apply(h):i.create(h);return s.jsxs("div",{className:`px-review ${D}`.trim(),children:[s.jsx("div",{className:"px-review__scroll",role:"region","aria-labelledby":F,tabIndex:0,style:{"--px-review-max-h":typeof y=="number"?`${y}px`:y},children:s.jsxs("table",{className:"px-review__table",children:[s.jsx("caption",{id:F,style:B?{textAlign:"left",padding:"10px 12px",fontWeight:600}:te,children:B??i.region}),s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",className:"px-review__check",children:s.jsx(O.Checkbox,{ref:k,indeterminate:N,className:"px-review__checkbox","aria-label":i.selectAll,checked:j,disabled:!c.length||p,onChange:U})}),o.map(e=>s.jsx("th",{scope:"col",className:e.align==="right"?"is-num":void 0,children:e.label},e.key)),g?s.jsx("th",{scope:"col",children:i.change}):null]})}),s.jsx("tbody",{children:b.map(e=>{const l=m.has(e.key),t=g?z?.(e.row):null,r=e.off?"px-review__row--disabled":l?void 0:"px-review__row--off";return s.jsxs("tr",{className:r,"aria-disabled":e.off||void 0,children:[s.jsx("td",{className:"px-review__check",children:s.jsx(O.Checkbox,{className:"px-review__checkbox","aria-label":i.selectRow(L(e.row)),checked:!e.off&&l,disabled:e.off||p,onChange:()=>Q(e.key)})}),o.map((a,f)=>{const Z=e.missing.includes(String(a.key))?s.jsx("input",{type:"text",inputMode:a.input==="number"?"decimal":void 0,className:"px-review__missing-input",placeholder:a.placeholder??i.missingPlaceholder,"aria-label":i.missingLabel(typeof a.label=="string"?a.label:a.key,L(e.row)),value:S(e,a.key),disabled:!l||p,onChange:K=>J(I=>({...I,[e.key]:{...I[e.key],[a.key]:K.target.value}}))}):a.render?a.render(e.row):e.row?.[a.key],H=f===0?"th":"td";return s.jsxs(H,{scope:f===0?"row":void 0,className:a.align==="right"?"is-num":void 0,style:f===0?{fontWeight:550}:void 0,children:[Z,f===0&&g&&t?.fileName?s.jsx("span",{className:"px-review__aka",children:i.fileName(t.fileName)}):null,f===0&&e.off?s.jsx("span",{className:"px-review__exists",children:T??i.exists}):null]},a.key)}),g?s.jsx("td",{children:t?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"px-review__now",children:i.now(t.now)}),s.jsx("span",{className:"px-review__file",children:i.inFile(t.file)})]}):null}):null]},e.key)})})]})}),s.jsxs("div",{className:"px-review__footer",children:[s.jsx("div",{"aria-live":"polite",children:v?s.jsx("p",{className:v.ok?"px-review__done":"px-review__error",role:v.ok?"status":"alert",children:v.text}):_>0&&h>0?s.jsx("p",{className:"px-review__hint",children:i.fillMissing(_)}):s.jsx("p",{className:"px-review__count",children:i.selected(h,c.length)})}),A?s.jsx(ee.default,{variant:"primary",className:"px-review__create",disabled:!h||_>0||p,"aria-busy":p||void 0,onClick:X,children:p?i.working:Y}):null]})]})}const te={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0};exports.REVIEW_TABLE_LABELS=W;exports.default=le;
@@ -1,8 +1,9 @@
1
- import { jsxs as d, jsx as s, Fragment as C } from "react/jsx-runtime";
2
- import { useId as ee, useRef as ne, useMemo as le, useState as k, useEffect as P } from "react";
3
- import se from "../../ui/Button/Button.mjs";
1
+ import { jsxs as d, jsx as s, Fragment as A } from "react/jsx-runtime";
2
+ import { useId as ne, useRef as le, useMemo as se, useState as k, useEffect as P } from "react";
3
+ import te from "../../ui/Button/Button.mjs";
4
4
  import './ReviewTable.css';/* empty css */
5
- const te = {
5
+ import { Checkbox as T } from "../../ui/Checkbox/Checkbox.mjs";
6
+ const ie = {
6
7
  region: "Rows to review",
7
8
  selectAll: "Select all",
8
9
  selectRow: (n) => `Select ${n}`,
@@ -16,142 +17,141 @@ const te = {
16
17
  missingPlaceholder: "Missing",
17
18
  done: (n) => `Done: ${n} ${n === 1 ? "row" : "rows"}.`,
18
19
  error: "Couldn't finish. Nothing was lost; try again.",
19
- now: (n) => /* @__PURE__ */ d(C, { children: [
20
+ now: (n) => /* @__PURE__ */ d(A, { children: [
20
21
  "now ",
21
22
  n
22
23
  ] }),
23
- inFile: (n) => /* @__PURE__ */ d(C, { children: [
24
+ inFile: (n) => /* @__PURE__ */ d(A, { children: [
24
25
  "in file ",
25
26
  n
26
27
  ] }),
27
28
  fileName: (n) => `in the file: ${n}`,
28
29
  change: "Change"
29
- }, ie = (n, o, m) => typeof n == "function" ? n(o, m) : o?.[n] ?? m, ae = (n) => n == null || String(n).trim() === "";
30
- function fe({
30
+ }, re = (n, o, m) => typeof n == "function" ? n(o, m) : o?.[n] ?? m, ae = (n) => n == null || String(n).trim() === "";
31
+ function ge({
31
32
  rows: n = [],
32
33
  columns: o = [],
33
34
  rowKey: m = "id",
34
- rowLabel: A,
35
- isDisabled: R,
36
- disabledNote: T,
37
- defaultSelected: E,
38
- missing: B,
39
- onCreate: F,
40
- mode: D = "create",
41
- diff: V,
35
+ rowLabel: R,
36
+ isDisabled: E,
37
+ disabledNote: D,
38
+ defaultSelected: B,
39
+ missing: F,
40
+ onCreate: M,
41
+ mode: V = "create",
42
+ diff: q,
42
43
  maxHeight: _ = 420,
43
- caption: M,
44
- labels: q,
45
- className: G = ""
44
+ caption: I,
45
+ labels: G,
46
+ className: J = ""
46
47
  }) {
47
- const i = { ...te, ...q }, I = ee(), b = ne(null), L = (e) => A ? A(e) : String(e?.[o[0]?.key] ?? ""), N = le(
48
+ const i = { ...ie, ...G }, L = ne(), b = le(null), O = (e) => R ? R(e) : String(e?.[o[0]?.key] ?? ""), N = se(
48
49
  () => n.map((e, l) => {
49
- const t = ie(m, e, l), r = !!R?.(e);
50
- return { row: e, key: t, off: r, missing: r ? [] : (B?.(e) ?? []).map(String) };
50
+ const t = re(m, e, l), a = !!E?.(e);
51
+ return { row: e, key: t, off: a, missing: a ? [] : (F?.(e) ?? []).map(String) };
51
52
  }),
52
- [n, m, R, B]
53
- ), c = N.filter((e) => !e.off), [w, y] = k(
54
- () => new Set(c.filter((e) => E ? E(e.row) : !0).map((e) => e.key))
55
- ), [J, Q] = k({}), [f, O] = k(!1), [v, u] = k(null);
53
+ [n, m, E, F]
54
+ ), c = N.filter((e) => !e.off), [w, v] = k(
55
+ () => new Set(c.filter((e) => B ? B(e.row) : !0).map((e) => e.key))
56
+ ), [Q, U] = k({}), [h, W] = k(!1), [x, g] = k(null);
56
57
  P(() => {
57
- y((e) => {
58
- const l = new Set(c.map((r) => r.key)), t = new Set([...e].filter((r) => l.has(r)));
58
+ v((e) => {
59
+ const l = new Set(c.map((a) => a.key)), t = new Set([...e].filter((a) => l.has(a)));
59
60
  return t.size === e.size ? e : t;
60
61
  });
61
62
  }, [N]);
62
- const p = c.filter((e) => w.has(e.key)).length, S = c.length > 0 && p === c.length, W = p > 0 && !S;
63
+ const p = c.filter((e) => w.has(e.key)).length, S = c.length > 0 && p === c.length, $ = p > 0 && !S;
63
64
  P(() => {
64
- b.current && (b.current.indeterminate = W);
65
- }, [W]);
66
- const $ = (e, l) => J[e.key]?.[l] ?? "", x = c.filter((e) => w.has(e.key)).reduce((e, l) => e + l.missing.filter((t) => ae($(l, t))).length, 0), U = (e) => {
67
- u(null), y((l) => {
65
+ b.current && (b.current.indeterminate = $);
66
+ }, [$]);
67
+ const C = (e, l) => Q[e.key]?.[l] ?? "", y = c.filter((e) => w.has(e.key)).reduce((e, l) => e + l.missing.filter((t) => ae(C(l, t))).length, 0), X = (e) => {
68
+ g(null), v((l) => {
68
69
  const t = new Set(l);
69
70
  return t.has(e) ? t.delete(e) : t.add(e), t;
70
71
  });
71
- }, X = () => {
72
- u(null), y(S ? /* @__PURE__ */ new Set() : new Set(c.map((e) => e.key)));
73
- }, Y = async () => {
74
- if (!p || x || f) return;
72
+ }, Y = () => {
73
+ g(null), v(S ? /* @__PURE__ */ new Set() : new Set(c.map((e) => e.key)));
74
+ }, Z = async () => {
75
+ if (!p || y || h) return;
75
76
  const e = c.filter((l) => w.has(l.key)).map((l) => {
76
77
  const t = {};
77
- for (const r of l.missing) {
78
- const a = o.find((j) => j.key === r), h = $(l, r);
79
- t[r] = a?.input === "number" ? Number(String(h).replace(",", ".")) : h;
78
+ for (const a of l.missing) {
79
+ const r = o.find((j) => j.key === a), f = C(l, a);
80
+ t[a] = r?.input === "number" ? Number(String(f).replace(",", ".")) : f;
80
81
  }
81
82
  return { ...l.row, ...t };
82
83
  });
83
- O(!0), u(null);
84
+ W(!0), g(null);
84
85
  try {
85
- const l = await F?.(e);
86
- y(/* @__PURE__ */ new Set()), u({ ok: !0, text: typeof l == "string" || l && typeof l == "object" ? l : i.done(e.length) });
86
+ const l = await M?.(e);
87
+ v(/* @__PURE__ */ new Set()), g({ ok: !0, text: typeof l == "string" || l && typeof l == "object" ? l : i.done(e.length) });
87
88
  } catch (l) {
88
- u({ ok: !1, text: l instanceof Error && l.message ? l.message : i.error });
89
+ g({ ok: !1, text: l instanceof Error && l.message ? l.message : i.error });
89
90
  } finally {
90
- O(!1);
91
+ W(!1);
91
92
  }
92
- }, g = D === "diff", Z = g ? i.apply(p) : i.create(p);
93
- return /* @__PURE__ */ d("div", { className: `px-review ${G}`.trim(), children: [
93
+ }, u = V === "diff", H = u ? i.apply(p) : i.create(p);
94
+ return /* @__PURE__ */ d("div", { className: `px-review ${J}`.trim(), children: [
94
95
  /* @__PURE__ */ s(
95
96
  "div",
96
97
  {
97
98
  className: "px-review__scroll",
98
99
  role: "region",
99
- "aria-labelledby": I,
100
+ "aria-labelledby": L,
100
101
  tabIndex: 0,
101
102
  style: { "--px-review-max-h": typeof _ == "number" ? `${_}px` : _ },
102
103
  children: /* @__PURE__ */ d("table", { className: "px-review__table", children: [
103
- /* @__PURE__ */ s("caption", { id: I, style: M ? { textAlign: "left", padding: "10px 12px", fontWeight: 600 } : re, children: M ?? i.region }),
104
+ /* @__PURE__ */ s("caption", { id: L, style: I ? { textAlign: "left", padding: "10px 12px", fontWeight: 600 } : oe, children: I ?? i.region }),
104
105
  /* @__PURE__ */ s("thead", { children: /* @__PURE__ */ d("tr", { children: [
105
106
  /* @__PURE__ */ s("th", { scope: "col", className: "px-review__check", children: /* @__PURE__ */ s(
106
- "input",
107
+ T,
107
108
  {
108
109
  ref: b,
109
- type: "checkbox",
110
+ indeterminate: $,
110
111
  className: "px-review__checkbox",
111
112
  "aria-label": i.selectAll,
112
113
  checked: S,
113
- disabled: !c.length || f,
114
- onChange: X
114
+ disabled: !c.length || h,
115
+ onChange: Y
115
116
  }
116
117
  ) }),
117
118
  o.map((e) => /* @__PURE__ */ s("th", { scope: "col", className: e.align === "right" ? "is-num" : void 0, children: e.label }, e.key)),
118
- g ? /* @__PURE__ */ s("th", { scope: "col", children: i.change }) : null
119
+ u ? /* @__PURE__ */ s("th", { scope: "col", children: i.change }) : null
119
120
  ] }) }),
120
121
  /* @__PURE__ */ s("tbody", { children: N.map((e) => {
121
- const l = w.has(e.key), t = g ? V?.(e.row) : null, r = e.off ? "px-review__row--disabled" : l ? void 0 : "px-review__row--off";
122
- return /* @__PURE__ */ d("tr", { className: r, "aria-disabled": e.off || void 0, children: [
122
+ const l = w.has(e.key), t = u ? q?.(e.row) : null, a = e.off ? "px-review__row--disabled" : l ? void 0 : "px-review__row--off";
123
+ return /* @__PURE__ */ d("tr", { className: a, "aria-disabled": e.off || void 0, children: [
123
124
  /* @__PURE__ */ s("td", { className: "px-review__check", children: /* @__PURE__ */ s(
124
- "input",
125
+ T,
125
126
  {
126
- type: "checkbox",
127
127
  className: "px-review__checkbox",
128
- "aria-label": i.selectRow(L(e.row)),
128
+ "aria-label": i.selectRow(O(e.row)),
129
129
  checked: !e.off && l,
130
- disabled: e.off || f,
131
- onChange: () => U(e.key)
130
+ disabled: e.off || h,
131
+ onChange: () => X(e.key)
132
132
  }
133
133
  ) }),
134
- o.map((a, h) => {
135
- const H = e.missing.includes(String(a.key)) ? /* @__PURE__ */ s(
134
+ o.map((r, f) => {
135
+ const K = e.missing.includes(String(r.key)) ? /* @__PURE__ */ s(
136
136
  "input",
137
137
  {
138
138
  type: "text",
139
- inputMode: a.input === "number" ? "decimal" : void 0,
139
+ inputMode: r.input === "number" ? "decimal" : void 0,
140
140
  className: "px-review__missing-input",
141
- placeholder: a.placeholder ?? i.missingPlaceholder,
142
- "aria-label": i.missingLabel(typeof a.label == "string" ? a.label : a.key, L(e.row)),
143
- value: $(e, a.key),
144
- disabled: !l || f,
145
- onChange: (K) => Q((z) => ({ ...z, [e.key]: { ...z[e.key], [a.key]: K.target.value } }))
141
+ placeholder: r.placeholder ?? i.missingPlaceholder,
142
+ "aria-label": i.missingLabel(typeof r.label == "string" ? r.label : r.key, O(e.row)),
143
+ value: C(e, r.key),
144
+ disabled: !l || h,
145
+ onChange: (ee) => U((z) => ({ ...z, [e.key]: { ...z[e.key], [r.key]: ee.target.value } }))
146
146
  }
147
- ) : a.render ? a.render(e.row) : e.row?.[a.key];
148
- return /* @__PURE__ */ d(h === 0 ? "th" : "td", { scope: h === 0 ? "row" : void 0, className: a.align === "right" ? "is-num" : void 0, style: h === 0 ? { fontWeight: 550 } : void 0, children: [
149
- H,
150
- h === 0 && g && t?.fileName ? /* @__PURE__ */ s("span", { className: "px-review__aka", children: i.fileName(t.fileName) }) : null,
151
- h === 0 && e.off ? /* @__PURE__ */ s("span", { className: "px-review__exists", children: T ?? i.exists }) : null
152
- ] }, a.key);
147
+ ) : r.render ? r.render(e.row) : e.row?.[r.key];
148
+ return /* @__PURE__ */ d(f === 0 ? "th" : "td", { scope: f === 0 ? "row" : void 0, className: r.align === "right" ? "is-num" : void 0, style: f === 0 ? { fontWeight: 550 } : void 0, children: [
149
+ K,
150
+ f === 0 && u && t?.fileName ? /* @__PURE__ */ s("span", { className: "px-review__aka", children: i.fileName(t.fileName) }) : null,
151
+ f === 0 && e.off ? /* @__PURE__ */ s("span", { className: "px-review__exists", children: D ?? i.exists }) : null
152
+ ] }, r.key);
153
153
  }),
154
- g ? /* @__PURE__ */ s("td", { children: t ? /* @__PURE__ */ d(C, { children: [
154
+ u ? /* @__PURE__ */ s("td", { children: t ? /* @__PURE__ */ d(A, { children: [
155
155
  /* @__PURE__ */ s("span", { className: "px-review__now", children: i.now(t.now) }),
156
156
  /* @__PURE__ */ s("span", { className: "px-review__file", children: i.inFile(t.file) })
157
157
  ] }) : null }) : null
@@ -161,12 +161,12 @@ function fe({
161
161
  }
162
162
  ),
163
163
  /* @__PURE__ */ d("div", { className: "px-review__footer", children: [
164
- /* @__PURE__ */ s("div", { "aria-live": "polite", children: v ? /* @__PURE__ */ s("p", { className: v.ok ? "px-review__done" : "px-review__error", role: v.ok ? "status" : "alert", children: v.text }) : x > 0 && p > 0 ? /* @__PURE__ */ s("p", { className: "px-review__hint", children: i.fillMissing(x) }) : /* @__PURE__ */ s("p", { className: "px-review__count", children: i.selected(p, c.length) }) }),
165
- F ? /* @__PURE__ */ s(se, { variant: "primary", className: "px-review__create", disabled: !p || x > 0 || f, "aria-busy": f || void 0, onClick: Y, children: f ? i.working : Z }) : null
164
+ /* @__PURE__ */ s("div", { "aria-live": "polite", children: x ? /* @__PURE__ */ s("p", { className: x.ok ? "px-review__done" : "px-review__error", role: x.ok ? "status" : "alert", children: x.text }) : y > 0 && p > 0 ? /* @__PURE__ */ s("p", { className: "px-review__hint", children: i.fillMissing(y) }) : /* @__PURE__ */ s("p", { className: "px-review__count", children: i.selected(p, c.length) }) }),
165
+ M ? /* @__PURE__ */ s(te, { variant: "primary", className: "px-review__create", disabled: !p || y > 0 || h, "aria-busy": h || void 0, onClick: Z, children: h ? i.working : H }) : null
166
166
  ] })
167
167
  ] });
168
168
  }
169
- const re = {
169
+ const oe = {
170
170
  position: "absolute",
171
171
  width: 1,
172
172
  height: 1,
@@ -178,6 +178,6 @@ const re = {
178
178
  border: 0
179
179
  };
180
180
  export {
181
- te as REVIEW_TABLE_LABELS,
182
- fe as default
181
+ ie as REVIEW_TABLE_LABELS,
182
+ ge as default
183
183
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),p=require("react"),f=require("../../ui/Alert/Alert.cjs"),N=require("../AiButton/AiButton.cjs"),j=require("../icons/AiIcons.cjs"),C=require("../../ui/Button/Button.cjs");;/* empty css */const q={apply:"Apply",cancel:"Cancel",applied:l=>l===1?"Applied 1 suggestion.":`Applied ${l} suggestions.`,error:"Couldn't apply"},v=(l,...n)=>typeof l=="function"?l(...n):l;function A({summary:l,groups:n=[],notes:g=[],onApply:d,onCancel:x,labels:m,className:_=""}){const r={...q,...m},[o,y]=p.useState(()=>new Set(n.flatMap(s=>s.items||[]).filter(s=>s.defaultChecked!==!1).map(s=>s.id))),[u,k]=p.useState(!1),[c,h]=p.useState(null),b=(s,t)=>y(i=>{const a=new Set(i);return t?a.add(s):a.delete(s),a}),S=async()=>{if(!d||!o.size||u)return;const s=n.flatMap(t=>t.items||[]).filter(t=>o.has(t.id)).map(t=>t.id);k(!0),h(null);try{await d(s),h({ok:!0,text:v(r.applied,s.length)})}catch(t){h({ok:!1,text:t?.message||""})}finally{k(!1)}};return e.jsxs("div",{className:`suggestion-checklist ${_}`.trim(),children:[l?e.jsxs("p",{className:"suggestion-checklist__summary",children:[e.jsx(j.SparkleIcon,{size:14}),e.jsx("span",{children:l})]}):null,n.map((s,t)=>e.jsxs("fieldset",{className:"suggestion-checklist__group",children:[s.title?e.jsx("legend",{children:s.title}):null,e.jsx("ul",{children:(s.items||[]).map(i=>e.jsx("li",{children:e.jsxs("label",{className:"suggestion-checklist__item",children:[e.jsx("input",{type:"checkbox",checked:o.has(i.id),disabled:u,onChange:a=>b(i.id,a.target.checked)}),e.jsxs("span",{className:"suggestion-checklist__text",children:[e.jsx("span",{children:i.label}),i.reason?e.jsx("span",{className:"suggestion-checklist__reason",children:i.reason}):null]})]})},i.id))})]},t)),g.length?e.jsx(f.default,{tone:"warning",children:g.map((s,t)=>e.jsx("span",{style:{display:"block"},children:s},t))}):null,c&&!c.ok?e.jsx(f.default,{tone:"danger",title:r.error,children:c.text}):null,e.jsxs("div",{className:"suggestion-checklist__footer",children:[e.jsx("p",{className:"suggestion-checklist__status",role:"status","aria-live":"polite",children:c?.ok?c.text:null}),x?e.jsx(C.default,{shape:"pill",className:"suggestion-checklist__btn",onClick:x,children:r.cancel}):null,e.jsx(N.default,{variant:"solid",icon:e.jsx(j.CheckIcon,{size:14}),loading:u,disabled:!o.size||u||!d,onClick:S,children:r.apply})]})]})}exports.default=A;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),g=require("react"),f=require("../../ui/Alert/Alert.cjs"),C=require("../AiButton/AiButton.cjs"),j=require("../icons/AiIcons.cjs"),N=require("../../ui/Button/Button.cjs");;/* empty css */const q=require("../../ui/Checkbox/Checkbox.cjs"),v={apply:"Apply",cancel:"Cancel",applied:l=>l===1?"Applied 1 suggestion.":`Applied ${l} suggestions.`,error:"Couldn't apply"},A=(l,...n)=>typeof l=="function"?l(...n):l;function w({summary:l,groups:n=[],notes:p=[],onApply:d,onCancel:x,labels:m,className:_=""}){const r={...v,...m},[o,b]=g.useState(()=>new Set(n.flatMap(s=>s.items||[]).filter(s=>s.defaultChecked!==!1).map(s=>s.id))),[u,k]=g.useState(!1),[c,h]=g.useState(null),y=(s,t)=>b(i=>{const a=new Set(i);return t?a.add(s):a.delete(s),a}),S=async()=>{if(!d||!o.size||u)return;const s=n.flatMap(t=>t.items||[]).filter(t=>o.has(t.id)).map(t=>t.id);k(!0),h(null);try{await d(s),h({ok:!0,text:A(r.applied,s.length)})}catch(t){h({ok:!1,text:t?.message||""})}finally{k(!1)}};return e.jsxs("div",{className:`suggestion-checklist ${_}`.trim(),children:[l?e.jsxs("p",{className:"suggestion-checklist__summary",children:[e.jsx(j.SparkleIcon,{size:14}),e.jsx("span",{children:l})]}):null,n.map((s,t)=>e.jsxs("fieldset",{className:"suggestion-checklist__group",children:[s.title?e.jsx("legend",{children:s.title}):null,e.jsx("ul",{children:(s.items||[]).map(i=>e.jsx("li",{children:e.jsxs("label",{className:"suggestion-checklist__item",children:[e.jsx(q.Checkbox,{checked:o.has(i.id),disabled:u,onChange:a=>y(i.id,a.target.checked)}),e.jsxs("span",{className:"suggestion-checklist__text",children:[e.jsx("span",{children:i.label}),i.reason?e.jsx("span",{className:"suggestion-checklist__reason",children:i.reason}):null]})]})},i.id))})]},t)),p.length?e.jsx(f.default,{tone:"warning",children:p.map((s,t)=>e.jsx("span",{style:{display:"block"},children:s},t))}):null,c&&!c.ok?e.jsx(f.default,{tone:"danger",title:r.error,children:c.text}):null,e.jsxs("div",{className:"suggestion-checklist__footer",children:[e.jsx("p",{className:"suggestion-checklist__status",role:"status","aria-live":"polite",children:c?.ok?c.text:null}),x?e.jsx(N.default,{shape:"pill",className:"suggestion-checklist__btn",onClick:x,children:r.cancel}):null,e.jsx(C.default,{variant:"solid",icon:e.jsx(j.CheckIcon,{size:14}),loading:u,disabled:!o.size||u||!d,onClick:S,children:r.apply})]})]})}exports.default=w;
@@ -5,28 +5,29 @@ import S from "../AiButton/AiButton.mjs";
5
5
  import { SparkleIcon as A, CheckIcon as v } from "../icons/AiIcons.mjs";
6
6
  import w from "../../ui/Button/Button.mjs";
7
7
  import './SuggestionChecklist.css';/* empty css */
8
- const z = {
8
+ import { Checkbox as z } from "../../ui/Checkbox/Checkbox.mjs";
9
+ const B = {
9
10
  apply: "Apply",
10
11
  cancel: "Cancel",
11
12
  applied: (t) => t === 1 ? "Applied 1 suggestion." : `Applied ${t} suggestions.`,
12
13
  error: "Couldn't apply"
13
- }, B = (t, ...a) => typeof t == "function" ? t(...a) : t;
14
- function F({ summary: t, groups: a = [], notes: g = [], onApply: h, onCancel: k, labels: y, className: b = "" }) {
15
- const r = { ...z, ...y }, [d, x] = m(
14
+ }, L = (t, ...a) => typeof t == "function" ? t(...a) : t;
15
+ function U({ summary: t, groups: a = [], notes: g = [], onApply: p, onCancel: f, labels: y, className: b = "" }) {
16
+ const r = { ...B, ...y }, [d, x] = m(
16
17
  () => new Set(a.flatMap((e) => e.items || []).filter((e) => e.defaultChecked !== !1).map((e) => e.id))
17
- ), [p, f] = m(!1), [c, u] = m(null), N = (e, s) => x((i) => {
18
+ ), [h, k] = m(!1), [c, u] = m(null), C = (e, s) => x((i) => {
18
19
  const o = new Set(i);
19
20
  return s ? o.add(e) : o.delete(e), o;
20
- }), C = async () => {
21
- if (!h || !d.size || p) return;
21
+ }), N = async () => {
22
+ if (!p || !d.size || h) return;
22
23
  const e = a.flatMap((s) => s.items || []).filter((s) => d.has(s.id)).map((s) => s.id);
23
- f(!0), u(null);
24
+ k(!0), u(null);
24
25
  try {
25
- await h(e), u({ ok: !0, text: B(r.applied, e.length) });
26
+ await p(e), u({ ok: !0, text: L(r.applied, e.length) });
26
27
  } catch (s) {
27
28
  u({ ok: !1, text: s?.message || "" });
28
29
  } finally {
29
- f(!1);
30
+ k(!1);
30
31
  }
31
32
  };
32
33
  return /* @__PURE__ */ n("div", { className: `suggestion-checklist ${b}`.trim(), children: [
@@ -37,7 +38,7 @@ function F({ summary: t, groups: a = [], notes: g = [], onApply: h, onCancel: k,
37
38
  a.map((e, s) => /* @__PURE__ */ n("fieldset", { className: "suggestion-checklist__group", children: [
38
39
  e.title ? /* @__PURE__ */ l("legend", { children: e.title }) : null,
39
40
  /* @__PURE__ */ l("ul", { children: (e.items || []).map((i) => /* @__PURE__ */ l("li", { children: /* @__PURE__ */ n("label", { className: "suggestion-checklist__item", children: [
40
- /* @__PURE__ */ l("input", { type: "checkbox", checked: d.has(i.id), disabled: p, onChange: (o) => N(i.id, o.target.checked) }),
41
+ /* @__PURE__ */ l(z, { checked: d.has(i.id), disabled: h, onChange: (o) => C(i.id, o.target.checked) }),
41
42
  /* @__PURE__ */ n("span", { className: "suggestion-checklist__text", children: [
42
43
  /* @__PURE__ */ l("span", { children: i.label }),
43
44
  i.reason ? /* @__PURE__ */ l("span", { className: "suggestion-checklist__reason", children: i.reason }) : null
@@ -48,11 +49,11 @@ function F({ summary: t, groups: a = [], notes: g = [], onApply: h, onCancel: k,
48
49
  c && !c.ok ? /* @__PURE__ */ l(_, { tone: "danger", title: r.error, children: c.text }) : null,
49
50
  /* @__PURE__ */ n("div", { className: "suggestion-checklist__footer", children: [
50
51
  /* @__PURE__ */ l("p", { className: "suggestion-checklist__status", role: "status", "aria-live": "polite", children: c?.ok ? c.text : null }),
51
- k ? /* @__PURE__ */ l(w, { shape: "pill", className: "suggestion-checklist__btn", onClick: k, children: r.cancel }) : null,
52
- /* @__PURE__ */ l(S, { variant: "solid", icon: /* @__PURE__ */ l(v, { size: 14 }), loading: p, disabled: !d.size || p || !h, onClick: C, children: r.apply })
52
+ f ? /* @__PURE__ */ l(w, { shape: "pill", className: "suggestion-checklist__btn", onClick: f, children: r.cancel }) : null,
53
+ /* @__PURE__ */ l(S, { variant: "solid", icon: /* @__PURE__ */ l(v, { size: 14 }), loading: h, disabled: !d.size || h || !p, onClick: N, children: r.apply })
53
54
  ] })
54
55
  ] });
55
56
  }
56
57
  export {
57
- F as default
58
+ U as default
58
59
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),d=require("react"),b=require("../NavIcon/NavIcon.cjs"),l=require("../SectionKit/SectionKit.cjs"),ee=require("../SectionKit/SectionArt.cjs"),P=require("../SectionKit/patchDefaults.cjs"),te=require("../IconButton/IconButton.cjs");;/* empty css */const se=require("../../../icons/glyphs/Star.cjs"),ae=require("../../../icons/glyphs/Eye.cjs"),ie=require("../../../icons/glyphs/EyeOff.cjs"),$=["split","centered","minimal"],E=["signin","signup"],ne={title:"Welcome back",subtitle:"Sign in to pick up where your team left off.",submitLabel:"Sign in",switchText:"New to Pixstella?",switchLabel:"Create an account",successMessage:"Signed in. Taking you to your workspace…"},le={title:"Create your account",subtitle:"Start free. No credit card, no time limit on the Starter plan.",submitLabel:"Create account",switchText:"Already have an account?",switchLabel:"Sign in",successMessage:"Account created. Check your inbox to confirm your email."},ce=[{label:"Google",mark:"G",color:"var(--chart-series-3)"},{label:"GitHub",icon:"code"}],oe={eyebrow:"Pixstella workspace",title:"Every dashboard your team ships, in one calm place.",art:{type:"scene",scene:"mountains",time:"dusk"},quote:{text:"We moved 40 analysts onto Pixstella in a week. Signing in every morning genuinely feels like opening a favourite app.",name:"Priya Raman",role:"Head of Data, Lumen",initials:"PR",rating:5},chips:["SOC 2 Type II","SSO & SCIM","99.99% uptime"]};function re({off:s}){const a=s?ie.default:ae.default;return e.jsx(a,{size:18,strokeWidth:1.8})}const ue=()=>e.jsx(se.default,{variant:"filled",size:14});function de(s){if(!s)return 0;let a=0;return s.length>=8&&a++,s.length>=12&&a++,/[A-Z]/.test(s)&&/[a-z]/.test(s)&&a++,/\d/.test(s)&&/[^A-Za-z0-9]/.test(s)&&a++,Math.max(1,a)}function D({brand:s}){if(!s)return null;const a=typeof s=="string"?{name:s}:s,h=typeof s=="string"?"brand":"brand.name",m=a.href?"a":"p";return e.jsxs(m,{className:"auth-section__brand",href:a.href,children:[a.icon!==""?e.jsx("span",{className:"auth-section__logo","aria-hidden":"true",children:e.jsx(b.default,{name:a.icon||"sparkles",size:18,strokeWidth:2})}):null,e.jsx("span",{"data-edit":h,children:a.name})]})}function he({id:s,variant:a="split",mode:h="signin",brand:m={name:"Pixstella",icon:"sparkles"},signIn:M,signUp:F,providers:U,divider:N="or continue with email",nameLabel:R="Full name",namePlaceholder:z="Maya Chen",emailLabel:O="Work email",emailPlaceholder:H="you@company.com",passwordLabel:G="Password",passwordPlaceholder:W="At least 8 characters",passwordHint:g="Use 8+ characters with a mix of letters, numbers and symbols.",rememberLabel:y="Remember me for 30 days",forgot:j={label:"Forgot password?",href:"#reset"},terms:v="By continuing you agree to our Terms of Service and Privacy Policy.",panel:B,panelPosition:V="right",className:Z="",style:S}){const r=$.includes(a)?a:"split",[w,K]=d.useState(E.includes(h)?h:"signin"),[p,J]=d.useState(!1),[A,k]=d.useState(""),[Q,q]=d.useState(!1),c=d.useId().replace(/[^a-zA-Z0-9_-]/g,""),n=w==="signup",u=n?"signUp":"signIn",o={...n?le:ne,...(n?F:M)??{}},X=de(A),T=P.patchDefault(ce,U),L=Array.isArray(T)?T:[],Y=()=>{K(n?"signin":"signup"),q(!1),k("")},f=e.jsxs("div",{className:"auth-section__form-wrap",children:[e.jsxs("div",{className:"auth-section__head",children:[r!=="split"?e.jsx(D,{brand:m}):null,e.jsx("h1",{className:"auth-section__title","data-edit":l.p(u,"title"),children:o.title}),o.subtitle?e.jsx("p",{className:"auth-section__sub","data-edit":l.p(u,"subtitle"),children:o.subtitle}):null]}),L.length?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"auth-section__social",children:L.map((t,i)=>e.jsxs("button",{type:"button",className:"auth-section__provider",style:t.color?{"--mark":t.color}:void 0,children:[t.icon?e.jsx(b.default,{name:t.icon,size:18}):e.jsx("span",{className:"auth-section__mark","aria-hidden":"true",children:t.mark||String(t.label||"?").charAt(0)}),e.jsx("span",{"data-edit":l.p("providers",i,"label"),children:t.label})]},i))}),N?e.jsx("p",{className:"auth-section__divider","data-edit":"divider",children:N}):null]}):null,e.jsxs("form",{className:"auth-section__form",onSubmit:t=>{t.preventDefault(),q(!0)},children:[n?e.jsxs("div",{className:"auth-section__field",children:[e.jsx("label",{className:"auth-section__label",htmlFor:`${c}-name`,"data-edit":"nameLabel",children:R}),e.jsx("div",{className:"auth-section__control",children:e.jsx("input",{id:`${c}-name`,className:"auth-section__input",type:"text",name:"name",autoComplete:"name",placeholder:z,required:!0})})]}):null,e.jsxs("div",{className:"auth-section__field",children:[e.jsx("label",{className:"auth-section__label",htmlFor:`${c}-email`,"data-edit":"emailLabel",children:O}),e.jsx("div",{className:"auth-section__control",children:e.jsx("input",{id:`${c}-email`,className:"auth-section__input",type:"email",name:"email",autoComplete:"email",placeholder:H,required:!0})})]}),e.jsxs("div",{className:"auth-section__field",children:[e.jsxs("div",{className:"auth-section__label-row",children:[e.jsx("label",{className:"auth-section__label",htmlFor:`${c}-pw`,"data-edit":"passwordLabel",children:G}),!n&&j?.label?e.jsx("a",{className:"auth-section__link",href:j.href||"#","data-edit":"forgot.label",children:j.label}):null]}),e.jsxs("div",{className:"auth-section__control auth-section__control--pw",children:[e.jsx("input",{id:`${c}-pw`,className:"auth-section__input",type:p?"text":"password",name:"password",autoComplete:n?"new-password":"current-password",placeholder:W,minLength:n?8:void 0,required:!0,value:A,onChange:t=>k(t.target.value),"aria-describedby":n?`${c}-hint`:void 0}),e.jsx(te.default,{variant:"ghost",tooltip:!1,icon:e.jsx(re,{off:p}),label:p?"Hide password":"Show password",className:"auth-section__eye",onClick:()=>J(t=>!t),"aria-pressed":p,"aria-controls":`${c}-pw`})]}),n?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"auth-section__meter","data-score":X,"aria-hidden":"true",children:[e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{})]}),g?e.jsx("p",{className:"auth-section__hint",id:`${c}-hint`,"data-edit":"passwordHint",children:g}):null]}):null]}),!n&&y?e.jsx("div",{className:"auth-section__row",children:e.jsxs("label",{className:"auth-section__check",children:[e.jsx("input",{type:"checkbox",name:"remember",defaultChecked:!0}),e.jsx("span",{"data-edit":"rememberLabel",children:y})]})}):null,e.jsx(l.Btn,{cta:o.submitLabel,path:l.p(u,"submitLabel"),variant:"primary",size:"lg",type:"submit",className:"auth-section__submit"}),e.jsx("p",{className:"auth-section__status",role:"status","aria-live":"polite",children:Q?o.successMessage:""})]}),e.jsxs("div",{className:"auth-section__foot",children:[e.jsxs("p",{className:"auth-section__switch",children:[e.jsx("span",{"data-edit":l.p(u,"switchText"),children:o.switchText}),e.jsx("button",{type:"button",onClick:Y,children:e.jsx("span",{"data-edit":l.p(u,"switchLabel"),children:o.switchLabel})})]}),v?e.jsx("p",{className:"auth-section__terms","data-edit":"terms",children:v}):null]})]}),C=l.cx("auth-section",`auth-section--${r}`,`auth-section--${w}`,r==="split"&&V==="left"&&"auth-section--panel-left",Z);if(r==="split"){const t=P.patchDefault(oe,B)??null,i=t?.quote,I=t?.art&&t.art!=="none"&&t.art.type!=="none";return e.jsx("section",{id:s,className:C,style:S,"aria-label":n?"Sign up":"Sign in",children:e.jsx("div",{className:"auth-section__inner",children:e.jsxs("div",{className:"auth-section__shell",children:[e.jsxs("div",{className:"auth-section__form-col",children:[e.jsx(D,{brand:m}),f]}),t?e.jsxs("aside",{className:l.cx("auth-section__panel",!I&&"auth-section__panel--fill"),children:[e.jsx("div",{className:"auth-section__panel-art","aria-hidden":"true",children:I?e.jsx(ee.SectionArt,{art:t.art}):null}),e.jsxs("div",{className:"auth-section__panel-top",children:[t.eyebrow?e.jsx("p",{className:"auth-section__panel-eyebrow","data-edit":"panel.eyebrow",children:t.eyebrow}):null,t.title?e.jsx("h2",{className:"auth-section__panel-title","data-edit":"panel.title",children:t.title}):null]}),e.jsxs("div",{className:"auth-section__panel-bottom",children:[i?.text?e.jsxs("figure",{className:"auth-section__quote",children:[i.rating!==0?e.jsx("span",{className:"auth-section__stars",role:"img","aria-label":`Rated ${i.rating??5} out of 5`,children:Array.from({length:Math.round(i.rating??5)},(_,x)=>e.jsx(ue,{},x))}):null,e.jsx("blockquote",{"data-edit":"panel.quote.text",children:i.text}),e.jsxs("figcaption",{className:"auth-section__who",children:[e.jsx("span",{className:"auth-section__avatar","aria-hidden":"true",style:i.color?{"--face":i.color}:void 0,children:i.initials||String(i.name||"?").split(/\s+/).map(_=>_[0]).join("").slice(0,2)}),e.jsxs("span",{children:[e.jsx("b",{"data-edit":"panel.quote.name",children:i.name}),e.jsx("span",{"data-edit":"panel.quote.role",children:i.role})]})]})]}):null,t.chips?.length?e.jsx("ul",{className:"auth-section__chips",children:t.chips.map((_,x)=>e.jsxs("li",{children:[e.jsx(b.default,{name:"shield",size:13}),e.jsx("span",{"data-edit":l.p("panel.chips",x),children:_})]},x))}):null]})]}):null]})})})}return e.jsxs("section",{id:s,className:C,style:S,"aria-label":n?"Sign up":"Sign in",children:[r==="centered"?e.jsx("div",{className:"auth-section__glow","aria-hidden":"true"}):null,e.jsx("div",{className:"auth-section__inner",children:r==="centered"?e.jsx("div",{className:"auth-section__card",children:f}):f})]})}exports.AUTH_MODES=E;exports.AUTH_VARIANTS=$;exports.default=he;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),d=require("react"),f=require("../NavIcon/NavIcon.cjs"),l=require("../SectionKit/SectionKit.cjs"),ee=require("../SectionKit/SectionArt.cjs"),P=require("../SectionKit/patchDefaults.cjs"),te=require("../IconButton/IconButton.cjs");;/* empty css */const se=require("../../../icons/glyphs/Star.cjs"),ae=require("../../../icons/glyphs/Eye.cjs"),ie=require("../../../icons/glyphs/EyeOff.cjs"),ne=require("../Checkbox/Checkbox.cjs"),$=["split","centered","minimal"],E=["signin","signup"],le={title:"Welcome back",subtitle:"Sign in to pick up where your team left off.",submitLabel:"Sign in",switchText:"New to Pixstella?",switchLabel:"Create an account",successMessage:"Signed in. Taking you to your workspace…"},ce={title:"Create your account",subtitle:"Start free. No credit card, no time limit on the Starter plan.",submitLabel:"Create account",switchText:"Already have an account?",switchLabel:"Sign in",successMessage:"Account created. Check your inbox to confirm your email."},oe=[{label:"Google",mark:"G",color:"var(--chart-series-3)"},{label:"GitHub",icon:"code"}],re={eyebrow:"Pixstella workspace",title:"Every dashboard your team ships, in one calm place.",art:{type:"scene",scene:"mountains",time:"dusk"},quote:{text:"We moved 40 analysts onto Pixstella in a week. Signing in every morning genuinely feels like opening a favourite app.",name:"Priya Raman",role:"Head of Data, Lumen",initials:"PR",rating:5},chips:["SOC 2 Type II","SSO & SCIM","99.99% uptime"]};function ue({off:s}){const a=s?ie.default:ae.default;return e.jsx(a,{size:18,strokeWidth:1.8})}const de=()=>e.jsx(se.default,{variant:"filled",size:14});function he(s){if(!s)return 0;let a=0;return s.length>=8&&a++,s.length>=12&&a++,/[A-Z]/.test(s)&&/[a-z]/.test(s)&&a++,/\d/.test(s)&&/[^A-Za-z0-9]/.test(s)&&a++,Math.max(1,a)}function D({brand:s}){if(!s)return null;const a=typeof s=="string"?{name:s}:s,h=typeof s=="string"?"brand":"brand.name",m=a.href?"a":"p";return e.jsxs(m,{className:"auth-section__brand",href:a.href,children:[a.icon!==""?e.jsx("span",{className:"auth-section__logo","aria-hidden":"true",children:e.jsx(f.default,{name:a.icon||"sparkles",size:18,strokeWidth:2})}):null,e.jsx("span",{"data-edit":h,children:a.name})]})}function me({id:s,variant:a="split",mode:h="signin",brand:m={name:"Pixstella",icon:"sparkles"},signIn:M,signUp:F,providers:U,divider:N="or continue with email",nameLabel:R="Full name",namePlaceholder:z="Maya Chen",emailLabel:O="Work email",emailPlaceholder:H="you@company.com",passwordLabel:G="Password",passwordPlaceholder:W="At least 8 characters",passwordHint:g="Use 8+ characters with a mix of letters, numbers and symbols.",rememberLabel:y="Remember me for 30 days",forgot:j={label:"Forgot password?",href:"#reset"},terms:v="By continuing you agree to our Terms of Service and Privacy Policy.",panel:B,panelPosition:V="right",className:Z="",style:S}){const r=$.includes(a)?a:"split",[w,K]=d.useState(E.includes(h)?h:"signin"),[p,J]=d.useState(!1),[k,A]=d.useState(""),[Q,q]=d.useState(!1),c=d.useId().replace(/[^a-zA-Z0-9_-]/g,""),n=w==="signup",u=n?"signUp":"signIn",o={...n?ce:le,...(n?F:M)??{}},X=he(k),T=P.patchDefault(oe,U),L=Array.isArray(T)?T:[],Y=()=>{K(n?"signin":"signup"),q(!1),A("")},b=e.jsxs("div",{className:"auth-section__form-wrap",children:[e.jsxs("div",{className:"auth-section__head",children:[r!=="split"?e.jsx(D,{brand:m}):null,e.jsx("h1",{className:"auth-section__title","data-edit":l.p(u,"title"),children:o.title}),o.subtitle?e.jsx("p",{className:"auth-section__sub","data-edit":l.p(u,"subtitle"),children:o.subtitle}):null]}),L.length?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"auth-section__social",children:L.map((t,i)=>e.jsxs("button",{type:"button",className:"auth-section__provider",style:t.color?{"--mark":t.color}:void 0,children:[t.icon?e.jsx(f.default,{name:t.icon,size:18}):e.jsx("span",{className:"auth-section__mark","aria-hidden":"true",children:t.mark||String(t.label||"?").charAt(0)}),e.jsx("span",{"data-edit":l.p("providers",i,"label"),children:t.label})]},i))}),N?e.jsx("p",{className:"auth-section__divider","data-edit":"divider",children:N}):null]}):null,e.jsxs("form",{className:"auth-section__form",onSubmit:t=>{t.preventDefault(),q(!0)},children:[n?e.jsxs("div",{className:"auth-section__field",children:[e.jsx("label",{className:"auth-section__label",htmlFor:`${c}-name`,"data-edit":"nameLabel",children:R}),e.jsx("div",{className:"auth-section__control",children:e.jsx("input",{id:`${c}-name`,className:"auth-section__input",type:"text",name:"name",autoComplete:"name",placeholder:z,required:!0})})]}):null,e.jsxs("div",{className:"auth-section__field",children:[e.jsx("label",{className:"auth-section__label",htmlFor:`${c}-email`,"data-edit":"emailLabel",children:O}),e.jsx("div",{className:"auth-section__control",children:e.jsx("input",{id:`${c}-email`,className:"auth-section__input",type:"email",name:"email",autoComplete:"email",placeholder:H,required:!0})})]}),e.jsxs("div",{className:"auth-section__field",children:[e.jsxs("div",{className:"auth-section__label-row",children:[e.jsx("label",{className:"auth-section__label",htmlFor:`${c}-pw`,"data-edit":"passwordLabel",children:G}),!n&&j?.label?e.jsx("a",{className:"auth-section__link",href:j.href||"#","data-edit":"forgot.label",children:j.label}):null]}),e.jsxs("div",{className:"auth-section__control auth-section__control--pw",children:[e.jsx("input",{id:`${c}-pw`,className:"auth-section__input",type:p?"text":"password",name:"password",autoComplete:n?"new-password":"current-password",placeholder:W,minLength:n?8:void 0,required:!0,value:k,onChange:t=>A(t.target.value),"aria-describedby":n?`${c}-hint`:void 0}),e.jsx(te.default,{variant:"ghost",tooltip:!1,icon:e.jsx(ue,{off:p}),label:p?"Hide password":"Show password",className:"auth-section__eye",onClick:()=>J(t=>!t),"aria-pressed":p,"aria-controls":`${c}-pw`})]}),n?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"auth-section__meter","data-score":X,"aria-hidden":"true",children:[e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{})]}),g?e.jsx("p",{className:"auth-section__hint",id:`${c}-hint`,"data-edit":"passwordHint",children:g}):null]}):null]}),!n&&y?e.jsx("div",{className:"auth-section__row",children:e.jsxs("label",{className:"auth-section__check",children:[e.jsx(ne.Checkbox,{name:"remember",defaultChecked:!0}),e.jsx("span",{"data-edit":"rememberLabel",children:y})]})}):null,e.jsx(l.Btn,{cta:o.submitLabel,path:l.p(u,"submitLabel"),variant:"primary",size:"lg",type:"submit",className:"auth-section__submit"}),e.jsx("p",{className:"auth-section__status",role:"status","aria-live":"polite",children:Q?o.successMessage:""})]}),e.jsxs("div",{className:"auth-section__foot",children:[e.jsxs("p",{className:"auth-section__switch",children:[e.jsx("span",{"data-edit":l.p(u,"switchText"),children:o.switchText}),e.jsx("button",{type:"button",onClick:Y,children:e.jsx("span",{"data-edit":l.p(u,"switchLabel"),children:o.switchLabel})})]}),v?e.jsx("p",{className:"auth-section__terms","data-edit":"terms",children:v}):null]})]}),C=l.cx("auth-section",`auth-section--${r}`,`auth-section--${w}`,r==="split"&&V==="left"&&"auth-section--panel-left",Z);if(r==="split"){const t=P.patchDefault(re,B)??null,i=t?.quote,I=t?.art&&t.art!=="none"&&t.art.type!=="none";return e.jsx("section",{id:s,className:C,style:S,"aria-label":n?"Sign up":"Sign in",children:e.jsx("div",{className:"auth-section__inner",children:e.jsxs("div",{className:"auth-section__shell",children:[e.jsxs("div",{className:"auth-section__form-col",children:[e.jsx(D,{brand:m}),b]}),t?e.jsxs("aside",{className:l.cx("auth-section__panel",!I&&"auth-section__panel--fill"),children:[e.jsx("div",{className:"auth-section__panel-art","aria-hidden":"true",children:I?e.jsx(ee.SectionArt,{art:t.art}):null}),e.jsxs("div",{className:"auth-section__panel-top",children:[t.eyebrow?e.jsx("p",{className:"auth-section__panel-eyebrow","data-edit":"panel.eyebrow",children:t.eyebrow}):null,t.title?e.jsx("h2",{className:"auth-section__panel-title","data-edit":"panel.title",children:t.title}):null]}),e.jsxs("div",{className:"auth-section__panel-bottom",children:[i?.text?e.jsxs("figure",{className:"auth-section__quote",children:[i.rating!==0?e.jsx("span",{className:"auth-section__stars",role:"img","aria-label":`Rated ${i.rating??5} out of 5`,children:Array.from({length:Math.round(i.rating??5)},(_,x)=>e.jsx(de,{},x))}):null,e.jsx("blockquote",{"data-edit":"panel.quote.text",children:i.text}),e.jsxs("figcaption",{className:"auth-section__who",children:[e.jsx("span",{className:"auth-section__avatar","aria-hidden":"true",style:i.color?{"--face":i.color}:void 0,children:i.initials||String(i.name||"?").split(/\s+/).map(_=>_[0]).join("").slice(0,2)}),e.jsxs("span",{children:[e.jsx("b",{"data-edit":"panel.quote.name",children:i.name}),e.jsx("span",{"data-edit":"panel.quote.role",children:i.role})]})]})]}):null,t.chips?.length?e.jsx("ul",{className:"auth-section__chips",children:t.chips.map((_,x)=>e.jsxs("li",{children:[e.jsx(f.default,{name:"shield",size:13}),e.jsx("span",{"data-edit":l.p("panel.chips",x),children:_})]},x))}):null]})]}):null]})})})}return e.jsxs("section",{id:s,className:C,style:S,"aria-label":n?"Sign up":"Sign in",children:[r==="centered"?e.jsx("div",{className:"auth-section__glow","aria-hidden":"true"}):null,e.jsx("div",{className:"auth-section__inner",children:r==="centered"?e.jsx("div",{className:"auth-section__card",children:b}):b})]})}exports.AUTH_MODES=E;exports.AUTH_VARIANTS=$;exports.default=me;
@@ -9,24 +9,25 @@ import './AuthSection.css';/* empty css */
9
9
  import se from "../../../icons/glyphs/Star.mjs";
10
10
  import le from "../../../icons/glyphs/Eye.mjs";
11
11
  import ce from "../../../icons/glyphs/EyeOff.mjs";
12
- const oe = ["split", "centered", "minimal"], re = ["signin", "signup"], de = {
12
+ import { Checkbox as oe } from "../Checkbox/Checkbox.mjs";
13
+ const re = ["split", "centered", "minimal"], de = ["signin", "signup"], he = {
13
14
  title: "Welcome back",
14
15
  subtitle: "Sign in to pick up where your team left off.",
15
16
  submitLabel: "Sign in",
16
17
  switchText: "New to Pixstella?",
17
18
  switchLabel: "Create an account",
18
19
  successMessage: "Signed in. Taking you to your workspace…"
19
- }, he = {
20
+ }, ue = {
20
21
  title: "Create your account",
21
22
  subtitle: "Start free. No credit card, no time limit on the Starter plan.",
22
23
  submitLabel: "Create account",
23
24
  switchText: "Already have an account?",
24
25
  switchLabel: "Sign in",
25
26
  successMessage: "Account created. Check your inbox to confirm your email."
26
- }, ue = [
27
+ }, me = [
27
28
  { label: "Google", mark: "G", color: "var(--chart-series-3)" },
28
29
  { label: "GitHub", icon: "code" }
29
- ], me = {
30
+ ], pe = {
30
31
  eyebrow: "Pixstella workspace",
31
32
  title: "Every dashboard your team ships, in one calm place.",
32
33
  art: { type: "scene", scene: "mountains", time: "dusk" },
@@ -39,11 +40,11 @@ const oe = ["split", "centered", "minimal"], re = ["signin", "signup"], de = {
39
40
  },
40
41
  chips: ["SOC 2 Type II", "SSO & SCIM", "99.99% uptime"]
41
42
  };
42
- function pe({ off: i }) {
43
+ function _e({ off: i }) {
43
44
  return /* @__PURE__ */ e(i ? ce : le, { size: 18, strokeWidth: 1.8 });
44
45
  }
45
- const _e = () => /* @__PURE__ */ e(se, { variant: "filled", size: 14 });
46
- function fe(i) {
46
+ const fe = () => /* @__PURE__ */ e(se, { variant: "filled", size: 14 });
47
+ function be(i) {
47
48
  if (!i) return 0;
48
49
  let n = 0;
49
50
  return i.length >= 8 && n++, i.length >= 12 && n++, /[A-Z]/.test(i) && /[a-z]/.test(i) && n++, /\d/.test(i) && /[^A-Za-z0-9]/.test(i) && n++, Math.max(1, n);
@@ -56,7 +57,7 @@ function z({ brand: i }) {
56
57
  /* @__PURE__ */ e("span", { "data-edit": u, children: n.name })
57
58
  ] });
58
59
  }
59
- function Ie({
60
+ function Te({
60
61
  id: i,
61
62
  variant: n = "split",
62
63
  mode: u = "signin",
@@ -80,8 +81,8 @@ function Ie({
80
81
  className: J = "",
81
82
  style: x
82
83
  }) {
83
- const d = oe.includes(n) ? n : "split", [A, K] = b(re.includes(u) ? u : "signin"), [p, Q] = b(!1), [L, I] = b(""), [X, T] = b(!1), c = te().replace(/[^a-zA-Z0-9_-]/g, ""), l = A === "signup", h = l ? "signUp" : "signIn", o = { ...l ? he : de, ...(l ? U : M) ?? {} }, Y = fe(L), C = F(ue, G), P = Array.isArray(C) ? C : [], ee = () => {
84
- K(l ? "signin" : "signup"), T(!1), I("");
84
+ const d = re.includes(n) ? n : "split", [A, K] = b(de.includes(u) ? u : "signin"), [p, Q] = b(!1), [L, I] = b(""), [X, C] = b(!1), c = te().replace(/[^a-zA-Z0-9_-]/g, ""), l = A === "signup", h = l ? "signUp" : "signIn", o = { ...l ? ue : he, ...(l ? U : M) ?? {} }, Y = be(L), T = F(me, G), P = Array.isArray(T) ? T : [], ee = () => {
85
+ K(l ? "signin" : "signup"), C(!1), I("");
85
86
  }, g = /* @__PURE__ */ a("div", { className: "auth-section__form-wrap", children: [
86
87
  /* @__PURE__ */ a("div", { className: "auth-section__head", children: [
87
88
  d !== "split" ? /* @__PURE__ */ e(z, { brand: m }) : null,
@@ -100,7 +101,7 @@ function Ie({
100
101
  {
101
102
  className: "auth-section__form",
102
103
  onSubmit: (t) => {
103
- t.preventDefault(), T(!0);
104
+ t.preventDefault(), C(!0);
104
105
  },
105
106
  children: [
106
107
  l ? /* @__PURE__ */ a("div", { className: "auth-section__field", children: [
@@ -138,7 +139,7 @@ function Ie({
138
139
  {
139
140
  variant: "ghost",
140
141
  tooltip: !1,
141
- icon: /* @__PURE__ */ e(pe, { off: p }),
142
+ icon: /* @__PURE__ */ e(_e, { off: p }),
142
143
  label: p ? "Hide password" : "Show password",
143
144
  className: "auth-section__eye",
144
145
  onClick: () => Q((t) => !t),
@@ -158,7 +159,7 @@ function Ie({
158
159
  ] }) : null
159
160
  ] }),
160
161
  !l && S ? /* @__PURE__ */ e("div", { className: "auth-section__row", children: /* @__PURE__ */ a("label", { className: "auth-section__check", children: [
161
- /* @__PURE__ */ e("input", { type: "checkbox", name: "remember", defaultChecked: !0 }),
162
+ /* @__PURE__ */ e(oe, { name: "remember", defaultChecked: !0 }),
162
163
  /* @__PURE__ */ e("span", { "data-edit": "rememberLabel", children: S })
163
164
  ] }) }) : null,
164
165
  /* @__PURE__ */ e(ae, { cta: o.submitLabel, path: r(h, "submitLabel"), variant: "primary", size: "lg", type: "submit", className: "auth-section__submit" }),
@@ -175,7 +176,7 @@ function Ie({
175
176
  ] })
176
177
  ] }), $ = D("auth-section", `auth-section--${d}`, `auth-section--${A}`, d === "split" && V === "left" && "auth-section--panel-left", J);
177
178
  if (d === "split") {
178
- const t = F(me, Z) ?? null, s = t?.quote, q = t?.art && t.art !== "none" && t.art.type !== "none";
179
+ const t = F(pe, Z) ?? null, s = t?.quote, q = t?.art && t.art !== "none" && t.art.type !== "none";
179
180
  return /* @__PURE__ */ e("section", { id: i, className: $, style: x, "aria-label": l ? "Sign up" : "Sign in", children: /* @__PURE__ */ e("div", { className: "auth-section__inner", children: /* @__PURE__ */ a("div", { className: "auth-section__shell", children: [
180
181
  /* @__PURE__ */ a("div", { className: "auth-section__form-col", children: [
181
182
  /* @__PURE__ */ e(z, { brand: m }),
@@ -189,7 +190,7 @@ function Ie({
189
190
  ] }),
190
191
  /* @__PURE__ */ a("div", { className: "auth-section__panel-bottom", children: [
191
192
  s?.text ? /* @__PURE__ */ a("figure", { className: "auth-section__quote", children: [
192
- s.rating !== 0 ? /* @__PURE__ */ e("span", { className: "auth-section__stars", role: "img", "aria-label": `Rated ${s.rating ?? 5} out of 5`, children: Array.from({ length: Math.round(s.rating ?? 5) }, (_, f) => /* @__PURE__ */ e(_e, {}, f)) }) : null,
193
+ s.rating !== 0 ? /* @__PURE__ */ e("span", { className: "auth-section__stars", role: "img", "aria-label": `Rated ${s.rating ?? 5} out of 5`, children: Array.from({ length: Math.round(s.rating ?? 5) }, (_, f) => /* @__PURE__ */ e(fe, {}, f)) }) : null,
193
194
  /* @__PURE__ */ e("blockquote", { "data-edit": "panel.quote.text", children: s.text }),
194
195
  /* @__PURE__ */ a("figcaption", { className: "auth-section__who", children: [
195
196
  /* @__PURE__ */ e("span", { className: "auth-section__avatar", "aria-hidden": "true", style: s.color ? { "--face": s.color } : void 0, children: s.initials || String(s.name || "?").split(/\s+/).map((_) => _[0]).join("").slice(0, 2) }),
@@ -213,7 +214,7 @@ function Ie({
213
214
  ] });
214
215
  }
215
216
  export {
216
- re as AUTH_MODES,
217
- oe as AUTH_VARIANTS,
218
- Ie as default
217
+ de as AUTH_MODES,
218
+ re as AUTH_VARIANTS,
219
+ Te as default
219
220
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),s=require("react"),M=require("../../../icons/glyphs/Check.cjs"),O=require("../../../icons/glyphs/Minus.cjs");;/* empty css */const v=s.forwardRef(function({checked:l,defaultChecked:u,onChange:g,onCheckedChange:C,indeterminate:o,disabled:a=!1,invalid:h=!1,label:n,description:r,size:f="md",tone:k,id:B,className:p="",style:b,...N},t){const j=s.useId(),x=B??(n?`px-checkbox-${j}`:void 0),m=r?`${x??j}-desc`:void 0,d=s.useRef(null),q=s.useCallback(c=>{d.current=c,typeof t=="function"?t(c):t&&(t.current=c)},[t]),i=l!==void 0,[R,y]=s.useState(!!u),I=i?!!l:R;s.useEffect(()=>{d.current&&o!==void 0&&(d.current.indeterminate=!!o)},[o]);const w=c=>{i||y(c.target.checked),g?.(c),C?.(c.target.checked,c)},_=e.jsxs("span",{className:["px-checkbox",`px-checkbox--${f==="sm"?"sm":f==="lg"?"lg":"md"}`,(I||o)&&"px-checkbox--on",a&&"px-checkbox--disabled",h&&"px-checkbox--invalid",!n&&p].filter(Boolean).join(" "),style:{...k?{"--px-checkbox-accent":k}:null,...n?null:b},children:[e.jsx("input",{ref:q,type:"checkbox",id:x,className:"px-checkbox__input",checked:i?!!l:void 0,defaultChecked:i?void 0:u,onChange:w,disabled:a,"aria-invalid":h||void 0,"aria-describedby":m,"aria-checked":o?"mixed":void 0,...N}),e.jsx("span",{className:"px-checkbox__box","aria-hidden":"true",children:o?e.jsx(O.default,{trim:!0,size:12,strokeWidth:3}):e.jsx(M.default,{trim:!0,size:12,strokeWidth:3})})]});return n?e.jsxs("label",{htmlFor:x,className:["px-checkbox-field",a&&"px-checkbox-field--disabled",p].filter(Boolean).join(" "),style:b,children:[_,e.jsxs("span",{className:"px-checkbox-field__text",children:[e.jsx("span",{className:"px-checkbox-field__label",children:n}),r?e.jsx("span",{id:m,className:"px-checkbox-field__description",children:r}):null]})]}):_});exports.Checkbox=v;exports.default=v;
@@ -0,0 +1 @@
1
+ @keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes scaleIn{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}.px-checkbox{--px-checkbox-accent: var(--px-accent, var(--chart-series-1, var(--px-accent, #1a56db)));--px-checkbox-size: 18px;--px-checkbox-on: var(--color-surface-solid, var(--color-surface));position:relative;display:inline-grid;flex:none;width:var(--px-checkbox-size);height:var(--px-checkbox-size);vertical-align:middle}.px-checkbox--sm{--px-checkbox-size: 15px}.px-checkbox--lg{--px-checkbox-size: 22px}.px-checkbox__input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;z-index:1}.px-checkbox__box{display:grid;place-items:center;width:100%;height:100%;box-sizing:border-box;border:1.5px solid color-mix(in srgb,var(--color-text-faint, #9ca3af) 70%,var(--color-border, #d1d5db));border-radius:calc(var(--px-checkbox-size) * .28);background:var(--color-surface, #fff);color:transparent;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease}.px-checkbox__box svg{width:70%;height:70%;transform:scale(.6);opacity:0;transition:transform .15s cubic-bezier(.34,1.56,.64,1),opacity .1s ease}.px-checkbox:hover:not(.px-checkbox--disabled):not(.px-checkbox--on) .px-checkbox__box{border-color:var(--color-text-muted, #6b7280)}.px-checkbox--on .px-checkbox__box{border-color:var(--px-checkbox-accent);background:var(--px-checkbox-accent);color:var(--px-checkbox-on)}.px-checkbox--on .px-checkbox__box svg{transform:none;opacity:1}.px-checkbox__input:focus-visible+.px-checkbox__box{box-shadow:0 0 0 3px color-mix(in srgb,var(--px-checkbox-accent) 30%,transparent)}.px-checkbox--invalid .px-checkbox__box{border-color:var(--color-danger, #e11d48)}.px-checkbox--disabled{opacity:.5}.px-checkbox--disabled .px-checkbox__input{cursor:not-allowed}@media(prefers-reduced-motion:reduce){.px-checkbox__box,.px-checkbox__box svg{transition:none}}.px-checkbox-field{display:inline-flex;align-items:flex-start;gap:10px;cursor:pointer;color:var(--color-text-primary);font-size:14px;line-height:1.4}.px-checkbox-field .px-checkbox{margin-top:1px}.px-checkbox-field__text{display:grid;gap:2px;min-width:0}.px-checkbox-field__description{color:var(--color-text-secondary);font-size:13px}.px-checkbox-field--disabled{cursor:not-allowed;color:var(--color-text-muted)}