wimui 0.76.1 → 0.77.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 (84) hide show
  1. package/dist/ai-core.d.ts +1 -0
  2. package/dist/ai.cjs +1 -1
  3. package/dist/ai.js +11 -10
  4. package/dist/components/_internal/useCloseWhenReferenceGone.cjs +2 -0
  5. package/dist/components/_internal/useCloseWhenReferenceGone.d.ts +9 -0
  6. package/dist/components/_internal/useCloseWhenReferenceGone.js +17 -0
  7. package/dist/components/_internal/useFloatingElement.cjs +1 -1
  8. package/dist/components/_internal/useFloatingElement.js +28 -25
  9. package/dist/components/ai/AILabel/AILabel.cjs +2 -0
  10. package/dist/components/ai/AILabel/AILabel.d.ts +68 -0
  11. package/dist/components/ai/AILabel/AILabel.js +51 -0
  12. package/dist/components/ai/AILabel/ai-label.module.cjs +2 -0
  13. package/dist/components/ai/AILabel/ai-label.module.js +15 -0
  14. package/dist/components/ai/MarkdownRenderer/MarkdownRenderer.cjs +1 -1
  15. package/dist/components/ai/MarkdownRenderer/MarkdownRenderer.js +11 -11
  16. package/dist/components/data-display/FAQSection/FAQSection.cjs +1 -1
  17. package/dist/components/data-display/FAQSection/FAQSection.js +10 -10
  18. package/dist/components/layout/PageHeader/PageHeader.cjs +2 -0
  19. package/dist/components/layout/PageHeader/PageHeader.d.ts +51 -0
  20. package/dist/components/layout/PageHeader/PageHeader.js +55 -0
  21. package/dist/components/layout/PageHeader/page-header.module.cjs +2 -0
  22. package/dist/components/layout/PageHeader/page-header.module.js +16 -0
  23. package/dist/components/overlay/Dropdown/Dropdown.cjs +1 -1
  24. package/dist/components/overlay/Dropdown/Dropdown.js +99 -98
  25. package/dist/components/overlay/Popover/Popover.cjs +1 -1
  26. package/dist/components/overlay/Popover/Popover.js +2 -2
  27. package/dist/i18n/generated/ai.cjs +2 -0
  28. package/dist/i18n/generated/ai.d.ts +3 -0
  29. package/dist/i18n/generated/ai.js +21 -0
  30. package/dist/i18n/generated/common.d.ts +1 -1
  31. package/dist/i18n/generated/components.d.ts +1 -1
  32. package/dist/i18n/generated/keys.d.ts +2 -1
  33. package/dist/index.cjs +1 -1
  34. package/dist/index.js +175 -173
  35. package/dist/layout.cjs +1 -1
  36. package/dist/layout.d.ts +1 -0
  37. package/dist/layout.js +2 -1
  38. package/dist/llms/AILabel.md +27 -0
  39. package/dist/llms/AppShell.md +2 -0
  40. package/dist/llms/Avatar.md +2 -0
  41. package/dist/llms/Badge.md +2 -0
  42. package/dist/llms/ButtonGroup.md +2 -0
  43. package/dist/llms/Card.md +2 -0
  44. package/dist/llms/CodeBlock.md +2 -0
  45. package/dist/llms/CopyButton.md +2 -0
  46. package/dist/llms/DataGrid.md +2 -0
  47. package/dist/llms/Dialog.md +1 -1
  48. package/dist/llms/Drawer.md +1 -1
  49. package/dist/llms/Fieldset.md +2 -0
  50. package/dist/llms/FileUpload.md +1 -1
  51. package/dist/llms/Indicator.md +2 -0
  52. package/dist/llms/InlineEdit.md +1 -1
  53. package/dist/llms/Input.md +2 -0
  54. package/dist/llms/List.md +2 -0
  55. package/dist/llms/OverflowList.md +1 -1
  56. package/dist/llms/PageHeader.md +30 -0
  57. package/dist/llms/Pagination.md +2 -0
  58. package/dist/llms/Popover.md +1 -1
  59. package/dist/llms/QueryBuilder.md +2 -0
  60. package/dist/llms/Radio.md +2 -0
  61. package/dist/llms/RadioGroup.md +2 -0
  62. package/dist/llms/Result.md +2 -0
  63. package/dist/llms/SegmentedControl.md +1 -1
  64. package/dist/llms/Spinner.md +1 -1
  65. package/dist/llms/SplitButton.md +2 -0
  66. package/dist/llms/Splitter.md +1 -1
  67. package/dist/llms/Stats.md +1 -1
  68. package/dist/llms/Stepper.md +2 -0
  69. package/dist/llms/Table.md +2 -0
  70. package/dist/llms/Text.md +2 -0
  71. package/dist/llms-full.txt +53 -32
  72. package/dist/llms.txt +34 -32
  73. package/dist/locales/en/common.json +2 -1
  74. package/dist/locales/en/components.json +3 -1
  75. package/dist/locales/ja/common.json +2 -1
  76. package/dist/locales/ja/components.json +3 -1
  77. package/dist/locales/pt/common.json +2 -1
  78. package/dist/locales/pt/components.json +3 -1
  79. package/dist/styles.css +1 -1
  80. package/dist/typography.cjs +1 -1
  81. package/dist/typography.js +5 -5
  82. package/dist/wimui.umd.css +1 -1
  83. package/dist/wimui.umd.js +5 -5
  84. package/package.json +6 -6
package/dist/ai-core.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './components/ai/PromptInput/PromptInput.js';
2
2
  export * from './components/ai/ThoughtProcess/ThoughtProcess.js';
3
3
  export * from './components/ai/AIResponseFeedback/AIResponseFeedback.js';
4
4
  export * from './components/ai/SourceCitation/SourceCitation.js';
5
+ export * from './components/ai/AILabel/AILabel.js';
5
6
  export * from './components/ai/CodeBlock/CodeBlock.js';
6
7
  export * from './components/ai/Terminal/Terminal.js';
7
8
  export * from './components/ai/AgentStatus/AgentStatus.js';
package/dist/ai.cjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./components/ai/PromptInput/PromptInput.cjs"),t=require("./components/ai/ThoughtProcess/ThoughtProcess.cjs"),n=require("./components/ai/AIResponseFeedback/AIResponseFeedback.cjs"),r=require("./components/ai/SourceCitation/SourceCitation.cjs"),i=require("./components/ai/CodeBlock/CodeBlock.cjs"),a=require("./components/ai/Terminal/Terminal.cjs"),o=require("./components/ai/AgentStatus/AgentStatus.cjs"),s=require("./components/ai/VoiceVisualizer/VoiceVisualizer.cjs"),c=require("./components/ai/ModelSelector/ModelSelector.cjs"),l=require("./components/ai/ThreadList/ThreadList.cjs"),u=require("./components/ai/UsageMeter/UsageMeter.cjs"),d=require("./components/ai/ChatUI/ChatUI.cjs"),f=require("./components/ai/ArtifactsOverlay/ArtifactsOverlay.cjs");exports.AIResponseFeedback=n.AIResponseFeedback,exports.AgentStatus=o.AgentStatus,exports.ArtifactsOverlay=f.ArtifactsOverlay,exports.ChatAvatar=d.ChatAvatar,exports.ChatContainer=d.ChatContainer,exports.ChatInput=d.ChatInput,exports.ChatInputArea=d.ChatInputArea,exports.ChatMessage=d.ChatMessage,exports.ChatMessageList=d.ChatMessageList,exports.ChatSystemMessage=d.ChatSystemMessage,exports.ChatToolCall=d.ChatToolCall,exports.CodeBlock=i.CodeBlock,exports.ConversationList=l.ConversationList,exports.ModelSelector=c.ModelSelector,exports.PromptInput=e.PromptInput,exports.SourceCitation=r.SourceCitation,exports.SourceCitationList=r.SourceCitationList,exports.Terminal=a.Terminal,exports.ThoughtProcess=t.ThoughtProcess,exports.ThoughtStep=t.ThoughtStep,exports.ThreadList=l.ThreadList,exports.TokenCounter=u.TokenCounter,exports.UsageMeter=u.UsageMeter,exports.VoiceVisualizer=s.VoiceVisualizer;
2
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./components/ai/PromptInput/PromptInput.cjs"),t=require("./components/ai/ThoughtProcess/ThoughtProcess.cjs"),n=require("./components/ai/AIResponseFeedback/AIResponseFeedback.cjs"),r=require("./components/ai/SourceCitation/SourceCitation.cjs"),i=require("./components/ai/AILabel/AILabel.cjs"),a=require("./components/ai/CodeBlock/CodeBlock.cjs"),o=require("./components/ai/Terminal/Terminal.cjs"),s=require("./components/ai/AgentStatus/AgentStatus.cjs"),c=require("./components/ai/VoiceVisualizer/VoiceVisualizer.cjs"),l=require("./components/ai/ModelSelector/ModelSelector.cjs"),u=require("./components/ai/ThreadList/ThreadList.cjs"),d=require("./components/ai/UsageMeter/UsageMeter.cjs"),f=require("./components/ai/ChatUI/ChatUI.cjs"),p=require("./components/ai/ArtifactsOverlay/ArtifactsOverlay.cjs");exports.AILabel=i.AILabel,exports.AIResponseFeedback=n.AIResponseFeedback,exports.AgentStatus=s.AgentStatus,exports.ArtifactsOverlay=p.ArtifactsOverlay,exports.ChatAvatar=f.ChatAvatar,exports.ChatContainer=f.ChatContainer,exports.ChatInput=f.ChatInput,exports.ChatInputArea=f.ChatInputArea,exports.ChatMessage=f.ChatMessage,exports.ChatMessageList=f.ChatMessageList,exports.ChatSystemMessage=f.ChatSystemMessage,exports.ChatToolCall=f.ChatToolCall,exports.CodeBlock=a.CodeBlock,exports.ConversationList=u.ConversationList,exports.ModelSelector=l.ModelSelector,exports.PromptInput=e.PromptInput,exports.SourceCitation=r.SourceCitation,exports.SourceCitationList=r.SourceCitationList,exports.Terminal=o.Terminal,exports.ThoughtProcess=t.ThoughtProcess,exports.ThoughtStep=t.ThoughtStep,exports.ThreadList=u.ThreadList,exports.TokenCounter=d.TokenCounter,exports.UsageMeter=d.UsageMeter,exports.VoiceVisualizer=c.VoiceVisualizer;
package/dist/ai.js CHANGED
@@ -3,13 +3,14 @@ import { PromptInput as e } from "./components/ai/PromptInput/PromptInput.js";
3
3
  import { ThoughtProcess as t, ThoughtStep as n } from "./components/ai/ThoughtProcess/ThoughtProcess.js";
4
4
  import { AIResponseFeedback as r } from "./components/ai/AIResponseFeedback/AIResponseFeedback.js";
5
5
  import { SourceCitation as i, SourceCitationList as a } from "./components/ai/SourceCitation/SourceCitation.js";
6
- import { CodeBlock as o } from "./components/ai/CodeBlock/CodeBlock.js";
7
- import { Terminal as s } from "./components/ai/Terminal/Terminal.js";
8
- import { AgentStatus as c } from "./components/ai/AgentStatus/AgentStatus.js";
9
- import { VoiceVisualizer as l } from "./components/ai/VoiceVisualizer/VoiceVisualizer.js";
10
- import { ModelSelector as u } from "./components/ai/ModelSelector/ModelSelector.js";
11
- import { ConversationList as d, ThreadList as f } from "./components/ai/ThreadList/ThreadList.js";
12
- import { TokenCounter as p, UsageMeter as m } from "./components/ai/UsageMeter/UsageMeter.js";
13
- import { ChatAvatar as h, ChatContainer as g, ChatInput as _, ChatInputArea as v, ChatMessage as y, ChatMessageList as b, ChatSystemMessage as x, ChatToolCall as S } from "./components/ai/ChatUI/ChatUI.js";
14
- import { ArtifactsOverlay as C } from "./components/ai/ArtifactsOverlay/ArtifactsOverlay.js";
15
- export { r as AIResponseFeedback, c as AgentStatus, C as ArtifactsOverlay, h as ChatAvatar, g as ChatContainer, _ as ChatInput, v as ChatInputArea, y as ChatMessage, b as ChatMessageList, x as ChatSystemMessage, S as ChatToolCall, o as CodeBlock, d as ConversationList, u as ModelSelector, e as PromptInput, i as SourceCitation, a as SourceCitationList, s as Terminal, t as ThoughtProcess, n as ThoughtStep, f as ThreadList, p as TokenCounter, m as UsageMeter, l as VoiceVisualizer };
6
+ import { AILabel as o } from "./components/ai/AILabel/AILabel.js";
7
+ import { CodeBlock as s } from "./components/ai/CodeBlock/CodeBlock.js";
8
+ import { Terminal as c } from "./components/ai/Terminal/Terminal.js";
9
+ import { AgentStatus as l } from "./components/ai/AgentStatus/AgentStatus.js";
10
+ import { VoiceVisualizer as u } from "./components/ai/VoiceVisualizer/VoiceVisualizer.js";
11
+ import { ModelSelector as d } from "./components/ai/ModelSelector/ModelSelector.js";
12
+ import { ConversationList as f, ThreadList as p } from "./components/ai/ThreadList/ThreadList.js";
13
+ import { TokenCounter as m, UsageMeter as h } from "./components/ai/UsageMeter/UsageMeter.js";
14
+ import { ChatAvatar as g, ChatContainer as _, ChatInput as v, ChatInputArea as y, ChatMessage as b, ChatMessageList as x, ChatSystemMessage as S, ChatToolCall as C } from "./components/ai/ChatUI/ChatUI.js";
15
+ import { ArtifactsOverlay as w } from "./components/ai/ArtifactsOverlay/ArtifactsOverlay.js";
16
+ export { o as AILabel, r as AIResponseFeedback, l as AgentStatus, w as ArtifactsOverlay, g as ChatAvatar, _ as ChatContainer, v as ChatInput, y as ChatInputArea, b as ChatMessage, x as ChatMessageList, S as ChatSystemMessage, C as ChatToolCall, s as CodeBlock, f as ConversationList, d as ModelSelector, e as PromptInput, i as SourceCitation, a as SourceCitationList, c as Terminal, t as ThoughtProcess, n as ThoughtStep, p as ThreadList, m as TokenCounter, h as UsageMeter, u as VoiceVisualizer };
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ let e=require("react");function t(t,n,r){let i=(0,e.useRef)(r);(0,e.useEffect)(()=>{i.current=r}),(0,e.useEffect)(()=>{if(!t||typeof ResizeObserver>`u`||!(n instanceof Element))return;let e=new ResizeObserver(()=>{(!n.isConnected||n.getClientRects().length===0)&&i.current()});return e.observe(n),()=>e.disconnect()},[t,n])}exports.useCloseWhenReferenceGone=t;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 開いている間に引き金が見えなくなったら(`display: none` などで大きさが 0 になった・文書から外れた)、
3
+ * 面を閉じる(T412)。
4
+ *
5
+ * 位置の計算は引き金を見失うと、面を画面の左上に置いたまま残した(Popover・Dropdown)。画面幅で
6
+ * 引き金を隠すツールバーや、タブを切り替えて引き金が消える画面で起きる。スクロールして引き金が
7
+ * 画面の外へ出ただけでは閉じない(floating-ui の `hide` を使うと、そこまで閉じてしまう)。
8
+ */
9
+ export declare function useCloseWhenReferenceGone(open: boolean, reference: unknown, close: () => void): void;
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { useEffect as e, useRef as t } from "react";
3
+ //#region src/components/_internal/useCloseWhenReferenceGone.ts
4
+ function n(n, r, i) {
5
+ let a = t(i);
6
+ e(() => {
7
+ a.current = i;
8
+ }), e(() => {
9
+ if (!n || typeof ResizeObserver > "u" || !(r instanceof Element)) return;
10
+ let e = new ResizeObserver(() => {
11
+ (!r.isConnected || r.getClientRects().length === 0) && a.current();
12
+ });
13
+ return e.observe(r), () => e.disconnect();
14
+ }, [n, r]);
15
+ }
16
+ //#endregion
17
+ export { n as useCloseWhenReferenceGone };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- let e=require("react"),t=require("@floating-ui/react");var n=({placement:n=`bottom-start`,open:r,defaultOpen:i=!1,onOpenChange:a,trigger:o=`click`,offset:s=8,role:c=`dialog`}={})=>{let[l,u]=(0,e.useState)(i),d=r??l,f=e=>{r===void 0&&u(e),a?.(e)},p=(0,t.useFloating)({open:d,onOpenChange:f,placement:n,whileElementsMounted:t.autoUpdate,middleware:[(0,t.offset)(s),(0,t.flip)(),(0,t.shift)({padding:10})]}),{context:m}=p,h=(0,t.useClick)(m,{enabled:o===`click`}),g=(0,t.useHover)(m,{enabled:o===`hover`,handleClose:(0,t.safePolygon)()}),_=(0,t.useFocus)(m,{enabled:o===`hover`}),v=(0,t.useDismiss)(m),y=(0,t.useRole)(m,{role:c}),b=(0,t.useInteractions)([h,g,_,v,y]);return{isOpen:d,setOpen:f,...p,...b,isPositioned:p.isPositioned}};exports.useFloatingElement=n;
2
+ const e=require("./useCloseWhenReferenceGone.cjs");let t=require("react"),n=require("@floating-ui/react");var r=({placement:r=`bottom-start`,open:i,defaultOpen:a=!1,onOpenChange:o,trigger:s=`click`,offset:c=8,role:l=`dialog`}={})=>{let[u,d]=(0,t.useState)(a),f=i??u,p=e=>{i===void 0&&d(e),o?.(e)},m=(0,n.useFloating)({open:f,onOpenChange:p,placement:r,whileElementsMounted:n.autoUpdate,middleware:[(0,n.offset)(c),(0,n.flip)(),(0,n.shift)({padding:10})]}),{context:h}=m;e.useCloseWhenReferenceGone(f,m.elements.reference,()=>p(!1));let g=(0,n.useClick)(h,{enabled:s===`click`}),_=(0,n.useHover)(h,{enabled:s===`hover`,handleClose:(0,n.safePolygon)()}),v=(0,n.useFocus)(h,{enabled:s===`hover`}),y=(0,n.useDismiss)(h),b=(0,n.useRole)(h,{role:l}),x=(0,n.useInteractions)([g,_,v,y,b]);return{isOpen:f,setOpen:p,...m,...x,isPositioned:m.isPositioned}};exports.useFloatingElement=r;
@@ -1,37 +1,40 @@
1
1
  "use client";
2
- import { useState as e } from "react";
3
- import { autoUpdate as t, flip as n, offset as r, safePolygon as i, shift as a, useClick as o, useDismiss as s, useFloating as c, useFocus as l, useHover as u, useInteractions as d, useRole as f } from "@floating-ui/react";
2
+ import { useCloseWhenReferenceGone as e } from "./useCloseWhenReferenceGone.js";
3
+ import { useState as t } from "react";
4
+ import { autoUpdate as n, flip as r, offset as i, safePolygon as a, shift as o, useClick as s, useDismiss as c, useFloating as l, useFocus as u, useHover as d, useInteractions as f, useRole as p } from "@floating-ui/react";
4
5
  //#region src/components/_internal/useFloatingElement.ts
5
- var p = ({ placement: p = "bottom-start", open: m, defaultOpen: h = !1, onOpenChange: g, trigger: _ = "click", offset: v = 8, role: y = "dialog" } = {}) => {
6
- let [b, x] = e(h), S = m ?? b, C = (e) => {
7
- m === void 0 && x(e), g?.(e);
8
- }, w = c({
9
- open: S,
10
- onOpenChange: C,
11
- placement: p,
12
- whileElementsMounted: t,
6
+ var m = ({ placement: m = "bottom-start", open: h, defaultOpen: g = !1, onOpenChange: _, trigger: v = "click", offset: y = 8, role: b = "dialog" } = {}) => {
7
+ let [x, S] = t(g), C = h ?? x, w = (e) => {
8
+ h === void 0 && S(e), _?.(e);
9
+ }, T = l({
10
+ open: C,
11
+ onOpenChange: w,
12
+ placement: m,
13
+ whileElementsMounted: n,
13
14
  middleware: [
14
- r(v),
15
- n(),
16
- a({ padding: 10 })
15
+ i(y),
16
+ r(),
17
+ o({ padding: 10 })
17
18
  ]
18
- }), { context: T } = w, E = o(T, { enabled: _ === "click" }), D = u(T, {
19
- enabled: _ === "hover",
20
- handleClose: i()
21
- }), O = l(T, { enabled: _ === "hover" }), k = s(T), A = f(T, { role: y }), j = d([
22
- E,
19
+ }), { context: E } = T;
20
+ e(C, T.elements.reference, () => w(!1));
21
+ let D = s(E, { enabled: v === "click" }), O = d(E, {
22
+ enabled: v === "hover",
23
+ handleClose: a()
24
+ }), k = u(E, { enabled: v === "hover" }), A = c(E), j = p(E, { role: b }), M = f([
23
25
  D,
24
26
  O,
25
27
  k,
26
- A
28
+ A,
29
+ j
27
30
  ]);
28
31
  return {
29
- isOpen: S,
30
- setOpen: C,
31
- ...w,
32
- ...j,
33
- isPositioned: w.isPositioned
32
+ isOpen: C,
33
+ setOpen: w,
34
+ ...T,
35
+ ...M,
36
+ isPositioned: T.isPositioned
34
37
  };
35
38
  };
36
39
  //#endregion
37
- export { p as useFloatingElement };
40
+ export { m as useFloatingElement };
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../overlay/Popover/Popover.cjs"),r=require("../../../i18n/generated/ai.cjs"),i=require("./ai-label.module.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("classnames");o=e.__toESM(o,1);let s=require("react/jsx-runtime");var c=a.default.forwardRef(({children:e,title:c,size:l=`md`,placement:u=`bottom-start`,defaultOpen:d,open:f,onOpenChange:p,className:m,"aria-label":h,...g},_)=>{let{t:v}=t.useWimTranslation(r.aiNs),y=a.default.useId(),b=v(`ai_label.name`);return(0,s.jsxs)(n.Popover,{defaultOpen:d,open:f,onOpenChange:p,placement:u,className:i.default.anchor,children:[(0,s.jsx)(n.PopoverTrigger,{asChild:!0,children:(0,s.jsx)(`button`,{ref:_,type:`button`,className:(0,o.default)(`wim-ai-label`,i.default.root,i.default[l],m),...g,"aria-label":h??b,children:(0,s.jsx)(`span`,{className:i.default.mark,"data-part":`mark`,"aria-hidden":`true`,children:v(`ai_label.text`)})})}),(0,s.jsxs)(n.PopoverContent,{className:i.default.content,"data-part":`content`,"aria-labelledby":y,children:[(0,s.jsx)(`p`,{id:y,className:i.default.title,"data-part":`title`,children:c??b}),(0,s.jsx)(`div`,{className:i.default.body,children:e})]})]})});c.displayName=`AILabel`,exports.AILabel=c;
@@ -0,0 +1,68 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ import { Placement } from '@floating-ui/react';
3
+ import { ComponentSizeBasic } from '../../../types/tokens.js';
4
+ export type AILabelProps = Omit<React.ComponentPropsWithoutRef<"button">, "children" | "title" | "type"> & {
5
+ /**
6
+ * What the AI did, shown when the label is pressed — for example which model
7
+ * produced the value, from what, and how to check or replace it.
8
+ */
9
+ children: ReactNode;
10
+ /**
11
+ * Heading of the explanation. Defaults to the localized "AI-generated".
12
+ */
13
+ title?: ReactNode;
14
+ /**
15
+ * Size of the mark. `sm` fits inside a field or a table cell; `md` sits next
16
+ * to a heading or in the corner of a card.
17
+ * @default "md"
18
+ */
19
+ size?: ComponentSizeBasic;
20
+ /**
21
+ * Preferred placement of the explanation.
22
+ * @default "bottom-start"
23
+ */
24
+ placement?: Placement;
25
+ /** Opens the explanation on the first render (uncontrolled). */
26
+ defaultOpen?: boolean;
27
+ /** Controls whether the explanation is open. */
28
+ open?: boolean;
29
+ /** Called when the explanation opens or closes. */
30
+ onOpenChange?: (open: boolean) => void;
31
+ };
32
+ /**
33
+ * AILabel marks a value or a block as produced by AI. It is a small button
34
+ * that reads "AI"; pressing it opens an explanation the app provides.
35
+ *
36
+ * Composition Contract:
37
+ * - Managed by: App consumption (the explanation is the app's content)
38
+ * - Portal: The explanation renders through Popover (FloatingPortal)
39
+ * - Scroll lock: No
40
+ */
41
+ export declare const AILabel: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "title" | "children" | "type"> & {
42
+ /**
43
+ * What the AI did, shown when the label is pressed — for example which model
44
+ * produced the value, from what, and how to check or replace it.
45
+ */
46
+ children: ReactNode;
47
+ /**
48
+ * Heading of the explanation. Defaults to the localized "AI-generated".
49
+ */
50
+ title?: ReactNode;
51
+ /**
52
+ * Size of the mark. `sm` fits inside a field or a table cell; `md` sits next
53
+ * to a heading or in the corner of a card.
54
+ * @default "md"
55
+ */
56
+ size?: ComponentSizeBasic;
57
+ /**
58
+ * Preferred placement of the explanation.
59
+ * @default "bottom-start"
60
+ */
61
+ placement?: Placement;
62
+ /** Opens the explanation on the first render (uncontrolled). */
63
+ defaultOpen?: boolean;
64
+ /** Controls whether the explanation is open. */
65
+ open?: boolean;
66
+ /** Called when the explanation opens or closes. */
67
+ onOpenChange?: (open: boolean) => void;
68
+ } & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,51 @@
1
+ "use client";
2
+ import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
3
+ import { Popover as t, PopoverContent as n, PopoverTrigger as r } from "../../overlay/Popover/Popover.js";
4
+ import { aiNs as i } from "../../../i18n/generated/ai.js";
5
+ import a from "./ai-label.module.js";
6
+ import o from "react";
7
+ import s from "classnames";
8
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
9
+ //#region src/components/ai/AILabel/AILabel.tsx
10
+ var u = o.forwardRef(({ children: u, title: d, size: f = "md", placement: p = "bottom-start", defaultOpen: m, open: h, onOpenChange: g, className: _, "aria-label": v, ...y }, b) => {
11
+ let { t: x } = e(i), S = o.useId(), C = x("ai_label.name");
12
+ return /* @__PURE__ */ l(t, {
13
+ defaultOpen: m,
14
+ open: h,
15
+ onOpenChange: g,
16
+ placement: p,
17
+ className: a.anchor,
18
+ children: [/* @__PURE__ */ c(r, {
19
+ asChild: !0,
20
+ children: /* @__PURE__ */ c("button", {
21
+ ref: b,
22
+ type: "button",
23
+ className: s("wim-ai-label", a.root, a[f], _),
24
+ ...y,
25
+ "aria-label": v ?? C,
26
+ children: /* @__PURE__ */ c("span", {
27
+ className: a.mark,
28
+ "data-part": "mark",
29
+ "aria-hidden": "true",
30
+ children: x("ai_label.text")
31
+ })
32
+ })
33
+ }), /* @__PURE__ */ l(n, {
34
+ className: a.content,
35
+ "data-part": "content",
36
+ "aria-labelledby": S,
37
+ children: [/* @__PURE__ */ c("p", {
38
+ id: S,
39
+ className: a.title,
40
+ "data-part": "title",
41
+ children: d ?? C
42
+ }), /* @__PURE__ */ c("div", {
43
+ className: a.body,
44
+ children: u
45
+ })]
46
+ })]
47
+ });
48
+ });
49
+ u.displayName = "AILabel";
50
+ //#endregion
51
+ export { u as AILabel };
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ var e=`_anchor_1lo6m_4`,t=`_root_1lo6m_8`,n=`_mark_1lo6m_25`,r=`_sm_1lo6m_50`,i=`_md_1lo6m_54`,a=`_lg_1lo6m_58`,o=`_content_1lo6m_62`,s=`_title_1lo6m_66`,c=`_body_1lo6m_71`,l={anchor:e,root:t,mark:n,sm:r,md:i,lg:a,content:o,title:s,body:c};exports.anchor=e,exports.body=c,exports.content=o,exports.default=l,exports.lg=a,exports.mark=n,exports.md=i,exports.root=t,exports.sm=r,exports.title=s;
@@ -0,0 +1,15 @@
1
+ "use client";
2
+ //#region src/components/ai/AILabel/ai-label.module.scss
3
+ var e = "_anchor_1lo6m_4", t = "_root_1lo6m_8", n = "_mark_1lo6m_25", r = "_sm_1lo6m_50", i = "_md_1lo6m_54", a = "_lg_1lo6m_58", o = "_content_1lo6m_62", s = "_title_1lo6m_66", c = "_body_1lo6m_71", l = {
4
+ anchor: e,
5
+ root: t,
6
+ mark: n,
7
+ sm: r,
8
+ md: i,
9
+ lg: a,
10
+ content: o,
11
+ title: s,
12
+ body: c
13
+ };
14
+ //#endregion
15
+ export { e as anchor, c as body, o as content, l as default, a as lg, n as mark, i as md, t as root, r as sm, s as title };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/form.cjs"),r=require("../../typography/Text/Text.cjs"),i=require("../../navigation/Link/Link.cjs"),a=require("../../typography/Title/Title.cjs"),o=require("../../typography/Blockquote/Blockquote.cjs"),s=require("../CodeBlock/CodeBlock.cjs"),c=require("./markdown-renderer.module.cjs");let l=require("react");l=e.__toESM(l,1);let u=require("classnames");u=e.__toESM(u,1);let d=require("react/jsx-runtime"),f=require("react-markdown");f=e.__toESM(f,1);let p=require("remark-gfm");p=e.__toESM(p,1);var m=[`xs`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`4xl`];function h(e,t){let n=m.indexOf(t);return m[Math.max(0,n-(e-1))]}var g=({content:e,baseLevel:l=`2xl`,className:m})=>{let{t:g}=t.useWimTranslation(n.formNs);return(0,d.jsx)(`div`,{className:(0,u.default)(`wim-markdown-renderer`,c.default.root,m),children:(0,d.jsx)(f.default,{remarkPlugins:[p.default],components:{h1:({children:e})=>(0,d.jsx)(a.Title,{tag:`h1`,size:h(1,l),className:c.default.heading,children:e}),h2:({children:e})=>(0,d.jsx)(a.Title,{tag:`h2`,size:h(2,l),className:c.default.heading,children:e}),h3:({children:e})=>(0,d.jsx)(a.Title,{tag:`h3`,size:h(3,l),className:c.default.heading,children:e}),h4:({children:e})=>(0,d.jsx)(a.Title,{tag:`h4`,size:h(4,l),className:c.default.heading,children:e}),p:({children:e})=>(0,d.jsx)(r.Text,{className:c.default.paragraph,children:e}),a:({href:e,children:t})=>(0,d.jsx)(i.Link,{href:e,children:t}),blockquote:({children:e})=>(0,d.jsx)(o.Blockquote,{children:e}),ul:({children:e})=>(0,d.jsx)(`ul`,{className:c.default.list,children:e}),ol:({children:e})=>(0,d.jsx)(`ol`,{className:c.default.list,children:e}),li:({children:e})=>(0,d.jsx)(`li`,{className:c.default.listItem,children:e}),code({className:e,children:t,...n}){let r=/language-(\w+)/.exec(e||``);return r?(0,d.jsx)(s.CodeBlock,{code:String(t).replace(/\n$/,``),language:r[1],className:c.default.codeBlock}):(0,d.jsx)(`code`,{className:c.default.inlineCode,...n,children:t})},table:({children:e})=>(0,d.jsx)(`div`,{className:c.default.tableWrapper,children:(0,d.jsx)(`table`,{className:c.default.table,children:e})}),th:({children:e})=>(0,d.jsx)(`th`,{className:c.default.th,children:e}),td:({children:e})=>(0,d.jsx)(`td`,{className:c.default.td,children:e}),input:({type:e,checked:t,disabled:n})=>e===`checkbox`?(0,d.jsx)(`input`,{type:`checkbox`,checked:t,disabled:n,readOnly:!0,"aria-label":g(t?`markdown.task_done`:`markdown.task_todo`)}):null},children:e})})};g.displayName=`MarkdownRenderer`,exports.MarkdownRenderer=g;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../typography/Title/Title.cjs"),r=require("../../../i18n/generated/form.cjs"),i=require("../../typography/Text/Text.cjs"),a=require("../../navigation/Link/Link.cjs"),o=require("../../typography/Blockquote/Blockquote.cjs"),s=require("../CodeBlock/CodeBlock.cjs"),c=require("./markdown-renderer.module.cjs");let l=require("react");l=e.__toESM(l,1);let u=require("classnames");u=e.__toESM(u,1);let d=require("react/jsx-runtime"),f=require("react-markdown");f=e.__toESM(f,1);let p=require("remark-gfm");p=e.__toESM(p,1);var m=[`xs`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`4xl`];function h(e,t){let n=m.indexOf(t);return m[Math.max(0,n-(e-1))]}var g=({content:e,baseLevel:l=`2xl`,className:m})=>{let{t:g}=t.useWimTranslation(r.formNs);return(0,d.jsx)(`div`,{className:(0,u.default)(`wim-markdown-renderer`,c.default.root,m),children:(0,d.jsx)(f.default,{remarkPlugins:[p.default],components:{h1:({children:e})=>(0,d.jsx)(n.Title,{tag:`h1`,size:h(1,l),className:c.default.heading,children:e}),h2:({children:e})=>(0,d.jsx)(n.Title,{tag:`h2`,size:h(2,l),className:c.default.heading,children:e}),h3:({children:e})=>(0,d.jsx)(n.Title,{tag:`h3`,size:h(3,l),className:c.default.heading,children:e}),h4:({children:e})=>(0,d.jsx)(n.Title,{tag:`h4`,size:h(4,l),className:c.default.heading,children:e}),p:({children:e})=>(0,d.jsx)(i.Text,{className:c.default.paragraph,children:e}),a:({href:e,children:t})=>(0,d.jsx)(a.Link,{href:e,children:t}),blockquote:({children:e})=>(0,d.jsx)(o.Blockquote,{children:e}),ul:({children:e})=>(0,d.jsx)(`ul`,{className:c.default.list,children:e}),ol:({children:e})=>(0,d.jsx)(`ol`,{className:c.default.list,children:e}),li:({children:e})=>(0,d.jsx)(`li`,{className:c.default.listItem,children:e}),code({className:e,children:t,...n}){let r=/language-(\w+)/.exec(e||``);return r?(0,d.jsx)(s.CodeBlock,{code:String(t).replace(/\n$/,``),language:r[1],className:c.default.codeBlock}):(0,d.jsx)(`code`,{className:c.default.inlineCode,...n,children:t})},table:({children:e})=>(0,d.jsx)(`div`,{className:c.default.tableWrapper,children:(0,d.jsx)(`table`,{className:c.default.table,children:e})}),th:({children:e})=>(0,d.jsx)(`th`,{className:c.default.th,children:e}),td:({children:e})=>(0,d.jsx)(`td`,{className:c.default.td,children:e}),input:({type:e,checked:t,disabled:n})=>e===`checkbox`?(0,d.jsx)(`input`,{type:`checkbox`,checked:t,disabled:n,readOnly:!0,"aria-label":g(t?`markdown.task_done`:`markdown.task_todo`)}):null},children:e})})};g.displayName=`MarkdownRenderer`,exports.MarkdownRenderer=g;
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
3
- import { formNs as t } from "../../../i18n/generated/form.js";
4
- import { Text as n } from "../../typography/Text/Text.js";
5
- import { Link as r } from "../../navigation/Link/Link.js";
6
- import { Title as i } from "../../typography/Title/Title.js";
3
+ import { Title as t } from "../../typography/Title/Title.js";
4
+ import { formNs as n } from "../../../i18n/generated/form.js";
5
+ import { Text as r } from "../../typography/Text/Text.js";
6
+ import { Link as i } from "../../navigation/Link/Link.js";
7
7
  import { Blockquote as a } from "../../typography/Blockquote/Blockquote.js";
8
8
  import { CodeBlock as o } from "../CodeBlock/CodeBlock.js";
9
9
  import s from "./markdown-renderer.module.js";
@@ -28,41 +28,41 @@ function p(e, t) {
28
28
  return f[Math.max(0, n - (e - 1))];
29
29
  }
30
30
  var m = ({ content: f, baseLevel: m = "2xl", className: h }) => {
31
- let { t: g } = e(t);
31
+ let { t: g } = e(n);
32
32
  return /* @__PURE__ */ l("div", {
33
33
  className: c("wim-markdown-renderer", s.root, h),
34
34
  children: /* @__PURE__ */ l(u, {
35
35
  remarkPlugins: [d],
36
36
  components: {
37
- h1: ({ children: e }) => /* @__PURE__ */ l(i, {
37
+ h1: ({ children: e }) => /* @__PURE__ */ l(t, {
38
38
  tag: "h1",
39
39
  size: p(1, m),
40
40
  className: s.heading,
41
41
  children: e
42
42
  }),
43
- h2: ({ children: e }) => /* @__PURE__ */ l(i, {
43
+ h2: ({ children: e }) => /* @__PURE__ */ l(t, {
44
44
  tag: "h2",
45
45
  size: p(2, m),
46
46
  className: s.heading,
47
47
  children: e
48
48
  }),
49
- h3: ({ children: e }) => /* @__PURE__ */ l(i, {
49
+ h3: ({ children: e }) => /* @__PURE__ */ l(t, {
50
50
  tag: "h3",
51
51
  size: p(3, m),
52
52
  className: s.heading,
53
53
  children: e
54
54
  }),
55
- h4: ({ children: e }) => /* @__PURE__ */ l(i, {
55
+ h4: ({ children: e }) => /* @__PURE__ */ l(t, {
56
56
  tag: "h4",
57
57
  size: p(4, m),
58
58
  className: s.heading,
59
59
  children: e
60
60
  }),
61
- p: ({ children: e }) => /* @__PURE__ */ l(n, {
61
+ p: ({ children: e }) => /* @__PURE__ */ l(r, {
62
62
  className: s.paragraph,
63
63
  children: e
64
64
  }),
65
- a: ({ href: e, children: t }) => /* @__PURE__ */ l(r, {
65
+ a: ({ href: e, children: t }) => /* @__PURE__ */ l(i, {
66
66
  href: e,
67
67
  children: t
68
68
  }),
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../typography/Text/Text.cjs"),n=require("../Accordion/Accordion.cjs"),r=require("../../typography/Title/Title.cjs"),i=require("./faq-section.module.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("classnames");o=e.__toESM(o,1);let s=require("react/jsx-runtime");var c=({items:e,title:a,description:c,layout:l=`top`,accordionProps:u,className:d,"aria-label":f,"aria-labelledby":p})=>{let m=!!(a||c);return(0,s.jsx)(`section`,{className:(0,o.default)(`wim-faq-section`,i.default.root,i.default[`layout-${l}`],d),"aria-label":p?void 0:f,"aria-labelledby":p,children:(0,s.jsxs)(`div`,{className:i.default.layout,children:[m&&(0,s.jsxs)(`div`,{className:i.default.header,children:[a&&(0,s.jsx)(r.Title,{tag:`h2`,size:`xl`,className:i.default.title,children:a}),c&&(0,s.jsx)(t.Text,{content:c,color:`text-secondary`,className:i.default.description})]}),(0,s.jsx)(`div`,{className:i.default.content,children:(0,s.jsx)(n.Accordion,{type:`multiple`,collapsible:!0,...u,className:u?.className,children:e.map((e,t)=>(0,s.jsxs)(n.Accordion.Item,{value:`faq-item-${t}`,children:[(0,s.jsx)(n.Accordion.Trigger,{children:e.question}),(0,s.jsx)(n.Accordion.Content,{children:e.answer})]},t))})})]})})};exports.FAQSection=c;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../typography/Title/Title.cjs"),n=require("../../typography/Text/Text.cjs"),r=require("../Accordion/Accordion.cjs"),i=require("./faq-section.module.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("classnames");o=e.__toESM(o,1);let s=require("react/jsx-runtime");var c=({items:e,title:a,description:c,layout:l=`top`,accordionProps:u,className:d,"aria-label":f,"aria-labelledby":p})=>{let m=!!(a||c);return(0,s.jsx)(`section`,{className:(0,o.default)(`wim-faq-section`,i.default.root,i.default[`layout-${l}`],d),"aria-label":p?void 0:f,"aria-labelledby":p,children:(0,s.jsxs)(`div`,{className:i.default.layout,children:[m&&(0,s.jsxs)(`div`,{className:i.default.header,children:[a&&(0,s.jsx)(t.Title,{tag:`h2`,size:`xl`,className:i.default.title,children:a}),c&&(0,s.jsx)(n.Text,{content:c,color:`text-secondary`,className:i.default.description})]}),(0,s.jsx)(`div`,{className:i.default.content,children:(0,s.jsx)(r.Accordion,{type:`multiple`,collapsible:!0,...u,className:u?.className,children:e.map((e,t)=>(0,s.jsxs)(r.Accordion.Item,{value:`faq-item-${t}`,children:[(0,s.jsx)(r.Accordion.Trigger,{children:e.question}),(0,s.jsx)(r.Accordion.Content,{children:e.answer})]},t))})})]})})};exports.FAQSection=c;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { Text as e } from "../../typography/Text/Text.js";
3
- import { Accordion as t } from "../Accordion/Accordion.js";
4
- import { Title as n } from "../../typography/Title/Title.js";
2
+ import { Title as e } from "../../typography/Title/Title.js";
3
+ import { Text as t } from "../../typography/Text/Text.js";
4
+ import { Accordion as n } from "../Accordion/Accordion.js";
5
5
  import r from "./faq-section.module.js";
6
6
  import "react";
7
7
  import i from "classnames";
@@ -17,27 +17,27 @@ var s = ({ items: s, title: c, description: l, layout: u = "top", accordionProps
17
17
  className: r.layout,
18
18
  children: [h && /* @__PURE__ */ o("div", {
19
19
  className: r.header,
20
- children: [c && /* @__PURE__ */ a(n, {
20
+ children: [c && /* @__PURE__ */ a(e, {
21
21
  tag: "h2",
22
22
  size: "xl",
23
23
  className: r.title,
24
24
  children: c
25
- }), l && /* @__PURE__ */ a(e, {
25
+ }), l && /* @__PURE__ */ a(t, {
26
26
  content: l,
27
27
  color: "text-secondary",
28
28
  className: r.description
29
29
  })]
30
30
  }), /* @__PURE__ */ a("div", {
31
31
  className: r.content,
32
- children: /* @__PURE__ */ a(t, {
32
+ children: /* @__PURE__ */ a(n, {
33
33
  type: "multiple",
34
34
  collapsible: !0,
35
35
  ...d,
36
36
  className: d?.className,
37
- children: s.map((e, n) => /* @__PURE__ */ o(t.Item, {
38
- value: `faq-item-${n}`,
39
- children: [/* @__PURE__ */ a(t.Trigger, { children: e.question }), /* @__PURE__ */ a(t.Content, { children: e.answer })]
40
- }, n))
37
+ children: s.map((e, t) => /* @__PURE__ */ o(n.Item, {
38
+ value: `faq-item-${t}`,
39
+ children: [/* @__PURE__ */ a(n.Trigger, { children: e.question }), /* @__PURE__ */ a(n.Content, { children: e.answer })]
40
+ }, t))
41
41
  })
42
42
  })]
43
43
  })
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../typography/Title/Title.cjs"),n=require("./page-header.module.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("classnames");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o=r.default.forwardRef(({title:e,breadcrumb:r,status:o,description:s,actions:c,tabs:l,className:u,...d},f)=>(0,a.jsxs)(`div`,{ref:f,className:(0,i.default)(`wim-page-header`,n.default.root,u),...d,children:[r!=null&&(0,a.jsx)(`div`,{className:n.default.breadcrumb,"data-part":`breadcrumb`,children:r}),(0,a.jsxs)(`div`,{className:n.default.main,children:[(0,a.jsxs)(`div`,{className:n.default.heading,children:[(0,a.jsxs)(`div`,{className:n.default.titleRow,children:[(0,a.jsx)(t.Title,{tag:`h1`,size:`lg`,className:n.default.title,"data-part":`title`,children:e}),o!=null&&(0,a.jsx)(`div`,{className:n.default.status,"data-part":`status`,children:o})]}),s!=null&&(0,a.jsx)(`div`,{className:n.default.description,"data-part":`description`,children:s})]}),c!=null&&(0,a.jsx)(`div`,{className:n.default.actions,"data-part":`actions`,children:c})]}),l!=null&&(0,a.jsx)(`div`,{className:n.default.tabs,"data-part":`tabs`,children:l})]}));o.displayName=`PageHeader`,exports.PageHeader=o;
@@ -0,0 +1,51 @@
1
+ import { default as React } from 'react';
2
+ export type PageHeaderProps = Omit<React.ComponentPropsWithoutRef<"div">, "title"> & {
3
+ /**
4
+ * The page title. Always rendered as the page's `h1` at one fixed size; a
5
+ * long title wraps instead of being cut.
6
+ */
7
+ title: React.ReactNode;
8
+ /** Breadcrumb shown above the title (usually a `Breadcrumb`). */
9
+ breadcrumb?: React.ReactNode;
10
+ /** A short status next to the title, such as a `Badge`. */
11
+ status?: React.ReactNode;
12
+ /** One or two lines under the title that say what is on the page. */
13
+ description?: React.ReactNode;
14
+ /**
15
+ * Page actions, such as `Button`s. They sit to the right of the title and
16
+ * move to their own line under it when the header is too narrow.
17
+ */
18
+ actions?: React.ReactNode;
19
+ /** Navigation between the page's views, such as `TabNavigation`, at the bottom. */
20
+ tabs?: React.ReactNode;
21
+ };
22
+ /**
23
+ * PageHeader is the head of a page: breadcrumb, title, status, description,
24
+ * actions and tabs in a fixed order and spacing. Use one per page.
25
+ *
26
+ * Composition Contract:
27
+ * - Managed by: App consumption (one per page, inside the main region)
28
+ * - Landmark: None. The root is a `div`, not `header`, so it never becomes a
29
+ * second banner next to the app's `Header`
30
+ * - Scroll lock: No
31
+ */
32
+ export declare const PageHeader: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "title"> & {
33
+ /**
34
+ * The page title. Always rendered as the page's `h1` at one fixed size; a
35
+ * long title wraps instead of being cut.
36
+ */
37
+ title: React.ReactNode;
38
+ /** Breadcrumb shown above the title (usually a `Breadcrumb`). */
39
+ breadcrumb?: React.ReactNode;
40
+ /** A short status next to the title, such as a `Badge`. */
41
+ status?: React.ReactNode;
42
+ /** One or two lines under the title that say what is on the page. */
43
+ description?: React.ReactNode;
44
+ /**
45
+ * Page actions, such as `Button`s. They sit to the right of the title and
46
+ * move to their own line under it when the header is too narrow.
47
+ */
48
+ actions?: React.ReactNode;
49
+ /** Navigation between the page's views, such as `TabNavigation`, at the bottom. */
50
+ tabs?: React.ReactNode;
51
+ } & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,55 @@
1
+ "use client";
2
+ import { Title as e } from "../../typography/Title/Title.js";
3
+ import t from "./page-header.module.js";
4
+ import n from "react";
5
+ import r from "classnames";
6
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
7
+ //#region src/components/layout/PageHeader/PageHeader.tsx
8
+ var o = n.forwardRef(({ title: n, breadcrumb: o, status: s, description: c, actions: l, tabs: u, className: d, ...f }, p) => /* @__PURE__ */ a("div", {
9
+ ref: p,
10
+ className: r("wim-page-header", t.root, d),
11
+ ...f,
12
+ children: [
13
+ o != null && /* @__PURE__ */ i("div", {
14
+ className: t.breadcrumb,
15
+ "data-part": "breadcrumb",
16
+ children: o
17
+ }),
18
+ /* @__PURE__ */ a("div", {
19
+ className: t.main,
20
+ children: [/* @__PURE__ */ a("div", {
21
+ className: t.heading,
22
+ children: [/* @__PURE__ */ a("div", {
23
+ className: t.titleRow,
24
+ children: [/* @__PURE__ */ i(e, {
25
+ tag: "h1",
26
+ size: "lg",
27
+ className: t.title,
28
+ "data-part": "title",
29
+ children: n
30
+ }), s != null && /* @__PURE__ */ i("div", {
31
+ className: t.status,
32
+ "data-part": "status",
33
+ children: s
34
+ })]
35
+ }), c != null && /* @__PURE__ */ i("div", {
36
+ className: t.description,
37
+ "data-part": "description",
38
+ children: c
39
+ })]
40
+ }), l != null && /* @__PURE__ */ i("div", {
41
+ className: t.actions,
42
+ "data-part": "actions",
43
+ children: l
44
+ })]
45
+ }),
46
+ u != null && /* @__PURE__ */ i("div", {
47
+ className: t.tabs,
48
+ "data-part": "tabs",
49
+ children: u
50
+ })
51
+ ]
52
+ }));
53
+ o.displayName = "PageHeader";
54
+ //#endregion
55
+ export { o as PageHeader };
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ var e=`_root_7qibi_3`,t=`_breadcrumb_7qibi_10`,n=`_main_7qibi_17`,r=`_heading_7qibi_27`,i=`_titleRow_7qibi_34`,a=`_title_7qibi_34`,o=`_status_7qibi_49`,s=`_description_7qibi_54`,c=`_actions_7qibi_58`,l=`_tabs_7qibi_66`,u={root:e,breadcrumb:t,main:n,heading:r,titleRow:i,title:a,status:o,description:s,actions:c,tabs:l};exports.actions=c,exports.breadcrumb=t,exports.default=u,exports.description=s,exports.heading=r,exports.main=n,exports.root=e,exports.status=o,exports.tabs=l,exports.title=a,exports.titleRow=i;
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ //#region src/components/layout/PageHeader/page-header.module.scss
3
+ var e = "_root_7qibi_3", t = "_breadcrumb_7qibi_10", n = "_main_7qibi_17", r = "_heading_7qibi_27", i = "_titleRow_7qibi_34", a = "_title_7qibi_34", o = "_status_7qibi_49", s = "_description_7qibi_54", c = "_actions_7qibi_58", l = "_tabs_7qibi_66", u = {
4
+ root: e,
5
+ breadcrumb: t,
6
+ main: n,
7
+ heading: r,
8
+ titleRow: i,
9
+ title: a,
10
+ status: o,
11
+ description: s,
12
+ actions: c,
13
+ tabs: l
14
+ };
15
+ //#endregion
16
+ export { c as actions, t as breadcrumb, u as default, s as description, r as heading, n as main, e as root, o as status, l as tabs, a as title, i as titleRow };