design-system-silkhaus 2.17.1-beta.not-item-updates.1 → 2.18.0-beta.app-components.2

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.
@@ -0,0 +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;
package/dist/app.d.ts ADDED
@@ -0,0 +1,62 @@
1
+ import { default as default_2 } from 'react';
2
+ import { HTMLAttributes } from 'react';
3
+
4
+ export declare const Button: default_2.ForwardRefExoticComponent<ButtonProps & default_2.RefAttributes<HTMLButtonElement>>;
5
+
6
+ export declare interface ButtonProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
7
+ color?: 'primary' | 'secondary';
8
+ disabled?: true | false;
9
+ startIcon?: default_2.ReactNode;
10
+ endIcon?: default_2.ReactNode;
11
+ trackingId?: string;
12
+ selected?: boolean;
13
+ helperText?: string;
14
+ /**
15
+ * classes to apply on the outer most container which contains
16
+ * the button and the helper text
17
+ */
18
+ className?: string;
19
+ /**
20
+ * classes to apply on button element
21
+ */
22
+ buttonClassName?: string;
23
+ /**
24
+ * classes to apply on the helper text
25
+ */
26
+ helpterTextClassName?: string;
27
+ }
28
+
29
+ export declare const ButtonsGroupSelector: default_2.ForwardRefExoticComponent<ButtonsGroupSelectorProps & default_2.RefAttributes<HTMLDivElement>>;
30
+
31
+ export declare interface ButtonsGroupSelectorProps extends HTMLAttributes<HTMLDivElement> {
32
+ label?: string;
33
+ value?: Array<{
34
+ label: string;
35
+ value: string;
36
+ }>;
37
+ options: Array<{
38
+ label: string;
39
+ value: string;
40
+ }>;
41
+ onSelectionChange?: (selected: Array<{
42
+ label: string;
43
+ value: string;
44
+ }>) => void;
45
+ placeholder?: string;
46
+ selected?: boolean;
47
+ isMultiSelect?: boolean;
48
+ noDataError?: string;
49
+ minWidthButton?: string;
50
+ buttonWidth?: string;
51
+ minSelectionError?: string;
52
+ /**
53
+ * className for the wrapping div on the buttons
54
+ */
55
+ buttonsContainerClassName?: string;
56
+ /**
57
+ * className to applied on each button
58
+ */
59
+ buttonClassName?: string;
60
+ }
61
+
62
+ export { }
package/dist/index.d.ts CHANGED
@@ -141,14 +141,6 @@ 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
-
152
144
  export declare const BoltIcon: FC<{
153
145
  className?: string;
154
146
  }>;
@@ -356,8 +348,6 @@ export declare const DeleteIcon: FC<{
356
348
 
357
349
  export declare const desktopMinWidth: number;
358
350
 
359
- export declare const DesktopPopover: FC<PropsWithChildren<PopoverProps>>;
360
-
361
351
  export declare const DesktopTooltip: FC<PropsWithChildren<TooltipProps>>;
362
352
 
363
353
  export declare const Dialog: ForwardRefExoticComponent<DialogProps & RefAttributes<HTMLDivElement>>;
@@ -664,8 +654,6 @@ export declare interface MobileMultiSelectFilterDropDownProps extends HTMLAttrib
664
654
  disabled?: boolean;
665
655
  }
666
656
 
667
- export declare const MobilePopover: FC<PropsWithChildren<PopoverProps>>;
668
-
669
657
  export declare const MobileSelectCardDropDown: ForwardRefExoticComponent<MobileSelectCardDropDownProps & RefAttributes<HTMLDivElement>>;
670
658
 
671
659
  export declare interface MobileSelectCardDropDownProps extends HTMLAttributes<HTMLDivElement> {
@@ -697,19 +685,6 @@ export declare const MoonIcon: FC<{
697
685
  className?: string;
698
686
  }>;
699
687
 
700
- export declare const NotificationItem: FC<NotificationItemProps>;
701
-
702
- export declare type NotificationItemProps = {
703
- id?: string | number;
704
- className?: string;
705
- title: string;
706
- description1: string;
707
- description2?: string;
708
- thumbnailUrl?: string;
709
- isRead?: boolean;
710
- onClick?: (item: NotificationItemProps) => void;
711
- };
712
-
713
688
  export declare const OpenNewIcon: FC<{
714
689
  className?: string;
715
690
  }>;
@@ -844,66 +819,6 @@ export declare const PlusCircleIcon: FC<{
844
819
  className?: string;
845
820
  }>;
846
821
 
847
- /**
848
- * A component that displays a floating popover with the `content` on click of the `trigger` element for desktop
849
- * and for mobile it displays a dialog that slides from the bottom
850
- */
851
- export declare const Popover: FC<PropsWithChildren<PopoverProps>>;
852
-
853
- export declare interface PopoverProps {
854
- /**
855
- * Content of the popover
856
- */
857
- content: ReactNode;
858
- /**
859
- * The element that triggers the popover
860
- */
861
- trigger: ReactNode;
862
- /**
863
- * The placement of the floating popover. Only used in desktop version
864
- * @default 'bottom'
865
- */
866
- placement?: Placement;
867
- /**
868
- * The trigger of the popover is wrapped in a container. This classname is added to that container
869
- */
870
- triggerContainerClassName?: string;
871
- /**
872
- * The content of the popover is wrapped in a container. This classname is added to that container
873
- */
874
- contentContainerClassname?: string;
875
- /**
876
- * When set true, popover will not be shown
877
- * @default false
878
- */
879
- disabled?: boolean;
880
- /**
881
- * The offset of the popover from the trigger in px. Only applicable for desktop popover
882
- * @default 4
883
- */
884
- offset?: number;
885
- /**
886
- * The title of the popover
887
- */
888
- title?: string;
889
- /**
890
- * Callback when popover is opened or closed
891
- */
892
- onOpenChange?: (isOpen: boolean) => void;
893
- /**
894
- * Pass this value to control the open state
895
- */
896
- isOpen?: boolean;
897
- /**
898
- * Adjust the height of the popover to fit the content in viewport
899
- */
900
- adjustHeight?: boolean | number;
901
- /**
902
- * Adjust the width of the popover to fit the content in viewport
903
- */
904
- adjustWidth?: boolean;
905
- }
906
-
907
822
  export declare const PreviewIcon: FC<{
908
823
  className?: string;
909
824
  }>;
@@ -1026,26 +941,6 @@ export declare const Scrollbar: FC<ScrollbarProps>;
1026
941
  export declare interface ScrollbarProps extends Props {
1027
942
  }
1028
943
 
1029
- export declare const Section: default_2.FC<SectionProps>;
1030
-
1031
- export declare const SectionHeader: default_2.FC<SectionHeaderProps>;
1032
-
1033
- export declare interface SectionHeaderProps {
1034
- title?: string;
1035
- description?: string;
1036
- className?: string;
1037
- titleClassName?: string;
1038
- descriptionClassName?: string;
1039
- }
1040
-
1041
- export declare interface SectionProps {
1042
- head?: default_2.ReactNode;
1043
- body?: default_2.ReactNode;
1044
- className?: string;
1045
- headClassName?: string;
1046
- bodyClassName?: string;
1047
- }
1048
-
1049
944
  export declare const SECURITY_DEPOSIT_REFUND = "security_deposit_refund";
1050
945
 
1051
946
  export declare const SegmentedControl: FC<SegmentedControlProps>;
@@ -1292,7 +1187,7 @@ export declare interface TooltipProps {
1292
1187
  disabled?: boolean;
1293
1188
  /**
1294
1189
  * The offset of the tooltip from the trigger in px. Only applicable for desktop tooltip
1295
- * @default 4
1190
+ * @dwefault 4
1296
1191
  */
1297
1192
  offset?: number;
1298
1193
  }