keystone-design-bootstrap 1.0.36 → 1.0.37

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.
@@ -158,6 +158,15 @@ declare const StarIcon: ({ progress, ...props }: StarIconProps) => React.JSX.Ele
158
158
 
159
159
  declare const Wreath: (props: HTMLAttributes<HTMLOrSVGElement>) => React.JSX.Element;
160
160
 
161
+ interface SocialIconProps {
162
+ platform: string;
163
+ className?: string;
164
+ }
165
+ /** Renders the icon for a given platform (facebook, instagram, tiktok, etc.). */
166
+ declare function SocialIcon({ platform, className }: SocialIconProps): React__default.ReactNode;
167
+ /** Returns the icon element for a platform (for use in map/render). */
168
+ declare function getSocialIcon(platform: string, className?: string): React__default.ReactNode;
169
+
161
170
  type CarouselApi = UseEmblaCarouselType[1];
162
171
  type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
163
172
  type CarouselOptions = UseCarouselParameters[0];
@@ -336,4 +345,4 @@ declare const PaginationPageMinimalCenter: (props: Record<string, unknown>) => R
336
345
  declare const GoogleMap: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
337
346
  declare const MarkdownRenderer: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
338
347
 
339
- export { Avatar, AvatarLabelGroup, Badge, BadgeGroup, BadgeWithDot, Breadcrumb, Button, ButtonGroup, Carousel, CarouselContext, CarouselSectionWrapper, ComboBox, FeaturedIcon, Form, FormContainer, GoogleMap, HintText, Input, InputBase, InputGroup, Label, MarkdownRenderer, NativeSelect, Pagination, PaginationPageDefault, PaginationPageMinimalCenter, PhotoWithFallback, PrivacyCheckbox, RatingBadge, RatingStars, RoundButton, Select, SelectItem, StarIcon, Textarea, Tooltip, VerifiedTick, VideoModal, VideoPlayButton, Wreath, getStarProgress, useCarousel };
348
+ export { Avatar, AvatarLabelGroup, Badge, BadgeGroup, BadgeWithDot, Breadcrumb, Button, ButtonGroup, Carousel, CarouselContext, CarouselSectionWrapper, ComboBox, FeaturedIcon, Form, FormContainer, GoogleMap, HintText, Input, InputBase, InputGroup, Label, MarkdownRenderer, NativeSelect, Pagination, PaginationPageDefault, PaginationPageMinimalCenter, PhotoWithFallback, PrivacyCheckbox, RatingBadge, RatingStars, RoundButton, Select, SelectItem, SocialIcon, StarIcon, Textarea, Tooltip, VerifiedTick, VideoModal, VideoPlayButton, Wreath, getSocialIcon, getStarProgress, useCarousel };
@@ -32,7 +32,7 @@ var __objRest = (source, exclude) => {
32
32
  };
33
33
 
34
34
  // src/design_system/elements/index.tsx
35
- import React12 from "react";
35
+ import React13 from "react";
36
36
 
37
37
  // src/lib/component-registry.ts
38
38
  var registry = /* @__PURE__ */ new Map();
@@ -3375,6 +3375,52 @@ function Select2(_a) {
3375
3375
  }
3376
3376
  registerThemeVariant("select", "aman", Select2);
3377
3377
 
3378
+ // src/design_system/elements/social-icons/social-icons.tsx
3379
+ import React11 from "react";
3380
+ var defaultClassName = "w-5 h-5 flex-shrink-0";
3381
+ var FacebookIcon = ({ className = defaultClassName }) => /* @__PURE__ */ React11.createElement("svg", { className, fill: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React11.createElement("path", { d: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" }));
3382
+ var InstagramIcon = ({ className = defaultClassName }) => /* @__PURE__ */ React11.createElement("svg", { className, fill: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React11.createElement("path", { d: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z" }));
3383
+ var YouTubeIcon = ({ className = defaultClassName }) => /* @__PURE__ */ React11.createElement("svg", { className, fill: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React11.createElement("path", { d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" }));
3384
+ var GoogleIcon = ({ className = defaultClassName }) => /* @__PURE__ */ React11.createElement("svg", { className, fill: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React11.createElement("path", { d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" }), /* @__PURE__ */ React11.createElement("path", { d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" }), /* @__PURE__ */ React11.createElement("path", { d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" }), /* @__PURE__ */ React11.createElement("path", { d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" }));
3385
+ var TikTokIcon = ({ className = defaultClassName }) => /* @__PURE__ */ React11.createElement("svg", { className, fill: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React11.createElement("path", { d: "M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-5.2 1.74 2.89 2.89 0 0 1 2.31-4.64 2.93 2.93 0 0 1 .88.13V9.4a6.84 6.84 0 0 0-1-.05A6.33 6.33 0 0 0 5 20.1a6.34 6.34 0 0 0 10.86-4.43v-7a8.16 8.16 0 0 0 4.77 1.52v-3.4a4.85 4.85 0 0 1-1-.1z" }));
3386
+ var LinkedInIcon = ({ className = defaultClassName }) => /* @__PURE__ */ React11.createElement("svg", { className, fill: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React11.createElement("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }));
3387
+ var TwitterIcon = ({ className = defaultClassName }) => /* @__PURE__ */ React11.createElement("svg", { className, fill: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React11.createElement("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }));
3388
+ var PinterestIcon = ({ className = defaultClassName }) => /* @__PURE__ */ React11.createElement("svg", { className, fill: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React11.createElement("path", { d: "M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026L12.017 0z" }));
3389
+ var YelpIcon = ({ className = defaultClassName }) => /* @__PURE__ */ React11.createElement("svg", { className, fill: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React11.createElement("path", { d: "M20.16 12.594l-4.995 1.33c-.96.26-1.96-.19-2.23-1.11l-.894-3.39c-.27-.99.31-2.04 1.31-2.42l4.995-1.33c.96-.26 1.96.19 2.23 1.11l.894 3.39c.27.99-.31 2.04-1.31 2.42zM12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1z" }));
3390
+ var TripAdvisorIcon = ({ className = defaultClassName }) => /* @__PURE__ */ React11.createElement("svg", { className, fill: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React11.createElement("path", { d: "M12.006 4.295c-2.67 0-5.338.784-7.645 2.353H0l2.337 4.598a11.994 11.994 0 0 0 9.669 5.107 11.994 11.994 0 0 0 9.669-5.107L24 6.648h-4.35a12.037 12.037 0 0 0-7.644-2.353zM12 6.255c1.531 0 2.764 1.233 2.764 2.764S13.531 11.783 12 11.783 9.236 10.55 9.236 9.019s1.233-2.764 2.764-2.764zM12 15.021c-2.667 0-5.338-.784-7.645-2.352H0l2.337 4.598a11.994 11.994 0 0 0 9.669 5.107 11.994 11.994 0 0 0 9.669-5.107L24 15.021h-4.35A12.037 12.037 0 0 1 12 15.021z" }));
3391
+ function SocialIcon({ platform, className = defaultClassName }) {
3392
+ const p = platform.toLowerCase();
3393
+ switch (p) {
3394
+ case "facebook":
3395
+ return /* @__PURE__ */ React11.createElement(FacebookIcon, { className });
3396
+ case "instagram":
3397
+ return /* @__PURE__ */ React11.createElement(InstagramIcon, { className });
3398
+ case "youtube":
3399
+ return /* @__PURE__ */ React11.createElement(YouTubeIcon, { className });
3400
+ case "google":
3401
+ case "google_my_business":
3402
+ case "google_reviews":
3403
+ return /* @__PURE__ */ React11.createElement(GoogleIcon, { className });
3404
+ case "tiktok":
3405
+ return /* @__PURE__ */ React11.createElement(TikTokIcon, { className });
3406
+ case "linkedin":
3407
+ return /* @__PURE__ */ React11.createElement(LinkedInIcon, { className });
3408
+ case "twitter":
3409
+ return /* @__PURE__ */ React11.createElement(TwitterIcon, { className });
3410
+ case "pinterest":
3411
+ return /* @__PURE__ */ React11.createElement(PinterestIcon, { className });
3412
+ case "yelp":
3413
+ return /* @__PURE__ */ React11.createElement(YelpIcon, { className });
3414
+ case "tripadvisor":
3415
+ return /* @__PURE__ */ React11.createElement(TripAdvisorIcon, { className });
3416
+ default:
3417
+ return null;
3418
+ }
3419
+ }
3420
+ function getSocialIcon(platform, className) {
3421
+ return /* @__PURE__ */ React11.createElement(SocialIcon, { platform, className: className != null ? className : defaultClassName });
3422
+ }
3423
+
3378
3424
  // src/design_system/elements/carousel/carousel.tsx
3379
3425
  import { cloneElement as cloneElement2, createContext as createContext7, isValidElement as isValidElement11, useCallback as useCallback3, useContext as useContext8, useEffect as useEffect4, useRef as useRef3, useSyncExternalStore as useSyncExternalStore2 } from "react";
3380
3426
  import useEmblaCarousel from "embla-carousel-react";
@@ -3555,7 +3601,7 @@ var Carousel = {
3555
3601
  };
3556
3602
 
3557
3603
  // src/design_system/elements/carousel/carousel-section-wrapper.tsx
3558
- import React11 from "react";
3604
+ import React12 from "react";
3559
3605
  import { ChevronLeft as ChevronLeft2, ChevronRight } from "@untitledui/icons";
3560
3606
  var CarouselSectionWrapper = ({
3561
3607
  title,
@@ -3564,7 +3610,7 @@ var CarouselSectionWrapper = ({
3564
3610
  children,
3565
3611
  emptyMessage = "No items available"
3566
3612
  }) => {
3567
- return /* @__PURE__ */ React11.createElement("section", null, /* @__PURE__ */ React11.createElement("div", { className: "mx-auto max-w-container px-4 md:px-8" }, hasItems ? /* @__PURE__ */ React11.createElement(Carousel.Root, { opts: { align: "start", loop: true } }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center justify-between mb-12" }, /* @__PURE__ */ React11.createElement("h2", { className: "font-display text-4xl font-normal text-fg-primary md:text-5xl" }, title), /* @__PURE__ */ React11.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React11.createElement(Carousel.PrevTrigger, { className: "rounded-full p-2 border border-secondary hover:bg-primary_hover transition-colors disabled:opacity-30 disabled:cursor-not-allowed" }, /* @__PURE__ */ React11.createElement(ChevronLeft2, { className: "w-6 h-6 text-fg-primary" })), /* @__PURE__ */ React11.createElement(Carousel.NextTrigger, { className: "rounded-full p-2 border border-secondary hover:bg-primary_hover transition-colors disabled:opacity-30 disabled:cursor-not-allowed" }, /* @__PURE__ */ React11.createElement(ChevronRight, { className: "w-6 h-6 text-fg-primary" })))), /* @__PURE__ */ React11.createElement(Carousel.Content, { className: "-ml-4" }, children)) : /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement("div", { className: "mb-12" }, /* @__PURE__ */ React11.createElement("h2", { className: "font-display text-4xl font-normal text-fg-primary md:text-5xl" }, title), subtitle && /* @__PURE__ */ React11.createElement("p", { className: "mt-4 text-lg text-tertiary md:mt-6 md:text-xl" }, subtitle)), /* @__PURE__ */ React11.createElement("div", { className: "text-center py-12" }, /* @__PURE__ */ React11.createElement("p", { className: "font-body text-base text-tertiary" }, emptyMessage)))));
3613
+ return /* @__PURE__ */ React12.createElement("section", null, /* @__PURE__ */ React12.createElement("div", { className: "mx-auto max-w-container px-4 md:px-8" }, hasItems ? /* @__PURE__ */ React12.createElement(Carousel.Root, { opts: { align: "start", loop: true } }, /* @__PURE__ */ React12.createElement("div", { className: "flex items-center justify-between mb-12" }, /* @__PURE__ */ React12.createElement("h2", { className: "font-display text-4xl font-normal text-fg-primary md:text-5xl" }, title), /* @__PURE__ */ React12.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React12.createElement(Carousel.PrevTrigger, { className: "rounded-full p-2 border border-secondary hover:bg-primary_hover transition-colors disabled:opacity-30 disabled:cursor-not-allowed" }, /* @__PURE__ */ React12.createElement(ChevronLeft2, { className: "w-6 h-6 text-fg-primary" })), /* @__PURE__ */ React12.createElement(Carousel.NextTrigger, { className: "rounded-full p-2 border border-secondary hover:bg-primary_hover transition-colors disabled:opacity-30 disabled:cursor-not-allowed" }, /* @__PURE__ */ React12.createElement(ChevronRight, { className: "w-6 h-6 text-fg-primary" })))), /* @__PURE__ */ React12.createElement(Carousel.Content, { className: "-ml-4" }, children)) : /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement("div", { className: "mb-12" }, /* @__PURE__ */ React12.createElement("h2", { className: "font-display text-4xl font-normal text-fg-primary md:text-5xl" }, title), subtitle && /* @__PURE__ */ React12.createElement("p", { className: "mt-4 text-lg text-tertiary md:mt-6 md:text-xl" }, subtitle)), /* @__PURE__ */ React12.createElement("div", { className: "text-center py-12" }, /* @__PURE__ */ React12.createElement("p", { className: "font-body text-base text-tertiary" }, emptyMessage)))));
3568
3614
  };
3569
3615
 
3570
3616
  // src/design_system/elements/video-modal.tsx
@@ -3643,9 +3689,9 @@ function createThemedExport(componentName, BaseComponent) {
3643
3689
  const { theme } = useTheme();
3644
3690
  try {
3645
3691
  const Component = getThemedComponent(componentName, theme);
3646
- return React12.createElement(Component, props);
3692
+ return React13.createElement(Component, props);
3647
3693
  } catch (e) {
3648
- return React12.createElement(BaseComponent, props);
3694
+ return React13.createElement(BaseComponent, props);
3649
3695
  }
3650
3696
  };
3651
3697
  }
@@ -3714,6 +3760,7 @@ export {
3714
3760
  RoundButton2 as RoundButton,
3715
3761
  Select3 as Select,
3716
3762
  SelectItem2 as SelectItem,
3763
+ SocialIcon,
3717
3764
  StarIcon,
3718
3765
  Textarea,
3719
3766
  Tooltip2 as Tooltip,
@@ -3721,6 +3768,7 @@ export {
3721
3768
  VideoModal,
3722
3769
  VideoPlayButton,
3723
3770
  Wreath,
3771
+ getSocialIcon,
3724
3772
  getStarProgress,
3725
3773
  useCarousel
3726
3774
  };