@charcoal-ui/react-sandbox 5.11.0-beta.0 → 5.11.0-beta.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.
- package/dist/index.cjs +120 -120
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +120 -120
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCallback as i,useContext as a,useDebugValue as o,useEffect as s,useLayoutEffect as c,useMemo as l,useReducer as u,useRef as d,useState as f}from"react";import p from"styled-components";import{applyEffect as m,disabledSelector as ee,maxWidth as h}from"@charcoal-ui/utils";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";import{createTheme as y}from"@charcoal-ui/styled";import{COLUMN_UNIT as b,GUTTER_UNIT as x,columnSystem as S}from"@charcoal-ui/foundation";import te from"react-dom";import{animated as C,useSpring as ne}from"@react-spring/web";import w from"warning";var T=Object.defineProperty,E=Object.getOwnPropertyDescriptor,D=Object.getOwnPropertyNames,O=Object.prototype.hasOwnProperty,k=(e,t)=>{let n={};for(var r in e)T(n,r,{get:e[r],enumerable:!0});return t||T(n,Symbol.toStringTag,{value:`Module`}),n},A=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=D(t),a=0,o=i.length,s;a<o;a++)s=i[a],!O.call(e,s)&&s!==n&&T(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=E(t,s))||r.enumerable});return e},
|
|
2
|
+
import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCallback as i,useContext as a,useDebugValue as o,useEffect as s,useLayoutEffect as c,useMemo as l,useReducer as u,useRef as d,useState as f}from"react";import p from"styled-components";import{applyEffect as m,disabledSelector as ee,maxWidth as h}from"@charcoal-ui/utils";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";import{createTheme as y}from"@charcoal-ui/styled";import{COLUMN_UNIT as b,GUTTER_UNIT as x,columnSystem as S}from"@charcoal-ui/foundation";import te from"react-dom";import{animated as C,useSpring as ne}from"@react-spring/web";import w from"warning";var T=Object.defineProperty,E=Object.getOwnPropertyDescriptor,D=Object.getOwnPropertyNames,O=Object.prototype.hasOwnProperty,k=(e,t)=>{let n={};for(var r in e)T(n,r,{get:e[r],enumerable:!0});return t||T(n,Symbol.toStringTag,{value:`Module`}),n},A=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=D(t),a=0,o=i.length,s;a<o;a++)s=i[a],!O.call(e,s)&&s!==n&&T(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=E(t,s))||r.enumerable});return e},j=(e,t,n)=>(A(e,t,`default`),n&&A(n,t,`default`)),M=k({default:()=>P});import*as N from"styled-components";j(M,N);const P=typeof p==`function`?p:p.default,F={Link:e.forwardRef(function({to:e,children:t,...n},r){return _(`a`,{href:e,ref:r,...n,children:t})})},I=e.createContext(F);function re({children:e,components:t}){return _(I.Provider,{value:{...F,...t},children:e})}function L(){return a(I)}const ie=e.forwardRef(function({onClick:e,children:t,active:n=!1,hover:r,reactive:i=!1},a){return _(le,{active:n,reactive:i,hover:r,onClick:n&&!i?void 0:e,ref:a,children:t})}),ae=e.forwardRef(function({onClick:e,children:t,active:n=!1,hover:r,reactive:i=!1,width:a,height:o},s){return _(de,{active:n,reactive:i,hover:r,onClick:n&&!i?void 0:e,ref:s,buttonWidth:a,buttonHeight:o,children:t})}),oe=e.forwardRef(function({onClick:e,children:t,active:n=!1,hover:r,reactive:i=!1,...a},o){let{Link:s}=L();return n&&!i?_(ue,{active:!0,hover:r,ref:o,children:t}):_(s,{...a,onClick:e,children:_(ue,{active:n,reactive:i,hover:r,ref:o,children:t})})}),se=M.css`
|
|
3
3
|
display: block;
|
|
4
4
|
outline: none;
|
|
5
5
|
border: none;
|
|
@@ -18,39 +18,39 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
18
18
|
color: ${({theme:e})=>e.color.text2};
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
${({hover:e=!1})=>e&&
|
|
21
|
+
${({hover:e=!1})=>e&&M.css`
|
|
22
22
|
color: ${({theme:e})=>e.color.text2};
|
|
23
23
|
`}
|
|
24
24
|
|
|
25
|
-
${({active:e=!1})=>e&&
|
|
25
|
+
${({active:e=!1})=>e&&M.css`
|
|
26
26
|
background-color: ${({theme:e})=>e.color.surface3};
|
|
27
27
|
color: ${({theme:e})=>e.color.text2};
|
|
28
28
|
`}
|
|
29
29
|
|
|
30
|
-
${({active:e=!1,reactive:t=!1})=>e&&!t&&
|
|
30
|
+
${({active:e=!1,reactive:t=!1})=>e&&!t&&M.css`
|
|
31
31
|
cursor: default;
|
|
32
32
|
`}
|
|
33
33
|
|
|
34
34
|
@media ${({theme:e})=>h(e.breakpoint.screen1)} {
|
|
35
35
|
padding: 5px 16px;
|
|
36
36
|
}
|
|
37
|
-
`,
|
|
37
|
+
`,ce=M.css`
|
|
38
38
|
padding: 0;
|
|
39
39
|
|
|
40
40
|
@media ${({theme:e})=>h(e.breakpoint.screen1)} {
|
|
41
41
|
padding: 0;
|
|
42
42
|
}
|
|
43
|
-
`,
|
|
44
|
-
${
|
|
45
|
-
`,
|
|
46
|
-
${
|
|
47
|
-
`,
|
|
48
|
-
${
|
|
43
|
+
`,le=P.button`
|
|
44
|
+
${se}
|
|
45
|
+
`,ue=P.span`
|
|
46
|
+
${se}
|
|
47
|
+
`,de=P(le)`
|
|
48
|
+
${ce};
|
|
49
49
|
${e=>e.buttonWidth!==void 0&&`width: ${e.buttonWidth}px;`}
|
|
50
50
|
${e=>e.buttonHeight!==void 0&&`height: ${e.buttonHeight}px;`}
|
|
51
|
-
`,
|
|
51
|
+
`,fe=P.div`
|
|
52
52
|
display: flex;
|
|
53
|
-
`,
|
|
53
|
+
`,R=y(P);function pe({size:e=24,viewBoxSize:t,currentColor:n,path:r,transform:i,fillRule:a,clipRule:o}){return _(me,{viewBox:`0 0 ${t} ${t}`,size:e,currentColor:n,children:_(he,{path:r,transform:i,fillRule:a,clipRule:o})})}const me=P.svg`
|
|
54
54
|
stroke: none;
|
|
55
55
|
fill: ${({currentColor:e=!1,theme:t})=>e?`currentColor`:t.color.text2};
|
|
56
56
|
width: ${e=>e.size}px;
|
|
@@ -58,39 +58,39 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
58
58
|
line-height: 0;
|
|
59
59
|
font-size: 0;
|
|
60
60
|
vertical-align: middle;
|
|
61
|
-
`,
|
|
62
|
-
0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16Z`}),_(
|
|
61
|
+
`,he=({path:e,transform:t,fillRule:n,clipRule:r})=>typeof e==`string`?_(`path`,{d:e,transform:t,fillRule:n,clipRule:r}):_(g,{children:e});function ge(){return _(pe,{viewBoxSize:16,size:16,currentColor:!0,path:v(g,{children:[_(`path`,{d:`M8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183
|
|
62
|
+
0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16Z`}),_(_e,{d:`M14 8C14 11.3137 11.3137 14 8 14C4.68629 14 2 11.3137 2 8C2 4.68629
|
|
63
63
|
4.68629 2 8 2C11.3137 2 14 4.68629 14 8ZM8 6.25C8.69036 6.25 9.25 5.69036
|
|
64
64
|
9.25 5C9.25 4.30964 8.69036 3.75 8 3.75C7.30964 3.75 6.75 4.30964 6.75
|
|
65
65
|
5C6.75 5.69036 7.30964 6.25 8 6.25ZM7 7.75V11.25C7 11.8023 7.44772 12.25
|
|
66
66
|
8 12.25C8.55228 12.25 9 11.8023 9 11.25V7.75C9 7.19772 8.55228 6.75 8
|
|
67
|
-
6.75C7.44772 6.75 7 7.19772 7 7.75Z`})]})})}const
|
|
67
|
+
6.75C7.44772 6.75 7 7.19772 7 7.75Z`})]})})}const _e=P.path`
|
|
68
68
|
fill: ${({theme:e})=>e.color.surface1};
|
|
69
69
|
fill-rule: evenodd;
|
|
70
|
-
`;function
|
|
71
|
-
${e=>
|
|
70
|
+
`;function ve({children:e,context:t,className:n}){return v(ye,{className:n,...Se({children:e,context:t,className:n}),children:[_(be,{children:_(ge,{})}),_(xe,{children:e})]})}const ye=P.div`
|
|
71
|
+
${e=>R(t=>[t.bg.surface3,t.borderRadius(8),t.padding.vertical(e.default.vertical),t.padding.horizontal(e.default.horizontal)])}
|
|
72
72
|
|
|
73
73
|
@media ${({theme:e})=>h(e.breakpoint.screen1)} {
|
|
74
|
-
${e=>
|
|
74
|
+
${e=>R(t=>[t.padding.vertical(e.screen1.vertical),t.padding.horizontal(e.screen1.horizontal)])}
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
display: flex;
|
|
78
78
|
align-items: flex-start;
|
|
79
|
-
${e=>e.context===`page`&&
|
|
79
|
+
${e=>e.context===`page`&&M.css`
|
|
80
80
|
justify-content: center;
|
|
81
81
|
`}
|
|
82
|
-
`,
|
|
82
|
+
`,be=P.div`
|
|
83
83
|
display: flex;
|
|
84
84
|
align-items: center;
|
|
85
85
|
color: ${e=>e.theme.color.text4};
|
|
86
86
|
height: 22px;
|
|
87
87
|
margin: -4px 4px -4px 0;
|
|
88
|
-
`,
|
|
89
|
-
${
|
|
88
|
+
`,xe=P.p`
|
|
89
|
+
${R(e=>[e.font.text2,e.typography(14)])}
|
|
90
90
|
margin: 0;
|
|
91
91
|
min-width: 0;
|
|
92
92
|
overflow-wrap: break-word;
|
|
93
|
-
`;function
|
|
93
|
+
`;function Se(e){return{...e,...Ce(e.context)}}function Ce(e){switch(e){case`page`:return{default:{horizontal:40,vertical:24},screen1:{horizontal:16,vertical:16}};case`section`:return{default:{horizontal:16,vertical:16},screen1:{horizontal:16,vertical:16}}}}const we=72,Te=S(2,b,x)+x,Ee=S(12,b,x);function De(){return Oe(h((0,M.useTheme)().breakpoint.screen1))}function Oe(e){let t=l(()=>__TEST__?{matches:!1,addListener:()=>{},removeListener:()=>{}}:matchMedia(e),[e]),[n,r]=f(t.matches);t.matches!==n&&r(t.matches);let i=e=>{try{te.flushSync(()=>{r(e.matches)})}catch{r(e.matches)}};return c(()=>(t.addListener(i),r(t.matches),()=>{t.removeListener(i)}),[t]),o(`${e}: ${n.toString()}`),n}function ke(e){return e===null?void 0:e.getBoundingClientRect()}function Ae(e,t=[]){let[n,r]=u((e,t)=>e===void 0||t===void 0?t:e.height===t.height&&e.width===t.width?e:t,void 0),[i,a]=f(null);return c(()=>{if(i===null)return;let e=new ResizeObserver(()=>{r(ke(i))});return e.observe(i),()=>{e.unobserve(i),r(void 0)}},[i]),c(()=>{e.current!==i&&a(e.current)}),c(()=>{t.length>0&&r(ke(e.current))},t),o(n),n}function je(e){let[t,n]=f(e),r=d(void 0);return[t,i((e,t=!1)=>{if(t){n(e);return}r.current===void 0&&(r.current=requestAnimationFrame(()=>{n(e),r.current!==void 0&&(r.current=void 0)}))},[])]}const z=e.createContext({wide:!1,center:!1,withLeft:!1});function Me({menu:e,children:t,header:n,center:r=!1,wide:i,isHeaderTopMenu:a=!1}){let o={center:r,wide:r?!0:i??!1,withLeft:e!=null&&!a};return v(Fe,{children:[v(z.Provider,{value:o,children:[o.withLeft&&_(Ie,{children:e}),v(Le,{center:r,children:[n!=null&&_(Re,{children:n}),a&&_(Ne,{children:e}),_(ze,{children:t})]})]}),_(Pe,{})]})}const Ne=P.div`
|
|
94
94
|
margin-bottom: 40px;
|
|
95
95
|
overflow-x: auto;
|
|
96
96
|
word-break: keep-all;
|
|
@@ -101,7 +101,7 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
101
101
|
padding-bottom: 16px;
|
|
102
102
|
background-color: ${({theme:e})=>e.color.surface2};
|
|
103
103
|
}
|
|
104
|
-
`,
|
|
104
|
+
`,Pe=M.createGlobalStyle`
|
|
105
105
|
:root {
|
|
106
106
|
background-color: ${({theme:e})=>e.color.background2};
|
|
107
107
|
|
|
@@ -109,26 +109,26 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
109
109
|
background-color: ${({theme:e})=>e.color.background1};
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
`,
|
|
112
|
+
`,Fe=P.div`
|
|
113
113
|
display: flex;
|
|
114
114
|
background-color: ${({theme:e})=>e.color.background2};
|
|
115
115
|
|
|
116
116
|
@media ${({theme:e})=>h(e.breakpoint.screen1)} {
|
|
117
117
|
background-color: ${({theme:e})=>e.color.background1};
|
|
118
118
|
}
|
|
119
|
-
`,
|
|
120
|
-
min-width: ${
|
|
119
|
+
`,Ie=P.div`
|
|
120
|
+
min-width: ${Te}px;
|
|
121
121
|
padding: 40px 0 40px ${x}px;
|
|
122
122
|
box-sizing: border-box;
|
|
123
123
|
|
|
124
124
|
@media ${({theme:e})=>e.breakpoint.screen3} {
|
|
125
125
|
display: none;
|
|
126
126
|
}
|
|
127
|
-
`,
|
|
127
|
+
`,Le=P.div`
|
|
128
128
|
flex-grow: 1;
|
|
129
129
|
/* https://www.w3.org/TR/css-flexbox-1/#min-size-auto */
|
|
130
130
|
min-width: 0;
|
|
131
|
-
max-width: ${e=>e.center?S(6,b,x):
|
|
131
|
+
max-width: ${e=>e.center?S(6,b,x):Ee}px;
|
|
132
132
|
padding: 40px ${72}px;
|
|
133
133
|
margin: 0 auto;
|
|
134
134
|
display: flex;
|
|
@@ -137,7 +137,7 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
137
137
|
@media ${({theme:e})=>h(e.breakpoint.screen1)} {
|
|
138
138
|
padding: 0;
|
|
139
139
|
}
|
|
140
|
-
`,
|
|
140
|
+
`,Re=P.div`
|
|
141
141
|
font-weight: bold;
|
|
142
142
|
margin-bottom: 12px;
|
|
143
143
|
font-size: 20px;
|
|
@@ -153,7 +153,7 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
153
153
|
justify-content: center;
|
|
154
154
|
background-color: ${({theme:e})=>e.color.surface2};
|
|
155
155
|
}
|
|
156
|
-
`,
|
|
156
|
+
`,ze=P.div`
|
|
157
157
|
display: grid;
|
|
158
158
|
gap: ${x}px;
|
|
159
159
|
grid-template-columns: 1fr;
|
|
@@ -165,7 +165,7 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
165
165
|
background-color: ${({theme:e})=>e.color.background1};
|
|
166
166
|
padding-bottom: 60px;
|
|
167
167
|
}
|
|
168
|
-
`,
|
|
168
|
+
`,Be=e.forwardRef(function({span:e,children:t},n){let{withLeft:r}=a(z);return _(Ve,{span:e,withLeft:r,ref:n,children:t})}),Ve=P.div`
|
|
169
169
|
grid-column-start: auto;
|
|
170
170
|
grid-column-end: span ${e=>e.span};
|
|
171
171
|
border-radius: 24px;
|
|
@@ -175,20 +175,20 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
175
175
|
min-width: 0;
|
|
176
176
|
|
|
177
177
|
@media ${e=>e.withLeft?e.theme.breakpoint.screen4:e.theme.breakpoint.screen3} {
|
|
178
|
-
${e=>e.span>2&&
|
|
178
|
+
${e=>e.span>2&&M.css`
|
|
179
179
|
grid-column-end: span 2;
|
|
180
180
|
`}
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
@media ${({theme:e})=>h(e.breakpoint.screen1)} {
|
|
184
|
-
${e=>e.span>1&&
|
|
184
|
+
${e=>e.span>1&&M.css`
|
|
185
185
|
grid-column-end: span 1;
|
|
186
186
|
`}
|
|
187
187
|
|
|
188
188
|
border-radius: 0;
|
|
189
189
|
padding-bottom: 40px;
|
|
190
190
|
}
|
|
191
|
-
`;function
|
|
191
|
+
`;function He({children:e}){let{wide:t,center:n}=a(z);return _(Ue,{wide:t,center:n,children:e})}const Ue=P.div`
|
|
192
192
|
padding: 0 ${e=>e.wide?40:24}px;
|
|
193
193
|
height: ${e=>e.wide?64:48}px;
|
|
194
194
|
display: grid;
|
|
@@ -199,7 +199,7 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
199
199
|
background-color: ${({theme:e})=>e.color.surface2};
|
|
200
200
|
color: ${({theme:e})=>e.color.text2};
|
|
201
201
|
border-radius: 24px 24px 0 0;
|
|
202
|
-
${e=>e.center&&
|
|
202
|
+
${e=>e.center&&M.css`
|
|
203
203
|
justify-content: center;
|
|
204
204
|
`}
|
|
205
205
|
|
|
@@ -209,45 +209,45 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
209
209
|
background: none;
|
|
210
210
|
overflow-x: auto;
|
|
211
211
|
border-radius: unset;
|
|
212
|
-
${e=>e.wide&&
|
|
212
|
+
${e=>e.wide&&M.css`
|
|
213
213
|
height: 48px;
|
|
214
214
|
margin-top: 0;
|
|
215
215
|
`}
|
|
216
216
|
}
|
|
217
|
-
`,
|
|
218
|
-
padding: ${e=>e.narrow?`${
|
|
217
|
+
`,B={wide:{x:40,y:40},default:{x:24,y:24},column1:{x:16,y:16},narrow:{x:24,yTop:12,yBottom:20},narrowColumn1:{x:16,yTop:4,yBottom:0}};function We({children:e,horizontal:t=!1,narrow:n=!1}){let{wide:r}=a(z);return _(Ge,{wide:r,horizontal:t,narrow:n,children:e})}const Ge=P.div`
|
|
218
|
+
padding: ${e=>e.narrow?`${B.narrow.yTop}px ${e.horizontal?0:B.narrow.x}px ${B.narrow.yBottom}px`:e.wide?`${e.horizontal?0:B.wide.y}px ${B.wide.x}px`:`${e.horizontal?0:B.default.y}px ${B.default.x}px`};
|
|
219
219
|
|
|
220
220
|
@media ${({theme:e})=>h(e.breakpoint.screen1)} {
|
|
221
|
-
padding: ${e=>e.narrow?`${
|
|
221
|
+
padding: ${e=>e.narrow?`${B.narrowColumn1.yTop}px ${e.horizontal?0:B.narrowColumn1.x}px ${B.narrowColumn1.yBottom}px`:`${B.column1.y}px ${B.column1.x}px 0`};
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
width: 100%;
|
|
225
225
|
box-sizing: border-box;
|
|
226
|
-
`;function
|
|
227
|
-
margin: 0 -${e=>e.wide?
|
|
228
|
-
margin-top: -${({cancelTop:e=!1,wide:t})=>e?t?
|
|
226
|
+
`;function Ke(){let{wide:e}=a(z);return De()?B.column1:e?B.wide:B.default}function qe({children:e,cancelTop:t}){let{wide:n}=a(z);return _(Je,{wide:n,cancelTop:t,children:e})}const Je=P.div`
|
|
227
|
+
margin: 0 -${e=>e.wide?B.wide.x:B.default.x}px;
|
|
228
|
+
margin-top: -${({cancelTop:e=!1,wide:t})=>e?t?B.wide.y:B.default.y:0}px;
|
|
229
229
|
|
|
230
230
|
@media ${({theme:e})=>h(e.breakpoint.screen1)} {
|
|
231
|
-
margin: 0 -${
|
|
232
|
-
margin-top: -${({cancelTop:e=!1})=>e?
|
|
231
|
+
margin: 0 -${B.column1.x}px;
|
|
232
|
+
margin-top: -${({cancelTop:e=!1})=>e?B.column1.x:0}px;
|
|
233
233
|
}
|
|
234
|
-
`,
|
|
234
|
+
`,Ye=e=>n(e)&&!!e.props.children,Xe=e=>e==null||typeof e==`boolean`||JSON.stringify(e)===`{}`?``:e.toString(),Ze=e=>!Array.isArray(e)&&!n(e)?Xe(e):t.toArray(e).reduce((e,t)=>{let r=``;return r=n(t)&&Ye(t)?Ze(t.props.children):n(t)&&!Ye(t)?``:Xe(t),e.concat(r)},``),V=P.div.attrs(({children:e,title:t=Ze(e)})=>({title:t===``?void 0:t}))`
|
|
235
235
|
overflow: hidden;
|
|
236
236
|
line-height: ${e=>e.lineHeight}px;
|
|
237
237
|
/* For english */
|
|
238
238
|
overflow-wrap: break-word;
|
|
239
239
|
|
|
240
|
-
${({lineLimit:e=1,lineHeight:t})=>e===1?
|
|
240
|
+
${({lineLimit:e=1,lineHeight:t})=>e===1?M.css`
|
|
241
241
|
text-overflow: ellipsis;
|
|
242
242
|
white-space: nowrap;
|
|
243
|
-
`:
|
|
243
|
+
`:M.css`
|
|
244
244
|
display: -webkit-box;
|
|
245
245
|
-webkit-box-orient: vertical;
|
|
246
246
|
-webkit-line-clamp: ${e};
|
|
247
247
|
/* Fallback for -webkit-line-clamp */
|
|
248
248
|
max-height: ${t*e}px;
|
|
249
249
|
`}
|
|
250
|
-
|
|
250
|
+
`,Qe=e.createContext({padding:24});function H({primary:e,secondary:t,onClick:n,disabled:r=!1,noHover:i=!1,gtmClass:o,children:s}){let{padding:c}=a(Qe);return v($e,{hasSubLabel:t!==void 0,onClick:e=>!r&&n&&n(e),sidePadding:c,noHover:i,noClick:n===void 0,"aria-disabled":r,role:n===void 0?void 0:`button`,className:o===void 0?void 0:`gtm-${o}`,children:[v(et,{children:[_(tt,{children:_(V,{lineHeight:22,lineLimit:1,children:e})}),t!==void 0&&_(nt,{children:_(V,{lineHeight:22,lineLimit:1,children:t})})]}),s]})}const $e=P.div`
|
|
251
251
|
display: flex;
|
|
252
252
|
height: ${e=>e.hasSubLabel?56:40}px;
|
|
253
253
|
align-items: center;
|
|
@@ -258,12 +258,12 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
258
258
|
transition: 0.2s background-color;
|
|
259
259
|
|
|
260
260
|
&:hover {
|
|
261
|
-
${e=>!e.noHover&&
|
|
261
|
+
${e=>!e.noHover&&M.css`
|
|
262
262
|
background-color: ${({theme:e})=>e.color.surface3};
|
|
263
263
|
`}
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
${
|
|
266
|
+
${R(e=>e.disabled)}
|
|
267
267
|
|
|
268
268
|
${ee} {
|
|
269
269
|
cursor: default;
|
|
@@ -273,42 +273,42 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
273
273
|
background-color: unset;
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
`,
|
|
276
|
+
`,et=P.div`
|
|
277
277
|
display: flex;
|
|
278
278
|
flex-direction: column;
|
|
279
|
-
`,
|
|
279
|
+
`,tt=P.div`
|
|
280
280
|
color: ${e=>e.theme.color.text2};
|
|
281
281
|
line-height: 22px;
|
|
282
282
|
font-size: 14px;
|
|
283
283
|
display: grid;
|
|
284
|
-
`,
|
|
284
|
+
`,nt=P.div`
|
|
285
285
|
color: ${e=>e.theme.color.text3};
|
|
286
286
|
line-height: 18px;
|
|
287
287
|
font-size: 10px;
|
|
288
|
-
`;function
|
|
288
|
+
`;function U({link:e,onClick:t,disabled:n=!1,primary:r,secondary:i,gtmClass:a,noHover:o,children:s,...c}){let{Link:l}=L(),u={disabled:n,primary:r,secondary:i,gtmClass:a,noHover:o,children:s};return n?_(`span`,{onClick:t,children:_(H,{...u})}):_(rt,{as:l,to:e,onClick:t,...c,children:_(H,{onClick:()=>void 0,...u})})}const rt=P.a`
|
|
289
289
|
display: block;
|
|
290
|
-
`;function
|
|
290
|
+
`;function it({icon:e,primary:t,...n}){return _(U,{primary:v(ot,{children:[_(st,{children:e}),t]}),...n})}function at({icon:e,primary:t,...n}){return _(H,{primary:v(ot,{children:[_(st,{children:e}),t]}),...n})}const ot=P.div`
|
|
291
291
|
display: grid;
|
|
292
292
|
gap: 8px;
|
|
293
293
|
grid-auto-flow: column;
|
|
294
294
|
align-items: center;
|
|
295
|
-
`,
|
|
295
|
+
`,st=P.div`
|
|
296
296
|
color: ${({theme:e})=>e.color.text3};
|
|
297
297
|
display: flex;
|
|
298
|
-
`,
|
|
298
|
+
`,ct=P.div`
|
|
299
299
|
height: 24px;
|
|
300
|
-
`,
|
|
300
|
+
`,lt=P.div`
|
|
301
301
|
padding: 0 16px;
|
|
302
302
|
font-size: 12px;
|
|
303
303
|
line-height: 16px;
|
|
304
304
|
color: ${({theme:e})=>e.color.text3};
|
|
305
305
|
margin-top: -2px;
|
|
306
306
|
margin-bottom: 6px;
|
|
307
|
-
`;function
|
|
307
|
+
`;function ut({links:e,active:t}){let{Link:n}=L();return _(ft,{children:e.map((e,r)=>_(n,{to:e.to,children:_(pt,{"aria-current":e.id===t||void 0,children:e.text})},r))})}function dt({links:e}){return _(g,{children:e.map((e,t)=>_(U,{link:e.to,primary:e.text},t))})}const ft=P.div`
|
|
308
308
|
display: flex;
|
|
309
309
|
flex-direction: column;
|
|
310
310
|
align-items: flex-start;
|
|
311
|
-
`,
|
|
311
|
+
`,pt=P.div`
|
|
312
312
|
display: flex;
|
|
313
313
|
align-items: center;
|
|
314
314
|
color: ${({theme:e})=>e.color.text3};
|
|
@@ -327,20 +327,20 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
327
327
|
color: ${({theme:e})=>e.color.text2};
|
|
328
328
|
background-color: ${({theme:e})=>e.color.surface3};
|
|
329
329
|
}
|
|
330
|
-
`;var
|
|
331
|
-
${e=>e.rowReverse?
|
|
330
|
+
`;var mt=e.forwardRef(function({gtmClass:e,flex:t=!1,rowReverse:n=!1,children:r,disabled:i,...a},o){return v(gt,{className:e===void 0?``:`gtm-${e}`,flex:t,rowReverse:n,"aria-disabled":i,children:[v(_t,{children:[_(yt,{...a,disabled:i,ref:o}),_(W,{children:_(vt,{})})]}),r!=null&&_(ht,{rowReverse:n,children:r})]})});const ht=P.span`
|
|
331
|
+
${e=>e.rowReverse?M.css`
|
|
332
332
|
margin-right: 8px;
|
|
333
|
-
`:
|
|
333
|
+
`:M.css`
|
|
334
334
|
margin-left: 8px;
|
|
335
335
|
`}
|
|
336
|
-
`,
|
|
336
|
+
`,gt=P.label`
|
|
337
337
|
display: inline-flex;
|
|
338
338
|
align-items: center;
|
|
339
|
-
${({flex:e})=>e&&
|
|
339
|
+
${({flex:e})=>e&&M.css`
|
|
340
340
|
display: flex;
|
|
341
341
|
justify-content: space-between;
|
|
342
342
|
`}
|
|
343
|
-
${({rowReverse:e})=>
|
|
343
|
+
${({rowReverse:e})=>M.css`
|
|
344
344
|
flex-direction: ${e?`row-reverse`:`row`};
|
|
345
345
|
`}
|
|
346
346
|
cursor: pointer;
|
|
@@ -349,11 +349,11 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
349
349
|
&[aria-disabled='true'] {
|
|
350
350
|
cursor: auto;
|
|
351
351
|
}
|
|
352
|
-
`,
|
|
352
|
+
`,_t=P.span`
|
|
353
353
|
display: inline-flex;
|
|
354
354
|
position: relative;
|
|
355
355
|
z-index: 0;
|
|
356
|
-
`,
|
|
356
|
+
`,W=P.div`
|
|
357
357
|
position: relative;
|
|
358
358
|
box-sizing: border-box;
|
|
359
359
|
width: 28px;
|
|
@@ -364,7 +364,7 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
364
364
|
transition:
|
|
365
365
|
box-shadow 0.2s,
|
|
366
366
|
background-color 0.2s;
|
|
367
|
-
`,
|
|
367
|
+
`,vt=P.div`
|
|
368
368
|
position: absolute;
|
|
369
369
|
display: block;
|
|
370
370
|
top: 0;
|
|
@@ -375,7 +375,7 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
375
375
|
border-radius: 50%;
|
|
376
376
|
transform: translateX(0);
|
|
377
377
|
transition: transform 0.2s;
|
|
378
|
-
`,
|
|
378
|
+
`,yt=P.input.attrs({type:`checkbox`})`
|
|
379
379
|
position: absolute;
|
|
380
380
|
/* NOTE: this is contained by the GraphicCheckboxOuter */
|
|
381
381
|
z-index: 1;
|
|
@@ -391,10 +391,10 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
391
391
|
cursor: pointer;
|
|
392
392
|
|
|
393
393
|
&:checked {
|
|
394
|
-
~ ${
|
|
394
|
+
~ ${W} {
|
|
395
395
|
background-color: ${({theme:e})=>e.color.brand};
|
|
396
396
|
|
|
397
|
-
${
|
|
397
|
+
${vt} {
|
|
398
398
|
transform: translateX(12px);
|
|
399
399
|
}
|
|
400
400
|
}
|
|
@@ -403,52 +403,52 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
403
403
|
&:disabled {
|
|
404
404
|
cursor: auto;
|
|
405
405
|
|
|
406
|
-
~ ${
|
|
406
|
+
~ ${W} {
|
|
407
407
|
opacity: ${({theme:e})=>e.elementEffect.disabled.opacity};
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
|
|
411
411
|
&:not(:disabled):focus {
|
|
412
|
-
~ ${
|
|
412
|
+
~ ${W} {
|
|
413
413
|
box-shadow: 0 0 0 4px
|
|
414
414
|
${({theme:e})=>m(e.color.brand,e.elementEffect.disabled)};
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
-
`;var
|
|
417
|
+
`;var bt=e.memo(function({children:e,icon:t,show:n=!0,prefix:r=!1,width:i,fit:a=!1,fixed:o=!1}){let s=a?i===void 0?_(Ct,{show:n,pre:r,children:t}):_(Ot,{width:i,show:n,pre:r,children:_(kt,{children:t})}):_(Et,{show:n,pre:r,children:_(Dt,{children:t})});return v(xt,{children:[r&&s,_(St,{fixed:o,children:e}),!r&&s]})});const xt=P.div`
|
|
418
418
|
display: flex;
|
|
419
419
|
align-items: center;
|
|
420
|
-
`,
|
|
421
|
-
${e=>!e.fixed&&
|
|
420
|
+
`,St=P.div`
|
|
421
|
+
${e=>!e.fixed&&M.css`
|
|
422
422
|
min-width: 0;
|
|
423
423
|
overflow: hidden;
|
|
424
424
|
`}
|
|
425
425
|
white-space: nowrap;
|
|
426
426
|
text-overflow: ellipsis;
|
|
427
|
-
`;function
|
|
427
|
+
`;function Ct({children:e,show:t,pre:n}){let r=d(null);return _(Ot,{width:Ae(r,[null])?.width??0,show:t,pre:n,children:_(kt,{ref:r,children:e})})}const wt=M.css`
|
|
428
428
|
> svg {
|
|
429
429
|
display: block;
|
|
430
430
|
}
|
|
431
|
-
`,
|
|
432
|
-
${e=>e.show===`collapse`?
|
|
431
|
+
`,Tt=M.css`
|
|
432
|
+
${e=>e.show===`collapse`?M.css`
|
|
433
433
|
display: none;
|
|
434
|
-
`:
|
|
434
|
+
`:M.css`
|
|
435
435
|
visibility: ${e.show?`visible`:`hidden`};
|
|
436
436
|
`};
|
|
437
|
-
${e=>e.pre?
|
|
437
|
+
${e=>e.pre?M.css`
|
|
438
438
|
margin-right: 4px;
|
|
439
|
-
`:
|
|
439
|
+
`:M.css`
|
|
440
440
|
margin-left: 4px;
|
|
441
441
|
`}
|
|
442
|
-
`,
|
|
442
|
+
`,Et=P.div`
|
|
443
443
|
display: flex;
|
|
444
444
|
align-items: center;
|
|
445
445
|
|
|
446
|
-
${
|
|
447
|
-
`,
|
|
446
|
+
${Tt}
|
|
447
|
+
`,Dt=P.div`
|
|
448
448
|
display: inline-flex;
|
|
449
449
|
|
|
450
|
-
${
|
|
451
|
-
`,
|
|
450
|
+
${wt}
|
|
451
|
+
`,Ot=P.div`
|
|
452
452
|
display: flex;
|
|
453
453
|
position: relative;
|
|
454
454
|
/* Iconをline-heightに関与させない */
|
|
@@ -456,18 +456,18 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
456
456
|
/* 横方向の領域は確保する */
|
|
457
457
|
width: ${e=>e.width}px;
|
|
458
458
|
|
|
459
|
-
${
|
|
460
|
-
`,
|
|
459
|
+
${Tt}
|
|
460
|
+
`,kt=P.div`
|
|
461
461
|
display: inline-flex;
|
|
462
462
|
position: absolute;
|
|
463
463
|
transform: translateY(-50%);
|
|
464
464
|
|
|
465
|
-
${
|
|
466
|
-
`;var
|
|
465
|
+
${wt}
|
|
466
|
+
`;var G;function At(){if(G!==void 0)return G;G=!1;try{let t=Object.defineProperty({},`passive`,{get(){return G=!0}});window.addEventListener(`test`,e,t),window.removeEventListener(`test`,e)}catch{}return G;function e(){}}const jt=()=>navigator.userAgent.includes(`Edge/`),K=typeof window<`u`?c:s;function q(e){throw Error(arguments.length===0?`unreachable`:`unreachable (${JSON.stringify(e)})`)}function Mt({direction:e}){return _(pe,{viewBoxSize:24,size:24,currentColor:!0,path:`M8.08579 16.5858C7.30474 17.3668 7.30474 18.6332 8.08579 19.4142C8.86684 20.1953 10.1332 20.1953 10.9142 19.4142L18.3284 12L10.9142 4.58579C10.1332 3.80474 8.86684 3.80474 8.08579 4.58579C7.30474 5.36684 7.30474 6.63317 8.08579 7.41421L12.6716 12L8.08579 16.5858Z`,transform:Nt(e)})}function Nt(e){switch(e){case`up`:return`rotate(270 12 12)`;case`down`:return`rotate(90 12 12)`;case`left`:return`rotate(180 12 12)`;case`right`:return;default:return q(e)}}const Pt=M.css`
|
|
467
467
|
@media (hover: none) and (pointer: coarse) {
|
|
468
468
|
display: none;
|
|
469
469
|
}
|
|
470
|
-
`;function
|
|
470
|
+
`;function J({direction:e,show:t,offset:n=0,padding:r=0,bottomOffset:i=0,gradient:a=!1,onClick:o}){let s=e===`left`?{left:a?n-72:n,paddingLeft:Math.max(r,0),paddingBottom:i}:{right:a?n-72:n,paddingRight:Math.max(r,0),paddingBottom:i};return _(It,{type:`button`,onClick:o,hide:!t,style:s,children:_(Ft,{children:_(Mt,{direction:e===`right`?`right`:e===`left`?`left`:q()})})})}const Ft=P.div`
|
|
471
471
|
display: flex;
|
|
472
472
|
align-items: center;
|
|
473
473
|
justify-content: center;
|
|
@@ -481,7 +481,7 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
481
481
|
0.2s background-color,
|
|
482
482
|
0.2s color;
|
|
483
483
|
color: ${({theme:e})=>e.color.text5};
|
|
484
|
-
`;var
|
|
484
|
+
`;var It=P(P.button`
|
|
485
485
|
position: absolute;
|
|
486
486
|
top: 0;
|
|
487
487
|
bottom: 0;
|
|
@@ -500,22 +500,22 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
500
500
|
/* このコンポーネントはCarouselでしか使われてないのでそっちでコンテキストで切る */
|
|
501
501
|
z-index: 1;
|
|
502
502
|
|
|
503
|
-
&:hover ${
|
|
503
|
+
&:hover ${Ft} {
|
|
504
504
|
background-color: ${({theme:e})=>m(e.color.surface4,e.effect.hover)};
|
|
505
505
|
color: ${({theme:e})=>m(e.color.text5,e.effect.hover)};
|
|
506
506
|
}
|
|
507
507
|
|
|
508
|
-
&:active ${
|
|
508
|
+
&:active ${Ft} {
|
|
509
509
|
background-color: ${({theme:e})=>m(e.color.surface4,e.effect.press)};
|
|
510
510
|
color: ${({theme:e})=>m(e.color.text5,e.effect.press)};
|
|
511
511
|
}
|
|
512
512
|
|
|
513
|
-
${e=>e.hide&&
|
|
513
|
+
${e=>e.hide&&M.css`
|
|
514
514
|
visibility: hidden;
|
|
515
515
|
opacity: 0;
|
|
516
516
|
pointer-events: none;
|
|
517
517
|
`}
|
|
518
|
-
`)`${
|
|
518
|
+
`)`${Pt}`;function Lt({buttonOffset:e=0,buttonPadding:t=16,bottomOffset:n=0,defaultScroll:{align:r=`left`,offset:a=0}={},onScroll:o,onResize:c,children:l,centerItems:u,onScrollStateChange:p,scrollAmountCoef:m=.75,...ee}){let[h,g]=je(0),y=d(!1),[b,x]=f(0),[S,te]=f(!1),[C,w]=f(!1),[T,E]=ne(()=>({from:{scroll:0}})),D=d(null),O=d(null),k=d(null),A=i(()=>{if(O.current===null)return;let{clientWidth:e}=O.current,t=Math.min(h+e*m,b);g(t,!0),E({scroll:t,from:{scroll:h},reset:!y.current}),y.current=!0},[y,b,h,E,m,g]),j=i(()=>{if(O.current===null)return;let{clientWidth:e}=O.current,t=Math.max(h-e*m,0);g(t,!0),E({scroll:t,from:{scroll:h},reset:!y.current}),y.current=!0},[y,h,E,m,g]);s(()=>{let e=h>0,t=h<b&&b>0;(e!==S||t!==C)&&(te(e),w(t),p?.(e||t))},[S,b,p,C,h]);let M=i(()=>{if(D.current===null)return;y.current&&=(T.scroll.stop(),!1);let e=D.current.scrollLeft;g(e)},[y,g,T]),N=i(()=>{if(D.current===null)return;let{clientWidth:e,scrollWidth:t}=D.current;x(t-e),c&&c(e)},[c]);K(()=>{let e=D.current,t=k.current;if(e===null||t===null)return;e.addEventListener(`wheel`,M,At()&&{passive:!0});let n=new ResizeObserver(N);n.observe(e);let r=new ResizeObserver(N);return r.observe(t),()=>{e.removeEventListener(`wheel`,M),n.disconnect(),r.disconnect()}},[N,M]),K(()=>{if(r!==`left`||a!==0){let e=D.current;if(e!==null){let t=Math.max(0,Math.min(r===`left`&&a>0?a:r===`center`?b/2+a:r===`right`&&a<=b?b-a/2:0,b));e.scrollLeft=t,g(t,!0)}}},[D.current]);let P=i(()=>{D.current!==null&&o&&o(D.current.scrollLeft)},[o]),[F,I]=f(!1);if(K(()=>{jt()&&I(!0)},[]),!F&&ee.hasGradient===!0){let r=ee.fadeInGradient??!1,i=!r;return v(Rt,{ref:O,children:[_(Bt,{fadeInGradient:r,children:_(Vt,{children:_(Ht,{show:i||h>0,children:_(zt,{ref:D,scrollLeft:T.scroll,onScroll:P,children:_(Y,{ref:k,centerItems:u,children:l})})})})}),v(X,{children:[_(J,{direction:`left`,show:S,offset:e,bottomOffset:n,padding:t,gradient:i,onClick:j}),_(J,{direction:`right`,show:C,offset:e,bottomOffset:n,padding:t,gradient:!0,onClick:A})]})]})}return v(Rt,{ref:O,children:[_(zt,{ref:D,scrollLeft:T.scroll,onScroll:P,children:_(Y,{ref:k,centerItems:u,children:l})}),v(X,{children:[_(J,{direction:`left`,show:S,offset:e,bottomOffset:n,padding:t,onClick:j}),_(J,{direction:`right`,show:C,offset:e,bottomOffset:n,padding:t,onClick:A})]})]})}const Y=P.ul`
|
|
519
519
|
vertical-align: top;
|
|
520
520
|
overflow: hidden;
|
|
521
521
|
list-style: none;
|
|
@@ -525,26 +525,26 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
525
525
|
min-width: 100%;
|
|
526
526
|
box-sizing: border-box;
|
|
527
527
|
|
|
528
|
-
${({centerItems:e=!1})=>e?
|
|
528
|
+
${({centerItems:e=!1})=>e?M.css`
|
|
529
529
|
display: flex;
|
|
530
530
|
width: max-content;
|
|
531
531
|
margin: 0 auto;
|
|
532
|
-
`:
|
|
532
|
+
`:M.css`
|
|
533
533
|
display: inline-flex;
|
|
534
534
|
margin: 0;
|
|
535
535
|
`}
|
|
536
|
-
`,
|
|
536
|
+
`,X=P.div`
|
|
537
537
|
opacity: 0;
|
|
538
538
|
transition: 0.4s opacity;
|
|
539
|
-
`,
|
|
540
|
-
&:hover ${
|
|
539
|
+
`,Rt=P.div`
|
|
540
|
+
&:hover ${X} {
|
|
541
541
|
opacity: 1;
|
|
542
542
|
}
|
|
543
543
|
|
|
544
544
|
/* CarouselButtonの中にz-index:1があるのでここでコンテキストを切る */
|
|
545
545
|
position: relative;
|
|
546
546
|
z-index: 0;
|
|
547
|
-
`,
|
|
547
|
+
`,zt=P(C.div)`
|
|
548
548
|
overflow-x: auto;
|
|
549
549
|
padding: 0;
|
|
550
550
|
margin: 0;
|
|
@@ -554,28 +554,28 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
554
554
|
}
|
|
555
555
|
|
|
556
556
|
scrollbar-width: none;
|
|
557
|
-
`,
|
|
557
|
+
`,Bt=P.div`
|
|
558
558
|
/* NOTE: LeftGradientがはみ出るためhidden */
|
|
559
559
|
overflow: hidden;
|
|
560
|
-
${e=>!e.fadeInGradient&&
|
|
560
|
+
${e=>!e.fadeInGradient&&M.css`
|
|
561
561
|
margin-left: ${-72}px;
|
|
562
|
-
${
|
|
562
|
+
${Y} {
|
|
563
563
|
padding-left: ${72}px;
|
|
564
564
|
}
|
|
565
565
|
`}
|
|
566
566
|
|
|
567
567
|
margin-right: ${-72}px;
|
|
568
568
|
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
569
|
-
${
|
|
569
|
+
${Y} {
|
|
570
570
|
padding-right: ${72}px;
|
|
571
571
|
}
|
|
572
|
-
`,
|
|
572
|
+
`,Vt=P.div`
|
|
573
573
|
mask-image: linear-gradient(
|
|
574
574
|
to right,
|
|
575
575
|
#000 calc(100% - ${72}px),
|
|
576
576
|
transparent
|
|
577
577
|
);
|
|
578
|
-
`,
|
|
578
|
+
`,Ht=P.div`
|
|
579
579
|
/* NOTE: mask-position が left → negative px の時、right → abs(negative px) の位置に表示されるため */
|
|
580
580
|
margin-right: ${-72}px;
|
|
581
581
|
padding-right: ${72}px;
|
|
@@ -583,23 +583,23 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
583
583
|
transition: 0.2s all ease-in;
|
|
584
584
|
mask: linear-gradient(to right, transparent, #000 ${72}px)
|
|
585
585
|
${e=>e.show?0:-72}px 0;
|
|
586
|
-
`;function
|
|
586
|
+
`;function Ut({size:e=16}){return _(Wt,{viewBox:`0 0 20 6`,width:e,height:e,children:_(`path`,{fillRule:`evenodd`,d:`M5,14.5 C3.61928813,14.5 2.5,13.3807119 2.5,12 C2.5,10.6192881 3.61928813,9.5 5,9.5
|
|
587
587
|
C6.38071187,9.5 7.5,10.6192881 7.5,12 C7.5,13.3807119 6.38071187,14.5 5,14.5 Z M12,14.5
|
|
588
588
|
C10.6192881,14.5 9.5,13.3807119 9.5,12 C9.5,10.6192881 10.6192881,9.5 12,9.5
|
|
589
589
|
C13.3807119,9.5 14.5,10.6192881 14.5,12 C14.5,13.3807119 13.3807119,14.5 12,14.5 Z M19,14.5
|
|
590
590
|
C17.6192881,14.5 16.5,13.3807119 16.5,12 C16.5,10.6192881 17.6192881,9.5 19,9.5
|
|
591
|
-
C20.3807119,9.5 21.5,10.6192881 21.5,12 C21.5,13.3807119 20.3807119,14.5 19,14.5 Z`,transform:`translate(-2 -9)`})})}const
|
|
591
|
+
C20.3807119,9.5 21.5,10.6192881 21.5,12 C21.5,13.3807119 20.3807119,14.5 19,14.5 Z`,transform:`translate(-2 -9)`})})}const Wt=P.svg`
|
|
592
592
|
fill: currentColor;
|
|
593
|
-
`;
|
|
593
|
+
`;function Z({size:e=16,direction:t}){return _(`svg`,{viewBox:`0 0 10 8`,width:e,height:e,children:_(Kt,{strokeWidth:`2`,points:`1,2 5,6 9,2`,transform:Gt(t)})})}function Gt(e){switch(e){case`up`:return`rotate(180 5 4)`;case`down`:return;case`left`:return`rotate(90 5 4)`;case`right`:return`rotate(-90 5 4)`;default:return q(e)}}const Kt=P.polyline`
|
|
594
594
|
fill: none;
|
|
595
595
|
stroke-linejoin: round;
|
|
596
596
|
stroke-linecap: round;
|
|
597
597
|
stroke: currentColor;
|
|
598
|
-
`;function
|
|
598
|
+
`;function qt(e,t,n=7){process.env.NODE_ENV!==`production`&&(w((e|0)===e,`\`page\` must be integer (${e})`),w((t|0)===t,`\`pageCount\` must be integer (${t})`),w((n|0)===n,`\`pageRangeDisplayed\` must be integer (${n})`),w(n>2,"`windowSize` must be greater than 2"));let r=l(()=>{let r=Math.min(t,Math.max(e+Math.floor(n/2),n));if(r<=n)return Array.from({length:1+r-1},(e,t)=>1+t);{let e=r-(n-1)+2;return[1,`...`,...Array.from({length:1+r-e},(t,n)=>e+n)]}},[e,t,n]);return o(r),r}var Jt=r(function({page:e,pageCount:t,pageRangeDisplayed:n,onChange:r}){let a=qt(e,t,n),o=i(e=>()=>{r(e)},[r]),s=e<t,c=e>1;return v(Xt,{children:[_(Q,{type:`button`,hidden:!c,disabled:!c,onClick:o(Math.max(1,e-1)),noBackground:!0,children:_(Z,{size:16,direction:`left`})}),a.map(t=>t===`...`?_(Zt,{children:_(Ut,{size:20})},t):t===e?_(Q,{type:`button`,"aria-current":!0,children:_($,{children:t})},t):_(Q,{type:`button`,onClick:o(t),children:_($,{children:t})},t)),_(Q,{type:`button`,hidden:!s,disabled:!s,onClick:o(Math.min(t,e+1)),noBackground:!0,children:_(Z,{size:16,direction:`right`})})]})});function Yt({page:e,pageCount:t,pageRangeDisplayed:n,makeUrl:r}){let{Link:i}=L(),a=qt(e,t,n),o=e<t,s=e>1;return v(Xt,{children:[_(i,{to:r(Math.max(1,e-1)),children:_(Q,{hidden:!s,"aria-disabled":!s,noBackground:!0,children:_(Z,{size:16,direction:`left`})})}),a.map(t=>t===`...`?_(Zt,{children:_(Ut,{size:20,subLink:!0})},t):t===e?_(Q,{type:`button`,"aria-current":!0,children:_($,{children:t})},t):_(i,{to:r(t),children:_(Q,{type:`button`,children:_($,{children:t})})},t)),_(i,{to:r(Math.min(t,e+1)),children:_(Q,{hidden:!o,"aria-disabled":!o,noBackground:!0,children:_(Z,{size:16,direction:`right`})})})]})}const Xt=P.nav`
|
|
599
599
|
display: flex;
|
|
600
600
|
justify-content: center;
|
|
601
601
|
align-items: center;
|
|
602
|
-
`,Q=
|
|
602
|
+
`,Q=P.button`
|
|
603
603
|
font-size: 1rem;
|
|
604
604
|
line-height: calc(1em + 8px);
|
|
605
605
|
text-decoration: none;
|
|
@@ -654,16 +654,16 @@ import*as e from"react";import{Children as t,isValidElement as n,memo as r,useCa
|
|
|
654
654
|
color: ${({theme:e})=>e.color.text5};
|
|
655
655
|
}
|
|
656
656
|
|
|
657
|
-
${({noBackground:e=!1})=>e&&
|
|
657
|
+
${({noBackground:e=!1})=>e&&M.css`
|
|
658
658
|
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
659
659
|
&:hover {
|
|
660
660
|
background: transparent;
|
|
661
661
|
}
|
|
662
662
|
`}
|
|
663
|
-
`,
|
|
663
|
+
`,Zt=P(Q).attrs({type:`button`,disabled:!0})`
|
|
664
664
|
&& {
|
|
665
665
|
color: ${({theme:e})=>e.color.text3};
|
|
666
666
|
background: none;
|
|
667
667
|
}
|
|
668
|
-
`,$=`span`;export{
|
|
668
|
+
`,$=`span`;export{qe as CancelLayoutItemBodyPadding,Lt as Carousel,re as ComponentAbstraction,fe as Filter,ie as FilterButton,ae as FilterIconButton,oe as FilterLink,ve as HintText,B as LAYOUT_ITEM_BODY_PADDING,Me as Layout,Be as LayoutItem,We as LayoutItemBody,He as LayoutItemHeader,ut as LeftMenu,dt as LeftMenuContent,Yt as LinkPager,we as MAIN_COLUMN_HORIZONTAL_MIN_MARGIN,H as MenuListItem,Qe as MenuListItemContext,at as MenuListItemWithIcon,lt as MenuListLabel,U as MenuListLinkItem,it as MenuListLinkItemWithIcon,ct as MenuListSpacer,Jt as Pager,Te as RESPONSIVE_LEFT_WIDTH,Ee as RESPONSIVE_MAIN_MAX_WIDTH,Je as StyledCancelLayoutItemBodyPadding,Ge as StyledLayoutItemBody,mt as SwitchCheckbox,V as TextEllipsis,bt as WithIcon,L as useComponentAbstraction,Ae as useElementSize,Ke as useLayoutItemBodyPadding,Oe as useMedia,De as useMediaScreen1};
|
|
669
669
|
//# sourceMappingURL=index.js.map
|