design-system-silkhaus 2.18.0-beta.app-components.4 → 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.
- package/dist/app/index.d.ts +70 -0
- package/dist/app/index.js +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +63 -40017
- package/dist/style.css +1 -1
- package/dist/utils-C8F0YIvl.js +3778 -0
- package/dist/utils-k1RektY7.cjs +30 -0
- package/package.json +1 -1
- package/dist/index.cjs +0 -235
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
className?: string;
|
|
39
|
+
buttonClassName?: string;
|
|
40
|
+
}>;
|
|
41
|
+
options: Array<{
|
|
42
|
+
label: string;
|
|
43
|
+
value: string;
|
|
44
|
+
startIcon?: default_2.ReactNode;
|
|
45
|
+
endIcon?: default_2.ReactNode;
|
|
46
|
+
className?: string;
|
|
47
|
+
buttonClassName?: string;
|
|
48
|
+
}>;
|
|
49
|
+
onSelectionChange?: (selected: Array<{
|
|
50
|
+
label: string;
|
|
51
|
+
value: string;
|
|
52
|
+
}>) => void;
|
|
53
|
+
placeholder?: string;
|
|
54
|
+
selected?: boolean;
|
|
55
|
+
isMultiSelect?: boolean;
|
|
56
|
+
noDataError?: string;
|
|
57
|
+
minWidthButton?: string;
|
|
58
|
+
buttonWidth?: string;
|
|
59
|
+
minSelectionError?: string;
|
|
60
|
+
/**
|
|
61
|
+
* className for the wrapping div on the buttons
|
|
62
|
+
*/
|
|
63
|
+
buttonsContainerClassName?: string;
|
|
64
|
+
/**
|
|
65
|
+
* className to applied on each button
|
|
66
|
+
*/
|
|
67
|
+
buttonClassName?: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { }
|
|
@@ -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-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
|
@@ -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
|