@syscore/ui-library 2.0.0-beta-publish-workflow-beta.16 → 2.0.0-beta-publish-workflow-beta.17
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/client/components/icons/IconUtility.tsx +353 -0
- package/client/components/icons/X.tsx +4 -3
- package/client/components/ui/alert-v02.tsx +2 -6
- package/client/components/ui/button-v01.tsx +2 -12
- package/client/components/ui/button.tsx +39 -3
- package/client/components/ui/dropdown.tsx +2 -12
- package/client/components/ui/navigation.tsx +25 -4
- package/client/components/ui/radio-v01.tsx +84 -0
- package/client/components/ui/search-field-v01.tsx +10 -28
- package/client/components/ui/section-heading.tsx +1 -1
- package/client/components/ui/sign-in-field-v01.tsx +150 -0
- package/client/global.css +354 -73
- package/client/lib/system-icons.ts +1583 -0
- package/client/lib/utility-icons.ts +121 -0
- package/client/ui/Button.stories.tsx +63 -0
- package/client/ui/Colors.stories.tsx +34 -31
- package/client/ui/Icons.stories.tsx +179 -0
- package/client/ui/RadioGroup/RadioGroup.stories.tsx +1 -1
- package/client/ui/RadioV01/RadioV01.stories.tsx +136 -0
- package/client/ui/SearchField/SearchField.stories.tsx +4 -1
- package/client/ui/TextAreaV01/TextAreaV01.stories.tsx +23 -2
- package/client/ui/TextFieldV01/PasswordFieldV01.stories.tsx +25 -11
- package/client/ui/TextFieldV01/SignInFieldV01.stories.tsx +196 -0
- package/dist/client/assets/alert/icon-clear.svg.js +4 -0
- package/dist/client/assets/alert/icon-done.svg.js +4 -0
- package/dist/client/assets/avatar-identity/placeholder-icon.svg.js +4 -0
- package/dist/client/assets/breadcrumb/icon-ellipsis.svg.js +4 -0
- package/dist/client/assets/breadcrumb/icon-home.svg.js +4 -0
- package/dist/client/assets/breadcrumb/icon-separator.svg.js +4 -0
- package/dist/client/assets/button-v01/icon-back.svg.js +4 -0
- package/dist/client/assets/button-v01/icon-check.svg.js +4 -0
- package/dist/client/assets/button-v01/icon-close.svg.js +4 -0
- package/dist/client/assets/button-v01/icon-delete.svg.js +4 -0
- package/dist/client/assets/button-v01/icon-device.svg.js +4 -0
- package/dist/client/assets/dropdown/icon-carrot-contract.svg.js +4 -0
- package/dist/client/assets/dropdown/icon-carrot-expand.svg.js +4 -0
- package/dist/client/assets/dropdown/icon-clear.svg.js +4 -0
- package/dist/client/assets/dropdown/icon-enter.svg.js +4 -0
- package/dist/client/components/icons/AlphaIcon.js +129 -0
- package/dist/client/components/icons/ConceptIcons.js +905 -0
- package/dist/client/components/icons/IconUtility.js +410 -0
- package/dist/client/components/icons/NavAccount.js +37 -0
- package/dist/client/components/icons/NavBullet.js +17 -0
- package/dist/client/components/icons/NavLogo.js +48 -0
- package/dist/client/components/icons/StandardLogo.js +93 -0
- package/dist/client/components/icons/UtilityAccordion.js +27 -0
- package/dist/client/components/icons/UtilityChangeType.js +26 -0
- package/dist/client/components/icons/UtilityCheck.js +28 -0
- package/dist/client/components/icons/UtilityChevronDown.js +39 -0
- package/dist/client/components/icons/UtilityClassification.js +53 -0
- package/dist/client/components/icons/UtilityClearRegular.js +51 -0
- package/dist/client/components/icons/UtilityClose.js +49 -0
- package/dist/client/components/icons/UtilityCompare.js +91 -0
- package/dist/client/components/icons/UtilityDrag.js +89 -0
- package/dist/client/components/icons/UtilityEdit.js +50 -0
- package/dist/client/components/icons/UtilityFeedback.js +38 -0
- package/dist/client/components/icons/UtilityHome.js +34 -0
- package/dist/client/components/icons/UtilityMessage.js +41 -0
- package/dist/client/components/icons/UtilityOptions.js +53 -0
- package/dist/client/components/icons/UtilityPortfolio.js +116 -0
- package/dist/client/components/icons/UtilityReset.js +49 -0
- package/dist/client/components/icons/UtilityRevisionsHide.js +76 -0
- package/dist/client/components/icons/UtilityRevisionsShow.js +56 -0
- package/dist/client/components/icons/UtilitySave.js +38 -0
- package/dist/client/components/icons/UtilityScopeLarge.js +123 -0
- package/dist/client/components/icons/UtilityScoring.js +51 -0
- package/dist/client/components/icons/UtilitySearch.js +46 -0
- package/dist/client/components/icons/UtilityShow.js +49 -0
- package/dist/client/components/icons/UtilitySort.js +63 -0
- package/dist/client/components/icons/UtilityTarget.js +29 -0
- package/dist/client/components/icons/UtilityTargetActive.js +48 -0
- package/dist/client/components/icons/UtilityText.js +59 -0
- package/dist/client/components/icons/UtilityTrash.js +66 -0
- package/dist/client/components/icons/UtilityTriangleInfo.js +38 -0
- package/dist/client/components/icons/X.js +40 -0
- package/dist/client/components/icons/achievement-badges/BadgeCertificationBronze.js +144 -0
- package/dist/client/components/icons/achievement-badges/BadgeCertificationGold.js +144 -0
- package/dist/client/components/icons/achievement-badges/BadgeCertificationPlatinum.js +144 -0
- package/dist/client/components/icons/achievement-badges/BadgeCertificationSilver.js +144 -0
- package/dist/client/components/icons/achievement-badges/BadgeRatingCoworking.js +91 -0
- package/dist/client/components/icons/achievement-badges/BadgeRatingDesign.js +91 -0
- package/dist/client/components/icons/achievement-badges/BadgeRatingEquity.js +91 -0
- package/dist/client/components/icons/achievement-badges/BadgeRatingHealthySafety.js +93 -0
- package/dist/client/components/icons/achievement-badges/BadgeRatingOperations.js +93 -0
- package/dist/client/components/icons/achievement-badges/BadgeRatingPerformance.js +93 -0
- package/dist/client/components/icons/achievement-badges/BadgeRatingRealEstate.js +93 -0
- package/dist/client/components/icons/achievement-badges/BadgeRatingResidential.js +93 -0
- package/dist/client/components/icons/achievement-badges/BadgeRatingWorkforce.js +91 -0
- package/dist/client/components/icons/imperative-badges/BadgeImperativePrimary.js +58 -0
- package/dist/client/components/icons/imperative-badges/BadgeImperativeSecondary.js +69 -0
- package/dist/client/components/icons/provider-badges/BadgeEnterpriseProvider.js +117 -0
- package/dist/client/components/icons/provider-badges/BadgePerformanceTestingProvider.js +124 -0
- package/dist/client/components/icons/provider-badges/BadgeProductProvider.js +117 -0
- package/dist/client/components/icons/provider-badges/BadgeSurveyProvider.js +117 -0
- package/dist/client/components/icons/provider-seals/SealEnterpriseProvider.js +100 -0
- package/dist/client/components/icons/provider-seals/SealPerformanceTestingProvider.js +100 -0
- package/dist/client/components/icons/provider-seals/SealProductProvider.js +98 -0
- package/dist/client/components/icons/provider-seals/SealProviders.js +98 -0
- package/dist/client/components/icons/provider-seals/SealSurveyProvider.js +98 -0
- package/dist/client/components/icons/seals/IWBILogo.js +301 -0
- package/dist/client/components/icons/seals/SealCertification.js +206 -0
- package/dist/client/components/icons/seals/SealCertificationBronze.js +140 -0
- package/dist/client/components/icons/seals/SealCertificationGold.js +140 -0
- package/dist/client/components/icons/seals/SealCertificationPlatinum.js +140 -0
- package/dist/client/components/icons/seals/SealCertificationSilver.js +140 -0
- package/dist/client/components/icons/seals/SealIwbiMember.js +134 -0
- package/dist/client/components/icons/seals/SealRating.js +157 -0
- package/dist/client/components/icons/seals/SealRatingCoworking.js +89 -0
- package/dist/client/components/icons/seals/SealRatingDesign.js +89 -0
- package/dist/client/components/icons/seals/SealRatingEquity.js +89 -0
- package/dist/client/components/icons/seals/SealRatingHealthSafety.js +91 -0
- package/dist/client/components/icons/seals/SealRatingOperations.js +89 -0
- package/dist/client/components/icons/seals/SealRatingPerformance.js +91 -0
- package/dist/client/components/icons/seals/SealRatingRealEstate.js +89 -0
- package/dist/client/components/icons/seals/SealRatingWorkforce.js +89 -0
- package/dist/client/components/icons/seals/SealWell.js +132 -0
- package/dist/client/components/icons/seals/SealWellCertification.js +225 -0
- package/dist/client/components/icons/seals/SealWellCommunity.js +197 -0
- package/dist/client/components/icons/seals/SealWellResidence.js +197 -0
- package/dist/client/components/icons/seals/SealWorksWithWell.js +227 -0
- package/dist/client/components/icons/seals/WaterMarkWWWProducts.js +27 -0
- package/dist/client/components/icons/seals/WaterMarkWellProjects.js +36 -0
- package/dist/client/components/icons/seals/WatermarkMemberOrg.js +24 -0
- package/dist/client/components/ui/accordion.js +326 -0
- package/dist/client/components/ui/alert-dialog-panel.js +156 -0
- package/dist/client/components/ui/alert-dialog.js +103 -0
- package/dist/client/components/ui/alert-v02.js +157 -0
- package/dist/client/components/ui/alert.js +55 -0
- package/dist/client/components/ui/app-bar.js +203 -0
- package/dist/client/components/ui/aspect-ratio.js +5 -0
- package/dist/client/components/ui/avatar-identity.js +93 -0
- package/dist/client/components/ui/avatar.js +56 -0
- package/dist/client/components/ui/back-link.js +27 -0
- package/dist/client/components/ui/banner.js +75 -0
- package/dist/client/components/ui/bottom-navigation.js +127 -0
- package/dist/client/components/ui/breadcrumb-trail.js +137 -0
- package/dist/client/components/ui/breadcrumb.js +91 -0
- package/dist/client/components/ui/button-v01.js +173 -0
- package/dist/client/components/ui/button.js +99 -0
- package/dist/client/components/ui/calendar.js +62 -0
- package/dist/client/components/ui/card.js +177 -0
- package/dist/client/components/ui/carousel.js +198 -0
- package/dist/client/components/ui/centered-page.js +10 -0
- package/dist/client/components/ui/chart.js +239 -0
- package/dist/client/components/ui/checkbox-field.js +39 -0
- package/dist/client/components/ui/checkbox.js +18 -0
- package/dist/client/components/ui/code-badge.js +29 -0
- package/dist/client/components/ui/collapsible.js +9 -0
- package/dist/client/components/ui/command.js +79 -0
- package/dist/client/components/ui/context-menu.js +138 -0
- package/dist/client/components/ui/copy.js +39 -0
- package/dist/client/components/ui/credit-card-preview.js +74 -0
- package/dist/client/components/ui/data-grid.js +156 -0
- package/dist/client/components/ui/date-picker.js +142 -0
- package/dist/client/components/ui/dialog.js +179 -0
- package/dist/client/components/ui/drawer.js +95 -0
- package/dist/client/components/ui/drop-zone.js +87 -0
- package/dist/client/components/ui/dropdown-menu.js +139 -0
- package/dist/client/components/ui/dropdown.js +339 -0
- package/dist/client/components/ui/empty-state.js +76 -0
- package/dist/client/components/ui/field-group.js +32 -0
- package/dist/client/components/ui/file-upload-trigger.js +70 -0
- package/dist/client/components/ui/file-upload.js +171 -0
- package/dist/client/components/ui/footer.js +97 -0
- package/dist/client/components/ui/form.js +109 -0
- package/dist/client/components/ui/height-container.js +41 -0
- package/dist/client/components/ui/hero-section.js +44 -0
- package/dist/client/components/ui/hero-split-image.js +45 -0
- package/dist/client/components/ui/hover-card.js +22 -0
- package/dist/client/components/ui/icon-button.js +30 -0
- package/dist/client/components/ui/inline-notice.js +19 -0
- package/dist/client/components/ui/input-otp.js +46 -0
- package/dist/client/components/ui/input.js +37 -0
- package/dist/client/components/ui/label.js +31 -0
- package/dist/client/components/ui/labeled-divider.js +23 -0
- package/dist/client/components/ui/layout.js +724 -0
- package/dist/client/components/ui/menubar.js +157 -0
- package/dist/client/components/ui/meta-row.js +19 -0
- package/dist/client/components/ui/mobile-nav.js +230 -0
- package/dist/client/components/ui/modal-panel.js +116 -0
- package/dist/client/components/ui/navigation-menu.js +89 -0
- package/dist/client/components/ui/navigation.js +452 -0
- package/dist/client/components/ui/outline-node.js +57 -0
- package/dist/client/components/ui/page-header.js +79 -0
- package/dist/client/components/ui/pagination-v01.js +124 -0
- package/dist/client/components/ui/pagination.js +105 -0
- package/dist/client/components/ui/password-field-v01.js +46 -0
- package/dist/client/components/ui/pill-button.js +34 -0
- package/dist/client/components/ui/popover.js +22 -0
- package/dist/client/components/ui/price-tag.js +20 -0
- package/dist/client/components/ui/profile-avatar.js +92 -0
- package/dist/client/components/ui/progress.js +23 -0
- package/dist/client/components/ui/radio-card.js +30 -0
- package/dist/client/components/ui/radio-group.js +32 -0
- package/dist/client/components/ui/radio-v01.js +58 -0
- package/dist/client/components/ui/resizable.js +32 -0
- package/dist/client/components/ui/resource-thumbnail.js +24 -0
- package/dist/client/components/ui/scroll-area.js +37 -0
- package/dist/client/components/ui/search-field-v01.js +111 -0
- package/dist/client/components/ui/search.js +109 -0
- package/dist/client/components/ui/section-badge.js +22 -0
- package/dist/client/components/ui/section-heading.js +21 -0
- package/dist/client/components/ui/select.js +96 -0
- package/dist/client/components/ui/separator.js +24 -0
- package/dist/client/components/ui/sheet.js +106 -0
- package/dist/client/components/ui/side-nav.js +173 -0
- package/dist/client/components/ui/sidebar.js +580 -0
- package/dist/client/components/ui/sign-in-field-v01.js +107 -0
- package/dist/client/components/ui/skeleton.js +17 -0
- package/dist/client/components/ui/slider.js +20 -0
- package/dist/client/components/ui/social-button.js +34 -0
- package/dist/client/components/ui/standard-navigation.js +454 -0
- package/dist/client/components/ui/status-pill.js +42 -0
- package/dist/client/components/ui/stepper.js +111 -0
- package/dist/client/components/ui/switch-v01.js +39 -0
- package/dist/client/components/ui/switch.js +17 -0
- package/dist/client/components/ui/system-bar.js +76 -0
- package/dist/client/components/ui/table.js +107 -0
- package/dist/client/components/ui/tabs-v01.js +74 -0
- package/dist/client/components/ui/tabs.js +253 -0
- package/dist/client/components/ui/tag-v02.js +85 -0
- package/dist/client/components/ui/tag.js +73 -0
- package/dist/client/components/ui/text-area-v01.js +26 -0
- package/dist/client/components/ui/text-field-v01.js +78 -0
- package/dist/client/components/ui/text-link.js +23 -0
- package/dist/client/components/ui/textarea.js +19 -0
- package/dist/client/components/ui/timeline.js +87 -0
- package/dist/client/components/ui/toast-v01.js +155 -0
- package/dist/client/components/ui/toast.js +88 -0
- package/dist/client/components/ui/toaster.js +22 -0
- package/dist/client/components/ui/toggle.js +56 -0
- package/dist/client/components/ui/tooltip.js +328 -0
- package/dist/client/components/ui/typography.js +119 -0
- package/dist/client/hooks/use-mobile.js +20 -0
- package/dist/client/hooks/use-segmented-control.js +32 -0
- package/dist/client/hooks/use-tabs.js +22 -0
- package/dist/client/hooks/use-toast.js +122 -0
- package/dist/client/lib/concept-colors.js +74 -0
- package/dist/client/lib/concept-icons.js +32 -0
- package/dist/client/lib/utility-icons.js +73 -0
- package/dist/client/lib/utils.js +13 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +156 -0
- package/dist/ui/index.js +774 -0
- package/package.json +9 -6
- package/dist/index.cjs.js +0 -1
- package/dist/index.es.js +0 -18989
- /package/{dist → client}/fonts/FT-Made/FTMade-Regular.otf +0 -0
- /package/{dist → client}/fonts/FT-Made/FTMade-Regular.ttf +0 -0
- /package/{dist → client}/fonts/FT-Made/FTMade-Regular.woff +0 -0
- /package/{dist → client}/fonts/FT-Made/FTMade-Regular.woff2 +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-black.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-blackitalic.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-bold.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-bolditalic.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-extrabold.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-extrabolditalic.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-extralight.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-extralightitalic.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-italic.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-light.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-lightitalic.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-medium.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-mediumitalic.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-regular.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-semibold.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-semibolditalic.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-thin.otf +0 -0
- /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-thinitalic.otf +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
const Slider = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
6
|
+
SliderPrimitive.Root,
|
|
7
|
+
{
|
|
8
|
+
ref,
|
|
9
|
+
className: cn("slider", className),
|
|
10
|
+
...props,
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "slider-track", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "slider-range" }) }),
|
|
13
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "slider-thumb" })
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
));
|
|
17
|
+
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
18
|
+
export {
|
|
19
|
+
Slider
|
|
20
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
const SocialButton = React.forwardRef(
|
|
5
|
+
({
|
|
6
|
+
iconSrc,
|
|
7
|
+
iconWidth = 24,
|
|
8
|
+
iconHeight = 24,
|
|
9
|
+
icon,
|
|
10
|
+
children,
|
|
11
|
+
className,
|
|
12
|
+
type = "button",
|
|
13
|
+
...props
|
|
14
|
+
}, ref) => {
|
|
15
|
+
const mark = icon ?? (iconSrc ? /* @__PURE__ */ jsx("img", { src: iconSrc, alt: "", width: iconWidth, height: iconHeight }) : null);
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
"button",
|
|
18
|
+
{
|
|
19
|
+
ref,
|
|
20
|
+
type,
|
|
21
|
+
className: cn("social-button", className),
|
|
22
|
+
...props,
|
|
23
|
+
children: /* @__PURE__ */ jsxs("span", { className: "social-button__content", children: [
|
|
24
|
+
mark ? /* @__PURE__ */ jsx("span", { className: "social-button__icon", "aria-hidden": "true", children: mark }) : null,
|
|
25
|
+
/* @__PURE__ */ jsx("span", { className: "social-button__label", children })
|
|
26
|
+
] })
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
SocialButton.displayName = "SocialButton";
|
|
32
|
+
export {
|
|
33
|
+
SocialButton
|
|
34
|
+
};
|
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { motion, AnimatePresence } from "motion/react";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import { UtilityClearRegular } from "../icons/UtilityClearRegular.js";
|
|
6
|
+
import { NavBullet } from "../icons/NavBullet.js";
|
|
7
|
+
import { Button } from "./button.js";
|
|
8
|
+
import { StandardLogo } from "../icons/StandardLogo.js";
|
|
9
|
+
import { NavLogo } from "../icons/NavLogo.js";
|
|
10
|
+
const ALPHA_PATH$1 = "M5.3387 0.0229882C5.37971 0.0229882 5.45295 0.0199228 5.5584 0.0137925C5.66386 0.00459714 5.74442 0 5.80007 0C6.72867 0 7.49908 0.269732 8.11131 0.809196C8.72354 1.34559 9.14097 2.09195 9.3636 3.04828C9.44855 3.47433 9.49835 3.96628 9.513 4.52414V5.16782C10.2014 4.07663 10.7287 2.85517 11.0948 1.50345C11.1505 1.29808 11.1959 1.17701 11.2311 1.14023C11.2662 1.10345 11.3761 1.08506 11.5606 1.08506C11.8535 1.08506 12 1.13563 12 1.23678C12 1.25211 11.9722 1.37778 11.9165 1.61379C11.5093 3.24751 10.7931 4.77701 9.76785 6.2023L9.53497 6.51034L9.55694 7.04368C9.59795 8.23295 9.72391 8.9318 9.93482 9.14023C9.97583 9.16782 10.0388 9.18161 10.1238 9.18161C10.32 9.15402 10.5031 9.06973 10.673 8.92874C10.8429 8.78774 10.963 8.62222 11.0333 8.43218C11.0597 8.32797 11.0948 8.26513 11.1388 8.24368C11.1798 8.22222 11.2852 8.21149 11.4551 8.21149C11.7364 8.21149 11.877 8.27739 11.877 8.40919C11.877 8.49808 11.8345 8.63142 11.7495 8.8092C11.5943 9.13103 11.3687 9.4069 11.0729 9.63678C10.777 9.8636 10.4475 9.97701 10.0842 9.97701H9.93482C8.97986 9.97701 8.3398 9.44674 8.01465 8.38621L7.95313 8.23448C7.20615 8.74942 6.79165 9.02835 6.70963 9.07126C5.66679 9.69042 4.61809 10 3.56353 10C2.56756 10 1.76346 9.70575 1.15123 9.11724C0.538997 8.52874 0.162578 7.75632 0.02197 6.8C0.0073233 6.71111 0 6.54866 0 6.31264C0 5.9295 0.02197 5.62146 0.0659099 5.38851C0.276822 4.06437 0.887587 2.8751 1.89821 1.82069C2.91175 0.769348 4.05859 0.170115 5.3387 0.0229882ZM1.83669 7.10805C1.83669 7.73946 1.9978 8.24368 2.32003 8.62069C2.64518 8.99464 3.09484 9.18161 3.66899 9.18161C4.03515 9.18161 4.44379 9.12337 4.89491 9.0069C5.6829 8.80153 6.44892 8.4046 7.19297 7.81609C7.29257 7.74253 7.38777 7.66437 7.47858 7.58161C7.56939 7.50192 7.64262 7.43295 7.69828 7.37471L7.78176 7.28276L7.76419 7.08506C7.76419 6.95326 7.75979 6.75862 7.75101 6.50115C7.74515 6.24368 7.74222 5.98927 7.74222 5.73793C7.72757 5.18008 7.71732 4.74636 7.71146 4.43678C7.70267 4.1272 7.67338 3.74866 7.62358 3.30115C7.57671 2.85364 7.5108 2.50728 7.42585 2.26207C7.3409 2.01992 7.22519 1.77471 7.07873 1.52644C6.92933 1.2751 6.73892 1.09425 6.50751 0.983908C6.27609 0.873563 6.00513 0.81839 5.69462 0.81839C4.72501 0.81839 3.87404 1.35479 3.14171 2.42759C2.79019 2.97318 2.49579 3.71647 2.25851 4.65747C1.9773 5.73333 1.83669 6.55019 1.83669 7.10805Z";
|
|
11
|
+
const PATH_LENGTH$1 = 60;
|
|
12
|
+
const AlphaIcon$1 = ({ dark }) => {
|
|
13
|
+
if (dark) {
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
"svg",
|
|
16
|
+
{
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18
|
+
width: "12",
|
|
19
|
+
height: "10",
|
|
20
|
+
viewBox: "0 0 12 10",
|
|
21
|
+
fill: "none",
|
|
22
|
+
className: "mt-1.5",
|
|
23
|
+
style: { overflow: "visible" },
|
|
24
|
+
children: /* @__PURE__ */ jsx("path", { d: ALPHA_PATH$1, fill: "currentColor" })
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
return /* @__PURE__ */ jsxs(
|
|
29
|
+
"svg",
|
|
30
|
+
{
|
|
31
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
32
|
+
width: "12",
|
|
33
|
+
height: "10",
|
|
34
|
+
viewBox: "0 0 12 10",
|
|
35
|
+
fill: "none",
|
|
36
|
+
className: "mt-1.5",
|
|
37
|
+
style: { overflow: "visible" },
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ jsx(
|
|
40
|
+
"path",
|
|
41
|
+
{
|
|
42
|
+
d: ALPHA_PATH$1,
|
|
43
|
+
fill: "url(#paint0_linear_10081_30848)",
|
|
44
|
+
opacity: "0.4"
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ jsx(
|
|
48
|
+
motion.path,
|
|
49
|
+
{
|
|
50
|
+
d: ALPHA_PATH$1,
|
|
51
|
+
fill: "none",
|
|
52
|
+
stroke: "url(#stroke_gradient)",
|
|
53
|
+
strokeWidth: "0.4",
|
|
54
|
+
strokeLinecap: "round",
|
|
55
|
+
strokeLinejoin: "round",
|
|
56
|
+
initial: { strokeDashoffset: PATH_LENGTH$1 },
|
|
57
|
+
animate: { strokeDashoffset: -PATH_LENGTH$1 },
|
|
58
|
+
style: { strokeDasharray: `8 ${PATH_LENGTH$1 - 8}` },
|
|
59
|
+
transition: {
|
|
60
|
+
duration: 2,
|
|
61
|
+
repeat: Infinity,
|
|
62
|
+
repeatDelay: 8,
|
|
63
|
+
ease: "linear"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
68
|
+
/* @__PURE__ */ jsxs(
|
|
69
|
+
"linearGradient",
|
|
70
|
+
{
|
|
71
|
+
id: "paint0_linear_10081_30848",
|
|
72
|
+
x1: "-3.27254",
|
|
73
|
+
y1: "4.99923",
|
|
74
|
+
x2: "6.36738",
|
|
75
|
+
y2: "-2.36962",
|
|
76
|
+
gradientUnits: "userSpaceOnUse",
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#8AEFDB" }),
|
|
79
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.5", stopColor: "#D4BACE" }),
|
|
80
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#CBE0F1" })
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ jsxs(
|
|
85
|
+
"linearGradient",
|
|
86
|
+
{
|
|
87
|
+
id: "stroke_gradient",
|
|
88
|
+
x1: "0",
|
|
89
|
+
y1: "0",
|
|
90
|
+
x2: "12",
|
|
91
|
+
y2: "10",
|
|
92
|
+
gradientUnits: "userSpaceOnUse",
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#8AEFDB" }),
|
|
95
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.5", stopColor: "#D4BACE" }),
|
|
96
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#CBE0F1" })
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
] })
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
};
|
|
105
|
+
const StandardNavigation = ({
|
|
106
|
+
navLinks = [],
|
|
107
|
+
logo: Logo,
|
|
108
|
+
userIcon: UserIcon,
|
|
109
|
+
beforeActions,
|
|
110
|
+
userDropdown,
|
|
111
|
+
isStrategy = false,
|
|
112
|
+
showAlpha = true,
|
|
113
|
+
showClose = true,
|
|
114
|
+
Link: LinkComponent,
|
|
115
|
+
onLinkClick,
|
|
116
|
+
onClose
|
|
117
|
+
}) => {
|
|
118
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
119
|
+
const [activeItem, setActiveItem] = React.useState(null);
|
|
120
|
+
const [isUserDropdownOpen, setIsUserDropdownOpen] = React.useState(false);
|
|
121
|
+
const containerRef = React.useRef(null);
|
|
122
|
+
const menuRef = React.useRef(null);
|
|
123
|
+
const menuItemsRef = React.useRef(null);
|
|
124
|
+
const overlayRef = React.useRef(null);
|
|
125
|
+
const userDropdownRef = React.useRef(null);
|
|
126
|
+
const handleMouseLeave = () => {
|
|
127
|
+
setIsOpen(false);
|
|
128
|
+
setActiveItem(null);
|
|
129
|
+
};
|
|
130
|
+
const handleNavItemMouseEnter = (index) => {
|
|
131
|
+
const item = navLinks[index];
|
|
132
|
+
if (item == null ? void 0 : item.section) {
|
|
133
|
+
setIsOpen(true);
|
|
134
|
+
setActiveItem(index + 1);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
const handleUserIconClick = (e) => {
|
|
138
|
+
e.preventDefault();
|
|
139
|
+
if (userDropdown) {
|
|
140
|
+
setIsUserDropdownOpen(!isUserDropdownOpen);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
React.useEffect(() => {
|
|
144
|
+
const handleClickOutside = (event) => {
|
|
145
|
+
const target = event.target;
|
|
146
|
+
if (userDropdownRef.current && !userDropdownRef.current.contains(target)) {
|
|
147
|
+
setIsUserDropdownOpen(false);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
if (isUserDropdownOpen) {
|
|
151
|
+
setTimeout(() => {
|
|
152
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
153
|
+
}, 0);
|
|
154
|
+
return () => {
|
|
155
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
}, [isUserDropdownOpen]);
|
|
159
|
+
const NavLink = ({ href, className, "aria-label": ariaLabel, children }) => {
|
|
160
|
+
if (LinkComponent) {
|
|
161
|
+
return /* @__PURE__ */ jsx(LinkComponent, { href, className, "aria-label": ariaLabel, children });
|
|
162
|
+
}
|
|
163
|
+
if (onLinkClick) {
|
|
164
|
+
return /* @__PURE__ */ jsx(
|
|
165
|
+
"a",
|
|
166
|
+
{
|
|
167
|
+
href,
|
|
168
|
+
className,
|
|
169
|
+
"aria-label": ariaLabel,
|
|
170
|
+
onClick: (e) => {
|
|
171
|
+
e.preventDefault();
|
|
172
|
+
onLinkClick(href);
|
|
173
|
+
},
|
|
174
|
+
children
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
return /* @__PURE__ */ jsx("a", { href, className, "aria-label": ariaLabel, children });
|
|
179
|
+
};
|
|
180
|
+
const renderNavLinkItem = (link) => {
|
|
181
|
+
const href = link.href || "#";
|
|
182
|
+
const hasBullet = link.bulletColor !== void 0;
|
|
183
|
+
const hasBadge = !!link.badge;
|
|
184
|
+
const isSmall = hasBullet || link.children;
|
|
185
|
+
if (hasBullet) {
|
|
186
|
+
return /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
187
|
+
link.bulletColor && link.bulletColor !== "" ? /* @__PURE__ */ jsx(NavBullet, { color: link.bulletColor }) : /* @__PURE__ */ jsx("div", { className: "navigation-tray-bullet" }),
|
|
188
|
+
/* @__PURE__ */ jsx(
|
|
189
|
+
NavLink,
|
|
190
|
+
{
|
|
191
|
+
href,
|
|
192
|
+
className: "navigation-tray-link-small",
|
|
193
|
+
children: link.label
|
|
194
|
+
}
|
|
195
|
+
)
|
|
196
|
+
] });
|
|
197
|
+
}
|
|
198
|
+
if (hasBadge) {
|
|
199
|
+
return /* @__PURE__ */ jsxs(
|
|
200
|
+
NavLink,
|
|
201
|
+
{
|
|
202
|
+
href,
|
|
203
|
+
className: "navigation-tray-link navigation-tray-link--with-badge",
|
|
204
|
+
children: [
|
|
205
|
+
link.label,
|
|
206
|
+
/* @__PURE__ */ jsx("span", { className: "navigation-tray-badge", children: link.badge })
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
return /* @__PURE__ */ jsx(
|
|
212
|
+
NavLink,
|
|
213
|
+
{
|
|
214
|
+
href,
|
|
215
|
+
className: isSmall ? "navigation-tray-link-small" : "navigation-tray-link",
|
|
216
|
+
children: link.label
|
|
217
|
+
}
|
|
218
|
+
);
|
|
219
|
+
};
|
|
220
|
+
const renderNavColumn = (column) => {
|
|
221
|
+
if (!column.links || column.links.length === 0) return null;
|
|
222
|
+
const hasSpacing = column.links.some(
|
|
223
|
+
(link) => !link.bulletColor && !link.children
|
|
224
|
+
);
|
|
225
|
+
return /* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
226
|
+
column.title && /* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: column.title }),
|
|
227
|
+
/* @__PURE__ */ jsx(
|
|
228
|
+
"ul",
|
|
229
|
+
{
|
|
230
|
+
className: cn(
|
|
231
|
+
"navigation-tray-column-list",
|
|
232
|
+
hasSpacing && "navigation-tray-column-list--spacing-5"
|
|
233
|
+
),
|
|
234
|
+
children: column.links.map((link, idx) => /* @__PURE__ */ jsx("li", { children: renderNavLinkItem(link) }, idx))
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
] }, column.title || "column");
|
|
238
|
+
};
|
|
239
|
+
const renderTraySection = () => {
|
|
240
|
+
if (!activeItem) return null;
|
|
241
|
+
const activeNavItem = navLinks[activeItem - 1];
|
|
242
|
+
if (!(activeNavItem == null ? void 0 : activeNavItem.section)) return null;
|
|
243
|
+
const section = activeNavItem.section;
|
|
244
|
+
return /* @__PURE__ */ jsxs("div", { className: "navigation-tray-section", children: [
|
|
245
|
+
section.heading && /* @__PURE__ */ jsx(
|
|
246
|
+
"h2",
|
|
247
|
+
{
|
|
248
|
+
className: "navigation-tray-heading",
|
|
249
|
+
style: section.headingGradient ? {
|
|
250
|
+
background: section.headingGradient,
|
|
251
|
+
WebkitBackgroundClip: "text",
|
|
252
|
+
WebkitTextFillColor: "transparent",
|
|
253
|
+
backgroundClip: "text"
|
|
254
|
+
} : void 0,
|
|
255
|
+
children: section.heading
|
|
256
|
+
}
|
|
257
|
+
),
|
|
258
|
+
section.columns && section.columns.length > 0 && /* @__PURE__ */ jsx("div", { className: "navigation-tray-columns", children: section.columns.map((column, idx) => renderNavColumn(column)) })
|
|
259
|
+
] });
|
|
260
|
+
};
|
|
261
|
+
return /* @__PURE__ */ jsxs(
|
|
262
|
+
"nav",
|
|
263
|
+
{
|
|
264
|
+
ref: containerRef,
|
|
265
|
+
className: cn("navigation", isStrategy && "navigation--strategy"),
|
|
266
|
+
"data-strategy": isStrategy,
|
|
267
|
+
onMouseLeave: handleMouseLeave,
|
|
268
|
+
children: [
|
|
269
|
+
!isStrategy && /* @__PURE__ */ jsx(
|
|
270
|
+
"div",
|
|
271
|
+
{
|
|
272
|
+
ref: overlayRef,
|
|
273
|
+
className: "navigation-overlay",
|
|
274
|
+
"data-open": isOpen
|
|
275
|
+
}
|
|
276
|
+
),
|
|
277
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-container", children: [
|
|
278
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-logo-container", children: [
|
|
279
|
+
isStrategy && showClose ? /* @__PURE__ */ jsx(
|
|
280
|
+
Button,
|
|
281
|
+
{
|
|
282
|
+
className: "navigation-close-button",
|
|
283
|
+
size: "icon",
|
|
284
|
+
onClick: (e) => {
|
|
285
|
+
e.preventDefault();
|
|
286
|
+
if (onClose) {
|
|
287
|
+
onClose();
|
|
288
|
+
} else if (onLinkClick) {
|
|
289
|
+
onLinkClick("/");
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
children: /* @__PURE__ */ jsx(UtilityClearRegular, { className: "navigation-close-icon" })
|
|
293
|
+
}
|
|
294
|
+
) : null,
|
|
295
|
+
/* @__PURE__ */ jsx(
|
|
296
|
+
NavLink,
|
|
297
|
+
{
|
|
298
|
+
href: "/",
|
|
299
|
+
className: cn(
|
|
300
|
+
"navigation-logo-link",
|
|
301
|
+
isStrategy && "navigation-logo-link--strategy"
|
|
302
|
+
),
|
|
303
|
+
"data-strategy": isStrategy,
|
|
304
|
+
"aria-label": "Home",
|
|
305
|
+
children: Logo ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
306
|
+
/* @__PURE__ */ jsx(NavLogo, { dark: isStrategy }),
|
|
307
|
+
/* @__PURE__ */ jsx(StandardLogo, { className: cn(!isStrategy ? "text-white" : "text-black") }),
|
|
308
|
+
showAlpha ? /* @__PURE__ */ jsx(AlphaIcon$1, { dark: isStrategy }) : null
|
|
309
|
+
] }) : null
|
|
310
|
+
}
|
|
311
|
+
)
|
|
312
|
+
] }),
|
|
313
|
+
navLinks.length > 0 ? /* @__PURE__ */ jsx("div", { className: "navigation-nav-container", children: /* @__PURE__ */ jsx("ul", { className: "navigation-nav-list", children: navLinks.map((item, index) => /* @__PURE__ */ jsxs(
|
|
314
|
+
"li",
|
|
315
|
+
{
|
|
316
|
+
className: "navigation-nav-item",
|
|
317
|
+
onMouseEnter: () => handleNavItemMouseEnter(index),
|
|
318
|
+
children: [
|
|
319
|
+
item.href ? /* @__PURE__ */ jsx(
|
|
320
|
+
NavLink,
|
|
321
|
+
{
|
|
322
|
+
href: item.href,
|
|
323
|
+
className: cn(
|
|
324
|
+
"navigation-nav-link",
|
|
325
|
+
isStrategy && "navigation-nav-link--strategy"
|
|
326
|
+
),
|
|
327
|
+
children: item.label
|
|
328
|
+
}
|
|
329
|
+
) : /* @__PURE__ */ jsx(
|
|
330
|
+
"span",
|
|
331
|
+
{
|
|
332
|
+
className: cn(
|
|
333
|
+
"navigation-nav-link",
|
|
334
|
+
isStrategy && "navigation-nav-link--strategy"
|
|
335
|
+
),
|
|
336
|
+
children: item.label
|
|
337
|
+
}
|
|
338
|
+
),
|
|
339
|
+
activeItem === index + 1 && /* @__PURE__ */ jsx(
|
|
340
|
+
motion.div,
|
|
341
|
+
{
|
|
342
|
+
id: "underline",
|
|
343
|
+
className: "navigation-underline",
|
|
344
|
+
layoutId: "underline",
|
|
345
|
+
transition: { duration: 0.2, ease: "easeOut" },
|
|
346
|
+
children: /* @__PURE__ */ jsx(
|
|
347
|
+
"div",
|
|
348
|
+
{
|
|
349
|
+
className: "navigation-underline-circle navigation-underline-circle--gradient",
|
|
350
|
+
style: {
|
|
351
|
+
width: "10px",
|
|
352
|
+
height: "5px",
|
|
353
|
+
borderBottomLeftRadius: "100px",
|
|
354
|
+
borderBottomRightRadius: "100px",
|
|
355
|
+
borderBottom: "0",
|
|
356
|
+
boxSizing: "border-box"
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
)
|
|
360
|
+
}
|
|
361
|
+
),
|
|
362
|
+
index === 0 && /* @__PURE__ */ jsx(
|
|
363
|
+
"div",
|
|
364
|
+
{
|
|
365
|
+
className: "navigation-underline navigation-underline--static",
|
|
366
|
+
style: { transition: "all 0.2s ease-out" },
|
|
367
|
+
children: /* @__PURE__ */ jsx(
|
|
368
|
+
"div",
|
|
369
|
+
{
|
|
370
|
+
className: "navigation-underline-circle navigation-underline-circle--white",
|
|
371
|
+
style: {
|
|
372
|
+
width: "10px",
|
|
373
|
+
height: "5px",
|
|
374
|
+
borderTopLeftRadius: "100px",
|
|
375
|
+
borderTopRightRadius: "100px",
|
|
376
|
+
borderBottom: "0",
|
|
377
|
+
boxSizing: "border-box"
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
)
|
|
381
|
+
}
|
|
382
|
+
)
|
|
383
|
+
]
|
|
384
|
+
},
|
|
385
|
+
index
|
|
386
|
+
)) }) }) : null,
|
|
387
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-actions", children: [
|
|
388
|
+
beforeActions && /* @__PURE__ */ jsx("div", { className: "navigation-actions-before", children: beforeActions }),
|
|
389
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-account-wrapper", ref: userDropdownRef, children: [
|
|
390
|
+
userDropdown ? /* @__PURE__ */ jsx(
|
|
391
|
+
"button",
|
|
392
|
+
{
|
|
393
|
+
type: "button",
|
|
394
|
+
"aria-label": "Account menu",
|
|
395
|
+
"aria-expanded": isUserDropdownOpen,
|
|
396
|
+
className: cn(
|
|
397
|
+
"navigation-account-link",
|
|
398
|
+
isUserDropdownOpen && "navigation-account-link--open"
|
|
399
|
+
),
|
|
400
|
+
"data-open": isOpen,
|
|
401
|
+
"data-strategy": isStrategy,
|
|
402
|
+
onClick: handleUserIconClick,
|
|
403
|
+
children: UserIcon ? /* @__PURE__ */ jsx(
|
|
404
|
+
UserIcon,
|
|
405
|
+
{
|
|
406
|
+
className: cn(
|
|
407
|
+
"navigation-account-icon",
|
|
408
|
+
isStrategy ? "navigation-account-icon--strategy" : "navigation-account-icon--default"
|
|
409
|
+
)
|
|
410
|
+
}
|
|
411
|
+
) : /* @__PURE__ */ jsx("div", { className: "navigation-account-icon-placeholder", children: "User" })
|
|
412
|
+
}
|
|
413
|
+
) : /* @__PURE__ */ jsx(
|
|
414
|
+
NavLink,
|
|
415
|
+
{
|
|
416
|
+
href: "/",
|
|
417
|
+
"aria-label": "Account link",
|
|
418
|
+
className: "navigation-account-link",
|
|
419
|
+
"data-open": isOpen,
|
|
420
|
+
"data-strategy": isStrategy,
|
|
421
|
+
children: UserIcon ? /* @__PURE__ */ jsx(
|
|
422
|
+
UserIcon,
|
|
423
|
+
{
|
|
424
|
+
className: cn(
|
|
425
|
+
"navigation-account-icon",
|
|
426
|
+
isStrategy ? "navigation-account-icon--strategy" : "navigation-account-icon--default"
|
|
427
|
+
)
|
|
428
|
+
}
|
|
429
|
+
) : /* @__PURE__ */ jsx("div", { className: "navigation-account-icon-placeholder", children: "User" })
|
|
430
|
+
}
|
|
431
|
+
),
|
|
432
|
+
isUserDropdownOpen && userDropdown && /* @__PURE__ */ jsx("div", { className: "navigation-user-dropdown", children: userDropdown })
|
|
433
|
+
] })
|
|
434
|
+
] })
|
|
435
|
+
] }),
|
|
436
|
+
isOpen && /* @__PURE__ */ jsx("div", { className: "navigation-divider" }),
|
|
437
|
+
/* @__PURE__ */ jsx("div", { ref: menuRef, className: "navigation-tray", "data-open": isOpen, children: /* @__PURE__ */ jsx("div", { className: "navigation-tray-content", children: /* @__PURE__ */ jsx("div", { ref: menuItemsRef, className: "navigation-tray-grid", children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsx(
|
|
438
|
+
motion.div,
|
|
439
|
+
{
|
|
440
|
+
initial: { y: 10, opacity: 0 },
|
|
441
|
+
animate: { y: 0, opacity: 1 },
|
|
442
|
+
exit: { y: -10, opacity: 0 },
|
|
443
|
+
transition: { duration: 0.2 },
|
|
444
|
+
children: renderTraySection()
|
|
445
|
+
},
|
|
446
|
+
activeItem ? activeItem : "empty"
|
|
447
|
+
) }) }) }) })
|
|
448
|
+
]
|
|
449
|
+
}
|
|
450
|
+
);
|
|
451
|
+
};
|
|
452
|
+
export {
|
|
453
|
+
StandardNavigation
|
|
454
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
const TONES = [
|
|
5
|
+
"unpaid",
|
|
6
|
+
"paid",
|
|
7
|
+
"waived",
|
|
8
|
+
"void",
|
|
9
|
+
"neutral",
|
|
10
|
+
"info",
|
|
11
|
+
"success",
|
|
12
|
+
"warning",
|
|
13
|
+
"danger",
|
|
14
|
+
"accent",
|
|
15
|
+
"inactive",
|
|
16
|
+
"plain"
|
|
17
|
+
];
|
|
18
|
+
function toneForStatus(status) {
|
|
19
|
+
const value = String(status ?? "").toLowerCase();
|
|
20
|
+
return TONES.includes(value) ? value : "neutral";
|
|
21
|
+
}
|
|
22
|
+
const StatusPill = React.forwardRef(
|
|
23
|
+
({ tone = "neutral", appearance = "default", children, className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
24
|
+
"span",
|
|
25
|
+
{
|
|
26
|
+
ref,
|
|
27
|
+
className: cn(
|
|
28
|
+
"status-pill",
|
|
29
|
+
`status-pill--${tone}`,
|
|
30
|
+
appearance === "chip" && "status-pill--chip",
|
|
31
|
+
className
|
|
32
|
+
),
|
|
33
|
+
...props,
|
|
34
|
+
children
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
);
|
|
38
|
+
StatusPill.displayName = "StatusPill";
|
|
39
|
+
export {
|
|
40
|
+
StatusPill,
|
|
41
|
+
toneForStatus
|
|
42
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
function getStatus(index, currentStep) {
|
|
5
|
+
if (index < currentStep) return "complete";
|
|
6
|
+
if (index === currentStep) return "current";
|
|
7
|
+
return "upcoming";
|
|
8
|
+
}
|
|
9
|
+
const CheckIcon = () => /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
10
|
+
"path",
|
|
11
|
+
{
|
|
12
|
+
d: "M2.5 7L5.5 10L11.5 4",
|
|
13
|
+
stroke: "currentColor",
|
|
14
|
+
strokeWidth: "2",
|
|
15
|
+
strokeLinecap: "round",
|
|
16
|
+
strokeLinejoin: "round"
|
|
17
|
+
}
|
|
18
|
+
) });
|
|
19
|
+
const PlusIcon = () => /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
20
|
+
"path",
|
|
21
|
+
{
|
|
22
|
+
d: "M7 2.5V11.5M2.5 7H11.5",
|
|
23
|
+
stroke: "currentColor",
|
|
24
|
+
strokeWidth: "2",
|
|
25
|
+
strokeLinecap: "round",
|
|
26
|
+
strokeLinejoin: "round"
|
|
27
|
+
}
|
|
28
|
+
) });
|
|
29
|
+
const Stepper = React.forwardRef(
|
|
30
|
+
({
|
|
31
|
+
steps,
|
|
32
|
+
currentStep,
|
|
33
|
+
orientation = "horizontal",
|
|
34
|
+
variant = "default",
|
|
35
|
+
size = "md",
|
|
36
|
+
onStepClick,
|
|
37
|
+
className
|
|
38
|
+
}, ref) => {
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
ref,
|
|
43
|
+
role: "list",
|
|
44
|
+
"aria-label": "Progress steps",
|
|
45
|
+
className: cn(
|
|
46
|
+
"stepper",
|
|
47
|
+
`stepper--${orientation}`,
|
|
48
|
+
`stepper--${size}`,
|
|
49
|
+
className
|
|
50
|
+
),
|
|
51
|
+
children: steps.map((step, index) => {
|
|
52
|
+
const status = getStatus(index, currentStep);
|
|
53
|
+
const isClickable = !!onStepClick && status === "complete";
|
|
54
|
+
const isLast = index === steps.length - 1;
|
|
55
|
+
return /* @__PURE__ */ jsxs(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
role: "listitem",
|
|
59
|
+
"aria-current": status === "current" ? "step" : void 0,
|
|
60
|
+
className: cn(
|
|
61
|
+
"stepper-item",
|
|
62
|
+
`stepper-item--${status}`,
|
|
63
|
+
orientation === "horizontal" && !isLast && "stepper-item--with-connector"
|
|
64
|
+
),
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ jsxs("div", { className: "stepper-indicator-row", children: [
|
|
67
|
+
/* @__PURE__ */ jsx(
|
|
68
|
+
"button",
|
|
69
|
+
{
|
|
70
|
+
type: "button",
|
|
71
|
+
disabled: !isClickable,
|
|
72
|
+
onClick: () => isClickable && onStepClick(index),
|
|
73
|
+
className: cn(
|
|
74
|
+
"stepper-indicator",
|
|
75
|
+
`stepper-indicator--${status}`,
|
|
76
|
+
`stepper-indicator--${variant}`,
|
|
77
|
+
isClickable && "stepper-indicator--clickable"
|
|
78
|
+
),
|
|
79
|
+
"aria-label": `Step ${index + 1}: ${step.title} (${status})`,
|
|
80
|
+
children: status === "complete" ? /* @__PURE__ */ jsx(CheckIcon, {}) : status === "current" ? /* @__PURE__ */ jsx(PlusIcon, {}) : /* @__PURE__ */ jsx("span", { className: "stepper-indicator-number", children: index + 1 })
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
!isLast && /* @__PURE__ */ jsx(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
className: cn(
|
|
87
|
+
"stepper-connector",
|
|
88
|
+
`stepper-connector--${orientation}`,
|
|
89
|
+
index < currentStep && "stepper-connector--complete"
|
|
90
|
+
),
|
|
91
|
+
"aria-hidden": "true"
|
|
92
|
+
}
|
|
93
|
+
)
|
|
94
|
+
] }),
|
|
95
|
+
/* @__PURE__ */ jsxs("div", { className: "stepper-label", children: [
|
|
96
|
+
/* @__PURE__ */ jsx("span", { className: cn("stepper-title", `stepper-title--${status}`), children: step.title }),
|
|
97
|
+
step.description && /* @__PURE__ */ jsx("span", { className: cn("stepper-description", `stepper-description--${status}`), children: step.description })
|
|
98
|
+
] })
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
index
|
|
102
|
+
);
|
|
103
|
+
})
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
Stepper.displayName = "Stepper";
|
|
109
|
+
export {
|
|
110
|
+
Stepper
|
|
111
|
+
};
|