@mattilsynet/design 0.2.8 → 0.2.10
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/mtds/alert/alert.stories.d.ts +12 -0
- package/mtds/avatar/avatar.stories.d.ts +7 -0
- package/mtds/badge/badge.stories.d.ts +10 -0
- package/mtds/breadcrumbs/breadcrumbs.stories.d.ts +9 -0
- package/mtds/button/button.stories.d.ts +15 -0
- package/mtds/card/card.stories.d.ts +8 -0
- package/mtds/chip/chip.stories.d.ts +7 -0
- package/mtds/details/details.stories.d.ts +10 -0
- package/mtds/errorsummary/errorsummary.stories.d.ts +7 -0
- package/mtds/favicon-dark.ico +0 -0
- package/mtds/favicon.ico +0 -0
- package/mtds/favicon.svg +4 -0
- package/mtds/field/field.d.ts +2 -0
- package/mtds/field/field.js +40 -0
- package/mtds/field/field.js.map +1 -0
- package/mtds/field/field.stories.d.ts +12 -0
- package/mtds/fieldset/fieldset.d.ts +2 -0
- package/mtds/fieldset/fieldset.js +27 -0
- package/mtds/fieldset/fieldset.js.map +1 -0
- package/mtds/fieldset/fieldset.stories.d.ts +12 -0
- package/mtds/heading/heading.stories.d.ts +7 -0
- package/mtds/icons/cosmetics.svg +1 -0
- package/mtds/icons/cow.svg +1 -0
- package/mtds/icons/fish.svg +1 -0
- package/mtds/icons/food.svg +1 -0
- package/mtds/icons/plant.svg +1 -0
- package/mtds/icons/water.svg +1 -0
- package/mtds/illustrations/apple-cup.svg +5 -0
- package/mtds/illustrations/apple.svg +4 -0
- package/mtds/illustrations/banana-apple-cup.svg +6 -0
- package/mtds/illustrations/banana.svg +3 -0
- package/mtds/illustrations/bird.svg +3 -0
- package/mtds/illustrations/drop.svg +3 -0
- package/mtds/illustrations/farmer-inviting.svg +12 -0
- package/mtds/illustrations/farmer-pig-plant.svg +14 -0
- package/mtds/illustrations/farmer-pitchfork.svg +13 -0
- package/mtds/illustrations/farmer-turnip-plant.svg +16 -0
- package/mtds/illustrations/faucet.svg +3 -0
- package/mtds/illustrations/fish.svg +3 -0
- package/mtds/illustrations/flask-perfume.svg +3 -0
- package/mtds/illustrations/flask-pipette.svg +4 -0
- package/mtds/illustrations/flask-pump.svg +3 -0
- package/mtds/illustrations/flasks.svg +7 -0
- package/mtds/illustrations/flounder.svg +3 -0
- package/mtds/illustrations/flower-seeds.svg +5 -0
- package/mtds/illustrations/flower.svg +4 -0
- package/mtds/illustrations/grass-bush.svg +3 -0
- package/mtds/illustrations/illustrations.json +59 -0
- package/mtds/illustrations/inspector.svg +13 -0
- package/mtds/illustrations/jar.svg +4 -0
- package/mtds/illustrations/meeting-plant.svg +24 -0
- package/mtds/illustrations/mussel-1.svg +3 -0
- package/mtds/illustrations/mussel-2.svg +3 -0
- package/mtds/illustrations/mussel-3.svg +3 -0
- package/mtds/illustrations/mussels.svg +3 -0
- package/mtds/illustrations/oak-leaf.svg +3 -0
- package/mtds/illustrations/pear.svg +5 -0
- package/mtds/illustrations/person-animal-nature-1.svg +1 -0
- package/mtds/illustrations/person-animal-nature-2.svg +1 -0
- package/mtds/illustrations/person-apron-bush.svg +14 -0
- package/mtds/illustrations/person-apron.svg +14 -0
- package/mtds/illustrations/person-arm.svg +11 -0
- package/mtds/illustrations/person-drop.svg +13 -0
- package/mtds/illustrations/person-faucet-drop.svg +13 -0
- package/mtds/illustrations/person-fish-seaweed.svg +16 -0
- package/mtds/illustrations/person-fish.svg +15 -0
- package/mtds/illustrations/person-flasks.svg +16 -0
- package/mtds/illustrations/person-flower.svg +13 -0
- package/mtds/illustrations/person-fork-bush.svg +15 -0
- package/mtds/illustrations/person-ham.svg +1 -0
- package/mtds/illustrations/person-meat.svg +22 -0
- package/mtds/illustrations/person-mobile.svg +1 -0
- package/mtds/illustrations/person-mussels.svg +12 -0
- package/mtds/illustrations/person-pear.svg +16 -0
- package/mtds/illustrations/person-tubes.svg +15 -0
- package/mtds/illustrations/pig.svg +3 -0
- package/mtds/illustrations/plant-round-leaves.svg +3 -0
- package/mtds/illustrations/plant.svg +3 -0
- package/mtds/illustrations/seaweed.svg +3 -0
- package/mtds/illustrations/shrimp.svg +3 -0
- package/mtds/illustrations/team.svg +25 -0
- package/mtds/illustrations/tube-1.svg +4 -0
- package/mtds/illustrations/tube-2.svg +4 -0
- package/mtds/illustrations/turnip.svg +4 -0
- package/mtds/illustrations/water-plant.svg +3 -0
- package/mtds/index.d.ts +39 -0
- package/mtds/index.iife.js +2 -0
- package/mtds/index.iife.js.map +1 -0
- package/mtds/index.js +21 -0
- package/mtds/index.js.map +1 -0
- package/mtds/input/input.stories.d.ts +16 -0
- package/mtds/layout/layout.stories.d.ts +17 -0
- package/mtds/link/link.stories.d.ts +7 -0
- package/mtds/logo/logo.stories.d.ts +9 -0
- package/mtds/logo-english.svg +1 -0
- package/mtds/logo-samisk.svg +1 -0
- package/mtds/logo.svg +1 -0
- package/mtds/modal/modal.stories.d.ts +8 -0
- package/mtds/pagination/pagination.d.ts +13 -0
- package/mtds/pagination/pagination.js +20 -0
- package/mtds/pagination/pagination.js.map +1 -0
- package/mtds/pagination/pagination.stories.d.ts +10 -0
- package/mtds/popover/popover.d.ts +2 -0
- package/mtds/popover/popover.js +42 -0
- package/mtds/popover/popover.js.map +1 -0
- package/mtds/popover/popover.stories.d.ts +12 -0
- package/mtds/skeleton/skeleton.stories.d.ts +9 -0
- package/mtds/styles.css +1 -0
- package/mtds/styles.json +36 -0
- package/mtds/styles.module.css.js +74 -0
- package/mtds/styles.module.css.js.map +1 -0
- package/mtds/table/table.d.ts +2 -0
- package/mtds/table/table.js +29 -0
- package/mtds/table/table.js.map +1 -0
- package/mtds/table/table.mockData.d.ts +8 -0
- package/mtds/table/table.stories.d.ts +30 -0
- package/mtds/tabs/tabs.stories.d.ts +8 -0
- package/mtds/tag/tag.stories.d.ts +11 -0
- package/mtds/utils.d.ts +50 -0
- package/mtds/utils.js +29 -0
- package/mtds/utils.js.map +1 -0
- package/mtds/validation/validation.stories.d.ts +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="251" height="211" viewBox="0 0 251 211"><rect fill="#fff" height="128.84" rx="5" width="250.56"/>
|
|
2
|
+
<path fill="#abe1cd" d="m194.63 158.3h-58.37v-14.3s7-20.4 10.72-23.64c3.72-3.22 8.63-5.64 8.63-5.64h13.33s6.73 4.2 9.96 6.84c3.23 2.63 3.22 3.25 5.05 5.54 1.83 2.28 5.67 11.92 5.67 11.92l5 19.28z"/>
|
|
3
|
+
<path fill="#b4cea0" d="m230.38 154.82c-1.24-2.66-3.08-6.47-4.07-7.99a54.25 54.25 0 0 0 -7.02-8.27c-2.96-2.93-9.17-5.78-9.17-5.78l-8.28-.8-4.97-.49s-5.11 1.93-9.12 4.77c-4 2.85-12.92 22.43-12.92 22.43 29.34 27.62 52.98 19.46 55.55 16.46 1.82-2.12 1.72-9.96 1.5-14.4a18.54 18.54 0 0 0 -1.5-5.93z"/>
|
|
4
|
+
<path fill="#e2f1df" d="m64.83 133.19h-2.4v2.02h2.4z"/>
|
|
5
|
+
<path fill="#9bcab9" d="m131.77 143.25v6.83l-58.37 7.42 5-19.22s3.85-9.6 5.68-11.89c1.83-2.27 1.81-2.9 5.05-5.52 3.23-2.64 9.95-6.82 9.95-6.82h13.34a47 47 0 0 0 8.64 5.63c3.72 3.22 10.7 23.56 10.7 23.56z"/>
|
|
6
|
+
<path fill="#1e1a28" d="m169.96 96.23s1.51 2.88 4.46 5.6c3.04 2.8 3.53 3.84 3.9 5.5.83 3.76.06 6.12-2.05 8.1-1.91 1.8-1.85 2.17-6.3 2.98-4.64.84-5.52-2.48-5.52-2.48s3.15-6.4 2.61-8.6-2.94-6.9-2.94-6.9"/>
|
|
7
|
+
<path fill="#f9c4aa" d="m161.96 91.19a10.9 10.9 0 0 1 5.36 4.3l.6.92a12.53 12.53 0 0 1 1.93 8.26l-.24 2.08a12.3 12.3 0 0 1 -2.3 5.93l-.82 1.1a10.46 10.46 0 0 1 -8.39 4.36h-2.57c-3.28 0-6-1.62-8.05-4.4l-.27-.36a12.44 12.44 0 0 1 -2.35-8.04l.13-2.36c.27-4.8 3.2-8.94 7.4-10.44 2.2-.78 7.38-2.16 9.57-1.37z"/>
|
|
8
|
+
<path fill="#f9c4aa" d="m169.53 103.23c.54.18 1.01.4 1.11.8.24.65.33 1.25 0 1.9-.28.5-.78.78-1.76 1.12l.65-3.83zm-24.07 0c-.58.1-1.1.22-1.27.6-.35.59-.53 1.17-.31 1.84.2.55.67.9 1.62 1.38l-.04-3.83z"/>
|
|
9
|
+
<path fill="#1e1a28" d="m153.29 92.01c0-.25-.33-1.3-.4-1.56-.49.01.5-.1 0 0-5.1.94-9.7 6.96-8.7 12.27.05.25.1.5.17.75.49 0 1.05.1 1.49-.15 3.04-1.77 7.6-6.68 7.44-11.3z"/>
|
|
10
|
+
<path fill="#1e1a28" d="m151.95 90.67c-.4.15-.79.31-1.17.5.16.82.21 1.73.69 2.46 4.04 6.17 11.54 13.95 19.85 10.9.4-.14.27 0 .55-.55.03-1.02.48-2.2-.19-4.15-2.87-8.4-11.42-12.2-19.72-9.15h-.01zm-33.93 2.39 1.32 3.4a35.14 35.14 0 0 1 1.82 6.43l.97 5.27c-1.7 1.36-3.68 1.51-5.94.46l2.09-8.17m-23.92-7.39-1.59 3.34a34.6 34.6 0 0 0 -2.3 6.34l-1.35 5.24c2.68 1.92 4.47 1.64 6.07.88l-1.6-8.37"/>
|
|
11
|
+
<path fill="#7f433b" d="m110.55 88.16c2.18.8 4.06 2.31 5.4 4.35l.6.93a12.68 12.68 0 0 1 1.94 8.33l-.24 2.12a12.5 12.5 0 0 1 -2.32 5.98l-.82 1.11a10.51 10.51 0 0 1 -8.43 4.4h-2.59c-3.29 0-6.03-1.63-8.1-4.44l-.26-.36a12.6 12.6 0 0 1 -2.36-8.11l.13-2.38c.26-4.85 3.21-9.03 7.43-10.55 2.21-.79 7.42-2.19 9.63-1.38z"/>
|
|
12
|
+
<path fill="#1e1a28" d="m108 87.26c0-.35-.01-.7-.04-1.03a13.08 13.08 0 0 0 -15.1 13.97c.68.1 1.42.4 2.08.16 8.5-3.16 13.06-5.87 13.06-13.1z M107.02 86.06c-.33 0-.65.02-.97.04a12.36 12.36 0 0 0 13.16 14.3 12.36 12.36 0 0 0 -12.19-14.35z M107.02 86.06c-.33 0-.65.02-.97.04a12.36 12.36 0 0 0 13.16 14.3 12.36 12.36 0 0 0 -12.19-14.35z"/>
|
|
13
|
+
<path fill="#7f433b" d="m118.03 100.46c.54.18 1.01.4 1.11.8.24.65.33 1.25 0 1.9-.28.51-.78.78-1.77 1.12l.66-3.83zm-24.06-.13c-.54.1-1.02.22-1.17.6-.33.59-.5 1.16-.3 1.84.2.55.63.9 1.5 1.38l-.04-3.83z"/>
|
|
14
|
+
<path fill="#f8e0d8" d="m213.2 107.11a11.56 11.56 0 0 1 4.68 5.63l.43 1.08a13.32 13.32 0 0 1 .25 9l-.7 2.14c-.71 2.2-1.99 4.18-3.67 5.69l-1.08.97a11.18 11.18 0 0 1 -9.67 2.77l-2.69-.55c-3.4-.7-5.16-2.8-6.7-6.12l-.2-.44a13.2 13.2 0 0 1 -.75-8.86l.64-2.43c1.3-4.94 5.23-8.64 9.94-9.32 2.45-.35 7.4-.85 9.52.44z"/>
|
|
15
|
+
<path fill="#f8e0d8" d="m218.39 121.25c.54.3 1 .6 1.03 1.03.12.7.07 1.32-.4 1.9-.43.46-1.04.64-2.18.77z"/>
|
|
16
|
+
<path fill="#ed9a32" d="m212 108.38c.06-.24.54-1.18.65-1.4-.48-.18.48.1 0 0 4.84 1.8 8.39 8.33 6.58 13.18a8.4 8.4 0 0 1 -.3.68c-.48-.1-1.04-.08-1.43-.4-2.7-2.24-6.4-7.72-5.5-12.06z"/>
|
|
17
|
+
<path fill="#ed9a32" d="m214.52 107.94c.37.26.73.52 1.07.8-.38.8-.83 1.6-1.35 2.36-5.32 7.75-15 7.21-20.91 5.45 0 0-.06-.2-.04-.3-.2-.97 1.01-4.54 1.53-5.3 5.32-7.75 11.95-8.32 19.7-3z"/>
|
|
18
|
+
<path fill="#68b096" d="m30.31 157.98c1.25-2.66 3.08-6.47 4.08-7.99a54.26 54.26 0 0 1 7.01-8.27c2.96-2.93 9.17-5.78 9.17-5.78l8.29-.8 4.96-.48s5.11 1.92 9.12 4.77c4.01 2.84 12.92 27.88 12.92 27.88l1.32 1.33c-29.34 27.62-52.98 19.46-55.55 16.45-1.82-2.12-3.04-16.74-2.82-21.18.26-3.34 1.5-5.93 1.5-5.93z"/>
|
|
19
|
+
<path fill="#f9c4aa" d="m60.6 109.64c2.18.72 4.1 2.17 5.5 4.15l.63.9a12.61 12.61 0 0 1 2.2 8.24l-.17 2.1c-.18 2.2-.9 4.29-2.12 6.04l-.78 1.13a10.46 10.46 0 0 1 -8.25 4.65l-1.85.06c-3.27.1-6.06-1.43-8.2-4.15l-.28-.35a12.57 12.57 0 0 1 -2.62-8l.05-2.37c.11-4.83 2.9-9.08 7.05-10.73 2.17-.87 6.59-2.4 8.8-1.67h.03z"/>
|
|
20
|
+
<path fill="#ed9a32" d="m66.99 114.26c1.2 7.55-12.7 13.35-19.87 16.4-2.62 1.12-1.48 7.75-15.67 15.28-14.2 7.53-13.44-7.16-13.44-7.16 1.56-13.01 20.43-5.36 25.93-12.35-.59-1.36-.36-5.3.57-11.47 1.4-3.31 3.8-5.37 7.58-5.63 7.77-1.11 13.78.44 14.9 4.93z"/>
|
|
21
|
+
<path fill="#f8de9c" d="m48.64 15.99 22.6-3.99 4 22.6-22.61 3.99zm154.92 44.94 22.6-3.99 3.99 22.6-22.6 4-4-22.61zm-184.56.96 22.6-3.99 3.99 22.6-22.6 3.99zm160.81-49.89 22.6 3.99-3.98 22.6-22.6-3.99 3.97-22.6zm-64.91 23.35 22.6 3.99-3.99 22.6-22.6-3.99 3.98-22.6z"/>
|
|
22
|
+
<path fill="#c58f79" d="m129.48 210.97c46.65 0 84.48-14.36 84.48-32.07 0-17.7-37.83-32.06-84.48-32.06-46.66 0-84.48 14.35-84.48 32.06s37.82 32.07 84.48 32.07z"/>
|
|
23
|
+
<path fill="#054449" d="m178.39 170a3.1 3.1 0 0 0 -2.74 1.66v-3.86c-5.63.32-11.72.34-18.42 0 0 0 .78 6.12 1.05 8.94.52 5.3 6.84 6.17 6.84 6.17s5.61.88 7.9-2.46a16.34 16.34 0 0 0 2.58-6.02 3.1 3.1 0 1 0 2.79-4.43zm1.52 3.38a1.55 1.55 0 1 1 -3.04-.56 1.55 1.55 0 0 1 3.04.56z"/>
|
|
24
|
+
<path fill="#fff" d="m90.16 166.85 41.7-8.27 5.01 25.28-41.7 8.27z"/>
|
|
25
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="101" height="256" viewBox="0 0 101 256">
|
|
2
|
+
<path fill="#1e1a28" d="m62.4 246.8v-9.6c-6.4 1.51-10.35 1.3-15.47 1.18-1.64.03-3.33-.02-4.97-.1-4.53-.13-9.37-.35-10.51-1.07v9.6c-2.71.23-4.34.53-4.34.86v6.82c0 .76 8.86 1.38 19.8 1.38s19.8-.62 19.8-1.38v-6.82c0-.33-1.62-.62-4.34-.87z"/>
|
|
3
|
+
<path fill="#68b096" d="m31.47 237.2c-2.55-1.6-12.9-7.41-14.69-8.63-1.79-1.23-2.68-3.81-2.8-6.6-.11-2.8-5.66-180.3-13.98-209.58 0 0 .16-12 .68-12.34.52-.35 37.4 1.18 49.02 1.18 11.63 0 49.51-.34 50.02 0 .5.34.38 7.08.18 12.47-.51 3.03-9.2 58.06-12.85 114.2-3.67 56.14-6.66 90.18-6.82 93-.16 2.81-.16 5.78-3.13 8.13-2.96 2.34-14.69 8.18-14.69 8.18-6.4 1.51-10.35 1.3-15.47 1.18-5.12-.11-13.89-.18-15.47-1.18h-.01z"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="121" height="250" viewBox="0 0 121 250">
|
|
2
|
+
<path fill="#1e1a28" d="m23.77 204.47h-.06c-.09 3.64-1.17 41.66.87 42.53 2.04.88 24.08 2.6 35.34 2.61 15.72.02 36.44-2.37 36.95-3.5.51-1.11 1.81-40.91 1.85-41.91-7.2 2.57-70.55.88-74.96.26z"/>
|
|
3
|
+
<path fill="#9bcab9" d="m98.8 204.18c4.86-1.83 4.14-5.45 4.74-14.5.73-10.79 15.35-161.3 16.94-178.7.33-3.57.44-8.27 0-10.38-.28-1.35-50.55 0-60.5 0-9.93-0-59.13.16-59.71.74-.58.59 0 10.68 0 10.68 1.61 10.07 17.66 162.9 18.53 175.62.88 12.72.57 16.22 5 16.83 4.42.62 68.08 2.32 75.01-.28z"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="141" height="256" viewBox="0 0 141 256">
|
|
2
|
+
<path fill="#F9CC76" d="M120.37 219.91c-4.6 11.91-18.8 16.39-22.41 17.3-3.61.86-6.93-.1-9.02 4.92-2.1 5.02-1.93 13.66-3.23 13.66-.4.46-1.37.16-2.18-.74-.82-.9-.75-10.95-.75-10.95-.28-4.5-2.58-6.06-4.17-6.62-.35-.1-.7-.18-1.07-.27-.27-.03-.43-.03-.43-.03l.06-.03c-6.69-1.46-17.06-2.18-20.77-4.64-5.06-3.37-8.16-6.79-9.5-13.65-.56-6.8-.81-10.17 1.84-14.33 2.63-4.15 2.97-3.83 5.7-6.56 2.65-2.64 11.68-7.76 22.19-9.31 10.5-1.55 22.54-1.33 25.38-.77 4.5.53 13.8 4.93 16.08 8 2.28 3.05 6.9 12.13 2.28 24.04v-.02Z"/>
|
|
3
|
+
<path fill="#054449" d="M138.97 71.86c-2.19-3.12-5-5.06-8.96-4.83-.9.06-1.8.29-2.68.54-2.57.74-5.22 1.36-7.66 2.42-4.4 1.96-6.64 6.06-8.99 9.94-1.64 2.7-2.35 5.77-2.75 8.92-.54 4.44-1.2 8.86-1.77 13.3-.28 2.2-.47 4.38-.76 6.54-.55 4.32-1.2 8.63-1.71 12.98-.35 3-.51 6.06-.78 9.08-.03.29-.07.54-.13.8a26.13 26.13 0 0 1-5.86 10.47 29.71 29.71 0 0 0-6.96 12.25l-.03-.08-.43 1.8-.05.21a336.96 336.96 0 0 0-3.73 18.13c-.04-.86-.07-1.73-.15-2.6-.64-7.66-.28-15.43-.16-23.15.07-2.87 1.49-5.25 3.86-7.02a52.06 52.06 0 0 0 4.84-3.94 3.82 3.82 0 0 0 1.2-4.15c-.67-2.51-2.41-3.68-4.54-4.64-.73-.32-1.64-.77-2.02-1.42a4.86 4.86 0 0 1 .29-5.84 41.37 41.37 0 0 1 6.24-5.8c2.5-1.96 5-4.03 5.44-7.3a16.76 16.76 0 0 0-7.76-16.4c-2.6-1.58-4.56-3.73-5.35-6.66-.35-1.33-.41-3.34.32-4.25 1.68-2 3.8-3.71 6.02-5.12 3.07-1.93 6.47-3.42 8.11-6.86a82.17 82.17 0 0 0 3.9-9.36 24.8 24.8 0 0 0 1.3-7c.12-2.3-.17-4.7-.65-6.98-.8-3.64-3.95-8.15-9.02-7.91-4.02.16-7.6 1.49-11.01 3.34-4.65 2.54-8.5 6-10.22 11.24-.6 1.9-.94 3.9-1.3 5.9-.6 3.45-1.32 6.89-1.6 10.37-.52 6.44.16 12.82 1.07 19.19.7 4.92 1.03 9.94 1.51 14.95.07.47.23.92.26 1.42.29 3.05.67 6.15.78 9.24.06 1.68-.32 3.4-.57 5.08-.16 1.06-.51 2.13-.77 3.18-.2.03-.35.03-.54.07-.23-1.2-.51-2.38-.67-3.58-.61-4.48-1.3-8.96-1.8-13.43-.58-4.86-.93-9.75-1.46-14.64a51.17 51.17 0 0 0-.7-4.42c-.79-3.74-1.55-7.46-2.38-11.2-.67-2.96-1.3-5.94-2.22-8.8-1.23-3.74-2.73-7.4-4.15-11.08-2.06-5.34-3.96-10.76-6.24-16a317.04 317.04 0 0 0-8.41-17.62 86.83 86.83 0 0 0-5.83-9.62c-1.68-2.48-3.42-5.05-5.67-6.92C31.93 1.53 27.44-.37 22.53.06c-2.6.23-5.25 1.23-7.73 2.25-3.96 1.65-7.18 4.32-9.98 7.66C2.02 13.22.48 16.4.1 20.86c-.16 1.82-.11 2.86.01 4.28a16.8 16.8 0 0 0 1.17 4.93c.8 2 1.58 4.22 3.07 5.62 2.44 2.32 5.34 4.16 8.2 5.97 1.77 1.12 3.86 1.68 5.76 2.57 4.84 2.25 6.28 6.76 3.61 11.33-1.16 2-2.47 3.97-3.6 6-1.65 2.96-2.94 6.06-1.55 9.5.9 2.19 1.77 4.5 4.6 4.92 1.16.16 2.3.42 3.47.38 5.32-.16 10.6-.51 15.89-.6 5.15-.1 8.57 5.59 7.25 10.3-.77 2.68-2.64 4.58-4.44 6.51-2.03 2.16-3.35 4.6-3 7.63.16 1.61.7 3.18 1.23 4.73a6.3 6.3 0 0 0 4.4 4.22c.83.26 1.8.16 2.7.1 2.29-.16 4.57-.7 6.83-.55 3.07.23 4.52 1.17 5.26 3.62.78 2.57 1.32 5.2-1.42 7.24a41.79 41.79 0 0 0-4.55 4c-2.57 2.57-3.58 5.96-2.57 9.27 1.38 4.6 4.96 7.69 9.37 9.33 2.84 1.06 6.01 1.25 9.02 1.94 2.97.67 5.63 2 7.18 4.8 2.06 3.77 2.57 7.94 2.94 12.1.32 3.58.48 7.18.64 10.79-2.69-7.74-8.15-14.63-11.5-18.37a34.73 34.73 0 0 0-2.57-2.72l-.25-.24a35.18 35.18 0 0 0-9.7-6.31c-6.64-2.93-11.23-7.79-14.01-14.46-1.1-2.67-2.03-5.46-3.1-8.18-1.23-3.12-3.67-4.93-6.8-5.63-3.6-.76-6.21.9-8.24 3.87-1.93 2.8-2.7 7.27-.28 10.47 1.6 2.13 3.95 3.15 6.24 4.25 1.93.93 3.99 1.97 4.47 4.22.64 3 .22 5.84-2.12 8.16a31.69 31.69 0 0 0-3.7 4.31c-.97 1.36-.65 2.7.47 3.9a10.44 10.44 0 0 0 7.6 3.12c4.21.07 8.14-1.68 12.2-2.73 2-.51 4.06-.83 6.12-.9 1.9-.06 3.1 1.24 3.04 2.93 0 .83-.16 1.71-.42 2.5-.6 2.1-.41 2.94 1.58 3.62 1.3.42 2.86.55 4.19.26 2.73-.58 4.9-.48 7.15 1.65 3.67 3.51 5.19 8 6.42 12.56.8 3.06.57 6.38.76 9.56.02.32-.03.58-.12.79 4-.48 8.12-.74 11.78-.83a1.82 1.82 0 0 1-.16-.6c-.2-1.93-.61-3.83-.55-5.74.1-3.48.23-7.01.79-10.47.57-3.64 2.84-6.31 6.08-8.09 1.32-.7 2.6-1.45 3.8-2.32 1.03-.73 1.13-1.93.8-3.05-.3-1.05-1.17-1.39-2.22-1.52-1.97-.22-2.75-1.45-2.16-3.3 1.23-3.99 4.4-5.86 8.05-6.94 2.31-.68 4.53-1.3 6.3-3.12 2.1-2.2 2.35-3.03.9-5.57-1.2-2.12-.83-3.58 1.39-4.5 1.6-.68 3.38-.96 4.96-1.68 1.42-.64 2.97-1.36 3.96-2.48 1.55-1.74 1.13-4.7-.51-6.8-2.1-2.66-1.9-5.05.7-6.47 2.03-1.12 4.18-2 6.3-2.96 1.97-.9 4.03-1.84 4.5-4.16.61-2.98-.22-5.43-2.93-7.33-1.68-1.17-3.03-2.9-4.25-4.57-1.23-1.71-.64-4.45 1.1-5.57a46.5 46.5 0 0 1 7.03-4.06c2.78-1.2 4.7-3.08 5.41-5.8.77-2.86.74-5.9-1.13-8.57l.03-.06Z"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="182" height="256" viewBox="0 0 182 256">
|
|
2
|
+
<path fill="#153F7B" d="M92.08 47.25c-6.45 0-12.91-.18-19.37.04-6.6.24-12.9 1.87-18.47 5.66-3.54 2.41-6.29 5.6-6.9 10.02a15.5 15.5 0 0 0 3.64 12.62c2.55 2.96 6.88 2.92 10.58.15 1.7-1.26 3.23-2.73 4.93-3.99 5.48-4.08 11.46-6.53 18.45-5.15 3.54.7 6.76 2.15 9.48 4.63 2.21 2.02 2.68 4.48 1.88 7.26a17.9 17.9 0 0 1-5.77 8.66c-2.6 2.25-5.32 4.36-7.92 6.6-7.34 6.34-9.48 15.62-5.2 23.73 6.03 11.42 17.52 12.67 27.6 5.76 5.87-4.02 9.06-10.03 10.96-16.8 1.69-6.02 3.17-12.1 5.16-18a47.32 47.32 0 0 1 7.96-14.61c4.83-6.02 10.98-8.29 18.46-6.33 7.87 2.07 14.58 6.16 19.63 12.63 6.2 7.92 3.29 15.38-6.54 17.16-1.8.33-3.64.63-5.48.7-8.92.34-15.42 4.92-20.28 12.07a36.2 36.2 0 0 0-4.35 8.87c-1.8 5.47 1.51 10.17 7.24 10.79 4.94.54 9.73-.38 14.4-1.88 6.5-2.1 12.93-2.5 19.3.28a17.25 17.25 0 0 1 9.75 10.92c1.42 4.39-.06 8.26-4.3 9.82a68.38 68.38 0 0 1-12.39 3.06c-8.83 1.45-17.79 2.22-26.55 3.97-10.67 2.13-19.5 8.13-27.52 15.32-.86.78-1.56 1.84-2.09 2.88-2.2 4.37-.14 8.52 4.58 9.58 4.32.98 8.39-.13 12.42-1.39 4.8-1.49 9.57-2.56 14.48-.6 1.03.41 2.07.87 3.02 1.46 4.51 2.8 4.62 7.49.14 10.41-4.8 3.13-10.26 4-15.85 4.14-4.81.14-9.62-.03-14.44.15-5.04.19-10.02.98-14.21 4.12-8.75 6.54-11.67 15.52-9.94 26.06.95 5.77 2.71 11.39 3.8 17.13.46 2.42.47 5.05.12 7.5-.46 3.2-2.87 4.14-5.75 2.68-2.33-1.19-3.63-3.23-4.5-5.59-1.58-4.3-3.18-8.6-4.6-12.95-3.1-9.58-9.69-15.58-18.75-19.17-5.19-2.05-10.19-4.53-13.79-8.97a23.8 23.8 0 0 1-3.94-6.82c-2.02-5.57 1.86-10.58 8.15-11 2.42-.17 4.91-.18 7.22-.83 3.7-1.02 4.77-4.5 2.67-7.74-1.79-2.74-4.5-4.18-7.36-5.48-2.86-1.32-5.81-2.55-8.45-4.27-4.67-3.04-6.77-9.1-5.17-13.73 1.2-3.46 3.52-5.24 7.12-5.14 2.16.06 4.32.4 6.47.7 4.3.6 7.31-1.03 9.1-5 3.21-7.06 1.76-14.48-3.97-19.62-7.62-6.84-16.48-8.99-26.45-7.05a70.6 70.6 0 0 1-10.55 1.36C9.73 124.43.39 113.43 0 104.31c-.27-6.75 3.91-10.85 10.52-9.83 3.68.57 7.25 1.84 10.85 2.87 4.56 1.32 7.79-.94 10.62-4.06 2.68-2.95 3.67-6.4 1.66-10.08-1.39-2.54-3.15-4.88-4.84-7.23-2.58-3.6-5.61-6.95-7.8-10.76-4.05-7.02-2.03-17.53 3.85-22 3.57-2.73 7.75-3.74 12.11-4.44 3.22-.51 6.54-1.11 9.48-2.41 5.15-2.27 5.91-6.81 2.3-11.2-.16-.2-.33-.4-.53-.59-4.3-4.04-5.24-8.93-3.43-14.42 1.88-5.65 6.03-8.74 11.66-9.84C64.74-1.31 71.4 3.45 72.78 11.9c.8 4.94 2.59 9.31 6.35 12.73 5.36 4.84 12.35 5.16 18.02.63 2.58-2.06 4.82-4.6 7.54-6.43 2.99-2 6.24-3.68 9.55-5.05 3.86-1.6 7.66-.68 11.12 1.51 4.95 3.15 8.54 7.47 9.45 13.4 1.06 7.04-2.7 13.3-10.61 16.12-6 2.14-12.2 2.62-18.48 2.66-4.55.02-9.1 0-13.65 0v-.24h.01Z"/>
|
|
3
|
+
</svg>
|
package/mtds/index.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export { pagination } from './pagination/pagination';
|
|
2
|
+
export declare const styles: {
|
|
3
|
+
validation: string;
|
|
4
|
+
tag: string;
|
|
5
|
+
tabs: string;
|
|
6
|
+
table: string;
|
|
7
|
+
scrollShadow: string;
|
|
8
|
+
tableChildAdded: string;
|
|
9
|
+
skeleton: string;
|
|
10
|
+
popover: string;
|
|
11
|
+
pagination: string;
|
|
12
|
+
modal: string;
|
|
13
|
+
logo: string;
|
|
14
|
+
link: string;
|
|
15
|
+
grid: string;
|
|
16
|
+
flex: string;
|
|
17
|
+
box: string;
|
|
18
|
+
input: string;
|
|
19
|
+
fieldset: string;
|
|
20
|
+
fieldsetValidationAdded: string;
|
|
21
|
+
field: string;
|
|
22
|
+
fieldChildAdded: string;
|
|
23
|
+
affixes: string;
|
|
24
|
+
count: string;
|
|
25
|
+
errorsummary: string;
|
|
26
|
+
details: string;
|
|
27
|
+
chip: string;
|
|
28
|
+
card: string;
|
|
29
|
+
info: string;
|
|
30
|
+
button: string;
|
|
31
|
+
breadcrumbs: string;
|
|
32
|
+
badge: string;
|
|
33
|
+
avatar: string;
|
|
34
|
+
alert: string;
|
|
35
|
+
heading: string;
|
|
36
|
+
body: string;
|
|
37
|
+
};
|
|
38
|
+
export declare function observe(el: Element | Document): void;
|
|
39
|
+
export declare function unobserve(el: Element | Document): void;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var mtds=function(g){"use strict";const x="_validation_f0nxn_1 _ds-validation-message_14y6r_1",A="_tag_f0nxn_1 _ds-tag_14y6r_1",S="_tabs_f0nxn_1",$="_table_f0nxn_1 _ds-table_14y6r_1",M="_scrollShadow_f0nxn_1",E="_tableChildAdded_f0nxn_1",C="_skeleton_f0nxn_1 _ds-skeleton_14y6r_1",T="_popover_f0nxn_1",w="_pagination_f0nxn_1 _ds-pagination_14y6r_1",I="_modal_f0nxn_1 _ds-modal_14y6r_1",k="_logo_f0nxn_1 _ds-focus_14y6r_1",N="_link_f0nxn_1",L="_grid_f0nxn_1",B="_flex_f0nxn_1",O="_box_f0nxn_1",D="_input_f0nxn_1 _ds-input_14y6r_1",H="_fieldset_f0nxn_1 _ds-fieldset_14y6r_1",P="_fieldsetValidationAdded_f0nxn_1",V="_field_f0nxn_1 _ds-field_14y6r_1",U="_fieldChildAdded_f0nxn_1",W="_affixes_f0nxn_1 _ds-field-affixes_14y6r_1",j="_count_f0nxn_1",F="_errorsummary_f0nxn_1 _ds-error-summary_14y6r_1",z="_details_f0nxn_1 _ds-details_14y6r_1",X="_chip_f0nxn_1 _ds-chip_14y6r_1",Y="_card_f0nxn_1",q="_info_f0nxn_1",K="_button_f0nxn_1 _ds-button_14y6r_1",Q="_breadcrumbs_f0nxn_1 _ds-breadcrumbs_14y6r_1",R="_badge_f0nxn_1",G="_avatar_f0nxn_1 _ds-avatar_14y6r_1",J="_alert_f0nxn_1 _ds-alert_14y6r_1",Z="_heading_f0nxn_1 _ds-heading_14y6r_1",tt="_body_f0nxn_100",r={validation:x,tag:A,tabs:S,table:$,scrollShadow:M,tableChildAdded:E,skeleton:C,popover:T,pagination:w,modal:I,logo:k,link:N,grid:L,flex:B,box:O,input:D,fieldset:H,fieldsetValidationAdded:P,field:V,fieldChildAdded:U,affixes:W,count:j,errorsummary:F,details:z,chip:X,card:Y,info:q,button:K,breadcrumbs:Q,badge:R,avatar:G,alert:J,heading:Z,body:tt},gt=Object.freeze(Object.defineProperty({__proto__:null,affixes:W,alert:J,avatar:G,badge:R,body:tt,box:O,breadcrumbs:Q,button:K,card:Y,chip:X,count:j,default:r,details:z,errorsummary:F,field:V,fieldChildAdded:U,fieldset:H,fieldsetValidationAdded:P,flex:B,grid:L,heading:Z,info:q,input:D,link:N,logo:k,modal:I,pagination:w,popover:T,scrollShadow:M,skeleton:C,table:$,tableChildAdded:E,tabs:S,tag:A,validation:x},Symbol.toStringTag,{value:"Module"})),nt=typeof window<"u"&&typeof document<"u",d={capture:!0,passive:!0};let bt=0;const mt=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function b(t){return t.id||(t.id=`${mt}${++bt}`),t.id}const et=(t,n,o)=>{for(const s of o[0].split(","))o[0]=s,Element.prototype[`${t}EventListener`].apply(n,o)},u=(t,...n)=>et("add",t,n),p=(t,...n)=>et("remove",t,n),y=(t,n)=>{let o=0;const s=e=>{e.animationName===t&&(cancelAnimationFrame(o),o=requestAnimationFrame(n))};return{observe:e=>u(e,"animationend",s,d),disconnect:e=>p(e,"animationstart",s,d)}},v=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),yt=r.field.split(" ")[0],ot=r.validation.split(" "),vt=ot[0],st=new WeakMap;function ht(t){for(const n of t){const o=[],s=[];let e=null,a=!0;for(const i of n.getElementsByTagName("*"))i instanceof HTMLLabelElement?o.push(i):v(i)?e=i:i.classList.contains(vt)?(a=i.getAttribute("data-color")==="success",s.unshift(b(i))):i instanceof HTMLParagraphElement&&s.push(b(i));if(e)for(const i of o)i.htmlFor=b(e);e&&at(e),e==null||e.setAttribute("aria-describedby",s.join(" ")),e==null||e.setAttribute("aria-invalid",`${!a}`)}}function it({target:t}){v(t)&&at(t)}function at(t){const n=t==null?void 0:t.nextElementSibling,o=n==null?void 0:n.getAttribute("data-count");if(n&&o){const s=Number(o)-t.value.length,e=s<0;if(n.getAttribute("aria-live")==="polite"!==e){n.setAttribute("aria-live",e?"polite":"off");for(const i of ot)n.classList.toggle(i,e)}n.textContent=`${Math.abs(s)} tegn ${e?"for mye":"igjen"}`}}function xt(t){const n=t.getElementsByClassName(yt),o=y(r.fieldChildAdded,()=>ht(n));st.set(t,o),o.observe(t),u(t,"input",it,d)}function At(t){var n;(n=st.get(t))==null||n.disconnect(t),p(t,"input",it,d)}const St=r.fieldset.split(" ")[0],$t=r.validation.split(" ")[0],dt=new WeakMap;function Mt(t){for(const n of t){const o=[];let s="";for(const e of n.getElementsByTagName("*"))e.classList.contains($t)?s=b(e):v(e)&&o.push(e);if(s)for(const e of o)e.setAttribute("aria-describedby",s),e.setAttribute("aria-invalid","true")}}function Et(t){const n=t.getElementsByClassName(St),o=y(r.fieldsetValidationAdded,()=>Mt(n));dt.set(t,o),o.observe(t)}function Ct(t){var n;(n=dt.get(t))==null||n.disconnect(t)}function Tt(t){u(t,"click",lt),u(t,"toggle",rt,d)}function wt(t){p(t,"click",lt),p(t,"toggle",rt,d)}const ct=r.popover.split(" ")[0],l=nt?document.createElement("div"):null;l&&(l.style.cssText="position:absolute;padding:1px");function rt({target:t,newState:n}){var e;const s=n==="open"&&t instanceof HTMLElement&&t.classList.contains(ct)&&((e=t.getRootNode())==null?void 0:e.querySelector(`[popovertarget="${t.id}"]`));if(s){const a=t.getAttribute("data-position")==="over",i=()=>It(s,t,a),f=({newState:_})=>{_!=="open"&&(p(document,"DOMContentReady",i,d),p(t,"toggle",f,d),p(window,"load,resize,scroll",i,d),l==null||l.remove())};document.body.append(l||""),document.fonts.ready.then(i),u(window,"load,resize,scroll",i,d),u(document,"DOMContentReady",i,d),u(t,"toggle",f,d)}}function lt(t){var o;const n=t.target instanceof Element&&t.target.closest("a");if(n){const s=n.getRootNode(),e=((o=s.getElementById)==null?void 0:o.call(s,n.getAttribute("popovertarget")||""))||n.closest(`.${ct}`),a=n.getAttribute("popovertargetaction")||"toggle";t.defaultPrevented||e==null||e.togglePopover(a==="show"||(a==="hide"?!1:void 0))}}function It(t,n,o=!1){const{innerWidth:s,innerHeight:e,scrollY:a,scrollX:i}=window,{offsetWidth:f,offsetHeight:_}=n;let ut=-i,m=-a,c=t;do ut+=(c==null?void 0:c.offsetLeft)||0,m+=(c==null?void 0:c.offsetTop)||0,c=(c==null?void 0:c.offsetParent)||null;while(c);const h=m+((t==null?void 0:t.offsetHeight)||0),Pt=h+_<e,Vt=m-_>0,pt=!o&&Pt||!Vt,Ut=pt?a+h+_+30:0;n.style.left=`${Math.round(Math.min(Math.max(10,ut),s-f-10))}px`,n.style.top=`${Math.round(pt?h:m-_)}px`,l==null||l.style.setProperty("top",`${Math.round(Ut)}px`)}const kt=r.table.split(" ")[0],ft=new WeakMap;function Nt(t){var n,o;for(const s of t)if(s instanceof HTMLTableElement){const e=Array.from(((o=(n=s.tHead)==null?void 0:n.rows[0])==null?void 0:o.cells)||[],a=>{var i;return(i=a.innerText)==null?void 0:i.trim()});for(const a of s.tBodies)for(const i of a.rows)for(const f of i.cells)f.setAttribute("data-th",e[f.cellIndex]||":empty")}}function Lt(t){const n=t.getElementsByClassName(kt),o=y(r.tableChildAdded,()=>Nt(n));ft.set(t,o),o.observe(t)}function Bt(t){var n;(n=ft.get(t))==null||n.disconnect(t)}const Ot=(t,n,o)=>{const s=(o-1)/2,e=Math.max(Math.min(t-Math.floor(s),n-o+1),1),a=Math.min(Math.max(t+Math.ceil(s),o),n),i=Array.from({length:a+1-e},(f,_)=>_+e);return o>4&&e>1&&i.splice(0,2,1,0),o>3&&a<n&&i.splice(-2,2,0,n),i},Dt=({current:t=1,total:n=10,show:o=7})=>({prev:t>1?t-1:0,next:t<n?t+1:0,pages:Ot(t,n,o).map((s,e)=>({current:s===t&&"page",key:`key-${s}-${e}`,page:s}))});nt&&_t(document);function _t(t){xt(t),Et(t),Tt(t),Lt(t)}function Ht(t){At(t),Ct(t),wt(t),Bt(t)}return g.observe=_t,g.pagination=Dt,g.styles=gt,g.unobserve=Ht,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}),g}({});
|
|
2
|
+
//# sourceMappingURL=index.iife.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.iife.js","sources":["../designsystem/utils.ts","../designsystem/field/field.ts","../designsystem/fieldset/fieldset.ts","../designsystem/popover/popover.ts","../designsystem/table/table.ts","../designsystem/pagination/pagination.ts","../designsystem/index.ts"],"sourcesContent":["export const IS_BROWSER = typeof window !== 'undefined' && typeof document !== 'undefined';\nexport const QUICK_EVENT = { capture: true, passive: true };\n\n/**\n * useId\n * @return A generated unique ID\n */\nlet id = 0;\nconst UUID = `${Date.now().toString(36)}${Math.random().toString(36).slice(2, 5)}`;\nexport function useId (el: Element) {\n if (!el.id) el.id = `${UUID}${++id}`;\n\treturn el.id;\n};\n\n/**\n * Speed up MutationObserver by debouncing and only running when page is visible\n * @return new MutaionObserver\n */\nexport function createOptimizedMutationObserver(callback: MutationCallback) {\n const queue: MutationRecord[] = [];\n const observer = new MutationObserver((mutations) => {\n if (!queue[0]) requestAnimationFrame(process);\n queue.push(...mutations);\n });\n\n const process = () => {\n callback(queue, observer);\n queue.length = 0; // Reset queue\n };\n\n return observer;\n}\n\n// Internal helper for on / off\nconst events = (\n\taction: \"add\" | \"remove\",\n\telement: Node | Window,\n\trest: Parameters<typeof Element.prototype.addEventListener>,\n): void => {\n\tfor (const type of rest[0].split(\",\")) {\n\t\trest[0] = type;\n\t\tElement.prototype[`${action}EventListener`].apply(element, rest);\n\t}\n};\n\n/**\n * on\n * @param element The Element to use as EventTarget\n * @param types A comma separated string of event types\n * @param listener An event listener function or listener object\n */\nexport const on = (\n\telement: Node | Window,\n\t...rest: Parameters<typeof Element.prototype.addEventListener>\n): void => events(\"add\", element, rest);\n\n/**\n * off\n * @param element The Element to use as EventTarget\n * @param types A comma separated string of event types\n * @param listener An event listener function or listener object\n */\nexport const off = (\n\telement: Node | Window,\n\t...rest: Parameters<typeof Element.prototype.removeEventListener>\n): void => events(\"remove\", element, rest);\n\n/**\n * Child added event inspired by:\n * https://davidwalsh.name/detect-node-insertion\n */\nexport const onAdd = (animationName: string, callback: () => void) => {\n let timer: ReturnType<typeof requestAnimationFrame> | number = 0;\n const onAnimation = (event: Event & { animationName?: string }) => {\n if (event.animationName === animationName) {\n cancelAnimationFrame(timer);\n timer = requestAnimationFrame(callback);\n }\n };\n\n\treturn {\n\t\tobserve: (el: Element | Document, ) => on(el, 'animationend', onAnimation, QUICK_EVENT),\n\t\tdisconnect: (el: Element | Document, ) => off(el, 'animationstart', onAnimation, QUICK_EVENT)\n\t};\n}\n\nexport const isInputLike = (el: unknown): el is HTMLInputElement =>\n\tel instanceof HTMLElement && 'validity' in el && !(el instanceof HTMLButtonElement);\n\n// Make React support popover=\"\"target attribute\n// https://github.com/facebook/react/issues/27479\ndeclare global {\n\tnamespace React.JSX {\n\t\tinterface IntrinsicAttributes {\n\t\t\tpopovertargetaction?: string;\n\t\t\tpopovertarget?: string;\n\t\t\tpopover?: string | boolean;\n\t\t}\n\t}\n\tnamespace React {\n\t\tinterface HTMLAttributes<T> {\n\t\t\tpopovertargetaction?: string;\n\t\t\tpopovertarget?: string;\n\t\t\tpopover?: \"\" | \"auto\" | \"manual\" | undefined;\n\t\t}\n\t}\n}","import styles from '../styles.module.css';\nimport { QUICK_EVENT, isInputLike, off, on, onAdd, useId } from '../utils';\n\nconst CSS_FIELD = styles.field.split(' ')[0];\nconst CSS_VALIDATIONS = styles.validation.split(' ');\nconst CSS_VALIDATION = CSS_VALIDATIONS[0];\nconst BOUND = new WeakMap<Element | Document, ReturnType<typeof onAdd>>();\n\nfunction renderAria(fields: HTMLCollectionOf<Element>) {\n for(const field of fields) {\n const labels: HTMLLabelElement[] = [];\n const descs: string[] = [];\n let input: HTMLInputElement | null = null;\n let valid = true;\n\n for (const el of field.getElementsByTagName('*')) {\n if (el instanceof HTMLLabelElement) labels.push(el);\n else if (isInputLike(el)) input = el;\n else if (el.classList.contains(CSS_VALIDATION)) { // Must be before instanceof HTMLParagraphElement since validation can also be a <p>\n valid = el.getAttribute('data-color') === 'success';\n descs.unshift(useId(el));\n } else if (el instanceof HTMLParagraphElement) descs.push(useId(el));\n }\n\n if (input) for (const label of labels) label.htmlFor = useId(input);\n if (input) renderCounter(input);\n\n input?.setAttribute('aria-describedby', descs.join(' '));\n input?.setAttribute('aria-invalid', `${!valid}`);\n }\n}\nfunction handleInput({ target }: Event) {\n if (isInputLike(target)) renderCounter(target);\n}\n\nfunction renderCounter(input: HTMLInputElement) {\n const el = input?.nextElementSibling;\n const limit = el?.getAttribute('data-count');\n\n if (el && limit) {\n const remainder = Number(limit) - input.value.length;\n const nextInvalid = remainder < 0;\n const prevInvalid = el.getAttribute('aria-live') === 'polite';\n\n if (prevInvalid !== nextInvalid) {\n el.setAttribute('aria-live', nextInvalid ? 'polite' : 'off');\n for (const css of CSS_VALIDATIONS) el.classList.toggle(css, nextInvalid);\n }\n el.textContent = `${Math.abs(remainder)} tegn ${nextInvalid ? 'for mye' : 'igjen'}`;\n }\n}\n\nexport function observe (el: Element | Document) {\n const fields = el.getElementsByClassName(CSS_FIELD);\n const add = onAdd(styles.fieldChildAdded, () => renderAria(fields));\n BOUND.set(el, add);\n add.observe(el);\n on(el, 'input', handleInput, QUICK_EVENT);\n}\n\nexport function unobserve (el: Element | Document) {\n BOUND.get(el)?.disconnect(el);\n off(el, 'input', handleInput, QUICK_EVENT);\n}\n","import styles from '../styles.module.css';\nimport { isInputLike, onAdd, useId } from '../utils';\nconst CSS_FIELDSET = styles.fieldset.split(' ')[0];\nconst CSS_VALIDATION = styles.validation.split(' ')[0];\nconst BOUND = new WeakMap<Element | Document, ReturnType<typeof onAdd>>();\n\nfunction process(fieldsets: HTMLCollectionOf<Element>) {\n for(const fieldset of fieldsets) {\n const inputs: HTMLInputElement[] = [];\n let validationId = '';\n\n for (const el of fieldset.getElementsByTagName('*')) {\n if (el.classList.contains(CSS_VALIDATION)) validationId = useId(el);\n else if (isInputLike(el)) inputs.push(el);\n }\n\n if (validationId) \n for(const input of inputs) {\n input.setAttribute('aria-describedby', validationId);\n input.setAttribute('aria-invalid', 'true');\n }\n }\n}\n\nexport function observe (el: Element | Document) {\n const fields = el.getElementsByClassName(CSS_FIELDSET);\n const add = onAdd(styles.fieldsetValidationAdded, () => process(fields));\n BOUND.set(el, add);\n add.observe(el);\n}\n\nexport function unobserve (el: Element | Document) {\n BOUND.get(el)?.disconnect(el);\n}\n","import styles from '../styles.module.css';\nimport { IS_BROWSER, QUICK_EVENT, off, on } from '../utils';\n\nexport function observe(el: Node) {\n on(el, 'click', handleLinkClick); // Allow `<a>` to use `popovertarget` as well\n on(el, 'toggle', handleToggle, QUICK_EVENT); // Use capture since toggle does not bubble\n}\nexport function unobserve(el: Node) {\n off(el, 'click', handleLinkClick);\n off(el, 'toggle', handleToggle, QUICK_EVENT); // Use capture since toggle does not bubble\n}\n\ntype Toggle = Event & { newState?: string };\nconst CSS_POPOVER = styles.popover.split(' ')[0];\nconst SCROLLER = IS_BROWSER ? document.createElement('div') : null // Used to ensure we have scrollability under\nif (SCROLLER) SCROLLER.style.cssText = 'position:absolute;padding:1px';\n\nfunction handleToggle ({ target: el, newState }: Toggle){\n const isPopping = newState === 'open' && el instanceof HTMLElement && el.classList.contains(CSS_POPOVER);\n const anchor = isPopping && (el.getRootNode() as ShadowRoot)?.querySelector<HTMLElement>(`[popovertarget=\"${el.id}\"]`);\n\n if (anchor) {\n const isOver = el.getAttribute('data-position') === 'over';\n const update = () => place(anchor, el, isOver);\n const removeEvent = ({ newState }: Toggle) => {\n if (newState === 'open') return;\n off(document, 'DOMContentReady', update, QUICK_EVENT);\n off(el, 'toggle', removeEvent, QUICK_EVENT);\n off(window, 'load,resize,scroll', update, QUICK_EVENT);\n SCROLLER?.remove();\n }\n\n document.body.append(SCROLLER || '');\n document.fonts.ready.then(update); // Inital render and when fonts load\n on(window, 'load,resize,scroll', update, QUICK_EVENT);\n on(document, 'DOMContentReady', update, QUICK_EVENT);\n on(el, 'toggle', removeEvent, QUICK_EVENT);\n }\n}\n\n// Polyfill popovertarget for <a> (not supported by native)\n// and automatically assume popovertarget is the closest parent popover\n// but respect the popovertarget and popovertargetaction attribute\nfunction handleLinkClick (event: Event){\n const link = event.target instanceof Element && event.target.closest('a');\n if (link) {\n const root = link.getRootNode() as ShadowRoot;\n const target = root.getElementById?.(link.getAttribute('popovertarget') || '') || link.closest(`.${CSS_POPOVER}`);\n const action = link.getAttribute('popovertargetaction') || 'toggle';\n\n if (!event.defaultPrevented) target?.togglePopover(action === 'show' || (action === 'hide' ? false : undefined));\n }\n}\n\nfunction place (anchor: HTMLElement | null, poppe: HTMLElement, isOver = false) {\n const { innerWidth: winW, innerHeight: winH, scrollY: winY, scrollX: winX } = window;\n const { offsetWidth: popperW, offsetHeight: popperH } = poppe;\n let anchorX = -winX;\n let anchorY = -winY;\n let el = anchor;\n\n do {\n anchorX += el?.offsetLeft || 0;\n anchorY += el?.offsetTop || 0;\n el = (el?.offsetParent || null) as HTMLElement | null;\n } while (el);\n\n const anchorBottom = anchorY + (anchor?.offsetHeight || 0);\n const hasSpaceUnder = anchorBottom + popperH < winH;\n const hasSpaceOver = anchorY - popperH > 0\n const placeUnder = (!isOver && hasSpaceUnder) || !hasSpaceOver // Always place under when no hasSpaceOver, as no OS can scroll further up than 0\n const scroll = placeUnder ? winY + anchorBottom + popperH + 30 : 0\n\n poppe.style.left = `${Math.round(Math.min(Math.max(10, anchorX), winW - popperW - 10))}px`\n poppe.style.top = `${Math.round(placeUnder ? anchorBottom : anchorY - popperH)}px`\n SCROLLER?.style.setProperty('top', `${Math.round(scroll)}px`);\n}\n","import styles from '../styles.module.css';\nimport { onAdd } from '../utils';\nconst CSS_TABLE = styles.table.split(' ')[0];\nconst BOUND = new WeakMap<Element | Document, ReturnType<typeof onAdd>>();\n\nfunction process(tables: HTMLCollectionOf<Element>) {\n for(const table of tables) if (table instanceof HTMLTableElement) {\n const ths = Array.from(table.tHead?.rows[0]?.cells || [], (el) => el.innerText?.trim()); // Using innerText to only include visible text\n for (const tbody of table.tBodies) {\n for (const row of tbody.rows) {\n for (const cell of row.cells) {\n cell.setAttribute('data-th', ths[cell.cellIndex] || ':empty'); // Using U+200B to prevent empty string from collapsing\n }\n }\n }\n }\n}\n\nexport function observe (el: Element | Document) {\n const tables = el.getElementsByClassName(CSS_TABLE);\n const add = onAdd(styles.tableChildAdded, () => process(tables));\n BOUND.set(el, add);\n add.observe(el);\n}\n\nexport function unobserve (el: Element | Document) {\n BOUND.get(el)?.disconnect(el);\n}\n","const getSteps = (now: number, max: number, show: number) => {\n const offset = (show - 1) / 2;\n const start = Math.max(Math.min(now - Math.floor(offset), max - show + 1), 1);\n const end = Math.min(Math.max(now + Math.ceil(offset), show), max);\n const pages = Array.from({ length: end + 1 - start }, (_, i) => i + start);\n\n if (show > 4 && start > 1) pages.splice(0, 2, 1, 0);\n if (show > 3 && end < max) pages.splice(-2, 2, 0, max);\n return pages;\n};\n\nexport const pagination = ({\n current = 1,\n total = 10,\n show = 7,\n}) => ({\n prev: current > 1 ? current - 1 : 0,\n next: current < total ? current + 1 : 0,\n pages: getSteps(current, total, show).map((page, index) => ({\n current: page === current && 'page' as const,\n key: `key-${page}-${index}`,\n page,\n })),\n});\n","import * as field from './field/field';\nimport * as fieldset from './fieldset/fieldset';\nimport * as popover from './popover/popover';\nimport * as table from './table/table';\nimport { IS_BROWSER } from './utils';\nexport { pagination } from './pagination/pagination';\nexport * as styles from './styles.module.css';\n\nif (IS_BROWSER) observe(document); // Automatic observe on browser\n\nexport function observe(el: Element | Document) {\n field.observe(el);\n fieldset.observe(el);\n popover.observe(el);\n table.observe(el);\n}\n\nexport function unobserve(el: Element | Document) {\n field.unobserve(el);\n fieldset.unobserve(el);\n popover.unobserve(el);\n table.unobserve(el);\n}"],"names":["IS_BROWSER","QUICK_EVENT","id","UUID","useId","el","events","action","element","rest","type","on","off","onAdd","animationName","callback","timer","onAnimation","event","isInputLike","CSS_FIELD","styles","CSS_VALIDATIONS","CSS_VALIDATION","BOUND","renderAria","fields","field","labels","descs","input","valid","label","handleInput","target","renderCounter","limit","remainder","nextInvalid","css","observe","add","unobserve","CSS_FIELDSET","process","fieldsets","fieldset","inputs","validationId","handleLinkClick","handleToggle","CSS_POPOVER","SCROLLER","newState","anchor","_a","isOver","update","place","removeEvent","link","root","poppe","winW","winH","winY","winX","popperW","popperH","anchorX","anchorY","anchorBottom","hasSpaceUnder","hasSpaceOver","placeUnder","scroll","CSS_TABLE","tables","table","ths","_b","tbody","row","cell","getSteps","now","max","show","offset","start","end","pages","_","i","pagination","current","total","page","index","field.observe","fieldset.observe","popover.observe","table.observe","field.unobserve","fieldset.unobserve","popover.unobserve","table.unobserve"],"mappings":"25DAAaA,GAAa,OAAO,OAAW,KAAe,OAAO,SAAa,IAClEC,EAAc,CAAE,QAAS,GAAM,QAAS,EAAK,EAM1D,IAAIC,GAAK,EACT,MAAMC,GAAO,GAAG,KAAK,IAAM,EAAA,SAAS,EAAE,CAAC,GAAG,KAAK,SAAS,SAAS,EAAE,EAAE,MAAM,EAAG,CAAC,CAAC,GACzE,SAASC,E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,GACzB,KAAAD,CAAA,EACA,CACJ,GCfIjG,OAAoB,QAAQ,EAEzB,SAASwC,GAAQnC,EAAwB,CAC9C8F,GAAc9F,CAAE,EAChB+F,GAAiB/F,CAAE,EACnBgG,GAAgBhG,CAAE,EAClBiG,GAAcjG,CAAE,CAClB,CAEO,SAASqC,GAAUrC,EAAwB,CAChDkG,GAAgBlG,CAAE,EAClBmG,GAAmBnG,CAAE,EACrBoG,GAAkBpG,CAAE,EACpBqG,GAAgBrG,CAAE,CACpB"}
|
package/mtds/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { observe as e, unobserve as r } from "./field/field.js";
|
|
2
|
+
import { observe as s, unobserve as b } from "./fieldset/fieldset.js";
|
|
3
|
+
import { observe as v, unobserve as n } from "./popover/popover.js";
|
|
4
|
+
import { observe as m, unobserve as t } from "./table/table.js";
|
|
5
|
+
import { IS_BROWSER as u } from "./utils.js";
|
|
6
|
+
import { pagination as S } from "./pagination/pagination.js";
|
|
7
|
+
import * as x from "./styles.module.css.js";
|
|
8
|
+
u && a(document);
|
|
9
|
+
function a(o) {
|
|
10
|
+
e(o), s(o), v(o), m(o);
|
|
11
|
+
}
|
|
12
|
+
function d(o) {
|
|
13
|
+
r(o), b(o), n(o), t(o);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
a as observe,
|
|
17
|
+
S as pagination,
|
|
18
|
+
x as styles,
|
|
19
|
+
d as unobserve
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../designsystem/index.ts"],"sourcesContent":["import * as field from './field/field';\nimport * as fieldset from './fieldset/fieldset';\nimport * as popover from './popover/popover';\nimport * as table from './table/table';\nimport { IS_BROWSER } from './utils';\nexport { pagination } from './pagination/pagination';\nexport * as styles from './styles.module.css';\n\nif (IS_BROWSER) observe(document); // Automatic observe on browser\n\nexport function observe(el: Element | Document) {\n field.observe(el);\n fieldset.observe(el);\n popover.observe(el);\n table.observe(el);\n}\n\nexport function unobserve(el: Element | Document) {\n field.unobserve(el);\n fieldset.unobserve(el);\n popover.unobserve(el);\n table.unobserve(el);\n}"],"names":["IS_BROWSER","observe","el","field.observe","fieldset.observe","popover.observe","table.observe","unobserve","field.unobserve","fieldset.unobserve","popover.unobserve","table.unobserve"],"mappings":";;;;;;;AAQIA,OAAoB,QAAQ;AAEzB,SAASC,EAAQC,GAAwB;AAC9CC,EAAAA,EAAcD,CAAE,GAChBE,EAAiBF,CAAE,GACnBG,EAAgBH,CAAE,GAClBI,EAAcJ,CAAE;AAClB;AAEO,SAASK,EAAUL,GAAwB;AAChDM,EAAAA,EAAgBN,CAAE,GAClBO,EAAmBP,CAAE,GACrBQ,EAAkBR,CAAE,GACpBS,EAAgBT,CAAE;AACpB;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const Variants: Story;
|
|
9
|
+
export declare const Select: Story;
|
|
10
|
+
export declare const Checkbox: Story;
|
|
11
|
+
export declare const Radio: Story;
|
|
12
|
+
export declare const Switch: Story;
|
|
13
|
+
export declare const Sizes: Story;
|
|
14
|
+
export declare const ReadOnly: Story;
|
|
15
|
+
export declare const Disabled: Story;
|
|
16
|
+
export declare const Search: Story;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
layout: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
export declare const Flex: Story;
|
|
11
|
+
export declare const Grid: Story;
|
|
12
|
+
export declare const Box: Story;
|
|
13
|
+
export declare const Gap: Story;
|
|
14
|
+
export declare const Center: Story;
|
|
15
|
+
export declare const Align: Story;
|
|
16
|
+
export declare const Justify: Story;
|
|
17
|
+
export declare const AlignContent: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const Sizes: Story;
|
|
9
|
+
export declare const English: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" aria-label="Norwegian Food Safety Authority" xmlns="http://www.w3.org/2000/svg" width="4597" height="1084" viewBox="0 0 4597 1084" fill="currentColor"><path d="M2060.38 962.1c0-22.52-13.24-42.25-48.07-42.25-27.87 0-45.52 17.41-47.61 36.91l24.61 5.57c1.17-11.37 8.36-20.43 23.23-20.43 14.87 0 21.37 7.67 21.37 17.18 0 3.95-1.87 7.2-8.36 8.13l-29.04 4.41c-19.27 2.78-34.14 13.93-34.14 34.12 0 17.88 14.63 34.13 38.33 34.13 18.34 0 29.49-9.29 34.83-17.88 0 9.06.93 13.7 1.16 14.4h25.08c-.23-1.16-1.39-7.9-1.39-18.11v-56.19.01Zm-26.47 27.4c0 22.05-13.01 29.25-28.11 29.25-10.68 0-16.49-6.96-16.49-14.62 0-9.29 6.74-13.93 15.1-15.33l29.5-4.4v5.1Zm-126.03-66.17h26.71v113.07h-26.71V923.33Zm-58.95 14.4c-4.87-9.28-15.79-16.48-33.44-16.48-31.12 0-52.25 23.22-52.25 55.03 0 31.81 22.06 55.02 52.25 55.02 16.49 0 27.87-7.66 32.75-16.48v11.84c0 22.98-10.69 33.9-32.06 33.9-15.55 0-26.47-10.45-28.33-24.39l-24.85 6.5c3.02 22.76 23.92 41.33 53.88 41.33 42.5 0 58.06-28.09 58.06-58.27V923.34h-26.01v14.4Zm-29.03 70.58c-17.65 0-29.49-12.77-29.49-32.04s12.77-31.8 29.49-31.8 29.03 12.53 29.03 31.8c0 19.27-11.38 32.04-29.03 32.04Zm118.87-124.68c0 9.75-8.14 17.41-17.65 17.41a17.4 17.4 0 0 1-17.42-17.4c0-9.75 7.9-17.65 17.42-17.65 9.52 0 17.65 7.9 17.65 17.64Zm-30.56-228.3.41 1.21h80l-.41-2.1h-.13c-.17-.88-4.2-21.44-4.2-54.79V428.67c0-39.2-14.49-130.35-148.64-130.35-91.5 0-139.98 57.47-146.94 111.7l78.64 17.73c4.53-36.3 30.75-58.81 68.97-58.81s63.6 18.9 63.6 50.56c0 8.44-2.5 19.97-24.05 23l-88.7 13.45c-66.23 9.53-105.79 49-105.79 105.6 0 27.96 11.36 54.1 31.93 73.61 22.12 20.95 52.13 32 86.89 32 60.57 0 91.91-32.23 104.8-50.49.38 24.1 2.86 36.53 3.62 38.65Zm-8.69-143.29h-.03c0 72.16-45.77 87.3-84.15 87.3-33.42 0-48.65-22.2-48.65-42.8 0-32.65 27.98-42.13 44.64-44.9l88.14-13.15h.05v13.56Zm-209.41 407.81c-28.57 0-55.04 23.68-55.04 59.43 0 38.3 27.17 60.59 57.83 60.59 27.16 0 45.05-16.02 51.09-35.75l-22.76-7.2c-3.72 11.14-11.61 19.73-28.33 19.73s-30.2-12.3-30.89-29.48h82.67c.23-.47.7-4.18.7-8.59 0-35.75-20.44-58.73-55.27-58.73Zm-27.41 47.6c.93-12.07 10.69-25.07 27.64-25.07 18.58 0 27.4 11.84 27.87 25.07h-55.51Zm933-658.24h85.76v348.4h-85.76v-348.4Zm-8.18-118.73a55.32 55.32 0 0 1 55.49-55.48c30.95 0 56.14 24.76 56.14 55.48 0 30.72-24.67 54.76-56.14 54.76s-55.49-24.17-55.49-54.76Zm535.01 370.3c0-18.63-13.54-31.23-39.19-36.44L3032.02 513c-59.24-12.94-94.6-51.12-94.6-102.01 0-62.13 57.96-112.67 129.2-112.67 43.07 0 77.54 12.06 102.34 35.8 24.62 23.57 31.42 51.05 33.24 61.73l.25 1.53-73.16 20.75-.29-1.94c-1.25-8.38-9.91-50.1-62.38-50.1-26.95 0-48.08 16.63-48.08 37.86 0 17.3 12.51 30.17 33.49 34.32l52.61 10.58h-.09c64.27 13.85 101.09 50.62 101.09 106.3 0 55.67-45.58 112-132.74 112-44.56 0-82.19-13.15-108.8-37.87-19.97-18.6-33.44-43.84-36.04-67.62l-.13-1.46 75.37-20.75.18 2.1c2.44 26.3 21.88 57.06 68.79 57.06 34.72 0 50.26-19.24 50.26-37.86v.01Zm-257.93 96.84h-85.77V141.81h85.77v515.81Zm853.51-.05h-86.03V309.56h83.9v41.59c21.17-32.32 58.35-51.47 100.83-51.47 78.35 0 127.01 52.98 127.01 138.28V657.6h-86.04v-205.5c0-27.87-9.03-74.64-69.48-74.64-42.63 0-70.19 31.22-70.19 79.59v200.52Zm-613.39-208.7-.08-.02h.08v.02ZM363.96 576.36a444.01 444.01 0 0 0-53.07 211.23v2.24c-190.48-41.92-329.3-226.73-308.9-428 149.27-6.03 295.37 81.25 361.97 214.52ZM1516.21 295.2l-153.68 360.1h-78.43l-152.26-358.66V657.6H1045V152.7h116.94l.47 1.03 162.34 378.9 160.69-379.9h119.04v504.9h-88.27V295.21ZM1281.5 919.85c-33.67 0-58.52 25.07-58.52 59.9s24.62 60.13 58.52 60.13c33.9 0 58.76-25.31 58.76-60.13 0-34.82-25.08-59.9-58.76-59.9Zm0 95.88c-16.48 0-31.58-12.53-31.58-35.98 0-23.45 14.86-35.52 31.58-35.52s31.59 12.07 31.59 35.52c0 23.45-15.1 35.98-31.59 35.98Zm143.78-93.79c3.25 0 6.04.46 7.2.7v27.4c-3.02-.48-6.04-.7-8.83-.7-20.9 0-30.42 12.07-30.42 33.2v53.86h-26.94V923.33h26.24v18.11c5.35-12.3 17.89-19.5 32.75-19.5ZM239.62 370.06a444.9 444.9 0 0 0-228.93-61.44C51.99 131.74 210.65 0 400.09 0c201.48 0 368.16 149.02 395.86 342.85-80.23-7.05-161.2 7.8-233.24 42.9-10.7-97.75-90.3-148.77-162.7-148.77-67.45 0-141.81 43.75-160.39 133.07Zm1359.05 553.27h27.4l-36.23 113.07h-26.94l-28.1-81.26-27.4 81.26h-27.64l-36.7-113.07h28.8l22.99 78.24 26.71-78.24h27.87l26.71 78.24 22.53-78.24Zm-431.36-51.54h27.87v164.61h-29.03l-81.28-124.67v124.67H1057V871.8h35.53l74.78 116.77V871.8ZM799.97 396.55c.02 1.12.02 2.23.02 3.38C801.23 633.38 596.77 820 364.53 798.27c-8.52-235.98 200.9-429.1 435.44-401.72Zm1655.2 523.3c-33.67 0-58.52 25.07-58.52 59.9s24.61 60.13 58.52 60.13c33.91 0 58.76-25.31 58.76-60.13 0-34.82-25.09-59.9-58.76-59.9Zm0 95.88c-16.49 0-31.58-12.53-31.58-35.98 0-23.45 14.86-35.52 31.58-35.52s31.59 12.07 31.59 35.52c0 23.45-15.1 35.98-31.59 35.98Zm1713.44-95.88c-33.67 0-58.52 25.07-58.52 59.9s24.61 60.13 58.52 60.13c33.91 0 58.76-25.31 58.76-60.13 0-34.82-25.09-59.9-58.76-59.9Zm0 95.88c-16.49 0-31.58-12.53-31.58-35.98 0-23.45 14.86-35.52 31.58-35.52s31.59 12.07 31.59 35.52c0 23.45-15.1 35.98-31.59 35.98Zm-82.49-50.84v71.51h-26.94v-66.86c0-13.93-6.27-25.07-23.22-25.07-14.87 0-23 11.14-23.46 25.53v66.4h-26.94V868.31h26.94v65.93c7.67-9.98 20.43-14.16 32.28-14.16 27.87 0 41.34 19.97 41.34 44.81Zm-427.59-93.1-64.1 164.61h29.5l15.33-41.33h69.67l15.56 41.33h30.42l-64.1-164.6h-32.28Zm-9.52 97.51 25.08-67.33 25.08 67.33h-50.16ZM4260.2 549.8v-.05c-15.06 28.64-41.37 43.24-78.49 43.24-50.28 0-89.94-36.95-92.83-86.29h253.34s2.16-5.87 2.16-27.87c0-111.5-65.59-180.51-171.21-180.51-43.77 0-86.96 18.28-118.41 50.15-33.6 33.94-52.07 81-52.07 132.5 0 55.57 18.66 103.04 53.91 137.16 32.58 31.6 77.05 49 125.07 49 72.28 0 118.72-35.38 143.14-76.38a198.49 198.49 0 0 0 17.1-40.98h-81.71v.02Zm-86.3-179.51c36.89 0 80.75 19.13 83.61 72.85h-166.42c4.69-47.31 45.91-72.85 82.81-72.85Zm-305.31 645.45c0 9.29.7 16.49 1.16 20.67h-25.78c-.47-2.55-.93-7.9-.93-12.54-5.57 10.21-18.81 15.79-32.05 15.79-26.94 0-42.73-19.97-42.73-45.04v-71.28h26.94v66.4c0 13.93 7.19 25.77 22.76 25.77s23.69-10.44 23.69-25.3v-66.87h26.94v92.4Zm83.4-1.85c3.72 0 8.14-.7 9.29-.93v22.29c-1.62.7-6.73 2.55-16.48 2.55-20.91 0-33.91-12.53-33.91-33.66v-56.88h-20.9v-23.92h5.8c12.08 0 17.42-7.66 17.42-17.64v-16.95h24.38v34.6h23.46v23.91h-23.46v52.46c0 9.99 4.42 14.17 14.4 14.17Zm360.4-91.94c3.25 0 6.03.46 7.2.7v27.4c-3.02-.48-6.04-.7-8.83-.7-20.9 0-30.42 12.07-30.42 33.2v53.86h-26.94V923.33h26.24v18.11c5.35-12.3 17.89-19.5 32.75-19.5Zm29.69 1.4h26.71v113.06h-26.71V923.33Zm254.92 0-71.99 158.79h-28.8l27.17-59.2-48.31-99.6h30.43l32.51 71.51 30.43-71.5H4597Zm-54.25-261.6c-65.13 0-105.64-39.94-105.64-104.24V379.1h-64V311.3h19.52c32.77 0 51.64-18.97 51.64-52v-54.9h78.13v105.3h71.91v69.34h-71.91V544c0 28.99 12.69 41.36 42.43 41.36 11.62 0 25.11-2.2 28.14-2.78v.04l2.03-.4v71.12l-1.06.47c-5.56 2.41-21.77 7.91-51.19 7.91Zm-169.78 221.9c0 9.74-8.13 17.4-17.65 17.4a17.4 17.4 0 0 1-17.42-17.4c0-9.75 7.89-17.65 17.42-17.65 9.53 0 17.65 7.9 17.65 17.64Zm79.11 130.24c3.72 0 8.12-.7 9.29-.93v22.29c-1.63.7-6.74 2.55-16.49 2.55-20.9 0-33.91-12.53-33.91-33.66v-56.88h-20.9v-23.92h5.81c12.07 0 17.41-7.66 17.41-17.64v-16.95h24.39v34.6h23.45v23.91h-23.45v52.46c0 9.99 4.41 14.17 14.4 14.17ZM3101.15 962.1c0-22.52-13.24-42.25-48.07-42.25-27.87 0-45.52 17.41-47.61 36.91l24.61 5.57c1.16-11.37 8.37-20.43 23.23-20.43 14.86 0 21.36 7.67 21.36 17.18 0 3.95-1.86 7.2-8.36 8.13l-29.02 4.41c-19.28 2.78-34.15 13.93-34.15 34.12 0 17.88 14.64 34.13 38.33 34.13 18.34 0 29.49-9.29 34.83-17.88 0 9.06.93 13.7 1.16 14.4h25.08c-.23-1.16-1.39-7.9-1.39-18.11v-56.19.01Zm-26.48 27.4c0 22.05-13 29.25-28.1 29.25-10.68 0-16.49-6.96-16.49-14.62 0-9.29 6.74-13.93 15.1-15.33l29.49-4.4v5.1Zm-485.01-69.65c-33.67 0-58.52 25.07-58.52 59.9s24.62 60.13 58.52 60.13c33.9 0 58.76-25.31 58.76-60.13 0-34.82-25.08-59.9-58.76-59.9Zm0 95.88c-16.49 0-31.58-12.53-31.58-35.98 0-23.45 14.86-35.52 31.58-35.52s31.58 12.07 31.58 35.52c0 23.45-15.09 35.98-31.58 35.98Zm-72.26-433.09 2.1-.4v71.11l-1.07.47c-6.94 2.95-22.83 7.91-51.17 7.91-65.18 0-105.61-39.93-105.61-104.23V379.1h-64.04V311.3h19.51c32.8 0 51.64-18.97 51.64-52v-54.9h78.15v105.3h71.85v69.34h-71.85V544c0 28.99 12.65 41.36 42.34 41.36 11.65 0 25.18-2.2 28.14-2.78v.02h.01v.03Zm985.03-273.43h91.52L3373.5 790.99h-92.17v-.04l82.02-177.12-149.18-304.63h97.32l.48 1.03 98.17 213.9 92.29-214.92ZM2251.97 582.65l2.06-.41v71.11l-1.05.47c-6.93 2.95-22.82 7.91-51.18 7.91-65.17 0-105.6-39.93-105.6-104.23V379.1h-64.04V311.3h19.52c32.8 0 51.63-18.97 51.63-52v-54.9h78.16v105.3h71.85v69.34h-71.85V544c0 28.99 12.68 41.36 42.37 41.36 11.69 0 25.16-2.2 28.13-2.78v.05Zm732.2 407.32c0 25.53-20.67 49.91-58.29 49.91-41.8 0-61.08-26.93-63.64-50.6l26.01-7.44c1.63 17.18 13.94 32.97 37.63 32.97 19.74 0 29.96-9.98 29.96-22.75 0-10.68-7.9-19.27-22.07-22.29l-23.22-4.88c-25.08-5.1-41.8-21.59-41.8-46.2 0-27.62 25.31-50.38 55.97-50.38 38.78 0 53.88 23.68 57.59 42.02l-25.08 7.9c-1.63-10.22-10.22-25.3-32.28-25.3-16.72 0-28.34 11.13-28.34 23.67 0 10.45 6.51 18.34 19.28 21.13l23.69 4.88c29.03 5.8 44.59 24.14 44.59 47.36ZM2286.24 871.8h102.41v26.23h-74.55v46.2h66.89V970h-66.89v66.4h-27.86v-164.6Zm492.71-3.48h-26.24v68.26c-3.49-7.2-13.47-16.25-33.21-16.25-31.82 0-53.88 25.08-53.88 59.2 0 34.12 21.83 59.66 54.34 59.66 16.03 0 27.87-7.89 33.21-17.41 0 4.64.7 12.07 1.17 14.63h25.77a186.16 186.16 0 0 1-1.16-20.67V868.31Zm-55.97 147.19c-18.34 0-30.42-14.39-30.42-35.98 0-21.59 13.01-35.29 30.66-35.29s29.72 13.46 29.72 35.06-11.61 36.21-29.96 36.21Zm664.29-1.62c3.72 0 8.13-.7 9.3-.93v22.29c-1.63.7-6.74 2.55-16.49 2.55-20.9 0-33.91-12.53-33.91-33.66v-56.88h-20.9v-23.92h5.8c12.08 0 17.42-7.66 17.42-17.64v-16.95h24.39v34.6h23.45v23.91h-23.45v52.46c0 9.99 4.41 14.17 14.39 14.17Zm116.36-90.55h28.56l-71.99 158.8h-28.8l27.18-59.2-48.31-99.6h30.42l32.52 71.51 30.42-71.5ZM2193.5 964.9v71.51h-26.94v-66.86c0-13.93-6.27-25.07-23.22-25.07-15.33 0-23.45 11.84-23.45 26.7v65.24h-26.95V923.34h26.25v15.1c7.43-13 20.9-18.35 33.44-18.35 27.64 0 40.87 19.97 40.87 44.81Zm1064.22-45.04c-28.57 0-55.04 23.68-55.04 59.43 0 38.3 27.17 60.59 57.82 60.59 27.17 0 45.06-16.02 51.1-35.75l-22.76-7.2c-3.72 11.14-11.61 19.73-28.34 19.73s-30.19-12.3-30.88-29.48h82.67c.23-.47.7-4.18.7-8.59 0-35.75-20.44-58.73-55.27-58.73Zm-27.41 47.6c.93-12.07 10.68-25.07 27.64-25.07 18.58 0 27.4 11.84 27.86 25.07h-55.5Zm-50.85-100.3c6.74 0 12.31 1.4 14.17 2.32v22.98c-1.63-.47-4.65-1.16-9.75-1.16-7.21 0-16.73 3.25-16.73 17.18v14.86h26.25v23.45h-26.25v89.62h-27.17v-89.62h-19.74v-23.45h19.74v-15.55c0-25.3 16.26-40.63 39.48-40.63Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" aria-label="Biebmobearráigeahčču" xmlns="http://www.w3.org/2000/svg" width="4595" height="1093" fill="currentColor" viewBox="0 0 4595 1093"><path d="M2595.7 309.21h85.76v348.41h-85.76V309.21Zm268.9-167.4h-85.77v515.82h85.77V141.81Zm-768.4 415.7c0 64.3 40.43 104.23 105.6 104.23 28.36 0 44.25-4.97 51.18-7.91l1.05-.47v-71.12l-2.06.41v-.06c-2.97.59-16.44 2.78-28.13 2.78-29.69 0-42.37-12.38-42.37-41.35V379.05h71.85v-69.34h-71.85V204.42h-78.16v54.9c0 33.01-18.83 51.99-51.63 51.99h-19.52v67.78h64.04v178.42Zm-107.58 99.05h-80l-.41-1.22c-.76-2.12-3.24-14.55-3.62-38.65-12.89 18.26-44.23 50.48-104.8 50.48-34.76 0-64.77-11.04-86.89-31.99-20.57-19.52-31.93-45.67-31.93-73.61 0-56.61 39.56-96.07 105.79-105.61l88.7-13.45c21.55-3.03 24.05-14.56 24.05-23 0-31.66-25.38-50.56-63.6-50.56s-64.44 22.52-68.97 58.81l-78.64-17.72c6.96-54.23 55.44-111.71 146.94-111.71 134.15 0 148.64 91.16 148.64 130.35v170.99c0 33.35 4.03 53.92 4.2 54.79h.13l.41 2.1Zm-89.1-158.08h-.05l-88.14 13.16c-16.66 2.77-44.64 12.25-44.64 44.9 0 20.61 15.23 42.79 48.65 42.79 38.38 0 84.15-15.14 84.15-87.29h.03v-13.57.01Zm462.13 59.03c0 64.3 40.43 104.23 105.61 104.23 28.34 0 44.23-4.97 51.17-7.91l1.07-.47v-71.12l-2.1.41v-.03h-.01v-.03c-2.96.59-16.49 2.78-28.14 2.78-29.69 0-42.34-12.38-42.34-41.35V379.05h71.85v-69.34h-71.85V204.42h-78.15v54.9c0 33.01-18.84 51.99-51.64 51.99h-19.51v67.78h64.04v178.42ZM1131.84 296.65l152.26 358.66h78.43l153.68-360.1v362.42h88.27V152.72h-119.04l-160.69 379.91-162.34-378.91-.47-1.03H1045v504.93h86.84V296.65ZM2643.01 135a55.32 55.32 0 0 0-55.49 55.48c0 30.59 24.01 54.76 55.49 54.76s56.14-24.04 56.14-54.76-25.2-55.48-56.14-55.48Zm461.71 313.86h-.08l.08.02v-.02Zm1239.66 29.96c0 22-2.16 27.88-2.16 27.88h-253.34c2.89 49.34 42.55 86.28 92.83 86.28 37.12 0 63.43-14.59 78.49-43.24v.05h81.71a198.72 198.72 0 0 1-17.1 40.97c-24.42 41.01-70.86 76.39-143.14 76.39-48.02 0-92.49-17.41-125.07-49-35.25-34.14-53.91-81.6-53.91-137.16 0-51.5 18.47-98.56 52.07-132.51 31.45-31.87 74.64-50.15 118.41-50.15 105.62 0 171.21 69.02 171.21 180.51v-.02Zm-86.87-35.69c-2.86-53.72-46.72-72.85-83.61-72.85s-78.12 25.54-82.81 72.85h166.42Zm-440.7-143.46c-42.48 0-79.67 19.15-100.83 51.47v-41.59h-83.9v348.02h86.03V457.04c0-48.37 27.56-79.59 70.19-79.59 60.45 0 69.48 46.78 69.48 74.65v205.5h86.04V437.95c0-85.31-48.66-138.28-127.01-138.29v.01Zm-611.17 255.49c0-55.68-36.82-92.46-101.09-106.3h.09l-52.61-10.58c-20.98-4.15-33.49-17.01-33.49-34.32 0-21.23 21.13-37.86 48.08-37.86 52.47 0 61.13 41.72 62.38 50.1l.29 1.94 73.16-20.75-.25-1.53c-1.82-10.68-8.62-38.16-33.24-61.72-24.8-23.75-59.27-35.81-102.34-35.81-71.24 0-129.2 50.54-129.2 112.67 0 50.89 35.36 89.08 94.6 102.02l51.32 11.32c25.65 5.22 39.19 17.82 39.19 36.44 0 18.62-15.54 37.86-50.26 37.86-46.91 0-66.35-30.76-68.79-57.07l-.18-2.1-75.37 20.75.13 1.47c2.6 23.77 16.07 49.02 36.04 67.62 26.61 24.71 64.24 37.86 108.8 37.86 87.16 0 132.74-56.32 132.74-112v-.01Zm296.79-245.95-92.29 214.93-98.17-213.91-.48-1.03h-97.32l149.18 304.64-82.02 177.12v.04h92.17l220.45-481.79h-91.52Zm1090.54 273.43v-.05c-3.03.59-16.52 2.78-28.14 2.78-29.74 0-42.43-12.38-42.43-41.35V379.05h71.91v-69.34h-71.91V204.42h-78.13v54.9c0 33.01-18.87 51.99-51.64 51.99h-19.52v67.78h64v178.42c0 64.3 40.51 104.23 105.64 104.23 29.42 0 45.63-5.51 51.19-7.91l1.06-.47v-71.12l-2.03.4ZM400.01 236.99c72.4 0 152 51.01 162.7 148.77 72.05-35.09 153.01-49.95 233.24-42.9C768.25 149.02 601.57 0 400.09 0 210.65 0 51.99 131.74 10.68 308.61a445.05 445.05 0 0 1 228.93 61.44c18.58-89.32 92.94-133.07 160.39-133.07l.01.01ZM1.99 361.84c-20.4 201.27 118.42 386.08 308.91 428v-2.24a444.14 444.14 0 0 1 53.07-211.24C297.36 443.08 151.25 355.8 1.99 361.84Zm362.55 436.44C596.78 820.02 801.24 633.39 800 399.93c0-1.14 0-2.26-.02-3.38-234.54-27.38-443.96 165.76-435.44 401.73Zm1160.02 185.69h-.01c0 35.54-21.05 62.39-55.42 62.39-16.71 0-29.53-7.25-36.31-18.62v15.72h-27.34V868.42h27.59v71.8c5.32-9.19 18.88-17.65 37.04-17.65 35.33 0 54.45 26.83 54.45 61.4Zm-28.32.25c0-23.45-13.07-36.74-31.7-36.74s-31.71 13.3-31.71 36.74 13.79 37.23 31.71 37.23 31.7-14.02 31.7-37.23Zm-120.03-.97h.03c0 4.59-.48 8.46-.73 8.94h-86.16c.73 17.89 14.76 30.7 32.18 30.7s25.66-8.94 29.53-20.55l23.71 7.49c-6.29 20.55-24.92 37.24-53.25 37.24-31.94 0-60.26-23.22-60.26-63.1 0-37.23 27.59-61.88 57.35-61.88 36.31 0 57.6 23.93 57.6 61.16Zm-28.28-11.6c-.48-13.78-9.69-26.11-29.05-26.11-17.67 0-27.83 13.54-28.8 26.11h57.85Zm2081.75-95.98h-23.72l25.65 35.05h30.01l25.65-35.05h-23.72l-16.94 18.61-16.93-18.61ZM1217.79 866c-9.92 0-18.15 8.22-18.15 18.37a18.12 18.12 0 0 0 18.15 18.13c9.92 0 18.4-7.98 18.4-18.13a18.37 18.37 0 0 0-18.4-18.37Zm2231.24 155.46v-.02c-17.66 0-32.91-13.29-32.91-36.98 0-23.69 15.25-36.5 32.43-36.5s25.89 11.6 28.56 22l25.17-9.19c-4.84-18.85-22.27-38.68-53.97-38.68-33.88 0-60.26 26.11-60.26 62.38s26.38 62.62 60.98 62.62c30.98 0 48.65-20.07 54.22-38.44l-24.69-8.94c-2.66 8.94-11.13 21.76-29.53 21.76v-.01Zm183.26-95.74h-28.08v69.62c0 15.47-7.75 26.35-24.69 26.35s-23.71-12.33-23.71-26.83v-69.14h-28.07v74.23c0 26.1 16.45 46.9 44.52 46.9 13.8 0 27.59-5.8 33.4-16.45 0 4.83.48 10.4.97 13.06h26.87a190.06 190.06 0 0 1-1.21-21.52v-96.22Zm-1033.48-50.54h-33.16l-21.54 35.78h22.99l31.71-35.78ZM1204 1043.45h27.84V925.72H1204v117.73Zm-30.35-47.4c0 27.57-21.3 47.4-53.24 47.4H1057V872.04h59.06c32.91 0 52.27 19.34 52.27 46.17 0 18.13-10.65 31.67-25.41 36.98 18.15 4.83 30.73 20.55 30.73 40.85v.01Zm-87.85-51.48h26.38c16.95 0 27.11-9.67 27.11-23.93s-10.16-23.93-27.84-23.93h-25.65v47.86Zm58.33 49.55c0-14.74-9.92-25.14-27.83-25.14h-30.5v49.8h29.53c17.42 0 28.8-9.43 28.8-24.66Zm736.55-9.66c0 36.26-25.89 62.62-61.22 62.62s-60.99-26.36-60.99-62.62 25.89-62.38 60.99-62.38 61.22 26.35 61.22 62.38Zm-28.31 0c0-24.41-15.49-36.98-32.91-36.98-17.42 0-32.92 12.57-32.92 36.98 0 24.41 15.74 37.47 32.92 37.47s32.91-12.81 32.91-37.47Zm436.2 40.12c0 10.64 1.21 17.66 1.46 18.86h-26.14c-.24-.72-1.21-5.56-1.21-15-5.56 8.95-17.19 18.62-36.31 18.62-24.68 0-39.93-16.93-39.93-35.54 0-21.03 15.49-32.63 35.58-35.53l30.26-4.59c6.77-.97 8.71-4.35 8.71-8.46 0-9.91-6.78-17.89-22.28-17.89s-22.98 9.43-24.19 21.27l-25.66-5.8c2.18-20.31 20.57-38.43 49.61-38.43 36.31 0 50.1 20.55 50.1 43.99v58.5Zm-27.58-35.29-30.74 4.59c-8.72 1.45-15.73 6.29-15.73 15.95 0 7.98 6.05 15.23 17.18 15.23 15.73 0 29.29-7.49 29.29-30.46v-5.31Zm702.22-6.04c0 4.59-.48 8.46-.72 8.94h-86.16c.72 17.89 14.76 30.7 32.18 30.7s25.66-8.94 29.54-20.55l23.71 7.49c-6.29 20.55-24.92 37.24-53.25 37.24-31.94 0-60.25-23.22-60.25-63.1 0-37.23 27.58-61.88 57.35-61.88 36.31 0 57.6 23.93 57.6 61.16Zm-28.31-11.6c-.48-13.78-9.69-26.11-29.05-26.11-17.66 0-27.83 13.54-28.8 26.11h57.85Zm-582.62-27.07v-18.86h-27.35v117.73H2353v-56.09c0-22 9.94-34.57 31.71-34.57 2.91 0 6.05.24 9.2.73V925a40.23 40.23 0 0 0-7.5-.73c-15.49 0-28.57 7.49-34.13 20.31Zm94.83 0v-18.86h-27.35v117.73h28.07v-56.09c0-22 9.93-34.57 31.72-34.57 2.9 0 6.05.24 9.19.73V925a40.23 40.23 0 0 0-7.5-.73c-15.5 0-28.57 7.49-34.13 20.31ZM2659.85 866c-9.92 0-18.15 8.22-18.15 18.37a18.12 18.12 0 0 0 18.15 18.13c9.92 0 18.39-7.98 18.39-18.13a18.37 18.37 0 0 0-18.39-18.37Zm-50.15 158.58c0 10.64 1.21 17.66 1.45 18.86h-26.14c-.24-.72-1.21-5.56-1.21-15-5.57 8.95-17.18 18.62-36.3 18.62-24.68 0-39.93-16.93-39.93-35.54 0-21.03 15.49-32.63 35.57-35.53l30.25-4.59c6.78-.97 8.71-4.35 8.71-8.46 0-9.91-6.77-17.89-22.26-17.89-15.49 0-22.99 9.43-24.2 21.27l-25.65-5.8c2.18-20.31 20.57-38.43 49.61-38.43 36.31 0 50.1 20.55 50.1 43.99v58.5Zm-27.6-35.29-30.73 4.59c-8.71 1.45-15.73 6.29-15.73 15.95 0 7.98 6.05 15.23 17.18 15.23 15.73 0 29.28-7.49 29.28-30.46v-5.31Zm63.96 54.16h27.83V925.72h-27.83v117.73Zm-481.59-60.2c0 4.59-.48 8.46-.72 8.94h-86.16c.73 17.89 14.76 30.7 32.18 30.7s25.66-8.94 29.54-20.55l23.71 7.49c-6.29 20.55-24.92 37.24-53.25 37.24-31.94 0-60.25-23.22-60.25-63.1 0-37.23 27.59-61.88 57.35-61.88 36.31 0 57.6 23.93 57.6 61.16Zm-28.31-11.6c-.48-13.78-9.69-26.11-29.05-26.11-17.66 0-27.83 13.54-28.79 26.11h57.84Zm1218.94-95.98h-23.71l-16.94 18.61-16.94-18.61h-23.72l25.65 35.05h30.01l25.65-35.05Zm-561.51 50.05h27.12v106.6c0 31.43-16.23 60.68-60.51 60.68-31.22 0-53-19.34-56.14-43.03l25.89-6.77c1.94 14.5 13.31 25.38 29.52 25.38 22.27 0 33.4-11.36 33.4-35.3v-12.33c-5.08 9.19-16.94 17.17-34.12 17.17-31.46 0-54.45-24.18-54.45-57.3s22.02-57.29 54.45-57.29c18.39 0 29.76 7.49 34.84 17.16v-14.97Zm0 55.11c0-20.06-12.82-33.12-30.25-33.12s-30.73 13.05-30.73 33.12c0 20.07 12.34 33.36 30.73 33.36s30.25-13.05 30.25-33.36Zm523.28 40.63v-.02c-17.67 0-32.91-13.29-32.91-36.98 0-23.69 15.24-36.5 32.42-36.5s25.9 11.6 28.56 22l25.16-9.19c-4.84-18.85-22.26-38.68-53.96-38.68-33.88 0-60.27 26.11-60.27 62.38s26.39 62.62 61 62.62c30.97 0 48.64-20.07 54.2-38.44l-24.68-8.94c-2.66 8.94-11.13 21.76-29.52 21.76v-.01ZM1689.25 922.3v.03c-15.26 0-29.05 5.32-38.25 20.79-6.29-13.78-19.84-20.79-35.33-20.79-13.31 0-28.07 6.28-34.85 18.37v-14.99h-26.87v117.73h27.84v-69.87c0-14.99 9.44-26.11 24.44-26.11 15.97 0 22.75 10.64 22.75 24.17v71.8h27.59v-69.87c0-14.5 9.68-26.11 24.44-26.11 15.74 0 22.76 10.39 22.76 24.17v71.8h27.1v-76.4c0-31.18-20.33-44.72-41.62-44.72Zm1496.15.04v-.02c-12.34 0-25.65 4.35-33.64 14.75v-68.66h-28.07v175.03h28.07V974.3c.48-14.99 8.96-26.59 24.45-26.59 17.66 0 24.2 11.6 24.2 26.11v69.63h28.07v-74.46c0-25.87-14.04-46.65-43.08-46.65Zm-98.07 102.24c0 10.64 1.21 17.66 1.45 18.86h-26.13c-.24-.72-1.21-5.56-1.21-15-5.57 8.95-17.18 18.62-36.31 18.62-24.68 0-39.93-16.93-39.93-35.54 0-21.03 15.49-32.63 35.58-35.53l30.25-4.59c6.78-.97 8.72-4.35 8.72-8.46 0-9.91-6.78-17.89-22.28-17.89s-22.99 9.43-24.2 21.27l-25.65-5.8c2.18-20.31 20.57-38.43 49.61-38.43 36.31 0 50.1 20.55 50.1 43.99v58.5Zm-27.58-35.29-30.75 4.59c-8.71 1.45-15.73 6.29-15.73 15.95 0 7.98 6.05 15.23 17.18 15.23 15.74 0 29.3-7.49 29.3-30.46v-5.31Zm-1030.46-5.32h.01c0 35.54-21.06 62.39-55.43 62.39-16.7 0-29.52-7.25-36.3-18.62v15.72h-27.35V868.42h27.59v71.8c5.32-9.19 18.88-17.65 37.02-17.65 35.33 0 54.46 26.83 54.46 61.4Zm-28.31.25c0-23.45-13.07-36.74-31.7-36.74s-31.7 13.3-31.7 36.74 13.79 37.23 31.7 37.23 31.7-14.02 31.7-37.23Z"/></svg>
|
package/mtds/logo.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" aria-label="Mattilsynet" xmlns="http://www.w3.org/2000/svg" width="6.625em" height="1.15em" viewBox="0 0 4595 800" fill="currentColor"><path d="m2251.97 582.65 2.06-.41v71.12l-1.05.47c-6.93 2.95-22.82 7.91-51.18 7.91-65.17 0-105.6-39.93-105.6-104.23V379.09h-64.04v-67.78h19.52c32.8 0 51.63-18.97 51.63-51.99v-54.9h78.16v105.29h71.85v69.34h-71.85v164.97c0 28.98 12.68 41.35 42.37 41.35 11.69 0 25.16-2.19 28.13-2.78v.06Zm265.43-.03h-.01v-.03c-2.96.59-16.49 2.78-28.14 2.78-29.69 0-42.34-12.38-42.34-41.35V379.05h71.85v-69.34h-71.85V204.42h-78.15v54.9c0 33.01-18.84 51.99-51.64 51.99h-19.51v67.78h64.04v178.42c0 64.3 40.43 104.23 105.61 104.23 28.34 0 44.23-4.97 51.17-7.91l1.07-.47v-71.12l-2.1.41v-.03Zm-529.19 71.84.41 2.1h-80l-.41-1.22c-.76-2.12-3.24-14.55-3.62-38.65-12.89 18.26-44.23 50.48-104.8 50.48-34.76 0-64.77-11.04-86.89-31.99-20.57-19.52-31.93-45.67-31.93-73.61 0-56.61 39.56-96.07 105.79-105.61l88.7-13.45c21.55-3.03 24.05-14.56 24.05-23 0-31.66-25.38-50.56-63.6-50.56s-64.44 22.52-68.97 58.81l-78.64-17.72c6.96-54.23 55.44-111.71 146.94-111.71 134.15 0 148.64 91.16 148.64 130.35v170.99c0 33.35 4.03 53.92 4.2 54.79h.13Zm-88.69-155.98h-.05l-88.14 13.16c-16.66 2.77-44.64 12.25-44.64 44.9 0 20.61 15.23 42.79 48.65 42.79 38.38 0 84.15-15.14 84.15-87.29h.03v-13.57.01Zm696.18 159.14h85.76V309.21h-85.76v348.41ZM400.01 236.99c72.4 0 152 51.01 162.7 148.77 72.05-35.09 153.01-49.95 233.24-42.9C768.25 149.02 601.57 0 400.09 0 210.65 0 51.99 131.74 10.68 308.61a445.05 445.05 0 0 1 228.93 61.44c18.58-89.32 92.94-133.07 160.39-133.07l.01.01ZM1.99 361.84c-20.4 201.27 118.42 386.08 308.91 428v-2.24a444.14 444.14 0 0 1 53.07-211.24C297.36 443.08 151.25 355.8 1.99 361.84Zm1322.76 170.79-162.34-378.91-.47-1.03H1045v504.93h86.84V296.65l152.26 358.66h78.43l153.68-360.1v362.42h88.27V152.72h-119.04l-160.69 379.91ZM364.54 798.28C596.78 820.02 801.24 633.39 800 399.93c0-1.14 0-2.26-.02-3.38-234.54-27.38-443.96 165.76-435.44 401.73Zm3979.84-319.46c0 22-2.16 27.88-2.16 27.88h-253.34c2.89 49.34 42.55 86.28 92.83 86.28 37.12 0 63.43-14.59 78.49-43.24v.05h81.71a198.72 198.72 0 0 1-17.1 40.97c-24.42 41.01-70.86 76.39-143.14 76.39-48.02 0-92.49-17.41-125.07-49-35.25-34.14-53.91-81.6-53.91-137.16 0-51.5 18.47-98.56 52.07-132.51 31.45-31.87 74.64-50.15 118.41-50.15 105.62 0 171.21 69.02 171.21 180.51v-.02Zm-86.87-35.69c-2.86-53.72-46.72-72.85-83.61-72.85s-78.12 25.54-82.81 72.85h166.42Zm-440.7-143.46c-42.48 0-79.66 19.15-100.83 51.47v-41.59h-83.9v348.02h86.03V457.04c0-48.37 27.56-79.59 70.19-79.59 60.45 0 69.48 46.78 69.48 74.65v205.5h86.04V437.95c0-85.31-48.66-138.28-127.01-138.29v.01Zm-406.67 224.46-98.17-213.91-.48-1.03h-97.32l149.18 304.64-82.02 177.12v.04h92.17l220.45-481.79h-91.52l-92.29 214.93Zm1182.83 58.51v-.05c-3.03.59-16.52 2.78-28.14 2.78-29.74 0-42.43-12.38-42.43-41.35V379.05h71.91v-69.34h-71.91V204.42h-78.13v54.9c0 33.01-18.87 51.99-51.64 51.99h-19.52v67.78h64v178.42c0 64.3 40.51 104.23 105.64 104.23 29.42 0 45.63-5.51 51.19-7.91l1.06-.47v-71.12l-2.03.4ZM2643.01 135a55.32 55.32 0 0 0-55.49 55.48c0 30.59 24.01 54.76 55.49 54.76s56.14-24.04 56.14-54.76-25.2-55.48-56.14-55.48Zm135.82 522.63h85.77V141.81h-85.77v515.82Zm325.89-208.77h-.08l.08.02v-.02Zm-.17 0h.09l-52.61-10.58c-20.98-4.15-33.49-17.01-33.49-34.32 0-21.23 21.13-37.86 48.08-37.86 52.47 0 61.13 41.72 62.38 50.1l.29 1.94 73.16-20.75-.25-1.53c-1.82-10.68-8.62-38.16-33.24-61.72-24.8-23.75-59.27-35.81-102.34-35.81-71.24 0-129.2 50.54-129.2 112.67 0 50.89 35.36 89.08 94.6 102.02l51.32 11.32c25.65 5.22 39.19 17.82 39.19 36.44 0 18.62-15.54 37.86-50.26 37.86-46.91 0-66.35-30.76-68.79-57.07l-.18-2.1-75.37 20.75.13 1.47c2.6 23.77 16.07 49.02 36.04 67.62 26.61 24.71 64.24 37.86 108.8 37.86 87.16 0 132.74-56.32 132.74-112s-36.82-92.46-101.09-106.3v-.01Z"/></svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const pagination: ({ current, total, show, }: {
|
|
2
|
+
current?: number | undefined;
|
|
3
|
+
total?: number | undefined;
|
|
4
|
+
show?: number | undefined;
|
|
5
|
+
}) => {
|
|
6
|
+
prev: number;
|
|
7
|
+
next: number;
|
|
8
|
+
pages: {
|
|
9
|
+
current: false | "page";
|
|
10
|
+
key: string;
|
|
11
|
+
page: number;
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const o = (t, e, a) => {
|
|
2
|
+
const i = (a - 1) / 2, n = Math.max(Math.min(t - Math.floor(i), e - a + 1), 1), p = Math.min(Math.max(t + Math.ceil(i), a), e), s = Array.from({ length: p + 1 - n }, (M, f) => f + n);
|
|
3
|
+
return a > 4 && n > 1 && s.splice(0, 2, 1, 0), a > 3 && p < e && s.splice(-2, 2, 0, e), s;
|
|
4
|
+
}, c = ({
|
|
5
|
+
current: t = 1,
|
|
6
|
+
total: e = 10,
|
|
7
|
+
show: a = 7
|
|
8
|
+
}) => ({
|
|
9
|
+
prev: t > 1 ? t - 1 : 0,
|
|
10
|
+
next: t < e ? t + 1 : 0,
|
|
11
|
+
pages: o(t, e, a).map((i, n) => ({
|
|
12
|
+
current: i === t && "page",
|
|
13
|
+
key: `key-${i}-${n}`,
|
|
14
|
+
page: i
|
|
15
|
+
}))
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
c as pagination
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.js","sources":["../../designsystem/pagination/pagination.ts"],"sourcesContent":["const getSteps = (now: number, max: number, show: number) => {\n const offset = (show - 1) / 2;\n const start = Math.max(Math.min(now - Math.floor(offset), max - show + 1), 1);\n const end = Math.min(Math.max(now + Math.ceil(offset), show), max);\n const pages = Array.from({ length: end + 1 - start }, (_, i) => i + start);\n\n if (show > 4 && start > 1) pages.splice(0, 2, 1, 0);\n if (show > 3 && end < max) pages.splice(-2, 2, 0, max);\n return pages;\n};\n\nexport const pagination = ({\n current = 1,\n total = 10,\n show = 7,\n}) => ({\n prev: current > 1 ? current - 1 : 0,\n next: current < total ? current + 1 : 0,\n pages: getSteps(current, total, show).map((page, index) => ({\n current: page === current && 'page' as const,\n key: `key-${page}-${index}`,\n page,\n })),\n});\n"],"names":["getSteps","now","max","show","offset","start","end","pages","_","i","pagination","current","total","page","index"],"mappings":"AAAA,MAAMA,IAAW,CAACC,GAAaC,GAAaC,MAAiB;AACrD,QAAAC,KAAUD,IAAO,KAAK,GACtBE,IAAQ,KAAK,IAAI,KAAK,IAAIJ,IAAM,KAAK,MAAMG,CAAM,GAAGF,IAAMC,IAAO,CAAC,GAAG,CAAC,GACtEG,IAAM,KAAK,IAAI,KAAK,IAAIL,IAAM,KAAK,KAAKG,CAAM,GAAGD,CAAI,GAAGD,CAAG,GAC3DK,IAAQ,MAAM,KAAK,EAAE,QAAQD,IAAM,IAAID,EAAS,GAAA,CAACG,GAAGC,MAAMA,IAAIJ,CAAK;AAErE,SAAAF,IAAO,KAAKE,IAAQ,OAAS,OAAO,GAAG,GAAG,GAAG,CAAC,GAC9CF,IAAO,KAAKG,IAAMJ,OAAW,OAAO,IAAI,GAAG,GAAGA,CAAG,GAC9CK;AACT,GAEaG,IAAa,CAAC;AAAA,EACzB,SAAAC,IAAU;AAAA,EACV,OAAAC,IAAQ;AAAA,EACR,MAAAT,IAAO;AACT,OAAO;AAAA,EACL,MAAMQ,IAAU,IAAIA,IAAU,IAAI;AAAA,EAClC,MAAMA,IAAUC,IAAQD,IAAU,IAAI;AAAA,EACtC,OAAOX,EAASW,GAASC,GAAOT,CAAI,EAAE,IAAI,CAACU,GAAMC,OAAW;AAAA,IAC1D,SAASD,MAASF,KAAW;AAAA,IAC7B,KAAK,OAAOE,CAAI,IAAIC,CAAK;AAAA,IACzB,MAAAD;AAAA,EAAA,EACA;AACJ;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const WithLinks: Story;
|
|
8
|
+
export declare const WithButtons: Story;
|
|
9
|
+
export declare const Sizes: Story;
|
|
10
|
+
export declare const WithHelper: Story;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import E from "../styles.module.css.js";
|
|
2
|
+
import { IS_BROWSER as H, on as p, QUICK_EVENT as c, off as f } from "../utils.js";
|
|
3
|
+
function W(t) {
|
|
4
|
+
p(t, "click", M), p(t, "toggle", y, c);
|
|
5
|
+
}
|
|
6
|
+
function $(t) {
|
|
7
|
+
f(t, "click", M), f(t, "toggle", y, c);
|
|
8
|
+
}
|
|
9
|
+
const w = E.popover.split(" ")[0], n = H ? document.createElement("div") : null;
|
|
10
|
+
n && (n.style.cssText = "position:absolute;padding:1px");
|
|
11
|
+
function y({ target: t, newState: o }) {
|
|
12
|
+
var i;
|
|
13
|
+
const s = o === "open" && t instanceof HTMLElement && t.classList.contains(w) && ((i = t.getRootNode()) == null ? void 0 : i.querySelector(`[popovertarget="${t.id}"]`));
|
|
14
|
+
if (s) {
|
|
15
|
+
const r = t.getAttribute("data-position") === "over", a = () => k(s, t, r), g = ({ newState: l }) => {
|
|
16
|
+
l !== "open" && (f(document, "DOMContentReady", a, c), f(t, "toggle", g, c), f(window, "load,resize,scroll", a, c), n == null || n.remove());
|
|
17
|
+
};
|
|
18
|
+
document.body.append(n || ""), document.fonts.ready.then(a), p(window, "load,resize,scroll", a, c), p(document, "DOMContentReady", a, c), p(t, "toggle", g, c);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function M(t) {
|
|
22
|
+
var d;
|
|
23
|
+
const o = t.target instanceof Element && t.target.closest("a");
|
|
24
|
+
if (o) {
|
|
25
|
+
const s = o.getRootNode(), i = ((d = s.getElementById) == null ? void 0 : d.call(s, o.getAttribute("popovertarget") || "")) || o.closest(`.${w}`), r = o.getAttribute("popovertargetaction") || "toggle";
|
|
26
|
+
t.defaultPrevented || i == null || i.togglePopover(r === "show" || (r === "hide" ? !1 : void 0));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function k(t, o, d = !1) {
|
|
30
|
+
const { innerWidth: s, innerHeight: i, scrollY: r, scrollX: a } = window, { offsetWidth: g, offsetHeight: l } = o;
|
|
31
|
+
let h = -a, u = -r, e = t;
|
|
32
|
+
do
|
|
33
|
+
h += (e == null ? void 0 : e.offsetLeft) || 0, u += (e == null ? void 0 : e.offsetTop) || 0, e = (e == null ? void 0 : e.offsetParent) || null;
|
|
34
|
+
while (e);
|
|
35
|
+
const m = u + ((t == null ? void 0 : t.offsetHeight) || 0), P = m + l < i, b = u - l > 0, v = !d && P || !b, x = v ? r + m + l + 30 : 0;
|
|
36
|
+
o.style.left = `${Math.round(Math.min(Math.max(10, h), s - g - 10))}px`, o.style.top = `${Math.round(v ? m : u - l)}px`, n == null || n.style.setProperty("top", `${Math.round(x)}px`);
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
W as observe,
|
|
40
|
+
$ as unobserve
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.js","sources":["../../designsystem/popover/popover.ts"],"sourcesContent":["import styles from '../styles.module.css';\nimport { IS_BROWSER, QUICK_EVENT, off, on } from '../utils';\n\nexport function observe(el: Node) {\n on(el, 'click', handleLinkClick); // Allow `<a>` to use `popovertarget` as well\n on(el, 'toggle', handleToggle, QUICK_EVENT); // Use capture since toggle does not bubble\n}\nexport function unobserve(el: Node) {\n off(el, 'click', handleLinkClick);\n off(el, 'toggle', handleToggle, QUICK_EVENT); // Use capture since toggle does not bubble\n}\n\ntype Toggle = Event & { newState?: string };\nconst CSS_POPOVER = styles.popover.split(' ')[0];\nconst SCROLLER = IS_BROWSER ? document.createElement('div') : null // Used to ensure we have scrollability under\nif (SCROLLER) SCROLLER.style.cssText = 'position:absolute;padding:1px';\n\nfunction handleToggle ({ target: el, newState }: Toggle){\n const isPopping = newState === 'open' && el instanceof HTMLElement && el.classList.contains(CSS_POPOVER);\n const anchor = isPopping && (el.getRootNode() as ShadowRoot)?.querySelector<HTMLElement>(`[popovertarget=\"${el.id}\"]`);\n\n if (anchor) {\n const isOver = el.getAttribute('data-position') === 'over';\n const update = () => place(anchor, el, isOver);\n const removeEvent = ({ newState }: Toggle) => {\n if (newState === 'open') return;\n off(document, 'DOMContentReady', update, QUICK_EVENT);\n off(el, 'toggle', removeEvent, QUICK_EVENT);\n off(window, 'load,resize,scroll', update, QUICK_EVENT);\n SCROLLER?.remove();\n }\n\n document.body.append(SCROLLER || '');\n document.fonts.ready.then(update); // Inital render and when fonts load\n on(window, 'load,resize,scroll', update, QUICK_EVENT);\n on(document, 'DOMContentReady', update, QUICK_EVENT);\n on(el, 'toggle', removeEvent, QUICK_EVENT);\n }\n}\n\n// Polyfill popovertarget for <a> (not supported by native)\n// and automatically assume popovertarget is the closest parent popover\n// but respect the popovertarget and popovertargetaction attribute\nfunction handleLinkClick (event: Event){\n const link = event.target instanceof Element && event.target.closest('a');\n if (link) {\n const root = link.getRootNode() as ShadowRoot;\n const target = root.getElementById?.(link.getAttribute('popovertarget') || '') || link.closest(`.${CSS_POPOVER}`);\n const action = link.getAttribute('popovertargetaction') || 'toggle';\n\n if (!event.defaultPrevented) target?.togglePopover(action === 'show' || (action === 'hide' ? false : undefined));\n }\n}\n\nfunction place (anchor: HTMLElement | null, poppe: HTMLElement, isOver = false) {\n const { innerWidth: winW, innerHeight: winH, scrollY: winY, scrollX: winX } = window;\n const { offsetWidth: popperW, offsetHeight: popperH } = poppe;\n let anchorX = -winX;\n let anchorY = -winY;\n let el = anchor;\n\n do {\n anchorX += el?.offsetLeft || 0;\n anchorY += el?.offsetTop || 0;\n el = (el?.offsetParent || null) as HTMLElement | null;\n } while (el);\n\n const anchorBottom = anchorY + (anchor?.offsetHeight || 0);\n const hasSpaceUnder = anchorBottom + popperH < winH;\n const hasSpaceOver = anchorY - popperH > 0\n const placeUnder = (!isOver && hasSpaceUnder) || !hasSpaceOver // Always place under when no hasSpaceOver, as no OS can scroll further up than 0\n const scroll = placeUnder ? winY + anchorBottom + popperH + 30 : 0\n\n poppe.style.left = `${Math.round(Math.min(Math.max(10, anchorX), winW - popperW - 10))}px`\n poppe.style.top = `${Math.round(placeUnder ? anchorBottom : anchorY - popperH)}px`\n SCROLLER?.style.setProperty('top', `${Math.round(scroll)}px`);\n}\n"],"names":["observe","el","on","handleLinkClick","handleToggle","QUICK_EVENT","unobserve","off","CSS_POPOVER","styles","SCROLLER","IS_BROWSER","newState","anchor","_a","isOver","update","place","removeEvent","event","link","root","target","action","poppe","winW","winH","winY","winX","popperW","popperH","anchorX","anchorY","anchorBottom","hasSpaceUnder","hasSpaceOver","placeUnder","scroll"],"mappings":";;AAGO,SAASA,EAAQC,GAAU;AAC7B,EAAAC,EAAAD,GAAI,SAASE,CAAe,GAC5BD,EAAAD,GAAI,UAAUG,GAAcC,CAAW;AAC5C;AACO,SAASC,EAAUL,GAAU;AAC9B,EAAAM,EAAAN,GAAI,SAASE,CAAe,GAC5BI,EAAAN,GAAI,UAAUG,GAAcC,CAAW;AAC7C;AAGA,MAAMG,IAAcC,EAAO,QAAQ,MAAM,GAAG,EAAE,CAAC,GACzCC,IAAWC,IAAa,SAAS,cAAc,KAAK,IAAI;AAC1DD,MAAmBA,EAAA,MAAM,UAAU;AAEvC,SAASN,EAAc,EAAE,QAAQH,GAAI,UAAAW,KAAmB;;AAEhD,QAAAC,IADYD,MAAa,UAAUX,aAAc,eAAeA,EAAG,UAAU,SAASO,CAAW,OAC1EM,IAAAb,EAAG,kBAAH,gBAAAa,EAAiC,cAA2B,mBAAmBb,EAAG,EAAE;AAEjH,MAAIY,GAAQ;AACV,UAAME,IAASd,EAAG,aAAa,eAAe,MAAM,QAC9Ce,IAAS,MAAMC,EAAMJ,GAAQZ,GAAIc,CAAM,G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iBAAgB;AAAA,SACnBA;AAEH,QAAAgC,IAAeD,MAAWnB,KAAA,gBAAAA,EAAQ,iBAAgB,IAClDqB,IAAgBD,IAAeH,IAAUJ,GACzCS,IAAeH,IAAUF,IAAU,GACnCM,IAAc,CAACrB,KAAUmB,KAAkB,CAACC,GAC5CE,IAASD,IAAaT,IAAOM,IAAeH,IAAU,KAAK;AAEjE,EAAAN,EAAM,MAAM,OAAO,GAAG,KAAK,MAAM,KAAK,IAAI,KAAK,IAAI,IAAIO,CAAO,GAAGN,IAAOI,IAAU,EAAE,CAAC,CAAC,MAChFL,EAAA,MAAM,MAAM,GAAG,KAAK,MAAMY,IAAaH,IAAeD,IAAUF,CAAO,CAAC,MACpEpB,KAAA,QAAAA,EAAA,MAAM,YAAY,OAAO,GAAG,KAAK,MAAM2B,CAAM,CAAC;AAC1D;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const Dropdown: Story;
|
|
9
|
+
export declare const Position: Story;
|
|
10
|
+
export declare const WithClose: Story;
|
|
11
|
+
export declare const WithArrow: Story;
|
|
12
|
+
export declare const WithDivider: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const Circle: Story;
|
|
9
|
+
export declare const Text: Story;
|