@syscore/ui-library 2.0.0-beta-publish-workflow-beta.15 → 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 +10 -12
- package/client/components/ui/form.tsx +1 -1
- package/client/components/ui/label.tsx +21 -4
- 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 +358 -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 +159 -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 -18973
- /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,39 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
const switchV01Variants = cva("switch-v01 font-mazzardSoft", {
|
|
7
|
+
variants: {
|
|
8
|
+
textDirection: {
|
|
9
|
+
right: "switch-v01--text-right",
|
|
10
|
+
left: "switch-v01--text-left"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
textDirection: "right"
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
const SwitchV01 = React.forwardRef(
|
|
18
|
+
({
|
|
19
|
+
className,
|
|
20
|
+
textDirection = "right",
|
|
21
|
+
label = "Label",
|
|
22
|
+
showText = true,
|
|
23
|
+
...props
|
|
24
|
+
}, ref) => {
|
|
25
|
+
const toggle = /* @__PURE__ */ jsx(SwitchPrimitives.Root, { ref, className: "switch-v01-toggle", ...props, children: /* @__PURE__ */ jsx(SwitchPrimitives.Thumb, { className: "switch-v01-thumb" }) });
|
|
26
|
+
if (!showText || label == null || label === "") {
|
|
27
|
+
return /* @__PURE__ */ jsx("span", { className: cn(switchV01Variants({ textDirection }), className), children: toggle });
|
|
28
|
+
}
|
|
29
|
+
return /* @__PURE__ */ jsxs("label", { className: cn(switchV01Variants({ textDirection }), className), children: [
|
|
30
|
+
toggle,
|
|
31
|
+
/* @__PURE__ */ jsx("span", { className: "switch-v01-label overline-medium", children: label })
|
|
32
|
+
] });
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
SwitchV01.displayName = "SwitchV01";
|
|
36
|
+
export {
|
|
37
|
+
SwitchV01,
|
|
38
|
+
switchV01Variants
|
|
39
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
const Switch = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6
|
+
SwitchPrimitives.Root,
|
|
7
|
+
{
|
|
8
|
+
className: cn("switch", className),
|
|
9
|
+
...props,
|
|
10
|
+
ref,
|
|
11
|
+
children: /* @__PURE__ */ jsx(SwitchPrimitives.Thumb, { className: "switch-thumb" })
|
|
12
|
+
}
|
|
13
|
+
));
|
|
14
|
+
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
15
|
+
export {
|
|
16
|
+
Switch
|
|
17
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
const SystemBar = React.forwardRef(
|
|
5
|
+
({
|
|
6
|
+
className,
|
|
7
|
+
children,
|
|
8
|
+
color,
|
|
9
|
+
window: isWindow = false,
|
|
10
|
+
height,
|
|
11
|
+
style,
|
|
12
|
+
...props
|
|
13
|
+
}, ref) => {
|
|
14
|
+
const barHeight = height ?? (isWindow ? 32 : 24);
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
"header",
|
|
17
|
+
{
|
|
18
|
+
ref,
|
|
19
|
+
role: "banner",
|
|
20
|
+
style: {
|
|
21
|
+
height: barHeight,
|
|
22
|
+
backgroundColor: color,
|
|
23
|
+
...style
|
|
24
|
+
},
|
|
25
|
+
className: cn(
|
|
26
|
+
"system-bar",
|
|
27
|
+
isWindow && "system-bar--window",
|
|
28
|
+
color && "system-bar--colored",
|
|
29
|
+
className
|
|
30
|
+
),
|
|
31
|
+
...props,
|
|
32
|
+
children
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
SystemBar.displayName = "SystemBar";
|
|
38
|
+
const SystemBarSpacer = React.forwardRef(
|
|
39
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
40
|
+
"span",
|
|
41
|
+
{
|
|
42
|
+
ref,
|
|
43
|
+
className: cn("system-bar-spacer", className),
|
|
44
|
+
...props
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
);
|
|
48
|
+
SystemBarSpacer.displayName = "SystemBarSpacer";
|
|
49
|
+
const SystemBarIcon = React.forwardRef(
|
|
50
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
51
|
+
"span",
|
|
52
|
+
{
|
|
53
|
+
ref,
|
|
54
|
+
className: cn("system-bar-icon", className),
|
|
55
|
+
...props
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
);
|
|
59
|
+
SystemBarIcon.displayName = "SystemBarIcon";
|
|
60
|
+
const SystemBarAction = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
61
|
+
"button",
|
|
62
|
+
{
|
|
63
|
+
ref,
|
|
64
|
+
type: "button",
|
|
65
|
+
className: cn("system-bar-action", className),
|
|
66
|
+
...props,
|
|
67
|
+
children
|
|
68
|
+
}
|
|
69
|
+
));
|
|
70
|
+
SystemBarAction.displayName = "SystemBarAction";
|
|
71
|
+
export {
|
|
72
|
+
SystemBar,
|
|
73
|
+
SystemBarAction,
|
|
74
|
+
SystemBarIcon,
|
|
75
|
+
SystemBarSpacer
|
|
76
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
const Table = React.forwardRef(
|
|
5
|
+
({
|
|
6
|
+
className,
|
|
7
|
+
containerClassName,
|
|
8
|
+
density = "compact",
|
|
9
|
+
appearance = "plain",
|
|
10
|
+
...props
|
|
11
|
+
}, ref) => /* @__PURE__ */ jsx(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
className: cn(
|
|
15
|
+
"table-wrapper",
|
|
16
|
+
appearance === "card" && "table-wrapper--card",
|
|
17
|
+
containerClassName
|
|
18
|
+
),
|
|
19
|
+
children: /* @__PURE__ */ jsx(
|
|
20
|
+
"table",
|
|
21
|
+
{
|
|
22
|
+
ref,
|
|
23
|
+
"data-density": density,
|
|
24
|
+
className: cn("table", className),
|
|
25
|
+
...props
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
);
|
|
31
|
+
Table.displayName = "Table";
|
|
32
|
+
const TableHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("table-header", className), ...props }));
|
|
33
|
+
TableHeader.displayName = "TableHeader";
|
|
34
|
+
const TableBody = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { ref, className: cn("table-body", className), ...props }));
|
|
35
|
+
TableBody.displayName = "TableBody";
|
|
36
|
+
const TableFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", { ref, className: cn("table-footer", className), ...props }));
|
|
37
|
+
TableFooter.displayName = "TableFooter";
|
|
38
|
+
const TableRow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tr", { ref, className: cn("table-row", className), ...props }));
|
|
39
|
+
TableRow.displayName = "TableRow";
|
|
40
|
+
const TableTag = React.forwardRef(
|
|
41
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("span", { ref, className: cn("table-tag", className), ...props })
|
|
42
|
+
);
|
|
43
|
+
TableTag.displayName = "TableTag";
|
|
44
|
+
const TableHeaderCell = React.forwardRef(
|
|
45
|
+
({ className, align = "left", label, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
46
|
+
"th",
|
|
47
|
+
{
|
|
48
|
+
ref,
|
|
49
|
+
scope: "col",
|
|
50
|
+
"data-align": align,
|
|
51
|
+
className: cn("table-header-cell", className),
|
|
52
|
+
...props,
|
|
53
|
+
children: /* @__PURE__ */ jsxs("span", { className: "table-cell-inner overline-medium", children: [
|
|
54
|
+
label,
|
|
55
|
+
children
|
|
56
|
+
] })
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
);
|
|
60
|
+
TableHeaderCell.displayName = "TableHeaderCell";
|
|
61
|
+
const TableHead = React.forwardRef(
|
|
62
|
+
(props, ref) => /* @__PURE__ */ jsx(TableHeaderCell, { ref, ...props })
|
|
63
|
+
);
|
|
64
|
+
TableHead.displayName = "TableHead";
|
|
65
|
+
const TableCell = React.forwardRef(
|
|
66
|
+
({ className, align = "left", strong = false, text, tag, action, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
67
|
+
"td",
|
|
68
|
+
{
|
|
69
|
+
ref,
|
|
70
|
+
"data-align": align,
|
|
71
|
+
className: cn("table-cell", strong && "table-cell--strong", className),
|
|
72
|
+
...props,
|
|
73
|
+
children: /* @__PURE__ */ jsxs("span", { className: "table-cell-inner", children: [
|
|
74
|
+
text,
|
|
75
|
+
tag != null ? /* @__PURE__ */ jsx(TableTag, { children: tag }) : null,
|
|
76
|
+
action,
|
|
77
|
+
children
|
|
78
|
+
] })
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
);
|
|
82
|
+
TableCell.displayName = "TableCell";
|
|
83
|
+
const TableAction = React.forwardRef(({ className, type = "button", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
84
|
+
"button",
|
|
85
|
+
{
|
|
86
|
+
ref,
|
|
87
|
+
type,
|
|
88
|
+
className: cn("table-action", className),
|
|
89
|
+
...props
|
|
90
|
+
}
|
|
91
|
+
));
|
|
92
|
+
TableAction.displayName = "TableAction";
|
|
93
|
+
const TableCaption = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", { ref, className: cn("table-caption", className), ...props }));
|
|
94
|
+
TableCaption.displayName = "TableCaption";
|
|
95
|
+
export {
|
|
96
|
+
Table,
|
|
97
|
+
TableAction,
|
|
98
|
+
TableBody,
|
|
99
|
+
TableCaption,
|
|
100
|
+
TableCell,
|
|
101
|
+
TableFooter,
|
|
102
|
+
TableHead,
|
|
103
|
+
TableHeader,
|
|
104
|
+
TableHeaderCell,
|
|
105
|
+
TableRow,
|
|
106
|
+
TableTag
|
|
107
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
const TabsV01 = React.forwardRef(
|
|
5
|
+
({
|
|
6
|
+
className,
|
|
7
|
+
items = [],
|
|
8
|
+
label,
|
|
9
|
+
value: controlledValue,
|
|
10
|
+
defaultValue,
|
|
11
|
+
onValueChange,
|
|
12
|
+
...props
|
|
13
|
+
}, ref) => {
|
|
14
|
+
const isControlled = controlledValue !== void 0;
|
|
15
|
+
const [uncontrolled, setUncontrolled] = React.useState(
|
|
16
|
+
() => {
|
|
17
|
+
var _a;
|
|
18
|
+
return defaultValue ?? ((_a = items[0]) == null ? void 0 : _a.value);
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
const active = isControlled ? controlledValue : uncontrolled;
|
|
22
|
+
const select = (next) => {
|
|
23
|
+
if (!isControlled) setUncontrolled(next);
|
|
24
|
+
onValueChange == null ? void 0 : onValueChange(next);
|
|
25
|
+
};
|
|
26
|
+
const refs = React.useRef([]);
|
|
27
|
+
const onKeyDown = (event, index) => {
|
|
28
|
+
var _a;
|
|
29
|
+
const step = event.key === "ArrowRight" ? 1 : event.key === "ArrowLeft" ? -1 : 0;
|
|
30
|
+
if (!step) return;
|
|
31
|
+
event.preventDefault();
|
|
32
|
+
const enabled = items.map((item, i) => ({ item, i })).filter(({ item }) => !item.disabled);
|
|
33
|
+
const at = enabled.findIndex(({ i }) => i === index);
|
|
34
|
+
const next = enabled[(at + step + enabled.length) % enabled.length];
|
|
35
|
+
if (!next) return;
|
|
36
|
+
select(next.item.value);
|
|
37
|
+
(_a = refs.current[next.i]) == null ? void 0 : _a.focus();
|
|
38
|
+
};
|
|
39
|
+
return /* @__PURE__ */ jsxs(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
ref,
|
|
43
|
+
className: cn("tabs-v01 font-mazzardSoft", className),
|
|
44
|
+
...props,
|
|
45
|
+
children: [
|
|
46
|
+
label != null && label !== "" ? /* @__PURE__ */ jsx("div", { className: "tabs-v01-label body-large", children: label }) : null,
|
|
47
|
+
/* @__PURE__ */ jsx("div", { className: "tabs-v01-list", role: "tablist", children: items.map((item, index) => /* @__PURE__ */ jsx(
|
|
48
|
+
"button",
|
|
49
|
+
{
|
|
50
|
+
ref: (node) => {
|
|
51
|
+
refs.current[index] = node;
|
|
52
|
+
},
|
|
53
|
+
type: "button",
|
|
54
|
+
role: "tab",
|
|
55
|
+
"aria-selected": item.value === active,
|
|
56
|
+
tabIndex: item.value === active ? 0 : -1,
|
|
57
|
+
disabled: item.disabled,
|
|
58
|
+
"data-state": item.value === active ? "active" : "inactive",
|
|
59
|
+
className: "tabs-v01-tab",
|
|
60
|
+
onClick: () => select(item.value),
|
|
61
|
+
onKeyDown: (event) => onKeyDown(event, index),
|
|
62
|
+
children: /* @__PURE__ */ jsx("span", { className: "tabs-v01-tab-label overline-large", children: item.label })
|
|
63
|
+
},
|
|
64
|
+
item.value
|
|
65
|
+
)) })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
TabsV01.displayName = "TabsV01";
|
|
72
|
+
export {
|
|
73
|
+
TabsV01
|
|
74
|
+
};
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { AnimatePresence, useMotionValue, animate, motion } from "motion/react";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
import { HeightContainer } from "./height-container.js";
|
|
5
|
+
import { useState, useRef, useCallback, Children, isValidElement, createContext, cloneElement, useEffect, useLayoutEffect, useContext } from "react";
|
|
6
|
+
const TabsContext = createContext(null);
|
|
7
|
+
function useTabsContext() {
|
|
8
|
+
const ctx = useContext(TabsContext);
|
|
9
|
+
if (!ctx)
|
|
10
|
+
throw new Error("Tabs compound components must be used inside <Tabs>");
|
|
11
|
+
return ctx;
|
|
12
|
+
}
|
|
13
|
+
const TabsNavContext = createContext(null);
|
|
14
|
+
function useTabsNavContext() {
|
|
15
|
+
const ctx = useContext(TabsNavContext);
|
|
16
|
+
if (!ctx) throw new Error("TabsTrigger must be used inside <TabsList>");
|
|
17
|
+
return ctx;
|
|
18
|
+
}
|
|
19
|
+
const transition = {
|
|
20
|
+
type: "tween",
|
|
21
|
+
ease: "easeOut",
|
|
22
|
+
duration: 0.15
|
|
23
|
+
};
|
|
24
|
+
const contentVariants = {
|
|
25
|
+
enter: (dir) => ({ opacity: 0, x: dir * 20 }),
|
|
26
|
+
center: { opacity: 1, x: 0 },
|
|
27
|
+
exit: (dir) => ({ opacity: 0, x: dir * -20 })
|
|
28
|
+
};
|
|
29
|
+
function Tabs({
|
|
30
|
+
children,
|
|
31
|
+
defaultValue,
|
|
32
|
+
className
|
|
33
|
+
}) {
|
|
34
|
+
const [selectedValue, setSelectedValue] = useState(defaultValue);
|
|
35
|
+
const [direction, setDirection] = useState(0);
|
|
36
|
+
const valuesRef = useRef([]);
|
|
37
|
+
const selectedValueRef = useRef(defaultValue);
|
|
38
|
+
const registerValue = useCallback((value) => {
|
|
39
|
+
if (!valuesRef.current.includes(value)) {
|
|
40
|
+
valuesRef.current.push(value);
|
|
41
|
+
}
|
|
42
|
+
}, []);
|
|
43
|
+
const handleSetSelectedValue = useCallback((value) => {
|
|
44
|
+
const currentIdx = valuesRef.current.indexOf(selectedValueRef.current);
|
|
45
|
+
const nextIdx = valuesRef.current.indexOf(value);
|
|
46
|
+
setDirection(nextIdx > currentIdx ? 1 : -1);
|
|
47
|
+
selectedValueRef.current = value;
|
|
48
|
+
setSelectedValue(value);
|
|
49
|
+
}, []);
|
|
50
|
+
const childArray = Children.toArray(children);
|
|
51
|
+
const contentChildren = childArray.filter(
|
|
52
|
+
(child) => isValidElement(child) && child.type === TabsContent
|
|
53
|
+
);
|
|
54
|
+
const nonContentChildren = childArray.filter(
|
|
55
|
+
(child) => !(isValidElement(child) && child.type === TabsContent)
|
|
56
|
+
);
|
|
57
|
+
const activeContent = contentChildren.find(
|
|
58
|
+
(child) => child.props.value === selectedValue
|
|
59
|
+
);
|
|
60
|
+
return /* @__PURE__ */ jsx(
|
|
61
|
+
TabsContext.Provider,
|
|
62
|
+
{
|
|
63
|
+
value: { selectedValue, setSelectedValue: handleSetSelectedValue, direction, registerValue },
|
|
64
|
+
children: /* @__PURE__ */ jsxs("div", { className: cn("tabs-container", className), children: [
|
|
65
|
+
nonContentChildren,
|
|
66
|
+
/* @__PURE__ */ jsx(HeightContainer, { stateKey: selectedValue, children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", custom: direction, children: activeContent && cloneElement(activeContent, { key: activeContent.props.value }) }) })
|
|
67
|
+
] })
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
function TabsList({
|
|
72
|
+
children,
|
|
73
|
+
className,
|
|
74
|
+
containerClassName,
|
|
75
|
+
fullWidth = false
|
|
76
|
+
}) {
|
|
77
|
+
const { selectedValue } = useTabsContext();
|
|
78
|
+
const navRef = useRef(null);
|
|
79
|
+
const containerRef = useRef(null);
|
|
80
|
+
const buttonRefs = useRef(/* @__PURE__ */ new Map());
|
|
81
|
+
const indicatorX = useMotionValue(-999);
|
|
82
|
+
const indicatorWidth = useMotionValue(0);
|
|
83
|
+
const [indicatorColor, setIndicatorColor] = useState(null);
|
|
84
|
+
const isFirstRender = useRef(true);
|
|
85
|
+
const selectedValueRef = useRef(selectedValue);
|
|
86
|
+
selectedValueRef.current = selectedValue;
|
|
87
|
+
const updateIndicatorPosition = useCallback(() => {
|
|
88
|
+
const nav = navRef.current;
|
|
89
|
+
const selectedEl = buttonRefs.current.get(selectedValueRef.current);
|
|
90
|
+
if (!nav || !selectedEl) return;
|
|
91
|
+
const navRect = nav.getBoundingClientRect();
|
|
92
|
+
const selectedRect = selectedEl.getBoundingClientRect();
|
|
93
|
+
indicatorX.set(selectedRect.left - navRect.left);
|
|
94
|
+
indicatorWidth.set(selectedRect.width);
|
|
95
|
+
}, [indicatorX, indicatorWidth]);
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
const el = containerRef.current;
|
|
98
|
+
if (!el) return;
|
|
99
|
+
const updateScroll = () => {
|
|
100
|
+
const canLeft = el.scrollLeft > 0;
|
|
101
|
+
const canRight = el.scrollLeft < el.scrollWidth - el.clientWidth - 1;
|
|
102
|
+
el.dataset.scrollLeft = canLeft ? "true" : "";
|
|
103
|
+
el.dataset.scrollRight = canRight ? "true" : "";
|
|
104
|
+
};
|
|
105
|
+
updateScroll();
|
|
106
|
+
el.addEventListener("scroll", updateScroll, { passive: true });
|
|
107
|
+
const ro = new ResizeObserver(() => {
|
|
108
|
+
updateScroll();
|
|
109
|
+
updateIndicatorPosition();
|
|
110
|
+
});
|
|
111
|
+
ro.observe(el);
|
|
112
|
+
return () => {
|
|
113
|
+
el.removeEventListener("scroll", updateScroll);
|
|
114
|
+
ro.disconnect();
|
|
115
|
+
};
|
|
116
|
+
}, [updateIndicatorPosition]);
|
|
117
|
+
const registerRef = useCallback(
|
|
118
|
+
(value, el) => {
|
|
119
|
+
buttonRefs.current.set(value, el);
|
|
120
|
+
},
|
|
121
|
+
[]
|
|
122
|
+
);
|
|
123
|
+
useLayoutEffect(() => {
|
|
124
|
+
var _a;
|
|
125
|
+
const nav = navRef.current;
|
|
126
|
+
const container = containerRef.current;
|
|
127
|
+
const selectedEl = buttonRefs.current.get(selectedValue);
|
|
128
|
+
if (!nav || !container || !selectedEl) return;
|
|
129
|
+
const navRect = nav.getBoundingClientRect();
|
|
130
|
+
const selectedRect = selectedEl.getBoundingClientRect();
|
|
131
|
+
const P = selectedRect.left - navRect.left;
|
|
132
|
+
const W = selectedRect.width;
|
|
133
|
+
const danger = ((_a = selectedEl.dataset) == null ? void 0 : _a.variant) === "danger";
|
|
134
|
+
setIndicatorColor(danger ? "danger" : "default");
|
|
135
|
+
if (isFirstRender.current) {
|
|
136
|
+
isFirstRender.current = false;
|
|
137
|
+
indicatorX.set(P);
|
|
138
|
+
indicatorWidth.set(W);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
const target = P - container.clientWidth / 2 + W / 2;
|
|
142
|
+
const clampedTarget = Math.max(
|
|
143
|
+
0,
|
|
144
|
+
Math.min(target, container.scrollWidth - container.clientWidth)
|
|
145
|
+
);
|
|
146
|
+
const needsScroll = Math.abs(clampedTarget - container.scrollLeft) > 1;
|
|
147
|
+
if (needsScroll) {
|
|
148
|
+
indicatorX.set(P);
|
|
149
|
+
indicatorWidth.set(W);
|
|
150
|
+
container.scrollTo({ left: clampedTarget, behavior: "smooth" });
|
|
151
|
+
} else {
|
|
152
|
+
animate(indicatorX, P, transition);
|
|
153
|
+
animate(indicatorWidth, W, transition);
|
|
154
|
+
}
|
|
155
|
+
}, [selectedValue, indicatorX, indicatorWidth]);
|
|
156
|
+
return /* @__PURE__ */ jsx(TabsNavContext.Provider, { value: { registerRef }, children: /* @__PURE__ */ jsx(
|
|
157
|
+
"div",
|
|
158
|
+
{
|
|
159
|
+
ref: containerRef,
|
|
160
|
+
className: cn("tabs-container-inner", containerClassName),
|
|
161
|
+
children: /* @__PURE__ */ jsxs(
|
|
162
|
+
"nav",
|
|
163
|
+
{
|
|
164
|
+
ref: navRef,
|
|
165
|
+
className: cn(
|
|
166
|
+
"tabs-nav",
|
|
167
|
+
{ "tabs-nav--full-width": fullWidth },
|
|
168
|
+
className
|
|
169
|
+
),
|
|
170
|
+
children: [
|
|
171
|
+
children,
|
|
172
|
+
indicatorColor !== null && /* @__PURE__ */ jsx(
|
|
173
|
+
motion.div,
|
|
174
|
+
{
|
|
175
|
+
className: cn("tabs-nav-indicator", {
|
|
176
|
+
"tabs-nav-indicator--danger": indicatorColor === "danger",
|
|
177
|
+
"tabs-nav-indicator--default": indicatorColor === "default"
|
|
178
|
+
}),
|
|
179
|
+
style: { x: indicatorX, width: indicatorWidth }
|
|
180
|
+
}
|
|
181
|
+
),
|
|
182
|
+
/* @__PURE__ */ jsx("div", { className: "tabs-nav-underline" })
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
)
|
|
186
|
+
}
|
|
187
|
+
) });
|
|
188
|
+
}
|
|
189
|
+
function TabsTrigger({
|
|
190
|
+
value,
|
|
191
|
+
children,
|
|
192
|
+
className,
|
|
193
|
+
variant = "default"
|
|
194
|
+
}) {
|
|
195
|
+
const { selectedValue, setSelectedValue, registerValue } = useTabsContext();
|
|
196
|
+
const { registerRef } = useTabsNavContext();
|
|
197
|
+
useLayoutEffect(() => {
|
|
198
|
+
registerValue(value);
|
|
199
|
+
}, [registerValue, value]);
|
|
200
|
+
const isActive = selectedValue === value;
|
|
201
|
+
const refCallback = useCallback(
|
|
202
|
+
(el) => registerRef(value, el),
|
|
203
|
+
[registerRef, value]
|
|
204
|
+
);
|
|
205
|
+
const handleClick = useCallback(
|
|
206
|
+
() => setSelectedValue(value),
|
|
207
|
+
[setSelectedValue, value]
|
|
208
|
+
);
|
|
209
|
+
return /* @__PURE__ */ jsx(
|
|
210
|
+
"button",
|
|
211
|
+
{
|
|
212
|
+
className: cn("tabs-nav-button", className),
|
|
213
|
+
"data-variant": variant,
|
|
214
|
+
onClick: handleClick,
|
|
215
|
+
ref: refCallback,
|
|
216
|
+
children: /* @__PURE__ */ jsx(
|
|
217
|
+
"span",
|
|
218
|
+
{
|
|
219
|
+
className: cn("tabs-nav-button-text overline-large", {
|
|
220
|
+
"tabs-nav-button-text--inactive": !isActive,
|
|
221
|
+
"tabs-nav-button-text--active": isActive
|
|
222
|
+
}),
|
|
223
|
+
children
|
|
224
|
+
}
|
|
225
|
+
)
|
|
226
|
+
}
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
function TabsContent({
|
|
230
|
+
children,
|
|
231
|
+
className
|
|
232
|
+
}) {
|
|
233
|
+
const { direction } = useTabsContext();
|
|
234
|
+
return /* @__PURE__ */ jsx(
|
|
235
|
+
motion.div,
|
|
236
|
+
{
|
|
237
|
+
className,
|
|
238
|
+
custom: direction,
|
|
239
|
+
variants: contentVariants,
|
|
240
|
+
initial: "enter",
|
|
241
|
+
animate: "center",
|
|
242
|
+
exit: "exit",
|
|
243
|
+
transition,
|
|
244
|
+
children
|
|
245
|
+
}
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
export {
|
|
249
|
+
Tabs,
|
|
250
|
+
TabsContent,
|
|
251
|
+
TabsList,
|
|
252
|
+
TabsTrigger
|
|
253
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import { UtilityChangeType } from "../icons/UtilityChangeType.js";
|
|
6
|
+
const tagV02Variants = cva("tag-v02 font-mazzardSoft", {
|
|
7
|
+
variants: {
|
|
8
|
+
state: {
|
|
9
|
+
active: "tag-v02--active",
|
|
10
|
+
inactive: "tag-v02--inactive"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
state: "inactive"
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
const TagV02 = React.forwardRef(
|
|
18
|
+
({
|
|
19
|
+
className,
|
|
20
|
+
state = "inactive",
|
|
21
|
+
dot = false,
|
|
22
|
+
change = false,
|
|
23
|
+
changeType = "mild",
|
|
24
|
+
children,
|
|
25
|
+
...props
|
|
26
|
+
}, ref) => /* @__PURE__ */ jsxs(
|
|
27
|
+
"button",
|
|
28
|
+
{
|
|
29
|
+
ref,
|
|
30
|
+
type: "button",
|
|
31
|
+
"aria-pressed": state === "active",
|
|
32
|
+
className: cn(tagV02Variants({ state }), className),
|
|
33
|
+
...props,
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsx("span", { className: "tag-v02-label", children }),
|
|
36
|
+
dot ? /* @__PURE__ */ jsx("span", { className: "tag-v02-dot", "aria-hidden": true }) : null,
|
|
37
|
+
change ? /* @__PURE__ */ jsx("span", { className: "tag-v02-change-frame", children: /* @__PURE__ */ jsx(
|
|
38
|
+
UtilityChangeType,
|
|
39
|
+
{
|
|
40
|
+
className: `tag-v02-change tag-v02-change--${changeType}`
|
|
41
|
+
}
|
|
42
|
+
) }) : null
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
);
|
|
47
|
+
TagV02.displayName = "TagV02";
|
|
48
|
+
const tagStatusV02Variants = cva("tag-status-v02 font-mazzardSoft", {
|
|
49
|
+
variants: {
|
|
50
|
+
status: {
|
|
51
|
+
todo: "tag-status-v02--todo",
|
|
52
|
+
low: "tag-status-v02--low",
|
|
53
|
+
medium: "tag-status-v02--medium",
|
|
54
|
+
high: "tag-status-v02--high",
|
|
55
|
+
done: "tag-status-v02--done",
|
|
56
|
+
new: "tag-status-v02--new"
|
|
57
|
+
},
|
|
58
|
+
tone: {
|
|
59
|
+
light: "tag-status-v02--light",
|
|
60
|
+
dark: "tag-status-v02--dark"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
defaultVariants: {
|
|
64
|
+
status: "todo",
|
|
65
|
+
tone: "light"
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
const TagStatusV02 = React.forwardRef(
|
|
69
|
+
({ className, status = "todo", tone = "light", children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
70
|
+
"span",
|
|
71
|
+
{
|
|
72
|
+
ref,
|
|
73
|
+
className: cn(tagStatusV02Variants({ status, tone }), className),
|
|
74
|
+
...props,
|
|
75
|
+
children: /* @__PURE__ */ jsx("span", { className: "tag-status-v02-label overline-medium", children: children ?? status })
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
);
|
|
79
|
+
TagStatusV02.displayName = "TagStatusV02";
|
|
80
|
+
export {
|
|
81
|
+
TagStatusV02,
|
|
82
|
+
TagV02,
|
|
83
|
+
tagStatusV02Variants,
|
|
84
|
+
tagV02Variants
|
|
85
|
+
};
|