@supersoniks/concorde 3.2.0 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +101 -101
- package/concorde-core.es.js +187 -182
- package/dist/concorde-core.bundle.js +101 -101
- package/dist/concorde-core.es.js +187 -182
- package/index.html +0 -0
- package/package.json +1 -1
- package/scripts/create-search.js +0 -0
- package/scripts/generate-routes.js +0 -0
- package/src/core/_types/types.ts +0 -0
- package/src/core/components/functional/date/date.ts +0 -0
- package/src/core/components/functional/functional.ts +0 -0
- package/src/core/components/functional/if/if.md +0 -0
- package/src/core/components/functional/if/if.test.ts +0 -0
- package/src/core/components/functional/list/list.spec.ts +0 -0
- package/src/core/components/functional/queue/queue.demo.ts +0 -0
- package/src/core/components/functional/router/router.demo.ts +0 -0
- package/src/core/components/functional/router/router.md +0 -0
- package/src/core/components/functional/router/router.spec.ts +0 -0
- package/src/core/components/functional/router/router.ts +0 -0
- package/src/core/components/functional/sonic-scope/sonic-scope.ts +0 -0
- package/src/core/components/functional/states/states.demo.ts +0 -0
- package/src/core/components/functional/states/states.md +0 -0
- package/src/core/components/functional/states/states.spec.ts +0 -0
- package/src/core/components/functional/states/states.ts +0 -0
- package/src/core/components/functional/submit/submit.ts +0 -0
- package/src/core/components/functional/translation/translation.ts +0 -0
- package/src/core/components/ui/_css/scroll.ts +0 -0
- package/src/core/components/ui/_css/shadow.ts +0 -0
- package/src/core/components/ui/_css/size.ts +0 -0
- package/src/core/components/ui/_css/type.ts +0 -0
- package/src/core/components/ui/alert/alert.md +0 -0
- package/src/core/components/ui/alert/alert.ts +0 -0
- package/src/core/components/ui/alert-messages/alert-messages.md +0 -0
- package/src/core/components/ui/badge/badge.md +0 -0
- package/src/core/components/ui/badge/badge.ts +0 -0
- package/src/core/components/ui/button/button.md +0 -0
- package/src/core/components/ui/button/button.ts +0 -0
- package/src/core/components/ui/captcha/captcha.md +0 -0
- package/src/core/components/ui/captcha/captcha.ts +0 -0
- package/src/core/components/ui/card/card-footer.ts +0 -0
- package/src/core/components/ui/card/card-header-descripton.ts +0 -0
- package/src/core/components/ui/card/card-header.ts +0 -0
- package/src/core/components/ui/card/card-main.ts +0 -0
- package/src/core/components/ui/card/card.md +0 -0
- package/src/core/components/ui/card/card.ts +0 -0
- package/src/core/components/ui/divider/divider.ts +0 -0
- package/src/core/components/ui/form/checkbox/checkbox.md +0 -0
- package/src/core/components/ui/form/checkbox/checkbox.ts +0 -0
- package/src/core/components/ui/form/css/form-control.ts +0 -0
- package/src/core/components/ui/form/fieldset/fieldset.ts +0 -0
- package/src/core/components/ui/form/fieldset/legend-description.ts +0 -0
- package/src/core/components/ui/form/fieldset/legend.ts +0 -0
- package/src/core/components/ui/form/form-layout/form-layout.md +0 -0
- package/src/core/components/ui/form/input/input.md +0 -0
- package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -0
- package/src/core/components/ui/form/radio/radio.md +0 -0
- package/src/core/components/ui/form/radio/radio.ts +0 -0
- package/src/core/components/ui/form/select/select.md +0 -0
- package/src/core/components/ui/form/switch/switch.md +0 -0
- package/src/core/components/ui/form/switch/switch.ts +0 -0
- package/src/core/components/ui/form/textarea/textarea.ts +0 -0
- package/src/core/components/ui/icon/icons.ts +14 -3
- package/src/core/components/ui/image/image.md +0 -0
- package/src/core/components/ui/image/image.ts +0 -0
- package/src/core/components/ui/loader/loader.md +0 -0
- package/src/core/components/ui/loader/loader.ts +0 -0
- package/src/core/components/ui/loader/styles/fixed.ts +0 -0
- package/src/core/components/ui/loader/styles/inline.ts +0 -0
- package/src/core/components/ui/menu/menu.ts +0 -0
- package/src/core/components/ui/modal/modal-actions.ts +0 -0
- package/src/core/components/ui/modal/modal-close.ts +0 -0
- package/src/core/components/ui/modal/modal-subtitle.ts +0 -0
- package/src/core/components/ui/modal/modal-title.ts +0 -0
- package/src/core/components/ui/modal/modal.md +0 -0
- package/src/core/components/ui/pop/pop.md +0 -0
- package/src/core/components/ui/progress/progress.ts +0 -0
- package/src/core/components/ui/table/table-tbody.ts +0 -0
- package/src/core/components/ui/table/table-th.ts +0 -0
- package/src/core/components/ui/table/table.ts +0 -0
- package/src/core/components/ui/theme/theme-collection/core-variables.ts +0 -0
- package/src/core/components/ui/theme/theme-collection/dark.ts +0 -0
- package/src/core/components/ui/theme/theme-collection/light.ts +0 -0
- package/src/core/components/ui/theme/theme.ts +0 -0
- package/src/core/components/ui/toast/toast-item.ts +0 -0
- package/src/core/components/ui/tooltip/tooltip.ts +0 -0
- package/src/core/components/ui/ui.ts +0 -0
- package/src/core/directives/DataProvider.ts +0 -0
- package/src/core/directives/Wording.ts +0 -0
- package/src/core/mixins/Fetcher.ts +0 -0
- package/src/core/mixins/FormCheckable.ts +0 -0
- package/src/core/mixins/TemplatesContainer.ts +0 -0
- package/src/core/utils/HTML.ts +0 -0
- package/src/core/utils/LocationHandler.ts +0 -0
- package/src/core/utils/Objects.ts +0 -0
- package/src/core/utils/Utils.ts +0 -0
- package/src/core/utils/api.ts +0 -0
- package/src/core/utils/route.spec.ts +0 -0
- package/src/core/utils/route.ts +0 -0
- package/src/docs/code.ts +0 -0
- package/src/docs/docs.ts +0 -0
- package/src/docs/header/header.ts +0 -0
- package/src/docs/layout.ts +0 -0
- package/src/docs/navigation/navigation.ts +0 -0
- package/src/docs/search/docs-search.json +0 -0
- package/src/docs/search/markdown-renderer.ts +0 -0
- package/src/docs/search/page.ts +0 -0
- package/src/docs/search/search.ts +0 -0
- package/src/docs/tailwind/css/tailwind.css +0 -0
- package/src/docs/tailwind/css.d.ts +0 -0
- package/src/index.ts +0 -0
- package/src/test-utils/TestUtils.ts +0 -0
- package/src/tsconfig-model.json +0 -0
- package/src/tsconfig.json +294 -294
- package/tailwind.config.js +0 -0
- package/templates-test.html +0 -0
- package/vite/config.js +0 -0
- package/docs/assets/index-C0K6xugr.css +0 -1
- package/docs/assets/index-Dgl1lJQo.js +0 -4861
- package/docs/css/docs.css +0 -0
- package/docs/fonts/ClashGrotesk-Bold.eot +0 -0
- package/docs/fonts/ClashGrotesk-Bold.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Bold.woff +0 -0
- package/docs/fonts/ClashGrotesk-Bold.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Extralight.eot +0 -0
- package/docs/fonts/ClashGrotesk-Extralight.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Extralight.woff +0 -0
- package/docs/fonts/ClashGrotesk-Extralight.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Light.eot +0 -0
- package/docs/fonts/ClashGrotesk-Light.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Light.woff +0 -0
- package/docs/fonts/ClashGrotesk-Light.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Medium.eot +0 -0
- package/docs/fonts/ClashGrotesk-Medium.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Medium.woff +0 -0
- package/docs/fonts/ClashGrotesk-Medium.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Regular.eot +0 -0
- package/docs/fonts/ClashGrotesk-Regular.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Regular.woff +0 -0
- package/docs/fonts/ClashGrotesk-Regular.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Semibold.eot +0 -0
- package/docs/fonts/ClashGrotesk-Semibold.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Semibold.woff +0 -0
- package/docs/fonts/ClashGrotesk-Semibold.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Variable.eot +0 -0
- package/docs/fonts/ClashGrotesk-Variable.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Variable.woff +0 -0
- package/docs/fonts/ClashGrotesk-Variable.woff2 +0 -0
- package/docs/img/concorde-icon.svg +0 -5
- package/docs/img/concorde-logo.svg +0 -1
- package/docs/img/concorde.png +0 -0
- package/docs/img/concorde_def.png +0 -0
- package/docs/img/concorde_seuil.png.webp +0 -0
- package/docs/img/concorde_seuil_invert.png +0 -0
- package/docs/img/paul_metrand.jpg +0 -0
- package/docs/img/paul_metrand_xs.jpg +0 -0
- package/docs/index.html +0 -93
- package/docs/src/core/components/functional/date/date.md +0 -290
- package/docs/src/core/components/functional/fetch/fetch.md +0 -117
- package/docs/src/core/components/functional/if/if.md +0 -16
- package/docs/src/core/components/functional/list/list.md +0 -199
- package/docs/src/core/components/functional/mix/mix.md +0 -41
- package/docs/src/core/components/functional/queue/queue.md +0 -87
- package/docs/src/core/components/functional/router/router.md +0 -129
- package/docs/src/core/components/functional/sdui/default-library.json +0 -108
- package/docs/src/core/components/functional/sdui/example.json +0 -99
- package/docs/src/core/components/functional/sdui/sdui.md +0 -356
- package/docs/src/core/components/functional/states/states.md +0 -87
- package/docs/src/core/components/functional/submit/submit.md +0 -83
- package/docs/src/core/components/functional/subscriber/subscriber.md +0 -91
- package/docs/src/core/components/functional/value/value.md +0 -35
- package/docs/src/core/components/ui/alert/alert.md +0 -121
- package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -0
- package/docs/src/core/components/ui/badge/badge.md +0 -127
- package/docs/src/core/components/ui/button/button.md +0 -182
- package/docs/src/core/components/ui/captcha/captcha.md +0 -24
- package/docs/src/core/components/ui/card/card.md +0 -97
- package/docs/src/core/components/ui/divider/divider.md +0 -35
- package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -104
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +0 -129
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +0 -77
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +0 -44
- package/docs/src/core/components/ui/form/input/input.md +0 -167
- package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -131
- package/docs/src/core/components/ui/form/radio/radio.md +0 -84
- package/docs/src/core/components/ui/form/select/select.md +0 -97
- package/docs/src/core/components/ui/form/switch/switch.md +0 -84
- package/docs/src/core/components/ui/form/textarea/textarea.md +0 -65
- package/docs/src/core/components/ui/group/group.md +0 -75
- package/docs/src/core/components/ui/icon/icon.md +0 -125
- package/docs/src/core/components/ui/icon/icons.json +0 -1
- package/docs/src/core/components/ui/image/image.md +0 -107
- package/docs/src/core/components/ui/link/link.md +0 -43
- package/docs/src/core/components/ui/loader/loader.md +0 -67
- package/docs/src/core/components/ui/menu/menu.md +0 -288
- package/docs/src/core/components/ui/modal/modal.md +0 -123
- package/docs/src/core/components/ui/pop/pop.md +0 -96
- package/docs/src/core/components/ui/progress/progress.md +0 -63
- package/docs/src/core/components/ui/table/table.md +0 -455
- package/docs/src/core/components/ui/tooltip/tooltip.md +0 -82
- package/docs/src/docs/_core-concept/overview.md +0 -57
- package/docs/src/docs/_core-concept/subscriber.md +0 -76
- package/docs/src/docs/_getting-started/concorde-outside.md +0 -143
- package/docs/src/docs/_getting-started/create-a-component.md +0 -137
- package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -174
- package/docs/src/docs/_getting-started/pubsub.md +0 -150
- package/docs/src/docs/_getting-started/start.md +0 -39
- package/docs/src/docs/_getting-started/theming.md +0 -91
- package/docs/src/docs/search/docs-search.json +0 -3917
- package/docs/src/tag-list.json +0 -1
- package/docs/src/tsconfig-model.json +0 -23
- package/docs/src/tsconfig.json +0 -918
- package/docs/svg/regular/plane.svg +0 -1
- package/docs/svg/solid/plane.svg +0 -1
- package/php/get-challenge.php +0 -34
- package/php/some-service.php +0 -42
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
# Checkbox
|
|
2
|
-
|
|
3
|
-
## Size
|
|
4
|
-
<sonic-code>
|
|
5
|
-
<template>
|
|
6
|
-
<div class="grid gap-2">
|
|
7
|
-
<sonic-checkbox size="2xs">2xs checkbox</sonic-checkbox>
|
|
8
|
-
<sonic-checkbox size="xs">xs checkbox</sonic-checkbox>
|
|
9
|
-
<sonic-checkbox size="sm">sm checkbox</sonic-checkbox>
|
|
10
|
-
<sonic-checkbox>default checkbox</sonic-checkbox>
|
|
11
|
-
<sonic-checkbox size="lg">lg checkbox</sonic-checkbox>
|
|
12
|
-
<sonic-checkbox size="xl">xl checkbox</sonic-checkbox>
|
|
13
|
-
<sonic-checkbox size="2xl">2xl checkbox</sonic-checkbox>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
</sonic-code>
|
|
17
|
-
|
|
18
|
-
## Checked
|
|
19
|
-
<sonic-code>
|
|
20
|
-
<template>
|
|
21
|
-
<sonic-checkbox checked
|
|
22
|
-
>Already checked checkbox
|
|
23
|
-
</sonic-checkbox>
|
|
24
|
-
</template>
|
|
25
|
-
</sonic-code>
|
|
26
|
-
|
|
27
|
-
## Disabled
|
|
28
|
-
<sonic-code>
|
|
29
|
-
<template>
|
|
30
|
-
<sonic-checkbox disabled
|
|
31
|
-
>Disabled checkbox
|
|
32
|
-
</sonic-checkbox>
|
|
33
|
-
</template>
|
|
34
|
-
</sonic-code>
|
|
35
|
-
|
|
36
|
-
## Disabled and checked
|
|
37
|
-
<sonic-code>
|
|
38
|
-
<template>
|
|
39
|
-
<sonic-checkbox disabled checked
|
|
40
|
-
>Disabled but already checked checkbox
|
|
41
|
-
</sonic-checkbox>
|
|
42
|
-
</template>
|
|
43
|
-
</sonic-code>
|
|
44
|
-
|
|
45
|
-
## Checkbox with link
|
|
46
|
-
<sonic-code>
|
|
47
|
-
<template>
|
|
48
|
-
<sonic-checkbox>Checkbox with <sonic-link href="#" class="underline text-info">link</sonic-link>
|
|
49
|
-
</template>
|
|
50
|
-
</sonic-code>
|
|
51
|
-
|
|
52
|
-
## Check all checkbox
|
|
53
|
-
<sonic-code>
|
|
54
|
-
<template>
|
|
55
|
-
<div formDataProvider="checkbox-check-all-demo" dataProvider="checkbox-check-all-demo">
|
|
56
|
-
<sonic-checkbox name='someSharedName' value="all" checksAll>All</sonic-checkbox>
|
|
57
|
-
<sonic-divider></sonic-divider>
|
|
58
|
-
<div class="grid gap-2">
|
|
59
|
-
<sonic-checkbox name="someSharedName" value="foo">Foo</sonic-checkbox>
|
|
60
|
-
<sonic-checkbox name="someSharedName" value="bar">Bar</sonic-checkbox>
|
|
61
|
-
</div>
|
|
62
|
-
<sonic-divider></sonic-divider>
|
|
63
|
-
<div>
|
|
64
|
-
<span>Enabling unsetOnDisconect ensures that outdated or irrelevant values are not retained in the form state once their associated inputs are no longer rendered.</span>
|
|
65
|
-
<div id="prunable-checkbox" class="flex gap-2 items-center">
|
|
66
|
-
<sonic-checkbox name="someSharedName" value="baz">Baz</sonic-checkbox>
|
|
67
|
-
<sonic-button variant="ghost" shape="circle" unique name="toggleCheckboxExistance" onclick="document.getElementById('prunable-checkbox').remove();" value="true"><sonic-icon library="fontAwesome" prefix="solid" name="trash"></sonic-icon></sonic-button>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
</template>
|
|
71
|
-
</sonic-code>
|
|
72
|
-
|
|
73
|
-
## Example of use
|
|
74
|
-
<sonic-code>
|
|
75
|
-
<template>
|
|
76
|
-
<sonic-subscriber dataProvider="jokeFilter" class="text-xl my-4 block font-bold">
|
|
77
|
-
Remove following jokes :
|
|
78
|
-
<sonic-value key="blacklistFlags" class="block text-sm"></sonic-value>
|
|
79
|
-
</sonic-subscriber>
|
|
80
|
-
<div formDataProvider="jokeFilter" class="grid grid-cols-2 lg:grid-cols-3 gap-x-6 gap-y-2 mt-2 mb-3">
|
|
81
|
-
<sonic-checkbox name="blacklistFlags" value="nsfw">nsfw</sonic-checkbox>
|
|
82
|
-
<sonic-checkbox name="blacklistFlags" value="religious">religious</sonic-checkbox>
|
|
83
|
-
<sonic-checkbox name="blacklistFlags" value="political">political</sonic-checkbox>
|
|
84
|
-
<sonic-checkbox name="blacklistFlags" value="racist" checked disabled>racist</sonic-checkbox>
|
|
85
|
-
<sonic-checkbox name="blacklistFlags" value="sexist" checked disabled>sexist</sonic-checkbox>
|
|
86
|
-
<sonic-checkbox name="blacklistFlags" value="explicit">explicit</sonic-checkbox>
|
|
87
|
-
</div>
|
|
88
|
-
<sonic-queue
|
|
89
|
-
lazyload
|
|
90
|
-
dataProviderExpression="joke/Any?amount=10&lang=en"
|
|
91
|
-
dataFilterProvider="jokeFilter"
|
|
92
|
-
serviceURL="https://v2.jokeapi.dev"
|
|
93
|
-
key="jokes"
|
|
94
|
-
>
|
|
95
|
-
<template>
|
|
96
|
-
<div class="border-0 border-b-[1px] border-b-neutral-300 py-3 leading-tight">
|
|
97
|
-
<sonic-value key="joke"></sonic-value>
|
|
98
|
-
<sonic-value key="setup" class="font-bold"></sonic-value><br>
|
|
99
|
-
<sonic-value key="delivery"></sonic-value>
|
|
100
|
-
</div>
|
|
101
|
-
</template>
|
|
102
|
-
</sonic-queue>
|
|
103
|
-
</template>
|
|
104
|
-
</sonic-code>
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
# Fieldset
|
|
2
|
-
|
|
3
|
-
## Variant
|
|
4
|
-
<sonic-code>
|
|
5
|
-
<template>
|
|
6
|
-
<sonic-fieldset variant="default" >
|
|
7
|
-
Default
|
|
8
|
-
</sonic-fieldset>
|
|
9
|
-
<sonic-fieldset variant="ghost" >
|
|
10
|
-
Ghost
|
|
11
|
-
</sonic-fieldset>
|
|
12
|
-
<sonic-fieldset variant="shadow" >
|
|
13
|
-
Shadow
|
|
14
|
-
</sonic-fieldset>
|
|
15
|
-
</template>
|
|
16
|
-
</sonic-code>
|
|
17
|
-
|
|
18
|
-
## Legend
|
|
19
|
-
<sonic-code>
|
|
20
|
-
<template>
|
|
21
|
-
<sonic-fieldset>
|
|
22
|
-
<sonic-legend label="Legend via attribut : label" description="Description via attribut : description">
|
|
23
|
-
</sonic-legend>
|
|
24
|
-
</sonic-fieldset>
|
|
25
|
-
<sonic-fieldset>
|
|
26
|
-
<sonic-legend iconLibrary="iconoir" iconName="pin-alt">
|
|
27
|
-
Custom legend via <b>slot</b>
|
|
28
|
-
<sonic-legend-description>
|
|
29
|
-
Description via composant : sonic-legend-description
|
|
30
|
-
</sonic-legend-description>
|
|
31
|
-
</sonic-legend>
|
|
32
|
-
</sonic-fieldset>
|
|
33
|
-
</template>
|
|
34
|
-
</sonic-code>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
## Short hand
|
|
38
|
-
<sonic-code>
|
|
39
|
-
<template>
|
|
40
|
-
<sonic-fieldset
|
|
41
|
-
label="All props on fieldset tag"
|
|
42
|
-
description="Lorem ipsum dolor sit amet, consectetur adipiscing elit"
|
|
43
|
-
iconLibrary="iconoir"
|
|
44
|
-
iconName="user">
|
|
45
|
-
</sonic-fieldset>
|
|
46
|
-
</template>
|
|
47
|
-
</sonic-code>
|
|
48
|
-
|
|
49
|
-
## Example of use
|
|
50
|
-
<sonic-code>
|
|
51
|
-
<template>
|
|
52
|
-
<sonic-div formDataProvider="user_create">
|
|
53
|
-
<form action="/inscription?lang=fr" method="POST" class="mb-20" accept-charset="UTF-8" id="youpla">
|
|
54
|
-
<sonic-fieldset form="formid" collapsible="true" collapsed="false">
|
|
55
|
-
<sonic-legend iconLibrary="iconoir" iconName="user">
|
|
56
|
-
Informations personnelles
|
|
57
|
-
<span slot="description">Description du fieldset lorem ipsum dolor</span>
|
|
58
|
-
<sonic-pop class="inline-block" slot="suffix">
|
|
59
|
-
<sonic-button shape="circle" variant="ghost">
|
|
60
|
-
<sonic-icon library="iconoir" size="lg" name="more-vert"></sonic-icon
|
|
61
|
-
></sonic-button>
|
|
62
|
-
<sonic-menu slot="content" minWidth="12rem">
|
|
63
|
-
<sonic-menu-item>Mentions légales</sonic-menu-item>
|
|
64
|
-
<sonic-menu-item>Conditions générales d'utilisation</sonic-menu-item>
|
|
65
|
-
</sonic-menu>
|
|
66
|
-
</sonic-pop>
|
|
67
|
-
</sonic-legend>
|
|
68
|
-
<sonic-form-layout>
|
|
69
|
-
<sonic-input autocomplete="family-name" label="Nom" name="nom"></sonic-input>
|
|
70
|
-
<sonic-input autocomplete="given-name" label="Prénom" name="prenom"></sonic-input>
|
|
71
|
-
<sonic-select autocomplete="sex" label="Sexe" name="sexe">
|
|
72
|
-
<option value="" selected="selected">- Sélectionner -</option>
|
|
73
|
-
<option value="-">Je préfère ne pas le dire</option>
|
|
74
|
-
<option value="Homme">Homme</option>
|
|
75
|
-
<option value="Femme">Femme</option>
|
|
76
|
-
</sonic-select>
|
|
77
|
-
<sonic-input autocomplete="bday" label="Date de naissance" name="date_naissance" type="date"></sonic-input>
|
|
78
|
-
<sonic-divider></sonic-divider>
|
|
79
|
-
<sonic-input autocomplete="email" label="e-mail" name="email" type="email"></sonic-input>
|
|
80
|
-
<sonic-input
|
|
81
|
-
autocomplete="email"
|
|
82
|
-
label="Confirmer votre e-mail"
|
|
83
|
-
name="email_confirmation"
|
|
84
|
-
type="email"
|
|
85
|
-
></sonic-input>
|
|
86
|
-
<sonic-input autocomplete="new-password" label="Mot de passe" name="password" type="password"></sonic-input>
|
|
87
|
-
<sonic-input
|
|
88
|
-
autocomplete="new-password"
|
|
89
|
-
label="Confirmer votre mot de passe"
|
|
90
|
-
name="password_confirmation"
|
|
91
|
-
type="password"
|
|
92
|
-
></sonic-input>
|
|
93
|
-
</sonic-form-layout>
|
|
94
|
-
</sonic-fieldset>
|
|
95
|
-
<sonic-fieldset form="formid" collapsible="true" collapsed="false">
|
|
96
|
-
<sonic-legend iconLibrary="iconoir" iconName="pin-alt"> Coordonnées </sonic-legend>
|
|
97
|
-
<sonic-form-layout>
|
|
98
|
-
<sonic-input autocomplete="postal-code" label="Code postal" name="cp"></sonic-input>
|
|
99
|
-
<sonic-input autocomplete="address-level2" label="Ville" name="ville"></sonic-input>
|
|
100
|
-
</sonic-form-layout>
|
|
101
|
-
</sonic-fieldset>
|
|
102
|
-
<div class="">
|
|
103
|
-
<sonic-button submit type="primary">
|
|
104
|
-
<sonic-icon library="iconoir" name="check"></sonic-icon>
|
|
105
|
-
S'inscrire
|
|
106
|
-
</sonic-button>
|
|
107
|
-
<sonic-tooltip class="inline-flex" label="Vous êtes sûr(e) ? 🙄">
|
|
108
|
-
<sonic-button size="sm" variant="ghost"> Continuer sans m'inscrire </sonic-button>
|
|
109
|
-
</sonic-tooltip>
|
|
110
|
-
</div>
|
|
111
|
-
</form>
|
|
112
|
-
<div dataProvider="user_create" class="my-6 text-neutral-600 p-5 rounded-xl shadow-lg">
|
|
113
|
-
<div class="font-bold text-lg text-neutral-400">Submitted informations...</div>
|
|
114
|
-
<div class="text-lg my-2">
|
|
115
|
-
<sonic-value key="nom" class="font-bold"></sonic-value>
|
|
116
|
-
<sonic-value key="prenom"></sonic-value>
|
|
117
|
-
</div>
|
|
118
|
-
<div class="text-sm">
|
|
119
|
-
<sonic-value key="sexe"></sonic-value>
|
|
120
|
-
<sonic-value key="date_naissance"></sonic-value>
|
|
121
|
-
</div>
|
|
122
|
-
<div class="text-sm">
|
|
123
|
-
<sonic-value key="email"></sonic-value>
|
|
124
|
-
<sonic-value key="cp"></sonic-value>
|
|
125
|
-
<sonic-value key="ville"></sonic-value></div>
|
|
126
|
-
</div>
|
|
127
|
-
</sonic-div>
|
|
128
|
-
</template>
|
|
129
|
-
</sonic-code>
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
# Form-actions
|
|
2
|
-
|
|
3
|
-
## Left by default
|
|
4
|
-
|
|
5
|
-
<sonic-code>
|
|
6
|
-
<template>
|
|
7
|
-
<form>
|
|
8
|
-
<sonic-form-layout>
|
|
9
|
-
<sonic-input label="First name"></sonic-input>
|
|
10
|
-
<sonic-input label="Last name"></sonic-input>
|
|
11
|
-
<sonic-form-actions>
|
|
12
|
-
<sonic-button type="success"><sonic-icon name="check" library="iconoir"></sonic-icon> Submit</sonic-button>
|
|
13
|
-
<sonic-button type="danger" variant="ghost"><sonic-icon name="undo" library="iconoir"></sonic-icon> Cancel</sonic-button>
|
|
14
|
-
</sonic-form-actions>
|
|
15
|
-
</sonic-form-layout>
|
|
16
|
-
</form >
|
|
17
|
-
</template>
|
|
18
|
-
</sonic-code>
|
|
19
|
-
|
|
20
|
-
## Justify
|
|
21
|
-
|
|
22
|
-
<sonic-code>
|
|
23
|
-
<template>
|
|
24
|
-
<form>
|
|
25
|
-
<sonic-form-layout>
|
|
26
|
-
<sonic-input label="First name"></sonic-input>
|
|
27
|
-
<sonic-input label="Last name"></sonic-input>
|
|
28
|
-
<sonic-form-actions justify="flex-end">
|
|
29
|
-
<sonic-button type="success"><sonic-icon name="check" library="iconoir"></sonic-icon> Submit</sonic-button>
|
|
30
|
-
<sonic-button type="danger" variant="ghost"><sonic-icon name="undo" library="iconoir"></sonic-icon> Cancel</sonic-button>
|
|
31
|
-
</sonic-form-actions>
|
|
32
|
-
</sonic-form-layout>
|
|
33
|
-
</form >
|
|
34
|
-
</template>
|
|
35
|
-
</sonic-code>
|
|
36
|
-
|
|
37
|
-
## Direction
|
|
38
|
-
|
|
39
|
-
<sonic-code>
|
|
40
|
-
<template>
|
|
41
|
-
<form>
|
|
42
|
-
<sonic-form-layout>
|
|
43
|
-
<sonic-input label="First name"></sonic-input>
|
|
44
|
-
<sonic-input label="Last name"></sonic-input>
|
|
45
|
-
<sonic-form-actions direction="row-reverse">
|
|
46
|
-
<sonic-button type="success"><sonic-icon name="check" library="iconoir"></sonic-icon> Submit</sonic-button>
|
|
47
|
-
<sonic-button type="danger" variant="ghost"><sonic-icon name="undo" library="iconoir"></sonic-icon> Cancel</sonic-button>
|
|
48
|
-
</sonic-form-actions>
|
|
49
|
-
</sonic-form-layout>
|
|
50
|
-
</form >
|
|
51
|
-
</template>
|
|
52
|
-
</sonic-code>
|
|
53
|
-
|
|
54
|
-
## Center
|
|
55
|
-
|
|
56
|
-
<sonic-code>
|
|
57
|
-
<template>
|
|
58
|
-
<form>
|
|
59
|
-
<sonic-form-layout>
|
|
60
|
-
<sonic-input label="First name"></sonic-input>
|
|
61
|
-
<sonic-input label="Last name"></sonic-input>
|
|
62
|
-
<sonic-form-actions justify="center" >
|
|
63
|
-
<sonic-button type="info" minWidth="12rem">
|
|
64
|
-
<sonic-icon name="nav-arrow-left" library="iconoir" slot="prefix"></sonic-icon>
|
|
65
|
-
Left seats
|
|
66
|
-
</sonic-button>
|
|
67
|
-
<sonic-divider vertical></sonic-divider>
|
|
68
|
-
<sonic-button type="info" minWidth="12rem">
|
|
69
|
-
<sonic-icon name="nav-arrow-right" library="iconoir" slot="suffix"></sonic-icon>
|
|
70
|
-
Right seats
|
|
71
|
-
</sonic-button>
|
|
72
|
-
</sonic-form-actions>
|
|
73
|
-
</sonic-form-layout>
|
|
74
|
-
</form >
|
|
75
|
-
</template>
|
|
76
|
-
</sonic-code>
|
|
77
|
-
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Form-layout
|
|
2
|
-
|
|
3
|
-
<sonic-code>
|
|
4
|
-
<template>
|
|
5
|
-
<form>
|
|
6
|
-
<sonic-form-layout>
|
|
7
|
-
<sonic-input autocomplete="family-name" label="Nom" name="nom"></sonic-input>
|
|
8
|
-
<sonic-input autocomplete="given-name" label="Prénom" name="prenom"></sonic-input>
|
|
9
|
-
<sonic-select autocomplete="sex" label="Sexe" name="sexe">
|
|
10
|
-
<option value="" selected="selected">- Sélectionner -</option>
|
|
11
|
-
<option value="-">Je préfère ne pas le dire</option>
|
|
12
|
-
<option value="Homme">Homme</option>
|
|
13
|
-
<option value="Femme">Femme</option>
|
|
14
|
-
</sonic-select>
|
|
15
|
-
<sonic-input autocomplete="bday" label="Date de naissance" name="date_naissance" type="date"></sonic-input>
|
|
16
|
-
<sonic-divider></sonic-divider>
|
|
17
|
-
<sonic-input autocomplete="email" label="e-mail" name="email" type="email"></sonic-input>
|
|
18
|
-
<sonic-input
|
|
19
|
-
autocomplete="email"
|
|
20
|
-
label="Confirmer votre e-mail"
|
|
21
|
-
name="email_confirmation"
|
|
22
|
-
type="email"
|
|
23
|
-
></sonic-input>
|
|
24
|
-
<sonic-input autocomplete="new-password" label="Mot de passe" name="password" type="password"></sonic-input>
|
|
25
|
-
<sonic-input
|
|
26
|
-
autocomplete="new-password"
|
|
27
|
-
label="Confirmer votre mot de passe"
|
|
28
|
-
name="password_confirmation"
|
|
29
|
-
type="password"
|
|
30
|
-
></sonic-input>
|
|
31
|
-
<sonic-divider></sonic-divider>
|
|
32
|
-
<sonic-textarea label="Message" rows="5">
|
|
33
|
-
</sonic-textarea>
|
|
34
|
-
<sonic-switch>Activer une superbe option</sonic-switch>
|
|
35
|
-
<sonic-checkbox>Inscription à la newsletter</sonic-checkbox>
|
|
36
|
-
<sonic-checkbox>J'ai lu et accepte les <sonic-link href="#" class="underline">Conditions générales de ventes</sonic-link></sonic-checkbox>
|
|
37
|
-
<sonic-form-actions>
|
|
38
|
-
<sonic-button type="success">Valider</sonic-button>
|
|
39
|
-
</sonic-form-actions>
|
|
40
|
-
</sonic-form-layout>
|
|
41
|
-
</form >
|
|
42
|
-
</template>
|
|
43
|
-
</sonic-code>
|
|
44
|
-
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
# Input
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
<sonic-button type="info" size="sm" target="_blank" href="https://www.w3schools.com/tags/tag_input.asp#midcontentadcontainer">
|
|
5
|
-
<sonic-icon library="iconoir" name="open-new-window" slot="prefix" ></sonic-icon>
|
|
6
|
-
Native attibutes list
|
|
7
|
-
</sonic-button>
|
|
8
|
-
|
|
9
|
-
## Label
|
|
10
|
-
<sonic-code>
|
|
11
|
-
<template>
|
|
12
|
-
<sonic-input label="Label"></sonic-input>
|
|
13
|
-
</template>
|
|
14
|
-
</sonic-code>
|
|
15
|
-
|
|
16
|
-
## Placeholder
|
|
17
|
-
<sonic-code>
|
|
18
|
-
<template>
|
|
19
|
-
<sonic-input placeholder="placeholder"></sonic-input>
|
|
20
|
-
</template>
|
|
21
|
-
</sonic-code>
|
|
22
|
-
|
|
23
|
-
## Value
|
|
24
|
-
<sonic-code>
|
|
25
|
-
<template>
|
|
26
|
-
<sonic-input value="value"></sonic-input>
|
|
27
|
-
</template>
|
|
28
|
-
</sonic-code>
|
|
29
|
-
|
|
30
|
-
## Required
|
|
31
|
-
<sonic-code>
|
|
32
|
-
<template>
|
|
33
|
-
<sonic-input required type="email" placeholder="you@email.com" label="Feedback on blur"></sonic-input>
|
|
34
|
-
</template>
|
|
35
|
-
</sonic-code>
|
|
36
|
-
|
|
37
|
-
## Description
|
|
38
|
-
<sonic-code>
|
|
39
|
-
<template>
|
|
40
|
-
<sonic-input description="Description goes here" ></sonic-input>
|
|
41
|
-
</template>
|
|
42
|
-
</sonic-code>
|
|
43
|
-
|
|
44
|
-
## Type
|
|
45
|
-
<sonic-button size="2xs" type="info" target="_blank" href="https://www.w3schools.com/html/html_form_input_types.asp">Liste des types</sonic-button>
|
|
46
|
-
|
|
47
|
-
<sonic-code>
|
|
48
|
-
<template>
|
|
49
|
-
<div class="grid gap-3">
|
|
50
|
-
<sonic-input type="text" label="Text">Text</sonic-input>
|
|
51
|
-
<sonic-input type="email" label="Email" placeholder="plop@kiki.com"></sonic-input>
|
|
52
|
-
<sonic-input type="password" label="Password"></sonic-input>
|
|
53
|
-
<sonic-input type="date" label="Date"></sonic-input>
|
|
54
|
-
<sonic-input type="number" label="Number"></sonic-input>
|
|
55
|
-
<sonic-input type="color" label="Color" value="#ffff00"></sonic-input>
|
|
56
|
-
</div>
|
|
57
|
-
</template>
|
|
58
|
-
</sonic-code>
|
|
59
|
-
|
|
60
|
-
## Size
|
|
61
|
-
<sonic-code>
|
|
62
|
-
<template>
|
|
63
|
-
<div class="grid gap-3">
|
|
64
|
-
<sonic-input size="2xs" value="2xs"></sonic-input>
|
|
65
|
-
<sonic-input size="xs" value="xs"></sonic-input>
|
|
66
|
-
<sonic-input size="sm" value="sm"></sonic-input>
|
|
67
|
-
<sonic-input size="md" value="md"></sonic-input>
|
|
68
|
-
<sonic-input value="default"></sonic-input>
|
|
69
|
-
<sonic-input size="lg" value="lg"></sonic-input>
|
|
70
|
-
<sonic-input size="xl" value="xl"></sonic-input>
|
|
71
|
-
<sonic-input size="2xl" value="2xl"></sonic-input>
|
|
72
|
-
</div>
|
|
73
|
-
</template>
|
|
74
|
-
</sonic-code>
|
|
75
|
-
|
|
76
|
-
## List
|
|
77
|
-
<sonic-alert status="error" label="Non fonctionnel" class="mb-4"></sonic-alert>
|
|
78
|
-
|
|
79
|
-
<sonic-code>
|
|
80
|
-
<template>
|
|
81
|
-
<sonic-input list="browsers"></sonic-input>
|
|
82
|
-
<datalist id="browsers">
|
|
83
|
-
<option value="Internet Explorer">
|
|
84
|
-
<option value="Firefox">
|
|
85
|
-
<option value="Google Chrome">
|
|
86
|
-
<option value="Opera">
|
|
87
|
-
<option value="Safari">
|
|
88
|
-
</datalist>
|
|
89
|
-
</template>
|
|
90
|
-
</sonic-code>
|
|
91
|
-
|
|
92
|
-
## Prefix & suffix
|
|
93
|
-
|
|
94
|
-
<sonic-code>
|
|
95
|
-
<template>
|
|
96
|
-
<div class="grid grid-cols-2 gap-3">
|
|
97
|
-
<sonic-input type="search" label="Search" placeholder="Search plane">
|
|
98
|
-
<sonic-icon library="iconoir" name="search" slot="prefix"></sonic-icon>
|
|
99
|
-
</sonic-input>
|
|
100
|
-
<sonic-input type="number" label="Amount" placeholder="0">
|
|
101
|
-
<sonic-icon library="iconoir" name="euro" slot="suffix"></sonic-icon>
|
|
102
|
-
</sonic-input>
|
|
103
|
-
</div>
|
|
104
|
-
</template>
|
|
105
|
-
</sonic-code>
|
|
106
|
-
|
|
107
|
-
## InlineContent
|
|
108
|
-
|
|
109
|
-
<sonic-code>
|
|
110
|
-
<template>
|
|
111
|
-
<div class="grid grid-cols-2 gap-3">
|
|
112
|
-
<sonic-input inlineContent type="search" label="Search icon in input" placeholder="Search plane">
|
|
113
|
-
<sonic-icon library="iconoir" name="search" slot="prefix"></sonic-icon>
|
|
114
|
-
</sonic-input>
|
|
115
|
-
<sonic-input inlineContent type="number" label="Number of seats" placeholder="0">
|
|
116
|
-
<div slot="suffix" class="flex gap-2 items-center">
|
|
117
|
-
<sonic-badge type="danger" size="sm">4 max</sonic-badge>
|
|
118
|
-
<sonic-icon library="iconoir" name="euro" ></sonic-icon>
|
|
119
|
-
</div>
|
|
120
|
-
</sonic-input>
|
|
121
|
-
</div>
|
|
122
|
-
</template>
|
|
123
|
-
</sonic-code>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
## Example of use
|
|
128
|
-
<sonic-code>
|
|
129
|
-
<template>
|
|
130
|
-
<sonic-input
|
|
131
|
-
formDataProvider="input-filter"
|
|
132
|
-
name="contains"
|
|
133
|
-
value="chien"
|
|
134
|
-
class="mb-4"
|
|
135
|
-
></sonic-input>
|
|
136
|
-
<sonic-subscriber dataProvider="input-filter" class="text-xl my-4 block font-bold">
|
|
137
|
-
Blagues trouvées pour "<span data-bind ::inner-html="$contains"></span>" :
|
|
138
|
-
</sonic-subscriber>
|
|
139
|
-
<sonic-queue
|
|
140
|
-
lazyload
|
|
141
|
-
dataProviderExpression="joke/Any?amount=10&lang=fr"
|
|
142
|
-
dataFilterProvider="input-filter"
|
|
143
|
-
serviceURL="https://v2.jokeapi.dev"
|
|
144
|
-
key="jokes"
|
|
145
|
-
>
|
|
146
|
-
<template>
|
|
147
|
-
<div class="border-0 border-b-[1px] border-b-neutral-300 border-dotted py-3">
|
|
148
|
-
<div data-bind ::inner-html="$joke"></div>
|
|
149
|
-
<div data-bind ::inner-html="$setup"></div>
|
|
150
|
-
<div data-bind ::inner-html="$delivery"></div>
|
|
151
|
-
</div>
|
|
152
|
-
</template>
|
|
153
|
-
</sonic-queue>
|
|
154
|
-
</template>
|
|
155
|
-
</sonic-code>
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
<sonic-code>
|
|
159
|
-
<template>
|
|
160
|
-
<sonic-input type="search" placeholder="Search plane" class="inline-block">
|
|
161
|
-
</sonic-input>
|
|
162
|
-
<sonic-button type="danger" label="Amount" placeholder="0">azdazd
|
|
163
|
-
</sonic-button>
|
|
164
|
-
</template>
|
|
165
|
-
</sonic-code>
|
|
166
|
-
|
|
167
|
-
<!-- <sonic-input type="password" inlineContent size="2xl"><span slot="suffix">PLOP</span></sonic-input> -->
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
# Input-autocomplete
|
|
2
|
-
|
|
3
|
-
The input-autocomplete component brings input and queue together in order to create a suggest behavior. This is why this component is partially configured as a form [input](#core/components/ui/form/input/input.md/input) and as a [queue](#core/components/functional/queue/queue.md/queue).
|
|
4
|
-
|
|
5
|
-
Please note that only basic text input params and methods are implemented at this time. You should also be sure to understand the behavior of a [queue](#core/components/functional/queue/queue.md/queue) in order to take full advantage of the input-autocomplete component.
|
|
6
|
-
|
|
7
|
-
Here are some of the features of the input-autocomplete component:
|
|
8
|
-
|
|
9
|
-
* It provides a suggest behavior, where the user can type a few letters and the component will suggest possible matches.
|
|
10
|
-
* It can be used with a variety of data providers, such as an API.
|
|
11
|
-
* It is fully customizable, so you can change the look and feel of the component to match your needs.
|
|
12
|
-
|
|
13
|
-
If you are looking for a component to provide a suggest behavior, the input-autocomplete component is a good option.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## Simple Example
|
|
18
|
-
|
|
19
|
-
In this example, the input will use its name as the search parameter when calling the service responsible for autocompletion.
|
|
20
|
-
|
|
21
|
-
The template is used to render the list items of results.
|
|
22
|
-
The list items are responsible for making a selection.
|
|
23
|
-
|
|
24
|
-
This time, we added buttons with the same name as the input while keeping the same data provider.
|
|
25
|
-
The result is that when you select an item, the input takes the value of the selected item, completing the classic suggest behavior.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<sonic-code>
|
|
29
|
-
<template>
|
|
30
|
-
<sonic-input-autocomplete
|
|
31
|
-
class="w-64"
|
|
32
|
-
label="A french city name"
|
|
33
|
-
formDataProvider="autoComplete-example-base"
|
|
34
|
-
name="nom"
|
|
35
|
-
propertyName="bloop"
|
|
36
|
-
placeholder="Paris, Lyon, Tours, ..."
|
|
37
|
-
serviceurl="https://geo.api.gouv.fr"
|
|
38
|
-
dataproviderexpression="communes?limit=5&boost=population"
|
|
39
|
-
>
|
|
40
|
-
<template>
|
|
41
|
-
<sonic-menu-item debug radio name="nom" data-bind ::inner-html="$nom" ::value="$nom"></sonic-menu-item>
|
|
42
|
-
</template>
|
|
43
|
-
</sonic-input-autocomplete>
|
|
44
|
-
</template>
|
|
45
|
-
</sonic-code>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
## Value different from search parameter
|
|
49
|
-
|
|
50
|
-
In this example, the search parameter is separated from the name of the input. This means that the input will use the name "nom" as the search parameter, but the form data provider will be filled with the data named "siren" from the selected list item.
|
|
51
|
-
|
|
52
|
-
To do this, we need to use the `searchParam` attribute on the input element. This attribute specifies the name of the search parameter that will be used.
|
|
53
|
-
|
|
54
|
-
We also need to use the `name` and `value` attribute on the list items. This attribute specifies the value of the data provider that will be used for the selected list item.
|
|
55
|
-
|
|
56
|
-
By using these attributes, we can separate the search parameter from the name of the input and still fill the form data provider with the data from the selected list item.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<sonic-code>
|
|
60
|
-
<template>
|
|
61
|
-
<sonic-input-autocomplete
|
|
62
|
-
class="w-64"
|
|
63
|
-
label="A french city name"
|
|
64
|
-
formDataProvider="autoComplete-example"
|
|
65
|
-
name="siren"
|
|
66
|
-
value="212703771"
|
|
67
|
-
placeholder="Paris, Lyon, Tours, ..."
|
|
68
|
-
serviceurl="https://geo.api.gouv.fr"
|
|
69
|
-
dataproviderexpression="communes?limit=5&boost=population"
|
|
70
|
-
searchParameter="nom"
|
|
71
|
-
>
|
|
72
|
-
<template>
|
|
73
|
-
<sonic-menu-item debug radio name="siren" data-bind ::inner-html="$nom" ::value="$siren"></sonic-menu-item>
|
|
74
|
-
</template>
|
|
75
|
-
</sonic-input-autocomplete>
|
|
76
|
-
</template>
|
|
77
|
-
</sonic-code>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
## Select autocomplete / value different from search parameter
|
|
81
|
-
|
|
82
|
-
This example is the same as the previous one, except that the `select` attribute is used. This attribute changes the look and feel of the component slightly.
|
|
83
|
-
|
|
84
|
-
Now the text is less free because, you must select either something from the list given by the service, or nothing else.
|
|
85
|
-
|
|
86
|
-
The following code shows how to use the `select` attribute in an autocomplete input:
|
|
87
|
-
|
|
88
|
-
<sonic-code>
|
|
89
|
-
<template>
|
|
90
|
-
<sonic-input-autocomplete
|
|
91
|
-
select
|
|
92
|
-
class="w-64"
|
|
93
|
-
label="A french city name"
|
|
94
|
-
formDataProvider="autoComplete-example2"
|
|
95
|
-
name="siren"
|
|
96
|
-
value="212703771"
|
|
97
|
-
placeholder="Paris, Lyon, Tours, ..."
|
|
98
|
-
serviceurl="https://geo.api.gouv.fr"
|
|
99
|
-
dataproviderexpression="communes?limit=5&boost=population"
|
|
100
|
-
searchParameter="nom"
|
|
101
|
-
>
|
|
102
|
-
<template>
|
|
103
|
-
<sonic-menu-item debug radio name="siren" data-bind ::inner-html="$nom" ::value="$siren"></sonic-menu-item>
|
|
104
|
-
</template>
|
|
105
|
-
</sonic-input-autocomplete>
|
|
106
|
-
</template>
|
|
107
|
-
</sonic-code>
|
|
108
|
-
|
|
109
|
-
## keyboard navigation
|
|
110
|
-
|
|
111
|
-
At the moment you can enable keyboard up/down by adding an attribut "data-keyboard-nav" on the component and its listItems
|
|
112
|
-
|
|
113
|
-
<sonic-code>
|
|
114
|
-
<template>
|
|
115
|
-
<sonic-input-autocomplete
|
|
116
|
-
class="w-64"
|
|
117
|
-
label="A french city name"
|
|
118
|
-
formDataProvider="autoComplete-example-keyboard"
|
|
119
|
-
name="nom"
|
|
120
|
-
data-keyboard-nav="nav-autocomplete"
|
|
121
|
-
placeholder="Paris, Lyon, Tours, ..."
|
|
122
|
-
serviceurl="https://geo.api.gouv.fr"
|
|
123
|
-
dataproviderexpression="communes?limit=60&boost=population"
|
|
124
|
-
>
|
|
125
|
-
<template>
|
|
126
|
-
<sonic-menu-item debug radio name="nom" data-keyboard-nav="nav-autocomplete" data-bind ::inner-html="$nom" ::value="$nom"></sonic-menu-item>
|
|
127
|
-
</template>
|
|
128
|
-
</sonic-input-autocomplete>
|
|
129
|
-
</template>
|
|
130
|
-
</sonic-code>
|
|
131
|
-
|