@cnamts/synapse 0.0.4-alpha → 0.0.5-alpha
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/dist/design-system-v3.d.ts +932 -224
- package/dist/design-system-v3.js +3374 -1502
- package/dist/design-system-v3.umd.cjs +6 -6
- package/dist/style.css +1 -1
- package/package.json +2 -1
- package/src/assets/tokens.scss +0 -1
- package/src/components/Alert/Accessibilite.mdx +14 -0
- package/src/components/Alert/Accessibilite.stories.ts +166 -0
- package/src/components/Alert/AccessibiliteItems.ts +152 -0
- package/src/components/Alert/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/BackBtn/Accessibilite.mdx +14 -0
- package/src/components/BackBtn/Accessibilite.stories.ts +166 -0
- package/src/components/BackBtn/AccessibiliteItems.ts +132 -0
- package/src/components/BackBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/BackToTopBtn/Accessibilite.mdx +14 -0
- package/src/components/BackToTopBtn/Accessibilite.stories.ts +166 -0
- package/src/components/BackToTopBtn/AccessibiliteItems.ts +82 -0
- package/src/components/BackToTopBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/CollapsibleList/Accessibilite.mdx +14 -0
- package/src/components/CollapsibleList/Accessibilite.stories.ts +166 -0
- package/src/components/CollapsibleList/AccessibiliteItems.ts +129 -0
- package/src/components/CollapsibleList/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/CopyBtn/Accessibilite.mdx +14 -0
- package/src/components/CopyBtn/Accessibilite.stories.ts +166 -0
- package/src/components/CopyBtn/AccessibiliteItems.ts +135 -0
- package/src/components/CopyBtn/config.ts +2 -0
- package/src/components/CopyBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.mdx +44 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.stories.ts +606 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.vue +246 -0
- package/src/components/Customs/SyBtnSelect/tests/SyBtnSelect.spec.ts +168 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.mdx +40 -0
- package/src/components/Customs/{CustomInputSelect/CustomInputSelect.stories.ts → SyInputSelect/SyInputSelect.stories.ts} +29 -29
- package/src/components/Customs/{CustomInputSelect/CustomInputSelect.vue → SyInputSelect/SyInputSelect.vue} +10 -2
- package/src/components/Customs/SyInputSelect/tests/SyInputSelect.spec.ts +140 -0
- package/src/components/Customs/{CustomSelect/CustomSelect.mdx → SySelect/SySelect.mdx} +8 -8
- package/src/components/Customs/{CustomSelect/CustomSelect.stories.ts → SySelect/SySelect.stories.ts} +25 -25
- package/src/components/Customs/{CustomSelect/CustomSelect.vue → SySelect/SySelect.vue} +9 -5
- package/src/components/Customs/{CustomInputSelect/tests/CustomInputSelect.spec.ts → SySelect/tests/SySelect.spec.ts} +48 -71
- package/src/components/Customs/SyTextField/SyTextField.mdx +44 -0
- package/src/components/Customs/{CustomTextField/CustomTextField.stories.ts → SyTextField/SyTextField.stories.ts} +34 -34
- package/src/components/Customs/{CustomTextField/tests/CustomTextField.spec.ts → SyTextField/tests/SyTextField.spec.ts} +3 -3
- package/src/components/Customs/{CustomTextField/tests/__snapshots__/CustomTextField.spec.ts.snap → SyTextField/tests/__snapshots__/SyTextField.spec.ts.snap} +3 -5
- package/src/components/DialogBox/DialogBox.mdx +14 -0
- package/src/components/DialogBox/DialogBox.stories.ts +798 -0
- package/src/components/DialogBox/DialogBox.vue +181 -0
- package/src/components/DialogBox/config.ts +25 -0
- package/src/components/DialogBox/locales.ts +5 -0
- package/src/components/DialogBox/tests/DialogBox.spec.ts +329 -0
- package/src/components/DialogBox/tests/__snapshots__/DialogBox.spec.ts.snap +46 -0
- package/src/components/ErrorPage/ErrorPage.mdx +21 -0
- package/src/components/ErrorPage/ErrorPage.stories.ts +133 -0
- package/src/components/ErrorPage/ErrorPage.vue +93 -0
- package/src/components/ErrorPage/locales.ts +5 -0
- package/src/components/ErrorPage/tests/ErrorPage.spec.ts +40 -0
- package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +78 -0
- package/src/components/FooterBar/FooterBar.stories.ts +556 -8
- package/src/components/FooterBar/config.ts +2 -3
- package/src/components/FooterBar/tests/FooterBar.spec.ts +1 -1
- package/src/components/FooterBar/tests/FooterBarConfig.spec.ts +1 -1
- package/src/components/FooterBar/tests/__snapshots__/FooterBar.spec.ts.snap +2 -2
- package/src/components/FranceConnectBtn/Accessibilite.mdx +14 -0
- package/src/components/FranceConnectBtn/Accessibilite.stories.ts +194 -0
- package/src/components/FranceConnectBtn/AccessibiliteItems.ts +199 -0
- package/src/components/FranceConnectBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/HeaderBar/HeaderBar.stories.ts +60 -2
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.mdx +6 -6
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +1 -1
- package/src/components/HeaderToolbar/HeaderToolbar.vue +2 -2
- package/src/components/HeaderToolbar/tests/HeaderToolbar.spec.ts +36 -2
- package/src/components/LangBtn/Accessibilite.mdx +14 -0
- package/src/components/LangBtn/Accessibilite.stories.ts +166 -0
- package/src/components/LangBtn/AccessibiliteItems.ts +132 -0
- package/src/components/LangBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/LangBtn/tests/LangBtn.spec.ts +1 -1
- package/src/components/LangBtn/tests/__snapshots__/LangBtn.spec.ts.snap +1 -1
- package/src/components/MaintenancePage/MaintenancePage.mdx +11 -0
- package/src/components/MaintenancePage/MaintenancePage.stories.ts +41 -0
- package/src/components/MaintenancePage/MaintenancePage.vue +25 -0
- package/src/components/MaintenancePage/assets/maintenance.svg +1 -0
- package/src/components/MaintenancePage/index.ts +3 -0
- package/src/components/MaintenancePage/locales.ts +5 -0
- package/src/components/MaintenancePage/tests/MaintenancePage.spec.ts +12 -0
- package/src/components/MaintenancePage/tests/__snapshots__/MaintenancePage.spec.ts.snap +3 -0
- package/src/components/NotFoundPage/NotFoundPage.mdx +19 -0
- package/src/components/NotFoundPage/NotFoundPage.stories.ts +76 -0
- package/src/components/NotFoundPage/NotFoundPage.vue +52 -0
- package/src/components/NotFoundPage/assets/not-found.svg +1 -0
- package/src/components/NotFoundPage/locales.ts +6 -0
- package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +38 -0
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +76 -0
- package/src/components/NotificationBar/Accessibilite.mdx +14 -0
- package/src/components/NotificationBar/Accessibilite.stories.ts +166 -0
- package/src/components/NotificationBar/AccessibiliteItems.ts +174 -0
- package/src/components/NotificationBar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/NotificationBar/options.ts +1 -0
- package/src/components/PageContainer/Accessibilite.mdx +14 -0
- package/src/components/PageContainer/Accessibilite.stories.ts +166 -0
- package/src/components/PageContainer/AccessibiliteItems.ts +52 -0
- package/src/components/PageContainer/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/PhoneField/PhoneField.vue +5 -5
- package/src/components/PhoneField/tests/PhoneField.spec.ts +3 -3
- package/src/components/SkipLink/Accessibilite.mdx +14 -0
- package/src/components/SkipLink/Accessibilite.stories.ts +167 -0
- package/src/components/SkipLink/AccessibiliteItems.ts +77 -0
- package/src/components/SkipLink/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +17 -13
- package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +2 -1
- package/src/components/SocialMediaLinks/tests/SocialMediaLinks.spec.ts +1 -1
- package/src/components/SocialMediaLinks/tests/__snapshots__/SocialMediaLinks.spec.ts.snap +2 -2
- package/src/components/SubHeader/SubHeader.vue +1 -1
- package/src/components/UserMenuBtn/UserMenuBtn.mdx +35 -0
- package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +438 -0
- package/src/components/UserMenuBtn/UserMenuBtn.vue +105 -0
- package/src/components/UserMenuBtn/config.ts +24 -0
- package/src/components/UserMenuBtn/tests/UserMenuBtn.spec.ts +125 -0
- package/src/components/index.ts +12 -3
- package/src/composables/index.ts +8 -0
- package/src/composables/rules/tests/useFieldValidation.spec.ts +82 -0
- package/src/composables/rules/useFieldValidation.ts +53 -0
- package/src/designTokens/index.ts +2 -0
- package/src/designTokens/tokens/cnam/cnamDarkTheme.ts +5 -0
- package/src/designTokens/tokens/cnam/cnamLightTheme.ts +1 -0
- package/src/main.ts +2 -0
- package/src/stories/Fondamentaux/Arrondis.mdx +24 -0
- package/src/stories/{Guidelines → Fondamentaux}/Colors.mdx +1 -1
- package/src/stories/Fondamentaux/Conteneurs.mdx +7 -0
- package/src/stories/Fondamentaux/CustomisationEtThemes.mdx +7 -0
- package/src/stories/Fondamentaux/Elevations.mdx +14 -0
- package/src/stories/Fondamentaux/Espacements.mdx +29 -0
- package/src/stories/{Guidelines → Fondamentaux}/Introduction.mdx +1 -1
- package/src/stories/Fondamentaux/StylesTypographiques.mdx +33 -0
- package/src/stories/Fondamentaux/Typographie.mdx +58 -0
- package/src/stories/GuideDuDev/CommentUtiliserLesRules.mdx +132 -0
- package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/Accessibilite.stories.ts +1 -1
- package/src/stories/{Fondamentaux → Guidelines}/EcoConception/Econception.stories.ts +2 -2
- package/src/components/Customs/CustomInputSelect/CustomInputSelect.mdx +0 -40
- package/src/components/Customs/CustomSelect/tests/CustomSelect.spec.ts +0 -236
- package/src/components/Customs/CustomTextField/CustomTextField.mdx +0 -44
- package/src/stories/Guidelines/CustomisationEtThemes.mdx +0 -3
- package/src/stories/Guidelines/Typo.mdx +0 -53
- /package/src/components/Customs/{CustomInputSelect → SyInputSelect}/config.ts +0 -0
- /package/src/components/Customs/{CustomTextField/CustomTextField.vue → SyTextField/SyTextField.vue} +0 -0
- /package/src/components/Customs/{CustomTextField → SyTextField}/types.d.ts +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/Accessibilite.mdx +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/AccessibiliteItems.ts +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/constants/ExpertiseLevelEnum.ts +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/constants/RGAALevelEnum.ts +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/EcoConception/EcoConception.mdx +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/EcoConception/ecoDesignItems.ts +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Meta, Canvas, Controls, Source } from '@storybook/blocks';
|
|
2
|
+
import * as SyTextFieldStories from "./SyTextField.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={SyTextFieldStories} />
|
|
5
|
+
|
|
6
|
+
# SyTextField
|
|
7
|
+
|
|
8
|
+
Le composant `SyTextField` est utilisé pour proposer une alternative au `TextField` de Vuetify, conforme au style du Design System et qui respecte les règles d'accessibilité RGAA.
|
|
9
|
+
|
|
10
|
+
<Canvas of={SyTextFieldStories.Default} />
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# API
|
|
14
|
+
|
|
15
|
+
<Controls of={SyTextFieldStories.Default} />
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# Exemple d'utilisation
|
|
19
|
+
|
|
20
|
+
<Source
|
|
21
|
+
dark code={`
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
import { ref } from 'vue'
|
|
24
|
+
import SyTextField from '@cnamts/synapse'
|
|
25
|
+
|
|
26
|
+
const model = ref('')
|
|
27
|
+
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<main class="ma-12">
|
|
32
|
+
Text saisie: {{ model }}
|
|
33
|
+
<div class="d-flex flex-wrap align-center">
|
|
34
|
+
<SyTextField
|
|
35
|
+
v-model="model"
|
|
36
|
+
label="Label"
|
|
37
|
+
color="primary"
|
|
38
|
+
is-clearable
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</main>
|
|
42
|
+
</template>
|
|
43
|
+
`}
|
|
44
|
+
/>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
-
import
|
|
2
|
+
import SyTextField from '@/components/Customs/SyTextField/SyTextField.vue'
|
|
3
3
|
import { VIcon } from 'vuetify/components'
|
|
4
4
|
import { ref } from 'vue'
|
|
5
5
|
import { mdiAccountBox } from '@mdi/js'
|
|
6
6
|
|
|
7
7
|
const meta = {
|
|
8
|
-
title: 'Composants/Formulaires/
|
|
9
|
-
component:
|
|
8
|
+
title: 'Composants/Formulaires/SyTextField',
|
|
9
|
+
component: SyTextField,
|
|
10
10
|
parameters: {
|
|
11
11
|
layout: 'fullscreen',
|
|
12
12
|
controls: { exclude: ['modelValue', 'appendInnerIconColor'] },
|
|
@@ -39,7 +39,7 @@ const meta = {
|
|
|
39
39
|
options: ['primary', 'secondary', 'success', 'error', 'warning'],
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
|
-
} as Meta<typeof
|
|
42
|
+
} as Meta<typeof SyTextField>
|
|
43
43
|
|
|
44
44
|
export default meta
|
|
45
45
|
|
|
@@ -51,7 +51,7 @@ export const Default: Story = {
|
|
|
51
51
|
name: 'Template',
|
|
52
52
|
code: `
|
|
53
53
|
<template>
|
|
54
|
-
<
|
|
54
|
+
<SyTextField v-model="value" />
|
|
55
55
|
</template>
|
|
56
56
|
`,
|
|
57
57
|
},
|
|
@@ -59,7 +59,7 @@ export const Default: Story = {
|
|
|
59
59
|
name: 'Script',
|
|
60
60
|
code: `
|
|
61
61
|
<script setup lang="ts">
|
|
62
|
-
import
|
|
62
|
+
import SyTextField from '@cnamts/synapse'
|
|
63
63
|
</script>
|
|
64
64
|
`,
|
|
65
65
|
},
|
|
@@ -74,13 +74,13 @@ export const Default: Story = {
|
|
|
74
74
|
},
|
|
75
75
|
render: (args) => {
|
|
76
76
|
return {
|
|
77
|
-
components: {
|
|
77
|
+
components: { SyTextField, VIcon },
|
|
78
78
|
setup() {
|
|
79
79
|
return { args }
|
|
80
80
|
},
|
|
81
81
|
template: `
|
|
82
82
|
<div class="d-flex flex-wrap align-center pa-4">
|
|
83
|
-
<
|
|
83
|
+
<SyTextField v-bind="args" />
|
|
84
84
|
</div>
|
|
85
85
|
`,
|
|
86
86
|
}
|
|
@@ -94,7 +94,7 @@ export const SlotPrepend: Story = {
|
|
|
94
94
|
name: 'Template',
|
|
95
95
|
code: `
|
|
96
96
|
<template>
|
|
97
|
-
<
|
|
97
|
+
<SyTextField
|
|
98
98
|
v-model="value"
|
|
99
99
|
prepend-icon="info"
|
|
100
100
|
/>
|
|
@@ -105,7 +105,7 @@ export const SlotPrepend: Story = {
|
|
|
105
105
|
name: 'Script',
|
|
106
106
|
code: `
|
|
107
107
|
<script setup lang="ts">
|
|
108
|
-
import
|
|
108
|
+
import SyTextField from '@cnamts/synapse'
|
|
109
109
|
</script>
|
|
110
110
|
`,
|
|
111
111
|
},
|
|
@@ -121,13 +121,13 @@ export const SlotPrepend: Story = {
|
|
|
121
121
|
},
|
|
122
122
|
render: (args) => {
|
|
123
123
|
return {
|
|
124
|
-
components: {
|
|
124
|
+
components: { SyTextField, VIcon },
|
|
125
125
|
setup() {
|
|
126
126
|
return { args }
|
|
127
127
|
},
|
|
128
128
|
template: `
|
|
129
129
|
<div class="d-flex flex-wrap align-center pa-4">
|
|
130
|
-
<
|
|
130
|
+
<SyTextField
|
|
131
131
|
v-bind="args"
|
|
132
132
|
:label="args.label"
|
|
133
133
|
:prepend-icon="args.prependIcon"
|
|
@@ -145,7 +145,7 @@ export const SlotAppend: Story = {
|
|
|
145
145
|
name: 'Template',
|
|
146
146
|
code: `
|
|
147
147
|
<template>
|
|
148
|
-
<
|
|
148
|
+
<SyTextField
|
|
149
149
|
v-model="value"
|
|
150
150
|
append-icon="success"
|
|
151
151
|
/>
|
|
@@ -156,7 +156,7 @@ export const SlotAppend: Story = {
|
|
|
156
156
|
name: 'Script',
|
|
157
157
|
code: `
|
|
158
158
|
<script setup lang="ts">
|
|
159
|
-
import
|
|
159
|
+
import SyTextField from '@cnamts/synapse'
|
|
160
160
|
</script>
|
|
161
161
|
`,
|
|
162
162
|
},
|
|
@@ -172,13 +172,13 @@ export const SlotAppend: Story = {
|
|
|
172
172
|
},
|
|
173
173
|
render: (args) => {
|
|
174
174
|
return {
|
|
175
|
-
components: {
|
|
175
|
+
components: { SyTextField, VIcon },
|
|
176
176
|
setup() {
|
|
177
177
|
return { args }
|
|
178
178
|
},
|
|
179
179
|
template: `
|
|
180
180
|
<div class="d-flex flex-wrap align-center pa-4">
|
|
181
|
-
<
|
|
181
|
+
<SyTextField
|
|
182
182
|
v-bind="args"
|
|
183
183
|
:append-icon="args.appendIcon"
|
|
184
184
|
/>
|
|
@@ -195,7 +195,7 @@ export const SlotPrependInner: Story = {
|
|
|
195
195
|
name: 'Template',
|
|
196
196
|
code: `
|
|
197
197
|
<template>
|
|
198
|
-
<
|
|
198
|
+
<SyTextField
|
|
199
199
|
v-model="value"
|
|
200
200
|
prepend-inner-icon="info"
|
|
201
201
|
/>
|
|
@@ -206,7 +206,7 @@ export const SlotPrependInner: Story = {
|
|
|
206
206
|
name: 'Script',
|
|
207
207
|
code: `
|
|
208
208
|
<script setup lang="ts">
|
|
209
|
-
import
|
|
209
|
+
import SyTextField from '@cnamts/synapse'
|
|
210
210
|
</script>
|
|
211
211
|
`,
|
|
212
212
|
},
|
|
@@ -222,13 +222,13 @@ export const SlotPrependInner: Story = {
|
|
|
222
222
|
},
|
|
223
223
|
render: (args) => {
|
|
224
224
|
return {
|
|
225
|
-
components: {
|
|
225
|
+
components: { SyTextField, VIcon },
|
|
226
226
|
setup() {
|
|
227
227
|
return { args }
|
|
228
228
|
},
|
|
229
229
|
template: `
|
|
230
230
|
<div class="d-flex flex-wrap align-center pa-4">
|
|
231
|
-
<
|
|
231
|
+
<SyTextField
|
|
232
232
|
v-bind="args"
|
|
233
233
|
:prepend-inner-icon="args.prependInnerIcon"
|
|
234
234
|
/>
|
|
@@ -245,7 +245,7 @@ export const SlotPrependInnerDivider: Story = {
|
|
|
245
245
|
name: 'Template',
|
|
246
246
|
code: `
|
|
247
247
|
<template>
|
|
248
|
-
<
|
|
248
|
+
<SyTextField
|
|
249
249
|
v-model="value"
|
|
250
250
|
prepend-inner-icon="info"
|
|
251
251
|
show-divider
|
|
@@ -257,7 +257,7 @@ export const SlotPrependInnerDivider: Story = {
|
|
|
257
257
|
name: 'Script',
|
|
258
258
|
code: `
|
|
259
259
|
<script setup lang="ts">
|
|
260
|
-
import
|
|
260
|
+
import SyTextField from '@cnamts/synapse'
|
|
261
261
|
</script>
|
|
262
262
|
`,
|
|
263
263
|
},
|
|
@@ -273,13 +273,13 @@ export const SlotPrependInnerDivider: Story = {
|
|
|
273
273
|
},
|
|
274
274
|
render: (args) => {
|
|
275
275
|
return {
|
|
276
|
-
components: {
|
|
276
|
+
components: { SyTextField, VIcon },
|
|
277
277
|
setup() {
|
|
278
278
|
return { args }
|
|
279
279
|
},
|
|
280
280
|
template: `
|
|
281
281
|
<div class="d-flex flex-wrap align-center pa-4">
|
|
282
|
-
<
|
|
282
|
+
<SyTextField
|
|
283
283
|
v-bind="args"
|
|
284
284
|
:prepend-inner-icon="args.prependInnerIcon"
|
|
285
285
|
:show-divider="args.showDivider"
|
|
@@ -297,7 +297,7 @@ export const SlotAppendInner: Story = {
|
|
|
297
297
|
name: 'Template',
|
|
298
298
|
code: `
|
|
299
299
|
<template>
|
|
300
|
-
<
|
|
300
|
+
<SyTextField
|
|
301
301
|
v-model="value"
|
|
302
302
|
append-inner-icon="success"
|
|
303
303
|
/>
|
|
@@ -308,7 +308,7 @@ export const SlotAppendInner: Story = {
|
|
|
308
308
|
name: 'Script',
|
|
309
309
|
code: `
|
|
310
310
|
<script setup lang="ts">
|
|
311
|
-
import
|
|
311
|
+
import SyTextField from '@cnamts/synapse'
|
|
312
312
|
</script>
|
|
313
313
|
`,
|
|
314
314
|
},
|
|
@@ -324,13 +324,13 @@ export const SlotAppendInner: Story = {
|
|
|
324
324
|
},
|
|
325
325
|
render: (args) => {
|
|
326
326
|
return {
|
|
327
|
-
components: {
|
|
327
|
+
components: { SyTextField, VIcon },
|
|
328
328
|
setup() {
|
|
329
329
|
return { args }
|
|
330
330
|
},
|
|
331
331
|
template: `
|
|
332
332
|
<div class="d-flex flex-wrap align-center pa-4">
|
|
333
|
-
<
|
|
333
|
+
<SyTextField
|
|
334
334
|
v-bind="args"
|
|
335
335
|
:append-inner-icon="args.appendInnerIcon"
|
|
336
336
|
/>
|
|
@@ -347,13 +347,13 @@ export const SlotCustomIcon: Story = {
|
|
|
347
347
|
name: 'Template',
|
|
348
348
|
code: `
|
|
349
349
|
<template>
|
|
350
|
-
<
|
|
350
|
+
<SyTextField v-model="value">
|
|
351
351
|
<template #append-inner>
|
|
352
352
|
<VIcon>
|
|
353
353
|
{{ iconName }}
|
|
354
354
|
</VIcon>
|
|
355
355
|
</template>
|
|
356
|
-
</
|
|
356
|
+
</SyTextField>
|
|
357
357
|
</template>
|
|
358
358
|
`,
|
|
359
359
|
},
|
|
@@ -361,7 +361,7 @@ export const SlotCustomIcon: Story = {
|
|
|
361
361
|
name: 'Script',
|
|
362
362
|
code: `
|
|
363
363
|
<script setup lang="ts">
|
|
364
|
-
import
|
|
364
|
+
import SyTextField from '@cnamts/synapse'
|
|
365
365
|
import { mdiAccountBox } from '@mdi/js'
|
|
366
366
|
|
|
367
367
|
const iconName = mdiAccountBox
|
|
@@ -379,7 +379,7 @@ export const SlotCustomIcon: Story = {
|
|
|
379
379
|
},
|
|
380
380
|
render: (args) => {
|
|
381
381
|
return {
|
|
382
|
-
components: {
|
|
382
|
+
components: { SyTextField, VIcon },
|
|
383
383
|
setup() {
|
|
384
384
|
const iconName = ref(mdiAccountBox)
|
|
385
385
|
|
|
@@ -387,7 +387,7 @@ export const SlotCustomIcon: Story = {
|
|
|
387
387
|
},
|
|
388
388
|
template: `
|
|
389
389
|
<div class="d-flex flex-wrap align-center pa-4">
|
|
390
|
-
<
|
|
390
|
+
<SyTextField
|
|
391
391
|
v-bind="args"
|
|
392
392
|
>
|
|
393
393
|
<template #append-inner>
|
|
@@ -395,7 +395,7 @@ export const SlotCustomIcon: Story = {
|
|
|
395
395
|
{{ iconName }}
|
|
396
396
|
</VIcon>
|
|
397
397
|
</template>
|
|
398
|
-
</
|
|
398
|
+
</SyTextField>
|
|
399
399
|
</div>
|
|
400
400
|
`,
|
|
401
401
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { mount } from '@vue/test-utils'
|
|
2
|
-
import
|
|
2
|
+
import SyTextField from '../SyTextField.vue'
|
|
3
3
|
import { expect, describe, it } from 'vitest'
|
|
4
4
|
import { VIcon } from 'vuetify/components'
|
|
5
5
|
import { vuetify } from '@tests/unit/setup'
|
|
6
6
|
|
|
7
|
-
describe('
|
|
7
|
+
describe('SyTextField', () => {
|
|
8
8
|
const factory = (props = {}, slots = {}) => {
|
|
9
|
-
return mount(
|
|
9
|
+
return mount(SyTextField, {
|
|
10
10
|
props,
|
|
11
11
|
slots,
|
|
12
12
|
global: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`
|
|
3
|
+
exports[`SyTextField > matches snapshot 1`] = `
|
|
4
4
|
"<div class="v-input v-input--horizontal v-input--center-affix v-input--density-default v-theme--light v-locale--is-ltr v-text-field">
|
|
5
5
|
<div class="v-input__prepend"><i class="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z mdi v-icon notranslate v-theme--light v-icon--size-default" aria-hidden="true"></i>
|
|
6
6
|
<!---->
|
|
@@ -27,10 +27,8 @@ exports[`CustomTextField > matches snapshot 1`] = `
|
|
|
27
27
|
<hr class="v-divider v-divider--vertical v-theme--light text-primary mt-4 pa-1" style="height: 25px; border-right-width: 2px; --v-border-opacity: 1;" aria-orientation="vertical" role="separator">
|
|
28
28
|
</div>
|
|
29
29
|
<div class="v-field__field" data-no-activator="">
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<!---->
|
|
33
|
-
</label>
|
|
30
|
+
<!---->
|
|
31
|
+
<!---->
|
|
34
32
|
<!----><input size="1" type="text" id="input-0" aria-describedby="input-0-messages" class="v-field__input" value="">
|
|
35
33
|
<!---->
|
|
36
34
|
</div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, Canvas, Controls } from '@storybook/blocks';
|
|
2
|
+
import * as DialogBoxStories from './DialogBox.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={DialogBoxStories} />
|
|
5
|
+
|
|
6
|
+
# DialogBox
|
|
7
|
+
|
|
8
|
+
L’élément `DialogBox` est utilisé pour afficher une boîte de dialogue avec des bouttons d'action.
|
|
9
|
+
|
|
10
|
+
<Canvas of={DialogBoxStories.Default} />
|
|
11
|
+
|
|
12
|
+
# API
|
|
13
|
+
|
|
14
|
+
<Controls of={DialogBoxStories.Default} />
|