@flamingo-stack/openframe-frontend-core 0.0.812 → 0.0.814

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 (144) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/case-study-card-NLT2JVI7.cjs +23 -0
  3. package/dist/{chunk-5QLDHPPU.cjs → chunk-25HBH4J6.cjs} +15 -15
  4. package/dist/{chunk-WFJDKP2Q.cjs → chunk-2H7XPKKT.cjs} +37 -37
  5. package/dist/{chunk-LKQ33CMY.cjs → chunk-2XCORRJV.cjs} +3 -3
  6. package/dist/{chunk-JTIGKLKJ.cjs → chunk-2XLPRW7V.cjs} +23 -23
  7. package/dist/{chunk-4WIJI4AK.cjs → chunk-3TOWCFIK.cjs} +20 -26
  8. package/dist/{chunk-KUXHXLJQ.cjs → chunk-3V5JWG27.cjs} +5 -5
  9. package/dist/{chunk-CUDJP7R7.cjs → chunk-467T3LCG.cjs} +63 -63
  10. package/dist/{chunk-COTJLBOS.cjs → chunk-4PMD3JUC.cjs} +19 -19
  11. package/dist/{chunk-YR74H7Z3.cjs → chunk-5SZ4ILU3.cjs} +7 -7
  12. package/dist/{chunk-7JWFMAQB.cjs → chunk-63A4GZMB.cjs} +18 -2
  13. package/dist/{chunk-ZD6SZLO2.cjs → chunk-6CZVQ72C.cjs} +3 -3
  14. package/dist/{chunk-PQ76VC2P.cjs → chunk-7ERD34HQ.cjs} +1073 -825
  15. package/dist/{chunk-VEN6MGNX.cjs → chunk-7O7EX7HQ.cjs} +45 -45
  16. package/dist/{chunk-FCFLZPID.cjs → chunk-AYMKG55T.cjs} +51 -51
  17. package/dist/{chunk-U2MHQBL4.cjs → chunk-BOS7OIC4.cjs} +30 -30
  18. package/dist/{chunk-NEDFRRLM.cjs → chunk-CVPHODOE.cjs} +171 -171
  19. package/dist/{chunk-JMRO7CK2.cjs → chunk-D23VVC3K.cjs} +45 -45
  20. package/dist/{chunk-D2EPUQ35.cjs → chunk-E5VF3IXO.cjs} +4 -4
  21. package/dist/{chunk-SFUNXMY3.cjs → chunk-EHANO6UE.cjs} +16 -16
  22. package/dist/{chunk-4ZTGCCNI.cjs → chunk-F4ZJRMMM.cjs} +20 -20
  23. package/dist/{chunk-AHBTZ7DN.cjs → chunk-FCZAUK4D.cjs} +52 -50
  24. package/dist/{chunk-RSLLS6C4.cjs → chunk-G2B6EA4J.cjs} +62 -62
  25. package/dist/{chunk-XB7VPJNY.cjs → chunk-G5CCYMCU.cjs} +3 -3
  26. package/dist/{chunk-VT2ACO3Z.cjs → chunk-GAR2IIU6.cjs} +349 -349
  27. package/dist/{chunk-743MM5B6.cjs → chunk-HM7VCQSX.cjs} +10 -10
  28. package/dist/{chunk-DA2TWDGJ.cjs → chunk-IBYT5I7K.cjs} +13 -13
  29. package/dist/{chunk-D322VUSH.cjs → chunk-IDEOLXY6.cjs} +2050 -2078
  30. package/dist/{chunk-VYLBW6ZV.cjs → chunk-IJCSQFLD.cjs} +209 -209
  31. package/dist/{chunk-XZKYU57A.cjs → chunk-IKB6AZPV.cjs} +8 -8
  32. package/dist/{chunk-VPYGK4AV.cjs → chunk-ILV243HM.cjs} +31 -31
  33. package/dist/{chunk-TS4PKCG3.cjs → chunk-JOKOQOLJ.cjs} +22 -22
  34. package/dist/{chunk-TCMUVY3M.cjs → chunk-KINBPFAC.cjs} +199 -199
  35. package/dist/{chunk-2IZHRVKD.cjs → chunk-KNGULKOU.cjs} +46 -46
  36. package/dist/{chunk-JMAKYJ3Q.cjs → chunk-LUR2ED43.cjs} +6 -6
  37. package/dist/{chunk-EPMAMFQE.cjs → chunk-M6VLEXN3.cjs} +119 -119
  38. package/dist/{chunk-GD47ZGOU.cjs → chunk-N3MBQRCQ.cjs} +3 -3
  39. package/dist/{chunk-ZFUNSXSH.cjs → chunk-NONMZ5WJ.cjs} +5 -5
  40. package/dist/{chunk-E64HJMY6.cjs → chunk-OBQ5WUNG.cjs} +67 -67
  41. package/dist/{chunk-6LZ4BI7Z.cjs → chunk-PAI4A3UM.cjs} +60 -60
  42. package/dist/{chunk-4IU462LR.cjs → chunk-QDDBOCG3.cjs} +2 -2
  43. package/dist/{chunk-5DBW6ERF.cjs → chunk-QOAA7ZHB.cjs} +2 -2
  44. package/dist/{chunk-7Q2PFKU3.cjs → chunk-QQT23JJ7.cjs} +4 -4
  45. package/dist/{chunk-4SZKJPQJ.cjs → chunk-RD66AGUI.cjs} +6 -6
  46. package/dist/{chunk-NL3G642U.cjs → chunk-S3QXLD4X.cjs} +10 -10
  47. package/dist/{chunk-7RM4NM2C.cjs → chunk-SWF6TNZ3.cjs} +14 -14
  48. package/dist/{chunk-P4B6PVSG.cjs → chunk-USUVHAQ7.cjs} +7 -7
  49. package/dist/{chunk-K7IX2NAG.cjs → chunk-UTRRECPV.cjs} +110 -110
  50. package/dist/{chunk-7HNZHENA.cjs → chunk-WJPEDREU.cjs} +13 -13
  51. package/dist/{chunk-SC3I3YWM.cjs → chunk-Y6MJMPHV.cjs} +126 -126
  52. package/dist/{chunk-OKI5KSUV.cjs → chunk-ZNZ6453J.cjs} +44 -44
  53. package/dist/{chunk-7TBXHZLB.cjs → chunk-ZRDVFADQ.cjs} +61 -61
  54. package/dist/{cloud-tenants-CW3I7AIM.cjs → cloud-tenants-JSH6AQMZ.cjs} +32 -32
  55. package/dist/components/calendar.cjs +10 -10
  56. package/dist/components/case-studies/index.cjs +52 -52
  57. package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
  58. package/dist/components/chat/chat-message-enhanced.js +8 -1
  59. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  60. package/dist/components/chat/embeddable-chat.js +34 -2
  61. package/dist/components/chat/entity-cards/chat-card-disclosure.d.ts +93 -0
  62. package/dist/components/chat/entity-cards/chat-card-disclosure.d.ts.map +1 -0
  63. package/dist/components/chat/entity-cards/chat-card-disclosure.js +126 -0
  64. package/dist/components/chat/entity-cards/dispatch.d.ts +5 -0
  65. package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
  66. package/dist/components/chat/entity-cards/dispatch.js +82 -55
  67. package/dist/components/chat/entity-cards/index.d.ts +1 -0
  68. package/dist/components/chat/entity-cards/index.d.ts.map +1 -1
  69. package/dist/components/chat/entity-cards/index.js +14 -0
  70. package/dist/components/chat/index.cjs +42 -26
  71. package/dist/components/chat/index.d.ts +1 -0
  72. package/dist/components/chat/index.d.ts.map +1 -1
  73. package/dist/components/chat/index.js +3 -0
  74. package/dist/components/chat/inline-app-link-chip.d.ts +35 -0
  75. package/dist/components/chat/inline-app-link-chip.d.ts.map +1 -0
  76. package/dist/components/chat/inline-app-link-chip.js +37 -0
  77. package/dist/components/chat/source-action-button.d.ts +15 -1
  78. package/dist/components/chat/source-action-button.d.ts.map +1 -1
  79. package/dist/components/chat/source-action-button.js +40 -2
  80. package/dist/components/contact/index.cjs +33 -33
  81. package/dist/components/docs/index.cjs +36 -36
  82. package/dist/components/embeds/index.cjs +33 -33
  83. package/dist/components/faq/index.cjs +34 -34
  84. package/dist/components/features/index.cjs +32 -32
  85. package/dist/components/features/scripts/schedule-form/schedule-script-picker-card.d.ts.map +1 -1
  86. package/dist/components/features/scripts/schedule-form/schedule-script-picker-card.js +4 -2
  87. package/dist/components/features/select-button.js +1 -1
  88. package/dist/components/help-center-pages/index.cjs +165 -165
  89. package/dist/components/index.cjs +238 -220
  90. package/dist/components/meeting-scheduler/index.cjs +196 -196
  91. package/dist/components/navigation/index.cjs +35 -35
  92. package/dist/components/onboarding-guides/index.cjs +35 -35
  93. package/dist/components/platform/ScriptArguments.d.ts +2 -0
  94. package/dist/components/platform/ScriptArguments.d.ts.map +1 -1
  95. package/dist/components/platform/ScriptArguments.js +3 -2
  96. package/dist/components/product-demo/index.cjs +45 -45
  97. package/dist/components/related-content/index.cjs +17 -17
  98. package/dist/components/tickets/index.cjs +39 -39
  99. package/dist/components/ui/button/button-styles.d.ts +8 -0
  100. package/dist/components/ui/button/button-styles.d.ts.map +1 -1
  101. package/dist/components/ui/button/button-styles.js +8 -1
  102. package/dist/components/ui/button/button.d.ts.map +1 -1
  103. package/dist/components/ui/button/button.js +6 -4
  104. package/dist/components/ui/button/split-button.d.ts.map +1 -1
  105. package/dist/components/ui/button/split-button.js +3 -2
  106. package/dist/components/ui/checkbox-block.d.ts.map +1 -1
  107. package/dist/components/ui/checkbox-block.js +3 -1
  108. package/dist/components/ui/file-manager/index.cjs +55 -55
  109. package/dist/components/ui/index.cjs +52 -34
  110. package/dist/components/ui/input-styles.d.ts +2 -0
  111. package/dist/components/ui/input-styles.d.ts.map +1 -1
  112. package/dist/components/ui/input-styles.js +2 -0
  113. package/dist/{devices-KKRAB4Q2.cjs → devices-OCEOO6OW.cjs} +33 -33
  114. package/dist/embed-shims/index.cjs +4 -4
  115. package/dist/embed-shims/next-image.cjs +4 -4
  116. package/dist/{embeddable-chat-5UO66U4F.cjs → embeddable-chat-YRKMPFDY.cjs} +150 -117
  117. package/dist/hooks/index.cjs +10 -10
  118. package/dist/index.cjs +68 -50
  119. package/dist/{knowledge-Z2PTGBA3.cjs → knowledge-3GEE4LPY.cjs} +33 -33
  120. package/dist/{logs-6T5VK2TY.cjs → logs-7GGUZSDB.cjs} +41 -41
  121. package/dist/{policies-JPIC5YDE.cjs → policies-S74WTNL4.cjs} +36 -36
  122. package/dist/{remote-session-VBVUMIUP.cjs → remote-session-BQMTIQTU.cjs} +17 -17
  123. package/dist/{scripts-BSYJJFBQ.cjs → scripts-G4QAT4NZ.cjs} +39 -39
  124. package/dist/{software-update-KVEYYORC.cjs → software-update-IYHJABLP.cjs} +36 -36
  125. package/dist/{tickets-board-YRZ54JJS.cjs → tickets-board-TRXOX77R.cjs} +17 -17
  126. package/dist/{video-file-player-4QMVTOBE.cjs → video-file-player-IAMWBKEQ.cjs} +14 -14
  127. package/package.json +1 -1
  128. package/src/components/chat/chat-message-enhanced.tsx +24 -1
  129. package/src/components/chat/embeddable-chat.tsx +61 -1
  130. package/src/components/chat/entity-cards/chat-card-disclosure.tsx +233 -0
  131. package/src/components/chat/entity-cards/dispatch.tsx +104 -63
  132. package/src/components/chat/entity-cards/index.ts +9 -0
  133. package/src/components/chat/index.ts +1 -0
  134. package/src/components/chat/inline-app-link-chip.tsx +79 -0
  135. package/src/components/chat/source-action-button.tsx +53 -2
  136. package/src/components/features/scripts/schedule-form/schedule-script-picker-card.tsx +4 -2
  137. package/src/components/features/select-button.tsx +1 -1
  138. package/src/components/platform/ScriptArguments.tsx +8 -1
  139. package/src/components/ui/button/button-styles.ts +18 -1
  140. package/src/components/ui/button/button.tsx +7 -4
  141. package/src/components/ui/button/split-button.tsx +3 -2
  142. package/src/components/ui/checkbox-block.tsx +3 -1
  143. package/src/components/ui/input-styles.ts +2 -0
  144. package/dist/case-study-card-3XLKCGLV.cjs +0 -23
@@ -0,0 +1,79 @@
1
+ 'use client';
2
+
3
+ /**
4
+ * An inline box in the answer's text: the skin every chip a reader can click inside a chat sentence wears. The
5
+ * host's entity mentions (`@device:<id>`, drawn by its `renderMention`) and the links the answer makes to a screen of
6
+ * the app (`[Devices → Add Device](/devices/new)`) both use it, so a link to a place in the app reads as one at a
7
+ * glance (CU-17tkuw61kfy: drawn as a plain link, it was the colour of the text around it).
8
+ *
9
+ * ONE component draws the box, `InlineChip`: the lib's `Tag` badge, rendered as a `<span>` (the chip sits inside
10
+ * markdown's `<p>`, where a `<div>` is invalid), with the inline skin below. A host's chip (the frontend's
11
+ * `MentionTag`, both its segments) draws `InlineChip` too, and adds only its own behaviour (link, new-tab segment).
12
+ */
13
+
14
+ import type React from 'react';
15
+ import Link from '../../embed-shims/next-link';
16
+ import { cn } from '../../utils/cn';
17
+ import { BrowserWindowIcon } from '../icons-v2-generated/coding/browser-window-icon';
18
+ import { Tag } from '../ui/tag';
19
+
20
+ /**
21
+ * On top of `Tag`'s badge skin, for a chip in a line of text:
22
+ * - `align-middle`: centred on the text line;
23
+ * - `hover:border-ods-border`: no accent border on hover (the badge's default);
24
+ * - `[&_svg]:size-4` and `[&_svg]:text-ods-text-secondary`: a 16px muted lead icon, the label in the primary colour.
25
+ */
26
+ const INLINE_CHIP_CLASS =
27
+ 'max-w-[16rem] align-middle [&_svg]:size-4 [&_svg]:text-ods-text-secondary hover:border-ods-border';
28
+
29
+ /**
30
+ * The inline box: an icon and a label in a chat sentence. `className` adds to the skin (a segment's square corner, a
31
+ * hover fill); `loading` draws `Tag`'s own skeleton in the same box.
32
+ */
33
+ export function InlineChip({
34
+ icon,
35
+ label,
36
+ className,
37
+ loading,
38
+ }: {
39
+ icon?: React.ReactNode;
40
+ label: React.ReactNode;
41
+ className?: string;
42
+ loading?: boolean;
43
+ }): React.ReactElement {
44
+ return (
45
+ <Tag
46
+ as="span"
47
+ variant="badge"
48
+ icon={icon}
49
+ label={label}
50
+ loading={loading}
51
+ className={cn(INLINE_CHIP_CLASS, className)}
52
+ />
53
+ );
54
+ }
55
+
56
+ /**
57
+ * A link that stays in this app (the runtime's `computeIsNewTab` keeps it in this window), drawn as an inline box. `anchor` is the host's link element (its
58
+ * `NavLinkAnchor`, so the click follows the host's routing rule), else the lib's boxed `Link`.
59
+ */
60
+ export function InlineAppLinkChip({
61
+ href,
62
+ children,
63
+ anchor: Anchor,
64
+ }: {
65
+ href: string;
66
+ children: React.ReactNode;
67
+ anchor?: React.ComponentType<{ href: string; className?: string; children?: React.ReactNode }>;
68
+ }): React.ReactElement {
69
+ const chip = <InlineChip icon={<BrowserWindowIcon />} label={children} className="hover:bg-ods-bg-hover" />;
70
+ return Anchor ? (
71
+ <Anchor href={href} className="no-underline">
72
+ {chip}
73
+ </Anchor>
74
+ ) : (
75
+ <Link href={href} className="no-underline">
76
+ {chip}
77
+ </Link>
78
+ );
79
+ }
@@ -20,7 +20,10 @@
20
20
 
21
21
  import { MessageSquare, FileText } from 'lucide-react';
22
22
  import type React from 'react';
23
+ import { cn } from '../../utils/cn';
23
24
  import { Button } from '../ui/button';
25
+ import { TextHold } from '../ui/layout-hold';
26
+ import { SKELETON_SURFACE_CLASS } from '../ui/skeleton-surface';
24
27
  import type { ChatRef } from './chat-ref.types';
25
28
 
26
29
  export type SourceActionDensity = 'inline' | 'card' | 'list-row';
@@ -41,8 +44,14 @@ export interface SourceActionButtonProps {
41
44
  * the icon only — the label is used for aria-label / title even when
42
45
  * it doesn't render visibly. */
43
46
  label?: string;
47
+ /** Draw the action's loading form: the same box, its icon and label as skeleton bars. */
48
+ loading?: boolean;
44
49
  }
45
50
 
51
+ /** A chat card's footer action (Ask, Display, Watch video): one look for every action in that row. */
52
+ export const CARD_FOOTER_ACTION_CLASS =
53
+ '!h-auto !p-0 text-h6 font-normal text-ods-text-secondary opacity-60 hover:bg-transparent hover:opacity-100 hover:text-ods-text-primary';
54
+
46
55
  // Per-density styling lives in one map so the three call sites share the
47
56
  // SAME hover/opacity/transition rules. Adding a fourth density means
48
57
  // adding one entry here, not touching the render path.
@@ -66,8 +75,7 @@ const DENSITY_STYLES: Record<
66
75
  size: 'small',
67
76
  showLabel: true,
68
77
  iconSize: '!h-3 !w-3',
69
- className:
70
- '!h-auto !p-0 text-h6 font-normal text-ods-text-secondary opacity-60 hover:bg-transparent hover:opacity-100 hover:text-ods-text-primary',
78
+ className: CARD_FOOTER_ACTION_CLASS,
71
79
  },
72
80
  'list-row': {
73
81
  size: 'small',
@@ -78,14 +86,57 @@ const DENSITY_STYLES: Record<
78
86
  },
79
87
  };
80
88
 
89
+ /**
90
+ * A footer action's loading form: the real button, inert and unread, with its icon and label drawn as skeleton
91
+ * bars, so the box is exactly the loaded action's (same paddings, same line height, same label width).
92
+ */
93
+ export function FooterActionSkeleton({
94
+ label,
95
+ className,
96
+ showLabel = true,
97
+ size = 'small',
98
+ }: {
99
+ label: string;
100
+ className: string;
101
+ showLabel?: boolean;
102
+ size?: 'small' | 'icon';
103
+ }): React.ReactElement {
104
+ const icon = <span className={cn(SKELETON_SURFACE_CLASS, 'inline-block h-3 w-3 rounded-sm')} />;
105
+ return (
106
+ <span aria-hidden inert className="contents">
107
+ <Button
108
+ variant="transparent"
109
+ size={size}
110
+ tabIndex={-1}
111
+ leftIcon={showLabel ? icon : undefined}
112
+ className={cn(className, 'pointer-events-none')}
113
+ >
114
+ {showLabel ? <TextHold>{label}</TextHold> : icon}
115
+ </Button>
116
+ </span>
117
+ );
118
+ }
119
+
81
120
  export function SourceActionButton({
82
121
  chatRef,
83
122
  onDiscuss,
84
123
  density = 'inline',
85
124
  className,
86
125
  label = 'Ask',
126
+ loading,
87
127
  }: SourceActionButtonProps): React.ReactElement | null {
88
128
  if (!chatRef || !onDiscuss) return null;
129
+ if (loading) {
130
+ const s = DENSITY_STYLES[density];
131
+ return (
132
+ <FooterActionSkeleton
133
+ label={label}
134
+ size={s.size}
135
+ showLabel={s.showLabel}
136
+ className={`${s.className}${className ? ` ${className}` : ''}`}
137
+ />
138
+ );
139
+ }
89
140
 
90
141
  // Label-driven icon. "Display" reads as a verbatim-content action so a
91
142
  // FileText icon reinforces "show me the body" semantics; the default
@@ -279,7 +279,7 @@ export function ScheduleScriptPickerCard({
279
279
  </Accordion>
280
280
  ) : (
281
281
  <div className="flex flex-col items-start gap-[var(--spacing-system-lf)] content-md:flex-row">
282
- <div className="w-full min-w-0 flex-1 [&_label]:text-h4">
282
+ <div className="w-full min-w-0 flex-1">
283
283
  <Controller
284
284
  name={`scripts.${index}.args`}
285
285
  control={control}
@@ -291,12 +291,13 @@ export function ScheduleScriptPickerCard({
291
291
  valuePlaceholder="Enter Value (empty=flag)"
292
292
  addButtonLabel="Add Script Argument"
293
293
  titleLabel="Script Arguments"
294
+ labelVariant="large"
294
295
  disabled={runParamsLocked}
295
296
  />
296
297
  )}
297
298
  />
298
299
  </div>
299
- <div className="w-full min-w-0 flex-1 [&_label]:text-h4">
300
+ <div className="w-full min-w-0 flex-1">
300
301
  <Controller
301
302
  name={`scripts.${index}.envVars`}
302
303
  control={control}
@@ -309,6 +310,7 @@ export function ScheduleScriptPickerCard({
309
310
  addButtonLabel="Add Environment Var"
310
311
  addSecretButtonLabel="Add Secret"
311
312
  titleLabel="Environment Vars"
313
+ labelVariant="large"
312
314
  disabled={runParamsLocked}
313
315
  />
314
316
  )}
@@ -51,7 +51,7 @@ export const SelectButton = React.forwardRef<HTMLButtonElement, SelectButtonProp
51
51
  aria-selected={selected}
52
52
  disabled={disabled}
53
53
  onClick={onClick}
54
- className={cn('content-md:h-16', className)}
54
+ className={className}
55
55
  >
56
56
  {icon && (
57
57
  <span
@@ -75,6 +75,8 @@ export interface ScriptArgumentsProps {
75
75
  className?: string;
76
76
  /** Label for the title input */
77
77
  titleLabel: string;
78
+ /** The title's scale, as `FieldWrapper`'s: 'large' (`text-h4`) beside fields titled at the body scale */
79
+ labelVariant?: 'default' | 'large';
78
80
  }
79
81
 
80
82
  /**
@@ -101,6 +103,7 @@ export const ScriptArguments: React.FC<ScriptArgumentsProps> = ({
101
103
  disabled = false,
102
104
  className,
103
105
  titleLabel,
106
+ labelVariant = 'default',
104
107
  }) => {
105
108
  const handleKeyChange = (id: string, newKey: string) => {
106
109
  if (!onArgumentsChange) return;
@@ -145,7 +148,11 @@ export const ScriptArguments: React.FC<ScriptArgumentsProps> = ({
145
148
  <div key={arg.id} className="flex w-full items-end gap-2">
146
149
  {/* Key input - with label only on first row */}
147
150
  <div className="flex min-w-0 flex-1 flex-col gap-1">
148
- {isFirstRow(index) && <Label spacing="tight">{titleLabel}</Label>}
151
+ {isFirstRow(index) && (
152
+ <Label variant={labelVariant} spacing="tight">
153
+ {titleLabel}
154
+ </Label>
155
+ )}
149
156
  <Input
150
157
  value={arg.key}
151
158
  onChange={e => handleKeyChange(arg.id, e.target.value)}
@@ -1,6 +1,22 @@
1
1
  // Shared style atoms for `Button` and `SplitButton`. Extracted to keep a single
2
2
  // source of truth for surface colors, outline borders, and split-divider colors.
3
3
 
4
+ import { INPUT_HEIGHT_CLASS, INPUT_RADIUS_CLASS } from '../input-styles';
5
+
6
+ /**
7
+ * The slot that holds a LABELLED button's leading / trailing icon. On an outline button the icon is the secondary tone
8
+ * beside the primary label (the disabled tone while the button is disabled), as every outline action draws it; on the
9
+ * other surfaces it takes the label's colour. The slot only sets the colour a `currentColor` glyph inherits: an icon
10
+ * that names its own colour (a class or `color` on the icon) keeps it. An icon-only button's glyph is its content and
11
+ * keeps the button's text colour, so it does not take this slot's tone.
12
+ */
13
+ export function buttonIconSlotClass(variant: string | null | undefined, disabled?: boolean): string {
14
+ if (variant !== 'outline') return 'inline-flex items-center';
15
+ return disabled
16
+ ? 'inline-flex items-center text-ods-text-disabled'
17
+ : 'inline-flex items-center text-ods-text-secondary';
18
+ }
19
+
4
20
  // Each variant pairs `disabled:` (real `<button disabled>`) with `aria-disabled:`
5
21
  // (used for `<Link aria-disabled>` since anchors don't support `:disabled`).
6
22
  export const buttonSurfaceClasses = {
@@ -195,7 +211,8 @@ export const BUTTON_KIND_CLASS = {
195
211
  // and states, the value on the left.
196
212
  field: [
197
213
  'flex w-full items-center gap-[var(--spacing-system-xsf)] border px-[var(--spacing-system-sf)] text-left',
198
- 'h-11 rounded-[6px] md:h-12',
214
+ INPUT_HEIGHT_CLASS,
215
+ INPUT_RADIUS_CLASS,
199
216
  'border-ods-border bg-ods-card text-ods-text-primary text-h4 transition-colors duration-200',
200
217
  'enabled:hover:border-ods-border-hover enabled:hover:bg-ods-bg-hover enabled:active:border-ods-border-active enabled:active:bg-ods-bg-active',
201
218
  // Open: the accent border, held under the cursor (a hover must not read as closing it).
@@ -10,6 +10,7 @@ import {
10
10
  BUTTON_KIND_CLASS,
11
11
  BUTTON_SIZE_CLASS,
12
12
  type ButtonKind,
13
+ buttonIconSlotClass,
13
14
  buttonSurfaceClasses,
14
15
  outlineBorderClasses,
15
16
  splitDividerColorClasses,
@@ -297,6 +298,8 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function ButtonI
297
298
  ) {
298
299
  const isDisabled = disabled || loading;
299
300
  const kind = variant && variant in BUTTON_KIND_CLASS ? (variant as ButtonKind) : null;
301
+ // Beside a label the icon takes the surface's icon tone; without one it is the content and keeps the text colour.
302
+ const labelIconClass = buttonIconSlotClass(children ? variant : null, isDisabled);
300
303
 
301
304
  // splitIcon is only supported for default/small sizes. With other sizes
302
305
  // (icon, small-legacy) we silently fall back to the normal layout.
@@ -313,9 +316,9 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function ButtonI
313
316
  <>
314
317
  <span className={cn('contents', loading && 'invisible')}>
315
318
  <span className={mainSlotClass}>
316
- {leftIcon && <span className="inline-flex items-center">{leftIcon}</span>}
319
+ {leftIcon && <span className={labelIconClass}>{leftIcon}</span>}
317
320
  {children}
318
- {rightIcon && <span className="inline-flex items-center">{rightIcon}</span>}
321
+ {rightIcon && <span className={labelIconClass}>{rightIcon}</span>}
319
322
  </span>
320
323
  <span aria-hidden="true" className={iconSlotClass}>
321
324
  {splitIcon}
@@ -422,9 +425,9 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function ButtonI
422
425
  const content = (
423
426
  <>
424
427
  <span className={cn('contents', loading && 'invisible')}>
425
- {leftIcon && <span className="inline-flex items-center">{leftIcon}</span>}
428
+ {leftIcon && <span className={labelIconClass}>{leftIcon}</span>}
426
429
  {children}
427
- {rightIcon && <span className="inline-flex items-center">{rightIcon}</span>}
430
+ {rightIcon && <span className={labelIconClass}>{rightIcon}</span>}
428
431
  </span>
429
432
  {loading && (
430
433
  <span className="absolute inset-0 inline-flex items-center justify-center text-ods-text-primary">
@@ -3,6 +3,7 @@
3
3
  import React from 'react';
4
4
  import { cn } from '../../../utils/cn';
5
5
  import { Button } from './button';
6
+ import { buttonIconSlotClass } from './button-styles';
6
7
 
7
8
  // Two independent interactive halves, each the lib's `Button` (a `<button>`, or a link with `href`) attached to the
8
9
  // other (`attach="start"` / `"end"`): one surface with a seam. For a single-target variant (decorative trailing icon),
@@ -148,9 +149,9 @@ const SplitButton = React.forwardRef<HTMLDivElement, SplitButtonProps>(function
148
149
  type={type}
149
150
  ariaLabel={ariaLabel}
150
151
  >
151
- {leftIcon && <span className="inline-flex items-center">{leftIcon}</span>}
152
+ {leftIcon && <span className={buttonIconSlotClass(variant, disabled || mainDisabled)}>{leftIcon}</span>}
152
153
  <span>{children}</span>
153
- {rightIcon && <span className="inline-flex items-center">{rightIcon}</span>}
154
+ {rightIcon && <span className={buttonIconSlotClass(variant, disabled || mainDisabled)}>{rightIcon}</span>}
154
155
  </Half>
155
156
  <Half
156
157
  variant={variant}
@@ -5,6 +5,7 @@ import { type ComponentRef, type ReactNode, forwardRef } from 'react';
5
5
  import { cn } from '../../utils/cn';
6
6
  import { TextLineSkeleton } from '../loading/unified-skeleton';
7
7
  import { Checkbox } from './checkbox';
8
+ import { INPUT_MIN_HEIGHT_CLASS } from './input-styles';
8
9
  import { Label } from './label';
9
10
  import { loadingItemProps, useLoadingScope } from './loading-scope';
10
11
  import { RequiredMark } from './required-mark';
@@ -85,7 +86,8 @@ const CheckboxBlock = forwardRef<ComponentRef<typeof CheckboxPrimitive.Root>, Ch
85
86
  // Trailing content stacks full-width below the text on mobile.
86
87
  trailing && 'flex-wrap content-md:flex-nowrap',
87
88
  'p-[var(--spacing-system-sf)]',
88
- !description && 'min-h-[44px] content-md:min-h-[48px]',
89
+ // A field's height: the block sits in rows of inputs and choice buttons (`SelectButton`).
90
+ !description && INPUT_MIN_HEIGHT_CLASS,
89
91
  description && 'min-h-[60px] content-md:min-h-[64px]',
90
92
  'bg-ods-card ring-ods-border',
91
93
  'cursor-pointer transition-colors duration-200',
@@ -3,6 +3,8 @@
3
3
  * `Input` and by `InteractiveSkeleton.Input`, so a field's skeleton is the field's box.
4
4
  */
5
5
  export const INPUT_HEIGHT_CLASS = 'h-11 md:h-12';
6
+ /** The same steps as a FLOOR, for a block that sits in a row of fields but may wrap its text (`CheckboxBlock`). */
7
+ export const INPUT_MIN_HEIGHT_CLASS = 'min-h-11 md:min-h-12';
6
8
  export const INPUT_RADIUS_CLASS = 'rounded-[6px]';
7
9
  /** A field's value (or placeholder) while it is read: the `text-h4` bar in the field's value slot. Read by `Input`,
8
10
  * `SelectTrigger` and `InputTrigger`, so every field draws the same bar. */
@@ -1,23 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
- "use client";
3
-
4
-
5
- var _chunkSC3I3YWMcjs = require('./chunk-SC3I3YWM.cjs');
6
- require('./chunk-7Q2PFKU3.cjs');
7
- require('./chunk-P4B6PVSG.cjs');
8
- require('./chunk-S5C3OZCO.cjs');
9
- require('./chunk-4IYNDV3G.cjs');
10
- require('./chunk-4SZKJPQJ.cjs');
11
- require('./chunk-FX35L4Y6.cjs');
12
- require('./chunk-NTPX5GXI.cjs');
13
- require('./chunk-5DBW6ERF.cjs');
14
- require('./chunk-GI3MMBP3.cjs');
15
- require('./chunk-KUXHXLJQ.cjs');
16
- require('./chunk-UJ7AXHRZ.cjs');
17
- require('./chunk-4WIJI4AK.cjs');
18
- require('./chunk-AHBTZ7DN.cjs');
19
- require('./chunk-7JWFMAQB.cjs');
20
- require('./chunk-V45KLJQP.cjs');
21
-
22
-
23
- exports.CaseStudyCard = _chunkSC3I3YWMcjs.CaseStudyCard;