@eifi1/ui-kit 0.28.1 → 0.30.0

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 (228) hide show
  1. package/README.md +44 -4
  2. package/dist/account/account-parts.d.ts +21 -0
  3. package/dist/account/account-parts.js +40 -0
  4. package/dist/account/account-parts.js.map +1 -0
  5. package/dist/account/data-export-setting.d.ts +73 -0
  6. package/dist/account/data-export-setting.js +113 -0
  7. package/dist/account/data-export-setting.js.map +1 -0
  8. package/dist/account/delete-account-setting.d.ts +91 -0
  9. package/dist/account/delete-account-setting.js +199 -0
  10. package/dist/account/delete-account-setting.js.map +1 -0
  11. package/dist/account/email-change-setting.d.ts +136 -0
  12. package/dist/account/email-change-setting.js +277 -0
  13. package/dist/account/email-change-setting.js.map +1 -0
  14. package/dist/account/sessions-setting.d.ts +110 -0
  15. package/dist/account/sessions-setting.js +146 -0
  16. package/dist/account/sessions-setting.js.map +1 -0
  17. package/dist/admin/admin-action-confirm.d.ts +91 -0
  18. package/dist/admin/admin-action-confirm.js +276 -0
  19. package/dist/admin/admin-action-confirm.js.map +1 -0
  20. package/dist/admin/admin-action-log.d.ts +105 -0
  21. package/dist/admin/admin-action-log.js +153 -0
  22. package/dist/admin/admin-action-log.js.map +1 -0
  23. package/dist/admin/admin-parts.d.ts +40 -0
  24. package/dist/admin/admin-parts.js +45 -0
  25. package/dist/admin/admin-parts.js.map +1 -0
  26. package/dist/admin/invitations-panel.d.ts +91 -0
  27. package/dist/admin/invitations-panel.js +289 -0
  28. package/dist/admin/invitations-panel.js.map +1 -0
  29. package/dist/admin/reviewer-scope-editor.d.ts +91 -0
  30. package/dist/admin/reviewer-scope-editor.js +134 -0
  31. package/dist/admin/reviewer-scope-editor.js.map +1 -0
  32. package/dist/admin/role-select.d.ts +91 -0
  33. package/dist/admin/role-select.js +128 -0
  34. package/dist/admin/role-select.js.map +1 -0
  35. package/dist/admin/transfer-ownership-dialog.d.ts +91 -0
  36. package/dist/admin/transfer-ownership-dialog.js +83 -0
  37. package/dist/admin/transfer-ownership-dialog.js.map +1 -0
  38. package/dist/admin/user-roster.d.ts +91 -0
  39. package/dist/admin/user-roster.js +285 -0
  40. package/dist/admin/user-roster.js.map +1 -0
  41. package/dist/auth/accept-invitation.d.ts +90 -0
  42. package/dist/auth/accept-invitation.js +117 -0
  43. package/dist/auth/accept-invitation.js.map +1 -0
  44. package/dist/auth/auth-errors.d.ts +139 -0
  45. package/dist/auth/auth-errors.js +92 -0
  46. package/dist/auth/auth-errors.js.map +1 -0
  47. package/dist/auth/complete-name-dialog.d.ts +71 -0
  48. package/dist/auth/complete-name-dialog.js +168 -0
  49. package/dist/auth/complete-name-dialog.js.map +1 -0
  50. package/dist/auth/email-tag.d.ts +60 -0
  51. package/dist/auth/email-tag.js +23 -0
  52. package/dist/auth/email-tag.js.map +1 -0
  53. package/dist/auth/forgot-password-form.d.ts +86 -0
  54. package/dist/auth/forgot-password-form.js +123 -0
  55. package/dist/auth/forgot-password-form.js.map +1 -0
  56. package/dist/auth/form-rules.d.ts +27 -0
  57. package/dist/auth/form-rules.js +23 -0
  58. package/dist/auth/form-rules.js.map +1 -0
  59. package/dist/auth/new-password-fields.d.ts +38 -0
  60. package/dist/auth/new-password-fields.js +54 -0
  61. package/dist/auth/new-password-fields.js.map +1 -0
  62. package/dist/auth/not-found-page.d.ts +57 -0
  63. package/dist/auth/not-found-page.js +40 -0
  64. package/dist/auth/not-found-page.js.map +1 -0
  65. package/dist/auth/register-form.d.ts +91 -0
  66. package/dist/auth/register-form.js +270 -0
  67. package/dist/auth/register-form.js.map +1 -0
  68. package/dist/auth/reset-password-form.d.ts +131 -0
  69. package/dist/auth/reset-password-form.js +167 -0
  70. package/dist/auth/reset-password-form.js.map +1 -0
  71. package/dist/auth/sign-in-form.d.ts +295 -0
  72. package/dist/auth/sign-in-form.js +426 -0
  73. package/dist/auth/sign-in-form.js.map +1 -0
  74. package/dist/auth/status-parts.d.ts +78 -0
  75. package/dist/auth/status-parts.js +83 -0
  76. package/dist/auth/status-parts.js.map +1 -0
  77. package/dist/auth/verify-email.d.ts +126 -0
  78. package/dist/auth/verify-email.js +243 -0
  79. package/dist/auth/verify-email.js.map +1 -0
  80. package/dist/chart.d.ts +25 -5
  81. package/dist/components/account-chips.d.ts +47 -7
  82. package/dist/components/account-chips.js +19 -3
  83. package/dist/components/account-chips.js.map +1 -1
  84. package/dist/components/account-settings-labels.d.ts +12 -1
  85. package/dist/components/account-settings-labels.js +4 -1
  86. package/dist/components/account-settings-labels.js.map +1 -1
  87. package/dist/components/account-settings.d.ts +61 -6
  88. package/dist/components/account-settings.js +115 -15
  89. package/dist/components/account-settings.js.map +1 -1
  90. package/dist/components/amount-input.d.ts +26 -5
  91. package/dist/components/button-group.d.ts +26 -5
  92. package/dist/components/calculator.d.ts +26 -5
  93. package/dist/components/confirm-dialog.d.ts +26 -5
  94. package/dist/components/copy-button.d.ts +23 -2
  95. package/dist/components/danger-confirm.d.ts +26 -5
  96. package/dist/components/facing-pair.d.ts +26 -5
  97. package/dist/components/file-button.d.ts +26 -5
  98. package/dist/components/file-dropzone.d.ts +26 -5
  99. package/dist/components/form-actions.d.ts +26 -5
  100. package/dist/components/iban-input.d.ts +26 -5
  101. package/dist/components/language-select.d.ts +26 -12
  102. package/dist/components/legal-page.d.ts +26 -5
  103. package/dist/components/legal.d.ts +26 -5
  104. package/dist/components/money-field.d.ts +26 -5
  105. package/dist/components/number-field.d.ts +26 -5
  106. package/dist/components/number-input.d.ts +26 -5
  107. package/dist/components/numpad-sheet.d.ts +26 -5
  108. package/dist/components/phone-input.d.ts +26 -5
  109. package/dist/components/series-chart.d.ts +26 -5
  110. package/dist/components/settings-fields.d.ts +25 -7
  111. package/dist/components/share-card.d.ts +25 -4
  112. package/dist/components/text-link.d.ts +26 -5
  113. package/dist/components/time-input.d.ts +26 -5
  114. package/dist/components/ui.d.ts +23 -2
  115. package/dist/components/user-avatar.d.ts +16 -2
  116. package/dist/components/user-avatar.js +7 -3
  117. package/dist/components/user-avatar.js.map +1 -1
  118. package/dist/{kit-labels-Du0uHBq4.d.ts → delete-account-setting-CGVMckMw.d.ts} +6654 -5302
  119. package/dist/feedback/feedback-attachment.d.ts +26 -5
  120. package/dist/feedback/feedback-context.d.ts +26 -5
  121. package/dist/feedback/feedback-crash.d.ts +26 -5
  122. package/dist/feedback/feedback-dialog.d.ts +26 -5
  123. package/dist/feedback/feedback-inbox.d.ts +26 -5
  124. package/dist/feedback/feedback-labels.d.ts +26 -5
  125. package/dist/feedback/feedback-menu.d.ts +26 -5
  126. package/dist/feedback/feedback-record.d.ts +26 -5
  127. package/dist/feedback/feedback-row-detail.d.ts +26 -5
  128. package/dist/feedback/feedback-status-undo.d.ts +26 -5
  129. package/dist/feedback/feedback-submit.d.ts +26 -5
  130. package/dist/feedback/feedback-swipe.d.ts +26 -5
  131. package/dist/feedback/feedback-table.d.ts +23 -2
  132. package/dist/feedback/feedback-thread.d.ts +26 -5
  133. package/dist/feedback.d.ts +26 -5
  134. package/dist/hooks/use-anchored-panel.d.ts +6 -2
  135. package/dist/hooks/use-anchored-panel.js +2 -1
  136. package/dist/hooks/use-anchored-panel.js.map +1 -1
  137. package/dist/hooks/use-file-drop.d.ts +26 -5
  138. package/dist/i18n/defaults.d.ts +26 -5
  139. package/dist/i18n/defaults.js +40 -0
  140. package/dist/i18n/defaults.js.map +1 -1
  141. package/dist/i18n/german.d.ts +26 -5
  142. package/dist/i18n/german.js +343 -2
  143. package/dist/i18n/german.js.map +1 -1
  144. package/dist/i18n/kit-labels.d.ts +23 -2
  145. package/dist/i18n/kit-labels.js.map +1 -1
  146. package/dist/i18n/languages.d.ts +21 -204
  147. package/dist/i18n/locales/de-CH.d.ts +26 -5
  148. package/dist/i18n/locales/en.d.ts +26 -5
  149. package/dist/i18n/locales/es.d.ts +26 -5
  150. package/dist/i18n/locales/es.js +337 -3
  151. package/dist/i18n/locales/es.js.map +1 -1
  152. package/dist/i18n/locales/fr.d.ts +26 -5
  153. package/dist/i18n/locales/fr.js +344 -2
  154. package/dist/i18n/locales/fr.js.map +1 -1
  155. package/dist/i18n/locales/hu.d.ts +26 -5
  156. package/dist/i18n/locales/hu.js +337 -3
  157. package/dist/i18n/locales/hu.js.map +1 -1
  158. package/dist/i18n/locales/it.d.ts +26 -5
  159. package/dist/i18n/locales/it.js +342 -2
  160. package/dist/i18n/locales/it.js.map +1 -1
  161. package/dist/i18n/locales/zh.d.ts +26 -5
  162. package/dist/i18n/locales/zh.js +333 -2
  163. package/dist/i18n/locales/zh.js.map +1 -1
  164. package/dist/i18n/review.d.ts +26 -5
  165. package/dist/i18n/review.js +45 -1
  166. package/dist/i18n/review.js.map +1 -1
  167. package/dist/index.d.ts +19 -3
  168. package/dist/index.js +89 -0
  169. package/dist/index.js.map +1 -1
  170. package/dist/lib/person-name.d.ts +69 -0
  171. package/dist/lib/person-name.js +65 -0
  172. package/dist/lib/person-name.js.map +1 -0
  173. package/dist/rhf/fields.d.ts +26 -5
  174. package/dist/rhf/form.d.ts +26 -5
  175. package/dist/rhf.d.ts +26 -5
  176. package/dist/shell/app-shell.d.ts +26 -5
  177. package/dist/shell/company-switcher.d.ts +59 -0
  178. package/dist/shell/company-switcher.js +85 -0
  179. package/dist/shell/company-switcher.js.map +1 -0
  180. package/dist/shell/top-bar-brand.d.ts +26 -5
  181. package/dist/shell/topbar-action-menu.d.ts +1 -0
  182. package/dist/shell.d.ts +20 -5
  183. package/dist/wizard/stepper-nav.d.ts +26 -5
  184. package/dist/wizard.d.ts +26 -5
  185. package/package.json +1 -1
  186. package/src/account/account-parts.ts +67 -0
  187. package/src/account/data-export-setting.tsx +218 -0
  188. package/src/account/delete-account-setting.tsx +362 -0
  189. package/src/account/email-change-setting.tsx +457 -0
  190. package/src/account/sessions-setting.tsx +283 -0
  191. package/src/admin/admin-action-confirm.tsx +495 -0
  192. package/src/admin/admin-action-log.tsx +297 -0
  193. package/src/admin/admin-parts.ts +82 -0
  194. package/src/admin/invitations-panel.tsx +516 -0
  195. package/src/admin/reviewer-scope-editor.tsx +234 -0
  196. package/src/admin/role-select.tsx +286 -0
  197. package/src/admin/transfer-ownership-dialog.tsx +172 -0
  198. package/src/admin/user-roster.tsx +573 -0
  199. package/src/auth/accept-invitation.tsx +227 -0
  200. package/src/auth/auth-errors.ts +262 -0
  201. package/src/auth/complete-name-dialog.tsx +253 -0
  202. package/src/auth/email-tag.ts +75 -0
  203. package/src/auth/forgot-password-form.tsx +229 -0
  204. package/src/auth/form-rules.ts +40 -0
  205. package/src/auth/new-password-fields.tsx +85 -0
  206. package/src/auth/not-found-page.tsx +98 -0
  207. package/src/auth/register-form.tsx +477 -0
  208. package/src/auth/reset-password-form.tsx +351 -0
  209. package/src/auth/sign-in-form.tsx +859 -0
  210. package/src/auth/status-parts.tsx +138 -0
  211. package/src/auth/verify-email.tsx +409 -0
  212. package/src/components/account-chips.tsx +64 -7
  213. package/src/components/account-settings-labels.ts +15 -1
  214. package/src/components/account-settings.tsx +199 -23
  215. package/src/components/user-avatar.tsx +22 -4
  216. package/src/hooks/use-anchored-panel.ts +14 -3
  217. package/src/i18n/defaults.ts +40 -0
  218. package/src/i18n/german.ts +379 -0
  219. package/src/i18n/kit-labels.tsx +60 -0
  220. package/src/i18n/locales/es.ts +371 -1
  221. package/src/i18n/locales/fr.ts +379 -0
  222. package/src/i18n/locales/hu.ts +366 -1
  223. package/src/i18n/locales/it.ts +373 -0
  224. package/src/i18n/locales/zh.ts +343 -0
  225. package/src/i18n/review.ts +44 -0
  226. package/src/index.ts +146 -0
  227. package/src/lib/person-name.ts +157 -0
  228. package/src/shell/company-switcher.tsx +140 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/person-name.ts"],"sourcesContent":["/**\n * A person's name as the reader's language writes it — the one rule of\n * docs/auth-harmonization.md §3.2 for every place a name is shown: the top bar, the\n * account menu, user lists, avatars, feedback, the greeting in a mail.\n *\n * WHY A FUNCTION AND NOT `${first} ${last}`. The three apps move from one free-text\n * `display_name` to `first_name` + `last_name` (§2.3), and the moment a name has two\n * parts, their ORDER is a language rule, not a data rule:\n *\n * - \"First Last\" in de-CH, en, fr, it and es — \"Ada Example\";\n * - **\"Last First\" in hu** — Hungarian puts the family name first: \"Example Ada\";\n * - **\"LastFirst\" with no space in zh** — a Chinese name is written family name first\n * and run together: 李 + 小龙 → \"李小龙\". Only a name written in CJK characters,\n * though: BOTH parts must hold Han (or kana, or hangul) characters. A Latin name read\n * in Chinese stays as it is written — \"Ada Lovelace\", not \"LovelaceAda\" (the\n * coordinator's refinement of §3.2, 2026-10-06).\n *\n * WHOSE language (§3.2, §10.6): on screen the READER's, so this takes the locale of the\n * UI, never the locale stored with the person. A mail uses the recipient's and a frozen\n * stamp the author's — that is server-kit's `full_name(first, last, locale)`, which\n * follows exactly these rules so a name reads the same in the app and in its mails.\n *\n * NOTHING IS GUESSED. Both parts are trimmed, and an empty part simply drops out: a\n * migrated keksdose or Kurvenschmiede user keeps the whole old display name as the\n * first name and an empty last name until they complete it (§3.3), and \"Ada Example\"\n * with no last name must still read \"Ada Example\" — not \"Ada Example \" and not a split\n * at the space. Inner spaces are the person's own and stay as typed.\n *\n * Only the language subtag counts (\"de-CH\" → \"de\", \"zh-Hant-TW\" → \"zh\"), and a language\n * this does not know reads \"First Last\", the order of the kit's five other languages.\n */\n\n/** The two parts of a person's name. Either may be missing or blank: a migrated row\n * has an empty `last` until it is completed (§3.3), and APIs send `null` for \"none\". */\nexport interface PersonName {\n /** The given name — `first_name`. */\n first?: string | null;\n /** The family name — `last_name`. */\n last?: string | null;\n}\n\ntype NameOrder = \"given-first\" | \"family-first\" | \"family-first-joined\";\n\n/** A part written in CJK characters: Han, and kana or hangul where they occur (a\n * Japanese or Korean name in a Chinese UI). One such character is enough. */\nconst CJK = /\\p{Script=Han}|\\p{Script=Hiragana}|\\p{Script=Katakana}|\\p{Script=Hangul}/u;\n\nfunction language(locale: string | undefined): string {\n return (locale ?? \"\").split(/[-_]/)[0]!.toLowerCase();\n}\n\n/**\n * The order the reader's language writes THIS name in. See the module note: hu puts the\n * family name first for every name; zh runs a CJK name together family-first and leaves\n * any other name as it is written; the rest write the given name first. A part that is\n * empty passes the CJK test, so a one-part name orders by the part it has. Called with\n * at least one part filled in.\n */\nfunction nameOrder(locale: string | undefined, first: string, last: string): NameOrder {\n const lang = language(locale);\n if (lang === \"hu\") return \"family-first\";\n if (lang === \"zh\" && (!first || CJK.test(first)) && (!last || CJK.test(last))) {\n return \"family-first-joined\";\n }\n return \"given-first\";\n}\n\nfunction clean(part: string | null | undefined): string {\n return (part ?? \"\").trim();\n}\n\n/**\n * The full name in the reader's order: \"Ada Example\" (en, de, fr, it, es), \"Example Ada\"\n * (hu), \"李小龙\" (zh, for a name in CJK characters — \"Ada Lovelace\" stays so). Trimmed;\n * with one part empty, the other alone; with both empty, `\"\"` — so a caller can fall\n * back with `||` (`formatPersonName(p, l) || email`).\n *\n * `locale` is the READER's — the UI language, `useKitLocale()` in a component. Left out,\n * the given-name-first order.\n */\nexport function formatPersonName(name: PersonName, locale?: string): string {\n const first = clean(name.first);\n const last = clean(name.last);\n if (!last) return first;\n if (!first) return last;\n switch (nameOrder(locale, first, last)) {\n case \"family-first\":\n return `${last} ${first}`;\n case \"family-first-joined\":\n return `${last}${first}`;\n default:\n return `${first} ${last}`;\n }\n}\n\n/** One segmenter for every avatar on the page, made on first use. `null`: the runtime\n * has none, and code points have to do. */\nlet graphemes: Intl.Segmenter | null | undefined;\n\n/** The first user-perceived character — \"É\" whether it was typed as one code point or\n * as E + a combining accent, a whole emoji rather than half a surrogate pair. */\nfunction firstGrapheme(text: string): string {\n graphemes ??=\n typeof Intl !== \"undefined\" && \"Segmenter\" in Intl\n ? new Intl.Segmenter(undefined, { granularity: \"grapheme\" })\n : null;\n if (graphemes) {\n const segment = graphemes.segment(text)[Symbol.iterator]().next();\n if (!segment.done) return segment.value.segment;\n }\n return [...text][0] ?? \"\";\n}\n\n/** Upper case under the reader's rules (Turkish \"i\" → \"İ\"), and plain upper case for a\n * locale tag the runtime refuses rather than a thrown RangeError in a render. */\nfunction upper(text: string, locale: string | undefined): string {\n try {\n return text.toLocaleUpperCase(locale);\n } catch {\n return text.toUpperCase();\n }\n}\n\n/**\n * The initials for an avatar, in the same order as {@link formatPersonName}:\n *\n * - \"AE\" for Ada Example in en, de, fr, it and es;\n * - \"EA\" in hu, family name first;\n * - **one character in zh for a name in CJK characters, the family name's first** —\n * \"李\" for 李小龙. Two Chinese characters are not initials, they are most of a name.\n * A Latin name in zh is \"AE\", as it is written.\n *\n * With only one part (a migrated user's whole old display name in `first`, §3.3), the\n * initials are what {@link avatarInitials} has always made of a display name: the first\n * letters of its first two words (\"Ada Example\" → \"AE\"), or the first two letters of a\n * single word (\"Ada\" → \"AD\") — so nobody's avatar changes when their account migrates.\n * In zh, a part in CJK characters gives its first character.\n *\n * `\"\"` when both parts are blank; {@link UserAvatar} then falls back to the email.\n */\nexport function personInitials(name: PersonName, locale?: string): string {\n const first = clean(name.first);\n const last = clean(name.last);\n if (!first && !last) return \"\";\n const order = nameOrder(locale, first, last);\n if (order === \"family-first-joined\") return upper(firstGrapheme(last || first), locale);\n if (!first || !last) {\n const words = (first || last).split(/\\s+/);\n const initials =\n words.length >= 2\n ? firstGrapheme(words[0]!) + firstGrapheme(words[1]!)\n : [...words[0]!].slice(0, 2).join(\"\");\n return upper(initials, locale);\n }\n const pair = order === \"family-first\" ? [last, first] : [first, last];\n return upper(firstGrapheme(pair[0]!) + firstGrapheme(pair[1]!), locale);\n}\n"],"mappings":";AA6CA,MAAM,MAAM;AAEZ,SAAS,SAAS,QAAoC;AACpD,UAAQ,UAAU,IAAI,MAAM,MAAM,EAAE,CAAC,EAAG,YAAY;AACtD;AASA,SAAS,UAAU,QAA4B,OAAe,MAAyB;AACrF,QAAM,OAAO,SAAS,MAAM;AAC5B,MAAI,SAAS,KAAM,QAAO;AAC1B,MAAI,SAAS,SAAS,CAAC,SAAS,IAAI,KAAK,KAAK,OAAO,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI;AAC7E,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEA,SAAS,MAAM,MAAyC;AACtD,UAAQ,QAAQ,IAAI,KAAK;AAC3B;AAWO,SAAS,iBAAiB,MAAkB,QAAyB;AAC1E,QAAM,QAAQ,MAAM,KAAK,KAAK;AAC9B,QAAM,OAAO,MAAM,KAAK,IAAI;AAC5B,MAAI,CAAC,KAAM,QAAO;AAClB,MAAI,CAAC,MAAO,QAAO;AACnB,UAAQ,UAAU,QAAQ,OAAO,IAAI,GAAG;AAAA,IACtC,KAAK;AACH,aAAO,GAAG,IAAI,IAAI,KAAK;AAAA,IACzB,KAAK;AACH,aAAO,GAAG,IAAI,GAAG,KAAK;AAAA,IACxB;AACE,aAAO,GAAG,KAAK,IAAI,IAAI;AAAA,EAC3B;AACF;AAIA,IAAI;AAIJ,SAAS,cAAc,MAAsB;AAC3C,gBACE,OAAO,SAAS,eAAe,eAAe,OAC1C,IAAI,KAAK,UAAU,QAAW,EAAE,aAAa,WAAW,CAAC,IACzD;AACN,MAAI,WAAW;AACb,UAAM,UAAU,UAAU,QAAQ,IAAI,EAAE,OAAO,QAAQ,EAAE,EAAE,KAAK;AAChE,QAAI,CAAC,QAAQ,KAAM,QAAO,QAAQ,MAAM;AAAA,EAC1C;AACA,SAAO,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK;AACzB;AAIA,SAAS,MAAM,MAAc,QAAoC;AAC/D,MAAI;AACF,WAAO,KAAK,kBAAkB,MAAM;AAAA,EACtC,QAAQ;AACN,WAAO,KAAK,YAAY;AAAA,EAC1B;AACF;AAmBO,SAAS,eAAe,MAAkB,QAAyB;AACxE,QAAM,QAAQ,MAAM,KAAK,KAAK;AAC9B,QAAM,OAAO,MAAM,KAAK,IAAI;AAC5B,MAAI,CAAC,SAAS,CAAC,KAAM,QAAO;AAC5B,QAAM,QAAQ,UAAU,QAAQ,OAAO,IAAI;AAC3C,MAAI,UAAU,sBAAuB,QAAO,MAAM,cAAc,QAAQ,KAAK,GAAG,MAAM;AACtF,MAAI,CAAC,SAAS,CAAC,MAAM;AACnB,UAAM,SAAS,SAAS,MAAM,MAAM,KAAK;AACzC,UAAM,WACJ,MAAM,UAAU,IACZ,cAAc,MAAM,CAAC,CAAE,IAAI,cAAc,MAAM,CAAC,CAAE,IAClD,CAAC,GAAG,MAAM,CAAC,CAAE,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,EAAE;AACxC,WAAO,MAAM,UAAU,MAAM;AAAA,EAC/B;AACA,QAAM,OAAO,UAAU,iBAAiB,CAAC,MAAM,KAAK,IAAI,CAAC,OAAO,IAAI;AACpE,SAAO,MAAM,cAAc,KAAK,CAAC,CAAE,IAAI,cAAc,KAAK,CAAC,CAAE,GAAG,MAAM;AACxE;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, ReactElement } from 'react';
3
3
  import { FieldValues, FieldPath, ControllerProps, ControllerRenderProps, ControllerFieldState } from 'react-hook-form';
4
- import { d7 as IbanInputProps, dM as PhoneInputProps, dQ as SelectProps, dh as InputProps, e9 as TextareaProps } from '../kit-labels-Du0uHBq4.js';
4
+ import { dt as IbanInputProps, eg as PhoneInputProps, eD as SelectProps, dD as InputProps, eY as TextareaProps } from '../delete-account-setting-CGVMckMw.js';
5
5
  import { NumberFieldProps } from '../components/number-field.js';
6
6
  import { DatePickerProps, DateRangePickerProps } from '../components/date-picker.js';
7
7
  import { TimeInputProps } from '../components/time-input.js';
@@ -12,6 +12,9 @@ import { CheckboxProps } from '../components/checkbox.js';
12
12
  import { EntityComboboxProps } from '../components/entity-combobox.js';
13
13
  import { InlineEntityComboboxProps, ComboboxProps } from '../components/combobox.js';
14
14
  import { ComboClearValue } from '../components/combobox-core.js';
15
+ import '../components/tooltip.js';
16
+ import '../hooks/use-anchored-rect.js';
17
+ import '../lib/clipping.js';
15
18
  import '../data-table-labels-DUELeXpa.js';
16
19
  import '../components/data-table-sort.js';
17
20
  import '../components/swipeable-row.js';
@@ -21,9 +24,6 @@ import '../components/popover.js';
21
24
  import '../components/chip.js';
22
25
  import 'lucide-react';
23
26
  import '../components/field-sync.js';
24
- import '../components/tooltip.js';
25
- import '../hooks/use-anchored-rect.js';
26
- import '../lib/clipping.js';
27
27
  import '../wizard/types.js';
28
28
  import '../tour/tour.js';
29
29
  import '../search/command-palette.js';
@@ -44,6 +44,7 @@ import '../components/modal.js';
44
44
  import '../hooks/use-search-param-state.js';
45
45
  import '../components/measured-grid.js';
46
46
  import '../components/user-avatar.js';
47
+ import '../lib/person-name.js';
47
48
  import '../components/status-dot.js';
48
49
  import '../components/progress-bar.js';
49
50
  import '../components/signed-amount.js';
@@ -63,8 +64,28 @@ import '../components/authed-image.js';
63
64
  import '../components/image-grid.js';
64
65
  import '../components/lightbox.js';
65
66
  import '../components/write-lock.js';
66
- import '../components/account-chips.js';
67
+ import '../auth/sign-in-form.js';
68
+ import '../shell/topbar-controls.js';
69
+ import '../theme/palette-presets.js';
70
+ import '../theme/chart-palette.js';
71
+ import '../theme/theme-store.js';
72
+ import 'zustand/middleware';
73
+ import 'zustand';
74
+ import '../auth/complete-name-dialog.js';
75
+ import '../auth/forgot-password-form.js';
76
+ import '../auth/status-parts.js';
77
+ import '../auth/reset-password-form.js';
78
+ import '../auth/verify-email.js';
79
+ import '../auth/not-found-page.js';
80
+ import '../auth/accept-invitation.js';
81
+ import '../shell/company-switcher.js';
82
+ import '../account/email-change-setting.js';
83
+ import '../account/sessions-setting.js';
67
84
  import '../lib/format.js';
85
+ import '../account/data-export-setting.js';
86
+ import '../components/account-chips.js';
87
+ import '../admin/admin-parts.js';
88
+ import '../admin/admin-action-log.js';
68
89
  import '../components/reauth-dialog.js';
69
90
  import '../components/server-wake.js';
70
91
  import '../lib/server-wake.js';
@@ -2,7 +2,10 @@ import * as react from 'react';
2
2
  import { ReactElement, ComponentProps } from 'react';
3
3
  import * as react_hook_form from 'react-hook-form';
4
4
  import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
5
- import { dq as LabelProps } from '../kit-labels-Du0uHBq4.js';
5
+ import { dW as LabelProps } from '../delete-account-setting-CGVMckMw.js';
6
+ import '../components/tooltip.js';
7
+ import '../hooks/use-anchored-rect.js';
8
+ import '../lib/clipping.js';
6
9
  import '../data-table-labels-DUELeXpa.js';
7
10
  import '../components/data-table-sort.js';
8
11
  import '../components/swipeable-row.js';
@@ -12,9 +15,6 @@ import '../components/popover.js';
12
15
  import '../components/chip.js';
13
16
  import 'lucide-react';
14
17
  import '../components/field-sync.js';
15
- import '../components/tooltip.js';
16
- import '../hooks/use-anchored-rect.js';
17
- import '../lib/clipping.js';
18
18
  import '../wizard/types.js';
19
19
  import '../tour/tour.js';
20
20
  import '../search/command-palette.js';
@@ -36,6 +36,7 @@ import '../components/modal.js';
36
36
  import '../hooks/use-search-param-state.js';
37
37
  import '../components/measured-grid.js';
38
38
  import '../components/user-avatar.js';
39
+ import '../lib/person-name.js';
39
40
  import '../components/status-dot.js';
40
41
  import '../components/progress-bar.js';
41
42
  import '../components/signed-amount.js';
@@ -55,8 +56,28 @@ import '../components/authed-image.js';
55
56
  import '../components/image-grid.js';
56
57
  import '../components/lightbox.js';
57
58
  import '../components/write-lock.js';
58
- import '../components/account-chips.js';
59
+ import '../auth/sign-in-form.js';
60
+ import '../shell/topbar-controls.js';
61
+ import '../theme/palette-presets.js';
62
+ import '../theme/chart-palette.js';
63
+ import '../theme/theme-store.js';
64
+ import 'zustand/middleware';
65
+ import 'zustand';
66
+ import '../auth/complete-name-dialog.js';
67
+ import '../auth/forgot-password-form.js';
68
+ import '../auth/status-parts.js';
69
+ import '../auth/reset-password-form.js';
70
+ import '../auth/verify-email.js';
71
+ import '../auth/not-found-page.js';
72
+ import '../auth/accept-invitation.js';
73
+ import '../shell/company-switcher.js';
74
+ import '../account/email-change-setting.js';
75
+ import '../account/sessions-setting.js';
59
76
  import '../lib/format.js';
77
+ import '../account/data-export-setting.js';
78
+ import '../components/account-chips.js';
79
+ import '../admin/admin-parts.js';
80
+ import '../admin/admin-action-log.js';
60
81
  import '../components/reauth-dialog.js';
61
82
  import '../components/server-wake.js';
62
83
  import '../lib/server-wake.js';
package/dist/rhf.d.ts CHANGED
@@ -4,7 +4,10 @@ export { RhfCheckbox, RhfCheckboxProps, RhfCombobox, RhfComboboxProps, RhfCountr
4
4
  export { RhfLineItemCellContext, RhfLineItems, RhfLineItemsColumn, RhfLineItemsProps } from './rhf/line-items.js';
5
5
  import 'react';
6
6
  import 'react-hook-form';
7
- import './kit-labels-Du0uHBq4.js';
7
+ import './delete-account-setting-CGVMckMw.js';
8
+ import './components/tooltip.js';
9
+ import './hooks/use-anchored-rect.js';
10
+ import './lib/clipping.js';
8
11
  import './data-table-labels-DUELeXpa.js';
9
12
  import './components/data-table-sort.js';
10
13
  import './components/swipeable-row.js';
@@ -14,9 +17,6 @@ import './components/popover.js';
14
17
  import './components/chip.js';
15
18
  import 'lucide-react';
16
19
  import './components/field-sync.js';
17
- import './components/tooltip.js';
18
- import './hooks/use-anchored-rect.js';
19
- import './lib/clipping.js';
20
20
  import './wizard/types.js';
21
21
  import './tour/tour.js';
22
22
  import './search/command-palette.js';
@@ -38,6 +38,7 @@ import './components/modal.js';
38
38
  import './hooks/use-search-param-state.js';
39
39
  import './components/measured-grid.js';
40
40
  import './components/user-avatar.js';
41
+ import './lib/person-name.js';
41
42
  import './components/status-dot.js';
42
43
  import './components/progress-bar.js';
43
44
  import './components/signed-amount.js';
@@ -57,8 +58,28 @@ import './components/authed-image.js';
57
58
  import './components/image-grid.js';
58
59
  import './components/lightbox.js';
59
60
  import './components/write-lock.js';
60
- import './components/account-chips.js';
61
+ import './auth/sign-in-form.js';
62
+ import './shell/topbar-controls.js';
63
+ import './theme/palette-presets.js';
64
+ import './theme/chart-palette.js';
65
+ import './theme/theme-store.js';
66
+ import 'zustand/middleware';
67
+ import 'zustand';
68
+ import './auth/complete-name-dialog.js';
69
+ import './auth/forgot-password-form.js';
70
+ import './auth/status-parts.js';
71
+ import './auth/reset-password-form.js';
72
+ import './auth/verify-email.js';
73
+ import './auth/not-found-page.js';
74
+ import './auth/accept-invitation.js';
75
+ import './shell/company-switcher.js';
76
+ import './account/email-change-setting.js';
77
+ import './account/sessions-setting.js';
61
78
  import './lib/format.js';
79
+ import './account/data-export-setting.js';
80
+ import './components/account-chips.js';
81
+ import './admin/admin-parts.js';
82
+ import './admin/admin-action-log.js';
62
83
  import './components/reauth-dialog.js';
63
84
  import './components/server-wake.js';
64
85
  import './lib/server-wake.js';
@@ -1,7 +1,10 @@
1
1
  import * as react from 'react';
2
2
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
3
3
  import { LucideIcon } from 'lucide-react';
4
- import { dk as KitLinkComponent } from '../kit-labels-Du0uHBq4.js';
4
+ import { dR as KitLinkComponent } from '../delete-account-setting-CGVMckMw.js';
5
+ import '../components/tooltip.js';
6
+ import '../hooks/use-anchored-rect.js';
7
+ import '../lib/clipping.js';
5
8
  import '../data-table-labels-DUELeXpa.js';
6
9
  import '../components/data-table-sort.js';
7
10
  import '../components/swipeable-row.js';
@@ -10,9 +13,6 @@ import '../components/calendar-heatmap.js';
10
13
  import '../components/popover.js';
11
14
  import '../components/chip.js';
12
15
  import '../components/field-sync.js';
13
- import '../components/tooltip.js';
14
- import '../hooks/use-anchored-rect.js';
15
- import '../lib/clipping.js';
16
16
  import '../wizard/types.js';
17
17
  import '../tour/tour.js';
18
18
  import '../search/command-palette.js';
@@ -34,6 +34,7 @@ import '../components/modal.js';
34
34
  import '../hooks/use-search-param-state.js';
35
35
  import '../components/measured-grid.js';
36
36
  import '../components/user-avatar.js';
37
+ import '../lib/person-name.js';
37
38
  import '../components/status-dot.js';
38
39
  import '../components/progress-bar.js';
39
40
  import '../components/signed-amount.js';
@@ -53,8 +54,28 @@ import '../components/authed-image.js';
53
54
  import '../components/image-grid.js';
54
55
  import '../components/lightbox.js';
55
56
  import '../components/write-lock.js';
56
- import '../components/account-chips.js';
57
+ import '../auth/sign-in-form.js';
58
+ import './topbar-controls.js';
59
+ import '../theme/palette-presets.js';
60
+ import '../theme/chart-palette.js';
61
+ import '../theme/theme-store.js';
62
+ import 'zustand/middleware';
63
+ import 'zustand';
64
+ import '../auth/complete-name-dialog.js';
65
+ import '../auth/forgot-password-form.js';
66
+ import '../auth/status-parts.js';
67
+ import '../auth/reset-password-form.js';
68
+ import '../auth/verify-email.js';
69
+ import '../auth/not-found-page.js';
70
+ import '../auth/accept-invitation.js';
71
+ import './company-switcher.js';
72
+ import '../account/email-change-setting.js';
73
+ import '../account/sessions-setting.js';
57
74
  import '../lib/format.js';
75
+ import '../account/data-export-setting.js';
76
+ import '../components/account-chips.js';
77
+ import '../admin/admin-parts.js';
78
+ import '../admin/admin-action-log.js';
58
79
  import '../components/reauth-dialog.js';
59
80
  import '../components/server-wake.js';
60
81
  import '../lib/server-wake.js';
@@ -0,0 +1,59 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ /** Every string the switcher renders or speaks — the `companySwitcher` namespace. A
5
+ * different context (keksdose's budgets) renames them all. */
6
+ interface CompanySwitcherLabels {
7
+ /** The trigger's and the menu's accessible name. */
8
+ switchCompany: string;
9
+ /** The small heading over the list. */
10
+ heading: string;
11
+ /** The trigger's tooltip (and description), given the current company's name. */
12
+ current: (name: string) => string;
13
+ /** Read after the current company's name in the list, where the eye sees a check. */
14
+ currentMark: string;
15
+ /** Said while a switch is running. */
16
+ switching: string;
17
+ }
18
+ declare const DEFAULT_COMPANY_SWITCHER_LABELS: CompanySwitcherLabels;
19
+ /** One company the user belongs to — kastlan's `/auth/me` `companies[]` (§5.3). */
20
+ interface CompanySwitcherCompany<Id extends string | number = string | number> {
21
+ /** kastlan's ids are numbers; a string works the same. */
22
+ id: Id;
23
+ name: string;
24
+ }
25
+ interface CompanySwitcherProps<Id extends string | number> {
26
+ /** Every company the user belongs to. With fewer than two there is nothing to
27
+ * switch, and nothing renders. */
28
+ companies: readonly CompanySwitcherCompany<Id>[];
29
+ /** The company the session is in — `/auth/me`'s `current_company_id`. */
30
+ currentId: Id;
31
+ /**
32
+ * Another company was picked: `POST /auth/switch-company {company_id}`, store the
33
+ * fresh tokens, reload what is company-scoped. While the promise runs the switcher is
34
+ * disabled, so a second pick cannot race the first; a rejection frees it (the app
35
+ * says why). Picking the current company does nothing.
36
+ */
37
+ onSwitch: (id: Id) => Promise<unknown> | void;
38
+ /** The trigger's glyph. Default a building; keksdose's budgets would pass a wallet. */
39
+ icon?: ReactNode;
40
+ labels?: Partial<CompanySwitcherLabels>;
41
+ }
42
+ /**
43
+ * The company switcher in the top bar (docs/auth-harmonization.md §5.3, §8): a kastlan
44
+ * user may belong to several companies, and the access token carries the current one,
45
+ * so switching is a request for new tokens — `onSwitch`, the app's. Built on
46
+ * {@link OptionSwitcherMenu}, like `RoleSwitcher`: the icon trigger, the current company
47
+ * in its tooltip, the list with a check on the current one.
48
+ *
49
+ * **Only for more than one company** — a user in one company has nothing to switch, and
50
+ * the top bar stays as it was. **Disabled while a switch runs**: the trigger is swapped
51
+ * for a disabled one with a spinner (`aria-busy`), and "Switching company…" is said, so
52
+ * a second pick cannot race the first. The kit never sends the request.
53
+ *
54
+ * A generic context switcher: the labels rename it ("Switch budget", "Budgets"), `icon`
55
+ * replaces the building, and `id` may be a number (kastlan's) or a string.
56
+ */
57
+ declare function CompanySwitcher<Id extends string | number>({ companies, currentId, onSwitch, icon, labels: labelsProp, }: CompanySwitcherProps<Id>): react.JSX.Element | null;
58
+
59
+ export { CompanySwitcher, type CompanySwitcherCompany, type CompanySwitcherLabels, type CompanySwitcherProps, DEFAULT_COMPANY_SWITCHER_LABELS };
@@ -0,0 +1,85 @@
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import { Building2 } from "lucide-react";
5
+ import { cn } from "../lib/cn.js";
6
+ import { useKitLabels } from "../i18n/kit-labels.js";
7
+ import { useAnnounce } from "../hooks/use-announce.js";
8
+ import { Spinner } from "../components/ui.js";
9
+ import { OptionSwitcherMenu } from "./option-switcher-menu.js";
10
+ import { TOPBAR_TRIGGER_CLASS } from "./topbar-controls.js";
11
+ const DEFAULT_COMPANY_SWITCHER_LABELS = {
12
+ switchCompany: "Switch company",
13
+ heading: "Companies",
14
+ current: (name) => `Company: ${name}`,
15
+ currentMark: "(current)",
16
+ switching: "Switching company\u2026"
17
+ };
18
+ function CompanySwitcher({
19
+ companies,
20
+ currentId,
21
+ onSwitch,
22
+ icon,
23
+ labels: labelsProp
24
+ }) {
25
+ const labels = useKitLabels("companySwitcher", DEFAULT_COMPANY_SWITCHER_LABELS, labelsProp);
26
+ const [pending, setPending] = useState(false);
27
+ const { announce, regionProps } = useAnnounce();
28
+ if (companies.length < 2) return null;
29
+ const current = companies.find((c) => c.id === currentId);
30
+ const select = (value) => {
31
+ if (pending) return;
32
+ const picked = companies.find((c) => String(c.id) === value);
33
+ if (!picked || picked.id === currentId) return;
34
+ const result = onSwitch(picked.id);
35
+ if (typeof result?.then !== "function") return;
36
+ setPending(true);
37
+ announce(labels.switching);
38
+ result.then(
39
+ () => setPending(false),
40
+ () => setPending(false)
41
+ );
42
+ };
43
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
44
+ pending ? /* @__PURE__ */ jsx(
45
+ "button",
46
+ {
47
+ type: "button",
48
+ disabled: true,
49
+ "aria-busy": "true",
50
+ "aria-label": labels.switchCompany,
51
+ className: cn(TOPBAR_TRIGGER_CLASS, "cursor-wait opacity-60 hover:bg-transparent"),
52
+ children: /* @__PURE__ */ jsx(Spinner, { label: null })
53
+ }
54
+ ) : /* @__PURE__ */ jsx(
55
+ OptionSwitcherMenu,
56
+ {
57
+ ariaLabel: labels.switchCompany,
58
+ title: current ? labels.current(current.name) : void 0,
59
+ heading: labels.heading,
60
+ icon: icon ?? /* @__PURE__ */ jsx(Building2, { className: "size-5" }),
61
+ options: companies.map((c) => ({
62
+ value: String(c.id),
63
+ label: c.id === currentId ? (
64
+ // `relative`: the sr-only mark needs a local containing block.
65
+ /* @__PURE__ */ jsxs("span", { className: "relative", children: [
66
+ c.name,
67
+ /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
68
+ " ",
69
+ labels.currentMark
70
+ ] })
71
+ ] })
72
+ ) : c.name
73
+ })),
74
+ value: String(currentId),
75
+ onSelect: select
76
+ }
77
+ ),
78
+ /* @__PURE__ */ jsx("span", { ...regionProps })
79
+ ] });
80
+ }
81
+ export {
82
+ CompanySwitcher,
83
+ DEFAULT_COMPANY_SWITCHER_LABELS
84
+ };
85
+ //# sourceMappingURL=company-switcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/shell/company-switcher.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { Building2 } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { useKitLabels } from \"../i18n/kit-labels\";\nimport { useAnnounce } from \"../hooks/use-announce\";\nimport { Spinner } from \"../components/ui\";\nimport { OptionSwitcherMenu } from \"./option-switcher-menu\";\nimport { TOPBAR_TRIGGER_CLASS } from \"./topbar-controls\";\n\n/** Every string the switcher renders or speaks — the `companySwitcher` namespace. A\n * different context (keksdose's budgets) renames them all. */\nexport interface CompanySwitcherLabels {\n /** The trigger's and the menu's accessible name. */\n switchCompany: string;\n /** The small heading over the list. */\n heading: string;\n /** The trigger's tooltip (and description), given the current company's name. */\n current: (name: string) => string;\n /** Read after the current company's name in the list, where the eye sees a check. */\n currentMark: string;\n /** Said while a switch is running. */\n switching: string;\n}\n\nexport const DEFAULT_COMPANY_SWITCHER_LABELS: CompanySwitcherLabels = {\n switchCompany: \"Switch company\",\n heading: \"Companies\",\n current: (name) => `Company: ${name}`,\n currentMark: \"(current)\",\n switching: \"Switching company…\",\n};\n\n/** One company the user belongs to — kastlan's `/auth/me` `companies[]` (§5.3). */\nexport interface CompanySwitcherCompany<Id extends string | number = string | number> {\n /** kastlan's ids are numbers; a string works the same. */\n id: Id;\n name: string;\n}\n\nexport interface CompanySwitcherProps<Id extends string | number> {\n /** Every company the user belongs to. With fewer than two there is nothing to\n * switch, and nothing renders. */\n companies: readonly CompanySwitcherCompany<Id>[];\n /** The company the session is in — `/auth/me`'s `current_company_id`. */\n currentId: Id;\n /**\n * Another company was picked: `POST /auth/switch-company {company_id}`, store the\n * fresh tokens, reload what is company-scoped. While the promise runs the switcher is\n * disabled, so a second pick cannot race the first; a rejection frees it (the app\n * says why). Picking the current company does nothing.\n */\n onSwitch: (id: Id) => Promise<unknown> | void;\n /** The trigger's glyph. Default a building; keksdose's budgets would pass a wallet. */\n icon?: ReactNode;\n labels?: Partial<CompanySwitcherLabels>;\n}\n\n/**\n * The company switcher in the top bar (docs/auth-harmonization.md §5.3, §8): a kastlan\n * user may belong to several companies, and the access token carries the current one,\n * so switching is a request for new tokens — `onSwitch`, the app's. Built on\n * {@link OptionSwitcherMenu}, like `RoleSwitcher`: the icon trigger, the current company\n * in its tooltip, the list with a check on the current one.\n *\n * **Only for more than one company** — a user in one company has nothing to switch, and\n * the top bar stays as it was. **Disabled while a switch runs**: the trigger is swapped\n * for a disabled one with a spinner (`aria-busy`), and \"Switching company…\" is said, so\n * a second pick cannot race the first. The kit never sends the request.\n *\n * A generic context switcher: the labels rename it (\"Switch budget\", \"Budgets\"), `icon`\n * replaces the building, and `id` may be a number (kastlan's) or a string.\n */\nexport function CompanySwitcher<Id extends string | number>({\n companies,\n currentId,\n onSwitch,\n icon,\n labels: labelsProp,\n}: CompanySwitcherProps<Id>) {\n const labels = useKitLabels(\"companySwitcher\", DEFAULT_COMPANY_SWITCHER_LABELS, labelsProp);\n const [pending, setPending] = useState(false);\n const { announce, regionProps } = useAnnounce();\n if (companies.length < 2) return null;\n\n const current = companies.find((c) => c.id === currentId);\n const select = (value: string) => {\n if (pending) return;\n const picked = companies.find((c) => String(c.id) === value);\n if (!picked || picked.id === currentId) return;\n const result = onSwitch(picked.id);\n if (typeof (result as PromiseLike<unknown> | undefined)?.then !== \"function\") return;\n setPending(true);\n announce(labels.switching);\n (result as PromiseLike<unknown>).then(\n () => setPending(false),\n () => setPending(false),\n );\n };\n\n return (\n <>\n {pending ? (\n <button\n type=\"button\"\n disabled\n aria-busy=\"true\"\n aria-label={labels.switchCompany}\n className={cn(TOPBAR_TRIGGER_CLASS, \"cursor-wait opacity-60 hover:bg-transparent\")}\n >\n <Spinner label={null} />\n </button>\n ) : (\n <OptionSwitcherMenu<string>\n ariaLabel={labels.switchCompany}\n title={current ? labels.current(current.name) : undefined}\n heading={labels.heading}\n icon={icon ?? <Building2 className=\"size-5\" />}\n options={companies.map((c) => ({\n value: String(c.id),\n label:\n c.id === currentId ? (\n // `relative`: the sr-only mark needs a local containing block.\n <span className=\"relative\">\n {c.name}\n <span className=\"sr-only\"> {labels.currentMark}</span>\n </span>\n ) : (\n c.name\n ),\n }))}\n value={String(currentId)}\n onSelect={select}\n />\n )}\n {/* Outside both triggers, so it survives the swap and is read when it changes. */}\n <span {...regionProps} />\n </>\n );\n}\n"],"mappings":";AAqGI,mBASM,KAeQ,YAxBd;AArGJ,SAAS,gBAAgB;AAEzB,SAAS,iBAAiB;AAC1B,SAAS,UAAU;AACnB,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB;AAC5B,SAAS,eAAe;AACxB,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AAiB9B,MAAM,kCAAyD;AAAA,EACpE,eAAe;AAAA,EACf,SAAS;AAAA,EACT,SAAS,CAAC,SAAS,YAAY,IAAI;AAAA,EACnC,aAAa;AAAA,EACb,WAAW;AACb;AA0CO,SAAS,gBAA4C;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AACV,GAA6B;AAC3B,QAAM,SAAS,aAAa,mBAAmB,iCAAiC,UAAU;AAC1F,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAC5C,QAAM,EAAE,UAAU,YAAY,IAAI,YAAY;AAC9C,MAAI,UAAU,SAAS,EAAG,QAAO;AAEjC,QAAM,UAAU,UAAU,KAAK,CAAC,MAAM,EAAE,OAAO,SAAS;AACxD,QAAM,SAAS,CAAC,UAAkB;AAChC,QAAI,QAAS;AACb,UAAM,SAAS,UAAU,KAAK,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,KAAK;AAC3D,QAAI,CAAC,UAAU,OAAO,OAAO,UAAW;AACxC,UAAM,SAAS,SAAS,OAAO,EAAE;AACjC,QAAI,OAAQ,QAA6C,SAAS,WAAY;AAC9E,eAAW,IAAI;AACf,aAAS,OAAO,SAAS;AACzB,IAAC,OAAgC;AAAA,MAC/B,MAAM,WAAW,KAAK;AAAA,MACtB,MAAM,WAAW,KAAK;AAAA,IACxB;AAAA,EACF;AAEA,SACE,iCACG;AAAA,cACC;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAQ;AAAA,QACR,aAAU;AAAA,QACV,cAAY,OAAO;AAAA,QACnB,WAAW,GAAG,sBAAsB,6CAA6C;AAAA,QAEjF,8BAAC,WAAQ,OAAO,MAAM;AAAA;AAAA,IACxB,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,OAAO;AAAA,QAClB,OAAO,UAAU,OAAO,QAAQ,QAAQ,IAAI,IAAI;AAAA,QAChD,SAAS,OAAO;AAAA,QAChB,MAAM,QAAQ,oBAAC,aAAU,WAAU,UAAS;AAAA,QAC5C,SAAS,UAAU,IAAI,CAAC,OAAO;AAAA,UAC7B,OAAO,OAAO,EAAE,EAAE;AAAA,UAClB,OACE,EAAE,OAAO;AAAA;AAAA,YAEP,qBAAC,UAAK,WAAU,YACb;AAAA,gBAAE;AAAA,cACH,qBAAC,UAAK,WAAU,WAAU;AAAA;AAAA,gBAAE,OAAO;AAAA,iBAAY;AAAA,eACjD;AAAA,cAEA,EAAE;AAAA,QAER,EAAE;AAAA,QACF,OAAO,OAAO,SAAS;AAAA,QACvB,UAAU;AAAA;AAAA,IACZ;AAAA,IAGF,oBAAC,UAAM,GAAG,aAAa;AAAA,KACzB;AAEJ;","names":[]}
@@ -1,6 +1,9 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { dl as KitLinkProps, dk as KitLinkComponent } from '../kit-labels-Du0uHBq4.js';
3
+ import { dS as KitLinkProps, dR as KitLinkComponent } from '../delete-account-setting-CGVMckMw.js';
4
+ import '../components/tooltip.js';
5
+ import '../hooks/use-anchored-rect.js';
6
+ import '../lib/clipping.js';
4
7
  import '../data-table-labels-DUELeXpa.js';
5
8
  import '../components/data-table-sort.js';
6
9
  import '../components/swipeable-row.js';
@@ -10,9 +13,6 @@ import '../components/popover.js';
10
13
  import '../components/chip.js';
11
14
  import 'lucide-react';
12
15
  import '../components/field-sync.js';
13
- import '../components/tooltip.js';
14
- import '../hooks/use-anchored-rect.js';
15
- import '../lib/clipping.js';
16
16
  import '../wizard/types.js';
17
17
  import '../tour/tour.js';
18
18
  import '../search/command-palette.js';
@@ -34,6 +34,7 @@ import '../components/modal.js';
34
34
  import '../hooks/use-search-param-state.js';
35
35
  import '../components/measured-grid.js';
36
36
  import '../components/user-avatar.js';
37
+ import '../lib/person-name.js';
37
38
  import '../components/status-dot.js';
38
39
  import '../components/progress-bar.js';
39
40
  import '../components/signed-amount.js';
@@ -53,8 +54,28 @@ import '../components/authed-image.js';
53
54
  import '../components/image-grid.js';
54
55
  import '../components/lightbox.js';
55
56
  import '../components/write-lock.js';
56
- import '../components/account-chips.js';
57
+ import '../auth/sign-in-form.js';
58
+ import './topbar-controls.js';
59
+ import '../theme/palette-presets.js';
60
+ import '../theme/chart-palette.js';
61
+ import '../theme/theme-store.js';
62
+ import 'zustand/middleware';
63
+ import 'zustand';
64
+ import '../auth/complete-name-dialog.js';
65
+ import '../auth/forgot-password-form.js';
66
+ import '../auth/status-parts.js';
67
+ import '../auth/reset-password-form.js';
68
+ import '../auth/verify-email.js';
69
+ import '../auth/not-found-page.js';
70
+ import '../auth/accept-invitation.js';
71
+ import './company-switcher.js';
72
+ import '../account/email-change-setting.js';
73
+ import '../account/sessions-setting.js';
57
74
  import '../lib/format.js';
75
+ import '../account/data-export-setting.js';
76
+ import '../components/account-chips.js';
77
+ import '../admin/admin-parts.js';
78
+ import '../admin/admin-action-log.js';
58
79
  import '../components/reauth-dialog.js';
59
80
  import '../components/server-wake.js';
60
81
  import '../lib/server-wake.js';
@@ -3,6 +3,7 @@ import { ReactNode } from 'react';
3
3
  import { MenuItemTone } from '../components/menu-item.js';
4
4
  import { UserAvatarBadge } from '../components/user-avatar.js';
5
5
  import 'lucide-react';
6
+ import '../lib/person-name.js';
6
7
  import '../components/status-dot.js';
7
8
  import '../components/progress-bar.js';
8
9
  import '../components/signed-amount.js';
package/dist/shell.d.ts CHANGED
@@ -13,7 +13,10 @@ import './theme/theme-store.js';
13
13
  import 'zustand/middleware';
14
14
  import 'zustand';
15
15
  import 'lucide-react';
16
- import './kit-labels-Du0uHBq4.js';
16
+ import './delete-account-setting-CGVMckMw.js';
17
+ import './components/tooltip.js';
18
+ import './hooks/use-anchored-rect.js';
19
+ import './lib/clipping.js';
17
20
  import './data-table-labels-DUELeXpa.js';
18
21
  import './components/data-table-sort.js';
19
22
  import './components/swipeable-row.js';
@@ -22,9 +25,6 @@ import './components/calendar-heatmap.js';
22
25
  import './components/popover.js';
23
26
  import './components/chip.js';
24
27
  import './components/field-sync.js';
25
- import './components/tooltip.js';
26
- import './hooks/use-anchored-rect.js';
27
- import './lib/clipping.js';
28
28
  import './wizard/types.js';
29
29
  import './tour/tour.js';
30
30
  import './search/command-palette.js';
@@ -46,6 +46,7 @@ import './components/modal.js';
46
46
  import './hooks/use-search-param-state.js';
47
47
  import './components/measured-grid.js';
48
48
  import './components/user-avatar.js';
49
+ import './lib/person-name.js';
49
50
  import './components/status-dot.js';
50
51
  import './components/progress-bar.js';
51
52
  import './components/signed-amount.js';
@@ -63,8 +64,22 @@ import './components/authed-image.js';
63
64
  import './components/image-grid.js';
64
65
  import './components/lightbox.js';
65
66
  import './components/write-lock.js';
66
- import './components/account-chips.js';
67
+ import './auth/sign-in-form.js';
68
+ import './auth/complete-name-dialog.js';
69
+ import './auth/forgot-password-form.js';
70
+ import './auth/status-parts.js';
71
+ import './auth/reset-password-form.js';
72
+ import './auth/verify-email.js';
73
+ import './auth/not-found-page.js';
74
+ import './auth/accept-invitation.js';
75
+ import './shell/company-switcher.js';
76
+ import './account/email-change-setting.js';
77
+ import './account/sessions-setting.js';
67
78
  import './lib/format.js';
79
+ import './account/data-export-setting.js';
80
+ import './components/account-chips.js';
81
+ import './admin/admin-parts.js';
82
+ import './admin/admin-action-log.js';
68
83
  import './components/reauth-dialog.js';
69
84
  import './components/server-wake.js';
70
85
  import './lib/server-wake.js';
@@ -1,7 +1,10 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, ReactElement } from 'react';
3
- import { bA as ButtonVariant } from '../kit-labels-Du0uHBq4.js';
3
+ import { bH as ButtonVariant } from '../delete-account-setting-CGVMckMw.js';
4
4
  import { UseWizardReturn, WizardLabels } from './types.js';
5
+ import '../components/tooltip.js';
6
+ import '../hooks/use-anchored-rect.js';
7
+ import '../lib/clipping.js';
5
8
  import '../data-table-labels-DUELeXpa.js';
6
9
  import '../components/data-table-sort.js';
7
10
  import '../components/swipeable-row.js';
@@ -11,9 +14,6 @@ import '../components/popover.js';
11
14
  import '../components/chip.js';
12
15
  import 'lucide-react';
13
16
  import '../components/field-sync.js';
14
- import '../components/tooltip.js';
15
- import '../hooks/use-anchored-rect.js';
16
- import '../lib/clipping.js';
17
17
  import '../tour/tour.js';
18
18
  import '../search/command-palette.js';
19
19
  import '../search/global-search.js';
@@ -34,6 +34,7 @@ import '../components/modal.js';
34
34
  import '../hooks/use-search-param-state.js';
35
35
  import '../components/measured-grid.js';
36
36
  import '../components/user-avatar.js';
37
+ import '../lib/person-name.js';
37
38
  import '../components/status-dot.js';
38
39
  import '../components/progress-bar.js';
39
40
  import '../components/signed-amount.js';
@@ -53,8 +54,28 @@ import '../components/authed-image.js';
53
54
  import '../components/image-grid.js';
54
55
  import '../components/lightbox.js';
55
56
  import '../components/write-lock.js';
56
- import '../components/account-chips.js';
57
+ import '../auth/sign-in-form.js';
58
+ import '../shell/topbar-controls.js';
59
+ import '../theme/palette-presets.js';
60
+ import '../theme/chart-palette.js';
61
+ import '../theme/theme-store.js';
62
+ import 'zustand/middleware';
63
+ import 'zustand';
64
+ import '../auth/complete-name-dialog.js';
65
+ import '../auth/forgot-password-form.js';
66
+ import '../auth/status-parts.js';
67
+ import '../auth/reset-password-form.js';
68
+ import '../auth/verify-email.js';
69
+ import '../auth/not-found-page.js';
70
+ import '../auth/accept-invitation.js';
71
+ import '../shell/company-switcher.js';
72
+ import '../account/email-change-setting.js';
73
+ import '../account/sessions-setting.js';
57
74
  import '../lib/format.js';
75
+ import '../account/data-export-setting.js';
76
+ import '../components/account-chips.js';
77
+ import '../admin/admin-parts.js';
78
+ import '../admin/admin-action-log.js';
58
79
  import '../components/reauth-dialog.js';
59
80
  import '../components/server-wake.js';
60
81
  import '../lib/server-wake.js';