@revikornmann/muka-ui 0.9.2 → 0.11.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 (41) hide show
  1. package/dist/cjs/components/BottomBar/BottomBar.css +24 -2
  2. package/dist/cjs/components/BottomBar/BottomBar.js +1 -0
  3. package/dist/cjs/components/BottomBar/BottomBar.js.map +1 -1
  4. package/dist/cjs/components/ChatComposer/ChatComposer.css +52 -61
  5. package/dist/cjs/components/ChatComposer/ChatComposer.js +29 -6
  6. package/dist/cjs/components/ChatComposer/ChatComposer.js.map +1 -1
  7. package/dist/cjs/components/ChatComposer/index.js +6 -1
  8. package/dist/cjs/components/ChatComposer/index.js.map +1 -1
  9. package/dist/esm/components/BottomBar/BottomBar.css +24 -2
  10. package/dist/esm/components/BottomBar/BottomBar.js +1 -0
  11. package/dist/esm/components/BottomBar/BottomBar.js.map +1 -1
  12. package/dist/esm/components/ChatComposer/ChatComposer.css +52 -61
  13. package/dist/esm/components/ChatComposer/ChatComposer.js +29 -6
  14. package/dist/esm/components/ChatComposer/ChatComposer.js.map +1 -1
  15. package/dist/esm/components/ChatComposer/index.js +1 -0
  16. package/dist/esm/components/ChatComposer/index.js.map +1 -1
  17. package/dist/styles/components/BottomBar.css +24 -2
  18. package/dist/styles/components/ChatComposer.css +52 -61
  19. package/dist/styles/index.css +2771 -2757
  20. package/dist/styles/muka-dark.css +2771 -2757
  21. package/dist/styles/muka-light.css +2771 -2757
  22. package/dist/styles/tokens-bouwplan-dark.css +3 -2
  23. package/dist/styles/tokens-bouwplan-light.css +3 -2
  24. package/dist/styles/tokens-fscl-dark.css +3 -2
  25. package/dist/styles/tokens-fscl-light.css +3 -2
  26. package/dist/styles/tokens-grip-dark.css +3 -2
  27. package/dist/styles/tokens-grip-light.css +3 -2
  28. package/dist/styles/tokens-muka-dark.css +3 -2
  29. package/dist/styles/tokens-muka-light.css +3 -2
  30. package/dist/styles/tokens-wireframe-dark.css +3 -2
  31. package/dist/styles/tokens-wireframe-light.css +3 -2
  32. package/dist/styles/wireframe-dark.css +2771 -2757
  33. package/dist/styles/wireframe-light.css +2771 -2757
  34. package/dist/types/components/BottomBar/BottomBar.d.ts +3 -2
  35. package/dist/types/components/BottomBar/BottomBar.d.ts.map +1 -1
  36. package/dist/types/components/ChatComposer/ChatComposer.d.ts +50 -18
  37. package/dist/types/components/ChatComposer/ChatComposer.d.ts.map +1 -1
  38. package/dist/types/components/ChatComposer/index.d.ts +1 -0
  39. package/dist/types/components/ChatComposer/index.d.ts.map +1 -1
  40. package/package.json +1 -1
  41. package/tokens/t4-components/bottombar.json +11 -5
@@ -17,8 +17,8 @@ export interface BottomBarTabProps {
17
17
  */
18
18
  export declare const BottomBarTab: React.FC<BottomBarTabProps>;
19
19
  export interface BottomBarProps {
20
- /** Bar variant — "actions" for horizontal buttons, "actions-vertical" for stacked buttons, "navigation" for tab items */
21
- variant: 'actions' | 'actions-vertical' | 'navigation';
20
+ /** Bar variant — "actions" for horizontal buttons, "actions-vertical" for stacked buttons, "navigation" for tab items, "chat" to house a ChatComposer */
21
+ variant: 'actions' | 'actions-vertical' | 'navigation' | 'chat';
22
22
  /** Button size — only applies to "actions" and "actions-vertical" variants */
23
23
  size?: 'sm' | 'lg';
24
24
  /** Floating style — elevated card with rounded corners */
@@ -51,6 +51,7 @@ export interface BottomBarProps {
51
51
  * **Variants:**
52
52
  * - `actions`: Renders children as a row of action buttons.
53
53
  * - `navigation`: Renders BottomBarTab children as a tab bar.
54
+ * - `chat`: Houses a ChatComposer, capped at `container.max-width.lg` and centered.
54
55
  *
55
56
  * **Floating:** When `floating={true}`, the bar becomes a floating card
56
57
  * with rounded corners, padding, and shadow — used in "top level" views.
@@ -1 +1 @@
1
- {"version":3,"file":"BottomBar.d.ts","sourceRoot":"","sources":["../../../../components/BottomBar/BottomBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,iBAAiB,CAAC;AAI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I,EAAE,KAAK,CAAC,SAAS,CAAC;IAEtB,gFAAgF;IAChF,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE7B,gBAAgB;IAChB,KAAK,EAAE,MAAM,CAAC;IAEd,2CAA2C;IAC3C,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2BpD,CAAC;AAIF,MAAM,WAAW,cAAc;IAC7B,yJAAyJ;IACzJ,OAAO,EAAE,SAAS,GAAG,kBAAkB,GAAG,YAAY,GAAG,MAAM,CAAC;IAEhE,8EAA8E;IAC9E,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAEnB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAEjC,wFAAwF;IACxF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAgC9C,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { type IconName } from '../Icon';
2
3
  import './ChatComposer.css';
3
4
  export interface ChatComposerProps {
4
5
  /** Current text value (controlled) */
@@ -10,30 +11,58 @@ export interface ChatComposerProps {
10
11
  /** Placeholder. Default: 'Reply...' */
11
12
  placeholder?: string;
12
13
  /**
13
- * Slot above the input, e.g. for `ChatAttachmentChip`s the user has staged.
14
+ * Called when the leading button is pressed (attach / add). While `recording`
15
+ * the leading button becomes a discard control and calls `onRecordDiscard`
16
+ * instead.
14
17
  */
15
- attachments?: React.ReactNode;
18
+ onLeadingClick?: () => void;
19
+ /** Leading button icon (RemixIcon base name). Default: 'add' */
20
+ leadingIcon?: IconName;
21
+ /** Leading button aria-label. Default: 'Add attachment' */
22
+ leadingLabel?: string;
23
+ /** Called when the in-field emoji button is pressed */
24
+ onEmoji?: () => void;
25
+ /** Show the in-field emoji button. Default: true */
26
+ showEmoji?: boolean;
27
+ /** Emoji button aria-label. Default: 'Add emoji' */
28
+ emojiLabel?: string;
29
+ /**
30
+ * Called when the mic button is pressed. The mic button only appears when the
31
+ * field is empty and this handler is provided; otherwise a send button shows.
32
+ */
33
+ onRecordStart?: () => void;
34
+ /** Mic button aria-label. Default: 'Record voice message' */
35
+ micLabel?: string;
36
+ /** Send button aria-label. Default: 'Send message' */
37
+ sendLabel?: string;
38
+ /** When true, the composer switches to the voice-recording layout */
39
+ recording?: boolean;
16
40
  /**
17
- * Slot below the input on the leading side, e.g. attach / camera buttons.
41
+ * Content of the recording bar (e.g. a timer + waveform). Rendered inside the
42
+ * bordered card. The app owns recording state and this visualization.
18
43
  */
19
- leading?: React.ReactNode;
44
+ recordingSlot?: React.ReactNode;
45
+ /** Called when the pause button is pressed (recording only) */
46
+ onRecordPause?: () => void;
47
+ /** Called when the discard (leading) button is pressed while recording */
48
+ onRecordDiscard?: () => void;
49
+ /** Pause button aria-label. Default: 'Pause recording' */
50
+ pauseLabel?: string;
51
+ /** Discard button aria-label. Default: 'Discard recording' */
52
+ discardLabel?: string;
20
53
  /**
21
- * Override the default send button. If provided, replaces the send button entirely.
54
+ * Staged attachments, typically `Thumbnail` tiles. Rendered in a horizontal
55
+ * scroll strip above the input row.
22
56
  */
23
- trailing?: React.ReactNode;
24
- /** When true, shows a Spinner in place of the send button */
57
+ attachments?: React.ReactNode;
58
+ /** Overflow (scroll) button aria-label. Default: 'Show more attachments' */
59
+ attachmentsOverflowLabel?: string;
60
+ /** When true, shows a Spinner in place of the send button icon */
25
61
  loading?: boolean;
26
62
  /** Disabled state */
27
63
  disabled?: boolean;
28
- /**
29
- * Hide the built-in send button (useful when you want a custom submit affordance
30
- * via `trailing`, or want submit-on-enter only).
31
- */
32
- hideSendButton?: boolean;
33
- /** Send button aria-label. Default: 'Send message' */
34
- sendLabel?: string;
35
- /** Maximum height (px) before the textarea scrolls. Default: 160 */
36
- maxHeight?: number;
64
+ /** Maximum number of text lines before the textarea scrolls. Default: 10 */
65
+ maxLines?: number;
37
66
  /** Auto-focus on mount */
38
67
  autoFocus?: boolean;
39
68
  /** Additional CSS classes */
@@ -42,8 +71,11 @@ export interface ChatComposerProps {
42
71
  /**
43
72
  * ChatComposer — input affordance for chat conversations.
44
73
  *
45
- * Auto-growing textarea with a send button. Submits on Enter (Shift+Enter for
46
- * newline). Designed to live in a `BottomBar`.
74
+ * A horizontal row of `[leading button] · [input field] · [trailing button]`.
75
+ * The trailing button toggles between a mic (empty field) and a send button
76
+ * (text entered). Supports a voice-recording layout and a staged-attachments
77
+ * strip. Submits on Enter (Shift+Enter for a newline). Designed to live in a
78
+ * `BottomBar`.
47
79
  */
48
80
  export declare const ChatComposer: React.ForwardRefExoticComponent<ChatComposerProps & React.RefAttributes<HTMLTextAreaElement>>;
49
81
  export default ChatComposer;
@@ -1 +1 @@
1
- {"version":3,"file":"ChatComposer.d.ts","sourceRoot":"","sources":["../../../../components/ChatComposer/ChatComposer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAKN,MAAM,OAAO,CAAC;AAGf,OAAO,oBAAoB,CAAC;AAE5B,MAAM,WAAW,iBAAiB;IAChC,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IAEd,qBAAqB;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAElC,sEAAsE;IACtE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,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AC;AAIF,eAAe,YAAY,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export { ChatComposer, type ChatComposerProps } from './ChatComposer';
2
+ export { default } from './ChatComposer';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/ChatComposer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/ChatComposer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revikornmann/muka-ui",
3
- "version": "0.9.2",
3
+ "version": "0.11.0",
4
4
  "description": "Muka Design System - Multi-brand design tokens and React components",
5
5
  "main": "dist/cjs/components/index.js",
6
6
  "module": "dist/esm/components/index.js",
@@ -55,17 +55,23 @@
55
55
  },
56
56
  "backdrop-end": {
57
57
  "$type": "color",
58
- "$value": "{color.black-alpha.5}"
59
- },
60
- "backdrop-blur": {
61
- "$type": "dimension",
62
- "$value": "2px"
58
+ "$value": "{color.black-alpha.2}"
63
59
  },
64
60
  "padding-top": {
65
61
  "$type": "dimension",
66
62
  "$value": "{spacing.8}"
67
63
  }
68
64
  },
65
+ "chat": {
66
+ "max-width": {
67
+ "$type": "sizing",
68
+ "$value": "{container.max-width.lg}"
69
+ },
70
+ "padding": {
71
+ "$type": "dimension",
72
+ "$value": "{spacing.3}"
73
+ }
74
+ },
69
75
  "tab": {
70
76
  "icon-size": {
71
77
  "$type": "dimension",