@flamingo-stack/openframe-frontend-core 0.0.788 → 0.0.790
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-MCAM232N.cjs +23 -0
- package/dist/{chunk-Y3TAVCEN.cjs → chunk-5FV2FQQD.cjs} +326 -321
- package/dist/{chunk-DQTIMLNZ.cjs → chunk-6YPT2BD4.cjs} +110 -110
- package/dist/{chunk-3VBFSRLM.cjs → chunk-6YZNUHXT.cjs} +11 -0
- package/dist/{chunk-TF3YPD4H.cjs → chunk-72NE4G63.cjs} +12 -12
- package/dist/{chunk-MNQUIS73.cjs → chunk-75PJ2SAZ.cjs} +2 -2
- package/dist/{chunk-DCV5PT6A.cjs → chunk-7GNSCDUK.cjs} +2039 -2027
- package/dist/{chunk-KXNG7GJG.cjs → chunk-7VXMO4XJ.cjs} +29 -29
- package/dist/{chunk-HTZ3BUIK.cjs → chunk-ANQCSCNU.cjs} +8 -8
- package/dist/{chunk-BRUR5VZK.cjs → chunk-AT4C2YMA.cjs} +44 -15
- package/dist/{chunk-AG5TL4XB.cjs → chunk-BIYLAAFI.cjs} +54 -54
- package/dist/{chunk-URHI45W6.cjs → chunk-C5EPWKM7.cjs} +110 -110
- package/dist/{chunk-77G4JUKF.cjs → chunk-CWA6J7KC.cjs} +45 -45
- package/dist/{chunk-6EQMXFYL.cjs → chunk-DRWPSN3A.cjs} +5 -5
- package/dist/{chunk-5RFEI4NG.cjs → chunk-EU3NQPFE.cjs} +60 -60
- package/dist/{chunk-VB4HZ22M.cjs → chunk-EY64NXE7.cjs} +115 -115
- package/dist/{chunk-KSF4RGDJ.cjs → chunk-F4RCB5LB.cjs} +17 -17
- package/dist/{chunk-X6AZJ2YS.cjs → chunk-F62QXKNL.cjs} +46 -46
- package/dist/{chunk-AMVMQQAE.cjs → chunk-F7UIQ6UG.cjs} +22 -22
- package/dist/{chunk-5SBZNPAQ.cjs → chunk-GD6RPLHX.cjs} +3 -3
- package/dist/{chunk-3L6OTKZS.cjs → chunk-GYSRYYDM.cjs} +4 -4
- package/dist/{chunk-ERSUY46C.cjs → chunk-HBAVHYXO.cjs} +2 -2
- package/dist/{chunk-V6TTOG2Q.cjs → chunk-HCXNFMLO.cjs} +14 -14
- package/dist/{chunk-WAVW3WWL.cjs → chunk-HJBJHQKE.cjs} +16 -16
- package/dist/{chunk-OKJKQORU.cjs → chunk-HKMEI2NX.cjs} +51 -51
- package/dist/{chunk-BYV4247W.cjs → chunk-HYF4LPXF.cjs} +10 -10
- package/dist/{chunk-6XMSR6ZN.cjs → chunk-ISSBE5JP.cjs} +197 -197
- package/dist/{chunk-GMS6JDDE.cjs → chunk-IYWVS3SS.cjs} +19 -19
- package/dist/{chunk-DIWGL75M.cjs → chunk-JRTDBPJT.cjs} +3 -3
- package/dist/{chunk-3IQSAHNA.cjs → chunk-JXQNECXM.cjs} +7 -7
- package/dist/{chunk-OKGNQPLB.cjs → chunk-K7I3YYYU.cjs} +46 -45
- package/dist/{chunk-B2IZPIDH.cjs → chunk-KI5TJDK3.cjs} +37 -37
- package/dist/{chunk-SEL2L4D6.cjs → chunk-LL6PXI6C.cjs} +4 -4
- package/dist/{chunk-O4IUGOXL.cjs → chunk-LZG7PBF3.cjs} +42 -42
- package/dist/{chunk-PEHK7FUE.cjs → chunk-O4XBGLMA.cjs} +3 -3
- package/dist/{chunk-72WOJNJD.cjs → chunk-OWKLWCLZ.cjs} +61 -61
- package/dist/{chunk-I37MWS2S.cjs → chunk-PHWLEYAG.cjs} +171 -171
- package/dist/{chunk-DBMF3WYK.cjs → chunk-PLNLTN4R.cjs} +13 -13
- package/dist/{chunk-UV2CIZ4A.cjs → chunk-PQIWR4Q2.cjs} +63 -63
- package/dist/{chunk-5E4MQKA2.cjs → chunk-QPXC3LEV.cjs} +31 -31
- package/dist/{chunk-L275VYUB.cjs → chunk-QVC5CMC5.cjs} +4 -4
- package/dist/{chunk-P4ZRVLBR.cjs → chunk-QVKWKY4O.cjs} +23 -23
- package/dist/{chunk-YBMOEHC2.cjs → chunk-RFIBRGXG.cjs} +7 -7
- package/dist/{chunk-6ZYMEICP.cjs → chunk-RIIMY7XW.cjs} +10 -10
- package/dist/{chunk-5YW4ZQDN.cjs → chunk-RKWEFZ6P.cjs} +3 -3
- package/dist/{chunk-D4ZL66TC.cjs → chunk-RPC4P7GY.cjs} +206 -233
- package/dist/{chunk-LZYP5VVZ.cjs → chunk-RYSEW4XI.cjs} +44 -44
- package/dist/{chunk-TRJX7CRZ.cjs → chunk-TIDJN3OQ.cjs} +13 -13
- package/dist/{chunk-7DEIC7SO.cjs → chunk-UCHO4BOS.cjs} +5 -5
- package/dist/{chunk-GXW76CAB.cjs → chunk-V4RKY4ZY.cjs} +535 -535
- package/dist/{chunk-7XXVP7JL.cjs → chunk-WTNAXQJW.cjs} +6 -6
- package/dist/{chunk-XJHFHEIT.cjs → chunk-ZCMXBX4Z.cjs} +61 -61
- package/dist/{cloud-tenants-2NSZHNUB.cjs → cloud-tenants-D6DYR6UV.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/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/index.cjs +32 -32
- package/dist/components/help-center-pages/index.cjs +163 -163
- package/dist/components/index.cjs +208 -204
- package/dist/components/layout/page-heading.d.ts +7 -3
- package/dist/components/layout/page-heading.d.ts.map +1 -1
- package/dist/components/layout/page-heading.js +10 -3
- package/dist/components/layout/page-layout.d.ts +2 -2
- package/dist/components/layout/page-layout.d.ts.map +1 -1
- package/dist/components/layout/title-block.d.ts +2 -7
- package/dist/components/layout/title-block.d.ts.map +1 -1
- package/dist/components/layout/title-block.js +6 -31
- package/dist/components/loading/index.d.ts +1 -1
- package/dist/components/loading/index.d.ts.map +1 -1
- package/dist/components/loading/index.js +2 -0
- package/dist/components/loading/unified-skeleton.d.ts +17 -0
- package/dist/components/loading/unified-skeleton.d.ts.map +1 -1
- package/dist/components/loading/unified-skeleton.js +30 -1
- package/dist/components/meeting-scheduler/index.cjs +187 -187
- package/dist/components/navigation/index.cjs +35 -35
- package/dist/components/onboarding-guides/index.cjs +35 -35
- 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 +1 -0
- package/dist/components/ui/button/button-styles.d.ts.map +1 -1
- package/dist/components/ui/button/button-styles.js +11 -0
- package/dist/components/ui/button/button.d.ts +1 -1
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/button/button.js +2 -1
- package/dist/components/ui/file-manager/index.cjs +55 -55
- package/dist/components/ui/index.cjs +34 -32
- package/dist/components/ui/index.d.ts +2 -1
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +1 -0
- package/dist/components/ui/page-actions.d.ts +1 -1
- package/dist/components/ui/page-actions.d.ts.map +1 -1
- package/dist/components/ui/snap-carousel.d.ts.map +1 -1
- package/dist/components/ui/snap-carousel.js +17 -19
- package/dist/components/ui/step-arrow-button.d.ts +16 -0
- package/dist/components/ui/step-arrow-button.d.ts.map +1 -0
- package/dist/components/ui/step-arrow-button.js +16 -0
- package/dist/{devices-6P4J4I7L.cjs → devices-MZQ4573H.cjs} +33 -33
- package/dist/embed-shims/index.cjs +4 -4
- package/dist/embed-shims/next-image.cjs +4 -4
- package/dist/{embeddable-chat-5LISPJ2K.cjs → embeddable-chat-QLJ2KSWT.cjs} +115 -115
- package/dist/hooks/index.cjs +10 -10
- package/dist/index.cjs +50 -48
- package/dist/{knowledge-C6VCTNO3.cjs → knowledge-QZTFICLS.cjs} +33 -33
- package/dist/{logs-DHQ3TZ2M.cjs → logs-2YOR2SUA.cjs} +41 -41
- package/dist/{policies-FK3QTLYA.cjs → policies-KKFC4UOU.cjs} +36 -36
- package/dist/{remote-session-4KYHC4DN.cjs → remote-session-WKLEYACD.cjs} +17 -17
- package/dist/{scripts-H76VA742.cjs → scripts-UA46WAET.cjs} +39 -39
- package/dist/{software-update-WU23LW7Q.cjs → software-update-IN6TJL73.cjs} +36 -36
- package/dist/{tickets-board-A3PBEURN.cjs → tickets-board-URMIIAKD.cjs} +17 -17
- package/dist/{video-file-player-RC2QPLNE.cjs → video-file-player-HZPMCCYF.cjs} +14 -14
- package/package.json +1 -1
- package/src/components/layout/page-heading.tsx +30 -8
- package/src/components/layout/page-layout.tsx +3 -2
- package/src/components/layout/title-block.tsx +7 -29
- package/src/components/loading/index.ts +2 -0
- package/src/components/loading/unified-skeleton.tsx +42 -0
- package/src/components/ui/button/button-styles.ts +11 -0
- package/src/components/ui/button/button.tsx +1 -0
- package/src/components/ui/index.ts +2 -1
- package/src/components/ui/page-actions.tsx +1 -0
- package/src/components/ui/snap-carousel.tsx +23 -21
- package/src/components/ui/step-arrow-button.tsx +32 -0
- package/dist/case-study-card-A3ZZQPAR.cjs +0 -23
|
@@ -90,7 +90,11 @@
|
|
|
90
90
|
import type React from 'react';
|
|
91
91
|
import { useIsTruncated } from '../../hooks/ui/use-is-truncated';
|
|
92
92
|
import { cn } from '../../utils/cn';
|
|
93
|
-
import {
|
|
93
|
+
import {
|
|
94
|
+
type TextLinesByBreakpoint,
|
|
95
|
+
TextLinesByBreakpointSkeleton,
|
|
96
|
+
UnifiedSkeleton,
|
|
97
|
+
} from '../loading/unified-skeleton';
|
|
94
98
|
import type { ActionsMenuGroup } from '../ui/actions-menu';
|
|
95
99
|
import { EntityImage } from '../ui/entity-image';
|
|
96
100
|
import { FloatingTooltip } from '../ui/floating-tooltip';
|
|
@@ -168,14 +172,7 @@ export interface TitleBlockProps {
|
|
|
168
172
|
* With `titleWrap`: the lines a typical title of the page takes per breakpoint, drawn by the loading title (a
|
|
169
173
|
* record's title is read; a long one growing past them is a settle). Absent: one bar.
|
|
170
174
|
*/
|
|
171
|
-
titleSkeletonLines?:
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/** Lines a wrapping title's skeleton draws: on a phone, from `content-md`, from `content-lg`. */
|
|
175
|
-
export interface TitleSkeletonLines {
|
|
176
|
-
phone: number;
|
|
177
|
-
md: number;
|
|
178
|
-
lg: number;
|
|
175
|
+
titleSkeletonLines?: TextLinesByBreakpoint;
|
|
179
176
|
}
|
|
180
177
|
|
|
181
178
|
/**
|
|
@@ -251,26 +248,7 @@ export function TitleBlock({
|
|
|
251
248
|
);
|
|
252
249
|
const titleNode =
|
|
253
250
|
titleLoading && titleWrap && titleSkeletonLines ? (
|
|
254
|
-
|
|
255
|
-
<TextLineSkeleton
|
|
256
|
-
type="inherit"
|
|
257
|
-
as="span"
|
|
258
|
-
lines={titleSkeletonLines.phone}
|
|
259
|
-
className="w-full content-md:hidden"
|
|
260
|
-
/>
|
|
261
|
-
<TextLineSkeleton
|
|
262
|
-
type="inherit"
|
|
263
|
-
as="span"
|
|
264
|
-
lines={titleSkeletonLines.md}
|
|
265
|
-
className="hidden w-full content-md:flex content-lg:hidden"
|
|
266
|
-
/>
|
|
267
|
-
<TextLineSkeleton
|
|
268
|
-
type="inherit"
|
|
269
|
-
as="span"
|
|
270
|
-
lines={titleSkeletonLines.lg}
|
|
271
|
-
className="hidden w-full content-lg:flex"
|
|
272
|
-
/>
|
|
273
|
-
</>
|
|
251
|
+
<TextLinesByBreakpointSkeleton as="span" lines={titleSkeletonLines} />
|
|
274
252
|
) : titleLoading ? (
|
|
275
253
|
<UnifiedSkeleton
|
|
276
254
|
as="span"
|
|
@@ -179,6 +179,48 @@ export function TextLineSkeleton({ type, lines = 1, as = 'div', width, className
|
|
|
179
179
|
);
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
+
/** The lines a text run takes per breakpoint: on a phone, from `content-md`, and from `content-lg`. */
|
|
183
|
+
export interface TextLinesByBreakpoint {
|
|
184
|
+
phone: number;
|
|
185
|
+
md: number;
|
|
186
|
+
lg: number;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* A text run whose line count changes with the width (a heading or a paragraph that wraps): `TextLineSkeleton` at
|
|
191
|
+
* the typical lines of each step of the content area. Exactly one of the three bars is shown at any width, so the
|
|
192
|
+
* loaded text takes its place at every breakpoint.
|
|
193
|
+
*/
|
|
194
|
+
export function TextLinesByBreakpointSkeleton({
|
|
195
|
+
lines,
|
|
196
|
+
type = 'inherit',
|
|
197
|
+
as = 'div',
|
|
198
|
+
className,
|
|
199
|
+
}: {
|
|
200
|
+
lines: TextLinesByBreakpoint;
|
|
201
|
+
type?: TextLineType;
|
|
202
|
+
as?: 'div' | 'span';
|
|
203
|
+
className?: string;
|
|
204
|
+
}) {
|
|
205
|
+
return (
|
|
206
|
+
<>
|
|
207
|
+
<TextLineSkeleton type={type} as={as} lines={lines.phone} className={cn('w-full content-md:hidden', className)} />
|
|
208
|
+
<TextLineSkeleton
|
|
209
|
+
type={type}
|
|
210
|
+
as={as}
|
|
211
|
+
lines={lines.md}
|
|
212
|
+
className={cn('hidden w-full content-md:flex content-lg:hidden', className)}
|
|
213
|
+
/>
|
|
214
|
+
<TextLineSkeleton
|
|
215
|
+
type={type}
|
|
216
|
+
as={as}
|
|
217
|
+
lines={lines.lg}
|
|
218
|
+
className={cn('hidden w-full content-lg:flex', className)}
|
|
219
|
+
/>
|
|
220
|
+
</>
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
182
224
|
/**
|
|
183
225
|
* Text skeleton variants at fixed heights. A skeleton that must take exactly
|
|
184
226
|
* the space of the text it stands for (a card whose loaded and loading boxes
|
|
@@ -302,6 +302,17 @@ export const BUTTON_KIND_CLASS = {
|
|
|
302
302
|
KIND_FOCUS_INSET,
|
|
303
303
|
'[&_svg]:h-6 [&_svg]:w-6 [&_svg]:shrink-0',
|
|
304
304
|
].join(' '),
|
|
305
|
+
// A round step control: the previous / next arrow of a carousel's controls row and of a presentation's navbar (the
|
|
306
|
+
// company-hub deck's prev / next, pause and fullscreen). 36px, the card surface with a border, the accent border and
|
|
307
|
+
// glyph on hover, faded when disabled (a carousel at either end of its track). Arrows go through `StepArrowButton`.
|
|
308
|
+
stepper: [
|
|
309
|
+
'grid h-9 w-9 shrink-0 place-items-center rounded-full border-[length:1.5px] border-ods-border',
|
|
310
|
+
'bg-ods-card text-ods-text-primary transition-colors duration-150',
|
|
311
|
+
'hover:border-ods-accent hover:text-ods-accent',
|
|
312
|
+
'disabled:cursor-default disabled:text-ods-text-secondary disabled:opacity-50 disabled:hover:border-ods-border disabled:hover:text-ods-text-secondary',
|
|
313
|
+
KIND_FOCUS,
|
|
314
|
+
'[&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0',
|
|
315
|
+
].join(' '),
|
|
305
316
|
} as const;
|
|
306
317
|
|
|
307
318
|
export type ButtonKind = keyof typeof BUTTON_KIND_CLASS;
|
|
@@ -96,6 +96,7 @@ export * from './benefit-card';
|
|
|
96
96
|
export * from './brand-association-card';
|
|
97
97
|
export * from './brand-association-grid';
|
|
98
98
|
export * from './bullet-list';
|
|
99
|
+
export * from './step-arrow-button';
|
|
99
100
|
export * from './chevron-button';
|
|
100
101
|
export * from './circular-progress';
|
|
101
102
|
export {
|
|
@@ -233,7 +234,7 @@ export { IconTile } from './icon-tile';
|
|
|
233
234
|
export { PolicyLink } from './policy-link';
|
|
234
235
|
export type { DateRange } from 'react-day-picker';
|
|
235
236
|
export { TitleBlock, TITLE_BLOCK_MIN_HEIGHT } from '../layout/title-block';
|
|
236
|
-
export type { TitleBlockProps
|
|
237
|
+
export type { TitleBlockProps } from '../layout/title-block';
|
|
237
238
|
export type { SortableColumn, SortConfig, SortDirection } from './sort-column-item';
|
|
238
239
|
export {
|
|
239
240
|
ORGANIZATION_CARD_RADIUS_CLASS,
|
|
@@ -5,11 +5,9 @@ import { useAutoplay } from '../../hooks/ui/use-autoplay';
|
|
|
5
5
|
import { useInView } from '../../hooks/ui/use-in-view';
|
|
6
6
|
import { useResumableTimeout } from '../../hooks/ui/use-resumable-timeout';
|
|
7
7
|
import { cn } from '../../utils/cn';
|
|
8
|
-
import { Chevron02LeftIcon } from '../icons-v2-generated/arrows/chevron-02-left-icon';
|
|
9
|
-
import { Chevron02RightIcon } from '../icons-v2-generated/arrows/chevron-02-right-icon';
|
|
10
8
|
import { TextLineSkeleton } from '../loading/unified-skeleton';
|
|
11
|
-
import { Button } from './button';
|
|
12
9
|
import { useLoadingScope } from './loading-scope';
|
|
10
|
+
import { StepArrowButton } from './step-arrow-button';
|
|
13
11
|
|
|
14
12
|
/** The row under the track: the dots, the counter, the pause and the two arrows (the arrows set its height). */
|
|
15
13
|
const SNAP_CAROUSEL_CONTROLS_CLASS = 'mt-3 flex items-center gap-2';
|
|
@@ -117,28 +115,18 @@ export function SnapCarouselControls({
|
|
|
117
115
|
{index + 1} / {count}
|
|
118
116
|
</span>
|
|
119
117
|
)}
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
size="icon"
|
|
123
|
-
type="button"
|
|
118
|
+
<StepArrowButton
|
|
119
|
+
direction="previous"
|
|
124
120
|
aria-label={prevLabel}
|
|
125
121
|
disabled={loading || index === 0}
|
|
126
122
|
onClick={onPrevious}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
</Button>
|
|
131
|
-
<Button
|
|
132
|
-
variant="outline"
|
|
133
|
-
size="icon"
|
|
134
|
-
type="button"
|
|
123
|
+
/>
|
|
124
|
+
<StepArrowButton
|
|
125
|
+
direction="next"
|
|
135
126
|
aria-label={nextLabel}
|
|
136
127
|
disabled={loading || index === count - 1}
|
|
137
128
|
onClick={onNext}
|
|
138
|
-
|
|
139
|
-
>
|
|
140
|
-
<Chevron02RightIcon size={20} />
|
|
141
|
-
</Button>
|
|
129
|
+
/>
|
|
142
130
|
</div>
|
|
143
131
|
);
|
|
144
132
|
}
|
|
@@ -249,13 +237,27 @@ export function SnapCarousel<T>({
|
|
|
249
237
|
if (focusIndex !== undefined && focusIndex >= 0) goToRef.current(focusIndex);
|
|
250
238
|
}, [focusIndex]);
|
|
251
239
|
|
|
240
|
+
// The slide at the track's left edge. At the end of the track, where several slides are in view and the track can
|
|
241
|
+
// scroll no further, the slide is the LAST one: otherwise the index stopped short of it (9 of 11 with three slides
|
|
242
|
+
// in view) and the carousel never reached the end to wrap back to the first.
|
|
252
243
|
const onScroll = useCallback(() => {
|
|
253
244
|
const track = trackRef.current;
|
|
254
245
|
const step = slideStep();
|
|
255
246
|
if (!track || step === 0) return;
|
|
256
|
-
|
|
247
|
+
const maxScroll = track.scrollWidth - track.clientWidth;
|
|
248
|
+
const atEnd = maxScroll > 0 && track.scrollLeft >= maxScroll - 1;
|
|
249
|
+
setIndex(atEnd ? count - 1 : Math.min(count - 1, Math.round(track.scrollLeft / step)));
|
|
257
250
|
}, [count, slideStep]);
|
|
258
251
|
|
|
252
|
+
// Back one slide from where the track stands: at the end the index is the last slide, which sits further right
|
|
253
|
+
// than the track can scroll, so stepping back from the index alone would not move it.
|
|
254
|
+
const goBack = useCallback(() => {
|
|
255
|
+
const track = trackRef.current;
|
|
256
|
+
const step = slideStep();
|
|
257
|
+
if (!track || step === 0) return;
|
|
258
|
+
goTo(Math.min(index, Math.round(track.scrollLeft / step)) - 1);
|
|
259
|
+
}, [goTo, index, slideStep]);
|
|
260
|
+
|
|
259
261
|
const canAutoAdvance = autoAdvanceMs > 0 && count > 1;
|
|
260
262
|
const playing = auto.playing && canAutoAdvance;
|
|
261
263
|
|
|
@@ -308,7 +310,7 @@ export function SnapCarousel<T>({
|
|
|
308
310
|
index={index}
|
|
309
311
|
prevLabel={prevLabel}
|
|
310
312
|
nextLabel={nextLabel}
|
|
311
|
-
onPrevious={
|
|
313
|
+
onPrevious={goBack}
|
|
312
314
|
onNext={() => goTo(index + 1)}
|
|
313
315
|
wait={showsWait ? { durationMs: autoAdvanceMs, ranMs, running: playing } : null}
|
|
314
316
|
announce={!playing}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { type ButtonHTMLAttributes, forwardRef, type ReactNode } from 'react';
|
|
4
|
+
import { Chevron02LeftIcon } from '../icons-v2-generated/arrows/chevron-02-left-icon';
|
|
5
|
+
import { Chevron02RightIcon } from '../icons-v2-generated/arrows/chevron-02-right-icon';
|
|
6
|
+
import { Button } from './button';
|
|
7
|
+
|
|
8
|
+
export interface StepArrowButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
9
|
+
/** Which way it moves: the chevron points that way. */
|
|
10
|
+
direction: 'previous' | 'next';
|
|
11
|
+
/** Required: the button is a glyph only. */
|
|
12
|
+
'aria-label': string;
|
|
13
|
+
/** A glyph in place of the chevron, for a step that does something else (a deck's "skip to end" at its start). */
|
|
14
|
+
glyph?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* THE previous / next arrow that steps through slides: a carousel's controls row (`SnapCarouselControls`) and a
|
|
19
|
+
* presentation's navbar draw it, so every step arrow is the same round 36px control (the `stepper` kind). Not the
|
|
20
|
+
* floating arrows of a `CardsStrip`, which are the outline icon button over the cards. `className` is layout only.
|
|
21
|
+
*/
|
|
22
|
+
export const StepArrowButton = forwardRef<HTMLButtonElement, StepArrowButtonProps>(
|
|
23
|
+
({ direction, glyph, type = 'button', ...props }, ref) => {
|
|
24
|
+
const Icon = direction === 'previous' ? Chevron02LeftIcon : Chevron02RightIcon;
|
|
25
|
+
return (
|
|
26
|
+
<Button ref={ref} type={type} variant="stepper" {...props}>
|
|
27
|
+
{glyph ?? <Icon />}
|
|
28
|
+
</Button>
|
|
29
|
+
);
|
|
30
|
+
},
|
|
31
|
+
);
|
|
32
|
+
StepArrowButton.displayName = 'StepArrowButton';
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _chunkURHI45W6cjs = require('./chunk-URHI45W6.cjs');
|
|
6
|
-
require('./chunk-L275VYUB.cjs');
|
|
7
|
-
require('./chunk-3IQSAHNA.cjs');
|
|
8
|
-
require('./chunk-S5C3OZCO.cjs');
|
|
9
|
-
require('./chunk-4IYNDV3G.cjs');
|
|
10
|
-
require('./chunk-SEL2L4D6.cjs');
|
|
11
|
-
require('./chunk-7PNRXJX2.cjs');
|
|
12
|
-
require('./chunk-NTPX5GXI.cjs');
|
|
13
|
-
require('./chunk-MNQUIS73.cjs');
|
|
14
|
-
require('./chunk-5GJM7VRR.cjs');
|
|
15
|
-
require('./chunk-6EQMXFYL.cjs');
|
|
16
|
-
require('./chunk-UJ7AXHRZ.cjs');
|
|
17
|
-
require('./chunk-BRUR5VZK.cjs');
|
|
18
|
-
require('./chunk-OKGNQPLB.cjs');
|
|
19
|
-
require('./chunk-3VBFSRLM.cjs');
|
|
20
|
-
require('./chunk-V45KLJQP.cjs');
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
exports.CaseStudyCard = _chunkURHI45W6cjs.CaseStudyCard;
|