@sis-cc/dotstatsuite-visions 15.21.0 → 15.22.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.
Files changed (174) hide show
  1. package/package.json +1 -1
  2. package/dist/addon-visual-tests-assets/visual-test-illustration.mp4 +0 -0
  3. package/dist/assets/Add-DbA9Sjeg.js +0 -1
  4. package/dist/assets/Alert-CK3mRbnB.js +0 -5
  5. package/dist/assets/Alert.stories-B9PzLiIZ.js +0 -57
  6. package/dist/assets/ApiQueries.stories-mWhIeEEi.js +0 -35
  7. package/dist/assets/ArrowForward-Db2J3XTK.js +0 -1
  8. package/dist/assets/Asterisk-BF_zNCdD.js +0 -1
  9. package/dist/assets/AuthDialog.stories-B48Va0CW.js +0 -20
  10. package/dist/assets/Breadcrumbs.stories-gTR40aOz.js +0 -47
  11. package/dist/assets/Button-wMD-_ELw.js +0 -1
  12. package/dist/assets/Button.stories-BAmPDjen.js +0 -40
  13. package/dist/assets/CardContent-VoSip0qn.js +0 -1
  14. package/dist/assets/ChartsConfig.stories-KG_d4rrq.js +0 -24
  15. package/dist/assets/Checkbox-DYdHETI3.js +0 -1
  16. package/dist/assets/Chips.stories-QKAbIgiw.js +0 -48
  17. package/dist/assets/CircularProgress-CsdMhVdp.js +0 -28
  18. package/dist/assets/Close-DBSRhxm9.js +0 -1
  19. package/dist/assets/Collapse-B5qxr7n7.js +0 -1
  20. package/dist/assets/CollapseButtons.stories-CNA2oxLB.js +0 -60
  21. package/dist/assets/CollapsibleTree.stories-CkHBNild.js +0 -44
  22. package/dist/assets/Color-6AOWCN3U-CXrEcW45.js +0 -1
  23. package/dist/assets/Contact.stories-BUZ56ign.js +0 -60
  24. package/dist/assets/Container-CSRCzcsV.js +0 -1
  25. package/dist/assets/Cross-FlyYvK4d.js +0 -1
  26. package/dist/assets/CustomChip-Dp74AGb1.js +0 -1
  27. package/dist/assets/DataEdit.stories-jfozjRc7.js +0 -47
  28. package/dist/assets/DataFooter.stories-DzfPeq2y.js +0 -29
  29. package/dist/assets/DataHeader.stories-53Uepwdp.js +0 -49
  30. package/dist/assets/Dataflow.stories-C2cSXNHy.js +0 -53
  31. package/dist/assets/DeleteAllChip.stories-D_pWiUK_.js +0 -22
  32. package/dist/assets/Dialog-DzB9MJFD.js +0 -1
  33. package/dist/assets/DocsRenderer-JROSPFPF-uM_w3Nnm.js +0 -752
  34. package/dist/assets/Done-DE3iqPnb.js +0 -1
  35. package/dist/assets/Download-DPuoSNMG.js +0 -1
  36. package/dist/assets/DynamicDrawer.stories-5Aw3zm7O.js +0 -89
  37. package/dist/assets/EmojiObjects-D8W6_QC9.js +0 -1
  38. package/dist/assets/ExpandLess-CAu7KW-s.js +0 -1
  39. package/dist/assets/ExpandMore-DapuqXiD.js +0 -1
  40. package/dist/assets/ExpansionPanel-IXSqmm6s.js +0 -1
  41. package/dist/assets/ExpansionPanel.stories-DMRZsmqV.js +0 -50
  42. package/dist/assets/FormControlLabel-D5Yq4DQk.js +0 -1
  43. package/dist/assets/Grid-BGtiGr3C.js +0 -1
  44. package/dist/assets/GroupedChips.stories-BQNAruJ2.js +0 -48
  45. package/dist/assets/Grow-DHj1j2oj.js +0 -1
  46. package/dist/assets/HierarchicalFilter.stories-DRYOf_Io.js +0 -33
  47. package/dist/assets/IconButton-CDI4ifte.js +0 -1
  48. package/dist/assets/Icons.stories-ygcqpJ44.js +0 -24
  49. package/dist/assets/Info-ButERCLo.js +0 -1
  50. package/dist/assets/InfoOutlined-aCikQTAB.js +0 -1
  51. package/dist/assets/Input-BdjJhG5r.js +0 -1
  52. package/dist/assets/Input.stories-DSYXaUw-.js +0 -41
  53. package/dist/assets/InputAdornment-PByjtZDc.js +0 -1
  54. package/dist/assets/InputNumber.stories-D1Ju1oJD.js +0 -26
  55. package/dist/assets/KeyboardArrowUp-BduBSO9n.js +0 -1
  56. package/dist/assets/LabelDivider.stories-C8PxNE1m.js +0 -25
  57. package/dist/assets/Lens-DB_4vL9S.js +0 -1
  58. package/dist/assets/Link-Cqk3qylD.js +0 -1
  59. package/dist/assets/List-hIOzS02Y.js +0 -1
  60. package/dist/assets/ListContext-Bto3-d0A.js +0 -1
  61. package/dist/assets/Loading.stories-DIDLKCGH.js +0 -28
  62. package/dist/assets/Logo.stories-B2CKNYTN.js +0 -19
  63. package/dist/assets/MenuItem-CdawAE5j.js +0 -1
  64. package/dist/assets/Mode-DFruZJY7.js +0 -1
  65. package/dist/assets/Mode.stories-DXjNE-MV.js +0 -36
  66. package/dist/assets/NoData-D_D_JmYR.js +0 -1
  67. package/dist/assets/NoData.stories-DU2xx5TB.js +0 -17
  68. package/dist/assets/Pagination.stories-CdMIjVJr.js +0 -49
  69. package/dist/assets/Paper-CC0GihuP.js +0 -1
  70. package/dist/assets/PeriodPicker.stories-QUdA-N5z.js +0 -46
  71. package/dist/assets/Popover-KTeTorzz.js +0 -1
  72. package/dist/assets/RadioGroup-tI12aYz1.js +0 -1
  73. package/dist/assets/Search-DTZCTIh7.js +0 -1
  74. package/dist/assets/Select-Bx7OY-3j.js +0 -1
  75. package/dist/assets/Select-CpA9ZMAH.js +0 -1
  76. package/dist/assets/Select.stories-vYyLxi71.js +0 -83
  77. package/dist/assets/Share-4CZPZCSy.js +0 -1
  78. package/dist/assets/Share.stories-BQZGJ047.js +0 -30
  79. package/dist/assets/ShortUrls.stories-Cljmj3Eh.js +0 -28
  80. package/dist/assets/SisccFooter.stories-Cek_mCZ9.js +0 -25
  81. package/dist/assets/Spotlight-2TNA7KNF.js +0 -1
  82. package/dist/assets/Spotlight.stories-DHyRboEI.js +0 -58
  83. package/dist/assets/SwitchBase-CkQZqCGT.js +0 -1
  84. package/dist/assets/TableFooter.stories-B5Lb42KX.js +0 -13
  85. package/dist/assets/TableHeader.stories-COntqEzs.js +0 -15
  86. package/dist/assets/TableHtml5.stories-F7AOB8FR.js +0 -50
  87. package/dist/assets/TableLayout.stories-B9_JF4vG.js +0 -45
  88. package/dist/assets/TablePreview.stories-DRRnsjf0.js +0 -24
  89. package/dist/assets/TableRow-aFafP0Ut.js +0 -2
  90. package/dist/assets/Tag-BRpNvSq5.js +0 -1
  91. package/dist/assets/Tag.stories-HKN5s0sD.js +0 -22
  92. package/dist/assets/TextField-b-uFVlCn.js +0 -1
  93. package/dist/assets/TextareaAutosize-DDeS9zDl.js +0 -2
  94. package/dist/assets/ToggleButton-DGaXAw7I.js +0 -1
  95. package/dist/assets/ToggleButton.stories-0WRXXckS.js +0 -33
  96. package/dist/assets/Tooltip-AZ9g6FIz.js +0 -1
  97. package/dist/assets/Tooltip-BEu-5uYh.js +0 -1
  98. package/dist/assets/Tooltip.stories-DyNuN7r9.js +0 -38
  99. package/dist/assets/Typography-C1EbuXrl.js +0 -1
  100. package/dist/assets/UseCases-DOcdnBFC.js +0 -74
  101. package/dist/assets/UserRightForm.stories-EIqxE5P4.js +0 -43
  102. package/dist/assets/VerticalButton-bJTC1_Ns.js +0 -1
  103. package/dist/assets/VerticalButton.stories-Di44jYgK.js +0 -53
  104. package/dist/assets/VirtualizedTree.stories-DjF4qLh-.js +0 -42
  105. package/dist/assets/Warning-D0Aq6cxU.js +0 -1
  106. package/dist/assets/WithTooltip-7X4HQR7L-D41S7DrG.js +0 -9
  107. package/dist/assets/areas-D-uJ8w17.js +0 -1
  108. package/dist/assets/axe-ChIrJaGf.js +0 -20
  109. package/dist/assets/chartProperties-DJwlvsfS.js +0 -1
  110. package/dist/assets/client-C5HHYzly.js +0 -9
  111. package/dist/assets/colorManipulator-DUwEXlpN.js +0 -1
  112. package/dist/assets/formControlState-B5L_osRH.js +0 -1
  113. package/dist/assets/formatter-L2YTDE3Q-2mYAfGov.js +0 -1
  114. package/dist/assets/getThemeProps-DGheavqV.js +0 -1
  115. package/dist/assets/iframe-CFs6acAJ.js +0 -1162
  116. package/dist/assets/index-1OaEebp9.js +0 -1
  117. package/dist/assets/index-Ak9cMNkh.js +0 -7
  118. package/dist/assets/index-BaKdw4XG.js +0 -1
  119. package/dist/assets/index-Bb8zBjgG.js +0 -1
  120. package/dist/assets/index-CpF9p_TK.js +0 -1
  121. package/dist/assets/index-DeyvdM_9.js +0 -1
  122. package/dist/assets/index-DpyIyUaw.js +0 -1
  123. package/dist/assets/isMuiElement-B1RFDH8S.js +0 -1
  124. package/dist/assets/listItemButtonClasses-BShMujB-.js +0 -1
  125. package/dist/assets/listItemTextClasses-CZcTCH7F.js +0 -1
  126. package/dist/assets/logo-CsgdfkmY.js +0 -1
  127. package/dist/assets/makeStyles-CI_GWbdO.js +0 -1
  128. package/dist/assets/matchers-JIUQ3HVY-N4FjKbka.js +0 -14
  129. package/dist/assets/ownerDocument-DW-IO8s5.js +0 -1
  130. package/dist/assets/preload-helper-PPVm8Dsz.js +0 -1
  131. package/dist/assets/react-18-5hUSqD9n.js +0 -1
  132. package/dist/assets/syntaxhighlighter-YFXUGROL-D5tY-aA0.js +0 -6
  133. package/dist/assets/table-preview-props-BAa2mgjL.js +0 -1
  134. package/dist/assets/useControlled-DrJ9YzZn.js +0 -1
  135. package/dist/assets/useKeybordEscapeHandler-B1j2-aAU.js +0 -1
  136. package/dist/assets/useMediaQuery-T15Nx9c_.js +0 -1
  137. package/dist/assets/useSlotProps-CPP70olw.js +0 -1
  138. package/dist/assets/useTheme-CLKkTAQ7.js +0 -1
  139. package/dist/assets/useThemeProps-DWvTJzqp.js +0 -1
  140. package/dist/assets/utils-B01EDmYN.js +0 -1
  141. package/dist/assets/utils-CayfTKLP.js +0 -1
  142. package/dist/assets/utils-hLU04HKI.js +0 -1
  143. package/dist/assets/visuallyHidden-Dan1xhjv.js +0 -1
  144. package/dist/assets/with-input-B9vMX2Sw.js +0 -1
  145. package/dist/assets/withSpotlight-Dymr3Bef.js +0 -1
  146. package/dist/favicon-wrapper.svg +0 -46
  147. package/dist/favicon.svg +0 -1
  148. package/dist/iframe.html +0 -709
  149. package/dist/index.html +0 -161
  150. package/dist/index.json +0 -1
  151. package/dist/manifests/components.html +0 -5434
  152. package/dist/manifests/components.json +0 -2039
  153. package/dist/nunito-sans-bold-italic.woff2 +0 -0
  154. package/dist/nunito-sans-bold.woff2 +0 -0
  155. package/dist/nunito-sans-italic.woff2 +0 -0
  156. package/dist/nunito-sans-regular.woff2 +0 -0
  157. package/dist/project.json +0 -1
  158. package/dist/sb-addons/a11y-3/manager-bundle.js +0 -57
  159. package/dist/sb-addons/chromatic-com-storybook-1/manager-bundle.js +0 -352
  160. package/dist/sb-addons/chromatic-com-storybook-1/manager-bundle.js.LEGAL.txt +0 -31
  161. package/dist/sb-addons/docs-4/manager-bundle.js +0 -18
  162. package/dist/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +0 -632
  163. package/dist/sb-addons/vitest-2/manager-bundle.js +0 -3
  164. package/dist/sb-common-assets/favicon-wrapper.svg +0 -46
  165. package/dist/sb-common-assets/favicon.svg +0 -1
  166. package/dist/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  167. package/dist/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  168. package/dist/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  169. package/dist/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  170. package/dist/sb-manager/globals-runtime.js +0 -78957
  171. package/dist/sb-manager/globals.js +0 -24
  172. package/dist/sb-manager/manager-stores.js +0 -23
  173. package/dist/sb-manager/runtime.js +0 -28253
  174. package/dist/vite-inject-mocker-entry.js +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sis-cc/dotstatsuite-visions",
3
- "version": "15.21.0",
3
+ "version": "15.22.0",
4
4
  "description": "Library of visual components",
5
5
  "license": "MIT",
6
6
  "author": "OECD",
@@ -1 +0,0 @@
1
- import{j as o}from"./iframe-CFs6acAJ.js";import{c as t}from"./UseCases-DOcdnBFC.js";const h=t(o.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");export{h as A};
@@ -1,5 +0,0 @@
1
- import{j as r,R as v,s as $}from"./iframe-CFs6acAJ.js";import{c as I}from"./index-1OaEebp9.js";import{P as M}from"./Paper-CC0GihuP.js";import{I as w}from"./IconButton-CDI4ifte.js";import{C as R}from"./Close-DBSRhxm9.js";import{m as W}from"./makeStyles-CI_GWbdO.js";import{I as O}from"./InfoOutlined-aCikQTAB.js";import{c as s}from"./UseCases-DOcdnBFC.js";import{d as u,l as g}from"./colorManipulator-DUwEXlpN.js";const A=s(r.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"}),"CheckCircleOutlineOutlined"),E=s(r.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline"),N=s(r.jsx("path",{d:"M12 5.99 19.53 19H4.47zM12 2 1 21h22zm1 14h-2v2h2zm0-6h-2v4h2z"}),"ReportProblemOutlined"),n=o=>o.palette.mode==="light"?u:g,i=o=>o.palette.mode==="light"?g:u,P=W(o=>({root:{...o.typography.body2,borderRadius:o.shape.borderRadius,backgroundColor:"transparent",display:"flex",padding:"6px 16px"},standardSuccess:{color:n(o)(o.palette.success.main,.6),backgroundColor:i(o)(o.palette.success.main,.9),"& $icon":{color:o.palette.success.main}},standardInfo:{color:n(o)(o.palette.info.main,.6),backgroundColor:i(o)(o.palette.info.main,.9),"& $icon":{color:o.palette.info.main}},standardWarning:{color:n(o)(o.palette.warning.main,.6),backgroundColor:i(o)(o.palette.warning.main,.9),"& $icon":{color:o.palette.warning.main}},standardError:{color:n(o)(o.palette.error.main,.6),backgroundColor:i(o)(o.palette.error.main,.9),"& $icon":{color:o.palette.error.main}},outlinedSuccess:{color:n(o)(o.palette.success.main,.6),border:`1px solid ${o.palette.success.main}`,"& $icon":{color:o.palette.success.main}},outlinedInfo:{color:n(o)(o.palette.info.main,.6),border:`1px solid ${o.palette.info.main}`,"& $icon":{color:o.palette.info.main}},outlinedWarning:{color:n(o)(o.palette.warning.main,.6),border:`1px solid ${o.palette.warning.main}`,"& $icon":{color:o.palette.warning.main}},outlinedError:{color:n(o)(o.palette.error.main,.6),border:`1px solid ${o.palette.error.main}`,"& $icon":{color:o.palette.error.main}},filledSuccess:{color:"#fff",fontWeight:o.typography.fontWeightMedium,backgroundColor:o.palette.success.main},filledInfo:{color:"#fff",fontWeight:o.typography.fontWeightMedium,backgroundColor:o.palette.info.main},filledWarning:{color:"#fff",fontWeight:o.typography.fontWeightMedium,backgroundColor:o.palette.warning.main},filledError:{color:"#fff",fontWeight:o.typography.fontWeightMedium,backgroundColor:o.palette.error.main},icon:{marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9},message:{padding:"8px 0",display:"flex",flexDirection:"column",justifyContent:"center"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}})),f={success:r.jsx(A,{fontSize:"inherit"}),warning:r.jsx(N,{fontSize:"inherit"}),error:r.jsx(E,{fontSize:"inherit"}),info:r.jsx(O,{fontSize:"inherit"})},L=v.forwardRef(function(m,x){const a=P(),{action:l,children:C,className:y,closeText:e="Close",color:b,icon:c,iconMapping:j=f,onClose:p,role:k="alert",severity:t="success",variant:z="standard",...S}=m,d=l!=null;return r.jsxs(M,{role:k,square:!0,elevation:0,className:I(a.root,a[`${z}${$(b||t)}`],y),ref:x,...S,children:[c!==!1?r.jsx("div",{className:a.icon,children:c||j[t]||f[t]}):null,r.jsx("div",{className:a.message,children:C}),d?r.jsx("div",{className:a.action,children:l}):null,!d&&p?r.jsx("div",{className:a.action,children:r.jsx(w,{size:"small","aria-label":e,title:e,color:"inherit",onClick:p,children:r.jsx(R,{fontSize:"small"})})}):null]})});L.__docgenInfo={description:`Alert component wrapper around MUI Paper with severity styling.
2
-
3
- @param {AlertProps} props
4
- @param {AlertRef} ref
5
- @returns {JSX.Element}`,methods:[],displayName:"Alert"};export{L as A};
@@ -1,57 +0,0 @@
1
- import{j as r}from"./iframe-CFs6acAJ.js";import{A as o}from"./Alert-CK3mRbnB.js";import{U as a,B as t}from"./UseCases-DOcdnBFC.js";import"./preload-helper-PPVm8Dsz.js";import"./index-1OaEebp9.js";import"./Paper-CC0GihuP.js";import"./IconButton-CDI4ifte.js";import"./Close-DBSRhxm9.js";import"./makeStyles-CI_GWbdO.js";import"./InfoOutlined-aCikQTAB.js";import"./colorManipulator-DUwEXlpN.js";const{fn:i}=__STORYBOOK_MODULE_TEST__,y={title:"Feedback/Alert",component:o,tags:["autodocs"]},e={render:()=>r.jsx(a,{base:{severity:"info",variant:"standard"},cases:{Info:{children:"The data was last updated on 15 October 2026."},Success:{severity:"success",children:"Your share link has been copied to the clipboard."},Warning:{severity:"warning",children:"This table exceeds the cell limit: only the first 5000 observations are shown."},Error:{severity:"error",children:"The data could not be loaded. Please try again later."},Outlined:{variant:"outlined",severity:"warning",children:"Some selections have no data."},Filled:{variant:"filled",severity:"error",children:"Request failed (HTTP 500)."},"With action":{severity:"error",children:"The data could not be loaded.",action:r.jsx(t,{color:"inherit",size:"small",children:"Retry"})},"Without icon":{icon:!1,children:"Values are expressed in millions of US dollars."},"Long message":{severity:"warning",children:"The selected combination of Reference area, Measure, Unit of measure and Time period returns a very large number of observations. Only the first 5000 observations are displayed; refine your filters or download the full dataset to see all values."}},toggles:{closable:{label:"Closable",props:{onClose:i(),closeText:"Close alert"}}},children:s=>r.jsx(o,{...s})})};e.parameters={...e.parameters,docs:{...e.parameters?.docs,source:{originalSource:`{
2
- render: () => <UseCases base={{
3
- severity: 'info',
4
- variant: 'standard'
5
- }} cases={{
6
- Info: {
7
- children: 'The data was last updated on 15 October 2026.'
8
- },
9
- Success: {
10
- severity: 'success',
11
- children: 'Your share link has been copied to the clipboard.'
12
- },
13
- Warning: {
14
- severity: 'warning',
15
- children: 'This table exceeds the cell limit: only the first 5000 observations are shown.'
16
- },
17
- Error: {
18
- severity: 'error',
19
- children: 'The data could not be loaded. Please try again later.'
20
- },
21
- Outlined: {
22
- variant: 'outlined',
23
- severity: 'warning',
24
- children: 'Some selections have no data.'
25
- },
26
- Filled: {
27
- variant: 'filled',
28
- severity: 'error',
29
- children: 'Request failed (HTTP 500).'
30
- },
31
- 'With action': {
32
- severity: 'error',
33
- children: 'The data could not be loaded.',
34
- action: <Button color="inherit" size="small">
35
- Retry
36
- </Button>
37
- },
38
- 'Without icon': {
39
- icon: false,
40
- children: 'Values are expressed in millions of US dollars.'
41
- },
42
- 'Long message': {
43
- severity: 'warning',
44
- children: 'The selected combination of Reference area, Measure, Unit of measure and Time period returns a very large number of observations. Only the first 5000 observations are displayed; refine your filters or download the full dataset to see all values.'
45
- }
46
- }} toggles={{
47
- closable: {
48
- label: 'Closable',
49
- props: {
50
- onClose: fn(),
51
- closeText: 'Close alert'
52
- }
53
- }
54
- }}>
55
- {props => <Alert {...props} />}
56
- </UseCases>
57
- }`,...e.parameters?.docs?.source}}};const g=["Controlled"];export{e as Controlled,g as __namedExportsOrder,y as default};
@@ -1,35 +0,0 @@
1
- import{R as h,j as e}from"./iframe-CFs6acAJ.js";import{P as t}from"./index-BaKdw4XG.js";import{A as N}from"./Alert-CK3mRbnB.js";import{B as T}from"./Button-wMD-_ELw.js";import{G as s}from"./Grid-BGtiGr3C.js";import{T as u}from"./Typography-C1EbuXrl.js";import{T as U}from"./TextareaAutosize-DDeS9zDl.js";import{m as _}from"./makeStyles-CI_GWbdO.js";import{D as A,U as P}from"./UseCases-DOcdnBFC.js";import"./preload-helper-PPVm8Dsz.js";import"./index-1OaEebp9.js";import"./Paper-CC0GihuP.js";import"./IconButton-CDI4ifte.js";import"./Close-DBSRhxm9.js";import"./InfoOutlined-aCikQTAB.js";import"./colorManipulator-DUwEXlpN.js";import"./useTheme-CLKkTAQ7.js";import"./ownerDocument-DW-IO8s5.js";const R=_(r=>({error:{width:"100%",margin:"0px 0px 8px 0px",wordBreak:"break-word"},header:{padding:r.spacing(1,0),minHeight:50},textarea:{width:"100%",margin:r.spacing(0,0,1,0)},title:r.mixins?.apiQueries?.title??{}})),b=({contents:r,title:i,selectedId:f,labels:o,delay:d,handleClick:m})=>{const a=R(),c=h.useRef(),[n,O]=h.useState(f),[S,g]=h.useState(!1),q=r.find(l=>l.id===n),j=q?.value,y=q?.isError??!1,E=()=>{"current"in c&&(c.current.select(),document.execCommand("copy"),g(!0),setTimeout(()=>g(!1),d),m())},C=S?o?.copied:o?.copy;return e.jsxs(s,{item:!0,xs:12,md:6,container:!0,children:[e.jsxs(s,{item:!0,container:!0,justifyContent:"space-between",alignItems:"flex-start",className:a.header,children:[e.jsx(s,{item:!0,children:e.jsx(u,{className:a.title,children:i})}),r.length>1&&e.jsxs(s,{container:!0,alignItems:"center",children:[e.jsx(s,{item:!0,children:e.jsxs(u,{variant:"body2",children:[o.buttonsLabel,": "]})}),e.jsx(s,{item:!0,children:r.map(({id:l,label:D})=>e.jsx(T,{"aria-label":D,"aria-pressed":n===l,size:"small",variant:"text",color:"primary",onClick:()=>O(l),selected:n===l,children:D},l))})]})]}),e.jsxs(s,{item:!0,container:!0,xs:12,style:{alignSelf:"flex-end"},justifyContent:"flex-end",children:[!y&&e.jsx(U,{ref:c,"aria-label":i,className:a.textarea,minRows:5,maxRows:5,readOnly:!0,value:j}),y&&e.jsx(N,{className:a.error,severity:"error",variant:"filled",children:j}),e.jsx(T,{"aria-label":C,disabled:y,size:"small",variant:"contained",alternative:"siscc",color:"primary",onClick:E,className:a.sisccButton,children:C})]})]})};b.propTypes={labels:t.shape({copy:t.oneOfType([t.string,t.element]),copied:t.oneOfType([t.string,t.element]),buttonsLabel:t.oneOfType([t.string,t.element])}),contents:t.arrayOf(t.shape({id:t.string,label:t.oneOfType([t.string,t.element]),value:t.string})),title:t.oneOfType([t.string,t.element]),selectedId:t.string,delay:t.number,handleClick:t.func};b.__docgenInfo={description:"",methods:[],displayName:"Query",props:{labels:{description:"",type:{name:"shape",value:{copy:{name:"union",value:[{name:"string"},{name:"element"}],required:!1},copied:{name:"union",value:[{name:"string"},{name:"element"}],required:!1},buttonsLabel:{name:"union",value:[{name:"string"},{name:"element"}],required:!1}}},required:!1},contents:{description:"",type:{name:"arrayOf",value:{name:"shape",value:{id:{name:"string",required:!1},label:{name:"union",value:[{name:"string"},{name:"element"}],required:!1},value:{name:"string",required:!1}}}},required:!1},title:{description:"",type:{name:"union",value:[{name:"string"},{name:"element"}]},required:!1},selectedId:{description:"",type:{name:"string"},required:!1},delay:{description:"",type:{name:"number"},required:!1},handleClick:{description:"",type:{name:"func"},required:!1}}};const k=_(r=>({divider:{padding:r.spacing(2,0)},title:r.mixins?.apiQueries?.title??{}})),w=[],v=({queries:r=w,labels:i,delay:f=1e3,handleClick:o})=>{const d=k(),m=r.length>0;return e.jsxs(s,{container:!0,"data-testid":"apiqueries-test-id",children:[e.jsxs(s,{item:!0,xs:12,children:[e.jsx(u,{className:d.title,children:i?.title}),(i?.descriptions??[]).map(a=>e.jsx(u,{display:"block",variant:"body2",children:a},a))]}),m&&e.jsx(s,{item:!0,xs:12,className:d.divider,children:e.jsx(A,{})}),e.jsx(s,{item:!0,container:!0,spacing:2,children:r.map(({id:a,title:c,contents:n=[]})=>e.jsx(b,{title:c,contents:n,selectedId:n[0]?.id,labels:i,delay:f,handleClick:o},a))}),m&&e.jsx(s,{item:!0,xs:12,className:d.divider,children:e.jsx(A,{})}),e.jsx(u,{variant:"body2",children:i?.notice})]})};v.__docgenInfo={description:"",methods:[],displayName:"ApiQueries",props:{queries:{defaultValue:{value:"[]",computed:!1},required:!1},delay:{defaultValue:{value:"1000",computed:!1},required:!1}}};const{fn:F}=__STORYBOOK_MODULE_TEST__,x="https://sdmx.example.org/rest",Q=[{id:"data",title:"Data query",contents:[{id:"flat",label:"Flat",value:`${x}/data/OECD,DF_QNA,1.0/A.FRA+DEU.B1GQ.USD_PPP?startPeriod=2015&dimensionAtObservation=AllDimensions`},{id:"timeseries",label:"Time series",value:`${x}/data/OECD,DF_QNA,1.0/A.FRA+DEU.B1GQ.USD_PPP?startPeriod=2015`}]},{id:"structure",title:"Structure query",contents:[{id:"structure",label:"Structure",value:`${x}/dataflow/OECD/DF_QNA/1.0?references=all`}]}],se={title:"Data/ApiQueries",component:v,tags:["autodocs"]},p={render:()=>e.jsx(P,{base:{delay:1e3,handleClick:F(),labels:{title:"Developer API query builder",descriptions:["Use these queries to retrieve the data and its structure from the SDMX web service.","The data query reflects the filters currently selected."],notice:"Queries are limited to 1 000 000 observations.",copy:"Copy code",copied:"Copied!",buttonsLabel:"Format"}},cases:{Default:{queries:Q},"Query too long":{queries:[{id:"data",title:"Data query",contents:[{id:"flat",label:"Flat",value:"The query is too long to be used as a URL: please reduce the number of selected values.",isError:!0}]},Q[1]]},"No queries":{queries:[]}},children:r=>e.jsx(v,{...r})})};p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:`{
2
- render: () => <UseCases base={{
3
- delay: 1000,
4
- handleClick: fn(),
5
- labels: {
6
- title: 'Developer API query builder',
7
- descriptions: ['Use these queries to retrieve the data and its structure from the SDMX web service.', 'The data query reflects the filters currently selected.'],
8
- notice: 'Queries are limited to 1 000 000 observations.',
9
- copy: 'Copy code',
10
- copied: 'Copied!',
11
- buttonsLabel: 'Format'
12
- }
13
- }} cases={{
14
- Default: {
15
- queries
16
- },
17
- 'Query too long': {
18
- queries: [{
19
- id: 'data',
20
- title: 'Data query',
21
- contents: [{
22
- id: 'flat',
23
- label: 'Flat',
24
- value: 'The query is too long to be used as a URL: please reduce the number of selected values.',
25
- isError: true
26
- }]
27
- }, queries[1]]
28
- },
29
- 'No queries': {
30
- queries: []
31
- }
32
- }}>
33
- {props => <ApiQueries {...props} />}
34
- </UseCases>
35
- }`,...p.parameters?.docs?.source}}};const ae=["Controlled"];export{p as Controlled,ae as __namedExportsOrder,se as default};
@@ -1 +0,0 @@
1
- import{j as r}from"./iframe-CFs6acAJ.js";import{c as o}from"./UseCases-DOcdnBFC.js";const s=o(r.jsx("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");export{s as A};
@@ -1 +0,0 @@
1
- import{j as e}from"./iframe-CFs6acAJ.js";import{S as t}from"./UseCases-DOcdnBFC.js";const o=s=>e.jsx(t,{viewBox:"0 0 32 38",...s,children:e.jsx("path",{d:"M29.92 24.096c-0.512 0.768-1.28 1.28-2.208 1.28-0.384 0-0.896-0.128-1.28-0.384l-7.776-4.512v8.928c0 1.44-1.152 2.592-2.592 2.592s-2.592-1.152-2.592-2.592v-8.928l-7.776 4.512c-0.384 0.256-0.896 0.384-1.28 0.384-0.928 0-1.824-0.512-2.208-1.28-0.768-1.28-0.256-2.848 0.896-3.488l7.776-4.544-7.776-4.544c-1.28-0.768-1.664-2.336-0.896-3.488s2.336-1.696 3.488-0.896l7.776 4.512v-9.056c0-1.44 1.184-2.592 2.592-2.592s2.592 1.152 2.592 2.592v8.928l7.776-4.512c1.28-0.8 2.848-0.288 3.488 0.896 0.8 1.28 0.256 2.848-0.896 3.488l-7.776 4.544 7.776 4.544c1.152 0.768 1.568 2.336 0.896 3.616z"})});o.__docgenInfo={description:"",methods:[],displayName:"Asterisk"};const l=Object.freeze(Object.defineProperty({__proto__:null,Asterisk:o},Symbol.toStringTag,{value:"Module"}));export{o as A,l as _};
@@ -1,20 +0,0 @@
1
- import{j as e,r as m}from"./iframe-CFs6acAJ.js";import{B as w}from"./Button-wMD-_ELw.js";import{D as v}from"./Dialog-DzB9MJFD.js";import{c as S,U as k,B as D}from"./UseCases-DOcdnBFC.js";import{T as I}from"./Typography-C1EbuXrl.js";import{I as N}from"./IconButton-CDI4ifte.js";import{C as _}from"./Close-DBSRhxm9.js";import{T as g}from"./TextField-b-uFVlCn.js";import{C as A}from"./Checkbox-DYdHETI3.js";import{m as B}from"./makeStyles-CI_GWbdO.js";import"./preload-helper-PPVm8Dsz.js";import"./index-1OaEebp9.js";import"./useTheme-CLKkTAQ7.js";import"./Paper-CC0GihuP.js";import"./Popover-KTeTorzz.js";import"./formControlState-B5L_osRH.js";import"./TextareaAutosize-DDeS9zDl.js";import"./ownerDocument-DW-IO8s5.js";import"./useSlotProps-CPP70olw.js";import"./Grow-DHj1j2oj.js";import"./index-CpF9p_TK.js";import"./index-DpyIyUaw.js";import"./utils-hLU04HKI.js";import"./Select-Bx7OY-3j.js";import"./List-hIOzS02Y.js";import"./ListContext-Bto3-d0A.js";import"./useControlled-DrJ9YzZn.js";import"./isMuiElement-B1RFDH8S.js";import"./SwitchBase-CkQZqCGT.js";const O=S(e.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person"),T=B(()=>({header:{color:"grey",display:"flex",alignItems:"center",justifyContent:"space-between"},headerLabel:{display:"flex",alignItems:"center"},closeButton:{color:"grey !important",padding:0},content:{alignItems:"stretch",display:"flex",flexDirection:"column",padding:10,backgroundColor:"rgb(240, 240, 240)"},error:{color:"red"},input:{backgroundColor:"white","&[type=number]::-webkit-inner-spin-button, &[type=number]::-webkit-outer-spin-button":{"-webkit-appearance":"none",margin:0},"&[type=number]":{"-moz-appearance":"textfield"}}})),d=({isOpen:t,labels:o,onClose:n,onSubmit:i})=>{const s=T(),[a,u]=m.useState(""),[c,h]=m.useState(""),[r,f]=m.useState(!1),C=()=>{f(!r),r||(u(""),h(""))},j=r||a!==""&&c!=="",y=()=>i({user:a,password:c,isAnonymous:r});return e.jsxs(v,{open:t,onClose:n,children:[e.jsxs("div",{className:s.header,children:[e.jsxs("div",{className:s.headerLabel,children:[e.jsx(O,{}),e.jsx(I,{children:o.header})]}),n&&e.jsx(N,{className:s.closeButton,onClick:n,size:"large",children:e.jsx(_,{})})]}),e.jsxs("form",{className:s.content,children:[e.jsx("label",{htmlFor:"login",children:o.user}),e.jsx(g,{inputProps:{className:s.input,id:"login",autoComplete:"username",name:"username"},value:a,onChange:p=>u(p.target.value),disabled:r}),e.jsx("label",{htmlFor:"password",children:o.password}),e.jsx(g,{inputProps:{className:s.input,id:"password",autoComplete:"current-password",name:"password"},value:c,onChange:p=>h(p.target.value),disabled:r,type:"password"}),e.jsxs("div",{children:[e.jsx(A,{checked:r,onChange:C}),o.anonymous]}),o.error&&e.jsx("div",{className:s.error,children:o.error}),e.jsx(w,{color:"primary",disabled:!j,onClick:y,variant:"contained",children:e.jsx("div",{style:{width:"100%"},children:o.submit})})]})]})};d.__docgenInfo={description:"",methods:[],displayName:"AuthDialog"};const{fn:b}=__STORYBOOK_MODULE_TEST__,x={header:"Authentication required",user:"User name",password:"Password",anonymous:"Continue as anonymous user",submit:"Log in"},U=b(),P=b(),E=({isClosable:t,...o})=>{const[n,i]=m.useState(!0),s=()=>i(!1);return e.jsxs(e.Fragment,{children:[e.jsx(D,{variant:"outlined",onClick:()=>i(!0),children:"Open the dialog"}),e.jsx(d,{...o,isOpen:n,onClose:t?()=>{s(),P()}:void 0,onSubmit:a=>{s(),U(a)}})]})},de={title:"Dialogs/AuthDialog",component:d,tags:["autodocs"],parameters:{docs:{story:{inline:!1,iframeHeight:480}}}},l={render:()=>e.jsx(k,{base:{labels:x,isClosable:!0},cases:{Default:{},"With error":{labels:{...x,error:"Invalid user name or password."}},"Not closable":{isClosable:!1}},children:t=>e.jsx(E,{...t})})};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
2
- render: () => <UseCases base={{
3
- labels,
4
- isClosable: true
5
- }} cases={{
6
- Default: {},
7
- 'With error': {
8
- labels: {
9
- ...labels,
10
- error: 'Invalid user name or password.'
11
- }
12
- },
13
- // only submitting closes it
14
- 'Not closable': {
15
- isClosable: false
16
- }
17
- }}>
18
- {props => <ControlledAuthDialog {...props} />}
19
- </UseCases>
20
- }`,...l.parameters?.docs?.source}}};const ue=["Controlled"];export{l as Controlled,ue as __namedExportsOrder,de as default};
@@ -1,47 +0,0 @@
1
- import{j as t,o as _,p as c,q as P,r as p,n as $}from"./iframe-CFs6acAJ.js";import{c as D}from"./index-1OaEebp9.js";import{c as B,s as u,e as H,a as O,g as L,b as A,d as W,U as q}from"./UseCases-DOcdnBFC.js";import{u as G}from"./useSlotProps-CPP70olw.js";import{T as I}from"./Typography-C1EbuXrl.js";import{m as Q}from"./makeStyles-CI_GWbdO.js";import"./preload-helper-PPVm8Dsz.js";const V=B(t.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),Y=B(t.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),K=B(t.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),F=["slots","slotProps"],J=u(H,{name:"MuiBreadcrumbCollapsed"})(({theme:e})=>c({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":c({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":c({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:P.emphasize(e.palette.grey[200],.12)}:{backgroundColor:P.emphasize(e.palette.grey[600],.12)})})),X=u(K)({width:24,height:16});function Z(e){const{slots:s={},slotProps:n={}}=e,r=_(e,F),o=e;return t.jsx("li",{children:t.jsx(J,c({focusRipple:!0},r,{ownerState:o,children:t.jsx(X,c({as:s.CollapsedIcon,ownerState:o},n.collapsedIcon))}))})}function ee(e){return O("MuiBreadcrumbs",e)}const te=L("MuiBreadcrumbs",["root","ol","li","separator"]),se=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],oe=e=>{const{classes:s}=e;return W({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},ee,s)},re=u(I,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,s)=>[{[`& .${te.li}`]:s.li},s.root]})({}),ae=u("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,s)=>s.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),ne=u("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,s)=>s.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function le(e,s,n,r){return e.reduce((o,i,l)=>(l<e.length-1?o=o.concat(i,t.jsx(ne,{"aria-hidden":!0,className:s,ownerState:r,children:n},`separator-${l}`)):o.push(i),o),[])}const ce=p.forwardRef(function(s,n){const r=$({props:s,name:"MuiBreadcrumbs"}),{children:o,className:i,component:l="nav",slots:j={},slotProps:z={},expandText:v="Show path",itemsAfterCollapse:g=1,itemsBeforeCollapse:b=1,maxItems:h=8,separator:R="/"}=r,k=_(r,se),[E,T]=p.useState(!1),d=c({},r,{component:l,expanded:E,expandText:v,itemsAfterCollapse:g,itemsBeforeCollapse:b,maxItems:h,separator:R}),m=oe(d),w=G({elementType:j.CollapsedIcon,externalSlotProps:z.collapsedIcon,ownerState:d}),M=p.useRef(null),U=a=>{const C=()=>{T(!0);const N=M.current.querySelector("a[href],button,[tabindex]");N&&N.focus()};return b+g>=a.length?a:[...a.slice(0,b),t.jsx(Z,{"aria-label":v,slots:{CollapsedIcon:j.CollapsedIcon},slotProps:{collapsedIcon:w},onClick:C},"ellipsis"),...a.slice(a.length-g,a.length)]},y=p.Children.toArray(o).filter(a=>p.isValidElement(a)).map((a,C)=>t.jsx("li",{className:m.li,children:a},`child-${C}`));return t.jsx(re,c({ref:n,component:l,color:"text.secondary",className:A(m.root,i),ownerState:d},k,{children:t.jsx(ae,{className:m.ol,ref:M,ownerState:d,children:le(E||h&&y.length<=h?y:U(y),m.separator,R,d)})}))}),ie=Q(e=>({action:{cursor:"pointer","&:hover":{color:e.palette.primary.main}},disabled:{cursor:"not-allowed",color:e.palette.text.disabled,"&:hover":{color:e.palette.text.disabled}}})),de=[],S=({items:e=de,isRtl:s})=>{const n=ie();return t.jsx(ce,{separator:s?t.jsx(V,{fontSize:"small"}):t.jsx(Y,{fontSize:"small"}),"aria-label":"breadcrumb",children:e.map(({text:r,action:o,isDisabled:i},l)=>t.jsx(I,{color:"textPrimary",onClick:o,variant:"subtitle1",className:D({[n.action]:typeof o=="function",[n.disabled]:i}),children:r},`${r}-${l}`))})};S.__docgenInfo={description:"",methods:[],displayName:"Breadcrumbs",props:{items:{defaultValue:{value:"[]",computed:!1},required:!1}}};const{fn:x}=__STORYBOOK_MODULE_TEST__,he={title:"Navigation/Breadcrumbs",component:S,tags:["autodocs"]},f={render:()=>t.jsx(q,{cases:{Default:{items:[{text:"Home",action:x()},{text:"Economy",action:x()},{text:"National accounts",action:x()},{text:"Quarterly GDP"}]},"With disabled item":{items:[{text:"Home",action:x()},{text:"Society",isDisabled:!0},{text:"Education at a glance"}]},"Single item":{items:[{text:"Home"}]},Empty:{items:[]}},toggles:{rtl:{label:"Right to left",props:{isRtl:!0},dir:"rtl"}},children:e=>t.jsx(S,{...e})})};f.parameters={...f.parameters,docs:{...f.parameters?.docs,source:{originalSource:`{
2
- render: () => <UseCases cases={{
3
- Default: {
4
- items: [{
5
- text: 'Home',
6
- action: fn()
7
- }, {
8
- text: 'Economy',
9
- action: fn()
10
- }, {
11
- text: 'National accounts',
12
- action: fn()
13
- }, {
14
- text: 'Quarterly GDP'
15
- }]
16
- },
17
- 'With disabled item': {
18
- items: [{
19
- text: 'Home',
20
- action: fn()
21
- }, {
22
- text: 'Society',
23
- isDisabled: true
24
- }, {
25
- text: 'Education at a glance'
26
- }]
27
- },
28
- 'Single item': {
29
- items: [{
30
- text: 'Home'
31
- }]
32
- },
33
- Empty: {
34
- items: []
35
- }
36
- }} toggles={{
37
- rtl: {
38
- label: 'Right to left',
39
- props: {
40
- isRtl: true
41
- },
42
- dir: 'rtl'
43
- }
44
- }}>
45
- {props => <Breadcrumbs {...props} />}
46
- </UseCases>
47
- }`,...f.parameters?.docs?.source}}};const ye=["Controlled"];export{f as Controlled,ye as __namedExportsOrder,he as default};
@@ -1 +0,0 @@
1
- import{R as c,j as n}from"./iframe-CFs6acAJ.js";import{c as i}from"./index-1OaEebp9.js";import{B as d}from"./UseCases-DOcdnBFC.js";import{m as u}from"./makeStyles-CI_GWbdO.js";const p=u(t=>{const o=t.palette.highlight?.hl1||t.palette.primary.dark;return{defaultSelected:{backgroundColor:t.palette.action.hover,"&:hover":{backgroundColor:`${t.palette.action.selected} !important`}},sisccRoot:{"&:hover":{color:t.palette.getContrastText(o),backgroundColor:t.palette.highlight?.hl1||t.palette.primary.dark,...t.mixins?.toggleButton?.hover}},sisccSelected:{color:t.palette.getContrastText(o),backgroundColor:o,...t.mixins?.toggleButton?.selected}}}),g=c.forwardRef(function({className:o,selected:e,alternative:r="default",indicator:f,textColor:m,selectionFollowsFocus:x,...a},s){const l=p();return n.jsx(d,{className:i(o,l[`${r}Root`],{[l[`${r}Selected`]]:e}),"aria-pressed":e,ref:s,...a,children:a.children})});g.__docgenInfo={description:"",methods:[],displayName:"Button",props:{alternative:{defaultValue:{value:"'default'",computed:!1},required:!1}}};export{g as B};
@@ -1,40 +0,0 @@
1
- import{j as n}from"./iframe-CFs6acAJ.js";import{B as t}from"./Button-wMD-_ELw.js";import{U as r}from"./UseCases-DOcdnBFC.js";import{A as s}from"./Add-DbA9Sjeg.js";import"./preload-helper-PPVm8Dsz.js";import"./index-1OaEebp9.js";import"./makeStyles-CI_GWbdO.js";const{fn:l}=__STORYBOOK_MODULE_TEST__,C={title:"Buttons/Button",component:t,tags:["autodocs"]},e={render:()=>n.jsx(r,{base:{children:"Apply",alternative:"default",variant:"text",onClick:l()},cases:{Text:{},Contained:{variant:"contained",children:"Apply layout"},Outlined:{variant:"outlined",children:"Cancel"},"With icon":{startIcon:n.jsx(s,{}),children:"Add filter"},Disabled:{disabled:!0}},toggles:{selected:{label:"Selected",props:{selected:!0}},siscc:{label:"SIS-CC alternative",props:{alternative:"siscc"}}},children:a=>n.jsx(t,{...a})})};e.parameters={...e.parameters,docs:{...e.parameters?.docs,source:{originalSource:`{
2
- render: () => <UseCases base={{
3
- children: 'Apply',
4
- alternative: 'default',
5
- variant: 'text',
6
- onClick: fn()
7
- }} cases={{
8
- Text: {},
9
- Contained: {
10
- variant: 'contained',
11
- children: 'Apply layout'
12
- },
13
- Outlined: {
14
- variant: 'outlined',
15
- children: 'Cancel'
16
- },
17
- 'With icon': {
18
- startIcon: <Add />,
19
- children: 'Add filter'
20
- },
21
- Disabled: {
22
- disabled: true
23
- }
24
- }} toggles={{
25
- selected: {
26
- label: 'Selected',
27
- props: {
28
- selected: true
29
- }
30
- },
31
- siscc: {
32
- label: 'SIS-CC alternative',
33
- props: {
34
- alternative: 'siscc'
35
- }
36
- }
37
- }}>
38
- {props => <Button {...props} />}
39
- </UseCases>
40
- }`,...e.parameters?.docs?.source}}};const v=["Controlled"];export{e as Controlled,v as __namedExportsOrder,C as default};
@@ -1 +0,0 @@
1
- import{r as d,n as C,o as u,p as n,j as p}from"./iframe-CFs6acAJ.js";import{a as m,g as f,b as x,d as v,s as R}from"./UseCases-DOcdnBFC.js";import{P as M}from"./Paper-CC0GihuP.js";function g(s){return m("MuiCard",s)}f("MuiCard",["root"]);const y=["className","raised"],N=s=>{const{classes:t}=s;return v({root:["root"]},g,t)},U=R(M,{name:"MuiCard",slot:"Root",overridesResolver:(s,t)=>t.root})(()=>({overflow:"hidden"})),S=d.forwardRef(function(t,e){const o=C({props:t,name:"MuiCard"}),{className:c,raised:r=!1}=o,i=u(o,y),a=n({},o,{raised:r}),l=N(a);return p.jsx(U,n({className:x(l.root,c),elevation:r?8:void 0,ref:e,ownerState:a},i))});function h(s){return m("MuiCardContent",s)}f("MuiCardContent",["root"]);const j=["className","component"],w=s=>{const{classes:t}=s;return v({root:["root"]},h,t)},P=R("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(s,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),$=d.forwardRef(function(t,e){const o=C({props:t,name:"MuiCardContent"}),{className:c,component:r="div"}=o,i=u(o,j),a=n({},o,{component:r}),l=w(a);return p.jsx(P,n({as:r,className:x(l.root,c),ownerState:a,ref:e},i))});export{S as C,$ as a};
@@ -1,24 +0,0 @@
1
- import{j as e,r as P}from"./iframe-CFs6acAJ.js";import{P as b}from"./index-BaKdw4XG.js";import{G as s}from"./Grid-BGtiGr3C.js";import{T as C}from"./Typography-C1EbuXrl.js";import{m as T}from"./makeStyles-CI_GWbdO.js";import{S as A}from"./Select-CpA9ZMAH.js";import{T as U}from"./TextField-b-uFVlCn.js";import{I as M}from"./InputAdornment-PByjtZDc.js";import{I as Y}from"./IconButton-CDI4ifte.js";import{R as $,D as R,c as W,s as z,a as F,t as X,b as G}from"./chartProperties-DJwlvsfS.js";import{c as H,B as _,U as J}from"./UseCases-DOcdnBFC.js";import{A as q}from"./ArrowForward-Db2J3XTK.js";import"./preload-helper-PPVm8Dsz.js";import"./useTheme-CLKkTAQ7.js";import"./index-1OaEebp9.js";import"./MenuItem-CdawAE5j.js";import"./ListContext-Bto3-d0A.js";import"./listItemTextClasses-CZcTCH7F.js";import"./Select-Bx7OY-3j.js";import"./useSlotProps-CPP70olw.js";import"./Popover-KTeTorzz.js";import"./formControlState-B5L_osRH.js";import"./TextareaAutosize-DDeS9zDl.js";import"./ownerDocument-DW-IO8s5.js";import"./Grow-DHj1j2oj.js";import"./index-CpF9p_TK.js";import"./index-DpyIyUaw.js";import"./utils-hLU04HKI.js";import"./Paper-CC0GihuP.js";import"./List-hIOzS02Y.js";import"./useControlled-DrJ9YzZn.js";import"./isMuiElement-B1RFDH8S.js";import"./utils-CayfTKLP.js";import"./FormControlLabel-D5Yq4DQk.js";import"./useThemeProps-DWvTJzqp.js";import"./getThemeProps-DGheavqV.js";import"./Checkbox-DYdHETI3.js";import"./SwitchBase-CkQZqCGT.js";const Q=H(e.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward"),Z=T(t=>({title:t.mixins?.chartsConfig?.title??{}})),h=({icon:t,label:n})=>{const r=Z();return e.jsxs(s,{container:!0,children:[t,e.jsx(C,{className:r.title,inline:"true",children:n})]})};h.propTypes={label:b.string,icon:b.node};h.__docgenInfo={description:"",methods:[],displayName:"Title",props:{label:{description:"",type:{name:"string"},required:!1},icon:{description:"",type:{name:"node"},required:!1}}};const ee=t=>{if(t?.length!==1)return!1;const n=t[0]?.label;return n==null||n===""},w=(t={},n={})=>{const r=P.useMemo(()=>ee(t.options)?[{...t.options[0],label:n.uniqFocusOption}]:t.options,[n,t.options]),a=P.useMemo(()=>r?Object.fromEntries(r.map(o=>[o.value,o])):{},[r]);return[r,a]},te=t=>(t?.value??[]).map(n=>n?.value),ne=t=>typeof t=="string"?t:t?.value,se=["scatterDimension","scatterX","scatterY","symbolDimension","stackedDimension"],re=t=>[P.useMemo(()=>se.filter(r=>r in t).map(r=>[r,t[r]]),[t])],ie=T(()=>({visibility:{visibility:"hidden"},input:{"&[type=number]::-webkit-inner-spin-button, &[type=number]::-webkit-outer-spin-button":{"-webkit-appearance":"none",margin:0},"&[type=number]":{"-moz-appearance":"textfield"}}})),N=({id:t,value:n,onSubmit:r,onReset:a,resetLabel:o,placeholder:c,isActive:x,...l})=>{const f=ie(),[p,g]=P.useState(n||"");P.useEffect(()=>{g(n)},[n]);const O=`reset-${t}`,v=m=>{typeof r=="function"&&p!==n&&r(m.target.value)},I=()=>{typeof a=="function"?a():g(n)},j=m=>{m.key==="Enter"&&typeof r=="function"&&r(m.target.value)},E=m=>{g(m.target.value)},S=typeof a=="function"||p!==n?e.jsx(M,{position:"end",children:e.jsx(Y,{id:O,"aria-label":o,onKeyPress:j,onClick:I,size:"large",children:e.jsx($,{fontSize:"small"})})}):null;return e.jsx(U,{inputProps:{className:f.input},onBlur:v,margin:"dense",size:"small",variant:"outlined",onKeyPress:j,onChange:E,id:t,value:p,InputProps:{endAdornment:S},placeholder:typeof c=="number"?String(c):c,...l})};N.__docgenInfo={description:"",methods:[],displayName:"Input"};const ae={},oe={},le={},ce=t=>({endAdornment:null,...t}),y=({minWidth:t=220,properties:n=ae,labels:r=oe,pkey:a,mkey:o,xs:c=12,sm:x=12,lg:l=12,InputProps:f=le})=>{if(a==null||!Object.hasOwn(n,a))return null;const p=n[a]??{};return e.jsx(s,{item:!0,xs:c,sm:x,lg:l,style:{minWidth:t},children:e.jsx(N,{...p,value:p.value??"",type:"number",label:r[o||a],fullWidth:!0,InputProps:ce(f)})})};y.__docgenInfo={description:"",methods:[],displayName:"InputProxy",props:{minWidth:{defaultValue:{value:"220",computed:!1},required:!1},properties:{defaultValue:{value:"{}",computed:!1},required:!1},labels:{defaultValue:{value:"{}",computed:!1},required:!1},xs:{defaultValue:{value:"12",computed:!1},required:!1},sm:{defaultValue:{value:"12",computed:!1},required:!1},lg:{defaultValue:{value:"12",computed:!1},required:!1},InputProps:{defaultValue:{value:"{}",computed:!1},required:!1}}};const d=({keys:t,properties:n,children:r})=>t.some(a=>Object.hasOwn(n,a))?r:null;d.propTypes={children:b.node,keys:b.array,properties:b.object};const D=(t,n)=>[`min${n}`,`max${n}`,`pivot${n}`,`step${n}`].filter(a=>a in t),ue=T(t=>({greyVariant:{backgroundColor:t.palette.secondary.dark,color:t.palette.grey[600]}})),de={},pe={},L=(t,n)=>{if(Object.is(t,n))return!0;if(typeof t!="object"||typeof n!="object"||t===null||n===null||Array.isArray(t)!==Array.isArray(n))return!1;const r=Object.keys(t);return r.length===Object.keys(n).length&&r.every(a=>Object.hasOwn(n,a)&&L(t[a],n[a]))},V=({labels:t=de,properties:n=pe})=>{const r=ue(),[a]=re(n),o=D(n,"X"),c=D(n,"Y"),{highlight:x,baseline:l}=n,[f,p]=w(x,t),[g,O]=w(l,t),{stackedMode:v={}}=n,{options:I=[]}=v,{displayMode:j={}}=n,{options:E=[]}=j,S=["dimensions","stackedDimension","scatterDimension","symbolDimension"],m=["title","subtitle","source","logo","copyright"];return Object.keys(n).length===0?null:e.jsxs(s,{container:!0,spacing:3,"data-testid":"charts-config-test-id",children:[e.jsx(d,{keys:S,properties:n,children:e.jsx(s,{item:!0,xs:12,container:!0,spacing:2,children:e.jsxs(s,{item:!0,xs:12,container:!0,children:[e.jsx(s,{item:!0,xs:12,children:e.jsx(h,{label:t.series})}),e.jsx(s,{item:!0,xs:12,children:e.jsxs(s,{container:!0,spacing:1,children:[e.jsx(d,{keys:["stackedMode"],properties:n,children:e.jsxs(s,{item:!0,container:!0,spacing:1,alignItems:"center",style:{minWidth:320},children:[e.jsx(s,{item:!0,xs:!0,children:e.jsx(C,{variant:"body2",children:t.stackedMode})}),I.map(i=>e.jsx(s,{item:!0,children:e.jsx(_,{variant:i.value===v.value?"contained":"outlined",onClick:()=>v.onChange(i.value),color:"primary",children:e.jsx(C,{variant:"body2",children:t.stackedModeOptions?.[i.value]})})},i.value))]})}),a.map(([i,u])=>e.jsx(s,{item:!0,xs:12,style:{minWidth:320},children:e.jsx(A,{...u,onChange:u.onChange,label:t[i],value:ne(u.value),items:u.options})},i))]})})]})})}),e.jsxs(s,{item:!0,xs:12,container:!0,spacing:2,children:[e.jsx(d,{keys:["highlight","baseline"],properties:n,children:e.jsxs(s,{item:!0,xs:12,lg:8,container:!0,alignContent:"flex-start",children:[e.jsx(s,{item:!0,xs:12,children:e.jsx(h,{label:t.focus})}),e.jsx(s,{item:!0,xs:12,children:e.jsxs(s,{container:!0,spacing:1,children:[e.jsx(s,{item:!0,xs:12,style:{minWidth:320},children:e.jsx(A,{...x,onChange:i=>x.onChange(i.map(u=>p[u])),value:te(x),items:f,isMultiple:!0,isClearable:!0,label:t.highlight,placeholder:t.select,optionsKey:"highlight"})}),e.jsx(s,{item:!0,xs:12,style:{minWidth:320},children:e.jsx(A,{...l,onChange:i=>{const u=O[i],B=(Array.isArray(l.value)?l.value:[]).some(K=>L(K,u));l.onChange(B?[]:[u])},value:l?.value?.[0]?.value,items:g,isClearable:!0,label:t.baseline,placeholder:t.select,optionsKey:"baseline"})})]})})]})}),e.jsxs(s,{item:!0,xs:12,lg:4,container:!0,alignContent:"flex-start",children:[e.jsx(s,{item:!0,xs:12,children:e.jsx(h,{label:t.size})}),e.jsx(s,{item:!0,xs:12,children:e.jsxs(s,{container:!0,spacing:1,children:[e.jsx(y,{pkey:"width",labels:t,properties:n,InputProps:{endAdornment:e.jsx(M,{position:"end",children:"px"})}}),e.jsx(y,{pkey:"height",labels:t,properties:n,InputProps:{endAdornment:e.jsx(M,{position:"end",children:"px"})}})]})})]})]}),e.jsxs(s,{item:!0,xs:12,container:!0,spacing:2,children:[e.jsx(d,{keys:o,properties:n,children:e.jsxs(s,{item:!0,xs:12,container:!0,className:r.greyVariant,children:[e.jsx(s,{item:!0,xs:12,children:e.jsx(h,{label:t.axisX,icon:e.jsx(q,{})})}),e.jsx(s,{item:!0,xs:12,children:e.jsx(s,{container:!0,spacing:1,children:o.map(i=>e.jsx(y,{pkey:i,mkey:i.slice(0,-1),lg:12/o.length,labels:t,properties:n},i))})})]})}),e.jsx(d,{keys:["freqStep"],properties:n,children:e.jsxs(s,{item:!0,xs:12,container:!0,className:r.greyVariant,children:[e.jsx(s,{item:!0,xs:12,children:e.jsx(h,{label:t.axisX,icon:e.jsx(q,{})})}),e.jsx(s,{item:!0,xs:12,children:e.jsx(s,{container:!0,spacing:1,children:e.jsx(y,{pkey:"freqStep",labels:t,properties:n})})})]})}),e.jsx(d,{keys:c,properties:n,children:e.jsxs(s,{item:!0,xs:12,container:!0,className:r.greyVariant,children:[e.jsx(s,{item:!0,xs:12,children:e.jsx(h,{label:t.axisY,icon:e.jsx(Q,{})})}),e.jsx(s,{item:!0,xs:12,children:e.jsx(s,{container:!0,spacing:1,children:c.map(i=>e.jsx(y,{pkey:i,mkey:i.slice(0,-1),lg:12/c.length,labels:t,properties:n},i))})})]})})]}),e.jsx(d,{keys:m,properties:n,children:e.jsx(s,{item:!0,xs:12,container:!0,spacing:2,children:e.jsx(s,{item:!0,xs:12,container:!0,children:e.jsx(R,{labels:t,properties:n})})})}),e.jsx(d,{keys:["displayMode"],properties:n,children:e.jsx(s,{item:!0,xs:12,container:!0,spacing:2,children:e.jsx(s,{item:!0,xs:12,container:!0,children:e.jsxs(s,{item:!0,container:!0,spacing:1,alignItems:"center",style:{minWidth:320},children:[e.jsx(s,{item:!0,xs:!0,children:e.jsx(C,{variant:"body2",children:t.display})}),E.map(i=>e.jsx(s,{item:!0,children:e.jsx(_,{variant:i.value===j.value?"contained":"outlined",onClick:()=>j.onChange(i.value),color:"primary",children:e.jsx(C,{variant:"body2",children:t.displayOptions?.[i.value]})})},i.value))]})})})})]})};V.__docgenInfo={description:"",methods:[],displayName:"ChartsConfig",props:{labels:{defaultValue:{value:"{}",computed:!1},required:!1},properties:{defaultValue:{value:"{}",computed:!1},required:!1}}};const Qe={title:"Data/ChartsConfig",component:V,tags:["autodocs"]},k={render:()=>e.jsx(J,{base:{labels:W},cases:{"Bar chart":{properties:G()},"Timeline chart":{properties:X()},"Stacked chart":{properties:F()},"Scatter chart":{properties:z()},Empty:{properties:{}}},children:t=>e.jsx(V,{...t})})};k.parameters={...k.parameters,docs:{...k.parameters?.docs,source:{originalSource:`{
2
- render: () => <UseCases base={{
3
- labels: chartLabels
4
- }} cases={{
5
- 'Bar chart': {
6
- properties: barChartProperties()
7
- },
8
- 'Timeline chart': {
9
- properties: timelineChartProperties()
10
- },
11
- 'Stacked chart': {
12
- properties: stackedChartProperties()
13
- },
14
- 'Scatter chart': {
15
- properties: scatterChartProperties()
16
- },
17
- // renders nothing without properties
18
- Empty: {
19
- properties: {}
20
- }
21
- }}>
22
- {props => <ChartsConfig {...props} />}
23
- </UseCases>
24
- }`,...k.parameters?.docs?.source}}};const Ze=["Controlled"];export{k as Controlled,Ze as __namedExportsOrder,Qe as default};
@@ -1 +0,0 @@
1
- import{j as t,r as u,n as P,o as y,p as s,s as l,q as B}from"./iframe-CFs6acAJ.js";import{c as x,a as M,g,b as S,d as R,s as E,r as H}from"./UseCases-DOcdnBFC.js";import{S as _}from"./SwitchBase-CkQZqCGT.js";const O=x(t.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),U=x(t.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),V=x(t.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function L(o){return M("MuiCheckbox",o)}const m=g("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),N=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],F=o=>{const{classes:e,indeterminate:c,color:a,size:r}=o,n={root:["root",c&&"indeterminate",`color${l(a)}`,`size${l(r)}`]},d=R(n,L,e);return s({},e,d)},q=E(_,{shouldForwardProp:o=>H(o)||o==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:c}=o;return[e.root,c.indeterminate&&e.indeterminate,e[`size${l(c.size)}`],c.color!=="default"&&e[`color${l(c.color)}`]]}})(({theme:o,ownerState:e})=>s({color:(o.vars||o).palette.text.secondary},!e.disableRipple&&{"&:hover":{backgroundColor:o.vars?`rgba(${e.color==="default"?o.vars.palette.action.activeChannel:o.vars.palette[e.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})`:B.alpha(e.color==="default"?o.palette.action.active:o.palette[e.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${m.checked}, &.${m.indeterminate}`]:{color:(o.vars||o).palette[e.color].main},[`&.${m.disabled}`]:{color:(o.vars||o).palette.action.disabled}})),D=t.jsx(U,{}),W=t.jsx(O,{}),w=t.jsx(V,{}),K=u.forwardRef(function(e,c){var a,r;const n=P({props:e,name:"MuiCheckbox"}),{checkedIcon:d=D,color:b="primary",icon:z=W,indeterminate:i=!1,indeterminateIcon:h=w,inputProps:I,size:p="medium",className:$}=n,j=y(n,N),C=i?h:z,k=i?h:d,v=s({},n,{color:b,indeterminate:i,size:p}),f=F(v);return t.jsx(q,s({type:"checkbox",inputProps:s({"data-indeterminate":i},I),icon:u.cloneElement(C,{fontSize:(a=C.props.fontSize)!=null?a:p}),checkedIcon:u.cloneElement(k,{fontSize:(r=k.props.fontSize)!=null?r:p}),ownerState:v,ref:c,className:S(f.root,$)},j,{classes:f}))});export{K as C};
@@ -1,48 +0,0 @@
1
- import{j as o}from"./iframe-CFs6acAJ.js";import{C as n}from"./CustomChip-Dp74AGb1.js";import{m as a}from"./utils-B01EDmYN.js";import{U as t}from"./UseCases-DOcdnBFC.js";import"./preload-helper-PPVm8Dsz.js";import"./index-BaKdw4XG.js";import"./index-1OaEebp9.js";import"./Cross-FlyYvK4d.js";import"./utils-CayfTKLP.js";import"./Tooltip-BEu-5uYh.js";import"./Tooltip-AZ9g6FIz.js";import"./Grow-DHj1j2oj.js";import"./index-CpF9p_TK.js";import"./index-DpyIyUaw.js";import"./useTheme-CLKkTAQ7.js";import"./utils-hLU04HKI.js";import"./useControlled-DrJ9YzZn.js";import"./useSlotProps-CPP70olw.js";import"./ownerDocument-DW-IO8s5.js";import"./makeStyles-CI_GWbdO.js";import"./useKeybordEscapeHandler-B1j2-aAU.js";import"./IconButton-CDI4ifte.js";const{fn:i}=__STORYBOOK_MODULE_TEST__,y={title:"Chips/CustomChip",component:n,tags:["autodocs"]},e={render:()=>o.jsx(t,{base:{id:"FRA",parentId:"REF_AREA",label:"France",ariaLabel:"Remove",onDelete:i()},cases:{Default:{},"With hierarchy tooltip":{id:"PARIS",label:"Paris",ariaLabelTooltip:" parent of ",items:[{id:"EU",label:"Europe"},{id:"FRA",label:"France"},{id:"PARIS",label:"Paris"}],renderer:a({isRtl:!1,labelRenderer:r=>r.label})},"Long label":{id:"B1GQ",parentId:"TRANSACTION",label:"Gross domestic product at market prices, chain linked volumes, reference year 2015"}},toggles:{notRemovable:{label:"Not removable",props:{onDelete:void 0}}},children:r=>o.jsx("div",{style:{maxWidth:280},children:o.jsx(n,{...r})})})};e.parameters={...e.parameters,docs:{...e.parameters?.docs,source:{originalSource:`{
2
- render: () => <UseCases base={{
3
- id: 'FRA',
4
- parentId: 'REF_AREA',
5
- label: 'France',
6
- ariaLabel: 'Remove',
7
- onDelete: fn()
8
- }} cases={{
9
- Default: {},
10
- 'With hierarchy tooltip': {
11
- id: 'PARIS',
12
- label: 'Paris',
13
- ariaLabelTooltip: ' parent of ',
14
- items: [{
15
- id: 'EU',
16
- label: 'Europe'
17
- }, {
18
- id: 'FRA',
19
- label: 'France'
20
- }, {
21
- id: 'PARIS',
22
- label: 'Paris'
23
- }],
24
- renderer: myTooltipRenderer({
25
- isRtl: false,
26
- labelRenderer: item => item.label
27
- })
28
- },
29
- 'Long label': {
30
- id: 'B1GQ',
31
- parentId: 'TRANSACTION',
32
- label: 'Gross domestic product at market prices, chain linked volumes, reference year 2015'
33
- }
34
- }} toggles={{
35
- notRemovable: {
36
- label: 'Not removable',
37
- props: {
38
- onDelete: undefined
39
- }
40
- }
41
- }}>
42
- {props => <div style={{
43
- maxWidth: 280
44
- }}>
45
- <CustomChip {...props} />
46
- </div>}
47
- </UseCases>
48
- }`,...e.parameters?.docs?.source}}};const P=["Controlled"];export{e as Controlled,P as __namedExportsOrder,y as default};
@@ -1,28 +0,0 @@
1
- import{r as N,n as w,o as U,p as o,j as g,s as c,w as D,x as M}from"./iframe-CFs6acAJ.js";import{a as z,g as E,b as I,d as F,s as v}from"./UseCases-DOcdnBFC.js";function K(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
2
- 0% {
3
- transform: rotate(0deg);
4
- }
5
-
6
- 100% {
7
- transform: rotate(360deg);
8
- }
9
- `)),G=M(b||(b=l`
10
- 0% {
11
- stroke-dasharray: 1px, 200px;
12
- stroke-dashoffset: 0;
13
- }
14
-
15
- 50% {
16
- stroke-dasharray: 100px, 200px;
17
- stroke-dashoffset: -15px;
18
- }
19
-
20
- 100% {
21
- stroke-dasharray: 100px, 200px;
22
- stroke-dashoffset: -125px;
23
- }
24
- `)),L=r=>{const{classes:e,variant:s,color:a,disableShrink:d}=r,u={root:["root",s,`color${c(a)}`],svg:["svg"],circle:["circle",`circle${c(s)}`,d&&"circleDisableShrink"]};return F(u,K,e)},V=v("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(r,e)=>{const{ownerState:s}=r;return[e.root,e[s.variant],e[`color${c(s.color)}`]]}})(({ownerState:r,theme:e})=>o({display:"inline-block"},r.variant==="determinate"&&{transition:e.transitions.create("transform")},r.color!=="inherit"&&{color:(e.vars||e).palette[r.color].main}),({ownerState:r})=>r.variant==="indeterminate"&&D(S||(S=l`
25
- animation: ${0} 1.4s linear infinite;
26
- `),B)),Z=v("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(r,e)=>e.svg})({display:"block"}),q=v("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(r,e)=>{const{ownerState:s}=r;return[e.circle,e[`circle${c(s.variant)}`],s.disableShrink&&e.circleDisableShrink]}})(({ownerState:r,theme:e})=>o({stroke:"currentColor"},r.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},r.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:r})=>r.variant==="indeterminate"&&!r.disableShrink&&D($||($=l`
27
- animation: ${0} 1.4s ease-in-out infinite;
28
- `),G)),J=N.forwardRef(function(e,s){const a=w({props:e,name:"MuiCircularProgress"}),{className:d,color:u="primary",disableShrink:R=!1,size:m=40,style:_,thickness:i=3.6,value:p=0,variant:k="indeterminate"}=a,j=U(a,W),n=o({},a,{color:u,disableShrink:R,size:m,thickness:i,value:p,variant:k}),f=L(n),h={},x={},y={};if(k==="determinate"){const C=2*Math.PI*((t-i)/2);h.strokeDasharray=C.toFixed(3),y["aria-valuenow"]=Math.round(p),h.strokeDashoffset=`${((100-p)/100*C).toFixed(3)}px`,x.transform="rotate(-90deg)"}return g.jsx(V,o({className:I(f.root,d),style:o({width:m,height:m},x,_),ownerState:n,ref:s,role:"progressbar"},y,j,{children:g.jsx(Z,{className:f.svg,ownerState:n,viewBox:`${t/2} ${t/2} ${t} ${t}`,children:g.jsx(q,{className:f.circle,style:h,ownerState:n,cx:t,cy:t,r:(t-i)/2,fill:"none",strokeWidth:i})})}))});export{J as C};
@@ -1 +0,0 @@
1
- import{j as o}from"./iframe-CFs6acAJ.js";import{c as s}from"./UseCases-DOcdnBFC.js";const e=s(o.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");export{e as C};
@@ -1 +0,0 @@
1
- import{r as y,n as Z,v as tt,o as et,p as o,j as C}from"./iframe-CFs6acAJ.js";import{a as nt,g as it,h as ot,u as rt,b as st,d as at,s as T}from"./UseCases-DOcdnBFC.js";import{T as lt,g as P}from"./utils-hLU04HKI.js";import{u as pt}from"./useTheme-CLKkTAQ7.js";function dt(n){return nt("MuiCollapse",n)}it("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const ct=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],ut=n=>{const{orientation:e,classes:r}=n,d={root:["root",`${e}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${e}`],wrapperInner:["wrapperInner",`${e}`]};return at(d,dt,r)},ht=T("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(n,e)=>{const{ownerState:r}=n;return[e.root,e[r.orientation],r.state==="entered"&&e.entered,r.state==="exited"&&!r.in&&r.collapsedSize==="0px"&&e.hidden]}})(({theme:n,ownerState:e})=>o({height:0,overflow:"hidden",transition:n.transitions.create("height")},e.orientation==="horizontal"&&{height:"auto",width:0,transition:n.transitions.create("width")},e.state==="entered"&&o({height:"auto",overflow:"visible"},e.orientation==="horizontal"&&{width:"auto"}),e.state==="exited"&&!e.in&&e.collapsedSize==="0px"&&{visibility:"hidden"})),mt=T("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(n,e)=>e.wrapper})(({ownerState:n})=>o({display:"flex",width:"100%"},n.orientation==="horizontal"&&{width:"auto",height:"100%"})),ft=T("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(n,e)=>e.wrapperInner})(({ownerState:n})=>o({width:"100%"},n.orientation==="horizontal"&&{width:"auto",height:"100%"})),gt=y.forwardRef(function(e,r){const d=Z({props:e,name:"MuiCollapse"}),{addEndListener:S,children:b,className:U,collapsedSize:f="0px",component:A,easing:D,in:$,onEnter:W,onEntered:j,onEntering:I,onExit:M,onExited:_,onExiting:F,orientation:H="vertical",style:z,timeout:a=tt.standard,TransitionComponent:k=lt}=d,q=et(d,ct),g=o({},d,{orientation:H,collapsedSize:f}),c=ut(g),L=pt(),B=ot(),l=y.useRef(null),v=y.useRef(),x=typeof f=="number"?`${f}px`:f,u=H==="horizontal",h=u?"width":"height",E=y.useRef(null),G=rt(r,E),p=t=>i=>{if(t){const s=E.current;i===void 0?t(s):t(s,i)}},R=()=>l.current?l.current[u?"clientWidth":"clientHeight"]:0,J=p((t,i)=>{l.current&&u&&(l.current.style.position="absolute"),t.style[h]=x,W&&W(t,i)}),K=p((t,i)=>{const s=R();l.current&&u&&(l.current.style.position="");const{duration:m,easing:w}=P({style:z,timeout:a,easing:D},{mode:"enter"});if(a==="auto"){const N=L.transitions.getAutoHeightDuration(s);t.style.transitionDuration=`${N}ms`,v.current=N}else t.style.transitionDuration=typeof m=="string"?m:`${m}ms`;t.style[h]=`${s}px`,t.style.transitionTimingFunction=w,I&&I(t,i)}),O=p((t,i)=>{t.style[h]="auto",j&&j(t,i)}),Q=p(t=>{t.style[h]=`${R()}px`,M&&M(t)}),V=p(_),X=p(t=>{const i=R(),{duration:s,easing:m}=P({style:z,timeout:a,easing:D},{mode:"exit"});if(a==="auto"){const w=L.transitions.getAutoHeightDuration(i);t.style.transitionDuration=`${w}ms`,v.current=w}else t.style.transitionDuration=typeof s=="string"?s:`${s}ms`;t.style[h]=x,t.style.transitionTimingFunction=m,F&&F(t)}),Y=t=>{a==="auto"&&B.start(v.current||0,t),S&&S(E.current,t)};return C.jsx(k,o({in:$,onEnter:J,onEntered:O,onEntering:K,onExit:Q,onExited:V,onExiting:X,addEndListener:Y,nodeRef:E,timeout:a==="auto"?null:a},q,{children:(t,i)=>C.jsx(ht,o({as:A,className:st(c.root,U,{entered:c.entered,exited:!$&&x==="0px"&&c.hidden}[t]),style:o({[u?"minWidth":"minHeight"]:x},z),ref:G},i,{ownerState:o({},g,{state:t}),children:C.jsx(mt,{ownerState:o({},g,{state:t}),className:c.wrapper,ref:l,children:C.jsx(ft,{ownerState:o({},g,{state:t}),className:c.wrapperInner,children:b})})}))}))});gt.muiSupportAuto=!0;export{gt as C};
@@ -1,60 +0,0 @@
1
- import{j as t,R as V,r as v}from"./iframe-CFs6acAJ.js";import{T as $}from"./ToggleButton-DGaXAw7I.js";import{P as f}from"./index-BaKdw4XG.js";import{G as C}from"./Grid-BGtiGr3C.js";import{T as S}from"./Typography-C1EbuXrl.js";import{B as G,S as H,w as W,U as F}from"./UseCases-DOcdnBFC.js";import{L as z}from"./Link-Cqk3qylD.js";import{m as K}from"./makeStyles-CI_GWbdO.js";import{P as Y}from"./Paper-CC0GihuP.js";import{C as Q}from"./Collapse-B5qxr7n7.js";import{u as J}from"./useMediaQuery-T15Nx9c_.js";import"./preload-helper-PPVm8Dsz.js";import"./index-1OaEebp9.js";import"./KeyboardArrowUp-BduBSO9n.js";import"./useTheme-CLKkTAQ7.js";import"./utils-hLU04HKI.js";import"./index-CpF9p_TK.js";import"./index-DpyIyUaw.js";import"./getThemeProps-DGheavqV.js";const X=K(e=>({paperItem:{alignItems:"baseline"},itemTitle:{...e.typography.body2,color:e.palette.primary.main},button:{"&:hover":{backgroundColor:e.palette.tertiary?.light||e.palette.secondary.light},padding:e.spacing(1.25),textAlign:"left",textTransform:"none",justifyContent:"flex-start",display:"flex"},itemSubtitle:{...e.typography.body1,display:"flex",flexDirection:"column",color:e.palette.grey[800]},itemSubtitleLink:{...e.typography.body1,color:e.palette.grey[800],"&:hover":{color:e.palette.primary.main}},svg:{color:e.palette.grey[600],fontSize:"1rem",marginRight:e.spacing(.5),marginTop:e.spacing(.25),marginBottom:"auto"}})),_=({parentId:e,item:a,action:s,testId:r,isSecondLevelClikable:p,labelAccessor:d})=>{const l=X(),m=a.subtopics??[],b=p?m:m.flatMap((o,c)=>c===0?[o]:[" • ",o]);return t.jsx(C,{className:l.paperItem,children:t.jsx(S,{variant:"h4",children:t.jsxs(G,{"aria-label":a.label,className:l.button,fullWidth:!0,"data-testid":r,role:"link",onClick:()=>{typeof s=="function"&&s(e,a.id)},tabIndex:0,children:[t.jsx(H,{className:l.svg,children:t.jsx("path",{d:a.svgPath})}),t.jsxs(C,{container:!0,item:!0,xs:12,direction:"column",children:[t.jsx("span",{className:l.itemTitle,children:d(a,e)}),t.jsx("span",{className:l.itemSubtitle,children:b.map((o,c)=>{if(!(o instanceof Object))return o;if(!p)return d(o,e);const u=o.id;return t.jsx(S,{variant:"h5",children:t.jsx(z,{className:l.itemSubtitleLink,role:"link",onClick:i=>{typeof s=="function"&&(s(e,u),i.stopPropagation())},onKeyDown:i=>{if(i.key==="Enter"||i.key===" "){if(typeof s!="function")return;s(e,u),i.stopPropagation()}},tabIndex:0,underline:"none",style:{display:"list-item"},children:d(o,e)})},`${u}::${c}`)})})]})]})})})};_.propTypes={parentId:f.string,testId:f.string,item:f.object,action:f.func,isSecondLevelClikable:f.bool,labelAccessor:f.func};_.__docgenInfo={description:"",methods:[],displayName:"Item",props:{parentId:{description:"",type:{name:"string"},required:!1},testId:{description:"",type:{name:"string"},required:!1},item:{description:"",type:{name:"object"},required:!1},action:{description:"",type:{name:"func"},required:!1},isSecondLevelClikable:{description:"",type:{name:"bool"},required:!1},labelAccessor:{description:"",type:{name:"func"},required:!1}}};const q=({isMobileView:e,children:a})=>t.jsx(Y,{sx:{padding:2.5,margin:1.25,borderRadius:"unset",...e&&{display:"flex",flexDirection:"column",columnCount:"unset"}},children:t.jsx(C,{sx:{columnCount:e?"unset":3,columnFill:"balance",...e&&{display:"flex",flexDirection:"column"}},children:a})});q.__docgenInfo={description:"",methods:[],displayName:"CustomPaper"};const Z=[],M=({id:e,toggleId:a,values:s=Z,isMobileView:r,action:p,isSecondLevelClikable:d,labelAccessor:l,testId:m})=>{const b=a===e;return t.jsx(Q,{in:b,timeout:"auto",unmountOnExit:!0,sx:{width:"100%"},children:t.jsx(q,{elevation:10,isMobileView:r,children:s.map((o,c)=>{const u=o?.id??c;return t.jsx(_,{testId:`${m}_${e}_value_${u}`,parentId:e,item:o,action:p,isSecondLevelClikable:d,labelAccessor:l},`${c}-${u}`)})})})},T=V.memo(M);M.__docgenInfo={description:"",methods:[],displayName:"CollapseSection",props:{values:{defaultValue:{value:"[]",computed:!1},required:!1}}};const ee=[12,12,6,4,3,3,2,2,2,2,2,2,1],te=[],ae={},ne=()=>{},se=e=>e.breakpoints.down("md"),oe=e=>e?.label,j=({items:e=te,action:a=ne,nbColumns:s=3,testId:r="collapseButton",isSecondLevelClikable:p,gridButtonsProps:d=ae,breakpoint:l=se,justify:m,textTransform:b="none",labelAccessor:o=oe,accessibility:c,selectedItemId:u})=>{const i=J(l),[y,I]=v.useState(u),O=v.useRef(null),N=ee[s]??3,D=v.useCallback(n=>{I(g=>g===n?null:n)},[]),A=v.useCallback(n=>{n.key!=="Escape"||!y||(n.stopPropagation(),O.current?.querySelector('[aria-expanded="true"]')?.focus(),I(null))},[y]);return t.jsxs(C,{container:!0,ref:O,"data-testid":r,justifyContent:m,onKeyDown:A,sx:{...c&&{"& .MuiButton-root:focus-visible, & .MuiLink-root:focus-visible":{outlineColor:"highlight.hl1",outlineWidth:2,outlineStyle:"auto"}}},children:[e.map(({id:n,label:g,values:L=[]},U)=>v.createElement(C,{item:!0,xs:12,sm:12,md:N,...d,key:`${U}::${n}`,sx:{p:1}},t.jsxs(S,{variant:"h3",children:[t.jsx($,{textTransform:b,label:g,isOpen:y===n,toggle:()=>D(n),testId:`${r}_${n}`,id:n}),i&&t.jsx(T,{id:n,toggleId:y,values:L,isMobileView:i,action:a,isSecondLevelClikable:p,labelAccessor:o,testId:r})]}))),!i&&e.map(({id:n,values:g=[]})=>t.jsx(T,{id:n,toggleId:y,values:g,isMobileView:i,action:a,isSecondLevelClikable:p,labelAccessor:o,testId:r},`desktop-collapse-${n}`))]})};j.__docgenInfo={description:"",methods:[],displayName:"CollapseButtons",props:{items:{defaultValue:{value:"[]",computed:!1},required:!1},action:{defaultValue:{value:"() => {}",computed:!1},required:!1},nbColumns:{defaultValue:{value:"3",computed:!1},required:!1},testId:{defaultValue:{value:"'collapseButton'",computed:!1},required:!1},gridButtonsProps:{defaultValue:{value:"{}",computed:!1},required:!1},breakpoint:{defaultValue:{value:"(theme) => theme.breakpoints.down('md')",computed:!1},required:!1},textTransform:{defaultValue:{value:"'none'",computed:!1},required:!1},labelAccessor:{defaultValue:{value:"(obj) => obj?.label",computed:!1},required:!1}}};const{fn:le,expect:P,userEvent:E}=__STORYBOOK_MODULE_TEST__,R="M4 4h16v16H4z",h="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20z",k="M12 3 2 21h20z",w=[{id:"topic",label:"Topic",values:[{id:"ECO",label:"Economy",svgPath:R,subtopics:[{id:"ECO_NA",label:"National accounts"},{id:"ECO_PRICES",label:"Prices"},{id:"ECO_TRADE",label:"International trade"}]},{id:"SOC",label:"Society",svgPath:h,subtopics:[{id:"SOC_EDU",label:"Education"},{id:"SOC_HEALTH",label:"Health"}]},{id:"ENV",label:"Environment",svgPath:k,subtopics:[{id:"ENV_AIR",label:"Air and climate"},{id:"ENV_WATER",label:"Water"}]},{id:"GOV",label:"Government",svgPath:R,subtopics:[]}]},{id:"area",label:"Reference area",values:[{id:"OECD",label:"OECD countries",svgPath:h},{id:"EU",label:"European Union",svgPath:h},{id:"G20",label:"G20",svgPath:h}]},{id:"source",label:"Source",values:[{id:"OECD_SRC",label:"OECD",svgPath:k},{id:"IMF",label:"International Monetary Fund",svgPath:k}]}],B=le(),je={title:"Buttons/CollapseButtons",component:j,tags:["autodocs"]},x={render:()=>t.jsx(F,{base:{items:w,action:B,nbColumns:3},cases:{Default:{},Opened:{selectedItemId:"topic"},"Four columns":{nbColumns:4,items:[...w,{id:"frequency",label:"Frequency",values:[]}]},Mobile:{selectedItemId:"topic",breakpoint:e=>e.breakpoints.up("xs")}},toggles:{clickable:{label:"Clickable subtopics",props:{isSecondLevelClikable:!0}},accessibility:{label:"Accessibility",props:{accessibility:!0}}},children:(e,a)=>t.jsx("div",{style:{maxWidth:a==="Mobile"?360:void 0},children:t.jsx(j,{...e})})}),play:async({canvasElement:e})=>{const a=W(e),s=a.getByRole("button",{name:"Topic"});await E.click(s),await P(s).toHaveAttribute("aria-expanded","true"),await E.click(await a.findByRole("link",{name:"Economy"})),await P(B).toHaveBeenCalledWith("topic","ECO"),await E.click(s)}};x.parameters={...x.parameters,docs:{...x.parameters?.docs,source:{originalSource:`{
2
- render: () => <UseCases base={{
3
- items: topics,
4
- action,
5
- nbColumns: 3
6
- }} cases={{
7
- Default: {},
8
- Opened: {
9
- selectedItemId: 'topic'
10
- },
11
- 'Four columns': {
12
- nbColumns: 4,
13
- items: [...topics, {
14
- id: 'frequency',
15
- label: 'Frequency',
16
- values: []
17
- }]
18
- },
19
- // forces the mobile layout whatever the screen width
20
- Mobile: {
21
- selectedItemId: 'topic',
22
- breakpoint: theme => theme.breakpoints.up('xs')
23
- }
24
- }} toggles={{
25
- clickable: {
26
- label: 'Clickable subtopics',
27
- props: {
28
- isSecondLevelClikable: true
29
- }
30
- },
31
- accessibility: {
32
- label: 'Accessibility',
33
- props: {
34
- accessibility: true
35
- }
36
- }
37
- }}>
38
- {(props, useCase) => <div style={{
39
- maxWidth: useCase === 'Mobile' ? 360 : undefined
40
- }}>
41
- <CollapseButtons {...props} />
42
- </div>}
43
- </UseCases>,
44
- play: async ({
45
- canvasElement
46
- }) => {
47
- const canvas = withinUseCase(canvasElement);
48
- const toggle = canvas.getByRole('button', {
49
- name: 'Topic'
50
- });
51
- await userEvent.click(toggle);
52
- await expect(toggle).toHaveAttribute('aria-expanded', 'true');
53
- await userEvent.click(await canvas.findByRole('link', {
54
- name: 'Economy'
55
- }));
56
- await expect(action).toHaveBeenCalledWith('topic', 'ECO');
57
- // leave the story in its default state
58
- await userEvent.click(toggle);
59
- }
60
- }`,...x.parameters?.docs?.source}}};const Ie=["Controlled"];export{x as Controlled,Ie as __namedExportsOrder,je as default};
@@ -1,44 +0,0 @@
1
- import{R as $,r as p,j as e}from"./iframe-CFs6acAJ.js";import{P as d}from"./index-BaKdw4XG.js";import{c as j}from"./index-1OaEebp9.js";import{u as W}from"./useTheme-CLKkTAQ7.js";import{B as S,D as K,w as G,U as H}from"./UseCases-DOcdnBFC.js";import{K as M,a as B}from"./KeyboardArrowUp-BduBSO9n.js";import{C as z}from"./Collapse-B5qxr7n7.js";import{m as R}from"./makeStyles-CI_GWbdO.js";import{N as Y}from"./NoData-D_D_JmYR.js";import{G as J}from"./Grid-BGtiGr3C.js";import{C as Q}from"./CircularProgress-CsdMhVdp.js";import{C as X}from"./Container-CSRCzcsV.js";import{I as Z}from"./IconButton-CDI4ifte.js";import{I as ee}from"./Info-ButERCLo.js";import{T as f}from"./Typography-C1EbuXrl.js";import{D as ae}from"./Download-DPuoSNMG.js";import"./preload-helper-PPVm8Dsz.js";import"./utils-hLU04HKI.js";import"./index-CpF9p_TK.js";import"./index-DpyIyUaw.js";import"./useThemeProps-DWvTJzqp.js";import"./getThemeProps-DGheavqV.js";const D="icon",b="bold",te=R(a=>({buttonExpand:{display:"flex",justifyContent:"space-between"},[`button${D}`]:{color:a.palette.primary.main,backgroundColor:"rgba(24, 32, 38, 0.04)",margin:a.spacing(1,0)},[`button${b}`]:{marginBottom:a.spacing(1),padding:a.spacing(.5,0,1,0),"&:hover":{backgroundColor:"unset"},...a.mixins?.collapsibleTree?.buttonSublevel},[`collapsibleContainer${b}`]:{borderTop:"2px solid black",marginTop:a.spacing(2),marginBottom:a.spacing(2)}})),y=({label:a,isOpen:t,children:n,variant:u=D,level:o})=>{const s=te(),l=W(),[c,m]=$.useState(t);return p.useEffect(()=>m(t),[t]),e.jsxs("div",{className:j(s[`collapsibleContainer${u}`]),style:{marginRight:l.spacing(o*2),marginLeft:l.spacing(o*2)},children:[e.jsxs(S,{className:j(s.buttonExpand,s[`button${u}`]),onClick:()=>m(!c),fullWidth:!0,children:[a,c?e.jsx(M,{color:"primary"}):e.jsx(B,{color:"primary"})]}),e.jsx(z,{in:c,timeout:"auto",children:n})]})};y.propTypes={label:d.string,isOpen:d.bool,children:d.node,variant:d.oneOf([D,b]),level:d.number};y.__docgenInfo={description:"",methods:[],displayName:"CollapseComponent",props:{variant:{defaultValue:{value:"'icon'",computed:!1},description:"",type:{name:"enum",value:[{value:"'icon'",computed:!1},{value:"'bold'",computed:!1}]},required:!1},label:{description:"",type:{name:"string"},required:!1},isOpen:{description:"",type:{name:"bool"},required:!1},children:{description:"",type:{name:"node"},required:!1},level:{description:"",type:{name:"number"},required:!1}}};const re=R(a=>({container:{display:"flex",justifyContent:"space-between"},title:{fontWeight:"bold",...a.mixins?.collapsibleTree?.title},divider:{marginBottom:a.spacing(2)},spacingValue:{marginLeft:a.spacing(2),marginRight:a.spacing(2),marginBottom:a.spacing(2)},overflow:{whiteSpace:"pre-wrap",overflowWrap:"break-word"}})),oe=[],A=({data:a=oe,defaultDepthLevel:t=1,isLoading:n,children:u,labels:o,testId:s="collapsible-tree",valueHandler:l,icon:c,onClick:m})=>{const i=re(),[v,g]=p.useState(t);if(p.useEffect(()=>g(t),[t]),n)return e.jsx(J,{container:!0,item:!0,justifyContent:"center",children:e.jsx(Q,{})});const V=r=>g(r?void 0:t),T=({value:r,children:C=[],...w})=>(r==null||r===""||typeof r=="object"&&Object.keys(r).length===0)&&C?.length===0?o?.noValue:typeof l=="function"?l({value:r,...w}):r,x=v>=t,U=x?o?.collapseAll:o?.expandAll;return e.jsxs(p.Fragment,{children:[e.jsxs(X,{disableGutters:!0,"data-testid":s,className:i.container,children:[e.jsx(S,{"aria-label":U,color:"primary",endIcon:x?e.jsx(M,{color:"primary"}):e.jsx(B,{color:"primary"}),onClick:()=>V(x),tabIndex:0,children:U}),e.jsxs("div",{children:[u,e.jsx(Z,{color:"primary",onClick:m,size:"large",children:c})]})]}),a.length===0&&e.jsx(Y,{message:o?.noData||"no data",icon:e.jsx(ee,{color:"primary",fontSize:"large"})}),a.map(({id:r,label:C,children:w=[]})=>e.jsxs(p.Fragment,{children:[e.jsx(K,{className:i.divider}),e.jsx(f,{variant:"h5",className:i.title,children:C}),w.map(({id:I,label:_,children:E,value:k,handlerProps:O={}})=>e.jsxs(y,{level:0,label:_,isOpen:v>=0,children:[e.jsx(f,{className:j(i.spacingValue,i.overflow),variant:"body2",children:T({value:k,children:E,...O})}),E&&E.map(({id:L,label:P,value:q,handlerProps:F={}})=>e.jsx(y,{level:1,variant:b,label:P,isOpen:v>=1,children:e.jsx(f,{variant:"body2",className:i.overflow,children:T({value:q,...F})})},L))]},I))]},r))]})};A.__docgenInfo={description:"",methods:[],displayName:"CollapsibleTree",props:{data:{defaultValue:{value:"[]",computed:!1},required:!1},defaultDepthLevel:{defaultValue:{value:"1",computed:!1},required:!1},testId:{defaultValue:{value:"'collapsible-tree'",computed:!1},required:!1}}};const ne={data:[{id:1,label:"Inward activity of multinationals by industrial sector - ISIC Rev 4",children:[{id:10,label:"Data Characteristics",children:[{id:100,label:"Date last updated",value:"August 2017"},{id:101,label:"Unit of measure used",value:"The units used to present data in AFA are millions of national currency for monetary variables and units for the other variables. Monetary variables are in current prices. Euro-area countries: national currency data is expressed in euro beginning with the year of entry into the Economic and Monetary Union (EMU). For years prior to the year of entry into EMU, data have been converted from the former national currency using the appropriate irrevocable conversion rate. This presentation facilitates comparisons within a country over time and ensures that the historical evolution is preserved. Please note, however, that pre-EMU euro are a notional unit and should not be used to form area aggregates or to carry out cross-country comparisons."}]},{id:11,label:"Database Specific",children:[{id:110,label:"Date last updated",value:"August 2015"},{id:111,label:"Abstract",value:"This table contains figures on the activity of affiliates under foreign control and all firms by industry according to the International Standard Industrial Classification (ISIC Revision 4)."}]}]},{id:2,label:"Health spending",children:[{id:20,label:"Data Characteristics",children:[{id:200,label:"Date last updated",value:"August 2017"},{id:201,label:"Unit of measure used",value:"The units used to present data in AFA are millions of national currency for monetary variables and units for the other variables. Monetary variables are in current prices. Euro-area countries: national currency data is expressed in euro beginning with the year of entry into the Economic and Monetary Union (EMU). For years prior to the year of entry into EMU, data have been converted from the former national currency using the appropriate irrevocable conversion rate. This presentation facilitates comparisons within a country over time and ensures that the historical evolution is preserved. Please note, however, that pre-EMU euro are a notional unit and should not be used to form area aggregates or to carry out cross-country comparisons."}]},{id:21,label:"Database Specific",children:[{id:210,label:"Date last updated",value:"August 2015"},{id:211,label:"Abstract",value:"This table contains figures on the health spending of the European Union by industry according to the International Standard Industrial Classification (ISIC Revision 4)."}]}]},{id:3,label:"Health spending by sector",children:[{id:30,label:"Data Characteristics",children:[{id:300,label:"Date last updated",value:"August 2017"},{id:301,label:"Unit of measure used",value:"The units used to present data in AFA are millions of national currency for monetary variables and units for the other variables. Monetary variables are in current prices. Euro-area countries: national currency data is expressed in euro beginning with the year of entry into the Economic and Monetary Union (EMU). For years prior to the year of entry into EMU, data have been converted from the former national currency using the appropriate irrevocable conversion rate. This presentation facilitates comparisons within a country over time and ensures that the historical evolution is preserved. Please note, however, that pre-EMU euro are a notional unit and should not be used to form area aggregates or to carry out cross-country comparisons."}]}]}]},{fn:ie,expect:se,userEvent:N}=__STORYBOOK_MODULE_TEST__,le={...ne,defaultDepthLevel:1,isLoading:!1,labels:{expandAll:"Expand all",collapseAll:"Collapse all",noValue:"No value",noData:"No metadata available"}},Se={title:"Data/CollapsibleTree",component:A,tags:["autodocs"]},h={render:()=>e.jsx(H,{base:le,cases:{Default:{},"With action":{icon:e.jsx(ae,{"aria-label":"Download metadata"}),onClick:ie(),children:e.jsx(f,{variant:"body2",children:"Download"})},"Custom value renderer":{valueHandler:({value:a})=>e.jsx("em",{children:a})},Loading:{isLoading:!0},"No data":{data:[]}},toggles:{depth0:{label:"Depth level 0",props:{defaultDepthLevel:0}}},children:a=>e.jsx(A,{...a})}),play:async({canvasElement:a})=>{const t=G(a);await N.click(t.getByRole("button",{name:"Collapse all"}));const n=await t.findByRole("button",{name:"Expand all"});await se(n).toBeVisible(),await N.click(n)}};h.parameters={...h.parameters,docs:{...h.parameters?.docs,source:{originalSource:`{
2
- render: () => <UseCases base={base} cases={{
3
- Default: {},
4
- 'With action': {
5
- icon: <Download aria-label="Download metadata" />,
6
- onClick: fn(),
7
- children: <Typography variant="body2">Download</Typography>
8
- },
9
- 'Custom value renderer': {
10
- valueHandler: ({
11
- value
12
- }) => <em>{value}</em>
13
- },
14
- Loading: {
15
- isLoading: true
16
- },
17
- 'No data': {
18
- data: []
19
- }
20
- }} toggles={{
21
- depth0: {
22
- label: 'Depth level 0',
23
- props: {
24
- defaultDepthLevel: 0
25
- }
26
- }
27
- }}>
28
- {props => <CollapsibleTree {...props} />}
29
- </UseCases>,
30
- play: async ({
31
- canvasElement
32
- }) => {
33
- const canvas = withinUseCase(canvasElement);
34
- await userEvent.click(canvas.getByRole('button', {
35
- name: 'Collapse all'
36
- }));
37
- const expandAll = await canvas.findByRole('button', {
38
- name: 'Expand all'
39
- });
40
- await expect(expandAll).toBeVisible();
41
- // leave the story in its default state
42
- await userEvent.click(expandAll);
43
- }
44
- }`,...h.parameters?.docs?.source}}};const Me=["Controlled"];export{h as Controlled,Me as __namedExportsOrder,Se as default};