@syscore/ui-library 2.0.0-beta-publish-workflow-beta.16 → 2.0.0-beta-publish-workflow-beta.18
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 +363 -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,127 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
const BottomNavContext = React.createContext({
|
|
5
|
+
value: null,
|
|
6
|
+
onChange: () => {
|
|
7
|
+
},
|
|
8
|
+
grow: false,
|
|
9
|
+
horizontal: false,
|
|
10
|
+
shift: false,
|
|
11
|
+
activeColor: void 0
|
|
12
|
+
});
|
|
13
|
+
const BottomNavigation = React.forwardRef(
|
|
14
|
+
({
|
|
15
|
+
className,
|
|
16
|
+
children,
|
|
17
|
+
value: valueProp,
|
|
18
|
+
defaultValue,
|
|
19
|
+
onChange,
|
|
20
|
+
color,
|
|
21
|
+
grow = false,
|
|
22
|
+
horizontal = false,
|
|
23
|
+
shift = false,
|
|
24
|
+
active = true,
|
|
25
|
+
elevated = false,
|
|
26
|
+
...props
|
|
27
|
+
}, ref) => {
|
|
28
|
+
const [internalValue, setInternalValue] = React.useState(defaultValue ?? null);
|
|
29
|
+
const isControlled = valueProp !== void 0;
|
|
30
|
+
const currentValue = isControlled ? valueProp : internalValue;
|
|
31
|
+
const handleChange = React.useCallback(
|
|
32
|
+
(val) => {
|
|
33
|
+
if (!isControlled) setInternalValue(val);
|
|
34
|
+
onChange == null ? void 0 : onChange(val);
|
|
35
|
+
},
|
|
36
|
+
[isControlled, onChange]
|
|
37
|
+
);
|
|
38
|
+
return /* @__PURE__ */ jsx(
|
|
39
|
+
BottomNavContext.Provider,
|
|
40
|
+
{
|
|
41
|
+
value: {
|
|
42
|
+
value: currentValue ?? null,
|
|
43
|
+
onChange: handleChange,
|
|
44
|
+
grow,
|
|
45
|
+
horizontal,
|
|
46
|
+
shift,
|
|
47
|
+
activeColor: color
|
|
48
|
+
},
|
|
49
|
+
children: /* @__PURE__ */ jsx(
|
|
50
|
+
"nav",
|
|
51
|
+
{
|
|
52
|
+
ref,
|
|
53
|
+
role: "navigation",
|
|
54
|
+
"aria-label": "Bottom navigation",
|
|
55
|
+
className: cn(
|
|
56
|
+
"bottom-nav",
|
|
57
|
+
grow && "bottom-nav--grow",
|
|
58
|
+
horizontal && "bottom-nav--horizontal",
|
|
59
|
+
shift && "bottom-nav--shift",
|
|
60
|
+
!active && "bottom-nav--hidden",
|
|
61
|
+
elevated && "bottom-nav--elevated",
|
|
62
|
+
className
|
|
63
|
+
),
|
|
64
|
+
...props,
|
|
65
|
+
children
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
BottomNavigation.displayName = "BottomNavigation";
|
|
73
|
+
const BottomNavigationItem = React.forwardRef(({ className, children, value: valueProp, _index, style, ...props }, ref) => {
|
|
74
|
+
const { value, onChange, grow, horizontal, shift, activeColor } = React.useContext(BottomNavContext);
|
|
75
|
+
const itemValue = valueProp ?? _index ?? 0;
|
|
76
|
+
const isActive = value === itemValue;
|
|
77
|
+
const activeStyle = isActive && activeColor ? { "--bottom-nav-active-color": activeColor } : {};
|
|
78
|
+
return /* @__PURE__ */ jsx(
|
|
79
|
+
"button",
|
|
80
|
+
{
|
|
81
|
+
ref,
|
|
82
|
+
type: "button",
|
|
83
|
+
role: "tab",
|
|
84
|
+
"aria-selected": isActive,
|
|
85
|
+
"aria-current": isActive ? "page" : void 0,
|
|
86
|
+
onClick: () => onChange(itemValue),
|
|
87
|
+
style: { ...activeStyle, ...style },
|
|
88
|
+
className: cn(
|
|
89
|
+
"bottom-nav-item",
|
|
90
|
+
isActive && "bottom-nav-item--active",
|
|
91
|
+
grow && "bottom-nav-item--grow",
|
|
92
|
+
horizontal && "bottom-nav-item--horizontal",
|
|
93
|
+
shift && "bottom-nav-item--shift",
|
|
94
|
+
className
|
|
95
|
+
),
|
|
96
|
+
...props,
|
|
97
|
+
children
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
});
|
|
101
|
+
BottomNavigationItem.displayName = "BottomNavigationItem";
|
|
102
|
+
const BottomNavigationGroup = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
103
|
+
const indexedChildren = React.Children.map(children, (child, index) => {
|
|
104
|
+
if (!React.isValidElement(child)) return child;
|
|
105
|
+
const el = child;
|
|
106
|
+
if (el.type.displayName === "BottomNavigationItem") {
|
|
107
|
+
return React.cloneElement(el, { _index: index });
|
|
108
|
+
}
|
|
109
|
+
return child;
|
|
110
|
+
});
|
|
111
|
+
return /* @__PURE__ */ jsx(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
ref,
|
|
115
|
+
role: "tablist",
|
|
116
|
+
className: cn("bottom-nav-group", className),
|
|
117
|
+
...props,
|
|
118
|
+
children: indexedChildren
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
});
|
|
122
|
+
BottomNavigationGroup.displayName = "BottomNavigationGroup";
|
|
123
|
+
export {
|
|
124
|
+
BottomNavigation,
|
|
125
|
+
BottomNavigationGroup,
|
|
126
|
+
BottomNavigationItem
|
|
127
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import { CodeBadge } from "./code-badge.js";
|
|
6
|
+
import iconSeparator from "../../assets/breadcrumb/icon-separator.svg.js";
|
|
7
|
+
import iconHome from "../../assets/breadcrumb/icon-home.svg.js";
|
|
8
|
+
import iconEllipsis from "../../assets/breadcrumb/icon-ellipsis.svg.js";
|
|
9
|
+
const BreadcrumbTrail = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
10
|
+
"nav",
|
|
11
|
+
{
|
|
12
|
+
ref,
|
|
13
|
+
"aria-label": "breadcrumb",
|
|
14
|
+
className: cn("breadcrumb-trail", className),
|
|
15
|
+
...props
|
|
16
|
+
}
|
|
17
|
+
));
|
|
18
|
+
BreadcrumbTrail.displayName = "BreadcrumbTrail";
|
|
19
|
+
const BreadcrumbTrailList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
20
|
+
"ol",
|
|
21
|
+
{
|
|
22
|
+
ref,
|
|
23
|
+
className: cn("breadcrumb-trail-list font-mazzardSoft", className),
|
|
24
|
+
...props
|
|
25
|
+
}
|
|
26
|
+
));
|
|
27
|
+
BreadcrumbTrailList.displayName = "BreadcrumbTrailList";
|
|
28
|
+
const BreadcrumbTrailItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
29
|
+
"li",
|
|
30
|
+
{
|
|
31
|
+
ref,
|
|
32
|
+
className: cn("breadcrumb-trail-item", className),
|
|
33
|
+
...props
|
|
34
|
+
}
|
|
35
|
+
));
|
|
36
|
+
BreadcrumbTrailItem.displayName = "BreadcrumbTrailItem";
|
|
37
|
+
const BreadcrumbTrailLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
38
|
+
const Comp = asChild ? Slot : "a";
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
40
|
+
Comp,
|
|
41
|
+
{
|
|
42
|
+
ref,
|
|
43
|
+
className: cn("breadcrumb-trail-link", className),
|
|
44
|
+
...props
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
});
|
|
48
|
+
BreadcrumbTrailLink.displayName = "BreadcrumbTrailLink";
|
|
49
|
+
const BreadcrumbTrailPage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
50
|
+
"span",
|
|
51
|
+
{
|
|
52
|
+
ref,
|
|
53
|
+
role: "link",
|
|
54
|
+
"aria-disabled": "true",
|
|
55
|
+
"aria-current": "page",
|
|
56
|
+
className: cn("breadcrumb-trail-page", className),
|
|
57
|
+
...props
|
|
58
|
+
}
|
|
59
|
+
));
|
|
60
|
+
BreadcrumbTrailPage.displayName = "BreadcrumbTrailPage";
|
|
61
|
+
const BreadcrumbTrailSeparator = ({
|
|
62
|
+
children,
|
|
63
|
+
className,
|
|
64
|
+
...props
|
|
65
|
+
}) => /* @__PURE__ */ jsx(
|
|
66
|
+
"li",
|
|
67
|
+
{
|
|
68
|
+
role: "presentation",
|
|
69
|
+
"aria-hidden": "true",
|
|
70
|
+
className: cn("breadcrumb-trail-separator", className),
|
|
71
|
+
...props,
|
|
72
|
+
children: children ?? /* @__PURE__ */ jsx(
|
|
73
|
+
"img",
|
|
74
|
+
{
|
|
75
|
+
src: iconSeparator,
|
|
76
|
+
alt: "",
|
|
77
|
+
className: "breadcrumb-trail-separator-icon",
|
|
78
|
+
width: 4.5,
|
|
79
|
+
height: 7.5
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
BreadcrumbTrailSeparator.displayName = "BreadcrumbTrailSeparator";
|
|
85
|
+
const BreadcrumbTrailHome = ({
|
|
86
|
+
className,
|
|
87
|
+
...props
|
|
88
|
+
}) => /* @__PURE__ */ jsx("span", { className: cn("breadcrumb-trail-home", className), ...props, children: /* @__PURE__ */ jsx(
|
|
89
|
+
"img",
|
|
90
|
+
{
|
|
91
|
+
src: iconHome,
|
|
92
|
+
alt: "Home",
|
|
93
|
+
className: "breadcrumb-trail-home-icon",
|
|
94
|
+
width: 14,
|
|
95
|
+
height: 13.5475
|
|
96
|
+
}
|
|
97
|
+
) });
|
|
98
|
+
BreadcrumbTrailHome.displayName = "BreadcrumbTrailHome";
|
|
99
|
+
const BreadcrumbTrailEllipsis = ({
|
|
100
|
+
className,
|
|
101
|
+
...props
|
|
102
|
+
}) => /* @__PURE__ */ jsxs(
|
|
103
|
+
"span",
|
|
104
|
+
{
|
|
105
|
+
role: "presentation",
|
|
106
|
+
"aria-hidden": "true",
|
|
107
|
+
className: cn("breadcrumb-trail-ellipsis", className),
|
|
108
|
+
...props,
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ jsx(
|
|
111
|
+
"img",
|
|
112
|
+
{
|
|
113
|
+
src: iconEllipsis,
|
|
114
|
+
alt: "",
|
|
115
|
+
className: "breadcrumb-trail-ellipsis-icon",
|
|
116
|
+
width: 16,
|
|
117
|
+
height: 16
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
BreadcrumbTrailEllipsis.displayName = "BreadcrumbTrailEllipsis";
|
|
125
|
+
const BreadcrumbTrailCode = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(CodeBadge, { ref, tone: "trail", ...props }));
|
|
126
|
+
BreadcrumbTrailCode.displayName = "BreadcrumbTrailCode";
|
|
127
|
+
export {
|
|
128
|
+
BreadcrumbTrail,
|
|
129
|
+
BreadcrumbTrailCode,
|
|
130
|
+
BreadcrumbTrailEllipsis,
|
|
131
|
+
BreadcrumbTrailHome,
|
|
132
|
+
BreadcrumbTrailItem,
|
|
133
|
+
BreadcrumbTrailLink,
|
|
134
|
+
BreadcrumbTrailList,
|
|
135
|
+
BreadcrumbTrailPage,
|
|
136
|
+
BreadcrumbTrailSeparator
|
|
137
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import "lucide-react";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
const Breadcrumb = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
7
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
8
|
+
const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
9
|
+
"ol",
|
|
10
|
+
{
|
|
11
|
+
ref,
|
|
12
|
+
className: cn("breadcrumb-list", className),
|
|
13
|
+
...props
|
|
14
|
+
}
|
|
15
|
+
));
|
|
16
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
17
|
+
const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
18
|
+
"li",
|
|
19
|
+
{
|
|
20
|
+
ref,
|
|
21
|
+
className: cn("breadcrumb-item", className),
|
|
22
|
+
...props
|
|
23
|
+
}
|
|
24
|
+
));
|
|
25
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
26
|
+
const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
27
|
+
const Comp = asChild ? Slot : "a";
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
Comp,
|
|
30
|
+
{
|
|
31
|
+
ref,
|
|
32
|
+
className: cn("breadcrumb-link", className),
|
|
33
|
+
...props
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
});
|
|
37
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
38
|
+
const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
39
|
+
"span",
|
|
40
|
+
{
|
|
41
|
+
ref,
|
|
42
|
+
role: "link",
|
|
43
|
+
"aria-disabled": "true",
|
|
44
|
+
"aria-current": "page",
|
|
45
|
+
className: cn("breadcrumb-page body-small font-medium", className),
|
|
46
|
+
...props
|
|
47
|
+
}
|
|
48
|
+
));
|
|
49
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
50
|
+
const BreadcrumbSeparator = ({
|
|
51
|
+
children,
|
|
52
|
+
className,
|
|
53
|
+
...props
|
|
54
|
+
}) => /* @__PURE__ */ jsx(
|
|
55
|
+
"li",
|
|
56
|
+
{
|
|
57
|
+
role: "presentation",
|
|
58
|
+
"aria-hidden": "true",
|
|
59
|
+
className: cn("breadcrumb-separator", className),
|
|
60
|
+
...props,
|
|
61
|
+
children: children ?? /* @__PURE__ */ jsx(
|
|
62
|
+
"svg",
|
|
63
|
+
{
|
|
64
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
65
|
+
width: "5",
|
|
66
|
+
height: "8",
|
|
67
|
+
viewBox: "0 0 5 8",
|
|
68
|
+
fill: "none",
|
|
69
|
+
children: /* @__PURE__ */ jsx(
|
|
70
|
+
"path",
|
|
71
|
+
{
|
|
72
|
+
d: "M0.75 6.75L3.75 3.75L0.75 0.75",
|
|
73
|
+
stroke: "#CBCDD2",
|
|
74
|
+
strokeWidth: "1.5",
|
|
75
|
+
strokeLinecap: "round",
|
|
76
|
+
strokeLinejoin: "round"
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
84
|
+
export {
|
|
85
|
+
Breadcrumb,
|
|
86
|
+
BreadcrumbItem,
|
|
87
|
+
BreadcrumbLink,
|
|
88
|
+
BreadcrumbList,
|
|
89
|
+
BreadcrumbPage,
|
|
90
|
+
BreadcrumbSeparator
|
|
91
|
+
};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { jsx, jsxs } 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 iconDevice from "../../assets/button-v01/icon-device.svg.js";
|
|
6
|
+
import iconClose from "../../assets/button-v01/icon-close.svg.js";
|
|
7
|
+
import iconCheck from "../../assets/button-v01/icon-check.svg.js";
|
|
8
|
+
import iconDelete from "../../assets/button-v01/icon-delete.svg.js";
|
|
9
|
+
import iconBack from "../../assets/button-v01/icon-back.svg.js";
|
|
10
|
+
const buttonV01Variants = cva("button-v01 font-mazzardSoft", {
|
|
11
|
+
variants: {
|
|
12
|
+
size: {
|
|
13
|
+
large: "button-v01--large",
|
|
14
|
+
medium: "button-v01--medium",
|
|
15
|
+
small: "button-v01--small"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const ICON_SRC = {
|
|
20
|
+
close: iconClose,
|
|
21
|
+
check: iconCheck,
|
|
22
|
+
delete: iconDelete,
|
|
23
|
+
back: iconBack
|
|
24
|
+
};
|
|
25
|
+
function resolveLook({
|
|
26
|
+
type,
|
|
27
|
+
hierarchy,
|
|
28
|
+
appearance,
|
|
29
|
+
theme,
|
|
30
|
+
context,
|
|
31
|
+
icon
|
|
32
|
+
}) {
|
|
33
|
+
if (type === "icon") {
|
|
34
|
+
if (theme === "transparent") return "button-v01--icon-transparent";
|
|
35
|
+
if (theme === "color") {
|
|
36
|
+
return icon === "check" ? "button-v01--icon-success" : "button-v01--icon-danger";
|
|
37
|
+
}
|
|
38
|
+
return "button-v01--icon-light";
|
|
39
|
+
}
|
|
40
|
+
if (context === "floating") return "button-v01--floating";
|
|
41
|
+
if (context === "confirm") return "button-v01--confirm";
|
|
42
|
+
if (context === "error") return "button-v01--error";
|
|
43
|
+
if (context === "redirect") return "button-v01--redirect";
|
|
44
|
+
if (context === "tooltip") return "button-v01--tooltip";
|
|
45
|
+
if (type === "cta" && appearance === "gradient") return "button-v01--gradient";
|
|
46
|
+
if (type === "cta" && hierarchy === "secondary") {
|
|
47
|
+
return "button-v01--cta-secondary";
|
|
48
|
+
}
|
|
49
|
+
if (type === "cta" && hierarchy === "tertiary") {
|
|
50
|
+
return "button-v01--cta-tertiary";
|
|
51
|
+
}
|
|
52
|
+
if (type === "utility" && hierarchy === "secondary") {
|
|
53
|
+
return "button-v01--utility-secondary";
|
|
54
|
+
}
|
|
55
|
+
if (type === "utility" && hierarchy === "tertiary") {
|
|
56
|
+
return "button-v01--utility-tertiary";
|
|
57
|
+
}
|
|
58
|
+
if (type === "utility") return "button-v01--utility-primary";
|
|
59
|
+
return "button-v01--gradient";
|
|
60
|
+
}
|
|
61
|
+
function MaskIcon$3({
|
|
62
|
+
src,
|
|
63
|
+
className
|
|
64
|
+
}) {
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
66
|
+
"span",
|
|
67
|
+
{
|
|
68
|
+
className: cn("button-v01-mask", className),
|
|
69
|
+
style: {
|
|
70
|
+
WebkitMaskImage: `url("${src}")`,
|
|
71
|
+
maskImage: `url("${src}")`
|
|
72
|
+
},
|
|
73
|
+
"aria-hidden": true
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
function defaultLabel({
|
|
78
|
+
type,
|
|
79
|
+
hierarchy,
|
|
80
|
+
context
|
|
81
|
+
}) {
|
|
82
|
+
if (type === "icon") return null;
|
|
83
|
+
if (context === "confirm") return "Confirm";
|
|
84
|
+
if (context === "error" || context === "tooltip") return "Retract";
|
|
85
|
+
if (type === "utility" && hierarchy === "primary" && context === "default") {
|
|
86
|
+
return "Utility";
|
|
87
|
+
}
|
|
88
|
+
return "Call to action";
|
|
89
|
+
}
|
|
90
|
+
const ButtonV01 = React.forwardRef(
|
|
91
|
+
({
|
|
92
|
+
className,
|
|
93
|
+
size = "large",
|
|
94
|
+
typeVariant = "cta",
|
|
95
|
+
hierarchy = "primary",
|
|
96
|
+
appearance = "gradient",
|
|
97
|
+
theme = "default",
|
|
98
|
+
context = "default",
|
|
99
|
+
icon = "none",
|
|
100
|
+
iconSlot,
|
|
101
|
+
disabled,
|
|
102
|
+
children,
|
|
103
|
+
type = "button",
|
|
104
|
+
...props
|
|
105
|
+
}, ref) => {
|
|
106
|
+
const isIcon = typeVariant === "icon";
|
|
107
|
+
const isFloating = !isIcon && context === "floating";
|
|
108
|
+
const look = resolveLook({
|
|
109
|
+
type: typeVariant,
|
|
110
|
+
hierarchy,
|
|
111
|
+
appearance,
|
|
112
|
+
theme,
|
|
113
|
+
context,
|
|
114
|
+
icon
|
|
115
|
+
});
|
|
116
|
+
const label = children ?? defaultLabel({ type: typeVariant, hierarchy, context });
|
|
117
|
+
const glyph = (() => {
|
|
118
|
+
if (iconSlot) return iconSlot;
|
|
119
|
+
if (isFloating) {
|
|
120
|
+
return /* @__PURE__ */ jsx(
|
|
121
|
+
"img",
|
|
122
|
+
{
|
|
123
|
+
src: iconDevice,
|
|
124
|
+
alt: "",
|
|
125
|
+
className: "button-v01-device",
|
|
126
|
+
width: 20,
|
|
127
|
+
height: 19.0963
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
if (isIcon && icon !== "none") {
|
|
132
|
+
return /* @__PURE__ */ jsx(
|
|
133
|
+
MaskIcon$3,
|
|
134
|
+
{
|
|
135
|
+
src: ICON_SRC[icon],
|
|
136
|
+
className: cn(
|
|
137
|
+
"button-v01-glyph",
|
|
138
|
+
icon === "check" && "button-v01-glyph--check",
|
|
139
|
+
icon === "close" && "button-v01-glyph--close",
|
|
140
|
+
icon === "delete" && "button-v01-glyph--delete",
|
|
141
|
+
icon === "back" && "button-v01-glyph--back"
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
return null;
|
|
147
|
+
})();
|
|
148
|
+
return /* @__PURE__ */ jsxs(
|
|
149
|
+
"button",
|
|
150
|
+
{
|
|
151
|
+
ref,
|
|
152
|
+
type,
|
|
153
|
+
disabled,
|
|
154
|
+
className: cn(
|
|
155
|
+
buttonV01Variants({ size: isIcon ? void 0 : size ?? "large" }),
|
|
156
|
+
isIcon && "button-v01--icon",
|
|
157
|
+
look,
|
|
158
|
+
className
|
|
159
|
+
),
|
|
160
|
+
...props,
|
|
161
|
+
children: [
|
|
162
|
+
glyph,
|
|
163
|
+
label != null && label !== "" ? /* @__PURE__ */ jsx("span", { className: "button-v01-label", children: label }) : null
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
ButtonV01.displayName = "ButtonV01";
|
|
170
|
+
export {
|
|
171
|
+
ButtonV01,
|
|
172
|
+
buttonV01Variants
|
|
173
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { jsx, jsxs } 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
|
+
const buttonVariants = cva(
|
|
6
|
+
"button",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
// CTA variants
|
|
11
|
+
clear: "button--clear",
|
|
12
|
+
default: "button--default",
|
|
13
|
+
"primary-gradient": "button--primary-gradient",
|
|
14
|
+
"primary-dark": "button--primary-dark",
|
|
15
|
+
"secondary-light": "button--secondary-light",
|
|
16
|
+
"tertiary-light": "button--tertiary-light",
|
|
17
|
+
// Same pill shape as tertiary-light, red instead of blue — for a
|
|
18
|
+
// destructive inline action (e.g. "Remove" on an applied discount
|
|
19
|
+
// code) that isn't severe enough for a confirm dialog but shouldn't
|
|
20
|
+
// read as a neutral/affirmative action either.
|
|
21
|
+
"tertiary-danger": "button--tertiary-danger",
|
|
22
|
+
// Utility variants
|
|
23
|
+
"general-primary": "button--general-primary",
|
|
24
|
+
"general-secondary": "button--general-secondary",
|
|
25
|
+
"general-tertiary": "button--general-tertiary",
|
|
26
|
+
// Destructive actions: delete, remove, deactivate, void. `primary` confirms, `secondary` starts the action.
|
|
27
|
+
"danger-primary": "button--danger-primary",
|
|
28
|
+
"danger-secondary": "button--danger-secondary",
|
|
29
|
+
"transparent-tertiary": "button--transparent-tertiary",
|
|
30
|
+
"tooltip-primary": "button--tooltip-primary",
|
|
31
|
+
"tooltip-secondary": "button--tooltip-secondary",
|
|
32
|
+
"tooltip-primary-light": "button--tooltip-primary-light",
|
|
33
|
+
"tooltip-secondary-light": "button--tooltip-secondary-light"
|
|
34
|
+
},
|
|
35
|
+
size: {
|
|
36
|
+
xlarge: "button--xlarge",
|
|
37
|
+
large: "button--large",
|
|
38
|
+
utility: "button--utility",
|
|
39
|
+
icon: "button--icon"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
variant: "default",
|
|
44
|
+
size: "large"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
const sizeTextClasses = {
|
|
49
|
+
xlarge: "body-large",
|
|
50
|
+
large: "body-base",
|
|
51
|
+
utility: "body-small",
|
|
52
|
+
icon: ""
|
|
53
|
+
};
|
|
54
|
+
const Button = React.forwardRef(
|
|
55
|
+
({
|
|
56
|
+
className,
|
|
57
|
+
variant,
|
|
58
|
+
size,
|
|
59
|
+
ftMadeFont,
|
|
60
|
+
mazzardSoftFont,
|
|
61
|
+
icon: Icon,
|
|
62
|
+
iconPosition = "leading",
|
|
63
|
+
iconGap = "tight",
|
|
64
|
+
iconPadding = "asymmetric",
|
|
65
|
+
children,
|
|
66
|
+
style,
|
|
67
|
+
...props
|
|
68
|
+
}, ref) => {
|
|
69
|
+
const textClass = sizeTextClasses[size || "large"];
|
|
70
|
+
const iconEl = Icon ? /* @__PURE__ */ jsx(Icon, { size: 16, strokeWidth: 2, className: "button-icon", "aria-hidden": true }) : null;
|
|
71
|
+
return /* @__PURE__ */ jsx(
|
|
72
|
+
"button",
|
|
73
|
+
{
|
|
74
|
+
className: cn(
|
|
75
|
+
buttonVariants({ variant, size }),
|
|
76
|
+
Icon && iconPadding === "asymmetric" && iconPosition === "leading" && "button--has-icon-leading",
|
|
77
|
+
Icon && iconPadding === "asymmetric" && iconPosition === "trailing" && "button--has-icon-trailing",
|
|
78
|
+
Icon && iconGap === "normal" && "button--icon-gap-normal",
|
|
79
|
+
ftMadeFont && "font-ftMade",
|
|
80
|
+
mazzardSoftFont && "font-mazzardSoft",
|
|
81
|
+
className
|
|
82
|
+
),
|
|
83
|
+
style,
|
|
84
|
+
ref,
|
|
85
|
+
...props,
|
|
86
|
+
children: size === "icon" ? children : /* @__PURE__ */ jsxs("span", { className: "button-text", children: [
|
|
87
|
+
iconPosition === "leading" ? iconEl : null,
|
|
88
|
+
/* @__PURE__ */ jsx("span", { className: textClass, children }),
|
|
89
|
+
iconPosition === "trailing" ? iconEl : null
|
|
90
|
+
] })
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
Button.displayName = "Button";
|
|
96
|
+
export {
|
|
97
|
+
Button,
|
|
98
|
+
buttonVariants
|
|
99
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
3
|
+
import { DayPicker } from "react-day-picker";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import { buttonVariants } from "./button.js";
|
|
6
|
+
function Calendar({
|
|
7
|
+
className,
|
|
8
|
+
classNames,
|
|
9
|
+
showOutsideDays = true,
|
|
10
|
+
...props
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
DayPicker,
|
|
14
|
+
{
|
|
15
|
+
showOutsideDays,
|
|
16
|
+
className: cn("calendar", className),
|
|
17
|
+
classNames: {
|
|
18
|
+
months: "calendar-months",
|
|
19
|
+
month: "calendar-month",
|
|
20
|
+
caption: "calendar-caption",
|
|
21
|
+
caption_label: "calendar-caption-label",
|
|
22
|
+
nav: "calendar-nav",
|
|
23
|
+
nav_button: cn(
|
|
24
|
+
buttonVariants({ variant: "general-secondary" }),
|
|
25
|
+
"calendar-nav-button"
|
|
26
|
+
),
|
|
27
|
+
nav_button_previous: "calendar-nav-button-previous",
|
|
28
|
+
nav_button_next: "calendar-nav-button-next",
|
|
29
|
+
table: "calendar-table",
|
|
30
|
+
head_row: "calendar-head-row",
|
|
31
|
+
head_cell: "calendar-head-cell",
|
|
32
|
+
row: "calendar-row",
|
|
33
|
+
cell: "calendar-cell",
|
|
34
|
+
day: cn(
|
|
35
|
+
buttonVariants({ variant: "general-tertiary" }),
|
|
36
|
+
"calendar-day"
|
|
37
|
+
),
|
|
38
|
+
day_range_end: "calendar-day-range-end",
|
|
39
|
+
day_selected: "calendar-day-selected",
|
|
40
|
+
day_today: "calendar-day-today",
|
|
41
|
+
day_outside: "calendar-day-outside",
|
|
42
|
+
day_disabled: "calendar-day-disabled",
|
|
43
|
+
day_range_middle: "calendar-day-range-middle",
|
|
44
|
+
day_hidden: "calendar-day-hidden",
|
|
45
|
+
...classNames
|
|
46
|
+
},
|
|
47
|
+
components: {
|
|
48
|
+
Chevron: (props2) => {
|
|
49
|
+
if (props2.orientation === "left") {
|
|
50
|
+
return /* @__PURE__ */ jsx(ChevronLeft, { className: "icon-4" });
|
|
51
|
+
}
|
|
52
|
+
return /* @__PURE__ */ jsx(ChevronRight, { className: "icon-4" });
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
...props
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
Calendar.displayName = "Calendar";
|
|
60
|
+
export {
|
|
61
|
+
Calendar
|
|
62
|
+
};
|