@opensite/ui 3.2.6 → 3.2.8
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/about-developer-story.cjs +7 -1
- package/dist/about-developer-story.js +7 -1
- package/dist/badge.d.cts +1 -1
- package/dist/badge.d.ts +1 -1
- package/dist/hero-overlay-cta-grid.cjs +82 -19
- package/dist/hero-overlay-cta-grid.d.cts +8 -13
- package/dist/hero-overlay-cta-grid.d.ts +8 -13
- package/dist/hero-overlay-cta-grid.js +83 -20
- package/dist/process-expandable-timeline.cjs +1 -2
- package/dist/process-expandable-timeline.js +1 -2
- package/dist/process-icon-timeline.cjs +9 -99
- package/dist/process-icon-timeline.d.cts +3 -3
- package/dist/process-icon-timeline.d.ts +3 -3
- package/dist/process-icon-timeline.js +9 -99
- package/dist/process-mission-principles.cjs +5 -67
- package/dist/process-mission-principles.d.cts +3 -3
- package/dist/process-mission-principles.d.ts +3 -3
- package/dist/process-mission-principles.js +5 -67
- package/dist/process-numbered-services.cjs +23 -117
- package/dist/process-numbered-services.d.cts +3 -3
- package/dist/process-numbered-services.d.ts +3 -3
- package/dist/process-numbered-services.js +23 -117
- package/dist/process-scroll-image.cjs +20 -85
- package/dist/process-scroll-image.d.cts +3 -11
- package/dist/process-scroll-image.d.ts +3 -11
- package/dist/process-scroll-image.js +18 -83
- package/dist/process-steps-grid.cjs +31 -99
- package/dist/process-steps-grid.d.cts +3 -3
- package/dist/process-steps-grid.d.ts +3 -3
- package/dist/process-steps-grid.js +31 -99
- package/dist/process-sticky-steps.cjs +90 -76
- package/dist/process-sticky-steps.d.cts +9 -1
- package/dist/process-sticky-steps.d.ts +9 -1
- package/dist/process-sticky-steps.js +90 -76
- package/dist/registry.cjs +128 -182
- package/dist/registry.js +128 -182
- package/package.json +1 -1
|
@@ -26,6 +26,10 @@ interface ProcessStickyStepItem {
|
|
|
26
26
|
* Additional CSS classes for the step item
|
|
27
27
|
*/
|
|
28
28
|
className?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Optional URL
|
|
31
|
+
*/
|
|
32
|
+
href?: string;
|
|
29
33
|
}
|
|
30
34
|
interface ProcessStickyStepsProps {
|
|
31
35
|
/**
|
|
@@ -100,6 +104,10 @@ interface ProcessStickyStepsProps {
|
|
|
100
104
|
* OptixFlow image optimization configuration
|
|
101
105
|
*/
|
|
102
106
|
optixFlowConfig?: OptixFlowConfig;
|
|
107
|
+
/**
|
|
108
|
+
* Additional CSS classes for the container
|
|
109
|
+
*/
|
|
110
|
+
containerClassName?: string;
|
|
103
111
|
/** Optional Section ID */
|
|
104
112
|
sectionId?: string;
|
|
105
113
|
}
|
|
@@ -107,6 +115,6 @@ interface ProcessStickyStepsProps {
|
|
|
107
115
|
* ProcessStickySteps - A process section with sticky sidebar containing heading,
|
|
108
116
|
* description, and CTA, with scrollable steps on the right side.
|
|
109
117
|
*/
|
|
110
|
-
declare function ProcessStickySteps({ sectionId, heading, description, actions, actionsSlot, steps, stepsSlot, className, contentClassName, headingClassName, descriptionClassName, actionsClassName, stepsClassName, stepItemClassName, background, spacing, pattern, patternOpacity, }: ProcessStickyStepsProps): React.JSX.Element;
|
|
118
|
+
declare function ProcessStickySteps({ sectionId, heading, description, actions, actionsSlot, steps, stepsSlot, className, contentClassName, headingClassName, descriptionClassName, actionsClassName, stepsClassName, stepItemClassName, background, spacing, pattern, patternOpacity, containerClassName, }: ProcessStickyStepsProps): React.JSX.Element;
|
|
111
119
|
|
|
112
120
|
export { ProcessStickySteps, type ProcessStickyStepsProps };
|
|
@@ -26,6 +26,10 @@ interface ProcessStickyStepItem {
|
|
|
26
26
|
* Additional CSS classes for the step item
|
|
27
27
|
*/
|
|
28
28
|
className?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Optional URL
|
|
31
|
+
*/
|
|
32
|
+
href?: string;
|
|
29
33
|
}
|
|
30
34
|
interface ProcessStickyStepsProps {
|
|
31
35
|
/**
|
|
@@ -100,6 +104,10 @@ interface ProcessStickyStepsProps {
|
|
|
100
104
|
* OptixFlow image optimization configuration
|
|
101
105
|
*/
|
|
102
106
|
optixFlowConfig?: OptixFlowConfig;
|
|
107
|
+
/**
|
|
108
|
+
* Additional CSS classes for the container
|
|
109
|
+
*/
|
|
110
|
+
containerClassName?: string;
|
|
103
111
|
/** Optional Section ID */
|
|
104
112
|
sectionId?: string;
|
|
105
113
|
}
|
|
@@ -107,6 +115,6 @@ interface ProcessStickyStepsProps {
|
|
|
107
115
|
* ProcessStickySteps - A process section with sticky sidebar containing heading,
|
|
108
116
|
* description, and CTA, with scrollable steps on the right side.
|
|
109
117
|
*/
|
|
110
|
-
declare function ProcessStickySteps({ sectionId, heading, description, actions, actionsSlot, steps, stepsSlot, className, contentClassName, headingClassName, descriptionClassName, actionsClassName, stepsClassName, stepItemClassName, background, spacing, pattern, patternOpacity, }: ProcessStickyStepsProps): React.JSX.Element;
|
|
118
|
+
declare function ProcessStickySteps({ sectionId, heading, description, actions, actionsSlot, steps, stepsSlot, className, contentClassName, headingClassName, descriptionClassName, actionsClassName, stepsClassName, stepItemClassName, background, spacing, pattern, patternOpacity, containerClassName, }: ProcessStickyStepsProps): React.JSX.Element;
|
|
111
119
|
|
|
112
120
|
export { ProcessStickySteps, type ProcessStickyStepsProps };
|
|
@@ -11,36 +11,6 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
11
11
|
function cn(...inputs) {
|
|
12
12
|
return twMerge(clsx(inputs));
|
|
13
13
|
}
|
|
14
|
-
function getNestedCardBg(parentBg, variant = "muted", options) {
|
|
15
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
16
|
-
if (isDark) {
|
|
17
|
-
switch (variant) {
|
|
18
|
-
case "muted":
|
|
19
|
-
return "bg-background";
|
|
20
|
-
case "card":
|
|
21
|
-
return "bg-card";
|
|
22
|
-
case "accent":
|
|
23
|
-
return "bg-accent";
|
|
24
|
-
case "subtle":
|
|
25
|
-
return "bg-background/50";
|
|
26
|
-
}
|
|
27
|
-
} else {
|
|
28
|
-
switch (variant) {
|
|
29
|
-
case "muted":
|
|
30
|
-
return "bg-muted";
|
|
31
|
-
case "card":
|
|
32
|
-
return "bg-card";
|
|
33
|
-
case "accent":
|
|
34
|
-
return "bg-accent";
|
|
35
|
-
case "subtle":
|
|
36
|
-
return "bg-muted/50";
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function getNestedCardTextColor(parentBg, options) {
|
|
41
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
42
|
-
return isDark ? "text-foreground" : "";
|
|
43
|
-
}
|
|
44
14
|
var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
|
|
45
15
|
var DynamicIcon = React.memo(function DynamicIcon2({
|
|
46
16
|
apiKey,
|
|
@@ -425,6 +395,70 @@ var Section = React__default.forwardRef(
|
|
|
425
395
|
}
|
|
426
396
|
);
|
|
427
397
|
Section.displayName = "Section";
|
|
398
|
+
var MOBILE_CLASSES = {
|
|
399
|
+
"fit-left": "items-start md:items-center",
|
|
400
|
+
"fit-center": "items-center",
|
|
401
|
+
"fit-right": "items-end md:items-center",
|
|
402
|
+
"full-left": "items-stretch md:items-center",
|
|
403
|
+
"full-center": "items-stretch md:items-center",
|
|
404
|
+
"full-right": "items-stretch md:items-center"
|
|
405
|
+
};
|
|
406
|
+
function BlockActions({
|
|
407
|
+
mobileConfig,
|
|
408
|
+
actionsClassName,
|
|
409
|
+
verticalSpacing = "mt-4 md:mt-8",
|
|
410
|
+
actions,
|
|
411
|
+
actionsSlot
|
|
412
|
+
}) {
|
|
413
|
+
const width = mobileConfig?.width ?? "full";
|
|
414
|
+
const position = mobileConfig?.position ?? "center";
|
|
415
|
+
const mobileLayoutClass = MOBILE_CLASSES[`${width}-${position}`];
|
|
416
|
+
if (actionsSlot) {
|
|
417
|
+
return /* @__PURE__ */ jsx("div", { children: actionsSlot });
|
|
418
|
+
} else if (actions && actions?.length > 0) {
|
|
419
|
+
return /* @__PURE__ */ jsx(
|
|
420
|
+
"div",
|
|
421
|
+
{
|
|
422
|
+
className: cn(
|
|
423
|
+
"flex flex-col md:flex-row flex-wrap gap-4",
|
|
424
|
+
mobileLayoutClass,
|
|
425
|
+
actionsClassName,
|
|
426
|
+
verticalSpacing
|
|
427
|
+
),
|
|
428
|
+
children: actions.map((action, index) => /* @__PURE__ */ jsx(ActionComponent, { action }, index))
|
|
429
|
+
}
|
|
430
|
+
);
|
|
431
|
+
} else {
|
|
432
|
+
return null;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
function ActionComponent({ action }) {
|
|
436
|
+
const {
|
|
437
|
+
label,
|
|
438
|
+
icon,
|
|
439
|
+
iconAfter,
|
|
440
|
+
children,
|
|
441
|
+
href,
|
|
442
|
+
onClick,
|
|
443
|
+
className: actionClassName,
|
|
444
|
+
...pressableProps
|
|
445
|
+
} = action;
|
|
446
|
+
return /* @__PURE__ */ jsx(
|
|
447
|
+
Pressable,
|
|
448
|
+
{
|
|
449
|
+
href,
|
|
450
|
+
onClick,
|
|
451
|
+
asButton: action.asButton ?? true,
|
|
452
|
+
className: actionClassName,
|
|
453
|
+
...pressableProps,
|
|
454
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
455
|
+
icon,
|
|
456
|
+
label,
|
|
457
|
+
iconAfter
|
|
458
|
+
] })
|
|
459
|
+
}
|
|
460
|
+
);
|
|
461
|
+
}
|
|
428
462
|
var CornerIllustration = (props) => {
|
|
429
463
|
return /* @__PURE__ */ jsxs(
|
|
430
464
|
"svg",
|
|
@@ -478,46 +512,11 @@ function ProcessStickySteps({
|
|
|
478
512
|
stepsClassName,
|
|
479
513
|
stepItemClassName,
|
|
480
514
|
background,
|
|
481
|
-
spacing = "
|
|
515
|
+
spacing = "lg",
|
|
482
516
|
pattern,
|
|
483
|
-
patternOpacity
|
|
517
|
+
patternOpacity,
|
|
518
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8"
|
|
484
519
|
}) {
|
|
485
|
-
const renderActions = useMemo(() => {
|
|
486
|
-
return () => {
|
|
487
|
-
if (actionsSlot) return actionsSlot;
|
|
488
|
-
if (!actions?.length) return null;
|
|
489
|
-
return /* @__PURE__ */ jsx(
|
|
490
|
-
"div",
|
|
491
|
-
{
|
|
492
|
-
className: cn("flex flex-wrap items-center gap-2", actionsClassName),
|
|
493
|
-
children: actions.map((action, index) => {
|
|
494
|
-
const {
|
|
495
|
-
label,
|
|
496
|
-
icon,
|
|
497
|
-
iconAfter,
|
|
498
|
-
children,
|
|
499
|
-
className: actionClassName,
|
|
500
|
-
...pressableProps
|
|
501
|
-
} = action;
|
|
502
|
-
return /* @__PURE__ */ jsx(
|
|
503
|
-
Pressable,
|
|
504
|
-
{
|
|
505
|
-
asButton: true,
|
|
506
|
-
className: cn(actionClassName),
|
|
507
|
-
...pressableProps,
|
|
508
|
-
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
509
|
-
icon,
|
|
510
|
-
label,
|
|
511
|
-
iconAfter
|
|
512
|
-
] })
|
|
513
|
-
},
|
|
514
|
-
index
|
|
515
|
-
);
|
|
516
|
-
})
|
|
517
|
-
}
|
|
518
|
-
);
|
|
519
|
-
};
|
|
520
|
-
}, [actionsSlot, actions, actionsClassName]);
|
|
521
520
|
const renderSteps = useMemo(() => {
|
|
522
521
|
if (stepsSlot) return stepsSlot;
|
|
523
522
|
if (!steps?.length) return null;
|
|
@@ -530,21 +529,28 @@ function ProcessStickySteps({
|
|
|
530
529
|
step.className
|
|
531
530
|
),
|
|
532
531
|
children: [
|
|
533
|
-
/* @__PURE__ */ jsx(
|
|
532
|
+
/* @__PURE__ */ jsx(
|
|
533
|
+
Pressable,
|
|
534
|
+
{
|
|
535
|
+
href: step.href,
|
|
536
|
+
"aria-label": typeof step.title === "string" ? step.title : "View step",
|
|
537
|
+
className: "absolute top-4 right-0 inline-flex",
|
|
538
|
+
children: /* @__PURE__ */ jsx(CornerIllustration, {})
|
|
539
|
+
}
|
|
540
|
+
),
|
|
534
541
|
/* @__PURE__ */ jsx(
|
|
535
542
|
"div",
|
|
536
543
|
{
|
|
537
544
|
className: cn(
|
|
538
545
|
"flex size-12 items-center justify-center px-4 py-1 tracking-tighter",
|
|
539
|
-
|
|
540
|
-
getNestedCardTextColor(background)
|
|
546
|
+
"bg-muted text-muted-foreground"
|
|
541
547
|
),
|
|
542
548
|
children: step.step ?? `0${index + 1}`
|
|
543
549
|
}
|
|
544
550
|
),
|
|
545
551
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
546
|
-
step.title && (typeof step.title === "string" ? /* @__PURE__ */ jsx(
|
|
547
|
-
step.description && (typeof step.description === "string" ? /* @__PURE__ */ jsx("p", {
|
|
552
|
+
step.title && (typeof step.title === "string" ? /* @__PURE__ */ jsx(Pressable, { href: step.href, className: "mb-4 block", children: /* @__PURE__ */ jsx("h3", { className: "text-2xl font-semibold tracking-tighter lg:text-3xl", children: step.title }) }) : /* @__PURE__ */ jsx(Pressable, { href: step.href, className: "mb-4 block", children: step.title })),
|
|
553
|
+
step.description && (typeof step.description === "string" ? /* @__PURE__ */ jsx("p", { children: step.description }) : step.description)
|
|
548
554
|
] })
|
|
549
555
|
]
|
|
550
556
|
},
|
|
@@ -560,6 +566,7 @@ function ProcessStickySteps({
|
|
|
560
566
|
className,
|
|
561
567
|
pattern,
|
|
562
568
|
patternOpacity,
|
|
569
|
+
containerClassName,
|
|
563
570
|
children: /* @__PURE__ */ jsxs(
|
|
564
571
|
"div",
|
|
565
572
|
{
|
|
@@ -570,7 +577,7 @@ function ProcessStickySteps({
|
|
|
570
577
|
children: [
|
|
571
578
|
/* @__PURE__ */ jsxs("div", { className: "top-10 col-span-2 h-fit w-fit gap-3 space-y-7 py-8 lg:sticky", children: [
|
|
572
579
|
/* @__PURE__ */ jsxs("div", { className: "relative w-fit text-5xl font-semibold tracking-tight lg:text-7xl", children: [
|
|
573
|
-
heading && (typeof heading === "string" ? /* @__PURE__ */ jsx("h1", { className: cn("w-fit", headingClassName), children: heading }) :
|
|
580
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsx("h1", { className: cn("w-fit", headingClassName), children: heading }) : heading),
|
|
574
581
|
/* @__PURE__ */ jsx(
|
|
575
582
|
DynamicIcon,
|
|
576
583
|
{
|
|
@@ -580,8 +587,15 @@ function ProcessStickySteps({
|
|
|
580
587
|
}
|
|
581
588
|
)
|
|
582
589
|
] }),
|
|
583
|
-
description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-base ", descriptionClassName), children: description }) :
|
|
584
|
-
|
|
590
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-base ", descriptionClassName), children: description }) : description),
|
|
591
|
+
/* @__PURE__ */ jsx(
|
|
592
|
+
BlockActions,
|
|
593
|
+
{
|
|
594
|
+
actions,
|
|
595
|
+
actionsSlot,
|
|
596
|
+
actionsClassName
|
|
597
|
+
}
|
|
598
|
+
)
|
|
585
599
|
] }),
|
|
586
600
|
renderSteps
|
|
587
601
|
]
|