design-system-silkhaus 2.18.0-beta.app-components.3 → 2.18.0-beta.app-components.5

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.
@@ -33,10 +33,18 @@ export declare interface ButtonsGroupSelectorProps extends HTMLAttributes<HTMLDi
33
33
  value?: Array<{
34
34
  label: string;
35
35
  value: string;
36
+ startIcon?: default_2.ReactNode;
37
+ endIcon?: default_2.ReactNode;
38
+ className?: string;
39
+ buttonClassName?: string;
36
40
  }>;
37
41
  options: Array<{
38
42
  label: string;
39
43
  value: string;
44
+ startIcon?: default_2.ReactNode;
45
+ endIcon?: default_2.ReactNode;
46
+ className?: string;
47
+ buttonClassName?: string;
40
48
  }>;
41
49
  onSelectionChange?: (selected: Array<{
42
50
  label: string;
package/dist/app/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var P=Object.defineProperty,G=Object.defineProperties;var $=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var B=(e,s,t)=>s in e?P(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t,y=(e,s)=>{for(var t in s||(s={}))N.call(s,t)&&B(e,t,s[t]);if(b)for(var t of b(s))C.call(s,t)&&B(e,t,s[t]);return e},F=(e,s)=>G(e,$(s));var R=(e,s)=>{var t={};for(var a in e)N.call(e,a)&&s.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&b)for(var a of b(e))s.indexOf(a)<0&&C.call(e,a)&&(t[a]=e[a]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../utils-B_SuUsRF.cjs"),c=require("react"),D=({children:e,size:s="small"})=>d.jsxRuntimeExports.jsx("div",{className:`ds-flex ds-items-center ds-justify-center ${s==="small"?"ds-h-5 ds-w-5":"ds-h-6 ds-w-6"}`,children:e}),q={primary:"ds-bg-Background-accentEggplant-100 ds-text-Text-textPrimaryDark ds-rounded-sm hover:ds-text-Text-textPrimaryDark hover:ds-bg-Background-accentEggplant-highlight hover:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] active:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] active:ds-bg-Background-accentEggplant-darkened focus:ds-bg-Background-accentEggplant-100 focus:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] disabled:focus:ds-shadow-none disabled:ds-bg-Background-accentEggplant-20 ds-text-mediumFootnoteEmphasized",secondary:"ds-text-black ds-rounded-sm ds-border ds-border-Fills-terciary hover:ds-bg-[#F6F8FC] hover:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] active:ds-bg-[#F6F8FC] active:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] focus:ds-bg-[#F6F8FC] focus:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] disabled:ds-border disabled:ds-border-Fills-terciary disabled:ds-text-Text-tertiary disabled:ds-bg-transparent ds-text-mediumFootnoteEmphasized"},V={primary:"ds-rounded-sm ds-border ds-text-black ds-border-Fills-terciary ds-bg-[#F6F8FC] ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] ds-text-mediumFootnoteEmphasized",secondary:"ds-rounded-sm ds-bg-Background-accentEggplant-100 ds-text-Text-textPrimaryDark ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] ds-text-mediumFootnoteEmphasized"},_=c.forwardRef((h,E)=>{var o=h,{color:e="primary",disabled:s=!1,className:t,children:a,startIcon:x,selected:m,endIcon:i,trackingId:p,helperText:u,helpterTextClassName:j,buttonClassName:f}=o,g=R(o,["color","disabled","className","children","startIcon","selected","endIcon","trackingId","helperText","helpterTextClassName","buttonClassName"]);return d.jsxRuntimeExports.jsxs("div",{className:d.cn("ds-flex ds-flex-col ds-gap-1",t),children:[d.jsxRuntimeExports.jsxs("button",F(y({"data-tracking-id":p,ref:E,disabled:s,className:d.twMerge(d.clsx({[V[e]]:m,[q[e]]:!m},"ds-px-2 ds-py-1","ds-flex ds-w-full ds-flex-1 ds-items-center ds-justify-center",f))},g),{children:[x&&d.jsxRuntimeExports.jsx(D,{children:x}),a&&d.jsxRuntimeExports.jsx("div",{className:`${x?"ds-ml-1":""} ${i?"ds-mr-1":""}`,children:a}),i&&d.jsxRuntimeExports.jsx(D,{children:i})]})),u&&d.jsxRuntimeExports.jsx("div",{className:d.cn("ds-w-full ds-text-right ds-text-mediumFootnoteRegular",j),children:u})]})});_.displayName="Button";const T=c.forwardRef((e,s)=>{const S=e,{value:t,options:a,onSelectionChange:x=()=>{},isMultiSelect:m,noDataError:i,minWidthButton:p,buttonWidth:u,minSelectionError:j,buttonsContainerClassName:f,buttonClassName:g}=S,E=R(S,["value","options","onSelectionChange","isMultiSelect","noDataError","minWidthButton","buttonWidth","minSelectionError","buttonsContainerClassName","buttonClassName"]),[h,o]=c.useState([]),[w,v]=c.useState("");c.useEffect(()=>{t&&t.length?o(t):o([])},[t]);const W=(r,l)=>{l.currentTarget.blur();const n=[...h],k=n.findIndex(M=>M.value===r.value);k!==-1?n.length>1?(n.splice(k,1),v("")):v(j):(n.push(r),v("")),o(n),x(n)},z=(r,l)=>{l.currentTarget.blur();const n=[r];o(n),x(n)};return d.jsxRuntimeExports.jsxs("div",F(y({ref:s},E),{children:[d.jsxRuntimeExports.jsx("div",{className:d.cn("ds-flex ds-flex-wrap ds-gap-2",f),children:a.length>0?a.map(r=>d.jsxRuntimeExports.jsx(c.Fragment,{children:m?d.jsxRuntimeExports.jsx(_,{selected:h.some(l=>l.value===r.value),onClick:l=>W(r,l),color:"secondary",style:{minWidth:p,width:u},className:g,children:r.label}):d.jsxRuntimeExports.jsx(_,{selected:h.some(l=>l.value===r.value),onClick:l=>z(r,l),color:"secondary",style:{minWidth:p,width:u},className:g,children:r.label})},r.value)):d.jsxRuntimeExports.jsx("div",{className:"ds_xSmallSubheadRegular ds-p-2 ds-text-System-red",children:i})}),w&&d.jsxRuntimeExports.jsx("div",{className:"ds_xSmallSubheadRegular ds-p-2 ds-text-System-red",children:w})]}))});T.displayName="ButtonsGroupSelector";exports.Button=_;exports.ButtonsGroupSelector=T;
1
+ "use strict";var P=Object.defineProperty,G=Object.defineProperties;var $=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var B=(e,s,t)=>s in e?P(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t,y=(e,s)=>{for(var t in s||(s={}))N.call(s,t)&&B(e,t,s[t]);if(b)for(var t of b(s))C.call(s,t)&&B(e,t,s[t]);return e},F=(e,s)=>G(e,$(s));var R=(e,s)=>{var t={};for(var a in e)N.call(e,a)&&s.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&b)for(var a of b(e))s.indexOf(a)<0&&C.call(e,a)&&(t[a]=e[a]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../utils-k1RektY7.cjs"),c=require("react"),D=({children:e,size:s="small"})=>d.jsxRuntimeExports.jsx("div",{className:`ds-flex ds-items-center ds-justify-center ${s==="small"?"ds-h-5 ds-w-5":"ds-h-6 ds-w-6"}`,children:e}),q={primary:"ds-bg-Background-accentEggplant-100 ds-text-Text-textPrimaryDark ds-rounded-sm hover:ds-text-Text-textPrimaryDark hover:ds-bg-Background-accentEggplant-highlight hover:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] active:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] active:ds-bg-Background-accentEggplant-darkened focus:ds-bg-Background-accentEggplant-100 focus:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] disabled:focus:ds-shadow-none disabled:ds-bg-Background-accentEggplant-20 ds-text-mediumFootnoteEmphasized",secondary:"ds-text-black ds-rounded-sm ds-border ds-border-Fills-terciary hover:ds-bg-[#F6F8FC] hover:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] active:ds-bg-[#F6F8FC] active:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] focus:ds-bg-[#F6F8FC] focus:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] disabled:ds-border disabled:ds-border-Fills-terciary disabled:ds-text-Text-tertiary disabled:ds-bg-transparent ds-text-mediumFootnoteEmphasized"},V={primary:"ds-rounded-sm ds-border ds-text-black ds-border-Fills-terciary ds-bg-[#F6F8FC] ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] ds-text-mediumFootnoteEmphasized",secondary:"ds-rounded-sm ds-bg-Background-accentEggplant-100 ds-text-Text-textPrimaryDark ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] ds-text-mediumFootnoteEmphasized"},_=c.forwardRef((h,E)=>{var o=h,{color:e="primary",disabled:s=!1,className:t,children:a,startIcon:x,selected:m,endIcon:i,trackingId:p,helperText:u,helpterTextClassName:j,buttonClassName:f}=o,g=R(o,["color","disabled","className","children","startIcon","selected","endIcon","trackingId","helperText","helpterTextClassName","buttonClassName"]);return d.jsxRuntimeExports.jsxs("div",{className:d.cn("ds-flex ds-flex-col ds-gap-1",t),children:[d.jsxRuntimeExports.jsxs("button",F(y({"data-tracking-id":p,ref:E,disabled:s,className:d.twMerge(d.clsx({[V[e]]:m,[q[e]]:!m},"ds-px-2 ds-py-1","ds-flex ds-w-full ds-flex-1 ds-items-center ds-justify-center",f))},g),{children:[x&&d.jsxRuntimeExports.jsx(D,{children:x}),a&&d.jsxRuntimeExports.jsx("div",{className:`${x?"ds-ml-1":""} ${i?"ds-mr-1":""}`,children:a}),i&&d.jsxRuntimeExports.jsx(D,{children:i})]})),u&&d.jsxRuntimeExports.jsx("div",{className:d.cn("ds-w-full ds-text-right ds-text-mediumFootnoteRegular",j),children:u})]})});_.displayName="Button";const T=c.forwardRef((e,s)=>{const S=e,{value:t,options:a,onSelectionChange:x=()=>{},isMultiSelect:m,noDataError:i,minWidthButton:p,buttonWidth:u,minSelectionError:j,buttonsContainerClassName:f,buttonClassName:g}=S,E=R(S,["value","options","onSelectionChange","isMultiSelect","noDataError","minWidthButton","buttonWidth","minSelectionError","buttonsContainerClassName","buttonClassName"]),[h,o]=c.useState([]),[w,v]=c.useState("");c.useEffect(()=>{t&&t.length?o(t):o([])},[t]);const W=(r,l)=>{l.currentTarget.blur();const n=[...h],k=n.findIndex(M=>M.value===r.value);k!==-1?n.length>1?(n.splice(k,1),v("")):v(j):(n.push(r),v("")),o(n),x(n)},z=(r,l)=>{l.currentTarget.blur();const n=[r];o(n),x(n)};return d.jsxRuntimeExports.jsxs("div",F(y({ref:s},E),{children:[d.jsxRuntimeExports.jsx("div",{className:d.cn("ds-flex ds-flex-wrap ds-gap-2",f),children:a.length>0?a.map(r=>d.jsxRuntimeExports.jsx(c.Fragment,{children:m?d.jsxRuntimeExports.jsx(_,{selected:h.some(l=>l.value===r.value),onClick:l=>W(r,l),color:"secondary",style:{minWidth:p,width:u},className:g,children:r.label}):d.jsxRuntimeExports.jsx(_,{selected:h.some(l=>l.value===r.value),onClick:l=>z(r,l),color:"secondary",style:{minWidth:p,width:u},className:g,children:r.label})},r.value)):d.jsxRuntimeExports.jsx("div",{className:"ds_xSmallSubheadRegular ds-p-2 ds-text-System-red",children:i})}),w&&d.jsxRuntimeExports.jsx("div",{className:"ds_xSmallSubheadRegular ds-p-2 ds-text-System-red",children:w})]}))});T.displayName="ButtonsGroupSelector";exports.Button=_;exports.ButtonsGroupSelector=T;
package/dist/index.d.ts CHANGED
@@ -141,10 +141,22 @@ export declare const BedRegularIcon: FC<{
141
141
  className?: string;
142
142
  }>;
143
143
 
144
+ export declare const BellIcon: FC<{
145
+ className?: string;
146
+ }>;
147
+
148
+ export declare const BellSolidIcon: FC<{
149
+ className?: string;
150
+ }>;
151
+
144
152
  export declare const BoltIcon: FC<{
145
153
  className?: string;
146
154
  }>;
147
155
 
156
+ export declare const BookIcon: FC<{
157
+ className?: string;
158
+ }>;
159
+
148
160
  export declare const BookingQuoteCard: default_2.ForwardRefExoticComponent<BookingQuoteCardProps & default_2.RefAttributes<HTMLDivElement>>;
149
161
 
150
162
  export declare interface BookingQuoteCardProps extends default_2.HTMLAttributes<HTMLDivElement> {
@@ -348,6 +360,8 @@ export declare const DeleteIcon: FC<{
348
360
 
349
361
  export declare const desktopMinWidth: number;
350
362
 
363
+ export declare const DesktopPopover: FC<PropsWithChildren<PopoverProps>>;
364
+
351
365
  export declare const DesktopTooltip: FC<PropsWithChildren<TooltipProps>>;
352
366
 
353
367
  export declare const Dialog: ForwardRefExoticComponent<DialogProps & RefAttributes<HTMLDivElement>>;
@@ -618,6 +632,10 @@ export declare const MagnifyGlassIcon: FC<{
618
632
  className?: string;
619
633
  }>;
620
634
 
635
+ export declare const MinusIcon: FC<{
636
+ className?: string;
637
+ }>;
638
+
621
639
  export declare const MobileFilterMenu: ForwardRefExoticComponent<MobileFilterMenuProps & RefAttributes<HTMLDivElement>>;
622
640
 
623
641
  export declare interface MobileFilterMenuProps extends HTMLAttributes<HTMLDivElement> {
@@ -654,6 +672,8 @@ export declare interface MobileMultiSelectFilterDropDownProps extends HTMLAttrib
654
672
  disabled?: boolean;
655
673
  }
656
674
 
675
+ export declare const MobilePopover: FC<PropsWithChildren<PopoverProps>>;
676
+
657
677
  export declare const MobileSelectCardDropDown: ForwardRefExoticComponent<MobileSelectCardDropDownProps & RefAttributes<HTMLDivElement>>;
658
678
 
659
679
  export declare interface MobileSelectCardDropDownProps extends HTMLAttributes<HTMLDivElement> {
@@ -685,6 +705,19 @@ export declare const MoonIcon: FC<{
685
705
  className?: string;
686
706
  }>;
687
707
 
708
+ export declare const NotificationItem: FC<NotificationItemProps>;
709
+
710
+ export declare type NotificationItemProps = {
711
+ id?: string | number;
712
+ className?: string;
713
+ title: string;
714
+ description1: string;
715
+ description2?: string;
716
+ thumbnailUrl?: string;
717
+ isRead?: boolean;
718
+ onClick?: (item: NotificationItemProps) => void;
719
+ };
720
+
688
721
  export declare const OpenNewIcon: FC<{
689
722
  className?: string;
690
723
  }>;
@@ -819,6 +852,70 @@ export declare const PlusCircleIcon: FC<{
819
852
  className?: string;
820
853
  }>;
821
854
 
855
+ export declare const PlusIcon: FC<{
856
+ className?: string;
857
+ }>;
858
+
859
+ /**
860
+ * A component that displays a floating popover with the `content` on click of the `trigger` element for desktop
861
+ * and for mobile it displays a dialog that slides from the bottom
862
+ */
863
+ export declare const Popover: FC<PropsWithChildren<PopoverProps>>;
864
+
865
+ export declare interface PopoverProps {
866
+ /**
867
+ * Content of the popover
868
+ */
869
+ content: ReactNode;
870
+ /**
871
+ * The element that triggers the popover
872
+ */
873
+ trigger: ReactNode;
874
+ /**
875
+ * The placement of the floating popover. Only used in desktop version
876
+ * @default 'bottom'
877
+ */
878
+ placement?: Placement;
879
+ /**
880
+ * The trigger of the popover is wrapped in a container. This classname is added to that container
881
+ */
882
+ triggerContainerClassName?: string;
883
+ /**
884
+ * The content of the popover is wrapped in a container. This classname is added to that container
885
+ */
886
+ contentContainerClassname?: string;
887
+ /**
888
+ * When set true, popover will not be shown
889
+ * @default false
890
+ */
891
+ disabled?: boolean;
892
+ /**
893
+ * The offset of the popover from the trigger in px. Only applicable for desktop popover
894
+ * @default 4
895
+ */
896
+ offset?: number;
897
+ /**
898
+ * The title of the popover
899
+ */
900
+ title?: string;
901
+ /**
902
+ * Callback when popover is opened or closed
903
+ */
904
+ onOpenChange?: (isOpen: boolean) => void;
905
+ /**
906
+ * Pass this value to control the open state
907
+ */
908
+ isOpen?: boolean;
909
+ /**
910
+ * Adjust the height of the popover to fit the content in viewport
911
+ */
912
+ adjustHeight?: boolean | number;
913
+ /**
914
+ * Adjust the width of the popover to fit the content in viewport
915
+ */
916
+ adjustWidth?: boolean;
917
+ }
918
+
822
919
  export declare const PreviewIcon: FC<{
823
920
  className?: string;
824
921
  }>;
@@ -941,6 +1038,26 @@ export declare const Scrollbar: FC<ScrollbarProps>;
941
1038
  export declare interface ScrollbarProps extends Props {
942
1039
  }
943
1040
 
1041
+ export declare const Section: default_2.FC<SectionProps>;
1042
+
1043
+ export declare const SectionHeader: default_2.FC<SectionHeaderProps>;
1044
+
1045
+ export declare interface SectionHeaderProps {
1046
+ title?: string;
1047
+ description?: string;
1048
+ className?: string;
1049
+ titleClassName?: string;
1050
+ descriptionClassName?: string;
1051
+ }
1052
+
1053
+ export declare interface SectionProps {
1054
+ head?: default_2.ReactNode;
1055
+ body?: default_2.ReactNode;
1056
+ className?: string;
1057
+ headClassName?: string;
1058
+ bodyClassName?: string;
1059
+ }
1060
+
944
1061
  export declare const SECURITY_DEPOSIT_REFUND = "security_deposit_refund";
945
1062
 
946
1063
  export declare const SegmentedControl: FC<SegmentedControlProps>;
@@ -1187,7 +1304,7 @@ export declare interface TooltipProps {
1187
1304
  disabled?: boolean;
1188
1305
  /**
1189
1306
  * The offset of the tooltip from the trigger in px. Only applicable for desktop tooltip
1190
- * @dwefault 4
1307
+ * @default 4
1191
1308
  */
1192
1309
  offset?: number;
1193
1310
  }