@supersoniks/concorde 3.0.3 → 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.
Files changed (69) hide show
  1. package/docs/assets/index--bDsd7qW.css +1 -0
  2. package/docs/assets/index-3W2s1DcY.js +4040 -0
  3. package/docs/assets/index-B-7rKIow.js +4040 -0
  4. package/docs/assets/index-BJY63wEA.js +4040 -0
  5. package/docs/assets/index-BXaJoTcR.js +4040 -0
  6. package/docs/assets/index-NCT3BKv0.js +4040 -0
  7. package/docs/assets/index-PbOx6NxY.js +4040 -0
  8. package/docs/assets/index-cNBBlbBt.js +4040 -0
  9. package/docs/assets/index-gx6CCJoi.js +4040 -0
  10. package/docs/assets/index-l8XRMBvs.js +4040 -0
  11. package/docs/css/docs.css +0 -0
  12. package/docs/img/concorde-logo.svg +1 -0
  13. package/docs/img/concorde.png +0 -0
  14. package/docs/img/concorde_def.png +0 -0
  15. package/docs/index.html +132 -0
  16. package/docs/src/core/components/functional/date/date.md +290 -0
  17. package/docs/src/core/components/functional/fetch/fetch.md +117 -0
  18. package/docs/src/core/components/functional/if/if.md +16 -0
  19. package/docs/src/core/components/functional/list/list.md +194 -0
  20. package/docs/src/core/components/functional/mix/mix.md +41 -0
  21. package/docs/src/core/components/functional/queue/queue.md +87 -0
  22. package/docs/src/core/components/functional/router/router.md +112 -0
  23. package/docs/src/core/components/functional/sdui/default-library.json +108 -0
  24. package/docs/src/core/components/functional/sdui/example.json +99 -0
  25. package/docs/src/core/components/functional/sdui/sdui.md +356 -0
  26. package/docs/src/core/components/functional/states/states.md +87 -0
  27. package/docs/src/core/components/functional/submit/submit.md +48 -0
  28. package/docs/src/core/components/functional/subscriber/subscriber.md +91 -0
  29. package/docs/src/core/components/functional/value/value.md +35 -0
  30. package/docs/src/core/components/ui/alert/alert.md +121 -0
  31. package/docs/src/core/components/ui/badge/badge.md +102 -0
  32. package/docs/src/core/components/ui/button/button.md +184 -0
  33. package/docs/src/core/components/ui/captcha/captcha.md +12 -0
  34. package/docs/src/core/components/ui/card/card.md +96 -0
  35. package/docs/src/core/components/ui/divider/divider.md +35 -0
  36. package/docs/src/core/components/ui/form/checkbox/checkbox.md +96 -0
  37. package/docs/src/core/components/ui/form/fieldset/fieldset.md +129 -0
  38. package/docs/src/core/components/ui/form/form-actions/form-actions.md +77 -0
  39. package/docs/src/core/components/ui/form/form-layout/form-layout.md +43 -0
  40. package/docs/src/core/components/ui/form/input/input.md +168 -0
  41. package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +130 -0
  42. package/docs/src/core/components/ui/form/radio/radio.md +86 -0
  43. package/docs/src/core/components/ui/form/select/select.md +99 -0
  44. package/docs/src/core/components/ui/form/textarea/textarea.md +66 -0
  45. package/docs/src/core/components/ui/group/group.md +75 -0
  46. package/docs/src/core/components/ui/icon/icon.md +125 -0
  47. package/docs/src/core/components/ui/icon/icons.json +1 -0
  48. package/docs/src/core/components/ui/image/image.md +107 -0
  49. package/docs/src/core/components/ui/link/link.md +43 -0
  50. package/docs/src/core/components/ui/loader/loader.md +37 -0
  51. package/docs/src/core/components/ui/menu/menu.md +288 -0
  52. package/docs/src/core/components/ui/modal/modal.md +123 -0
  53. package/docs/src/core/components/ui/pop/pop.md +79 -0
  54. package/docs/src/core/components/ui/progress/progress.md +65 -0
  55. package/docs/src/core/components/ui/table/table.md +467 -0
  56. package/docs/src/core/components/ui/tooltip/tooltip.md +37 -0
  57. package/docs/src/docs/_core-concept/overview.md +57 -0
  58. package/docs/src/docs/_core-concept/subscriber.md +76 -0
  59. package/docs/src/docs/_getting-started/concorde-outside.md +141 -0
  60. package/docs/src/docs/_getting-started/create-a-component.md +137 -0
  61. package/docs/src/docs/_getting-started/pubsub.md +150 -0
  62. package/docs/src/docs/_getting-started/start.md +37 -0
  63. package/docs/src/docs/_getting-started/theming.md +91 -0
  64. package/docs/src/docs/search/docs-search.json +3737 -0
  65. package/docs/src/tag-list.json +1 -0
  66. package/docs/src/tsconfig.json +113 -0
  67. package/docs/svg/regular/plane.svg +1 -0
  68. package/docs/svg/solid/plane.svg +1 -0
  69. package/package.json +1 -1
@@ -0,0 +1,129 @@
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>
@@ -0,0 +1,77 @@
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
+
@@ -0,0 +1,43 @@
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-checkbox>Inscription à la newsletter</sonic-checkbox>
35
+ <sonic-checkbox>J'ai lu et accepte les <sonic-link href="#" class="underline">Conditions générales de ventes</sonic-link></sonic-checkbox>
36
+ <sonic-form-actions>
37
+ <sonic-button type="success">Valider</sonic-button>
38
+ </sonic-form-actions>
39
+ </sonic-form-layout>
40
+ </form >
41
+ </template>
42
+ </sonic-code>
43
+
@@ -0,0 +1,168 @@
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-4 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-theme color background theme=${theme} class="p-8">
131
+ <sonic-input
132
+ formDataProvider="input-filter"
133
+ name="contains"
134
+ value="chien"
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
+ </sonic-theme>
155
+ </template>
156
+ </sonic-code>
157
+
158
+
159
+ <sonic-code>
160
+ <template>
161
+ <sonic-input type="search" placeholder="Search plane" class="inline-block">
162
+ </sonic-input>
163
+ <sonic-button type="danger" label="Amount" placeholder="0">azdazd
164
+ </sonic-button>
165
+ </template>
166
+ </sonic-code>
167
+
168
+ <!-- <sonic-input type="password" inlineContent size="2xl"><span slot="suffix">PLOP</span></sonic-input> -->
@@ -0,0 +1,130 @@
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
+ placeholder="Paris, Lyon, Tours, ..."
36
+ serviceurl="https://geo.api.gouv.fr"
37
+ dataproviderexpression="communes?limit=5&boost=population"
38
+ >
39
+ <template>
40
+ <sonic-menu-item debug radio name="nom" data-bind ::inner-html="$nom" ::value="$nom"></sonic-menu-item>
41
+ </template>
42
+ </sonic-input-autocomplete>
43
+ </template>
44
+ </sonic-code>
45
+
46
+
47
+ ## Value different from search parameter
48
+
49
+ 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.
50
+
51
+ 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.
52
+
53
+ 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.
54
+
55
+ 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.
56
+
57
+
58
+ <sonic-code>
59
+ <template>
60
+ <sonic-input-autocomplete
61
+ class="w-64"
62
+ label="A french city name"
63
+ formDataProvider="autoComplete-example"
64
+ name="siren"
65
+ value="212703771"
66
+ placeholder="Paris, Lyon, Tours, ..."
67
+ serviceurl="https://geo.api.gouv.fr"
68
+ dataproviderexpression="communes?limit=5&boost=population"
69
+ searchParameter="nom"
70
+ >
71
+ <template>
72
+ <sonic-menu-item debug radio name="siren" data-bind ::inner-html="$nom" ::value="$siren"></sonic-menu-item>
73
+ </template>
74
+ </sonic-input-autocomplete>
75
+ </template>
76
+ </sonic-code>
77
+
78
+
79
+ ## Select autocomplete / value different from search parameter
80
+
81
+ 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.
82
+
83
+ Now the text is less free because, you must select either something from the list given by the service, or nothing else.
84
+
85
+ The following code shows how to use the `select` attribute in an autocomplete input:
86
+
87
+ <sonic-code>
88
+ <template>
89
+ <sonic-input-autocomplete
90
+ select
91
+ class="w-64"
92
+ label="A french city name"
93
+ formDataProvider="autoComplete-example2"
94
+ name="siren"
95
+ value="212703771"
96
+ placeholder="Paris, Lyon, Tours, ..."
97
+ serviceurl="https://geo.api.gouv.fr"
98
+ dataproviderexpression="communes?limit=5&boost=population"
99
+ searchParameter="nom"
100
+ >
101
+ <template>
102
+ <sonic-menu-item debug radio name="siren" data-bind ::inner-html="$nom" ::value="$siren"></sonic-menu-item>
103
+ </template>
104
+ </sonic-input-autocomplete>
105
+ </template>
106
+ </sonic-code>
107
+
108
+ ## keyboard navigation
109
+
110
+ At the moment you can enable keyboard up/down by adding an attribut "data-keyboard-nav" on the component and its listItems
111
+
112
+ <sonic-code>
113
+ <template>
114
+ <sonic-input-autocomplete
115
+ class="w-64"
116
+ label="A french city name"
117
+ formDataProvider="autoComplete-example-keyboard"
118
+ name="nom"
119
+ data-keyboard-nav="nav-autocomplete"
120
+ placeholder="Paris, Lyon, Tours, ..."
121
+ serviceurl="https://geo.api.gouv.fr"
122
+ dataproviderexpression="communes?limit=60&boost=population"
123
+ >
124
+ <template>
125
+ <sonic-menu-item debug radio name="nom" data-keyboard-nav="nav-autocomplete" data-bind ::inner-html="$nom" ::value="$nom"></sonic-menu-item>
126
+ </template>
127
+ </sonic-input-autocomplete>
128
+ </template>
129
+ </sonic-code>
130
+
@@ -0,0 +1,86 @@
1
+ # Radio
2
+
3
+ ## Size
4
+ <sonic-code>
5
+ <template>
6
+ <div class="grid gap-2" formDataProvider="radioSizeExemple">
7
+ <sonic-radio name="size" value="2xs" size="2xs">2xs radio</sonic-radio>
8
+ <sonic-radio name="size" value="xs" size="xs">xs radio</sonic-radio>
9
+ <sonic-radio name="size" value="sm" size="sm">sm radio</sonic-radio>
10
+ <sonic-radio name="size" value="default" >default radio</sonic-radio>
11
+ <sonic-radio name="size" value="lg" size="lg">lg radio</sonic-radio>
12
+ <sonic-radio name="size" value="xl" size="xl">xl radio</sonic-radio>
13
+ <sonic-radio name="size" value="2xl" size="2xl">2xl radio</sonic-radio>
14
+ </div>
15
+ </template>
16
+ </sonic-code>
17
+
18
+ ## Checked
19
+ <sonic-code>
20
+ <template>
21
+ <sonic-radio checked
22
+ >Already checked radio
23
+ </sonic-radio>
24
+ </template>
25
+ </sonic-code>
26
+
27
+ ## Disabled
28
+ <sonic-code>
29
+ <template>
30
+ <sonic-radio disabled
31
+ >Disabled radio
32
+ </sonic-radio>
33
+ </template>
34
+ </sonic-code>
35
+
36
+ ## Disabled and checked
37
+ <sonic-code>
38
+ <template>
39
+ <sonic-radio disabled checked
40
+ >Disabled but already checked radio
41
+ </sonic-radio>
42
+ </template>
43
+ </sonic-code>
44
+
45
+ ## radio with link
46
+ <sonic-code>
47
+ <template>
48
+ <sonic-radio name="link" value="link">radio with <sonic-link href="#" class="underline text-info">link</sonic-link>
49
+ </template>
50
+ </sonic-code>
51
+
52
+
53
+ ## Example of use
54
+ <sonic-code>
55
+ <template>
56
+ <sonic-theme color background theme=${theme} class="p-8">
57
+ <sonic-subscriber dataProvider="jokeFilterRadio" class="text-xl my-4 block font-bold">
58
+ Remove following jokes :
59
+ <sonic-value key="blacklistFlags" class="block text-sm"></sonic-value>
60
+ </sonic-subscriber>
61
+ <div formDataProvider="jokeFilterRadio" class="grid grid-cols-2 lg:grid-cols-3 gap-x-6 gap-y-2 mt-2 mb-3">
62
+ <sonic-radio name="blacklistFlags" value="nsfw">nsfw</sonic-radio>
63
+ <sonic-radio name="blacklistFlags" value="religious">religious</sonic-radio>
64
+ <sonic-radio name="blacklistFlags" value="political">political</sonic-radio>
65
+ <sonic-radio name="blacklistFlags" value="racist" checked >racist</sonic-radio>
66
+ <sonic-radio name="blacklistFlags" value="sexist" >sexist</sonic-radio>
67
+ <sonic-radio name="blacklistFlags" value="explicit">explicit</sonic-radio>
68
+ </div>
69
+ <sonic-queue
70
+ lazyload
71
+ dataProviderExpression="joke/Any?amount=10&lang=en"
72
+ dataFilterProvider="jokeFilterRadio"
73
+ serviceURL="https://v2.jokeapi.dev"
74
+ key="jokes"
75
+ >
76
+ <template>
77
+ <div class="border-0 border-b-[1px] border-b-neutral-300 py-3 leading-tight">
78
+ <sonic-value key="joke"></sonic-value>
79
+ <sonic-value key="setup" class="font-bold"></sonic-value><br>
80
+ <sonic-value key="delivery"></sonic-value>
81
+ </div>
82
+ </template>
83
+ </sonic-queue>
84
+ </sonic-theme>
85
+ </template>
86
+ </sonic-code>