@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,326 @@
|
|
|
1
|
+
import { jsx, jsxs } 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 { Button } from "./button.js";
|
|
6
|
+
import { UtilityChevronDown } from "../icons/UtilityChevronDown.js";
|
|
7
|
+
const AccordionContext = React.createContext(
|
|
8
|
+
null
|
|
9
|
+
);
|
|
10
|
+
const AccordionItemContext = React.createContext(null);
|
|
11
|
+
function useAccordion() {
|
|
12
|
+
const context = React.useContext(AccordionContext);
|
|
13
|
+
if (!context) {
|
|
14
|
+
throw new Error("Accordion components must be used within <Accordion>");
|
|
15
|
+
}
|
|
16
|
+
return context;
|
|
17
|
+
}
|
|
18
|
+
function useAccordionItem() {
|
|
19
|
+
const context = React.useContext(AccordionItemContext);
|
|
20
|
+
if (!context) {
|
|
21
|
+
throw new Error(
|
|
22
|
+
"AccordionTrigger and AccordionContent must be used within <AccordionItem>"
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
return context;
|
|
26
|
+
}
|
|
27
|
+
function useAccordionState(options = {}) {
|
|
28
|
+
const { allowMultiple = false, defaultExpanded } = options;
|
|
29
|
+
const getInitialExpanded = () => {
|
|
30
|
+
if (!defaultExpanded) return /* @__PURE__ */ new Set();
|
|
31
|
+
if (Array.isArray(defaultExpanded)) return new Set(defaultExpanded);
|
|
32
|
+
return /* @__PURE__ */ new Set([defaultExpanded]);
|
|
33
|
+
};
|
|
34
|
+
const [expandedValues, setExpandedValues] = React.useState(getInitialExpanded);
|
|
35
|
+
const [isAllExpanded, setIsAllExpanded] = React.useState(false);
|
|
36
|
+
const hasAnyExpanded = React.useMemo(
|
|
37
|
+
() => isAllExpanded || expandedValues.size > 0,
|
|
38
|
+
[isAllExpanded, expandedValues]
|
|
39
|
+
);
|
|
40
|
+
const toggleAll = React.useCallback(() => {
|
|
41
|
+
if (hasAnyExpanded) {
|
|
42
|
+
setIsAllExpanded(false);
|
|
43
|
+
setExpandedValues(/* @__PURE__ */ new Set());
|
|
44
|
+
} else {
|
|
45
|
+
setIsAllExpanded(true);
|
|
46
|
+
setExpandedValues(/* @__PURE__ */ new Set());
|
|
47
|
+
}
|
|
48
|
+
}, [hasAnyExpanded]);
|
|
49
|
+
return {
|
|
50
|
+
expandedValues,
|
|
51
|
+
setExpandedValues,
|
|
52
|
+
hasAnyExpanded,
|
|
53
|
+
toggleAll
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
const Accordion = React.forwardRef(
|
|
57
|
+
({
|
|
58
|
+
allowMultiple = false,
|
|
59
|
+
defaultExpanded,
|
|
60
|
+
expandedValues: controlledExpandedValues,
|
|
61
|
+
onExpandedChange,
|
|
62
|
+
children,
|
|
63
|
+
className,
|
|
64
|
+
...props
|
|
65
|
+
}, ref) => {
|
|
66
|
+
const getInitialExpanded = () => {
|
|
67
|
+
if (!defaultExpanded) return /* @__PURE__ */ new Set();
|
|
68
|
+
if (Array.isArray(defaultExpanded)) return new Set(defaultExpanded);
|
|
69
|
+
return /* @__PURE__ */ new Set([defaultExpanded]);
|
|
70
|
+
};
|
|
71
|
+
const [uncontrolledExpandedValues, setUncontrolledExpandedValues] = React.useState(getInitialExpanded);
|
|
72
|
+
const [isAllExpanded, setIsAllExpanded] = React.useState(false);
|
|
73
|
+
const isControlled = controlledExpandedValues !== void 0;
|
|
74
|
+
const expandedValues = isControlled ? controlledExpandedValues : uncontrolledExpandedValues;
|
|
75
|
+
const hasAnyExpanded = React.useMemo(
|
|
76
|
+
() => isAllExpanded || expandedValues.size > 0,
|
|
77
|
+
[isAllExpanded, expandedValues]
|
|
78
|
+
);
|
|
79
|
+
const isExpanded = React.useCallback(
|
|
80
|
+
(value) => isAllExpanded || expandedValues.has(value),
|
|
81
|
+
[isAllExpanded, expandedValues]
|
|
82
|
+
);
|
|
83
|
+
const toggle = React.useCallback(
|
|
84
|
+
(value) => {
|
|
85
|
+
const newValues = new Set(expandedValues);
|
|
86
|
+
if (newValues.has(value)) {
|
|
87
|
+
newValues.delete(value);
|
|
88
|
+
} else {
|
|
89
|
+
if (!allowMultiple) {
|
|
90
|
+
newValues.clear();
|
|
91
|
+
}
|
|
92
|
+
newValues.add(value);
|
|
93
|
+
}
|
|
94
|
+
if (!isControlled) {
|
|
95
|
+
setUncontrolledExpandedValues(newValues);
|
|
96
|
+
}
|
|
97
|
+
onExpandedChange == null ? void 0 : onExpandedChange(newValues);
|
|
98
|
+
setIsAllExpanded(false);
|
|
99
|
+
},
|
|
100
|
+
[allowMultiple, expandedValues, isControlled, onExpandedChange]
|
|
101
|
+
);
|
|
102
|
+
const expandAll = React.useCallback(() => {
|
|
103
|
+
setIsAllExpanded(true);
|
|
104
|
+
const emptySet = /* @__PURE__ */ new Set();
|
|
105
|
+
if (!isControlled) {
|
|
106
|
+
setUncontrolledExpandedValues(emptySet);
|
|
107
|
+
}
|
|
108
|
+
onExpandedChange == null ? void 0 : onExpandedChange(emptySet);
|
|
109
|
+
}, [isControlled, onExpandedChange]);
|
|
110
|
+
const collapseAll = React.useCallback(() => {
|
|
111
|
+
setIsAllExpanded(false);
|
|
112
|
+
const emptySet = /* @__PURE__ */ new Set();
|
|
113
|
+
if (!isControlled) {
|
|
114
|
+
setUncontrolledExpandedValues(emptySet);
|
|
115
|
+
}
|
|
116
|
+
onExpandedChange == null ? void 0 : onExpandedChange(emptySet);
|
|
117
|
+
}, [isControlled, onExpandedChange]);
|
|
118
|
+
const contextValue = React.useMemo(
|
|
119
|
+
() => ({
|
|
120
|
+
expandedValues,
|
|
121
|
+
isExpanded,
|
|
122
|
+
toggle,
|
|
123
|
+
expandAll,
|
|
124
|
+
collapseAll,
|
|
125
|
+
hasAnyExpanded,
|
|
126
|
+
allowMultiple
|
|
127
|
+
}),
|
|
128
|
+
[
|
|
129
|
+
expandedValues,
|
|
130
|
+
isExpanded,
|
|
131
|
+
toggle,
|
|
132
|
+
expandAll,
|
|
133
|
+
collapseAll,
|
|
134
|
+
hasAnyExpanded,
|
|
135
|
+
allowMultiple
|
|
136
|
+
]
|
|
137
|
+
);
|
|
138
|
+
return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx("div", { ref, className: cn(className), ...props, children }) });
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
Accordion.displayName = "Accordion";
|
|
142
|
+
const AccordionSectionHeader = React.forwardRef(({ title, hasExpanded, onToggleAll, className, titleClassName }, ref) => {
|
|
143
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cn(className), children: [
|
|
144
|
+
/* @__PURE__ */ jsx("h2", { className: cn(titleClassName), children: title }),
|
|
145
|
+
onToggleAll && /* @__PURE__ */ jsx(
|
|
146
|
+
motion.div,
|
|
147
|
+
{
|
|
148
|
+
animate: { rotate: hasExpanded ? 180 : 0 },
|
|
149
|
+
transition: { duration: 0.2 },
|
|
150
|
+
children: /* @__PURE__ */ jsx(
|
|
151
|
+
Button,
|
|
152
|
+
{
|
|
153
|
+
size: "icon",
|
|
154
|
+
onClick: onToggleAll,
|
|
155
|
+
"aria-label": hasExpanded ? "Collapse all" : "Expand all",
|
|
156
|
+
children: /* @__PURE__ */ jsx(UtilityChevronDown, {})
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
] });
|
|
162
|
+
});
|
|
163
|
+
AccordionSectionHeader.displayName = "AccordionSectionHeader";
|
|
164
|
+
const AccordionHeaderRow = React.forwardRef(({ title, className }, ref) => {
|
|
165
|
+
const { hasAnyExpanded, expandAll, collapseAll } = useAccordion();
|
|
166
|
+
const handleToggleAll = React.useCallback(() => {
|
|
167
|
+
if (hasAnyExpanded) {
|
|
168
|
+
collapseAll();
|
|
169
|
+
} else {
|
|
170
|
+
expandAll();
|
|
171
|
+
}
|
|
172
|
+
}, [hasAnyExpanded, collapseAll, expandAll]);
|
|
173
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cn(className), children: [
|
|
174
|
+
/* @__PURE__ */ jsx("h2", { children: title }),
|
|
175
|
+
/* @__PURE__ */ jsx(
|
|
176
|
+
motion.div,
|
|
177
|
+
{
|
|
178
|
+
animate: { rotate: hasAnyExpanded ? 180 : 0 },
|
|
179
|
+
transition: { duration: 0.2 },
|
|
180
|
+
style: { willChange: "transform" },
|
|
181
|
+
children: /* @__PURE__ */ jsx(
|
|
182
|
+
Button,
|
|
183
|
+
{
|
|
184
|
+
size: "icon",
|
|
185
|
+
variant: "clear",
|
|
186
|
+
onClick: handleToggleAll,
|
|
187
|
+
"aria-label": hasAnyExpanded ? "Collapse all" : "Expand all",
|
|
188
|
+
children: /* @__PURE__ */ jsx(UtilityChevronDown, {})
|
|
189
|
+
}
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
] });
|
|
194
|
+
});
|
|
195
|
+
AccordionHeaderRow.displayName = "AccordionHeaderRow";
|
|
196
|
+
const AccordionItem = React.forwardRef(
|
|
197
|
+
({ value, children, className, noBorderOnOpen, ...props }, ref) => {
|
|
198
|
+
const { isExpanded: isExpandedFn } = useAccordion();
|
|
199
|
+
const isExpanded = isExpandedFn(value);
|
|
200
|
+
const itemContextValue = React.useMemo(
|
|
201
|
+
() => ({ value, isExpanded, noBorderOnOpen }),
|
|
202
|
+
[value, isExpanded, noBorderOnOpen]
|
|
203
|
+
);
|
|
204
|
+
return /* @__PURE__ */ jsx(AccordionItemContext.Provider, { value: itemContextValue, children: /* @__PURE__ */ jsx(
|
|
205
|
+
"div",
|
|
206
|
+
{
|
|
207
|
+
ref,
|
|
208
|
+
className: cn(className),
|
|
209
|
+
style: noBorderOnOpen && isExpanded ? { borderBottom: "none" } : void 0,
|
|
210
|
+
...props,
|
|
211
|
+
children
|
|
212
|
+
}
|
|
213
|
+
) });
|
|
214
|
+
}
|
|
215
|
+
);
|
|
216
|
+
AccordionItem.displayName = "AccordionItem";
|
|
217
|
+
const AccordionHeader = React.forwardRef(
|
|
218
|
+
({ children, className, onClick, transparentOnOpen, ...props }, ref) => {
|
|
219
|
+
const { isExpanded } = useAccordionItem();
|
|
220
|
+
return /* @__PURE__ */ jsx(
|
|
221
|
+
"div",
|
|
222
|
+
{
|
|
223
|
+
ref,
|
|
224
|
+
onClick,
|
|
225
|
+
className: cn(className),
|
|
226
|
+
style: transparentOnOpen && isExpanded ? { backgroundColor: "transparent" } : void 0,
|
|
227
|
+
...props,
|
|
228
|
+
children
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
AccordionHeader.displayName = "AccordionHeader";
|
|
234
|
+
const AccordionTrigger = React.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
235
|
+
const { toggle } = useAccordion();
|
|
236
|
+
const { value, isExpanded } = useAccordionItem();
|
|
237
|
+
const handleClick = React.useCallback(
|
|
238
|
+
(e) => {
|
|
239
|
+
e.stopPropagation();
|
|
240
|
+
toggle(value);
|
|
241
|
+
onClick == null ? void 0 : onClick(e);
|
|
242
|
+
},
|
|
243
|
+
[toggle, value, onClick]
|
|
244
|
+
);
|
|
245
|
+
return /* @__PURE__ */ jsx(
|
|
246
|
+
motion.div,
|
|
247
|
+
{
|
|
248
|
+
animate: { rotate: isExpanded ? 180 : 0 },
|
|
249
|
+
transition: { duration: 0.2 },
|
|
250
|
+
style: { willChange: "transform" },
|
|
251
|
+
children: /* @__PURE__ */ jsx(
|
|
252
|
+
Button,
|
|
253
|
+
{
|
|
254
|
+
ref,
|
|
255
|
+
size: "icon",
|
|
256
|
+
variant: "clear",
|
|
257
|
+
onClick: handleClick,
|
|
258
|
+
className: cn(className),
|
|
259
|
+
"aria-expanded": isExpanded,
|
|
260
|
+
"aria-label": isExpanded ? "Collapse" : "Expand",
|
|
261
|
+
...props,
|
|
262
|
+
children: /* @__PURE__ */ jsx(UtilityChevronDown, {})
|
|
263
|
+
}
|
|
264
|
+
)
|
|
265
|
+
}
|
|
266
|
+
);
|
|
267
|
+
});
|
|
268
|
+
AccordionTrigger.displayName = "AccordionTrigger";
|
|
269
|
+
const AccordionContent = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
270
|
+
const { isExpanded, noBorderOnOpen } = useAccordionItem();
|
|
271
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: isExpanded && /* @__PURE__ */ jsx(
|
|
272
|
+
motion.div,
|
|
273
|
+
{
|
|
274
|
+
initial: { height: 0, opacity: 0 },
|
|
275
|
+
animate: { height: "auto", opacity: 1 },
|
|
276
|
+
exit: { height: 0, opacity: 0 },
|
|
277
|
+
transition: { duration: 0.3, ease: [0.25, 0.46, 0.45, 0.94] },
|
|
278
|
+
className: cn(className),
|
|
279
|
+
style: {
|
|
280
|
+
willChange: "opacity",
|
|
281
|
+
...noBorderOnOpen ? { borderTop: "none" } : {}
|
|
282
|
+
},
|
|
283
|
+
children: /* @__PURE__ */ jsx("div", { ref, ...props, children })
|
|
284
|
+
}
|
|
285
|
+
) });
|
|
286
|
+
});
|
|
287
|
+
AccordionContent.displayName = "AccordionContent";
|
|
288
|
+
const AccordionListRow = React.forwardRef(
|
|
289
|
+
({
|
|
290
|
+
icon,
|
|
291
|
+
badge,
|
|
292
|
+
title,
|
|
293
|
+
titleClassName,
|
|
294
|
+
rightContent,
|
|
295
|
+
onClick,
|
|
296
|
+
className,
|
|
297
|
+
variant = "default",
|
|
298
|
+
...props
|
|
299
|
+
}, ref) => {
|
|
300
|
+
return /* @__PURE__ */ jsxs("div", { ref, onClick, className: cn(className), ...props, children: [
|
|
301
|
+
icon,
|
|
302
|
+
badge,
|
|
303
|
+
/* @__PURE__ */ jsx("span", { className: cn(titleClassName), children: title }),
|
|
304
|
+
rightContent
|
|
305
|
+
] });
|
|
306
|
+
}
|
|
307
|
+
);
|
|
308
|
+
AccordionListRow.displayName = "AccordionListRow";
|
|
309
|
+
const AccordionContainer = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
310
|
+
return /* @__PURE__ */ jsx("section", { ref, className: cn(className), ...props, children });
|
|
311
|
+
});
|
|
312
|
+
AccordionContainer.displayName = "AccordionContainer";
|
|
313
|
+
export {
|
|
314
|
+
Accordion,
|
|
315
|
+
AccordionContainer,
|
|
316
|
+
AccordionContent,
|
|
317
|
+
AccordionHeader,
|
|
318
|
+
AccordionHeaderRow,
|
|
319
|
+
AccordionItem,
|
|
320
|
+
AccordionListRow,
|
|
321
|
+
AccordionSectionHeader,
|
|
322
|
+
AccordionTrigger,
|
|
323
|
+
useAccordion,
|
|
324
|
+
useAccordionItem,
|
|
325
|
+
useAccordionState
|
|
326
|
+
};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
import { ButtonV01 } from "./button-v01.js";
|
|
7
|
+
const alertDialogPanelVariants = cva("alert-dialog-panel", {
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "alert-dialog-panel--default",
|
|
11
|
+
destruction: "alert-dialog-panel--destruction",
|
|
12
|
+
success: "alert-dialog-panel--success"
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
medium: "alert-dialog-panel--medium",
|
|
16
|
+
small: "alert-dialog-panel--small"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "default",
|
|
21
|
+
size: "medium"
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const cancelHierarchy = (variant, size) => size === "medium" && variant !== "success" ? "tertiary" : "secondary";
|
|
25
|
+
const actionIsCta = (variant) => variant === "success";
|
|
26
|
+
const titleTypography = {
|
|
27
|
+
medium: "heading-xsmall",
|
|
28
|
+
small: "heading-xxsmall"
|
|
29
|
+
};
|
|
30
|
+
const descriptionTypography = {
|
|
31
|
+
medium: "body-base",
|
|
32
|
+
small: "body-small"
|
|
33
|
+
};
|
|
34
|
+
const bodyFontClass = "font-mazzardSoft";
|
|
35
|
+
const AlertDialogPanelSurface = React.forwardRef(
|
|
36
|
+
({
|
|
37
|
+
className,
|
|
38
|
+
variant = "default",
|
|
39
|
+
size = "medium",
|
|
40
|
+
title,
|
|
41
|
+
description,
|
|
42
|
+
showDescription = true,
|
|
43
|
+
cancelLabel = "Cancel",
|
|
44
|
+
actionLabel = "Confirm",
|
|
45
|
+
onCancel,
|
|
46
|
+
onAction,
|
|
47
|
+
asPrimitive = false,
|
|
48
|
+
children,
|
|
49
|
+
...props
|
|
50
|
+
}, ref) => {
|
|
51
|
+
const resolvedVariant = variant ?? "default";
|
|
52
|
+
const resolvedSize = size ?? "medium";
|
|
53
|
+
const buttonSize = resolvedSize === "medium" ? "medium" : "small";
|
|
54
|
+
const TitleTag = asPrimitive ? AlertDialogPrimitive.Title : "h2";
|
|
55
|
+
const DescriptionTag = asPrimitive ? AlertDialogPrimitive.Description : "p";
|
|
56
|
+
const cancelButton = /* @__PURE__ */ jsx(
|
|
57
|
+
ButtonV01,
|
|
58
|
+
{
|
|
59
|
+
type: "button",
|
|
60
|
+
size: buttonSize,
|
|
61
|
+
typeVariant: "cta",
|
|
62
|
+
hierarchy: cancelHierarchy(resolvedVariant, resolvedSize),
|
|
63
|
+
appearance: "stroke",
|
|
64
|
+
theme: "light",
|
|
65
|
+
className: "alert-dialog-panel-button",
|
|
66
|
+
onClick: onCancel,
|
|
67
|
+
children: cancelLabel
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
const actionButton = /* @__PURE__ */ jsx(
|
|
71
|
+
ButtonV01,
|
|
72
|
+
{
|
|
73
|
+
type: "button",
|
|
74
|
+
size: buttonSize,
|
|
75
|
+
typeVariant: actionIsCta(resolvedVariant) ? "cta" : "utility",
|
|
76
|
+
hierarchy: "primary",
|
|
77
|
+
appearance: actionIsCta(resolvedVariant) ? "gradient" : "solid",
|
|
78
|
+
className: cn(
|
|
79
|
+
"alert-dialog-panel-button",
|
|
80
|
+
resolvedVariant === "destruction" && "alert-dialog-panel-button--destruction",
|
|
81
|
+
resolvedVariant === "success" && "alert-dialog-panel-button--success"
|
|
82
|
+
),
|
|
83
|
+
onClick: onAction,
|
|
84
|
+
children: actionLabel
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
return /* @__PURE__ */ jsxs(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
ref,
|
|
91
|
+
className: cn(alertDialogPanelVariants({ variant, size }), className),
|
|
92
|
+
...props,
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ jsxs("div", { className: "alert-dialog-panel-text", children: [
|
|
95
|
+
/* @__PURE__ */ jsx(
|
|
96
|
+
TitleTag,
|
|
97
|
+
{
|
|
98
|
+
className: cn(
|
|
99
|
+
"alert-dialog-panel-title",
|
|
100
|
+
titleTypography[resolvedSize]
|
|
101
|
+
),
|
|
102
|
+
children: title
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
showDescription && description ? /* @__PURE__ */ jsx(
|
|
106
|
+
DescriptionTag,
|
|
107
|
+
{
|
|
108
|
+
className: cn(
|
|
109
|
+
"alert-dialog-panel-description",
|
|
110
|
+
descriptionTypography[resolvedSize],
|
|
111
|
+
bodyFontClass
|
|
112
|
+
),
|
|
113
|
+
children: description
|
|
114
|
+
}
|
|
115
|
+
) : null
|
|
116
|
+
] }),
|
|
117
|
+
children ?? /* @__PURE__ */ jsx("div", { className: "alert-dialog-panel-actions", children: asPrimitive ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
118
|
+
/* @__PURE__ */ jsx(AlertDialogPrimitive.Cancel, { asChild: true, children: cancelButton }),
|
|
119
|
+
/* @__PURE__ */ jsx(AlertDialogPrimitive.Action, { asChild: true, children: actionButton })
|
|
120
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
121
|
+
cancelButton,
|
|
122
|
+
actionButton
|
|
123
|
+
] }) })
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
AlertDialogPanelSurface.displayName = "AlertDialogPanelSurface";
|
|
130
|
+
const AlertDialogPanel = ({
|
|
131
|
+
open,
|
|
132
|
+
defaultOpen,
|
|
133
|
+
onOpenChange,
|
|
134
|
+
trigger,
|
|
135
|
+
...surfaceProps
|
|
136
|
+
}) => /* @__PURE__ */ jsxs(
|
|
137
|
+
AlertDialogPrimitive.Root,
|
|
138
|
+
{
|
|
139
|
+
open,
|
|
140
|
+
defaultOpen,
|
|
141
|
+
onOpenChange,
|
|
142
|
+
children: [
|
|
143
|
+
trigger ? /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, { asChild: true, children: trigger }) : null,
|
|
144
|
+
/* @__PURE__ */ jsxs(AlertDialogPrimitive.Portal, { children: [
|
|
145
|
+
/* @__PURE__ */ jsx(AlertDialogPrimitive.Overlay, { className: "alert-dialog-panel-overlay" }),
|
|
146
|
+
/* @__PURE__ */ jsx(AlertDialogPrimitive.Content, { className: "alert-dialog-panel-positioner", children: /* @__PURE__ */ jsx(AlertDialogPanelSurface, { asPrimitive: true, ...surfaceProps }) })
|
|
147
|
+
] })
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
AlertDialogPanel.displayName = "AlertDialogPanel";
|
|
152
|
+
export {
|
|
153
|
+
AlertDialogPanel,
|
|
154
|
+
AlertDialogPanelSurface,
|
|
155
|
+
alertDialogPanelVariants
|
|
156
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import { buttonVariants } from "./button.js";
|
|
6
|
+
const AlertDialog = AlertDialogPrimitive.Root;
|
|
7
|
+
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
8
|
+
const AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
9
|
+
const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
10
|
+
AlertDialogPrimitive.Overlay,
|
|
11
|
+
{
|
|
12
|
+
className: cn("alert-dialog-overlay", className),
|
|
13
|
+
...props,
|
|
14
|
+
ref
|
|
15
|
+
}
|
|
16
|
+
));
|
|
17
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
18
|
+
const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
19
|
+
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
20
|
+
/* @__PURE__ */ jsx(
|
|
21
|
+
AlertDialogPrimitive.Content,
|
|
22
|
+
{
|
|
23
|
+
ref,
|
|
24
|
+
className: cn("alert-dialog-content", className),
|
|
25
|
+
...props
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
] }));
|
|
29
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
30
|
+
const AlertDialogHeader = ({
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}) => /* @__PURE__ */ jsx(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
className: cn("alert-dialog-header", className),
|
|
37
|
+
...props
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
41
|
+
const AlertDialogFooter = ({
|
|
42
|
+
className,
|
|
43
|
+
...props
|
|
44
|
+
}) => /* @__PURE__ */ jsx(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: cn("alert-dialog-footer", className),
|
|
48
|
+
...props
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
52
|
+
const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
53
|
+
AlertDialogPrimitive.Title,
|
|
54
|
+
{
|
|
55
|
+
ref,
|
|
56
|
+
className: cn("alert-dialog-title", className),
|
|
57
|
+
...props
|
|
58
|
+
}
|
|
59
|
+
));
|
|
60
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
61
|
+
const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
62
|
+
AlertDialogPrimitive.Description,
|
|
63
|
+
{
|
|
64
|
+
ref,
|
|
65
|
+
className: cn("alert-dialog-description", className),
|
|
66
|
+
...props
|
|
67
|
+
}
|
|
68
|
+
));
|
|
69
|
+
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
70
|
+
const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
71
|
+
AlertDialogPrimitive.Action,
|
|
72
|
+
{
|
|
73
|
+
ref,
|
|
74
|
+
className: cn(buttonVariants(), className),
|
|
75
|
+
...props
|
|
76
|
+
}
|
|
77
|
+
));
|
|
78
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
79
|
+
const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
80
|
+
AlertDialogPrimitive.Cancel,
|
|
81
|
+
{
|
|
82
|
+
ref,
|
|
83
|
+
className: cn(
|
|
84
|
+
buttonVariants({ variant: "general-secondary" }),
|
|
85
|
+
className
|
|
86
|
+
),
|
|
87
|
+
...props
|
|
88
|
+
}
|
|
89
|
+
));
|
|
90
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
91
|
+
export {
|
|
92
|
+
AlertDialog,
|
|
93
|
+
AlertDialogAction,
|
|
94
|
+
AlertDialogCancel,
|
|
95
|
+
AlertDialogContent,
|
|
96
|
+
AlertDialogDescription,
|
|
97
|
+
AlertDialogFooter,
|
|
98
|
+
AlertDialogHeader,
|
|
99
|
+
AlertDialogOverlay,
|
|
100
|
+
AlertDialogPortal,
|
|
101
|
+
AlertDialogTitle,
|
|
102
|
+
AlertDialogTrigger
|
|
103
|
+
};
|