@flamingo-stack/openframe-frontend-core 0.0.811 → 0.0.813
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/build/export-map.json +1 -1
- package/dist/case-study-card-NLT2JVI7.cjs +23 -0
- package/dist/{chunk-5QLDHPPU.cjs → chunk-25HBH4J6.cjs} +15 -15
- package/dist/{chunk-TKK66KHU.cjs → chunk-2WD7XGWA.cjs} +6 -6
- package/dist/{chunk-LKQ33CMY.cjs → chunk-2XCORRJV.cjs} +3 -3
- package/dist/{chunk-JTIGKLKJ.cjs → chunk-2XLPRW7V.cjs} +23 -23
- package/dist/{chunk-4WIJI4AK.cjs → chunk-3TOWCFIK.cjs} +20 -26
- package/dist/{chunk-KUXHXLJQ.cjs → chunk-3V5JWG27.cjs} +5 -5
- package/dist/{chunk-ZZO3FGPM.cjs → chunk-467T3LCG.cjs} +63 -63
- package/dist/{chunk-Q7QYAINS.cjs → chunk-4PMD3JUC.cjs} +19 -19
- package/dist/{chunk-PCVY63WQ.cjs → chunk-5M5JVVSL.cjs} +13 -13
- package/dist/{chunk-CB77J5L7.cjs → chunk-5RBL7A2Y.cjs} +544 -544
- package/dist/{chunk-YR74H7Z3.cjs → chunk-5SZ4ILU3.cjs} +7 -7
- package/dist/{chunk-J6C7F63P.cjs → chunk-5V3CNLCB.cjs} +199 -199
- package/dist/{chunk-7JWFMAQB.cjs → chunk-63A4GZMB.cjs} +18 -2
- package/dist/{chunk-ZD6SZLO2.cjs → chunk-6CZVQ72C.cjs} +3 -3
- package/dist/{chunk-R55KNVPR.cjs → chunk-7BJ22OH2.cjs} +171 -171
- package/dist/{chunk-GU3GJ5DH.cjs → chunk-7O7EX7HQ.cjs} +45 -45
- package/dist/{chunk-U2MHQBL4.cjs → chunk-BOS7OIC4.cjs} +30 -30
- package/dist/{chunk-SFUNXMY3.cjs → chunk-EHANO6UE.cjs} +16 -16
- package/dist/{chunk-XLEWM5X5.cjs → chunk-EJQRX6S5.cjs} +62 -62
- package/dist/{chunk-ACCZCRXT.cjs → chunk-F4ZJRMMM.cjs} +20 -20
- package/dist/{chunk-AHBTZ7DN.cjs → chunk-FCZAUK4D.cjs} +52 -50
- package/dist/{chunk-MDBOYMCW.cjs → chunk-FTGXZHLO.cjs} +31 -31
- package/dist/{chunk-CPP2APON.cjs → chunk-G2AN67DP.cjs} +110 -110
- package/dist/{chunk-UP3TLY2V.cjs → chunk-GAR2IIU6.cjs} +349 -349
- package/dist/{chunk-IQLXO6EI.cjs → chunk-GNGXHIBC.cjs} +119 -119
- package/dist/{chunk-FK2WFU7R.cjs → chunk-GTOT4ZQV.cjs} +37 -37
- package/dist/{chunk-KVDUWXVZ.cjs → chunk-HM7VCQSX.cjs} +10 -10
- package/dist/{chunk-243TS7YL.cjs → chunk-IJCSQFLD.cjs} +209 -209
- package/dist/{chunk-CC3Q3MQG.cjs → chunk-IKB6AZPV.cjs} +8 -8
- package/dist/{chunk-66J7ZSI5.cjs → chunk-JFA3VHXC.cjs} +51 -51
- package/dist/{chunk-PMOMZSCX.cjs → chunk-JOKOQOLJ.cjs} +22 -22
- package/dist/{chunk-WX5WDSKV.cjs → chunk-MBU45QUB.cjs} +2050 -2045
- package/dist/{chunk-CJ7W2SY4.cjs → chunk-MUH7X7ZA.cjs} +13 -13
- package/dist/{chunk-GD47ZGOU.cjs → chunk-N3MBQRCQ.cjs} +3 -3
- package/dist/{chunk-ERLMCSGF.cjs → chunk-NONMZ5WJ.cjs} +5 -5
- package/dist/{chunk-ZW25QUJK.cjs → chunk-OBQ5WUNG.cjs} +67 -67
- package/dist/{chunk-6GT3ZL27.cjs → chunk-OGHG6REG.cjs} +44 -44
- package/dist/{chunk-JNWJB4Z5.cjs → chunk-PAI4A3UM.cjs} +60 -60
- package/dist/{chunk-O4MEG2ZS.cjs → chunk-PXR27MXW.cjs} +45 -45
- package/dist/{chunk-XYZBN6D7.cjs → chunk-QDDBOCG3.cjs} +2 -2
- package/dist/{chunk-VXXOUM2K.cjs → chunk-QOAA7ZHB.cjs} +6 -2
- package/dist/{chunk-OQDPZOGC.cjs → chunk-QQT23JJ7.cjs} +4 -4
- package/dist/{chunk-STLJCAIZ.cjs → chunk-RD66AGUI.cjs} +6 -6
- package/dist/{chunk-NL3G642U.cjs → chunk-S3QXLD4X.cjs} +10 -10
- package/dist/{chunk-7RM4NM2C.cjs → chunk-SWF6TNZ3.cjs} +14 -14
- package/dist/{chunk-O32RLIN4.cjs → chunk-TOBROYSJ.cjs} +4 -4
- package/dist/{chunk-P4B6PVSG.cjs → chunk-USUVHAQ7.cjs} +7 -7
- package/dist/{chunk-VXMPVDOS.cjs → chunk-WKODIG3L.cjs} +46 -46
- package/dist/{chunk-CLU2KJFB.cjs → chunk-XWCZSEW7.cjs} +3 -3
- package/dist/{chunk-7Y6M4FW4.cjs → chunk-Y6MJMPHV.cjs} +126 -126
- package/dist/{chunk-NZSWROGM.cjs → chunk-ZRDVFADQ.cjs} +61 -61
- package/dist/{cloud-tenants-XGGQG7SO.cjs → cloud-tenants-ODZVCP5X.cjs} +32 -32
- package/dist/components/calendar.cjs +10 -10
- package/dist/components/case-studies/index.cjs +52 -52
- package/dist/components/chat/index.cjs +26 -26
- package/dist/components/chat/utils/icon-registry.d.ts.map +1 -1
- package/dist/components/chat/utils/icon-registry.js +4 -0
- package/dist/components/contact/index.cjs +33 -33
- package/dist/components/docs/index.cjs +36 -36
- package/dist/components/embeds/index.cjs +33 -33
- package/dist/components/faq/index.cjs +34 -34
- package/dist/components/features/devices/devices-table-columns.d.ts.map +1 -1
- package/dist/components/features/devices/devices-table-columns.js +1 -1
- package/dist/components/features/index.cjs +32 -32
- package/dist/components/features/scripts/schedule-form/schedule-script-picker-card.d.ts.map +1 -1
- package/dist/components/features/scripts/schedule-form/schedule-script-picker-card.js +4 -2
- package/dist/components/features/select-button.js +1 -1
- package/dist/components/help-center-pages/index.cjs +165 -165
- package/dist/components/index.cjs +220 -218
- package/dist/components/meeting-scheduler/index.cjs +238 -192
- package/dist/components/meeting-scheduler/index.d.ts +30 -1
- package/dist/components/meeting-scheduler/index.d.ts.map +1 -1
- package/dist/components/meeting-scheduler/index.js +43 -3
- package/dist/components/navigation/index.cjs +35 -35
- package/dist/components/onboarding-guides/index.cjs +35 -35
- package/dist/components/platform/ScriptArguments.d.ts +2 -0
- package/dist/components/platform/ScriptArguments.d.ts.map +1 -1
- package/dist/components/platform/ScriptArguments.js +3 -2
- package/dist/components/product-demo/index.cjs +45 -45
- package/dist/components/related-content/index.cjs +17 -17
- package/dist/components/tickets/index.cjs +39 -39
- package/dist/components/ui/button/button-styles.d.ts +8 -0
- package/dist/components/ui/button/button-styles.d.ts.map +1 -1
- package/dist/components/ui/button/button-styles.js +8 -1
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/button/button.js +6 -4
- package/dist/components/ui/button/split-button.d.ts.map +1 -1
- package/dist/components/ui/button/split-button.js +3 -2
- package/dist/components/ui/checkbox-block.d.ts.map +1 -1
- package/dist/components/ui/checkbox-block.js +3 -1
- package/dist/components/ui/file-manager/index.cjs +55 -55
- package/dist/components/ui/index.cjs +34 -32
- package/dist/components/ui/input-styles.d.ts +2 -0
- package/dist/components/ui/input-styles.d.ts.map +1 -1
- package/dist/components/ui/input-styles.js +2 -0
- package/dist/{devices-H5Y4DBVC.cjs → devices-GWBR7MJD.cjs} +33 -33
- package/dist/embed-shims/index.cjs +4 -4
- package/dist/embed-shims/next-image.cjs +4 -4
- package/dist/{embeddable-chat-77ZOLCCK.cjs → embeddable-chat-4RLUXHDH.cjs} +115 -115
- package/dist/hooks/index.cjs +10 -10
- package/dist/index.cjs +50 -48
- package/dist/{knowledge-MGH65HXM.cjs → knowledge-ZNRITHW5.cjs} +33 -33
- package/dist/{logs-OL7ETVK6.cjs → logs-QN5H5JT6.cjs} +41 -41
- package/dist/{policies-BCECWQ3F.cjs → policies-SCUYEYGJ.cjs} +36 -36
- package/dist/{remote-session-HML4UF7W.cjs → remote-session-BQMTIQTU.cjs} +17 -17
- package/dist/{scripts-XCD6V2JB.cjs → scripts-BP7UTAG5.cjs} +39 -39
- package/dist/{software-update-U5ESXRG5.cjs → software-update-O4BQJCJ4.cjs} +36 -36
- package/dist/{tickets-board-EICQ5VLE.cjs → tickets-board-TRXOX77R.cjs} +17 -17
- package/dist/utils/index.cjs +4 -0
- package/dist/{video-file-player-4QMVTOBE.cjs → video-file-player-IAMWBKEQ.cjs} +14 -14
- package/package.json +1 -1
- package/src/components/chat/utils/icon-registry.ts +4 -0
- package/src/components/features/devices/devices-table-columns.tsx +5 -2
- package/src/components/features/scripts/schedule-form/schedule-script-picker-card.tsx +4 -2
- package/src/components/features/select-button.tsx +1 -1
- package/src/components/meeting-scheduler/index.tsx +85 -3
- package/src/components/platform/ScriptArguments.tsx +8 -1
- package/src/components/ui/button/button-styles.ts +18 -1
- package/src/components/ui/button/button.tsx +7 -4
- package/src/components/ui/button/split-button.tsx +3 -2
- package/src/components/ui/checkbox-block.tsx +3 -1
- package/src/components/ui/input-styles.ts +2 -0
- package/dist/case-study-card-AMINZROX.cjs +0 -23
|
@@ -53,14 +53,15 @@ import {
|
|
|
53
53
|
type MeetingAvailability,
|
|
54
54
|
type MeetingBookingErrorCode,
|
|
55
55
|
type MeetingHost,
|
|
56
|
+
type SchedulingLink,
|
|
56
57
|
} from '../../schemas/meeting-booking-schema';
|
|
57
58
|
import { cn } from '../../utils/cn';
|
|
58
59
|
import { FORM_RESCUE_ATTEMPT_FIELD, type FormRescueDefinition } from '../../utils/form-rescue';
|
|
59
|
-
import { formatDurationCompact, formatDateWithTimezone } from '../../utils/format';
|
|
60
|
+
import { formatDurationCompact, formatDateWithTimezone, VIEWER_TIMEZONE } from '../../utils/format';
|
|
60
61
|
import { BackButton } from '../layout/back-button';
|
|
61
62
|
import { LoadingRegion } from '../loading/loading-region';
|
|
62
|
-
import { Alert, AlertDescription, Button } from '../ui';
|
|
63
|
-
import { LOADING_NOOP, useLoadingScope } from '../ui/loading-scope';
|
|
63
|
+
import { Alert, AlertDescription, Button, ModalV2, ModalV2Content, ModalV2Header, ModalV2Title } from '../ui';
|
|
64
|
+
import { LOADING_NOOP, LoadingWhen, useLoadingScope } from '../ui/loading-scope';
|
|
64
65
|
import { BookingForm, DEFAULT_SUBMIT_LABEL, type BookingFieldRow, type BookingFormProps } from './booking-form';
|
|
65
66
|
import { Confirmation } from './confirmation';
|
|
66
67
|
import { SchedulerContextPanel } from './context-panel';
|
|
@@ -1213,6 +1214,87 @@ export function HubSpotMeetingScheduler({
|
|
|
1213
1214
|
);
|
|
1214
1215
|
}
|
|
1215
1216
|
|
|
1217
|
+
export interface MeetingSchedulerModalProps {
|
|
1218
|
+
isOpen: boolean;
|
|
1219
|
+
onClose: () => void;
|
|
1220
|
+
/** The window's heading, e.g. "Book an Onboarding Call". */
|
|
1221
|
+
title: string;
|
|
1222
|
+
/** The link to book (from the host's `/api/meetings` directory); `null` while it is read or when there is none. */
|
|
1223
|
+
link: SchedulingLink | null;
|
|
1224
|
+
/** The host is still reading `link`: the scheduler draws its own loading state in its place. */
|
|
1225
|
+
loading?: boolean;
|
|
1226
|
+
/** Endpoints prefix, as on `HubSpotMeetingScheduler`. */
|
|
1227
|
+
apiBaseUrl?: string;
|
|
1228
|
+
/** Fires after a confirmed booking, once the booked toast is up; the window closes itself. */
|
|
1229
|
+
onBooked?: (booking: BookingConfirmation) => void;
|
|
1230
|
+
/** The line shown in place of the scheduler when there is no link to book. */
|
|
1231
|
+
emptyMessage?: string;
|
|
1232
|
+
className?: string;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
/**
|
|
1236
|
+
* The whole booking window: a 600px `ModalV2` with the title, the scheduler in
|
|
1237
|
+
* its modal layout, and a booked toast. The window closes on a confirmed
|
|
1238
|
+
* booking, and on a phone's Cancel (the scheduler's host exit).
|
|
1239
|
+
*
|
|
1240
|
+
* The host passes the link it resolved, not a meeting id: the same read
|
|
1241
|
+
* usually decides whether the entry point is offered at all, so the window
|
|
1242
|
+
* takes its answer rather than reading the directory again. While it is read
|
|
1243
|
+
* the scheduler draws its loading state in the same tree, so nothing remounts
|
|
1244
|
+
* when the link lands.
|
|
1245
|
+
*/
|
|
1246
|
+
export function MeetingSchedulerModal({
|
|
1247
|
+
isOpen,
|
|
1248
|
+
onClose,
|
|
1249
|
+
title,
|
|
1250
|
+
link,
|
|
1251
|
+
loading = false,
|
|
1252
|
+
apiBaseUrl = '',
|
|
1253
|
+
onBooked,
|
|
1254
|
+
emptyMessage = 'No calls can be booked right now.',
|
|
1255
|
+
className,
|
|
1256
|
+
}: MeetingSchedulerModalProps) {
|
|
1257
|
+
const { toast } = useToast();
|
|
1258
|
+
|
|
1259
|
+
return (
|
|
1260
|
+
<ModalV2 isOpen={isOpen} onClose={onClose} className={cn('md:max-w-[600px]', className)}>
|
|
1261
|
+
<ModalV2Header>
|
|
1262
|
+
<ModalV2Title>{title}</ModalV2Title>
|
|
1263
|
+
</ModalV2Header>
|
|
1264
|
+
{/* The window scrolls as a whole on a phone (the scheduler's footer rides
|
|
1265
|
+
with the card); without this slot the body has no scroll box at all. */}
|
|
1266
|
+
<ModalV2Content className="flex flex-col">
|
|
1267
|
+
{link || loading ? (
|
|
1268
|
+
<LoadingWhen loading={!link}>
|
|
1269
|
+
<HubSpotMeetingScheduler
|
|
1270
|
+
layout="modal"
|
|
1271
|
+
meetingId={link?.id ?? ''}
|
|
1272
|
+
apiBaseUrl={apiBaseUrl}
|
|
1273
|
+
hosts={link?.hosts}
|
|
1274
|
+
fallbackUrl={link?.link}
|
|
1275
|
+
onBack={onClose}
|
|
1276
|
+
onBooked={booking => {
|
|
1277
|
+
const when = formatDateWithTimezone(booking.startTimeMs, VIEWER_TIMEZONE, 'weekdayDateTimeZoned', {
|
|
1278
|
+
viewerLocale: true,
|
|
1279
|
+
});
|
|
1280
|
+
toast({
|
|
1281
|
+
title: 'Call booked',
|
|
1282
|
+
description: `${booking.title} - ${when}. Check your email for the invite.`,
|
|
1283
|
+
variant: 'success',
|
|
1284
|
+
});
|
|
1285
|
+
onBooked?.(booking);
|
|
1286
|
+
onClose();
|
|
1287
|
+
}}
|
|
1288
|
+
/>
|
|
1289
|
+
</LoadingWhen>
|
|
1290
|
+
) : (
|
|
1291
|
+
<p className="text-ods-text-secondary text-h4">{emptyMessage}</p>
|
|
1292
|
+
)}
|
|
1293
|
+
</ModalV2Content>
|
|
1294
|
+
</ModalV2>
|
|
1295
|
+
);
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1216
1298
|
// The override surface: a host builds its `detailsForm` by re-rendering
|
|
1217
1299
|
// `BookingForm` with `fieldRows`, so it needs both from this entry point (the
|
|
1218
1300
|
// package exports `./components/meeting-scheduler`, not the file beneath it).
|
|
@@ -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) &&
|
|
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
|
-
|
|
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=
|
|
319
|
+
{leftIcon && <span className={labelIconClass}>{leftIcon}</span>}
|
|
317
320
|
{children}
|
|
318
|
-
{rightIcon && <span className=
|
|
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=
|
|
428
|
+
{leftIcon && <span className={labelIconClass}>{leftIcon}</span>}
|
|
426
429
|
{children}
|
|
427
|
-
{rightIcon && <span className=
|
|
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=
|
|
152
|
+
{leftIcon && <span className={buttonIconSlotClass(variant, disabled || mainDisabled)}>{leftIcon}</span>}
|
|
152
153
|
<span>{children}</span>
|
|
153
|
-
{rightIcon && <span className=
|
|
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
|
-
|
|
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 _chunk7Y6M4FW4cjs = require('./chunk-7Y6M4FW4.cjs');
|
|
6
|
-
require('./chunk-OQDPZOGC.cjs');
|
|
7
|
-
require('./chunk-P4B6PVSG.cjs');
|
|
8
|
-
require('./chunk-S5C3OZCO.cjs');
|
|
9
|
-
require('./chunk-4IYNDV3G.cjs');
|
|
10
|
-
require('./chunk-STLJCAIZ.cjs');
|
|
11
|
-
require('./chunk-FX35L4Y6.cjs');
|
|
12
|
-
require('./chunk-NTPX5GXI.cjs');
|
|
13
|
-
require('./chunk-VXXOUM2K.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 = _chunk7Y6M4FW4cjs.CaseStudyCard;
|