@eifi1/ui-kit 0.40.1 → 0.41.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.
- package/dist/components/nav-pills.d.ts +2 -2
- package/dist/components/nav-pills.js.map +1 -1
- package/dist/components/tabs.d.ts +4 -32
- package/dist/components/tabs.js +30 -66
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/translation-review-parts.d.ts +2 -2
- package/dist/components/translation-review-parts.js.map +1 -1
- package/dist/eslint/index.js +1 -1
- package/dist/feedback/feedback-menu-labels.js +0 -2
- package/dist/feedback/feedback-menu-labels.js.map +1 -1
- package/dist/feedback/feedback-menu.d.ts +0 -6
- package/dist/feedback/feedback-menu.js.map +1 -1
- package/dist/i18n/german.js +0 -2
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/locales/en.js +0 -2
- package/dist/i18n/locales/en.js.map +2 -2
- package/dist/i18n/locales/es.js +0 -2
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.js +0 -2
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.js +0 -2
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.js +0 -2
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.js +0 -2
- package/dist/i18n/locales/zh.js.map +1 -1
- package/package.json +1 -1
- package/src/components/nav-pills.tsx +2 -2
- package/src/components/tabs.tsx +19 -110
- package/src/components/translation-review-parts.tsx +2 -2
- package/src/feedback/feedback-menu-labels.ts +0 -2
- package/src/feedback/feedback-menu.tsx +0 -6
- package/src/i18n/german.ts +0 -2
- package/src/i18n/locales/es.ts +0 -2
- package/src/i18n/locales/fr.ts +0 -2
- package/src/i18n/locales/hu.ts +0 -2
- package/src/i18n/locales/it.ts +0 -2
- package/src/i18n/locales/zh.ts +0 -2
|
@@ -22,12 +22,6 @@ export interface FeedbackMenuLabels {
|
|
|
22
22
|
/** 0.40: the admin's link to the triage list, {@link FeedbackMenuProps.inboxHref}
|
|
23
23
|
* ("View feedback" before). de-CH "Feedback-Eingang". */
|
|
24
24
|
inbox: string;
|
|
25
|
-
/** @deprecated 0.40 — use {@link inbox}; removed in 0.41. Unused: the inbox row reads
|
|
26
|
-
* `inbox` (feedback §10.6). */
|
|
27
|
-
viewFeedback?: string;
|
|
28
|
-
/** @deprecated 0.40 — use {@link discussion}; removed in 0.41. Unused: the public row
|
|
29
|
-
* reads `discussion` (feedback §10.6). */
|
|
30
|
-
allFeedback?: string;
|
|
31
25
|
}
|
|
32
26
|
export { DEFAULT_FEEDBACK_MENU_LABELS };
|
|
33
27
|
export interface FeedbackMenuProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/feedback/feedback-menu.tsx"],"sourcesContent":["import { Inbox, MessageSquare, User, Users } from \"lucide-react\";\nimport type { UserAvatarBadge } from \"../components/user-avatar\";\nimport { useKitLabels, type LabelOverride } from \"../i18n/kit-labels\";\nimport { TopBarActionMenu, type TopBarMenuEntry } from \"../shell/topbar-action-menu\";\nimport type { HoverMenuProps } from \"../components/hover-menu\";\n// The vocabulary module, not the inbox: this menu is in every app's top bar, the inbox\n// is a page (MOD-1).\nimport { FEEDBACK_CATEGORY_META, type FeedbackCategory } from \"./feedback-vocabulary\";\nimport { useFeedbackCategoryLabels } from \"./feedback-labels\";\nimport { FEEDBACK_PICKABLE_CATEGORIES } from \"./feedback-record\";\nimport { DEFAULT_FEEDBACK_MENU_LABELS } from \"./feedback-menu-labels\";\n\n/**\n * `feedbackMenu` — the top-bar feedback menu's own words (0.27.0). The four category rows\n * are `feedbackCategory`'s, shared with the badges and the dialog's picker. de-CH canon\n * (keksdose `de-CH.json`, §10.6): `trigger` \"Feedback senden\", `discussion`\n * \"Feedback-Diskussion\", `myFeedback` \"Mein Feedback\", `inbox` \"Feedback-Eingang\".\n */\nexport interface FeedbackMenuLabels {\n /** The trigger's accessible name, and the menu's. keksdose `feedback.send`. */\n trigger: string;\n /** The link to the viewer's own reports — everyone's, an admin's too since 0.40\n * (§10.2 decision 3). keksdose `feedback.my_title`. */\n myFeedback: string;\n /** 0.40: the link to the public list, {@link FeedbackMenuProps.publicHref} (§10.2\n * decision 3; \"All feedback\" before). de-CH \"Feedback-Diskussion\". */\n discussion: string;\n /** 0.40: the admin's link to the triage list, {@link FeedbackMenuProps.inboxHref}\n * (\"View feedback\" before). de-CH \"Feedback-Eingang\". */\n inbox: string;\n
|
|
1
|
+
{"version":3,"sources":["../../src/feedback/feedback-menu.tsx"],"sourcesContent":["import { Inbox, MessageSquare, User, Users } from \"lucide-react\";\nimport type { UserAvatarBadge } from \"../components/user-avatar\";\nimport { useKitLabels, type LabelOverride } from \"../i18n/kit-labels\";\nimport { TopBarActionMenu, type TopBarMenuEntry } from \"../shell/topbar-action-menu\";\nimport type { HoverMenuProps } from \"../components/hover-menu\";\n// The vocabulary module, not the inbox: this menu is in every app's top bar, the inbox\n// is a page (MOD-1).\nimport { FEEDBACK_CATEGORY_META, type FeedbackCategory } from \"./feedback-vocabulary\";\nimport { useFeedbackCategoryLabels } from \"./feedback-labels\";\nimport { FEEDBACK_PICKABLE_CATEGORIES } from \"./feedback-record\";\nimport { DEFAULT_FEEDBACK_MENU_LABELS } from \"./feedback-menu-labels\";\n\n/**\n * `feedbackMenu` — the top-bar feedback menu's own words (0.27.0). The four category rows\n * are `feedbackCategory`'s, shared with the badges and the dialog's picker. de-CH canon\n * (keksdose `de-CH.json`, §10.6): `trigger` \"Feedback senden\", `discussion`\n * \"Feedback-Diskussion\", `myFeedback` \"Mein Feedback\", `inbox` \"Feedback-Eingang\".\n */\nexport interface FeedbackMenuLabels {\n /** The trigger's accessible name, and the menu's. keksdose `feedback.send`. */\n trigger: string;\n /** The link to the viewer's own reports — everyone's, an admin's too since 0.40\n * (§10.2 decision 3). keksdose `feedback.my_title`. */\n myFeedback: string;\n /** 0.40: the link to the public list, {@link FeedbackMenuProps.publicHref} (§10.2\n * decision 3; \"All feedback\" before). de-CH \"Feedback-Diskussion\". */\n discussion: string;\n /** 0.40: the admin's link to the triage list, {@link FeedbackMenuProps.inboxHref}\n * (\"View feedback\" before). de-CH \"Feedback-Eingang\". */\n inbox: string;\n}\n\n// Defined in ./feedback-menu-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_FEEDBACK_MENU_LABELS };\n\nexport interface FeedbackMenuProps {\n /** A category row was chosen — open the submit dialog on it (`useFeedbackSubmit`'s\n * `open`). Never called with `CRASH`: there is no row for it. */\n onFile: (category: FeedbackCategory) => void;\n /** Adds the **Feedback inbox** row → {@link inboxHref} under \"My feedback\" (0.40, §10.2\n * decision 11; until 0.39 it replaced it). The admin check is the app's (kastlan's is\n * company-scoped). Default `false`. */\n isAdmin?: boolean;\n /**\n * Rows of the app's own, between the divider and the list link — keksdose's\n * `Sparkles` Help assistant → `/assistant` and `MessagesSquare` Support chat →\n * `/support` with its unread chip. Any {@link TopBarMenuEntry}; keep their `key`s clear\n * of the menu's own (`BUG`, `IDEA`, `QUESTION`, `OTHER`, `feedback-divider`,\n * `all-feedback`, `my-feedback`, `view-feedback`).\n */\n extraEntries?: TopBarMenuEntry[];\n /** The viewer's own reports, linked for everyone (an admin too since 0.40). Default\n * `\"/my-feedback\"` (§2.3). */\n myFeedbackHref?: string;\n /** The admin inbox, linked for an admin. Default `\"/feedback\"` (§2.3). */\n inboxHref?: string;\n /**\n * The public list (0.38, docs/feedback-harmonization.md §9.2 decision 21): when passed,\n * a **Feedback discussion** row (`Users`, key `all-feedback`; \"All feedback\" until 0.40)\n * first of the list links, for everyone — the admin too, who reads what the others read\n * there. keksdose: `\"/all-feedback\"`. Leave it out where the app has no\n * public parts (kastlan) or the viewer may not see them (a Kurvenschmiede customer, a\n * demo — §9.2 decisions 7, 8).\n */\n publicHref?: string;\n /** A dot on the trigger — keksdose's unread support replies (`tone: \"danger\"`). Its\n * `label` joins the trigger's name (\"Send feedback 2 unread\"). The words are the app's. */\n iconBadge?: UserAvatarBadge | null;\n /** Prop > `<UiKitProvider labels={{ feedbackMenu }}>` > English. */\n labels?: LabelOverride<FeedbackMenuLabels>;\n /** Which edge of the trigger the panel lines up with, `start` or `end` in the reading\n * direction (see `HoverMenu`, whose type this is). Default `end`. */\n align?: HoverMenuProps[\"align\"];\n}\n\n/**\n * The top-bar feedback menu, the same in every app (0.27.0, docs/feedback-harmonization.md\n * §4.1) — keksdose `frontend/src/app/top-bar.tsx:156` on the kit's `TopBarActionMenu`:\n *\n * 1. a `MessageSquare` trigger named \"Send feedback\", with an optional `iconBadge`;\n * 2. Bug · Idea · Question · Other (`Bug`, `Lightbulb`, `HelpCircle`, `MoreHorizontal` —\n * the category badges' own glyphs), each calling `onFile(category)`;\n * 3. a divider, always;\n * 4. the app's `extraEntries`;\n * 5. the list links (0.40, §10.2 decision 11), in this order: **Feedback discussion**\n * (`Users`, key `all-feedback`) → `publicHref`, when passed; **My feedback** (`User`,\n * key `my-feedback`) → `/my-feedback`, for everyone, admins included; **Feedback\n * inbox** (`Inbox`, key `view-feedback`) → `/feedback`, for an admin. An admin with\n * public parts sees three, a member two; without them an admin two and anyone else\n * one. Until 0.39 an admin had the inbox in place of their own list (feedback #331);\n * Marcel's kk #419 gave them both.\n *\n * WHY A PRESET. Three apps had drawn three menus on the same primitive and they disagreed:\n * kastlan headed it \"New submission\", Kurvenschmiede \"Send feedback\" with a single link\n * that changed its words by role, keksdose had no heading and one link by role. keksdose\n * is the source (§2.4, §7.11): no heading, the list links by role — and the kit draws\n * it, so the row order, the icons and the words cannot drift again. Where the menu sits in the bar stays each app's.\n *\n * `CRASH` has no row and never will: crash reports are filed by the error boundary with\n * the stack and a fingerprint (keksdose feedback #160), and a hand-filed \"crash\" would sort\n * to the top like one with none of what makes it actionable. The server refuses it with a\n * 422 anyway (§3.4).\n *\n * The menu forwards nothing to its trigger, as `TopBarActionMenu` does not: keksdose's\n * tour anchor (`data-tour=\"feedback-menu\"`) stays on a wrapping `<span>`. Needs a router,\n * as every `TopBarActionMenu` with link rows does.\n */\nexport function FeedbackMenu({\n onFile,\n isAdmin = false,\n extraEntries,\n myFeedbackHref = \"/my-feedback\",\n inboxHref = \"/feedback\",\n publicHref,\n iconBadge,\n labels: labelsProp,\n align,\n}: FeedbackMenuProps) {\n const labels = useKitLabels(\"feedbackMenu\", DEFAULT_FEEDBACK_MENU_LABELS, labelsProp);\n const categoryLabels = useFeedbackCategoryLabels();\n const entries: TopBarMenuEntry[] = [\n ...FEEDBACK_PICKABLE_CATEGORIES.map((category): TopBarMenuEntry => {\n const Icon = FEEDBACK_CATEGORY_META[category].icon;\n return {\n key: category,\n icon: <Icon className=\"size-4\" />,\n label: categoryLabels[category],\n onSelect: () => onFile(category),\n };\n }),\n { kind: \"divider\", key: \"feedback-divider\" },\n ...(extraEntries ?? []),\n ...(publicHref\n ? [\n {\n kind: \"link\",\n key: \"all-feedback\",\n to: publicHref,\n icon: <Users className=\"size-4\" />,\n label: labels.discussion,\n } satisfies TopBarMenuEntry,\n ]\n : []),\n {\n kind: \"link\",\n key: \"my-feedback\",\n to: myFeedbackHref,\n icon: <User className=\"size-4\" />,\n label: labels.myFeedback,\n },\n ...(isAdmin\n ? [\n {\n kind: \"link\",\n key: \"view-feedback\",\n to: inboxHref,\n icon: <Inbox className=\"size-4\" />,\n label: labels.inbox,\n } satisfies TopBarMenuEntry,\n ]\n : []),\n ];\n return (\n <TopBarActionMenu\n icon={<MessageSquare className=\"size-5\" />}\n iconBadge={iconBadge}\n aria-label={labels.trigger}\n entries={entries}\n align={align}\n />\n );\n}\n"],"mappings":";AA6Hc;AA7Hd,SAAS,OAAO,eAAe,MAAM,aAAa;AAElD,SAAS,oBAAwC;AACjD,SAAS,wBAA8C;AAIvD,SAAS,8BAAqD;AAC9D,SAAS,iCAAiC;AAC1C,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAiGtC,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,iBAAiB;AAAA,EACjB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germanLabels(numberLocale) {
|
|
|
89
89
|
feedbackMenu: {
|
|
90
90
|
trigger: "Feedback senden",
|
|
91
91
|
myFeedback: "Mein Feedback",
|
|
92
|
-
viewFeedback: "Feedback ansehen",
|
|
93
|
-
allFeedback: "Alle R\xFCckmeldungen",
|
|
94
92
|
discussion: "Feedback-Diskussion",
|
|
95
93
|
inbox: "Feedback-Eingang"
|
|
96
94
|
},
|