welcome-ui 7.0.1 → 7.1.0
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/{CustomInput-Cewo45Hd.mjs → CustomInput-BqaOGHm4.mjs} +1 -1
- package/dist/DatePicker.mjs +1 -1
- package/dist/DateTimePicker.mjs +1 -1
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Search.mjs +1 -1
- package/dist/Select.mjs +1 -1
- package/dist/TimePicker.mjs +1 -1
- package/dist/{downshift.esm-BOfUfcgd.mjs → downshift.esm-CEHW4VDy.mjs} +1 -1
- package/package.json +6 -6
- package/dist/AXB53BZF-KWM2jKTz.js +0 -1
- package/dist/Accordion.js +0 -75
- package/dist/Alert.js +0 -37
- package/dist/AspectRatio.js +0 -29
- package/dist/Avatar.js +0 -5
- package/dist/BYC7LY2E-BkAEL2VD.js +0 -1
- package/dist/Badge.js +0 -17
- package/dist/Box.js +0 -1
- package/dist/Breadcrumb.js +0 -54
- package/dist/Button.js +0 -78
- package/dist/ButtonGroup.js +0 -32
- package/dist/Card.js +0 -17
- package/dist/Checkbox.js +0 -1
- package/dist/ClearButton.js +0 -14
- package/dist/CloseButton.js +0 -6
- package/dist/CustomInput-DVH2rh9-.js +0 -1070
- package/dist/DatePicker.js +0 -1
- package/dist/DateTimePicker.js +0 -38
- package/dist/DateTimePickerCommon.js +0 -1
- package/dist/Drawer.js +0 -64
- package/dist/DropdownMenu.js +0 -45
- package/dist/Field.js +0 -72
- package/dist/FieldGroup.js +0 -13
- package/dist/FileDrop.js +0 -46
- package/dist/FileUpload.js +0 -3
- package/dist/Files.js +0 -1
- package/dist/Flex.js +0 -1
- package/dist/Grid.js +0 -1
- package/dist/Hint.js +0 -8
- package/dist/ITI7HKP4-BPa8qpnl.js +0 -1
- package/dist/Icon.js +0 -17
- package/dist/Icons.js +0 -40
- package/dist/IconsFont.js +0 -17
- package/dist/InputText.js +0 -8
- package/dist/JC64G2H7-YkBMNrtl.js +0 -1
- package/dist/KUU7WJ55-DN8gk6_R.js +0 -1
- package/dist/LVA2YJMS-B2HZjIhJ.js +0 -14
- package/dist/Label.js +0 -35
- package/dist/Link.js +0 -43
- package/dist/Loader.js +0 -30
- package/dist/Logo.js +0 -3
- package/dist/MTZPJQMC-5Xg78Uyy.js +0 -1
- package/dist/Modal.js +0 -181
- package/dist/NLEBE274-DvH3XTTw.js +0 -1
- package/dist/P2CTZE2T-q8vyaGc0.js +0 -1
- package/dist/P4IRICAX-nhgZ26A1.js +0 -1
- package/dist/Pagination.js +0 -46
- package/dist/PasswordInput.js +0 -1
- package/dist/Picker.js +0 -8
- package/dist/Popover.js +0 -31
- package/dist/QYJ6MIDR-CRK3satR.js +0 -1
- package/dist/Radio.js +0 -60
- package/dist/RadioGroup.js +0 -8
- package/dist/RadioTab.js +0 -61
- package/dist/SYRFVSLH-BpAfr7UE.js +0 -1
- package/dist/Search.js +0 -70
- package/dist/Select.js +0 -122
- package/dist/Shape.js +0 -23
- package/dist/Slider.js +0 -190
- package/dist/Stack.js +0 -1
- package/dist/Swiper.js +0 -141
- package/dist/System.js +0 -1
- package/dist/Table.js +0 -55
- package/dist/Tabs.js +0 -82
- package/dist/Tag.js +0 -78
- package/dist/Text.js +0 -46
- package/dist/Textarea.js +0 -6
- package/dist/TimePicker.js +0 -4
- package/dist/Toast.js +0 -42
- package/dist/Toggle.js +0 -75
- package/dist/Tooltip.js +0 -68
- package/dist/UniversalLink.js +0 -4
- package/dist/VEVQD5MH-mN1wMozH.js +0 -1
- package/dist/VGCJ63VH-BNLwLOaC.js +0 -1
- package/dist/VariantIcon.js +0 -8
- package/dist/WelcomeLoader.js +0 -11
- package/dist/WuiProvider.js +0 -407
- package/dist/X5NMLKT6-BzhcQu_I.js +0 -1
- package/dist/YV4JVR4I-DIthYWMj.js +0 -15
- package/dist/_commonjsHelpers-DvH0V_XJ.js +0 -1
- package/dist/create-event-YSlay9Ef.js +0 -1
- package/dist/downshift.esm-dvOEflhK.js +0 -1
- package/dist/field-styles-DYEc1l_A.js +0 -63
- package/dist/format-bytes-drUpnBnQ.js +0 -1
- package/dist/get-max-width-height-CDLBnp_J.js +0 -1
- package/dist/hex-to-rgba-cCYXRc5D.js +0 -1
- package/dist/hide-focus-rings-root-DGU4Klq5.js +0 -5
- package/dist/index-23RJrN0D.js +0 -1
- package/dist/index-BAD1dszB.js +0 -1
- package/dist/index-BHi0wohR.js +0 -142
- package/dist/index-BJzGkA7x.js +0 -1
- package/dist/index-BLom3M2B.js +0 -2
- package/dist/index-BNwz4P5j.js +0 -1
- package/dist/index-BPeIa2mR.js +0 -1
- package/dist/index-C1FV1q-F.js +0 -1
- package/dist/index-CxDKPhvU.js +0 -1
- package/dist/index-D6MJAN7T.js +0 -1
- package/dist/index-DTx8atxB.js +0 -1
- package/dist/index-Db47iJVz.js +0 -1
- package/dist/index-Dn-QEAu6.js +0 -56
- package/dist/index-_wqLxu7x.js +0 -1
- package/dist/overflow-ellipsis-C2ESrF8C.js +0 -5
- package/dist/radio-group-BpImAAmy.js +0 -1
- package/dist/theme.js +0 -18
- package/dist/throttle-BB1Y3bfD.js +0 -1
- package/dist/use-fork-ref-Bjf1e56Z.js +0 -1
- package/dist/use-isomorphic-layout-effect-C1_Gy5Nu.js +0 -1
- package/dist/use-viewport-BDDjd1nl.js +0 -1
- package/dist/utils.js +0 -1
- package/dist/wrap-children-BLDjJiiy.js +0 -1
package/dist/Slider.js
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),n=require("@xstyled/styled-components"),p=require("./Box.js"),F=require("./Hint.js"),Y=require("./Text.js"),P=require("./InputText.js"),Z=require("./System.js"),H=n.css`
|
|
2
|
-
appearance: none;
|
|
3
|
-
cursor: pointer;
|
|
4
|
-
height: 20;
|
|
5
|
-
width: 20;
|
|
6
|
-
transform: scale(1);
|
|
7
|
-
transition:
|
|
8
|
-
background-color ${n.th.transition("medium")},
|
|
9
|
-
border-color ${n.th.transition("medium")},
|
|
10
|
-
transform 100ms ease-in-out;
|
|
11
|
-
`,O=n.css`
|
|
12
|
-
${n.th("sliders.focused")};
|
|
13
|
-
transform: scale(1.2);
|
|
14
|
-
`,ee=n.css`
|
|
15
|
-
position: absolute;
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: ${n.th("space.xs")};
|
|
18
|
-
`,le=n.input(({borderSelectorColor:l,disabled:c})=>n.css`
|
|
19
|
-
${n.th("sliders.default")};
|
|
20
|
-
appearance: none;
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
background-repeat: no-repeat;
|
|
23
|
-
border-radius: 0;
|
|
24
|
-
margin: auto 0;
|
|
25
|
-
width: 100%;
|
|
26
|
-
height: ${n.th("space.xs")};
|
|
27
|
-
|
|
28
|
-
&::-webkit-slider-thumb {
|
|
29
|
-
${n.th("sliders.selector")};
|
|
30
|
-
${H};
|
|
31
|
-
border-color: ${l||"transparent"};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&::-moz-range-thumb {
|
|
35
|
-
${n.th("sliders.selector")};
|
|
36
|
-
${H};
|
|
37
|
-
border-color: ${l||"transparent"};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&:active,
|
|
41
|
-
&:focus-visible {
|
|
42
|
-
outline: none;
|
|
43
|
-
|
|
44
|
-
&::-webkit-slider-thumb {
|
|
45
|
-
${O};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&::-moz-range-thumb {
|
|
49
|
-
${O};
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
${c&&n.css`
|
|
54
|
-
${n.th("sliders.disabled")}
|
|
55
|
-
cursor: not-allowed;
|
|
56
|
-
|
|
57
|
-
&::-webkit-slider-thumb {
|
|
58
|
-
${n.th("sliders.selector.disabled")};
|
|
59
|
-
cursor: not-allowed;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&::-moz-range-thumb {
|
|
63
|
-
${n.th("sliders.selector.disabled")};
|
|
64
|
-
cursor: not-allowed;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&:active {
|
|
68
|
-
&::-webkit-slider-thumb {
|
|
69
|
-
${n.th("sliders.focused.disabled")};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&::-moz-range-thumb {
|
|
73
|
-
${n.th("sliders.focused.disabled")};
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
`};
|
|
77
|
-
`),Q=n.input(({borderSelectorColor:l,disabled:c})=>n.css`
|
|
78
|
-
${n.th("sliders.rangeInput")}
|
|
79
|
-
appearance: none;
|
|
80
|
-
pointer-events: none;
|
|
81
|
-
position: absolute;
|
|
82
|
-
height: 0;
|
|
83
|
-
width: 100%;
|
|
84
|
-
outline: none;
|
|
85
|
-
z-index: 1;
|
|
86
|
-
top: ${n.th("space.xxs")};
|
|
87
|
-
|
|
88
|
-
&::-webkit-slider-thumb {
|
|
89
|
-
${n.th("sliders.selector")};
|
|
90
|
-
${H};
|
|
91
|
-
|
|
92
|
-
border-color: ${l||"transparent"};
|
|
93
|
-
top: ${n.th("space.sm")};
|
|
94
|
-
pointer-events: all;
|
|
95
|
-
position: relative;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&::-moz-range-thumb {
|
|
99
|
-
${n.th("sliders.selector")};
|
|
100
|
-
${H};
|
|
101
|
-
|
|
102
|
-
border-color: ${l||"transparent"};
|
|
103
|
-
top: ${n.th("space.sm")};
|
|
104
|
-
pointer-events: all;
|
|
105
|
-
position: relative;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&:active,
|
|
109
|
-
&:focus-visible {
|
|
110
|
-
&::-webkit-slider-thumb {
|
|
111
|
-
${O};
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
&::-moz-range-thumb {
|
|
115
|
-
${O};
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
${c&&n.css`
|
|
120
|
-
&::-webkit-slider-thumb {
|
|
121
|
-
${n.th("sliders.selector.disabled")};
|
|
122
|
-
cursor: not-allowed;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
&::-moz-range-thumb {
|
|
126
|
-
${n.th("sliders.selector.disabled")};
|
|
127
|
-
cursor: not-allowed;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
&:active {
|
|
131
|
-
&::-webkit-slider-thumb {
|
|
132
|
-
${n.th("sliders.focused.disabled")};
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
&::-moz-range-thumb {
|
|
136
|
-
${n.th("sliders.focused.disabled")};
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
`};
|
|
140
|
-
`),ae=n(p.Box)(()=>n.css`
|
|
141
|
-
${ee};
|
|
142
|
-
background-color: beige-40;
|
|
143
|
-
`),ie=n(p.Box)(({disabled:l})=>n.css`
|
|
144
|
-
${ee};
|
|
145
|
-
background-color: primary-40;
|
|
146
|
-
|
|
147
|
-
${l&&n.css`
|
|
148
|
-
${n.th("sliders.disabled")}
|
|
149
|
-
cursor: not-allowed;
|
|
150
|
-
`};
|
|
151
|
-
`),te=n(p.Box)(()=>n.css`
|
|
152
|
-
position: absolute;
|
|
153
|
-
|
|
154
|
-
:before {
|
|
155
|
-
content: '';
|
|
156
|
-
position: absolute;
|
|
157
|
-
background-color: neutral-30;
|
|
158
|
-
height: 6;
|
|
159
|
-
width: 1;
|
|
160
|
-
transform: translate(-50%);
|
|
161
|
-
}
|
|
162
|
-
`),ne=n(F.Hint)(()=>n.css`
|
|
163
|
-
position: absolute;
|
|
164
|
-
color: neutral-50;
|
|
165
|
-
top: 0;
|
|
166
|
-
transform: translate(-50%);
|
|
167
|
-
white-space: nowrap;
|
|
168
|
-
`),W=n.outputBox(({isVisible:l})=>n.css`
|
|
169
|
-
opacity: 0;
|
|
170
|
-
visibility: hidden;
|
|
171
|
-
transition:
|
|
172
|
-
opacity 150ms ease-in-out,
|
|
173
|
-
visibility 150ms ease-in-out,
|
|
174
|
-
transform 150ms ease-in-out;
|
|
175
|
-
position: absolute;
|
|
176
|
-
text-align: center;
|
|
177
|
-
transform: translate(-50%, calc(-100% + -${n.th("space.xs")}));
|
|
178
|
-
|
|
179
|
-
${l&&n.css`
|
|
180
|
-
opacity: 100;
|
|
181
|
-
visibility: visible;
|
|
182
|
-
transform: translate(-50%, calc(-100% + -${n.th("space.sm")}));
|
|
183
|
-
`}
|
|
184
|
-
`),j=n(p.Box)(()=>n.css`
|
|
185
|
-
${n.th("sliders.output.tooltip")};
|
|
186
|
-
flex: 1 1 auto;
|
|
187
|
-
margin: auto;
|
|
188
|
-
min-width: ${n.th("space.xxs")};
|
|
189
|
-
padding: ${n.th("space.xs")} ${n.th("space.sm")};
|
|
190
|
-
`),X=20,z=({min:l,step:c,toCompare:$,value:E})=>{let s=Math.min(E,$-1*c);return s=Math.max(s,l),A(s,c)},N=({max:l,step:c,toCompare:$,value:E})=>{let s=Math.max(E,$+1*c);return s=Math.min(s,l),A(s,c)},ce=Z.forwardRef(({borderSelectorColor:l="neutral-10",disabled:c,hint:$,label:E,max:s,min:a,onChange:g,step:i=1,tooltip:y,type:b,value:h,values:C,...L},U)=>{const[u,M]=e.useState(a),[f,B]=e.useState(s),[I,w]=e.useState(s),[x,v]=e.useState(s),D=e.useRef(null),q=e.useRef(null),k=e.useRef(null),R=e.useRef(null),T=e.useRef(null),[S,o]=e.useState(!1),[d,_]=e.useState(!1),se=t=>{const r=z({value:parseInt(t.target.value,10),toCompare:f,step:i,min:a});w(r),M(r),t.target.value=r.toString()},oe=t=>{const r=N({value:parseInt(t.target.value,10),toCompare:u,step:i,max:s});v(r),B(r),t.target.value=r.toString()},J=(t,r)=>{if(t.preventDefault(),r==="min"){let m=u;t.key==="ArrowRight"&&(m=z({value:m+i,toCompare:f,step:i,min:a})),t.key==="ArrowLeft"&&(m=z({value:m-i,toCompare:f,step:i,min:a})),w(m),M(m),g({min:m,max:f})}if(r==="max"){let m=f;t.key==="ArrowRight"&&(m=N({value:m+i,toCompare:u,step:i,max:s})),t.key==="ArrowLeft"&&(m=N({value:m-i,toCompare:u,step:i,max:s})),v(m),B(m),g({min:u,max:m})}},V=e.useCallback(t=>{const r=Math.round((t-a)/(s-a)*100);return r<0?0:r>100?100:r},[a,s]);return e.useEffect(()=>{if(q.current){const t=V(u),r=V(parseInt(q.current.value,10));k.current&&(k.current.style.left=`${t}%`,k.current.style.width=`${r-t}%`)}},[u,V]),e.useEffect(()=>{if(D.current){const t=V(parseInt(D.current.value,10)),r=V(f);if(k.current&&(k.current.style.width=`${r-t}%`),R.current){const m=V(u)/100;R.current.style.left=`calc(${m*100}% + ${(.5-m)*X}px)`}if(T.current){const m=V(f)/100;T.current.style.left=`calc(${m*100}% + ${(.5-m)*X}px)`}}},[u,f,V]),e.useEffect(()=>{if(h){if(!isNaN(h.min)&&h.min!==u){const t=z({value:h.min||a,toCompare:f,step:i,min:a});M(t),w(t)}if(!isNaN(h.max)&&h.max!==f){const t=N({value:h.max||s,toCompare:u,step:i,max:s});B(t),v(t)}}},[h]),e.createElement(p.Box,{position:"relative",ref:U,w:"100%"},E&&e.createElement(Y.Text,{as:"label",variant:"sm"},E),e.createElement(p.Box,{alignItems:"center",display:"flex",gap:"sm"},(b==="inline"||b==="fields")&&(b==="fields"?e.createElement(P.InputText,{disabled:c,max:f,min:a,onBlur:()=>{const t=z({value:I,toCompare:f,step:i,min:a});w(t),M(t),g({min:t,max:f})},onChange:t=>{let r=parseInt(t.target.value,10);isNaN(r)&&(r=0),w(r)},onKeyDown:t=>{if(t.key==="Enter"){const r=z({value:I,toCompare:f,step:i,min:a});w(r),M(r),g({min:r,max:f})}},size:"sm",type:"number",value:I.toString(),w:72}):e.createElement(p.Box,null,a)),e.createElement(p.Box,{flexGrow:"1",position:"relative"},y&&e.createElement(e.Fragment,null,e.createElement(W,{isVisible:S,ref:R},e.createElement(j,null,u)),e.createElement(W,{isVisible:d,ref:T},e.createElement(j,null,f))),e.createElement(p.Box,{h:20,pb:"sm",position:"relative",pt:"sm",w:"100%"},e.createElement(Q,{...L,borderSelectorColor:l,disabled:c,max:s,min:a,onChange:se,onKeyDown:t=>J(t,"min"),onMouseDown:()=>{y&&S===!1&&o(!0)},onMouseUp:()=>{g({min:u,max:f}),y&&o(!1)},ref:D,step:i,type:"range",value:u}),e.createElement(Q,{...L,borderSelectorColor:l,disabled:c,max:s,min:a,onChange:oe,onKeyDown:t=>J(t,"max"),onMouseDown:()=>{y&&d===!1&&_(!0)},onMouseUp:()=>{g({min:u,max:f}),y&&_(!1)},ref:q,step:i,type:"range",value:f}),e.createElement(ae,null),e.createElement(ie,{disabled:c,ref:k})),C&&e.createElement(p.Box,{h:24,ml:10,mr:10,position:"relative"},C.reduce((t,r)=>t.includes(r)?t:[...t,r],[]).filter(t=>t>=a&&t<=s).map((t,r)=>e.createElement(te,{key:`${t}-${r}`,left:`${V(t)}%`},e.createElement(ne,null,t))))),(b==="inline"||b==="fields")&&(b==="fields"?e.createElement(P.InputText,{disabled:c,max:s,min:u+1,onBlur:()=>{const t=N({value:x,toCompare:u,step:i,max:s});v(t),B(t),g({min:u,max:t})},onChange:t=>{let r=parseInt(t.target.value,10);isNaN(r)&&(r=0),v(r)},onKeyDown:t=>{if(t.key==="Enter"){const r=N({value:x,toCompare:u,step:i,max:s});v(r),B(r),g({min:u,max:r})}},size:"sm",type:"number",value:x.toString(),w:72}):e.createElement(p.Box,null,s))),$&&e.createElement(F.Hint,{color:"neutral-50",mt:0},$))}),re=20,A=(l,c)=>Math.round(l/c)*c,K=(l,c,$,E)=>(l=A(l,E),l<c?c:l>$?$:l),G=Z.forwardRef(({borderSelectorColor:l="neutral-10",disabled:c,hint:$,label:E,max:s,min:a,onChange:g,step:i=1,tooltip:y,type:b,value:h,values:C,...L},U)=>{const u=e.useRef(null),M=e.useRef(null),[f,B]=e.useState(!1),[I,w]=e.useState(K(h,a,s,i)),[x,v]=e.useState(K(h,a,s,i)),D=o=>{o=A(o,i),v(o)},q=o=>{o.preventDefault();let d=x;o.key==="ArrowRight"&&(d=K(d+i,a,s,i)),o.key==="ArrowLeft"&&(d=K(d-i,a,s,i)),v(d),w(d),g(d)},k=o=>{let d=parseInt(o.target.value,10);isNaN(d)&&(d=0),w(d)},R=()=>{const o=K(I,a,s,i);w(o),v(o),g(o)},T=o=>{o.key==="Enter"&&R()},S=e.useCallback(o=>Math.round((o-a)/(s-a)*100),[a,s]);return e.useEffect(()=>{if(u.current&&(u.current.style.backgroundSize=`${S(x)}% 100%`),M.current){const o=S(x)/100;M.current.style.left=`calc(${o*100}% + ${(.5-o)*re}px)`}},[x,S]),e.useEffect(()=>{!isNaN(h)&&h!==x&&h&&(D(h),w(h))},[h]),e.createElement(p.Box,{display:"flex",flexDirection:"column",position:"relative",ref:U},E&&e.createElement(Y.Text,{as:"label",variant:"sm"},E),e.createElement(p.Box,{alignItems:"center",display:"flex",gap:"sm"},(b==="inline"||b==="left-field")&&(b==="left-field"?e.createElement(P.InputText,{disabled:c,max:s,min:a,onBlur:R,onChange:k,onKeyDown:T,size:"sm",type:"number",value:I.toString(),w:72}):e.createElement(p.Box,null,a)),e.createElement(p.Box,{display:"flex",flexDirection:"column",flexGrow:"1",h:20,position:"relative"},e.createElement(le,{borderSelectorColor:l,disabled:c,list:"tickmarks",max:s,min:a,onChange:o=>{const d=parseInt(o.target.value,10);D(d),w(d)},onKeyDown:q,onMouseDown:()=>{y&&f===!1&&B(!0)},onMouseUp:()=>{g(x),y&&B(!1)},ref:u,step:i,type:"range",value:x,...L}),y&&e.createElement(W,{isVisible:f,ref:M},e.createElement(j,null,x)),C&&e.createElement(p.Box,{h:24,ml:10,mr:10,mt:5,position:"relative"},C.reduce((o,d)=>o.includes(d)?o:[...o,d],[]).filter(o=>o>=a&&o<=s).map((o,d)=>e.createElement(te,{key:`${o}-${d}`,left:`${S(o)}%`},e.createElement(ne,null,o))))),(b==="inline"||b==="right-field")&&(b==="right-field"?e.createElement(P.InputText,{disabled:c,max:s,min:a,onBlur:R,onChange:k,onKeyDown:T,size:"sm",type:"number",value:I.toString(),w:72}):e.createElement(p.Box,null,s))),$&&e.createElement(F.Hint,{color:"neutral-50",mt:0},$))});G.displayName="Slider";const ue=Object.assign(G,{Range:ce});exports.Slider=ue;exports.SliderComponent=G;exports.ensureMinMax=K;exports.round=A;exports.thumbWidth=re;
|
package/dist/Stack.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("./Box.js"),f=require("./System.js"),i=f.forwardRef(({as:t="div",children:l,dataTestId:c,direction:a="column",spacing:o="md",...n},s)=>{const d=e.Children.toArray(l).filter(e.isValidElement);return e.createElement(r.Box,{as:t,"data-testid":c,display:"flex",flexDirection:a,gap:o,ref:s,...n},d.map((u,m)=>{const y={as:t==="ol"||t==="ul"?"li":"div",key:`stack-item-${m}`};return e.createElement(r.Box,{...y},u)}))});i.displayName="Stack";exports.Stack=i;
|
package/dist/Swiper.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),z=require("./_commonjsHelpers-DvH0V_XJ.js"),c=require("@xstyled/styled-components"),ot=require("./use-viewport-BDDjd1nl.js"),st=require("./Button.js"),K=require("./IconsFont.js");var at="Expected a function",X=NaN,lt="[object Symbol]",ct=/^\s+|\s+$/g,ut=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,ft=/^0o[0-7]+$/i,ht=parseInt,gt=typeof z.commonjsGlobal=="object"&&z.commonjsGlobal&&z.commonjsGlobal.Object===Object&&z.commonjsGlobal,mt=typeof self=="object"&&self&&self.Object===Object&&self,pt=gt||mt||Function("return this")(),wt=Object.prototype,bt=wt.toString,yt=Math.max,$t=Math.min,_=function(){return pt.Date.now()};function St(t,e,n){var s,r,a,d,l,y,m=0,A=!1,S=!1,R=!0;if(typeof t!="function")throw new TypeError(at);e=J(e)||0,D(n)&&(A=!!n.leading,S="maxWait"in n,a=S?yt(J(n.maxWait)||0,e):a,R="trailing"in n?!!n.trailing:R);function f(i){var g=s,P=r;return s=r=void 0,m=i,d=t.apply(P,g),d}function I(i){return m=i,l=setTimeout(b,e),A?f(i):d}function v(i){var g=i-y,P=i-m,W=e-g;return S?$t(W,a-P):W}function k(i){var g=i-y,P=i-m;return y===void 0||g>=e||g<0||S&&P>=a}function b(){var i=_();if(k(i))return T(i);l=setTimeout(b,v(i))}function T(i){return l=void 0,R&&s?f(i):(s=r=void 0,d)}function O(){l!==void 0&&clearTimeout(l),m=0,s=y=r=l=void 0}function M(){return l===void 0?d:T(_())}function p(){var i=_(),g=k(i);if(s=arguments,r=this,y=i,g){if(l===void 0)return I(y);if(S)return l=setTimeout(b,e),f(y)}return l===void 0&&(l=setTimeout(b,e)),d}return p.cancel=O,p.flush=M,p}function D(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function vt(t){return!!t&&typeof t=="object"}function xt(t){return typeof t=="symbol"||vt(t)&&bt.call(t)==lt}function J(t){if(typeof t=="number")return t;if(xt(t))return X;if(D(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=D(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(ct,"");var n=dt.test(t);return n||ft.test(t)?ht(t.slice(2),n?2:8):ut.test(t)?X:+t}var Pt=St;const Et=z.getDefaultExportFromCjs(Pt),Rt=(t,e)=>{const n=o.useRef();o.useEffect(()=>{n.current=t},[t]),o.useEffect(()=>{function s(){n.current()}if(e!==null){const r=setInterval(s,e);return()=>clearInterval(r)}},[e])},x=(t=3,e,n)=>{if(e===0)return`${100/t}%`;const r=n(e*(t===1?4:2));return`calc(${100/t}% - ${r})`},Y=c.div`
|
|
2
|
-
overflow-y: hidden;
|
|
3
|
-
position: relative;
|
|
4
|
-
width: 100%;
|
|
5
|
-
height: 100%;
|
|
6
|
-
|
|
7
|
-
${c.system}
|
|
8
|
-
`,Q=c(st.Button)(({disabled:t,withDarkUI:e,withNavigation:{desktop:n,mobile:s}})=>c.css`
|
|
9
|
-
top: 50%;
|
|
10
|
-
transform: translate3d(0, -50%, 0);
|
|
11
|
-
z-index: ${s?1:-1};
|
|
12
|
-
display: ${s?"flex":"none"};
|
|
13
|
-
|
|
14
|
-
${!e&&c.css`
|
|
15
|
-
background-color: neutral-10 !important;
|
|
16
|
-
|
|
17
|
-
&:hover {
|
|
18
|
-
background-color: neutral-40 !important;
|
|
19
|
-
}
|
|
20
|
-
`}
|
|
21
|
-
|
|
22
|
-
@media (min-width: md) {
|
|
23
|
-
z-index: ${n?1:-1};
|
|
24
|
-
display: ${n?"flex":"none"};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
${t&&c.css`
|
|
28
|
-
opacity: 0;
|
|
29
|
-
z-index: -1;
|
|
30
|
-
`};
|
|
31
|
-
`),kt=c.divBox(({withPagination:{desktop:t,mobile:e}})=>c.css`
|
|
32
|
-
justify-content: center;
|
|
33
|
-
position: absolute;
|
|
34
|
-
bottom: 0;
|
|
35
|
-
width: 100%;
|
|
36
|
-
padding: sm;
|
|
37
|
-
|
|
38
|
-
z-index: ${e?1:-1};
|
|
39
|
-
display: ${e?"flex":"none"};
|
|
40
|
-
|
|
41
|
-
@media (min-width: md) {
|
|
42
|
-
z-index: ${t?1:-1};
|
|
43
|
-
display: ${t?"flex":"none"};
|
|
44
|
-
}
|
|
45
|
-
`),jt=c.div(({active:t,withDarkUI:e})=>c.css`
|
|
46
|
-
height: 10;
|
|
47
|
-
width: 10;
|
|
48
|
-
border-radius: 50%;
|
|
49
|
-
cursor: pointer;
|
|
50
|
-
margin: 0 xxs;
|
|
51
|
-
${t?c.th("swipers.navigation.bullet.active"):c.th("swipers.navigation.bullet.default")}
|
|
52
|
-
${e&&c.css`
|
|
53
|
-
background-color: ${t?"neutral-90":"neutral-50"};
|
|
54
|
-
`}
|
|
55
|
-
${c.system}
|
|
56
|
-
`),Lt=c.ulBox(({fullWidth:t,slidesPerView:{desktop:e,mobile:n,tablet:s},spaceBetween:r,theme:a})=>c.css`
|
|
57
|
-
scroll-snap-type: x mandatory;
|
|
58
|
-
display: flex;
|
|
59
|
-
-webkit-overflow-scrolling: touch;
|
|
60
|
-
overflow-x: scroll;
|
|
61
|
-
margin: 0;
|
|
62
|
-
|
|
63
|
-
/* Hide scrollbar */
|
|
64
|
-
-ms-overflow-style: none;
|
|
65
|
-
scrollbar-width: none;
|
|
66
|
-
&::-webkit-scrollbar {
|
|
67
|
-
display: none;
|
|
68
|
-
}
|
|
69
|
-
height: 100%;
|
|
70
|
-
padding: 0;
|
|
71
|
-
|
|
72
|
-
> [aria-roledescription='slide'][aria-hidden='true'] {
|
|
73
|
-
pointer-events: none;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
> * {
|
|
77
|
-
list-style-type: none;
|
|
78
|
-
margin-right: ${r};
|
|
79
|
-
min-width: ${x(n,r,a.toRem)};
|
|
80
|
-
max-width: ${x(n,r,a.toRem)};
|
|
81
|
-
flex: 1;
|
|
82
|
-
|
|
83
|
-
&:last-child {
|
|
84
|
-
margin-right: 0;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
@media (min-width: sm) {
|
|
89
|
-
${n&&c.css`
|
|
90
|
-
> * {
|
|
91
|
-
min-width: ${x(n,r,a.toRem)};
|
|
92
|
-
max-width: ${x(n,r,a.toRem)};
|
|
93
|
-
|
|
94
|
-
&:nth-of-type(${n}n + 1) {
|
|
95
|
-
scroll-snap-align: start;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
`}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
@media (min-width: md) {
|
|
102
|
-
${s&&c.css`
|
|
103
|
-
> * {
|
|
104
|
-
min-width: ${x(s,r,a.toRem)};
|
|
105
|
-
max-width: ${x(s,r,a.toRem)};
|
|
106
|
-
|
|
107
|
-
&:nth-of-type(${s}n + 1) {
|
|
108
|
-
scroll-snap-align: start;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
`}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
@media (min-width: lg) {
|
|
115
|
-
${e&&c.css`
|
|
116
|
-
> * {
|
|
117
|
-
min-width: ${x(e,r,a.toRem)};
|
|
118
|
-
max-width: ${x(e,r,a.toRem)};
|
|
119
|
-
|
|
120
|
-
scroll-snap-align: unset;
|
|
121
|
-
|
|
122
|
-
&:nth-of-type(${e}n + 1) {
|
|
123
|
-
scroll-snap-align: start;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&:not(:nth-of-type(${e}n + 1)) {
|
|
127
|
-
scroll-snap-align: unset;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
`}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
@media (min-width: xl) {
|
|
134
|
-
${e&&t&&c.css`
|
|
135
|
-
> * {
|
|
136
|
-
min-width: ${x(e+2,r,a.toRem)};
|
|
137
|
-
max-width: ${x(e+2,r,a.toRem)};
|
|
138
|
-
}
|
|
139
|
-
`}
|
|
140
|
-
}
|
|
141
|
-
`),Ct=(t={})=>{const{autoplay:e=!1,centeredSlides:n=!1,duration:s=5e3,firstSlideToShow:r=0,fullWidth:a=!1,id:d="swiper",loop:l=!1,navigationSize:y="md",slidesPerView:m={mobile:1,tablet:1,desktop:1},spaceBetween:A=20,withDarkUI:S=!1,withNavigation:R={mobile:!0,desktop:!0},withPagination:f={mobile:!1,desktop:!1}}=t,I=l||e,{width:v}=ot.useViewportSize(),[k,b]=o.useState(0),[T,O]=o.useState(!1),[M,p]=o.useState(!1),i=o.useRef(),{screens:g}=c.useTheme(),P=o.useMemo(()=>v<=g.md?m.mobile:v<=g.lg?m.tablet:v>=g["4xl"]&&a?m.desktop+2:m.desktop,[a,v,g,m]);return{centeredSlides:n,firstSlideToShow:r,currentSlidesPerView:P,currentPage:k,setCurrentPage:b,fullWidth:a,id:d,navigationSize:y,slidesPerView:m,spaceBetween:A,withNavigation:R,withPagination:f,autoplay:e,shouldLoop:I,duration:s,withDarkUI:S,ref:i,setShowLeftArrow:O,setShowRightArrow:p,showLeftArrow:T,showRightArrow:M}},Z=({children:t,dataTestId:e,store:n,...s})=>{const{autoplay:r,centeredSlides:a,currentPage:d,currentSlidesPerView:l,duration:y,firstSlideToShow:m,fullWidth:A,id:S,navigationSize:R,ref:f,setCurrentPage:I,setShowLeftArrow:v,setShowRightArrow:k,shouldLoop:b,showLeftArrow:T,showRightArrow:O,slidesPerView:M,spaceBetween:p,withDarkUI:i,withNavigation:g,withPagination:P}=n,W=o.Children.toArray(t).length,H=Math.ceil(W/l),C=Array.from(Array(H).keys()),U=d===0,q=d===C.length-1,tt=o.Children.map(t,(w,u)=>{const h=`${S}-${u}`,$=u+1,L=Math.ceil($/l)-1,E=q?W-$>=l:L!==d;return o.cloneElement(w,{...w.props,id:h,key:h,"aria-hidden":E,"aria-roledescription":"slide","aria-label":`${$} of ${W}`})}),et=a?Math.floor(H/2):Math.ceil(m/l)-1,G=o.useCallback(()=>{const w=f==null?void 0:f.current;if(w&&!b){const{offsetWidth:u,scrollLeft:h,scrollWidth:$}=w,L=!(h>p),E=!($-(h+u)>p);v(!L),k(!E)}else v(!0),k(!0)},[f,v,k,b,p]),nt=()=>{var u,h;const w=f==null?void 0:f.current;if(w){const{children:$,offsetWidth:L,scrollLeft:E,scrollWidth:N}=w,rt=(h=(u=$==null?void 0:$[0])==null?void 0:u.getBoundingClientRect())==null?void 0:h.width,B=!(N-(E+L)>p)?C.length-1:Math.round(E/((rt+p)*l));B!==d&&I(B)}},it=Et(()=>{G(),nt()},100),j=o.useCallback((w,u=!1)=>{var L,E,N;const h=f==null?void 0:f.current,$=(N=(E=(L=h==null?void 0:h.children)==null?void 0:L[0])==null?void 0:E.getBoundingClientRect())==null?void 0:N.width;h==null||h.scrollTo({left:w*($+p)*l,top:0,behavior:u?"auto":"smooth"})},[l,p,f]),F=o.useCallback(()=>{j(b&&q?0:d+1)},[d,j,q,b]),V=o.useCallback(()=>{j(U&&b?C.length-1:d-1)},[C.length,d,j,U,b]);return Rt(()=>{r&&F()},r?y:null),o.useEffect(()=>{const w=u=>{u.code==="ArrowLeft"&&V(),u.code==="ArrowRight"&&F()};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[V,F]),o.useEffect(()=>{j(et,!0)},[]),o.useEffect(()=>{G()},[G,t]),o.createElement(Y,{"data-testid":e,...s},o.createElement(Lt,{fullWidth:A,onScroll:it,ref:f,slidesPerView:M,spaceBetween:p},tt),o.createElement(Q,{"data-testid":e&&`${e}-prev-button`,disabled:!T,left:10,onClick:V,position:"absolute",shape:"circle",size:R,variant:i?"secondary":"ghost",withDarkUI:i,withNavigation:g},o.createElement(K.IconsFont.Left,null)),o.createElement(Q,{"data-testid":e&&`${e}-next-button`,disabled:!O,onClick:F,position:"absolute",right:10,shape:"circle",size:R,variant:i?"secondary":"ghost",withDarkUI:i,withNavigation:g},o.createElement(K.IconsFont.Right,null)),o.createElement(kt,{className:"swiper-pagination","data-testid":e&&`${e}-pagination`,role:"tablist",withPagination:P},C.length>1&&C.map((w,u)=>{const h={idx:u,role:"tab","aria-controls":`${S}-${u}`,"aria-label":`${u+1} of ${C.length}`,"aria-selected":u===d,onClick:()=>j(u)};return o.createElement(jt,{active:u===d,key:`bullet-${u+1}`,withDarkUI:i,...h})})))};Z.displayName="Swiper";const At=Y;exports.StyledSwiper=At;exports.Swiper=Z;exports.useSwiper=Ct;
|
package/dist/System.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),t=require("@xstyled/styled-components");function a(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const p=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(r,s,p.get?p:{enumerable:!0,get:()=>o[s]})}}return r.default=o,Object.freeze(r)}const e=a(t),i=t.compose(t.style({prop:"opacity"}),t.style({prop:"overflow"}),t.style({prop:"transition",themeGet:t.getTransition}),t.style({prop:"position"}),t.style({prop:"zIndex",themeGet:t.getZIndex}),t.style({prop:"top",themeGet:t.getPx}),t.style({prop:"right",themeGet:t.getPx}),t.style({prop:"bottom",themeGet:t.getPx}),t.style({prop:"left",themeGet:t.getPx})),l=Object.freeze([e.backgrounds,e.borders,e.boxShadow,e.color,e.display,e.flexboxes,e.grids,e.height,e.maxHeight,e.maxWidth,e.minHeight,e.minWidth,e.space,e.typography,e.verticalAlign,e.width,i]),d=Object.freeze([e.margin,e.marginBottom,e.marginLeft,e.marginRight,e.marginTop,e.mx,e.my,e.width,i]),n=t.compose(...l),c=t.compose(...d),y=n.meta.props.filter(o=>!c.meta.props.includes(o)).map(o=>o==="w"?e.width:o==="h"?e.height:e[o]).filter(Boolean),f=t.compose(...y),g=o=>!n.meta.props.includes(o),u=(o,r)=>r(o),h=o=>m.forwardRef(o);exports.componentSystem=f;exports.filterSystemProps=g;exports.forwardRef=h;exports.shouldForwardProp=u;exports.system=n;exports.wrapperSystem=c;
|
package/dist/Table.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),t=require("@xstyled/styled-components"),n=require("./System.js"),c=t.divBox(({indent:e})=>t.css`
|
|
2
|
-
overflow: hidden;
|
|
3
|
-
width: 100%;
|
|
4
|
-
|
|
5
|
-
${e&&t.css`
|
|
6
|
-
${i}, ${o} {
|
|
7
|
-
&:first-child {
|
|
8
|
-
padding-left: xl;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
&:last-child {
|
|
12
|
-
padding-right: xl;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
`}
|
|
16
|
-
`),h=t.div`
|
|
17
|
-
width: 100%;
|
|
18
|
-
overflow-x: auto;
|
|
19
|
-
`,b=t.tableBox`
|
|
20
|
-
border: 0;
|
|
21
|
-
width: 100%;
|
|
22
|
-
border-collapse: collapse;
|
|
23
|
-
`,T=t.theadBox``,g=t.tbodyBox``,p=t.trBox(({onClick:e,variant:l})=>t.css`
|
|
24
|
-
${t.th("tables.tr.default")};
|
|
25
|
-
${l&&t.th(`tables.tr.${l}`)};
|
|
26
|
-
${e&&t.th("tables.tr.clickable")};
|
|
27
|
-
|
|
28
|
-
&:last-child {
|
|
29
|
-
border: 0;
|
|
30
|
-
}
|
|
31
|
-
`),o=t.thBox`
|
|
32
|
-
${t.th("tables.th")};
|
|
33
|
-
padding: xl;
|
|
34
|
-
vertical-align: middle;
|
|
35
|
-
|
|
36
|
-
&:first-child {
|
|
37
|
-
padding-left: 0;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&:last-child {
|
|
41
|
-
padding-right: 0;
|
|
42
|
-
}
|
|
43
|
-
`,i=t.tdBox`
|
|
44
|
-
${t.th("tables.td")};
|
|
45
|
-
position: relative;
|
|
46
|
-
vertical-align: middle;
|
|
47
|
-
|
|
48
|
-
&:first-child {
|
|
49
|
-
padding-left: 0;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&:last-child {
|
|
53
|
-
padding-right: 0;
|
|
54
|
-
}
|
|
55
|
-
`,a=n.forwardRef(({children:e,indent:l,...r},s)=>d.createElement(c,{indent:l,ref:s,...r},d.createElement(h,null,d.createElement(b,null,e)))),f=Object.assign(a,{Thead:T,Tbody:g,Th:o,Tr:p,Td:i});exports.Table=f;exports.TableComponent=a;
|
package/dist/Tabs.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),Y=require("./use-fork-ref-Bjf1e56Z.js"),Q=require("./use-viewport-BDDjd1nl.js"),U=require("./use-isomorphic-layout-effect-C1_Gy5Nu.js"),p=require("@xstyled/styled-components"),$=require("./P2CTZE2T-q8vyaGc0.js"),e=require("./LVA2YJMS-B2HZjIhJ.js"),k=require("./ITI7HKP4-BPa8qpnl.js"),O=require("./VGCJ63VH-BNLwLOaC.js"),d=require("./YV4JVR4I-DIthYWMj.js"),j=require("./System.js"),Z=require("./VEVQD5MH-mN1wMozH.js"),q=require("./MTZPJQMC-5Xg78Uyy.js");var G=e.createStoreContext([q.PopoverContextProvider,$.CompositeContextProvider],[q.PopoverScopedContextProvider,$.CompositeScopedContextProvider]),X=G.useContext;m.createContext(!1);m.createContext(null);function ee(s={}){var n=s,{composite:o,combobox:t}=n,r=e.__objRest$1(n,["composite","combobox"]);const a=["items","renderedItems","moves","orientation","virtualFocus","includesBaseElement","baseElement","focusLoop","focusShift","focusWrap"],v=d.mergeStore(r.store,d.omit2(o,a),d.omit2(t,a)),u=v==null?void 0:v.getState(),f=k.createCompositeStore(e.__spreadProps$1(e.__spreadValues$1({},r),{store:v,includesBaseElement:e.defaultValue(r.includesBaseElement,u==null?void 0:u.includesBaseElement,!1),orientation:e.defaultValue(r.orientation,u==null?void 0:u.orientation,"horizontal"),focusLoop:e.defaultValue(r.focusLoop,u==null?void 0:u.focusLoop,!0)})),i=k.createCollectionStore(),g=e.__spreadProps$1(e.__spreadValues$1({},f.getState()),{selectedId:e.defaultValue(r.selectedId,u==null?void 0:u.selectedId,r.defaultSelectedId),selectOnMove:e.defaultValue(r.selectOnMove,u==null?void 0:u.selectOnMove,!0)}),c=d.createStore(g,f,v);d.setup(c,()=>d.sync(c,["moves"],()=>{const{activeId:b,selectOnMove:I}=c.getState();if(!I||!b)return;const h=f.item(b);h&&(h.dimmed||h.disabled||c.setState("selectedId",h.id))}));let S=!0;d.setup(c,()=>d.batch(c,["selectedId"],(b,I)=>{if(!S){S=!0;return}o&&b.selectedId===I.selectedId||c.setState("activeId",b.selectedId)})),d.setup(c,()=>d.sync(c,["selectedId","renderedItems"],b=>{if(b.selectedId!==void 0)return;const{activeId:I,renderedItems:h}=c.getState(),x=f.item(I);if(x&&!x.disabled&&!x.dimmed)c.setState("selectedId",x.id);else{const E=h.find(T=>!T.disabled&&!T.dimmed);c.setState("selectedId",E==null?void 0:E.id)}})),d.setup(c,()=>d.sync(c,["renderedItems"],b=>{const I=b.renderedItems;if(I.length)return d.sync(i,["renderedItems"],h=>{const x=h.renderedItems;x.some(T=>!T.tabId)&&x.forEach((T,R)=>{if(T.tabId)return;const L=I[R];L&&i.renderItem(e.__spreadProps$1(e.__spreadValues$1({},T),{tabId:L.id}))})})}));let P=null;return d.setup(c,()=>{const b=()=>{P=c.getState().selectedId},I=()=>{S=!1,c.setState("selectedId",P)};if(o&&"setSelectElement"in o)return e.chain(d.sync(o,["value"],b),d.sync(o,["mounted"],I));if(t)return e.chain(d.sync(t,["selectedValue"],b),d.sync(t,["mounted"],I))}),e.__spreadProps$1(e.__spreadValues$1(e.__spreadValues$1({},f),c),{panels:i,setSelectedId:b=>c.setState("selectedId",b),select:b=>{c.setState("selectedId",b),f.move(b)}})}function te(s,n,o){e.useUpdateEffect(n,[o.composite,o.combobox]),s=k.useCompositeStoreProps(s,n,o),d.useStoreProps(s,o,"selectedId","setSelectedId"),d.useStoreProps(s,o,"selectOnMove");const[t,r]=d.useStore(()=>s.panels,{});return e.useUpdateEffect(r,[s,r]),Object.assign(m.useMemo(()=>e.__spreadProps(e.__spreadValues({},s),{panels:t}),[s,t]),{composite:o.composite,combobox:o.combobox})}function se(s={}){const n=Z.useComboboxContext(),o=X()||n;s=e.__spreadProps(e.__spreadValues({},s),{composite:s.composite!==void 0?s.composite:o,combobox:s.combobox!==void 0?s.combobox:n});const[t,r]=d.useStore(ee,s);return te(t,r,s)}var A=e.createStoreContext([$.CompositeContextProvider],[$.CompositeScopedContextProvider]),oe=A.useScopedContext,D=A.useProviderContext,H=A.ScopedContextProvider,ne="button",re=e.createHook(function(n){var o=n,{store:t,getItem:r}=o,a=e.__objRest(o,["store","getItem"]),v;const u=oe();t=t||u,e.invariant(t,process.env.NODE_ENV!=="production"&&"Tab must be wrapped in a TabList component.");const f=e.useId(),i=a.id||f,g=e.disabledFromProps(a),c=m.useCallback(_=>{const y=e.__spreadProps(e.__spreadValues({},_),{dimmed:g});return r?r(y):y},[g,r]),S=a.onClick,P=e.useEvent(_=>{S==null||S(_),!_.defaultPrevented&&(t==null||t.setSelectedId(i))}),b=t.panels.useState(_=>{var y;return(y=_.items.find(l=>l.tabId===i))==null?void 0:y.id}),I=f?a.shouldRegisterItem:!1,h=t.useState(_=>!!i&&_.activeId===i),x=t.useState(_=>!!i&&_.selectedId===i),E=t.useState(_=>!!t.item(_.activeId)),T=h||x&&!E,R=x||((v=a.accessibleWhenDisabled)!=null?v:!0);if(d.useStoreState(t.combobox||t.composite,"virtualFocus")&&(a=e.__spreadProps(e.__spreadValues({},a),{tabIndex:-1})),a=e.__spreadProps(e.__spreadValues({id:i,role:"tab","aria-selected":x,"aria-controls":b||void 0},a),{onClick:P}),t.composite){const _={id:i,accessibleWhenDisabled:R,store:t.composite,shouldRegisterItem:T&&I,rowId:a.rowId,render:a.render};a=e.__spreadProps(e.__spreadValues({},a),{render:e.jsxRuntimeExports.jsx($.CompositeItem,e.__spreadProps(e.__spreadValues({},_),{render:t.combobox&&t.composite!==t.combobox?e.jsxRuntimeExports.jsx($.CompositeItem,e.__spreadProps(e.__spreadValues({},_),{store:t.combobox})):_.render}))})}return a=$.useCompositeItem(e.__spreadProps(e.__spreadValues({store:t},a),{accessibleWhenDisabled:R,getItem:c,shouldRegisterItem:I})),a}),ae=e.memo2(e.forwardRef2(function(n){const o=re(n);return e.createElement(ne,o)})),ie="div",ce=e.createHook(function(n){var o=n,{store:t}=o,r=e.__objRest(o,["store"]);const a=D();t=t||a,e.invariant(t,process.env.NODE_ENV!=="production"&&"TabList must receive a `store` prop or be wrapped in a TabProvider component.");const v=t.useState(u=>u.orientation==="both"?void 0:u.orientation);return r=e.useWrapElement(r,u=>e.jsxRuntimeExports.jsx(H,{value:t,children:u}),[t]),t.composite&&(r=e.__spreadValues({focusable:!1},r)),r=e.__spreadValues({role:"tablist","aria-orientation":v},r),r=k.useComposite(e.__spreadValues({store:t},r)),r}),ue=e.forwardRef2(function(n){const o=ce(n);return e.createElement(ie,o)}),le="div",de=e.createHook(function(n){var o=n,{store:t,unmountOnHide:r,tabId:a,getItem:v,scrollRestoration:u,scrollElement:f}=o,i=e.__objRest(o,["store","unmountOnHide","tabId","getItem","scrollRestoration","scrollElement"]);const g=D();t=t||g,e.invariant(t,process.env.NODE_ENV!=="production"&&"TabPanel must receive a `store` prop or be wrapped in a TabProvider component.");const c=m.useRef(null),S=e.useId(i.id),P=d.useStoreState(t.panels,()=>{var l;return a||((l=t==null?void 0:t.panels.item(S))==null?void 0:l.tabId)}),b=d.useStoreState(t,l=>!!P&&l.selectedId===P),I=O.useDisclosureStore({open:b}),h=d.useStoreState(I,"mounted"),x=m.useRef(new Map),E=e.useEvent(()=>{const l=c.current;return l?f?typeof f=="function"?f(l):"current"in f?f.current:f:l:null});m.useEffect(()=>{var l,V;if(!u||!h)return;const C=E();if(!C)return;if(u==="reset"){C.scroll(0,0);return}if(!P)return;const w=x.current.get(P);C.scroll((l=w==null?void 0:w.x)!=null?l:0,(V=w==null?void 0:w.y)!=null?V:0);const N=()=>{x.current.set(P,{x:C.scrollLeft,y:C.scrollTop})};return C.addEventListener("scroll",N),()=>{C.removeEventListener("scroll",N)}},[u,h,P,E,t]);const[T,R]=m.useState(!1);m.useEffect(()=>{const l=c.current;if(!l)return;const V=e.getAllTabbableIn(l);R(!!V.length)},[]);const L=m.useCallback(l=>{const V=e.__spreadProps(e.__spreadValues({},l),{id:S||l.id,tabId:a});return v?v(V):V},[S,a,v]),_=i.onKeyDown,y=e.useEvent(l=>{if(_==null||_(l),l.defaultPrevented||!(t!=null&&t.composite))return;const C={ArrowLeft:t.previous,ArrowRight:t.next,Home:t.first,End:t.last}[l.key];if(!C)return;const{selectedId:w}=t.getState(),N=C({activeId:w});N&&(l.preventDefault(),t.move(N))});return i=e.useWrapElement(i,l=>e.jsxRuntimeExports.jsx(H,{value:t,children:l}),[t]),i=e.__spreadProps(e.__spreadValues({id:S,role:"tabpanel","aria-labelledby":P||void 0},i),{children:r&&!h?null:i.children,ref:e.useMergeRefs(c,i.ref),onKeyDown:y}),i=e.useFocusable(e.__spreadValues({focusable:!t.composite&&!T},i)),i=O.useDisclosureContent(e.__spreadValues({store:I},i)),i=$.useCollectionItem(e.__spreadProps(e.__spreadValues({store:t.panels},i),{getItem:L})),i}),pe=e.forwardRef2(function(n){const o=de(n);return e.createElement(le,o)});function B(s){var n=m.Children.toArray(s);return n.reduce(function(o,t){return t.type===m.Fragment?o.concat(B(t.props.children)):(o.push(t),o)},[])}const me=p(ue)(({size:s})=>p.css`
|
|
2
|
-
position: relative;
|
|
3
|
-
width: 100%;
|
|
4
|
-
overflow-x: auto;
|
|
5
|
-
display: flex;
|
|
6
|
-
border: 0;
|
|
7
|
-
gap: xl;
|
|
8
|
-
|
|
9
|
-
&[aria-orientation='vertical'] {
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
${p.th("tabs.tabsBorder.vertical")};
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
${p.th("tabs.tabsBorder.horizontal")};
|
|
15
|
-
|
|
16
|
-
${F} {
|
|
17
|
-
${p.th(`tabs.item.size.${s}`)}
|
|
18
|
-
}
|
|
19
|
-
${p.system};
|
|
20
|
-
`),F=p.button`
|
|
21
|
-
border: 0;
|
|
22
|
-
background: none;
|
|
23
|
-
${p.th("tabs.item.default")};
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
flex: none;
|
|
27
|
-
padding: md 0;
|
|
28
|
-
transition: medium;
|
|
29
|
-
text-transform: none;
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
gap: sm;
|
|
32
|
-
|
|
33
|
-
&:focus {
|
|
34
|
-
outline: none !important; /* important for firefox */
|
|
35
|
-
|
|
36
|
-
&:not([aria-selected='true']) {
|
|
37
|
-
${p.th("tabs.item.focus")};
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&[aria-selected='true'] {
|
|
42
|
-
${p.th("tabs.item.active")};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&[aria-disabled='true'] {
|
|
46
|
-
${p.th("tabs.item.disabled")};
|
|
47
|
-
cursor: auto;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&:hover:not([aria-selected='true']):not([aria-disabled='true']) {
|
|
51
|
-
${p.th("tabs.item.focus")};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
& > svg,
|
|
55
|
-
img {
|
|
56
|
-
${p.th("tabs.icon")};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
& > span {
|
|
60
|
-
${p.th("tabs.badge")};
|
|
61
|
-
}
|
|
62
|
-
`,fe=p(pe)(({orientation:s})=>p.css`
|
|
63
|
-
${s==="vertical"?p.th("tabs.panel.vertical"):p.th("tabs.panel.horizontal")};
|
|
64
|
-
`),be=({offset:s=0,size:n=0})=>p.css`
|
|
65
|
-
${p.th("tabs.activeBar.horizontal")};
|
|
66
|
-
left: 0;
|
|
67
|
-
bottom: 0;
|
|
68
|
-
width: ${n}px;
|
|
69
|
-
transform: translateX(${s}px);
|
|
70
|
-
`,ve=({offset:s=0,size:n=0})=>p.css`
|
|
71
|
-
${p.th("tabs.activeBar.vertical")};
|
|
72
|
-
right: 0;
|
|
73
|
-
top: 0;
|
|
74
|
-
height: ${n}px;
|
|
75
|
-
transform: translateY(${s}px);
|
|
76
|
-
`,_e=p.span(({orientation:s,...n})=>p.css`
|
|
77
|
-
position: absolute;
|
|
78
|
-
${s==="vertical"?ve(n):be(n)}
|
|
79
|
-
will-change: width, transform;
|
|
80
|
-
transition: medium;
|
|
81
|
-
transition-property: transform, width;
|
|
82
|
-
`),z=s=>{if(!s||typeof window>"u")return 1;const n=Number(window.getComputedStyle(s).scale);return isNaN(n)?z(s.parentElement):n};function Ie(s,n,o){const[t,r]=m.useState({}),{height:a,width:v}=Q.useViewportSize();return U.useIsomorphicLayoutEffect(()=>{const u=s.current;if(!u||!n)return;const f=u.getBoundingClientRect(),i=n.getBoundingClientRect(),g=z(u);if(o==="vertical"){const c=i.top-f.top,S=i.height;r({size:S,offset:c,orientation:o})}else{const c=(i.left-f.left+u.scrollLeft)/g,S=i.width/g;r({size:isNaN(S)?0:S,offset:isNaN(c)?0:c,orientation:o})}},[s,n,v,a,o]),t}const W=({activeTab:s,listRef:n,orientation:o})=>{const t=Ie(n,s,o);return m.createElement(_e,{...t})};W.displayName="ActiveBar";const Se=B.default||B;function he(s,n){const[o,t]=m.useState(null);return[Se(n).map(a=>a.props.id===s?m.cloneElement(a,{ref:t}):a),o]}const K=j.forwardRef(({children:s,size:n="md",store:o,...t},r)=>{const a=m.useRef(),v=Y.useForkRef(r,a),{orientation:u,selectedId:f}=o.useState(),[i,g]=he(f,s);return m.createElement(me,{orientation:u,ref:v,size:n,store:o,...t},i,i.length>1&&m.createElement(W,{activeTab:g,listRef:a,orientation:u}))});K.displayName="TabList";const J=j.forwardRef(({children:s,store:n,tabId:o,...t},r)=>{const a=n.useState("orientation");return m.createElement(fe,{orientation:a,ref:r,store:n,tabId:o,...t},s)});J.displayName="TabPanel";const M=j.forwardRef(({as:s,children:n,id:o,store:t,...r},a)=>m.createElement(ae,{id:o,render:v=>m.createElement(F,{as:s,...v,ref:a}),store:t,...r},n));M.displayName="Tab";const xe=Object.assign(M,{List:K,Panel:J});function Pe(s){return se(s)}exports.Tab=xe;exports.TabComponent=M;exports.useTab=Pe;
|
package/dist/Tag.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),v=require("./wrap-children-BLDjJiiy.js"),t=require("@xstyled/styled-components"),d=require("./overflow-ellipsis-C2ESrF8C.js"),h=require("./get-max-width-height-CDLBnp_J.js"),S=require("./Icon.js"),w=require("./System.js"),q=require("./index-C1FV1q-F.js"),C=(s,e,n)=>t.css`
|
|
2
|
-
${t.th(`tags.shape.${s}`)}
|
|
3
|
-
padding: 0;
|
|
4
|
-
${(e||n)&&t.css`
|
|
5
|
-
width: ${h.getMax(e||"0",n)};
|
|
6
|
-
height: ${h.getMax(e||"0",n)};
|
|
7
|
-
`}
|
|
8
|
-
`,g=t.div.withConfig({shouldForwardProp:s=>!["hasClickAction","hasLink","hasRemoveAction"].includes(s)})(({h:s,hasClickAction:e,hasLink:n,hasRemoveAction:r,length:o,size:i,variant:a,w:c})=>t.css`
|
|
9
|
-
${t.th("tags.default")};
|
|
10
|
-
${t.th(`tags.variants.${a}`)};
|
|
11
|
-
${t.th(`tags.sizes.${i}`)}
|
|
12
|
-
position: relative;
|
|
13
|
-
display: inline-flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
line-height: initial; /* avoid cropped font */
|
|
17
|
-
transition: medium;
|
|
18
|
-
max-width: 100%;
|
|
19
|
-
${d.overflowEllipsis}
|
|
20
|
-
${t.system}
|
|
21
|
-
${o!==1&&t.css`
|
|
22
|
-
span,
|
|
23
|
-
p {
|
|
24
|
-
${d.overflowEllipsis}
|
|
25
|
-
}
|
|
26
|
-
`}
|
|
27
|
-
${o===1&&t.css`
|
|
28
|
-
justify-content: center;
|
|
29
|
-
${C(i,c,s)};
|
|
30
|
-
`};
|
|
31
|
-
|
|
32
|
-
${(n||e)&&t.css`
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
text-decoration: none;
|
|
35
|
-
|
|
36
|
-
&:hover,
|
|
37
|
-
&:focus {
|
|
38
|
-
${t.th(`tags.hover.${a}`)};
|
|
39
|
-
}
|
|
40
|
-
`};
|
|
41
|
-
|
|
42
|
-
${r&&t.css`
|
|
43
|
-
padding-right: xl;
|
|
44
|
-
`}
|
|
45
|
-
|
|
46
|
-
> *:not(:last-child) {
|
|
47
|
-
margin-right: xxs;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
& > svg {
|
|
51
|
-
width: ${t.th(`tags.icon.${i}`)};
|
|
52
|
-
height: ${t.th(`tags.icon.${i}`)};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
> *:not(:only-child) {
|
|
56
|
-
${S.StyledIcon}:last-child {
|
|
57
|
-
opacity: 1;
|
|
58
|
-
transition: opacity ${t.th.transition("medium")};
|
|
59
|
-
cursor: pointer;
|
|
60
|
-
|
|
61
|
-
&:hover {
|
|
62
|
-
opacity: 0.7;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
`),b=t.divBox(({size:s})=>t.css`
|
|
67
|
-
position: absolute;
|
|
68
|
-
${t.th(`tags.sizes.${s}`)};
|
|
69
|
-
top: 0;
|
|
70
|
-
bottom: 0;
|
|
71
|
-
right: 0;
|
|
72
|
-
display: flex;
|
|
73
|
-
align-items: center;
|
|
74
|
-
justify-content: center;
|
|
75
|
-
`),E=t.buttonBox`
|
|
76
|
-
all: unset;
|
|
77
|
-
display: flex;
|
|
78
|
-
`,u=w.forwardRef(({as:s,children:e,dataTestId:n,href:r,onClick:o,onRemove:i,size:a="md",to:c,variant:p="default",...$},y)=>{const m=v.wrapChildren(e),f=!!(e||e===0)&&["number","string"].includes(typeof e)?e.toString().length:void 0,x=!!r||!!c;return l.createElement(g,{as:s,"data-testid":n,hasClickAction:!!o,hasLink:x,hasRemoveAction:!!i,href:r,length:f,onClick:o,ref:y,size:a,to:c,variant:p,...$},m,!!i&&l.createElement(b,{size:a},l.createElement(E,{onClick:i,title:"Remove",type:"button"},l.createElement(q.CrossIcon,{size:"xs",title:"Remove"}))))});u.displayName="Tag";const T=g;exports.StyledTag=T;exports.Tag=u;
|
package/dist/Text.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),s=require("@xstyled/styled-components"),b=require("./System.js"),p={h0:"h1",h1:"h2",h2:"h3",h3:"h4",h4:"h5",h5:"h6",h6:"h6"},f=e=>s.css`
|
|
2
|
-
/* stylelint-disable-next-line value-no-vendor-prefix */
|
|
3
|
-
display: -webkit-box;
|
|
4
|
-
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
5
|
-
-webkit-box-orient: vertical;
|
|
6
|
-
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
7
|
-
-webkit-line-clamp: ${e||"none"};
|
|
8
|
-
line-height: normal;
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
word-break: ${e===1?"break-all":null};
|
|
11
|
-
`,x=s.p(({lines:e,theme:l,variant:t,withDash:o})=>{const n=p[t],h=t==null?void 0:t.startsWith("h"),i=e&&e!==1/0&&t.startsWith("h")&&l.fonts.headings.includes("welcome-font");return s.css`
|
|
12
|
-
${s.th(`texts.${n||t}`)};
|
|
13
|
-
|
|
14
|
-
/* Start fallback for non-webkit */
|
|
15
|
-
display: block;
|
|
16
|
-
${e&&e!==1/0&&f(e)};
|
|
17
|
-
/* End fallback for non-webkit */
|
|
18
|
-
|
|
19
|
-
${o&&h&&s.css`
|
|
20
|
-
display: flex;
|
|
21
|
-
|
|
22
|
-
&:before {
|
|
23
|
-
content: '';
|
|
24
|
-
width: 16;
|
|
25
|
-
height: 4;
|
|
26
|
-
display: flex;
|
|
27
|
-
align-self: center;
|
|
28
|
-
flex-shrink: 0;
|
|
29
|
-
background-color: primary-40;
|
|
30
|
-
margin-right: md;
|
|
31
|
-
}
|
|
32
|
-
`}
|
|
33
|
-
|
|
34
|
-
@media (min-width: lg) {
|
|
35
|
-
${s.th(`texts.${t}`)};
|
|
36
|
-
${s.system};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
${i&&s.css`
|
|
40
|
-
& {
|
|
41
|
-
line-height: 1.4;
|
|
42
|
-
}
|
|
43
|
-
`}
|
|
44
|
-
|
|
45
|
-
${s.system};
|
|
46
|
-
`}),y={h0:"h1",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",lg:"p",md:"p",sm:"p",xs:"p","subtitle-md":"span","subtitle-sm":"span"},r=b.forwardRef(({as:e,children:l,dataTestId:t,lines:o,variant:n="md",withDash:h,...i},c)=>{const d=e||y[n],a=i.className||"";return m.createElement(x,{as:d,"data-testid":t,lines:o,ref:c,variant:n,withDash:h,...i,className:`${a} wui-text`},l)});r.displayName="Text";exports.Text=r;
|
package/dist/Textarea.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),e=require("@xstyled/styled-components"),T=require("./field-styles-DYEc1l_A.js"),a=require("./System.js"),p=e("textarea").withConfig({shouldForwardProp:a.shouldForwardProp})(({size:t,variant:r})=>e.css`
|
|
2
|
-
${T.defaultFieldStyles({size:t,variant:r})};
|
|
3
|
-
${e.th("textareas")};
|
|
4
|
-
line-height: lg;
|
|
5
|
-
${e.system};
|
|
6
|
-
`),s=a.forwardRef(({autoFocus:t,dataTestId:r,disabled:o,maxLength:i,minRows:l=5,name:d,onBlur:c,onChange:n,onFocus:u,onKeyDown:y,placeholder:f,size:h="md",value:m,variant:x,...g},w)=>S.createElement(p,{autoFocus:t,"data-testid":r,disabled:o,maxLength:i,name:d,onBlur:c,onChange:n,onFocus:u,onKeyDown:y,placeholder:f,ref:w,rows:l,size:h,value:m,variant:x,...g}));s.displayName="Textarea";exports.Textarea=s;
|
package/dist/TimePicker.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),H=require("@xstyled/styled-components"),c=require("./CustomInput-DVH2rh9-.js"),I=require("./System.js"),O=H.div`
|
|
2
|
-
position: relative;
|
|
3
|
-
${c.fixAriaMessageStyle}
|
|
4
|
-
`,S=I.forwardRef(({autoFocus:y,dataTestId:E,dateFormat:k="HH:mm",disabled:P,icon:a,iconPlacement:u="left",onBlur:m,onChange:t,onFocus:n,placeholder:g,popperProps:h,size:d="md",timeIntervals:p=15,transparent:q,value:l=c.DEFAULT_DATE,...f},D)=>{const i=e=>c.getDate(e,p),F=g||f.placeholderText,[R,T]=s.useState(y&&"time"||null),[b,o]=s.useState(i(l));s.useEffect(()=>{t&&t(i(l))},[]),s.useEffect(()=>{var r;const e=i(l);((r=new Date(l))==null?void 0:r.getTime())-(e==null?void 0:e.getTime())!==0&&t&&t(e),o(e)},[l]);const x=e=>{T("time"),n&&n(e)},A=e=>{T(null),m&&m(e)},M=e=>{e.preventDefault(),o(null),t&&t()},N=e=>{if(!e)return;const r=i(e);e.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),o(e),t&&t(new Date(e))};return s.createElement(O,null,s.createElement(c.StyledTimePicker,{calendarClassName:"time-picker-popper",customInput:s.createElement(c.CustomInput,{className:"time-picker","data-testid":E,focused:R,handleBlur:A,handleFocus:x,icon:a,iconPlacement:u,onReset:M,ref:D,size:d}),dateFormat:k,disabled:P,iconPlacement:!!a&&u,onChange:N,placeholderText:F,popperContainer:c.CustomPopper,popperProps:h,selected:b,showTimeSelect:!0,showTimeSelectOnly:!0,size:d,timeIntervals:p,transparent:q,...f,isClearable:!1}))});S.displayName="TimePicker";exports.TimePicker=S;
|