design-system-silkhaus 2.18.0-beta.app-components.4 → 2.18.0-beta.app-components.6

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,66 @@
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
+ startIcon?: default_2.ReactNode;
37
+ endIcon?: default_2.ReactNode;
38
+ }>;
39
+ options: Array<{
40
+ label: string;
41
+ value: string;
42
+ startIcon?: default_2.ReactNode;
43
+ endIcon?: default_2.ReactNode;
44
+ }>;
45
+ onSelectionChange?: (selected: Array<{
46
+ label: string;
47
+ value: string;
48
+ }>) => void;
49
+ placeholder?: string;
50
+ selected?: boolean;
51
+ isMultiSelect?: boolean;
52
+ noDataError?: string;
53
+ buttonMinWidth?: string;
54
+ buttonWidth?: string;
55
+ minSelectionError?: string;
56
+ /**
57
+ * className for the wrapping div on the buttons
58
+ */
59
+ buttonsContainerClassName?: string;
60
+ /**
61
+ * className to applied on each button
62
+ */
63
+ buttonClassName?: string;
64
+ }
65
+
66
+ export { }
@@ -0,0 +1 @@
1
+ "use strict";var z=Object.defineProperty,P=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var N=(e,s,t)=>s in e?z(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t,y=(e,s)=>{for(var t in s||(s={}))B.call(s,t)&&N(e,t,s[t]);if(b)for(var t of b(s))C.call(s,t)&&N(e,t,s[t]);return e},F=(e,s)=>P(e,G(s));var R=(e,s)=>{var t={};for(var r in e)B.call(e,r)&&s.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&b)for(var r of b(e))s.indexOf(r)<0&&C.call(e,r)&&(t[r]=e[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../utils-k1RektY7.cjs"),x=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}),$={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"},q={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"},_=x.forwardRef((h,E)=>{var c=h,{color:e="primary",disabled:s=!1,className:t,children:r,startIcon:o,selected:m,endIcon:i,trackingId:p,helperText:u,helpterTextClassName:j,buttonClassName:f}=c,g=R(c,["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({[q[e]]:m,[$[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:[o&&d.jsxRuntimeExports.jsx(D,{children:o}),r&&d.jsxRuntimeExports.jsx("div",{className:`${o?"ds-ml-1":""} ${i?"ds-mr-1":""}`,children:r}),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 I=x.forwardRef((e,s)=>{const S=e,{value:t,options:r,onSelectionChange:o=()=>{},isMultiSelect:m,noDataError:i,buttonMinWidth:p,buttonWidth:u,minSelectionError:j,buttonsContainerClassName:f,buttonClassName:g}=S,E=R(S,["value","options","onSelectionChange","isMultiSelect","noDataError","buttonMinWidth","buttonWidth","minSelectionError","buttonsContainerClassName","buttonClassName"]),[h,c]=x.useState([]),[w,v]=x.useState("");x.useEffect(()=>{t&&t.length?c(t):c([])},[t]);const T=(a,l)=>{l.currentTarget.blur();const n=[...h],k=n.findIndex(W=>W.value===a.value);k!==-1?n.length>1?(n.splice(k,1),v("")):v(j):(n.push(a),v("")),c(n),o(n)},M=(a,l)=>{l.currentTarget.blur();const n=[a];c(n),o(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:r.length>0?r.map(a=>d.jsxRuntimeExports.jsx(x.Fragment,{children:m?d.jsxRuntimeExports.jsx(_,{selected:h.some(l=>l.value===a.value),onClick:l=>T(a,l),color:"secondary",style:{minWidth:p,width:u},className:g,startIcon:a.startIcon,endIcon:a.endIcon,children:a.label}):d.jsxRuntimeExports.jsx(_,{selected:h.some(l=>l.value===a.value),onClick:l=>M(a,l),color:"secondary",style:{minWidth:p,width:u},className:g,startIcon:a.startIcon,endIcon:a.endIcon,children:a.label})},a.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})]}))});I.displayName="ButtonsGroupSelector";exports.Button=_;exports.ButtonsGroupSelector=I;
package/dist/index.d.ts CHANGED
@@ -153,6 +153,10 @@ export declare const BoltIcon: FC<{
153
153
  className?: string;
154
154
  }>;
155
155
 
156
+ export declare const BookIcon: FC<{
157
+ className?: string;
158
+ }>;
159
+
156
160
  export declare const BookingQuoteCard: default_2.ForwardRefExoticComponent<BookingQuoteCardProps & default_2.RefAttributes<HTMLDivElement>>;
157
161
 
158
162
  export declare interface BookingQuoteCardProps extends default_2.HTMLAttributes<HTMLDivElement> {
@@ -628,6 +632,10 @@ export declare const MagnifyGlassIcon: FC<{
628
632
  className?: string;
629
633
  }>;
630
634
 
635
+ export declare const MinusIcon: FC<{
636
+ className?: string;
637
+ }>;
638
+
631
639
  export declare const MobileFilterMenu: ForwardRefExoticComponent<MobileFilterMenuProps & RefAttributes<HTMLDivElement>>;
632
640
 
633
641
  export declare interface MobileFilterMenuProps extends HTMLAttributes<HTMLDivElement> {
@@ -844,6 +852,10 @@ export declare const PlusCircleIcon: FC<{
844
852
  className?: string;
845
853
  }>;
846
854
 
855
+ export declare const PlusIcon: FC<{
856
+ className?: string;
857
+ }>;
858
+
847
859
  /**
848
860
  * A component that displays a floating popover with the `content` on click of the `trigger` element for desktop
849
861
  * and for mobile it displays a dialog that slides from the bottom