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