@supersoniks/concorde 3.0.2 → 3.0.4
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/concorde-core.bundle.js +3480 -0
- package/concorde-core.es.js +11396 -0
- package/dist/concorde-core.bundle.js +3480 -0
- package/dist/concorde-core.es.js +11396 -0
- package/dist/css/docs.css +0 -0
- package/dist/img/concorde-logo.svg +1 -0
- package/dist/img/concorde.png +0 -0
- package/dist/img/concorde_def.png +0 -0
- package/dist/svg/regular/plane.svg +1 -0
- package/dist/svg/solid/plane.svg +1 -0
- package/docs/assets/index--bDsd7qW.css +1 -0
- package/docs/assets/index-3W2s1DcY.js +4040 -0
- package/docs/assets/index-B-7rKIow.js +4040 -0
- package/docs/assets/index-BJY63wEA.js +4040 -0
- package/docs/assets/index-BXaJoTcR.js +4040 -0
- package/docs/assets/index-NCT3BKv0.js +4040 -0
- package/docs/assets/index-PbOx6NxY.js +4040 -0
- package/docs/assets/index-cNBBlbBt.js +4040 -0
- package/docs/assets/index-gx6CCJoi.js +4040 -0
- package/docs/assets/index-l8XRMBvs.js +4040 -0
- package/docs/css/docs.css +0 -0
- package/docs/img/concorde-logo.svg +1 -0
- package/docs/img/concorde.png +0 -0
- package/docs/img/concorde_def.png +0 -0
- package/docs/index.html +132 -0
- package/docs/src/core/components/functional/date/date.md +290 -0
- package/docs/src/core/components/functional/fetch/fetch.md +117 -0
- package/docs/src/core/components/functional/if/if.md +16 -0
- package/docs/src/core/components/functional/list/list.md +194 -0
- package/docs/src/core/components/functional/mix/mix.md +41 -0
- package/docs/src/core/components/functional/queue/queue.md +87 -0
- package/docs/src/core/components/functional/router/router.md +112 -0
- package/docs/src/core/components/functional/sdui/default-library.json +108 -0
- package/docs/src/core/components/functional/sdui/example.json +99 -0
- package/docs/src/core/components/functional/sdui/sdui.md +356 -0
- package/docs/src/core/components/functional/states/states.md +87 -0
- package/docs/src/core/components/functional/submit/submit.md +48 -0
- package/docs/src/core/components/functional/subscriber/subscriber.md +91 -0
- package/docs/src/core/components/functional/value/value.md +35 -0
- package/docs/src/core/components/ui/alert/alert.md +121 -0
- package/docs/src/core/components/ui/badge/badge.md +102 -0
- package/docs/src/core/components/ui/button/button.md +184 -0
- package/docs/src/core/components/ui/captcha/captcha.md +12 -0
- package/docs/src/core/components/ui/card/card.md +96 -0
- package/docs/src/core/components/ui/divider/divider.md +35 -0
- package/docs/src/core/components/ui/form/checkbox/checkbox.md +96 -0
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +129 -0
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +77 -0
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +43 -0
- package/docs/src/core/components/ui/form/input/input.md +168 -0
- package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +130 -0
- package/docs/src/core/components/ui/form/radio/radio.md +86 -0
- package/docs/src/core/components/ui/form/select/select.md +99 -0
- package/docs/src/core/components/ui/form/textarea/textarea.md +66 -0
- package/docs/src/core/components/ui/group/group.md +75 -0
- package/docs/src/core/components/ui/icon/icon.md +125 -0
- package/docs/src/core/components/ui/icon/icons.json +1 -0
- package/docs/src/core/components/ui/image/image.md +107 -0
- package/docs/src/core/components/ui/link/link.md +43 -0
- package/docs/src/core/components/ui/loader/loader.md +37 -0
- package/docs/src/core/components/ui/menu/menu.md +288 -0
- package/docs/src/core/components/ui/modal/modal.md +123 -0
- package/docs/src/core/components/ui/pop/pop.md +79 -0
- package/docs/src/core/components/ui/progress/progress.md +65 -0
- package/docs/src/core/components/ui/table/table.md +467 -0
- package/docs/src/core/components/ui/tooltip/tooltip.md +37 -0
- package/docs/src/docs/_core-concept/overview.md +57 -0
- package/docs/src/docs/_core-concept/subscriber.md +76 -0
- package/docs/src/docs/_getting-started/concorde-outside.md +141 -0
- package/docs/src/docs/_getting-started/create-a-component.md +137 -0
- package/docs/src/docs/_getting-started/pubsub.md +150 -0
- package/docs/src/docs/_getting-started/start.md +37 -0
- package/docs/src/docs/_getting-started/theming.md +91 -0
- package/docs/src/docs/search/docs-search.json +3737 -0
- package/docs/src/tag-list.json +1 -0
- package/docs/src/tsconfig.json +113 -0
- package/docs/svg/regular/plane.svg +1 -0
- package/docs/svg/solid/plane.svg +1 -0
- package/package.json +1 -1
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="222.442" height="47.558" viewBox="0 0 222.442 47.558"><g transform="translate(-51.885 -25)"><path d="M11.045.384A9.984,9.984,0,0,1,5.862-.9,8.546,8.546,0,0,1,2.538-4.474,11.519,11.519,0,0,1,1.381-9.741a11.462,11.462,0,0,1,1.17-5.3,8.651,8.651,0,0,1,3.33-3.567,9.872,9.872,0,0,1,5.139-1.285,10.228,10.228,0,0,1,4.5.933,7.522,7.522,0,0,1,3.055,2.621,7.7,7.7,0,0,1,1.24,3.963H14.676a4.017,4.017,0,0,0-1.144-2.371,3.328,3.328,0,0,0-2.423-.9,3.647,3.647,0,0,0-2.205.684A4.416,4.416,0,0,0,7.44-12.976a8.472,8.472,0,0,0-.524,3.158,8.75,8.75,0,0,0,.518,3.2A4.393,4.393,0,0,0,8.9-4.615a3.651,3.651,0,0,0,2.212.69,3.63,3.63,0,0,0,1.681-.384,3.279,3.279,0,0,0,1.24-1.119A4.261,4.261,0,0,0,14.676-7.2h5.139a8.049,8.049,0,0,1-1.221,3.957A7.443,7.443,0,0,1,15.584-.575,10.038,10.038,0,0,1,11.045.384Zm19.7,0A9.985,9.985,0,0,1,25.6-.888a8.6,8.6,0,0,1-3.343-3.554,11.411,11.411,0,0,1-1.176-5.3,11.469,11.469,0,0,1,1.176-5.325A8.6,8.6,0,0,1,25.6-18.62a9.985,9.985,0,0,1,5.146-1.272A9.985,9.985,0,0,1,35.9-18.62a8.6,8.6,0,0,1,3.343,3.554,11.469,11.469,0,0,1,1.176,5.325,11.411,11.411,0,0,1-1.176,5.3A8.6,8.6,0,0,1,35.9-.888,9.985,9.985,0,0,1,30.75.384Zm.026-4.219a3.367,3.367,0,0,0,2.263-.773,4.757,4.757,0,0,0,1.374-2.116A9.279,9.279,0,0,0,34.88-9.78a9.279,9.279,0,0,0-.467-3.055,4.8,4.8,0,0,0-1.374-2.122,3.35,3.35,0,0,0-2.263-.78,3.443,3.443,0,0,0-2.295.78,4.726,4.726,0,0,0-1.393,2.122,9.279,9.279,0,0,0-.467,3.055,9.279,9.279,0,0,0,.467,3.055,4.681,4.681,0,0,0,1.393,2.116A3.461,3.461,0,0,0,30.776-3.835Zm17.2-7.517V0H42.529V-19.636h5.19v3.464h.23a5.512,5.512,0,0,1,2.186-2.717,6.647,6.647,0,0,1,3.72-1A6.906,6.906,0,0,1,57.423-19a6.091,6.091,0,0,1,2.365,2.55,8.589,8.589,0,0,1,.844,3.944V0H55.185V-11.531a3.968,3.968,0,0,0-.92-2.819,3.315,3.315,0,0,0-2.57-1.016,3.87,3.87,0,0,0-1.937.473,3.253,3.253,0,0,0-1.3,1.374A4.769,4.769,0,0,0,47.975-11.352ZM72.346.384A9.985,9.985,0,0,1,67.162-.9a8.546,8.546,0,0,1-3.324-3.573,11.519,11.519,0,0,1-1.157-5.267,11.462,11.462,0,0,1,1.17-5.3,8.651,8.651,0,0,1,3.33-3.567,9.872,9.872,0,0,1,5.139-1.285,10.228,10.228,0,0,1,4.5.933,7.522,7.522,0,0,1,3.055,2.621,7.7,7.7,0,0,1,1.24,3.963H75.977a4.017,4.017,0,0,0-1.144-2.371,3.328,3.328,0,0,0-2.423-.9,3.647,3.647,0,0,0-2.205.684,4.416,4.416,0,0,0-1.464,1.988,8.472,8.472,0,0,0-.524,3.158,8.75,8.75,0,0,0,.518,3.2A4.393,4.393,0,0,0,70.2-4.615a3.651,3.651,0,0,0,2.212.69,3.63,3.63,0,0,0,1.681-.384,3.279,3.279,0,0,0,1.24-1.119A4.261,4.261,0,0,0,75.977-7.2h5.139A8.049,8.049,0,0,1,79.9-3.241,7.443,7.443,0,0,1,76.885-.575,10.038,10.038,0,0,1,72.346.384Zm19.7,0A9.985,9.985,0,0,1,86.905-.888a8.6,8.6,0,0,1-3.343-3.554,11.411,11.411,0,0,1-1.176-5.3,11.469,11.469,0,0,1,1.176-5.325,8.6,8.6,0,0,1,3.343-3.554,9.985,9.985,0,0,1,5.146-1.272A9.985,9.985,0,0,1,97.2-18.62a8.6,8.6,0,0,1,3.343,3.554,11.469,11.469,0,0,1,1.176,5.325,11.411,11.411,0,0,1-1.176,5.3A8.6,8.6,0,0,1,97.2-.888,9.985,9.985,0,0,1,92.051.384Zm.026-4.219a3.367,3.367,0,0,0,2.263-.773,4.757,4.757,0,0,0,1.374-2.116A9.279,9.279,0,0,0,96.18-9.78a9.279,9.279,0,0,0-.467-3.055,4.8,4.8,0,0,0-1.374-2.122,3.35,3.35,0,0,0-2.263-.78,3.443,3.443,0,0,0-2.295.78,4.726,4.726,0,0,0-1.393,2.122,9.278,9.278,0,0,0-.467,3.055,9.278,9.278,0,0,0,.467,3.055,4.681,4.681,0,0,0,1.393,2.116A3.461,3.461,0,0,0,92.077-3.835ZM103.83,0V-19.636h5.28v3.426h.2a5.1,5.1,0,0,1,1.8-2.768,4.76,4.76,0,0,1,2.915-.94,8.238,8.238,0,0,1,.882.051,6.212,6.212,0,0,1,.831.141v4.832a7.115,7.115,0,0,0-1.061-.2,9.532,9.532,0,0,0-1.24-.089,4.363,4.363,0,0,0-2.141.518,3.847,3.847,0,0,0-1.483,1.438,4.1,4.1,0,0,0-.543,2.122V0Zm19.59.32a7.351,7.351,0,0,1-4.046-1.157,7.876,7.876,0,0,1-2.864-3.413,13.041,13.041,0,0,1-1.055-5.542,12.858,12.858,0,0,1,1.087-5.619,7.829,7.829,0,0,1,2.9-3.362,7.4,7.4,0,0,1,3.969-1.119,6.1,6.1,0,0,1,2.755.556,5.484,5.484,0,0,1,1.79,1.381,7.22,7.22,0,0,1,1.042,1.617h.166v-9.844h5.433V0h-5.369V-3.145h-.23a7,7,0,0,1-1.08,1.617,5.443,5.443,0,0,1-1.8,1.323A6.249,6.249,0,0,1,123.42.32Zm1.726-4.334a3.487,3.487,0,0,0,2.231-.722,4.56,4.56,0,0,0,1.406-2.026,8.637,8.637,0,0,0,.492-3.055,8.632,8.632,0,0,0-.486-3.043,4.367,4.367,0,0,0-1.406-1.994,3.577,3.577,0,0,0-2.237-.7,3.532,3.532,0,0,0-2.263.729,4.456,4.456,0,0,0-1.393,2.02,8.677,8.677,0,0,0-.473,2.991,8.776,8.776,0,0,0,.479,3.023,4.56,4.56,0,0,0,1.393,2.045A3.485,3.485,0,0,0,125.146-4.014Zm21.418,4.4a10.412,10.412,0,0,1-5.21-1.234A8.345,8.345,0,0,1,138-4.353a11.538,11.538,0,0,1-1.176-5.376A11.479,11.479,0,0,1,138-15.047a8.681,8.681,0,0,1,3.317-3.567,9.628,9.628,0,0,1,5.031-1.278,10.393,10.393,0,0,1,3.624.62,8.169,8.169,0,0,1,2.94,1.86,8.473,8.473,0,0,1,1.962,3.113,12.434,12.434,0,0,1,.7,4.379v1.5H139V-11.8H150.45a4.172,4.172,0,0,0-.511-2.084,3.721,3.721,0,0,0-1.413-1.425,4.122,4.122,0,0,0-2.09-.518,4.193,4.193,0,0,0-2.192.569,4.08,4.08,0,0,0-1.489,1.521,4.333,4.333,0,0,0-.55,2.116v3.209a5.462,5.462,0,0,0,.543,2.518,3.889,3.889,0,0,0,1.54,1.636,4.653,4.653,0,0,0,2.365.575,5.15,5.15,0,0,0,1.662-.256,3.449,3.449,0,0,0,1.291-.767,3.335,3.335,0,0,0,.818-1.253l5.037.332A6.866,6.866,0,0,1,153.9-2.461a7.868,7.868,0,0,1-3.043,2.1A11.435,11.435,0,0,1,146.563.384Zm14.31-.051a2.954,2.954,0,0,1-2.167-.9,2.954,2.954,0,0,1-.9-2.167,2.919,2.919,0,0,1,.9-2.148,2.965,2.965,0,0,1,2.167-.895,2.985,2.985,0,0,1,2.148.895,2.889,2.889,0,0,1,.92,2.148,2.884,2.884,0,0,1-.428,1.54,3.286,3.286,0,0,1-1.119,1.112A2.9,2.9,0,0,1,160.873.332Z" transform="translate(110.385 62)" fill="#2a282d"/><g transform="translate(51.885 25)"><g transform="translate(2.6 2.209)"><path d="M52.661,65.423h-1.4l-.091-.468h-.208l-.078.351-.078.065H49.646l-.065-.169-.091-.338h-.221v.208l-.118.065-3.859-.326L44.5,64.4v-.871a7.436,7.436,0,0,1,.156-1.079c.182-.883.546-1.962,2.833-5.224s3.08-4.481,4.665-10.3l.078-.324c.468-1.975.806-3.132.936-3.547V34.524a25.625,25.625,0,0,1,.312-2.82h0c.143-.923.312-1.754.468-2.4a21.623,21.623,0,0,0,.195,43.218,41.171,41.171,0,0,1-.845-6.8.668.668,0,0,0-.637-.3Z" transform="translate(-33.181 -29.3)" fill="#2a282d"/><path d="M34.658,65.423h1.4l.091-.468h.209l.078.351.078.065h1.157l.065-.169.091-.338h.221v.208l.118.065,3.857-.326.793-.416v-.871a7.436,7.436,0,0,0-.156-1.079c-.182-.883-.546-1.962-2.833-5.224s-3.08-4.481-4.665-10.3l-.078-.324c-.468-1.975-.806-3.132-.936-3.547V34.524a25.63,25.63,0,0,0-.312-2.82h0c-.143-.923-.312-1.754-.468-2.4a21.623,21.623,0,0,1-.195,43.218,41.171,41.171,0,0,0,.845-6.8.668.668,0,0,1,.637-.3Z" transform="translate(-11.738 -29.3)" fill="#2a282d"/></g><path d="M23.779,1.169a22.61,22.61,0,1,0,22.61,22.61,22.61,22.61,0,0,0-22.61-22.61m0-1.169A23.779,23.779,0,1,1,0,23.779,23.779,23.779,0,0,1,23.779,0Z" transform="translate(0 0)" fill="#2a282d"/></g></g></svg>
|
|
Binary file
|
|
Binary file
|
package/docs/index.html
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="fr">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="src/favicon.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Concorde - A supersonic design system</title>
|
|
8
|
+
<link rel="stylesheet" href="https://use.typekit.net/eda3clw.css" />
|
|
9
|
+
<script src="https://cdn.jsdelivr.net/npm/fuzzysort@2.0.1/fuzzysort.min.js"></script>
|
|
10
|
+
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
11
|
+
<link href="https://fonts.cdnfonts.com/css/inter" rel="stylesheet" />
|
|
12
|
+
|
|
13
|
+
<script type="module" crossorigin src="./assets/index-cNBBlbBt.js"></script>
|
|
14
|
+
<link rel="stylesheet" crossorigin href="./assets/index--bDsd7qW.css">
|
|
15
|
+
</head>
|
|
16
|
+
<body class="px-6 lg:px-20">
|
|
17
|
+
<sonic-theme font background color>
|
|
18
|
+
<sonic-scope markdownsURL="src">
|
|
19
|
+
<div
|
|
20
|
+
class="flex items-center gap-4 border-b-[.3rem] border-current py-3 sticky top-0 z-40 text-neutral-900 bg-neutral-0"
|
|
21
|
+
>
|
|
22
|
+
<div class="font-bold text-4xl">
|
|
23
|
+
<sonic-link href="/">
|
|
24
|
+
<svg
|
|
25
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
26
|
+
width="222.442"
|
|
27
|
+
height="47.558"
|
|
28
|
+
viewBox="0 0 222.442 47.558"
|
|
29
|
+
>
|
|
30
|
+
<g transform="translate(-51.885 -25)">
|
|
31
|
+
<path
|
|
32
|
+
d="M11.045.384A9.984,9.984,0,0,1,5.862-.9,8.546,8.546,0,0,1,2.538-4.474,11.519,11.519,0,0,1,1.381-9.741a11.462,11.462,0,0,1,1.17-5.3,8.651,8.651,0,0,1,3.33-3.567,9.872,9.872,0,0,1,5.139-1.285,10.228,10.228,0,0,1,4.5.933,7.522,7.522,0,0,1,3.055,2.621,7.7,7.7,0,0,1,1.24,3.963H14.676a4.017,4.017,0,0,0-1.144-2.371,3.328,3.328,0,0,0-2.423-.9,3.647,3.647,0,0,0-2.205.684A4.416,4.416,0,0,0,7.44-12.976a8.472,8.472,0,0,0-.524,3.158,8.75,8.75,0,0,0,.518,3.2A4.393,4.393,0,0,0,8.9-4.615a3.651,3.651,0,0,0,2.212.69,3.63,3.63,0,0,0,1.681-.384,3.279,3.279,0,0,0,1.24-1.119A4.261,4.261,0,0,0,14.676-7.2h5.139a8.049,8.049,0,0,1-1.221,3.957A7.443,7.443,0,0,1,15.584-.575,10.038,10.038,0,0,1,11.045.384Zm19.7,0A9.985,9.985,0,0,1,25.6-.888a8.6,8.6,0,0,1-3.343-3.554,11.411,11.411,0,0,1-1.176-5.3,11.469,11.469,0,0,1,1.176-5.325A8.6,8.6,0,0,1,25.6-18.62a9.985,9.985,0,0,1,5.146-1.272A9.985,9.985,0,0,1,35.9-18.62a8.6,8.6,0,0,1,3.343,3.554,11.469,11.469,0,0,1,1.176,5.325,11.411,11.411,0,0,1-1.176,5.3A8.6,8.6,0,0,1,35.9-.888,9.985,9.985,0,0,1,30.75.384Zm.026-4.219a3.367,3.367,0,0,0,2.263-.773,4.757,4.757,0,0,0,1.374-2.116A9.279,9.279,0,0,0,34.88-9.78a9.279,9.279,0,0,0-.467-3.055,4.8,4.8,0,0,0-1.374-2.122,3.35,3.35,0,0,0-2.263-.78,3.443,3.443,0,0,0-2.295.78,4.726,4.726,0,0,0-1.393,2.122,9.279,9.279,0,0,0-.467,3.055,9.279,9.279,0,0,0,.467,3.055,4.681,4.681,0,0,0,1.393,2.116A3.461,3.461,0,0,0,30.776-3.835Zm17.2-7.517V0H42.529V-19.636h5.19v3.464h.23a5.512,5.512,0,0,1,2.186-2.717,6.647,6.647,0,0,1,3.72-1A6.906,6.906,0,0,1,57.423-19a6.091,6.091,0,0,1,2.365,2.55,8.589,8.589,0,0,1,.844,3.944V0H55.185V-11.531a3.968,3.968,0,0,0-.92-2.819,3.315,3.315,0,0,0-2.57-1.016,3.87,3.87,0,0,0-1.937.473,3.253,3.253,0,0,0-1.3,1.374A4.769,4.769,0,0,0,47.975-11.352ZM72.346.384A9.985,9.985,0,0,1,67.162-.9a8.546,8.546,0,0,1-3.324-3.573,11.519,11.519,0,0,1-1.157-5.267,11.462,11.462,0,0,1,1.17-5.3,8.651,8.651,0,0,1,3.33-3.567,9.872,9.872,0,0,1,5.139-1.285,10.228,10.228,0,0,1,4.5.933,7.522,7.522,0,0,1,3.055,2.621,7.7,7.7,0,0,1,1.24,3.963H75.977a4.017,4.017,0,0,0-1.144-2.371,3.328,3.328,0,0,0-2.423-.9,3.647,3.647,0,0,0-2.205.684,4.416,4.416,0,0,0-1.464,1.988,8.472,8.472,0,0,0-.524,3.158,8.75,8.75,0,0,0,.518,3.2A4.393,4.393,0,0,0,70.2-4.615a3.651,3.651,0,0,0,2.212.69,3.63,3.63,0,0,0,1.681-.384,3.279,3.279,0,0,0,1.24-1.119A4.261,4.261,0,0,0,75.977-7.2h5.139A8.049,8.049,0,0,1,79.9-3.241,7.443,7.443,0,0,1,76.885-.575,10.038,10.038,0,0,1,72.346.384Zm19.7,0A9.985,9.985,0,0,1,86.905-.888a8.6,8.6,0,0,1-3.343-3.554,11.411,11.411,0,0,1-1.176-5.3,11.469,11.469,0,0,1,1.176-5.325,8.6,8.6,0,0,1,3.343-3.554,9.985,9.985,0,0,1,5.146-1.272A9.985,9.985,0,0,1,97.2-18.62a8.6,8.6,0,0,1,3.343,3.554,11.469,11.469,0,0,1,1.176,5.325,11.411,11.411,0,0,1-1.176,5.3A8.6,8.6,0,0,1,97.2-.888,9.985,9.985,0,0,1,92.051.384Zm.026-4.219a3.367,3.367,0,0,0,2.263-.773,4.757,4.757,0,0,0,1.374-2.116A9.279,9.279,0,0,0,96.18-9.78a9.279,9.279,0,0,0-.467-3.055,4.8,4.8,0,0,0-1.374-2.122,3.35,3.35,0,0,0-2.263-.78,3.443,3.443,0,0,0-2.295.78,4.726,4.726,0,0,0-1.393,2.122,9.278,9.278,0,0,0-.467,3.055,9.278,9.278,0,0,0,.467,3.055,4.681,4.681,0,0,0,1.393,2.116A3.461,3.461,0,0,0,92.077-3.835ZM103.83,0V-19.636h5.28v3.426h.2a5.1,5.1,0,0,1,1.8-2.768,4.76,4.76,0,0,1,2.915-.94,8.238,8.238,0,0,1,.882.051,6.212,6.212,0,0,1,.831.141v4.832a7.115,7.115,0,0,0-1.061-.2,9.532,9.532,0,0,0-1.24-.089,4.363,4.363,0,0,0-2.141.518,3.847,3.847,0,0,0-1.483,1.438,4.1,4.1,0,0,0-.543,2.122V0Zm19.59.32a7.351,7.351,0,0,1-4.046-1.157,7.876,7.876,0,0,1-2.864-3.413,13.041,13.041,0,0,1-1.055-5.542,12.858,12.858,0,0,1,1.087-5.619,7.829,7.829,0,0,1,2.9-3.362,7.4,7.4,0,0,1,3.969-1.119,6.1,6.1,0,0,1,2.755.556,5.484,5.484,0,0,1,1.79,1.381,7.22,7.22,0,0,1,1.042,1.617h.166v-9.844h5.433V0h-5.369V-3.145h-.23a7,7,0,0,1-1.08,1.617,5.443,5.443,0,0,1-1.8,1.323A6.249,6.249,0,0,1,123.42.32Zm1.726-4.334a3.487,3.487,0,0,0,2.231-.722,4.56,4.56,0,0,0,1.406-2.026,8.637,8.637,0,0,0,.492-3.055,8.632,8.632,0,0,0-.486-3.043,4.367,4.367,0,0,0-1.406-1.994,3.577,3.577,0,0,0-2.237-.7,3.532,3.532,0,0,0-2.263.729,4.456,4.456,0,0,0-1.393,2.02,8.677,8.677,0,0,0-.473,2.991,8.776,8.776,0,0,0,.479,3.023,4.56,4.56,0,0,0,1.393,2.045A3.485,3.485,0,0,0,125.146-4.014Zm21.418,4.4a10.412,10.412,0,0,1-5.21-1.234A8.345,8.345,0,0,1,138-4.353a11.538,11.538,0,0,1-1.176-5.376A11.479,11.479,0,0,1,138-15.047a8.681,8.681,0,0,1,3.317-3.567,9.628,9.628,0,0,1,5.031-1.278,10.393,10.393,0,0,1,3.624.62,8.169,8.169,0,0,1,2.94,1.86,8.473,8.473,0,0,1,1.962,3.113,12.434,12.434,0,0,1,.7,4.379v1.5H139V-11.8H150.45a4.172,4.172,0,0,0-.511-2.084,3.721,3.721,0,0,0-1.413-1.425,4.122,4.122,0,0,0-2.09-.518,4.193,4.193,0,0,0-2.192.569,4.08,4.08,0,0,0-1.489,1.521,4.333,4.333,0,0,0-.55,2.116v3.209a5.462,5.462,0,0,0,.543,2.518,3.889,3.889,0,0,0,1.54,1.636,4.653,4.653,0,0,0,2.365.575,5.15,5.15,0,0,0,1.662-.256,3.449,3.449,0,0,0,1.291-.767,3.335,3.335,0,0,0,.818-1.253l5.037.332A6.866,6.866,0,0,1,153.9-2.461a7.868,7.868,0,0,1-3.043,2.1A11.435,11.435,0,0,1,146.563.384Zm14.31-.051a2.954,2.954,0,0,1-2.167-.9,2.954,2.954,0,0,1-.9-2.167,2.919,2.919,0,0,1,.9-2.148,2.965,2.965,0,0,1,2.167-.895,2.985,2.985,0,0,1,2.148.895,2.889,2.889,0,0,1,.92,2.148,2.884,2.884,0,0,1-.428,1.54,3.286,3.286,0,0,1-1.119,1.112A2.9,2.9,0,0,1,160.873.332Z"
|
|
33
|
+
transform="translate(110.385 62)"
|
|
34
|
+
fill="#2a282d"
|
|
35
|
+
/>
|
|
36
|
+
<g transform="translate(51.885 25)">
|
|
37
|
+
<g transform="translate(2.6 2.209)">
|
|
38
|
+
<path
|
|
39
|
+
d="M52.661,65.423h-1.4l-.091-.468h-.208l-.078.351-.078.065H49.646l-.065-.169-.091-.338h-.221v.208l-.118.065-3.859-.326L44.5,64.4v-.871a7.436,7.436,0,0,1,.156-1.079c.182-.883.546-1.962,2.833-5.224s3.08-4.481,4.665-10.3l.078-.324c.468-1.975.806-3.132.936-3.547V34.524a25.625,25.625,0,0,1,.312-2.82h0c.143-.923.312-1.754.468-2.4a21.623,21.623,0,0,0,.195,43.218,41.171,41.171,0,0,1-.845-6.8.668.668,0,0,0-.637-.3Z"
|
|
40
|
+
transform="translate(-33.181 -29.3)"
|
|
41
|
+
fill="#2a282d"
|
|
42
|
+
/>
|
|
43
|
+
<path
|
|
44
|
+
d="M34.658,65.423h1.4l.091-.468h.209l.078.351.078.065h1.157l.065-.169.091-.338h.221v.208l.118.065,3.857-.326.793-.416v-.871a7.436,7.436,0,0,0-.156-1.079c-.182-.883-.546-1.962-2.833-5.224s-3.08-4.481-4.665-10.3l-.078-.324c-.468-1.975-.806-3.132-.936-3.547V34.524a25.63,25.63,0,0,0-.312-2.82h0c-.143-.923-.312-1.754-.468-2.4a21.623,21.623,0,0,1-.195,43.218,41.171,41.171,0,0,0,.845-6.8.668.668,0,0,1,.637-.3Z"
|
|
45
|
+
transform="translate(-11.738 -29.3)"
|
|
46
|
+
fill="#2a282d"
|
|
47
|
+
/>
|
|
48
|
+
</g>
|
|
49
|
+
<path
|
|
50
|
+
d="M23.779,1.169a22.61,22.61,0,1,0,22.61,22.61,22.61,22.61,0,0,0-22.61-22.61m0-1.169A23.779,23.779,0,1,1,0,23.779,23.779,23.779,0,0,1,23.779,0Z"
|
|
51
|
+
transform="translate(0 0)"
|
|
52
|
+
fill="#2a282d"
|
|
53
|
+
/>
|
|
54
|
+
</g>
|
|
55
|
+
</g>
|
|
56
|
+
</svg>
|
|
57
|
+
</sonic-link>
|
|
58
|
+
</div>
|
|
59
|
+
<docs-search class="mx-auto flex-grow block max-w-[32rem] w-full">
|
|
60
|
+
</docs-search>
|
|
61
|
+
|
|
62
|
+
<div>
|
|
63
|
+
<!-- <sonic-button shape="circle" icon variant="ghost">
|
|
64
|
+
<sonic-icon library="iconoir" name="github"></sonic-icon>
|
|
65
|
+
</sonic-button> -->
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<sonic-router>
|
|
70
|
+
<template data-route=".md">
|
|
71
|
+
<div
|
|
72
|
+
class="grid grid-cols-[minmax(10rem,15rem)_minmax(0,1fr)] gap-8"
|
|
73
|
+
>
|
|
74
|
+
<div>
|
|
75
|
+
<docs-navigation
|
|
76
|
+
class="sticky top-[4.2rem] max-h-[calc(100vh_-_4.2rem)] block overflow-auto py-4 custom-scroll"
|
|
77
|
+
></docs-navigation>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="min-h-[100vh] pt-3">
|
|
80
|
+
<div class="max-w-[80ch] mx-auto block py-8">
|
|
81
|
+
<docs-page noShadowDom class="prose"></docs-page>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</template>
|
|
86
|
+
|
|
87
|
+
<template data-route="^((?!#).)*$">
|
|
88
|
+
<div
|
|
89
|
+
class="text-4xl leading-none md:text-5xl lg:text-7xl xl:text-8xl max-w-[29ch] lg:max-w-[19ch] mt-9 mb-10 text-neutral-900"
|
|
90
|
+
>
|
|
91
|
+
<!-- webcomponents built with lit to implement
|
|
92
|
+
<span class="font-bold">anywhere, fast, safe and consistent user interfaces. </span> -->
|
|
93
|
+
webcomponents for
|
|
94
|
+
<span class="font-bold"
|
|
95
|
+
>scoped and consistent user interfaces.
|
|
96
|
+
</span>
|
|
97
|
+
<div class="text-base mt-6 -mb-12 relative z-2">
|
|
98
|
+
<div
|
|
99
|
+
class="inline-flex items-center gap-3 text-lg leading-none"
|
|
100
|
+
>
|
|
101
|
+
<sonic-button
|
|
102
|
+
size="2xl"
|
|
103
|
+
variant="outline"
|
|
104
|
+
type="primary"
|
|
105
|
+
href="/#docs/_getting-started/start.md/start"
|
|
106
|
+
>
|
|
107
|
+
<sonic-icon
|
|
108
|
+
name="airplane"
|
|
109
|
+
library="iconoir"
|
|
110
|
+
class="rotate-90 inline-block mr-1"
|
|
111
|
+
></sonic-icon
|
|
112
|
+
><span class="font-bold">Get Started</span>
|
|
113
|
+
</sonic-button>
|
|
114
|
+
<sonic-code language="bash" inline noEdit>
|
|
115
|
+
<template>
|
|
116
|
+
npx @supersoniks/create-concorde-ts-starter "MyProject"
|
|
117
|
+
</template></sonic-code
|
|
118
|
+
>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
<sonic-image
|
|
123
|
+
src="/img/concorde.png"
|
|
124
|
+
alt=""
|
|
125
|
+
class="w-full block mix-blend-multiply"
|
|
126
|
+
></sonic-image>
|
|
127
|
+
</template>
|
|
128
|
+
</sonic-router>
|
|
129
|
+
</sonic-scope>
|
|
130
|
+
</sonic-theme>
|
|
131
|
+
</body>
|
|
132
|
+
</html>
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
# Date
|
|
2
|
+
|
|
3
|
+
## No attribute
|
|
4
|
+
|
|
5
|
+
**Nothing** is displayed.
|
|
6
|
+
|
|
7
|
+
<sonic-code>
|
|
8
|
+
<template>
|
|
9
|
+
<sonic-date></sonic-date>
|
|
10
|
+
</template>
|
|
11
|
+
</sonic-code>
|
|
12
|
+
|
|
13
|
+
## Now
|
|
14
|
+
|
|
15
|
+
Displays the **current date**.
|
|
16
|
+
|
|
17
|
+
<sonic-code>
|
|
18
|
+
<template>
|
|
19
|
+
<sonic-date now></sonic-date>
|
|
20
|
+
</template>
|
|
21
|
+
</sonic-code>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## Date
|
|
25
|
+
|
|
26
|
+
Displays a date from a **timestamp**.
|
|
27
|
+
|
|
28
|
+
<sonic-code>
|
|
29
|
+
<template>
|
|
30
|
+
<sonic-date date= "1640265629"></sonic-date>
|
|
31
|
+
</template>
|
|
32
|
+
</sonic-code>
|
|
33
|
+
|
|
34
|
+
## Date_string
|
|
35
|
+
|
|
36
|
+
Displays a date from a **string**.
|
|
37
|
+
|
|
38
|
+
<sonic-code>
|
|
39
|
+
<template>
|
|
40
|
+
<sonic-date date_string="July 20, 69 20:17:40 GMT+00:00"></sonic-date>
|
|
41
|
+
</template>
|
|
42
|
+
</sonic-code>
|
|
43
|
+
|
|
44
|
+
## Start_date / end_date
|
|
45
|
+
|
|
46
|
+
Displays a period of time **from start_date to end_date**.
|
|
47
|
+
When by itself **start_date** will act as **date**
|
|
48
|
+
if a **start_date is not specified** it will be set by the **current date**.
|
|
49
|
+
if the **end_date is anterior** to start date date it will be **used as the start_date**.
|
|
50
|
+
|
|
51
|
+
<sonic-code>
|
|
52
|
+
<template>
|
|
53
|
+
<!-- from start_date to end_date -->
|
|
54
|
+
<sonic-date start_date="1640265629" end_date= "1640365629"></sonic-date>
|
|
55
|
+
<br>
|
|
56
|
+
<!-- start_date is not specified -->
|
|
57
|
+
<sonic-date end_date= "2640365629"></sonic-date>
|
|
58
|
+
<br>
|
|
59
|
+
<!-- end_date is anterior -->
|
|
60
|
+
<sonic-date end_date= "640365629"></sonic-date>
|
|
61
|
+
</template>
|
|
62
|
+
</sonic-code>
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
## Start_date_string / end_date_string
|
|
66
|
+
|
|
67
|
+
<sonic-code>
|
|
68
|
+
<template>
|
|
69
|
+
<!-- from start_date to end_date -->
|
|
70
|
+
<sonic-date date_string="July 20, 90 20:17:40 GMT+00:00" end_date_string= "June 20, 94 20:17:40 GMT+00:00"></sonic-date>
|
|
71
|
+
<br>
|
|
72
|
+
<!-- start_date is not specified -->
|
|
73
|
+
<sonic-date end_date_string= "May 20, 34 20:17:40 GMT+00:00"></sonic-date>
|
|
74
|
+
<br>
|
|
75
|
+
<!-- end_date is anterior -->
|
|
76
|
+
<sonic-date end_date_string= "April 20, 06 20:17:40 GMT+00:00"></sonic-date>
|
|
77
|
+
</template>
|
|
78
|
+
</sonic-code>
|
|
79
|
+
|
|
80
|
+
## Wording_billet_periode_validite
|
|
81
|
+
|
|
82
|
+
<sonic-code>
|
|
83
|
+
<template>
|
|
84
|
+
<sonic-date wording_billet_periode_validite= "À partir du %s jusqu'au %s" start_date="1640265629" end_date= "1640365629"></sonic-date>
|
|
85
|
+
</template>
|
|
86
|
+
</sonic-code>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## Weekday
|
|
90
|
+
|
|
91
|
+
<sonic-code>
|
|
92
|
+
<template>
|
|
93
|
+
<b>narrow : </b>
|
|
94
|
+
<sonic-date weekday="narrow" now></sonic-date>
|
|
95
|
+
<br>
|
|
96
|
+
<b>short (default) : </b>
|
|
97
|
+
<sonic-date weekday="short" now></sonic-date>
|
|
98
|
+
<br>
|
|
99
|
+
<b>long : </b>
|
|
100
|
+
<sonic-date weekday="long" now></sonic-date>
|
|
101
|
+
<br>
|
|
102
|
+
<b>hidden : </b>
|
|
103
|
+
<sonic-date weekday="hidden" now></sonic-date>
|
|
104
|
+
</template>
|
|
105
|
+
</sonic-code>
|
|
106
|
+
|
|
107
|
+
## Day
|
|
108
|
+
|
|
109
|
+
<sonic-code>
|
|
110
|
+
<template>
|
|
111
|
+
<b>numeric : </b>
|
|
112
|
+
<sonic-date day="numeric" date_string="July 01, 69"></sonic-date>
|
|
113
|
+
<br>
|
|
114
|
+
<b>2-digit (default) : </b>
|
|
115
|
+
<sonic-date day="2-digit" date_string="July 01, 69"></sonic-date>
|
|
116
|
+
</template>
|
|
117
|
+
</sonic-code>
|
|
118
|
+
|
|
119
|
+
## Month
|
|
120
|
+
|
|
121
|
+
<sonic-code>
|
|
122
|
+
<template>
|
|
123
|
+
<b>numeric : </b>
|
|
124
|
+
<sonic-date month="numeric" now></sonic-date>
|
|
125
|
+
<br>
|
|
126
|
+
<b>2-digit : </b>
|
|
127
|
+
<sonic-date month="2-digit" now></sonic-date>
|
|
128
|
+
<br>
|
|
129
|
+
<b>narrow : </b>
|
|
130
|
+
<sonic-date month="narrow" now></sonic-date>
|
|
131
|
+
<br>
|
|
132
|
+
<b>short (default) : </b>
|
|
133
|
+
<sonic-date month="short" now></sonic-date>
|
|
134
|
+
<br>
|
|
135
|
+
<b>long : </b>
|
|
136
|
+
<sonic-date month="long" now></sonic-date>
|
|
137
|
+
</template>
|
|
138
|
+
</sonic-code>
|
|
139
|
+
|
|
140
|
+
## Year
|
|
141
|
+
|
|
142
|
+
<sonic-code>
|
|
143
|
+
<template>
|
|
144
|
+
<b>numeric (default) : </b>
|
|
145
|
+
<sonic-date year="numeric" now></sonic-date>
|
|
146
|
+
<br>
|
|
147
|
+
<b>2-digit : </b>
|
|
148
|
+
<sonic-date year="2-digit" now></sonic-date>
|
|
149
|
+
</template>
|
|
150
|
+
</sonic-code>
|
|
151
|
+
|
|
152
|
+
## Hour
|
|
153
|
+
|
|
154
|
+
<sonic-code>
|
|
155
|
+
<template>
|
|
156
|
+
<b>numeric : </b>
|
|
157
|
+
<sonic-date hour="numeric" date_string= "June 20, 04 02:06:02 GMT+00:00"></sonic-date>
|
|
158
|
+
<br>
|
|
159
|
+
<b>2-digit (default) : </b>
|
|
160
|
+
<sonic-date hour="2-digit" date_string= "June 20, 04 02:06:02 GMT+00:00"></sonic-date>
|
|
161
|
+
<br>
|
|
162
|
+
<b>hidden : </b>
|
|
163
|
+
<sonic-date hour="hidden" date_string= "June 20, 04 02:06:02 GMT+00:00"></sonic-date>
|
|
164
|
+
</template>
|
|
165
|
+
</sonic-code>
|
|
166
|
+
|
|
167
|
+
## Minute
|
|
168
|
+
|
|
169
|
+
<sonic-code>
|
|
170
|
+
<template>
|
|
171
|
+
<b>numeric : </b>
|
|
172
|
+
<sonic-date minute="numeric" date_string= "June 20, 04 02:06:02 GMT+00:00"></sonic-date>
|
|
173
|
+
<br>
|
|
174
|
+
<b>2-digit (default) : </b>
|
|
175
|
+
<sonic-date minute="2-digit" date_string= "June 20, 04 02:06:02 GMT+00:00"></sonic-date>
|
|
176
|
+
<br>
|
|
177
|
+
<b>hidden : </b>
|
|
178
|
+
<sonic-date minute="hidden" date_string= "June 20, 04 02:06:02 GMT+00:00"></sonic-date>
|
|
179
|
+
</template>
|
|
180
|
+
</sonic-code>
|
|
181
|
+
|
|
182
|
+
## Language
|
|
183
|
+
|
|
184
|
+
<sonic-button href="https://www.w3schools.com/tags/ref_language_codes.asp" target="_blank" type="info" size="sm">ISO 639-1 Language Codes</sonic-button>
|
|
185
|
+
|
|
186
|
+
<sonic-code>
|
|
187
|
+
<template>
|
|
188
|
+
<b>fr : </b>
|
|
189
|
+
<sonic-date language="fr" now></sonic-date>
|
|
190
|
+
<br>
|
|
191
|
+
<b>en : </b>
|
|
192
|
+
<sonic-date language="en" now></sonic-date>
|
|
193
|
+
<br>
|
|
194
|
+
<b>zh : </b>
|
|
195
|
+
<sonic-date language="zh" now></sonic-date>
|
|
196
|
+
<br>
|
|
197
|
+
<b>ja : </b>
|
|
198
|
+
<sonic-date language="ja" now></sonic-date>
|
|
199
|
+
</template>
|
|
200
|
+
</sonic-code>
|
|
201
|
+
|
|
202
|
+
## Time_zone
|
|
203
|
+
|
|
204
|
+
For the list of supported timeZones, run <b class="text-info">Intl.supportedValuesOf('timeZone')</b> in the console
|
|
205
|
+
|
|
206
|
+
<sonic-code>
|
|
207
|
+
<template>
|
|
208
|
+
<b>Europe/London : </b>
|
|
209
|
+
<sonic-date time_zone="Europe/London" now></sonic-date>
|
|
210
|
+
<br>
|
|
211
|
+
<b>Europe/Paris : </b>
|
|
212
|
+
<sonic-date time_zone="Europe/Paris" now></sonic-date>
|
|
213
|
+
<br>
|
|
214
|
+
<b>America/Tijuana : </b>
|
|
215
|
+
<sonic-date time_zone="America/Tijuana" now></sonic-date>
|
|
216
|
+
</template>
|
|
217
|
+
</sonic-code>
|
|
218
|
+
|
|
219
|
+
## Era
|
|
220
|
+
|
|
221
|
+
<sonic-code>
|
|
222
|
+
<template>
|
|
223
|
+
<b>narrow : </b>
|
|
224
|
+
<sonic-date era="narrow" now></sonic-date>
|
|
225
|
+
<br>
|
|
226
|
+
<b>short : </b>
|
|
227
|
+
<sonic-date era="short" now></sonic-date>
|
|
228
|
+
<br>
|
|
229
|
+
<b>long : </b>
|
|
230
|
+
<sonic-date era="long" now></sonic-date>
|
|
231
|
+
</template>
|
|
232
|
+
</sonic-code>
|
|
233
|
+
|
|
234
|
+
## .renderIf
|
|
235
|
+
|
|
236
|
+
<sonic-alert status="error" background>Deprecated</sonic-alert>
|
|
237
|
+
|
|
238
|
+
<sonic-code>
|
|
239
|
+
<template>
|
|
240
|
+
<b>True statement : </b>
|
|
241
|
+
<sonic-date data-bind ::render-if="|10>2" now></sonic-date>
|
|
242
|
+
<br>
|
|
243
|
+
<b>False statement : </b>
|
|
244
|
+
<sonic-date data-bind ::render-if="|10<2" now></sonic-date>
|
|
245
|
+
</template>
|
|
246
|
+
</sonic-code>
|
|
247
|
+
|
|
248
|
+
## DesignMode
|
|
249
|
+
|
|
250
|
+
<sonic-code>
|
|
251
|
+
<template>
|
|
252
|
+
<div class="relative max-w-lg rounded-lg overflow-hidden">
|
|
253
|
+
<div class="absolute top-0 h-1/2 w-full bg-gradient-to-b from-[rgba(0,0,10,.2)] z-10 "></div>
|
|
254
|
+
<sonic-date
|
|
255
|
+
designMode
|
|
256
|
+
noShadowDom
|
|
257
|
+
start_date= "1640265629"
|
|
258
|
+
end_date= "1640365629"
|
|
259
|
+
language= "fr"
|
|
260
|
+
wording_billet_periode_validite= "Du %s au %s"
|
|
261
|
+
year= "numeric"
|
|
262
|
+
month= "short"
|
|
263
|
+
weekday= "short"
|
|
264
|
+
hour= "2-digit"
|
|
265
|
+
minute= "2-digit"
|
|
266
|
+
class="py-4 drop-shadow-lg text-contrast-content p-4 inline-block text-center absolute left-0 z-20 text-sm"
|
|
267
|
+
>
|
|
268
|
+
<template data-value="weekday">
|
|
269
|
+
<span class="hidden"></span>
|
|
270
|
+
</template>
|
|
271
|
+
<template data-value="day">
|
|
272
|
+
<span class="text-4xl block uppercase leading-none font-bold"></span>
|
|
273
|
+
</template>
|
|
274
|
+
<template data-value="month">
|
|
275
|
+
<span class="text-xl block uppercase leading-tight font-bold"></span>
|
|
276
|
+
</template>
|
|
277
|
+
<template data-value="year">
|
|
278
|
+
<span class="text-lg mb-1 font-bold block uppercase leading-tight "></span>
|
|
279
|
+
</template>
|
|
280
|
+
<template data-value="to">
|
|
281
|
+
<span class="font-medium block my-1 text-3xl leading-none">↓</span>
|
|
282
|
+
</template>
|
|
283
|
+
</sonic-date>
|
|
284
|
+
<sonic-image
|
|
285
|
+
ratio="1/1" src="https://picsum.photos/id/237/700/700">
|
|
286
|
+
</sonic-image>
|
|
287
|
+
</div>
|
|
288
|
+
</template>
|
|
289
|
+
</sonic-code>
|
|
290
|
+
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Fetch
|
|
2
|
+
The **sonic-fetch** component is used to request and store data from an API.
|
|
3
|
+
Fetch extends the mixins Fetcher and [Subscriber](#docs/_core-concept/subscriber.md/subscriber)
|
|
4
|
+
|
|
5
|
+
## Basic usage
|
|
6
|
+
In order to work properly the <b>sonic-fetch</b> component needs at least the following attributes.
|
|
7
|
+
- **serviceURL** : A base service url. This attribute can be inherited from an ancestor.
|
|
8
|
+
*ex : https://reqres.in*
|
|
9
|
+
- **endPoint** : the specific location where requests for information are sent (see the api docs).
|
|
10
|
+
*ex : api/users | api/users?page=2 | api/users/2*
|
|
11
|
+
- **dataProvider *(Required)*** : An ID that is used as a reference to the object storing the data returned by the API.
|
|
12
|
+
This attribute can be inherited from an ancestor.
|
|
13
|
+
|
|
14
|
+
<sonic-code>
|
|
15
|
+
<template>
|
|
16
|
+
<sonic-fetch serviceURL="https://reqres.in" endPoint="api/users?page=2" dataProvider="myDataObj"></sonic-fetch>
|
|
17
|
+
<sonic-button dataProvider="myDataObj" debug>Hover to see the data</sonic-button>
|
|
18
|
+
</template>
|
|
19
|
+
</sonic-code>
|
|
20
|
+
|
|
21
|
+
## DataProvider as an endPoint
|
|
22
|
+
If no **endPoint** is specified it will be filled by the **dataProvider ID** instead
|
|
23
|
+
|
|
24
|
+
<sonic-code>
|
|
25
|
+
<template>
|
|
26
|
+
<sonic-fetch serviceURL="https://reqres.in" dataProvider="api/users?page=2" ></sonic-fetch>
|
|
27
|
+
<sonic-button dataProvider="api/users?page=2" debug>Hover to see the data</sonic-button>
|
|
28
|
+
</template>
|
|
29
|
+
</sonic-code>
|
|
30
|
+
|
|
31
|
+
## HeadersDataProvider
|
|
32
|
+
|
|
33
|
+
<sonic-alert status="error" background>Deprecated</sonic-alert>
|
|
34
|
+
|
|
35
|
+
## Key
|
|
36
|
+
When the **key** attribute is present, only a sub-part of the data received is injected into the **dataProvider**.
|
|
37
|
+
We can use the dot syntax to target what we want to keep.
|
|
38
|
+
|
|
39
|
+
For example if the data is `{my:{data:{a:1,b:2}}}` and the key is `key="my.data"`, the data available in the **dataProvider** will be `{a:1 , b:2}`
|
|
40
|
+
|
|
41
|
+
<sonic-code>
|
|
42
|
+
<template>
|
|
43
|
+
<sonic-fetch serviceURL="https://reqres.in" dataProvider="api/users/2" ></sonic-fetch>
|
|
44
|
+
<sonic-button dataProvider="api/users/2" debug>dataProvider object</sonic-button>
|
|
45
|
+
<!-- Get the user ID -->
|
|
46
|
+
<sonic-fetch serviceURL="https://reqres.in" dataProvider="id" endPoint="api/users/2" key="data.id"></sonic-fetch>
|
|
47
|
+
<sonic-button dataProvider="id" debug>data.id</sonic-button>
|
|
48
|
+
<!-- Get the user First name -->
|
|
49
|
+
<sonic-fetch serviceURL="https://reqres.in" dataProvider="first_name" endPoint="api/users/2" key="data.first_name"></sonic-fetch>
|
|
50
|
+
<sonic-button dataProvider="first_name" debug>data.first_name</sonic-button>
|
|
51
|
+
<!-- Get the user Last name -->
|
|
52
|
+
<sonic-fetch serviceURL="https://reqres.in" dataProvider="last_name" endPoint="api/users/2" key="data.last_name"></sonic-fetch>
|
|
53
|
+
<sonic-button dataProvider="last_name" debug>data.last_name</sonic-button>
|
|
54
|
+
<!-- Get the user email -->
|
|
55
|
+
<sonic-fetch serviceURL="https://reqres.in" dataProvider="email" endPoint="api/users/2" key="data.email"></sonic-fetch>
|
|
56
|
+
<sonic-button dataProvider="email" debug>data.email</sonic-button>
|
|
57
|
+
</template>
|
|
58
|
+
</sonic-code>
|
|
59
|
+
|
|
60
|
+
## Text mode
|
|
61
|
+
|
|
62
|
+
if the mime type of the content returned by the service begins with **text/**, then the dataProvider has a key named "text" which contains the text returned by the service.
|
|
63
|
+
|
|
64
|
+
<sonic-code>
|
|
65
|
+
<template>
|
|
66
|
+
<sonic-fetch endPoint="README.md" dataProvider="fetchText"></sonic-fetch>
|
|
67
|
+
<sonic-button dataProvider="fetchText" debug>Hover to see the data</sonic-button>
|
|
68
|
+
</template>
|
|
69
|
+
</sonic-code>
|
|
70
|
+
|
|
71
|
+
## NoLoader
|
|
72
|
+
|
|
73
|
+
The noLoader attribute disables display of the default loader
|
|
74
|
+
|
|
75
|
+
<sonic-code>
|
|
76
|
+
<template>
|
|
77
|
+
<sonic-fetch noLoader serviceURL="https://reqres.in" endPoint="api/users?page=2" dataProvider="myDataObj"></sonic-fetch>
|
|
78
|
+
<sonic-button dataProvider="myDataObj" debug>Basic fetch with noLoader attribute</sonic-button>
|
|
79
|
+
</template>
|
|
80
|
+
</sonic-code>
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
<!--
|
|
86
|
+
## Summary
|
|
87
|
+
Extends mixins : Fetcher, [Subscriber](#core/components/functional/subscriber/subscriber.md/subscriber)
|
|
88
|
+
|
|
89
|
+
### Configuration via les attributs
|
|
90
|
+
|
|
91
|
+
| nom | sur quelle balise | Description | Exemple de valeur | défaut / requis |
|
|
92
|
+
|-----|-----|---|---|---|
|
|
93
|
+
| serviceURL |Fetcher ou un de ses parents | URL de base des services. | http://la-billetterie.net/api/v2 | domain du site |
|
|
94
|
+
| endpoint |Fetcher | point d'accès d'un service | user/2 | valeur de l'attribut dataProvider |
|
|
95
|
+
| dataProvider |Fetcher ou un de ses parents | Identifiant d'un publisher qui stock les données, voir [subscriber](#core/components/functional/subscriber/subscriber.md/subscriber). | billetterie/user/2 | *REQUIS* |
|
|
96
|
+
| headersDataProvider |Fetcher ou un de ses parents | Identifiant d'un publisher qui stock les données destinées à être envoyées en entêtes de la requetes | MyCoockieHEaders | null |
|
|
97
|
+
| key |Fetcher | extrait une sous propriété de la donnée chargée avant de l'assignée à son publisher | ma.data | null |
|
|
98
|
+
|
|
99
|
+
*Si la données est `{ma:{data:{a:1,b:2}}}` et `key="ma.data"`, la données disponible dans le composant sera `{a:1, b:2}`*
|
|
100
|
+
|
|
101
|
+
### Intégration auto de basic auth (pour tester une api qui nécessite une authentification)
|
|
102
|
+
|
|
103
|
+
Fetch utilise le service pour générer le token et l'ajoute au header de l'appel qui récupère les données.
|
|
104
|
+
|
|
105
|
+
| nom | sur quelle balise | Description | Exemple de valeur | défaut / requis |
|
|
106
|
+
|-----|-----|---|---|---|
|
|
107
|
+
| userName | Fetcher ou un de ses parents | Nom de l'utilisateur | DjuDju | null |
|
|
108
|
+
| password | Fetcher ou un de ses parents | mot de passe | pom_549 | null |
|
|
109
|
+
| tokenProvider | Fetcher ou un de ses parents | point d'accès du service fournissant le token | auth | null |
|
|
110
|
+
| token | Fetcher ou un de ses parents | A fournir à la place des autres attributs si on le possède | q<d34gb | null |
|
|
111
|
+
|
|
112
|
+
### Autres choses utiles
|
|
113
|
+
L'attribut *noLoader* du composant permet de désactiver l'affichage du loader par défaut.
|
|
114
|
+
On peut appeler la methode invalidate() sur le publisher associé au composant pour declencher le rechargement des données.
|
|
115
|
+
endPoint est une propriété réctive, par conséquent, sa modification, manuelle via template ou data binbding provoque la mise à jour du contenu.
|
|
116
|
+
-->
|
|
117
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# if / condition
|
|
2
|
+
|
|
3
|
+
The **sonic-if** component shows its content based on the value of its reactive property names **condition**
|
|
4
|
+
|
|
5
|
+
<sonic-code>
|
|
6
|
+
<template>
|
|
7
|
+
<div dataProvider="visibilitySettings" formDataProvider="visibilitySettings">
|
|
8
|
+
<sonic-checkbox label="Show evacuation plan" name="togglePlan" unique checked value="true"></sonic-checkbox>
|
|
9
|
+
<sonic-if data-bind ::condition="$togglePlan" class="mt-4 block">
|
|
10
|
+
<sonic-image src="https://www.thebaron.info/assets/mail/concorde-evacuation.jpg" rounded="md" ratio="654/463"></sonic-image>
|
|
11
|
+
</sonic-if>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
</sonic-code>
|
|
15
|
+
|
|
16
|
+
|